2nd place 1k demo at Demosplash 2021.
By -=DEsIRE=-: code by deater, music by mAZE.
A few hi-res scenes on an Apple II. The more interesting part here
is the Mockingboard music, which is hard to do on a size constrained demo
(for comparison, on my full size demos the PT3 tracker/player plus music
is usually at least 4k).
Recorded on actual Apple IIe Platinum. Trying out a retrotink 2
for the capture this time.
Still having some trouble with the sound quality.
Should work on most Apple II systems.
For music you need a Mockingboard Card in slot 4
Should run fine in AppleWin and MAME
The music is in a custom mini-tracker. I didn't have time to super-optimize
it. It supports 3 channels of square waves, a fixed volume, and 4 octaves
of notes. mAZE had a much nicer longer version of the song but I ran
into size constraints so it's just a short excerpt. It generates the
4 octaves of frequency values at startup to save room, though it's tricky
as octaves below 3 you need 16-bit math to calculate properly.
Some notes on the various parts:
Spinning dSr logo. This is using Apple II ROM shape table
drawing routines which can scale/rotate simple vectors.
This wasn't shown at Demosplash because their video scaler couldn't
handle the mode switch. There is clicking here which is unintentional,
I think it comes from enabling the Mockingboard but not zeroing
Moving Sine Interference
I've been on a quest trying to create a nice plasma effect on Apple II.
This particular attempt is plotting sin(y/4+FRAME)+sin(x)+sin(x+FRAME).
The first time through it uses an orange palette.
Hardware page-flipping is used to give smooth animation despite
the relatively slow frame rate.
A full 256 byte sine lookup table is constructed from a small
starting value. The Apple II has a small cosine table in ROM
(for shape table use) but it turns out to be surprisingly difficult
to expand that into a full sine table.
The second time through
the pointer to the color lookup is moved to purple,
split-text mode is enabled to show the credits we printed earlier,
and only up to line 160 is drawn which should increase the frame-rate
This is a spark-on-wire effect. I've done it before in lo-res,
this is hi-res. On other 8-bit computers you'd do this with
palette rotation, but Apple II doesn't support that.
Due to the weird interlacing of the Apple II memory it's actually
really compact to draw every-8th-line like this. Usually you'd
need a big lookup table or call HPOSN to translate Y to GBASH/GBASL
but here we just run down 1 page of memory.
The second time through we just skip the screen clear to get
a different effect. We have the fast screen clear left over
from the spinning logo intro.
Another sine interference, this one just cycling but not moving.
Again this looks like a palette effect but it's not.
I think it's plotting SIN(X)+FRAME+SIN(Y/2).
The second time through we self-modify the code
to add an AND instruction to make the colors purple only,
removing the blue.
Frequently Asked Questions
Are you the first person to make a sized-constrained demo
with Mockingboard music?
No, French Touch did it first (and smaller) with
Why did you name it HGR Demo2?
I'm bad at naming things. Though it was funny for how much
confusion it seemed to cause the presenters/people-in-stream
at Demosplash. HGR is shorthand Apple II way of saying
"hi res mode" (as it's the BASIC command to enable it)
and it's sort of my 2nd attempt at a hi-res demo.