Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Appleuser201

macrumors 6502
Original poster
Here's my dumb question of the day as someone who enjoys retro technology, but knows very little about how code works. I like the classic Mac OS, specifically 9.2, which was actually designed to be an internet OS. These days nearly 3 decades later, that's far from the truth and to be expected, as the latest browser that will run on it is Classilla which will load barely anything anymore due to lack of modern security like TLS 1.2 and 1.3.

But something unexpected happened this year and that was the fully modern Powerfox browser ported over to 10.5 Leopard. That alone was no easy feat at all, and OS 9 is worlds apart from Leopard. But I can't help but wonder what if we could get something like Powerfox or Aquafox running on OS 9?

It sounds utterly ridiculous and impossible and I'm sure it is, but I'd love to learn more about the technical hurdles of what it would take to bring a modern web browser to an ancient operating system abandoned by Apple in 2002. Also, theoretically could a massive corporation like Google or Microsoft port their latest browsers over? *if they absolutely wanted too for whatever insane reason*.
 
I don't see why not. It would probably have to be written specifically for Mac OS 9 – the sophistication of the rendering engine might threaten to hit some walls – but the Web (aside from the now-pretty-fully-adopted SSL encryption) still uses the original simple protocol from the 1990s.
 
Here's my dumb question of the day as someone who enjoys retro technology, but knows very little about how code works. I like the classic Mac OS, specifically 9.2, which was actually designed to be an internet OS. These days nearly 3 decades later, that's far from the truth and to be expected, as the latest browser that will run on it is Classilla which will load barely anything anymore due to lack of modern security like TLS 1.2 and 1.3.

But something unexpected happened this year and that was the fully modern Powerfox browser ported over to 10.5 Leopard. That alone was no easy feat at all, and OS 9 is worlds apart from Leopard. But I can't help but wonder what if we could get something like Powerfox or Aquafox running on OS 9?

It sounds utterly ridiculous and impossible and I'm sure it is, but I'd love to learn more about the technical hurdles of what it would take to bring a modern web browser to an ancient operating system abandoned by Apple in 2002. Also, theoretically could a massive corporation like Google or Microsoft port their latest browsers over? *if they absolutely wanted too for whatever insane reason*.
Technical hurdles include, but are not limited to:
1. Lack of a modern compiler. The most recent GCC for OS 9 appears to be 2.3.3 - see https://macintoshgarden.org/apps/gnu-c-compiler
For comparison, here is what the following browsers want
Aquafox/TenFourFox - gcc 4.8
PowerFox/White Star/UXP - gcc13 (or 14 if you don't mind having no altivec)
Ladybird/Firefox/Chromium/Webkit - recent clang/llvm or at least gcc14
Cross-compiling will be of less help than on OS X, because OS 9 is not considered a valid target for modern gcc or clang/llvm.
For Firefox and Chromium, and possibly Ladybird going forward, you need rust. Ladybird only added rust a few days ago, and only into one part of their browser, so it still may be possible to get a decent experience without rust for a while.
Rust is a very difficult language to port, because it is written in rust. Therefore, if you don't have rust, you normally can't get rust on your platform. Luckily, the mrustc project exists, which in theory can allow you to bootstrap rust from c. In practice, this is not easy on obscure platforms.
2. You need some sort of GUI. Cocoa/Appkit doesn't exist on OS 9. No modern browser uses Carbon. SDL has been ported to OS 9, but no browser seems to use that either.
Realistically, you would have to port GTK or QT to have a GUI browser. QT would be better, but we don't even have that on OS X PowerPC, so it can be assumed to be difficult. With gtk, you need an X server, and eXodus is going to really struggle with handling even GTK 2, much less modern GTK.
On the plus side, if money is no object, QT is run by a for-profit company that I am sure would port QT6 wherever you wanted for enough money.
3. As pointed out above, OS 9 is not Unix or Unix-like. So many things will need to be completely rewritten by people who have lots of experience porting open source software to OS 9. It may be to the point writing a new browser from scratch would be easier. The issue with not being a major browser is that the modern internet is designed for Chromium, Webkit, and Firefox. If you aren't close to those codebases, websites may just not work. User agent spoofing helps to an extent.
4. You are also running on Big Endian PowerPC 32 bit, many things which are problematic.

Could Google or Microsoft port a chromium fork to OS 9? Probably. Those are companies with massive resources. It would still take years and many developers who have extensive OS 9 experience.

More realistically for hobbyists, Netsurf has been made to run on a lot of operating systems, and is in C89, which helps with portability. It will not give a comparable experience to Aquafox or more modern browsers.

If Classzilla could be updated to be more like TenFourFox or UXP, Cameron Kaiser probably would have done it. I am sure he would have preferred two similar codebases were it possible.

OS 9 also is ram limited to 1.612 GB, which isn't actually that bad, as MorphOS is similarly limited. And it actually has better multiprocessor support than MorphOS. So in theory you could get a browsing experience as good as is possible on MorphOS if you had enough talented and dedicated developers.

If I were to do a cost estimate of getting a modern browser (main cost is skilled developers):
OS 9: 1-2 million minimum (based on what the Ladybird team has spent already). MorphOS probably hasn't spent as much on Wayfarer though, so maybe it could be less.
10.3: Maybe for $100,000 you could get someone to pull this off.
10.4: Some of us are trying, like myself and @danupsher, and we are not charging anything. We also haven't had major success thus far, but some visible progress has been made.
 
Classilla was made by Cameron Kaiser cherry-picking various patches from later in Mozilla development to the WaMCom sources. Nobody's prepared to wait an eternity for it to compile though.
 
Here are some thoughts:

1. It is simply not possible to create something from scratch, nor is it feasible to adopt a 20 year-old codebase. The web simply moves too fast for any of this to be viable.

2. The only viable option is UXP. There do exist other engines that may be okay, but they're definitely much further behind in web compatibility.

3. Retro68 is the compiler that you would have to use. It is based on GCC 12, and is modern enough for what you would want to do.

4. There exists work to bring up UXP on SDL2, which is what you would probably want to use for the toolkit. Though, note that more functionality would probably need to be implemented in the SDL2 port to support the browser.

5. The major problem is POSIX. UXP has code for both NT-like systems and POSIX-like, but OS 9 is none of those. You would need to spend a very significant amount of time to reimplement everything that is not supported, which is the major blocker for any OS 9 port.
 
Here are some thoughts:

1. It is simply not possible to create something from scratch, nor is it feasible to adopt a 20 year-old codebase. The web simply moves too fast for any of this to be viable.

2. The only viable option is UXP. There do exist other engines that may be okay, but they're definitely much further behind in web compatibility.

3. Retro68 is the compiler that you would have to use. It is based on GCC 12, and is modern enough for what you would want to do.

4. There exists work to bring up UXP on SDL2, which is what you would probably want to use for the toolkit. Though, note that more functionality would probably need to be implemented in the SDL2 port to support the browser.

5. The major problem is POSIX. UXP has code for both NT-like systems and POSIX-like, but OS 9 is none of those. You would need to spend a very significant amount of time to reimplement everything that is not supported, which is the major blocker for any OS 9 port.
That's very good to know UXP has work toward an SDL2 backend, that definitely makes it most viable, though still very difficult.
 
Classilla is also gecko-based. Could the platform-specific code from Classzilla be merged with the newer browser engine from Basilisk?
Note that I said Basilisk - that source base uses UXP, and deliberately excludes Rust.

The author of Powerfox (Basilisk based) has talked about adapting TenForFox’s jit. A PPC version of an OS9 based browser could reuse much of that. For 68K, that would be largely from scratch.
 
Note that I said Basilisk - that source base uses UXP, and deliberately excludes Rust.

The author of Powerfox (Basilisk based) has talked about adapting TenForFox’s jit. A PPC version of an OS9 based browser could reuse much of that. For 68K, that would be largely from scratch.
Just noticed that Jazzzney had joined the conversation.
 
I've been pessimistic about AI elsewhere but this could possibly be a test case for its usefulness. If the real workload were shouldered by Gemini or Claude (whichever is more useful for code shenanigans) there might be some reasonable progress to be made. I don't mention ChatGPT only because, as I believe I've mentioned before, it's always wound up spiraling into a kind of despair when I've asked it about OS 9 related things. Very strange, but maybe it's since been fixed to be less depression-prone about non-UNIX systems.
 
This is incredible, and would be the first usable browser on OS 9 in many many years.

It's very must still a work in progress but I have been able to get it to load a lot of web features that most expected to be impossible. I am testing it on a G3 imac and a G3 minitower (with a sonnet g4) and plenty of ram so it will be questionable how it handle more stock systems but after it gets out I'm sure the real testing will begin.

So far it can:
  • Render modern CSS3 natively on the Mac — real libcss cascade, not preprocessed elsewhere. Custom properties (var()), flexbox, CSS Grid, transforms, gradients, border-radius, box-shadow, opacity — all working.
  • Display PNGs with per-pixel transparency, plus GIF/BMP/TIFF/JPEG via QuickTime.
  • Run ES5 JavaScript through Duktape — closures, regex, JSON, the works. Passes Mandelbrot.
  • Reach HTTPS sites via a little Go proxy that handles TLS upstream and hands the Mac plain HTTP.
  • Run natively in Carbon on OS 9.1/9.2.2 on a real G3 or G4. Not OS X — actual Classic.
I've been testing it against a real Drupal 11 site (my own site which is called MacTrove) and it renders with theme fonts, card layouts, link colors, custom-property resolution all working.

I honestly feel like I have overcome most of the impossible stages and expect to be focusing on performance next.
 
Never say never. In steve's day, Macs were made to last forever. New kit is disposable.

Dork question: Did OS 9 come with Safari? Why not use the Web browser that was bundled with the OS?

Frankly, I miss 32-bit. A lot of great, lovingly created apps were lost.
 
  • Like
Reactions: TheShortTimer
Never say never. In steve's day, Macs were made to last forever. New kit is disposable.

Dork question: Did OS 9 come with Safari? Why not use the Web browser that was bundled with the OS?

Frankly, I miss 32-bit. A lot of great, lovingly created apps were lost.


Not a dork question at all. OS 9 actually came out before Safari existed. Safari didn't ship until 2003 and it was OS X only. OS 9 came with Internet Explorer 5 as the default, plus Netscape on some versions. Both are pretty much unusable today since they can't do modern TLS or any recent CSS.

And yeah, totally with you on the disposability thing. That's kind of why I'm doing this. A Beige G3 from 1997 still boots and runs great, it just needs software that actually works with the modern web.
 
Even something as relatively simple as netsurf would be huge! Amazing to hear.

I can’t say I’m anything close to an expert on OS 9 by any means, but I’m confused as to why TLS is such a bottleneck issue for browsing on it. Is it really that monumental of an endeavor to port the necessary stuff? Again, speaking as someone who knows very little about Classic MacOS
 
The short version is TLS itself isn't the hard part. The math runs fine on a G3, people have done TLS 1.3 on machines way slower than that. The hard part is that every TLS library written in the last 20 years assumes BSD sockets, POSIX, and a modern C compiler. OS 9 has none of those. It uses Open Transport for networking (totally different API), no POSIX, and you're stuck with C89 via CodeWarrior.


So porting a TLS library means writing a socket compatibility shim, dealing with cert validation from scratch since OS 9 has no system trust store, figuring out entropy without /dev/urandom, and making the whole thing play nice with Carbon's cooperative threading. None of it is impossible, it's just a few weeks of careful work that nobody's done yet because the OS 9 community is tiny.


There's actually a library called Crypto Ancienne that already targets old systems like this and it's the obvious starting point. That's the v2 plan. For v1 I'm sidestepping it with a small proxy that handles TLS upstream, which gets the modern web working today while the real fix comes later.
 
  • Like
Reactions: Appleuser201
The short version is TLS itself isn't the hard part. The math runs fine on a G3, people have done TLS 1.3 on machines way slower than that. The hard part is that every TLS library written in the last 20 years assumes BSD sockets, POSIX, and a modern C compiler. OS 9 has none of those. It uses Open Transport for networking (totally different API), no POSIX, and you're stuck with C89 via CodeWarrior.


So porting a TLS library means writing a socket compatibility shim, dealing with cert validation from scratch since OS 9 has no system trust store, figuring out entropy without /dev/urandom, and making the whole thing play nice with Carbon's cooperative threading. None of it is impossible, it's just a few weeks of careful work that nobody's done yet because the OS 9 community is tiny.


There's actually a library called Crypto Ancienne that already targets old systems like this and it's the obvious starting point. That's the v2 plan. For v1 I'm sidestepping it with a small proxy that handles TLS upstream, which gets the modern web working today while the real fix comes later.

Have you looked into Retro68? It provides a gcc12 build that can work all the way back to System 7. You overcome a lot of the C89 limitations which makes writing compatibility layers for the POSIX specific code a lot easier.

I haven’t done anything more than some basic experiments with it, but I don’t see why OpenSSL couldnt work, especially if you’re already using AI. Check it out!
 
  • Like
Reactions: eastone
Yeah, Retro68 is great and I do use it, just on the Linux side for syntax-checking before I push to the Mac. The main build is CodeWarrior 8 Pro running natively on OS 9 because that's what produces proper Carbon PEF binaries with the right 'carb' resource setup. Retro68's cross-compile path doesn't quite get there for a real Carbon app, plus the whole OS 9 software ecosystem was built with CW8 so the tooling around it (ResEdit, Constructor, MacsBug) all assumes that workflow.

On OpenSSL specifically, it's actually too much code for the target. OpenSSL assumes POSIX pretty deeply and pulls in a huge amount of stuff a G3 doesn't need or have room for. Crypto Ancienne is the better fit because it was specifically written for pre-C99 compilers and old architectures, and it explicitly lists CodeWarrior PPC on Classic Mac as a build target in its docs. So the toolchain question is actually solved already, it's just a matter of doing the integration work (socket shim via GUSI, cert validation, entropy seeding from Mac-specific sources). That's the v2 plan.

But yeah, Retro68 is genuinely useful and the whole project would be way harder without it on the Linux side.
 
Someone with machine language experience or very good "C" coding experience could probably do it.
Yeah, that's basically where it's at. The work isn't conceptually hard, it's just a few thousand lines of careful C89 with someone who understands both the TLS state machine and the OS 9 Toolbox well enough to wire them together. The crypto math is solved, the library exists (Crypto Ancienne), it just needs someone to do the integration work. Which is me, eventually, for v2.
 
The preliminary alpha release is currently live on my github. I don't want to spam the forum but the app is called MacSurf and you should be able to find it.

It's very alpha but it is a working application and I am working many hours a day to implement all the CSS quirks and requirements to get this thing working well on os 9.

The easiest route is to download the .sit file with the built app and launch it. If you are a dev yourself I also have the codewarrior files up, as well as the projects files and source code.

Anyway, it's come a very long way! It started with a simple white browser window that displayed text and at this point I have about 150 CSS properties consumed in layout, a complete ES5 engine, five image formats, and real cooperative-multitasking networking.


bannerlogo.png
 
The preliminary alpha release is currently live on my github. I don't want to spam the forum but the app is called MacSurf and you should be able to find it.

It's very alpha but it is a working application and I am working many hours a day to implement all the CSS quirks and requirements to get this thing working well on os 9.

The easiest route is to download the .sit file with the built app and launch it. If you are a dev yourself I also have the codewarrior files up, as well as the projects files and source code.

Anyway, it's come a very long way! It started with a simple white browser window that displayed text and at this point I have about 150 CSS properties consumed in layout, a complete ES5 engine, five image formats, and real cooperative-multitasking networking.


View attachment 2631531
This is awesome! My current OS 9 portable (a Pismo) is currently undergoing open heart surgery (IDE ribbon replacement) but you best believe this'll be my first to-do when she's in working order again.

Have you posted about this on the MacOS9Lives forum as well? They'd be a definite avenue of insight.
 
  • Like
Reactions: Appleuser201
The preliminary alpha release is currently live on my github. I don't want to spam the forum but the app is called MacSurf and you should be able to find it.

It's very alpha but it is a working application and I am working many hours a day to implement all the CSS quirks and requirements to get this thing working well on os 9.

The easiest route is to download the .sit file with the built app and launch it. If you are a dev yourself I also have the codewarrior files up, as well as the projects files and source code.

Anyway, it's come a very long way! It started with a simple white browser window that displayed text and at this point I have about 150 CSS properties consumed in layout, a complete ES5 engine, five image formats, and real cooperative-multitasking networking.


View attachment 2631531
This is really cool and a real step forward for the usability of Classic Mac OS. Dumb question, but would it be possible for this to load the YouTube mobile website in the future? Or even play videos? Or is that pushing it way too far?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.