Jump to content
IGNORED

Atari 5200 Playstation 2 Adapter


smbaker

Recommended Posts

I spent a few minutes this morning trying to tweak XFUNC and YFUNC to get the joystick centering a bit closer to my handheld controller. The new source and hex files are checked into github. john_q_atari, if you get chance please give the new hex file a shot and let me know if it improves your performance.

 

Scott

 

That is better. The primary controller port on the adapter reads between 104 and 106 for both H and V, but the secondary reads 107 H 88 V. I'll have to look at your code. Perhaps you didn't update one of the scaling factors?

 

for reference:

 

One of my thumbstick adapters I built off your designs reads 112H 115V in my 5200 port1 and 109H 112V in my 5200 port2.

The other thumbstick adapter reads 117H 119V in port1 and 115H 116V in port2

Link to comment
Share on other sites

If you can make it so that EITHER the D-pad OR the the analog stick makes the digital joystick move, I'l sign up for one.

 

Also, this may be a little nitpciky, but... can it be fixed so that 100% N + 100% E does not equal 141% 45 degrees north or east, which should fix the final problems with the Competition Pro Joystick on those few digital games which crash, like Popeye, because they assume if you're over 80% E, you'll automatically be less than 60% North because 60^2+80^2=100^2, which doesn't hold up in the Competition Pro, becuase it's possible to actuate 100% N and 100% E simultaneously. so a 70.7% actuation of N and E on NE would be perfect, or an artificial limiter of "distance" to the 100% radius.

 

By the way, I'm mainly looking for a fight stick adapter for the Atari 5200 that works with a Playstation fight stick. So if it reads the D-PAd right, then I'm good. I'll order one.

 

Also, would there be a way to the keypad buttons you need to ma to additional buttons? Not a big priority, but would be nice.

 

Finally, I know a a guy who wires fight sticks to analog inputs of pad-hacked Playstation 1 controllers. If you have the knowledge to convert digital joyhstick moves into anlaog directions, please share it with MAtthew Ummo, who said he might be able to do it if he knew more about the 5200 controller. He does this for PS1 all the time. He might be able to do N64. But he doesn't know enough about the 5200.

 

I'm looking to buy one.

Link to comment
Share on other sites

Don't forget to check the D-Pad. That's what I'm mainly interested in.

 

I guess if you use it with a Dual Shock 1, it starts as a PS1 digital, and pressing Analog Mode makes it analog.

 

Try it with a dual shock 1. The only thing a Dual Shock 2 adds is pressure-analog buttons and pressure-analog cross pad.

 

Is the mapping X = bottom button (assuming the bottom is intended to be the main button on the 5200, which I believe is right,) and O=top button? That would be perfect for my fight stick. But it might be awful if you use an actual pad if you do the "one thumb on 2 buttons" thing like on Mega Man X for SNES that I can't do well enough. What would start, pause and reset be? Pause=PS start, Start=PS Select, and reset on an "external button" so you don't accidentally reset? And since some games use keypad presses, how do you deal with the other 6 buttons and the Keypad?

Link to comment
Share on other sites

My AVR build environment is 12 years out of date. Does anyone have a recommendation for a simple commandline build environment to download and use for windows7 or possibly ubuntu. I would like to modify the c code smbaker posted and compile into my own hex file. Thanks.

For Ubuntu just install avrdude, the usual gcc tools, the avr-gcc extensions and the xa cross-assembler. Then you can use “make” to build the code and avrdude to program the chips.

Link to comment
Share on other sites

WinAVR for the win! All I had to do was set my path after installing it and "make clean" "make all"

 

I went into O.C.D. overdrive trying to tune the scaling factors. I love the built in programming header. I must have programmed in 20 different scaling factors. In the end, what seemed to work best for my system (of course based only on the range of motion and data being dumped out by Pete's Test Cartridge) was unscaled and unshifted: (v-128)*1+128+0

Link to comment
Share on other sites

WinAVR for the win! All I had to do was set my path after installing it ..."

 

I’m surprised you needed to set your path. As I recall, the WinAVR installer defaults set the system path for you unless you tell it not to.

 

Anyway, if you prefer a GUI to a command line, AVRDUDESS is an excellent Windows front-end to avrdude.

  • Like 1
Link to comment
Share on other sites

By far the most difficult and time consuming part of building this adapter for me has been the PS2 cable. The ones I purchased had fine wires (very small diameter) that didn't connect well to the dupont connectors. In the end I had to solder the cable to the board and secure the cable to the backplate I mounted the PCB to to avoid putting any tension on the wire/solder connections I had made. I saw at some point in the past, and I can't find it now, that someone, somewhere on the web was selling an adapter cable that had a female playstation controller connection on one end, and female dupont style connectors on the other end. If anyone can find it please post it here and I highly suggest people use that instead of trying to build their own.

 

I did find things like this:

 

https://www.robotshop.com/en/ps2-connector-breakout-board.html

 

and this:

https://www.robotshop.com/en/cytron-breakout-board-ps2-connector.html

 

and this:

https://www.robotshop.com/en/ps2-connector.html

 

Perhaps Scott you could do a future board revision where you can directly solder the last connector to the board. It would make assembly of the bare board SO MUCH EASIER.

 

Or if people haven't build the cable/attachment part of their adapters yet, they could consider wiring up one of the devices I listed above (or others like it) and perhaps make their lives easier. One example would be to purchase the last adapter, hack the end off of a 9 or 10 pin pre-built dupont female to whatever gender connector, and solder the wires from the hacked off end to the connector. Just a thought.

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

By far the most difficult and time consuming part of building this adapter for me has been the PS2 cable. The ones I purchased had fine wires (very small diameter) that didn't connect well to the dupont connectors. In the end I had to solder the cable to the board and secure the cable to the backplate I mounted the PCB to to avoid putting any tension on the wire/solder connections I had made. I saw at some point in the past, and I can't find it now, that someone, somewhere on the web was selling an adapter cable that had a female playstation controller connection on one end, and female dupont style connectors on the other end. If anyone can find it please post it here and I highly suggest people use that instead of trying to build their own.

 

I did find things like this:

 

https://www.robotshop.com/en/ps2-connector-breakout-board.html

 

and this:

https://www.robotshop.com/en/cytron-breakout-board-ps2-connector.html

 

and this:

https://www.robotshop.com/en/ps2-connector.html

 

Perhaps Scott you could do a future board revision where you can directly solder the last connector to the board. It would make assembly of the bare board SO MUCH EASIER.

 

Or if people haven't build the cable/attachment part of their adapters yet, they could consider wiring up one of the devices I listed above (or others like it) and perhaps make their lives easier. One example would be to purchase the last adapter, hack the end off of a 9 or 10 pin pre-built dupont female to whatever gender connector, and solder the wires from the hacked off end to the connector. Just a thought.

I'm not sure what I'd be getting in the ad in the second link. There's a board and a large squarish looking PS2 connector that may or may not be included.

The other two products look pretty handy for such projects. Do not quite get what appears to be a conversion from 3.3V to 5V. Is this where transistors are used to attenuate the 5V to 3.3V in the PS2 controller, itself? I believe the 7.2V is for rumble and such.

Link to comment
Share on other sites

I turned these links up with a websearch so I have never used any of these products or that website before. I assume you get exactly what is included in the picture, the PCB and the connector which seems to be the same connector as what is offered in the 3rd link. As for voltages and conversions I have no idea. I am not expecting that there is anything other than boards and connectors offered in these links (no transistors/level shifters or any other electrical components).

Link to comment
Share on other sites

Absolutely, I'll order some of those connectors and get them worked into the next board revision.

 

BTW, I have some more boards on hand and ready to ship. This version is a minor revision from the original, and includes a set of resistor dividers on the pins going to the PS2 connector.

 

Scott

Link to comment
Share on other sites

Looks good, Rayik.

 

In other news, I received my robotshop connectors and breakout board today. Here's a couple pictures. The first shows the breakout board, together with a 9-pin 0.100" female header (header is NOT supplied; you'd have to get one of your own)

 

post-65374-0-03122700-1540658507_thumb.jpg

 

Second picture shows the robotshop breakboard with 0.100" female header soldered to it, and then plugged into the 5200-ps2 adapter.

 

post-65374-0-89427500-1540658572_thumb.jpg

 

An alternative to using the female header would be to solder the breakout board to the 5200-PS2 adapter's male header directly, though much more difficult to ever take it apart if you want to.

 

I like this solution better than hacking up a PS2 extension cable, thanks john_q_atari for the links.

 

Scott

  • Like 3
Link to comment
Share on other sites

Also isn't PS2 a little overkill, because PS1 has just digital buttons, but PS2 has analog face, D Pad and shoulder buttons? Wouldn't it be easier to work with a standard PS1, or if you want analog, a PS1 Dual Shock 1.

 

And doesn't a Dual Shock 2 default down to a Dual Shock 1 when plugged in a PS1 anyway? Why work with a PS2 when PS1 is fine?

Link to comment
Share on other sites

No one is answering this question. If you plug in a digital PS1 pad, or a fight stick with only a digital control, will the d-Pad/stick map to the 5200 analog stick? Never got that answer.

 

I'd break the question down into two parts: 1) Does it work now, and 2) could it be made to work.

 

The answer to (1) is probably no. The first thing my code does is put the PS2 controller into analog mode, and thereafter it polls the controller and expects responses with analog data. If you plugged a pure digital controller in, I would expect it to not work.

 

The answer to (2) is probably yes, with some work. One would need to write some code to pay attention to the digital pad button states, and make them register as full up / full down / full right / full left. That's probably not hard, and something I've been thinking about doing. Then one needs to make the initialization code resilient to operating in either analog or digital mode. This could all be done with a PS2 controller, and then the final step could be to see if the PS1 digital-only controller "just works"

 

Scott

Link to comment
Share on other sites

Looks good, Rayik.

 

In other news, I received my robotshop connectors and breakout board today. Here's a couple pictures. The first shows the breakout board, together with a 9-pin 0.100" female header (header is NOT supplied; you'd have to get one of your own)

 

attachicon.gifps2connector.jpg

 

Second picture shows the robotshop breakboard with 0.100" female header soldered to it, and then plugged into the 5200-ps2 adapter.

 

attachicon.gif5200-ps2-with-breakout.JPG

 

An alternative to using the female header would be to solder the breakout board to the 5200-PS2 adapter's male header directly, though much more difficult to ever take it apart if you want to.

 

I like this solution better than hacking up a PS2 extension cable, thanks john_q_atari for the links.

 

Scott

 

I like it! Looks nice and I imagine it holds up pretty well in gameplay. Hacking apart the cables was a real pain for me. I wish I had found those links earlier because it looks like it was so much easier to put together. Your solution also keeps you from having to redesign the board and allows others that have already soldered the connector to still use it as is with the new parts.

  • Like 1
Link to comment
Share on other sites

 

I like it! Looks nice and I imagine it holds up pretty well in gameplay. Hacking apart the cables was a real pain for me. I wish I had found those links earlier because it looks like it was so much easier to put together. Your solution also keeps you from having to redesign the board and allows others that have already soldered the connector to still use it as is with the new parts.

 

I may still try to redesign the board so the connector can be mounted directly, but have no plans of exactly when to do that (it'd probably mean having to make the board slightly bigger, and I really like the form-factor we have now...)

 

How is the board working out for you? I recall you had some issues after you first built it.

 

Scott

  • Like 1
Link to comment
Share on other sites

Also a question about the digtiization: If N=100% North and E=100% East, and there's no other processing then those 2 combine to 141% NE, becuase in the original 5200 control design, there is no circle limiter in the logic of the potentiometers, butt here is a "physical plastic circle limiter" on the joystick.

 

The Compettion coin is a simple joystick that actuates

Link to comment
Share on other sites

Also a question about the digtiization: If N=100% North and E=100% East, and there's no other processing then those 2 combine to 141% NE, becuase in the original 5200 control design ...

 

No. The 5200 reads both axes independently of one another. So it's up the game what "NE" even means. POKEY will read the Y Axis pot at 100% and the X Axis pot at 100% and the game code then does whatever it wants with those inputs.

Link to comment
Share on other sites

The problem is that the Atari 5200 has a physical stick limiter which keeps it at a maximum 100%, so only a broken joystick, when converting from x,y to r,A is where r>100 hence the N and E simultaneously in some programs thinking it's 141%

 

Some games use that fact to turn it into a 4-way stick: If any direction is 80% or greater, then the perpendicular is always below 60%. So there's a diagonal dead zone. I know Popeye has this problem when using a Competition Pro, and actuating a diagonal. other games include maybe Mountain King, maybe Wizard of Wor, or any other 4-way game you can think of can potentially have the problem.

 

It may not be a radius problem, but programming assumption that assumes there are no diagonals by making the threshold 80% If there is a guarantee of no simultaneous X and Y due to the circle limit, a lazy way to save a few bits is to institute the 80% standard. If the joystick forces the issue by physically limiting non-simultaneous 80% horizontal and 80% vertical, then you can save bits by not writing more complex conditionals. And in those days, you were fighting for K like Atari 2600 programmers were fighting for bits. But the Competition Pro threw that out the window.

 

Then there is another unintended competitive consequence: the diagonal speed boost. In something like The Dreadnaught factor, if the controls are analog, then the maximum radius is 100%, because the joystick has a physical circle limiter. But would it considered cheating for the purposes of Twin Galaxies records to have a Competition Pro because your diagonals have a speed of 141% of the cardinal maximum. You can cover more ground 2 dimensionally, or you can weave up and down as you move left at full speed whether you go straight-left, up-left, or down-left.

 

So for the reasons of both 4 way games not working right as well as cheating in games that have a diagonal speed boost, maybe there should be a default 100% Maximum mode, where pressing a diagonal automatically makes it 100% by actuating a dome 2-axis potentiometer as 100% by 45 degrees. and to unlock "diagonal boost mode", a button must be held. Which means, when diagonal, the 2 corresponding cardinals equal 70.7%

 

If I'm going for a Twin Galaxies record on Twitch and people try and don't get the diagonal sped boost with default 5200 controllers, people will accuse me of cheating. I would have to put that disclaimer on all my 5200 twitch streams. (once I get 5G, but slow internet is another issue.)

 

I feel sorry for someone who innocently breaks a record and then finds out the joystick gave a programming advantage with the diagonal speed boost, then it gets challenged by someone who shows diagonal speed on a default controller. Then they have to make 2 separate divisions, one with a 100% maximum limiter, and one with a diagonal speed boost.

 

-------------------------------------------------------------------------

Also about the buttons: I'm thinking given the following mapping for the fight stick (Street Fighter 15th Anniversary stick):

 

[] ^ R1 L1

X O R2 L2

 

The 5200 buttons should equal:

 

1 2 3 ?

B T 0 ?

 

That's assuming the bottom button is the "main" rapid fire button, and the concept of left fire and right fire is not involved, like Tutankham (was there a 5200 version of that game?)

 

I have a little obsession about right handed fight sticks. I successfully righthanded my Street Fighter 15, becuase that stick has an acceptable right-handed contpour or rectangular.

 

If the game has a concept of main and aux fire, then that maps correctly when horizontally flipped. But in the case of Tutankham:

 

? 3 2 1

? 0 T B

 

If B=left and T=right then you got an inverision problem. Right button to fire left and left button to fire right.

 

Also if in Countermeasure the 3 symbol buttons make sense where they are numbered 1, 2, and 3, AND make sense in a left-to-right fashion, MAYBE a backwards mapping of the number keys.

That way Countermeasure you can use the joystick buttons for typing in the launch cancellation code, and the 0 button can be used for Hyperspace in Defender.

 

Those are probably the 2 keypad-heaviest games. Space Shuttle uses a lot of keys, but lightly. Same with RealSports games and Star Raiders I assume.

 

L2 can equal pause, Start can equal start, and Select can equal reset. So you got one button left.

 

Keep in mind this would probably be the best mapping for fight sticks. I understand pads may be different. So maybe holding the last button, the L1, together with face buttons can activate Pad mode, Street Fighter Joystick mode, Ascii Joystick mode (which has a different mapping), and 100% Maximum toggle on/off, always resets to Max on. The memory would hold the other 4 items.)

 

So what is the button mapping you originally have on the 5200 controller for top and bottom buttons? Was Defender hyperspace and Countermeasure codes included?

 

If you assume the standard Dual Shock 2, if the SNES Nuts have their way, and it's mapped likeMario, Mega Man, and Super Ghouls N Ghosts, this would probably be the default arrangement:

 

--^--

[]---O

--X--

 

equals

 

--?--

B---0

--T--

 

If I had needed a pad for analog games (Even though I'd argue centering resistance in the Left stick makes "dialing a position in Kaboom and Super Breakout in one dfimension, and Star Wars in 2D, verfy strenuous, inaccurate, and tiring. So I'd use a Best Electronics rebuilt 5200 standard stick. No centering resistance means more accurate posiitoning in those games. I might use it for games where you HAVE to accurately find center, yet can use analog, like Galaxian and Dreadnaught Factor.)), I'd two-finger the pad and use:

 

--0--

?---T
--B--

 

Probably 0 is the best third button because I believe a couple other games besides Defender use 0 as a third button.

 

I gave my opinion about these matters. I want to hear others. (The opinion is admittedly long due to a lack of real-world socializing, and 100% of my socializing is online, except for a few offline friends I knew before I went online and that's once every 2-3 months.)

Edited by tripletopper
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...