You are not logged in -
nap
CSDb User Forums
Forums
>
C64 Coding
>
m.l. keyboard scan - WinVice or Basic behavior?
2015-02-13
11:26
mstram
Account closed
Registered: Dec 2013
Posts: 112
m.l. keyboard scan - WinVice or Basic behavior?
If I run this directly from the vice monitor, (g 812) it works as expected : useless screen flashing until any key pressed.
If I run it from BASIC (sys 2066), it returns immediately, without any keys pressed (updates screen only once), until I added the "flush" code (my guess at what the problem was).
I.e. SYS 2066 doesn't work, SYS 2061 does.
; *=$80D / 2061
; jmp r1
; -------- BASIC "flush" code --------
r1
jsr keyscan
bne r1
; ---------------------------------------
; $812 / 2066
SEI
l1 INC $d021 ; screen bk color
jsr keyscan
beq l1
CLI
RTS
keyscan
LDA #$00
STA $DC00 ; test keyboard for any key pressed
LDA $DC01
CMP #$FF ; no key
rts
... 10 posts hidden. Click
here
to view all posts....
2015-02-14
14:07
chatGPZ
Registered: Dec 2001
Posts: 11386
Quote:
Gpz you are right: the "key" need to be debounced...
this has nothing to do with "debounce" actually. its as simple as that if you want to distinguish between two seperated keypresses, you have to wait for the first keypress to be over before you can check the next.
Previous
-
1
| 2 - Next
Refresh
Subscribe to this thread:
You need to be logged in to post in the forum.
Search the forum:
Search
All forums
C64 Coding
C64 Composing
C64 Pixeling
C64 Productions
CSDb Bug Reports
CSDb Development
CSDb Discussions
CSDb Entries
CSDb Feedback
CSDb Info
CSDb moderators
CSDb Questions
Messages to moderators
Requests
for
in
Writer & text
Text
Writer
All times are CET.
Search CSDb
All
Releases
Groups
Sceners
Events
BBS
SIDs
-------
Forum
Comments
Advanced
Users Online
LordCrass
Guests online: 84
Top Demos
1
Next Level
(9.7)
2
13:37
(9.7)
3
Mojo
(9.7)
4
Coma Light 13
(9.6)
5
Edge of Disgrace
(9.6)
6
What Is The Matrix 2
(9.6)
7
The Demo Coder
(9.6)
8
Uncensored
(9.6)
9
Comaland 100%
(9.6)
10
Wonderland XIV
(9.6)
Top onefile Demos
1
No Listen
(9.6)
2
Layers
(9.6)
3
Cubic Dream
(9.6)
4
Party Elk 2
(9.6)
5
Copper Booze
(9.6)
6
Dawnfall V1.1
(9.5)
7
Rainbow Connection
(9.5)
8
Onscreen 5k
(9.5)
9
Morph
(9.5)
10
Libertongo
(9.5)
Top Groups
1
Performers
(9.3)
2
Booze Design
(9.3)
3
Oxyron
(9.3)
4
Triad
(9.3)
5
Censor Design
(9.3)
Top Crackers
1
Mr. Z
(9.9)
2
Antitrack
(9.8)
3
OTD
(9.8)
4
Fungus
(9.8)
5
S!R
(9.8)
Home
-
Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.05 sec.