View Full Version : 2ND button joystick on a real Amiga
Fabie
19 November 2009, 09:21
I have rebuild a Logitech pad to work on my A1200
and I have added a 2nd button joystick
(pin 9 + ground)
but it does not works on all games
it works perfect on Turrican 1 ,2 and 3, and on Rtype 1 & 2
but pin 9 + ground doesn't works on games like BCkid,Bubble & squeak,Aladdin and Lionheart and maybe others
my question is this:
what schematic for the 2nd button joystick is the genuine for all games?
what should be added there? a resistor? a diode?
s2325
19 November 2009, 09:30
Are you sure these games have second button option?
TheCyberDruid
19 November 2009, 09:56
Yes, all of them have a 2 button joystick setting in the options.
pmc
19 November 2009, 10:14
I know this sounds obvious - and is possibly stupid (too lazy to check the HRM at the moment and find out :p) but my guess would be that the games that the second button doesn't work on don't perform the same check in their code for a press of that second button as the games that it does work on...
Edit: To clarify, what I mean is: Is there only one standard defined signal that can come from the joyports that should be regarded as "second joytick button has been pressed"
TheCyberDruid
19 November 2009, 10:22
Hmm, R-Type and Turrican just support the second button (no need to go to the options). I wonder if it's that simple... ;)
Fabie
19 November 2009, 10:37
PMC,
you can't check on the code of that games how the 2nd button joystick works
************
and according to my A1200 manual page F-8:
(Mouse/game controller ports)
pin 9 is button 2
Boo Boo
19 November 2009, 10:41
Ive had problems with both BcKid and Aladdin with a sega pad - these problems have gone away with latest Whd Slaves.
Toni Wilen
19 November 2009, 10:41
Some games forget to initialize POTGO register (Paula io-register) and only work under KS 1.x..
KS 1.x always enables both joystick port direction bits. KS 2.x+ only enables mouse port (right mouse button = 2nd firebutton)
Fabie
19 November 2009, 10:50
btw,
I think that some games were designed to work with the megadrive or mastersystem pad or maybe any other strange joystick or pad
and that games not use the standart 'amiga 2nd button schem
however Im sure that they make use of pin 9 thorugh a resistor or through a diode or any other way
so....the point of this is.... find a way to make your own 2nd button schem that will work on all games
Fabie
19 November 2009, 10:58
Some games forget to initialize POTGO register (Paula io-register) and only work under KS 1.x..
KS 1.x always enables both joystick port direction bits. KS 2.x+ only enables mouse port (right mouse button = 2nd firebutton)
OK I understand
so ....if I softkick Kicstart 1.3 on my A1200 using relokick or rekick and then run that games from floppy....2nd button will work?
Boo Boo
19 November 2009, 10:59
Aladdin was realy fucked up -
your not using WHDload? - Can you use WHDload?
Fabie
19 November 2009, 17:03
Aladdin was realy fucked up -
your not using WHDload? - Can you use WHDload?
The only way to run Aladdin on my A1200 is whdload cause prodigy crack doesn't work
My A1200 is a rev 1.D1 and has a strange bug and Aladdin does not works from floppy
back to the point,using whdload the 2nd button on Aladdin partially works,but there's a delay issue between you give up apples
Boo Boo
19 November 2009, 17:33
I guess if your using Aladdin slave 1.4+ then this is not a software issue.
Photon
19 November 2009, 19:06
Some games forget to initialize POTGO register (Paula io-register) and only work under KS 1.x..
KS 1.x always enables both joystick port direction bits. KS 2.x+ only enables mouse port (right mouse button = 2nd firebutton)
^ Here's the answer.
Second joystick button is a simple physical pin connection, so it's not easy to mess that up.
Toni, does reset on those kickstarts actively set the wrong direction on softreset? If not, one could make a simple reset patch.
I'm pretty sure I can use both firebuttons on kick 2.0 on my A500 - but let me check one of those games above. I wouldn't be surprised if it doesn't, I usually kickswitch into 1.3 or 1.2 when I know I want to play games/watch demos.
Toni Wilen
19 November 2009, 19:12
At least 3.1+ always rewrites POTGO when it reads status of mouse buttons. (I guess this must have something to do with included CD32 pad support etc?)
AFAIK KS 1.x does it only once during reset.
Hungry Horace
19 November 2009, 19:38
maybe some of these game read CD32-Blue button instead of the normal 2nd button check? i cant be sure, but that might cause a few problems with some.
Fabie
19 November 2009, 20:28
maybe some of these game read CD32-Blue button instead of the normal 2nd button check? i cant be sure, but that might cause a few problems with some.
that games do not read Blue CD32 button
they were made before CD32 release
Im sure they look for C button of the megadrive Pad...however I haven't a megadrive pad so I can't confirm that
Retro-Nerd
19 November 2009, 20:31
Bubble & Squeak and Lionheart work indeed with a Sega Mega Drive C-button, but my Tecno Plus pad not.
Fabie
19 November 2009, 20:36
Bubble & Squeak and Lionheart work indeed with a Sega Mega Drive C-button, but my Tecno Plus pad not.
thanks for the info
can you check also if the games Yojoe and BCkid 2nd button works with your megadrive pad?
Retro-Nerd
19 November 2009, 20:38
BC Kid doesn't work with the MD pad, but with the Tecno Plus. Not sure about YoJoe, have to test it.
Hungry Horace
19 November 2009, 20:41
this is the test i've always used for Button 2 in joyport 1, which is well known to work!
It's effectively checking the Right mouse button in the joystick port.
btst.b #14,$DFF016 ; test second button (joy 1)
bne .finish
here is from Galahad's Alien 3 (i think?) whd slave, which "megadrive C" is tested.
dc.l $0839000e ;btst #$e
dc.l $dff016
bne.s not_megadrivec
$E = 14 , so the check is identical. All this answers, is that any pad not sending the same signal as megadrive-C, isnt doing a genuine second button press imo.
Toni Wilen
19 November 2009, 20:55
this is the test i've always used for Button 2 in joyport 1, which is well known to work!
It's effectively checking the Right mouse button in the joystick port.
Yes, it is correct but it does only work if DFF034 direction bit and data bit is set to one (as explained in HRM).
!!NOTE!! some "non-standard" joysticks/pads/mice (some Amiga/Atari ST switchable mouse for example) can have pullup resistors in button lines and they will work when direction=input. This can cause confusion. Of course in this mode normal non-pullup firebuttons won't work..
btst.b #14,$DFF016 ; test second
button (joy 1)
which is actually "illegal" instruction. yes it works but it should be btst.b #14-8,$dff016. btst and friends use byte accesses to memory, not word. (this is very common "bug" in blitter wait too..)
Retro-Nerd
19 November 2009, 20:55
BC Kid doesn't work with the MD pad, but with the Tecno Plus. Not sure about YoJoe, have to test it.
Correction: BC Kid C-button jump works with the MD pad, BUT only in standstill. You can't move and jump at once. No probems with the TP pad.
YoJoe: Works with both pads i have. :)
Correction2: Now i've plugged the TP pad and then the MD pad again and it works fine with BC Kid. Strange, but true. :crazy
Fabie
19 November 2009, 21:08
Correction: BC Kid C-button jump works with the MD pad, BUT only in standstill. You can't move and jump at once. No probems with the TP pad.
YoJoe: Works with both pads i have. :)
thanks for all Retronerd !!!!!!
it seems that some games were developed for many different pads?
btw..2ND button joystick is really an issue on games on real Amiga and WINUAE
YOJOE 2ND button works with with my pad but 2nd button doesn't works on WINUAE :shocked
however BCKID 2nd button and Bubble & squeak works on WINUAE but not on my pad :spin
TheCyberDruid
19 November 2009, 21:28
YOJOE 2ND button works with with my pad but 2nd button doesn't works on WINUAE :shocked
Hmm, the 2nd button works fine here in WinUAE without tweaking anything. Not sure why it doesn't for you.
Hungry Horace
19 November 2009, 21:29
which is actually "illegal" instruction. yes it works but it should be btst.b #14-8,$dff016. btst and friends use byte accesses to memory, not word. (this is very common "bug" in blitter wait too..)
well, it has been explained to me how it is not the "correct" way of writing it, but i have real trouble understanding how something could be illegal when it compiles/runs/operates 100%... it seems barfly is kind enough to not complain too much when compiling :)
to me a "bug" produces errors. this does not, it just (really) upsets a few purists!
StingRay
19 November 2009, 21:34
this does not, it just (really) upsets a few purists!
As said on IRC already (and yes, I HAVE to repeat it here!), this has NOTHING to do with being purist or not, this code is just incorrect! I agree 100% with Toni!
pmc
19 November 2009, 21:37
@ Sting - Yes! \o/
I was only explaining this to someone the other day who sent me some code that had a btst #10 in it.
btst is for BYTES!!
Where's bit 10 in an 8 bit byte!? It's NOT THERE that's where! :D
Hungry Horace
19 November 2009, 21:41
each to their own. I however, am only really interested in the result, and i do get the result i want even with the incorrect code.
i must have learnt it from someone else who was also fond of such bad habits!
pmc
19 November 2009, 21:44
Come on HH - why use bad habits? Soon or later your code will FAIL :(
Hungry Horace
19 November 2009, 21:47
Come on HH - why use bad habits? Soon or later your code will FAIL :(
my code fails all the time. (I am very new at asm) - I just correct what is needed to make it work :)
i will correct this one in my current source, out of gratitude ;)
pmc
19 November 2009, 22:05
my code fails all the time.
LOL. :) Doesn't everyone's? :D Well, not Sting's obviously. :D
i will correct this one in my current source, out of gratitude ;)
Good for you - you know it makes sense. :)
Fabie
19 November 2009, 22:22
Hmm, the 2nd button works fine here in WinUAE without tweaking anything. Not sure why it doesn't for you.
it doesn't works here....I just checked YoJoe whdload and winuae 160 and 161...the hero can't jump using 2nd button
but I will check Yojoe floppy version later
TheCyberDruid
19 November 2009, 22:32
it doesn't works here....I just checked YoJoe whdload and winuae 160 and 161...the hero can't jump using 2nd button
but I will check Yojoe floppy version later
I think I know the problem then :)
From the WHDLoad readme :
- Added CUSTOM2 to control how the 2nd joystick button works:
- CUSTOM2=0 (default) disables the 2nd fire button on both joysticks
- CUSTOM2=1 to enable player 1's jump button only
- CUSTOM2=2 to enable player 2's jump button only
- CUSTOM2=3 to enable both players jump buttons
Set Custom2 and it should work.
prowler
19 November 2009, 22:35
So, what's the difference between the signals generated by pressing a joystick's 2nd button that invokes no response and pressing some other joypad's button that is detected normally?
Would incorporating a buffer circuit similar to this one (with autofire disabled) into the errant joystick cure the problem when used with a real Amiga?
http://eab.abime.net/attachment.php?attachmentid=22455&d=1251184465
Fabie
20 November 2009, 12:00
I think I know the problem then :)
From the WHDLoad readme :
Set Custom2 and it should work.
you are right !!!
it works now !!!
thanks !!!
TheCyberDruid
20 November 2009, 12:02
You're welcome :)
vBulletin® v3.7.0, Copyright ©2000-2013, Jelsoft Enterprises Ltd.