Advanced Gravis ADB MouseStick

Mu0n

Active Tinkerer
Oct 29, 2021
609
560
93
Quebec
www.youtube.com
Back in 2019, I bought this iconic piece of gaming history with the hopes of using a passive converter (spoiler: doesn't work, it would need a microcontroller solution) to the old serial connect of a Mac Plus since of course, it doesn't have an ADB port. Still, I have plenty of machines that have ADB and it's cool to use it for them.

This joystick comes packed with customization - it doesn't merely detect signals on a X and Y axis and its push buttons, it interprets them through a programmable box (the GMPU, on the left in the picture) that contains an EEPROM, which you can affect through a configuation utility, which will define the size of the dead zone, whether you want to use it in absolute mode (ie the x-y position of the stick defines the x-y position of the mouse) or in relative (the quadrant in which the stick is and how far it is from the origin decides the direction and intensity of the motion). All of that data is treated electronically and digested and thrown back to the ADB bus as normal mouse signal information. Pretty neat, imo.

1635879060891.png


the only problem: the stick didn't work at all, only the buttons did. I tried multiple machines, multiple driver versions, multiple System versions. I was determined to figure out why. After all, in that summer,

1635881146045.png

GMPU Board - I crossed my fingers that the problem wasn't in there


The direction mechanism related to the stick is fairly simple:
The translation of the each direction trains a rotation of a plastic piece which makes a rotary encoded semi-transparent film with gaps (which looks like this: █ █ █ █ █ █ █ █ █ █), which passes between two pairs (each direction) of infrared DEL and photoresistor. By rotating, the signal should ressemble two sine waves slightly offset between each other. Which one is ahead determines if you go in the + or - direction of a given axis.

This is the joystick board with the D and Q pairs between which the film passes through:
1635881477489.png

The underside of that board is:
1635881716852.png


1635881495542.png

A closeup. At this point, I didn't know what was the nature of the damage and why *any* stick movement yielded absolutely no result. I feared that I'd have to replace those, I didn't know anything about their resilience.

My rationale was:

1) are the DELs dead? If they work in infrared, I can't see it under a cellphone video shooting, but I haven't tried it in pitch darkness yet
2) are the photocells dead? I have no idea if these components are fragile/sensitive/time limited. However, as you'll see below, something does happen when I try to manually trigger them
3) are the potentiometers broken/misaligned
4) bad solder joints - though I've tested most traces everywhere and I didn't detect anything bad


With the joystick disassembled, I tested it on a monochrome powerbook and could trigger an extremely small movement, despite the plastic housing not shielding anything from ambient light:



Next post: first tests I attempted
 

Mu0n

Active Tinkerer
Oct 29, 2021
609
560
93
Quebec
www.youtube.com
The first measurement I did with an oscilloscope borrowed from my work place was to check the signals output by the photoresistors:

I probed here:
1635881810667.png


and I was able to get a sinus signal going - the instability you're seeing is because this is driven by a piece of paper held with my hand. Otherwise, the DEL-resistor pair seems to be doing its job


So the problem was to be found further down the line. I checked the end result off of the ADB output that goes to a Mac and without a logic analyzer and the exact protocol, I wasn't going far with it, but it seemed 'normal' at least.

1635881935827.png


My first breakthrough was when I started checking the second step after receiving the rotary encoder's signal - it's sent ot an inverted Schmidt trigger chip, of which I knew absolutely nothing about before, but I learned that it should produce a square-wave like signal out of the sine when appropriate levels are reached - this starts up the transition between the analog world of mechanical movement to the digital on and off world, to be treated numerically with the deadzone algorithms and such from the eeprom.

I soldered temporary wires to check out some pins for each direction:
1635882124239.png


I turns out the Y signal, with its voltage reduced from the photoresistor (through a fixed resistance from a resistor network and a potentiometer), would send enough amplitude to make the Schmidt work and output something, but the X signal wasn't strong enough:

input on the Y axis (around 1.5 V if we're generous)
1635882285188.png
Output on the Y axis:
1635882257611.png


input for X (a bit close to 1V):
1635882362669.png

output: Schmidt decides to do nothing:
1635882386979.png


For good measure, I finally decide to reduce the resistances from the X and Y pots, make sure the start of the signal processing doesn't begin too low and that was it! The next steps down the pipeline receive enough juice to pass it to the next steps.

this is a table that compares the BEFORE >> AFTER values after I was confident of my solution.

1635883314538.png


What I assume was the cause of the problem:
  • The thin film of the rotary encoder will eventually get scratches because it's in contact with another static one in the cylindrical chambers that house them.
  • This will reduce the overal transparency between the pairs of LED-Photoresistors and not produce a sine signal that's high enough between min and max.
  • The datasheet of the inverted schmitt trigger recommends an above 2.8 V sine signal and I wasn't getting that for 3 of the 4 channels that are used on the chip.
  • Thankfully, the DELs are in series with one potentiometer each, which I carefully reduced a bit while everything was disconnected. I aimed to get between 3.00 V and 3.20 V for each of the 4 channels in the input, and successfully got my 5.16 V square wave output for all.
Future proofing:
  • Find a way to reduce friction for the rotating films (I have no idea where to start searching for this)
 
Last edited:
  • Like
Reactions: Kai Robinson