mirror of
https://github.com/holub/mame
synced 2025-04-23 00:39:36 +03:00
get rid of machine start/reset overrides
This commit is contained in:
parent
268f7242dd
commit
cdbb940930
@ -112,7 +112,7 @@ WRITE8_MEMBER(champbas_state::irq_enable_w)
|
||||
m_maincpu->set_input_line(0, CLEAR_LINE);
|
||||
}
|
||||
|
||||
TIMER_CALLBACK_MEMBER(champbas_state::exctsccr_fm_callback)
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(champbas_state::exctsccr_sound_irq)
|
||||
{
|
||||
m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff);
|
||||
}
|
||||
@ -547,26 +547,25 @@ GFXDECODE_END
|
||||
*
|
||||
*************************************/
|
||||
|
||||
MACHINE_START_MEMBER(champbas_state,champbas)
|
||||
void champbas_state::machine_start()
|
||||
{
|
||||
// zerofill
|
||||
m_irq_mask = 0;
|
||||
m_palette_bank = 0;
|
||||
m_gfx_bank = 0;
|
||||
|
||||
// register for savestates
|
||||
save_item(NAME(m_irq_mask));
|
||||
save_item(NAME(m_palette_bank));
|
||||
save_item(NAME(m_gfx_bank));
|
||||
}
|
||||
|
||||
MACHINE_START_MEMBER(champbas_state,exctsccr)
|
||||
{
|
||||
// FIXME
|
||||
// I dun wanna
|
||||
machine().scheduler().timer_pulse(attotime::from_hz(75), timer_expired_delegate(FUNC(champbas_state::exctsccr_fm_callback),this)); /* updates fm */
|
||||
|
||||
MACHINE_START_CALL_MEMBER(champbas);
|
||||
}
|
||||
|
||||
|
||||
MACHINE_RESET_MEMBER(champbas_state,champbas)
|
||||
void champbas_state::machine_reset()
|
||||
{
|
||||
// 74LS259 is auto CLR on reset
|
||||
m_irq_mask = 0;
|
||||
m_palette_bank = 0;
|
||||
m_gfx_bank = 0; // talbot has only 1 bank
|
||||
m_gfx_bank = 0;
|
||||
}
|
||||
|
||||
INTERRUPT_GEN_MEMBER(champbas_state::vblank_irq)
|
||||
@ -588,9 +587,6 @@ static MACHINE_CONFIG_START( talbot, champbas_state )
|
||||
|
||||
MCFG_WATCHDOG_VBLANK_INIT(0x10)
|
||||
|
||||
MCFG_MACHINE_START_OVERRIDE(champbas_state,champbas)
|
||||
MCFG_MACHINE_RESET_OVERRIDE(champbas_state,champbas)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
MCFG_SCREEN_REFRESH_RATE(60)
|
||||
@ -624,9 +620,6 @@ static MACHINE_CONFIG_START( champbas, champbas_state )
|
||||
|
||||
MCFG_WATCHDOG_VBLANK_INIT(0x10)
|
||||
|
||||
MCFG_MACHINE_START_OVERRIDE(champbas_state,champbas)
|
||||
MCFG_MACHINE_RESET_OVERRIDE(champbas_state,champbas)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
MCFG_SCREEN_REFRESH_RATE(60)
|
||||
@ -675,7 +668,10 @@ static MACHINE_CONFIG_START( exctsccr, champbas_state )
|
||||
MCFG_CPU_ADD("audiocpu", Z80, XTAL_14_31818MHz/4 )
|
||||
MCFG_CPU_PROGRAM_MAP(exctsccr_sub_map)
|
||||
MCFG_CPU_IO_MAP(exctsccr_sound_io_map)
|
||||
MCFG_CPU_PERIODIC_INT_DRIVER(champbas_state, nmi_line_pulse, 4000) /* 4 kHz, updates the dac */
|
||||
MCFG_CPU_PERIODIC_INT_DRIVER(champbas_state, nmi_line_pulse, 4000) // 4 kHz, updates the dac
|
||||
|
||||
MCFG_TIMER_DRIVER_ADD_PERIODIC("exc_snd_irq", champbas_state, exctsccr_sound_irq, attotime::from_hz(75)) // irq source unknown, determines music tempo
|
||||
MCFG_TIMER_START_DELAY(attotime::from_hz(75))
|
||||
|
||||
/* MCU */
|
||||
MCFG_CPU_ADD("mcu", ALPHA8301L, XTAL_18_432MHz/6/8) /* Actually 8302 */
|
||||
@ -683,9 +679,6 @@ static MACHINE_CONFIG_START( exctsccr, champbas_state )
|
||||
|
||||
MCFG_WATCHDOG_VBLANK_INIT(0x10)
|
||||
|
||||
MCFG_MACHINE_START_OVERRIDE(champbas_state,exctsccr)
|
||||
MCFG_MACHINE_RESET_OVERRIDE(champbas_state,champbas)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
MCFG_SCREEN_REFRESH_RATE(60.54)
|
||||
@ -736,9 +729,6 @@ static MACHINE_CONFIG_START( exctsccrb, champbas_state )
|
||||
|
||||
MCFG_WATCHDOG_VBLANK_INIT(0x10)
|
||||
|
||||
MCFG_MACHINE_START_OVERRIDE(champbas_state,champbas)
|
||||
MCFG_MACHINE_RESET_OVERRIDE(champbas_state,champbas)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
MCFG_SCREEN_REFRESH_RATE(60)
|
||||
|
@ -114,7 +114,6 @@ public:
|
||||
UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
INTERRUPT_GEN_MEMBER(vblank_nmi);
|
||||
|
||||
protected:
|
||||
virtual void machine_start();
|
||||
virtual void machine_reset();
|
||||
};
|
||||
|
@ -65,17 +65,17 @@ public:
|
||||
DECLARE_DRIVER_INIT(champbas);
|
||||
TILE_GET_INFO_MEMBER(champbas_get_bg_tile_info);
|
||||
TILE_GET_INFO_MEMBER(exctsccr_get_bg_tile_info);
|
||||
DECLARE_MACHINE_START(champbas);
|
||||
DECLARE_MACHINE_RESET(champbas);
|
||||
DECLARE_VIDEO_START(champbas);
|
||||
DECLARE_PALETTE_INIT(champbas);
|
||||
DECLARE_MACHINE_START(exctsccr);
|
||||
DECLARE_VIDEO_START(exctsccr);
|
||||
DECLARE_PALETTE_INIT(exctsccr);
|
||||
UINT32 screen_update_champbas(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
UINT32 screen_update_exctsccr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
INTERRUPT_GEN_MEMBER(vblank_irq);
|
||||
TIMER_CALLBACK_MEMBER(exctsccr_fm_callback);
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(exctsccr_sound_irq);
|
||||
void champbas_draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect );
|
||||
void exctsccr_draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect );
|
||||
|
||||
virtual void machine_start();
|
||||
virtual void machine_reset();
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user