diff --git a/src/mame/capcom/lwings.cpp b/src/mame/capcom/lwings.cpp index f2486ccea27..708536b4eac 100644 --- a/src/mame/capcom/lwings.cpp +++ b/src/mame/capcom/lwings.cpp @@ -9,23 +9,15 @@ Driver provided by Paul Leaman -To Do: -- sectionz does "false contacts" on the coin counters, causing them to - increment twice per coin. -- accurate music tempo (audiocpu irq freq) -- accurate video timing, raw params +TODO: +- sectionz does "false contacts" on the coin counters, causing them to + increment twice per coin. +- accurate music tempo (audiocpu irq freq) +- accurate video timing, raw params +- verify avengers MCU comms, and redump internal ROM as well (see note + in ROM defs under AVENGERS_MCU) -Change Log: - -FEB-2003 (AT) - -- bug fixes: - - avengers061gre: missing sound effects in Avengers - avengers37b16gre: screen artifacts in Avengers - lwingsc37b7gre: incorrect sprite clipping in all games - Notes: Avengers has a protection chip underneath the sound module. @@ -111,9 +103,9 @@ protected: private: // devices - required_device m_maincpu; - required_device m_soundcpu; - optional_device m_adpcmcpu; + required_device m_maincpu; + required_device m_soundcpu; + optional_device m_adpcmcpu; optional_device m_mcu; optional_device_array m_mculatch; optional_device m_msm; @@ -187,7 +179,6 @@ private: void avengers_adpcm_io_map(address_map &map); void avengers_map(address_map &map); - void avengers_m1_map(address_map &map); void buraikenb_map(address_map &map); void fball_map(address_map &map); void fball_oki_map(address_map &map); @@ -299,14 +290,6 @@ void lwings_state::mcu_control_w(uint8_t data) m_mcu_control = data; } -uint8_t lwings_state::avengers_m1_r(offs_t offset) -{ - // 2 wait states on each M1 access (needed to keep in sync with MCU) - if (!machine().side_effects_disabled()) - m_maincpu->adjust_icount(-2); - return m_maincpu_program.read_byte(offset); -} - uint8_t lwings_state::avengers_soundlatch_ack_r() { uint8_t data = m_soundlatch->read() | (m_soundlatch->pending_r() ? 0x80 : 0); @@ -358,11 +341,6 @@ void lwings_state::avengers_map(address_map &map) map(0xf80d, 0xf80d).r(m_mculatch[2], FUNC(generic_latch_8_device::read)); } -void lwings_state::avengers_m1_map(address_map &map) -{ - map(0x0000, 0xffff).r(FUNC(lwings_state::avengers_m1_r)); -} - void lwings_state::lwings_map(address_map &map) { map(0x0000, 0x7fff).rom(); @@ -1360,8 +1338,8 @@ void lwings_state::avengers(machine_config &config) // basic machine hardware m_maincpu->set_clock(12_MHz_XTAL/2); + m_maincpu->z80_set_m1_cycles(6); // 2 WAIT states per M1? (needed to keep in sync with MCU) m_maincpu->set_addrmap(AS_PROGRAM, &lwings_state::avengers_map); - m_maincpu->set_addrmap(AS_OPCODES, &lwings_state::avengers_m1_map); I8751(config, m_mcu, 12_MHz_XTAL/2); m_mcu->port_in_cb<0>().set(FUNC(lwings_state::mcu_p0_r)); @@ -2074,12 +2052,7 @@ It was common for Capcom to use the same ROM label across regional sets but add #define AVENGERS_MCU \ ROM_REGION( 0x1000, "mcu", 0 ) /* Intel C8751H - 88 */ \ ROM_LOAD( "av.13k", 0x0000, 0x1000, BAD_DUMP CRC(505a0987) SHA1(ea1d855a9870d79d0e00eaa88a23038355a1203a) ) \ - ROM_FILL(0x0b84, 0x01, 0x02) /* bad code! bit 0x80 was flipped */ \ - /* these palette entries look wrong, but the low bit is unused, so could just be like that */ \ - ROM_FILL(0x0481, 0x01, 0x00) \ - ROM_FILL(0x04e0, 0x01, 0x00) \ - ROM_FILL(0x0483, 0x01, 0xa0) \ - ROM_FILL(0x04c3, 0x01, 0x30) + ROM_FILL(0x0b84, 0x01, 0x02) /* bad code! bit 0x80 was flipped */ ROM_START( avengers ) ROM_REGION( 0x20000, "maincpu", 0 ) /* 64k for code + 3*16k for the banked ROMs images */