English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Asm / Hardware

 
 
Thread Tools
Old 01 March 2019, 16:02   #81
majinga
Registered User
 
majinga's Avatar
 
Join Date: Aug 2018
Location: Italy
Posts: 52
It's mostly something software related, some games accept an higher voltage as low, some others don't. That's why in some games the button can work and in others don't.

There is also a resistive filter inside the Amiga (not all models) on the potx poty line, basically it is like another resistor in series with the button, and that's can cause some mismatch between the expected value and the actual value.

To make the story short, when the button is pressed, on the pin 9 of the joy port the voltage must be lower than 300mV
majinga is offline  
Old 01 March 2019, 16:08   #82
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,553
Quote:
Originally Posted by majinga View Post
It's mostly something software related, some games accept an higher voltage as low, some others don't. That's why in some games the button can work and in others don't.
How? Nearly all games read second (and third) button from POTGOR data bits. How is software going to affect how Paula decides when signal is low or high?

No one uses POTxDAT for button reading. (EDIT: but yes, using it would "fix" it)
Toni Wilen is offline  
Old 01 March 2019, 16:32   #83
majinga
Registered User
 
majinga's Avatar
 
Join Date: Aug 2018
Location: Italy
Posts: 52
I don't know how the software part is handled. But, I made some test for this issue.
I was testing an MD adapter, and in some games like Turrican I the second button was not recognized, unless I manually short the pin 9 to ground.
With the same adapter, the same gamepad, on Turrican II the button was recognized.

Also systest recognize the button only if I manually short the pin.
But with most games it work flawlessly.
Maybe in some games, someone noticed the issue, and decided to manage the second button in a different way.

So, it must be something software related.

There is a similar issue with some A1200 (ESCOM) and the right button of the mouse. And also in this case there is a possibility that the issue is a combination of something different in the KS, and the resistive filter on the potx line.
majinga is offline  
Old 01 March 2019, 16:45   #84
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,553
It is probably the usual 2nd/3rd button problem with some games/pads. There is two options (and third if using POTxDAT) when reading second/third button:

a) Paula 2nd/3rd button pin DATA direction = OUT. This is officially documented in HRM. This enables Paula internal pullup and allows to read correct button state even if joystick/pad button does not have pullup resistor. (=not connected when button not pressed and connected to GND when pressed)

b) Paula 2nd/3rd button pin DATA direction = IN. If pad have pullup resistor, reading still work correctly but if button line does not have pullup resistor, button is read as being stuck in pressed state after it has been pressed once.

I guess in case of a) getting Paula to detect low state may require (slightly) more current than case b), explaining the difference.

KS 1.x by default sets both port to out mode at boot but KS 2.0+ only sets mouse port to out mode at boot.

Insert joystick in mouse port and check if 2nd button works as mouse right button?
Toni Wilen is offline  
Old 01 March 2019, 16:59   #85
majinga
Registered User
 
majinga's Avatar
 
Join Date: Aug 2018
Location: Italy
Posts: 52
Quote:
Originally Posted by Toni Wilen View Post
I guess in case of a) getting Paula to detect low state may require (slightly) more current than case b), explaining the difference.

KS 1.x by default sets both port to out mode at boot but KS 2.0+ only sets mouse port to out mode at boot.

Take this as is, because I don't remember exactly :P
When I made my tests, Paula seems to work like a constant current source.
I was trying with a couple of transistor to take the voltage as lower as possible on the potx. And I've tried different resistor values, and almost independently from the resistor value I got a current of about 100mA across it.
EDIT:
And I was testing the second mouse button, for a joy/mouse switcher. I was not testing any games yet.


Quote:
Originally Posted by Toni Wilen View Post
Insert joystick in mouse port and check if 2nd button works as mouse right button?
I remember something about this, but I'm not sure.

I've certainly done the opposite, used the mouse on the joy port on systest, to check if the second button was recognized.
majinga is offline  
Old 01 March 2019, 17:08   #86
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,553
Quote:
Originally Posted by majinga View Post
I've certainly done the opposite, used the mouse on the joy port on systest, to check if the second button was recognized.
Unfortunately there can be one unknown variable in this test: there are mice that have button pullups and mice that don't. Official Commodore ones don't have them but many 3rd party ones do have them.
Toni Wilen is offline  
Old 01 March 2019, 20:54   #87
majinga
Registered User
 
majinga's Avatar
 
Join Date: Aug 2018
Location: Italy
Posts: 52
The mouse is an old Commodore tank mouse. Don't seems to have any pull-up resistor.
majinga is offline  
Old 02 March 2019, 00:55   #88
grelbfarlk
Registered User
 
Join Date: Dec 2015
Location: USA
Posts: 2,955
I have noticed that with Kipper's PSX adaptor that the PSX controller doesn't seem to work in CD32 mode on either the CDTV or my A2000. It does work with just button1/button2 in "normal" mode. Unfortunately I don't have a real CD32 controller to compare against. And perhaps the CDTV's problem is the Mouse/Joystick adapter is missing some pins or some other feature. Though they work on all of my A4000s. So that's my story, the end.
grelbfarlk is offline  
Old 02 March 2019, 07:58   #89
Bruce Abbott
Registered User
 
Bruce Abbott's Avatar
 
Join Date: Mar 2018
Location: Hastings, New Zealand
Posts: 2,708
Quote:
Originally Posted by grelbfarlk View Post
Unfortunately I don't have a real CD32 controller to compare against.
This might help...

Circuit traced by me from a real CD32 joypad, in 1997!
Attached Thumbnails
Click image for larger version

Name:	cd32_joypad.gif
Views:	171
Size:	8.0 KB
ID:	62290  
Bruce Abbott is offline  
Old 02 March 2019, 13:10   #90
majinga
Registered User
 
majinga's Avatar
 
Join Date: Aug 2018
Location: Italy
Posts: 52
Quote:
Originally Posted by grelbfarlk View Post
I have noticed that with Kipper's PSX adaptor that the PSX controller doesn't seem to work in CD32 mode on either the CDTV or my A2000. It does work with just button1/button2 in "normal" mode. Unfortunately I don't have a real CD32 controller to compare against. And perhaps the CDTV's problem is the Mouse/Joystick adapter is missing some pins or some other feature. Though they work on all of my A4000s. So that's my story, the end.

Sorry, but is not clear to me. Are you trying to use the pad with some games that use the CD32 pad and it don't work?


Because the CD32 pad must be specifically handled by the game.
In all the other games it work like a regular 2 buttons pad.
majinga is offline  
Old 02 March 2019, 14:46   #91
grelbfarlk
Registered User
 
Join Date: Dec 2015
Location: USA
Posts: 2,955
Quote:
Originally Posted by majinga View Post
Sorry, but is not clear to me. Are you trying to use the pad with some games that use the CD32 pad and it don't work?


Because the CD32 pad must be specifically handled by the game.
In all the other games it work like a regular 2 buttons pad.

Yes, of course in applications with lowlevel.library support. And testing with joyporttest or other applications which the extra CD32 buttons work correctly on the A4000.
grelbfarlk is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
"Lincs Amiga User Group aka "LAG" Meeting Confirmed for Sat 2nd of March" rockape News 2 21 February 2013 22:46
"Reminder "Lincs Amiga User Group aka "LAG" Meet Sat 5th of January 2013" rockape News 4 30 January 2013 00:06
CD32 Image-Name-Bug: "...(bla)[!].zip" -> "...(bla)[" / "...[test].zip" -> "...[tes" cfTrio support.WinUAE 8 18 December 2012 16:31
Shadowlands ("Mystery Tour" problem) Bolch support.Games 1 14 December 2007 15:48
Problems with "Thespywholovedme", "Flood", "Shinobi" sareks support.Games 12 03 May 2006 14:52

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.09739 seconds with 14 queries