Fix SRAM handling with Bsnes v087

Bsnes v087 changes the SRAM names. Map those to the old names to preserve
compatiblity.
This commit is contained in:
Ilari Liusvaara 2012-03-13 08:52:10 +02:00
parent 0fe0e6c147
commit 229a121b97
5 changed files with 39 additions and 1 deletions

View file

@ -1 +1 @@
1-Δ5ε1
1-Δ5ε2

View file

@ -5924,5 +5924,17 @@ Movieinfo: Fix display of port #2 type.
Call on_input() after loadstate.
\end_layout
\begin_layout Subsection
rr1-delta5epsilon2
\end_layout
\begin_layout Itemize
Fix writing port2 data to movie.
\end_layout
\begin_layout Itemize
Fix SRAM handling with Bsnes v087.
\end_layout
\end_body
\end_document

View file

@ -2920,3 +2920,7 @@ set-axis joystick0axis19 disabled
• Call on_input() after loadstate.
15.55 rr1-delta5epsilon2
• Fix writing port2 data to movie.

View file

@ -499,6 +499,17 @@ namespace
std::string sram_name(const nall::string& _id, SNES::Cartridge::Slot slotname)
{
std::string id(_id, _id.length());
//Fixup name change by bsnes v087...
if(id == "bsx.ram")
id = ".bss";
if(id == "bsx.psram")
id = ".bsp";
if(id == "program.rtc")
id = ".rtc";
if(id == "upd96050.ram")
id = ".dsp";
if(id == "program.ram")
id = ".srm";
if(slotname == SNES::Cartridge::Slot::SufamiTurboA)
return "slota." + id.substr(1);
if(slotname == SNES::Cartridge::Slot::SufamiTurboB)

View file

@ -80,6 +80,17 @@ namespace
std::string sram_name(const nall::string& _id, SNES::Cartridge::Slot slotname)
{
std::string id(_id, _id.length());
//Fixup name change by bsnes v087...
if(id == "bsx.ram")
id = ".bss";
if(id == "bsx.psram")
id = ".bsp";
if(id == "program.rtc")
id = ".rtc";
if(id == "upd96050.ram")
id = ".dsp";
if(id == "program.ram")
id = ".srm";
if(slotname == SNES::Cartridge::Slot::SufamiTurboA)
return "slota." + id.substr(1);
if(slotname == SNES::Cartridge::Slot::SufamiTurboB)