From 0a98cb2c06c316479ae00006098c96413addf7cf Mon Sep 17 00:00:00 2001 From: mamehaze Date: Mon, 26 Jan 2015 17:15:41 +0000 Subject: kill old sim code (nw) --- src/mame/drivers/model2.c | 17 +------ src/mame/drivers/model3.c | 115 ++------------------------------------------- src/mame/includes/model3.h | 3 -- 3 files changed, 4 insertions(+), 131 deletions(-) diff --git a/src/mame/drivers/model2.c b/src/mame/drivers/model2.c index a4df80b88b6..8669dd2d087 100644 --- a/src/mame/drivers/model2.c +++ b/src/mame/drivers/model2.c @@ -1222,19 +1222,6 @@ WRITE32_MEMBER(model2_state::model2_serial_w) /* Protection handling */ -static const UINT8 ZGUNProt[] = -{ - 0x7F,0x4E,0x1B,0x1E,0xA8,0x48,0xF5,0x49,0x31,0x32,0x4A,0x09,0x89,0x29,0xC0,0x41, - 0x3A,0x49,0x85,0x24,0xA0,0x4D,0x21,0x31,0xEA,0xC3,0x3F,0xAF,0x0E,0x4B,0x25,0x02, - 0xFB,0x0F,0x44,0x55,0x2E,0x82,0x55,0xC3,0xCB,0x91,0x52,0x7E,0x72,0x53,0xF2,0xAA, - 0x39,0x19,0xB1,0x42,0x33,0x63,0x13,0xFA,0x39,0x9C,0xE0,0x53,0x93,0x8B,0x14,0x91, - 0x9D,0x1C,0xFE,0x52,0x59,0xD4,0x2A,0x6A,0xA3,0xC5,0xA0,0xCA,0x92,0x5A,0x58,0xAC, - 0x95,0x4A,0x19,0x89,0x65,0xD3,0xA8,0x4A,0xE3,0xCE,0x8D,0x89,0xC5,0x48,0x95,0xE4, - 0x94,0xD5,0x73,0x09,0xE4,0x3D,0x2D,0x92,0xC9,0xA7,0xA3,0x53,0x42,0x82,0x55,0x67, - 0xE4,0x66,0xD0,0x4A,0x7D,0x4A,0x13,0xDE,0xD7,0x9F,0x38,0xAA,0x00,0x56,0x85,0x0A -}; - - READ32_MEMBER(model2_state::model2_5881prot_r) { @@ -5904,11 +5891,9 @@ ROM_END DRIVER_INIT_MEMBER(model2_state,genprot) { - astring key = parameter(":315_5881:key"); - + //astring key = parameter(":315_5881:key"); m_maincpu->space(AS_PROGRAM).install_ram(0x01d80000, 0x01d8ffff); m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x01d90000, 0x01d9ffff, read32_delegate(FUNC(model2_state::model2_5881prot_r), this), write32_delegate(FUNC(model2_state::model2_5881prot_w), this)); - } DRIVER_INIT_MEMBER(model2_state,pltkids) diff --git a/src/mame/drivers/model3.c b/src/mame/drivers/model3.c index 2c6211ed78c..ac3e19ad0a4 100644 --- a/src/mame/drivers/model3.c +++ b/src/mame/drivers/model3.c @@ -664,12 +664,7 @@ ALL VROM ROMs are 16M MASK #include "machine/nvram.h" #include "includes/model3.h" -//#define DECRYPT_ANALYSIS_HACKS -#ifdef DECRYPT_ANALYSIS_HACKS -int readcount = 0; -int segcount = 0; -#endif void model3_state::update_irq_state() { @@ -1680,104 +1675,6 @@ WRITE64_MEMBER(model3_state::network_w) - -static const UINT16 fvipers2_prot_data[] = -{ - 0x2a2a, - 0x2a2a, 0x2a2a, 0x2a2a, 0x2a2a, 0x2a2a, 0x2a2a, 0x202a, 0x5b5b, - 0x4620, 0x6769, 0x7468, 0x6e69, 0x2067, 0x6956, 0x6570, 0x7372, - 0x3220, 0x5d20, 0x205d, 0x6e69, 0x3c20, 0x4d3c, 0x444f, 0x4c45, - 0x332d, 0x3e3e, 0x4320, 0x706f, 0x7279, 0x6769, 0x7468, 0x2820, - 0x2943, 0x3931, 0x3839, 0x5320, 0x4745, 0x2041, 0x6e45, 0x6574, - 0x7072, 0x6972, 0x6573, 0x2c73, 0x544c, 0x2e44, 0x2020, 0x4120, - 0x6c6c, 0x7220, 0x6769, 0x7468, 0x7220, 0x7365, 0x7265, 0x6576, - 0x2e64, 0x2a20, 0x2a2a, 0x2a2a, 0x2a2a, 0x2a2a, 0x2a2a, 0x2a2a, -}; - - - - -READ64_MEMBER(model3_state::model3_security_r) -{ - UINT64 retvalue = U64(0xffffffffffffffff); - - switch(offset) - { - case 0x00 / 8: retvalue = 0; break; /* status */ - case 0x1c/8: /* security board data read */ - { - #ifdef DECRYPT_ANALYSIS_HACKS - readcount += 2; - printf("model3_security_r offset %08x : %08x%08x (%08x%08x) count %08x\n", offset * 8, (UINT32)(retvalue >> 32), (UINT32)(retvalue & 0xffffffff), (UINT32)(mem_mask >> 32), (UINT32)(mem_mask & 0xffffffff), readcount); - #endif - - if (core_stricmp(machine().system().name, "fvipers2") == 0) - { - UINT64 data = (UINT64)fvipers2_prot_data[m_prot_data_ptr++] << 16; - if (m_prot_data_ptr >= 0x41) - { - m_prot_data_ptr = 0; - } - retvalue = data; - } - else - { - retvalue = 0; - } - break; - } - } - - return retvalue; -} - - - -WRITE64_MEMBER(model3_state::model3_security_w) -{ - if (offset == 0x10 / 8) - { - if (data != 0) - printf("model3_security_w address isn't 0?\n"); - - first_read = 1; - - printf("setting base %08x%08x\n", (UINT32)(data >> 32), (UINT32)(data & 0xffffffff)); - } - else if (offset == 0x18 / 8) - { - UINT16 subkey = data >> (32 + 16); - subkey = ((subkey & 0xff00) >> 8) | ((subkey & 0x00ff) << 8); // endian swap the sub-key for this hardware - printf("model3_5881prot_w setting subkey %04x\n", subkey); - -#ifdef DECRYPT_ANALYSIS_HACKS // dump out a copy of protection RAM - FILE* fp2; - char filename[256]; - sprintf(filename,"xxxencrypted_%s_part%d", machine().system().name, segcount); - segcount++; - readcount = 0; - fp2 = fopen(filename, "w+b"); - - { - for (int i = 0; i < 0x8000; i++) - { - UINT16 dat = m_maincpu->space().read_word((0xf0180000 + 4 * i)); - UINT8* dst2 = (UINT8*)&dat; - fwrite(&dst2[1], 1, 1, fp2); - fwrite(&dst2[0], 1, 1, fp2); - } - - } - fclose(fp2); -#endif - - } - else - { - printf("model3_5881prot_w offset %08x : %08x%08x (%08x%08x)\n", offset * 8, (UINT32)(data >> 32), (UINT32)(data & 0xffffffff), (UINT32)(mem_mask >> 32), (UINT32)(mem_mask & 0xffffffff)); - } -} - READ64_MEMBER(model3_state::model3_5881prot_r) { UINT64 retvalue = U64(0xffffffffffffffff); @@ -5732,18 +5629,12 @@ static void interleave_vroms(running_machine &machine) DRIVER_INIT_MEMBER(model3_state, genprot) { - astring key = parameter(":315_5881:key"); +// astring key = parameter(":315_5881:key"); m_maincpu->space(AS_PROGRAM).install_ram(0xf0180000, 0xf019ffff, 0, 0x0e000000); - if (key) - { - m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xf01a0000, 0xf01a003f, 0, 0x0e000000, read64_delegate(FUNC(model3_state::model3_5881prot_r), this), write64_delegate(FUNC(model3_state::model3_5881prot_w), this) ); - } - else - { - m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xf01a0000, 0xf01a003f, 0, 0x0e000000, read64_delegate(FUNC(model3_state::model3_security_r), this), write64_delegate(FUNC(model3_state::model3_security_w), this) ); - } + m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xf01a0000, 0xf01a003f, 0, 0x0e000000, read64_delegate(FUNC(model3_state::model3_5881prot_r), this), write64_delegate(FUNC(model3_state::model3_5881prot_w), this) ); + } DRIVER_INIT_MEMBER(model3_state,model3_10) diff --git a/src/mame/includes/model3.h b/src/mame/includes/model3.h index 340ae9904c7..b650c611497 100644 --- a/src/mame/includes/model3.h +++ b/src/mame/includes/model3.h @@ -230,9 +230,6 @@ public: DECLARE_WRITE8_MEMBER(model3_sound_w); DECLARE_READ64_MEMBER(network_r); DECLARE_WRITE64_MEMBER(network_w); - DECLARE_READ64_MEMBER(model3_security_r); - DECLARE_WRITE64_MEMBER(model3_security_w); - DECLARE_WRITE64_MEMBER(daytona2_rombank_w); DECLARE_WRITE16_MEMBER(model3snd_ctrl); -- cgit v1.2.3