News for hackers. Stuff that matters.

jjuran

Re:Infinite Mac: BeOS on Saturday October 31, 2026 @09:38PM (#50321983)
> Classic MacOS remains proprietary. ... Pity. I'd hope that some day Apple might release whatever source it still has.

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.

Re:Infinite Mac: BeOS on Saturday October 31, 2026 @08:11PM (#50321530)
> The AI know this too,

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.

Re:My favourite PowerMac is a Nintendo Wii on Saturday October 31, 2026 @09:10AM (#50315874)
"CarbonLib" implies Mac OS 9 (or 8) — it's the classic Mac OS implementation of the Carbon API. The OS X implementation is Carbon.framework (or more precisely, various frameworks under its umbrella).

RegisterEventHotKey() is available "in CarbonLib 1.3 and later" according to Universal Interfaces.

Re:Infinite Mac: BeOS on Saturday October 31, 2026 @08:17AM (#50315432)
It's totally fair to disagree about whether Mac OS 9 meets the stated requirements. I just don't think it's reasonable to assert that GGGP (who may have made unwarranted claims about OS 9) was actually confusing OS 9 with OS X.
Re:My favourite PowerMac is a Nintendo Wii on Saturday October 31, 2026 @07:53AM (#50315218)
What do you find lacking in the emulators? I don't mean to suggest that they leave no room for improvement — I'm asking how to improve them.

My own emulator (Advanced Mac Substitute) can run Spectre Challenger, by the way.

Re:My favourite PowerMac is a Nintendo Wii on Saturday October 31, 2026 @07:29AM (#50315056)
NewPtr() and Delay() date back to System 1.0, and they're still present in macOS 14, at least.

UI-level Carbon is gone, but various low-level APIs persist.

Re:Infinite Mac: BeOS on Saturday October 31, 2026 @07:16AM (#50314958)
> At this point, they could likely decompile MacOS classic and rework it to give it modern memory protection, virtual memory, preemptive multitasking, and networking.

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.

Re:Infinite Mac: BeOS on Saturday October 31, 2026 @06:46AM (#50314787)
> You are describing attributes of the NeXT-based OS X but calling it MacOS 9.

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).

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

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

Re:Douglas Hofstadter: Analogy as the Core of Cognition [video] on Thursday September 10, 2026 @04:42PM (#49649917)
One of my elementary school classmates brought printouts of Escher's Waterfall to share. I accepted one, took it home, and taped it to my bedroom wall. My father saw it and loaned me his copy of Gödel, Escher, Bach.

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).

In my 68K Mac emulator running on modern (or even decade-old) hardware, performance in the traditional sense is less of a concern, but other issues arise. The big ones include CPU-burning loops that wait for a length of time or for an interrupt-decremented counter to reach zero, as well as invalid memory accesses (which I've made crash — no NULL deref for you).

> 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.

I knew of Executor, but never saw it in action. Winning back performance lost to emulation was critical when competing with contemporary real hardware, and kudos to ctm and ARDI for their clever solution.

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).

A Mac 512K of sorts was already built before the Macintosh introduction at the 1984 shareholders meeting — the demo wouldn't run in 128K of RAM.
Funny you should bring up MacRelix — the very first front end for Advanced Mac Substitute was built in it.
Re:Dark Castle on Sunday April 12, 2026 @03:05AM (#47736868)
The latter. There's only one heavy drinker in Dark Castle, and it's not the hero. ;-)
It's not you; it's me. My implementation of LoadScrap() (which is called at startup) is calling FSOpen(), and it turns out the glue code for that tries OpenDF() before falling back to PBOpen(). TIL.

The call is coming from within the OS!

You want to talk trap patches? Your Mac's INITs have minimal trap patches, touch the Toolbox in boring places like SysBeep() and GetNextEvent(). The Developator's Mac has big, tricky INITs with trap patches that hook into half of the Device Manager.[1] The Developator is in touch with the metal, starts like a warm boot off the ROM reset vector, stops on an NMI.

[1] See https://www.macrelics.com/legacynth/

A Genesis has to start somewhere. ;-)
Oh wow. Once I saw the smiling machine and empty progress bar, I went straight to NoScript and enabled your domain without a moment's hesitation — highly unusual for me. It's charming! I laughed out loud when I saw your screen-saver.

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.

My earliest recollection of what motivated me is a desire to resurrect The Fool's Errand.

The irony is not lost on me. :-)

Advanced Mac Substitute uses a factored approach. 68K emulation happens in the back end, which is a collection of processes connected by Unix-domain sockets, portable to basically any POSIX system.

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.

Advanced Mac Substitute stores documents and preference files in sandboxed host directories.

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.

Correction: 68K Mac OS calls were A-line traps — in other words, they had opcodes of the form `$Axxx`. To the processor, they're unimplemented instructions that each take an exception through the same vector. The exception handler is the Mac OS trap dispatcher.

`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.

Any interaction with the Welcome application terminates it. Try setting AMS_APPNAME=Tic-tac-toe in the environment, or AMS_APPNAME="Nyanochrome Cat".
Ah, yes, the two front ends I haven't touched in years. This should be fun. :-)

You clipped the part that said "Starting VNC server on 127.0.0.1:5900". Did you try connecting a VNC client?

The FSSpec calls added in System 7 are mostly new interfaces to existing File Manager functionality. There's an actual high-level `OpenDF()` call, which is like `FSOpen()` except that it won't try to open a driver when the name begins with `.`.

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.

Re:Linear Address Spaces: Unsafe at any speed on Tuesday January 06, 2026 @03:52PM (#46518532)
Implementing fork() without address translation is possible — it's just expensive.

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.

Re:System 7 natively boots on the Mac mini G4 on Saturday November 29, 2025 @10:47AM (#46088414)
Rhapsody DR2 is not a solution for classic Mac OS on x86. Lunduke writes:

"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.

https://www.v68k.org/ams/

Re:New OS aims to provide (some) compatibility with macOS on Friday November 21, 2025 @03:02AM (#46002265)
You're in luck: <https://github.com/ravynsoft/ravynos/discussions/529>

ravynOS is moving to Darwin.

Re:New OS aims to provide (some) compatibility with macOS on Friday November 21, 2025 @01:49AM (#46001886)
If you're okay with a System 6 appearance, I've already made one <https://github.com/jjuran/metamage_1/tree/master/68k/modules...>, for Advanced Mac Substitute <https://www.v68k.org/ams/>.

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. :-)

I hate to disappoint you, but the canonical way to clear a 68K address register is `SUBA.L An,An`. My asm-coded replacement for the Metrowerks code resource runtime uses it:

<https://github.com/jjuran/metamage_1/blob/master/mac/toolcha...>

Older »