Previous 199869 Revisions Next

r32652 Saturday 11th October, 2014 at 13:49:13 UTC by Wilbert Pol
(MESS) msx.c: machine_start/machine_reset cleanup (nw)
[src/mess/drivers]msx.c
[src/mess/includes]msx.h
[src/mess/machine]msx.c

trunk/src/mess/drivers/msx.c
r32651r32652
13321332   MCFG_CPU_VBLANK_INT_DRIVER("screen", msx_state,  msx_interrupt) /* Needed for mouse updates */
13331333   MCFG_QUANTUM_TIME(attotime::from_hz(60))
13341334
1335   MCFG_MACHINE_START_OVERRIDE(msx_state, msx )
1336   MCFG_MACHINE_RESET_OVERRIDE(msx_state, msx )
1337
13381335   MCFG_DEVICE_ADD("ppi8255", I8255, 0)
13391336   MCFG_I8255_OUT_PORTA_CB(WRITE8(msx_state, msx_ppi_port_a_w))
13401337   MCFG_I8255_IN_PORTB_CB(READ8(msx_state, msx_ppi_port_b_r))
r32651r32652
14111408   MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", msx_state, msx2_interrupt, "screen", 0, 2)
14121409   MCFG_QUANTUM_TIME(attotime::from_hz(60))
14131410
1414   MCFG_MACHINE_START_OVERRIDE(msx_state, msx2 )
1415   MCFG_MACHINE_RESET_OVERRIDE(msx_state, msx2 )
1416
14171411   MCFG_DEVICE_ADD("ppi8255", I8255, 0)
14181412   MCFG_I8255_OUT_PORTA_CB(WRITE8(msx_state, msx_ppi_port_a_w))
14191413   MCFG_I8255_IN_PORTB_CB(READ8(msx_state, msx_ppi_port_b_r))
r32651r32652
14791473   MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", msx_state, msx2p_interrupt, "screen", 0, 2)
14801474   MCFG_QUANTUM_TIME(attotime::from_hz(60))
14811475
1482   MCFG_MACHINE_START_OVERRIDE(msx_state, msx2 )
1483   MCFG_MACHINE_RESET_OVERRIDE(msx_state, msx2 )
1484
14851476   MCFG_DEVICE_ADD("ppi8255", I8255, 0)
14861477   MCFG_I8255_OUT_PORTA_CB(WRITE8(msx_state, msx_ppi_port_a_w))
14871478   MCFG_I8255_IN_PORTB_CB(READ8(msx_state, msx_ppi_port_b_r))
trunk/src/mess/machine/msx.c
r32651r32652
4141}
4242
4343
44void msx_state::msx_ch_reset_core ()
44void msx_state::machine_reset()
4545{
4646   msx_memory_reset ();
4747   msx_memory_map_all ();
r32651r32652
5252   check_irq();
5353}
5454
55MACHINE_START_MEMBER(msx_state,msx)
56{
57   MACHINE_START_CALL_MEMBER( msx2 );
58}
5955
60MACHINE_START_MEMBER(msx_state,msx2)
56void msx_state::machine_start()
6157{
6258   m_port_c_old = 0xff;
6359}
6460
65MACHINE_RESET_MEMBER(msx_state,msx)
66{
67   msx_ch_reset_core ();
68}
6961
70MACHINE_RESET_MEMBER(msx_state,msx2)
71{
72   msx_ch_reset_core ();
73}
74
75
7662static const UINT8 cc_op[0x100] = {
7763   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,
7864   8+1,10+1, 7+1, 6+1, 4+1, 4+1, 7+1, 4+1,12+1,11+1, 7+1, 6+1, 4+1, 4+1, 7+1, 4+1,
trunk/src/mess/includes/msx.h
r32651r32652
168168   // static configuration helpers
169169   static void install_slot_pages(device_t &owner, UINT8 prim, UINT8 sec, UINT8 page, UINT8 numpages, device_t *device);
170170
171   virtual void machine_start();
172   virtual void machine_reset();
173
171174   DECLARE_ADDRESS_MAP(switched_device_map, 8);
172175   DECLARE_WRITE8_MEMBER(msx_sec_slot_w);
173176   DECLARE_READ8_MEMBER(msx_sec_slot_r);
r32651r32652
187190
188191   void msx_memory_map_all();
189192   void msx_memory_map_page(UINT8 page);
190   void msx_ch_reset_core();
191193   void msx_memory_reset();
192194
193195   DECLARE_FLOPPY_FORMATS(floppy_formats);
r32651r32652
197199   DECLARE_WRITE8_MEMBER(msx_psg_port_a_w);
198200   DECLARE_WRITE8_MEMBER(msx_psg_port_b_w);
199201   DECLARE_DRIVER_INIT(msx);
200   DECLARE_MACHINE_START(msx);
201   DECLARE_MACHINE_RESET(msx);
202   DECLARE_MACHINE_START(msx2);
203   DECLARE_MACHINE_RESET(msx2);
204202   INTERRUPT_GEN_MEMBER(msx_interrupt);
205203   TIMER_DEVICE_CALLBACK_MEMBER(msx2_interrupt);
206204   TIMER_DEVICE_CALLBACK_MEMBER(msx2p_interrupt);

Previous 199869 Revisions Next


© 1997-2024 The MAME Team