Unverified Commit 75f2e861 authored by SeventySixx's avatar SeventySixx Committed by GitHub
Browse files

Independent clamping and round modes for EE/FPU and VUs (#166)

* Splitted  clamping and round modes options for both EE/FPU and VUs

* fix on VU clamping mode option labeling
parent 3f45fe7d
Pipeline #54949 passed with stage
in 4 minutes
...@@ -362,9 +362,9 @@ struct retro_core_option_definition option_defs[] = { ...@@ -362,9 +362,9 @@ struct retro_core_option_definition option_defs[] = {
}, },
"2" }, "2" },
{INT_PCSX2_OPT_CLAMPING_MODE, {INT_PCSX2_OPT_EE_CLAMPING_MODE,
"Emulation: Clamping Mode", "Emulation: EE/FPU Clamping Mode",
"Clamping mode can fix some bugs on some games. Default value is fine for most games. (Content restart required)", "EE/FPU clamping mode can fix some bugs on some games. Default value is fine for most games. (Content restart required)",
{ {
{"0", "None"}, {"0", "None"},
{"1", "Normal (default)"}, {"1", "Normal (default)"},
...@@ -375,9 +375,35 @@ struct retro_core_option_definition option_defs[] = { ...@@ -375,9 +375,35 @@ struct retro_core_option_definition option_defs[] = {
"1" }, "1" },
{INT_PCSX2_OPT_ROUND_MODE, {INT_PCSX2_OPT_EE_ROUND_MODE,
"Emulation: Round Mode", "Emulation: EE/FPU Round Mode",
"Round mode can fix some bugs on some games. Default value is fine for most games. (Content restart required)", "EE/FPU round mode can fix some bugs on some games. Default value is fine for most games. (Content restart required)",
{
{"0", "Nearest"},
{"1", "Negative"},
{"2", "Positive"},
{"3", "Chop/Zero (default)"},
{NULL, NULL},
},
"3" },
{ INT_PCSX2_OPT_VU_CLAMPING_MODE,
"Emulation: VUs Clamping Mode",
"VUs clamping mode can fix some bugs on some games. Default value is fine for most games. (Content restart required)",
{
{"0", "None"},
{"1", "Normal (default)"},
{"2", "Extra"},
{"3", "Extra + Preserve Sign"},
{NULL, NULL},
},
"1" },
{ INT_PCSX2_OPT_VU_ROUND_MODE,
"Emulation: VUs Round Mode",
"VUs round mode can fix some bugs on some games. Default value is fine for most games. (Content restart required)",
{ {
{"0", "Nearest"}, {"0", "Nearest"},
{"1", "Negative"}, {"1", "Negative"},
......
...@@ -374,18 +374,21 @@ void retro_init(void) ...@@ -374,18 +374,21 @@ void retro_init(void)
g_Conf->EmuOptions.EnableCheats = option_value(BOOL_PCSX2_OPT_ENABLE_CHEATS, KeyOptionBool::return_type); g_Conf->EmuOptions.EnableCheats = option_value(BOOL_PCSX2_OPT_ENABLE_CHEATS, KeyOptionBool::return_type);
int clampMode = option_value(INT_PCSX2_OPT_CLAMPING_MODE, KeyOptionInt::return_type); int EE_clampMode = option_value(INT_PCSX2_OPT_EE_CLAMPING_MODE, KeyOptionInt::return_type);
g_Conf->EmuOptions.Cpu.Recompiler.fpuOverflow = (clampMode >= 1); g_Conf->EmuOptions.Cpu.Recompiler.fpuOverflow = (EE_clampMode >= 1);
g_Conf->EmuOptions.Cpu.Recompiler.fpuExtraOverflow = (clampMode >= 2); g_Conf->EmuOptions.Cpu.Recompiler.fpuExtraOverflow = (EE_clampMode >= 2);
g_Conf->EmuOptions.Cpu.Recompiler.fpuFullMode = (clampMode >= 3); g_Conf->EmuOptions.Cpu.Recompiler.fpuFullMode = (EE_clampMode >= 3);
g_Conf->EmuOptions.Cpu.Recompiler.vuOverflow = (clampMode >= 1); SSE_RoundMode EE_roundMode = (SSE_RoundMode)option_value(INT_PCSX2_OPT_EE_ROUND_MODE, KeyOptionInt::return_type);
g_Conf->EmuOptions.Cpu.Recompiler.vuExtraOverflow = (clampMode >= 2); g_Conf->EmuOptions.Cpu.sseMXCSR.SetRoundMode(EE_roundMode);
g_Conf->EmuOptions.Cpu.Recompiler.vuSignOverflow = (clampMode >= 3);
int VUs_clampMode = option_value(INT_PCSX2_OPT_VU_CLAMPING_MODE, KeyOptionInt::return_type);
SSE_RoundMode roundMode = (SSE_RoundMode)option_value(INT_PCSX2_OPT_ROUND_MODE, KeyOptionInt::return_type);; g_Conf->EmuOptions.Cpu.Recompiler.vuOverflow = (VUs_clampMode >= 1);
g_Conf->EmuOptions.Cpu.sseMXCSR.SetRoundMode(roundMode); g_Conf->EmuOptions.Cpu.Recompiler.vuExtraOverflow = (VUs_clampMode >= 2);
g_Conf->EmuOptions.Cpu.sseVUMXCSR.SetRoundMode(roundMode); g_Conf->EmuOptions.Cpu.Recompiler.vuSignOverflow = (VUs_clampMode >= 3);
SSE_RoundMode VUs_roundMode = (SSE_RoundMode)option_value(INT_PCSX2_OPT_VU_ROUND_MODE, KeyOptionInt::return_type);
g_Conf->EmuOptions.Cpu.sseVUMXCSR.SetRoundMode(VUs_roundMode);
static retro_disk_control_ext_callback disk_control = { static retro_disk_control_ext_callback disk_control = {
DiskControl::set_eject_state, DiskControl::set_eject_state,
......
...@@ -40,8 +40,10 @@ ...@@ -40,8 +40,10 @@
#define INT_PCSX2_OPT_TEXTURE_FILTERING "pcsx2_texture_filtering" #define INT_PCSX2_OPT_TEXTURE_FILTERING "pcsx2_texture_filtering"
#define INT_PCSX2_OPT_VSYNC_MTGS_QUEUE "pcsx2_vsync_mtgs_queue" #define INT_PCSX2_OPT_VSYNC_MTGS_QUEUE "pcsx2_vsync_mtgs_queue"
#define INT_PCSX2_OPT_MIPMAPPING "pcsx2_mipmapping" #define INT_PCSX2_OPT_MIPMAPPING "pcsx2_mipmapping"
#define INT_PCSX2_OPT_CLAMPING_MODE "pcsx2_clamping_mode" #define INT_PCSX2_OPT_EE_CLAMPING_MODE "pcsx2_clamping_mode"
#define INT_PCSX2_OPT_ROUND_MODE "pcsx2_round_mode" #define INT_PCSX2_OPT_EE_ROUND_MODE "pcsx2_round_mode"
#define INT_PCSX2_OPT_VU_CLAMPING_MODE "pcsx2_vu_clamping_mode"
#define INT_PCSX2_OPT_VU_ROUND_MODE "pcsx2_vu_round_mode"
#define INT_PCSX2_OPT_DITHERING "pcsx2_dithering" #define INT_PCSX2_OPT_DITHERING "pcsx2_dithering"
#define INT_PCSX2_OPT_USERHACK_TEXTURE_OFFSET_X_HUNDREDS "pcsx2_userhack_texture_offset_x_hundreds" #define INT_PCSX2_OPT_USERHACK_TEXTURE_OFFSET_X_HUNDREDS "pcsx2_userhack_texture_offset_x_hundreds"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment