Friday, November 13, 2009

Soundmap interrupt timing (I)

On the MESS board, attention was called to Lemmings not properly playing background music, with a plea for help.

So I started out trying to check this out in CD-i Emulator. There were some obstacles along the way, however.

The first obstacle was that the Lemmings menu screen would not display. This turned out to be very easy to fix, CD-i Emulator simply wasn't handling the CLUT4 display mode. I would have sworn this was implemented long ago, but at least it is now. I've also added RL3 display for the future.

Next, the main game would "hang" after issuing a SEEK command. Weird, as I've seen the SEEK command working in other titles. It turned out that the BIOS expected a certain bit to abort the incoming sectors and CD-i Emulator didn't honor that; it does now.

After that I got the exact same failure mode that MESS CD-i has currently: the "Let's go!" sound effect plays, followed by the sound effect that corresponds to the door opening, then background music starts to play, but dies.

Looking at a DMA trace I concurred with the MESS people that the cause was almost certainly the timing of "soundmap done" interrupts, but experiments in varying it have been unsuccesful so far.

At least Lemmings is now playable in CD-i Emulator, though without background music or sound effects :-(

Yesterday I also did some more work on AVI and WAV writing but it still isn't finished yet (too much infrastructure needed writing). I hope to finish it tomorrow.

No comments:

Post a Comment