[Scummvm-cvs-logs] SF.net SVN: scummvm: [21208] scummvm/trunk/engines/kyra/sound_adlib.cpp

eriktorbjorn at users.sourceforge.net eriktorbjorn at users.sourceforge.net
Fri Mar 10 07:31:05 CET 2006


Revision: 21208
Author:   eriktorbjorn
Date:     2006-03-10 07:30:22 -0800 (Fri, 10 Mar 2006)
ViewCVS:  http://svn.sourceforge.net/scummvm/?rev=21208&view=rev

Log Message:
-----------
More comments, and some very minor cleanup.

Modified Paths:
--------------
    scummvm/trunk/engines/kyra/sound_adlib.cpp
Modified: scummvm/trunk/engines/kyra/sound_adlib.cpp
===================================================================
--- scummvm/trunk/engines/kyra/sound_adlib.cpp	2006-03-10 14:53:48 UTC (rev 21207)
+++ scummvm/trunk/engines/kyra/sound_adlib.cpp	2006-03-10 15:30:22 UTC (rev 21208)
@@ -272,6 +272,39 @@
 	int updateCallback55(uint8 *&dataptr, OutputState &state, uint8 value);
 	int updateCallback56(uint8 *&dataptr, OutputState &state, uint8 value);
 private:
+	// These variables have not yet been named, but some of them are partly
+	// known nevertheless:
+	//
+	// _unk4           - Unknown, but probably indicates that Adlib's
+	//                   rhythm section is active.
+	// _unk5           - Currently unused, except for updateCallback54()
+	// _unkValue1      - Unknown. Used for updating _unkValue2
+	// _unkValue2      - Unknown. Used for updating _unkValue4
+	// _unkValue3      - Unknown. Used for updating _unkValue2
+	// _unkValue4      - Unknown. Used for updating _unkValue5
+	// _unkValue5      - Unknown. Used for controlling updateCallback24().
+	// _unkValue6      - Unknown. Something to do with channel 1 volume?
+	// _unkValue7      - Unknown. Something to do with channel 2 volume?
+	// _unkValue8      - Unknown. Something to do with channel 2 volume?
+	// _unkValue9      - Unknown. Something to do with channel 3 volume?
+	// _unkValue10     - Unknown. Something to do with channel 3 volume?
+	// _unkValue11     - Unknown. Something to do with channel 2 volume?
+	// _unkValue12     - Unknown. Something to do with channel 2 volume?
+	// _unkValue13     - Unknown. Something to do with channel 3 volume?
+	// _unkValue14     - Unknown. Something to do with channel 3 volume?
+	// _unkValue15     - Unknown. Something to do with channel 3 volume?
+	// _unkValue16     - Unknown. Something to do with channel 3 volume?
+	// _unkValue17     - Unknown. Something to do with channel 2 volume?
+	// _unkValue18     - Unknown. Something to do with channel 2 volume?
+	// _unkValue19     - Unknown. Something to do with channel 1 volume?
+	// _unkValue20     - Unknown. Something to do with channel 1 volume?
+	// _unkOutputByte2 - Unknown. Something to do with the BD register.
+	// _unkTable[]     - Probably frequences for the 12-tone scale.
+	// _unkTable2[]    - Unknown. Currently only used by updateCallback46()
+	// _unkTable2_1[]  - One of the tables in _unkTable2[]
+	// _unkTable2_2[]  - One of the tables in _unkTable2[]
+	// _unkTable2_3[]  - One of the tables in _unkTable2[]
+
 	int _lastProcessed;
 	int8 _flagTrigger;
 	int _curTable;
@@ -689,8 +722,13 @@
 
 void AdlibDriver::noteOff(OutputState &table) {
 	debugC(9, kDebugLevelSound, "noteOff(%d)", &table - _outputTables);
+
+	// I believe that 9 is the percussion channel.
 	if (_curTable == 9)
 		return;
+
+	// I believe this has to do with channels 6, 7, and 8 being special
+	// when Adlib's rhythm section is enabled.
 	if (_unk4 && _curTable >= 6)
 		return;
 
@@ -703,10 +741,12 @@
 
 void AdlibDriver::unkOutput2(uint8 num) {
 	debugC(9, kDebugLevelSound, "unkOutput2(%d)", num);
-	if (_unk4)
-		if (num >= 6)
-			return;
 
+	// I believe this has to do with channels 6, 7, and 8 being special
+	// when Adlib's rhythm section is enabled.
+	if (_unk4 && num >= 6)
+		return;
+
 	uint8 value = _outputTable[num];
 
 	// Clear the Attack Rate / Decay Rate for the channel
@@ -1913,6 +1953,9 @@
 	0x0207, 0x0225, 0x0246
 };
 
+// These tables are currently only used by updateCallback46(), which only ever
+// uses the first element of one of the sub-tables.
+
 const uint8 *AdlibDriver::_unkTable2[] = {
 	AdlibDriver::_unkTable2_1,
 	AdlibDriver::_unkTable2_2,


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.





More information about the Scummvm-git-logs mailing list