From: notaz Date: Fri, 4 Feb 2011 23:14:40 +0000 (+0200) Subject: psxmem: backport fixes from pcsxr X-Git-Tag: r6~15 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3e31e934ebbfa48941cdcc66e316ff743a4c908d;p=pcsx_rearmed.git psxmem: backport fixes from pcsxr shalma: Duke Nukem - Land of Babes - psxmem.c - Clear correct dynarec area - Fixes Paradox intro crash Dukes of Hazard 2 - psxhw.c - 32-bit spu write - fix engine noise --- diff --git a/libpcsxcore/psxhw.c b/libpcsxcore/psxhw.c index 0c5320ad..8069c07a 100644 --- a/libpcsxcore/psxhw.c +++ b/libpcsxcore/psxhw.c @@ -728,6 +728,13 @@ void psxHwWrite32(u32 add, u32 value) { psxRcntWtarget(2, value & 0xffff); return; default: + // Dukes of Hazard 2 - car engine noise + if (add>=0x1f801c00 && add<0x1f801e00) { + SPU_writeRegister(add, value&0xffff); + SPU_writeRegister(add + 2, value>>16); + return; + } + psxHu32ref(add) = SWAPu32(value); #ifdef PSXHW_LOG PSXHW_LOG("*Unknown 32bit write at address %x value %x\n", add, value); diff --git a/libpcsxcore/psxmem.c b/libpcsxcore/psxmem.c index 898eac9c..b08d113d 100644 --- a/libpcsxcore/psxmem.c +++ b/libpcsxcore/psxmem.c @@ -261,7 +261,7 @@ void psxMemWrite16(u32 mem, u16 value) { DebugCheckBP((mem & 0xffffff) | 0x80000000, W2); *(u16 *)(p + (mem & 0xffff)) = SWAPu16(value); #ifdef PSXREC - psxCpu->Clear((mem & (~1)), 1); + psxCpu->Clear((mem & (~3)), 1); #endif } else { #ifdef PSXMEM_LOG