#if 0
#define CDR_LOG_I SysPrintf
#else
-#define CDR_LOG_I(...)
+#define CDR_LOG_I log_unhandled
#endif
#if 0
#define CDR_LOG_IO SysPrintf
cdr.FifoOffset += size;
psxCpu->Clear(madr, size / 4);
}
+ if (size < cdsize)
+ CDR_LOG_I("cdrom: dma3 %d/%d\n", size, cdsize);
CDRDMA_INT((cdsize/4) * 24);
return;
default:
- CDR_LOG("psxDma3() Log: Unknown cddma %x\n", chcr);
+ CDR_LOG_I("psxDma3() Log: Unknown cddma %x\n", chcr);
break;
}
break;
default:
- // printf("mdec unknown command\n");
+ log_unhandled("mdec: unknown command %08x\n", cmd);
break;
}
SPUDMA_INT(words * 4);
return;
-#ifdef PSXDMA_LOG
default:
- PSXDMA_LOG("*** DMA4 SPU - unknown *** %x addr = %x size = %x\n", chcr, madr, bcr);
+ log_unhandled("*** DMA4 SPU - unknown *** %x addr = %x size = %x\n", chcr, madr, bcr);
break;
-#endif
}
HW_DMA4_CHCR &= SWAP32(~0x01000000);
GPUDMA_INT(size);
return;
-#ifdef PSXDMA_LOG
default:
- PSXDMA_LOG("*** DMA 2 - GPU unknown *** %lx addr = %lx size = %lx\n", chcr, madr, bcr);
+ log_unhandled("*** DMA 2 - GPU unknown *** %x addr = %x size = %x\n", chcr, madr, bcr);
break;
-#endif
}
HW_DMA2_CHCR &= SWAP32(~0x01000000);
GPUOTCDMA_INT(16);
return;
}
-#ifdef PSXDMA_LOG
else {
// Unknown option
- PSXDMA_LOG("*** DMA6 OT - unknown *** %x addr = %x size = %x\n", chcr, madr, bcr);
+ log_unhandled("*** DMA6 OT - unknown *** %x addr = %x size = %x\n", chcr, madr, bcr);
}
-#endif
HW_DMA6_CHCR &= SWAP32(~0x01000000);
DMA_INTERRUPT(6);
//case 0x1f802030: hard = //int_2000????
//case 0x1f802040: hard =//dip switches...??
+ case 0x1f801800:
+ case 0x1f801802:
+ log_unhandled("cdrom r16 %x\n", add);
+ // falthrough
default:
if (add >= 0x1f801c00 && add < 0x1f801e00) {
hard = SPU_readRegister(add);
#endif
return hard;
+ case 0x1f801800:
+ log_unhandled("cdrom r32 %x\n", add);
+ // falthrough
default:
hard = psxHu32(add);
#ifdef PSXHW_LOG
void SysRunGui(); // Returns to the Gui
void SysClose(); // Close mem and plugins
+// log if the game does something we don't handle (well)
+//#define log_unhandled printf
+#define log_unhandled(...)
+
#ifdef __cplusplus
}
#endif
// generic defines\r
/////////////////////////////////////////////////////////\r
\r
+//#define log_unhandled printf\r
+#define log_unhandled(...)\r
+\r
#ifdef __GNUC__\r
#define noinline __attribute__((noinline))\r
#define unlikely(x) __builtin_expect((x), 0)\r
break;\r
//-------------------------------------------------//\r
\r
+ case H_SPUmvolL:\r
+ case H_SPUmvolR:\r
+ if (val & 0x8000)\r
+ log_unhandled("w master sweep: %08lx %04x\n", reg, val);\r
+ break;\r
+\r
+ case 0x0dac:\r
+ if (val != 4)\r
+ log_unhandled("1f801dac %04x\n", val);\r
+ break;\r
+\r
/*\r
case H_ExtLeft:\r
//auxprintf("EL %d\n",val);\r
//case H_SPUIsOn2:\r
// return IsSoundOn(16,24);\r
\r
+ case H_SPUMute1:\r
+ case H_SPUMute2:\r
+ log_unhandled("r isOn: %08lx\n", reg);\r
+ break;\r
}\r
\r
return spu.regArea[(r-0xc00)>>1];\r
if(vol&0x8000) // sweep?\r
{\r
short sInc=1; // -> sweep up?\r
+ log_unhandled("ch%d sweepl %04x\n", ch, vol);\r
if(vol&0x2000) sInc=-1; // -> or down?\r
if(vol&0x1000) vol^=0xffff; // -> mmm... phase inverted? have to investigate this\r
vol=((vol&0x7f)+1)/2; // -> sweep: 0..127 -> 0..64\r
if(vol&0x8000) // comments... see above :)\r
{\r
short sInc=1;\r
+ log_unhandled("ch%d sweepr %04x\n", ch, vol);\r
if(vol&0x2000) sInc=-1;\r
if(vol&0x1000) vol^=0xffff;\r
vol=((vol&0x7f)+1)/2; \r