summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2021-04-09 10:00:14 -0700
committer Aaron Giles <aaron@aarongiles.com>2021-04-09 10:00:14 -0700
commit80a90345326acf9624c261a8c4c265b04f4c4bd1 (patch)
tree76e3f312cc5cbaa7c16ad31687e86c17a259c77c
parent31a5751a3fe1c737592aef161d308010b804239d (diff)
ymadpcm: Fix coverity issue, document differences between YM2608/10 and Y8950 DAC formats.
-rw-r--r--src/devices/sound/ymadpcm.cpp2
-rw-r--r--src/devices/sound/ymadpcm.h9
2 files changed, 7 insertions, 4 deletions
diff --git a/src/devices/sound/ymadpcm.cpp b/src/devices/sound/ymadpcm.cpp
index 65169a610ff..c8dd5df0cca 100644
--- a/src/devices/sound/ymadpcm.cpp
+++ b/src/devices/sound/ymadpcm.cpp
@@ -562,7 +562,7 @@ void ymadpcm_b_channel::write(u32 regnum, u8 value)
m_regs.speaker(),
m_regs.pan_left(),
m_regs.pan_right(),
- m_regs.dac(),
+ m_regs.dac_enable(),
m_regs.dram_8bit(),
m_regs.rom_ram(),
m_regs.external(),
diff --git a/src/devices/sound/ymadpcm.h b/src/devices/sound/ymadpcm.h
index 847af0b93ff..36cefa07ed3 100644
--- a/src/devices/sound/ymadpcm.h
+++ b/src/devices/sound/ymadpcm.h
@@ -202,8 +202,11 @@ private:
// 0b xxxxxxxx Level control
// 0c xxxxxxxx Limit address (low)
// 0d xxxxxxxx Limit address (high)
-// 0e xxxxxxxx DAC data
-// 0f xxxxxxxx PCM data
+// 0e xxxxxxxx DAC data [YM2608/10]
+// 0f xxxxxxxx PCM data [YM2608/10]
+// 0e xxxxxxxx DAC data high [Y8950]
+// 0f xx------ DAC data low [Y8950]
+// 10 -----xxx DAC data exponent [Y8950]
//
class ymadpcm_b_registers
{
@@ -211,7 +214,7 @@ public:
// constants
static constexpr u32 OUTPUTS = 2;
static constexpr u32 CHANNELS = 1;
- static constexpr u32 REGISTERS = 0x10;
+ static constexpr u32 REGISTERS = 0x11;
static constexpr u32 ALL_CHANNELS = (1 << CHANNELS) - 1;
// constructor