nunuhara/xsystem4

Garbled save file names

Closed this issue · 2 comments

The Japanese version of Sengoku Rance uses save file names prefixed with "戦国ランス_".
xsystem4 does not seem to convert those file names from SJIS to UTF-8, resulting in garbled file names.

Here's a log right after the game started. MacOS refuses to create a file whose name is not a valid UTF-8.

§ゲームメイン開始
------------------------------------------------------------
*WARNING*(../src/hll/AliceLogo2.c:AliceLogo2_Init:19): Unimplemented HLL function: AliceLogo2.Init
*WARNING*(../src/hll/AliceLogo2.c:AliceLogo2_Run:21): Unimplemented HLL function: AliceLogo2.Run
*WARNING*(../src/hll/Confirm2.c:Confirm2_Init:20): Unimplemented HLL function: Confirm2.Init
*WARNING*(../src/hll/Confirm2.c:Confirm2_ExistKeyFile:21): Unimplemented HLL function: Confirm2.ExistKeyFile
*WARNING*(../src/savedata.c:read_save_file:279): Failed to open save file: ?퍑?????X_Sys.ASD: No such file or directory
*WARNING*(../src/savedata.c:save_json:105): Failed to open save file: ?퍑?????X_Sys.ASD: Illegal byte sequence
*WARNING*(../src/hll/PlayMovie.c:PlayMovie_Init:19): Unimplemented HLL function: PlayMovie.Init
*GAME ERROR*: ムービー再生の初期化に失敗しました
*WARNING*(../src/savedata.c:save_json:105): Failed to open save file: ?퍑?????X_Sys.ASD: Illegal byte sequence
*WARNING*(../src/savedata.c:save_json:105): Failed to open save file: ?퍑?????X_Sys.ASD: Illegal byte sequence
*WARNING*(../src/savedata.c:save_json:105): Failed to open save file: ?퍑?????X_Sys.ASD: Illegal byte sequence

Obviously sjis2utf() calls are needed, but I wasn't quite sure which function/layer should be responsible for that.

Thanks. It should be fixed now.

Thanks, now Sengoku Rance works on Mac very nicely. 😀