static const struct retro_variable vars[] = {
{ "pcsx_rearmed_frameskip", "Frameskip; 0|1|2|3" },
{ "pcsx_rearmed_region", "Region; Auto|NTSC|PAL" },
- { "pcsx_rearmed_pad1type", "Pad 1 Type; standard|analog" },
- { "pcsx_rearmed_pad2type", "Pad 2 Type; standard|analog" },
+ { "pcsx_rearmed_pad1type", "Pad 1 Type; standard|analog|negcon" },
+ { "pcsx_rearmed_pad2type", "Pad 2 Type; standard|analog|negcon" },
#ifndef DRC_DISABLE
{ "pcsx_rearmed_drc", "Dynamic recompiler; enabled|disabled" },
#endif
in_type1 = PSE_PAD_TYPE_STANDARD;
if (strcmp(var.value, "analog") == 0)
in_type1 = PSE_PAD_TYPE_ANALOGPAD;
+ if (strcmp(var.value, "negcon") == 0)
+ in_type1 = PSE_PAD_TYPE_NEGCON;
}
var.value = NULL;
in_type2 = PSE_PAD_TYPE_STANDARD;
if (strcmp(var.value, "analog") == 0)
in_type2 = PSE_PAD_TYPE_ANALOGPAD;
+ if (strcmp(var.value, "negcon") == 0)
+ in_type2 = PSE_PAD_TYPE_NEGCON;
+
}
#ifdef __ARM_NEON__
if (input_state_cb(0, RETRO_DEVICE_JOYPAD, 0, i))
in_keystate |= retro_psx_map[i];
+
if (in_type1 == PSE_PAD_TYPE_ANALOGPAD)
{
in_a1[0] = (input_state_cb(0, RETRO_DEVICE_ANALOG, RETRO_DEVICE_INDEX_ANALOG_LEFT, RETRO_DEVICE_ID_ANALOG_X) / 256) + 128;
in_a4[1] = (input_state_cb(1, RETRO_DEVICE_ANALOG, RETRO_DEVICE_INDEX_ANALOG_RIGHT, RETRO_DEVICE_ID_ANALOG_Y) / 256) + 128;
}
+
+ if (in_type1 == PSE_PAD_TYPE_NEGCON)
+ {
+ in_a1[0] = 0;
+
+ if(input_state_cb(0, RETRO_DEVICE_JOYPAD, 0, 12)) // left brake
+ in_a1[1] = 255;
+ else
+ in_a1[1] = 0;
+
+
+ in_a2[0] = (input_state_cb(0, RETRO_DEVICE_ANALOG, RETRO_DEVICE_INDEX_ANALOG_RIGHT, RETRO_DEVICE_ID_ANALOG_X) / 256) + 128; //steer
+ in_a2[1] = 255 - ((input_state_cb(0, RETRO_DEVICE_ANALOG, RETRO_DEVICE_INDEX_ANALOG_RIGHT, RETRO_DEVICE_ID_ANALOG_Y) / 256) + 128); //thrust
+ }
+
+ if (in_type2 == PSE_PAD_TYPE_NEGCON)
+ {
+ in_a3[0] = 0;
+
+ if(input_state_cb(1, RETRO_DEVICE_JOYPAD, 0, 12)) // left brake
+ in_a3[1] = 255;
+ else
+ in_a3[1] = 0;
+
+
+ in_a4[0] = (input_state_cb(1, RETRO_DEVICE_ANALOG, RETRO_DEVICE_INDEX_ANALOG_RIGHT, RETRO_DEVICE_ID_ANALOG_X) / 256) + 128; //steer
+ in_a4[1] = 255 - ((input_state_cb(1, RETRO_DEVICE_ANALOG, RETRO_DEVICE_INDEX_ANALOG_RIGHT, RETRO_DEVICE_ID_ANALOG_Y) / 256) + 128); //thrust
+ }
+
+
stop = 0;
psxCpu->Execute();
{
pad->controllerType = in_type1;
pad->buttonStatus = ~in_keystate;
- if (in_type1 == PSE_PAD_TYPE_ANALOGPAD) {
- pad->leftJoyX = in_a1[0];
- pad->leftJoyY = in_a1[1];
- pad->rightJoyX = in_a2[0];
- pad->rightJoyY = in_a2[1];
- }
+ if (in_type1 == PSE_PAD_TYPE_ANALOGPAD || in_type1 == PSE_PAD_TYPE_NEGCON) {
+ pad->leftJoyX = in_a1[0];
+ pad->leftJoyY = in_a1[1];
+ pad->rightJoyX = in_a2[0];
+ pad->rightJoyY = in_a2[1];
+ }
return 0;
}
{
pad->controllerType = in_type2;
pad->buttonStatus = ~in_keystate >> 16;
- if (in_type2 == PSE_PAD_TYPE_ANALOGPAD) {
+ if (in_type2 == PSE_PAD_TYPE_ANALOGPAD || in_type2 == PSE_PAD_TYPE_NEGCON) {
pad->leftJoyX = in_a3[0];
pad->leftJoyY = in_a3[1];
pad->rightJoyX = in_a4[0];