From 3b0f524417144496930d596aa15e6eb9970bbff6 Mon Sep 17 00:00:00 2001 From: gigaherz Date: Sat, 7 Nov 2009 19:28:47 +0000 Subject: [PATCH] Seems when I made the internal iso reader I changed some code that shouldn't have been changed. This should make dual layer stuff work "as well" as in cdvdiso. git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2151 96395faa-99c1-11dd-bbfe-3dabce05a288 --- pcsx2/CDVD/CDVDisoReader.cpp | 10 ++++++---- plugins/CDVDiso/src/CDVDisop.cpp | 6 +++++- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/pcsx2/CDVD/CDVDisoReader.cpp b/pcsx2/CDVD/CDVDisoReader.cpp index 8349926e18..a5ba6989e2 100644 --- a/pcsx2/CDVD/CDVDisoReader.cpp +++ b/pcsx2/CDVD/CDVDisoReader.cpp @@ -33,6 +33,8 @@ static isoFile *iso = NULL; static int psize, cdtype; +static s32 layer1start = -1; + void CALLBACK ISOclose() { isoClose(iso); @@ -69,6 +71,8 @@ s32 CALLBACK ISOopen(const char* pTitle) break; } + layer1start = -1; + return 0; } @@ -118,8 +122,6 @@ s32 CALLBACK ISOgetTD(u8 Track, cdvdTD *Buffer) return 0; } -static s32 layer1start = -1; - static void FindLayer1Start() { if ((layer1start == -1) && iso->blocks >= 2295104) @@ -130,9 +132,9 @@ static void FindLayer1Start() Console.WriteLn("CDVDiso: searching for layer1..."); //tempbuffer = (u8*)malloc(CD_FRAMESIZE_RAW); - for (layer1start = (iso->blocks / 2 - 0x10) & ~0xf; layer1start < 0x200010; layer1start += 16) + for (layer1start = (iso->blocks / 2 - 0x10) & ~0xf; layer1start < 0x210010; layer1start += 16) { - isoReadBlock(iso, tempbuffer+off, layer1start); + isoReadBlock(iso, tempbuffer, layer1start); // CD001 if ((tempbuffer[off+1] == 0x43) && (tempbuffer[off+2] == 0x44) && diff --git a/plugins/CDVDiso/src/CDVDisop.cpp b/plugins/CDVDiso/src/CDVDisop.cpp index 96c16b75ce..40ebb72161 100755 --- a/plugins/CDVDiso/src/CDVDisop.cpp +++ b/plugins/CDVDiso/src/CDVDisop.cpp @@ -322,7 +322,11 @@ EXPORT_C_(s32) CDVDgetTOC(void* toc) { isoReadBlock(iso, tempbuffer, layer1start); // CD001 - if (tempbuffer[off+1] == 0x43 && tempbuffer[off+2] == 0x44 && tempbuffer[off+3] == 0x30 && tempbuffer[off+4] == 0x30 && tempbuffer[off+5] == 0x31) + if (tempbuffer[off+1] == 0x43 && + tempbuffer[off+2] == 0x44 && + tempbuffer[off+3] == 0x30 && + tempbuffer[off+4] == 0x30 && + tempbuffer[off+5] == 0x31) break; } free(tempbuffer);