diff options
author | Johannes Schickel | 2009-05-06 00:40:37 +0000 |
---|---|---|
committer | Johannes Schickel | 2009-05-06 00:40:37 +0000 |
commit | c35d6db60c54369387597492d04aec94f07cc070 (patch) | |
tree | 3b7be3ae0bbe8e595bf8cf0caeeca692f8822830 | |
parent | 25ca710eae70a30538d736da0374b74279c3a23f (diff) | |
download | scummvm-rg350-c35d6db60c54369387597492d04aec94f07cc070.tar.gz scummvm-rg350-c35d6db60c54369387597492d04aec94f07cc070.tar.bz2 scummvm-rg350-c35d6db60c54369387597492d04aec94f07cc070.zip |
Fix feedback/algorithm register write bugs in Dual OPL2 mode.
svn-id: r40342
-rw-r--r-- | sound/softsynth/opl/dosbox.cpp | 6 |
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; } |