null wrote: October 21st, 2022, 1:54 am
.ISZ is made by UltraISO EZB Systems. They also put the file format specification TXT in their website.
Good to know.
Hmmm, UltraISO? I guess that's crap (going by the corrupted audio test files that you had made with UltraISO).
But they have documentation! That's more thoughful than the CHD approach with "design the file format by fiddling around in source code".
Looking through the ISZ TXT file... it doesn't mention filtering out ECC or Error Correction. Oh, and there is this sentence "('sect_size' is always 2048 for ISO CD/DVD images)". Apparently it can't filter out the ECC info because it doesn't even support sectors with ECC info.
null wrote: October 17th, 2022, 6:23 pm
CHD list with default hunksize
That will be very useful to compare the filesizes. Ah, what about the DIR listing with just filenames and filesizes?
I could write a parser for extracting that info from your lists, but it might be unneccessary extra work if you can just type DIR on your computer.
null wrote: October 17th, 2022, 6:23 pm
Rest Home by Paradox
Thanks! That has those 920h-byte sectors. Oh, I seem to have screwed up support for such 920h-byte CUE/BIN files when "improving" my PREGAP support last week. Okay, fixed that, it's working again.
The Rest Home demo seems to have real error correction (better than the Deathball demo). But there's also one weird bug: Rest Home has the Licence.txt and Logo.tmd sectors stored on A40h-byte (!!!) boundaries (instead of the 920h-byte sector boundaries).
The decompressed CHD sectors are always 990h bytes tall. So the interesting part is where are the 920h bytes stored in that 990h byte region. Which is.. apparently so:
Code: Select all
000h..91Fh 920h-byte Sector Data
920h..98Fh 70h-byte Zerofilled
Uhm, that info isn't helpful, because the 60h-byte Subchannel data could be stored anywhere in the 70h-byte Zerofilled area.
Time to wonder about how to create CHD files with Subchannel data.
My first thought was that CHDMAN would presumably support "File.CUE" bundled with "File.SUB".
No, apparently not.
I am not aware of any official or inoffical ways to specify Subchannel data in CUE files. Or does that exist?
Anyways, that weird TOC/BIN format did support Subchannel data, so we seem to be back at CHDMAN enforcing TOC/BIN format. That's crazy... but there's a gbatemp thread that confirms that one must write a tool that converts CCD/IMG/SUB to TOC/BIN in order to create CHD files with subchannels.
Okay, I don't have CloneCD, and the required test case would be 60h-byte subchannel with
less than 930h-byte sector data (and I doubt that CloneCD could create that combination)... so I've written my own tool for creating TOC/BIN test images.
The attached CLAYS.ZIP contains:
Code: Select all
CLAYS.CUE and CLAYS.ISO - old homebrew PSX game
CLAYS_*.TOC - TOC files for different sector sizes
CLAYS.EXE - tool for converting CLAYS.ISO to different .BIN files (for use with above .TOC files)
CLAYS.ASM - source code for CLAYS.EXE
CLAY.BAT - sample batch for converting the TOC/BIN files to CHD with different CHDMAN versions
CHDMAN lets me test v0.145 and older on my PC. The resulting CHD filesizes are:
Code: Select all
331,470 bytes 20.10.22 17.43 clays_mode1_800h_chdman_v0.145.chd
331,476 bytes 20.10.22 17.43 clays_mode2_800h_chdman_v0.145.chd
336,811 bytes 20.10.22 17.43 clays_mode2_860h_chdman_v0.145.chd
467,281 bytes 20.10.22 17.43 clays_mode2_920h_chdman_v0.145.chd
469,346 bytes 20.10.22 17.43 clays_mode2_930h_chdman_v0.145.chd
471,779 bytes 20.10.22 17.43 clays_mode2_980h_chdman_v0.145.chd
473,474 bytes 20.10.22 17.43 clays_mode2_990h_chdman_v0.145.chd
There, one can neatly see that old CHD versions are reaching worst-case compression ratios for BIN files with sectors bigger than 860h bytes (due to the missing ECC-filter).
And, looking into where the subchannel data is stored in the decompressed 990h-byte area:
Code: Select all
For 980h-byte sectors:
000h..91Fh 920h-byte Sector Data
920h..97Fh 60h-byte Subchannel Data
980h..98Fh 10h-byte Zerofilled
And for 860h-byte sectors:
000h..7FFh 800h-byte Sector Data
800h..85Fh 60h-byte Subchannel Data
860h..98Fh 130h-byte Zerofilled
That isn't directly problematic for old V3/V4 versions. But I suspect that V5 is still using the same data arrangement (whilst simultanously trying to split it into separate 930h + 60h sections and trying to ECC-filter the 930h byte section).
What's needed now...
Please get attached CLAYS.ZIP file, and paste the commands below to windows 64bit command prompt:
Code: Select all
REM below will convert clays.iso to clays_*.bin with different sector sizes
clays.exe
REM below v0.247 does REQUIRE WINDOWS 64bit
chdman_v0.247.exe createcd -i clays_mode1_800h.toc -o clays_mode1_800h_chdman_v0.247.chd
chdman_v0.247.exe createcd -i clays_mode2_800h.toc -o clays_mode2_800h_chdman_v0.247.chd
chdman_v0.247.exe createcd -i clays_mode2_860h.toc -o clays_mode2_860h_chdman_v0.247.chd
chdman_v0.247.exe createcd -i clays_mode2_920h.toc -o clays_mode2_920h_chdman_v0.247.chd
chdman_v0.247.exe createcd -i clays_mode2_930h.toc -o clays_mode2_930h_chdman_v0.247.chd
chdman_v0.247.exe createcd -i clays_mode2_980h.toc -o clays_mode2_980h_chdman_v0.247.chd
chdman_v0.247.exe createcd -i clays_mode2_990h.toc -o clays_mode2_990h_chdman_v0.247.chd
Of course, first rename "chdman.exe" to "chdman_v0.247.exe" (or rename above commands instead).
And upload the resulting seven CHD files, please!
I bet there will a "nasty surprise" for the compression ratio of the 920h and 980h byte files.
And probably some harmless but unintended quirks for the subchannel compression in 860h and 980h byte files.