- allow RP5C01 clock of 0

- from 2600: (punchout cab) on the real machine the 2A03 comes out of the right speaker and the VLM5030 comes out of the left.
This commit is contained in:
Michaël Banaan Ananas 2014-08-06 21:39:43 +00:00
parent cc86996609
commit 52a60e2908
2 changed files with 14 additions and 9 deletions

View File

@ -198,11 +198,14 @@ void rp5c01_device::device_start()
m_out_alarm_cb.resolve_safe();
// allocate timers
m_clock_timer = timer_alloc(TIMER_CLOCK);
m_clock_timer->adjust(attotime::from_hz(clock() / 16384), 0, attotime::from_hz(clock() / 16384));
if (clock() > 0)
{
m_clock_timer = timer_alloc(TIMER_CLOCK);
m_clock_timer->adjust(attotime::from_hz(clock() / 16384), 0, attotime::from_hz(clock() / 16384));
m_16hz_timer = timer_alloc(TIMER_16HZ);
m_16hz_timer->adjust(attotime::from_hz(clock() / 1024), 0, attotime::from_hz(clock() / 1024));
m_16hz_timer = timer_alloc(TIMER_16HZ);
m_16hz_timer->adjust(attotime::from_hz(clock() / 1024), 0, attotime::from_hz(clock() / 1024));
}
// state saving
save_item(NAME(m_reg[MODE00]));
@ -228,7 +231,8 @@ void rp5c01_device::device_reset()
// 24 hour mode
m_reg[MODE01][REGISTER_12_24_SELECT] = 1;
set_current_time(machine());
if (clock() > 0)
set_current_time(machine());
}

View File

@ -12,6 +12,7 @@ driver by Nicola Salmoria
TODO:
- add useless driver config to choose between pink and white color proms
- video raw params - pixel clock is derived from 20.16mhz xtal
- spnchout rtc doesn't have a battery
- money bag placement might not be 100% correct in Arm Wrestling
@ -662,14 +663,14 @@ static MACHINE_CONFIG_START( punchout, punchout_state )
MCFG_SCREEN_PALETTE("palette")
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
MCFG_SOUND_ADD("nesapu", NES_APU, XTAL_21_4772MHz/12)
MCFG_NES_APU_CPU("audiocpu")
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.50)
MCFG_SOUND_ADD("vlm", VLM5030, XTAL_21_4772MHz/6)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.50)
MACHINE_CONFIG_END
@ -679,7 +680,7 @@ static MACHINE_CONFIG_DERIVED( spnchout, punchout )
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_IO_MAP(spnchout_io_map)
MCFG_DEVICE_ADD("rtc", RP5C01, XTAL_32_768kHz) // frequency guessed
MCFG_DEVICE_ADD("rtc", RP5C01, 0) // OSCIN -> Vcc
MCFG_RP5H01_ADD("rp5h01")
MCFG_MACHINE_RESET_OVERRIDE(punchout_state, spnchout)