Zophar's Message Domain

Go Back   Zophar's Message Domain > Emulation Talk > Rom Hack

Reply
 
Thread Tools Display Modes
Old 07-28-2005, 09:55 PM   #1
Spikeman
Regular Member
 
Join Date: Jun 2005
Posts: 34
Default Translation Question

I'm trying to translate a game from Japanese and in the section I'm working on the Japanese names take up alot less space then the english ones is there any way to make more room to add in the translations? (I know about pointers and stuff).
Spikeman is offline   Reply With Quote
Old 07-28-2005, 10:38 PM   #2
Ugly Joe
Senior Member
 
Ugly Joe's Avatar
 
Join Date: Dec 2003
Posts: 1,461
Default Re: Translation Question

> I'm trying to translate a game from Japanese and in the
> section I'm working on the Japanese names take up alot less
> space then the english ones is there any way to make more
> room to add in the translations? (I know about pointers and
> stuff).

What kind of space are you talking about? Do you mean you need to fit six tiles into a space only four tiles wide, or do you mean that there isn't enough space in the rom to fit all the longer names?
__________________
Ugly Joe is offline   Reply With Quote
Old 07-29-2005, 03:52 AM   #3
Gil-Galad
Senior Member
 
Gil-Galad's Avatar
 
Join Date: Aug 2000
Posts: 658
Default Re: Translation Question

It also helps to know what system the game is run on like SNES or NES for example. With SNES it's sometimes easy to get more space. With NES you have to work with the bank you're in or map to another bank in the rom or add a bank to the rom which requires a bit of work.

Pointers are usually the best option because you just optimize the text in the space given. Also you can implement compression in a rom which is a lot of work. For instance you can install a DTE/Dictionary scheme in the rom. This is the most simple compression for text. DTE is Dual Tile Encoding. How this works is that you drawl 2 characters at one time instead of one. This is a benifit because you only use 1 byte for 2 characters. When that particular DTE byte is written the code looks at a lookup table and prints whatever is there. Dictionary encoding is the same way except that you print more then 2 characters. Sometimes you can even print a substring to the screen.

This is about all I can tell you without knowing what you're working with.
Gil-Galad is offline   Reply With Quote
Old 08-02-2005, 01:25 AM   #4
Spikeman
Regular Member
 
Join Date: Jun 2005
Posts: 34
Default Re: Translation Question

The ROM I'm working on is for the GBA (the game is Rockman.EXE 4.5). The section I'm trying to translate is the names of the battlechips (kinda like spells or something if you have never played it). I know about pointers and optimizing with them but the thing is that in the english versions of the name almost every single one takes more space then the japanese one. So optimizing in the space giving won't work. So I'm thinking I will either add space to the ROM (if you can do that on GBA) or try and implement a DTE encoding thing (I worked on FF1 for NES which uses DTE so I know the basics but not how to implement). Any advice on where to get info?
Spikeman is offline   Reply With Quote
Old 08-02-2005, 01:28 AM   #5
Spikeman
Regular Member
 
Join Date: Jun 2005
Posts: 34
Default Re: Translation Question

I mean there isn't enough space in the ROM to fit the longer names. I already know the english names because I have played the english version of other games but this one was never released in the US. I'm translating the easy stuff first because I don't really know that much Japanese but I am learning.
Spikeman is offline   Reply With Quote
Old 08-02-2005, 01:33 AM   #6
Ugly Joe
Senior Member
 
Ugly Joe's Avatar
 
Join Date: Dec 2003
Posts: 1,461
Default Re: Translation Question

> I mean there isn't enough space in the ROM to fit the longer
> names.

You're probably best off trying a DTE hack, then. If you don't know how to do it, I can find an article on it, but it will be for the NES. The concept is the same, but the asm for the hack would obviously have to be different.
__________________
Ugly Joe is offline   Reply With Quote
Old 08-02-2005, 01:39 AM   #7
Spikeman
Regular Member
 
Join Date: Jun 2005
Posts: 34
Default Re: Translation Question

Ok thanks but do I need to learn asm for this? I already know asm for the computer so it shouldn't be too hard learning it for the GBA right?

> You're probably best off trying a DTE hack, then. If you
> don't know how to do it, I can find an article on it, but it
> will be for the NES. The concept is the same, but the asm
> for the hack would obviously have to be different.
Spikeman is offline   Reply With Quote
Old 08-02-2005, 01:49 AM   #8
Ugly Joe
Senior Member
 
Ugly Joe's Avatar
 
Join Date: Dec 2003
Posts: 1,461
Default Re: Translation Question

> Ok thanks but do I need to learn asm for this? I already
> know asm for the computer so it shouldn't be too hard
> learning it for the GBA right?

Yeah, if you want to do a DTE hack (or a rom expansion) you will need to know some asm. I learned DTE from http://www.emuxhaven.net/~kingmike/r...de/dtehelp.htmKingmike's tutorial</a>, but I was hacking an NES game, so it may not be as helpful to you. He gives the asm source for his hack at the end, but that's 6502 asm. You need to write the asm code that does pretty much the same thing, only in the asm that is used by the GBA (which eludes me at the moment...).

I'm not sure how much else of that article will apply to GBA games, but read it and understand exactly what it is that the DTE hack does. It may not tell you how to add the hack, but should be able to explain to you what it is you should be trying to do.
__________________
Ugly Joe is offline   Reply With Quote
Old 08-03-2005, 12:16 AM   #9
Spikeman
Regular Member
 
Join Date: Jun 2005
Posts: 34
Default Re: Translation Question

Ok maybe I'll try adding DTE to an NES game before I try this out on the GBA. I skimmed the tutorial and the asm is different then the one I know (z80) so I'll have to learn that. I know this could take awhile but if I get it to work it will be worth it. Thanks for all your help. I just have one last question: Would it be any different to add MTE instead (more than two chars)?

EDIT: I tried to find some docs on gba asm but the only thing I could find was the name of the language: ARM7TDMI. Anyone know where I can find any info on this?<P ID="edit"><FONT class="small">Edited by Spikeman on 08/02/05 07:57 PM.</FONT></P>
Spikeman is offline   Reply With Quote
Old 08-03-2005, 12:58 AM   #10
Ugly Joe
Senior Member
 
Ugly Joe's Avatar
 
Join Date: Dec 2003
Posts: 1,461
Default Re: Translation Question

> Thanks for all your help. I just have one last
> question: Would it be any different to add MTE instead (more
> than two chars)?

Yeah. With a DTE hack, there is a byte that gets set to 1 after the first of the two characters is read, and set back to 0 after the second of two characters is read. This value of this byte is used by the hack to do two things:

1) It tells the hack to read the first or second byte out of the DTE table value.
2) It tells the hack to tell the game whether or not to advance to the next byte in the script.

So basically, the game's script hits a DTE value, the hack kicks in and processes the DTE value. Since the byte is set to 0, it will read the first byte out of the table, set the byte to 1, and tell the game not advance the script. The game's script will then hit the same DTE value, the hack will kick in again and this time read the second byte out of the table since the byte is set to 1. It'll then set the byte back to 0 and the script resumes as usual.

If you want to use MTE instead, you'll have to change the way this byte works.

If you go with some other fixed length (like, each value in the table will be four bytes instead of two bytes, etc) you can just change the hack so that it doesn't advance the script until the byte equals 4 or 5 or whatever length you use.

The other, more likely option, would be to not use a fixed length. This way would require a bit more ingenuity on your part. There are lots of ways that you could do it, but I would try to do it this way. I would have two tables instead of just one. The first one would be a pointer table. The DTE values in the game's script would be used to lookup a pointer in this table. The pointer from the table would then be used to lookup the actual value that's assigned to the DTE value (located in the second table). Each value in the second table would be ended with some kind of control byte so that you could tell when it ended. Every time the hack gets called, it would check for the value of the next byte in the second table. If that value is equal to the control byte, it would tell the game to advance the script, otherwise it wouldn't (so that the hack will keep getting called until the word in the second table is done). In this case, the 0 or 1 byte from the DTE hack would only be used to keep track of which byte in the word to display (in other words, it would be incremented with each call of the hack, used as an offset, and reset to 0 when the word is finished).

That's how I would do it, but there are certainly plenty of other ways to go about it.
__________________
Ugly Joe is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:44 PM.

Contact Us - Zophar's Domain - Archive - Top

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.