diff options
| author | 2025-09-26 10:44:29 +0200 | |
|---|---|---|
| committer | 2025-09-26 10:44:29 +0200 | |
| commit | f2795c309d7e798e5e331aa5b9fb813d15553e03 (patch) | |
| tree | 1a056ba8bd23ccc08a45ee2f57705b2801048c12 | |
| parent | 18e587c5e6aa87ea4285758342aabdbfb45ad791 (diff) | |
hng64: decode samples
| -rw-r--r-- | src/devices/sound/l7a1045_l6028_dsp_a.cpp | 2 | ||||
| -rw-r--r-- | src/mame/snk/hng64.cpp | 11 |
2 files changed, 12 insertions, 1 deletions
diff --git a/src/devices/sound/l7a1045_l6028_dsp_a.cpp b/src/devices/sound/l7a1045_l6028_dsp_a.cpp index 3805a00f68d..85221289df1 100644 --- a/src/devices/sound/l7a1045_l6028_dsp_a.cpp +++ b/src/devices/sound/l7a1045_l6028_dsp_a.cpp @@ -175,7 +175,7 @@ void l7a1045_sound_device::sound_stream_update(sound_stream &stream) } const uint32_t address = (start + pos) & (m_rom.length() - 1); data = m_rom[address]; - sample = int8_t(data & 0xfc) << (3 - (data & 3)); + sample = int8_t(data); frac += step; // volume envelope processing diff --git a/src/mame/snk/hng64.cpp b/src/mame/snk/hng64.cpp index f2a1e712aa1..90b7d88f344 100644 --- a/src/mame/snk/hng64.cpp +++ b/src/mame/snk/hng64.cpp @@ -2185,6 +2185,17 @@ void hng64_state::machine_start() init_io(); + // Decode the samples + u8 *samples = memregion("l7a1045")->base(); + for (u32 i = 0; i != memregion("l7a1045")->bytes(); i++) + { + u8 r = samples[i]; + r = util::bitswap<8>(r, 7, 1, 0, 6, 5, 4, 3, 2); + if (!(r & 0x80)) + r ^= 0x60; + samples[i] = r; + } + save_pointer(NAME(m_com_virtual_mem), 0x100000); save_pointer(NAME(m_com_op_base), 0x10000); save_pointer(NAME(m_soundram), 0x200000 / 2); |
