Jump to content
bbraun

PS2 Keyboard on Mac Plus

Recommended Posts

bbraun and I figured out the PS/2 mouse problem. My mice take longer to reset than his, so I increased the timeout value and now they work fine! This is definitely a very cool project.

Share this post


Link to post
Share on other sites

I finally got a DB-9 cable, and I can report that PS/2 mouse emulation works great! That is, after I finally found my PS/2 mouse buried in a box of unrelated stuff, and stopped trying to plug it into the ADB port on the board. :-)

 

If it matters, this is a Logitech 2-button roller ball mouse. Using it with my Mac Plus is a pleasure. The real Mac Plus mouse feels like a lead brick in comparison.

 

While clicking around the Finder and reading the "about" box, I was reminded that the Mac I'm typing this on now has 2000x more RAM than the Mac Plus. Good times.

 

Once again, awesome stuff!

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Edited by Guest

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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 :((

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×