From 6d760c926db017bea75bdd95cfa8acc3cc060ab8 Mon Sep 17 00:00:00 2001 From: notaz Date: Sat, 6 Dec 2014 18:26:16 +0200 Subject: psxmem: remove hard requirement for a mapping not all platforms have 1f800000 free not all mmap implementations use the addr hint.. --- libpcsxcore/new_dynarec/assem_arm.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'libpcsxcore/new_dynarec') diff --git a/libpcsxcore/new_dynarec/assem_arm.c b/libpcsxcore/new_dynarec/assem_arm.c index 45edd65..9ee832e 100644 --- a/libpcsxcore/new_dynarec/assem_arm.c +++ b/libpcsxcore/new_dynarec/assem_arm.c @@ -3999,10 +3999,16 @@ static int emit_fastpath_cmp_jump(int i,int addr,int *addr_reg_override) type=0; } else if(type==MTYPE_1F80) { // scratchpad - emit_addimm(addr,-0x1f800000,HOST_TEMPREG); - emit_cmpimm(HOST_TEMPREG,0x1000); - jaddr=(int)out; - emit_jc(0); + if (psxH == (void *)0x1f800000) { + emit_addimm(addr,-0x1f800000,HOST_TEMPREG); + emit_cmpimm(HOST_TEMPREG,0x1000); + jaddr=(int)out; + emit_jc(0); + } + else { + // do usual RAM check, jump will go to the right handler + type=0; + } } #endif -- cgit v1.2.3 From 2b30c1291db9d9801d51cf85f71f40fe54958898 Mon Sep 17 00:00:00 2001 From: notaz Date: Thu, 18 Dec 2014 03:56:01 +0200 Subject: spu: add a schedule callback --- libpcsxcore/new_dynarec/emu_if.c | 1 + 1 file changed, 1 insertion(+) (limited to 'libpcsxcore/new_dynarec') diff --git a/libpcsxcore/new_dynarec/emu_if.c b/libpcsxcore/new_dynarec/emu_if.c index cb95cb1..89e2bd6 100644 --- a/libpcsxcore/new_dynarec/emu_if.c +++ b/libpcsxcore/new_dynarec/emu_if.c @@ -60,6 +60,7 @@ static irq_func * const irq_funcs[] = { [PSXINT_CDRDMA] = cdrDmaInterrupt, [PSXINT_CDRLID] = cdrLidSeekInterrupt, [PSXINT_CDRPLAY] = cdrPlayInterrupt, + [PSXINT_SPU_UPDATE] = spuUpdate, [PSXINT_RCNT] = psxRcntUpdate, }; -- cgit v1.2.3 From 650adfd2da779ba8855623362c2900583e22931e Mon Sep 17 00:00:00 2001 From: notaz Date: Thu, 18 Dec 2014 23:43:08 +0200 Subject: spu: rework synchronization --- libpcsxcore/new_dynarec/pcsxmem.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libpcsxcore/new_dynarec') diff --git a/libpcsxcore/new_dynarec/pcsxmem.c b/libpcsxcore/new_dynarec/pcsxmem.c index 0a75442..d5c32be 100644 --- a/libpcsxcore/new_dynarec/pcsxmem.c +++ b/libpcsxcore/new_dynarec/pcsxmem.c @@ -210,7 +210,7 @@ make_dma_func(6) static void io_spu_write16(u32 value) { // meh - SPU_writeRegister(address, value); + SPU_writeRegister(address, value, psxRegs.cycle); } static void io_spu_write32(u32 value) @@ -218,8 +218,8 @@ static void io_spu_write32(u32 value) SPUwriteRegister wfunc = SPU_writeRegister; u32 a = address; - wfunc(a, value & 0xffff); - wfunc(a + 2, value >> 16); + wfunc(a, value & 0xffff, psxRegs.cycle); + wfunc(a + 2, value >> 16, psxRegs.cycle); } static u32 io_gpu_read_status(void) -- cgit v1.2.3