News: 11 March 2016 - Forum Rules

Author Topic: Translation Monster Hunter G (Wii)  (Read 6246 times)

Doux91

  • Jr. Member
  • **
  • Posts: 6
    • View Profile
Translation Monster Hunter G (Wii)
« on: June 15, 2014, 06:22:00 pm »
Well im new on this of translation is my first time i try to make a translation  :thumbsup:
I need some help if someone can explain about the pointers, i found some post about it but i read the pointer of psx and snes are differents, i dont know about the theme but i really want to complete my translation, something else how do i know where are the image files of wii games, sorry if i dont speak a good english but my native language is spanish look here is the text i want to translate


I cant find the text of this one then i guess this is a picture inside the game


Please someone help me, any guide about translate wii games could be awesome, or someone that want to help me,  thank you :-\

Dashman

  • Full Member
  • ***
  • Posts: 212
    • View Profile
Re: Translation Monster Hunter G (Wii)
« Reply #1 on: June 16, 2014, 06:56:46 am »
Hi there, Doux. I'm part of a team translating a GC game, so I might be able to give you a couple of good hints, although I'm quite the beginner myself.

First of all, I'm assuming you didn't change the text directly in memory. Where did you find the text you translated in your first picture? Since this is your first translation I guess you found it inside a BIN file. Other BIN files are likely to contain more uncompressed text as well, and then some of it can be in the DOL file as well (this one can be tricky though).

Pointer structure is not necessarily the same in every game due to different programming techniques, but I'll tell you about some pointer structures I've run across in the game we're working on, maybe one of these applies to your game:

A pointer table is usually a number of fields put together following a simple structure. They're easy to recognize because there's always a value that is incremented for each entry: that's the offset that entry is "pointing" to. The simplest table contain only pointers, but you can find tables that have pointers, size of the pointed entry and even name of the entry (if it's pointing at files).

Pointers in files are usually relative to the start of the table, that is, the address of what they're pointing at can be calculated as <offset_of_table> + <offset_in_pointer>. If text starts right after the table (that is, there's no extra 00 bytes between the last pointer and the text), the first offset in the table is equal to the size of the table.

For example, a table of only 4-byte pointers that starts with "00 00 03 b0" and is followed immediately by text tells you that the size of the table is 944 bytes and that there's 236 pointers (and therefore, 236 elements). If you want to make an editor to change the text inside that section of the file, your program has to rewrite the pointer table with the offsets of the new entries in Spanish. For example, in your picture "メニュー" is 4 2-byte SJIS characters (8 bytes), but once your editor changes it to "Menu", you'll just write 4 1-byte ASCII characters. The pointer to "Menu" would not change, but the pointers to all entries after that one will have to substract 4 from their values.

Pointer tables can have levels. That is, you can have a "Master Pointer Table" at the beginning of the file where each entry points at a different section of it, some of which will start with their own pointer table. If that's the case, the changes you make in that section (if it grows or shrinks in size) must be reflected in that Master Pointer Table.

Hopefully some of the files of your game adhere to these structures and you find this helpful. :)

Doux91

  • Jr. Member
  • **
  • Posts: 6
    • View Profile
Re: Translation Monster Hunter G (Wii)
« Reply #2 on: June 16, 2014, 10:35:29 am »
Hi there, Doux. I'm part of a team translating a GC game, so I might be able to give you a couple of good hints, although I'm quite the beginner myself.

First of all, I'm assuming you didn't change the text directly in memory. Where did you find the text you translated in your first picture? Since this is your first translation I guess you found it inside a BIN file. Other BIN files are likely to contain more uncompressed text as well, and then some of it can be in the DOL file as well (this one can be tricky though).

Pointer structure is not necessarily the same in every game due to different programming techniques, but I'll tell you about some pointer structures I've run across in the game we're working on, maybe one of these applies to your game:

A pointer table is usually a number of fields put together following a simple structure. They're easy to recognize because there's always a value that is incremented for each entry: that's the offset that entry is "pointing" to. The simplest table contain only pointers, but you can find tables that have pointers, size of the pointed entry and even name of the entry (if it's pointing at files).

Pointers in files are usually relative to the start of the table, that is, the address of what they're pointing at can be calculated as <offset_of_table> + <offset_in_pointer>. If text starts right after the table (that is, there's no extra 00 bytes between the last pointer and the text), the first offset in the table is equal to the size of the table.

For example, a table of only 4-byte pointers that starts with "00 00 03 b0" and is followed immediately by text tells you that the size of the table is 944 bytes and that there's 236 pointers (and therefore, 236 elements). If you want to make an editor to change the text inside that section of the file, your program has to rewrite the pointer table with the offsets of the new entries in Spanish. For example, in your picture "メニュー" is 4 2-byte SJIS characters (8 bytes), but once your editor changes it to "Menu", you'll just write 4 1-byte ASCII characters. The pointer to "Menu" would not change, but the pointers to all entries after that one will have to substract 4 from their values.

Pointer tables can have levels. That is, you can have a "Master Pointer Table" at the beginning of the file where each entry points at a different section of it, some of which will start with their own pointer table. If that's the case, the changes you make in that section (if it grows or shrinks in size) must be reflected in that Master Pointer Table.

Hopefully some of the files of your game adhere to these structures and you find this helpful. :)

Thanks for answer me, well i use Translhextion for translate because i can use the table and dump the text, and i use mad edit for see the text in japanese, thats all


The text is shift jis and I've never known how to see shift jis characters in Translhextion and thats why im using Madedit, here is more text translated the part i cant translate i should write Combinar(Combine) and Referencia(Reference) and you see without pointer i cant do anything
All the text is in Main.dol, if you want i can send you the file and you can check it and maybe give and example of pointer in wii because i saw the guides that just help in nes and snes roms :( look here



Dashman

  • Full Member
  • ***
  • Posts: 212
    • View Profile
Re: Translation Monster Hunter G (Wii)
« Reply #3 on: June 16, 2014, 12:58:18 pm »
Ah, you found the text inside the DOL file... I have bad news for you, it's pretty likely you won't find any pointer table inside that file.

Remember I mentioned text in DOL files could be tricky? Here's why: DOL files are actually the executable files for the Wii and NGC games, meaning most of it is code (in assembler) and accessing the parts with text is done (in most cases) through operations to calculate *where* is the text needed. Some offsets will be hardcoded (meaning that the offset of a string or a series of them is stored somewhere and the program reads it at some point), but that means that if you expand a string in the middle of the DOL file, *every* other hardcoded offset will have to be updated as well, and I'm not sure that all of them will be put together following a nice structure.

To see the code of the DOL file, you'll need a disassembler program like IDA with proper plugins to properly read these files.

I've been going through the code of the DOL file of our game for some time, and I haven't yet tried to expand any Japanese string, so all I'm telling you are my conjectures, sadly. Besides, I'm not exactly an expert myself.

There's one good thing (and easy) I can tell you though: See the 00 bytes between strings? Those are padding bytes to indicate the separation between strings. You'll notice how some strings have 2 or 4 padding bytes, that's most likely because the program reads the strings in 4-byte chunks, so string sizes are always multiple of 4 (count the bytes of each string, you'll see it). The good thing is, the program most likely only needs to find *one* 00 byte to determine that's the end of a string (it only adds more than one to fit the "multiple of 4" criteria), which means you can write 3 more 1-byte characters if you have 4 padding bytes (last one MUST be 00 or you'll be in trouble). Of course, that won't solve your problem entirely, but hey, it's something.

These days I'm wondering about ways to expand text inside the DOL file myself, and my best guess so far is to expand the data section at the end of the file (code is at the beginning and data -like strings- are at the end), write the text (or at least a part of it) in that expansion and change the affected hardcoded offsets so that they point towards that. I'm still not even sure of how I'm going to do that though.

I hope that cleared some stuff up for you.

PS: I have to ask, why does your MadEdit display Japanese characters like that?

Doux91

  • Jr. Member
  • **
  • Posts: 6
    • View Profile
Re: Translation Monster Hunter G (Wii)
« Reply #4 on: June 16, 2014, 02:15:26 pm »
Ah, you found the text inside the DOL file... I have bad news for you, it's pretty likely you won't find any pointer table inside that file.

Remember I mentioned text in DOL files could be tricky? Here's why: DOL files are actually the executable files for the Wii and NGC games, meaning most of it is code (in assembler) and accessing the parts with text is done (in most cases) through operations to calculate *where* is the text needed. Some offsets will be hardcoded (meaning that the offset of a string or a series of them is stored somewhere and the program reads it at some point), but that means that if you expand a string in the middle of the DOL file, *every* other hardcoded offset will have to be updated as well, and I'm not sure that all of them will be put together following a nice structure.

To see the code of the DOL file, you'll need a disassembler program like IDA with proper plugins to properly read these files.

I've been going through the code of the DOL file of our game for some time, and I haven't yet tried to expand any Japanese string, so all I'm telling you are my conjectures, sadly. Besides, I'm not exactly an expert myself.

There's one good thing (and easy) I can tell you though: See the 00 bytes between strings? Those are padding bytes to indicate the separation between strings. You'll notice how some strings have 2 or 4 padding bytes, that's most likely because the program reads the strings in 4-byte chunks, so string sizes are always multiple of 4 (count the bytes of each string, you'll see it). The good thing is, the program most likely only needs to find *one* 00 byte to determine that's the end of a string (it only adds more than one to fit the "multiple of 4" criteria), which means you can write 3 more 1-byte characters if you have 4 padding bytes (last one MUST be 00 or you'll be in trouble). Of course, that won't solve your problem entirely, but hey, it's something.

These days I'm wondering about ways to expand text inside the DOL file myself, and my best guess so far is to expand the data section at the end of the file (code is at the beginning and data -like strings- are at the end), write the text (or at least a part of it) in that expansion and change the affected hardcoded offsets so that they point towards that. I'm still not even sure of how I'm going to do that though.

I hope that cleared some stuff up for you.

PS: I have to ask, why does your MadEdit display Japanese characters like that?
i dont know what you mean with display characters like that... you say that because the text is turned? look im not sure that i cant find the pointers or if can, check here

in this picture you see that the people translated monster hunter G to english and i guess they use pointers, because they
translate "reference"> 資料確認 they had just 8 bytes to write and the word reference uses 10 bytes, lets do something ill send you the file and you will see what can i do, if you make a video of how you could make the pointer work would be awesome because i dont know anything about programming absolutelly anything, i studied computation but they didnt taught me anything, and worst till i know assembler is the more difficult language :( if this is too difficult i will give up because i have not help with the translation even if i want to learn about assembler  :'( just to say that i want to cry  :'( :'( :'( :'( I've never think translate could be so hard

Dashman

  • Full Member
  • ***
  • Posts: 212
    • View Profile
Re: Translation Monster Hunter G (Wii)
« Reply #5 on: June 16, 2014, 02:51:39 pm »
I'm sorry, I can't do the hacking for you, man. We can show you the door, but you're the one who has to walk through it.

Romhacking IS hard, but not impossible. If you're studying Computer Sciences, at some point you're going to learn to program in some high level programming language like C++ or C#, and if it's a serious degree, they'll at least teach you x86 assembler. However, nothing stops you from learning about those by yourself before that, there's a bunch of stuff on the Internet for that purpose.

Nobody teaches romhacking out there. Most romhackers start clueless, learn the basics, try to figure out how something they want to hack works and when they hit a wall, they ask about the stuff they need to go on. This learning process forces us to think, investigate, experiment and ultimately learn, and is what I believe this site encourages.

Don't take this as discouragement though. This project is a bit too much for you *now*, but it doesn't mean you won't be able to pull it off once you know what you're doing. There's nothing forcing you to finish this today either. You can put this project aside for some time and start learning what you think you'll need. Take baby steps and everything will slowly begin to make sense.

And when you run into something new you don't know, you'll have to try and understand how it works. Let me tell you DOL files use PowerPC assembler. Nobody taught me about that, but I'm trying to learn as I read the file (and all the documentation I could find). Hell, the first time I read its ASM code I wanted to jump out of the window! :P You'll have to be rather patient with this, if you really want to do it.

Oh, by the way, you mention other guys actually translated the game to English. Have you tried contacting those guys? Maybe they have tools you can use, and at the very least they can lend you their notes on hacking the game or answer your doubts.

Doux91

  • Jr. Member
  • **
  • Posts: 6
    • View Profile
Re: Translation Monster Hunter G (Wii)
« Reply #6 on: June 16, 2014, 03:05:48 pm »
I'm sorry, I can't do the hacking for you, man. We can show you the door, but you're the one who has to walk through it.

Romhacking IS hard, but not impossible. If you're studying Computer Sciences, at some point you're going to learn to program in some high level programming language like C++ or C#, and if it's a serious degree, they'll at least teach you x86 assembler. However, nothing stops you from learning about those by yourself before that, there's a bunch of stuff on the Internet for that purpose.

Nobody teaches romhacking out there. Most romhackers start clueless, learn the basics, try to figure out how something they want to hack works and when they hit a wall, they ask about the stuff they need to go on. This learning process forces us to think, investigate, experiment and ultimately learn, and is what I believe this site encourages.

Don't take this as discouragement though. This project is a bit too much for you *now*, but it doesn't mean you won't be able to pull it off once you know what you're doing. There's nothing forcing you to finish this today either. You can put this project aside for some time and start learning what you think you'll need. Take baby steps and everything will slowly begin to make sense.

And when you run into something new you don't know, you'll have to try and understand how it works. Let me tell you DOL files use PowerPC assembler. Nobody taught me about that, but I'm trying to learn as I read the file (and all the documentation I could find). Hell, the first time I read its ASM code I wanted to jump out of the window! :P You'll have to be rather patient with this, if you really want to do it.

Oh, by the way, you mention other guys actually translated the game to English. Have you tried contacting those guys? Maybe they have tools you can use, and at the very least they can lend you their notes on hacking the game or answer your doubts.

I don know who are they, the website of them is closed, and the translation they just translated the menus and part of missions no more, maybe the translation is in 30% there are more text in japanese, i see you dont want to help me than i should use the spaces that the game gives me, because i dont know anything about pointer i dont understand what should i do, even worst why, im not saying you do the translation i just want to see an example no more, its better an example than a guide (just text) because i dont see what they did, the true is you didnt help me in anything, but at least you took your time to answer me, thank you so much, at least tell me something how do i know where are images files inside the game how can i know where is it, should i dump it with Translhextion, if you dont want to help me id understand, thank for your answers

Wolfric

  • Jr. Member
  • **
  • Posts: 9
    • View Profile
Re: Translation Monster Hunter G (Wii)
« Reply #7 on: February 16, 2016, 08:54:11 pm »
Lol, I assume this never became a thing, huh. I might as well learn myself.

Ah, you found the text inside the DOL file... I have bad news for you, it's pretty likely you won't find any pointer table inside that file.

Remember I mentioned text in DOL files could be tricky? Here's why: DOL files are actually the executable files for the Wii and NGC games, meaning most of it is code (in assembler) and accessing the parts with text is done (in most cases) through operations to calculate *where* is the text needed. Some offsets will be hardcoded (meaning that the offset of a string or a series of them is stored somewhere and the program reads it at some point), but that means that if you expand a string in the middle of the DOL file, *every* other hardcoded offset will have to be updated as well, and I'm not sure that all of them will be put together following a nice structure.

To see the code of the DOL file, you'll need a disassembler program like IDA with proper plugins to properly read these files.

I've been going through the code of the DOL file of our game for some time, and I haven't yet tried to expand any Japanese string, so all I'm telling you are my conjectures, sadly. Besides, I'm not exactly an expert myself.

There's one good thing (and easy) I can tell you though: See the 00 bytes between strings? Those are padding bytes to indicate the separation between strings. You'll notice how some strings have 2 or 4 padding bytes, that's most likely because the program reads the strings in 4-byte chunks, so string sizes are always multiple of 4 (count the bytes of each string, you'll see it). The good thing is, the program most likely only needs to find *one* 00 byte to determine that's the end of a string (it only adds more than one to fit the "multiple of 4" criteria), which means you can write 3 more 1-byte characters if you have 4 padding bytes (last one MUST be 00 or you'll be in trouble). Of course, that won't solve your problem entirely, but hey, it's something.

These days I'm wondering about ways to expand text inside the DOL file myself, and my best guess so far is to expand the data section at the end of the file (code is at the beginning and data -like strings- are at the end), write the text (or at least a part of it) in that expansion and change the affected hardcoded offsets so that they point towards that. I'm still not even sure of how I'm going to do that though.

I hope that cleared some stuff up for you.
Well, this is a bummer. Has manipulating DOL files become any easier these days?

EDIT: I'm sorry if bumping old threads isn't allowed; However I can't find an option to delete my post if so.

FAST6191

  • Hero Member
  • *****
  • Posts: 3301
    • View Profile
Re: Translation Monster Hunter G (Wii)
« Reply #8 on: February 17, 2016, 05:40:27 am »
Editing dol files/executable file that have text embedded in them is much the same as it is on every system, which is to say it is can be annoying to deal with.
Dashman made a bit more of a song and dance about the difficulty of editing it than I might have; you need not shift everything else and play it that way if you can condense the text, stick it somewhere else entirely or even move to an 8 bit encoding from what is presumably 16 bit in the the Japanese. It is one of the more annoying aspects of text editing on newer systems but you can deal with it after you get over it looking a bit scary at first.