diff --git a/src/rcheevos/consoleinfo.c b/src/rcheevos/consoleinfo.c index cf37b5a9..b8bee226 100644 --- a/src/rcheevos/consoleinfo.c +++ b/src/rcheevos/consoleinfo.c @@ -368,9 +368,14 @@ static const rc_memory_regions_t rc_memory_regions_atari_lynx = { _rc_memory_reg /* ===== ColecoVision ===== */ static const rc_memory_region_t _rc_memory_regions_colecovision[] = { - { 0x000000U, 0x0003FFU, 0x006000U, RC_MEMORY_TYPE_SYSTEM_RAM, "System RAM" } + /* "System RAM" refers to the main RAM at 0x6000-0x63FF. However, this RAM might not always be visible. + * If the Super Game Module (SGM) is active, then it might overlay its own RAM at 0x0000-0x1FFF and 0x2000-0x7FFF. + * These positions overlap the BIOS and System RAM, therefore we use virtual addresses for these memory spaces. */ + { 0x000000U, 0x0003FFU, 0x006000U, RC_MEMORY_TYPE_SYSTEM_RAM, "System RAM" }, + { 0x000400U, 0x0023FFU, 0x010000U, RC_MEMORY_TYPE_SYSTEM_RAM, "SGM Low RAM" }, /* Normally situated at 0x0000-0x1FFF, which overlaps the BIOS */ + { 0x002400U, 0x0083FFU, 0x012000U, RC_MEMORY_TYPE_SYSTEM_RAM, "SGM High RAM" } /* Normally situated at 0x2000-0x7FFF, which overlaps System RAM */ }; -static const rc_memory_regions_t rc_memory_regions_colecovision = { _rc_memory_regions_colecovision, 1 }; +static const rc_memory_regions_t rc_memory_regions_colecovision = { _rc_memory_regions_colecovision, 3 }; /* ===== Commodore 64 ===== */ /* https://www.c64-wiki.com/wiki/Memory_Map */ diff --git a/test/rcheevos/test_consoleinfo.c b/test/rcheevos/test_consoleinfo.c index 7909b52a..376d3e4e 100644 --- a/test/rcheevos/test_consoleinfo.c +++ b/test/rcheevos/test_consoleinfo.c @@ -139,7 +139,7 @@ void test_consoleinfo(void) { TEST_PARAMS2(test_memory, RC_CONSOLE_ATARI_JAGUAR, 0x200000); TEST_PARAMS2(test_memory, RC_CONSOLE_ATARI_JAGUAR_CD, 0x200000); TEST_PARAMS2(test_memory, RC_CONSOLE_ATARI_LYNX, 0x010000); - TEST_PARAMS2(test_memory, RC_CONSOLE_COLECOVISION, 0x000400); + TEST_PARAMS2(test_memory, RC_CONSOLE_COLECOVISION, 0x008400); TEST_PARAMS2(test_memory, RC_CONSOLE_COMMODORE_64, 0x010000); TEST_PARAMS2(test_memory, RC_CONSOLE_DREAMCAST, 0x01000000); TEST_PARAMS2(test_memory, RC_CONSOLE_ELEKTOR_TV_GAMES_COMPUTER, 0x001800);