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

Author Topic: Translation too long?  (Read 1105 times)

abishur

  • Jr. Member
  • **
  • Posts: 21
    • View Profile
Translation too long?
« on: September 18, 2020, 10:57:32 am »
Hello all! I've just started to learn about ROM hacking because I found a half done translation that I wanted to finish  :D

It took some time, but I finally figured out the very bottom tier of the basics and was able to edit the very first menu where you type your name so it shows everything correctly.  Well almost correctly, I had a " attached to a letter that I couldn't figure out where they assigned that, but after removing the " from the pallet I was able to brute force that away, lol.

But when I went to the next screen I hit an issue.  The Japanese text is:
[Character's Name] さん よくおいでになりました。まずは だいとうりょうに おあいください。

So I have 37 Bytes to translate the text, which after some (bare with me here) google translate cleaning comes out to "Thank you for coming [Character's Name]" Please talk to King Ryo first", 50 bytes, technically 51 since there is a line break hidden in there.

So I'm 14 bytes too long and it looks like this is going to be an issue I face at every turn.  How can I create a translation that is longer than the original byte space?

Cyneprepou4uk

  • Hero Member
  • *****
  • Posts: 504
  • I am the baldest romhacker
    • View Profile
Re: Translation too long?
« Reply #1 on: September 19, 2020, 09:27:48 am »
You need to move text to a free space and change pointers to it (tell the game to read it from a new area).

I'm currently translating a japanese game, and in my case those additional " are added depending on the byte which represents a letter. For example byte 50 is ト, and A0 is ド. If A0, it draws " as well, if 50 then it draws a blank tile instead, but main letter is the same in both cases.

You can find code which does that and tell him not to, or just delete graphics of " so it becomes invisible.
iromhacker.ru - NES ROM hacking tutorials for beginners. Please use Google Translate browser extension

KingMike

  • Forum Moderator
  • Hero Member
  • *****
  • Posts: 7015
  • *sigh* A changed avatar. Big deal.
    • View Profile
Re: Translation too long?
« Reply #2 on: September 19, 2020, 09:33:39 am »
Deleting the " character is probably a bad idea.
That's probably going to make it harder to find text later.
"My watch says 30 chickens" Google, 2018

abishur

  • Jr. Member
  • **
  • Posts: 21
    • View Profile
Re: Translation too long?
« Reply #3 on: September 19, 2020, 10:21:23 am »
You need to move text to a free space and change pointers to it (tell the game to read it from a new area

Thanks! I'm very new, where is a resource I can study for how to change pointers?

Cyneprepou4uk

  • Hero Member
  • *****
  • Posts: 504
  • I am the baldest romhacker
    • View Profile
Re: Translation too long?
« Reply #4 on: September 19, 2020, 01:41:49 pm »
I don't know  >:D
Try google "nes pointers guide", something like that
iromhacker.ru - NES ROM hacking tutorials for beginners. Please use Google Translate browser extension

abishur

  • Jr. Member
  • **
  • Posts: 21
    • View Profile
Re: Translation too long?
« Reply #5 on: September 19, 2020, 05:11:45 pm »
I will thanks. I understand some hex editing, but is there a program or utility for editing the actual code?

Cyneprepou4uk

  • Hero Member
  • *****
  • Posts: 504
  • I am the baldest romhacker
    • View Profile
Re: Translation too long?
« Reply #6 on: September 20, 2020, 05:32:23 am »
That depends on the game platform. Some of them have emulators with debugger. Some have assemblers and assembler injectors. And you can edit code by editing bytes as well.
iromhacker.ru - NES ROM hacking tutorials for beginners. Please use Google Translate browser extension

abishur

  • Jr. Member
  • **
  • Posts: 21
    • View Profile
Re: Translation too long?
« Reply #7 on: September 20, 2020, 04:15:27 pm »
Okay, I got a chance to read through Mad Hacker's Pointer Guide.  That thing is worth its weight in GOLD!  I've been able to find my pointer table and am beginning to understand changing pointers.  One question I had though, in the guide it says (in reference to pointer memory locations)
Quote
"Now, because NES pointers are limited to 4 digits, so too are your pointers.  Therefore, your range is limited to the 10000."
I'm assuming that what he means is that the max address I can use for a pointer to point to if FFFF and anything greater than that (such as 10000) is beyond the usable memory range.  Is that correct?

Edit: I just realized I was being a goof.  The existing text is all located starting at x11B68.  So the guide was saying I can only use addresses in the 10000s.
« Last Edit: September 20, 2020, 04:23:07 pm by abishur »

Risae

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
Re: Translation too long?
« Reply #8 on: September 23, 2020, 08:30:21 am »
You can use tools like "Cartographer" to dump the script including the pointers and "Atlas" to reinsert the script and update the pointer table automaticly:

https://www.romhacking.net/utilities/647/
https://www.romhacking.net/utilities/224/

"abcde" is an updated version of those above but i recommend starting with the original ones:

https://www.romhacking.net/utilities/1392/

I use this for my translation project and if you know how your pointer table is build up its not that difficult to set up those tools:

https://growlanser6english.blogspot.com/2019/03/another-little-test.html
https://growlanser6english.blogspot.com/2019/03/growlanser-6-extracting-pointers-and.html
« Last Edit: September 23, 2020, 08:42:30 am by Risae »