bfirsh / jsnes

A JavaScript NES emulator.
https://jsnes.org
Apache License 2.0
6.13k stars 831 forks source link

Emulator hangs when playing my homebrew ROM #337

Open wendelscardua opened 4 years ago

wendelscardua commented 4 years ago

I made a NES ROM for a Game Jam, and it's simply a Mapper 0 one: https://wendelscardua.itch.io/retropia

It plays fine on many emulators (at the moment I tried on FCEUX, Nintaco and NintendulatorDX), but one of its minigames just hangs on JSNES.

If it helps, I've uploaded a debug version of the game here: https://scardua.net/retropia-debug.nes . Debug version makes all minigames available on the first area; the one that hangs is "Mine Finder". Steps to reproduce bug: start new game, then move player to the bottom left cartridge to get the minigame Mine Finder; after that, Select opens the inventory; point to the Mine Finder cartridge then press A, which will start the minigame; when the grid shows up pressing either A or B hangs the emulator.

bfirsh commented 4 years ago

Thanks for the report!

wendelscardua commented 4 years ago

I may try to make a smaller/simpler ROM to help debugging this, but for now I've found that this is probably the point in my ROM where JSNES is hanging:

vblankwait:
  BIT PPUSTATUS
  BPL vblankwait

where PPUSTATUS is $2002

(got the CPU PC register from browser console)