diff options
Diffstat (limited to 'src/mame/drivers/mastboy.c')
-rw-r--r-- | src/mame/drivers/mastboy.c | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/src/mame/drivers/mastboy.c b/src/mame/drivers/mastboy.c index c4a0e390e6c..747b4c0dcd7 100644 --- a/src/mame/drivers/mastboy.c +++ b/src/mame/drivers/mastboy.c @@ -476,15 +476,16 @@ public: DECLARE_READ8_MEMBER(mastboy_nmi_read); DECLARE_WRITE8_MEMBER(mastboy_msm5205_reset_w); DECLARE_DRIVER_INIT(mastboy); + virtual void machine_reset(); + virtual void video_start(); }; /* VIDEO EMULATION */ -static VIDEO_START(mastboy) +void mastboy_state::video_start() { - mastboy_state *state = machine.driver_data<mastboy_state>(); - machine.gfx[0]->set_source(state->m_vram); + machine().gfx[0]->set_source(m_vram); } static SCREEN_UPDATE_IND16(mastboy) @@ -868,18 +869,17 @@ GFXDECODE_END /* Machine Functions / Driver */ -static MACHINE_RESET( mastboy ) +void mastboy_state::machine_reset() { - mastboy_state *state = machine.driver_data<mastboy_state>(); /* clear some ram */ - memset( state->m_workram, 0x00, 0x01000); - memset( state->m_tileram, 0x00, 0x01000); - memset( state->m_colram, 0x00, 0x00200); - memset( state->m_vram, 0x00, 0x10000); - - state->m_m5205_part = 0; - msm5205_reset_w(machine.device("msm"),1); - state->m_irq0_ack = 0; + memset( m_workram, 0x00, 0x01000); + memset( m_tileram, 0x00, 0x01000); + memset( m_colram, 0x00, 0x00200); + memset( m_vram, 0x00, 0x10000); + + m_m5205_part = 0; + msm5205_reset_w(machine().device("msm"),1); + m_irq0_ack = 0; } @@ -892,7 +892,6 @@ static MACHINE_CONFIG_START( mastboy, mastboy_state ) MCFG_NVRAM_ADD_1FILL("nvram") - MCFG_MACHINE_RESET( mastboy ) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -905,7 +904,6 @@ static MACHINE_CONFIG_START( mastboy, mastboy_state ) MCFG_GFXDECODE(mastboy) MCFG_PALETTE_LENGTH(0x100) - MCFG_VIDEO_START(mastboy) // sound hardware MCFG_SPEAKER_STANDARD_MONO("mono") |