Why won't my unofficial SNES adaptor work with Super Gameboy?

So recently I made myself a custom SNES Joystick. I'll be posting about that later, but I noticed that it wouldn't work with the Super Gameboy, despite working with other SNES games. I also noticed that my third-party PS2 to SNES adaptor as well as my NES to SNES adaptor wouldn't work either! Something is clearly up with the Super Gameboy.

So I bought an oscilloscope.

First, here's a fairly good reference for the SNES connection scheme which will provide some background information.

Here's how the latch and clock lines look on the scope for a normal game:
latch pulse prior to normal clock sequence

And here's the corresponding data lines for one button pressed:
clock sequence with data line low for one clock pulse

And because the lines overlap a bit, here's it zoomed for clarity:
zoom of data line low for one clock pulse

Now, the above also applies for the Super Gameboy... most of the time. However, it sometimes does this with the clock and latch lines:
latch pulse high for multiple spike pulses on clock line

It appears to be holding the latch line high for a rather large period of time (\~100 us), and sending strange pulse spikes on the clock line. I can't think of any specific reason the Super Gameboy is doing this, unless it is intending to trip up unofficial controllers. And trip them up it does.

An official controller completely ignores this sequence and does nothing (note: a button is pressed here):
data lines showing no response to spiked clock pulses

However, my custom joystick, and presumably other adaptors see the rising edge of the latch line and load the button data. Then the small clock pulses are sufficient for the microprocessor to recognize and shift the data out:
custom controller reporting button during spiked clock pulse

Even the NES controller is tripped up by this, as it contains a simple shift register which will latch on the high pulse and is sensitive enough for the clock pulses.

Unfortunately, I don't really have a solution. I'm presently using interrupts, and I can't see a way to get the microprocessor to ignore the abnormal clock pulses. Theoretically, it might be able to detect the too-long latch and switch to some other mode, but that might be difficult to detect while still remaining responsive enough for the normal sequence.

The only advice I have at this time is to use a SNES gamepad as a donor and use the exact same chip on a custom joystick if you want Super Gameboy support.


Add a Comment
Comment Atom Feed