Tiny Saturn demo

Size optimization on the SH can be a bit tricky, but I thought I'd give it a go and you can find the result here: http://jiggawatt.org/badc0de/satgegga.zip

It's a variation of a 256-byte DOS demo that I wrote earlier this year, and the Saturn version is currently 484 bytes, which I think is pretty decent. Tested and works on a real Saturn (upload to 0x6004000), source code is included..
 
Since the effect is based on a sine table and the Saturn has no FPU, about 100 of the 432 bytes is spent on code+data to generate the sine table. If there had been a way to do 32-bit division with a single instruction perhaps a Taylor series approximation could've been made, but on the SH2 it would probably require even more bytes.

Perhaps a few bytes here and there could be optimized away, but nothing major, unless the appearance of the effect is changed (e.g. generate a simpler palette).
 
Back
Top