News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: [PS1] Obfuscated pointers  (Read 633 times)

sleeper

  • Newbie
  • *
  • Posts: 2
    • View Profile
[PS1] Obfuscated pointers
« on: June 23, 2020, 02:57:27 pm »
Hello everyone, this is my first post here after lurking for a while, and it's also the first time I'm trying to hack a game. I have worked with MIPS before so I thought I'd give it a shot!

I'm trying to extract the text and pointers from a PS1 game so I can eventually edit them out.
I have already found where the text is located for the most part. It's compressed but I found a decompression routine in the EXE that takes care of that for now (which is another can of worms anyway).

I have no idea where the text pointers are located at all. However I noticed that when talking to an NPC the pointer for that dialogue gets written to a specific location in RAM and then finally it's read and used to decompress the text.

So I went up a bit and I found the routine that basically generates the real pointer for each NPC I'm assuming, but it looks very random and I cannot find anything on the files that I can correlate it to.

My question is, is what I'm describing reasonable or am I looking at the wrong place? Has this ever happened to anyone before?
I have made some research both here and in other places for similar cases but I haven't found anything. Did I just stumble upon encryption? The higher I go in the call stack the more confused I get.

Thanks in advance.



FAST6191

  • Hero Member
  • *****
  • Posts: 3081
    • View Profile
Re: [PS1] Obfuscated pointers
« Reply #1 on: June 23, 2020, 03:31:33 pm »
It is not impossible and some odd stuff was done for audio at times.
That said it would be a first for text outside of the PC.

I would have hoped you would have caught a basic offset type pointer so my usual suspects are

Relative pointers (take current location and add value at location to get final result)
Shifted pointers. Basically the computer equivalent of the * x 10^? scientific notation.

The audio stuff mentioned above often used raw sector level stuff. Which is to say it picked a sector on the disc and offset within it.

sleeper

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: [PS1] Obfuscated pointers
« Reply #2 on: June 25, 2020, 03:56:38 pm »
Hey there, thank you for your reply. I've been trying to see if I can find something similar to the techniques you described in the files but so far no luck.
So I've been looking at the exe and the code to try to make sense out of this. I will update this post once I find something out and I'll keep an eye out for those cases you described.

Thank you!