Jump to content

Picking apart the NewWorld ROM


Recommended Posts

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:

  • 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/

Credit is due to nanopico of MacOS9Lives for his work on this thread, which introduced me to the insides of a tbxi: http://macos9lives.com/smforum/index.php?topic=2727

 

Cheers,

 

Elliot

Link to post
Share on other sites

The Classic Environment abstracts OS 9 way away from the hardware, so no joy there. Nanopico (of the MacOS9Lives forum) and I have been putting our heads together and working out the NewWorld boot process. Getting the PCI bridge and interrupt controller working would be the first steps, and then writing basically a new Southbridge driver for all the IO to work. Apple's PCI driver architecture was actually quite nice, so this wouldn't be absolutely intolerable.

 

I'm now working here:

 

http://macos9lives.com/smforum/index.php/topic,2727.msg20226.html

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...