cy384

hardware / software / wetware

the ultimate centris 650

I've been getting into software development for the classic Mac OS, and wanted a pre-PowerPC machine to play with. The Centris 650 (or the slightly later Quadra 650) is one of the last machines of the era, but also cheap, expandable, and hackable. As a bonus, it's capable of running the final version of A/UX. This page will document its current state, link reference material, and track plans for further work.

You can find some code, instructions, and technical minutia on github.

filename

overclocking

The Centris 650 runs a 68040 at a wimpy 25 MHz (or, if you're unlucky, a 68LC040 with no FPU). Mine came with a XC68040HRC25M, mask revision E31F, a 1993 chip manufactured on a 0.8um process, rated for 25 MHz. If we want to overclock, ideally we want a fastest-rated, latest-revision chip. Since the 68040 was sold from 1989 to 2005-ish, it underwent many updates and die shrinks; the final one, which runs the coolest with the most headroom, is the L88M mask revision. Unfortunately, these are pretty rare (I blame the Amiga fans), and any you see on ebay are probably fakes (usually older, relabeled chips). I ended up with a 40 MHz MC68040RC40A, mask revision E42K from 1999. Swapping in the new chip is fiddly but straight forward.

filename

The clock speed is determined by the oscillator between the CPU and the closest Nubus slot, which is then multiplied by two. The stock part is a fairly large 4 pin plastic SMD at 12.5 MHz on 5V. It happens to have an enable pin, so it's trivial to disable by grounding. While I was buying parts for this project, an obscure item came up on ebay: a NewerTech MacClip Junior. It's an aftermarket clock generator that clips on top of the stock oscillator, with speed configuration via DIP switch. My particular model is labeled for the 800 and 804av, but it works fine on other Quadras. It also includes a cute heatsink with a tiny fan, though the stock heatsink is probably sufficient. I ran through the speeds and got the original chip running stably at 32 MHz. To get it going faster, we need a little more info about the motherboard.

filename

Fortunately, there was a healthy Mac overclocking scene in the late 90s, and this site contains a goldmine of information on how to approach each machine. There are a few interesting tidbits about the Centris 650, specifically about the oscillators and the motherboard. The Centris 650, Quadra 800, and Quadra 650 all used the same motherboard (the "WOMBAT") with apparently identical components, except for one resistor and a jumper. Normally this would be an irrelevant curiousity, but if you try to clock a Centris 650 past 33 MHz, peripherals stop working properly. Apparently the chipset decides the correct clock configuration based on the motherboard ID. We take advantage of this by "converting" the machine into a Quadra 650, which involves desoldering resistor R151 and mounting a 1.2K 0805 resistor at R152. After this, the new chip was solid at 44 Mhz.

filename

The clip is a convenient device, but feels very insecure, and I'm less than confident in its durability. Instead, I decided to solder a socket on top of the original oscillator, making it very easy to swap in faster ones. I've found 12.5, 16, 20, and 22 MHz oscillators to put in it, giving me a nice range for testing and stability. Boot time is way shorter, and my SSH client connects almost twice as fast.

But what if we want to go even faster?

rom hacks

To get really funky with overclocking, we need to mess with the ROM. Most Centris/Quadra 650's have an unpopulated ROM SIMM socket (but not all, some early models have a socketed ROM). To actually do anything, though, you'll need to add a socket and get a programmable ROM SIMM. Some options are the Garret's Workshop ROM, the Mac ROM-inator II, and the GGLABS MACSIMM (which I got). You'll also need a programmer, which is a pain (I got a TL866II+). I'd like to make my own ROM SIMM with onboard programming at some point.

filename

At some point in the late 90's, a copy of the Mac OS ROM source code was leaked. I'm really surprised that nobody has done anything interesting with this, because there's a ton of great detail about how the boot process works and how hardware operates; the classic Mac OS has a large chunk of the OS in ROM, so it's amazing to see the code (with comments!). I've done two little areas of hacking with it so far: increasing the RAM limit, and tweak timings for overclocking. My process is a little janky, but it's basically a partial white box disassembly of the Quadra 650 ROM, with chunks of the leaked code pasted in, then rebuilt.

ram

Officially, you can max out with four 32MB SIMMs, plus the 8MB of onboard RAM, for a total of 136MB. If you're unlucky, your Centris 650 may only have 4MB of onboard RAM, in which case you can look up the part number of the chips, hope they're available NOS on ebay, and solder them on. Mine has TI TMS44400DJ-70 chips.

However, 136MB would hardly be the ultimate 650. Fantastic hacker bbraun wrote some great documentation on his experiments and the exact configuration registers used, and managed to create a modified ROM that configures the djMEMC controller for 128MB per slot. His hack is very simple; it turns out that one bit in the config register for each RAM bank controls small (32MB and less) vs large (64MB) banks, so flipping that lets it map 64MB and 128MB SIMMs. Using his method I can boot nicely with 2x128MB+8MB, for a total of 264MB. With some shenanigans, I can also convince it to boot with 392MB. However, due to (I think) a bug with this little hack, it won't fill the last four banks properly. I want to rewrite the memory sizing code soon, and hopefully that's the only thing preventing a boot with the full 4x128MB+8MB. Even heavily commented, adapting 30 year old 68k assembly is quite difficult.

So if the memory controller could manage this much RAM, why didn't the ROM just do it? I found this comment in the code:

Hysterical Note:  (BG - 92 June 10)
The High-End HW team says that it is entirely unlikely that we'll
see 64MBit parts any time in the near future, and it's unlikely that
from power/voltage requirements that our boards would be able to
support them.  So instead of writing the Sizing code to make two passes,
one with bit 8 ZERO to check for 64MB banks, then a second pass for
non-64MB parts to see whether or not they are there, we simply assume
they are NOT there and set bit 8 front and make a single pass.

more overclocking

I spent a fair amount of time digging through the ROM code, trying to figure out what bits I could flip to get more headroom. It turns out there are a few settings for the RAM controller related to CPU speed, so I made those as fast as possible. This got it to boot and run very briefly at 50MHz... sometimes, with lots of video artifacts. It would boot at 48MHz slightly more often, and was stable at 46MHz. I also discovered that network hardware stops working above 45MHz, so you need to disable all networking related extensions. The video artifacts implied that the VRAM or other video hardware was too slow. With some more digging, I found code in the ROM that configures the number of cycles to wait for VRAM accesses. Cranking that all the way up gets me consistent booting at 50Mhz, though there are still video artifacts after a few hours of heavy usage. Maybe faster VRAM would help (60ns? hard to find), or maybe not.

Since networking (and probably other peripherals) stop working, it's not really practical for my purposes at 50MHz, so I'm considering this "complete", and will stay at 44MHz for normal usage.

the easy stuff

filename

For disks, I'm using the stock floppy drive (needs to be cleaned/lubed) and caddy-loading CD. Rather than a traditional hard drive, I've got a SCSI2SD v6, which is reasonably fast and unlikely to die suddenly. I designed a little 3D printed bracket to mount it onto the stock drive tray (files on github). I've tested out an enterprise SCA-2 15,000 RPM disk, which was faster and fun to listen to, but even that is fairly old, and I'd rather keep moving parts to a minimum. I don't think there's any more ultimate option than those two.

Display-wise, I'm using an Apple Multiple Scan 15 CRT. I wouldn't call it ultimate, but it's period-appropriate, adequate, and doesn't take up too much space. I also maxed out the VRAM at 1MB.

I've got an Apple Extended Keyboard II, arguably the best keyboard Apple ever made, and a matching Apple Desktop Bus Mouse II, which fucking sucks (not quite the worst Apple mouse, but only because Apple has always made awful mice).

For connectivity, I have an AAUI to 10BASE-T adapter, which does fine on a modern ethernet network.

the other stuff

The PSU fan is kinda loud, so I may replace that. Maybe even replace the whole PSU with something newer and more efficient.

There are a few additional (nonexistent) hardware improvements I'd like:

There's a project for a Nubus wifi card that I'm tentatively involved with, that would be neat to see. It should also probably be able to do bluetooth. The hardware may be a nice starting point for video, too.