News:

11 March 2016 - Forum Rules

Main Menu

Pointer Question

Started by Romsstar, February 13, 2012, 08:40:23 AM

Previous topic - Next topic

Romsstar

All right I dumped the list from the places from a PSX game with cartographer

Got the String and Pointer Location

What it looks like:
//POINTER #36 @ $A279C - STRING #36 @ $A2310

Grüne Trainingscamp<LINE>

What I want to do:

//POINTER #36 @ $A279C - STRING #36 @ $A2310

Grünes Trainingscamp<LINE>

-> This is just a stupid typo in the game that drives me crazy.

Obviously just inserting data will make the game not even start anymore.

So I figure that I have to do something with the Pointer to actually expand it?

Also I'm inserting sth bigger than the file (since 8140 for the "" and 8293 for "s".)
Which makes it um 8 Bytes bigger? Or something like that? I'm not sure.

Now I thought at the end of the file there are some bunch of zeros. I tried just to delete them to have the same filesize as before. But somehow that didnt really work out.

Help anyone?

LostTemplar

If that's the only line you want to change then it might be advisable to just relocate that string. Change the pointer to a new location that's free (maybe the bunch of zeroes you mentioned?) and insert the corrected line there. I'm not familiar with Cartographer, but I reckon you'd have to do it by hand (e.g. with a hex editor).

If you just reinsert everything there's a possibility - depending on the nature of the file in question - that the location of other important data changes or that it gets overwritten, thus breaking the game.

Xalphenos

If the file size got bigger after editing it then you where inserting characters and pushing every thing after that string 8 bytes over.  All addresses, and jumps would be messed up.  If there is space after that string then make sure you are typing over and not inserting.  If not Change the pointer to point to another place with enough free space and type the line there still typing over not inserting.  And yea for such a small edit I think it would be easier to just hex edit it.

Romsstar

Thanks guys repointed it succesfully, problem solved :)

@Xalphenos: Yeah you were right this was the problem. Inserting stuff is somehow problematic. maybe you could insert stuff at the end but I inserted the 8 bytes in the  middle of the file and that screwed everything up. by deleting bytes at the end the adresses still would be changed. I should've realized that by myself.

Anyways thank you guys^^