Forums

Sega Master System / Mark III / Game Gear
SG-1000 / SC-3000 / SF-7000 / OMV
Home - Forums - Games - Scans - Maps - Cheats - Credits
Music - Videos - Development - Hacks - Translations - Homebrew

View topic - Do the controller signal lines need to be completely isolated from each other?

Reply to topic
Author Message
  • Joined: 26 Aug 2022
  • Posts: 21
Reply with quote
Do the controller signal lines need to be completely isolated from each other?
Post Posted: Fri Sep 02, 2022 12:59 am
I have an arcade stick I built for my PS2, and I was thinking of adding a db9 cable to it so it would also work on a SMS or MD. So I'd solder the cable directly to the microswitches. The problem is that the switches are also soldered to the PS2 controller PCB, so they all go to a microprocessor. And so, the resistance between the switches' lead legs, instead of being infinite, is around 8k ohms. And the resistance between the lead legs and the ground is around 6k ohms.

Will that be a problem regarding input recognition, and, more importantly, can it harm my SMS in any way?
  View user's profile Send private message
  • Joined: 06 Mar 2022
  • Posts: 598
  • Location: London, UK
Reply with quote
Post Posted: Fri Sep 02, 2022 7:16 am
Do you mean that one side of the switch is open, the other side of the switch is connected to ground via a 6k resistor and that there is an 8k resistor across the switch?

If so, then that won't work at all because the 6k resistor and the pull up in the SMS will conspire to create a roughly 2.5v constant signal into the port.

You need the switch to drive the signal to 0v when activated as the lines are active low.

The two TR switch inputs in the SMS also have a series resistor between them and the data port, so that port 3f (i/o control / region detection) can't cause a short if activated when someone is pushing the button.
I'll send some schematic sketches if I get a moment.

Also: aren't the ps2 controller switches pressure sensitive?
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 14690
  • Location: London
Reply with quote
Post Posted: Fri Sep 02, 2022 7:18 am
The SMS controllers work by shorting pins to ground, so they must be held at 5V by the system and it’s OK for them to be shorted to ground. Any connection between the pins is therefore OK except for connecting 5V to ground, which you shouldn’t need anyway. However it’s possible the buttons will be seen as pressed by the Master System if the resting resistances to ground are much less than the internal pull up resistors.
  View user's profile Send private message Visit poster's website
  • Joined: 06 Mar 2022
  • Posts: 598
  • Location: London, UK
Reply with quote
Post Posted: Fri Sep 02, 2022 8:18 am
Sorry, I realise that at least some of my earlier comment (about one side of the switch being open) was possibly nonsensical (I'm not a morning person...), but am curious to understand a bit more about exactly how your switches are connected.

I scouted around for a ps2 controller schematic and found a few which suggested that the switches should be driving the signal to gnd which is what you want. If by the 8k resistance you actually meant the resistance measured between the active side of two different switches then that is probably nothing to worry about – it's possible that you're just seeing two pull-up resistors connected in series via the Vcc plane, although if I'm being sceptical I might have expect that to be a fair bit higher than 8k, although it's certainly possible.

The 6k resistance (to ground) is the one I'm most confused about so any more info you have to explain how you're measuring that might help, i.e. which side of the switch are you measuring that on, and is it constant or only when the switch is open / closed?

Also assuming that you definitely aren't planning on powering up the controller board while trying to use this as an SMS controller?
  View user's profile Send private message Visit poster's website
  • Joined: 26 Aug 2022
  • Posts: 21
Reply with quote
Post Posted: Fri Sep 02, 2022 2:09 pm
Sorry, I realised my explanation could be confusing but I'm just not very good at explaining technical stuff I'm not 100% sure about.

willbritton wrote

Also: aren't the ps2 controller switches pressure sensitive?


There aren't any actual switches in a PS2 controller except for the R3 and L3 buttons, all other buttons are regular rubber pads and it's the flex pcb below them that's pressure sensitive. But that's only for 1st party controllers.

What I have is a set of arcade microswitches soldered to a 3rd-party pcb that lacks the flex pcb part. AFAIK on the PCB the leads and ground go to a microcontroller which processes the inputs into a PS2-compatible signal and is responsible for the measured resistances.

willbritton wrote
The 6k resistance (to ground) is the one I'm most confused about so any more info you have to explain how you're measuring that might help, i.e. which side of the switch are you measuring that on, and is it constant or only when the switch is open / closed?


If I measure the resistance between the leads of two different switches I get 8k ohms. If I measure between the lead of any switch and ground I get 6k ohms when open and 0 ohms (as expected) when closed.

Maxim wrote
The SMS controllers work by shorting pins to ground, so they must be held at 5V by the system and it’s OK for them to be shorted to ground. Any connection between the pins is therefore OK except for connecting 5V to ground, which you shouldn’t need anyway. However it’s possible the buttons will be seen as pressed by the Master System if the resting resistances to ground are much less than the internal pull up resistors.


That's how I figured it worked, so I guess what I wanted to ask is if a 6k ohms resting resistance to ground is too low and if the 8k ohms resistance between the leads could cause the SMS to somehow mix up the buttons.

willbritton wrote
Also assuming that you definitely aren't planning on powering up the controller board while trying to use this as an SMS controller?


Yes, of course, the controller would never be connected to the PS2 and SMS at the same time so the board would never be powered on while using it as an SMS controller.

To make sure we're all on the same page I'm annexing pictures of the controller and an overly simplified schematic with only buttons 1 and 2 and what we know about the PS2 side.

Yes, all my stuff is always dusty like that and I have to clean my consoles pretty much everyday to avoid it. I think it's due to the huge amount of cargo truck traffic on my street.
photo1662127554.jpeg (223.09 KB)
photo1662127554.jpeg
ndice.jpeg (297.04 KB)
ndice.jpeg

  View user's profile Send private message
  • Joined: 06 Mar 2022
  • Posts: 598
  • Location: London, UK
Reply with quote
Post Posted: Fri Sep 02, 2022 2:24 pm
Great, thanks for the clarification!

So if that's really true that you measure 6k between the signal to the SMS and ground then I think it's not going to work as I suspect the 6k is going to be too small to give you a good high signal into the SMS; most likely it will give you somewhere roughly midway between +5V and 0V. The Z80 requires VH to be no less than 2.2V, so you could maybe connect it all up and then measure the steady state voltages on the inputs with no switches depressed. If it's substantially more than 2.2V you should be fine. Depressing the switches should work as expected to drive the voltage right down to 0V but you could measure that too. The only place you won't find it go to 0V is on the TR button (and TH if you have that connected) - there it will be something slightly higher due to the protection resistor, but should be no more than 0.8V when the button is depressed.

I doubt you're at risk of causing any damage to your SMS if you wire up the controller appropriately to the I/O port, and assuming that everything you've measured and described above is accurate.

EDIT: to clarify, when I said connect it all up, I meant to the SMS and power the SMS up. The gate array chip in the SMS has active pull-ups, so it needs power to give you the right effective resistance.
  View user's profile Send private message Visit poster's website
  • Joined: 14 Aug 2000
  • Posts: 740
  • Location: Adelaide, Australia
Reply with quote
Do the controller signal lines need to be completely isolated from each other?
Post Posted: Sat Sep 03, 2022 4:19 pm
In the photo it looks like the microswitches are SPST. If you replaced 6 of them with SPDT microswitches, you could wire one side of the switches to the PS controller, and the other side of the switches as the SMS controller. That would give you 2 independent circuits with a common ground which should be OK. The SMS circuit would need a hex inverter to flip the signal levels the right way around but that's not too complex to do with some veroboard, a 74HC04, some resistors and a couple of caps.

Anyway that's just one possible solution. Sing out of you want to go that route and need some help with the circuit.
  View user's profile Send private message
Reply to topic



Back to the top of this page

Back to SMS Power!