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

Crash without any error dialog #791

Closed binarycow closed 4 years ago

binarycow commented 4 years ago

Steps to replicate:

nestest-automated.nes is the normal nestest.nes file, with 0xC000 manually entered in the reset vector: nestest-automated.nes.zip

Here are my Mesen settings: settings.zip

And here's the debugger files. Note that in the trace log, it seemed to crash in the middle of an RTS instruction. nestest-automated.Workspace.zip

Additionally, note that when running this rom in Mesen (without the debugger attached) it states "Game has crashed (Invalid OP code - CPU crashed.)"

SourMesen commented 4 years ago

Thanks for the report.

I haven't investigated in depth yet, but it looks like the crash may be due to the ROM attempting to execute code from unmapped memory (e.g open bus) at $5xxx, which is causing issues with some of the debugger logic (and crashes in the debugger's code.)

It does not appear to be related to invalid opcodes - these are treated as any other op code, the only difference is that a message is shown when a "halt" opcode is hit to inform the user the game has crashed.

SourMesen commented 4 years ago

The crashes should be fixed as of the latest commit - thanks again for the report!