Hello everyone and experts
I am trying to translate the Pure JAPESE BASEBALL GAME ,Pocket R.(p.s. because I want translate the text into chinses to enjoy the story mode in the game, but kenami, seem to keep the game in Japanese forever with no hope to have a language localization)
So I try to do some work and spent/waste a lot of time
#What I have done
For runtime dump and ELF analysis of "main.nso" . It use the SHIFT-JIS(JP) encoding for the game text. There are two regions for text
##The Region 1 : from main.nso (runtime) offset 0x1CB52E0 with Big-Endian order in two byte (dump with 26213 rows)
e.g.: 0x1811| 0x1821|オーバースロー7|8349815b836f815b8358838d815b8256
##The Region 2: from main.nso (runtime) offset 0x2634710 with Littel-Endian order in two Byte (dump with 82031 rows)
e.g.:0x7dea|0x7e08|いろいろな設定が変更できます。|a282eb82a282eb82c882dd90e892aa82cf95588dc582ab82dc82b7824281
The Region 2 is more complex, for it contains text decoration, different font colors and paragraph control , which fc05,fc08(function like <color>) and fc03(function like </color>), and ffe80*** for represent different people and school, fc00(likes <br>)
For Translation, the SHIFT-JS share words in chinese, I could use SHIFT-JS encoding for 80% of word
padding 0x00 Right to its original length, e.g. 7395a5908a919693b292718ee682b3825e90ef98428100000000000000000000 despite Region 1 or Region 2
The Region 3 is in ROMFS, I am unable to do that, which I descibe below
#What I NEED
BUT FOR the OCD!!!!!! There are things I want to overcome
1.Patch Game Font 2.ROM HACK to patch remaining text <===Solving the Zlib inflate
## the GAME text ENCODING SHJIT-JIS only support to its level I, which mean it could only display the Text to 0x98x72, who over this hex value would show 〓. I found it limited by the game font(see the FNTL 28 pixel in width, and FNTS 22 pixel in width) the dump area seem not to be a actual font file but already extracted for GPU rendering
So, I dump the romfs and showed RES00.RDI(223KB,0x37a00), RES00.RBI(2.91 GB), and other sound file. The key would in the RES00.RDI and RES00.RDB.
RES00.RDI would be index file for RES00.RDB but both file seem to be zlib compressed
With IDA pro analysis. The main.nso own its ZLib function rather then import, which the inner code indentical to the SDK.nso
With analysis. I guess the step would be FileInfalteThread ==> FileThread==>read RES00.RDI==>UnCompress: **utilZlib_inflateInit2_(zstrm, 15, "1.2.11.f-N***-SDK-v1", 0x70)==>**utilZlib_inflate(__int64 a1, int *a2, int *a3, int *a4, int *a5, int *a6).
I could observe the UN_RDI(size 0x37a00) on runtime. The result look like a address table with total 8480 chunk( I Guessed map to RDB file).
But I have no idea how it inflate out. I have tried offzip with -z 15, -z -15 but only unrecognized hex. I dont know If zlib needed to provide extra parameters or byte for zlib inflate).
I am the not in IT/Game field and new to zlib, and very poor level in Japanese. I just want to enjoy the game with my native language, I need you experts help, thanks
Sincerely game 2005
I am trying to translate the Pure JAPESE BASEBALL GAME ,Pocket R.(p.s. because I want translate the text into chinses to enjoy the story mode in the game, but kenami, seem to keep the game in Japanese forever with no hope to have a language localization)
So I try to do some work and spent/waste a lot of time
#What I have done
For runtime dump and ELF analysis of "main.nso" . It use the SHIFT-JIS(JP) encoding for the game text. There are two regions for text
##The Region 1 : from main.nso (runtime) offset 0x1CB52E0 with Big-Endian order in two byte (dump with 26213 rows)
e.g.: 0x1811| 0x1821|オーバースロー7|8349815b836f815b8358838d815b8256
##The Region 2: from main.nso (runtime) offset 0x2634710 with Littel-Endian order in two Byte (dump with 82031 rows)
e.g.:0x7dea|0x7e08|いろいろな設定が変更できます。|a282eb82a282eb82c882dd90e892aa82cf95588dc582ab82dc82b7824281
The Region 2 is more complex, for it contains text decoration, different font colors and paragraph control , which fc05,fc08(function like <color>) and fc03(function like </color>), and ffe80*** for represent different people and school, fc00(likes <br>)
For Translation, the SHIFT-JS share words in chinese, I could use SHIFT-JS encoding for 80% of word
padding 0x00 Right to its original length, e.g. 7395a5908a919693b292718ee682b3825e90ef98428100000000000000000000 despite Region 1 or Region 2
The Region 3 is in ROMFS, I am unable to do that, which I descibe below
#What I NEED
BUT FOR the OCD!!!!!! There are things I want to overcome
1.Patch Game Font 2.ROM HACK to patch remaining text <===Solving the Zlib inflate
## the GAME text ENCODING SHJIT-JIS only support to its level I, which mean it could only display the Text to 0x98x72, who over this hex value would show 〓. I found it limited by the game font(see the FNTL 28 pixel in width, and FNTS 22 pixel in width) the dump area seem not to be a actual font file but already extracted for GPU rendering
So, I dump the romfs and showed RES00.RDI(223KB,0x37a00), RES00.RBI(2.91 GB), and other sound file. The key would in the RES00.RDI and RES00.RDB.
RES00.RDI would be index file for RES00.RDB but both file seem to be zlib compressed
With IDA pro analysis. The main.nso own its ZLib function rather then import, which the inner code indentical to the SDK.nso
With analysis. I guess the step would be FileInfalteThread ==> FileThread==>read RES00.RDI==>UnCompress: **utilZlib_inflateInit2_(zstrm, 15, "1.2.11.f-N***-SDK-v1", 0x70)==>**utilZlib_inflate(__int64 a1, int *a2, int *a3, int *a4, int *a5, int *a6).
I could observe the UN_RDI(size 0x37a00) on runtime. The result look like a address table with total 8480 chunk( I Guessed map to RDB file).
But I have no idea how it inflate out. I have tried offzip with -z 15, -z -15 but only unrecognized hex. I dont know If zlib needed to provide extra parameters or byte for zlib inflate).
I am the not in IT/Game field and new to zlib, and very poor level in Japanese. I just want to enjoy the game with my native language, I need you experts help, thanks
Sincerely game 2005