Question about retro_memory_* structs

I’m somewhat interested in porting an emulator fork I maintain to the libretro API, and I have a question about the retro_memory_descriptor and retro_memory_map structs in libretro.h. My question is… why do these even exist, and what are they used for?

As far as I know libretro is supposed to be a generic API for games and multimedia applications and not specific to emulators at all, so why does it want to know about an emulated machine’s memory map? If I port my emulator to libretro, do I have to worry about frontends deciding to randomly read and write to my emulated machine’s memory outside of the control of my emulation code?

Dev talk is usually done at #libretro at freenode, you might find more answers there :smiley: Anyway I asked for you

Alcaro> radius: they’re intended for cheats. Yes, the frontend can both read and write them if they exist. As far as I know, they’re currently only used by minir, not RetroArch. (And yes, it’s emu specific. Just don’t use it for non-emu cores.)