aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra
diff options
context:
space:
mode:
authorTorbjörn Andersson2006-03-01 06:56:53 +0000
committerTorbjörn Andersson2006-03-01 06:56:53 +0000
commit90cbe402b2efbb9e9bcdc64e9262738ef2623a2c (patch)
treee776beb6e3bcb8b481f7d292f4d804119cc21682 /engines/kyra
parent68f289398e870730e65541044f49092a982461ba (diff)
downloadscummvm-rg350-90cbe402b2efbb9e9bcdc64e9262738ef2623a2c.tar.gz
scummvm-rg350-90cbe402b2efbb9e9bcdc64e9262738ef2623a2c.tar.bz2
scummvm-rg350-90cbe402b2efbb9e9bcdc64e9262738ef2623a2c.zip
Minor cleanup and comments.
svn-id: r20983
Diffstat (limited to 'engines/kyra')
-rw-r--r--engines/kyra/sound_adlib.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/engines/kyra/sound_adlib.cpp b/engines/kyra/sound_adlib.cpp
index c9d3b25a88..66a743c4bd 100644
--- a/engines/kyra/sound_adlib.cpp
+++ b/engines/kyra/sound_adlib.cpp
@@ -512,7 +512,7 @@ void AdlibDriver::callback() {
lock();
--_flagTrigger;
if ((int8)_flagTrigger < 0)
- _flags &= 0xFFF7;
+ _flags &= ~8;
callbackOutput();
callbackProcess();
@@ -628,10 +628,17 @@ void AdlibDriver::resetAdlibState() {
void AdlibDriver::output0x388(uint16 word) {
// 0x388 - Adress/Status port (R/W)
// 0x389 - Data port (W/O)
+
+ // The "wait loops" are there to allow the hardware enough time to
+ // register that it has been written to. I don't think we do that in
+ // any of the other ScummVM Adlib players, so it might not be
+ // necessary. On the other hand, it shouldn't do any harm either, so
+ // let's keep it for now. Until the music works properly, at least.
+
OPLWrite(_adlib, 0x388, (word >> 8) & 0xFF);
waitLoops(4);
OPLWrite(_adlib, 0x389, word & 0xFF);
- waitLoops(23);
+ waitLoops(23);
}
void AdlibDriver::waitLoops(int count) {