From a3f31268d22e32a9ebcfe06147a3eca0cb280d72 Mon Sep 17 00:00:00 2001 From: hap Date: Wed, 26 Feb 2025 14:35:35 +0100 Subject: [PATCH] misc: small cleanup, nycaptor: add audiocpu irq change to other drivers too --- src/mame/novag/cnchess.cpp | 14 ++---- src/mame/taito/flstory.cpp | 79 ++++++++++++++++---------------- src/mame/taito/nycaptor.cpp | 91 +++++++++++++++++++------------------ src/mame/tecmo/tehkanwc.cpp | 16 +++---- 4 files changed, 98 insertions(+), 102 deletions(-) diff --git a/src/mame/novag/cnchess.cpp b/src/mame/novag/cnchess.cpp index d4b6ac00ff7..80f64c50b1c 100644 --- a/src/mame/novag/cnchess.cpp +++ b/src/mame/novag/cnchess.cpp @@ -89,15 +89,11 @@ void cnchess_state::machine_start() void cnchess_state::init_board(u8 data) { // 1st row - m_board->write_piece(0, 0, 3); - m_board->write_piece(0, 8, 3); - m_board->write_piece(0, 1, 4); - m_board->write_piece(0, 7, 4); - m_board->write_piece(0, 2, 5); - m_board->write_piece(0, 6, 5); - m_board->write_piece(0, 3, 6); - m_board->write_piece(0, 5, 6); - m_board->write_piece(0, 4, 7); + for (int i = 0; i < 5; i++) + { + m_board->write_piece(0, i, 3 + i); + m_board->write_piece(0, 8 - i, 3 + i); + } // cannons m_board->write_piece(2, 1, 2); diff --git a/src/mame/taito/flstory.cpp b/src/mame/taito/flstory.cpp index 1d56aae90df..aaf036d99b0 100644 --- a/src/mame/taito/flstory.cpp +++ b/src/mame/taito/flstory.cpp @@ -7,7 +7,8 @@ added Victorious Nine by BUT TODO: - - TA7630 emulation needs filter support (bass sounds from MSM5232 should be about 2 times louder) + - TA7630 emulation needs filter support (bass sounds from MSM5232 should + be about 2 times louder) ***************************************************************************/ @@ -132,8 +133,6 @@ public: void onna34ro_mcu(machine_config &config) ATTR_COLD; private: - // memory pointers - // devices required_device m_bmcu; @@ -536,7 +535,7 @@ void flstory_mcu_state::rumba_map(address_map &map) void flstory_state::sound_control_0_w(uint8_t data) { m_snd_ctrl0 = data & 0xff; - // popmessage("SND0 0=%02x 1=%02x 2=%02x 3=%02x", m_snd_ctrl0, m_snd_ctrl1, m_snd_ctrl2, m_snd_ctrl3); + //popmessage("SND0 0=%02x 1=%02x 2=%02x 3=%02x", m_snd_ctrl0, m_snd_ctrl1, m_snd_ctrl2, m_snd_ctrl3); // this definitely controls main melody voice on 2'-1 and 4'-1 outputs for(int i=0;i<4;i++) @@ -550,14 +549,14 @@ void flstory_state::sound_control_0_w(uint8_t data) void flstory_state::sound_control_1_w(uint8_t data) { m_snd_ctrl1 = data & 0xff; - // popmessage("SND1 0=%02x 1=%02x 2=%02x 3=%02x", m_snd_ctrl0, m_snd_ctrl1, m_snd_ctrl2, m_snd_ctrl3); + //popmessage("SND1 0=%02x 1=%02x 2=%02x 3=%02x", m_snd_ctrl0, m_snd_ctrl1, m_snd_ctrl2, m_snd_ctrl3); for(int i=0;i<4;i++) m_ta7630->set_channel_volume(m_msm,i+4,m_snd_ctrl1 >> 4); -// m_msm->set_output_gain(4, m_vol_ctrl[(m_snd_ctrl1 >> 4) & 15] / 100.0); /* group2 from msm5232 */ -// m_msm->set_output_gain(5, m_vol_ctrl[(m_snd_ctrl1 >> 4) & 15] / 100.0); /* group2 from msm5232 */ -// m_msm->set_output_gain(6, m_vol_ctrl[(m_snd_ctrl1 >> 4) & 15] / 100.0); /* group2 from msm5232 */ -// m_msm->set_output_gain(7, m_vol_ctrl[(m_snd_ctrl1 >> 4) & 15] / 100.0); /* group2 from msm5232 */ + //m_msm->set_output_gain(4, m_vol_ctrl[(m_snd_ctrl1 >> 4) & 15] / 100.0); /* group2 from msm5232 */ + //m_msm->set_output_gain(5, m_vol_ctrl[(m_snd_ctrl1 >> 4) & 15] / 100.0); /* group2 from msm5232 */ + //m_msm->set_output_gain(6, m_vol_ctrl[(m_snd_ctrl1 >> 4) & 15] / 100.0); /* group2 from msm5232 */ + //m_msm->set_output_gain(7, m_vol_ctrl[(m_snd_ctrl1 >> 4) & 15] / 100.0); /* group2 from msm5232 */ } void flstory_state::sound_control_2_w(uint8_t data) @@ -593,8 +592,6 @@ void flstory_state::sound_map(address_map &map) } - - /* When "Debug Mode" DIP Switch is ON, keep IPT_SERVICE1 ('9') pressed to freeze the game. Once the game is frozen, you can press IPT_START1 ('5') to advance 1 frame, or IPT_START2 ('6') to advance 6 frames. @@ -1123,8 +1120,8 @@ void flstory_state::machine_reset() { // video m_gfxctrl = 0; -// onna34ro doesn't set this up when checking RAM/VRAM (available by keeping pressed service button at startup) -// so we invert the logic here + // onna34ro doesn't set this up when checking RAM/VRAM (available by keeping pressed service button at startup) + // so we invert the logic here m_char_bank = 1; m_palette_bank = 0; @@ -1137,13 +1134,14 @@ void flstory_state::machine_reset() void flstory_state::common(machine_config &config) { - Z80(config, m_maincpu, XTAL(10'733'000)/2); // verified on PCB + Z80(config, m_maincpu, 10.733_MHz_XTAL / 2); // verified on PCB m_maincpu->set_vblank_int("screen", FUNC(flstory_state::irq0_line_hold)); - Z80(config, m_audiocpu, 8_MHz_XTAL/2); // verified on PCB + Z80(config, m_audiocpu, 8_MHz_XTAL / 2); // verified on PCB m_audiocpu->set_addrmap(AS_PROGRAM, &flstory_state::sound_map); + // IRQ generated with discrete-logic counter - const attotime audio_irq_period = attotime::from_ticks(0x10000, 8_MHz_XTAL); + const attotime audio_irq_period = attotime::from_ticks(0x10000, 8_MHz_XTAL); // ~122Hz m_audiocpu->set_periodic_int(FUNC(flstory_state::irq0_line_hold), audio_irq_period); // 100 CPU slices per frame - a high value to ensure proper synchronization of the CPUs @@ -1151,8 +1149,7 @@ void flstory_state::common(machine_config &config) // video hardware screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); - // derived from ladyfrog.cpp, guess - screen.set_raw(XTAL(8'000'000), 510, 0, 256, 262, 2*8, 30*8); // pixel clock appears to run at 8 MHz + screen.set_raw(8_MHz_XTAL, 510, 0, 256, 262, 2*8, 30*8); // derived from ladyfrog.cpp, guess screen.set_screen_update(FUNC(flstory_state::screen_update_flstory)); screen.set_palette(m_palette); @@ -1170,21 +1167,21 @@ void flstory_state::common(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch2); TA7630(config, m_ta7630); - YM2149(config, m_ay, XTAL(8'000'000)/4); // verified on PCB + YM2149(config, m_ay, 8_MHz_XTAL / 4); // verified on PCB m_ay->port_a_write_callback().set(FUNC(flstory_state::sound_control_2_w)); m_ay->port_b_write_callback().set(FUNC(flstory_state::sound_control_3_w)); m_ay->add_route(ALL_OUTPUTS, "speaker", 0.1); - MSM5232(config, m_msm, XTAL(8'000'000)/4); // verified on PCB - m_msm->set_capacitors(1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6); /* 1.0 uF capacitors (verified on real PCB) */ - m_msm->add_route(0, "speaker", 1.0); // pin 28 2'-1 - m_msm->add_route(1, "speaker", 1.0); // pin 29 4'-1 - m_msm->add_route(2, "speaker", 1.0); // pin 30 8'-1 - m_msm->add_route(3, "speaker", 1.0); // pin 31 16'-1 - m_msm->add_route(4, "speaker", 1.0); // pin 36 2'-2 - m_msm->add_route(5, "speaker", 1.0); // pin 35 4'-2 - m_msm->add_route(6, "speaker", 1.0); // pin 34 8'-2 - m_msm->add_route(7, "speaker", 1.0); // pin 33 16'-2 + MSM5232(config, m_msm, 8_MHz_XTAL / 4); // verified on PCB + m_msm->set_capacitors(1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6); // 1.0 uF capacitors (verified on real PCB) + m_msm->add_route(0, "speaker", 1.0); // pin 28 2'-1 + m_msm->add_route(1, "speaker", 1.0); // pin 29 4'-1 + m_msm->add_route(2, "speaker", 1.0); // pin 30 8'-1 + m_msm->add_route(3, "speaker", 1.0); // pin 31 16'-1 + m_msm->add_route(4, "speaker", 1.0); // pin 36 2'-2 + m_msm->add_route(5, "speaker", 1.0); // pin 35 4'-2 + m_msm->add_route(6, "speaker", 1.0); // pin 34 8'-2 + m_msm->add_route(7, "speaker", 1.0); // pin 33 16'-2 // pin 1 SOLO 8' not mapped // pin 2 SOLO 16' not mapped // pin 22 Noise Output not mapped @@ -1198,7 +1195,7 @@ void flstory_mcu_state::flstory(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &flstory_mcu_state::flstory_map); - TAITO68705_MCU(config, m_bmcu, XTAL(18'432'000)/6); // verified on PCB + TAITO68705_MCU(config, m_bmcu, 18.432_MHz_XTAL / 6); // verified on PCB MCFG_VIDEO_START_OVERRIDE(flstory_mcu_state,flstory) } @@ -1217,7 +1214,7 @@ void flstory_mcu_state::onna34ro_mcu(machine_config &config) onna34ro(config); m_maincpu->set_addrmap(AS_PROGRAM, &flstory_mcu_state::onna34ro_mcu_map); - TAITO68705_MCU(config, m_bmcu, XTAL(18'432'000)/6); // ? + TAITO68705_MCU(config, m_bmcu, 18.432_MHz_XTAL / 6); // ? } void flstory_mcu_state::victnine(machine_config &config) @@ -1225,10 +1222,10 @@ void flstory_mcu_state::victnine(machine_config &config) common(config); // basic machine hardware - m_maincpu->set_clock(XTAL(8'000'000)/2); // 4 MHz + m_maincpu->set_clock(8_MHz_XTAL / 2); // 4 MHz m_maincpu->set_addrmap(AS_PROGRAM, &flstory_mcu_state::victnine_map); - TAITO68705_MCU(config, m_bmcu, XTAL(18'432'000)/6); + TAITO68705_MCU(config, m_bmcu, 18.432_MHz_XTAL / 6); // video hardware subdevice("screen")->set_screen_update(FUNC(flstory_mcu_state::screen_update_victnine)); @@ -1245,9 +1242,9 @@ void flstory_mcu_state::rumba(machine_config &config) // basic machine hardware m_maincpu->set_addrmap(AS_PROGRAM, &flstory_mcu_state::rumba_map); - m_maincpu->set_clock(XTAL(8'000'000) / 2); // verified on PCB + m_maincpu->set_clock(8_MHz_XTAL / 2); // verified on PCB - TAITO68705_MCU(config, m_bmcu, XTAL(18'432'000)/6); // ? + TAITO68705_MCU(config, m_bmcu, 18.432_MHz_XTAL / 6); // ? // video hardware subdevice("screen")->set_screen_update(FUNC(flstory_mcu_state::screen_update_rumba)); @@ -1548,9 +1545,9 @@ ROM_END } // anonymous namespace -GAME( 1985, flstory, 0, flstory, flstory, flstory_mcu_state, empty_init, ROT180, "Taito", "The FairyLand Story", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) -GAME( 1985, flstoryo, flstory, flstory, flstory, flstory_mcu_state, empty_init, ROT180, "Taito", "The FairyLand Story (earlier)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) -GAME( 1985, onna34ro, 0, onna34ro_mcu, onna34ro, flstory_mcu_state, empty_init, ROT0, "Taito", "Onna Sanshirou - Typhoon Gal (rev 1)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) -GAME( 1985, onna34roa, onna34ro, onna34ro, onna34ro, flstory_state, empty_init, ROT0, "Taito", "Onna Sanshirou - Typhoon Gal (bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) -GAME( 1984, victnine, 0, victnine, victnine, flstory_mcu_state, empty_init, ROT0, "Taito", "Victorious Nine", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) -GAME( 1984, rumba, 0, rumba, rumba, flstory_mcu_state, empty_init, ROT270, "Taito", "Rumba Lumber (rev 1)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) +GAME( 1985, flstory, 0, flstory, flstory, flstory_mcu_state, empty_init, ROT180, "Taito", "The FairyLand Story", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) +GAME( 1985, flstoryo, flstory, flstory, flstory, flstory_mcu_state, empty_init, ROT180, "Taito", "The FairyLand Story (earlier)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) +GAME( 1985, onna34ro, 0, onna34ro_mcu, onna34ro, flstory_mcu_state, empty_init, ROT0, "Taito", "Onna Sanshirou - Typhoon Gal (rev 1)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) +GAME( 1985, onna34roa, onna34ro, onna34ro, onna34ro, flstory_state, empty_init, ROT0, "bootleg", "Onna Sanshirou - Typhoon Gal (bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) +GAME( 1984, victnine, 0, victnine, victnine, flstory_mcu_state, empty_init, ROT0, "Taito", "Victorious Nine", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) +GAME( 1984, rumba, 0, rumba, rumba, flstory_mcu_state, empty_init, ROT270, "Taito", "Rumba Lumber (rev 1)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/taito/nycaptor.cpp b/src/mame/taito/nycaptor.cpp index 2c20325d9b6..37277a4bd9c 100644 --- a/src/mame/taito/nycaptor.cpp +++ b/src/mame/taito/nycaptor.cpp @@ -705,7 +705,6 @@ GFXDECODE_END - void nycaptor_state::machine_start() { if (m_gametype == 0) @@ -722,8 +721,6 @@ void nycaptor_state::machine_start() void nycaptor_state::machine_reset() { -// MACHINE_RESET_CALL_MEMBER(ta7630); - m_generic_control_reg = 0; m_char_bank = 0; @@ -734,22 +731,24 @@ void nycaptor_state::machine_reset() void nycaptor_state::nycaptor(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 8000000/2); /* ??? */ + Z80(config, m_maincpu, 8000000/2); /* ??? */ m_maincpu->set_addrmap(AS_PROGRAM, &nycaptor_state::nycaptor_master_map); m_maincpu->set_vblank_int("screen", FUNC(nycaptor_state::irq0_line_hold)); Z80(config, m_subcpu, 8000000/2); m_subcpu->set_addrmap(AS_PROGRAM, &nycaptor_state::nycaptor_slave_map); - m_subcpu->set_vblank_int("screen", FUNC(nycaptor_state::irq0_line_hold)); /* IRQ generated by ??? */ + m_subcpu->set_vblank_int("screen", FUNC(nycaptor_state::irq0_line_hold)); /* IRQ generated by ??? */ - Z80(config, m_audiocpu, 8_MHz_XTAL/2); + Z80(config, m_audiocpu, 8000000/2); m_audiocpu->set_addrmap(AS_PROGRAM, &nycaptor_state::sound_map); - const attotime audio_irq_period = attotime::from_ticks(0x10000, 8_MHz_XTAL); - m_audiocpu->set_periodic_int(FUNC(nycaptor_state::irq0_line_hold), audio_irq_period); /* IRQ generated with discrete logic */ + + const attotime audio_irq_period = attotime::from_ticks(0x10000, 8000000); // ~122Hz + m_audiocpu->set_periodic_int(FUNC(nycaptor_state::irq0_line_hold), audio_irq_period); TAITO68705_MCU(config, m_bmcu, 2000000); - config.set_maximum_quantum(attotime::from_hz(6000)); /* 100 CPU slices per frame - a high value to ensure proper synchronization of the CPUs */ + // 100 CPU slices per frame - a high value to ensure proper synchronization of the CPUs + config.set_maximum_quantum(attotime::from_hz(6000)); /* video hardware */ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); @@ -783,15 +782,15 @@ void nycaptor_state::nycaptor(machine_config &config) ay2.add_route(ALL_OUTPUTS, "speaker", 0.15); MSM5232(config, m_msm, 2000000); - m_msm->set_capacitors(1e-6, 1e-6, 1e-6, 1e-6, 1e-6, 1e-6, 1e-6, 1e-6); /* 1 uF capacitors (match the sample, not verified, standard) */ - m_msm->add_route(0, "speaker", 1.0); // pin 28 2'-1 - m_msm->add_route(1, "speaker", 1.0); // pin 29 4'-1 - m_msm->add_route(2, "speaker", 1.0); // pin 30 8'-1 - m_msm->add_route(3, "speaker", 1.0); // pin 31 16'-1 - m_msm->add_route(4, "speaker", 1.0); // pin 36 2'-2 - m_msm->add_route(5, "speaker", 1.0); // pin 35 4'-2 - m_msm->add_route(6, "speaker", 1.0); // pin 34 8'-2 - m_msm->add_route(7, "speaker", 1.0); // pin 33 16'-2 + m_msm->set_capacitors(1e-6, 1e-6, 1e-6, 1e-6, 1e-6, 1e-6, 1e-6, 1e-6); // 1 uF capacitors (match the sample, not verified, standard) + m_msm->add_route(0, "speaker", 1.0); // pin 28 2'-1 + m_msm->add_route(1, "speaker", 1.0); // pin 29 4'-1 + m_msm->add_route(2, "speaker", 1.0); // pin 30 8'-1 + m_msm->add_route(3, "speaker", 1.0); // pin 31 16'-1 + m_msm->add_route(4, "speaker", 1.0); // pin 36 2'-2 + m_msm->add_route(5, "speaker", 1.0); // pin 35 4'-2 + m_msm->add_route(6, "speaker", 1.0); // pin 34 8'-2 + m_msm->add_route(7, "speaker", 1.0); // pin 33 16'-2 // pin 1 SOLO 8' not mapped // pin 2 SOLO 16' not mapped // pin 22 Noise Output not mapped @@ -812,13 +811,15 @@ void nycaptor_state::cyclshtg(machine_config &config) Z80(config, m_audiocpu, 8000000/2); m_audiocpu->set_addrmap(AS_PROGRAM, &nycaptor_state::sound_map); - m_audiocpu->set_periodic_int(FUNC(nycaptor_state::irq0_line_hold), attotime::from_hz(2*60)); + + const attotime audio_irq_period = attotime::from_ticks(0x10000, 8000000); // ~122Hz + m_audiocpu->set_periodic_int(FUNC(nycaptor_state::irq0_line_hold), audio_irq_period); #ifdef USE_MCU TAITO68705_MCU(config, m_bmcu, 2000000); #endif - config.set_maximum_quantum(attotime::from_hz(60)); + config.set_maximum_quantum(attotime::from_hz(6000)); screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); screen.set_refresh_hz(60); @@ -850,15 +851,15 @@ void nycaptor_state::cyclshtg(machine_config &config) ay2.add_route(ALL_OUTPUTS, "speaker", 0.15); MSM5232(config, m_msm, 2000000); - m_msm->set_capacitors(1e-6, 1e-6, 1e-6, 1e-6, 1e-6, 1e-6, 1e-6, 1e-6); /* 1 uF capacitors (match the sample, not verified, standard) */ - m_msm->add_route(0, "speaker", 1.0); // pin 28 2'-1 - m_msm->add_route(1, "speaker", 1.0); // pin 29 4'-1 - m_msm->add_route(2, "speaker", 1.0); // pin 30 8'-1 - m_msm->add_route(3, "speaker", 1.0); // pin 31 16'-1 - m_msm->add_route(4, "speaker", 1.0); // pin 36 2'-2 - m_msm->add_route(5, "speaker", 1.0); // pin 35 4'-2 - m_msm->add_route(6, "speaker", 1.0); // pin 34 8'-2 - m_msm->add_route(7, "speaker", 1.0); // pin 33 16'-2 + m_msm->set_capacitors(1e-6, 1e-6, 1e-6, 1e-6, 1e-6, 1e-6, 1e-6, 1e-6); // 1 uF capacitors (match the sample, not verified, standard) + m_msm->add_route(0, "speaker", 1.0); // pin 28 2'-1 + m_msm->add_route(1, "speaker", 1.0); // pin 29 4'-1 + m_msm->add_route(2, "speaker", 1.0); // pin 30 8'-1 + m_msm->add_route(3, "speaker", 1.0); // pin 31 16'-1 + m_msm->add_route(4, "speaker", 1.0); // pin 36 2'-2 + m_msm->add_route(5, "speaker", 1.0); // pin 35 4'-2 + m_msm->add_route(6, "speaker", 1.0); // pin 34 8'-2 + m_msm->add_route(7, "speaker", 1.0); // pin 33 16'-2 // pin 1 SOLO 8' not mapped // pin 2 SOLO 16' not mapped // pin 22 Noise Output not mapped @@ -880,9 +881,11 @@ void nycaptor_state::bronx(machine_config &config) Z80(config, m_audiocpu, 8000000/2); m_audiocpu->set_addrmap(AS_PROGRAM, &nycaptor_state::sound_map); - m_audiocpu->set_periodic_int(FUNC(nycaptor_state::irq0_line_hold), attotime::from_hz(2*60)); - config.set_maximum_quantum(attotime::from_hz(120)); + const attotime audio_irq_period = attotime::from_ticks(0x10000, 8000000); // ~122Hz + m_audiocpu->set_periodic_int(FUNC(nycaptor_state::irq0_line_hold), audio_irq_period); + + config.set_maximum_quantum(attotime::from_hz(6000)); screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); screen.set_refresh_hz(60); @@ -914,15 +917,15 @@ void nycaptor_state::bronx(machine_config &config) ay2.add_route(ALL_OUTPUTS, "speaker", 0.15); MSM5232(config, m_msm, 2000000); - m_msm->set_capacitors(1e-6, 1e-6, 1e-6, 1e-6, 1e-6, 1e-6, 1e-6, 1e-6); /* 1 uF capacitors (match the sample, not verified, standard) */ - m_msm->add_route(0, "speaker", 1.0); // pin 28 2'-1 - m_msm->add_route(1, "speaker", 1.0); // pin 29 4'-1 - m_msm->add_route(2, "speaker", 1.0); // pin 30 8'-1 - m_msm->add_route(3, "speaker", 1.0); // pin 31 16'-1 - m_msm->add_route(4, "speaker", 1.0); // pin 36 2'-2 - m_msm->add_route(5, "speaker", 1.0); // pin 35 4'-2 - m_msm->add_route(6, "speaker", 1.0); // pin 34 8'-2 - m_msm->add_route(7, "speaker", 1.0); // pin 33 16'-2 + m_msm->set_capacitors(1e-6, 1e-6, 1e-6, 1e-6, 1e-6, 1e-6, 1e-6, 1e-6); // 1 uF capacitors (match the sample, not verified, standard) + m_msm->add_route(0, "speaker", 1.0); // pin 28 2'-1 + m_msm->add_route(1, "speaker", 1.0); // pin 29 4'-1 + m_msm->add_route(2, "speaker", 1.0); // pin 30 8'-1 + m_msm->add_route(3, "speaker", 1.0); // pin 31 16'-1 + m_msm->add_route(4, "speaker", 1.0); // pin 36 2'-2 + m_msm->add_route(5, "speaker", 1.0); // pin 35 4'-2 + m_msm->add_route(6, "speaker", 1.0); // pin 34 8'-2 + m_msm->add_route(7, "speaker", 1.0); // pin 33 16'-2 // pin 1 SOLO 8' not mapped // pin 2 SOLO 16' not mapped // pin 22 Noise Output not mapped @@ -1293,8 +1296,8 @@ void nycaptor_state::init_colt() m_gametype = 2; } -GAME( 1985, nycaptor, 0, nycaptor, nycaptor, nycaptor_state, init_nycaptor, ROT0, "Taito", "N.Y. Captor (rev 2)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) -GAME( 1986, colt, nycaptor, bronx, colt, nycaptor_state, init_colt, ROT0, "bootleg", "Colt", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) +GAME( 1985, nycaptor, 0, nycaptor, nycaptor, nycaptor_state, init_nycaptor, ROT0, "Taito", "N.Y. Captor (rev 2)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) +GAME( 1986, colt, nycaptor, bronx, colt, nycaptor_state, init_colt, ROT0, "bootleg", "Colt (bootleg of N.Y. Captor)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) -GAME( 1986, cyclshtg, 0, cyclshtg, cyclshtg, nycaptor_state, init_cyclshtg, ROT90, "Taito", "Cycle Shooting", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) -GAME( 1986, bronx, cyclshtg, bronx, bronx, nycaptor_state, init_bronx, ROT90, "bootleg", "Bronx", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) +GAME( 1986, cyclshtg, 0, cyclshtg, cyclshtg, nycaptor_state, init_cyclshtg, ROT90, "Taito", "Cycle Shooting", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) +GAME( 1986, bronx, cyclshtg, bronx, bronx, nycaptor_state, init_bronx, ROT90, "bootleg", "Bronx (bootleg of Cycle Shooting)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/tecmo/tehkanwc.cpp b/src/mame/tecmo/tehkanwc.cpp index 44b9ebe8a9a..2b1d543a7d1 100644 --- a/src/mame/tecmo/tehkanwc.cpp +++ b/src/mame/tecmo/tehkanwc.cpp @@ -801,20 +801,20 @@ GFXDECODE_END void tehkanwc_state::tehkanwc(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 18432000/4); /* 18.432000 / 4 */ + Z80(config, m_maincpu, 18.432_MHz_XTAL / 4); m_maincpu->set_addrmap(AS_PROGRAM, &tehkanwc_state::main_mem); m_maincpu->set_vblank_int("screen", FUNC(tehkanwc_state::irq0_line_hold)); - Z80(config, m_subcpu, 18432000/4); + Z80(config, m_subcpu, 18.432_MHz_XTAL / 4); m_subcpu->set_addrmap(AS_PROGRAM, &tehkanwc_state::sub_mem); m_subcpu->set_vblank_int("screen", FUNC(tehkanwc_state::irq0_line_hold)); - Z80(config, m_audiocpu, 18432000/4); + Z80(config, m_audiocpu, 18.432_MHz_XTAL / 4); m_audiocpu->set_addrmap(AS_PROGRAM, &tehkanwc_state::sound_mem); m_audiocpu->set_addrmap(AS_IO, &tehkanwc_state::sound_port); m_audiocpu->set_vblank_int("screen", FUNC(tehkanwc_state::irq0_line_hold)); - config.set_maximum_quantum(attotime::from_hz(600)); /* 10 CPU slices per frame - seems enough to keep the CPUs in sync */ + config.set_maximum_quantum(attotime::from_hz(600)); // 10 CPU slices per frame - seems enough to keep the CPUs in sync WATCHDOG_TIMER(config, "watchdog"); @@ -833,12 +833,12 @@ void tehkanwc_state::tehkanwc(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); GENERIC_LATCH_8(config, m_soundlatch2); - ym2149_device &ay1(YM2149(config, "ay1", 18432000/12)); + ym2149_device &ay1(YM2149(config, "ay1", 18.432_MHz_XTAL / 12)); ay1.port_a_write_callback().set(FUNC(tehkanwc_state::portA_w)); ay1.port_b_write_callback().set(FUNC(tehkanwc_state::portB_w)); ay1.add_route(ALL_OUTPUTS, "mono", 0.25); - ym2149_device &ay2(YM2149(config, "ay2", 18432000/12)); + ym2149_device &ay2(YM2149(config, "ay2", 18.432_MHz_XTAL / 12)); ay2.port_a_read_callback().set(FUNC(tehkanwc_state::portA_r)); ay2.port_b_read_callback().set(FUNC(tehkanwc_state::portB_r)); ay2.add_route(ALL_OUTPUTS, "mono", 0.25); @@ -852,12 +852,12 @@ void tehkanwc_state::tehkanwc(machine_config &config) void tehkanwc_state::tehkanwcb(machine_config &config) { tehkanwc(config); - ay8910_device &ay1(AY8910(config.replace(), "ay1", 18432000/12)); + ay8910_device &ay1(AY8910(config.replace(), "ay1", 18.432_MHz_XTAL / 12)); ay1.port_a_write_callback().set(FUNC(tehkanwc_state::portA_w)); ay1.port_b_write_callback().set(FUNC(tehkanwc_state::portB_w)); ay1.add_route(ALL_OUTPUTS, "mono", 0.25); - ay8910_device &ay2(AY8910(config.replace(), "ay2", 18432000/12)); + ay8910_device &ay2(AY8910(config.replace(), "ay2", 18.432_MHz_XTAL / 12)); ay2.port_a_read_callback().set(FUNC(tehkanwc_state::portA_r)); ay2.port_b_read_callback().set(FUNC(tehkanwc_state::portB_r)); ay2.add_route(ALL_OUTPUTS, "mono", 0.25);