.SYM files inside PS1 exe?

Post a topic about yourself to let others know your skills, hobbies, etc.
Post Reply
TheStolenBattenberg
What is PSXDEV?
What is PSXDEV?
Posts: 2
Joined: September 16th, 2018, 2:17 pm
I am a: Programmer
PlayStation Model: SCPH-5502
Want to Find: Reverse Engineering
Steam: TheStolenBattenberg™

.SYM files inside PS1 exe?

Post by TheStolenBattenberg » December 14th, 2018, 11:48 am

I tried to make an account at 'AssemblerGames' to post this because it seemed more fitting of a place, but they either don't like my name or the mods don't check their stuff enough.

-

I've been reverse engineering an odd little PS1 title called 'Battle Hunter' for the past two years, and after figuring out the file formats I decided to take a crack at reversing the assembled code (Pre warning I'm not too familiar with the general terminology for these things, as I've learnt what I know as I go).

I noticed that the EXE is bigger than I expected, so I decided to load it up in a hex editor, only to find that there's a bunch of method names for the games code stored inside, for example 'HntSysFontInit(HNTFONTst)'. It also has a bunch of strings and what look like variable names. I wonder if this could be left over debugging information, or as I've heard a .SYM file. I've read in a few places that developers normally strip this information from the EXE, but as the game is from the 'SuperLite 1500' series, I'd be willing to bet they didn't bother.

Anyone heard of anything like this, and if so is it possible to split this data from the code? Would someone be willing to tell me how?

User avatar
LameGuy64
Psy-Q Enthusiast
Psy-Q Enthusiast
Posts: 363
Joined: April 10th, 2013, 3:47 pm
I am a: Hobbyist Game Developer
Motto: Commercial or not, play it!
PlayStation Model: H2000/7000
Skype: lameguy64
Location: Philippines

Re: .SYM files inside PS1 exe?

Post by LameGuy64 » December 14th, 2018, 1:46 pm

That's interesting, with the standard Programmer's Tool SDK the symbol data is usually generated to a separate file with a .sym file extension and symbols are typically not stored inside of a PS-EXE.

It might be a PS-EXE created using CodeWarrior which uses its own compiler (MIPSPRO) and from what I remember the last time I used it, it does not produce a separate symbols file. I'm going to check again when I get home.
Please don't forget to include my name if you share my work around. Credit where it is due.

Dev. Console: SCPH-7000 with SCPH-7501 ROM, MM3, PAL color fix, Direct AV ports, DB-9 port for Serial I/O, and a Xplorer FX with Caetla 0.35.

DTL-H2000 PC: Dell Optiplex GX110, Windows 98SE & Windows XP, Pentium III 933MHz, 384MB SDRAM, ATI Radeon 7000 VE 64MB, Soundblaster Audigy, 40GB Seagate HDD, Hitachi Lite-on CD-RW Drive, ZIP 250 and 3.5" Floppy.

TheStolenBattenberg
What is PSXDEV?
What is PSXDEV?
Posts: 2
Joined: September 16th, 2018, 2:17 pm
I am a: Programmer
PlayStation Model: SCPH-5502
Want to Find: Reverse Engineering
Steam: TheStolenBattenberg™

Re: .SYM files inside PS1 exe?

Post by TheStolenBattenberg » December 15th, 2018, 1:46 pm

LameGuy64 wrote:
December 14th, 2018, 1:46 pm
That's interesting, with the standard Programmer's Tool SDK the symbol data is usually generated to a separate file with a .sym file extension and symbols are typically not stored inside of a PS-EXE.
Thank you for taking the time to reply and telling me this. I thought it would've been stored in a seperate file myself, as with the few retail games that do contain debugging information. I'd normally think that I'm looking at it the wrong way, but the EXE is 600KB+, and all the games assets are stored in seperate files... I really do doubt that the assembled code could take that much room, as it is very simple.
It might be a PS-EXE created using CodeWarrior which uses its own compiler (MIPSPRO) and from what I remember the last time I used it, it does not produce a separate symbols file. I'm going to check again when I get home.
Would that be possible? This game uses PsyQ (what I assume to be version 4.4 of the library, due to FLIRT signatures in IDA, and the date of the game) so I'd of thought they'd use the compiler that came with PsyQ (GCC, if I'm not mistaken?).

User avatar
LameGuy64
Psy-Q Enthusiast
Psy-Q Enthusiast
Posts: 363
Joined: April 10th, 2013, 3:47 pm
I am a: Hobbyist Game Developer
Motto: Commercial or not, play it!
PlayStation Model: H2000/7000
Skype: lameguy64
Location: Philippines

Re: .SYM files inside PS1 exe?

Post by LameGuy64 » December 22nd, 2018, 7:11 pm

Well, CodeWarrior also does not appear to store any symbol data inside of a PS-EXE either. Its possible those symbol strings you've found are just strings in some libraries used for debug messages.

CodeWarrior would actually produce an ELF file (named as a .pse file) but it does not appear to contain any symbol data even though the file format supports DWARF symbols embedded into it. It instead stores such information in a .tgt file which is its own file format so neither of the development tools would embed symbol data into a PS-EXE.
Please don't forget to include my name if you share my work around. Credit where it is due.

Dev. Console: SCPH-7000 with SCPH-7501 ROM, MM3, PAL color fix, Direct AV ports, DB-9 port for Serial I/O, and a Xplorer FX with Caetla 0.35.

DTL-H2000 PC: Dell Optiplex GX110, Windows 98SE & Windows XP, Pentium III 933MHz, 384MB SDRAM, ATI Radeon 7000 VE 64MB, Soundblaster Audigy, 40GB Seagate HDD, Hitachi Lite-on CD-RW Drive, ZIP 250 and 3.5" Floppy.

CandyAngel
What is PSXDEV?
What is PSXDEV?
Posts: 1
Joined: February 12th, 2019, 11:44 pm

Re: .SYM files inside PS1 exe?

Post by CandyAngel » February 13th, 2019, 12:10 am

Heyas TheStolenBattenberg!
TheStolenBattenberg wrote:
December 14th, 2018, 11:48 am
I've been reverse engineering an odd little PS1 title called 'Battle Hunter' for the past two years
Would you be willing to share the information you have found? I am implementing this game as a testbed in my game engine and there are some things I would like to know (such as, are the dungeon maps stored assets or randomly generated at runtime. Could they/the algorithm be extracted? etc.).

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest