1
0
mirror of synced 2025-01-19 09:17:25 +01:00

Make outrun cabinet check a setting

This commit is contained in:
Bobby Dilley 2025-01-03 23:18:10 +00:00
parent e7456b3e69
commit cae07b58b5
4 changed files with 15 additions and 3 deletions

View File

@ -123,6 +123,10 @@
# Default: 60 # Default: 60
# FPS_TARGET 60 # FPS_TARGET 60
# Set to 1 to bypass cabinet checks including drive board and tower in Outrun 2 SP SDX
# Default: 0
# SKIP_OUTRUN_CABINET_CHECK 0
# Set to 1 if you want to render LGJ using the mesa patches instead of nVidia (fixes some glitches) # Set to 1 if you want to render LGJ using the mesa patches instead of nVidia (fixes some glitches)
# Default: 1 # Default: 1
# LGJ_RENDER_WITH_MESA 1 # LGJ_RENDER_WITH_MESA 1

View File

@ -1225,6 +1225,9 @@ int readConfig(FILE *configFile, EmulatorConfig *config)
config->arcadeInputs.analogue_deadzone_end[7] = atoi(getNextToken(NULL, " ", &saveptr)); config->arcadeInputs.analogue_deadzone_end[7] = atoi(getNextToken(NULL, " ", &saveptr));
} }
else if (strcmp(command, "SKIP_OUTRUN_CABINET_CHECK") == 0)
config->skipOutrunCabinetCheck = atoi(getNextToken(NULL, " ", &saveptr));
else if (strcmp(command, "INPUT_MODE") == 0) else if (strcmp(command, "INPUT_MODE") == 0)
config->inputMode = atoi(getNextToken(NULL, " ", &saveptr)); config->inputMode = atoi(getNextToken(NULL, " ", &saveptr));
@ -1309,6 +1312,7 @@ int initConfig()
memset(&config.arcadeInputs.analogue_deadzone_middle, 0, sizeof(config.arcadeInputs.analogue_deadzone_middle)); memset(&config.arcadeInputs.analogue_deadzone_middle, 0, sizeof(config.arcadeInputs.analogue_deadzone_middle));
memset(&config.arcadeInputs.analogue_deadzone_end, 0, sizeof(config.arcadeInputs.analogue_deadzone_end)); memset(&config.arcadeInputs.analogue_deadzone_end, 0, sizeof(config.arcadeInputs.analogue_deadzone_end));
config.crc32 = elf_crc; config.crc32 = elf_crc;
config.skipOutrunCabinetCheck = 0;
if (detectGame(config.crc32) != 0) if (detectGame(config.crc32) != 0)
{ {
printf("Warning: Unsure what game with CRC 0x%X is. Please submit this new game to the GitHub repository: " printf("Warning: Unsure what game with CRC 0x%X is. Please submit this new game to the GitHub repository: "

View File

@ -256,6 +256,7 @@ typedef struct
int phMode; int phMode;
ArcadeInputs arcadeInputs; ArcadeInputs arcadeInputs;
int inputMode; // 0 = both, 1 = SDL/X11 only, 2 = EVDEV only int inputMode; // 0 = both, 1 = SDL/X11 only, 2 = EVDEV only
int skipOutrunCabinetCheck;
} EmulatorConfig; } EmulatorConfig;
KeyMapping getDefaultKeymap(); KeyMapping getDefaultKeymap();

View File

@ -661,10 +661,13 @@ int initPatch()
} }
detourFunction(0x0804d148, or2snprintf); // Fixes a bug in snprintf libc 2.39?? detourFunction(0x0804d148, or2snprintf); // Fixes a bug in snprintf libc 2.39??
// Bypass checks for tower and Force Feedback? // Only apply these patches if skipOutrunCabinetCheck is enabled
if (config->skipOutrunCabinetCheck) {
// Bypass checks for tower and Force Feedback
detourFunction(0x08103eaa, stubRetOne); detourFunction(0x08103eaa, stubRetOne);
detourFunction(0x08105d88, stubRetOne); detourFunction(0x08105d88, stubRetOne);
} }
}
break; break;
case OUTRUN_2_SP_SDX_REVA_TEST: case OUTRUN_2_SP_SDX_REVA_TEST:
case OUTRUN_2_SP_SDX_REVA_TEST2: case OUTRUN_2_SP_SDX_REVA_TEST2: