Ticket #8406: GSMidiTab.patch

File GSMidiTab.patch, 21.8 KB (added by SF/tbcarey, 19 years ago)
  • base/gameDetector.cpp

    RCS file: /cvsroot/scummvm/scummvm/base/gameDetector.cpp,v
    retrieving revision 1.107
    diff -u -r1.107 gameDetector.cpp
     
    9292        "  --platform=WORD          Specify version of game (allowed values: amiga,\n"
    9393        "                           atari, fmtowns, nes, mac, pc, windows)\n"
    9494        "  --savepath=PATH          Path to where savegames are stored\n"
    95         "  --soundfont=FILE         Select the SoundFont for MIDI playback. (Only\n"
    96         "                           supported by some MIDI drivers.)\n"
     95        "  --soundfont=FILE         Select the SoundFont for MIDI playback (Only\n"
     96        "                           supported by some MIDI drivers)\n"
    9797        "  --multi-midi             Enable combination Adlib and native MIDI\n"
    9898        "  --native-mt32            True Roland MT-32 (disable GM emulation)\n"
     99        "  --enable-gs              Enable Roland GS mode for MIDI playback\n"
    99100        "  --output-rate=RATE       Select output sample rate in Hz (e.g. 22050)\n"
    100101        "  --aspect-ratio           Enable aspect ratio correction\n"
    101102        "  --render-mode=MODE       Enable additional render modes (cga, ega, hercGreen,\n"
     
    136137
    137138        ConfMan.registerDefault("multi_midi", false);
    138139        ConfMan.registerDefault("native_mt32", false);
     140        ConfMan.registerDefault("enable_gs", false);
    139141//      ConfMan.registerDefault("music_driver", ???);
    140142
    141143        ConfMan.registerDefault("cdrom", 0);
     
    486488                                ConfMan.set("native_mt32", cmdValue, kTransientDomain);
    487489                        END_OPTION
    488490
     491                        DO_LONG_OPTION_BOOL("enable-gs")
     492                                ConfMan.set("enable_gs", cmdValue, kTransientDomain);
     493                        END_OPTION
     494
    489495                        DO_LONG_OPTION_BOOL("aspect-ratio")
    490496                                ConfMan.set("aspect_ratio", cmdValue, kTransientDomain);
    491497                        END_OPTION
  • gui/launcher.cpp

    RCS file: /cvsroot/scummvm/scummvm/gui/launcher.cpp,v
    retrieving revision 1.112
    diff -u -r1.112 launcher.cpp
     
    6161       
    6262        kCmdGlobalGraphicsOverride = 'OGFX',
    6363        kCmdGlobalAudioOverride = 'OSFX',
     64        kCmdGlobalMIDIOverride = 'OMID',
    6465        kCmdGlobalVolumeOverride = 'OVOL',
    6566
    6667        kCmdExtraBrowser = 'PEXT',
     
    128129
    129130        CheckboxWidget *_globalGraphicsOverride;
    130131        CheckboxWidget *_globalAudioOverride;
     132        CheckboxWidget *_globalMIDIOverride;
    131133        CheckboxWidget *_globalVolumeOverride;
    132134};
    133135
     
    215217        yoffset += 18;
    216218
    217219        //
    218         // 2) The graphics tab
     220        // 3) The graphics tab
    219221        //
    220222        tab->addTab("Gfx");
    221223        yoffset = vBorder;
     
    226228        yoffset = addGraphicControls(tab, yoffset);
    227229
    228230        //
    229         // 3) The audio tab
     231        // 4) The audio tab
    230232        //
    231233        tab->addTab("Audio");
    232234        yoffset = vBorder;
     
    234236        _globalAudioOverride = new CheckboxWidget(tab, x, yoffset, w, 16, "Override global audio settings", kCmdGlobalAudioOverride);
    235237        yoffset += 16;
    236238
     239        yoffset = addAudioControls(tab, yoffset);
     240
     241        //
     242        // 5) The MIDI tab
     243        //
     244        tab->addTab("MIDI");
     245        yoffset = vBorder;
     246
     247        _globalMIDIOverride = new CheckboxWidget(tab, x, yoffset, w, 16, "Override global MIDI settings", kCmdGlobalMIDIOverride);
     248        yoffset += 16;
     249
    237250        yoffset = addMIDIControls(tab, yoffset);
    238251
    239252        //
    240         // 3) The volume tab
     253        // 6) The volume tab
    241254        //
    242255        tab->addTab("Volume");
    243256        yoffset = vBorder;
     
    269282        _globalGraphicsOverride->setState(e);
    270283
    271284        e = ConfMan.hasKey("music_driver", _domain) ||
    272                 ConfMan.hasKey("multi_midi", _domain) ||
    273                 ConfMan.hasKey("native_mt32", _domain);
     285                ConfMan.hasKey("subtitles", _domain);
    274286        _globalAudioOverride->setState(e);
    275287
     288        e = ConfMan.hasKey("multi_midi", _domain) ||
     289                ConfMan.hasKey("native_mt32", _domain)||
     290                ConfMan.hasKey("enable_gs", _domain);
     291        _globalMIDIOverride->setState(e);
     292
    276293        e = ConfMan.hasKey("music_volume", _domain) ||
    277294                ConfMan.hasKey("sfx_volume", _domain) ||
    278295                ConfMan.hasKey("speech_volume", _domain);
     
    342359                setAudioSettingsState(data != 0);
    343360                draw();
    344361                break;
     362        case kCmdGlobalMIDIOverride:
     363                setMIDISettingsState(data != 0);
     364                draw();
     365                break;
    345366        case kCmdGlobalVolumeOverride:
    346367                setVolumeSettingsState(data != 0);
    347368                draw();
  • gui/options.cpp

    RCS file: /cvsroot/scummvm/scummvm/gui/options.cpp,v
    retrieving revision 1.73
    diff -u -r1.73 options.cpp
     
    7878        _enableGraphicSettings(false),
    7979        _gfxPopUp(0), _renderModePopUp(0), _fullscreenCheckbox(0), _aspectCheckbox(0),
    8080        _enableAudioSettings(false),
    81         _multiMidiCheckbox(0), _mt32Checkbox(0), _subCheckbox(0),
     81        _subCheckbox(0),
     82        _enableMIDISettings(false),
     83        _multiMidiCheckbox(0), _mt32Checkbox(0), _enableGSCheckbox(0),
    8284        _enableVolumeSettings(false),
    8385        _musicVolumeSlider(0), _musicVolumeLabel(0),
    8486        _sfxVolumeSlider(0), _sfxVolumeLabel(0),
     
    131133#endif
    132134        }
    133135
    134         if (_multiMidiCheckbox) {
     136        if (_subCheckbox) {
    135137                // Music driver
    136138                const MidiDriverDescription *md = MidiDriver::getAvailableMidiDrivers();
    137139                int i = 0;
     
    145147                }
    146148                _midiPopUp->setSelected(md->name ? i : 0);
    147149
     150                // Subtitles setting
     151                _subCheckbox->setState(ConfMan.getBool("subtitles", _domain));
     152        }
     153
     154        if (_multiMidiCheckbox) {
     155               
    148156                // Multi midi setting
    149157                _multiMidiCheckbox->setState(ConfMan.getBool("multi_midi", _domain));
    150158
    151159                // Native mt32 setting
    152160                _mt32Checkbox->setState(ConfMan.getBool("native_mt32", _domain));
    153161
    154                 // Subtitles setting
    155                 _subCheckbox->setState(ConfMan.getBool("subtitles", _domain));
     162                // GS extensions setting
     163                _enableGSCheckbox->setState(ConfMan.getBool("enable_gs", _domain));
    156164        }
     165       
    157166
    158167        if (_musicVolumeSlider) {
    159168                int vol;
     
    204213                        }
    205214                }
    206215
    207                 if (_multiMidiCheckbox) {
     216                if (_subCheckbox) {
    208217                        if (_enableAudioSettings) {
    209                                 ConfMan.set("multi_midi", _multiMidiCheckbox->getState(), _domain);
    210                                 ConfMan.set("native_mt32", _mt32Checkbox->getState(), _domain);
    211218                                ConfMan.set("subtitles", _subCheckbox->getState(), _domain);
    212219                                const MidiDriverDescription *md = MidiDriver::getAvailableMidiDrivers();
    213220                                while (md->name && md->id != (int)_midiPopUp->getSelectedTag())
     
    217224                                else
    218225                                        ConfMan.removeKey("music_driver", _domain);
    219226                        } else {
    220                                 ConfMan.removeKey("multi_midi", _domain);
    221                                 ConfMan.removeKey("native_mt32", _domain);
    222227                                ConfMan.removeKey("music_driver", _domain);
    223228                                ConfMan.removeKey("subtitles", _domain);
    224229                        }
    225230                }
    226231
     232                if (_multiMidiCheckbox) {
     233                        if (_enableMIDISettings) {
     234                                ConfMan.set("multi_midi", _multiMidiCheckbox->getState(), _domain);
     235                                ConfMan.set("native_mt32", _mt32Checkbox->getState(), _domain);
     236                                ConfMan.set("enable_gs", _enableGSCheckbox->getState(), _domain);
     237                        } else {
     238                                ConfMan.removeKey("multi_midi", _domain);
     239                                ConfMan.removeKey("native_mt32", _domain);
     240                                ConfMan.removeKey("enable_gs", _domain);
     241                        }
     242                }
     243
    227244                // Save config file
    228245                ConfMan.flushToDisk();
    229246        }
     
    269286        _enableAudioSettings = enabled;
    270287
    271288        _midiPopUp->setEnabled(enabled);
     289        _subCheckbox->setEnabled(enabled);
     290}
     291
     292void OptionsDialog::setMIDISettingsState(bool enabled) {
     293        _enableMIDISettings = enabled;
     294
    272295        _multiMidiCheckbox->setEnabled(enabled);
    273296        _mt32Checkbox->setEnabled(enabled);
    274         _subCheckbox->setEnabled(enabled);
     297        _enableGSCheckbox->setEnabled(enabled);
    275298}
    276299
    277300void OptionsDialog::setVolumeSettingsState(bool enabled) {
     
    330353        return yoffset;
    331354}
    332355
    333 int OptionsDialog::addMIDIControls(GuiObject *boss, int yoffset) {
     356int OptionsDialog::addAudioControls(GuiObject *boss, int yoffset) {
    334357        const int x = 10;
    335358        const int w = _w - 20;
    336359
    337360        // The MIDI mode popup & a label
    338361        _midiPopUp = new PopUpWidget(boss, x-5, yoffset, w+5, kLineHeight, "Music driver: ", 100);
    339         yoffset += 16;
     362        yoffset += 18;
    340363       
    341364        // Populate it
    342365        const MidiDriverDescription *md = MidiDriver::getAvailableMidiDrivers();
     
    345368                md++;
    346369        }
    347370
     371        // Subtitles on/off
     372        _subCheckbox = new CheckboxWidget(boss, x, yoffset, w, 16, "Display subtitles");
     373        yoffset += 16;
     374
     375        yoffset += 18;
     376               
     377        _enableAudioSettings = true;
     378
     379        return yoffset;
     380}
     381
     382int OptionsDialog::addMIDIControls(GuiObject *boss, int yoffset) {
     383        const int x = 10;
     384        const int w = _w - 20;
     385
    348386        // SoundFont
    349387        new ButtonWidget(boss, x, yoffset, kButtonWidth + 14, 16, "SoundFont: ", kChooseSoundFontCmd, 0);
    350388        _soundFont = new StaticTextWidget(boss, x + kButtonWidth + 20, yoffset + 3, _w - (x + kButtonWidth + 20) - 10, kLineHeight, "None", kTextAlignLeft);
    351 
    352389        yoffset += 18;
    353        
     390
    354391        // Multi midi setting
    355392        _multiMidiCheckbox = new CheckboxWidget(boss, x, yoffset, w, 16, "Mixed Adlib/MIDI mode");
    356         yoffset += 15;
     393        yoffset += 16;
    357394       
    358395        // Native mt32 setting
    359396        _mt32Checkbox = new CheckboxWidget(boss, x, yoffset, w, 16, "True Roland MT-32 (disable GM emulation)");
    360         yoffset += 15;
     397        yoffset += 16;
    361398
    362         // Subtitles on/off
    363         _subCheckbox = new CheckboxWidget(boss, x, yoffset, w, 16, "Display subtitles");
    364         yoffset += 15;
     399        // GS Extensions setting
     400        _enableGSCheckbox = new CheckboxWidget(boss, x, yoffset, w, 16, "Enable Roland GS Mode");
     401        yoffset += 16;
    365402       
    366         _enableAudioSettings = true;
     403        _enableMIDISettings = true;
    367404
    368405        return yoffset;
    369406}
     
    417454        //
    418455        tab->addTab("Audio");
    419456        yoffset = vBorder;
    420         yoffset = addMIDIControls(tab, yoffset);
     457        yoffset = addAudioControls(tab, yoffset);
    421458        yoffset = addVolumeControls(tab, yoffset);
    422459        // TODO: cd drive setting
    423460       
     461        //
     462        // 3) The MIDI tab
     463        //
     464        tab->addTab("MIDI");
     465        yoffset = vBorder;
     466        yoffset = addMIDIControls(tab, yoffset);
    424467
    425468        //
    426         // 3) The miscellaneous tab
     469        // 4) The miscellaneous tab
    427470        //
    428471        tab->addTab("Paths");
    429472        yoffset = vBorder;
  • gui/options.h

    RCS file: /cvsroot/scummvm/scummvm/gui/options.h,v
    retrieving revision 1.26
    diff -u -r1.26 options.h
     
    5959        StaticTextWidget *_soundFont;
    6060
    6161        int addGraphicControls(GuiObject *boss, int yoffset);
     62        int addAudioControls(GuiObject *boss, int yoffset);
    6263        int addMIDIControls(GuiObject *boss, int yoffset);
    6364        int addVolumeControls(GuiObject *boss, int yoffset);
    6465
    6566        void setGraphicSettingsState(bool enabled);
    6667        void setAudioSettingsState(bool enabled);
     68        void setMIDISettingsState(bool enabled);
    6769        void setVolumeSettingsState(bool enabled);
    6870
    6971private:
     
    8183        //
    8284        bool _enableAudioSettings;
    8385        PopUpWidget *_midiPopUp;
     86        CheckboxWidget *_subCheckbox;
     87
     88        //
     89        // MIDI controls
     90        //
     91        bool _enableMIDISettings;
    8492        CheckboxWidget *_multiMidiCheckbox;
    8593        CheckboxWidget *_mt32Checkbox;
    86         CheckboxWidget *_subCheckbox;
     94        CheckboxWidget *_enableGSCheckbox;
    8795
    8896        //
    8997        // Volume controls
  • scumm/imuse.cpp

    RCS file: /cvsroot/scummvm/scummvm/scumm/imuse.cpp,v
    retrieving revision 2.128
    diff -u -r2.128 imuse.cpp
     
    4646
    4747IMuseInternal::IMuseInternal() :
    4848_native_mt32(false),
     49_enable_gs(false),
     50_sc55(false),
    4951_midi_adlib(0),
    5052_midi_native(0),
    5153_base_sounds(0),
     
    10711073
    10721074        case IMuse::PROP_NATIVE_MT32:
    10731075                _native_mt32 = (value > 0);
    1074                 Instrument::nativeMT32(value > 0);
    1075                 if (value > 0 && _midi_native)
     1076                Instrument::nativeMT32(_native_mt32);
     1077                if (_midi_native && _native_mt32)
    10761078                        initMT32(_midi_native);
    10771079                break;
    10781080
     1081        case IMuse::PROP_GS:
     1082                _enable_gs = (value > 0);
     1083
     1084                // If True Roland MT-32 is not selected, run in GM or GS mode.
     1085                // If it is selected, change the Roland GS synth to MT-32 mode.
     1086                if (_midi_native && !_native_mt32)
     1087                        initGM(_midi_native);
     1088                else if (_midi_native && _native_mt32 && _enable_gs) {
     1089                        _sc55 = true;
     1090                        initGM(_midi_native);
     1091                }
     1092                break;
     1093
    10791094        case IMuse::PROP_LIMIT_PLAYERS:
    10801095                if (value > 0 && value <= ARRAYSIZE(_players))
    10811096                        _player_limit = (int) value;
     
    11711186        midi->sysEx(buffer, 31);
    11721187        g_system->delayMillis (250);
    11731188
    1174         // Setup rythm part
     1189        // Map percussion to notes 24 - 34 without reverb
    11751190        memcpy(&buffer[4], "\x03\x01\x10\x40\x64\x07\x00\x4a\x64\x06\x00\x41\x64\x07\x00\x4b\x64\x08\x00\x45\x64\x06\x00\x44\x64\x0b\x00\x51\x64\x05\x00\x43\x64\x08\x00\x50\x64\x07\x00\x42\x64\x03\x00\x4c\x64\x07\x00\x44", 48);
    11761191        midi->sysEx(buffer, 52);
    11771192        g_system->delayMillis (250);
    11781193}
    11791194
     1195void IMuseInternal::initGM(MidiDriver *midi) {
     1196        byte buffer[11];
     1197
     1198        // General MIDI System On message
     1199        // Resets all GM devices to default settings
     1200        memcpy(&buffer[0], "\xF0\x7E\x7F\x09\x01\xF7", 6);
     1201        midi->sysEx(buffer, 6);
     1202        debug(2, "GM SysEx: GM System On");
     1203        g_system->delayMillis (200);
     1204               
     1205        if (_enable_gs) {
     1206               
     1207                // All GS devices recognize the GS Reset command,
     1208                // even with Roland's ID. It is impractical to
     1209                // support other manufacturers' devices for
     1210                // further GS settings, as there are limitless
     1211                // numbers of them out there that would each
     1212                // require individual SysEx commands with unique IDs.
     1213
     1214                // Roland GS SysEx ID
     1215                memcpy(&buffer[0], "\xF0\x41\x10\x42\x12", 5);
     1216       
     1217                // GS Reset
     1218                memcpy(&buffer[5], "\x40\x00\x7F\x00\x41\xF7", 6);
     1219                midi->sysEx(buffer, 11);
     1220                debug(2, "GS SysEx: GS Reset");
     1221                g_system->delayMillis (200);
     1222               
     1223                if (_sc55) {
     1224
     1225                        // This mode is for GS devices that support an MT-32-compatible
     1226                        // Map, such as the Roland Sound Canvas line of modules. It
     1227                        // will allow them to work with True MT-32 mode, but will
     1228                        // obviously still ignore MT-32 SysEx (and thus custom
     1229                        // instruments).
     1230
     1231                        // Set Channels 1-16 to SC-55 Map, then CM-64/32L Variation
     1232                        for (int i = 0; i < 16; ++i) {
     1233                                midi->send((  127 << 16) | (0  << 8) | (0xB0 | i));
     1234                                midi->send((  1   << 16) | (32 << 8) | (0xB0 | i));
     1235                                midi->send((  0   << 16) | (0  << 8) | (0xC0 | i));
     1236                        }
     1237                        debug(2, "GS Program Change: CM-64/32L Map Selected");
     1238
     1239                        // Set Percussion Channel to SC-55 Map (CC#32, 01H), then
     1240                        // Switch Drum Map to CM-64/32L (MT-32 Compatible Drums)
     1241                        midi->getPercussionChannel()->controlChange(0, 0);
     1242                        midi->getPercussionChannel()->controlChange(32, 1);
     1243                        midi->send (127 << 8 | 0xC0 | 9);
     1244                        debug(2, "GS Program Change: Drum Map is CM-64/32L");
     1245
     1246                }
     1247
     1248                // Set Master Chorus to 0. The MT-32 has no chorus capability.
     1249                memcpy(&buffer[5], "\x40\x01\x3A\x00\x05\xF7", 6);
     1250                midi->sysEx(buffer, 11);
     1251                debug(2, "GS SysEx: Master Chorus Level is 0");
     1252
     1253                // Set Channels 1-16 Reverb to 64, which is the
     1254                // equivalent of MT-32 default Reverb Level 5
     1255                for (int i = 0; i < 16; ++i)
     1256                        midi->send((  64   << 16) | (91 << 8) | (0xB0 | i));
     1257                debug(2, "GM Controller 91 Change: Channels 1-16 Reverb Level is 64");
     1258
     1259                // Set Channels 1-16 Pitch Bend Sensitivity to
     1260                // 12 semitones; then lock the RPN by setting null.
     1261                for (int i = 0; i < 16; ++i) {
     1262                        midi->send((  0    << 16) | (100 << 8) | (0xB0 | i));
     1263                        midi->send((  0    << 16) | (101 << 8) | (0xB0 | i));
     1264                        midi->send((  12   << 16) | (6   << 8) | (0xB0 | i));
     1265                        midi->send((  0    << 16) | (38  << 8) | (0xB0 | i));
     1266                        midi->send((  127  << 16) | (100 << 8) | (0xB0 | i));
     1267                        midi->send((  127  << 16) | (101 << 8) | (0xB0 | i));
     1268            }
     1269                debug(2, "GM Controller 6 Change: Channels 1-16 Pitch Bend Sensitivity is 12 semitones");
     1270
     1271                // Set channels 1-16 Mod. LFO1 Pitch Depth to 4
     1272                memcpy(&buffer[5], "\x40\x20\x04\x04\x18\xF7", 6);
     1273                midi->sysEx(buffer, 11);
     1274                memcpy(&buffer[5], "\x40\x21\x04\x04\x17\xF7", 6);
     1275                midi->sysEx(buffer, 11);
     1276                memcpy(&buffer[5], "\x40\x22\x04\x04\x16\xF7", 6);
     1277                midi->sysEx(buffer, 11);
     1278                memcpy(&buffer[5], "\x40\x23\x04\x04\x15\xF7", 6);
     1279                midi->sysEx(buffer, 11);
     1280                memcpy(&buffer[5], "\x40\x24\x04\x04\x14\xF7", 6);
     1281                midi->sysEx(buffer, 11);
     1282                memcpy(&buffer[5], "\x40\x25\x04\x04\x13\xF7", 6);
     1283                midi->sysEx(buffer, 11);
     1284                memcpy(&buffer[5], "\x40\x26\x04\x04\x12\xF7", 6);
     1285                midi->sysEx(buffer, 11);
     1286                memcpy(&buffer[5], "\x40\x27\x04\x04\x11\xF7", 6);
     1287                midi->sysEx(buffer, 11);
     1288                memcpy(&buffer[5], "\x40\x28\x04\x04\x10\xF7", 6);
     1289                midi->sysEx(buffer, 11);
     1290                memcpy(&buffer[5], "\x40\x29\x04\x04\x0F\xF7", 6);
     1291                midi->sysEx(buffer, 11);
     1292                memcpy(&buffer[5], "\x40\x2A\x04\x04\x0E\xF7", 6);
     1293                midi->sysEx(buffer, 11);
     1294                memcpy(&buffer[5], "\x40\x2B\x04\x04\x0D\xF7", 6);
     1295                midi->sysEx(buffer, 11);
     1296                memcpy(&buffer[5], "\x40\x2C\x04\x04\x0C\xF7", 6);
     1297                midi->sysEx(buffer, 11);
     1298                memcpy(&buffer[5], "\x40\x2D\x04\x04\x0B\xF7", 6);
     1299                midi->sysEx(buffer, 11);
     1300                memcpy(&buffer[5], "\x40\x2E\x04\x04\x0A\xF7", 6);
     1301                midi->sysEx(buffer, 11);
     1302                memcpy(&buffer[5], "\x40\x2F\x04\x04\x09\xF7", 6);
     1303                midi->sysEx(buffer, 11);
     1304                debug(2, "GS SysEx: Channels 1-16 Mod. LFO1 Pitch Depth Level is 4");
     1305
     1306                // Set Percussion Channel Expression to 80
     1307                midi->getPercussionChannel()->controlChange(11, 80);
     1308                debug(2, "GM Controller 11 Change: Percussion Channel Expression Level is 80");
     1309
     1310                // Turn off Percussion Channel Rx. Expression so that
     1311                // Expression cannot be modified. I don't know why, but
     1312                // Roland does it this way.
     1313                memcpy(&buffer[5], "\x40\x10\x0E\x00\x22\xF7", 6);
     1314                midi->sysEx(buffer, 11);
     1315                debug(2, "GS SysEx: Percussion Channel Rx. Expression is OFF");
     1316
     1317                // Change Reverb Character to 0. I don't think this
     1318                // sounds most like MT-32, but apparently Roland does.
     1319                memcpy(&buffer[5], "\x40\x01\x31\x00\x0E\xF7", 6);
     1320                midi->sysEx(buffer, 11);
     1321                debug(2, "GS SysEx: Reverb Character is 0");
     1322
     1323                // Change Reverb Pre-LF to 4, which is similar to
     1324                // what MT-32 reverb does.
     1325                memcpy(&buffer[5], "\x40\x01\x32\x04\x09\xF7", 6);
     1326                midi->sysEx(buffer, 11);
     1327                debug(2, "GS SysEx: Reverb Pre-LF is 4");
     1328
     1329                // Change Reverb Time to 106; the decay on Hall 2
     1330                // Reverb is too fast compared to the MT-32's
     1331                memcpy(&buffer[5], "\x40\x01\x34\x6A\x21\xF7", 6);
     1332                midi->sysEx(buffer, 11);
     1333                debug(2, "GS SysEx: Reverb Time is 106");
     1334
     1335        }
     1336
     1337}
     1338
    11801339void IMuseInternal::init_queue() {
    11811340        _queue_adding = false;
    11821341        _queue_pos = 0;
  • scumm/imuse.h

    RCS file: /cvsroot/scummvm/scummvm/scumm/imuse.h,v
    retrieving revision 1.58
    diff -u -r1.58 imuse.h
     
    5252        enum {
    5353                PROP_TEMPO_BASE,
    5454                PROP_NATIVE_MT32,
     55                PROP_GS,
    5556                PROP_LIMIT_PLAYERS,
    5657                PROP_RECYCLE_PLAYERS,
    5758                PROP_DIRECT_PASSTHROUGH
  • scumm/imuse_internal.h

    RCS file: /cvsroot/scummvm/scummvm/scumm/imuse_internal.h,v
    retrieving revision 2.39
    diff -u -r2.39 imuse_internal.h
     
    346346
    347347protected:
    348348        bool _native_mt32;
     349        bool _enable_gs;
     350        bool _sc55;
    349351        MidiDriver *_midi_adlib;
    350352        MidiDriver *_midi_native;
    351353
     
    392394        void handle_marker(uint id, byte data);
    393395        int get_channel_volume(uint a);
    394396        void initMidiDriver(MidiDriver *midi);
     397        void initGM(MidiDriver *midi);
    395398        void initMT32(MidiDriver *midi);
    396399        void init_players();
    397400        void init_parts();
  • scumm/scumm.cpp

    RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.cpp,v
    retrieving revision 1.427
    diff -u -r1.427 scumm.cpp
     
    16721672void ScummEngine::setupMusic(int midi) {
    16731673        _midiDriver = MidiDriver::detectMusicDriver(midi);
    16741674        _native_mt32 = (ConfMan.getBool("native_mt32") || (_midiDriver == MD_MT32));
     1675        if ((_gameId == GID_TENTACLE) || (_gameId == GID_SAMNMAX))
     1676                _enable_gs = false;
     1677        else
     1678                _enable_gs = ConfMan.getBool("enable_gs");
    16751679
    16761680#ifndef __GP32__ //ph0x FIXME, "quick dirty hack"
    16771681        /* Bind the mixer to the system => mixer will be invoked
     
    17201724                        if (ConfMan.hasKey("tempo"))
    17211725                                _imuse->property(IMuse::PROP_TEMPO_BASE, ConfMan.getInt("tempo"));
    17221726                        _imuse->property(IMuse::PROP_NATIVE_MT32, _native_mt32);
     1727                        _imuse->property(IMuse::PROP_GS, _enable_gs);
    17231728                        if (_features & GF_HUMONGOUS || midi == MDT_TOWNS) {
    17241729                                _imuse->property(IMuse::PROP_LIMIT_PLAYERS, 1);
    17251730                                _imuse->property(IMuse::PROP_RECYCLE_PLAYERS, 1);
  • scumm/scumm.h

    RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.h,v
    retrieving revision 1.575
    diff -u -r1.575 scumm.h
     
    11111111        int _tempMusic;
    11121112        int _saveSound;
    11131113        bool _native_mt32;
     1114        bool _enable_gs;
    11141115        int _midi;
    11151116        int _midiDriver; // Use the MD_ values from mididrv.h
    11161117        bool _copyProtection;
  • sound/mididrv.h

    RCS file: /cvsroot/scummvm/scummvm/sound/mididrv.h,v
    retrieving revision 1.43
    diff -u -r1.43 mididrv.h
     
    137137                send((  0   << 16) | (100 << 8) | (0xB0 | channel));
    138138                send((range << 16) | (  6 << 8) | (0xB0 | channel));
    139139                send((  0   << 16) | ( 38 << 8) | (0xB0 | channel));
     140                send(( 127  << 16) | (101 << 8) | (0xB0 | channel));
     141                send(( 127  << 16) | (100 << 8) | (0xB0 | channel));
    140142        }
    141143
    142144        virtual void sysEx (byte *msg, uint16 length) { }