From 17b33612911062d84d16766b49751c206f299706 Mon Sep 17 00:00:00 2001 From: hap Date: Fri, 22 Nov 2024 11:30:52 +0100 Subject: chanbara: re-add ym2203 read for now, airraid: lower quantum after z80 rewrite --- src/mame/dataeast/chanbara.cpp | 7 +++---- src/mame/misc/enigma2.cpp | 4 ++-- src/mame/seibu/airraid.cpp | 16 +++++++++------- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/src/mame/dataeast/chanbara.cpp b/src/mame/dataeast/chanbara.cpp index e44c2175309..08d540497c8 100644 --- a/src/mame/dataeast/chanbara.cpp +++ b/src/mame/dataeast/chanbara.cpp @@ -48,8 +48,7 @@ TODO: - Verify what happens if you skip an enemy, on MAME the next one may appear out of thin air. MAME previously showed garbage sprites moving fast to the left and later changing into an enemy character, disable the (~attr & 0x01) check to see. -- Verify if YM2203 RD is connected. If it is, it waits too long checking the busy flag, - while it already does soft-delays itself. This would cause too slow BGM tempo. +- BGM tempo is too slow, what is it caused by? See https://mametesters.org/view.php?id=8024 BTANB: - on enemies that hide behind the roof on the 3rd level, their feet are visible below @@ -189,7 +188,7 @@ void chanbara_state::draw_sprites(screen_device &screen, bitmap_ind16& bitmap, c int sx = (240 - m_spriteram[offs + 3]) & 0xff; int sy = (240 - m_spriteram[offs + 2]) & 0xff; - // invalid? + // disabled? if (~attr & 0x01) continue; @@ -252,7 +251,7 @@ void chanbara_state::prg_map(address_map &map) map(0x2001, 0x2001).portr("SYSTEM"); map(0x2002, 0x2002).portr("P2"); map(0x2003, 0x2003).portr("P1"); - map(0x3800, 0x3801).w("ymsnd", FUNC(ym2203_device::write)).nopr(); + map(0x3800, 0x3801).rw("ymsnd", FUNC(ym2203_device::read), FUNC(ym2203_device::write)); map(0x4000, 0x7fff).bankr(m_rombank); map(0x8000, 0xffff).rom(); } diff --git a/src/mame/misc/enigma2.cpp b/src/mame/misc/enigma2.cpp index 8e6258bf1f9..715db96e15f 100644 --- a/src/mame/misc/enigma2.cpp +++ b/src/mame/misc/enigma2.cpp @@ -731,7 +731,7 @@ void enigma2_state::enigma2(machine_config &config) Z80(config, m_audiocpu, CPU_CLOCK); m_audiocpu->set_addrmap(AS_PROGRAM, &enigma2_state::enigma2_audio_cpu_map); - config.set_maximum_quantum(attotime::from_hz(m_maincpu->clock() / 4)); + config.set_maximum_quantum(attotime::from_hz(m_audiocpu->clock() / 4)); /* video hardware */ SCREEN(config, m_screen, SCREEN_TYPE_RASTER); @@ -760,7 +760,7 @@ void enigma2_state::enigma2a(machine_config &config) Z80(config, m_audiocpu, CPU_CLOCK); m_audiocpu->set_addrmap(AS_PROGRAM, &enigma2_state::enigma2_audio_cpu_map); - config.set_maximum_quantum(attotime::from_hz(m_maincpu->clock() / 4)); + config.set_maximum_quantum(attotime::from_hz(m_audiocpu->clock() / 4)); /* video hardware */ SCREEN(config, m_screen, SCREEN_TYPE_RASTER); diff --git a/src/mame/seibu/airraid.cpp b/src/mame/seibu/airraid.cpp index 351fb2157b6..638a2d8cbd9 100644 --- a/src/mame/seibu/airraid.cpp +++ b/src/mame/seibu/airraid.cpp @@ -163,6 +163,7 @@ public: airraid_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , m_maincpu(*this, "maincpu") + , m_audiocpu(*this, "audiocpu") , m_seibu_sound(*this, "seibu_sound") , m_mainram(*this, "mainram") , m_palette(*this, "palette") @@ -179,6 +180,7 @@ public: private: required_device m_maincpu; + required_device m_audiocpu; required_device m_seibu_sound; required_shared_ptr m_mainram; required_device m_palette; @@ -422,16 +424,16 @@ INPUT_PORTS_END void airraid_state::airraid(machine_config &config) { // basic machine hardware - Z80(config, m_maincpu, XTAL(12'000'000) / 2); // verified on PCB + Z80(config, m_maincpu, XTAL(12'000'000) / 2); // verified on PCB m_maincpu->set_addrmap(AS_PROGRAM, &airraid_state::main_map); TIMER(config, "scantimer").configure_scanline(FUNC(airraid_state::scanline), "airraid_vid:screen", 0, 1); - z80_device &audiocpu(Z80(config, "audiocpu", XTAL(14'318'181) / 4)); // verified on PCB - audiocpu.set_addrmap(AS_PROGRAM, &airraid_state::sound_map); - audiocpu.set_addrmap(AS_OPCODES, &airraid_state::sound_decrypted_opcodes_map); - audiocpu.set_irq_acknowledge_callback("seibu_sound", FUNC(seibu_sound_device::im0_vector_cb)); + Z80(config, m_audiocpu, XTAL(14'318'181) / 4); // verified on PCB + m_audiocpu->set_addrmap(AS_PROGRAM, &airraid_state::sound_map); + m_audiocpu->set_addrmap(AS_OPCODES, &airraid_state::sound_decrypted_opcodes_map); + m_audiocpu->set_irq_acknowledge_callback("seibu_sound", FUNC(seibu_sound_device::im0_vector_cb)); - config.set_perfect_quantum(m_maincpu); + config.set_maximum_quantum(attotime::from_hz(m_maincpu->clock() / 4)); PALETTE(config, m_palette).set_format(palette_device::xBGR_444, 0x100); @@ -446,7 +448,7 @@ void airraid_state::airraid(machine_config &config) ymsnd.add_route(1, "mono", 0.50); SEIBU_SOUND(config, m_seibu_sound, 0); - m_seibu_sound->int_callback().set_inputline("audiocpu", 0); + m_seibu_sound->int_callback().set_inputline(m_audiocpu, 0); m_seibu_sound->set_rom_tag("audiocpu"); m_seibu_sound->ym_read_callback().set("ymsnd", FUNC(ym2151_device::read)); m_seibu_sound->ym_write_callback().set("ymsnd", FUNC(ym2151_device::write)); -- cgit v1.2.3