3 #include "new_dynarec/new_dynarec.h"
5 /* It's duplicated from emu_if.c */
6 #define ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0]))
8 static const char MemorycardHack_db[8][10] =
10 /* Lifeforce Tenka, also known as Codename Tenka */
22 const char * const id;
25 new_dynarec_clock_overrides[] =
27 /* Internal Section - fussy about timings */
29 /* Super Robot Taisen Alpha - on the edge with 175,
30 * changing memcard settings is enough to break/unbreak it */
35 /* Function for automatic patching according to GameID. */
36 void Apply_Hacks_Cdrom()
40 /* Apply Memory card hack for Codename Tenka. (The game needs one of the memory card slots to be empty) */
41 for(i=0;i<ARRAY_SIZE(MemorycardHack_db);i++)
43 if (strncmp(CdromId, MemorycardHack_db[i], 9) == 0)
45 /* Disable the second memory card slot for the game */
47 /* This also needs to be done because in sio.c, they don't use Config.Mcd2 for that purpose */
52 /* Dynarec game-specific hacks */
53 new_dynarec_hacks_pergame = 0;
54 cycle_multiplier_override = 0;
56 for (i = 0; i < ARRAY_SIZE(new_dynarec_clock_overrides); i++)
58 if (strcmp(CdromId, new_dynarec_clock_overrides[i].id) == 0)
60 cycle_multiplier_override = new_dynarec_clock_overrides[i].mult;
61 new_dynarec_hacks_pergame |= NDHACK_OVERRIDE_CYCLE_M;
62 SysPrintf("using new_dynarec clock override: %d\n",
63 cycle_multiplier_override);