Page 239 of 354

Re: DiscImageCreator

Posted: Thu Jan 23, 2020 12:30 am
by Nextria
F1ReB4LL wrote:
Nextria wrote:Hey i tried the link to the other build but it also not working.
What do you mean by not working? That particular build doesn't have a firmware checker.

Hello @F1ReB4LL, sorry you where right I downloaded the wrong version.

Re: DiscImageCreator

Posted: Thu Jan 23, 2020 10:01 pm
by sarami
antimatter wrote:New _subinfo.txt log:
Weird... 11 sectors (-1, 5000, 6404, 7373, 7613, 9628, 9986, 10837, 12164, 14344, 14419) have correct RMSF and AMSF. Is this other securom version? I don't know.
The mode of the last 4th sector is changed. If this disc is securom, it's correct.

Code: Select all

LBA[334159, 0x5194f], MSF[74:17:34], mode 1
LBA[334160, 0x51950], MSF[74:17:35], mode 1
LBA[334161, 0x51951], MSF[74:17:36], mode 2 form 1, SubHeader[1](IsInterleaved[00]), [2](ChannelNum[00]), [3](SubMode[00]), Form 1, [4](CodingInfo[00])
LBA[334162, 0x51952], MSF[74:17:37], mode 1
LBA[334163, 0x51953], MSF[74:17:38], mode 1
LBA[334164, 0x51954], MSF[74:17:39], mode 1

Re: DiscImageCreator

Posted: Fri Jan 24, 2020 7:14 am
by sarami
http://www.mediafire.com/file/eq80y20l9 … st.7z/file
- added: If valid extension was omitted, ".bin" is set to path automatically.

Re: DiscImageCreator

Posted: Fri Jan 24, 2020 5:24 pm
by superg
Totally unrelated thing to dots in the path Image.

Some PSX discs have corrupted directory entries and that prevents DIC from proceeding further to the dump.
It just hangs on "Reading DirectoryRecord". I recently got "All Star Racing 2 (Europe)" disc and that was problematic to dump.
Based on my findings here (I wrote a tool) here is the list of PSX titles which have corrupted directory entries:

Code: Select all

Aitakute... - Your Smiles in My Heart (Japan) (Disc 1) (Track 1).bin
Aitakute... - Your Smiles in My Heart (Japan) (Disc 2) (Track 1).bin
Aitakute... - Your Smiles in My Heart (Japan) (Disc 3) (Track 1).bin
Aitakute... - Your Smiles in My Heart (Japan) (Disc 4) (Track 1).bin
Aitakute... - Your Smiles in My Heart - Oroshitate no Diary - Introduction Disc (Japan) (Track 1).bin
All Star Racing 2 (Europe) (Track 1).bin
All Star Racing 2 (USA) (Track 1).bin
Formula GP (Europe) (Track 1).bin
MLB 2005 (USA).bin
Strike Force Hydra (Europe) (Track 1).bin
Tokimeki Memorial - Forever with You (Japan) (PlayStation the Best) (Track 1).bin
Tokimeki Memorial - Forever with You (Japan) (Rev 2) (Track 1).bin
Tokimeki Memorial - Forever with You (Japan) (Rev 4) (Track 1).bin
Truck Racing (Europe) (Track 1).bin
A tricky but IMO a good way to validate directory entry is to compare little endian offset and data_length to it's big endian counterpart.

Code: Select all

// iso9660 definitions
struct uint64_lsb_msb
{
    uint32_t lsb;
    uint32_t msb;
};
struct DirectoryRecord
{
    uint8_t length;
    uint8_t xa_length;
    uint64_lsb_msb offset;
    uint64_lsb_msb data_length;
    struct RecordingDateTime
    {
        uint8_t year;
        uint8_t month;
        uint8_t day;
        uint8_t hour;
        uint8_t minute;
        uint8_t second;
        uint8_t gmt_offset;
    } recording_date_time;
    uint8_t file_flags;
    uint8_t file_unit_size;
    uint8_t interleave_gap_size;
    uint32_t volume_sequence_number;
    uint8_t file_identifier_length;
};

// check
DirectoryRecord &dr = *(iso9660::DirectoryRecord *)&buffer[i];
if(dr.offset.lsb != endian_swap(dr.offset.msb) || dr.data_length.lsb != endian_swap(dr.data_length.msb))
    // invalid record, skip the sector
    ;
How I did it in your codebase execScsiCmdforFileSystem.cpp snippet:

Code: Select all

BOOL DirectoryRecordValid(
    LPBYTE lpDirRec
) {
    // check if stored LSB data is the same as MSB data
    return lpDirRec[ 2] == lpDirRec[ 9] && lpDirRec[ 3] == lpDirRec[ 8] && lpDirRec[ 4] == lpDirRec[ 7] && lpDirRec[ 5] == lpDirRec[ 6] && // offset
           lpDirRec[10] == lpDirRec[17] && lpDirRec[11] == lpDirRec[16] && lpDirRec[12] == lpDirRec[15] && lpDirRec[13] == lpDirRec[14];   // data length
}

BOOL ReadDirectoryRecordDetail(
    PEXEC_TYPE pExecType,
    PEXT_ARG pExtArg,
    PDEVICE pDevice,
    PDISC pDisc,
    LPBYTE pCdb,
    INT nLBA,
    LPBYTE lpBuf,
    LPBYTE bufDec,
    BYTE byTransferLen,
    INT nDirPosNum,
    UINT uiLogicalBlkCoef,
    INT nOffset,
    PDIRECTORY_RECORD pDirRec
) {
    if (!ExecReadDisc(pExecType, pExtArg, pDevice, pDisc
        , pCdb, nLBA + nOffset, lpBuf, bufDec, byTransferLen, _T(__FUNCTION__), __LINE__)) {
        return FALSE;
    }
    BYTE byRoop = byTransferLen;
    if (*pExecType == gd) {
        byRoop = (BYTE)(byRoop - 1);
    }
    for (BYTE i = 0; i < byRoop; i++) {
        OutputCDMain(fileMainInfo, lpBuf + DISC_RAW_READ_SIZE * i, nLBA + i, DISC_RAW_READ_SIZE);
    }

    UINT uiOfs = 0;
    for (INT nSectorNum = 0; nSectorNum < byRoop;) {
        if (*(lpBuf + uiOfs) == 0) {
            break;
        }
        OutputVolDescLogA(
            OUTPUT_DHYPHEN_PLUS_STR_WITH_LBA_F(Directory Record), nLBA + nSectorNum, nLBA + nSectorNum);
        for (;;) {
            CHAR szCurDirName[MAX_FNAME_FOR_VOLUME] = {};
            LPBYTE lpDirRec = lpBuf + uiOfs;
            if (lpDirRec[0] >= MIN_LEN_DR) {
                if (!DirectoryRecordValid(lpDirRec) || (lpDirRec[0] == MIN_LEN_DR && uiOfs > 0 && uiOfs % DISC_RAW_READ_SIZE == 0)) {
                    // SimCity 3000 (USA)
                    OutputVolDescLogA(
                        "Direcory record size of the %d sector maybe incorrect. Skip the reading of this sector\n", nLBA);
                    nSectorNum++;
                    break;
                }
I didn't want to mix it in with the dot fixes before you approve the pull request so here it is if you think it's useful.

Re: DiscImageCreator

Posted: Sat Jan 25, 2020 12:16 am
by sarami
superg wrote:Some PSX discs have corrupted directory entries
Can you upload LBA 16 of these discs?
superg wrote:I didn't want to mix it in with the dot fixes
Does it still need? I added that If the valid extension was omitted, ".bin" is set to path automatically in the latest test version.

Re: DiscImageCreator

Posted: Sat Jan 25, 2020 10:09 am
by superg
sarami wrote:Can you upload LBA 16 of these discs?
Here you go:
https://www.dropbox.com/s/bhvp3xudv66qg8i/lba16.7z?dl=0
sarami wrote:Does it still need? I added that If the valid extension was omitted, ".bin" is set to path automatically in the latest test version.
Not neccessarily, if it all works and you think it's good enough that's totally fine. I just don't like leaving things halfway done so I fixed it in splitPath.

Re: DiscImageCreator

Posted: Sat Jan 25, 2020 6:07 pm
by Resistiv
When processing CDs with differing subchannel indexes, DIC splits the subs indexes CUE across multiple files matching the track names and doesn't fill the main subs indexes CUE. See attached logs: https://mega.nz/#!xRAzFAoK!6l9w3Ja5IAH5 … at4t5oXIN0

Re: DiscImageCreator

Posted: Sat Jan 25, 2020 6:53 pm
by sarami
Resistiv wrote:When processing CDs with differing subchannel indexes, DIC splits the subs indexes CUE across multiple files matching the track names and doesn't fill the main subs indexes CUE. See attached logs: https://mega.nz/#!xRAzFAoK!6l9w3Ja5IAH5 … at4t5oXIN0
Ah yes. This was fixed by 20200123 test version.
If F1ReB4LL says /viewtopic.php?p=25581#p25581 and /viewtopic.php?p=25589#p25589 were fixed correctly, I'll upload the latest test version as release.

Re: DiscImageCreator

Posted: Mon Jan 27, 2020 8:53 am
by sarami
superg wrote:Aitakute... - Your Smiles in My Heart (Japan) (Disc 1) (Track 1).bin
Aitakute... - Your Smiles in My Heart (Japan) (Disc 2) (Track 1).bin
Aitakute... - Your Smiles in My Heart (Japan) (Disc 3) (Track 1).bin
Aitakute... - Your Smiles in My Heart (Japan) (Disc 4) (Track 1).bin
Aitakute... - Your Smiles in My Heart - Oroshitate no Diary - Introduction Disc (Japan) (Track 1).bin
All Star Racing 2 (Europe) (Track 1).bin
All Star Racing 2 (USA) (Track 1).bin
Formula GP (Europe) (Track 1).bin
MLB 2005 (USA).bin
Strike Force Hydra (Europe) (Track 1).bin
Tokimeki Memorial - Forever with You (Japan) (PlayStation the Best) (Track 1).bin
Tokimeki Memorial - Forever with You (Japan) (Rev 2) (Track 1).bin
Tokimeki Memorial - Forever with You (Japan) (Rev 4) (Track 1).bin
Truck Racing (Europe) (Track 1).bin
I got tokimemo rev4 and confirmed a corrupt directory record in LBA 14515. Also, can you upload all logs of these discs you reported except for tokimemo rev4.

Re: DiscImageCreator

Posted: Mon Jan 27, 2020 9:06 am
by superg
sarami wrote:I got tokimemo rev4 and confirmed a corrupt directory record in LBA 14515. Also, can you upload all logs of these discs you reported except for tokimemo rev4.
All Star Racing 2 (Europe): https://www.dropbox.com/s/r2secinhnagzg … 29.7z?dl=0
I didn't dump the other stuff but I wrote a tool which detects invalid directory entries in the image file so the list came from it. I also checked it with IsoBuster and it's reporting errors for all these files.