News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: Rurouni Kenshin: Enjou! Kyoto Rinne - Translation Help  (Read 5843 times)

stephends

  • Jr. Member
  • **
  • Posts: 8
    • View Profile
Rurouni Kenshin: Enjou! Kyoto Rinne - Translation Help
« on: September 06, 2014, 06:33:47 am »
Hi All,

I have done some light PS2 hacking and translations before such as Berserk PS2 and a few other little bits to test the water. I would like to fully translate this game being a fan of the series but I have a few problems maybe someone could help me with.

I have gone through the iso files and have determined that the game text is stored in the data.afs file.
I have decompiled the data.afs using AFS file explorer.

There are a number of similarly named files (ch, cm, ga, mc, st. chrse, blank_xxx, optio, title, xxxx, came, fade, item, paus, rotb, uptb, demo, event etc) however, I have stumbled across 40 files called dialo which I am assuming must be the game text.

Now I am not sure my hex editor or pc system is setup correctly to identify the hex characters. I have been using mad edit using the Shift -JIS coding set but I do not think it is working. I then tried using windhex and the table available here but still I cannot identify any Japanese characters. Any help to get a hook on a word to start off or some more advanced instructions on getting a hex editor set up correctly would be great.

Thanks

BlackDog61

  • Hero Member
  • *****
  • Posts: 784
    • View Profile
    • Super Robot Wars A Portable translation thread
Re: Rurouni Kenshin: Enjou! Kyoto Rinne - Translation Help
« Reply #1 on: September 06, 2014, 07:13:28 am »
Hi there!
You sound like you've got the right options & setups for madedit and windhex. If anything, I'd recommend double-checking by using sjis_dump (on this site's Utility section) to check whether indeed SJIS is not used.

You see - maybe the text is not encoded as SJIS in the game. Maybe it uses a custom encoding. In that case, you need to build a table to use this custom encoding. The Getting Started section tells more about this.

I'm not sure if I've helped you here, so feel free to add more details to your question.

stephends

  • Jr. Member
  • **
  • Posts: 8
    • View Profile
Re: Rurouni Kenshin: Enjou! Kyoto Rinne - Translation Help
« Reply #2 on: September 06, 2014, 07:35:12 am »
Hi and thanks for the response.

So I tried it on one dialo named file. Here is an example of some of the output.

Quote
Position : 52
v

Position : 58
?

Position : 61
3

Position : 64
t

Position : 6d
2

Position : 70
P

Position : 77
?

So either this is not the correct file or this is not the correct encoding? What do you think?

Sorry I do not know what the expected output would be if it was using sjis.

Thanks
« Last Edit: September 06, 2014, 07:43:13 am by stephends »

BlackDog61

  • Hero Member
  • *****
  • Posts: 784
    • View Profile
    • Super Robot Wars A Portable translation thread
Re: Rurouni Kenshin: Enjou! Kyoto Rinne - Translation Help
« Reply #3 on: September 06, 2014, 09:21:11 am »
Typical parameters I use with SJIS dump:
- min length = 4
- don't dump ASCII (if you're looking at a Japanese game).

What you're showing is with minimum length = 1, which is not going to help you. ;)
You could even push it to minimal length = 10 if you just want to know if there is SJIS at all.

EDIT: the expected output is either you get some readable Japanese text, or you get garbage Japanese characters. If you get garbage, then it means the game doesn't use SJIS (or that text is encrypted, but that is not to be considered until you have tried building a table.)

stephends

  • Jr. Member
  • **
  • Posts: 8
    • View Profile
Re: Rurouni Kenshin: Enjou! Kyoto Rinne - Translation Help
« Reply #4 on: September 06, 2014, 05:04:28 pm »
So the dial file I used the dump on with the correct parameters but the file was empty so looks like the text is not in this file at all. Instead I used the dump on the compressed data.afs and got the following...

Quote
Position : 7067
具ヴ鑰厄

Position : 7c05
闃琲駑隼

Position : cd9f
抵0鏃M

Position : e1ec
闊鞨靜◇

Position : 13904
具カ錣ゑ

Position : 15034
險槇搾{

Position : 1b02e
費り・鞅

Position : 1c2fc
Йり・隕

Position : 1e5b3
厄;韋鏖

Position : 1fce7
程畆穣・

Position : 21be2
・り・霽

Position : 229d4
闕韋寿硅浄

Position : 28542
糀▲靼靂

Position : 28664
跣;韋阯

There is 2,215,156 lines in my output file. Think I need to just go through the uncompressed.afs file one by one and see if I can locate the files which contain the text.

Edit: So looking through the log I found this: メモリーカード(PS2)が差されていません。

Then I managed to find the location of it in the data.afs hex file!!! Looks like I can just alter this data.afs with a hex editor to change the text. Now to test that I can compile it again, and the changes work
 

September 06, 2014, 06:00:30 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
Okay so I made some progress. The first screen when the game boots on ps2 is a memory card warning. I found the first line ( メモリーカード差込口1の ) however there were 41 occurrences of the same line in the data.afs file. Does any one know why this is repeated so many times?

So I changed all of them because I was not sure which one would actually take effect. So I changed the first few characters to ABCD however once compiled they are displayed as 3456 in game. Is this due to the difference in encoding?

If anyone could answer my questions that would be great. Here is a screenshot showing the game and the hex editor. http://imgur.com/Juw9eQf

« Last Edit: September 06, 2014, 06:00:31 pm by stephends »

BlackDog61

  • Hero Member
  • *****
  • Posts: 784
    • View Profile
    • Super Robot Wars A Portable translation thread
Re: Rurouni Kenshin: Enjou! Kyoto Rinne - Translation Help
« Reply #5 on: September 07, 2014, 01:55:15 am »
Good! Keep going.

Okay so I made some progress. The first screen when the game boots on ps2 is a memory card warning. I found the first line ( メモリーカード差込口1の ) however there were 41 occurrences of the same line in the data.afs file. Does any one know why this is repeated so many times?
Let's just say some optimizations are not a high priority when developing a game. There's a nice thread about weird things found in games, if you're curious. EDIT: here it is:
http://www.romhacking.net/forum/index.php/topic,14700.msg213908.html#msg213908

There's also this about visible glitches in games:
http://www.romhacking.net/forum/index.php/topic,15438.msg226560.html#msg226560


So I changed all of them because I was not sure which one would actually take effect. So I changed the first few characters to ABCD however once compiled they are displayed as 3456 in game. Is this due to the difference in encoding?
Yes, that's a definite possibility. Play with values in that string, since you have it, and see how the game displays the values. That'll tell you a lot about its encoding (and let you build a table that has SJIS + the game's specifics, for instance.)
« Last Edit: September 07, 2014, 02:04:29 am by BlackDog61 »

stephends

  • Jr. Member
  • **
  • Posts: 8
    • View Profile
Re: Rurouni Kenshin: Enjou! Kyoto Rinne - Translation Help
« Reply #6 on: September 07, 2014, 04:13:36 am »
Thank you for you help! Going to work on getting a table for this game set up today. Will post back some progress as I go along.

If anyone is interested in helping translate this game, please let me known as I am not the most fluent Japanese speaker at all :)))

September 07, 2014, 07:06:30 am - (Auto Merged - Double Posts are not allowed before 7 days.)
Okay so going through and making good progress on the table however...I am up to hex values 80+ but when I do a search and replace in mad edit it causes the replaced values to turn into magic e numbers. Is this a bug with mad edit or to do with the fact Japanese characters have double byte encoding?

SOLVED this is due to the way the game is encoded. Found this table on the internet which is exactly what the game abides by - ftp://ftp.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/JIS/SHIFTJIS.TXT

http://imgur.com/gRWwe3n

September 07, 2014, 08:55:55 am - (Auto Merged - Double Posts are not allowed before 7 days.)
Okay, another update. Using some of the 4 byte English characters in this file, I followed the pattern to produce some more English characters. When I check them in game they come up as green spaces, which I am guessing means there is not font for these characters.

http://imgur.com/Ylno0JX

Edit - Went through using this table ( ftp://ftp.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/JIS/SHIFTJIS.TXT) looks like these hex values have not been assigned in game font

Does anyone know a good tutorial on how to alter/create game font?

Thanks
« Last Edit: September 07, 2014, 12:20:27 pm by stephends »

BlackDog61

  • Hero Member
  • *****
  • Posts: 784
    • View Profile
    • Super Robot Wars A Portable translation thread
Re: Rurouni Kenshin: Enjou! Kyoto Rinne - Translation Help
« Reply #7 on: September 07, 2014, 12:28:32 pm »
About changing a game's font:
There's probably things available in the good guide from FAST. (It's about the GBA and NDS but actually can be applied to a lot of systems.) Roughly the steps are:
- find the graphics file that contains the images for the characters in the font (can be one big graphic, a tiled graphic, who knows? Everything is possible). I like TiledGGD for this, but choice is yours.
- Edit the graphics so that you replace some Japanese characters with English characters. Remember the corresponding code used by the game (which Kanji is replaced by 'A' tells you how to get the game to display 'A' later). Build the table as you edit the graphics.
- Insert your graphics back into the game.

At that point, you should be ready to enjoy a fixed-width English-capable font. :thumbsup: You'll probably realize that a variable-width font would look nicer, but that involves ASM. So get there first, and then take your time to learn about that. One step at a time! ;)

stephends

  • Jr. Member
  • **
  • Posts: 8
    • View Profile
Re: Rurouni Kenshin: Enjou! Kyoto Rinne - Translation Help
« Reply #8 on: September 07, 2014, 01:15:45 pm »
Thanks for all your help black. Do you have a link to the full tutorial please?

Now I need to rummage through these files. Its annoying because this afs file explorer results in all the listed files having no format. Could you recommend a better one?

Almost there :P

UPDATE: Okay so using ASF file explorer and its image recognizer I have found 10 files which contain font. The first one I found had the following bmp images, kanji, font1, 0kanji. I am trying to open them but am struggling to use the TiledGDD. Does anyone have a good beginners guide for this program or something similar? The tutorial that comes with the program is a little confusing.
« Last Edit: September 08, 2014, 04:15:59 pm by stephends »

BlackDog61

  • Hero Member
  • *****
  • Posts: 784
    • View Profile
    • Super Robot Wars A Portable translation thread
Re: Rurouni Kenshin: Enjou! Kyoto Rinne - Translation Help
« Reply #9 on: September 09, 2014, 03:18:42 am »
Thanks for all your help black. Do you have a link to the full tutorial please?
http://filetrip.net/nds-downloads/utilities/download-gba-and-ds-rom-hacking-guide-2014-preview-1-f32908.html
Long read, but a good one. Not so much a tutorial, as a reference document to get into things.

Now I need to rummage through these files. Its annoying because this afs file explorer results in all the listed files having no format. Could you recommend a better one?
Sorry - no, I'm not into PS2 that much.

UPDATE: Okay so using ASF file explorer and its image recognizer I have found 10 files which contain font. The first one I found had the following bmp images, kanji, font1, 0kanji. I am trying to open them but am struggling to use the TiledGDD. Does anyone have a good beginners guide for this program or something similar? The tutorial that comes with the program is a little confusing.
I don't have any tutorial... Trial and error has been my thing. You can try crystaltile2 if you find that one better. The problem with Crystal tile is that it is focused on tiled graphics (where many PS* graphics don't seem to be tiled).
Try different width, 'cause they give different results.
Set your colours (in the palette menu) to 4 bytes per colour.
Try different bits per colour in the image menu (2/4/8).
Looking at the text in game can tell you quite a few things: does it have a single colour or not? If not,you can skip 1 bpp, and even try to guess how many colours are there.
If you have a debugger that can display loaded texture, you might see some with text inside them. Wit any luck, their width could be the same width as the image you're looking for.

Stupid question: have you tried just opening these files with Gimp?

Another possibility: try and use TextER to see if it can find these images as TIM's.
EDIT: There's a more recent tool in the making (might be better or not): http://www.romhacking.net/forum/index.php/topic,18357.msg263618.html#msg263618

Note: most of the time, we just don't know what formats we are facing. There could be "magic numbers" at the start of the file that give a hint as to the format (TIM/GIM/BMP...)
« Last Edit: September 09, 2014, 03:24:18 am by BlackDog61 »

stephends

  • Jr. Member
  • **
  • Posts: 8
    • View Profile
Re: Rurouni Kenshin: Enjou! Kyoto Rinne - Translation Help
« Reply #10 on: September 10, 2014, 03:54:08 am »
That document is really good, and a recommended read for anyone who is starting rom hacking. Useful links and information. Thank you for this.

So plan of action is now...

Get these font files viewable using some type of font tool.
Replace Japanese characters with English characters
Get sine to display in game

I will report back on my progress hopefully tonight or tomorrow.


September 11, 2014, 04:05:40 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
Okay, so I tried textER with no luck on any of the files.

When I find the font with ASF file explorer it lets me export it out but there is no file type. I tried using rainbow and crystaltile but they reject the file flat out.

I checked the extracted font with a hex and checked the magic numbers. They are all being put out as bmp apparently (not sure if this is because the AFS explorer only allows that). So if I manually change the file from font01 to font01.bmp I can open it in photoshop but it shows these blurry images. I think I can make out characters.

So with these images I am trying to use tileGGD but to no avail.

What do you make of this? - http://imgur.com/VnuzJq8

September 14, 2014, 05:42:56 am - (Auto Merged - Double Posts are not allowed before 7 days.)

UPDATE 14/09/2014

Okay so we have found the font files in the data.afs file by using AFS file explorer and its built in image viewer.

http://imgur.com/9mTuQre
 
The image viewer does not seem able to read the font correctly and corrupts it / blurrs it.

I have uploaded the font files here in the hope that one of you very talented people can help me decode the binary to view the true image or can provide a tool to help.

https://www.dropbox.com/s/81id2hdf9ik3fuh/font.zip?dl=0

Blacks Findings

Quote
Let me rephrase:
- I've used AFS explorer OK and seen the files you pointed in the screenshot
- I read in the image preview window that these files you pointed are supposedly named with "font" in the name, so we can highly suspect that they contain the font.
- I see in the image preview window that there is an image that *somewhat* resembles a font; But it's blurry/ imprecise. It is so because either the image preview window does not have the right parameters to interpret the bytes correctly to build the image, or this is not a font image.

I tried various settings with TiledGGD and CrystalTile2 but did not succeed.
So you need someone else's help (someone better at this than me).
That someone will need the screenshots, too, but the source data is really the "910" and "000" etc files (the binary), not the exported PNG / BMP. (That exported image is faulty. The export must be corrected.)

I hope that clarifies.

Anyone that could help with this would be my hero.

Thanks

« Last Edit: September 14, 2014, 05:43:42 am by stephends »

BlackDog61

  • Hero Member
  • *****
  • Posts: 784
    • View Profile
    • Super Robot Wars A Portable translation thread
Re: Rurouni Kenshin: Enjou! Kyoto Rinne - Translation Help
« Reply #11 on: September 15, 2014, 01:28:57 pm »
Blacks Findings

I wouldn't actually call what I wrote findings, 'cause they're not. I guess we need someone with a better eye than me on this one!