You COULD do a vblank timed code. Like say here:
Code:
nmi:
inc VblankCount
jsr stuff
...
stuff:
;This is around 1 second. I know it's needs to be at least 64 Vblanks to initiate,
;But that's not far from a second.
lda VblankCount
lsr a
bmi SeeIfCheating
rts
SeeIfCheating:
;Okay, here we are saying if A was pressed more than
;4 times
lda AButtonPressedFlag
asl a ;Multiply by 2
asl a ;Multiply by 4
asl a ;By 8
asl a ;By 16
asl a ;By 32
;If A was pressed 4 times, AButtonPressedFlag (Which you increment every button press) will equal
;00000100 in binary
;shift right 5 times
;If it was pressed 4 times, it will equal 10000000, which means bit 7 is set!
bmi CHEATING!
lda #$00
sta VblankCount
sta AButtonPressed
rts
CHEATING!:
;Whatever code saying that they are cheating.
There are other ways you could do this, but this is just one method. And about the AButtonPressedFlag, you want a system so that if A is pressed and held, it won't increment it more than once. I use a method where I see in my NoKey routine, I store #$00 in AButtonPressedFlag, BButtonPressedFlag, etc. Which are variables for checking if A or B is being held. Here, look:
Code:
Akey:
lda ADown
bmi +
dec ADown ;Make #$FF! Set Bit 7!
inc AButtonPressedFlag ;What you'd want to do.
+ ....
rts
...
Nokey:
lda #$00
sta ADown
....
rts
And it should work. I'm sorry if I'm confusing. I'm just trying to help...