Open andres-asm opened 10 years ago
I've been checking cores, genplusgx for instance implements multitap on a per-port basis, but it's horrible since you have to add a controller for each combination:
#define RETRO_DEVICE_MDPAD_3B_WAYPLAY RETRO_DEVICE_SUBCLASS(RETRO_DEVICE_JOYPAD, 3)
#define RETRO_DEVICE_MDPAD_6B_WAYPLAY RETRO_DEVICE_SUBCLASS(RETRO_DEVICE_JOYPAD, 4)
#define RETRO_DEVICE_MDPAD_3B_TEAMPLAYER RETRO_DEVICE_SUBCLASS(RETRO_DEVICE_JOYPAD, 5)
#define RETRO_DEVICE_MDPAD_6B_TEAMPLAYER RETRO_DEVICE_SUBCLASS(RETRO_DEVICE_JOYPAD, 6)
#define RETRO_DEVICE_MSPAD_2B_MASTERTAP RETRO_DEVICE_SUBCLASS(RETRO_DEVICE_JOYPAD, 7)
This is quite horrid imho. When I asked ekeeke about moving this to core options he agreed but he said he was told it should be done like this: https://github.com/ekeeke/Genesis-Plus-GX/pull/33
Other cores have this implemented as core options which seems cleaner but a bit out of place:
var.key = "beetle_psx_enable_multitap_port1";
if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)
{
if (strcmp(var.value, "enabled") == 0)
setting_psx_multitap_port_1 = true;
else if (strcmp(var.value, "disabled") == 0)
setting_psx_multitap_port_1 = false;
}
var.key = "beetle_psx_enable_multitap_port2";
if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)
{
if (strcmp(var.value, "enabled") == 0)
setting_psx_multitap_port_2 = true;
else if (strcmp(var.value, "disabled") == 0)
setting_psx_multitap_port_2 = false;
}
A flag and a corresponding toggle under input options would be neater and would help with standarization.
On many classic systems there was the option to have a multitap hooked up to a port. Now that option is irrelevant but since it fits with the retrospirit I was thinking the could be an addition to the retro_controller_description struct that can be used for such a goal.
That multitap flag could be renamed to something more generic, but by doing this we could have a mutitap attached setting in the frontend and still use different controllers for actual input.