More iso work. Timestamps work in Linux now (and use Paths.h). Worked on getting rid of other redundant code, moving the logging to the standard pcsx2 log functions, and misc cleanup.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1550 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
arcum42 2009-07-22 12:06:32 +00:00
parent 83b15dbac0
commit 6aacb2899c
8 changed files with 149 additions and 154 deletions

View File

@ -36,7 +36,7 @@
static int diskTypeCached=-1; static int diskTypeCached=-1;
int lastReadSize; int lastReadSize;
static int plsn=0; static int plsn=0; // This never gets set, so it's always 0.
static isoFile *blockDumpFile; static isoFile *blockDumpFile;
@ -62,15 +62,14 @@ int CheckDiskTypeFS(int baseType)
buffer[size]='\0'; buffer[size]='\0';
pos=strstr(buffer, "BOOT2"); pos = strstr(buffer, "BOOT2");
if (pos==NULL){ if (pos == NULL)
pos=strstr(buffer, "BOOT"); {
if (pos==NULL) { pos = strstr(buffer, "BOOT");
return CDVD_TYPE_ILLEGAL; if (pos == NULL) return CDVD_TYPE_ILLEGAL;
}
return CDVD_TYPE_PSCD; return CDVD_TYPE_PSCD;
} }
return (baseType==CDVD_TYPE_DETCTCD)?CDVD_TYPE_PS2CD:CDVD_TYPE_PS2DVD; return (baseType==CDVD_TYPE_DETCTCD) ? CDVD_TYPE_PS2CD : CDVD_TYPE_PS2DVD;
} }
if (IsoFS_findFile("PSX.EXE;1", &tocEntry) == TRUE) if (IsoFS_findFile("PSX.EXE;1", &tocEntry) == TRUE)
@ -90,8 +89,8 @@ static char bleh[2352];
int FindDiskType(int mType) int FindDiskType(int mType)
{ {
int dataTracks=0; int dataTracks = 0;
int audioTracks=0; int audioTracks = 0;
int iCDType = mType; int iCDType = mType;
@ -99,69 +98,71 @@ int FindDiskType(int mType)
CDVD.getTN(&tn); CDVD.getTN(&tn);
if(tn.strack != tn.etrack) // multitrack == CD. if (tn.strack != tn.etrack) // multitrack == CD.
{ {
iCDType = CDVD_TYPE_DETCTCD; iCDType = CDVD_TYPE_DETCTCD;
} }
else if(mType<0) else if (mType < 0)
{ {
cdvdTD td; cdvdTD td;
CDVD.getTD(0,&td); CDVD.getTD(0,&td);
if(td.lsn>452849) if (td.lsn > 452849)
{ {
iCDType = CDVD_TYPE_DETCTDVDS; iCDType = CDVD_TYPE_DETCTDVDS;
} }
else if(DoCDVDreadSector((u8*)bleh,16,CDVD_MODE_2048)==0) else if (DoCDVDreadSector((u8*)bleh,16,CDVD_MODE_2048) == 0)
{ {
struct cdVolDesc* volDesc=(struct cdVolDesc *)bleh; struct cdVolDesc* volDesc=(struct cdVolDesc *)bleh;
if(volDesc) if (volDesc)
{ {
if(volDesc->rootToc.tocSize==2048) iCDType = CDVD_TYPE_DETCTCD; if(volDesc->rootToc.tocSize==2048)
else iCDType = CDVD_TYPE_DETCTDVDS; iCDType = CDVD_TYPE_DETCTCD;
else
iCDType = CDVD_TYPE_DETCTDVDS;
} }
} }
} }
if(iCDType == CDVD_TYPE_DETCTDVDS) if (iCDType == CDVD_TYPE_DETCTDVDS)
{ {
s32 dlt=0; s32 dlt = 0;
u32 l1s=0; u32 l1s = 0;
if(CDVD.getDualInfo(&dlt,&l1s)==0) if(CDVD.getDualInfo(&dlt,&l1s)==0)
{ {
if(dlt>0) if (dlt > 0) iCDType = CDVD_TYPE_DETCTDVDD;
iCDType = CDVD_TYPE_DETCTDVDD;
} }
} }
switch(iCDType) switch(iCDType)
{ {
case CDVD_TYPE_DETCTCD: case CDVD_TYPE_DETCTCD:
Console::Status(" * CDVD Disk Open: CD, %d tracks (%d to %d):", params tn.etrack-tn.strack+1,tn.strack,tn.etrack); Console::Status(" * CDVD Disk Open: CD, %d tracks (%d to %d):", params tn.etrack-tn.strack+1,tn.strack,tn.etrack);
break; break;
case CDVD_TYPE_DETCTDVDS:
Console::Status(" * CDVD Disk Open: DVD, Single layer or unknown:");
break;
case CDVD_TYPE_DETCTDVDD:
Console::Status(" * CDVD Disk Open: DVD, Double layer:");
break;
case CDVD_TYPE_DETCTDVDS:
Console::Status(" * CDVD Disk Open: DVD, Single layer or unknown:");
break;
case CDVD_TYPE_DETCTDVDD:
Console::Status(" * CDVD Disk Open: DVD, Double layer:");
break;
} }
audioTracks=dataTracks=0; audioTracks = dataTracks = 0;
for(int i=tn.strack;i<=tn.etrack;i++) for(int i = tn.strack; i <= tn.etrack; i++)
{ {
cdvdTD td,td2; cdvdTD td,td2;
CDVD.getTD(i,&td); CDVD.getTD(i,&td);
if(tn.etrack>i) if (tn.etrack > i)
CDVD.getTD(i+1,&td2); CDVD.getTD(i+1,&td2);
else else
CDVD.getTD(0,&td2); CDVD.getTD(0,&td2);
int tlength = td2.lsn - td.lsn; int tlength = td2.lsn - td.lsn;
if(td.type==CDVD_AUDIO_TRACK) if (td.type == CDVD_AUDIO_TRACK)
{ {
audioTracks++; audioTracks++;
Console::Status(" * * Track %d: Audio (%d sectors)", params i,tlength); Console::Status(" * * Track %d: Audio (%d sectors)", params i,tlength);
@ -173,24 +174,24 @@ int FindDiskType(int mType)
} }
} }
if(dataTracks>0) if (dataTracks > 0)
{ {
iCDType=CheckDiskTypeFS(iCDType); iCDType=CheckDiskTypeFS(iCDType);
} }
if(audioTracks>0) if (audioTracks > 0)
{ {
if(iCDType==CDVD_TYPE_PS2CD) switch (iCDType)
{ {
iCDType=CDVD_TYPE_PS2CDDA; case CDVD_TYPE_PS2CD:
} iCDType=CDVD_TYPE_PS2CDDA;
else if(iCDType==CDVD_TYPE_PSCD) break;
{ case CDVD_TYPE_PSCD:
iCDType=CDVD_TYPE_PSCDDA; iCDType=CDVD_TYPE_PSCDDA;
} break;
else default:
{ iCDType=CDVD_TYPE_CDDA;
iCDType=CDVD_TYPE_CDDA; break;
} }
} }
@ -210,25 +211,28 @@ void DetectDiskType()
switch(baseMediaType) // Paranoid mode: do not trust the plugin's detection system to work correctly. switch(baseMediaType) // Paranoid mode: do not trust the plugin's detection system to work correctly.
{ {
case CDVD_TYPE_CDDA: case CDVD_TYPE_CDDA:
case CDVD_TYPE_PSCD: case CDVD_TYPE_PSCD:
case CDVD_TYPE_PS2CD: case CDVD_TYPE_PS2CD:
case CDVD_TYPE_PSCDDA: case CDVD_TYPE_PSCDDA:
case CDVD_TYPE_PS2CDDA: case CDVD_TYPE_PS2CDDA:
mType=CDVD_TYPE_DETCTCD; mType = CDVD_TYPE_DETCTCD;
break; break;
case CDVD_TYPE_DVDV:
case CDVD_TYPE_PS2DVD: case CDVD_TYPE_DVDV:
mType=CDVD_TYPE_DETCTDVDS; case CDVD_TYPE_PS2DVD:
break; mType = CDVD_TYPE_DETCTDVDS;
case CDVD_TYPE_DETCTDVDS: break;
case CDVD_TYPE_DETCTDVDD:
case CDVD_TYPE_DETCTCD: case CDVD_TYPE_DETCTDVDS:
mType=baseMediaType; case CDVD_TYPE_DETCTDVDD:
break; case CDVD_TYPE_DETCTCD:
case CDVD_TYPE_NODISC: mType = baseMediaType;
diskTypeCached = CDVD_TYPE_NODISC; break;
return;
case CDVD_TYPE_NODISC:
diskTypeCached = CDVD_TYPE_NODISC;
return;
} }
diskTypeCached = FindDiskType(mType); diskTypeCached = FindDiskType(mType);
@ -239,7 +243,7 @@ void DetectDiskType()
s32 DoCDVDinit() s32 DoCDVDinit()
{ {
diskTypeCached=-1; diskTypeCached = -1;
if(CDVD.initCount) *CDVD.initCount++; // used to handle the case where the plugin was inited at boot, but then iso takes over if(CDVD.initCount) *CDVD.initCount++; // used to handle the case where the plugin was inited at boot, but then iso takes over
return CDVD.init(); return CDVD.init();
@ -253,48 +257,22 @@ void DoCDVDshutdown()
s32 DoCDVDopen(const char* pTitleFilename) s32 DoCDVDopen(const char* pTitleFilename)
{ {
int ret=0; int ret = CDVD.open(pTitleFilename);
ret = CDVD.open(pTitleFilename);
int cdtype = DoCDVDdetectDiskType(); int cdtype = DoCDVDdetectDiskType();
if((Config.Blockdump)&&(cdtype != CDVD_TYPE_NODISC)) if((Config.Blockdump)&&(cdtype != CDVD_TYPE_NODISC))
{ {
char fname_only[MAX_PATH]; char fname_only[g_MaxPath];
if(CDVD.init == ISO.init) if(CDVD.init == ISO.init)
{ {
#ifdef _WIN32 #ifdef _WIN32
char fname[MAX_PATH], ext[MAX_PATH]; char fname[MAX_PATH], ext[g_MaxPath];
_splitpath(isoFileName, NULL, NULL, fname, ext); _splitpath(isoFileName, NULL, NULL, fname, ext);
_makepath(fname_only, NULL, NULL, fname, NULL); _makepath(fname_only, NULL, NULL, fname, NULL);
#else #else
char* p, *plast; getcwd(fname_only, ArraySize(fname_only)); // Base it out of the current directory for now.
strcat(fname_only, Path::GetFilenameWithoutExt(isoFileName).c_str());
plast = p = strchr(isoFileName, '/');
while (p != NULL)
{
plast = p;
p = strchr(p + 1, '/');
}
// Lets not create dumps in the plugin directory.
strcpy(fname_only, "../");
if (plast != NULL)
strcat(fname_only, plast + 1);
else
strcat(fname_only, isoFileName);
plast = p = strchr(fname_only, '.');
while (p != NULL)
{
plast = p;
p = strchr(p + 1, '.');
}
if (plast != NULL) *plast = 0;
#endif #endif
} }
else else
@ -302,7 +280,8 @@ s32 DoCDVDopen(const char* pTitleFilename)
strcpy(fname_only, "Untitled"); strcpy(fname_only, "Untitled");
} }
#if defined(_WIN32) && defined(ENABLE_TIMESTAMPS) #ifdef ENABLE_TIMESTAMPS
#ifdef _WIN32
SYSTEMTIME time; SYSTEMTIME time;
GetLocalTime(&time); GetLocalTime(&time);
@ -311,16 +290,27 @@ s32 DoCDVDopen(const char* pTitleFilename)
" (%04d-%02d-%02d %02d-%02d-%02d).dump", " (%04d-%02d-%02d %02d-%02d-%02d).dump",
time.wYear, time.wMonth, time.wDay, time.wYear, time.wMonth, time.wDay,
time.wHour, time.wMinute, time.wSecond); time.wHour, time.wMinute, time.wSecond);
#else
time_t rawtime;
struct tm * timeinfo;
// TODO: implement this for linux time(&rawtime);
timeinfo = localtime(&rawtime);
sprintf(
fname_only+strlen(fname_only),
" (%04d-%02d-%02d %02d-%02d-%02d).dump",
timeinfo->tm_year + 1900, timeinfo->tm_mon, timeinfo->tm_mday,
timeinfo->tm_hour, timeinfo->tm_min, timeinfo->tm_sec);
#endif
#else #else
strcat(fname_only, ".dump"); strcat(fname_only, ".dump");
#endif #endif
cdvdTD td; cdvdTD td;
CDVD.getTD(0, &td); CDVD.getTD(0, &td);
int blockofs=0; int blockofs = 0;
int blocksize=0; int blocksize = 0;
int blocks = td.lsn; int blocks = td.lsn;
switch(cdtype) switch(cdtype)
@ -332,6 +322,7 @@ s32 DoCDVDopen(const char* pTitleFilename)
blockofs = 24; blockofs = 24;
blocksize = 2048; blocksize = 2048;
break; break;
default: default:
blockofs = 0; blockofs = 0;
blocksize= 2352; blocksize= 2352;
@ -399,7 +390,7 @@ s32 DoCDVDgetBuffer(u8* buffer)
{ {
int ret = CDVD.getBuffer2(buffer); int ret = CDVD.getBuffer2(buffer);
if(ret==0) if (ret == 0)
{ {
if (blockDumpFile != NULL) if (blockDumpFile != NULL)
{ {
@ -412,8 +403,7 @@ s32 DoCDVDgetBuffer(u8* buffer)
s32 DoCDVDdetectDiskType() s32 DoCDVDdetectDiskType()
{ {
if(diskTypeCached<0) if(diskTypeCached<0) DetectDiskType();
DetectDiskType();
return diskTypeCached; return diskTypeCached;
} }

View File

@ -29,7 +29,7 @@
#include "CDVDisoReader.h" #include "CDVDisoReader.h"
char isoFileName[256]; char isoFileName[g_MaxPath];
u8 *pbuffer; u8 *pbuffer;
int cdtype; int cdtype;
@ -59,11 +59,11 @@ void lba_to_msf(s32 lba, u8* m, u8* s, u8* f)
*f = lba % 75; *f = lba % 75;
} }
#define btoi(b) ((b)/16*10 + (b)%16) /* BCD to u_char */ //#define btoi(b) ((b)/16*10 + (b)%16) /* BCD to u_char */
#define itob(i) ((i)/10*16 + (i)%10) /* u_char to BCD */ //#define itob(i) ((i)/10*16 + (i)%10) /* u_char to BCD */
#ifdef PCSX2_DEBUG /*#ifdef PCSX2_DEBUG
void __Log(char *fmt, ...) void __Log(char *fmt, ...)
{ {
va_list list; va_list list;
@ -76,11 +76,11 @@ void __Log(char *fmt, ...)
} }
#else #else
#define __Log 0&& #define __Log 0&&
#endif #endif*/
s32 CALLBACK ISOinit() s32 CALLBACK ISOinit()
{ {
#ifdef PCSX2_DEBUG /*#ifdef PCSX2_DEBUG
cdvdLog = fopen("logs/cdvdLog.txt", "w"); cdvdLog = fopen("logs/cdvdLog.txt", "w");
if (cdvdLog == NULL) if (cdvdLog == NULL)
{ {
@ -91,18 +91,18 @@ s32 CALLBACK ISOinit()
return -1; return -1;
} }
} }
setvbuf(cdvdLog, NULL, _IONBF, 0); setvbuf(cdvdLog, NULL, _IONBF, 0);*/
CDVD_LOG("CDVDinit\n"); CDVD_LOG("CDVDinit\n");
#endif /*#endif*/
return 0; return 0;
} }
void CALLBACK ISOshutdown() void CALLBACK ISOshutdown()
{ {
#ifdef CDVD_LOG /*#ifdef CDVD_LOG
if (cdvdLog != NULL) fclose(cdvdLog); if (cdvdLog != NULL) fclose(cdvdLog);
#endif #endif*/
} }
s32 CALLBACK ISOopen(const char* pTitle) s32 CALLBACK ISOopen(const char* pTitle)
@ -116,12 +116,18 @@ s32 CALLBACK ISOopen(const char* pTitle)
return -1; return -1;
} }
if (iso->type == ISOTYPE_DVD) switch (iso->type)
cdtype = CDVD_TYPE_PS2DVD; {
else if (iso->type == ISOTYPE_AUDIO) case ISOTYPE_DVD:
cdtype = CDVD_TYPE_CDDA; cdtype = CDVD_TYPE_PS2DVD;
else break;
cdtype = CDVD_TYPE_PS2CD; case ISOTYPE_AUDIO:
cdtype = CDVD_TYPE_CDDA;
break;
default:
cdtype = CDVD_TYPE_PS2CD;
break;
}
return 0; return 0;
} }
@ -209,8 +215,7 @@ static void FindLayer1Start()
layer1start=-2; layer1start=-2;
} }
if(layer1start>=0) if(layer1start>=0) Console::Status("found at 0x%8.8x\n", params layer1start);
Console::Status("found at 0x%8.8x\n", params layer1start);
} }
} }
@ -346,11 +351,8 @@ s32 CALLBACK ISOreadSector(u8* tempbuffer, u32 lsn, int mode)
{ {
int _lsn = lsn; int _lsn = lsn;
if (_lsn < 0) if (_lsn < 0) lsn = iso->blocks + _lsn;
lsn = iso->blocks + _lsn; if (lsn > iso->blocks) return -1;
if(lsn > iso->blocks)
return -1;
if(mode == CDVD_MODE_2352) if(mode == CDVD_MODE_2352)
{ {
@ -389,11 +391,8 @@ s32 CALLBACK ISOreadTrack(u32 lsn, int mode)
{ {
int _lsn = lsn; int _lsn = lsn;
if (_lsn < 0) if (_lsn < 0) lsn = iso->blocks + _lsn;
lsn = iso->blocks + _lsn; if (lsn > iso->blocks) return -1;
if(lsn > iso->blocks)
return -1;
isoReadBlock(iso, cdbuffer + iso->blockofs, lsn); isoReadBlock(iso, cdbuffer + iso->blockofs, lsn);

View File

@ -29,20 +29,20 @@
#include "IsoFStools.h" #include "IsoFStools.h"
#include "IsoFileFormats.h" #include "IsoFileFormats.h"
#define CDVD_LOG __Log //#define CDVD_LOG __Log
#ifndef MAX_PATH //#ifndef MAX_PATH
#define MAX_PATH 255 //#define MAX_PATH 255
#endif //#endif
extern FILE *cdvdLog; //extern FILE *cdvdLog;
void __Log(char *fmt, ...); //void __Log(char *fmt, ...);
#define itob(i) ((i)/10*16 + (i)%10) /* u_char to BCD */ //#define itob(i) ((i)/10*16 + (i)%10) /* u_char to BCD */
#define btoi(b) ((b)/16*10 + (b)%16) /* BCD to u_char */ //#define btoi(b) ((b)/16*10 + (b)%16) /* BCD to u_char */
extern char isoFileName[256]; extern char isoFileName[g_MaxPath];
extern isoFile *iso; extern isoFile *iso;
#endif #endif

View File

@ -183,7 +183,7 @@ int _isoReadDtable(isoFile *iso)
for (int i = 0; i < iso->dtablesize; i++) for (int i = 0; i < iso->dtablesize; i++)
{ {
_seekfile(iso->handle, 16 + (iso->blocksize + 4)*i, SEEK_SET); _seekfile(iso->handle, 16 + (iso->blocksize + 4) * i, SEEK_SET);
ret = _readfile(iso->handle, &iso->dtable[i], 4); ret = _readfile(iso->handle, &iso->dtable[i], 4);
if (ret < 4) return -1; if (ret < 4) return -1;
} }
@ -220,7 +220,7 @@ int isoDetect(isoFile *iso) // based on florin's CDVDbin detection code :)
_readfile(iso->handle, &iso->blocks, 4); _readfile(iso->handle, &iso->blocks, 4);
_readfile(iso->handle, &iso->blockofs, 4); _readfile(iso->handle, &iso->blockofs, 4);
_isoReadDtable(iso); _isoReadDtable(iso);
return detect(iso) == 1 ? 0 : -1; return (detect(iso) == 1) ? 0 : -1;
} }
else else
{ {
@ -266,7 +266,7 @@ isoFile *isoOpen(const char *filename)
Console::WriteLn("detected blocksize = %d", params iso->blocksize); Console::WriteLn("detected blocksize = %d", params iso->blocksize);
if (strlen(iso->filename) > 3 && strncmp(iso->filename + (strlen(iso->filename) - 3), "I00", 3) == 0) if ((strlen(iso->filename) > 3) && strncmp(iso->filename + (strlen(iso->filename) - 3), "I00", 3) == 0)
{ {
int i; int i;
@ -299,8 +299,7 @@ isoFile *isoOpen(const char *filename)
if (iso->flags == 0) if (iso->flags == 0)
{ {
_seekfile(iso->handle, 0, SEEK_END); _seekfile(iso->handle, 0, SEEK_END);
iso->blocks = (u32)((_tellfile(iso->handle) - iso->offset) / iso->blocks = (u32)((_tellfile(iso->handle) - iso->offset) / (iso->blocksize));
(iso->blocksize));
} }
Console::WriteLn("isoOpen: %s ok", params iso->filename); Console::WriteLn("isoOpen: %s ok", params iso->filename);
@ -327,7 +326,6 @@ isoFile *isoCreate(const char *filename, int flags)
iso->flags = flags; iso->flags = flags;
iso->offset = 0; iso->offset = 0;
iso->blockofs = 24; iso->blockofs = 24;
iso->blocksize = CD_FRAMESIZE_RAW;
iso->blocksize = 2048; iso->blocksize = 2048;
if (iso->flags & (ISOFLAGS_Z | ISOFLAGS_Z2 | ISOFLAGS_BZ2)) if (iso->flags & (ISOFLAGS_Z | ISOFLAGS_Z2 | ISOFLAGS_BZ2))
@ -430,7 +428,7 @@ int _isoReadBlockD(isoFile *iso, u8 *dst, int lsn)
{ {
if (iso->dtable[i] != lsn) continue; if (iso->dtable[i] != lsn) continue;
_seekfile(iso->handle, 16 + i*(iso->blocksize + 4) + 4, SEEK_SET); _seekfile(iso->handle, 16 + i * (iso->blocksize + 4) + 4, SEEK_SET);
ret = _readfile(iso->handle, dst, iso->blocksize); ret = _readfile(iso->handle, dst, iso->blocksize);
if (ret < iso->blocksize) return -1; if (ret < iso->blocksize) return -1;
@ -449,7 +447,7 @@ int _isoReadBlockM(isoFile *iso, u8 *dst, int lsn)
for (i = 0; i < 8; i++) for (i = 0; i < 8; i++)
{ {
if (lsn >= iso->multih[i].slsn && lsn <= iso->multih[i].elsn) if ((lsn >= iso->multih[i].slsn) && (lsn <= iso->multih[i].elsn))
{ {
break; break;
} }

View File

@ -38,6 +38,8 @@
#pragma warning(disable:4018) #pragma warning(disable:4018)
#endif #endif
#include "CDVD.h"
enum isoType enum isoType
{ {
ISOTYPE_ILLEGAL = 0, ISOTYPE_ILLEGAL = 0,
@ -59,8 +61,8 @@ enum isoFlags
#define CD_FRAMESIZE_RAW 2352 #define CD_FRAMESIZE_RAW 2352
#define DATA_SIZE (CD_FRAMESIZE_RAW-12) #define DATA_SIZE (CD_FRAMESIZE_RAW-12)
#define itob(i) ((i)/10*16 + (i)%10) /* u_char to BCD */ //#define itob(i) ((i)/10*16 + (i)%10) /* u_char to BCD */
#define btoi(b) ((b)/16*10 + (b)%16) /* BCD to u_char */ //#define btoi(b) ((b)/16*10 + (b)%16) /* BCD to u_char */
typedef struct typedef struct
{ {

View File

@ -112,6 +112,7 @@ extern bool SrcLog_MEMCARDS( const char* fmt, ... );
extern bool SrcLog_PAD( const char* fmt, ... ); extern bool SrcLog_PAD( const char* fmt, ... );
extern bool SrcLog_GTE( const char* fmt, ... ); extern bool SrcLog_GTE( const char* fmt, ... );
extern bool SrcLog_CDR( const char* fmt, ... ); extern bool SrcLog_CDR( const char* fmt, ... );
extern bool SrcLog_CDVD( const char* fmt, ... );
extern bool SrcLog_GPU( const char* fmt, ... ); extern bool SrcLog_GPU( const char* fmt, ... );
#define CPU_LOG (varLog & 0x00000001) && SrcLog_CPU #define CPU_LOG (varLog & 0x00000001) && SrcLog_CPU
@ -146,6 +147,7 @@ extern bool SrcLog_GPU( const char* fmt, ... );
#define GTE_LOG (varLog & 0x04000000) && SrcLog_GTE #define GTE_LOG (varLog & 0x04000000) && SrcLog_GTE
#define CDR_LOG (varLog & 0x08000000) && SrcLog_CDR #define CDR_LOG (varLog & 0x08000000) && SrcLog_CDR
#define GPU_LOG (varLog & 0x10000000) && SrcLog_GPU #define GPU_LOG (varLog & 0x10000000) && SrcLog_GPU
#define CDVD_LOG SrcLog_CDVD
// fixme - currently we don't log cache // fixme - currently we don't log cache
#define CACHE_LOG 0&& #define CACHE_LOG 0&&
@ -181,6 +183,7 @@ extern bool SrcLog_GPU( const char* fmt, ... );
#define PAD_LOG 0&& #define PAD_LOG 0&&
#define GTE_LOG 0&& #define GTE_LOG 0&&
#define CDR_LOG 0&& #define CDR_LOG 0&&
#define CDVD_LOG 0&&
#define GPU_LOG 0&& #define GPU_LOG 0&&
#define PSXCNT_LOG 0&& #define PSXCNT_LOG 0&&
#define EECNT_LOG 0&& #define EECNT_LOG 0&&

View File

@ -111,6 +111,7 @@ int LoadConfig()
GetValuel("vuFlagHack", Config.Hacks.vuFlagHack); GetValuel("vuFlagHack", Config.Hacks.vuFlagHack);
GetValuel("vuMinMax", Config.Hacks.vuMinMax); GetValuel("vuMinMax", Config.Hacks.vuMinMax);
GetValuel("IdleLoopFF", Config.Hacks.IdleLoopFF); GetValuel("IdleLoopFF", Config.Hacks.IdleLoopFF);
//GetValuel("BlockDump", Config.Blockdump);
GetValuel("ESCExits", Config.Hacks.ESCExits); GetValuel("ESCExits", Config.Hacks.ESCExits);
if (Config.Hacks.VUCycleSteal < 0 || Config.Hacks.VUCycleSteal > 4) if (Config.Hacks.VUCycleSteal < 0 || Config.Hacks.VUCycleSteal > 4)
@ -182,6 +183,7 @@ void SaveConfig()
SetValuel("INTCSTATSlow", Config.Hacks.INTCSTATSlow); SetValuel("INTCSTATSlow", Config.Hacks.INTCSTATSlow);
SetValuel("VUCycleSteal", Config.Hacks.VUCycleSteal); SetValuel("VUCycleSteal", Config.Hacks.VUCycleSteal);
SetValuel("IdleLoopFF", Config.Hacks.IdleLoopFF); SetValuel("IdleLoopFF", Config.Hacks.IdleLoopFF);
//SetValuel("BlockDump", Config.Blockdump);
SetValuel("ESCExits", Config.Hacks.ESCExits); SetValuel("ESCExits", Config.Hacks.ESCExits);
SetValuel("Fixes", Config.GameFixes); SetValuel("Fixes", Config.GameFixes);

View File

@ -180,6 +180,7 @@ IMPLEMENT_SOURCE_LOG( MEMCARDS, 'I', 7 )
IMPLEMENT_SOURCE_LOG( PAD, 'I', 7 ) IMPLEMENT_SOURCE_LOG( PAD, 'I', 7 )
IMPLEMENT_SOURCE_LOG( GTE, 'I', 3 ) IMPLEMENT_SOURCE_LOG( GTE, 'I', 3 )
IMPLEMENT_SOURCE_LOG( CDR, 'I', 8 ) IMPLEMENT_SOURCE_LOG( CDR, 'I', 8 )
IMPLEMENT_SOURCE_LOG( CDVD, 'I', 8 )