diff options
| author | SND\shalma_cp <SND\shalma_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2010-11-10 17:46:54 +0000 |
|---|---|---|
| committer | SND\shalma_cp <SND\shalma_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2010-11-10 17:46:54 +0000 |
| commit | 9c4f83771af2cd31f155ba7e16caae7e5054ab4f (patch) | |
| tree | 30247298ed64bb0de7bfd589cc7c84531e38644a /libpcsxcore/ix86 | |
| parent | b57d7566e450942cfb28fcdb668a1e4d2063d9f1 (diff) | |
Pitfall 3D - Beyond the Jungle - ir3000a.c
- clear dynarec slot using old data
- fixes stage loading crash
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@59398 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'libpcsxcore/ix86')
| -rw-r--r-- | libpcsxcore/ix86/iR3000A.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/libpcsxcore/ix86/iR3000A.c b/libpcsxcore/ix86/iR3000A.c index 47915d98..99e9f3e4 100644 --- a/libpcsxcore/ix86/iR3000A.c +++ b/libpcsxcore/ix86/iR3000A.c @@ -451,6 +451,24 @@ static void recExecuteBlock() { } static void recClear(u32 Addr, u32 Size) { + u32 bank,offset;
+
+ bank = Addr >> 24;
+ offset = Addr & 0xffffff;
+
+
+ // Pitfall 3D - clear dynarec slots that contain 'stale' ram data
+ // - fixes stage 1 loading crash
+ if( bank == 0x80 || bank == 0xa0 || bank == 0x00 ) {
+ offset &= 0x1fffff;
+
+ if( offset >= 500 * 4 )
+ memset((void*)PC_REC(Addr - 500 * 4), 0, 500 * 4);
+ else
+ memset((void*)PC_REC(Addr - offset), 0, offset);
+ }
+
+
memset((void*)PC_REC(Addr), 0, Size * 4); } |
