| 1176 | //TODO: this if does not what it suggest. This even break other games! |
| 1177 | if ((_midi_native) && (!_native_mt32)) { |
| 1178 | // Special setup for General Synthesizer |
| 1179 | byte buffer[11]; |
| 1180 | |
| 1181 | // General MIDI reset. |
| 1182 | // This also ensures compatibility on GS devices. We do this even |
| 1183 | // before GS reset in case there is just a plain GM device. |
| 1184 | midi->sysEx((byte*)"\x7E\x7F\x09\x01", 4); |
| 1185 | g_system->delay_msecs (200); |
| 1186 | |
| 1187 | //TODO: use this block only for SCUMM version < 6! (write a proper if state!) |
| 1188 | { |
| 1189 | // There are different GS SysEx manufacturer id's. |
| 1190 | // That's why the GS data has to be sent twice with different id's. |
| 1191 | |
| 1192 | // Roland GS SysEx |
| 1193 | memcpy(&buffer[0], "\x41\x10\x42\x12\x40", 5); |
| 1194 | |
| 1195 | // GS Reset |
| 1196 | memcpy(&buffer[5], "\x00\x7F\x00\x41", 4); |
| 1197 | midi->sysEx(buffer, 8); |
| 1198 | g_system->delay_msecs (200); |
| 1199 | |
| 1200 | // Setup reverb as used with MT-32 |
| 1201 | memcpy(&buffer[5], "\x01\x30\x00\x0f", 4); |
| 1202 | midi->sysEx(buffer, 8); |
| 1203 | |
| 1204 | // Dream/Terratec GS SysEx |
| 1205 | memcpy(&buffer[0], "\x00\x20\x00\x00\x00\x12\x40", 7); |
| 1206 | |
| 1207 | // GS Reset |
| 1208 | memcpy(&buffer[7], "\x00\x7F\x00\x41", 4); |
| 1209 | midi->sysEx(buffer, 11); |
| 1210 | g_system->delay_msecs (200); |
| 1211 | |
| 1212 | // Setup reverb as used with MT-32 |
| 1213 | memcpy(&buffer[7], "\x01\x30\x00\x0f", 4); |
| 1214 | midi->sysEx(buffer, 11); |
| 1215 | |
| 1216 | // Enable percussion reverb (GM compilant) |
| 1217 | midi->getPercussionChannel()->controlChange(91, 64); |
| 1218 | } |
| 1219 | |
| 1220 | // Set GM master volume |
| 1221 | midi->sysEx((byte*)"\x7F\x7F\x04\x01\x00\x7F", 6); |
| 1222 | } |
| 1223 | |
| 1588 | static const byte rythm_map[35] = { |
| 1589 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 1590 | 0, 0, 0, 0, 0, 0, 0, 0, 36, 37, 38, 39, 40, 41, 66, 47, |
| 1591 | 65, 48, 56}; // This emulates the setup LEC used with the MT-32 |
| 1592 | |