Skip to content

[request] implement RETRO_ENVIRONMENT_SET_MEMORY_MAPS for SMS (and other systems) #346

@beauxq

Description

@beauxq

In RetroArch, I've been using the network commands READ_CORE_RAM and WRITE_CORE_RAM for something that they're not intended for.
And the people at RetroArch tell me I should be using READ_CORE_MEMORY and WRITE_CORE_MEMORY instead.
But I can't use those if the emulator doesn't implement RETRO_ENVIRONMENT_SET_MEMORY_MAPS

From this code, it looks like it's implemented for SYSTEM_MCD, but not for SMS or other systems.
But I'm not sure whether I'm understanding it correctly.

static void set_memory_maps(void)
{
if (system_hw == SYSTEM_MCD)
{
const size_t SCD_BIT = 1ULL << 31ULL;
const uint64_t mem = RETRO_MEMDESC_SYSTEM_RAM;
struct retro_memory_map mmaps;
struct retro_memory_descriptor descs[] = {
{ mem, work_ram, 0, 0xFF0000, 0, 0, 0x10000, "68KRAM" },
/* virtual address using SCD_BIT so all 512M of prg_ram can be accessed */
/* at address $80020000 */
{ mem, scd.prg_ram, 0, SCD_BIT | 0x020000, 0, 0, 0x80000, "PRGRAM" },
};
mmaps.descriptors = descs;
mmaps.num_descriptors = sizeof(descs) / sizeof(descs[0]);
environ_cb(RETRO_ENVIRONMENT_SET_MEMORY_MAPS, &mmaps);
}
}

It would be nice if I could use READ_CORE_MEMORY and WRITE_CORE_MEMORY with Genesis-Plus-GX (and SMS-Plus-GX), with SMS games.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions