Progress is slow but steady. I have reversed engineering the 6.0.8L boot block code and System data fork code. I can now compile and generate matching object code.
I found a serious overflow bug in the boot block code for computers with 16 MB of RAM or more. I couldn't figure out why this wasn't caught and fixed. I was shocked to find that pre-System 7 boot block code doesn't run on the Macintosh II / SE and later. Yup, in order to run, the high byte of the boot block version must equal 'D' ($44) or the top two bits must be set. Otherwise ROM code runs instead*.
*It's worse than that. The ROM code doesn't check for a return value. So, both the boot block code (if allowed)
and the ROM code runs. System 7 hacks this by hard coding a table of ROM addresses and jumping directly into the ROM code if it needs to continue, otherwise it never returns.
Let's see what Inside Macintosh:Operating System Utilities says about the boot blocks. Oh no. This is like a bad version of the telephone game where a developer says 'D' and the tech writer wrote $D, the and/or got confused, and the lower byte isn't actually involved at all.
What I've learned is:
* Starting with the Mac II / SE ROM and from then on, the ROM contains a lot of the start up code.
* Starting with the Mac II / SE ROM, 'old' boot block code is not executed
* System 7 boot code has hard coded addresses into ROM. This is a horrible practice. Using a new modified ROM (ROMinnator) that shifts the code can crash if the disk OS decides it cannot run on that machine and tries to allow the ROM boot process to continue find a better boot drive.
- David