Generally, you’d hope that your computer manufacturer got the ROM just right before shipping your computer. As [Doug Brown] found out, Apple actually fumbled this with the release of the Macintosh Classic II several decades ago. And yet… the machines worked! That turns out to be due to a rather weird low-level quirk, as recent tinkering in an emulator revealed.Â
The bug was revealed when [Doug] was experimenting with the emulated Macintosh Classic II in MAME. He was exploring keyboard shortcuts for launching the debugger, but soon found a problem. He needed to load MacsBug to enable the debugging shortcut, and that required the use of 32-bit addressing. However, the emulated system wouldn’t boot in this mode at all, instead landing on a Sad Mac error screen.
Heavy debugging ensued, which makes for great reading if you love to chase problems on an instruction-by-instruction basis. Ultimately, [Doug’s] conclusion was a mindboggling one. He determined that the crash in MAME came down to a difference between the emulator’s behaviour versus the original Motorola 68030 CPU in the Classic II. There was simply a problematic undocumented instruction baked into the ROM. The real CPU runs this undocumented instruction, which modifies a certain register, allowing boot without issue. Meanwhile, the emulated CPU tries to execute the bad instruction, fails to modify the right register, and everything falls in a heap. [Doug] speculates that had the 68030 CPU hadn’t hidden the bug, Apple’s engineers might have found it many years ago. He even proved his theory by whipping up multiple custom ROMs to verify what was going on.
We love it when bugs from decades past rear their heads; we love it even more when they get fixed. If you’re chasing down issues with an Amiga or you’re ironing out the kinks in software for the Acorn Archimedes, be sure to let us know on the tips line.
[via Tom’s Hardware, thanks to Jason Morris for the tip!]







