Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
MIDI/SCI/KYRA: Add support for Roland GS drumkits #2059
MIDI/SCI/KYRA: Add support for Roland GS drumkits
This PR adds support for the alternate drumkits in Roland GS devices (also present in various GM devices). These are used in the MIDI data of Quest for Glory 3, Space Quest 5, Pepper's Adventures in Time and Lands of Lore.
Most of these games contain invalid drumkit numbers; they relied on a feature of the Roland SC-55 which corrected this. Later devices do not include this feature and drumkit selection would not work. This PR contains code to emulate the correction feature to make the drumkit selections work on later devices.
SCI did not send program changes on the rhythm channel. This has been added as well as the invalid drumkit number correction.
I've tested this on a Roland SC-55mkII as well as FluidSynth with a GS compatible soundfont.
This adds support for the Roland GS drumkits used by SQ5 and QfG3. The original Sierra GM driver does not pass the drumkit select MIDI messages to the GM device, but they do exist in the MIDI data. Another issue is that the drumkit numbers used are incorrect. This does work on the original Roland SC-55 devices because they correct the drumkit numbers. Later devices do not do this. Code has been added to correct these wrong drumkit numbers.
- Move the GS drumkit fallback map to generic audio code for re-use - Added comments and debug message
Lands of Lore sends several drumkit changes to Roland GS devices with incorrect drumkit numbers. This would work on some earlier devices like the SC-55, because they correct these invalid selections. This change emulates the corrections of the SC-55, so that the drumkit changes will work on later Roland GS devices.
I haven't played much of the game yet, so I haven't found any yet. The character selection screen after the intro switches to the Room drumkit, but right before the drums are actually used it switches back to Standard... There is probably more later in the game.
The GM sound effects also use alternate drumkits, but ScummVM doesn't seem to use those.