I was really tickled by the phrase “for complex Woz-related reasons”:
“They aren't even linear framebuffers, they are split up in complex ways for complex Woz-related reasons having to do with getting DRAM refresh for free.”
My car used to get vapor lock in high school. The fuel line was run too close to the hot exhaust pipe. At red lights when there was no air moving, the exhaust pipe heat would be so hot it would cause the gas to vaporize. That vapor’s higher pressure caused no more fuel to flow, and the car to stall. vapor lock
So, can you do the switch mid-line, and create a display with text and hires side-by-side (at the price of making the programming restrictions even more horrible), or is the switch so slow that that introduces horrible display artifacts?
You can. Although I have long since lost many of the details, I used the Apple II to present subliminal perception data in experiments for a cognitive psychology lab that was an early programming job for me in the 80's. We had to run an oscilloscope on the signal to catch the vblank to time our display onset properly.
Try watching the demo using that technique called the "Apple II 64k Cycle-counting Megademo" at https://www.youtube.com/watch?v=McKAcKVTIQs . There are not any artifacts with the changes between text and graphics mode in the middle of lines.
there are no artifacts in the recording because it was recorded on an Apple IIe which has slightly better video hardware. You do get some glithces on the earlier Apple II+
Later models you can bypass the floating bus/vapor lock and get VBLANK from a register (but IIe/IIc/IIgs all do it differently). I coincidentally released a 256 byte demoscene demo using this today: https://www.youtube.com/watch?v=iWq57yeu4gQ
The explanation I had always heard for the very non-linear frame buffer layout was that it let Woz save a pair of gates. Which made sense, in the context of the time.
I’d never heard about the relationship between that layout and refreshing the DRAM. After 40 years since my Apple //e, this is kind of a revelation!
It was impractical and didn't work on every Apple II+. IIRC peripheral cards loading the bus could cause it not to function and for instance some clones also didn't work. It was fully documented in Jim Sather's Understanding the Apple II where it described the technique and even gave examples. After reading that as a kid I experimented with it but I never felt like I would use it because it was so awkward to incorporate into a real game plus it wouldn't work on every system.
The detailed description of the technique claims that the mode must be the high res page 1 for it to work. But it seems it should be possible to have a mirror of the code that works when page 2 is being shown.
It seems like it would be useful for basic page flipping (no split effects). Draw something on the off-page, and then poll for those vapor sequence to appear; flip the page and repeat.
“They aren't even linear framebuffers, they are split up in complex ways for complex Woz-related reasons having to do with getting DRAM refresh for free.”
This seems to be a demo using the described techniques: https://youtu.be/McKAcKVTIQs