+  RHDN Forum Archive
|-+  Romhacking
| |-+  ROM Hacking Discussion
| | |-+  pointers, fonts, translating an english ROM - need some help
Pages: [1] 2
Author Topic: pointers, fonts, translating an english ROM - need some help  (Read 1 times)
aurion
Guest
« on: March 02, 2011, 11:44:10 am »

For the past few days I spent (partially frustrating) hours and hours in rom hacking research and now I'm at the point where I need help.
I want to translate an english game to german. The game in question is 9 hours, 9 persons, 9 doors. It's a pretty good game, so there is a chance that some of you already know what this game is all about.

Almost 100% of the text in the game can be directly edited by just opening the rom with a hex-editor. So I assume that the text is not compressed, which is awesome.



I easily figured the hex values of letters and made a table file: http://npshare.de/files/d397846d/999TABLE.txt


I use Crystal Tile 2 and my prefered hex-editor NEXT-Soft for rom hacking. My first problem is editing the font file to allow special characters (umlauts = ä, ü, ö). I managed to track down the font file and opened it with a hex-editor:



My first question is, how do I edit this file to allow the umlauts?


As I said I can translate almost the complete text with opening the rom file with a hex-editor. I can also translate the appropriate text files by extracting the rom archive with Crystal Tile 2. There the text is divided in two folders,

1) etc
2) scr

In the etc folder I have these files:



It contains all the text files of the menus and credits and the font file (strangely there are also some japanese files in there)

In the scr folder I have the in-game text of the novel, packed into many fsb files:



The problem here is the space. German is a horribly complicated language, that does need a lot more space than english in order to make a decent  translation. To allow more space I have to deal with annoying pointers. I do not exactly know where these pointers are located in this game and how I can figure them out.

In this picture you can see before and after text chunks something like START_CREATE_NEW and START_WRITE_1. What are these for? Do they happen to be the pointers? If yes, how can I correctly edit them?

Since I can translate the game with opening the rom with a hex-editor, are there perhaps any advantages in comparison with extracting the rom and editing single text files? What do you recommend me to do?


My next problem is locating some words on the menu screen of the game.



I haven't been able to locate and edit the words "Continue", "Start", "Erase Data", "prologue", "Yes" and "No". What could be the reason for this? Perhaps these words are actually burned into graphics and I have to edit them with a tile editor? Perhaps these words are compressed somewhere in a file of the rom?

Thanks to anyone in advance who is willing to help. If you need some more information, please ask.
Ryusui
Guest
« Reply #1 on: March 02, 2011, 02:56:13 pm »

Just FYI, you don't need a table for this game. I'm looking at the hex and that's just ordinary ASCII. WindHex should let you view the text by default.

Try inserting a standard ASCII or UTF-8 umlaut code into the script somewhere it'll show up early. You might be surprised.
Auryn
Guest
« Reply #2 on: March 02, 2011, 03:01:30 pm »

Hi,
this topic would be better in the newbie forum because u clearly lack the basic knowledge on how to translate.
Anyway i will try to point u in the right way:
Yes, u are right and the text seems be stored in ASCII so u can see it from the hex editor and u are very lucky because it's not so common that this happen.
Your table look ok even if it's useless because u see the the text already in your hex editor.
About the font; u can't edit it binary (actually u could but it's madness). U have to decompress the rom into the single files and edit the font file with a tile editor. When u put the first letter of the font in the top left corner of CT2 (crystal tile 2) in tile view, check the bottom, it's tell u in what file u are in that part of the rom. Find 3 unused tiles and copy paste the a/e/u on it + add the points. Again with luck, if your 3 tiles are after the "/" (based on your table), the ä ö ü will have them with the value 80 81 82.

The decompress/compress process in the NDS rom with DSlazy (or similar) are a lossless process so why u want to carry all the rom around?? About the pointers: if the text is split in so many files, u have a good chance that each of those files has a structure like:

Pointer table
text

or

text
pointer table

In how to figure them out, please read one of the many guides in the net about this topic.
There is nothing strange about left over of pieces of games from another region or another version.

What those different "start" are used for, nobody can tell u like that. By reading the hex editor, it's clear what they are for but i don't know if they are used and/or need/can be translated. I would not touch them if they not appear on screeen.

U got the answer already about de-/compressing the rom.

There are actually 3 possibilities because u can't find them and u got 2 already. The last one is that those words are in the game with another table than the one u found out. Yes, it's possible that a game uses 2-3 different tables and different font in the same game.






aurion
Guest
« Reply #3 on: March 03, 2011, 08:59:15 pm »

@Ryusui: That did not work. I cant put a character in the script that is not present in a font file.

@Auryn: Thanks for your answer. Your absolutely right. I'm a beginner and lack a lot of rom hacking knowledge.

But as I said, I did a lot of research in the past few days. I read docs how to make table files, I am familiar with the hex system since ages, and I know what pointers are. But unfortunalty a lot of docs here are clearly outdated, which is kind of troublesome for a beginner. The doc I read about pointers is from Mad Hacker and sadly it only deals with NES roms. Someone should definitely make a guide for DS games. Or can I use the same method for DS game?

Quote
For illustrative purposes, I'll use the Final Fantasy rom.  This is where thingy comes in helpful.
Let's say you wanted to change "Nothing here." to read "The Princess always worries about you."
So, we follow these simple, handy dandy steps.

1) Locate the string we want to replace (remember, take the HEX value)
2) Locate the new string (remember, take the HEX value)
3) Since we know that this rom uses the STANDARD HEADER system (defined below), we can
use that to calculate the header value.  Don't worry, I'm going to walk you through it right here
for your first time.
4) Take the location that you want to calculate your pointer for (The first text string: "Nothing
here.", for instance).

Because these are STANDARD HEADER pointers, we use the following steps:
First we'll do: "Nothing here."
It's position is at 28210

5) Subtract 10 from it. (hex)
Why 10?  NES cartridges do not have headers on them.  The headers are added by the people
who dump the rom to contain information that's needed for the emulators to run.  The NES,
therefore, doesn't recognize the existence of the header, and so we have to take it out.  (The
emulators do this automatically when they run the rom, but it doesn't change the values
embedded in the code itself)

Will I always need to do this?
Yes.  At least, I've never encountered or even heard of a rom where this wasn't true.

If not, do you have some links for me?

---------------

I did open the font file with the tile editor of Crystal Tile 2 and here is what I got:



I haven't been able to make the characters show up properly, even after many adjustments. Perhaps I can send you the file and you look into it?
Auryn
Guest
« Reply #4 on: March 04, 2011, 12:32:19 am »

The base is the same just the calculations are different.
NES is hacked to the end, NDS is relatively new as system so there are not new docs or specific values for it.
But like i said, the function is the same as in the NES.
Normal font dimentions are 8x8, 12x12, 16x16 or 8x12, 8x16 (sure even numbers and not odds).
And probably need some allignement


March 04, 2011, 03:15:04 am - (Auto Merged - Double Posts are not allowed before 7 days.)
I took a look at your game, first of all it's always dangerous to work with games that are so "new" but if u are sure there will not be a euro version, go on.

About the pointers: it took me about 5 min to figure this out but it's ok... u are learning:p
The black arrows are the important things, the pink are the next that u will need.
What u are looking for is just stored in "little endian" or mirrored (gespiegelt) if u like it more in this game:

I will not tell u because u need to figure it out by yourself for the future.
I didn't try it out but I am 99% sure I am right.

For the font, u have to find out wich one is the right one the game uses.
There are fonts in each kanji file

« Last Edit: March 04, 2011, 03:15:05 am by Auryn »
aurion
Guest
« Reply #5 on: March 04, 2011, 02:11:29 pm »

I decided I will deal with pointers later. First I have to finsih the font file/s.

I still cant get the characters show up properly in the tile viewer of Crystal Tile 2. This is what I know:

* The correct tile form is NDS 1bpp
* The correct font dimension if 16x16

That's it. All I have to do is to find the correct offset, right? But I tried and tried. Still the letters look like this:



Can you please take a look at the kanji_n.dat file and show me, how it's done correctly?
Romsstar
Guest
« Reply #6 on: March 05, 2011, 09:13:17 am »

I suggest you try using Feidian.
Although it is kinda like last resort it is pretty easy to work with as soon as you find out how actually.xD
Would make it easier to extract and reinsert the edited font file since it can work with BMPs.
KingMike
Guest
« Reply #7 on: March 05, 2011, 10:16:03 am »

That font looks like a kind of RLE compression.
Unfortunately, I don't know anything about DS hacking, or even GBA, so I can't help any more.
Juanfco
Guest
« Reply #8 on: March 05, 2011, 01:32:08 pm »

You can use Tile Molester.
Open the fonts with it and use mode 2 codec 1 bpp linear-reverse mode Wink
aurion
Guest
« Reply #9 on: March 06, 2011, 06:26:12 pm »

Tile Molester is not working for me. I have Java installed and any Java application works, except Tile Molester. After executing tm.jar nothing happens.

How do I use FEIDIAN? I installed PHP, but what now? How can I execute FEIDIAN and more importantly, what commands do I have to use? I have Windows XP installed.

Edit: Ok, there was an issue with Java. I re-installed it and Tile Molester did work. But unfortunately I still cant get the letters shop up properly. This is what I get with Mode: 2-Dimensional and Codec: 1bpp linear reverse-order:



And this is what I get with Mode: 1-Dimensional and Codec: 2bpp planar:



Can anyone actually show me how it's done? That way I would learn faster and dont need to unnecessarily waste valuable time  :)
« Last Edit: March 06, 2011, 07:20:24 pm by aurion »
Juanfco
Guest
« Reply #10 on: March 07, 2011, 11:14:22 am »

You can see four buttons with arrows and lines, right?
Well, you have to push the button which has an arrow pointing to the left until you see
the letters.
Ryusui
Guest
« Reply #11 on: March 07, 2011, 11:23:14 am »

Use 1bpp linear, without reverse-order. Reverse order should only come into play if you're editing 4bpp graphics - those are in the GBA's little-endian format. Use the plus and minus keys to align.

Tile Molestor is a poor choice for DS font editing, though - it only supports 8x8 tiles, and DS fonts tend to be in odd sizes.
Juanfco
Guest
« Reply #12 on: March 07, 2011, 11:46:25 am »

He has to use 1 bpp linear reverse-order, because, using 1 bpp linear, the font looks reversed. It's like see it in a mirror.
aurion
Guest
« Reply #13 on: March 07, 2011, 02:48:09 pm »

@Juanfco: Of course I can see four buttons with arrows and lines, but it's no use, no letters show up properly. Can I send you the file and you show me how it's done?

@Ryusui: Tile Molester only supprts 8x8 tiles? Well the font uses 16x16 tiles. Does this mean Tile Molester is inappropriate for editing the font file?
Juanfco
Guest
« Reply #14 on: March 07, 2011, 03:06:26 pm »

Ok, try this: Go to "View", select "Block Size" and click on "Custom".  Columns=2 ; Rows=16
Pages: [1] 2  


Powered by SMF 1.1.4 | SMF © 2006-2007, Simple Machines LLC