Skip to content
AgentiLoopPublic

About

NeXT emulator on macOS, goal is to run NeXTStep 3.3 with custom webkit web browser at HD resolution, 100% native swift

Resources

Stars

2 stars

Watchers

0 watching

Forks

Repository files navigation

Early alpha

MacXT

Native macOS NeXT emulator under construction. The window app now boots NeXTSTEP 3.3 with a hard disk image and the installation image attached, at full speed, with the Mac's keyboard and mouse. The graphical installation completes, and the installed disk starts up to NeXTSTEP's first-run "Welcome" language and keyboard panel. The machine plays its sound, has a CD-ROM drive and a floppy disk drive whose disks can be changed while it runs, is on a network through the Mac, and comes with a web browser for NeXTSTEP whose pages WebKit renders on the Mac. Still open: a blank hard disk needs a boot command typed at the ROM monitor, there is no DSP (sounds that NeXTSTEP has the DSP decompress stay silent) and no sound input.

Website: macxt.xcf.ai. Sister projects: Sid64 (Commodore 64 and 128), MacMiga (Amiga 500) and Macxine (Macintosh Classic, Classic II and Quadra 700).

Get MacXT

  • The app. Download the signed and notarized MacXT.app from Releases, or build it: Bundle/make-app.sh makes .build/MacXT.app (Universal, with its icon). Open it and choose a ROM and disk images from the toolbar.
  • The command line, from the app. The executable inside the bundle takes the same options as a source build: /Applications/MacXT.app/Contents/MacOS/MacXT --rom ROM --hd DISK.
  • The command line alone. swift build -c release makes .build/release/MacXT without a bundle.

What works

  • Machines. NeXTcube, NeXTstation Color, NeXTcube Turbo and NeXTstation Turbo Color. The non-turbo machines use the Rev 2.5 v66 ROM, the turbo machines a Rev 3.x ROM (v74 was tested).
  • Color. 12-bit color on the color stations, and 32-bit color on a NeXTcube with a NeXTdimension board: NeXTSTEP 3.3 finds the board, loads its i860 kernel onto it and puts the Workspace on the board's screen.
  • A 1920 by 1080 screen on the turbo machines; how that came about is told below.
  • Disks. A hard disk image that is written in place, a CD-ROM drive and a floppy disk drive. Discs and floppy disks can be changed while the machine runs.
  • Sound. What NeXTSTEP plays is heard on the Mac.
  • Network. The machine is on a private network whose gateway is the Mac, with nothing to set up: NeXTSTEP 3.3 configures itself on it.
  • A web browser for NeXTSTEP (Guest/WebBrowser), whose pages WebKit renders on the Mac. Disk > Insert MacXT Tools Disk puts it in the floppy disk drive.
  • Clock. The Workspace shows the Mac's date and time.

Click the screen to give it the keyboard and capture the mouse; Escape releases the mouse. Command keys go to NeXTSTEP except Command-Q, and Option is the NeXT Alternate key.

How NeXTSTEP 3.3 got past NeXT's screen size

NeXT never shipped a display bigger than 1120 x 832, so getting NeXTSTEP 3.3 up to 1920 x 1080 in MacXT took some digging. The break came when we found that on the turbo boards the kernel doesn't assume the screen size, it asks the hardware. The turbo memory controller has two timing registers, $02200088 and $0220008C, and the low 12 bits of each hold the display counts: width in units of four pixels in the first, height in the second. The mk-171.9 kernel reads them at $04097EF6 for color and $040975F0 for monochrome, which we worked out from a memory dump. So MacXT simply answers 1920 x 1080 there.

That alone wasn't enough, because three other places still believed in the old size. The ROM carries its own description of the display with the sizes built in (km_coninfo, 804 bytes into its globals), so MacXT changes that in the copy of the ROM it holds in memory, never in the file on disk. Then the ROM's CRC-32 has to be brought up to date (it's the long at offset 26, covering everything after the 30-byte header), otherwise the ROM fails its very first test and just blinks the LED at you. Video memory had to grow too, from 2 MiB to 8 MiB for color and from 256 KiB to 1 MiB for monochrome. And the kernel itself has the extent of video memory hard-coded in two instructions (2 MiB of color, 936 rows of monochrome), so with a bigger picture it faults and halts while starting. MacXT finds those two instructions in RAM while the kernel is being loaded and gives them the real extent.

With all of that in place, a NeXTstation Turbo Color with the Rev 3.3 v74 ROM draws the ROM monitor and the kernel console on the wide screen, and NeXTSTEP comes up to the Workspace with the desktop filling 1920 x 1080. The non-turbo machines stay at 1120 x 832, because their kernel has that size built in and never asks.

Build

Requires macOS 14 or later, Swift 6 and Metal.

swift build -c release    # .build/release/MacXT
swift test
Bundle/make-app.sh        # .build/MacXT.app

More

  • COMMAND_LINE.md: the options, and the steps to install NeXTSTEP 3.3 on a new hard disk image. No ROM, operating system or disk image is included.
  • DEVELOPMENT_DETAILS.md: how each part works, what was measured and what is not done, the hardware reference, and the development log cycle by cycle.

License

Copyright (C) 2026 AgentiLoop.ai, a Logos InkPen LLC company.

MacXT is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version. It is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE for the full text.

The CPU cores are two separate Swift packages, fetched by Swift Package Manager:

  • M68K: the Motorola 68000, 68020, 68030 and 68040 (MIT).
  • I860: the Intel i860 XR of the NeXTdimension board (GPL version 2 or later).

Inspired by Previous. Created using AgentiLoop.ai.

About

NeXT emulator on macOS, goal is to run NeXTStep 3.3 with custom webkit web browser at HD resolution, 100% native swift

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages