mirror of
https://github.com/cc65/cc65.git
synced 2024-12-23 04:30:10 +00:00
Stopped the C128 mouse drivers from blocking certain keys such as '1', '2', and 'Q'.
This extra fix is needed because the C128 keyboard scanner works a little differently than the C64 scanner works. Fixes #696. Fixes #853.
This commit is contained in:
parent
3558c0796d
commit
9023e975df
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user