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.12.tar.gz (35.4 kB view details)

Uploaded Source

Built Distribution

tbxi-0.12-cp37-cp37m-macosx_10_14_x86_64.whl (57.3 kB view details)

Uploaded CPython 3.7m macOS 10.14+ x86-64

File details

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

File metadata

  • Download URL: tbxi-0.12.tar.gz
  • Upload date:
  • Size: 35.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.4

File hashes

Hashes for tbxi-0.12.tar.gz
Algorithm Hash digest
SHA256 657e6fe2cfe5b24b17151ec98a9a5ac56a13d0548a48744cf769614b826b6f17
MD5 28652b71e5d8dee7293d7a39fc27a4d7
BLAKE2b-256 5d926e815c2610b5a3fe901ef33b495295ae08209a031e0fa11b6fb9ca2475e2

See more details on using hashes here.

File details

Details for the file tbxi-0.12-cp37-cp37m-macosx_10_14_x86_64.whl.

File metadata

  • Download URL: tbxi-0.12-cp37-cp37m-macosx_10_14_x86_64.whl
  • Upload date:
  • Size: 57.3 kB
  • Tags: CPython 3.7m, macOS 10.14+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.4

File hashes

Hashes for tbxi-0.12-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 fca902865842ea32ede196a1b6f7049cbdec5ed6b4d61e604a53c567806b6d00
MD5 51a9b6b6cbe883dace93cd8f8098588b
BLAKE2b-256 e3e22f046844c47a5b4b460f182485f3aee0ab4fba72d5a36f3be6793a681340

See more details on using hashes here.

Supported by

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