Doug Doug

Emulating NeXTStep and the First Web Browser

I’ve been rewatching Halt and Catch Fire and just finished season 3 which concluded with an episode titled NeXT and is set during the dawn of the web. In this episode you can see a few of the characters booting up an early web browser on a NeXTcube.

I got inspired to see if I could do this for myself in an emulator.

My first thought was to try Infinite Mac since they have various versions of NeXTStep running. However, I couldn’t find a way to mount external data or active network access, so I changed course and tried to get a local emulator working.

My first attempt was with qemu, but I ran into issues finding a bootable installer CD that worked well with qemu.

Then I found the Previous project and, after a little bit of searching, some disk images with NeXTStep 3 installed.

Now, it was just a matter of installing the developer tools, which you can find ISOs of on the Internet Archive. Interestingly, the install process is very similar to modern MacOS, which makes sense given its lineage.

CERN has a great page on the birth of the web, but I wasn’t sure if the code for Tim Berners-Lee’s original browser, called WorldWideWeb was published there.

Thankfully, some folks at CERN had completed a project to rebuild the WorldWideWeb app so it could run inside modern browsers. Sadly, it doesn’t seem like that actual project is available on the site any more. But, they do link to the original NeXTStep code!

Previous makes it easy to mount a directory on your host system as an NFS share inside NeXT, which is what I did to easily make the source available inside the emulator.

After poking around the codebase for a bit, I found there was a Makefile…could it be as easy as just running the “make” command?

Yes, yes it is!

This build process would be very familiar to anyone who has spent time working with C/C++ projects on Unix/Linux environments.

And, as expected, the “make install” command puts the built application into place!

I also was able to get the source building in ProjectBuilder, which is the NeXT development environment.

And here it is, the world’s first browser, up and running!

CERN hosts a copy of the first website which failed to load with a HTTP error, likely because their server doesn’t accept older versions of HTTP requests (or immediately tries to redirect to HTTPS). But, FrogFind saves the day!

This was a fun tour through the dawn of the web! It’s amazing to see how much the concepts implemented in this early code are still relevant today, so much so that stripped down HTML served over HTTP can still be loaded.

This was also the most time I’ve spent using NeXTStep. There were a few quirks I had to get past at first, but after that it was a familiar environment. I think writing code in this environment would be a challenge where a plain text editor seems to be the state of the art. I suppose there was always vi available, but I’m not sure how commonly used that was for NeXT developers.

One thing that I noted was how most applications, including WorldWideWeb, defaulted to opening every document in a new window which is very different from the modern trend of single window applications, often filled with tabs. I think I kinda miss the era when apps favored windows over tabs.

Read More
Doug Doug

Emulating Mac OS X Server 1.2

Before Mac OS X 10.0 and it’s Developer Preview, the first public appearance of Mac OS X was Server 1.0, codename Rhapsody, which was released in March 1999.

This is the first time we can see the descendent of the NeXTSTEP operating system dressed up in a Mac-like theme. I was able to get Server 1.2 running in QEMU.

Screen Shot 2021-04-02 at 2.10.54 PM.png

Instead of the logo and progress bar, our boot screen is a text console.

Screen Shot 2021-04-02 at 2.46.27 PM.png

I suppose this would be the first piece of software that allows you to log in to your Mac as root.

Screen Shot 2021-04-02 at 3.09.34 PM.png

Instead of Finder we have Workspace Manager.

Screen Shot 2021-04-02 at 3.12.07 PM.png
Screen Shot 2021-04-02 at 3.14.40 PM.png
Screen Shot 2021-04-02 at 3.28.05 PM.png

The Server 1.x releases didn’t yet have the Carbon framework, so only newly written apps using Yellow Box (which became Cocoa) were supported. OmniWeb was one of the few apps that could run in this environment.

Screen Shot 2021-04-02 at 3.13.34 PM.png

The Apache web server is included out of the box.

Screen Shot 2021-04-02 at 8.24.58 PM.png

Check out how this was marketed on Apple’s website in 1999. Some of the notable features are the Mach BSD kernel, POSIX compatible APIs, and 100% pure Java. Technologies to enable web serving were also emphasized, such as Apache, QuickTime Streaming, and WebObjects.

Let’s not forget, a virtualized copy of Mac OS 8 is present.

Screen Shot 2021-04-10 at 5.04.42 PM.png
Screen Shot 2021-04-10 at 5.41.51 PM.png

There you have it, Mac OS X Server 1.2! The 1.0 release debuted at a price of $499 and was met with a poor reception. Even in 1999, I can’t imagine that there was much of a market willing to pay this price to host websites and run Unix network applications on Apple hardware. Despite how impractical it might have been in its time, it is an interesting piece of history showing a critical step of the evolution of NeXTSTEP into the Mac OS X we are familiar with today.

Read More
Doug Doug

Emulating Mac OS X Developer Preview

After getting the first consumer release of Mac OS X 10.0 running in an emulator, I was curious if I could get one of the earlier, pre-Aqua UI, builds running.

From my own trials and what I could find online, it seems the first Developer Preview can’t boot on QEMU, but people reported success with DP2 and newer…

Screen Shot 2021-04-03 at 11.45.44 AM.png

Success! DP2 works in QEMU.

It’s easy to see right off the bat how this operating system is a bunch of different technologies duct taped together…

Screen Shot 2021-04-03 at 11.45.38 AM.png
Screen Shot 2021-04-03 at 11.46.02 AM.png
Screen Shot 2021-04-03 at 11.47.08 AM.png
Screen Shot 2021-04-03 at 12.38.32 PM.png
Screen Shot 2021-04-03 at 12.39.36 PM.png
Screen Shot 2021-04-03 at 12.40.33 PM.png
Screen Shot 2021-04-03 at 4.02.15 PM.png

It’s very surreal to see Mac OS X without a dock and a UI that’s really NeXTSTEP with a Mac OS 8 like coat of paint on it. As John Siracusa says in his article on DP2, “Actually using DP2 is akin to logging into a demented Xterm running a poorly designed window manager theme meant to look something like Mac OS.”

The “File Viewer” is especially rough. I’m not sure if it was an issue with the install on my emulator or if this was how it behaved on real hardware at the time, but I had a hard time even browsing to and launch applications. Instead, I was happy to find that I could use the ‘open’ terminal command I’m familiar with from modern releases of Mac OS X to launch applications and open the “File Viewer” in a particular folder.

Screen Shot 2021-04-03 at 3.59.57 PM.png
Screen Shot 2021-04-03 at 12.55.43 PM.png

I’m curious if Mac developers were actually productive in this environment considering how limited everything was. I suspect it involved heavy use of the embedded Classic Mac environment to get anything done.

Screen Shot 2021-04-03 at 12.48.55 PM.png
Screen Shot 2021-04-03 at 12.55.02 PM.png

Nerdy note: here I’m running a virtualized Mac OS 9 in a virtualized on Mac OS X which is itself running in an virtual G3 PowerPC computer in an emulator that’s compiled for x86 which is being translated on the fly via Rosetta 2 to my MacBook’s native M1 Apple Silicon instructions. Whew. Can’t believe it works.

Read More
Doug Jones Doug Jones

Emulating Mac OS X 10.0

In honor of the 20th anniversary of Mac OS X 10.0, I wanted to boot it up in an emulator. I became a Mac user much after 10.0 launched, so I never experienced the first release for myself.

After some trial and error, I got it running in QEMU. Here’s a few screenshots of what the system looked like then. It’s interesting to see what’s the same and what has changed…

Mac-OS-X-10-0-2.png
Mac-OS-X-10-0-3.png
Mac-OS-X-10-0-4.png
Mac-OS-X-10-0-5.png
Mac-OS-X-10-0-6.png
Mac-OS-X-10-0-7.png
Mac-OS-X-10-0-8.png

What’s amusing here is I’m running this on a M1 Mac. At this point, OS X only supports PowerPC, so I need QEMU to emulate that. QEMU does have a native Apple Silicon build, but I found PPC emulation to be buggy (basically crashes at launch). So, I had to use the x86 compiled QEMU. What I ended up with is QEMU emulating PowerPC in x86, and Rosetta 2 translating x86 to Apple Silicon’s ARM variant. So many layers, it is incredible that it works at all, yet alone with reasonable performance.

Even from the first release, Mac OS X had the terminal and it’s UNIX core under the hood. Java on OS X was, uh, a thing at the time.

Mac-OS-X-10-0-9.png

vi included out of the box!

Mac-OS-X-10-0-12.png
Mac-OS-X-10-0-10.png
Mac-OS-X-10-0-11.png

If you want to try this for yourself, here’s some links I found useful:

Read More