mgba-emu / mgba

mGBA Game Boy Advance Emulator
https://mgba.io/
Mozilla Public License 2.0
5.72k stars 790 forks source link

Sim City 2000 crashes on save #277

Closed BPzeBanshee closed 7 years ago

BPzeBanshee commented 8 years ago

Running mGBA version 0.5-3644-c313f09 OS: Windows 7 CPU: i7-2600 GPU: Geforce GT 545 Image where the problem occurs: 0000

Steps: Start New Map Pick template, OK Map name, OK Mayor name, OK Set money and year, OK Start (default 1) Options, last page tick Empty file and save

The game seems to internally crash on save with the English revision version of Sim City 2000 ("SimCity 2000 (Europe) (En,Fr,De,Es,It) (Rev 1)" according to no-intro, "simcit2k" in MAME's gba.xml softlist), and only this version. Comparing to other emulators, MAME's GBA emulation also fails at this spot but NO$GBA v2.8d runs it just fine. I dumped the ROM myself so I can confirm it's not a dumping issue, and the game saved to its own cartridge just fine on the real device.

endrift commented 8 years ago

I can't reproduce. It's probably an issue with the fact that it uses an EEPROM save, so a self-done dump isn't necessarily a clean dump.

sczther commented 8 years ago

You did probably try the original game endrift, this is affecting only rev. 1

endrift commented 8 years ago

Confirmed broken on rev 1. I was trying the US version which doesn't have a rev 1.

endrift commented 8 years ago

This only appears to happen when there's no save present. I wonder if the initial state of the EEPROM is bad?

BPzeBanshee commented 8 years ago

I found in testing with MAME that overriding an existing save will let it pass but if you then attempt to load that file it still crashes. I'll test this with mGBA shortly. EDIT: I can confirm by either A) attempting to transplant an existing save from another set and then overwriting said save B) triggering this crash and then attempting to override the save generated in mGBA it'll save and claim it's done but crash on loading it again.

endrift commented 7 years ago

Seems to work on master now. Let me know if it's still broken.

BPzeBanshee commented 7 years ago

Confirmed fixed. Thanks for this! As a side note I was pleasantly surprised to find that upon firing up my ROM from my personal dumps folder it also correctly loaded the original save file that was also dumped.