
How the Atari ST Almost Had Real Unix (2011) - pmoriarty
http://www.dadhacker.com/blog/?p=1383
======
luckydude
It is possible to make VM work with the 68000, Masscomp did it but it was
pretty brute force, they ran two 68000's in lock step with one just behind the
other so when the first one faulted it stopped the other one and the other
handled the fault. Something like that. Clem Cole would know the exact
details.

They made for a pretty beefy machine, I ran ~20 users on one. That was when we
had a pile students on a Vax 11/780, I had accounts on both and much preferred
the Masscomp.

~~~
Turing_Machine
I think there were several manufacturers who used that trick. Apollo was
another. That wasn't really an option for consumer-grade machines like the
Atari ST, though, since 68000 chips were pretty expensive at the time (I think
they were around $500 apiece when they were introduced). By the time the price
came down the later 680x0 chips with real MMUs were available.

~~~
aswanson
Wow. $500 for a 68000?!

~~~
kabdib
I don't recall the COGs for the ST (they held this stuff pretty close), but in
1985, the 68000 CPU couldn't have been more than $50, probably less. Almost
certainly _much_ less because the Tramiels were absolute wizards at making
deals.

~~~
bryanlarsen
1985 was 6 years after the 68K was reduced. By Moore's law, the cost of
manufacturing should have been about 1/16th of what it was in 1979, so the
volume price was probably around 1/16th of introduction as well.

~~~
kabdib
Remember that everything on the ST was being costed in early or mid 1984,
about a year before the ST shipped. (Which in retrospect was an amazingly
compressed schedule...)

I think that the National 32032 would have beaten the 68K in cost; National
was pretty hungry and willing to make good deals. But their chips were rather
extremely very buggy (which the Tramiels may not have cared about, since
making software engineers suffer was part of their model), but it was a
relatively poor performer, clock-for-clock, and that made the hardware
engineers go "ewwww" and after a while we software guys realized that National
wasn't being invited over for meetings any more.

------
afreak
It should be noted that certain 680x0 Macintoshes could run a real UNIX,
created by Apple no less.

[https://en.wikipedia.org/wiki/A/UX](https://en.wikipedia.org/wiki/A/UX)

What was unique about it was that it could run System 7 applications alongside
your common System V/BSD tools.

I've still got a Quadra 800 at home running it.

~~~
mietek
It might be worth pointing out that there is a Macintosh II emulator built
solely for the purpose of running A/UX.

[https://github.com/pruten/Shoebill](https://github.com/pruten/Shoebill)

A mirror of the well-known A/UX software repository, Jagubox, has been
published at the Internet Archive.

[https://archive.org/details/25_12_2009_jagubox](https://archive.org/details/25_12_2009_jagubox)

~~~
glesica
> This will probably be the last release. I won't be able to work on Shoebill
> going forward (by contractual obligation), so I wanted to race out one last
> release.

Really sad that companies put these kinds of restrictions on their
employees...

~~~
afreak
Well considering that the author went on to work at Apple, it sort of makes
sense. I don't think he was explicitly told not to continue development, but
it is likely that some sort of boilerplate part of his contract restricts him.

~~~
mikeash
I don't think it makes any sense, and the fact that it's a boilerplate clause
everyone gets makes it worse, not better.

Employers really need to stop trying to control what their employees do while
off the clock.

~~~
mrpippy
The project depends on reverse-engineering proprietary (if archaic) Apple
hardware/software. Do you think Microsoft would/should allow their employees
to contribute to Wine? Or Nintendo employees working on open-source emulators?

~~~
mikeash
Do you think I should allow you to drink tea? You'd probably say, "you can't
allow or disallow that, you don't have that power." That's what I think
Microsoft's position should be with regard to their employees' free time.

------
scholia
This came about after Sun and AT&T decided to standardise the Unix industry on
SVR4. Having lots of cheap Atari, Amiga and other micros running SVR4 would
have helped it dominate the industry. In theory, at least.

This prompted DEC (Ultrix), HP (HP-UX), IBM (AIX) and other companies to band
together to develop their own standard Unix, which was OSF/1 (Open Software
Foundation, or as Scott McNealy said, "Oppose Sun Forever").

This kicked off another round of Unix Wars, which was no doubt much
appreciated in Redmond, where Windows NT was being developed.

The Atari SVR4 was ported by Unisoft and there's a video of it booting on a TT
030 workstation (which had a 68030).
[https://vimeo.com/100657320](https://vimeo.com/100657320)

I was at the Atari Unix SVR4 (pre-)announcement at CeBIT in Germany, but it's
so long ago I've forgotten the details.

~~~
ZenoArrow
> "Having lots of cheap Atari, Amiga and other micros running SVR4 would have
> helped it dominate the industry."

For those that are interested, SVR4 was released for the Amiga. It's a shame
Commodore's management blocked it from reaching its full potential.

[https://en.wikipedia.org/wiki/Amiga_3000UX](https://en.wikipedia.org/wiki/Amiga_3000UX)

------
pmoriarty
I'll just add that I found the author's story of how he started working at
Atari in the first place[1] far more interesting than the present article.

[1] -
[http://www.dadhacker.com/blog/?p=987](http://www.dadhacker.com/blog/?p=987)

~~~
scholia
Many thanks for that link: it's a great story.

------
jacquesm
So essentially he re-invented segmented memory for memory protection purposes.
Neat hack!

There was a brown box at the time, iirc by Torch (?) that ran a version of
Unix on a 68K. Does anybody know which machine that was?

The 6809 OS that was 'unix like' referenced in the comments is about OS/9.

[https://en.wikipedia.org/wiki/OS-9](https://en.wikipedia.org/wiki/OS-9)

Which is a really neat little OS that you can run on the TRS-80 CoCo and the
UK clone of it called the 'Dragon 32'.

~~~
kabdib
I knew about segmented memory. But base/bounds was too expensive and slow.

The trick was to make it work without requiring an adder -- and subsequent
carry propagation delay -- in the data path. Thus, "one gate delay" and simple
replacement of address lines, and a simple "all zeros or all ones" check on
the bounds, rather than a numeric comparison.

~~~
jacquesm
The reason I call it 'segmented memory' is that that is more or less exactly
the same but this does not have the addition penalty. Super neat :)

I ran into a related problem, I had a need to drive a whole pile of IO and
only an 8 bit centronics port to work with (on the ST as well). So I ended up
making a little demultiplexer using 4 bits of the 8 as address and the
remaining 4 as data. The strobe was used to latch the data. Not super but it
worked well enough to let the 68K drive stepper motors in real time near their
maximum working frequency (30K steps / second or so).

The ST was a fascinating machine, lots of ports, relatively cheap and with all
kinds of limitations that continuously drove the users to creative hacks. I
loved that time. Thanks a ton for all your work.

Oh, one more for the road: we had a product that was copied quite frequently
and obviously wanted to make that a bit harder. There was no budget for a
dongle so in the end I looped one of the 8 bits of the port back to an input.
If that wire wasn't present the software would exit with an 'out of memory'
error :) Threw the copyists for a loop because all I did on not finding the
wire was allocate all the remaining memory which would then cause a TOS Bomb
on the _next_ memory allocation, which could happen just about anywhere. Nasty
little trick.

------
j45
Great story. This machine was remarkably capable for it's time and age for
both business and personal use. I was lucky enough to spend a few years with
this machine as my primary, only can imagine if I was exposed to unix on top
of the graphic, digital creation and other tools.

~~~
gaius
When you consider what the Atari ST, Commodore Amiga and Acorn Archimedes were
capable of in the late 80s and early 90s, you see how little progress we've
really made.

~~~
marincounty
I had an Atari St something(1200?) in college. I never told any of my
professors, or classmates about my computer. I literally felt like I was
cheating.

I was afraid someone would detect the matrix print, but no one ever questioned
my papers. I did have professors bleed red all over my papers though. My
grammer was just horrid. My spelling was great though.

In one English class, a student plugged in a laptop(it was the size of a small
suitcase) into a electrical socket. The teacher made some demeaning comment to
the student. It was someting like, 'I never thought I would see the day where
a student plugged in a computer? Ugh?' I remember thinking that student has
some balls, but has a great tool at his disposal. Never liked that English
teacher. He accused me of plagiarizing once--in a weird round about way. Ah,
back then teachers had a lot of power. They could ruin a student's future.

I remember trying to get my girlfriend interested in my Atari. She was paying
2 dollars a page for someone to type her papers. I showed her the word
program. I showed her the Paint program. She didn't like anything about the
machine. She didn't even want be near the machine. She is now some big wig at
some hedge fund. Her official title is chief of web technology, or something
along those lines. I haven't gone one day where I haven't thought about her.
Crazy?

I look back, and I couldn't get anyone interested in my computer. It was like
people just hated them? Couldn't figure out why. I wasen't a big tech guy
either, and only used the word processing program. I remember thinking, I
guess the computer thing will never take off. I was so wrong.

I remember my last visit to the retail store that sold me the Atari, and I
could tell they were about to close up shop. My last memory is of a big guy
with a beard, and he looked so depressed. All the computers were nicely
displayed, but no customers. They even turned off the shopping music. There
was this weird silence, and a feeling of doom. I think the shop stayed open a
few more weeks, and it turned into some shop that made custom doors?

Looking back, I just have fond memories of my college girlfriend. I wish I
treated her better. I think I have holiday blues?

~~~
jacquesm
> My grammer was just horrid. My spelling was great though.

I'd say it was the opposite ;)

------
mrpippy
The author comments here at HN pretty often:
[https://news.ycombinator.com/threads?id=kabdib](https://news.ycombinator.com/threads?id=kabdib)

------
robin_reala
Site’s down; cache:
[https://webcache.googleusercontent.com/search?q=cache:http%3...](https://webcache.googleusercontent.com/search?q=cache:http%3A%2F%2Fwww.dadhacker.com%2Fblog%2F%3Fp%3D1383)

~~~
kabdib
Sorry, it's on GoDaddy. Every once in a while my blog gets popular and . . .
well, I guess I should move it off of GoDaddy.

------
pmelendez
> "[What’s that about Linux? Dear child, Linus was probably not out of
> whatever they use for high school in Finland."

I think not even that... I think Atari ST came out in 1985 and if I remember
right, Linus started working on Linux in 1991, so not even in the picture at
that time.

~~~
rasz_pl
Linus had Sinclair QL at the time, also Motorola 6800x, sadly x was in wrong
place making whole computer a pile of garbage

------
peter303
PCs were too weak to run UNIX in the 1980s. MicroSoft was the vender for
Xenix, a 16-bit UNIX. It was so slow compared to PDP 11 UNIX. 32 bit x86 CPUs
and Linux came out about the same time in the early 90s- a successful
marriage.

~~~
tzs
Ah...Microsoft and Xenix. Those were responsible for the most annoying meeting
I have ever been forced to attend.

When AT&T and Sun were doing their joint Unix stuff with SysVR4, they had a
deal with Microsoft to add 286 Xenix compatibility. Microsoft contracted with
Interactive Systems Corporation (ISC) in Santa Monica, CA, to do the work
(which made sense, because as part of ISC's contract to do the 386 port of
SysVR3 for AT&T, ISC had done a 286 Unix binary compatibility system).

I worked at ISC at the time, and the 286 Xenix compatibility was done by
Darryl Richman and myself. At one point Microsoft told us that there was a
serious issue that had to be decided, and it was too important to handle over
the phone or email. They wanted both Darryl and I to fly to Redmond. This
annoyed me, because I strongly avoid flying [1]. (During the flight, though, I
did see something interesting. Over Northern California I saw a black aircraft
very rapidly ascending. As far as I could tell, we were at around the right
latitude for Beale AFB, which was a major starting point for SR-71 and U-2 spy
missions, so one of those could have been what I saw).

So we finally get to the meeting, and they bring up the massive issue that
could only be dealt with in person. There were one or two differences in
signal behavior between Xenix and SysVR4 that could not be taken care of in
our user mode code. They would need to add an option to the kernel to switch
to Xenix behavior for programs running under our Xenix emulator. That was no
problem--they knew how to do that.

What they did not know, and needed this urgent face to face meeting to
discuss, was whether the interface to that option should be an ioctl or a new
system call.

WTF!?

We told them to go with an ioctl (if I recall correctly), they said that would
be fine, and the meeting was over.

If that wasn't annoying enough, when the project was done Microsoft said they
were very happy with the results and they expressed this by sending Darryl a
bunch of free Microsoft software.

They sent me nothing.

Now if Darryl had been the project lead or principle engineer or something
like that on the project, that would have been fine. But we were equal...and I
actually was the more experienced in that area because the 286 Xenix emulation
was based on the 286 Unix emulation which had been done by Carl Hensler and
me.

[1] I believe everyone is allowed, and should have, one stubbornly irrational
fear, and I picked for mine flying on aircraft that I am not piloting.

~~~
rjsw
I ran Interactive UNIX on a 16MB 386 in the late 80s, it was a nice OS.

