diff options
| author | SND\ckain_cp <SND\ckain_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2013-10-02 16:19:04 +0000 |
|---|---|---|
| committer | SND\ckain_cp <SND\ckain_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2013-10-02 16:19:04 +0000 |
| commit | 2ee144472e54c451a26b71489f1abde0dcd5bd64 (patch) | |
| tree | da66b1d2c836ba2ca07566aa11b06a39f40c036c | |
| parent | 72053c4cecb4527928b6a62c1a95c892f4463c0f (diff) | |
| download | pcsxr-2ee144472e54c451a26b71489f1abde0dcd5bd64.tar.gz | |
Fix Toshinden Subaru with a hack for now. Seems that xa.c needs some further debugging.
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@87349 e17a0e51-4ae3-4d35-97c3-1a29b211df97
| -rwxr-xr-x | libpcsxcore/gpu.c | 2 | ||||
| -rwxr-xr-x | libpcsxcore/psxhw.c | 25 | ||||
| -rwxr-xr-x | plugins/dfsound/dma.c | 25 |
3 files changed, 40 insertions, 12 deletions
diff --git a/libpcsxcore/gpu.c b/libpcsxcore/gpu.c index 60886aa7..324c2a00 100755 --- a/libpcsxcore/gpu.c +++ b/libpcsxcore/gpu.c @@ -129,7 +129,7 @@ void psxDma2(u32 madr, u32 bcr, u32 chcr) { // GPU return; case 0x01000201: // mem2vram - bs=(bcr & 0xffff); + bs=(bcr & 0xffff); size = (bcr >> 16) * bs; // BA blocks * BS words (word = 32-bits) #ifdef PSXDMA_LOG PSXDMA_LOG("*** DMA 2 - GPU mem2vram *** %lx addr = %lxh, BCR %lxh => size %d = BA(%d) * BS(%xh)\n", diff --git a/libpcsxcore/psxhw.c b/libpcsxcore/psxhw.c index b753c2f3..2ac9a609 100755 --- a/libpcsxcore/psxhw.c +++ b/libpcsxcore/psxhw.c @@ -298,12 +298,12 @@ u32 psxHwRead32(u32 add) { #endif #ifdef PSXHW_LOG -/* case 0x1f8010f0: - PSXHW_LOG("DMA PCR 32bit read %x\n", psxHu32(0x10f0)); - return SWAPu32(HW_DMA_PCR); // dma rest channel + case 0x1f8010f0: + PSXHW_LOG("DMA PCR 32bit read %x\n", HW_DMA_PCR); + return SWAPu32(HW_DMA_PCR); // DMA control register case 0x1f8010f4: - PSXHW_LOG("DMA ICR 32bit read %x\n", psxHu32(0x10f4)); - return SWAPu32(HW_DMA_ICR); // interrupt enabler?*/ + PSXHW_LOG("DMA ICR 32bit read %x\n", HW_DMA_ICR); + return SWAPu32(HW_DMA_ICR); // DMA interrupt register (enable/ack) #endif // time for rootcounters :) @@ -361,11 +361,17 @@ u32 psxHwRead32(u32 add) { PSXHW_LOG("T2 target read32: %x\n", hard); #endif return hard; + case 0x1f801014: + hard = psxHu32(add); +#ifdef PSXHW_LOG + PSXHW_LOG("SPU delay [0x1014] read32: %8.8lx\n", hard); +#endif + return hard; default: hard = psxHu32(add); #ifdef PSXHW_LOG - PSXHW_LOG("*Unkwnown 32bit read at address %x\n", add); + PSXHW_LOG("*Unknown 32bit read at address %x (0x%8.8lx)\n", add, hard); #endif return hard; } @@ -721,6 +727,13 @@ void psxHwWrite32(u32 add, u32 value) { return; } + + case 0x1f801014: +#ifdef PSXHW_LOG + PSXHW_LOG("SPU delay [0x1014] write32: %8.8lx\n", value); +#endif + psxHu32ref(add) = SWAPu32(value); + return; case 0x1f801810: #ifdef PSXHW_LOG PSXHW_LOG("GPU DATA 32bit write %x\n", value); diff --git a/plugins/dfsound/dma.c b/plugins/dfsound/dma.c index 15f44b11..ee3c8e54 100755 --- a/plugins/dfsound/dma.c +++ b/plugins/dfsound/dma.c @@ -44,23 +44,38 @@ unsigned short CALLBACK SPUreadDMA(void) void CALLBACK SPUreadDMAMem(unsigned short * pusPSXMem,int iSize) { int i; + unsigned char crc=0; spuStat |= STAT_DATA_BUSY; for(i=0;i<iSize;i++) { - Check_IRQ( spuAddr, 0 ); + Check_IRQ( spuAddr, 0 ); - - *pusPSXMem++=spuMem[spuAddr>>1]; // spu addr got by writeregister - spuAddr+=2; // inc spu addr + crc|=*pusPSXMem++=spuMem[spuAddr>>1]; // spu addr got by writeregister + spuAddr+=2; // inc spu addr + spuMem[spuAddr>>1]; - // guess based on Vib Ribbon (below) + // guess based on Vib Ribbon (below) if(spuAddr>0x7ffff) break; } iSpuAsyncWait=0; + /* + /* Toshiden Subaru "story screen" hack. + /* + /* After character selection screen, the game checks values inside returned + /* SPU buffer and all values cannot be 0x0. + /* Due to XA timings(?) we return buffer that has only NULLs. + /* Setting little lag to MixXA() causes buffer to have some non-NULL values, + /* but causes garbage sound so this hack is preferable. + /* + /* Note: When messing with xa.c like fixing Suikoden II's demo video sound issue + /* this should be handled as well. + */ + if (crc == 0) *--pusPSXMem=0xFF; + spuStat &= ~STAT_DATA_BUSY; spuStat &= ~STAT_DMA_NON; spuStat &= ~STAT_DMA_W; |
