1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-27 12:29:33 +00:00
This commit is contained in:
mrdudz 2020-07-15 00:17:41 +02:00
commit 306f421aa9
5 changed files with 15 additions and 14 deletions

View File

@ -4,7 +4,7 @@
;
; 2009-09-26, Ullrich von Bassewitz
; 2014-04-26, Christian Groessler
; 2014-04-30, Greg King
; 2020-07-14, Greg King
;
.include "zeropage.inc"
@ -377,7 +377,7 @@ IOCTL: lda #<MOUSE_ERR_INV_IOCTL ; We don't support ioctls, for now
IRQ: jsr CPREP
lda KEY_COUNT
sta old_key_count
lda #$7F
lda #$FF
sta CIA1_PRA
lda CIA1_PRB ; Read joystick #0
and #$1F

View File

@ -2,7 +2,7 @@
; Driver for the Inkwell Systems 170-C and 184-C lightpens.
;
; 2014-04-26, Christian Groessler
; 2014-09-10, Greg King
; 2020-07-14, Greg King
;
.include "zeropage.inc"
@ -414,8 +414,8 @@ IRQ: jsr CPREP
ldy #%00000000 ; Set ports A and B to input
sty CIA1_DDRB
sty CIA1_DDRA ; Keyboard won't look like buttons
;lda #%01111111 ; (Keyboard scan leaves this in port A)
;sta CIA1_PRA
lda #%11111111
sta CIA1_PRA
lda CIA1_PRB ; Read Control Port 1
dec CIA1_DDRA ; Set port A back to output
eor #%11111111 ; Bit goes up when button goes down

View File

@ -3,7 +3,7 @@
;
; 2009-09-26, Ullrich von Bassewitz
; 2014-04-26, Christian Groessler
; 2014-05-01, Greg King
; 2020-07-14, Greg King
;
.include "zeropage.inc"
@ -379,7 +379,7 @@ IOCTL: lda #<MOUSE_ERR_INV_IOCTL ; We don't support ioctls for now
IRQ: jsr CPREP
lda KEY_COUNT
sta old_key_count
lda #$7F
lda #$FF
sta CIA1_PRA
lda CIA1_PRB ; Read joystick #0
and #$1F

View File

@ -4,7 +4,7 @@
; 2006-08-20, Stefan Haubenthal
; 2009-09-26, Ullrich von Bassewitz
; 2014-04-26, Christian Groessler
; 2014-05-05, Greg King
; 2020-07-14, Greg King
;
.include "zeropage.inc"
@ -385,7 +385,7 @@ IOCTL: lda #<MOUSE_ERR_INV_IOCTL ; We don't support ioctls for now
IRQ: jsr CPREP
lda KEY_COUNT
sta old_key_count
lda #$7F
lda #$FF
sta CIA1_PRA
lda CIA1_PRB ; Read port #1
eor #%11111111 ; Make all bits active high

View File

@ -1,11 +1,12 @@
;
; Callback routine called from the IRQ handler after the ROM IRQ handler
; had been run.
; Callback routine, called from the IRQ handler after the ROM IRQ handler
; has been run.
;
; Christian Groessler, 24.04.2014
; 2014-04-24, Christian Groessler
; 2020-07-14, Greg King
;
; Check if there was button/joystick activity before and/or after the ROM handler.
; If there was activity, discard the key presses since they are most
; If there was activity, discard the key presses because they are most
; probably "phantom" key presses.
callback:
@ -16,7 +17,7 @@ callback:
lda OLD_BUTTONS ; keypress before?
bne @discard_key ; yes, discard key
lda #$7F
lda #$FF
sta CIA1_PRA
lda CIA1_PRB ; Read joystick #0
and #$1F