This causes crashes in PSP quite often in many games. Other CPUs might
(depending on the processor state) silently return zero or some
undefined value.
The fix is borrowed from ReGBA's codebase
I think this does not make a difference at all in the code, since PC is
treated in a special way anyway (reloaded with an immediate when read
and treated as an indirect branch when written). However for the sake of
completeness I'm undoing what I did. (The comma fix stays :P)
Turns out there were a couple of very interesting and hard to track
bugs. A missing comma made the reg list too short, leaving the 31th
element at the mercy of the linker ordering algorithm, which seems to
work in some cases depending on the compiler version.
Also the cache flush code seemed not to work on my machine (OGA),
not sure why it wored in the past :/
- Based on notes, gpSP's RTC does was based on vba.
- I've updated relevant sections of it based on latest vba.
reference issue: https://github.com/libretro/gpsp/issues/79
- Removing RETRO_SYSTEM_MEMORY from retro_get_memory_data/size
since its incompatible for 2 reasons:
1. gba uses at least 2 blocks of memory, which is not supported
2. the way gpsp's memory block are not contiguous (see memory
descriptors)
- Adds core option to allow battery saves using the libretro api
(retro_get_memory_data/size)
- Initial save size set at 128KB and actual size is automatically
determined internally by gba.
- This will always assume that a save file is supported since save
size or type cannot be determined until gba tries to write to backup memory.
- A 128KB block of memory is used as buffer, similar method to VBA
Next/Beetle GBA workarounds.
Fix https://github.com/libretro/gpsp/issues/72