aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornotaz2011-02-05 01:14:40 +0200
committernotaz2011-02-09 14:59:32 +0200
commit3e31e934ebbfa48941cdcc66e316ff743a4c908d (patch)
tree31e64d023f01f93f529008648c587538019b0360
parent862bfc0d6da5d83c8af5bf3a1fdd189474d25812 (diff)
downloadpcsx_rearmed-3e31e934ebbfa48941cdcc66e316ff743a4c908d.tar.gz
pcsx_rearmed-3e31e934ebbfa48941cdcc66e316ff743a4c908d.tar.bz2
pcsx_rearmed-3e31e934ebbfa48941cdcc66e316ff743a4c908d.zip
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
-rw-r--r--libpcsxcore/psxhw.c7
-rw-r--r--libpcsxcore/psxmem.c2
2 files changed, 8 insertions, 1 deletions
diff --git a/libpcsxcore/psxhw.c b/libpcsxcore/psxhw.c
index 0c5320a..8069c07 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 898eac9..b08d113 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