AtariAge Forums: Paired Joysticks - AtariAge Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Paired Joysticks

User is offline trucker_monkey Icon
Posted Mon Nov 2, 2009 10:25 AM


  • Icon
  • Space Invader
  • PM this member
  • Posts: 19
  • Joined: 26-October 09
First please excuse my lingua, I am an engineer, but I'm trained as a Civil/Hydrological/Geological Engineer and most of what I know about circuits I taught myself when I took the FE.

I was looking at the schematics for the Atari 2600 accessories & I found a brainstorm that I was thinking upon.

Couldn't you use the Keyboard pin inputs only use a split connector connected to two joysticks that used the same signal scheme. Mind you the end result is that since I was a kid I've thought it would have been awesome to have 4-player Combat.

So I'm planning this out (I only have two extra joystick cases as well as 4 additional joysticks). I'm thinking about what it would take to talk a homebrewer into modifying this (I can code but unless you are talking a groundwater/earth-tide model in FORTRAN or C++ I'm lost, and the Atari would be a definite learning curve), and it seemed like the main problem would be controller access for the community.

This brings up the problem of making paired joysticks and being able to distribute them (I doubt I have enough time to be the primary manufacturer for THAT project). This leads me to is there a way to simplify this process.

I have come up with two ideas to this ends.
#1 create 2 boards & 1 connector to make a home modify kit for existing joysticks (probably modeled after the CX-40).

#2 make an adaptor that takes input/output from joysticks and returns input for the keyboard controller.

For all intents #2 appears the easiest to manufacture and sell/distribute, BUT I quickly realized that it is beyond my own current technical know-how. So I am looking into insight for this idea.

I've got to go but I'll check back on this later tonight.

This post has been edited by trucker_monkey: Mon Nov 2, 2009 10:26 AM

0

User is offline BigO Icon
Posted Mon Nov 2, 2009 10:40 AM


  • Icon
  • River Patroller
  • PM this member
  • View blog
  • View gallery
  • Posts: 2,485
  • Joined: 05-February 07
  • Location: Phoenix, AZ
There isn't a keyboard input per se on the 2600, just the two 9 pin inputs. However, the keypad controller shows that 12 keys can be read from an x-y style matrix keypad which would be enough for two joysticks (5 inputs each) so the 2600 is capable of running software to handle that much input. There have been other schemes kicked around in the forums here. If I run across any of the discussions, I'll link here.

This post has been edited by BigO: Mon Nov 2, 2009 10:44 AM

0

User is offline BigO Icon
Posted Mon Nov 2, 2009 8:26 PM


  • Icon
  • River Patroller
  • PM this member
  • View blog
  • View gallery
  • Posts: 2,485
  • Joined: 05-February 07
  • Location: Phoenix, AZ
One discussion: http://www.atariage....1&#entry1283063

Another: http://www.atariage....493-ive-got-it/

The 4 player combat idea seems to be pretty universally appealing.

This post has been edited by BigO: Mon Nov 2, 2009 8:52 PM

0

User is offline trucker_monkey Icon
Posted Mon Nov 2, 2009 10:39 PM


  • Icon
  • Space Invader
  • PM this member
  • Posts: 19
  • Joined: 26-October 09
Thanks BigO, I was trying to output in a format similar to the Keypad controllers to make it easier to adapt for the programmers, BUT I'd forgotten the need to move diagonal (I'll have to take codebreaker into the church and try multiple key combinations but I don't think it will work satisfactorily).

I guess in short that before I begin this project I should learn more about programming. It's been a while and I had forgotten how much hardware and software are linked when you deal with Assembly and these older machines.

On another note has anyone heard anything about these other two projects?

almightytodd from http://www.atariage....joystick-games/ appears to still be active,

but

Cupcakus from http://www.atariage....493-ive-got-it/ doesn't appear to have posted since 2005, (kind of sad as he appears to have been the one who had gotten the farthest).

So given my general free-time availability look for the 4-player joystick adapter in 2012.

This post has been edited by trucker_monkey: Mon Nov 2, 2009 10:40 PM

0

User is offline BigO Icon
Posted Mon Nov 2, 2009 11:27 PM


  • Icon
  • River Patroller
  • PM this member
  • View blog
  • View gallery
  • Posts: 2,485
  • Joined: 05-February 07
  • Location: Phoenix, AZ
The Sega Genesis controller operates on a principle that's potentially applicable to a 4 joystick 2600 project. I've seen other people discuss similar schemes, if not this exact same thing.

The Genesis controller has two "registers" or sets of buttons, the output from which is fed to the console over a single set of input lines. I forget what Sega called it (select, maybe?), but there's one output line from the console to the controller that specifies which of the two registers is to be polled. If that bit is set to 0, the output from one group of buttons is applied to the input lines. If that bit is set to 1, the output of the other grouping is applied to the input lines.

In this way, a larger number of buttons can be multiplexed and read by the console without having dedicated lines for each button.Since the register selection is under software (game) control, the software knows how to interpret the signals on the input lines when the controller is polled.

The 2600 has 5 digital lines per controller port. This satisfies the requirements of a single digital controller. With the proper manipulation, one (or both) of the paddle "input" lines could be used as an output to control a multiplexer chip that would allow reading of two sets (or more) of joysticks per port.

I have proposed in some post around here, that an adapter might be able to be constructed to allow the 2600 to read the full complement of buttons from a 3 button Genesis controller (4 directions plus 4 buttons: A,B,C,Start). I never tried it, but in my mind it works. Posted Image

Just my round-about two cents.


[Edit: the forum editor has recently begun ignoring line breaks in my postings when using the Chrome browser. Stripped line breaks now added back in.]

This post has been edited by BigO: Mon Nov 2, 2009 11:32 PM

0

User is offline intvnut Icon
Posted Tue Nov 3, 2009 12:10 AM


  • Icon
  • Chopper Commander
  • PM this member
  • Posts: 116
  • Joined: 01-July 07
I'm not an Atari expert, but glancing at the VCS documentation, it appears the port responsible for reading the joysticks has a data direction register. Couldn't you simply set one controller to output and the other to input and matrix scan? This is how the Intellivision ECS keyboard works to allow a 49-key keyboard to hook up to two 8-bit I/O ports.

Judging from the RIOT data sheet, you write to the data direction register to configure 4 controller pins as outputs, leaving the remaining 4 as inputs. Then, connect those 4 outputs to a 4-to-16 decoder for your row-select into your keyboard matrix. You could then have a 16x4 = 64 key keyboard scanned this way. Scanning wouldn't be particularly fast, though, with 16 rows + debounce time.

Alternately, if you just want to allow for four standard joysticks to multiplex into one game, set one controller port to output, the other to input, and "matrix scan" the four controllers by pulsing one line at a time high from the output side to sense one of the four controllers from the input side. There are cheap ways to do this.
0

User is offline Bruce Tomlin Icon
Posted Tue Nov 3, 2009 6:54 AM

    • CD C9 01


  • Icon
  • River Patroller
  • PM this member
  • View blog
  • Posts: 3,342
  • Joined: 20-February 04
  • Location: Austin, TX
Without looking at anything, it seems to me like you could do it. First of all, you would absolutely need diodes on every one of those switches to avoid ghosting, just like Colecovision controllers use. (Unless you went all the way and did something with TTL chips, that is.) Ghosting is okay for keyboards, but not for joystick inputs.

The best way to package it would be to simply create an adapter that has a plug and two jacks, then you wouldn't need to hack up any controllers (other than to get a plug with sufficient wires).

It would be nice if you could do like the Colecovision and use the extra two pins for select signals, but on the Atari those are the paddle inputs, which have to be used as inputs. And in fact, that's why reading keyboard controllers is less than trivial. You have to delay like two full WSYNCs after selecting each of the four rows, then each of the columns is on a different TIA input. For both ports, that's a total of six inputs you have to collect per row.

(Hmm, I wonder what you could do by hooking up the row outputs to a decoder chip. 30 keys per port with a 4-to-10 decoder, and 48 keys with a 4-to-16 decoder. That's not exactly awesome, but it's interesting. Basic Programming would have been less annoying.)
0

User is offline BigO Icon
Posted Tue Nov 3, 2009 7:14 AM


  • Icon
  • River Patroller
  • PM this member
  • View blog
  • View gallery
  • Posts: 2,485
  • Joined: 05-February 07
  • Location: Phoenix, AZ

View PostBruce Tomlin, on Tue Nov  3, 2009  5:54 AM, said:

It would be nice if you could do like the Colecovision and use the extra two pins for select signals, but on the Atari those are the paddle inputs, which have to be used as inputs.


Couldn't a paddle line be used as an output sufficient to control a multiplexer? In order for the paddles to work, the line has to be pulled low (to discharge the cap). That low should appear at the pin on the port. Once the cap has charged sufficiently (through an external pullup resistor), there would be a high on that pin at the port. At least that's the way I see it without any actual circuit building, software writing or testing of any sort whatsoever.
0

User is offline Bruce Tomlin Icon
Posted Wed Nov 4, 2009 7:55 AM

    • CD C9 01


  • Icon
  • River Patroller
  • PM this member
  • View blog
  • Posts: 3,342
  • Joined: 20-February 04
  • Location: Austin, TX

View PostBigO, on Tue Nov 3, 2009 7:14 AM, said:

Couldn't a paddle line be used as an output sufficient to control a multiplexer?

Maybe. Start by leaving the outputs undumped most of the time. Then read the joystick inputs, dump the paddle outputs, delay a scan line or two, read the joystick inputs again, then undump. You would want a 7414 gate hooked up to one of the outputs for the joystick select since it's an analog signal.

This would even read faster than faking a keypad. Both paddle outputs dump at the same time, so you can't use them separately, but one is enough. It looks like a 7414 and a pair of 74157 chips would do it. If you made it work with both ports, you would only need a third 74157. Total bill of materials: 1x7414, 3x74157, two 9-wire plugs, four D9M jacks. If you're cheap, you can probably replace the 7414 with a 2N2222 transistor. And as long as you don't use CMOS 74xx chips, you don't even need pull-up resistors.

I wouldn't wire up the two joysticks without a 74157 chip to multiplex them, though. If you simply wired the paddle output to the ground of one stick and an inverted paddle output to the other, it would create a shorted path if both players pressed the same buttons.

Also, it just occurred to me that the 4x3 keypad wiring method would not work for two unmodified sticks, because all five buttons are wired to a common line. You would have to run them through a multiplexer, and the result would likely be more than three chips.

However, you could probably configure a joystick pin as a select output to some 74157 chips, then re-wire that input from the joysticks to one of the paddle inputs. You could use the other paddle input for a second fire button, or you could even hijack two joystick pins for select outputs and have EIGHT joysticks with 74153 multiplexers. But input would be slow like with scanning a keypad.
0

User is offline BigO Icon
Posted Wed Nov 4, 2009 2:11 PM


  • Icon
  • River Patroller
  • PM this member
  • View blog
  • View gallery
  • Posts: 2,485
  • Joined: 05-February 07
  • Location: Phoenix, AZ
Using multiplexer chips seems the most reasonable and straightforward way to handle two joysticks per port.Though it might not truly, technically be a pullup resistor, I think you'd need some resistor connected between the paddle line and 5v to assure that the capacitor charges reliably to a logic 1. If I recall correctly, that's what they're doing in the keypad controller.

I'd be tempted to try it without the 7414. I think either way you're going to want to wait some period of time after releasing the "dump" to try to read that joystick again. While the Shcmitt trigger's hysteresis will filter out the "bouncing" while the analog signal is in the indeterminate range, it doesn't seem like you could rely on the output until a certain amount of time (capacitor charge) had passed anyway. In other words, it wouldn't mean you could immediately switch from a 0 to a 1 on the mux select line so to be safe you'd have to wait anyway. This might be a more meaningful statement if I knew how fast that paddle line could charge. The wait time may be immaterial.

As eluded to by Bruce, my choice would be to read through the mux with select line high, then quickly switch it to a low by dumping the charge. That should be a quick and reliable cycle for reading both joysticks on a port.

On a related note about the discharge time and something to watch out for in this multiplexer scheme: I ran into some problems with a custom controller I was building for the 5200. It employed an external capacitor to slow down the charge time in compensation for a 100K pot which is much smaller than the 500K in the OEM controller. What I ran into was that it worked for most games, but not all. My conclusion was that the discharge circuit is current limited (duh) and the problem games didn't hold the discharge cycle long enough to discharge the larger capacitance. I'm not positive whether the reading cycle is software controlled in the 5200.

This post has been edited by BigO: Wed Nov 4, 2009 2:13 PM

0

User is offline trucker_monkey Icon
Posted Wed Nov 4, 2009 6:06 PM


  • Icon
  • Space Invader
  • PM this member
  • Posts: 19
  • Joined: 26-October 09
Here's what may be a stupid question, how does the 2600 read the pot on a paddle.

My thought is for the joystick mechanism could you simply switch pin 8 to pin 7 for both joysticks and the place the appropriate resistor on the back path of the joystick to mimic a place on pot of a paddle like below.

Paddle Pot - 1MΩ

___Joystick Resistors_____Output results
______Up-0.25MΩ__________575KΩ_250KΩ_375KΩ
__________|___________________\__|__/
_Left___--_--___Right____325KΩ-_____-125KΩ
0.325MΩ___|____0.125MΩ________/__|__\
______Down-0.5MΩ_________825KΩ_500KΩ_625KΩ


The resulting output would be returned on pin 5 for the left joystick and pin 9 for the right joystick.

This would leave the problem of reconfiguring the button somehow but it would be one hurdle eased into.

I just don't know if the 2600 takes snapshots of the paddles or watches the resistance changes in order to determine what is going on, or for that matter what it's sensitivity actually is.

EDIT: If this worked are there joysticks out there that have a built in booster grip buttons, this may be a way around the button problem.

EDIT#2: Ooops I just realized I'm in series not parallel, the idea would still hold though but you would have to reconfigure your SUDOKU puzzle to take that into account, it should still be possible though.

This post has been edited by trucker_monkey: Wed Nov 4, 2009 6:15 PM

0

User is offline intvnut Icon
Posted Wed Nov 4, 2009 10:31 PM


  • Icon
  • Chopper Commander
  • PM this member
  • Posts: 116
  • Joined: 01-July 07

View PostBruce Tomlin, on Tue Nov 3, 2009 6:54 AM, said:

Without looking at anything, it seems to me like you could do it. First of all, you would absolutely need diodes on every one of those switches to avoid ghosting, just like Colecovision controllers use. (Unless you went all the way and did something with TTL chips, that is.) Ghosting is okay for keyboards, but not for joystick inputs.

Yes. Or, if you just want to multiplex up to 4 controllers on one port, you could use some 4-to-1 muxes (3 separate 74LS153s).

View PostBruce Tomlin, on Tue Nov 3, 2009 6:54 AM, said:

It would be nice if you could do like the Colecovision and use the extra two pins for select signals, but on the Atari those are the paddle inputs, which have to be used as inputs. And in fact, that's why reading keyboard controllers is less than trivial. You have to delay like two full WSYNCs after selecting each of the four rows, then each of the columns is on a different TIA input. For both ports, that's a total of six inputs you have to collect per row.


I guess that's why if you want to go for a 4 controller game, it really seems like your best bet is to use one controller port as an output and the other as an input. All digital is nice and speedy. I'm guessing that the reason you have to wait two WSYNCs for the paddle inputs is because you're waiting for an RC circuit to charge, correct?
0

User is offline BigO Icon
Posted Thu Nov 5, 2009 7:13 AM


  • Icon
  • River Patroller
  • PM this member
  • View blog
  • View gallery
  • Posts: 2,485
  • Joined: 05-February 07
  • Location: Phoenix, AZ

View Posttrucker_monkey, on Wed Nov  4, 2009  5:06 PM, said:

Here's what may be a stupid question, how does the 2600 read the pot on a paddle.
It charges a capacitor through the supplied resistance. It starts the cycle by discharging (AKA "dumping") the charge on the cap. As the cap charges, it eventually reaches a level that is recognized as a logic 1 by the digital circuit it is fed into. Reading the paddle is a matter of having the software keep track of how long it takes after the dump for the input signal to become a 1. What you propose could be made to function but would require a lot of time and system resources to read. So, I think it probably wouldn't be a practical method of implementing joysticks on the 2600.
0

User is offline Bruce Tomlin Icon
Posted Thu Nov 5, 2009 7:29 AM

    • CD C9 01


  • Icon
  • River Patroller
  • PM this member
  • View blog
  • Posts: 3,342
  • Joined: 20-February 04
  • Location: Austin, TX

View PostBigO, on Thu Nov 5, 2009 7:13 AM, said:

[Reading the paddle is a matter of having the software keep track of how long it takes after the dump for the input signal to become a 1.

And that's "how long" in terms of scan lines. A full screen worth of scan lines is about half the travel of the pot, which is why paddle games only use half of it. This is designed for pong-style games where the paddle can begin showing at the moment the input is sufficiently charged. The kernel has to check the inputs every scan line or every other scan line.

I suppose you wouldn't have to check it as often with fixed resistances, but you still have to keep in mind that those resistances will not be exact, and the charging characteristics will probably not be exact either.
0

User is offline trucker_monkey Icon
Posted Thu Nov 5, 2009 10:58 AM


  • Icon
  • Space Invader
  • PM this member
  • Posts: 19
  • Joined: 26-October 09
Aaaaagh! Splut! (as trucker_monkey's head explodes while at work).

I sure wish that they had run 10 pins instead of 9, just one more would allow so much freedom.

I've been assuming that pins 1, 2, 3, 4, & 6 are actually inputs and that 8 is the "power" for those inputs which results in the computer receiving a matrix from programming perspective of 5 bits like follows.

______R
__D L i F
__o e g i
U w f h r
p n t t e
1 2 3 4 6

Example Outputs
Left & Down = 01100
Down & Right & Firing = 01011


Similarly I've been assuming that 5 & 9 is the input "power"ed by 7, now with the knowledge that they are read by the time it takes to charge a capacitor with an unknown sensitivity.

What is the difference between pins 7 & 8.

Can pins 1-4 & 6 identify anything except the simple 1 vs 0 input?

By the way thanks for helping me break this down so that I can understand it.

And based upon the keypad schematics I am assuming that pins 1-4 & 6 can be linked through a "power" on pin 7.

Additionally, I can already tell that I will want a Harmony cart if I keep up on this. I've seen links asking what people think about their purchase, links updating the software. But I have yet to find the link or place where I can order one. Which forum or website do I need to look at.
0

User is offline BigO Icon
Posted Thu Nov 5, 2009 11:02 AM


  • Icon
  • River Patroller
  • PM this member
  • View blog
  • View gallery
  • Posts: 2,485
  • Joined: 05-February 07
  • Location: Phoenix, AZ
Something that might interest you, schematics for the 2600 and controllers:

http://www.atariage....tics/index.html

This post has been edited by BigO: Thu Nov 5, 2009 11:03 AM

0

User is offline trucker_monkey Icon
Posted Sat Nov 7, 2009 1:11 PM


  • Icon
  • Space Invader
  • PM this member
  • Posts: 19
  • Joined: 26-October 09
BigO - thanks that's a better scan than the one I was using (I could actually make out the .01 between the 7th and 8th pin).

I dismantled my 1 & 1/2 pair of paddles and wired a housing switch between the pot & pin 7. I then hooked it up to the Atari with Breakaway IV in the slot. 1st I found that I hadn't cleaned that pot and it jittered (took a few minutes to do that). Then I found that I could turn off the switch and still find 4-5 distinct locations on the pot that the system would re-remember showing that a similar concept to the idea put forth by supercat in the topic (http://www.atariage....joystick-games/) with almightytodd should work.

I marked the points on the pot that worked, but my everyday multi-meter couldn't differentiate between the settings. I'll have to dig out my good one, and go from there.

My current thought is that regardless I should wait until I have a better tool setup (aka get harmony etc.)

This brings up an etiquette question. The easiest software item that I could disassemble and play with would probably be the TestCart bin. Is it kosher to do this as long as I check with Paul Slocum first? Does anyone know his forum name or e-mail address?
0

User is offline BigO Icon
Posted Sun Nov 8, 2009 6:22 PM


  • Icon
  • River Patroller
  • PM this member
  • View blog
  • View gallery
  • Posts: 2,485
  • Joined: 05-February 07
  • Location: Phoenix, AZ

View Posttrucker_monkey, on Sat Nov 7, 2009 12:11 PM, said:

BigO - thanks that's a better scan than the one I was using (I could actually make out the .01 between the 7th and 8th pin).

I dismantled my 1 & 1/2 pair of paddles and wired a housing switch between the pot & pin 7. I then hooked it up to the Atari with Breakaway IV in the slot. 1st I found that I hadn't cleaned that pot and it jittered (took a few minutes to do that). Then I found that I could turn off the switch and still find 4-5 distinct locations on the pot that the system would re-remember showing that a similar concept to the idea put forth by supercat in the topic (http://www.atariage....joystick-games/) with almightytodd should work.

I marked the points on the pot that worked, but my everyday multi-meter couldn't differentiate between the settings. I'll have to dig out my good one, and go from there.

My current thought is that regardless I should wait until I have a better tool setup (aka get harmony etc.)

This brings up an etiquette question. The easiest software item that I could disassemble and play with would probably be the TestCart bin. Is it kosher to do this as long as I check with Paul Slocum first? Does anyone know his forum name or e-mail address?



Paul is a member here. Not sure how often or how recently he's been around.
Paul Slocum's AA Profile: http://www.atariage....30-paul-slocum/

This post has been edited by BigO: Sun Nov 8, 2009 6:22 PM

0

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic


1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users