Skip to content

Commit

Permalink
Merge pull request #186 from venomix666/arrowkeys
Browse files Browse the repository at this point in the history
Arrow key translation for Oric and Atari 800
  • Loading branch information
davidgiven authored Oct 5, 2024
2 parents c047c1e + 7158a2d commit c0b5d12
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
22 changes: 22 additions & 0 deletions src/arch/atari800/atari800.S
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,28 @@ zproc screen_getchar

jsr toggle_cursor
jsr tty_conin
; Translate arrow keys
cmp #$1c ; Up
zif_eq
lda #$8b
zendif

cmp #$1d ; Down
zif_eq
lda #$8a
zendif
cmp #$1e ; Left
zif_eq
lda #$88
zendif
cmp #$1f ; Right
zif_eq
lda #$89
zendif

clc
rts
zendproc
Expand Down
2 changes: 1 addition & 1 deletion src/arch/oric/oric.S
Original file line number Diff line number Diff line change
Expand Up @@ -1190,7 +1190,7 @@ keyboard_decode_tab:
.byte 'd', 'q', 27, 0, 'f', 'r', 't', 'j'
.byte 'c', '2', 'z', 0, '4', 'b', '6', 'm'
.byte '\'', '\\', 0, 0, '-', ';', '9', 'k'
.byte 0, 0, 0, 0, 0, '.', ',', ' '
.byte 137, 138, 136, 0, 139, '.', ',', ' '
.byte '[', ']', 127, 0, 'p', 'o', 'i', 'u'
.byte 'w', 's', 'a', 0, 'e', 'g', 'h', 'y'
.byte '=', 0, 13, 0, '/', '0', 'l', '8'
Expand Down

0 comments on commit c0b5d12

Please sign in to comment.