From 6a85f014b81a77a40125da9dfb76aee71ed36d28 Mon Sep 17 00:00:00 2001 From: Ivan Vangelista Date: Sat, 12 Oct 2019 14:15:27 +0200 Subject: [PATCH 1/2] exedexes.cpp: measured maincpu clock, audiocpu clock and vsync [Corrado Tomaselli] --- src/mame/drivers/exedexes.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mame/drivers/exedexes.cpp b/src/mame/drivers/exedexes.cpp index 8d7f73b1454..7a18e98275f 100644 --- a/src/mame/drivers/exedexes.cpp +++ b/src/mame/drivers/exedexes.cpp @@ -210,11 +210,11 @@ void exedexes_state::machine_reset() void exedexes_state::exedexes(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 4000000); /* 4 MHz (?) */ + Z80(config, m_maincpu, 12_MHz_XTAL / 4); // 3 MHz, verified on PCB m_maincpu->set_addrmap(AS_PROGRAM, &exedexes_state::exedexes_map); TIMER(config, "scantimer").configure_scanline(FUNC(exedexes_state::scanline), "screen", 0, 1); - z80_device &audiocpu(Z80(config, "audiocpu", 3000000)); /* 3 MHz ??? */ + z80_device &audiocpu(Z80(config, "audiocpu", 12_MHz_XTAL / 4)); // 3 MHz, verified on PCB audiocpu.set_addrmap(AS_PROGRAM, &exedexes_state::sound_map); audiocpu.set_periodic_int(FUNC(exedexes_state::irq0_line_hold), attotime::from_hz(4*60)); @@ -222,7 +222,7 @@ void exedexes_state::exedexes(machine_config &config) BUFFERED_SPRITERAM8(config, m_spriteram); screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); - screen.set_refresh_hz(60); + screen.set_refresh_hz(59.60); // verified on PCB screen.set_vblank_time(ATTOSECONDS_IN_USEC(0)); screen.set_size(32*8, 32*8); screen.set_visarea(0*8, 32*8-1, 2*8, 30*8-1); From 17874f61394bcc342443263f60bc59009771d680 Mon Sep 17 00:00:00 2001 From: Ivan Vangelista Date: Sat, 12 Oct 2019 14:22:29 +0200 Subject: [PATCH 2/2] f1en: reworked 8792426f66ec2b2f274166e59441807bee50d55c as per comments to the commit (nw) --- src/devices/sound/rf5c68.cpp | 4 ---- src/mame/drivers/segas32.cpp | 5 ++++- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/devices/sound/rf5c68.cpp b/src/devices/sound/rf5c68.cpp index 2567adfe004..9ec522b7d92 100644 --- a/src/devices/sound/rf5c68.cpp +++ b/src/devices/sound/rf5c68.cpp @@ -63,10 +63,6 @@ void rf5c68_device::device_start() m_cache = space().cache<0, 0, ENDIANNESS_LITTLE>(); m_sample_end_cb.bind_relative_to(*owner()); - // needs to be initialized to 0xff, otherwise f1en has bad sound (MT04531) - for (int i = 0; i < 0x10000; i++) - m_data->write_byte(i, 0xff); - /* allocate the stream */ m_stream = stream_alloc(0, 2, clock() / 384); diff --git a/src/mame/drivers/segas32.cpp b/src/mame/drivers/segas32.cpp index f47903b19b7..e9e866c6806 100644 --- a/src/mame/drivers/segas32.cpp +++ b/src/mame/drivers/segas32.cpp @@ -1242,7 +1242,7 @@ void segas32_state::system32_sound_portmap(address_map &map) void segas32_state::rf5c68_map(address_map &map) { map.unmap_value_high(); - map(0x0000, 0xffff).ram(); + map(0x0000, 0xffff).ram().share("rf5c68_mem"); } @@ -5432,6 +5432,9 @@ void segas32_state::segas32_common_init() m_sw1_output = nullptr; m_sw2_output = nullptr; m_sw3_output = nullptr; + + // needs to be initialized to 0xff, otherwise f1en has bad sound (MT04531) + memset(memshare("rf5c68_mem")->ptr(), 0xff, memshare("rf5c68_mem")->bytes()); }