setos

拙OS
Log | Files | Refs | LICENSE

console.c (13026B)


      1 #include <libc.h>
      2 #include <uefi.h>
      3 #include <draw.h>
      4 #include <console.h>
      5 
      6 #include <stdarg.h> // TODO: implement myself
      7 
      8 void
      9 cons_putchar(Console *con, char c)
     10 {
     11 	if (c < 0 || 0x7f <= c) {
     12 		return;
     13 	}
     14 	if (c == '\t') {
     15 		int n = 8 - con->pos.x % 8;
     16 		for (int i = 0; i < n; i++) {
     17 			cons_putchar(con, ' ');
     18 		}
     19 		return;
     20 	}
     21 	if (c == '\n') {
     22 		con->pos.x = 0;
     23 		con->pos.y++;
     24 		if (con->pos.y > con->h) {
     25 			con->pos.y = 0; // TODO: scroll.
     26 		}
     27 		return;
     28 	}
     29 	if (c == '\v') {
     30 		con->pos.y = (con->pos.y + 1) % con->h; // TODO scroll.
     31 		return;
     32 	}
     33 	if (c == '\r') {
     34 		con->pos.x = 0;
     35 		return;
     36 	}
     37 	if (c < 0x20) { // other controll charactors.
     38 		return;
     39 	}
     40 	int x, y;
     41 	x = con->pos.x * con->font->w;
     42 	y = con->pos.y * con->font->h;
     43 	for (int i = 0; i < con->font->h; i++) {
     44 		for (int j = 0; j < con->font->w; j++) {
     45 			if (((con->font->glyph[(int)c][i] >> (con->font->w - j - 1)) & 1) == 0) {
     46 				pixel(con->win, (Point) {x + j, y + i}, con->win->bg);
     47 			} else {
     48 				pixel(con->win, (Point) {x + j, y + i}, con->win->fg);
     49 			}
     50 		}
     51 	}
     52 	con->pos.x++;
     53 	if (con->pos.x > con->w) {
     54 		con->pos.x = 0;
     55 		con->pos.y++;
     56 		if (con->pos.y > con->h) {
     57 			con->pos.y = 0; // TODO: scroll.
     58 		}
     59 	}
     60 }
     61 
     62 int
     63 cons_print(Console *con, char *s)
     64 {
     65 	int n = 0;
     66 	for(; *s; s++) {
     67 		cons_putchar(con, *s);
     68 		n++;
     69 	}
     70 	return n;
     71 }
     72 
     73 int
     74 cons_printf(Console *con, char *fmt, ...)
     75 {
     76 	va_list ap;
     77 	char _buf[1024], *buf = _buf;
     78 
     79 	char               *s;
     80 	long long          d0, d1;
     81 	unsigned long long u0, u1, u2;
     82 
     83 	va_start(ap, fmt);
     84 	for (;*fmt;) {
     85 		if (*fmt != '%') {
     86 			*buf++ = *fmt++;
     87 			continue;
     88 		}
     89 		fmt++;
     90 		switch (*fmt++) {
     91 		case '%':
     92 			*buf++ = '%';
     93 			break;
     94 		case 's':
     95 			s = va_arg(ap, char *);
     96 			for (;*s;) {
     97 				*buf++ = *s++;
     98 			}
     99 			break;
    100 		case 'd':
    101 			d0 = va_arg(ap, int);
    102 			if (d0 == 0) {
    103 				*buf++ = '0';
    104 				break;
    105 			} else if (d0 < 0) {
    106 				*buf++ = '-';
    107 				d0 = -d0;
    108 			}
    109 			for (d1 = 1; d1 <= d0; d1 *= 10) {
    110 				if (d1 > d1 * 10) { // integer too big;
    111 					return -1;
    112 				}
    113 			}
    114 			for (d1 /= 10; d1 >= 1; d1 /= 10) {
    115 				*buf++ = '0' + ((d0 / d1) % 10);
    116 			}
    117 			break;
    118 		case 'x':
    119 			u0 = va_arg(ap, uint64);
    120 			if (u0 == 0) {
    121 				*buf++ = '0';
    122 				break;
    123 			}
    124 			for (u1 = 1; u1 <= u0; u1 *= 0x10) {
    125 				if (u1 > u1 * 0x10) { // integer too big.
    126 					return -1;
    127 				}
    128 			}
    129 			for (u1 /= 0x10; u1 >= 1; u1 /= 0x10) {
    130 				u2 = ((u0 / u1) % 0x10);
    131 				if (u2 < 0xa) {
    132 					*buf++ = '0' + u2;
    133 				} else {
    134 					*buf++ = 'a' + u2 - 0xa;
    135 				}
    136 			}
    137 			break;
    138 		}
    139 	}
    140 	va_end(ap);
    141 	*buf = '\0';
    142 
    143 	cons_print(con, _buf);
    144 
    145 	return (int) (buf - _buf);
    146 
    147 }
    148 
    149 Console console = {
    150 	&root_window,
    151 	&asciifont,
    152 	80, 24,
    153 	{0, 0}
    154 };
    155 
    156 AsciiFont asciifont = {
    157 	8, 16,
    158 	{
    159 		[0x20] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
    160 		[0x21] = {0x00, 0x18, 0x18, 0x18, 0x18, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x10, 0x10, 0x00},
    161 		[0x22] = {0x6c, 0x24, 0x24, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
    162 		[0x23] = {0x00, 0x12, 0x12, 0x12, 0x7f, 0x24, 0x24, 0x24, 0x24, 0x24, 0xfe, 0x48, 0x48, 0x48, 0x48, 0x00},
    163 		[0x24] = {0x10, 0x38, 0x54, 0x92, 0x92, 0x90, 0x50, 0x38, 0x14, 0x12, 0x92, 0x92, 0x54, 0x38, 0x10, 0x10},
    164 		[0x25] = {0x01, 0x61, 0x92, 0x92, 0x94, 0x94, 0x68, 0x08, 0x10, 0x16, 0x29, 0x29, 0x49, 0x49, 0x86, 0x80},
    165 		[0x26] = {0x00, 0x38, 0x44, 0x44, 0x44, 0x28, 0x10, 0x30, 0x4a, 0x8a, 0x84, 0x84, 0x4a, 0x31, 0x00, 0x00},
    166 		[0x27] = {0x60, 0x20, 0x20, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
    167 		[0x28] = {0x00, 0x02, 0x04, 0x08, 0x08, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x04, 0x02},
    168 		[0x29] = {0x00, 0x40, 0x20, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x10, 0x10, 0x20, 0x40},
    169 		[0x2a] = {0x00, 0x00, 0x00, 0x00, 0x10, 0x92, 0x54, 0x38, 0x54, 0x92, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00},
    170 		[0x2b] = {0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x10, 0xfe, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00},
    171 		[0x2c] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x20, 0x20, 0x40},
    172 		[0x2d] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
    173 		[0x2e] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00},
    174 		[0x2f] = {0x00, 0x02, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00},
    175 		[0x30] = {0x00, 0x18, 0x24, 0x24, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x24, 0x24, 0x18, 0x00, 0x00},
    176 		[0x31] = {0x00, 0x10, 0x10, 0x30, 0x50, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00},
    177 		[0x32] = {0x00, 0x18, 0x24, 0x42, 0x42, 0x02, 0x04, 0x08, 0x10, 0x20, 0x20, 0x40, 0x40, 0x7e, 0x00, 0x00},
    178 		[0x33] = {0x00, 0x38, 0x44, 0x82, 0x82, 0x02, 0x04, 0x38, 0x04, 0x02, 0x82, 0x82, 0x44, 0x38, 0x00, 0x00},
    179 		[0x34] = {0x00, 0x08, 0x18, 0x18, 0x28, 0x28, 0x48, 0x48, 0x88, 0xfe, 0x08, 0x08, 0x08, 0x08, 0x00, 0x00},
    180 		[0x35] = {0x00, 0x7c, 0x40, 0x40, 0x40, 0xb8, 0xc4, 0x82, 0x02, 0x02, 0x82, 0x82, 0x44, 0x38, 0x00, 0x00},
    181 		[0x36] = {0x00, 0x38, 0x44, 0x40, 0x80, 0x80, 0xb8, 0xc4, 0x82, 0x82, 0x82, 0x82, 0x44, 0x38, 0x00, 0x00},
    182 		[0x37] = {0x00, 0xfe, 0x02, 0x04, 0x04, 0x08, 0x08, 0x08, 0x08, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00},
    183 		[0x38] = {0x00, 0x38, 0x44, 0x82, 0x82, 0x82, 0x44, 0x38, 0x44, 0x82, 0x82, 0x82, 0x44, 0x38, 0x00, 0x00},
    184 		[0x39] = {0x00, 0x38, 0x44, 0x82, 0x82, 0x82, 0x82, 0x46, 0x3a, 0x02, 0x02, 0x82, 0x44, 0x38, 0x00, 0x00},
    185 		[0x3a] = {0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00},
    186 		[0x3b] = {0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x18, 0x08, 0x08, 0x10, 0x00, 0x00},
    187 		[0x3c] = {0x00, 0x00, 0x00, 0x02, 0x04, 0x08, 0x10, 0x20, 0x20, 0x10, 0x08, 0x04, 0x02, 0x00, 0x00, 0x00},
    188 		[0x3d] = {0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
    189 		[0x3e] = {0x00, 0x00, 0x00, 0x40, 0x20, 0x10, 0x08, 0x04, 0x04, 0x08, 0x10, 0x20, 0x40, 0x00, 0x00, 0x00},
    190 		[0x3f] = {0x00, 0x38, 0x44, 0x82, 0x82, 0x82, 0x04, 0x08, 0x08, 0x10, 0x10, 0x00, 0x00, 0x10, 0x10, 0x00},
    191 		[0x40] = {0x00, 0x18, 0x24, 0x42, 0x5a, 0xb5, 0xa5, 0xa5, 0xa5, 0x9a, 0x40, 0x40, 0x22, 0x1c, 0x00, 0x00},
    192 		[0x41] = {0x00, 0x10, 0x10, 0x28, 0x28, 0x28, 0x44, 0x44, 0x44, 0x7c, 0x82, 0x82, 0x82, 0x82, 0x00, 0x00},
    193 		[0x42] = {0x00, 0xf0, 0x88, 0x84, 0x84, 0x84, 0x88, 0xf8, 0x84, 0x82, 0x82, 0x82, 0x84, 0xf8, 0x00, 0x00},
    194 		[0x43] = {0x00, 0x38, 0x44, 0x42, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x42, 0x44, 0x38, 0x00, 0x00},
    195 		[0x44] = {0x00, 0xf0, 0x88, 0x84, 0x84, 0x82, 0x82, 0x82, 0x82, 0x82, 0x84, 0x84, 0x88, 0xf0, 0x00, 0x00},
    196 		[0x45] = {0x00, 0xfe, 0x80, 0x80, 0x80, 0x80, 0x80, 0xfc, 0x80, 0x80, 0x80, 0x80, 0x80, 0xfe, 0x00, 0x00},
    197 		[0x46] = {0x00, 0xfe, 0x80, 0x80, 0x80, 0x80, 0x80, 0xfc, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00},
    198 		[0x47] = {0x00, 0x18, 0x24, 0x42, 0x40, 0x80, 0x80, 0x8e, 0x82, 0x82, 0x82, 0x42, 0x66, 0x1a, 0x00, 0x00},
    199 		[0x48] = {0x00, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0xfe, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x00, 0x00},
    200 		[0x49] = {0x00, 0x38, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x38, 0x00, 0x00},
    201 		[0x4a] = {0x00, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x42, 0x24, 0x18, 0x00, 0x00},
    202 		[0x4b] = {0x00, 0x42, 0x42, 0x44, 0x44, 0x48, 0x58, 0x68, 0x64, 0x44, 0x42, 0x42, 0x41, 0x41, 0x00, 0x00},
    203 		[0x4c] = {0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x7e, 0x00, 0x00},
    204 		[0x4d] = {0x00, 0x82, 0x82, 0xc6, 0xc6, 0xc6, 0xaa, 0xaa, 0xaa, 0x92, 0x92, 0x92, 0x92, 0x82, 0x00, 0x00},
    205 		[0x4e] = {0x00, 0x82, 0xc2, 0xc2, 0xa2, 0xa2, 0x92, 0x92, 0x92, 0x8a, 0x8a, 0x86, 0x86, 0x82, 0x00, 0x00},
    206 		[0x4f] = {0x00, 0x38, 0x44, 0x44, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x44, 0x44, 0x38, 0x00, 0x00},
    207 		[0x50] = {0x00, 0xf8, 0x84, 0x82, 0x82, 0x82, 0x84, 0xf8, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00},
    208 		[0x51] = {0x00, 0x38, 0x44, 0x44, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0xba, 0x44, 0x44, 0x38, 0x08, 0x06},
    209 		[0x52] = {0x00, 0xf8, 0x84, 0x82, 0x82, 0x82, 0x84, 0xf8, 0x88, 0x84, 0x84, 0x84, 0x82, 0x82, 0x00, 0x00},
    210 		[0x53] = {0x00, 0x38, 0x44, 0x82, 0x82, 0x80, 0x60, 0x18, 0x04, 0x02, 0x82, 0x82, 0x44, 0x38, 0x00, 0x00},
    211 		[0x54] = {0x00, 0xfe, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00},
    212 		[0x55] = {0x00, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x44, 0x38, 0x00, 0x00},
    213 		[0x56] = {0x00, 0x82, 0x82, 0x82, 0x82, 0x44, 0x44, 0x44, 0x28, 0x28, 0x28, 0x10, 0x10, 0x10, 0x00, 0x00},
    214 		[0x57] = {0x00, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0xaa, 0xaa, 0x6c, 0x44, 0x44, 0x44, 0x44, 0x00, 0x00},
    215 		[0x58] = {0x00, 0x82, 0x44, 0x44, 0x28, 0x28, 0x10, 0x28, 0x28, 0x28, 0x44, 0x44, 0x82, 0x82, 0x00, 0x00},
    216 		[0x59] = {0x00, 0x82, 0x82, 0x44, 0x44, 0x44, 0x28, 0x28, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00},
    217 		[0x5a] = {0x00, 0xfe, 0x04, 0x04, 0x08, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0xfe, 0x00, 0x00},
    218 		[0x5b] = {0x1e, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x1e},
    219 		[0x5c] = {0x00, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x10, 0x08, 0x08, 0x04, 0x04, 0x02, 0x02, 0x00},
    220 		[0x5d] = {0xf0, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0xf0},
    221 		[0x5e] = {0x10, 0x28, 0x44, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
    222 		[0x5f] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x00},
    223 		[0x60] = {0x30, 0x20, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
    224 		[0x61] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x42, 0x02, 0x3e, 0x42, 0x82, 0x82, 0x86, 0x7a, 0x00, 0x00},
    225 		[0x62] = {0x00, 0x80, 0x80, 0x80, 0x80, 0xb8, 0xc4, 0x82, 0x82, 0x82, 0x82, 0x82, 0xc4, 0xb8, 0x00, 0x00},
    226 		[0x63] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x44, 0x82, 0x80, 0x80, 0x80, 0x82, 0x44, 0x38, 0x00, 0x00},
    227 		[0x64] = {0x00, 0x02, 0x02, 0x02, 0x02, 0x3a, 0x46, 0x82, 0x82, 0x82, 0x82, 0x82, 0x46, 0x3a, 0x00, 0x00},
    228 		[0x65] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x44, 0x82, 0x82, 0xfe, 0x80, 0x82, 0x44, 0x38, 0x00, 0x00},
    229 		[0x66] = {0x00, 0x0c, 0x10, 0x10, 0x10, 0x7c, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00},
    230 		[0x67] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x3b, 0x44, 0x44, 0x44, 0x38, 0x40, 0x78, 0x84, 0x82, 0x82, 0x7c},
    231 		[0x68] = {0x00, 0x40, 0x40, 0x40, 0x40, 0x5c, 0x62, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x00, 0x00},
    232 		[0x69] = {0x00, 0x10, 0x10, 0x00, 0x00, 0x30, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00},
    233 		[0x6a] = {0x00, 0x08, 0x08, 0x00, 0x00, 0x18, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x10, 0x60},
    234 		[0x6b] = {0x00, 0x40, 0x40, 0x40, 0x40, 0x42, 0x44, 0x48, 0x50, 0x68, 0x44, 0x44, 0x42, 0x42, 0x00, 0x00},
    235 		[0x6c] = {0x00, 0x30, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00},
    236 		[0x6d] = {0x00, 0x00, 0x00, 0x00, 0x00, 0xec, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x00, 0x00},
    237 		[0x6e] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x5c, 0x62, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x00, 0x00},
    238 		[0x6f] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x44, 0x82, 0x82, 0x82, 0x82, 0x82, 0x44, 0x38, 0x00, 0x00},
    239 		[0x70] = {0x00, 0x00, 0x00, 0x00, 0x00, 0xb8, 0xc4, 0x82, 0x82, 0x82, 0x82, 0xc4, 0xb8, 0x80, 0x80, 0x80},
    240 		[0x71] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x3a, 0x46, 0x82, 0x82, 0x82, 0x82, 0x46, 0x3a, 0x02, 0x02, 0x02},
    241 		[0x72] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x2c, 0x30, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x00},
    242 		[0x73] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x42, 0x40, 0x60, 0x18, 0x06, 0x02, 0x42, 0x3c, 0x00, 0x00},
    243 		[0x74] = {0x00, 0x00, 0x10, 0x10, 0x10, 0x7c, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x0c, 0x00, 0x00},
    244 		[0x75] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x46, 0x3a, 0x00, 0x00},
    245 		[0x76] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x82, 0x82, 0x44, 0x44, 0x28, 0x28, 0x10, 0x10, 0x00, 0x00},
    246 		[0x77] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x92, 0x92, 0x92, 0x92, 0xaa, 0xaa, 0x44, 0x44, 0x44, 0x00, 0x00},
    247 		[0x78] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x44, 0x28, 0x28, 0x10, 0x28, 0x28, 0x44, 0x82, 0x00, 0x00},
    248 		[0x79] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x82, 0x44, 0x44, 0x28, 0x28, 0x18, 0x10, 0x10, 0x20, 0xc0},
    249 		[0x7a] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x04, 0x08, 0x08, 0x10, 0x10, 0x20, 0x40, 0xfe, 0x00, 0x00},
    250 		[0x7b] = {0x04, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x10, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x04},
    251 		[0x7c] = {0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10},
    252 		[0x7d] = {0x40, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x10, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x40},
    253 		[0x7e] = {0x00, 0x00, 0x00, 0x60, 0x92, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
    254 	}
    255 };