Alright, good morning. So basically in the last two scanlines of the overscan, my program runs this:
checkfire:
sta WSYNC
lda #%01000010
sta VBLANK
lda #%01111111
eor INPT4
bmi fireisnotchecked
sta WSYNC
rts
fireisnotchecked:
sta WSYNC
ldy $80
iny
sty $80
rts
What I was trying to do is make it so that the p0 sprite moves down when the fire button is pressed by player 0. This part of the code is what loads and stores the new Y position of the p0 sprite whenever the fire button is pressed.
However, it only works if I check if INPT4 is not held down. If I reverse
lda #%01111111
to
lda #%10000000
The program goes haywire and Stella tells me that the framerate is ranging from 300-400 FPS. When I debug with Stella the VBLANK area seems to start somewhere in the middle of where the program would be drawing the visible picture. How is it that this is causing such a massive problem?
Also, obviously I could have used
bit INPT4
instead of
lda #%01111111
eor INPT4
but I was trying to find if that one would work.