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 cycle_multiplier_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 */
33 #if defined(DRC_DISABLE) || defined(LIGHTREC) /* new_dynarec has a hack for this game */
34 /* Parasite Eve II - internal timer checks */
42 /* Function for automatic patching according to GameID. */
43 void Apply_Hacks_Cdrom()
47 /* Apply Memory card hack for Codename Tenka. (The game needs one of the memory card slots to be empty) */
48 for(i=0;i<ARRAY_SIZE(MemorycardHack_db);i++)
50 if (strncmp(CdromId, MemorycardHack_db[i], 9) == 0)
52 /* Disable the second memory card slot for the game */
54 /* This also needs to be done because in sio.c, they don't use Config.Mcd2 for that purpose */
59 /* Dynarec game-specific hacks */
60 new_dynarec_hacks_pergame = 0;
61 Config.cycle_multiplier_override = 0;
63 for (i = 0; i < ARRAY_SIZE(cycle_multiplier_overrides); i++)
65 if (strcmp(CdromId, cycle_multiplier_overrides[i].id) == 0)
67 Config.cycle_multiplier_override = cycle_multiplier_overrides[i].mult;
68 new_dynarec_hacks_pergame |= NDHACK_OVERRIDE_CYCLE_M;
69 SysPrintf("using cycle_multiplier_override: %d\n",
70 Config.cycle_multiplier_override);