aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Cercueil2020-01-30 15:15:16 +0200
committerPaul Cercueil2020-02-08 11:44:53 -0300
commit38c19eff92f3440c9a50f336b2adc9b297925f0c (patch)
tree062d644190c8035daa71d5603d0cc617e00224a7
parent81c4586ff05b003fc65201c3e4504738996d6412 (diff)
downloadpcsx_rearmed-38c19eff92f3440c9a50f336b2adc9b297925f0c.tar.gz
pcsx_rearmed-38c19eff92f3440c9a50f336b2adc9b297925f0c.tar.bz2
pcsx_rearmed-38c19eff92f3440c9a50f336b2adc9b297925f0c.zip
pcsxmem: mmap RAM/BIOS/scratchpad to better locations
This permits the Lightrec dynarec to emit better code. Signed-off-by: Paul Cercueil <paul@crapouillou.net>
-rw-r--r--libpcsxcore/psxmem.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libpcsxcore/psxmem.c b/libpcsxcore/psxmem.c
index a1a641d..caa0d65 100644
--- a/libpcsxcore/psxmem.c
+++ b/libpcsxcore/psxmem.c
@@ -42,7 +42,7 @@ void (*psxUnmapHook)(void *ptr, size_t size, enum psxMapTag tag);
void *psxMap(unsigned long addr, size_t size, int is_fixed,
enum psxMapTag tag)
{
- int flags = MAP_PRIVATE | MAP_ANONYMOUS;
+ int flags = MAP_PRIVATE | MAP_ANONYMOUS | MAP_FIXED;
int try_ = 0;
unsigned long mask;
void *req, *ret;
@@ -135,7 +135,7 @@ int psxMemInit() {
memset(psxMemRLUT, 0, 0x10000 * sizeof(void *));
memset(psxMemWLUT, 0, 0x10000 * sizeof(void *));
- psxM = psxMap(0x80000000, 0x00210000, 1, MAP_TAG_RAM);
+ psxM = psxMap(0x30000000, 0x00210000, 1, MAP_TAG_RAM);
#ifndef RAM_FIXED
if (psxM == NULL)
psxM = psxMap(0x77000000, 0x00210000, 0, MAP_TAG_RAM);
@@ -146,8 +146,8 @@ int psxMemInit() {
}
psxP = &psxM[0x200000];
- psxH = psxMap(0x1f800000, 0x10000, 0, MAP_TAG_OTHER);
- psxR = psxMap(0x1fc00000, 0x80000, 0, MAP_TAG_OTHER);
+ psxH = psxMap(0x4f800000, 0x10000, 0, MAP_TAG_OTHER);
+ psxR = psxMap(0x4fc00000, 0x80000, 0, MAP_TAG_OTHER);
if (psxMemRLUT == NULL || psxMemWLUT == NULL ||
psxR == NULL || psxP == NULL || psxH == NULL) {