kbob 2 years ago

I was part of the MAE engineering team from 1992-94.

The original plan was to machine-translate the Mac ROM from 68K machine code to SPARC/PA-RISC/POWER machine code. It would have brought MAE much closer to RISC-like speeds. Unfortunately, there's a lot of dirty assembler in the Mac ROMs, and the decoding project faltered. So about 3/4 of the way through the project, we scrapped the binary translation and ran the whole ROM in the 68K emulator. It started working quickly, but it was slower by a factor of several.

We had a binary translation app, basically a compiler that took 68K machine code as the source language, written by a 3rd party company whose name I forgot. They were east coast, possibly Research Triangle, and might have had defense contracting ties.

I personally identified about 20 Duff's Devices in QuickDraw inner loops and recoded them as not-Duff's-Devices so the binary translator could grok them. (Sorry, can't remember exactly how I de-optimized them. My/our assumption was that the RISC processors were so much faster than the 68030 of the Mac IIci we were porting that optimization wasn't a big deal.)

We (largely me) developed a huge list of hints for the translator, hundreds of instances of "The code at address X looks like it does this, but it really does that." or "Address Y is an entry point. Start translating here." or the converse, "Address Z is data. Don't mess with it."

It was an insane engineering effort, and I'm still disappointed it never shipped. It was happening at the same time other parts of Apple were developing the first generation PowerPC Macs. They were going through equally insane gymnastics getting 68K and PowerPC to coexist in the same address space, with calls in both directions.

Unfortunately, it's been nearly 30 years, and I just can't remember very many details any more.

  • kbob 2 years ago

    N.B., I didn't learn the term, "Duff's Device" until several years later.

compsciphd 2 years ago

So a related story (or why I'm not sure Mac OS running on HP-UX) is that strange.

I was interning at the Naval Research Lab in the mid 90s while in high school and was part of a team building what the called the "Secure Tactical Access Terminal". That ran both HP CMW (comparmentalized workstation) an MLS (multi level security) version of HPUX. A big problem on ships is that they have a severe lack of space, so having multiple systems running at multiple classification levels (i.e. command and control machines running JMCIS and normal "office" machines running windows), didn't work so well. so we leveraged the work on CMW machines and provided them with a soft windows (remember them) installation in each compartment that were isolated from one another. So what might have previously been 4 machines on a ship, could be consolidated into one.

We had a test deployment on the USS Theodore Roosevelt (not many HS kids back then could claim that they had stuff they wrote running on an aircraft carrier, so that was cool) and the project was well received by command of the carrier, but soon after the Navy made their decision to transition to NT, and there are famous stories about that.

  • karmakaze 2 years ago

    Great story. I recall SoftPC but not SoftWindows. The Wikipedia page has something interesting to say:

    > Unlike most emulators, the SoftWindows product used recompiled Windows components to improve performance in most business applications, providing almost native performance (but this meant that, unlike SoftPC, SoftWindows was not upgradable).

    • compsciphd 2 years ago

      hmm, it might have been SoftPC. It's been a while :)

      I think we might have used both in different stages of the project (or on different machines, we were prototyping it on a CMW version of SCO (x86 major COTS advantage) and also had it on either SunOS CMW or trusted Solaris, but HP had the big TAC4 contract for workstations so main usage was on it, that I remember for sure.

      • karmakaze 2 years ago

        My understanding is that it started out that SoftPC bundled with Windows licenses were sold as SoftWindows, and later there were optimizations.

azalemeth 2 years ago

That sumo wrestler is quite something. I miss Easter Eggs in Apple's software -- there are a few in modern versions (e.g. "cat /usr/share/calendar/calendar.lotr") but I think that picture highlights their sense of humour back in "the day".

  • logbiscuitswave 2 years ago

    To me it seems like it’s pretty much peak mid-1990s tech advertising. Pick up any issue of WIRED from this time period and it’s filled with advertisements with similar kinds of aggressively strange imagery. Things like this were definitely memorable - I certainly can never forget the infamous Logitech ad with the peeing baby. I wouldn’t be surprised if much of this style of imagery all came from the same ad firm.

    • fouc 2 years ago

      I think it's more about the fact it was such a new market, people could have a lot more fun with it and "mass appeal" didn't matter nearly as much. It was still fringe, not everyone had a computer at home or in their pocket yet.

jasoneckert 2 years ago

The 1990s had a lot of weird stuff like this - platforms, operating systems and software were exploding, and nobody really knew what the end result would be so they focused on ensuring they had a hand in everything.

Running Mac OS and Mac OS apps using MAE on Unix workstations was one example. But there were others too - some I remember are NeXT on Solaris with OpenStep, Mac LC systems that had a DOS compatibility card (486 CPU) to run DOS/Windows apps, and Unix SysV running in Mac OS using A/UX.

  • dekhn 2 years ago

    Interix: an entire replacement posix subsystem for Windows NT, which included gcc, opengl, and motif. I ported a million line UNIX molecular modelling app to NT in 2000.

  • AntiRush 2 years ago

    The System 7 that runs on A/UX is actually a unix process running on top of the A/UX kernel (which exposes the necessary Macintosh Toolbox features to run the specific version of System 7).

    • lproven 2 years ago

      Which is, AIUI, why A/UX could not usefully be ported to PowerPC.

      Which led to Copland, which didn't work out, and so led to the NeXT acquisition.

      • rbanffy 2 years ago

        The ROM-based toolbox would not support more than one program running at a time. It was an odd limitation that a Unix could run only a single Mac application at a time.

        > Which led to Copland, which didn't work out, and so led to the NeXT acquisition.

        I remember the brief life of MkLinux. It brought a number of PoweMacs we had stacked in corners back to life as Unix workstations on sysadmin and developer desks (in 1998 or so).

        • lproven 2 years ago

          I didn't know that. Interesting -- thanks!

          I never used MkLinux myself, but I am happy to hear it was useful to someone...

          • rbanffy 2 years ago

            It was OK. I remember at some point someone must have flipped something in the install image that added a Windows 95 theme to fvwm. Whoever it was, I hate that person.

  • scarface74 2 years ago

    The LC 68030 series had an Apple // emulation card. I had one. Later they had the “Houdini” “DOS Compatibility Card” for 68040s and the PowerMac 6100 series. I had one of those two.

    • rbanffy 2 years ago

      Yes, but both were full computers running independently from the host. Sadly, the Apple // emulation card prevent my Color Classic from connecting to the network at home.

  • yjftsjthsd-h 2 years ago

    > and Unix SysV running in Mac OS using A/UX.

    Likewise, https://en.m.wikipedia.org/wiki/MachTen

    • masswerk 2 years ago

      MachTen was actually amazing, especially the fast boot time.

      (There was also WebTen, which was essentially Apache, Perl and probably MaySQL running on a basic kernel, without a window manager, but with MacOS ineropability and files system sharing.)

  • pjmlp 2 years ago

    NeXT on Solaris with OpenStep was the genesis of how Java would be born and some Objective-C based projects at Sun were later ported into Java.

    Sometimes I wonder how it would have turned out if Solaris had embraced Objective-C instead.

    • lproven 2 years ago

      Fascinating (as your comments usually are; we seem to come from quite similar tech interests and beliefs.)

      Do you have any examples or citations? This is new to me.

  • rbanffy 2 years ago

    Don't forget the Sun 386i and its DOS environment.

adrianmonk 2 years ago

> Is it a virtual machine? Yes. Yes it is. Mostly.

> It is, essentially, a 68040 emulator with a Mac ROM and System 7.5.3 sitting on top of it.

It sounds like they basically reused the same design that they used to build PowerPC Macs that could run (legacy) Motorola 68k applications.

https://en.wikipedia.org/wiki/Mac_68k_emulator

When you ran a legacy 68k app, the code of the app itself ran under CPU emulation. But they ported some of the system to PowerPC, and when the legacy app called into those particular parts of the system, that part of the code ran natively. Some lucky apps (with the right workload) ran surprisingly fast.

Looking at the MAE architecture diagram, it looks very similar, with some of the Mac system sitting atop the 68k emulator but some of it sitting atop a layer that doesn't go through emulation.

  • marcodiego 2 years ago

    > When you ran a legacy 68k app, the code of the app itself ran under CPU emulation. But they ported some of the system to PowerPC, and when the legacy app called into those particular parts of the system, that part of the code ran natively.

    Sounds like qemu-user.

    • jchw 2 years ago

      I think qemu-user is a cleaner split due to the syscall interface being the barrier. IIRC, what Apple was doing was a bit more interesting because there wasn’t a clean boundary between what was emulated and what was native.

      • marcodiego 2 years ago

        So it is like box86, which translates some API calls?

        • jchw 2 years ago

          If I’m not mistaken, System 7 itself was not entirely ported to PowerPC. So the OS itself still needed m68k emulation for some components.

          But yes, box86 sounds a bit closer based on my understanding.

  • kbob 2 years ago

    Different code bases. MAE was developed in parallel with, and started a little earlier than the PowerPC Macs.

    I thought MAE emulated a 68030, specifically a Mac IIci. But I could be wrong -- it's been a while. I am 99% certain we used an IIci ROM image, and it's unlikely that an '040 could run that unmodified.

racingmars 2 years ago

Not too long ago, I got a SunPC Accelerator card (basically a 486 PC on an SBus card) for my SPARCstation 20, and installed the Macintosh Application Environment, so I have Solaris, Mac System 7, and Windows 3.11 running on the SPARCstation 20!

Screenshot of everything happily co-existing: https://i.imgur.com/ctvlzCX.gif

tluyben2 2 years ago

That's quite interesting. I had a mac at home and at the university we worked on Solaris machines (laughing at the 3 guys sitting in the Windows room); I always thought 'with a bit of polish on Solaris or a LOT of improved stability on Mac OS, computing is damn near perfect'.

  • bgm1975 2 years ago

    It almost happened. If I’m not mistaken, Sun was on Apple’s list of possible acquisitions in the late 90s before they decided on Next (Be being the other). Considering Jobs came with Next, Apple would have turned into a very different company. If fact, I suspect the whole tech landscape would probably look a lot different today had Apple bought Sun Microsystems.

    • Maursault 2 years ago

      This is not accurate. Sun was never in danger of being acquiring by Apple, instead they nearly merged before NeXT was acquired, then Sun and Apple nearly merged again in the naughts (but I honestly don't believe Jobs was serious about it). But in 1996, Sun nearly bought Apple.

      • KerrAvon 2 years ago

        Sun was never serious about it — they offered a lower price than Apple’s stock was worth at the time (itself not much). It was an insult and the stockholders would have sued them out of existence if the board had taken it.

      • flembat 2 years ago

        Nightmare, they might have ended up owned by ORACLE..

      • bgm1975 2 years ago

        Ah, thanks for the clarification, clearly my memory of the events is fuzzy.

rcarmo 2 years ago

I've been seriously considering running BasiliskII on a Raspberry Pi again, if only for that wonderful sense of unfettered simplicity.

Too bad most document formats have evolved beyond the versions of stuff I can run on it.

paxswill 2 years ago

> There was a time when Apple has email mailing lists. Here is the MAE User list. And Apple published the archives for people to search. I tell ya. Was a different time at Apple.

Apple still has a handful of mailing lists (they’re mostly dead though): https://lists.apple.com/mailman/listinfo

Unfortunately many of the archives are restricted to members.

ylee 2 years ago

My first year at Columbia, the university set up a single computer lab in the engineering building (<https://cuit.columbia.edu/computer-lab-technologies/location...>) with HP 9000 workstations. Although they booted into HP-UX and its Motif window manager, MAE provided Mac emulation and, in practice, was usually used because most students were unfamiliar with X Window, of course.

MAE was slow and unstable, and by the time I graduated Macs, I believe, replaced them, which made the lab consistent with what most of the other computer labs had.

ngcc_hk 2 years ago

That is very interesting.

But long term, given it is apple and ignore the sever part (which it should go now but not then), these are bad mix.

Still Steve did try to get linux as base (including talking with Linus) but even that is not right.

It turned out the strange bsd-cum-message based os work fine.

  • MBCook 2 years ago

    Do you have a source for the Linux part? I’ve never heard that before and would like to know more.

    • ksherlock 2 years ago

      In 1996 (prior to the NeXT reverse merger) Apple and OSF started working on MkLinux which was Linux+Mach for PowerPC. Apple dropped it a couple years later.

      The Walter Isaacson Steve Jobs biography doesn't have any mentions of Linux or Linus Torvalds FWIW.

    • ngcc_hk 2 years ago

      The discussion with Linus is in the autograph coming out when he passed away.

awiesenhofer 2 years ago

Oh wow, I need to check if my old HP-UX pizzabox (HP 712) still boots. I'd love to try this if I can track down the files somewhere.

  • dev_tty01 2 years ago

    I used MAE on HP/UX for many years. Worked great. We were workstation based designers and couldn't stand Windows so this allowed us to stay on the workstation and still have access to corporate tools like Office. Had mh wired to pop up the appropriate Office app from MAE when those email attachments arrived.

  • trasz 2 years ago

    Those are fantastic machines to run NextSTEP, btw.

  • ece 2 years ago

    I have a SPARCstation this might run on as well.

    • tluyben2 2 years ago

      I have a slew of sparcstations so that would indeed be cool if it works. They run Linux though; need to find an old Solaris copy then too I guess.

      • ece 2 years ago

        archive.org seems to have it: https://archive.org/details/Solaris2.5.1SPARC11972586714

        I got one in college, and it was dated even when I got it. I'll need to go back to my parents basement to try and fire it up again, the VGA adapter and and old install of Solaris is about all I can remember.

tiffanyh 2 years ago

Macintosh Application Environment was a Virtual Machine (VM) before VMs became popular.

  • mechanical_bear 2 years ago

    VMs were quite popular before this project, dating back to the 1960s.

    • mnd999 2 years ago

      Indeed, the previous poster might be interested in z/VM for example.

      • rbanffy 2 years ago

        Or Smalltalk 80.

  • rbanffy 2 years ago

    VM's have been popular since IBM more or less invented the term in the 60's.

    It's not even possible anymore to install an OS on a modern mainframe bare metal. IIRC, the z12 was the last one where this was possible.

outside1234 2 years ago

Windows used to run on top of DEC Alpha too

  • mbreese 2 years ago

    But that wasn’t in an emulator, right? I never used it, but I thought that was a separate build that ran on a DEC Alpha, not emulated on the primary Unix OS.

    • yjftsjthsd-h 2 years ago

      Correct; NT had builds for at least MIPS, Alpha, and x86.

      Edit: Here we go:

      > Windows NT 3.1 was released for Intel x86 PC compatible, PC-98, DEC Alpha, and ARC-compliant MIPS platforms. Windows NT 3.51 added support for the PowerPC processor in 1995, specifically PReP-compliant systems such as the IBM Power Series desktops/laptops and Motorola PowerStack series; but despite meetings between Michael Spindler and Bill Gates, not on the Power Macintosh as the PReP compliant Power Macintosh project failed to ship.

      https://en.m.wikipedia.org/wiki/Windows_NT#Supported_platfor...

      • monocasa 2 years ago

        And i860, though that one was unreleased and just a development forcing function for portability.

        • lproven 2 years ago

          NT was originally developed on i860, which was codenamed "N-Ten".

          That's what the initials "N.T." originally stood for.

          https://www.landley.net/history/mirror/ms/winserver2k3_gold1...

          At different times, NT supported or has supported: i860, MIPS, SPARC, PowerPC, Alpha, ARM 32, ARM 64, Itanium, x86-32 and x86-64.

          • rbanffy 2 years ago

            IIRC, Alpha was the first 64-bit Windows.

            • lproven 2 years ago
              • rbanffy 2 years ago

                Microsoft used to be know for their "bacon-and-eggs" partnerships where they bring the eggs and the other company is the pig.

                • lproven 2 years ago

                  :-D

                  Excellent! Never heard that one before.

                  • rbanffy 2 years ago

                    I was the pig once. Never again.

                    • lproven 2 years ago

                      Ouch. My sympathies.

                      Until recently I worked for a Linux vendor. Many of my colleagues were quite keen on the New MS. "But Liam," they'd tell me, "MS has changed. They say so! Look: 'MS <3 FOSS.' It's right there! They're our valued partners!"

                      I pointed out now-forgotten misdeeds.

                      They said it was OK: they had a _contract_. It had _guarantees_ in it.

                      I do not own any shares in that company.

                      • rbanffy 2 years ago

                        My usual answer is "The DoJ couldn't sue Microsoft. Good luck"

                        • lproven 2 years ago

                          <3

                          I must remember that.

  • karmakaze 2 years ago

    I worked at a spinoff company that actually had DEC Alphas for the purpose of running Win NT. We never actually did though, running our VMS versioned product on it instead. Later I canibalized about 3 or 4 machines in the office starting with a Digital PC with localbus graphics to get a hardware platform capable of running NeXTSTEP 3.3. Ran it for a few weeks and it was totally worth it. Got to see what Xcode would be like way in advance.

  • robk 2 years ago

    I spent a summer internship doing qa on the networking bits of nt on alpha at DEC. A bit sluggish but pretty smooth overall.

mc4ndr3 2 years ago

I wish Apple would bring macOS to x86. Or Valve would bring Source Engine to 64-bit.

lundukethrow 2 years ago

so i used to read lunduke's twitter. his current twitter is literally the antithesis of his previous twitter. i have no idea what to think about this.