Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Help converting 49way to 8way.  (Read 2241 times)

0 Members and 1 Guest are viewing this topic.

SirPoonga

  • Puck'em Up
  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 8188
  • Last login:July 20, 2025, 03:37:24 pm
  • The Bears Still Suck!
Help converting 49way to 8way.
« on: January 22, 2007, 11:33:20 am »
I am going to be getting my hands on some 49ways joys (along with arch rivals circuits).  I plan on getting a multijamma and putting it in my double dragon 2 cabinet.  The issue is I need a way to convert the 49way on the fly.  Well, jus ta switch would be nice, would be cool to hook it into the multijamma some how.  But that's the least of my problems.

I need to convert it to 8way.  So, I am looking at the pinouts
http://epg3.tripod.com/sinistar.html

1 +5v
2 Up/Down switch A1
3 Up/Down switch B1
4 Up/Down switch C1
5 Up/Down Direction 1
6 Right/Left switch A1
7 Right/Left switch B1
8 Right/Left switch C1
9 Right/Left Direction 1
10 Key
11 Ground
12 //Not Used//

I would think a simple circuit of transistors or ands gates would work.  I need something that would be easily accessible from radioshack.  This is for repair purposes I can run someplace locally.  I'm not about to pay for the extra shipping cost for a small part and wait a couple days when I can buy it at the same prices and get it now.

Let's isolate the up/down axis.  Whatever I do for that will work for the other axis.  I need a way to switch based on that direction pin.  So I am thinking I need to wire the 2,3,4 pins in parallel then go through a transistor that uses the 5 pin as the switch.  Am I right?  What would the circuit look like?

u_rebelscum

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3633
  • Last login:April 21, 2010, 03:06:26 pm
  • You rebel scum
    • Mame:Analog+
Re: Help converting 49way to 8way.
« Reply #1 on: January 22, 2007, 03:39:42 pm »
Let's isolate the up/down axis. ....  I need a way to switch based on that direction pin.  So I am thinking I need to wire the 2,3,4 pins in parallel then go through a transistor that uses the 5 pin as the switch.  Am I right? 

I don't know the circuit, but let's cut from mame's source:

5432 (your pin number)
0000 = up full
0100 = up 2/3
0110 = up 1/3
x111 = center
1011 = down 1/3
1001 = down 2/3
1000 = down full

That x could be either 1 or 0 (depending on which 49-way you have), so you can't just go with switching on pin5.

Your exact circuit would depend on what sensitivity you want, but you'd want to translate the 4 switches down to two per axis.

The logic for the two easiest and IMO most likely used configs:

Most sensitive:
!pin1 and !(pin2 and pin3 and pin4) = up
 pin1 and !(pin2 and pin3 and pin4) = down
(The problem with the most sensitive is almost everything is diagonals.)

Less sensitive:
!pin1 and !pin3 = up
 pin1 and !pin3 = down

Other versions

"Less sensitive" + backup in case pin3 isn't working:
!pin1 and !(pin3 and pin4) = up
 pin1 and !(pin3 and pin2) = down

Least sensitive:
!pin1 and !pin4 = up
 pin1 and !pin2 = down


Someone else will need to help up with the circuit.
Robin
Knowledge is Power

SirPoonga

  • Puck'em Up
  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 8188
  • Last login:July 20, 2025, 03:37:24 pm
  • The Bears Still Suck!
Re: Help converting 49way to 8way.
« Reply #2 on: January 22, 2007, 04:16:12 pm »
Well, according to that sinistar site it seems like arch rivals uses the same stick.   Both sinistar and arch rivals joys are pictured above the pinout.  However, when I get the joys I will test the pins to verify.

The logic I understand.  I think a circuit could be made with some type of switch to switch the sensitivity.  So it's the circuit I need help on. 

Also, to get the sensitivity similar to the leaf switchs I'd have to move joystick on until the leaf's switch.  Then move the 49way joy the same angle and see what pins are active.

So there will be a bunch of experimenting to see what feels right.  I just need help on the electronics part.

Kremmit

  • - AHOTW -
  • Wiki Contributor
  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3165
  • Last login:June 17, 2025, 04:07:55 pm
  • Who the heck is that?
Re: Help converting 49way to 8way.
« Reply #3 on: January 22, 2007, 05:48:56 pm »
Quote from: BYOAC FAQ link=http://arcadecontrols.com/arcade_consoles.shtml
If you do happen to get your hands on a 49-way stick, Tim over at arcadecollecting.com has developed a circuit to use the 49-way in place of an analog (or hall effect type) joystick.  The circuit can also be modified slightly to pull double duty as an 8-way digital stick (using just the first sets of led contacts).

http://www.arcadecollecting.com/info/49way_to_Hall.gif

SirPoonga

  • Puck'em Up
  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 8188
  • Last login:July 20, 2025, 03:37:24 pm
  • The Bears Still Suck!
Re: Help converting 49way to 8way.
« Reply #4 on: January 22, 2007, 06:47:45 pm »
Ok, I sorta understand that.  Now how do I apply it to my situation.  Remember, I'm hooking up a real arcade machine, not a computer.  I need to convert a 49way to 8way, not analog.  There are no leds in that circuit.

From first glance I'd say I have to get rid of the resistors.  The resistance is what is making it analog-ish.

Thinking in terms of radioshack parts.  Maybe the 276-1712 LM339 Quad Comparator.  If I understand this pic I can use one of the comparators to compare pin 5 to pin 3 to determine if I pushed up.
« Last Edit: January 22, 2007, 06:50:22 pm by SirPoonga »

2600

  • Trade Count: (+7)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1630
  • Last login:June 05, 2017, 10:20:56 am
  • I want my own arcade controls!
Re: Help converting 49way to 8way.
« Reply #5 on: January 22, 2007, 08:46:05 pm »
You don't want to use a comparator, it would be a pain and I'd have to think.

I couldn't find any IC's on Radio Shacks site, but maybe they have them in the store.

! = not(inverter) gate
+ = and gate
If they don't have those, see if they have a nand gate those will work, too.

Use those to build URebel's "logic statement".  You'll need to invert the "logic" afterwards.

rockin_rick

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 495
  • Last login:May 27, 2017, 09:20:20 am
Re: Help converting 49way to 8way.
« Reply #6 on: January 23, 2007, 12:52:11 am »
I drew this up for you, I think it should work, however I don't know exactly how your stick and encoder works...  This is untested - perhaps someone could verify this?

Assuming....

5432 (your pin number)
0000 = up full
0100 = up 2/3
0110 = up 1/3
x111 = center
1011 = down 1/3
1001 = down 2/3
1000 = down full

This would be a circuit that has the center and the first 1/3 report as center.  U1 is a hex inverter, and U2 is a quad AND.  The logic is:

When pin 3 is high (up 1/3, center, and down 1/3), then invert it to low and feed it to both AND gates.  This input on the AND acts as an enable high.  When pin 3 is high (in the center), the enable is low and neither AND can turn on.

When pin 3 is low, it is inverted to high and acts as an enable for the ANDs.  Then the other input of the AND can pass through.

When pin 5 is low, it feeds the low to the "down" AND (U2b).  If the enable is on (the stick is not centered), then the low gets passed through.  Since pin 5 was low, the output of U2b is low, and the down output is off.  This does not turn on Q2 (the down driver).  At the same time, the pin 5 low gets inverted to a high through U1b, and fed to U2a.  Since U2a is enabled, the high gets passed through.  The up AND gate is on and turns on Q1 (the up driver).

Both AND gates feed transistors (through current limiting resistors) configured as open collector buffers.  When the output of the AND gate is high, it turns on the transistor and it pulls the collector (connected to the encoder) low.  (This is assuming that your encoder pulls the line high to mean off.)

You can also connect other switches (that switch to ground) to the encoder without problems.

To do right and left, you can use the leftover gates in U1 and U2.  U1 usually would have 6 inverters in it, and U2 usually has 4.

The resistor should be about 1K to 10K depending on drive current of the AND and sink current required by the encoder (determined by the pullup).  EDIT: 12.5K min for 74xx TTL that has a drive current of 0.4mA max

Hope this helps,
Rick
« Last Edit: January 23, 2007, 01:19:54 am by rockin_rick »
If I do not respond to your post in a timely manner, feel free to PM me.

rockin_rick

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 495
  • Last login:May 27, 2017, 09:20:20 am
Re: Help converting 49way to 8way.
« Reply #7 on: January 23, 2007, 01:18:14 am »
I just did some checking into the specs on the drive currents available on 74xx series TTL chips and it seems that they are somewhere about 0.4mA.  This would mean that your current limiting resistor driving the transistor would have to be at least 12.5K (@ 5V) otherwise the transistor will draw too much current from the gate and ruin it.

Rick
If I do not respond to your post in a timely manner, feel free to PM me.

SirPoonga

  • Puck'em Up
  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 8188
  • Last login:July 20, 2025, 03:37:24 pm
  • The Bears Still Suck!
Re: Help converting 49way to 8way.
« Reply #8 on: January 23, 2007, 05:39:23 pm »
BTW, I am going to do this in stages.  First I want to make sure I can switch the 49way to 8way.

Then I need to switch the joystick pins between the arch rivals interface board and the 8way circuit (that will connect to multijamma).  Do I need to switch the ground?  I could see ground loop being a problem possibly, even though it is just switches.  I don;t know how the multijamma does it's switching so I better switch the ground pin also to be safe.  5v doesn't need to be switched since the joys always need power.  I will somehow get power maybe, right from the transformer.

The switching should be easy.  I have to find out how the multijamma works but lets assume I can find an input for some transistors.  I think I would have to have two transistors per each pin, one a NPN and one a PNP. I want it so when there is no input to the base of the transistors that the 49way works normally for arch rivals.  That would mean the PNPs would control the 49way interface and the NPNs control the 8way circuit.  Or do I have my NPN and PNP backwards?  I'll try to draw up the idea sometime.

rockin_rick

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 495
  • Last login:May 27, 2017, 09:20:20 am
Re: Help converting 49way to 8way.
« Reply #9 on: January 26, 2007, 11:15:41 pm »
BTW, I am going to do this in stages.  First I want to make sure I can switch the 49way to 8way.

Then I need to switch the joystick pins between the arch rivals interface board and the 8way circuit (that will connect to multijamma).  Do I need to switch the ground?  I could see ground loop being a problem possibly, even though it is just switches.  I don;t know how the multijamma does it's switching so I better switch the ground pin also to be safe.  5v doesn't need to be switched since the joys always need power.  I will somehow get power maybe, right from the transformer.

The switching should be easy.  I have to find out how the multijamma works but lets assume I can find an input for some transistors.  I think I would have to have two transistors per each pin, one a NPN and one a PNP. I want it so when there is no input to the base of the transistors that the 49way works normally for arch rivals.  That would mean the PNPs would control the 49way interface and the NPNs control the 8way circuit.  Or do I have my NPN and PNP backwards?  I'll try to draw up the idea sometime.

First off, I'd like to clairify my background.  I am not an EE, but rather an (extreme?) electronics hobbiest. 

I would definitely test the interface to see if you are happy with the conversion.  I assumed that the inner ring should be center, as u_rebelscum pointed out, using those makes for very small cardinals and large diagonals.  If I was to do this, I would probably use a microcontroller to the conversion and that would also add the ability to add and adjust mapping.  I've read before that you do some PIC programming - I do some myself.  It would be super easy to us a PIC and not much more money to do the conversion.  One PIC could convert 2 joysticks super easily.  Use a 40 pin part, such as a PIC16C64 or PIC16F874.  Connect one joystick (7bits) to port B, the other to port C.  Connect an IC such as the ULN2803 to port D in place of the open collector resistors - low nibble for one joy, high nib for the other joy.  The low nibble can be P1 joy up, down, left, and right, while the upper nib is P2 u,d,l,r.  Setup a jump table of RETLW's that contain all 128 combinations of the 7 bits (some are invalid and should never be jumped into).  The table will have only the lower nibble used.  Those 4 bits will be your up, down, left, and right (and ultimately sent to the ULN).  The input of the table (jump amount) is determined from the joystick bits.  Have the code first read P1 joystick - read the port (the 7bits), mov to W.  Call the jump table.  Then OR the returned value (which is just the low nib) into a variable that holds the outputs.  mov that to port D.  (avoid read-modify-write issues).  Then read P2 joystick into W.  Call table.  Swap nibbles upon return.  OR into variable that holds the outputs.  mov to port D.  Repeat.

You could add a switch to a pin or two and easily change between different maps - say tight deadzone, greater deadzone.  With your application it's probably not necessary once you've got it dialed in how you want it...  But it could be a jumper and pretty cheap and easy to implement... 

I checked out the schematic for arch rivals.  The joy connects to the interface board, then right to the game board without modification.  The joy outputs feed through 10K resistors and then are tied high through 100K resistors, and bypassed with 100pF caps before going to 74HCT244's.  I would think that you could just tap off of the joystick data lines to your new circuit as long as both are always powered.  It should control both simultaneously without fancy switching as long as your new circuit doesn't load the line too much. 

Does the joystick when not connected to anything other than power pull high for 1 and pull low for 0?  Or does it just pull low for 0, and float for high (which then is tied high to pull it up)? 

I don't know how the multijamma switches.

Even if you didn't go with the µC and used the discrete logic, I'd still use the ULN2803 instead of transistors, esp. since you will need 8...  (remember to check the drive current required by the ULN and the amount provided from the logic).  Perhaps not as easy to acquire, though...

Rick
If I do not respond to your post in a timely manner, feel free to PM me.

Arshad

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 16
  • Last login:August 07, 2011, 08:12:05 pm
Re: Help converting 49way to 8way.
« Reply #10 on: May 22, 2008, 01:50:13 pm »
Sorry for digging up an old thread, but it's exactly what I'm trying to do and had some questions:

I'm currently in the process of researching building my own standup mame cabinet.  As part of this, I was at an arcade clearance place and picked up a few interesting pieces including a Gauntlet Legacy control panel.  This comes with 4 x 49way joysticks and all buttons with microswitches/wiring, etc.  I'm going to be ordering 2 x U360's and buttons from Ultimarc for my regular CP, but thought this would be a great alternate CP for when I have some friends over to play gauntlet.

The CP has the joystick and buttons for each player coming out to a 14 pin connector (although some of the pins appear to be missing on some connectors).  I'm assuming the button wiring is going to be a matter of directly connecting the wire to the encoder.  For the joystick, as far as I can tell, I have 3 viable options:

1) Buy a 49way to USB encoder from GGG
2) Use the simple circuit posted by rockin_rick
3) Use a PIC as suggested by rockin_rick

I'd like to explore options 2+3 to save cost and because it would be fun to do...

Based on the MAME tables above, I verified that the logic by rebelscum for most/less/least sensitive are correct, and that the "less" logic maps to the circuit posted by rick.  I don't have any electronics experience but it looks like a fairly simple circuit to build and test.  Has anyone actually built it? 

The PIC option looks interesting because of the flexibility of different sensitivity profiles and ability to handle two sticks per PIC.  I have zero experience using PICs, but do have a lot of low level programming experience and the logic described by Rick seems pretty easy to implement.  My question is:  Doesn't each joystick need to feed in 8bits, and not 7 bits?  I'm also assuming that instead of setting up a 256 entry jump table you could separate out the nybbles for up/down and left/right as two 16-entry tables if memory footprint is a concern?  (Then OR the two return values and output to port D as originally described by Rick)

The PIC method sounds really interesting to me, but I'm not clear on what other electronics components need to "glue" all this together?  Has anyone implemented either of these methods?