Demos (and games) making of/reverse engineering

GFA, ASM, STOS, ...

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

Post Reply
uko
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 103
Joined: Sun Aug 25, 2019 6:45 pm
Location: France

Demos (and games) making of/reverse engineering

Post by uko »

Hello,

Since my early days of coding demos on ST, I have always wondered how I would have coded the wonderful demos that were released, especially the "new" effects and how I figured that the coders have done.
It always helped to "progress", but I imagine that in some cases I may have envisaged very different solutions.
Nowadays it is easier with released sources or with emulators to have a look to the code, but it still requires to analyse this.

I have found some articles/threads done by the authors or by other people that performed reverse engineering. You can find below those links.
If you have other links, could you please share them ?
I am not necessarely looking for "state of the art" of how to code effects, but on real existing cases, where difficulties met are explained, or comparison of techniques between screens, but anyway, feel free to share links in this objective.

The Parallax Distorter explained by Gunstick:
https://wiki.syn2cat.lu/wiki/Atari_ST_K ... Workshop_3

Comparison of overscan techniques (in addition to the state of art) by troed:
https://blog.troed.se/2015/12/23/oversc ... scrolling/
(I think this presentation is what made me come back to coding on ST !!!)

3D Doc demo (Cuddly Demos) reverse engineering by Dbug:
https://blog.defence-force.org/index.ph ... &ref=ART49

Shadow of the beast reverse engineering by Dbug:
https://blog.defence-force.org/index.ph ... &ref=ART62

The Polygons Of Another World: Atari St By Fabien Sanglard's:
https://fabiensanglard.net/another_worl ... index.html

First Love Making Of by the Overlanders:
https://overlanders-atari.com/index.php ... making-of/

Lance player by Lance:
https://github.com/mrange/pt_src3/tree/master

An my contribution: Star Wars scroller explained
https://www.youtube.com/watch?app=desktop&v=quv_D2c6LGw

Thanks for your help !
David aka Uko, from T.AL
Take a look at our last STe demo ! The Star Wars Demo and to its "making of"
https://github.com/Uko-TAL
mlynn1974
Atari Super Hero
Atari Super Hero
Posts: 600
Joined: Mon Mar 03, 2008 10:33 pm
Contact:

Re: Demos (and games) making of/reverse engineering

Post by mlynn1974 »

Some of those documents are very detailed. Well done!

There have been some amazing rewrites of classic Atari ST demos on wab.com using the Codef Javascript Framework:
https://www.wab.com
But there is zero documentation for these rewrites. I had to debug them to get the sprite waveform for Grodan and the Kvack Kvack for instance.

I rewrote a few demos using DirectX:
Superdisk 7 Intro: http://lynn3686.com/sd7.html
The Writing On The Wall: http://lynn3686.com/twotw.html
Grodan and the Kvack Kvack (TechTech): http://lynn3686.com/techtech_inf.html
Pompey Pirates Menu 26: http://lynn3686.com/pp26_inf.html

Getting the exact scroll wave forms for PP26 was difficult so I had to approximate them using Visual Basic. It would have taken many hours to disassemble the code to get that data.
Still got, still working: Atari 4Mb STe, 520STFM (x2), 2.5Mb STF, Atari 2600JR, Flashback 8 Gold.
Hardware: Cumana CSA 354, Ultimate Ripper, Blitz Turbo, Synchro Express II (US and UK Versions).
User avatar
thomas3
Captain Atari
Captain Atari
Posts: 279
Joined: Tue Apr 11, 2017 8:57 pm

Re: Demos (and games) making of/reverse engineering

Post by thomas3 »

elliot
Captain Atari
Captain Atari
Posts: 215
Joined: Tue Mar 17, 2009 2:00 pm

Re: Demos (and games) making of/reverse engineering

Post by elliot »

I loved the early days of demos, I would wonder and wonder over what and how they managed to do what they did.

I remember the first demo I saw that had a 4 channel MOD playing (well all it was was a player). I just did not get how they did it, four sampled sounds on three channels! The first one I saw was blue in design and had four small vu meters in the middle of the screen (and thinking back it was of poor quality). I remember if you tapped the reset button once quickly it would kind of crash but the music would continue playing but through the stepper motor on the floppy. Looking at the code I got no where, was beyond me at the time!

I managed to disassemble a small screen and I saw that they were quickly switching the screen frequency register on an interrupt which was removing the bottom border. My asm was not good but I wrote a STOS program that basically waited for the VBL and then had a FOR NEXT loop that did nothing and when done switched the frequency register. It had to be compiled but with trial and error I found a value for the Loop to loop and the border was gone, it flickered every few seconds but still. Rasters using this method were passable, in STOS I managed to do a raster VU meters in the left and right border for three channels, looked really good and I never saw it elsewhere.

I loved VUs and I remember disassembling a screen that flickered the floppy drive LED in time to a channel. Once I saw how it was done I expanded on this and wrote a player in STOS that had VUs but would flash both the Floppy A and B LEDs in time with two different channels. You had four states, both off, A on B off, A off B on and both on. Was just a simple bit of logic but looked cool.

My goto language was STOS (can you tell?) and I did not stand a chance when comparing ASM. Slow, no interrupts and inconsistent code timings.

To this day I do not get the plasmas, zoom/rotate jobies and so on. In fact even a text scroller seemed like too many pixels to move in a VBL.

Sorry not really what was asked but this was my hobby for a number of years, figuring it out!
Falcon with CT60 in rack mountable case. Two STFMs, one upgraded lots. My original STE from when I was a teen with Switchable TOS, 1.44Mb drive, 4MB RAM, Supra Hard Drive and very very yellow case. Mega STE with (currently none working) Crazy Dots 2. Atari 2600 and a Jag. And a mountain of commercial software and lots of hardware addons.
mikro
Hardware Guru
Hardware Guru
Posts: 3003
Joined: Sat Sep 10, 2005 11:11 am
Location: Kosice, Slovakia
Contact:

Re: Demos (and games) making of/reverse engineering

Post by mikro »

Thanks to similar write-ups I was actually able to understand all the Atari ST limitations. In 1997 I came from Atari 8-bit, saw a few Falcon demos in the meantime and then got a ST. While games we good / fun, I just couldn't understand the demos at all, especially the old ones (but I was also wondering why I'm looking at 160x100 new school effects when my 8-bit could do the same in 80x50 and with the same amount of colours and better framerate...)

So all that full screens, scrollers, HBL effects... I was just staring at them and wondering what is wrong with that computer. :-) (actually it's true, Atari ST is really a horribly under-designed computer but that only makes the achievements on this platform more impressive... but I didn't know that back then).
User avatar
thomas3
Captain Atari
Captain Atari
Posts: 279
Joined: Tue Apr 11, 2017 8:57 pm

Re: Demos (and games) making of/reverse engineering

Post by thomas3 »

elliot wrote: Tue Aug 02, 2022 10:28 pm To this day I do not get the plasmas, zoom/rotate jobies and so on. In fact even a text scroller seemed like too many pixels to move in a VBL.
Until three and a half years ago, I felt the same...

But in short, with these kind of effects you've got two problems to solve:

Q1) How do you quickly, and filling as much screen area as possible, draw "low resolution" display areas?
Q2) What effect algorithms can you use that rely as much as possible on fast instructions (move/add/etc)?

Q1 has many answers, but you can start here - http://alive.atari.org/alive8/c2p.php

Q2 is the heart of modern demomaking, and you can start here - https://madteam.atari8.info/index.php?prod=fx

See? Easy! :D
User avatar
Cyprian
10 GOTO 10
10 GOTO 10
Posts: 2727
Joined: Fri Oct 04, 2002 11:23 am
Location: Warsaw, Poland

Re: Demos (and games) making of/reverse engineering

Post by Cyprian »

mikro wrote: Wed Aug 03, 2022 7:08 am but I was also wondering why I'm looking at 160x100 new school effects when my 8-bit could do the same in 80x50 and with the same amount of colours and better framerate...
actually that is quite obvious - 160x100 is 4 times bigger than 80x50, the same with the CPU clock the ST vs the XE .
Plus the XE has chunky mode, in case of the ST C2P steals some CPU time.
Lynx I / Mega ST 1 / 7800 / Portfolio / Lynx II / Jaguar / TT030 / Mega STe / 800 XL / 1040 STe / Falcon030 / 65 XE / 520 STm / SM124 / SC1435
DDD HDD / AT Speed C16 / TF536 / SDrive / PAK68/3 / Lynx Multi Card / LDW Super 2000 / XCA12 / SkunkBoard / CosmosEx / SatanDisk / UltraSatan / USB Floppy Drive Emulator / Eiffel / SIO2PC / Crazy Dots / PAM Net
Hatari / Steem SSE / Aranym / Saint
http://260ste.atari.org
mikro
Hardware Guru
Hardware Guru
Posts: 3003
Joined: Sat Sep 10, 2005 11:11 am
Location: Kosice, Slovakia
Contact:

Re: Demos (and games) making of/reverse engineering

Post by mikro »

Cyprian: I totally understand it (now) but back then, I was really disappointed. I was spoiled by Falcon demos, I expected something similar with less colours and pixels but this was... too less. :)
uko
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 103
Joined: Sun Aug 25, 2019 6:45 pm
Location: France

Re: Demos (and games) making of/reverse engineering

Post by uko »

thomas3 wrote: Tue Aug 02, 2022 9:44 pm http://smfx.st/?sprites
Very interesting article ! That's exacly the kind of articles I was looking for.
Thanks Thomas3!

And thanks to the other for your first comments and links too !
David aka Uko, from T.AL
Take a look at our last STe demo ! The Star Wars Demo and to its "making of"
https://github.com/Uko-TAL
Post Reply

Return to “Coding”