+  RHDN Forum Archive
|-+  Romhacking
| |-+  ROM Hacking Discussion
| | |-+  Finding Pointers and Modifying Reserved Text Space
Pages: [1]
Author Topic: Finding Pointers and Modifying Reserved Text Space  (Read 2 times)
Penance
Guest
« on: March 07, 2009, 04:14:58 am »

I wasn't sure whether to put this in the script forum or programming forum so I just took a guess. I hope here is okay.
---

So, I'm working on creating a menu patch for Tales of Rebirth PS2 (doing PSP as well  but I want to get PS2 over with) and seen as it's all written in Japanese there isn't that much space for me to overwrite the strings with English text.
An attack name can be like 3 Kanji characters long which gives me about 6 spaces which isn't enough for the word(s) I wish to fit on.
I have some kind of knowledge with PS2Dissembler but I'm not really sure how to use it to modify the reserved text space.
I know I have to find the pointer for the line I am editting and send it to somewhere else but I don't know how I go about doing that.

Is there a guide, or could someone just explain it flat out here? From what I've heard it's pretty easy.
Any input appreciated, guys!
Tauwasser
Guest
« Reply #1 on: March 08, 2009, 10:00:43 am »

The answer to these questions are pointers.

The Newbie Package of REQUIRED Material
Please read these beginner tutorials.
ROMHacking.net FAQ: You ask, we answer!
ROMHacking.net Getting Started Section: Newbies Go HERE!
ROMHacking.net Documents Section!
How to ask questions the smart way.
On the Essence of ROM Hacking

Also, I'm moving this to General Romhacking.

cYa,

Tauwasser
vx
Guest
« Reply #2 on: March 09, 2009, 10:26:16 pm »

Yeah like Tauwasser stated all you need to do is find the pointers, then add the new text somewhere in the file and change the pointers to point to the new text. See if you can find any docs or info on PS2 / PSP Pointers as every format is different when it comes to that.

If you have blank space in the file it should be simple, if not you have to overwrite text...best choice is extra Japanese characters that simply won't be used.

Penance
Guest
« Reply #3 on: March 10, 2009, 12:19:39 pm »

Quote from: vx on March 09, 2009, 10:26:16 pm
Yeah like Tauwasser stated all you need to do is find the pointers, then add the new text somewhere in the file and change the pointers to point to the new text. See if you can find any docs or info on PS2 / PSP Pointers as every format is different when it comes to that.

If you have blank space in the file it should be simple, if not you have to overwrite text...best choice is extra Japanese characters that simply won't be used.



I don't know if it's the same for PSP files but I know in PS2 files, the executable file where the text I am editting is has a huge amount of free space just below 001xxxxx (or how ever long the adress is when it reachs double 00's at the start).
I know what pointers are and how they work but I just don't understand how you get to the pointer for a specific string and re-write it insomething like PS2Dis because when you save it, it's no longer the executable game file because it gets given a new extension for PS2Dis.
vx
Guest
« Reply #4 on: March 10, 2009, 05:33:04 pm »

EDIT: Just to add - you could try using a hex editor instead of that app, this way the checksum should be OK. Again I don't know enough about PS2 to offer much help  :'(

Well I can't help much w/ PS2 files but speaking for GBA, NES or SNESROMs there is a calulation to finding the pointers. All of them are different. 

Generally speaking start of the text string is at $0C78 (some formats require a calulation) some don't...just swp the bytes and pointer would be at 780C. It's taking the offset, swapping the bytes and searching for them...as I said it's different depending on the format. I guess you can try that for PS2 and see if it works?
 
You need to find someone who knows about PS2 pointers, there are some on here - maybe the guys who are retranslating Front Mission 5.
« Last Edit: March 11, 2009, 03:40:20 am by vx »
Penance
Guest
« Reply #5 on: March 15, 2009, 06:36:11 am »

Right, I got that part. Thankyou!
The other thing is how do I find the pointer for a specific line?
Say I open the file in a hex editor and the word "Hello" is at... 001AB680, how would I know where the pointer for that is?
vx
Guest
« Reply #6 on: March 15, 2009, 12:30:42 pm »

Quote from: Penance on March 15, 2009, 06:36:11 am
Right, I got that part. Thankyou!
The other thing is how do I find the pointer for a specific line?
Say I open the file in a hex editor and the word "Hello" is at... 001AB680, how would I know where the pointer for that is?

EDIT: I used your offset as an example to make this clear which I should have from the start.

Let's say the word "HELLO" which in ASCI is "48454C4C4F".

The start of the text (considering there is no control codes) here is "48".  Now we take the last 4 bytes from the offset which is $B680 and from there...this depends on the format. But for some all you do is swap the offset which would be "80B6" -> this is your pointer, now do a hex search.

Most pointer tables will be located above the text block and they usually look like: C4 EE CF EE D1 EE D2 EE D3 EE etc.

Once you find the pointer table, you can go and add text somewhere else, do the same thing, get the new pointer and then just change the original pointer that's about it.

The only problem here is we don't know if PS2 pointers are just a byte swap or if you have to do any calculations to take account for the heading or any issues...as I said it's worth a try.
« Last Edit: March 15, 2009, 12:39:42 pm by vx »
Pages: [1]  


Powered by SMF 1.1.4 | SMF © 2006-2007, Simple Machines LLC