display: Update Type 342 characters.

This commit is contained in:
Lars Brinkhoff 2019-06-01 21:40:37 +02:00
parent 217463c6e2
commit fc4d9cae40

View file

@ -108,6 +108,7 @@ enum jump_type { DJP=2, DJS=3, DDS=1 }; /* type 347 */
#define CH_LC 0010 /* Shift out. */ #define CH_LC 0010 /* Shift out. */
#define CH_ESC 0020 /* Escape to parameter mode. */ #define CH_ESC 0020 /* Escape to parameter mode. */
#define CH_NSPC 0040 /* Non spacing. */ #define CH_NSPC 0040 /* Non spacing. */
#define CH_D 0100 /* Descender. */
/* put all the state in a struct "just in case" */ /* put all the state in a struct "just in case" */
static struct type340 { static struct type340 {
@ -617,11 +618,11 @@ static const unsigned char chars[128][6] = {
{ 0306, 0310, 0220, 0246, 0306, 0 }, /* 45 % */ { 0306, 0310, 0220, 0246, 0306, 0 }, /* 45 % */
{ 0154, 0222, 0156, 0004, 0012, 0 }, /* 46 & */ { 0154, 0222, 0156, 0004, 0012, 0 }, /* 46 & */
{ 0000, 0000, 0300, 0340, 0000, 0 }, /* 47 ' */ { 0000, 0000, 0300, 0340, 0000, 0 }, /* 47 ' */
{ 0070, 0104, 0202, 0000, 0000, 0 }, /* 50 ( */ { 0000, 0070, 0104, 0202, 0000, 0 }, /* 50 ( Source: AI film 104 */
{ 0000, 0000, 0202, 0104, 0070, 0 }, /* 51 ) */ { 0000, 0202, 0104, 0070, 0000, 0 }, /* 51 ) Source: AI film 104 */
{ 0124, 0070, 0174, 0070, 0124, 0 }, /* 52 * */ { 0104, 0050, 0174, 0050, 0104, 0 }, /* 52 * Source: AI film */
{ 0020, 0020, 0174, 0020, 0020, 0 }, /* 53 + */ { 0020, 0020, 0174, 0020, 0020, 0 }, /* 53 + */
{ 0000, 0014, 0016, 0000, 0000, 0 }, /* 54 , */ { 0000, 0032, 0034, 0000, 0000, 0 }, /* 54 , Source: AI film 104 */
{ 0020, 0020, 0020, 0020, 0020, 0 }, /* 55 - */ { 0020, 0020, 0020, 0020, 0020, 0 }, /* 55 - */
{ 0000, 0006, 0006, 0000, 0000, 0 }, /* 56 . */ { 0000, 0006, 0006, 0000, 0000, 0 }, /* 56 . */
{ 0004, 0010, 0020, 0040, 0100, 0 }, /* 57 / */ { 0004, 0010, 0020, 0040, 0100, 0 }, /* 57 / */
@ -636,7 +637,7 @@ static const unsigned char chars[128][6] = {
{ 0154, 0222, 0222, 0222, 0154, 0 }, /* 70 8 */ { 0154, 0222, 0222, 0222, 0154, 0 }, /* 70 8 */
{ 0144, 0222, 0222, 0222, 0174, 0 }, /* 71 9 */ { 0144, 0222, 0222, 0222, 0174, 0 }, /* 71 9 */
{ 0000, 0066, 0066, 0000, 0000, 0 }, /* 72 : */ { 0000, 0066, 0066, 0000, 0000, 0 }, /* 72 : */
{ 0000, 0154, 0156, 0000, 0000, 0 }, /* 73 ; */ { 0000, 0332, 0334, 0000, 0000, 0 }, /* 73 ; Source: consistent with , */
{ 0020, 0050, 0104, 0202, 0000, 0 }, /* 74 < */ { 0020, 0050, 0104, 0202, 0000, 0 }, /* 74 < */
{ 0050, 0050, 0050, 0050, 0050, 0 }, /* 75 = */ { 0050, 0050, 0050, 0050, 0050, 0 }, /* 75 = */
{ 0000, 0202, 0104, 0050, 0020, 0 }, /* 76 > */ { 0000, 0202, 0104, 0050, 0020, 0 }, /* 76 > */
@ -646,34 +647,37 @@ static const unsigned char chars[128][6] = {
* original letterforms not available, using * original letterforms not available, using
* https://fontstruct.com/fontstructions/show/357807/5x7_monospaced_pixel_font * https://fontstruct.com/fontstructions/show/357807/5x7_monospaced_pixel_font
* PLB: I wonder if VT52 was 5x7???? * PLB: I wonder if VT52 was 5x7????
*
* Lars Brinkhoff: I added new shapes from AI lab film footage, and
* from the Knight TV font.
*/ */
{ 0070, 0124, 0154, 0124, 0070, 0 }, /* 00 blob */ { 0070, 0124, 0154, 0124, 0070, 0 }, /* 00 blob */
{ 0034, 0042, 0042, 0024, 0076, 0 }, /* 01 a */ { 0034, 0042, 0042, 0074, 0002, 0 }, /* 01 a Source: AI film 75 */
{ 0376, 0024, 0042, 0042, 0034, 0 }, /* 02 b */ { 0376, 0042, 0042, 0042, 0034, 0 }, /* 02 b Source: AI film 75 */
{ 0034, 0042, 0042, 0042, 0024, 0 }, /* 03 c */ { 0034, 0042, 0042, 0042, 0024, 0 }, /* 03 c */
{ 0034, 0042, 0042, 0024, 0376, 0 }, /* 04 d */ { 0034, 0042, 0042, 0042, 0376, 0 }, /* 04 d Source: AI film 75 */
{ 0034, 0052, 0052, 0052, 0032, 0 }, /* 05 e */ { 0034, 0052, 0052, 0052, 0030, 0 }, /* 05 e Source: AI film 75 */
{ 0010, 0176, 0210, 0200, 0100, 0 }, /* 06 f */ { 0020, 0176, 0220, 0200, 0100, 0 }, /* 06 f Source: Knight TV */
{ 0020, 0052, 0052, 0052, 0074, 0 }, /* 07 g */ { 0160, 0212, 0212, 0212, 0174, CH_D },/* 07 g Source: AI film 75 */
{ 0376, 0020, 0040, 0040, 0036, 0 }, /* 10 h */ { 0376, 0040, 0040, 0040, 0036, 0 }, /* 10 h Source: AI film 75 */
{ 0000, 0022, 0136, 0002, 0000, 0 }, /* 11 i */ { 0000, 0042, 0276, 0002, 0000, 0 }, /* 11 i Source: AI film 75 */
{ 0000, 0004, 0042, 0274, 0000, 0 }, /* 12 j */ { 0000, 0004, 0042, 0274, 0000, 0 }, /* 12 j */
{ 0376, 0010, 0024, 0042, 0000, 0 }, /* 13 k */ { 0376, 0010, 0030, 0044, 0002, 0 }, /* 13 k Source: AI film 75 */
{ 0374, 0002, 0002, 0000, 0000, 0 }, /* 14 l */ { 0000, 0202, 0376, 0002, 0000, 0 }, /* 14 l Source: AI film 75 */
{ 0076, 0040, 0036, 0040, 0036, 0 }, /* 15 m */ { 0076, 0040, 0036, 0040, 0036, 0 }, /* 15 m */
{ 0076, 0020, 0040, 0040, 0036, 0 }, /* 16 n */ { 0076, 0020, 0040, 0040, 0036, 0 }, /* 16 n Source: AI film 75 */
{ 0034, 0042, 0042, 0042, 0034, 0 }, /* 17 o */ { 0034, 0042, 0042, 0042, 0034, 0 }, /* 17 o Source: AI film 75 */
{ 0076, 0050, 0050, 0050, 0020, 0 }, /* 20 p */ { 0376, 0210, 0210, 0210, 0160, CH_D },/* 20 p Source: Knight TV */
{ 0020, 0050, 0050, 0050, 0076, 0 }, /* 21 q */ { 0160, 0210, 0210, 0210, 0376, CH_D },/* 21 q Source: Knight TV */
{ 0076, 0020, 0040, 0040, 0000, 0 }, /* 22 r */ { 0076, 0020, 0040, 0040, 0020, 0 }, /* 22 r Source: AI film 75 */
{ 0022, 0052, 0052, 0052, 0044, 0 }, /* 23 s */ { 0022, 0052, 0052, 0052, 0044, 0 }, /* 23 s */
{ 0020, 0174, 0022, 0004, 0000, 0 }, /* 24 t */ { 0040, 0374, 0042, 0002, 0004, 0 }, /* 24 t Source: AI film 75 */
{ 0074, 0002, 0002, 0004, 0076, 0 }, /* 25 u */ { 0074, 0002, 0002, 0004, 0076, 0 }, /* 25 u Source: AI film 75 */
{ 0060, 0014, 0002, 0014, 0060, 0 }, /* 26 v */ { 0070, 0004, 0002, 0004, 0070, 0 }, /* 26 v Source: Knight TV */
{ 0070, 0006, 0030, 0006, 0070, 0 }, /* 27 w */ { 0074, 0002, 0034, 0002, 0074, 0 }, /* 27 w Source: AI film 75 */
{ 0042, 0024, 0010, 0024, 0042, 0 }, /* 30 x */ { 0042, 0024, 0010, 0024, 0042, 0 }, /* 30 x */
{ 0060, 0012, 0012, 0012, 0074, 0 }, /* 31 y */ { 0360, 0012, 0012, 0012, 0374, CH_D },/* 31 y Source: AI film 75 */
{ 0042, 0046, 0052, 0062, 0042, 0 }, /* 32 z */ { 0042, 0056, 0052, 0072, 0042, 0 }, /* 32 z Source: Knight TV */
{ 0000, 0000, 0000, 0000, 0000, CH_LF }, /* 33 LF */ { 0000, 0000, 0000, 0000, 0000, CH_LF }, /* 33 LF */
{ 0000, 0000, 0000, 0000, 0000, CH_CR }, /* 34 CR */ { 0000, 0000, 0000, 0000, 0000, CH_CR }, /* 34 CR */
{ 0000, 0000, 0000, 0000, 0000, CH_UC }, /* 35 HORIZ */ { 0000, 0000, 0000, 0000, 0000, CH_UC }, /* 35 HORIZ */
@ -685,26 +689,26 @@ static const unsigned char chars[128][6] = {
{ 0100, 0200, 0100, 0040, 0100, 0 }, /* 43 ~ */ { 0100, 0200, 0100, 0040, 0100, 0 }, /* 43 ~ */
{ 0376, 0376, 0376, 0376, 0376, 0 }, /* 44 ??? */ { 0376, 0376, 0376, 0376, 0376, 0 }, /* 44 ??? */
{ 0376, 0376, 0376, 0376, 0376, 0 }, /* 45 ??? */ { 0376, 0376, 0376, 0376, 0376, 0 }, /* 45 ??? */
{ 0376, 0376, 0376, 0376, 0376, 0 }, /* 46 ??? */ { 0040, 0100, 0376, 0100, 0040, 0 }, /* 46 up arrow */
{ 0020, 0020, 0124, 0070, 0020, 0 }, /* 47 right arrow */ { 0020, 0020, 0124, 0070, 0020, 0 }, /* 47 left arrow */
{ 0010, 0004, 0376, 0004, 0010, 0 }, /* 50 down arrow */ { 0010, 0004, 0376, 0004, 0010, 0 }, /* 50 down arrow */
{ 0376, 0376, 0376, 0376, 0376, 0 }, /* 51 ??? */ { 0020, 0070, 0124, 0020, 0020, 0 }, /* 47 right arrow */
{ 0100, 0040, 0020, 0010, 0004, 0 }, /* 52 \ */ { 0100, 0040, 0020, 0010, 0004, 0 }, /* 52 \ */
{ 0376, 0202, 0202, 0000, 0000, 0 }, /* 53 [ */ { 0000, 0376, 0202, 0202, 0000, 0 }, /* 53 [ */
{ 0000, 0000, 0202, 0202, 0376, 0 }, /* 54 ] */ { 0000, 0202, 0202, 0376, 0000, 0 }, /* 54 ] */
{ 0020, 0154, 0202, 0000, 0000, 0 }, /* 55 { */ { 0000, 0020, 0154, 0202, 0000, 0 }, /* 55 { */
{ 0000, 0000, 0202, 0154, 0020, 0 }, /* 56 } */ { 0000, 0202, 0154, 0020, 0000, 0 }, /* 56 } */
{ 0376, 0376, 0376, 0376, 0376, 0 }, /* 57 ??? */ { 0376, 0376, 0376, 0376, 0376, 0 }, /* 57 ??? */
{ 0020, 0070, 0124, 0020, 0020, 0 }, /* 60 left arrow */ { 0002, 0002, 0002, 0002, 0002, 0 }, /* 60 _ */
{ 0376, 0376, 0376, 0376, 0376, 0 }, /* 61 ??? */ { 0376, 0376, 0376, 0376, 0376, 0 }, /* 61 ??? */
{ 0000, 0000, 0376, 0000, 0000, 0 }, /* 62 | */ { 0000, 0000, 0376, 0000, 0000, 0 }, /* 62 | */
{ 0376, 0376, 0376, 0376, 0376, 0 }, /* 63 ??? */ { 0376, 0376, 0376, 0376, 0376, 0 }, /* 63 ??? */
{ 0376, 0376, 0376, 0376, 0376, 0 }, /* 64 ??? */ { 0376, 0376, 0376, 0376, 0376, 0 }, /* 64 ??? */
{ 0376, 0376, 0376, 0376, 0376, 0 }, /* 65 ??? */ { 0376, 0376, 0376, 0376, 0376, 0 }, /* 65 ??? */
{ 0000, 0200, 0100, 0040, 0000, CH_NSPC }, /* 66 ` */ { 0000, 0200, 0100, 0040, 0000, CH_NSPC }, /* 66 ` */
{ 0040, 0100, 0376, 0100, 0040, CH_NSPC }, /* 67 up arrow */ { 0040, 0100, 0200, 0100, 0040, CH_NSPC }, /* 67 ^ */
{ 0376, 0376, 0376, 0376, 0376, 0 }, /* 70 ??? */ { 0376, 0376, 0376, 0376, 0376, 0 }, /* 70 ??? */
{ 0376, 0376, 0376, 0376, 0376, 0 }, /* 71 ??? */ { 0376, 0376, 0376, 0376, 0376, 0 }, /* 71 block? */
{ 0376, 0376, 0376, 0376, 0376, 0 }, /* 72 ??? */ { 0376, 0376, 0376, 0376, 0376, 0 }, /* 72 ??? */
{ 0376, 0376, 0376, 0376, 0376, 0 }, /* 73 ??? */ { 0376, 0376, 0376, 0376, 0376, 0 }, /* 73 ??? */
{ 0376, 0376, 0376, 0376, 0376, 0 }, /* 74 ??? */ { 0376, 0376, 0376, 0376, 0376, 0 }, /* 74 ??? */
@ -762,6 +766,9 @@ character(int n, unsigned char c)
if ((flags & CH_NSPC) && u->xpos >= u->width*s) { if ((flags & CH_NSPC) && u->xpos >= u->width*s) {
u->xpos -= u->width*s; /* non spacing character */ u->xpos -= u->width*s; /* non spacing character */
} }
if (flags & CH_D) { /* descender */
u->ypos -= 2*s;
}
/* plot character from character set selected by "shift" */ /* plot character from character set selected by "shift" */
for (x = 0; x < 5; x++) { /* column: 0 to 4, left to right */ for (x = 0; x < 5; x++) { /* column: 0 to 4, left to right */
for (y = 0; y < 7; y++) { /* row: 0 to 6, bottom to top */ for (y = 0; y < 7; y++) { /* row: 0 to 6, bottom to top */
@ -772,6 +779,9 @@ character(int n, unsigned char c)
} }
} }
u->xpos += u->width*s; u->xpos += u->width*s;
if (flags & CH_D) { /* undo descender */
u->ypos += 2*s;
}
if (u->xpos > 1023) { if (u->xpos > 1023) {
u->xpos = 1023; u->xpos = 1023;
u->status |= ST340_VEDGE; u->status |= ST340_VEDGE;