The music video from SBEMAIL58 but on your Apple II
Legal Note
This product contains trademarks and/or copyrighted works of Videlectrix.
All rights reserved by Videlectrix.
This product is not official and is not endorsed by Videlectrix.
Videos
Here's a capture on an actual Apple IIe platinum. Note the sound
sync is off compared to emulators. I'm not sure if it's Linux,
OBS, my capture card, or a combination of all three.
Screenshots
Note: these were captured with the AppleWin emulator.
Here it is displaying on a (broken?) Monitor III.
For some reason the monitor can display text fine but hi-res graphics
make it glitch out. Probably needs capacitor replacements or some sort
of scary CRT-adjustment.
The signal is coming
from the neighboring II+, the IIe it's on doesn't have a working
floppy drive.
You can try running it in-browser
here at the Internet Archive.
Mini-faq
Q. Why is this impressive? Isn't this just a slideshow?
A. If I had 256k of RAM to play with, yes I probably could
hade made this as more or less a slideshow (and it would
have taken a fraction of the time to write the code).
However I wanted this to run on my Apple II+ so it has to fit in
64k. It uses both pages of hi-res graphics (8k each)
and also an off-screen buffer (another 8k) so the rest
all has to fit in roughly 32k or so. This involved re-using
graphics, cheating with some effects, and a lot of
compression.
Q. Why is this so slow?
A. Remember the Apple II has just a (convoluted non-linear)
8k framebuffer
for hi-res (280x192, 6 color) graphics. No hardware
scrolling, no hardware sprites, no palette shifting.
With only a 1MHz 6502 even the most extravagantly unrolled
clear-screen routine takes more than one 60Hz frame.
The original Flash animation seems to update somewhere
between 15Hz and 30Hz and it's hard to keep up with that
on an Apple II. Especially as some screens require
clearing the screen, copying a bitmap from off-screen,
then masking and overlaying sprite data. Decompressing
the graphics with ZX02 takes some time too.
Scrolling is also super slow on Apple II, again especially
if we have to overlay software sprites on top.
Q. The scrolling looks pretty good actually.
Are you using some fancy code to avoid tearing?
A. No, it's just plain memory copying. I'm not even always using
page-flipping for the scrolling scenes because it
complicates the code. I guess it's just luck it looks OK?
In theory on the IIe/IIc/IIgs I could watch for VBLANK and
only flip pages then, but
since the screen updates at 60Hz and the music is playing
at 50Hz I think that might make things worse.
Q. Why don't you load graphics from the disk on the fly?
A. The current program is using pretty much every piece of
available RAM on a 64k system (except for the second
4k in the language card as that's hard to access while
music is playing). So yes, could have better graphics
if I could re-load some from disk mid-song.
The problem is the Disk ][.
Quick answer: Woz's disk interface is amazing and
fast, the trouble is to access it you need hard-real time
code that's cycle accurate and uses most of the CPU.
You can't really take interrupts or draw things to the
screen while the disk is loading.
Full answer: some demoscene peope *have* managed to read
the disk while doing stuff with complicated custom
routines and disk formats. It is extremely complex and
has many limitations and in the end wouldn't really be
enough benefit for a demo like this to go through the
trouble. Someday maybe.
Q. Is there anything missing from this that you wanted
to include?
A. I wanted to have the lyrics printed, but ran out of space and
also it would have negatively impacted the frame rate.
I could have just used text mode for the bottom 4 lines of
the screen but then all the other graphics would have had
to be re-sized to fit in 160 lines.
The other thing that isn't perfect is the sound sync,
especially at the end. After listening to the song about
50 times making adjustments I don't think I could have
continued without having it stuck in my head permanently.
Development Notes
30 January 2024
I've been working on this off and on since December. Took longer than
I thought to get it done. Was hoping to have it done by Trogday.
Some of the graphics effects ended up being surprisingly tricky.
Some of the code is based on that from my much-maligned second reality
port.
Music arrangement by Tom_FJM in
this video
(used with permission).
I didn't get the source, I reversed the music from the midi visualization
in the video.
I initially planned of having the lyrics printed somehow, but it would
be slow and I also ran out of RAM. Sorry for those of you who don't
know the words!