Opened 4 weeks ago

Last modified 3 weeks ago

#15143 new defect

SCUMM: Options dialog lists the wrong Music devices

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

Description (last modified by eriktorbjorn)

This was found while writing a response to https://forums.scummvm.org/viewtopic.php?t=17128 so perhaps there are further errors lurking here?

The Game Options dialog is supposed to show the relevant music devices on the AUdio tab or, if not specified, all of them. But this is not how it behaves for the SCUMM games. Examples:

Maniac Mansion (DOS v1, v2) list "<default>", "No music", and "AdLib emulator", even though it specifies PC Speaker and PCjr.

Fate of Atlantis (DOS) lists all devices, even though it specifies PC Speaker, AdLib and MIDI.

I think the problem is in how the SCUMM engine's customizeGuiOptions() uses MidiDriver::musicType2GUIO(). It passes a set of MDT_ bit flags to it, but that function is supposed to convert a single MT_ value.

Maniac Mansion's MDT_PCSPK | MDT_PCJR has the numerical value 5, which probably corresponds to the numerical value of MT_ADLIB. Fate of Atlantis's MDT_PCSPK | MDT_ADLIB | MDT_MIDI | MDT_PREFER_MT32 doesn't correspond to any single MT_ constant.

But I'm not sure what to make of this. Should we have a new function that converts an MDT_ value to the corresponding GUIO_ options (plural)? Or should we not have to do this at all? I notice that some game entries already specify a set of GUIO_ options for the music drivers they support, e.g. the FM Towns version of Fate of Atlantis (which I don't own). So maybe we should go through the others and add the appropriate GUIO_ options to them instead?

Either way, we probably have to consider MDT_PCSPK, according to its comment, "Maps to MT_PCSPK and MT_PCJR".

Also, we have a MDT_MACINTOSH value, but no MT_MACINTOSH flag, but maybe that's used for something else?

Change History (8)

comment:1 by eriktorbjorn, 4 weeks ago

Description: modified (diff)

comment:2 by eriktorbjorn, 4 weeks ago

Description: modified (diff)

comment:3 by eriktorbjorn, 4 weeks ago

Summary: SCUMM: Options dialog lists the wrong Music deviceSCUMM: Options dialog lists the wrong Music devices

comment:4 by athrxx, 4 weeks ago

I have made a small patch that seems to fix the games mentioned above (MM, FOA).

comment:5 by eriktorbjorn, 4 weeks ago

@athrxx Thanks, that seems to fix most of the problems.

I've gone through my LucasArts games (not the Humongous Entertainment ones yet, for lack of time). I'm missing several of course, but the ones that I have that still look a bit questionable to me are:

  • Loom (Macintosh 16 colors) offer AdLib emulator instead of Macintosh music.
  • Indiana Jones and the Last Crusade (Macintosh 16 colors) offers lots of music drivers, but only has Macintosh sound.
  • Secret of Monkey Island (Macintosh version) offers AdLib. So does the DOS CD version. Is this for sound effects?
  • Secret of Monkey Island (Amiga demo) offers a lot of music drivers, but probably only has Amiga sound. (Unless there's a difference in sound effects between them?)
  • Fate of Atlantis (Macintosh versions) offer lots of music drivers, but probably only has Macintosh sound. (Unless there's a difference in sound effects between them?)
  • Games with digital music (Escape From Monkey Island, Full Throttle, Grim Fandango, Curse of Monkey Island, The Dig) offer lots of music drivers.
  • Loom (PC-Engine), Loom (VGA) offer lots of music drivers.

I hope I didn't miss any.

comment:6 by athrxx, 3 weeks ago

I don't think that what you're describing now is related to the bug that I fixed. I rather presume that these are the sound options from the detection tables. For FM-Towns, I updated these when I added the specific sound support. But for Amiga or Mac it might be still some 20 years old values...

For the dimuse games, my guess is that the midi settings flag is completely empty (=0), so that it offers everything we have. We could change it to the opposite, making it show only default and disabled. But I think that is common gui code behavior, not something from the Scumm engine.

comment:7 by eriktorbjorn, 3 weeks ago

Probably true. I mostly just wanted to check that there were no games that were missing valid options. And I don't think there are. Just some games that offer surprising options, and I think that happens with other engines too.

comment:8 by athrxx, 3 weeks ago

I have cleaned up the Amiga, C64 and Mac sound options a bit. It should be better now.

Note: See TracTickets for help on using tickets.