02 August 2017, 23:32 | #41 | ||
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,160
|
Toni, in a previous message you answered to
Quote:
Quote:
Code:
moveq #CIAB_GAMEPORT1,d3 ; red button ( port 1 ) bset d3,ciaddra(a1) ;set bit to out at ciapra bclr d3,ciapra(a1) ;clr bit to in at ciapra Code:
bclr d3,ciaddra(a1) ;set bit to in at ciapra or.b #$C0,ciapra(a1) ;reset port direction |
||
03 August 2017, 01:55 | #42 | |
Registered User
Join Date: Mar 2012
Location: Norfolk, UK
Posts: 1,153
|
Quote:
Normally to have the middle and right mouse buttons (or two extra joystick buttons on pins 5 and 9) readable on each port, you'd write $ff00 to POTGO - if bits 8, 9 (port 1), or 12 or 13 (port 2) are low, then pin 5 won't be pulled up to 5v so the CD32 pad will be in shift-register rather than direct mode. (Most games probably won't write anything to POTGO, assuming that the system's left it in a sane state. The troublesome ones are probably writing an ill-considered value.) Incidentally, in your CD32 pad reading code, after reading the buttons I'd restore POTGO by writing $ff00 to it, not $ffff - the latter is asking the chipset to put the ports in digital i/o mode, set pins 5 and 9 high, and then dump the capacitors and start the analogue counters - which makes no sense with the pins in digital mode. |
|
03 August 2017, 19:13 | #43 |
Registered User
Join Date: May 2001
Location: ?
Posts: 19,644
|
Sorry to butt in, don't have much to he;p with :/ but I remember someone here mentioning that if you would rewrite the pad reading routines, you could natively support a 3 button Megadrive pad without modifications. Is that true?
If so, while you guys are looking at joypad reading code, it would be a great addition to have. 3+1 buttons would be excellent, and those are much cheaper and easier to find than CD32 pads |
04 August 2017, 10:39 | #44 | |
Registered User
Join Date: Mar 2012
Location: Norfolk, UK
Posts: 1,153
|
Quote:
|
|
04 August 2017, 12:01 | #45 |
Registered User
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,334
|
I remember someone (possibly Toni) saying before that different versions of kickstart have different default settings for the POTGO registers, so if a game is written for one and assumes the POTGO contents are set the way it needs them, it may not work with other kickstart versions where this is not true. Such a difference won't show up when using a single button controller, so you might only see it if you try to use a CD32 pad (or Megadrive pad for that matter) with such game/kickstart combinations.
Edit: Yep, here it is: http://eab.abime.net/showpost.php?p=989662&postcount=26 So if games for a 1.3 machine don't explicitly write to POTGO, they might work with multi-button controllers under 1.3 but not 2.0+. Last edited by Daedalus; 04 August 2017 at 12:07. |
04 August 2017, 12:51 | #46 | |
Registered User
Join Date: Mar 2012
Location: Norfolk, UK
Posts: 1,153
|
Quote:
|
|
04 August 2017, 16:34 | #47 | |
Registered User
Join Date: May 2001
Location: ?
Posts: 19,644
|
Quote:
You would need to write support for them, though, right? A "dongle" swapping those pins should be easy to build. |
|
04 August 2017, 16:46 | #48 |
Registered User
Join Date: Mar 2012
Location: Norfolk, UK
Posts: 1,153
|
Yup, the 3-button pads are really easy to support: pin 7 high = buttons B & C on pins 6 and 9. Pin 7 low = buttons A and Start on pins 6 & 9. So yeah, it still needs software support. (The six buttons pads can also be read by pulsing pin 7 with the correct timing - they multiplex the direction lines as well as the fire button lines.)
|
04 August 2017, 16:52 | #49 | |
Registered User
Join Date: May 2001
Location: ?
Posts: 19,644
|
Quote:
This would be great to have. I just don't understand why this has not been requested more and realized years ago. Making adapters would be really stupid easy. Anyway sorry for derailing! But I hope this could be added to CD32Load/WHDLoad too, as I said, CD32 pads are expensive, harder to find, and to be honest, not really good layout-wise. |
|
04 March 2018, 08:13 | #50 |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,160
|
Still issues with this damn pad, and it appears that the revision of the A1200 mobo could be the culprit. Check this mantis whdload bug: http://mantis.whdload.de/view.php?id=3141
And that explains a lot: my A1200 is a rev B (probably 2B, don't have it here), and I always had issues with the joypads. However, lowlevel library seemed okay. Is this confirmed, and is there a workaround/fix once and for all? This button thing has been driving me crazy for 20 years now. Note: it seems that there's a problem reading the buttons on my TF232 (CD32 expansion). Any other ppl with this issue? |
04 March 2018, 08:38 | #51 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,502
|
Does it only happen with official CD32 pad or also clones? IMHO They are not 100% identical. Also does the mantis bug happen without Blizzard installed? (This needs to be narrowed down more) Check/ask also CIA revision, is it 391078-01 or -02?
|
04 March 2018, 08:47 | #52 |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,160
|
Toni I only have official CD32 pads (yes, there are even more issues with Honeybee and such). I haven't tested CIA revision on my A1200. I could use your CIAtest tool, I know.
I don't know about the mantis bug, but at the time I seem to remember that I thought that CD32 pad routine was failing because of a CPU dependent issue (because of TST.B $BFE001) but I was told this wasn't the case. So I tried turning the expansion off and was puzzled to see that even A1200/020 no fast the issue was the same. (I'm talking about custom CD32 pad read, I never had any issue with lowlevel.library, though) |
04 March 2018, 09:26 | #53 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,502
|
I have 2B A1200 (and -01 CIAs) but I don't have official CD32 pad (I really need to find one..)
Could you include source of button reading code that is confirmed not working with 2B+CD32 combination? EDIT: -01 would explain the problem if CIA is in output mode because -01 bug makes CIA to always return output mode state, not pin's actual state. EDIT: Does same happen if you tick recent WinUAE's -01 CIA option in advanced chipset panel? |
12 March 2018, 23:51 | #54 | |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,160
|
ok Toni here are the results of my tests (sorry for the delay):
- motherboard revision: it's 1A (oooooold!!) - ciabuttontest displays : --*- --*- when I press fire: ***- ***- ***- --*- (sometimes) Joyporttest by Psygore (handly tool!): - CD32 joypad: only red & directions are recognized, lowlevel lib or not!! - wico joystick #1: same thing - wico joystick #2: blue button is recognized as well. Quote:
I tested with one of my latest releases, confirmed working by several EAB members here: http://www.whdload.de/games/Beast3.lha (SOTB 3, source of joypad read is in the install archive: ReadJoyPad.s). I have added a joypad/joystick automatic detection and it works fine. Guess what: the game doesn't recognize joypad buttons, not even the blue one, but when I plug my good Wico joystick, the second button works... Is there a chance to be able to read joypads with a rev 1A A1200 mobo? I have a spare mobo (rev 1D). Maybe I could install that one instead. Last Q: how can I check CIA revision? |
|
13 March 2018, 09:10 | #55 | ||
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,502
|
Quote:
(I don't want to do it because I want program that is 100% guaranteed "not working". Even vertical position of read may affect results) EDIT: Does it work if you double or triple number of dummy CIA waits? Quote:
Last edited by Toni Wilen; 13 March 2018 at 10:29. |
||
13 March 2018, 19:38 | #56 |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,160
|
Toni I wanted to create a whdload joystick button tester program for a while. I'll do that. With variable delay on the CIA waits, all right.
The color stuff is the debug mode I added in JST because it just drove me CRAZY! (now I know why). Rev 1A is probably model 01. This is the one where you can create software autofire right? I'll open the machine again tonight. |
15 March 2018, 13:17 | #57 | ||
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,502
|
Quote:
I suggested changed CIA waits because this is most likely "analog problem", second and third buttons are connected to Paula POT lines which also have capacitors for analog/paddle position detection. Capacitors will delay "digital" state changes and if something has drifted too much (old capacitors, increased internal resistance, possibly low +5v line, weak Paula output drivers etc..), it may make state change delays too long. It may not have anything to do CIAs. Quote:
|
||
15 March 2018, 23:46 | #58 |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,160
|
If I can create the ultimate joypad read routine that works with all joypads on all amigas I'll die a happy man.
(not that I'm planning that to happen anytime soon). Do you think the timings would have an effect with WinUAE? |
16 March 2018, 00:38 | #59 |
Ex nihilo nihil
Join Date: Oct 2017
Location: CH
Posts: 4,856
|
|
16 March 2018, 14:46 | #60 | ||
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,502
|
Quote:
Quote:
|
||
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 |
|
|