jjuran
I highly doubt this will ever happen. It seems like Apple is trying to avoid any association at all with classic Mac OS, even to the point of declining to go after folks hosting system software or ROM images, or even leaked ROM source code... on GitHub!
Even in the case of QuickDraw, whose source was published by the Computer History Museum, it's under a non-free license — so it wasn't quite released, but merely exhibited. (If you're unclear on the difference, ask any resident of a zoo.)
In the meantime, my own work-in-progress reimplementation of Mac OS is dual-licensed AGPL/commercial. The goal is to run classic Mac applications on commodity hardware.
An AI trained on leaked Apple ROM code?
> and that is a way to rework the OS.
What you do on your own machine is your business, so have fun with that. You can't legally share it, though.
RegisterEventHotKey() is available "in CarbonLib 1.3 and later" according to Universal Interfaces.
My own emulator (Advanced Mac Substitute) can run Spectre Challenger, by the way.
UI-level Carbon is gone, but various low-level APIs persist.
You'd lose compatibility with the applications, though, so you'd have to decompile and rework those as well. And even if you did, you couldn't legally distribute any of it.
An alternative approach is high-level emulation. Running a separate instance per application gives you process isolation (via the host OS) for free.
> I assume booting an OS with a mere few megabytes of RAM footprint would only take milliseconds?
I haven't measured it as such, but yes.
You're mistaken.
> MacOS 9 [had] no preemption
Classic Mac OS has had vertical retrace (VBL) interrupts since System 1.0 (which are a form of preemption). But suppose we disregard that.
>> MacOS 9 had a preemptively scheduled kernel.
The GP is correct. Applications run cooperatively within the Blue task, but the Blue task itself runs preemptively with other MP tasks (which an application can create).
At first, I flipped through the book looking at the Escher prints. My second time through, I read the dialogues. Next I had a go at reading the chapters and got lost. Maybe on my fifth read-through (years later) I actually attained an understanding of Gödel's Theorem (at least for a brief moment before it vanished again).
I credit GEB (and its dialogues like Little Harmonic Labyrinth) for helping prepare me to deal with the kind of multi-level abstraction involved in developing a language interpreter or machine simulator. Especially that time I had to debug a crash that only occurred when running my simulator inside a simulated instance of itself (i.e. when three levels deep, but not two).
> We considered creating a plugin that fixed all these things, it would have been hard to maintain, in the end we travelled around to the people who made these apps and talked them through their problems
Since talking to developers is no longer an option, I actually do write "Such-and-such Tune-up" extensions that patch applications dynamically to make them run better (or at all) in Advanced Mac Substitute, or even Mac OS itself.
Decades later, though, emulation performance is mostly a non-issue (and even improves automatically with faster hosts). What matters now is portability (which requires ongoing maintenance) and renovation of programs designed around having the CPU to themselves (via dynamically applied patches).
The call is coming from within the OS!
It's familiar and alien at the same time, like I'm seeing an alternate universe.
I made my own web-based Mac simulator some time ago: https://www.metamage.com/apps/maxim/
It was a way to become more familiar with CSS and JS (and indulge my classic Mac OS nostalgia), but my biggest takeaway was that the web wasn't a foundation I wanted to build complex structures on, and indirectly helped spur me to create Advanced Mac Substitute.
The irony is not lost on me. :-)
The front end deals with displaying graphics and forwarding user input to the back end. Working front ends include SDL2 (by a contributor), X11, Linux fbdev, VNC, and five different macOS APIs (Cocoa/OpenGL, CGL, AGL, Quartz, and QuickDraw).
The front and back ends communicate using FIFOs and shared memory. I'm aware that certain platforms will require refactoring all of this to run in a single process. If Emscripten is one of them, then it won't be as simple as you suggest.
In any case, if I were the one doing the port, I might write a bare-bones front end just for this purpose, possibly using the fbdev one as a starting point.
For example, check out the MacPaint demo:
https://www.v68k.org/advanced-mac-substitute/demo/MacPaint-A...
If you were to double-click the Hello document in macOS' Finder, it would launch and open in MacPaint.app.
`TRAP` is a different instruction, with opcodes `$4E4x`. Each one gets its own exception vector.
It's not just trap calls, though — sometimes applications write directly to the sound buffer or use hardware page flipping.
You clipped the part that said "Starting VNC server on 127.0.0.1:5900". Did you try connecting a VNC client?
Some applications call `OpenDF()` without checking its availability, but fall back to `FSOpen()` or equivalent if `OpenDF()` returns `paramErr`, which is what the parent is witnessing. See `68k/modules/ams-fs/Files.cc` in the `metamage_1` repo.
If the error message is confusing people, maybe it's time to implement `OpenDF()` for real.
In MacRelix (a POSIX-like environment for classic Mac OS), when a process calls fork(), the system allocates backup memory regions for it and its child. Whenever one of them is switched in after its counterpart was the last of the two to run, the old one's regions are backed up and the new one's regions restored.
"Unfortunately [the Blue Box] was only available on PowerPC versions of Rhapsody"
Another option is Advanced Mac Substitute. It doesn't run everything, but what it does run it runs really well. One of my goals is that you can use a 68K Mac application (e.g. MacPaint) as part of your personal computing workflow, if you wish.
ravynOS is moving to Darwin.
I do appreciate Alan Kay's thinking, in particular his talk "Normal Considered Harmful" <https://www.youtube.com/watch?v=FvmTSpJU-Xc>
My own high-level language, Varyx, has somewhat LISPy internals and is very dynamic — for example, you can annotate a variable with a type that's determined only at run time — and has an eval() that insulates the caller from the payload and vice versa. You can sequester mutable state within a closure, which can't be cracked open. Using an experimental Varyx build with some bindings for Apple's Core Graphics API, I wrote a script that rendered an arrow cursor (which I donated to the ravynOS project).
Perhaps we should talk. :-)
<https://github.com/jjuran/metamage_1/blob/master/mac/toolcha...>