notaz.gp2x.de
/
pcsx_rearmed.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(from parent 1:
be2b713
)
Merge pull request #368 from negativeExponent/memmap
author
Twinaphex
<libretro@gmail.com>
Sat, 14 Dec 2019 18:09:16 +0000
(19:09 +0100)
committer
GitHub
<noreply@github.com>
Sat, 14 Dec 2019 18:09:16 +0000
(19:09 +0100)
Access psx main memory using retro_memory_map
frontend/libretro.c
patch
|
blob
|
blame
|
history
diff --git
a/frontend/libretro.c
b/frontend/libretro.c
index
4d49087
..
d63f126
100644
(file)
--- a/
frontend/libretro.c
+++ b/
frontend/libretro.c
@@
-1052,6
+1052,20
@@
strcasestr(const char *s, const char*find)
}
#endif
+static void set_retro_memmap(void)
+{
+ struct retro_memory_map retromap = { 0 };
+ struct retro_memory_descriptor mmap =
+ {
+ 0, psxM, 0, 0, 0, 0, 0x200000
+ };
+
+ retromap.descriptors = &mmap;
+ retromap.num_descriptors = 1;
+
+ environ_cb(RETRO_ENVIRONMENT_SET_MEMORY_MAPS, &retromap);
+}
+
bool retro_load_game(const struct retro_game_info *info)
{
size_t i;
@@
-1313,6
+1327,8
@@
bool retro_load_game(const struct retro_game_info *info)
}
}
+ set_retro_memmap();
+
return true;
}