From 92f61919c1c629e7ea4ffca0d33a8d999b8c23e2 Mon Sep 17 00:00:00 2001 From: Wilbert Pol Date: Sat, 11 Oct 2014 13:49:13 +0000 Subject: [PATCH] (MESS) msx.c: machine_start/machine_reset cleanup (nw) --- src/mess/drivers/msx.c | 9 --------- src/mess/includes/msx.h | 8 +++----- src/mess/machine/msx.c | 18 ++---------------- 3 files changed, 5 insertions(+), 30 deletions(-) diff --git a/src/mess/drivers/msx.c b/src/mess/drivers/msx.c index eacda3a2bc8..3e74edb45ec 100644 --- a/src/mess/drivers/msx.c +++ b/src/mess/drivers/msx.c @@ -1332,9 +1332,6 @@ static MACHINE_CONFIG_START( msx, msx_state ) MCFG_CPU_VBLANK_INT_DRIVER("screen", msx_state, msx_interrupt) /* Needed for mouse updates */ MCFG_QUANTUM_TIME(attotime::from_hz(60)) - MCFG_MACHINE_START_OVERRIDE(msx_state, msx ) - MCFG_MACHINE_RESET_OVERRIDE(msx_state, msx ) - MCFG_DEVICE_ADD("ppi8255", I8255, 0) MCFG_I8255_OUT_PORTA_CB(WRITE8(msx_state, msx_ppi_port_a_w)) MCFG_I8255_IN_PORTB_CB(READ8(msx_state, msx_ppi_port_b_r)) @@ -1411,9 +1408,6 @@ static MACHINE_CONFIG_START( msx2, msx_state ) MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", msx_state, msx2_interrupt, "screen", 0, 2) MCFG_QUANTUM_TIME(attotime::from_hz(60)) - MCFG_MACHINE_START_OVERRIDE(msx_state, msx2 ) - MCFG_MACHINE_RESET_OVERRIDE(msx_state, msx2 ) - MCFG_DEVICE_ADD("ppi8255", I8255, 0) MCFG_I8255_OUT_PORTA_CB(WRITE8(msx_state, msx_ppi_port_a_w)) MCFG_I8255_IN_PORTB_CB(READ8(msx_state, msx_ppi_port_b_r)) @@ -1479,9 +1473,6 @@ static MACHINE_CONFIG_START( msx2p, msx_state ) MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", msx_state, msx2p_interrupt, "screen", 0, 2) MCFG_QUANTUM_TIME(attotime::from_hz(60)) - MCFG_MACHINE_START_OVERRIDE(msx_state, msx2 ) - MCFG_MACHINE_RESET_OVERRIDE(msx_state, msx2 ) - MCFG_DEVICE_ADD("ppi8255", I8255, 0) MCFG_I8255_OUT_PORTA_CB(WRITE8(msx_state, msx_ppi_port_a_w)) MCFG_I8255_IN_PORTB_CB(READ8(msx_state, msx_ppi_port_b_r)) diff --git a/src/mess/includes/msx.h b/src/mess/includes/msx.h index 7b6a5d8f6e3..b84ea7d40b3 100644 --- a/src/mess/includes/msx.h +++ b/src/mess/includes/msx.h @@ -168,6 +168,9 @@ public: // static configuration helpers static void install_slot_pages(device_t &owner, UINT8 prim, UINT8 sec, UINT8 page, UINT8 numpages, device_t *device); + virtual void machine_start(); + virtual void machine_reset(); + DECLARE_ADDRESS_MAP(switched_device_map, 8); DECLARE_WRITE8_MEMBER(msx_sec_slot_w); DECLARE_READ8_MEMBER(msx_sec_slot_r); @@ -187,7 +190,6 @@ public: void msx_memory_map_all(); void msx_memory_map_page(UINT8 page); - void msx_ch_reset_core(); void msx_memory_reset(); DECLARE_FLOPPY_FORMATS(floppy_formats); @@ -197,10 +199,6 @@ public: DECLARE_WRITE8_MEMBER(msx_psg_port_a_w); DECLARE_WRITE8_MEMBER(msx_psg_port_b_w); DECLARE_DRIVER_INIT(msx); - DECLARE_MACHINE_START(msx); - DECLARE_MACHINE_RESET(msx); - DECLARE_MACHINE_START(msx2); - DECLARE_MACHINE_RESET(msx2); INTERRUPT_GEN_MEMBER(msx_interrupt); TIMER_DEVICE_CALLBACK_MEMBER(msx2_interrupt); TIMER_DEVICE_CALLBACK_MEMBER(msx2p_interrupt); diff --git a/src/mess/machine/msx.c b/src/mess/machine/msx.c index cd7fc3e54f4..88f808e3202 100644 --- a/src/mess/machine/msx.c +++ b/src/mess/machine/msx.c @@ -41,7 +41,7 @@ void msx_state::check_irq() } -void msx_state::msx_ch_reset_core () +void msx_state::machine_reset() { msx_memory_reset (); msx_memory_map_all (); @@ -52,26 +52,12 @@ void msx_state::msx_ch_reset_core () check_irq(); } -MACHINE_START_MEMBER(msx_state,msx) -{ - MACHINE_START_CALL_MEMBER( msx2 ); -} -MACHINE_START_MEMBER(msx_state,msx2) +void msx_state::machine_start() { m_port_c_old = 0xff; } -MACHINE_RESET_MEMBER(msx_state,msx) -{ - msx_ch_reset_core (); -} - -MACHINE_RESET_MEMBER(msx_state,msx2) -{ - msx_ch_reset_core (); -} - static const UINT8 cc_op[0x100] = { 4+1,10+1, 7+1, 6+1, 4+1, 4+1, 7+1, 4+1, 4+1,11+1, 7+1, 6+1, 4+1, 4+1, 7+1, 4+1,