libretro / RetroArch

Cross-platform, sophisticated frontend for the libretro API. Licensed GPLv3.
http://www.libretro.com
GNU General Public License v3.0
10.4k stars 1.84k forks source link

unnecessary save battery files created and wrong extensions #6

Closed eadmaster closed 12 years ago

eadmaster commented 12 years ago

I've noticed the emulator always creates a 64KB savegame filled with 1s even when the game does not make use of it.

Also, the save battery files usually have different extensions: .srm -> used for SNES and Genesis .sav -> used for GBx, NES and SMS

Themaister commented 12 years ago

Which core is this? If the core reports sram being present even if it's not, it's not something SSNES can deal with. Also, SSNES uses .srm for all cores. If the core also dumps a .sav for some reason, that is a bug.

eadmaster commented 12 years ago

I've verified unnecessary save battery files with Genesis Plus GX.

Themaister commented 12 years ago

Found a flag in genplus that might fix this. I have pushed new genplus builds in Phoenix updater, it also has an NTSC build included, so would be nice if you could test if sram and NTSC work as expected.

eadmaster commented 12 years ago

I've tried both "genplusgx-git-x86.dll" and "genplusgx-ntsc-git-x86.dll" with "Sonic The Hedgehog (W) (REV 00) [!].bin", and both bugs are still there! In the NTSC build the aspect ratio and the colors looks wrong.

Themaister commented 12 years ago

Looks like NTSC stuff broke when we imported the latest core. Fixed it up, and works fine here now. New build in updater.

As for aspect ratio, you will have to manually set this to say, 4:3 in video options. NTSC filter completely messes up the pixel-aspect ratio to something like 3:1, and by default SSNES follows the pixel-ratio.

For SRAM stuff, I don't know what's going on if checking for sram.on doesn't fix it. Maybe ekeeke knows.

ekeeke commented 12 years ago

SRAM is enabled by default for any ROM files smaller than 2MB so you shouldn't rely on sram.on flag for saving SRAM.

You should instead recalculate CRC of sram.sram to see if it has been modified. sram.crc is initialized in sram_init() when SRAM is initialized to 0xFF.

Themaister commented 12 years ago

I'll close the issue here as it's not directly related to SSNES, but libsnes implementation of genplus. Feel free to reopen the issue on https://github.com/twinaphex/genesis-next.

eadmaster commented 12 years ago

Ok, the issue was also about some cores should have a different savebattery extension to ease the sharing with other emulators: .sav -> used for GBx, NES, SMS and GG

eadmaster commented 12 years ago

If it is not possible to hard-code these extensions, I suggest adding an option "savefile_extension" for this purpose.