diff options
author | Ivan Vangelista <mesgnet@yahoo.it> | 2017-04-20 18:03:12 +0200 |
---|---|---|
committer | Ivan Vangelista <mesgnet@yahoo.it> | 2017-04-20 18:03:12 +0200 |
commit | ce62497501e0b086d2a5fe39a291bf1f74911114 (patch) | |
tree | dea4b65499f6eb6b044815321b9426bfbf270f49 /src/mame | |
parent | e913366d1cd7b0b0738ca2094e22e1c201aa9535 (diff) |
daily timer_set removal (nw)
Diffstat (limited to 'src/mame')
-rw-r--r-- | src/mame/audio/triplhnt.cpp | 2 | ||||
-rw-r--r-- | src/mame/drivers/segas32.cpp | 2 | ||||
-rw-r--r-- | src/mame/drivers/triplhnt.cpp | 30 | ||||
-rw-r--r-- | src/mame/drivers/tubep.cpp | 4 | ||||
-rw-r--r-- | src/mame/includes/blstroid.h | 3 | ||||
-rw-r--r-- | src/mame/includes/midtunit.h | 2 | ||||
-rw-r--r-- | src/mame/includes/midyunit.h | 2 | ||||
-rw-r--r-- | src/mame/includes/segas32.h | 2 | ||||
-rw-r--r-- | src/mame/includes/triplhnt.h | 61 | ||||
-rw-r--r-- | src/mame/includes/tubep.h | 5 | ||||
-rw-r--r-- | src/mame/includes/victory.h | 1 | ||||
-rw-r--r-- | src/mame/video/blstroid.cpp | 6 | ||||
-rw-r--r-- | src/mame/video/midtunit.cpp | 4 | ||||
-rw-r--r-- | src/mame/video/midyunit.cpp | 7 | ||||
-rw-r--r-- | src/mame/video/segas32.cpp | 5 | ||||
-rw-r--r-- | src/mame/video/triplhnt.cpp | 20 | ||||
-rw-r--r-- | src/mame/video/tubep.cpp | 8 | ||||
-rw-r--r-- | src/mame/video/victory.cpp | 3 |
18 files changed, 101 insertions, 66 deletions
diff --git a/src/mame/audio/triplhnt.cpp b/src/mame/audio/triplhnt.cpp index 1055a3f821b..ccd478ceb10 100644 --- a/src/mame/audio/triplhnt.cpp +++ b/src/mame/audio/triplhnt.cpp @@ -2,7 +2,7 @@ // copyright-holders:Derrick Renaud /************************************************************************* - audio\triplhnt.c + audio\triplhnt.cpp *************************************************************************/ #include "emu.h" diff --git a/src/mame/drivers/segas32.cpp b/src/mame/drivers/segas32.cpp index ad67cd4c966..304630a2272 100644 --- a/src/mame/drivers/segas32.cpp +++ b/src/mame/drivers/segas32.cpp @@ -830,7 +830,7 @@ INTERRUPT_GEN_MEMBER(segas32_state::start_of_vblank_int) { signal_v60_irq(MAIN_IRQ_VBSTART); system32_set_vblank(1); - machine().scheduler().timer_set(m_screen->time_until_pos(0), timer_expired_delegate(FUNC(segas32_state::end_of_vblank_int),this)); + m_vblank_end_int_timer->adjust(m_screen->time_until_pos(0)); if (m_system32_prot_vblank) (this->*m_system32_prot_vblank)(); if (m_s32comm != nullptr) diff --git a/src/mame/drivers/triplhnt.cpp b/src/mame/drivers/triplhnt.cpp index a165bc4183a..e0d6e74e39d 100644 --- a/src/mame/drivers/triplhnt.cpp +++ b/src/mame/drivers/triplhnt.cpp @@ -22,7 +22,7 @@ DRIVER_INIT_MEMBER(triplhnt_state,triplhnt) } -void triplhnt_state::triplhnt_set_collision(int code) +void triplhnt_state::set_collision(int code) { m_hit_code = code; @@ -30,7 +30,7 @@ void triplhnt_state::triplhnt_set_collision(int code) } -void triplhnt_state::triplhnt_update_misc(address_space &space, int offset) +void triplhnt_state::update_misc(address_space &space, int offset) { uint8_t is_witch_hunt; uint8_t bit = offset >> 1; @@ -85,13 +85,13 @@ void triplhnt_state::triplhnt_update_misc(address_space &space, int offset) } -WRITE8_MEMBER(triplhnt_state::triplhnt_misc_w) +WRITE8_MEMBER(triplhnt_state::misc_w) { - triplhnt_update_misc(space, offset); + update_misc(space, offset); } -READ8_MEMBER(triplhnt_state::triplhnt_cmos_r) +READ8_MEMBER(triplhnt_state::cmos_r) { m_cmos_latch = offset; @@ -99,21 +99,21 @@ READ8_MEMBER(triplhnt_state::triplhnt_cmos_r) } -READ8_MEMBER(triplhnt_state::triplhnt_input_port_4_r) +READ8_MEMBER(triplhnt_state::input_port_4_r) { m_watchdog->watchdog_reset(); return ioport("0C0B")->read(); } -READ8_MEMBER(triplhnt_state::triplhnt_misc_r) +READ8_MEMBER(triplhnt_state::misc_r) { - triplhnt_update_misc(space, offset); + update_misc(space, offset); return ioport("VBLANK")->read() | m_hit_code; } -READ8_MEMBER(triplhnt_state::triplhnt_da_latch_r) +READ8_MEMBER(triplhnt_state::da_latch_r) { int cross_x = ioport("STICKX")->read(); int cross_y = ioport("STICKY")->read(); @@ -138,10 +138,10 @@ static ADDRESS_MAP_START( triplhnt_map, AS_PROGRAM, 8, triplhnt_state ) AM_RANGE(0x0c08, 0x0c08) AM_READ_PORT("0C08") AM_RANGE(0x0c09, 0x0c09) AM_READ_PORT("0C09") AM_RANGE(0x0c0a, 0x0c0a) AM_READ_PORT("0C0A") - AM_RANGE(0x0c0b, 0x0c0b) AM_READ(triplhnt_input_port_4_r) - AM_RANGE(0x0c10, 0x0c1f) AM_READ(triplhnt_da_latch_r) - AM_RANGE(0x0c20, 0x0c2f) AM_READ(triplhnt_cmos_r) AM_SHARE("nvram") - AM_RANGE(0x0c30, 0x0c3f) AM_READWRITE(triplhnt_misc_r, triplhnt_misc_w) + AM_RANGE(0x0c0b, 0x0c0b) AM_READ(input_port_4_r) + AM_RANGE(0x0c10, 0x0c1f) AM_READ(da_latch_r) + AM_RANGE(0x0c20, 0x0c2f) AM_READ(cmos_r) AM_SHARE("nvram") + AM_RANGE(0x0c30, 0x0c3f) AM_READWRITE(misc_r, misc_w) AM_RANGE(0x0c40, 0x0c40) AM_READ_PORT("0C40") AM_RANGE(0x0c48, 0x0c48) AM_READ_PORT("0C48") AM_RANGE(0x7000, 0x7fff) AM_ROM /* program */ @@ -317,7 +317,7 @@ static MACHINE_CONFIG_START( triplhnt, triplhnt_state ) MCFG_SCREEN_REFRESH_RATE(60) MCFG_SCREEN_SIZE(256, 262) MCFG_SCREEN_VISIBLE_AREA(0, 255, 0, 239) - MCFG_SCREEN_UPDATE_DRIVER(triplhnt_state, screen_update_triplhnt) + MCFG_SCREEN_UPDATE_DRIVER(triplhnt_state, screen_update) MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", triplhnt) @@ -359,4 +359,4 @@ ROM_START( triplhnt ) ROM_END -GAME( 1977, triplhnt, 0, triplhnt, triplhnt, triplhnt_state, triplhnt, 0, "Atari", "Triple Hunt", MACHINE_REQUIRES_ARTWORK ) +GAME( 1977, triplhnt, 0, triplhnt, triplhnt, triplhnt_state, triplhnt, 0, "Atari", "Triple Hunt", MACHINE_REQUIRES_ARTWORK | MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/tubep.cpp b/src/mame/drivers/tubep.cpp index 12284ffd479..610717c3d81 100644 --- a/src/mame/drivers/tubep.cpp +++ b/src/mame/drivers/tubep.cpp @@ -891,8 +891,6 @@ static MACHINE_CONFIG_START( tubep, tubep_state ) MCFG_PALETTE_ADD("palette", 32 + 256*64) MCFG_PALETTE_INIT_OWNER(tubep_state,tubep) - MCFG_VIDEO_START_OVERRIDE(tubep_state,tubep) - MCFG_VIDEO_RESET_OVERRIDE(tubep_state,tubep) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") @@ -955,8 +953,6 @@ static MACHINE_CONFIG_START( rjammer, tubep_state ) MCFG_PALETTE_ADD("palette", 64) MCFG_PALETTE_INIT_OWNER(tubep_state,rjammer) - MCFG_VIDEO_START_OVERRIDE(tubep_state,tubep) - MCFG_VIDEO_RESET_OVERRIDE(tubep_state,tubep) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") diff --git a/src/mame/includes/blstroid.h b/src/mame/includes/blstroid.h index 980f005dad8..010707d5a94 100644 --- a/src/mame/includes/blstroid.h +++ b/src/mame/includes/blstroid.h @@ -41,6 +41,9 @@ public: DECLARE_VIDEO_START(blstroid); uint32_t screen_update_blstroid(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + emu_timer *m_irq_off_timer; + emu_timer *m_irq_on_timer; + static const atari_motion_objects_config s_mob_config; protected: diff --git a/src/mame/includes/midtunit.h b/src/mame/includes/midtunit.h index 8da238e8b9f..3e6ad93e2c9 100644 --- a/src/mame/includes/midtunit.h +++ b/src/mame/includes/midtunit.h @@ -92,6 +92,8 @@ public: void init_tunit_generic(int sound); void init_nbajam_common(int te_protection); + emu_timer *m_dma_timer; + /* CMOS-related variables */ uint8_t m_cmos_write_enable; diff --git a/src/mame/includes/midyunit.h b/src/mame/includes/midyunit.h index 7ff403062ae..e062f9b2fbe 100644 --- a/src/mame/includes/midyunit.h +++ b/src/mame/includes/midyunit.h @@ -95,6 +95,8 @@ public: uint8_t m_yawdim_dma; uint16_t m_dma_register[16]; dma_state_t m_dma_state; + emu_timer *m_dma_timer; + emu_timer *m_autoerase_line_timer; DECLARE_WRITE16_MEMBER(midyunit_cmos_w); DECLARE_READ16_MEMBER(midyunit_cmos_r); DECLARE_WRITE16_MEMBER(midyunit_cmos_enable_w); diff --git a/src/mame/includes/segas32.h b/src/mame/includes/segas32.h index 4854433d122..ce9f810b3fb 100644 --- a/src/mame/includes/segas32.h +++ b/src/mame/includes/segas32.h @@ -91,6 +91,8 @@ public: typedef void (segas32_state::*prot_vblank_func)(); prot_vblank_func m_system32_prot_vblank; int m_print_count; + emu_timer *m_vblank_end_int_timer; + emu_timer *m_update_sprites_timer; DECLARE_WRITE16_MEMBER(sonic_level_load_protection); DECLARE_READ16_MEMBER(brival_protection_r); DECLARE_WRITE16_MEMBER(brival_protection_w); diff --git a/src/mame/includes/triplhnt.h b/src/mame/includes/triplhnt.h index 4057ab3452f..325c5fedd4d 100644 --- a/src/mame/includes/triplhnt.h +++ b/src/mame/includes/triplhnt.h @@ -30,57 +30,64 @@ public: triplhnt_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), - m_playfield_ram(*this, "playfield_ram"), - m_vpos_ram(*this, "vpos_ram"), - m_hpos_ram(*this, "hpos_ram"), - m_orga_ram(*this, "orga_ram"), - m_code_ram(*this, "code_ram"), m_maincpu(*this, "maincpu"), m_watchdog(*this, "watchdog"), m_discrete(*this, "discrete"), m_samples(*this, "samples"), m_gfxdecode(*this, "gfxdecode"), m_screen(*this, "screen"), - m_palette(*this, "palette") { } + m_palette(*this, "palette"), + m_playfield_ram(*this, "playfield_ram"), + m_vpos_ram(*this, "vpos_ram"), + m_hpos_ram(*this, "hpos_ram"), + m_orga_ram(*this, "orga_ram"), + m_code_ram(*this, "code_ram") { } + + required_device<cpu_device> m_maincpu; + required_device<watchdog_timer_device> m_watchdog; + required_device<discrete_device> m_discrete; + required_device<samples_device> m_samples; + required_device<gfxdecode_device> m_gfxdecode; + required_device<screen_device> m_screen; + required_device<palette_device> m_palette; - uint8_t m_cmos[16]; - uint8_t m_da_latch; - uint8_t m_misc_flags; - uint8_t m_cmos_latch; - uint8_t m_hit_code; required_shared_ptr<uint8_t> m_playfield_ram; required_shared_ptr<uint8_t> m_vpos_ram; required_shared_ptr<uint8_t> m_hpos_ram; required_shared_ptr<uint8_t> m_orga_ram; required_shared_ptr<uint8_t> m_code_ram; + + uint8_t m_cmos[16]; + uint8_t m_da_latch; + uint8_t m_misc_flags; + uint8_t m_cmos_latch; + uint8_t m_hit_code; int m_sprite_zoom; int m_sprite_bank; bitmap_ind16 m_helper; + emu_timer *m_hit_timer; tilemap_t* m_bg_tilemap; - DECLARE_WRITE8_MEMBER(triplhnt_misc_w); - DECLARE_READ8_MEMBER(triplhnt_cmos_r); - DECLARE_READ8_MEMBER(triplhnt_input_port_4_r); - DECLARE_READ8_MEMBER(triplhnt_misc_r); - DECLARE_READ8_MEMBER(triplhnt_da_latch_r); + + DECLARE_WRITE8_MEMBER(misc_w); + DECLARE_READ8_MEMBER(cmos_r); + DECLARE_READ8_MEMBER(input_port_4_r); + DECLARE_READ8_MEMBER(misc_r); + DECLARE_READ8_MEMBER(da_latch_r); + DECLARE_DRIVER_INIT(triplhnt); TILE_GET_INFO_MEMBER(get_tile_info); virtual void video_start() override; DECLARE_PALETTE_INIT(triplhnt); - uint32_t screen_update_triplhnt(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + + uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect); - void triplhnt_set_collision(int code); - void triplhnt_update_misc(address_space &space, int offset); - required_device<cpu_device> m_maincpu; - required_device<watchdog_timer_device> m_watchdog; - required_device<discrete_device> m_discrete; - required_device<samples_device> m_samples; - required_device<gfxdecode_device> m_gfxdecode; - required_device<screen_device> m_screen; - required_device<palette_device> m_palette; + void set_collision(int code); + void update_misc(address_space &space, int offset); + protected: virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; }; -/*----------- defined in audio/triplhnt.c -----------*/ +/*----------- defined in audio/triplhnt.cpp -----------*/ DISCRETE_SOUND_EXTERN( triplhnt ); extern const char *const triplhnt_sample_names[]; diff --git a/src/mame/includes/tubep.h b/src/mame/includes/tubep.h index 43138505bd3..1df6d5e6472 100644 --- a/src/mame/includes/tubep.h +++ b/src/mame/includes/tubep.h @@ -30,6 +30,7 @@ public: uint8_t m_ls74; uint8_t m_ls377; emu_timer *m_interrupt_timer; + emu_timer *m_sprite_timer; int m_curr_scanline; required_shared_ptr<uint8_t> m_textram; optional_shared_ptr<uint8_t> m_backgroundram; @@ -88,8 +89,8 @@ public: DECLARE_WRITE8_MEMBER(ay8910_portB_2_w); DECLARE_MACHINE_START(tubep); DECLARE_MACHINE_RESET(tubep); - DECLARE_VIDEO_START(tubep); - DECLARE_VIDEO_RESET(tubep); + virtual void video_start() override; + virtual void video_reset() override; DECLARE_PALETTE_INIT(tubep); DECLARE_MACHINE_START(rjammer); DECLARE_MACHINE_RESET(rjammer); diff --git a/src/mame/includes/victory.h b/src/mame/includes/victory.h index 31c775819b5..877e2d96e4e 100644 --- a/src/mame/includes/victory.h +++ b/src/mame/includes/victory.h @@ -68,6 +68,7 @@ public: uint8_t m_scrolly; uint8_t m_video_control; struct micro_t m_micro; + emu_timer *m_bgcoll_irq_timer; DECLARE_WRITE8_MEMBER(lamp_control_w); DECLARE_WRITE8_MEMBER(paletteram_w); diff --git a/src/mame/video/blstroid.cpp b/src/mame/video/blstroid.cpp index e36d33cbd94..af8c6b9a12e 100644 --- a/src/mame/video/blstroid.cpp +++ b/src/mame/video/blstroid.cpp @@ -71,6 +71,8 @@ const atari_motion_objects_config blstroid_state::s_mob_config = VIDEO_START_MEMBER(blstroid_state,blstroid) { + m_irq_off_timer = timer_alloc(TIMER_IRQ_OFF); + m_irq_on_timer = timer_alloc(TIMER_IRQ_ON); } @@ -123,8 +125,8 @@ void blstroid_state::scanline_update(screen_device &screen, int scanline) attotime period_on = screen.time_until_pos(vpos + 7, width * 0.9); attotime period_off = screen.time_until_pos(vpos + 8, width * 0.9); - timer_set(period_on, TIMER_IRQ_ON); - timer_set(period_off, TIMER_IRQ_OFF); + m_irq_on_timer->adjust(period_on); + m_irq_off_timer->adjust(period_off); } } diff --git a/src/mame/video/midtunit.cpp b/src/mame/video/midtunit.cpp index 075e3c366f1..5e56e29d3fe 100644 --- a/src/mame/video/midtunit.cpp +++ b/src/mame/video/midtunit.cpp @@ -93,6 +93,8 @@ VIDEO_START_MEMBER(midtunit_state,midtunit) /* allocate memory */ local_videoram = std::make_unique<uint16_t[]>(0x100000/2); + m_dma_timer = timer_alloc(TIMER_DMA); + /* reset all the globals */ gfxbank_offset[0] = 0x000000; gfxbank_offset[1] = 0x400000; @@ -790,7 +792,7 @@ if (LOG_DMA) /* signal we're done */ skipdma: - timer_set(attotime::from_nsec(41 * pixels), TIMER_DMA); + m_dma_timer->adjust(attotime::from_nsec(41 * pixels)); g_profiler.stop(); } diff --git a/src/mame/video/midyunit.cpp b/src/mame/video/midyunit.cpp index 62e954bcb6c..5c409dab39e 100644 --- a/src/mame/video/midyunit.cpp +++ b/src/mame/video/midyunit.cpp @@ -48,6 +48,9 @@ VIDEO_START_MEMBER(midyunit_state,common) machine().device<nvram_device>("nvram")->set_base(m_cmos_ram.get(), 0x2000 * 4); + m_dma_timer = timer_alloc(TIMER_DMA); + m_autoerase_line_timer = timer_alloc(TIMER_AUTOERASE_LINE); + /* reset all the globals */ m_cmos_page = 0; m_autoerase_enable = 0; @@ -530,7 +533,7 @@ if (LOG_DMA) } /* signal we're done */ - timer_set(attotime::from_nsec(41 * dma_state.width * dma_state.height), TIMER_DMA); + m_dma_timer->adjust(attotime::from_nsec(41 * dma_state.width * dma_state.height)); g_profiler.stop(); } @@ -569,5 +572,5 @@ TMS340X0_SCANLINE_IND16_CB_MEMBER(midyunit_state::scanline_update) /* if this is the last update of the screen, set a timer to clear out the final line */ /* (since we update one behind) */ if (scanline == screen.visible_area().max_y) - timer_set(screen.time_until_pos(scanline + 1), midyunit_state::TIMER_AUTOERASE_LINE, params->rowaddr); + m_autoerase_line_timer->adjust(screen.time_until_pos(scanline + 1), params->rowaddr); } diff --git a/src/mame/video/segas32.cpp b/src/mame/video/segas32.cpp index 5bad6d3ecde..ca9e7b8e252 100644 --- a/src/mame/video/segas32.cpp +++ b/src/mame/video/segas32.cpp @@ -213,6 +213,9 @@ void segas32_state::common_start(int multi32) if(!m_gfxdecode->started()) throw device_missing_dependencies(); + m_vblank_end_int_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(segas32_state::end_of_vblank_int), this)); + m_update_sprites_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(segas32_state::update_sprites), this)); + int tmap; /* remember whether or not we are multi32 */ @@ -296,7 +299,7 @@ void segas32_state::system32_set_vblank(int state) { /* at the end of VBLANK is when automatic sprite rendering happens */ if (!state) - machine().scheduler().timer_set(attotime::from_usec(50), timer_expired_delegate(FUNC(segas32_state::update_sprites),this), 1); + m_update_sprites_timer->adjust(attotime::from_usec(50), 1); } diff --git a/src/mame/video/triplhnt.cpp b/src/mame/video/triplhnt.cpp index b4d2be82e17..79d8863f6e1 100644 --- a/src/mame/video/triplhnt.cpp +++ b/src/mame/video/triplhnt.cpp @@ -23,6 +23,16 @@ void triplhnt_state::video_start() m_screen->register_screen_bitmap(m_helper); m_bg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(triplhnt_state::get_tile_info),this), TILEMAP_SCAN_ROWS, 16, 16, 16, 16); + + m_hit_timer = timer_alloc(TIMER_HIT); + + save_item(NAME(m_cmos)); + save_item(NAME(m_da_latch)); + save_item(NAME(m_misc_flags)); + save_item(NAME(m_cmos_latch)); + save_item(NAME(m_hit_code)); + save_item(NAME(m_sprite_zoom)); + save_item(NAME(m_sprite_bank)); } @@ -31,7 +41,7 @@ void triplhnt_state::device_timer(emu_timer &timer, device_timer_id id, int para switch (id) { case TIMER_HIT: - triplhnt_set_collision(param); + set_collision(param); break; default: assert_always(false, "Unknown id in triplhnt_state::device_timer"); @@ -41,12 +51,10 @@ void triplhnt_state::device_timer(emu_timer &timer, device_timer_id id, int para void triplhnt_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect) { - int i; - int hit_line = 999; int hit_code = 999; - for (i = 0; i < 16; i++) + for (int i = 0; i < 16; i++) { rectangle rect; @@ -107,11 +115,11 @@ void triplhnt_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprec } if (hit_line != 999 && hit_code != 999) - timer_set(m_screen->time_until_pos(hit_line), TIMER_HIT, hit_code); + m_hit_timer->adjust(m_screen->time_until_pos(hit_line), hit_code); } -uint32_t triplhnt_state::screen_update_triplhnt(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +uint32_t triplhnt_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { m_bg_tilemap->mark_all_dirty(); diff --git a/src/mame/video/tubep.cpp b/src/mame/video/tubep.cpp index 5c405588957..63fb519ab92 100644 --- a/src/mame/video/tubep.cpp +++ b/src/mame/video/tubep.cpp @@ -338,10 +338,12 @@ PALETTE_INIT_MEMBER(tubep_state,tubep) } -VIDEO_START_MEMBER(tubep_state,tubep) +void tubep_state::video_start() { m_spritemap = std::make_unique<uint8_t[]>(256*256*2); + m_sprite_timer = timer_alloc(TIMER_SPRITE); + /* Set up save state */ save_item(NAME(m_romD_addr)); save_item(NAME(m_romEF_addr)); @@ -367,7 +369,7 @@ VIDEO_START_MEMBER(tubep_state,tubep) } -VIDEO_RESET_MEMBER(tubep_state,tubep) +void tubep_state::video_reset() { memset(m_spritemap.get(),0,256*256*2); @@ -553,7 +555,7 @@ WRITE8_MEMBER(tubep_state::tubep_sprite_control_w) m_mcu->set_input_line(0, CLEAR_LINE); /* 2.assert /SINT again after this time */ - timer_set( attotime::from_hz(19968000/8) * ((m_XSize+1)*(m_YSize+1)), TIMER_SPRITE); + m_sprite_timer->adjust(attotime::from_hz(19968000/8) * ((m_XSize+1)*(m_YSize+1))); /* 3.clear of /SINT starts sprite drawing circuit */ draw_sprite(); diff --git a/src/mame/video/victory.cpp b/src/mame/video/victory.cpp index de0b82ff60e..b9680cf13b6 100644 --- a/src/mame/video/victory.cpp +++ b/src/mame/video/victory.cpp @@ -48,6 +48,7 @@ void victory_state::video_start() m_video_control = 0; memset(&m_micro, 0, sizeof(m_micro)); m_micro.timer = machine().scheduler().timer_alloc(timer_expired_delegate()); + m_bgcoll_irq_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(victory_state::bgcoll_irq_callback), this)); /* register for state saving */ save_item(NAME(m_paletteram)); @@ -1117,7 +1118,7 @@ uint32_t victory_state::screen_update(screen_device &screen, bitmap_ind16 &bitma int bpix = bg[(x + m_scrollx) & 255]; scanline[x] = bpix | (fpix << 3); if (fpix && (bpix & bgcollmask) && count++ < 128) - machine().scheduler().timer_set(screen.time_until_pos(y, x), timer_expired_delegate(FUNC(victory_state::bgcoll_irq_callback),this), x | (y << 8)); + m_bgcoll_irq_timer->adjust(screen.time_until_pos(y, x), x | (y << 8)); } } |