summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatarGravatar Ivan Vangelista <mesgnet@yahoo.it>2019-10-12 14:22:29 +0200
committerGravatarGravatar Ivan Vangelista <mesgnet@yahoo.it>2019-10-12 14:22:29 +0200
commit17874f61394bcc342443263f60bc59009771d680 (patch) (github)
tree85f3b4916a571279b065b3a6cfa025d94a49ee30
parent6a85f014b81a77a40125da9dfb76aee71ed36d28 (diff)
downloadmame-17874f61394bcc342443263f60bc59009771d680.tar.bz2
mame-17874f61394bcc342443263f60bc59009771d680.zip
f1en: reworked 8792426f66ec2b2f274166e59441807bee50d55c as per comments to the commit (nw)
-rw-r--r--src/devices/sound/rf5c68.cpp4
-rw-r--r--src/mame/drivers/segas32.cpp5
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());
}