• Hello MLAers! We've re-enabled auto-approval for accounts. If you are still waiting on account approval, please check this thread for more information.

Trying to rekindle interest in an ADB converter project

Looks like a few have attempted to at least research this project in the past.

I would really love to be able to do that, but I am an amateur at best when it comes to software, especially low-level hardware interfacing.

But I think it would be really cool to have a converter that would take, let's say, an USB device and have it connected to ADB, to be used on older machines.

ADB peripherals are expensive and hard to find, whereas USB devices are a dime a dozen, ubiquitous and readily available.

Plus, a bunch of people expressed their interest in having a classic Mac hooked up to their KVM.

I am not afraid of tacking the hardware side. PIC MCUs were mentioned a lot, but I am familiar with AVRs by Atmel.

There is a VUSB implementation for ATtiny devices and an ATtiny85 is like a buck and has its own oscillator, so very little is needed to get it running.

Maybe using an AVR for the keyboard, one for the mouse and another for the ADB side won't break the bank.

Or have a dual AVR setup per device, making it more KVM-friendly.

People have created HID interfaces with AVRs, so there might be some code available for the USB side.

I think the biggest issue would be to come up with the ADB protocol implementation, which, although described as "simple" and with documentation available, might be the challenge here, at least for me.

If anyone would be interested in this project, please chime in.

 
Yup, I have a half-finished prototype of this that I was working on earlier this spring, using a PIC32. Then I got sidetracked by the ROM-inator stuff. I hope to return to the ADB idea soon. There are also a few example projects floating around the web with some relevant stuff like software-based ADB implementations, if you want to check them out for inspiration. 

 
Bigmess,

It was your blog that inspired me, but I am nowhere near your level of expertise.

I have a couple of Atmegas that I can play with and some experience with AVRs, but that's probably not enough.

There are examples of connecting a USB keryboard to an Arduino and I thought maybe I can get an Atmega to output a character code over serial, which could be read and possibly converted to ADB by the second AVR.

Could this work?

I am willing to try, but if this has no chance of working, I should redirect my efforts.

Thank you for your feedback.

 
I think an AVR could maybe probably work, or a pair of AVRs, but there are probably better options with built-in USB support. Most things that say "USB" in a microcontroller context are referring to the mcu acting as USB device, rather than as a USB host as is needed here. I chose the PIC32 because it was one of the few that had fairly well-documented USB host support with useful example code, but with some effort you could probably accomplish the same thing on other hardware. For the ADB side, you have to write software to big-bang the ADB protocol. It's sort of a pain but not really all that bad, and there are several software-based ADB implementations you can look at if you get stuck.

I got to the point where I had the ADB side working, and the USB side, but not at the same time. Then I got frustrated by the particular dev board I was using, because it didn't have enough I/O pins. And then I got distracted by working on ROM-inator. :) But the general approach still seems workable, and I do hope to return to it and finish it up.

 
I know nothing of the PICs, I played with AVRs and STMs and I love the ESP8266, btw.

But for this project, it was only you and another dude that ever even researched this.

Usually, it's ADB 2 USB that shows up in searches.

I think I will give this a try but I must stick with the familiar platform.

 
Bigmess,

If you happen to see this post, I stumbled upon this on github: https://github.com/davisr/Arduino-ADB

Looks like what I am trying to do and closer to my level of understanding.

I think I will stick with PS/2 instead of USB, as it's a lot easier to deal with.

The ADB side scares me, especially since I read that a fuse can blow on the mobo if ADB is disconnected.

I would be using the Arduino IDE but with the amazing ESP8266 instead, as apparently Arduinos are too slow to handle the speed.

What do you think?

 
The ADB side scares me, especially since I read that a fuse can blow on the mobo if ADB is disconnected.
I think there's a fuse on the ADB bus, to protect against an external short circuit. But it's not something you should need to worry about unless you make a major blunder. I certainly wouldn't let it derail your plans.

 
Thank you all for your input.

I did see the article with the STM, but I thought it was USB and I settled on PS/2 for simplicity.

Since no-one said I was crazy for attempting this, I shall proceed.

I will post my progress and, if successful, I will publish everything, hardware and software.

 
Last edited by a moderator:
Surely you're aware of this -> https://github.com/tmk/tmk_keyboard?I know it's meant for ADB -> USB, but that means that the code has to understand some portion of the adb spec to communicate with the device I assume.

I don't know much about this stuff, but the biggest hurdle is that your device needs to be a usb host, so it might be worth buying something designed for that like this -> https://www.sparkfun.com/products/9947. On the extreme end, you might be able to connect any usb device you like provided your device can emulate a similar device that your mac has a driver for. E.g. you could connect a usb scanner if your adapter knows how to present that information to the mac as though it were a device the mac already understands.

 
Last edited by a moderator:
oooohh thats nice. theres an XT to USB firmware there. I got an old clicky key XT keyboard kicking around somewhere, gotta try it. 

 
Everyone, thanks for chiming in.

Due to some other projects, this is on hold until the cold weather starts (soo... like next week  :p )

 
Surely you're aware of this -> https://github.com/tmk/tmk_keyboard?I know it's meant for ADB -> USB, but that means that the code has to understand some portion of the adb spec to communicate with the device I assume.

I don't know much about this stuff, but the biggest hurdle is that your device needs to be a usb host, so it might be worth buying something designed for that like this -> https://www.sparkfun.com/products/9947.
Hi all, I'm new to here.

tmk's ADB-USB converter is designed for Teensy USB dev board, but is easily adapted to other ATMEGA32U4 based board. I made one converter with Arduino Leonardo compatible board for myself.

 
Update:

I am using an ESP8266 as it's a very capable little chip for $2 and I got the PS2 side sort of done.

Meaning it can read buttons and relative position of the cursor and the mouse "status".

Status appears to store the buttons (up to 3) and motion direction.

The x and y coordinates are stored in two other variables.

This https://github.com/davisr/Arduino-ADB is where I found an ADB library that compiles properly, but I am having a tough time interpreting how to link them together.

I found this link as well https://developer.apple.com/legacy/library/technotes/hw/hw_01.html explaining the protocol, but I need the piece in between.

Would anyone happen to know what is the ADB bus expecting from an ADB mouse?

Or any useful links, maybe how to "emulate" an ADB mouse?

Thank you very much

 
Back
Top