Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arrow key translation for Oric and Atari 800 #186

Merged
merged 3 commits into from
Oct 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading