From 0ce47d46e07dfb02f3eeef481b963927beeee481 Mon Sep 17 00:00:00 2001 From: notaz Date: Wed, 26 Jan 2011 18:31:27 +0200 Subject: drc: invalidate RAM mirrors correctly --- libpcsxcore/new_dynarec/new_dynarec.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'libpcsxcore/new_dynarec/new_dynarec.c') diff --git a/libpcsxcore/new_dynarec/new_dynarec.c b/libpcsxcore/new_dynarec/new_dynarec.c index b2b5d28..abfd834 100644 --- a/libpcsxcore/new_dynarec/new_dynarec.c +++ b/libpcsxcore/new_dynarec/new_dynarec.c @@ -309,7 +309,14 @@ static void tlb_hacks() static u_int get_page(u_int vaddr) { +#ifndef PCSX u_int page=(vaddr^0x80000000)>>12; +#else + u_int page=vaddr&~0xe0000000; + if (page < 0x1000000) + page &= ~0x0e00000; // RAM mirrors + page>>=12; +#endif #ifndef DISABLE_TLB if(page>262143&&tlb_LUT_r[vaddr>>12]) page=(tlb_LUT_r[vaddr>>12]^0x80000000)>>12; #endif -- cgit v1.2.3