Using digital logic to control mvs pcb questions

toodles

Zero's Secretary
Joined
Jul 14, 2005
Posts
157
Hi all, electronics question for anyone who can help.

My end goal is to make an interface board between an MVS motherboard, and the jamma harness and kick harness of a cabinet wired for 6 buttons street fighter layout. I wanted some functionality in this interface to allow me to use button combinations to control the motherboard, such as hitting the 'roundhouse' and 'start' button to insert a coin, and eventually, button remapping.

I know how to tie the buttons on the cabinet to high with a pull up resister, and use it with the digital logic gates. What I do not know, and want some advice on, is how to use the logic to control the inputs on the motherboard. The only thing I can think of is to use a transister.
Here is a drawing of what I have in mind:
http://www.marcuspost.com/images/arcadelogic.bmp
Part enclosed in red represent the interface plugged in between the jamma harness (left) and motherboard (right).
Yes, the circuit in the bottom half is silly, but should make the MVS think the button is pressed when it is not, and visa versa. The point of the drawing is to ask if the digital output of the gates can 'turn on' the transister, and if the transister will make the MVS think the button is pressed when it gets a high from the logic gate.

Also, is there a better way of using logic to control the motherboard?

The end result Im hoping for is a circuit like this:
http://www.marcuspost.com/images/arcadelogic2.bmp
Which should trigger 'coin' when both roundhouse and start are pressed. There will be much more to this by the time I'm done, but I just need to know how to use digital logic to control the board. (Why not just tie roundhouse to coin? Because I dont want a bunch of 'TING!' during furious mashing.)
 

TerryMathews

Mr. Big's Thug
Joined
Aug 10, 2005
Posts
195
I'll show you the "easy" way to lay out a truth table map to get where you want to go. If you already know this stuff, please excuse me.

You need to set the two controls you want to use to variables (X = Roundhouse, Y = Start) and lay out the truth table. Z is your output, or the truth table of the IC you need.
Code:
  X   |  Y   |  Z
------------------
  0   |  0   |  x
  0   |  1   |  x
  1   |  0   |  x
  1   |  1   |  x

In this case, you want Z to be true only when Roundhouse (X) and Start (Y) are depressed.

Code:
  X   |  Y   |  Z
------------------
  0   |  0   |  0
  0   |  1   |  0
  1   |  0   |  0
  1   |  1   |  1

Simple, you need an AND2 gate. But... If I remember right, arcade buttons normally have voltage floating around them and drop to ground when they're depressed. They're negative logic devices, in other words.

So, in reality our truth table needs to look like this:

Code:
  X   |  Y   |  Z
------------------
  0   |  0   |  1
  0   |  1   |  1
  1   |  0   |  1
  1   |  1   |  0

Which is a straightforward NAND gate. Except... The digital ground from a NAND gate isn't going to cut it as a ground. So you need another piece of IC goodness: the tri-state buffer.

It's sole purpose in life is to connect things together when it's got a logic high signal and break the connection on logic low. So, we want to connect the Z output from the NAND gate to the control pin of the buffer. Input on the buffer should be ground and output be the pin on the motherboard you're trying to trip, whether it's coin insert or whatever.

Wash, rinse, and repeat for whatever buttons you need.

The arcade button side may be a little weak as I'm still new at that, but the DLD should be sound - that's not to say though that there might be a simpler shortcut method.
 

gamejunkie

Hijacked by a Spambot!
Joined
Aug 21, 2004
Posts
7,002
OMG actual uses for what they're shoving down my thoat. I have no idea where were doing, but I know it's boolean algebra... My instructor fucking sucks.

Please keep this thread going so I can learn! :buttrock:
 

toodles

Zero's Secretary
Joined
Jul 14, 2005
Posts
157
TerryMathews said:
It's sole purpose in life is to connect things together when it's got a logic high signal and break the connection on logic low. So, we want to connect the Z output from the NAND gate to the control pin of the buffer. Input on the buffer should be ground and output be the pin on the motherboard you're trying to trip, whether it's coin insert or whatever.
(Everything in your post is correct to my knowledge. The buttons are high when not pressed, and grounded low when they are. That is why the NOT's in my drawing, just for the sake of making things easier by making 'pressed' be true (high) and visa versa.)

So I should be using a tri-state buffer instead of a transister? Im not certain it would work. The descriptions of tri-state buffers I've read says there is three outputs; either a logical low, logical high, or 'high impedence' which is really nothing at all; the circuit won't even know its there. As far as I can tell, just connecting a logical low to the pin from the motherboard won't drive the voltage down so the motherboard thinks the button is pressed. If it were, I wouldn't need the buffer, I could connect my logic straight to it.

From what I understand, the pins on the motherboard are tied to high with a pull up resister, and the circuits on the mobo check if the button is pressed by checking if it is high (not pressed) or low (pressed). I can handle the digital logic, no problem. What I need is a way to 'ground' those pins, controlled by the logic chips, so the motherboard thinks they are pressed. The current idea is to use transisters, but I need to know from someone more knowledgable if it will work, and if there is a better way. I don't think a tri-state buffer will do it, since it will output with high-impence (which won't affect the motherboard in any fashion), or a digital high or low (which I could also send it via the normal logic gates).

gamejunkie: dont fear, its pretty easy stuff. Ill post up a schematic once I get it completed. It may be a few months though :)
 

TerryMathews

Mr. Big's Thug
Joined
Aug 10, 2005
Posts
195
toodles said:
So I should be using a tri-state buffer instead of a transister? Im not certain it would work. The descriptions of tri-state buffers I've read says there is three outputs; either a logical low, logical high, or 'high impedence' which is really nothing at all; the circuit won't even know its there. As far as I can tell, just connecting a logical low to the pin from the motherboard won't drive the voltage down so the motherboard thinks the button is pressed. If it were, I wouldn't need the buffer, I could connect my logic straight to it.

I hadn't used a tri-state in real life before, most of the stuff I do is only logic level and on the comp anyway.

Everything I said was right, except where I said tri-state relay substitute in relay. Digikey has a selection of IC-sized relays.

You've really got a couple of options as far as pulling the line level to ground, just look in the analog spectrum and you should be OK - digital stuff is where you run into trouble. I don't really know much about transistors, so you'll have to have someone else help you with them.


OR!!!!!

I just out-engineered myself. There's no need for IC logic here, everything can be done with wiring.

You want Roundhouse + Start to add a credit right? Connect start as normal to the jamma harness. But also connect NO from start to ground on Roundhouse. Connect roundhouse NO to coin add.

This is all presuming you don't need to use roundhouse for anything else.
 

toodles

Zero's Secretary
Joined
Jul 14, 2005
Posts
157
The roundhouse + start for coin is only a small part of what I want to do. :) Part of the goal of this is to avoid any rewiring: I want to be able to remove the motherboard and interface and put in a CPS2 fighter on a whim. Wiring also won't allow me to do the button remapping I want to do (key combination to toggle from short=A, jab=B, strong=C,fierce=D, and jab=A, short=B, strong=C, forward=D)

Relays could definitely do it, but I want to avoid them if I can because of reliability and latency issues.
 

J0e Musashi

Metal Slug Mechanic
Joined
Mar 22, 2004
Posts
2,191
Wouldn't it just be far simpler to add an extra button and have a 7-button CP? (4 across the top for MVS) It'd work with both MVS and CPS with no fuss.
The cab must have a service buttons for credits no? You could just as easily wire in some seperate coin in buttons.
It seems that your idea is too complicated for its own good.
 

TerryMathews

Mr. Big's Thug
Joined
Aug 10, 2005
Posts
195
toodles said:
Relays could definitely do it, but I want to avoid them if I can because of reliability and latency issues.

I don't see how you're going to get around it. Since JAMMA is a negative logic system, you've got to form a path to ground to trip the signal. If it were positive logic, you could just take your digital logic output and increase the voltage until it was high enough to trip the Neo.

The only other thing I can think of besides relays, is maybe are the controller ports different than the JAMMA edge? I mean, are the Neo controller ports positive logic by chance? Probably not, huh?
 
Top