English Amiga Board

English Amiga Board (https://eab.abime.net/index.php)
-   Hardware mods (https://eab.abime.net/forumdisplay.php?f=105)
-   -   Joystick 2 button mod questions (https://eab.abime.net/showthread.php?t=76554)

magu 11 January 2015 15:15

Joystick 2 button mod questions
 
Hi all,

I own 2 Competition Pro joysticks that I plan on converting to 2 button joysticks for my A1200, and do also have plans on building my own set of sticks with components from X-arcade. While researching and preparing I ran into an odd problem regarding the wiring of proper two button joysticks.

Googling around led me to this page describing different joysticks for different platforms. It very specifically states for Amiga that:
Quote:

For the second button/right mouse button the POT X line is used (and for 3rd button/middle mouse button POTY), which - different to the other lines - must be pulled to VCC via the button.
Armed with that info, and this chart, i set out on creating a test rig for trying out (2 button) joysticks without the risk of frying my A1200 with any mistake or short circuit. This was a simple construction with a male DB9 connector wired to a 5 V power source with LEDs in series from VCC to pins 1-4 (directions) and 6 (fire button), an LED from pin 9 (button 2/POT X) to GND, pin 8 to GND and pin 7 to VCC.

This rig worked like a charm for my Comp Pros, signaling properly on all directions and both buttons (still as fire button 1 only of course). I then dug out one of my modified Genesis/MegaDrive controllers that I bought online as "Modified for the Amiga 500". These work fine for 2 button games like Turrican 2, and I figured I should test out the rig with them.

Complete failure. All directions and the fire button worked, but button 2 messed up the other LEDs when pressed, lit itself up inversely as intended, and other weirdness. After a bit of fiddling around I found out, which now when I re-read the above linked wiki-page I see is written in plaintext, that it plainly pulled pin 9 to ground when button 2 (marked C) was pressed.

Can anyone please enlighten me on why this actually works fine like a button on the Amiga, since it does the exact opposite of what it should do, namely it pulls POT X to GND instead of VCC from floating? That shouldn't work, right? :nuts Also, to make things even more confusing, when trying the gamepad with JoyPortTest on the A1200 it only detects the second button when the low level library (that uses the ReadJoyPort() function) is disabled. By default it only detects the first button. At the same time, all 2 button games I've tried function without problem.

Bottom line, when I rewire my Comp Pros, and build my custom sticks, should I use the Sega wiring, just pulling pin 9 to GND (like all other buttons -- which is simpler, especially as it would only require a cheap 2PDT switch to swap button 1 and 2), or should I wire it properly with pin 9 to VCC (which makes the button swap mechanism require a 4PDT switch to toggle both pin 9-6 and VCC-GND on both buttons)?

roy bates 11 January 2015 16:21

directions and fire buttons are wired to ground,as in:when a button or direction is pressed its grounded,as far as i know...

the 5 volts is to power things such as autofire or circuits for the mouse.

you only have to take an amiga compatible or atari joystick apart to see this.

magu 11 January 2015 16:26

That I know for ordinary 1 button operation, and my Comp Pros are wired exactly that way; but according to http://wiki.icomp.de/wiki/DB9-Joystick, two button joysticks for C64 and Amiga should connect POT X to VCC when the button closes the circuit, not close it to GND as the Sega gamepads do.

Is the wiki-page wrong, or the Amiga tolerant? (I assume the latter.)

roy bates 11 January 2015 16:36

if you think its accurate,then you need to look at the line underneath...
ill copy and paste it so you see what i mean....

(*3) The CD32 supports "game pad mode" and uses pin 5 to switch to it (it is pulled to active high by the CD32). Actual CD32 controllers have active components. Regular "atari" joysticks will work at the CD32, but they will not work at eg a C-64

ermm,since when does an atari joystick NOT work on a c64??? they are wired EXACTLY the same way
unless they misprinted it and the mean cd32 pads dont work on c64's??

dont assume anything.

magu 11 January 2015 16:38

That's a valid point. However, how do you explain the chart from C64-wiki.de that complies with the description of wiring POT X to VCC for button 2?
http://www.c64-wiki.de/images/0/0d/J...Schaltplan.gif

roy bates 11 January 2015 17:36

ok,to help you out a bit,im going to post the wiring for a 2 button joystick for use on an amiga(digital joystick)

pin1= up
pin2=down
pin3=left
pin4=right
pin5=n/c
pin6=button 1
pin7=+5 volts~100ma
pin8=ground
pin9=button 2

all direction and button presses are sent to ground to get directions and button presses:)

best of luck:)

magu 11 January 2015 17:48

That exactly mirrors the Sega wiring that I described and linked to in my post. I plan on using that but am still curious to why the two button C64 joystick, which is supposed to work on amiga, is wired differently.

roy bates 11 January 2015 18:14

well,ill leave you come to your own conclusions on that one:laughing

there are lots of conflicting info on the net,you have to work out whats right and wrong yourself sometimes:)

im glad you question whats on the net:)

robinsonb5 11 January 2015 19:37

The page is wrong - or at least misleading. The C64 needs the button to pull the line to VCC, but the Amiga needs it to be pulled to GND.

DesktopDynamite 01 July 2017 04:53

Hello there, am trying to use the 2 button mod and possibly adding LEDS on spectravideo joystick, SV101 MSX, version 4.2.

Here is a link showing this joystick disassembled. https://drive.google.com/open?id=0B7...Dd2SmF3UDdxV3c

My intentions is to buy a DB9 female kit [here: http://www.ebay.com/itm/Kit-Connecto...AAOSwsW9YzFWo] and resolder the wires according to the table mentioned in the link mentioned above: http://wiki.icomp.de/wiki/DB9-Joystick.

Apart from making it work as a 2 button fire joystick, I was going to add some LEDS to the bottom 4 corners by removing the suction cups and using transparent bumpons. This mod requires the 5V from pin 7 [correct me if am wrong].

As you can see I have seven wires with this joystick..
What do I exactly need to do for the 2nd fire button? The orange wire will be assigned to fire button one [the top of joystick] on pin 6, whilst the red one now must be soldered to pin 9? Am I correct ?

As for the LEDS do I need an 8th Wire to be connected to the 5V [7th pin] or not?

xArtx 01 July 2017 09:20

Why not just look at what your Amiga mouse does... which has two buttons.
Try the mouse int he game port and try fire 2.

I haven’t looked right into it, but this diagram looks like the second button is active high
(ie. it does have to be pulled high to fire).
which is different than the directions and fire 1.
In the diagram, the backslash prefix means the signal is active low.
http://3.bp.blogspot.com/-chCCJ6kNy7...34.18%2BAM.png

xArtx 01 July 2017 09:27

For at least an Amiga 1200 Rev 1, pin 9 (Fire2) is not held high or low by the Amiga,
which means you should be using all three terminals of the microswitch for that button
to switch both high and low, where other buttons you only need to switch low, and then open circuit when the button is let go.
Alternatively, you could use a 10K resistor to tie the pin normally low inside the joystick.

Because the pin is meant to be used for a potentiometer paddle, they can’t set a normal state for the pin.

idrougge 02 July 2017 00:14

Quote:

Originally Posted by DesktopDynamite (Post 1168822)
As for the LEDS do I need an 8th Wire to be connected to the 5V [7th pin] or not?

Yes.

DesktopDynamite 02 July 2017 00:20

Quote:

Originally Posted by idrougge (Post 1168997)
Yes.

Yet, I still saw this mod on an albatross, using only 7 wires.
https://www.facebook.com/groups/comm...c_location=ufi

Ok I think I need to decide if the 7th wire will be for the LED mod OR for the 2nd fire button mod, so yes, I need the 8th wire for both mods...

idrougge 02 July 2017 00:38

You need wires for ground, up, down, left, right, button 1, button 2. That's seven wires.

DesktopDynamite 02 July 2017 00:46

Quote:

Originally Posted by idrougge (Post 1169002)
You need wires for ground, up, down, left, right, button 1, button 2. That's seven wires.

Correct.

Now since I am going to buy a DB9 female for rewiring the pinouts, I might as well use a Cat5 cable which includes 8 wires...

DesktopDynamite 02 July 2017 01:03

Oh also do I need a resistor for the LED mod?

I don't want to damage the 5V pin of the amiga's joyport

. My intention is to turn on the LEDs once the amiga is turned on..(non switchable)

Sent from my GT-I9301I using Tapatalk

DesktopDynamite 02 July 2017 01:06

Quote:

Originally Posted by DesktopDynamite (Post 1169005)
Oh also do I need a resistor for the LED mod?

I don't want to damage the 5V pin of the amiga's joyport

. My intention is to turn on the LEDs once the amiga is turned on..(non switchable)

Sent from my GT-I9301I using Tapatalk

Found out that 50ma is max from this link
https://allpinouts.org/pinouts/conne...k-amiga-9-pin/

Sent from my GT-I9301I using Tapatalk

idrougge 02 July 2017 01:27

50 mA is more than enough. But LEDs usually don't run off 5 V, so you need that resistor.

DesktopDynamite 02 July 2017 01:31

Quote:

Originally Posted by idrougge (Post 1169011)
50 mA is more than enough. But LEDs usually don't run off 5 V, so you need that resistor.

I have these available:http://www.ebay.it/itm/321945171693 which require 20ma.

Do I still have to use a resistor? If yes what should I buy? Excuse me but am not electronics expert..

Sent from my GT-I9301I using Tapatalk


All times are GMT +2. The time now is 06:51.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.

Page generated in 0.04701 seconds with 11 queries