X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=libpcsxcore%2Fdatabase.c;h=52d17a7e6e0cc249344a98135cd08d9eb25f0ebd;hb=f3fa20c2fc7cff9352b5bcbe23e8b682bdcf0b2c;hp=f383e361623894e293521421cf7722d7284bbb2b;hpb=eedfe8060a20c8a9120ff8cab55110a1e2470887;p=pcsx_rearmed.git diff --git a/libpcsxcore/database.c b/libpcsxcore/database.c index f383e361..52d17a7e 100644 --- a/libpcsxcore/database.c +++ b/libpcsxcore/database.c @@ -1,6 +1,6 @@ #include "misc.h" -#include "../plugins/dfsound/spu_config.h" #include "sio.h" +#include "new_dynarec/new_dynarec.h" /* It's duplicated from emu_if.c */ #define ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0])) @@ -17,6 +17,21 @@ static const char MemorycardHack_db[8][10] = {"SCUS94409"} }; +static const struct +{ + const char * const id; + int mult; +} +new_dynarec_clock_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 }, +}; + /* Function for automatic patching according to GameID. */ void Apply_Hacks_Cdrom() { @@ -33,4 +48,20 @@ void Apply_Hacks_Cdrom() McdDisable[1] = 1; } } + + /* Dynarec game-specific hacks */ + new_dynarec_hacks_pergame = 0; + cycle_multiplier_override = 0; + + for (i = 0; i < ARRAY_SIZE(new_dynarec_clock_overrides); i++) + { + if (strcmp(CdromId, new_dynarec_clock_overrides[i].id) == 0) + { + cycle_multiplier_override = new_dynarec_clock_overrides[i].mult; + new_dynarec_hacks_pergame |= NDHACK_OVERRIDE_CYCLE_M; + SysPrintf("using new_dynarec clock override: %d\n", + cycle_multiplier_override); + break; + } + } }