1. 95% of HN is now confused
1. 95% of HN is now confused
[0]: http://www.geek.com/games/karateka-apple-ii-floppy-disk-had-...
It is somewhere on Mechner site and diaries, but I can't find it again.
Basically, one day while coding, he found out that one single bit caused a bug in rendering that flipped the whole game upside down, it was completely unintentional.
But he thought it would be hilarious to make the easter egg (indeed, it was).
Later he used the same technique on Prince of Persia game (there is an area of the game where you drink a potion that flips that bit, flipping the whole game upset down, this had to be emulated for non-Apple systems, probably caused some pain to people porting the game :P)
A single bit error that would simply flip everything upside down seems quite improbable given the Apple II hardware. I wouldn't be surprised if a bug inspired the easter egg, but I'd be shocked if there was a single bit difference between the front and back of the floppy.
Maybe it was the positive/negative bit that was flipped, and made the pointer read backwards and underflow, but end rendering anyway due to some hardware quirk.
On that hardware, if I was going to do this, I'd just reverse the order of the entries in the scanline lookup table. On the Apple II the address of the first pixel of each scanline did not follow immediately after the address of the last pixel of the prior scanline. So every program that did any graphics work used a lookup table to get the address of a particular scanline.
As long as you were consistent in your use of this table, that would be the only necessary change to flip the game upside down.
Source: I disassembled it, a long time ago.