mirror of
https://github.com/KarolS/millfork.git
synced 2024-10-03 20:55:36 +00:00
Improve text encodings on Atari
This commit is contained in:
parent
6d499f3623
commit
98f35937e3
@ -30,6 +30,10 @@
|
|||||||
* `iso_de`, `iso_no`, `iso_se`, `iso_yu` – various variants of ISO/IEC-646
|
* `iso_de`, `iso_no`, `iso_se`, `iso_yu` – various variants of ISO/IEC-646
|
||||||
|
|
||||||
* `iso_dk`, `iso_fi` – aliases for `iso_no` and `iso_se` respectively
|
* `iso_dk`, `iso_fi` – aliases for `iso_no` and `iso_se` respectively
|
||||||
|
|
||||||
|
* `atascii` or `atari` – ATASCII as seen on Atari 8-bit computers
|
||||||
|
|
||||||
|
* `atasciiscr` or `atariscr` – screencodes used by Atari 8-bit computers
|
||||||
|
|
||||||
When programming for Commodore,
|
When programming for Commodore,
|
||||||
use `pet` for strings you're printing using standard I/O routines
|
use `pet` for strings you're printing using standard I/O routines
|
||||||
@ -65,11 +69,13 @@ control codes for changing the text background color
|
|||||||
|
|
||||||
##### Escape sequence availability
|
##### Escape sequence availability
|
||||||
|
|
||||||
Encoding | new line | braces | backspace | cursor movement | text colour and reverse | background colour
|
Encoding | new line | braces | backspace | cursor movement | text colour and reverse | background colour
|
||||||
--|--|--|--|--|--|--
|
--|--|--|--|--|--|--
|
||||||
`pet` | yes | no | no | yes | yes | no
|
`pet` | yes | no | no | yes | yes | no
|
||||||
`petscr` | no | no | no | no | no | no
|
`petscr` | no | no | no | no | no | no
|
||||||
`sinclair` | yes | yes | no | yes | yes | yes
|
`sinclair` | yes | yes | no | yes | yes | yes
|
||||||
`ascii`, `iso_*` | yes | yes | yes | no | no | no
|
`ascii`, `iso_*` | yes | yes | yes | no | no | no
|
||||||
`apple2` | no | yes | no | no | no | no
|
`apple2` | no | yes | no | no | no | no
|
||||||
|
`atascii` | yes | no | yes | yes | no | no
|
||||||
|
`atasciiscr` | no | no | no | no | no | no
|
||||||
all the rest | yes | yes | no | no | no | no
|
all the rest | yes | yes | no | no | no | no
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
arch=strict
|
arch=strict
|
||||||
modules=a8_kernel,default_panic,stdlib
|
modules=a8_kernel,default_panic,stdlib
|
||||||
encoding=atascii
|
encoding=atascii
|
||||||
|
screen_encoding=atasciiscr
|
||||||
|
|
||||||
[allocation]
|
[allocation]
|
||||||
; TODO
|
; TODO
|
||||||
|
@ -139,6 +139,8 @@ object TextCodec {
|
|||||||
case (_, "petscr") => TextCodec.CbmScreencodes
|
case (_, "petscr") => TextCodec.CbmScreencodes
|
||||||
case (_, "atascii") => TextCodec.Atascii
|
case (_, "atascii") => TextCodec.Atascii
|
||||||
case (_, "atari") => TextCodec.Atascii
|
case (_, "atari") => TextCodec.Atascii
|
||||||
|
case (_, "atasciiscr") => TextCodec.AtasciiScreencodes
|
||||||
|
case (_, "atariscr") => TextCodec.AtasciiScreencodes
|
||||||
case (_, "bbc") => TextCodec.Bbc
|
case (_, "bbc") => TextCodec.Bbc
|
||||||
case (_, "sinclair") => TextCodec.Sinclair
|
case (_, "sinclair") => TextCodec.Sinclair
|
||||||
case (_, "apple2") => TextCodec.Apple2
|
case (_, "apple2") => TextCodec.Apple2
|
||||||
@ -347,7 +349,25 @@ object TextCodec {
|
|||||||
"\ufffd" * 11 +
|
"\ufffd" * 11 +
|
||||||
0x20.to(0x5f).map(_.toChar).mkString +
|
0x20.to(0x5f).map(_.toChar).mkString +
|
||||||
"♢abcdefghijklmnopqrstuvwxyz♠|",
|
"♢abcdefghijklmnopqrstuvwxyz♠|",
|
||||||
Map('♥' -> 0, '·' -> 0x14), Map.empty, MinimalEscapeSequencesWithBraces + ("n" -> List(0x9b))
|
Map('♥' -> 0, '·' -> 0x14), Map.empty, MinimalEscapeSequencesWithoutBraces ++ Seq(
|
||||||
|
"n" -> List(0x9b),
|
||||||
|
"up" -> List(0x1c),
|
||||||
|
"down" -> List(0x1d),
|
||||||
|
"left" -> List(0x1e),
|
||||||
|
"right" -> List(0x1f),
|
||||||
|
"b" -> List(0x7e),
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
val AtasciiScreencodes = new TextCodec("ATASCII-Screen",
|
||||||
|
0x20.to(0x3f).map(_.toChar).mkString +
|
||||||
|
0x40.to(0x5f).map(_.toChar).mkString +
|
||||||
|
"♡" +
|
||||||
|
"\ufffd" * 15 +
|
||||||
|
"♣\ufffd–\ufffd•" +
|
||||||
|
"\ufffd" * 7 + "↑↓←→"+
|
||||||
|
"♢abcdefghijklmnopqrstuvwxyz♠|",
|
||||||
|
Map('♥' -> 0x40, '·' -> 0x54), Map.empty, MinimalEscapeSequencesWithoutBraces
|
||||||
)
|
)
|
||||||
|
|
||||||
val Bbc = new TextCodec("BBC",
|
val Bbc = new TextCodec("BBC",
|
||||||
|
Loading…
Reference in New Issue
Block a user