Opened 16 years ago

Closed 16 years ago

Last modified 5 years ago

#8757 closed patch

KYRA: SoundTowns Update

Reported by: athrxx Owned by: lordhoto
Priority: normal Component: Engine: Kyra
Version: Keywords:
Cc: Game:

Description

This patch adds/fixes the following:

1) volume adjust functions for SoundTowns.

2) improvements to the euphony music driver:

a) music is no longer cut of prematurely when Malcolm comes out of the serpent's grotto and when entering the kyra vault.

b) longer fadeout intervals

3) Detection code is fixed so that FM-Towns versions do not only get detected as PC-98 versions.

4) Basic functionality for the FM-Towns version of Kyra 2 (CD Audio and SFX). Intro and finale can be tested, startup() will crash.

5) Warning fixes for MSVC 8 using defines (only kyra2.cpp and soundtowns.cpp for now since I don't know if this way of doing it is appreciated)

6) Some adjustments to pak file loading (the towns version doesn't have a "filedata.fdt" file

Florian

Ticket imported from: #1848147. Ticket imported from: patches/862.

Attachments (2)

kyraSoundTownsEtc.patch (42.7 KB ) - added by athrxx 16 years ago.
FM-Towns Music Patch for Kyra
kyraSoundTownsEtc_v2.patch (43.4 KB ) - added by athrxx 16 years ago.
new version of the same patch

Download all attachments as: .zip

Change History (12)

by athrxx, 16 years ago

Attachment: kyraSoundTownsEtc.patch added

FM-Towns Music Patch for Kyra

comment:1 by athrxx, 16 years ago

Owner: set to lordhoto

comment:2 by lordhoto, 16 years ago

Some little remarks:

3) Nice addition, but does not look too much connected to a patch for the sound code. But it is ok, still I would have prefered another patch for that.

5) Definitly the wrong decision, best would be to disable those warnings in common/scummsys.h.

6) I wonder why you just use filedat.fdt if isTalkie is passed as flags, I do not have any floppy version, but I would guess it is using it too (at least the demo uses it), so maybe just not load filedat.fdt for fm-towns / pc98 versions.

Same goes for "snd_assignMusicData", there definitly a check for FM-Towns/PC98 should be used instead of isTalkie check. That cast to SoundTowns_v2 is not too nice, but I think the solution is ok, but we could think of a better solution when our Kyrandia 2 support is a bit more mature.

Apart from that it looks quite nice, except that sometimes a bit more empty lines could be used. :-) (for example after k2MusicDataID definition a empty line should be used, same goes for the end of sound_towns.cpp).

Also I wonder why Kyra2AudioThemes is not declared inside namespace Kyra? All Kyrandia specific code should be in namespace Kyra.

comment:3 by athrxx, 16 years ago

You are right about my use of the iTalkie flag to distinguish between DOS and FM-Towns. I don't know whether there actually IS a floppy version.

I think the declaration of Kyra2AudioThemes outside the namespace had something to do with MSVC8, but I can't remember...

Regarding that SoundTowns_v2 cast: I wasn't pleased with that either, but I didn't want to remodel the common sound code any more than I already did. Let's consider it a first step into the right direction.

I can't say anything about use of empty lines atm. Maybe my cleanup tool ate up more whitspace than it should have (though I doubt this).

comment:4 by lordhoto, 16 years ago

Well floppy versions definitely exist, as you can see on ebay.

comment:5 by athrxx, 16 years ago

So, the result of my "research" is this:

Floppy versions contain one language only. There is at least an English, a French and a German version. Game data is stored in 8 compressed files named Westwood.001 to Westwood.008. I am quite sure that these files aren't supported by the Kyra engine atm (they are compressed and do not store file names, so they don't have the same format as "Westwood.001" in Kyra 3).

The westwood.00? files can be extracted with the installer. The extracted data looks a lot like the PC-CDROM version except that the pak files are smaller since they contain data for one language only.

There is no filedata.fdt. However, the floppy version does have to load the same (I think) pak file names as the PC CD-ROM version.

Support for floppy versions will require quite some changes, probably also to the sequence player code. The player makes use of the isTalkie flag to distinguish between PC CD-ROM and FM-Towns/PC98 which might be incorrect. Unfortunately the exact values can only be determined via diasm (for each floppy version).

comment:6 by lordhoto, 16 years ago

We should not distinguish between different platform versions by GameFlags::isTalkie (for example FM-Towns and DOS as it is done in the patch). Which is logical as you pointed out, since for DOS floppy isTalkie would not be enabled, but it still is a DOS version, so I recommend to get rid of checks of GameFlags::isTalkie but rather check GameFlags::platform (that is why we got GameFlags::platform anyway).

Since, as you say, the sequence player code does it right now too, I would really like to change that there too, if the values are not generic for all non talkie versions, but that does not matter much for this patch right now.

by athrxx, 16 years ago

Attachment: kyraSoundTownsEtc_v2.patch added

new version of the same patch

comment:7 by athrxx, 16 years ago

I just addressed some of the remaining issues and made a new version of the patch.

1) I now use _flags.platform instead of _flags.isTalkie where it fits better, especially in the cases mentioned by lord hoto.

No changes were made to the callback functions within the sequence player code. _flags.isTalkie is used a lot in there but I simply do not know the correct values for the floppy version yet. Changing all or most _flags.isTalkie entries to (_flags.platform == Common::kPlatformPC) might be wrong in many or all cases while the present distinction could actually be correct here. I did not add support for the floppy version. I did not make a disasm for any floppy version yet. This will be necessary to determine the correct values.

2) I removed the unwelcome defines for sprintf etc.

3) I got rid of the (rightfully) critized SoundTowns_v2* cast. For a really satisfactory solution it might be necessary to modify that file list loading concept (which makes no sense for SoundTowns_v1 either).

4) The struct declaration found its way into the namespace File Added: kyraSoundTownsEtc_v2.patch

comment:8 by lordhoto, 16 years ago

Status: newclosed

comment:9 by lordhoto, 16 years ago

I commited the patch with some changes, check the commit log for more details (for example the 'TODO's I added).

comment:10 by digitall, 5 years ago

Component: Engine: Kyra
Note: See TracTickets for help on using tickets.