keyboard/altgr: c64 layout of petscii graphics
authorMischa POSLAWSKY <perl@shiar.org>
Sat, 27 Apr 2024 15:50:08 +0000 (17:50 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Tue, 21 May 2024 14:34:27 +0000 (16:34 +0200)
Based on <https://en.wikipedia.org/wiki/PETSCII?oldid=1218362433> tables
and c64 (ish) positions for modern keyboard compatibility.

keyboard/altgr/c64.eng.inc.pl [new file with mode: 0644]
keyboard/altgr/index.inc.pl
keyboard/altgr/msx-graph.eng.inc.pl
keyboard/altgr/unigraph.eng.inc.pl
unicode-table.inc.pl

diff --git a/keyboard/altgr/c64.eng.inc.pl b/keyboard/altgr/c64.eng.inc.pl
new file mode 100644 (file)
index 0000000..47112e1
--- /dev/null
@@ -0,0 +1,133 @@
+use utf8;
+use strict;
+use warnings;
+use Shiar_Sheet::KeyboardChars 'kbchars';
+
+my %c64 = (
+       # control keys not on pet2001
+       '1' => "๐Ÿ–ค\nBLacK",
+       '2' => "๐Ÿค\nWHiTe",
+       '3' => "โค๏ธ\nRED",
+       '4' => "๐Ÿฉต\nCYaN",
+       '5' => "๐Ÿ’œ\nPURple",
+       '6' => "๐Ÿ’š\nGReeN",
+       '7' => "๐Ÿ’™\nBLUe",
+       '8' => "๐Ÿ’›\nYELlow",
+       '9' => "๐Ÿ’Ÿ\nREverSe video ON",
+       '0' => "๐Ÿ’”\nREverSe video OFF",
+);
+
+my %rows = (%c64,
+       # literal petscii control characters, unaltered from pet2001
+       'a' => 'โ™ ',
+       'b' => '๐Ÿญฒ',
+       'c' => '๐Ÿญธ',
+       'd' => '๐Ÿญท',
+       'e' => '๐Ÿญถ',
+       'f' => '๐Ÿญบ',
+       'g' => '๐Ÿญฑ',
+       'h' => '๐Ÿญด',
+       'i' => 'โ•ฎ',
+       'j' => 'โ•ฐ',
+       'k' => 'โ•ฏ',
+       'l' => '๐Ÿญผ',
+       'm' => 'โ•ฒ',
+       'n' => 'โ•ฑ',
+       'o' => '๐Ÿญฝ',
+       'p' => '๐Ÿญพ',
+       'q' => 'โ—',
+       'r' => '๐Ÿญป',
+       's' => 'โ™ฅ',
+       't' => '๐Ÿญฐ',
+       'u' => 'โ•ญ',
+       'v' => 'โ•ณ',
+       'w' => 'โ—‹',
+       'x' => 'โ™ฃ',
+       'y' => '๐Ÿญต',
+       'z' => 'โ™ฆ',
+       ']' => 'โ”€', # @
+
+       # literal pet2001 keys reassigned on c64
+       ',' => 'โ”ผ', # [ c64 +
+       '.' => 'โ”‚', # ] c64 -
+       '\\'=> 'ฯ€', # โ†‘ c64 \
+       '}' => 'โ—ฅ', # โ† c64 *
+       '>' => '๐ŸฎŒ', # \ c64 ^-
+       'B' => 'โ–š', # ?
+
+       # ! " # $ % ' & \ ( ) โ†            ยป  1 2 3 4 5 6 7 8 9 0 + - ยฃ
+       # Q W E R T Y U I O P โ†‘   7 8 9 /  ยป  Q W E R T Y U I O P @ * โ†‘
+       # A S D F G H J K L :     4 5 6 *  ยป  A S D F G H J K L : ; =
+       # Z X C V B N M , ; ?     1 2 3 +  ยป  Z X C V B N M , . /
+       #     @ [ ]     < >       0 . - =
+
+       # pet2001 top row
+       'K' => 'โ–Œ', # A pet !
+       'I' => 'โ–„', # B pet "
+       'T' => 'โ–”', # C pet #
+       '{' => 'โ–', # D pet $
+       'G' => 'โ–', # E pet %
+       'M' => 'โ–•', # G pet '
+       '<' => 'โ–’', # F pet & c64 ^+
+       '/' => '๐Ÿฎ', # H pet ( c64 ^ยฃ
+       '?' => 'โ—ค', # I pet ) c64 ยฃ
+
+       # pet2001 bottom rows
+       '[' => '๐Ÿญฟ', # Z pet :
+       'D' => 'โ–—', # L pet ,
+       'F' => 'โ––', # { pet ;
+       'C' => 'โ–', # | pet <
+       'V' => 'โ–˜', # ~ pet >
+
+       # pet2001 numpad
+       'Y' => '๐Ÿฎ‚', # W pet 7
+       'U' => '๐Ÿฎƒ', # X pet 8
+       'O' => 'โ–ƒ', # Y pet 9
+       'P' => 'โ–‚', # O pet /
+       'H' => 'โ–Ž', # T pet 4
+       'J' => 'โ–', # U pet 5
+       'L' => '๐Ÿฎˆ', # V pet 6
+       'N' => '๐Ÿฎ‡', # J pet *
+       'E' => 'โ”ด', # Q pet 1
+       'R' => 'โ”ฌ', # R pet 2
+       'W' => 'โ”ค', # S pet 3
+       'Q' => 'โ”œ', # K pet +
+       'A' => 'โ”Œ', # P pet 0
+       'S' => 'โ”', # N pet .
+       'Z' => 'โ””', # M pet -
+       'X' => 'โ”˜', # } pet =
+);
+
+my $groups = kbchars(\%rows);
+
+while (my ($k, $c) = each %rows) {
+       $groups->{def}{''}{$k}[0] = (
+               $c64{$k} ? 'g9' :
+               $c =~ /\p{In=1.1}/ ? 'g2' :
+               $c =~ /\p{In=4.0}/ ? 'g3' :
+               $c =~ /[\x{1FB00}-\x{1FBFF}]/ ? 'g5' : # Age=V13.0
+               'g0'
+       );
+}
+
++{
+       %{ $groups },
+       version => '1.0',
+       title => 'Commodore graphics',
+       category => 'legacy/graph',
+       moderows => '21-1',
+       intro => join("\n",
+               '<abbr title="PET Standard Code of Information Interchange">PETSCII</abbr>',
+               'characters designed for the 1977 PET&nbsp;2001 machine',
+               'as found on the VIC-20 and C-64.',
+               'See also <a href="/keyboard/altgr/msx-graph">MSX graph</a> and',
+               '<a href="/keyboard/altgr/unigraph">modern Unicode</a>.',
+       ),
+       image => 'data/keyboard/thumb/c64.jpg',
+       flag => {
+               g2 => ['standard' => 'original Unicode 1993'],
+               g3 => ['extended' => 'Unicode 4.0'],
+               g5 => ['legacy'   => 'exceptional <em>symbols for legacy computing</em> in Unicode since <abbr title="Unicode 13.0">2020</abbr>'],
+               g9 => ['color'    => 'presentational controls represented by anachronistic hearts'],
+       },
+}
index d6ddd1def86db895effd46db323a85e946120a5a..30b6381f059bedcc467321dab170dd221f14c86f 100644 (file)
@@ -8,7 +8,7 @@ my %cat = (
        latin   => [qw( ipa-ucl olpc boyeg drix )],
        science => [qw( symbolics apl spacecadet )],
        graph => [qw( unigraph emojiworks )],
-       extra => [qw( msx-graph p8scii zoo )],
+       extra => [qw( msx-graph c64 p8scii zoo )],
 );
 
 for my $name (map {@{$_}} values %cat) {
index 1b796786aced685fad8c518f2d1790e4b91a2b77..72a999b85d822836b58614b94722f86268ad14b6 100644 (file)
@@ -140,12 +140,14 @@ $groups->{flag}{g8} = ['legacy',
        %{ $groups },
        version => '1.0',
        title => 'MSX graph',
-       category => 'legacy/msx',
+       category => 'legacy/graph/msx',
        intro => join("\n",
                'Resulting <a href="/unicode">selection</a>',
                'of equivalent <a href="/charset">Unicode</a> characters',
                "when the <em>graph</em> key is pressed on an MSX home computer",
                "(International model such as Toshiba HX10 or Phillips NMS 8245).",
+               'Similar to <a href="/keyboard/altgr/c64">PETSCII</a> and',
+               '<a href="/keyboard/altgr/unigraph">modern Unicode</a>.',
                'See also <a href="/keyboard/altgr/msx">letters and symbols</a>',
                "from pressing <em>code</em>.",
        ),
index c1d29cd9b1a0b4d0f23b8b1f34147d84ca551918..7c4d5709d9a1d170d739090f764a63a666f0e0b7 100644 (file)
@@ -72,7 +72,7 @@ $groups->{def}{''}{')'}[0] .= ' linkkeyboard/altgr/zoo';
        %{ $groups },
        version => '1.2',
        title => 'Unicode semigraphics',
-       category => 'specialized',
+       category => 'specialized/graph',
        intro => join("\n",
                sprintf('Keyboard mode to %s draw character graphics.',
                        '<span title="without requiring a specialised editor">manually</span>',
index d1875ef12e4a92ca0848e09b8c8339aee65aa12d..2342d751fec2b2d3f6cd9ceb4fc4bbe573676d9f 100644 (file)
@@ -130,7 +130,8 @@ block => {
        shades   => [qw{. โ–‘ . โ–’ . โ–“ }],
        fill4    => [qw{. โ–˜ โ–€ โ– . โ–Œ โ–ˆ โ– . โ–– โ–„ โ–— }],
        fill4i   => [qw{. โ–› โ–š โ–Ÿ . โ–™ โ–ž โ–œ }],
-       fill8    => [qw{. โ– โ–‚ โ–ƒ โ–„ โ–… โ–† โ–‡ โ–” . โ– โ–Ž โ– โ–Œ โ–‹ โ–Š โ–‰ โ–• }],
+       fill8    => [qw{. โ– โ–‚ โ–ƒ โ–„ โ–… โ–† โ–‡ . โ– โ–Ž โ– โ–Œ โ–‹ โ–Š โ–‰ }],
+       fill8r   => [qw{. โ–” ๐Ÿฎ‚ ๐Ÿฎƒ โ–€ ๐Ÿฎ„ ๐Ÿฎ… ๐Ÿฎ† . โ–• ๐Ÿฎ‡ ๐Ÿฎˆ โ– ๐Ÿฎ‰ ๐ŸฎŠ ๐Ÿฎ‹ }],
        colour   => [qw{. ๐ŸŸซ ๐ŸŸฅ ๐ŸŸง ๐ŸŸจ ๐ŸŸฉ ๐ŸŸฆ ๐ŸŸช}],
 },