I spent some time tracking down why TME ("the machine emulator") would not boot SunOS. The author debugged it using NetBSD, but being a Sun/BSD purist, I wanted to boot SunOS.
Here's a Recipe for booting SunOS
I've been tracking TME since the 0.2 release. It's currently at 0.8. Attemping to boot SunOS-2.0 the first time gave me the message:
CAN'T HAVE PERIPHERALS IN RANGE 0 - 256KB panic: dvma collision
Hmmm... Apparently the kernel is doing the following:
"Determine if anything lives in DVMA bus space" 1. disable DVMA. 2. map each physical page from 0 to dvmasize to a kernel virtual address, one at a time. 3. poke a test value into that kernel virtual address. 4. if the poke succeeded (they actually named the function poke()), break out of the map loop. 5. enable DVMA and do some other stuff, irrelevantly. 6. If the dvmapage is less than dvmasize (i.e. the break was called), panic.
After some extensive debugging I came up with some hacks which allow it to boot cleanly. I put in an ugly hack in the memory subsystem and fixed some problems with the tape drive and the display.
It now cleanly boots SunOS-2, 3.2 & 3.5. The ethernet does not work, however. That's the next challenge. The diffs should apply to TME-0.8 and generate a lot of debug output. At some point I'll come up with a clean set of diffs with no debug cruft.