"Rewind 2" for the Apple IIe





Details

This was me trying to see if I could recreate the opening scenes from New Generations Atari XL Rewind 2 demo on an Apple IIe using the double-hires and double-lores graphics modes.


Video

Capture running in Applewin:

System Requirements


Downloads

Disk Images

Source



Mini-faq


Code Notes

Overall Framework

This reuses the demo framework from my Driven demo.

The music is being played via the PT3 player I made.

The graphics are all compressed with ZX02 compression. Amazing fast disk code by qkumba.

Effects summary

Multi-color image transition
Having one image for each color would take up too much RAM. Wrote a converter that takes a 4-color image, packs it to 4 pixels per byte, then decompresses and changing color on the fly.

That sounds overly-complex you might say. Why not take a regular image and do a search/replace on the colors? Well haha let me tell you about Apple II double-hires. It packs 7 pixels across 4 bytes, with half of those bytes in a different (AUX) memory bank. So search/replace would be an intense amount of shifting/masking/etc. It's bad enough as it is, and when I modified it to use page-flipping it became even more inefficient as I had to swap banks essentially every other pixel.

It turned out nice, but it's slow, and even after a lot of cycle-optimizing work it's at least 2 seconds to decompress each frame.

Why not just decompress once for each color and copy? Well double hi-res image is 16k, page-flipping means another 16k, you rapidly run out of RAM at that rate. And we can't load from disk while the music is playing.
Scrolling Headphones
The tricky part here was the double-hires scroll across both memory pages (because again we are doing page flipping). Since this is Apple II there's no hardware accelerating of this, you have to manually copy 16k of data each step. (And since we are page flipping it means you actually scroll by 2 lines on alternating pages which gets a bit tricky).

The AUX memory layout is a pain so for some of these things I put the code that needs to manipulate both AUX and MAIN up in the language card area with the sound player code. That way it can STA to RDAUX/WRAUX/RDMAIN/WRMAIN with impunity from up there without the executing code being swapped out from under.
Animated tape deck
This is just decompressing the three frames, nothing fancy. Well besides having to handle the page flipping. We also wait for VBLANK which is also fun as Apple IIe/IIc/IIgs all have different ways of doing it, and on IIc it requires messing with firmware interrupts (so we don't handle IIc right now)
Dancing Lady
This is in double lo-res mode. Uses page-flipping.

This turned out to be easier than expected. Was going to go through all the trouble of having the parallax scrolling and double lores software sprites, only to realize it's only 24 frames of animation total and there's room to just decompress to memory and copy them over as needed. It compresses *really* well because of all the repetition.

Development Notes

26 March 2025 -- Version 1.0

Powered through and finished this. Didn't really have time, this part of the semester is too busy!

19 March 2025

Was reminded of the "Rewind 2" demo during PSenough's "who should have been nominated for the Meteorics" video and was like hmmm I wonder if the Apple II could do this.... I was looking for a Spring Break project.


Other VMW Software Demos
Other Apple II Projects
Back to the VMW Software Productions Page