I've been hacking around with the pre-adb, adb, ps2, and usb keyboards and mice for a bit and was wondering how much interest there
actually is for various adapter bits.
PS2 to pre-ADB
The PS2 mouse and keyboard to pre-adb seems to be working OK for me. I've got the pcbs and components to make the 'cape' for the stm32f0discovery board I've linked above. The boards are powered by USB, since pre-adb systems can't provide enough power for both a PS2 mouse and keyboard, plus the adapter its self. Pre-adb macs are rated at a combined total of 200mA for all peripherals. My PS2 keyboard alone draws 200mA, plus mouse and adapter.
One hiccup with my current pcb is I got the DB9 connections backwards, so a straight through DB9 cable won't work. I'm using a cable I made out of db9 to rj45 adapters and an ethernet cable.
If anyone is interested, I can provide all of the above (I have more than enough of all the components, plus db9 cable), at cost.
PS2 to ADB
Using a hacked up version of the board above, I've got a PS2 mouse working with ADB on a Mac SE and 660av. I've kinda/sorta got some keyboard support working too, the main impediment is just physical connections at the moment. The ADB support works in the simple cases, but it lacks collision detection, so for example doesn't work very well if you plug in 2 keyboards or 2 mice.
If there's interest in this, I can make up some PCBs for PS2 mouse and keyboard to ADB. It'd essentially be the same as the PS2 to pre-ADB. In fact, I'm contemplating making it the same board: PS2 mouse & keyboard on one side, DB9 in the middle, and rj11 and adb ports on the other side. Then a jumper to choose whether it does ADB or pre-ADB. Getting this working would mean getting the adb connector, making up the PCB, and some more software work to glue it all together.
USB to ADB
Using a different chip in the same family, the stm32f4discovery has a USB OTG micro A B connector. It's about $15 from digikey, almost twice the $8 of the stm32f0discovery. It is a different form factor than the stm32f0discovery, so the boards I've made don't fit on it. It also requires a USB OTG micro USB host cable to be able to plug devices into it. This is the same cable as is typically used to plug a USB flash drive into cell phones that support it. I've gotten one of these and have a USB mouse to ADB working with it. I'm messing around with USB keyboard to ADB, and I expect to get it working in the next couple days or so. It's a little more involved than the mouse support due to differences in key press reporting. Another hiccup with keyboard support is many keyboards (all Apple ones, and at least the Dell USB keyboards I've got) are USB hubs with the keyboard device hanging off that. If your keyboard has another USB port on it for a mouse, you've got a USB hub keyboard. These aren't supported, and I probably won't be adding support for them anytime soon. So, any USB keyboard support will be for pure keyboards. This also means the board will only support
one device: either a keyboard or a mouse. You could have two of these adapters, but each will only be able to do a keyboard or a mouse, unlike the PS2 version, which does both in one device.
To do this, I'd need to make up some boards, and at least for keyboard support, there's some more work to do at the moment.
USB to pre-ADB
I haven't attempted this at all, but it is a logical extension of the work I've already done. This would have all the same limitations as the USB to ADB version above. The stm32f4discovery is larger than the stm32f0discovery, so any PCB I made would probably be larger and therefore more expensive as well.
One other caveat here is before making these generally available, I would appreciate it if any 'early adopters' would be willing/able to program these with new firmware versions, in the event there's a problem. I am the only one that has used any of this, and I don't claim to write bug-free code.
I've also only tested with the keyboards and mice I have on hand, and with the machines I've got. There may be timing differences between manufacturers/models, as well as timing differences with macs in different configurations (OC'd machines, accellerators?). I don't know if there is or not, just calling out the risks. There is no extra hardware required to program these boards, but it does require
openocd. I currently use a Linux development environment with openocd, and there are instructions (linked earlier) on how to get it. Once installed, I can provide scripts to program new software into it, but I recognize this is a barrier for some. Perhaps an enterprising Linux hacker could package up a virtual machine with everything ready to go?
If anyone really really wants one of these but can't get the programming environment setup, I'm still more than happy to provide what I've got. I just want to make sure everyone knows what the situation is.
The process I've been using for all this stuff is something along the lines of: get some software working using hacked up cables and stuff just to understand what is possible, and what I need from a PCB. Then order the components I'll be putting on the PCB, so I have some idea of the connector layout, spacing, sizing, etc. Then make up a PCB. I'm using
OsmondPCB that trag recommended some time ago. Then send the PCB off to be manufactured. This takes about 3 weeks before I get the boards. Then, I've probably made a mistake, fix it, and send off to have another batch of PCBs made, and wait another 3 weeks. Then once I get a PCB and all the connectors actually fit on it (connector sizing & spacing has been a problem for me), I work through the remaining software issues.
This isn't exactly a fast process, nor is it a cheap one. It's taken me pretty much all summer to get the PCB for the PS2 to pre-ADB working ok, and I still have the DB9 pins backwards. Plus, there's a difference between designing something for myself and for what other people want. This is why I'm asking if there's any real interest, and which of these is more interesting to people. I've tried to lay out the costs, tradeoffs, effort, and timeframe involved in some of this, to let people provide informed input.
I'm willing to donate my time and code to the project, but the cost of materials and shipping I can't do much about. I've already made the Osmond PCB file available for the PS2 to pre-ADB board available, as well as the code. If someone wants to assemble the boards themselves, or produce the boards on their own, by all means go for it. I'll do what I can to help. This is a hobby, I'm not in it for the money. That also means all of this is done in whatever free time I have. Please keep in mind that means
all of it is a free time activity: PCB design, coding, troubleshooting, locating parts, shipping, ordering, helping folks, etc.
Also, when thinking about which of the above, if any, is interesting, keep in mind the following:
1) Many USB keyboards and mice support PS2 with a passive adapter. I currently prefer an MS Intellimouse, which is optical, and is usb with PS2 support through a passive adapter.
2) The
Gee Three PS2 mouse to ADB adapter is still for sale. I have 2 of these and they're great. My PS2 to ADB adapter could support both mouse and keyboard and be
maybe $5 less in parts, but the Gee Three has a much cooler form factor, a nice case, etc. Mine's bare PCB all the way around. If all you're interested in is a PS2 mouse to ADB, this would be the way to go, I think.
3) The old NTI KVMs I mentioned in
this thread do PS2 to ADB (as well as Sun) conversion for both keyboard and mouse. If you're looking for a KVM solution, you might be better off with one of these.
Anyway, sorry for the long post. I'm just having fun hacking away on this, which is neat for me, but doesn't really help anyone else. It'd be great if some of my hacking helped someone else, I'm just curious which if any, other people think is most important or interesting. I've gotten zero inquiries on the PS2 to pre-ADB boards. I'm not sure if that's because it's not interesting, or if programming updates is too hard, or if I'm just not presenting it right.