diff --git a/src/emucore/M6532.hxx b/src/emucore/M6532.hxx index b57f3be2d..b551f4761 100644 --- a/src/emucore/M6532.hxx +++ b/src/emucore/M6532.hxx @@ -123,6 +123,13 @@ class M6532 : public Device */ void updateEmulation(); + /** + Get a pointer to the RAM contents. + + @return Pointer to RAM array. + */ + uInt8* getRAM() { return myRAM; } + private: void setTimerRegister(uInt8 data, uInt8 interval); diff --git a/src/libretro/StellaLIBRETRO.hxx b/src/libretro/StellaLIBRETRO.hxx index d7dfd17b3..9eb4a0369 100644 --- a/src/libretro/StellaLIBRETRO.hxx +++ b/src/libretro/StellaLIBRETRO.hxx @@ -62,8 +62,8 @@ class StellaLIBRETRO uInt32 getROMSize() { return rom_size; } uInt32 getROMMax() { return 512 * 1024; } - //uInt8* getRAM() { return myOSystem->console().system().m6532().getRAM(); } - //uInt32 getRAMSize() { return 128; } + uInt8* getRAM() { return myOSystem->console().system().m6532().getRAM(); } + uInt32 getRAMSize() { return 128; } size_t getStateSize(); diff --git a/src/libretro/libretro.cxx b/src/libretro/libretro.cxx index 76b947410..779fb430b 100644 --- a/src/libretro/libretro.cxx +++ b/src/libretro/libretro.cxx @@ -613,8 +613,11 @@ void *retro_get_memory_data(unsigned id) { switch (id) { - //case RETRO_MEMORY_SYSTEM_RAM: return stella.getRAM(); - default: return NULL; + case RETRO_MEMORY_SYSTEM_RAM: + return stella.getRAM(); + + default: + return NULL; } } @@ -623,8 +626,11 @@ size_t retro_get_memory_size(unsigned id) { switch (id) { - //case RETRO_MEMORY_SYSTEM_RAM: return stella.getRAMSize(); - default: return 0; + case RETRO_MEMORY_SYSTEM_RAM: + return stella.getRAMSize(); + + default: + return 0; } }