X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=libpcsxcore%2Fdatabase.c;h=561aedeedb79bdd39f3ff357771e53cb7d26a892;hb=d5aeda23720ba9374312f8d387f299024fedb7e6;hp=61312e0920cbd391bb7637d9c0114cad0c7c3d98;hpb=2405813165a8259d501406d91c3d3161972db9ec;p=pcsx_rearmed.git diff --git a/libpcsxcore/database.c b/libpcsxcore/database.c index 61312e09..561aedee 100644 --- a/libpcsxcore/database.c +++ b/libpcsxcore/database.c @@ -17,6 +17,28 @@ static const char MemorycardHack_db[8][10] = {"SCUS94409"} }; +static const struct +{ + const char * const id; + int mult; +} +cycle_multiplier_overrides[] = +{ + /* Internal Section - fussy about timings */ + { "SLPS01868", 202 }, + /* Super Robot Taisen Alpha - on the edge with 175, + * changing memcard settings is enough to break/unbreak it */ + { "SLPS02528", 190 }, + { "SLPS02636", 190 }, +#ifdef DRC_DISABLE /* new_dynarec has a hack for this game */ + /* Parasite Eve II - internal timer checks */ + { "SLUS01042", 125 }, + { "SLUS01055", 125 }, + { "SLES02558", 125 }, + { "SLES12558", 125 }, +#endif +}; + /* Function for automatic patching according to GameID. */ void Apply_Hacks_Cdrom() { @@ -36,12 +58,17 @@ void Apply_Hacks_Cdrom() /* Dynarec game-specific hacks */ new_dynarec_hacks_pergame = 0; - cycle_multiplier_override = 0; + Config.cycle_multiplier_override = 0; - /* Internal Section is fussy about timings */ - if (strcmp(CdromId, "SLPS01868") == 0) + for (i = 0; i < ARRAY_SIZE(cycle_multiplier_overrides); i++) { - cycle_multiplier_override = 202; - new_dynarec_hacks_pergame |= NDHACK_OVERRIDE_CYCLE_M; + if (strcmp(CdromId, cycle_multiplier_overrides[i].id) == 0) + { + Config.cycle_multiplier_override = cycle_multiplier_overrides[i].mult; + new_dynarec_hacks_pergame |= NDHACK_OVERRIDE_CYCLE_M; + SysPrintf("using cycle_multiplier_override: %d\n", + Config.cycle_multiplier_override); + break; + } } }