Skip to content
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

Add a new xbox or ps4 controller style layouts for better weapon switching? #178

Open
palmerj opened this issue Aug 7, 2022 · 4 comments

Comments

@palmerj
Copy link

palmerj commented Aug 7, 2022

Would it be possible to add a new layout for something more like xbox or ps4 style layouts? The key benefit is having better weapon buttons or quick weapon switches. e.g

PS3:

Screen Shot 2022-08-03 at 3 05 28 pm

PS4:

image

Xbox OG (what the current modern layout controls are pretty close too, but not what I want):

Screen Shot 2022-08-08 at 5 48 08 pm

XBox 360 style:

image

or even better this custom setup

image

I understand that the PS4 button switching modes might not be possible as they use each d-pad direction for a weapon group (2 weapons each) and you need to toggle each direction to bring up each weapon.

Thanks!

@palmerj palmerj changed the title Add a new xbox One or ps4 style layouts? Add a new xbox one or ps4 style layouts? Aug 7, 2022
@palmerj palmerj changed the title Add a new xbox one or ps4 style layouts? Add a new xbox or ps4 controller style layouts? Aug 7, 2022
@palmerj palmerj changed the title Add a new xbox or ps4 controller style layouts? Add a new xbox or ps4 controller style layouts for better weapon switching? Aug 9, 2022
@palmerj
Copy link
Author

palmerj commented Aug 9, 2022

I know I might be asking too much to get another layout added, but can we at least add more key options for customisation? Or is that not possible, and you can only map game key to number of virtual retropad buttons?

At the moment we have:

{ 0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_LEFT,   "D-Pad Left" },
{ 0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_UP,     "D-Pad Up" },
{ 0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_DOWN,   "D-Pad Down" },
{ 0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_RIGHT,  "D-Pad Right" },
{ 0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_B,      "Show Last Message" },
{ 0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_A,      "Next Weapon" },
{ 0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_X,      "Previous Weapon" },
{ 0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_Y,      "Use" },
{ 0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_L,      "Quick Load" },
{ 0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_R,      "Quick Save" },
{ 0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_L2,     "Run" },
{ 0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_R2,     "Fire" },
{ 0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_L3,     "Toggle Run" },
{ 0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_R3,     "180 Turn" },
{ 0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_SELECT, "Show/Hide Map" },
{ 0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_START,  "Show/Hide Menu" },
{ 0, RETRO_DEVICE_ANALOG, RETRO_DEVICE_INDEX_ANALOG_LEFT, RETRO_DEVICE_ID_ANALOG_X, "Strafe" },
{ 0, RETRO_DEVICE_ANALOG, RETRO_DEVICE_INDEX_ANALOG_LEFT, RETRO_DEVICE_ID_ANALOG_Y, "Move" },
{ 0, RETRO_DEVICE_ANALOG, RETRO_DEVICE_INDEX_ANALOG_RIGHT, RETRO_DEVICE_ID_ANALOG_X, "Turn" 

Would be nice to have all of the weapon buttons from 0-9 available for customisation, especially 0 for the best weapon selection. I also find it's really useful to have the zoom in (+) and zoom out (-) options for the map.

If supported, I'm happy to help create a PR to do this, but just need some guidance on what would make sense here.

@hizzlekizzle
Copy link
Contributor

Unfortunately, it looks like it's using pretty much every available input, aside from ANALOG_RIGHT's Y axis.

It would be possible to add another emulated "device type" that has the PS/Xbox controls as a basis (call it classic vs modern or whatever). You can look at pretty much any core with multiple device types (snes9x for example) to see how that's typically achieved.

@palmerj
Copy link
Author

palmerj commented Aug 9, 2022

Ok thanks.

Note that this core already has multiple device types:

"Gamepad Modern" Based on Original XBOX Doom 3 Collection
"Gamepad Classic" Based on PS1 Doom Port!
"RetroKeyboard/Mouse"

@hizzlekizzle
Copy link
Contributor

Oh, in that case, yeah, just spin up another one and give it a fancy name :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants