Opened 15 years ago

Closed 14 years ago

Last modified 14 years ago

#4472 closed defect (fixed)

DW German: Enhanced music doesn't work

Reported by: SF/dhwz Owned by: bluegr
Priority: normal Component: Engine: Tinsel
Version: Keywords:
Cc: Game: Discworld

Description

1.0.0pre042729 (Jul 25 2009) on Win32 Discworld German

The Enhanced Woodcock Soundtrack doesn't work on the German Version of Discworld 1. Only track3 is played at the beginning of the game. All others are not?

Here is a debug output:

User picked target 'discworld1_de' (gameid 'tinsel')... Looking for a plugin supporting this gameid... Tinsel Engine Starting 'Tinsel engine game' Found game: dw (CD DOS/German) (13) ... new best match, removing all previous candidates Running Discworld (CD/DOS/German) File::open: opening 'german.txt' failed File::open: opening 'track3.flac' failed File::open: opening 'track3.fla' failed WARNING: Unknown MIDI offset 620146! WARNING: Unknown MIDI offset 851268! WARNING: Unknown MIDI offset 256514! WARNING: Unknown MIDI offset 851268! WARNING: Unknown MIDI offset 445600! WARNING: Unknown MIDI offset 851268! WARNING: Unknown MIDI offset 438478!

Looks like its not even trying to search for the other tracks?

Ticket imported from: #2827022. Ticket imported from: bugs/4472.

Attachments (1)

MIDI.7z (189.9 KB ) - added by (none) 15 years ago.
midi.dat german version compressed with 7zip

Download all attachments as: .zip

Change History (13)

comment:1 by SF/dhwz, 15 years ago

Priority: normalhigh

comment:2 by sev-, 15 years ago

Priority: highnormal

comment:3 by sev-, 15 years ago

Please, do not play with the tracker priorities

comment:4 by bluegr, 15 years ago

The game has all the music tracks inside MIDI.DAT, and plays them directly from the file, using file offsets. The enhanced music track to play is decided from the MIDI offset inside that file. The offsets are different depending on each version of the game. The versions I knew about are the floppy and CD .GRA file versions, and the newer .SCN file version. Apparently, your version has a (yet another) different MIDI.DAT file, which explains the "Unknown MIDI offset" error messages you're getting. Unfortunately, I don't have this version, so I can't really help.

The (non-scientific) way that these offsets were derived was to search for "FORM" inside that file, minus 4 bytes. This was used to construct the midiOffsetsGRAVersion and midiOffsetsSCNVersion arrays, and James provided the enhancedAudioGRAVersion and enhancedAudioSCNVersion arrays

by (none), 15 years ago

Attachment: MIDI.7z added

midi.dat german version compressed with 7zip

comment:5 by SF/dhwz, 15 years ago

The file isn't that big, so i've attached the midi.dat of my version, maybe that helps a bit?

comment:6 by sev-, 14 years ago

I started to work on the problem. Currently I sliced the file into separate files, sent them over to James for analysis and added offsets to ScummVM. So at least now it will not error out, though I believe the mapping is all wrong at the moment.

Awaiting proper mapping from James, that will complete the fix.

comment:7 by sev-, 14 years ago

Owner: set to sev-

comment:8 by fingolfin, 14 years ago

What is the status of this item?

comment:9 by bluegr, 14 years ago

Slight update on this:

With r52331, the hardcoded MIDI offset arrays have been removed, and they are now calculated on the fly. The MIDI -> enhanced track array is still not done, though.

What I'm thinking of is the following: we can dump the contents of the MIDI.DAT file from a known version, using the dumpMusic() function of the tinsel engine. We can then dump the files from this version, and do a binary comparison of the files in order to see which file is which and complete the mapping using the mappings that have already been done.

comment:10 by bluegr, 14 years ago

Summary: DW: Enhanced music doesn't workDW German: Enhanced music doesn't work

comment:11 by bluegr, 14 years ago

Added support for enhanced music in this version in ra796f78

comment:12 by bluegr, 14 years ago

Owner: changed from sev- to bluegr
Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.