From: notaz Date: Sat, 6 Dec 2014 16:26:16 +0000 (+0200) Subject: psxmem: remove hard requirement for a mapping X-Git-Tag: r24l~898^2~2 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4726dba005562cbaf69cc8e10ef7102184c4a089;p=pcsx_rearmed.git psxmem: remove hard requirement for a mapping not all platforms have 1f800000 free not all mmap implementations use the addr hint.. --- diff --git a/libpcsxcore/new_dynarec/assem_arm.c b/libpcsxcore/new_dynarec/assem_arm.c index 45edd655..9ee832ef 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 diff --git a/libpcsxcore/psxmem.c b/libpcsxcore/psxmem.c index 2ca5dd58..7001744b 100644 --- a/libpcsxcore/psxmem.c +++ b/libpcsxcore/psxmem.c @@ -150,11 +150,11 @@ int psxMemInit() { } psxP = &psxM[0x200000]; - psxH = psxMap(0x1f800000, 0x10000, 1, MAP_TAG_OTHER); + psxH = psxMap(0x1f800000, 0x10000, 0, MAP_TAG_OTHER); psxR = psxMap(0x1fc00000, 0x80000, 0, MAP_TAG_OTHER); if (psxMemRLUT == NULL || psxMemWLUT == NULL || - psxR == NULL || psxP == NULL || psxH != (void *)0x1f800000) { + psxR == NULL || psxP == NULL || psxH == NULL) { SysMessage(_("Error allocating memory!")); psxMemShutdown(); return -1;