From 92879b62c06f6c1d363a138f77f7727d0fc7721e Mon Sep 17 00:00:00 2001 From: notaz Date: Sun, 6 Jan 2013 04:11:26 +0200 Subject: fully reinit drc on change --- libpcsxcore/new_dynarec/emu_if.c | 2 ++ libpcsxcore/new_dynarec/pcsxmem.c | 6 ++++++ libpcsxcore/new_dynarec/pcsxmem.h | 1 + 3 files changed, 9 insertions(+) (limited to 'libpcsxcore/new_dynarec') diff --git a/libpcsxcore/new_dynarec/emu_if.c b/libpcsxcore/new_dynarec/emu_if.c index b8e9883..02e108f 100644 --- a/libpcsxcore/new_dynarec/emu_if.c +++ b/libpcsxcore/new_dynarec/emu_if.c @@ -344,6 +344,7 @@ static void ari64_clear(u32 addr, u32 size) static void ari64_shutdown() { new_dynarec_cleanup(); + new_dyna_pcsx_mem_shutdown(); } extern void intExecute(); @@ -394,6 +395,7 @@ void invalidate_block(unsigned int block) {} void new_dyna_pcsx_mem_init(void) {} void new_dyna_pcsx_mem_reset(void) {} void new_dyna_pcsx_mem_load_state(void) {} +void new_dyna_pcsx_mem_shutdown(void) {} #endif #ifdef DRC_DBG diff --git a/libpcsxcore/new_dynarec/pcsxmem.c b/libpcsxcore/new_dynarec/pcsxmem.c index 90f7765..4d83452 100644 --- a/libpcsxcore/new_dynarec/pcsxmem.c +++ b/libpcsxcore/new_dynarec/pcsxmem.c @@ -475,3 +475,9 @@ void new_dyna_pcsx_mem_reset(void) map_item(&mem_iowtab[IOMEM32(0x1810)], GPU_writeData, 1); } + +void new_dyna_pcsx_mem_shutdown(void) +{ + psxUnmap(mem_readtab, 0x200000 * 4, MAP_TAG_LUTS); + mem_writetab = mem_readtab = NULL; +} diff --git a/libpcsxcore/new_dynarec/pcsxmem.h b/libpcsxcore/new_dynarec/pcsxmem.h index f962562..99bb5d4 100644 --- a/libpcsxcore/new_dynarec/pcsxmem.h +++ b/libpcsxcore/new_dynarec/pcsxmem.h @@ -4,5 +4,6 @@ extern u8 zero_mem[0x1000]; void new_dyna_pcsx_mem_init(void); void new_dyna_pcsx_mem_reset(void); void new_dyna_pcsx_mem_load_state(void); +void new_dyna_pcsx_mem_shutdown(void); int pcsxmem_is_handler_dynamic(u_int addr); -- cgit v1.2.3 From 9705788a21dc36515ba498d45ba2f197f7bcd628 Mon Sep 17 00:00:00 2001 From: notaz Date: Sun, 6 Jan 2013 19:59:20 +0200 Subject: fix irq status tested on real hardware --- libpcsxcore/new_dynarec/pcsxmem.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'libpcsxcore/new_dynarec') diff --git a/libpcsxcore/new_dynarec/pcsxmem.c b/libpcsxcore/new_dynarec/pcsxmem.c index 4d83452..a42852a 100644 --- a/libpcsxcore/new_dynarec/pcsxmem.c +++ b/libpcsxcore/new_dynarec/pcsxmem.c @@ -147,9 +147,9 @@ make_rcnt_funcs(2) static void io_write_ireg16(u32 value) { - if (Config.Sio) psxHu16ref(0x1070) |= 0x80; + //if (Config.Sio) psxHu16ref(0x1070) |= 0x80; if (Config.SpuIrq) psxHu16ref(0x1070) |= 0x200; - psxHu16ref(0x1070) &= psxHu16(0x1074) & value; + psxHu16ref(0x1070) &= value; } static void io_write_imask16(u32 value) @@ -161,9 +161,9 @@ static void io_write_imask16(u32 value) static void io_write_ireg32(u32 value) { - if (Config.Sio) psxHu32ref(0x1070) |= 0x80; + //if (Config.Sio) psxHu32ref(0x1070) |= 0x80; if (Config.SpuIrq) psxHu32ref(0x1070) |= 0x200; - psxHu32ref(0x1070) &= psxHu32(0x1074) & value; + psxHu32ref(0x1070) &= value; } static void io_write_imask32(u32 value) -- cgit v1.2.3