Sync d_megadrive.cpp with MESS 0.148u1 (added ability for extra drivers, restoring sks1, sks2, sks3)

This commit is contained in:
Barry Harris 2013-02-11 13:45:25 +00:00
parent a29e96885e
commit fe6eee82b6
4 changed files with 2444 additions and 2399 deletions

View File

@ -463,7 +463,7 @@ void IpsApplyPatches(UINT8* base, char* rom_name);
#define HARDWARE_SEGA_MEGADRIVE_PCB_REALTEC (35)
#define HARDWARE_SEGA_MEGADRIVE_PCB_MC_SUP19IN1 (36)
#define HARDWARE_SEGA_MEGADRIVE_PCB_MC_SUP15IN1 (37)
#define HARDWARE_SEGA_MEGADRIVE_PCB_12IN1 (38)
#define HARDWARE_SEGA_MEGADRIVE_PCB_MC_12IN1 (38)
#define HARDWARE_SEGA_MEGADRIVE_PCB_TOPFIGHTER (39)
#define HARDWARE_SEGA_MEGADRIVE_PCB_POKEMON (40)
#define HARDWARE_SEGA_MEGADRIVE_PCB_POKEMON2 (41)

File diff suppressed because it is too large Load Diff

View File

@ -1357,16 +1357,14 @@ static INT32 MegadriveLoadRoms(bool bLoad)
for (i = 0; i < RomNum; i++) {
BurnDrvGetRomInfo(&ri, i);
switch (ri.nType & 0x0f) {
case SEGA_MD_ROM_OFFS_000000: Offset = 0x000000; break;
case SEGA_MD_ROM_OFFS_000001: Offset = 0x000001; break;
case SEGA_MD_ROM_OFFS_020000: Offset = 0x020000; break;
case SEGA_MD_ROM_OFFS_080000: Offset = 0x080000; break;
case SEGA_MD_ROM_OFFS_100000: Offset = 0x100000; break;
case SEGA_MD_ROM_OFFS_100001: Offset = 0x100001; break;
case SEGA_MD_ROM_OFFS_200000: Offset = 0x200000; break;
case SEGA_MD_ROM_OFFS_300000: Offset = 0x300000; break;
}
if ((ri.nType & SEGA_MD_ROM_OFFS_000000) == SEGA_MD_ROM_OFFS_000000) Offset = 0x000000;
if ((ri.nType & SEGA_MD_ROM_OFFS_000001) == SEGA_MD_ROM_OFFS_000001) Offset = 0x000001;
if ((ri.nType & SEGA_MD_ROM_OFFS_020000) == SEGA_MD_ROM_OFFS_020000) Offset = 0x020000;
if ((ri.nType & SEGA_MD_ROM_OFFS_080000) == SEGA_MD_ROM_OFFS_080000) Offset = 0x080000;
if ((ri.nType & SEGA_MD_ROM_OFFS_100000) == SEGA_MD_ROM_OFFS_100000) Offset = 0x100000;
if ((ri.nType & SEGA_MD_ROM_OFFS_100001) == SEGA_MD_ROM_OFFS_100001) Offset = 0x100001;
if ((ri.nType & SEGA_MD_ROM_OFFS_200000) == SEGA_MD_ROM_OFFS_200000) Offset = 0x200000;
if ((ri.nType & SEGA_MD_ROM_OFFS_300000) == SEGA_MD_ROM_OFFS_300000) Offset = 0x300000;
switch (ri.nType & 0xf0) {
case SEGA_MD_ROM_LOAD_NORMAL: {
@ -1392,6 +1390,14 @@ static INT32 MegadriveLoadRoms(bool bLoad)
break;
}
}
if ((ri.nType & SEGA_MD_ROM_RELOAD_200000_200000) == SEGA_MD_ROM_RELOAD_200000_200000) {
memcpy(RomMain + 0x200000, RomMain + 0x000000, 0x200000);
}
if ((ri.nType & SEGA_MD_ROM_RELOAD_100000_300000) == SEGA_MD_ROM_RELOAD_100000_300000) {
memcpy(RomMain + 0x300000, RomMain + 0x000000, 0x100000);
}
}
}
@ -2402,7 +2408,7 @@ static void SetupCustomCartridgeMappers()
SekClose();
}
if ((BurnDrvGetHardwareCode() & 0xff) == HARDWARE_SEGA_MEGADRIVE_PCB_12IN1) {
if ((BurnDrvGetHardwareCode() & 0xff) == HARDWARE_SEGA_MEGADRIVE_PCB_MC_12IN1) {
OriginalRom = (UINT8*)BurnMalloc(RomSize);
memcpy(OriginalRom, RomMain, RomSize);

View File

@ -10,6 +10,8 @@
#define SEGA_MD_ROM_OFFS_100001 0x06
#define SEGA_MD_ROM_OFFS_200000 0x07
#define SEGA_MD_ROM_OFFS_300000 0x08
#define SEGA_MD_ROM_RELOAD_200000_200000 0x09
#define SEGA_MD_ROM_RELOAD_100000_300000 0x0a
extern UINT8 MegadriveReset;
extern UINT8 bMegadriveRecalcPalette;