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
Support for Maracas & Pop'n Music controllers, WIP for others #1035
Conversation
Great work! |
There's a build error with the libretro core. Support for libretro can come in a later PR but it needs to build at least. |
Fixed. |
I tested Samba de Amigo and I'm having a hard time navigating the menus. It seems to only react correctly to very small deviations of the thumbstick. I noticed that there is a SetCondition for this device that's not currently implemented. It sets values related to the ultrasonic sensors and one of them is the update interval of anaiog inputs. Samba de Amigo sets it to 2, which means that GetCondition will only return updated analog value every 2 calls. However after implementing this function, it's not really any better. I tested the Densha de go!2 controller and it's recognized by the corresponding game. The triggers 2 and 3 bindings aren't being saved because the _2 and _3 suffixes have a special meaning when parsing the mapping file. Renaming them to |
I agree that it is a bit hard to navigate the menus, but in part that's just how it works. I don't know if you have used real maraca controllers before, but in my recollection it was kind of hit-and-miss, and a bit frustrating. In this video, you can see someone navigating the menu in the arcade version: https://www.youtube.com/watch?v=HGxzxoAt-QQ When using maracas, we hold them considerably apart and off center, so their positions are quite distinct. With thumbsticks, they are both centered by default, and that also causes issues navigating the game menu. We should raise or lower the left maraca to select a menu item, but there is no direct connection between the left and right thumbstick with the left and right maraca: the left maraca is any maraca that we hold on the "left side" (or the "leftmost" one). So, in order to navigate the menus without issues, we must point any thumbstick to the left to make it be recognized as the left maraca, and then move it up or down to select an item. Leaving both thumbsticks vertically centered can make the game suddenly change which thumbstick it considers the left maraca. But another issue seems to be saturation: a small thumbstick displacement reaches 0x00 or 0xFF very soon. The best way to test the maracas implementation might be with Samba de Amigo Ver. 2000 - it has a volleyball minigame that seems to translates 1:1 the maracas position to the "virtual hands" on screen, and you can "feel" both deadzone and saturation effects. Here's a video I recorded, moving the thumbstick to cover all the play area perimeter: https://youtu.be/q7CyQRe0LUI?t=7 Reducing saturation helps considerably - I just divided the maracas position by two: u32 get_analog_axis(int index, const PlainJoystickState &pjs) override {
if (index < 2 || index > 5)
return 0;
u8 maracas_saturation_reduction = 2;
s32 axis_val = (pjs.joy[index -2] - 0x80) / maracas_saturation_reduction + 0x80;
if (axis_val < 0) axis_val = 0;
else if (axis_val > 0xff) axis_val = 0xFF;
return axis_val;
} Now, in the volleyball minigame, I have to move the thumbstick almost all the way to reach the corners (and menu navigation is less finicky). The downside is that, if we were using real maracas, we would have to move them twice farther as well, which might not translate to how the game was originally played. A middle ground (or more versatile solution) might be making |
I must admit I have no experience with real maracas, connected or otherwise ;) so I'll trust your word on this. |
Hi there! Sorry for the late reply.
|
struct maple_fishing_controller: maple_sega_controller
{
maple_sega_purupuru vibrator;
void OnSetup() override {
maple_sega_controller::OnSetup();
vibrator.Setup(maple_port, player_num);
}; and there are other changes to do as well.
int port_count = config::MapleMainDevices[bus] == MDT_SegaController ? 2
: config::MapleMainDevices[bus] == MDT_LightGun || config::MapleMainDevices[bus] == MDT_TwinStick
|| config::MapleMainDevices[bus] == MDT_AsciiStick ? 1
: 0; You need to add the racing controller since it has one expansion port.
Thanks |
Done? |
The |
Right, I had to do the same changes on the dev branch. I guess something has changed in the build environment. Can you check my last comments in Then we should be good to go. |
Sorry, but I could not find comments in the Files changed (gamepad_device.cpp, ggpo.cpp), and I could not see any comments I thought were relevant in the files in the dev branch (gamepad_device.cpp, ggpo.cpp) - or anywhere else. Could you tell me where are your last comments? |
ui: "Axis 2" -> "R.Thumbstick" for consistency with arcade mappings
I renamed some identifiers for consistency but it's now merged. Thanks! |
Awesome! Thank you! |
I tested Maracas and Pop'n Music controllers, they are detected by their respective games and seem to work fine, as long as they are connected to ports A or B.
Issues:
Please feel free to comment and suggest changes.
Thanks!