diff --git a/src/mame/audio/namco52.cpp b/src/mame/audio/namco52.cpp index 7375bd7d753..b1183a556fd 100644 --- a/src/mame/audio/namco52.cpp +++ b/src/mame/audio/namco52.cpp @@ -184,7 +184,10 @@ void namco_52xx_device::device_start() /* start the external clock */ if (m_extclock != 0) - machine().scheduler().timer_pulse(attotime(0, m_extclock), timer_expired_delegate(FUNC(namco_52xx_device::external_clock_pulse),this), 0); + { + m_extclock_pulse_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(namco_52xx_device::external_clock_pulse), this)); + m_extclock_pulse_timer->adjust(attotime(0, m_extclock), 0, attotime(0, m_extclock)); + } } //------------------------------------------------- diff --git a/src/mame/audio/namco52.h b/src/mame/audio/namco52.h index 5ec24260315..b88565dd647 100644 --- a/src/mame/audio/namco52.h +++ b/src/mame/audio/namco52.h @@ -63,6 +63,7 @@ private: int m_basenode; attoseconds_t m_extclock; + emu_timer *m_extclock_pulse_timer; devcb_read8 m_romread; devcb_read8 m_si; diff --git a/src/mame/drivers/pasopia.cpp b/src/mame/drivers/pasopia.cpp index 2403fc33829..2a15b175685 100644 --- a/src/mame/drivers/pasopia.cpp +++ b/src/mame/drivers/pasopia.cpp @@ -62,6 +62,7 @@ private: uint8_t m_mux_data; bool m_video_wl; bool m_ram_bank; + emu_timer *m_pio_timer; virtual void machine_start() override; virtual void machine_reset() override; required_device m_maincpu; @@ -272,7 +273,8 @@ We preset all banks here, so that bankswitching will incur no speed penalty. membank("bank1")->configure_entries(0, 2, &ram[0x00000], 0x10000); membank("bank2")->configure_entry(0, &ram[0x10000]); - machine().scheduler().timer_pulse(attotime::from_hz(50), timer_expired_delegate(FUNC(pasopia_state::pio_timer),this)); + m_pio_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(pasopia_state::pio_timer), this)); + m_pio_timer->adjust(attotime::from_hz(50), 0, attotime::from_hz(50)); } static MACHINE_CONFIG_START( pasopia, pasopia_state ) diff --git a/src/mame/drivers/pasopia7.cpp b/src/mame/drivers/pasopia7.cpp index 7d4ea993e16..f8b1903b563 100644 --- a/src/mame/drivers/pasopia7.cpp +++ b/src/mame/drivers/pasopia7.cpp @@ -114,6 +114,7 @@ private: int m_addr_latch; void pasopia_nmi_trap(); uint8_t m_mux_data; + emu_timer *m_pio_timer; virtual void machine_reset() override; void fdc_irq(bool state); void draw_cg4_screen(bitmap_ind16 &bitmap,const rectangle &cliprect,int width); @@ -1048,13 +1049,15 @@ ROM_END DRIVER_INIT_MEMBER(pasopia7_state,p7_raster) { m_screen_type = 1; - machine().scheduler().timer_pulse(attotime::from_hz(50), timer_expired_delegate(FUNC(pasopia7_state::pio_timer),this)); + m_pio_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(pasopia7_state::pio_timer), this)); + m_pio_timer->adjust(attotime::from_hz(50), 0, attotime::from_hz(50)); } DRIVER_INIT_MEMBER(pasopia7_state,p7_lcd) { m_screen_type = 0; - machine().scheduler().timer_pulse(attotime::from_hz(50), timer_expired_delegate(FUNC(pasopia7_state::pio_timer),this)); + m_pio_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(pasopia7_state::pio_timer), this)); + m_pio_timer->adjust(attotime::from_hz(50), 0, attotime::from_hz(50)); } diff --git a/src/mame/drivers/pcw.cpp b/src/mame/drivers/pcw.cpp index a7f19de601a..326f636baf6 100644 --- a/src/mame/drivers/pcw.cpp +++ b/src/mame/drivers/pcw.cpp @@ -2,7 +2,7 @@ // copyright-holders:Kevin Thacker /****************************************************************************** - pcw.c + pcw.cpp system driver Kevin Thacker [MESS driver] @@ -165,7 +165,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(pcw_state::pcw_timer_interrupt) m_timer_irq_flag = 1; pcw_update_irqs(); - machine().scheduler().timer_set(attotime::from_usec(100), timer_expired_delegate(FUNC(pcw_state::pcw_timer_pulse),this)); + m_pulse_timer->adjust(attotime::from_usec(100), 0, attotime::from_usec(100)); } /* PCW uses UPD765 in NON-DMA mode. FDC Ints are connected to /INT or @@ -1038,10 +1038,12 @@ DRIVER_INIT_MEMBER(pcw_state,pcw) m_roller_ram_offset = 0; /* timer interrupt */ - machine().scheduler().timer_set(attotime::zero, timer_expired_delegate(FUNC(pcw_state::setup_beep),this)); + m_beep_setup_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(pcw_state::setup_beep), this)); + m_beep_setup_timer->adjust(attotime::zero); - m_prn_stepper = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(pcw_state::pcw_stepper_callback),this)); - m_prn_pins = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(pcw_state::pcw_pins_callback),this)); + m_prn_stepper = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(pcw_state::pcw_stepper_callback), this)); + m_prn_pins = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(pcw_state::pcw_pins_callback), this)); + m_pulse_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(pcw_state::pcw_timer_pulse), this)); } diff --git a/src/mame/drivers/qdrmfgp.cpp b/src/mame/drivers/qdrmfgp.cpp index 5ff8bfac1d0..0bcd0eb87cc 100644 --- a/src/mame/drivers/qdrmfgp.cpp +++ b/src/mame/drivers/qdrmfgp.cpp @@ -554,7 +554,8 @@ MACHINE_START_MEMBER(qdrmfgp_state,qdrmfgp) MACHINE_START_MEMBER(qdrmfgp_state,qdrmfgp2) { /* sound irq (CCU? 240Hz) */ - machine().scheduler().timer_pulse(attotime::from_hz(XTAL_18_432MHz/76800), timer_expired_delegate(FUNC(qdrmfgp_state::gp2_timer_callback),this)); + m_gp2_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(qdrmfgp_state::gp2_timer_callback), this)); + m_gp2_timer->adjust(attotime::from_hz(XTAL_18_432MHz/76800), 0, attotime::from_hz(XTAL_18_432MHz/76800)); MACHINE_START_CALL_MEMBER( qdrmfgp ); } diff --git a/src/mame/includes/bk.h b/src/mame/includes/bk.h index 0910fd45685..6ac9b06d105 100644 --- a/src/mame/includes/bk.h +++ b/src/mame/includes/bk.h @@ -26,6 +26,7 @@ public: uint16_t m_key_pressed; uint16_t m_key_irq_vector; uint16_t m_drive; + emu_timer *m_kbd_timer; DECLARE_READ16_MEMBER(bk_key_state_r); DECLARE_READ16_MEMBER(bk_key_code_r); DECLARE_READ16_MEMBER(bk_vid_scrool_r); diff --git a/src/mame/includes/hp48.h b/src/mame/includes/hp48.h index c9ac8576a08..89ba8b8ba6f 100644 --- a/src/mame/includes/hp48.h +++ b/src/mame/includes/hp48.h @@ -79,6 +79,9 @@ public: uint8_t m_screens[ HP48_NB_SCREENS ][ 64 ][ 144 ]; int m_cur_screen; uint8_t* m_rom; + emu_timer *m_1st_timer; + emu_timer *m_2nd_timer; + emu_timer *m_kbd_timer; DECLARE_DRIVER_INIT(hp48); virtual void machine_reset() override; diff --git a/src/mame/includes/lisa.h b/src/mame/includes/lisa.h index 176164f4e38..f43392426e7 100644 --- a/src/mame/includes/lisa.h +++ b/src/mame/includes/lisa.h @@ -181,6 +181,7 @@ public: int m_mouse_data_offset; int m_COPS_force_unplug; emu_timer *m_mouse_timer; + emu_timer *m_cops_ready_timer; int m_hold_COPS_data; int m_NMIcode; clock_regs_t m_clock_regs; diff --git a/src/mame/includes/pcw.h b/src/mame/includes/pcw.h index 41e5df2a26f..5e44dee0c44 100644 --- a/src/mame/includes/pcw.h +++ b/src/mame/includes/pcw.h @@ -71,8 +71,10 @@ public: uint32_t m_paper_feed; // amount of paper fed through printer, by n/360 inches. One line feed is 61/360in (from the linefeed command in CP/M;s ptr menu) std::unique_ptr m_prn_output; uint8_t m_printer_p2_prev; - emu_timer* m_prn_stepper; - emu_timer* m_prn_pins; + emu_timer *m_prn_stepper; + emu_timer *m_prn_pins; + emu_timer *m_pulse_timer; + emu_timer *m_beep_setup_timer; DECLARE_READ8_MEMBER(pcw_keyboard_r); DECLARE_READ8_MEMBER(pcw_keyboard_data_r); DECLARE_READ8_MEMBER(pcw_interrupt_counter_r); diff --git a/src/mame/includes/qdrmfgp.h b/src/mame/includes/qdrmfgp.h index c7e0e2ab8ac..4d2b29d0dbb 100644 --- a/src/mame/includes/qdrmfgp.h +++ b/src/mame/includes/qdrmfgp.h @@ -39,6 +39,7 @@ public: uint16_t m_control; int32_t m_gp2_irq_control; int32_t m_pal; + emu_timer *m_gp2_timer; DECLARE_WRITE16_MEMBER(gp_control_w); DECLARE_WRITE16_MEMBER(gp2_control_w); diff --git a/src/mame/includes/rbisland.h b/src/mame/includes/rbisland.h index 54900b51f01..ca521e489e2 100644 --- a/src/mame/includes/rbisland.h +++ b/src/mame/includes/rbisland.h @@ -36,6 +36,7 @@ public: std::unique_ptr m_CRAM[8]; int m_extra_version; uint8_t m_current_bank; + emu_timer *m_cchip_timer; /* devices */ required_device m_maincpu; diff --git a/src/mame/includes/rm380z.h b/src/mame/includes/rm380z.h index 41532a64ec7..c43219a3f31 100644 --- a/src/mame/includes/rm380z.h +++ b/src/mame/includes/rm380z.h @@ -85,6 +85,8 @@ private: int m_videomode; int m_old_videomode; + emu_timer *m_static_vblank_timer; + required_device m_maincpu; optional_device m_cassette; optional_device m_messram; diff --git a/src/mame/includes/ti85.h b/src/mame/includes/ti85.h index 9251f9b54b4..1d1e71e5387 100644 --- a/src/mame/includes/ti85.h +++ b/src/mame/includes/ti85.h @@ -112,6 +112,9 @@ public: int m_ti_number_of_frames; std::unique_ptr m_frames; uint8_t * m_bios; + emu_timer *m_ti85_timer; + emu_timer *m_ti83_1st_timer; + emu_timer *m_ti83_2nd_timer; DECLARE_READ8_MEMBER(ti85_port_0000_r); DECLARE_READ8_MEMBER(ti8x_keypad_r); DECLARE_READ8_MEMBER(ti85_port_0006_r); diff --git a/src/mame/includes/vector06.h b/src/mame/includes/vector06.h index 88df82c5a55..b9a0e9b5fce 100644 --- a/src/mame/includes/vector06.h +++ b/src/mame/includes/vector06.h @@ -116,6 +116,7 @@ private: uint8_t m_aylatch; bool m_stack_state; bool m_romen; + emu_timer *m_reset_check_timer; void update_mem(); }; diff --git a/src/mame/includes/z80ne.h b/src/mame/includes/z80ne.h index 502bb44b0ac..03068d5e97e 100644 --- a/src/mame/includes/z80ne.h +++ b/src/mame/includes/z80ne.h @@ -114,6 +114,7 @@ public: int m_lx383_downsampler; uint8_t m_lx385_ctrl; emu_timer *m_cassette_timer; + emu_timer *m_kbd_timer; z80ne_cass_data_t m_cass_data; wd17xx_state_t m_wd17xx_state; DECLARE_READ8_MEMBER(lx383_r); diff --git a/src/mame/machine/bk.cpp b/src/mame/machine/bk.cpp index 10cbd4df372..c88b995f9f1 100644 --- a/src/mame/machine/bk.cpp +++ b/src/mame/machine/bk.cpp @@ -69,7 +69,8 @@ TIMER_CALLBACK_MEMBER(bk_state::keyboard_callback) void bk_state::machine_start() { - machine().scheduler().timer_pulse(attotime::from_hz(2400), timer_expired_delegate(FUNC(bk_state::keyboard_callback),this)); + m_kbd_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(bk_state::keyboard_callback), this)); + m_kbd_timer->adjust(attotime::from_hz(2400), 0, attotime::from_hz(2400)); } IRQ_CALLBACK_MEMBER(bk_state::bk0010_irq_callback) diff --git a/src/mame/machine/hp48.cpp b/src/mame/machine/hp48.cpp index 4c39f5517ab..72aba7c92b7 100644 --- a/src/mame/machine/hp48.cpp +++ b/src/mame/machine/hp48.cpp @@ -1110,11 +1110,15 @@ void hp48_state::hp48_machine_start( hp48_models model ) } /* timers */ - machine().scheduler().timer_pulse(attotime::from_hz( 16 ), timer_expired_delegate(FUNC(hp48_state::hp48_timer1_cb),this)); - machine().scheduler().timer_pulse(attotime::from_hz( 8192 ), timer_expired_delegate(FUNC(hp48_state::hp48_timer2_cb),this)); + m_1st_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(hp48_state::hp48_timer1_cb), this)); + m_1st_timer->adjust(attotime::from_hz( 16 ), 0, attotime::from_hz( 16 )); + + m_2nd_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(hp48_state::hp48_timer2_cb), this)); + m_2nd_timer->adjust(attotime::from_hz( 8192 ), 0, attotime::from_hz( 8192 )); /* 1ms keyboard polling */ - machine().scheduler().timer_pulse(attotime::from_msec( 1 ), timer_expired_delegate(FUNC(hp48_state::hp48_kbd_cb),this)); + m_kbd_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(hp48_state::hp48_kbd_cb), this)); + m_kbd_timer->adjust(attotime::from_msec( 1 ), 0, attotime::from_msec( 1 )); /* save state */ save_item(NAME(m_out) ); diff --git a/src/mame/machine/lisa.cpp b/src/mame/machine/lisa.cpp index cfc9ef45f60..0c5b73c0826 100644 --- a/src/mame/machine/lisa.cpp +++ b/src/mame/machine/lisa.cpp @@ -945,7 +945,8 @@ void lisa_state::machine_start() m_mouse_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(lisa_state::handle_mouse),this)); /* read command every ms (don't know the real value) */ - machine().scheduler().timer_pulse(attotime::from_msec(1), timer_expired_delegate(FUNC(lisa_state::set_COPS_ready),this)); + m_cops_ready_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(lisa_state::set_COPS_ready), this)); + m_cops_ready_timer->adjust(attotime::from_msec(1), 0, attotime::from_msec(1)); m_nvram->set_base(m_fdc_ram, 1024); } diff --git a/src/mame/machine/lviv.cpp b/src/mame/machine/lviv.cpp index cebbe846cc6..024652e8173 100644 --- a/src/mame/machine/lviv.cpp +++ b/src/mame/machine/lviv.cpp @@ -2,7 +2,7 @@ // copyright-holders:Krzysztof Strzecha /*************************************************************************** - machine.c + lviv.cpp Functions to emulate general aspects of PK-01 Lviv (RAM, ROM, interrupts, I/O ports) @@ -208,8 +208,6 @@ void lviv_state::machine_reset() membank("bank3")->set_base(mem + 0x010000); membank("bank4")->set_base(mem + 0x010000); - /*machine().scheduler().timer_pulse(TIME_IN_NSEC(200), FUNC(lviv_draw_pixel));*/ - /*memset(m_ram->pointer(), 0, sizeof(unsigned char)*0xffff);*/ } diff --git a/src/mame/machine/rbisland.cpp b/src/mame/machine/rbisland.cpp index 7b1baf800b9..4b8b1bcbbac 100644 --- a/src/mame/machine/rbisland.cpp +++ b/src/mame/machine/rbisland.cpp @@ -815,11 +815,9 @@ READ16_MEMBER(rbisland_state::rbisland_cchip_ram_r) void rbisland_state::rbisland_cchip_init( int version ) { - int i; - m_extra_version = version; - for (i = 0; i < 8; i++) + for (int i = 0; i < 8; i++) { m_CRAM[i] = std::make_unique(0x400); @@ -828,5 +826,6 @@ void rbisland_state::rbisland_cchip_init( int version ) save_item(m_current_bank, "cchip/m_current_bank"); - machine().scheduler().timer_pulse(attotime::from_hz(60), timer_expired_delegate(FUNC(rbisland_state::cchip_timer),this)); + m_cchip_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(rbisland_state::cchip_timer), this)); + m_cchip_timer->adjust(attotime::from_hz(60), 0, attotime::from_hz(60)); } diff --git a/src/mame/machine/rm380z.cpp b/src/mame/machine/rm380z.cpp index 158f26cf182..c3919c51c23 100644 --- a/src/mame/machine/rm380z.cpp +++ b/src/mame/machine/rm380z.cpp @@ -238,7 +238,8 @@ WRITE8_MEMBER( rm380z_state::disk_0_control ) void rm380z_state::machine_start() { - machine().scheduler().timer_pulse(attotime::from_hz(TIMER_SPEED), timer_expired_delegate(FUNC(rm380z_state::static_vblank_timer),this)); + m_static_vblank_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(rm380z_state::static_vblank_timer), this)); + m_static_vblank_timer->adjust(attotime::from_hz(TIMER_SPEED), 0, attotime::from_hz(TIMER_SPEED)); } DRIVER_INIT_MEMBER( rm380z_state, rm380z ) diff --git a/src/mame/machine/ti85.cpp b/src/mame/machine/ti85.cpp index f51c9df76fb..bbe219e159d 100644 --- a/src/mame/machine/ti85.cpp +++ b/src/mame/machine/ti85.cpp @@ -2,7 +2,7 @@ // copyright-holders:Krzysztof Strzecha,Jon Sturm /*************************************************************************** TI-85 driver by Krzysztof Strzecha - TI-83 Plus, TI-84 Plus, and Siliver Edition support by Jon Sturm + TI-83 Plus, TI-84 Plus, and Silver Edition support by Jon Sturm Functions to emulate general aspects of the machine (RAM, ROM, interrupts, I/O ports) @@ -255,7 +255,8 @@ void ti85_state::machine_start() m_port4_bit0 = 0; m_ti81_port_7_data = 0; - machine().scheduler().timer_pulse(attotime::from_hz(256), timer_expired_delegate(FUNC(ti85_state::ti85_timer_callback),this)); + m_ti85_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(ti85_state::ti85_timer_callback), this)); + m_ti85_timer->adjust(attotime::from_hz(256), 0, attotime::from_hz(256)); space.unmap_write(0x0000, 0x3fff); space.unmap_write(0x4000, 0x7fff); @@ -316,10 +317,10 @@ MACHINE_START_MEMBER(ti85_state,ti83p) ti85_state::update_ti83p_memory(); - - machine().scheduler().timer_pulse(attotime::from_hz(256), timer_expired_delegate(FUNC(ti85_state::ti83_timer1_callback),this)); - machine().scheduler().timer_pulse(attotime::from_hz(512), timer_expired_delegate(FUNC(ti85_state::ti83_timer2_callback),this)); - + m_ti83_1st_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(ti85_state::ti83_timer1_callback), this)); + m_ti83_1st_timer->adjust(attotime::from_hz(256), 0, attotime::from_hz(256)); + m_ti83_2nd_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(ti85_state::ti83_timer2_callback), this)); + m_ti83_2nd_timer->adjust(attotime::from_hz(512), 0, attotime::from_hz(512)); /* save states and debugging */ save_item(NAME(m_timer_interrupt_status)); @@ -357,8 +358,10 @@ void ti85_state::ti8xpse_init_common() ti85_state::update_ti83pse_memory(); - machine().scheduler().timer_pulse(attotime::from_hz(256), timer_expired_delegate(FUNC(ti85_state::ti83_timer1_callback),this)); - machine().scheduler().timer_pulse(attotime::from_hz(512), timer_expired_delegate(FUNC(ti85_state::ti83_timer2_callback),this)); + m_ti83_1st_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(ti85_state::ti83_timer1_callback), this)); + m_ti83_1st_timer->adjust(attotime::from_hz(256), 0, attotime::from_hz(256)); + m_ti83_2nd_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(ti85_state::ti83_timer2_callback), this)); + m_ti83_2nd_timer->adjust(attotime::from_hz(512), 0, attotime::from_hz(512)); m_crystal_timer1 = timer_alloc(CRYSTAL_TIMER1); m_crystal_timer2 = timer_alloc(CRYSTAL_TIMER2); @@ -427,7 +430,8 @@ MACHINE_START_MEMBER(ti85_state,ti86) membank("bank4")->set_base(m_ti8x_ram.get()); machine().device("nvram")->set_base(m_ti8x_ram.get(), sizeof(uint8_t)*128*1024); - machine().scheduler().timer_pulse(attotime::from_hz(256), timer_expired_delegate(FUNC(ti85_state::ti85_timer_callback),this)); + m_ti85_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(ti85_state::ti85_timer_callback), this)); + m_ti85_timer->adjust(attotime::from_hz(256), 0, attotime::from_hz(256)); } diff --git a/src/mame/machine/vector06.cpp b/src/mame/machine/vector06.cpp index f16eae3e56a..db91755457f 100644 --- a/src/mame/machine/vector06.cpp +++ b/src/mame/machine/vector06.cpp @@ -218,7 +218,8 @@ READ8_MEMBER(vector06_state::pit8253_r) void vector06_state::machine_start() { - machine().scheduler().timer_pulse(attotime::from_hz(50), timer_expired_delegate(FUNC(vector06_state::reset_check_callback),this)); + m_reset_check_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(vector06_state::reset_check_callback), this)); + m_reset_check_timer->adjust(attotime::from_hz(50), 0, attotime::from_hz(50)); } void vector06_state::machine_reset() diff --git a/src/mame/machine/z80ne.cpp b/src/mame/machine/z80ne.cpp index a357d9dd089..5b80e5b1ed4 100644 --- a/src/mame/machine/z80ne.cpp +++ b/src/mame/machine/z80ne.cpp @@ -351,8 +351,9 @@ MACHINE_START_MEMBER(z80ne_state,z80ne) save_item(NAME(m_lx383_scan_counter)); save_item(NAME(m_lx383_downsampler)); save_item(NAME(m_lx383_key)); - m_cassette_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(z80ne_state::z80ne_cassette_tc),this)); - machine().scheduler().timer_pulse( attotime::from_hz(1000), timer_expired_delegate(FUNC(z80ne_state::z80ne_kbd_scan),this)); + m_cassette_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(z80ne_state::z80ne_cassette_tc), this)); + m_kbd_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(z80ne_state::z80ne_kbd_scan), this)); + m_kbd_timer->adjust(attotime::from_hz(1000), 0, attotime::from_hz(1000)); } MACHINE_START_MEMBER(z80ne_state,z80net) diff --git a/src/mame/video/vtvideo.cpp b/src/mame/video/vtvideo.cpp index 225af086bdd..4e3114a5a02 100644 --- a/src/mame/video/vtvideo.cpp +++ b/src/mame/video/vtvideo.cpp @@ -108,7 +108,8 @@ void vt100_video_device::device_start() m_write_clear_video_interrupt.resolve_safe(); // LBA7 is scan line frequency update - machine().scheduler().timer_pulse(attotime::from_nsec(31778), timer_expired_delegate(FUNC(vt100_video_device::lba7_change), this)); + m_lba7_change_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(vt100_video_device::lba7_change), this)); + m_lba7_change_timer->adjust(attotime::from_nsec(31778), 0, attotime::from_nsec(31778)); save_item(NAME(m_lba7)); save_item(NAME(m_scroll_latch)); diff --git a/src/mame/video/vtvideo.h b/src/mame/video/vtvideo.h index 1293fdd6cc9..9a2e7e4c6ad 100644 --- a/src/mame/video/vtvideo.h +++ b/src/mame/video/vtvideo.h @@ -64,6 +64,7 @@ protected: uint8_t m_fill_lines; uint8_t m_frequency; uint8_t m_interlaced; + emu_timer * m_lba7_change_timer; required_region_ptr m_char_rom; /* character rom region */ required_device m_palette;