mirror of
https://github.com/holub/mame
synced 2025-06-07 13:23:50 +03:00
mappy.cpp: timer_set removal (nw)
This commit is contained in:
parent
c709bebef0
commit
8fe31f857d
@ -613,8 +613,11 @@ void mappy_state::device_timer(emu_timer &timer, device_timer_id id, int param,
|
||||
{
|
||||
switch (id)
|
||||
{
|
||||
case TIMER_IO_RUN:
|
||||
m_namcoio[param]->customio_run();
|
||||
case TIMER_IO0_RUN:
|
||||
m_namcoio[0]->customio_run();
|
||||
break;
|
||||
case TIMER_IO1_RUN:
|
||||
m_namcoio[1]->customio_run();
|
||||
break;
|
||||
default:
|
||||
assert_always(false, "Unknown id in mappy_state::device_timer");
|
||||
@ -630,10 +633,10 @@ WRITE_LINE_MEMBER(mappy_state::vblank_irq)
|
||||
m_maincpu->set_input_line(0, ASSERT_LINE);
|
||||
|
||||
if (!m_namcoio[0]->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_IO_RUN, 0);
|
||||
m_namcoio_run_timer[0]->adjust(attotime::from_usec(50));
|
||||
|
||||
if (!m_namcoio[1]->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_IO_RUN, 1);
|
||||
m_namcoio_run_timer[1]->adjust(attotime::from_usec(50));
|
||||
|
||||
if (m_sub_irq_mask)
|
||||
m_subcpu->set_input_line(0, ASSERT_LINE);
|
||||
@ -1312,6 +1315,9 @@ void mappy_state::machine_start()
|
||||
{
|
||||
m_leds.resolve();
|
||||
|
||||
m_namcoio_run_timer[0] = timer_alloc(TIMER_IO0_RUN);
|
||||
m_namcoio_run_timer[1] = timer_alloc(TIMER_IO1_RUN);
|
||||
|
||||
save_item(NAME(m_main_irq_mask));
|
||||
save_item(NAME(m_sub_irq_mask));
|
||||
save_item(NAME(m_sub2_irq_mask));
|
||||
|
@ -14,11 +14,6 @@
|
||||
class mappy_state : public driver_device
|
||||
{
|
||||
public:
|
||||
enum
|
||||
{
|
||||
TIMER_IO_RUN
|
||||
};
|
||||
|
||||
mappy_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_videoram(*this, "videoram"),
|
||||
@ -49,7 +44,17 @@ public:
|
||||
void init_grobda();
|
||||
void init_digdug2();
|
||||
|
||||
protected:
|
||||
virtual void machine_start() override;
|
||||
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
|
||||
|
||||
private:
|
||||
enum
|
||||
{
|
||||
TIMER_IO0_RUN,
|
||||
TIMER_IO1_RUN
|
||||
};
|
||||
|
||||
required_shared_ptr<uint8_t> m_videoram;
|
||||
required_shared_ptr<uint8_t> m_spriteram;
|
||||
|
||||
@ -73,6 +78,8 @@ private:
|
||||
uint8_t m_sub_irq_mask;
|
||||
uint8_t m_sub2_irq_mask;
|
||||
|
||||
emu_timer *m_namcoio_run_timer[2];
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER(int_on_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(int_on_2_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(int_on_3_w);
|
||||
@ -88,7 +95,7 @@ private:
|
||||
TILE_GET_INFO_MEMBER(superpac_get_tile_info);
|
||||
TILE_GET_INFO_MEMBER(phozon_get_tile_info);
|
||||
TILE_GET_INFO_MEMBER(mappy_get_tile_info);
|
||||
virtual void machine_start() override;
|
||||
|
||||
DECLARE_VIDEO_START(superpac);
|
||||
DECLARE_PALETTE_INIT(superpac);
|
||||
DECLARE_VIDEO_START(phozon);
|
||||
@ -109,8 +116,6 @@ private:
|
||||
void phozon_cpu3_map(address_map &map);
|
||||
void superpac_cpu1_map(address_map &map);
|
||||
void superpac_cpu2_map(address_map &map);
|
||||
protected:
|
||||
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
|
||||
};
|
||||
|
||||
#endif // MAME_INCLUDES_MAPPY_H
|
||||
|
Loading…
Reference in New Issue
Block a user