[Scummvm-cvs-logs] scummvm master -> 0e5bcd207b065843e316b7472da98c437958ebd6

lordhoto lordhoto at gmail.com
Sun Jun 2 04:41:17 CEST 2013


This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
dc6b39d058 SCUMM: Clean-up of Roland GS code
af87e49f9e GUI: Update Roland GS description in MT-32 tab
0e5bcd207b Merge pull request #332 from bluegr/roland_gs_cleanup


Commit: dc6b39d058dddb9b626fef6e671a7da6a07b8243
    https://github.com/scummvm/scummvm/commit/dc6b39d058dddb9b626fef6e671a7da6a07b8243
Author: tcarey (tom at thomascarey.com)
Date: 2013-05-11T09:18:11-07:00

Commit Message:
SCUMM: Clean-up of Roland GS code

1. Remove _sc55 bool. All Roland GS-capable devices have MT-32 sound/drum maps, so they should always be used when _enable_gs is set.
2. Always enable _native_mt32 if Roland GS mode is selected. I don't know why I never did this originally, since _enable_gs is automatically disabled for SCUMM v6+ games that use General MIDI tracks instead of MT-32 music.
3. Set master tune for GS devices to 442.0kHz. This is the master tune setting for the MT-32.

Changed paths:
    engines/scumm/imuse/imuse.cpp
    engines/scumm/imuse/imuse_internal.h



diff --git a/engines/scumm/imuse/imuse.cpp b/engines/scumm/imuse/imuse.cpp
index a875702..12ebfef 100644
--- a/engines/scumm/imuse/imuse.cpp
+++ b/engines/scumm/imuse/imuse.cpp
@@ -46,7 +46,6 @@ namespace Scumm {
 IMuseInternal::IMuseInternal() :
 	_native_mt32(false),
 	_enable_gs(false),
-	_sc55(false),
 	_midi_adlib(NULL),
 	_midi_native(NULL),
 	_sysex(NULL),
@@ -495,12 +494,9 @@ uint32 IMuseInternal::property(int prop, uint32 value) {
 	case IMuse::PROP_GS:
 		_enable_gs = (value > 0);
 
-		// If True Roland MT-32 is not selected, run in GM or GS mode.
-		// If it is selected, change the Roland GS synth to MT-32 mode.
-		if (_midi_native && !_native_mt32)
-			initGM(_midi_native);
-		else if (_midi_native && _native_mt32 && _enable_gs) {
-			_sc55 = true;
+		// GS Mode emulates MT-32 on a GS device, so _native_mt32 should always be true
+		if (_midi_native && _enable_gs) {
+			_native_mt32 = true;
 			initGM(_midi_native);
 		}
 		break;
@@ -1499,7 +1495,7 @@ void IMuseInternal::initGM(MidiDriver *midi) {
 
 	if (_enable_gs) {
 		// All GS devices recognize the GS Reset command,
-		// even with Roland's ID. It is impractical to
+		// even using Roland's ID. It is impractical to
 		// support other manufacturers' devices for
 		// further GS settings, as there are limitless
 		// numbers of them out there that would each
@@ -1513,30 +1509,28 @@ void IMuseInternal::initGM(MidiDriver *midi) {
 		midi->sysEx(buffer, 9);
 		debug(2, "GS SysEx: GS Reset");
 		_system->delayMillis(200);
+		
+		// Set global Master Tune to 442.0kHz, as on the MT-32
+		memcpy(&buffer[4], "\x40\x00\x00\x00\x04\x04\x0F\x29", 8);
+		midi->sysEx(buffer, 12);
+		debug(2, "GS SysEx: Master Tune set to 442.0kHz");
 
-		if (_sc55) {
-			// This mode is for GS devices that support an MT-32-compatible
-			// Map, such as the Roland Sound Canvas line of modules. It
-			// will allow them to work with True MT-32 mode, but will
-			// obviously still ignore MT-32 SysEx (and thus custom
-			// instruments).
-
-			// Set Channels 1-16 to SC-55 Map, then CM-64/32L Variation
-			for (i = 0; i < 16; ++i) {
-				midi->send((127 << 16) | (0  << 8) | (0xB0 | i));
-				midi->send((1   << 16) | (32 << 8) | (0xB0 | i));
-				midi->send((0   << 16) | (0  << 8) | (0xC0 | i));
-			}
-			debug(2, "GS Program Change: CM-64/32L Map Selected");
-
-			// Set Percussion Channel to SC-55 Map (CC#32, 01H), then
-			// Switch Drum Map to CM-64/32L (MT-32 Compatible Drums)
-			midi->getPercussionChannel()->controlChange(0, 0);
-			midi->getPercussionChannel()->controlChange(32, 1);
-			midi->send(127 << 8 | 0xC0 | 9);
-			debug(2, "GS Program Change: Drum Map is CM-64/32L");
+		// Note: All Roland GS devices support CM-64/32L maps
 
+		// Set Channels 1-16 to SC-55 Map, then CM-64/32L Variation
+		for (i = 0; i < 16; ++i) {
+			midi->send((127 << 16) | (0  << 8) | (0xB0 | i));
+			midi->send((1   << 16) | (32 << 8) | (0xB0 | i));
+			midi->send((0   << 16) | (0  << 8) | (0xC0 | i));
 		}
+		debug(2, "GS Program Change: CM-64/32L Map Selected");
+
+		// Set Percussion Channel to SC-55 Map (CC#32, 01H), then
+		// Switch Drum Map to CM-64/32L (MT-32 Compatible Drums)
+		midi->getPercussionChannel()->controlChange(0, 0);
+		midi->getPercussionChannel()->controlChange(32, 1);
+		midi->send(127 << 8 | 0xC0 | 9);
+		debug(2, "GS Program Change: Drum Map is CM-64/32L");
 
 		// Set Master Chorus to 0. The MT-32 has no chorus capability.
 		memcpy(&buffer[4], "\x40\x01\x3A\x00\x05", 5);
diff --git a/engines/scumm/imuse/imuse_internal.h b/engines/scumm/imuse/imuse_internal.h
index 6be564a..d17d4ed 100644
--- a/engines/scumm/imuse/imuse_internal.h
+++ b/engines/scumm/imuse/imuse_internal.h
@@ -390,7 +390,6 @@ class IMuseInternal : public IMuse {
 protected:
 	bool _native_mt32;
 	bool _enable_gs;
-	bool _sc55;
 	MidiDriver *_midi_adlib;
 	MidiDriver *_midi_native;
 	TimerCallbackInfo _timer_info_adlib;


Commit: af87e49f9e963d3a5bcb24147b35411798f8db73
    https://github.com/scummvm/scummvm/commit/af87e49f9e963d3a5bcb24147b35411798f8db73
Author: tcarey (tom at thomascarey.com)
Date: 2013-05-11T09:20:38-07:00

Commit Message:
GUI: Update Roland GS description in MT-32 tab

Clarified the Roland GS settings. The current description is only partially accurate and confusing at best.

Changed paths:
    gui/options.cpp



diff --git a/gui/options.cpp b/gui/options.cpp
index fb57c15..a9fdc19 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -887,7 +887,7 @@ void OptionsDialog::addMT32Controls(GuiObject *boss, const Common::String &prefi
 		_mt32Checkbox = new CheckboxWidget(boss, prefix + "mcMt32Checkbox", _c("True Roland MT-32 (no GM emulation)", "lowres"), _("Check if you want to use your real hardware Roland-compatible sound device connected to your computer"));
 
 	// GS Extensions setting
-	_enableGSCheckbox = new CheckboxWidget(boss, prefix + "mcGSCheckbox", _("Roland GS Mode (disable GM mapping)"), _("Turns off General MIDI mapping for games with Roland MT-32 soundtrack"));
+	_enableGSCheckbox = new CheckboxWidget(boss, prefix + "mcGSCheckbox", _("Roland GS Device (enable MT-32 mappings)"), _("Check if you want to enable patch mappings to emulate an MT-32 on a Roland GS device"));
 
 	const MusicPlugin::List p = MusicMan.getPlugins();
 	// Make sure the null device is the first one in the list to avoid undesired


Commit: 0e5bcd207b065843e316b7472da98c437958ebd6
    https://github.com/scummvm/scummvm/commit/0e5bcd207b065843e316b7472da98c437958ebd6
Author: Johannes Schickel (lordhoto at gmail.com)
Date: 2013-06-01T19:40:27-07:00

Commit Message:
Merge pull request #332 from bluegr/roland_gs_cleanup

SCUMM: iMuse - Clean-up of Roland GS code (updated)

Changed paths:
    engines/scumm/imuse/imuse.cpp
    engines/scumm/imuse/imuse_internal.h
    gui/options.cpp









More information about the Scummvm-git-logs mailing list