void midtunit_state::init_mktunit() { /* common init */ init_tunit_generic(SOUND_ADPCM); /* protection */ m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x1b00000, 0x1b6ffff, read16_delegate(FUNC(midtunit_state::mk_prot_r),this), write16_delegate(FUNC(midtunit_state::mk_prot_w),this)); /* sound chip protection (hidden RAM) */ m_adpcm_sound->get_cpu()->space(AS_PROGRAM).install_ram(0xfb9c, 0xfbc6); }
DRIVER_INIT_MEMBER(midtunit_state,mktunit) { /* common init */ init_tunit_generic(SOUND_ADPCM); /* protection */ m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x1b00000, 0x1b6ffff, read16_delegate(FUNC(midtunit_state::mk_prot_r),this), write16_delegate(FUNC(midtunit_state::mk_prot_w),this)); /* sound chip protection (hidden RAM) */ machine().device("adpcm:cpu")->memory().space(AS_PROGRAM).install_ram(0xfb9c, 0xfbc6); }
void midtunit_state::init_mk2() { /* common init */ init_tunit_generic(SOUND_DCS); m_video->set_gfx_rom_large(true); /* protection */ m_maincpu->space(AS_PROGRAM).install_write_handler(0x00f20c60, 0x00f20c7f, write16_delegate(FUNC(midtunit_state::mk2_prot_w),this)); m_maincpu->space(AS_PROGRAM).install_write_handler(0x00f42820, 0x00f4283f, write16_delegate(FUNC(midtunit_state::mk2_prot_w),this)); m_maincpu->space(AS_PROGRAM).install_read_handler(0x01a190e0, 0x01a190ff, read16_delegate(FUNC(midtunit_state::mk2_prot_r),this)); m_maincpu->space(AS_PROGRAM).install_read_handler(0x01a191c0, 0x01a191df, read16_delegate(FUNC(midtunit_state::mk2_prot_shift_r),this)); m_maincpu->space(AS_PROGRAM).install_read_handler(0x01a3d0c0, 0x01a3d0ff, read16_delegate(FUNC(midtunit_state::mk2_prot_r),this)); m_maincpu->space(AS_PROGRAM).install_read_handler(0x01d9d1e0, 0x01d9d1ff, read16_delegate(FUNC(midtunit_state::mk2_prot_const_r),this)); m_maincpu->space(AS_PROGRAM).install_read_handler(0x01def920, 0x01def93f, read16_delegate(FUNC(midtunit_state::mk2_prot_const_r),this)); }
DRIVER_INIT_MEMBER(midtunit_state,mk2) { /* common init */ init_tunit_generic(machine(), SOUND_DCS); midtunit_gfx_rom_large = 1; /* protection */ machine().device("maincpu")->memory().space(AS_PROGRAM).install_write_handler(0x00f20c60, 0x00f20c7f, write16_delegate(FUNC(midtunit_state::mk2_prot_w),this)); machine().device("maincpu")->memory().space(AS_PROGRAM).install_write_handler(0x00f42820, 0x00f4283f, write16_delegate(FUNC(midtunit_state::mk2_prot_w),this)); machine().device("maincpu")->memory().space(AS_PROGRAM).install_read_handler(0x01a190e0, 0x01a190ff, read16_delegate(FUNC(midtunit_state::mk2_prot_r),this)); machine().device("maincpu")->memory().space(AS_PROGRAM).install_read_handler(0x01a191c0, 0x01a191df, read16_delegate(FUNC(midtunit_state::mk2_prot_shift_r),this)); machine().device("maincpu")->memory().space(AS_PROGRAM).install_read_handler(0x01a3d0c0, 0x01a3d0ff, read16_delegate(FUNC(midtunit_state::mk2_prot_r),this)); machine().device("maincpu")->memory().space(AS_PROGRAM).install_read_handler(0x01d9d1e0, 0x01d9d1ff, read16_delegate(FUNC(midtunit_state::mk2_prot_const_r),this)); machine().device("maincpu")->memory().space(AS_PROGRAM).install_read_handler(0x01def920, 0x01def93f, read16_delegate(FUNC(midtunit_state::mk2_prot_const_r),this)); }
void midtunit_state::init_jdreddp() { /* common init */ init_tunit_generic(SOUND_ADPCM_LARGE); /* looks like the watchdog needs to be disabled */ m_maincpu->space(AS_PROGRAM).nop_write(0x01d81060, 0x01d8107f); /* protection */ m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x1b00000, 0x1bfffff, read16_delegate(FUNC(midtunit_state::jdredd_prot_r),this), write16_delegate(FUNC(midtunit_state::jdredd_prot_w),this)); /* sound chip protection (hidden RAM) */ m_adpcm_sound->get_cpu()->space(AS_PROGRAM).install_read_bank(0xfbcf, 0xfbf9, "bank7"); m_adpcm_sound->get_cpu()->space(AS_PROGRAM).install_write_bank(0xfbcf, 0xfbf9, "bank9"); membank("adpcm:bank9")->set_base(auto_alloc_array(machine(), uint8_t, 0x80)); }
DRIVER_INIT_MEMBER(midtunit_state,jdreddp) { /* common init */ init_tunit_generic(SOUND_ADPCM_LARGE); /* looks like the watchdog needs to be disabled */ m_maincpu->space(AS_PROGRAM).nop_write(0x01d81060, 0x01d8107f); /* protection */ m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x1b00000, 0x1bfffff, read16_delegate(FUNC(midtunit_state::jdredd_prot_r),this), write16_delegate(FUNC(midtunit_state::jdredd_prot_w),this)); /* sound chip protection (hidden RAM) */ machine().device("adpcm:cpu")->memory().space(AS_PROGRAM).install_read_bank(0xfbcf, 0xfbf9, "bank7"); machine().device("adpcm:cpu")->memory().space(AS_PROGRAM).install_write_bank(0xfbcf, 0xfbf9, "bank9"); membank("adpcm:bank9")->set_base(auto_alloc_array(machine(), UINT8, 0x80)); #if ENABLE_ALL_JDREDD_LEVELS /* how about the final levels? */ jdredd_hack = m_maincpu->space(AS_PROGRAM).install_read_handler(0xFFBA7FF0, 0xFFBA7FFf, read16_delegate(FUNC(midtunit_state::jdredd_hack_r), this)); #endif }
void midtunit_state::init_nbajam_common(int te_protection) { /* common init */ init_tunit_generic(SOUND_ADPCM_LARGE); /* protection */ if (!te_protection) { m_nbajam_prot_table = nbajam_prot_values; m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x1b14020, 0x1b2503f, read16_delegate(FUNC(midtunit_state::nbajam_prot_r),this), write16_delegate(FUNC(midtunit_state::nbajam_prot_w),this)); } else { m_nbajam_prot_table = nbajamte_prot_values; m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x1b15f40, 0x1b37f5f, read16_delegate(FUNC(midtunit_state::nbajam_prot_r),this), write16_delegate(FUNC(midtunit_state::nbajam_prot_w),this)); m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x1b95f40, 0x1bb7f5f, read16_delegate(FUNC(midtunit_state::nbajam_prot_r),this), write16_delegate(FUNC(midtunit_state::nbajam_prot_w),this)); } /* sound chip protection (hidden RAM) */ if (!te_protection) m_adpcm_sound->get_cpu()->space(AS_PROGRAM).install_ram(0xfbaa, 0xfbd4); else m_adpcm_sound->get_cpu()->space(AS_PROGRAM).install_ram(0xfbec, 0xfc16); }
static void init_nbajam_common(running_machine &machine, int te_protection) { /* common init */ init_tunit_generic(machine, SOUND_ADPCM_LARGE); midtunit_state *state = machine.driver_data<midtunit_state>(); /* protection */ if (!te_protection) { nbajam_prot_table = nbajam_prot_values; machine.device("maincpu")->memory().space(AS_PROGRAM).install_readwrite_handler(0x1b14020, 0x1b2503f, read16_delegate(FUNC(midtunit_state::nbajam_prot_r),state), write16_delegate(FUNC(midtunit_state::nbajam_prot_w),state)); } else { nbajam_prot_table = nbajamte_prot_values; machine.device("maincpu")->memory().space(AS_PROGRAM).install_readwrite_handler(0x1b15f40, 0x1b37f5f, read16_delegate(FUNC(midtunit_state::nbajam_prot_r),state), write16_delegate(FUNC(midtunit_state::nbajam_prot_w),state)); machine.device("maincpu")->memory().space(AS_PROGRAM).install_readwrite_handler(0x1b95f40, 0x1bb7f5f, read16_delegate(FUNC(midtunit_state::nbajam_prot_r),state), write16_delegate(FUNC(midtunit_state::nbajam_prot_w),state)); } /* sound chip protection (hidden RAM) */ if (!te_protection) machine.device("adpcm:cpu")->memory().space(AS_PROGRAM).install_ram(0xfbaa, 0xfbd4); else machine.device("adpcm:cpu")->memory().space(AS_PROGRAM).install_ram(0xfbec, 0xfc16); }