So what is the deal with A/UX anyways?

The year is 1983, and several Apple employees visit Brown University, and get some idea of what Universities want in a computer for the coming future. The big buzz of the era was the so called 3M machine:

  • 1 Megabyte of Memory
  • 1 Megapixel display
  • 1 Megaflop of performance

Naturally the Macintosh didn’t fill this void, instead leaving this to the new SUN-2 workstation. However seeing the opportunity, in 1984 the seeds were planted for the ‘Big Mac’ project. The hardware design was headed by Rich Page, which included new things like ADB, and dedicated video RAM, along with a 68020 processor, and 68881 maths co-processor. Additionally Big Mac was intended to run a UniPlus version of SYSV Unix, along with the MacOS Toolbox being ported to run directly on top of Unix.

All that I can find of the Big Mac project is this insanely low resolution image, along with the codename ‘Milwaukee‘.

However all this came to and end in 1985 with the ouster of Steve Jobs, who in turn took various people including  Bud Tribble, George Crow, Susan Barnes, Susan Kare, Dan’l Lewin, and Rich Page. Apple followed up with a $5MM USD lawsuit alleging that Jobs had done research for a next generation product and taken the key staff, namely Page from Apple to make it reality. The suit was eventually dismissed.

From there the race was on to build a 3M machine. NeXT would take the Big Mac concept further with the NeXT CUBE which included ADB, NuBUS and a 68030/68882 + SCSI + Ethernet setup. And for the OS, 4.3BSD Tahoe+Mach 2.5, along with a new Objective C language, and new OO frameworks.

Genesis

Back at apple however the ‘Big Mac’ project seemed to have stagnated, and was slimmed down and eventually shipped as the Macintosh II in 1987. There no doubt was a re-awoken sense of urgency in the academic space for the 3M market, now that NeXT was making a 3M machine Apple of course didn’t want to be pushed out of the new space. Apple released a real 1.0 product (1.1.1 survives, although you have to run ( /etc/toolboxdaemon & ; term) to get anything fun from Shoebill with the ISO), what can barely be called a bare bones SYSV port with overlapping terminals at best..

A/UX 1.1.1 codename ‘Circle K’ running on the Shoebill emulator

Overwhelming, and interesting this is not.

This of course was more like a tech demo, running a single ‘Unix toolbox app’ at a time. Pricing according to usenet was around $500 for the software, keeping in mind of course that a Macintosh II would be far more expensive. Version 1 also started to add BSD features namely curses in 1.0, allowing you to port simple terminal ‘graphics’ to the OS. The trend of adding BSD features was only going to continue from here! But all of this is a large step up from the earliest known version simply labeled as 0.7 which despite it’s ‘Oreo’ appearance is strictly text mode only.

Oreo is text mode only.

Dawning of a new era

The real magic is in 2.0:

Sim City on A/UX 2.0 code name Perestroika, Space Cadet

Think of it more like the OSX of the 1980s. Finder has been ported over to the Toolbox on Unix API allowing A/UX 2.0 to run off the shelf MacOS applications. Under the hood however is the same UniSoft SYSVr2. However running MacOS on top of Unix gives it far faster disk IO, and of course the much vaunted memory protection, although with the massive catch that it’s only for Unix applications. You can still crash applications, and even finder. However you can telnet into the box and restart services, or perform a graceful reboot.

For Unix fans this was the first time you could get ‘off the shelf applications’ that didn’t cost a fortune, along with the standard Unix far. Amazingly both the C compiler and Fortran 77 compiler are included in the box. By 1990 many a company was making these only available for a separate purchase. Version 2.0 also brought along some BSD features with the big one being UFS support for longer filenames, and faster disk performance than the aging SYSV filesystem.

Of course it wouldn’t be all sunshine and rainbows as around this time Apple launched a lawsuit against Microsoft, and Atari over the visual iconography of MacOS (Oddly enough GEM on the ST was ignored). This so called ‘look and feel’ lawsuit lead to a boycott of the fledgling Unix from the FSF, which in turn hurt things like binutils/gcc/gdb etc being easily available to A/UX users.

So what went wrong?

Without even looking at the follow up version 3, and the products demise in the transition from 68000 to PowerPC, the writing was on the wall.

  • Price

The damned thing was just too expensive! From WikipediaWhen introduced, a basic system with monitor and 20 MB hard drive cost US$5,498” Version 1 was available on tape, and later CD-ROM, I think there was a floppy version, but without a doubt a 20MB disk is far too small. Just as anything under 4MB of RAM is not going to be realistic. Adding in these components you are going to be into the low end of SUN’s catalogue. And why would you take a chance on Apple when you could go to an established Unix vendor?

The other issue is that Unix being Unix you really needed a MMU, and Motorola MMU chips were expensive. Also A/UX had drivers for SCSI only. This prevented a ‘low end revolution’ as the low end machines like the 605 didn’t have SCSI, or full 68040’s. Even the end of the line Quadra 800, sold for an eye watering $4,679!

  • Direction

What was the heart of A/UX? It was a Unix with a one button mouse, and optional X-11.. with A ONE BUTTON MOUSE?! It was a SYSV Unix, not a BSD, but did include BSD TCP/IP, NFS & UFS filesystem. It was shunned by the FSF as a first tier platform so people had to fidget with code to get it to compile. It was GSA C2 certifiable, but did anyone actually use it in that role?

It was also a Unix with a version of Outlook, and Excel, AfterDark, Fortran 77, and a dead simple UI.

Even after all this time, answering what A/UX was seems to be an identity crisis.

Where did it go right?

One of the big deciding factors in getting workstations for government compliance was the so called C2. This meant things like enforced passwords, auditing and POSIX. It’s everything that the POSIX subsystem for NT was built for, to check just enough boxes, while for Apple A/UX just gave them an instant win. I have no idea if it ever happened but I’m sure somewhere someone was using a Quadra with Word Perfect and A/UX to be a super expensive and certified Mac. Obviously the MAE project dovetails into this, giving commercial MacOS applications to Unix users, but so many others have covered that, and the short version is that it’s incredibly fragile and not very robust at all.

I’m sure someone used it as a fileserver, heck even in the PowerPC generation there a straight port of AIX to a server along with AppleTalk modules.

The demise

Its easy to point to using UniSoft SYSVr2 as being a cost factor, but it really was the hardware requirements. Without any AUX for the LC it was doomed. This wasn’t going to be the Unix for Grandma. Transitioning to the PowerPC removed the braindead CPU problems of lacking a MMU or FPU, but I suspect that the tricks of the 68000 translator would not have run, and certainly wouldn’t pull off things like device drivers. Worse stil people just got used to System 7, and had hopes that the fabled Copeland / System 8 would bring about something strong enough like a Unix without any of the complexities.

Timelines, however slipped, Apple had flirted with MkLinux but didn’t fully commit. Indeed these were dark days, it’s like they were so dead set on going forward to not see a seemingly obvious solution to the OS problem in the past.

Looking at Carbon, and Toolbox32, it’s hard not to imagine a world pushing ISV’s to write for a protected MacOS, but they’d never had bought NeXT. As a matter of face, I would argue that without Steve’s media connections from Pixar, Apple would have slid away into irrelevance, as media outsells the PC tech anyways. Even in 2010 Jobs had called Apple clearly in the ‘post PC era‘.


Links:

Qemu 5 was recently released

It’s been jumping numbers like crazy, and I’m still holding onto 0.9 because I’m weird. Anyways there is something amazing hiding in all those release notes and stuff:

68040!

The m68k emulation is good enough to run Linux! Granted the target machine is the Macintosh 800, although the Mac ROM doesn’t boot enough to do anything Apple enough, using a serial console however does get us into the system. On my ancient Mac Pro I get emulation in the speed range of a 1Ghz G4!

root@qemu68k:~# cat /proc/cpuinfo 
CPU: 68040
MMU: 68040
FPU: 68040
Clocking: 1304.9MHz
BogoMips: 869.99
Calibration: 4349952 loops

Absolutely amazing!

Installation is a bit tricky as there is no true bootrom / boot process, so I had to load the installer with a dummy ‘raw’ disk, and tar the kernel & initrd to that raw disk so I could later extract it on the native OS to boot into the disk. I followed mostly the instructions here.

And what is that? NeXT CUBE emulation?

The peripherals are nowhere near complete enough to boot, HOWEVER it does boot the PROM, complete with keyboard support.

qemu-system-m68k -M next-cube -bios Rev_2.5_v66.BIN

It’s fun enough to play with. And thanks to Qemu’s fast emulation, perhaps this is a speedy way to run stuff in the future?

Now isn’t that cool?

Darwin 0.3 & 1.0 on Qemu

Darwin 0.3 PowerPC

Interestingly enough a lot of the same weirdness of missing bits I saw on the x86, is also on the PowerPC.

There is no nice installer, the CD image actually boots MacOS 8.6 which currently won’t run on Qemu.  However Darwin 1.0 uses MacOS 9, which will.  There is not install program for Darwin, rather you need a secondary disk, that is partitioned so the volume manager will pick it up, and then you restore a backup onto the target disk.  Naturally the restore program from 0.3 won’t work, but the 1.0 will under the G4 Cube MacOS 9 CD-ROM install.

Also I couldn’t figure out the boot parameters so I used Steve Troughton Smith’s BootX loader https://github.com/steventroughtonsmith/BootX to get the OS booted.

qemu-system-ppc.exe -L pc-bios -drive file=..\darwin03.qcow2,index=0,format=qcow2,media=disk -drive file=BootX_custom.dmg,index=2,format=raw,media=disk -prom-env “boot-device=ide1:2,\BootX” -prom-env “boot-args=-v rd=hd0 debug=0xffe kdp=2” -prom-env “boot-file=ide0:8,\mach_kernel” -M g3beige

It’s a little convoluted but it does work.

I put together a binary package for Qemu on sourceforge here: Darwin03-PowerPC_qemu-2.11_04_22_2018.7z

Currently there is no networking, I’m guessing I need drivers from OS X 1.x but Ive had really bad luck with the mouse to try to open a terminal window to see if the new sungem NIC is functional at all.

Previous 1.6

Loading…

For anyone who is interested in classical 680×0 based NeXT emulation, I build the latest snapshot of Previous for Windows.  You can find it here: Previous-1.6_build_767.7z

When I had a cube, I was like everyone else, without a working magnetic optical disc. And I was a (and still am) a diehard 3.3 fan, but it’s still fun loading up version 0.8 under emulation.

1.0a

The problem was several fold, from the drives turning out to be VERY sensitive to dust, the NeXT’s sucking air through the MO drive, trapping quite a bit of dust in the drives, mechanisms breaking, the optics being sensitive to heat, and of course our old friend, bad capacitors.  The build disk application warns it can take upwards of 3 hours to create a MO of the operating system.  They clearly were not fast either.  I think it took 30 minutes under emulation.

Oops!

At the end of the day, I guess it didn’t matter.  Optical discs came and went in the 80’s , and re surged with CD’s and re-writable discs up until this decade.  Now we’ve pretty much gone either all solid state, or only large capacity disks with moving parts.

Oh well, I was looking for sample code, to see if there were other driver examples for the driverkit.  I didn’t think there was anything far back when NeXTSTEP was a black box, 68030 thing, but it never hurts to look.

telnet

It is cool that TCP/IP won out in the protocol wars.  It’s very convenient to have a current 2017 desktop, being able to communicate with operating systems nearly 30 years old.  Especially when it comes to things like NFS, making it even better for mapping drives, and sharing data.

And much to my surprise, with the bad reputation the SLiRP code has, I’m able to mount my Synology’s NFS share just fine from my virtual cube.

mount -t nfs -o fs,mnttimeout=1,retry=1,rsize=512,wsize=512,retrans=1 192.168.1.3:/volume1/Data /mnt/data

I had just added some parameters to lower retry times, and resize the blocksize to be much smaller than a single packet so I don’t have to worry about any issues with MTU resizing.  Maybe it’s not optimal, but being able to copy data in and out is all I want to do, and it’s been reliable.

Oh yeah, since it was burred in the messages, for people who like old dmesg’s

Remote debugging enabled
msgbuf at 0x73fe000
NeXT Mach/4.3 #5.1(XM13): Thu Dec  1 13:03:37 PST 1988; /sources/projects/mk-0.8.26e0.8/RELEASE (photon)
physical memory = 15.99 megabytes.
available memory = 14.97 megabytes.
using 16 buffers containing 0.12 megabytes of memory
odc0 at 0x2012000
od0 at odc0 slave 0
od1 at odc0 slave 1
SCSI 53C90 Controller, Target 7, as sc0 at 0x2014000
IBM     DORS-32160    !# as sd0 at sc0 target 2 lun 0
       Disk Label: NeXT_0_8
       Disk Capacity 2063MB, Device Block 512 bytes
en0 at 0x2006000
en0: Ethernet address 00:00:0f:00:22:09
dsp0 at 0x20000d0
np0 at 0x200f000
sound0 at 0x200e000
root on sd0
master cpu at slot 0.
setting hostname to NeXT_0_8
network_init.gethostbyname fails, errno=2
network_init failed: no network
Network Server initialised.

Darwin 0.1 + Rhapsody DR 2 booted!


Following up from yesterday, here we go!

Rhapsody 1.0 booting

So I finally got it running, after some inspiration from NCommander over at nextcomputers.org forums, that the Darwin 0.1 kernel is infact build able, I went ahead and took a stab at it.  While he was trying to start from OPENSTEP, I tried it from something as close as I could to the target, which was Rhapsody DR2.

Back in the days of the NeXT / Apple merger, there was hope that OPENTSTEP could become the next great OS for the Apple Macintosh.  It had been a while since NeXT had the OS running so things had rotten somewhat, as time had passed on.  However the first and most viable platform would of course be the x86.  Back in 1993 while feeling increased pressure in the hardware space, NeXT was forced to start porting away from their black m68k based hardware, and this was an opportunity to get their software running on different platforms.  And sadly in 1993, the NRW aka NeXT RISC Workstation that was in development with dual m88000 processors was killed along with all hardware projects.  In the end it didn’t matter as much as the only processor from the early 90’s that has a vibrant future is the i386.

So back again to this transitional time before OS X 10, there were developer versions of this OS seeded out that required you to have an intel machine as OPENSTEP was being ported to the PowerPC machines that Apple was selling.

So on May 14, 1998, the last public version for the Intel processor was released, DR2.

However two interesting things happened along the way to what would become OS X Server 1.0 .  The first is that Apple gave up on the ‘yellow box‘ portable API, and to satisfy the GPL requirement to release changes to source code, Apple would go one further and release the source code to many of the internal system utilities, along with the kernel in what was known as Darwin.

This was a big deal for many of us, as the cost of getting the source code to any UNIX was incredibly prohibitive, and OS’s like Linux, NetBSD/OpenBSD/FreeBSD were picking up steam, OPENSTEP being awaken from it’s cryonic hibernation but with the promise of being free and open software was pretty great!  Back in the day it sure looked promising!

Obviously things didn’t work out as everyone had hoped as Apple either straight up ignored anyone on the outside, or they hired people who showed promise, made them sign NDA’s and were basically never heard from again.

So the recently recovered source code to Darwin 0.1 corresponds with the release of the PowerPC only OS X Server 1.0.  However as we all found out, Darwin will still built and maintained on Intel, as it was a very secretive plan B, in case something went wrong with the PowerPC platform.  Being portable had saved NeXT before, and now it would save Apple.

So with this little background, and a lot of stumbling around in the dark, I came up with some steps, that have permitted me to build the Darwin 0.1 kernel under DR2.

However it was not perfect, and the biggest glaring issue was due to the software that was recovered, the layer known as driverkit, (driverkit-139.1-1.tar.gz) turns out to be from another, later release of Darwin, the 0.2 release, which the only thing surviving is the driver kit.  It doesn’t build cleanly, and In order to get it to build I had to break the mach PCI bus.  This means that yes, PCI devices will not load at runtime, only at boottime by sald.

After a lot of fighting I was able to produce a system that could boot into both single user and multiuser mode, although it was unable to load drivers so there was no networking, and no UI.

In a fit of boredrom, I built a bunch of the command line tools for Darwin, and a few libraries, and then went to see why the driverkit had a problem finding the reason why KernBus was undefined, or even with some attempts at helping all the methods were unknown, I stumbled onto the fact that during compilation it will generate new headers, and in those headers are the correct interface for driverkit to call into the KernBus.  So I was able to quickly rebuild driverkit, then re-link into the kernel and now I could load drivers!  Thrilled with this much, I did something more aggressive, I made a dump of my install ‘target’ and then restored it onto an image of my dev VM.  And much to my amazement it booted up to the graphical login.  I now had PCI working correctly.

Darwin 0.1

This kind of thing is not for casual users, but if you install DR2 into a VM, you ought to be able to then use this ISO image, and follow these instructions, and you will then have a DR2 OS from 1998 with the OS X 1.0 kernel from 1999 running.  The biggest difference I’ve noticed is that the newer kernel can use 512MB of RAM, a nice bump up from 192 which was the prior limit.

Obviously there is a lot more work to be done, it’d be nice to find some source to an IDE or other block controller and modify it to work with the massive disks of today, along with the filesystem code to handle partitions larger than 2GB.

Maybe it will be possible to port in the driverkit to XNU, so we can get things like existing drivers, and SMP, massive filesystems etc..  It’s great to see we are going the right way.

For fans, here is a qemu 0.90 image+exe that can run Darwin 0.3 into single user mode.

EDIT and for people still hitting this, here is a multiuser bootable image.  I’ll keep updating on the source forge page.

Previous 1.4 features NeXTdimension emulation!

NeXTdimention!

NeXTdimention!

It’s really cool!  And as an added bonus, it can now run in ‘Variable’ speed, meaning as fast as your machine can emulate the 68040.

OS X version here, and Windows version here.  For me, at least a bunch of DLL’s are missing, so I put together a quick package containing the Windows version with all of the missing DLLs here.

From the announcement:

Hello all,

I am happy to annouce the release of Previous v1.4! Simon did lots of work on emulating the NeXTdimension and he considerably improved timings and efficiency of Previous. Furthermore there is now a mode to accelerate the emulation beyond the performance of real systems. Other improvements and bugfixes are listed in the readme.

Emulating the NeXTdimension board was something i thought would not be feasible. But thanks to the i860 emulator from Jason Eckhardt and the work of Simon, who improved and completed parts of it, it finally came true. I hope you enjoy it!

NeXTSTEP in your browser!

Well, kind of.

NeXTSTEP

NeXTSTEP

It’s a Docker containers running Previous, that you connect to with noVNC in your browser.  So it’s a legacy system thing on demand!  I had tried to do something like this ages ago with SIMH on demand, but I broke it all when I installed apache on OS/2 to make the bbs url self hosting.

The mouse control is insanely offtrack, but this does present an interesting possibility of bringing back an OS museum / zoo thing.

Also worth mentioning that they do offer MacOS!

Quake on HPPA (Gecko) NeXTSTEP

So forever ago I had done a super bare port of Quake to NeXTSTEP.  It was based on a copy of UAE 0.6.0 source code that included hooks for NeXTSTEP.  So seizing on this I built a shaky framework and amazingly got it to work.  Well work enough I had trouble with the mouse part, and never did get around to fixing it, but I kicked it out into the world.  And amazingly the HPPA cross compiled version that I compiled but never tested runs!

My whole misadventure is on nextcomputers.org, and blakespot has a blog about finding the gecko and it’s 32bit video modes here.

Darkmatter

Darkmatter

Darkmatter

The NeXT community has been about this old Mac emulator, daydream making a comeback onto NeXT hardware.  Branded as darkmatter it runs on the bare metal of the NeXT cube/stations and can run MacOS in much the same way that Basilisk II does.

System 7.0 running on a NeXT cube!

System 7.1 running on a NeXT cube!

What makes this interesting is that the 68040 is cycle set, and uses a much more mature CPU emulation core than Basilisk II, so it should give more accurate emulation. However it will run at 68040 25Mhz speeds, so it won’t win any speed records.

Naturally programs (Space Quest I) that blit directly to the display probably expect Mac/Plus/Se dimensions so the NeXT display won’t be ideal.  But good old SoftPC for MacOS runs great!

SoftPC 3.1 for MacOS

SoftPC 3.1 for MacOS

And again, being set to 68040 speeds, it’s nowhere near as turbo as Basilisk II/SheepShaver.

For anyone interested, you’ll want Previous, the latest build and a test disk.  Set the emulation for either a NeXT Computer (68030), or NeXTcube (68040), add the test disk as SCSI disk 0, and either type in ‘bsd’ at the firmware prompt, or have it automatically boot in the options.