#9100 closed patch
FBEAR: Fix for MIDI piano notes (DOS version)
Reported by: | eriktorbjorn | Owned by: | Kirben |
---|---|---|---|
Priority: | normal | Component: | Engine: SCUMM |
Version: | Keywords: | ||
Cc: | Game: | Fatty Bear's Birthday Surprise |
Description
English DOS version of Fatty Bear's Birthday Surprise Current ScummVM SVN (trunk)
This patch is just proof-of-concept. It's not meant to be final.
In the DOS version of Fatty Bear's Birthday Surprise, when you play the piano it will either use a digitized sound, which is handled correctly, or a MIDI sound, which always plays the same note. This patch attempts to fix that.
Based on observation, before playing a note the game will set variable 173. For the lowest note, it sets it to 431. The next is 432, etc. I don't know the significance of these values. They don't seem to bear any relation to MIDI note values, but I've adjusted the note so that the sound when selecting the piano instrument is the same as the sound when hitting the middle key, just like the other instruments.
The variable is reset to 0 immediately afterwards. I'm speculating that we somehow need to transfer the value of this variable to the IMuse player, and adjust each "note on" event accordingly. That's pretty much what this patch does, but the actual method could probably be a bit nicer.
The Windows version of the game seems to use digitazed sounds throughout, so that version works fine already as far as I know.
Ticket imported from: #2876221. Ticket imported from: patches/1205.
Attachments (2)
Change History (9)
by , 15 years ago
Attachment: | fbear-dos-piano.diff added |
---|
comment:1 by , 15 years ago
After looking some more, I'm now thinking that my guess that variable 173 indicates the note may have been wrong. It could be the object (i.e. the piano key) instead.
One problem is that I'm not sure what (if any) parameter to descumm is the correct one to disassemble this game's scripts.
comment:2 by , 15 years ago
I believe the note is the offset read in o6_startSound() (and the frequency for digitized sounds is case 224 of o60_soundOps()).
comment:3 by , 15 years ago
That makes sense. I had forgotten about the comment in o6_startSound(). I've updated the patch accordingly. This is more like how I imagine a finished patch would be. With the first one, I got stuck on trying to add a new function to IMuseInternal, so I ended up with a slightly awkward property() call instead. This time, I figured it out.
by , 15 years ago
Attachment: | fbear-dos-piano2.diff added |
---|
New improved patch against current SVN (trunk)
comment:4 by , 15 years ago
Owner: | set to |
---|
comment:5 by , 15 years ago
The patch works well, and looks fine. So I committed to ScummVM SVN, with minor change.
comment:6 by , 15 years ago
Status: | new → closed |
---|
comment:7 by , 6 years ago
Component: | → Engine: SCUMM |
---|---|
Game: | → Fatty Bear's Birthday Surprise |
Patch against current SVN (trunk)