• Hello MLAers! We've re-enabled auto-approval for accounts. If you are still waiting on account approval, please check this thread for more information.

Macintosh 68060 Redux

I would agree that I don't see a future in largescale adoption of anything 060 based but the reality is any project I choose to work on is for my own edification first, and happily there's not a requirement for it to be practical or result in a final usable "product". It's educational to me and it's fun to get answers to the 3 + decades of speculation on the topic.
Thank you for putting in this work. There's a bunch of us that have been speculating on this topic since the 040 was announced to be EOL, and then even more after the Amiga successfully ran Mac OS on an 060. Having hard data to put behind all the "what if"s is extremely gratifying.

And thanks for going above and beyond building it for yourself and actually sharing the results!
 
Amazing stuff!

Can someone with a bit more chip-level knowledge explain to me why nobody has put a PiStorm into a classic Mac yet?

https://github.com/captain-amygdala/pistorm

If there are problems with the ISA or something, they're much much easier to tweak here. It already works in multiple models of Amiga, including both 68000 and 68020, and there's at least one effort to get it working in the Atari ST...

 
Can someone with a bit more chip-level knowledge explain to me why nobody has put a PiStorm into a classic Mac yet?

Last I heard there were some bugs preventing it from working, and the rest is just that the set of people who have enough expertise to make it work aren't really interested in doing so, whereas the people who want to make it work don't have the expertise to do so. I don't think there's any theoretical barrier, it's just not seen as particularly interesting.

(Also, hello! We used to hang out on the FreeGEM mailing list together)
 
I would echo what @cheesestraws said. For me, while Pistorm is an interesting technical achievement I have no interest in that approach.

Someone was trying to make Pistorm work in a 68000 Mac of some flavor but it suffered from major timing issues as the 68000 macs all require fairly tight timings for sound floppy and SCSI to work correctly. Past those issues lack of color quickdraw and other architectural limitations of the 68000 ROMs really limit what you can actually do. AFAIK pistorm only implements the 68000 bus interface so you couldn't easily put it in a more expandable 020/030/040 machine. Additionally, the 68020+ macs require MMU which was either not fully implemented or there was some issue with the implementation.
 
The Pistorm has software bugs on the Amiga as well when you use all the options.

Unless you had an Amiga 3000 or 4000 there was no MMU, and on those machines it is included in the 68030/040 CPU itself.

Amiga OS doesn't support virtual memory which needs MMU.
 
Even on Amiga I believe PiStorm tracks the program counter to see when the system is running ROM regions that are timing sensitive and slows operation.

To my knowledge that's never really been fully worked out on Macs, and unlike Amiga which only has a handful (relatively) of active ROMs due to a small machine matrix, Macs have many. That's even more work.

Mac accelerator cards do that (see all the problems with sounds playing at the wrong speed for instance), but those are relatively machine-specific too and were worked out across many years and many companies. Even an '040 clock doubler can run into trouble.

All this is, I assume, one of the challenges with a general '060 solution as well.
 
Even on Amiga I believe PiStorm tracks the program counter to see when the system is running ROM regions that are timing sensitive and slows operation.

To my knowledge that's never really been fully worked out on Macs, and unlike Amiga which only has a handful (relatively) of active ROMs due to a small machine matrix, Macs have many. That's even more work.

Mac accelerator cards do that (see all the problems with sounds playing at the wrong speed for instance), but those are relatively machine-specific too and were worked out across many years and many companies. Even an '040 clock doubler can run into trouble.

All this is, I assume, one of the challenges with a general '060 solution as well.

I figured they were doing something like that. It would probably be doable to do for the 68000 ROMs given the ROM Maps. This is how the original Interware Booster for SE/30 fixed timings for the SWIM and chime routines too; it inhibited cache for certain regions where the hardware was touched forcing execution speed to more-or-less be similar to the stock CPU. Booster V2 takes a similar approach to Daystar accelerators by adding additional wait states in hardware instead.

I am curious where you've run into timing issues with the native 030 and 040 machines though. In my experience only the early 68000 and Mac-II (II,IIx,IIcx,SE30) machines still had timing sensitivities around execution speed, on anything later using the Universal ROMs they controlled for speed in the sensitive routines. I've not had to touch the ROMs to deal with timing for either the 060 or my 040 at 50mhz(+) in prototype accelerators.

But on an Amiga you could have a 68060,.. and a modern-ish GPU: https://gist.github.com/fifteenhex/0e5ce8c1614bcec20ed242045c11d1d9 ;)

I think though you don't need to really fix the whole of Mac OS for running Linux. If you can get enough to run EMILE that would be enough to load linux.

Without turning this into a thread dunking on Amiga, for my part I'll say while it's interesting what the Amiga community has pushed those machines to do it's not my personal cup of tea. I like to keep things "plausible" for the period so vintage designs are my preference.

As we know Motorola missed their market window dooming the 68060 to a fate of running industrial and embedded systems. There was never a workstation product AFAIK with one inside leaving us to invent one ourselves using an 040 machine as a base. Amiga is out; the architecture of their 040 machines is terrible as a native 68030 system with an 040 bus adapter. NeXT is native 040 but requires a new 060 bus adapter due to multiplexed bus; out (for now). This leaves Mac as the other big 040 platform. Apple really did quite an excellent job with the Wombat (Quadra 650) architecture and it addressed many of the weaknesses of the earlier Mac designs so I believe would be no need to update the architecture for a 060. So that's the thesis for this project: Stick an 060 in a Wombat and we have a reasonable facsimile of what a period 68060 workstation might have looked like.

At first I wasn't intending to even get EMILE working: I was working at initializing the hardware myself and handing over to a kernel in ROM. I underestimated that and it turned into a bit of a mess so I pivoted to helping the Mac ROM enough to initialize DRAM and framebuffer instead. By the point I achieved that, SCSI nearly worked, so I fixed that and then it'd boot almost all the way into finder .... I couldn't help poking at it a bit more...

This is why I'm trying to be very clear about not intending to finish, though: as long as it's interesting to me I'll keep poking at tweaks to support Mac OS but I don't need it to get any farther for my goals.
 
Even on Amiga I believe PiStorm tracks the program counter to see when the system is running ROM regions that are timing sensitive and slows operation.
Apple IIgs accelerators do the same thing. Any time something hits the I/O range of the memory map, its back to 1Mhz since its all timing sensitive.
 
I am curious where you've run into timing issues with the native 030 and 040 machines though. In my experience only the early 68000 and Mac-II (II,IIx,IIcx,SE30) machines still had timing sensitivities around execution speed, on anything later using the Universal ROMs they controlled for speed in the sensitive routines. I've not had to touch the ROMs to deal with timing for either the 060 or my 040 at 50mhz(+) in prototype accelerators.
Hmmm, good point about later ROMs. Besides the novelty of PiStorm from an engineering perspective, it's not been interesting enough for me to tinker with one in an 030+ so I've never tried to fit one. Given it doesn't drop-into the socket, I bet no one else has either. The Mac being a real workstation unlike the half-baked Amiga 3000s and 4000s really makes the extras (network support, better storage, etc) just less needed from a feature perspective too.
This is why I'm trying to be very clear about not intending to finish, though: as long as it's interesting to me I'll keep poking at tweaks to support Mac OS but I don't need it to get any farther for my goals.
If it's not a passion project, no reason to do it. I'm only here to understand old hardware internals and make it do stuff it was never meant to, this is already a great read!
 
Hmmm, good point about later ROMs. Besides the novelty of PiStorm from an engineering perspective, it's not been interesting enough for me to tinker with one in an 030+ so I've never tried to fit one. Given it doesn't drop-into the socket, I bet no one else has either. The Mac being a real workstation unlike the half-baked Amiga 3000s and 4000s really makes the extras (network support, better storage, etc) just less needed from a feature perspective too.

If it's not a passion project, no reason to do it. I'm only here to understand old hardware internals and make it do stuff it was never meant to, this is already a great read!
Yep, that is a large part of why I think the wombat is a good example of a hypothetical 060 workstation, above and beyond its known competence as a Mac OS / AUX system.

A native 040 bus with interleaved RAM, a fast and high resolution framebuffer, DMA-based SCSI and Ethernet combined with a good set of IO and even expansion slots. If it was in a pizza box it'd be indistinguishable from contemporary unix workstations, I think.
 
There is a PiStorm32 for the 68020 based Amiga 1200. So far a version for the 3000/4000 CPU slot hasn't appeared.

And it's brilliant, one of the best an affordable upgrades you could get for an Amiga 1200. There are PiStorm variants for most other Amiga models below the A1200.
 
On top of timing, and different use of esoteric m68k'isms between the two:

Targets: There are very few actually different Amiga hardware models (even the 500 and the 2000 are almost identical, even if looking radically different), similarly fewer (and very clear) rom versions. Whereas even Macs that look similar have radically different hardware, and, for a while, every model had their own rom.

Connector: On the 500/2000 it physically replaces the 8 mhz 68000 chip, on the 1200 it uses the equivalent of a PDS slot. There has been some "success" getting a pistorm to work on 68000 based macs like SE's, but for all others you'll want to use a PDS (which, again, is radically different on different models) or something like a bus mastering nubus card. Not a lot of knowledge/people making Mac cards these days. Or, if you wanted to sit in the 030 or 040 socket (for macs WITH sockets), you'd need a completely new design...it wouldn't physically fit in the case, etc etc.

Apathy: Apple users got PowerMacs which, out of the box pretty much "are Macs" with a better CPU, but with seamless compatibility and excellent emulation. An m68k Mac with a PiStorm wouldn't be much different than that, if you think about it. Whereas PowerPC came to Amiga only in...very strange ways...in no way seamless, I'm simplifying, but there never was a "PowerAmiga", instead basically powerpc coprocessors on a card, or powerpc machines with no legacy amiga hardware at all. There were vast numbers of 500's and 2000's out there, using slow 8mhz 68000's, so a huge market. Most m68k mac users had far faster 030's, or just got powermacs and were satisfied.
 
Well, I figured out the branch prediction cache issue. Turns out my 060s just can't deal with 66mhz with BC on; it's the straw that breaks the camel's back. Going to 50mhz clock and it just worked. D'oh.

Here are some new benchmarks. This is also with interleaved RAM. Oddly, the 060 is notably worse at bus access for some reason. Possibly a bug as it shouldn't be any slower.

68060 25mhz bclk w BC ILV.jpg

I did some quick doom benchmarks either. Drumroll please;

040@25mhz - 10.4 fps
060@50mhz superscalar+no branch prediction - 12.4 fps
060@50mhz superscalar+branch prediction - 14.3 fps
040@40mhz - 16 fps
060@66mhz superscalar+no branch prediction - 16.4 fps
060@66mhz superscalar+branch prediction - ??? fps

... it's just that badly optimized. This is a small window and low detail also. Still, it's clear the branch cache is very beneficial. My best guess is doom is extremely memory bandwidth bound currently and is likely thrashing internal caches.
 
Last edited:
We really need a better DOOM port for 68k. I can't believe how terrible it runs, even on the fastest 040 machines (and now this).
Even Wolfenstein 3D for Mac doesn't run super great on 68k Macs, and that's a game that runs on 386s on the PC side.
Seems they both had too much focus on PowerPC optimization.
 
Back
Top