From 602599c5c28a6166ff79c6b21a62301b6067303b Mon Sep 17 00:00:00 2001 From: gigaherz Date: Wed, 15 Jul 2009 16:54:09 +0000 Subject: [PATCH] Fixed broken blockdumping in last change. Added the possibility for plugins supporting getBuffer2 to return -2, meaning "still busy". git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1518 96395faa-99c1-11dd-bbfe-3dabce05a288 --- pcsx2/CDVD/CDVD.cpp | 8 +++++++- pcsx2/CDVD/CDVDaccess.cpp | 2 ++ pcsx2/Plugins.cpp | 8 ++++++-- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/pcsx2/CDVD/CDVD.cpp b/pcsx2/CDVD/CDVD.cpp index 0331bd2745..a1dd577c1e 100644 --- a/pcsx2/CDVD/CDVD.cpp +++ b/pcsx2/CDVD/CDVD.cpp @@ -720,7 +720,7 @@ __forceinline void cdvdReadInterrupt() else cdr.pTransfer = NULL; - if (cdr.RErr < 0) + if (cdr.RErr == -1) { cdvd.RetryCntP++; Console::Error("CDVD READ ERROR, sector=%d", params cdvd.Sector); @@ -732,6 +732,12 @@ __forceinline void cdvdReadInterrupt() return; } } + else if(cdr.RErr == -2) + { + // not finished yet ... give it a bit more time + CDVDREAD_INT(cdvd.ReadTime); + return; + } cdvd.Reading = false; } diff --git a/pcsx2/CDVD/CDVDaccess.cpp b/pcsx2/CDVD/CDVDaccess.cpp index d86bbfb871..6668a91a05 100644 --- a/pcsx2/CDVD/CDVDaccess.cpp +++ b/pcsx2/CDVD/CDVDaccess.cpp @@ -357,6 +357,8 @@ s32 DoCDVDreadTrack(u32 lsn, int mode) break; } + DevCon::Notice("CDVD readTrack(lsn=%d,mode=%d)",params lsn, lastReadSize); + return CDVD.readTrack(lsn,mode); } diff --git a/pcsx2/Plugins.cpp b/pcsx2/Plugins.cpp index 0c9d766951..d28db007ec 100644 --- a/pcsx2/Plugins.cpp +++ b/pcsx2/Plugins.cpp @@ -843,7 +843,7 @@ bool OpenCDVD(const char* pTitleFilename) //First, we need the data. CDVD.newDiskCB(cdvdNewDiskCB); - if (CDVD.open(pTitleFilename) != 0) + if (DoCDVDopen(pTitleFilename) != 0) { if (g_Startup.BootMode != BootMode_Elf) { @@ -1012,7 +1012,11 @@ void ClosePlugins( bool closegs ) } } - CLOSE_PLUGIN2( CDVD ); + if( OpenStatus.CDVD ) + { + DoCDVDclose(); + OpenStatus.CDVD=false; + } CLOSE_PLUGIN( DEV9 ); CLOSE_PLUGIN( USB );