0 Members and 1 Guest are viewing this topic.
What happens if you don't? Does it not register the keypresses?
I assume so. Isn't a smaller delay enough, though? Personally I would hate if the delay was too long because then the game starts slowing down, which is bad if you are using grayscale.
Quote from: Deep Thought on September 26, 2010, 06:00:50 pmWhat happens if you don't? Does it not register the keypresses?Yeah, like if I'm holding down 2nd it'll go on sometimes.
The "Pause" command is a a loop of "djnz $+0" commands which is equivalent to about 850 nop's per pause number.The original getkey(#) command waited 8 clock cycles which I think is enough for 6MHz. getkey(0) was a separate routine which only waited 4 clock cycles. I have now merged the 2 into a single command that waits 13 clock cycles which might be enough for 15MHz. As a result, the getkey routine is a little larger, but each call to getkey(0) is 3 bytes less now, so the program size would actually go down if you were using it more than once.