MachTen 2.2

MachTen console

Not that I need another UNIX, but I came across this fine thing googling around for some Mach based OS’s running on the 68000, and well here is MachTen.  Perhaps the most notable thing about MachTen is that it is capable of running in usermode under MacOS.  Without a MMU.

# cc -v hi.c -o hi
gcc version 1.40
 /usr/local/PMtools/cpp -v -undef -D__GNUC__ -Dunix -D__MACHTEN__ -DMACHTEN -DTENON -D__unix__ -D____MACHTEN____ -D__MACHTEN__ -D__TENON__ -Dmc68000 hi.c /var/tmp/cc000093.cpp
GNU CPP version 1.40
 /usr/local/PMtools/cc1 /var/tmp/cc000093.cpp -fno-builtin-alloca -fno-defer-pop -quiet -dumpbase hi.c -version -o /var/tmp/cc000093.s
GNU C version 1.40 (68k, MIT syntax) compiled by GNU C version 2.3.3.
default target switches:
 as -mc68000 -o hi.o /var/tmp/cc000093.s
 ld -o hi -x /usr/lib/crt0.o hi.o -lc
# size hi
text    data    bss     dec     hex
11220   400     1672    13292   33ec
# ./hi

And yes, it even supports TCP/IP with it’s own TCP/IP stack.  It can even operate as a router of all things!  From a users point of view it is a little sparse, but it’s 4.3BSD, and thankfully includes the C compiler, so unlike of UNIX of the era on ‘small hardware’ this one isn’t crippled.

configuring TCP/IP

TCP/IP is configured through the MacOS via the control panel.  As you can see it can use AppleTalk, Ethernet and TokenRing interfaces.  For my simplicity, I’m just using SLiRP on the Ethernet, so it’s the old setup.  I re-compiled my BasiliskIII to redirect a port into the VM so I can telnet into it.

To install System 7.0.1 you need to set Basilisk II / Cockatrice III as a IIci. I went ahead and used this ROM.  The ROM however does expect there to be a FPU.

rom Mac-IIci.ROM
modelid 5
cpu 2
fpu true

Running however, I’ve been able to set the CPU to 3 or 4 (68030/68040) and it’s fine, I think the major thing is the modelid.  If I try this under System 8 which needs a 68040, then it’ll crash in spectacular ways.  You don’t need MacTCP as again MachTen is a 4.3BSD kernel with Mach 2.5, so it has it’s own.

MachTen also includes support for NFS!  This greatly eases getting data in & out of the system.  To mount my Synology I just need the following command:

mount -t nfs -o timeo=1,retry=1,rsize=512,wsize=512,retrans=1 /mnt/data

And I’m good to go!

This entry was posted in 4.3 BSD, m68k, mach, Macintosh by neozeed. Bookmark the permalink.

About neozeed

What is there to tell? I've loved UNIX like things since I was first exposed to QNX in highschool (we had the Unisys ICONS!), and spent the better time of my teenage years trying to get my own UNIX... I should have bought Coherent in retrospect.. Anyways latched onto Linux in 1992, and then got some old BSD admin books and have been hooked on the VAX BSD & other big/ancient things since...!

8 thoughts on “MachTen 2.2

    • I found that one, however it seems to be more so for the PowerPC version. I contacted their sales to see if the 68k version is still availble, but they were pushing me to PowerPC.. I guess we’ll have to wait and see.

      • Wow! I can’t believe Tenon is still selling powermachten all these years later. Iirc, it was already discontinued and that was it.

      • I ‘found’ a 2.4 but it’s horribly unstable under BasiliskII … I need to play with MacOS under Previous, as it’s got a far better CPU emulation

  1. 2.3 was the last 68k version released, and for OS 8 support there’s a 2.4 patch which is just a new kernel. (This is all at the garden, look for “Professional MachTen” which is the 68k version, “Power” was for PPC).

    One of the coolest parts of 68k MachTen (and which wasn’t implemented for PPC) is that when you do have an MMU, it hijacks the Mac memory manager to implement real memory protection and VM/paging! This has the funny side effect that you can’t quit MachTen once it’s launched–a quit requires a restart because there’s no other way to restore the Mac memory manager.

    Unfortunately I haven’t found any collection of more recent 3rd party/open source software built for 68k MachTen like there is for A/UX. It’s a shame, as it’s far easier to set up and with much better HW compatibility than A/UX.

    • You can always try building some yourself, its not as hard as most people feel, thanks to autoconfigure.

      the things you are going to hit as a limitation is the C compiler is ancient. GCC 1.40 is old. Very old. I don’t know if they made changes to it, but I suspect Tenon has lost all their source by now, and all they have left is a mountain of the PPC CD’s. I emailed them to ask some questions, and the only reply I got was telling me to buy the PowerPC CD, which isn’t what I wanted in the first place.

      I had built an IRC client, but the whole thing explodes, just as pasting through putty, I suspect it can’t handle “fast” networks, as I can do simple and interactive stuff just fine.

      And of course this is 4.3BSD, I suspect it would be 4.3BSD Tahoe. While that source is available, it is from 1988, or perhaps it incorporates more from RENO, but I haven’t really dived deep enough.

Leave a Reply

Your email address will not be published.

Notify me of followup comments via e-mail. You can also subscribe without commenting.