1
0
mirror of https://github.com/KarolS/millfork.git synced 2024-09-29 09:55:38 +00:00

Change PETSCII encoding to match CC65 and readkey

This commit is contained in:
Karol Stasiak 2019-07-29 02:07:30 +02:00
parent cb0718b433
commit 5fb6efbd61
2 changed files with 9 additions and 2 deletions

View File

@ -2,6 +2,10 @@
## Current version ## Current version
* **Breaking change!**
The `petscii` encoding now uses the $C0-$DE range for uppercase characters instead of $60-$7E.
This matches both the CC65 behaviour and the return values from `readkey()`.
* Added `segment` block statement. * Added `segment` block statement.
* Added goto. * Added goto.

View File

@ -278,8 +278,11 @@ object TextCodec {
"\ufffd" * 32 + "\ufffd" * 32 +
0x20.to(0x3f).map(_.toChar).mkString + 0x20.to(0x3f).map(_.toChar).mkString +
"@abcdefghijklmnopqrstuvwxyz[£]↑←" + "@abcdefghijklmnopqrstuvwxyz[£]↑←" +
"ABCDEFGHIJKLMNOPQRSTUVWXYZ\ufffd\ufffd\ufffdπ", "\ufffd" * 32 + // 60-7f
Map('^' -> 0x5E, '♥' -> 0x73, '♡' -> 0x73, '♠' -> 0x61, '♣' -> 0x78, '♢' -> 0x7A, '•' -> 0x71), Map.empty, Map( "\ufffd" * 32 + // 80-9f
"\ufffd" * 32 + // a0-bf
"ABCDEFGHIJKLMNOPQRSTUVWXYZ\ufffd\ufffd\ufffdπ", // c0-df
Map('^' -> 0x5E, '♥' -> 0x73, '♡' -> 0x73, '♠' -> 0xC1, '♣' -> 0xD8, '♢' -> 0xDA, '•' -> 0xD1), Map.empty, Map(
"n" -> List(13), "n" -> List(13),
"q" -> List('\"'.toInt), "q" -> List('\"'.toInt),
"apos" -> List('\''.toInt), "apos" -> List('\''.toInt),