ADB KVM Switch - Thoughts?

landogriffin

Tinkerer
Sep 23, 2021
42
44
18
Iowa
piscsi.org
One of the things on my wish list is an ADB compatible KVM switch. It would be nice to have multiple Macs shared with a single monitor/keyboard so I can switch between them for shenanigans.

I came across this old project the other day:

It looks like a good starting point. The BOM doesn't look too expensive and I like that its expandable.

1678415223885.png


Some thoughts on this:
- Probably allow a USB keyboard/mouse for input OR an ADB keyboard/mouse. The work that was done on adbuino should make this fairly do-able
- Have all of the "out" ADB ports connected/managed simultaneously. That way the Mac can do the detection/handshaking even when its not selected for display
- Not planning to have EDID support. Just use the sense pins. Probably have a set of jumpers/dip switches to set the sense codes (https://old.pinouts.ru/Audio-Video-Hardware/MacVideoToVGA_pinout.shtml)
- My goal is to have a solution that can get up to 8 inputs. We'll see how feasible that is :)
- We could make a weird key combo to trigger the power button (managed by the pico)

I'm curious what everyone thinks of this. Any thoughts? Waste of time? Would other people use something like this? (anything I do would be open source!)

Edit: Links for my future self:
- ADB protocol implemented in RP2040 PIO: https://learn.adafruit.com/next-com...th-circuitpython?view=all#coding-the-keyboard
- Apple ADB Protocol Documentation: https://developer.apple.com/library/archive/technotes/hw/hw_01.html#//apple_ref/doc/uid/DTS10002470
- Another ADB Reference: https://www.lopaciuk.eu/2021/03/26/apple-adb-protocol.html
 
Last edited:

retr01

Senior Tinkerer
Jun 6, 2022
2,469
1
778
113
Utah, USA
retr01.com
Nice! :)

I currently use BMOW's Wombat for several vintage Macs and Apple IIgs. I bought several Wombats and realized that getting them at $49 each plugged in a USB KVM costs more than it should. So, this would be good. :D

I have several questions:
  1. Can I use my USB keyboard and mouse using the 2.4 GHz USB dongle?
  2. What about a USB KVM hooked up to the USB port of this ADB KVM?
  3. Will this ADB KVM address the problem of "hot pugging-in" the ADB?
 

eric

Administrator
Staff member
Sep 2, 2021
822
1,305
93
MN
scsi.blue
This would be pretty nice for my current setup - I have 4 macs on display and the keyboards take up a ton of room. Would be nice to have one and be able to switch between. Of course one is a Mac Plus - which isnt adb - but still would be nice to free up some desk space.
 

landogriffin

Tinkerer
Sep 23, 2021
42
44
18
Iowa
piscsi.org
This would be pretty nice for my current setup - I have 4 macs on display and the keyboards take up a ton of room. Would be nice to have one and be able to switch between. Of course one is a Mac Plus - which isnt adb - but still would be nice to free up some desk space.
I thought about the Plus style keyboard/mouse. But, since AFAIK there weren't any macs with external monitors AND that style of keyboard/mouse, it probably doesn't fit with this project.

This is going to be a back-burner project for me, but if anyone wants to help, you're welcome to join the fun! :)
 

landogriffin

Tinkerer
Sep 23, 2021
42
44
18
Iowa
piscsi.org
Nice! :)

I currently use BMOW's Wombat for several vintage Macs and Apple IIgs. I bought several Wombats and realized that getting them at $49 each plugged in a USB KVM costs more than it should. So, this would be good. :D

I have several questions:
  1. Can I use my USB keyboard and mouse using the 2.4 GHz USB dongle?
  2. What about a USB KVM hooked up to the USB port of this ADB KVM?
  3. Will this ADB KVM address the problem of "hot pugging-in" the ADB?

  1. Can I use my USB keyboard and mouse using the 2.4 GHz USB dongle?
Probably. The issue I ran into with adbuino was that the TinyUSB stack didn't support composite devices very well. That has probably changed in the last year since I looked at it though.
  1. What about a USB KVM hooked up to the USB port of this ADB KVM?
Might have the same composite USB device issue. But, seems do-able.
  1. Will this ADB KVM address the problem of "hot pugging-in" the ADB?
Great question! My thought was to route the keyboard/ mouse movements in software. So, effectively, all of the ADB ports will be "active" and the Pico will just send the keypress/mouse movements to the currently selected target. All of the non selected targets will still think there is a keyboard/mouse connected.
 
  • Like
Reactions: retr01

retr01

Senior Tinkerer
Jun 6, 2022
2,469
1
778
113
Utah, USA
retr01.com

landogriffin

Tinkerer
Sep 23, 2021
42
44
18
Iowa
piscsi.org
Probably. The issue I ran into with adbuino was that the TinyUSB stack didn't support composite devices very well. That has probably changed in the last year since I looked at it though.

WRONG! TinyUSB works with composite devices fine (I'm assuming). It was the USB Host Shield library 2.0 that I was struggling with. So, ignore everything I said about composite devices

1678475714985.png
 

Trash80toG4

Tinkerer
Apr 1, 2022
779
242
43
Bermuda Triangle, NC USA
Very cool project! Love the modular expansion option.

I'm curious about the need for a microcontroller/Pi in the design at all? If it's for KBD/Mouse emulation for the offline machines that makes a world of sense? Otherwise a simple dumb TTL gate logic setup could be breadboarded for testing and a simple, easily assembled PCB might do? Rotary switchboxes for Mac KVM setups were readily available in that timeframe.

________________________________________________________________________________________

Dunno if this will help overall, but @eric might find this helpful?

Circa 1995 I used the MiniView Mac Kit for the rug rat's Q630 homework station and 386 Tower AOL dialup station. I was using the four way rotary switched KVM in the shop at the time.

Circa 2008, I set them up for the growing MacintoshDisplayUnit for running HP_Mini and three of the Macs with the fourth harness as a free agent for whatever I wanted to hook up for playtime. PowerBook display and Portrait on DuoDock were used, but with the Wireless KBD/Mouse on a lap desk.

It should be easy to do with a USB setup today, given new connectivity hardware. One or more Wombats or the like would be substituted for the Mac Converter. I never got around to setting up the PS/2 Mac Plus adapter prototype I was gifted, but Etic should have an easy time of doing same with USB in this day and age? If not, KBD/Serial Mouse module would make a great project?


post-902-0-33261300-1407554881.jpg
 

landogriffin

Tinkerer
Sep 23, 2021
42
44
18
Iowa
piscsi.org
The microcontroller will serve two functions - reading the usb keyboard while servicing the adb ports (even when the port isn’t selected) and for switching sources. I agree that switching source doesn’t really drive the need for a microcontroller. But, if it’s there, why not use it :)

I'm thinking it could be expanded with a simple display to show which ports are active.

if I’m understanding the Pi Pico’s PIO capabilities, it only has 4 state machines. So, the pico can probably only service 4 adb ports, unless we fallback on bitbanging.

I have a first draft of the PCB payout done. Hopefully place a board order tomorrow! :)

I’m also going to try these out….

If these work well, I’m probably going to use VGA ports on the KVM. I’m assuming I’m not the only one with a huge box of vga cables laying around
 

rvense

New Tinkerer
Mar 14, 2023
4
0
1
rven.se
Isn't ADB signalling in the tens of khz range? I'd bitbang first and then go for PIO later as needed. I wouldn't be surprised if the Pico could run as many ADB ports as it has pins to speak to them.
 

Trash80toG4

Tinkerer
Apr 1, 2022
779
242
43
Bermuda Triangle, NC USA
The microcontroller will serve two functions - reading the usb keyboard while servicing the adb ports (even when the port isn’t selected) and for switching sources. I agree that switching source doesn’t really drive the need for a microcontroller. But, if it’s there, why not use it :)
Cool, was wondering about the increased functionality it might add to the project. In the late 80's, I think it might have been Don Lancaster (TTL & CMOS Cookbooks) who was saying that it made no sense to do a project without using a microcontroller. Still seems a bit extreme to me for something like a KVM switch. Rock on! ;)
 

landogriffin

Tinkerer
Sep 23, 2021
42
44
18
Iowa
piscsi.org
Isn't ADB signalling in the tens of khz range? I'd bitbang first and then go for PIO later as needed. I wouldn't be surprised if the Pico could run as many ADB ports as it has pins to speak to them.
Ya, PIO is probably overkill. I'm thinking that having a sw thread to bitbang each pin independently could get ugly. But, I'll probably try that first anyway :)

I haven't looked too closely at it, but it appears to me this is using PIO:
 

MrTechGadget

New Tinkerer
Dec 31, 2022
3
7
3
I realize I am many months late to this party, but am I the only one with one of these in a box? All mechanical, just some diodes on the video connectors and one really awesome rotary switch.

IMG_9782 Medium.jpeg

IMG_9784 Medium.jpeg

IMG_9783 Medium.jpeg

IMG_9785 Medium.jpeg
 
Last edited:

ClassicHasClass

Tinkerer
Aug 30, 2022
180
116
43
www.floodgap.com
I've got a push-button one like that. It multiplexes between my Lisp Machine IIci (MacIvory), my clock-chipped Q800 and my "G4" 7300. However, the 7300 uses a different rotary KVM for video since it has a Rage Orion.