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

Author Topic: "unlinking" PSX standard library  (Read 1919 times)

sqykly

  • Jr. Member
  • **
  • Posts: 11
    • View Profile
"unlinking" PSX standard library
« on: July 04, 2012, 04:21:40 pm »
Totally lost the source code to my PSX EXE ;D.  Does anyone know an easy(er) way to catalog or otherwise identify functions linked from the PSX SDK in compiled code?  I am pretty much looking for Fnt(Open|Load|Print) and KanjiFnt(Open|Load|Print) only, which are sadly not among the bios/syscalls as I understand it.  I know there's IDA and flirt signatures, but I tried it once, and I seem to remember that it wanted me to insert coin to continue.  I tried looking at some of the gnu libpsx, and it looks like it's defining import functions as constant addresses; regrettably, they don't match up with anything in my EXE (all point at illegal instructions, obvious string data, etc).

This is a long shot, I know.  But if anyone knows something I don't, like whether PsyQ also compiles its methods to constant offsets, or anything else that I can do other than squint at pSX disassembler's tiny font for hours, I would be super appreciative.  Thanks!

Gemini

  • Hero Member
  • *****
  • Posts: 2007
  • 時を越えよう、そして彼女の元に戻ろう
    • View Profile
    • Apple of Eden
Re: "unlinking" PSX standard library
« Reply #1 on: July 04, 2012, 07:22:16 pm »
No idea why IDA didn't work for you, but the PSY-Q libraries definitively aren't linked at constant addresses. They are linked just like any other kind of obj code and variables updated according to the new code address. Anyways, IDA should definitively work no matter what, I've been successfully using those PSY-Q flirt signatures for years so you must be doing something wrong somewhere in the process.
I am the lord, you all know my name, now. I got it all: cash, money, and fame.

syntax error

  • Full Member
  • ***
  • Posts: 227
    • View Profile
Re: "unlinking" PSX standard library
« Reply #2 on: July 06, 2012, 03:53:23 pm »
If your binary is in ELF you could try out the REC Decompiler it tries to convert to C code.

Gemini

  • Hero Member
  • *****
  • Posts: 2007
  • 時を越えよう、そして彼女の元に戻ろう
    • View Profile
    • Apple of Eden
Re: "unlinking" PSX standard library
« Reply #3 on: July 06, 2012, 05:42:04 pm »
PlayStation executables don't use ELF, but a custom format called PS-X EXE. I even tried using REC multiple times (it's supposed to load MIPS and PS-X EXE out of the box) but it failed no matter what I did. Still, it's not like REC can recognize PSY-Q libraries, so it isn't really suitable for this task.
I am the lord, you all know my name, now. I got it all: cash, money, and fame.