diff --git a/src/burn/drv/pre90s/d_rallyx.cpp b/src/burn/drv/pre90s/d_rallyx.cpp index 59da37f47..b59d7babc 100644 --- a/src/burn/drv/pre90s/d_rallyx.cpp +++ b/src/burn/drv/pre90s/d_rallyx.cpp @@ -1,4 +1,4 @@ -// FinalBurn Alpha driver module for Rally-X, based on the MAME driver by Nicola Salmoria. +// FinalBurn Neo driver module for Rally-X, based on the MAME driver by Nicola Salmoria. // Emulates Rally-X variants, Jungler, Tactician, Loco-Motion & Commando (Sega) // Oddities: Jungler has flipped-mode on by default, but it only affects sprites // and bullets. @@ -17,7 +17,7 @@ static UINT8 DrvDip[2] = {0, 0}; static UINT8 DrvInput[3] = {0, 0, 0}; static UINT8 DrvReset = 0; -static UINT8 *Mem = NULL; +static UINT8 *AllMem = NULL; static UINT8 *MemEnd = NULL; static UINT8 *RamStart = NULL; static UINT8 *RamEnd = NULL; @@ -765,7 +765,7 @@ STD_SAMPLE_FN(Rallyx) static INT32 MemIndex() { - UINT8 *Next; Next = Mem; + UINT8 *Next; Next = AllMem; DrvZ80Rom1 = Next; Next += 0x04000; DrvPromPalette = Next; Next += 0x00020; @@ -794,7 +794,7 @@ static INT32 MemIndex() static INT32 JunglerMemIndex() { - UINT8 *Next; Next = Mem; + UINT8 *Next; Next = AllMem; DrvZ80Rom1 = Next; Next += 0x08000; DrvZ80Rom2 = Next; Next += 0x02000; @@ -1236,15 +1236,10 @@ static void JunglerMachineInit() static INT32 DrvInit() { - INT32 nRet = 0, nLen; + INT32 nRet = 0; // Allocate and Blank all required memory - Mem = NULL; - MemIndex(); - nLen = MemEnd - (UINT8 *)0; - if ((Mem = (UINT8 *)BurnMalloc(nLen)) == NULL) return 1; - memset(Mem, 0, nLen); - MemIndex(); + BurnAllocMemIndex(); DrvTempRom = (UINT8 *)BurnMalloc(0x01000); @@ -1282,15 +1277,10 @@ static INT32 DrvInit() static INT32 DrvaInit() { - INT32 nRet = 0, nLen; + INT32 nRet = 0; // Allocate and Blank all required memory - Mem = NULL; - MemIndex(); - nLen = MemEnd - (UINT8 *)0; - if ((Mem = (UINT8 *)BurnMalloc(nLen)) == NULL) return 1; - memset(Mem, 0, nLen); - MemIndex(); + BurnAllocMemIndex(); DrvTempRom = (UINT8 *)BurnMalloc(0x01000); @@ -1333,15 +1323,10 @@ static INT32 DrvaInit() static INT32 NrallyxInit() { - INT32 nRet = 0, nLen; + INT32 nRet = 0; // Allocate and Blank all required memory - Mem = NULL; - MemIndex(); - nLen = MemEnd - (UINT8 *)0; - if ((Mem = (UINT8 *)BurnMalloc(nLen)) == NULL) return 1; - memset(Mem, 0, nLen); - MemIndex(); + BurnAllocMemIndex(); DrvTempRom = (UINT8 *)BurnMalloc(0x01000); @@ -1392,11 +1377,11 @@ static INT32 JunglerInit() INT32 nRet = 0, nLen; // Allocate and Blank all required memory - Mem = NULL; + AllMem = NULL; JunglerMemIndex(); nLen = MemEnd - (UINT8 *)0; - if ((Mem = (UINT8 *)BurnMalloc(nLen)) == NULL) return 1; - memset(Mem, 0, nLen); + if ((AllMem = (UINT8 *)BurnMalloc(nLen)) == NULL) return 1; + memset(AllMem, 0, nLen); JunglerMemIndex(); DrvTempRom = (UINT8 *)BurnMalloc(0x01000); @@ -1442,11 +1427,11 @@ static INT32 LococommonDrvInit(INT32 prgroms, INT32 soundroms) INT32 nRet = 0, nLen; // Allocate and Blank all required memory - Mem = NULL; + AllMem = NULL; JunglerMemIndex(); nLen = MemEnd - (UINT8 *)0; - if ((Mem = (UINT8 *)BurnMalloc(nLen)) == NULL) return 1; - memset(Mem, 0, nLen); + if ((AllMem = (UINT8 *)BurnMalloc(nLen)) == NULL) return 1; + memset(AllMem, 0, nLen); JunglerMemIndex(); DrvTempRom = (UINT8 *)BurnMalloc(0x04000); @@ -1501,7 +1486,7 @@ static INT32 DrvExit() ZetExit(); - BurnFree(Mem); + BurnFreeMemIndex(); DrvCPUFireIRQ = 0; DrvCPUIRQVector = 0; @@ -2197,18 +2182,18 @@ struct BurnDriver BurnDrvTactcian = { // Tactician (set 2) static struct BurnRomInfo tactcian2RomDesc[] = { - { "tan1", 0x1000, 0xddf38b75, 1 }, // 0 maincpu - { "tan2", 0x1000, 0xf065ee2e, 1 }, // 1 - { "tan3", 0x1000, 0x2dba64fe, 1 }, // 2 - { "tan4", 0x1000, 0x2ba07847, 1 }, // 3 - { "tan5", 0x1000, 0x1dae4c61, 1 }, // 4 - { "tan6", 0x1000, 0x2b36a18d, 1 }, // 5 + { "tan1", 0x1000, 0xddf38b75, 1 }, // 0 maincpu + { "tan2", 0x1000, 0xf065ee2e, 1 }, // 1 + { "tan3", 0x1000, 0x2dba64fe, 1 }, // 2 + { "tan4", 0x1000, 0x2ba07847, 1 }, // 3 + { "tan5", 0x1000, 0x1dae4c61, 1 }, // 4 + { "tan6", 0x1000, 0x2b36a18d, 1 }, // 5 { "tacticia.s2", 0x1000, 0x97d145a7, 2 }, // 6 tpsound { "tacticia.s1", 0x1000, 0x067f781b, 2 }, // 7 - { "c1", 0x1000, 0x5399471f, 3 }, // 8 gfx1 - { "c2", 0x1000, 0x8e8861e8, 3 }, // 9 + { "c1", 0x1000, 0x5399471f, 3 }, // 8 gfx1 + { "c2", 0x1000, 0x8e8861e8, 3 }, // 9 { "tact6301.004", 0x0100, 0x88b0b511, 4 }, // 10 gfx2 @@ -2238,22 +2223,22 @@ INT32 LocomotnDrvInit() // Loco-Motion static struct BurnRomInfo locomotnRomDesc[] = { - { "1a.cpu", 0x1000, 0xb43e689a, 1 }, // 0 maincpu - { "2a.cpu", 0x1000, 0x529c823d, 1 }, // 1 - { "3.cpu", 0x1000, 0xc9dbfbd1, 1 }, // 2 - { "4.cpu", 0x1000, 0xcaf6431c, 1 }, // 3 - { "5.cpu", 0x1000, 0x64cf8dd6, 1 }, // 4 + { "1a.cpu", 0x1000, 0xb43e689a, 1 }, // 0 maincpu + { "2a.cpu", 0x1000, 0x529c823d, 1 }, // 1 + { "3.cpu", 0x1000, 0xc9dbfbd1, 1 }, // 2 + { "4.cpu", 0x1000, 0xcaf6431c, 1 }, // 3 + { "5.cpu", 0x1000, 0x64cf8dd6, 1 }, // 4 { "1b_s1.bin", 0x1000, 0xa1105714, 2 }, // 5 tpsound { "5l_c1.bin", 0x1000, 0x5732eda9, 3 }, // 6 gfx1 - { "c2.cpu", 0x1000, 0xc3035300, 3 }, // 7 + { "c2.cpu", 0x1000, 0xc3035300, 3 }, // 7 { "10g.bpr", 0x0100, 0x2ef89356, 4 }, // 8 gfx2 - { "8b.bpr", 0x0020, 0x75b05da0, 5 }, // 9 proms - { "9d.bpr", 0x0100, 0xaa6cf063, 5 }, // 10 - { "7a.bpr", 0x0020, 0x48c8f094, 5 }, // 11 + { "8b.bpr", 0x0020, 0x75b05da0, 5 }, // 9 proms + { "9d.bpr", 0x0100, 0xaa6cf063, 5 }, // 10 + { "7a.bpr", 0x0020, 0x48c8f094, 5 }, // 11 { "10a.bpr", 0x0020, 0xb8861096, 5 }, // 12 }; @@ -2275,9 +2260,9 @@ INT32 GutangtnDrvInit() return LococommonDrvInit(5, 1); } -// Guttang Gottong +// Guttang Gottong (Sega license) -static struct BurnRomInfo gutangtnRomDesc[] = { +static struct BurnRomInfo gutangtnsRomDesc[] = { { "3d_1.bin", 0x1000, 0xe9757395, 1 }, // 0 maincpu { "3e_2.bin", 0x1000, 0x11d21d2e, 1 }, // 1 { "3f_3.bin", 0x1000, 0x4d80f895, 1 }, // 2 @@ -2291,50 +2276,84 @@ static struct BurnRomInfo gutangtnRomDesc[] = { { "10g.bpr", 0x0100, 0x2ef89356, 4 }, // 8 gfx2 - { "8b.bpr", 0x0020, 0x75b05da0, 5 }, // 9 proms - { "9d.bpr", 0x0100, 0xaa6cf063, 5 }, // 10 - { "7a.bpr", 0x0020, 0x48c8f094, 5 }, // 11 + { "8b.bpr", 0x0020, 0x75b05da0, 5 }, // 9 proms + { "9d.bpr", 0x0100, 0xaa6cf063, 5 }, // 10 + { "7a.bpr", 0x0020, 0x48c8f094, 5 }, // 11 { "10a.bpr", 0x0020, 0xb8861096, 5 }, // 12 }; +STD_ROM_PICK(gutangtns) +STD_ROM_FN(gutangtns) + +struct BurnDriver BurnDrvGutangtns = { + "gutangtns", "locomotn", NULL, NULL, "1982", + "Guttang Gottong (Sega license)\0", NULL, "Konami (Sega license)", "Miscellaneous", + NULL, NULL, NULL, NULL, + BDF_GAME_WORKING | BDF_CLONE | BDF_ORIENTATION_VERTICAL | BDF_HISCORE_SUPPORTED, 2, HARDWARE_MISC_PRE90S, GBF_PUZZLE, 0, + NULL, gutangtnsRomInfo, gutangtnsRomName, NULL, NULL, NULL, NULL, LocomotnInputInfo, LocomotnDIPInfo, + GutangtnDrvInit, DrvExit, JunglerFrame, DrvDrawJungler, DrvScan, + NULL, 324, 224, 256, 3, 4 +}; + +// Guttang Gottong + +static struct BurnRomInfo gutangtnRomDesc[] = { + { "bimm_001.r1", 0x1000, 0xdfa2089c, 1 }, // 0 maincpu + { "bimm_002.r2", 0x1000, 0x1de5e6a0, 1 }, // 1 + { "bimm_003.r3", 0x1000, 0x01f909fe, 1 }, // 2 + { "bimm_004.r4", 0x1000, 0xa89eb3e3, 1 }, // 3 + + { "bimm_007.b1", 0x1000, 0x3d83f6d3, 2 }, // 4 tpsound + { "bimm_008.c1", 0x1000, 0x323e1937, 2 }, // 5 + + { "bimm_005.r9", 0x1000, 0x992d079c, 3 }, // 6 gfx1 + { "bimm_006.r10", 0x1000, 0xf0414f1d, 3 }, // 7 + + { "5.bpr", 0x0100, 0x21fb583f, 4 }, // 8 gfx2 + + { "2.bpr", 0x0020, 0x26f42e6f, 5 }, // 9 proms + { "3.bpr", 0x0100, 0x4aecc0c8, 5 }, // 10 + { "7a.bpr", 0x0020, 0x48c8f094, 5 }, // 11 + { "10a.bpr", 0x0020, 0xb8861096, 5 }, // 12 +}; + STD_ROM_PICK(gutangtn) STD_ROM_FN(gutangtn) -struct BurnDriver BurnDrvGutangtn = { - "gutangtn", "locomotn", NULL, NULL, "1982", - "Guttang Gottong\0", NULL, "Konami (Sega license)", "Miscellaneous", - NULL, NULL, NULL, NULL, - BDF_GAME_WORKING | BDF_CLONE | BDF_ORIENTATION_VERTICAL | BDF_HISCORE_SUPPORTED, 2, HARDWARE_MISC_PRE90S, GBF_PUZZLE, 0, - NULL, gutangtnRomInfo, gutangtnRomName, NULL, NULL, NULL, NULL, LocomotnInputInfo, LocomotnDIPInfo, - GutangtnDrvInit, DrvExit, JunglerFrame, DrvDrawJungler, DrvScan, - NULL, 324, 224, 256, 3, 4 -}; - INT32 CottongDrvInit() { return LococommonDrvInit(4, 2); } +struct BurnDriver BurnDrvGutangtn = { + "gutangtn", "locomotn", NULL, NULL, "1982", + "Guttang Gottong\0", NULL, "Konami", "Miscellaneous", + NULL, NULL, NULL, NULL, + BDF_GAME_WORKING | BDF_CLONE | BDF_ORIENTATION_VERTICAL | BDF_HISCORE_SUPPORTED, 2, HARDWARE_MISC_PRE90S, GBF_PUZZLE, 0, + NULL, gutangtnRomInfo, gutangtnRomName, NULL, NULL, NULL, NULL, LocomotnInputInfo, LocomotnDIPInfo, + CottongDrvInit, DrvExit, JunglerFrame, DrvDrawJungler, DrvScan, + NULL, 324, 224, 256, 3, 4 +}; // Cotocoto Cottong static struct BurnRomInfo cottongRomDesc[] = { - { "c1", 0x1000, 0x2c256fe6, 1 }, // 0 maincpu - { "c2", 0x1000, 0x1de5e6a0, 1 }, // 1 - { "c3", 0x1000, 0x01f909fe, 1 }, // 2 - { "c4", 0x1000, 0xa89eb3e3, 1 }, // 3 + { "c1", 0x1000, 0x2c256fe6, 1 }, // 0 maincpu + { "c2", 0x1000, 0x1de5e6a0, 1 }, // 1 + { "c3", 0x1000, 0x01f909fe, 1 }, // 2 + { "c4", 0x1000, 0xa89eb3e3, 1 }, // 3 - { "c7", 0x1000, 0x3d83f6d3, 2 }, // 4 tpsound - { "c8", 0x1000, 0x323e1937, 2 }, // 5 + { "c7", 0x1000, 0x3d83f6d3, 2 }, // 4 tpsound + { "c8", 0x1000, 0x323e1937, 2 }, // 5 - { "c5", 0x1000, 0x992d079c, 3 }, // 6 gfx1 - { "c6", 0x1000, 0x0149ef46, 3 }, // 7 + { "c5", 0x1000, 0x992d079c, 3 }, // 6 gfx1 + { "c6", 0x1000, 0x0149ef46, 3 }, // 7 - { "5.bpr", 0x0100, 0x21fb583f, 4 }, // 8 gfx2 + { "5.bpr", 0x0100, 0x21fb583f, 4 }, // 8 gfx2 - { "2.bpr", 0x0020, 0x26f42e6f, 5 }, // 9 proms - { "3.bpr", 0x0100, 0x4aecc0c8, 5 }, // 10 - { "7a.bpr", 0x0020, 0x48c8f094, 5 }, // 11 + { "2.bpr", 0x0020, 0x26f42e6f, 5 }, // 9 proms + { "3.bpr", 0x0100, 0x4aecc0c8, 5 }, // 10 + { "7a.bpr", 0x0020, 0x48c8f094, 5 }, // 11 { "10a.bpr", 0x0020, 0xb8861096, 5 }, // 12 }; @@ -2359,22 +2378,22 @@ INT32 LocobootDrvInit() // Loco-Motion (bootleg) static struct BurnRomInfo locobootRomDesc[] = { - { "g.116", 0x1000, 0x1248799c, 1 }, // 0 maincpu - { "g.117", 0x1000, 0x5b5b5753, 1 }, // 1 - { "g.118", 0x1000, 0x6bc269e1, 1 }, // 2 - { "g.119", 0x1000, 0x3feb762e, 1 }, // 3 + { "g.116", 0x1000, 0x1248799c, 1 }, // 0 maincpu + { "g.117", 0x1000, 0x5b5b5753, 1 }, // 1 + { "g.118", 0x1000, 0x6bc269e1, 1 }, // 2 + { "g.119", 0x1000, 0x3feb762e, 1 }, // 3 - { "c7", 0x1000, 0x3d83f6d3, 2 }, // 4 tpsound - { "c8", 0x1000, 0x323e1937, 2 }, // 5 + { "c7", 0x1000, 0x3d83f6d3, 2 }, // 4 tpsound + { "c8", 0x1000, 0x323e1937, 2 }, // 5 - { "c5", 0x1000, 0x992d079c, 3 }, // 6 gfx1 - { "c6", 0x1000, 0x0149ef46, 3 }, // 7 + { "c5", 0x1000, 0x992d079c, 3 }, // 6 gfx1 + { "c6", 0x1000, 0x0149ef46, 3 }, // 7 - { "5.bpr", 0x0100, 0x21fb583f, 4 }, // 8 gfx2 + { "5.bpr", 0x0100, 0x21fb583f, 4 }, // 8 gfx2 - { "2.bpr", 0x0020, 0x26f42e6f, 5 }, // 9 proms - { "3.bpr", 0x0100, 0x4aecc0c8, 5 }, // 10 - { "7a.bpr", 0x0020, 0x48c8f094, 5 }, // 11 + { "2.bpr", 0x0020, 0x26f42e6f, 5 }, // 9 proms + { "3.bpr", 0x0100, 0x4aecc0c8, 5 }, // 10 + { "7a.bpr", 0x0020, 0x48c8f094, 5 }, // 11 { "10a.bpr", 0x0020, 0xb8861096, 5 }, // 12 }; @@ -2401,16 +2420,16 @@ INT32 CommsegaDrvInit() // Commando (Sega) static struct BurnRomInfo commsegaRomDesc[] = { - { "csega1", 0x1000, 0x92de3405, 1 }, // 0 maincpu - { "csega2", 0x1000, 0xf14e2f9a, 1 }, // 1 - { "csega3", 0x1000, 0x941dbf48, 1 }, // 2 - { "csega4", 0x1000, 0xe0ac69b4, 1 }, // 3 - { "csega5", 0x1000, 0xbc56ebd0, 1 }, // 4 + { "csega1", 0x1000, 0x92de3405, 1 }, // 0 maincpu + { "csega2", 0x1000, 0xf14e2f9a, 1 }, // 1 + { "csega3", 0x1000, 0x941dbf48, 1 }, // 2 + { "csega4", 0x1000, 0xe0ac69b4, 1 }, // 3 + { "csega5", 0x1000, 0xbc56ebd0, 1 }, // 4 - { "csega8", 0x1000, 0x588b4210, 2 }, // 5 tpsound + { "csega8", 0x1000, 0x588b4210, 2 }, // 5 tpsound - { "csega7", 0x1000, 0xe8e374f9, 3 }, // 6 gfx1 - { "csega6", 0x1000, 0xcf07fd5e, 3 }, // 7 + { "csega7", 0x1000, 0xe8e374f9, 3 }, // 6 gfx1 + { "csega6", 0x1000, 0xcf07fd5e, 3 }, // 7 { "gg3.bpr", 0x0100, 0xae7fd962, 4 }, // 8 gfx2