Hacking Legend of Heroes Translation

Status
Not open for further replies.

Kelebek

Well-Known Member
Member
Joined
May 25, 2012
Messages
165
Trophies
0
XP
156
Country
You don't need to do all that, PPSSPP supports memory searching. Just click in the memory window and hit ctrl+s, put in the hex of what you're looking for (text isn't supported) and it'll find it. So just copy a bunch of the m3000.bin, and then find it in memory. It only gets loaded when the game needs it, so you won't find it when on the main menu, and it's gone after you finish that second cutscene and you go over to the train scene, where it gets replaced by the script for that train scene.

I listed 2 locations for you to go to in the disassembler though: 0880A004 and 089477BC. Put those in the box in the top-left and hit enter, and then double click on where it takes you to. Doing that memory searching for the file is how I found those places to begin with, and I know there's a few more, not sure why there needs to be multiple though.
 

flame1234

Well-Known Member
Member
Joined
May 17, 2009
Messages
734
Trophies
0
XP
957
Country
United States
Sorry, I am a slow learner.
So I found two copies of m3000.bin in the memory: one at address 8ABECE0 and another at address 8C8F200. The whole file seems to be there.

As a test, I would like to try to break on the 5C opcode where Lloyd says, どうだ……ティオ?at the beginning of the game.
So there are two copies of this opcode in m3000.bin, one at offset 1207 and the other at offset 2E28 (and I am not sure which one it is). So I computed the offsets 8ABECE0 + 1207/2E28 and 8C8F200 + 1207/2E28 and got 4 addresses and set a break on those addresses. Then here's my problem:
All of the opcodes are word aligned. Their address always ends in 0, 4, 8 or C. But some of the numbers I got doing this aren't word aligned (the base+1207's). And then I set breakpoints at those four points (before and after in the case of the 1207's) and the program didn't break. So what am I doing wrong?

After I did that I tried looking for the string in memory. It shows up in two places (other than the m3000.bin files): 8BDFC69 and 98357BC. I tried setting break points there and still no luck.
 

zero_g_monkey

Well-Known Member
OP
Member
Joined
Aug 9, 2013
Messages
332
Trophies
0
Age
44
XP
321
Country
United States
0x185b 0x5c Lloyd 0x01 "#0001F#11Pどうだ……ティオ?" terminalcode

So this is what the dialog looks like being dumped from the game using the python script. Would it be possible to put some code in it for the #0001F part to post an image with the dump? The folder the images are pulled from are data\face and this particular image would be ka0001.bmp (after conversion of course). I apologize if anybody has been checking this week to see if anything new has been going on. Been extremely busy. Stuff has been happening but nothing grand to report, though I have finally figured out how to turn the script dumps into spreadsheets.
 

Cargodin

Member
Newcomer
Joined
Feb 9, 2014
Messages
15
Trophies
0
Age
32
XP
102
Country
United States
Well if this isn't some of the most exiting stuff I've seen in a good while. Your proof of concept already looks really clean for something so early on.

You definitely have my thumbs up on this one!
 

zero_g_monkey

Well-Known Member
OP
Member
Joined
Aug 9, 2013
Messages
332
Trophies
0
Age
44
XP
321
Country
United States
-Example 01-
5C 01 01 23 30 30 30 31 46 23 31 31 50
82 C7 82 A4 82 BE 81 63 81 63 83 65 83 42 83 49 81 48 02 00
\<01><01>#0001F#11P
どうだ……ティオ?

-Example 02-
5D 01 01 83 89 83 93 83 66 83 42 00
23 30 33 30 37 46 23 31 4B 23 4E 23 32 50
82 A8 82 A8 82 C1 81 49 02 00
]<01><01>ランディ *****<-Randy (Just in case anybody is wondering. Arrow and name not in script.*****
#0307F#1K#N#2P
おおっ!

-Example 03-
5D 26 00 8F 97 90 AB 00 23 31 31 50 23 32 31 30 39 46
82 A2 82 A6 82 A2 82 A6 81 41 82 A0 82 AD 82 DC 82 C5 93 C7 8E D2 82 CC 01 83 6A 81 5B 83 59 82 C9 89 9E 82 A6 82 C4 82 A2 82 E9 82 BE 82 AF 82 C5 82 B7 82 A9 82 E7

81 F4 02 03 23 32 31 30 32 46
84 9F 84 9F 82 BB 82 EA 82 C9 8D A1 89 F1 82 CD 01 96 CA 94 92 82 A2 83 51 83 58 83 67 82 E0 82 A2 82 E9 82 DD 82 BD 82 A2 82 C5 82 B7 82 B5 81 42 02 00

]&<00>女性<00>#11P#2109F ***** Woman (Grace actually, I guess before she is introduced)
いえいえ、あくまで読者のニーズに応えているだけですから
♪#2102F
──それに今回は面白いゲストもいるみたいですし。

OP codes that are known
5C (\) - Dialog that searches for name in t_name._dt located in text directory.
5D (]) - Dialog that presents name in script file. May also include an face image also but that is another code.
01 - Line break when in the dialog - otherwise in the op codes... don't know.
23 (#) - This usually precedes stuff.
00 00 00 01 F - First 2 (00 00) bytes reference a main character in the game or somebody important enough to have a picture. This case would be Lloyd. Second 2 bytes (00 01) refer to a face image located in the face directory. F is there for whatever reason. I see no reason to change the F. You can see a reference chart in a post on page 2. It will always be two bytes due to an overlap with 5400-5411 being Tio (formal) and 5412-5414 Zeit.
11P, 2P, 12P (#11P) - This controls the window position and probably has something to do with the size or else that is controlled automatically elsewhere in the game.
#1K - Multiple dialog windows on screen
02 00 - Termination code
02 03 - New dialog box? Best I can figure from referring to dumper and hex editor.
55 - I believe this is the code used for information windows. Like asking a question or making a statement. See examples below.

Boy this is a mess of stuff but hopefully it makes sense. I mostly posted it here so maybe somebody can help modify to dumper script to produce different results. Here is basically what it will need to do. The loading the .pre file is wonderful but the part where it is dumping the dialog is off. Maybe something along the lines of -

Look for the 5C op code the proceed past the next two bytes 01 01 and look for the #0001F to refer to the speaker. Though sometimes the window position op code comes before the speaker code so it looks like #11P#0001F. Something would have to be done about that if at all possible. If just one or two lines were added, I can go through and add the rest of the reference points in (#0100 - Elie, #0200 - Tio, etc...). Also something that say 5C isn't found, then it would search out the other dialog codes like 5D, skip 2 bytes and produce the name (which always ends with a 00 before going into the dialog). I hope this makes sense. Getting sleepy. If this isn't possible, then I don't mind editing the stuff accordingly in a text editor after it has been dumped. As long as I have a reference in the code, I can modify it.

Also, anybody come across a good dumper/inserter on the net that handles simple pointers (little edian I believe - the ones that are reverse like in this game). Some of the files are setup with normal table files and I haven't found a decent tool for editing them yet. Ok. Good night.

Added 55 Op code

m3000.bin 0x1C53
55 FF 00 07 05 83 47 83 58 83 65 83 8B 82 C6 83 88 83 56 83 85 83 41 82 AA 83 70 81 5B 83 65 83 42 82 C9 89 C1 93 FC 82 B5 82 DC 82 B5 82 BD 81 42 07 00 02 00
U<FF><00><07><05>エステルとヨシュアがパーティに加入しました。<07><00><02><00>
Joshua and Estelle have joined the party. (Quick Google Craplate)

m3000.bin 0x1C89
55 FF 00 07 05 83 4C 83 83 83 93 83 76 83 81 83 6A 83 85 81 5B 82 CC 5B 54 41 43 54 49 43 53 5D 82 C5 01 83 41 83 5E 83 62 83 4E 83 81 83 93 83 6F 81 5B 82 C9 89 C1 82 A6 82 E9 8E 96 82 AA 8F 6F 97 88 82 DC 82 B7 81 42 07 00 02 00
U<FF><00><07><05>キャンプメニューの[TACTICS]でアタックメンバーに加える事が出来ます。<07><00><02><00>
Tells how to add members to the party through camp menu.

m0001.bin 0x1382
55 FF 00 07 05 83 47 83 8C 83 78 81 5B 83 5E 81 5B 82 CC 90 A7 8C E4 83 70 83 6C 83 8B 82 AA 82 A0 82 E9 81 42 01 91 80 8D EC 82 B5 82 DC 82 B7 82 A9 81 48 02 00
U<FF><00><07><05>エレベーターの制御パネルがある。操作しますか?<02><00>
Talks about an elevator panel. Asks if you wanna use it.
 

flame1234

Well-Known Member
Member
Joined
May 17, 2009
Messages
734
Trophies
0
XP
957
Country
United States
You need to remember that, at least at this point, you are going to be inserting text that is the same length as the original Japanese (or shorter). So it would be helpful to know what that length is. Since Japanese is weird, you get two letters per Japanese letter. The game organizes text into these huge, per character-who-is-speaking blocks. Those are what limit your text length. So if you used less text in one dialog box, you'd have more room in the next if it's in the same opcode (in case you needed it). Your dump needs to tell you something about that.

Keep in mind that that face and position codes can occur more than once per opcode. It'd be possible to get the first face that occurs in each opcode easily. For the second and later faces (if any), you have no way to organize that information in a spreadsheet. At least not well. If you split the opcode into several lines, it becomes difficult to tell how much space you have used vs. that available.

Note: Falcom in the script sometimes uses an absolutely huge number of characters per line (25 kanji so 50 letters). So you won't have to worry so much about line lengths.
 

Kelebek

Well-Known Member
Member
Joined
May 25, 2012
Messages
165
Trophies
0
XP
156
Country
You can just do something like this to sort out all the control codes:

Code:
a = 0
while a != len(string):
   byte = string[a:a+1]
   if byte == '#':
      z = a+1
      while True:
        try:
            number = int(string[a:z])
            z += 1
        except Exception:
            number = int(string[a:z-1])
            break;
      controltype = string[z:z+1]
      if controltype == 'P':
        #do whatever you want here for the window position code
      elif controltype == 'F':
        #do whatever you want here for the face code
      else:
        print 'Unknown control type %s' % controltype
      a += z
   a += 1

Something like that. I haven't actually tested that at all, just assuming and writing it out here. So a few changes might need to be made to the numbers, but that should be the general idea. Loop through the string until you find the # control code, then try to get the number, keep adding bytes of the string until it errors, which should put you to the code at the end, the F for face or P for position etc. The you can do whatever you want to the string to replace things, as you have the number, and the positions of where it starts/ends in the string.
 

zero_g_monkey

Well-Known Member
OP
Member
Joined
Aug 9, 2013
Messages
332
Trophies
0
Age
44
XP
321
Country
United States
Even better is when you have UTF-8 coding with full ascii support. That is 3 letters for each character. But I completely understand the space restrictions. Right now I am just trying to get the kinks worked out of the dumper.
Original Dump
m3000.bin
0x185b 0x5c Lloyd 0x01 "#0001F#11Pどうだ……ティオ?" terminalcode
0x18bc 0x5c Tio 0x01 "#6P#0206F……悪い予感が的中です。" newdialogbox "#0208F時・空・幻……" linebreak "上位三属性が働いています。" newdialogbox "#0201F《塔》や《僧院》と同じですね。" terminalcode
0x193a 0x5c Elie 0x01 "#12P#0106Fそう、やっぱり……" newdialogbox "#0101Fどうやらこの先は" linebreak "一筋縄では行かないみたいね。" terminalcode
0x1991 0x5c Randy 0x01 "#0306F#5Pって事は、あの得体の知れない" linebreak "化物どもが徘徊してるってことか。" newdialogbox "#0301Fやれやれ、ゾッとしない話だぜ。" terminalcode
0x1a03 0x5c 0x07 0x01 "#6P#0801F……あたしたちも前に" linebreak "似たような不思議な場所を" linebreak "探索した事があるわ。" terminalcode
0x1a54 0x5c 0x08 0x01 "#0903F正直、どんな魔物が現れても" linebreak "不思議じゃないだろう。" newdialogbox "#0901F万全の体制で臨んだ方がいい。" terminalcode
0x1ab5 0x5c Lloyd 0x01 "#0013F#11Pそうか……分かった。" newdialogbox "#0003F当然、敵による" linebreak "待ち伏せもあるはずだ……" newdialogbox "#0007Fみんな、気を引き締めて行こう!" terminalcode
0x1ba2 0x5c 0x08 0x01 "#0901F#1K#N#1Pああ……!" terminalcode
0x1bbf 0x5c 0x09 0x00 "#0201F#1K#N#5Pはい……!" terminalcode
0x1bdc 0x5c Elie 0x01 "#0107F#1K#N#4Pええ!" terminalcode
0x1bf5 0x5d Lloyd 0x01 "ランディ" 0x00 "#0307F#1K#N#2Pおおっ!" terminalcode
0x1c19 0x5c 0x07 0x01 "#0807F#1K#N#3Pうんっ!" terminalcode
0x1f21 0x5c Lloyd 0x01 "#0005F#6Pここは……" terminalcode
0x1f3a 0x5c Elie 0x01 "#6P#0101Fどうやらこの砦の" linebreak "城主の間みたいだけど……" terminalcode
0x1f8d 0x5c Tio 0x01 "#6P#0201Fあ……!" terminalcode
0x1fcb 0x5c Lloyd 0x01 "#0013Fあれは……!" terminalcode
0x1fe3 0x5c Elie 0x01 "#0107F《僧院》の礼拝堂の" linebreak "奥にあった紋章と同じ……!" terminalcode
0x2175 0x5c 0x07 0x01 "#0808F#5Pこれって……" linebreak "例の《教団》の紋章よね?" newdialogbox "#0801F6年前の事件の資料に" linebreak "あったものとは少し違うけど……" terminalcode
0x21e4 0x5c Randy 0x01 "#0303F#5Pヨアヒムの野郎が置いて行った" linebreak "ファイルの表紙とも少し違うな。" newdialogbox "#0301F確か翼が付いてた気がするが……" terminalcode
0x2254 0x5c 0x08 0x01 "#0901F#5P多分、こちらは簡略化された" linebreak "《教団》の紋章なんでしょう。" newdialogbox "ひょっとしたら、現在の紋章の" linebreak "原型になったものかもしれません。" newdialogbox "#0908Fそれがこの場にあるという事は……" terminalcode
0x2301 0x5c Lloyd 0x01 "#0006F#5P……《教団》のルーツは" linebreak "500年以上昔に遡#2Rさかのぼ#る……" newdialogbox "#0013Fしかも、このクロスベルが" linebreak "発祥の地かもしれないってことか。" terminalcode
0x238c 0x5c 0x08 0x01 "#0903F#5Pああ、君たちが発見した" linebreak "《僧院》の紋章もしかり……" newdialogbox "#0901F500年前の戦乱の時代、" linebreak "この地の有力者を取り込んで" linebreak "勢力を拡大したのかもしれない。" terminalcode
0x2426 0x5c Elie 0x01 "#0106F#5Pなんてこと……" terminalcode
0x2443 0x5c Lloyd 0x01 "#0008F#5Pいずれきちんと歴史を" linebreak "紐解く必要がありそうだな……" terminalcode
0x24af 0x5c Tio 0x01 "#0207F#5P気をつけてください……!" terminalcode
0x2718 0x5c Lloyd 0x01 "#0007F#6P#N出たか……!" terminalcode
0x2736 0x5c 0x07 0x01 "#0813F#6P《影の国》で現れた" linebreak "悪魔たちの仲間……!?" terminalcode
0x276f 0x5c 0x08 0x01 "#0907F#6Pやはりこの一帯が" linebreak "異界化しているのか……!" terminalcode
0x27a8 0x5c Randy 0x01 "#0307F#6P#Nとにかくブチ倒すぞ!" terminalcode
0x2ab7 0x5c 0x07 0x01 "#0801F#5Pこれって……" terminalcode
0x2ad2 0x5c 0x08 0x01 "#0901F#5P……どうやらこの先が" linebreak "真の意味での拠点#4Rロッジ#みたいだね。" terminalcode
0x2b1c 0x5c Lloyd 0x01 "#0013F#5Pああ……入ってみよう。" terminalcode
0x2e28 0x5c Lloyd 0x01 "#0001F#11Pどうだ……ティオ?" terminalcode
0x2e79 0x5c Tio 0x01 "#6P#0206F……悪い予感が的中です。" newdialogbox "#0208F時・空・幻……" linebreak "上位三属性が働いています。" newdialogbox "#0201F《塔》や《僧院》と同じですね。" terminalcode
0x2ef7 0x5c Elie 0x01 "#12P#0106Fそう、やっぱり……" newdialogbox "#0101Fどうやらこの先は" linebreak "一筋縄では行かないみたいね。" terminalcode
0x2f4e 0x5c Randy 0x01 "#0306F#5Pって事は、あの得体の知れない" linebreak "化物どもが徘徊してるってことか。" newdialogbox "#0301Fやれやれ、ゾッとしない話だぜ。" terminalcode
0x2fc0 0x5c Lloyd 0x01 "#0013F#11Pそうか……分かった。" newdialogbox "#0003F当然、敵による" linebreak "待ち伏せもあるはずだ……" newdialogbox "#0007Fみんな、気を引き締めて行こう!" terminalcode
0x3076 0x5c Tio 0x01 "#0201F#1K#6Pはい……!" terminalcode
0x3091 0x5c Randy 0x01 "#0307F#1K#1Pおおっ!" terminalcode
0x30aa 0x5c Elie 0x01 "#0107F#1K#2Pええ!" terminalcode
0x30f7 0x5c Lloyd 0x01 "#0001F戻っている場合じゃない……" newdialogbox "この事件を解決するためにも" linebreak "今は先に進まないと……!" terminalcode
0x315a 0x5c Lloyd 0x01 "#0001F戻っている場合じゃない……" linebreak "この遺跡の奥へ急ごう……!" terminalcode

Adjusted dump from manual editing
m3000.bin
0x185b 0x5c Lloyd 0x01 "#0001F#11Pどうだ……ティオ?" terminalcode
0x18bc 0x5c Tio 0x01 "#6P#0206F……悪い予感が的中です。" newdialogbox "#0208F時・空・幻……" linebreak "上位三属性が働いています。" newdialogbox "#0201F《塔》や《僧院》と同じですね。" terminalcode
0x193a 0x5c Elie 0x01 "#12P#0106Fそう、やっぱり……" newdialogbox "#0101Fどうやらこの先は" linebreak "一筋縄では行かないみたいね。" terminalcode
0x1991 0x5c Randy 0x01 "#0306F#5Pって事は、あの得体の知れない" linebreak "化物どもが徘徊してるってことか。" newdialogbox "#0301Fやれやれ、ゾッとしない話だぜ。" terminalcode
0x1a03 0x5c Estelle 0x01 "#6P#0801F……あたしたちも前に" linebreak "似たような不思議な場所を" linebreak "探索した事があるわ。" terminalcode
0x1a54 0x5c Joshua 0x01 "#0903F正直、どんな魔物が現れても" linebreak "不思議じゃないだろう。" newdialogbox "#0901F万全の体制で臨んだ方がいい。" terminalcode
0x1ab5 0x5c Lloyd 0x01 "#0013F#11Pそうか……分かった。" newdialogbox "#0003F当然、敵による" linebreak "待ち伏せもあるはずだ……" newdialogbox "#0007Fみんな、気を引き締めて行こう!" terminalcode
0x1ba2 0x5c Estelle 0x01 "#0901F#1K#N#1Pああ……!" terminalcode
0x1bbf 0x5c Tio 0x00 "#0201F#1K#N#5Pはい……!" terminalcode
0x1bdc 0x5c Elie 0x01 "#0107F#1K#N#4Pええ!" terminalcode
0x1bf5 0x5d 0x01 0x01 "ランディ" 0x00 "#0307F#1K#N#2Pおおっ!" terminalcode
0x1c19 0x5c Estelle 0x01 "#0807F#1K#N#3Pうんっ!" terminalcode
0x1f21 0x5c Lloyd 0x01 "#0005F#6Pここは……" terminalcode
0x1f3a 0x5c Elie 0x01 "#6P#0101Fどうやらこの砦の" linebreak "城主の間みたいだけど……" terminalcode
0x1f8d 0x5c Tio 0x01 "#6P#0201Fあ……!" terminalcode
0x1fcb 0x5c Lloyd 0x01 "#0013Fあれは……!" terminalcode
0x1fe3 0x5c Elie 0x01 "#0107F《僧院》の礼拝堂の" linebreak "奥にあった紋章と同じ……!" terminalcode
0x2175 0x5c Estelle 0x01 "#0808F#5Pこれって……" linebreak "例の《教団》の紋章よね?" newdialogbox "#0801F6年前の事件の資料に" linebreak "あったものとは少し違うけど……" terminalcode
0x21e4 0x5c Randy 0x01 "#0303F#5Pヨアヒムの野郎が置いて行った" linebreak "ファイルの表紙とも少し違うな。" newdialogbox "#0301F確か翼が付いてた気がするが……" terminalcode
0x2254 0x5c Joshua 0x01 "#0901F#5P多分、こちらは簡略化された" linebreak "《教団》の紋章なんでしょう。" newdialogbox "ひょっとしたら、現在の紋章の" linebreak "原型になったものかもしれません。" newdialogbox "#0908Fそれがこの場にあるという事は……" terminalcode
0x2301 0x5c Lloyd 0x01 "#0006F#5P……《教団》のルーツは" linebreak "500年以上昔に遡#2Rさかのぼ#る……" newdialogbox "#0013Fしかも、このクロスベルが" linebreak "発祥の地かもしれないってことか。" terminalcode
0x238c 0x5c Estelle 0x01 "#0903F#5Pああ、君たちが発見した" linebreak "《僧院》の紋章もしかり……" newdialogbox "#0901F500年前の戦乱の時代、" linebreak "この地の有力者を取り込んで" linebreak "勢力を拡大したのかもしれない。" terminalcode
0x2426 0x5c Elie 0x01 "#0106F#5Pなんてこと……" terminalcode
0x2443 0x5c Lloyd 0x01 "#0008F#5Pいずれきちんと歴史を" linebreak "紐解く必要がありそうだな……" terminalcode
0x24af 0x5c Tio 0x01 "#0207F#5P気をつけてください……!" terminalcode
0x2718 0x5c Lloyd 0x01 "#0007F#6P#N出たか……!" terminalcode
0x2736 0x5c Estelle 0x01 "#0813F#6P《影の国》で現れた" linebreak "悪魔たちの仲間……!?" terminalcode
0x276f 0x5c Joshua 0x01 "#0907F#6Pやはりこの一帯が" linebreak "異界化しているのか……!" terminalcode
0x27a8 0x5c Randy 0x01 "#0307F#6P#Nとにかくブチ倒すぞ!" terminalcode
0x2ab7 0x5c Estelle 0x01 "#0801F#5Pこれって……" terminalcode
0x2ad2 0x5c Joshua 0x01 "#0901F#5P……どうやらこの先が" linebreak "真の意味での拠点#4Rロッジ#みたいだね。" terminalcode
0x2b1c 0x5c Lloyd 0x01 "#0013F#5Pああ……入ってみよう。" terminalcode
0x2e28 0x5c Lloyd 0x01 "#0001F#11Pどうだ……ティオ?" terminalcode
0x2e79 0x5c Tio 0x01 "#6P#0206F……悪い予感が的中です。" newdialogbox "#0208F時・空・幻……" linebreak "上位三属性が働いています。" newdialogbox "#0201F《塔》や《僧院》と同じですね。" terminalcode
0x2ef7 0x5c Elie 0x01 "#12P#0106Fそう、やっぱり……" newdialogbox "#0101Fどうやらこの先は" linebreak "一筋縄では行かないみたいね。" terminalcode
0x2f4e 0x5c Randy 0x01 "#0306F#5Pって事は、あの得体の知れない" linebreak "化物どもが徘徊してるってことか。" newdialogbox "#0301Fやれやれ、ゾッとしない話だぜ。" terminalcode
0x2fc0 0x5c Lloyd 0x01 "#0013F#11Pそうか……分かった。" newdialogbox "#0003F当然、敵による" linebreak "待ち伏せもあるはずだ……" newdialogbox "#0007Fみんな、気を引き締めて行こう!" terminalcode
0x3076 0x5c Tio 0x01 "#0201F#1K#6Pはい……!" terminalcode
0x3091 0x5c Randy 0x01 "#0307F#1K#1Pおおっ!" terminalcode
0x30aa 0x5c Elie 0x01 "#0107F#1K#2Pええ!" terminalcode
0x30f7 0x5c Lloyd 0x01 "#0001F戻っている場合じゃない……" newdialogbox "この事件を解決するためにも" linebreak "今は先に進まないと……!" terminalcode
0x315a 0x5c Lloyd 0x01 "#0001F戻っている場合じゃない……" linebreak "この遺跡の奥へ急ごう……!" terminalcode

If I can figure out how to edit the dumper to use the face codes (at least the very first one), then I already know who is speaking and can use that accordingly. By including the OP code 5D, it would not use a false positive and just drop the name. See the difference between examples above. Only 1 5D in this dump. Originally it labeled it as Lloyd speaking, when in fact it is Randy. I noticed this trend when I had edited the name storage file and some of them were not showing up like they should. Discovered that for whatever reason they decided to include the name in the script. I wish I knew where in the game this dialog was at because I would like to test changing the 5D to a 5C. I think it is later on when Estelle and Joshua are a part of the group.
 

flame1234

Well-Known Member
Member
Joined
May 17, 2009
Messages
734
Trophies
0
XP
957
Country
United States
I think we can get this working better. How about:
1 Opcode position/address - inserter needs it?
2 What opcode is it - inserter needs it to rebuild your input into a valid opcode. The 55 5c 5d and 5e opcodes are all different in how they are built and the inserter needs to know which it is to build a correct matching opcode.
3 Speaker - inserter gives it to you, but discards it when building the opcode
4 Control codes - part of your input (that will be built into a valid opcode). Does the actual face code need to be separate from the other codes? You can use a spreadsheet program to extract the face code from the control codes.
5 String - part of your input
6 Breaking type (either linebreak, newdialogbox, or terminalcode) - part of your input. If those are too hard or long to type then give me shorter names I should be using.
7 User length. That would be the total bytes you have for text (1 byte per letter), control codes (varies, 5 bytes per face), and newlines (1 byte per). You have to have the terminalcode at the end so that's not included. Inserter discards this, instead it measures your input and how long the opcode is, pads it with spaces if it's too short (maybe a linebreak and then spaces? - this would probably be better) or truncates it if it's too long.

For entries that are not new opcodes, fields 1, 2 and 3 would be blank. Also for entries that are not new opcodes and don't include any control codes, field 4 would be blank too. That way we can have face data per line like you want but still be able to rebuild opcodes.

Either the first or last record in the opcode could have field 7 (let me know which it should be). You need field 7, that way you'll be able to tell if your text is too long. A spreadsheet program, maybe even Google Spreadsheets, can measure your input and tell you how long it is. You'll need to remember that you need one extra byte for each linebreak.

And the inserter should tell you if it's truncating your input to fit.

How does all of this sound?
 

zero_g_monkey

Well-Known Member
OP
Member
Joined
Aug 9, 2013
Messages
332
Trophies
0
Age
44
XP
321
Country
United States
As long as the translators can tell who is speaking, so we can retain some kind of personality. I'm cool with anything. That is why I keep referring to the face data. It is the only sure fire way I know to do that. We don't need the images. I can make a spreadsheet with the images on it, if need be. Feel free to run with it. I've been trying to remember my programming experience by starting back from the basics so maybe I can lend a better hand with all this. The breaking type stuff is great. No need to change those. For spreadsheets, I am currently using Open Office to create them. Just working on cleaning them up so that there is no confusion as to what is to be translated and what isn't. Thankfully all this work isn't wasted since we more than likely can use it for Ao no Kiseki also. Gonna check that... Well... almost. Threw a few errors. Might take some tweaks, but that is down the line. Same setup for pointers in Ao but maybe some subtle differences elsewhere. But yeah, I am happy with whatever you wanna do.


So a question for everybody else. Should I stick with the names that Xseed used for the monsters and maybe the items since these are both in the same world? I was translating them myself (not that simple word translation is hard mind you), but I have hit a snag. Some stuff just doesn't translate well. I could always take the easy way and just romanji the piss out of it, but I like my stuff to have names you can really remember and that make sense to the average player. I'll give a little insight into the process I use. First translation. If it translates well into english. Then I usually will leave it (say it is something like slime or bat). If it translates to something a little more uncommon, then I start trying to cross reference it with real world stuff. One being the Venus Man Trap (play on words in the game - Venus Fly Trap... Man, yeah you get what I mean) or there is some stuff that is mythical creatures from other languages that off the top of my head I can't remember but I was able to find something about them. Then there is the stuff that is just made up and the name is best to be romanized but I just don't know. Suggestions on what people feel is best for the playing experience is welcome. -side note (I also use the images from the game to compare names. If it is giant frog but translates to tiny sheep... we have problems.)



Edited part:
Look what I found in the eboot. A cat. 0x1EDBFO
(^-^)
(-_-)
(__)/~



New edited part - Round 2
I'm trying to do some image editing. I can convert the itp to an index bmp (8-bit) file with tools previously made. Edit it with photoshop. Save the file and convert it back. Re-insert and remove any of the encrypted files that also store the image. Problem is... graphics are all gone. Could somebody who has had success with this post the exact steps from start to finish how to get this to work. I mean from the point of taking the file and decrypting it from the itp.... to the point of re-insertion. Thanks in advance.
 
  • Like
Reactions: Cargodin

Cargodin

Member
Newcomer
Joined
Feb 9, 2014
Messages
15
Trophies
0
Age
32
XP
102
Country
United States
So a question for everybody else. Should I stick with the names that Xseed used for the monsters and maybe the items since these are both in the same world? I was translating them myself (not that simple word translation is hard mind you), but I have hit a snag. Some stuff just doesn't translate well. I could always take the easy way and just romanji the piss out of it, but I like my stuff to have names you can really remember and that make sense to the average player.

I did this recently with Antiphona and Tengai Makyou:"AIV" for kicks, so I can kinda relate to when things are just really tricky overall. I think you're doing fine, from the sound of it.

Every once in a while you're probably going to run into a very hard pun to translate in any playable format (because you can't really add a "tl note:" onto a battle screen, so sometimes you just have to make due and go for the best response. Mythological creatures and such are great, but I guess you'd just have to be careful of any pop culture puns or double meanings quite common amongst gag enemies.

In the latter game I mentioned, there is an enemy called an ウマのハナ, which is a god-honest, a horse with flowers coming out of its nose, so I still have no way to properly "localize" that and feel at peace with myself besides Nosegay, but even that's a bit off...

Just follow your instincts on it. I would just try and look up some of the names you're unsure about though before getting stuck on romanizing them.
 

flame1234

Well-Known Member
Member
Joined
May 17, 2009
Messages
734
Trophies
0
XP
957
Country
United States
Updated the dumper per my previous post. Link. Took me more tries than I'd care to admit.
It will dump m3000.bin (perfectly). You need to tell your spreadsheet program to use the "space" delimiter.
I haven't tested it on 55 opcodes yet.

Sample output in Google Drive

A problem I ran into while coding it:
Python thinks, when you load, "年" in binary, that there is an "N" in it somehow. Because on the SHIFT-JIS code page, "年" is x944e while "N" is 4e. I worked around it by going byte by byte (as I was already doing) and making a note of when the string switches to SHIFT-JIS characters. Once I know that, I can search only the ASCII portion for certain values.

Just out of morbid curiosity, how can I find out how many lines there are in the whole game?
 

G-Han

Well-Known Member
Newcomer
Joined
Feb 17, 2009
Messages
64
Trophies
0
XP
214
Country
Netherlands
Just out of morbid curiosity, how can I find out how many lines there are in the whole game?
If Sora FC had 1.5 million characters spread over 55.000 lines, I'd say Zero's estimated 4 million characters would mount to 140.000-150.000 strings. If you were to print the entire script, you would have a murder weapon.

So a question for everybody else. Should I stick with the names that Xseed used for the monsters and maybe the items since these are both in the same world? I was translating them myself (not that simple word translation is hard mind you), but I have hit a snag. Some stuff just doesn't translate well. I could always take the easy way and just romanji the piss out of it, but I like my stuff to have names you can really remember and that make sense to the average player. I'll give a little insight into the process I use. First translation. If it translates well into english. Then I usually will leave it (say it is something like slime or bat). If it translates to something a little more uncommon, then I start trying to cross reference it with real world stuff. One being the Venus Man Trap (play on words in the game - Venus Fly Trap... Man, yeah you get what I mean) or there is some stuff that is mythical creatures from other languages that off the top of my head I can't remember but I was able to find something about them. Then there is the stuff that is just made up and the name is best to be romanized but I just don't know. Suggestions on what people feel is best for the playing experience is welcome. -side note (I also use the images from the game to compare names. If it is giant frog but translates to tiny sheep... we have problems.)
I would stick to XSEED's terminology and style as much as possible, or, like the Venus Man Trap, put this up in this board so people can discuss possible translations. Coming up with elaborate puns while translating is tough on your own.
 

Kelebek

Well-Known Member
Member
Joined
May 25, 2012
Messages
165
Trophies
0
XP
156
Country
Updated the dumper per my previous post. Link. Took me more tries than I'd care to admit.
It will dump m3000.bin (perfectly). You need to tell your spreadsheet program to use the "space" delimiter.
I haven't tested it on 55 opcodes yet.

Sample output in Google Drive

A problem I ran into while coding it:
Python thinks, when you load, "年" in binary, that there is an "N" in it somehow. Because on the SHIFT-JIS code page, "年" is x944e while "N" is 4e. I worked around it by going byte by byte (as I was already doing) and making a note of when the string switches to SHIFT-JIS characters. Once I know that, I can search only the ASCII portion for certain values.

Just out of morbid curiosity, how can I find out how many lines there are in the whole game?

Yeah, you should go through it and test the characters. This is how I loop through the strings for the 0x5c opcode:

Code:
stringlist = list(string)
l = 0
while l < len(stringlist):
    if stringlist[l] == '\x01':
        stringlist[l] = '\\n'
        l += 1
    elif stringlist[l] == '\x02':
        try:
            if stringlist[l+1] == '\x03':
                stringlist[l] = '<newpage>'
                stringlist.pop(l+1)
                l += 1
        except Exception:
            break;
    else:
        if ord(stringlist[l]) < 128:
            l += 1
        else:
            l += 2

Testing the ordinal of the char will tell you if it's ASCII or SJIS, all ASCII is in the range 0-127, so if you get a byte above that, which SJIS is as they all start with 0x80 or 0x90 (0x80 is ordinal 128) , then you can run through the string character by character even when it's a mix, rather than byte by byte which isn't reliable.
 

zero_g_monkey

Well-Known Member
OP
Member
Joined
Aug 9, 2013
Messages
332
Trophies
0
Age
44
XP
321
Country
United States
Looks pretty good. Gotta head out of town for the weekend but will give it a real go when I get back Sunday or Tuesday.

Anybody have any luck with editing image files and re-inserting them? I notice there is some differences between the headers of untouched and edited stuff using the itp tool. But I think somewhere in the conversion process the points for the images is all screwed up. If you try it, you will notice that none of the stuff shows up, like dialog boxes, the images used for the items screens and etc. Gotta run. Wife breathing down my neck to go spend weekend with in-laws.
 

flame1234

Well-Known Member
Member
Joined
May 17, 2009
Messages
734
Trophies
0
XP
957
Country
United States
Updated the dumper again. Dumper v2.1. It's working better now
Usage this time is python script.py m3000. The program will look for m3000.orig (renamed .bin) and m3000.pre in the same directory.
New stuff:
- Dumps most files (not just m3000). This is important!
- Looks for 55 and 5e opcodes for which there are no pointers in *.pre by searching. This can fail, let me know the files it won't work for.
- Actually dumps the 5e opcodes (this is the first version that does it)
- Dumps the opcodes in the order they appear in the file. Might be related to the order they appear in the game, but not guaranteed.

* Keep in mind that for 55 opcodes without faces in them, I have no idea who is speaking. You're going to have to do your best in these cases as the data of who is speaking is not actually within the game code.

I tested on c0110, which at 174kb, is about 2.5% of the entire script. I think it's working well. I didn't see any errors or problems.

Inserter pseudocode:
For each opcode in input:
1. Measure available space.
2. Build opcode
2a. ...and measure its length
3. Adjust opcode length
3a. If too long, truncate
3b. If too short, pad with one linebreak and the rest spaces
3c. If exactly right, do nothing
4. Insert opcode

It doesn't sound all that difficult.

Next steps:
- Write inserter
- Dump stuff / upload to spreadsheet
- Translate m3000 (opening parts), m3002, e0410 (train scene) and c1150 (crossbell police HQ?)

Edit: Dumper still not working yet. There are 5c and 5d opcodes that are not pointed to in the .pre file.

-So the game does know who's speaking even without a face. It's the digit after the 5c opcode. Like for example, 11 is the old man in the train scene. The 5d opcode is for one-offs they don't have an index number for. And the index numbers don't line up with the faces at all.
01- Lloyd
02- Elie
03- Tio
04- Randy
11- Old Man (老人)
12- Old Woman (老婦人)
For people with faces, it'll be easy to figure out because the game gives us the answer.

-There are 5b opcodes I didn't know about before.
 
  • Like
Reactions: G-Han

zero_g_monkey

Well-Known Member
OP
Member
Joined
Aug 9, 2013
Messages
332
Trophies
0
Age
44
XP
321
Country
United States
Been busy dumping some files. Hopefully will get some uploaded to spreadsheets sometime this weekend. Gonna have some free time for the first time in weeks.

Good work on the dumper. Working pretty good.
 

Diag

Well-Known Member
Member
Joined
Feb 25, 2014
Messages
149
Trophies
0
Age
38
XP
316
Country
Gambia, The
after the awesome type-0 translation, the games i´m most interessted in are persona 2 ep portable and of course this (and all other falcom games :D )..
i know this another huge project, but i hope this will be a success and i´m rooting for you o/ maybe you are faster than xseed :D (i think its possible, for tits 2 they had also just 2 translators and it seems like it take forever just finishing tits 2 :/)
 

zero_g_monkey

Well-Known Member
OP
Member
Joined
Aug 9, 2013
Messages
332
Trophies
0
Age
44
XP
321
Country
United States
Thanks. Yeah I'm really really interested in the Eternal Punishment stuff. That is the entire reason I bought my PSP in the first place was originally they were supposed to put all the Persona games on the PSP. Then literally the week after I got it, they announced 4 would be coming out on the Vita instead.... then they dropped the ball on EP. Talk about annoyed. Once I start getting these files uploaded, hopefully we can get some translators. Normally having a bunch of different translators can really cause havoc since everybody has a different style but I think as long as we can stick as close to literal translation, I can work some magic with script writing to put it all together.

The type-o project was pretty exciting. Teach game companies to screw with fans. Something I find amusing and disturbing at the same time is the recent announcement that Xseed is doing Brandish shortly after it was fan translated. Takes me back to when the whole Ys fiasco.
 

GHANMI

Well-Known Member
Member
Joined
Jun 10, 2012
Messages
969
Trophies
0
XP
914
Country
I think the fan-translations for not only the second Zwei but 1 as well, were dropped and bought by Xseed, for a PC release that may or may not come -all voice acting removed of course (translator says "I can't say anything about them" and this conclusion was reached by many on the Ancient Lands of Ys forums).
 
Status
Not open for further replies.

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    SylverReZ @ SylverReZ: Sup