-
-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SFC rightshoulder input not recognized in emulation but works in GUI #1237
Comments
Nope, seems to work normally here :) |
Interesting.... I just retested this ; seems my description of the issue is incorrect. The above uae.conf has the following;
My first hunch was to check the rightshoulder mapping of the SFC controller was being recognized -- it is. So I reordered (swapped around) the custom control mappings to...
With that configuration, So it seems you cannot have both of these custom actions mapped/used at the same time, else the 2nd (latter mapping) fails to work? |
@giantclambake Both work normally for me. |
@midwan .... weird, definitely not working like that here.... I'll do some rechecking to see if I can fathom what's going on. |
Ok.... I noticed you employed a PS4 controller ~ I have 2 connected controllers.... an Xbox style (/dev/input/js0) & SFC (/dev/input/js1), and I was trying to get this working with the SFC. I created another config of same layout, and instead mapped these events to the Xbox controller shoulders, and they do indeed work fine in that scenario. I'll do some more testing to see if I can divine what's going on. |
M'kay... so first best idea I considered, was unplugging both USB controllers, and just replugging the SFC controller, to ensure the 1 controller @ /dev/input/js0 situation. Check the SFC right shoulder button press is recognized - it is. Create a new config.uae as per previous ie; wb1.3 boot hdf, 4 disk (standard not ndos) images in diskswapper, leftshoulder mapped to 'Insert previous Disk Swapper slot in DF0:' & rightshoulder mapped to 'Insert next Disk Swapper slot in DF0:' .... start emulation ; left shoulder works as expected ;; right shoulder does nothing... F12, quit... ...in my head, I think the logic goes that custom controls are held in config.uae, and we have a 'friendly name' associated with the controller connected at the time of config creation...so what happens if I change controllers (physically, unplug SFC and replug Xbox pad to be /dev/input/js0) ; this should ignore friendly name (not present), and still work with whatever (compatible) device is found at /dev/input/js0, which still consults gamecontrollerdb.txt and in theory, the custom controls in config.uae should still apply equally to the Xbox pad... ...I do exactly that, and that's exactly what happens... left/right shoulder presses on the Xbox pad work as expected, inserting next/previous image in the diskswapper as it should... go figure... F12, quit... ...unplug Xbox pad, replug SFC (another identical unit I have here), start emulation with same config.uae, same result ; right shoulder button press not inserting next/previous disk into DF0: ...F12 & quit... @midwan ... any ideas where to look next? I can only imagine it's something specific to the SFC controller input code? -updated description |
@giantclambake |
Just tried it ; Right shoulder not recognized at all when pressed. If then I.. F12 -> custom controls -> and try to set a hotkey to rightshoulder press, I see; So that button press is actually working there, just the event not making it to the emulation? |
Looks like you have RShoulder mapped as the Hotkey. The hotkey button cannot be mapped to another function as well, so it's disabled in the screen above. The hotkey can be used in combination with other buttons, to trigger (more) events, e.g. Hotkey + X can be a separate mapping than just X. |
No, that was merely to demonstrate the rightshoulder button press was being registered in the GUI. Example only, it is not set like that during testing. |
I still think it might be a mapping issue with that controller. Did you use a custom mapping, or the default? Try the other one to see if it helps. |
It's a standard SFC controller, I don't see why the default mapping shouldn't work, nor do I feel users should have to create a custom mapping for this standard controller device....as seems to be the case if using a PS4 or Xbox pad. As demonstrated, with the SFC controller set to CD32 pad (as you suggested), the mapping is recognized in GUI and config.uae, but rightshoulder is not recognized in emulation using AmigaTest kit. Created a fresh config.uae to just load ATK adf. My controllers/gamecontrollerdb_user.txt has always been an empty file during testing, as the default mappings have been fine..but TTBOMK I never actually tested/used SFC rightshoulder in practice before, because the default mapping with SFC as joystick work fine. GUI->Input->Port 1:-> Remap ... created the normal/typical layout for this device type, right shoulder is recognized.
Note: devicename changes from SFC controller to USB controller (if matching entry found in gamecontrollerdb_user.txt)? Start emulation to run amigatestkit, and in that program -> F4 -->F2 to select CD32 pad (pad detected) -> all buttons work EXCEPT right shoulder. Like I say, it's as though the rightshoulder button press on SFC/USB controller works everywhere else EXCEPT in the emulation. Have you tried this on such a controller? If it worked for you, can you share the config.uae plz? -logfile of above run attached edit: also not working in v5.6.9 edit2: Note also, that whether using the Default/CD32 pad/custom remap, the |
...it's difficult to debug this, I just had another swing at it ; fortunately this is one part of amiberry that works on the fly (the GUI doesn't show it, but using F12 to remap controller, makes those settings apply upon resume ; the GUI doesn't update device field from SFC to USB controller if one creates a gamecontrollerdb_user.txt on the fly =) -obviously button event(s) are being recognized as you can remap all buttons in GUI Created a gamecontrollerdb_user.txt that maps rightshoulder to another button ;
Launch amiberry, start AmigaTestKit in emulator ... same result -> rightshoulder not working on other buttons either (I tried a few), so somehow
-rightshoulder not remapped -- actual rightshoulder button on pad mapped to yellow ... yellow event works
-same as before with yellow button on pad mapped to rightshoulder ... doesn't work, rightshoulder event not there. What's confusing me, is how come this all works fine with a PS4/Xbox pad? The only thing I can think of there, is those devices are joystick_analog and SFC pads are just joystick ...but it seems unlikely |
I will test with a few different controllers to see if I can recreate it |
Tested with:
They all work fine here. Whatever this is, it seems specific to your controller there, or something else that I don't have here. |
@midwan ~ thanks again for testing, and I concur... I've got 3 different Xbox type controllers and borrowed a PS4 controller as well to check, and all these devices work fine in ATK ; rightshoulder button press works in every case. It's only with these cheap SFC controllers the problem arises... despite every button being recognized in GUI->Input->Remap, and the resultant What I found peculiar, is when amiberry initializes this control pad as 'SFC Controller', the mapping shown in logfile is actually correct...ie; it's identical to the mapping obtained when using the Remap function in GUI;
The SFC Controller definitions are held in the
This infers to me the amiberry code has indeed correctly recognized the USB device as a SFC Controller, and applied the default mapping here, which is also correct, and this is why all GUI operations & gamecontrollerdb_user.txt file creation is working as expected. I'd grabbed the sdl2-jstest utility a few weeks back ... it came with a gamecontrollerdb.txt file dated 28/02/24
M'kay, launch amiberry, GUI->Paths->Update Controllers DB-> Quit amiberry. Copy downloaded gamecontrollerdb.txt into sdl2-jstest build_dir ...
Ok, that appears correct....in the space of 1 month, the file was updated that fixed things? -redo Amiga Test Kit check in emulation -- rightshoulder event still not registered in emulation ; works in GUI Go figure... does sdl2-jstest see things correctly.. Everything looks like it should work and does in GUI, only in emulation is the rightshoulder event not recognized... with this SFC controller in CD32 pad mode. I doubt it'll help any, but later I'll include a line in gamecontrollerdb.txt to specifically match this device ( ID 081f:e401 Manta gamepad ). I've ordered a Retroflag SNES controller to do some comparative testing (will take a couple of weeks to get here ;) |
@giantclambake This needs debugging to find out what button Id is triggered inside emulation, when you press that button. Maybe it's not correctly mapped, maybe it's not reported as the expected button, I'm not sure what's going on. Are you on Discord? It would go faster if we could chat in real-time about this, maybe send you some debug versions with extra logging info to see what's happening when you press the button. |
@midwan -- yes, I'm aware of that, I was merely curious wrt what happens in the winuae case ;) No, not on discord (zero interest in new 'social media' =) ; I do have 20 of these Manta gamepads ~ if you have a postal address, more than happy to send you one ;) If the 'Retroflag SNES controller' works for you, in theory the same device should work here, but I need wait for that to get here to test that theory. If you have any lines of code I can patch my local copy with to get some info of what's being presented to the emulation process when the button is pressed that's mapped to 'rightshoulder', you could just attach here. To be clear, button 'b5' is recognized by the emulation when mapped to a different event ~ but isn't recognized when (any) button is mapped to 'rightshoulder' ....(just weird, considering it works with the other controller device =) edit: also works in fs-uae, all buttons mapped and working (including b8 -> pause as default) |
M'kay .... I think I finally have a notion about what's going wrong here ;) The SFC controller(s) giving me this issue, are those such as -> https://www.ebay.com.au/itm/201909944241 This kind of device is detected in amiberry as 'SFC controller' (gets sanitized to 'USB gamepad'), and the button mappings are provided by conf/gamecontrollerdb.txt as a result of using SDL_CONTROLLER ... and AFAICT the linux driver being employed is USB-HID or similar in the case of these SFC controllers.... ....as seen above, I was curious why when testing the same controller in fs-uae (which also uses SDL_CONTROLLER), where it works fine, AmigaTestKit wasn't just reporting Today, the 'Retroflag' controller turned up here -> https://www.ebay.com.au/itm/402611766745 ...and as you can see, they are ostensibly 'like' devices ...from the outside... First thing I noticed, were details on the box indicating the controller would by default initialize in Bus 001 Device 041: ID 081f:e401 Manta gamepad //<- SFC controller ./sdl2-jstest -l
The -start amiberry -> load AmigaTestKit.uae->Input->change port 1: to Lets keep going ... the word 'Dinput' confuses me a bit ~ is that referring to the old directinput windows API, or, is that some shorthand for 'digital input' for some HID device, like a gamepad/joystick, attached to the USB bus?... unplug controller, hold down Y button and replug to get device into Dinput mode... controller enumerates as; Bus 001 Device 042: ID 0583:2060 Padix Co., Ltd (Rockfire) 2-axis 8-button gamepad Issuing ./sdl2-jstest -l reveals ;
-start amiberry -> load AmigaTestKit.uae->Input->change port 1: to -start amiberry -> load AmigaTestKit.uae->Input->change port 1: to On the surface it looks like if device=SFC Controller, rightshoulder:[button.mapping] is not getting passed to emulation? @midwan ~ hopefully that helps isolate it further... it certainly explains the disparity of results between our testing ;) Want a free Manta gamepad? =) |
From what I can see above, when you used the DInput mode on the Retroflag controller, the results of the mapping are very similar to your SFC one. If we isolate out only the parts that are different in the button mapping:
(top one is retroflag, bottom is SFC) One thing I noticed, is that the top one (retroflag) which works, has all the buttons in sequential order. From I'm not sure if this matters or not of course, just pointing out the only real difference I could see. If you can send me one of those, I could try debugging this locally, and see what happens in the mapping when the button is pressed. It's clearly an issue with the mapping inside emulation, for some reason. The button is pressed, but it doesn't end up triggering the RShoulder event. Send me an e-mail, and I'll provide you with a postal address you can ship one: midwan at gmail dot com. |
Indeed, I noted the b0 thru b5 mapping with b8 & b9, and b6 & b7 missing previously ~ I didn't give it much thought, because the default mappings account for this (not just 'Manta' branded pads) and everything works swimmingly everywhere else ; it's just in the emulation things go awry. More for poop & laughter than anything else, I decided to plugin my Saitek ST90 USB joystick ~ it's an improbable usage scenario for sure, but amiberry allows applying the 'CD32 pad' type to this input device ; so be it ...
Notwithstanding ... -start amiberry -> load AmigaTestKit.uae->Input->change port 1: to 'HOLTEK Saitek ST90 USB Stick' (CD32 Pad) -> Start and redo CD32 pad test. Using the default mappings, this is detected & tested like so in ATK ; Okay...what if I remap a couple of buttons, to left/right shoulder via gamecontrollerdb_user.txt ..ie; HOLTEK Saitek ST90 USB Stick,platform:Linux,start:b0,leftshoulder:b1,rightshoulder:b2,leftx:a0,lefty:a1, Buttons stop working ; mapped events not detected. I probably didn't expect that ; the user remapping does not apply. There must be some underlying logic that sets the appropriate mapping (which is seems) the user cannot over-ride. |
Amiberry would check if the button exists on the controller, before assigning a default mapping to it (like WinUAE does). In that check, it would also see if the button was reported as an axis, and in that case it would exclude it. However, with some controllers that ended up having buttons not having a mapping on them, like the "Retroflag Classic USB gamepad", which reported RShoulder as such a case. To fix this, I'm removing the check for the "isrealbutton" and instead provide the mapping directly. If the button doesn't exist, the event will never get triggered anyway, so this should be safe to do.
The SFC controller arrived today, and I was able to recreate (and fix) this. :) |
Note: 'Insert previous Disk Swapper slot in DF0:' is working as expected.
Attached example uae.conf
TIA
tester.uae.gz
The text was updated successfully, but these errors were encountered: