Mac68k Forums

Home


Welcome, Guest
Guest Settings
Help

Mac68k Forums » Development » Hardware Hacking

Thread: adb interfacing


Reply to this Thread Reply to this Thread Search Forum Search Forum Back to Thread List Back to Thread List

Permlink Replies: 3 - Pages: 1 - Last Post: Sep 10, 2013 11:31 AM Last Post By: Bunsen
bbraun


Posts: 493
Registered: 7/25/12
adb interfacing
Posted: Aug 21, 2013 8:25 PM
Click to report abuse...   Click to reply to this thread Reply
Using a hacked up cable and one of the PS2 to pre-adb boards, I've got a PS2 to ADB mouse interface working. It's pretty rudimentary, hacked up in a couple hours, but it does work, moves the cursor around on the screen.

I have to admit I don't have a huge interest in PS2/ADB interfacing, but it's kind of a natural progression from the pre-adb stuff. I do find the idea of ADB fascinating for non-HID devices. It's slow, but we're talking about 20yr old machines. It seems like a pretty useful bus for notifications from modernish systems, with the right interfaces.

I've also ordered the stm32f4discovery, a version of the board I'm using that includes USB OTG. Getting USB and ADB on the same board opens up some additional possibilities.
superpete

Posts: 18
Registered: 4/4/13
Re: adb interfacing
Posted: Aug 21, 2013 11:37 PM   in response to: bbraun in response to: bbraun
Click to report abuse...   Click to reply to this thread Reply
The uses for it might be limited now while there's still plenty of ADB devices out there, sooner or later it's going to be difficult to get working ADB devices. PS/2 gear (to my knowledge) is still being made and is more common than ADB ever was.
bbraun


Posts: 493
Registered: 7/25/12
Re: adb interfacing
Posted: Aug 23, 2013 12:09 AM   in response to: bbraun in response to: bbraun
Click to report abuse...   Click to reply to this thread Reply
Well, I've refined it a bit, and hopefully made it easy to add new devices. I'd like to be able to do both keyboard and mouse with one board. I've put the code here. It seems to be fairly reliable at this point, although still doesn't do any address collision detection. ADB is amazingly forgiving on addressing rules. Theoretically, the host will ask each device for their ID and a "handler ID", then reassign you to a different address. However, when a device wants to talk, the device just stretches the stop bit on the next command issued by the host. So, the host knows a device wants to talk, but doesn't know which one (or how many). It will then ask every device ID if they need to talk. Since it enumerates all the devices every time, you can get away without actually paying attention to renumbering, assuming there's no collisions of other people equally reckless. :)

I could probably do both PS2 keyboard and mouse to a single ADB port that implements keyboard and mouse on the bus, with the current board I'm using. Alternatively, the USB board will be arriving soon, and supports OTG, so I can plug a keyboard or mouse into that and have it show up on ADB. Unfortunately, I don't believe this board will support hubs (there's no sample code for hub support anyway), so it'll be one device at a time.
Bunsen

Posts: 39
Registered: 10/15/12
Re: adb interfacing
Posted: Sep 10, 2013 11:31 AM   in response to: bbraun in response to: bbraun
Click to report abuse...   Click to reply to this thread Reply
Just dropping this here in case you haven't seen it.

http://billfernandez.com/bfd2/portfolio/adb_devsim/index.htm

Point your RSS reader here for a feed of the latest messages in all forums