Atari: add line-drawing chars in font.

Also adds a check for valid ASCII char (<= 0x7f) in ProcIn, and fixes
two typos in a2vt100.s.
This commit is contained in:
Christian Groessler 2017-09-11 23:35:16 +02:00
parent 9fce65d948
commit 12d66a2bd0
3 changed files with 284 additions and 157 deletions

View File

@ -1646,7 +1646,7 @@ ExitScr
; ------------------------------------- ; -------------------------------------
; table reverse to ScreenCode ; table reverse to ScreenCode
; ;
; This tabel is used to convert incoming ; This table is used to convert incoming
; reverse chars. ; reverse chars.
; ------------------------------------- ; -------------------------------------
@ -1671,7 +1671,7 @@ rtsc;_0 _1 _2 _3 _4 _5 _6 _7 _8 _9 _a _b _c _d _e _f
; ------------------------------------- ; -------------------------------------
; table line drawing to ScreenCode ; table line drawing to ScreenCode
; ;
; This tabel is used to convert incoming ; This table is used to convert incoming
; line drawing chars. ; line drawing chars.
; ------------------------------------- ; -------------------------------------

View File

@ -192,8 +192,9 @@ ProcIn lda EMode ; handle esc mode
cpy #$20 ; control? cpy #$20 ; control?
bcc Special bcc Special
tya tya
bmi PIrts ; ignore non-ASCII
jsr CPrnChr ; print to screen jsr CPrnChr ; print to screen
rts PIrts rts
; to far for branch ; to far for branch
PIEsc jmp Esc PIEsc jmp Esc
@ -945,7 +946,7 @@ crsrU ldx #<ScrsrU
C2 cmp #ATRRW C2 cmp #ATRRW
bne C3 bne C3
; crsr R ; crsr R
crsrR ldx #<ScrsrR crsrR ldx #<ScrsrR
ldy #>ScrsrR ldy #>ScrsrR
jsr SendStr jsr SendStr
@ -1154,6 +1155,7 @@ PrnChr sta xVector ; save char
bvc PCreg bvc PCreg
cmp #$60 ; line drawing char? cmp #$60 ; line drawing char?
bcc PCreg bcc PCreg
sbc #$60 ; adapt index for table starting at offset $60
tax tax
lda ltsc,x ; line drawing to ScreenCode lda ltsc,x ; line drawing to ScreenCode
eor Rvs eor Rvs
@ -1614,37 +1616,18 @@ ExitScr
; ------------------------------------- ; -------------------------------------
; table line drawing to ScreenCode ; table line drawing to ScreenCode
; ;
; This tabel is used to convert incoming ; This table is used to convert incoming
; line drawing chars. ; line drawing chars. First entry is for
; offset $60 (see PrnChr).
; ------------------------------------- ; -------------------------------------
ltsc;_0 _1 _2 _3 _4 _5 _6 _7 _8 _9 _a _b _c _d _e _f ltsc;_0 _1 _2 _3 _4 _5 _6 _7 _8 _9 _a _b _c _d _e _f
; --- unused -------------------------------------------------------
.byt $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 ; 0_
.byt $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 ; 1_
; --- reverse ------------------------------------------------------
; ◆ ▒ ␉ ␌ ␍ ␊ ° ± ␤ ␋ ┘ ┐ ┌ └ ┼ ⎺
; ' ' ▒ ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' | ' ' ' ' | | _
.byt $20,$57,$20,$20,$20,$20,$20,$20,$20,$20,$7c,$20,$20,$7c,$7c,$1f ; 2_
; ⎻ ─ ⎼ ⎽ ├ ┤ ┴ ┬ │ ≤ ≥ π ≠ £ · ' '
; _ _ _ _ | | _ _ | ' ' ' ' ' ' ' ' ' ' ' ' ' '
.byt $1f,$1f,$1f,$1f,$7c,$7c,$1f,$1f,$7c,$20,$20,$20,$20,$20,$20,$20 ; 3_
; --- unused -------------------------------------------------------
.byt $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 ; 4_
.byt $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 ; 5_
; --- normal ------------------------------------------------------- ; --- normal -------------------------------------------------------
; ◆ ▒ ␉ ␌ ␍ ␊ ° ± ␤ ␋ ┘ ┐ ┌ └ ┼ ⎺ ; ◆ ▒ ␉ ␌ ␍ ␊ ° ± ␤ ␋ ┘ ┐ ┌ └ ┼ ⎺
; ◆ ▒ ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ⎸ ' ' _ ⎿ ⎿ ⎺ .byt $5b,$5c,$40,$48,$49,$4a,$4b,$50,$54,$55,$43,$45,$51,$5a,$53,$4d ; 6_
;.byt $5b,$56,$a0,$a0,$a0,$a0,$a0,$a0,$a0,$a0,$5f,$a0,$9f,$54,$54,$4c ; 6_
.byt $5b,$56,$a0,$a0,$a0,$a0,$a0,$a0,$a0,$a0,$43,$45,$51,$5a,$53,$4c ; 6_
; ⎻ ─ ⎼ ⎽ ├ ┤ ┴ ┬ │ ≤ ≥ π ≠ £ · ' ' ; ⎻ ─ ⎼ ⎽ ├ ┤ ┴ ┬ │ ≤ ≥ π ≠ £ · ' '
; ─ _ _ _ ⎿ ⎸ ⎿ _ ⎸ ' ' ' ' ' ' ' ' ' ' ' ' ' ' .byt $4c,$52,$4f,$4e,$41,$44,$58,$57,$7c,$59,$5d,$5e,$5f,$47,$46,$00 ; 7_
;.byt $53,$9f,$9f,$9f,$54,$5f,$54,$9f,$5f,$a0,$a0,$a0,$a0,$a0,$a0,$a0 ; 7_
.byt $53,$52,$9f,$9f,$41,$44,$54,$9f,$7c,$a0,$a0,$a0,$a0,$a0,$a0,$a0 ; 7_
; ------------------------------------- ; -------------------------------------
; table keyboard to ASCII ; table keyboard to ASCII

View File

@ -652,14 +652,22 @@ vt100_font:
.byte %11111111 .byte %11111111
.byte %00000000 .byte %00000000
;$40 - heart card ;$40 - original: heart card; now 'HT' (line drawing mode)
; .byte %00000000
; .byte %00110110
; .byte %01111111
; .byte %01111111
; .byte %00111110
; .byte %00011100
; .byte %00001000
; .byte %00000000
.byte %00000000 .byte %00000000
.byte %00110110 .byte %01010000
.byte %01111111 .byte %01110000
.byte %01111111 .byte %01010000
.byte %00111110 .byte %00001110
.byte %00011100 .byte %00000100
.byte %00001000 .byte %00000100
.byte %00000000 .byte %00000000
;$41 - mid left window ;$41 - mid left window
@ -712,74 +720,130 @@ vt100_font:
.byte %00011000 .byte %00011000
.byte %00011000 .byte %00011000
;$46 - right slant box ;$46 - original: right slant box; now 'dot' (line drawing mode)
.byte %00000011 ; .byte %00000011
.byte %00000111 ; .byte %00000111
.byte %00001110 ; .byte %00001110
; .byte %00011100
; .byte %00111000
; .byte %01110000
; .byte %11100000
; .byte %11000000
.byte %00000000
.byte %00000000
.byte %00000000
.byte %00011000
.byte %00011000
.byte %00000000
.byte %00000000
.byte %00000000
;$47 - original: left slant box; now 'pound' (line drawing mode)
; .byte %11000000
; .byte %11100000
; .byte %01110000
; .byte %00111000
; .byte %00011100
; .byte %00001110
; .byte %00000111
; .byte %00000011
.byte %00011100 .byte %00011100
.byte %00111000 .byte %00110110
.byte %01100000
.byte %01111100
.byte %01100000
.byte %00110000
.byte %01111110
.byte %00000000
;$48 - original: right slant solid; now 'FF' (line drawing mode)
; .byte %00000001
; .byte %00000011
; .byte %00000111
; .byte %00001111
; .byte %00011111
; .byte %00111111
; .byte %01111111
; .byte %11111111
.byte %00000000
.byte %01110000 .byte %01110000
.byte %11100000 .byte %01000000
.byte %11000000 .byte %01101110
.byte %01001000
.byte %00001100
.byte %00001000
.byte %00000000
;$47 - left slant box ;$49 - original: low right solid; now 'CR' (line drawing mode)
.byte %11000000 ; .byte %00000000
.byte %11100000 ; .byte %00000000
; .byte %00000000
; .byte %00000000
; .byte %00001111
; .byte %00001111
; .byte %00001111
; .byte %00001111
.byte %00000000
.byte %01110000 .byte %01110000
.byte %00111000 .byte %01000000
.byte %00011100 .byte %01001100
.byte %00001110 .byte %01111010
.byte %00000111 .byte %00001100
.byte %00000011 .byte %00001010
.byte %00000000
;$48 - right slant solid ;$4A - original: left slant solid; now 'LF' (line drawing mode)
.byte %00000001 ; .byte %10000000
.byte %00000011 ; .byte %11000000
.byte %00000111 ; .byte %11100000
.byte %00001111 ; .byte %11110000
.byte %00011111 ; .byte %11111000
.byte %00111111 ; .byte %11111100
.byte %01111111 ; .byte %11111110
; .byte %11111111
.byte %00000000
.byte %01000000
.byte %01000000
.byte %01001110
.byte %01111000
.byte %00001100
.byte %00001000
.byte %00000000
;$4B - original: up right solid; now ° (line drawing mode)
; .byte %00001111
; .byte %00001111
; .byte %00001111
; .byte %00001111
; .byte %00000000
; .byte %00000000
; .byte %00000000
; .byte %00000000
.byte %00000000
.byte %00011000
.byte %01100110
.byte %01100110
.byte %00011000
.byte %00000000
.byte %00000000
.byte %00000000
;$4C - original: up left solid; now upper line
; .byte %11110000
; .byte %11110000
; .byte %11110000
; .byte %11110000
; .byte %00000000
; .byte %00000000
; .byte %00000000
; .byte %00000000
.byte %00000000
.byte %11111111 .byte %11111111
;$49 - low right solid
.byte %00000000
.byte %00000000
.byte %00000000
.byte %00000000
.byte %00001111
.byte %00001111
.byte %00001111
.byte %00001111
;$4A - left slant solid
.byte %10000000
.byte %11000000
.byte %11100000
.byte %11110000
.byte %11111000
.byte %11111100
.byte %11111110
.byte %11111111 .byte %11111111
;$4B - up right solid
.byte %00001111
.byte %00001111
.byte %00001111
.byte %00001111
.byte %00000000 .byte %00000000
.byte %00000000 .byte %00000000
.byte %00000000 .byte %00000000
.byte %00000000 .byte %00000000
;$4C - up left solid
.byte %11110000
.byte %11110000
.byte %11110000
.byte %11110000
.byte %00000000
.byte %00000000
.byte %00000000
.byte %00000000 .byte %00000000
;$4D - top box ;$4D - top box
@ -802,24 +866,40 @@ vt100_font:
.byte %11111111 .byte %11111111
.byte %11111111 .byte %11111111
;$4F - low left solid ;$4F - original: low left solid; now lower line
; .byte %00000000
; .byte %00000000
; .byte %00000000
; .byte %00000000
; .byte %11110000
; .byte %11110000
; .byte %11110000
; .byte %11110000
.byte %00000000 .byte %00000000
.byte %00000000 .byte %00000000
.byte %00000000 .byte %00000000
.byte %00000000 .byte %00000000
.byte %11110000 .byte %00000000
.byte %11110000 .byte %11111111
.byte %11110000 .byte %11111111
.byte %11110000 .byte %00000000
;$50 - club card ;$50 - original: club card; now plus/minus (line drawing mode)
; .byte %00000000
; .byte %00011100
; .byte %00011100
; .byte %01110111
; .byte %01110111
; .byte %00001000
; .byte %00011100
; .byte %00000000
.byte %00000000
.byte %00011000
.byte %01111110
.byte %00011000
.byte %00000000
.byte %01111110
.byte %00000000 .byte %00000000
.byte %00011100
.byte %00011100
.byte %01110111
.byte %01110111
.byte %00001000
.byte %00011100
.byte %00000000 .byte %00000000
;$51 - up left window ;$51 - up left window
@ -852,25 +932,41 @@ vt100_font:
.byte %00011000 .byte %00011000
.byte %00011000 .byte %00011000
;$54 - solid circle ;$54 - original: solid circle; now 'NL' (line drawing mode)
; .byte %00000000
; .byte %00000000
; .byte %00111100
; .byte %01111110
; .byte %01111110
; .byte %01111110
; .byte %00111100
; .byte %00000000
.byte %00000000 .byte %00000000
.byte %00000000 .byte %01001000
.byte %00111100 .byte %01101000
.byte %01111110 .byte %01011000
.byte %01111110 .byte %01001000
.byte %01111110 .byte %00001000
.byte %00111100 .byte %00001110
.byte %00000000 .byte %00000000
;$55 - bottom solid ;$55 - original: bottom solid; now 'VT' (line drawing mode)
; .byte %00000000
; .byte %00000000
; .byte %00000000
; .byte %00000000
; .byte %11111111
; .byte %11111111
; .byte %11111111
; .byte %11111111
.byte %00000000 .byte %00000000
.byte %01010000
.byte %01010000
.byte %01011110
.byte %00100100
.byte %00000100
.byte %00000100
.byte %00000000 .byte %00000000
.byte %00000000
.byte %00000000
.byte %11111111
.byte %11111111
.byte %11111111
.byte %11111111
;$56 - left box ;$56 - left box
.byte %11000000 .byte %11000000
@ -902,15 +998,23 @@ vt100_font:
.byte %00000000 .byte %00000000
.byte %00000000 .byte %00000000
;$59 - left solid ;$59 - original: left solid; now '<=' (line drawing mode)
.byte %11110000 ; .byte %11110000
.byte %11110000 ; .byte %11110000
.byte %11110000 ; .byte %11110000
.byte %11110000 ; .byte %11110000
.byte %11110000 ; .byte %11110000
.byte %11110000 ; .byte %11110000
.byte %11110000 ; .byte %11110000
.byte %11110000 ; .byte %11110000
.byte %00000000
.byte %00001100
.byte %00011000
.byte %00110000
.byte %00011000
.byte %00001100
.byte %00111110
.byte %00000000
;$5A - low left window ;$5A - low left window
.byte %00011000 .byte %00011000
@ -922,54 +1026,94 @@ vt100_font:
.byte %00000000 .byte %00000000
.byte %00000000 .byte %00000000
;$5B - display escape ;$5B - original: display escape; now diamond
.byte %01111000 ; .byte %01111000
.byte %01100000 ; .byte %01100000
.byte %01111000 ; .byte %01111000
.byte %01100000 ; .byte %01100000
.byte %01111110 ; .byte %01111110
.byte %00011000 ; .byte %00011000
.byte %00011110 ; .byte %00011110
.byte %00000000 ; .byte %00000000
;$5C - up arrow
.byte %00000000 .byte %00000000
.byte %00011000 .byte %00011000
.byte %00111100 .byte %00111100
.byte %01111110 .byte %01111110
.byte %00011000
.byte %00011000
.byte %00011000
.byte %00000000
;$5D - down arrow
.byte %00000000
.byte %00011000
.byte %00011000
.byte %00011000
.byte %01111110 .byte %01111110
.byte %00111100 .byte %00111100
.byte %00011000 .byte %00011000
.byte %00000000 .byte %00000000
;$5E - left arrow ;$5C - original: up arrow; now checkerboard
; .byte %00000000
; .byte %00011000
; .byte %00111100
; .byte %01111110
; .byte %00011000
; .byte %00011000
; .byte %00011000
; .byte %00000000
.byte %10101010
.byte %01010101
.byte %10101010
.byte %01010101
.byte %10101010
.byte %01010101
.byte %10101010
.byte %01010101
;$5D - original: down arrow; now '>=' (line drawing mode)
; .byte %00000000
; .byte %00011000
; .byte %00011000
; .byte %00011000
; .byte %01111110
; .byte %00111100
; .byte %00011000
; .byte %00000000
.byte %00000000 .byte %00000000
.byte %00011000
.byte %00110000
.byte %01111110
.byte %00110000 .byte %00110000
.byte %00011000 .byte %00011000
.byte %00000000 .byte %00001100
.byte %00011000
.byte %00110000
.byte %01111100
.byte %00000000 .byte %00000000
;$5F - right arrow ;$5E - original: left arrow; now 'pi' (line drawing mode)
; .byte %00000000
; .byte %00011000
; .byte %00110000
; .byte %01111110
; .byte %00110000
; .byte %00011000
; .byte %00000000
; .byte %00000000
.byte %00000000
.byte %00000001
.byte %11111111
.byte %01100110
.byte %01100110
.byte %01100110
.byte %01100110
.byte %00000000
;$5F - original: right arrow; now 'unequal' (line drawing mode)
; .byte %00000000
; .byte %00011000
; .byte %00001100
; .byte %01111110
; .byte %00001100
; .byte %00011000
; .byte %00000000
; .byte %00000000
.byte %00000000 .byte %00000000
.byte %00011000 .byte %00011000
.byte %00001100
.byte %01111110 .byte %01111110
.byte %00001100
.byte %00011000 .byte %00011000
.byte %00000000 .byte %00011000
.byte %01111110
.byte %00011000
.byte %00000000 .byte %00000000
;$60 - original: diamond card; now ` ;$60 - original: diamond card; now `