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

Author Topic: A rookie attempt at a Valkyria Chronicles 3 translation  (Read 13657 times)

RPT111

  • Jr. Member
  • **
  • Posts: 5
    • View Profile
A rookie attempt at a Valkyria Chronicles 3 translation
« on: December 16, 2011, 03:34:35 am »
Hello again.

So far I have reached out to a few forums for help, but I think I will keep a log on here of what I have done and plan. What I have done is pretty much all rookie stuff.
Day One
1.Did research (google)
2.Got some tools
3.Got the ISO file
Day two
1.Watched a ton of youtube videos on Hex editing
2.Unpacked the iso file into its parts
Day three
1. More research and asking for help.
2. Test modding simple HEX code to try and get the hang of it.
Also, unpacked a US ver of VC2 to try and use as a comparison.

The tools I have used so far have been Magic ISO and MadEdit
These tools have been advised to be used by people online.
Magic ISO has been used to unpack the ISO
MadEdit is being used for its ability to display Japanese language.

The ISO file I was able to extract are
The folders
INSDIR
SYSDIR
USRDIR

The files
ICON0
PARAM.SFO
PIC0
PIC1
SND0.AT3

INSDIR contains
DATA.BIN
ICON0
PIC1

SYSDIR contains
UPDATE (folder)
inside the folder is
DATA.BIN
EBOOT.BIN
PARAM.SFO
out side folder is
BOOT.BIN
EBOOT.BIN
OPNSSMP.BIN

USRDIR folder contains
folder ICON
folder MODULE
folder MOVIE
folder STREAM

now a list of what the folders have in the USRIDR folder
ICON contains
SS_ICON0
SS_PIC1

MODULE contains
LIBFONT.PRX

MOVIE contains
MV00.PMF files going from 00 to 13

Stream contains
OD_STREAM
OD_VOUICE

So those are the files I am working with. Sorry for the long list, but once again i am a beginner and might as well write everything down to what I am doing.
The US ver of VC2 (The second game) has the same file set up. I am starting to believe that these games are encrypted (words from I rookie mind you). I have not seen any words in the English ver.
I have mainly been looking in the LIBFONT.PRX file

Any advise/help as to where to go from here will be great. My plans of right now are to still tinker with the US ver of the previous game to try and get some footing. Also, to continue reading, watching videos, and practicing with simpler things. Sometimes you got to work out before you run a marathon.

If you read this boring mess thank you and please share any input.






StorMyu

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
Re: A rookie attempt at a Valkyria Chronicles 3 translation
« Reply #1 on: December 16, 2011, 07:56:17 am »
The ISO file I was able to extract are
The folders
INSDIR
SYSDIR
USRDIR
INSDIR = Instal Directory, it means there's an Instal option in the UMD to remove some loading time, that's what it is.
SYSDIR = System Directory, you can look the Eboot.bin as the .exe of the game, and the UPDATE folder in it it's just a firmware update program.
USRDIR = (Never really knew the name) , that's just all the data from the game.

Be aware of something though, sometimes you can have some texts inside the Eboot of the sysdir.

Also, .PMF are movie (obvious heh), and stop looking at the libfont.prx, mostly with an hex editor. a Disassembler would be better for Eboot.bin/.prx files (even if you'll probably understand nothing)

RPT111

  • Jr. Member
  • **
  • Posts: 5
    • View Profile
Re: A rookie attempt at a Valkyria Chronicles 3 translation
« Reply #2 on: December 16, 2011, 09:55:14 pm »
Thanks, what disassembler would you suggest I use? Plus, whatever I don't understand I will just try and learn. This is all been good experience I hope to apply to my future classes.

Auryn

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
Re: A rookie attempt at a Valkyria Chronicles 3 translation
« Reply #3 on: December 16, 2011, 10:57:00 pm »
The best tool for PSP Iso is UMDGen with extra tools for it.

The most important files are the eboot, boot, opnssmp and I believe you made a little error, are you sure data.bin is under update??
All other files are not important for a translation, optionals (like the ICON0, PIC0, PIC1) or are advanced stuff (like the PRX).

RPT111

  • Jr. Member
  • **
  • Posts: 5
    • View Profile
Re: A rookie attempt at a Valkyria Chronicles 3 translation
« Reply #4 on: December 17, 2011, 02:09:05 am »
Yeah, there is a data.bin file under update (double checked). I know that most of those files are not what I need. But, this is a whole baby steps thing.

Just started up UMDGen, wow!, very nice program. I just need to hunt down the text. I have checked out all of the files in the US ver of VC2 and can not find a hint of text information.

Anyone with any ideas?

December 17, 2011, 03:47:25 am - (Auto Merged - Double Posts are not allowed before 7 days.)
OK, so a update. It looks that I have to learn the process of making tables. My worry is that I will have problems identifying what the original table will look like to replace. From reading the The Definitive Guide to ROM Hacking for Complete Beginners   written by InVerse  that was posted for beginners it looks like this area is what will need the bulk of my energy. At the same time looking how to apply this to a disassembler program.

VIII. Section Four - Editing Text
 *-=*=-=-=*=-=-=*=-=-=*=-=-=*=-=-=*=-=-=*=-=-=*=-=-=*=-=-=*=-=-=*=-=-*

 0401: How do I edit text?

 You open the ROM in a hex editor, along with the appropriate table,
 and edit away. (See Section Eleven - Tools for a recommendation of
 hex editors.)


 0402: What is a table?

 A table is a file that tells a hex editor what font characters
 correspond with what hex values. Tables are only readable by hex
 editors that are specifically designed for ROM hacking purposes.


 0403: How do I make a table?

 It's a relatively simple process but still goes beyond the scope of
 this FAQ. Consult the document The Definitive Guide to ROM Hacking
 Tables by InVerse or Tables for Dummies by satsu.


 0404: What if the text I want to edit is in Japanese?

 You edit it just like you do English text. You'll need a table that
 includes Japanese characters if you want to see them in the hex
 editor. For information on translating Japanese, see Section Ten.


 0405: How do I get more space for my text?
 
 You'll quickly find out that you can't simply add more text to a ROM.
 In order to make more room for your text, you'll have to learn to
 hack pointers. Consult the document The Mad Hacker's Guide to
 Pointers by The Mad Hacker.


 0406: Why can't I find the text I want to edit?

 There are 2 possibilities. First, if you can find some but not all of
 the text, perhaps the game uses more than one font. This can result
 in needing more than one table. Consult The Definitive Guide to ROM
 Hacking Tables by InVerse for more information on this.

 Secondly, it's possible that the ROM you chose has a compressed
 script. If this is the case, it will require assembly level hacking
 to decompress the script. This isn't something a novice is likely to
 grasp, so I recommend putting the project aside until you've mastered
 the basics of ROM hacking. Then you can try more advanced subjects.
 (See Section Nine)


 0407: What is a script?

 A script is a file containing all of the text from a game. Rather
 than hacking the text directly in a hex editor, you can extract a
 script, change the text as you see fit in a word processing program,
 then reinsert the script.


 0408: How do I extract/insert a script?

 If your ROM's script uses a consistent format, you can use one of the
 prebuilt script dumpers. If there are any strange features in your
 ROM's script, you might have to build a custom script dumper. (See
 Section Eleven - Tools.)


 0409: How do I build a custom script dumper?

 This will require knowledge of C, Visual Basic or some other
 programming language and involves more than just ROM hacking.


December 17, 2011, 05:46:35 am - (Auto Merged - Double Posts are not allowed before 7 days.)
OK, I ran all these files through the ringer. They are encrypted!!! I used a ASCII to English and back to find simple words in the code with the search function with the ASCII code. No luck. I ran the same search on a very simple program and it worked. There is very minor English text, but I think that only is used to label what the file is being used for. I have read the next step is to reverse engineer the code to figure out the encryption. I do not know how to do that at all. Google has been less than friendly on info for this subject.

Is there anyone out there that has done such a thing that can help out? I have learned more then I have thought I could by myself. This though might be WAY over my head.
« Last Edit: December 17, 2011, 05:46:35 am by RPT111 »

StorMyu

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
Re: A rookie attempt at a Valkyria Chronicles 3 translation
« Reply #5 on: December 17, 2011, 07:46:45 am »
encrypted.... Japanese is Shift-jis encoding most of the time. You don't really need a tbl.

Auryn

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
Re: A rookie attempt at a Valkyria Chronicles 3 translation
« Reply #6 on: December 17, 2011, 11:23:17 am »
Download yourself MadEdit, open the file you want to search, go to  View>Encodings>All Encodings and select Shift-JIS and if you find nothing, try UTF-8.   

If the game uses SJIS and you are curious to see how the table would look like, you can download it from here but i repeat, you don't need it to translate.

RPT111

  • Jr. Member
  • **
  • Posts: 5
    • View Profile
Re: A rookie attempt at a Valkyria Chronicles 3 translation
« Reply #7 on: December 17, 2011, 10:02:22 pm »
got madedit
viewing japanese text is not an issue.
First I am starting to work on editing the US ver of VC2 so I can get some footing.

@StorMyu I mean encrypted as in they made it so you can not see text at all. I have been having a harder time finding text in the US game than the Japanese game. Go figure.
 
Thanks to Auryn I have not tried UTF-8 I will be trying that tomorrow. Tonight I have a date with Skyrim.

Once again guys thanks for he input. Over this last week, working with this, I have learned a good deal about Hexadecimal language. Plus, how much I miss visual basic and HTML stuff lol.

Ryusui

  • Hero Member
  • *****
  • Posts: 4989
  • It's the greatest day.
    • View Profile
    • Tumblr
Re: A rookie attempt at a Valkyria Chronicles 3 translation
« Reply #8 on: December 17, 2011, 10:04:13 pm »
Once again guys thanks for he input. Over this last week, working with this, I have learned a good deal about Hexadecimal language. Plus, how much I miss visual basic and HTML stuff lol.

Hexadecimal isn't a language. It's a number system, like decimal and binary. You're thinking of ASM/machine code.
In the event of a firestorm, the salad bar will remain open.

Whacka

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: A rookie attempt at a Valkyria Chronicles 3 translation
« Reply #9 on: January 06, 2012, 02:49:05 am »
I've been poking around VC3 E2 for a while.
The main game files are encrypted within a Criware .CPK file in the INSDIR data.bin, i.e. the game loads them directly from the on-disk data install file.
Looking at libfont.prx would be useless I think, .prx files are the PSP equivalent of .dll files.

To deal with the data.bin archive;
 - Run the game to the title screen with the JPCSP emulator to decrypt the data.bin (into it's tmp folder).
 - Unpack it to 1000~ files with the program "QuickBMS" and it's Criware .cpk script.
 - Repack with the Criware SDK (uncompressed, filename only).
 - You can test the game in JPCSP by replacing the original decrypted file with the repacked one.
 - Currently no way to reencrypt.

I'm not having much luck finding the actual text though.
I think it's within the .MXE files, in some a byte-swapped format or something (a hint might be the UCS2JIS.CNK and JIS2UCS.CNK files also within the data.bin file).
I've been able to find some SJIS strings in the later mission and the game_info_xxx.mxe files (maybe the DLC intergrated into the E2 version used SJIS?)

e.g.;
帝国軍に遭遇しました。

If anyone can help, much appreciated.

azwald

  • Guest
Re: A rookie attempt at a Valkyria Chronicles 3 translation
« Reply #10 on: January 25, 2012, 10:52:07 am »
I;m also trying to translate this game(well.. using ATLAS or Google Translate)
based on "SCRIPT_LIST.BIN", seems like the scripts are actually in EV*****.MSB files
and I think EV stands for event, and the first number stands for the episode

RetroProf

  • Full Member
  • ***
  • Posts: 137
    • View Profile
Re: A rookie attempt at a Valkyria Chronicles 3 translation
« Reply #11 on: January 28, 2012, 04:14:13 am »
I've read, on the GameFAQs board for VC3, that there is a Chinese fan-translation/unofficial patch available for VC2.

Is it possible it might prove helpful when hacking the ISO for its sequel VC3?

http://www.gamefaqs.com/boards/605969-valkyria-chronicles-iii-unrecorded-chronicles/59590984


Anyway, if you get anywhere with this, don't worry about translating all the story text. Just get a working patch for the menus and I'm sure everyone would be happy. Right now I've got a 10 page print out of the translation document on GFAQs and while adequate, obviously isn't convenient as actually being able to instantly recognise what a menu tab means.

Whacka

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: A rookie attempt at a Valkyria Chronicles 3 translation
« Reply #12 on: February 01, 2012, 08:41:36 am »
I've made a little progress;
Firstly, I edited the text in VC2's RAM (VC3 crashes when loading a savestate) - The game can render Katakana and Hiragana (didn't test kanji though.), and automatically adjusts the text box to fit whatever text it's rendering (I assume this would make reinsertion fairly easy.).

Tried "Hello World!" first then wrote "Kurt" on top of it :D .

Secondly, I tried to learn a bit about debugging and the game (VC2) seems to write each character using a MIPS "or" command and then subtract 1 from it.
Here I set a breakpoint to the letter "A";
Code: [Select]
106919 [Odin_Main] INFO  memory - 0x08BCF7F0 - write8(0x09680DA0, 0x42)
148495 [Odin_Main] INFO  memory - 0x08BDA5B8 - write8(0x09680DA0, 0x41)

So "!" becomes "space", "B" becomes "A" etc.

I don't really know anything about assembly or even writing a program though, so I can't get past this point and I doubt anyone wants to teach me, but I hope this helps someone!
Also I didn't mention it in my first post but I've got a basic knowledge of Japanese, my keigo, dialects and military vocabulary are a bit lacking but I'd be willing to translate a some of the game - from playing it this is definitely too big a translation job for just one person though.

Unfortunaly in the thread Szczepaniak posted they can't even locate the translation... I can't speak Chinese either :( .
« Last Edit: February 01, 2012, 08:48:59 am by Whacka »

Hyper Inferno

  • Guest
Re: A rookie attempt at a Valkyria Chronicles 3 translation
« Reply #13 on: February 20, 2012, 07:08:12 pm »
Have you gotten any farther in messing around with the text of VC3? A serious translation effort has started up on Gamefaqs to get the game into English. Right now, the translators are mostly working from the Chinese patch of VC3, but trying to extract text from that version just returns gibberish.

Remnence

  • Guest
Re: A rookie attempt at a Valkyria Chronicles 3 translation
« Reply #14 on: February 22, 2012, 01:46:46 pm »
I've been messing about with the unpacked files as well.

I've determined that the JIS2UCS.cnk is some sort of conversion table. You can view it properly in UTF-16LE. Leading me to guess that at least some of the content is in Shift-JIS and the others in UTF-16LE. It does seem to be the .mxe files that contain at least some of the games writing but I can't get a solid fix on text chunks.

Whacka

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: A rookie attempt at a Valkyria Chronicles 3 translation
« Reply #15 on: February 25, 2012, 09:13:48 am »
Have you gotten any farther in messing around with the text of VC3? A serious translation effort has started up on Gamefaqs to get the game into English. Right now, the translators are mostly working from the Chinese patch of VC3, but trying to extract text from that version just returns gibberish.
Hey there, I haven't tried looking at the game again unfortunately.
As I said the game uses some sort of seemingly simple byteswapping function to store text (presumably to boost UMD load times) but I have no programming/disassembly knowledge to push further with.


I've been messing about with the unpacked files as well.

I've determined that the JIS2UCS.cnk is some sort of conversion table. You can view it properly in UTF-16LE. Leading me to guess that at least some of the content is in Shift-JIS and the others in UTF-16LE. It does seem to be the .mxe files that contain at least some of the games writing but I can't get a solid fix on text chunks.
I noticed that too, but I think they were only left over from development as changing parts of them seemed to have no effect.
Notably the contents of the JIS2UCS and UCS2JIS were swapped around in VC2 as opposed to VC3.