unregistered wrote:
What could be going bad? It just ran through the code once and then it started the MainLoop again and is back to the same part of the loop... it'll keep going and going and going and going...
To clarify, you logged from the very first instruction (power on), compared the log with your source code and cannot find an error? If you haven't done this, do it, especially if you have no idea what else to do.
Are you waiting a couple of frames for the PPU to warm up before writing to $2006 for the first time? That's about the last thing I can really think of.
The main loop looping just means the main loop is working fine. There could still be something wrong before it. Your NMI could be doing something that affects your tile or palette writing, or who knows what else. As was said by shiru and cpow, there's not much we can say that hasn't already been said with the information we've been given.
If you looked through a log from the beginning and even that didn't help, If I were you, I'd get rid of all the code except the absolute standard stuff (clearing RAM, waiting for vblank twice) before your main loop, which seems to be working fine. Reimplement each thing one by one. (Save the old code in a separate file, that's not assembled so it's not lost)
I'd start with palettes. You said your palettes were all black. After getting rid of this new screen code, just put in what writes the palettes.
If that works, cool. Try to put another small piece back. If not, well, I have no idea. REALLY check your NMI? I would actually start over if that didn't work. You've only got an NMI and a function that reads the joypad from the look of things.
If it's taking you longer to debug than it would to rewrite you're losing time. If you choose to rewrite, keep careful track of changes so you don't run into a similar problem. Make sure each piece works before moving on.