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

cap32: add joystick button fire3 #130

Merged
merged 2 commits into from
Apr 15, 2023
Merged

cap32: add joystick button fire3 #130

merged 2 commits into from
Apr 15, 2023

Conversation

revvv
Copy link
Contributor

@revvv revvv commented Apr 13, 2023

Amstrad joysticks have three fire buttons. I added the missing fire3 button.

I have tested the code on my 3DS.

New button layout:
A = fire1
B = fire2
X = fire3 (previously unused)
Y = fire1 (previously mapped to space)

@DSkywalk Please verify ;-)
The key codes in retro_events.h are not used in a remap file, so IMHO it's ok to shift them.

@DSkywalk
Copy link
Collaborator

imagen
The atari standard usually only allows two buttons because one pin carries 5v.

Please can you tell me which controller (no hombrew) that works on an real amstrad has 3 buttons.

Thanks 🙇

@DSkywalk
Copy link
Collaborator

Also having the default space on the controller helps in the selection of many game menus. That mapping has been done that way for a reason and it is very important to keep it 👍

As far as I'm concerned this commit is invalid, but if you find a game/cpc that works with 3 buttons, you can reopen it without any problem and we'll discuss it further.

Thanks again @revvv :)

@DSkywalk DSkywalk closed this Apr 13, 2023
@revvv
Copy link
Contributor Author

revvv commented Apr 14, 2023

The atari standard usually only allows two buttons because one pin carries 5v.

The Atari standard only allows one button, but I'm talking about Amstrad and there is no 5V output on the Amstrad joystick connector

Please can you tell me which controller (no hombrew) that works on an real amstrad has 3 buttons.

Good question ;-) I have only found the AMX mouse.
Do modded joysticks count? I have modded my Competition Pro Retro and it works perfectly with ?joy(0) for example.

Also having the default space on the controller helps in the selection of many game menus.

Well, if you like. There are other unbound RetroPad buttons like L, R,Start, Select etc. Off topic: 1, 2, ENTER etc could also be helpful for some games...

if you find a game/cpc that works with 3 buttons

Many games offer to reconfigure your buttons. Sometimes you can configure fire3.

@revvv
Copy link
Contributor Author

revvv commented Apr 14, 2023

And note that fire3 is already in the current code for player1 and player2:

   CPC_KEY_SPARE                  = 0x96,
   ...
   CPC_KEY_JOY2_FIRE3             = 0x66, // just DIY JOYSTICK

I just renamed CPC_KEY_SPARE to CPC_KEY_JOY_FIRE3
So 4 years ago you were aware of fire3 ;-)

Copy link
Collaborator

@DSkywalk DSkywalk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please review these changes to test the branch, thank you @revvv :)

libretro/retro_events.c Outdated Show resolved Hide resolved
libretro/retro_events.c Outdated Show resolved Hide resolved
libretro/retro_events.c Outdated Show resolved Hide resolved
libretro/retro_events.c Outdated Show resolved Hide resolved
libretro/retro_events.h Outdated Show resolved Hide resolved
libretro/retro_events.c Outdated Show resolved Hide resolved
libretro/retro_events.c Outdated Show resolved Hide resolved
@DSkywalk DSkywalk reopened this Apr 14, 2023
@DSkywalk DSkywalk marked this pull request as draft April 14, 2023 17:30
@DSkywalk
Copy link
Collaborator

DSkywalk commented Apr 14, 2023

Well, if you like. There are other unbound RetroPad buttons like L, R,Start, Select etc. Off topic: 1, 2, ENTER etc could also be helpful for some games...

Please note that we have been working for a year to create configurations (see RMP/clean-cpc-db) for the games and change the button configuration now would break many of them and they would have to be redone. This part is very critical 👍

@DSkywalk
Copy link
Collaborator

DSkywalk commented Apr 14, 2023

I agree to add it to the JOYSTICK CFG ( AUTO ) in the X button and document it properly, but the other changes should be reverted. Thank you again @revvv :)

@DSkywalk DSkywalk marked this pull request as ready for review April 15, 2023 09:15
@LibretroAdmin
Copy link
Contributor

Hi @DSkywalk , leaving it entirely in your hands as to how to proceed. You can decide to merge PRs as you see fit for this repo

@DSkywalk
Copy link
Collaborator

Hello @LibretroAdmin :)

Before proceeding, I will need to check that everything is working properly. However, Thank you for all your trust in my vision and support during this time ❤️

@DSkywalk
Copy link
Collaborator

Tested OK :)

@DSkywalk DSkywalk merged commit 7ba8a88 into libretro:master Apr 15, 2023
@revvv
Copy link
Contributor Author

revvv commented Apr 16, 2023

Tested nightly Windows x64 build: OK
Thank you!!!

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

Successfully merging this pull request may close these issues.

None yet

3 participants