aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra
diff options
context:
space:
mode:
authorTorbjörn Andersson2006-03-09 12:36:11 +0000
committerTorbjörn Andersson2006-03-09 12:36:11 +0000
commit671450fcb84ab526a74fa58c08247ae8d5255310 (patch)
tree1f7efdd7db865208c902acd3e09f954db9fb6b2a /engines/kyra
parent9d19f7d32e0d6c063a8b9457dd554f8cf93496ad (diff)
downloadscummvm-rg350-671450fcb84ab526a74fa58c08247ae8d5255310.tar.gz
scummvm-rg350-671450fcb84ab526a74fa58c08247ae8d5255310.tar.bz2
scummvm-rg350-671450fcb84ab526a74fa58c08247ae8d5255310.zip
Set down in comments what I know about _outputTable[], and what I suspect about
_unkTable[]. Investigating the latter further might help unravelling several of the "unk" variables. (Right now, I'm suspecting that unk15 is the pitch bend.) svn-id: r21164
Diffstat (limited to 'engines/kyra')
-rw-r--r--engines/kyra/sound_adlib.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/engines/kyra/sound_adlib.cpp b/engines/kyra/sound_adlib.cpp
index 03577c7e7d..91c6356624 100644
--- a/engines/kyra/sound_adlib.cpp
+++ b/engines/kyra/sound_adlib.cpp
@@ -1788,11 +1788,22 @@ const AdlibDriver::ParserOpcode AdlibDriver::_parserOpcodeTable[] = {
const int AdlibDriver::_opcodesEntries = ARRAYSIZE(AdlibDriver::_opcodeList);
const int AdlibDriver::_parserOpcodeTableSize = ARRAYSIZE(AdlibDriver::_parserOpcodeTable);
+// This table holds the register offset for operator 1 for each of the nine
+// channels. To get the register offset for operator 2, simply add 3.
+
const uint8 AdlibDriver::_outputTable[] = {
0x00, 0x01, 0x02, 0x08, 0x09, 0x0A, 0x10, 0x11,
0x12
};
+// Given the size of this table, and the range of its values, it's probably the
+// F-Numbers (10 bits) for the notes of the 12-tone scale. However, it does not
+// match the table in the Adlib documentation I've seen.
+//
+// The values from this table is always added to state.unk15, which could make
+// unk15 a pitch bend factor of some kind, and updateCallback20() would then
+// be update_setPitchBend().
+
const uint16 AdlibDriver::_unkTable[] = {
0x0134, 0x0147, 0x015A, 0x016F, 0x0184, 0x019C, 0x01B4, 0x01CE, 0x01E9,
0x0207, 0x0225, 0x0246