From dc990066a301c231e5982a346f4809b4e0247a51 Mon Sep 17 00:00:00 2001 From: notaz Date: Tue, 1 Mar 2011 19:07:27 +0200 Subject: drc: clear dynarec completely on CD image change most likely only BIOS can be reused anyway, no need to stress invalidation code needlessly (even if it does it all well). --- libpcsxcore/new_dynarec/new_dynarec.c | 46 ++++++++++++++++++++++------------- 1 file changed, 29 insertions(+), 17 deletions(-) (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 1f33c75..72af92d 100644 --- a/libpcsxcore/new_dynarec/new_dynarec.c +++ b/libpcsxcore/new_dynarec/new_dynarec.c @@ -7709,20 +7709,10 @@ void disassemble_inst(int i) } } -void new_dynarec_init() +// clear the state completely, instead of just marking +// things invalid like invalidate_all_pages() does +void new_dynarec_clear_full() { - printf("Init new dynarec\n"); - out=(u_char *)BASE_ADDR; - if (mmap (out, 1<>2; for(n=526336;n<1048576;n++) // 0x80800000 .. 0xFFFFFFFF memory_map[n]=-1; + for(n=0;n<4096;n++) ll_clear(jump_in+n); + for(n=0;n<4096;n++) ll_clear(jump_out+n); + for(n=0;n<4096;n++) ll_clear(jump_dirty+n); +} + +void new_dynarec_init() +{ + printf("Init new dynarec\n"); + out=(u_char *)BASE_ADDR; + if (mmap (out, 1<