mirror of
https://github.com/holub/mame
synced 2025-10-06 17:08:28 +03:00
(MESS) msx.c: machine_start/machine_reset cleanup (nw)
This commit is contained in:
parent
e4d6a4e908
commit
92f61919c1
@ -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_CPU_VBLANK_INT_DRIVER("screen", msx_state, msx_interrupt) /* Needed for mouse updates */
|
||||||
MCFG_QUANTUM_TIME(attotime::from_hz(60))
|
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_DEVICE_ADD("ppi8255", I8255, 0)
|
||||||
MCFG_I8255_OUT_PORTA_CB(WRITE8(msx_state, msx_ppi_port_a_w))
|
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))
|
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_TIMER_DRIVER_ADD_SCANLINE("scantimer", msx_state, msx2_interrupt, "screen", 0, 2)
|
||||||
MCFG_QUANTUM_TIME(attotime::from_hz(60))
|
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_DEVICE_ADD("ppi8255", I8255, 0)
|
||||||
MCFG_I8255_OUT_PORTA_CB(WRITE8(msx_state, msx_ppi_port_a_w))
|
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))
|
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_TIMER_DRIVER_ADD_SCANLINE("scantimer", msx_state, msx2p_interrupt, "screen", 0, 2)
|
||||||
MCFG_QUANTUM_TIME(attotime::from_hz(60))
|
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_DEVICE_ADD("ppi8255", I8255, 0)
|
||||||
MCFG_I8255_OUT_PORTA_CB(WRITE8(msx_state, msx_ppi_port_a_w))
|
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))
|
MCFG_I8255_IN_PORTB_CB(READ8(msx_state, msx_ppi_port_b_r))
|
||||||
|
@ -168,6 +168,9 @@ public:
|
|||||||
// static configuration helpers
|
// static configuration helpers
|
||||||
static void install_slot_pages(device_t &owner, UINT8 prim, UINT8 sec, UINT8 page, UINT8 numpages, device_t *device);
|
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_ADDRESS_MAP(switched_device_map, 8);
|
||||||
DECLARE_WRITE8_MEMBER(msx_sec_slot_w);
|
DECLARE_WRITE8_MEMBER(msx_sec_slot_w);
|
||||||
DECLARE_READ8_MEMBER(msx_sec_slot_r);
|
DECLARE_READ8_MEMBER(msx_sec_slot_r);
|
||||||
@ -187,7 +190,6 @@ public:
|
|||||||
|
|
||||||
void msx_memory_map_all();
|
void msx_memory_map_all();
|
||||||
void msx_memory_map_page(UINT8 page);
|
void msx_memory_map_page(UINT8 page);
|
||||||
void msx_ch_reset_core();
|
|
||||||
void msx_memory_reset();
|
void msx_memory_reset();
|
||||||
|
|
||||||
DECLARE_FLOPPY_FORMATS(floppy_formats);
|
DECLARE_FLOPPY_FORMATS(floppy_formats);
|
||||||
@ -197,10 +199,6 @@ public:
|
|||||||
DECLARE_WRITE8_MEMBER(msx_psg_port_a_w);
|
DECLARE_WRITE8_MEMBER(msx_psg_port_a_w);
|
||||||
DECLARE_WRITE8_MEMBER(msx_psg_port_b_w);
|
DECLARE_WRITE8_MEMBER(msx_psg_port_b_w);
|
||||||
DECLARE_DRIVER_INIT(msx);
|
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);
|
INTERRUPT_GEN_MEMBER(msx_interrupt);
|
||||||
TIMER_DEVICE_CALLBACK_MEMBER(msx2_interrupt);
|
TIMER_DEVICE_CALLBACK_MEMBER(msx2_interrupt);
|
||||||
TIMER_DEVICE_CALLBACK_MEMBER(msx2p_interrupt);
|
TIMER_DEVICE_CALLBACK_MEMBER(msx2p_interrupt);
|
||||||
|
@ -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_reset ();
|
||||||
msx_memory_map_all ();
|
msx_memory_map_all ();
|
||||||
@ -52,26 +52,12 @@ void msx_state::msx_ch_reset_core ()
|
|||||||
check_irq();
|
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;
|
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] = {
|
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,
|
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,
|
||||||
|
Loading…
Reference in New Issue
Block a user