diff options
author | 2019-10-21 22:03:16 -0500 | |
---|---|---|
committer | 2019-10-21 22:03:16 -0500 | |
commit | 4e55f2cdb7256ce8086a166e63905771e74b40a5 (patch) | |
tree | 6ab6f3a7309bd06e4338e50aaf88277feee7e615 | |
parent | a9133b4f6b27530e885fe69d52f181dbc14a1c15 (diff) |
(nw) m72.cpp: Restore dbreedm72 set to working
-rw-r--r-- | src/mame/drivers/m72.cpp | 38 | ||||
-rw-r--r-- | src/mame/includes/m72.h | 3 |
2 files changed, 27 insertions, 14 deletions
diff --git a/src/mame/drivers/m72.cpp b/src/mame/drivers/m72.cpp index 82309cb268f..7469fab7955 100644 --- a/src/mame/drivers/m72.cpp +++ b/src/mame/drivers/m72.cpp @@ -655,19 +655,6 @@ static const u8 dbreedm72_code[CODE_LEN] = static const u8 dbreedm72_crc[CRC_LEN] = { 0xa4,0x96,0x5f,0xc0, 0xab,0x49,0x9f,0x19, 0x84,0xe6,0xd6,0xca, 0x00,0x00 }; -/* Air Duel */ -static const u8 airduelm72_code[CODE_LEN] = -{ - 0x68,0x00,0xd0, // push 0d000h - 0x1f, // pop ds - // the game checks for - // "This game can only be played in Japan..." message in the video text buffer - // the message is nowhere to be found in the ROMs, so has to be displayed by the mcu - 0xc6,0x06,0xc0,0x1c,0x57, // mov [1cc0h], byte 057h - 0xea,0x69,0x0b,0x00,0x00 // jmp 0000:$0b69 -}; -static const u8 airduelm72_crc[CRC_LEN] = { 0x72,0x9c,0xca,0x85, 0xc9,0x12,0xcc,0xea, - 0x00,0x00 }; /* Daiku no Gensan */ static const u8 dkgenm72_code[CODE_LEN] = @@ -745,6 +732,12 @@ void m72_state::init_loht() memset(m_videoram[1],0,0x4000); } +void m72_state::init_dbreedm72() +{ + install_protection_handler(dbreedm72_code,dbreedm72_crc); + m_maincpu->space(AS_IO).install_write_handler(0xc0, 0xc1, write16_delegate(FUNC(m72_state::dbreedm72_sample_trigger_w),this)); +} + void m72_state::init_dkgenm72() { install_protection_handler(dkgenm72_code,dkgenm72_crc); @@ -849,6 +842,13 @@ void m72_state::xmultiplm72_map(address_map &map) map(0xb0000, 0xb0fff).r(m_dpram, FUNC(mb8421_mb8431_16_device::left_r)).w(FUNC(m72_state::main_mcu_w)); } +void m72_state::dbreedwm72_map(address_map &map) +{ + m72_cpu1_common_map(map); + map(0x00000, 0x7ffff).rom(); + map(0x90000, 0x93fff).ram(); /* work RAM */ +} + void m72_state::dbreedm72_map(address_map &map) { m72_cpu1_common_map(map); @@ -1973,6 +1973,16 @@ void m72_state::m72_xmultipl(machine_config &config) /* IRQs are generated by main Z80 and YM2151 */ } +void m72_state::m72_dbreedw(machine_config &config) +{ + m72_base(config); + m_maincpu->set_addrmap(AS_PROGRAM, &m72_state::dbreedwm72_map); + + /* Sample rate verified (Gallop : https://youtu.be/aozd0dbPzOw) */ + m_soundcpu->set_periodic_int(FUNC(m72_state::nmi_line_pulse), attotime::from_hz(MASTER_CLOCK/8/512)); + /* IRQs are generated by main Z80 and YM2151 */ +} + void m72_state::m72_dbreed(machine_config &config) { m72_8751(config); @@ -4330,7 +4340,7 @@ GAME( 1997, lohtb3, loht, m72_8751, loht, m72_state, init_m GAME( 1989, xmultiplm72, xmultipl, m72_xmultipl, xmultipl, m72_state, init_m72_8751, ROT0, "Irem", "X Multiply (Japan, M72 PCB version)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE ) -GAME( 1989, dbreedm72, dbreed, m72_dbreed, dbreed, m72_state, init_m72_8751, ROT0, "Irem", "Dragon Breed (M72 PCB version)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE ) // fails rom check as "ROM NG 1 2" if used with japanese mcu rom (World version?) +GAME( 1989, dbreedm72, dbreed, m72_dbreedw, dbreed, m72_state, init_dbreedm72, ROT0, "Irem", "Dragon Breed (M72 PCB version)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE ) // fails rom check as "ROM NG 1 2" if used with japanese mcu rom (World version?) GAME( 1989, dbreedm72j, dbreed, m72_dbreed, dbreed, m72_state, init_m72_8751, ROT0, "Irem", "Dragon Breed (Japan, M72 PCB version)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE ) GAME( 1991, gallop, cosmccop, m72, gallop, m72_state, init_gallop, ROT0, "Irem", "Gallop - Armed Police Unit (Japan, M72 PCB version)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/includes/m72.h b/src/mame/includes/m72.h index 360c603c729..22cbea220d9 100644 --- a/src/mame/includes/m72.h +++ b/src/mame/includes/m72.h @@ -68,6 +68,7 @@ public: void m72_audio_chips(machine_config &config); void m72_xmultipl(machine_config &config); void m72_dbreed(machine_config &config); + void m72_dbreedw(machine_config &config); void cosmccop(machine_config &config); void poundfor(machine_config &config); void m72(machine_config &config); @@ -90,6 +91,7 @@ public: void init_bchopper(); void init_gallop(); void init_m72_8751(); + void init_dbreedm72(); void init_nspirit(); void init_loht(); void init_imgfight(); @@ -226,6 +228,7 @@ private: void dbreed_map(address_map &map); void dbreedm72_map(address_map &map); + void dbreedwm72_map(address_map &map); void hharry_map(address_map &map); void hharryu_map(address_map &map); void kengo_map(address_map &map); |