notaz.gp2x.de
/
pcsx_rearmed.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Change the build status to libretro
[pcsx_rearmed.git]
/
libpcsxcore
/
psxmem.c
diff --git
a/libpcsxcore/psxmem.c
b/libpcsxcore/psxmem.c
index
6277220
..
14fd911
100644
(file)
--- a/
libpcsxcore/psxmem.c
+++ b/
libpcsxcore/psxmem.c
@@
-43,7
+43,7
@@
void *psxMap(unsigned long addr, size_t size, int is_fixed,
enum psxMapTag tag)
{
int flags = MAP_PRIVATE | MAP_ANONYMOUS;
enum psxMapTag tag)
{
int flags = MAP_PRIVATE | MAP_ANONYMOUS;
- int tr
ied_to_align
= 0;
+ int tr
y_
= 0;
unsigned long mask;
void *req, *ret;
unsigned long mask;
void *req, *ret;
@@
-73,15
+73,15
@@
retry:
return NULL;
}
return NULL;
}
- if (((addr ^ (
long)ret) & 0x00ffffff) && !tried_to_align
)
+ if (((addr ^ (
unsigned long)ret) & ~0xff000000l) && try_ < 2
)
{
psxUnmap(ret, size, tag);
// try to use similarly aligned memory instead
// (recompiler needs this)
{
psxUnmap(ret, size, tag);
// try to use similarly aligned memory instead
// (recompiler needs this)
- mask =
(addr - 1) & ~addr & 0x07
ffffff;
- addr = (
unsigned long)(
ret + mask) & ~mask;
- tr
ied_to_align = 1
;
+ mask =
try_ ? 0xffff : 0x
ffffff;
+ addr = (
(unsigned long)
ret + mask) & ~mask;
+ tr
y_++
;
goto retry;
}
}
goto retry;
}
}
@@
-137,13
+137,8
@@
int psxMemInit() {
psxM = psxMap(0x80000000, 0x00210000, 1, MAP_TAG_RAM);
#ifndef RAM_FIXED
psxM = psxMap(0x80000000, 0x00210000, 1, MAP_TAG_RAM);
#ifndef RAM_FIXED
-#ifdef __BLACKBERRY_QNX__
if (psxM == NULL)
psxM = psxMap(0x77000000, 0x00210000, 0, MAP_TAG_RAM);
if (psxM == NULL)
psxM = psxMap(0x77000000, 0x00210000, 0, MAP_TAG_RAM);
-#else
- if (psxM == NULL)
- psxM = psxMap(0x78000000, 0x00210000, 0, MAP_TAG_RAM);
-#endif
#endif
if (psxM == NULL) {
SysMessage(_("mapping main RAM failed"));
#endif
if (psxM == NULL) {
SysMessage(_("mapping main RAM failed"));