workaround for sameboy only exposing RAM

This commit is contained in:
Jamiras 2020-01-28 19:48:56 -07:00
parent fe98aab910
commit 3ff13783fa
1 changed files with 18 additions and 4 deletions

View File

@ -401,7 +401,20 @@ static int rcheevos_parse(const char* json)
return 0;
}
/* Achievement memory accesses are 0-based, regardless of where the memory is accessed by the
* emulated code. As such, address 0 should always be accessible and serves as an indicator that
* other addresses will also be accessible. Individual achievements will be "Unsupported" if
* they contain addresses that cannot be resolved. This check gives the user immediate feedback
* if the core they're trying to use will disable all achievements as "Unsupported".
*/
if (!rcheevos_patch_address(0, rcheevos_locals.patchdata.console_id))
{
/* Special case: the sameboy core exposes the RAM at $8000, but not the ROM at $0000. NES and
* Gameboy achievements do attempt to map the entire bus, and it's unlikely that an achievement
* will reference the ROM data, so if the RAM is still present, allow the core to load. If any
* achievements do reference the ROM data, they'll be marked "Unsupported" individually.
*/
if (!rcheevos_patch_address(0x8000, rcheevos_locals.patchdata.console_id))
{
CHEEVOS_ERR(RCHEEVOS_TAG "No memory exposed by core\n");
@ -410,6 +423,7 @@ static int rcheevos_parse(const char* json)
goto error;
}
}
/* Allocate memory. */
rcheevos_locals.core = (rcheevos_cheevo_t*)