Bootleg hacking

Discuss anything related to hacking ROMs of the Telefang games here.
yoshiness(imported)
Posts: 5
Joined: Thu Dec 25, 2008 2:01 pm

Re: Bootleg hacking

Post by yoshiness(imported) »

Well, I know I'm coming out of nowhere, but I offer some hacking help, even though it may not contribute at all to the project.

I've been messing around with text hacking on the bootleg (Though I understand you're all currently working on Telefang) and I've been able to change the prologue you have to sit through at the beginning to make just a bit more sense.

Am I of use? I'd like to help contribute even though I've yet to actually complete the game though ^^; I'm still experimenting with some of the text though.

BTW, I'm not so great with the text hacking. I don't know how to expand the amount that can be said. I try to keep the messages simple, yet different from the bad Chinese translation so that they fit neatly in the same amount of space. The 2nd text box of the game is really annoying... I don't know how to shorten the actual translation (I'm talking about the line that says, "Up here, only one man can fly over."
Blaziken257
Posts: 983
Joined: Fri Dec 22, 2006 11:52 am

Re: Bootleg hacking

Post by Blaziken257 »

Welcome to Tulunk Village! Glad to see another Telefang fan here!

To expand the text, you need to know how to edit pointers. Pointers point to the address of the first character. You can find pointer tables above the text you're trying to edit. For example, the pointer table of the "Up here, only one man can fly over" text starts at 0x120000. A pointer is two bytes long, so you'll know you found a pointer table if every other byte has a pattern where the values increase over time (for example, FA 41 36 42 5F 42 69 42 73 42 82 42 E5 42 21 43 4A 43... and so on).

Now, here's how you calculate pointers. For simplicity, let's use the first line of text in this part of the ROM, at 0x1201FA.

1. Find the address of the first letter of the text you want to edit: 0x1201FA

2. Take only the last four nibbles, so in this case, you want to remove the 12 and just be left with $01FA.

3. You want to either add or subtract depending on the value of the pointer:
- If the pointer is from $0000-$3FFF (which it is in this case, since it's $01FA), you add $4000. In this case, $01FA becomes $41FA.
- If the pointer is from $4000-$7FFF, do nothing.
- If the pointer is from $8000-$BFFF, subtract $4000.
- If the pointer is from $C000-$FFFF, subtract $8000.
Therefore, the pointer will always be somewhere from $4000 to $7FFF. Also, this means that pointers are pretty limited in that they can only point within banks of $4000 bytes long (in this case, this pointer table can only point anywhere from $120000-$123FFF; you can't use make a pointer in this table point outside this range).

4. The Game Boy is little endian, which means when values are multiple bytes long (such as pointers, which are two bytes long), the Game Boy reads the smallest byte first. In other words, you want to reverse the two bytes. In this case, $41FA will become $FA41 (since you're reversing the 41 and FA).

Now look at the pointer from $120000-$120001, and you'll see that it's... FA 41. So it'll point to $1201FA. Try this with other pointers to get the hang of it.

Oh, and one more thing. If you're going to add text, naturally all the text after that will shift and change addresses. Therefore, you'll have to change all the pointers of all the text that moved to the right. (Also, don't forget to remove empty space as necessary; for example, if you add, say, 4 bytes to a line of text, you'll have to remove 4 bytes of blank data after the last text so that it won't throw anything else off.

I hope this wasn't too complicated...
yoshiness(imported)
Posts: 5
Joined: Thu Dec 25, 2008 2:01 pm

Re: Bootleg hacking

Post by yoshiness(imported) »

Here's a short video on what little progress I've made. Is this something I should keep working on? Or should I start helping on Telefang?

http://www.youtube.com/watch?v=sIVSiwRMNlM

Sorry for the bad quality, but I have an old computer and I wasn't able to easily record without using the speedup function, so it's a bit choppy in parts.

Any suggestions, complaints, etc.? Before it's too late to do much about the script?
User avatar
andwhyisit
Site Admin
Posts: 1197
Joined: Fri Dec 14, 2007 9:24 pm

Re: Bootleg hacking

Post by andwhyisit »

Your goal seems to be to turn the bootleg script into understandable English, which is a nice idea and it sets your Bootleg version patch (Engrish>English) apart from the Telefang translation patch (Japanese>English). Take some artistic license with the script.
yoshiness(imported)
Posts: 5
Joined: Thu Dec 25, 2008 2:01 pm

Re: Bootleg hacking

Post by yoshiness(imported) »

I have another question. Where exactly is the text "bl" located in the window in the top left that tells you how much money you have? I've done a hex search, but I haven't been able to figure it out. And for some reason, the shops all have the same text but different function calls :/ That's just a waste of space :/
User avatar
Sanqui
Posts: 736
Joined: Sun Dec 16, 2007 12:25 am

Re: Bootleg hacking

Post by Sanqui »

Electromon? ;_;
Seems interesting anyways. Though I think people would prefer a patch from the original, because all the bootleg-caused bugs would be gone. /:
yoshiness(imported)
Posts: 5
Joined: Thu Dec 25, 2008 2:01 pm

Re: Bootleg hacking

Post by yoshiness(imported) »

Sanky wrote: Electromon? ;_;
Seems interesting anyways. Though I think people would prefer a patch from the original, because all the bootleg-caused bugs would be gone. /:
I can still change the script to Denjuu if you'd like. And I could just put something like... "Don't use the in-game save function. Use a save state, please!" And other helpful script to get around the glitches.

And plus, how much have you all done from the original? If you don't think this is really worthy, I'll try to contribute to the Telefang translation instead.
User avatar
Sanqui
Posts: 736
Joined: Sun Dec 16, 2007 12:25 am

Re: Bootleg hacking

Post by Sanqui »

You can keep on using Electromon if you want, but if you are going to keep the bootleg terms, you could use E-mon, as that's shorter, most people get it and doesn't sound ugly /:
wrote:And plus, how much have you all done from the original?
You can download the patch and see for yourself.
wrote:If you don't think this is really worthy, I'll try to contribute to the Telefang translation instead.
We thought about the idea "fixing" the bootleg translation, or translating the original and putting it in the bootleg, but we eventually decided against it, as it would further limit us in what can we change. No-one's going to force you not to do it, though XD I just don't think there's enought Telefang fans for two separate patchs.

Sorry if I sound too harsh. (:

EDIT:
wrote:And for some reason, the shops all have the same text but different function calls :/ That's just a waste of space :/
Yeah, Blaziken found about that in the translation patch and made them all point to one place, freeing some space XD
yoshiness(imported)
Posts: 5
Joined: Thu Dec 25, 2008 2:01 pm

Re: Bootleg hacking

Post by yoshiness(imported) »

Sanky wrote: You can keep on using Electromon if you want, but if you are going to keep the bootleg terms, you could use E-mon, as that's shorter, most people get it and doesn't sound ugly /:
wrote:And plus, how much have you all done from the original?
You can download the patch and see for yourself.
wrote:If you don't think this is really worthy, I'll try to contribute to the Telefang translation instead.
We thought about the idea "fixing" the bootleg translation, or translating the original and putting it in the bootleg, but we eventually decided against it, as it would further limit us in what can we change. No-one's going to force you not to do it, though XD I just don't think there's enought Telefang fans for two separate patchs.

Sorry if I sound too harsh. (:

EDIT:
wrote:And for some reason, the shops all have the same text but different function calls :/ That's just a waste of space :/
Yeah, Blaziken found about that in the translation patch and made them all point to one place, freeing some space XD
And where might I be able to find the patch?
User avatar
andwhyisit
Site Admin
Posts: 1197
Joined: Fri Dec 14, 2007 9:24 pm

Re: Bootleg hacking

Post by andwhyisit »

yoshiness wrote: And where might I be able to find the patch?
http://z15.invisionfree.com/Tulunk_Village...p?showtopic=252 (towards the end of the topic)

We seriously need to change the name of that thread. :blink:
Post Reply