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

Author Topic: PSX/Saturn hacking: How difficult is it?  (Read 2514 times)

Dr. Jeckidy

  • Jr. Member
  • **
  • Posts: 44
  • Sega Chauvinist
    • View Profile
PSX/Saturn hacking: How difficult is it?
« on: June 26, 2013, 03:14:44 pm »
I've been interested in this for a while but want to know exactly how difficult it is to do translations of 32bit-era CD-ROM based media, such as the two systems mentioned? I assumed that it was, in some ways easier, because the tools and methods used in programming and development were generally less obscure and somewhat more straightforward. Of course I understand some of the more graphically-oriented work can still be quite challenging but nonetheless isn't editing pointers, text, etc. the same in theory?

LostTemplar

  • Hero Member
  • *****
  • Posts: 906
    • View Profile
    • au-ro-ra.net
Re: PSX/Saturn hacking: How difficult is it?
« Reply #1 on: June 26, 2013, 03:39:16 pm »
Yes, the basics are pretty much the same as for the 8-/16-bit systems. Some things are easier, some are more difficult.

I can't speak for the Sega Saturn, but many PlayStation games use the standard ISO9660 file system. File names and the directory tree provide important clues about the content and structure of the game's data. Furthermore, there is a bunch of common file formats (e.g. TIM) that additionally ease reverse engineering.

Another advantage of this is that you usually don't have space problems in the same way you would have with traditional cartridge-based systems because you can almost arbitrarily resize the files. This is of course limited by RAM space because everything has to be loaded to memory before it can be used. Hence reading from the CD-ROM is another bottleneck and a lot of data is compressed to reduce reading times.

(The next paragraphs apply if you want to do advanced hacking, i.e. related to assembly.)

Reading disassembly for the newer systems can, however, be a daunting task, due to the shift in development from assembly to C or C++ (especially the latter can lead to obscure assembly code). Still, there are many firmware and library functions that are shared among games and if you can identify these it helps a lot (e.g. LoadImage).

Most other things are the same in principle, just know your hardware. For the PlayStation, understand the VRAM and how data gets transferred into it, understand how the game can communicate with the GPU, and so on. For example, finding the routine responsible for rendering text follows the same process as for older systems: Look how the text gets rendered (e.g. textured quads), find out how the game gets these into VRAM (e.g. DMA), and where the game gets the values from the storage medium (= CD-ROM). A good debugger (e.g. no$psx) will help a great lot here.

Anyway, there are more experienced PlayStation and Saturn hackers around here, so maybe they can give more detailed explanations and tips.

Pokeytax

  • Jr. Member
  • **
  • Posts: 56
    • View Profile
    • Cavespeak
Re: PSX/Saturn hacking: How difficult is it?
« Reply #2 on: June 26, 2013, 06:49:28 pm »
I have translated for GBA and PSX, and they were about equal difficulty.  It can be kind of a pain to find freespace for assembly on PSX, and as LT notes you are going to see a lot of obfuscated code generated by a compiler, but the general principles are all the same.

Honestly, how good the available emulators are makes more of a difference than the platform.  NO$PSX isn't broadly compatible yet (in my limited experience, correct me if I'm wrong) and pSX doesn't have the breadth of debugging features and VRAM viewing NO$ emulators provide.

Gemini

  • Hero Member
  • *****
  • Posts: 2021
  • 時を越えよう、そして彼女の元に戻ろう
    • View Profile
    • Apple of Eden
Re: PSX/Saturn hacking: How difficult is it?
« Reply #3 on: June 26, 2013, 06:58:26 pm »
I can't speak for the Sega Saturn, but many PlayStation games use the standard ISO9660 file system.
Quite the opposite. The Saturn relies almost entirely on valid TOC data and actively accesses to it, while most PlayStation games just ignore this information because of bugs in libcd preventing the software from having a full list of files on disk.

and pSX doesn't have the breadth of debugging features and VRAM viewing NO$ emulators provide.
The GPU module in pSX is a full fledged tool and offers countless means of locating everything you'd ever need. It's far more complete than what most emulators offer.
I am the lord, you all know my name, now. I got it all: cash, money, and fame.

Pokeytax

  • Jr. Member
  • **
  • Posts: 56
    • View Profile
    • Cavespeak
Re: PSX/Saturn hacking: How difficult is it?
« Reply #4 on: June 26, 2013, 09:19:22 pm »
The GPU module in pSX is a full fledged tool and offers countless means of locating everything you'd ever need. It's far more complete than what most emulators offer.

Embarrassed to admit I ignored these because they crashed whenever I tried them (vu0 and vu1?).  That's terrific and obviates everything I said.