Help debugging SNAC problem

GoreMcspace
Posts: 3
Joined: Tue Aug 04, 2020 9:52 pm

Help debugging SNAC problem

Unread post by GoreMcspace »

I got the SNAC adaptor today, connecting it to the Digital I/O board v1.2... and it doesn’t work. I have completely disassembled the NES controller to confirm that’s working, and checked all the soldering on the SNAC board. The problem seems to be pin 3 on the SNAC, which is the latch signal. On the oscilloscope that signal is never dropping below about 3.4 volts on the 5v side, and on the 3.3v side of the SNAC the latch pulses are barely distinguishable from noise. Tracked the pin back to the Digital I/O board and can see that the connection is good. That pin seems to go to a resistor array and then connects (I think) to the 2nd pin from the right closest to the serial port connector on the arduino header. On the scope there’s a clear latch pulse on that pin, but that signal is not getting through the resistor array (as far as I can tell). No latch, no NES controller.

Really trying to understand what’s going on here and where the fault actually is. Any help would be appreciated!!
bry111
Posts: 11
Joined: Tue Jul 21, 2020 12:31 am

Re: Help debugging SNAC problem

Unread post by bry111 »

Head-slap questions first...

You're using the NES core, and under Input Options you've set Serial Mode to SNAC?

What have you set the SNAC Zapper setting to, and are you using a Zapper?

Any chance that the Swap Joysticks option helps?

Have you tried setting Multitap to Disabled and Periphery to None? Unsure how these interact with SNAC, try ruling them out.

What about the UART mode (push right on the NES core menu)? I doubt it'll make a difference, but if it's not set to None maybe some Miracle Keyboard stuff might get in the way of SNAC...?

Are you actually playing a game that's trying to read the controller? If I understand correctly, SNAC is only connected to the simulated console, you'll need something else to navigate MiSTer menus.
GoreMcspace wrote: Tue Aug 04, 2020 9:59 pm I got the SNAC adaptor today, connecting it to the Digital I/O board v1.2... and it doesn’t work.
I think the "official" adapter comes in two parts... There are console-specific SNAC adapters but also a main SNAC board that just converts voltage levels and goes between the I/O board and the console-specific adapter. Do you have both? Or maybe some other adapter?
GoreMcspace wrote: Tue Aug 04, 2020 9:59 pm I have completely disassembled the NES controller to confirm that’s working, and checked all the soldering on the SNAC board.
What type of controller? Just a normal one with a d-pad + select + start + B + A buttons? Zappers don't use the latch signal, for instance.
GoreMcspace wrote: Tue Aug 04, 2020 9:59 pm The problem seems to be pin 3 on the SNAC, which is the latch signal. On the oscilloscope that signal is never dropping below about 3.4 volts on the 5v side, and on the 3.3v side of the SNAC the latch pulses are barely distinguishable from noise.
That sounds bad...
GoreMcspace wrote: Tue Aug 04, 2020 9:59 pm Tracked the pin back to the Digital I/O board and can see that the connection is good. That pin seems to go to a resistor array and then connects (I think) to the 2nd pin from the right closest to the serial port connector on the arduino header.
I'm not sure I follow you, but if my notes are correct, I traced the NES latch signal back to the SCL pin which is the pin on the 10-pin Arduino connector closest to the power jack. I think you're talking about the SDA pin, which is the NES clock signal and next to the SCL pin. But maybe I'm wrong.
GoreMcspace wrote: Tue Aug 04, 2020 9:59 pm On the scope there’s a clear latch pulse on that pin, but that signal is not getting through the resistor array (as far as I can tell). No latch, no NES controller.
On the I/O board, each SNAC data pin should be pulled up to 3.3v via a 10k ohm resistor in an array, and goes through a 100 ohm series resistor in another array. The SNAC board converts voltage levels using a BSS138 and resistors. Just a guess, if I was wrong above, maybe one of the resistor arrays on the I/O board has the wrong value or isn't connected?
GoreMcspace
Posts: 3
Joined: Tue Aug 04, 2020 9:52 pm

Re: Help debugging SNAC problem

Unread post by GoreMcspace »

Appreciate the “head slap” questions, could have done that that earlier. Is NES core (tried PAL, NTSC and Dendy modes), SNAC is enabled, Zapper set to Off, Periphery set to None, Swap Joysticks make no difference, Multitap disabled. UART is turned off. Am playing game trying to read the controller, have separate device for navigating menu. Is definitely a SNAC board and a NES adapter board for the SNAC.

Controller is a NES-004.

I could have traced the pins incorrectly, especially cos I was just trying to do it via looking at the board and there’s some silkscreen printing obscuring where the wires go next between two resistor arrays, but I’ll have another look at what the MiSTER is actually outputting on that pin then...

.. right, okay, I see that the furtherest right in is showing a 0v to 3.3v pulse at around 121hz which... that sounds pretty fast for something meant to be happening once a frame (I would expect 60hz) but maybe this is normal. I guess the question I need to figure out now is why this signal isn’t getting to the SNAC board (assuming it’s the right pin, although I have now found a PDF version of the schematic so that should help!)

Thanks for the help!!
User avatar
Brettster
Posts: 50
Joined: Mon May 25, 2020 9:44 am
Location: Leeds, UK

Re: Help debugging SNAC problem

Unread post by Brettster »

Have you tried another version of the core? I had a similar issue with the Nes core and a none official SNAC adapter and an older version of the core worked fine
Arcade, Video Game and Tech Junkie
GoreMcspace
Posts: 3
Joined: Tue Aug 04, 2020 9:52 pm

Re: Help debugging SNAC problem

Unread post by GoreMcspace »

Okay I tried going back to a year old version and didn’t make any difference, not sure how far back it’s worth going tbh. As far as I can tell the core is generating the right signals, it’s just not getting to the SNAC board :(
bry111
Posts: 11
Joined: Tue Jul 21, 2020 12:31 am

Re: Help debugging SNAC problem

Unread post by bry111 »

GoreMcspace wrote: Wed Aug 05, 2020 7:28 am .. right, okay, I see that the furtherest right in is showing a 0v to 3.3v pulse at around 121hz which... that sounds pretty fast for something meant to be happening once a frame (I would expect 60hz) but maybe this is normal.
That sounds normal for games that read the controller at least twice per frame to work around the NES hardware bug that playing back DPCM samples can occasionally corrupt controller input. If you check an NTSC game that doesn't use DPCM sample playback, it will more likely latch closer to 60hz.

Sorry I don't have any other ideas to add. :(
Post Reply