Hacking Chaos;Head Chu☆Chu

RimiNishijou

Member
OP
Newcomer
Joined
Jun 29, 2016
Messages
13
Trophies
0
XP
138
Country
United States
http://forums.fuwanovel.net/topic/14818-chaoshead-love-chu☆chu/

Looking for translators! As we've completed insertion tools and are ready to move to the next stage. It hit me today... at the small chance that not having a GBAtemp account is stopping you... take this riminishijou.tumblr.com. Ask or message a preferred method or communication(anon asks are on so you don't even need an account~!).
What does being a Translator for this project entail?
Well it would entail translating text from within the game from Japanese to English. This text would consist mostly of dialogue, menu text, possible text within images. Though I laid out certain types of text you may be translating other types may appear from within the game during the project. Of course we aren't working on any schedule or deadline so there isn't a rush though it's preferable to get things done in an orderly manner(as in have a plan of what and when it may possibly be completed or at least a status update of the amount of text agreed upon). Any amount of worked done is highly appreciated be it 5, 25,625,etc.. lines. A sample of lines that may appear can be seen in the screenshot below(see left side of the image).


Hello! I'm quite new to the PSP scene of hacking around. Luckily so fair it's been mostly smooth. Text can be extracted and inserted. The problem as always is not enough space for translation of line or name. After some researching I came across a github for the psp version of s;g. Which then lead me to finding a handy program called "Cartographer". It's quite nice for extracting text. If what I'm able to do is somewhat usable I can only imagine what you'd be able to do if you knew what you were doing. I suspect it would look something like this(see right hand side).
y1o2lbK.png
Included with Cartographer is a sample of using it on FF1. Here is the command example file - http://pastebin.com/i1KMUj1S . The tbl files used are your normal english ones. You run a command "cartographer ff1.nes ff1_commands.txt ff1_script -m" (m = multi file; -s for single file).

As you can see above I've been able to adapt the block type to output the text. This is all fine and dandy but seeing as when inserting everything has to have the same amount of bytes it's kind of useless when the goal is to be able to make the strings as big or as small. Hence you'd go the pointer route. Cartographer has an option option for ATLAS which is used to compile the script back in to a dat file(see the s;g github above has all needed files to compile "SG00_01.dat" translated in english using atlas. My problem now is just that I haven't really given finding pointers out side exes a go. Normally I'm tasked(well if doing a project or what not with others) with go through the exe and changing hard coded text. Bust out LordPE and some math and you're literally gold. Process normally goes along as described in this blog post by doddler - http://www.doddlercon.com/main/?p=243

How does one go about finding pointers and other required information needed to be able to change them location so that you can change the string lengths. I assume since you're giving the info to ATLAS that can do this for you so only have to find the original data is fine? Or is that pointers only for re inserting in which case you'd have to do it you're self I assume.

Bottom line I'd like some help or pointers(non pun intended) on finding where the pointers are located or at least for inserting them in to a command for it to rip through them via Cartographer. Or any other solution. If it works I can easily change over. Of course as I was about to forget here is the game file I'm currently working on.

TLDR: I need help finding the pointers for game text.

Here is a link with all software and files mentioned above if you'd like: https://mega.nz/#!KlhRTAqQ!mTEoSemnPohfQ9kwgX6pnHg4cFvClk6NTtlZKmt4DaI ( dat file, cartographer and sample files, github master clone)

Just the dat file: https://mega.nz/#!SsIEGLAD!f8HOsWpCCGio2QwXELgKUcZ5r3iqVzhRsqiYbKf2GFA

Finally to close... have some screen shots. I quite like the font in game. Names aren't translated due to not enough space and if the name isn't in the name table it's treated as text. So i'll have to find it and change it. Also I never knew controlling a PSP game with a SNES controller felt so natural. Only thing missing is the stick and luckily C;H using the dpad.

I also possibly have a TL lined up for what ever we are able to complete. I got them hooked on SciADV. They've read through S;G. Started on Chaos;Head and plan to go through Robotics;Notes(They'll be rubbing that one in my face due to it never getting a TL...). So maybe I can ask if they'd like to work on a side story. In the event that we fail I'd like to have at least the tools/ground work laid out so that if someone wants to pick it up they can and not have to worry about it all again. I'm sure it'll work for the S;G side games as the hex between them looks pretty close. Though I believe they are translated via youtube vids... I know some would rather play them instead(my self included) so hopefully anything I can work on would make that easier. The dialogue is a little choppy due to well having to fit it in the space of the Japanese counter part.
kkFGY1s.jpg

5vpVTl5.jpg

npeWuam.jpg

yXQyUc2.jpg

rMD9X75.jpg
 
Last edited by RimiNishijou,

flame1234

Well-Known Member
Member
Joined
May 17, 2009
Messages
734
Trophies
0
XP
957
Country
United States
PSP is little-endian. Intel machines are too; that doesn't matter for your application though.
To find pointers you would normally search for the address of the data you want to find, possibly with an offset added to it, and with byte order reversed depending on whether the system uses big endian or little endian.
This method will indeed work for your file CHLCC_AA00.BIN (offset = 0)
The first one is at 0xCEC to help you get started.

For replacing I usually do the following pseudocode:
1) find the pointers, store in array with pointer address and pointer target
2) offset = 0
For each string you want to replace:
3) addr = addr of string in original file (must know this)
4) addr += offset (so the system can find the string)
5) compute original length, orig_len
6) compute new length, newlen
7) for each pointer:
7A) If ptr_addr > addr, ptr_addr += newlen - origlen
7B) If ptr_tgt > addr, ptr_tgt += newlen - origlen
8) Replace the string
9) Offset += newlen - origlen
------------------------------
10) When done replacing the strings, write-back the pointers using ptr_addr and ptr_tgt
 
Last edited by flame1234,
  • Like
Reactions: RimiNishijou

The Real Jdbye

*is birb*
Member
Joined
Mar 17, 2010
Messages
23,207
Trophies
4
Location
Space
XP
13,732
Country
Norway
PSP is little-endian. Intel machines are too; that doesn't matter for your application though.

This method will indeed work for your file CHLCC_AA00.BIN (offset = 0)
The first one is at 0xCEC to help you get started.

For replacing I usually do the following pseudocode:
1) find the pointers, store in array with pointer address and pointer target
2) offset = 0
For each string you want to replace:
3) addr = addr of string in original file (must know this)
4) addr += offset (so the system can find the string)
5) compute original length, orig_len
6) compute new length, newlen
7) for each pointer:
7A) If ptr_addr > addr, ptr_addr += newlen - origlen
7B) If ptr_tgt > addr, ptr_tgt += newlen - origlen
8) Replace the string
9) Offset += newlen - origlen
------------------------------
10) When done replacing the strings, write-back the pointers using ptr_addr and ptr_tgt
If the pointers are stored in blocks (arrays) in the game data, Atlas does all the hard work of inserting the strings and overwriting the pointers with the new ones for you as long as you tell it the start address of each block. I've used it before for a GBA game, never with PSP games though.
 

flame1234

Well-Known Member
Member
Joined
May 17, 2009
Messages
734
Trophies
0
XP
957
Country
United States
Full dump of CHLCC:
https://docs.google.com/spreadsheet...a0FTOqCCU37IF8OuQNBvFeqiJw/edit#gid=352357701

Note: Please make your own copy of this if you want to edit.
If you need help going from Google Sheets to local file, here is my Google Sheets TSV export script (Google Apps Script): http://pastebin.com/Aw4r0bkW

A: Text address
NOTE: Anything that didn't look like SHIFT-JIS to the Python decoder got skipped
B: Pointer
NOTE: Blank in the pointer column means my program couldn't find the pointer for this text
C: Text

I don't have a lot of experience using Atlas. I'd just write a custom program for this.

Do you have repacking tools?

Here's the program code but I don't really expect it to be usable. Python 3:
AFS unpack: http://pastebin.com/Y8BcpwBU
Dump: http://pastebin.com/4M7RKbvj
 
  • Like
Reactions: RimiNishijou

RimiNishijou

Member
OP
Newcomer
Joined
Jun 29, 2016
Messages
13
Trophies
0
XP
138
Country
United States
FOR THE RECORD ABOUT FLAME'S TOOLS ABOVE. They don't capture all the text from some files. Some(I've seen it in C;H Chu) split text blocks by x00x00x00 instead of x00(which the script stops at) so be warned if you plan to use them.

Damn! Thank you so much @flame1234 & @The Real Jdbye !

I'll look through what is provided. I do have tools for unpacking and packing all the different files types so that's not a problem.

To answer your question flame apparently ATLAS is a program that can change the pointers to match the new length as long as you can give it the old pointer. Before this project I only knew it as a Machine TL software. That is... as long as you can create the config right something like this. If done right it can make things much simpler :P
#GAME NAME: Final Fantasy 1 (NES)

#BLOCK NAME: Dialogue Block (POINTER_RELATIVE)
#TYPE: NORMAL
#METHOD: POINTER_RELATIVE
#POINTER ENDIAN: LITTLE
#POINTER TABLE START: $28010
#POINTER TABLE STOP: $28210
#POINTER SIZE: $02
#POINTER SPACE: $00
#ATLAS PTRS: Yes
#BASE POINTER: $20010
#TABLE: ff1_ptr.tbl
#COMMENTS: Yes
#END BLOCK

Well I'll be getting to work!

EDIT: I somewhat understand the config files for creating ATLAS files.. but I may just end up writing an inserter... shouldn't be to hard thankfully their is nothing left after the dialogue text. I might try fiddling with making a config for Cartographer more later though. Would be fun to try to get em both workin

EDIT: Happy Birthday Rimi :P! (7/3)
 
Last edited by RimiNishijou,
  • Like
Reactions: mdtank

RimiNishijou

Member
OP
Newcomer
Joined
Jun 29, 2016
Messages
13
Trophies
0
XP
138
Country
United States
Update time!! So I did end up making my own insertion tool. I thought I'd learn some Python in the process which slowed me down a bit. Below is just the output for CHLCC_AA00(the first script). Currently only problem now is text wrapping ingame(as you'll see in a screenshot)... but that shouldn't be much of a problem. Worse comes to worse I'll just use new lines(Maybe it's something like Grisaia and you just need to encase every word in []'s ). Thanks again @flame1234 and @The Real Jdbye for your help!
upload_2016-7-5_3-5-27.png


I must have done something right... Because running it through HxD's Compare comes up with no changes(if you just use the base extracted text).
upload_2016-7-5_2-47-27.png


Of course... Here are some new screenshots. Now it really comes down getting a translator.... My friend seems to be enjoying Chaos;Head. On the grounds of TL help they have said to ask again once they finish Chaos;Head. I understand if they don't want to help out(hell even if they did a few lines I'd be more then grateful!) as translating takes a great amount of work. For example in scanlation(though on a smaller scale then game scripts as normally chapters are shorter). Well now that I got this working I guess I should get back to scanlating in the meantime... Translators Welcome!
ULJM05821_00006.jpg

ULJM05821_00007.jpg

EDIT: Started playing track down the menu text... Steiner has made me even more hype for ChuChu. If you don't know Steiner. They were one of the translators who worked on the Steins;Gate VN translation! Posted here saying that it's quite good/well worth the play.

EDIT: Friend would rather not translate and it's understandable. They also just got there copy of robotics notes... :| X3

What does being a Translator for this project entail?
Well it would entail translating text from within the game from Japanese to English. This text would consist mostly of dialogue, menu text, possible text within images. Though I laid out certain types of text you may be translating other types may appear from within the game during the project. Of course we aren't working on any schedule or deadline so there isn't a rush though it's preferable to get things done in an orderly manner(as in have a plan of what and when it may possibly be completed or at least a status update of the amount of text agreed upon). Any amount of worked done is highly appreciated be it 5, 25,625,etc.. lines.
 
Last edited by RimiNishijou,
  • Like
Reactions: JamRules

DarkSoulFlame

Well-Known Member
Newcomer
Joined
Jan 20, 2008
Messages
90
Trophies
1
XP
415
Country
United States
Dude, finally someone is taking the step on doing this. Thanks for this! I've been recently hooked onto SciAdv and it sucks that there aren't TLs for LCC and C;H Noah. I look forward to this.
 

flame1234

Well-Known Member
Member
Joined
May 17, 2009
Messages
734
Trophies
0
XP
957
Country
United States
You should post your help request at fuwanovel.net. If you did that already, I didn't see it. Worse case scenario: No one offers to help you.
I have this weird feeling that this userbase (GBAtemp) likes gameplay in their games.
You can also try posting a help wanted request at romhacking.net.

I am busy with other projects. I don't like VNs that much either. I like my VNs to have a mix of VN-type gameplay and "real" gameplay. This is one is just pure text; most VNs are like that.
Also the text looks very difficult, I had trouble with the first few lines.
 
  • Like
Reactions: RimiNishijou

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • LeoTCK @ LeoTCK:
    telling him that my partner is luke...does he look like someone with such big ne
    eds?
  • LeoTCK @ LeoTCK:
    do you really think I could stand living with someone like luke?
  • LeoTCK @ LeoTCK:
    I suppose luke has "special needs" but he's not my partner, did you just say that to piss me off again?
  • LeoTCK @ LeoTCK:
    besides I had bigger worries today
  • LeoTCK @ LeoTCK:
    but what do you know about that, you won't believe me anyways
  • K3Nv2 @ K3Nv2:
    @BigOnYa can answer that
  • BigOnYa @ BigOnYa:
    BigOnYa already left the chat
  • K3Nv2 @ K3Nv2:
    Biginya
  • BigOnYa @ BigOnYa:
    Auto correct got me, I'm on my tablet, i need to turn that shit off
  • K3Nv2 @ K3Nv2:
    With other tabs open you perv
  • BigOnYa @ BigOnYa:
    I'm actually in my shed, bout to cut 2-3 acres of grass, my back yard.
  • K3Nv2 @ K3Nv2:
    I use to have a guy for that thanks richard
  • BigOnYa @ BigOnYa:
    I use my tablet to stream to a bluetooth speaker when in shed. iHeartRadio, FlyNation
  • K3Nv2 @ K3Nv2:
    While the victims are being buried
  • K3Nv2 @ K3Nv2:
    Grave shovel
  • BigOnYa @ BigOnYa:
    Nuh those goto the edge of the property (maybe just on the other side of)
  • K3Nv2 @ K3Nv2:
    On the neighbors side
    +1
  • BigOnYa @ BigOnYa:
    Yup, by the weird smelly green bushy looking plants.
  • Xdqwerty @ Xdqwerty:
    Water park was quite fun
  • NinStar @ NinStar:
    die?
  • LeoTCK @ LeoTCK:
    yes I'm in mortal danger
    LeoTCK @ LeoTCK: yes I'm in mortal danger