Cyberman
March 27th, 2006, 22:53
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
RootDirRecord from volume descriptor points to 4 path tables.
I fetch the first LSB based path table and leap to that sector.
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
smcd
March 28th, 2006, 04:41
I found a pdf (attached) on wotsit regarding iso 9660 specs and stuff, don't know if it would be useful or not, and there's mkisofs http://www.andante.org/mkisofs.html that you may have already looked at, not sure.
bcrew1375
March 28th, 2006, 08:30
Don't know if this would be useful or not: http://www.megagames.com/psx/psx_cd_info.shtml
I don't know if it'd make a difference with the image file or not, but are you taking into account the Mode 2/XA format of the discs?
Cyberman
March 29th, 2006, 07:53
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
vBulletin v3.6.2, Copyright ©2000-2010, Jelsoft Enterprises Ltd.