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

Author Topic: Why am I getting a blank text when translating a game?  (Read 1379 times)

Soul Reaper

  • Jr. Member
  • **
  • Posts: 14
    • View Profile
Why am I getting a blank text when translating a game?
« on: December 11, 2019, 04:26:23 am »
So I've been working on translating this game for about a month now called Soul Eater Monotone Princess which is wii game and I've been pretty much learning about the art of romhacking as I go on with this. Now currently I have two questions on this matter but one of which I am more currently focused on. So as I was translating the game, everything was going well until this one character speaks for like the 3rd time. Instead of him going on with the text I wrote him, he becomes completely mute and the text isn't even there. Some details about this that might be useful to share is that the characters always say their lines out in not only text but audio as well. And usually when a character talks, their name will pop up out on the top left of the box. However when I get a blank text, all of that stops working.

Here's links to images on how it looks when I mess around with it to the most I can vs when I push it a little bit further
https://docs.google.com/document/d/1437nByP7-kTGnKvCZRvjAwPaKaXKqd0_PG-jYqN1PQ4/edit?usp=sharing  (side note, for this I just used spaces on
                                                                                                   the hex editor so It'd easily show in game.)
https://docs.google.com/document/d/18Bj_PyaSkbRCigIdKWyX-RFDYl7SONFHJI1k8Zr3hLg/edit?usp=sharing


Now I've played around with it quite a bit and I'm not really understanding what it could be. I've retyped the whole text back out to what it should be in hex and it's still blank. For some reason I had another text later on that had the same issue as this one by the same character but somehow when I played around with it on a new file for a bit then tried writing it out after as I did with the broken one and it worked, it was fixed. So I did the same process for that as I did this one and nothing is working, I even made another copy of the original file on there and the same exact problem occurs. It seems like whenever I type anything in from A7F to A9A, all that stuff disables. Do any of you guys know how I could possibly fix this?

*Another note is that I've noticed this game runs 1.5 bytes of hex for each character while most English seems to be written in only 1 while Japanese typically seems to be 2 (at least that's how Shift-JIS and EUC-JIS looks like to my understanding).So if you guys know of anyways to help me work around that as far as stuff like relative search goes, that would be amazing!



Jorpho

  • Hero Member
  • *****
  • Posts: 4211
  • The cat screams with the voice of a man.
    • View Profile
Re: Why am I getting a blank text when translating a game?
« Reply #1 on: December 11, 2019, 09:28:38 am »
I've retyped the whole text back out to what it should be in hex and it's still blank.
Are you saying the hex in those two images is supposed to be exactly the same?
This signature is an illusion and is a trap devised by Satan. Go ahead dauntlessly! Make rapid progres!

FAST6191

  • Hero Member
  • *****
  • Posts: 2652
    • View Profile
Re: Why am I getting a blank text when translating a game?
« Reply #2 on: December 11, 2019, 10:22:51 am »
"1.5 bytes of hex"
Do you mean a 12 bit encoding? Don't know that I have seen one of those before, and would not have not expected the Wii to have it either (would have bet some kind of space saving for an old console, though I suppose you do have the greater than 16 bit encodings for more modern devices and this would be some variation on that theme). As far as dealing with it I would probably just try to figure out a way to expand it to 16 bits somehow and go from there -- you might be able to do some kind of thing with shifting data to and fro to clear the upper bits and merging the results (probably with a spreadsheet/text editor column mode) but personally depending upon how long it is, or how long you need to feed your analysis tools/methods, I would probably just copy a nybble (4 bits) of 0 and set my hex editor to insert mode and have some fun with ctrl and V and arrow keys.

Anyway what happens if you change what you put for the third character/box to what you have now but leave the original stuff alone?

The usual three guesses are

You messed up a control flag/character input (including the table itself changing)
Memory issues if it is bigger
Pointer issues.

Soul Reaper

  • Jr. Member
  • **
  • Posts: 14
    • View Profile
Re: Why am I getting a blank text when translating a game?
« Reply #3 on: December 11, 2019, 10:44:38 am »
Jorpho, nah that's not what I am saying at all. So in the first image I put spaces in every hex I could to wear it'd still allow the text to be visible. On the second image I'm showing myself add just three more spaces and then boom, the text, speech, speaking animation, all gone. Now when I said "I've retyped the whole text back out to what it should be in hex and it's still blank." from that I meant I retyped the old japanese text the game was using in hex, but nothing worked when I did that.
« Last Edit: December 11, 2019, 03:41:42 pm by Soul Reaper »

Soul Reaper

  • Jr. Member
  • **
  • Posts: 14
    • View Profile
Re: Why am I getting a blank text when translating a game?
« Reply #4 on: December 11, 2019, 12:28:48 pm »
"1.5 bytes of hex"
Do you mean a 12 bit encoding? Don't know that I have seen one of those before, and would not have not expected the Wii to have it either (would have bet some kind of space saving for an old console, though I suppose you do have the greater than 16 bit encodings for more modern devices and this would be some variation on that theme). As far as dealing with it I would probably just try to figure out a way to expand it to 16 bits somehow and go from there -- you might be able to do some kind of thing with shifting data to and fro to clear the upper bits and merging the results (probably with a spreadsheet/text editor column mode) but personally depending upon how long it is, or how long you need to feed your analysis tools/methods, I would probably just copy a nybble (4 bits) of 0 and set my hex editor to insert mode and have some fun with ctrl and V and arrow keys.

Anyway what happens if you change what you put for the third character/box to what you have now but leave the original stuff alone?

The usual three guesses are

You messed up a control flag/character input (including the table itself changing)
Memory issues if it is bigger
Pointer issues.

Hey Fast6191, it's great to see ya! I've been learning a lot about romhacking from your 2016 pdf. Anyway to answer your first question, yes I did mean 12 bit encoding, I wasn't sure if I should to refer it as that or call it how it's written out as in CrystalTile2. And as to dealing with the 12 bit encoding sorry dude you lost me, I wouldn't even know how to start by merging the results and not quite sure what you mean by the "upper bits".

And for your second question, if you mean like what happens if I change it to the English translation on the hex editor I'm showing as an example up there, here are the results:
https://docs.google.com/document/d/1EOHBkMsw46Rv7HBPrFgNzEMqWMZpLh5PXN_zOloEr1E/edit?usp=sharing

But here's what it looks like if I type around it:
https://docs.google.com/document/d/1c-Ndv0M0bsO_ijvxxl6_aRJgNxaYRozSyHl2MULQuvI/edit?usp=sharing

And here's what it looks like if I type in it just a little bit:
https://docs.google.com/document/d/1kf-iougP359WIJISPzv0NPNmChCR--VVyZonl_xoFMg/edit?usp=sharing

4l3j4ndr0

  • Jr. Member
  • **
  • Posts: 78
  • Gameboy Color Rules!
    • View Profile
Re: Why am I getting a blank text when translating a game?
« Reply #5 on: December 11, 2019, 07:53:28 pm »
I think you are overwritten the code where indicate the game where the text box end.

You have to determine that code and dont touch it.

Do you dumped the jap scrip already?

I mean you can load a .tbl whit the hiragana, katakana and kanji chart and see where the text end.

And determine the code in between text.

Soul Reaper

  • Jr. Member
  • **
  • Posts: 14
    • View Profile
Re: Why am I getting a blank text when translating a game?
« Reply #6 on: December 11, 2019, 08:04:43 pm »
I think you are overwritten the code where indicate the game where the text box end.

You have to determine that code and dont touch it.

Do you dumped the jap scrip already?

I mean you can load a .tbl whit the hiragana, katakana and kanji chart and see where the text end.

And determine the code in between text.

I don't really know what you mean by "jap scrip" but I can tell you I already understand where the text ends. In the hex charts whenever I see a 00 that means it's the end of the text. So I'm sure I'm not overwriting it at all because I made sure to leave the 00 where it was. When I was looking at the hex, all the values from A7F to A9A just look like they just make up 10 japanese characters and an enter key (the enter key here is 0A). Plus what makes this even easier to ensure I'm not overwriting this script, there will be this line that looks like %_vs[????]%_mk[?] right after each 00 which are all seen on the images I have made links to above. And I know this because pretty much all my other texts work by doing it this way, so my question is why not this one? And more specifically, why does this text, name, and speech disable whenever I type in anything from A7F to A9A?
« Last Edit: December 11, 2019, 08:54:22 pm by Soul Reaper »

4l3j4ndr0

  • Jr. Member
  • **
  • Posts: 78
  • Gameboy Color Rules!
    • View Profile
Re: Why am I getting a blank text when translating a game?
« Reply #7 on: December 12, 2019, 11:54:43 am »
I tried to look by myself yesterday but ahhhhhh is a 3gb game file.

I keep wondering why you dont display the Japanese script on the hex program? I all can see is the raw code whit the new english input. I assume the Japanese font already have ascii characters.

I dont know, but I assume (sorry if I'm wrong), there's something bad in the way you are working.

Usually you need to reverse  engineering the game to know the ,font,pointers of the text,the Vram memory available and the imagws offset to edit.

Then, dump all script, translate, and reinsert the text. All that whit new pointers, new text etc...

Soul Reaper

  • Jr. Member
  • **
  • Posts: 14
    • View Profile
Re: Why am I getting a blank text when translating a game?
« Reply #8 on: December 12, 2019, 04:19:15 pm »
I tried to look by myself yesterday but ahhhhhh is a 3gb game file.

I keep wondering why you dont display the Japanese script on the hex program? I all can see is the raw code whit the new english input. I assume the Japanese font already have ascii characters.

I dont know, but I assume (sorry if I'm wrong), there's something bad in the way you are working.

Usually you need to reverse  engineering the game to know the ,font,pointers of the text,the Vram memory available and the imagws offset to edit.

Then, dump all script, translate, and reinsert the text. All that whit new pointers, new text etc...
I mean, I'm still a bit of a newbie yet when it comes to this stuff and I might be doing something wrong but I'm not sure what it could be. I've learned how to translate this game mostly through just the process of trial and error. Now I tried looking into on how to find pointers through Youtube because I get the best grasp on stuff by visually learning, however the best thing I could find was this guy looking for them on an SNES game, which I learned a lot from, but he used this application called Lunar Address which seems to only really support SNES games. So as far as pointers go, I am a bit stumped.

But now with this, with learning through trial and error (which if this is an absolute terrible way of doing things on here, please let me know), I found that every 3 characters I see in ASCII in the japanese script makes one japanese character, which is weird because that means I'm dealing with a 12-bitter, and correct me if I'm wrong but aren't Shift-JIS, EUC-JIS, and Unicode all 16-bit? If so, I am clueless on how I can show the real japanese text on a hex program without dealing with any crazy modification that I'm not sure on how to do. But now when I did the math, knowing that every 3 ASCII characters = 1 japanese character.. I counted the japanese characters that can be shown on the text's that work, there are 10. 10 x 3 = 30. So now I counted all the ASCII characters shown in the hex program that are with the japanese, there are 31. But the 1 in there I found is 0A, which that I know is just pretty much an enter key in the game's text. So with that information, I am clueless on what I could be doing wrong, it seems like no matter how or where I write the text from between A7F to A9A, everything stops working on just this one specific text. But I'll try to learn and work with it doing your process.

4l3j4ndr0

  • Jr. Member
  • **
  • Posts: 78
  • Gameboy Color Rules!
    • View Profile
Re: Why am I getting a blank text when translating a game?
« Reply #9 on: December 12, 2019, 06:16:34 pm »
You are rigth, I see a pattern of E3 E4 E5 E7...ETC maybe that byte indicates a momentary switch between katakana,hiragana,ascii and kanji font.

I'm very curious about this. Can you pm a screenshot of the original text box and the hex code of that screen.

Vehek

  • Full Member
  • ***
  • Posts: 179
    • View Profile
Re: Why am I getting a blank text when translating a game?
« Reply #10 on: December 12, 2019, 08:41:03 pm »
I don't know much, but could the text encoding be UTF-8? Wikipedia says that CJK characters in that encoding are 3 bytes, and I seem to get plausible Japanese text when I manually type up the bytes when viewing as UTF-8.

4l3j4ndr0

  • Jr. Member
  • **
  • Posts: 78
  • Gameboy Color Rules!
    • View Profile
Re: Why am I getting a blank text when translating a game?
« Reply #11 on: December 12, 2019, 10:06:55 pm »
I confirm what Vehek said, the Game use Utf-8. [This coding have almost 7000 or more letters, wow]



http://www.fileformat.info/info/charset/UTF-8/list.htm

Seems every text box of the game allows only 60 characters, 20 per line.


In this case every 60 letters of your translation you have to use a "%_vs[????]%_mk[?]" line
Like in your first Image, this text box have 131 bytes, almost 3 english text boxes.
You have to think what to do about this.
This is the only game in which I see the jap characters use more bytes than the romanic letters.

The only hex editor that I could find whit UTF-8 encoding was "wxMEdit"
Wxmedit screen

Edit:

There are more than 60 characters on your working text box.

you have to find the correct amount of text for each text vox of your translation.
« Last Edit: December 12, 2019, 10:16:30 pm by 4l3j4ndr0 »

Soul Reaper

  • Jr. Member
  • **
  • Posts: 14
    • View Profile
Re: Why am I getting a blank text when translating a game?
« Reply #12 on: December 12, 2019, 10:40:56 pm »
You are rigth, I see a pattern of E3 E4 E5 E7...ETC maybe that byte indicates a momentary switch between katakana,hiragana,ascii and kanji font.

I'm very curious about this. Can you pm a screenshot of the original text box and the hex code of that screen.
Yeah no problem man!

This link will direct you right to that:
https://docs.google.com/document/d/1lu_PSviClLn8iobc5BkHiy4Bdjqg_fH8yUCjqR7LCzI/edit?usp=sharing

December 12, 2019, 11:26:54 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
I confirm what Vehek said, the Game use Utf-8. [This coding have almost 7000 or more letters, wow]

Seems every text box of the game allows only 60 characters, 20 per line.

In this case every 60 letters of your translation you have to use a "%_vs[????]%_mk[?]" line
Like in your first Image, this text box have 131 bytes, almost 3 english text boxes.
You have to think what to do about this.
This is the only game in which I see the jap characters use more bytes than the romanic letters.

The only hex editor that I could find whit UTF-8 encoding was "wxMEdit"

Edit:

There are more than 60 characters on your working text box.

you have to find the correct amount of text for each text vox of your translation.
Oh and hey, so I tried doing what you said about 20 characters per line and 60 per box, and it still isn't working, I'm really stumped on what could be causing this, it seems to just happen whenever I type anything between A7F to A9A (Which both of those points are just in the middle of the text box as you can see).
« Last Edit: December 12, 2019, 11:26:54 pm by Soul Reaper »

4l3j4ndr0

  • Jr. Member
  • **
  • Posts: 78
  • Gameboy Color Rules!
    • View Profile
Re: Why am I getting a blank text when translating a game?
« Reply #13 on: December 13, 2019, 12:08:02 am »
Can you try this for me?
First
On the Offset 2602 xA2A
Rigth after
00255f76735b393339395d255f6d6b5b31315d

Insert this:

After examining the reports of each0A
branch together, it was found that0A
this type of incident occurred
00255f76735b383838385d255f6d6b5b31305d

what happend?

Second
If that din't work can you repeat this.
https://docs.google.com/document/d/1437nByP7-kTGnKvCZRvjAwPaKaXKqd0_PG-jYqN1PQ4/edit
but add an 0A every 20 bytes.

Thank you.

I'm downloading the iso but is 3GB long...

Soul Reaper

  • Jr. Member
  • **
  • Posts: 14
    • View Profile
Re: Why am I getting a blank text when translating a game?
« Reply #14 on: December 13, 2019, 02:09:19 am »
Can you try this for me?
First
On the Offset 2602 xA2A
Rigth after
00255f76735b393339395d255f6d6b5b31315d
Pardon me, but I am wondering where got this set from "00255f76735b393339395d255f6d6b5b31315d"? As soon as I know, I will totally give it a try. And also that's tight that you're willing to download the ISO, I'm kinda shocked your's is 3GB, the one I have is 4.37GB haha. Oh and for the second thing you told me to use that file with all the spaces but after every twenty characters add a 0A.

So I did that and here are the results:
https://docs.google.com/document/d/1SGCsK4fVZfG91JPcSkgXDyNHXXY_ZqtcuoyVOLcZE2c/edit?usp=sharing

It actually surprised me the text didn't go blank because before E3 81 93 (the very last japanese character seen on the image in game) was a 0A, but since that wasn't after every 20 japanese characters, I wrote the last japanese character over it. Which it shows on the images.


UPDATE:
So I found out what you mean with the "00255f76735b393339395d255f6d6b5b31315d". You're talking about the %_vs[????]%_mk[?] thing. So I have a few questions on that one, why do you want me to try tinkering with that? And is there a specific file you want me to type "00255f76735b383838385d255f6d6b5b31305d" in? If so.. what file?

I did it to the file you sent me an image of on the the one I have you quoted on right now, and here are the results:
https://docs.google.com/document/d/1o36ps7IiDyavdU2VUnPXyRPPDlAJoprWc92CsgYyS58/edit?usp=sharing

So visually you really don't see anything happening other than the name changing; however, when I did that in game I didn't see Sid's (the character who's text we're working on) mouth do an animation really nor did he say anything like how he usually does. Seems to me all that is nothing more than an audio voice indicator. The [????] Seems to indicate a specific line while the mk[?] determines which character is doing the speaking. But anyway yeah the %_vs[????]%_mk[?] seems to be nothing more then just audio and a name given I would think.
« Last Edit: December 13, 2019, 03:28:30 am by Soul Reaper »

4l3j4ndr0

  • Jr. Member
  • **
  • Posts: 78
  • Gameboy Color Rules!
    • View Profile
Re: Why am I getting a blank text when translating a game?
« Reply #15 on: December 13, 2019, 08:16:47 am »
Seems I'm downloading the wrong iso, then. :(

You are working on xA7C.

I need you put the english text from the begging of the box.
After the first red line. On xA2A



So the weird lines indicated

00
255f7673 5b393339395d
255f6d6b5b31315d

Blue=Audio track
Red=Profile pic
Green=Unknown, but are repeated constantly in every text box.

Here everything is clear, you can also dump the scrip easily.
https://docs.google.com/document/d/1SGCsK4fVZfG91JPcSkgXDyNHXXY_ZqtcuoyVOLcZE2c/edit?usp=sharing
Try tu put your translation here and why not deleted all the free space.

After examining the reports of each 0A
branch together, it was found that 0A
this type of incident occurred
Deleted all bytes until the next text box code 00255f76735b383838385d255f6d6b5b31305d

Soul Reaper

  • Jr. Member
  • **
  • Posts: 14
    • View Profile
Re: Why am I getting a blank text when translating a game?
« Reply #16 on: December 13, 2019, 01:32:53 pm »
Seems I'm downloading the wrong iso, then. :(
Oh no I checked, you found the right ISO I'm pretty sure, idk why mine is 4.37 GB. But I don't quite understand what you mean by "dumping a script". But I can tell you I've tried typing in the whole English translation while putting an 0A after every 20 english characters and that still give a blank text, speech, and name. If that information helps at all.
« Last Edit: December 13, 2019, 01:52:51 pm by Soul Reaper »

FAST6191

  • Hero Member
  • *****
  • Posts: 2652
    • View Profile
Re: Why am I getting a blank text when translating a game?
« Reply #17 on: December 13, 2019, 03:09:00 pm »
I'm kinda shocked your's is 3GB, the one I have is 4.37GB haha.

Wii games use full disc encryption, even on the junk areas between files.

The gold standard for ISOs then includes this encryption. This will be the full size single layer DVD (we can skip the slightly different sizes there for certain bad dumpers as that was solved early on) for those games using single layer discs (a handful of them used double layer, which occasionally caused some problems but enough of that for now).

A slightly lesser but practically the same is a basic scrubbed iso. As the Wii (and anything that officially runs Wii games) does not check this random (and thus incompressible) padding you can blank it and gain often quite considerable compression gains.

There are a few flavours of scrubbing beyond that (mostly "safe" and ones that shuffle everything to the front of the iso and thus require properly modded IOS modules rather than a DVD chip or equivalent) but we can skip that for now.

People running things from USB drives will however often convert them to something like the WBFS format which often both decrypts the files and gets rid of any padding. Various sites would upload these, much to the chagrin of both the DVD running set, ROM preservation efforts and in option to then current Scene sensibilities (though given the massive annoyance that was going on at those times with the xbox 360's backwards compatibility with the xbox and lack of clean rips there it is not an unfounded position).

You can strip files from games to reduce size further (a process confusingly known as ripping a game) but those tended to be more techniques people did rather than isos they spread. Not to mention there was less call for it as hundreds of gig USB drives were the norm by then.

Ignoring stripped files then these days you can regenerate a full iso from a WBFS actually (previously it was taken as a lossy process so most of the Scene did not permit releases in this format, and even looked down upon basic scrubbed isos).

Anyway sounds like you are making progress on the problem itself. Still

"And as to dealing with the 12 bit encoding sorry dude you lost me, I wouldn't even know how to start by merging the results and not quite sure what you mean by the "upper bits"."

If you assume everything is 16 bits rather than end to end 12 or whatever you have now then you gain a bunch of junk that will mess things up, presumably in the higher values aka upper bits on new 16 bit values.
shift is a fairly basic operation done in binary. In its purest form just shuffles numbers to and fro (you have left shift and right shift available) just like multiplying by 10 does in decimal and pads things out with 0000, chopping off anything else in the process. It can be used then to clear bits if you want, and historically was used for it (consoles like the GBA even being noted for rapid shifting capability). Or if you prefer shuffle it 4 bits one way, shuffle it 4 back and the bits that are surplus to what you need are now harmless 0s which your relative search options should deal with more happily. If you are more used to maths then if you have done integration and differentiation then this is kind of like the plus c thing you are told to add upon integrating a function as you don't know what was there before, in this case though the devices assume it was a 0 and just go with that rather than random values.
As that technically breaks at least every other character in the game you would get back the original file, add a few bits such that you could do the shift thing a second time and gain the two halves of the whole, at which point you would have to merge it.

For the second part I meant.
Take the standard game, otherwise untouched by you. Go to the location of the "third character talking" or whatever and edit how you would from there onwards. Doing this will hopefully help figure out whether it is memory issues causing it as the previous stuff you know to work is unchanged -- while the ISO itself likely has a gigabyte or more of space available the file format itself or if the game tries loading the whole file in memory and your making it bigger caused an overflow.
If it still goes blank though then chances are it is a pointer issue or a syntax issue.

That said it looks like we are beyond that now so I will skip it.

4l3j4ndr0

  • Jr. Member
  • **
  • Posts: 78
  • Gameboy Color Rules!
    • View Profile
Re: Why am I getting a blank text when translating a game?
« Reply #18 on: December 18, 2019, 04:11:15 pm »
Did you solve this problem?

Soul Reaper

  • Jr. Member
  • **
  • Posts: 14
    • View Profile
Re: Why am I getting a blank text when translating a game?
« Reply #19 on: December 22, 2019, 03:54:35 am »
Did you solve this problem?
No not necessarily, but I happened to join a team and one of the members made a program to translate over that self adjusts pointers and everything. After I translated everything on that program, the problem's not there anymore.