belek666 / fontsh234

Font extractor for Silent Hill 2/3/4 PC games
8 stars 5 forks source link

Comments on the current tool, XBOX support? #7

Open IlDucci opened 2 years ago

IlDucci commented 2 years ago

Hi there, long time no see. I see that kiminru went straight to you and that you have updated the tool, congrats.

I have some info for you and a minor request, just in case you want to take a look.

First, the info: I had a look at this PR: https://github.com/elishacloud/Silent-Hill-2-Enhancements/issues/517 , and found some info that could be useful for other users:

BTW; some quick details about the games, I got the SLPM from the Japanese Saigo no Uta from somebody else:

  • On Belek's tool, the line
    { "SLPM_123.45", sh_font::PS2_SH2, 0x002DEAB8, 10065884, 0x000FFF80 },

    Should be changed to

    { "SLPM_650.98", sh_font::PS2_SH2, 0x001E49A0, 3147032, 0x000FFF80 },

    (Not that it is actually needed by kiminru, considering the problem is Belek's tool and the US version has the entire Japanese sheet).

The font files in XBOX seem to have very similar structures as the PC version, not as the PS2 ones. Still, if someone wants to beat that tool to a pulp, it's not going to detect the elements without the info, so...

Silent Hill 2: Inner Fears (Europe):

{ "default.xbe", sh_font::XBOX_SH2, 0x0038C550, 5054464, (THIS IS THE POINTER DIFFERENTIAL BETWEEN RAM POS AND LOCAL POS. UNKNOWN IF IT'S STILL NEEDED FOR XBOX },

Whatever version kiminru sent us (US?)

{ "default.xbe", sh_font::XBOX_SH2, 0x003782B0, 4960256, (THIS IS THE POINTER DIFFERENTIAL BETWEEN RAM POS AND LOCAL POS. UNKNOWN IF IT'S STILL NEEDED FOR XBOX },

So the minor request, which I am not that interested in having besides for being complete, would be to add XBOX support. The font header seems to be very similar to the PC version, but that is all I could see. If you want to take a look, I could give you the binaries.

belek666 commented 2 years ago

Hi Thanks, I've added xbox support with minor changes in program. I've had to find offsets to data position which are different between version. "SLPM_123.45" is actually for sh2 E3 version so I will keep it.

IlDucci commented 2 years ago

Thank you!

I have tested the tool and I have some results:

Encoding char 6953, size: 1536 : [100%] Failed to get last char data: lastChar 6953 Wrong char parameters: offset: 200536 size: -1 page 0 Failed to insert char id: 6953

 - The commands I have used for PS2 are the following:

FONTSH234.EXE SLUS_202.28 n b 100 75 sh2_ps2_SLUS-20228_n.tga FONTSH234.EXE SLUS_202.28 s b 100 75 sh2_ps2_SLUS-20228_s.tga

FONTSH234.EXE SLUS_202.28 n w 100 75 sh2_ps2_SLUS-20228_n.tga FONTSH234.EXE SLUS_202.28 s w 100 75 sh2_ps2_SLUS-20228_s.tga


 - XBOX seems to work okay (I have an error when trying to export and reimport the altered Korean table, though, but with the original files everything extracts and reinserts without changing the bitmap sheet).
 - Have not tested the PC version of SH2.
IlDucci commented 10 months ago

Greetings! Yesterday I was testing the tool against Silent Hill 3 and there seems to be a bug when reimporting the smaller font, while the large font exports and imports correctly.

The error I get when trying to import the small font is simply "Wrong character width!". It happens both with the standalone fondata files, as well as in the PS2 executable.