Opened 14 years ago

Closed 13 years ago

Last modified 13 years ago

#5672 closed defect (fixed)

AGI: SQ2: Music missing notes

Reported by: SF/mokeiichi Owned by: eriktorbjorn
Priority: normal Component: Engine: AGI
Version: Keywords:
Cc: Game: Space Quest 2

Description

Throughout the game, there seem to be missing notes, most prominently in the intro scene with the shuttle arriving: Every printed letter should have a beep (here only few beeps happen) and the arrival music sometimes lacks the second voice. Another occurence is the music played, when meeting Vohaul for the first time, one voice is sometimes missing. Tested against Dosbox with Tandy or PCjr Emulation running the original Sierra interpreter. Space Quest 2 v2.0F ScummVM 4f708b0 (from 24.04.2011) built with MinGW, also happens with all recent daily builds for windows from scummvm.org

Ticket imported from: #3292778. Ticket imported from: bugs/5672.

Attachments (1)

pcjr.diff (1.0 KB ) - added by eriktorbjorn 13 years ago.
Patch against current git

Download all attachments as: .zip

Change History (8)

comment:1 by SF/mokeiichi, 14 years ago

Summary: Music missing notesAGI: SQ2: Music missing notes

by eriktorbjorn, 13 years ago

Attachment: pcjr.diff added

Patch against current git

comment:2 by eriktorbjorn, 13 years ago

My guess - though I'm far from sure - is that the missing musical notes happen when two channels are playing the same notes at the same volume, and the square wave generators for the two channels are in different phase so that the two wave forms cancel each other out.

I'm not sure why that would happen, if the channels are playing in sync, but perhaps it has to do with the "ToneChan" which to my understanding seems to be mainly responsible for generating the wave forms. Perhaps it's simply that the generator isn't properly reset at the start of a new note.

Working from that assumption, I'm attaching a patch which seems to fix the missing musical notes, at least in the intro. But I don't know if it's the correct fix.

comment:3 by eriktorbjorn, 13 years ago

Owner: set to sev-

comment:4 by eriktorbjorn, 13 years ago

Sev, I believe you added the PCjr sound code to the AGI engine? Do you have any further thoughts on this? I don't even know if the code originated somewhere else, or if it was written directly for ScummVM.

comment:5 by eriktorbjorn, 13 years ago

Owner: changed from sev- to eriktorbjorn
Resolution: fixed
Status: newclosed

comment:6 by eriktorbjorn, 13 years ago

I received some encouraging feedback on this, so I've committed it to the development version of ScummVM. I assume it will be in the next daily build on http://buildbot.scummvm.org/builds.html

It would be great if you could test one of those to see if the bug is indeed fixed, or at least lessened, by this. I'm closing the bug, but I'm not closing comment posting so if the problem persists you should be able to leave further notes about it. I hope.

comment:7 by SF/mokeiichi, 13 years ago

Thank you, all mentioned issues seem to be fixed now! :-)

Note: See TracTickets for help on using tickets.