Apple's 1991 Macintosh Shipped With A Bug That Should've Stopped It...

Apple's 1991 Macintosh Shipped With A Bug That Should've Stopped It...

Sometimes you have to bust out the ol' cork board and red string for a conspiracy theory involving leaked emails, supervillain islands, and heads of state desperate to deny they had anything to do with All That. But other times the conspiracy rabbit hole beckons in other forms. Like, say:

But the Apple Macintosh Classic 2 did boot just fine, which is what makes the pay-off of this blog from programmer Doug Brown so great. Through an intense, labyrinthine series of tests using both software and hardware, Brown discovered that the final all-in-one Mac to use a black & white screen shipped with a bug that would have disastrously crashed the computer every single time you turned it on—if not for a miraculous, unknown feature of its Motorola 68030 CPU that hid the problem from Apple's programmers.

Brown discovered the bug when he tried to boot an emulated Macintosh Classic 2 in MAME, an emulator best known for arcade systems that also supports a massive range of classic PCs and obscure systems. For compatibility reasons too complex to get into, the Mac Classic 2 was able to boot into two distinct modes, 24-bit and 32-bit, and the 32-bit mode crashed on startup in MAME.

"Why was this happening? Also, why didn’t this same failure occur on actual hardware?" Brown asks in his blog. "The Classic 2 wasn’t recalled … It would have been all over tech news. Not to mention the fact that the people actually working on the ROM code would have quickly noticed it while they were testing. It’s kind of a glaring issue. So what gives? Was MAME doing something wrong here that didn’t match hardware? … I have the answer to these questions, but as a forewarning, the situation is way more complicated than I expected it to be."

Brown goes into tremendous detail about how he figured out this complicated puzzle, and it's a fascinating read even if you're a non-programmer like me who can only truly grok about 30% of it. But it's still a wild story even if we zoom out from the granular computer instructions that he talks through step-by-step.

The thrust of the problem is that while running through its boot code in MAME, the Classic 2 would perform one instruction that jumped to an invalid address located at 'A1' in memory, and as a result when it tried to execute its next instruction, it was basically in the wrong spot. "And boom, Sad Mac."

When Brown debugged the code on a Macintosh 2ci from the same era (which notably also used a Motorola 68030 CPU), he found it did something a b

Source: PC Gamer