From 52a60e2908d54db803670fc17b03dc65830bfea3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Banaan=20Ananas?= Date: Wed, 6 Aug 2014 21:39:43 +0000 Subject: [PATCH] - 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. --- src/emu/machine/rp5c01.c | 14 +++++++++----- src/mame/drivers/punchout.c | 9 +++++---- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/src/emu/machine/rp5c01.c b/src/emu/machine/rp5c01.c index c1d53302368..bd4e30b95ab 100644 --- a/src/emu/machine/rp5c01.c +++ b/src/emu/machine/rp5c01.c @@ -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()); } diff --git a/src/mame/drivers/punchout.c b/src/mame/drivers/punchout.c index 49bb10193fd..6c91b3f5ff4 100644 --- a/src/mame/drivers/punchout.c +++ b/src/mame/drivers/punchout.c @@ -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)