Top
Best
New

Posted by zdw 5 hours ago

Advanced Mac Substitute is an API-level reimplementation of 1980s-era Mac OS(www.v68k.org)
117 points | 23 commentspage 2
azinman2 4 hours ago|
This is quite the feat. I’d love to know more about the process to make this, the motivation, how much time was spent, etc.
whartung 4 hours ago|
I'm guessing they reimplemented the toolbox at the TRAP level (most MacOS calls at the time were accessed through the 68K TRAP instruction).

So, rather than emulating hardware to run native ROMs, they "simply" reimplemented the ROMs.

A friend of mine did this at another level. He basically rewrote the bulk of the toolbox as a C library so that the company, who had a Mac application, could port it to run on a PC, while sharing the source code.

This was before Windows, and it worked! Launched it from DOS, takes over the entire screen. He didn't copy the Mac look and feel. Instead he used OpenLook for his gadgets and what not (since it was, you know, "open").

But he rewrote the bulk of it: QuickDraw, Event Manager, Memory Manager, Window Manager, etc. Just ate it like an elephant. I don't think his regions were as clever as the Mac. Pretty sure he just stuck with rectangles.

jjuran 39 minutes ago||
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.

hagbard_c 3 hours ago|

   make ams-vnc
   ./build.pl -i exhibit graft skif minivx xv68k freemountd listen vnc-interact

   ...

   Daemon starting up... done.
   T=0.037s  ERROR:    OpenDF is unimplemented

Hm, doesn't seem to work. Let's try the X11 version:

   make ams-x11
   ./build.pl -i exhibit graft skif minivx xv68k freemountd interact-x11

   ...

   T=0.275s  ERROR:    OpenDF is unimplemented
Nope, it seems to be missing something. OpenDF? All I find is this: https://github.com/PrjEnt/OpenDF, a long-abandoned project which seems to be a more compact version of another abandoned thing.
Someone 3 hours ago||
I think they mean FSpOpenDF (https://dev.os9.ca/techpubs/mac/Files/Files-53.html#HEADING5...), a (relatively) late addition to the Mac API.
jjuran 1 hour ago||
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.

jjuran 1 hour ago|||
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?

ksherlock 3 hours ago||
OpenDF is a MacOS toolbox call (which is apparently not implemented)
hagbard_c 2 hours ago||
Strange it errors out on given that I assume the thing does run elsewhere. The X11 version sometimes shows the opening screen but any attempt at interaction leads to the mentioned error. The VLC version shows the error directly.
jjuran 59 minutes ago||
Any interaction with the Welcome application terminates it. Try setting AMS_APPNAME=Tic-tac-toe in the environment, or AMS_APPNAME="Nyanochrome Cat".
hagbard_c 40 minutes ago||
Yes, that works, the tic-tac-toe thing appears and remains even though the error message regarding OpenDF is shown. In other words that error message can be ignored, at least as long as whatever is in AMS_APPNAME does not require whatever OpenDF provides.