A 34-year-old Apple Mac crash bug ‘would have gone undiscovered for all eternity,’ but the accuracy of the MAME emulator shone a light on it
On real hardware, the Motorola 68030 executed an undocumented instruction to prevent a system crash at boot, but it caused problems with the emulator.
A computing enthusiast unearthed a 34-year-old Apple Mac bug that should have crippled the system at startup, but it never did, thanks to an undocumented feature in the Motorola CPU that quietly neutralized the flaw. Downtown Doug Brown discovered this Mac Classic II ROM code wrinkle after witnessing a MAME-emulated system crash (in 32-bit mode) that the original hardware would not (h/t PC Gamer). We tend to agree that “this bug in the ROM would have gone undiscovered for all eternity” if it were not for Brown’s curiosity being piqued.
Brown, who self identifies as “a combined Apple/Linux/Windows geek,” and is a big fan of the open source MAME (the Multiple Arcade Machine Emulator) project. He also tells his readers that this software is “arguably the most complete emulator of 68000-based Mac models,” and that these classic Motorola CPU-based systems are his main use of the emulator. That’s pretty unusual, as MAME is most famous for facilitating classic arcade gaming fun.
MAc Machine Emulator
The story goes that Brown was indulging in his Mac emulation on MAME hobby when he noticed that an emulated Classic II wouldn’t boot with 32-bit addressing enabled. However, it worked with 24-bit addressing – no ‘sad Mac’ with the 24-bit option toggled on… What was happening? And why was the emulated Mac crashing so badly, so quickly, when the original faced no such issues?
Well, there are plenty of ways bugs can crop up in an emulator, but in this instance, it would have been wrong to blame MAME or any of the code it relies on.
An undocumented MC68030 instruction
After reverse engineering the Apple ROM, and extensive forensic debugging of the errant behavior of the emulated machine, Brown actually found that the bug was present in the Mac Classic II ROM code – nothing to do with the emulation software. The biggest difference between emulated and original systems was how the CPU handled the problematic instruction in the ROM. In the emulated system, it crashed with a ‘sad Mac’ in 32-bit mode. In the real hardware 68030-equipped system, it skipped the wrinkle nonchalantly. However, no documented feature of the 68030 explained this (lucky) operational quirk.
Brown concludes his lengthy and intricately detailed blog post by asserting that Apple devs would surely have found and fixed the 32-bit crash boot issue “if the pesky 68030 hadn’t been hiding the bug.” The computing enthusiast also cleverly characterized this secret 68030 feature as “the glue that’s accidentally holding the Classic II together.”
He was also sympathetic to the Apple ROM developers who let this bug out into the wild, as the Motorola CPU quietly fixed it in the background.
Get Tom's Hardware's best news and in-depth reviews, straight to your inbox.
A final important point raised by Brown was that, with this undocumented bug in mind, “it’s very likely that there is not a 100% perfect Motorola MC68030 emulator or replica in existence.”
There is a small chance that an engineer who worked on this Motorola CPU might read this and reach out with information about the undocumented 68030 feature that, luckily, comes to the rescue during the Classic II’s boot process. Brown also pondered whether many other 68030-powered machines had their software quietly bug-fixed by the clever features of this processor.
Follow Tom's Hardware on Google News, or add us as a preferred source, to get our latest news, analysis, & reviews in your feeds.

Mark Tyson is a news editor at Tom's Hardware. He enjoys covering the full breadth of PC tech; from business and semiconductor design to products approaching the edge of reason.