#8276 closed patch
MT-32 patch for Bug 810564
Reported by: | SF/jamieson630 | Owned by: | SF/jamieson630 |
---|---|---|---|
Priority: | normal | Component: | Audio: MT32 |
Version: | Keywords: | ||
Cc: | Game: |
Description
This patch addresses the OOB channel access reported in Bug [810562] ALL: missing instruments with native MT- 32. The patch establishes a channel mask that can be used to tell the MidiDriver exactly what channels to make available to the clients (e.g. iMuse).
I am not applying this directly to CVS because I do not have an MT-32 with which to test it. logicdeluxe and micqo need to test this and see if it addresses the bug. I will put it in CVS once it has been validated.
Ticket imported from: #811623. Ticket imported from: patches/381.
Attachments (2)
Change History (8)
by , 21 years ago
Attachment: | native_m32.diff added |
---|
comment:1 by , 21 years ago
How do I have to use it? I can aply the patch against the latest source and I can compile it with VC6, which works fine without any error so far. But I can't notice a difference by just running the ScummVM.exe then (Of course with native-mt32 and windows MIDI enabled in the scummvm.ini). I hooked up my Yamaha MU5 to the MIDI-Thru port, so I can watch the activity on all MIDI channels in its display. The campfire scene in MI2 still uses at least the channels 1, 12, 13, 14 and 16 which all aren't played by the MT-32. The wistle is played at channel 9 and the drums at channel 10. That are the same channels ScummVM uses with GM conversion. When going back to the campfire after the intro, the channels are assigned differently but also incorrect. I don't know much yet about the MT-32 since I'm completely new to that device. I've just got it some days ago.
comment:2 by , 21 years ago
Patch was flawed. The new .rev2.diff patch should do the trick. This issue also exposes a problem we've always had with the MI2 opening cutscene -- a channel conflict between the end of the main theme and the whistle that starts the campfire scene. With 16 channels, there's enough to go around -- but both tracks try to allocate a full 8 musical channels, which causes a problem when 8 is all there is to be had. With anything less than a full 16 channels, the whistle is inaudible until the theme music actually stops (many seconds after it's last heard).
In a desperate search for some sort of priority settings in the tracks, I have added an interpretation of SysEx 0x00 (the all- encompassing "set up everything about this channel" message) for a byte that may be used to specify a priority adjustment. It seems to work for the whistle, but such an interpretation might cause unexpected behavior elsewhere, so keep an eye (ear?) out.
Let me know if rev2 of the patch works for you. And please test it with the MT-32, in addition to whatever other test tools, before reporting back. Thanks.
comment:3 by , 21 years ago
Well, the channel mapping works correcty now with all MIDI games except for SAM, as far as I can tell. However I encoutered some MT32 issues not immediately related to the mapping, so I better file new bugs for them. I checked Loom EGA, Monkey VGA, Monkey2, FOA, DOTT and SAM with MT32 and with GM. Not completely played to the ends, but I guess this is pretty much enough checking. I found no regressions with General MIDI playback nor something that goes worse with MT32 or iMuse in general, so I think it can be commited to CVS. For SAM there are several channels not played at all. I guess ScummVM runs out of MIDI channels for some reason. Very noticable in the intro before the opening sequence. Maybe the priority mechanisnm works different than assumed or it might be implented in a different way in SAM than it is in Monkey2. So hard to tell if this is related to this patch or somewhere else in the iMuse system. Well, commit the patch, MT32 wouldn't work any better without it!
comment:4 by , 21 years ago
Patch committed. As for Sam & Max, keep in mind that S&M was the first LucasArts game that did not include native MT- 32 tracks. All of its tracks were designed for General MIDI, and as such, they may very well be using more than 8 musical channels. There appears to be a Roland driver for S&M that may be for MT-32, but I've never heard the output from it. If you can get the original distro working with MPU401, it would be worth checking out, to see if the original also has to drop instruments to make it work.
comment:5 by , 21 years ago
Status: | new → closed |
---|
comment:6 by , 6 years ago
Component: | → Audio: MT32 |
---|
Channel masking for native MT-32