mirror of
https://github.com/holub/mame
synced 2025-04-26 10:13:37 +03:00
some timer_set removal (nw)
This commit is contained in:
parent
536990e77b
commit
4d69550c26
@ -156,6 +156,7 @@ INPUT_CHANGED_MEMBER(segag80r_state::service_switch)
|
|||||||
|
|
||||||
void segag80r_state::machine_start()
|
void segag80r_state::machine_start()
|
||||||
{
|
{
|
||||||
|
m_vblank_latch_clear_timer = timer_alloc(TIMER_VBLANK_LATCH_CLEAR);
|
||||||
/* register for save states */
|
/* register for save states */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,6 +48,8 @@ public:
|
|||||||
uint8_t m_firq_select;
|
uint8_t m_firq_select;
|
||||||
uint8_t m_palettebank_io;
|
uint8_t m_palettebank_io;
|
||||||
uint8_t m_palettebank_vis;
|
uint8_t m_palettebank_vis;
|
||||||
|
emu_timer *m_beam_firq_timer;
|
||||||
|
emu_timer *m_collide_firq_timer;
|
||||||
DECLARE_WRITE8_MEMBER(bankram_w);
|
DECLARE_WRITE8_MEMBER(bankram_w);
|
||||||
DECLARE_READ8_MEMBER(exidy440_input_port_3_r);
|
DECLARE_READ8_MEMBER(exidy440_input_port_3_r);
|
||||||
DECLARE_READ8_MEMBER(sound_command_ack_r);
|
DECLARE_READ8_MEMBER(sound_command_ack_r);
|
||||||
|
@ -158,6 +158,7 @@ public:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
|
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
|
||||||
|
emu_timer *m_vblank_latch_clear_timer;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -50,6 +50,9 @@ VIDEO_START_MEMBER(exidy440_state,exidy440)
|
|||||||
/* allocate a buffer for palette RAM */
|
/* allocate a buffer for palette RAM */
|
||||||
m_local_paletteram = std::make_unique<uint8_t[]>(512 * 2);
|
m_local_paletteram = std::make_unique<uint8_t[]>(512 * 2);
|
||||||
memset(m_local_paletteram.get(), 0, 512 * 2);
|
memset(m_local_paletteram.get(), 0, 512 * 2);
|
||||||
|
|
||||||
|
m_collide_firq_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(exidy440_state::collide_firq_callback), this));
|
||||||
|
m_beam_firq_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(exidy440_state::beam_firq_callback), this));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -349,7 +352,7 @@ void exidy440_state::draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, c
|
|||||||
|
|
||||||
/* check the collisions bit */
|
/* check the collisions bit */
|
||||||
if (check_collision && (palette[2 * pen] & 0x80) && (count++ < 128))
|
if (check_collision && (palette[2 * pen] & 0x80) && (count++ < 128))
|
||||||
screen.machine().scheduler().timer_set(screen.time_until_pos(yoffs, currx), timer_expired_delegate(FUNC(exidy440_state::collide_firq_callback), this), currx);
|
m_collide_firq_timer->adjust(screen.time_until_pos(yoffs, currx), currx);
|
||||||
}
|
}
|
||||||
currx++;
|
currx++;
|
||||||
|
|
||||||
@ -362,7 +365,7 @@ void exidy440_state::draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, c
|
|||||||
|
|
||||||
/* check the collisions bit */
|
/* check the collisions bit */
|
||||||
if (check_collision && (palette[2 * pen] & 0x80) && (count++ < 128))
|
if (check_collision && (palette[2 * pen] & 0x80) && (count++ < 128))
|
||||||
screen.machine().scheduler().timer_set(screen.time_until_pos(yoffs, currx), timer_expired_delegate(FUNC(exidy440_state::collide_firq_callback), this), currx);
|
m_collide_firq_timer->adjust(screen.time_until_pos(yoffs, currx), currx);
|
||||||
}
|
}
|
||||||
currx++;
|
currx++;
|
||||||
}
|
}
|
||||||
@ -430,7 +433,7 @@ uint32_t exidy440_state::screen_update_exidy440(screen_device &screen, bitmap_in
|
|||||||
attotime time = screen.time_until_pos(beamy, beamx) - increment * 6;
|
attotime time = screen.time_until_pos(beamy, beamx) - increment * 6;
|
||||||
for (i = 0; i <= 12; i++)
|
for (i = 0; i <= 12; i++)
|
||||||
{
|
{
|
||||||
machine().scheduler().timer_set(time, timer_expired_delegate(FUNC(exidy440_state::beam_firq_callback),this), beamx);
|
m_beam_firq_timer->adjust(time, beamx);
|
||||||
time += increment;
|
time += increment;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -39,7 +39,7 @@ void segag80r_state::vblank_latch_set()
|
|||||||
/* set a timer to mimic the 555 timer that drives the EDGINT signal */
|
/* set a timer to mimic the 555 timer that drives the EDGINT signal */
|
||||||
/* the 555 is run in monostable mode with R=56000 and C=1000pF */
|
/* the 555 is run in monostable mode with R=56000 and C=1000pF */
|
||||||
m_vblank_latch = 1;
|
m_vblank_latch = 1;
|
||||||
timer_set(PERIOD_OF_555_MONOSTABLE(CAP_P(1000), RES_K(56)), TIMER_VBLANK_LATCH_CLEAR);
|
m_vblank_latch_clear_timer->adjust(PERIOD_OF_555_MONOSTABLE(CAP_P(1000), RES_K(56)));
|
||||||
|
|
||||||
/* latch the current flip state at the same time */
|
/* latch the current flip state at the same time */
|
||||||
m_video_flip = m_video_control & 1;
|
m_video_flip = m_video_control & 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user