Recreating the Mac's CUDA / EGRET microcontroller chips - can it be done?

Mac84

Administrator
Staff member
Founder
Sep 4, 2021
192
270
63
New Jersey, USA
www.mac84.net
Hello all,

As someone who repairs a lot of systems, the CUDA / EGRET microcontroller chip is one of those pieces that is getting harder and harder to replace. It would be amazing if these chips could be replaced by a modern solution so we can save more 68k / PowerPC Macs!

I was doing some digging the other day and only discovered that there has been some talk of this, but seemingly no solution. I know we have some smart cookies here... so maybe this is something this community can tackle? I know it probably won't be easy, but it would be amazing.

Here are some resources I've stumbled upon:
• A thread about the Motorola HC6805 hacking
• A tool used to dump the Egret chip (by running it on a Mac)
• A collection of ROMs, including some CUDA / EGRET files
• CUDA documentation
• Linux drivers for the Mac, including CUDA.

Definition of the CUDA chip:
A microcontroller chip that serves as the managing circuitry for the Apple Desktop Bus and the real-time clock. It oversees the power on and off of the system. It maintains the parameter RAM, better known as PRAM. It also manages and maintains information regarding all system resets from various commands. Examples of this are: keyboard restart, lose of power, software restart.

Pictured below, a very sad looking CUDA chip on my battery bombed Macintosh TV.

Screen Shot 2023-08-14 at 10.46.52 AM.png
 

SuperSVGA

Tinkerer
Mar 26, 2022
64
34
18
The ROMs aren't very hard to decompile, you could probably reverse engineer the entire thing and recreate it on something more modern. Picking a modern chip is the fun part, as you'll likely need to adapt it to fit the footprint.

I believe there's actually a third one as well, an Egret variation called "Caboose" that's supposedly in the Quadra 900. I don't have a Q900 to check though. It's likely nearly identical to Egret, unlike Cuda which has a different communications protocol.
 

mmu_man

Tinkerer
Jan 30, 2022
160
85
28
Last I looked at it, there was one HC05 chip that was supposedly still compatible with the original HC05E1 that Apple used that possibly could use the binaries as is. Haven't had the time to investigate any further. Seems UTSource (hmm, right… "used" OTP?) & octoparts still has some, but I never asked for a quote.
That could be a way to fill the gap until a proper replacement is designed.
 
Last edited:

mmu_man

Tinkerer
Jan 30, 2022
160
85
28
I looked at the disassembly on github mentioned on MLA, but it's really partial and only for one version.
I then looked at Radare2 to automate this but the 680x backend seems really unfinished, it even stripped the last character of each disassembly line… So this can take a while as I'll have to fix it first.
 

SuperSVGA

Tinkerer
Mar 26, 2022
64
34
18
It seems to work pretty good in Ghidra at least, most of the work is just matching functions up to pins to identify what the code is doing.

From what I've found so far it looks like the only difference between Caboose and Egret is the addition of control for the Quadra 900 (and 950?) key switch.
 

mmu_man

Tinkerer
Jan 30, 2022
160
85
28
Well it's the occasion to fix r2 as well.
Is the caboose one in the Mac_ROMs file? I only find 3 EGRET and 3 CUDA files in there.
Plus if I can find what I want we won't even have to recode this anyway.
 

SuperSVGA

Tinkerer
Mar 26, 2022
64
34
18
The Caboose file doesn't seem to be in that ROM set, and I think it's missing a few CUDA versions as well. 341S0853 appears to be what's on the Quadra 900's board.
 

mmu_man

Tinkerer
Jan 30, 2022
160
85
28
So, I had some things ordered from uncle ali, some arrived already. If other activities permit I might find the time to build a programmer. I also need to design a same-footprint SOIC-28 socket because those don't exist.
 

trag

Tinkerer
Oct 25, 2021
280
133
43
I believe that the 9S08 series is backward code compatible with the 68HC05. The pinout won't match, so an interposer board would be necessary, but it ought to be fairly straight forward to move the Egret/CUDA code to a new 9S08 from NXP. In theory...
 

mmu_man

Tinkerer
Jan 30, 2022
160
85
28
I've checked many schematics and compiled the pinouts, and this is just a myth, it's the exact same uC with the same pinout and just an Apple reference painted over. They just changed the function of some pin but that's it.
 
Last edited:
  • Like
Reactions: Mac84

SuperSVGA

Tinkerer
Mar 26, 2022
64
34
18
I guess there's also the CudaLite with PS/2 support, and whatever Cuda version was in the early iMac.
 

BigBadBiologist

New Tinkerer
May 9, 2022
5
13
3
Sorry to dig up an old thread, but I just wanted to post somewhere about some compatibility testing I did on EGRETs in a IIsi.
I came across two different chips in my IIsi systems: 341S0850 and 343S0100-01
The chip from a IIvx worked: 341S0851
The chip from an LC475 did not work: 341S0788
 
  • Like
Reactions: Mac84

mmu_man

Tinkerer
Jan 30, 2022
160
85
28
Well, it's not that old… incidentally someone prodded me into looking at it again this week-end, so…
 
  • Love
Reactions: Mac84

techknight

Moderator
Staff member
Dec 2, 2021
73
78
18
North Carolina
DosFox finally took the plunge and bought NOS chips, programmed them with the dumps and they do work. He has not provided any more details outside of that yet. Tons of NOS chips are available on ebay, but theres several variations.

The specific IC variation has not as of yet been reported.

I also saw he had to make a custom programmer to burn the PROM.

But, there is progress being made!
 

Attachments

  • IMG_3931.mp4
    1.3 MB · Views: 0
  • 20241018_121035.mp4
    2.9 MB · Views: 0