Hacking Legend of Heroes Translation

Status
Not open for further replies.

zero_g_monkey

Well-Known Member
OP
Member
Joined
Aug 9, 2013
Messages
332
Trophies
0
Age
44
XP
321
Country
United States
01 00 CC CC 5B 18 00 00 C0 17 00 00 -> Lloyd
CE 00 CC CC BC 18 00 00 E8 21 00 00 -> Tio
D0 00 CC CC BC 18 00 00 DC 23 00 00 -> Tio
C9 00 CC CC BC 18 00 00 D0 25 00 00 -> Tio
6A 00 CC CC 3A 19 00 00 B8 29 00 00 -> Elie
65 00 CC CC 3A 19 00 00 AC 2B 00 00 -> Elie
32 01 CC CC 91 19 00 00 94 2F 00 00 -> Randy
2D 01 CC CC 91 19 00 00 88 31 00 00 -> Randy
21 03 CC CC 03 1A 00 00 70 35 00 00 -> Lloyd
87 03 CC CC 54 1A 00 00 58 39 00 00 -> Lloyd
85 03 CC CC 54 1A 00 00 4C 3B 00 00
0D 00 CC CC B5 1A 00 00 34 3F 00 00
03 01 00 CC CC B5 1A 00 00 28 41 00 00

So I have been trying to understand all the input from everyone. Some I get, some I don't. I'm a visual learner type of person. But I was checking out the pointer stuff in m3000.pre to see if I could find any kind of matching patterns or OP codes. The only thing I have come up with is the fact that for each bit of dialog, if it doesn't change character, the pointer stays the same. It's late and I have lost track of my thought. Will have to use fresh eyes to look at this tomorrow. Oh how I wish Falcom wasn't so sloppy with their games. Trash all over the place. Check back for either an edited post or a new one.
 
  • Like
Reactions: GHANMI

Kelebek

Well-Known Member
Member
Joined
May 25, 2012
Messages
165
Trophies
0
XP
156
Country
Well because the character is inside the script itself. 0x5c is the dialogue box opcode, it's 0x5c, 2 more bytes, then the string. The first byte after 0x5c is the character number. 00 is Lloyd, 01 is Elie, 02 is Tio, 03 is Randy, etc.

I've been mapping out opcodes, but I'm getting stuck in places where I can't breakpoint them in the game.

EDIT: Ok so this is as far as I got, and I'm actually going to stop now because this is way too annoying/difficult/tedious.

Format of these is [opcode, description, length]. Length is minus the opcode byte.

[0x0,'exit?',0x0],[0x1,'retn?',0x0],[0x2,'0x2','variable'],[0x3,'jmp-0x3',0x4],[0x8,'call',0x2],[0xb,'0xb',0x9],[0xc,'0xc',0x8],[0xd,'0xd',0x0],[0xe,'0xe',0x4],
[0x19,'0x19',0x1],[0x1a,'0x1a',0x1],[0x1b,'0x1b',0x4],
[0x23,'0x23',0x5],[0x24,'0x24',0x2],[0x27,'0x27',0x2],[0x2e,'0x2e',0x3],
[0x31,'0x31',0x5],[0x32,'0x32',0x4],[0x35,'0x35',0x3],[0x36,'0x35',0x3],[0x38,'0x38',0x3],
[0x40,'0x40',0x4],[0x42,'0x42',0x4],[0x44,'0x44',0x5],[0x45,'0x45',0x3],[0x46,'0x46',0x4],0x48,'0x48',0x3],[0x49,'0x49',0x0],[0x4a,'0x4a',0x2],[0x4e,'0x4e',0xb],
[0x50,'0x50',0x8],[0x52,'0x52',0xa],[0x55,'item-string?','variable'],[0x57,'0x57',0x1],[0x59,'show-textbox',0x0],[0x5a,'0x5a',0x0],[0x5b,'0x5b',0x8],[0x5c,'dialogue','variable'],[0x5e,'multichoicetext?','variable'],
[0x61,'0x61',0x1],[0x63,'0x63',0x11],[0x64,'0x64',0x2],[0x65,'0x65',0x3],[0x68,'0x68',0x10],[0x6c,'0x6c',0x8],[0x6d,'0x6d',0xa],[0x6e,'0x6e',0x8],[0x6f,'0x6f',0x1],
[0x70,'0x70',0x3],[0x71,'0x71',0x1a],[0x72,'0x72',0x5],[0x73,'0x73',0x5],[0x78,'0x78',0x3],
[0x82,'0x82',0x10],[0x8c,'0x8c',0x3],[0x8d,'0x8d',0x3],[0x8f,'0x8f',0x10],
[0x91,'0x91',0x6],[0x93,'0x93',0x6],[0x95,'0x95',0x14],[0x96,'0x96',0x14],
[0xa0,'0xa0',0x6],[0xa1,'0xa1',0x2],[0xa2,'0xa2',0x4],[0xa3,'0xa3',0x4],[0xa7,'0xa7',0xa],[0xa9,'0xa9',0x2],[0xaa,'0xaa',0x2],
[0xc5,'0xc5',0x2],[0xc7,'0xc7',0x5],[0xc9,'0xc9',0xe],[0xca,'0xca',0x3],
[0xd3,'0xd3',0x12],[0xd4,'0xd4',0x5],[0xde,'0xde',0x2],
[0xe0,'0xe0',0x1],[0xe3,'0xe3',0x1],[0xe5,'0xe5',0x0],[0xe8,'0xe8',0x8],[0xee,'0xee',0x3],

Stupidly I didn't mark down the jumps when I saw them, I only did it for 0x3, but a whole bunch of opcodes have jumps in them that would need fixing.
 

G-Han

Well-Known Member
Newcomer
Joined
Feb 17, 2009
Messages
64
Trophies
0
XP
214
Country
Netherlands
\#0001F#11Pどうだ……ティオ?- Text view
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 - Hex view

\ - This is where the pointers mentioned earlier point to. Goes for pointers after this one also.
#0001F - This is an image for the face. Tested changing it around with others. Works.
#11P - Dialog box position
...then the dialog.

For the screens I changed the #11P to #12P (I think) and you can see the results.
Tried see if the position of the #11P might affect the placement of the image but so far haven't made much progress due to about 1 billion distractions. Hopefully this makes sense. Kind of rushed in posting it.
Small addition: in Sora no Kiseki FC, there's also "#1K", which indicate multiple dialog boxes in the same screen.
 

zero_g_monkey

Well-Known Member
OP
Member
Joined
Aug 9, 2013
Messages
332
Trophies
0
Age
44
XP
321
Country
United States
Sorry for the lack of updates the past few days. This is the first time I have been able to get on my PC since then. I had done some work on the image stuff for the menus but nothing ready to show. I might be reconsidering a partial patch but it is a long ways off. Who knows. Good work on those OP codes. Wish I knew more about mapping them and all that good stuff. I'm was just gonna ram the text into position but those could be real handy to have. Hoping to get back to dumping the text folder stuff for translation tomorrow.
 

flame1234

Well-Known Member
Member
Joined
May 17, 2009
Messages
734
Trophies
0
XP
957
Country
United States
Even for no change in the string length, I think it'd be helpful to have an inserter program. That way you could edit in a text editor rather than a hex editor, which is probably easier for translating. Almost certainly easier for translation checking. I could be wrong on this as I am pretty new here...

Have you already written a dumper? Can you post your code?

Just for fun let's count the number of bin files and then estimate 98% of them have dialog (not all of them have dialog).
bin files = 318, dialog files ~= 312 (estimate)

Is there a tutorial on opcode mapping somewhere?
 

Kelebek

Well-Known Member
Member
Joined
May 25, 2012
Messages
165
Trophies
0
XP
156
Country
Well they're read at 0880A004 and 089477BC among other places, so you can breakpoint those, and see where the next opcode is that it hits, that gives you the size of it. You'd have to actually step through each one to find out what the data sizes are, because you can't reimport them back without knowing that.

You could just pretty much skip all of it I suppose and only focus on the opcodes that have jumps in them, but just in trying to do that you'd probably still have to go through each opcode otherwise you don't know if it's an actual opcode or just one of the variables for another opcode, so you're probably still stuck. But at least in re-importing you could skip all the data sizes by just copying the original, but still you'd need to map out every opcode to go through and get the ones with jumps in them.

So far I've seen that 0x55, 0x5c and 0x5e have text in them, and 0x2, 0x3 have jumps and 0x8 calls external functions, I think.
 

zero_g_monkey

Well-Known Member
OP
Member
Joined
Aug 9, 2013
Messages
332
Trophies
0
Age
44
XP
321
Country
United States
Finally getting some work done on the translation side. Got about 50% of the monsters done and a little less of the weapons/items. Probably gonna have to pass off what I can't get done to somebody else when I finally get stuck.

About a dumper, unfortunately I have to do it the hard way. I use Wind Hex to dump it and just edit everything into position with notepad (notepad++ doesn't support some of the characters I need). I wish I was a coder because the same tools could be used for Ao no Kiseki also. It would also make updating these damn pointers a whole lot easier. But considering the amount of time it will take to translate the dialog, I have the real easy job.

I get the purpose of the OP codes but it seriously confuses the piss out of me and every time I have tried to use breakpoints nothing happens for me. So I tend to just stick with what I know how to do and that is hex edit the piss out of stuff. Cruising through the files looking for goodies I discovered they have wasted a lot of space with constantly repeating the same dialog. There has to be a method to their madness and yes it is madness because they seem to do it in almost all the games they put out. Not so bad in the Ghargav stuff. That is pretty straight forward (and easy to edit). I really appreciate all the help everybody has been providing. Was hoping the turn this into a place where we can all finally crack that madness in case anybody else wanted to work on other games from Falcom. There are small similarities in all of them but even more differences between the generations. Like looking through Nayuta no Kiseki you see an absurd amount of references to Adol & Ys7. But a bunch of those files are a bunch of straight programming and document files (if I remember correctly - if not, it is one of their more recent games). Well back to work.




I have since reconsidered my position on a partial patch. But when it is done, I will offer very limited support on it because it could change completely before a finished product is done. However it is no where near done. I am in search of a save file with most of the books in the inventory and atleast a few of the Crossbell Times papers. Need them for formatting reasons. I could make codes to get them but that would take me a week or so and I would rather work on the game then create codes for it right now. That can come later.
 

GHANMI

Well-Known Member
Member
Joined
Jun 10, 2012
Messages
969
Trophies
0
XP
914
Country
I found this and this not sure if it helps.

Actually, anything like "unlock all x" codes or the ones generally speeding up the game (like the max HP/atk/invincibility/speed ones) help a lot... for anyone who wants to speed up the game to see text quickly.
(It's NOT a good enjoyable way to play the game though and it spoils the game, that's for sure, but at least zero has played it before in Japanese)
 

flame1234

Well-Known Member
Member
Joined
May 17, 2009
Messages
734
Trophies
0
XP
957
Country
United States
Okay, worked on a dumper today. Kinda works but not well enough. I'm giving up for today; I'll work more on it tomorrow. It doesn't handle multidialogs properly, but I think it's possible for it to eventually handle them properly.
Usage: python script.py datax####.bin

import os
import sys

def get_data(filename):
totalbytes = os.path.getsize(filename)
infile = open(filename, 'rb')
totalfiledata = infile.read(totalbytes)
return totalfiledata

def calculateoutputstring(opcodeaddress,inputstring):
strpos = 3
outputstring = hex(opcodeaddress) + " "
outputstring += '0x5c' + ' ' #First byte
#Second byte we know is the character name
if inputstring[1].encode('Hex') == '01':outputstring += "Lloyd "
elif inputstring[1].encode('Hex') == '02':outputstring += "Elie "
elif inputstring[1].encode('Hex') == '03':outputstring += "Tio "
elif inputstring[1].encode('Hex') == '04':outputstring += "Randy "
else: outputstring += "0x" + inputstring[1].encode('Hex') + " " #Unknown character name?
outputstring += "0x" + inputstring[2].encode('Hex') + " " #3rd byte
outputstring += '"'
#Trim the first 3 characters from the target string
newinputstring = inputstring[3:]
inputstring = newinputstring
#Find dialog boxes that aren't the last one, trim them out and output them
while strpos > 0:
strpos = inputstring.find('\02\03',strpos+1)
if strpos == -1: break
outputstring += inputstring[:strpos] + '"' + " "
outputstring += "newdialogbox" + " " + '"'
newinputstring = inputstring[strpos+2:]
inputstring = newinputstring
#The last box in the sequence and then the dialogue terminating code
outputstring += inputstring[:-3] + '"' + " "
outputstring += '0x020059' + '\n'
return outputstring

def myprogram(filename):
filedata = get_data(filename)
firstpass = True
outfiledata = ""
datapos = 0

while datapos > -1:
datapos = filedata.find('\x5c',datapos+1) #Dialogue opcodes begin with 0x5c
#More on this: We know there's other opcodes with user text in them
#But all dialogue opcodes begin with 0x5c
#This program doesn't currently dump any opcodes other than 0x5c
if datapos == -1: break
if filedata[datapos+3] == '#': #This is a string we're interested in
#0x5c appears throughout the .bin files
#In a real 0x5c opcode there is always 0x23 (a.k.a. "#") three bytes after the 0x5c
#How's that for magic numbers?
#So we can exclude 0x5c data that appears within other opcodes
strend = filedata.find('\x00\x59',datapos) #0x5c opcodes always end with these bytes
#passes the entire found 0x5c opcode to a function for formatting
outputstring = calculateoutputstring(datapos,filedata[datapos:strend+2])
outfiledata += outputstring

outfile = open(os.path.splitext(filename)[0] + '.data','wb')
outfile.write(outfiledata)
outfile.close

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

Kelebek

Well-Known Member
Member
Joined
May 25, 2012
Messages
165
Trophies
0
XP
156
Country
Btw, # isn't always there. Although maybe for the "real" table it is. The first tables that apparently aren't used, or used later or something, don't have that # in them. Also just saw that 0x5d is the opcode for specifying a name for dialogue text too (at 0x94C3 in c0000.bin). You'll probably get most of the dialogues from checking that byte, but it won't be all of them. Good enough for now I suppose.
 

flame1234

Well-Known Member
Member
Joined
May 17, 2009
Messages
734
Trophies
0
XP
957
Country
United States
So I noticed Kelebek used pastebin when he posted his program for Brandish so I'll do the same here.
It's a working dumper. Considering I wrote it, it probably won't work all the time, but it will work some of the time. Let me know files it won't work on and I'll try debugging.

Usage this time is python script.py X####.bin X####.pre
Good luck!

Okay, so without further ado:
http://pastebin.com/kTQBEPXB

So this is what the output looks like:
t2520.bin
0x51d 0x5c 0xfe 0x00 "#0502Fあっ、皆さん……" linebreak "昨日は本当にありがとうございました。" newdialogbox "#0504F昨日、副司令に相談したら" linebreak "報告は早い方がいいということで" linebreak "大急ぎで報告書をまとめたんです。" newdialogbox "#0508F七耀教会の協力で" linebreak "あの鐘のことが判明すると" linebreak "いいんですけど……" terminalcode
0x628 0x5c 0xfe 0x00 "#0500F昨日、アルモリカの古戦場に" linebreak "観光客が入り込んでしまったという" linebreak "報告がありました。" newdialogbox "#0504F支援課の皆さんが先んじて" linebreak "救出してくださったそうで……" linebreak "ありがとうございます。" newdialogbox "#0508F本当ならそういう事が起きないように" linebreak "定期巡回などをしているんですが……" terminalcode
0x7de 0x5c 0xfe 0x00 "#0504Fアルモリカの古戦場の件……" linebreak "ありがとうございました。" newdialogbox "#0500F今後はもっと、徹底的に" linebreak "巡回しないといけませんね……" terminalcode
0x870 0x5c 0xfe 0x00 "#0501F司令に無駄と切り捨てられて、" linebreak "未だに調査されていない遺跡などが" linebreak "クロスベルには多々あります。" newdialogbox "#0506F『星見の塔』のような" linebreak "正体が分からないような場所は" linebreak "いつ脅威になるか分からないのに……" terminalcode
0x93a 0x5c 0xfe 0x00 "#0501F正式に調査の許可が下りれば、" linebreak "『星見の塔』のような場所も" linebreak "徹底的に調べるんですが……" newdialogbox "#0506F司令はあまりこういったことに" linebreak "予算を割かせてくれません。" terminalcode
0x9f1 0x5c 0xfe 0x00 "#0502F水際対策、成功したそうですね!" newdialogbox "私も手伝った甲斐がありました。" linebreak "本当によかったです。" terminalcode
0xa62 0x5c 0xfe 0x00 "#0503F偽ブランド業者については、" linebreak "国境門でも頭を悩ませていた" linebreak "問題なんです。" newdialogbox "#0501F今年は皆さんの協力もありますし、" linebreak "何とか食い止めてみせましょう!" terminalcode
0xb08 0x5c 0xfe 0x00 "#0500F今日も警備隊員による" linebreak "定期巡回が行なわれます。" newdialogbox "#0506F観光客の増えている今、" linebreak "いつも以上の警戒が" linebreak "必要なんですよね。" newdialogbox "#0501Fクロスベルにはこの間の" linebreak "『星見の塔』のような" linebreak "危険な場所もありますから。" terminalcode
0xcff 0x5c 0xfe 0x00 "#0509Fえ~っと……ランディ先輩?" linebreak "あたし、先輩風吹かされたなんて" linebreak "全然思ってませんから……" terminalcode
0xe1c 0x5c 0xfe 0x00 "#0502Fあ……ロイドさん。" linebreak "昨日はありがとうございました。" newdialogbox "#0504Fおかげでフランも" linebreak "随分楽しんでくれたみたいです。" terminalcode
0x1053 0x5c 0xfe 0x00 "#0500Fあの……ロイドさん、ランディ先輩。" linebreak "昨日、港湾区の公園で行われた" linebreak "ミニライブに行きました?" terminalcode
0x12a5 0x5c 0xfe 0x00 "#0504F昨日は久しぶりの休暇で" linebreak "足を伸ばすことができました。" newdialogbox "#0502Fフランも元気にしてるみたいで" linebreak "良かったです。" terminalcode
0x1333 0x5c 0xfe 0x00 "#0500F今から街道の定期巡回に" linebreak "出かける所なんです。" newdialogbox "#0503F危険な場所も多いですから" linebreak "観光客が入り込まないように" linebreak "注意しないと……" terminalcode
0x13d0 0x5c 0xfe 0x00 "#0503F皆さんの戦いぶりをみていると、" linebreak "私もまだまだだと思いました。" newdialogbox "#0501Fもっと訓練に励まないと、" linebreak "クロスベルを守ることなど" linebreak "できませんね。" terminalcode
0x1471 0x5c 0xfe 0x00 "#0500F皆さんと演習を行えば、" linebreak "新人隊員にとっても" linebreak "いい訓練になると思います。" newdialogbox "どうかよろしくお願いします。" terminalcode
0x14f0 0x5c 0xfe 0x00 "#0500F特務支援課の皆さん……" linebreak "どうも、お疲れ様です。" newdialogbox "ソーニャ副司令が" linebreak "支援要請について" linebreak "お話したいそうです。" newdialogbox "一度聞いていただけますか?" terminalcode
0x158c 0x5c 0xfe 0x00 "#0508Fあっ、皆さん……" linebreak "お疲れ様です。" terminalcode
0x17f0 0x5c 0xfe 0x00 "#0500Fありがとうございます。" linebreak "少し気が楽になりました。" newdialogbox "#0503Fとにかく、今は警備隊の出来る範囲で" linebreak "やれることをやっていかないと……" terminalcode
0xd5d 0x5c Randy 0x01 "#0308Fハハ……" linebreak "慰められると余計にな……" newdialogbox "#0306Fどーせ俺なんて……" terminalcode
0x10b7 0x5c Lloyd 0x01 "#0005Fあれ? なんでそれを……" terminalcode
0x15b7 0x5c Lloyd 0x01 "#0005F……どうしたんだ?" linebreak "なんだか元気がないみたいだけど。" terminalcode
0xe90 0x5c Lloyd 0x01 "#0002Fいや、こっちこそ" linebreak "誘ってくれてありがとう。" newdialogbox "#0004Fミニライブなんて" linebreak "なかなか行く機会が無いし" linebreak "楽しかったよ。" terminalcode
0x723 0x5c Lloyd 0x01 "#0002Fいや、緊急要請が入っていたから" linebreak "当然のことをしたまでだよ。" terminalcode
0xbd3 0x5c Randy 0x01 "#0309Fハッハ、がんばれよ後輩。" newdialogbox "#0302Fま、何かあったら俺たちの力を" linebreak "アテにしてもいいぜ。" terminalcode
0x10db 0x5c 0xfe 0x00 "#0502Fやっぱり!" linebreak "昨日、私も休みが取れたので" linebreak "フランと行ってたんですよ。" newdialogbox "#0504Fなんだか見たような顔がいるなぁと" linebreak "思ってたんですが……" terminalcode
0x15f6 0x5c 0xfe 0x00 "#0506F……先日の魔獣事件の犯人である" linebreak "マフィアの手下たちですが……" newdialogbox "#0508Fついこの間、" linebreak "保釈されてしまいました。" terminalcode
0xda4 0x5c 0xfe 0x00 "#0501Fうっ……" linebreak "し、しっかりして下さいよ~!" terminalcode
0x768 0x5c Randy 0x01 "#0300Fそーそー。" linebreak "あんまり気に病むことはないぜ。" terminalcode
0xf05 0x5c 0xfe 0x00 "#0509Fふふ、よかったです。" newdialogbox "#0500F……大丈夫、" linebreak "チャンスはまた来ますよ。" linebreak "めげずに頑張って下さいね。" terminalcode
0xc30 0x5c Tio 0x01 "#0202F……なるほど。" linebreak "こういうのが先輩風を吹かす、ですか。" terminalcode
0xdd5 0x5c Lloyd 0x01 "#0006F悪ノリするなよランディ……" terminalcode
0x1164 0x5c Randy 0x01 "#0302Fなんだなんだ、" linebreak "声を掛けてくれりゃあよかったのによ。" terminalcode
0x166a 0x5c Elie 0x01 "#0108F……そう……" terminalcode
0x79d 0x5c 0xfe 0x00 "#0504Fすみません……" linebreak "本当にありがとうございました。" terminalcode
0xc6f 0x5c Randy 0x01 "#0310Fぐおっ……!?" terminalcode
0xf6d 0x5c Lloyd 0x01 "#0012F(……やっぱり何か誤解されてるな……)" terminalcode
0x11a3 0x5c 0xfe 0x00 "#0509Fい、いやぁ……" newdialogbox "見たところ、女性を3人も連れて" linebreak "楽しんでいらしたようですから" linebreak "お邪魔かなあと……" terminalcode
0x1682 0x5c Tio 0x01 "#0203F……保釈金が支払われたんですね。" terminalcode
0xc89 0x5c Elie 0x01 "#0104Fこーら、ティオちゃん。" linebreak "ダメじゃない、ズバリ言っちゃ。" terminalcode
0xf9f 0x5c Randy 0x01 "#0301F……つーか、美人姉妹と同伴かよ!" linebreak "うらやましい奴だぜ。" terminalcode
0x120d 0x5c Elie 0x01 "#0111Fふ~ん……?" terminalcode
0x16ae 0x5c Randy 0x01 "#0306Fおいおい、あんま暗くなんなって。" newdialogbox "#0300Fある程度予測できてたことだし、" linebreak "今回のことは仕方ねぇだろ。" terminalcode
0xcca 0x5c Randy 0x01 "#0306Fお、お嬢……" linebreak "否定してくれよな……" terminalcode
0xfe0 0x5c Elie 0x01 "#0106Fはぁ、うちの男どもは……" terminalcode
0x1225 0x5c Tio 0x01 "#0211F……随分お楽しみだったみたいですね。" terminalcode
0x171b 0x5c Lloyd 0x01 "#0000F……そうだな。" linebreak "きっとこんな体制も" linebreak "徐々によくしていけるはずさ。" terminalcode
0x1004 0x5c Tio 0x01 "#0211F……たらしばっかりです。" terminalcode
0x1255 0x5c Randy 0x01 "#0309Fハッハッハ。" terminalcode
0x1765 0x5c 0xfe 0x00 "#0503F……そう、ですね。" linebreak "今出来ることをやっていくしか" linebreak "ありませんよね。" newdialogbox "#0502Fありがとうございます。" linebreak "少し気が楽になりました。" terminalcode
0x1028 0x5c Lloyd 0x01 "#0011F(……新たな誤解がっ!?)" terminalcode
0x126d 0x5c Lloyd 0x01 "#0006F(な、なんか視線が痛いんだけど……)" terminalcode
0x188d 0x5c 0x09 0x00 "#2003Fなるほど……" linebreak "これが例の遺跡での" linebreak "調査結果というわけね。" newdialogbox "#2002Fよく調べてくれたわ、ノエル。" terminalcode
0x18f3 0x5c 0x08 0x00 "#0504Fいえ、特務支援課の方たちの" linebreak "協力があってこそでした。" newdialogbox "#0501Fそれで……" linebreak "今後、この件はどういたしましょう。" terminalcode
0x1967 0x5c 0x09 0x00 "#2003F……報告書に書かれている" linebreak "この“魔物”を呼ぶ《鐘》……" newdialogbox "#2001Fやはり、古代遺物#8Rアーティファクト#に関わるものである" linebreak "可能性は高そうだわ。" newdialogbox "クロスベル大聖堂のエラルダ大司教に" linebreak "意見を聞いてみましょう。" terminalcode
0x1a38 0x5c 0x08 0x00 "#0503Fそうですね……分かりました。" newdialogbox "#0501Fでは早速、大聖堂に連絡を入れて" linebreak "直接話を伺えないか確認します。" terminalcode
0x1aa5 0x5c 0x09 0x00 "#2000Fええ、よろしくお願いするわ。" terminalcode
0x1bf0 0x5c 0x09 0x00 "#2005Fあら、あなたたち。" newdialogbox "#2000F今、ノエル曹長が" linebreak "例の遺跡の資料を持って" linebreak "大聖堂に向かっているわ。" terminalcode
0x1f18 0x5c 0x09 0x00 "#2003F《星見の塔》、そして例の遺跡……" newdialogbox "#2000Fこの2つの件は古代遺物#8Rアーティファクト#が" linebreak "関わっている可能性がある以上、" linebreak "慎重に扱わなければならないわ。" newdialogbox "今後は七耀教会と連携して" linebreak "調査していく事になるでしょうね。" terminalcode
0x2014 0x5c 0x09 0x00 "#2000Fあなたたち……" linebreak "昨日はご苦労だったわね。" newdialogbox "#2003F遺跡の調査を遂行し、" linebreak "原因は不明ながら魔獣が発生する現象を" linebreak "止めることもできた。" newdialogbox "現時点ではこれ以上ない" linebreak "成果と言えるでしょう。" newdialogbox "#2000F後の調査は、私たち警備隊に" linebreak "任せてちょうだい。" terminalcode
0x2119 0x5c 0x09 0x00 "#2000Fノエル曹長……" linebreak "首尾よく彼らの協力を得られたようね。" terminalcode
0x2459 0x5c 0x09 0x00 "#2000F警備隊による遺跡の調査は" linebreak "一度、失敗してしまっているわ。" newdialogbox "#2003F負傷者こそ出ていないものの、" linebreak "化け物に出会ったショックで" linebreak "寝込んでしまった隊員もいる……" newdialogbox "#2000F重々、気を付けて行ってちょうだい。" terminalcode
0x253c 0x5c 0x09 0x00 "#2006F…………………………" terminalcode
NOTE: This is output is truncated, dump it yourself please, thanks.

So I guess I'll need to do the inserter now...
I need help figuring out the 0x55 opcode that this dumper likes to dump (it has text in it). Or maybe we don't have to figure it out, I don't know.

Has anyone checked that editing 5c opcodes in a hex editor will result in changed ingame text? We need to make sure that 5c opcodes can handle ASCII. EDIT: Looks like zero_g_monkey did here. Good to know. And note to self: Don't pad strings with zero bytes. Pad with spaces. The zero byte is an opcode; it makes the game hiccup.
 

zero_g_monkey

Well-Known Member
OP
Member
Joined
Aug 9, 2013
Messages
332
Trophies
0
Age
44
XP
321
Country
United States
Nice dumper. Which version of python is it coded for 2 or 3? I know there is some differences between the two, so I want to make sure I use the one it was made for. I might be able to provide some more info on the "who is talking" OP codes for the dumper. Gonna head to bed but will see what I can do tomorrow. Thanks again.
 

zero_g_monkey

Well-Known Member
OP
Member
Joined
Aug 9, 2013
Messages
332
Trophies
0
Age
44
XP
321
Country
United States
Hopefully this might be of some use. Taken from the data\face folder after images have been converted. These are the matches for the OP codes. If you want some more info as to exact codes and how many there are, just let me know. There is a special note when you get to 5400 (Tio) because some of the images are actually Zeit. I pointed out the differences. If you wanted to get real interesting, we could work on including the actually faces with the lines of dialog. I can provide the images if needed.

00 - Lloyd
01 - Elie
02 - Tio
03 - Randy
04 - Lazy
05 - Noel
06 - Dudley
07 - Yin
08 - Estelle
09 - Joshua
10 - Sergei
11 - KeA
12 - Zeit
13 - Cecil (Woman)
14 - Arios
15 - Sizuku
16 - Wald
17 - Ilya
18 - Rixia
19 - Fran
20 - Sonya
21 - Grace
22 - Ian
23 - Jona
24 - Joachim
25 - Mayor MacDowell
26 - Earnest
27 - Hartman
28 - Dieter
29 - Mariabell
30 - Marconi
31 - Garcia
32 - Cao
33 - Renne
34 - Kirika
35 - Lector
36 - Harold
37 - Sophia
38 - Colin
39 - Meister Jorg
50 - Lloyd (Fancy)
51 - Lloyd (Fancy w/glasses)
52 - Lloyd (Casual)
53 - Elie (Fancy)
5400-5411 - Tio (Fancy) **NOTE**
5412-5414 - Zeit
55 - Tio (Casual)
56 - Randy (Fancy)
57 - Lazy (Fancy)
58 - KeA (Hospital Gown? - Fancy?)
59 - Cecil (Dressy?)
60 - Sizuku (Dressy? - Cold?)
61 - Ilya (Fancy, Dancer)
62 - Rixia (Preiestess?)
63 - Noel (Casual)
64 - Fran (Casual)
65 - Mayor MacDowell (PJs)
66 - Earnest (Suit and Sword)
67 - Joachim (Priest, blue hair)
68 - Joachim (Priest, white hair)

Tested the dumper. Works great.
 

flame1234

Well-Known Member
Member
Joined
May 17, 2009
Messages
734
Trophies
0
XP
957
Country
United States
That's strange. Because 01 is the code for Lloyd. Dump m3000.bin and look at the program code and you'll see what I mean. So those are all offset by 1...for some reason.
Well please go ahead and update the program for me. And while you're at it change the zero on line 84 to a -1. My mistake. If you're really really not a programmer just tell me and I'll do it, but it should be easy enough to do yourself. I'm not a programmer either so don't worry.

If you want to you could prepare a face collection for the translators, so they can choose the right face (in case a different one is correct for an English audience for certain lines). I'm certain the Falcom producers had such a thing in front of them when they prepared the original dialog. But I don't think that's correct. What we really need is an inserter.

I think I could write an inserter to remap the .pre files to point to the right spots. But I'm pretty sure that alone wouldn't be enough. I think there are pointers in other opcodes that our text would disturb. Discovering these opcodes is beyond my current ability.

I'm not above learning new things. The above is my first python program that does actual, useful work, and my first python program ever was only a few days ago. I need guidance from someone more experienced on what's needed to create an inserter. I don't know how to map the opcodes like Kelebek did. How do you set a breakpoint in PPSSPP? Why would you want to do this?
 

zero_g_monkey

Well-Known Member
OP
Member
Joined
Aug 9, 2013
Messages
332
Trophies
0
Age
44
XP
321
Country
United States
These are the basis for my codes. Gonna try and see if I can narrow down the differences between the two. Code has been edited. I'm not a programmer but I can modify code and thankfully yours includes plenty of notes. Always a good thing.

face.zip


Hmm... This is gonna take some serious thought and right now I am gonna have to deal with people trashing my lawn with a 4 wheeler.
 

Kelebek

Well-Known Member
Member
Joined
May 25, 2012
Messages
165
Trophies
0
XP
156
Country
I'm not above learning new things. The above is my first python program that does actual, useful work, and my first python program ever was only a few days ago. I need guidance from someone more experienced on what's needed to create an inserter. I don't know how to map the opcodes like Kelebek did. How do you set a breakpoint in PPSSPP? Why would you want to do this?

I'm not experienced either. In PPSSPP just go to Debug > Disassembly. Double click any line in the code to breakpoint it, and you can set memory breakpoints by copying an address from the memory area at the bottom, and then going into the Breakpoint menu at the top.

You'd need to do it because you can't decompile/recompile the file properly without knowing how the game reads it. Just as a random example, in m3000.bin, there's a 0x2 opcode at 0x1207. The jump location for that opcode is at 0x120d, and jumps to 0x12fc, which is a 0xb opcode just a little further down the file. If you look, that jumps over 2 different strings which are right below the opcode. So, if you edited those strings and made them longer or shorter, that one 0x2 jump location will no longer point to that 0xb, and then the game will go and crash when it gets to that piece of code. Not to mention changing either of those strings breaks the jump locations of every single jump below that in the whole file, because they use absolute positions. That's why you need to be able to recompile the file to fix all of those jumps, otherwise the file length is basically uneditable.
 
  • Like
Reactions: flame1234

flame1234

Well-Known Member
Member
Joined
May 17, 2009
Messages
734
Trophies
0
XP
957
Country
United States
So that's where the disassembler was.

I have some basic questions and there's no assembler tutorial I can find on here (for PSP). Or anywhere else for that matter. So I will just ask them here and hope for the best. I did download this manual for the MIPS R4000, but I didn't get too far with that alone.
So the program starts at x08000000. How do I find out where in the UMD that is?
I am interested in m3000.bin. Where is that file stored on the UMD or how do I find the address of that file? How can I breakpoint when the program accesses that file?
 

neoxephon

Well-Known Member
Member
Joined
Jul 13, 2009
Messages
437
Trophies
0
Age
35
Location
USA
XP
547
Country
United States
So that's where the disassembler was.

I have some basic questions and there's no assembler tutorial I can find on here (for PSP). Or anywhere else for that matter. So I will just ask them here and hope for the best. I did download this manual for the MIPS R4000, but I didn't get too far with that alone.
So the program starts at x08000000. How do I find out where in the UMD that is?
I am interested in m3000.bin. Where is that file stored on the UMD or how do I find the address of that file? How can I breakpoint when the program accesses that file?

What you need to do is find that file in the memory.

Open PPSSPP and load your ISO. Once it has started, pause the game and go to Debug > Memory View...

In this window, right click and choose Dump... and click ok in the popup window.

Go to the folder where PPSSPP resides and open the RAM.dump file in a hex editor.

Do a search and locate some of the text from the file that you want. Sometimes, if that text was displayed on the screen, you will find multiple instances of it. Look for where it looks the same as the actual file.

Take the offset of whatever you want to breakpoint on.

Add 0x08800000 to it.

Take this value and put your breakpoint on it.
 
  • Like
Reactions: flame1234
Status
Not open for further replies.

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    AncientBoi @ AncientBoi: Now go take a shower @BakerMan . Phew +1