SysEx parsing for Sam & Max
|Reported by:||SF/jamieson630||Owned by:||SF/ender|
|Cc:||Game:||Sam and Max|
The included patch adds support for MIDI SysEx code 1, which is used extensively (99% of SysEx usage) in Sam & Max.
As far as I can tell, SysEx code 1 is the Sam & Max equivalent to maybe_jump. This implementation properly handles unconditional jumps (cmd = 0), as well as track jumps (SysEx code 0, also used for vastly different purposes by Monkey2). I haven't observed any case where a cmd-based jump takes place, but that may be because some scripting hooks are not in place yet.
(That said, it's also entirely possible that SysEx code 0 is doubling as a marker, because it DOES show up at the beginning of every measure, in music that is supposed to seamlessly transition to something else based on the user's actions. Much like the markers in Monkey2. This is something to look into.)
Although I'm not sure the parser implementation is complete (or entirely correct for situations I haven't observed yet), I'm putting this out here because it DOES fix (1) the problem of no music looping in Sam & Max, and (2) the large period of silence that occurs before each new song starts playing.
Ticket imported from: #620944. Ticket imported from: patches/191.