New thread about 16*16 sprite record

GFA, ASM, STOS, ...

Moderators: exxos, simonsunnyboy, Mug UK, Zorro 2, Moderator Team

User avatar
NiceGuyUK
Atari Super Hero
Atari Super Hero
Posts: 580
Joined: Thu Nov 25, 2004 1:03 pm
Location: Kent, England
Contact:

Postby NiceGuyUK » Sat Mar 19, 2005 6:46 pm

leglod wrote:Bonsoir, je me suis poser plusieur fois la question a savoir si le record pouvait etre facilement battue en utilisant le Blitter des STE ???


(very) Rough translation :- Evening. I asked several times if this record could be easily beaten using the Blitter of the STE
Also known as Big Boss Man of Demografica

User avatar
leonard
Moderator
Moderator
Posts: 640
Joined: Thu May 23, 2002 10:48 pm
Contact:

Postby leonard » Sun Mar 20, 2005 12:47 am

I asked several times if this record could be easily beaten using the Blitter of the STE


Contest rule number 2 specify it should run on 520 STF machine.

Anyway the question is interesting. I think the answer is "yes", but probably not very many sprites. Blitter could be used to clear some columns (the higgest ones to be efficient). I don't think it's efficient to draw 16*16 non masked sprites . ( even those displayer with OR). Our specific CPU routines are already faster than blitting the complete 32*16 area.

Someone wanted to open a new contest on 520 STE ? :-)
Leonard/OXYGENE.

punkrulesok
Captain Atari
Captain Atari
Posts: 234
Joined: Tue Aug 05, 2003 7:34 pm

Postby punkrulesok » Sun Mar 20, 2005 1:04 pm

The guy who seems to know most about Blitter coding is the guy who wrote Roger :) I think he could say for sure if a new contest is worth it :)

User avatar
Zorro 2
Administrator
Administrator
Posts: 2190
Joined: Tue May 21, 2002 12:44 pm
Location: Saint Cloud (France)
Contact:

Postby Zorro 2 » Mon Mar 21, 2005 8:30 am

punkrulesok wrote:The guy who seems to know most about Blitter coding is the guy who wrote Roger :) I think he could say for sure if a new contest is worth it :)

Roger has been creating in GFA BASIC, maybe the new rules can make effect in da GFA :?:
Last edited by Zorro 2 on Mon Mar 21, 2005 11:21 am, edited 1 time in total.
Member of NoExtra Team

User avatar
p01
Captain Atari
Captain Atari
Posts: 158
Joined: Mon Nov 22, 2004 1:27 am
Location: Oslo, Norway
Contact:

Postby p01 » Mon Mar 21, 2005 9:05 am

a sprite record in GFA :wink:
AFAIR, Chuck + Evil Metal/Dune made 42 sprites in 1 VBL. At the time I was stuck at 40.

a controlable lissajou curve in GFA ? I made one with 450 or 500 ( don't remember exactly :P but the previous "record" was 300 ) in No Flowers ( press Tab, F1 - F8 during the effect with the redish background )
Image

User avatar
leglod
Captain Atari
Captain Atari
Posts: 416
Joined: Sun Nov 28, 2004 9:34 am
Location: Montpellier france
Contact:

Postby leglod » Mon Mar 21, 2005 5:26 pm

Yes a new Category for 520 STf and 520 STE ... :mrgreen:
Grilichili bruit de crayon sur papier.
Les dinosaures de la micro :) ... Mini-Z ...

MetalGuru
Retro freak
Retro freak
Posts: 15
Joined: Thu Sep 02, 2004 9:17 am
Location: Sweden

Postby MetalGuru » Wed Mar 23, 2005 3:28 pm

Wow, good work Leonard, it´s really a great pice of code.... 8O


/MetalGuru

User avatar
leglod
Captain Atari
Captain Atari
Posts: 416
Joined: Sun Nov 28, 2004 9:34 am
Location: Montpellier france
Contact:

Postby leglod » Wed Mar 23, 2005 9:13 pm

I propose to you to change Sprites for version STE, with the choice Atari Bombe, Atari Logo or butterfly... :roll:
Grilichili bruit de crayon sur papier.

Les dinosaures de la micro :) ... Mini-Z ...

User avatar
ggn
Atari God
Atari God
Posts: 1134
Joined: Sat Dec 28, 2002 4:49 pm

Postby ggn » Thu Mar 24, 2005 10:29 am

leglod,

If he does change the sprite, then the same code will produce less (or more) sprites!
is 73 Falcon patched atari games enough ? ^^

pht
Atari freak
Atari freak
Posts: 55
Joined: Mon Aug 30, 2004 10:30 am
Contact:

Postby pht » Thu Apr 07, 2005 6:49 pm

After I was struck by leonard (312 balls record) 8O...
I stopped any activity on this fornicating stupid record !
But the madness of the code recalled me.

Here is a point of my code advance :
Clearing code was nicely optimized
ImageImage
5 gained rasters lines on my previous (non published) 283 record !
My 36bytes unit clearing datas storing have even been reduced (I did not calculate but average rate should be 28 bytes ?!)

But that is not enough !

I've tested the OR and MOVE display code(leonard one and mine). They are quite similar and CPU time used is nearly the same (the difference time is unimportant)

Now, I have to work on my databuilder. It is very bad in finding OR incomplete sprite.
Leonard used 3 types of OR sprite (1 complete and 2 incomplete = 4 top lines sprite & 4 bottom lines sprite suppressed)
I used 5 differents types of OR sprite for my 283 record.

BTW, Leonard, I have noticed a strange thing in your OR display code.
The 7th shift of the complete sprite :
MOVEQ #$F0,D1
MOVEQ #$C0,D6
MOVEM.L L6A08A(PC),D0/D3-D4
ADDA.W (A4)+,A6
JMP (A6)
...

Your sprite is bugged : to be complete, 2 instructions are missing :
or.l d0,5*160(a6)
or.l d0,10*160(a6)

Did you do that on purpose ?
Strangely, I did not find any visible incidence on curve display... but it should ?!
What's up with this?

"Then I fastly code a brute force research for all different sprite routines"


Number of permutations should be 312 ! = 2,1.10^644 (or would it be 2^312 = 8,34.10^93 ... mathematic gaps)
Anyway brute force research is just impossible... especially if databuilder is running for less than a few minutes...
You should have reduce in a drastic way the number of sprite (intelligent or empirical way)
I am running out of idea for the moment...

That's all.

User avatar
leonard
Moderator
Moderator
Posts: 640
Joined: Thu May 23, 2002 10:48 pm
Contact:

Postby leonard » Fri Apr 08, 2005 10:04 am

Your sprite is bugged : to be complete, 2 instructions are missing :
or.l d0,5*160(a6)
or.l d0,10*160(a6)

Did you do that on purpose ?
Strangely, I did not find any visible incidence on curve display... but it should ?!


Maybe you don't notice visible incidence just because there is no bugs :-) I guess you don't look carefully enough.
If you run the demo , in 512Kb mode in emulator, just go at adress $69298 ( first sprite rout for complete Or shift 7), you can read:

add.w (a5)+,a4
or.l d0,$640(a5) ; 10*160
or.l d0,$320(a5) ; 5*160

these instructions simply exist in the code :-)



Number of permutations should be 312 ! = 2,1.10^644 (or would it be 2^312 = 8,34.10^93 ... mathematic gaps)
Anyway brute force research is just impossible


Totally agree. 312! is totally out of order of any computer (or group computer on that planet).

The fact is I use "brute force" word too early. To me, as soon as I reach n^2 complexity, it's brute force :-) ( optimizing rules). n! is totally un-reachable and I don't think about these routs in general. I just try to avoid n^2 routines.
That's why in my case, my OR research ( but my MOVE too) works in n^2, wich is only 312*312 = 97344, wich is quite fast on today PC.

Maybe to give an idea: you first though of 312! because you guessed the sprite are masked. Just remember the sprite are displayed with OR, it may help you finding the 312*312 only complexity.

Btw it's really cool to note that this stupid record is quite interesting, just because many tricks reside in the databuilder. Remember old demos ? As soon as a guy release a 3d rout, other grab the code and get the same. With the sprite record, optimisations are now located inside a *non released" code, wich is quite funny ( philosophicaly speaking :-))
Leonard/OXYGENE.

pht
Atari freak
Atari freak
Posts: 55
Joined: Mon Aug 30, 2004 10:30 am
Contact:

Postby pht » Fri Apr 08, 2005 11:45 am

Maybe you don't notice visible incidence just because there is no bugs I guess you don't look carefully enough.


oups yep, you are right ! ... these bloody sprite datas insertion in the code just get me wrong !

I read this

L6A082 MOVEM.L L6A08A(PC),D0/D3-D4
L6A088 ADDA.W (A4)+,A6
L6A08A JMP (A6)
L6A08C BSET D0,
L6A08E ORI #$18F,SR
L6A092 ORI #$FF,SR
L6A096 ORI.B #$DC,$FFFF81AD.W
L6A09C ADDI.W #$81AD,D0
L6A0A0 BTST D1,-(A0)
L6A0A2 OR.L D3,$5A0(A5)
L6A0A6 OR.L D3,$500(A5)


instead of this

L6A082 MOVEM.L L6A08A(PC),D0/D3-D4
L6A088 ADDA.W (A4)+,A6
L6A08A JMP (A6)
L6A08C SPRITE_DATAS
...
L6A098 ADDA.W (A4)+,A5
L6A09A OR.L D0,$640(A5)
L6A09E OR.L D0,$320(A5)
L6A0A2 OR.L D3,$5A0(A5)
L6A0A6 OR.L D3,$500(A5)


And of course I did not see any visible incidence... It was really curious.
Sorry !

Maybe to give an idea: you first though of 312! because you guessed the sprite are masked. Just remember the sprite are displayed with OR, it may help you finding the 312*312 only complexity.


Ok, you really reduce (in an intelligent way) the number of permutations.
Thanks I will think about this tips !

just because many tricks reside in the databuilder


For sure, databuilder is even the only goal for the moment... since my 68000 code did not change for a long time :)

Well... Visual Basic should be my near future :)

User avatar
leonard
Moderator
Moderator
Posts: 640
Joined: Thu May 23, 2002 10:48 pm
Contact:

Postby leonard » Fri Apr 08, 2005 12:44 pm

For sure, databuilder is even the only goal for the moment... since my 68000 code did not change for a long time


I guess now there is only two ways of improving records:


a) Find new ideas to improce data generation

b) Have a totally new idea about sprite displaying / clearing ( and so heavily change the ST runtime code). That's the kind of idea I would like to have :-) ( basically the generated sprite code technic have not changed since TCB)

c) Have an idea to get memory so you can use more sprite routs ( I only use 3)


Actually I don't see any improvment in my databuilder. ( but I don't see any improvment when I was at 268 so I'm not sure about it :-))
Leonard/OXYGENE.

User avatar
leonard
Moderator
Moderator
Posts: 640
Joined: Thu May 23, 2002 10:48 pm
Contact:

Postby leonard » Fri Apr 08, 2005 12:47 pm

well I don't know how to count to 3..
Leonard/OXYGENE.

GwL
Atarian
Atarian
Posts: 4
Joined: Sat Oct 23, 2004 3:22 pm
Location: France

Postby GwL » Thu Apr 28, 2005 8:57 pm

leonard wrote:well I don't know how to count to 3..


Some times i have a look to this forum to read the last news concerning the sprite record.
I keep in mind some ideas to reach this number 3, but Unfortunately I have no time to code these ... maybe one day.

Congratulations to pht and you for this quest . see you (soon i hope) in this forum

Gwl

(PS : Just a question, i know you already answer this one but i forgot it. How many cycles in one vbl ? )

User avatar
p01
Captain Atari
Captain Atari
Posts: 158
Joined: Mon Nov 22, 2004 1:27 am
Location: Oslo, Norway
Contact:

Postby p01 » Thu Apr 28, 2005 10:05 pm

All the following processor timings are based on a bog
standard 8MHz 68000 as found in all standard ST's.

Clock cycles per line (50Hz) : 512
NOPs per scan line (50Hz) : 128
Scan lines per VBL (50Hz) : 313

Clock cycles per line (60Hz) : 508
NOPs per scan line (60Hz) : 127
Scan lines per VBL (60Hz) : 315

Clock cycles per VBL : 160256
NOPs per VBL : 40064

Pixels per clock cycle (low res) : 1
Pixels per clock cycle (med res) : 2
Pixels per clock cycle (high res) : 4
Pixels per NOP (low res) : 4
Pixels per NOP (med res) : 8
Pixels per NOP (high res) : 16
source: The Atari ST Internals
Image

GwL
Atarian
Atarian
Posts: 4
Joined: Sat Oct 23, 2004 3:22 pm
Location: France

Postby GwL » Fri Apr 29, 2005 8:32 pm

Thank you for this detailed answer.

GwL
Let there be sprites

User avatar
Cyprian
Atari God
Atari God
Posts: 1404
Joined: Fri Oct 04, 2002 11:23 am
Location: Warsaw, Poland

Postby Cyprian » Sat Apr 30, 2005 12:09 am

p01 wrote:
Clock cycles per line (60Hz) : 508
NOPs per scan line (60Hz) : 127
Scan lines per VBL (60Hz) : 315
source: The Atari ST Internals


It's not correct. I think one VBL (60Hz) contains about 260 lines.

User avatar
p01
Captain Atari
Captain Atari
Posts: 158
Joined: Mon Nov 22, 2004 1:27 am
Location: Oslo, Norway
Contact:

Postby p01 » Sat Apr 30, 2005 11:49 am

Go tell this to the authors of the "Atari ST Internals". And do the count by yourself and tell us what numbers you came out with. :wink:
Image

RA_pdx
Captain Atari
Captain Atari
Posts: 215
Joined: Sun Feb 02, 2003 12:01 pm
Location: Nuernberg/GERMANY

Postby RA_pdx » Sat Apr 30, 2005 6:31 pm

In 60 Hz it must be 263 scan lines.

User avatar
Zorro 2
Administrator
Administrator
Posts: 2190
Joined: Tue May 21, 2002 12:44 pm
Location: Saint Cloud (France)
Contact:

Postby Zorro 2 » Fri May 13, 2005 2:59 pm

About this old record, any news from displaying 32*32 sprite in 15 colors mister Leonard ? Maybe a new contest ?
You do not have the required permissions to view the files attached to this post.
Member of NoExtra Team

User avatar
leglod
Captain Atari
Captain Atari
Posts: 416
Joined: Sun Nov 28, 2004 9:34 am
Location: Montpellier france
Contact:

Postby leglod » Fri May 13, 2005 4:30 pm

Hi, nedd 1 mega and do not run under Steem Tos 1 or 1.62 :( :(
Grilichili bruit de crayon sur papier.

Les dinosaures de la micro :) ... Mini-Z ...

User avatar
leonard
Moderator
Moderator
Posts: 640
Joined: Thu May 23, 2002 10:48 pm
Contact:

Postby leonard » Mon May 16, 2005 1:30 pm

Same for me... don't know if it's a fake or a real program, it does not run on SainT 1.99d ( 1Mb or 2MB, TOS 1.00, STF)

Anyone succeed running the demo ?
Leonard/OXYGENE.

Gunstick
Captain Atari
Captain Atari
Posts: 258
Joined: Thu Jun 20, 2002 6:49 pm
Location: Luxembourg
Contact:

getting memory

Postby Gunstick » Sat Jul 02, 2005 10:13 pm

Hi

my sprite record was perhaps not the best but it had some nice tricks...

It used 4 screens instead of 2 (means: I had 64K memory left)
How that?
* The scroller was NOT preshifted but shifted in realtime on screen.
* The YM tune was compressed and decompressed in realtime while playing.

Here's the source, have fun.

Georges
You do not have the required permissions to view the files attached to this post.

User avatar
leglod
Captain Atari
Captain Atari
Posts: 416
Joined: Sun Nov 28, 2004 9:34 am
Location: Montpellier france
Contact:

Postby leglod » Sun Jul 03, 2005 9:36 am

Hello are you a compiled "PRG" or "TOS" version please ??? :)
Grilichili bruit de crayon sur papier.

Les dinosaures de la micro :) ... Mini-Z ...


Social Media

     

Return to “Coding”

Who is online

Users browsing this forum: No registered users and 1 guest