add DECREQTPARM support, fix a bug with DA/Device attributes response.

This commit is contained in:
Kelvin Sherlock 2022-01-29 11:23:41 -05:00
parent 9dfc3cc7c9
commit c15ae6ac4c

View File

@ -18,7 +18,7 @@
ext erase_screen_0,erase_screen_1,erase_screen_2 ext erase_screen_0,erase_screen_1,erase_screen_2
ext update_sgr ext update_sgr
ext write_modem ext write_modem,write_modem_str
vt100_csi ent vt100_csi ent
@ -262,7 +262,7 @@ vt100_csi_2 ent
dw :rts ; u dw :rts ; u
dw :rts ; v dw :rts ; v
dw :rts ; w dw :rts ; w
dw :rts ; x dw csi_x ; x
dw csi_y ; y dw csi_y ; y
:modifier :modifier
@ -832,23 +832,45 @@ write_digit
:table db 0,10,20,30,40,50,60,70,80 :table db 0,10,20,30,40,50,60,70,80
csi_c ; what are you? csi_c ; what are you?
lda #ESC * DA - Device Attributes
jsr write_modem
lda #'[' mx %11
jsr write_modem
lda #'?' php
jsr write_modem rep #$10 ; long x/y
lda #'1' ldy #:response
jsr write_modem jsr write_modem_str
lda #'?' plp
jsr write_modem rts
lda #'0'
jsr write_modem :response asc 1b,'[?1;0c',00 ; No options.
lda #'c'
jmp write_modem
csi_y ; invoke confidence test csi_y ; invoke confidence test
* ??? * ???
rts rts
csi_x ; request terminal parameters
* DECREQTPARM Request Terminal Parameters
mx %11
lda parms
cmp #2
bcs :rts
inc
inc
ora #'0'
sta :response+2
php
rep #$10 ; long x/y
ldy #:response
jsr write_modem_str
plp
:rts rts
:response asc 1b,'[x;1;1;112;112;1;0x',00 ; no parity, 8-bits, 9600/9600, 16x multiplier, no stp flags.
sav vt100.csi.L sav vt100.csi.L