summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--src/mame/drivers/cave.cpp4
-rw-r--r--src/mame/drivers/galastrm.cpp10
-rw-r--r--src/mame/drivers/gpworld.cpp2
-rw-r--r--src/mame/drivers/overdriv.cpp4
-rw-r--r--src/mame/drivers/taito_f3.cpp11
-rw-r--r--src/mame/includes/cave.h1
-rw-r--r--src/mame/includes/galastrm.h2
-rw-r--r--src/mame/includes/overdriv.h1
-rw-r--r--src/mame/includes/taito_f3.h3
9 files changed, 26 insertions, 12 deletions
diff --git a/src/mame/drivers/cave.cpp b/src/mame/drivers/cave.cpp
index 38af75c8b2e..20e4cb57ca2 100644
--- a/src/mame/drivers/cave.cpp
+++ b/src/mame/drivers/cave.cpp
@@ -124,7 +124,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(cave_state::cave_vblank_start)
update_irq_state();
cave_get_sprite_info(0);
m_agallet_vblank_irq = 1;
- machine().scheduler().timer_set(attotime::from_usec(2000), timer_expired_delegate(FUNC(cave_state::cave_vblank_end),this));
+ m_vblank_end_timer->adjust(attotime::from_usec(2000));
}
TIMER_DEVICE_CALLBACK_MEMBER(cave_state::cave_vblank_start_left)
{
@@ -1988,6 +1988,8 @@ GFXDECODE_END
MACHINE_START_MEMBER(cave_state,cave)
{
+ m_vblank_end_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(cave_state::cave_vblank_end), this));
+
save_item(NAME(m_soundbuf_len));
save_item(NAME(m_soundbuf_data));
diff --git a/src/mame/drivers/galastrm.cpp b/src/mame/drivers/galastrm.cpp
index fb5454f2e93..e6d7e7d8398 100644
--- a/src/mame/drivers/galastrm.cpp
+++ b/src/mame/drivers/galastrm.cpp
@@ -28,7 +28,7 @@ ENSONIQ 5701,5510,5505
OSC1:16MHz
OSC2:30.47618MHz
----------------------------------------------------------
-based on driver from drivers/gunbustr.c by Bryan McPhail & David Graves
+based on driver from drivers/gunbustr.cpp by Bryan McPhail & David Graves
Written by Hau
07/03/2008
@@ -49,6 +49,12 @@ $305.b invincibility
/*********************************************************************/
+void galastrm_state::machine_start()
+{
+ m_interrupt6_timer = timer_alloc(TIMER_GALASTRM_INTERRUPT6);
+}
+
+
INTERRUPT_GEN_MEMBER(galastrm_state::galastrm_interrupt)
{
m_frame_counter ^= 1;
@@ -163,7 +169,7 @@ READ32_MEMBER(galastrm_state::galastrm_adstick_ctrl_r)
WRITE32_MEMBER(galastrm_state::galastrm_adstick_ctrl_w)
{
- timer_set(downcast<cpu_device *>(&space.device())->cycles_to_attotime(1000), TIMER_GALASTRM_INTERRUPT6);
+ m_interrupt6_timer->adjust(m_maincpu->cycles_to_attotime(1000));
}
/***********************************************************
diff --git a/src/mame/drivers/gpworld.cpp b/src/mame/drivers/gpworld.cpp
index 1d0640da607..6a12ae598e2 100644
--- a/src/mame/drivers/gpworld.cpp
+++ b/src/mame/drivers/gpworld.cpp
@@ -469,7 +469,7 @@ INTERRUPT_GEN_MEMBER(gpworld_state::vblank_callback)
/* The time the IRQ line stays high is set just long enough to happen after the NMI - hacky? */
device.execute().set_input_line(0, ASSERT_LINE);
- timer_set(attotime::from_usec(100), TIMER_IRQ_STOP);
+ m_irq_stop_timer->adjust(attotime::from_usec(100));
}
static const gfx_layout gpworld_tile_layout =
diff --git a/src/mame/drivers/overdriv.cpp b/src/mame/drivers/overdriv.cpp
index f0fd002521e..baea234c0d6 100644
--- a/src/mame/drivers/overdriv.cpp
+++ b/src/mame/drivers/overdriv.cpp
@@ -216,7 +216,7 @@ TIMER_CALLBACK_MEMBER(overdriv_state::objdma_end_cb )
WRITE16_MEMBER(overdriv_state::objdma_w)
{
if(data & 0x10)
- machine().scheduler().timer_set(attotime::from_usec(100), timer_expired_delegate(FUNC(overdriv_state::objdma_end_cb), this));
+ m_objdma_end_timer->adjust(attotime::from_usec(100));
m_k053246->k053246_w(space,5,data,mem_mask);
}
@@ -296,6 +296,8 @@ INPUT_PORTS_END
void overdriv_state::machine_start()
{
+ m_objdma_end_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(overdriv_state::objdma_end_cb), this));
+
save_item(NAME(m_cpuB_ctrl));
save_item(NAME(m_sprite_colorbase));
save_item(NAME(m_zoom_colorbase));
diff --git a/src/mame/drivers/taito_f3.cpp b/src/mame/drivers/taito_f3.cpp
index 8a06cdb0eb4..2deb9426c9b 100644
--- a/src/mame/drivers/taito_f3.cpp
+++ b/src/mame/drivers/taito_f3.cpp
@@ -411,7 +411,7 @@ void taito_f3_state::device_timer(emu_timer &timer, device_timer_id id, int para
INTERRUPT_GEN_MEMBER(taito_f3_state::f3_interrupt2)
{
device.execute().set_input_line(2, HOLD_LINE); // vblank
- timer_set(downcast<cpu_device *>(&device)->cycles_to_attotime(10000), TIMER_F3_INTERRUPT3);
+ m_interrupt3_timer->adjust(m_maincpu->cycles_to_attotime(10000));
}
static const uint16_t recalh_eeprom[64] = {
@@ -425,8 +425,10 @@ static const uint16_t recalh_eeprom[64] = {
0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff
};
-MACHINE_START_MEMBER(taito_f3_state,f3)
+void taito_f3_state::machine_start()
{
+ m_interrupt3_timer = timer_alloc(TIMER_F3_INTERRUPT3);
+
save_item(NAME(m_coin_word));
}
@@ -443,7 +445,6 @@ static MACHINE_CONFIG_START( f3, taito_f3_state )
MCFG_CPU_PROGRAM_MAP(f3_map)
MCFG_CPU_VBLANK_INT_DRIVER("screen", taito_f3_state, f3_interrupt2)
- MCFG_MACHINE_START_OVERRIDE(taito_f3_state,f3)
MCFG_MACHINE_RESET_OVERRIDE(taito_f3_state,f3)
MCFG_EEPROM_SERIAL_93C46_ADD("eeprom")
@@ -537,9 +538,7 @@ static MACHINE_CONFIG_START( bubsympb, taito_f3_state )
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", M68EC020, XTAL_16MHz)
MCFG_CPU_PROGRAM_MAP(f3_map)
- MCFG_CPU_VBLANK_INT_DRIVER("screen", taito_f3_state, f3_interrupt2)
-
- MCFG_MACHINE_START_OVERRIDE(taito_f3_state,f3)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", taito_f3_state, f3_interrupt2)
MCFG_EEPROM_SERIAL_93C46_ADD("eeprom")
diff --git a/src/mame/includes/cave.h b/src/mame/includes/cave.h
index d0191eff62c..647ad66df59 100644
--- a/src/mame/includes/cave.h
+++ b/src/mame/includes/cave.h
@@ -100,6 +100,7 @@ public:
int m_spritetype[2];
int m_kludge;
+ emu_timer *m_vblank_end_timer;
/* misc */
diff --git a/src/mame/includes/galastrm.h b/src/mame/includes/galastrm.h
index 28e39178006..ac1044ab734 100644
--- a/src/mame/includes/galastrm.h
+++ b/src/mame/includes/galastrm.h
@@ -87,6 +87,7 @@ public:
struct gs_tempsprite *m_sprite_ptr_pre;
bitmap_ind16 m_tmpbitmaps;
std::unique_ptr<galastrm_renderer> m_poly;
+ emu_timer *m_interrupt6_timer;
int m_rsxb;
int m_rsyb;
@@ -101,6 +102,7 @@ public:
DECLARE_WRITE32_MEMBER(galastrm_adstick_ctrl_w);
DECLARE_CUSTOM_INPUT_MEMBER(frame_counter_r);
DECLARE_CUSTOM_INPUT_MEMBER(coin_word_r);
+ virtual void machine_start() override;
virtual void video_start() override;
uint32_t screen_update_galastrm(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
INTERRUPT_GEN_MEMBER(galastrm_interrupt);
diff --git a/src/mame/includes/overdriv.h b/src/mame/includes/overdriv.h
index 64bc0010b16..bbfba5fe516 100644
--- a/src/mame/includes/overdriv.h
+++ b/src/mame/includes/overdriv.h
@@ -32,6 +32,7 @@ public:
int m_zoom_colorbase[2];
int m_road_colorbase[2];
int m_sprite_colorbase;
+ emu_timer *m_objdma_end_timer;
/* misc */
uint16_t m_cpuB_ctrl;
diff --git a/src/mame/includes/taito_f3.h b/src/mame/includes/taito_f3.h
index 57738d8e273..681a6551f6d 100644
--- a/src/mame/includes/taito_f3.h
+++ b/src/mame/includes/taito_f3.h
@@ -93,6 +93,7 @@ public:
std::unique_ptr<uint16_t[]> m_f3_pf_data;
std::unique_ptr<uint16_t[]> m_f3_pivot_ram;
+ emu_timer *m_interrupt3_timer;
uint32_t m_coin_word[2];
int m_f3_game;
tilemap_t *m_pf1_tilemap;
@@ -307,7 +308,7 @@ public:
TILE_GET_INFO_MEMBER(get_tile_info8);
TILE_GET_INFO_MEMBER(get_tile_info_vram);
TILE_GET_INFO_MEMBER(get_tile_info_pixel);
- DECLARE_MACHINE_START(f3);
+ virtual void machine_start() override;
DECLARE_MACHINE_RESET(f3);
DECLARE_VIDEO_START(f3);
uint32_t screen_update_f3(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);