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

SAGA: initial support for Japanese PC-98 version of ITE #1807

wants to merge 2 commits into
base: master


Copy link

commented Aug 14, 2019

This pull request adds initial support for the Japanese PC-98 CD-ROM version of Inherit the Earth. It's currently partially-playable, but with a number of issues. I've marked this PR as a draft right now, and I'm hoping to at least fix the voices.

  • Voices are garbled. Pretty sure this is just a matter of the wrong sample rate / bit depth, because they're just barely recognizable as the English voices. I'll investigate this further.
  • The intro plays with English subtitles, while the original version plays with Japanese subtitles.
  • The subtitles in the rest of the game use the English font, which is obviously not prepared for Japanese text, and render as mojibake. I saw a comment elsewhere that ScummVM doesn't yet support Shift JIS in this engine.
  • While most dialogue works (aside from text rendering), certain lines trigger exception similar to ResourceContext::getResourceData() wrong resourceId 2573!.

mistydemeo added some commits Aug 14, 2019

SAGA: skip music for PC-98 version of ITE
The PC-98 version of ITE has music in a different format I haven't
identified yet, so normal music handling code chokes on it. For now,
simply skipping all music allows the game to run.

@mistydemeo mistydemeo changed the title SAGA: initial support for Japanese PC-98 version SAGA: initial support for Japanese PC-98 version of ITE Aug 14, 2019


This comment has been minimized.

Copy link

commented Aug 14, 2019

Thanks :) This is quite a rare version, which is why support for it hasn't been added up to now. Regarding your questions:

  • There were several versions of ITE, and a lot of sound compression schemes were used. The engine itself tries to find the appropriate sound scheme dynamically, but some formats are specified manually, cause the respective sound files do not have any specific header. All the relevant code is in sndres.cpp, - you may be interested in lines 284 - 301. Try the following:
  1. Set GF_8BIT_UNSIGNED_PCM in the detection entry flags
  2. Check if the VOX format is used (resourceType = kSoundVOX, lines 291-293)
  3. Check if the sound files are encoded in big endian format (resource.cpp, lines 202-223) - BE encoded files are marked as GAME_SWAPENDIAN)
  • The intro strings are hardcoded. They are all in itedata.cpp, lines 655-955
  • Usually, Japanese text is stored as multi-byte, which would explain why the text is shown garbled: currently, it is assumed that all game text is single-byte. The font resources for each game version are hardcoded in its detection entry (the ITE_GameFonts lines)
  • The error shown means that probably some text resources are not properly loaded. Perhaps this is somehow related to the multi-byte issue above?

Feel free to ask any other questions that come along :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.