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

Author Topic: How to analyze games with hidden files on disk?  (Read 1788 times)

Metafalica

  • Jr. Member
  • **
  • Posts: 15
    • View Profile
How to analyze games with hidden files on disk?
« on: August 19, 2017, 10:25:37 am »
This is second time I met the game with no files on disk, aside of executable.
First is Star Ocean 3 Till the End of Time, second is Threads of Fate.
Ok, so, I opened the image file and see next picture:

The image itself is 370 MB in size, but disk content shows only executable and some config file.
What I need to do to extract all files for analysis? I want to translate this game.

FAST6191

  • Hero Member
  • *****
  • Posts: 3089
    • View Profile
Re: How to analyze games with hidden files on disk?
« Reply #1 on: August 19, 2017, 03:35:37 pm »
For the PC it is a bit different but for the PS1 and PS2 you have some more abstract options.

The games themselves will do it using a so called RAW LBA read (or possibly RAW DMA in some guides, though that is not the best term as the actual DMA involved is not that relevant) -- LBA = logical block address and is how hard drives and such have masses of space without needing pointers dozens and dozens of bits long, the cost being either longer reads or losing space (why windows will say file size and size on disk). The idea being that rather than using the file system and saying "I want [checks index] file 30, these bytes please" the game will instead issue a command to the drive (or controller) saying "these location/blocks to these locations/blocks, go fetch".

I have not played with PS1 debuggers for quite a while so I don't know if you can flag or log such reads with the current ones. Logging may not appear that useful at first but play enough of the game and you can then get a reasonable idea of where everything is (if pressing page down a lot is tedious on a couple of meg SNES ROM then CD or DVD iso size is not going to improve things), or play specific things to get an idea of where specific things are.

It is also fairly obvious in the assembly for a given game -- there is no great reason other than this that the game would be talking to the drive/drive controller, and the more conventional file system reads would likely look a bit different as well.

Depending upon the file types involved you might also be able to do header scanning -- a lot of work was done by audio rippers for Japanese RPGs (typically Square/Square Enix games as they are the most notorious users of this, and they are publishers for both of these games yeah) and as the audio formats had certain strings in headers and such you can manually scan for those and pull them out yourself. For translating though this might not be as useful until you can pull a text file (it will have to end up in memory to run so that is an option) and see if it has any obvious headers/tells you can search for.

Of course this means inserting the file after more than in place edits could be quite annoying as you could in turn have to redo a lot of said raw reads in the binary. Depending upon the format (while it is commonly held that this sort of thing was done to prevent piracy and tampering it does afford you some options in streaming things) you might be able to bring your modded file inside the file system.

Metafalica

  • Jr. Member
  • **
  • Posts: 15
    • View Profile
Re: How to analyze games with hidden files on disk?
« Reply #2 on: August 21, 2017, 01:35:59 pm »
Thanks for your reply. I think debugger way is hard for me.
Do we have PSX CD structure description, so I can read CD image and rip all needed files from there?

FAST6191

  • Hero Member
  • *****
  • Posts: 3089
    • View Profile
Re: How to analyze games with hidden files on disk?
« Reply #3 on: August 22, 2017, 06:23:37 am »
No. Most PS1 and PS2 games are basic iso format (I can't recall the exact numbers and sub types from memory but all the sorts of things you encounter in imgburn, nero, magiciso, ultraiso...) and so you can open them and fiddle with them using whatever iso tool can handle basic iso formats. These sorts of things are the exception.