Skip to main content

Tools to compile and inspect Macintosh ROM images

Project description

tbxi: the Mac OS Toolbox Imager

tbxi is a command-line Python script to help with the inspection and modification of Macintosh Toolbox ROM images. These images contain varying amounts of high-level Mac OS code and low-level boot code.

tbxi has two modes, both with a --help option:

  • tbxi dump converts a ROM image to a tree of self-describing text files and small binaries.
  • tbxi build rebuilds the image as accurately as possible.

In between running the two commands, the directory tree can be modified. The text-file formats produced by tbxi dump are designed to be easily editable using text editors and scripts.

Patch Library

This repository contains known-good scripts to patch the ROM, for example to add Mac mini G4 support to Mac OS 9:

https://github.com/elliotnunn/tbxi-patches

Patches can be applied to a dumped directory or the the ROM file itself.

Background

"OldWorld" (pre-USB) Macs contain a real physical ROM. "NewWorld" Macs (iMac and later) have an unusual "ROM in RAM" arrangement, which retains compatibility with the ROM-based architecture of the Mac OS while easing software updates. An almost-complete legacy ROM image is loaded from the "Mac OS ROM" file in the System Folder (type code 'tbxi'), leaving only a minimal Open Firmware "Boot ROM" in the hardware.

During the progression from 68k ROMs to NewWorld PowerPC ROMs, multiple layers of wrapping and abstraction were added. These are reflected in the multi-level output of tbxi dump:

  • Open Firmware bootinfo file (Mac OS ROM => Bootscript textfile + binaries)
  • structured binary of "Parcels" (Parcels => Parcelfile textfile + binaries)
  • 4 MB PowerPC ROM (MacROM => Configfile-1 textfile + binaries)
  • 3 MB 68k ROM (Mac68kROM => Romfile textfile + binaries)

Bugs

Some very quirky PowerPC OldWorld ROMs (e.g. PowerBook 1400/2400) cannot be rebuilt correctly. NewWorld ROMs of version 2 or later (Sawtooth G4) will be slightly different due to an uninitialised buffer in the original build process.

ROM images predating before the "SuperMario" ROM (Quadra 660AV/840AV) are not supported, excluding most 68k Mac ROMs.

The tbxi dump format is likely to change. If you keep a collection of dumped ROM images to peruse, re-dump them regularly.

Contributing

Yes please! Bug reports, suggestions and requests are welcome. Open a GitHub pull request or image, or get in contact via the email on the PyPI page.

All are welcome on our retro Mac-hacking mailing list:

https://lists.ucc.gu.uwa.edu.au/mailman/listinfo/cdg5

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tbxi-0.13.tar.gz (36.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tbxi-0.13-cp39-cp39-macosx_10_9_universal2.whl (45.7 kB view details)

Uploaded CPython 3.9macOS 10.9+ universal2 (ARM64, x86-64)

File details

Details for the file tbxi-0.13.tar.gz.

File metadata

  • Download URL: tbxi-0.13.tar.gz
  • Upload date:
  • Size: 36.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for tbxi-0.13.tar.gz
Algorithm Hash digest
SHA256 05b62d5ef4b606400aa7fe0ab3a3235f260df8f92081d943b678ee05e5fa20e3
MD5 2564f66e5564c3ce8670ea47c8c720a9
BLAKE2b-256 f82c938b057afa559da83b11e4cefbbf3e0b45909b2fbb3ead5cc0f614fe875d

See more details on using hashes here.

File details

Details for the file tbxi-0.13-cp39-cp39-macosx_10_9_universal2.whl.

File metadata

  • Download URL: tbxi-0.13-cp39-cp39-macosx_10_9_universal2.whl
  • Upload date:
  • Size: 45.7 kB
  • Tags: CPython 3.9, macOS 10.9+ universal2 (ARM64, x86-64)
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for tbxi-0.13-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 a2ca9e35dbca0eefe76ec39a3a2e4cffdc2b2302d2b5d2e0d2ebb747bc19605e
MD5 50526acb1b38489c6fd2e05b56d9a001
BLAKE2b-256 2c4f4086d2e45f008c383e5f952565ef50fe706fe8f3cb6850802514496c2768

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page