mirror of
https://github.com/holub/mame
synced 2025-04-24 01:11:11 +03:00
flyball.cpp, gaplus.cpp, gcpinbal.cpp: removed anonymous timers (nw)
This commit is contained in:
parent
50c6a15238
commit
7f63cfec02
@ -65,6 +65,7 @@ public:
|
||||
uint8_t m_potmask;
|
||||
uint8_t m_potsense;
|
||||
|
||||
emu_timer *m_pot_assert_timer[64];
|
||||
emu_timer *m_pot_clear_timer;
|
||||
emu_timer *m_quarter_timer;
|
||||
|
||||
@ -206,7 +207,7 @@ TIMER_CALLBACK_MEMBER(flyball_state::quarter_callback)
|
||||
|
||||
for (i = 0; i < 64; i++)
|
||||
if (potsense[i] != 0)
|
||||
timer_set(m_screen->time_until_pos(scanline + i), TIMER_POT_ASSERT, potsense[i]);
|
||||
m_pot_assert_timer[potsense[i]]->adjust(m_screen->time_until_pos(scanline + i), potsense[i]);
|
||||
|
||||
scanline += 0x40;
|
||||
scanline &= 0xff;
|
||||
@ -432,6 +433,8 @@ void flyball_state::machine_start()
|
||||
buf[i ^ 0x1ff] = ROM[i];
|
||||
memcpy(ROM, &buf[0], len);
|
||||
|
||||
for (int i = 0; i < 64; i++)
|
||||
m_pot_assert_timer[i] = timer_alloc(TIMER_POT_ASSERT);
|
||||
m_pot_clear_timer = timer_alloc(TIMER_POT_CLEAR);
|
||||
m_quarter_timer = timer_alloc(TIMER_QUARTER);
|
||||
|
||||
|
@ -214,25 +214,25 @@ void gaplus_state::device_timer(emu_timer &timer, device_timer_id id, int param,
|
||||
{
|
||||
switch (id)
|
||||
{
|
||||
case TIMER_NAMCOIO_RUN:
|
||||
namcoio_run(ptr, param);
|
||||
case TIMER_NAMCOIO0_RUN:
|
||||
namcoio0_run(ptr, param);
|
||||
break;
|
||||
case TIMER_NAMCOIO1_RUN:
|
||||
namcoio1_run(ptr, param);
|
||||
break;
|
||||
default:
|
||||
assert_always(false, "Unknown id in gaplus_state::device_timer");
|
||||
}
|
||||
}
|
||||
|
||||
TIMER_CALLBACK_MEMBER(gaplus_state::namcoio_run)
|
||||
TIMER_CALLBACK_MEMBER(gaplus_state::namcoio0_run)
|
||||
{
|
||||
switch (param)
|
||||
{
|
||||
case 0:
|
||||
m_namco58xx->customio_run();
|
||||
break;
|
||||
case 1:
|
||||
m_namco56xx->customio_run();
|
||||
break;
|
||||
}
|
||||
m_namco58xx->customio_run();
|
||||
}
|
||||
|
||||
TIMER_CALLBACK_MEMBER(gaplus_state::namcoio1_run)
|
||||
{
|
||||
m_namco56xx->customio_run();
|
||||
}
|
||||
|
||||
INTERRUPT_GEN_MEMBER(gaplus_state::vblank_main_irq)
|
||||
@ -241,10 +241,10 @@ INTERRUPT_GEN_MEMBER(gaplus_state::vblank_main_irq)
|
||||
m_maincpu->set_input_line(0, ASSERT_LINE);
|
||||
|
||||
if (!m_namco58xx->read_reset_line()) /* give the cpu a tiny bit of time to write the command before processing it */
|
||||
timer_set(attotime::from_usec(50), TIMER_NAMCOIO_RUN, 0);
|
||||
m_namcoio0_run_timer->adjust(attotime::from_usec(50));
|
||||
|
||||
if (!m_namco56xx->read_reset_line()) /* give the cpu a tiny bit of time to write the command before processing it */
|
||||
timer_set(attotime::from_usec(50), TIMER_NAMCOIO_RUN, 1);
|
||||
m_namcoio1_run_timer->adjust(attotime::from_usec(50));
|
||||
}
|
||||
|
||||
INTERRUPT_GEN_MEMBER(gaplus_state::gapluso_vblank_main_irq)
|
||||
@ -253,10 +253,10 @@ INTERRUPT_GEN_MEMBER(gaplus_state::gapluso_vblank_main_irq)
|
||||
m_maincpu->set_input_line(0, ASSERT_LINE);
|
||||
|
||||
if (!m_namco58xx->read_reset_line()) /* give the cpu a tiny bit of time to write the command before processing it */
|
||||
timer_set(attotime::from_usec(50), TIMER_NAMCOIO_RUN, 1);
|
||||
m_namcoio1_run_timer->adjust(attotime::from_usec(50));
|
||||
|
||||
if (!m_namco56xx->read_reset_line()) /* give the cpu a tiny bit of time to write the command before processing it */
|
||||
timer_set(attotime::from_usec(50), TIMER_NAMCOIO_RUN, 0);
|
||||
m_namcoio0_run_timer->adjust(attotime::from_usec(50));
|
||||
}
|
||||
|
||||
INTERRUPT_GEN_MEMBER(gaplus_state::vblank_sub_irq)
|
||||
@ -490,6 +490,9 @@ WRITE8_MEMBER(gaplus_state::out_lamps1)
|
||||
|
||||
void gaplus_state::machine_start()
|
||||
{
|
||||
m_namcoio0_run_timer = timer_alloc(TIMER_NAMCOIO0_RUN);
|
||||
m_namcoio1_run_timer = timer_alloc(TIMER_NAMCOIO1_RUN);
|
||||
|
||||
switch (m_type)
|
||||
{
|
||||
case GAME_GALAGA3:
|
||||
|
@ -112,7 +112,7 @@ INTERRUPT_GEN_MEMBER(gcpinbal_state::gcpinbal_interrupt)
|
||||
{
|
||||
/* Unsure of actual sequence */
|
||||
|
||||
timer_set(downcast<cpu_device *>(&device)->cycles_to_attotime(500), TIMER_GCPINBAL_INTERRUPT1);
|
||||
m_int1_timer->adjust(m_maincpu->cycles_to_attotime(500));
|
||||
device.execute().set_input_line(4, HOLD_LINE);
|
||||
}
|
||||
|
||||
@ -411,6 +411,8 @@ GFXDECODE_END
|
||||
|
||||
void gcpinbal_state::machine_start()
|
||||
{
|
||||
m_int1_timer = timer_alloc(TIMER_GCPINBAL_INTERRUPT1);
|
||||
|
||||
save_item(NAME(m_scrollx));
|
||||
save_item(NAME(m_scrolly));
|
||||
save_item(NAME(m_bg0_gfxset));
|
||||
|
@ -18,7 +18,8 @@ class gaplus_state : public driver_device
|
||||
public:
|
||||
enum
|
||||
{
|
||||
TIMER_NAMCOIO_RUN
|
||||
TIMER_NAMCOIO0_RUN,
|
||||
TIMER_NAMCOIO1_RUN
|
||||
};
|
||||
|
||||
enum
|
||||
@ -66,6 +67,8 @@ public:
|
||||
uint8_t m_main_irq_mask;
|
||||
uint8_t m_sub_irq_mask;
|
||||
uint8_t m_sub2_irq_mask;
|
||||
emu_timer *m_namcoio0_run_timer;
|
||||
emu_timer *m_namcoio1_run_timer;
|
||||
|
||||
DECLARE_WRITE8_MEMBER(irq_1_ctrl_w);
|
||||
DECLARE_WRITE8_MEMBER(irq_2_ctrl_w);
|
||||
@ -94,7 +97,8 @@ public:
|
||||
INTERRUPT_GEN_MEMBER(gapluso_vblank_main_irq);
|
||||
INTERRUPT_GEN_MEMBER(vblank_sub_irq);
|
||||
INTERRUPT_GEN_MEMBER(vblank_sub2_irq);
|
||||
TIMER_CALLBACK_MEMBER(namcoio_run);
|
||||
TIMER_CALLBACK_MEMBER(namcoio0_run);
|
||||
TIMER_CALLBACK_MEMBER(namcoio1_run);
|
||||
|
||||
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
DECLARE_WRITE_LINE_MEMBER(screen_vblank);
|
||||
|
@ -45,6 +45,8 @@ public:
|
||||
required_device<gfxdecode_device> m_gfxdecode;
|
||||
required_device<palette_device> m_palette;
|
||||
|
||||
emu_timer *m_int1_timer;
|
||||
|
||||
/* video-related */
|
||||
tilemap_t *m_tilemap[3];
|
||||
uint16_t m_scrollx[3];
|
||||
|
Loading…
Reference in New Issue
Block a user