Skip to content

Commit

Permalink
Fix new_dynarec uncached code execution
Browse files Browse the repository at this point in the history
  • Loading branch information
m4xw committed Feb 18, 2020
1 parent a3091c9 commit 9cbe0fe
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions mupen64plus-core/src/device/r4300/new_dynarec/new_dynarec.c
Original file line number Diff line number Diff line change
Expand Up @@ -1763,7 +1763,9 @@ static void tlb_speed_hacks()
u_int verify_dirty(struct ll_entry * head)
{
void *source;
if((int)head->start>=0xa4000000&&(int)head->start<0xa4001000) {
if((int)head->start>=0xA0000000&&(int)head->start<0xA07FFFFF) {
source=(void *)((uintptr_t)g_dev.rdram.dram+head->start-0xA0000000);
}else if((int)head->start>=0xa4000000&&(int)head->start<0xa4001000) {
source=(void *)((uintptr_t)g_dev.sp.mem+head->start-0xa4000000);
}else if((int)head->start>=0x80000000&&(int)head->start<0x80800000) {
source=(void *)((uintptr_t)g_dev.rdram.dram+head->start-(uintptr_t)0x80000000);
Expand Down Expand Up @@ -7679,7 +7681,11 @@ int new_recompile_block(int addr)
#endif
start = (u_int)addr&~3;
//assert(((u_int)addr&1)==0);
if ((int)addr >= 0xa4000000 && (int)addr < 0xa4001000) {
if ((int)addr >= 0xA0000000 && (int)addr < 0xA07FFFFF) {
source = (u_int *)((uintptr_t)g_dev.rdram.dram+start-0xA0000000);
pagelimit = 0xA07FFFFF;
}
else if ((int)addr >= 0xa4000000 && (int)addr < 0xa4001000) {
source = (u_int *)((uintptr_t)g_dev.sp.mem+start-0xa4000000);
pagelimit = 0xa4001000;
}
Expand Down

0 comments on commit 9cbe0fe

Please sign in to comment.