Support Neo Geo Pocket

For after https://github.com/libretro/beetle-ngp-libretro/pull/37 is merged.
This commit is contained in:
celerizer 2017-12-28 16:38:57 -06:00 committed by GitHub
parent 00567ac3a8
commit a79bd5a509
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View File

@ -63,7 +63,7 @@ typedef enum
CHEEVOS_CONSOLE_MASTER_SYSTEM = 11, CHEEVOS_CONSOLE_MASTER_SYSTEM = 11,
CHEEVOS_CONSOLE_PLAYSTATION = 12, CHEEVOS_CONSOLE_PLAYSTATION = 12,
CHEEVOS_CONSOLE_ATARI_LYNX = 13, CHEEVOS_CONSOLE_ATARI_LYNX = 13,
CHEEVOS_CONSOLE_NEOGEO = 14, CHEEVOS_CONSOLE_NEOGEO_POCKET = 14,
CHEEVOS_CONSOLE_XBOX_360 = 15, CHEEVOS_CONSOLE_XBOX_360 = 15,
CHEEVOS_CONSOLE_GAMECUBE = 16, CHEEVOS_CONSOLE_GAMECUBE = 16,
CHEEVOS_CONSOLE_ATARI_JAGUAR = 17, CHEEVOS_CONSOLE_ATARI_JAGUAR = 17,

View File

@ -191,6 +191,12 @@ void cheevos_var_patch_addr(cheevos_var_t* var, cheevos_console_t console)
var->value -= 0x2000; var->value -= 0x2000;
} }
} }
else if (console == CHEEVOS_CONSOLE_NEOGEO_POCKET)
{
if (var->value >= 0x4000 && var->value <= 0x7fff)
CHEEVOS_LOG(CHEEVOS_TAG "NGP memory address %X adjusted to %X\n", var->value, var->value - 0x004000);
var->value -= 0x4000;
}
if (system->mmaps.num_descriptors != 0) if (system->mmaps.num_descriptors != 0)
{ {