puppydrum64 wrote: ↑
Sun May 02, 2021 7:11 pm
My test cartridge is pretty simple.
I'm guessing that by "cartridge" you mean a ROM file? I don't mean to be pedantic, but these are very different things that can be affected by different problems.
It plays a little tune and that's it. The screen is black with nothing on it.
Are you explicitly making the screen black by setting the first palette entry to $0F and moving the VRAM pointer away from $3F00-$3FFF, or are you just expecting the screen to be black because you did nothing to it? Never trust anything to be in a particular state on power up, if you want something to be a certain way, you must write the code to make it stay that way.
I don't understand why since it's the same game. I might have a malformed cartridge header.
If a program isn't written properly, you bet it will behave differently in different emulators and consoles! No emulator is perfect, and even different consoles have subtle differences between them, so you must make sure that your programs perform all tasks in a safe way. "Safe" usually means initializing everything (don't ever rely on any "default" states, there's usually no such thing), and being prepared for slight timing variations, interrupts, and anything that can disrupt the flow of the program.
I tried going to BFF0 in my game's ROM using Mesen's memory viewer and it didn't even match up with the above header either.
You're not supposed to see the iNES header in the memory viewer, since it's not part of the game itself and is never mapped into the 6502 addressing space. Its purpose is to provide the emulator with information on how to run the game. Some emulators are able to show the ROM file itself in the memory viewer/editor, but in this case the header would show up at $0000, not $BFF0, since it's at the very beginning of the file.
In order to know what went wrong, we'd have to take a look at the 6502 code.