elliotnunn
Member
Hi folks,
This post might meander a bit, because I'm sleepy, so I do apologise. I really wanted to post this now that I've had some success.
I have written a Python script to take apart and put back together a Mac OS ROM file (a NewWorld Toolbox image -- tbxi). Just this evening I've gotten my iMac G4 to boot from one of its reassembled images. This is a first step towards getting OS 9 to run on some seriously different PowerPC hardware (G4 mini, or even G5). Much of my information has been taken from the SheepShaver source, and from the occasional stray Technote. Here it is:
https://github.com/elliotnunn/cdg5
I note a few things:
Cheers,
Elliot
This post might meander a bit, because I'm sleepy, so I do apologise. I really wanted to post this now that I've had some success.
I have written a Python script to take apart and put back together a Mac OS ROM file (a NewWorld Toolbox image -- tbxi). Just this evening I've gotten my iMac G4 to boot from one of its reassembled images. This is a first step towards getting OS 9 to run on some seriously different PowerPC hardware (G4 mini, or even G5). Much of my information has been taken from the SheepShaver source, and from the occasional stray Technote. Here it is:
https://github.com/elliotnunn/cdg5
I note a few things:
- The "parcels-based" tbxis used by ~9.1 onwards seem to be an attempt to offload hardware-specific work from the 4 MB ROM image to the Trampoline bootloader. The real work of my script is the extraction of the parcels into an XML data structure.
- The Trampoline ELF executable, as well as copying and modifying the Open Firmware device tree, sets up interrupts for the Nanokernel. This implies that the Northbridge and Southbridge are largely initialised before the Mac OS and drivers take over.
- Little has been done to reverse-engineer 4 MB PCI Power Mac ROMs (with the notable exception of the work of the SheepShaver devs). This is a shame, because at least the "resources" in the ROM are easily unpacked. I intend to do more work here.
- Open Firmware imposes a hard 4 MB limit on tbxis, so their contents *must* be compressed. What a pain.
- The two executables after the parcels blob in the tbxi file have a fixed offset (per file at least) and must be present to boot. It would be very helpful to be able to move them and give the parcels blob some breathing space, but this is not urgent because you can just remove unnecessary driver parcels.
- Anyone interested in the workings of the Mac OS Nanokernel should check out PowerMacInfo from the Multiprocessing SDK, which you can find at this mirror of Apple's FTP site: http://staticky.com/
Cheers,
Elliot