PS2 How to determine disc size written to HDL/OPL partition?

Berion

Developer
How to determine disc size written to HDL/OPL partition? I cannot figure it out. For sure size cannot be written inside "FileSystem Space" because whole is occupied by disc image (except rounding to 128MiB). For sure cannot be on PFS partition because various of programs can extract image with proper size, while there is no any additional partitions than default. So it must be somewhere in "APA space" of specific game partition, but where? I've trying finding it, based on assumptions of possibility of format structure, like below:

A. size in bytes
B. size in disc sectors (n*2048)
C. size in disk sectors (n*512) (in other words: LBA range)
D. address start and end in LBA
E. A/B/C/D variants but in HEX
F. A/B/C/D/E variants but in reverse byte order

None of above matching. So WTH? Would someone kindly enlighten me? ^^


@akuhak @TnA [?]
 
Not quite sure what are you asking exactly. Do you want to know what exactly is occupied by HDL installed game in its APA partitions? Then hdl-dump hdl_toc command will show you game actual sizes
 
My question is to how determine the real size of a game. In example how hdldump know what is the real size of disc image i.e for extraction from PS2 HDD (as size inside fs space of apa partition must fit to 128MiB rounding)? Does such information is somewhere written in apa "header" (if yes, then where exactly and in what format? I cannot figure it out myslef)? Because normally if I would want to copy game back i.e by hex editor, I will end with disc image rounded, but apps and toolkits which extracting them, extracting it with proper size.
 
The usual PS2 ISOs has a lot of blank space (not used or verified), so you can write the real size (at let's say 0xE000) when installing and then make some app to check it. Once extracting the ISO, just blank that part and done.

I don't know the exact real answer, that above is an out of the box idea.
 
Last edited:
Back
Top