+  RHDN Forum Archive
|-+  Romhacking
| |-+  ROM Hacking Discussion
| | |-+  Need some help with pointers
Pages: [1]
Author Topic: Need some help with pointers  (Read 2 times)
Noitora
Guest
« on: July 06, 2008, 08:43:58 am »

I am the author of Mugen no Frontier: Super Robot Taisen OG Saga translation and  I am currently translating the game script.The thing is there is not enough space to fit all the text and the only way to do it is to cut some of the dialogues,and I don't wanna do this so I thought I'd just repoint the text.Well,I know almost everything about pointers, having read many documents about pointers over at Romhacking.net  but I haven't been able to repoint any text so if anyone can point me to the right direction or something I would be really grateful.I know this is my first post here but I couldn't wait...so here is a cookie for everyone  :cookie:
KC
Guest
« Reply #1 on: July 06, 2008, 10:32:50 am »

If you want some help, at least provide what you know so far...

Anyway, I guess you mean the text in data\\sb\\cs\\*.sb. The files are some really simple archives with several sub files. 001_001.sb, for example, has 6 different files, with pointers starting at position 8.
One of those files starts at offset 4808h. That's the one with text.

At the beginning of it, there's a small header which also contains a normal pointer table.
The header is like this...
-4 bytes the size of the header
-4 bytes the amount of files
After that, there's the pointer table of the text. They aren't relative to the start of the file or sub file, but to the end of the pointer table.
So multiply the file amount by 4 (that's how big a single pointer is), add the header size to it, and you have the size of the header, which you have to add to every pointer.

In this case...
-file starts at 4808h
-header size is 8
-E9h pointers
x = 4808 + 8 + E9h*4
x = 4BB4h
So you have to add 4BB4h to every pointer to get the position of the text, and vice versa for changing it.

It could be easily automated with a simple program, seeing as the format is very, very simple. If you don't know what to do with those pointers, then you probably have to read a bit more about them.
Noitora
Guest
« Reply #2 on: July 06, 2008, 03:33:17 pm »

It seems I need to read more about pointers thanks for the help though  :beer:
Pages: [1]  


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