diff options
author | Aaron Giles <aaron@aarongiles.com> | 2021-03-23 20:20:27 -0700 |
---|---|---|
committer | Aaron Giles <aaron@aarongiles.com> | 2021-03-23 20:20:27 -0700 |
commit | 318bb322ace79d3d6129d6c966b4d445075ca02a (patch) | |
tree | 3b468de6de8dd1f3b4f723f88ca6d8c96be93066 | |
parent | 81c68db0cbeacb007073bd09dfa6d53bbc4dad99 (diff) |
Yet more old-school synchronization removal.
37 files changed, 165 insertions, 56 deletions
diff --git a/src/mame/drivers/atarisy2.cpp b/src/mame/drivers/atarisy2.cpp index 306cdd9a271..87a001382ad 100644 --- a/src/mame/drivers/atarisy2.cpp +++ b/src/mame/drivers/atarisy2.cpp @@ -222,6 +222,8 @@ void atarisy2_state::machine_start() m_p2portwr_state = false; m_p2portrd_state = false; + m_delayed_int_enable_w.enregister(*this, FUNC(atarisy2_state::delayed_int_enable_w)); + save_item(NAME(m_interrupt_enable)); save_item(NAME(m_scanline_int_state)); save_item(NAME(m_video_int_state)); @@ -287,7 +289,7 @@ TIMER_CALLBACK_MEMBER(atarisy2_state::delayed_int_enable_w) void atarisy2_state::int_enable_w(uint8_t data) { - machine().scheduler().synchronize(timer_expired_delegate(FUNC(atarisy2_state::delayed_int_enable_w),this), data); + m_delayed_int_enable_w.synchronize(data); } diff --git a/src/mame/drivers/bigevglf.cpp b/src/mame/drivers/bigevglf.cpp index c9c585b8ed6..b056d5c6bac 100644 --- a/src/mame/drivers/bigevglf.cpp +++ b/src/mame/drivers/bigevglf.cpp @@ -95,22 +95,22 @@ TIMER_CALLBACK_MEMBER(bigevglf_state::deferred_ls74_w) /* do this on a timer to let the CPUs synchronize */ void bigevglf_state::beg13_a_clr_w(uint8_t data) { - machine().scheduler().synchronize(timer_expired_delegate(FUNC(bigevglf_state::deferred_ls74_w),this), (0 << 8) | 0); + m_deferred_ls74_w.synchronize((0 << 8) | 0); } void bigevglf_state::beg13_b_clr_w(uint8_t data) { - machine().scheduler().synchronize(timer_expired_delegate(FUNC(bigevglf_state::deferred_ls74_w),this), (1 << 8) | 0); + m_deferred_ls74_w.synchronize((1 << 8) | 0); } void bigevglf_state::beg13_a_set_w(uint8_t data) { - machine().scheduler().synchronize(timer_expired_delegate(FUNC(bigevglf_state::deferred_ls74_w),this), (0 << 8) | 1); + m_deferred_ls74_w.synchronize((0 << 8) | 1); } void bigevglf_state::beg13_b_set_w(uint8_t data) { - machine().scheduler().synchronize(timer_expired_delegate(FUNC(bigevglf_state::deferred_ls74_w),this), (1 << 8) | 1); + m_deferred_ls74_w.synchronize((1 << 8) | 1); } uint8_t bigevglf_state::beg_status_r() @@ -350,6 +350,8 @@ GFXDECODE_END void bigevglf_state::machine_start() { + m_deferred_ls74_w.enregister(*this, FUNC(bigevglf_state::deferred_ls74_w)); + save_item(NAME(m_vidram_bank)); save_item(NAME(m_plane_selected)); save_item(NAME(m_plane_visible)); diff --git a/src/mame/drivers/cdc721.cpp b/src/mame/drivers/cdc721.cpp index 1643cf91350..931a1255f70 100644 --- a/src/mame/drivers/cdc721.cpp +++ b/src/mame/drivers/cdc721.cpp @@ -54,6 +54,7 @@ private: template<int Line> DECLARE_WRITE_LINE_MEMBER(int_w); TIMER_CALLBACK_MEMBER(update_interrupts); + emu_timer_cb m_update_interrupts; IRQ_CALLBACK_MEMBER(restart_cb); template<int Bit> DECLARE_WRITE_LINE_MEMBER(foreign_char_bank_w); @@ -84,7 +85,7 @@ private: void cdc721_state::interrupt_mask_w(u8 data) { m_interrupt_mask = data ^ 0xff; - machine().scheduler().synchronize(timer_expired_delegate(FUNC(cdc721_state::update_interrupts), this)); + m_update_interrupts.synchronize(); } template <int Line> @@ -98,7 +99,7 @@ WRITE_LINE_MEMBER(cdc721_state::int_w) else m_pending_interrupts &= ~(0x01 << Line); - machine().scheduler().synchronize(timer_expired_delegate(FUNC(cdc721_state::update_interrupts), this)); + m_update_interrupts.synchronize(); } TIMER_CALLBACK_MEMBER(cdc721_state::update_interrupts) @@ -225,6 +226,8 @@ void cdc721_state::machine_start() m_interrupt_mask = 0; m_foreign_char_bank = 0; + m_update_interrupts.enregister(*this, FUNC(cdc721_state::update_interrupts)); + save_item(NAME(m_pending_interrupts)); save_item(NAME(m_active_interrupts)); save_item(NAME(m_interrupt_mask)); diff --git a/src/mame/drivers/cubeqst.cpp b/src/mame/drivers/cubeqst.cpp index ee4c26987ea..8aeb5547ffd 100644 --- a/src/mame/drivers/cubeqst.cpp +++ b/src/mame/drivers/cubeqst.cpp @@ -86,6 +86,7 @@ public: uint32_t screen_update_cubeqst(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); DECLARE_WRITE_LINE_MEMBER(vblank_irq); TIMER_CALLBACK_MEMBER(delayed_bank_swap); + emu_timer_cb m_delayed_bank_swap; void swap_linecpu_banks(); void cubeqst(machine_config &config); void line_sound_map(address_map &map); @@ -281,7 +282,7 @@ TIMER_CALLBACK_MEMBER(cubeqst_state::delayed_bank_swap) void cubeqst_state::swap_linecpu_banks() { /* Best sync up before we switch banks around */ - machine().scheduler().synchronize(timer_expired_delegate(FUNC(cubeqst_state::delayed_bank_swap),this)); + m_delayed_bank_swap.synchronize(); } @@ -464,6 +465,8 @@ void cubeqst_state::machine_start() /* TODO: Use resistor values */ int i; + m_delayed_bank_swap.enregister(*this, FUNC(cubeqst_state::delayed_bank_swap)); + m_colormap = std::make_unique<rgb_t[]>(65536); for (i = 0; i < 65536; ++i) { diff --git a/src/mame/drivers/esripsys.cpp b/src/mame/drivers/esripsys.cpp index edaa9ff6ca3..5b4e6f58b28 100644 --- a/src/mame/drivers/esripsys.cpp +++ b/src/mame/drivers/esripsys.cpp @@ -163,7 +163,7 @@ TIMER_CALLBACK_MEMBER(esripsys_state::delayed_bank_swap) void esripsys_state::frame_w(uint8_t data) { - machine().scheduler().synchronize(timer_expired_delegate(FUNC(esripsys_state::delayed_bank_swap),this)); + m_delayed_bank_swap.synchronize(); m_frame_vbl = 1; } @@ -633,6 +633,8 @@ void esripsys_state::init_esripsys() membank("bank3")->set_base(&rom[0x4000]); membank("bank4")->set_base(&rom[0x8000]); + m_delayed_bank_swap.enregister(*this, FUNC(esripsys_state::delayed_bank_swap)); + /* Register stuff for state saving */ save_pointer(NAME(m_fdt_a), FDT_RAM_SIZE); save_pointer(NAME(m_fdt_b), FDT_RAM_SIZE); diff --git a/src/mame/drivers/exidy440.cpp b/src/mame/drivers/exidy440.cpp index ca2185b56f1..4db431e03f9 100644 --- a/src/mame/drivers/exidy440.cpp +++ b/src/mame/drivers/exidy440.cpp @@ -365,7 +365,7 @@ TIMER_CALLBACK_MEMBER(exidy440_state::delayed_sound_command_w) void exidy440_state::sound_command_w(uint8_t data) { - machine().scheduler().synchronize(timer_expired_delegate(FUNC(exidy440_state::delayed_sound_command_w), this), data); + m_delayed_sound_command_w.synchronize(data); } @@ -448,6 +448,8 @@ void exidy440_state::machine_start() /* the EEROM lives in the uppermost 8k of the top bank */ uint8_t *rom = memregion("maincpu")->base(); + m_delayed_sound_command_w.enregister(*this, FUNC(exidy440_state::delayed_sound_command_w)); + subdevice<nvram_device>("nvram")->set_base(&rom[0x10000 + 15 * 0x4000 + 0x2000], 0x2000); } diff --git a/src/mame/drivers/grchamp.cpp b/src/mame/drivers/grchamp.cpp index 1212c698bd4..dded297d14a 100644 --- a/src/mame/drivers/grchamp.cpp +++ b/src/mame/drivers/grchamp.cpp @@ -98,6 +98,9 @@ void grchamp_state::machine_start() m_digits.resolve(); m_soundlatch_data = 0x00; m_soundlatch_flag = false; + m_soundlatch_w_cb.enregister(*this, FUNC(grchamp_state::soundlatch_w_cb)); + m_soundlatch_clear7_w_cb.enregister(*this, FUNC(grchamp_state::soundlatch_clear7_w_cb)); + m_main_to_sub_comm_sync_w.enregister(*this, FUNC(grchamp_state::main_to_sub_comm_sync_w)); save_item(NAME(m_cpu0_out)); save_item(NAME(m_cpu1_out)); save_item(NAME(m_comm_latch)); @@ -219,7 +222,7 @@ void grchamp_state::cpu0_outputs_w(offs_t offset, uint8_t data) case 0x0e: /* OUT14 */ /* O-21 connector */ - machine().scheduler().synchronize(timer_expired_delegate(FUNC(grchamp_state::soundlatch_w_cb), this), data); // soundlatch write, needs to synchronize + m_soundlatch_w_cb.synchronize(data); // soundlatch write, needs to synchronize break; } } @@ -423,7 +426,7 @@ TIMER_CALLBACK_MEMBER(grchamp_state::main_to_sub_comm_sync_w) void grchamp_state::main_to_sub_comm_w(offs_t offset, uint8_t data) { - machine().scheduler().synchronize(timer_expired_delegate(FUNC(grchamp_state::main_to_sub_comm_sync_w),this), data | (offset << 8)); + m_main_to_sub_comm_sync_w.synchronize(data | (offset << 8)); } @@ -469,7 +472,7 @@ uint8_t grchamp_state::soundlatch_r() // WR5000 void grchamp_state::soundlatch_clear7_w(uint8_t data) { - machine().scheduler().synchronize(timer_expired_delegate(FUNC(grchamp_state::soundlatch_clear7_w_cb), this), data); + m_soundlatch_clear7_w_cb.synchronize(data); } // RD5001 diff --git a/src/mame/drivers/ladyfrog.cpp b/src/mame/drivers/ladyfrog.cpp index b7afba6d1a6..444f795913a 100644 --- a/src/mame/drivers/ladyfrog.cpp +++ b/src/mame/drivers/ladyfrog.cpp @@ -89,7 +89,7 @@ TIMER_CALLBACK_MEMBER(ladyfrog_state::nmi_callback) void ladyfrog_state::sound_command_w(uint8_t data) { m_soundlatch->write(data); - machine().scheduler().synchronize(timer_expired_delegate(FUNC(ladyfrog_state::nmi_callback),this), data); + m_nmi_callback.synchronize(data); } void ladyfrog_state::nmi_disable_w(uint8_t data) @@ -269,6 +269,8 @@ GFXDECODE_END void ladyfrog_state::machine_start() { + m_nmi_callback.enregister(*this, FUNC(ladyfrog_state::nmi_callback)); + save_item(NAME(m_tilebank)); save_item(NAME(m_palette_bank)); save_item(NAME(m_sound_nmi_enable)); diff --git a/src/mame/drivers/m72.cpp b/src/mame/drivers/m72.cpp index 7e1098f0482..84219703253 100644 --- a/src/mame/drivers/m72.cpp +++ b/src/mame/drivers/m72.cpp @@ -209,12 +209,20 @@ other supported games as well. void m72_state::machine_start() { - m_scanline_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(m72_state::scanline_interrupt),this)); + m_synch_callback.enregister(*this, FUNC(m72_state::synch_callback)); + m_delayed_ram16_w.enregister(*this, FUNC(m72_state::delayed_ram16_w)); + m_delayed_ram8_w.enregister(*this, FUNC(m72_state::delayed_ram8_w)); + + m_scanline_timer = timer_alloc(*this, FUNC(m72_state::scanline_interrupt)); } MACHINE_START_MEMBER(m72_state,kengo) { - m_scanline_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(m72_state::kengo_scanline_interrupt),this)); + m_synch_callback.enregister(*this, FUNC(m72_state::synch_callback)); + m_delayed_ram16_w.enregister(*this, FUNC(m72_state::delayed_ram16_w)); + m_delayed_ram8_w.enregister(*this, FUNC(m72_state::delayed_ram8_w)); + + m_scanline_timer = timer_alloc(*this, FUNC(m72_state::kengo_scanline_interrupt)); } TIMER_CALLBACK_MEMBER(m72_state::synch_callback) @@ -229,7 +237,7 @@ void m72_state::machine_reset() //m_mcu_snd_cmd_latch = 0; m_scanline_timer->adjust(m_screen->time_until_pos(0)); - machine().scheduler().synchronize(timer_expired_delegate(FUNC(m72_state::synch_callback),this)); + m_synch_callback.synchronize(); // Hold sound CPU in reset if main CPU has to upload the program into RAM if (m_soundram.found()) @@ -332,12 +340,12 @@ TIMER_CALLBACK_MEMBER(m72_state::delayed_ram8_w) void m72_state::main_mcu_w(offs_t offset, u16 data, u16 mem_mask) { - machine().scheduler().synchronize(timer_expired_delegate(FUNC(m72_state::delayed_ram16_w), this), offset << 16 | data | (mem_mask & 0x0180) << 20); + m_delayed_ram16_w.synchronize(offset << 16 | data | (mem_mask & 0x0180) << 20); } void m72_state::mcu_data_w(offs_t offset, u8 data) { - machine().scheduler().synchronize(timer_expired_delegate(FUNC(m72_state::delayed_ram8_w), this), offset << 8 | u32(data)); + m_delayed_ram8_w.synchronize(offset << 8 | u32(data)); } u8 m72_state::mcu_data_r(offs_t offset) diff --git a/src/mame/drivers/mazerbla.cpp b/src/mame/drivers/mazerbla.cpp index 6eda5e0cf7c..15879b2d5cd 100644 --- a/src/mame/drivers/mazerbla.cpp +++ b/src/mame/drivers/mazerbla.cpp @@ -162,7 +162,9 @@ private: DECLARE_WRITE_LINE_MEMBER(screen_vblank); INTERRUPT_GEN_MEMBER(sound_interrupt); TIMER_CALLBACK_MEMBER(deferred_ls670_0_w); + emu_timer_cb m_deferred_ls670_0_w; TIMER_CALLBACK_MEMBER(deferred_ls670_1_w); + emu_timer_cb m_deferred_ls670_1_w; IRQ_CALLBACK_MEMBER(irq_callback); void greatgun_cpu3_io_map(address_map &map); void greatgun_io_map(address_map &map); @@ -305,7 +307,7 @@ TIMER_CALLBACK_MEMBER(mazerbla_state::deferred_ls670_0_w) void mazerbla_state::ls670_0_w(offs_t offset, uint8_t data) { /* do this on a timer to let the CPUs synchronize */ - machine().scheduler().synchronize(timer_expired_delegate(FUNC(mazerbla_state::deferred_ls670_0_w),this), (offset << 8) | data); + m_deferred_ls670_0_w.synchronize((offset << 8) | data); } uint8_t mazerbla_state::ls670_1_r(offs_t offset) @@ -327,7 +329,7 @@ TIMER_CALLBACK_MEMBER(mazerbla_state::deferred_ls670_1_w) void mazerbla_state::ls670_1_w(offs_t offset, uint8_t data) { /* do this on a timer to let the CPUs synchronize */ - machine().scheduler().synchronize(timer_expired_delegate(FUNC(mazerbla_state::deferred_ls670_1_w),this), (offset << 8) | data); + m_deferred_ls670_1_w.synchronize((offset << 8) | data); } @@ -935,6 +937,9 @@ void mazerbla_state::machine_start() membank("bank1")->configure_entries(0, 256, memregion("sub2")->base() + 0x10000, 0x2000); + m_deferred_ls670_0_w.enregister(*this, FUNC(mazerbla_state::deferred_ls670_0_w)); + m_deferred_ls670_1_w.enregister(*this, FUNC(mazerbla_state::deferred_ls670_1_w)); + save_item(NAME(m_port02_status)); save_item(NAME(m_gfx_rom_bank)); diff --git a/src/mame/drivers/metro.cpp b/src/mame/drivers/metro.cpp index 4a9c18233d3..dafad4c7b8b 100644 --- a/src/mame/drivers/metro.cpp +++ b/src/mame/drivers/metro.cpp @@ -237,7 +237,7 @@ READ_LINE_MEMBER(metro_state::rxd_r) void metro_state::sound_data_w(u8 data) { - machine().scheduler().synchronize(timer_expired_delegate(FUNC(metro_state::sound_data_sync), this), data); + m_sound_data_sync.synchronize(data); m_audiocpu->pulse_input_line(INPUT_LINE_NMI, attotime::zero); // seen rxd_r } @@ -5344,6 +5344,8 @@ ROM_END void metro_state::init_metro() { + m_sound_data_sync.enregister(*this, FUNC(metro_state::sound_data_sync)); + if (m_audiobank.found()) { m_audiobank->configure_entries(0, 8, memregion("audiocpu")->base(), 0x4000); diff --git a/src/mame/drivers/msisaac.cpp b/src/mame/drivers/msisaac.cpp index e17c5c2c581..9bb9927744e 100644 --- a/src/mame/drivers/msisaac.cpp +++ b/src/mame/drivers/msisaac.cpp @@ -35,7 +35,7 @@ TIMER_CALLBACK_MEMBER(msisaac_state::nmi_callback) void msisaac_state::sound_command_w(uint8_t data) { m_soundlatch->write(data); - machine().scheduler().synchronize(timer_expired_delegate(FUNC(msisaac_state::nmi_callback),this), data); + m_nmi_callback.synchronize(data); } void msisaac_state::nmi_disable_w(uint8_t data) @@ -409,6 +409,8 @@ GFXDECODE_END void msisaac_state::machine_start() { + m_nmi_callback.enregister(*this, FUNC(msisaac_state::nmi_callback)); + /* video */ save_item(NAME(m_bg2_textbank)); /* sound */ diff --git a/src/mame/drivers/multigam.cpp b/src/mame/drivers/multigam.cpp index 43ceeed8699..41553bc70ea 100644 --- a/src/mame/drivers/multigam.cpp +++ b/src/mame/drivers/multigam.cpp @@ -212,6 +212,7 @@ private: DECLARE_MACHINE_RESET(multigm3); DECLARE_MACHINE_START(supergm3); TIMER_CALLBACK_MEMBER(mmc1_resync_callback); + emu_timer_cb m_mmc1_resync_callback; void set_videorom_bank( int start, int count, int bank, int bank_size_in_kb); void set_videoram_bank( int start, int count, int bank, int bank_size_in_kb); void multigam_init_mmc3(uint8_t *prg_base, int prg_size, int chr_bank_base); @@ -759,7 +760,7 @@ void multigam_state::mmc1_rom_switch_w(offs_t offset, uint8_t data) else { m_mmc1_reg_write_enable = 0; - machine().scheduler().synchronize(timer_expired_delegate(FUNC(multigam_state::mmc1_resync_callback),this)); + m_mmc1_resync_callback.synchronize(); } int reg = (offset >> 13); @@ -1159,6 +1160,8 @@ MACHINE_RESET_MEMBER(multigam_state,multigm3) void multigam_state::machine_start() { + m_mmc1_resync_callback.enregister(*this, FUNC(multigam_state::mmc1_resync_callback)); + m_nt_ram = std::make_unique<uint8_t[]>(0x1000); m_nt_page[0] = m_nt_ram.get(); m_nt_page[1] = m_nt_ram.get() + 0x400; diff --git a/src/mame/drivers/norautp.cpp b/src/mame/drivers/norautp.cpp index 53efbe3ead5..7e427c52a01 100644 --- a/src/mame/drivers/norautp.cpp +++ b/src/mame/drivers/norautp.cpp @@ -725,7 +725,7 @@ void norautp_state::counterlamps_w(uint8_t data) WRITE_LINE_MEMBER(norautp_state::ppi2_obf_w) { - machine().scheduler().synchronize(timer_expired_delegate(FUNC(norautp_state::ppi2_ack), this), state); + m_ppi2_ack.synchronize(state); } TIMER_CALLBACK_MEMBER(norautp_state::ppi2_ack) @@ -1314,6 +1314,12 @@ GFXDECODE_END * Machine Drivers * *************************/ +void norautp_state::machine_start() +{ + m_lamps.resolve(); + m_ppi2_ack.enregister(*this, FUNC(norautp_state::ppi2_ack)); +} + void norautp_state::noraut_base(machine_config &config) { /* basic machine hardware */ diff --git a/src/mame/drivers/pipeline.cpp b/src/mame/drivers/pipeline.cpp index dadcec912ad..777b8a5acf0 100644 --- a/src/mame/drivers/pipeline.cpp +++ b/src/mame/drivers/pipeline.cpp @@ -118,6 +118,7 @@ private: u32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); TIMER_CALLBACK_MEMBER(protection_deferred_w); + emu_timer_cb m_protection_deferred_w; void cpu0_mem(address_map &map); void cpu1_mem(address_map &map); @@ -143,6 +144,7 @@ private: void pipeline_state::machine_start() { save_item(NAME(m_from_mcu)); + m_protection_deferred_w.enregister(*this, FUNC(pipeline_state::protection_deferred_w)); } TILE_GET_INFO_MEMBER(pipeline_state::get_tile_info) @@ -218,7 +220,7 @@ TIMER_CALLBACK_MEMBER(pipeline_state::protection_deferred_w) void pipeline_state::protection_w(uint8_t data) { - machine().scheduler().synchronize(timer_expired_delegate(FUNC(pipeline_state::protection_deferred_w),this), data); + m_protection_deferred_w.synchronize(data); machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(100)); } diff --git a/src/mame/drivers/pp.cpp b/src/mame/drivers/pp.cpp index 27b90deda5f..88d9e01721e 100644 --- a/src/mame/drivers/pp.cpp +++ b/src/mame/drivers/pp.cpp @@ -59,6 +59,7 @@ private: template<int Line> DECLARE_WRITE_LINE_MEMBER(int_w); TIMER_CALLBACK_MEMBER(int_update); + emu_timer_cb m_int_update; IRQ_CALLBACK_MEMBER(intak_cb); void kbd_scan_w(u8 data); @@ -110,6 +111,8 @@ void pp_state::machine_start() m_fdc->dden_w(0); + m_int_update.enregister(*this, FUNC(pp_state::int_update)); + // 64K of dynamic RAM (8x 4864) m_ram = make_unique_clear<u8[]>(0x10000); save_pointer(NAME(m_ram), 0x10000); @@ -143,7 +146,7 @@ WRITE_LINE_MEMBER(pp_state::int_w) else m_int_pending &= ~(1 << Line); - machine().scheduler().synchronize(timer_expired_delegate(FUNC(pp_state::int_update), this)); + m_int_update.synchronize(); } TIMER_CALLBACK_MEMBER(pp_state::int_update) diff --git a/src/mame/drivers/snk.cpp b/src/mame/drivers/snk.cpp index 039680dda14..f107112c042 100644 --- a/src/mame/drivers/snk.cpp +++ b/src/mame/drivers/snk.cpp @@ -587,6 +587,9 @@ TODO: void snk_state::machine_start() { m_countryc_trackball = 0; + + m_sgladiat_sndirq_update_callback.enregister(*this, FUNC(snk_state::sgladiat_sndirq_update_callback)); + m_sndirq_update_callback.enregister(*this, FUNC(snk_state::sndirq_update_callback)); } /*********************************************************************/ @@ -667,18 +670,18 @@ TIMER_CALLBACK_MEMBER(snk_state::sgladiat_sndirq_update_callback) void snk_state::sgladiat_soundlatch_w(uint8_t data) { m_soundlatch->write(data); - machine().scheduler().synchronize(timer_expired_delegate(FUNC(snk_state::sgladiat_sndirq_update_callback),this), CMDIRQ_BUSY_ASSERT); + m_sgladiat_sndirq_update_callback.synchronize(CMDIRQ_BUSY_ASSERT); } uint8_t snk_state::sgladiat_soundlatch_r() { - machine().scheduler().synchronize(timer_expired_delegate(FUNC(snk_state::sgladiat_sndirq_update_callback),this), BUSY_CLEAR); + m_sgladiat_sndirq_update_callback.synchronize(BUSY_CLEAR); return m_soundlatch->read(); } uint8_t snk_state::sgladiat_sound_nmi_ack_r() { - machine().scheduler().synchronize(timer_expired_delegate(FUNC(snk_state::sgladiat_sndirq_update_callback),this), CMDIRQ_CLEAR); + m_sgladiat_sndirq_update_callback.synchronize(CMDIRQ_CLEAR); return 0xff; } @@ -752,20 +755,20 @@ TIMER_CALLBACK_MEMBER(snk_state::sndirq_update_callback) WRITE_LINE_MEMBER(snk_state::ymirq_callback_1 ) { if (state) - machine().scheduler().synchronize(timer_expired_delegate(FUNC(snk_state::sndirq_update_callback),this), YM1IRQ_ASSERT); + m_sndirq_update_callback.synchronize(YM1IRQ_ASSERT); } WRITE_LINE_MEMBER(snk_state::ymirq_callback_2) { if (state) - machine().scheduler().synchronize(timer_expired_delegate(FUNC(snk_state::sndirq_update_callback),this), YM2IRQ_ASSERT); + m_sndirq_update_callback.synchronize(YM2IRQ_ASSERT); } void snk_state::snk_soundlatch_w(uint8_t data) { m_soundlatch->write(data); - machine().scheduler().synchronize(timer_expired_delegate(FUNC(snk_state::sndirq_update_callback),this), CMDIRQ_BUSY_ASSERT); + m_sndirq_update_callback.synchronize(CMDIRQ_BUSY_ASSERT); } READ_LINE_MEMBER(snk_state::sound_busy_r) @@ -782,28 +785,28 @@ uint8_t snk_state::snk_sound_status_r() void snk_state::snk_sound_status_w(uint8_t data) { if (~data & 0x10) // ack YM1 irq - machine().scheduler().synchronize(timer_expired_delegate(FUNC(snk_state::sndirq_update_callback),this), YM1IRQ_CLEAR); + m_sndirq_update_callback.synchronize(YM1IRQ_CLEAR); if (~data & 0x20) // ack YM2 irq - machine().scheduler().synchronize(timer_expired_delegate(FUNC(snk_state::sndirq_update_callback),this), YM2IRQ_CLEAR); + m_sndirq_update_callback.synchronize(YM2IRQ_CLEAR); if (~data & 0x40) // clear busy flag - machine().scheduler().synchronize(timer_expired_delegate(FUNC(snk_state::sndirq_update_callback),this), BUSY_CLEAR); + m_sndirq_update_callback.synchronize(BUSY_CLEAR); if (~data & 0x80) // ack command from main cpu - machine().scheduler().synchronize(timer_expired_delegate(FUNC(snk_state::sndirq_update_callback),this), CMDIRQ_CLEAR); + m_sndirq_update_callback.synchronize(CMDIRQ_CLEAR); } uint8_t snk_state::tnk3_cmdirq_ack_r() { - machine().scheduler().synchronize(timer_expired_delegate(FUNC(snk_state::sndirq_update_callback),this), CMDIRQ_CLEAR); + m_sndirq_update_callback.synchronize(CMDIRQ_CLEAR); return 0xff; } uint8_t snk_state::tnk3_ymirq_ack_r() { - machine().scheduler().synchronize(timer_expired_delegate(FUNC(snk_state::sndirq_update_callback),this), YM1IRQ_CLEAR); + m_sndirq_update_callback.synchronize(YM1IRQ_CLEAR); return 0xff; } @@ -811,7 +814,7 @@ uint8_t snk_state::tnk3_busy_clear_r() { // it's uncertain whether the latch should be cleared here or when it's read m_soundlatch->clear_w(); - machine().scheduler().synchronize(timer_expired_delegate(FUNC(snk_state::sndirq_update_callback),this), BUSY_CLEAR); + m_sndirq_update_callback.synchronize(BUSY_CLEAR); return 0xff; } diff --git a/src/mame/drivers/superqix.cpp b/src/mame/drivers/superqix.cpp index ccf039b7010..366677136c2 100644 --- a/src/mame/drivers/superqix.cpp +++ b/src/mame/drivers/superqix.cpp @@ -301,7 +301,7 @@ TIMER_CALLBACK_MEMBER(superqix_state::z80_ay2_iob_w_cb) void superqix_state::z80_ay1_sync_address_w(uint8_t data) { - machine().scheduler().synchronize(timer_expired_delegate(FUNC(superqix_state::z80_ay1_sync_address_w_cb), this), data); + m_z80_ay1_sync_address_w_cb.synchronize(data); } uint8_t superqix_state::z80_ay2_iob_r() @@ -314,19 +314,19 @@ uint8_t superqix_state::z80_semaphore_assert_r() { if(!machine().side_effects_disabled()) { - machine().scheduler().synchronize(timer_expired_delegate(FUNC(superqix_state::z80_semaphore_assert_cb), this)); + m_z80_semaphore_assert_cb.synchronize(); } return 0; } void superqix_state::z80_ay2_iob_w(uint8_t data) { - machine().scheduler().synchronize(timer_expired_delegate(FUNC(superqix_state::z80_ay2_iob_w_cb), this), data); + m_z80_ay2_iob_w_cb.synchronize(data); } void superqix_state::mcu_port3_w(uint8_t data) { - machine().scheduler().synchronize(timer_expired_delegate(FUNC(superqix_state::mcu_port3_w_cb), this), data); + m_mcu_port3_w_cb.synchronize(data); } TIMER_CALLBACK_MEMBER(superqix_state::bootleg_mcu_port1_w_cb) @@ -360,7 +360,7 @@ TIMER_CALLBACK_MEMBER(superqix_state::bootleg_mcu_port1_w_cb) void superqix_state::bootleg_mcu_port1_w(uint8_t data) { - machine().scheduler().synchronize(timer_expired_delegate(FUNC(superqix_state::bootleg_mcu_port1_w_cb), this), data); + m_bootleg_mcu_port1_w_cb.synchronize(data); } uint8_t superqix_state::bootleg_mcu_port3_r() @@ -397,7 +397,7 @@ void superqix_state::bootleg_mcu_port3_w(uint8_t data) void superqix_state::mcu_port2_w(uint8_t data) { - machine().scheduler().synchronize(timer_expired_delegate(FUNC(superqix_state::mcu_port2_w_cb), this), data); + m_mcu_port2_w_cb.synchronize(data); } uint8_t superqix_state::mcu_port3_r() @@ -929,6 +929,13 @@ void superqix_state::machine_init_common() { superqix_state_base::machine_init_common(); + m_z80_semaphore_assert_cb.enregister(*this, FUNC(superqix_state::z80_semaphore_assert_cb)); + m_mcu_port2_w_cb.enregister(*this, FUNC(superqix_state::mcu_port2_w_cb)); + m_mcu_port3_w_cb.enregister(*this, FUNC(superqix_state::mcu_port3_w_cb)); + m_z80_ay1_sync_address_w_cb.enregister(*this, FUNC(superqix_state::z80_ay1_sync_address_w_cb)); + m_z80_ay2_iob_w_cb.enregister(*this, FUNC(superqix_state::z80_ay2_iob_w_cb)); + m_bootleg_mcu_port1_w_cb.enregister(*this, FUNC(superqix_state::bootleg_mcu_port1_w_cb)); + // 8031 and/or 8751 MCU related save_item(NAME(m_bl_port1)); save_item(NAME(m_bl_fake_port2)); diff --git a/src/mame/drivers/taitosj.cpp b/src/mame/drivers/taitosj.cpp index 84c35a548d3..ed3b3871282 100644 --- a/src/mame/drivers/taitosj.cpp +++ b/src/mame/drivers/taitosj.cpp @@ -181,7 +181,7 @@ void taitosj_state::taitosj_sndnmi_msk_w(uint8_t data) void taitosj_state::soundlatch_w(uint8_t data) { - machine().scheduler().synchronize(timer_expired_delegate(FUNC(taitosj_state::soundlatch_w_cb), this), data); + m_soundlatch_w_cb.synchronize(data); } @@ -193,7 +193,7 @@ void taitosj_state::input_port_4_f0_w(uint8_t data) // EPORT2 void taitosj_state::sound_semaphore2_w(uint8_t data) { - machine().scheduler().synchronize(timer_expired_delegate(FUNC(taitosj_state::sound_semaphore2_w_cb), this), data); + m_sound_semaphore2_w_cb.synchronize(data); } CUSTOM_INPUT_MEMBER(taitosj_state::input_port_4_f0_r) @@ -360,13 +360,13 @@ uint8_t taitosj_state::soundlatch_flags_r() // WR5000 void taitosj_state::soundlatch_clear7_w(uint8_t data) { - machine().scheduler().synchronize(timer_expired_delegate(FUNC(taitosj_state::soundlatch_clear7_w_cb), this), data); + m_soundlatch_clear7_w_cb.synchronize(data); } // WR5001 void taitosj_state::sound_semaphore2_clear_w(uint8_t data) { - machine().scheduler().synchronize(timer_expired_delegate(FUNC(taitosj_state::sound_semaphore2_clear_w_cb), this), data); + m_sound_semaphore2_clear_w_cb.synchronize(data); } @@ -2836,6 +2836,11 @@ void taitosj_state::init_common() save_item(NAME(m_input_port_4_f0)); save_item(NAME(m_kikstart_gears)); + m_soundlatch_w_cb.enregister(*this, FUNC(taitosj_state::soundlatch_w_cb)); + m_soundlatch_clear7_w_cb.enregister(*this, FUNC(taitosj_state::soundlatch_clear7_w_cb)); + m_sound_semaphore2_w_cb.enregister(*this, FUNC(taitosj_state::sound_semaphore2_w_cb)); + m_sound_semaphore2_clear_w_cb.enregister(*this, FUNC(taitosj_state::sound_semaphore2_clear_w_cb)); + machine().add_notifier(MACHINE_NOTIFY_RESET, machine_notify_delegate(&taitosj_state::reset_common, this)); } diff --git a/src/mame/drivers/tankbust.cpp b/src/mame/drivers/tankbust.cpp index 0e0a743b3da..236891094ce 100644 --- a/src/mame/drivers/tankbust.cpp +++ b/src/mame/drivers/tankbust.cpp @@ -32,6 +32,9 @@ void tankbust_state::machine_start() membank("bank1")->configure_entries(0, 2, memregion("maincpu")->base() + 0x10000, 0x4000); membank("bank2")->configure_entries(0, 2, memregion("maincpu")->base() + 0x18000, 0x2000); + m_soundlatch_callback.enregister(*this, FUNC(tankbust_state::soundlatch_callback)); + m_soundirqline_callback.enregister(*this, FUNC(tankbust_state::soundirqline_callback)); + save_item(NAME(m_latch)); save_item(NAME(m_timer1)); save_item(NAME(m_e0xx_data)); @@ -48,7 +51,7 @@ TIMER_CALLBACK_MEMBER(tankbust_state::soundlatch_callback) void tankbust_state::soundlatch_w(uint8_t data) { - machine().scheduler().synchronize(timer_expired_delegate(FUNC(tankbust_state::soundlatch_callback),this), data); + m_soundlatch_callback.synchronize(data); } uint8_t tankbust_state::soundlatch_r() @@ -95,7 +98,7 @@ void tankbust_state::e0xx_w(offs_t offset, uint8_t data) break; case 1: /* 0xe001 (value 0 then 1) written right after the soundlatch_byte_w */ - machine().scheduler().synchronize(timer_expired_delegate(FUNC(tankbust_state::soundirqline_callback),this), data); + m_soundirqline_callback.synchronize(data); break; case 2: /* 0xe002 coin counter */ diff --git a/src/mame/drivers/turbo.cpp b/src/mame/drivers/turbo.cpp index 6a9c9d31694..cda3a3ca829 100644 --- a/src/mame/drivers/turbo.cpp +++ b/src/mame/drivers/turbo.cpp @@ -189,6 +189,15 @@ * *************************************/ +void turbo_state::machine_start() +{ + m_digits.resolve(); + m_lamp.resolve(); + + m_delayed_i8255_w.enregister(*this, FUNC(turbo_state::delayed_i8255_w)); +} + + MACHINE_RESET_MEMBER(turbo_state,buckrog) { m_buckrog_command = 0x00; @@ -477,7 +486,7 @@ void turbo_state::buckrog_i8255_0_w(offs_t offset, uint8_t data) { /* the port C handshaking signals control the sub CPU IRQ, */ /* so we have to sync whenever we access this PPI */ - machine().scheduler().synchronize(timer_expired_delegate(FUNC(turbo_state::delayed_i8255_w),this), ((offset & 3) << 8) | (data & 0xff)); + m_delayed_i8255_w.synchronize(((offset & 3) << 8) | (data & 0xff)); } uint8_t turbo_state::spriteram_r(offs_t offset) diff --git a/src/mame/drivers/wyvernf0.cpp b/src/mame/drivers/wyvernf0.cpp index baab9d8071b..36ef2eac619 100644 --- a/src/mame/drivers/wyvernf0.cpp +++ b/src/mame/drivers/wyvernf0.cpp @@ -100,6 +100,7 @@ private: void nmi_disable_w(uint8_t data); void nmi_enable_w(uint8_t data); TIMER_CALLBACK_MEMBER(nmi_callback); + emu_timer_cb m_nmi_callback; uint8_t mcu_status_r(); @@ -357,7 +358,7 @@ TIMER_CALLBACK_MEMBER(wyvernf0_state::nmi_callback) void wyvernf0_state::sound_command_w(uint8_t data) { m_soundlatch->write(data); - machine().scheduler().synchronize(timer_expired_delegate(FUNC(wyvernf0_state::nmi_callback),this), data); + m_nmi_callback.synchronize(data); } void wyvernf0_state::nmi_disable_w(uint8_t data) @@ -613,6 +614,8 @@ void wyvernf0_state::machine_start() save_pointer(NAME(m_objram), 0x1000 * 2); membank("rambank")->configure_entries(0, 2, m_objram.get(), 0x1000); + m_nmi_callback.enregister(*this, FUNC(wyvernf0_state::nmi_callback)); + save_item(NAME(m_sound_nmi_enable)); save_item(NAME(m_pending_nmi)); save_item(NAME(m_rombank)); diff --git a/src/mame/includes/atarisy2.h b/src/mame/includes/atarisy2.h index 428ea47baba..d3aba6b558f 100644 --- a/src/mame/includes/atarisy2.h +++ b/src/mame/includes/atarisy2.h @@ -149,6 +149,7 @@ private: uint32_t screen_update_atarisy2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); DECLARE_WRITE_LINE_MEMBER(vblank_int); TIMER_CALLBACK_MEMBER(delayed_int_enable_w); + emu_timer_cb m_delayed_int_enable_w; TIMER_CALLBACK_MEMBER(reset_yscroll_callback); void yscroll_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); void xscroll_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); diff --git a/src/mame/includes/bigevglf.h b/src/mame/includes/bigevglf.h index 727d2a51e1a..7d024f8fe22 100644 --- a/src/mame/includes/bigevglf.h +++ b/src/mame/includes/bigevglf.h @@ -68,6 +68,7 @@ public: virtual void video_start() override; uint32_t screen_update_bigevglf(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); TIMER_CALLBACK_MEMBER(deferred_ls74_w); + emu_timer_cb m_deferred_ls74_w; void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect ); required_device<cpu_device> m_maincpu; required_device<msm5232_device> m_msm; diff --git a/src/mame/includes/esripsys.h b/src/mame/includes/esripsys.h index 37667360e27..7b8ebd56f79 100644 --- a/src/mame/includes/esripsys.h +++ b/src/mame/includes/esripsys.h @@ -130,6 +130,7 @@ private: uint32_t screen_update_esripsys(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); INTERRUPT_GEN_MEMBER(esripsys_vblank_irq); TIMER_CALLBACK_MEMBER(delayed_bank_swap); + emu_timer_cb m_delayed_bank_swap; TIMER_CALLBACK_MEMBER(hblank_start_callback); TIMER_CALLBACK_MEMBER(hblank_end_callback); required_device<dac_word_interface> m_dac; diff --git a/src/mame/includes/exidy440.h b/src/mame/includes/exidy440.h index 7272d977d1f..32cba904993 100644 --- a/src/mame/includes/exidy440.h +++ b/src/mame/includes/exidy440.h @@ -64,6 +64,7 @@ protected: uint32_t screen_update_exidy440(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); DECLARE_WRITE_LINE_MEMBER(vblank_interrupt_w); TIMER_CALLBACK_MEMBER(delayed_sound_command_w); + emu_timer_cb m_delayed_sound_command_w; TIMER_CALLBACK_MEMBER(beam_firq_callback); TIMER_CALLBACK_MEMBER(collide_firq_callback); void exidy440_update_firq(); diff --git a/src/mame/includes/grchamp.h b/src/mame/includes/grchamp.h index 6f799c7f933..a06c3fccfdd 100644 --- a/src/mame/includes/grchamp.h +++ b/src/mame/includes/grchamp.h @@ -63,7 +63,9 @@ private: void center_w(offs_t offset, uint8_t data); void right_w(offs_t offset, uint8_t data); TIMER_CALLBACK_MEMBER(soundlatch_w_cb); + emu_timer_cb m_soundlatch_w_cb; TIMER_CALLBACK_MEMBER(soundlatch_clear7_w_cb); + emu_timer_cb m_soundlatch_clear7_w_cb; uint8_t soundlatch_r(); void soundlatch_clear7_w(uint8_t data); uint8_t soundlatch_flags_r(); @@ -82,6 +84,7 @@ private: INTERRUPT_GEN_MEMBER(cpu0_interrupt); INTERRUPT_GEN_MEMBER(cpu1_interrupt); TIMER_CALLBACK_MEMBER(main_to_sub_comm_sync_w); + emu_timer_cb m_main_to_sub_comm_sync_w; uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); void draw_objects(int y, uint8_t *objdata); diff --git a/src/mame/includes/ladyfrog.h b/src/mame/includes/ladyfrog.h index b9dd982fc2e..c0234bf7447 100644 --- a/src/mame/includes/ladyfrog.h +++ b/src/mame/includes/ladyfrog.h @@ -89,6 +89,7 @@ private: DECLARE_VIDEO_START(ladyfrog_common); uint32_t screen_update_ladyfrog(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); TIMER_CALLBACK_MEMBER(nmi_callback); + emu_timer_cb m_nmi_callback; void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect ); void ladyfrog_map(address_map &map); void ladyfrog_sound_map(address_map &map); diff --git a/src/mame/includes/m72.h b/src/mame/includes/m72.h index 01d5e7ce927..5d1f145d424 100644 --- a/src/mame/includes/m72.h +++ b/src/mame/includes/m72.h @@ -213,10 +213,13 @@ private: INTERRUPT_GEN_MEMBER(fake_nmi); TIMER_CALLBACK_MEMBER(synch_callback); + emu_timer_cb m_synch_callback; TIMER_CALLBACK_MEMBER(scanline_interrupt); TIMER_CALLBACK_MEMBER(kengo_scanline_interrupt); TIMER_CALLBACK_MEMBER(delayed_ram16_w); + emu_timer_cb m_delayed_ram16_w; TIMER_CALLBACK_MEMBER(delayed_ram8_w); + emu_timer_cb m_delayed_ram8_w; u32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); u32 screen_update_m81(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); diff --git a/src/mame/includes/metro.h b/src/mame/includes/metro.h index a7d1ced1cab..dbad1ae20f9 100644 --- a/src/mame/includes/metro.h +++ b/src/mame/includes/metro.h @@ -105,6 +105,7 @@ private: void mouja_irq_timer_ctrl_w(uint16_t data); void sound_data_w(u8 data); TIMER_CALLBACK_MEMBER(sound_data_sync); + emu_timer_cb m_sound_data_sync; u8 soundstatus_r(); void soundstatus_w(u8 data); template<int Mask> void upd7810_rombank_w(u8 data); diff --git a/src/mame/includes/msisaac.h b/src/mame/includes/msisaac.h index e95ec128ceb..8b8140017ee 100644 --- a/src/mame/includes/msisaac.h +++ b/src/mame/includes/msisaac.h @@ -105,6 +105,7 @@ private: TILE_GET_INFO_MEMBER(get_bg2_tile_info); uint32_t screen_update_msisaac(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); TIMER_CALLBACK_MEMBER(nmi_callback); + emu_timer_cb m_nmi_callback; void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect ); void msisaac_map(address_map &map); void msisaac_sound_map(address_map &map); diff --git a/src/mame/includes/norautp.h b/src/mame/includes/norautp.h index 05759f970b8..feb9aa96d00 100644 --- a/src/mame/includes/norautp.h +++ b/src/mame/includes/norautp.h @@ -52,12 +52,13 @@ public: void init_deb(); protected: - virtual void machine_start() override { m_lamps.resolve(); } + virtual void machine_start() override; virtual void video_start() override; private: DECLARE_WRITE_LINE_MEMBER(ppi2_obf_w); TIMER_CALLBACK_MEMBER(ppi2_ack); + emu_timer_cb m_ppi2_ack; uint8_t test2_r(); void mainlamps_w(uint8_t data); void soundlamps_w(uint8_t data); diff --git a/src/mame/includes/snk.h b/src/mame/includes/snk.h index 6f12cd7958e..2aff80c2ead 100644 --- a/src/mame/includes/snk.h +++ b/src/mame/includes/snk.h @@ -235,7 +235,9 @@ private: uint32_t screen_update_tdfever(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); uint32_t screen_update_fitegolf2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); TIMER_CALLBACK_MEMBER(sgladiat_sndirq_update_callback); + emu_timer_cb m_sgladiat_sndirq_update_callback; TIMER_CALLBACK_MEMBER(sndirq_update_callback); + emu_timer_cb m_sndirq_update_callback; DECLARE_WRITE_LINE_MEMBER(ymirq_callback_2); void marvins_draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, const int scrollx, const int scrolly, const int from, const int to); void tnk3_draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, const int xscroll, const int yscroll); diff --git a/src/mame/includes/superqix.h b/src/mame/includes/superqix.h index 5f1fd0cfc79..31f47ceb5be 100644 --- a/src/mame/includes/superqix.h +++ b/src/mame/includes/superqix.h @@ -130,11 +130,17 @@ private: virtual void machine_init_common() override; TIMER_CALLBACK_MEMBER(z80_semaphore_assert_cb); + emu_timer_cb m_z80_semaphore_assert_cb; TIMER_CALLBACK_MEMBER(mcu_port2_w_cb); + emu_timer_cb m_mcu_port2_w_cb; TIMER_CALLBACK_MEMBER(mcu_port3_w_cb); + emu_timer_cb m_mcu_port3_w_cb; TIMER_CALLBACK_MEMBER(z80_ay1_sync_address_w_cb); + emu_timer_cb m_z80_ay1_sync_address_w_cb; TIMER_CALLBACK_MEMBER(z80_ay2_iob_w_cb); + emu_timer_cb m_z80_ay2_iob_w_cb; TIMER_CALLBACK_MEMBER(bootleg_mcu_port1_w_cb); + emu_timer_cb m_bootleg_mcu_port1_w_cb; }; diff --git a/src/mame/includes/taitosj.h b/src/mame/includes/taitosj.h index e64c4dc7d08..ab0131f6c02 100644 --- a/src/mame/includes/taitosj.h +++ b/src/mame/includes/taitosj.h @@ -111,9 +111,13 @@ private: void soundlatch_w(uint8_t data); void sound_semaphore2_w(uint8_t data); TIMER_CALLBACK_MEMBER(soundlatch_w_cb); + emu_timer_cb m_soundlatch_w_cb; TIMER_CALLBACK_MEMBER(soundlatch_clear7_w_cb); + emu_timer_cb m_soundlatch_clear7_w_cb; TIMER_CALLBACK_MEMBER(sound_semaphore2_w_cb); + emu_timer_cb m_sound_semaphore2_w_cb; TIMER_CALLBACK_MEMBER(sound_semaphore2_clear_w_cb); + emu_timer_cb m_sound_semaphore2_clear_w_cb; uint8_t soundlatch_r(); void soundlatch_clear7_w(uint8_t data); uint8_t soundlatch_flags_r(); diff --git a/src/mame/includes/tankbust.h b/src/mame/includes/tankbust.h index ea13697dc32..64e98b6b488 100644 --- a/src/mame/includes/tankbust.h +++ b/src/mame/includes/tankbust.h @@ -73,7 +73,9 @@ private: INTERRUPT_GEN_MEMBER(vblank_irq); TIMER_CALLBACK_MEMBER(soundlatch_callback); + emu_timer_cb m_soundlatch_callback; TIMER_CALLBACK_MEMBER(soundirqline_callback); + emu_timer_cb m_soundirqline_callback; void main_map(address_map &map); void map_cpu2(address_map &map); diff --git a/src/mame/includes/turbo.h b/src/mame/includes/turbo.h index 052ccb19d45..3b6bae8c93a 100644 --- a/src/mame/includes/turbo.h +++ b/src/mame/includes/turbo.h @@ -89,7 +89,7 @@ private: output_finder<> m_lamp; std::unique_ptr<uint8_t[]> m_buckrog_bitmap_ram; - virtual void machine_start() override { m_digits.resolve(); m_lamp.resolve(); } + virtual void machine_start() override; /* machine states */ uint8_t m_i8279_scanlines; @@ -192,6 +192,7 @@ private: uint32_t screen_update_subroc3d(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); uint32_t screen_update_buckrog(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); TIMER_CALLBACK_MEMBER(delayed_i8255_w); + emu_timer_cb m_delayed_i8255_w; void turbo_sound_a_w(u8 data); void turbo_sound_b_w(u8 data); void turbo_sound_c_w(u8 data); |