diff --git a/pcsx2/DebugTools/Debug.h b/pcsx2/DebugTools/Debug.h index 1b149bcedb..a3ecc88f75 100644 --- a/pcsx2/DebugTools/Debug.h +++ b/pcsx2/DebugTools/Debug.h @@ -104,41 +104,43 @@ void __Log(char *fmt, ...); #else // PCSX2_DEVBUILD -#define varLog 0 -#define Log 0 +//NOTE: uncomment these if you want them in release to public builds -#define CPU_LOG 0&& -#define MEM_LOG 0&& -#define HW_LOG 0&& -#define DMA_LOG 0&& -#define BIOS_LOG 0&& -#define ELF_LOG 0&& -#define FPU_LOG 0&& -#define MMI_LOG 0&& -#define VU0_LOG 0&& -#define COP0_LOG 0&& -#define VIF_LOG 0&& -#define SPR_LOG 0&& -#define GIF_LOG 0&& -#define SIF_LOG 0&& -#define IPU_LOG 0&& -#define VUM_LOG 0&& -#define RPC_LOG 0&& - -#define PSXCPU_LOG 0&& -#define PSXMEM_LOG 0&& -#define PSXHW_LOG 0&& -#define PSXBIOS_LOG 0&& -#define PSXDMA_LOG 0&& - -#define PAD_LOG 0&& -#define GTE_LOG 0&& -#define CDR_LOG 0&& -#define GPU_LOG 0&& -#define PSXCNT_LOG 0&& -#define EECNT_LOG 0&& - -#define EMU_LOG 0&& +//#define varLog 0 +//#define Log 0 +// +//#define CPU_LOG 0&& +//#define MEM_LOG 0&& +//#define HW_LOG 0&& +//#define DMA_LOG 0&& +//#define BIOS_LOG 0&& +//#define ELF_LOG 0&& +//#define FPU_LOG 0&& +//#define MMI_LOG 0&& +//#define VU0_LOG 0&& +//#define COP0_LOG 0&& +//#define VIF_LOG 0&& +//#define SPR_LOG 0&& +//#define GIF_LOG 0&& +//#define SIF_LOG 0&& +//#define IPU_LOG 0&& +//#define VUM_LOG 0&& +//#define RPC_LOG 0&& +// +//#define PSXCPU_LOG 0&& +//#define PSXMEM_LOG 0&& +//#define PSXHW_LOG 0&& +//#define PSXBIOS_LOG 0&& +//#define PSXDMA_LOG 0&& +// +//#define PAD_LOG 0&& +//#define GTE_LOG 0&& +//#define CDR_LOG 0&& +//#define GPU_LOG 0&& +//#define PSXCNT_LOG 0&& +//#define EECNT_LOG 0&& +// +//#define EMU_LOG 0&& #endif diff --git a/pcsx2/Hw.c b/pcsx2/Hw.c index 482796d8b2..098051f2c8 100644 --- a/pcsx2/Hw.c +++ b/pcsx2/Hw.c @@ -1083,7 +1083,9 @@ void hwWrite32(u32 mem, u32 value) { break; case 0x1000f590: // DMAC_ENABLEW +#ifdef HW_LOG HW_LOG("DMAC_ENABLEW Write 32bit %lx\n", value); +#endif psHu32(0xf590) = value; psHu32(0xf520) = value; return; diff --git a/pcsx2/IPU/IPU.c b/pcsx2/IPU/IPU.c index 149fbd1ad7..7c4c573e01 100644 --- a/pcsx2/IPU/IPU.c +++ b/pcsx2/IPU/IPU.c @@ -790,7 +790,9 @@ static BOOL ipuFDEC(u32 val) static BOOL ipuSETIQ(u32 val) { +#ifdef PCSX2_DEVBUILD int i; +#endif if ((val >> 27) & 1){ g_nCmdPos[0] += getBits((u8*)niq + g_nCmdPos[0], 512-8*g_nCmdPos[0], 1); // 8*8*8 diff --git a/pcsx2/PsxHw.c b/pcsx2/PsxHw.c index e70b5593cc..041b56c913 100644 --- a/pcsx2/PsxHw.c +++ b/pcsx2/PsxHw.c @@ -1338,11 +1338,15 @@ void psxHwWrite32(u32 add, u32 value) { return; case 0x1f8010c0: +#ifdef PSXHW_LOG PSXHW_LOG("DMA4 MADR 32bit write %lx\n", value); +#endif SPU2WriteMemAddr(0,value); HW_DMA4_MADR = value; return; // DMA4 madr case 0x1f8010c4: +#ifdef PSXHW_LOG PSXHW_LOG("DMA4 BCR 32bit write %lx\n", value); +#endif HW_DMA4_BCR = value; return; // DMA4 bcr case 0x1f8010c8: #ifdef PSXHW_LOG @@ -1375,11 +1379,15 @@ void psxHwWrite32(u32 add, u32 value) { return; case 0x1f801500: +#ifdef PSXHW_LOG PSXHW_LOG("DMA7 MADR 32bit write %lx\n", value); +#endif SPU2WriteMemAddr(1,value); HW_DMA7_MADR = value; return; // DMA7 madr case 0x1f801504: +#ifdef PSXHW_LOG PSXHW_LOG("DMA7 BCR 32bit write %lx\n", value); +#endif HW_DMA7_BCR = value; return; // DMA7 bcr case 0x1f801508: #ifdef PSXHW_LOG diff --git a/pcsx2/Sif.c b/pcsx2/Sif.c index eb36d60254..7527fdaf0a 100644 --- a/pcsx2/Sif.c +++ b/pcsx2/Sif.c @@ -333,8 +333,9 @@ notDone = 1; { static PCSX2_ALIGNED16(u32 tag[4]); SIF0read((u32*)&tag[0], 4); // Tag +#ifdef SIF_LOG SIF_LOG(" EE SIF read tag: %x %x %x %x\n", tag[0], tag[1], tag[2], tag[3]); - +#endif sif0dma->qwc = (u16)tag[0]; sif0dma->madr = tag[1]; sif0dma->chcr = (sif0dma->chcr & 0xffff) | (tag[0] & 0xffff0000); diff --git a/pcsx2/Sio.c b/pcsx2/Sio.c index 37aaab22c0..6c26573b08 100644 --- a/pcsx2/Sio.c +++ b/pcsx2/Sio.c @@ -147,7 +147,9 @@ void SIO_CommandWrite(u8 value,int way) { sio.parp = 1; switch (value) { case 0x11: // RESET +#ifdef PAD_LOG PAD_LOG("RESET MEMORY CARD\n"); +#endif sio.bufcount = 8; memset(sio.buf, 0xFF, 256); sio.buf[3] = sio.terminator; @@ -516,7 +518,9 @@ void InitializeSIO(u8 value) sio2.packet.recvVal1 = 0x1100; // Memcards are present sio.count = 0; SIO_INT(); +#ifdef PAD_LOG PAD_LOG("START MEMORY CARD\n"); +#endif return; } } diff --git a/pcsx2/windows/ini.c b/pcsx2/windows/ini.c index 6a22778c9f..ef58e25176 100644 --- a/pcsx2/windows/ini.c +++ b/pcsx2/windows/ini.c @@ -175,7 +175,11 @@ void SaveConfig() { //Misc sprintf(szValue,"%u",Conf->Patch); WritePrivateProfileString("Misc","Patch",szValue,szIniFile); +#ifdef PCSX2_DEVBUILD sprintf(szValue,"%x",varLog); +#else + sprintf(szValue,"%x",0); +#endif WritePrivateProfileString("Misc","varLog",szValue,szIniFile); sprintf(szValue,"%u",Conf->Hacks); WritePrivateProfileString("Misc","Hacks",szValue,szIniFile);