Jump to content
anthon

ADB Busboy: Adapter for USB peripherals over ADB

Recommended Posts

I don't know how which or how many companies made ADB gamepads, but Gravis was kind of the de facto standard-- many games shipped with Gravis "sets" that were preconfigured mappings of their gamepad buttons to in-game keys. As I recall, the Gravis GamePad shipped with a control panel that you'd use to configure its mappings, but I'm not positive if that control panel was necessary for operation-- it may have just sent scancodes regardless, I'm not sure. It's been a while and I don't have mine handy.

Share this post


Link to post
Share on other sites

The only other standard system used by game controllers that I know of is InputSprocket, but that came later on the Power Mac line and support there is less important given that a USB controller could be configured via InputSprocket.

Share this post


Link to post
Share on other sites

Come to think of it, I don't know how or if InputSprocket detected and worked with ADB controllers, as I've only ever used it with USB. It predates the introduction of the first iMac, so I imagine it has to work with ADB devices, but I've never tried it.

Share this post


Link to post
Share on other sites

...Another thing, are you planning on handling >1 mouse button? Some ADB mice actually had a second button, but they are a rarity and the most common method of a 'right click' on a Mac was ctrl+click. Simulating that shouldn't be impossible. Also, what about implementing what at least one Mac emulator does and make the mousewheel scrollup/down translate to 2/3 keyboard arrow up/downs to allow you to 'scroll' Finder windows? ;)

Edited by lameboyadvance

Share this post


Link to post
Share on other sites

So, the ADB protocol actually has room in it for a 2nd mouse button. But I doubt the system software will acknowledge that it exists. What did the 2-button mice you're thinking of do with the second button? I used a Kensington trackball that had two buttons (and later four). You used the Kensington software to define what the extra buttons did. Ctrl-click probably makes the most sense. (Or was it option-click?) That is a bit fiddly because I'll have to queue up a series of events to happen in a certain order, from separate adb devices. Perfectly doable, it's just not he way the code is structured right now.

 

I was also planning to do something with the scroll wheel. Probably arrow keys.

Share this post


Link to post
Share on other sites

I've never had a 2 button Mac mouse. I do know that at least some of the Apple ADB mouse ICs actually had a second pin that would register the second button click, but they were never connected/used in the mouse and I never played around with it to see if it actually responded in software.

 

And it would be advisable to set up your software to do 2 things/devices at once. The Adjustable keyboard broadcasts as both a keyboard and a 'input device' to handle its media keys, and keyboard-cmd/mouse-click may not be the only time you have to combine 2 devices.

Share this post


Link to post
Share on other sites

Doing two things at once is actually the problem, not the solution. The events from different devices happen in parallel, whereas with a macro (control-click), they need to happen serially. It doesn't matter. It's not like I'm going to not implement macros.

Share this post


Link to post
Share on other sites

If you implement some of this bonus stuff from the adjustable keyboard (or try to make mouse input trigger keyboard presses) you're probably going to have to have the option to turn it off if you want to retain IIgs compatibility. The Adjustable Keyboard *doesn't* work with the IIgs because its software stack happens to freak out at the thought of having multiple things that identify themselves as "keyboard-like" on the bus at once.

Share this post


Link to post
Share on other sites

Thanks for the heads up. Maybe what I will do is ship it with stuff that doesn't work on the IIgs disabled by default and then write a Mac app for configuring the options.

Edited by anthon

Share this post


Link to post
Share on other sites

Slight derail: Is it possible to make a passive ADB splitter? Like, take three female connecters with the datalines wired together to attach two peripherals to the same host? Is that basically what the extra connector in ADB keyboards are?

Share this post


Link to post
Share on other sites

Hey! Do you know approximately when you're planning on selling these? I signed up to be notified but was just wondering if it'd be soon. I'm super keen. Thanks!

Edited by melt

Share this post


Link to post
Share on other sites

My original goal was by the end of March. At this point, I think it's unlikely I will make that date. There are some unknowns I need to work out still. The biggest two are whether the prototype PCB will need any fixes and how much work implementing the firmware upgrade bootloader will be.

 

I have the option of buying a bootloader for $500 or adapt a free bootloader to support upgrading firmware from host mode USB mass storage device. The $500 bootloader may not have a feature I need. Not sure how much work it would be to modify the free one yet.

 

So I don't know enough to put a date on it yet. But I'm pretty sure it won't be before April.

Share this post


Link to post
Share on other sites

Some 2 button ADB mice implemented "click lock" for the 2nd button, that is you click the right button once, it acts like the mouse button is held down until you click it again. A friend of mine had one of those mice hooked up to his ROM 01 IIgs and it worked as above, so it was likely implemented in the mouse electronics. No clue if there was any Mac driver software to assign another function to the right mouse button.

Share this post


Link to post
Share on other sites

I have a mouse like that. And i have the Bandai Pippin Pad, too : there is a trackball on it, with two button.

 

I think that the trackball from PowerBook 180 use two different button, too.

Share this post


Link to post
Share on other sites
I finished assembling and testing the prototype PCB. Everything is working as it should. I did make a dumb mistake and wired up the LED backwards. (I suppose I didn't pay much attention to that because what kind of idiot screws up an LED?) That's what the patch wire in the photo below is for. I don't feel the need to spin another prototype board to test the LED fix.
 
One frustrating thing is that the original USB power distribution chip (that's the 8-legged one on the right side) I assembled the board with was malfunctioning. It would only power one USB port. After investigating and concluding that it must be a bad chip, I replaced it. Both USB ports work with the replacement chip. This makes me question the reliability of this chip and whether I should switch to a different one.
 

Next up is the bootloader. Once I get proof that firmware upgrades work, then I can order the production boards and work on software features while they are being made.

 

Prototype Populated

 

Share this post


Link to post
Share on other sites

Anthon, you've got a customer in me. Really like the look of the PCBs and very pleased for you that you enjoyed a successful first attempt once the boards arrived. This is an exciting and promising project and I look forward to seeing how things develop!

Share this post


Link to post
Share on other sites

Congratulations, anthon, that's quite the achievement! I've been much interested in your project and have been meaning to read past the mission statement and working prototype announcement, but I've been much too busy. hmm.png

 

Kudos on that LED feature, every prototype requires at least one patch wire to be authentic. [;)]]'>

Share this post


Link to post
Share on other sites

Thanks for the comments everyone. I'm still working on the bootloader which has had a lot of road blocks and detours. It's important to get the bootloader ready because it is the way that you'll be able to update the software when I develop new features. The original one I intended to use turned out to be incompatible. I tried to get a commercial one to work, but it lacked support for USB hubs. So now I'm adding USB host support to the manufacturer's bootloader.

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

×