Skip to content
Snippets Groups Projects
Commit 03943572 authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

More ATASCII improvements

Fix bad and poor unicode mappings, add support for sending Insert
and Pipe.
parent 16d718aa
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #4465 passed
...@@ -1235,44 +1235,22 @@ const static uint32_t haik8_unicode_table[128] = { ...@@ -1235,44 +1235,22 @@ const static uint32_t haik8_unicode_table[128] = {
0x0554, 0x0584, 0x0555, 0x0585, 0x0556, 0x0586, 0x02bc, 0xfffd 0x0554, 0x0584, 0x0555, 0x0585, 0x0556, 0x0586, 0x02bc, 0xfffd
}; };
const static struct ciolib_cpmap atascii_table[148] = { const static struct ciolib_cpmap atascii_table[58] = {
{0x0007, 252}, {0x0008, 126}, {0x0009, 127}, {0x000d, 155}, {0x0007, 253}, {0x0008, 126}, {0x0009, 127}, {0x000d, 155},
{0x001b, 27}, {0x0020, 32}, {0x0021, 33}, {0x0022, 34}, {0x007f, 254}, {0x00a0, 155}, {0x2022, 148}, {0x2190, 30},
{0x0023, 35}, {0x0024, 36}, {0x0025, 37}, {0x0026, 38}, {0x2191, 28}, {0x2192, 159}, {0x2193, 157}, {0x2196, 125},
{0x0027, 39}, {0x0028, 40}, {0x0029, 41}, {0x002a, 42}, {0x21b0, 125}, {0x241b, 27}, {0x2500, 18}, {0x2502, 124},
{0x002b, 43}, {0x002c, 44}, {0x002d, 45}, {0x002e, 46}, {0x250c, 145}, {0x2510, 5}, {0x2514, 26}, {0x2518, 131},
{0x002f, 47}, {0x0030, 48}, {0x0031, 49}, {0x0032, 50}, {0x251c, 129}, {0x2524, 132}, {0x252c, 23}, {0x2534, 24},
{0x0033, 51}, {0x0034, 52}, {0x0035, 53}, {0x0036, 54}, {0x253c, 147}, {0x2571, 6}, {0x2572, 135}, {0x2580, 149},
{0x0037, 55}, {0x0038, 56}, {0x0039, 57}, {0x003a, 58}, {0x2582, 142}, {0x2584, 21}, {0x2586, 141}, {0x2588, 160},
{0x003b, 59}, {0x003c, 60}, {0x003d, 61}, {0x003e, 62}, {0x258a, 130}, {0x258c, 25}, {0x258e, 150}, {0x2590, 153},
{0x003f, 63}, {0x0040, 64}, {0x0041, 65}, {0x0042, 66}, {0x2596, 143}, {0x2597, 137}, {0x2598, 140}, {0x2599, 139},
{0x0043, 67}, {0x0044, 68}, {0x0045, 69}, {0x0046, 70}, {0x259b, 137}, {0x259c, 143}, {0x259d, 139}, {0x259f, 140},
{0x0047, 71}, {0x0048, 72}, {0x0049, 73}, {0x004a, 74}, {0x25b6, 127}, {0x25c0, 126}, {0x25d8, 148}, {0x25e2, 136},
{0x004b, 75}, {0x004c, 76}, {0x004d, 77}, {0x004e, 78}, {0x25e3, 10}, {0x25e4, 136}, {0x25e5, 138}, {0x2660, 123},
{0x004f, 79}, {0x0050, 80}, {0x0051, 81}, {0x0052, 82}, {0x2663, 144}, {0x2665, 63}, {0x2666, 96}, {0xfffd, 63},
{0x0053, 83}, {0x0054, 84}, {0x0055, 85}, {0x0056, 86}, {0x1fb82, 13}, {0x1fb87, 2}
{0x0057, 87}, {0x0058, 88}, {0x0059, 89}, {0x005a, 90},
{0x005b, 91}, {0x005c, 92}, {0x005d, 93}, {0x005e, 94},
{0x005f, 95}, {0x0061, 97}, {0x0062, 98}, {0x0063, 99},
{0x0064, 100}, {0x0065, 101}, {0x0066, 102}, {0x0067, 103},
{0x0068, 104}, {0x0069, 105}, {0x006a, 106}, {0x006b, 107},
{0x006c, 108}, {0x006d, 109}, {0x006e, 110}, {0x006f, 111},
{0x0070, 112}, {0x0071, 113}, {0x0072, 114}, {0x0073, 115},
{0x0074, 116}, {0x0075, 117}, {0x0076, 118}, {0x0077, 119},
{0x0078, 120}, {0x0079, 121}, {0x007a, 122}, {0x007c, 124},
{0x007f, 253}, {0x00a0, 155}, {0x2022, 148}, {0x2190, 30},
{0x2191, 28}, {0x2192, 159}, {0x2193, 157}, {0x21b0, 125},
{0x241b, 27}, {0x2500, 18}, {0x250c, 145}, {0x2510, 5},
{0x2514, 26}, {0x2518, 131}, {0x251c, 129}, {0x2524, 132},
{0x252c, 23}, {0x2534, 24}, {0x253c, 147}, {0x2571, 6},
{0x2572, 135}, {0x2580, 149}, {0x2582, 142}, {0x2584, 21},
{0x2586, 141}, {0x2588, 160}, {0x258a, 130}, {0x258c, 25},
{0x258e, 150}, {0x2590, 153}, {0x2596, 143}, {0x2597, 137},
{0x2598, 140}, {0x2599, 139}, {0x259b, 137}, {0x259c, 143},
{0x259d, 139}, {0x259f, 140}, {0x25b6, 127}, {0x25c0, 126},
{0x25d8, 148}, {0x25e2, 136}, {0x25e3, 10}, {0x25e4, 136},
{0x25e5, 138}, {0x2660, 123}, {0x2663, 144}, {0x2665, 63},
{0x2666, 96}, {0xfffd, 63}, {0x1fb82, 13}, {0x1fb87, 2}
}; };
const static uint32_t atascii_unicode_table[256] = { const static uint32_t atascii_unicode_table[256] = {
...@@ -1291,7 +1269,7 @@ const static uint32_t atascii_unicode_table[256] = { ...@@ -1291,7 +1269,7 @@ const static uint32_t atascii_unicode_table[256] = {
0x2666, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x2666, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f,
0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
0x0078, 0x0079, 0x007a, 0x2660, 0x007c, 0x21b0, 0x0008, 0x0009, 0x0078, 0x0079, 0x007a, 0x2660, 0x2502, /* 0x21b0 */ 0x2196, 0x0008, 0x0009,
0x2665, 0x251c, 0x258a, 0x2518, 0x2524, 0x2510, 0x2571, 0x2572, 0x2665, 0x251c, 0x258a, 0x2518, 0x2524, 0x2510, 0x2571, 0x2572,
0x25e4, 0x259b, 0x25e5, 0x2599, 0x259f, 0x2586, 0x2582, 0x259c, 0x25e4, 0x259b, 0x25e5, 0x2599, 0x259f, 0x2586, 0x2582, 0x259c,
0x2663, 0x250c, 0x2500, 0x253c, 0x25d8, 0x2580, 0x258e, 0x252c, 0x2663, 0x250c, 0x2500, 0x253c, 0x25d8, 0x2580, 0x258e, 0x252c,
...@@ -1307,7 +1285,7 @@ const static uint32_t atascii_unicode_table[256] = { ...@@ -1307,7 +1285,7 @@ const static uint32_t atascii_unicode_table[256] = {
0x2666, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x2666, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f,
0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
0x0078, 0x0079, 0x007a, 0x2660, 0x0007, 0x007f, 0x25c0, 0x25b6 0x0078, 0x0079, 0x007a, 0x2660, 0x2502, 0x0007, 0x007f, 0x25b6
}; };
const static uint32_t atascii_ext_table[256] = { const static uint32_t atascii_ext_table[256] = {
...@@ -1326,7 +1304,7 @@ const static uint32_t atascii_ext_table[256] = { ...@@ -1326,7 +1304,7 @@ const static uint32_t atascii_ext_table[256] = {
0x2666, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x2666, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f,
0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
0x0078, 0x0079, 0x007a, 0x2660, 0x007c, 0x21b0, 0x25c0, 0x25b6, 0x0078, 0x0079, 0x007a, 0x2660, 0x2502, /* 0x21b0 */ 0x2196, 0x25c0, 0x25b6,
0x2665, 0x251c,0x1fb87, 0x2518, 0x2524, 0x2510, 0x2571, 0x2572, 0x2665, 0x251c,0x1fb87, 0x2518, 0x2524, 0x2510, 0x2571, 0x2572,
0x25e2, 0x2597, 0x25e3, 0x259d, 0x2598,0x1fb82, 0x2582, 0x2596, 0x25e2, 0x2597, 0x25e3, 0x259d, 0x2598,0x1fb82, 0x2582, 0x2596,
0x2663, 0x250c, 0x2500, 0x253c, 0x2022, 0x2584, 0x258e, 0x252c, 0x2663, 0x250c, 0x2500, 0x253c, 0x2022, 0x2584, 0x258e, 0x252c,
...@@ -1342,7 +1320,7 @@ const static uint32_t atascii_ext_table[256] = { ...@@ -1342,7 +1320,7 @@ const static uint32_t atascii_ext_table[256] = {
0x2666, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x2666, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f,
0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
0x0078, 0x0079, 0x007a, 0x2660, 0x007c, 0x21b0, 0x25c0, 0x25b6 0x0078, 0x0079, 0x007a, 0x2660, 0x2502, /* 0x21b0 */ 0x2196, 0x25c0, 0x25b6
}; };
const static struct ciolib_cpmap petsciiu_table[129] = { const static struct ciolib_cpmap petsciiu_table[129] = {
......
...@@ -342,7 +342,6 @@ update_status(struct bbslist *bbs, int speed, int ooii_mode, bool ata_inv) ...@@ -342,7 +342,6 @@ update_status(struct bbslist *bbs, int speed, int ooii_mode, bool ata_inv)
char sep; char sep;
int oldfont_norm; int oldfont_norm;
int oldfont_bright; int oldfont_bright;
int calcwidth;
if (term.nostatus) if (term.nostatus)
return; return;
...@@ -4267,10 +4266,18 @@ doterm(struct bbslist *bbs) ...@@ -4267,10 +4266,18 @@ doterm(struct bbslist *bbs)
ch[0] = 30; ch[0] = 30;
conn_send(ch, 1, 0); conn_send(ch, 1, 0);
break; break;
case CIO_KEY_IC:
ch[0] = 255;
conn_send(ch, 1, 0);
break;
case '\t': case '\t':
ch[0] = 127; ch[0] = 127;
conn_send(ch, 1, 0); conn_send(ch, 1, 0);
break; break;
case '|':
ch[0] = 124 + (atascii_inverse ? 128 : 0);
conn_send(ch, 1, 0);
break;
case 96: /* Backtick toggles inverse */ case 96: /* Backtick toggles inverse */
atascii_inverse = !atascii_inverse; atascii_inverse = !atascii_inverse;
break; break;
...@@ -4281,6 +4288,10 @@ doterm(struct bbslist *bbs) ...@@ -4281,6 +4288,10 @@ doterm(struct bbslist *bbs)
ch[0] = key + (atascii_inverse ? 128 : 0); ch[0] = key + (atascii_inverse ? 128 : 0);
conn_send(ch, 1, 0); conn_send(ch, 1, 0);
} }
else if (key > 252 && key < 256) {
ch[0] = key;
conn_send(ch, 1, 0);
}
} }
break; break;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment