Jump to content

Anyone want to do some Cuda development?


Recommended Posts

  • 68kMLA Supporter

We had a thread here in Hacks about cloning the CUDA a while back.   Nobody took up the project, but there was some good information in there, like the specific version of the Motorola microcontroller on which the CUDA is based -- internal memory/flash amount.   Also the fact that apparently the firmware stored in the built-in flash has been downloaded and is available for some versions of the CUDA.

Link to post
Share on other sites
On 3/5/2021 at 1:30 AM, Kai Robinson said:

Yep, I got hold of a load of them, and mounted it to an SOIC28 breakout board... 

 

Did the same a few weeks ago to debug something

 

Cuda.jpeg

 

Then I remembered none of the microcontrollers that I have around are 5V tolerant. What do we do ?

 

This is the thread, if I remember correctly

 

 

Link to post
Share on other sites
On 3/7/2021 at 4:03 AM, Kai Robinson said:

@demik How about getting some MC68HC908's? They're 5v tolerant and available in spades on UTSource :)

 

I can get a few from my usual reseller as well. Looks like they are still produced by NXP. I can get MC68HC705 as well which is closer to an 68HC05 and in PLCC format

 

Don't wee need a special programmer for theses ? I did some 68HC11 20 years ago and remember we had a special board to program them

 

Edited by demik
Link to post
Share on other sites

BTW, Cuda usually comes with a small 8pin IC that is responsible for powering the MCU by switching either to the mains or the battery power.

The IC in question is marked with the Apple logo and contains the following digits: '90 0120'.

AFAIK, this IC was never identified. It can also be an ASIC. I saw it pretty much in every board that uses Cuda/Egret.

I started an identification effort for it long time ago: https://www.badcaps.net/forum/showthread.php?t=70732

 

It would be interesting to decap this thing to see what's inside :mrgreen:

 

I attached a picture of this mysterious IC from my PowerMacintosh 6100 board. I know Quadra's use it as well.

Cuda 0120 power IC.jpg

Edited by powermax
Link to post
Share on other sites

Present in most models using the Egret/Cuda chip if i am not wrong  (for sure in the Classic II, CC) when i remove the Egret for cleaning i remove this one also, both are contaminated by goo at the same rate.

Link to post
Share on other sites
22 hours ago, techknight said:

I thought the 0120 was a voltage reference/op-amp. But ive been wrong before. 

 

It's surely a sort of voltage sensing IC. I've just looked into the Bomarc schematics for other 68k Macs. IIsi, for example, uses a MC34064 instead of 0120.

 

Macintosh Classic II also has a 0120. Its Bomarc schematic says a little bit more about this chip: U12 (0120) LG1170

By the looks of things, it has the same pin layout as the IC of interest.

Unfortunately, a web search for "LG1170" revealed nothing helpful. The closest IC could be LT1170 but the pin layout doesn't match.

Edited by powermax
Link to post
Share on other sites
  • 68kMLA Supporter
Posted (edited)

https://www.onsemi.com/pdf/datasheet/mc34064-d.pdf does that look right?

It looks like the right part - in the MC68HC912 datasheet, it specifically references this part, stating:

 

It is important to use an external low-voltage reset circuit (such as
MC34064 or MC34164) to prevent corruption of RAM or EEPROM due
to power transitions.
The reset sequence is initiated by any of the following events:
• Power-on-reset (POR)
• COP watchdog enabled and watchdog timer times out
• Clock monitor enabled and Clock monitor detects slow or stopped
clock
• User applies a low level to the reset pin

 

Edited by Kai Robinson
Link to post
Share on other sites

@Kai Robinson Unfortunately, no. MC34064 has only 3 meaningful pins while the Cuda companion IC requires six/seven connections. It looks like pin 4 is GND while pin 8 is VCC. None of the small voltage regulators I saw so far have the same pin configuration.

 

I attached two related excerpts from the mentioned Bomarc schematics for your reference.

 

23 hours ago, techknight said:

youll probably have to decap it. 

 

I wish I could do that! After reading some HackDay's tutorial about chip decapping I decided not to do that at home :shocked:

0120 Egret power IC Mac Classic II.png

0120 Cuda power IC Qudra 840av.png

Link to post
Share on other sites

@Kai Robinson It surely differs on different machines. The latest 68k Macs as well as the earlier PowerMacs seem to use that mysterious IC.

20 hours ago, Kai Robinson said:

they started off using an off-the-shelf part, and then repackaged it to make it proprietary, as Apple was famous for doing...

Well, let's hope it turns out to be an off-the-shelf part.

Link to post
Share on other sites
  • 2 weeks later...

Almost related: does anyone knew what's the CUDA/ADB polling rate ? Does the CUDA poll by itself or does the ADB Manager do it ?

 

I'm trying to poll ADB devices at 100Hz and not getting an answer when I should. 

Edited by demik
Link to post
Share on other sites
  • 68kMLA Supporter
Posted (edited)

Not sure if this is useful to you as I don't know off the top of my head for CUDA, but on the SE and other machines of that era, ADB is polled approximately every 11 ms. So not quite your 100 Hz. If it didn't change for CUDA then that could explain it.

Edited by anthon
Link to post
Share on other sites
On 3/21/2021 at 5:27 PM, demik said:

does anyone knew what's the CUDA/ADB polling rate ? Does the CUDA poll by itself or does the ADB Manager do it ?

 

The default polling rate for the ADB bus is 11 ms = 1/90. It's usually set during MacOS startup by issuing the CUDA_SET_AUTOPOLL_RATE (0x14) command to CUDA.

CUDA is responsible for polling the ADB bus at the specified rate. It's called autopolling in the MacOS jargon. Autopolling is started and stopped using the CUDA_START_STOP_AUTOPOLL(0x1) pseudo command.

The polling algorithm in the CUDA firmware differentiates between the most recently used device (MRU device) and the least recently used device (LRU device). By default, the MRU device is the mouse while the LRU device is assumed to be the keyboard.

In the context of the ADB bus, CUDA is the bus master while all other devices on the bus are the slaves.

When autopolling is enabled, CUDA will poll the MRU device (mice) first. If another device has some data to send, it needs to assert the service request (SRQ) signal to drag CUDA's attention. In this case, CUDA will try to poll the LRU device (keyboard) first. If the SRQ comes from some other device, CUDA will walk through the list of attached devices and poll each device in this list one by one. At the end, the MRU/LRU list will be updated to reflect recent bus activity.

Edited by powermax
Link to post
Share on other sites
22 hours ago, anthon said:

Not sure if this is useful to you as I don't know off the top of my head for CUDA, but on the SE and other machines of that era, ADB is polled approximately every 11 ms. So not quite your 100 Hz. If it didn't change for CUDA then that could explain it.

 

19 hours ago, powermax said:

 

The default polling rate for the ADB bus is 11 ms = 1/90. It's usually set during MacOS startup by issuing the CUDA_SET_AUTOPOLL_RATE (0x14) command to CUDA.

CUDA is responsible for polling the ADB bus at the specified rate. It's called autopolling in the MacOS jargon. Autopolling is started and stopped using the CUDA_START_STOP_AUTOPOLL(0x1) pseudo command.

The polling algorithm in the CUDA firmware differentiates between the most recently used device (MRU device) and the least recently used device (LRU device). By default, the MRU device is the mouse while the LRU device is assumed to be the keyboard.

In the context of the ADB bus, CUDA is the bus master while all other devices on the bus are the slaves.

When autopolling is enabled, CUDA will poll the MRU device (mice) first. If another device has some data to send, it needs to assert the service request (SRQ) signal to drag CUDA's attention. In this case, CUDA will try to poll the LRU device (keyboard) first. If the SRQ comes from some other device, CUDA will walk through the list of attached devices and poll each device in this list one by one. At the end, the MRU/LRU list will be updated to reflect recent bus activity.

 

Thanks to both of you. I looked around and some people are using a 83Hz rate (12ms)

I will take the 11ms (90Hz) as the correct value. (On a side note I tried a 20ms (50Hz) polling and it was working somewhat well)

 

So were I'm at : do you see an easy way to start the CUDA autopolling without a mac behind it ? (On a breadboard like @Kai Robinson and myself)

Link to post
Share on other sites
19 hours ago, demik said:

do you see an easy way to start the CUDA autopolling without a mac behind it ?

 

You need to simulate the CUDA communication protocol to achieve that. The whole task boils down to programming a FSM. It is surely doable and was modeled in software several times.

How easy it's going to be depends on the hacker's skills ;-)

Edited by powermax
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...