This started out as some mode7 graphics routines I made for my
Talbot Fantasy game and it quickly got out of hand.
"Mode7" is a scaled tiling mode on the Super Nintendo (SNES) that allows
easily creating pseudo-3D effects. The SNES does this in hardware.
My code does this fully in software. This is difficult, as there are
a lot of multiplies and divides involved, which are *extremely*
slow on the 6502 chip found in the Apple II.
The original demo I had was pretty boring, so I threw in some other
things to make it more like a demoscene-type spectacle:
Picture of a lady with a sword riding a large animal
Callouts to all my 1337 associates.
Except for the sound, you can run this demo on an Apple II from 1977
(assuming you were rich and could afford 48kB of RAM).
There are many other, better, demos for the Apple II. I particularly
recommend the ones from
Older video discussing the optimization of the Mode7 routines:
Showing the filesize. Each disk block in DOS3.3 is 256 bytes, so 32*256=8KB.
The extra disk block is the Track/Sector list (part of the filesystem, not the
binary, but CATALOG accounts things in unusual ways).
Did you spot the hidden VMW logo on the decompression screen?
You can't see it in the video because (I assume) the MP4 compression
couldn't handle all the random values.
It's coded up in 6502 assembly. It fits in one 8k binary (it's on a 140k
disk image but that's mostly empty space).
The sound is a YM5 sound file that has the envelope stripped off and
otherwise fit into 11 (rather than 14) registers. It also runs at only
25Hz so all the audio can fit in the roughly 32k of free RAM we have to
Uncompressed in RAM the demo is 22k or so, but it compresses down to 7.5k
or so with LZ4 and is decompressed at startup via qkumba's LZ4 code.