(MESS) megadriv.xml: added original uncracked dump of Tiny Toon Adventures 3 [Barver, Azathoth]

(MESS) megadriv.c: emulated protection in mulan, pokemon 2 (previously patched out) and in the real ttoon3 dump. [Fabio Priuli]
This commit is contained in:
Fabio Priuli 2013-02-16 07:51:40 +00:00
parent 94b3eb697a
commit a571252867
6 changed files with 60 additions and 93 deletions

View File

@ -16686,7 +16686,7 @@ Notice that these are not working on real hardware due to bugged code with VDP i
<year>199?</year>
<publisher>&lt;unlicensed&gt;</publisher>
<part name="cart" interface="megadriv_cart">
<feature name="slot" value="rom_poke2" />
<feature name="slot" value="rom_lion3" />
<dataarea name="rom" size="2097152">
<rom name="pocket monsters 2 (unl).bin" size="2097152" crc="30f7031f" sha1="dae100dfaee1b5b7816731cb2f43bcda3da273b7" offset="000000" loadflag="load16_word_swap" />
</dataarea>
@ -21397,7 +21397,7 @@ Notice that these are not working on real hardware due to bugged code with VDP i
</software>
<software name="supdaisn">
<description>Super Daisenryaku (Jpn, Rev. 02)</description>
<description>Super Daisenryaku (Jpn, Rev. A)</description>
<year>1989</year>
<publisher>Sega</publisher>
<info name="serial" value="G-4501-02"/>
@ -26582,12 +26582,12 @@ Notice that these are not working on real hardware due to bugged code with VDP i
</part>
</software>
<software name="huamul">
<software name="mulan">
<description>Hua Mu Lan - Mulan (Chi)</description>
<year>199?</year>
<publisher>&lt;unlicensed&gt;</publisher>
<part name="cart" interface="megadriv_cart">
<feature name="slot" value="rom_mulan" />
<feature name="slot" value="rom_lion3" />
<dataarea name="rom" size="2097152">
<rom name="hua mu lan - mulan (chi) (unl).bin" size="2097152" crc="796882b8" sha1="d8936c1023db646e1e20f9208b68271afbd6dbf4" offset="000000" loadflag="load16_word_swap" />
</dataarea>
@ -26873,6 +26873,20 @@ Notice that these are not working on real hardware due to bugged code with VDP i
</part>
</software>
<!-- Dump with CRC d65d83d4 is hacked to bypass protection -->
<software name="ttoon3">
<description>Tiny Toon Adventures 3 (Tw)</description>
<year>199?</year>
<publisher>Gamtec?</publisher>
<info name="serial" value="MT-601"/>
<part name="cart" interface="megadriv_cart">
<feature name="slot" value="rom_squir" />
<dataarea name="rom" size="1048576">
<rom name="tiny toon adventures 3 (unl).bin" size="1048576" crc="f22f569d" sha1="6c68e4c7a5a14f926dc69ea5d5a452d9ead29a8e" offset="000000" loadflag="load16_word_swap" />
</dataarea>
</part>
</software>
<software name="topfight">
<description>Top Fighter 2000 MK VIII</description>
<year>199?</year>
@ -27069,7 +27083,6 @@ Notice that these are not working on real hardware due to bugged code with VDP i
<publisher>&lt;unlicensed&gt;</publisher>
<info name="alt_title" value="Shi Zi Wang 3 - The Lion King 3 (Box?)"/>
<part name="cart" interface="megadriv_cart">
<feature name="slot" value="rom_lion3" />
<dataarea name="rom" size="4194304">
<rom name="lion_king_3.bin" size="2097152" crc="87e86943" sha1="0ef55dc45536963c8748192a4cb4864a87b03102" offset="000000" loadflag="load16_word_swap" />
<rom size="2097152" offset="0x200000" loadflag="reload" />
@ -27129,6 +27142,7 @@ Notice that these are not working on real hardware due to bugged code with VDP i
<year>199?</year>
<publisher>&lt;unlicensed&gt;</publisher>
<part name="cart" interface="megadriv_cart">
<feature name="slot" value="rom_lion3" />
<dataarea name="rom" size="2097152">
<rom name="soul edge vs samurai spirits (unl).bin" size="2097152" crc="b11bd611" sha1="28cef4b6829a791c56d4764812d0b345595c8389" offset="000000" loadflag="load16_word_swap" />
</dataarea>
@ -28026,18 +28040,6 @@ Notice that these are not working on real hardware due to bugged code with VDP i
</part>
</software>
<software name="ttoon3">
<description>Tiny Toon Adventures 3 (Tw, Cracked)</description>
<year>199?</year>
<publisher>Gamtec?</publisher>
<info name="serial" value="MT-601"/>
<part name="cart" interface="megadriv_cart">
<dataarea name="rom" size="1048576">
<rom name="tiny toon adventures 3 (unl).bin" size="1048576" crc="d65d83d4" sha1="47b1ad463389d709fb49c7cef8fd033a6f95a301" offset="000000" loadflag="load16_word_swap" />
</dataarea>
</part>
</software>
<software name="tmntru">
<description>Teenage Mutant Ninja Turtles - Vozvrashchenie Legendy (Rus)</description>
<year>199?</year>

View File

@ -345,9 +345,6 @@ static SLOT_INTERFACE_START(md_cart)
SLOT_INTERFACE_INTERNAL("rom_soulb", MD_ROM_SOULB)
SLOT_INTERFACE_INTERNAL("rom_squir", MD_ROM_SQUIR)
SLOT_INTERFACE_INTERNAL("rom_topf", MD_ROM_TOPF)
// these have protection patched out, instead of emulated!
SLOT_INTERFACE_INTERNAL("rom_mulan", MD_STD_ROM)
SLOT_INTERFACE_INTERNAL("rom_poke2", MD_STD_ROM)
SLOT_INTERFACE_END
static MACHINE_CONFIG_START( ms_megadriv, md_cons_state )

View File

@ -48,10 +48,6 @@ const device_type MD_ROM_SQUIR = &device_creator<md_rom_squir_device>;
const device_type MD_ROM_TOPF = &device_creator<md_rom_topf_device>;
const device_type MD_ROM_RADICA = &device_creator<md_rom_radica_device>;
// below ones are currently unused, because the protection is patched out
const device_type MD_ROM_MULAN = &device_creator<md_std_rom_device>;
const device_type MD_ROM_POKE2 = &device_creator<md_std_rom_device>;
md_std_rom_device::md_std_rom_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, type, name, tag, owner, clock),
@ -227,11 +223,11 @@ void md_rom_lion2_device::device_start()
void md_rom_lion3_device::device_start()
{
m_prot_data = 0;
m_prot_cmd = 0;
m_reg[0] = 0;
m_reg[1] = 0;
m_reg[2] = 0;
m_bank = 0;
save_item(NAME(m_prot_data));
save_item(NAME(m_prot_cmd));
save_item(NAME(m_reg));
save_item(NAME(m_bank));
}
@ -570,7 +566,7 @@ READ16_MEMBER(md_rom_kof98_device::read)
/*-------------------------------------------------
KOF 99
-------------------------------------------------*/
// gfx glitch with the new code... uninitialized ram somewhere?
READ16_MEMBER(md_rom_kof99_device::read_a13)
{
if (offset == 0x00/2) return 0x00; // startup protection check, chinese message if != 0
@ -600,78 +596,79 @@ WRITE16_MEMBER(md_rom_lion2_device::write)
LION KING 3
-------------------------------------------------*/
// TODO: Sould Edge vs Samurai Spirits uses this same mechanism (or a very similar one)
// but expects to bankswitch more than the first 32k chunk...
READ16_MEMBER(md_rom_lion3_device::read)
{
if (offset < 0x8000/2)
return m_rom[offset + (m_bank * 0x8000)/2];
else if (offset >= 0x600000/2 && offset < 0x700000/2)
{
UINT16 retdata = 0;
switch (offset & 0x7)
{
case 0:
return m_reg[0];
case 1:
return m_reg[1];
case 2:
if (m_prot_cmd == 0)
retdata = (m_prot_data << 1);
else if (m_prot_cmd == 1)
retdata = (m_prot_data >> 1);
else if (m_prot_cmd == 2)
{
retdata = m_prot_data >> 4;
retdata |= (m_prot_data & 0x0f) << 4;
}
else
{
/* printf("unk prot case %d\n", m_prot_cmd); */
retdata = (BIT(m_prot_data, 7) << 0);
retdata |= (BIT(m_prot_data, 6) << 1);
retdata |= (BIT(m_prot_data, 5) << 2);
retdata |= (BIT(m_prot_data, 4) << 3);
retdata |= (BIT(m_prot_data, 3) << 4);
retdata |= (BIT(m_prot_data, 2) << 5);
retdata |= (BIT(m_prot_data, 1) << 6);
retdata |= (BIT(m_prot_data, 0) << 7);
}
break;
return m_reg[2];
default:
logerror("protection read, unknown offset %x\n", offset & 0x7);
break;
}
return retdata;
return 0;
}
return m_rom[offset];
return m_rom[MD_ADDR(offset)];
}
WRITE16_MEMBER(md_rom_lion3_device::write)
{
if (offset >= 0x600000/2 && offset < 0x700000/2)
{
// printf("protection write, offset %d data %d\n", offset & 0x7, data);
switch (offset & 0x7)
{
case 0x0:
m_prot_data = data;
m_reg[0] = data & 0xff;
break;
case 0x1:
m_prot_cmd = data;
m_reg[1] = data & 0xff;
break;
default:
logerror("protection write, unknown offset %d\n", offset & 0x7);
break;
}
}
if (offset >= 0x700000/2 && offset < 0x800000/2)
{
switch (offset & 0x7)
// update m_reg[2]
switch (m_reg[1] & 3)
{
case 0x0:
m_bank = data & 0xffff;
m_reg[2] = (m_reg[0] << 1);
break;
case 0x1:
m_reg[2] = (m_reg[0] >> 1);
break;
case 0x2:
m_reg[2] = (m_reg[0] >> 4) | ((m_reg[0] & 0x0f) << 4);
break;
case 0x3:
default:
logerror("bank write, unknown offset %d\n", offset & 0x7);
m_reg[2] = (BIT(m_reg[0], 7) << 0)
| (BIT(m_reg[0], 6) << 1)
| (BIT(m_reg[0], 5) << 2)
| (BIT(m_reg[0], 4) << 3)
| (BIT(m_reg[0], 3) << 4)
| (BIT(m_reg[0], 2) << 5)
| (BIT(m_reg[0], 1) << 6)
| (BIT(m_reg[0], 0) << 7);
break;
}
}
if (offset >= 0x700000/2)
m_bank = data & 0xff;
}
/*-------------------------------------------------

View File

@ -235,7 +235,7 @@ public:
virtual DECLARE_WRITE16_MEMBER(write);
private:
UINT8 m_prot_data, m_prot_cmd;
UINT8 m_reg[3];
UINT16 m_bank;
};

View File

@ -270,8 +270,6 @@ static const md_slot slot_list[] =
{ LIONK3, "rom_lion3" },
{ MC_PIRATE, "rom_mcpir" },
{ MJLOVER, "rom_mjlov" },
{ MULAN, "rom_mulan"},
{ POKEMON2, "rom_poke2"},
{ REALTEC, "rom_realtec" },
{ REDCL_EN, "rom_redcl" },
{ REDCLIFF, "rom_redcl" },
@ -563,30 +561,6 @@ void base_md_cart_slot_device::setup_custom_mappers()
for (int x = 0; x < 0x200000/2; x++)
ROM16[x] = ROM16[x + 2] ^ 0x4040;
break;
// patch out protection in a bunch of titles...
case POKEMON2:
/*todo: emulate protection instead
006036:e000
002540:6026
001ed0:6026
002476:6022
*/
ROM16[0x06036/2] = 0xe000;
ROM16[0x02540/2] = 0x6026;
ROM16[0x01ed0/2] = 0x6026;
ROM16[0x02476/2] = 0x6022;
ROM16[0x7e300/2] = 0x60fe;
break;
case MULAN:
/*todo: emulate protection instead
006036:e000
+more?
*/
// ROM16[0x01ed0/2] = 0xe000;
// ROM16[0x02540/2] = 0xe000;
ROM16[0x06036/2] = 0xe000;
break;
}
}

View File

@ -53,9 +53,6 @@ enum
LIONK3, /* Lion King 3, Super Donkey Kong 99, Super King Kong 99 */
MC_PIRATE, /* Super 19 in 1, Super 15 in 1, 12 in 1 and a few more multicarts */
MJLOVER, /* Mahjong Lover */
MULAN, /* Hua Mu Lan - Mulan */
POKEMON, /* Pocket Monster */
POKEMON2, /* Pocket Monster 2 */
REALTEC, /* Whac a Critter/Mallet legend, Defend the Earth, Funnyworld/Ballonboy */
REDCLIFF, /* Romance of the Three Kingdoms - Battle of Red Cliffs, already decoded from .mdx format */
REDCL_EN, /* The encoded version... */