| 1176 | if ((_midi_native) && (!_native_mt32)) { |
| 1177 | // Special setup for General Synthesizer |
| 1178 | byte buffer[11]; |
| 1179 | |
| 1180 | //TODO: use this one for GM games (SCUMM version = 6): |
| 1181 | { |
| 1182 | // General MIDI reset (ensures compatibility on GS devices) |
| 1183 | memcpy(&buffer[0], "\x7E\x7F\x09\x01", 4); |
| 1184 | midi->sysEx(buffer, 4); |
| 1185 | g_system->delay_msecs (200); |
| 1186 | |
| 1187 | // standard percussion set |
| 1188 | midi->getPercussionChannel()->programChange(0x00); |
| 1189 | } |
| 1190 | |
| 1191 | //TODO: use this one for MT-32 games without GM support (SCUMM version < 6): |
| 1192 | { |
| 1193 | // There are different GS SysEx manufacturer id's. |
| 1194 | // That's why the GS data has to be sent twice with different id's. |
| 1195 | |
| 1196 | // Roland GS SysEx |
| 1197 | memcpy(&buffer[0], "\x41\x10\x42\x12\x40", 5); |
| 1198 | |
| 1199 | // GS Reset |
| 1200 | memcpy(&buffer[5], "\x00\x7F\x00\x41", 4); |
| 1201 | midi->sysEx(buffer, 8); |
| 1202 | g_system->delay_msecs (200); |
| 1203 | |
| 1204 | // Setup reverb and chorus as used with MT-32 |
| 1205 | memcpy(&buffer[5], "\x01\x30\x00\x0f", 4); |
| 1206 | midi->sysEx(buffer, 8); |
| 1207 | memcpy(&buffer[5], "\x01\x34\x40\x4b", 4); |
| 1208 | midi->sysEx(buffer, 8); |
| 1209 | memcpy(&buffer[5], "\x01\x3a\x10\x75", 4); |
| 1210 | midi->sysEx(buffer, 8); |
| 1211 | |
| 1212 | |
| 1213 | // Dream/Terratec GS SysEx |
| 1214 | memcpy(&buffer[0], "\x00\x20\x00\x00\x00\x12\x40", 7); |
| 1215 | |
| 1216 | // GS Reset |
| 1217 | memcpy(&buffer[7], "\x00\x7F\x00\x41", 4); |
| 1218 | midi->sysEx(buffer, 11); |
| 1219 | g_system->delay_msecs (200); |
| 1220 | |
| 1221 | // Setup reverb and chorus as used with MT-32 |
| 1222 | memcpy(&buffer[7], "\x01\x30\x00\x0f", 4); |
| 1223 | midi->sysEx(buffer, 11); |
| 1224 | memcpy(&buffer[7], "\x01\x34\x40\x4b", 4); |
| 1225 | midi->sysEx(buffer, 11); |
| 1226 | memcpy(&buffer[7], "\x01\x3a\x10\x75", 4); |
| 1227 | midi->sysEx(buffer, 11); |
| 1228 | |
| 1229 | |
| 1230 | // Activate MT-32 compatible percussion set |
| 1231 | midi->getPercussionChannel()->programChange(0x7f); |
| 1232 | } |
| 1233 | |
| 1234 | // Set master volume |
| 1235 | memcpy(&buffer[0], "\x7F\x7F\x04\x01\x00\x7F", 6); |
| 1236 | midi->sysEx(buffer, 6); |
| 1237 | } |
| 1238 | |