diff --git a/F1-nolib/RGB_LED_Screen/Makefile b/F1-nolib/RGB_LED_Screen/Makefile new file mode 100644 index 0000000..7b58cb5 --- /dev/null +++ b/F1-nolib/RGB_LED_Screen/Makefile @@ -0,0 +1,139 @@ +BINARY = RGBLEDscreen +BOOTPORT ?= /dev/ttyUSB0 +BOOTSPEED ?= 115200 +# MCU FAMILY +FAMILY ?= F1 +# MCU code +MCU ?= F103x8 +# density (stm32f10x.h, lines 70-84) +DENSITY ?= MD +# change this linking script depending on particular MCU model, +LDSCRIPT ?= stm32f103x8.ld +# debug +DEFS = -DEBUG + +INDEPENDENT_HEADERS= + +FP_FLAGS ?= -msoft-float -mfloat-abi=soft +ASM_FLAGS ?= -mthumb -mcpu=cortex-m3 -mfix-cortex-m3-ldrd +ARCH_FLAGS = $(ASM_FLAGS) $(FP_FLAGS) + +############################################################################### +# Executables +#PREFIX ?= arm-none-eabi +# gcc from arm web site +PREFIX ?= /opt/bin/arm-none-eabi +TOOLCHLIB ?= /opt/arm-none-eabi/lib +RM := rm -f +RMDIR := rmdir +CC := $(PREFIX)-gcc +# don't replace ld with gcc: the binary size would be much greater!! +LD := $(PREFIX)-ld +AR := $(PREFIX)-ar +AS := $(PREFIX)-as +SIZE := $(PREFIX)-size +OBJCOPY := $(PREFIX)-objcopy +OBJDUMP := $(PREFIX)-objdump +GDB := $(PREFIX)-gdb +STFLASH := $(shell which st-flash) +STBOOT := $(shell which stm32flash) +DFUUTIL := $(shell which dfu-util) + +############################################################################### +# Source files +OBJDIR = mk +SRC := $(wildcard *.c) +OBJS := $(addprefix $(OBJDIR)/, $(SRC:%.c=%.o)) +STARTUP = $(OBJDIR)/startup.o +OBJS += $(STARTUP) +# dependencies: we need them to recompile files if their headers-dependencies changed +DEPS := $(OBJS:.o=.d) + +INC_DIR ?= ../inc + +INCLUDE := -I$(INC_DIR)/Fx -I$(INC_DIR)/cm +LIB_DIR := $(INC_DIR)/ld + +############################################################################### +# C flags +CFLAGS += -O2 -g -D__thumb2__=1 -MD -Wl,--gc-sections +CFLAGS += -Wall -Werror -Wextra -Wshadow +CFLAGS += -fno-common -ffunction-sections -fdata-sections -fno-stack-protector +CFLAGS += $(ARCH_FLAGS) + +############################################################################### +# Linker flags +LDFLAGS += -nostartfiles --static -nostdlibs --gc-sections +LDFLAGS += -L$(LIB_DIR) -L$(TOOLCHLIB) +LDFLAGS += -T$(LDSCRIPT) + +############################################################################### +# Used libraries +LDLIBS += -lc $(shell $(CC) $(CFLAGS) -print-libgcc-file-name) + +DEFS += -DSTM32$(FAMILY) -DSTM32$(MCU) -DSTM32F10X_$(DENSITY) + +ELF := $(OBJDIR)/$(BINARY).elf +LIST := $(OBJDIR)/$(BINARY).list +BIN := $(BINARY).bin +HEX := $(BINARY).hex + +all: bin list size + +elf: $(ELF) +bin: $(BIN) +hex: $(HEX) +list: $(LIST) + +ifneq ($(MAKECMDGOALS),clean) +-include $(DEPS) +endif + +$(OBJDIR): + mkdir $(OBJDIR) + +$(STARTUP): $(INC_DIR)/startup/vector.c + $(CC) $(CFLAGS) $(DEFS) $(INCLUDE) -o $@ -c $< + +$(OBJDIR)/%.o: %.c + @echo " CC $<" + $(CC) $(CFLAGS) $(DEFS) $(INCLUDE) -o $@ -c $< + +$(BIN): $(ELF) + @echo " OBJCOPY $(BIN)" + $(OBJCOPY) -Obinary $(ELF) $(BIN) + +$(HEX): $(ELF) + @echo " OBJCOPY $(HEX)" + $(OBJCOPY) -Oihex $(ELF) $(HEX) + +$(LIST): $(ELF) + @echo " OBJDUMP $(LIST)" + $(OBJDUMP) -S $(ELF) > $(LIST) + +$(ELF): $(OBJDIR) $(OBJS) + @echo " LD $(ELF)" + $(LD) $(LDFLAGS) $(OBJS) $(LDLIBS) -o $(ELF) + +size: $(ELF) + $(SIZE) $(ELF) + +clean: + @echo " CLEAN" + $(RM) $(OBJS) $(DEPS) $(ELF) $(HEX) $(LIST) + @rmdir $(OBJDIR) 2>/dev/null || true + + +flash: $(BIN) + @echo " FLASH $(BIN)" + $(STFLASH) write $(BIN) 0x8000000 + +boot: $(BIN) + @echo " LOAD $(BIN) through bootloader" + $(STBOOT) -b$(BOOTSPEED) $(BOOTPORT) -w $(BIN) + +dfuboot: $(BIN) + @echo " LOAD $(BIN) THROUGH DFU" + $(DFUUTIL) -a0 -D $(BIN) -s 0x08000000 + +.PHONY: clean flash boot diff --git a/F1-nolib/RGB_LED_Screen/RGBLEDscreen.bin b/F1-nolib/RGB_LED_Screen/RGBLEDscreen.bin new file mode 100755 index 0000000..93a1f02 Binary files /dev/null and b/F1-nolib/RGB_LED_Screen/RGBLEDscreen.bin differ diff --git a/F1-nolib/RGB_LED_Screen/Readme b/F1-nolib/RGB_LED_Screen/Readme new file mode 100644 index 0000000..bed9c41 --- /dev/null +++ b/F1-nolib/RGB_LED_Screen/Readme @@ -0,0 +1,6 @@ +HUB75E-based RGB LED panel management + +886 color (RRRGGGBB) + + +// the better fonts management is in Chronometer-v3 \ No newline at end of file diff --git a/F1-nolib/RGB_LED_Screen/font14.h b/F1-nolib/RGB_LED_Screen/font14.h new file mode 100644 index 0000000..e33c54c --- /dev/null +++ b/F1-nolib/RGB_LED_Screen/font14.h @@ -0,0 +1,4326 @@ +/* + * This file is part of the LED_screen project. + * Copyright 2019 Edward V. Emelianov + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +// this file should be included JUST ONCE! +// only in fonts.c + +// font14: matrix 16x16 bits -> 32 bytes per symbol +#define FONT14BYTES 32 +#define FONT14HEIGHT 16 +#define FONT14BASELINE 2 + +//------------------------------------------------------------------------------ +// Font author: Nadyrshin Ruslan, +// https://www.youtube.com/channel/UChButpZaL5kUUl_zTyIDFkQ +//------------------------------------------------------------------------------ + +// Font 14px height, full matrix is 32x32px +// first number is symbol width, another are symbol data +const uint8_t font14_table[SYMBOLS_AMOUNT *(FONT14BYTES+1)] = { + // 0x20 - ' ' + 4, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x21 + , + 3, + ________,________, + ________,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + ________,________, + XX______,________, + XX______,________, + ________,________, + ________,________ + // 0x22 + , + 7, + ________,________, + ________,________, + XX__XX__,________, + XX__XX__,________, + XX__XX__,________, + XX__XX__,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x23 + , + 8, + ________,________, + ________,________, + __XX_XX_,________, + __XX_XX_,________, + __XX_XX_,________, + XXXXXXX_,________, + XXXXXXX_,________, + _XX_XX__,________, + _XX_XX__,________, + XXXXXXX_,________, + XXXXXXX_,________, + XX_XX___,________, + XX_XX___,________, + ________,________, + ________,________, + ________,________ + // 0x24 + , + 8, + ________,________, + ___X____,________, + __XXX___,________, + _XXXXX__,________, + XX_X_XX_,________, + XX_X____,________, + XXXX____,________, + _XXXX___,________, + __XXXX__,________, + ___XXXX_,________, + XX_X_XX_,________, + XX_X_XX_,________, + _XXXXX__,________, + __XXX___,________, + ___X____,________, + ________,________ + // 0x25 + , + 16, + ________,________, + ________,________, + _XXXX___,__XX____, + XX__XX__,_XX_____, + XX__XX__,_XX_____, + XX__XX__,XX______, + XX__XX_X,X_______, + _XXXX__X,X_______, + ______XX,__XXXX__, + ______XX,_XX__XX_, + _____XX_,_XX__XX_, + _____XX_,_XX__XX_, + ____XX__,_XX__XX_, + ___XX___,__XXXX__, + ________,________, + ________,________ + // 0x26 + , + 12, + ________,________, + ________,________, + __XXXXX_,________, + _XXXXXXX,________, + _XX___XX,________, + _XX___XX,________, + __XXXXX_,________, + __XXXX__,________, + _XX_XX__,X_______, + XX__XXX_,XX______, + XX___XXX,X_______, + XX____XX,XX______, + _XXXXXXX,XXX_____, + __XXXX__,_X______, + ________,________, + ________,________ + // 0x27 + , + 3, + ________,________, + ________,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x28 + , + 5, + __XX____,________, + _XX_____,________, + _XX_____,________, + _XX_____,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + _XX_____,________, + _XX_____,________, + _XX_____,________, + __XX____,________, + ________,________ + // 0x29 + , + 5, + XX______,________, + _XX_____,________, + _XX_____,________, + _XX_____,________, + __XX____,________, + __XX____,________, + __XX____,________, + __XX____,________, + __XX____,________, + __XX____,________, + __XX____,________, + _XX_____,________, + _XX_____,________, + _XX_____,________, + XX______,________, + ________,________ + // 0x2A + , + 8, + ________,________, + _X_X_X__,________, + __XXX___,________, + XXXXXXX_,________, + __XXX___,________, + _X_X_X__,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x2B + , + 9, + ________,________, + ________,________, + ___XX___,________, + ___XX___,________, + ___XX___,________, + XXXXXXXX,________, + XXXXXXXX,________, + ___XX___,________, + ___XX___,________, + ___XX___,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x2C + , + 3, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + XX______,________, + XX______,________, + _X______,________, + _X______,________, + X_______,________ + // 0x2D + , + 6, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + XXXXX___,________, + XXXXX___,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x2E + , + 3, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + XX______,________, + XX______,________, + ________,________, + ________,________, + ________,________ + // 0x2F + , + 5, + ________,________, + ________,________, + __XX____,________, + __XX____,________, + __XX____,________, + _XX_____,________, + _XX_____,________, + _XX_____,________, + _XX_____,________, + _XX_____,________, + XX______,________, + XX______,________, + XX______,________, + ________,________, + ________,________, + ________,________ + // 0x30 + , + 9, + ________,________, + ________,________, + __XXXX__,________, + _XXXXXX_,________, + XXX__XXX,________, + XX____XX,________, + XX____XX,________, + XX____XX,________, + XX____XX,________, + XX____XX,________, + XX____XX,________, + XXX__XXX,________, + _XXXXXX_,________, + __XXXX__,________, + ________,________, + ________,________ + // 0x31 + , + 6, + ________,________, + ________,________, + ___XX___,________, + __XXX___,________, + _XXXX___,________, + XX_XX___,________, + X__XX___,________, + ___XX___,________, + ___XX___,________, + ___XX___,________, + ___XX___,________, + ___XX___,________, + ___XX___,________, + ___XX___,________, + ________,________, + ________,________ + // 0x32 + , + 9, + ________,________, + ________,________, + __XXXX__,________, + _XXXXXX_,________, + XXX___XX,________, + XX____XX,________, + ______XX,________, + _____XX_,________, + ____XXX_,________, + ___XXX__,________, + __XXX___,________, + _XX_____,________, + XXXXXXXX,________, + XXXXXXXX,________, + ________,________, + ________,________ + // 0x33 + , + 9, + ________,________, + ________,________, + __XXXXX_,________, + _XXXXXXX,________, + XX____XX,________, + ______XX,________, + ___XXXX_,________, + ___XXXX_,________, + _____XXX,________, + ______XX,________, + XX____XX,________, + XXX__XXX,________, + _XXXXXX_,________, + __XXXX__,________, + ________,________, + ________,________ + // 0x34 + , + 9, + ________,________, + ________,________, + _____XX_,________, + ____XXX_,________, + ____XXX_,________, + ___XXXX_,________, + __XX_XX_,________, + __XX_XX_,________, + _XX__XX_,________, + XX___XX_,________, + XXXXXXXX,________, + XXXXXXXX,________, + _____XX_,________, + _____XX_,________, + ________,________, + ________,________ + // 0x35 + , + 9, + ________,________, + ________,________, + _XXXXXX_,________, + _XXXXXX_,________, + _XX_____,________, + XXX_____,________, + XXXXXX__,________, + XXXXXXX_,________, + XX___XXX,________, + ______XX,________, + XX____XX,________, + XXX__XXX,________, + _XXXXXX_,________, + __XXXX__,________, + ________,________, + ________,________ + // 0x36 + , + 9, + ________,________, + ________,________, + __XXXXX_,________, + _XXXXXXX,________, + _XX___XX,________, + XX______,________, + XX_XXX__,________, + XXXXXXX_,________, + XXX__XXX,________, + XX____XX,________, + XX____XX,________, + _XX___XX,________, + _XXXXXX_,________, + __XXXX__,________, + ________,________, + ________,________ + // 0x37 + , + 9, + ________,________, + ________,________, + XXXXXXXX,________, + XXXXXXXX,________, + _____XX_,________, + ____XX__,________, + ____XX__,________, + ___XX___,________, + ___XX___,________, + ___XX___,________, + __XXX___,________, + __XX____,________, + __XX____,________, + __XX____,________, + ________,________, + ________,________ + // 0x38 + , + 9, + ________,________, + ________,________, + __XXXX__,________, + _XXXXXX_,________, + XX____XX,________, + XX____XX,________, + XX____XX,________, + _XXXXXX_,________, + _XXXXXX_,________, + XX____XX,________, + XX____XX,________, + XX____XX,________, + _XXXXXX_,________, + __XXXX__,________, + ________,________, + ________,________ + // 0x39 + , + 9, + ________,________, + ________,________, + __XXXX__,________, + _XXXXXX_,________, + XX___XX_,________, + XX____XX,________, + XX____XX,________, + XXX__XXX,________, + _XXXXXXX,________, + __XXX_XX,________, + ______XX,________, + XX___XX_,________, + XXXXXXX_,________, + _XXXXX__,________, + ________,________, + ________,________ + // 0x3A + , + 3, + ________,________, + ________,________, + ________,________, + ________,________, + XX______,________, + XX______,________, + ________,________, + ________,________, + ________,________, + ________,________, + XX______,________, + XX______,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x3B + , + 3, + ________,________, + ________,________, + ________,________, + ________,________, + XX______,________, + XX______,________, + ________,________, + ________,________, + ________,________, + ________,________, + XX______,________, + XX______,________, + _X______,________, + _X______,________, + X_______,________, + ________,________ + // 0x3C + , + 9, + ________,________, + ________,________, + ________,________, + _______X,________, + _____XXX,________, + ___XXXX_,________, + _XXXX___,________, + XXX_____,________, + _XXXX___,________, + ___XXXX_,________, + _____XXX,________, + _______X,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x3D + , + 8, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + XXXXXXX_,________, + XXXXXXX_,________, + ________,________, + ________,________, + XXXXXXX_,________, + XXXXXXX_,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x3E + , + 9, + ________,________, + ________,________, + ________,________, + X_______,________, + XXX_____,________, + _XXXX___,________, + ___XXXX_,________, + _____XXX,________, + ___XXXX_,________, + _XXXX___,________, + XXX_____,________, + X_______,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x3F + , + 9, + ________,________, + ________,________, + __XXXX__,________, + _XXXXXX_,________, + XXX___XX,________, + XX____XX,________, + _____XXX,________, + ____XXX_,________, + ___XXX__,________, + ___XX___,________, + ___XX___,________, + ________,________, + ___XX___,________, + ___XX___,________, + ________,________, + ________,________ + // 0x40 + , + 16, + _____XXX,XXX_____, + ___XXXXX,XXXXX___, + __XXX___,___XXX__, + _XXX__XX,X_XXXX__, + _XX_XXXX,XXXX_XX_, + XXX_XX__,_XXX_XX_, + XX_XX___,_XX__XX_, + XX_XX___,_XX__XX_, + XX_XX___,_XX__XX_, + XX_XX___,XXX_XX__, + XX_XXXXX,XXXXX___, + _XX_XXXX,_XXX____, + _XXX____,_____XX_, + __XXX___,___XXX__, + ___XXXXX,XXXXX___, + _____XXX,XXX_____ + // 0x41 + , + 12, + ________,________, + ________,________, + ____XXX_,________, + ____XXX_,________, + ___XX_XX,________, + ___XX_XX,________, + ___XX_XX,________, + __XX___X,X_______, + __XX___X,X_______, + __XXXXXX,X_______, + _XXXXXXX,XX______, + _XX_____,XX______, + _XX_____,XX______, + XX______,_XX_____, + ________,________, + ________,________ + // 0x42 + , + 11, + ________,________, + ________,________, + XXXXXXXX,________, + XXXXXXXX,X_______, + XX_____X,X_______, + XX_____X,X_______, + XX_____X,X_______, + XXXXXXXX,________, + XXXXXXXX,X_______, + XX_____X,XX______, + XX______,XX______, + XX______,XX______, + XXXXXXXX,X_______, + XXXXXXXX,________, + ________,________, + ________,________ + // 0x43 + , + 11, + ________,________, + ________,________, + ___XXXXX,________, + _XXXXXXX,X_______, + _XX____X,XX______, + XX______,X_______, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,X_______, + _XX____X,XX______, + _XXXXXXX,X_______, + ___XXXXX,________, + ________,________, + ________,________ + // 0x44 + , + 11, + ________,________, + ________,________, + XXXXXXX_,________, + XXXXXXXX,X_______, + XX_____X,X_______, + XX______,XX______, + XX______,XX______, + XX______,XX______, + XX______,XX______, + XX______,XX______, + XX______,XX______, + XX_____X,X_______, + XXXXXXXX,X_______, + XXXXXXX_,________, + ________,________, + ________,________ + // 0x45 + , + 10, + ________,________, + ________,________, + XXXXXXXX,X_______, + XXXXXXXX,X_______, + XX______,________, + XX______,________, + XX______,________, + XXXXXXXX,X_______, + XXXXXXXX,X_______, + XX______,________, + XX______,________, + XX______,________, + XXXXXXXX,X_______, + XXXXXXXX,X_______, + ________,________, + ________,________ + // 0x46 + , + 9, + ________,________, + ________,________, + XXXXXXXX,________, + XXXXXXXX,________, + XX______,________, + XX______,________, + XX______,________, + XXXXXXX_,________, + XXXXXXX_,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + ________,________, + ________,________ + // 0x47 + , + 11, + ________,________, + ________,________, + ___XXXXX,________, + _XXXXXXX,X_______, + _XX____X,XX______, + XX______,X_______, + XX______,________, + XX______,________, + XX___XXX,XX______, + XX___XXX,XX______, + XX______,XX______, + _XX____X,XX______, + _XXXXXXX,X_______, + ___XXXXX,________, + ________,________, + ________,________ + // 0x48 + , + 10, + ________,________, + ________,________, + XX_____X,X_______, + XX_____X,X_______, + XX_____X,X_______, + XX_____X,X_______, + XX_____X,X_______, + XXXXXXXX,X_______, + XXXXXXXX,X_______, + XX_____X,X_______, + XX_____X,X_______, + XX_____X,X_______, + XX_____X,X_______, + XX_____X,X_______, + ________,________, + ________,________ + // 0x49 + , + 3, + ________,________, + ________,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + ________,________, + ________,________ + // 0x4A + , + 9, + ________,________, + ________,________, + ______XX,________, + ______XX,________, + ______XX,________, + ______XX,________, + ______XX,________, + ______XX,________, + ______XX,________, + ______XX,________, + XX____XX,________, + XXX__XXX,________, + _XXXXXX_,________, + __XXXX__,________, + ________,________, + ________,________ + // 0x4B + , + 11, + ________,________, + ________,________, + XX______,XX______, + XX_____X,X_______, + XX____XX,________, + XX___XX_,________, + XX__XX__,________, + XX_XXXX_,________, + XXXX_XX_,________, + XXX___XX,________, + XX____XX,________, + XX_____X,X_______, + XX_____X,XX______, + XX______,XX______, + ________,________, + ________,________ + // 0x4C + , + 9, + ________,________, + ________,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XXXXXXXX,________, + XXXXXXXX,________, + ________,________, + ________,________ + // 0x4D + , + 12, + ________,________, + ________,________, + XXX_____,XXX_____, + XXX_____,XXX_____, + XXXX___X,XXX_____, + XXXX___X,XXX_____, + XX_X___X,_XX_____, + XX_XX_XX,_XX_____, + XX_XX_XX,_XX_____, + XX_XX_XX,_XX_____, + XX__XXX_,_XX_____, + XX__XXX_,_XX_____, + XX__XXX_,_XX_____, + XX___X__,_XX_____, + ________,________, + ________,________ + // 0x4E + , + 11, + ________,________, + ________,________, + XX______,XX______, + XXX_____,XX______, + XXXX____,XX______, + XXXX____,XX______, + XX_XX___,XX______, + XX__XX__,XX______, + XX__XX__,XX______, + XX___XX_,XX______, + XX____XX,XX______, + XX____XX,XX______, + XX_____X,XX______, + XX______,XX______, + ________,________, + ________,________ + // 0x4F + , + 11, + ________,________, + ________,________, + ___XXXX_,________, + _XXXXXXX,X_______, + _XX____X,X_______, + XX______,XX______, + XX______,XX______, + XX______,XX______, + XX______,XX______, + XX______,XX______, + XX______,XX______, + _XX____X,X_______, + _XXXXXXX,X_______, + ___XXXX_,________, + ________,________, + ________,________ + // 0x50 + , + 10, + ________,________, + ________,________, + XXXXXXX_,________, + XXXXXXXX,________, + XX____XX,X_______, + XX_____X,X_______, + XX____XX,X_______, + XXXXXXXX,________, + XXXXXXX_,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + ________,________, + ________,________ + // 0x51 + , + 11, + ________,________, + ________,________, + ___XXXX_,________, + _XXXXXXX,X_______, + _XX____X,X_______, + XX______,XX______, + XX______,XX______, + XX______,XX______, + XX______,XX______, + XX______,XX______, + XX__XX__,XX______, + _XX__XXX,X_______, + _XXXXXXX,X_______, + ___XXX_X,X_______, + ________,XX______, + ________,________ + // 0x52 + , + 12, + ________,________, + ________,________, + XXXXXXXX,________, + XXXXXXXX,X_______, + XX_____X,XX______, + XX______,XX______, + XX_____X,XX______, + XXXXXXXX,X_______, + XXXXXXX_,________, + XX___XXX,________, + XX____XX,X_______, + XX_____X,X_______, + XX_____X,XX______, + XX______,XXX_____, + ________,________, + ________,________ + // 0x53 + , + 10, + ________,________, + ________,________, + __XXXXX_,________, + _XXXXXXX,________, + XX____XX,X_______, + XX_____X,X_______, + XXXX____,________, + _XXXXXX_,________, + ___XXXXX,________, + ______XX,X_______, + XX_____X,X_______, + XXX___XX,X_______, + _XXXXXXX,________, + __XXXXX_,________, + ________,________, + ________,________ + // 0x54 + , + 11, + ________,________, + ________,________, + XXXXXXXX,XX______, + XXXXXXXX,XX______, + ____XX__,________, + ____XX__,________, + ____XX__,________, + ____XX__,________, + ____XX__,________, + ____XX__,________, + ____XX__,________, + ____XX__,________, + ____XX__,________, + ____XX__,________, + ________,________, + ________,________ + // 0x55 + , + 11, + ________,________, + ________,________, + XX______,XX______, + XX______,XX______, + XX______,XX______, + XX______,XX______, + XX______,XX______, + XX______,XX______, + XX______,XX______, + XX______,XX______, + XX______,XX______, + XXX____X,XX______, + _XXXXXXX,X_______, + __XXXXXX,________, + ________,________, + ________,________ + // 0x56 + , + 12, + ________,________, + ________,________, + XX______,_XX_____, + XX______,_XX_____, + _XX_____,XX______, + _XX_____,XX______, + __XX___X,X_______, + __XX___X,X_______, + __XX___X,X_______, + ___XX_XX,________, + ___XX_XX,________, + ____XXX_,________, + ____XXX_,________, + ____XXX_,________, + ________,________, + ________,________ + // 0x57 + , + 16, + ________,________, + ________,________, + XX____XX,X____XX_, + XXX___XX,X____XX_, + _XX___XX,X___XX__, + _XX__XX_,XX__XX__, + _XX__XX_,XX__XX__, + __XX_XX_,XX_XX___, + __XX_XX_,XX_XX___, + __XX_XX_,XX_XX___, + ___XXX__,_XXXX___, + ___XXX__,_XXX____, + ___XXX__,_XXX____, + ___XXX__,_XXX____, + ________,________, + ________,________ + // 0x58 + , + 10, + ________,________, + ________,________, + XX_____X,X_______, + XXX___XX,X_______, + _XX___XX,________, + __XX_XX_,________, + __XXXXX_,________, + ___XXX__,________, + ___XXX__,________, + __XXXXX_,________, + __XX_XX_,________, + _XX___XX,________, + XXX___XX,X_______, + XX_____X,X_______, + ________,________, + ________,________ + // 0x59 + , + 11, + ________,________, + ________,________, + XX______,XX______, + XXX____X,XX______, + _XX____X,X_______, + __XX__XX,________, + __XX__XX,________, + ___XXXX_,________, + ____XX__,________, + ____XX__,________, + ____XX__,________, + ____XX__,________, + ____XX__,________, + ____XX__,________, + ________,________, + ________,________ + // 0x5A + , + 10, + ________,________, + ________,________, + _XXXXXXX,X_______, + _XXXXXXX,X_______, + ______XX,________, + _____XX_,________, + ____XXX_,________, + ____XX__,________, + ___XX___,________, + __XXX___,________, + __XX____,________, + _XX_____,________, + XXXXXXXX,X_______, + XXXXXXXX,X_______, + ________,________, + ________,________ + // 0x5B + , + 5, + ________,________, + XXXX____,________, + XXXX____,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XXXX____,________, + XXXX____,________, + ________,________ + // 0x5C + , + 5, + ________,________, + ________,________, + XX______,________, + XX______,________, + XX______,________, + _XX_____,________, + _XX_____,________, + _XX_____,________, + _XX_____,________, + _XX_____,________, + _XX_____,________, + __XX____,________, + __XX____,________, + __XX____,________, + ________,________, + ________,________ + // 0x5D + , + 5, + ________,________, + XXXX____,________, + XXXX____,________, + __XX____,________, + __XX____,________, + __XX____,________, + __XX____,________, + __XX____,________, + __XX____,________, + __XX____,________, + __XX____,________, + __XX____,________, + __XX____,________, + XXXX____,________, + XXXX____,________, + ________,________ + // 0x5E + , + 9, + ________,________, + ________,________, + ___XX___,________, + __XXXX__,________, + __XXXX__,________, + _XX__XX_,________, + _XX__XX_,________, + XX____XX,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x5F + , + 9, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + XXXXXXXX,________, + XXXXXXXX,________, + ________,________ + // 0x60 + , + 4, + ________,________, + XXX_____,________, + _XX_____,________, + __XX____,________, + ____X___,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x61 + , + 9, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + _XXXXX__,________, + XXXXXXX_,________, + XX___XX_,________, + ___XXXX_,________, + _XXXXXX_,________, + XXX__XX_,________, + XX___XX_,________, + XXXXXXX_,________, + _XXXX_XX,________, + ________,________, + ________,________ + // 0x62 + , + 9, + ________,________, + ________,________, + XX______,________, + XX______,________, + XX______,________, + XX_XXX__,________, + XXXXXXX_,________, + XXX__XXX,________, + XX____XX,________, + XX____XX,________, + XX____XX,________, + XXX__XXX,________, + XXXXXXX_,________, + XX_XXX__,________, + ________,________, + ________,________ + // 0x63 + , + 8, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + __XXXX__,________, + _XXXXXX_,________, + XXX__XX_,________, + XX______,________, + XX______,________, + XX______,________, + XXX__XX_,________, + _XXXXXX_,________, + __XXXX__,________, + ________,________, + ________,________ + // 0x64 + , + 9, + ________,________, + ________,________, + ______XX,________, + ______XX,________, + ______XX,________, + __XXX_XX,________, + _XXXXXXX,________, + XXX__XXX,________, + XX____XX,________, + XX____XX,________, + XX____XX,________, + XXX__XXX,________, + _XXXXXXX,________, + __XXX_XX,________, + ________,________, + ________,________ + // 0x65 + , + 8, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + __XXX___,________, + _XXXXX__,________, + XX___XX_,________, + XXXXXXX_,________, + XXXXXXX_,________, + XX______,________, + XXX__XX_,________, + _XXXXX__,________, + __XXX___,________, + ________,________, + ________,________ + // 0x66 + , + 7, + ________,________, + ________,________, + __XXXX__,________, + _XXXXX__,________, + _XX_____,________, + XXXXX___,________, + XXXXX___,________, + _XX_____,________, + _XX_____,________, + _XX_____,________, + _XX_____,________, + _XX_____,________, + _XX_____,________, + _XX_____,________, + ________,________, + ________,________ + // 0x67 + , + 9, + ________,________, + ________,________, + ________,________, + ________,________, + __XXX_XX,________, + _XXXXXXX,________, + XXX__XXX,________, + XX____XX,________, + XX____XX,________, + XX____XX,________, + XXX__XXX,________, + _XXXXXXX,________, + __XXX_XX,________, + XX____XX,________, + XXXXXXXX,________, + _XXXXXX_,________ + // 0x68 + , + 9, + ________,________, + ________,________, + XX______,________, + XX______,________, + XX______,________, + XX_XXXX_,________, + XXXXXXXX,________, + XXX___XX,________, + XX____XX,________, + XX____XX,________, + XX____XX,________, + XX____XX,________, + XX____XX,________, + XX____XX,________, + ________,________, + ________,________ + // 0x69 + , + 3, + ________,________, + ________,________, + XX______,________, + XX______,________, + ________,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + ________,________, + ________,________ + // 0x6A + , + 4, + ________,________, + ________,________, + _XX_____,________, + _XX_____,________, + ________,________, + _XX_____,________, + _XX_____,________, + _XX_____,________, + _XX_____,________, + _XX_____,________, + _XX_____,________, + _XX_____,________, + _XX_____,________, + _XX_____,________, + XXX_____,________, + XX______,________ + // 0x6B + , + 8, + ________,________, + ________,________, + XX______,________, + XX______,________, + XX______,________, + XX___XX_,________, + XX__XX__,________, + XX_XX___,________, + XXXXX___,________, + XXXXX___,________, + XXX_XX__,________, + XX__XX__,________, + XX___XX_,________, + XX___XX_,________, + ________,________, + ________,________ + // 0x6C + , + 3, + ________,________, + ________,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + ________,________, + ________,________ + // 0x6D + , + 13, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + XX_XXX__,XXX_____, + XXXXXXXX,XXXX____, + XXX__XXX,__XX____, + XX___XX_,__XX____, + XX___XX_,__XX____, + XX___XX_,__XX____, + XX___XX_,__XX____, + XX___XX_,__XX____, + XX___XX_,__XX____, + ________,________, + ________,________ + // 0x6E + , + 9, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + XX_XXXX_,________, + XXXXXXXX,________, + XXX___XX,________, + XX____XX,________, + XX____XX,________, + XX____XX,________, + XX____XX,________, + XX____XX,________, + XX____XX,________, + ________,________, + ________,________ + // 0x6F + , + 9, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + __XXXX__,________, + _XXXXXX_,________, + XXX__XXX,________, + XX____XX,________, + XX____XX,________, + XX____XX,________, + XXX__XXX,________, + _XXXXXX_,________, + __XXXX__,________, + ________,________, + ________,________ + // 0x70 + , + 9, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + XX_XXXX_,________, + XXXXXXXX,________, + XXX___XX,________, + XX____XX,________, + XX____XX,________, + XX____XX,________, + XXX__XXX,________, + XXXXXXX_,________, + XX_XXX__,________, + XX______,________, + XX______,________ + // 0x71 + , + 9, + ________,________, + ________,________, + ________,________, + ________,________, + __XXX_XX,________, + _XXXXXXX,________, + XXX__XXX,________, + XX____XX,________, + XX____XX,________, + XX____XX,________, + XXX__XXX,________, + _XXXXXXX,________, + __XXX_XX,________, + ______XX,________, + ______XX,________, + ______XX,________ + // 0x72 + , + 6, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + XX_XX___,________, + XXXXX___,________, + XXX_____,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + ________,________, + ________,________ + // 0x73 + , + 8, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + _XXXXX__,________, + XXXXXXX_,________, + XX___XX_,________, + XXXX____,________, + _XXXXX__,________, + ___XXXX_,________, + XX___XX_,________, + XXXXXXX_,________, + _XXXXX__,________, + ________,________, + ________,________ + // 0x74 + , + 6, + ________,________, + ________,________, + __X_____,________, + _XX_____,________, + _XX_____,________, + XXXXX___,________, + XXXXX___,________, + _XX_____,________, + _XX_____,________, + _XX_____,________, + _XX_____,________, + _XX_____,________, + _XXXX___,________, + __XXX___,________, + ________,________, + ________,________ + // 0x75 + , + 9, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + XX____XX,________, + XX____XX,________, + XX____XX,________, + XX____XX,________, + XX____XX,________, + XX____XX,________, + XX___XXX,________, + XXXXXXXX,________, + _XXXX_XX,________, + ________,________, + ________,________ + // 0x76 + , + 8, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + XX___XX_,________, + XX___XX_,________, + XX___XX_,________, + _XX_XX__,________, + _XX_XX__,________, + _XX_XX__,________, + __XXX___,________, + __XXX___,________, + __XXX___,________, + ________,________, + ________,________ + // 0x77 + , + 14, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + XX___XXX,___XX___, + XX___XXX,___XX___, + _XX__XXX,__XX____, + _XX_XX_X,X_XX____, + _XX_XX_X,X_XX____, + _XX_XX_X,X_XX____, + __XXX___,XXX_____, + __XXX___,XXX_____, + __XXX___,XXX_____, + ________,________, + ________,________ + // 0x78 + , + 8, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + XX___XX_,________, + XXX_XXX_,________, + _XX_XX__,________, + __XXX___,________, + __XXX___,________, + __XXX___,________, + _XX_XX__,________, + XXX_XXX_,________, + XX___XX_,________, + ________,________, + ________,________ + // 0x79 + , + 10, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + XX_____X,X_______, + _XX___XX,________, + _XX___XX,________, + __XX_XX_,________, + __XX_XX_,________, + __XXXXX_,________, + ___XXX__,________, + ___XXX__,________, + ___XX___,________, + _XXXX___,________, + _XXX____,________ + // 0x7A + , + 8, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + XXXXXXX_,________, + XXXXXXX_,________, + ____XX__,________, + ___XXX__,________, + __XXX___,________, + _XXX____,________, + _XX_____,________, + XXXXXXX_,________, + XXXXXXX_,________, + ________,________, + ________,________ + // 0x7B + , + 7, + ________,________, + ___XXX__,________, + __XXXX__,________, + __XX____,________, + __XX____,________, + __XX____,________, + __XX____,________, + XXX_____,________, + XXX_____,________, + __XX____,________, + __XX____,________, + __XX____,________, + __XX____,________, + __XXXX__,________, + ___XXX__,________, + ________,________ + // 0x7C + , + 3, + ________,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + ________,________ + // 0x7D + , + 7, + ________,________, + XXX_____,________, + XXXX____,________, + __XX____,________, + __XX____,________, + __XX____,________, + __XX____,________, + ___XXX__,________, + ___XXX__,________, + __XX____,________, + __XX____,________, + __XX____,________, + __XX____,________, + XXXX____,________, + XXX_____,________, + ________,________ + // 0x7E + , + 9, + ________,________, + ________,________, + _XXX___X,________, + XXXXXXXX,________, + X___XXX_,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x7F + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x80 + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x81 + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x82 + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x83 + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x84 + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x85 + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x86 + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x87 + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x88 + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x89 + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x8A + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x8B + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x8C + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x8D + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x8E + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x8F + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x90 + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x91 + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x92 + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x93 + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x94 + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x95 + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x96 + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x97 + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x98 + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x99 + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x9A + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x9B + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x9C + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x9D + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x9E + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x9F + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0xA0 + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0xA1 + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0xA2 + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0xA3 - £ + , + 8, + ________,________, + ________,________, + _XX_XX__,________, + _XX_XX__,________, + ________,________, + __XXX___,________, + _XXXXX__,________, + XX___XX_,________, + XXXXXXX_,________, + XXXXXXX_,________, + XX______,________, + XXX__XX_,________, + _XXXXX__,________, + __XXX___,________, + ________,________, + ________,________ + // 0xA4 + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0xA5 + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0xA6 + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0xA7 + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0xA8 + , + 10, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0xA9 + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0xAA + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0xAB + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0xAC + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0xAD + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0xAE + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0xAF + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0xB0 + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0xB1 + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0xB2 + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0xB3 - ³ + , + 10, + __XX_XX_,________, + ________,________, + XXXXXXXX,X_______, + XXXXXXXX,X_______, + XX______,________, + XX______,________, + XX______,________, + XXXXXXXX,X_______, + XXXXXXXX,X_______, + XX______,________, + XX______,________, + XX______,________, + XXXXXXXX,X_______, + XXXXXXXX,X_______, + ________,________, + ________,________ + // 0xB4 + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0xB5 + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0xB6 + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0xB7 + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0xB8 + , + 8, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0xB9 + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0xBA + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0xBB + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0xBC + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0xBD + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0xBE + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0xBF + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0xC0 - À + , + 12, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + XX___XXX,X_______, + XX__XXXX,XX______, + XX_XXX__,XXX_____, + XXXXX___,_XX_____, + XXXXX___,_XX_____, + XX_XX___,_XX_____, + XX_XXX__,XXX_____, + XX__XXXX,XX______, + XX___XXX,X_______, + ________,________, + ________,________ + // 0xC1 - Á + , + 9, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + _XXXXX__,________, + XXXXXXX_,________, + XX___XX_,________, + ___XXXX_,________, + _XXXXXX_,________, + XXX__XX_,________, + XX___XX_,________, + XXXXXXX_,________, + _XXXX_XX,________, + ________,________, + ________,________ + // 0xC2 -  + , + 9, + ________,________, + ______X_,________, + _XXXXXX_,________, + XXXXXX__,________, + XX______,________, + XXXXXX__,________, + XXXXXXX_,________, + XXX__XXX,________, + XX____XX,________, + XX____XX,________, + XX____XX,________, + XXX__XXX,________, + _XXXXXX_,________, + __XXXX__,________, + ________,________, + ________,________ + // 0xC3 - à + , + 10, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + XX____XX,________, + XX____XX,________, + XX____XX,________, + XX____XX,________, + XX____XX,________, + XX____XX,________, + XX____XX,________, + XXXXXXXX,X_______, + XXXXXXXX,X_______, + _______X,X_______, + _______X,X_______ + // 0xC4 - Ä + , + 12, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ___XXXXX,X_______, + __XXXXXX,X_______, + __XX___X,X_______, + __XX___X,X_______, + __XX___X,X_______, + __XX___X,X_______, + _XX____X,X_______, + XXXXXXXX,XXX_____, + XXXXXXXX,XXX_____, + XX______,_XX_____, + XX______,_XX_____ + // 0xC5 - Å + , + 8, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + __XXX___,________, + _XXXXX__,________, + XX___XX_,________, + XXXXXXX_,________, + XXXXXXX_,________, + XX______,________, + XXX__XX_,________, + _XXXXX__,________, + __XXX___,________, + ________,________, + ________,________ + // 0xC6 - Æ + , + 13, + ________,________, + ________,________, + ________,________, + _____XX_,________, + _____XX_,________, + __XXXXXX,XX______, + _XXXXXXX,XXX_____, + XX___XX_,__XX____, + XX___XX_,__XX____, + XX___XX_,__XX____, + XX___XX_,__XX____, + XX___XX_,__XX____, + _XXXXXXX,XXX_____, + __XXXXXX,XX______, + _____XX_,________, + _____XX_,________ + // 0xC7 - Ç + , + 8, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + XXXXXXX_,________, + XXXXXXX_,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + ________,________, + ________,________ + // 0xC8 - È + , + 8, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + XX___XX_,________, + XXX_XXX_,________, + _XX_XX__,________, + __XXX___,________, + __XXX___,________, + __XXX___,________, + _XX_XX__,________, + XXX_XXX_,________, + XX___XX_,________, + ________,________, + ________,________ + // 0xC9 - É + , + 9, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + XX____XX,________, + XX___XXX,________, + XX__XXXX,________, + XX_XXXXX,________, + XXXXX_XX,________, + XXXX__XX,________, + XXX___XX,________, + XX____XX,________, + XX____XX,________, + ________,________, + ________,________ + // 0xCA - Ê + , + 9, + ________,________, + __X__X__,________, + __XXXX__,________, + ___XX___,________, + ________,________, + XX____XX,________, + XX___XXX,________, + XX__XXXX,________, + XX_XXXXX,________, + XXXXX_XX,________, + XXXX__XX,________, + XXX___XX,________, + XX____XX,________, + XX____XX,________, + ________,________, + ________,________ + // 0xCB - Ë + , + 8, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + XX___XX_,________, + XX___XX_,________, + XX__XX__,________, + XXXX____,________, + XXXX____,________, + XX__XX__,________, + XX___XX_,________, + XX___XX_,________, + XX___XX_,________, + ________,________, + ________,________ + // 0xCC - Ì + , + 9, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + __XXXXXX,________, + _XXXXXXX,________, + _XX___XX,________, + _XX___XX,________, + _XX___XX,________, + _XX___XX,________, + _XX___XX,________, + XXX___XX,________, + XX____XX,________, + ________,________, + ________,________ + // 0xCD - Í + , + 12, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + XXX_____,XXX_____, + XXX_____,XXX_____, + XXXX___X,XXX_____, + XXXX___X,XXX_____, + XX_XX_XX,_XX_____, + XX_XX_XX,_XX_____, + XX__XXX_,_XX_____, + XX__XXX_,_XX_____, + XX___X__,_XX_____, + ________,________, + ________,________ + // 0xCE - Î + , + 9, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + XX____XX,________, + XX____XX,________, + XX____XX,________, + XXXXXXXX,________, + XXXXXXXX,________, + XX____XX,________, + XX____XX,________, + XX____XX,________, + XX____XX,________, + ________,________, + ________,________ + // 0xCF - Ï + , + 9, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + __XXXX__,________, + _XXXXXX_,________, + XXX__XXX,________, + XX____XX,________, + XX____XX,________, + XX____XX,________, + XXX__XXX,________, + _XXXXXX_,________, + __XXXX__,________, + ________,________, + ________,________ + // 0xD0 - Ð + , + 9, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + XXXXXXXX,________, + XXXXXXXX,________, + XX____XX,________, + XX____XX,________, + XX____XX,________, + XX____XX,________, + XX____XX,________, + XX____XX,________, + XX____XX,________, + ________,________, + ________,________ + // 0xD1 - Ñ + , + 9, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + _XXXXXXX,________, + XXXXXXXX,________, + XX____XX,________, + XX____XX,________, + XXXXXXXX,________, + _XXXXXXX,________, + __XX__XX,________, + _XX___XX,________, + XX____XX,________, + ________,________, + ________,________ + // 0xD2 - Ò + , + 9, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + XX_XXXX_,________, + XXXXXXXX,________, + XXX___XX,________, + XX____XX,________, + XX____XX,________, + XX____XX,________, + XXX__XXX,________, + XXXXXXX_,________, + XX_XXX__,________, + XX______,________, + XX______,________ + // 0xD3 - Ó + , + 8, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + __XXXX__,________, + _XXXXXX_,________, + XXX__XX_,________, + XX______,________, + XX______,________, + XX______,________, + XXX__XX_,________, + _XXXXXX_,________, + __XXXX__,________, + ________,________, + ________,________ + // 0xD4 - Ô + , + 9, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + XXXXXXXX,________, + XXXXXXXX,________, + ___XX___,________, + ___XX___,________, + ___XX___,________, + ___XX___,________, + ___XX___,________, + ___XX___,________, + ___XX___,________, + ________,________, + ________,________ + // 0xD5 - Õ + , + 11, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + XX______,XX______, + XX______,XX______, + _XX____X,X_______, + _XX____X,X_______, + __XX__XX,________, + __XX__XX,________, + ___XXXX_,________, + ___XXXX_,________, + ____XX__,________, + _XXXX___,________, + _XXX____,________ + // 0xD6 - Ö + , + 13, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + XX___XX_,__XX____, + _XX__XX_,_XX_____, + __XX_XX_,XX______, + __XX_XX_,XX______, + ____XXXX,________, + __XX_XX_,XX______, + _XX__XX_,_XX_____, + XX___XX_,__XX____, + XX___XX_,__XX____, + ________,________, + ________,________ + // 0xD7 - × + , + 8, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + XXXXXX__,________, + XXXXXXX_,________, + XX___XX_,________, + XXXXXX__,________, + XXXXXX__,________, + XX___XX_,________, + XX___XX_,________, + XXXXXXX_,________, + XXXXXX__,________, + ________,________, + ________,________ + // 0xD8 - Ø + , + 9, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + XX______,________, + XX______,________, + XX______,________, + XXXXXXX_,________, + XXXXXXXX,________, + XX____XX,________, + XX____XX,________, + XXXXXXXX,________, + XXXXXXX_,________, + ________,________, + ________,________ + // 0xD9 - Ù + , + 12, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + XX______,_XX_____, + XX______,_XX_____, + XX______,_XX_____, + XXXXXXX_,_XX_____, + XXXXXXXX,_XX_____, + XX____XX,_XX_____, + XX____XX,_XX_____, + XXXXXXXX,_XX_____, + XXXXXXX_,_XX_____, + ________,________, + ________,________ + // 0xDA - Ú + , + 9, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + _XXXXXX_,________, + XXXXXXXX,________, + ______XX,________, + ____XXX_,________, + ____XXXX,________, + ______XX,________, + XX____XX,________, + XXXXXXXX,________, + _XXXXXX_,________, + ________,________, + ________,________ + // 0xDB - Û + , + 11, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + XX__XX__,XX______, + XX__XX__,XX______, + XX__XX__,XX______, + XX__XX__,XX______, + XX__XX__,XX______, + XX__XX__,XX______, + XX__XX__,XX______, + XXXXXXXX,XX______, + XXXXXXXX,XX______, + ________,________, + ________,________ + // 0xDC - Ü + , + 9, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + _XXXXXX_,________, + XXXXXXXX,________, + XX____XX,________, + ____XXXX,________, + ____XXXX,________, + ______XX,________, + XX____XX,________, + XXXXXXXX,________, + _XXXXXX_,________, + ________,________, + ________,________ + // 0xDD - Ý + , + 12, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + XX__XX__,XX______, + XX__XX__,XX______, + XX__XX__,XX______, + XX__XX__,XX______, + XX__XX__,XX______, + XX__XX__,XX______, + XX__XX__,XX______, + XXXXXXXX,XX______, + XXXXXXXX,XXX_____, + ________,_XX_____, + ________,_XX_____ + // 0xDE - Þ + , + 9, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + XX____XX,________, + XX____XX,________, + XX____XX,________, + XX____XX,________, + XXXXXXXX,________, + _XXXXXXX,________, + ______XX,________, + ______XX,________, + ______XX,________, + ________,________, + ________,________ + // 0xDF - ß + , + 11, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + XXXX____,________, + XXXX____,________, + __XX____,________, + __XXXXXX,X_______, + __XXXXXX,XX______, + __XX____,XX______, + __XX____,XX______, + __XXXXXX,XX______, + __XXXXXX,X_______, + ________,________, + ________,________ + // 0xE0 - à + , + 14, + ________,________, + ________,________, + XX_____X,XX______, + XX___XXX,XXXX____, + XX___XX_,__XX____, + XX__XX__,___XX___, + XX__XX__,___XX___, + XXXXXX__,___XX___, + XXXXXX__,___XX___, + XX__XX__,___XX___, + XX__XX__,___XX___, + XX___XX_,__XX____, + XX___XXX,XXXX____, + XX_____X,XX______, + ________,________, + ________,________ + // 0xE1 - á + , + 12, + ________,________, + ________,________, + ____XXX_,________, + ____XXX_,________, + ___XX_XX,________, + ___XX_XX,________, + ___XX_XX,________, + __XX___X,X_______, + __XX___X,X_______, + __XXXXXX,X_______, + _XXXXXXX,XX______, + _XX_____,XX______, + _XX_____,XX______, + XX______,_XX_____, + ________,________, + ________,________ + // 0xE2 - â + , + 11, + ________,________, + ________,________, + XXXXXXXX,X_______, + XXXXXXXX,X_______, + XX______,________, + XX______,________, + XX______,________, + XXXXXXXX,________, + XXXXXXXX,X_______, + XX_____X,XX______, + XX______,XX______, + XX______,XX______, + XXXXXXXX,X_______, + XXXXXXXX,________, + ________,________, + ________,________ + // 0xE3 - ã + , + 11, + ________,________, + ________,________, + XX_____X,X_______, + XX_____X,X_______, + XX_____X,X_______, + XX_____X,X_______, + XX_____X,X_______, + XX_____X,X_______, + XX_____X,X_______, + XX_____X,X_______, + XX_____X,X_______, + XX_____X,X_______, + XXXXXXXX,XX______, + XXXXXXXX,XX______, + ________,XX______, + ________,XX______ + // 0xE4 - ä + , + 13, + ________,________, + ________,________, + ____XXXX,XX______, + ___XXXXX,XX______, + ___XX___,XX______, + ___XX___,XX______, + ___XX___,XX______, + __XX____,XX______, + __XX____,XX______, + __XX____,XX______, + __XX____,XX______, + _XX_____,XX______, + XXXXXXXX,XXXX____, + XXXXXXXX,XXXX____, + XX______,__XX____, + XX______,__XX____ + // 0xE5 - å + , + 10, + ________,________, + ________,________, + XXXXXXXX,X_______, + XXXXXXXX,X_______, + XX______,________, + XX______,________, + XX______,________, + XXXXXXXX,X_______, + XXXXXXXX,X_______, + XX______,________, + XX______,________, + XX______,________, + XXXXXXXX,X_______, + XXXXXXXX,X_______, + ________,________, + ________,________ + // 0xE6 - æ + , + 15, + ________,________, + ________,________, + ______XX,________, + ___XXXXX,XXX_____, + _XXXXXXX,XXXXX___, + _XX___XX,___XX___, + XX____XX,____XX__, + XX____XX,____XX__, + XX____XX,____XX__, + XX____XX,____XX__, + _XX___XX,___XX___, + _XXXXXXX,XXXXX___, + ___XXXXX,XXX_____, + ______XX,________, + ________,________, + ________,________ + // 0xD5 + // 0xE7 - ç + , + 10, + ________,________, + ________,________, + XXXXXXXX,X_______, + XXXXXXXX,X_______, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + ________,________, + ________,________ + // 0xE8 - è + , + 10, + ________,________, + ________,________, + XX_____X,X_______, + XXX___XX,X_______, + _XX___XX,________, + __XX_XX_,________, + __XXXXX_,________, + ___XXX__,________, + ___XXX__,________, + __XXXXX_,________, + __XX_XX_,________, + _XX___XX,________, + XXX___XX,X_______, + XX_____X,X_______, + ________,________, + ________,________ + // 0xE9 - é + , + 11, + ________,________, + ________,________, + XX______,XX______, + XX_____X,XX______, + XX____XX,XX______, + XX____XX,XX______, + XX___XX_,XX______, + XX__XX__,XX______, + XX__XX__,XX______, + XX_XX___,XX______, + XXXX____,XX______, + XXXX____,XX______, + XXX_____,XX______, + XX______,XX______, + ________,________, + ________,________ + // 0xEA - ê + , + 11, + ___XXXX_,________, + ____XX__,________, + XX______,XX______, + XX_____X,XX______, + XX____XX,XX______, + XX____XX,XX______, + XX___XX_,XX______, + XX__XX__,XX______, + XX__XX__,XX______, + XX_XX___,XX______, + XXXX____,XX______, + XXXX____,XX______, + XXX_____,XX______, + XX______,XX______, + ________,________, + ________,________ + // 0xEB - ë + , + 11, + ________,________, + ________,________, + XX______,XX______, + XX_____X,X_______, + XX____XX,________, + XX___XX_,________, + XX__XX__,________, + XX_XXXX_,________, + XXXX_XX_,________, + XXX___XX,________, + XX____XX,________, + XX_____X,X_______, + XX_____X,XX______, + XX______,XX______, + ________,________, + ________,________ + // 0xEC - ì + , + 10, + ________,________, + ________,________, + ___XXXXX,X_______, + __XXXXXX,X_______, + __XX___X,X_______, + _XX____X,X_______, + _XX____X,X_______, + _XX____X,X_______, + _XX____X,X_______, + _XX____X,X_______, + _XX____X,X_______, + _XX____X,X_______, + XXX____X,X_______, + XX_____X,X_______, + ________,________, + ________,________ + // 0xED - í + , + 12, + ________,________, + ________,________, + XXX_____,XXX_____, + XXX_____,XXX_____, + XXXX___X,XXX_____, + XXXX___X,XXX_____, + XX_X___X,_XX_____, + XX_XX_XX,_XX_____, + XX_XX_XX,_XX_____, + XX_XX_XX,_XX_____, + XX__XXX_,_XX_____, + XX__XXX_,_XX_____, + XX__XXX_,_XX_____, + XX___X__,_XX_____, + ________,________, + ________,________ + // 0xEE - î + , + 10, + ________,________, + ________,________, + XX_____X,X_______, + XX_____X,X_______, + XX_____X,X_______, + XX_____X,X_______, + XX_____X,X_______, + XXXXXXXX,X_______, + XXXXXXXX,X_______, + XX_____X,X_______, + XX_____X,X_______, + XX_____X,X_______, + XX_____X,X_______, + XX_____X,X_______, + ________,________, + ________,________ + // 0xEF - ï + , + 11, + ________,________, + ________,________, + ___XXXX_,________, + _XXXXXXX,X_______, + _XX____X,X_______, + XX______,XX______, + XX______,XX______, + XX______,XX______, + XX______,XX______, + XX______,XX______, + XX______,XX______, + _XX____X,X_______, + _XXXXXXX,X_______, + ___XXXX_,________, + ________,________, + ________,________ + // 0xF0 - ð + , + 10, + ________,________, + ________,________, + XXXXXXXX,X_______, + XXXXXXXX,X_______, + XX_____X,X_______, + XX_____X,X_______, + XX_____X,X_______, + XX_____X,X_______, + XX_____X,X_______, + XX_____X,X_______, + XX_____X,X_______, + XX_____X,X_______, + XX_____X,X_______, + XX_____X,X_______, + ________,________, + ________,________ + // 0xF1 - ñ + , + 12, + ________,________, + ________,________, + ___XXXXX,XXX_____, + __XXXXXX,XXX_____, + _XXX____,_XX_____, + _XX_____,_XX_____, + _XXX____,_XX_____, + __XXXXXX,XXX_____, + ____XXXX,XXX_____, + ___XXX__,_XX_____, + __XXX___,_XX_____, + __XX____,_XX_____, + _XXX____,_XX_____, + XXX_____,_XX_____, + ________,________, + ________,________ + // 0xF2 - ò + , + 10, + ________,________, + ________,________, + XXXXXXX_,________, + XXXXXXXX,________, + XX____XX,X_______, + XX_____X,X_______, + XX____XX,X_______, + XXXXXXXX,________, + XXXXXXX_,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + ________,________, + ________,________ + // 0xF3 - ó + , + 11, + ________,________, + ________,________, + ___XXXXX,________, + _XXXXXXX,X_______, + _XX____X,XX______, + XX______,X_______, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,X_______, + _XX____X,XX______, + _XXXXXXX,X_______, + ___XXXXX,________, + ________,________, + ________,________ + // 0xF4 - ô + , + 11, + ________,________, + ________,________, + XXXXXXXX,XX______, + XXXXXXXX,XX______, + ____XX__,________, + ____XX__,________, + ____XX__,________, + ____XX__,________, + ____XX__,________, + ____XX__,________, + ____XX__,________, + ____XX__,________, + ____XX__,________, + ____XX__,________, + ________,________, + ________,________ + // 0xF5 - õ + , + 11, + ________,________, + ________,________, + XX______,XX______, + XX______,XX______, + _XX____X,X_______, + _XX____X,X_______, + __XX__XX,________, + __XX__XX,________, + ___XXXX_,________, + ___XXXX_,________, + ____XX__,________, + ____XX__,________, + _XXXX___,________, + _XXX____,________, + ________,________, + ________,________ + // 0xF6 - ö + , + 13, + ________,________, + ________,________, + XX___XX_,__XX____, + _XX__XX_,_XX_____, + _XX__XX_,_XX_____, + _XX__XX_,_XX_____, + __XX_XX_,XX______, + ____XXXX,________, + __XX_XX_,XX______, + __XX_XX_,XX______, + _XX__XX_,_XX_____, + _XX__XX_,_XX_____, + XX___XX_,__XX____, + XX___XX_,__XX____, + ________,________, + ________,________ + // 0xF7 - ÷ + , + 11, + ________,________, + ________,________, + XXXXXXXX,________, + XXXXXXXX,X_______, + XX_____X,X_______, + XX_____X,X_______, + XX_____X,X_______, + XXXXXXXX,________, + XXXXXXXX,X_______, + XX_____X,XX______, + XX______,XX______, + XX______,XX______, + XXXXXXXX,X_______, + XXXXXXXX,________, + ________,________, + ________,________ + // 0xF8 - ø + , + 10, + ________,________, + ________,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XXXXXXX_,________, + XXXXXXXX,________, + XX____XX,X_______, + XX_____X,X_______, + XX____XX,X_______, + XXXXXXXX,________, + XXXXXXX_,________, + ________,________, + ________,________ + // 0xF9 - ù + , + 13, + ________,________, + ________,________, + XX______,__XX____, + XX______,__XX____, + XX______,__XX____, + XX______,__XX____, + XX______,__XX____, + XXXXXXX_,__XX____, + XXXXXXXX,__XX____, + XX____XX,X_XX____, + XX_____X,X_XX____, + XX____XX,X_XX____, + XXXXXXXX,__XX____, + XXXXXXX_,__XX____, + ________,________, + ________,________ + // 0xFA - ú + , + 9, + ________,________, + ________,________, + __XXXXX_,________, + _XXXXXXX,________, + XX____XX,________, + ______XX,________, + ___XXXX_,________, + ___XXXX_,________, + _____XXX,________, + ______XX,________, + XX____XX,________, + XXX__XXX,________, + _XXXXXX_,________, + __XXXX__,________, + ________,________, + ________,________ + // 0xFB - û + , + 13, + ________,________, + ________,________, + XX___XX_,__XX____, + XX___XX_,__XX____, + XX___XX_,__XX____, + XX___XX_,__XX____, + XX___XX_,__XX____, + XX___XX_,__XX____, + XX___XX_,__XX____, + XX___XX_,__XX____, + XX___XX_,__XX____, + XX___XX_,__XX____, + XXXXXXXX,XXXX____, + XXXXXXXX,XXXX____, + ________,________, + ________,________ + // 0xFC - ü + , + 11, + ________,________, + ________,________, + ___XXXX_,________, + _XXXXXXX,X_______, + XXX____X,X_______, + XX______,XX______, + ________,XX______, + ____XXXX,XX______, + ____XXXX,XX______, + ________,XX______, + XX______,XX______, + XXX____X,X_______, + _XXXXXXX,X_______, + ___XXXX_,________, + ________,________, + ________,________ + // 0xFD - ý + , + 14, + ________,________, + ________,________, + XX___XX_,__XX____, + XX___XX_,__XX____, + XX___XX_,__XX____, + XX___XX_,__XX____, + XX___XX_,__XX____, + XX___XX_,__XX____, + XX___XX_,__XX____, + XX___XX_,__XX____, + XX___XX_,__XX____, + XX___XX_,__XX____, + XXXXXXXX,XXXXX___, + XXXXXXXX,XXXXX___, + ________,___XX___, + ________,___XX___ + // 0xFE - þ + , + 11, + ________,________, + ________,________, + XX______,XX______, + XX______,XX______, + XX______,XX______, + XX______,XX______, + XX______,XX______, + XXX_____,XX______, + _XXXXXXX,XX______, + __XXXXXX,XX______, + ________,XX______, + ________,XX______, + ________,XX______, + ________,XX______, + ________,________, + ________,________ + // 0xFF - ÿ + , + 12, + ________,________, + ________,________, + XXXX____,________, + XXXX____,________, + __XX____,________, + __XX____,________, + __XX____,________, + __XXXXXX,X_______, + __XXXXXX,XX______, + __XX____,XXX_____, + __XX____,_XX_____, + __XX____,XXX_____, + __XXXXXX,XX______, + __XXXXXX,X_______, + ________,________, + ________,________ +}; + +/* +32 (0x20) - 64 (0x40) - @ 96 (0x60) - ` 128 (0x80) - € 160 (0xa0) -   192 (0xc0) - À 224 (0xe0) - à +33 (0x21) - ! 65 (0x41) - A 97 (0x61) - a 129 (0x81) - 161 (0xa1) - ¡ 193 (0xc1) - Á 225 (0xe1) - á +34 (0x22) - " 66 (0x42) - B 98 (0x62) - b 130 (0x82) - ‚ 162 (0xa2) - ¢ 194 (0xc2) -  226 (0xe2) - â +35 (0x23) - # 67 (0x43) - C 99 (0x63) - c 131 (0x83) - ƒ 163 (0xa3) - £ 195 (0xc3) - à 227 (0xe3) - ã +36 (0x24) - $ 68 (0x44) - D 100 (0x64) - d 132 (0x84) - „ 164 (0xa4) - ¤ 196 (0xc4) - Ä 228 (0xe4) - ä +37 (0x25) - % 69 (0x45) - E 101 (0x65) - e 133 (0x85) - … 165 (0xa5) - ¥ 197 (0xc5) - Å 229 (0xe5) - å +38 (0x26) - & 70 (0x46) - F 102 (0x66) - f 134 (0x86) - † 166 (0xa6) - ¦ 198 (0xc6) - Æ 230 (0xe6) - æ +39 (0x27) - ' 71 (0x47) - G 103 (0x67) - g 135 (0x87) - ‡ 167 (0xa7) - § 199 (0xc7) - Ç 231 (0xe7) - ç +40 (0x28) - ( 72 (0x48) - H 104 (0x68) - h 136 (0x88) - ˆ 168 (0xa8) - ¨ 200 (0xc8) - È 232 (0xe8) - è +41 (0x29) - ) 73 (0x49) - I 105 (0x69) - i 137 (0x89) - ‰ 169 (0xa9) - © 201 (0xc9) - É 233 (0xe9) - é +42 (0x2a) - * 74 (0x4a) - J 106 (0x6a) - j 138 (0x8a) - Š 170 (0xaa) - ª 202 (0xca) - Ê 234 (0xea) - ê +43 (0x2b) - + 75 (0x4b) - K 107 (0x6b) - k 139 (0x8b) - ‹ 171 (0xab) - « 203 (0xcb) - Ë 235 (0xeb) - ë +44 (0x2c) - , 76 (0x4c) - L 108 (0x6c) - l 140 (0x8c) - Œ 172 (0xac) - ¬ 204 (0xcc) - Ì 236 (0xec) - ì +45 (0x2d) - - 77 (0x4d) - M 109 (0x6d) - m 141 (0x8d) - 173 (0xad) - ­ 205 (0xcd) - Í 237 (0xed) - í +46 (0x2e) - . 78 (0x4e) - N 110 (0x6e) - n 142 (0x8e) - Ž 174 (0xae) - ® 206 (0xce) - Î 238 (0xee) - î +47 (0x2f) - / 79 (0x4f) - O 111 (0x6f) - o 143 (0x8f) - 175 (0xaf) - ¯ 207 (0xcf) - Ï 239 (0xef) - ï +48 (0x30) - 0 80 (0x50) - P 112 (0x70) - p 144 (0x90) - 176 (0xb0) - ° 208 (0xd0) - Ð 240 (0xf0) - ð +49 (0x31) - 1 81 (0x51) - Q 113 (0x71) - q 145 (0x91) - ‘ 177 (0xb1) - ± 209 (0xd1) - Ñ 241 (0xf1) - ñ +50 (0x32) - 2 82 (0x52) - R 114 (0x72) - r 146 (0x92) - ’ 178 (0xb2) - ² 210 (0xd2) - Ò 242 (0xf2) - ò +51 (0x33) - 3 83 (0x53) - S 115 (0x73) - s 147 (0x93) - “ 179 (0xb3) - ³ 211 (0xd3) - Ó 243 (0xf3) - ó +52 (0x34) - 4 84 (0x54) - T 116 (0x74) - t 148 (0x94) - ” 180 (0xb4) - ´ 212 (0xd4) - Ô 244 (0xf4) - ô +53 (0x35) - 5 85 (0x55) - U 117 (0x75) - u 149 (0x95) - • 181 (0xb5) - µ 213 (0xd5) - Õ 245 (0xf5) - õ +54 (0x36) - 6 86 (0x56) - V 118 (0x76) - v 150 (0x96) - – 182 (0xb6) - ¶ 214 (0xd6) - Ö 246 (0xf6) - ö +55 (0x37) - 7 87 (0x57) - W 119 (0x77) - w 151 (0x97) - — 183 (0xb7) - · 215 (0xd7) - × 247 (0xf7) - ÷ +56 (0x38) - 8 88 (0x58) - X 120 (0x78) - x 152 (0x98) - ˜ 184 (0xb8) - ¸ 216 (0xd8) - Ø 248 (0xf8) - ø +57 (0x39) - 9 89 (0x59) - Y 121 (0x79) - y 153 (0x99) - ™ 185 (0xb9) - ¹ 217 (0xd9) - Ù 249 (0xf9) - ù +58 (0x3a) - : 90 (0x5a) - Z 122 (0x7a) - z 154 (0x9a) - 186 (0xba) - º 218 (0xda) - Ú 250 (0xfa) - ú +59 (0x3b) - ; 91 (0x5b) - [ 123 (0x7b) - { 155 (0x9b) - › 187 (0xbb) - » 219 (0xdb) - Û 251 (0xfb) - û +60 (0x3c) - < 92 (0x5c) - \ 124 (0x7c) - | 156 (0x9c) - œ 188 (0xbc) - ¼ 220 (0xdc) - Ü 252 (0xfc) - ü +61 (0x3d) - = 93 (0x5d) - ] 125 (0x7d) - } 157 (0x9d) - 189 (0xbd) - ½ 221 (0xdd) - Ý 253 (0xfd) - ý +62 (0x3e) - > 94 (0x5e) - ^ 126 (0x7e) - ~ 158 (0x9e) - ž 190 (0xbe) - ¾ 222 (0xde) - Þ 254 (0xfe) - þ +63 (0x3f) - ? 95 (0x5f) - _ 127 (0x7f) - 159 (0x9f) - Ÿ 191 (0xbf) - ¿ 223 (0xdf) - ß 255 (0xff) - ÿ +*/ diff --git a/F1-nolib/RGB_LED_Screen/font16.h b/F1-nolib/RGB_LED_Screen/font16.h new file mode 100644 index 0000000..37a6bea --- /dev/null +++ b/F1-nolib/RGB_LED_Screen/font16.h @@ -0,0 +1,4322 @@ +/* + * This file is part of the LED_screen project. + * Copyright 2019 Edward V. Emelianov + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +// this file should be included JUST ONCE! +// only in fonts.c + +// font14: matrix 16x16 bits -> 32 bytes per symbol +#define FONT16BYTES 32 +#define FONT16HEIGHT 16 +#define FONT16BASELINE 0 + +// Font 16px height, full matrix is 32x32px +// first number is symbol width, another are symbol data +const uint8_t font16_table[SYMBOLS_AMOUNT *(FONT16BYTES+1)] = { + // 0x20 - ' ' + 4, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x21 + , + 4, + XXX_____,________, + XXX_____,________, + XXX_____,________, + XXX_____,________, + XXX_____,________, + XXX_____,________, + XXX_____,________, + XXX_____,________, + XXX_____,________, + XXX_____,________, + _X______,________, + ________,________, + ________,________, + _X______,________, + XXX_____,________, + _X______,________ + // 0x22 + , + 8, + _X___X__,________, + XXX_XXX_,________, + _XX__XX_,________, + _X___X__,________, + X___X___,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x23 + , + 15, + ________,________, + ______XX,____XX__, + ______XX,____XX__, + _____XX_,___XX___, + _____XX_,___XX___, + __XXXXXX,XXXXXX__, + _XXXXXXX,XXXXX___, + ___XX___,_XX_____, + ___XX___,_XX_____, + _XXXXXXX,XXXXX___, + XXXXXXXX,XXXX____, + _XX____X,X_______, + _XX____X,X_______, + XX____XX,________, + XX____XX,________, + ________,________ + // 0x24 + , + 13, + ____XXXX,________, + __XX__XX,X_______, + _XX___X_,XX______, + _XX___X_,_X______, + __XX__X_,________, + ____XXX_,________, + _____XXX,________, + ______XX,X_______, + ______X_,XXX_____, + ______X_,_XXX____, + ______X_,_XXX____, + _XX___X_,_XXX____, + XX____X_,_XX_____, + _XXX__X_,XXX_____, + ___XXXXX,XX______, + _____XXX,________ + + // 0x25 + , + 16, + __XX____,___XX___, + _XXXX___,__XX____, + XX__XX__,_XX_____, + XX__XX__,_XX_____, + XX__XX__,XX______, + _XXXX___,XX______, + __XX___X,X_______, + _______X,X_______, + ______XX,________, + ______XX,___XX___, + _____XX_,_XXXXXX_, + _____XX_,_XX__XX_, + ____XX__,_XX__XX_, + ____XX__,_XX__XX_, + ___XX___,__XXXX__, + __XX____,___XX___ + // 0x26 + , + 12, + ________,________, + ________,________, + __XXXXX_,________, + _XXXXXXX,________, + _XX___XX,________, + _XX___XX,________, + __XXXXX_,________, + __XXXX__,________, + _XX_XX__,X_______, + XX__XXX_,XX______, + XX___XXX,X_______, + XX____XX,XX______, + _XXXXXXX,XXX_____, + __XXXX__,_X______, + ________,________, + ________,________ + // 0x27 + , + 5, + _XX_____,________, + XXXX____,________, + XXXX____,________, + _XX_____,________, + _X______,________, + X_______,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x28 + , + 7, + _____X__,________, + ___XX___,________, + __XX____,________, + _XX_____,________, + _XX_____,________, + XXX_____,________, + XXX_____,________, + XXX_____,________, + XXX_____,________, + XXX_____,________, + XXX_____,________, + _XX_____,________, + _XX_____,________, + __XX____,________, + ___XX___,________, + _____X__,________ + // 0x29 + , + 7, + X_______,________, + _XX_____,________, + __XX____,________, + ___XX___,________, + ___XX___,________, + ___XXX__,________, + ___XXX__,________, + ___XXX__,________, + ___XXX__,________, + ___XXX__,________, + ___XXX__,________, + ___XX___,________, + ___XX___,________, + __XX____,________, + _XX_____,________, + X_______,________ + // 0x2A + , + 8, + ________,________, + _X_X_X__,________, + __XXX___,________, + XXXXXXX_,________, + __XXX___,________, + _X_X_X__,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x2B + , + 9, + ________,________, + ________,________, + ___XX___,________, + ___XX___,________, + ___XX___,________, + XXXXXXXX,________, + XXXXXXXX,________, + ___XX___,________, + ___XX___,________, + ___XX___,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x2C + , + 4, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + _X______,________, + XXX_____,________, + _XX_____,________, + _X______,________, + X_______,________ + // 0x2D + , + 6, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + XXXXX___,________, + XXXXX___,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x2E + , + 4, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + _X______,________, + XXX_____,________, + _X______,________ + // 0x2F + , + 5, + ________,________, + ________,________, + __XX____,________, + __XX____,________, + __XX____,________, + _XX_____,________, + _XX_____,________, + _XX_____,________, + _XX_____,________, + _XX_____,________, + XX______,________, + XX______,________, + XX______,________, + ________,________, + ________,________, + ________,________ + // 0x30 + , + 11, + ___XXX__,________, + __XXXXXX,________, + _XXX_XXX,X_______, + _XXX__XX,X_______, + XXX____X,XX______, + XXX____X,XX______, + XXX____X,XX______, + XXX____X,XX______, + XXX____X,XX______, + XXX____X,XX______, + XXX____X,XX______, + _XX____X,XX______, + _XXX___X,X_______, + _XXXX_XX,X_______, + __XXXXXX,________, + ____XXX_,________ + // 0x31 + , + 8, + _____X__,________, + ____XXX_,________, + ___XXXX_,________, + __XXXXX_,________, + _XX_XXX_,________, + XX__XXX_,________, + X___XXX_,________, + ___XXXX_,________, + ___XXX__,________, + ___XXX__,________, + ___XXX__,________, + ___XXX__,________, + ___XXX__,________, + ___XXXX_,________, + ___XXXX_,________, + ___XXXX_,________ + // 0x32 + , + 11, + ___XXXXX,________, + _XXXX_XX,X_______, + XXX____X,XX______, + XXX____X,XX______, + _XX____X,XX______, + _______X,XX______, + ______XX,X_______, + _____XXX,________, + ____XXX_,________, + ___XXX__,________, + __XXX___,________, + _XXX____,________, + XXX_____,________, + XXX_____,X_______, + XXXXXXXX,X_______, + XXXXXXXX,________ + // 0x33 + , + 10, + __XXXX__,________, + _XX__XX_,________, + XX____XX,________, + ______XX,________, + ______XX,________, + _____XX_,________, + ___XXX__,________, + _____XX_,________, + ______XX,________, + _______X,X_______, + _______X,X_______, + _XX____X,X_______, + XX_____X,X_______, + XX_____X,X_______, + _XX___XX,________, + __XXXXX_,________ + // 0x34 + , + 11, + ________,X_______, + _______X,X_______, + ______XX,X_______, + _____XXX,X_______, + ____XX_X,X_______, + ___XX__X,X_______, + __XX___X,X_______, + _XX____X,X_______, + XX_____X,X_______, + XXXXXXXX,XX______, + _XXXXXXX,XX______, + _______X,X_______, + _______X,X_______, + _______X,X_______, + _______X,X_______, + _______X,X_______ + // 0x35 + , + 10, + XXXXXXXX,X_______, + XXXXXXXX,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XXXXXX__,________, + _XXXXXX_,________, + _____XXX,________, + _______X,X_______, + _______X,X_______, + _______X,X_______, + XX_____X,X_______, + XX_____X,X_______, + _XX__XXX,________, + __XXXX__,________ + // 0x36 + , + 10, + ___XXXXX,________, + __XX___X,X_______, + _XX____X,X_______, + _XX_____,________, + XX______,________, + XX______,________, + XX__XX__,________, + X_XXXXXX,________, + XXX___XX,X_______, + XX_____X,X_______, + XX_____X,X_______, + XX_____X,X_______, + XXX____X,X_______, + XXX____X,X_______, + _XXX__XX,________, + __XXXX__,________ + // 0x37 + , + 10, + XXXXXXXX,X_______, + XXXXXXXX,X_______, + ______XX,X_______, + _____XXX,________, + _____XX_,________, + ____XXX_,________, + ____XX__,________, + ____XX__,________, + ___XXX__,________, + ___XX___,________, + ___XX___,________, + ___XX___,________, + __XXX___,________, + __XX____,________, + __XX____,________, + __XX____,________ + // 0x38 + , + 10, + __XXXXX_,________, + _XX___XX,________, + XX_____X,X_______, + XX_____X,X_______, + XX_____X,X_______, + _XX___XX,________, + __XXXXX_,________, + __XXXXX_,________, + _XX___XX,________, + XX_____X,X_______, + XX_____X,X_______, + XX_____X,X_______, + XX_____X,X_______, + XXX___XX,X_______, + _XXXXXXX,________, + __XXXXX_,________ + // 0x39 + , + 10, + ___XXX__,________, + _XXX_XXX,________, + XXX___XX,X_______, + XX_____X,X_______, + XX_____X,X_______, + XX_____X,X_______, + XXX___XX,X_______, + _XXXXXXX,X_______, + __XXXX_X,X_______, + _______X,X_______, + _______X,X_______, + ______XX,X_______, + XX____XX,________, + XX___XXX,________, + _XX_XXX_,________, + __XXXX__,________ + // 0x3A + , + 4, + ________,________, + ________,________, + ________,________, + ________,________, + XXX_____,________, + XXX_____,________, + XXX_____,________, + ________,________, + ________,________, + ________,________, + XXX_____,________, + XXX_____,________, + XXX_____,________, + ________,________, + ________,________, + ________,________ + // 0x3B + , + 3, + ________,________, + ________,________, + ________,________, + ________,________, + XX______,________, + XX______,________, + ________,________, + ________,________, + ________,________, + ________,________, + XX______,________, + XX______,________, + _X______,________, + _X______,________, + X_______,________, + ________,________ + // 0x3C + , + 9, + ________,________, + ________,________, + ________,________, + _______X,________, + _____XXX,________, + ___XXXX_,________, + _XXXX___,________, + XXX_____,________, + _XXXX___,________, + ___XXXX_,________, + _____XXX,________, + _______X,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x3D + , + 8, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + XXXXXXX_,________, + XXXXXXX_,________, + ________,________, + ________,________, + XXXXXXX_,________, + XXXXXXX_,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x3E + , + 9, + ________,________, + ________,________, + ________,________, + X_______,________, + XXX_____,________, + _XXXX___,________, + ___XXXX_,________, + _____XXX,________, + ___XXXX_,________, + _XXXX___,________, + XXX_____,________, + X_______,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x3F + , + 9, + ________,________, + ________,________, + __XXXX__,________, + _XXXXXX_,________, + XXX___XX,________, + XX____XX,________, + _____XXX,________, + ____XXX_,________, + ___XXX__,________, + ___XX___,________, + ___XX___,________, + ________,________, + ___XX___,________, + ___XX___,________, + ________,________, + ________,________ + // 0x40 + , + 16, + _____XXX,XXX_____, + ___XXXXX,XXXXX___, + __XXX___,___XXX__, + _XXX__XX,X_XXXX__, + _XX_XXXX,XXXX_XX_, + XXX_XX__,_XXX_XX_, + XX_XX___,_XX__XX_, + XX_XX___,_XX__XX_, + XX_XX___,_XX__XX_, + XX_XX___,XXX_XX__, + XX_XXXXX,XXXXX___, + _XX_XXXX,_XXX____, + _XXX____,_____XX_, + __XXX___,___XXX__, + ___XXXXX,XXXXX___, + _____XXX,XXX_____ + // 0x41 + , + 12, + ________,________, + ________,________, + ____XXX_,________, + ____XXX_,________, + ___XX_XX,________, + ___XX_XX,________, + ___XX_XX,________, + __XX___X,X_______, + __XX___X,X_______, + __XXXXXX,X_______, + _XXXXXXX,XX______, + _XX_____,XX______, + _XX_____,XX______, + XX______,_XX_____, + ________,________, + ________,________ + // 0x42 + , + 11, + ________,________, + ________,________, + XXXXXXXX,________, + XXXXXXXX,X_______, + XX_____X,X_______, + XX_____X,X_______, + XX_____X,X_______, + XXXXXXXX,________, + XXXXXXXX,X_______, + XX_____X,XX______, + XX______,XX______, + XX______,XX______, + XXXXXXXX,X_______, + XXXXXXXX,________, + ________,________, + ________,________ + // 0x43 + , + 11, + ________,________, + ________,________, + ___XXXXX,________, + _XXXXXXX,X_______, + _XX____X,XX______, + XX______,X_______, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,X_______, + _XX____X,XX______, + _XXXXXXX,X_______, + ___XXXXX,________, + ________,________, + ________,________ + // 0x44 + , + 11, + ________,________, + ________,________, + XXXXXXX_,________, + XXXXXXXX,X_______, + XX_____X,X_______, + XX______,XX______, + XX______,XX______, + XX______,XX______, + XX______,XX______, + XX______,XX______, + XX______,XX______, + XX_____X,X_______, + XXXXXXXX,X_______, + XXXXXXX_,________, + ________,________, + ________,________ + // 0x45 + , + 10, + ________,________, + ________,________, + XXXXXXXX,X_______, + XXXXXXXX,X_______, + XX______,________, + XX______,________, + XX______,________, + XXXXXXXX,X_______, + XXXXXXXX,X_______, + XX______,________, + XX______,________, + XX______,________, + XXXXXXXX,X_______, + XXXXXXXX,X_______, + ________,________, + ________,________ + // 0x46 + , + 9, + ________,________, + ________,________, + XXXXXXXX,________, + XXXXXXXX,________, + XX______,________, + XX______,________, + XX______,________, + XXXXXXX_,________, + XXXXXXX_,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + ________,________, + ________,________ + // 0x47 + , + 11, + ________,________, + ________,________, + ___XXXXX,________, + _XXXXXXX,X_______, + _XX____X,XX______, + XX______,X_______, + XX______,________, + XX______,________, + XX___XXX,XX______, + XX___XXX,XX______, + XX______,XX______, + _XX____X,XX______, + _XXXXXXX,X_______, + ___XXXXX,________, + ________,________, + ________,________ + // 0x48 + , + 10, + ________,________, + ________,________, + XX_____X,X_______, + XX_____X,X_______, + XX_____X,X_______, + XX_____X,X_______, + XX_____X,X_______, + XXXXXXXX,X_______, + XXXXXXXX,X_______, + XX_____X,X_______, + XX_____X,X_______, + XX_____X,X_______, + XX_____X,X_______, + XX_____X,X_______, + ________,________, + ________,________ + // 0x49 + , + 3, + ________,________, + ________,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + ________,________, + ________,________ + // 0x4A + , + 9, + ________,________, + ________,________, + ______XX,________, + ______XX,________, + ______XX,________, + ______XX,________, + ______XX,________, + ______XX,________, + ______XX,________, + ______XX,________, + XX____XX,________, + XXX__XXX,________, + _XXXXXX_,________, + __XXXX__,________, + ________,________, + ________,________ + // 0x4B + , + 11, + ________,________, + ________,________, + XX______,XX______, + XX_____X,X_______, + XX____XX,________, + XX___XX_,________, + XX__XX__,________, + XX_XXXX_,________, + XXXX_XX_,________, + XXX___XX,________, + XX____XX,________, + XX_____X,X_______, + XX_____X,XX______, + XX______,XX______, + ________,________, + ________,________ + // 0x4C + , + 9, + ________,________, + ________,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XXXXXXXX,________, + XXXXXXXX,________, + ________,________, + ________,________ + // 0x4D + , + 12, + ________,________, + ________,________, + XXX_____,XXX_____, + XXX_____,XXX_____, + XXXX___X,XXX_____, + XXXX___X,XXX_____, + XX_X___X,_XX_____, + XX_XX_XX,_XX_____, + XX_XX_XX,_XX_____, + XX_XX_XX,_XX_____, + XX__XXX_,_XX_____, + XX__XXX_,_XX_____, + XX__XXX_,_XX_____, + XX___X__,_XX_____, + ________,________, + ________,________ + // 0x4E + , + 11, + ________,________, + ________,________, + XX______,XX______, + XXX_____,XX______, + XXXX____,XX______, + XXXX____,XX______, + XX_XX___,XX______, + XX__XX__,XX______, + XX__XX__,XX______, + XX___XX_,XX______, + XX____XX,XX______, + XX____XX,XX______, + XX_____X,XX______, + XX______,XX______, + ________,________, + ________,________ + // 0x4F + , + 11, + ________,________, + ________,________, + ___XXXX_,________, + _XXXXXXX,X_______, + _XX____X,X_______, + XX______,XX______, + XX______,XX______, + XX______,XX______, + XX______,XX______, + XX______,XX______, + XX______,XX______, + _XX____X,X_______, + _XXXXXXX,X_______, + ___XXXX_,________, + ________,________, + ________,________ + // 0x50 + , + 10, + ________,________, + ________,________, + XXXXXXX_,________, + XXXXXXXX,________, + XX____XX,X_______, + XX_____X,X_______, + XX____XX,X_______, + XXXXXXXX,________, + XXXXXXX_,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + ________,________, + ________,________ + // 0x51 + , + 11, + ________,________, + ________,________, + ___XXXX_,________, + _XXXXXXX,X_______, + _XX____X,X_______, + XX______,XX______, + XX______,XX______, + XX______,XX______, + XX______,XX______, + XX______,XX______, + XX__XX__,XX______, + _XX__XXX,X_______, + _XXXXXXX,X_______, + ___XXX_X,X_______, + ________,XX______, + ________,________ + // 0x52 + , + 12, + ________,________, + ________,________, + XXXXXXXX,________, + XXXXXXXX,X_______, + XX_____X,XX______, + XX______,XX______, + XX_____X,XX______, + XXXXXXXX,X_______, + XXXXXXX_,________, + XX___XXX,________, + XX____XX,X_______, + XX_____X,X_______, + XX_____X,XX______, + XX______,XXX_____, + ________,________, + ________,________ + // 0x53 + , + 10, + ________,________, + ________,________, + __XXXXX_,________, + _XXXXXXX,________, + XX____XX,X_______, + XX_____X,X_______, + XXXX____,________, + _XXXXXX_,________, + ___XXXXX,________, + ______XX,X_______, + XX_____X,X_______, + XXX___XX,X_______, + _XXXXXXX,________, + __XXXXX_,________, + ________,________, + ________,________ + // 0x54 + , + 11, + ________,________, + ________,________, + XXXXXXXX,XX______, + XXXXXXXX,XX______, + ____XX__,________, + ____XX__,________, + ____XX__,________, + ____XX__,________, + ____XX__,________, + ____XX__,________, + ____XX__,________, + ____XX__,________, + ____XX__,________, + ____XX__,________, + ________,________, + ________,________ + // 0x55 + , + 11, + ________,________, + ________,________, + XX______,XX______, + XX______,XX______, + XX______,XX______, + XX______,XX______, + XX______,XX______, + XX______,XX______, + XX______,XX______, + XX______,XX______, + XX______,XX______, + XXX____X,XX______, + _XXXXXXX,X_______, + __XXXXXX,________, + ________,________, + ________,________ + // 0x56 + , + 12, + ________,________, + ________,________, + XX______,_XX_____, + XX______,_XX_____, + _XX_____,XX______, + _XX_____,XX______, + __XX___X,X_______, + __XX___X,X_______, + __XX___X,X_______, + ___XX_XX,________, + ___XX_XX,________, + ____XXX_,________, + ____XXX_,________, + ____XXX_,________, + ________,________, + ________,________ + // 0x57 + , + 16, + ________,________, + ________,________, + XX____XX,X____XX_, + XXX___XX,X____XX_, + _XX___XX,X___XX__, + _XX__XX_,XX__XX__, + _XX__XX_,XX__XX__, + __XX_XX_,XX_XX___, + __XX_XX_,XX_XX___, + __XX_XX_,XX_XX___, + ___XXX__,_XXXX___, + ___XXX__,_XXX____, + ___XXX__,_XXX____, + ___XXX__,_XXX____, + ________,________, + ________,________ + // 0x58 + , + 10, + ________,________, + ________,________, + XX_____X,X_______, + XXX___XX,X_______, + _XX___XX,________, + __XX_XX_,________, + __XXXXX_,________, + ___XXX__,________, + ___XXX__,________, + __XXXXX_,________, + __XX_XX_,________, + _XX___XX,________, + XXX___XX,X_______, + XX_____X,X_______, + ________,________, + ________,________ + // 0x59 + , + 11, + ________,________, + ________,________, + XX______,XX______, + XXX____X,XX______, + _XX____X,X_______, + __XX__XX,________, + __XX__XX,________, + ___XXXX_,________, + ____XX__,________, + ____XX__,________, + ____XX__,________, + ____XX__,________, + ____XX__,________, + ____XX__,________, + ________,________, + ________,________ + // 0x5A + , + 10, + ________,________, + ________,________, + _XXXXXXX,X_______, + _XXXXXXX,X_______, + ______XX,________, + _____XX_,________, + ____XXX_,________, + ____XX__,________, + ___XX___,________, + __XXX___,________, + __XX____,________, + _XX_____,________, + XXXXXXXX,X_______, + XXXXXXXX,X_______, + ________,________, + ________,________ + // 0x5B + , + 5, + ________,________, + XXXX____,________, + XXXX____,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XXXX____,________, + XXXX____,________, + ________,________ + // 0x5C + , + 8, + XX______,________, + XX______,________, + XXX_____,________, + _XX_____,________, + _XX_____,________, + _XXX____,________, + __XX____,________, + __XX____,________, + __XXX___,________, + ___XX___,________, + ___XX___,________, + ___XXX__,________, + ____XX__,________, + ____XX__,________, + ____XXX_,________, + _____XX_,________ + // 0x5D + , + 5, + ________,________, + XXXX____,________, + XXXX____,________, + __XX____,________, + __XX____,________, + __XX____,________, + __XX____,________, + __XX____,________, + __XX____,________, + __XX____,________, + __XX____,________, + __XX____,________, + __XX____,________, + XXXX____,________, + XXXX____,________, + ________,________ + // 0x5E + , + 9, + ________,________, + ________,________, + ___XX___,________, + __XXXX__,________, + __XXXX__,________, + _XX__XX_,________, + _XX__XX_,________, + XX____XX,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x5F + , + 9, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + XXXXXXXX,________, + XXXXXXXX,________, + ________,________ + // 0x60 + , + 4, + ________,________, + XXX_____,________, + _XX_____,________, + __XX____,________, + ____X___,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x61 + , + 9, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + _XXXXX__,________, + XXXXXXX_,________, + XX___XX_,________, + ___XXXX_,________, + _XXXXXX_,________, + XXX__XX_,________, + XX___XX_,________, + XXXXXXX_,________, + _XXXX_XX,________, + ________,________, + ________,________ + // 0x62 + , + 9, + ________,________, + ________,________, + XX______,________, + XX______,________, + XX______,________, + XX_XXX__,________, + XXXXXXX_,________, + XXX__XXX,________, + XX____XX,________, + XX____XX,________, + XX____XX,________, + XXX__XXX,________, + XXXXXXX_,________, + XX_XXX__,________, + ________,________, + ________,________ + // 0x63 + , + 8, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + __XXXX__,________, + _XXXXXX_,________, + XXX__XX_,________, + XX______,________, + XX______,________, + XX______,________, + XXX__XX_,________, + _XXXXXX_,________, + __XXXX__,________, + ________,________, + ________,________ + // 0x64 + , + 9, + ________,________, + ________,________, + ______XX,________, + ______XX,________, + ______XX,________, + __XXX_XX,________, + _XXXXXXX,________, + XXX__XXX,________, + XX____XX,________, + XX____XX,________, + XX____XX,________, + XXX__XXX,________, + _XXXXXXX,________, + __XXX_XX,________, + ________,________, + ________,________ + // 0x65 + , + 8, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + __XXX___,________, + _XXXXX__,________, + XX___XX_,________, + XXXXXXX_,________, + XXXXXXX_,________, + XX______,________, + XXX__XX_,________, + _XXXXX__,________, + __XXX___,________, + ________,________, + ________,________ + // 0x66 + , + 7, + ________,________, + ________,________, + __XXXX__,________, + _XXXXX__,________, + _XX_____,________, + XXXXX___,________, + XXXXX___,________, + _XX_____,________, + _XX_____,________, + _XX_____,________, + _XX_____,________, + _XX_____,________, + _XX_____,________, + _XX_____,________, + ________,________, + ________,________ + // 0x67 + , + 9, + ________,________, + ________,________, + ________,________, + ________,________, + __XXX_XX,________, + _XXXXXXX,________, + XXX__XXX,________, + XX____XX,________, + XX____XX,________, + XX____XX,________, + XXX__XXX,________, + _XXXXXXX,________, + __XXX_XX,________, + XX____XX,________, + XXXXXXXX,________, + _XXXXXX_,________ + // 0x68 + , + 9, + ________,________, + ________,________, + XX______,________, + XX______,________, + XX______,________, + XX_XXXX_,________, + XXXXXXXX,________, + XXX___XX,________, + XX____XX,________, + XX____XX,________, + XX____XX,________, + XX____XX,________, + XX____XX,________, + XX____XX,________, + ________,________, + ________,________ + // 0x69 + , + 3, + ________,________, + ________,________, + XX______,________, + XX______,________, + ________,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + ________,________, + ________,________ + // 0x6A + , + 4, + ________,________, + ________,________, + _XX_____,________, + _XX_____,________, + ________,________, + _XX_____,________, + _XX_____,________, + _XX_____,________, + _XX_____,________, + _XX_____,________, + _XX_____,________, + _XX_____,________, + _XX_____,________, + _XX_____,________, + XXX_____,________, + XX______,________ + // 0x6B + , + 8, + ________,________, + ________,________, + XX______,________, + XX______,________, + XX______,________, + XX___XX_,________, + XX__XX__,________, + XX_XX___,________, + XXXXX___,________, + XXXXX___,________, + XXX_XX__,________, + XX__XX__,________, + XX___XX_,________, + XX___XX_,________, + ________,________, + ________,________ + // 0x6C + , + 3, + ________,________, + ________,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + ________,________, + ________,________ + // 0x6D + , + 13, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + XX_XXX__,XXX_____, + XXXXXXXX,XXXX____, + XXX__XXX,__XX____, + XX___XX_,__XX____, + XX___XX_,__XX____, + XX___XX_,__XX____, + XX___XX_,__XX____, + XX___XX_,__XX____, + XX___XX_,__XX____, + ________,________, + ________,________ + // 0x6E + , + 9, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + XX_XXXX_,________, + XXXXXXXX,________, + XXX___XX,________, + XX____XX,________, + XX____XX,________, + XX____XX,________, + XX____XX,________, + XX____XX,________, + XX____XX,________, + ________,________, + ________,________ + // 0x6F + , + 9, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + __XXXX__,________, + _XXXXXX_,________, + XXX__XXX,________, + XX____XX,________, + XX____XX,________, + XX____XX,________, + XXX__XXX,________, + _XXXXXX_,________, + __XXXX__,________, + ________,________, + ________,________ + // 0x70 + , + 9, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + XX_XXXX_,________, + XXXXXXXX,________, + XXX___XX,________, + XX____XX,________, + XX____XX,________, + XX____XX,________, + XXX__XXX,________, + XXXXXXX_,________, + XX_XXX__,________, + XX______,________, + XX______,________ + // 0x71 + , + 9, + ________,________, + ________,________, + ________,________, + ________,________, + __XXX_XX,________, + _XXXXXXX,________, + XXX__XXX,________, + XX____XX,________, + XX____XX,________, + XX____XX,________, + XXX__XXX,________, + _XXXXXXX,________, + __XXX_XX,________, + ______XX,________, + ______XX,________, + ______XX,________ + // 0x72 + , + 6, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + XX_XX___,________, + XXXXX___,________, + XXX_____,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + ________,________, + ________,________ + // 0x73 + , + 8, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + _XXXXX__,________, + XXXXXXX_,________, + XX___XX_,________, + XXXX____,________, + _XXXXX__,________, + ___XXXX_,________, + XX___XX_,________, + XXXXXXX_,________, + _XXXXX__,________, + ________,________, + ________,________ + // 0x74 + , + 6, + ________,________, + ________,________, + __X_____,________, + _XX_____,________, + _XX_____,________, + XXXXX___,________, + XXXXX___,________, + _XX_____,________, + _XX_____,________, + _XX_____,________, + _XX_____,________, + _XX_____,________, + _XXXX___,________, + __XXX___,________, + ________,________, + ________,________ + // 0x75 + , + 9, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + XX____XX,________, + XX____XX,________, + XX____XX,________, + XX____XX,________, + XX____XX,________, + XX____XX,________, + XX___XXX,________, + XXXXXXXX,________, + _XXXX_XX,________, + ________,________, + ________,________ + // 0x76 + , + 8, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + XX___XX_,________, + XX___XX_,________, + XX___XX_,________, + _XX_XX__,________, + _XX_XX__,________, + _XX_XX__,________, + __XXX___,________, + __XXX___,________, + __XXX___,________, + ________,________, + ________,________ + // 0x77 + , + 14, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + XX___XXX,___XX___, + XX___XXX,___XX___, + _XX__XXX,__XX____, + _XX_XX_X,X_XX____, + _XX_XX_X,X_XX____, + _XX_XX_X,X_XX____, + __XXX___,XXX_____, + __XXX___,XXX_____, + __XXX___,XXX_____, + ________,________, + ________,________ + // 0x78 + , + 8, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + XX___XX_,________, + XXX_XXX_,________, + _XX_XX__,________, + __XXX___,________, + __XXX___,________, + __XXX___,________, + _XX_XX__,________, + XXX_XXX_,________, + XX___XX_,________, + ________,________, + ________,________ + // 0x79 + , + 10, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + XX_____X,X_______, + _XX___XX,________, + _XX___XX,________, + __XX_XX_,________, + __XX_XX_,________, + __XXXXX_,________, + ___XXX__,________, + ___XXX__,________, + ___XX___,________, + _XXXX___,________, + _XXX____,________ + // 0x7A + , + 8, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + XXXXXXX_,________, + XXXXXXX_,________, + ____XX__,________, + ___XXX__,________, + __XXX___,________, + _XXX____,________, + _XX_____,________, + XXXXXXX_,________, + XXXXXXX_,________, + ________,________, + ________,________ + // 0x7B + , + 7, + ________,________, + ___XXX__,________, + __XXXX__,________, + __XX____,________, + __XX____,________, + __XX____,________, + __XX____,________, + XXX_____,________, + XXX_____,________, + __XX____,________, + __XX____,________, + __XX____,________, + __XX____,________, + __XXXX__,________, + ___XXX__,________, + ________,________ + // 0x7C + , + 3, + ________,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + ________,________ + // 0x7D + , + 7, + ________,________, + XXX_____,________, + XXXX____,________, + __XX____,________, + __XX____,________, + __XX____,________, + __XX____,________, + ___XXX__,________, + ___XXX__,________, + __XX____,________, + __XX____,________, + __XX____,________, + __XX____,________, + XXXX____,________, + XXX_____,________, + ________,________ + // 0x7E + , + 9, + ________,________, + ________,________, + _XXX___X,________, + XXXXXXXX,________, + X___XXX_,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x7F + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x80 + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x81 + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x82 + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x83 + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x84 + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x85 + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x86 + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x87 + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x88 + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x89 + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x8A + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x8B + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x8C + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x8D + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x8E + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x8F + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x90 + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x91 + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x92 + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x93 + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x94 + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x95 + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x96 + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x97 + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x98 + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x99 + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x9A + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x9B + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x9C + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x9D + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x9E + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0x9F + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0xA0 + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0xA1 + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0xA2 + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0xA3 - £ + , + 8, + ________,________, + ________,________, + _XX_XX__,________, + _XX_XX__,________, + ________,________, + __XXX___,________, + _XXXXX__,________, + XX___XX_,________, + XXXXXXX_,________, + XXXXXXX_,________, + XX______,________, + XXX__XX_,________, + _XXXXX__,________, + __XXX___,________, + ________,________, + ________,________ + // 0xA4 + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0xA5 + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0xA6 + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0xA7 + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0xA8 + , + 10, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0xA9 + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0xAA + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0xAB + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0xAC + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0xAD + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0xAE + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0xAF + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0xB0 + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0xB1 + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0xB2 + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0xB3 - ³ + , + 10, + __XX_XX_,________, + ________,________, + XXXXXXXX,X_______, + XXXXXXXX,X_______, + XX______,________, + XX______,________, + XX______,________, + XXXXXXXX,X_______, + XXXXXXXX,X_______, + XX______,________, + XX______,________, + XX______,________, + XXXXXXXX,X_______, + XXXXXXXX,X_______, + ________,________, + ________,________ + // 0xB4 + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0xB5 + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0xB6 + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0xB7 + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0xB8 + , + 8, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0xB9 + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0xBA + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0xBB + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0xBC + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0xBD + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0xBE + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0xBF + , + 1, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________ + // 0xC0 - À + , + 12, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + XX___XXX,X_______, + XX__XXXX,XX______, + XX_XXX__,XXX_____, + XXXXX___,_XX_____, + XXXXX___,_XX_____, + XX_XX___,_XX_____, + XX_XXX__,XXX_____, + XX__XXXX,XX______, + XX___XXX,X_______, + ________,________, + ________,________ + // 0xC1 - Á + , + 9, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + _XXXXX__,________, + XXXXXXX_,________, + XX___XX_,________, + ___XXXX_,________, + _XXXXXX_,________, + XXX__XX_,________, + XX___XX_,________, + XXXXXXX_,________, + _XXXX_XX,________, + ________,________, + ________,________ + // 0xC2 -  + , + 9, + ________,________, + ______X_,________, + _XXXXXX_,________, + XXXXXX__,________, + XX______,________, + XXXXXX__,________, + XXXXXXX_,________, + XXX__XXX,________, + XX____XX,________, + XX____XX,________, + XX____XX,________, + XXX__XXX,________, + _XXXXXX_,________, + __XXXX__,________, + ________,________, + ________,________ + // 0xC3 - à + , + 10, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + XX____XX,________, + XX____XX,________, + XX____XX,________, + XX____XX,________, + XX____XX,________, + XX____XX,________, + XX____XX,________, + XXXXXXXX,X_______, + XXXXXXXX,X_______, + _______X,X_______, + _______X,X_______ + // 0xC4 - Ä + , + 12, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + ___XXXXX,X_______, + __XXXXXX,X_______, + __XX___X,X_______, + __XX___X,X_______, + __XX___X,X_______, + __XX___X,X_______, + _XX____X,X_______, + XXXXXXXX,XXX_____, + XXXXXXXX,XXX_____, + XX______,_XX_____, + XX______,_XX_____ + // 0xC5 - Å + , + 8, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + __XXX___,________, + _XXXXX__,________, + XX___XX_,________, + XXXXXXX_,________, + XXXXXXX_,________, + XX______,________, + XXX__XX_,________, + _XXXXX__,________, + __XXX___,________, + ________,________, + ________,________ + // 0xC6 - Æ + , + 13, + ________,________, + ________,________, + ________,________, + _____XX_,________, + _____XX_,________, + __XXXXXX,XX______, + _XXXXXXX,XXX_____, + XX___XX_,__XX____, + XX___XX_,__XX____, + XX___XX_,__XX____, + XX___XX_,__XX____, + XX___XX_,__XX____, + _XXXXXXX,XXX_____, + __XXXXXX,XX______, + _____XX_,________, + _____XX_,________ + // 0xC7 - Ç + , + 8, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + XXXXXXX_,________, + XXXXXXX_,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + ________,________, + ________,________ + // 0xC8 - È + , + 8, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + XX___XX_,________, + XXX_XXX_,________, + _XX_XX__,________, + __XXX___,________, + __XXX___,________, + __XXX___,________, + _XX_XX__,________, + XXX_XXX_,________, + XX___XX_,________, + ________,________, + ________,________ + // 0xC9 - É + , + 9, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + XX____XX,________, + XX___XXX,________, + XX__XXXX,________, + XX_XXXXX,________, + XXXXX_XX,________, + XXXX__XX,________, + XXX___XX,________, + XX____XX,________, + XX____XX,________, + ________,________, + ________,________ + // 0xCA - Ê + , + 9, + ________,________, + __X__X__,________, + __XXXX__,________, + ___XX___,________, + ________,________, + XX____XX,________, + XX___XXX,________, + XX__XXXX,________, + XX_XXXXX,________, + XXXXX_XX,________, + XXXX__XX,________, + XXX___XX,________, + XX____XX,________, + XX____XX,________, + ________,________, + ________,________ + // 0xCB - Ë + , + 8, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + XX___XX_,________, + XX___XX_,________, + XX__XX__,________, + XXXX____,________, + XXXX____,________, + XX__XX__,________, + XX___XX_,________, + XX___XX_,________, + XX___XX_,________, + ________,________, + ________,________ + // 0xCC - Ì + , + 9, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + __XXXXXX,________, + _XXXXXXX,________, + _XX___XX,________, + _XX___XX,________, + _XX___XX,________, + _XX___XX,________, + _XX___XX,________, + XXX___XX,________, + XX____XX,________, + ________,________, + ________,________ + // 0xCD - Í + , + 12, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + XXX_____,XXX_____, + XXX_____,XXX_____, + XXXX___X,XXX_____, + XXXX___X,XXX_____, + XX_XX_XX,_XX_____, + XX_XX_XX,_XX_____, + XX__XXX_,_XX_____, + XX__XXX_,_XX_____, + XX___X__,_XX_____, + ________,________, + ________,________ + // 0xCE - Î + , + 9, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + XX____XX,________, + XX____XX,________, + XX____XX,________, + XXXXXXXX,________, + XXXXXXXX,________, + XX____XX,________, + XX____XX,________, + XX____XX,________, + XX____XX,________, + ________,________, + ________,________ + // 0xCF - Ï + , + 9, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + __XXXX__,________, + _XXXXXX_,________, + XXX__XXX,________, + XX____XX,________, + XX____XX,________, + XX____XX,________, + XXX__XXX,________, + _XXXXXX_,________, + __XXXX__,________, + ________,________, + ________,________ + // 0xD0 - Ð + , + 9, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + XXXXXXXX,________, + XXXXXXXX,________, + XX____XX,________, + XX____XX,________, + XX____XX,________, + XX____XX,________, + XX____XX,________, + XX____XX,________, + XX____XX,________, + ________,________, + ________,________ + // 0xD1 - Ñ + , + 9, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + _XXXXXXX,________, + XXXXXXXX,________, + XX____XX,________, + XX____XX,________, + XXXXXXXX,________, + _XXXXXXX,________, + __XX__XX,________, + _XX___XX,________, + XX____XX,________, + ________,________, + ________,________ + // 0xD2 - Ò + , + 9, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + XX_XXXX_,________, + XXXXXXXX,________, + XXX___XX,________, + XX____XX,________, + XX____XX,________, + XX____XX,________, + XXX__XXX,________, + XXXXXXX_,________, + XX_XXX__,________, + XX______,________, + XX______,________ + // 0xD3 - Ó + , + 8, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + __XXXX__,________, + _XXXXXX_,________, + XXX__XX_,________, + XX______,________, + XX______,________, + XX______,________, + XXX__XX_,________, + _XXXXXX_,________, + __XXXX__,________, + ________,________, + ________,________ + // 0xD4 - Ô + , + 9, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + XXXXXXXX,________, + XXXXXXXX,________, + ___XX___,________, + ___XX___,________, + ___XX___,________, + ___XX___,________, + ___XX___,________, + ___XX___,________, + ___XX___,________, + ________,________, + ________,________ + // 0xD5 - Õ + , + 11, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + XX______,XX______, + XX______,XX______, + _XX____X,X_______, + _XX____X,X_______, + __XX__XX,________, + __XX__XX,________, + ___XXXX_,________, + ___XXXX_,________, + ____XX__,________, + _XXXX___,________, + _XXX____,________ + // 0xD6 - Ö + , + 13, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + XX___XX_,__XX____, + _XX__XX_,_XX_____, + __XX_XX_,XX______, + __XX_XX_,XX______, + ____XXXX,________, + __XX_XX_,XX______, + _XX__XX_,_XX_____, + XX___XX_,__XX____, + XX___XX_,__XX____, + ________,________, + ________,________ + // 0xD7 - × + , + 8, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + XXXXXX__,________, + XXXXXXX_,________, + XX___XX_,________, + XXXXXX__,________, + XXXXXX__,________, + XX___XX_,________, + XX___XX_,________, + XXXXXXX_,________, + XXXXXX__,________, + ________,________, + ________,________ + // 0xD8 - Ø + , + 9, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + XX______,________, + XX______,________, + XX______,________, + XXXXXXX_,________, + XXXXXXXX,________, + XX____XX,________, + XX____XX,________, + XXXXXXXX,________, + XXXXXXX_,________, + ________,________, + ________,________ + // 0xD9 - Ù + , + 12, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + XX______,_XX_____, + XX______,_XX_____, + XX______,_XX_____, + XXXXXXX_,_XX_____, + XXXXXXXX,_XX_____, + XX____XX,_XX_____, + XX____XX,_XX_____, + XXXXXXXX,_XX_____, + XXXXXXX_,_XX_____, + ________,________, + ________,________ + // 0xDA - Ú + , + 9, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + _XXXXXX_,________, + XXXXXXXX,________, + ______XX,________, + ____XXX_,________, + ____XXXX,________, + ______XX,________, + XX____XX,________, + XXXXXXXX,________, + _XXXXXX_,________, + ________,________, + ________,________ + // 0xDB - Û + , + 11, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + XX__XX__,XX______, + XX__XX__,XX______, + XX__XX__,XX______, + XX__XX__,XX______, + XX__XX__,XX______, + XX__XX__,XX______, + XX__XX__,XX______, + XXXXXXXX,XX______, + XXXXXXXX,XX______, + ________,________, + ________,________ + // 0xDC - Ü + , + 9, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + _XXXXXX_,________, + XXXXXXXX,________, + XX____XX,________, + ____XXXX,________, + ____XXXX,________, + ______XX,________, + XX____XX,________, + XXXXXXXX,________, + _XXXXXX_,________, + ________,________, + ________,________ + // 0xDD - Ý + , + 12, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + XX__XX__,XX______, + XX__XX__,XX______, + XX__XX__,XX______, + XX__XX__,XX______, + XX__XX__,XX______, + XX__XX__,XX______, + XX__XX__,XX______, + XXXXXXXX,XX______, + XXXXXXXX,XXX_____, + ________,_XX_____, + ________,_XX_____ + // 0xDE - Þ + , + 9, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + XX____XX,________, + XX____XX,________, + XX____XX,________, + XX____XX,________, + XXXXXXXX,________, + _XXXXXXX,________, + ______XX,________, + ______XX,________, + ______XX,________, + ________,________, + ________,________ + // 0xDF - ß + , + 11, + ________,________, + ________,________, + ________,________, + ________,________, + ________,________, + XXXX____,________, + XXXX____,________, + __XX____,________, + __XXXXXX,X_______, + __XXXXXX,XX______, + __XX____,XX______, + __XX____,XX______, + __XXXXXX,XX______, + __XXXXXX,X_______, + ________,________, + ________,________ + // 0xE0 - à + , + 14, + ________,________, + ________,________, + XX_____X,XX______, + XX___XXX,XXXX____, + XX___XX_,__XX____, + XX__XX__,___XX___, + XX__XX__,___XX___, + XXXXXX__,___XX___, + XXXXXX__,___XX___, + XX__XX__,___XX___, + XX__XX__,___XX___, + XX___XX_,__XX____, + XX___XXX,XXXX____, + XX_____X,XX______, + ________,________, + ________,________ + // 0xE1 - á + , + 12, + ________,________, + ________,________, + ____XXX_,________, + ____XXX_,________, + ___XX_XX,________, + ___XX_XX,________, + ___XX_XX,________, + __XX___X,X_______, + __XX___X,X_______, + __XXXXXX,X_______, + _XXXXXXX,XX______, + _XX_____,XX______, + _XX_____,XX______, + XX______,_XX_____, + ________,________, + ________,________ + // 0xE2 - â + , + 11, + ________,________, + ________,________, + XXXXXXXX,X_______, + XXXXXXXX,X_______, + XX______,________, + XX______,________, + XX______,________, + XXXXXXXX,________, + XXXXXXXX,X_______, + XX_____X,XX______, + XX______,XX______, + XX______,XX______, + XXXXXXXX,X_______, + XXXXXXXX,________, + ________,________, + ________,________ + // 0xE3 - ã + , + 11, + ________,________, + ________,________, + XX_____X,X_______, + XX_____X,X_______, + XX_____X,X_______, + XX_____X,X_______, + XX_____X,X_______, + XX_____X,X_______, + XX_____X,X_______, + XX_____X,X_______, + XX_____X,X_______, + XX_____X,X_______, + XXXXXXXX,XX______, + XXXXXXXX,XX______, + ________,XX______, + ________,XX______ + // 0xE4 - ä + , + 13, + ________,________, + ________,________, + ____XXXX,XX______, + ___XXXXX,XX______, + ___XX___,XX______, + ___XX___,XX______, + ___XX___,XX______, + __XX____,XX______, + __XX____,XX______, + __XX____,XX______, + __XX____,XX______, + _XX_____,XX______, + XXXXXXXX,XXXX____, + XXXXXXXX,XXXX____, + XX______,__XX____, + XX______,__XX____ + // 0xE5 - å + , + 10, + ________,________, + ________,________, + XXXXXXXX,X_______, + XXXXXXXX,X_______, + XX______,________, + XX______,________, + XX______,________, + XXXXXXXX,X_______, + XXXXXXXX,X_______, + XX______,________, + XX______,________, + XX______,________, + XXXXXXXX,X_______, + XXXXXXXX,X_______, + ________,________, + ________,________ + // 0xE6 - æ + , + 15, + ________,________, + ________,________, + ______XX,________, + ___XXXXX,XXX_____, + _XXXXXXX,XXXXX___, + _XX___XX,___XX___, + XX____XX,____XX__, + XX____XX,____XX__, + XX____XX,____XX__, + XX____XX,____XX__, + _XX___XX,___XX___, + _XXXXXXX,XXXXX___, + ___XXXXX,XXX_____, + ______XX,________, + ________,________, + ________,________ + // 0xD5 + // 0xE7 - ç + , + 10, + ________,________, + ________,________, + XXXXXXXX,X_______, + XXXXXXXX,X_______, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + ________,________, + ________,________ + // 0xE8 - è + , + 10, + ________,________, + ________,________, + XX_____X,X_______, + XXX___XX,X_______, + _XX___XX,________, + __XX_XX_,________, + __XXXXX_,________, + ___XXX__,________, + ___XXX__,________, + __XXXXX_,________, + __XX_XX_,________, + _XX___XX,________, + XXX___XX,X_______, + XX_____X,X_______, + ________,________, + ________,________ + // 0xE9 - é + , + 11, + ________,________, + ________,________, + XX______,XX______, + XX_____X,XX______, + XX____XX,XX______, + XX____XX,XX______, + XX___XX_,XX______, + XX__XX__,XX______, + XX__XX__,XX______, + XX_XX___,XX______, + XXXX____,XX______, + XXXX____,XX______, + XXX_____,XX______, + XX______,XX______, + ________,________, + ________,________ + // 0xEA - ê + , + 11, + ___XXXX_,________, + ____XX__,________, + XX______,XX______, + XX_____X,XX______, + XX____XX,XX______, + XX____XX,XX______, + XX___XX_,XX______, + XX__XX__,XX______, + XX__XX__,XX______, + XX_XX___,XX______, + XXXX____,XX______, + XXXX____,XX______, + XXX_____,XX______, + XX______,XX______, + ________,________, + ________,________ + // 0xEB - ë + , + 11, + ________,________, + ________,________, + XX______,XX______, + XX_____X,X_______, + XX____XX,________, + XX___XX_,________, + XX__XX__,________, + XX_XXXX_,________, + XXXX_XX_,________, + XXX___XX,________, + XX____XX,________, + XX_____X,X_______, + XX_____X,XX______, + XX______,XX______, + ________,________, + ________,________ + // 0xEC - ì + , + 10, + ________,________, + ________,________, + ___XXXXX,X_______, + __XXXXXX,X_______, + __XX___X,X_______, + _XX____X,X_______, + _XX____X,X_______, + _XX____X,X_______, + _XX____X,X_______, + _XX____X,X_______, + _XX____X,X_______, + _XX____X,X_______, + XXX____X,X_______, + XX_____X,X_______, + ________,________, + ________,________ + // 0xED - í + , + 12, + ________,________, + ________,________, + XXX_____,XXX_____, + XXX_____,XXX_____, + XXXX___X,XXX_____, + XXXX___X,XXX_____, + XX_X___X,_XX_____, + XX_XX_XX,_XX_____, + XX_XX_XX,_XX_____, + XX_XX_XX,_XX_____, + XX__XXX_,_XX_____, + XX__XXX_,_XX_____, + XX__XXX_,_XX_____, + XX___X__,_XX_____, + ________,________, + ________,________ + // 0xEE - î + , + 10, + ________,________, + ________,________, + XX_____X,X_______, + XX_____X,X_______, + XX_____X,X_______, + XX_____X,X_______, + XX_____X,X_______, + XXXXXXXX,X_______, + XXXXXXXX,X_______, + XX_____X,X_______, + XX_____X,X_______, + XX_____X,X_______, + XX_____X,X_______, + XX_____X,X_______, + ________,________, + ________,________ + // 0xEF - ï + , + 11, + ________,________, + ________,________, + ___XXXX_,________, + _XXXXXXX,X_______, + _XX____X,X_______, + XX______,XX______, + XX______,XX______, + XX______,XX______, + XX______,XX______, + XX______,XX______, + XX______,XX______, + _XX____X,X_______, + _XXXXXXX,X_______, + ___XXXX_,________, + ________,________, + ________,________ + // 0xF0 - ð + , + 10, + ________,________, + ________,________, + XXXXXXXX,X_______, + XXXXXXXX,X_______, + XX_____X,X_______, + XX_____X,X_______, + XX_____X,X_______, + XX_____X,X_______, + XX_____X,X_______, + XX_____X,X_______, + XX_____X,X_______, + XX_____X,X_______, + XX_____X,X_______, + XX_____X,X_______, + ________,________, + ________,________ + // 0xF1 - ñ + , + 12, + ________,________, + ________,________, + ___XXXXX,XXX_____, + __XXXXXX,XXX_____, + _XXX____,_XX_____, + _XX_____,_XX_____, + _XXX____,_XX_____, + __XXXXXX,XXX_____, + ____XXXX,XXX_____, + ___XXX__,_XX_____, + __XXX___,_XX_____, + __XX____,_XX_____, + _XXX____,_XX_____, + XXX_____,_XX_____, + ________,________, + ________,________ + // 0xF2 - ò + , + 10, + ________,________, + ________,________, + XXXXXXX_,________, + XXXXXXXX,________, + XX____XX,X_______, + XX_____X,X_______, + XX____XX,X_______, + XXXXXXXX,________, + XXXXXXX_,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + ________,________, + ________,________ + // 0xF3 - ó + , + 11, + ________,________, + ________,________, + ___XXXXX,________, + _XXXXXXX,X_______, + _XX____X,XX______, + XX______,X_______, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,X_______, + _XX____X,XX______, + _XXXXXXX,X_______, + ___XXXXX,________, + ________,________, + ________,________ + // 0xF4 - ô + , + 11, + ________,________, + ________,________, + XXXXXXXX,XX______, + XXXXXXXX,XX______, + ____XX__,________, + ____XX__,________, + ____XX__,________, + ____XX__,________, + ____XX__,________, + ____XX__,________, + ____XX__,________, + ____XX__,________, + ____XX__,________, + ____XX__,________, + ________,________, + ________,________ + // 0xF5 - õ + , + 11, + ________,________, + ________,________, + XX______,XX______, + XX______,XX______, + _XX____X,X_______, + _XX____X,X_______, + __XX__XX,________, + __XX__XX,________, + ___XXXX_,________, + ___XXXX_,________, + ____XX__,________, + ____XX__,________, + _XXXX___,________, + _XXX____,________, + ________,________, + ________,________ + // 0xF6 - ö + , + 13, + ________,________, + ________,________, + XX___XX_,__XX____, + _XX__XX_,_XX_____, + _XX__XX_,_XX_____, + _XX__XX_,_XX_____, + __XX_XX_,XX______, + ____XXXX,________, + __XX_XX_,XX______, + __XX_XX_,XX______, + _XX__XX_,_XX_____, + _XX__XX_,_XX_____, + XX___XX_,__XX____, + XX___XX_,__XX____, + ________,________, + ________,________ + // 0xF7 - ÷ + , + 11, + ________,________, + ________,________, + XXXXXXXX,________, + XXXXXXXX,X_______, + XX_____X,X_______, + XX_____X,X_______, + XX_____X,X_______, + XXXXXXXX,________, + XXXXXXXX,X_______, + XX_____X,XX______, + XX______,XX______, + XX______,XX______, + XXXXXXXX,X_______, + XXXXXXXX,________, + ________,________, + ________,________ + // 0xF8 - ø + , + 10, + ________,________, + ________,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XX______,________, + XXXXXXX_,________, + XXXXXXXX,________, + XX____XX,X_______, + XX_____X,X_______, + XX____XX,X_______, + XXXXXXXX,________, + XXXXXXX_,________, + ________,________, + ________,________ + // 0xF9 - ù + , + 13, + ________,________, + ________,________, + XX______,__XX____, + XX______,__XX____, + XX______,__XX____, + XX______,__XX____, + XX______,__XX____, + XXXXXXX_,__XX____, + XXXXXXXX,__XX____, + XX____XX,X_XX____, + XX_____X,X_XX____, + XX____XX,X_XX____, + XXXXXXXX,__XX____, + XXXXXXX_,__XX____, + ________,________, + ________,________ + // 0xFA - ú + , + 9, + ________,________, + ________,________, + __XXXXX_,________, + _XXXXXXX,________, + XX____XX,________, + ______XX,________, + ___XXXX_,________, + ___XXXX_,________, + _____XXX,________, + ______XX,________, + XX____XX,________, + XXX__XXX,________, + _XXXXXX_,________, + __XXXX__,________, + ________,________, + ________,________ + // 0xFB - û + , + 13, + ________,________, + ________,________, + XX___XX_,__XX____, + XX___XX_,__XX____, + XX___XX_,__XX____, + XX___XX_,__XX____, + XX___XX_,__XX____, + XX___XX_,__XX____, + XX___XX_,__XX____, + XX___XX_,__XX____, + XX___XX_,__XX____, + XX___XX_,__XX____, + XXXXXXXX,XXXX____, + XXXXXXXX,XXXX____, + ________,________, + ________,________ + // 0xFC - ü + , + 11, + ________,________, + ________,________, + ___XXXX_,________, + _XXXXXXX,X_______, + XXX____X,X_______, + XX______,XX______, + ________,XX______, + ____XXXX,XX______, + ____XXXX,XX______, + ________,XX______, + XX______,XX______, + XXX____X,X_______, + _XXXXXXX,X_______, + ___XXXX_,________, + ________,________, + ________,________ + // 0xFD - ý + , + 14, + ________,________, + ________,________, + XX___XX_,__XX____, + XX___XX_,__XX____, + XX___XX_,__XX____, + XX___XX_,__XX____, + XX___XX_,__XX____, + XX___XX_,__XX____, + XX___XX_,__XX____, + XX___XX_,__XX____, + XX___XX_,__XX____, + XX___XX_,__XX____, + XXXXXXXX,XXXXX___, + XXXXXXXX,XXXXX___, + ________,___XX___, + ________,___XX___ + // 0xFE - þ + , + 11, + ________,________, + ________,________, + XX______,XX______, + XX______,XX______, + XX______,XX______, + XX______,XX______, + XX______,XX______, + XXX_____,XX______, + _XXXXXXX,XX______, + __XXXXXX,XX______, + ________,XX______, + ________,XX______, + ________,XX______, + ________,XX______, + ________,________, + ________,________ + // 0xFF - ÿ + , + 12, + ________,________, + ________,________, + XXXX____,________, + XXXX____,________, + __XX____,________, + __XX____,________, + __XX____,________, + __XXXXXX,X_______, + __XXXXXX,XX______, + __XX____,XXX_____, + __XX____,_XX_____, + __XX____,XXX_____, + __XXXXXX,XX______, + __XXXXXX,X_______, + ________,________, + ________,________ +}; + +/* +32 (0x20) - 64 (0x40) - @ 96 (0x60) - ` 128 (0x80) - € 160 (0xa0) -   192 (0xc0) - À 224 (0xe0) - à +33 (0x21) - ! 65 (0x41) - A 97 (0x61) - a 129 (0x81) - 161 (0xa1) - ¡ 193 (0xc1) - Á 225 (0xe1) - á +34 (0x22) - " 66 (0x42) - B 98 (0x62) - b 130 (0x82) - ‚ 162 (0xa2) - ¢ 194 (0xc2) -  226 (0xe2) - â +35 (0x23) - # 67 (0x43) - C 99 (0x63) - c 131 (0x83) - ƒ 163 (0xa3) - £ 195 (0xc3) - à 227 (0xe3) - ã +36 (0x24) - $ 68 (0x44) - D 100 (0x64) - d 132 (0x84) - „ 164 (0xa4) - ¤ 196 (0xc4) - Ä 228 (0xe4) - ä +37 (0x25) - % 69 (0x45) - E 101 (0x65) - e 133 (0x85) - … 165 (0xa5) - ¥ 197 (0xc5) - Å 229 (0xe5) - å +38 (0x26) - & 70 (0x46) - F 102 (0x66) - f 134 (0x86) - † 166 (0xa6) - ¦ 198 (0xc6) - Æ 230 (0xe6) - æ +39 (0x27) - ' 71 (0x47) - G 103 (0x67) - g 135 (0x87) - ‡ 167 (0xa7) - § 199 (0xc7) - Ç 231 (0xe7) - ç +40 (0x28) - ( 72 (0x48) - H 104 (0x68) - h 136 (0x88) - ˆ 168 (0xa8) - ¨ 200 (0xc8) - È 232 (0xe8) - è +41 (0x29) - ) 73 (0x49) - I 105 (0x69) - i 137 (0x89) - ‰ 169 (0xa9) - © 201 (0xc9) - É 233 (0xe9) - é +42 (0x2a) - * 74 (0x4a) - J 106 (0x6a) - j 138 (0x8a) - Š 170 (0xaa) - ª 202 (0xca) - Ê 234 (0xea) - ê +43 (0x2b) - + 75 (0x4b) - K 107 (0x6b) - k 139 (0x8b) - ‹ 171 (0xab) - « 203 (0xcb) - Ë 235 (0xeb) - ë +44 (0x2c) - , 76 (0x4c) - L 108 (0x6c) - l 140 (0x8c) - Œ 172 (0xac) - ¬ 204 (0xcc) - Ì 236 (0xec) - ì +45 (0x2d) - - 77 (0x4d) - M 109 (0x6d) - m 141 (0x8d) - 173 (0xad) - ­ 205 (0xcd) - Í 237 (0xed) - í +46 (0x2e) - . 78 (0x4e) - N 110 (0x6e) - n 142 (0x8e) - Ž 174 (0xae) - ® 206 (0xce) - Î 238 (0xee) - î +47 (0x2f) - / 79 (0x4f) - O 111 (0x6f) - o 143 (0x8f) - 175 (0xaf) - ¯ 207 (0xcf) - Ï 239 (0xef) - ï +48 (0x30) - 0 80 (0x50) - P 112 (0x70) - p 144 (0x90) - 176 (0xb0) - ° 208 (0xd0) - Ð 240 (0xf0) - ð +49 (0x31) - 1 81 (0x51) - Q 113 (0x71) - q 145 (0x91) - ‘ 177 (0xb1) - ± 209 (0xd1) - Ñ 241 (0xf1) - ñ +50 (0x32) - 2 82 (0x52) - R 114 (0x72) - r 146 (0x92) - ’ 178 (0xb2) - ² 210 (0xd2) - Ò 242 (0xf2) - ò +51 (0x33) - 3 83 (0x53) - S 115 (0x73) - s 147 (0x93) - “ 179 (0xb3) - ³ 211 (0xd3) - Ó 243 (0xf3) - ó +52 (0x34) - 4 84 (0x54) - T 116 (0x74) - t 148 (0x94) - ” 180 (0xb4) - ´ 212 (0xd4) - Ô 244 (0xf4) - ô +53 (0x35) - 5 85 (0x55) - U 117 (0x75) - u 149 (0x95) - • 181 (0xb5) - µ 213 (0xd5) - Õ 245 (0xf5) - õ +54 (0x36) - 6 86 (0x56) - V 118 (0x76) - v 150 (0x96) - – 182 (0xb6) - ¶ 214 (0xd6) - Ö 246 (0xf6) - ö +55 (0x37) - 7 87 (0x57) - W 119 (0x77) - w 151 (0x97) - — 183 (0xb7) - · 215 (0xd7) - × 247 (0xf7) - ÷ +56 (0x38) - 8 88 (0x58) - X 120 (0x78) - x 152 (0x98) - ˜ 184 (0xb8) - ¸ 216 (0xd8) - Ø 248 (0xf8) - ø +57 (0x39) - 9 89 (0x59) - Y 121 (0x79) - y 153 (0x99) - ™ 185 (0xb9) - ¹ 217 (0xd9) - Ù 249 (0xf9) - ù +58 (0x3a) - : 90 (0x5a) - Z 122 (0x7a) - z 154 (0x9a) - 186 (0xba) - º 218 (0xda) - Ú 250 (0xfa) - ú +59 (0x3b) - ; 91 (0x5b) - [ 123 (0x7b) - { 155 (0x9b) - › 187 (0xbb) - » 219 (0xdb) - Û 251 (0xfb) - û +60 (0x3c) - < 92 (0x5c) - \ 124 (0x7c) - | 156 (0x9c) - œ 188 (0xbc) - ¼ 220 (0xdc) - Ü 252 (0xfc) - ü +61 (0x3d) - = 93 (0x5d) - ] 125 (0x7d) - } 157 (0x9d) - 189 (0xbd) - ½ 221 (0xdd) - Ý 253 (0xfd) - ý +62 (0x3e) - > 94 (0x5e) - ^ 126 (0x7e) - ~ 158 (0x9e) - ž 190 (0xbe) - ¾ 222 (0xde) - Þ 254 (0xfe) - þ +63 (0x3f) - ? 95 (0x5f) - _ 127 (0x7f) - 159 (0x9f) - Ÿ 191 (0xbf) - ¿ 223 (0xdf) - ß 255 (0xff) - ÿ +*/ diff --git a/F1-nolib/RGB_LED_Screen/fonts.c b/F1-nolib/RGB_LED_Screen/fonts.c new file mode 100644 index 0000000..6b32759 --- /dev/null +++ b/F1-nolib/RGB_LED_Screen/fonts.c @@ -0,0 +1,330 @@ +/* + * This file is part of the LED_screen project. + * Copyright 2019 Edward V. Emelianov + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include +#include "fonts.h" + +/* Bash-script to generate the symbols + +#!/bin/bash + +function bits(){ + Ans="" + for x in $(seq 7 -1 0); do + B=$((1<<$x)) + if [ $(($1&$B)) -ne 0 ]; then Ans="${Ans}X" + else Ans="${Ans}_" + fi + done + echo $Ans +} + +for x in $(seq 0 255); do + printf "#define $(bits $x)\t0x%02x\n" $x +done + +*/ + +#define ________ 0x00 +#define _______X 0x01 +#define ______X_ 0x02 +#define ______XX 0x03 +#define _____X__ 0x04 +#define _____X_X 0x05 +#define _____XX_ 0x06 +#define _____XXX 0x07 +#define ____X___ 0x08 +#define ____X__X 0x09 +#define ____X_X_ 0x0a +#define ____X_XX 0x0b +#define ____XX__ 0x0c +#define ____XX_X 0x0d +#define ____XXX_ 0x0e +#define ____XXXX 0x0f +#define ___X____ 0x10 +#define ___X___X 0x11 +#define ___X__X_ 0x12 +#define ___X__XX 0x13 +#define ___X_X__ 0x14 +#define ___X_X_X 0x15 +#define ___X_XX_ 0x16 +#define ___X_XXX 0x17 +#define ___XX___ 0x18 +#define ___XX__X 0x19 +#define ___XX_X_ 0x1a +#define ___XX_XX 0x1b +#define ___XXX__ 0x1c +#define ___XXX_X 0x1d +#define ___XXXX_ 0x1e +#define ___XXXXX 0x1f +#define __X_____ 0x20 +#define __X____X 0x21 +#define __X___X_ 0x22 +#define __X___XX 0x23 +#define __X__X__ 0x24 +#define __X__X_X 0x25 +#define __X__XX_ 0x26 +#define __X__XXX 0x27 +#define __X_X___ 0x28 +#define __X_X__X 0x29 +#define __X_X_X_ 0x2a +#define __X_X_XX 0x2b +#define __X_XX__ 0x2c +#define __X_XX_X 0x2d +#define __X_XXX_ 0x2e +#define __X_XXXX 0x2f +#define __XX____ 0x30 +#define __XX___X 0x31 +#define __XX__X_ 0x32 +#define __XX__XX 0x33 +#define __XX_X__ 0x34 +#define __XX_X_X 0x35 +#define __XX_XX_ 0x36 +#define __XX_XXX 0x37 +#define __XXX___ 0x38 +#define __XXX__X 0x39 +#define __XXX_X_ 0x3a +#define __XXX_XX 0x3b +#define __XXXX__ 0x3c +#define __XXXX_X 0x3d +#define __XXXXX_ 0x3e +#define __XXXXXX 0x3f +#define _X______ 0x40 +#define _X_____X 0x41 +#define _X____X_ 0x42 +#define _X____XX 0x43 +#define _X___X__ 0x44 +#define _X___X_X 0x45 +#define _X___XX_ 0x46 +#define _X___XXX 0x47 +#define _X__X___ 0x48 +#define _X__X__X 0x49 +#define _X__X_X_ 0x4a +#define _X__X_XX 0x4b +#define _X__XX__ 0x4c +#define _X__XX_X 0x4d +#define _X__XXX_ 0x4e +#define _X__XXXX 0x4f +#define _X_X____ 0x50 +#define _X_X___X 0x51 +#define _X_X__X_ 0x52 +#define _X_X__XX 0x53 +#define _X_X_X__ 0x54 +#define _X_X_X_X 0x55 +#define _X_X_XX_ 0x56 +#define _X_X_XXX 0x57 +#define _X_XX___ 0x58 +#define _X_XX__X 0x59 +#define _X_XX_X_ 0x5a +#define _X_XX_XX 0x5b +#define _X_XXX__ 0x5c +#define _X_XXX_X 0x5d +#define _X_XXXX_ 0x5e +#define _X_XXXXX 0x5f +#define _XX_____ 0x60 +#define _XX____X 0x61 +#define _XX___X_ 0x62 +#define _XX___XX 0x63 +#define _XX__X__ 0x64 +#define _XX__X_X 0x65 +#define _XX__XX_ 0x66 +#define _XX__XXX 0x67 +#define _XX_X___ 0x68 +#define _XX_X__X 0x69 +#define _XX_X_X_ 0x6a +#define _XX_X_XX 0x6b +#define _XX_XX__ 0x6c +#define _XX_XX_X 0x6d +#define _XX_XXX_ 0x6e +#define _XX_XXXX 0x6f +#define _XXX____ 0x70 +#define _XXX___X 0x71 +#define _XXX__X_ 0x72 +#define _XXX__XX 0x73 +#define _XXX_X__ 0x74 +#define _XXX_X_X 0x75 +#define _XXX_XX_ 0x76 +#define _XXX_XXX 0x77 +#define _XXXX___ 0x78 +#define _XXXX__X 0x79 +#define _XXXX_X_ 0x7a +#define _XXXX_XX 0x7b +#define _XXXXX__ 0x7c +#define _XXXXX_X 0x7d +#define _XXXXXX_ 0x7e +#define _XXXXXXX 0x7f +#define X_______ 0x80 +#define X______X 0x81 +#define X_____X_ 0x82 +#define X_____XX 0x83 +#define X____X__ 0x84 +#define X____X_X 0x85 +#define X____XX_ 0x86 +#define X____XXX 0x87 +#define X___X___ 0x88 +#define X___X__X 0x89 +#define X___X_X_ 0x8a +#define X___X_XX 0x8b +#define X___XX__ 0x8c +#define X___XX_X 0x8d +#define X___XXX_ 0x8e +#define X___XXXX 0x8f +#define X__X____ 0x90 +#define X__X___X 0x91 +#define X__X__X_ 0x92 +#define X__X__XX 0x93 +#define X__X_X__ 0x94 +#define X__X_X_X 0x95 +#define X__X_XX_ 0x96 +#define X__X_XXX 0x97 +#define X__XX___ 0x98 +#define X__XX__X 0x99 +#define X__XX_X_ 0x9a +#define X__XX_XX 0x9b +#define X__XXX__ 0x9c +#define X__XXX_X 0x9d +#define X__XXXX_ 0x9e +#define X__XXXXX 0x9f +#define X_X_____ 0xa0 +#define X_X____X 0xa1 +#define X_X___X_ 0xa2 +#define X_X___XX 0xa3 +#define X_X__X__ 0xa4 +#define X_X__X_X 0xa5 +#define X_X__XX_ 0xa6 +#define X_X__XXX 0xa7 +#define X_X_X___ 0xa8 +#define X_X_X__X 0xa9 +#define X_X_X_X_ 0xaa +#define X_X_X_XX 0xab +#define X_X_XX__ 0xac +#define X_X_XX_X 0xad +#define X_X_XXX_ 0xae +#define X_X_XXXX 0xaf +#define X_XX____ 0xb0 +#define X_XX___X 0xb1 +#define X_XX__X_ 0xb2 +#define X_XX__XX 0xb3 +#define X_XX_X__ 0xb4 +#define X_XX_X_X 0xb5 +#define X_XX_XX_ 0xb6 +#define X_XX_XXX 0xb7 +#define X_XXX___ 0xb8 +#define X_XXX__X 0xb9 +#define X_XXX_X_ 0xba +#define X_XXX_XX 0xbb +#define X_XXXX__ 0xbc +#define X_XXXX_X 0xbd +#define X_XXXXX_ 0xbe +#define X_XXXXXX 0xbf +#define XX______ 0xc0 +#define XX_____X 0xc1 +#define XX____X_ 0xc2 +#define XX____XX 0xc3 +#define XX___X__ 0xc4 +#define XX___X_X 0xc5 +#define XX___XX_ 0xc6 +#define XX___XXX 0xc7 +#define XX__X___ 0xc8 +#define XX__X__X 0xc9 +#define XX__X_X_ 0xca +#define XX__X_XX 0xcb +#define XX__XX__ 0xcc +#define XX__XX_X 0xcd +#define XX__XXX_ 0xce +#define XX__XXXX 0xcf +#define XX_X____ 0xd0 +#define XX_X___X 0xd1 +#define XX_X__X_ 0xd2 +#define XX_X__XX 0xd3 +#define XX_X_X__ 0xd4 +#define XX_X_X_X 0xd5 +#define XX_X_XX_ 0xd6 +#define XX_X_XXX 0xd7 +#define XX_XX___ 0xd8 +#define XX_XX__X 0xd9 +#define XX_XX_X_ 0xda +#define XX_XX_XX 0xdb +#define XX_XXX__ 0xdc +#define XX_XXX_X 0xdd +#define XX_XXXX_ 0xde +#define XX_XXXXX 0xdf +#define XXX_____ 0xe0 +#define XXX____X 0xe1 +#define XXX___X_ 0xe2 +#define XXX___XX 0xe3 +#define XXX__X__ 0xe4 +#define XXX__X_X 0xe5 +#define XXX__XX_ 0xe6 +#define XXX__XXX 0xe7 +#define XXX_X___ 0xe8 +#define XXX_X__X 0xe9 +#define XXX_X_X_ 0xea +#define XXX_X_XX 0xeb +#define XXX_XX__ 0xec +#define XXX_XX_X 0xed +#define XXX_XXX_ 0xee +#define XXX_XXXX 0xef +#define XXXX____ 0xf0 +#define XXXX___X 0xf1 +#define XXXX__X_ 0xf2 +#define XXXX__XX 0xf3 +#define XXXX_X__ 0xf4 +#define XXXX_X_X 0xf5 +#define XXXX_XX_ 0xf6 +#define XXXX_XXX 0xf7 +#define XXXXX___ 0xf8 +#define XXXXX__X 0xf9 +#define XXXXX_X_ 0xfa +#define XXXXX_XX 0xfb +#define XXXXXX__ 0xfc +#define XXXXXX_X 0xfd +#define XXXXXXX_ 0xfe +#define XXXXXXXX 0xff + +// here are fonts themself +#include "font14.h" +#include "font16.h" + +static const afont FONTS[] = { + [FONT14] = {font14_table, FONT14HEIGHT, FONT14BYTES, FONT14BASELINE}, + [FONT16] = {font16_table, FONT16HEIGHT, FONT16BYTES, FONT16BASELINE} +}; + +const afont *curfont = &FONTS[FONT14]; + +/** + * @brief choose_font - font selector + * @param newfont - font to choose + * @return 0 if all OK + */ +int choose_font(font_t newfont){ + if(newfont >= FONT_T_MAX || newfont <= FONT_T_MIN) return 1; + curfont = &FONTS[newfont]; + return 0; +} +/* +// getters for current font values +uint8_t fontheight(){return curfont->height;} +uint8_t fontbaseline(){return curfont->baseline;} +uint8_t fontbytes(){return curfont->bytes;} +*/ + +const uint8_t *font_char(uint8_t Char){ + if(Char < FIRST_SYMBOL_CODE) return NULL; + return &curfont->font[(Char - FIRST_SYMBOL_CODE)*(curfont->bytes+1)]; +} diff --git a/F1-nolib/RGB_LED_Screen/fonts.h b/F1-nolib/RGB_LED_Screen/fonts.h new file mode 100644 index 0000000..1fe7705 --- /dev/null +++ b/F1-nolib/RGB_LED_Screen/fonts.h @@ -0,0 +1,56 @@ +/* + * This file is part of the LED_screen project. + * Copyright 2019 Edward V. Emelianov + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once +#ifndef FONTS_H__ +#define FONTS_H__ + +#include + +// code number of first symbol in font table +#define FIRST_SYMBOL_CODE 32 +// total amount of symbols - all without first 32 +#define SYMBOLS_AMOUNT (256-FIRST_SYMBOL_CODE) + +// type for font choosing +typedef enum{ + FONT_T_MIN = -1, // no fonts <= this + FONT14, // 16x16, font height near 14px + FONT16, // 16x16, font height 16px + FONT_T_MAX // no fonts >= this +} font_t; + +int choose_font(font_t newfont); +/* uint8_t fontheight(); +uint8_t fontbaseline(); +uint8_t fontbytes(); */ +const uint8_t *font_char(uint8_t Char); + + +typedef struct{ + const uint8_t *font;// font inself + uint8_t height; // full font matrix height + uint8_t bytes; // amount of bytes in font matrix + uint8_t baseline; // baseline position (coordinate from bottom line) +} afont; + +extern const afont *curfont; + +char *u2str(uint32_t val); + +#endif // FONTS_H__ diff --git a/F1-nolib/RGB_LED_Screen/hardware.c b/F1-nolib/RGB_LED_Screen/hardware.c new file mode 100644 index 0000000..17d0ded --- /dev/null +++ b/F1-nolib/RGB_LED_Screen/hardware.c @@ -0,0 +1,162 @@ +/* + * geany_encoding=koi8-r + * hardware.c - hardware-dependent macros & functions + * + * Copyright 2018 Edward V. Emelianov + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + * + */ + +#include "hardware.h" +#include "usb.h" + +uint8_t transfer_done = 0; // ==1 when DMA transfer ready +// buffer for DMA +static uint32_t dmabuf[SCREEN_WIDTH]; + +static inline void gpio_setup(){ + // Enable clocks to the GPIO subsystems, turn on AFIO clocking to disable SWD/JTAG + RCC->APB2ENR |= RCC_APB2ENR_IOPAEN | RCC_APB2ENR_IOPBEN | RCC_APB2ENR_IOPCEN | RCC_APB2ENR_AFIOEN; + // turn off JTAG (PB3/4 is in use) + AFIO->MAPR = AFIO_MAPR_SWJ_CFG_JTAGDISABLE; + // turn off USB pullup + USBPU_OFF(); + // Set led as opendrain output + GPIOC->CRH = CRH(13, CNF_ODOUTPUT|MODE_SLOW); + // SCREEN color PINs: PA0..PA5 + GPIOA->CRL = CRL(0, CNF_PPOUTPUT|MODE_FAST) | CRL(1, CNF_PPOUTPUT|MODE_FAST) | CRL(2, CNF_PPOUTPUT|MODE_FAST) | + CRL(3, CNF_PPOUTPUT|MODE_FAST) | CRL(4, CNF_PPOUTPUT|MODE_FAST) | CRL(5, CNF_PPOUTPUT|MODE_FAST); + // USB pullup - opendrain output + GPIOA->CRH = CRH(15, CNF_PPOUTPUT|MODE_SLOW); + // A..D, LAT, nOE: PB4..PB9 + GPIOB->CRL = CRL(4, CNF_PPOUTPUT|MODE_FAST) | CRL(5, CNF_PPOUTPUT|MODE_FAST) | CRL(6, CNF_PPOUTPUT|MODE_FAST) | CRL(7, CNF_PPOUTPUT|MODE_FAST); + GPIOB->CRH = CRH(8, CNF_PPOUTPUT|MODE_FAST) | CRH(9, CNF_PPOUTPUT|MODE_FAST); +} + +// setup timer3 for DMA transfers & SCK @ TIM3_CH1 (PA6) +static inline void tim_setup(){ + SET(nOE); // turn off output + GPIOA->CRL |= CRL(6, CNF_AFPP|MODE_FAST); + RCC->APB1ENR |= RCC_APB1ENR_TIM3EN; + // 72MHz & 7ARR = 9MHz + TIM3->PSC = 20000; + TIM3->ARR = 7; + TIM3->CCMR1 = TIM_CCMR1_OC1M; // PWM mode 2 (inactive->active) + TIM3->CCER = TIM_CCER_CC1E; // output 1 enable + TIM3->DIER = TIM_DIER_UDE; // enable DMA requests + RCC->AHBENR |= RCC_AHBENR_DMA1EN; + // memsize 32bit, periphsize 32bit, memincr, mem2periph, full transfer interrupt + DMA1_Channel3->CCR = DMA_CCR_PSIZE_1 | DMA_CCR_MSIZE_1 | DMA_CCR_MINC | DMA_CCR_DIR | DMA_CCR_TCIE; + DMA1_Channel3->CMAR = (uint32_t)dmabuf; + DMA1_Channel3->CPAR = (uint32_t)&GPIOA->BSRR; + NVIC_EnableIRQ(DMA1_Channel3_IRQn); +} + +void hw_setup(){ + gpio_setup(); + tim_setup(); +} + +void stopTIMDMA(){ + DMA1_Channel3->CCR &= ~DMA_CCR_EN; // stop DMA + TIM3->CR1 = 0; // turn off timer +} + +/* +static inline uint8_t getcolrvals(uint8_t colr, uint8_t Ntick){ + uint8_t *rgb = pack2RGB(colr); + uint8_t result = 0; // bits: 0-R, 1-G, 2-B + for(int i = 0; i < 3; ++i){ +#ifdef SCREEN_IS_NEGATIVE + if(rgb[i] < Ntick) result |= 1 << i; +#else + if(rgb[i] >= Ntick) result |= 1 << i; +#endif + } + return result; +}*/ +static inline uint8_t getcolrvals(uint8_t colr, uint8_t Ntick){ + uint8_t result = 0; // bits: 0-R, 1-G, 2-B +#ifdef SCREEN_IS_NEGATIVE + if(colr >> 5 <= Ntick) result = 1; + colr &= 0x1f; + if(colr >> 2 <= Ntick) result |= 2; + colr &= 3; + if(colr) colr = (colr << 1) + 1; + if(colr <= Ntick) result |= 4; +#else + if(colr >> 5 > Ntick) result = 1; + colr &= 0x1f; + if(colr >> 2 > Ntick) result |= 2; + colr &= 3; + if(colr) colr = (colr << 1) + 1; + if(colr > Ntick) result |= 4; +#endif + return result; +} +/** + * @brief ConvertScreenBuf - convert creen buffer into DMA buffer + * @param sbuf - screen buffer + * @param Nrow - current row number + * @param Ntick - tick number (0..7) for quasi-PWM colors + */ +void ConvertScreenBuf(uint8_t *sbuf, uint8_t Nrow, __attribute__((unused)) uint8_t Ntick){ + //USB_send("ConvertScreenBuf\n"); + uint8_t *_1st = &sbuf[SCREEN_WIDTH*Nrow], *_2nd = _1st + SCREEN_WIDTH*NBLOCKS; // first and second lines + for(int i = 0; i < SCREEN_WIDTH; ++i){ // ~50us for 64 pixels + uint8_t pinsset = getcolrvals(_1st[i], 0); + pinsset |= getcolrvals(_2nd[i], 0) << 3; + //dmabuf[i] = (i%2) ? ((COLR_pin<<16) | i) : (0b100010); + dmabuf[i] = (COLR_pin << 16) | pinsset; // All BR are 1, BS depending on color + } +} + + +static uint8_t blknum_curr = 0; +/** + * @brief TIM_DMA_transfer - start DMA transfer + * @param buf - buffer with data for GPIOA->BSRR + * @param blknum - number of active block + */ +void TIM_DMA_transfer(uint8_t blknum){ + //USB_send("TIM_DMA_transfer\n"); + TIM3->CR1 = 0; // turn off timer + transfer_done = 0; + // set first pixel color + COLR_port->BSRR = dmabuf[0]; + DMA1_Channel3->CNDTR = SCREEN_WIDTH; + DMA1_Channel3->CCR |= DMA_CCR_EN; // start DMA + TIM3->CCR1 = 4; // 50% PWM + TIM3->CR1 = TIM_CR1_CEN; // turn on timer + blknum_curr = blknum; +} + +// DMA transfer complete - stop transfer +void dma1_channel3_isr(){ + TIM3->CR1 |= TIM_CR1_OPM; // set one pulse mode to turn off timer after last CLK pulse + DMA1_Channel3->CCR &= ~DMA_CCR_EN; // stop DMA + while(TIM3->CNT < 7); + SET(nOE); // clear main output + ADDR_port->ODR = (ADDR_port->ODR & ~(ADDR_pin)) | (blknum_curr << ADDR_roll); // set address + SET(LAT); // activate latch + DMA1->IFCR = DMA_IFCR_CGIF3; + transfer_done = 1; + CLEAR(LAT); + CLEAR(nOE); // activate main output + //USB_send("transfer done\n"); +} + diff --git a/F1-nolib/RGB_LED_Screen/hardware.h b/F1-nolib/RGB_LED_Screen/hardware.h new file mode 100644 index 0000000..c6fa097 --- /dev/null +++ b/F1-nolib/RGB_LED_Screen/hardware.h @@ -0,0 +1,72 @@ +/* + * geany_encoding=koi8-r + * hardware.h + * + * Copyright 2018 Edward V. Emelianov + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + * + */ +#pragma once +#ifndef __HARDWARE_H__ +#define __HARDWARE_H__ + +#include "stm32f1.h" +#include "screen.h" + +// define this if screen is negative +// #define SCREEN_IS_NEGATIVE + +// LED0 - PC13 (bluepill), blinking each second +#define LED0_port GPIOC +#define LED0_pin (1<<13) + +// USB pullup (not present in bluepill) - PA15 +#define USBPU_port GPIOA +#define USBPU_pin (1<<15) +#define USBPU_ON() pin_set(USBPU_port, USBPU_pin) +#define USBPU_OFF() pin_clear(USBPU_port, USBPU_pin) + +#define LED_blink(x) pin_toggle(x ## _port, x ## _pin) +#define LED_on(x) pin_clear(x ## _port, x ## _pin) +#define LED_off(x) pin_set(x ## _port, x ## _pin) + +// SPI DMA channel +#define DMA_SPI_Channel DMA1_Channel3 +// SCREEN PINs: A,B,C,D - PB6-PB9; LAT - PB5; nOE - PB4 +// CLK - PA6 (TIM3_CH1) +// colors: PA0..PA5 +#define COLR_port GPIOA +#define COLR_pin (0x3f) +#define ADDR_port GPIOB +#define ADDR_roll (6) +#define ADDR_pin (0xf< + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include "fonts.h" +#include "hardware.h" +#include "proto.h" +#include "screen.h" +#include "usb.h" +#include "usb_lib.h" + +volatile uint32_t Tms = 0; +uint8_t countms = 0; + +/* Called when systick fires */ +void sys_tick_handler(void){ + ++Tms; +} + +void iwdg_setup(){ + uint32_t tmout = 16000000; + /* Enable the peripheral clock RTC */ + /* (1) Enable the LSI (40kHz) */ + /* (2) Wait while it is not ready */ + RCC->CSR |= RCC_CSR_LSION; /* (1) */ + while((RCC->CSR & RCC_CSR_LSIRDY) != RCC_CSR_LSIRDY){if(--tmout == 0) break;} /* (2) */ + /* Configure IWDG */ + /* (1) Activate IWDG (not needed if done in option bytes) */ + /* (2) Enable write access to IWDG registers */ + /* (3) Set prescaler by 64 (1.6ms for each tick) */ + /* (4) Set reload value to have a rollover each 2s */ + /* (5) Check if flags are reset */ + /* (6) Refresh counter */ + IWDG->KR = IWDG_START; /* (1) */ + IWDG->KR = IWDG_WRITE_ACCESS; /* (2) */ + IWDG->PR = IWDG_PR_PR_1; /* (3) */ + IWDG->RLR = 1250; /* (4) */ + tmout = 16000000; + while(IWDG->SR){if(--tmout == 0) break;} /* (5) */ + IWDG->KR = IWDG_REFRESH; /* (6) */ +} + +#define USBBUFSZ (127) +// usb getline +static char *get_USB(){ + static char tmpbuf[USBBUFSZ+1], *curptr = tmpbuf; + static int rest = USBBUFSZ; + int x = USB_receive(curptr); + curptr[x] = 0; + if(!x) return NULL; + if(curptr[x-1] == '\n'){ + curptr = tmpbuf; + rest = USBBUFSZ; + return tmpbuf; + } + curptr += x; rest -= x; + if(rest <= 0){ // buffer overflow + curptr = tmpbuf; + rest = USBBUFSZ; + USB_send("USB buffer overflow\n"); + } + return NULL; +} + +int main(void){ + uint32_t lastT = 0, mscnt = 0, Tmscnt = 0; + sysreset(); + StartHSE(); + SysTick_Config(72000); + RCC->CSR |= RCC_CSR_RMVF; // remove reset flags + + hw_setup(); + USBPU_OFF(); + USB_setup(); + PutStringAt(5, SCREEN_HEIGHT-1-curfont->baseline, "Test string"); + iwdg_setup(); + USBPU_ON(); + + while(1){ + IWDG->KR = IWDG_REFRESH; // refresh watchdog + if(Tms - lastT > 499){ + LED_blink(LED0); + lastT = Tms; + } + if(countms){ + if(!Tmscnt){ + Tmscnt = Tms; + if(!Tmscnt) Tmscnt = 1; + }else{ + if(Tms - Tmscnt > 99){ + Tmscnt = Tms; + ClearScreen(); + PutStringAt(5, SCREEN_HEIGHT-1-curfont->baseline, u2str(++mscnt)); + ScreenON(); + } + } + }else{ + mscnt = 0; + Tmscnt = 0; + } + IWDG->KR = IWDG_REFRESH; + process_screen(); + usb_proc(); + char *txt; const char *ans; + if((txt = get_USB())){ + ans = parse_cmd(txt); + if(ans) USB_send(ans); + } + } + return 0; +} + diff --git a/F1-nolib/RGB_LED_Screen/proto.c b/F1-nolib/RGB_LED_Screen/proto.c new file mode 100644 index 0000000..d1123d1 --- /dev/null +++ b/F1-nolib/RGB_LED_Screen/proto.c @@ -0,0 +1,258 @@ +/* + * This file is part of the RGBLEDscreen project. + * Copyright 2020 Edward V. Emelianov . + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "fonts.h" +#include "proto.h" +#include "screen.h" +#include "usb.h" + +extern uint8_t countms; + +char *omit_spaces(const char *buf){ + while(*buf){ + if(*buf > ' ') break; + ++buf; + } + return (char*)buf; +} + +// In case of overflow return `buf` and N==0xffffffff +// read decimal number & return pointer to next non-number symbol +static char *getdec(const char *buf, uint32_t *N){ + char *start = (char*)buf; + uint32_t num = 0; + while(*buf){ + char c = *buf; + if(c < '0' || c > '9'){ + break; + } + if(num > 429496729 || (num == 429496729 && c > '5')){ // overflow + *N = 0xffffff; + return start; + } + num *= 10; + num += c - '0'; + ++buf; + } + *N = num; + return (char*)buf; +} +// read hexadecimal number (without 0x prefix!) +static char *gethex(const char *buf, uint32_t *N){ + char *start = (char*)buf; + uint32_t num = 0; + while(*buf){ + char c = *buf; + uint8_t M = 0; + if(c >= '0' && c <= '9'){ + M = '0'; + }else if(c >= 'A' && c <= 'F'){ + M = 'A' - 10; + }else if(c >= 'a' && c <= 'f'){ + M = 'a' - 10; + } + if(M){ + if(num & 0xf0000000){ // overflow + *N = 0xffffff; + return start; + } + num <<= 4; + num += c - M; + }else{ + break; + } + ++buf; + } + *N = num; + return (char*)buf; +} +// read octal number (without 0 prefix!) +static char *getoct(const char *buf, uint32_t *N){ + char *start = (char*)buf; + uint32_t num = 0; + while(*buf){ + char c = *buf; + if(c < '0' || c > '7'){ + break; + } + if(num & 0xe0000000){ // overflow + *N = 0xffffff; + return start; + } + num <<= 3; + num += c - '0'; + ++buf; + } + *N = num; + return (char*)buf; +} +// read binary number (without b prefix!) +static char *getbin(const char *buf, uint32_t *N){ + char *start = (char*)buf; + uint32_t num = 0; + while(*buf){ + char c = *buf; + if(c < '0' || c > '1'){ + break; + } + if(num & 0x80000000){ // overflow + *N = 0xffffff; + return start; + } + num <<= 1; + if(c == '1') num |= 1; + ++buf; + } + *N = num; + return (char*)buf; +} + +/** + * @brief getnum - read uint32_t from string (dec, hex or bin: 127, 0x7f, 0b1111111) + * @param buf - buffer with number and so on + * @param N - the number read + * @return pointer to first non-number symbol in buf + * (if it is == buf, there's no number or if *N==0xffffffff there was overflow) + */ +char *getnum(const char *txt, uint32_t *N){ + char *nxt = NULL; + char *s = omit_spaces(txt); + if(*s == '0'){ // hex, oct or 0 + if(s[1] == 'x' || s[1] == 'X'){ // hex + nxt = gethex(s+2, N); + if(nxt == s+2) nxt = (char*)txt; + }else if(s[1] > '0'-1 && s[1] < '8'){ // oct + nxt = getoct(s+1, N); + if(nxt == s+1) nxt = (char*)txt; + }else{ // 0 + nxt = s+1; + *N = 0; + } + }else if(*s == 'b' || *s == 'B'){ + nxt = getbin(s+1, N); + if(nxt == s+1) nxt = (char*)txt; + }else{ + nxt = getdec(s, N); + if(nxt == s) nxt = (char*)txt; + } + return nxt; +} + +const char* helpmsg = + "'0/1' - screen off/on\n" + "'2,3' - select font\n" + "'C' - clear screen with given color\n" + "'F' - set foreground color\n" + "'f' - get FPS\n" + "'R' - software reset\n" + "'W' - test watchdog\n" + "'Zz' -start/stop counting ms\n" + "Any text - put text @ screen\n" +; + +const char *parse_cmd(const char *buf){ + uint32_t N; + if(buf[1] == '\n'){ // one symbol commands + switch(*buf){ + case '0': + ScreenOFF(); + return "OFF\n"; + break; + case '1': + ScreenON(); + return "ON\n"; + break; + case '2': + choose_font(FONT14); + return "Font14\n"; + break; + case '3': + choose_font(FONT16); + return "Font16\n"; + break; + case 'f': + if(SCREEN_RELAX == getScreenState()) return "Screen is inactive\n"; + USB_send("FPS="); + USB_send(u2str(getFPS())); + USB_send("\n"); + return NULL; + case 'R': + USB_send("Soft reset\n"); + NVIC_SystemReset(); + break; + case 'W': + USB_send("Wait for reboot\n"); + while(1){nop();}; + break; + case 'Z': + countms = 1; + return "Start\n"; + break; + case 'z': + countms = 0; + return "Stop\n"; + break; + default: + return helpmsg; + } + return NULL; + }else{ + switch(*buf){ + case 'C': + if(getnum(buf+1, &N)){ + ScreenOFF(); + setBGcolor(N); + ClearScreen(); + ScreenON(); + return "Background color\n"; + } + return "Wrong color\n"; + break; + case 'F': + if(getnum(buf+1, &N)){ + setFGcolor(N); + return "Foreground color\n"; + } + return "Wrong color\n"; + break; + default: + ScreenOFF(); + ClearScreen(); + PutStringAt(5, SCREEN_HEIGHT-1-curfont->baseline, buf); + ScreenON(); + } + return buf; + } + return NULL; +} + +// return string with number `val` +char *u2str(uint32_t val){ + static char strbuf[11]; + char *bufptr = &strbuf[10]; + *bufptr = 0; + if(!val){ + *(--bufptr) = '0'; + }else{ + while(val){ + *(--bufptr) = val % 10 + '0'; + val /= 10; + } + } + return bufptr; +} diff --git a/F1-nolib/RGB_LED_Screen/proto.h b/F1-nolib/RGB_LED_Screen/proto.h new file mode 100644 index 0000000..ff61e2c --- /dev/null +++ b/F1-nolib/RGB_LED_Screen/proto.h @@ -0,0 +1,31 @@ +/* + * This file is part of the RGBLEDscreen project. + * Copyright 2020 Edward V. Emelianov . + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once +#ifndef PROTO_H__ +#define PROTO_H__ + +#include + +const char *parse_cmd(const char *buf); +void printu(uint32_t val); +void printuhex(uint32_t val); +char *omit_spaces(const char *buf); +char *getnum(const char *buf, uint32_t *N); +char *u2str(uint32_t val); + +#endif // PROTO_H__ diff --git a/F1-nolib/RGB_LED_Screen/screen.c b/F1-nolib/RGB_LED_Screen/screen.c new file mode 100644 index 0000000..5638224 --- /dev/null +++ b/F1-nolib/RGB_LED_Screen/screen.c @@ -0,0 +1,200 @@ +/* + * This file is part of the LED_screen project. + * Copyright 2019 Edward V. Emelianov + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include // memset, memcpy +#include +#include "fonts.h" +#include "hardware.h" +#include "screen.h" +//#include "usb.h" + + +// !!!FOR LITTLE-ENDIAN!!! + +// X coordinate - from left to right! +// Y coordinate - from top to bottom! +// (0,0) is top left corner + +// all-screen buffer +static uint8_t screenbuf[SCREENBUF_SZ]; +extern volatile uint32_t Tms; // time for FPS count +static uint32_t FPS = 0, Tfps = 0; // approx FPS +uint32_t getFPS(){return FPS;} + +static uint8_t fgColor = 0xff, bgColor = 0; // foreground and background colors +void setBGcolor(uint8_t c){bgColor = c;} +void setFGcolor(uint8_t c){fgColor = c;} + +/** + * @brief FillScreen - fill screen buffer with current bgColor + */ +void ClearScreen(){ + for(int i = 0; i < SCREENBUF_SZ; ++i) + screenbuf[i] = bgColor; + for(int i = 0; i < 32; ++i){ + DrawPix(0,i,0b11111111); // white + DrawPix(27,i,0b11100000); // red + DrawPix(34,i,0b00011100); // green + DrawPix(63,i,0b00000011); // blue + } + // memset -> halt + //memset(screenbuf, pattern, SCREENBUF_SZ); +} + +/** + * @brief DrawPix - set or clear pixel + * @param X, Y - pixel coordinates (could be outside of screen) + * @param pix - == pixel color (RRRGGGBB) + */ +void DrawPix(int16_t X, int16_t Y, uint8_t pix){ + if(X < 0 || X > SCREEN_WIDTH-1 || Y < 0 || Y > SCREEN_HEIGHT-1) return; // outside of screen + // now calculate coordinate of pixel + screenbuf[Y*SCREEN_WIDTH + X] = pix; +} +void InvertPix(int16_t X, int16_t Y){ + if(X < 0 || X > SCREEN_WIDTH-1 || Y < 0 || Y > SCREEN_HEIGHT-1) return; // outside of screen + screenbuf[Y*SCREEN_WIDTH + X] = ~screenbuf[Y*SCREEN_WIDTH + X]; +} +void XORPix(int16_t X, int16_t Y, uint8_t pix){ + if(X < 0 || X > SCREEN_WIDTH-1 || Y < 0 || Y > SCREEN_HEIGHT-1) return; // outside of screen + screenbuf[Y*SCREEN_WIDTH + X] ^= pix; +} + +/** + * @brief DrawCharAt - draws character @ position X,Y (this point is left baseline corner of char!) + * character will be drawn with current fg and bg colors + * @param X, Y - started point + * @param Char - char to draw + * @return char width + */ +uint8_t DrawCharAt(int16_t X, int16_t Y, uint8_t Char){ + const uint8_t *curchar = font_char(Char); + if(!curchar) return 0; + // now change Y coordinate to left upper corner of font + Y += 1 - curfont->height + curfont->baseline; + // height and width of letter in pixels + uint8_t h = curfont->height, w = *curchar++; // now curchar is pointer to bits array + uint8_t lw = curfont->bytes / h; // width of letter in bytes + for(uint8_t row = 0; row <= h; ++row){ + for(uint8_t col = 0; col < w; ++col){ + if(curchar[row*lw + (col/8)] & (1 << (7 - (col%8)))) + DrawPix(X + col, Y + row, fgColor); + else + DrawPix(X + col, Y + row, bgColor); + } + } + return w; +} + +/** + * @brief PutStringAt - draw text string @ screen + * @param X, Y - base coordinates + * @param str - string to draw + * @return - text width in pixels + */ +uint8_t PutStringAt(int16_t X, int16_t Y, const char *str){ + if(!str) return 0; + int16_t Xold = X; + while(*str){ + X += DrawCharAt(X, Y, (uint8_t)*str++); + } + return X - Xold; +} + +uint8_t *getScreenBuf(){return screenbuf;} + +static screen_state ScrnState = SCREEN_RELAX; +screen_state getScreenState(){return ScrnState;} + +static uint8_t currentB = 0; // current block number +static uint8_t Ntick = 0; // tick number (0..7) for PWM color + +/** + * @brief process_screen - screen state machine processing + */ +void process_screen(){ + static uint32_t framecnt = 0; + switch(ScrnState){ + case SCREEN_ACTIVE: // transmission active + if(transfer_done){ + ScrnState = SCREEN_UPDATENXT; + }else return; + // fallthrough + case SCREEN_UPDATENXT: + ConvertScreenBuf(screenbuf, currentB, Ntick); // convert data + TIM_DMA_transfer(currentB); // start transfer + ScrnState = SCREEN_ACTIVE; + if(++currentB >= NBLOCKS){ + currentB = 0; // start again + if(++Ntick >= 7){ + Ntick = 0; + ++framecnt; + if(Tms - Tfps > 999){ + FPS = framecnt; + Tfps = Tms; + framecnt = 0; + } + } + } + break; + default: + return; + } +} + +/** + * @brief ShowScreen - turn on data transmission + */ +void ScreenON(){ + ScrnState = SCREEN_UPDATENXT; + Tfps = Tms; +} + +void ScreenOFF(){ + stopTIMDMA(); + SET(nOE); + ScrnState = SCREEN_RELAX; + currentB = 0; + Ntick = 0; +} + +/** + * @brief RGB2pack - convert RGB color to packed RRRGGGBB + * @param RGB - color (each in range 0..8) + * @return packed color + */ +uint8_t RGB2pack(const uint8_t *RGB){ + uint8_t b = RGB[2] & 7; + if(b) b = (b - 1) >> 1; + return ((RGB[0] & 7)<<5 | (RGB[1] & 7) << 2 | b); +} +/** + * @brief pack2RGB - convert packed color to array of RGB (0..8) + * @param pack - packed color + * @return RGB array + */ +uint8_t *pack2RGB(uint8_t pack){ + static uint8_t RGB[3]; + RGB[0] = pack >> 5; + RGB[1] = (pack & 0x1c) >> 2; + pack &= 3; + if(pack) RGB[2] = (pack<<1) + 1; + else RGB[2] = 0; + return RGB; +} + diff --git a/F1-nolib/RGB_LED_Screen/screen.c.autosave b/F1-nolib/RGB_LED_Screen/screen.c.autosave new file mode 100644 index 0000000..91859c5 --- /dev/null +++ b/F1-nolib/RGB_LED_Screen/screen.c.autosave @@ -0,0 +1,200 @@ +/* + * This file is part of the LED_screen project. + * Copyright 2019 Edward V. Emelianov + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include // memset, memcpy +#include +#include "fonts.h" +#include "hardware.h" +#include "screen.h" +//#include "usb.h" + + +// !!!FOR LITTLE-ENDIAN!!! + +// X coordinate - from left to right! +// Y coordinate - from top to bottom! +// (0,0) is top left corner + +// all-screen buffer +static uint8_t screenbuf[SCREENBUF_SZ]; +extern volatile uint32_t Tms; // time for FPS count +static uint32_t FPS = 0, Tfps = 0; // approx FPS +uint32_t getFPS(){return FPS;} + +static uint8_t fgColor = 0xff, bgColor = 0; // foreground and background colors +void setBGcolor(uint8_t c){bgColor = c;} +void setFGcolor(uint8_t c){fgColor = c;} + +/** + * @brief FillScreen - fill screen buffer with current bgColor + */ +void ClearScreen(){ + for(int i = 0; i < SCREENBUF_SZ; ++i) + screenbuf[i] = bgColor; + for(int i = 0; i < 32; ++i){ + DrawPix(0,i,0b11111111); // white + DrawPix(27,i,0b11100000); // red + DrawPix(34,i,0b00011100); // green + DrawPix(63,i,0b00000011); // blue + } - opendrain output + // memset -> halt + //memset(screenbuf, pattern, SCREENBUF_SZ); +} + +/** + * @brief DrawPix - set or clear pixel + * @param X, Y - pixel coordinates (could be outside of screen) + * @param pix - == pixel color (RRRGGGBB) + */ +void DrawPix(int16_t X, int16_t Y, uint8_t pix){ + if(X < 0 || X > SCREEN_WIDTH-1 || Y < 0 || Y > SCREEN_HEIGHT-1) return; // outside of screen + // now calculate coordinate of pixel + screenbuf[Y*SCREEN_WIDTH + X] = pix; +} +void InvertPix(int16_t X, int16_t Y){ + if(X < 0 || X > SCREEN_WIDTH-1 || Y < 0 || Y > SCREEN_HEIGHT-1) return; // outside of screen + screenbuf[Y*SCREEN_WIDTH + X] = ~screenbuf[Y*SCREEN_WIDTH + X]; +} +void XORPix(int16_t X, int16_t Y, uint8_t pix){ + if(X < 0 || X > SCREEN_WIDTH-1 || Y < 0 || Y > SCREEN_HEIGHT-1) return; // outside of screen + screenbuf[Y*SCREEN_WIDTH + X] ^= pix; +} + +/** + * @brief DrawCharAt - draws character @ position X,Y (this point is left baseline corner of char!) + * character will be drawn with current fg and bg colors + * @param X, Y - started point + * @param Char - char to draw + * @return char width + */ +uint8_t DrawCharAt(int16_t X, int16_t Y, uint8_t Char){ + const uint8_t *curchar = font_char(Char); + if(!curchar) return 0; + // now change Y coordinate to left upper corner of font + Y += 1 - curfont->height + curfont->baseline; + // height and width of letter in pixels + uint8_t h = curfont->height, w = *curchar++; // now curchar is pointer to bits array + uint8_t lw = curfont->bytes / h; // width of letter in bytes + for(uint8_t row = 0; row <= h; ++row){ + for(uint8_t col = 0; col < w; ++col){ + if(curchar[row*lw + (col/8)] & (1 << (7 - (col%8)))) + DrawPix(X + col, Y + row, fgColor); + else + DrawPix(X + col, Y + row, bgColor); + } + } + return w; +} + +/** + * @brief PutStringAt - draw text string @ screen + * @param X, Y - base coordinates + * @param str - string to draw + * @return - text width in pixels + */ +uint8_t PutStringAt(int16_t X, int16_t Y, const char *str){ + if(!str) return 0; + int16_t Xold = X; + while(*str){ + X += DrawCharAt(X, Y, (uint8_t)*str++); + } + return X - Xold; +} + +uint8_t *getScreenBuf(){return screenbuf;} + +static screen_state ScrnState = SCREEN_RELAX; +screen_state getScreenState(){return ScrnState;} + +static uint8_t currentB = 0; // current block number +static uint8_t Ntick = 0; // tick number (0..7) for PWM color + +/** + * @brief process_screen - screen state machine processing + */ +void process_screen(){ + static uint32_t framecnt = 0; + switch(ScrnState){ + case SCREEN_ACTIVE: // transmission active + if(transfer_done){ + ScrnState = SCREEN_UPDATENXT; + }else return; + // fallthrough + case SCREEN_UPDATENXT: + ConvertScreenBuf(screenbuf, currentB, Ntick); // convert data + TIM_DMA_transfer(currentB); // start transfer + ScrnState = SCREEN_ACTIVE; + if(++currentB >= NBLOCKS){ + currentB = 0; // start again + if(++Ntick >= 7){ + Ntick = 0; + ++framecnt; + if(Tms - Tfps > 999){ + FPS = framecnt; + Tfps = Tms; + framecnt = 0; + } + } + } + break; + default: + return; + } +} + +/** + * @brief ShowScreen - turn on data transmission + */ +void ScreenON(){ + ScrnState = SCREEN_UPDATENXT; + Tfps = Tms; +} + +void ScreenOFF(){ + stopTIMDMA(); + SET(nOE); + ScrnState = SCREEN_RELAX; + currentB = 0; + Ntick = 0; +} + +/** + * @brief RGB2pack - convert RGB color to packed RRRGGGBB + * @param RGB - color (each in range 0..8) + * @return packed color + */ +uint8_t RGB2pack(const uint8_t *RGB){ + uint8_t b = RGB[2] & 7; + if(b) b = (b - 1) >> 1; + return ((RGB[0] & 7)<<5 | (RGB[1] & 7) << 2 | b); +} +/** + * @brief pack2RGB - convert packed color to array of RGB (0..8) + * @param pack - packed color + * @return RGB array + */ +uint8_t *pack2RGB(uint8_t pack){ + static uint8_t RGB[3]; + RGB[0] = pack >> 5; + RGB[1] = (pack & 0x1c) >> 2; + pack &= 3; + if(pack) RGB[2] = (pack<<1) + 1; + else RGB[2] = 0; + return RGB; +} + diff --git a/F1-nolib/RGB_LED_Screen/screen.h b/F1-nolib/RGB_LED_Screen/screen.h new file mode 100644 index 0000000..1a551b2 --- /dev/null +++ b/F1-nolib/RGB_LED_Screen/screen.h @@ -0,0 +1,63 @@ +/* + * This file is part of the LED_screen project. + * Copyright 2019 Edward V. Emelianov + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once +#ifndef SCREEN_H__ +#define SCREEN_H__ + +#include + +// display size in px +// PANEL_WIDTH is width of one panel +//#define PANEL_WIDTH (64) +// SCREEN_WIDTH is total screen width +#define SCREEN_WIDTH (64) +#define SCREEN_HEIGHT (32) +#define SCREENBUF_SZ (SCREEN_WIDTH*SCREEN_HEIGHT) +// amount of blocks @ screen +#define NBLOCKS (16) + +// pause to show a quater of screen - 10ms (25Hz framerate) +#define SCREEN_PAUSE (3) + +typedef enum{ // screen states + SCREEN_RELAX, // nothing to do (screen is off) + SCREEN_ACTIVE, // transmission active + SCREEN_UPDATENXT // update next quarter +} screen_state; + +screen_state getScreenState(); +void ClearScreen(); +void setBGcolor(uint8_t c); +void setFGcolor(uint8_t c); +void DrawPix(int16_t X, int16_t Y, uint8_t pix); +void InvertPix(int16_t X, int16_t Y); +void XORPix(int16_t X, int16_t Y, uint8_t pix); +uint8_t DrawCharAt(int16_t X, int16_t Y, uint8_t Char); +uint8_t PutStringAt(int16_t X, int16_t Y, const char *str); +uint8_t *getScreenBuf(); +void process_screen(); +void ScreenON(); +void ScreenOFF(); +uint32_t getFPS(); + +uint8_t RGB2pack(const uint8_t *RGB); +uint8_t *pack2RGB(uint8_t pack); + + +#endif // SCREEN_H__ diff --git a/F1-nolib/RGB_LED_Screen/usb.c b/F1-nolib/RGB_LED_Screen/usb.c new file mode 100644 index 0000000..091e6b8 --- /dev/null +++ b/F1-nolib/RGB_LED_Screen/usb.c @@ -0,0 +1,167 @@ +/* + * This file is part of the RGBLEDscreen project. + * Copyright 2020 Edward V. Emelianov . + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "usb.h" +#include "usb_lib.h" + +static volatile uint8_t tx_succesfull = 1; +static volatile uint8_t rxNE = 0; + +static int sstrlen(const char *s){ + if(!s) return 0; + int l = 0; + while(*s++) ++l; + return l; +} + +// interrupt IN handler (never used?) +static void EP1_Handler(){ + uint16_t epstatus = KEEP_DTOG(USB->EPnR[1]); + if(RX_FLAG(epstatus)) epstatus = (epstatus & ~USB_EPnR_STAT_TX) ^ USB_EPnR_STAT_RX; // set valid RX + else epstatus = epstatus & ~(USB_EPnR_STAT_TX|USB_EPnR_STAT_RX); + // clear CTR + epstatus = (epstatus & ~(USB_EPnR_CTR_RX|USB_EPnR_CTR_TX)); + USB->EPnR[1] = epstatus; +} + +// data IN/OUT handlers +static void transmit_Handler(){ // EP3IN + tx_succesfull = 1; + uint16_t epstatus = KEEP_DTOG_STAT(USB->EPnR[3]); + // clear CTR keep DTOGs & STATs + USB->EPnR[3] = (epstatus & ~(USB_EPnR_CTR_TX)); // clear TX ctr +} + +static void receive_Handler(){ // EP2OUT + rxNE = 1; + uint16_t epstatus = KEEP_DTOG_STAT(USB->EPnR[2]); + USB->EPnR[2] = (epstatus & ~(USB_EPnR_CTR_RX)); // clear RX ctr +} + +void USB_setup(){ + NVIC_DisableIRQ(USB_LP_CAN1_RX0_IRQn); + NVIC_DisableIRQ(USB_HP_CAN1_TX_IRQn); + RCC->APB1ENR |= RCC_APB1ENR_USBEN; + USB->CNTR = USB_CNTR_FRES; // Force USB Reset + for(uint32_t ctr = 0; ctr < 72000; ++ctr) nop(); // wait >1ms + //uint32_t ctr = 0; + USB->CNTR = 0; + USB->BTABLE = 0; + USB->DADDR = 0; + USB->ISTR = 0; + USB->CNTR = USB_CNTR_RESETM | USB_CNTR_WKUPM; // allow only wakeup & reset interrupts + NVIC_EnableIRQ(USB_LP_CAN1_RX0_IRQn); +} + +static int usbwr(const char *buf, int l){ + uint32_t ctra = 1000000; + while(--ctra && tx_succesfull == 0){ + IWDG->KR = IWDG_REFRESH; + } + tx_succesfull = 0; + EP_Write(3, (uint8_t*)buf, l); + ctra = 1000000; + while(--ctra && tx_succesfull == 0){ + IWDG->KR = IWDG_REFRESH; + } + if(tx_succesfull == 0){usbON = 0; return 1;} // usb is OFF? + return 0; +} + +static char usbbuff[USB_TXBUFSZ-1]; // temporary buffer (63 - to prevent need of ZLP) +static int buflen = 0; // amount of symbols in usbbuff + +// send next up to 63 bytes of data in usbbuff +static void send_next(){ + if(!buflen || !tx_succesfull) return; + tx_succesfull = 0; + EP_Write(3, (uint8_t*)usbbuff, buflen); + buflen = 0; +} + +// unblocking sending - just fill a buffer +void USB_send(const char *buf){ + int len = sstrlen(buf); + if(!usbON || !len) return; + if(len > USB_TXBUFSZ-1 - buflen){ + usbwr(usbbuff, buflen); + buflen = 0; + } + if(len > USB_TXBUFSZ-1){ + USB_send_blk(buf, len); + return; + } + while(len--) usbbuff[buflen++] = *buf++; +} + +// blocking sending +void USB_send_blk(const char *buf, int len){ + if(!usbON || !len) return; // USB disconnected + if(buflen){ + usbwr(usbbuff, buflen); + buflen = 0; + } + int needzlp = 0; + while(len){ + if(len == USB_TXBUFSZ) needzlp = 1; + int s = (len > USB_TXBUFSZ) ? USB_TXBUFSZ : len; + if(usbwr(buf, s)) return; + len -= s; + buf += s; + } + if(needzlp){ + usbwr(NULL, 0); + } +} + +void usb_proc(){ + switch(USB_Dev.USB_Status){ + case USB_STATE_CONFIGURED: + // make new BULK endpoint + // Buffer have 1024 bytes, but last 256 we use for CAN bus (30.2 of RM: USB main features) + EP_Init(1, EP_TYPE_INTERRUPT, USB_EP1BUFSZ, 0, EP1_Handler); // IN1 - transmit + EP_Init(2, EP_TYPE_BULK, 0, USB_RXBUFSZ, receive_Handler); // OUT2 - receive data + EP_Init(3, EP_TYPE_BULK, USB_TXBUFSZ, 0, transmit_Handler); // IN3 - transmit data + USB_Dev.USB_Status = USB_STATE_CONNECTED; + break; + case USB_STATE_DEFAULT: + case USB_STATE_ADDRESSED: + if(usbON){ + usbON = 0; + } + break; + default: // USB_STATE_CONNECTED - send next data portion + if(!usbON) return; + send_next(); + } +} + +/** + * @brief USB_receive + * @param buf (i) - buffer[64] for received data + * @return amount of received bytes + */ +int USB_receive(char *buf){ + if(!usbON || !rxNE) return 0; + int sz = EP_Read(2, (uint16_t*)buf); + uint16_t epstatus = KEEP_DTOG(USB->EPnR[2]); + // keep stat_tx & set ACK rx + USB->EPnR[2] = (epstatus & ~(USB_EPnR_STAT_TX)) ^ USB_EPnR_STAT_RX; + rxNE = 0; + return sz; +} diff --git a/F1-nolib/RGB_LED_Screen/usb.h b/F1-nolib/RGB_LED_Screen/usb.h new file mode 100644 index 0000000..79e426c --- /dev/null +++ b/F1-nolib/RGB_LED_Screen/usb.h @@ -0,0 +1,33 @@ +/* + * This file is part of the RGBLEDscreen project. + * Copyright 2020 Edward V. Emelianov . + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once +#ifndef __USB_H__ +#define __USB_H__ + +#include "hardware.h" + +#define BUFFSIZE (64) + +void USB_setup(); +void usb_proc(); +void USB_send(const char *buf); +void USB_send_blk(const char *buf, int len); +int USB_receive(char *buf); + +#endif // __USB_H__ diff --git a/F1-nolib/RGB_LED_Screen/usb_defs.h b/F1-nolib/RGB_LED_Screen/usb_defs.h new file mode 100644 index 0000000..afd382b --- /dev/null +++ b/F1-nolib/RGB_LED_Screen/usb_defs.h @@ -0,0 +1,102 @@ +/* + * This file is part of the RGBLEDscreen project. + * Copyright 2020 Edward V. Emelianov . + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once +#ifndef __USB_DEFS_H__ +#define __USB_DEFS_H__ + +#include + +// max endpoints number +#define STM32ENDPOINTS 8 +/** + * Buffers size definition + **/ +#define USB_BTABLE_SIZE 512 +// first 64 bytes of USB_BTABLE are registers! +//#define USB_EP0_BASEADDR 64 +// for USB FS EP0 buffers are from 8 to 64 bytes long (64 for PL2303) +#define USB_EP0_BUFSZ 64 +// USB transmit buffer size (64 for PL2303) +#define USB_TXBUFSZ 64 +// USB receive buffer size (64 for PL2303) +#define USB_RXBUFSZ 64 +// EP1 - interrupt - buffer size +#define USB_EP1BUFSZ 8 + +#define USB_BTABLE_BASE 0x40006000 +#define USB_BASE ((uint32_t)0x40005C00) +#define USB ((USB_TypeDef *) USB_BASE) + +#ifdef USB_BTABLE +#undef USB_BTABLE +#endif +#define USB_BTABLE ((USB_BtableDef *)(USB_BTABLE_BASE)) +#define USB_ISTR_EPID 0x0000000F +#define USB_FNR_LSOF_0 0x00000800 +#define USB_FNR_lSOF_1 0x00001000 +#define USB_LPMCSR_BESL_0 0x00000010 +#define USB_LPMCSR_BESL_1 0x00000020 +#define USB_LPMCSR_BESL_2 0x00000040 +#define USB_LPMCSR_BESL_3 0x00000080 +#define USB_EPnR_CTR_RX 0x00008000 +#define USB_EPnR_DTOG_RX 0x00004000 +#define USB_EPnR_STAT_RX 0x00003000 +#define USB_EPnR_STAT_RX_0 0x00001000 +#define USB_EPnR_STAT_RX_1 0x00002000 +#define USB_EPnR_SETUP 0x00000800 +#define USB_EPnR_EP_TYPE 0x00000600 +#define USB_EPnR_EP_TYPE_0 0x00000200 +#define USB_EPnR_EP_TYPE_1 0x00000400 +#define USB_EPnR_EP_KIND 0x00000100 +#define USB_EPnR_CTR_TX 0x00000080 +#define USB_EPnR_DTOG_TX 0x00000040 +#define USB_EPnR_STAT_TX 0x00000030 +#define USB_EPnR_STAT_TX_0 0x00000010 +#define USB_EPnR_STAT_TX_1 0x00000020 +#define USB_EPnR_EA 0x0000000F +#define USB_COUNTn_RX_BLSIZE 0x00008000 +#define USB_COUNTn_NUM_BLOCK 0x00007C00 +#define USB_COUNTn_RX 0x0000003F + +#ifdef USB_TypeDef +#define USB_TypeDef USB_TypeDef_custom +#endif + +typedef struct { + __IO uint32_t EPnR[STM32ENDPOINTS]; + __IO uint32_t RESERVED[STM32ENDPOINTS]; + __IO uint32_t CNTR; + __IO uint32_t ISTR; + __IO uint32_t FNR; + __IO uint32_t DADDR; + __IO uint32_t BTABLE; +} USB_TypeDef; + +typedef struct{ + __IO uint32_t USB_ADDR_TX; + __IO uint32_t USB_COUNT_TX; + __IO uint32_t USB_ADDR_RX; + __IO uint32_t USB_COUNT_RX; +} USB_EPDATA_TypeDef; + +typedef struct{ + __IO USB_EPDATA_TypeDef EP[STM32ENDPOINTS]; +} USB_BtableDef; + +#endif // __USB_DEFS_H__ diff --git a/F1-nolib/RGB_LED_Screen/usb_lib.c b/F1-nolib/RGB_LED_Screen/usb_lib.c new file mode 100644 index 0000000..3f7db14 --- /dev/null +++ b/F1-nolib/RGB_LED_Screen/usb_lib.c @@ -0,0 +1,476 @@ +/* + * This file is part of the RGBLEDscreen project. + * Copyright 2020 Edward V. Emelianov . + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include +#include "usb_lib.h" + +ep_t endpoints[STM32ENDPOINTS]; + +usb_dev_t USB_Dev; +static usb_LineCoding lineCoding = {115200, 0, 0, 8}; +static config_pack_t setup_packet; +static uint8_t ep0databuf[EP0DATABUF_SIZE]; +static uint8_t ep0dbuflen = 0; + +usb_LineCoding getLineCoding(){return lineCoding;} + +uint8_t usbON = 0; // device disconnected from terminal + +// definition of parts common for USB_DeviceDescriptor & USB_DeviceQualifierDescriptor +#define bcdUSB_L 0x10 +#define bcdUSB_H 0x01 +#define bDeviceClass 0 +#define bDeviceSubClass 0 +#define bDeviceProtocol 0 +#define bNumConfigurations 1 + +static const uint8_t USB_DeviceDescriptor[] = { + 18, // bLength + 0x01, // bDescriptorType - Device descriptor + bcdUSB_L, // bcdUSB_L - 1.10 + bcdUSB_H, // bcdUSB_H + bDeviceClass, // bDeviceClass - USB_COMM + bDeviceSubClass, // bDeviceSubClass + bDeviceProtocol, // bDeviceProtocol + USB_EP0_BUFSZ, // bMaxPacketSize + 0x7b, // idVendor_L PL2303: VID=0x067b, PID=0x2303 + 0x06, // idVendor_H + 0x03, // idProduct_L + 0x23, // idProduct_H + 0x00, // bcdDevice_Ver_L + 0x03, // bcdDevice_Ver_H + 0x01, // iManufacturer + 0x02, // iProduct + 0x00, // iSerialNumber + bNumConfigurations // bNumConfigurations +}; + +static const uint8_t USB_DeviceQualifierDescriptor[] = { + 10, //bLength + 0x06, // bDescriptorType - Device qualifier + bcdUSB_L, // bcdUSB_L + bcdUSB_H, // bcdUSB_H + bDeviceClass, // bDeviceClass + bDeviceSubClass, // bDeviceSubClass + bDeviceProtocol, // bDeviceProtocol + USB_EP0_BUFSZ, // bMaxPacketSize0 + bNumConfigurations, // bNumConfigurations + 0x00 // Reserved +}; + +static const uint8_t USB_ConfigDescriptor[] = { + /*Configuration Descriptor*/ + 0x09, /* bLength: Configuration Descriptor size */ + 0x02, /* bDescriptorType: Configuration */ + 39, /* wTotalLength:no of returned bytes */ + 0x00, + 0x01, /* bNumInterfaces: 1 interface */ + 0x01, /* bConfigurationValue: Configuration value */ + 0x00, /* iConfiguration: Index of string descriptor describing the configuration */ + 0xa0, /* bmAttributes - Bus powered, Remote wakeup */ + 0x32, /* MaxPower 100 mA */ + + /*---------------------------------------------------------------------------*/ + + /*Interface Descriptor */ + 0x09, /* bLength: Interface Descriptor size */ + 0x04, /* bDescriptorType: Interface */ + 0x00, /* bInterfaceNumber: Number of Interface */ + 0x00, /* bAlternateSetting: Alternate setting */ + 0x03, /* bNumEndpoints: 3 endpoints used */ + 0xff, /* bInterfaceClass */ + 0x00, /* bInterfaceSubClass */ + 0x00, /* bInterfaceProtocol */ + 0x00, /* iInterface: */ +/////////////////////////////////////////////////// + /*Endpoint 1 Descriptor*/ + 0x07, /* bLength: Endpoint Descriptor size */ + 0x05, /* bDescriptorType: Endpoint */ + 0x81, /* bEndpointAddress IN1 */ + 0x03, /* bmAttributes: Interrupt */ + 0x0a, /* wMaxPacketSize LO: */ + 0x00, /* wMaxPacketSize HI: */ + 0x01, /* bInterval: */ + + /*Endpoint OUT2 Descriptor*/ + 0x07, /* bLength: Endpoint Descriptor size */ + 0x05, /* bDescriptorType: Endpoint */ + 0x02, /* bEndpointAddress: OUT2 */ + 0x02, /* bmAttributes: Bulk */ + (USB_RXBUFSZ & 0xff), /* wMaxPacketSize: 64 */ + (USB_RXBUFSZ >> 8), + 0x00, /* bInterval: ignore for Bulk transfer */ + + /*Endpoint IN3 Descriptor*/ + 0x07, /* bLength: Endpoint Descriptor size */ + 0x05, /* bDescriptorType: Endpoint */ + 0x83, /* bEndpointAddress IN3 */ + 0x02, /* bmAttributes: Bulk */ + (USB_TXBUFSZ & 0xff), /* wMaxPacketSize: 64 */ + (USB_TXBUFSZ >> 8), + 0x00, /* bInterval: ignore for Bulk transfer */ +}; + +_USB_LANG_ID_(USB_StringLangDescriptor, LANG_US); +// these descriptors are not used in PL2303 emulator! +_USB_STRING_(USB_StringSerialDescriptor, u"0"); +_USB_STRING_(USB_StringManufacturingDescriptor, u"Prolific Technology Inc."); +_USB_STRING_(USB_StringProdDescriptor, u"USB-Serial Controller"); + +/* + * default handlers + */ +// SET_LINE_CODING +void WEAK linecoding_handler(usb_LineCoding __attribute__((unused)) *lc){ +} + +// SET_CONTROL_LINE_STATE +void WEAK clstate_handler(uint16_t __attribute__((unused)) val){ +} + +// SEND_BREAK +void WEAK break_handler(){ +} + +// handler of vendor requests +void WEAK vendor_handler(config_pack_t *packet){ + if(packet->bmRequestType & 0x80){ // read + uint8_t c; + switch(packet->wValue){ + case 0x8484: + c = 2; + break; + case 0x0080: + c = 1; + break; + case 0x8686: + c = 0xaa; + break; + default: + c = 0; + } + EP_WriteIRQ(0, &c, 1); + }else{ // write ZLP + EP_WriteIRQ(0, (uint8_t *)0, 0); + } +} + +static void wr0(const uint8_t *buf, uint16_t size){ + if(setup_packet.wLength < size) size = setup_packet.wLength; // shortened request + if(size < endpoints[0].txbufsz){ + EP_WriteIRQ(0, buf, size); + return; + } + while(size){ + uint16_t l = size; + if(l > endpoints[0].txbufsz) l = endpoints[0].txbufsz; + EP_WriteIRQ(0, buf, l); + buf += l; + size -= l; + uint8_t needzlp = (l == endpoints[0].txbufsz) ? 1 : 0; + if(size || needzlp){ // send last data buffer + uint16_t status = KEEP_DTOG(USB->EPnR[0]); + // keep DTOGs, clear CTR_RX,TX, set TX VALID, leave stat_Rx + USB->EPnR[0] = (status & ~(USB_EPnR_CTR_RX|USB_EPnR_CTR_TX|USB_EPnR_STAT_RX)) + ^ USB_EPnR_STAT_TX; + uint32_t ctr = 1000000; + while(--ctr && (USB->ISTR & USB_ISTR_CTR) == 0){IWDG->KR = IWDG_REFRESH;}; + if((USB->ISTR & USB_ISTR_CTR) == 0){ + return; + } + if(needzlp) EP_WriteIRQ(0, (uint8_t*)0, 0); + } + } +} + +static inline void get_descriptor(){ + switch(setup_packet.wValue){ + case DEVICE_DESCRIPTOR: + wr0(USB_DeviceDescriptor, sizeof(USB_DeviceDescriptor)); + break; + case CONFIGURATION_DESCRIPTOR: + wr0(USB_ConfigDescriptor, sizeof(USB_ConfigDescriptor)); + break; + case STRING_LANG_DESCRIPTOR: + wr0((const uint8_t *)&USB_StringLangDescriptor, STRING_LANG_DESCRIPTOR_SIZE_BYTE); + break; + case STRING_MAN_DESCRIPTOR: + wr0((const uint8_t *)&USB_StringManufacturingDescriptor, USB_StringManufacturingDescriptor.bLength); + break; + case STRING_PROD_DESCRIPTOR: + wr0((const uint8_t *)&USB_StringProdDescriptor, USB_StringProdDescriptor.bLength); + break; + case STRING_SN_DESCRIPTOR: + wr0((const uint8_t *)&USB_StringSerialDescriptor, USB_StringSerialDescriptor.bLength); + break; + case DEVICE_QUALIFIER_DESCRIPTOR: + wr0(USB_DeviceQualifierDescriptor, USB_DeviceQualifierDescriptor[0]); + break; + default: + break; + } +} + +static uint8_t configuration = 0; // reply for GET_CONFIGURATION (==1 if configured) +static inline void std_d2h_req(){ + uint16_t status = 0; // bus powered + switch(setup_packet.bRequest){ + case GET_DESCRIPTOR: + get_descriptor(); + break; + case GET_STATUS: + EP_WriteIRQ(0, (uint8_t *)&status, 2); // send status: Bus Powered + break; + case GET_CONFIGURATION: + EP_WriteIRQ(0, &configuration, 1); + break; + default: + break; + } +} + +static inline void std_h2d_req(){ + switch(setup_packet.bRequest){ + case SET_ADDRESS: + // new address will be assigned later - after acknowlegement or request to host + USB_Dev.USB_Addr = setup_packet.wValue; + break; + case SET_CONFIGURATION: + // Now device configured + USB_Dev.USB_Status = USB_STATE_CONFIGURED; + configuration = setup_packet.wValue; + break; + default: + break; + } +} + +/* +bmRequestType: 76543210 +7 direction: 0 - host->device, 1 - device->host +65 type: 0 - standard, 1 - class, 2 - vendor +4..0 getter: 0 - device, 1 - interface, 2 - endpoint, 3 - other +*/ +/** + * Endpoint0 (control) handler + */ +static void EP0_Handler(){ + uint16_t epstatus = USB->EPnR[0]; // EP0R on input -> return this value after modifications + uint8_t reqtype = setup_packet.bmRequestType & 0x7f; + uint8_t dev2host = (setup_packet.bmRequestType & 0x80) ? 1 : 0; + int rxflag = RX_FLAG(epstatus); + if(rxflag && SETUP_FLAG(epstatus)){ + switch(reqtype){ + case STANDARD_DEVICE_REQUEST_TYPE: // standard device request + if(dev2host){ + std_d2h_req(); + }else{ + std_h2d_req(); + EP_WriteIRQ(0, (uint8_t *)0, 0); + } + break; + case STANDARD_ENDPOINT_REQUEST_TYPE: // standard endpoint request + if(setup_packet.bRequest == CLEAR_FEATURE){ + EP_WriteIRQ(0, (uint8_t *)0, 0); + } + break; + case VENDOR_REQUEST_TYPE: + vendor_handler(&setup_packet); + break; + case CONTROL_REQUEST_TYPE: + switch(setup_packet.bRequest){ + case GET_LINE_CODING: + EP_WriteIRQ(0, (uint8_t*)&lineCoding, sizeof(lineCoding)); + break; + case SET_LINE_CODING: // omit this for next stage, when data will come + break; + case SET_CONTROL_LINE_STATE: + usbON = 1; + clstate_handler(setup_packet.wValue); + break; + case SEND_BREAK: + usbON = 0; + break_handler(); + break; + default: + break; + } + if(setup_packet.bRequest != GET_LINE_CODING) EP_WriteIRQ(0, (uint8_t *)0, 0); // write acknowledgement + break; + default: + EP_WriteIRQ(0, (uint8_t *)0, 0); + } + }else if(rxflag){ // got data over EP0 or host acknowlegement + if(endpoints[0].rx_cnt){ + if(setup_packet.bRequest == SET_LINE_CODING){ + linecoding_handler((usb_LineCoding*)ep0databuf); + } + } + } else if(TX_FLAG(epstatus)){ // package transmitted + // now we can change address after enumeration + if ((USB->DADDR & USB_DADDR_ADD) != USB_Dev.USB_Addr){ + USB->DADDR = USB_DADDR_EF | USB_Dev.USB_Addr; + // change state to ADRESSED + USB_Dev.USB_Status = USB_STATE_ADDRESSED; + } + } + epstatus = KEEP_DTOG(USB->EPnR[0]); + if(rxflag) epstatus ^= USB_EPnR_STAT_TX; // start ZLP/data transmission + else epstatus &= ~USB_EPnR_STAT_TX; // or leave unchanged + // keep DTOGs, clear CTR_RX,TX, set RX VALID + USB->EPnR[0] = (epstatus & ~(USB_EPnR_CTR_RX|USB_EPnR_CTR_TX)) ^ USB_EPnR_STAT_RX; +} + +static uint16_t lastaddr = LASTADDR_DEFAULT; +/** + * Endpoint initialisation + * @param number - EP num (0...7) + * @param type - EP type (EP_TYPE_BULK, EP_TYPE_CONTROL, EP_TYPE_ISO, EP_TYPE_INTERRUPT) + * @param txsz - transmission buffer size @ USB/CAN buffer + * @param rxsz - reception buffer size @ USB/CAN buffer + * @param uint16_t (*func)(ep_t *ep) - EP handler function + * @return 0 if all OK + */ +int EP_Init(uint8_t number, uint8_t type, uint16_t txsz, uint16_t rxsz, void (*func)(ep_t ep)){ + if(number >= STM32ENDPOINTS) return 4; // out of configured amount + if(txsz > USB_BTABLE_SIZE || rxsz > USB_BTABLE_SIZE) return 1; // buffer too large + if(lastaddr + txsz + rxsz >= USB_BTABLE_SIZE) return 2; // out of btable + USB->EPnR[number] = (type << 9) | (number & USB_EPnR_EA); + USB->EPnR[number] ^= USB_EPnR_STAT_RX | USB_EPnR_STAT_TX_1; + if(rxsz & 1 || rxsz > 512) return 3; // wrong rx buffer size + uint16_t countrx = 0; + if(rxsz < 64) countrx = rxsz / 2; + else{ + if(rxsz & 0x1f) return 3; // should be multiple of 32 + countrx = 31 + rxsz / 32; + } + USB_BTABLE->EP[number].USB_ADDR_TX = lastaddr; + endpoints[number].tx_buf = (uint16_t *)(USB_BTABLE_BASE + lastaddr*2); + endpoints[number].txbufsz = txsz; + lastaddr += txsz; + USB_BTABLE->EP[number].USB_COUNT_TX = 0; + USB_BTABLE->EP[number].USB_ADDR_RX = lastaddr; + endpoints[number].rx_buf = (uint16_t *)(USB_BTABLE_BASE + lastaddr*2); + lastaddr += rxsz; + USB_BTABLE->EP[number].USB_COUNT_RX = countrx << 10; + endpoints[number].func = func; + return 0; +} + +// standard IRQ handler +void usb_lp_can_rx0_isr(){ + if(USB->ISTR & USB_ISTR_RESET){ + usbON = 0; + // Reinit registers + USB->CNTR = USB_CNTR_RESETM | USB_CNTR_CTRM | USB_CNTR_SUSPM | USB_CNTR_WKUPM; + USB->ISTR = 0; + // Endpoint 0 - CONTROL + // ON USB LS size of EP0 may be 8 bytes, but on FS it should be 64 bytes! + lastaddr = LASTADDR_DEFAULT; + // clear address, leave only enable bit + USB->DADDR = USB_DADDR_EF; + USB_Dev.USB_Status = USB_STATE_DEFAULT; + USB->ISTR = ~USB_ISTR_RESET; + if(EP_Init(0, EP_TYPE_CONTROL, USB_EP0_BUFSZ, USB_EP0_BUFSZ, EP0_Handler)){ + return; + } + } + if(USB->ISTR & USB_ISTR_CTR){ + // EP number + uint8_t n = USB->ISTR & USB_ISTR_EPID; + // copy status register + uint16_t epstatus = USB->EPnR[n]; + // copy received bytes amount + endpoints[n].rx_cnt = USB_BTABLE->EP[n].USB_COUNT_RX & 0x3FF; // low 10 bits is counter + // check direction + if(USB->ISTR & USB_ISTR_DIR){ // OUT interrupt - receive data, CTR_RX==1 (if CTR_TX == 1 - two pending transactions: receive following by transmit) + if(n == 0){ // control endpoint + if(epstatus & USB_EPnR_SETUP){ // setup packet -> copy data to conf_pack + EP_Read(0, (uint16_t*)&setup_packet); + ep0dbuflen = 0; + // interrupt handler will be called later + }else if(epstatus & USB_EPnR_CTR_RX){ // data packet -> push received data to ep0databuf + ep0dbuflen = endpoints[0].rx_cnt; + EP_Read(0, (uint16_t*)&ep0databuf); + } + } + } + // call EP handler + if(endpoints[n].func) endpoints[n].func(endpoints[n]); + } + if(USB->ISTR & USB_ISTR_SUSP){ // suspend -> still no connection, may sleep + usbON = 0; + USB->CNTR |= USB_CNTR_FSUSP | USB_CNTR_LP_MODE; + USB->ISTR = ~USB_ISTR_SUSP; + } + if(USB->ISTR & USB_ISTR_WKUP){ // wakeup + USB->CNTR &= ~(USB_CNTR_FSUSP | USB_CNTR_LP_MODE); // clear suspend flags + USB->ISTR = ~USB_ISTR_WKUP; + } +} + +/** + * Write data to EP buffer (called from IRQ handler) + * @param number - EP number + * @param *buf - array with data + * @param size - its size + */ +void EP_WriteIRQ(uint8_t number, const uint8_t *buf, uint16_t size){ + uint8_t i; + if(size > endpoints[number].txbufsz) size = endpoints[number].txbufsz; + uint16_t N2 = (size + 1) >> 1; + // the buffer is 16-bit, so we should copy data as it would be uint16_t + uint16_t *buf16 = (uint16_t *)buf; + uint32_t *out = (uint32_t *)endpoints[number].tx_buf; + for(i = 0; i < N2; ++i, ++out){ + *out = buf16[i]; + } + USB_BTABLE->EP[number].USB_COUNT_TX = size; +} + +/** + * Write data to EP buffer (called outside IRQ handler) + * @param number - EP number + * @param *buf - array with data + * @param size - its size + */ +void EP_Write(uint8_t number, const uint8_t *buf, uint16_t size){ + EP_WriteIRQ(number, buf, size); + uint16_t status = KEEP_DTOG(USB->EPnR[number]); + // keep DTOGs, clear CTR_TX & set TX VALID to start transmission + USB->EPnR[number] = (status & ~(USB_EPnR_CTR_TX)) ^ USB_EPnR_STAT_TX; +} + +/* + * Copy data from EP buffer into user buffer area + * @param *buf - user array for data + * @return amount of data read + */ +int EP_Read(uint8_t number, uint16_t *buf){ + int sz = endpoints[number].rx_cnt; + if(!sz) return 0; + endpoints[number].rx_cnt = 0; + int n = (sz + 1) >> 1; + uint32_t *in = (uint32_t *)endpoints[number].rx_buf; + if(n){ + for(int i = 0; i < n; ++i, ++in) + buf[i] = *(uint16_t*)in; + } + return sz; +} + diff --git a/F1-nolib/RGB_LED_Screen/usb_lib.h b/F1-nolib/RGB_LED_Screen/usb_lib.h new file mode 100644 index 0000000..40a0ddd --- /dev/null +++ b/F1-nolib/RGB_LED_Screen/usb_lib.h @@ -0,0 +1,184 @@ +/* + * This file is part of the RGBLEDscreen project. + * Copyright 2020 Edward V. Emelianov . + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once +#ifndef __USB_LIB_H__ +#define __USB_LIB_H__ + +#include +#include "usb_defs.h" + +#define EP0DATABUF_SIZE (64) +#define LASTADDR_DEFAULT (STM32ENDPOINTS * 8) + +// bmRequestType & 0x7f +#define STANDARD_DEVICE_REQUEST_TYPE 0 +#define STANDARD_ENDPOINT_REQUEST_TYPE 2 +#define VENDOR_REQUEST_TYPE 0x40 +#define CONTROL_REQUEST_TYPE 0x21 +// bRequest, standard; for bmRequestType == 0x80 +#define GET_STATUS 0x00 +#define GET_DESCRIPTOR 0x06 +#define GET_CONFIGURATION 0x08 +// for bmRequestType == 0 +#define CLEAR_FEATURE 0x01 +#define SET_FEATURE 0x03 // unused +#define SET_ADDRESS 0x05 +#define SET_DESCRIPTOR 0x07 // unused +#define SET_CONFIGURATION 0x09 +// for bmRequestType == 0x81, 1 or 0xB2 +#define GET_INTERFACE 0x0A // unused +#define SET_INTERFACE 0x0B // unused +#define SYNC_FRAME 0x0C // unused +#define VENDOR_REQUEST 0x01 // unused + +// Class-Specific Control Requests +#define SEND_ENCAPSULATED_COMMAND 0x00 // unused +#define GET_ENCAPSULATED_RESPONSE 0x01 // unused +#define SET_COMM_FEATURE 0x02 // unused +#define GET_COMM_FEATURE 0x03 // unused +#define CLEAR_COMM_FEATURE 0x04 // unused +#define SET_LINE_CODING 0x20 +#define GET_LINE_CODING 0x21 +#define SET_CONTROL_LINE_STATE 0x22 +#define SEND_BREAK 0x23 + +// control line states +#define CONTROL_DTR 0x01 +#define CONTROL_RTS 0x02 + +// wValue +#define DEVICE_DESCRIPTOR 0x100 +#define CONFIGURATION_DESCRIPTOR 0x200 +#define STRING_LANG_DESCRIPTOR 0x300 +#define STRING_MAN_DESCRIPTOR 0x301 +#define STRING_PROD_DESCRIPTOR 0x302 +#define STRING_SN_DESCRIPTOR 0x303 +#define DEVICE_QUALIFIER_DESCRIPTOR 0x600 + +#define RX_FLAG(epstat) (epstat & USB_EPnR_CTR_RX) +#define TX_FLAG(epstat) (epstat & USB_EPnR_CTR_TX) +#define SETUP_FLAG(epstat) (epstat & USB_EPnR_SETUP) + +// EPnR bits manipulation +#define KEEP_DTOG_STAT(EPnR) (EPnR & ~(USB_EPnR_STAT_RX|USB_EPnR_STAT_TX|USB_EPnR_DTOG_RX|USB_EPnR_DTOG_TX)) +#define KEEP_DTOG(EPnR) (EPnR & ~(USB_EPnR_DTOG_RX|USB_EPnR_DTOG_TX)) + +// USB state: uninitialized, addressed, ready for use +typedef enum{ + USB_STATE_DEFAULT, + USB_STATE_ADDRESSED, + USB_STATE_CONFIGURED, + USB_STATE_CONNECTED +} USB_state; + +// EP types +#define EP_TYPE_BULK 0x00 +#define EP_TYPE_CONTROL 0x01 +#define EP_TYPE_ISO 0x02 +#define EP_TYPE_INTERRUPT 0x03 + +#define LANG_US (uint16_t)0x0409 + +#define _USB_STRING_(name, str) \ +static const struct name \ +{ \ + uint8_t bLength; \ + uint8_t bDescriptorType; \ + uint16_t bString[(sizeof(str) - 2) / 2]; \ + \ +} \ +name = {sizeof(name), 0x03, str} + +#define _USB_LANG_ID_(name, lng_id) \ + \ +static const struct name \ +{ \ + uint8_t bLength; \ + uint8_t bDescriptorType; \ + uint16_t bString; \ + \ +} \ +name = {0x04, 0x03, lng_id} +#define STRING_LANG_DESCRIPTOR_SIZE_BYTE (4) + +// EP0 configuration packet +typedef struct { + uint8_t bmRequestType; + uint8_t bRequest; + uint16_t wValue; + uint16_t wIndex; + uint16_t wLength; +} config_pack_t; + +// endpoints state +typedef struct{ + uint16_t *tx_buf; // transmission buffer address + uint16_t txbufsz; // transmission buffer size + uint16_t *rx_buf; // reception buffer address + void (*func)(); // endpoint action function + unsigned rx_cnt : 10; // received data counter +} ep_t; + +// USB status & its address +typedef struct { + uint8_t USB_Status; + uint16_t USB_Addr; +}usb_dev_t; + +typedef struct { + uint32_t dwDTERate; + uint8_t bCharFormat; + #define USB_CDC_1_STOP_BITS 0 + #define USB_CDC_1_5_STOP_BITS 1 + #define USB_CDC_2_STOP_BITS 2 + uint8_t bParityType; + #define USB_CDC_NO_PARITY 0 + #define USB_CDC_ODD_PARITY 1 + #define USB_CDC_EVEN_PARITY 2 + #define USB_CDC_MARK_PARITY 3 + #define USB_CDC_SPACE_PARITY 4 + uint8_t bDataBits; +} __attribute__ ((packed)) usb_LineCoding; + +typedef struct { + uint8_t bmRequestType; + uint8_t bNotificationType; + uint16_t wValue; + uint16_t wIndex; + uint16_t wLength; +} __attribute__ ((packed)) usb_cdc_notification; + +extern ep_t endpoints[]; +extern usb_dev_t USB_Dev; +extern uint8_t usbON; + +void USB_Init(); +void USB_ResetState(); +int EP_Init(uint8_t number, uint8_t type, uint16_t txsz, uint16_t rxsz, void (*func)()); +void EP_WriteIRQ(uint8_t number, const uint8_t *buf, uint16_t size); +void EP_Write(uint8_t number, const uint8_t *buf, uint16_t size); +int EP_Read(uint8_t number, uint16_t *buf); +usb_LineCoding getLineCoding(); + +void linecoding_handler(usb_LineCoding *lc); +void clstate_handler(uint16_t val); +void break_handler(); +void vendor_handler(config_pack_t *packet); + +#endif // __USB_LIB_H__