Page 117 of 354

Re: DiscImageCreator

Posted: Sun Dec 10, 2017 6:36 am
by sarami
All sectors.

Code: Select all

It's really weird...
c2 error offset is perhaps same as main channel offset. To confirm this, it needs to test by the large offset disc (over 588 samples) and its disc has c2 error.

Re: DiscImageCreator

Posted: Sun Dec 10, 2017 7:36 am
by jhmiller
I have tried to dump a Dreamcast game with this new release of DIC.

First load the audio trap disc.
Stop the drive and change the audio trap disc for the Dreamcast game.

With my Plextor PX-755A the DIC seems to freeze here (I stop the process after 1 hour or waiting):
D:\Sistemas\Dreamcast\DIC\Release_ANSI>DiscImageCreator.exe gd p T-1250M\T-1250M.bin 8 /c2 /q
AppVersion
        x86, AnsiBuild, Dec 10 2017 17:54:51
/c2 val1 is omitted. set [4000]
/c2 val2 is omitted. set [0]
CurrentDirectory
        D:\Sistemas\Dreamcast\DIC\Release_ANSI
WorkingPath
         Argument: T-1250M\T-1250M.bin
         FullPath: D:\Sistemas\Dreamcast\DIC\Release_ANSI\T-1250M\T-1250M
            Drive: D:
        Directory: \Sistemas\Dreamcast\DIC\Release_ANSI\T-1250M\
         Filename: T-1250M
        Extension: .bin
Start time: 2017-12-10(Sun) 12:23:15
Set the drive speed: 1411KB/sec
This drive supports [OpCode: 0xd8, SubCode: 1]
This drive supports [OpCode: 0xd8, SubCode: 2]
This drive supports [OpCode: 0xd8, SubCode: 8]
Checking SubQ adr (Track)  1/ 1
Checking SubRtoW (Track)  1/ 1
LBA[045000, 0x0afc8]: [F:ExecReadGD][L:1252]
        Opcode: 0xbe
        ScsiStatus: 0x02 = CHECK_CONDITION
        SenseData Key-Asc-Ascq: 03-02-8d = MEDIUM_ERROR - VENDER UNIQUE ERROR
lpCmd: be, 04, 00, 00, af, c8, 00, 00, 01, f8, 00, 00
dwBufSize: 2352
Retry 1/10 after 10000 milliseconds
Reading DirectoryRecord    8/   8
Set OpCode: 0xd8, SubCode: 8(Raw)


With the unit TS-H353A only get errors.

Re: DiscImageCreator

Posted: Sun Dec 10, 2017 6:36 pm
by ajshell1
I've noticed a problem with DIC.

I recently got a copy of Madden 2005 Collector's Edition https://redump.info/disc/20599/

This is a dual-layer disc.

However, DIC doesn't recognize this, and only dumps one layer.

This isn't a problem with the disc, as Isobuster can extract an .iso that matches the database.

I've tried it with my TSST TS-H353B and my ASUS BW-12B1ST a, with identical results.

Re: DiscImageCreator

Posted: Wed Dec 13, 2017 10:07 pm
by sarami
ajshell1 wrote:I've noticed a problem with DIC.
Please log. Does this occur in all your DL discs or only this disc? I tried my DL disc but dic could recognize the second layer.

Re: DiscImageCreator

Posted: Thu Dec 14, 2017 9:41 am
by ajshell1
sarami wrote:
ajshell1 wrote:I've noticed a problem with DIC.
Please log. Does this occur in all your DL discs or only this disc? I tried my DL disc but dic could recognize the second layer.
The logs for the game in question are included in this link (plus some other games)

https://mega.nz/#!q0AHkZbb!V5rOwzZSe4pH … rz-ic_I-ec

I've dumped Xenosaga 1 with DIC before, and it dumped just fine. So I don't know what the issue is.

Re: DiscImageCreator

Posted: Thu Dec 14, 2017 10:54 am
by sarami
My DL disc

Code: Select all

             TrackPath: Opposite Track Path
        NumberOfLayers: Double Layer
          TrackDensity: 0.74μm/track
         LinearDensity: 0.293μm/bit
    StartingDataSector:  196608 (0x30000)
         EndDataSector: 15995449 (0xf41239)
    EndLayerZeroSector: 2224591 (0x21f1cf)
Your log

Code: Select all

                 TrackPath: Parallel Track Path
            NumberOfLayers: Double Layer
              TrackDensity: 0.74μm/track
             LinearDensity: 0.293μm/bit
        StartingDataSector:   196608 (0x30000)
             EndDataSector:  1702255 (0x19f96f)
        EndLayerZeroSector:        0 (0)
I had thought all of the DL disc is 'Opposite Track Path', but this DL disc has 'Parallel Track Path'. I understood DIC can't dump 'PTP' and 'DL' disc. I don't know how to fix this now.

jhmiller wrote:With my Plextor PX-755A the DIC seems to freeze here (I stop the process after 1 hour or waiting):
Some changed. http://www.mediafire.com/file/eq80y20l9 … or_test.7z
I have PX-755SA too, but my 755 can't get the scrambled sector when dumps the HDA of GD-ROM using the audio trap disc, so I can't test. (In the case of my PC, if doesn't use the audio trap disc, dic can dump the HDA till 79:59:74. I don't know why.)

And I changed VS2015 to VS2017. Please download and install the redistributable package. https://aka.ms/vs/15/release/VC_redist.x86.exe

Re: DiscImageCreator

Posted: Thu Dec 14, 2017 11:13 am
by reentrant
Here's a function in one of my old tools for reading DVD TOC:

Code: Select all

DWORD Device::readDVDTOC(DiscInfo & discInfo) {
    typedef struct DVD_SESSION_INFO {
        DVD_DESCRIPTOR_HEADER h;
        DVD_LAYER_DESCRIPTOR d;
    } DVD_SESSION_INFO;

    MMCCdb cdb;
    RtlZeroMemory(&cdb, sizeof(MMCCdb));

    CDIO_MMC_SET_COMMAND(cdb.field, CDIO_MMC_GPCMD_READ_DVD_STRUCTURE);

    cdb.field[6] = 0; // Layer 0
    cdb.field[9] = sizeof(DVD_SESSION_INFO);

    DVD_SESSION_INFO dvdSessionInfo;
    RtlZeroMemory(&dvdSessionInfo, sizeof(dvdSessionInfo));

    DWORD retVal = runMMCCommand(&cdb, getMMCCommandLen(cdb.field[0]), (PUCHAR)&dvdSessionInfo, sizeof(dvdSessionInfo), SCSI_MMC_DATA_READ);
    if (!retVal) {
        ULONG layerZeroStartLsn = Utils::swapBytesUlong(dvdSessionInfo.d.StartingDataSector);
        ULONG discLenLsn = 0;

        if (dvdSessionInfo.d.NumberOfLayers) {
            if (dvdSessionInfo.d.TrackPath == 1) {
                // Opposite Track Path - Single Lead-In / Out (the same information is returned for all layers)
            }
            else {
                // Parallel Track Path - Dual Lead-In / Out
            }

            ULONG layerZeroLsnEnd = Utils::swapBytesUlong(dvdSessionInfo.d.EndLayerZeroSector);
            if (!layerZeroLsnEnd) {
                DEBUGPRINTWE(L"Unsupported DL DVD Disc found!\n");

                return ERROR_UNSUPPORTED_TYPE;
            }
            
            ULONG layerZeroLsnLen = layerZeroLsnEnd - layerZeroStartLsn + 1;

            ULONG layerOneLsnEnd = Utils::swapBytesUlong(~dvdSessionInfo.d.EndDataSector) & 0xFFFFFF;
            ULONG layerOneLsnLen = layerZeroLsnEnd - layerOneLsnEnd + 1;

            discLenLsn = layerZeroLsnLen + layerOneLsnLen;
        }
        else {
            ULONG endDataLsn = Utils::swapBytesUlong(dvdSessionInfo.d.EndDataSector);

            discLenLsn = endDataLsn - layerZeroStartLsn + 1;
        }

        if (!retVal) {
            SessionInfo sessionInfo;
            sessionInfo.firstTrackNo = 1;
            sessionInfo.lastTrackNo = 1;

            sessionInfo.sessionStartLsn = 0;
            sessionInfo.sessionEndLsn = discLenLsn;

            sessionInfo.sessionStartMSF = 0;
            sessionInfo.sessionEndMSF = discLenLsn;

            if (dvdSessionInfo.d.NumberOfLayers) {
                discInfo.dualLayerDVD = TRUE;
            }

            TrackInfo trackInfo;
            trackInfo.indexNo = 1;
            trackInfo.trackNo = 1;
            trackInfo.trackAdr = 0;
            trackInfo.startAddress = 0;
            trackInfo.endAddress = discLenLsn;
            trackInfo.trackFormat = DATA_MODE_FORMAT_MODE1;

            sessionInfo.tracksSub.push_back(trackInfo);

            discInfo.discToc[1] = sessionInfo;
            discInfo.hasPvd = TRUE;
        }
    }
    else {
        retVal = Helpers::printSystemMessage(__FILE__, __LINE__, retVal);
    }

    return retVal;
    
    /*DWORD bytesReturned = 0;
    DWORD retVal = 0;

    DVD_READ_STRUCTURE dvdReadStructure;
    dvdReadStructure.BlockByteOffset.QuadPart = 0;
    dvdReadStructure.SessionId = 0;
    dvdReadStructure.Format = DvdPhysicalDescriptor;
    dvdReadStructure.LayerNumber = 0;

    typedef struct DVD_SESSION_INFO {
        DVD_DESCRIPTOR_HEADER h;
        DVD_LAYER_DESCRIPTOR d;
    } DVD_SESSION_INFO;

    DVD_SESSION_INFO dvdSessionInfo;
    RtlZeroMemory(&dvdSessionInfo, sizeof(dvdSessionInfo));

    if (DeviceIoControl(iDeviceHandle, IOCTL_DVD_READ_STRUCTURE, &dvdReadStructure, sizeof(DVD_READ_STRUCTURE), &dvdSessionInfo, sizeof(dvdSessionInfo), &bytesReturned, NULL)) {
        ULONG endLayerZeroLsn = Utils::swapBytesUlong(dvdSessionInfo.d.EndLayerZeroSector);
        ULONG sectorStartLsn = Utils::swapBytesUlong(dvdSessionInfo.d.StartingDataSector);
        ULONG discLenLsn = endLayerZeroLsn - sectorStartLsn + 1;

        if (dvdSessionInfo.d.NumberOfLayers) {
            discLenLsn *= 2;
        }

        SessionInfo sessionInfo;
        sessionInfo.sessionStartLsn = sectorStartLsn;
        sessionInfo.sessionEndLsn = discLenLsn;

        discInfo.discToc[1] = sessionInfo;
    }
    else {
        retVal = Helpers::printSystemMessage(__FILE__, __LINE__);
    }

    return retVal;*/
}
cdb.field[6] = 0; // Layer 0 -> Maybe try 1 here?
dvdReadStructure.LayerNumber = 0; // Or 1 here?

What do you think? At least DIC should error out if such disc is encountered as no one wants wrong checksums in the DB.

Re: DiscImageCreator

Posted: Fri Dec 15, 2017 12:36 pm
by sarami
Supported PTP and DL disc.

Re: DiscImageCreator

Posted: Sat Dec 16, 2017 4:40 am
by reentrant
I tested the new version and there's one problem with ripping disc with uncorrectable C2 errors:

Need to reread sector: 260512 rereading times:   10/  10
bad all. need to reread more

After that DIC exits. Is it possible to continue execution even if there are C2 errors (I know the image will be bad but I'm aware of it)?

Is your C2 algorithm using C2 bits to select bytes which are good / bad and rereads until there are no C2 bits set (making use of C2 bits from previous rereads)?

Re: DiscImageCreator

Posted: Sat Dec 16, 2017 6:05 am
by sarami
reentrant wrote:Is it possible to continue execution even if there are C2 errors (I know the image will be bad but I'm aware of it)?
It's possible.
https://github.com/saramibreak/DiscImag … dforCD.cpp
Change the Line 1640:

Code: Select all

throw FALSE;
to

Code: Select all

break;
or comment out 'throw FALSE;'

But is it really uncorrectable errors? Please try the default times (4000).
reentrant wrote:Is your C2 algorithm using C2 bits to select bytes which are good / bad and rereads until there are no C2 bits set (making use of C2 bits from previous rereads)?
Yes. It's checked by the func 'ContainsC2Error' of the Line 1630.