diff --git a/c64/kernal/chrout.s b/c64/kernal/chrout.s index 90448068..946b29fb 100644 --- a/c64/kernal/chrout.s +++ b/c64/kernal/chrout.s @@ -32,10 +32,14 @@ not_00: not_0a: ;; Carriage return - cmp #$0d - beq screen_advance_to_next_line + cmp #$0d + bne not_0d + jmp screen_advance_to_next_line +not_0d: ;; Check for cursor movement keys + sta $0400 + cmp #$11 bne not_11 inc current_screen_y @@ -48,6 +52,18 @@ not_11: jsr calculate_screen_line_pointer jmp chrout_done not_1d: + cmp #$91 + bne not_91 + dec current_screen_y + jsr calculate_screen_line_pointer + jmp chrout_done +not_91: + cmp #$9d + bne not_9d + dec current_screen_x + jsr calculate_screen_line_pointer + jmp chrout_done +not_9d: cmp #$14 bne not_14 diff --git a/c64/kernal/keyboard_matrix.s b/c64/kernal/keyboard_matrix.s index e5b29e5c..b2c94841 100644 --- a/c64/kernal/keyboard_matrix.s +++ b/c64/kernal/keyboard_matrix.s @@ -26,7 +26,7 @@ keyboard_matrixes: .byte $25,$72,$64,$26,$63,$66,$74,$78 .byte $27,$79,$67,$28,$62,$68,$75,$76 .byte $12,$69,$6A,$92,$6D,$6B,$6F,$6E - .byte $DB,$70,$6C,$DD,43E,$5B,$BA,$3C + .byte $DB,$70,$6C,$DD,$3E,$5B,$BA,$3C .byte $A9,$C0,$5D,$93,$00,$3D,$DE,$3F .byte $21,$5F,$00,$22,$A0,$00,$71,$83