What's new

Reading Ye Olde ISO File system from an Image file

Cyberman

Moderator
Moderator
OK I've been attempting to make sense of the ISO file system. I've gotten to the point of attempting a find first and find next type function to read the directory structure, it's a bit of a mess sadly.

So here is the question I get the root directory record from the volume descriptor. This has 4 sector locations for the Path table (because there are 2 LSB oriented and 2 MSB oriented path tables) Fine HOW do you read the path table? The Linux ISO fs information does not match what the ISO9660 standard has. :D It makes a UINT16 from the Length and Extended Attribute length bytes instead of using them as 2 UINT8's (boggle). Which is of course WRONG but it works because no one uses the extended attribute length in the path table apparently (or not).
I bounce to the sector read the data and get a name length... which is longer than the minimum record length so it has a file name... or something.

This makes little sense all around in summary here is what I am doing
  1. RootDirRecord from volume descriptor points to 4 path tables.
  2. I fetch the first LSB based path table and leap to that sector.
  3. I then read the data from the sector and cast it to a path table type. This is where things go awry.
I'm attempting to read Playstation 1 disk Images to find the SLUS SLPS etc ID from the disk. However I have to use the actual file system to find the SYSTEM file and read it.

I'm guessing this might be a purposefully misformated directory table to swap LSB to MSB suddenly and drive people crazy.

I've noticed most of the PLAYSTATION disk information is not correctly written (Copywrite etc are either blank or some odd ball name which is not legal for ISO standard even with extensions and LEVEL 3 usage).

Cyb
 
OP
Cyberman

Cyberman

Moderator
Moderator
I have made progress, it seems that the path table is not the way to go (LOL). So what I am doing now is going to the root directory and examining each directory entry. It turns out that each directory entry is a file or directory whereas the path table only includes directories. (duh)

So I iterate through each file/directory (of which the ones with the name NULL and 0x01 are . and .. respectively ) record until I find one that matches SYSTEM.CNF I ignore the ;1 part of course (ISO has a version for files).
Then use the 'path' and open that file. That's the next step File opening.

As for if I'm taking into account MODE2 F1or F2/Mode1 F1 yes I am.
:D

At the moment I only need SYSTEM.CNF;1 later.. I don't know :/ :)

Cyb
 

Top