C
Cyberman
Guest
I've been working on these for a while.
Some notes. ISO directories are sector sized and sequentially stored. However they do not overlap sector boundries. This makes for getting the contents confusing if you aren't paying attention. A directory size will ALWAYS be a multiple of the size of a Mode1 Form1 sector (2048 bytes). The size of files in IS9660 reflects the size in sectors * 2048 used for Mode 2 files. This of course means that the actual size is... relative. Furthermore a Mode2 file is never 2048 bytes in size. (read never several times) Why is that? Mode 2 files have subheaders which need to be read in order to know what the data is. 8 bytes are used in this subheader (actually only 4 but they are repeated againm likely to ensure that the data is read correctly).
Currently my routines are not perfect (no doh). They will only read a data sector at a time. I will make them set up to read exactly how much data from a set of sectors you wish to read from, however, you need to be wary of the fact mode 2 sectors may return more than you bargined for (IE more than 2048 bytes per sector). It might be good to differentiate between these special sectors by returning Sector Size for the beginning record of a file. You can read 4096 bytes from a Mode2 file but not read a complete 2 sectors. The size varies per sector in the file also. Some of the movie files in FF7 are 2K sectors some aren't. The movies with audio are not and they vary throughout the file, audio is interleaved with the video sectors.
So what works? Searching for a file and finding it's directory Record information works. Soonish I'll have the special 'file system' set up by Akari functioning with ISO images of the 2352 size per sector variety.
The other thing is .. start up file system etc. I think it would be sane to have this a CLI option for Q-gears (and or in an XML based INI file). The file system should be just fine. I think in the current testing however we might have a few issues.
So should I dump the complete listing of Directory/Files and the Logical sector numbers for FF7 disk 1 so we can examine FF7's engine for sector and offset information (IE it assumes something is in a certain place instead of looking for a file).
Of note the PS1's limitation on CDROM directories appears to be 2 directory sectors. Any mroe than just 2 sectors and the PS1's normal CDROM routines loose the rest of the directory (it likely has a permanent 4K buffer to iterate through).
Cyb
Some notes. ISO directories are sector sized and sequentially stored. However they do not overlap sector boundries. This makes for getting the contents confusing if you aren't paying attention. A directory size will ALWAYS be a multiple of the size of a Mode1 Form1 sector (2048 bytes). The size of files in IS9660 reflects the size in sectors * 2048 used for Mode 2 files. This of course means that the actual size is... relative. Furthermore a Mode2 file is never 2048 bytes in size. (read never several times) Why is that? Mode 2 files have subheaders which need to be read in order to know what the data is. 8 bytes are used in this subheader (actually only 4 but they are repeated againm likely to ensure that the data is read correctly).
Currently my routines are not perfect (no doh). They will only read a data sector at a time. I will make them set up to read exactly how much data from a set of sectors you wish to read from, however, you need to be wary of the fact mode 2 sectors may return more than you bargined for (IE more than 2048 bytes per sector). It might be good to differentiate between these special sectors by returning Sector Size for the beginning record of a file. You can read 4096 bytes from a Mode2 file but not read a complete 2 sectors. The size varies per sector in the file also. Some of the movie files in FF7 are 2K sectors some aren't. The movies with audio are not and they vary throughout the file, audio is interleaved with the video sectors.
So what works? Searching for a file and finding it's directory Record information works. Soonish I'll have the special 'file system' set up by Akari functioning with ISO images of the 2352 size per sector variety.
The other thing is .. start up file system etc. I think it would be sane to have this a CLI option for Q-gears (and or in an XML based INI file). The file system should be just fine. I think in the current testing however we might have a few issues.
So should I dump the complete listing of Directory/Files and the Logical sector numbers for FF7 disk 1 so we can examine FF7's engine for sector and offset information (IE it assumes something is in a certain place instead of looking for a file).
Of note the PS1's limitation on CDROM directories appears to be 2 directory sectors. Any mroe than just 2 sectors and the PS1's normal CDROM routines loose the rest of the directory (it likely has a permanent 4K buffer to iterate through).
Cyb