Further removal of leftover code (nw)

This commit is contained in:
Ivan Vangelista 2014-09-25 18:53:57 +00:00
parent c74c1da136
commit 3902fdd717
7 changed files with 18 additions and 27 deletions

View File

@ -557,23 +557,23 @@ MACHINE_CONFIG_FRAGMENT( maze_audio )
MACHINE_CONFIG_END
void maze_write_discrete(discrete_device *device, UINT8 maze_tone_timing_state)
void mw8080bw_state::maze_write_discrete(UINT8 maze_tone_timing_state)
{
/* controls need to be active low */
int controls = ~device->machine().root_device().ioport("IN0")->read() & 0xff;
int controls = ~ioport("IN0")->read() & 0xff;
address_space &space = device->machine().driver_data()->generic_space();
device->write(space, MAZE_TONE_TIMING, maze_tone_timing_state);
device->write(space, MAZE_P1_DATA, controls & 0x0f);
device->write(space, MAZE_P2_DATA, (controls >> 4) & 0x0f);
device->write(space, MAZE_JOYSTICK_IN_USE, controls != 0xff);
address_space &space = machine().driver_data()->generic_space();
m_discrete->write(space, MAZE_TONE_TIMING, maze_tone_timing_state);
m_discrete->write(space, MAZE_P1_DATA, controls & 0x0f);
m_discrete->write(space, MAZE_P2_DATA, (controls >> 4) & 0x0f);
m_discrete->write(space, MAZE_JOYSTICK_IN_USE, controls != 0xff);
/* The coin line is connected directly to the discrete circuit. */
/* We can't really do that, so updating it with the tone timing is close enough. */
/* A better option might be to update it at vblank or set a timer to do it. */
/* The only noticeable difference doing it here, is that the controls don't */
/* immediately start making tones if pressed right after the coin is inserted. */
device->write(space, MAZE_COIN, (~device->machine().root_device().ioport("IN1")->read() >> 3) & 0x01);
m_discrete->write(space, MAZE_COIN, (~ioport("IN1")->read() >> 3) & 0x01);
}

View File

@ -863,14 +863,14 @@ MACHINE_CONFIG_END
void mw8080bw_state::maze_update_discrete()
{
maze_write_discrete(m_discrete, m_maze_tone_timing_state);
maze_write_discrete(m_maze_tone_timing_state);
}
TIMER_CALLBACK_MEMBER(mw8080bw_state::maze_tone_timing_timer_callback)
{
m_maze_tone_timing_state = !m_maze_tone_timing_state;
maze_write_discrete(m_discrete, m_maze_tone_timing_state);
maze_write_discrete(m_maze_tone_timing_state);
}

View File

@ -788,24 +788,23 @@ ROM_START( finalaprj )
ROM_LOAD("finalapr.nv", 0x000000, 0x2000, CRC(d51d65fe) SHA1(8a0a523cb6ba2880951e41ca04db23584f0a108c) )
ROM_END
static void namcofl_common_init(running_machine &machine)
void namcofl_state::common_init()
{
namcofl_state *state = machine.driver_data<namcofl_state>();
state->m_workram = auto_alloc_array(machine, UINT32, 0x100000/4);
m_workram = auto_alloc_array(machine(), UINT32, 0x100000/4);
state->membank("bank1")->set_base(state->memregion("maincpu")->base() );
state->membank("bank2")->set_base(state->m_workram );
membank("bank1")->set_base(memregion("maincpu")->base() );
membank("bank2")->set_base(m_workram );
}
DRIVER_INIT_MEMBER(namcofl_state,speedrcr)
{
namcofl_common_init(machine());
common_init();
m_gametype = NAMCOFL_SPEED_RACER;
}
DRIVER_INIT_MEMBER(namcofl_state,finalapr)
{
namcofl_common_init(machine());
common_init();
m_gametype = NAMCOFL_FINAL_LAP_R;
}

View File

@ -308,10 +308,6 @@ protected:
optional_device<palette_device> m_palette;
};
/* mpu4.c, used by mpu4vid.c */
extern void mpu4_config_common(running_machine &machine);
extern void mpu4_stepper_reset(mpu4_state *state);
MACHINE_CONFIG_EXTERN( mpu4_common );
MACHINE_CONFIG_EXTERN( mpu4_common2 );

View File

@ -187,6 +187,7 @@ public:
DECLARE_WRITE8_MEMBER(invad2ct_audio_3_w);
DECLARE_WRITE8_MEMBER(invad2ct_audio_4_w);
void maze_update_discrete();
void maze_write_discrete(UINT8 maze_tone_timing_state);
UINT8 vpos_to_vysnc_chain_counter( int vpos );
int vysnc_chain_counter_to_vpos( UINT8 counter, int vblank );
void mw8080bw_create_interrupt_timer( );
@ -244,10 +245,6 @@ MACHINE_CONFIG_EXTERN( mw8080bw_root );
MACHINE_CONFIG_EXTERN( invaders );
extern const char layout_invaders[];
UINT8 tornbase_get_cabinet_type(running_machine &machine);
int invaders_is_cabinet_cocktail(running_machine &machine);
/*----------- defined in audio/mw8080bw.c -----------*/
@ -260,7 +257,6 @@ MACHINE_CONFIG_EXTERN( tornbase_audio );
MACHINE_CONFIG_EXTERN( zzzap_audio );
MACHINE_CONFIG_EXTERN( maze_audio );
void maze_write_discrete(discrete_device *device, UINT8 maze_tone_timing_state);
MACHINE_CONFIG_EXTERN( boothill_audio );

View File

@ -281,6 +281,5 @@ extern UINT32 *rsp_imem;
extern UINT32 *rsp_dmem;
extern void dp_full_sync(running_machine &machine);
extern void signal_rcp_interrupt(running_machine &machine, int interrupt);
#endif

View File

@ -67,4 +67,5 @@ public:
TIMER_DEVICE_CALLBACK_MEMBER(mcu_irq0_cb);
TIMER_DEVICE_CALLBACK_MEMBER(mcu_irq2_cb);
TIMER_DEVICE_CALLBACK_MEMBER(mcu_adc_cb);
void common_init();
};