SourMesen / Mesen

Mesen is a cross-platform (Windows & Linux) NES/Famicom emulator built in C++ and C#
https://www.mesen.ca
GNU General Public License v3.0
1.25k stars 317 forks source link

[libretro] Mystic Origins doesn't start in Mesen 0.9.9 #795

Open keithbowes opened 4 years ago

keithbowes commented 4 years ago

It works fine in 0.9.8, but in 0.9.9, I get the following with retroarch --verbose:

retroarch: ../Utilities/IpsPatcher.cpp:130: static std::vector IpsPatcher::CreatePatch(std::vector, std::vector): Assertion `originalData.size() == newData.size()' failed.

Using git blame, it seems that that assertion was added years ago, so I don't know what exactly was changed between 0.9.8 and 0.9.9 to break it. I can't confirm whether this happens in standalone Mesen too, but I'd assume it does.

OS: Linux 5.5.9 Compiler: GCC 8.4.0

mesen.log

SourMesen commented 4 years ago

I think Mystic Origins is a mapper 30 (or maybe GTROM?) game. 0.9.9 adds support for cartridges that use self-flashing to save data. This is done by saving the save file to an IPS file in the saves folder. 0.9.8 doesn't support this, so it doesn't try to load or save IPS files for that mapper.

It looks like Mesen might be crashing when trying to create an IPS file for save states. It's likely that Retroarch's rewind functionality is attempting to create savestates, which is crashing. I'll try to see if I can reproduce it with another rom on my end - thanks for the report.

keithbowes commented 4 years ago

Yeah, it uses Mapper 30. When I initially downloaded it, I only kept the .nes file from the .jar file, but thinking that I might have been missing the IPS files that would cause Mesen not to crash, I redownloaded the entire .jar file, but that didn't help. It still crashes and the .jar file didn't seem to contain any .ips files.