EasyRPG / Player

RPG Maker 2000/2003 and EasyRPG games interpreter
https://easyrpg.org/player/
GNU General Public License v3.0
989 stars 185 forks source link

libretro: simple support for accessing game variables #3178

Closed celerizer closed 6 months ago

celerizer commented 9 months ago

Allows libretro frontends to read or poke game variables at runtime

Ghabry commented 9 months ago

Hi, what is the intention of this feature?

We talked about this years ago with retro achievements that exposing random chunks of memory is not a good approach because we are not an emulator.

The variables array can change its location and size while the game is running. We also give no guarantees that the memory layout starts the same forever.

celerizer commented 9 months ago

No real intention besides giving an implementation to the stubbed function. The data ptr and size should only be asked for between calls to retro_run so the core and frontend won't be trying to modify it at the same time. RetroArch has a cheat / memory search feature this could be used for.

Ghabry commented 6 months ago

Sorry but as I argued years ago in https://github.com/libretro/easyrpg-libretro/issues/49 I cannot accept this.

We are not an emulator and we have no fixed memory layout. The memory layout is an implementation detail and there is no guarantee that the memory layout of the variables will stay the same forever. And there are more useful data structures not reachable through this like e.g. switches, string variables etc.