I'm starting new project (Tic-Tac-Toe) and it gives me a flash of grey for one frame and then nothing when I load it into an emulator (Nestopia even says "CPU jam!"). Why won't it load? Download the file
here.
The vectors are all $FFFF, FCEUltra's debugger and memory viewer showed me that pretty quickly. I see you're using nesasm, it's just not working as one would expect. I think you only need to put another .bank command before you do the .org $FFFA.
Thanks Memblers, that worked. Now to finish the game...
I now have a new problem. For some reason, my joypad-reading routine always shows that A is pressed (#%10000000). Why? Newest build available
here.
I dont have nesasm but I was able to mostly convert it to CA65 and could reproduce the problem.
I believe this is because of the ROL call later in the PadLoop
From the 6502 simulator docs.
ROL shifts all bits left one position. The Carry is put in bit 0, and bit 7 becomes the carry.
Looks like you had a carry flag set when entering the subroutine so the next call to ORA P1Pad always sets the bit.
I was able to fix it by adding "CLC" right after entering the subroutine(right after the "ReadPad:" line)
Al