1st place combined-demo at Demosplash 2021.
By -=DEsIRE=-: code by deater, music by mAZE.
A demo with some fancy graphics / music all running on top of
Apple Logo // (LOGO being the hard-to-google-for turtle graphics
program from the 1980s).
Video
Recorded on actual Apple IIe Platinum. Trying out a retrotink 2
for the capture this time.
Still having some trouble with the sound quality.
System Requirements
You need at least an Apple IIe with 128k of RAM and Enhanced firmware
(IIe Platinum or similar)
Sadly it does not appear to work on a IIc currently
You need a Mockingboard Card, ideally in slot 4
Should run fine in AppleWin and MAME
More info
The idea for this first started when the
Twitter AppleII Basic Bot added support for LOGO programs over
the summer. I was going to try to be extra clever to load machine
language payloads in LOGO (like we do with BASIC) only to find that
the newest version of Apple Logo // had direct support for loading
and running machine language routines.
I had existing code for playing Mockingboard music in the background
that I used for last year's Applesoft Bot Demo
so it was somewhat straightforward to adapt this.
Logo is built on top of Apple's ProDOS operating system through so I
ended up updating my dos33 command line tool to have an additional
tool for manipulating prodos filesystems from the Linux command line.
This demo is not that large, about 12k of data or so, but putting the
files somewhere they wouldn't interfere with the running of LOGO was tricky.
The manual for Apple Logo // actually has some helpful hints on where you
can load things. In the end the MUSIC player code is put in the unused
file buffer space [LOGO allocates room for having 8 files open at a time]
at $4C00, the actual PT3 music, graphics, and credits effect were loaded
at $1000 which is the editor scratch buffer.
Fitting on disk wasn't too bad either, but I had to delete some of the help
files and sample code to make room.
The MUSIC player is a version of my PT3 (VortexTracker) player for Apple II
modified to use as little of the zero page as possible. This requires
a Mockingboard (which has AY-3-8910 sound chips on it).
Some notes on the various parts:
Title/Loading Screen
Apple Logo loads an 8k bitmap
called LOGO3 at boot time, so it's a simple matter of
changing that. It will also load a file called STARTUP
at boot but that will make the graphic go away and switch
to text mode, so I made
a small STARTUP file that re-loads that LOGO3 file while the
rest loads.
I also binary-patch the disk to skip
waiting for RETURN to be pressed at the title so it
auto-loads. It does mean 53s of waiting for loading,
if you manually load with
LOAD "DEMO you get a much nicer screen where
it shows each component loading but I couldn't figure
out how to get that working in conjunction with auto-load.
dSr Logo
This is just regular LOGO drawing commands to draw the logo
and move the turtle around.
Boat
This is again just plain LOGO, drawing something that maybe
an advanced student would have come up with in elementary
school back in the 1980s.
Spiral Polygons
More typical LOGO type stuff. The main routine this
is using is based on POLYSPI4 from the book
Learning with Apple Logo by Daniel Watt.
wargames
Here's where things get more interesting, we're loading an LZSA
compressed background image into the graphics page and drawing overtop
(LZSA code by Emmanuel Marty and Qkumba).
Yes, this is a Wargames (1983) movie reference.
Possibly some symbolism with the North American demoscene people
launching a demo attack on Europe.
hi-res Myst
I modified my VGI hi-res myst routines
so they could run here and quickly draw a vector version of
a scene from Myst. We're dangerously bank-switching the ROM back
in to use some firmware drawing routines while this is happening.
I'm not sure why the retrotink decided the water should
be "radioactive green" here.
trees
Back to plain LOGO again. This is randomly generated and
the scene you get depends on the random number seed which is
affected by the turtle movements in the boat scene. I wasn't happy
which colors got picked here for the drawing but didn't have time
to fiddle with things to get it looking better.
credits
The shimmery effect is a small size-constrained effect I made
accidentally while working on the wires effect found in the
hgr demo2 demo. I wanted something
small (we were low on room!) and also something that didn't use
the ROM routines for drawing.
It's Over!
At the end it drops you into LOGO and you can just use it from
there. The music is still playing in the background but it
is quite a nice tune...
Frequently Asked Questions
Was this really written in LOGO?
Yes, you can look at the source and see LOGO.DEMO.
Apple Logo (and more comprehensively
the later Apple Logo //) lets you load
machine language routines from disk with .BLOAD
and .CALL into them, which is how some of the fancier
stuff is done.
Why are you using such an old version of ProDOS?
That's just the version that shipped with the version
of LOGO we're using.
Why do you require such an advanced machine (Apple IIe Enhanced)?
Apple Logo // required an Apple IIe, possibly with 128k (I should
check that). The extra requirement of the Enhanced firmware is
because that has more advanced Interrupt handling support which
is used by the Mockingboard music player. On the older IIe models
the interrupt handler is in the $F000 ROM which is swapped out
when bank-switching. With the enhanced models it's in the $C000
range which is always there.
It might be possible to hack things up to load an interrupt handler
in the right place and have it work on other IIe models. I'm actually
not sure why ProDOS wasn't doing that in the first place.
Why doesn't it work on the IIc?
I think the music code is causing it to crash. We poke around
in Slot 4 for the Mockingboard, and by default the mouse
lives there on a IIc. If you have one of the newish Apple IIc
Mockingboards there's a few extra steps you can do to activate
the Mockingboard but the code here possibly doesn't do it.
I should try to get things working though.
What, no Rick-roll?
I believe you might find what you're looking for
here
You can get the sourcecode
here in the demos/logo_demo directory of
my dos33fsprogs github repository: git clone https://github.com/deater/dos33fsprogs/Vote for this at PouetBack to my Demos