aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTwinaphex2020-02-09 08:58:45 +0100
committerGitHub2020-02-09 08:58:45 +0100
commita62012a79925d0af4c2162be152d7800c669e6d6 (patch)
tree295aaad54d7dbfcd4d96dc694711929a1c7e65e2
parent8ac2b9d2af5d05f3a39c38905f4705de15b448e0 (diff)
downloadpcsx_rearmed-a62012a79925d0af4c2162be152d7800c669e6d6.tar.gz
pcsx_rearmed-a62012a79925d0af4c2162be152d7800c669e6d6.tar.bz2
pcsx_rearmed-a62012a79925d0af4c2162be152d7800c669e6d6.zip
Update psxmem.c
-rw-r--r--libpcsxcore/psxmem.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/libpcsxcore/psxmem.c b/libpcsxcore/psxmem.c
index caa0d65..cfd880b 100644
--- a/libpcsxcore/psxmem.c
+++ b/libpcsxcore/psxmem.c
@@ -42,7 +42,12 @@ void (*psxUnmapHook)(void *ptr, size_t size, enum psxMapTag tag);
void *psxMap(unsigned long addr, size_t size, int is_fixed,
enum psxMapTag tag)
{
+#ifdef LIGHTREC
int flags = MAP_PRIVATE | MAP_ANONYMOUS | MAP_FIXED;
+#else
+ int flags = MAP_PRIVATE | MAP_ANONYMOUS;
+#endif
+
int try_ = 0;
unsigned long mask;
void *req, *ret;
@@ -135,7 +140,11 @@ int psxMemInit() {
memset(psxMemRLUT, 0, 0x10000 * sizeof(void *));
memset(psxMemWLUT, 0, 0x10000 * sizeof(void *));
+#ifdef LIGHTREC
psxM = psxMap(0x30000000, 0x00210000, 1, MAP_TAG_RAM);
+#else
+ psxM = psxMap(0x80000000, 0x00210000, 1, MAP_TAG_RAM);
+#endif
#ifndef RAM_FIXED
if (psxM == NULL)
psxM = psxMap(0x77000000, 0x00210000, 0, MAP_TAG_RAM);
@@ -146,8 +155,13 @@ int psxMemInit() {
}
psxP = &psxM[0x200000];
+#ifdef LIGHTREC
psxH = psxMap(0x4f800000, 0x10000, 0, MAP_TAG_OTHER);
psxR = psxMap(0x4fc00000, 0x80000, 0, MAP_TAG_OTHER);
+#else
+ psxH = psxMap(0x1f800000, 0x10000, 0, MAP_TAG_OTHER);
+ psxR = psxMap(0x1fc00000, 0x80000, 0, MAP_TAG_OTHER);
+#endif
if (psxMemRLUT == NULL || psxMemWLUT == NULL ||
psxR == NULL || psxP == NULL || psxH == NULL) {