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

Author Topic: [PSX] Brave Fencer Musashi - Messy texts  (Read 16556 times)

Dark Fulgore

  • Jr. Member
  • **
  • Posts: 20
    • View Profile
    • Tool-assisted Flawless Playthroughs
[PSX] Brave Fencer Musashi - Messy texts
« on: January 21, 2013, 09:23:04 am »
Hello guys! I'm totally new to console games translating and new here.
I already translated some PC games and never tried console games before. Tried to translate Brave Fencer Musashi to Brazilian Portuguese to my girlfriend, so she can play it, she is playing Chrono Trigger, then will play A Link to the Past and then Alundra, so I have free time and she will take long to finish those games.
I want to work hard on this game, but I'm getting nowhere at the moment. So, I have some problems.

I got some PSX games, opened the files in a Hex editor, found the texts and translated them, piece of cake, but with Musashi isn't that easy.
In Musashi, the texts are all messy, because the game has some voices during some dialogues, the text box changes during the dialogue too and some words are in red instead of black. The texts are between those codes and I can't translate the texts with this mess around. I just want to translate the texts, I will not use special characters at all.

Anyone know something about Musashi? There's a tool to extract those lines without the voice and dialogue codes?
I tried to find some utilities for PSX games and found nothing to help me, tried to read some tutorials, but they aren't exactly what I need because I have no knowledge to use those tutorials right.

Hope someone can help me. Thanks guys!

Pikachumanson

  • Hero Member
  • *****
  • Posts: 607
    • View Profile
Re: [PSX] Brave Fencer Musashi - Messy texts
« Reply #1 on: January 21, 2013, 12:32:59 pm »
Psx doesn't have too many tutorials. It's programming language mips has some nice documents.
If you are a complete beginner, then you have a long way to go. Perhaps you can try just looking at the iso or whatever type of files psx uses in a hex editor and you might get lucky to find the text all laid out for you without some type of compression.

Dark Fulgore

  • Jr. Member
  • **
  • Posts: 20
    • View Profile
    • Tool-assisted Flawless Playthroughs
Re: [PSX] Brave Fencer Musashi - Messy texts
« Reply #2 on: January 21, 2013, 02:53:14 pm »
Psx doesn't have too many tutorials. It's programming language mips has some nice documents.
If you are a complete beginner, then you have a long way to go. Perhaps you can try just looking at the iso or whatever type of files psx uses in a hex editor and you might get lucky to find the text all laid out for you without some type of compression.

Most of the texts has no compression, I can freely change them. But the problem is when the dialogue has voice and text box changes during the dialogue. I don't know hot to proceed when this happen.

henke37

  • Hero Member
  • *****
  • Posts: 643
    • View Profile
Re: [PSX] Brave Fencer Musashi - Messy texts
« Reply #3 on: January 22, 2013, 12:04:12 am »
You will simply have to learn what the command codes do. It took effort to put them there. They are there for a reason.

Auryn

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
Re: [PSX] Brave Fencer Musashi - Messy texts
« Reply #4 on: January 22, 2013, 04:12:06 am »
Well, if you delete all those control codes, you will probably end up corrupting the game so the answer is actually: " there is no way you can translate without those codes".
If you figure out what they do, it's possible to delete some of them (example the call to the voice act but you would loose 50% of the game there because it's just too fun to listen to him).
other codes will probably be the definition of the text window, size of the text, change of color (see important words) and pauses.
Anyway, if you will delete those codes, you will end having a bad quality translation if it still work.

Pikachumanson

  • Hero Member
  • *****
  • Posts: 607
    • View Profile
Re: [PSX] Brave Fencer Musashi - Messy texts
« Reply #5 on: January 22, 2013, 06:55:17 am »
If you get real good with psx hacking maybe you can do what Burnt Lasagna did with Rondo of Blood and Dawn of Y's.
I'd shoot him a message if I were you and see what advice he can give you even though he's mainly worked with Turbo Duo games.

Dark Fulgore

  • Jr. Member
  • **
  • Posts: 20
    • View Profile
    • Tool-assisted Flawless Playthroughs
Re: [PSX] Brave Fencer Musashi - Messy texts
« Reply #6 on: January 22, 2013, 10:28:53 am »
Thanks you guys! I really appreciate!
I'm reading some documents to get some new info. I really want to translate this game, one of the best games on PSX and Action-RPG in general.

And his voice is one of the most funny things in the game, he is just so natural talking to people! As Auryn said, losing this will ruin the game.
Losing the red words during dialogues isn't a problem, because in portuguese those red colors will be misplaced if we don't find a way to completely manipulate that.
I'm studying the line break codes, red words and text box changes. The sound thing will be hard because each time is a different sound, so this can get confusing sometimes.

Thank you, PikachuManson! I hope your guy can give me some directions and documents to study, I really want to get this done. I have a good free time now and I have some minor programming skills, like Visual Basic and some Game Maker games with GML. I hope I can handle this. Thanks!

But I really want to translate this game, I freaking love it!
Besides that, I will probably start working on a speedrun for this game, all Bicho Fields and Minkus and I will not skip dialogues and important cutscenes, I want it to be like and adventure for those who watch.

Thank you again, guys! :thumbsup:
« Last Edit: January 22, 2013, 10:38:31 am by Dark Fulgore »

Pikachumanson

  • Hero Member
  • *****
  • Posts: 607
    • View Profile
Re: [PSX] Brave Fencer Musashi - Messy texts
« Reply #7 on: January 22, 2013, 11:45:13 am »
Chee Nada!

Auryn

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
Re: [PSX] Brave Fencer Musashi - Messy texts
« Reply #8 on: January 22, 2013, 04:43:57 pm »
Can you maybe post a screenshot of the text box ingame (with red text) and the corresponding area opened in an hex editor??

Well, there are many ways to code a game but usually i have saw is a 2 byte or more control code.
The color change could be a 2 byte but the sound should be at least 4 bytes.
Anyway usually you have the first byte telling you the function and the second (or more) telling a value.
" This is an AA01 example AA00." where AA is the function change text color and the value 01 is red and 00 if black. Meaning that it should be very easy to find out what they are (1-2 bytes before the red word and 1-2 bytes after it). As soon as you know what they are, you can place them where you need when inserting the translation.

Dark Fulgore

  • Jr. Member
  • **
  • Posts: 20
    • View Profile
    • Tool-assisted Flawless Playthroughs
Re: [PSX] Brave Fencer Musashi - Messy texts
« Reply #9 on: January 22, 2013, 06:23:58 pm »
Can you maybe post a screenshot of the text box ingame (with red text) and the corresponding area opened in an hex editor??

Well, there are many ways to code a game but usually i have saw is a 2 byte or more control code.
The color change could be a 2 byte but the sound should be at least 4 bytes.
Anyway usually you have the first byte telling you the function and the second (or more) telling a value.
" This is an AA01 example AA00." where AA is the function change text color and the value 01 is red and 00 if black. Meaning that it should be very easy to find out what they are (1-2 bytes before the red word and 1-2 bytes after it). As soon as you know what they are, you can place them where you need when inserting the translation.

I will post the screenshots with my comments.

Here's the Hex:



Here's the corresponding dialogue sequence in the order they happen:

This first one is simple, but there's something strange. After the "Shoot" and before the "!", there's something, isn't a line break because the "!" is after that. I think this is the arm movement Musashi does when the says "Shoot!". Could be that?
Because his voice is activated before he says "Shoot!" or the other way around.


The second one the text box has changed and the red word appears. Following your idea, I've found that, the hex 01 02 starts the red text and the 01 01 put it back to black. Easy to spot after "Lumina", because the comma isn't red anymore.
And the value 0A is the line break. (I'm searching those things as I type this)



The third screenshot is after the line break, activates the voice and change the text box.



And here is the proof that the values are correct, changed the word Lumina and removed the red:



Goddamnit, Auryn, you are such a pro! Im total noob and I'm finding those things following just your words, man. Amazing knowledge!
I'm excited with this, they are simple findings related to a complete rom hacking, but for me is great, I'm learning a lot!
Thank you guys!  ;)
« Last Edit: January 22, 2013, 11:04:03 pm by Dark Fulgore »

henke37

  • Hero Member
  • *****
  • Posts: 643
    • View Profile
Re: [PSX] Brave Fencer Musashi - Messy texts
« Reply #10 on: January 23, 2013, 01:56:27 am »
Looks like you have some back reference compression going on there. I strongly recommend that you decompress the text before trying to figure out the details of how it works.

Dark Fulgore

  • Jr. Member
  • **
  • Posts: 20
    • View Profile
    • Tool-assisted Flawless Playthroughs
Re: [PSX] Brave Fencer Musashi - Messy texts
« Reply #11 on: January 23, 2013, 08:25:50 am »
Looks like you have some back reference compression going on there. I strongly recommend that you decompress the text before trying to figure out the details of how it works.

But I doesn't know how this works. This is why I'm looking for help.
There's any specific document I can read to help me? This game being a Square game, doesn't it follow a certain pattern and already exists any tool to help me?

Gemini

  • Hero Member
  • *****
  • Posts: 2026
  • 時を越えよう、そして彼女の元に戻ろう
    • View Profile
    • Apple of Eden
Re: [PSX] Brave Fencer Musashi - Messy texts
« Reply #12 on: January 23, 2013, 09:23:14 am »
I remember looking into this game over 7 years ago: most data is definitively LZSS compressed. My advice is to make some research on LZ compression algorithms, unless you find somebody to do the work for you.
I am the lord, you all know my name, now. I got it all: cash, money, and fame.

Dark Fulgore

  • Jr. Member
  • **
  • Posts: 20
    • View Profile
    • Tool-assisted Flawless Playthroughs
Re: [PSX] Brave Fencer Musashi - Messy texts
« Reply #13 on: January 23, 2013, 10:49:16 am »
I remember looking into this game over 7 years ago: most data is definitively LZSS compressed. My advice is to make some research on LZ compression algorithms, unless you find somebody to do the work for you.

I have no knowledge at this compression thing. :(
This will be hard, but I will try to find something.

Auryn

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
Re: [PSX] Brave Fencer Musashi - Messy texts
« Reply #14 on: January 23, 2013, 03:02:58 pm »
sadly the qhimm wiki is still down :(
there is an article there explaining the LZSS used on FF7 that could be identical to BFM.
If you find one in your language, be sure to check it.
In poor words, a LZSS compression is come thing like " go back x letters and copy y letters from there".
If you take a look at your hex screen, you will see that you have "Why do I have t" and then it's unreadable.
The following hex values are such "go back x and copy y letters" (remember the empty spaces)
so you have:
"Why do I have t*go back 10 and copy 2 letters**go back 11 and copy 3**go back 6 and copy 1**go back x (lazy to count, anyway go to take the "hi" of Musashi) and copy 2*s!?
So step by step:
-"Why do I have t*go back 10 and copy 2 letters* = "Why do I have to_"
-"Why do I have to_"*go back 11 and copy 3* = "Why do I have to do_"
-"Why do I have to do_"*go back 6 and copy 1* = "Why do I have to do t" (it's possible that this wrong and that the "t" come from the actual hex value you see there in between but the result is the same.
-"Why do I have to do t"*go back x (lazy to count, anyway go to take the "hi" of Musashi) and copy 2* = "Why do I have to do thi"
and the rest is uncompressed to get
Why do I have to do this!?

You can check this 2 documents:
http://www.romhacking.net/?page=documents&category=&platform=&game=&author=&perpage=20&level=&title=lz&desc=&docsearch=Go
One contains 3 programs in C and the other explain the compression more deeply as i tried to do.

Just to make a quality translation, you should check this site as well:
http://kahran042.livejournal.com/29301.html
There are some references that have gone lost in the english translation.

Dark Fulgore

  • Jr. Member
  • **
  • Posts: 20
    • View Profile
    • Tool-assisted Flawless Playthroughs
Re: [PSX] Brave Fencer Musashi - Messy texts
« Reply #15 on: January 23, 2013, 06:26:32 pm »
sadly the qhimm wiki is still down :(
there is an article there explaining the LZSS used on FF7 that could be identical to BFM.
If you find one in your language, be sure to check it.
In poor words, a LZSS compression is come thing like " go back x letters and copy y letters from there".
If you take a look at your hex screen, you will see that you have "Why do I have t" and then it's unreadable.
The following hex values are such "go back x and copy y letters" (remember the empty spaces)
so you have:
"Why do I have t*go back 10 and copy 2 letters**go back 11 and copy 3**go back 6 and copy 1**go back x (lazy to count, anyway go to take the "hi" of Musashi) and copy 2*s!?
So step by step:
-"Why do I have t*go back 10 and copy 2 letters* = "Why do I have to_"
-"Why do I have to_"*go back 11 and copy 3* = "Why do I have to do_"
-"Why do I have to do_"*go back 6 and copy 1* = "Why do I have to do t" (it's possible that this wrong and that the "t" come from the actual hex value you see there in between but the result is the same.
-"Why do I have to do t"*go back x (lazy to count, anyway go to take the "hi" of Musashi) and copy 2* = "Why do I have to do thi"
and the rest is uncompressed to get
Why do I have to do this!?

You can check this 2 documents:
http://www.romhacking.net/?page=documents&category=&platform=&game=&author=&perpage=20&level=&title=lz&desc=&docsearch=Go
One contains 3 programs in C and the other explain the compression more deeply as i tried to do.

Just to make a quality translation, you should check this site as well:
http://kahran042.livejournal.com/29301.html
There are some references that have gone lost in the english translation.

I will try to find some tools from other games for this kind of compression, as you said, maybe them work with Musashi.
I got the logic that you explained but I think I will not be able to handle this on my own. I mean, build the tool if I didn't find one.
But I will keep looking, with those directions will be easier to find something and with those documents, who knows, maybe I can do this.  ;D

Thanks for everything guys!

Auryn

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
Re: [PSX] Brave Fencer Musashi - Messy texts
« Reply #16 on: January 24, 2013, 08:17:11 am »
More help on the way :p

Actually it seems you got reed of one problem (partially) but encountered a new one.
Well the new problem is that those files are not only compressed but there are many files inside one .cd file (yes, they are archive files).
Part of the solution can be found: http://forum.xentax.com/viewtopic.php?p=53080
I say part of the solution because it only should extract and decompress?? your .cd files.
The problem is that i didn't get it to work.
Assuming that the tool split and decompress the files, you will still need a compressor after translating.

It look pretty standart archive type format so you could manually split a part of the file and try the different decompressor online to see if one work.

Dark Fulgore

  • Jr. Member
  • **
  • Posts: 20
    • View Profile
    • Tool-assisted Flawless Playthroughs
Re: [PSX] Brave Fencer Musashi - Messy texts
« Reply #17 on: January 24, 2013, 09:47:20 am »
More help on the way :p

Actually it seems you got reed of one problem (partially) but encountered a new one.
Well the new problem is that those files are not only compressed but there are many files inside one .cd file (yes, they are archive files).
Part of the solution can be found: http://forum.xentax.com/viewtopic.php?p=53080
I say part of the solution because it only should extract and decompress?? your .cd files.
The problem is that i didn't get it to work.
Assuming that the tool split and decompress the files, you will still need a compressor after translating.

It look pretty standart archive type format so you could manually split a part of the file and try the different decompressor online to see if one work.

I already have this Biohazard tool (recently found), the old version works with Windows 7, newer versions don't.
I unpacked the SC01.CD and it has 86 .BIN files, SC0100.BIN~SC0185.BIN. I tried some LZSS decompressors but no luck. I tried to drag and drop the file to the LZSS.exe, tried with to command line method but there's no readme.txt, so I think I didn't used the sintax correctly.
Here's the version I used. If you get some error during the unpacking proccess, use the compatibility mode with XP.

Can you give some tips no how to use the LZSS decompressor?
Thank you, Auryn! See ya!   :thumbsup:

PS.: I'm still reading the documents! There are some good examples like the one you explained to me. I got the idea, but the coding is beyond me at the moment.
Thanks again, man!

Auryn

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
Re: [PSX] Brave Fencer Musashi - Messy texts
« Reply #18 on: January 24, 2013, 09:19:14 pm »
Well it seems you are still 1 step ahead of me.
I got the old version (and a newer) to start on win xp and win7 x64 but when i try to expand cd, it crashes.
Did you add some dll to the folder of the exe?? Can you please zip them and send them to me??
By the way the newer versions seem to have lost the PSone games and concentrate on RE.
A little thing I noticed is that you are still working with the whole image, you usually don't do that.
Get isobuster or cdmage to extract the single files.
The list.cd you can let it alone for the moment, it seems a collection of 8 pointer tables but i not sure yet for what.
Main.cd contains all assimilation texts, save screens, game over, reload etc... texts and mostly already decompressed.
If you search the whole image for Musa, you will find a mix of decompressed and compressed text but if you search for <Musashi>, you will find mostly uncompressed text (yes, there are parts that are decompressed already so you could study the format there but you have to play the game till there ;p)
If you searched the image for a text and you want to know in what file it is, take the offset in the image, convert it to decimal, divide it by 2352 and check (with cdmage or any program that show you the LBA of the files) where it is.
Let's make the example of your text above, the offset in the image is x1EE1B10 = 32381712 > divide by 2352 = 13767.73....
If we check the table CDmage give us for the LBA, we have SC01.CD starting at 6161 and ST01.STR starting at 15965 so the text you posted above is inside the file SC01.CD (xEDB6A7 to be exact).
The very first sentence on the game (<Steward Ribson> There both be no effect!!) is in the same archive (SC01.CD) at xF0909E meaning that the text inside the files is not in the right order just to make things more fun ;)
I can not really help you with the LZSS program because i don't know wich one you are using.
What i told you before about compression is correct but there is more and i belive this kind of compression is called huffman.
Not yet tested but take a look at your hex screen, just before your maked part (4 bytes before) there is an FF, let's start from there.
FF = the next 8 bytes are uncompressed so 01 18 <Musas (write like this because more easy to follow)
the next byte is 7F, (not confirmed) it's looking like it's in yF format meaning that the next y bytes are uncompressed so hi> 0A 19 14 17
F4 00 it's probably one of those *go back and copy* but i didn't figured out the format yet. Because the next is a FF, i believe this will copy only 1 byte.
here the next FF so 25 01 Shoot 04
here there is another of those go back and copy and i believe that the last byte it write here will be a FF so i believe that could be it copy and write the above 0A 19 14 17 F4 00 FF
because the last byte writte in a FF, the next will be uncompressed
and so on.

If you can send me some of those splitted files you got from that program (especially those first texts in the game) i can check out the decompression tools).
Did you check that they are not already decompressed??

Gemini

  • Hero Member
  • *****
  • Posts: 2026
  • 時を越えよう、そして彼女の元に戻ろう
    • View Profile
    • Apple of Eden
Re: [PSX] Brave Fencer Musashi - Messy texts
« Reply #19 on: January 24, 2013, 09:31:42 pm »
BioFAT should be more stable with the next few revisions. MarkGrass, the author, is currently using bits of my code to replace the SDL libraries; this should hopefully fix all the dependency issues and most random crashes. As for the compression, I'm afraid you'll have to use a specific compressor made for this game. It could be using something already implemented in other games, like Okamura's LZSS from FFVII, but it could also be something totally different like in Xenogears or Chrono Cross. SquareSoft was the master of custom compressions back in the PSX days.
I am the lord, you all know my name, now. I got it all: cash, money, and fame.