GitHub - matthewmrichter/mooftcp: Drop-in MacTCP replacement for System 6 / 68000 Macs
Drop-in MacTCP replacement for System 6 / 68000 Macs - matthewmrichter/mooftcp
Drop-in MacTCP replacement for System 6 / 68000 Macs - matthewmrichter/mooftcp
A modern, memory-lean replacement for MacTCP on 68k Macs running System 6.
MoofTCP is a drop-in replacement for Apple's MacTCP. Programs written for MacTCP run on it unchanged, but underneath it is a fresh TCP/IP stack written from scratch in portable C, with its own control panel, installer and DHCP client. It was built for a Mac Classic with 4 MB of RAM, so every byte counts.
MacTCP is wonderful, but it is old and closed, and on a 4 MB Mac Classic with a SCSI Wi-Fi/Ethernet adapter like BlueSCSI it is hungry for memory and awkward to set up. MoofTCP aims, in this order, for:
...all while using no more resident memory than MacTCP does.
.IPP driver interface (TCP, UDP, ICMP echo) and the dnrp
name resolver. Your existing MacTCP programs just work.MoofDiag tool for bug reports.core/ has no malloc and no global state, and is tested on the
desktop with sanitizers and fuzzers.1.1rc1 is a release candidate. The download on the Releases page is still 1.0, and the version badge and file names below stay 1.0 until 1.1 is final.
MoofTCP 1.1 is faster than 1.0. Measured on a real Mac Classic (System 6.0.8, 4 MB, BlueSCSI v2 Wi-Fi), timed on
the PC: MoofTCP 1.1 with MoofPort 1.1 against 1.0's behaviour (the
MoofTCP 1.0 engine, with MoofPort at 1.0's settings). The gains come from both together: MoofTCP 1.1's shorter call
path and MoofPort's steadyack timing, which MoofTCP 1.1 switches on. Medians:
| 1.0 | 1.1 | |
|---|---|---|
| Echo round trip, 1 byte | 53.6 ms | 41.4 ms |
| Terminal burst, 2,000 bytes | 153.6 ms | 124.6 ms |
| TCP receive, 1 MB | 45.3 KB/s | 55.6 KB/s |
Measured 2026-11-14 in one session of 10 pairs, with the AppleShare server's Wi-Fi power saving off. These three were better in all 10 pairs (the session the night before gave the same direction). Not significant in this session: TCP send with 4 sends queued (36.7 -> 41.0 KB/s), one-at-a-time sends (25.2 -> 23.9 KB/s) and AppleShare copies (too few pairs with the volume mounted). The network was noisy that day: stock MacTCP's one-at-a-time send ranged from 11 to 40 KB/s. The figures were measured over Wi-Fi and vary with the network.
With the DaynaPORT driver the gain is small: MoofTCP leaves DaynaPORT's driver as it is. Echo was about 54.9 ms with MoofTCP 1.1 against 57.6 ms with 1.0 (two blocks; the 1.0 figure is from an earlier session with different Wi-Fi settings, so this is not a clean comparison).
Against stock MacTCP with the DaynaPORT driver in the same session (3 blocks, medians): MacTCP still answers faster (echo 33.6 ms, terminal burst 109.1 ms) and usually sends faster, though its send figures varied widely that day; MoofTCP 1.1 with MoofPort receives faster (MacTCP 45.5 KB/s).
steadyack timing when it opens the driver. With
any other driver it changes nothing.CHANGELOG.md has the full list.
| Installer | MoofTCP Lite panel |
|---|---|
![]() |
![]() |
MoofTCP-1.0.dsk, MoofTCP-1.0.hqx or MoofTCP-1.0.sit from the
Releases page and get it onto your Mac (a BlueSCSI shared folder works well).To go back to MacTCP, run the installer and click Remove. The Read Me file in the release has the
details, including how to switch between MoofTCP and MoofTCP Lite.
StuffIt Lite 3.6 is tested as working for expanding the .hqx packages.
.ENET0 driver, such as a BlueSCSI v2 WiFi with DaynaPORT. MoofTCP
does not include an Ethernet driver.1.0 results: tested on a real Mac Classic (System 6.0.8, 4 MB, BlueSCSI v2 WiFi with DaynaPORT) and in the Snow emulator.
| Program (1.0) | Result |
|---|---|
| Flynn (telnet terminal) | Works, real Mac and emulator |
| Wikipedia Reader | Works, real Mac and emulator |
| MacTCP Watcher | Works in the emulator |
| NCSA Telnet | Works in the emulator |
| Fetch (FTP) | Works in the emulator |
| TurboGopher | Works in the emulator |
| Eudora | Starts; mail was not tried |
1.1rc1: MoofTCP 1.1 ran on the real Mac Classic with the MoofPort driver (two sessions of 10 blocks) and with the DaynaPORT driver (2 blocks), using the telnet-style echo and terminal tests, TCP send and receive, and AppleShare alongside. In Snow: the installer (install, switch to MacTCP and back, unattended), MultiFinder runs with two applications (full and Lite), ApiProbe against MacTCP's recorded answers, and the resident-memory check. The programs in the table above were not re-run with 1.1.
Have a program that doesn't work? Please open an issue (see below).
| MoofTCP | MoofTCP Lite | |
|---|---|---|
| Driver code, 1.1rc1 | 93,746 bytes | 88,879 bytes |
| Driver code, 1.0 | 95,623 bytes | 90,722 bytes |
| Resident over the no-network baseline after network use, 1.1rc1 (emulator; MacTCP: 195,046 bytes) | 171,816 bytes | 166,852 bytes |
| Free system heap after first open, 1.0 (real Mac Classic, single Finder, full build) | about 30.7 KB | n/a |
MultiFinder grows the system heap on demand, so free memory varies more there.
MoofTCP keeps a small diagnostic log in memory. If a program misbehaves but the Mac keeps running, run
MoofDiag right away (it is in the release's diagnostic tools download), and open an issue with the
MoofDiag.out file it writes next to itself, plus a note about what you were doing. Feel free to ask your LLM
to analyze the codebase and the diagnostic output as well and to submit fix PRs.
SystemTask. A program that waits in a
synchronous MacTCP call on a quiet network calls nothing, so a lost timer task then waits for the next packet
or call.AppleShare volumes set to open at start-up can fail to mount. At start-up AppleShare finds the server with AppleTalk multicast lookups (4 tries in about 2 seconds, no retry), and on Wi-Fi these are lost far more often than normal traffic. Measured on the test setup: with the server's Wi-Fi power saving on, about 1 in 7 to 1 in 3 boots failed; with it off, 0 of 15 at night but up to 1 in 3 at busy times of day. The stock MacTCP + DaynaPORT driver fails the same way, and in an interleaved test MacTCP + MoofPort failed 4 of 10 boots and MoofTCP 1.1 + MoofPort 1 of 10. It is not caused by MoofTCP or MoofPort. Workaround: open the volume from the Chooser; to make it rarer, reduce multicast loss (a wired connection for the server, the server's Wi-Fi power saving off).
You only need Docker. The pinned Retro68 cross-compiler image is pulled automatically.
scripts/build-mac.sh MoofTCP # the MoofTCP file -> build-mac/moof/
MT_LITE=1 scripts/build-mac.sh MoofTCP # MoofTCP Lite -> build-mac-lite/
scripts/release.sh --force 1.0 # one installer with both -> dist/MoofTCP-1.0.{dsk,hqx,sit}
release.sh also needs hfsutils, macutils, unar, gcc and Python 3.
The portable core and the glue logic are tested on your desktop with gcc and CMake (AddressSanitizer and UBSan are on by default):
cmake -S . -B build && cmake --build build ctest --test-dir build --output-on-failure cmake -S . -B build-lite -DMT_NO_DHCP=ON # the Lite configuration
The emulator tests (Snow) need Apple system software and the BlueSCSI DaynaPORT image. Those are not in this
repository and you must supply them yourself; the scripts in scripts/ (setup-home.sh, golden-stage.sh) show
what is expected.
core/ portable TCP/IP stack (no malloc, no globals), host-tested
mac/ Mac glue: .IPP driver, INIT, resolver, control panel, installer, diagnostic apps
tests/ host tests (ctest), including fuzzers
scripts/ build, release, emulator and hardware-session scripts
tools/ pinned tool versions; tools/sit is a small StuffIt-format writer
Bug reports, compatibility reports ("program X does/doesn't work") and pull requests are welcome. For code
changes, please read CONTRIBUTING.md and run the host tests first (see above). CLAUDE.md is a
detailed map of the code and its rules. Security problems: see SECURITY.md.
MIT. "MacTCP" and "StuffIt" are trademarks of their owners and are used here only to describe compatibility. MoofTCP contains no Apple or third-party code; building it uses Apple's interfaces as shipped in the Retro68 toolchain.
Texto de github.com tal como lo publicó, leído de su página y mostrado aquí con el formato de El Autómata. El original, en github.com · Volver a la noticia de El Autómata