a few more timer_set removals (nw)

This commit is contained in:
Ivan Vangelista 2017-04-19 18:28:49 +02:00
parent 9c36de1512
commit 53b2406711
9 changed files with 26 additions and 12 deletions

View File

@ -124,7 +124,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(cave_state::cave_vblank_start)
update_irq_state(); update_irq_state();
cave_get_sprite_info(0); cave_get_sprite_info(0);
m_agallet_vblank_irq = 1; 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) TIMER_DEVICE_CALLBACK_MEMBER(cave_state::cave_vblank_start_left)
{ {
@ -1988,6 +1988,8 @@ GFXDECODE_END
MACHINE_START_MEMBER(cave_state,cave) 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_len));
save_item(NAME(m_soundbuf_data)); save_item(NAME(m_soundbuf_data));

View File

@ -28,7 +28,7 @@ ENSONIQ 5701,5510,5505
OSC1:16MHz OSC1:16MHz
OSC2:30.47618MHz 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 Written by Hau
07/03/2008 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) INTERRUPT_GEN_MEMBER(galastrm_state::galastrm_interrupt)
{ {
m_frame_counter ^= 1; m_frame_counter ^= 1;
@ -163,7 +169,7 @@ READ32_MEMBER(galastrm_state::galastrm_adstick_ctrl_r)
WRITE32_MEMBER(galastrm_state::galastrm_adstick_ctrl_w) 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));
} }
/*********************************************************** /***********************************************************

View File

@ -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? */ /* 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); 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 = static const gfx_layout gpworld_tile_layout =

View File

@ -216,7 +216,7 @@ TIMER_CALLBACK_MEMBER(overdriv_state::objdma_end_cb )
WRITE16_MEMBER(overdriv_state::objdma_w) WRITE16_MEMBER(overdriv_state::objdma_w)
{ {
if(data & 0x10) 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); m_k053246->k053246_w(space,5,data,mem_mask);
} }
@ -296,6 +296,8 @@ INPUT_PORTS_END
void overdriv_state::machine_start() 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_cpuB_ctrl));
save_item(NAME(m_sprite_colorbase)); save_item(NAME(m_sprite_colorbase));
save_item(NAME(m_zoom_colorbase)); save_item(NAME(m_zoom_colorbase));

View File

@ -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) INTERRUPT_GEN_MEMBER(taito_f3_state::f3_interrupt2)
{ {
device.execute().set_input_line(2, HOLD_LINE); // vblank 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] = { 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 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)); 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_PROGRAM_MAP(f3_map)
MCFG_CPU_VBLANK_INT_DRIVER("screen", taito_f3_state, f3_interrupt2) 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_MACHINE_RESET_OVERRIDE(taito_f3_state,f3)
MCFG_EEPROM_SERIAL_93C46_ADD("eeprom") MCFG_EEPROM_SERIAL_93C46_ADD("eeprom")
@ -537,9 +538,7 @@ static MACHINE_CONFIG_START( bubsympb, taito_f3_state )
/* basic machine hardware */ /* basic machine hardware */
MCFG_CPU_ADD("maincpu", M68EC020, XTAL_16MHz) MCFG_CPU_ADD("maincpu", M68EC020, XTAL_16MHz)
MCFG_CPU_PROGRAM_MAP(f3_map) MCFG_CPU_PROGRAM_MAP(f3_map)
MCFG_CPU_VBLANK_INT_DRIVER("screen", taito_f3_state, f3_interrupt2) MCFG_CPU_VBLANK_INT_DRIVER("screen", taito_f3_state, f3_interrupt2)
MCFG_MACHINE_START_OVERRIDE(taito_f3_state,f3)
MCFG_EEPROM_SERIAL_93C46_ADD("eeprom") MCFG_EEPROM_SERIAL_93C46_ADD("eeprom")

View File

@ -100,6 +100,7 @@ public:
int m_spritetype[2]; int m_spritetype[2];
int m_kludge; int m_kludge;
emu_timer *m_vblank_end_timer;
/* misc */ /* misc */

View File

@ -87,6 +87,7 @@ public:
struct gs_tempsprite *m_sprite_ptr_pre; struct gs_tempsprite *m_sprite_ptr_pre;
bitmap_ind16 m_tmpbitmaps; bitmap_ind16 m_tmpbitmaps;
std::unique_ptr<galastrm_renderer> m_poly; std::unique_ptr<galastrm_renderer> m_poly;
emu_timer *m_interrupt6_timer;
int m_rsxb; int m_rsxb;
int m_rsyb; int m_rsyb;
@ -101,6 +102,7 @@ public:
DECLARE_WRITE32_MEMBER(galastrm_adstick_ctrl_w); DECLARE_WRITE32_MEMBER(galastrm_adstick_ctrl_w);
DECLARE_CUSTOM_INPUT_MEMBER(frame_counter_r); DECLARE_CUSTOM_INPUT_MEMBER(frame_counter_r);
DECLARE_CUSTOM_INPUT_MEMBER(coin_word_r); DECLARE_CUSTOM_INPUT_MEMBER(coin_word_r);
virtual void machine_start() override;
virtual void video_start() override; virtual void video_start() override;
uint32_t screen_update_galastrm(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); uint32_t screen_update_galastrm(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
INTERRUPT_GEN_MEMBER(galastrm_interrupt); INTERRUPT_GEN_MEMBER(galastrm_interrupt);

View File

@ -32,6 +32,7 @@ public:
int m_zoom_colorbase[2]; int m_zoom_colorbase[2];
int m_road_colorbase[2]; int m_road_colorbase[2];
int m_sprite_colorbase; int m_sprite_colorbase;
emu_timer *m_objdma_end_timer;
/* misc */ /* misc */
uint16_t m_cpuB_ctrl; uint16_t m_cpuB_ctrl;

View File

@ -93,6 +93,7 @@ public:
std::unique_ptr<uint16_t[]> m_f3_pf_data; std::unique_ptr<uint16_t[]> m_f3_pf_data;
std::unique_ptr<uint16_t[]> m_f3_pivot_ram; std::unique_ptr<uint16_t[]> m_f3_pivot_ram;
emu_timer *m_interrupt3_timer;
uint32_t m_coin_word[2]; uint32_t m_coin_word[2];
int m_f3_game; int m_f3_game;
tilemap_t *m_pf1_tilemap; tilemap_t *m_pf1_tilemap;
@ -307,7 +308,7 @@ public:
TILE_GET_INFO_MEMBER(get_tile_info8); TILE_GET_INFO_MEMBER(get_tile_info8);
TILE_GET_INFO_MEMBER(get_tile_info_vram); TILE_GET_INFO_MEMBER(get_tile_info_vram);
TILE_GET_INFO_MEMBER(get_tile_info_pixel); TILE_GET_INFO_MEMBER(get_tile_info_pixel);
DECLARE_MACHINE_START(f3); virtual void machine_start() override;
DECLARE_MACHINE_RESET(f3); DECLARE_MACHINE_RESET(f3);
DECLARE_VIDEO_START(f3); DECLARE_VIDEO_START(f3);
uint32_t screen_update_f3(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); uint32_t screen_update_f3(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);