Register | Login
Views: 19364387
Main | Memberlist | Active users | ACS | Commons | Calendar | Online users
Ranks | FAQ | Color Chart | Photo album | IRC Chat
11-02-05 12:59 PM
1 user currently in Rom Hacking: hukka | 2 guests
Acmlm's Board - I2 Archive - Rom Hacking - A question about text hacking. | |
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
User Post
NMorgan

Micro-Goomba
Level: 7

Posts: 9/16
EXP: 1406
For next: 42

Since: 07-07-04
From: New Jersey, USA

Since last post: 78 days
Last activity: 75 days
Posted on 07-11-04 12:12 PM Link | Quote
This question is hard to explain, so bear with me.

I am doing a text and graphic hack for the NES game "Earthbound Zero", but I am having a problem hacking the text. You see, all of the text in the entire game is stored in the same place in the ROM. Each text set is divided up in between two [DIA] tags. View the picture below to see what I'm talking about.



Do you see the part on the right where it says "You remembered the tune"? Well, I want it to say "Mario remembered the tune", but if I do that, I will have to expand the amount of characters (by two) in between the two [DIA] tags. Is there any way to do this without taking away the amount of characters from other strings of text?

NOTE: This is just one example out of hundreds of places where I need to expand the amount of characters. Also, you should know that there is plenty of free space immediately after the text, so you don't have to worry about running out of space.



Any help that you are willing to give will be GREATLY appreciated. Thank you in advance.


(edited by NMorgan on 07-11-04 03:15 AM)
(edited by NMorgan on 07-11-04 03:16 AM)
Acmlm

Torosu
heh
Level: 51

Posts: 822/1173
EXP: 981994
For next: 31944

Since: 03-15-04
From: Somewhere that isn't outside of Sherbrooke, Québec, Canada

Since last post: 39 days
Last activity: 3 hours
Posted on 07-11-04 12:47 PM Link | Quote
Originally posted by NMorgan
Also, you should know that there is plenty of free space immediately after the text, so you don't have to worry about running out of space.
Good, that means you only need to find and change the text pointers

In this example, the text you want to change starts at $6BD28 ... seeing how the whole ROM is $80090, there must be the $10 header + a $80 trainer in first, so you should get $6BC98 excluding that, a pointer to it will probably be $BC98 (98BC) or $FC98 (98FC) ... look for it, change it so it points somewhere in the free space, and put the new text there, using as much space as you need
Rain Man

Buzzy Beetle
Level: 31

Posts: 32/378
EXP: 175079
For next: 10284

Since: 04-14-04

Since last post: 5 days
Last activity: 16 hours
Posted on 07-11-04 07:59 PM Link | Quote
Why did you create 2 threads?
NMorgan

Micro-Goomba
Level: 7

Posts: 11/16
EXP: 1406
For next: 42

Since: 07-07-04
From: New Jersey, USA

Since last post: 78 days
Last activity: 75 days
Posted on 07-13-04 12:26 PM Link | Quote
Acmlm, that post was pretty wild. I didn't really understand that at all.

Actually, that's not completely true. I understand that you are telling me to put the text in the free space I have. I have put the words "Mario remembered the tune" in free space, but how do I find change the pointers? Any help is good, and don't confuse me too much like Acmlm just did. (I'm sure it's something very simple, I just don't know how).

Thanks
Lenophis

Super Koopa
Level: 44

Posts: 68/830
EXP: 584360
For next: 26925

Since: 03-15-04
From: Duluth, MN

Since last post: 4 hours
Last activity: 3 hours
Posted on 07-13-04 01:14 PM Link | Quote
He did tell you, but chances are it whooshed right over your head. First, you must find the pointers, they are usually behind the text or whatever they point to.

Example...

say $50000 (or 0x50000, however you look at it) has a pointer... now, pointers are generally 2 bytes, so %50000 and $50001 is the location of a pointer. Let's say the data there reads as follows:
$50000: 92
$50001: DB

your pointer is DB92, because this is what is called "little endian" (I think). You must swap the two bytes. Now, you have the pointer, but where does it point? It's easy to calculate...
since pointers generally if not always point forwards (some verify this?) you must first add $50000, and subtract $10. In most nes roms, the first $10 is the header. The header is never calculated in pointers. Overall, $4FFF0 is added. Now comes the easy part... add DB92 and 4FFF0. 5DB82 should be the number you come up with. That's the data this pointer points to.

Now, this is a dummy example, hopefully you picked up on that already. What Acmlm said, is to basically change the pointer to point to your new text.

So let's say your old text is at $5DC92, and your new text is at $5DCF1. The current pointer should be A2 DC, you'd simply need to change it to DD 01. There, pointer changed, and the new text will display.

Hope this helps.

PS: to the experienced, how'd I do in my first explanation?
Xkeeper
The required libraries have not been defined.
Level: NAN

Posts: -3502/-863
EXP: NAN
For next: 0

Since: 03-15-04

Since last post: 2 hours
Last activity: -753366 sec.
Posted on 07-13-04 02:03 PM Link | Quote
There's also another thing that might be; if theree's free space RIGHT after the text area, it might just start going through the script until it hits a certain amount of [Dia]s.

Well, it's always worth a shot. That's how Crystal Mines did stuff (just put FF FF at the end of each level, so you could swtich them around)

NMorgan

Micro-Goomba
Level: 7

Posts: 13/16
EXP: 1406
For next: 42

Since: 07-07-04
From: New Jersey, USA

Since last post: 78 days
Last activity: 75 days
Posted on 07-26-04 12:05 PM Link | Quote
Okay, I am still utterly confused. Is there some kind of tutorial out there about pointers? If so, could you be a doll and direct me to it?

Thanks,
Nick
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
Acmlm's Board - I2 Archive - Rom Hacking - A question about text hacking. | |


ABII


AcmlmBoard vl.ol (11-01-05)
© 2000-2005 Acmlm, Emuz, et al



Page rendered in 0.063 seconds.