Opened 18 years ago

Closed 17 years ago

#2650 closed defect (fixed)

LOOM: Unknown Roland MIDI music events

Reported by: eriktorbjorn Owned by: eriktorbjorn
Priority: normal Component: Engine: SCUMM
Version: Keywords:
Cc: Game: Loom

Description

Current SVN snapshot English PC floppy version

At the very end of the clerics's music, there are some MIDI events that our "RO" MIDI parser does not know how to handle. They will pass through to the default MIDI parser, which won't know what to do with them either.

The result is that the note will hang.

This probably isn't a regression. Most players will have already opened the cage, thus ending the music, long before the bug happens. I'm attaching a patch that will turn these events into bogus META events, but that makes the music sound slightly wrong.

Ticket imported from: #1498785. Ticket imported from: bugs/2650.

Attachments (3)

ro-workaround.diff (751 bytes ) - added by eriktorbjorn 18 years ago.
Ugly workaround patch
loomtest.s25 (15.7 KB ) - added by eriktorbjorn 18 years ago.
Savegame near the end of the music
loom.s40 (14.8 KB ) - added by eriktorbjorn 17 years ago.
New savegame, just before being captured

Download all attachments as: .zip

Change History (10)

by eriktorbjorn, 18 years ago

Attachment: ro-workaround.diff added

Ugly workaround patch

by eriktorbjorn, 18 years ago

Attachment: loomtest.s25 added

Savegame near the end of the music

comment:1 by sev-, 17 years ago

Owner: set to sev-

by eriktorbjorn, 17 years ago

Attachment: loom.s40 added

New savegame, just before being captured

comment:2 by eriktorbjorn, 17 years ago

I thought for a while that the old savegame was broken, because ScummVM crashes with a failed assertion if you try to load it while using the Adlib sound driver. You have to use the native MIDI driver.

Oh well, a fresh savegame might still be useful. This one is made right before the music starts, so you can listen to the whole thing. The bug is still there. File Added: loom.s40

comment:3 by eriktorbjorn, 17 years ago

A small note to anyone seeking to reproduce this: It may sound as if the music is simply looping, but it's not. The glitch happens about 2 minutes and 45 seconds into the song.

comment:4 by sev-, 17 years ago

Owner: sev- removed

comment:5 by sev-, 17 years ago

Ah, native midi. I can not even test that :/

comment:6 by eriktorbjorn, 17 years ago

Owner: set to eriktorbjorn
Resolution: fixed
Status: newclosed

comment:7 by eriktorbjorn, 17 years ago

I think I see the problem. The marker event is usually 0xF0, but in this case (and in a few subsequent cases in the same tune) it's 0xF1. We already handled the 0xF0 case, using the next byte to add to the "delta" value of the MIDI event. But the 0xF1 case was ignored, so instead of using the next byte as delta, it was misinterpreted as an illegal MIDI event.

I'm speculating now that 0xF1 is for adding values > 255 to the delta value. Adding another 256 sounds good enough to me, so that's the change I've made now in SVN. I don't know for sure which games it affects

Note: See TracTickets for help on using tickets.