IsoBuster file extraction issue

Anything relating to CD-i can be discussed in this forum. From the multiple hardware iterations of the system to the sofware including games, reference, music and Video CDs. Maybe you hold an interest in Philips Media and the many development houses set up to cater for CD-i if so then this is the forum.
Post Reply
User avatar
Shikotei
Burn:Cycle Activated
Posts: 23
Joined: Mon Mar 01, 2010 5:01 pm
Location: Netherlands

IsoBuster file extraction issue

Post by Shikotei » Wed Sep 13, 2017 3:09 pm

For lack of a better place, I'm putting this here.

From this thread:
Shikotei wrote:
Thu Aug 31, 2017 1:41 pm
On a side note:
I find myself using IsoBuster's "Extract RAW" more and more often for data files. The 'normal' extraction process does not output the whole file.. usually there's half a sector worth of data lost at the end.
Not that much of a loss when it ends with NULLs (0x00), but when it still has data I want that data!
Even made my own 'extract data from sector' function. Still, it's annoying.
Followed by a bit of a discussion that ends in:
cdifan wrote:
Mon Sep 04, 2017 4:49 pm
The author has a forum account here; you could try reporting the bug to him. Do you have specific names of files that go wrong?
An additional check box "Extract only data sectors" or something could also be nice! :-)
IsoBuster extract analysis:
Okay, so I'll just pick a random file from the Family Game II image file.
The file: "RTF/ROOM/Siesta.rtf"

The file starts at LBA 83108, the next file starts at LBA 83155. This means that the file is (83108-83155) 47 sectors long.
IsoBuster calculates the file is 96256 bytes long. Simple math tells me that's (96256/47) 2048 bytes per sector.
As it happens, when I use 'Extract file' the resulting file is NOT 96256 bytes, but 109052.
The 'Extract RAW' gives me a file that's 110554 bytes (47*2352) long. Exactly as expected.
My 'Extract data from RAW' function is (basically) as follows:

Code: Select all

if(isForm1)
{
    //skip header(24) and error correction (256)
    write sectorData[25..2072]
}
elseif(isForm2)
{
    //skip header(24) and quality control (4)
    write sectorData[25..2348]
}
My sector analyzer also notes that all 47 sectors are Form2 Video. So I expect a file that's (47*2324) 109228 bytes in size. And it is.
If I HEX-compare the two files (IsoBuster's 'Extract file' and my 'Extract data from RAW') they are equal in content, but not in length.
My file is longer. If I were to delete the extra bytes at the end to match IsoBuster's file, they are exactly the same.
The missing data is part of a video sector.
For full info: the 47 video sectors contain a single DYUV image of 384x280 pixels. The missing data is the trailing NULL-data, not part of the data required to decode the image.

IsoBuster misses the last (109228-109052) 176 bytes.
Because 176/47 is not an integer number and the content of both files are equal my conclusion is that IsoBuster simply misses the last bytes of the last sector of the file.
So what is 176/2352? It's 7.4829931972789115646258503401361%... gibberish. 176/2324 is nonsensical too.

New case: all sector types (Data,Audio,Video,Empty).
The file: "RTF/ROOM/Intro1.rtf"
28 data sectors, 362 audio, 839 F2 video sectors, 344 empty sectors.
My file: 28*2048 + 362*2324 + 839*2324 + 344*2324 = 3647924 bytes
IsoBuster's file: 3647188 bytes (322504 expected)
Once again: same content, but different length.
My file is longer by (3647924 - 3647188) 736 bytes.
This time the missing data is part of an audio sector. The start of this sector is present, but partially through the SD of SG 12 the file ends.

New case: audio and empty sectors.
The file: "RTF/ROOM/fired.rtf"
39 audio sectors, 117 empty sectors.
My file: 39*2324 + 117*2324 = 362544
IsoBuster: 362160 bytes (319488 expected)
My file is longer by 384 bytes, part of an empty sector.

Conclusion?
None of the hand-extracted data files were the same length as the IsoBuster file.
IsoBuster always has a file that is too short.
The 'Extract file' does extract the file's content properly, just does not calculate the length correctly.
'Extract RAW' works without a flaw.

Now to poke IsoBuster, the creator of IsoBuster and get some feedback on this.

User avatar
IsoBuster
Burn:Cycle Activated
Posts: 6
Joined: Fri Oct 21, 2005 2:09 pm
Contact:

Re: IsoBuster file extraction issue

Post by IsoBuster » Sun Oct 22, 2017 4:36 pm

I could not access the forum while this topic was still 'warm' but now that I can I won't put too much time in this anymore (unless requested) and just say that this issue is resolved and the fix will be in next version (IsoBuster 4.1).
Prod me meanwhile if you need a link to a temp version.

Post Reply