From 52821dfe9705ba4fe64d01e6a7e62d9b1e754458 Mon Sep 17 00:00:00 2001 From: hap Date: Sun, 8 Dec 2024 02:15:34 +0100 Subject: m72: no need for all those youtube video links in source to back verification claim of irq frequency --- src/mame/irem/m72.cpp | 69 ++++++++++++++++++++++----------------------------- 1 file changed, 29 insertions(+), 40 deletions(-) diff --git a/src/mame/irem/m72.cpp b/src/mame/irem/m72.cpp index f6621647420..225c856fbde 100644 --- a/src/mame/irem/m72.cpp +++ b/src/mame/irem/m72.cpp @@ -1687,7 +1687,7 @@ GFXDECODE_END void m72_state::m72_audio_chips(machine_config &config) { - /* sound hardware */ + // sound hardware SPEAKER(config, "speaker").front_center(); generic_latch_8_device &soundlatch(GENERIC_LATCH_8(config, "soundlatch")); @@ -1711,8 +1711,8 @@ void m72_state::m72_audio_chips(machine_config &config) void m72_state::m72_base(machine_config &config) { - /* basic machine hardware */ - V30(config, m_maincpu, MASTER_CLOCK/2/2); /* 16 MHz external freq (8MHz internal) */ + // basic machine hardware + V30(config, m_maincpu, MASTER_CLOCK/2/2); // 16 MHz external freq (8MHz internal) m_maincpu->set_addrmap(AS_PROGRAM, &m72_state::m72_map); m_maincpu->set_addrmap(AS_IO, &m72_state::m72_portmap); m_maincpu->set_irq_acknowledge_callback("upd71059c", FUNC(pic8259_device::inta_cb)); @@ -1724,7 +1724,7 @@ void m72_state::m72_base(machine_config &config) PIC8259(config, m_upd71059c, 0); m_upd71059c->out_int_callback().set_inputline(m_maincpu, 0); - /* video hardware */ + // video hardware BUFFERED_SPRITERAM16(config, m_spriteram); GFXDECODE(config, m_gfxdecode, m_palette, gfx_m72); @@ -1743,9 +1743,8 @@ void m72_state::m72_base(machine_config &config) void m72_state::m72(machine_config &config) { m72_base(config); - /* Sample rate verified (Gallop : https://youtu.be/aozd0dbPzOw) */ - m_soundcpu->set_periodic_int(FUNC(m72_state::fake_nmi), attotime::from_hz(MASTER_CLOCK/8/512)); - /* IRQs are generated by main Z80 and YM2151 */ + + m_soundcpu->set_periodic_int(FUNC(m72_state::fake_nmi), attotime::from_hz(MASTER_CLOCK/8/512)); // samplerate verified } void m72_mcu_state::m72_8751(machine_config &config) @@ -1766,7 +1765,7 @@ void m72_mcu_state::m72_8751(machine_config &config) GENERIC_LATCH_8(config, "soundlatch2").data_pending_callback().set_inputline(m_soundcpu, INPUT_LINE_NMI); - i8751_device &mcu(I8751(config, m_mcu, XTAL(8'000'000))); /* Uses its own XTAL */ + i8751_device &mcu(I8751(config, m_mcu, XTAL(8'000'000))); // Uses its own XTAL mcu.set_addrmap(AS_IO, &m72_mcu_state::mcu_io_map); mcu.port_out_cb<1>().set(m_dac, FUNC(dac_byte_interface::write)); } @@ -1805,9 +1804,7 @@ void m72_mcu_state::m72_xmultipl(machine_config &config) m72_8751(config); m_maincpu->set_addrmap(AS_PROGRAM, &m72_mcu_state::xmultiplm72_map); - /* Sample rate verified (Gallop : https://youtu.be/aozd0dbPzOw) */ - m_soundcpu->set_periodic_int(FUNC(m72_mcu_state::nmi_line_pulse), attotime::from_hz(MASTER_CLOCK/8/512)); - /* IRQs are generated by main Z80 and YM2151 */ + m_soundcpu->set_periodic_int(FUNC(m72_mcu_state::nmi_line_pulse), attotime::from_hz(MASTER_CLOCK/8/512)); // verified } void m72_state::m72_dbreedw(machine_config &config) @@ -1815,9 +1812,7 @@ 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 */ + m_soundcpu->set_periodic_int(FUNC(m72_state::nmi_line_pulse), attotime::from_hz(MASTER_CLOCK/8/512)); // verified MCFG_VIDEO_START_OVERRIDE(m72_state,dbreedm72) } @@ -1827,9 +1822,7 @@ void m72_mcu_state::m72_dbreed(machine_config &config) m72_8751(config); m_maincpu->set_addrmap(AS_PROGRAM, &m72_mcu_state::dbreedm72_map); - /* Sample rate verified (Gallop : https://youtu.be/aozd0dbPzOw) */ - m_soundcpu->set_periodic_int(FUNC(m72_mcu_state::nmi_line_pulse), attotime::from_hz(MASTER_CLOCK/8/512)); - /* IRQs are generated by main Z80 and YM2151 */ + m_soundcpu->set_periodic_int(FUNC(m72_mcu_state::nmi_line_pulse), attotime::from_hz(MASTER_CLOCK/8/512)); // verified MCFG_VIDEO_START_OVERRIDE(m72_mcu_state,dbreedm72) } @@ -1873,8 +1866,8 @@ void m72_state::m81_dbreed(machine_config &config) // M84 void m72_state::rtype2(machine_config &config) { - /* basic machine hardware */ - V30(config, m_maincpu, MASTER_CLOCK/2/2); /* 16 MHz external freq (8MHz internal) */ + // basic machine hardware + V30(config, m_maincpu, MASTER_CLOCK/2/2); // 16 MHz external freq (8MHz internal) m_maincpu->set_addrmap(AS_PROGRAM, &m72_state::rtype2_map); m_maincpu->set_addrmap(AS_IO, &m72_state::m84_portmap); m_maincpu->set_irq_acknowledge_callback("upd71059c", FUNC(pic8259_device::inta_cb)); @@ -1882,13 +1875,12 @@ void m72_state::rtype2(machine_config &config) Z80(config, m_soundcpu, SOUND_CLOCK); m_soundcpu->set_addrmap(AS_PROGRAM, &m72_state::sound_rom_map); m_soundcpu->set_addrmap(AS_IO, &m72_state::rtype2_sound_portmap); - m_soundcpu->set_periodic_int(FUNC(m72_state::nmi_line_pulse), attotime::from_hz(MASTER_CLOCK/8/512)); /* verified (https://youtu.be/lUszf9Ong7U) */ - /* IRQs are generated by main Z80 and YM2151 */ + m_soundcpu->set_periodic_int(FUNC(m72_state::nmi_line_pulse), attotime::from_hz(MASTER_CLOCK/8/512)); // verified PIC8259(config, m_upd71059c, 0); m_upd71059c->out_int_callback().set_inputline(m_maincpu, 0); - /* video hardware */ + // video hardware BUFFERED_SPRITERAM16(config, m_spriteram); GFXDECODE(config, m_gfxdecode, m_palette, gfx_rtype2); @@ -1908,7 +1900,7 @@ void m72_state::rtype2(machine_config &config) void m72_state::hharryu(machine_config &config) { rtype2(config); - /* basic machine hardware */ + m_maincpu->set_addrmap(AS_PROGRAM, &m72_state::hharryu_map); MCFG_VIDEO_START_OVERRIDE(m72_state,hharryu) @@ -1919,7 +1911,7 @@ void m72_state::hharryu(machine_config &config) void m72_state::cosmccop(machine_config &config) { - /* basic machine hardware */ + // basic machine hardware V35(config, m_maincpu, MASTER_CLOCK/2); m_maincpu->set_addrmap(AS_PROGRAM, &m72_state::kengo_map); m_maincpu->set_addrmap(AS_IO, &m72_state::m84_v35_portmap); @@ -1927,15 +1919,14 @@ void m72_state::cosmccop(machine_config &config) Z80(config, m_soundcpu, SOUND_CLOCK); m_soundcpu->set_addrmap(AS_PROGRAM, &m72_state::sound_rom_map); m_soundcpu->set_addrmap(AS_IO, &m72_state::rtype2_sound_portmap); - m_soundcpu->set_periodic_int(FUNC(m72_state::nmi_line_pulse), attotime::from_hz(MASTER_CLOCK/8/512)); /* verified (https://youtu.be/Sol2Yq2S5hQ) */ - /* IRQs are generated by main Z80 and YM2151 */ + m_soundcpu->set_periodic_int(FUNC(m72_state::nmi_line_pulse), attotime::from_hz(MASTER_CLOCK/8/512)); // verified MCFG_MACHINE_START_OVERRIDE(m72_state,kengo) MCFG_MACHINE_RESET_OVERRIDE(m72_state,kengo) // upd71059c isn't needed because the V35 has its own IRQ controller - /* video hardware */ + // video hardware BUFFERED_SPRITERAM16(config, m_spriteram); GFXDECODE(config, m_gfxdecode, m_palette, gfx_rtype2); @@ -1985,8 +1976,8 @@ M82-B-A and as the bottom board */ void m82_state::m82(machine_config &config) { - /* basic machine hardware */ - V30(config, m_maincpu, MASTER_CLOCK/2/2); /* 16 MHz external freq (8MHz internal) */ + // basic machine hardware + V30(config, m_maincpu, MASTER_CLOCK/2/2); // 16 MHz external freq (8MHz internal) m_maincpu->set_addrmap(AS_PROGRAM, &m82_state::m82_map); m_maincpu->set_addrmap(AS_IO, &m82_state::m82_portmap); m_maincpu->set_irq_acknowledge_callback("upd71059c", FUNC(pic8259_device::inta_cb)); @@ -1994,13 +1985,12 @@ void m82_state::m82(machine_config &config) Z80(config, m_soundcpu, SOUND_CLOCK); m_soundcpu->set_addrmap(AS_PROGRAM, &m82_state::sound_rom_map); m_soundcpu->set_addrmap(AS_IO, &m82_state::rtype2_sound_portmap); - m_soundcpu->set_periodic_int(FUNC(m82_state::nmi_line_pulse), attotime::from_hz(MASTER_CLOCK/8/512)); /* verified (https://youtu.be/lLQDPe-8Ha0) */ - /* IRQs are generated by main Z80 and YM2151 */ + m_soundcpu->set_periodic_int(FUNC(m82_state::nmi_line_pulse), attotime::from_hz(MASTER_CLOCK/8/512)); // verified PIC8259(config, m_upd71059c, 0); m_upd71059c->out_int_callback().set_inputline(m_maincpu, 0); - /* video hardware */ + // video hardware BUFFERED_SPRITERAM16(config, m_spriteram); GFXDECODE(config, m_gfxdecode, m_palette, gfx_majtitle); @@ -2021,8 +2011,8 @@ void m82_state::m82(machine_config &config) void poundfor_state::poundfor(machine_config &config) { - /* basic machine hardware */ - V30(config, m_maincpu, MASTER_CLOCK/2/2); /* 16 MHz external freq (8MHz internal) */ + // basic machine hardware + V30(config, m_maincpu, MASTER_CLOCK/2/2); // 16 MHz external freq (8MHz internal) m_maincpu->set_addrmap(AS_PROGRAM, £for_state::rtype2_map); m_maincpu->set_addrmap(AS_IO, £for_state::poundfor_portmap); m_maincpu->set_irq_acknowledge_callback("upd71059c", FUNC(pic8259_device::inta_cb)); @@ -2030,8 +2020,7 @@ void poundfor_state::poundfor(machine_config &config) Z80(config, m_soundcpu, SOUND_CLOCK); m_soundcpu->set_addrmap(AS_PROGRAM, £for_state::sound_rom_map); m_soundcpu->set_addrmap(AS_IO, £for_state::poundfor_sound_portmap); - m_soundcpu->set_periodic_int(FUNC(poundfor_state::fake_nmi), attotime::from_hz(MASTER_CLOCK/8/512)); /* clocked by V1? (Vigilante) */ - /* IRQs are generated by main Z80 and YM2151 */ + m_soundcpu->set_periodic_int(FUNC(poundfor_state::fake_nmi), attotime::from_hz(MASTER_CLOCK/8/512)); PIC8259(config, m_upd71059c, 0); m_upd71059c->out_int_callback().set_inputline(m_maincpu, 0); @@ -2044,7 +2033,7 @@ void poundfor_state::poundfor(machine_config &config) m_upd4701[1]->set_portx_tag("TRACK1_X"); m_upd4701[1]->set_porty_tag("TRACK1_Y"); - /* video hardware */ + // video hardware BUFFERED_SPRITERAM16(config, m_spriteram); GFXDECODE(config, m_gfxdecode, m_palette, gfx_rtype2); @@ -2060,8 +2049,8 @@ void poundfor_state::poundfor(machine_config &config) void m72_state::lohtb(machine_config &config) // almost all to be verified { - /* basic machine hardware */ - V30(config, m_maincpu, MASTER_CLOCK/2/2); /* 16 MHz external freq (8MHz internal) */ + // basic machine hardware + V30(config, m_maincpu, MASTER_CLOCK/2/2); // 16 MHz external freq (8MHz internal) m_maincpu->set_addrmap(AS_PROGRAM, &m72_state::lohtb_map); m_maincpu->set_addrmap(AS_IO, &m72_state::lohtb_portmap); @@ -2072,7 +2061,7 @@ void m72_state::lohtb(machine_config &config) // almost all to be verified MCFG_MACHINE_START_OVERRIDE(m72_state,kengo) MCFG_MACHINE_RESET_OVERRIDE(m72_state,kengo) - /* video hardware */ + // video hardware BUFFERED_SPRITERAM16(config, m_spriteram); GFXDECODE(config, m_gfxdecode, m_palette, gfx_m72); -- cgit v1.2.3