New thread about 16*16 sprite record

GFA, ASM, STOS, ...

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

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

New thread about 16*16 sprite record

Postby leonard » Thu Mar 17, 2005 3:06 pm

Hi all !

Just wonder a question. Let's suppose I beat the Phantom record ( 280 ). What do you prefer ( I speak to 16*16 record person, Phantom, SOTE, Gunstik ):

a) I release my record now

or

b) I release a 281 sprites record, AND another record, protected with a password, to motivate people.

You may think I'm a bit mad but I like to ask question, because I'd love someone put a password on a disk so I could try to crack it ! But if you think it's totally useless, told me.

So what do you prefer: method a) ( 1 disk released ) or method b ( 2 disks released). Or anyone have another suggestion ?

stupid records rules !!
Leonard/OXYGENE.

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

Postby p01 » Thu Mar 17, 2005 3:30 pm

a) since there is no need to motivate the troups anymore :wink:

Btw I think you should update the ATARI 16*16 Sprite Demo Contest page to list the complete rules, provide the formula of the wave, the sprite and eventually the SOS tune in YM format.
Image

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

Postby pht » Thu Mar 17, 2005 3:48 pm

"You may think I'm a bit mad but ..."

I don't think so, i just know it ! :-) Nowdays, a healthy man can not work on this kind of record.
Anyway, it seems guys who are working on breaking protection, are not the same who are breaking 16x16 record... Perhaps, more person could be implied ?
Well I can not tell you...

But if you want to beat my record, you'll better work on a higher sprite record... I'm about to reach a 283 balls screen :-D (RAM trouble for the moment :? )
But I know Leonard will not publish a "only one more ball record" !
I (we) always await more from him :wink:

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

Postby Zorro 2 » Thu Mar 17, 2005 5:05 pm

Hi Leonard, know you the really people who tried to break your password ? I thought that it's possible for ST-GHOST only... I'm mistaken ???

Hum... for new record, can you make an another contest please :)
I'll be able to take part on it an maybe other - new - coders ?
Member of NoExtra Team

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

Postby leonard » Thu Mar 17, 2005 5:16 pm

I thought that it's possible for ST-GHOST only... I'm mistaken ???


I really don't know. If there is some people interested I can do it again. But it's quite hard to crack I guess.

Hum... for new record, can you make an another contest please


It should be suspect if I propose another contest myself. I think it could be a very nice idea if someone else propose a contest with fixed rules. I'll be happy to try to challenge it :-)

Ok let me know if you want a "small" record with another encrypted "big record" or just a big record. I can release stuff that night.

More I get answers, more I can take the right choice :-)
Leonard/OXYGENE.

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

Postby p01 » Thu Mar 17, 2005 5:30 pm

Leonard: If the "small" record is bigger than the 283 screen Phantom is working on ( and probably about to release ) and the difference between your "small" and "big" records is significant ( 3% at least ), well why not.

But all in all, is it really necessary ? I'd rather see a BIG record. It will really put the sprite record coders on the nerves and will push them to sharpen their routines to unexplored areas.

Zorro 2: I suggest you to pick a screen in an Oxygene demo, or another screen you like, remake it with more stuff and challenge the other coders. You'll be sure that you're able to take part to this contest. :wink:
Image

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

Postby leonard » Thu Mar 17, 2005 9:00 pm

and the difference between your "small" and "big" records is significant ( 3% at least ), well why not.


Why that's my problem. the difference is quite... impressive... :-)

But all in all, is it really necessary ? I'd rather see a BIG record. It will really put the sprite record coders on the nerves and will push them to sharpen their routines to unexplored areas.


Well I guess you're right. I'll release it in few hours, just make some last changes with colors and design. ( I think it will be the first "nice designed" sprite record ! Hope you will like it !)
Leonard/OXYGENE.

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

Postby leonard » Thu Mar 17, 2005 9:49 pm

Ok here is the new blasting 16*16 sprite record ! I tryed to add some design to please a large audience :-)

Image

You can get that beauty here :

http://leonard.oxg.free.fr/record16/rec16e.msa

I let you discover the number of sprite by downloading the demo and run it on real hardware or on the SainT emulator.

http://leonard.oxg.free.fr/SainT/saint.html

The number of sprite is displayed in the demo scroll-text.

I really hope you like it. If some of you are interested, I'll try to get some time to give details about new tricks used in that demo.

Ultra optimization rules !!
Leonard/OXYGENE.

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

Postby p01 » Thu Mar 17, 2005 10:03 pm

8O what do you eat at breakfast ? it gives you some kind of super powers.
How do you fit XXX sprites in 512kb ?!

Nice wink to the bee sprite of the Outline 2005 invitation in the generator, and mucho better design.
Image

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

Postby leonard » Thu Mar 17, 2005 10:26 pm

Nice wink to the bee sprite of the Outline 2005 invitation in the generator, and mucho better design


thanks ! I admit I get the bee-loader idea few days ago by looking at the "Outline" website !

The main idea for the record is.... memory. I'm too tired to write details now. I'll try to post technical details tomorrow. finally, in that kind of stupid record, giving details about new technics found is really cool ! I have to say I get ideas from Scum of the Earth and Phantom.

Tomorrow I'll try to post the complete story of optimizations I do to jump from 268 to XXX :-)
Leonard/OXYGENE.

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

Postby p01 » Thu Mar 17, 2005 10:31 pm

I haven't yet had a look at the code but I suppose the move.l display technic does wonders to decrease the number of calls to do in the clearing code tower and thus saving some memory.
Image

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

Postby leonard » Thu Mar 17, 2005 10:37 pm

I suppose the move.l display technic does wonders to decrease the number of calls to do in the clearing code tower


Exactly. Unfortunatly, this is not a *very efficient* trick. Using that trick , I just jump from 278 (internal version) to 281 ( just 3 sprites ).
Leonard/OXYGENE.

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

Postby pht » Thu Mar 17, 2005 11:42 pm

God damned !
You really kicked my ass...
I just have to stop right now writing my 283 balls record !
Congratulations ! Once more (!) for this master piece of code and great design !
I began to write a new clearing builder (but it seems not to be the same you used)
I just give a look at your clearing code, you strangely mixe tower code and blocks code...
Let's go sleeping !

User avatar
[ProToS]
Moderator
Moderator
Posts: 2242
Joined: Fri Sep 20, 2002 2:09 am
Location: Lourdes / France
Contact:

Postby [ProToS] » Thu Mar 17, 2005 11:53 pm

just one thing : 8O
SeeU
[ProToS]/Facebook

C-Rem
Captain Atari
Captain Atari
Posts: 385
Joined: Wed May 01, 2002 6:45 pm

plop

Postby C-Rem » Fri Mar 18, 2005 7:25 am

it's cool to see great coders working on a record ... but as i'm graphician , i prefer multiparts ...

i dream of a french multipart demo ...

We have : excellent active coders :

- Leonard ... Pht ... Chuck ... STghost ... Frost242 ... tobe ... gloky ... GT-Turbo ... etc

- Musicians : Dma-sc ... Floopy ... etc

- Graphicians : Exocet ... Mic ... STS ... EDO ... etc

well ... it's just an old dream

Thierry Kormann
Atari nerd
Atari nerd
Posts: 45
Joined: Sun Oct 10, 2004 3:10 pm
Location: France
Contact:

Postby Thierry Kormann » Fri Mar 18, 2005 7:59 am

leonard wrote:Ok here is the new blasting 16*16 sprite record ! I tryed to add some design to please a large audience :-)


Congratulations Leonard. Once again, an impressive work! and nice design BTW...
Demon from the Conceptors

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

Re: plop

Postby Zorro 2 » Fri Mar 18, 2005 8:48 am

C-Rem wrote:it's cool to see great coders working on a record ... but as i'm graphician , i prefer multiparts ...

i dream of a french multipart demo ...

We have : excellent active coders :

- Leonard ... Pht ... Chuck ... STghost ... Frost242 ... tobe ... gloky ... GT-Turbo ... etc

- Musicians : Dma-sc ... Floopy ... etc

- Graphicians : Exocet ... Mic ... STS ... EDO ... etc

well ... it's just an old dream

I'm remember too, old dream, an mjj french multipart, since 2003, there's still screens about some mjj "coders"...

You can remove GT-Turbo on your proper list, he codes only for Falcon/STE games...
Member of NoExtra Team

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

Postby leonard » Fri Mar 18, 2005 7:42 pm

Hi all. As promised I find some time to share technics I find to reach the 312 sprite record. I think it's better to

explain how things were discovered.

First of all, thanks to Scum of the Earth and Phantom to beat my previous record. Without it, I simply *never* spend

energy to beat my own record. That's the main point of "ultra-optimisation" : you can't do it if you're alone

because you can't fight with other people ideas.

When SOTE and Phantom released 269 and 270, I was a bit curious how they made it, as I was sure my 268 was not

beatable :-). As I don't see some big difference in Phantom code, I guessed the difference came in the data. Back to

holiday, I started to study the Phantom screen under SainT debugger. ( you can't imagine what a motived coder can do

under saint debugger :-) Displaying CPU time, drawing the CLS map etc...). By displaying the CLS map I discovered

that the area was a little smaller than mine. Fastly, it appairs my pc generator was not very good at finding CLS

area. In fact, I supposed I wanted to clear the complete screen. In fact, you don't need to clear areas where new

sprite will be draw. If S is a 32bits on screen and A is the 32bits "OR" value, don't clear if S OR A = A. I fastly

change my builder and reached 272.

As I modify my old generator, I noticed a part where I wrote a comment in the source code "empirical search, should

improve this". Humm, I worked on that problem again and I find a good solution using brute force. The problem is to

find the best order to draw OR sprites ( after drawing MOVE ) to remove a maximum of OR. Applying that new idea

using brute force search, I reached 278. Everything WITHOUT changing anything in the runtime ST player ! ( only the

PC data builfder)

Then, I was about to release my 278 ( record was 271 by Phantom ). The same day, before I release, Phantom published

280 !! Gosh, what's new idea ??

In the Phantom 280 record, he spoke about an idea from SOTE to use MOVE.L for "move" sprite. To enderstand the idea,

you just slow down a bit the sprite display, but you speedup a bit the CLS. Btw, I looked at Phantom code in details

and find that he used more sprite data than me ! how was it possible ? I looked deeply in its sprite code and find a

new technic: he has more than 16 sprites routines. He used several sprite routines, some for 16pixels height sprite,

some for 12, 10 etc...

I though about that method long time ago, but I never tryed it because I was pretty sure that it will required too

much memory. So how did he solved the memory problem ?

Phantom uses two technics to preserve memory:
1) some of its CLS data are stored into 8bits instead of 16. The main drawback is that he needs to "unpack" these

data to 16bits in real time, and it takes lot of CPU.
2) He uses a "world shortest" scroll-text ever:-)

----------------------------------------

Now let's resume. I have 278 sprites. Phantom has 280. He uses the "MOVE.L" technic and the "multi-sprite-routine"

technic. As I don't use any of these technics, I was sure my databuilder were far better than him ( because I was

only 2 sprites bellow).

I firstly tryed to implement the MOVE.L technic, so I decided to completly re-write my sprite generator. Now I have

a clean and scalable C++ code so I can test many options. with MOVE.L , I only reached 281 ( 3 sprites more than my

previous 278)

Now I was sure my builder was very powerfull, because I get the record (281) *without* using multi-sprite routines.

I know "multi-sprite" method is VERY fast, but use a lot of memory.

To splash the record, I had to find a way to get memory ! I don't wanted to use Phantom method because a) it takes

CPU time b) it's not my own idea :-).

The idea !
----------

The idea came 16.03.2005, my birthday date :-) As I don't find any usefull ideas, I decide to create a text file

containing a typical CLS frame, in hexadecimal. I often noticed that eyes connected to brain are great organs to

find ideas :-) And very often, you have to "see" datas to get news ideas. Here is the sample text file:

http://leonard.oxg.free.fr/record16/clstest.txt

Since my 268 record, everybody use the same CLS routine: various JMP in a 16pixels vertical block clearing routine.

For each block, you have to record its screen position (16bits) and a number of line (16bits, because it's a JMP

adress directly). Phantom used 8bits for the second data, so he has to convert it into adress in real time.

Looking at the text file upper, I noticed there is plenty blocks of 1,2,3 or 4 lines high. So came the idea: Why not

SORTING block per size ?? When sorted, if I have 12 blocks of one line each, I simply store "12" and then 12 screen

positions: 2+12*2 =26bytes , instead of 48bytes for old method, or 36bytes for Phantom method.

Better, to draw the 12 blocks of 1 line, I simply use DBF (loop) instruction instead of JMP, wich is 4 cycles better

!! ( move.w (an)+,an and jmp(an) in the old method)

That is the main idea : I get 47Kb of memory, and the routine is a bit FASTER !!!

Then I fastly code a brute force research for all different sprite routines, and that is: 312 !!


The future
----------

The main constraint now is only the 512Kb limitation. People finding new method to get memory will be the future

record owner. I'm sure 312 can be beaten with these new methods ( I was not sure about it for my 268 record). Now I

have plenty of "empirical" choice in my databuilder, and I think I can easyly get 2 or 3 sprites more by carefully

finetuning all generation parameters.

And if someone find a new idea, I'm sure we can put more and more sprites !

Ultra-optimisation rules !!

Leonard/Oxygene.
Leonard/OXYGENE.

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

Postby p01 » Fri Mar 18, 2005 9:02 pm

Thank you for sharing your explorations.
Image

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

Postby pht » Sat Mar 19, 2005 11:19 am

Thanks a lot for this code analysis !

By displaying the CLS map I discovered that the area was a little smaller than mine... If S is a 32bits on screen and A is the 32bits "OR" value, don't clear if S OR A = A

After your idea of clearing with 'MOVE display', I thought with 'OR display', all screen does not need to be clear.
I don't wanted to use Phantom method because a) it takes CPU time...

In fact, it takes no real needed CPU time : my whole code is in VBL vector $70.w and my "unpacked" buffer is created during the remaining time. So sometimes CPU can unpack (some frame are ending far before VBL ending) and sometimes it can't (some frame just fit in VBL). To cure that, buffer must have advance : exactly 10 frames ahead (for the 280 record)

Anyway, I am struck by the speed you modify your code ! (a week to burn out a record) When I have an idea, I spend so many hours on coding it (I'm trying for the moment a new promising idea on clearing... but not as revolutionary as yours)

But 30 sprites more can not only be found in clearing optimisation, I think the main optimisation will be in the databuilder search of OR display.

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

Postby leonard » Sat Mar 19, 2005 1:29 pm

In fact, it takes no real needed CPU time : my whole code is in VBL vector $70.w and my "unpacked" buffer is created during the remaining time


Oh yes I'm aware of your "multi-thread" mechanism ( I like spent hours under SainT debugger :-)). But, that is:it *takes* cpu time. I mean, if a frame is faster than 1 vbl, I agree you compute things for "free". But if you don't compute it, you can use that "free time" for other data process. So it takes time ( but it's true you get a good idea by making that process in another thread routine).

But 30 sprites more can not only be found in clearing optimisation, I think the main optimisation will be in the databuilder search of OR display.


You're right. My CLS technic is *only* usefull for memory saving. By chance, it does not take more CPU time than my old routine, but the main goal is memory saving.
My databuilder use several "intelligent" and "brute force" search. "Intelligent" search is used for "MOVE" finding, and brute force is used for "OR" searching and "multi-sprite" routine search.
the whole code is written in C++ with Visual c++ 6.0 and computes data in 30 seconds in my Intel P4 - 2Ghz. the code is not written in an "optimized" way but the Microsoft C++ compiler is very efficient.


Anyway, I am struck by the speed you modify your code


Well I'm a tricker. I spend more time on finding ideas than transform it into 68k code. For the code, I use VisualC++ with an 68k assembler written by Ziggy Stardust. The assembling is very fast, and "errors" appairs in the visual c++ IDE. Then I have my demo system and kernel, I can create a bootable disk image with a simple batch file, and launch it under SainT ( very cool to debug ).
Working with these tools are *far* better (and faster) than in time I write O-Demo or Flipo demo on my 1040-Floppy disk only STE :-)
Leonard/OXYGENE.

Pink/RG
Moderator
Moderator
Posts: 32
Joined: Tue Dec 17, 2002 5:54 pm
Location: Guildford, UK
Contact:

Postby Pink/RG » Sat Mar 19, 2005 2:02 pm

This Ziggy Stardust 68k assembler sounds like a useful tool - is it available anywhere?

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

Postby leonard » Sat Mar 19, 2005 2:42 pm

Well, I guess it should be freeware, maybe you can find it on the web. anyway I attached my version. It was modifyed by Ben/OVR ( sc68 author).

I just use "as68 sourcecode.s" and it produces "sourcecode.bin". I assemble at fixed adress in my demo kernel ( using "org" directive.

It's not "devpac" compatible, so you have to change source code a bit. For exemple "equates" are written like:

NBSPRITE = 312

"repeat" and "if" directives are used like:

repeat NBSPRITE
{
nop
}

if (NBSPRITE=313)
{
; woow !
}

Get it here :

http://leonard.oxg.free.fr/download/as68.zip
Leonard/OXYGENE.

ParaPete
Retro freak
Retro freak
Posts: 10
Joined: Wed Jan 12, 2005 3:42 pm
Location: Milton Keynes, UK

Postby ParaPete » Sat Mar 19, 2005 4:16 pm

leonard wrote:Well I'm a tricker. I spend more time on finding ideas than transform it into 68k code. For the code, I use VisualC++ with an 68k assembler written by Ziggy Stardust. The assembling is very fast, and "errors" appairs in the visual c++ IDE. Then I have my demo system and kernel, I can create a bootable disk image with a simple batch file, and launch it under SainT ( very cool to debug ).


You mean to say you've got a set up on your PC where you can write your code in MSVC++, hit execute, and have saint run the assembled code all automatically? That'd be awesome! If this is the case then I'd be very interested in seeing how to set this up.

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

Postby leglod » Sat Mar 19, 2005 6:34 pm

Bonsoir, je me suis poser plusieur fois la question a savoir si le record pouvait etre facilement battue en utilisant le Blitter des STE ???
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: Xyla and 1 guest