Weird bug in my emulator! [SOLVED]

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
Weird bug in my emulator! [SOLVED]
by on (#188078)
1. Running the Stars Demo (PD), I got an invalid opcode ($12), and the emulator tries to RESET.
2. Loading a new ROM makes the bug to trigger... see the screenshot. Not only that game, but any other.

WTF is that?
Re: Weird bug in my emulator!
by on (#188082)
It is some assembly code error. An opcode is a number for the instruction that is running. What ROM are you playing? I'd recommend using Nestopia as your emulator.

http://nestopia.sourceforge.net/
Re: Weird bug in my emulator!
by on (#188083)
DementedPurple wrote:
It is some assembly code error. An opcode is a number for the instruction that is running. What ROM are you playing? I'd recommend using Nestopia as your emulator.

http://nestopia.sourceforge.net/

You must be kidding...
Re: Weird bug in my emulator!
by on (#188084)
Zepper wrote:
1. Running the Stars Demo (PD), I got an invalid opcode ($12), and the emulator tries to RESET.
2. Loading a new ROM makes the bug to trigger... see the screenshot. Not only that game, but any other.

WTF is that?


1. The ROM ends up reading from un-cleared RAM starting at $0784. Emulators that initilize RAM with $FF will end up eventually at instruciton $12. If you initialize all RAM to 0 instead, the demo should run just fine.

2. Not sure aside from stating the obvious that something isn't being reset properly.
Re: Weird bug in my emulator!
by on (#188085)
Alyosha_TAS wrote:
1. The ROM ends up reading from un-cleared RAM starting at $0784. Emulators that initilize RAM with $FF will end up eventually at instruciton $12. If you initialize all RAM to 0 instead, the demo should run just fine.

Yeah, that's a known problem. ^_^;;

Quote:
2. Not sure aside from stating the obvious that something isn't being reset properly.

Did you said... OBVIOUS? :lol:

Joke aside, it's not happening on soft/hard reset, or even when I load another ROM. Weird and found it by accident.
Re: Weird bug in my emulator!
by on (#188086)
Added to list of bugs in widespread homebrew and hacks
Re: Weird bug in my emulator!
by on (#188087)
Found the problem. The gfx frame pointer wasn't being set to zero. Well, it was an obscure problem... but I guess details won't be interesting anyways. ^_^;;
Re: Weird bug in my emulator! [SOLVED]
by on (#188282)
What's going on with Chu Chu Rocket?
Re: Weird bug in my emulator! [SOLVED]
by on (#188295)
Dwedit wrote:
What's going on with Chu Chu Rocket?

Nothing. 8-) It was a bug in my emulator frame pointer.