dcrespo3d / ZX-ESPectrum-Wiimote

A ZX spectrum 48K/128K emulator running on ESP32 powered Lilygo TTGo VGA32 v1.4 board, using PS2 keyboard and/or Wiimote as input device. Active branches are master and devkit-custom
MIT License
67 stars 18 forks source link

Saving RAM in a boot.cfg file #18

Closed DrNorfolk closed 2 years ago

DrNorfolk commented 2 years ago

Hi, dcrespo3d. Great project, I really like it, I serve for development. I would like to say my wishes, suddenly you can do it. I want the game not to save on shutdown in a file boot.cfg I like it when zx spectrum loads in its classic view. I solved this possibility in this way: I added a setting to the file Config.cpp lines 124-125

    #ifdef SAVE_RAM
    Serial.printf("  + ram:%s\n", ram_file.c_str());
    f.printf("ram:%s\n", ram_file.c_str());
    #endif

And somewhere you need to define this #define SAVE_RAM

Thank you, I will be glad if you implement this feature in future versions

dcrespo3d commented 2 years ago

I have #defined SNAPSHOT_LOAD_LAST, which controls saving (and loading) of ram file name to/from config file. You can comment out the define in hardconfig.h.

DrNorfolk commented 2 years ago

dcrespo3d, Great job! I checked, everything works!