X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=frontend%2Flibretro.c;h=b611e84e9963ee09422254e0aadb2a01a82f6019;hb=b3480be8a40914a51ad3d404fa79db706fe9c886;hp=5bc544380aa6eaced1b5cfa425810bf968531d98;hpb=003cfc63c69b3e900de768317354dfb80bbf6a55;p=pcsx_rearmed.git diff --git a/frontend/libretro.c b/frontend/libretro.c index 5bc54438..b611e84e 100644 --- a/frontend/libretro.c +++ b/frontend/libretro.c @@ -51,6 +51,7 @@ extern char McdDisable[2]; /* PCSX ReARMed core calls and stuff */ int in_type1, in_type2; int in_a1[2] = { 127, 127 }, in_a2[2] = { 127, 127 }; +int in_a3[2] = { 127, 127 }, in_a4[2] = { 127, 127 }; int in_keystate; int in_enable_vibration = 1; @@ -256,6 +257,8 @@ void retro_set_environment(retro_environment_t cb) { "pcsx_rearmed_duping_enable", "Frame duping; on|off" }, { "pcsx_rearmed_spu_reverb", "Sound: Reverb; on|off" }, { "pcsx_rearmed_spu_interpolation", "Sound: Interpolation; simple|gaussian|cubic|off" }, + { "pcsx_rearmed_pe2_fix", "Parasite Eve 2/Vandal Hearts 1/2 Fix; disabled|enabled" }, + { "pcsx_rearmed_inuyasha_fix", "InuYasha Sengoku Battle Fix; disabled|enabled" }, { NULL, NULL }, }; @@ -283,7 +286,7 @@ void retro_get_system_info(struct retro_system_info *info) { memset(info, 0, sizeof(*info)); info->library_name = "PCSX-ReARMed"; - info->library_version = "r20"; + info->library_version = "r22"; info->valid_extensions = "bin|cue|img|mdf|pbp|toc|cbn|m3u"; info->need_fullpath = true; } @@ -1085,6 +1088,28 @@ static void update_variables(bool in_flight) spu_config.iUseInterpolation = 0; } + var.value = "NULL"; + var.key = "pcsx_rearmed_pe2_fix"; + + if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) || var.value) + { + if (strcmp(var.value, "disabled") == 0) + Config.RCntFix = 0; + else if (strcmp(var.value, "enabled") == 0) + Config.RCntFix = 1; + } + + var.value = "NULL"; + var.key = "pcsx_rearmed_inuyasha_fix"; + + if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) || var.value) + { + if (strcmp(var.value, "disabled") == 0) + Config.VSyncWA = 0; + else if (strcmp(var.value, "enabled") == 0) + Config.VSyncWA = 1; + } + if (in_flight) { // inform core things about possible config changes plugin_call_rearmed_cbs(); @@ -1125,6 +1150,14 @@ void retro_run(void) in_a2[1] = (input_state_cb(0, RETRO_DEVICE_ANALOG, RETRO_DEVICE_INDEX_ANALOG_RIGHT, RETRO_DEVICE_ID_ANALOG_Y) / 256) + 128; } + if (in_type2 == PSE_PAD_TYPE_ANALOGPAD) + { + in_a3[0] = (input_state_cb(1, RETRO_DEVICE_ANALOG, RETRO_DEVICE_INDEX_ANALOG_LEFT, RETRO_DEVICE_ID_ANALOG_X) / 256) + 128; + in_a3[1] = (input_state_cb(1, RETRO_DEVICE_ANALOG, RETRO_DEVICE_INDEX_ANALOG_LEFT, RETRO_DEVICE_ID_ANALOG_Y) / 256) + 128; + in_a4[0] = (input_state_cb(1, RETRO_DEVICE_ANALOG, RETRO_DEVICE_INDEX_ANALOG_RIGHT, 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; + } + stop = 0; psxCpu->Execute(); @@ -1255,6 +1288,7 @@ void retro_init(void) cycle_multiplier = 200; #endif pl_rearmed_cbs.gpu_peops.iUseDither = 1; + spu_config.iUseFixedUpdates = 1; McdDisable[0] = 0; McdDisable[1] = 1;