DECARM - auto repeat support. defaults to auto-repeat on.

n.b. - mame does not currently set the repeat bit in the keymod reg so it's not well tested.
This commit is contained in:
Kelvin Sherlock 2022-01-29 14:24:55 -05:00
parent 22d1c744bb
commit 60259531d5
2 changed files with 12 additions and 2 deletions

View File

@ -30,13 +30,22 @@ keypress ent
debug keypress debug keypress
lda KBD lda KBD
bmi :key bmi :key
rts :rts rts
:key :key
and #$7f and #$7f
sta key sta key
lda KEYMOD lda KEYMOD
sta mod sta mod
sta KEYSTROBE sta KEYSTROBE
* if DECARM is clear, skip repeat characters.
bit DECARM
bpl :arm
bit #kmRepeat
bne :rts
:arm
bit #kmOption!kmCommand bit #kmOption!kmCommand
bne command bne command

View File

@ -106,7 +106,8 @@ init
sta DECBM sta DECBM
lda #$80 lda #$80
* sta LOCAL * sta LOCAL
sta DECANM sta DECANM ; ANSI (vt100) on
sta DECARM ; key repeat on
* lda #st_vt52 * lda #st_vt52
lda #st_vt100 lda #st_vt100