aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sound/softsynth/opl/dosbox.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/softsynth/opl/dosbox.cpp b/sound/softsynth/opl/dosbox.cpp
index c61016e358..aef46d7e72 100644
--- a/sound/softsynth/opl/dosbox.cpp
+++ b/sound/softsynth/opl/dosbox.cpp
@@ -329,7 +329,7 @@ void OPL::dualWrite(uint8 index, uint8 reg, uint8 val) {
return;
// Only allow 4 waveforms
- if (reg >= 0xE0)
+ if (reg >= 0xE0 && reg <= 0xE8)
val &= 3;
// Write to the timer?
@@ -337,8 +337,8 @@ void OPL::dualWrite(uint8 index, uint8 reg, uint8 val) {
return;
// Enabling panning
- if (reg >= 0xC0 && reg < 0xC8) {
- val &= 7;
+ if (reg >= 0xC0 && reg <= 0xC8) {
+ val &= 15;
val |= index ? 0xA0 : 0x50;
}