From 5855777fd2a901eec445a6cdd48634361f4a9c8a Mon Sep 17 00:00:00 2001 From: David Haywood Date: Tue, 19 Nov 2013 12:17:10 +0000 Subject: [PATCH] verified The Gladiator internal ROM on an Overseas cart [Artemio Urbina] --- src/mame/drivers/pgm.c | 11 ++++++++--- src/mame/machine/pgmprot_igs027a_type3.c | 6 +++++- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/mame/drivers/pgm.c b/src/mame/drivers/pgm.c index 0a67d54aaec..39fd5a2cac2 100644 --- a/src/mame/drivers/pgm.c +++ b/src/mame/drivers/pgm.c @@ -3188,6 +3188,11 @@ ROM_START( dmnfrntpcb ) ROM_LOAD( "w04501.u5", 0x400000, 0x800000, CRC(3ab58137) SHA1(b221f7e551ff0bfa3fd97b6ebedbac69442a66e9) ) ROM_END +// the (readable part of) internal roms have been verified on +// Japan PCB +// Overseas Cart +// the two dumps differed by the region byte and internal checksum byte + ROM_START( theglad ) ROM_REGION( 0x600000, "maincpu", 0 ) /* 68000 Code */ PGM_68K_BIOS @@ -3195,7 +3200,7 @@ ROM_START( theglad ) ROM_REGION( 0x4000, "prot", 0 ) /* ARM protection ASIC - internal rom */ ROM_LOAD( "thegladpcb_igs027a_execute_only_area", 0x0000, 0x00188, NO_DUMP ) - ROM_LOAD( "thegladpcb_igs027a_v100_japan.bin", 0x0188, 0x3e78, CRC(d7f06e2d) SHA1(9c3aca7a487f5329d84731e2c63d5ed591bf9d24) ) // from 'thegladpcb set' + ROM_LOAD( "thegladpcb_igs027a_v100_overseas.bin", 0x0188, 0x3e78, CRC(02fe6f52) SHA1(0b0ddf4507856cfc5b7d4ef7e4c5375254c2a024) ) ROM_REGION( 0x800000, "user1", 0 ) /* Protection Data (encrypted external ARM data, internal missing) */ ROM_LOAD( "v107.u26", 0x000000, 0x200000, CRC(f7c61357) SHA1(52d31c464dfc83c5371b078cb6b73c0d0e0d57e3) ) @@ -3225,7 +3230,7 @@ ROM_START( theglad100 ) // is this actually a pre-v100 proto? ROM_REGION( 0x4000, "prot", 0 ) /* ARM protection ASIC - internal rom */ ROM_LOAD( "thegladpcb_igs027a_execute_only_area", 0x0000, 0x00188, NO_DUMP ) - ROM_LOAD( "thegladpcb_igs027a_older.bin", 0x0188, 0x3e78, BAD_DUMP CRC(d7f06e2d) SHA1(9c3aca7a487f5329d84731e2c63d5ed591bf9d24) ) // this is wrong for this set, we patch it to work + ROM_LOAD( "thegladpcb_igs027a_older.bin", 0x0188, 0x3e78, BAD_DUMP CRC(02fe6f52) SHA1(0b0ddf4507856cfc5b7d4ef7e4c5375254c2a024) ) // this is wrong for this set, we patch it to work ROM_REGION( 0x800000, "user1", 0 ) /* Protection Data (encrypted external ARM data, internal missing) */ ROM_LOAD( "u2.rom", 0x000000, 0x200000, CRC(c7bcf2ae) SHA1(10bc012c83987f594d5375a51bc4be2e17568a81) ) @@ -3256,7 +3261,7 @@ ROM_START( theglad101 ) ROM_REGION( 0x4000, "prot", 0 ) /* ARM protection ASIC - internal rom */ ROM_LOAD( "thegladpcb_igs027a_execute_only_area", 0x0000, 0x00188, NO_DUMP ) - ROM_LOAD( "thegladpcb_igs027a_v100_japan.bin", 0x0188, 0x3e78, CRC(d7f06e2d) SHA1(9c3aca7a487f5329d84731e2c63d5ed591bf9d24) ) // from 'thegladpcb set' + ROM_LOAD( "thegladpcb_igs027a_v100_overseas.bin", 0x0188, 0x3e78, CRC(02fe6f52) SHA1(0b0ddf4507856cfc5b7d4ef7e4c5375254c2a024) ) ROM_REGION( 0x800000, "user1", 0 ) /* Protection Data (encrypted external ARM data, internal missing) */ ROM_LOAD( "v101.u26", 0x000000, 0x200000, CRC(23faec02) SHA1(9065d55c2a14e6889e735a452bbc32530056645a) ) diff --git a/src/mame/machine/pgmprot_igs027a_type3.c b/src/mame/machine/pgmprot_igs027a_type3.c index 47e7cfbce5b..abd55009910 100644 --- a/src/mame/machine/pgmprot_igs027a_type3.c +++ b/src/mame/machine/pgmprot_igs027a_type3.c @@ -544,7 +544,7 @@ INPUT_PORTS_START( theglad ) PORT_INCLUDE ( pgm ) PORT_START("RegionHack") /* Region - actually supplied by protection device */ - PORT_CONFNAME( 0x00ff, 0x0006, DEF_STR( Region ) ) + PORT_CONFNAME( 0x00ff, 0x00ff, DEF_STR( Region ) ) PORT_CONFSETTING( 0x0000, DEF_STR( China ) ) PORT_CONFSETTING( 0x0001, DEF_STR( Taiwan ) ) //PORT_CONFSETTING( 0x0002, DEF_STR( Japan ) ) // it doesn't appear that carts of the Japanese version were released, the PCB has an extra sample ROM used in Japanese mode for the music @@ -644,6 +644,10 @@ DRIVER_INIT_MEMBER(pgm_arm_type3_state,dmnfrnt) share16[0x158/2] = 0x0005; } +// +// int j = BITSWAP24(i, 23, 20, 17, 16, 19, 18, 15, 14, 13, 12, 11, 10, 9, 22, 21, 6, 7, 6, 5, 4, 3, 2, 1, 0); +// buffer[i] = src[j] + // todo, collapse these to an address swap void pgm_arm_type3_state::pgm_descramble_happy6(UINT8* src) {