Skip to content

Emulator The boot floppy

pappadf edited this page Sep 17, 2026 · 3 revisions

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.OEM on it — and this is simply that. We stopped fighting Setup and started using it.

1. What is on 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 projectdrivers/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

⚠ Do not redistribute the floppy image

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's PROVENANCE.md states the policy: third-party NT binaries are run and read locally, never redistributed.

mkbootfloppy.py is 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.DLL and ADBPORT.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.

TXTSETUP.OEM, and the three classes it offers

[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.


2. Building one

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.

What the one command is doing

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.

3. Starting it — the two lines

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 eval

and 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.of fails with PARTITION is not a number — Open Firmware parses what follows : as a partition number, so the syntax is device:partition,path.
  • fd is already a devalias for /bandit/gc/swim3; the ROM ships it.
  • setup.of resets the machine at the end. That is expected. Run boot.of after 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.

4. The machine it needs

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.


5. Running it in the web UI

The browser build can do all of this, with three things to set that the dialog does not make obvious.

  1. RAM to 64 MB. The ans500 default is 32 MB — the shipping configuration, and the wrong one here. This is the wall above.
  2. The CD and disk ids. As of 17 September the machine's own cdrom_id and 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.
  3. 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.


6. Why it replaced the patched CD

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.


Next

Clone this wiki locally