-
Notifications
You must be signed in to change notification settings - Fork 0
Emulator The boot floppy
This page owns: the disk everything this project adds now travels on, what is on it, how to build one, and the two lines you type to start it.
Until 15 September 2026 installing NT here meant patching the distribution CD: a rewritten
TXTSETUP.SIF, a driver written over a filename SETUPLDR hardcodes, and a copy-on-write layer
over proprietary media. That is gone. Everything the project adds — the HAL, the display driver
pair, the ADB driver, the veneer and the Open Firmware scripts — now lives on one 1.44 MB
floppy image, and the CD is used exactly as it shipped.
Two things fall out of that, and both matter more than the tidiness:
- Nothing is written to your media. The ISO is opened read-only and never modified, in a delta or otherwise. Ledger rows 8 and 10 were retired by this change.
-
The floppy is Setup's own OEM disk. NT already has a mechanism for
manufacturer-supplied drivers — a support disk with a
TXTSETUP.OEMon it — and this is simply that. We stopped fighting Setup and started using it.
| file | what it is | where it comes from |
|---|---|---|
\HALSHINR.DLL |
our HAL | this project — built from source |
\ADBPORT.SYS |
ADB keyboard + mouse, and the OEM disk as a RAM floppy |
this project — drivers/adbport/
|
\TXTSETUP.OEM |
the OEM descriptor Setup reads | this project — generated |
\SETUP.OF |
Open Firmware script: configure this machine, once | this project — generated |
\BOOT.OF |
Open Firmware script: start Setup from the CD, every boot | this project — generated |
\BOOTDISK.OF |
Open Firmware script: start the installed system | this project — generated |
\PPC\VENEER.EXE |
the ARC firmware veneer, read by Open Firmware as raw blocks |
Microsoft, off your CD — and patched by mkveneer.py
|
\PPC\VENEERD.EXE |
the same, patched differently for booting the installed disk | Microsoft, off your CD — patched |
\PPC\SETUPLDR |
NT's text-mode Setup loader | Microsoft, off your CD |
\CIRRUS.SYS |
the display miniport | Microsoft/Cirrus, off your CD — and patched (ledger row 6) |
\CIRRUS.DLL |
the display driver | Microsoft/Cirrus, off your CD |
Five of those eleven files are Microsoft binaries from your own CD, and three of them are modified — the two veneers and
cirrus.sys. Sharing a built image means redistributing Microsoft code, in modified form, which this project does not do and cannot permit. The repository'sPROVENANCE.mdstates the policy: third-party NT binaries are run and read locally, never redistributed.
mkbootfloppy.pyis built around that. Every Microsoft file it places on the image is named by you on the command line — the tool ships no copy of any of them. What is shareable is the tool; anyone with their own licensed CD runs it and gets a byte-identical floppy.The two files that are ours —
HALSHINR.DLLandADBPORT.SYS— are GPL-2.0-only, so they may be distributed on their own terms, accompanied by their source.
The disk is a normal FAT12 floppy and a raw block device at the same time. Open Firmware
reads VENEER.EXE off it as sixteen read-blocks calls at a fixed block number — it has no
filesystem of its own to do it with — while NT, later, reads the very same disk as an ordinary
FAT volume through \Device\Floppy0. mkbootfloppy.py lays the veneer down contiguously from
cluster 2 so both views work.
[Computer] shiner_up = "Apple Network Server 500/700", files.shiner_up
[Display] ans_cirrus = "Cirrus Logic 54M30 (Apple Network Server 500/700)", files.ans_cirrus
[SCSI] adbport = "Apple Desktop Bus keyboard and mouse, and the OEM disk (powermac-nt-hal)"[SCSI] is not a mistake. It is the only OEM class SETUPLDR loads arbitrary drivers for,
in a loop, without checking what they are — so the ADB keyboard driver rides in as a SCSI entry.
See Running text-mode Setup, which is where you select it,
and understand that skipping it costs you the keyboard several screens later.
One command. You need a Windows NT 4.0 PowerPC CD image and nothing else:
cd powermac-nt-hal
make floppy ISO=/path/to/your/windows-nt-4.0-ppc.iso→ build/boot-floppy.img.
That compiles the HAL and the ADB driver, takes the four files it cannot ship off the image you named, patches the veneer twice, and lays out the floppy:
Taking four files off /path/to/nt4-ppc.iso:
veneer.exe 161792 bytes the ARC firmware veneer
SETUPLDR 401408 bytes NT's text-mode Setup loader
cirrus.sys 61168 bytes the display miniport
cirrus.dll 80176 bytes the display driver
Patching the veneer, twice:
for the cd: veneer-fd.exe
for the disk: veneer-disk.exe
Laying out the floppy:
build/boot-floppy.img: 1474560 bytes, FAT12, 1835/2847 clusters used
\PPC\VENEER.EXE 161792 bytes at block 33 (0x21), 316 blocks (0x13c) — contiguous
Rebuild it every time you rebuild the HAL. The copy on the floppy is the one text-mode Setup loads; a stale one looks exactly like a fix that did not work.
Useful if a step fails, or if you want to substitute a file.
| step | tool |
|---|---|
Read \PPC\{VENEER.EXE,SETUPLDR,CIRRUS.SYS,CIRRUS.DLL} out of the ISO |
tools/isocat.py |
Two veneers: --for cd carries the VrOpen patch (ledger row 4), --for disk deliberately does not (wall 46) |
tools/mkveneer.py |
Compile hal.dll and adbport.sys
|
make |
Lay out the FAT12 image, write txtsetup.oem, generate the three .OF scripts |
tools/mkbootfloppy.py |
CIRRUS.DLL is not on the CD under that name: NT ships it as CIRRUS.DL_, a Microsoft
Cabinet holding one MSZIP-compressed file. isocat.py notices the _ and unpacks it, so you ask
for the name you want rather than the name on the disc.
mkfloppy.py takes --vga-aperture (default 0x90000000, ledger row 6 — 0xA0000 is
unreachable across Bandit), --adb-driver to substitute another keyboard driver, and --out.
At the 0 > Open Firmware prompt:
\ once per machine — sets little-endian mode and the load addresses, then resets
load fd:,\setup.of
load-base loadsize eval
\ every boot, to install from the CD
load fd:,\boot.of
load-base loadsize evaland to start what you installed, \bootdisk.of in place of \boot.of.
Four things about those lines that each cost a run to learn:
-
The comma is required.
load fd:\boot.offails withPARTITION is not a number— Open Firmware parses what follows:as a partition number, so the syntax isdevice:partition,path. -
fdis already a devalias for/bandit/gc/swim3; the ROM ships it. -
setup.ofresets the machine at the end. That is expected. Runboot.ofafter it comes back. -
dir fd:,\lists the disk, which is the quickest way to prove the drive and the image are both live before you start typing anything longer.
| Model | ans500 |
| RAM | 64 MB. Not the 32 MB default — see below |
| CD | SCSI id 0 on the first fast/wide controller (/bandit/53c825@11) |
| Disk | SCSI id 0 on the second (/bandit/53c825@12) |
| Floppy | the image above, in the internal drive |
RAM is not negotiable. setup.of sets load-base to 3E00000 — 62 MB — and boot.of
works between 59 MB and 63 MB. On a 32 MB machine load fd:,\boot.of still reports ok and
loadsize still reads 1B42, because the read succeeded; it is the destination that is not
there. The subsequent eval reads back zeros and Open Firmware reports an unknown word whose
name prints as a run of blanks:
0 > load-base loadsize eval , unkn
own word
That blank-named word is the signature. See Error codes seen.
The ids are hardcoded in the scripts, which is why they matter: boot.of sets the boot path
to /bandit/53c825@11/sd@0,0 and bootdisk.of to /bandit/53c825@12/sd@0,0. A CD anywhere
else gets you all the way to the veneer and then VrOpen returned 8.
The browser build can do all of this, with three things to set that the dialog does not make obvious.
-
RAM to 64 MB. The
ans500default is 32 MB — the shipping configuration, and the wrong one here. This is the wall above. -
The CD and disk ids. As of 17 September the machine's own
cdrom_idand its preselected bay put these right automatically; on an older build the CD was hardcoded to id 3 for every machine (the Macintosh convention) and the disk lost which controller its bay was on. -
Console on the screen. The scripted route switches to the serial port with
setenv output-device ttya; in the browser you want the default, and you type on the ADB keyboard.
Page Up/Down, Home, End and F1–F12 reach the guest as of 17 September — before that the whole Apple Extended Keyboard block was missing from the browser's key map, and NT's licence agreement (Page Down to scroll, F8 to accept) could not be got past.
The old route needed a rewritten TXTSETUP.SIF and a driver written over \PPC\I8042PRT.SYS,
because SETUPLDR hardcodes that name. Both were recorded as workarounds precisely because they
were uncomfortable: one edits proprietary media, the other abuses a filename. The OEM-disk
mechanism does the same job with Setup's cooperation instead of around it, and it is how a real
manufacturer would have shipped this.
The full measurement-by-measurement account, including the seventeen things that had to be true
for the firmware to read a floppy at all, is
docs/2026-09-15-the-boot-floppy.md
in the repository.
- Running text-mode Setup — what to type at every screen
- Booting the installed system
- Media you must supply
Corrections welcome — this wiki is edited directly, so nothing here has had a review. Repository · STORY.md · GPL-2.0-only
Start here
Theory
- Why NT on a Power Mac is hard
- Open Firmware
- ARC
- The veneer
- The NT boot chain
- The HAL contract
- The NT PowerPC ABI
- Little-endian PowerPC
- How Setup chooses a HAL
- The NT video stack
Machines
Emulator
- Getting Granny Smith
- Media you must supply
- Building the HAL
- The boot floppy
- Preparing disks
- Running text-mode Setup
- Capturing the installed image
- Booting the installed system
- Iterating on the HAL
- Checkpoints and deltas
- Making an OEM CD (retired)
Real hardware
Debugging
- The emulator shell
- Reading NT binaries
- Decoding a bugcheck
- When your instrumentation lies
- Debugging recipes
Reference
- HAL exports
- ARC environment variables
- The veneer's VrDebug bitmask
- Veneer patch catalogue
- Address and interrupt map
- Error codes seen
Project