Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Apple II Vapor Lock and the Floating Bus (2018) (deater.net)
69 points by rbanffy on May 20, 2023 | hide | past | favorite | 19 comments


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.”

This seems to be a demo using the described techniques: https://youtu.be/McKAcKVTIQs


IIRC Woz made a floppy controller unlike any else in the world, and save a (relatively) huge amount of money doing so.

So, Woz invented the software-defined hardware, and the first "win-floppy" :D


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


Running at full throttle can sometimes provide enough fuel cooling.


We ended up wrapping aluminum foil around the fuel lines and it greatly reduced the number of occurrences.


Clever!


Mine did that. Was yours a Volkswagen?


59 Catalina! (it was my dad’a car, he let me drive it for the summer).


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!



Programming the Atari 2600 was basically doing this, all the time. [0]

Also, C64 games and demos sometimes used cycle counting to "invent" more sprites.

0: https://en.wikipedia.org/wiki/Racing_the_Beam


Why wasn't this more widely known? I did a lot of hacking on the Apple II+ platform back in the day, yet basically, TIL.

(I do know about the hardware hacks for vsync.)


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.


Because of cycle counting, it sounds pretty impractical to use.


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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: