Jump to content

Recommended Posts

I'm about to build up a simple adb switch box using a microcontroller so I can use just 1 keyboard and mouse with multiple old Macs and I was wondering if anyone could point me in the right direction for resource material relating to the adb spec regarding things like hotplugging and the way the OS polls the port. just want to make sure I don't end up killing anything with things like esd and the like.

also I have read that the mouse looses its 'settings' in regards to the sensitivity of the mouse movement if it is hot plugged, any further info on that would be great too

Link to post
Share on other sites
22 hours ago, Chopsticks said:


also I have read that the mouse looses its 'settings' in regards to the sensitivity of the mouse movement if it is hot plugged, any further info on that would be great too

 

It has been a long time since I poked this, so take this with a pinch of salt, but this is what I remember.  It's legitimate for different pointing devices to have different sensitivities, so the mouse settings are tied to the ADB address of the mouse.  When you hotplug the mouse, it will end up with a different ADB address, so until you tell the Mac to go and rescan the ADB bus, it will behave as a mouse but the adjustment parameters won't be applies to its movement.  When the Mac rescans the bus, everything gets lined back up again.  There were various utilities to force a rescan of the bus.

 

If I am wrong, I am sure someone will correct me—I may well be.  But this ought to be at least a first approximation to the truth. :-)

Link to post
Share on other sites

I am hoping to use a simple S-Video switchbox for the same purpose (less glamorous than a microcontroller, but I think I can handle turning a dial). I hadn't considered the hot plugging issue, though. Looks like Focus Bus Tool and ADB Renewer are candidates for the type of utility @cheesestraws is talking about.

Link to post
Share on other sites

There is a book that Apple published called "Guide to the Macintosh Family Hardware". It has quite a bit of documentation for the ADB protocol (among other things), so it might be useful for your project. I think there is probably a copy on the Internet Archive somewhere.

Edited by davidg5678
Link to post
Share on other sites
On 10/12/2020 at 6:46 AM, fabian said:

Would it help to look into an existing ADB switch box?

it would be handy to have a look at one but they are near impossible to find, not to mention the price of getting one shipped to australia so thats kind of why i figured id just make one

 

23 hours ago, davidg5678 said:

There is a book that Apple published called "Guide to the Macintosh Family Hardware". It has quite a bit of documentation for the ADB protocol (among other things), so it might be useful for your project. I think there is probably a copy on the Internet Archive somewhere.

thank you! i've got this downloading right now, looks like it will be a good read actually


the main reason i was to use a micro controller is just because its easy for me to doing some coding to do what i want. using a mechanical switch isn't something im keen on due to contact bounce possible causing a surge of power etc so im looking at possible using some ttl bus switching IC's.. haven't fleshed this out beyond an idea but i'll probably start putting something together later today to these out the theory

Edited by Chopsticks
Link to post
Share on other sites
16 hours ago, Chopsticks said:

it would be handy to have a look at one but they are near impossible to find, not to mention the price of getting one shipped to australia so thats kind of why i figured id just make one

I think the question was more that would photos of the inside of one be useful?  I think @fabian has one—if not, I do—and I'm sure one or both of us could take photos of the innards of ours, if it would be useful

Link to post
Share on other sites

Microchip has a great writeup talking through the low-level behavior of the bus if you end up making a microcontroller project:

 

http://ww1.microchip.com/downloads/en/AppNotes/00591b.pdf

 

If you tackle this, maybe a multicore chip like the Propeller would be a good fit to do the software decoding/encoding of the ADB timing?  I don't know hardly anything about them, but it sounds like having separate execution "threads" would be good for keeping track of the mess of different signals all going at once.

Link to post
Share on other sites
21 hours ago, Unknown_K said:

Dr.Bott still sells the 4 port ADB model for $149 + shipping.

for a simple adb switch box $150US is overkill for me to be honest.
i just have my se/30 and a performa630DOS in a custom printed case i made so its more a convenience thing for me to just have a switch.
 

20 hours ago, saybur said:

Microchip has a great writeup talking through the low-level behavior of the bus if you end up making a microcontroller project:

 

http://ww1.microchip.com/downloads/en/AppNotes/00591b.pdf

 

If you tackle this, maybe a multicore chip like the Propeller would be a good fit to do the software decoding/encoding of the ADB timing?  I don't know hardly anything about them, but it sounds like having separate execution "threads" would be good for keeping track of the mess of different signals all going at once.

im not really planning on reimplementing the adb protocol at this time, maybe its something i'll explore down the track but all i need to do is switch the data and power (probably ground too) and i guess switch the PWR ON signal (not that the se/30 supports soft power without mods anyways) so a few transistors soft of thing would do it well. the bidirectional Data line would need something else though being its bidirectional, but i could always be lazy and switch it using a relay..
my use of a micro is more just to allow 'soft buttons' for switching between the outputs, buy driving whatever i use to switch the 3/4 adb pins. and a couple led's etc


ive been reading up on the issue of hot plugging but i haven't found anything conclusive, like i guess esd could have an effect it you physically insert the mini din plug into the mac while on, and it the key tab is broken in theory it might be possible to short out the 5v to ground of the data pin (ill have to check this further though), most makes are fused on the 5v line though so grounding that wouldn't be the end of the world.

ive booted up my se/30 with no keyboard and mouse connected and ive actually hot plugged them if a few times after booting and i haven't had any issues with the mouse tracking and so far or fried the adb controller..

if i had more machine to test i guess could be another story but my se/30 is fine so a simple switch box with some esd transient diodes on the pins for piece of mind would probably suffice

Link to post
Share on other sites
20 hours ago, Chopsticks said:

I've been reading up on the issue of hot plugging but i haven't found anything conclusive, like i guess esd could have an effect it you physically insert the mini din plug into the mac while on, and it the key tab is broken in theory it might be possible to short out the 5v to ground of the data pin (ill have to check this further though), most makes are fused on the 5v line though so grounding that wouldn't be the end of the world.

I read the chapter on ADB in Apple's book last year while troubleshooting one of my SE/30s that didn't have a working mouse. I don't completely remember what it said about hot swapping, but as far as I can tell, If you are doing the switching with something like a microcontroller, the wires themselves will never actually get physically disconnected. The computers would just think that the signal has stopped momentarily, in other words, think that you have just gotten up from the computer. This would minimize the ESD threat at least. You could probably put something quick together using a few mini-din sockets, tact switches, and a $5 Arduino style board.

 

Others might know more about how exactly hot-swapping ADB causes damage, but I think in the worst-case scenario, you'd just need to swap the ADB chip with one from the plentiful supply of battery-damaged boards if something goes terribly wrong.

Link to post
Share on other sites

i think and arduino or similar will likely be the direction i take, that and a few hours to construct and slap some simple code together should do the job fine. im likely overthinking the whole esd and hot plug issue, but i only have one se/30 here and its sentimental being ive had it for over half my life and i was born the year it was made so i want to make sure i look after it

Link to post
Share on other sites
21 hours ago, Chopsticks said:

ive been reading up on the issue of hot plugging but i haven't found anything conclusive

 

16 hours ago, davidg5678 said:

the wires themselves will never actually get physically disconnected

 

If I remember correctly, @davidg5678 has it right: ADB is weird because its software can deal with hotplugging mostly fine, but the hardware can't.  I can't remember the details, but I'm pretty sure it's an electric thing.  So if you just have a microcontroller doing the switching and "proxying" the lines through you are probably fine?

Link to post
Share on other sites
On 10/12/2020 at 8:07 AM, Chopsticks said:

if you do open it up and take some pictures that would be good to get a look at

This was discussed on the ebay Finds thread back in March 2019. The link is below. Several members opened their boyes and took picturesof the innards.

I have a 4-port Black Box ADB KVM if anyone wants new pictures.

 

 

Link to post
Share on other sites
20 hours ago, davidg5678 said:
On 10/12/2020 at 10:51 AM, Chopsticks said:

I've been reading up on the issue of hot plugging but i haven't found anything conclusive, like i guess esd could have an effect it you physically insert the mini din plug into the mac while on, and it the key tab is broken in theory it might be possible to short out the 5v to ground of the data pin (ill have to check this further though), most makes are fused on the 5v line though so grounding that wouldn't be the end of the world.

I read the chapter on ADB in Apple's book last year while troubleshooting one of my SE/30s that didn't have a working mouse. I don't completely remember what it said about hot swapping, but as far as I can tell, If you are doing the switching with something like a microcontroller, the wires themselves will never actually get physically disconnected. The computers would just think that the signal has stopped momentarily, in other words, think that you have just gotten up from the computer. This would minimize the ESD threat at least. You could probably put something quick together using a few mini-din sockets, tact switches, and a $5 Arduino style board.

I've yet to see anything conclusive on the matter. Given the prevalence of rotary switch based KVM solutions from the day makes me think that approach is fine. A manufacturer, opening themselves up to the possibility litigation over wrecking one or several Macs, K, V & M would have been a serious event. So I doubt that an electronic switching solution is really necessary. Hot swapping is defined as unplugging and re-plugging active peripheral in hot sockets of powered computers. KVM rotary switching is decidedly not the same thing. Any fumble fingered attempt at hot plugging cables runs the chance of damage, but many of us have hot-plugged ADB numerous times without bad things happening.

 

I always kept an alias of ADB Reset on the desktop of my KVM'd Macs so I could Tab to it to hit enter, running it from the KBD. That done, all was well again in the world of ADB had the mouse lost its place.

It's easy to find two way printer switchboxes with the pushbutton switches like this Black Box Mac KVM, such have plenty of contacts

 

inside.jpg

 

In these days of inexpensive 10x10cm PCBs, maybe do a modular setup of vertical connector boards plugged into chassis components servicing any number of cascaded hookups?

 

 

I like the notion of re-purposing unused (in Mac KVM switching) lines an HD15 switchbox for ADB. I also like building octopus cables. Stick a hub in the box and add unswitched Cat-5 to each.

 

Pin Name Dir Description
1 RED --> Red Video (75 ohm, 0.7 V p-p)
2 GREEN --> Green Video (75 ohm, 0.7 V p-p)
3 BLUE --> Blue Video (75 ohm, 0.7 V p-p)
4 RES   RESERVED
5 SGND --- Ground
6 RGND --- Red Ground
7 GGND --- Green Ground
8 BGND --- Blue Ground
9 KEY - Key (No pin) / Optional +5V output from graphics card
10 GND --- Sync Ground
11 ID0 <-- Monitor ID Bit 0 (optional)
12 SDA <-- I2C bidirectional data line 
13 HSYNC or CSYNC --> Horizontal Sync (or Composite Sync)
14 VSYNC --> Vertical Sync which works also as data clock
15 SCL <--

I2C data clock in DDC2, Monitor ID3 in DDC1

Link to post
Share on other sites

thanks everyone for all the information and great ideas. i ended up being pretty lazy here (to many other projects on the go) and just wiring up a few relays together to get the job done, i mayrevisit this in the future with the aim to add video switching but for now it does what i need it too.
i appreciate all the information you guys have giving me here though

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...