From f9620a47c3c6cc59fca525babff2bc9203db0291 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Mon, 3 Feb 2020 14:52:53 +0000 Subject: [PATCH] rust: add colorfont support to k210-console useful for emoji and other small hardcoded images --- rust/glyph-mapping/src/main.rs | 3 +- rust/k210-console/scripts/gencolorfont.py | 99 +++++++++++++++ .../scripts/honeybadger160_24.png | Bin 0 -> 12550 bytes rust/k210-console/src/console.rs | 84 ++++++++----- rust/k210-console/src/example_colorfont.rs | 119 ++++++++++++++++++ rust/k210-console/src/main.rs | 16 ++- rust/term-server/src/main.rs | 2 +- rust/weather/src/main.rs | 2 +- 8 files changed, 290 insertions(+), 35 deletions(-) create mode 100755 rust/k210-console/scripts/gencolorfont.py create mode 100644 rust/k210-console/scripts/honeybadger160_24.png create mode 100644 rust/k210-console/src/example_colorfont.rs diff --git a/rust/glyph-mapping/src/main.rs b/rust/glyph-mapping/src/main.rs index f6c91a1..ff38d36 100644 --- a/rust/glyph-mapping/src/main.rs +++ b/rust/glyph-mapping/src/main.rs @@ -107,7 +107,7 @@ fn main() -> ! { dvp.set_auto(false); let mut image: ScreenImage = [0; DISP_PIXELS / 2]; - let mut console: Console = Console::new(); + let mut console: Console = Console::new(None); writeln!(stdout, "Starting frame loop").unwrap(); loop { dvp.get_image(); @@ -141,6 +141,7 @@ fn main() -> ! { lcd_colors::rgb565(r as u8, g as u8, b as u8), 0, GLYPH_BY_FILL[i as usize].into(), + 0, ); } } diff --git a/rust/k210-console/scripts/gencolorfont.py b/rust/k210-console/scripts/gencolorfont.py new file mode 100755 index 0000000..24423bb --- /dev/null +++ b/rust/k210-console/scripts/gencolorfont.py @@ -0,0 +1,99 @@ +#!/usr/bin/env python3 +''' +Slice an image into 8x8 chunks (tiles) to create a color font. +''' +import sys +from PIL import Image +import struct + +BW=8 # tile width +BH=8 # tile height +BG=(0,0,0) # RGB color for background + +def rgb565(color): + '''Truncate RGB888[8] color to RGB565''' + return ((color[0] >> 3) << 11) | ((color[1] >> 2) << 5) | (color[2] >> 3) + +def extract_block(img, coord): + '''Extract a RGB block from an image.''' + data = [] + for yi in range(0, BH): + row = [] + for xi in range(0, BW): + try: + row.append(img.getpixel((coord[0] + xi, coord[1] + yi))) + except IndexError: + row.append(BG) + data.append(row) + return data + +def encode_block(block): + '''Encode RGB block to 32-bit column-swizzled RGB565''' + out = [] + for yi in range(0, BH): + for xi in range(0, BW//2): + out.append( + (rgb565(block[yi][xi*2 + 0]) << 16) | + rgb565(block[yi][xi*2 + 1])) + return tuple(out) + +infile = sys.argv[1] +outfile = sys.argv[2] + +img = Image.open(infile) + +blocks_x = (img.size[0] + (BW-1))//BW +blocks_y = (img.size[1] + (BH-1))//BH + +print(f'{blocks_x}×{blocks_y}') + +# character set, addressed by content +charset = {} + +# add empty block as character 0 +empty_block = encode_block([[BG]*BW]*BH) +charset[empty_block] = 0 + +out = [] +for by in range(0, blocks_y): + row = [] + for bx in range(0, blocks_x): + bd = encode_block(extract_block(img, (bx * BW, by * BH))) + # add character to character set + try: + ch = charset[bd] + except KeyError: + ch = len(charset) + charset[bd] = ch + row.append(ch) + out.append(row) + +m = len(empty_block) +n = len(charset) +print(f'used {n} characters') + +charset_by_ch = [None] * n +for (bd, ch) in charset.items(): + charset_by_ch[ch] = bd + +with open(outfile, 'w') as f: + f.write(f'/* Auto-generated from {infile} by gencolorfont.py */\n') + f.write(f'pub static CHARDATA: [[u32; {m}]; {n}] = [\n') + for bd in charset_by_ch: + f.write(' [') + for val in bd: + f.write(f'0x{val:08x}, ') + f.write('],\n') + + f.write('];\n') + f.write('\n') + + # TODO: output sequence; RLE encoding of some kind? + f.write(f'pub static SEQ: [[u16; {blocks_x}]; {blocks_y}] = [\n') + for subseq in out: + f.write(' [') + for val in subseq: + f.write(f'0x{val:04x}, ') + f.write('],\n') + f.write('];\n') + diff --git a/rust/k210-console/scripts/honeybadger160_24.png b/rust/k210-console/scripts/honeybadger160_24.png new file mode 100644 index 0000000000000000000000000000000000000000..848ec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)V>~I194B8vG;;j`F c@^GU62hH0$a?VK<&j0`b07*qoM6N<$g8ksh3IG5A literal 0 HcmV?d00001 diff --git a/rust/k210-console/src/console.rs b/rust/k210-console/src/console.rs index 74250e8..9a4da98 100644 --- a/rust/k210-console/src/console.rs +++ b/rust/k210-console/src/console.rs @@ -74,6 +74,13 @@ impl Coord { } } +/** Cell flags. */ +#[allow(non_snake_case)] +pub mod CellFlags { + /** Cell contains a color font character. */ + pub const COLOR: u16 = 1; +} + /** One character cell */ #[derive(Copy, Clone)] pub struct Cell { @@ -83,8 +90,8 @@ pub struct Cell { bg: u16, /** Font index. The only hard requirement on the font is that 0 is an empty glyph. */ ch: u16, - /** Cell flags (currently unused) */ - _flags: u16, + /** Cell flags (see CellFlags) */ + flags: u16, } enum State { @@ -110,6 +117,8 @@ enum Sgr { /** Visual attributes of console */ pub struct Console { + /** Color font */ + pub color_font: Option<&'static [[u32; 32]]>, /** Dirty flag */ pub dirty: bool, /** Array of character cells representing console */ @@ -136,14 +145,15 @@ pub struct Console { impl Console { /** Create new, empty console */ - pub fn new() -> Console { + pub fn new(color_font: Option<&'static [[u32; 32]]>) -> Console { Console { + color_font, dirty: false, cells: [Cell { fg: DEF_FG, bg: DEF_BG, ch: 0, - _flags: 0, + flags: 0, }; GRID_CELLS], cursor_pos: Coord::new(0, 0), cursor_visible: true, @@ -164,29 +174,46 @@ impl Console { for y in 0..GRID_HEIGHT { for x in 0..GRID_WIDTH { let cell = &self.cells[cell_idx]; - let glyph = &cp437_8x8::FONT[usize::from(cell.ch)]; - let mut image_ofs = image_base; - let is_cursor = - self.cursor_visible && (y == self.cursor_pos.y) && (x == self.cursor_pos.x); - let fg = if is_cursor { cell.bg } else { cell.fg }; - let bg = if is_cursor { cell.fg } else { cell.bg }; - for yi in 0..8 { - let val = glyph[yi]; - for xih in 0..4 { - image[image_ofs + xih] = (u32::from(if val & (1 << (xih * 2 + 0)) != 0 { - fg - } else { - bg - }) - << 16) - | (u32::from(if val & (1 << (xih * 2 + 1)) != 0 { + if (cell.flags & CellFlags::COLOR) != 0 { + if let Some(font) = self.color_font { + // glyph is a sequence of 32 (8*4) u32s, encoding two horizontal + // pixels each. + // TODO: do we want to highlight color font tiles when they're on the + // cursor? + let glyph = &font[usize::from(cell.ch)]; + let mut image_ofs = image_base; + for yi in 0..8 { + for xih in 0..4 { + image[image_ofs + xih] = glyph[yi * 4 + xih]; + } + image_ofs += usize::from(DISP_WIDTH) / 2; + } + } + } else { + let glyph = &cp437_8x8::FONT[usize::from(cell.ch)]; + let mut image_ofs = image_base; + let is_cursor = + self.cursor_visible && (y == self.cursor_pos.y) && (x == self.cursor_pos.x); + let fg = if is_cursor { cell.bg } else { cell.fg }; + let bg = if is_cursor { cell.fg } else { cell.bg }; + for yi in 0..8 { + let val = glyph[yi]; + for xih in 0..4 { + image[image_ofs + xih] = (u32::from(if val & (1 << (xih * 2 + 0)) != 0 { fg } else { bg }) - << 0); + << 16) + | (u32::from(if val & (1 << (xih * 2 + 1)) != 0 { + fg + } else { + bg + }) + << 0); + } + image_ofs += usize::from(DISP_WIDTH) / 2; } - image_ofs += usize::from(DISP_WIDTH) / 2; } cell_idx += 1; image_base += 8 / 2; @@ -212,16 +239,15 @@ impl Console { fg: rgb565(fg.r, fg.g, fg.b), bg: rgb565(bg.r, bg.g, bg.b), ch: u16::from(cp437::to(ch)), - _flags: 0, + flags: 0, }; } /** Raw put */ - pub fn put_raw(&mut self, x: u16, y: u16, fg: u16, bg: u16, ch: u16) { + pub fn put_raw(&mut self, x: u16, y: u16, fg: u16, bg: u16, ch: u16, flags: u16) { self.dirty = true; self.cells[usize::from(y) * usize::from(GRID_WIDTH) + usize::from(x)] = Cell { - fg, bg, ch, - _flags: 0, + fg, bg, ch, flags }; } @@ -289,7 +315,7 @@ impl Console { fg: self.cur_fg, bg: self.cur_bg, ch: 0, - _flags: 0, + flags: 0, }; } if self.cursor_pos.y > 0 { @@ -305,7 +331,7 @@ impl Console { '\x08' => { // backspace if self.cursor_pos.x > 0 { self.cursor_pos.x -= 1; - self.put_raw(self.cursor_pos.x, self.cursor_pos.y, self.cur_fg, self.cur_bg, 0); + self.put_raw(self.cursor_pos.x, self.cursor_pos.y, self.cur_fg, self.cur_bg, 0, 0); } } '\r' => { self.cursor_pos.x = 0; self.dirty = true; } @@ -330,7 +356,7 @@ impl Console { self.scroll(); } - self.put_raw(self.cursor_pos.x, self.cursor_pos.y, self.cur_fg, self.cur_bg, cp437::to(ch).into()); + self.put_raw(self.cursor_pos.x, self.cursor_pos.y, self.cur_fg, self.cur_bg, cp437::to(ch).into(), 0); self.cursor_pos.x += 1; } } diff --git a/rust/k210-console/src/example_colorfont.rs b/rust/k210-console/src/example_colorfont.rs new file mode 100644 index 0000000..0349130 --- /dev/null +++ b/rust/k210-console/src/example_colorfont.rs @@ -0,0 +1,119 @@ +/* Auto-generated from honeybadger160_24.png by gencolorfont.py */ +pub static CHARDATA: [[u32; 32]; 106] = [ + [0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, ], + [0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0xffffffff, 0x00000000, 0x00000000, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xff9dffbe, 0xffffffff, 0xffffffff, 0xffffffff, 0xf4cef3a5, 0xf3c6f408, 0xf48cf510, 0xffffffff, 0xfdd4f384, 0xf384f384, 0xf384f384, 0xffffffff, 0xfed9f384, 0xf384f384, 0xf384f384, ], + [0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0x00000000, 0x00000000, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffdd, 0xffffffff, 0xffffffff, 0xffffffff, 0xffbbfee4, 0xf572fdb3, 0xfe16fe78, 0xfefaffff, 0xffffffbb, 0xf384f384, 0xf384f384, 0xf384f4ce, 0xff5cffff, 0xf384f384, 0xf384f384, 0xf384f384, 0xf3a5fdd4, ], + [0x0000ffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffeffff, 0xffffffff, 0xffffffff, 0xff98ff0b, 0xfec1fec3, 0xff0eff54, 0xff76feea, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfee9fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xffddff2f, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xff9dffff, 0xffdcff98, 0xff54ff0e, 0xfee5fec0, ], + [0xffffffff, 0xffff0000, 0x00000000, 0x00000000, 0xffffffff, 0xffffffff, 0xffffffff, 0xffdf0000, 0xff98ffbb, 0xfffeffff, 0xffffffff, 0xffffffff, 0xfec0fec0, 0xfec2ff0d, 0xff76ffdd, 0xffffffff, 0xfec0fec0, 0xfec0fec0, 0xfec0fec2, 0xff2fff99, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, ], + [0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0xffffffff, 0x00000000, 0x00000000, 0xffffffff, 0xffffffff, 0xffffffff, 0x00000000, 0xfee8ff75, 0xffddffff, 0xffffffff, 0xffffffff, 0xfec0fec0, 0xfec2ff30, 0xffbaffff, 0xffffffff, 0xfec0fec0, 0xfec0fec0, 0xfec0feea, 0xff76ffdd, ], + [0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0xffff0000, 0x00000000, 0x0000ffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, ], + [0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffdd, 0xffbbff98, ], + [0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffdd, 0xffbaff77, 0xff53ff0e, 0xff54ff2f, 0xfee7fec2, 0xfec0fec0, 0xfec0fec0, ], + [0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0x0000ffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffdc, 0xfffffffd, 0xffbbff98, 0xff75ff2f, 0xfee5fec0, 0xfee6fec2, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, ], + [0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffeffbc, 0xff98ff54, 0xff99ff75, 0xff31fee9, 0xfec3fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, ], + [0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xff31ff31, 0xff52ff75, 0xff77ff98, 0xffbaffbc, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, ], + [0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0xffff0000, 0x00000000, 0x00000000, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffdcffdd, 0xfffdffff, 0xffffffff, 0xffffffff, 0xfec0fec1, 0xfec2fec4, 0xfee7ff0b, 0xff30ff52, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, ], + [0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xff55ff77, 0xff98ffb9, 0xffbbffdc, 0xffdcffdd, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec2, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, ], + [0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffeffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfec4fee6, 0xff0aff0f, 0xff32ff53, 0xff77ff98, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, ], + [0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0xffffffff, 0xffff0000, 0x00000000, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xff99ffba, 0xffdcffdc, 0xffddfffe, 0xffffffff, 0xfec0fec0, 0xfec0fec0, 0xfec2fec4, 0xfee6ff0d, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, ], + [0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0x00000000, 0x00000000, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffdcffff, 0xffffffdf, 0xffdeffbe, 0xffbdff9d, 0xfee8ffdd, 0xfffffe36, 0xf3c6f3c6, 0xf3a5f3a5, ], + [0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xff7dff7c, 0xff5cff5c, 0xff1bfefa, 0xfed9fed9, 0xf3a4f3a4, 0xf384f384, 0xf384f384, 0xf384f384, ], + [0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfeb8fe98, 0xfe78fe78, 0xfe37fe15, 0xfdd4f593, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, ], + [0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0xffff0000, 0x00000000, 0x00000000, 0xffffffff, 0xffffffff, 0xffff0000, 0x00000000, 0xf572fdd4, 0xffbeffff, 0xffffffff, 0x00000000, 0xf384f384, 0xf46cff5c, 0xffffffff, 0xffff0000, ], + [0xffffffff, 0xff9df384, 0xf384f384, 0xf384f384, 0xffffffff, 0xfffff46b, 0xf384f384, 0xf384f384, 0x0000ffff, 0xfffffe57, 0xf3a4f384, 0xf384f384, 0x0000ffff, 0xffffffff, 0xff1bf4ce, 0xf384f384, 0x0000f79e, 0xffffffff, 0xffffffff, 0xfeb8f44a, 0x00000000, 0x0000ffff, 0xffffffff, 0xffffffde, 0x00000000, 0x00000000, 0x0000ffff, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, ], + [0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xfe36f3e8, 0xf384f384, 0xf384f384, 0xf384f384, 0xffffff9e, 0xfdd4f3c7, 0xf384f384, 0xf384f384, 0xffffffff, 0xffffff9d, 0xfdf5f408, 0xf384f384, ], + [0xf3c6f531, 0xfe98ff7c, 0xffffffff, 0xffffffdd, 0xf384f384, 0xf384f3a4, 0xf408f530, 0xfe57ff3c, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f3a4, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, ], + [0xffbaff76, 0xff30fee5, 0xfec0fec0, 0xfec0fec0, 0xffffffff, 0xfffffffe, 0xff99ff30, 0xfec1fec0, 0xf42afdd4, 0xff1bffff, 0xffffffff, 0xffddff76, 0xf384f384, 0xf3a4f44b, 0xfe36ff7d, 0xffffffff, 0xf384f384, 0xf384f384, 0xf384f3a5, 0xf510fed9, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, ], + [0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec4, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xff0cfec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xffffffbb, 0xff32fec3, 0xfec0fec0, 0xfec0fec0, 0xffdfffff, 0xffffffdd, 0xff76feea, 0xfec0fec0, 0xf429fdf5, 0xff5cffff, 0xffffffff, 0xffbaff31, 0xf384f384, 0xf3a5f4ef, 0xfeb9ffde, 0xffffffff, 0xf384f384, 0xf384f384, 0xf384f408, 0xfdd4ff5c, ], + [0xff31ffbb, 0xffffffff, 0xffffffff, 0xfffffffe, 0xfec0fec0, 0xff0bff55, 0xff75ff32, 0xff0afec4, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec3fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xffddff76, 0xff0bfec0, 0xfec0fec0, 0xfec0fec0, 0xffffffff, 0xffffffbb, 0xff52fee7, 0xfec0fec0, ], + [0xffbbff98, 0xff54ff30, 0xfee8fec3, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, ], + [0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, ], + [0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfee3fee9, 0xfec0fec0, 0xfec0fec0, 0xff0bff99, 0xfffeffff, 0xfec0fec0, 0xfee9ff97, 0xffffffff, 0xffbeff1b, ], + [0xfec0feeb, 0xfffeffff, 0xf551f384, 0xf384f384, 0xfec0fec0, 0xff0effff, 0xffdef4ad, 0xf384f384, 0xfec0fec0, 0xfec0ff31, 0xffffff9d, 0xf429f384, 0xfec0fec0, 0xfec0fec0, 0xff54ffff, 0xff3bf3c6, 0xfec0fec0, 0xfec0fec0, 0xfec0ff98, 0xfffffeb9, 0xff0dff0f, 0xff2fff2f, 0xff2fff30, 0xfffeffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffde, 0xfeb9fe78, 0xfe15f5b3, 0xf530f48c, 0xf42af3e7, ], + [0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xfdf5f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xff9df48d, 0xf384f384, 0xf384f384, 0xf384f384, 0xf3a5f384, 0xf384f384, 0xf384f384, 0xf384f384, ], + [0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, ], + [0xf384f384, 0xf384f3e7, 0xfed9ffff, 0xffffffff, 0xf384f384, 0xf384f384, 0xf3a4fdf5, 0xffffffff, 0xf384f384, 0xf384f384, 0xf384f384, 0xf531ffbe, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f46b, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, ], + [0xf7be0000, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0xffff0000, 0x00000000, 0x00000000, 0xff5cffff, 0xffffffff, 0x00000000, 0x00000000, 0xf3e7feb9, 0xffffffff, 0xffffffff, 0x00000000, 0xf384f3a4, 0xfdf5ffff, 0xffffffff, 0xffff0000, 0xf384f384, 0xf384f530, 0xffbeffff, 0xffffffff, 0xf384f384, 0xf384f384, 0xf46bff5c, 0xffffffff, ], + [0xffffffff, 0xffffffff, 0xffffffbe, 0xfe77f48c, 0x00000000, 0xffffffff, 0xffffffff, 0xffffffff, 0x00000000, 0x00000000, 0xffffffff, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, ], + [0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xff1bf572, 0xf3c7f384, 0xf384f384, 0xf384f384, 0xffffffff, 0xffbefe78, 0xf4aef3a4, 0xf384f384, 0xffffffff, 0xffffffff, 0xffffff5c, 0xfdd4f409, 0x0000ffff, 0xffffffff, 0xffffffff, 0xffffffde, 0x00000000, 0x00000000, 0xffffffff, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, ], + [0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xfeb9f4ef, 0xf384f384, 0xf384f384, 0xf384f384, 0xffffffff, 0xfedaf46b, 0xf384f384, 0xf384f384, 0xffffffff, 0xffffffde, 0xfdf5f3a5, 0xf384f384, 0x0000ffff, 0xffffffff, 0xffffff3c, 0xf4cef384, ], + [0xf384f384, 0xf384f384, 0xf384f384, 0xf384f3a4, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, ], + [0xf4cefeb8, 0xffdeffff, 0xfffffffe, 0xff98fee9, 0xf384f384, 0xf409fdf5, 0xff9dffff, 0xfffffffe, 0xf384f384, 0xf384f384, 0xf3e8fe78, 0xffffffff, 0xf384f384, 0xf384f384, 0xf384f384, 0xf531ffbe, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f42a, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, ], + [0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xff30fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xffffff77, 0xfee6fec0, 0xfec0fec0, 0xfec0fec0, 0xffffffff, 0xffdcfee9, 0xfec0fec0, 0xfec0fec0, 0xfefaffff, 0xfffffffe, 0xff31fec0, 0xfec0fec0, 0xf3a5fdf5, 0xffdfffff, 0xffffff97, 0xfec4fec0, 0xf384f384, 0xf4ceff7c, 0xffffffff, 0xffbbfee8, 0xf384f384, 0xf384f3e7, 0xfe98ffff, 0xffffffdd, ], + [0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xff0cfec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, ], + [0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec1, 0xfec0fec0, ], + [0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec2fee4, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xff76fffe, ], + [0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfee4fee3, 0xfec2fec1, 0xfec1fec0, 0xfec0fec0, 0xfffefffe, 0xfffefffe, 0xfffefffe, 0xfffeffde, ], + [0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0ff0b, 0xfec0fec0, 0xfec0fec0, 0xfec0feea, 0xff97ffff, 0xffddffdd, 0xffddffdc, 0xffdcffff, 0xffffffff, ], + [0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec3ff53, 0xfec0fec0, 0xfec0fec0, 0xfec1ff31, 0xffdcffff, 0xfec0fec0, 0xfec0ff2f, 0xffbbffff, 0xffffffff, 0xfec0ff0d, 0xffbaffff, 0xffffffff, 0xff5cf4ef, 0xff99ffff, 0xffffffff, 0xffbefdf5, 0xf3c6f384, 0xffffffff, 0xfffffed9, 0xf44bf384, 0xf384f384, 0xffffff7d, 0xf551f3a4, 0xf384f384, 0xf384f384, ], + [0xfee6ff75, 0xfffeffff, 0xffdffe36, 0xf3e7f384, 0xffddffff, 0xfffffefa, 0xf48cf384, 0xf384f384, 0xffffff9d, 0xf593f3a4, 0xf384f384, 0xf384f384, 0xfe78f409, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, ], + [0xf384f384, 0xf384f384, 0xf46bfe57, 0xfe57fe57, 0xf384f384, 0xf384f384, 0xf3a5ff9d, 0xffffffff, 0xf384f384, 0xf384f384, 0xf384fe16, 0xffffffff, 0xf384f384, 0xf384f384, 0xf384f409, 0xffdfffff, 0xf384f384, 0xf384f384, 0xf384f384, 0xfe98ffff, 0xf384f384, 0xf384f384, 0xf384f384, 0xf4adffff, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384ff1b, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f551, ], + [0xfe57fe57, 0xfe57fe57, 0xfe57fe57, 0xfe57fe57, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffff0000, 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, ], + [0xfe57fe57, 0xfe57fe57, 0xfe57fe57, 0xfe57fe57, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, ], + [0xfe57fe57, 0xfe57fe57, 0xfe57fe98, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, ], + [0x00000000, 0xffffffff, 0xffffffff, 0xfffffe57, 0x00000000, 0x00000000, 0xffffffff, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, ], + [0xf3e8f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xff7df531, 0xf384f384, 0xf384f384, 0xf384f384, 0xffffffff, 0xfeb9f42a, 0xf384f384, 0xf384f384, 0xffffffff, 0xffffffbe, 0xf5b3f3a4, 0xf384f384, 0x0000ffff, 0xffffffff, 0xffffff1a, 0xf48cf384, 0x00000000, 0xffffffff, 0xffffffff, 0xffdefdf5, 0x00000000, 0x00000000, 0xffffffff, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, ], + [0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf3c6f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xff5cf4ce, 0xf384f384, 0xf384f384, 0xf384f384, 0xffffffff, 0xfe57f3e7, 0xf384f384, 0xf384f384, ], + [0xf384f384, 0xf384f384, 0xf384f572, 0xffbeffff, 0xf384f384, 0xf384f384, 0xf384f384, 0xf46bff1b, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f3a5, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, ], + [0xfffeff31, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xffffffff, 0xff76fec3, 0xfec0fec0, 0xfec0fec0, 0xfe36ffff, 0xffffffba, 0xfeeafec0, 0xfec0fec0, 0xf384f4ef, 0xff9dffff, 0xffffffba, 0xff99ff99, 0xf384f384, 0xf408fed9, 0xffffffff, 0xffffffff, 0xf384f384, 0xf384f3a4, 0xf572fe36, 0xfe57fe57, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, ], + [0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xff99ff99, 0xff99ff99, 0xff99ff99, 0xff99ff99, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfe57fe77, 0xfe77fe77, 0xfe78fe78, 0xfe98fe98, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, ], + [0xfec0fec0, 0xfec0fec0, 0xff30fffe, 0xffdbff99, 0xfec0fec0, 0xfec0fec0, 0xfec0ff77, 0xffffffff, 0xfec0fec0, 0xfec0fec0, 0xfec0fec0, 0xff97ffff, 0xff99ff99, 0xff97ff76, 0xff55ff54, 0xff52ffdd, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfeb9feb9, 0xfed9feda, 0xfedafefa, 0xfefafefa, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, ], + [0xff75ff31, 0xff0cfee6, 0xfec0fec0, 0xff0effff, 0xffffffff, 0xfffffffe, 0xffddffba, 0xff98ffff, 0xff1bfe15, 0xfed9ff7d, 0xffdfffff, 0xffffffff, 0xfffffeb9, 0xf3e7f3a4, 0xf429f50f, 0xfe15feda, 0xffffffff, 0xff3cf44b, 0xf384f384, 0xf384f384, 0xfefaff1a, 0xff1afeb8, 0xf3c5f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, ], + [0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffffed9, 0xf4adf4ee, 0xf530f572, 0xf5b4fdf5, 0xffffffff, 0xfe78f3a4, 0xf384f384, 0xf384f384, 0xff7dffdf, 0xfffffe98, 0xf3a5f384, 0xf384f384, 0xf3a4f42a, 0xf530fe16, 0xf510f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, ], + [0xffffffff, 0xffffffff, 0xffffffff, 0xffffffdf, 0xfe36fe77, 0xfeb9fefa, 0xff1bff5c, 0xfed9f4ad, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, ], + [0xfe57f3e7, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, ], + [0xff7dffff, 0xffff0000, 0x00000000, 0x00000000, 0xfdf5ffff, 0xffff0000, 0xffffffff, 0xffffffff, 0xf3e7ffde, 0xffffffff, 0xffffffff, 0xffffffff, 0xf384fe78, 0xffffffff, 0xffffff7d, 0xfed9fe15, 0xf384f44b, 0xfe98fdb4, 0xf46cf3a4, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, ], + [0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0xffff0000, 0x00000000, 0x00000000, 0xff5cffff, 0xffff0000, 0x00000000, 0x00000000, 0xf46cffbe, 0xffffffff, 0x00000000, 0x00000000, 0xf384f551, 0xffffffff, 0xffff0000, 0x00000000, 0xf384f384, 0xfe57ffff, 0xffffffff, 0x00000000, 0xf384f384, 0xf3a5ff3b, 0xffffffff, 0xffff0000, ], + [0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, ], + [0xffffffff, 0xffffff7d, 0xf44bf384, 0xf384f384, 0x0000ffff, 0xffffffde, 0xf408f384, 0xf384f384, 0xffffffff, 0xfffffe36, 0xf384f384, 0xf384f384, 0xffffffff, 0xffbef3e7, 0xf384f384, 0xf384f384, 0xffffffff, 0xfdf5f384, 0xf384f384, 0xf384f384, 0xffffff9d, 0xf3c6f384, 0xf384f384, 0xf384f384, 0xfffffdd4, 0xf384f384, 0xf384f384, 0xf384f384, 0xff7df3a5, 0xf384f384, 0xf384f384, 0xf384f384, ], + [0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f3c6, 0xf46bf384, 0xf384f384, 0xf384f384, 0xf44aff3b, 0xffdef48d, 0xf384f384, ], + [0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf3a4f3e8, 0xf48cf551, 0xf384f384, 0xf384fe98, 0xff9dffde, 0xffffffff, 0xf384f384, 0xf384feda, 0xffffffff, 0xffffffff, 0xf384f384, 0xf384fe57, 0xffffffff, 0x00000000, ], + [0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf3c6f42a, 0xf4cef593, 0xfdf5fe78, 0xfedaff5c, 0xffbeffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffff0000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, ], + [0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f3c6, 0xf42af4cd, 0xf593fe16, 0xfe36fed9, 0xff3cffbe, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, ], + [0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xfe98f409, 0xf384f384, 0xf384f384, 0xf384f384, 0xfffffe36, 0xf384f384, 0xf384f384, 0xf384f384, 0xffffffbe, 0xf3c6f384, 0xf384f384, 0xf384f384, 0xffffffff, 0xfdd4f384, 0xf384f384, 0xf384f384, 0xffffffff, 0xff7cf3a4, 0xf384f384, 0xf384f384, 0xffffffff, 0xfffff551, 0xf384f384, 0xf384f384, ], + [0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384fe36, 0xfdb4f46b, 0xf3a5f384, 0xf384f384, 0xf384ff9d, 0xffffffff, 0xff7dfe98, 0xf572f429, 0xf3c5ffff, 0xffffffff, 0xffffffff, 0xffffffdf, 0xf48cffff, 0xffff0000, 0xffffffff, 0xffffffff, ], + [0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf3a4f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xff3cfe36, 0xf4eff3e7, 0xf384f384, 0xf384f384, 0xffffffff, 0xffffffbe, 0xfefafdf4, 0xf46cf3a5, ], + [0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf3a4f3e8, 0xf44bf3a4, 0xf3c6f48c, 0xfdb3fe98, 0xff5cffde, 0xfffffe36, ], + [0xf384f384, 0xf384f44a, 0xffbeffff, 0xffff0000, 0xf384f384, 0xf384f384, 0xf530ffff, 0xffffffff, 0xf384f384, 0xf384f384, 0xf384fe36, 0xffffffff, 0xf384f384, 0xf384f384, 0xf384f3a4, 0xff1affff, 0xf384f384, 0xf384f384, 0xf384f384, 0xf429ff9d, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f510, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, ], + [0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0xffff0000, 0x00000000, 0x00000000, 0xfed9ffff, 0xffff0000, 0x00000000, 0x00000000, 0xfeb9ffff, 0xffff0000, 0x00000000, 0x00000000, ], + [0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0xffffffff, 0x00000000, 0xffffffff, 0xffffffff, 0xffffffff, ], + [0x00000000, 0x00000000, 0x0000ffff, 0xffffffff, 0x00000000, 0x00000000, 0x0000ffff, 0xffffff5c, 0x00000000, 0x00000000, 0xffffffff, 0xfffff551, 0x00000000, 0x00000000, 0xffffffff, 0xff3bf384, 0x00000000, 0x0000ffff, 0xffffffff, 0xf510f384, 0xffffffff, 0xffffffff, 0xffffff1b, 0xf384f384, 0xffffffff, 0xffffffff, 0xff7df48d, 0xf384f384, 0xffffffbe, 0xfe98f4ef, 0xf3a4f384, 0xf384f384, ], + [0xf593f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf3a4f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, ], + [0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f3a4, 0xf384f384, 0xf384f384, 0xf384f384, 0xf3e7feb9, 0xf384f384, 0xf384f384, 0xf384f46c, 0xff5cffff, 0xf384f384, 0xf384f384, 0xf551ffbe, 0xffffffff, 0xf384f384, 0xf3a5fe36, 0xffffffff, 0xffffffff, 0xf384f409, 0xfefaffff, 0xffffffff, 0x00000000, 0xf4ceff9d, 0xffffffff, 0xffff0000, 0x00000000, ], + [0xf384f510, 0xff9dffff, 0xffffff5c, 0xf3c6f384, 0xfdf5ffff, 0xffffffff, 0xffffffff, 0xfe98f384, 0xffffffff, 0xffff0000, 0xffffffff, 0xfffff572, 0xffffffff, 0x00000000, 0x0000ffff, 0xffffffbe, 0xffff0000, 0x00000000, 0x0000ffff, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, ], + [0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf46bf384, 0xf384f384, 0xf384f384, 0xf384f384, 0xff3bf3a5, 0xf384f384, 0xf384f384, 0xf384f384, 0xfffffe57, 0xf384f384, 0xf384f384, 0xf384f384, 0xffffffff, 0xf531f384, 0xf384f384, 0xf384f384, 0xffffffff, 0xffbef44a, 0xf384f384, 0xf384f384, ], + [0xf384f384, 0xf384f593, 0xffffffff, 0x00000000, 0xf384f384, 0xf384f4ef, 0xffffffff, 0x00000000, 0xf384f384, 0xf384f3e7, 0xffffffff, 0x00000000, 0xf384f384, 0xf384f384, 0xff9dffff, 0xffff0000, 0xf384f384, 0xf384f384, 0xff3bffff, 0xffff0000, 0xf384f384, 0xf384f384, 0xfe98ffff, 0xffffffff, 0xf384f384, 0xf384f384, 0xfdf5ffff, 0xffffffff, 0xf384f384, 0xf384f384, 0xf551ffff, 0xff7dfe57, ], + [0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0xffff0000, 0x00000000, 0xffffffff, 0xffffffff, 0xffffffff, 0x00000000, 0xffffffff, 0xffffffff, 0xffffffff, 0x00000000, 0xffffffbe, 0xfed9fdb4, 0xffffffff, 0x00000000, 0xf510f3a5, 0xf384f572, 0xffffffff, 0x00000000, ], + [0x0000ffff, 0xffffff1b, 0xf384f384, 0xf384f384, 0x0000ffff, 0xffffffff, 0xf4adf384, 0xf384f384, 0x00000000, 0xffffffff, 0xfeb9f384, 0xf384f384, 0x00000000, 0xffffffff, 0xffdff42a, 0xf384f384, 0x00000000, 0x0000ffff, 0xfffffe56, 0xf384f384, 0x00000000, 0x0000ffff, 0xffffffbe, 0xf3c6f384, 0x00000000, 0x00000000, 0xffffffff, 0xfdd4f384, 0x00000000, 0x0000ffff, 0xffffffff, 0xff7cf3a4, ], + [0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f3c5, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f48c, ], + [0xf551ffff, 0xffff0000, 0x00000000, 0x0000ffff, 0xfdd4ffff, 0xffff0000, 0x00000000, 0x00000000, 0xfe57ffff, 0xffff0000, 0x00000000, 0x00000000, 0xfed9ffff, 0xffff0000, 0x00000000, 0x00000000, 0xff5cffff, 0xffff0000, 0x00000000, 0x00000000, 0xffbdffff, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, ], + [0xffffffff, 0xffffffff, 0xffffffff, 0xffffff9d, 0x00000000, 0x0000ffff, 0xffffffff, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, ], + [0xfeb9f592, 0xf42af3c6, 0xf408f531, 0xfe57ff1b, 0xffffffff, 0xffffff9d, 0xffdeffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, ], + [0xffbeffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffff0000, 0xffffffff, 0xffff0000, 0x00000000, 0x00000000, 0x0000ffff, 0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, ], + [0xf593f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xffdff4ef, 0xf384f384, 0xf384f384, 0xf384f3a4, 0xffffffbe, 0xf44bf384, 0xf384f384, 0xf384f48c, 0xffffffff, 0xff5cf3e7, 0xf384f384, 0xf384f572, 0xffffffff, 0xfffffefa, 0xf3a5f384, 0xf384fe57, 0x0000ffff, 0xffffffff, 0xfe56f384, 0xf384fefa, 0x00000000, 0xffffffff, 0xfffff5b3, 0xf384ff7d, 0x00000000, 0x0000ffff, 0xffffffff, 0xf572ffff, ], + [0xff5cffff, 0xffff0000, 0x00000000, 0x00000000, 0xffdfffff, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0x00000000, 0x00000000, 0x00000000, ], + [0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0x00000000, 0x00000000, 0x0000ffff, 0xffffffff, 0x00000000, 0x00000000, 0x0000ffff, 0xffffffff, 0x00000000, 0x00000000, 0x0000ffff, 0xffffffdf, 0x00000000, 0x00000000, 0x0000ffff, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, ], + [0xffffffff, 0xffffffff, 0xffffffff, 0xffbefeb9, 0xffffffff, 0xffffffde, 0xfed9f552, 0xf3c5f384, 0xffdffefa, 0xf592f3c6, 0xf384f384, 0xf384f384, 0xfe77f593, 0xf510f44a, 0xf3c6f3a5, 0xf3a4f384, 0xffffffff, 0xffffffff, 0xffffffbe, 0xff7dff3c, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, ], + [0xf530f3a5, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xfedafe98, 0xfe57fdd4, 0xf572f4ce, 0xf429f3a5, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, ], + [0xf384f384, 0xf384f384, 0xf384f384, 0xf384f5b3, 0xf384f384, 0xf384f384, 0xf384f3c5, 0xfe78ffff, 0xf384f384, 0xf384f384, 0xf44aff3b, 0xffffffff, 0xf384f384, 0xf384f510, 0xffbeffff, 0xffffffff, 0xf3a4f3a4, 0xfdf5ffff, 0xffffffff, 0xffff0000, 0xff9dff9d, 0xffffffff, 0xffff0000, 0x00000000, 0xffffffff, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, ], + [0xffdfffff, 0xffffffff, 0x00000000, 0x00000000, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, ], + [0xffffffff, 0xffffff1b, 0xf3a5f384, 0xf384f384, 0x0000ffff, 0xffffffff, 0xfe36f384, 0xf384f384, 0x00000000, 0xffffffff, 0xfffff530, 0xf384f384, 0x00000000, 0x0000ffff, 0xffffffbe, 0xf42af384, 0x00000000, 0x0000ffff, 0xffffffff, 0xff3bf48c, 0x00000000, 0x00000000, 0xffffffff, 0xffffffff, 0x00000000, 0x00000000, 0x0000ffff, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, ], + [0xf384f384, 0xf384f384, 0xf3e8f48c, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384f384, 0xf429f429, 0xf408f408, 0xf408f408, 0xf407f407, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, ], + [0xf384f384, 0xf384feb9, 0xffffffff, 0x00000000, 0xf384f384, 0xf3a5ffbe, 0xffffffff, 0x00000000, 0xf384f384, 0xf510ffff, 0xffff0000, 0x00000000, 0xf384f384, 0xfe98ffff, 0xffff0000, 0x00000000, 0xf407f44a, 0xffbeffff, 0xffff0000, 0x00000000, 0xffffffff, 0xffffffff, 0x00000000, 0x00000000, 0xffffffff, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, ], + [0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0x00000000, 0x00000000, 0x0000ffdf, 0xffffffff, 0x00000000, 0x00000000, 0x0000ffff, 0xffffffff, 0x00000000, 0x00000000, 0x0000ffff, 0xffffffde, 0x00000000, 0x00000000, 0x0000ffff, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, ], + [0x0000ffff, 0xffffffff, 0xffffffff, 0xffbef44b, 0xffffffff, 0xffffffff, 0xff9dfdf5, 0xf3c7f384, 0xffffffff, 0xff9dfdd4, 0xf3c6f384, 0xf384f384, 0xff9dfdb4, 0xf3c5f384, 0xf384f384, 0xf384f3a4, 0xfeb9fed9, 0xfefaff1b, 0xff3cff5c, 0xff5cff7c, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffff0000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, ], + [0xf384f384, 0xf384f384, 0xf384f384, 0xf384f551, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384fdd4, 0xf384f384, 0xf384f384, 0xf384f384, 0xf384fe77, 0xf3a4f3a4, 0xf3a5f3a5, 0xf3a5f3c6, 0xf407fefa, 0xff9dff9d, 0xffbeffde, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, ], + [0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, ], + [0x00000000, 0x00000000, 0xffffffff, 0xffffffff, 0x00000000, 0x00000000, 0xffffffff, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, ], + [0xffff0000, 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, ], +]; + +pub static SEQ: [[u16; 20]; 7] = [ + [0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, 0x0010, 0x0011, 0x0012, 0x0013, 0x0000, ], + [0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001a, 0x001b, 0x001b, 0x001b, 0x001b, 0x001b, 0x001b, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f, 0x0020, 0x0021, ], + [0x0000, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x001b, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x001f, 0x002f, 0x0030, 0x0031, 0x0032, ], + [0x0000, 0x0000, 0x0000, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x001f, 0x001f, 0x0025, 0x003e, 0x003f, 0x0000, ], + [0x0000, 0x0000, 0x0000, 0x0000, 0x0040, 0x0041, 0x001f, 0x0042, 0x001f, 0x0043, 0x0044, 0x0045, 0x0046, 0x001f, 0x0047, 0x0048, 0x001f, 0x0049, 0x004a, 0x004b, ], + [0x0000, 0x0000, 0x0000, 0x004c, 0x004d, 0x004e, 0x004f, 0x0050, 0x0051, 0x0052, 0x0053, 0x0000, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005a, 0x005b, ], + [0x0000, 0x0000, 0x005c, 0x005d, 0x005e, 0x005f, 0x0060, 0x0000, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0000, 0x0000, 0x0000, 0x0068, 0x0069, ], +]; diff --git a/rust/k210-console/src/main.rs b/rust/k210-console/src/main.rs index 5bd6ee0..ae96f6c 100644 --- a/rust/k210-console/src/main.rs +++ b/rust/k210-console/src/main.rs @@ -5,6 +5,7 @@ #![no_main] mod lfsr; +mod example_colorfont; use k210_hal::Peripherals; use k210_hal::prelude::*; @@ -19,7 +20,7 @@ use k210_shared::soc::spi::SPIExt; use k210_shared::soc::sysctl; use riscv_rt::entry; -use k210_console::console::{Color, Console, ScreenImage, DISP_HEIGHT, DISP_WIDTH, DISP_PIXELS}; +use k210_console::console::{Color, Console, ScreenImage, DISP_HEIGHT, DISP_WIDTH, DISP_PIXELS, CellFlags}; use k210_console::cp437; use k210_console::palette_xterm256::PALETTE; @@ -132,7 +133,7 @@ fn main() -> ! { lcd.clear(lcd_colors::PURPLE); let mut image: ScreenImage = [0; DISP_PIXELS / 2]; - let mut console: Console = Console::new(); + let mut console: Console = Console::new(Some(&example_colorfont::CHARDATA)); /* Make a border */ let fg = Color::new(0x40, 0x40, 0x40); @@ -191,7 +192,7 @@ fn main() -> ! { ); /* just put some random stuff */ - for y in 2..console.height() - 2 { + for y in 10..console.height() - 2 { for x in 2..console.width() - 2 { let rv = s.next(); console.put( @@ -204,6 +205,15 @@ fn main() -> ! { } } + /* overlay image */ + for y in 0..7 { + for x in 0..20 { + console.put_raw(x + 9, y + 2, 0, 0, + example_colorfont::SEQ[usize::from(y)][usize::from(x)], + CellFlags::COLOR); + } + } + console.render(&mut image); lcd.draw_picture(0, 0, DISP_WIDTH, DISP_HEIGHT, &image); diff --git a/rust/term-server/src/main.rs b/rust/term-server/src/main.rs index 40fff3c..fd7b47b 100644 --- a/rust/term-server/src/main.rs +++ b/rust/term-server/src/main.rs @@ -100,7 +100,7 @@ fn main() -> ! { let mut lcd = LCD::new(spi, &dmac, dma_channel::CHANNEL0); lcd.init(); lcd.set_direction(lcd::direction::YX_LRUD); - let mut console: Console = Console::new(); + let mut console: Console = Console::new(None); writeln!(console, "\x1b[48;2;128;192;255;38;5;0m TERMINAL \x1b[0m \x1b[38;2;128;128;128m\x1b[0m").unwrap(); diff --git a/rust/weather/src/main.rs b/rust/weather/src/main.rs index 5da2f0a..61addb2 100644 --- a/rust/weather/src/main.rs +++ b/rust/weather/src/main.rs @@ -100,7 +100,7 @@ fn main() -> ! { let mut lcd = LCD::new(spi, &dmac, dma_channel::CHANNEL0); lcd.init(); lcd.set_direction(lcd::direction::YX_LRUD); - let mut console: Console = Console::new(); + let mut console: Console = Console::new(None); writeln!(console, "\x1b[48;2;128;192;255;38;5;0m WEATHER \x1b[0m \x1b[38;2;128;128;128m\x1b[0m").unwrap();