12 August 2019, 10:17 | #1 |
Bug hunter
Join Date: Jul 2006
Location: Italy
Age: 48
Posts: 2,161
|
Virocop issue with WinUAE Input>Configuration #1
Hi Toni,
I've found an issue with Virocop AGA (WHDLoad) and disk version where 2nd joystick button is ignored when I set: ...if I revert to Game Ports Panel it does work instead: The strange thing is that only Virocop AGA seems affected: ALL other games with a 2nd joy button work fine with Configuration #1 instead. I use a Speedlink USB Competition Pro SL-650212-BKRD. My cfg: https://1drv.ms/t/s!ApMUGr0cuN39gcA45Xa8VmLASJE9bA |
12 August 2019, 12:33 | #2 |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,197
|
Virocop AGA with whdload patch... maybe share the full archive so Toni can test?
The joypad read code is as follows: Code:
_ReadJoyPort: movem.l d1-d7/a3-a5,-(sp) lea (_ciaa),a4 lea (_custom),a5 cmp.w #0,D0 beq .port0 cmp.w #1,D0 beq .port1 move.l #JP_TYPE_NOTAVAIL,D0 ; neither port 0 or 1 ! bra .rjexit .port0 move.w (joy0dat,a5),d7 ; joystick 1 moves bsr .detect_controller moveq #CIAB_GAMEPORT0,d3 ; 1rst button (left mouse) moveq #10,d4 ; 2nd button (right mouse) move.w #$F600,d5 bsr.b .port_test .rjexit IFD QUIT_JOYPAD_MASK move.l d0,d1 and.l #QUIT_JOYPAD_MASK,d1 cmp.l #QUIT_JOYPAD_MASK,d1 bne.b .noquit pea TDREASON_OK move.l (_resload,pc),a2 jmp (resload_Abort,a2) .noquit ENDC movem.l (sp)+,d1-d7/a3-a5 rts .port1 move.w (joy1dat,a5),d7 ; joystick 1 moves bsr .detect_controller moveq #CIAB_GAMEPORT1,d3 ; 1rst button (red) moveq #14,d4 ; 2nd button (blue) move.w #$6F00,d5 bsr .port_test bra .rjexit ; first, perform a 1-button joystick compatible test for red button ; then a complete test of the joypad buttons, counterchecked in the end ; in order to detect a 2 button joystick (not testing would result in ; all buttons pressed, which is wrong) .port_test moveq #0,d6 .joystick_mode btst d3,(a4) bne.b .no_red_button bset #JPB_BUTTON_RED,d0 ; fire/lmb .no_red_button ; this is the joypad specific part .joypad_mode bset d3,(ciaddra,a4) bclr d3,(a4) move.w d5,(potgo,a5) ; a5=$DFF034 moveq #17-1,d1 ; was done 24 times, not needed bra.b .lbC000746 ; removed: shaving timer issue too close ; 2017: reinstated (identical as Wepl timing fix) .button_loop tst.b (a4) tst.b (a4) .lbC000746 tst.b (a4) tst.b (a4) tst.b (a4) tst.b (a4) tst.b (a4) tst.b (a4) move.w (potinp,a5),d2 ; a5=$DFF016 bset d3,(a4) bclr d3,(a4) btst d4,d2 bne.b .lbC00077C bset d1,d6 .lbC00077C dbra d1,.button_loop ; all buttons have been read, reset data direction register bclr d3,(ciaddra,a4) ; acknowledge port input move.w #$FF00,(potgo,a5) ; a5=$DFF034 ; correct value according to robinsonb5@eab ; JOTD: added this in 2006 after 8 years of not knowing why ; standard 2nd button joystick fails the multi-button test ; and re-fixed this in 2019 after many failures btst #9,d6 ; if this bit is set, then there was a read problem beq.b .read_ok ; meaning this is not a joypad but a joystick ; button 2 of the joystick bset #JPB_BUTTON_BLUE,d0 ; fire2/rmb only bra.b .out .read_ok lsl.l #7,d6 ; correct bits offsets ; all button reads are valid and.l #JP_BUTTON_MASK,d6 or.l d6,d0 .out move.l D0,-(A7) movem.l D1/D2,-(A7) move.l .old_buttonmask(pc),D0 bsr .button_test movem.l (A7)+,D1/D2 lea .old_buttonmask(pc),a4 move.l D0,(a4) or.l (A7),D0 move.l D0,(A7) move.l (A7)+,D0 .rptexit rts |
12 August 2019, 14:14 | #3 |
Bug hunter
Join Date: Jul 2006
Location: Italy
Age: 48
Posts: 2,161
|
Here is the full archive ready to run out-of-the-box in a WB environment with WHDLoad…
https://gofile.io/?c=gLvwnX |
12 August 2019, 14:42 | #4 |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,197
|
but how to switch from standard config to custom? I have tried selecting "gamepad" first, then switching to "input"... but it still works..
I never was able to understand how this remap thing worked... I'm very glad with CD32 joypad setting... |
12 August 2019, 15:48 | #5 |
Bug hunter
Join Date: Jul 2006
Location: Italy
Age: 48
Posts: 2,161
|
Look at the pics above: Input, in the upper left and switch to Configuration #1.
Doesn't matter what you set under Game Ports I guess, here is mine: |
12 August 2019, 20:51 | #6 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,516
|
Does Gameports panel joystick vs gamepad option make the difference?
|
12 August 2019, 21:31 | #7 |
Bug hunter
Join Date: Jul 2006
Location: Italy
Age: 48
Posts: 2,161
|
Just found Virocop AGA's 2nd button with Input > Configuration #1 works only when I select Game ports > … CD32 pad.
Selecting Joystick, Gamepad, Default… they don't work as 2nd button. This incompatibillity happens only with Virocop AGA though, strange… Normally I can use Configuration #1 with Joystick, Gamepad, Default with any other 2nd button game (Turrican 2-3, Bubble & Squeak, Bubba 'n' Stix, Lionheart, etc.) Last edited by hexaae; 12 August 2019 at 21:38. |
16 August 2019, 21:46 | #8 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,516
|
I can't find anything wrong in normal non-CD32 mode (gameports panel or input panel). Both buttons work correctly and code snipped above looks fine, no weird tricks used.
|
17 August 2019, 21:34 | #9 |
Bug hunter
Join Date: Jul 2006
Location: Italy
Age: 48
Posts: 2,161
|
Aaargh… Thank you Toni for testing.
Deleted all input section in my old cfg and indeed now it works even in Configuration #1 mode Here are both (old, not working and new, working) if you care to understand what's wrong in the buggy cfg to screw button1 detection in WinUAE 4.2.1 with Virocop AGA (old buggy cfg: 'Hexaae_UAE_4.2.0.uae'): https://gofile.io/?c=fd6ao9 |
18 August 2019, 09:13 | #10 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,516
|
There are too many differences (even different buttons used)..
If you run some joystick tester with your old config, what does it report? Does it report button not working at all or reporting it being stuck in pressed state? (EDIT: actually try this using CD32 boot menu, does 2nd button work there?) EDIT2: If you map 2nd button to some keyboard key, does it still work incorrectly? (This at least would be something I probably would be able to duplicate) EDIT3: One more idea: open your old config in text editor, manually cut all lines that begin with "input.1.joystick.0.". Does this change anything? If not, what if you also delete all lines that have ends to =JOY1_3RD_BUTTON? Last edited by Toni Wilen; 18 August 2019 at 14:06. |
18 August 2019, 16:12 | #11 |
Bug hunter
Join Date: Jul 2006
Location: Italy
Age: 48
Posts: 2,161
|
Using http://m68k.aminet.net/package/driver/input/JoyPortTest from WB with buggy cfg file I see no button working from Workbench (!!!) but they do work when in games, except 2nd button in Virocop AGA only
Yes, I deleted every input line from the cfg file to create my new working cfg indeed (must be something in there)… As for deleting "input.1.joystick.0." only from buggy cfg, yes then 2nd button works again in Virocop AGA. EDIT: These are the removed lines: input.1.joystick.0.friendlyname=HIDI2C Device input.1.joystick.0.name=\\?\HID#ELAN1203&Col02#5&6decf3a&0&0001#{4d1e55b2-f16f-11cf-88cb-001111000030} input.1.joystick.0.empty=false input.1.joystick.0.disabled=false input.1.joystick.0.axis.0=JOY2_HORIZ.0 input.1.joystick.0.axis.1=JOY2_VERT.0 input.1.joystick.0.axis.5=JOY2_HORIZ.0 input.1.joystick.0.axis.6=JOY2_VERT.0 input.1.joystick.0.button.0=JOY2_CD32_GREEN.0,JOY2_CD32_RED.0 input.1.joystick.0.button.1=JOY2_CD32_RED.0,JOY2_CD32_BLUE.0 input.1.joystick.0.button.2=JOY2_CD32_BLUE.0,JOY2_CD32_YELLOW.0 input.1.joystick.0.button.3=JOY2_CD32_YELLOW.0,JOY2_CD32_PLAY.0 input.1.joystick.0.button.4=JOY2_CD32_RWD.0 input.1.joystick.0.button.5=JOY2_CD32_FFW.0 input.1.joystick.0.button.6=NULL,JOY2_CD32_PLAY.0 input.1.joystick.0.button.7=JOY2_CD32_PLAY.0,JOY2_CD32_PLAY.0 P.S. This http://truehumandesign.se/s_diffinity.php is excellent to compare cfg files Last edited by hexaae; 18 August 2019 at 16:30. |
18 August 2019, 17:23 | #12 | |
Banned
Join Date: Aug 2005
Location: London / Sydney
Age: 47
Posts: 20,420
|
Quote:
|
|
18 August 2019, 18:51 | #13 |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,197
|
Beyond Compare is a very good tool. Not free though
|
18 August 2019, 22:27 | #14 |
Bug hunter
Join Date: Jul 2006
Location: Italy
Age: 48
Posts: 2,161
|
Diffinity is free and graphically shows text insertions etc. Many compare tools just hilite different text strings on both sides, but the graphic approach is faster and smarter IMHO showing missing/added text much easily.
It's also very smart to re-align same text side by side while scrolling up/down. Last edited by hexaae; 18 August 2019 at 22:55. |
19 August 2019, 12:01 | #15 |
Registered User
Join Date: Aug 2014
Location: Zagreb / Croatia
Posts: 302
|
I use WinMerge.
I don't have MS Office, thus I can's use Word. Anyway, Word can't compare binary files. |
19 August 2019, 12:10 | #16 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,516
|
Plain diff comparison won't help in this case because input lines depend on header lines (=which device is affected by following lines)
I think I know what is going on (because removing those CD32 lines "fixed" it).. |
19 August 2019, 18:19 | #17 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,516
|
Do you have "HIDI2C Device" still in use/plugged in (what is it?)
Does the problem also disappear if you do this change: input.1.joystick.0.friendlyname=HIDI2C Device input.1.joystick.0.name=\\?\HID#ELAN1203&Col02#5&6decf3a&0&0001#{4d1e55b2-f16f-11cf-88cb-001111000030} input.1.joystick.0.empty=false Change this line: input.1.joystick.0.disabled=false to: input.1.joystick.0.disabled=true |
19 August 2019, 20:10 | #18 |
Bug hunter
Join Date: Jul 2006
Location: Italy
Age: 48
Posts: 2,161
|
Changed just that line in old buggy cfg and, yes 2nd button works again in VirocopAGA...
|
19 August 2019, 20:43 | #19 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,516
|
Does that device appear in winuaebootlog.txt and Input panel device drop down menu? Check also log, does it say "(NO MATCH)"?
This is the most important remaining bit. |
20 August 2019, 01:20 | #20 |
Bug hunter
Join Date: Jul 2006
Location: Italy
Age: 48
Posts: 2,161
|
Yes it's in the log and Input panel menu. It's the ASUS custom touchpad I guess.
No "(NO MATCH)" in Winuaeboot.log using buggy cfg where 2nd button doesn't work with VirocopAGA. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Creating new winuae game configuration issue | ransom1122 | support.WinUAE | 3 | 14 January 2017 04:30 |
WinUAE 1.5.2.0 Configuration Input Panel Bug | smoorke | support.WinUAE | 11 | 24 September 2008 16:50 |
input configuration | Mad-Matt | support.WinUAE | 13 | 01 March 2007 18:54 |
WinUAE 1.0 Input Configuration Help Request | jcrouse | support.WinUAE | 7 | 18 July 2006 14:55 |
Input configuration | Quickbeam | support.WinUAE | 5 | 16 September 2002 15:38 |
|
|