Jump to content
IGNORED

Question: Total Carnage Joystick Circuit


TheDevil'sCompass

Recommended Posts

Lately I've been thinking about how Total Carnage allows for 8 firing positions via the keypad. I like the idea but I hate having to use the keypad for it. I've got some arcade joysticks (8-way, 4 switches) laying around and was wondering how difficult it would be to make a proper two joystick setup for the game. I vaguely remember digital logic so I've attempted to draw out the diagram to handle firing up-left. The idea is to translate two joystick switches (up and left) into the correct Jaguar keypad buttons of 1 (up-left), 2 (up) or 4 (left). If this works, three more copies of this circuit would be needed to handle the rest of the positions (up-right, down-left, down-right). I believe each diagonal position could be accomplished with a 74LS08 for the And Gates and a couple of CD4069UBE Inverters.

 

Can somebody who knows more about circuits take a look at this and give me your input?

 

post-47457-0-73874000-1471554252_thumb.png

Edited by TheDevil'sCompass
  • Like 1
Link to comment
Share on other sites

Are you intending to create an replacement controller, externally OR the outputs of your joystick with those of the Jag Controller via some kind of adaptor or OR then outputs of your Joystick with the Jaguar controller via direct internal connection to the Jaguar controller PCB? Which one you intend will determine the circuit required as the Jaguar uses row/column addressing to read the controller (4 row of 6 bits).

 

As for the basic concept of your intended circuit assuming the swiches in your circuit are using the Jaguar convention of pulling the inputs of the AND gate low for active (closed) then I would expect the truth table to be...

s1 | s2 | 1 | 2 | 4 |
---|----|---|---|---| 
 0 |  0 | 0 | 0 | 0 |
 0 |  1 | 0 | 0 | 1 |
 1 |  0 | 0 | 1 | 0 |
 1 |  1 | 1 | 0 | 0 |

Not having access to the Total Carnage manual I am not sure what outputs are required however this would appear to be wrong as...

a ) I doubt you would be required to press 1, 2 & 4 on the keypad together as that would be rather difficult/clumsy and

b ) With no direction selected I out expect 1, 2 & 4 should all be High (inactive).

Even if the switches are making the inputs of the AND gates high you would still have the same problem, just when the inputs are reversed.

 

Personally as you appear to want to create a new stand alone controller I would use a PIC or some other type of microcontroller for what you are doing as one 28 pin PIC takes about the same space and is no more expensive than using logic if you have free access to a programmer otherwise you will have to hardwire replicate most of the row/column circuitry of the original Jaguar controller.

Link to comment
Share on other sites

Are you intending to create an replacement controller, externally OR the outputs of your joystick with those of the Jag Controller via some kind of adaptor or OR then outputs of your Joystick with the Jaguar controller via direct internal connection to the Jaguar controller PCB? Which one you intend will determine the circuit required as the Jaguar uses row/column addressing to read the controller (4 row of 6 bits).

For this one I was planning on interfacing the switches with the Jag controller PCB.

 

As for the basic concept of your intended circuit assuming the swiches in your circuit are using the Jaguar convention of pulling the inputs of the AND gate low for active (closed) then I would expect the truth table to be...

s1 | s2 | 1 | 2 | 4 |
---|----|---|---|---| 
 0 |  0 | 0 | 0 | 0 |
 0 |  1 | 0 | 0 | 1 |
 1 |  0 | 0 | 1 | 0 |
 1 |  1 | 1 | 0 | 0 |
Not having access to the Total Carnage manual I am not sure what outputs are required however this would appear to be wrong as...

a ) I doubt you would be required to press 1, 2 & 4 on the keypad together as that would be rather difficult/clumsy and

b ) With no direction selected I out expect 1, 2 & 4 should all be High (inactive).

Even if the switches are making the inputs of the AND gates high you would still have the same problem, just when the inputs are reversed.

 

I wasn't aware that the Jag pulled the inputs low. Sounds like I need the inverse of my current thinking. You're correct that Total Carnage does not require 3 keypad button presses to fire. Since I'm translating 2 switches to 3 possibilities I didn't see any other way of doing this. My truth table results were the same as yours. Isn't it saying that only one keypad button is active at any given time? I may not be understanding your points above. Point "b" sounds like the behavior I'm seeking too. If the joystick hasn't moved, no switches would be pressed so no signal would be sent to the Jag controller PCB. I feel like I'm missing what you're saying.

 

I think a PIC is beyond me at this point but I will consider it. Thanks for the info.

Link to comment
Share on other sites

My truth table results were the same as yours. Isn't it saying that only one keypad button is active at any given time?

 

No, remember an active Jaguar button press pulls the input low (active = 0), thus the truth table shows that either two or three outputs are always active even when there is no activity on the Joystick, thus your circuit will not function in the way you need it to.

 

The simple way to get your 8 directions would be to use a Quad 2 input OR gate, connect the common connection of the four switches to 0V and pull the normally open contact of the switch up to +5V via a 4K7 resistor. Connect the four points where the resistors are connected to the switches as follows...

Gate 1 = Up & Left switches, output = Keypad 1

Gate 2 = Up and Right switches, output = Keypad 3

Gate 3 = Down & Left switches, output = Keypad 7

Gate 4 = Down & Right switches, output = Keypad 9

 

Obviously the four cardinal directions would be mapped directly to 2, 4, 6, & 8 respectively (no logic required, at least not to generate a direction) assuming that keypad buttons 1, 2, 3, 4, 6, 7, 8, & 9 are being used for the eight directions, if not adjust accordingly.

 

Unfortunately things are not that simple when it comes to integrating that with the Jaguar controller because it uses a row/column addressing (like a numeric keypad), which means that if you were to just connect say the output for Keypad button 1 to the cathode of Diode D1 making it in parallel to the keypad switch you run into two problems.

The first problem is that if the output of the OR gate is high and someone presses keypad button one you will effectively be shorting the output of the OR gate to ground which could damage it.

The second is that due to the row/column nature of the Jaguar controller the active output for button 1 would also generate a output for keypad buttons 2, 3 and D-pad Right depending on which row is being read. The same applies to all the other outputs of the circuit I described as the switches require a permanent connection to 0V and are therefore their outputs are permanently active.

 

Problem 2 can be resolved by ORing the 8 direction outputs (4 from your Joystick and 4 from the aforementioned OR gates) with the relevant controller row strobe thus requiring another 8 OR gates, to resolve problem 1 just connect the Cathode (end with black line) of a 1N4181 diode to the output of each of the 8 OR gates (one diode per gate). Now connect your outputs in parallel with the existing controller buttons as follows...

Connect the Anodes of the diodes for outputs representing keypad buttons 1, 2 & 3 together and wire to the correct end of R3 (where the correct end of the resistor is the non common end, as one end of all the resistors mentioned are wired to 5V.)

Connect the Anodes of the diodes for outputs representing keypad buttons 4 & 6 together and wire to the correct end of R2

Connect the Anodes of the diodes for outputs representing keypad buttons 7, 8 & 9 together and wire to the correct end of R5

 

If all controllers are identically wired you can pick up the row strobes from the connector the controller cable is wired to, the row strobe connections are as follows...

Keypad buttons 3, 6 & 9 = wire connector pin 1 (Brown Wire)

Keypad buttons 2 & 8 = wire connector pin 2 (Red Wire)

Keypad buttons 1, 4 & 7 = wire connector pin 3 (Orange Wire)

 

Wire connector pins 7 (Green wire) and 9 (Violet wire) are +5V and 0V respectively.

 

That is the simplest non PIC solution I can think of, I have not tried Boolean simplification as I can't remember how (was never very good at it anyway) but I doubt it can be simplified and if you don't do it as above hopefully it will at least give you some ideas.

  • Like 2
Link to comment
Share on other sites

I think I made a mistake with the pin numbers for picking up the power, as I was referring to the pin numbers on the plug (Jaguar) end of the controller cable, not the connector where the controller cable plugs into the PCB. Hopefully the wire colours will be the same in all controllers but if in doubt you can always pick them up from U1, +5V from pin 20 and 0V from pin 10.

 

I have attached a schematic of the Jaguar controller which may help with your understanding of the row addressing, I would have included it yesterday but could not find it.

Note: The diodes corresponding to C1, C2 & C3 are for controller type & Team-Tap identification and so are not fitted in a standard Jaguar controller as they are not required.

post-3734-0-27389300-1472118632_thumb.jpg

Edited by Stephen Moss
  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...