diff options
author | notaz | 2010-12-10 01:36:33 +0200 |
---|---|---|
committer | notaz | 2010-12-14 15:25:05 +0200 |
commit | 4b421010647aba998fe2ebfc7d6f226623d47954 (patch) | |
tree | d80cd25e29097d072ae6097744fdf9733e62b835 /libpcsxcore | |
parent | b021ee75b4921b709ed4e1517d790d9ef8f0c9d4 (diff) | |
download | pcsx_rearmed-4b421010647aba998fe2ebfc7d6f226623d47954.tar.gz pcsx_rearmed-4b421010647aba998fe2ebfc7d6f226623d47954.tar.bz2 pcsx_rearmed-4b421010647aba998fe2ebfc7d6f226623d47954.zip |
drc: handle invalidate on clear() calls and reset
Diffstat (limited to 'libpcsxcore')
-rw-r--r-- | libpcsxcore/new_dynarec/emu_if.c | 21 | ||||
-rw-r--r-- | libpcsxcore/new_dynarec/new_dynarec.h | 3 |
2 files changed, 22 insertions, 2 deletions
diff --git a/libpcsxcore/new_dynarec/emu_if.c b/libpcsxcore/new_dynarec/emu_if.c index dff7f21..9b20e5c 100644 --- a/libpcsxcore/new_dynarec/emu_if.c +++ b/libpcsxcore/new_dynarec/emu_if.c @@ -160,8 +160,9 @@ static int ari64_init() static void ari64_reset() { - /* hmh */ printf("ari64_reset\n"); + invalidate_all_pages(); + pending_exception = 1; } static void ari64_execute() @@ -177,8 +178,24 @@ static void ari64_execute() psxRegs.cycle, next_interupt, next_interupt - psxRegs.cycle); } -static void ari64_clear(u32 Addr, u32 Size) +static void ari64_clear(u32 addr, u32 size) { + u32 start, end; + + evprintf("ari64_clear %08x %04x\n", addr, size); + + /* check for RAM mirrors */ + if ((start & ~0xe0000000) < 0x200000) { + start &= ~0xe0000000; + start |= 0x80000000; + } + + start = addr >> 12; + end = (addr + size) >> 12; + + for (; start <= end; start++) + if (!invalid_code[start]) + invalidate_block(start); } static void ari64_shutdown() diff --git a/libpcsxcore/new_dynarec/new_dynarec.h b/libpcsxcore/new_dynarec/new_dynarec.h index 6f0c74e..580977b 100644 --- a/libpcsxcore/new_dynarec/new_dynarec.h +++ b/libpcsxcore/new_dynarec/new_dynarec.h @@ -7,3 +7,6 @@ extern int stop; void new_dynarec_init(); void new_dynarec_cleanup(); void new_dyna_start(); + +void invalidate_all_pages(); +void invalidate_block(unsigned int block); |