From c0d71bb900017b3d8b9ba81449dbf0ed4c57f44b Mon Sep 17 00:00:00 2001 From: Martin Kiewitz Date: Tue, 2 Jun 2015 17:07:06 +0200 Subject: SHERLOCK: add MT32 debug, add music data comment --- engines/sherlock/scalpel/drivers/midi.cpp | 8 +++++--- engines/sherlock/sherlock.cpp | 1 + 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/engines/sherlock/scalpel/drivers/midi.cpp b/engines/sherlock/scalpel/drivers/midi.cpp index 3a9fd9e722..fce30afb90 100644 --- a/engines/sherlock/scalpel/drivers/midi.cpp +++ b/engines/sherlock/scalpel/drivers/midi.cpp @@ -167,13 +167,15 @@ void MidiDriver_MIDI::close() { // Called when a music track got loaded into memory void MidiDriver_MIDI::newMusicData(byte *musicData, int32 musicDataSize) { - assert(musicDataSize >= 0x7F); + assert(musicDataSize >= 0x7F); // Security check + // MIDI Channel Enable/Disable bytes at offset 0x2 of music data memcpy(&_MIDIchannelActive, musicData + 0x2, SHERLOCK_MT32_CHANNEL_COUNT); // Send 16 bytes from offset 0x12 to MT32 - // TODO - // Although at least the Prologue music doesn't use this at all + // All the music tracks of Sherlock seem to contain dummy data + // probably a feature, that was used in the game "Ski or Die" + // that's why we don't implement this // Also send these bytes to MT32 (SysEx) - seems to be reverb configuration if (_MT32) { diff --git a/engines/sherlock/sherlock.cpp b/engines/sherlock/sherlock.cpp index 67a1552f6c..207f8544ec 100644 --- a/engines/sherlock/sherlock.cpp +++ b/engines/sherlock/sherlock.cpp @@ -74,6 +74,7 @@ SherlockEngine::~SherlockEngine() { void SherlockEngine::initialize() { DebugMan.addDebugChannel(kDebugLevelScript, "scripts", "Script debug level"); DebugMan.addDebugChannel(kDebugLevelAdLibDriver, "AdLib", "AdLib driver debugging"); + DebugMan.addDebugChannel(kDebugLevelMT32Driver, "MT32", "MT32 driver debugging"); DebugMan.addDebugChannel(kDebugLevelMusic, "Music", "Music debugging"); ImageFile::setVm(this); -- cgit v1.2.3