Skip to content

Commit

Permalink
Add SGM memory to Coleco memory map (#350)
Browse files Browse the repository at this point in the history
  • Loading branch information
CasualPokePlayer authored Jun 17, 2024
1 parent 8ac8aa4 commit 46ce5d8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions src/rcheevos/consoleinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
2 changes: 1 addition & 1 deletion test/rcheevos/test_consoleinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 46ce5d8

Please sign in to comment.