mirror of
https://github.com/holub/mame
synced 2025-07-01 08:18:59 +03:00
model2.cpp: Use required_device_array for timers (nw)
This commit is contained in:
parent
1092f2009b
commit
250ffdd580
@ -267,10 +267,6 @@ MACHINE_RESET_MEMBER( model2_state, model2_common )
|
|||||||
|
|
||||||
m_timerrun[0] = m_timerrun[1] = m_timerrun[2] = m_timerrun[3] = 0;
|
m_timerrun[0] = m_timerrun[1] = m_timerrun[2] = m_timerrun[3] = 0;
|
||||||
|
|
||||||
m_timers[0] = machine().device<timer_device>("timer0");
|
|
||||||
m_timers[1] = machine().device<timer_device>("timer1");
|
|
||||||
m_timers[2] = machine().device<timer_device>("timer2");
|
|
||||||
m_timers[3] = machine().device<timer_device>("timer3");
|
|
||||||
for (i=0; i<4; i++)
|
for (i=0; i<4; i++)
|
||||||
m_timers[i]->reset();
|
m_timers[i]->reset();
|
||||||
|
|
||||||
|
@ -46,6 +46,7 @@ public:
|
|||||||
m_screen(*this, "screen"),
|
m_screen(*this, "screen"),
|
||||||
m_palette(*this, "palette"),
|
m_palette(*this, "palette"),
|
||||||
m_scsp(*this, "scsp"),
|
m_scsp(*this, "scsp"),
|
||||||
|
m_timers(*this, "timer%u", 0U),
|
||||||
m_cryptdevice(*this, "315_5881"),
|
m_cryptdevice(*this, "315_5881"),
|
||||||
m_0229crypt(*this, "317_0229"),
|
m_0229crypt(*this, "317_0229"),
|
||||||
m_copro_data(*this, "copro_data"),
|
m_copro_data(*this, "copro_data"),
|
||||||
@ -102,6 +103,7 @@ protected:
|
|||||||
required_device<screen_device> m_screen;
|
required_device<screen_device> m_screen;
|
||||||
required_device<palette_device> m_palette;
|
required_device<palette_device> m_palette;
|
||||||
optional_device<scsp_device> m_scsp;
|
optional_device<scsp_device> m_scsp;
|
||||||
|
required_device_array<timer_device, 4> m_timers;
|
||||||
optional_device<sega_315_5881_crypt_device> m_cryptdevice;
|
optional_device<sega_315_5881_crypt_device> m_cryptdevice;
|
||||||
optional_device<sega_315_5838_comp_device> m_0229crypt;
|
optional_device<sega_315_5838_comp_device> m_0229crypt;
|
||||||
optional_memory_region m_copro_data;
|
optional_memory_region m_copro_data;
|
||||||
@ -113,7 +115,6 @@ protected:
|
|||||||
uint32_t m_timervals[4];
|
uint32_t m_timervals[4];
|
||||||
uint32_t m_timerorig[4];
|
uint32_t m_timerorig[4];
|
||||||
int m_timerrun[4];
|
int m_timerrun[4];
|
||||||
timer_device *m_timers[4];
|
|
||||||
int m_ctrlmode;
|
int m_ctrlmode;
|
||||||
uint16_t m_cmd_data;
|
uint16_t m_cmd_data;
|
||||||
uint8_t m_driveio_comm_data;
|
uint8_t m_driveio_comm_data;
|
||||||
|
Loading…
Reference in New Issue
Block a user