-
-
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
SDL2 | Various Control Mapping Issues (including CD32) #17
Comments
@HoraceAndTheSpider |
thanks midwan. Happy to test whatever i can. On the latest build (yours) with 'dpad as joy' or 'dpad as cd32' , i get no results.... no fire / no movement still. if i select 'sony ps3 controller' the fire button appears to be the 'select' button, which i am fairly sure is button '0' .... this pretty much limits me to going back to the 0.4 version of uae4arm sadly. Anything you can do to make this more like FS-UAE, seperating host (saved under global config) and emulated (saved with game config) controls, the better it will be imho. This means that you'd need 'standard' mappings for the "dpad as joy" etc, that will directly relate to the type of controller, but maybe the fs-uae files for those could even be re-used? FrodeSolheim (the author) is a pretty friendly and helpful guy, and would probably give some pointers. The game config itself would simply decide if its to map to mouse/joy/cd32 or a custom layout, which would be great as they could be shared universally for project such as this: https://www.facebook.com/groups/1854320841462593 (please feel free to join the group!) |
Right, so the thing about FS-UAE controllers got me looking into it more. The controller files really would be easy to 'borrow'! I've pasted an example here: For Mapping the PS3 pad (file says 'linux' but it came from the OSX version) The critical bit is the [default] section On the left hand side, it basically lists out all of the available axis/buttons. On the right hand side, it 'maps' it to an Emulator-Side control. The right-hand side is universal. I think UAE4ARM 0.4 already has something like this, which resides from the Pandora code. So you would simply tell it that ; If Port_X_CD32 mode = enabled if Port_X_joystick mode if Port_X_parallel mode Obviously you'd need to double the code so that you check for multiple input devices (2-4 player for joypads etc) , but you would still be able to grab the mapping of many controllers from existing files! Hope this proves helpful |
This looks promising, thanks! |
@osvaldolove @HoraceAndTheSpider |
The more i look at this, the easier i think it would be for this to be 'libretro' friendly.... since libretro maps -> 'internal' host maps (south_button , north_button etc) would replace the joy input -> 'internal' host maps section. This would allow focus on 'internal' host maps -> game specific layouts (CD32, standard joystick, or custom) to be made as simple as possible, but retain functionality. I hope I will have some time to try and help in this area. |
Note to self:
|
I got a cd32 game working with latest amiberry using ps3 controller. check out my .uae file i renamed to txt, with custom mapped ps3 controller for cd32 functions. I tried Project X CD32 works perfect, all movement, fire button, weapon select. Project-X & F17 Challenge v2.0 (1993)(Team 17)[!][compilation][CDD3499].txt still missing yellow & Green button mapping though? Very strange?? |
Yes, since my original post, PS3 has a specific hard-coded routine for cd32 mapping that I added... just set ye joystick input type to cd32joy :) It's just ever other pad that needs the work now ;) |
Great excellent! One other question where do we post issues with games? I cant get Turrican II Working, it plays for about 5 seconds then quits back to emulation station. Can't work out what type of config would make it work with gui settings? |
The issue with Turrican II is already reported here: #103 |
Has there been any advancements in cd32 mapping for ps3 controllers? It seems that directions work, also BLUE/RED/PLAY work Where is yellow, green Forward reverse? I have tried sutom controls and allocate Yellow or green to another button on the ps3 controller but it doesnt work? |
Which part below do i type "cd32joy" joyport1=joy1 input.1.joystick.0.friendlyname=dPad as joystick |
Change this one:
joyport1mode=djoy
…On 12 May 2017, 03:38 +0100, ransom1122 ***@***.***>, wrote:
[quote]Yes, since my original post, PS3 has a specific hard-coded routine for cd32 mapping that I added... just set ye joystick input type to cd32joy :)
It's just ever other pad that needs the work now ;)[/quote]
Which part below do i type "cd32joy"
joyport1=joy1
joyport1autofire=none
joyport1mode=djoy
joyportfriendlyname1=PLAYSTATION(R)3 Controller
joyportname1=JOY1
input.1.joystick.0.friendlyname=dPad as joystick
input.1.joystick.0.name=JOY0
input.1.joystick.0.empty=true
input.1.joystick.0.disabled=false
input.1.joystick.1.friendlyname=PLAYSTATION(R)3 Controller
input.1.joystick.1.name=JOY1
input.1.joystick.1.empty=true
input.1.joystick.1.disabled=false
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub (#17 (comment)), or mute the thread (https://github.com/notifications/unsubscribe-auth/ADn9_GRsiHnyFIxGV7hkmp2jFsVH4FK1ks5r48YagaJpZM4KG-Uv).
|
@osvaldolove Does this allow all cd32 buttons functions to work with a ps3 Controller? I will try it tonight :) |
Should do!
From: ransom1122
Sent: 12 May 2017 07:53
To: midwan/amiberry
Cc: Oliver Ainger; Mention
Subject: Re: [midwan/amiberry] SDL2 | Various Control Mapping Issues(including CD32) (#17)
@osvaldolove Does this allow all cd32 buttons functions to work with a ps3 Controller? I will try it tonight :)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
OK That did the trick, I am able to play Arabian Nights CD32 perfectly now. BUT when I did I ran the AmigaCD32test.adf I am missing the BLUE Button?? How can I add the blue button in? Previous config with joyport1mode=djoy BLUE = CIRCLE Button. But now CIRCLE Button shows no Function with the CD32ADF Tester? PS3 Controller mapping CIRCLE = ??No Function?? |
There was a "hack" in place to fix the blue button. I assume this has been left in. Second button and blue are not the same in the Amiga hardware so possible the tester is reading the wrong one (or midwan removed the hack) .... are you using my tester from above? |
@HoraceAndTheSpider use any cd32 game with the config "cd32joy" added. try the cd32 adf tester and you will see blue button / PS3 CIRCLE Button doesnt work? |
As I said it could be the tester. Try Cannon Fodder Cd32 and see if you throw grenades (I have done this and it worked ok, using PS3 pad) |
@HoraceAndTheSpider Wasn't your hack only in the SDL1 master branch? Don't think it was pulled in to the SDL2 branch but could be wrong. |
No it does not throw bombs, Circle Button Shoots the guns? I also tried Bitmap Brothers Collection [OCS] (CD32)** with cd32joy. On the menu all options work except for the blue button? Same problem here. |
Can anyone verify if Cannon Fodder CD32 version (not the whdload CD32 - Blue Button working with grenades after editing the cfg; joyport1mode=djoy It seems cd32joy activates all cd32 button presses except for Blue button which should be circle button. |
right, so i have just tested this with the Amiberry i built from source (From RetroPie menu) and i can confirm everything works correctly on PS3 pads in CD32 mode. The way to demonstrate this in Cannon Fodder CD32: (it does not matter if this is WHDLoad CD32 or not - the joypad input routine is the same!) set: joyport1mode=djoy Both buttons should work (Cicle to walk, X to fire) however to throw a grenade you must press both buttons together. This is not possible in this 'second fire only' mode. You will also see if you use the Circle button on a Soldiers name (e.g. JOOLS) then the selection of the character is not correctly made (it will 'flicker' briefly but not select) now set: joyport1mode=cd32joy Again both buttons should work (Cicle to walk, X to fire) but it is not possible (once you have collected some) to throw grenades by pressing Circle+X together. You can also test this on level 1 by using Circle to select an individual member of the team, and this will happen correctly. This works because Cannn Fodders specifically requires 'blue' to operate correctly, and does not work with the 'standard' second button (the equivalent of 'right mouse button') There is actually a related (incorrect) matter to this in the Amiberry source which will need looking at, which allows this to work. I will look at the result of the joypad tester seperately. @osvaldolove - it's in the source here, and works when i am installing direct from RetroPie? |
OK, very strange, I cannot test Cannon Fodder now, due to my covers downloading.. I Will try it again later. but I did test my Bitmap Brothers Collection [OCS] (CD32) Twice. On the menu You cannot press the Blue button to choose the game that represents Blue. (And this is with joyport1mode=cd32joy included the cfg. |
Is that an unofficial collection? It is possible they are detecting 'second fire' instead of 'blue', which would cause the problem. |
I am not sure. I will confirm the Cannon Fodder CD32 issue tomorrow. Thanks |
I have just seen that the CD32 tester above is the old one. I have updated the link. THis will show 'blue' operate correctly, and if 'second fire' is used instead of blue (e..g where joyport1mode=djoy is set) then 'all buttons' (except red) will appear to have been pressed. |
Thank you for your quick response and your dedication with this project :) |
@ransom1122 what version are you testing this on ? I have a feeling you're using SDL1 judging by your other posts that mention 'fast copper', but this thread is labelled SDL2 version. It's a bit confusing. |
I am pretty sure @midwan tagged the thread SDL2 in relation to the original request (as it would be easier in that version) , but the PS3 / cd32 testing will indeed related to the main released version.... no idea if the code is still present in the SDL2 code |
Latest version .05 |
Nope..? Likewise with the new ADFTester every button works except for BLUE Cannon Fodder Blue button does nothing even when pressed with "X" on PS3 pad with "joyport1mode=cd32joy" as the config. If i change the cfg to joyport1mode=djoy then Blue button (Circle button) works as the fire button. |
Blue would be on circle. red is on X. What does happen when you press Circle on the new cd32 tester? Can you screenshot, or video demo? Did you install amiberry from source or binary? I would try installing from Source to see if that helps.... I can point you to the line of code that maybe isn't in the built version. I am assuming you are using genuine Sony PS3 pad etc. |
pandora_input.cpp
|
This can be set to "blue" but then doesn't work correctly (which is what I suspect yours is) |
Can you please send me your Cannon Fodder CD32 Config so I can see if there is a difference at my end. Attached is my Cannon Fodder CD32 config |
I am running it from Whdload (but the cd32 version) - that wouldn't affect the input device though. I did ask if you installed from Source or binary though? |
I installed it from source? |
@HoraceAndTheSpider I think @ransom1122 could be right. All the CD32 buttons work fine on your CD32 tester in the OP but the blue button doesn't seem to work in games. I even tried adding your fix to the SDL2 version and it didn't work. Below is a link to an absolutely awesome Amiga tester that tests everything, keyboard, sound, video, and joystick/cd32 pads etc. The blue button doesn't work on this either. https://github.com/keirf/Amiga-Stuff |
@blinkydoos I assume are you using a PS3 Controller also, only you dont say? The fix i made is only for PS3 pads which come up as "Sony PLAYSTATION(R)3 Controller" or "PLAYSTATION(R)3 Controller" - i know some pads show up differently still! (just to make things more confusing, though these are usually fakes) It would be sort-of 'normal' behaviour for blue not to work on the non-fixed (non-ps3) setup, because it maps 'second fire' only... this is due to the iritating differences in how the input is read by either However..... There is definately something wrong in the main code anyway with how this is all handled, I agree there, as i said i had to make a dirty swap to 'second button' to make blue work. However, i have tested a number of CD32 games on amiberry with my PS3 pad now and they all work? :S I am even doing this on a fresh install from source. I suspect some of this may be fixed when the codebase is updated. I cited Cannon Fodder CD32 as an example of this, because you cannot play the game properly unless 'actual' blue is working (because although you can move/fire, you cant throw grenades with both buttons pressed), and i am able to play it now. If you are also on a PS3 pad, I am wondering if swapping the 'commenting out' of the lines here in pandora_input.cpp would work for you. I'd be interested to know.
I have just noticed in @ransom1122 's picture 'custom' has been swiched on, and this should not be required for the fix. |
(apologies for accidentally hitting 'close'!) |
Sorry I forgot to say, yes I am using a PS3 pad and tested on Amiberry SDL1 and SDL2 (compiled from source). I don't have Custom Controls ticked on SDL1 (and midwan completely disabled them on SDL2). I changed the config joyport1mode to cd32joy. I used your tester that you posted and all buttons seem to respond (including blue) but in some games the blue button does nothing. I tried the Codemasters Big 6 that ransom tried, it says press blue for instructions but doesn't work. I think Super Stardust CD32 allows you to redefine the buttons so I'll check that tomorrow. It seems a lot of games just "work" because it treats the blue button as a standard joystick 2nd button and you could probably use a normal joystick to play them on a real Amiga instead of a CD32 pad. Did you try the tool I posted above as that has a CD32 pad tester and see if the blue button works on yours ? (I also changed the INPUTEVENT_JOY2_CD32_BLUE line to 2ND_BUTTON etc. before building the SDL2 version). |
I still have no joy with the blue button with Cannon Fodder CD32 with the controller setup as "PLAYSTATION(R)3 Controller" input. Tried everything, removing custom control option. etc Cedric And The Lost Sceptre [CD32] - Blue button seems to work on the main menu to select English language, but I think this game is not an official CD32 game anyway. I can't figure out why most cd32 games won't allow the blue button? |
@HoraceAndTheSpider I tried Super Stardust CD32 and all buttons work except the BLUE one. This means your pad tester must only be checking for standing Joystick button 2 and not proper Blue which is why Blue doesn't work in the tester I posted above. |
Almost everything here will be sorted on next version with new mapping options. The blue/2nd button aspect will need checking in the latest beta. |
I assume this one is now closed? :) |
Yes, all of the points raised have been fixed... 15 months(!!) later! |
As requested, the controller issues to be raised here:
For context, I am using a PS3 pad on uae4arm. In all examples i am setting 'port 1' as the most common option.
-- Analogue only works as directional controls (nothing on the d-pad)
-- I cannot set joystick or cd32 options for the PS3 pad without using 'custom' setting.
-- using custom setting, i am missing the option of adding anything to the PS3 start/select buttons. This creates an issue for CD32 pad mapping, as it is lacking a input button (i.e. having only 6 to choose, where my controller has 9 available and the CD32 has 7 to map)
-- the cd32 options , when set on 'custom' do not appear to work, no response on testing so far.
-- there is no 'cd32 red' 'cd32 blue' or 'cd32 play' available in the custom drop downs.... please note that red/joy fire 1 and blue/joy fire 2 are not the same input.
Although they often operate the same, the code to read the (amiga side) differs, and this does cause 'fire' not to work in some games where 'red' does. (there is common CD32 WHDLoad asm reading code that has this difference)
If it helps, i have a small program for testing cd32 inputs, you are welcome to use
https://www.dropbox.com/s/3o505q9h8hh1of9/CD32-tester%20%282016%29.adf?dl=0
[link updated to latest version - 14/05/2017]
This was needed for resolving similar issues on PSPUAE development, some years ago.
I would also welcome the ability to map to all available host inputs, and not ony the ones 'equal' to the Pandora, as some controllers have extra buttons we cannot yet map to.
Similarly, the abilty to map some UAE controls (quit program, 'pause' , display menu etc) would be welcomed.
FOL, the final developer of PSPUAE added these comments on the same topic:
"Theres also an issue with multi-key press games, i.e. Microcosm, Subwar 2050. You can not press FWD and say Yellow at same time. It may be related to RED and BLUE input code. Every game I have tried that requires RWD or FWD + Colour keys do not work."
Many thanks for your work on this project.
The text was updated successfully, but these errors were encountered: