Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TINSEL: Add detection for Discworld 1 PSX Ger/Jap PSX versions #3086

Merged
merged 2 commits into from Jun 24, 2021

Conversation

eddebaby
Copy link
Contributor

@eddebaby eddebaby commented Jun 23, 2021

Follow up on: https://bugs.scummvm.org/ticket/11368

Adds detection for German Playstation version.
Also corrects detection of Japanese Playstation version.

getSampleIndex and getSampleFile in tinsel.cpp now fallback to ENGLISH files if they fail to find (e.g.) GERMAN.IDX.

This was an easy way to add support for the PSX German CD, without breaking the German DOS CD, Japanese PSX CD etc.

The German PSX version should be as compatible as the English PSX version.

The Japanese PSX version subtitles are not supported, and cause ScummVM to crash when you first try to hover over an object. However, you can view the intro cutscene, and hear the audio.

__
Edit: I only marked as draft as this is my first submission, the code should be ready as is.

@eddebaby
Copy link
Contributor Author

eddebaby commented Jun 23, 2021

Files need to be extracted/split correctly from DISCWLD.LFD/DISCWLD.LFI.

discworld_quickbms_script.zip

The attached QuickBMS script can be used on the German and Japanese CDs to extract the data, or could be used to inform handling the LFD/LFI files directly in ScummVM.

The QuickBMS script mention in the above request ticket isn't quite right for the Discworld 1 files, so I revised it. (Instead of an OFFSET, that field is an INDEX of 2KB data chucks, so apart from the first file, the available discworld2.bms script produces junk data with the German and Japanese Discworld 1 PSX discs.)

engines/tinsel/tinsel.cpp Outdated Show resolved Hide resolved
engines/tinsel/tinsel.cpp Outdated Show resolved Hide resolved
@bluegr
Copy link
Member

bluegr commented Jun 24, 2021

Overall, the changes to the detection entries look OK. Regarding the checks for file existence, you can use the static method Common::File::exists(), instead of needlessly initializing TinselFile

@sev-
Copy link
Member

sev- commented Jun 24, 2021

Please, rename the commit in accordance with our guidelines (https://wiki.scummvm.org/index.php?title=Commit_Guidelines) e.g. to something like "TINSEL: Add detection for Discworld 1 PSX Ger/Jap PSX versions"

Follow up on: https://bugs.scummvm.org/ticket/11368

Adds detection for German Playstation version.
Also corrects detection of Japanese Playstation version.

Files need to be extracted/split correctly from DISCWLD.LFD/DISCWLD.LFI. I will attach a QuickBMS script to the PR, which can be used on the German and Japanese CDs to extract the data, or could be used to inform handling the LFD/LFI files directly in ScummVM. The QuickBMS script mention in the above request ticket isn't quite right for the Discworld 1 files.

getSampleIndex and getSampleFile in tinsel.cpp now fallback to ENGLISH files if they fail to find (e.g.) GERMAN.IDX.

This was an easy way to add support for the PSX German CD, without breaking the German DOS CD, Japanese PSX CD etc.

The German PSX version should be as compatible as the English PSX version.

The Japanese PSX version subtitles are not supported, and cause ScummVM to crash when you first try to hover over an object. However, you can view the intro cutscene, and hear the audio.
@eddebaby eddebaby force-pushed the discworld_detect_psx_ger_and_jpn branch from 2ebae7d to 37e2548 Compare June 24, 2021 10:56
@eddebaby eddebaby changed the title Add detection for Discworld 1 PSX Ger/Jap PSX versions TINSEL: Add detection for Discworld 1 PSX Ger/Jap PSX versions Jun 24, 2021
When testing if the chosen <LANG>.IDX file exists - use Common::File::exists() instead of initialising a new TinselFile f, and using f.open
@eddebaby eddebaby marked this pull request as ready for review June 24, 2021 11:30
@eddebaby
Copy link
Contributor Author

eddebaby commented Jun 24, 2021

Thanks @sev- and @bluegr - everything should be good now.

@bluegr
Copy link
Member

bluegr commented Jun 24, 2021

Thanks for your work! Merging

@bluegr bluegr merged commit 014e539 into scummvm:master Jun 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants