1
0
mirror of synced 2025-01-19 01:14:04 +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
# 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)
# Default: 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));
}
else if (strcmp(command, "SKIP_OUTRUN_CABINET_CHECK") == 0)
config->skipOutrunCabinetCheck = atoi(getNextToken(NULL, " ", &saveptr));
else if (strcmp(command, "INPUT_MODE") == 0)
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_end, 0, sizeof(config.arcadeInputs.analogue_deadzone_end));
config.crc32 = elf_crc;
config.skipOutrunCabinetCheck = 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: "

View File

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

View File

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