fix Vendor / CONTROL key confusion

This commit is contained in:
Paul Gardner-Stephen committed 2019-04-23 09:31:44 +09:30
1 parent d4531592df
commit 07e7b31b84
2 files changed
+15 -14

No files matched your search

+10 -10
View File
@@ -30,16 +30,6 @@ keyboard_matrixes:
.byte $A9,$C0,$5D,$93,$00,$3D,$DE,$3F
.byte $21,$5F,$00,$22,$A0,$00,$71,$83
;; Control modified keyboard
.byte $00,$00,$00,$00,$00,$00,$00,$00
.byte $1C,$17,$01,$9F,$1A,$13,$05,$00
.byte $9C,$12,$04,$1E,$03,$06,$14,$18
.byte $1F,$19,$07,$9E,$02,$08,$15,$16
.byte $12,$09,$0A,$92,$0D,$0B,$0F,$0E
.byte $00,$10,$0C,$00,$00,$1B,$00,$00
.byte $1C,$00,$1D,$00,$00,$1F,$1E,$00
.byte $90,$06,$00,$05,$00,$00,$11,$00
;; Vendor key modified keyboard
.byte $94,$8D,$9D,$8C,$89,$8A,$8B,$91
.byte $96,$B3,$B0,$97,$AD,$AE,$B1,$00
@@ -50,6 +40,16 @@ keyboard_matrixes:
.byte $A8,$DF,$5D,$93,$00,$3D,$DE,$3F
.byte $81,$5F,$00,$95,$a0,$00,$AB,$83
;; Control modified keyboard
.byte $00,$00,$00,$00,$00,$00,$00,$00
.byte $1C,$17,$01,$9F,$1A,$13,$05,$00
.byte $9C,$12,$04,$1E,$03,$06,$14,$18
.byte $1F,$19,$07,$9E,$02,$08,$15,$16
.byte $12,$09,$0A,$92,$0D,$0B,$0F,$0E
.byte $00,$10,$0C,$00,$00,$1B,$00,$00
.byte $1C,$00,$1D,$00,$00,$1F,$1E,$00
.byte $90,$06,$00,$05,$00,$00,$11,$00
keyboard_matrix_lookup:
;; Work out if normal, shifted, control or Vendor
+5 -4
View File
@@ -268,7 +268,7 @@ skip0:
sta key_bucky_state
lda ScanResult+6
eor #$ff
and #%10000000 ;// Left Shift
and #%10000000 ;// Left shift
rol
rol
and #$01
@@ -283,6 +283,7 @@ skip0:
lsr
lsr
and #$01
sta $044f
ora key_bucky_state
sta key_bucky_state
@@ -293,7 +294,7 @@ skip0:
ora key_bucky_state
sta key_bucky_state
;; C= key
;; Vendor key
lda ScanResult+0
eor #$ff
lsr
@@ -305,10 +306,10 @@ skip0:
sta key_bucky_state
;; Chick for shift + Vendor
cmp #$05
cmp #$03
bne no_case_toggle
lda key_last_bucky_state
cmp #$05
cmp #$03
beq no_case_toggle
lda enable_case_switch