From a79bd5a509e3ace7004612337322e2013ad6d1ca Mon Sep 17 00:00:00 2001 From: celerizer <33245078+celerizer@users.noreply.github.com> Date: Thu, 28 Dec 2017 16:38:57 -0600 Subject: [PATCH] Support Neo Geo Pocket For after https://github.com/libretro/beetle-ngp-libretro/pull/37 is merged. --- cheevos/cheevos.h | 2 +- cheevos/var.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/cheevos/cheevos.h b/cheevos/cheevos.h index ed1baae311..bf074e9a61 100644 --- a/cheevos/cheevos.h +++ b/cheevos/cheevos.h @@ -63,7 +63,7 @@ typedef enum CHEEVOS_CONSOLE_MASTER_SYSTEM = 11, CHEEVOS_CONSOLE_PLAYSTATION = 12, CHEEVOS_CONSOLE_ATARI_LYNX = 13, - CHEEVOS_CONSOLE_NEOGEO = 14, + CHEEVOS_CONSOLE_NEOGEO_POCKET = 14, CHEEVOS_CONSOLE_XBOX_360 = 15, CHEEVOS_CONSOLE_GAMECUBE = 16, CHEEVOS_CONSOLE_ATARI_JAGUAR = 17, diff --git a/cheevos/var.c b/cheevos/var.c index e0e6d5c6d8..41884a72b6 100644 --- a/cheevos/var.c +++ b/cheevos/var.c @@ -191,6 +191,12 @@ void cheevos_var_patch_addr(cheevos_var_t* var, cheevos_console_t console) 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) {