• Updated 2023-07-12: Hello, Guest! Welcome back, and be sure to check out this follow-up post about our outage a week or so ago.

PS2 Keyboard on Mac Plus

bbraun

Well-known member
Thanks! Yeah, using a modern mouse on the Plus is suuuper smooth in comparison to the original mouse.

As dougg3 found (and fixed, thanks!) the time it takes to reset the mouse can vary, and some take longer than the time I originally waited. This should be fixed in the subversion repository, but if it's working for you, all is well!

Since really only openocd is needed to program the adapter, and that's just an 'apt-get install openocd' away, would it be helpful to anyone to provide a script and firmware binary, to update their adapter? Or a full Linux VM?

In other news, it looks like the usb adapter boards have finally cleared customs (apparently reduced processing capacity due to shutdown or something), and should be here in the next couple days. The smaller, top mounted PS2 adapter boards have been shipped, although ETA remains uncertain with the whole customs thing.

 

bigmessowires

Well-known member
Arghh, customs!

I haven't tried reprogramming mine, since I haven't found the need. But I suspect the more turn-key you could make it, the better.

The only suggestion I can think of at this point is to change the DB-9 connector to a right-angle connector. That would require having it hang off one side of the board, or making the board wider than the Discovery Board so the DB-9 could be placed on the same edge as the ADB and RJ-11 connectors. As it is now, when all five cables are plugged in, the result is a little unwieldy because cables are sticking off in several different directions. It's not really a big deal, especially if the whole thing is hidden behind your Mac, but it would make it a little more streamlined.

 
Last edited by a moderator:

bigmessowires

Well-known member
Actually one more suggestion:

As it stands now, if I want to use this as a permanent solution, I either need to plug and unplug the Discovery Board, or just leave it turned on and running all the time. It would be great if it only turned on whenever my Mac was on. This would require putting a USB jack (or just a DC in jack) on your adapter board, and then connecting the power from that through a switch to the appropriate pins on the Discovery Board. Basically it would be giving the Discovery Board an on/off switch.

For double extra coolness points, you could replace the switch with a single transistor. Connect the collector to the new USB/DC power input, the emitter to the Discovery Board's power pin, and the base to the Mac's 5V line (from either the Mac keyboard or mouse or ADB connector). Then the Discovery Board would automatically be powered on only when the Mac is turned on.

 

techknight

Well-known member
or.. we can just power it off the mac. But I dont know if the current consumption of that whole conglomeration would overtax the mac?

 

bigmessowires

Well-known member
I finally had a chance to try the keyboard/mouse adapter on an ADB Mac - a PowerMac 8500. Unfortunately it wasn't a total success: the mouse works, but the keyboard doesn't. In SimpleText, typing on the keyboard does nothing at all. In an Open File dialog, typing on the keyboard causes the Mac to play an error chime, or sometimes moves the mouse down by 50 pixels or so. This is with an old Compaq PS/2 keyboard.

Even stranger: after I disconnected the adapter board, and plugged in a real Mac ADB keyboard and mouse, this behavior persisted. So it seems to have left the Mac's ADB driver in a confused state. Rebooting fixed the problem.

I noticed there's an unpopulated 3-pin header on the board, labeled Mac on one side, and ADB on the other side. Do I need to connect a jumper here in order to make it work?

Another thought: the Power Mac 8500 doesn't have any way to force a reboot other than holding command-control-power on the keyboard. Is there a way to do that using your adapter? Which key on the PS/2 keyboard acts as the power key?

 

techknight

Well-known member
I know some keyboards had hotkeys, like standby keys, etc... its probably easy to modify the code and allow a hotkey to be used as the power key maybe?

 

bbraun

Well-known member
It's difficult to tell what the problem is there.

Does toggling the capslock key toggle the led? If so, then at least the adapter and ps2 keyboard are talking.

dougg3 also made a change to the firmware, where I had a pullup on the ADB power line. This didn't seem to affect my 9600, and obviously wouldn't affect an SE, but on his IIci it made it seem like the power key was always down.

And yeah, shift-escape is a power button press.

 

paws

Well-known member
Been looking to build this since I thought I had the right Discovery board.

Turns out the board I have has a 24MHz STM32F100 (128kb flash, 8kb RAM, 64 pin package). Is there a chance it'll work?

I need it, since I seem to have lost my last ADB mouse during my last move :( (

 

bbraun

Well-known member
The adapter board won't work on that discovery board, although the code should be the same except for a minor tweak to the system timer firing rate, so if you wanted to hack up some cables, you could probably make it work.

 

bbraun

Well-known member
No uarts necessary, although I'm using usart2 for debugging messages.

2 GPIOs for ps2 mouse, 2 for keyboard, 1 is all that's *really* required for ADB, although there's also the power toggle line. Then grounds to everything.

 

bigmessowires

Well-known member
It's difficult to tell what the problem is there.Does toggling the capslock key toggle the led? If so, then at least the adapter and ps2 keyboard are talking.
False alarm - I had the adapter board connected though both the ADB and pre-ADB interfaces at the same time. :I That probably didn't help.

I tried it again with just the ADB interface, and it all worked smoothly, keyboard and mouse. Thanks!

I've tried several different Macs now with all the PS/2 devices I have, pre-ADB and ADB, and aside from the occasional problems already mentioned it works great. I give it my official QA sign-off! :) Let me know if there's anything else specific you'd like me to test.

 

bbraun

Well-known member
Awesome! I'm glad it's working for you, and thanks for the feedback.

I've got the PCBs for the USB based adapter. They were ordered before the initial feedback, so they still attach the same way the current ones do: on the bottom of the discovery board. They also lack the indicator of how it should attach. But, they should be good enough to work with, I've just been distracted by other things recently. Hopefully I'll be able to get working on it soon.

 
Top