From 2135c02be1771f44abbf61197a4ca89c232643fe Mon Sep 17 00:00:00 2001 From: Thomas Eberhardt Date: Tue, 21 Jan 2025 11:38:22 +0100 Subject: [PATCH 01/22] add a basic introspection panel Currently a straight port from the RP2xxx-GEEK-80 register panel. Works with SDL2 & X11 (at least on my Linux machine). I'm not really a X11 programmer, hacked this together by looking at a simple X11 PNG image display program I found on the internet. Panel will be enhanced now that the basic stuff works. Also works with the command line only machines (cpmsim, mosteksim, z80sim), but disabled by default. Compile with INFOPANEL=YES, and than use '-p' option. Add defines for cpu_switch values. Only set cpu_state to ST_CONTIN_RUN/ST_SINGLE_STEP in run_cpu()/step_cpu(), needed for the frequency calculation in the panel. Set cpu_state to ST_STOPPED when RUN switch is pressed, seems counter intuitive but will get changed to ST_CONTIN_RUN by the setting of cpu_switch to CPUSW_RUN, which than causes the call of run_cpu(). Added fp_sampleData() to beginning of cpu_8080()/cpu_z80() so the RUN LED gets updated immediately. Removed all the cpu_time adjustments around frontpanel code, but added them to wait_step()/wait_int_step(), since these do sleeps and are called from deep inside the CPU simulator. Displayed frequency is now stable enough while single stepping. Some small clean-ups and continuing boolification... --- altairsim/srcsim/Makefile | 15 +- altairsim/srcsim/simctl.c | 47 +- cpmsim/srcsim/Makefile | 54 +- cromemcosim/srcsim/Makefile | 15 +- cromemcosim/srcsim/simctl.c | 45 +- imsaisim/srcsim/Makefile | 15 +- imsaisim/srcsim/simctl.c | 46 +- intelmdssim/srcsim/Makefile | 15 +- intelmdssim/srcsim/simctl.c | 2 +- iodevices/imsai-vio.c | 6 +- iodevices/proctec-vdm.c | 6 +- mosteksim/srcsim/Makefile | 54 +- picosim/srcsim/picosim.c | 4 +- picosim/srcsim/simcfg.c | 2 +- z80core/alt8080.h | 8 +- z80core/altz80.h | 16 +- z80core/fonts/Makefile | 39 ++ z80core/fonts/OFL.TXT | 94 ++++ z80core/fonts/bdf2c.c | 220 ++++++++ z80core/fonts/font12.h | 115 +++++ z80core/fonts/font14.h | 169 ++++++ z80core/fonts/font16.h | 190 +++++++ z80core/fonts/font18.h | 259 ++++++++++ z80core/fonts/font20.h | 286 +++++++++++ z80core/fonts/font22.h | 342 +++++++++++++ z80core/fonts/font24.h | 403 +++++++++++++++ z80core/fonts/font28.h | 542 ++++++++++++++++++++ z80core/fonts/font32.h | 702 +++++++++++++++++++++++++ z80core/sim8080.c | 36 +- z80core/simcore.c | 24 +- z80core/simdis.c | 7 +- z80core/simglb.c | 10 +- z80core/simglb.h | 6 +- z80core/simice.c | 4 +- z80core/simmain.c | 20 + z80core/simpanel.c | 987 ++++++++++++++++++++++++++++++++++++ z80core/simpanel.h | 13 + z80core/simsdl.c | 10 +- z80core/simz80-cb.c | 6 - z80core/simz80-dd.c | 6 - z80core/simz80-ed.c | 6 - z80core/simz80-fd.c | 6 - z80core/simz80.c | 34 +- z80sim/srcsim/Makefile | 54 +- 44 files changed, 4736 insertions(+), 204 deletions(-) create mode 100644 z80core/fonts/Makefile create mode 100644 z80core/fonts/OFL.TXT create mode 100644 z80core/fonts/bdf2c.c create mode 100644 z80core/fonts/font12.h create mode 100644 z80core/fonts/font14.h create mode 100644 z80core/fonts/font16.h create mode 100644 z80core/fonts/font18.h create mode 100644 z80core/fonts/font20.h create mode 100644 z80core/fonts/font22.h create mode 100644 z80core/fonts/font24.h create mode 100644 z80core/fonts/font28.h create mode 100644 z80core/fonts/font32.h create mode 100644 z80core/simpanel.c create mode 100644 z80core/simpanel.h diff --git a/altairsim/srcsim/Makefile b/altairsim/srcsim/Makefile index 1c748a62..c3970063 100644 --- a/altairsim/srcsim/Makefile +++ b/altairsim/srcsim/Makefile @@ -6,6 +6,8 @@ MACHINE = altair # emulate a machine's frontpanel FRONTPANEL ?= YES +# show an introspection panel +INFOPANEL ?= YES # use SDL2 instead of X11 WANT_SDL ?= NO # machine specific system source files @@ -47,11 +49,16 @@ VPATH = $(CORE_DIR) $(IO_DIR) $(FP_DIR) include $(CORE_DIR)/Makefile.in-os ### -### SDL2/X11 PLATFORM VARIABLES +### SDL2/X11 AND INFOPANEL PLATFORM VARIABLES ### ifeq ($(WANT_SDL),YES) +ifeq ($(INFOPANEL),YES) +PLAT_DEFS = -DINFOPANEL -DWANT_SDL +PLAT_SRCS = simpanel.c simsdl.c +else PLAT_DEFS = -DWANT_SDL PLAT_SRCS = simsdl.c +endif ifeq ($(TARGET_OS),BSD) PLAT_INCS = -I/usr/local/include/SDL2 PLAT_LDFLAGS = -L/usr/local/lib @@ -66,6 +73,10 @@ PLAT_LDFLAGS = -Wl,-search_paths_first -Wl,-headerpad_max_install_names \ PLAT_LDLIBS = -framework SDL2 endif else +ifeq ($(INFOPANEL),YES) +PLAT_DEFS = -DINFOPANEL +PLAT_SRCS = simpanel.c +endif ifeq ($(TARGET_OS),BSD) PLAT_INCS = -I/usr/local/include PLAT_LDFLAGS = -L/usr/local/lib @@ -79,7 +90,7 @@ PLAT_LDLIBS = -lX11 endif endif ### -### END SDL2/X11 PLATFORM VARIABLES +### END SDL2/X11 AND INFOPANEL PLATFORM VARIABLES ### ### diff --git a/altairsim/srcsim/simctl.c b/altairsim/srcsim/simctl.c index 68928bff..862a8e47 100644 --- a/altairsim/srcsim/simctl.c +++ b/altairsim/srcsim/simctl.c @@ -64,6 +64,12 @@ #include "log.h" static const char *TAG = "system"; + /* cpu_switch states */ +#define CPUSW_STOP 0 /* stopped */ +#define CPUSW_RUN 1 /* running */ +#define CPUSW_STEP 2 /* single step */ +#define CPUSW_STEPCYCLE 3 /* machine cycle step */ + static BYTE fp_led_wait; static int cpu_switch; static int reset; @@ -190,14 +196,14 @@ void mon(void) /* run CPU if not idling */ switch (cpu_switch) { - case 1: + case CPUSW_RUN: if (!reset) run_cpu(); break; - case 2: + case CPUSW_STEP: step_cpu(); - if (cpu_switch == 2) - cpu_switch = 0; + if (cpu_switch == CPUSW_STEP) + cpu_switch = CPUSW_STOP; break; default: break; @@ -274,16 +280,16 @@ static void run_clicked(int state, int val) switch (state) { case FP_SW_DOWN: if (cpu_state != ST_CONTIN_RUN) { - cpu_state = ST_CONTIN_RUN; + cpu_state = ST_STOPPED; fp_led_wait = 0; - cpu_switch = 1; + cpu_switch = CPUSW_RUN; } break; case FP_SW_UP: if (cpu_state == ST_CONTIN_RUN) { cpu_state = ST_STOPPED; fp_led_wait = 1; - cpu_switch = 0; + cpu_switch = CPUSW_STOP; } break; default: @@ -306,7 +312,7 @@ static void step_clicked(int state, int val) switch (state) { case FP_SW_UP: - cpu_switch = 2; + cpu_switch = CPUSW_STEP; break; case FP_SW_DOWN: break; @@ -321,6 +327,7 @@ static void step_clicked(int state, int val) bool wait_step(void) { bool ret = false; + uint64_t t1, t2; if (cpu_state != ST_SINGLE_STEP) { cpu_bus &= ~CPU_M1; @@ -333,9 +340,10 @@ bool wait_step(void) return ret; } - cpu_switch = 3; + cpu_switch = CPUSW_STEPCYCLE; - while ((cpu_switch == 3) && !reset) { + t1 = get_clock_us(); + while ((cpu_switch == CPUSW_STEPCYCLE) && !reset) { /* when INP update data bus LEDs */ if (cpu_bus == (CPU_WO | CPU_INP)) { if (port_in[fp_led_address & 0xff]) @@ -344,8 +352,11 @@ bool wait_step(void) } fp_clock++; fp_sampleData(); - sleep_for_ms(1); + sleep_for_ms(10); ret = true; + t2 = get_clock_us(); + cpu_time -= t2 - t1; + t1 = t2; } cpu_bus &= ~CPU_M1; @@ -358,15 +369,21 @@ bool wait_step(void) */ void wait_int_step(void) { + uint64_t t1, t2; + if (cpu_state != ST_SINGLE_STEP) return; - cpu_switch = 3; + cpu_switch = CPUSW_STEPCYCLE; - while ((cpu_switch == 3) && !reset) { + t1 = get_clock_us(); + while ((cpu_switch == CPUSW_STEPCYCLE) && !reset) { fp_clock++; fp_sampleData(); sleep_for_ms(10); + t2 = get_clock_us(); + cpu_time -= t2 - t1; + t1 = t2; } } @@ -572,7 +589,7 @@ static void power_clicked(int state, int val) if (!power) break; power = 0; - cpu_switch = 0; + cpu_switch = CPUSW_STOP; cpu_state = ST_STOPPED; cpu_error = POWEROFF; break; @@ -587,7 +604,7 @@ static void power_clicked(int state, int val) static void quit_callback(void) { power = 0; - cpu_switch = 0; + cpu_switch = CPUSW_STOP; cpu_state = ST_STOPPED; cpu_error = POWEROFF; } diff --git a/cpmsim/srcsim/Makefile b/cpmsim/srcsim/Makefile index 83531f64..770ae897 100644 --- a/cpmsim/srcsim/Makefile +++ b/cpmsim/srcsim/Makefile @@ -4,6 +4,10 @@ # (simple) machine name - will be suffixed with 'sim' # and the executable saved as '../machinesim' MACHINE = cpm +# show an introspection panel +INFOPANEL ?= NO +# use SDL2 instead of X11 +WANT_SDL ?= NO # machine specific system source files MACHINE_SRCS = simcfg.c simio.c simmem.c simctl.c # machine specific I/O source files @@ -37,8 +41,48 @@ VPATH = $(CORE_DIR) $(IO_DIR) include $(CORE_DIR)/Makefile.in-os -DEFS = -DCONFDIR=\"$(CONF_DIR)\" -DDISKSDIR=\"$(DISKS_DIR)\" -INCS = -I. -I$(CORE_DIR) -I$(IO_DIR) +### +### SDL2/X11 INFOPANEL PLATFORM VARIABLES +### +ifeq ($(INFOPANEL),YES) +ifeq ($(WANT_SDL),YES) +PLAT_DEFS = -DINFOPANEL -DWANT_SDL +PLAT_SRCS = simpanel.c simsdl.c +ifeq ($(TARGET_OS),BSD) +PLAT_INCS = -I/usr/local/include/SDL2 +PLAT_LDFLAGS = -L/usr/local/lib +PLAT_LDLIBS = -lSDL2 -lSDL2main +else ifeq ($(TARGET_OS),LINUX) +PLAT_INCS = -I/usr/include/SDL2 +PLAT_LDLIBS = -lSDL2 -lSDL2main +else ifeq ($(TARGET_OS),OSX) +PLAT_INCS = -F/Library/Frameworks -I/Library/Frameworks/SDL2.framework/Headers +PLAT_LDFLAGS = -Wl,-search_paths_first -Wl,-headerpad_max_install_names \ + -Wl,-rpath,/Library/Frameworks +PLAT_LDLIBS = -framework SDL2 +endif +else +PLAT_DEFS = -DINFOPANEL +PLAT_SRCS = simpanel.c +ifeq ($(TARGET_OS),BSD) +PLAT_INCS = -I/usr/local/include +PLAT_LDFLAGS = -L/usr/local/lib +PLAT_LDLIBS = -lX11 -lpthread +else ifeq ($(TARGET_OS),LINUX) +PLAT_LDLIBS = -lX11 -lpthread +else ifeq ($(TARGET_OS),OSX) +PLAT_INCS = -I/opt/X11/include -I/opt/local/include -I/usr/local/include +PLAT_LDFLAGS = -L/opt/X11/lib -L/usr/local/lib +PLAT_LDLIBS = -lX11 -lpthread +endif +endif +endif +### +### END INFOPANEL SDL2/X11 PLATFORM VARIABLES +### + +DEFS = -DCONFDIR=\"$(CONF_DIR)\" -DDISKSDIR=\"$(DISKS_DIR)\" $(PLAT_DEFS) +INCS = -I. -I$(CORE_DIR) -I$(IO_DIR) $(PLAT_INCS) CPPFLAGS = $(DEFS) $(INCS) CSTDS = -std=c99 -D_DEFAULT_SOURCE # -D_XOPEN_SOURCE=700L @@ -59,8 +103,8 @@ endif CFLAGS = $(CSTDS) $(COPTS) $(CWARNS) -LDFLAGS = -LDLIBS = +LDFLAGS = $(PLAT_LD_FLAGS) +LDLIBS = $(PLAT_LDLIBS) INSTALL = install INSTALL_PROGRAM = $(INSTALL) @@ -70,7 +114,7 @@ INSTALL_DATA = $(INSTALL) -m 644 CORE_SRCS = sim8080.c simcore.c simdis.c simfun.c simglb.c simice.c simint.c \ simmain.c simz80.c simz80-cb.c simz80-dd.c simz80-ddcb.c simz80-ed.c \ simz80-fd.c simz80-fdcb.c -SRCS = $(CORE_SRCS) $(MACHINE_SRCS) $(IO_SRCS) +SRCS = $(CORE_SRCS) $(MACHINE_SRCS) $(IO_SRCS) $(PLAT_SRCS) OBJS = $(SRCS:.c=.o) DEPS = $(SRCS:.c=.d) diff --git a/cromemcosim/srcsim/Makefile b/cromemcosim/srcsim/Makefile index 94957ece..2be6c35e 100644 --- a/cromemcosim/srcsim/Makefile +++ b/cromemcosim/srcsim/Makefile @@ -6,6 +6,8 @@ MACHINE = cromemco # emulate a machine's frontpanel FRONTPANEL ?= YES +# show an introspection panel +INFOPANEL ?= YES # use SDL2 instead of X11 WANT_SDL ?= NO # machine specific system source files @@ -54,11 +56,16 @@ VPATH = $(CORE_DIR) $(IO_DIR) $(FP_DIR) $(NET_DIR) $(CIV_DIR) include $(CORE_DIR)/Makefile.in-os ### -### SDL2/X11 PLATFORM VARIABLES +### SDL2/X11 AND INFOPANEL PLATFORM VARIABLES ### ifeq ($(WANT_SDL),YES) +ifeq ($(INFOPANEL),YES) +PLAT_DEFS = -DINFOPANEL -DWANT_SDL +PLAT_SRCS = simpanel.c simsdl.c +else PLAT_DEFS = -DWANT_SDL PLAT_SRCS = simsdl.c +endif ifeq ($(TARGET_OS),BSD) PLAT_INCS = -I/usr/local/include/SDL2 PLAT_LDFLAGS = -L/usr/local/lib @@ -73,6 +80,10 @@ PLAT_LDFLAGS = -Wl,-search_paths_first -Wl,-headerpad_max_install_names \ PLAT_LDLIBS = -framework SDL2 endif else +ifeq ($(INFOPANEL),YES) +PLAT_DEFS = -DINFOPANEL +PLAT_SRCS = simpanel.c +endif ifeq ($(TARGET_OS),BSD) PLAT_INCS = -I/usr/local/include PLAT_LDFLAGS = -L/usr/local/lib @@ -86,7 +97,7 @@ PLAT_LDLIBS = -lX11 endif endif ### -### END SDL2/X11 PLATFORM VARIABLES +### END SDL2/X11 AND INFOPANEL PLATFORM VARIABLES ### ### diff --git a/cromemcosim/srcsim/simctl.c b/cromemcosim/srcsim/simctl.c index e7705ef0..a9099942 100644 --- a/cromemcosim/srcsim/simctl.c +++ b/cromemcosim/srcsim/simctl.c @@ -62,6 +62,12 @@ #include "log.h" static const char *TAG = "system"; + /* cpu_switch states */ +#define CPUSW_STOP 0 /* stopped */ +#define CPUSW_RUN 1 /* running */ +#define CPUSW_STEP 2 /* single step */ +#define CPUSW_STEPCYCLE 3 /* machine cycle step */ + static BYTE fp_led_wait; static BYTE fp_led_speed; static int cpu_switch; @@ -193,14 +199,14 @@ void mon(void) /* run CPU if not idling */ switch (cpu_switch) { - case 1: + case CPUSW_RUN: if (!reset) run_cpu(); break; - case 2: + case CPUSW_STEP: step_cpu(); - if (cpu_switch == 2) - cpu_switch = 0; + if (cpu_switch == CPUSW_STEP) + cpu_switch = CPUSW_STOP; break; default: break; @@ -280,16 +286,16 @@ static void run_clicked(int state, int val) switch (state) { case FP_SW_UP: if (cpu_state != ST_CONTIN_RUN) { - cpu_state = ST_CONTIN_RUN; + cpu_state = ST_STOPPED; fp_led_wait = 0; - cpu_switch = 1; + cpu_switch = CPUSW_RUN; } break; case FP_SW_DOWN: if (cpu_state == ST_CONTIN_RUN) { cpu_state = ST_STOPPED; fp_led_wait = 1; - cpu_switch = 0; + cpu_switch = CPUSW_STOP; } break; default: @@ -313,7 +319,7 @@ static void step_clicked(int state, int val) switch (state) { case FP_SW_UP: case FP_SW_DOWN: - cpu_switch = 2; + cpu_switch = CPUSW_STEP; break; default: break; @@ -326,6 +332,7 @@ static void step_clicked(int state, int val) bool wait_step(void) { bool ret = false; + uint64_t t1, t2; if (cpu_state != ST_SINGLE_STEP) { cpu_bus &= ~CPU_M1; @@ -338,9 +345,10 @@ bool wait_step(void) return ret; } - cpu_switch = 3; + cpu_switch = CPUSW_STEPCYCLE; - while ((cpu_switch == 3) && !reset) { + t1 = get_clock_us(); + while ((cpu_switch == CPUSW_STEPCYCLE) && !reset) { /* when INP update data bus LEDs */ if (cpu_bus == (CPU_WO | CPU_INP)) { if (port_in[fp_led_address & 0xff]) @@ -351,6 +359,9 @@ bool wait_step(void) fp_sampleData(); sleep_for_ms(10); ret = true; + t2 = get_clock_us(); + cpu_time -= t2 - t1; + t1 = t2; } cpu_bus &= ~CPU_M1; @@ -363,15 +374,21 @@ bool wait_step(void) */ void wait_int_step(void) { + uint64_t t1, t2; + if (cpu_state != ST_SINGLE_STEP) return; - cpu_switch = 3; + cpu_switch = CPUSW_STEPCYCLE; - while ((cpu_switch == 3) && !reset) { + t1 = get_clock_us(); + while ((cpu_switch == CPUSW_STEPCYCLE) && !reset) { fp_clock++; fp_sampleData(); sleep_for_ms(10); + t2 = get_clock_us(); + cpu_time -= t2 - t1; + t1 = t2; } } @@ -507,7 +524,7 @@ static void power_clicked(int state, int val) if (!power) break; power = 0; - cpu_switch = 0; + cpu_switch = CPUSW_STOP; cpu_state = ST_STOPPED; cpu_error = POWEROFF; break; @@ -522,7 +539,7 @@ static void power_clicked(int state, int val) static void quit_callback(void) { power = 0; - cpu_switch = 0; + cpu_switch = CPUSW_STOP; cpu_state = ST_STOPPED; cpu_error = POWEROFF; } diff --git a/imsaisim/srcsim/Makefile b/imsaisim/srcsim/Makefile index 349b9cc0..d2ac7da7 100644 --- a/imsaisim/srcsim/Makefile +++ b/imsaisim/srcsim/Makefile @@ -6,6 +6,8 @@ MACHINE = imsai # emulate a machine's frontpanel FRONTPANEL ?= YES +# show an introspection panel +INFOPANEL ?= YES # use SDL2 instead of X11 WANT_SDL ?= NO # machine specific system source files @@ -55,11 +57,16 @@ VPATH = $(CORE_DIR) $(IO_DIR) $(IO_DIR)/apu $(FP_DIR) $(NET_DIR) $(CIV_DIR) include $(CORE_DIR)/Makefile.in-os ### -### SDL2/X11 PLATFORM VARIABLES +### SDL2/X11 AND INFOPANEL PLATFORM VARIABLES ### ifeq ($(WANT_SDL),YES) +ifeq ($(INFOPANEL),YES) +PLAT_DEFS = -DINFOPANEL -DWANT_SDL +PLAT_SRCS = simpanel.c simsdl.c +else PLAT_DEFS = -DWANT_SDL PLAT_SRCS = simsdl.c +endif ifeq ($(TARGET_OS),BSD) PLAT_INCS = -I/usr/local/include/SDL2 PLAT_LDFLAGS = -L/usr/local/lib @@ -74,6 +81,10 @@ PLAT_LDFLAGS = -Wl,-search_paths_first -Wl,-headerpad_max_install_names \ PLAT_LDLIBS = -framework SDL2 endif else +ifeq ($(INFOPANEL),YES) +PLAT_DEFS = -DINFOPANEL +PLAT_SRCS = simpanel.c +endif ifeq ($(TARGET_OS),BSD) PLAT_INCS = -I/usr/local/include PLAT_LDFLAGS = -L/usr/local/lib @@ -87,7 +98,7 @@ PLAT_LDLIBS = -lX11 endif endif ### -### END SDL2/X11 PLATFORM VARIABLES +### END SDL2/X11 AND INFOPANEL PLATFORM VARIABLES ### ### diff --git a/imsaisim/srcsim/simctl.c b/imsaisim/srcsim/simctl.c index 634d9d5f..09b7b1c0 100644 --- a/imsaisim/srcsim/simctl.c +++ b/imsaisim/srcsim/simctl.c @@ -68,6 +68,12 @@ #include "log.h" static const char *TAG = "system"; + /* cpu_switch states */ +#define CPUSW_STOP 0 /* stopped */ +#define CPUSW_RUN 1 /* running */ +#define CPUSW_STEP 2 /* single step */ +#define CPUSW_STEPCYCLE 3 /* machine cycle step */ + static BYTE fp_led_wait; static int cpu_switch; static int reset; @@ -194,14 +200,14 @@ void mon(void) fp_sampleData(); switch (cpu_switch) { - case 1: + case CPUSW_RUN: if (!reset) run_cpu(); break; - case 2: + case CPUSW_STEP: step_cpu(); - if (cpu_switch == 2) - cpu_switch = 0; + if (cpu_switch == CPUSW_STEP) + cpu_switch = CPUSW_STOP; break; default: break; @@ -281,16 +287,16 @@ static void run_clicked(int state, int val) switch (state) { case FP_SW_UP: if (cpu_state != ST_CONTIN_RUN) { - cpu_state = ST_CONTIN_RUN; + cpu_state = ST_STOPPED; /* get out of ST_SINGLE_STEP */ fp_led_wait = 0; - cpu_switch = 1; + cpu_switch = CPUSW_RUN; } break; case FP_SW_DOWN: if (cpu_state == ST_CONTIN_RUN) { cpu_state = ST_STOPPED; fp_led_wait = 1; - cpu_switch = 0; + cpu_switch = CPUSW_STOP; } break; default: @@ -314,7 +320,7 @@ static void step_clicked(int state, int val) switch (state) { case FP_SW_UP: case FP_SW_DOWN: - cpu_switch = 2; + cpu_switch = CPUSW_STEP; break; default: break; @@ -327,6 +333,7 @@ static void step_clicked(int state, int val) bool wait_step(void) { bool ret = false; + uint64_t t1, t2; if (cpu_state != ST_SINGLE_STEP) { cpu_bus &= ~CPU_M1; @@ -339,9 +346,10 @@ bool wait_step(void) return ret; } - cpu_switch = 3; + cpu_switch = CPUSW_STEPCYCLE; - while ((cpu_switch == 3) && !reset) { + t1 = get_clock_us(); + while ((cpu_switch == CPUSW_STEPCYCLE) && !reset) { /* when INP update data bus LEDs */ if (cpu_bus == (CPU_WO | CPU_INP)) { if (port_in[fp_led_address & 0xff]) @@ -352,6 +360,9 @@ bool wait_step(void) fp_sampleData(); sleep_for_ms(10); ret = true; + t2 = get_clock_us(); + cpu_time -= t2 - t1; + t1 = t2; } cpu_bus &= ~CPU_M1; @@ -364,16 +375,21 @@ bool wait_step(void) */ void wait_int_step(void) { + uint64_t t1, t2; + if (cpu_state != ST_SINGLE_STEP) return; - cpu_switch = 3; + cpu_switch = CPUSW_STEPCYCLE; - while ((cpu_switch == 3) && !reset) { + t1 = get_clock_us(); + while ((cpu_switch == CPUSW_STEPCYCLE) && !reset) { fp_clock++; fp_sampleData(); - sleep_for_ms(10); + t2 = get_clock_us(); + cpu_time -= t2 - t1; + t1 = t2; } } @@ -508,7 +524,7 @@ static void power_clicked(int state, int val) if (!power) break; power = 0; - cpu_switch = 0; + cpu_switch = CPUSW_STOP; cpu_state = ST_STOPPED; cpu_error = POWEROFF; break; @@ -523,7 +539,7 @@ static void power_clicked(int state, int val) static void quit_callback(void) { power = 0; - cpu_switch = 0; + cpu_switch = CPUSW_STOP; cpu_state = ST_STOPPED; cpu_error = POWEROFF; } diff --git a/intelmdssim/srcsim/Makefile b/intelmdssim/srcsim/Makefile index 7c16120c..c39e7b97 100644 --- a/intelmdssim/srcsim/Makefile +++ b/intelmdssim/srcsim/Makefile @@ -6,6 +6,8 @@ MACHINE = intelmds # emulate a machine's frontpanel FRONTPANEL ?= YES +# show an introspection panel +INFOPANEL ?= YES # use SDL2 instead of X11 WANT_SDL ?= NO # machine specific system source files @@ -46,11 +48,16 @@ VPATH = $(CORE_DIR) $(IO_DIR) $(FP_DIR) include $(CORE_DIR)/Makefile.in-os ### -### SDL2/X11 PLATFORM VARIABLES +### SDL2/X11 AND INFOPANEL PLATFORM VARIABLES ### ifeq ($(WANT_SDL),YES) +ifeq ($(INFOPANEL),YES) +PLAT_DEFS = -DINFOPANEL -DWANT_SDL +PLAT_SRCS = simpanel.c simsdl.c +else PLAT_DEFS = -DWANT_SDL PLAT_SRCS = simsdl.c +endif ifeq ($(TARGET_OS),BSD) PLAT_INCS = -I/usr/local/include/SDL2 PLAT_LDFLAGS = -L/usr/local/lib @@ -65,6 +72,10 @@ PLAT_LDFLAGS = -Wl,-search_paths_first -Wl,-headerpad_max_install_names \ PLAT_LDLIBS = -framework SDL2 endif else +ifeq ($(INFOPANEL),YES) +PLAT_DEFS = -DINFOPANEL +PLAT_SRCS = simpanel.c +endif ifeq ($(TARGET_OS),BSD) PLAT_INCS = -I/usr/local/include PLAT_LDFLAGS = -L/usr/local/lib @@ -78,7 +89,7 @@ PLAT_LDLIBS = -lX11 endif endif ### -### END SDL2/X11 PLATFORM VARIABLES +### END SDL2/X11 AND INFOPANEL PLATFORM VARIABLES ### ### diff --git a/intelmdssim/srcsim/simctl.c b/intelmdssim/srcsim/simctl.c index a721372e..3b686751 100644 --- a/intelmdssim/srcsim/simctl.c +++ b/intelmdssim/srcsim/simctl.c @@ -97,7 +97,7 @@ void mon(void) /* bind frontpanel LED's to variables */ fp_bindLight8("LED_INT_{0-7}", &int_requests, 1); fp_bindLight8("LED_PWR", &power, 1); - fp_bindLight8("LED_RUN", &cpu_state, 1 /* CONTIN_RUN */); + fp_bindLight8("LED_RUN", &cpu_state, 1 /* ST_CONTIN_RUN */); fp_bindLight8("LED_HALT", &cpu_bus, 4 /* CPU_HLTA */) ; /* bind frontpanel switches to variables */ diff --git a/iodevices/imsai-vio.c b/iodevices/imsai-vio.c index 5dbdeb4f..0b0fc914 100644 --- a/iodevices/imsai-vio.c +++ b/iodevices/imsai-vio.c @@ -74,7 +74,7 @@ static int vio_win_id = -1; static SDL_Window *window; static SDL_Renderer *renderer; static SDL_Texture *texture; -static void *pixels; +static uint8_t *pixels; static int pitch; static uint8_t color[3]; static char keybuf[KEYBUF_LEN]; /* typeahead buffer */ @@ -245,7 +245,7 @@ static inline void set_bg_color(void) static inline void draw_point(int x, int y) { - uint8_t *p = (uint8_t *) pixels + y * pitch + x * 4; + uint8_t *p = pixels + y * pitch + x * 4; p[3] = color[0]; p[2] = color[1]; @@ -671,7 +671,7 @@ static void update_display(bool tick) UNUSED(tick); /* update display window */ - SDL_LockTexture(texture, NULL, &pixels, &pitch); + SDL_LockTexture(texture, NULL, (void **) &pixels, &pitch); refresh(); SDL_UnlockTexture(texture); SDL_RenderCopy(renderer, texture, NULL, NULL); diff --git a/iodevices/proctec-vdm.c b/iodevices/proctec-vdm.c index 83d92d16..eef8fd42 100644 --- a/iodevices/proctec-vdm.c +++ b/iodevices/proctec-vdm.c @@ -62,7 +62,7 @@ static int proctec_win_id = -1; static SDL_Window *window; static SDL_Renderer *renderer; static SDL_Texture *texture; -static void *pixels; +static uint8_t *pixels; static int pitch; static uint8_t color[3]; static char keybuf[KEYBUF_LEN]; /* typeahead buffer */ @@ -280,7 +280,7 @@ static inline void set_bg_color(void) static inline void draw_point(int x, int y) { - uint8_t *p = (uint8_t *) pixels + y * pitch + x * 4; + uint8_t *p = pixels + y * pitch + x * 4; p[3] = color[0]; p[2] = color[1]; @@ -393,7 +393,7 @@ static void update_display(bool tick) if (state) { /* update display window */ - SDL_LockTexture(texture, NULL, &pixels, &pitch); + SDL_LockTexture(texture, NULL, (void **) &pixels, &pitch); refresh(); SDL_UnlockTexture(texture); SDL_RenderCopy(renderer, texture, NULL, NULL); diff --git a/mosteksim/srcsim/Makefile b/mosteksim/srcsim/Makefile index a2d785e5..625b3016 100644 --- a/mosteksim/srcsim/Makefile +++ b/mosteksim/srcsim/Makefile @@ -4,6 +4,10 @@ # (simple) machine name - will be suffixed with 'sim' # and the executable saved as '../machinesim' MACHINE = mostek +# show an introspection panel +INFOPANEL ?= NO +# use SDL2 instead of X11 +WANT_SDL ?= NO # machine specific system source files MACHINE_SRCS = simcfg.c simio.c simmem.c simctl.c # machine specific I/O source files @@ -39,9 +43,49 @@ VPATH = $(CORE_DIR) $(IO_DIR) include $(CORE_DIR)/Makefile.in-os +### +### SDL2/X11 INFOPANEL PLATFORM VARIABLES +### +ifeq ($(INFOPANEL),YES) +ifeq ($(WANT_SDL),YES) +PLAT_DEFS = -DINFOPANEL -DWANT_SDL +PLAT_SRCS = simpanel.c simsdl.c +ifeq ($(TARGET_OS),BSD) +PLAT_INCS = -I/usr/local/include/SDL2 +PLAT_LDFLAGS = -L/usr/local/lib +PLAT_LDLIBS = -lSDL2 -lSDL2main +else ifeq ($(TARGET_OS),LINUX) +PLAT_INCS = -I/usr/include/SDL2 +PLAT_LDLIBS = -lSDL2 -lSDL2main +else ifeq ($(TARGET_OS),OSX) +PLAT_INCS = -F/Library/Frameworks -I/Library/Frameworks/SDL2.framework/Headers +PLAT_LDFLAGS = -Wl,-search_paths_first -Wl,-headerpad_max_install_names \ + -Wl,-rpath,/Library/Frameworks +PLAT_LDLIBS = -framework SDL2 +endif +else +PLAT_DEFS = -DINFOPANEL +PLAT_SRCS = simpanel.c +ifeq ($(TARGET_OS),BSD) +PLAT_INCS = -I/usr/local/include +PLAT_LDFLAGS = -L/usr/local/lib +PLAT_LDLIBS = -lX11 -lpthread +else ifeq ($(TARGET_OS),LINUX) +PLAT_LDLIBS = -lX11 -lpthread +else ifeq ($(TARGET_OS),OSX) +PLAT_INCS = -I/opt/X11/include -I/opt/local/include -I/usr/local/include +PLAT_LDFLAGS = -L/opt/X11/lib -L/usr/local/lib +PLAT_LDLIBS = -lX11 -lpthread +endif +endif +endif +### +### END INFOPANEL SDL2/X11 PLATFORM VARIABLES +### + DEFS = -DCONFDIR=\"$(CONF_DIR)\" -DDISKSDIR=\"$(DISKS_DIR)\" \ - -DBOOTROM=\"$(ROMS_DIR)\" -INCS = -I. -I$(CORE_DIR) -I$(IO_DIR) + -DBOOTROM=\"$(ROMS_DIR)\" $(PLAT_DEFS) +INCS = -I. -I$(CORE_DIR) -I$(IO_DIR) $(PLAT_INCS) CPPFLAGS = $(DEFS) $(INCS) CSTDS = -std=c99 -D_DEFAULT_SOURCE # -D_XOPEN_SOURCE=700L @@ -62,8 +106,8 @@ endif CFLAGS = $(CSTDS) $(COPTS) $(CWARNS) -LDFLAGS = -LDLIBS = +LDFLAGS = $(PLAT_LD_FLAGS) +LDLIBS = $(PLAT_LDLIBS) INSTALL = install INSTALL_PROGRAM = $(INSTALL) @@ -73,7 +117,7 @@ INSTALL_DATA = $(INSTALL) -m 644 CORE_SRCS = sim8080.c simcore.c simdis.c simfun.c simglb.c simice.c simint.c \ simmain.c simz80.c simz80-cb.c simz80-dd.c simz80-ddcb.c simz80-ed.c \ simz80-fd.c simz80-fdcb.c -SRCS = $(CORE_SRCS) $(MACHINE_SRCS) $(IO_SRCS) +SRCS = $(CORE_SRCS) $(MACHINE_SRCS) $(IO_SRCS) $(PLAT_SRCS) OBJS = $(SRCS:.c=.o) DEPS = $(SRCS:.c=.d) diff --git a/picosim/srcsim/picosim.c b/picosim/srcsim/picosim.c index 5dddccda..7cee05df 100644 --- a/picosim/srcsim/picosim.c +++ b/picosim/srcsim/picosim.c @@ -231,7 +231,7 @@ int main(void) /* reset machine */ watchdog_reboot(0, 0, 0); - for (;;) { + while (true) { __nop(); } } @@ -246,7 +246,7 @@ bool get_cmdline(char *buf, int len) int i = 0; char c; - for (;;) { + while (true) { c = getchar(); if ((c == BS) || (c == DEL)) { if (i >= 1) { diff --git a/picosim/srcsim/simcfg.c b/picosim/srcsim/simcfg.c index f8356c5d..0c273883 100644 --- a/picosim/srcsim/simcfg.c +++ b/picosim/srcsim/simcfg.c @@ -65,7 +65,7 @@ static int get_int(const char *prompt, const char *hint, int i; char s[6]; - for (;;) { + while (true) { printf("Enter %s%s: ", prompt, hint); get_cmdline(s, 5); if (s[0] == '\0') diff --git a/z80core/alt8080.h b/z80core/alt8080.h index 2c70b89b..1c179001 100644 --- a/z80core/alt8080.h +++ b/z80core/alt8080.h @@ -76,7 +76,6 @@ BYTE t, res, cout, P; cpu_reg_t w; /* working register */ - uint64_t clk; #define W w.w #define WH w.h @@ -743,8 +742,6 @@ #ifdef BUS_8080 cpu_bus = CPU_WO | CPU_HLTA | CPU_MEMR; #endif - - clk = get_clock_us(); #ifdef FRONTPANEL if (!F_flag) { #endif @@ -765,9 +762,7 @@ cpu_bus = CPU_INTA | CPU_WO | CPU_HLTA | CPU_M1; #endif - busy_loop_cnt = 0; - #ifdef FRONTPANEL } else { fp_led_address = 0xffff; @@ -801,8 +796,7 @@ } } } -#endif - cpu_time -= get_clock_us() - clk; +#endif /* FRONTPANEL */ t += 3; break; diff --git a/z80core/altz80.h b/z80core/altz80.h index a28f4976..fdc8d6fa 100644 --- a/z80core/altz80.h +++ b/z80core/altz80.h @@ -85,7 +85,6 @@ #endif cpu_reg_t w; /* working register */ cpu_reg_t ir; /* current index register (HL, IX, IY) */ - uint64_t clk; #define W w.w #define WH w.h @@ -805,8 +804,6 @@ #ifdef BUS_8080 cpu_bus = CPU_WO | CPU_HLTA | CPU_MEMR; #endif - - clk = get_clock_us(); #ifdef FRONTPANEL if (!F_flag) { #endif @@ -828,9 +825,7 @@ cpu_bus = CPU_INTA | CPU_WO | CPU_HLTA | CPU_M1; #endif - busy_loop_cnt = 0; - #ifdef FRONTPANEL } else { fp_led_address = 0xffff; @@ -867,8 +862,7 @@ } } } -#endif - cpu_time -= get_clock_us() - clk; +#endif /* FRONTPANEL */ break; case 0x77: /* LD (ir),A */ @@ -1383,11 +1377,9 @@ #endif #ifdef FRONTPANEL if (F_flag) { - clk = get_clock_us(); /* update frontpanel */ fp_clock++; fp_sampleLightGroup(0, 0); - cpu_time -= get_clock_us() - clk; } #endif @@ -1627,11 +1619,9 @@ #endif #ifdef FRONTPANEL if (F_flag) { - clk = get_clock_us(); /* update frontpanel */ fp_clock++; fp_sampleLightGroup(0, 0); - cpu_time -= get_clock_us() - clk; } #endif @@ -1725,11 +1715,9 @@ #endif #ifdef FRONTPANEL if (F_flag) { - clk = get_clock_us(); /* update frontpanel */ fp_clock++; fp_sampleLightGroup(0, 0); - cpu_time -= get_clock_us() - clk; } #endif @@ -2405,11 +2393,9 @@ #endif #ifdef FRONTPANEL if (F_flag) { - clk = get_clock_us(); /* update frontpanel */ fp_clock++; fp_sampleLightGroup(0, 0); - cpu_time -= get_clock_us() - clk; } #endif diff --git a/z80core/fonts/Makefile b/z80core/fonts/Makefile new file mode 100644 index 00000000..fede3657 --- /dev/null +++ b/z80core/fonts/Makefile @@ -0,0 +1,39 @@ +PROJECT = terminus-font +VERSION = 4.49.1 +SFDIR = $(PROJECT)-$(basename $(VERSION)) +SRCDIR = $(PROJECT)-$(VERSION) +SRCFILE = $(SRCDIR).tar.gz +URL = https://downloads.sourceforge.net/project/$(PROJECT)/$(SFDIR)/$(SRCFILE) + +CFLAGS = -O -Wall -Wextra + +all: + @echo "If you really want to regenerate the fonts use \"make fonts\"" + +fonts: bdf2c $(SRCFILE) + @echo "Generating font*.h and OFL.TXT files..." + @set -e; tar -x -f $(SRCFILE); \ + cd $(SRCDIR); \ + patch -s -p1 -i alt/td1.diff; \ + ../bdf2c ter-u12n.bdf > ../font12.h; \ + ../bdf2c ter-u14b.bdf > ../font14.h; \ + ../bdf2c ter-u16b.bdf > ../font16.h; \ + ../bdf2c ter-u18b.bdf > ../font18.h; \ + ../bdf2c ter-u20b.bdf > ../font20.h; \ + ../bdf2c ter-u22b.bdf > ../font22.h; \ + ../bdf2c ter-u24b.bdf > ../font24.h; \ + ../bdf2c ter-u28b.bdf > ../font28.h; \ + ../bdf2c ter-u32b.bdf > ../font32.h; \ + tr -d '\r' < OFL.TXT > ../OFL.TXT; \ + cd ..; \ + rm -rf $(SRCDIR) + +bdf2c: bdf2c.c + +$(SRCFILE): + curl -LO $(URL) + +clean: + rm -f bdf2c $(SRCFILE) + +.PHONY: all fonts clean diff --git a/z80core/fonts/OFL.TXT b/z80core/fonts/OFL.TXT new file mode 100644 index 00000000..a5c2627a --- /dev/null +++ b/z80core/fonts/OFL.TXT @@ -0,0 +1,94 @@ +Copyright (C) 2020 Dimitar Toshkov Zhekov, +with Reserved Font Name "Terminus Font". + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/z80core/fonts/bdf2c.c b/z80core/fonts/bdf2c.c new file mode 100644 index 00000000..7e631115 --- /dev/null +++ b/z80core/fonts/bdf2c.c @@ -0,0 +1,220 @@ +/* + * Program to generate pixmap font file from BDF font. + * Not very robust parsing, works with the Terminus fonts. + * + * Copyright (C) 2024 by Thomas Eberhardt + */ + +#include +#include +#include +#include +#include +#include +#include + +#define STRSIZE 100 +#define NUMCHARS 128 + +/* uni/x11gr.uni and uni/ascii-h.uni */ +static uint16_t codepts[NUMCHARS] = { + 0x25AE, 0x25C6, 0x2592, 0x2409, 0x240C, 0x240D, 0x240A, 0x00B0, + 0x00B1, 0x2424, 0x240B, 0x2518, 0x2510, 0x250C, 0x2514, 0x253C, + 0x23BA, 0x23BB, 0x2500, 0x23BC, 0x23BD, 0x251C, 0x2524, 0x2534, + 0x252C, 0x2502, 0x2264, 0x2265, 0x03C0, 0x2260, 0x00A3, 0x00B7, + 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, + 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F, + 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, + 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F, + 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, + 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F, + 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, + 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F, + 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, + 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F, + 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, + 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x2302 +}; + +static char *prog; + +#define MISSFONT "missing font file name" +#define CANTOPEN "can't open font file" +#define OUTOFMEM "out of memory" +#define EOFINPUT "end of file on input" + +static void fatal(char *s) +{ + fprintf(stderr, "%s: %s\n", prog, s); + exit(EXIT_FAILURE); +} + +static char *get_token(char *s, char *token) +{ + while (!isspace((unsigned char) *s) && *s != '\n' && *s != '\0') + *token++ = *s++; + while (isspace((unsigned char) *s)) + s++; + *token = '\0'; + return s; +} + +static char *copy_str(char *s) +{ + char *p, *t; + int n; + + if (*s == '"') + s++; + p = s; + while (*p != '"' && *p != '\n' && *p != '\0') + p++; + n = p - s; + + t = (char *) malloc(n + 1); + if (t != NULL) { + strncpy(t, s, n); + t[n] = '\0'; + } + return t; +} + +int main(int argc, char *argv[]) +{ + char line[STRSIZE], token[STRSIZE]; + FILE *fp; + char *copyright = NULL, *notice = NULL; + char *family = NULL, *weight = NULL; + char *s; + int size = 0, fbboxw = 0, fbboxh = 0, fbboxl = 0, fbboxb = 0; + int ch = 0, bboxw = 0, bboxh = 0, bboxl = 0, bboxb = 0; + int stride, codept, i, j, off; + uint8_t *bitmap, *p, *p0, m, m0, c, mc; + + prog = argv[0]; + if (argc < 2) + fatal(MISSFONT); + + if ((fp = fopen(argv[1], "r")) == NULL) + fatal(CANTOPEN); + + /* read font properties */ + while (true) { + if (fgets(line, STRSIZE, fp) == NULL) + fatal(EOFINPUT); + s = get_token(line, token); + if (!strcmp(token, "CHARS")) + break; + else if (!strcmp(token, "FONTBOUNDINGBOX")) { + sscanf(s, "%d %d %d %d", + &fbboxw, &fbboxh, &fbboxl, &fbboxb); + } else if (!strcmp(token, "PIXEL_SIZE")) { + sscanf(s, "%d", &size); + } else if (!strcmp(token, "COPYRIGHT")) { + if ((copyright = copy_str(s)) == NULL) + fatal(OUTOFMEM); + } else if (!strcmp(token, "NOTICE")) { + if ((notice = copy_str(s)) == NULL) + fatal(OUTOFMEM); + } else if (!strcmp(token, "FAMILY_NAME")) { + if ((family = copy_str(s)) == NULL) + fatal(OUTOFMEM); + } else if (!strcmp(token, "WEIGHT_NAME")) { + if ((weight = copy_str(s)) == NULL) + fatal(OUTOFMEM); + } + } + + if (fbboxw == 0 || fbboxh == 0 || size == 0 || copyright == NULL || + notice == NULL || family == NULL || weight == NULL) + fatal("missing font properties"); + + /* allocate bitmap */ + stride = (fbboxw * NUMCHARS + 1) / 8; + bitmap = (uint8_t *) calloc(stride * fbboxh, sizeof(uint8_t)); + if (bitmap == NULL) + fatal(OUTOFMEM); + + /* read font characters and draw them into the bitmap */ + while (true) { + if (fgets(line, STRSIZE, fp) == NULL) + fatal(EOFINPUT); + s = get_token(line, token); + if (!strcmp(token, "ENDFONT")) + break; + else if (!strcmp(token, "ENCODING")) { + sscanf(s, "%d", &codept); + /* convert codepoint to font character index */ + for (ch = 0; ch < NUMCHARS; ch++) + if (codept == codepts[ch]) + break; + } else if (!strcmp(token, "BBX")) { + sscanf(s, "%d %d %d %d", + &bboxw, &bboxh, &bboxl, &bboxb); + } else if (!strcmp(token, "BITMAP") && ch < NUMCHARS) { + off = ch * bboxw; + p0 = bitmap + (off >> 3); + m0 = 0x80 >> (off & 7); + for (j = 0; j < bboxh; j++) { + m = m0; + p = p0; + if ((s = fgets(line, STRSIZE, fp)) == NULL) + fatal(EOFINPUT); + mc = c = 0; + for (i = 0; i < bboxw; i++) { + if ((mc >>= 1) == 0) { + /* get next hex char */ + c = *s++; + c -= (c <= '9' ? '0' + : 'A' - 10); + mc = 0x8; + } + if (c & mc) + *p |= m; + if ((m >>= 1) == 0) { + m = 0x80; + p++; + } + } + p0 += stride; + } + } + } + + fclose(fp); + + /* generate font C code */ + printf("/*\n"); + printf(" * Automatically generated from %s with %s\n", + basename(argv[1]), basename(prog)); + printf(" * ASCII subset of %s %s %d\n", family, weight, size); + printf(" *\n"); + printf(" * %s\n", copyright); + printf(" *\n"); + printf(" * %s\n", notice); + printf(" */\n\n"); + printf("static const uint8_t font%d_bits[] = {", size); + p = bitmap; + for (i = 0; i < stride * fbboxh; i++) { + if (i == 0) + printf("\n\t"); + else { + printf(","); + if (i % 12 == 0) + printf("\n\t"); + else + printf(" "); + } + printf("0x%02x", *p++); + } + printf("\n};\n\n"); + printf("static const font_t font%d = {\n", size); + printf("\t.bits = font%d_bits,\n", size); + printf("\t.depth = 1,\n"); + printf("\t.width = %d,\n", fbboxw); + printf("\t.height = %d,\n", fbboxh); + printf("\t.stride = %d\n", stride); + printf("};\n"); + + exit(EXIT_SUCCESS); +} diff --git a/z80core/fonts/font12.h b/z80core/fonts/font12.h new file mode 100644 index 00000000..4045fdbf --- /dev/null +++ b/z80core/fonts/font12.h @@ -0,0 +1,115 @@ +/* + * Automatically generated from ter-u12n.bdf with bdf2c + * ASCII subset of Terminus Medium 12 + * + * Copyright (C) 2020 Dimitar Toshkov Zhekov + * + * Licensed under the SIL Open Font License, Version 1.1 + */ + +static const uint8_t font12_bits[] = { + 0x00, 0x0a, 0xa4, 0xf1, 0x88, 0x00, 0x02, 0x48, 0x88, 0x00, 0x02, 0x08, + 0xfc, 0x00, 0x00, 0x00, 0x82, 0x08, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x05, 0x64, 0x82, 0x48, 0x08, 0x03, 0x48, 0x88, 0x00, 0x02, 0x08, + 0x00, 0x00, 0x00, 0x00, 0x82, 0x08, 0x00, 0x81, 0x10, 0x00, 0x00, 0x00, + 0x00, 0x05, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, + 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xf8, 0x0a, 0xbc, 0xe2, 0x08, 0x14, 0x02, 0xc8, 0x88, 0x00, 0x02, 0x08, + 0x00, 0x00, 0x00, 0x00, 0x82, 0x08, 0x00, 0x82, 0x08, 0x00, 0x03, 0x00, + 0x00, 0x85, 0x14, 0x21, 0x22, 0x08, 0x11, 0x00, 0x00, 0x00, 0x00, 0x02, + 0x70, 0x87, 0x1c, 0x0b, 0xe7, 0x3e, 0x71, 0xc0, 0x00, 0x00, 0x00, 0x1c, + 0x71, 0xcf, 0x1c, 0xe3, 0xef, 0x9c, 0x89, 0xc3, 0xa2, 0x82, 0x28, 0x9c, + 0xf1, 0xcf, 0x1c, 0xfa, 0x28, 0xa2, 0x8a, 0x2f, 0x9c, 0x41, 0xc5, 0x00, + 0x00, 0x08, 0x00, 0x08, 0x01, 0x80, 0x80, 0x80, 0x90, 0x60, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x06, 0x21, 0x80, 0x00, + 0xf8, 0x85, 0x64, 0x82, 0x48, 0x08, 0x22, 0x45, 0x08, 0x00, 0x02, 0x08, + 0x03, 0xf0, 0x00, 0x00, 0x82, 0x08, 0x00, 0x84, 0x04, 0x00, 0x24, 0x80, + 0x00, 0x85, 0x14, 0x72, 0xa5, 0x08, 0x20, 0x80, 0x00, 0x00, 0x00, 0x02, + 0x89, 0x88, 0xa2, 0x1a, 0x08, 0x02, 0x8a, 0x20, 0x00, 0x08, 0x04, 0x22, + 0x8a, 0x28, 0xa2, 0x92, 0x08, 0x22, 0x88, 0x81, 0x24, 0x83, 0x68, 0xa2, + 0x8a, 0x28, 0xa2, 0x22, 0x28, 0xa2, 0x8a, 0x20, 0x90, 0x40, 0x48, 0x80, + 0x00, 0x08, 0x00, 0x08, 0x02, 0x00, 0x80, 0x00, 0x10, 0x20, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x08, 0x20, 0x40, 0x00, + 0xf9, 0xca, 0xa4, 0x81, 0x8f, 0x00, 0x22, 0x42, 0x08, 0x00, 0x02, 0x08, + 0x00, 0x00, 0x00, 0x00, 0x82, 0x08, 0x00, 0x88, 0x02, 0xfb, 0xe4, 0x00, + 0x00, 0x80, 0x3e, 0xa9, 0x45, 0x00, 0x40, 0x45, 0x08, 0x00, 0x00, 0x04, + 0x98, 0x88, 0x82, 0x2a, 0x08, 0x02, 0x8a, 0x22, 0x08, 0x13, 0xe2, 0x22, + 0x9a, 0x28, 0xa0, 0x8a, 0x08, 0x20, 0x88, 0x81, 0x28, 0x82, 0xac, 0xa2, + 0x8a, 0x28, 0xa0, 0x22, 0x28, 0xa2, 0x51, 0x41, 0x10, 0x20, 0x40, 0x00, + 0x01, 0xcf, 0x1c, 0x79, 0xc7, 0x1e, 0xf1, 0x81, 0x92, 0x23, 0xcf, 0x1c, + 0xf1, 0xeb, 0x9e, 0x72, 0x28, 0xa2, 0x8a, 0x2f, 0x88, 0x20, 0x40, 0x08, + 0xfb, 0xe5, 0x40, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x38, 0xe0, 0xf3, 0xff, + 0x00, 0x0f, 0xc0, 0x00, 0xfe, 0x3f, 0xfc, 0x84, 0x04, 0x88, 0x8f, 0x08, + 0x00, 0x80, 0x14, 0xa0, 0x42, 0x00, 0x40, 0x42, 0x08, 0x00, 0x00, 0x04, + 0xa8, 0x80, 0x8c, 0x4b, 0xcf, 0x04, 0x72, 0x22, 0x08, 0x20, 0x01, 0x04, + 0xaa, 0x2f, 0x20, 0x8b, 0xcf, 0x20, 0xf8, 0x81, 0x30, 0x82, 0xaa, 0xa2, + 0x8a, 0x28, 0x9c, 0x22, 0x25, 0x22, 0x21, 0x42, 0x10, 0x20, 0x40, 0x00, + 0x00, 0x28, 0xa2, 0x8a, 0x22, 0x22, 0x88, 0x80, 0x94, 0x22, 0xa8, 0xa2, + 0x8a, 0x2c, 0x20, 0x22, 0x28, 0xa2, 0x52, 0x21, 0x10, 0x20, 0x24, 0x94, + 0xf9, 0xca, 0x9f, 0x3c, 0xe3, 0xc0, 0x20, 0x87, 0xc0, 0x20, 0x80, 0x08, + 0x00, 0x00, 0x00, 0x00, 0x82, 0x00, 0x20, 0x82, 0x08, 0x89, 0x04, 0x08, + 0x00, 0x80, 0x14, 0x70, 0x86, 0x80, 0x40, 0x4f, 0xbe, 0x03, 0xe0, 0x08, + 0xc8, 0x81, 0x02, 0x88, 0x28, 0x84, 0x89, 0xe0, 0x00, 0x40, 0x00, 0x88, + 0xab, 0xe8, 0xa0, 0x8a, 0x08, 0x2e, 0x88, 0x81, 0x30, 0x82, 0x29, 0xa2, + 0xf2, 0x2f, 0x02, 0x22, 0x25, 0x2a, 0x20, 0x84, 0x10, 0x10, 0x40, 0x00, + 0x01, 0xe8, 0xa0, 0x8b, 0xe2, 0x22, 0x88, 0x80, 0x98, 0x22, 0xa8, 0xa2, + 0x8a, 0x28, 0x1c, 0x22, 0x25, 0x2a, 0x22, 0x22, 0x08, 0x20, 0x4a, 0xa2, + 0xf8, 0x85, 0x44, 0x20, 0x92, 0x00, 0x20, 0x81, 0x00, 0x20, 0x80, 0x08, + 0x00, 0x00, 0x00, 0x00, 0x82, 0x00, 0x20, 0x81, 0x10, 0x8b, 0xe4, 0x00, + 0x00, 0x00, 0x3e, 0x28, 0xa9, 0x00, 0x40, 0x42, 0x08, 0x00, 0x00, 0x08, + 0x88, 0x82, 0x02, 0xf8, 0x28, 0x88, 0x88, 0x20, 0x00, 0x23, 0xe1, 0x00, + 0x9a, 0x28, 0xa0, 0x8a, 0x08, 0x22, 0x88, 0x89, 0x28, 0x82, 0x28, 0xa2, + 0x82, 0x2a, 0x02, 0x22, 0x25, 0x2a, 0x50, 0x88, 0x10, 0x10, 0x40, 0x00, + 0x02, 0x28, 0xa0, 0x8a, 0x02, 0x22, 0x88, 0x80, 0x98, 0x22, 0xa8, 0xa2, + 0x8a, 0x28, 0x02, 0x22, 0x25, 0x2a, 0x22, 0x24, 0x08, 0x20, 0x49, 0x22, + 0xf8, 0x0a, 0x84, 0x38, 0xe3, 0x80, 0x00, 0x81, 0x00, 0x20, 0x80, 0x08, + 0x00, 0x00, 0x3f, 0x00, 0x82, 0x00, 0x20, 0x80, 0x00, 0x8a, 0x04, 0x80, + 0x00, 0x80, 0x14, 0xa9, 0x59, 0x00, 0x20, 0x85, 0x08, 0x20, 0x02, 0x10, + 0x88, 0x84, 0x22, 0x0a, 0x28, 0x88, 0x88, 0x22, 0x08, 0x10, 0x02, 0x08, + 0x82, 0x28, 0xa2, 0x92, 0x08, 0x22, 0x88, 0x89, 0x24, 0x82, 0x28, 0xa2, + 0x82, 0xa9, 0x22, 0x22, 0x22, 0x36, 0x88, 0x88, 0x10, 0x08, 0x40, 0x00, + 0x02, 0x28, 0xa2, 0x8a, 0x02, 0x22, 0x88, 0x80, 0x94, 0x22, 0xa8, 0xa2, + 0x8a, 0x28, 0x02, 0x22, 0x22, 0x2a, 0x52, 0x28, 0x08, 0x20, 0x40, 0x22, + 0xf8, 0x05, 0x44, 0x20, 0xa2, 0x00, 0xf8, 0x81, 0x00, 0x20, 0x80, 0x08, + 0x00, 0x00, 0x00, 0x00, 0x82, 0x00, 0x20, 0x8f, 0xbe, 0x88, 0x0f, 0x80, + 0x00, 0x80, 0x14, 0x71, 0x26, 0x80, 0x11, 0x00, 0x00, 0x20, 0x02, 0x10, + 0x71, 0xcf, 0x9c, 0x09, 0xc7, 0x08, 0x71, 0xc2, 0x08, 0x08, 0x04, 0x08, + 0x7a, 0x2f, 0x1c, 0xe3, 0xe8, 0x1c, 0x89, 0xc6, 0x22, 0xfa, 0x28, 0x9c, + 0x81, 0xc8, 0x9c, 0x21, 0xc2, 0x22, 0x88, 0x8f, 0x9c, 0x09, 0xc0, 0x00, + 0x01, 0xef, 0x1c, 0x79, 0xe2, 0x1e, 0x89, 0xc0, 0x92, 0x72, 0xa8, 0x9c, + 0xf1, 0xe8, 0x3c, 0x19, 0xe2, 0x1c, 0x89, 0xef, 0x86, 0x21, 0x80, 0x3e, + 0x00, 0x0a, 0x84, 0x20, 0x92, 0x00, 0x00, 0xf1, 0x00, 0x20, 0x80, 0x08, + 0x00, 0x00, 0x00, 0x00, 0x82, 0x00, 0x20, 0x80, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x04, 0x80, 0x00, 0x00, 0x00, + 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x80, 0x08, + 0x00, 0x00, 0x00, 0xfc, 0x82, 0x00, 0x20, 0x80, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, + 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x01, 0xc0, 0x00, 0x00, 0x00, 0x00 +}; + +static const font_t font12 = { + .bits = font12_bits, + .depth = 1, + .width = 6, + .height = 12, + .stride = 96 +}; diff --git a/z80core/fonts/font14.h b/z80core/fonts/font14.h new file mode 100644 index 00000000..8217dbb3 --- /dev/null +++ b/z80core/fonts/font14.h @@ -0,0 +1,169 @@ +/* + * Automatically generated from ter-u14b.bdf with bdf2c + * ASCII subset of Terminus Bold 14 + * + * Copyright (C) 2020 Dimitar Toshkov Zhekov + * + * Licensed under the SIL Open Font License, Version 1.1 + */ + +static const uint8_t font14_bits[] = { + 0x00, 0x00, 0xaa, 0xcc, 0xfc, 0x78, 0xc0, 0x00, 0x00, 0xcc, 0xcc, 0x18, + 0x00, 0x00, 0x18, 0x18, 0xff, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, + 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0xcc, + 0xc0, 0xcc, 0xc0, 0x38, 0x00, 0xec, 0xcc, 0x18, 0x00, 0x00, 0x18, 0x18, + 0xff, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x00, 0x18, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x00, 0x10, 0x00, 0x00, 0x18, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x18, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, 0xaa, 0xfc, 0xf0, 0xc0, 0xc0, 0x6c, + 0x00, 0xfc, 0xcc, 0x18, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x18, 0x18, 0x18, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, + 0x00, 0x18, 0x66, 0x6c, 0x10, 0x66, 0x38, 0x18, 0x0c, 0x30, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x06, 0x7c, 0x18, 0x7c, 0x7c, 0x06, 0xfe, 0x3c, 0xfe, + 0x7c, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x7c, 0x7c, 0xfc, 0x7c, + 0xf8, 0xfe, 0xfe, 0x7c, 0xc6, 0x3c, 0x1e, 0xc6, 0xc0, 0x82, 0xc6, 0x7c, + 0xfc, 0x7c, 0xfc, 0x7c, 0xff, 0xc6, 0xc6, 0xc6, 0xc6, 0xc3, 0xfe, 0x3c, + 0x60, 0x3c, 0x3c, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x06, 0x00, 0x1e, 0x00, + 0xc0, 0x18, 0x06, 0xc0, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x18, 0x70, 0x00, 0x00, + 0xfe, 0x00, 0x55, 0xcc, 0xc0, 0xc0, 0xc0, 0x6c, 0x00, 0xdc, 0xcc, 0x18, + 0x00, 0x00, 0x18, 0x18, 0x00, 0xff, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, + 0x00, 0x18, 0x0c, 0x30, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x18, 0x66, 0x6c, + 0x7c, 0xd6, 0x6c, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, + 0xc6, 0x38, 0xc6, 0xc6, 0x0e, 0xc0, 0x60, 0x06, 0xc6, 0xc6, 0x00, 0x00, + 0x06, 0x00, 0x60, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xcc, 0xc0, 0xc0, 0xc6, + 0xc6, 0x18, 0x0c, 0xc6, 0xc0, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, + 0x18, 0xc6, 0xc6, 0xc6, 0xc6, 0xc3, 0x06, 0x30, 0x60, 0x0c, 0x66, 0x00, + 0x00, 0x00, 0xc0, 0x00, 0x06, 0x00, 0x30, 0x00, 0xc0, 0x18, 0x06, 0xc0, + 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x30, 0x18, 0x18, 0x00, 0x00, 0xfe, 0x18, 0xaa, 0xcc, + 0xc0, 0xcc, 0xc0, 0x38, 0x00, 0xcc, 0x78, 0x18, 0x00, 0x00, 0x18, 0x18, + 0x00, 0xff, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x00, 0x18, 0x18, 0x18, + 0x00, 0x06, 0x60, 0x00, 0x00, 0x18, 0x00, 0x6c, 0xd6, 0x6c, 0x6c, 0x00, + 0x30, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0xc6, 0x78, 0xc6, 0xc6, + 0x1e, 0xc0, 0xc0, 0x06, 0xc6, 0xc6, 0x00, 0x00, 0x0c, 0x00, 0x30, 0xc6, + 0xce, 0xc6, 0xc6, 0xc6, 0xc6, 0xc0, 0xc0, 0xc6, 0xc6, 0x18, 0x0c, 0xcc, + 0xc0, 0xee, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc0, 0x18, 0xc6, 0xc6, 0xc6, + 0x6c, 0x66, 0x06, 0x30, 0x30, 0x0c, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, + 0x06, 0x00, 0x30, 0x00, 0xc0, 0x00, 0x00, 0xc0, 0x18, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, + 0x18, 0x18, 0x00, 0x10, 0xfe, 0x3c, 0x55, 0xcc, 0xc0, 0x78, 0xf8, 0x00, + 0x18, 0xcc, 0x30, 0x18, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x18, 0x18, 0x18, 0x00, 0x18, 0x30, 0x0c, 0xfe, 0xfe, 0x60, 0x00, + 0x00, 0x18, 0x00, 0xfe, 0xd0, 0x0c, 0x38, 0x00, 0x30, 0x0c, 0x6c, 0x18, + 0x00, 0x00, 0x00, 0x0c, 0xce, 0x18, 0x06, 0x06, 0x36, 0xc0, 0xc0, 0x0c, + 0xc6, 0xc6, 0x18, 0x18, 0x18, 0xfe, 0x18, 0xc6, 0xd6, 0xc6, 0xc6, 0xc0, + 0xc6, 0xc0, 0xc0, 0xc0, 0xc6, 0x18, 0x0c, 0xd8, 0xc0, 0xfe, 0xe6, 0xc6, + 0xc6, 0xc6, 0xc6, 0xc0, 0x18, 0xc6, 0xc6, 0xc6, 0x6c, 0x66, 0x0c, 0x30, + 0x30, 0x0c, 0x00, 0x00, 0x00, 0x7c, 0xfc, 0x7c, 0x7e, 0x7c, 0xfc, 0x7e, + 0xfc, 0x38, 0x0e, 0xc6, 0x18, 0xfc, 0xfc, 0x7c, 0xfc, 0x7e, 0xde, 0x7e, + 0xfc, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xfe, 0x30, 0x18, 0x18, 0x00, 0x38, + 0xfe, 0x7e, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0xf8, + 0xf8, 0x1f, 0x1f, 0xff, 0x00, 0x00, 0xff, 0x00, 0x00, 0x1f, 0xf8, 0xff, + 0xff, 0x18, 0x60, 0x06, 0xc6, 0x18, 0xf8, 0x18, 0x00, 0x18, 0x00, 0x6c, + 0xd0, 0x18, 0x76, 0x00, 0x30, 0x0c, 0x38, 0x18, 0x00, 0x00, 0x00, 0x18, + 0xde, 0x18, 0x0c, 0x3c, 0x66, 0xfc, 0xfc, 0x0c, 0x7c, 0xc6, 0x18, 0x18, + 0x30, 0x00, 0x0c, 0x0c, 0xd6, 0xc6, 0xfc, 0xc0, 0xc6, 0xf8, 0xf8, 0xc0, + 0xfe, 0x18, 0x0c, 0xf0, 0xc0, 0xd6, 0xf6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, + 0x18, 0xc6, 0xc6, 0xc6, 0x38, 0x3c, 0x18, 0x30, 0x18, 0x0c, 0x00, 0x00, + 0x00, 0x06, 0xc6, 0xc6, 0xc6, 0xc6, 0x30, 0xc6, 0xc6, 0x18, 0x06, 0xcc, + 0x18, 0xd6, 0xc6, 0xc6, 0xc6, 0xc6, 0xf0, 0xc0, 0x30, 0xc6, 0xc6, 0xc6, + 0xc6, 0xc6, 0x0c, 0x60, 0x18, 0x0c, 0x73, 0x6c, 0xfe, 0xff, 0x55, 0x3f, + 0x3f, 0x3e, 0x3f, 0x00, 0x7e, 0x30, 0x3f, 0xf8, 0xf8, 0x1f, 0x1f, 0xff, + 0x00, 0x00, 0xff, 0x00, 0x00, 0x1f, 0xf8, 0xff, 0xff, 0x18, 0x30, 0x0c, + 0xc6, 0x30, 0x60, 0x18, 0x00, 0x18, 0x00, 0x6c, 0x7c, 0x18, 0xdc, 0x00, + 0x30, 0x0c, 0xfe, 0x7e, 0x00, 0xfe, 0x00, 0x18, 0xf6, 0x18, 0x18, 0x06, + 0xc6, 0x06, 0xc6, 0x18, 0xc6, 0x7e, 0x00, 0x00, 0x60, 0x00, 0x06, 0x18, + 0xd6, 0xfe, 0xc6, 0xc0, 0xc6, 0xc0, 0xc0, 0xde, 0xc6, 0x18, 0x0c, 0xf0, + 0xc0, 0xc6, 0xde, 0xc6, 0xfc, 0xc6, 0xfc, 0x06, 0x18, 0xc6, 0x6c, 0xd6, + 0x38, 0x18, 0x30, 0x30, 0x18, 0x0c, 0x00, 0x00, 0x00, 0x7e, 0xc6, 0xc0, + 0xc6, 0xc6, 0x30, 0xc6, 0xc6, 0x18, 0x06, 0xd8, 0x18, 0xd6, 0xc6, 0xc6, + 0xc6, 0xc6, 0xe0, 0xc0, 0x30, 0xc6, 0xc6, 0xd6, 0x6c, 0xc6, 0x18, 0x30, + 0x18, 0x18, 0xdb, 0xc6, 0xfe, 0x7e, 0xaa, 0x0c, 0x30, 0x33, 0x30, 0x00, + 0x18, 0x30, 0x0c, 0x00, 0x18, 0x18, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x18, 0x18, 0x00, 0x18, 0x18, 0x18, 0x18, 0xc6, 0xfe, 0x60, 0x00, + 0x00, 0x18, 0x00, 0xfe, 0x16, 0x30, 0xcc, 0x00, 0x30, 0x0c, 0x38, 0x18, + 0x00, 0x00, 0x00, 0x30, 0xe6, 0x18, 0x30, 0x06, 0xfe, 0x06, 0xc6, 0x18, + 0xc6, 0x06, 0x00, 0x00, 0x30, 0xfe, 0x0c, 0x18, 0xd6, 0xc6, 0xc6, 0xc0, + 0xc6, 0xc0, 0xc0, 0xc6, 0xc6, 0x18, 0x0c, 0xd8, 0xc0, 0xc6, 0xce, 0xc6, + 0xc0, 0xc6, 0xf0, 0x06, 0x18, 0xc6, 0x6c, 0xfe, 0x6c, 0x18, 0x60, 0x30, + 0x0c, 0x0c, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0xc0, 0xc6, 0xfe, 0x30, 0xc6, + 0xc6, 0x18, 0x06, 0xf0, 0x18, 0xd6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc0, 0x7c, + 0x30, 0xc6, 0x6c, 0xd6, 0x38, 0xc6, 0x30, 0x30, 0x18, 0x18, 0xce, 0xc6, + 0xfe, 0x3c, 0x55, 0x0c, 0x3c, 0x33, 0x3c, 0x00, 0x18, 0x30, 0x0c, 0x00, + 0x18, 0x18, 0x00, 0x18, 0x00, 0x00, 0x00, 0xff, 0x00, 0x18, 0x18, 0x00, + 0x18, 0x18, 0x0c, 0x30, 0xc6, 0xc0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x6c, + 0x16, 0x36, 0xcc, 0x00, 0x30, 0x0c, 0x6c, 0x18, 0x00, 0x00, 0x00, 0x30, + 0xc6, 0x18, 0x60, 0xc6, 0x06, 0x06, 0xc6, 0x30, 0xc6, 0x06, 0x00, 0x00, + 0x18, 0x00, 0x18, 0x00, 0xce, 0xc6, 0xc6, 0xc6, 0xc6, 0xc0, 0xc0, 0xc6, + 0xc6, 0x18, 0xcc, 0xcc, 0xc0, 0xc6, 0xc6, 0xc6, 0xc0, 0xc6, 0xd8, 0xc6, + 0x18, 0xc6, 0x6c, 0xee, 0x6c, 0x18, 0xc0, 0x30, 0x0c, 0x0c, 0x00, 0x00, + 0x00, 0xc6, 0xc6, 0xc0, 0xc6, 0xc0, 0x30, 0xc6, 0xc6, 0x18, 0x06, 0xd8, + 0x18, 0xd6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc0, 0x06, 0x30, 0xc6, 0x6c, 0xd6, + 0x6c, 0xc6, 0x60, 0x30, 0x18, 0x18, 0x00, 0xc6, 0xfe, 0x18, 0xaa, 0x0c, + 0x30, 0x3e, 0x30, 0x00, 0x00, 0x30, 0x0c, 0x00, 0x18, 0x18, 0x00, 0x18, + 0x00, 0x00, 0x00, 0xff, 0x00, 0x18, 0x18, 0x00, 0x18, 0x18, 0x00, 0x00, + 0xc6, 0x00, 0x66, 0x00, 0x00, 0x18, 0x00, 0x6c, 0xd6, 0x6b, 0xdc, 0x00, + 0x18, 0x18, 0x00, 0x00, 0x18, 0x00, 0x18, 0x60, 0xc6, 0x18, 0xc0, 0xc6, + 0x06, 0xc6, 0xc6, 0x30, 0xc6, 0x0c, 0x18, 0x18, 0x0c, 0x00, 0x30, 0x18, + 0xc0, 0xc6, 0xc6, 0xc6, 0xcc, 0xc0, 0xc0, 0xc6, 0xc6, 0x18, 0xcc, 0xc6, + 0xc0, 0xc6, 0xc6, 0xc6, 0xc0, 0xde, 0xcc, 0xc6, 0x18, 0xc6, 0x38, 0xc6, + 0xc6, 0x18, 0xc0, 0x30, 0x06, 0x0c, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0xc6, + 0xc6, 0xc0, 0x30, 0xc6, 0xc6, 0x18, 0x06, 0xcc, 0x18, 0xd6, 0xc6, 0xc6, + 0xc6, 0xc6, 0xc0, 0x06, 0x30, 0xc6, 0x38, 0xd6, 0xc6, 0xc6, 0xc0, 0x30, + 0x18, 0x18, 0x00, 0xc6, 0xfe, 0x00, 0x55, 0x0c, 0x30, 0x36, 0x30, 0x00, + 0x7e, 0x30, 0x0c, 0x00, 0x18, 0x18, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x18, 0x18, 0x00, 0x18, 0x18, 0x7e, 0x7e, 0xc6, 0x00, 0xfe, 0x00, + 0x00, 0x18, 0x00, 0x6c, 0x7c, 0x66, 0x76, 0x00, 0x0c, 0x30, 0x00, 0x00, + 0x18, 0x00, 0x18, 0x60, 0x7c, 0x7e, 0xfe, 0x7c, 0x06, 0x7c, 0x7c, 0x30, + 0x7c, 0x78, 0x18, 0x18, 0x06, 0x00, 0x60, 0x18, 0x7e, 0xc6, 0xfc, 0x7c, + 0xf8, 0xfe, 0xc0, 0x7c, 0xc6, 0x3c, 0x78, 0xc6, 0xfe, 0xc6, 0xc6, 0x7c, + 0xc0, 0x7c, 0xc6, 0x7c, 0x18, 0x7c, 0x38, 0x82, 0xc6, 0x18, 0xfe, 0x3c, + 0x06, 0x3c, 0x00, 0x00, 0x00, 0x7e, 0xfc, 0x7c, 0x7e, 0x7c, 0x30, 0x7e, + 0xc6, 0x3c, 0x66, 0xc6, 0x3c, 0xd6, 0xc6, 0x7c, 0xfc, 0x7e, 0xc0, 0xfc, + 0x1e, 0x7e, 0x38, 0x7c, 0xc6, 0x7e, 0xfe, 0x1c, 0x18, 0x70, 0x00, 0xfe, + 0x00, 0x00, 0xaa, 0x0c, 0x30, 0x33, 0x30, 0x00, 0x00, 0x3f, 0x0c, 0x00, + 0x18, 0x18, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0xff, 0x18, 0x18, 0x00, + 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x66, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xc0, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x18, + 0x00, 0x00, 0x00, 0x00, 0xff, 0x18, 0x18, 0x00, 0x18, 0x18, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xc0, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00 +}; + +static const font_t font14 = { + .bits = font14_bits, + .depth = 1, + .width = 8, + .height = 14, + .stride = 128 +}; diff --git a/z80core/fonts/font16.h b/z80core/fonts/font16.h new file mode 100644 index 00000000..67826312 --- /dev/null +++ b/z80core/fonts/font16.h @@ -0,0 +1,190 @@ +/* + * Automatically generated from ter-u16b.bdf with bdf2c + * ASCII subset of Terminus Bold 16 + * + * Copyright (C) 2020 Dimitar Toshkov Zhekov + * + * Licensed under the SIL Open Font License, Version 1.1 + */ + +static const uint8_t font16_bits[] = { + 0x00, 0x00, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, + 0x00, 0x00, 0x18, 0x18, 0xff, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, + 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0xcc, + 0xfc, 0x78, 0xc0, 0x38, 0x00, 0xcc, 0xcc, 0x18, 0x00, 0x00, 0x18, 0x18, + 0xff, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x00, 0x18, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x00, 0x10, 0x00, 0x00, 0x18, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x18, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, 0xaa, 0xcc, 0xc0, 0xcc, 0xc0, 0x6c, + 0x00, 0xec, 0xcc, 0x18, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x18, 0x18, 0x18, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, + 0x00, 0x18, 0x66, 0x6c, 0x10, 0x66, 0x38, 0x18, 0x0c, 0x30, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x06, 0x7c, 0x18, 0x7c, 0x7c, 0x06, 0xfe, 0x3c, 0xfe, + 0x7c, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x7c, 0x7c, 0xfc, 0x7c, + 0xf8, 0xfe, 0xfe, 0x7c, 0xc6, 0x3c, 0x1e, 0xc6, 0xc0, 0x82, 0xc6, 0x7c, + 0xfc, 0x7c, 0xfc, 0x7c, 0xff, 0xc6, 0xc6, 0xc6, 0xc6, 0xc3, 0xfe, 0x3c, + 0x60, 0x3c, 0x3c, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x06, 0x00, 0x1e, 0x00, + 0xc0, 0x18, 0x06, 0xc0, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x18, 0x70, 0x00, 0x00, + 0xfe, 0x00, 0x55, 0xfc, 0xf0, 0xc0, 0xc0, 0x6c, 0x00, 0xfc, 0xcc, 0x18, + 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, + 0x00, 0x18, 0x0c, 0x30, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x18, 0x66, 0x6c, + 0x7c, 0xd6, 0x6c, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, + 0xc6, 0x38, 0xc6, 0xc6, 0x0e, 0xc0, 0x60, 0x06, 0xc6, 0xc6, 0x00, 0x00, + 0x06, 0x00, 0x60, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xcc, 0xc0, 0xc0, 0xc6, + 0xc6, 0x18, 0x0c, 0xc6, 0xc0, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, + 0x18, 0xc6, 0xc6, 0xc6, 0xc6, 0xc3, 0x06, 0x30, 0x60, 0x0c, 0x66, 0x00, + 0x00, 0x00, 0xc0, 0x00, 0x06, 0x00, 0x30, 0x00, 0xc0, 0x18, 0x06, 0xc0, + 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x30, 0x18, 0x18, 0x00, 0x00, 0xfe, 0x18, 0xaa, 0xcc, + 0xc0, 0xc0, 0xc0, 0x38, 0x00, 0xdc, 0xcc, 0x18, 0x00, 0x00, 0x18, 0x18, + 0x00, 0xff, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x00, 0x18, 0x18, 0x18, + 0x00, 0x06, 0x60, 0x00, 0x00, 0x18, 0x00, 0x6c, 0xd6, 0x6c, 0x6c, 0x00, + 0x30, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0xc6, 0x78, 0xc6, 0xc6, + 0x1e, 0xc0, 0xc0, 0x06, 0xc6, 0xc6, 0x00, 0x00, 0x0c, 0x00, 0x30, 0xc6, + 0xce, 0xc6, 0xc6, 0xc6, 0xc6, 0xc0, 0xc0, 0xc6, 0xc6, 0x18, 0x0c, 0xcc, + 0xc0, 0xee, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc0, 0x18, 0xc6, 0xc6, 0xc6, + 0x6c, 0x66, 0x06, 0x30, 0x30, 0x0c, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, + 0x06, 0x00, 0x30, 0x00, 0xc0, 0x00, 0x00, 0xc0, 0x18, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, + 0x18, 0x18, 0x00, 0x10, 0xfe, 0x3c, 0x55, 0xcc, 0xc0, 0xcc, 0xc0, 0x00, + 0x18, 0xcc, 0x78, 0x18, 0x00, 0x00, 0x18, 0x18, 0x00, 0xff, 0x00, 0x00, + 0x00, 0x18, 0x18, 0x18, 0x00, 0x18, 0x30, 0x0c, 0xfe, 0xfe, 0x60, 0x00, + 0x00, 0x18, 0x00, 0xfe, 0xd0, 0x0c, 0x38, 0x00, 0x30, 0x0c, 0x6c, 0x18, + 0x00, 0x00, 0x00, 0x0c, 0xce, 0x18, 0x06, 0x06, 0x36, 0xc0, 0xc0, 0x0c, + 0xc6, 0xc6, 0x18, 0x18, 0x18, 0xfe, 0x18, 0xc6, 0xd6, 0xc6, 0xc6, 0xc0, + 0xc6, 0xc0, 0xc0, 0xc0, 0xc6, 0x18, 0x0c, 0xd8, 0xc0, 0xfe, 0xe6, 0xc6, + 0xc6, 0xc6, 0xc6, 0xc0, 0x18, 0xc6, 0xc6, 0xc6, 0x6c, 0x66, 0x0c, 0x30, + 0x30, 0x0c, 0x00, 0x00, 0x00, 0x7c, 0xfc, 0x7c, 0x7e, 0x7c, 0xfc, 0x7e, + 0xfc, 0x38, 0x0e, 0xc6, 0x18, 0xfc, 0xfc, 0x7c, 0xfc, 0x7e, 0xde, 0x7e, + 0xfc, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xfe, 0x30, 0x18, 0x18, 0x00, 0x38, + 0xfe, 0x7e, 0xaa, 0xcc, 0xc0, 0x78, 0xf8, 0x00, 0x18, 0xcc, 0x30, 0x18, + 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, + 0x00, 0x18, 0x60, 0x06, 0xc6, 0x18, 0xf8, 0x00, 0x00, 0x18, 0x00, 0x6c, + 0xd0, 0x18, 0x76, 0x00, 0x30, 0x0c, 0x38, 0x18, 0x00, 0x00, 0x00, 0x18, + 0xde, 0x18, 0x0c, 0x3c, 0x66, 0xfc, 0xfc, 0x0c, 0x7c, 0xc6, 0x18, 0x18, + 0x30, 0x00, 0x0c, 0x0c, 0xd6, 0xc6, 0xfc, 0xc0, 0xc6, 0xf8, 0xf8, 0xc0, + 0xfe, 0x18, 0x0c, 0xf0, 0xc0, 0xd6, 0xf6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, + 0x18, 0xc6, 0xc6, 0xc6, 0x38, 0x3c, 0x18, 0x30, 0x18, 0x0c, 0x00, 0x00, + 0x00, 0x06, 0xc6, 0xc6, 0xc6, 0xc6, 0x30, 0xc6, 0xc6, 0x18, 0x06, 0xcc, + 0x18, 0xd6, 0xc6, 0xc6, 0xc6, 0xc6, 0xf0, 0xc0, 0x30, 0xc6, 0xc6, 0xc6, + 0xc6, 0xc6, 0x0c, 0x60, 0x18, 0x0c, 0x73, 0x6c, 0xfe, 0xff, 0x55, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0xf8, 0xf8, 0x1f, 0x1f, 0xff, + 0x00, 0x00, 0xff, 0x00, 0x00, 0x1f, 0xf8, 0xff, 0xff, 0x18, 0x30, 0x0c, + 0xc6, 0x30, 0x60, 0x18, 0x00, 0x18, 0x00, 0x6c, 0x7c, 0x18, 0xdc, 0x00, + 0x30, 0x0c, 0xfe, 0x7e, 0x00, 0xfe, 0x00, 0x18, 0xf6, 0x18, 0x18, 0x06, + 0xc6, 0x06, 0xc6, 0x18, 0xc6, 0x7e, 0x00, 0x00, 0x60, 0x00, 0x06, 0x18, + 0xd6, 0xfe, 0xc6, 0xc0, 0xc6, 0xc0, 0xc0, 0xde, 0xc6, 0x18, 0x0c, 0xf0, + 0xc0, 0xc6, 0xde, 0xc6, 0xfc, 0xc6, 0xfc, 0x06, 0x18, 0xc6, 0x6c, 0xd6, + 0x38, 0x18, 0x30, 0x30, 0x18, 0x0c, 0x00, 0x00, 0x00, 0x7e, 0xc6, 0xc0, + 0xc6, 0xc6, 0x30, 0xc6, 0xc6, 0x18, 0x06, 0xd8, 0x18, 0xd6, 0xc6, 0xc6, + 0xc6, 0xc6, 0xe0, 0xc0, 0x30, 0xc6, 0xc6, 0xd6, 0x6c, 0xc6, 0x18, 0x30, + 0x18, 0x18, 0xdb, 0xc6, 0xfe, 0x7e, 0xaa, 0x3f, 0x3f, 0x3e, 0x3f, 0x00, + 0x18, 0x30, 0x3f, 0xf8, 0xf8, 0x1f, 0x1f, 0xff, 0x00, 0x00, 0xff, 0x00, + 0x00, 0x1f, 0xf8, 0xff, 0xff, 0x18, 0x18, 0x18, 0xc6, 0xfe, 0x60, 0x18, + 0x00, 0x18, 0x00, 0xfe, 0x16, 0x30, 0xcc, 0x00, 0x30, 0x0c, 0x38, 0x18, + 0x00, 0x00, 0x00, 0x30, 0xe6, 0x18, 0x30, 0x06, 0xfe, 0x06, 0xc6, 0x18, + 0xc6, 0x06, 0x00, 0x00, 0x30, 0xfe, 0x0c, 0x18, 0xd6, 0xc6, 0xc6, 0xc0, + 0xc6, 0xc0, 0xc0, 0xc6, 0xc6, 0x18, 0x0c, 0xd8, 0xc0, 0xc6, 0xce, 0xc6, + 0xc0, 0xc6, 0xf0, 0x06, 0x18, 0xc6, 0x6c, 0xfe, 0x6c, 0x18, 0x60, 0x30, + 0x0c, 0x0c, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0xc0, 0xc6, 0xfe, 0x30, 0xc6, + 0xc6, 0x18, 0x06, 0xf0, 0x18, 0xd6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc0, 0x7c, + 0x30, 0xc6, 0x6c, 0xd6, 0x38, 0xc6, 0x30, 0x30, 0x18, 0x18, 0xce, 0xc6, + 0xfe, 0x3c, 0x55, 0x0c, 0x30, 0x33, 0x30, 0x00, 0x18, 0x30, 0x0c, 0x00, + 0x18, 0x18, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, + 0x18, 0x18, 0x0c, 0x30, 0xc6, 0xc0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x6c, + 0x16, 0x36, 0xcc, 0x00, 0x30, 0x0c, 0x6c, 0x18, 0x00, 0x00, 0x00, 0x30, + 0xc6, 0x18, 0x60, 0xc6, 0x06, 0x06, 0xc6, 0x30, 0xc6, 0x06, 0x00, 0x00, + 0x18, 0x00, 0x18, 0x00, 0xce, 0xc6, 0xc6, 0xc6, 0xc6, 0xc0, 0xc0, 0xc6, + 0xc6, 0x18, 0xcc, 0xcc, 0xc0, 0xc6, 0xc6, 0xc6, 0xc0, 0xc6, 0xd8, 0xc6, + 0x18, 0xc6, 0x6c, 0xee, 0x6c, 0x18, 0xc0, 0x30, 0x0c, 0x0c, 0x00, 0x00, + 0x00, 0xc6, 0xc6, 0xc0, 0xc6, 0xc0, 0x30, 0xc6, 0xc6, 0x18, 0x06, 0xd8, + 0x18, 0xd6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc0, 0x06, 0x30, 0xc6, 0x6c, 0xd6, + 0x6c, 0xc6, 0x60, 0x30, 0x18, 0x18, 0x00, 0xc6, 0xfe, 0x18, 0xaa, 0x0c, + 0x3c, 0x33, 0x3c, 0x00, 0x00, 0x30, 0x0c, 0x00, 0x18, 0x18, 0x00, 0x18, + 0x00, 0x00, 0x00, 0xff, 0x00, 0x18, 0x18, 0x00, 0x18, 0x18, 0x00, 0x00, + 0xc6, 0x00, 0x66, 0x00, 0x00, 0x18, 0x00, 0x6c, 0xd6, 0x6b, 0xdc, 0x00, + 0x18, 0x18, 0x00, 0x00, 0x18, 0x00, 0x18, 0x60, 0xc6, 0x18, 0xc0, 0xc6, + 0x06, 0xc6, 0xc6, 0x30, 0xc6, 0x0c, 0x18, 0x18, 0x0c, 0x00, 0x30, 0x18, + 0xc0, 0xc6, 0xc6, 0xc6, 0xcc, 0xc0, 0xc0, 0xc6, 0xc6, 0x18, 0xcc, 0xc6, + 0xc0, 0xc6, 0xc6, 0xc6, 0xc0, 0xde, 0xcc, 0xc6, 0x18, 0xc6, 0x38, 0xc6, + 0xc6, 0x18, 0xc0, 0x30, 0x06, 0x0c, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0xc6, + 0xc6, 0xc0, 0x30, 0xc6, 0xc6, 0x18, 0x06, 0xcc, 0x18, 0xd6, 0xc6, 0xc6, + 0xc6, 0xc6, 0xc0, 0x06, 0x30, 0xc6, 0x38, 0xd6, 0xc6, 0xc6, 0xc0, 0x30, + 0x18, 0x18, 0x00, 0xc6, 0xfe, 0x00, 0x55, 0x0c, 0x30, 0x3e, 0x30, 0x00, + 0x7e, 0x30, 0x0c, 0x00, 0x18, 0x18, 0x00, 0x18, 0x00, 0x00, 0x00, 0xff, + 0x00, 0x18, 0x18, 0x00, 0x18, 0x18, 0x7e, 0x7e, 0xc6, 0x00, 0xfe, 0x00, + 0x00, 0x18, 0x00, 0x6c, 0x7c, 0x66, 0x76, 0x00, 0x0c, 0x30, 0x00, 0x00, + 0x18, 0x00, 0x18, 0x60, 0x7c, 0x7e, 0xfe, 0x7c, 0x06, 0x7c, 0x7c, 0x30, + 0x7c, 0x78, 0x18, 0x18, 0x06, 0x00, 0x60, 0x18, 0x7e, 0xc6, 0xfc, 0x7c, + 0xf8, 0xfe, 0xc0, 0x7c, 0xc6, 0x3c, 0x78, 0xc6, 0xfe, 0xc6, 0xc6, 0x7c, + 0xc0, 0x7c, 0xc6, 0x7c, 0x18, 0x7c, 0x38, 0x82, 0xc6, 0x18, 0xfe, 0x3c, + 0x06, 0x3c, 0x00, 0x00, 0x00, 0x7e, 0xfc, 0x7c, 0x7e, 0x7c, 0x30, 0x7e, + 0xc6, 0x3c, 0x06, 0xc6, 0x3c, 0xd6, 0xc6, 0x7c, 0xfc, 0x7e, 0xc0, 0xfc, + 0x1e, 0x7e, 0x38, 0x7c, 0xc6, 0x7e, 0xfe, 0x1c, 0x18, 0x70, 0x00, 0xfe, + 0x00, 0x00, 0xaa, 0x0c, 0x30, 0x36, 0x30, 0x00, 0x00, 0x30, 0x0c, 0x00, + 0x18, 0x18, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, + 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x66, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xc0, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x0c, + 0x30, 0x33, 0x30, 0x00, 0x00, 0x3f, 0x0c, 0x00, 0x18, 0x18, 0x00, 0x18, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x18, 0x18, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xc0, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, + 0xff, 0x18, 0x18, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, + 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x06, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x18, 0x18, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0xff, 0x18, 0x18, 0x00, + 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +}; + +static const font_t font16 = { + .bits = font16_bits, + .depth = 1, + .width = 8, + .height = 16, + .stride = 128 +}; diff --git a/z80core/fonts/font18.h b/z80core/fonts/font18.h new file mode 100644 index 00000000..317b0cbb --- /dev/null +++ b/z80core/fonts/font18.h @@ -0,0 +1,259 @@ +/* + * Automatically generated from ter-u18b.bdf with bdf2c + * ASCII subset of Terminus Bold 18 + * + * Copyright (C) 2020 Dimitar Toshkov Zhekov + * + * Licensed under the SIL Open Font License, Version 1.1 + */ + +static const uint8_t font18_bits[] = { + 0x00, 0x00, 0x0a, 0xa8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0xc0, 0x30, 0xff, 0xc0, 0x00, 0x00, + 0x00, 0x00, 0x03, 0x00, 0xc0, 0x30, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x54, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0xc0, 0x30, + 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0xc0, 0x30, 0x00, 0x03, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x30, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xc0, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0xab, + 0x30, 0xfc, 0x1e, 0x0c, 0x00, 0xcc, 0x00, 0x33, 0x0c, 0xc0, 0x30, 0x00, + 0x00, 0x00, 0xc0, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, + 0xc0, 0x30, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x03, 0x30, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xe0, 0x00, 0x0c, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x7f, 0x80, 0x05, 0x57, 0x30, 0xc0, 0x33, 0x0c, 0x00, 0xcc, 0x00, 0x3b, + 0x0c, 0xc0, 0x30, 0x00, 0x00, 0x00, 0xc0, 0x30, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x03, 0x00, 0xc0, 0x30, 0x00, 0x03, 0x00, 0x30, 0xc0, 0x00, + 0x00, 0x01, 0xe0, 0x00, 0x00, 0x03, 0x03, 0x30, 0xcc, 0x0c, 0x1c, 0xc3, + 0xc0, 0x30, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, + 0x3f, 0x03, 0x03, 0xf0, 0xfc, 0x01, 0x9f, 0xe1, 0xf1, 0xfe, 0x3f, 0x0f, + 0xc0, 0x00, 0x00, 0x03, 0x00, 0x06, 0x00, 0x78, 0x7f, 0x0f, 0xc7, 0xf0, + 0xfc, 0x7e, 0x1f, 0xe7, 0xf8, 0xfc, 0x61, 0x87, 0x80, 0x79, 0x86, 0x60, + 0x20, 0x26, 0x18, 0xfc, 0x7f, 0x0f, 0xc7, 0xf0, 0xfc, 0x7f, 0x98, 0x66, + 0x1b, 0x06, 0x61, 0x98, 0x67, 0xf8, 0x78, 0x60, 0x07, 0x83, 0x30, 0x00, + 0x00, 0x00, 0x06, 0x00, 0x00, 0x01, 0x80, 0x00, 0x78, 0x00, 0x60, 0x03, + 0x00, 0x31, 0x80, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x0c, + 0x0e, 0x00, 0x00, 0x00, 0x7f, 0x83, 0x0a, 0xab, 0xf0, 0xf0, 0x30, 0x0c, + 0x00, 0xcc, 0x00, 0x3f, 0x0c, 0xc0, 0x30, 0x00, 0x00, 0x00, 0xc0, 0x30, + 0x00, 0x3f, 0xf0, 0x00, 0x00, 0x00, 0x03, 0x00, 0xc0, 0x30, 0x00, 0x03, + 0x00, 0x60, 0x60, 0x00, 0x00, 0x03, 0x30, 0x00, 0x00, 0x03, 0x03, 0x30, + 0xcc, 0x3f, 0x14, 0xc6, 0x60, 0x30, 0x0c, 0x03, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x0c, 0x61, 0x87, 0x06, 0x19, 0x86, 0x03, 0x98, 0x03, + 0x01, 0x86, 0x61, 0x98, 0x60, 0x00, 0x00, 0x06, 0x00, 0x03, 0x00, 0xcc, + 0xc1, 0x98, 0x66, 0x19, 0x86, 0x63, 0x18, 0x06, 0x01, 0x86, 0x61, 0x83, + 0x00, 0x31, 0x86, 0x60, 0x30, 0x66, 0x19, 0x86, 0x61, 0x98, 0x66, 0x19, + 0x86, 0x0c, 0x18, 0x66, 0x1b, 0x06, 0x61, 0x98, 0x60, 0x18, 0x60, 0x60, + 0x01, 0x86, 0x18, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x01, 0x80, 0x00, + 0xc0, 0x00, 0x60, 0x03, 0x00, 0x31, 0x80, 0x0c, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x30, 0x0c, 0x03, 0x00, 0x00, 0x00, 0x7f, 0x87, 0x85, 0x57, + 0x30, 0xc0, 0x30, 0x0c, 0x00, 0x78, 0x0c, 0x37, 0x0c, 0xc0, 0x30, 0x00, + 0x00, 0x00, 0xc0, 0x30, 0x00, 0x3f, 0xf0, 0x00, 0x00, 0x00, 0x03, 0x00, + 0xc0, 0x30, 0x00, 0x03, 0x00, 0xc0, 0x30, 0x00, 0x00, 0x63, 0x00, 0x00, + 0x00, 0x03, 0x00, 0x00, 0xcc, 0x6d, 0x9d, 0x86, 0x60, 0x00, 0x0c, 0x03, + 0x06, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x18, 0x61, 0x8f, 0x06, 0x19, + 0x86, 0x07, 0x98, 0x06, 0x01, 0x86, 0x61, 0x98, 0x60, 0x00, 0x00, 0x0c, + 0x00, 0x01, 0x81, 0x86, 0xc1, 0x98, 0x66, 0x19, 0x86, 0x61, 0x98, 0x06, + 0x01, 0x86, 0x61, 0x83, 0x00, 0x31, 0x8c, 0x60, 0x38, 0xe6, 0x19, 0x86, + 0x61, 0x98, 0x66, 0x19, 0x86, 0x0c, 0x18, 0x66, 0x1b, 0x06, 0x33, 0x18, + 0x60, 0x18, 0x60, 0x30, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, + 0x00, 0x01, 0x80, 0x00, 0xc0, 0x00, 0x60, 0x00, 0x00, 0x01, 0x80, 0x0c, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x0c, 0x03, 0x00, 0x00, 0x20, + 0x7f, 0x8f, 0xca, 0xab, 0x30, 0xc0, 0x33, 0x0c, 0x00, 0x00, 0x0c, 0x33, + 0x07, 0x80, 0x30, 0x00, 0x00, 0x00, 0xc0, 0x30, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x03, 0x00, 0xc0, 0x30, 0x00, 0x03, 0x01, 0x80, 0x18, 0x7f, + 0x9f, 0xe3, 0x00, 0x00, 0x00, 0x03, 0x00, 0x01, 0xfe, 0x6c, 0x01, 0x86, + 0x60, 0x00, 0x18, 0x01, 0x83, 0x60, 0x30, 0x00, 0x00, 0x00, 0x00, 0x18, + 0x63, 0x83, 0x06, 0x18, 0x06, 0x0d, 0x98, 0x06, 0x00, 0x06, 0x61, 0x98, + 0x60, 0xc0, 0x30, 0x18, 0x1f, 0xe0, 0xc1, 0x86, 0xcf, 0x98, 0x66, 0x19, + 0x80, 0x61, 0x98, 0x06, 0x01, 0x80, 0x61, 0x83, 0x00, 0x31, 0x98, 0x60, + 0x3d, 0xe7, 0x19, 0x86, 0x61, 0x98, 0x66, 0x19, 0x80, 0x0c, 0x18, 0x66, + 0x1b, 0x06, 0x33, 0x0c, 0xc0, 0x30, 0x60, 0x30, 0x01, 0x80, 0x00, 0x00, + 0x00, 0x0f, 0xc7, 0xf0, 0xfc, 0x3f, 0x8f, 0xc3, 0xf0, 0xfe, 0x7f, 0x07, + 0x00, 0x71, 0x86, 0x0c, 0x1f, 0xc7, 0xf0, 0xfc, 0x7f, 0x0f, 0xe6, 0xf8, + 0xfc, 0x7e, 0x18, 0x66, 0x19, 0x86, 0x61, 0x98, 0x67, 0xf8, 0x30, 0x0c, + 0x03, 0x00, 0x00, 0x70, 0x7f, 0x9f, 0xe5, 0x57, 0x30, 0xc0, 0x1e, 0x0f, + 0xc0, 0x00, 0x0c, 0x33, 0x03, 0x00, 0x30, 0x00, 0x00, 0x00, 0xc0, 0x30, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0xc0, 0x30, 0x00, 0x03, + 0x03, 0x00, 0x0c, 0x61, 0x81, 0x83, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, + 0xcc, 0x6c, 0x03, 0x03, 0xc0, 0x00, 0x18, 0x01, 0x81, 0xc0, 0x30, 0x00, + 0x00, 0x00, 0x00, 0x30, 0x67, 0x83, 0x00, 0x18, 0x06, 0x19, 0x98, 0x06, + 0x00, 0x0c, 0x61, 0x98, 0x60, 0xc0, 0x30, 0x30, 0x00, 0x00, 0x60, 0x06, + 0xd9, 0x98, 0x66, 0x19, 0x80, 0x61, 0x98, 0x06, 0x01, 0x80, 0x61, 0x83, + 0x00, 0x31, 0xb0, 0x60, 0x37, 0x67, 0x99, 0x86, 0x61, 0x98, 0x66, 0x19, + 0x80, 0x0c, 0x18, 0x63, 0x33, 0x06, 0x1e, 0x0c, 0xc0, 0x60, 0x60, 0x18, + 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x66, 0x19, 0x86, 0x61, 0x98, 0x60, + 0xc1, 0x86, 0x61, 0x83, 0x00, 0x31, 0x8c, 0x0c, 0x1b, 0x66, 0x19, 0x86, + 0x61, 0x98, 0x67, 0x81, 0x86, 0x18, 0x18, 0x66, 0x19, 0x86, 0x61, 0x98, + 0x60, 0x18, 0x30, 0x0c, 0x03, 0x03, 0x98, 0xd8, 0x7f, 0xbf, 0xfa, 0xa8, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x80, 0x00, 0x03, 0xf0, 0xfc, + 0x03, 0xf0, 0xff, 0xff, 0x00, 0x00, 0x0f, 0xfc, 0x00, 0x00, 0x03, 0xff, + 0xc3, 0xff, 0xff, 0xc3, 0x03, 0x00, 0x0c, 0x61, 0x83, 0x07, 0xe0, 0x30, + 0x00, 0x03, 0x00, 0x00, 0xcc, 0x6c, 0x03, 0x03, 0x98, 0x00, 0x18, 0x01, + 0x8f, 0xf9, 0xfe, 0x00, 0x1f, 0xe0, 0x00, 0x30, 0x6d, 0x83, 0x00, 0x30, + 0x7c, 0x31, 0x9f, 0xc7, 0xf0, 0x0c, 0x3f, 0x18, 0x60, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x30, 0x0c, 0xd9, 0x98, 0x67, 0xf1, 0x80, 0x61, 0x9f, 0x87, + 0xe1, 0x80, 0x7f, 0x83, 0x00, 0x31, 0xe0, 0x60, 0x32, 0x66, 0xd9, 0x86, + 0x61, 0x98, 0x66, 0x18, 0xfc, 0x0c, 0x18, 0x63, 0x33, 0x06, 0x0c, 0x07, + 0x80, 0xc0, 0x60, 0x18, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x66, 0x19, + 0x80, 0x61, 0x98, 0x60, 0xc1, 0x86, 0x61, 0x83, 0x00, 0x31, 0x98, 0x0c, + 0x1b, 0x66, 0x19, 0x86, 0x61, 0x98, 0x67, 0x01, 0x80, 0x18, 0x18, 0x66, + 0x19, 0x86, 0x33, 0x18, 0x60, 0x30, 0xe0, 0x0c, 0x01, 0xc6, 0xd9, 0x8c, + 0x7f, 0xbf, 0xf5, 0x54, 0x7e, 0x1f, 0x87, 0xc1, 0xf8, 0x00, 0x0c, 0x06, + 0x00, 0x03, 0xf0, 0xfc, 0x03, 0xf0, 0xff, 0xff, 0x00, 0x00, 0x0f, 0xfc, + 0x00, 0x00, 0x03, 0xff, 0xc3, 0xff, 0xff, 0xc3, 0x01, 0x80, 0x18, 0x61, + 0x86, 0x03, 0x00, 0x30, 0x00, 0x03, 0x00, 0x00, 0xcc, 0x3f, 0x06, 0x06, + 0xd8, 0x00, 0x18, 0x01, 0x81, 0xc0, 0x30, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x79, 0x83, 0x00, 0x60, 0x06, 0x61, 0x80, 0x66, 0x18, 0x18, 0x61, 0x8f, + 0xe0, 0x00, 0x00, 0x60, 0x00, 0x00, 0x30, 0x18, 0xd9, 0x9f, 0xe6, 0x19, + 0x80, 0x61, 0x98, 0x06, 0x01, 0x9e, 0x61, 0x83, 0x00, 0x31, 0xe0, 0x60, + 0x30, 0x66, 0x79, 0x86, 0x7f, 0x18, 0x67, 0xf0, 0x06, 0x0c, 0x18, 0x63, + 0x33, 0x26, 0x0c, 0x03, 0x01, 0x80, 0x60, 0x0c, 0x01, 0x80, 0x00, 0x00, + 0x00, 0x0f, 0xe6, 0x19, 0x80, 0x61, 0x98, 0x60, 0xc1, 0x86, 0x61, 0x83, + 0x00, 0x31, 0xb0, 0x0c, 0x1b, 0x66, 0x19, 0x86, 0x61, 0x98, 0x66, 0x01, + 0x80, 0x18, 0x18, 0x63, 0x31, 0xb6, 0x1e, 0x18, 0x60, 0x60, 0x30, 0x0c, + 0x03, 0x06, 0xdb, 0x06, 0x7f, 0x9f, 0xea, 0xa8, 0x18, 0x18, 0x06, 0x61, + 0x80, 0x00, 0x0c, 0x06, 0x01, 0xf8, 0x00, 0x0c, 0x03, 0x00, 0x00, 0x30, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0xc0, 0x00, 0x0c, 0x03, + 0x00, 0xc0, 0x30, 0x61, 0x9f, 0xe3, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, + 0xcc, 0x0d, 0x86, 0x0c, 0x70, 0x00, 0x18, 0x01, 0x83, 0x60, 0x30, 0x00, + 0x00, 0x00, 0x00, 0x60, 0x71, 0x83, 0x00, 0xc0, 0x06, 0x61, 0x80, 0x66, + 0x18, 0x18, 0x61, 0x80, 0x60, 0x00, 0x00, 0x30, 0x1f, 0xe0, 0x60, 0x30, + 0xd9, 0x98, 0x66, 0x19, 0x80, 0x61, 0x98, 0x06, 0x01, 0x86, 0x61, 0x83, + 0x00, 0x31, 0xb0, 0x60, 0x30, 0x66, 0x39, 0x86, 0x60, 0x18, 0x67, 0x80, + 0x06, 0x0c, 0x18, 0x63, 0x33, 0x76, 0x1e, 0x03, 0x03, 0x00, 0x60, 0x0c, + 0x01, 0x80, 0x00, 0x00, 0x00, 0x18, 0x66, 0x19, 0x80, 0x61, 0x9f, 0xe0, + 0xc1, 0x86, 0x61, 0x83, 0x00, 0x31, 0xe0, 0x0c, 0x1b, 0x66, 0x19, 0x86, + 0x61, 0x98, 0x66, 0x00, 0xfc, 0x18, 0x18, 0x63, 0x31, 0xb6, 0x0c, 0x18, + 0x60, 0xc0, 0x30, 0x0c, 0x03, 0x06, 0x73, 0x06, 0x7f, 0x8f, 0xc5, 0x54, + 0x18, 0x1e, 0x06, 0x61, 0xe0, 0x00, 0x0c, 0x06, 0x00, 0x60, 0x00, 0x0c, + 0x03, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, + 0xc0, 0x00, 0x0c, 0x03, 0x00, 0x60, 0x60, 0x61, 0x98, 0x03, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x01, 0xfe, 0x0d, 0x8c, 0x0c, 0x30, 0x00, 0x18, 0x01, + 0x86, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x61, 0x83, 0x01, 0x80, + 0x06, 0x7f, 0x80, 0x66, 0x18, 0x30, 0x61, 0x80, 0x60, 0x00, 0x00, 0x18, + 0x00, 0x00, 0xc0, 0x30, 0xcf, 0x98, 0x66, 0x19, 0x80, 0x61, 0x98, 0x06, + 0x01, 0x86, 0x61, 0x83, 0x06, 0x31, 0x98, 0x60, 0x30, 0x66, 0x19, 0x86, + 0x60, 0x18, 0x66, 0xc0, 0x06, 0x0c, 0x18, 0x61, 0xe3, 0xde, 0x33, 0x03, + 0x06, 0x00, 0x60, 0x06, 0x01, 0x80, 0x00, 0x00, 0x00, 0x18, 0x66, 0x19, + 0x80, 0x61, 0x98, 0x00, 0xc1, 0x86, 0x61, 0x83, 0x00, 0x31, 0xb0, 0x0c, + 0x1b, 0x66, 0x19, 0x86, 0x61, 0x98, 0x66, 0x00, 0x06, 0x18, 0x18, 0x63, + 0x31, 0xb6, 0x1e, 0x18, 0x61, 0x80, 0x30, 0x0c, 0x03, 0x00, 0x03, 0x06, + 0x7f, 0x87, 0x8a, 0xa8, 0x18, 0x18, 0x07, 0xc1, 0x80, 0x00, 0x00, 0x06, + 0x00, 0x60, 0x00, 0x0c, 0x03, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x03, + 0xff, 0x00, 0x03, 0x00, 0xc0, 0x00, 0x0c, 0x03, 0x00, 0x30, 0xc0, 0x61, + 0x80, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0x0d, 0x8d, 0xcc, + 0x30, 0x00, 0x0c, 0x03, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0xc0, + 0x61, 0x83, 0x03, 0x01, 0x86, 0x01, 0x98, 0x66, 0x18, 0x30, 0x61, 0x80, + 0x60, 0xc0, 0x30, 0x0c, 0x00, 0x01, 0x80, 0x00, 0xc0, 0x18, 0x66, 0x19, + 0x86, 0x61, 0x98, 0x06, 0x01, 0x86, 0x61, 0x83, 0x06, 0x31, 0x8c, 0x60, + 0x30, 0x66, 0x19, 0x86, 0x60, 0x18, 0x66, 0x61, 0x86, 0x0c, 0x18, 0x61, + 0xe3, 0x8e, 0x33, 0x03, 0x06, 0x00, 0x60, 0x06, 0x01, 0x80, 0x00, 0x00, + 0x00, 0x18, 0x66, 0x19, 0x80, 0x61, 0x98, 0x00, 0xc1, 0x86, 0x61, 0x83, + 0x00, 0x31, 0x98, 0x0c, 0x1b, 0x66, 0x19, 0x86, 0x61, 0x98, 0x66, 0x00, + 0x06, 0x18, 0x18, 0x61, 0xe1, 0xb6, 0x33, 0x18, 0x63, 0x00, 0x30, 0x0c, + 0x03, 0x00, 0x03, 0x06, 0x7f, 0x83, 0x05, 0x54, 0x18, 0x18, 0x06, 0xc1, + 0x80, 0x00, 0x00, 0x06, 0x00, 0x60, 0x00, 0x0c, 0x03, 0x00, 0x00, 0x30, + 0x00, 0x00, 0x00, 0x03, 0xff, 0x00, 0x03, 0x00, 0xc0, 0x00, 0x0c, 0x03, + 0x00, 0x00, 0x00, 0x61, 0x80, 0x03, 0x18, 0x00, 0x00, 0x03, 0x00, 0x00, + 0xcc, 0x6d, 0x99, 0x46, 0x78, 0x00, 0x0c, 0x03, 0x00, 0x00, 0x00, 0x0c, + 0x00, 0x00, 0xc1, 0x80, 0x61, 0x83, 0x06, 0x01, 0x86, 0x01, 0x98, 0x66, + 0x18, 0x30, 0x61, 0x80, 0xc0, 0xc0, 0x30, 0x06, 0x00, 0x03, 0x00, 0x30, + 0xc0, 0x18, 0x66, 0x19, 0x86, 0x63, 0x18, 0x06, 0x01, 0x86, 0x61, 0x83, + 0x06, 0x31, 0x86, 0x60, 0x30, 0x66, 0x19, 0x86, 0x60, 0x19, 0xe6, 0x31, + 0x86, 0x0c, 0x18, 0x60, 0xc3, 0x06, 0x61, 0x83, 0x06, 0x00, 0x60, 0x03, + 0x01, 0x80, 0x00, 0x00, 0x00, 0x18, 0x66, 0x19, 0x86, 0x61, 0x98, 0x60, + 0xc1, 0x86, 0x61, 0x83, 0x00, 0x31, 0x8c, 0x0c, 0x1b, 0x66, 0x19, 0x86, + 0x61, 0x98, 0x66, 0x01, 0x86, 0x18, 0x18, 0x60, 0xc1, 0xb6, 0x61, 0x98, + 0x66, 0x00, 0x30, 0x0c, 0x03, 0x00, 0x03, 0x06, 0x7f, 0x80, 0x0a, 0xa8, + 0x18, 0x18, 0x06, 0x61, 0x80, 0x00, 0x7f, 0x87, 0xe0, 0x60, 0x00, 0x0c, + 0x03, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, + 0xc0, 0x00, 0x0c, 0x03, 0x07, 0xf9, 0xfe, 0x61, 0x80, 0x07, 0xf8, 0x00, + 0x00, 0x03, 0x00, 0x00, 0xcc, 0x3f, 0x19, 0xc3, 0xd8, 0x00, 0x06, 0x06, + 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0xc1, 0x80, 0x3f, 0x0f, 0xc7, 0xf8, + 0xfc, 0x01, 0x8f, 0xc3, 0xf0, 0x30, 0x3f, 0x0f, 0x80, 0x00, 0x30, 0x03, + 0x00, 0x06, 0x00, 0x30, 0x7f, 0x98, 0x67, 0xf0, 0xfc, 0x7e, 0x1f, 0xe6, + 0x00, 0xfc, 0x61, 0x87, 0x83, 0xe1, 0x86, 0x7f, 0xb0, 0x66, 0x18, 0xfc, + 0x60, 0x0f, 0xc6, 0x18, 0xfc, 0x0c, 0x0f, 0xc0, 0xc2, 0x02, 0x61, 0x83, + 0x07, 0xf8, 0x78, 0x03, 0x07, 0x80, 0x00, 0x00, 0x00, 0x0f, 0xe7, 0xf0, + 0xfc, 0x3f, 0x8f, 0xc0, 0xc0, 0xfe, 0x61, 0x87, 0x80, 0x31, 0x86, 0x1e, + 0x1b, 0x66, 0x18, 0xfc, 0x7f, 0x0f, 0xe6, 0x00, 0xfc, 0x0f, 0x0f, 0xe0, + 0xc0, 0xfc, 0x61, 0x8f, 0xe7, 0xf8, 0x1c, 0x0c, 0x0e, 0x00, 0x03, 0xfe, + 0x00, 0x00, 0x05, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x60, 0x00, 0x0c, 0x03, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x03, 0x00, 0xc0, 0x00, 0x0c, 0x03, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, + 0x03, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0xa8, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x03, 0x00, 0x00, 0x30, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xc3, 0x00, 0xc0, 0x00, 0x0c, 0x03, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x06, 0x00, 0x00, 0x03, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x54, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, + 0x03, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xc3, 0x00, + 0xc0, 0x00, 0x0c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x01, 0xe0, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x0f, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +}; + +static const font_t font18 = { + .bits = font18_bits, + .depth = 1, + .width = 10, + .height = 18, + .stride = 160 +}; diff --git a/z80core/fonts/font20.h b/z80core/fonts/font20.h new file mode 100644 index 00000000..58e51bf5 --- /dev/null +++ b/z80core/fonts/font20.h @@ -0,0 +1,286 @@ +/* + * Automatically generated from ter-u20b.bdf with bdf2c + * ASCII subset of Terminus Bold 20 + * + * Copyright (C) 2020 Dimitar Toshkov Zhekov + * + * Licensed under the SIL Open Font License, Version 1.1 + */ + +static const uint8_t font20_bits[] = { + 0x00, 0x00, 0x0a, 0xa8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0xc0, 0x30, 0xff, 0xc0, 0x00, 0x00, + 0x00, 0x00, 0x03, 0x00, 0xc0, 0x30, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x54, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0xc0, 0x30, + 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0xc0, 0x30, 0x00, 0x03, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x30, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xc0, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0xab, + 0x30, 0xfc, 0x1e, 0x0c, 0x00, 0xcc, 0x00, 0x33, 0x0c, 0xc0, 0x30, 0x00, + 0x00, 0x00, 0xc0, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, + 0xc0, 0x30, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x03, 0x30, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xe0, 0x00, 0x0c, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x7f, 0x80, 0x05, 0x57, 0x30, 0xc0, 0x33, 0x0c, 0x00, 0xcc, 0x00, 0x33, + 0x0c, 0xc0, 0x30, 0x00, 0x00, 0x00, 0xc0, 0x30, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x03, 0x00, 0xc0, 0x30, 0x00, 0x03, 0x00, 0x30, 0xc0, 0x00, + 0x00, 0x01, 0xe0, 0x00, 0x00, 0x03, 0x03, 0x30, 0xcc, 0x0c, 0x00, 0x03, + 0xc0, 0x30, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x3f, 0x03, 0x03, 0xf0, 0xfc, 0x01, 0x9f, 0xe1, 0xf1, 0xfe, 0x3f, 0x0f, + 0xc0, 0x00, 0x00, 0x01, 0x80, 0x06, 0x00, 0x78, 0x7f, 0x0f, 0xc7, 0xf0, + 0xfc, 0x7e, 0x1f, 0xe7, 0xf8, 0xfc, 0x61, 0x87, 0x80, 0x79, 0x86, 0x60, + 0x20, 0x26, 0x18, 0xfc, 0x7f, 0x0f, 0xc7, 0xf0, 0xfc, 0x7f, 0x98, 0x66, + 0x1b, 0x06, 0x61, 0x98, 0x67, 0xf8, 0x78, 0x00, 0x07, 0x83, 0x30, 0x00, + 0x00, 0x00, 0x06, 0x00, 0x00, 0x01, 0x80, 0x00, 0x78, 0x00, 0x60, 0x03, + 0x00, 0x31, 0x80, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x0c, + 0x0e, 0x00, 0x00, 0x00, 0x7f, 0x80, 0x0a, 0xab, 0x30, 0xc0, 0x30, 0x0c, + 0x00, 0xcc, 0x00, 0x3b, 0x0c, 0xc0, 0x30, 0x00, 0x00, 0x00, 0xc0, 0x30, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0xc0, 0x30, 0x00, 0x03, + 0x00, 0x60, 0x60, 0x00, 0x00, 0x03, 0x30, 0x00, 0x00, 0x03, 0x03, 0x30, + 0xcc, 0x3f, 0x1c, 0xc6, 0x60, 0x30, 0x0c, 0x03, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x0c, 0x61, 0x87, 0x06, 0x19, 0x86, 0x03, 0x98, 0x03, + 0x01, 0x86, 0x61, 0x98, 0x60, 0x00, 0x00, 0x03, 0x00, 0x03, 0x00, 0xcc, + 0xc1, 0x98, 0x66, 0x19, 0x86, 0x63, 0x18, 0x06, 0x01, 0x86, 0x61, 0x83, + 0x00, 0x31, 0x86, 0x60, 0x30, 0x66, 0x19, 0x86, 0x61, 0x98, 0x66, 0x19, + 0x86, 0x0c, 0x18, 0x66, 0x1b, 0x06, 0x61, 0x98, 0x60, 0x18, 0x60, 0x60, + 0x01, 0x86, 0x18, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x01, 0x80, 0x00, + 0xc0, 0x00, 0x60, 0x03, 0x00, 0x31, 0x80, 0x0c, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x30, 0x0c, 0x03, 0x00, 0x00, 0x00, 0x7f, 0x83, 0x05, 0x57, + 0xf0, 0xf0, 0x30, 0x0c, 0x00, 0x78, 0x00, 0x3f, 0x0c, 0xc0, 0x30, 0x00, + 0x00, 0x00, 0xc0, 0x30, 0x00, 0x3f, 0xf0, 0x00, 0x00, 0x00, 0x03, 0x00, + 0xc0, 0x30, 0x00, 0x03, 0x00, 0xc0, 0x30, 0x00, 0x00, 0x03, 0x00, 0x00, + 0x00, 0x03, 0x00, 0x00, 0xcc, 0x6d, 0x94, 0xc6, 0x60, 0x00, 0x0c, 0x03, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x61, 0x8f, 0x06, 0x19, + 0x86, 0x07, 0x98, 0x06, 0x01, 0x86, 0x61, 0x98, 0x60, 0x00, 0x00, 0x06, + 0x00, 0x01, 0x81, 0x86, 0xc1, 0x98, 0x66, 0x19, 0x86, 0x61, 0x98, 0x06, + 0x01, 0x86, 0x61, 0x83, 0x00, 0x31, 0x8c, 0x60, 0x38, 0xe6, 0x19, 0x86, + 0x61, 0x98, 0x66, 0x19, 0x86, 0x0c, 0x18, 0x66, 0x1b, 0x06, 0x61, 0x98, + 0x60, 0x18, 0x60, 0x60, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, + 0x00, 0x01, 0x80, 0x00, 0xc0, 0x00, 0x60, 0x00, 0x00, 0x01, 0x80, 0x0c, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x0c, 0x03, 0x00, 0x00, 0x00, + 0x7f, 0x87, 0x8a, 0xab, 0x30, 0xc0, 0x30, 0x0c, 0x00, 0x00, 0x0c, 0x37, + 0x0c, 0xc0, 0x30, 0x00, 0x00, 0x00, 0xc0, 0x30, 0x00, 0x3f, 0xf0, 0x00, + 0x00, 0x00, 0x03, 0x00, 0xc0, 0x30, 0x00, 0x03, 0x01, 0x80, 0x18, 0x00, + 0x00, 0x63, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0xcc, 0x6c, 0x1d, 0x86, + 0x60, 0x00, 0x18, 0x01, 0x86, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x18, + 0x61, 0x83, 0x06, 0x18, 0x06, 0x0d, 0x98, 0x06, 0x00, 0x06, 0x61, 0x98, + 0x60, 0x00, 0x00, 0x0c, 0x00, 0x00, 0xc1, 0x86, 0xcf, 0x98, 0x66, 0x19, + 0x80, 0x61, 0x98, 0x06, 0x01, 0x80, 0x61, 0x83, 0x00, 0x31, 0x98, 0x60, + 0x3d, 0xe6, 0x19, 0x86, 0x61, 0x98, 0x66, 0x19, 0x80, 0x0c, 0x18, 0x66, + 0x1b, 0x06, 0x33, 0x0c, 0xc0, 0x18, 0x60, 0x30, 0x01, 0x80, 0x00, 0x00, + 0x00, 0x00, 0x06, 0x00, 0x00, 0x01, 0x80, 0x00, 0xc0, 0x00, 0x60, 0x00, + 0x00, 0x01, 0x80, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x0c, + 0x03, 0x00, 0x00, 0x20, 0x7f, 0x8f, 0xc5, 0x57, 0x30, 0xc0, 0x33, 0x0c, + 0x00, 0x00, 0x0c, 0x33, 0x07, 0x80, 0x30, 0x00, 0x00, 0x00, 0xc0, 0x30, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0xc0, 0x30, 0x00, 0x03, + 0x03, 0x00, 0x0c, 0x7f, 0x9f, 0xe3, 0x00, 0x00, 0x00, 0x03, 0x00, 0x01, + 0xfe, 0x6c, 0x01, 0x83, 0xc0, 0x00, 0x18, 0x01, 0x83, 0x60, 0x30, 0x00, + 0x00, 0x00, 0x00, 0x18, 0x63, 0x83, 0x00, 0x18, 0x06, 0x19, 0x98, 0x06, + 0x00, 0x0c, 0x61, 0x98, 0x60, 0xc0, 0x30, 0x18, 0x1f, 0xe0, 0x60, 0x06, + 0xd9, 0x98, 0x66, 0x19, 0x80, 0x61, 0x98, 0x06, 0x01, 0x80, 0x61, 0x83, + 0x00, 0x31, 0xb0, 0x60, 0x37, 0x67, 0x19, 0x86, 0x61, 0x98, 0x66, 0x19, + 0x80, 0x0c, 0x18, 0x66, 0x1b, 0x06, 0x33, 0x0c, 0xc0, 0x30, 0x60, 0x30, + 0x01, 0x80, 0x00, 0x00, 0x00, 0x0f, 0xc7, 0xf0, 0xfc, 0x3f, 0x8f, 0xc3, + 0xf0, 0xfe, 0x7f, 0x07, 0x00, 0x71, 0x86, 0x0c, 0x1f, 0xc7, 0xf0, 0xfc, + 0x7f, 0x0f, 0xe6, 0xf8, 0xfc, 0x7e, 0x18, 0x66, 0x19, 0x86, 0x61, 0x98, + 0x67, 0xf8, 0x30, 0x0c, 0x03, 0x00, 0x00, 0x70, 0x7f, 0x9f, 0xea, 0xab, + 0x30, 0xc0, 0x1e, 0x0f, 0xc0, 0x00, 0x0c, 0x33, 0x03, 0x00, 0x30, 0x00, + 0x00, 0x00, 0xc0, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, + 0xc0, 0x30, 0x00, 0x03, 0x06, 0x00, 0x06, 0x61, 0x81, 0x83, 0x00, 0x00, + 0x00, 0x03, 0x00, 0x00, 0xcc, 0x6c, 0x03, 0x01, 0x80, 0x00, 0x18, 0x01, + 0x81, 0xc0, 0x30, 0x00, 0x00, 0x00, 0x00, 0x30, 0x67, 0x83, 0x00, 0x18, + 0x06, 0x31, 0x9f, 0xc7, 0xf0, 0x0c, 0x61, 0x98, 0x60, 0xc0, 0x30, 0x30, + 0x00, 0x00, 0x30, 0x0c, 0xd9, 0x98, 0x67, 0xf1, 0x80, 0x61, 0x98, 0x06, + 0x01, 0x80, 0x61, 0x83, 0x00, 0x31, 0xe0, 0x60, 0x32, 0x67, 0x99, 0x86, + 0x61, 0x98, 0x66, 0x19, 0x80, 0x0c, 0x18, 0x63, 0x33, 0x06, 0x1e, 0x0c, + 0xc0, 0x60, 0x60, 0x18, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x66, 0x19, + 0x86, 0x61, 0x98, 0x60, 0xc1, 0x86, 0x61, 0x83, 0x00, 0x31, 0x8c, 0x0c, + 0x1b, 0x66, 0x19, 0x86, 0x61, 0x98, 0x67, 0x81, 0x86, 0x18, 0x18, 0x66, + 0x19, 0x86, 0x61, 0x98, 0x60, 0x18, 0x30, 0x0c, 0x03, 0x03, 0x98, 0xd8, + 0x7f, 0xbf, 0xf5, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x80, + 0x00, 0x03, 0xf0, 0xfc, 0x03, 0xf0, 0xff, 0xff, 0x00, 0x00, 0x0f, 0xfc, + 0x00, 0x00, 0x03, 0xff, 0xc3, 0xff, 0xff, 0xc3, 0x03, 0x00, 0x0c, 0x61, + 0x83, 0x07, 0xe0, 0x30, 0x00, 0x03, 0x00, 0x00, 0xcc, 0x3f, 0x03, 0x03, + 0x98, 0x00, 0x18, 0x01, 0x8f, 0xf9, 0xfe, 0x00, 0x1f, 0xe0, 0x00, 0x30, + 0x6d, 0x83, 0x00, 0x30, 0x7c, 0x61, 0x80, 0x66, 0x18, 0x18, 0x3f, 0x18, + 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x18, 0x18, 0xd9, 0x9f, 0xe6, 0x19, + 0x80, 0x61, 0x9f, 0x87, 0xe1, 0x9e, 0x7f, 0x83, 0x00, 0x31, 0xc0, 0x60, + 0x30, 0x66, 0xd9, 0x86, 0x7f, 0x18, 0x67, 0xf0, 0xfc, 0x0c, 0x18, 0x63, + 0x33, 0x06, 0x0c, 0x07, 0x80, 0xc0, 0x60, 0x18, 0x01, 0x80, 0x00, 0x00, + 0x00, 0x00, 0x66, 0x19, 0x80, 0x61, 0x98, 0x60, 0xc1, 0x86, 0x61, 0x83, + 0x00, 0x31, 0x98, 0x0c, 0x1b, 0x66, 0x19, 0x86, 0x61, 0x98, 0x67, 0x01, + 0x80, 0x18, 0x18, 0x66, 0x19, 0x86, 0x33, 0x18, 0x60, 0x30, 0xe0, 0x0c, + 0x01, 0xc6, 0xd9, 0x8c, 0x7f, 0xbf, 0xfa, 0xa8, 0x7e, 0x1f, 0x87, 0xc1, + 0xf8, 0x00, 0x0c, 0x06, 0x01, 0xfb, 0xf0, 0xfc, 0x03, 0xf0, 0xff, 0xff, + 0x00, 0x00, 0x0f, 0xfc, 0x00, 0x00, 0x03, 0xff, 0xc3, 0xff, 0xff, 0xc3, + 0x01, 0x80, 0x18, 0x61, 0x86, 0x03, 0x00, 0x30, 0x00, 0x03, 0x00, 0x00, + 0xcc, 0x0d, 0x86, 0x06, 0xd8, 0x00, 0x18, 0x01, 0x81, 0xc0, 0x30, 0x00, + 0x00, 0x00, 0x00, 0x60, 0x79, 0x83, 0x00, 0x60, 0x06, 0x61, 0x80, 0x66, + 0x18, 0x18, 0x61, 0x8f, 0xe0, 0x00, 0x00, 0x30, 0x00, 0x00, 0x30, 0x30, + 0xd9, 0x98, 0x66, 0x19, 0x80, 0x61, 0x98, 0x06, 0x01, 0x86, 0x61, 0x83, + 0x00, 0x31, 0xe0, 0x60, 0x30, 0x66, 0x79, 0x86, 0x60, 0x18, 0x67, 0x80, + 0x06, 0x0c, 0x18, 0x63, 0x33, 0x26, 0x1e, 0x03, 0x01, 0x80, 0x60, 0x0c, + 0x01, 0x80, 0x00, 0x00, 0x00, 0x0f, 0xe6, 0x19, 0x80, 0x61, 0x98, 0x60, + 0xc1, 0x86, 0x61, 0x83, 0x00, 0x31, 0xb0, 0x0c, 0x1b, 0x66, 0x19, 0x86, + 0x61, 0x98, 0x66, 0x01, 0x80, 0x18, 0x18, 0x63, 0x31, 0xb6, 0x1e, 0x18, + 0x60, 0x60, 0x30, 0x0c, 0x03, 0x06, 0xdb, 0x06, 0x7f, 0x9f, 0xe5, 0x54, + 0x18, 0x18, 0x06, 0x61, 0x80, 0x00, 0x0c, 0x06, 0x00, 0x60, 0x00, 0x0c, + 0x03, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, + 0xc0, 0x00, 0x0c, 0x03, 0x00, 0xc0, 0x30, 0x61, 0x9f, 0xe3, 0x00, 0x00, + 0x00, 0x03, 0x00, 0x01, 0xfe, 0x0d, 0x86, 0x0c, 0x70, 0x00, 0x18, 0x01, + 0x83, 0x60, 0x30, 0x00, 0x00, 0x00, 0x00, 0x60, 0x71, 0x83, 0x00, 0xc0, + 0x06, 0x61, 0x80, 0x66, 0x18, 0x30, 0x61, 0x80, 0x60, 0x00, 0x00, 0x18, + 0x1f, 0xe0, 0x60, 0x30, 0xd9, 0x98, 0x66, 0x19, 0x80, 0x61, 0x98, 0x06, + 0x01, 0x86, 0x61, 0x83, 0x00, 0x31, 0xb0, 0x60, 0x30, 0x66, 0x39, 0x86, + 0x60, 0x18, 0x66, 0xc0, 0x06, 0x0c, 0x18, 0x63, 0x33, 0x76, 0x33, 0x03, + 0x03, 0x00, 0x60, 0x0c, 0x01, 0x80, 0x00, 0x00, 0x00, 0x18, 0x66, 0x19, + 0x80, 0x61, 0x9f, 0xe0, 0xc1, 0x86, 0x61, 0x83, 0x00, 0x31, 0xe0, 0x0c, + 0x1b, 0x66, 0x19, 0x86, 0x61, 0x98, 0x66, 0x00, 0xfc, 0x18, 0x18, 0x63, + 0x31, 0xb6, 0x0c, 0x18, 0x60, 0xc0, 0x30, 0x0c, 0x03, 0x06, 0x73, 0x06, + 0x7f, 0x8f, 0xca, 0xa8, 0x18, 0x18, 0x06, 0x61, 0x80, 0x00, 0x0c, 0x06, + 0x00, 0x60, 0x00, 0x0c, 0x03, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x03, 0x00, 0xc0, 0x00, 0x0c, 0x03, 0x00, 0x60, 0x60, 0x61, + 0x98, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0x0d, 0x8c, 0x0c, + 0x30, 0x00, 0x18, 0x01, 0x86, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0xc0, + 0x61, 0x83, 0x01, 0x80, 0x06, 0x7f, 0x80, 0x66, 0x18, 0x30, 0x61, 0x80, + 0x60, 0x00, 0x00, 0x0c, 0x00, 0x00, 0xc0, 0x00, 0xcf, 0x98, 0x66, 0x19, + 0x80, 0x61, 0x98, 0x06, 0x01, 0x86, 0x61, 0x83, 0x06, 0x31, 0x98, 0x60, + 0x30, 0x66, 0x19, 0x86, 0x60, 0x18, 0x66, 0x60, 0x06, 0x0c, 0x18, 0x61, + 0xe3, 0xde, 0x33, 0x03, 0x06, 0x00, 0x60, 0x06, 0x01, 0x80, 0x00, 0x00, + 0x00, 0x18, 0x66, 0x19, 0x80, 0x61, 0x98, 0x00, 0xc1, 0x86, 0x61, 0x83, + 0x00, 0x31, 0xb0, 0x0c, 0x1b, 0x66, 0x19, 0x86, 0x61, 0x98, 0x66, 0x00, + 0x06, 0x18, 0x18, 0x63, 0x31, 0xb6, 0x1e, 0x18, 0x61, 0x80, 0x30, 0x0c, + 0x03, 0x00, 0x03, 0x06, 0x7f, 0x87, 0x85, 0x54, 0x18, 0x1e, 0x07, 0xc1, + 0xe0, 0x00, 0x00, 0x06, 0x00, 0x60, 0x00, 0x0c, 0x03, 0x00, 0x00, 0x30, + 0x00, 0x00, 0x00, 0x03, 0xff, 0x00, 0x03, 0x00, 0xc0, 0x00, 0x0c, 0x03, + 0x00, 0x30, 0xc0, 0x61, 0x80, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xcc, 0x6d, 0x8d, 0xcc, 0x30, 0x00, 0x0c, 0x03, 0x00, 0x00, 0x00, 0x0c, + 0x00, 0x00, 0x00, 0xc0, 0x61, 0x83, 0x03, 0x01, 0x86, 0x01, 0x98, 0x66, + 0x18, 0x30, 0x61, 0x80, 0x60, 0xc0, 0x30, 0x06, 0x00, 0x01, 0x80, 0x00, + 0xc0, 0x18, 0x66, 0x19, 0x86, 0x61, 0x98, 0x06, 0x01, 0x86, 0x61, 0x83, + 0x06, 0x31, 0x8c, 0x60, 0x30, 0x66, 0x19, 0x86, 0x60, 0x18, 0x66, 0x31, + 0x86, 0x0c, 0x18, 0x61, 0xe3, 0x8e, 0x61, 0x83, 0x06, 0x00, 0x60, 0x06, + 0x01, 0x80, 0x00, 0x00, 0x00, 0x18, 0x66, 0x19, 0x80, 0x61, 0x98, 0x00, + 0xc1, 0x86, 0x61, 0x83, 0x00, 0x31, 0x98, 0x0c, 0x1b, 0x66, 0x19, 0x86, + 0x61, 0x98, 0x66, 0x00, 0x06, 0x18, 0x18, 0x61, 0xe1, 0xb6, 0x33, 0x18, + 0x63, 0x00, 0x30, 0x0c, 0x03, 0x00, 0x03, 0x06, 0x7f, 0x83, 0x0a, 0xa8, + 0x18, 0x18, 0x07, 0x81, 0x80, 0x00, 0x00, 0x06, 0x00, 0x60, 0x00, 0x0c, + 0x03, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x03, 0xff, 0x00, 0x03, 0x00, + 0xc0, 0x00, 0x0c, 0x03, 0x00, 0x00, 0x00, 0x61, 0x80, 0x03, 0x18, 0x00, + 0x00, 0x03, 0x00, 0x00, 0xcc, 0x3f, 0x19, 0x46, 0x78, 0x00, 0x0c, 0x03, + 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0xc1, 0x80, 0x61, 0x83, 0x06, 0x01, + 0x86, 0x01, 0x98, 0x66, 0x18, 0x30, 0x61, 0x80, 0xc0, 0xc0, 0x30, 0x03, + 0x00, 0x03, 0x00, 0x30, 0xc0, 0x18, 0x66, 0x19, 0x86, 0x63, 0x18, 0x06, + 0x01, 0x86, 0x61, 0x83, 0x06, 0x31, 0x86, 0x60, 0x30, 0x66, 0x19, 0x86, + 0x60, 0x19, 0xe6, 0x19, 0x86, 0x0c, 0x18, 0x60, 0xc3, 0x06, 0x61, 0x83, + 0x06, 0x00, 0x60, 0x03, 0x01, 0x80, 0x00, 0x00, 0x00, 0x18, 0x66, 0x19, + 0x86, 0x61, 0x98, 0x60, 0xc1, 0x86, 0x61, 0x83, 0x00, 0x31, 0x8c, 0x0c, + 0x1b, 0x66, 0x19, 0x86, 0x61, 0x98, 0x66, 0x01, 0x86, 0x18, 0x18, 0x60, + 0xc1, 0xb6, 0x61, 0x98, 0x66, 0x00, 0x30, 0x0c, 0x03, 0x00, 0x03, 0x06, + 0x7f, 0x80, 0x05, 0x54, 0x18, 0x18, 0x06, 0xc1, 0x80, 0x00, 0x7f, 0x86, + 0x00, 0x60, 0x00, 0x0c, 0x03, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x03, 0x00, 0xc0, 0x00, 0x0c, 0x03, 0x07, 0xf9, 0xfe, 0x61, + 0x80, 0x07, 0xf8, 0x00, 0x00, 0x03, 0x00, 0x00, 0xcc, 0x0c, 0x19, 0xc3, + 0xd8, 0x00, 0x06, 0x06, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0xc1, 0x80, + 0x3f, 0x0f, 0xc7, 0xf8, 0xfc, 0x01, 0x8f, 0xc3, 0xf0, 0x30, 0x3f, 0x0f, + 0x80, 0x00, 0x30, 0x01, 0x80, 0x06, 0x00, 0x30, 0x7f, 0x98, 0x67, 0xf0, + 0xfc, 0x7e, 0x1f, 0xe6, 0x00, 0xfc, 0x61, 0x87, 0x83, 0xe1, 0x86, 0x7f, + 0xb0, 0x66, 0x18, 0xfc, 0x60, 0x0f, 0xc6, 0x18, 0xfc, 0x0c, 0x0f, 0xc0, + 0xc2, 0x02, 0x61, 0x83, 0x07, 0xf8, 0x78, 0x03, 0x07, 0x80, 0x00, 0x00, + 0x00, 0x0f, 0xe7, 0xf0, 0xfc, 0x3f, 0x8f, 0xc0, 0xc0, 0xfe, 0x61, 0x87, + 0x80, 0x31, 0x86, 0x1e, 0x1b, 0x66, 0x18, 0xfc, 0x7f, 0x0f, 0xe6, 0x00, + 0xfc, 0x0f, 0x0f, 0xe0, 0xc0, 0xfc, 0x61, 0x8f, 0xe7, 0xf8, 0x1c, 0x0c, + 0x0e, 0x00, 0x03, 0xfe, 0x00, 0x00, 0x0a, 0xa8, 0x18, 0x18, 0x06, 0x61, + 0x80, 0x00, 0x00, 0x07, 0xe0, 0x60, 0x00, 0x0c, 0x03, 0x00, 0x00, 0x30, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0xc0, 0x00, 0x0c, 0x03, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x06, 0x00, 0x00, 0x03, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x54, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, + 0x03, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, + 0xc0, 0x00, 0x0c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xfe, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x03, 0x30, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x0a, 0xa8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x0c, 0x03, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xff, 0xc3, 0x00, 0xc0, 0x00, 0x0c, 0x03, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, + 0x01, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xc0, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x54, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x03, 0x00, 0x00, 0x30, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xc3, 0x00, 0xc0, 0x00, 0x0c, 0x03, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +}; + +static const font_t font20 = { + .bits = font20_bits, + .depth = 1, + .width = 10, + .height = 20, + .stride = 160 +}; diff --git a/z80core/fonts/font22.h b/z80core/fonts/font22.h new file mode 100644 index 00000000..5acebf08 --- /dev/null +++ b/z80core/fonts/font22.h @@ -0,0 +1,342 @@ +/* + * Automatically generated from ter-u22b.bdf with bdf2c + * ASCII subset of Terminus Bold 22 + * + * Copyright (C) 2020 Dimitar Toshkov Zhekov + * + * Licensed under the SIL Open Font License, Version 1.1 + */ + +static const uint8_t font22_bits[] = { + 0x00, 0x00, 0x02, 0xaa, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x03, 0x00, 0x60, 0xff, 0xe0, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x03, 0x00, 0x60, 0x00, 0x01, 0x80, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x55, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x06, + 0x00, 0x00, 0x00, 0x03, 0x00, 0x60, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x18, 0x03, 0x00, 0x60, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xaa, 0xb3, 0x07, 0xe0, 0x78, + 0x18, 0x01, 0x98, 0x00, 0x0c, 0xc3, 0x30, 0x06, 0x00, 0x00, 0x00, 0x03, + 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x03, 0x00, + 0x60, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xcc, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x60, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x03, 0x80, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x7f, 0xc0, 0x01, 0x55, 0x33, 0x06, 0x00, 0xcc, 0x18, 0x01, 0x98, 0x00, + 0x0c, 0xc3, 0x30, 0x06, 0x00, 0x00, 0x00, 0x03, 0x00, 0x60, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x03, 0x00, 0x60, 0x00, 0x01, 0x80, + 0x06, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x80, 0xcc, + 0x19, 0x80, 0xc0, 0xe3, 0x0f, 0x80, 0x60, 0x03, 0x03, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x1f, 0x00, 0xc0, 0x7c, 0x0f, 0x80, + 0x0c, 0xff, 0x87, 0xe3, 0xfe, 0x1f, 0x03, 0xe0, 0x00, 0x00, 0x00, 0x18, + 0x00, 0x18, 0x00, 0xf8, 0x3f, 0x03, 0xe1, 0xfc, 0x0f, 0x87, 0xf0, 0xff, + 0x9f, 0xf0, 0xf8, 0x60, 0xc7, 0xe0, 0x1f, 0xb0, 0x66, 0x01, 0x00, 0x98, + 0x30, 0xf8, 0x7f, 0x03, 0xe1, 0xfc, 0x0f, 0x8f, 0xfc, 0xc1, 0x98, 0x36, + 0x06, 0x60, 0xd8, 0x19, 0xff, 0x0f, 0x86, 0x00, 0x3e, 0x06, 0xc0, 0x00, + 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x0c, 0x00, 0x01, 0xf0, 0x00, 0x60, + 0x00, 0xc0, 0x06, 0x18, 0x01, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x01, 0xc0, 0xc0, 0x70, 0x00, 0x00, 0x00, 0x7f, 0xc0, 0x02, 0xaa, + 0xb3, 0x06, 0x00, 0xc0, 0x18, 0x01, 0x98, 0x00, 0x0e, 0xc3, 0x30, 0x06, + 0x00, 0x00, 0x00, 0x03, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x18, 0x03, 0x00, 0x60, 0x00, 0x01, 0x80, 0x0c, 0x0c, 0x00, 0x00, + 0x00, 0x07, 0xc0, 0x00, 0x00, 0x01, 0x80, 0xcc, 0x19, 0x83, 0xf1, 0xb3, + 0x18, 0xc0, 0x60, 0x06, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x0c, 0x31, 0x81, 0xc0, 0xc6, 0x18, 0xc0, 0x1c, 0xc0, 0x0c, 0x03, + 0x06, 0x31, 0x86, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x0c, 0x01, 0x8c, + 0x61, 0x86, 0x31, 0x86, 0x18, 0xc6, 0x18, 0xc0, 0x18, 0x01, 0x8c, 0x60, + 0xc1, 0x80, 0x06, 0x30, 0x66, 0x01, 0x81, 0x98, 0x31, 0x8c, 0x61, 0x86, + 0x31, 0x86, 0x18, 0xc0, 0xc0, 0xc1, 0x98, 0x36, 0x06, 0x60, 0xd8, 0x18, + 0x03, 0x0c, 0x06, 0x00, 0x06, 0x0c, 0x60, 0x00, 0x00, 0x00, 0x01, 0x80, + 0x00, 0x00, 0x0c, 0x00, 0x03, 0x00, 0x00, 0x60, 0x00, 0xc0, 0x06, 0x18, + 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0xc0, + 0x18, 0x00, 0x00, 0x00, 0x7f, 0xc1, 0x81, 0x55, 0x3f, 0x07, 0x80, 0xc0, + 0x18, 0x00, 0xf0, 0x0c, 0x0f, 0xc3, 0x30, 0x06, 0x00, 0x00, 0x00, 0x03, + 0x00, 0x60, 0x00, 0x1f, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x18, 0x03, 0x00, + 0x60, 0x00, 0x01, 0x80, 0x18, 0x06, 0x00, 0x00, 0x00, 0x0c, 0x60, 0x00, + 0x00, 0x01, 0x80, 0xcc, 0x19, 0x86, 0xd9, 0xb6, 0x18, 0xc0, 0x60, 0x0c, + 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x60, 0xc3, + 0xc1, 0x83, 0x30, 0x60, 0x3c, 0xc0, 0x18, 0x03, 0x06, 0x60, 0xcc, 0x18, + 0x00, 0x00, 0x00, 0x60, 0x00, 0x06, 0x03, 0x06, 0xc0, 0xcc, 0x19, 0x83, + 0x30, 0x66, 0x0c, 0xc0, 0x18, 0x03, 0x06, 0x60, 0xc1, 0x80, 0x06, 0x30, + 0xc6, 0x01, 0xc3, 0x98, 0x33, 0x06, 0x60, 0xcc, 0x19, 0x83, 0x30, 0x60, + 0xc0, 0xc1, 0x98, 0x36, 0x06, 0x31, 0x8c, 0x30, 0x03, 0x0c, 0x03, 0x00, + 0x06, 0x18, 0x30, 0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x0c, 0x00, + 0x03, 0x00, 0x00, 0x60, 0x00, 0xc0, 0x06, 0x18, 0x00, 0x60, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0xc0, 0x0c, 0x00, 0x00, 0x00, + 0x7f, 0xc3, 0xc2, 0xaa, 0xb3, 0x06, 0x00, 0xc0, 0x18, 0x00, 0x00, 0x0c, + 0x0d, 0xc3, 0x30, 0x06, 0x00, 0x00, 0x00, 0x03, 0x00, 0x60, 0x00, 0x1f, + 0xfc, 0x00, 0x00, 0x00, 0x00, 0x18, 0x03, 0x00, 0x60, 0x00, 0x01, 0x80, + 0x30, 0x03, 0x00, 0x00, 0x01, 0x8c, 0x60, 0x00, 0x00, 0x01, 0x80, 0x00, + 0x19, 0x8c, 0xcc, 0xe6, 0x18, 0xc0, 0x00, 0x0c, 0x00, 0xc1, 0x86, 0x06, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x60, 0xc6, 0xc1, 0x83, 0x00, 0x60, + 0x6c, 0xc0, 0x18, 0x00, 0x06, 0x60, 0xcc, 0x18, 0x30, 0x06, 0x00, 0xc0, + 0x00, 0x03, 0x03, 0x06, 0xc7, 0xcc, 0x19, 0x83, 0x30, 0x66, 0x0c, 0xc0, + 0x18, 0x03, 0x06, 0x60, 0xc1, 0x80, 0x06, 0x31, 0x86, 0x01, 0xe7, 0x98, + 0x33, 0x06, 0x60, 0xcc, 0x19, 0x83, 0x30, 0x00, 0xc0, 0xc1, 0x98, 0x36, + 0x06, 0x31, 0x8c, 0x30, 0x03, 0x0c, 0x03, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x0c, 0x00, 0x03, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x18, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x06, 0x00, 0xc0, 0x0c, 0x00, 0x00, 0x60, 0x7f, 0xc7, 0xe1, 0x55, + 0x33, 0x06, 0x00, 0xcc, 0x18, 0x00, 0x00, 0x0c, 0x0c, 0xc1, 0xe0, 0x06, + 0x00, 0x00, 0x00, 0x03, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x18, 0x03, 0x00, 0x60, 0x00, 0x01, 0x80, 0x60, 0x01, 0x87, 0xfc, + 0xff, 0x8c, 0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x7f, 0xec, 0xc0, 0x0c, + 0x0d, 0x80, 0x00, 0x18, 0x00, 0x60, 0xcc, 0x06, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x30, 0x61, 0xc0, 0xc1, 0x83, 0x00, 0x60, 0xcc, 0xc0, 0x18, 0x00, + 0x0c, 0x60, 0xcc, 0x18, 0x30, 0x06, 0x01, 0x80, 0xff, 0x81, 0x80, 0x06, + 0xcc, 0xcc, 0x19, 0x83, 0x30, 0x06, 0x0c, 0xc0, 0x18, 0x03, 0x00, 0x60, + 0xc1, 0x80, 0x06, 0x33, 0x06, 0x01, 0xbd, 0x9c, 0x33, 0x06, 0x60, 0xcc, + 0x19, 0x83, 0x30, 0x00, 0xc0, 0xc1, 0x98, 0x36, 0x06, 0x1b, 0x06, 0x60, + 0x06, 0x0c, 0x01, 0x80, 0x06, 0x00, 0x00, 0x00, 0x00, 0x07, 0xe1, 0xfc, + 0x0f, 0x81, 0xfc, 0x3e, 0x1f, 0xe0, 0xfe, 0x7f, 0x03, 0xc0, 0x1e, 0x18, + 0x60, 0x61, 0xfe, 0x1f, 0xc0, 0xf8, 0x7f, 0x03, 0xf9, 0x9f, 0x1f, 0xc7, + 0xf8, 0xc1, 0x98, 0x36, 0x06, 0x60, 0xcc, 0x19, 0xff, 0x06, 0x00, 0xc0, + 0x0c, 0x00, 0x00, 0xf0, 0x7f, 0xcf, 0xf2, 0xaa, 0xb3, 0x06, 0x00, 0x78, + 0x1f, 0x80, 0x00, 0x0c, 0x0c, 0xc0, 0xc0, 0x06, 0x00, 0x00, 0x00, 0x03, + 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x03, 0x00, + 0x60, 0x00, 0x01, 0x80, 0xc0, 0x00, 0xc6, 0x0c, 0x06, 0x0c, 0x00, 0x00, + 0x00, 0x01, 0x80, 0x00, 0x19, 0x8c, 0xc0, 0x0c, 0x07, 0x00, 0x00, 0x18, + 0x00, 0x60, 0x78, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x63, 0xc0, + 0xc0, 0x03, 0x00, 0xc1, 0x8c, 0xfe, 0x1f, 0xc0, 0x0c, 0x31, 0x8c, 0x18, + 0x30, 0x06, 0x03, 0x00, 0x00, 0x00, 0xc0, 0x0c, 0xd8, 0xcc, 0x19, 0x86, + 0x30, 0x06, 0x0c, 0xc0, 0x18, 0x03, 0x00, 0x60, 0xc1, 0x80, 0x06, 0x36, + 0x06, 0x01, 0x99, 0x9e, 0x33, 0x06, 0x60, 0xcc, 0x19, 0x83, 0x18, 0x00, + 0xc0, 0xc1, 0x8c, 0x66, 0x06, 0x1b, 0x06, 0x60, 0x0c, 0x0c, 0x01, 0x80, + 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x31, 0x86, 0x18, 0xc3, 0x0c, 0x63, + 0x03, 0x01, 0x86, 0x61, 0x80, 0xc0, 0x06, 0x18, 0xc0, 0x61, 0x9b, 0x18, + 0x61, 0x8c, 0x61, 0x86, 0x19, 0xb0, 0x30, 0x60, 0xc0, 0xc1, 0x98, 0x36, + 0x06, 0x60, 0xcc, 0x18, 0x03, 0x06, 0x00, 0xc0, 0x0c, 0x0e, 0x31, 0x98, + 0x7f, 0xdf, 0xf9, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, + 0xc0, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x03, 0x00, 0x60, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x03, 0x00, 0x60, 0x00, 0x01, 0x80, + 0xc0, 0x00, 0xc6, 0x0c, 0x0c, 0x0c, 0x00, 0x60, 0x00, 0x01, 0x80, 0x00, + 0x19, 0x86, 0xc0, 0x18, 0x0f, 0x00, 0x00, 0x18, 0x00, 0x60, 0x30, 0x06, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x66, 0xc0, 0xc0, 0x06, 0x07, 0x83, + 0x0c, 0x03, 0x18, 0x60, 0x18, 0x1f, 0x0c, 0x18, 0x00, 0x00, 0x06, 0x00, + 0x00, 0x00, 0x60, 0x18, 0xd8, 0xcc, 0x19, 0xfc, 0x30, 0x06, 0x0c, 0xfe, + 0x1f, 0xc3, 0x00, 0x7f, 0xc1, 0x80, 0x06, 0x3c, 0x06, 0x01, 0x81, 0x9b, + 0x33, 0x06, 0x61, 0x8c, 0x19, 0x86, 0x0f, 0x80, 0xc0, 0xc1, 0x8c, 0x66, + 0x06, 0x0e, 0x03, 0xc0, 0x18, 0x0c, 0x00, 0xc0, 0x06, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x19, 0x83, 0x30, 0x66, 0x0c, 0xc1, 0x83, 0x03, 0x06, 0x60, + 0xc0, 0xc0, 0x06, 0x19, 0x80, 0x61, 0x99, 0x98, 0x33, 0x06, 0x60, 0xcc, + 0x19, 0xe0, 0x30, 0x00, 0xc0, 0xc1, 0x98, 0x36, 0x06, 0x31, 0x8c, 0x18, + 0x06, 0x1c, 0x00, 0xc0, 0x07, 0x1b, 0x33, 0x0c, 0x7f, 0xdf, 0xfa, 0xaa, + 0x87, 0xe0, 0xfc, 0x1f, 0x03, 0xf0, 0x00, 0x0c, 0x01, 0x80, 0x7e, 0x7e, + 0x0f, 0xc0, 0x1f, 0xc3, 0xff, 0xff, 0x00, 0x00, 0x03, 0xff, 0x80, 0x00, + 0x00, 0x1f, 0xff, 0x07, 0xff, 0xff, 0xe1, 0x80, 0x60, 0x01, 0x86, 0x0c, + 0x18, 0x1f, 0x80, 0x60, 0x00, 0x01, 0x80, 0x00, 0x19, 0x83, 0xf0, 0x18, + 0x19, 0xb0, 0x00, 0x18, 0x00, 0x63, 0xff, 0x7f, 0xe0, 0x00, 0xff, 0x80, + 0x00, 0x60, 0x6c, 0xc0, 0xc0, 0x0c, 0x00, 0xc6, 0x0c, 0x01, 0x98, 0x30, + 0x18, 0x31, 0x86, 0x18, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x60, 0x30, + 0xd8, 0xcf, 0xf9, 0x86, 0x30, 0x06, 0x0c, 0xc0, 0x18, 0x03, 0x3e, 0x60, + 0xc1, 0x80, 0x06, 0x3c, 0x06, 0x01, 0x81, 0x99, 0xb3, 0x06, 0x7f, 0x0c, + 0x19, 0xfc, 0x00, 0xc0, 0xc0, 0xc1, 0x8c, 0x66, 0x66, 0x0e, 0x03, 0xc0, + 0x30, 0x0c, 0x00, 0xc0, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x19, 0x83, + 0x30, 0x06, 0x0c, 0xc1, 0x83, 0x03, 0x06, 0x60, 0xc0, 0xc0, 0x06, 0x1b, + 0x00, 0x61, 0x99, 0x98, 0x33, 0x06, 0x60, 0xcc, 0x19, 0xc0, 0x30, 0x00, + 0xc0, 0xc1, 0x8c, 0x66, 0x66, 0x1b, 0x0c, 0x18, 0x0c, 0x06, 0x00, 0xc0, + 0x0c, 0x19, 0xb6, 0x06, 0x7f, 0xcf, 0xf1, 0x55, 0x01, 0x80, 0xc0, 0x19, + 0x83, 0x00, 0x00, 0x0c, 0x01, 0x80, 0x18, 0x7e, 0x0f, 0xc0, 0x1f, 0xc3, + 0xff, 0xff, 0x00, 0x00, 0x03, 0xff, 0x80, 0x00, 0x00, 0x1f, 0xff, 0x07, + 0xff, 0xff, 0xe1, 0x80, 0x30, 0x03, 0x06, 0x0c, 0x30, 0x0c, 0x00, 0x60, + 0x00, 0x01, 0x80, 0x00, 0x19, 0x80, 0xd8, 0x30, 0x30, 0xf0, 0x00, 0x18, + 0x00, 0x60, 0x30, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x78, 0xc0, + 0xc0, 0x18, 0x00, 0x66, 0x0c, 0x01, 0x98, 0x30, 0x30, 0x60, 0xc3, 0xf8, + 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0xc0, 0x30, 0xd8, 0xcc, 0x19, 0x83, + 0x30, 0x06, 0x0c, 0xc0, 0x18, 0x03, 0x06, 0x60, 0xc1, 0x80, 0x06, 0x36, + 0x06, 0x01, 0x81, 0x98, 0xf3, 0x06, 0x60, 0x0c, 0x19, 0xe0, 0x00, 0x60, + 0xc0, 0xc1, 0x8c, 0x66, 0x66, 0x1b, 0x01, 0x80, 0x60, 0x0c, 0x00, 0x60, + 0x06, 0x00, 0x00, 0x00, 0x00, 0x07, 0xf9, 0x83, 0x30, 0x06, 0x0c, 0xff, + 0x83, 0x03, 0x06, 0x60, 0xc0, 0xc0, 0x06, 0x1e, 0x00, 0x61, 0x99, 0x98, + 0x33, 0x06, 0x60, 0xcc, 0x19, 0x80, 0x1f, 0xc0, 0xc0, 0xc1, 0x8c, 0x66, + 0x66, 0x0e, 0x0c, 0x18, 0x18, 0x06, 0x00, 0xc0, 0x0c, 0x18, 0xe6, 0x06, + 0x7f, 0xc7, 0xe2, 0xaa, 0x81, 0x80, 0xc0, 0x19, 0x83, 0x00, 0x00, 0x0c, + 0x01, 0x80, 0x18, 0x00, 0x00, 0xc0, 0x18, 0x00, 0x00, 0x60, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x03, 0x00, 0x00, 0x0c, 0x01, 0x80, + 0x18, 0x06, 0x06, 0x0c, 0xff, 0x8c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x7f, 0xe0, 0xcc, 0x30, 0x30, 0x60, 0x00, 0x18, 0x00, 0x60, 0x78, 0x06, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x70, 0xc0, 0xc0, 0x30, 0x00, 0x66, + 0x0c, 0x01, 0x98, 0x30, 0x30, 0x60, 0xc0, 0x18, 0x00, 0x00, 0x01, 0x80, + 0xff, 0x81, 0x80, 0x00, 0xcc, 0xcc, 0x19, 0x83, 0x30, 0x06, 0x0c, 0xc0, + 0x18, 0x03, 0x06, 0x60, 0xc1, 0x81, 0x86, 0x33, 0x06, 0x01, 0x81, 0x98, + 0x73, 0x06, 0x60, 0x0c, 0x19, 0xb0, 0x00, 0x60, 0xc0, 0xc1, 0x86, 0xc6, + 0xf6, 0x1b, 0x01, 0x80, 0xc0, 0x0c, 0x00, 0x60, 0x06, 0x00, 0x00, 0x00, + 0x00, 0x0c, 0x19, 0x83, 0x30, 0x06, 0x0c, 0xc0, 0x03, 0x03, 0x06, 0x60, + 0xc0, 0xc0, 0x06, 0x1e, 0x00, 0x61, 0x99, 0x98, 0x33, 0x06, 0x60, 0xcc, + 0x19, 0x80, 0x00, 0x60, 0xc0, 0xc1, 0x8c, 0x66, 0x66, 0x0e, 0x0c, 0x18, + 0x30, 0x06, 0x00, 0xc0, 0x0c, 0x00, 0x06, 0x06, 0x7f, 0xc3, 0xc1, 0x55, + 0x01, 0x80, 0xf0, 0x1f, 0x03, 0xc0, 0x00, 0x0c, 0x01, 0x80, 0x18, 0x00, + 0x00, 0xc0, 0x18, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x18, 0x03, 0x00, 0x00, 0x0c, 0x01, 0x80, 0x0c, 0x0c, 0x06, 0x0c, + 0xc0, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x19, 0x80, 0xcc, 0x67, + 0x30, 0x60, 0x00, 0x0c, 0x00, 0xc0, 0xcc, 0x06, 0x00, 0xc0, 0x00, 0x00, + 0x01, 0x80, 0x60, 0xc0, 0xc0, 0x60, 0x00, 0x67, 0xfc, 0xc1, 0x98, 0x30, + 0x60, 0x60, 0xc0, 0x18, 0x30, 0x06, 0x00, 0xc0, 0x00, 0x03, 0x00, 0x00, + 0xc7, 0xcc, 0x19, 0x83, 0x30, 0x66, 0x0c, 0xc0, 0x18, 0x03, 0x06, 0x60, + 0xc1, 0x81, 0x86, 0x31, 0x86, 0x01, 0x81, 0x98, 0x33, 0x06, 0x60, 0x0c, + 0x19, 0x98, 0x00, 0x60, 0xc0, 0xc1, 0x86, 0xc7, 0x9e, 0x31, 0x81, 0x81, + 0x80, 0x0c, 0x00, 0x30, 0x06, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x19, 0x83, + 0x30, 0x06, 0x0c, 0xc0, 0x03, 0x03, 0x06, 0x60, 0xc0, 0xc0, 0x06, 0x1b, + 0x00, 0x61, 0x99, 0x98, 0x33, 0x06, 0x60, 0xcc, 0x19, 0x80, 0x00, 0x60, + 0xc0, 0xc1, 0x86, 0xc6, 0x66, 0x1b, 0x0c, 0x18, 0x60, 0x06, 0x00, 0xc0, + 0x0c, 0x00, 0x06, 0x06, 0x7f, 0xc1, 0x82, 0xaa, 0x81, 0x80, 0xc0, 0x1e, + 0x03, 0x00, 0x00, 0x00, 0x01, 0x80, 0x18, 0x00, 0x00, 0xc0, 0x18, 0x00, + 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x03, 0x00, + 0x00, 0x0c, 0x01, 0x80, 0x06, 0x18, 0x06, 0x0c, 0x00, 0x0c, 0x00, 0x00, + 0x00, 0x01, 0x80, 0x00, 0x19, 0x8c, 0xcc, 0x6d, 0xb0, 0x60, 0x00, 0x0c, + 0x00, 0xc1, 0x86, 0x06, 0x00, 0xc0, 0x00, 0x03, 0x01, 0x80, 0x60, 0xc0, + 0xc0, 0xc0, 0x30, 0x60, 0x0c, 0xc1, 0x98, 0x30, 0x60, 0x60, 0xc0, 0x18, + 0x30, 0x06, 0x00, 0x60, 0x00, 0x06, 0x00, 0x30, 0xc0, 0x0c, 0x19, 0x83, + 0x30, 0x66, 0x0c, 0xc0, 0x18, 0x03, 0x06, 0x60, 0xc1, 0x81, 0x86, 0x30, + 0xc6, 0x01, 0x81, 0x98, 0x33, 0x06, 0x60, 0x0c, 0x19, 0x8c, 0x30, 0x60, + 0xc0, 0xc1, 0x83, 0x87, 0x0e, 0x31, 0x81, 0x81, 0x80, 0x0c, 0x00, 0x30, + 0x06, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x19, 0x83, 0x30, 0x66, 0x0c, 0xc0, + 0x03, 0x03, 0x06, 0x60, 0xc0, 0xc0, 0x06, 0x19, 0x80, 0x61, 0x99, 0x98, + 0x33, 0x06, 0x60, 0xcc, 0x19, 0x80, 0x00, 0x60, 0xc0, 0xc1, 0x86, 0xc6, + 0x66, 0x31, 0x8c, 0x18, 0xc0, 0x06, 0x00, 0xc0, 0x0c, 0x00, 0x06, 0x06, + 0x7f, 0xc0, 0x01, 0x55, 0x01, 0x80, 0xc0, 0x1b, 0x03, 0x00, 0x00, 0x00, + 0x01, 0x80, 0x18, 0x00, 0x00, 0xc0, 0x18, 0x00, 0x00, 0x60, 0x00, 0x00, + 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x18, 0x03, 0x00, 0x00, 0x0c, 0x01, 0x80, + 0x00, 0x00, 0x06, 0x0c, 0x00, 0x0c, 0x30, 0x00, 0x00, 0x01, 0x80, 0x00, + 0x19, 0x86, 0xd8, 0xcd, 0x98, 0xf0, 0x00, 0x06, 0x01, 0x80, 0x00, 0x00, + 0x00, 0xc0, 0x00, 0x03, 0x03, 0x00, 0x31, 0x80, 0xc1, 0x80, 0x18, 0xc0, + 0x0c, 0x63, 0x0c, 0x60, 0x60, 0x31, 0x80, 0x30, 0x30, 0x06, 0x00, 0x30, + 0x00, 0x0c, 0x00, 0x30, 0x60, 0x0c, 0x19, 0x86, 0x18, 0xc6, 0x18, 0xc0, + 0x18, 0x01, 0x8c, 0x60, 0xc1, 0x80, 0xcc, 0x30, 0x66, 0x01, 0x81, 0x98, + 0x31, 0x8c, 0x60, 0x06, 0xf1, 0x86, 0x18, 0xc0, 0xc0, 0x63, 0x03, 0x86, + 0x06, 0x60, 0xc1, 0x81, 0x80, 0x0c, 0x00, 0x18, 0x06, 0x00, 0x00, 0x00, + 0x00, 0x0c, 0x19, 0x86, 0x18, 0xc3, 0x0c, 0x61, 0x83, 0x01, 0x86, 0x60, + 0xc0, 0xc0, 0x06, 0x18, 0xc0, 0x61, 0x99, 0x98, 0x31, 0x8c, 0x61, 0x86, + 0x19, 0x80, 0x30, 0x60, 0xc0, 0x61, 0x83, 0x86, 0x66, 0x60, 0xc6, 0x19, + 0x80, 0x03, 0x00, 0xc0, 0x18, 0x00, 0x06, 0x06, 0x7f, 0xc0, 0x02, 0xaa, + 0x81, 0x80, 0xc0, 0x19, 0x83, 0x00, 0x00, 0xff, 0xc1, 0xf8, 0x18, 0x00, + 0x00, 0xc0, 0x18, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xf0, + 0x00, 0x18, 0x03, 0x00, 0x00, 0x0c, 0x01, 0x81, 0xff, 0x3f, 0xe6, 0x0c, + 0x00, 0x0c, 0x30, 0x00, 0x00, 0x01, 0x80, 0x00, 0x19, 0x83, 0xf0, 0xc7, + 0x0f, 0xb0, 0x00, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x03, + 0x03, 0x00, 0x1f, 0x07, 0xf9, 0xff, 0x0f, 0x80, 0x0c, 0x3e, 0x07, 0xc0, + 0x60, 0x1f, 0x07, 0xe0, 0x00, 0x06, 0x00, 0x18, 0x00, 0x18, 0x00, 0x30, + 0x3f, 0xcc, 0x19, 0xfc, 0x0f, 0x87, 0xf0, 0xff, 0x98, 0x00, 0xf8, 0x60, + 0xc7, 0xe0, 0x78, 0x30, 0x67, 0xfd, 0x81, 0x98, 0x30, 0xf8, 0x60, 0x03, + 0xe1, 0x83, 0x0f, 0x80, 0xc0, 0x3e, 0x03, 0x84, 0x02, 0x60, 0xc1, 0x81, + 0xff, 0x0f, 0x80, 0x18, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x07, 0xf9, 0xfc, + 0x0f, 0x81, 0xfc, 0x3f, 0x03, 0x00, 0xfe, 0x60, 0xc3, 0xf0, 0x06, 0x18, + 0x61, 0xf9, 0x99, 0x98, 0x30, 0xf8, 0x7f, 0x03, 0xf9, 0x80, 0x1f, 0xc0, + 0x7c, 0x3f, 0x83, 0x83, 0xfc, 0x60, 0xc3, 0xf9, 0xff, 0x01, 0xc0, 0xc0, + 0x70, 0x00, 0x07, 0xfe, 0x00, 0x00, 0x01, 0x55, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x18, 0x00, + 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x03, 0x00, + 0x00, 0x0c, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xf0, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0xc6, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x60, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x02, 0xaa, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x18, 0x00, 0x00, 0x60, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x03, 0x00, 0x00, 0x0c, 0x01, 0x80, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xfe, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, + 0x00, 0x00, 0xc6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, + 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x55, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xc0, 0x18, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x18, 0x03, 0x00, 0x00, 0x0c, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0xc6, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x18, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xaa, 0x80, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x18, 0x00, + 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xfe, 0x18, 0x03, 0x00, + 0x00, 0x0c, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x01, 0xf8, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x60, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x07, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x18, 0x00, 0x00, 0x60, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x0f, 0xfe, 0x18, 0x03, 0x00, 0x00, 0x0c, 0x01, 0x80, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +}; + +static const font_t font22 = { + .bits = font22_bits, + .depth = 1, + .width = 11, + .height = 22, + .stride = 176 +}; diff --git a/z80core/fonts/font24.h b/z80core/fonts/font24.h new file mode 100644 index 00000000..2f47072f --- /dev/null +++ b/z80core/fonts/font24.h @@ -0,0 +1,403 @@ +/* + * Automatically generated from ter-u24b.bdf with bdf2c + * ASCII subset of Terminus Bold 24 + * + * Copyright (C) 2020 Dimitar Toshkov Zhekov + * + * Licensed under the SIL Open Font License, Version 1.1 + */ + +static const uint8_t font24_bits[] = { + 0x00, 0x00, 0x00, 0xaa, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x06, 0x00, 0x60, + 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x06, 0x00, 0x60, + 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x55, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x06, 0x00, 0x60, + 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x06, 0x00, 0x60, + 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xaa, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xf0, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x06, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x06, 0x00, 0x60, + 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x19, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, + 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x55, 0x56, 0x60, 0x7e, 0x03, 0xc0, 0x60, 0x03, 0x18, + 0x00, 0x06, 0x60, 0x66, 0x00, 0x60, 0x00, 0x00, 0x00, 0x06, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x06, 0x00, 0x60, + 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x19, 0x80, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, + 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x7f, 0xe0, 0x00, 0xaa, 0xa6, 0x60, 0x60, 0x06, 0x60, 0x60, 0x03, 0x18, + 0x00, 0x06, 0x60, 0x66, 0x00, 0x60, 0x00, 0x00, 0x00, 0x06, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x06, 0x00, 0x60, + 0x00, 0x00, 0x60, 0x00, 0xc3, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, + 0x00, 0x00, 0x60, 0x19, 0x81, 0x98, 0x06, 0x00, 0x00, 0x0e, 0x00, 0x60, + 0x03, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x1f, 0x80, 0x60, 0x1f, 0x81, 0xf8, 0x00, 0x67, 0xfe, 0x1f, 0xc7, 0xfe, + 0x1f, 0x81, 0xf8, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x60, 0x01, 0xf8, + 0x3f, 0x81, 0xf8, 0x7f, 0x81, 0xf8, 0x7f, 0x87, 0xfe, 0x7f, 0xe1, 0xf8, + 0x60, 0x61, 0xf8, 0x03, 0xf6, 0x06, 0x60, 0x08, 0x02, 0x60, 0x61, 0xf8, + 0x7f, 0x81, 0xf8, 0x7f, 0x81, 0xf8, 0x7f, 0xe6, 0x06, 0x60, 0x6c, 0x06, + 0x60, 0x66, 0x06, 0x7f, 0xe1, 0xf0, 0x00, 0x01, 0xf0, 0x19, 0x80, 0x00, + 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x03, 0xe0, 0x00, + 0x60, 0x00, 0x60, 0x00, 0xc3, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x06, 0x03, 0x80, 0x00, 0x00, 0x00, + 0x7f, 0xe0, 0x00, 0x55, 0x56, 0x60, 0x60, 0x06, 0x00, 0x60, 0x03, 0x18, + 0x00, 0x07, 0x60, 0x66, 0x00, 0x60, 0x00, 0x00, 0x00, 0x06, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x06, 0x00, 0x60, + 0x00, 0x00, 0x60, 0x01, 0x81, 0x80, 0x00, 0x00, 0x00, 0x19, 0x80, 0x00, + 0x00, 0x00, 0x60, 0x19, 0x81, 0x98, 0x1f, 0x83, 0x8c, 0x1b, 0x00, 0x60, + 0x06, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, + 0x30, 0xc0, 0xe0, 0x30, 0xc3, 0x0c, 0x00, 0xe6, 0x00, 0x30, 0x06, 0x06, + 0x30, 0xc3, 0x0c, 0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x30, 0x03, 0x0c, + 0x60, 0xc3, 0x0c, 0x60, 0xc3, 0x0c, 0x60, 0xc6, 0x00, 0x60, 0x03, 0x0c, + 0x60, 0x60, 0x60, 0x00, 0xc6, 0x0c, 0x60, 0x0c, 0x06, 0x60, 0x63, 0x0c, + 0x60, 0xc3, 0x0c, 0x60, 0xc3, 0x0c, 0x06, 0x06, 0x06, 0x60, 0x6c, 0x06, + 0x60, 0x66, 0x06, 0x00, 0x61, 0x80, 0x30, 0x00, 0x30, 0x30, 0xc0, 0x00, + 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x06, 0x00, 0x00, + 0x60, 0x00, 0x60, 0x00, 0xc3, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x06, 0x00, 0xc0, 0x00, 0x00, 0x00, + 0x7f, 0xe0, 0x60, 0xaa, 0xa7, 0xe0, 0x78, 0x06, 0x00, 0x60, 0x03, 0x18, + 0x00, 0x07, 0xe0, 0x66, 0x00, 0x60, 0x00, 0x00, 0x00, 0x06, 0x00, 0x60, + 0x00, 0x0f, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x06, 0x00, 0x60, + 0x00, 0x00, 0x60, 0x03, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x30, 0xc0, 0x00, + 0x00, 0x00, 0x60, 0x19, 0x81, 0x98, 0x36, 0xc6, 0xcc, 0x31, 0x80, 0x60, + 0x0c, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, + 0x60, 0x61, 0xe0, 0x60, 0x66, 0x06, 0x01, 0xe6, 0x00, 0x60, 0x06, 0x06, + 0x60, 0x66, 0x06, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x18, 0x06, 0x06, + 0xc0, 0x66, 0x06, 0x60, 0x66, 0x06, 0x60, 0x66, 0x00, 0x60, 0x06, 0x06, + 0x60, 0x60, 0x60, 0x00, 0xc6, 0x18, 0x60, 0x0e, 0x0e, 0x60, 0x66, 0x06, + 0x60, 0x66, 0x06, 0x60, 0x66, 0x06, 0x06, 0x06, 0x06, 0x60, 0x6c, 0x06, + 0x30, 0xc3, 0x0c, 0x00, 0x61, 0x80, 0x30, 0x00, 0x30, 0x60, 0x60, 0x00, + 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x06, 0x00, 0x00, + 0x60, 0x00, 0x60, 0x00, 0xc3, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x06, 0x00, 0x60, 0x00, 0x00, 0x00, + 0x7f, 0xe0, 0xf0, 0x55, 0x56, 0x60, 0x60, 0x06, 0x00, 0x60, 0x01, 0xf0, + 0x06, 0x06, 0xe0, 0x66, 0x00, 0x60, 0x00, 0x00, 0x00, 0x06, 0x00, 0x60, + 0x00, 0x0f, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x06, 0x00, 0x60, + 0x00, 0x00, 0x60, 0x06, 0x00, 0x60, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, + 0x00, 0x00, 0x60, 0x00, 0x01, 0x98, 0x66, 0x66, 0xd8, 0x31, 0x80, 0x00, + 0x0c, 0x00, 0x60, 0x60, 0xc0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, + 0x60, 0x63, 0x60, 0x60, 0x60, 0x06, 0x03, 0x66, 0x00, 0x60, 0x00, 0x06, + 0x60, 0x66, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x0c, 0x06, 0x06, + 0xc3, 0xe6, 0x06, 0x60, 0x66, 0x06, 0x60, 0x66, 0x00, 0x60, 0x06, 0x06, + 0x60, 0x60, 0x60, 0x00, 0xc6, 0x30, 0x60, 0x0f, 0x1e, 0x60, 0x66, 0x06, + 0x60, 0x66, 0x06, 0x60, 0x66, 0x00, 0x06, 0x06, 0x06, 0x60, 0x6c, 0x06, + 0x30, 0xc3, 0x0c, 0x00, 0x61, 0x80, 0x18, 0x00, 0x30, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x06, 0x00, 0x00, + 0x60, 0x00, 0x00, 0x00, 0x03, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x06, 0x00, 0x60, 0x00, 0x00, 0x60, + 0x7f, 0xe1, 0xf8, 0xaa, 0xa6, 0x60, 0x60, 0x06, 0x60, 0x60, 0x00, 0x00, + 0x06, 0x06, 0x60, 0x3c, 0x00, 0x60, 0x00, 0x00, 0x00, 0x06, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x06, 0x00, 0x60, + 0x00, 0x00, 0x60, 0x0c, 0x00, 0x30, 0x7f, 0xe7, 0xfe, 0x30, 0x00, 0x00, + 0x00, 0x00, 0x60, 0x00, 0x07, 0xfe, 0x66, 0x03, 0x98, 0x31, 0x80, 0x00, + 0x18, 0x00, 0x30, 0x31, 0x80, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, + 0x60, 0xe0, 0x60, 0x60, 0x60, 0x06, 0x06, 0x66, 0x00, 0x60, 0x00, 0x0c, + 0x60, 0x66, 0x06, 0x06, 0x00, 0x60, 0x0c, 0x00, 0x00, 0x06, 0x06, 0x06, + 0xc6, 0x66, 0x06, 0x60, 0x66, 0x00, 0x60, 0x66, 0x00, 0x60, 0x06, 0x00, + 0x60, 0x60, 0x60, 0x00, 0xc6, 0x60, 0x60, 0x0d, 0xb6, 0x70, 0x66, 0x06, + 0x60, 0x66, 0x06, 0x60, 0x66, 0x00, 0x06, 0x06, 0x06, 0x30, 0xcc, 0x06, + 0x19, 0x81, 0x98, 0x00, 0xc1, 0x80, 0x18, 0x00, 0x30, 0x00, 0x00, 0x00, + 0x00, 0x03, 0xf8, 0x7f, 0x81, 0xf8, 0x1f, 0xe1, 0xf8, 0x3f, 0xc1, 0xfe, + 0x7f, 0x81, 0xe0, 0x03, 0xc3, 0x06, 0x06, 0x07, 0xf8, 0x7f, 0x81, 0xf8, + 0x7f, 0x81, 0xfe, 0x67, 0xe3, 0xfc, 0x7f, 0x86, 0x06, 0x60, 0x66, 0x06, + 0x60, 0x66, 0x06, 0x7f, 0xe0, 0xc0, 0x06, 0x00, 0x60, 0x00, 0x00, 0xf0, + 0x7f, 0xe3, 0xfc, 0x55, 0x56, 0x60, 0x60, 0x03, 0xc0, 0x7e, 0x00, 0x00, + 0x06, 0x06, 0x60, 0x18, 0x00, 0x60, 0x00, 0x00, 0x00, 0x06, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x06, 0x00, 0x60, + 0x00, 0x00, 0x60, 0x18, 0x00, 0x18, 0x60, 0x60, 0x18, 0x30, 0x00, 0x00, + 0x00, 0x00, 0x60, 0x00, 0x01, 0x98, 0x66, 0x00, 0x30, 0x1b, 0x00, 0x00, + 0x18, 0x00, 0x30, 0x1b, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, + 0x61, 0xe0, 0x60, 0x00, 0x60, 0x06, 0x0c, 0x66, 0x00, 0x60, 0x00, 0x0c, + 0x60, 0x66, 0x06, 0x06, 0x00, 0x60, 0x18, 0x07, 0xfe, 0x03, 0x00, 0x0c, + 0xcc, 0x66, 0x06, 0x60, 0xc6, 0x00, 0x60, 0x66, 0x00, 0x60, 0x06, 0x00, + 0x60, 0x60, 0x60, 0x00, 0xc6, 0xc0, 0x60, 0x0c, 0xe6, 0x78, 0x66, 0x06, + 0x60, 0x66, 0x06, 0x60, 0x66, 0x00, 0x06, 0x06, 0x06, 0x30, 0xcc, 0x06, + 0x19, 0x81, 0x98, 0x01, 0x81, 0x80, 0x0c, 0x00, 0x30, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x0c, 0x60, 0xc3, 0x0c, 0x30, 0x63, 0x0c, 0x06, 0x03, 0x06, + 0x60, 0xc0, 0x60, 0x00, 0xc3, 0x0c, 0x06, 0x06, 0x6c, 0x60, 0xc3, 0x0c, + 0x60, 0xc3, 0x06, 0x6c, 0x06, 0x06, 0x0c, 0x06, 0x06, 0x60, 0x66, 0x06, + 0x60, 0x66, 0x06, 0x00, 0x60, 0xc0, 0x06, 0x00, 0x60, 0x00, 0x01, 0x98, + 0x7f, 0xe7, 0xfe, 0xaa, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x06, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x06, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x06, 0x00, 0x60, + 0x00, 0x00, 0x60, 0x30, 0x00, 0x0c, 0x60, 0x60, 0x30, 0x30, 0x00, 0x60, + 0x00, 0x00, 0x60, 0x00, 0x01, 0x98, 0x36, 0x00, 0x30, 0x0e, 0x00, 0x00, + 0x18, 0x00, 0x30, 0x0e, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, + 0x63, 0x60, 0x60, 0x00, 0xc0, 0x0c, 0x18, 0x67, 0xf8, 0x7f, 0x80, 0x18, + 0x30, 0xc6, 0x06, 0x06, 0x00, 0x60, 0x30, 0x00, 0x00, 0x01, 0x80, 0x18, + 0xcc, 0x66, 0x06, 0x7f, 0x86, 0x00, 0x60, 0x66, 0x00, 0x60, 0x06, 0x00, + 0x60, 0x60, 0x60, 0x00, 0xc7, 0x80, 0x60, 0x0c, 0x46, 0x6c, 0x66, 0x06, + 0x60, 0xc6, 0x06, 0x60, 0xc3, 0x00, 0x06, 0x06, 0x06, 0x30, 0xcc, 0x06, + 0x0f, 0x00, 0xf0, 0x03, 0x01, 0x80, 0x0c, 0x00, 0x30, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x06, 0x60, 0x66, 0x06, 0x60, 0x66, 0x06, 0x06, 0x06, 0x06, + 0x60, 0x60, 0x60, 0x00, 0xc3, 0x18, 0x06, 0x06, 0x66, 0x60, 0x66, 0x06, + 0x60, 0x66, 0x06, 0x78, 0x06, 0x00, 0x0c, 0x06, 0x06, 0x60, 0x66, 0x06, + 0x30, 0xc6, 0x06, 0x00, 0xc0, 0xc0, 0x06, 0x00, 0x60, 0x3c, 0x63, 0x0c, + 0x7f, 0xef, 0xff, 0x55, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x7f, 0xe0, 0x00, 0x00, 0x0f, 0xe0, 0xfe, 0x00, 0x7f, 0x07, 0xff, 0xff, + 0x00, 0x00, 0x00, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x7f, 0xfe, 0x0f, 0xff, + 0xff, 0xf0, 0x60, 0x18, 0x00, 0x18, 0x60, 0x60, 0x60, 0x7f, 0x00, 0x60, + 0x00, 0x00, 0x60, 0x00, 0x01, 0x98, 0x1f, 0x80, 0x60, 0x1e, 0x60, 0x00, + 0x18, 0x00, 0x30, 0xff, 0xe7, 0xfe, 0x00, 0x07, 0xfe, 0x00, 0x00, 0x60, + 0x66, 0x60, 0x60, 0x01, 0x80, 0xf8, 0x30, 0x60, 0x0c, 0x60, 0xc0, 0x18, + 0x1f, 0x83, 0x06, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xc0, 0x30, + 0xcc, 0x66, 0x06, 0x60, 0xc6, 0x00, 0x60, 0x67, 0xf8, 0x7f, 0x86, 0x3e, + 0x7f, 0xe0, 0x60, 0x00, 0xc7, 0x00, 0x60, 0x0c, 0x06, 0x66, 0x66, 0x06, + 0x7f, 0x86, 0x06, 0x7f, 0x81, 0xf8, 0x06, 0x06, 0x06, 0x30, 0xcc, 0x06, + 0x06, 0x00, 0xf0, 0x06, 0x01, 0x80, 0x06, 0x00, 0x30, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x06, 0x60, 0x66, 0x00, 0x60, 0x66, 0x06, 0x06, 0x06, 0x06, + 0x60, 0x60, 0x60, 0x00, 0xc3, 0x30, 0x06, 0x06, 0x66, 0x60, 0x66, 0x06, + 0x60, 0x66, 0x06, 0x70, 0x06, 0x00, 0x0c, 0x06, 0x06, 0x30, 0xc6, 0x06, + 0x19, 0x86, 0x06, 0x01, 0x83, 0x80, 0x06, 0x00, 0x38, 0x66, 0x66, 0x06, + 0x7f, 0xef, 0xff, 0xaa, 0xa0, 0x7e, 0x07, 0xe0, 0x7c, 0x07, 0xe0, 0x00, + 0x06, 0x00, 0x60, 0x07, 0xef, 0xe0, 0xfe, 0x00, 0x7f, 0x07, 0xff, 0xff, + 0x00, 0x00, 0x00, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x7f, 0xfe, 0x0f, 0xff, + 0xff, 0xf0, 0x60, 0x0c, 0x00, 0x30, 0x60, 0x60, 0xc0, 0x30, 0x00, 0x60, + 0x00, 0x00, 0x60, 0x00, 0x01, 0x98, 0x06, 0xc0, 0x60, 0x33, 0x60, 0x00, + 0x18, 0x00, 0x30, 0x0e, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x6c, 0x60, 0x60, 0x03, 0x00, 0x0c, 0x60, 0x60, 0x06, 0x60, 0x60, 0x30, + 0x30, 0xc1, 0xfe, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x01, 0x80, 0x60, + 0xcc, 0x67, 0xfe, 0x60, 0x66, 0x00, 0x60, 0x66, 0x00, 0x60, 0x06, 0x06, + 0x60, 0x60, 0x60, 0x00, 0xc7, 0x80, 0x60, 0x0c, 0x06, 0x63, 0x66, 0x06, + 0x60, 0x06, 0x06, 0x78, 0x00, 0x0c, 0x06, 0x06, 0x06, 0x19, 0x8c, 0x46, + 0x0f, 0x00, 0x60, 0x0c, 0x01, 0x80, 0x06, 0x00, 0x30, 0x00, 0x00, 0x00, + 0x00, 0x01, 0xfe, 0x60, 0x66, 0x00, 0x60, 0x66, 0x06, 0x06, 0x06, 0x06, + 0x60, 0x60, 0x60, 0x00, 0xc3, 0x60, 0x06, 0x06, 0x66, 0x60, 0x66, 0x06, + 0x60, 0x66, 0x06, 0x60, 0x06, 0x00, 0x0c, 0x06, 0x06, 0x30, 0xc6, 0x66, + 0x0f, 0x06, 0x06, 0x03, 0x00, 0xc0, 0x06, 0x00, 0x60, 0x66, 0x66, 0x06, + 0x7f, 0xe7, 0xfe, 0x55, 0x50, 0x18, 0x06, 0x00, 0x66, 0x06, 0x00, 0x00, + 0x06, 0x00, 0x60, 0x01, 0x80, 0x00, 0x06, 0x00, 0x60, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x06, 0x00, 0x00, + 0x06, 0x00, 0x60, 0x06, 0x00, 0x60, 0x60, 0x61, 0x80, 0x30, 0x00, 0x00, + 0x00, 0x00, 0x60, 0x00, 0x01, 0x98, 0x06, 0x60, 0xc0, 0x61, 0xc0, 0x00, + 0x18, 0x00, 0x30, 0x1b, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, + 0x78, 0x60, 0x60, 0x06, 0x00, 0x06, 0x60, 0x60, 0x06, 0x60, 0x60, 0x30, + 0x60, 0x60, 0x06, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x03, 0x00, 0x60, + 0xcc, 0x66, 0x06, 0x60, 0x66, 0x00, 0x60, 0x66, 0x00, 0x60, 0x06, 0x06, + 0x60, 0x60, 0x60, 0x00, 0xc6, 0xc0, 0x60, 0x0c, 0x06, 0x61, 0xe6, 0x06, + 0x60, 0x06, 0x06, 0x6c, 0x00, 0x06, 0x06, 0x06, 0x06, 0x19, 0x8c, 0xe6, + 0x19, 0x80, 0x60, 0x18, 0x01, 0x80, 0x03, 0x00, 0x30, 0x00, 0x00, 0x00, + 0x00, 0x03, 0x06, 0x60, 0x66, 0x00, 0x60, 0x67, 0xfe, 0x06, 0x06, 0x06, + 0x60, 0x60, 0x60, 0x00, 0xc3, 0xc0, 0x06, 0x06, 0x66, 0x60, 0x66, 0x06, + 0x60, 0x66, 0x06, 0x60, 0x03, 0xfc, 0x0c, 0x06, 0x06, 0x19, 0x86, 0x66, + 0x06, 0x06, 0x06, 0x06, 0x00, 0xc0, 0x06, 0x00, 0x60, 0x63, 0xc6, 0x06, + 0x7f, 0xe3, 0xfc, 0xaa, 0xa0, 0x18, 0x06, 0x00, 0x66, 0x06, 0x00, 0x00, + 0x06, 0x00, 0x60, 0x01, 0x80, 0x00, 0x06, 0x00, 0x60, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x06, 0x00, 0x00, + 0x06, 0x00, 0x60, 0x03, 0x00, 0xc0, 0x60, 0x67, 0xfe, 0x30, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x07, 0xfe, 0x06, 0x60, 0xc0, 0x60, 0xc0, 0x00, + 0x18, 0x00, 0x30, 0x31, 0x80, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, + 0x70, 0x60, 0x60, 0x0c, 0x00, 0x06, 0x60, 0x60, 0x06, 0x60, 0x60, 0x60, + 0x60, 0x60, 0x06, 0x00, 0x00, 0x00, 0x0c, 0x07, 0xfe, 0x06, 0x00, 0x00, + 0xc6, 0x66, 0x06, 0x60, 0x66, 0x00, 0x60, 0x66, 0x00, 0x60, 0x06, 0x06, + 0x60, 0x60, 0x60, 0x60, 0xc6, 0x60, 0x60, 0x0c, 0x06, 0x60, 0xe6, 0x06, + 0x60, 0x06, 0x06, 0x66, 0x00, 0x06, 0x06, 0x06, 0x06, 0x19, 0x8d, 0xb6, + 0x19, 0x80, 0x60, 0x30, 0x01, 0x80, 0x03, 0x00, 0x30, 0x00, 0x00, 0x00, + 0x00, 0x06, 0x06, 0x60, 0x66, 0x00, 0x60, 0x66, 0x00, 0x06, 0x06, 0x06, + 0x60, 0x60, 0x60, 0x00, 0xc3, 0x60, 0x06, 0x06, 0x66, 0x60, 0x66, 0x06, + 0x60, 0x66, 0x06, 0x60, 0x00, 0x06, 0x0c, 0x06, 0x06, 0x19, 0x86, 0x66, + 0x0f, 0x06, 0x06, 0x0c, 0x00, 0xc0, 0x06, 0x00, 0x60, 0x00, 0x06, 0x06, + 0x7f, 0xe1, 0xf8, 0x55, 0x50, 0x18, 0x07, 0x80, 0x7c, 0x07, 0x80, 0x00, + 0x06, 0x00, 0x60, 0x01, 0x80, 0x00, 0x06, 0x00, 0x60, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x06, 0x00, 0x00, + 0x06, 0x00, 0x60, 0x01, 0x81, 0x80, 0x60, 0x66, 0x00, 0x30, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x98, 0x66, 0x61, 0x9c, 0x60, 0xc0, 0x00, + 0x0c, 0x00, 0x60, 0x60, 0xc0, 0x60, 0x06, 0x00, 0x00, 0x00, 0x01, 0x80, + 0x60, 0x60, 0x60, 0x18, 0x00, 0x06, 0x7f, 0xe0, 0x06, 0x60, 0x60, 0x60, + 0x60, 0x60, 0x06, 0x06, 0x00, 0x60, 0x06, 0x00, 0x00, 0x0c, 0x00, 0x00, + 0xc3, 0xe6, 0x06, 0x60, 0x66, 0x06, 0x60, 0x66, 0x00, 0x60, 0x06, 0x06, + 0x60, 0x60, 0x60, 0x60, 0xc6, 0x30, 0x60, 0x0c, 0x06, 0x60, 0x66, 0x06, + 0x60, 0x06, 0x06, 0x63, 0x00, 0x06, 0x06, 0x06, 0x06, 0x0f, 0x0f, 0x1e, + 0x30, 0xc0, 0x60, 0x60, 0x01, 0x80, 0x01, 0x80, 0x30, 0x00, 0x00, 0x00, + 0x00, 0x06, 0x06, 0x60, 0x66, 0x00, 0x60, 0x66, 0x00, 0x06, 0x06, 0x06, + 0x60, 0x60, 0x60, 0x00, 0xc3, 0x30, 0x06, 0x06, 0x66, 0x60, 0x66, 0x06, + 0x60, 0x66, 0x06, 0x60, 0x00, 0x06, 0x0c, 0x06, 0x06, 0x0f, 0x06, 0x66, + 0x19, 0x86, 0x06, 0x18, 0x00, 0xc0, 0x06, 0x00, 0x60, 0x00, 0x06, 0x06, + 0x7f, 0xe0, 0xf0, 0xaa, 0xa0, 0x18, 0x06, 0x00, 0x78, 0x06, 0x00, 0x00, + 0x00, 0x00, 0x60, 0x01, 0x80, 0x00, 0x06, 0x00, 0x60, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0x00, 0x00, 0x60, 0x06, 0x00, 0x00, + 0x06, 0x00, 0x60, 0x00, 0xc3, 0x00, 0x60, 0x60, 0x00, 0x30, 0x60, 0x00, + 0x00, 0x00, 0x60, 0x00, 0x01, 0x98, 0x36, 0xc1, 0xb6, 0x61, 0xc0, 0x00, + 0x0c, 0x00, 0x60, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x01, 0x80, + 0x60, 0x60, 0x60, 0x30, 0x06, 0x06, 0x00, 0x66, 0x06, 0x60, 0x60, 0x60, + 0x60, 0x60, 0x06, 0x06, 0x00, 0x60, 0x03, 0x00, 0x00, 0x18, 0x00, 0x60, + 0xc0, 0x06, 0x06, 0x60, 0x66, 0x06, 0x60, 0x66, 0x00, 0x60, 0x06, 0x06, + 0x60, 0x60, 0x60, 0x60, 0xc6, 0x18, 0x60, 0x0c, 0x06, 0x60, 0x66, 0x06, + 0x60, 0x06, 0x66, 0x61, 0x86, 0x06, 0x06, 0x06, 0x06, 0x0f, 0x0e, 0x0e, + 0x30, 0xc0, 0x60, 0x60, 0x01, 0x80, 0x01, 0x80, 0x30, 0x00, 0x00, 0x00, + 0x00, 0x06, 0x06, 0x60, 0x66, 0x06, 0x60, 0x66, 0x00, 0x06, 0x06, 0x06, + 0x60, 0x60, 0x60, 0x00, 0xc3, 0x18, 0x06, 0x06, 0x66, 0x60, 0x66, 0x06, + 0x60, 0x66, 0x06, 0x60, 0x00, 0x06, 0x0c, 0x06, 0x06, 0x0f, 0x06, 0x66, + 0x30, 0xc6, 0x06, 0x30, 0x00, 0xc0, 0x06, 0x00, 0x60, 0x00, 0x06, 0x06, + 0x7f, 0xe0, 0x60, 0x55, 0x50, 0x18, 0x06, 0x00, 0x6c, 0x06, 0x00, 0x00, + 0x00, 0x00, 0x60, 0x01, 0x80, 0x00, 0x06, 0x00, 0x60, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0x00, 0x00, 0x60, 0x06, 0x00, 0x00, + 0x06, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x30, 0x60, 0x00, + 0x00, 0x00, 0x60, 0x00, 0x01, 0x98, 0x1f, 0x83, 0x36, 0x33, 0x60, 0x00, + 0x06, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x03, 0x00, + 0x30, 0xc0, 0x60, 0x60, 0x03, 0x0c, 0x00, 0x63, 0x0c, 0x30, 0xc0, 0x60, + 0x30, 0xc0, 0x0c, 0x06, 0x00, 0x60, 0x01, 0x80, 0x00, 0x30, 0x00, 0x60, + 0x60, 0x06, 0x06, 0x60, 0xc3, 0x0c, 0x60, 0xc6, 0x00, 0x60, 0x03, 0x0c, + 0x60, 0x60, 0x60, 0x31, 0x86, 0x0c, 0x60, 0x0c, 0x06, 0x60, 0x63, 0x0c, + 0x60, 0x03, 0x3c, 0x60, 0xc3, 0x0c, 0x06, 0x03, 0x0c, 0x06, 0x0c, 0x06, + 0x60, 0x60, 0x60, 0x60, 0x01, 0x80, 0x00, 0xc0, 0x30, 0x00, 0x00, 0x00, + 0x00, 0x03, 0x06, 0x60, 0xc3, 0x0c, 0x30, 0x63, 0x06, 0x06, 0x03, 0x0e, + 0x60, 0x60, 0x60, 0x00, 0xc3, 0x0c, 0x06, 0x06, 0x66, 0x60, 0x63, 0x0c, + 0x60, 0xc3, 0x06, 0x60, 0x06, 0x06, 0x0c, 0x03, 0x06, 0x06, 0x06, 0x66, + 0x60, 0x63, 0x0e, 0x60, 0x00, 0x60, 0x06, 0x00, 0xc0, 0x00, 0x06, 0x06, + 0x7f, 0xe0, 0x00, 0xaa, 0xa0, 0x18, 0x06, 0x00, 0x66, 0x06, 0x00, 0x00, + 0x7f, 0xe0, 0x7e, 0x01, 0x80, 0x00, 0x06, 0x00, 0x60, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x06, 0x00, 0x00, + 0x06, 0x00, 0x60, 0x7f, 0xe7, 0xfe, 0x60, 0x60, 0x00, 0x7f, 0xe0, 0x00, + 0x00, 0x00, 0x60, 0x00, 0x01, 0x98, 0x06, 0x03, 0x1c, 0x1e, 0x60, 0x00, + 0x03, 0x01, 0x80, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x03, 0x00, + 0x1f, 0x83, 0xfc, 0x7f, 0xe1, 0xf8, 0x00, 0x61, 0xf8, 0x1f, 0x80, 0x60, + 0x1f, 0x83, 0xf8, 0x00, 0x00, 0x60, 0x00, 0xc0, 0x00, 0x60, 0x00, 0x60, + 0x3f, 0xe6, 0x06, 0x7f, 0x81, 0xf8, 0x7f, 0x87, 0xfe, 0x60, 0x01, 0xf8, + 0x60, 0x61, 0xf8, 0x1f, 0x06, 0x06, 0x7f, 0xec, 0x06, 0x60, 0x61, 0xf8, + 0x60, 0x01, 0xf8, 0x60, 0x61, 0xf8, 0x06, 0x01, 0xf8, 0x06, 0x08, 0x02, + 0x60, 0x60, 0x60, 0x7f, 0xe1, 0xf0, 0x00, 0xc1, 0xf0, 0x00, 0x00, 0x00, + 0x00, 0x01, 0xfe, 0x7f, 0x81, 0xf8, 0x1f, 0xe1, 0xfc, 0x06, 0x01, 0xfe, + 0x60, 0x61, 0xf8, 0x00, 0xc3, 0x06, 0x1f, 0x86, 0x66, 0x60, 0x61, 0xf8, + 0x7f, 0x81, 0xfe, 0x60, 0x03, 0xfc, 0x07, 0xc1, 0xfe, 0x06, 0x03, 0xfc, + 0x60, 0x61, 0xfe, 0x7f, 0xe0, 0x38, 0x06, 0x03, 0x80, 0x00, 0x07, 0xfe, + 0x00, 0x00, 0x00, 0x55, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x60, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x06, 0x00, 0x00, + 0x06, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, + 0x00, 0x00, 0x00, 0x30, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x60, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xaa, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x60, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x06, 0x00, 0x00, + 0x06, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xfe, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, + 0x00, 0x00, 0x00, 0x30, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x60, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x55, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x60, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x06, 0x00, 0x00, + 0x06, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, + 0x00, 0x00, 0x00, 0x19, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x60, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xaa, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x60, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xf0, 0x60, 0x06, 0x00, 0x00, + 0x06, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xf8, + 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x60, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x03, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x55, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x60, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xf0, 0x60, 0x06, 0x00, 0x00, + 0x06, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +}; + +static const font_t font24 = { + .bits = font24_bits, + .depth = 1, + .width = 12, + .height = 24, + .stride = 192 +}; diff --git a/z80core/fonts/font28.h b/z80core/fonts/font28.h new file mode 100644 index 00000000..db49bcce --- /dev/null +++ b/z80core/fonts/font28.h @@ -0,0 +1,542 @@ +/* + * Automatically generated from ter-u28b.bdf with bdf2c + * ASCII subset of Terminus Bold 28 + * + * Copyright (C) 2020 Dimitar Toshkov Zhekov + * + * Licensed under the SIL Open Font License, Version 1.1 + */ + +static const uint8_t font28_bits[] = { + 0x00, 0x00, 0x00, 0x0a, 0xaa, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, + 0x00, 0x30, 0x00, 0xc0, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x0c, 0x00, 0x30, 0x00, 0xc0, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, + 0x55, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0xc0, + 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x30, + 0x00, 0xc0, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0xaa, 0x80, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x03, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xc0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x30, 0x00, 0xc0, 0x00, 0x00, + 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x8c, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x20, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x05, 0x55, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, + 0x00, 0x30, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x0c, 0x00, 0x30, 0x00, 0xc0, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, + 0x8c, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, + 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x0a, + 0xaa, 0x98, 0xc0, 0x7f, 0x00, 0xf8, 0x06, 0x00, 0x06, 0x30, 0x00, 0x01, + 0x8c, 0x06, 0x30, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0xc0, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x30, + 0x00, 0xc0, 0x00, 0x00, 0x0c, 0x00, 0x07, 0x1c, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x01, 0x8c, 0x06, 0x30, 0x03, + 0x00, 0xf0, 0xc0, 0xf0, 0x00, 0xc0, 0x01, 0x80, 0x30, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x1f, 0xc0, 0x0c, 0x01, + 0xfc, 0x07, 0xf0, 0x00, 0x31, 0xff, 0xc1, 0xfe, 0x1f, 0xfc, 0x1f, 0xc0, + 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xf0, + 0x1f, 0xe0, 0x7f, 0x07, 0xfc, 0x07, 0xf0, 0x7f, 0x01, 0xff, 0xc7, 0xff, + 0x07, 0xf0, 0x60, 0x30, 0x3f, 0x00, 0x1f, 0x98, 0x0c, 0x60, 0x01, 0x80, + 0x66, 0x03, 0x07, 0xf0, 0x7f, 0xc0, 0x7f, 0x07, 0xfc, 0x07, 0xf0, 0x7f, + 0xf9, 0x80, 0xc6, 0x03, 0x18, 0x06, 0x60, 0x31, 0x80, 0x67, 0xff, 0x03, + 0xf0, 0x30, 0x00, 0x3f, 0x00, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, + 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x60, 0x00, + 0x0c, 0x00, 0x06, 0x0c, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x03, 0x00, 0x70, + 0x00, 0x00, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x05, 0x55, 0x58, 0xc0, 0x7f, + 0x01, 0xfc, 0x06, 0x00, 0x06, 0x30, 0x00, 0x01, 0x8c, 0x06, 0x30, 0x00, + 0xc0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x30, 0x00, 0xc0, 0x00, 0x00, + 0x0c, 0x00, 0x0e, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, + 0x00, 0x00, 0x0c, 0x01, 0x8c, 0x06, 0x30, 0x1f, 0xe1, 0xf8, 0xc1, 0xf8, + 0x00, 0xc0, 0x03, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x0c, 0x3f, 0xe0, 0x1c, 0x03, 0xfe, 0x0f, 0xf8, 0x00, + 0x71, 0xff, 0xc3, 0xfe, 0x1f, 0xfc, 0x3f, 0xe0, 0xff, 0x80, 0x00, 0x00, + 0x00, 0x00, 0x70, 0x00, 0x07, 0x00, 0x0f, 0xf8, 0x3f, 0xf0, 0xff, 0x87, + 0xfe, 0x0f, 0xf8, 0x7f, 0xc1, 0xff, 0xc7, 0xff, 0x0f, 0xf8, 0x60, 0x30, + 0x3f, 0x00, 0x1f, 0x98, 0x1c, 0x60, 0x01, 0x80, 0x66, 0x03, 0x0f, 0xf8, + 0x7f, 0xe0, 0xff, 0x87, 0xfe, 0x0f, 0xf8, 0x7f, 0xf9, 0x80, 0xc6, 0x03, + 0x18, 0x06, 0x60, 0x31, 0x80, 0x67, 0xff, 0x03, 0xf0, 0x30, 0x00, 0x3f, + 0x01, 0xdc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, + 0x30, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x60, 0x00, 0x0c, 0x00, 0x06, 0x0c, + 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xf0, 0x03, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, + 0x7f, 0xf0, 0x00, 0x0a, 0xaa, 0x98, 0xc0, 0x60, 0x01, 0x8c, 0x06, 0x00, + 0x06, 0x30, 0x03, 0x01, 0xcc, 0x06, 0x30, 0x00, 0xc0, 0x00, 0x00, 0x00, + 0x00, 0x30, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x0c, 0x00, 0x30, 0x00, 0xc0, 0x00, 0x00, 0x0c, 0x00, 0x1c, 0x07, + 0x00, 0x00, 0x00, 0x00, 0x01, 0xc6, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x01, + 0x8c, 0x06, 0x30, 0x3f, 0xf1, 0x99, 0x83, 0x9c, 0x00, 0xc0, 0x06, 0x00, + 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, + 0x70, 0x70, 0x3c, 0x07, 0x07, 0x1c, 0x1c, 0x00, 0xf1, 0x80, 0x07, 0x00, + 0x18, 0x0c, 0x70, 0x71, 0xc1, 0xc0, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, + 0x03, 0x80, 0x1c, 0x1c, 0x70, 0x39, 0xc1, 0xc6, 0x07, 0x1c, 0x1c, 0x60, + 0xe1, 0x80, 0x06, 0x00, 0x1c, 0x1c, 0x60, 0x30, 0x0c, 0x00, 0x06, 0x18, + 0x38, 0x60, 0x01, 0xc0, 0xe6, 0x03, 0x1c, 0x1c, 0x60, 0x71, 0xc1, 0xc6, + 0x07, 0x1c, 0x1c, 0x03, 0x01, 0x80, 0xc6, 0x03, 0x18, 0x06, 0x30, 0x60, + 0xc0, 0xc0, 0x03, 0x03, 0x00, 0x18, 0x00, 0x03, 0x03, 0x8e, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x60, 0x00, 0x0c, 0x00, 0x06, 0x0c, 0x00, 0x03, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, + 0xc0, 0x03, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xf0, 0x08, 0x05, + 0x55, 0x5f, 0xc0, 0x7c, 0x01, 0x80, 0x06, 0x00, 0x07, 0xf0, 0x03, 0x01, + 0xec, 0x06, 0x30, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0xc0, + 0x00, 0x03, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x30, + 0x00, 0xc0, 0x00, 0x00, 0x0c, 0x00, 0x38, 0x03, 0x80, 0x00, 0x00, 0x00, + 0xe1, 0x86, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x01, 0x8c, 0x06, 0x30, 0x73, + 0x39, 0xf9, 0x83, 0x0c, 0x00, 0xc0, 0x06, 0x00, 0x0c, 0x00, 0x00, 0x00, + 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x60, 0x30, 0x7c, 0x06, + 0x03, 0x18, 0x0c, 0x01, 0xf1, 0x80, 0x06, 0x00, 0x18, 0x0c, 0x60, 0x31, + 0x80, 0xc0, 0x00, 0x00, 0x00, 0x01, 0xc0, 0x00, 0x01, 0xc0, 0x18, 0x0c, + 0x60, 0x19, 0x80, 0xc6, 0x03, 0x18, 0x0c, 0x60, 0x61, 0x80, 0x06, 0x00, + 0x18, 0x0c, 0x60, 0x30, 0x0c, 0x00, 0x06, 0x18, 0x70, 0x60, 0x01, 0xe1, + 0xe6, 0x03, 0x18, 0x0c, 0x60, 0x31, 0x80, 0xc6, 0x03, 0x18, 0x0c, 0x03, + 0x01, 0x80, 0xc6, 0x03, 0x18, 0x06, 0x30, 0x60, 0xc0, 0xc0, 0x03, 0x03, + 0x00, 0x18, 0x00, 0x03, 0x07, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, + 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, + 0x00, 0x00, 0x00, 0x0c, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x80, 0x03, 0x00, 0x0c, + 0x00, 0x00, 0x00, 0xc0, 0x7f, 0xf0, 0x1c, 0x0a, 0xaa, 0x9f, 0xc0, 0x7c, + 0x01, 0x80, 0x06, 0x00, 0x03, 0xe0, 0x03, 0x01, 0xbc, 0x06, 0x30, 0x00, + 0xc0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0xc0, 0x00, 0x03, 0xff, 0xf0, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x30, 0x00, 0xc0, 0x00, 0x00, + 0x0c, 0x00, 0x70, 0x01, 0xc0, 0x00, 0x00, 0x01, 0xc1, 0x80, 0x00, 0x00, + 0x00, 0x00, 0x0c, 0x00, 0x00, 0x1f, 0xfc, 0x63, 0x18, 0xf3, 0x03, 0x0c, + 0x00, 0x00, 0x0c, 0x00, 0x06, 0x03, 0x8e, 0x00, 0xc0, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x30, 0x60, 0x70, 0x0c, 0x06, 0x03, 0x00, 0x0c, 0x03, + 0xb1, 0x80, 0x06, 0x00, 0x18, 0x0c, 0x60, 0x31, 0x80, 0xc0, 0x00, 0x00, + 0x00, 0x03, 0x80, 0x00, 0x00, 0xe0, 0x18, 0x0c, 0x61, 0xf9, 0x80, 0xc6, + 0x03, 0x18, 0x0c, 0x60, 0x31, 0x80, 0x06, 0x00, 0x18, 0x0c, 0x60, 0x30, + 0x0c, 0x00, 0x06, 0x18, 0xe0, 0x60, 0x01, 0xf3, 0xe7, 0x03, 0x18, 0x0c, + 0x60, 0x31, 0x80, 0xc6, 0x03, 0x18, 0x00, 0x03, 0x01, 0x80, 0xc3, 0x06, + 0x18, 0x06, 0x18, 0xc0, 0x61, 0x80, 0x07, 0x03, 0x00, 0x0c, 0x00, 0x03, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, + 0x30, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x0c, + 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x80, 0x03, 0x00, 0x0c, 0x00, 0x00, 0x01, 0xe0, + 0x7f, 0xf0, 0x3e, 0x05, 0x55, 0x58, 0xc0, 0x60, 0x01, 0x8c, 0x06, 0x00, + 0x00, 0x00, 0x03, 0x01, 0x9c, 0x03, 0x60, 0x00, 0xc0, 0x00, 0x00, 0x00, + 0x00, 0x30, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x0c, 0x00, 0x30, 0x00, 0xc0, 0x00, 0x00, 0x0c, 0x00, 0xe0, 0x00, + 0xe0, 0x7f, 0xf1, 0xff, 0xe1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, + 0x00, 0x1f, 0xfc, 0x63, 0x00, 0x03, 0x03, 0x9c, 0x00, 0x00, 0x0c, 0x00, + 0x06, 0x01, 0xdc, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, + 0x60, 0xf0, 0x0c, 0x06, 0x03, 0x00, 0x0c, 0x07, 0x31, 0x80, 0x06, 0x00, + 0x00, 0x18, 0x60, 0x31, 0x80, 0xc0, 0x30, 0x00, 0xc0, 0x07, 0x01, 0xff, + 0xc0, 0x70, 0x18, 0x0c, 0x63, 0xf9, 0x80, 0xc6, 0x03, 0x18, 0x00, 0x60, + 0x31, 0x80, 0x06, 0x00, 0x18, 0x00, 0x60, 0x30, 0x0c, 0x00, 0x06, 0x19, + 0xc0, 0x60, 0x01, 0xbf, 0x67, 0x83, 0x18, 0x0c, 0x60, 0x31, 0x80, 0xc6, + 0x03, 0x18, 0x00, 0x03, 0x01, 0x80, 0xc3, 0x06, 0x18, 0x06, 0x18, 0xc0, + 0x61, 0x80, 0x0e, 0x03, 0x00, 0x0c, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x7f, 0x07, 0xfc, 0x07, 0xf0, 0x1f, 0xf0, 0x7f, 0x03, 0xfc, + 0x07, 0xfc, 0x7f, 0xc0, 0x3c, 0x00, 0x1e, 0x0c, 0x1c, 0x03, 0x01, 0xff, + 0x87, 0xfc, 0x07, 0xf0, 0x7f, 0xc0, 0x7f, 0xc6, 0x7f, 0x07, 0xf0, 0x3f, + 0xc1, 0x80, 0xc6, 0x03, 0x18, 0x06, 0x60, 0x31, 0x80, 0xc7, 0xff, 0x01, + 0x80, 0x03, 0x00, 0x0c, 0x00, 0x00, 0x03, 0xf0, 0x7f, 0xf0, 0x7f, 0x0a, + 0xaa, 0x98, 0xc0, 0x60, 0x01, 0xfc, 0x07, 0xf0, 0x00, 0x00, 0x03, 0x01, + 0x8c, 0x01, 0xc0, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0xc0, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x30, + 0x00, 0xc0, 0x00, 0x00, 0x0c, 0x01, 0xc0, 0x00, 0x70, 0x7f, 0xf1, 0xff, + 0xe1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x06, 0x30, 0x63, + 0x00, 0x06, 0x01, 0xf8, 0x00, 0x00, 0x0c, 0x00, 0x06, 0x00, 0xf8, 0x00, + 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x61, 0xf0, 0x0c, 0x00, + 0x03, 0x00, 0x0c, 0x0e, 0x31, 0x80, 0x06, 0x00, 0x00, 0x18, 0x60, 0x31, + 0x80, 0xc0, 0x30, 0x00, 0xc0, 0x0e, 0x01, 0xff, 0xc0, 0x38, 0x00, 0x1c, + 0x67, 0x19, 0x80, 0xc6, 0x06, 0x18, 0x00, 0x60, 0x31, 0x80, 0x06, 0x00, + 0x18, 0x00, 0x60, 0x30, 0x0c, 0x00, 0x06, 0x1b, 0x80, 0x60, 0x01, 0x9e, + 0x67, 0xc3, 0x18, 0x0c, 0x60, 0x31, 0x80, 0xc6, 0x03, 0x18, 0x00, 0x03, + 0x01, 0x80, 0xc3, 0x06, 0x18, 0x06, 0x0d, 0x80, 0x33, 0x00, 0x1c, 0x03, + 0x00, 0x06, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x87, + 0xfe, 0x0f, 0xf8, 0x3f, 0xf0, 0xff, 0x83, 0xfc, 0x0f, 0xfc, 0x7f, 0xe0, + 0x3c, 0x00, 0x1e, 0x0c, 0x38, 0x03, 0x01, 0xff, 0xc7, 0xfe, 0x0f, 0xf8, + 0x7f, 0xe0, 0xff, 0xc6, 0xff, 0x0f, 0xf8, 0x3f, 0xc1, 0x80, 0xc6, 0x03, + 0x18, 0x06, 0x60, 0x31, 0x80, 0xc7, 0xff, 0x01, 0x80, 0x03, 0x00, 0x0c, + 0x00, 0x00, 0x07, 0x38, 0x7f, 0xf0, 0xff, 0x85, 0x55, 0x58, 0xc0, 0x60, + 0x00, 0xf8, 0x07, 0xf0, 0x00, 0x00, 0x7f, 0xf9, 0x8c, 0x00, 0x80, 0x00, + 0xc0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x30, 0x00, 0xc0, 0x00, 0x00, + 0x0c, 0x03, 0x80, 0x00, 0x38, 0x60, 0x30, 0x07, 0x01, 0x80, 0x00, 0x00, + 0x00, 0x00, 0x0c, 0x00, 0x00, 0x06, 0x30, 0x73, 0x00, 0x06, 0x00, 0xf0, + 0x00, 0x00, 0x0c, 0x00, 0x06, 0x00, 0x70, 0x00, 0xc0, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x60, 0x63, 0xb0, 0x0c, 0x00, 0x07, 0x00, 0x1c, 0x1c, + 0x31, 0xff, 0x07, 0xfc, 0x00, 0x30, 0x70, 0x71, 0x80, 0xc0, 0x30, 0x00, + 0xc0, 0x1c, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x38, 0x66, 0x19, 0x80, 0xc7, + 0xfc, 0x18, 0x00, 0x60, 0x31, 0x80, 0x06, 0x00, 0x18, 0x00, 0x60, 0x30, + 0x0c, 0x00, 0x06, 0x1f, 0x00, 0x60, 0x01, 0x8c, 0x66, 0xe3, 0x18, 0x0c, + 0x60, 0x31, 0x80, 0xc6, 0x03, 0x1c, 0x00, 0x03, 0x01, 0x80, 0xc3, 0x06, + 0x18, 0x06, 0x0d, 0x80, 0x33, 0x00, 0x38, 0x03, 0x00, 0x06, 0x00, 0x03, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xc6, 0x07, 0x1c, 0x1c, 0x70, + 0x31, 0xc1, 0xc0, 0x60, 0x1c, 0x0c, 0x60, 0x70, 0x0c, 0x00, 0x06, 0x0c, + 0x70, 0x03, 0x01, 0x8c, 0xe6, 0x07, 0x1c, 0x1c, 0x60, 0x71, 0xc0, 0xc7, + 0xc0, 0x1c, 0x1c, 0x06, 0x01, 0x80, 0xc6, 0x03, 0x18, 0x06, 0x70, 0x71, + 0x80, 0xc0, 0x07, 0x01, 0x80, 0x03, 0x00, 0x0c, 0x03, 0xc3, 0x0e, 0x1c, + 0x7f, 0xf1, 0xff, 0xca, 0xaa, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x7f, 0xf8, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, + 0x00, 0x30, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x0c, 0x00, 0x30, 0x00, 0xc0, 0x00, 0x00, 0x0c, 0x01, 0xc0, 0x00, + 0x70, 0x60, 0x30, 0x0e, 0x03, 0xf8, 0x00, 0xc0, 0x00, 0x00, 0x0c, 0x00, + 0x00, 0x06, 0x30, 0x3f, 0xe0, 0x0c, 0x00, 0xe0, 0x00, 0x00, 0x0c, 0x00, + 0x06, 0x07, 0xff, 0x1f, 0xfe, 0x00, 0x01, 0xff, 0xc0, 0x00, 0x00, 0xc0, + 0x67, 0x30, 0x0c, 0x00, 0x0e, 0x03, 0xf8, 0x38, 0x31, 0xff, 0x87, 0xfe, + 0x00, 0x30, 0x3f, 0xe1, 0xc0, 0xc0, 0x30, 0x00, 0xc0, 0x38, 0x00, 0x00, + 0x00, 0x0e, 0x00, 0x70, 0x66, 0x19, 0x80, 0xc7, 0xfc, 0x18, 0x00, 0x60, + 0x31, 0xfe, 0x07, 0xf8, 0x18, 0xfc, 0x7f, 0xf0, 0x0c, 0x00, 0x06, 0x1e, + 0x00, 0x60, 0x01, 0x80, 0x66, 0x73, 0x18, 0x0c, 0x60, 0x71, 0x80, 0xc6, + 0x07, 0x0f, 0xf0, 0x03, 0x01, 0x80, 0xc1, 0x8c, 0x18, 0x06, 0x07, 0x00, + 0x1e, 0x00, 0x70, 0x03, 0x00, 0x03, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xc6, 0x03, 0x18, 0x00, 0x60, 0x31, 0x80, 0xc0, 0x60, + 0x18, 0x0c, 0x60, 0x30, 0x0c, 0x00, 0x06, 0x0c, 0xe0, 0x03, 0x01, 0x8c, + 0x66, 0x03, 0x18, 0x0c, 0x60, 0x31, 0x80, 0xc7, 0x80, 0x18, 0x00, 0x06, + 0x01, 0x80, 0xc3, 0x06, 0x18, 0x06, 0x38, 0xe1, 0x80, 0xc0, 0x0e, 0x07, + 0x00, 0x03, 0x00, 0x07, 0x07, 0xe3, 0x1c, 0x0e, 0x7f, 0xf3, 0xff, 0xe5, + 0x55, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, + 0x00, 0x00, 0x00, 0x3f, 0xc0, 0xff, 0x00, 0x0f, 0xf0, 0x3f, 0xff, 0xff, + 0x00, 0x00, 0x00, 0x0f, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xf0, + 0x3f, 0xff, 0xff, 0xfc, 0x0c, 0x00, 0xe0, 0x00, 0xe0, 0x60, 0x30, 0x1c, + 0x03, 0xf8, 0x00, 0xc0, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x06, 0x30, 0x1f, + 0xf0, 0x0c, 0x01, 0xf1, 0x80, 0x00, 0x0c, 0x00, 0x06, 0x07, 0xff, 0x1f, + 0xfe, 0x00, 0x01, 0xff, 0xc0, 0x00, 0x00, 0xc0, 0x6e, 0x30, 0x0c, 0x00, + 0x1c, 0x03, 0xf8, 0x70, 0x30, 0x01, 0xc6, 0x07, 0x00, 0x60, 0x3f, 0xe0, + 0xff, 0xc0, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x07, 0x00, 0xe0, + 0x66, 0x19, 0xff, 0xc6, 0x06, 0x18, 0x00, 0x60, 0x31, 0xfe, 0x07, 0xf8, + 0x18, 0xfc, 0x7f, 0xf0, 0x0c, 0x00, 0x06, 0x1e, 0x00, 0x60, 0x01, 0x80, + 0x66, 0x3b, 0x18, 0x0c, 0x7f, 0xe1, 0x80, 0xc7, 0xfe, 0x07, 0xf8, 0x03, + 0x01, 0x80, 0xc1, 0x8c, 0x18, 0x06, 0x07, 0x00, 0x1e, 0x00, 0xe0, 0x03, + 0x00, 0x03, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xc6, + 0x03, 0x18, 0x00, 0x60, 0x31, 0x80, 0xc0, 0x60, 0x18, 0x0c, 0x60, 0x30, + 0x0c, 0x00, 0x06, 0x0d, 0xc0, 0x03, 0x01, 0x8c, 0x66, 0x03, 0x18, 0x0c, + 0x60, 0x31, 0x80, 0xc7, 0x00, 0x1c, 0x00, 0x06, 0x01, 0x80, 0xc3, 0x06, + 0x18, 0xc6, 0x1d, 0xc1, 0x80, 0xc0, 0x1c, 0x07, 0x00, 0x03, 0x00, 0x07, + 0x06, 0x73, 0x18, 0x06, 0x7f, 0xf3, 0xff, 0xea, 0xaa, 0x81, 0xfe, 0x03, + 0xf8, 0x0f, 0xc0, 0x3f, 0x80, 0x00, 0x03, 0x00, 0x0c, 0x00, 0x7f, 0xbf, + 0xc0, 0xff, 0x00, 0x0f, 0xf0, 0x3f, 0xff, 0xff, 0x00, 0x00, 0x00, 0x0f, + 0xff, 0xc0, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xf0, 0x3f, 0xff, 0xff, 0xfc, + 0x0c, 0x00, 0x70, 0x01, 0xc0, 0x60, 0x30, 0x38, 0x01, 0x80, 0x00, 0xc0, + 0x00, 0x00, 0x0c, 0x00, 0x00, 0x06, 0x30, 0x03, 0x38, 0x18, 0x03, 0xbb, + 0x80, 0x00, 0x0c, 0x00, 0x06, 0x00, 0x70, 0x00, 0xc0, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x80, 0x7c, 0x30, 0x0c, 0x00, 0x38, 0x00, 0x1c, 0x60, + 0x30, 0x00, 0xc6, 0x03, 0x00, 0x60, 0x70, 0x70, 0x7f, 0xc0, 0x00, 0x00, + 0x00, 0x38, 0x00, 0x00, 0x00, 0x0e, 0x00, 0xc0, 0x66, 0x19, 0xff, 0xc6, + 0x03, 0x18, 0x00, 0x60, 0x31, 0x80, 0x06, 0x00, 0x18, 0x0c, 0x60, 0x30, + 0x0c, 0x00, 0x06, 0x1f, 0x00, 0x60, 0x01, 0x80, 0x66, 0x1f, 0x18, 0x0c, + 0x7f, 0xc1, 0x80, 0xc7, 0xfc, 0x00, 0x1c, 0x03, 0x01, 0x80, 0xc1, 0x8c, + 0x18, 0xc6, 0x0d, 0x80, 0x0c, 0x01, 0xc0, 0x03, 0x00, 0x01, 0x80, 0x03, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xc6, 0x03, 0x18, 0x00, 0x60, + 0x31, 0xff, 0xc0, 0x60, 0x18, 0x0c, 0x60, 0x30, 0x0c, 0x00, 0x06, 0x0f, + 0x80, 0x03, 0x01, 0x8c, 0x66, 0x03, 0x18, 0x0c, 0x60, 0x31, 0x80, 0xc6, + 0x00, 0x0f, 0xf0, 0x06, 0x01, 0x80, 0xc3, 0x06, 0x18, 0xc6, 0x0f, 0x81, + 0x80, 0xc0, 0x38, 0x01, 0x80, 0x03, 0x00, 0x0c, 0x06, 0x3f, 0x18, 0x06, + 0x7f, 0xf1, 0xff, 0xc5, 0x55, 0x41, 0xfe, 0x03, 0xf8, 0x0f, 0xe0, 0x3f, + 0x80, 0x00, 0x03, 0x00, 0x0c, 0x00, 0x7f, 0x80, 0x00, 0x03, 0x00, 0x0c, + 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x0c, 0x00, 0x30, 0x00, 0x00, 0x03, 0x00, 0x0c, 0x00, 0x38, 0x03, + 0x80, 0x60, 0x31, 0xff, 0xe1, 0x80, 0x00, 0xc0, 0x00, 0x00, 0x0c, 0x00, + 0x00, 0x06, 0x30, 0x03, 0x18, 0x18, 0x07, 0x1f, 0x00, 0x00, 0x0c, 0x00, + 0x06, 0x00, 0xf8, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x80, + 0x78, 0x30, 0x0c, 0x00, 0x70, 0x00, 0x0c, 0x60, 0x30, 0x00, 0xc6, 0x03, + 0x00, 0xc0, 0x60, 0x30, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xff, + 0xc0, 0x1c, 0x00, 0xc0, 0x67, 0x19, 0x80, 0xc6, 0x03, 0x18, 0x00, 0x60, + 0x31, 0x80, 0x06, 0x00, 0x18, 0x0c, 0x60, 0x30, 0x0c, 0x00, 0x06, 0x1b, + 0x80, 0x60, 0x01, 0x80, 0x66, 0x0f, 0x18, 0x0c, 0x60, 0x01, 0x80, 0xc7, + 0xc0, 0x00, 0x0c, 0x03, 0x01, 0x80, 0xc1, 0x8c, 0x19, 0xe6, 0x0d, 0x80, + 0x0c, 0x03, 0x80, 0x03, 0x00, 0x01, 0x80, 0x03, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x01, 0xc0, 0xc6, 0x03, 0x18, 0x00, 0x60, 0x31, 0xff, 0xc0, 0x60, + 0x18, 0x0c, 0x60, 0x30, 0x0c, 0x00, 0x06, 0x0f, 0x00, 0x03, 0x01, 0x8c, + 0x66, 0x03, 0x18, 0x0c, 0x60, 0x31, 0x80, 0xc6, 0x00, 0x07, 0xf8, 0x06, + 0x01, 0x80, 0xc1, 0x8c, 0x18, 0xc6, 0x07, 0x01, 0x80, 0xc0, 0x70, 0x01, + 0x80, 0x03, 0x00, 0x0c, 0x06, 0x1e, 0x18, 0x06, 0x7f, 0xf0, 0xff, 0x8a, + 0xaa, 0x80, 0x30, 0x03, 0x00, 0x0c, 0x60, 0x30, 0x00, 0x00, 0x03, 0x00, + 0x0c, 0x00, 0x0c, 0x00, 0x00, 0x03, 0x00, 0x0c, 0x00, 0x00, 0x00, 0xc0, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x30, + 0x00, 0x00, 0x03, 0x00, 0x0c, 0x00, 0x1c, 0x07, 0x00, 0x60, 0x31, 0xff, + 0xe1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xfc, 0x03, + 0x18, 0x30, 0x06, 0x0e, 0x00, 0x00, 0x0c, 0x00, 0x06, 0x01, 0xdc, 0x00, + 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x70, 0x30, 0x0c, 0x00, + 0xe0, 0x00, 0x0c, 0x7f, 0xf0, 0x00, 0xc6, 0x03, 0x00, 0xc0, 0x60, 0x30, + 0x00, 0xc0, 0x00, 0x00, 0x00, 0x0e, 0x01, 0xff, 0xc0, 0x38, 0x00, 0x00, + 0x63, 0xf9, 0x80, 0xc6, 0x03, 0x18, 0x00, 0x60, 0x31, 0x80, 0x06, 0x00, + 0x18, 0x0c, 0x60, 0x30, 0x0c, 0x06, 0x06, 0x19, 0xc0, 0x60, 0x01, 0x80, + 0x66, 0x07, 0x18, 0x0c, 0x60, 0x01, 0x80, 0xc6, 0xe0, 0x00, 0x0c, 0x03, + 0x01, 0x80, 0xc0, 0xd8, 0x1b, 0xf6, 0x18, 0xc0, 0x0c, 0x07, 0x00, 0x03, + 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x80, 0xc6, + 0x03, 0x18, 0x00, 0x60, 0x31, 0x80, 0x00, 0x60, 0x18, 0x0c, 0x60, 0x30, + 0x0c, 0x00, 0x06, 0x0f, 0x80, 0x03, 0x01, 0x8c, 0x66, 0x03, 0x18, 0x0c, + 0x60, 0x31, 0x80, 0xc6, 0x00, 0x00, 0x1c, 0x06, 0x01, 0x80, 0xc1, 0x8c, + 0x18, 0xc6, 0x0f, 0x81, 0x80, 0xc0, 0xe0, 0x01, 0x80, 0x03, 0x00, 0x0c, + 0x00, 0x00, 0x18, 0x06, 0x7f, 0xf0, 0x7f, 0x05, 0x55, 0x40, 0x30, 0x03, + 0xe0, 0x0c, 0x60, 0x3e, 0x00, 0x00, 0x03, 0x00, 0x0c, 0x00, 0x0c, 0x00, + 0x00, 0x03, 0x00, 0x0c, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x30, 0x00, 0x00, 0x03, 0x00, + 0x0c, 0x00, 0x0e, 0x0e, 0x00, 0x60, 0x30, 0xe0, 0x01, 0x80, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xfc, 0x63, 0x18, 0x33, 0xc6, 0x0e, + 0x00, 0x00, 0x0c, 0x00, 0x06, 0x03, 0x8e, 0x00, 0xc0, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x03, 0x00, 0x60, 0x30, 0x0c, 0x01, 0xc0, 0x00, 0x0c, 0x7f, + 0xf0, 0x00, 0xc6, 0x03, 0x00, 0xc0, 0x60, 0x30, 0x00, 0xc0, 0x00, 0x00, + 0x00, 0x07, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x61, 0xe9, 0x80, 0xc6, + 0x03, 0x18, 0x0c, 0x60, 0x31, 0x80, 0x06, 0x00, 0x18, 0x0c, 0x60, 0x30, + 0x0c, 0x06, 0x06, 0x18, 0xe0, 0x60, 0x01, 0x80, 0x66, 0x03, 0x18, 0x0c, + 0x60, 0x01, 0x80, 0xc6, 0x70, 0x00, 0x0c, 0x03, 0x01, 0x80, 0xc0, 0xd8, + 0x1f, 0x3e, 0x18, 0xc0, 0x0c, 0x06, 0x00, 0x03, 0x00, 0x00, 0xc0, 0x03, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x80, 0xc6, 0x03, 0x18, 0x00, 0x60, + 0x31, 0x80, 0x00, 0x60, 0x18, 0x0c, 0x60, 0x30, 0x0c, 0x00, 0x06, 0x0d, + 0xc0, 0x03, 0x01, 0x8c, 0x66, 0x03, 0x18, 0x0c, 0x60, 0x31, 0x80, 0xc6, + 0x00, 0x00, 0x0c, 0x06, 0x01, 0x80, 0xc1, 0x8c, 0x18, 0xc6, 0x1d, 0xc1, + 0x80, 0xc1, 0xc0, 0x01, 0x80, 0x03, 0x00, 0x0c, 0x00, 0x00, 0x18, 0x06, + 0x7f, 0xf0, 0x3e, 0x0a, 0xaa, 0x80, 0x30, 0x03, 0xe0, 0x0f, 0xc0, 0x3e, + 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x0c, 0x00, 0x00, 0x03, 0x00, 0x0c, + 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x0c, 0x00, 0x30, 0x00, 0x00, 0x03, 0x00, 0x0c, 0x00, 0x07, 0x1c, + 0x00, 0x60, 0x31, 0xc0, 0x01, 0x83, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, + 0x00, 0x06, 0x30, 0x73, 0x38, 0x67, 0xe6, 0x0e, 0x00, 0x00, 0x06, 0x00, + 0x0c, 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x00, 0x30, 0x06, 0x00, + 0x60, 0x30, 0x0c, 0x03, 0x80, 0x18, 0x0c, 0x00, 0x31, 0x80, 0xc6, 0x03, + 0x00, 0xc0, 0x60, 0x30, 0x00, 0xc0, 0x30, 0x00, 0xc0, 0x03, 0x80, 0x00, + 0x00, 0xe0, 0x00, 0xc0, 0x60, 0x01, 0x80, 0xc6, 0x03, 0x18, 0x0c, 0x60, + 0x61, 0x80, 0x06, 0x00, 0x18, 0x0c, 0x60, 0x30, 0x0c, 0x06, 0x06, 0x18, + 0x70, 0x60, 0x01, 0x80, 0x66, 0x03, 0x18, 0x0c, 0x60, 0x01, 0x8e, 0xc6, + 0x38, 0x18, 0x0c, 0x03, 0x01, 0x80, 0xc0, 0xd8, 0x1e, 0x1e, 0x30, 0x60, + 0x0c, 0x06, 0x00, 0x03, 0x00, 0x00, 0x60, 0x03, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x80, 0xc6, 0x03, 0x18, 0x00, 0x60, 0x31, 0x80, 0x00, 0x60, + 0x18, 0x0c, 0x60, 0x30, 0x0c, 0x00, 0x06, 0x0c, 0xe0, 0x03, 0x01, 0x8c, + 0x66, 0x03, 0x18, 0x0c, 0x60, 0x31, 0x80, 0xc6, 0x00, 0x00, 0x0c, 0x06, + 0x01, 0x80, 0xc0, 0xd8, 0x18, 0xc6, 0x38, 0xe1, 0x80, 0xc3, 0x80, 0x01, + 0x80, 0x03, 0x00, 0x0c, 0x00, 0x00, 0x18, 0x06, 0x7f, 0xf0, 0x1c, 0x05, + 0x55, 0x40, 0x30, 0x03, 0x00, 0x0f, 0x80, 0x30, 0x00, 0x00, 0x00, 0x00, + 0x0c, 0x00, 0x0c, 0x00, 0x00, 0x03, 0x00, 0x0c, 0x00, 0x00, 0x00, 0xc0, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xff, 0x00, 0x00, 0x0c, 0x00, 0x30, + 0x00, 0x00, 0x03, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x30, 0x00, + 0x01, 0x83, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x06, 0x30, 0x3f, + 0xf0, 0x66, 0x67, 0x1f, 0x00, 0x00, 0x06, 0x00, 0x0c, 0x00, 0x00, 0x00, + 0x00, 0x03, 0x00, 0x00, 0x00, 0x30, 0x06, 0x00, 0x70, 0x70, 0x0c, 0x07, + 0x00, 0x1c, 0x1c, 0x00, 0x31, 0xc1, 0xc7, 0x07, 0x00, 0xc0, 0x70, 0x70, + 0x01, 0xc0, 0x30, 0x00, 0xc0, 0x01, 0xc0, 0x00, 0x01, 0xc0, 0x00, 0xc0, + 0x70, 0x01, 0x80, 0xc6, 0x07, 0x1c, 0x1c, 0x60, 0xe1, 0x80, 0x06, 0x00, + 0x1c, 0x1c, 0x60, 0x30, 0x0c, 0x07, 0x0e, 0x18, 0x38, 0x60, 0x01, 0x80, + 0x66, 0x03, 0x1c, 0x1c, 0x60, 0x01, 0xc7, 0xc6, 0x1c, 0x1c, 0x1c, 0x03, + 0x01, 0xc1, 0xc0, 0x70, 0x1c, 0x0e, 0x30, 0x60, 0x0c, 0x06, 0x00, 0x03, + 0x00, 0x00, 0x60, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xc0, 0xc6, + 0x07, 0x1c, 0x1c, 0x70, 0x31, 0xc1, 0xc0, 0x60, 0x1c, 0x0c, 0x60, 0x30, + 0x0c, 0x00, 0x06, 0x0c, 0x70, 0x03, 0x01, 0x8c, 0x66, 0x03, 0x1c, 0x1c, + 0x60, 0x71, 0xc0, 0xc6, 0x00, 0x1c, 0x1c, 0x06, 0x01, 0xc0, 0xc0, 0xd8, + 0x1c, 0xce, 0x70, 0x71, 0xc0, 0xc7, 0x00, 0x01, 0xc0, 0x03, 0x00, 0x1c, + 0x00, 0x00, 0x18, 0x06, 0x7f, 0xf0, 0x08, 0x0a, 0xaa, 0x80, 0x30, 0x03, + 0x00, 0x0c, 0xc0, 0x30, 0x00, 0x00, 0x7f, 0xf8, 0x0f, 0xe0, 0x0c, 0x00, + 0x00, 0x03, 0x00, 0x0c, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x3f, 0xff, 0x00, 0x00, 0x0c, 0x00, 0x30, 0x00, 0x00, 0x03, 0x00, + 0x0c, 0x07, 0xff, 0x1f, 0xfc, 0x60, 0x30, 0x00, 0x03, 0xff, 0x00, 0x00, + 0x00, 0x00, 0x0c, 0x00, 0x00, 0x06, 0x30, 0x1f, 0xe0, 0xc7, 0xe3, 0xfb, + 0x80, 0x00, 0x03, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, + 0x00, 0x30, 0x0c, 0x00, 0x3f, 0xe0, 0x7f, 0x87, 0xff, 0x0f, 0xf8, 0x00, + 0x30, 0xff, 0x83, 0xfe, 0x00, 0xc0, 0x3f, 0xe0, 0xff, 0x80, 0x30, 0x00, + 0xc0, 0x00, 0xe0, 0x00, 0x03, 0x80, 0x00, 0xc0, 0x3f, 0xf9, 0x80, 0xc7, + 0xfe, 0x0f, 0xf8, 0x7f, 0xc1, 0xff, 0xc6, 0x00, 0x0f, 0xf8, 0x60, 0x30, + 0x3f, 0x03, 0xfc, 0x18, 0x1c, 0x7f, 0xf1, 0x80, 0x66, 0x03, 0x0f, 0xf8, + 0x60, 0x00, 0xff, 0x86, 0x0e, 0x0f, 0xf8, 0x03, 0x00, 0xff, 0x80, 0x70, + 0x18, 0x06, 0x60, 0x30, 0x0c, 0x07, 0xff, 0x03, 0xf0, 0x00, 0x30, 0x3f, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xc7, 0xfe, 0x0f, 0xf8, 0x3f, + 0xf0, 0xff, 0x80, 0x60, 0x0f, 0xfc, 0x60, 0x30, 0x3f, 0x00, 0x06, 0x0c, + 0x38, 0x0f, 0xc1, 0x8c, 0x66, 0x03, 0x0f, 0xf8, 0x7f, 0xe0, 0xff, 0xc6, + 0x00, 0x0f, 0xf8, 0x07, 0xe0, 0xff, 0xc0, 0x70, 0x0f, 0xfc, 0x60, 0x30, + 0xff, 0xc7, 0xff, 0x00, 0xf0, 0x03, 0x00, 0x78, 0x00, 0x00, 0x1f, 0xfe, + 0x7f, 0xf0, 0x00, 0x05, 0x55, 0x40, 0x30, 0x03, 0x00, 0x0c, 0x60, 0x30, + 0x00, 0x00, 0x7f, 0xf8, 0x0f, 0xe0, 0x0c, 0x00, 0x00, 0x03, 0x00, 0x0c, + 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x0c, 0x00, 0x30, 0x00, 0x00, 0x03, 0x00, 0x0c, 0x07, 0xff, 0x1f, + 0xfc, 0x60, 0x30, 0x00, 0x03, 0xff, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, + 0x00, 0x06, 0x30, 0x03, 0x00, 0xc3, 0xc1, 0xf1, 0x80, 0x00, 0x01, 0x80, + 0x30, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x30, 0x0c, 0x00, + 0x1f, 0xc0, 0x7f, 0x87, 0xff, 0x07, 0xf0, 0x00, 0x30, 0x7f, 0x01, 0xfc, + 0x00, 0xc0, 0x1f, 0xc0, 0xff, 0x00, 0x30, 0x00, 0xc0, 0x00, 0x70, 0x00, + 0x07, 0x00, 0x00, 0xc0, 0x1f, 0xf9, 0x80, 0xc7, 0xfc, 0x07, 0xf0, 0x7f, + 0x01, 0xff, 0xc6, 0x00, 0x07, 0xf0, 0x60, 0x30, 0x3f, 0x01, 0xf8, 0x18, + 0x0c, 0x7f, 0xf1, 0x80, 0x66, 0x03, 0x07, 0xf0, 0x60, 0x00, 0x7f, 0x86, + 0x07, 0x07, 0xf0, 0x03, 0x00, 0x7f, 0x00, 0x70, 0x18, 0x06, 0x60, 0x30, + 0x0c, 0x07, 0xff, 0x03, 0xf0, 0x00, 0x30, 0x3f, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x7f, 0xc7, 0xfc, 0x07, 0xf0, 0x1f, 0xf0, 0x7f, 0x00, 0x60, + 0x07, 0xfc, 0x60, 0x30, 0x3f, 0x00, 0x06, 0x0c, 0x1c, 0x0f, 0xc1, 0x8c, + 0x66, 0x03, 0x07, 0xf0, 0x7f, 0xc0, 0x7f, 0xc6, 0x00, 0x07, 0xf0, 0x03, + 0xe0, 0x7f, 0xc0, 0x70, 0x07, 0xf8, 0x60, 0x30, 0x7f, 0xc7, 0xff, 0x00, + 0x70, 0x03, 0x00, 0x70, 0x00, 0x00, 0x1f, 0xfe, 0x00, 0x00, 0x00, 0x0a, + 0xaa, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x0c, 0x00, 0x00, 0x00, 0xc0, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x30, + 0x00, 0x00, 0x03, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xc0, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, + 0x00, 0x03, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x60, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x55, 0x40, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x03, 0x00, 0x0c, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x30, 0x00, 0x00, 0x03, 0x00, + 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x1f, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x03, 0x06, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0xc0, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x0a, 0xaa, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x0c, + 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x0c, 0x00, 0x30, 0x00, 0x00, 0x03, 0x00, 0x0c, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xfc, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x1c, 0x00, 0x00, 0x00, 0x03, 0x8e, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xc0, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, + 0x55, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x0c, 0x00, 0x00, 0x00, 0xc0, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x30, + 0x00, 0x00, 0x03, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xf8, 0x00, 0x00, + 0x00, 0x01, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x60, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0xaa, 0x80, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x03, 0x00, 0x0c, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xff, 0xfc, 0x0c, 0x00, 0x30, 0x00, 0x00, 0x03, 0x00, + 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x0f, 0xf0, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0xc0, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x05, 0x55, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x0c, + 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, + 0xfc, 0x0c, 0x00, 0x30, 0x00, 0x00, 0x03, 0x00, 0x0c, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +}; + +static const font_t font28 = { + .bits = font28_bits, + .depth = 1, + .width = 14, + .height = 28, + .stride = 224 +}; diff --git a/z80core/fonts/font32.h b/z80core/fonts/font32.h new file mode 100644 index 00000000..08fd26c9 --- /dev/null +++ b/z80core/fonts/font32.h @@ -0,0 +1,702 @@ +/* + * Automatically generated from ter-u32b.bdf with bdf2c + * ASCII subset of Terminus Bold 32 + * + * Copyright (C) 2020 Dimitar Toshkov Zhekov + * + * Licensed under the SIL Open Font License, Version 1.1 + */ + +static const uint8_t font32_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0xaa, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, + 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x03, 0x80, 0xff, 0xff, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x03, 0x80, 0x03, 0x80, + 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x03, 0x80, + 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, + 0x03, 0x80, 0x03, 0x80, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xaa, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, + 0x03, 0x80, 0x03, 0x80, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x03, 0x80, 0x03, 0x80, 0x03, 0x80, 0x00, 0x00, 0x03, 0x80, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, + 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x03, 0x80, 0x03, 0x80, + 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xaa, 0xaa, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x03, 0x80, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, + 0x03, 0x80, 0x03, 0x80, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x1c, 0x70, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x03, 0x80, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xf0, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, + 0x03, 0x80, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x03, 0x80, 0x03, 0x80, 0x03, 0x80, 0x00, 0x00, 0x03, 0x80, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x1c, 0x70, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, + 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x07, 0xc0, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x7f, 0xfc, 0x00, 0x00, 0xaa, 0xaa, 0x71, 0xc0, 0x7f, 0xc0, 0x3f, 0x80, + 0x70, 0x00, 0x1c, 0x70, 0x00, 0x00, 0x71, 0xc0, 0x71, 0xc0, 0x03, 0x80, + 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x03, 0x80, 0x03, 0x80, + 0x00, 0x00, 0x03, 0x80, 0x00, 0x38, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x1c, 0x70, 0x1c, 0x70, + 0x03, 0x80, 0x1f, 0x1c, 0x0f, 0xc0, 0x03, 0x80, 0x00, 0xe0, 0x0e, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, + 0x1f, 0xf0, 0x03, 0x80, 0x1f, 0xf0, 0x1f, 0xf0, 0x00, 0x1c, 0x7f, 0xfc, + 0x1f, 0xf8, 0x7f, 0xfc, 0x1f, 0xf0, 0x1f, 0xf0, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x1c, 0x00, 0x00, 0x38, 0x00, 0x1f, 0xf0, 0x1f, 0xf8, 0x1f, 0xf0, + 0x7f, 0xf0, 0x1f, 0xf0, 0x7f, 0xc0, 0x7f, 0xfc, 0x7f, 0xfc, 0x1f, 0xf0, + 0x70, 0x1c, 0x0f, 0xe0, 0x00, 0xfe, 0x70, 0x0c, 0x70, 0x00, 0x70, 0x0e, + 0x70, 0x1c, 0x1f, 0xf0, 0x7f, 0xf0, 0x1f, 0xf0, 0x7f, 0xf0, 0x1f, 0xf0, + 0x7f, 0xfc, 0x70, 0x1c, 0x70, 0x1c, 0x70, 0x0e, 0x70, 0x1c, 0x70, 0x1c, + 0x7f, 0xfc, 0x0f, 0xf0, 0x38, 0x00, 0x0f, 0xf0, 0x0e, 0xe0, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, + 0x00, 0xfe, 0x00, 0x00, 0x70, 0x00, 0x03, 0x80, 0x00, 0x38, 0x38, 0x00, + 0x0f, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xf0, 0x03, 0x80, 0x3e, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x7f, 0xfc, 0x00, 0x00, 0x55, 0x55, 0x71, 0xc0, + 0x7f, 0xc0, 0x7f, 0xc0, 0x70, 0x00, 0x1c, 0x70, 0x00, 0x00, 0x71, 0xc0, + 0x71, 0xc0, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x03, 0x80, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, + 0x03, 0x80, 0x03, 0x80, 0x00, 0x00, 0x03, 0x80, 0x00, 0x70, 0x0e, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x0f, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, + 0x1c, 0x70, 0x1c, 0x70, 0x1f, 0xf0, 0x3f, 0x9c, 0x1f, 0xe0, 0x03, 0x80, + 0x01, 0xc0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x1c, 0x3f, 0xf8, 0x07, 0x80, 0x3f, 0xf8, 0x3f, 0xf8, + 0x00, 0x3c, 0x7f, 0xfc, 0x3f, 0xf8, 0x7f, 0xfc, 0x3f, 0xf8, 0x3f, 0xf8, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x1c, 0x00, 0x3f, 0xf8, + 0x3f, 0xfc, 0x3f, 0xf8, 0x7f, 0xf8, 0x3f, 0xf8, 0x7f, 0xf0, 0x7f, 0xfc, + 0x7f, 0xfc, 0x3f, 0xf8, 0x70, 0x1c, 0x0f, 0xe0, 0x00, 0xfe, 0x70, 0x1c, + 0x70, 0x00, 0x70, 0x0e, 0x70, 0x1c, 0x3f, 0xf8, 0x7f, 0xf8, 0x3f, 0xf8, + 0x7f, 0xf8, 0x3f, 0xf8, 0x7f, 0xfc, 0x70, 0x1c, 0x70, 0x1c, 0x70, 0x0e, + 0x70, 0x1c, 0x70, 0x1c, 0x7f, 0xfc, 0x0f, 0xf0, 0x38, 0x00, 0x0f, 0xf0, + 0x1c, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, + 0x00, 0x1c, 0x00, 0x00, 0x01, 0xfe, 0x00, 0x00, 0x70, 0x00, 0x03, 0x80, + 0x00, 0x38, 0x38, 0x00, 0x0f, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xf0, + 0x03, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xfc, 0x00, 0x00, + 0xaa, 0xaa, 0x71, 0xc0, 0x70, 0x00, 0x71, 0xc0, 0x70, 0x00, 0x1c, 0x70, + 0x00, 0x00, 0x79, 0xc0, 0x71, 0xc0, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, + 0x03, 0x80, 0x03, 0x80, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x03, 0x80, 0x03, 0x80, 0x03, 0x80, 0x00, 0x00, 0x03, 0x80, + 0x00, 0xe0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x78, 0x00, 0x00, + 0x00, 0x00, 0x03, 0x80, 0x1c, 0x70, 0x1c, 0x70, 0x3f, 0xf8, 0x3b, 0xb8, + 0x38, 0x70, 0x03, 0x80, 0x03, 0x80, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x78, 0x3c, 0x0f, 0x80, + 0x78, 0x3c, 0x78, 0x3c, 0x00, 0x7c, 0x70, 0x00, 0x78, 0x00, 0x70, 0x1c, + 0x78, 0x3c, 0x78, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, + 0x0e, 0x00, 0x78, 0x3c, 0x78, 0x0e, 0x78, 0x3c, 0x70, 0x3c, 0x78, 0x3c, + 0x70, 0x78, 0x70, 0x00, 0x70, 0x00, 0x78, 0x3c, 0x70, 0x1c, 0x03, 0x80, + 0x00, 0x38, 0x70, 0x38, 0x70, 0x00, 0x78, 0x1e, 0x70, 0x1c, 0x78, 0x3c, + 0x70, 0x3c, 0x78, 0x3c, 0x70, 0x3c, 0x78, 0x3c, 0x03, 0x80, 0x70, 0x1c, + 0x70, 0x1c, 0x70, 0x0e, 0x38, 0x38, 0x70, 0x1c, 0x00, 0x1c, 0x0e, 0x00, + 0x1c, 0x00, 0x00, 0x70, 0x38, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x70, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x03, 0xc0, 0x00, 0x00, + 0x70, 0x00, 0x03, 0x80, 0x00, 0x38, 0x38, 0x00, 0x03, 0x80, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x07, 0x80, 0x03, 0x80, 0x07, 0x80, 0x00, 0x00, 0x00, 0x00, + 0x7f, 0xfc, 0x03, 0x80, 0x55, 0x55, 0x7f, 0xc0, 0x70, 0x00, 0x70, 0x00, + 0x70, 0x00, 0x1c, 0x70, 0x00, 0x00, 0x7d, 0xc0, 0x71, 0xc0, 0x03, 0x80, + 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x03, 0x80, 0x00, 0x00, 0xff, 0xff, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x03, 0x80, 0x03, 0x80, + 0x00, 0x00, 0x03, 0x80, 0x01, 0xc0, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, + 0x1c, 0x38, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x1c, 0x70, 0x1c, 0x70, + 0x7b, 0xbc, 0x3b, 0xb8, 0x38, 0x70, 0x03, 0x80, 0x07, 0x00, 0x01, 0xc0, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, + 0x70, 0x1c, 0x1f, 0x80, 0x70, 0x1c, 0x70, 0x1c, 0x00, 0xfc, 0x70, 0x00, + 0x70, 0x00, 0x70, 0x1c, 0x70, 0x1c, 0x70, 0x1c, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x00, 0x00, 0x07, 0x00, 0x70, 0x1c, 0x70, 0x06, 0x70, 0x1c, + 0x70, 0x1c, 0x70, 0x1c, 0x70, 0x38, 0x70, 0x00, 0x70, 0x00, 0x70, 0x1c, + 0x70, 0x1c, 0x03, 0x80, 0x00, 0x38, 0x70, 0x70, 0x70, 0x00, 0x7c, 0x3e, + 0x70, 0x1c, 0x70, 0x1c, 0x70, 0x1c, 0x70, 0x1c, 0x70, 0x1c, 0x70, 0x1c, + 0x03, 0x80, 0x70, 0x1c, 0x70, 0x1c, 0x70, 0x0e, 0x38, 0x38, 0x38, 0x38, + 0x00, 0x1c, 0x0e, 0x00, 0x1c, 0x00, 0x00, 0x70, 0x70, 0x1c, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, + 0x03, 0x80, 0x00, 0x00, 0x70, 0x00, 0x03, 0x80, 0x00, 0x38, 0x38, 0x00, + 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x03, 0x80, 0x03, 0x80, + 0x00, 0x00, 0x00, 0x00, 0x7f, 0xfc, 0x07, 0xc0, 0xaa, 0xaa, 0x7f, 0xc0, + 0x7f, 0x00, 0x70, 0x00, 0x70, 0x00, 0x1f, 0xf0, 0x03, 0x80, 0x7f, 0xc0, + 0x71, 0xc0, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x03, 0x80, + 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, + 0x03, 0x80, 0x03, 0x80, 0x00, 0x00, 0x03, 0x80, 0x03, 0x80, 0x01, 0xc0, + 0x00, 0x00, 0x00, 0x0e, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, + 0x00, 0x00, 0x1c, 0x70, 0x73, 0x9c, 0x3f, 0xf0, 0x38, 0x70, 0x00, 0x00, + 0x07, 0x00, 0x01, 0xc0, 0x38, 0x38, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x70, 0x70, 0x1c, 0x1f, 0x80, 0x70, 0x1c, 0x70, 0x1c, + 0x01, 0xdc, 0x70, 0x00, 0x70, 0x00, 0x70, 0x1c, 0x70, 0x1c, 0x70, 0x1c, + 0x00, 0x00, 0x00, 0x00, 0x01, 0xc0, 0x00, 0x00, 0x03, 0x80, 0x70, 0x1c, + 0x71, 0xfe, 0x70, 0x1c, 0x70, 0x1c, 0x70, 0x1c, 0x70, 0x1c, 0x70, 0x00, + 0x70, 0x00, 0x70, 0x1c, 0x70, 0x1c, 0x03, 0x80, 0x00, 0x38, 0x70, 0xe0, + 0x70, 0x00, 0x7e, 0x7e, 0x70, 0x1c, 0x70, 0x1c, 0x70, 0x1c, 0x70, 0x1c, + 0x70, 0x1c, 0x70, 0x1c, 0x03, 0x80, 0x70, 0x1c, 0x70, 0x1c, 0x70, 0x0e, + 0x1c, 0x70, 0x38, 0x38, 0x00, 0x1c, 0x0e, 0x00, 0x0e, 0x00, 0x00, 0x70, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, + 0x00, 0x1c, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x38, 0x00, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, + 0x03, 0x80, 0x03, 0x80, 0x00, 0x00, 0x03, 0x80, 0x7f, 0xfc, 0x0f, 0xe0, + 0x55, 0x55, 0x71, 0xc0, 0x7f, 0x00, 0x70, 0x00, 0x70, 0x00, 0x0f, 0xe0, + 0x03, 0x80, 0x77, 0xc0, 0x71, 0xc0, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, + 0x03, 0x80, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x03, 0x80, 0x03, 0x80, 0x03, 0x80, 0x00, 0x00, 0x03, 0x80, + 0x07, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x1c, 0x1c, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 0x7f, 0xfc, 0x73, 0x80, 0x1f, 0x70, + 0x38, 0x70, 0x00, 0x00, 0x0e, 0x00, 0x00, 0xe0, 0x1c, 0x70, 0x03, 0x80, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x70, 0x3c, 0x03, 0x80, + 0x70, 0x1c, 0x00, 0x1c, 0x03, 0x9c, 0x70, 0x00, 0x70, 0x00, 0x70, 0x38, + 0x70, 0x1c, 0x70, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, + 0x01, 0xc0, 0x70, 0x1c, 0x73, 0xfe, 0x70, 0x1c, 0x70, 0x1c, 0x70, 0x00, + 0x70, 0x1c, 0x70, 0x00, 0x70, 0x00, 0x70, 0x00, 0x70, 0x1c, 0x03, 0x80, + 0x00, 0x38, 0x71, 0xc0, 0x70, 0x00, 0x7e, 0x7e, 0x78, 0x1c, 0x70, 0x1c, + 0x70, 0x1c, 0x70, 0x1c, 0x70, 0x1c, 0x70, 0x00, 0x03, 0x80, 0x70, 0x1c, + 0x38, 0x38, 0x70, 0x0e, 0x1c, 0x70, 0x1c, 0x70, 0x00, 0x38, 0x0e, 0x00, + 0x0e, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x70, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, + 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x03, 0x80, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x07, 0x00, 0x03, 0x80, 0x03, 0x80, 0x00, 0x00, 0x07, 0xc0, + 0x7f, 0xfc, 0x1f, 0xf0, 0xaa, 0xaa, 0x71, 0xc0, 0x70, 0x00, 0x71, 0xc0, + 0x70, 0x00, 0x00, 0x00, 0x03, 0x80, 0x73, 0xc0, 0x3b, 0x80, 0x03, 0x80, + 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x03, 0x80, 0x03, 0x80, + 0x00, 0x00, 0x03, 0x80, 0x0e, 0x00, 0x00, 0x70, 0x7f, 0xfc, 0x7f, 0xfe, + 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 0x7f, 0xfc, + 0x73, 0x80, 0x00, 0xe0, 0x38, 0x70, 0x00, 0x00, 0x0e, 0x00, 0x00, 0xe0, + 0x0e, 0xe0, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, + 0x70, 0x7c, 0x03, 0x80, 0x70, 0x1c, 0x00, 0x1c, 0x07, 0x1c, 0x70, 0x00, + 0x70, 0x00, 0x00, 0x38, 0x70, 0x1c, 0x70, 0x1c, 0x03, 0x80, 0x03, 0x80, + 0x07, 0x00, 0x7f, 0xfc, 0x00, 0xe0, 0x70, 0x1c, 0x77, 0x8e, 0x70, 0x1c, + 0x70, 0x1c, 0x70, 0x00, 0x70, 0x1c, 0x70, 0x00, 0x70, 0x00, 0x70, 0x00, + 0x70, 0x1c, 0x03, 0x80, 0x00, 0x38, 0x73, 0x80, 0x70, 0x00, 0x77, 0xee, + 0x7c, 0x1c, 0x70, 0x1c, 0x70, 0x1c, 0x70, 0x1c, 0x70, 0x1c, 0x70, 0x00, + 0x03, 0x80, 0x70, 0x1c, 0x38, 0x38, 0x70, 0x0e, 0x0e, 0xe0, 0x1c, 0x70, + 0x00, 0x70, 0x0e, 0x00, 0x07, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x3f, 0xf0, 0x7f, 0xf0, 0x1f, 0xf0, 0x1f, 0xfc, 0x1f, 0xf0, + 0x3f, 0xf8, 0x1f, 0xfc, 0x7f, 0xf0, 0x0f, 0x80, 0x00, 0xf8, 0x38, 0x1c, + 0x03, 0x80, 0x7f, 0xf0, 0x7f, 0xf0, 0x1f, 0xf0, 0x7f, 0xf0, 0x1f, 0xfc, + 0x73, 0xfc, 0x1f, 0xf0, 0x7f, 0xf0, 0x70, 0x1c, 0x70, 0x1c, 0x70, 0x1c, + 0x70, 0x1c, 0x70, 0x1c, 0x7f, 0xfc, 0x07, 0x00, 0x03, 0x80, 0x03, 0x80, + 0x00, 0x00, 0x0f, 0xe0, 0x7f, 0xfc, 0x3f, 0xf8, 0x55, 0x55, 0x71, 0xc0, + 0x70, 0x00, 0x7f, 0xc0, 0x7f, 0xc0, 0x00, 0x00, 0x03, 0x80, 0x71, 0xc0, + 0x1f, 0x00, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x03, 0x80, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, + 0x03, 0x80, 0x03, 0x80, 0x00, 0x00, 0x03, 0x80, 0x1c, 0x00, 0x00, 0x38, + 0x7f, 0xfc, 0x7f, 0xfe, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, + 0x00, 0x00, 0x1c, 0x70, 0x73, 0x80, 0x00, 0xe0, 0x1c, 0xe0, 0x00, 0x00, + 0x0e, 0x00, 0x00, 0xe0, 0x07, 0xc0, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xe0, 0x70, 0xfc, 0x03, 0x80, 0x00, 0x1c, 0x00, 0x1c, + 0x0e, 0x1c, 0x70, 0x00, 0x70, 0x00, 0x00, 0x70, 0x70, 0x1c, 0x70, 0x1c, + 0x03, 0x80, 0x03, 0x80, 0x0e, 0x00, 0x7f, 0xfc, 0x00, 0x70, 0x00, 0x38, + 0x77, 0x0e, 0x70, 0x1c, 0x70, 0x38, 0x70, 0x00, 0x70, 0x1c, 0x70, 0x00, + 0x70, 0x00, 0x70, 0x00, 0x70, 0x1c, 0x03, 0x80, 0x00, 0x38, 0x77, 0x00, + 0x70, 0x00, 0x73, 0xce, 0x7e, 0x1c, 0x70, 0x1c, 0x70, 0x1c, 0x70, 0x1c, + 0x70, 0x1c, 0x70, 0x00, 0x03, 0x80, 0x70, 0x1c, 0x38, 0x38, 0x70, 0x0e, + 0x0e, 0xe0, 0x0e, 0xe0, 0x00, 0xe0, 0x0e, 0x00, 0x07, 0x00, 0x00, 0x70, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xf8, 0x7f, 0xf8, 0x3f, 0xf8, + 0x3f, 0xfc, 0x3f, 0xf8, 0x3f, 0xf8, 0x3f, 0xfc, 0x7f, 0xf8, 0x0f, 0x80, + 0x00, 0xf8, 0x38, 0x38, 0x03, 0x80, 0x7f, 0xf8, 0x7f, 0xf8, 0x3f, 0xf8, + 0x7f, 0xf8, 0x3f, 0xfc, 0x77, 0xfc, 0x3f, 0xf8, 0x7f, 0xf0, 0x70, 0x1c, + 0x70, 0x1c, 0x70, 0x1c, 0x70, 0x1c, 0x70, 0x1c, 0x7f, 0xfc, 0x07, 0x00, + 0x03, 0x80, 0x03, 0x80, 0x1e, 0x1c, 0x1e, 0xf0, 0x7f, 0xfc, 0x7f, 0xfc, + 0xaa, 0xaa, 0x71, 0xc0, 0x70, 0x00, 0x3f, 0x80, 0x7f, 0xc0, 0x00, 0x00, + 0x03, 0x80, 0x71, 0xc0, 0x0e, 0x00, 0xff, 0x80, 0xff, 0x80, 0x03, 0xff, + 0x03, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, + 0x00, 0x00, 0x03, 0xff, 0xff, 0x80, 0xff, 0xff, 0xff, 0xff, 0x03, 0x80, + 0x1c, 0x00, 0x00, 0x38, 0x70, 0x1c, 0x00, 0xe0, 0x1c, 0x00, 0x03, 0x80, + 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 0x1c, 0x70, 0x7b, 0x80, 0x01, 0xc0, + 0x0f, 0xc0, 0x00, 0x00, 0x0e, 0x00, 0x00, 0xe0, 0x03, 0x80, 0x03, 0x80, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xc0, 0x71, 0xdc, 0x03, 0x80, + 0x00, 0x38, 0x00, 0x3c, 0x1c, 0x1c, 0x7f, 0xf0, 0x7f, 0xf0, 0x00, 0x70, + 0x78, 0x3c, 0x70, 0x1c, 0x03, 0x80, 0x03, 0x80, 0x1c, 0x00, 0x00, 0x00, + 0x00, 0x38, 0x00, 0x70, 0x77, 0x0e, 0x70, 0x1c, 0x7f, 0xf0, 0x70, 0x00, + 0x70, 0x1c, 0x70, 0x00, 0x70, 0x00, 0x70, 0x00, 0x70, 0x1c, 0x03, 0x80, + 0x00, 0x38, 0x7e, 0x00, 0x70, 0x00, 0x73, 0xce, 0x77, 0x1c, 0x70, 0x1c, + 0x70, 0x1c, 0x70, 0x1c, 0x70, 0x1c, 0x78, 0x00, 0x03, 0x80, 0x70, 0x1c, + 0x38, 0x38, 0x70, 0x0e, 0x07, 0xc0, 0x0e, 0xe0, 0x01, 0xc0, 0x0e, 0x00, + 0x03, 0x80, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, + 0x70, 0x3c, 0x78, 0x3c, 0x78, 0x1c, 0x78, 0x3c, 0x03, 0x80, 0x78, 0x1c, + 0x70, 0x3c, 0x03, 0x80, 0x00, 0x38, 0x38, 0x70, 0x03, 0x80, 0x73, 0xbc, + 0x70, 0x3c, 0x78, 0x3c, 0x70, 0x3c, 0x78, 0x1c, 0x7e, 0x00, 0x78, 0x3c, + 0x07, 0x00, 0x70, 0x1c, 0x70, 0x1c, 0x70, 0x1c, 0x70, 0x1c, 0x70, 0x1c, + 0x00, 0x38, 0x07, 0x00, 0x03, 0x80, 0x03, 0x80, 0x3f, 0x1c, 0x3c, 0x78, + 0x7f, 0xfc, 0xff, 0xfe, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x7f, 0xfc, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80, + 0xff, 0x80, 0x03, 0xff, 0x03, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0x80, 0xff, 0xff, + 0xff, 0xff, 0x03, 0x80, 0x0e, 0x00, 0x00, 0x70, 0x70, 0x1c, 0x01, 0xc0, + 0x7f, 0xe0, 0x03, 0x80, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 0x1c, 0x70, + 0x3f, 0xf0, 0x01, 0xc0, 0x0f, 0x80, 0x00, 0x00, 0x0e, 0x00, 0x00, 0xe0, + 0x7f, 0xfc, 0x7f, 0xfc, 0x00, 0x00, 0x7f, 0xfc, 0x00, 0x00, 0x01, 0xc0, + 0x73, 0x9c, 0x03, 0x80, 0x00, 0x70, 0x0f, 0xf8, 0x38, 0x1c, 0x7f, 0xf8, + 0x7f, 0xf8, 0x00, 0xe0, 0x3f, 0xf8, 0x78, 0x1c, 0x03, 0x80, 0x03, 0x80, + 0x38, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0xe0, 0x77, 0x0e, 0x70, 0x1c, + 0x7f, 0xf0, 0x70, 0x00, 0x70, 0x1c, 0x7f, 0xe0, 0x7f, 0xe0, 0x71, 0xfc, + 0x7f, 0xfc, 0x03, 0x80, 0x00, 0x38, 0x7c, 0x00, 0x70, 0x00, 0x71, 0x8e, + 0x73, 0x9c, 0x70, 0x1c, 0x70, 0x3c, 0x70, 0x1c, 0x70, 0x3c, 0x3f, 0xf0, + 0x03, 0x80, 0x70, 0x1c, 0x38, 0x38, 0x70, 0x0e, 0x07, 0xc0, 0x07, 0xc0, + 0x03, 0x80, 0x0e, 0x00, 0x03, 0x80, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x1c, 0x70, 0x1c, 0x70, 0x1c, 0x70, 0x1c, 0x70, 0x1c, + 0x03, 0x80, 0x70, 0x1c, 0x70, 0x1c, 0x03, 0x80, 0x00, 0x38, 0x38, 0xe0, + 0x03, 0x80, 0x73, 0x9c, 0x70, 0x1c, 0x70, 0x1c, 0x70, 0x1c, 0x70, 0x1c, + 0x7c, 0x00, 0x70, 0x00, 0x07, 0x00, 0x70, 0x1c, 0x38, 0x38, 0x70, 0x1c, + 0x38, 0x38, 0x70, 0x1c, 0x00, 0x70, 0x3e, 0x00, 0x03, 0x80, 0x01, 0xf0, + 0x77, 0x9c, 0x78, 0x3c, 0x7f, 0xfc, 0xff, 0xfe, 0xaa, 0xaa, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xfc, 0x00, 0x00, + 0x00, 0x00, 0xff, 0x80, 0xff, 0x80, 0x03, 0xff, 0x03, 0xff, 0xff, 0xff, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, + 0xff, 0x80, 0xff, 0xff, 0xff, 0xff, 0x03, 0x80, 0x07, 0x00, 0x00, 0xe0, + 0x70, 0x1c, 0x03, 0x80, 0x7f, 0xe0, 0x03, 0x80, 0x00, 0x00, 0x03, 0x80, + 0x00, 0x00, 0x1c, 0x70, 0x1f, 0xf8, 0x03, 0x80, 0x1f, 0xce, 0x00, 0x00, + 0x0e, 0x00, 0x00, 0xe0, 0x7f, 0xfc, 0x7f, 0xfc, 0x00, 0x00, 0x7f, 0xfc, + 0x00, 0x00, 0x03, 0x80, 0x77, 0x1c, 0x03, 0x80, 0x00, 0xe0, 0x0f, 0xf8, + 0x70, 0x1c, 0x00, 0x3c, 0x70, 0x3c, 0x00, 0xe0, 0x3f, 0xf8, 0x3f, 0xfc, + 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xc0, + 0x77, 0x0e, 0x7f, 0xfc, 0x70, 0x38, 0x70, 0x00, 0x70, 0x1c, 0x7f, 0xe0, + 0x7f, 0xe0, 0x71, 0xfc, 0x7f, 0xfc, 0x03, 0x80, 0x00, 0x38, 0x7c, 0x00, + 0x70, 0x00, 0x70, 0x0e, 0x71, 0xdc, 0x70, 0x1c, 0x7f, 0xf8, 0x70, 0x1c, + 0x7f, 0xf8, 0x1f, 0xf8, 0x03, 0x80, 0x70, 0x1c, 0x1c, 0x70, 0x71, 0x8e, + 0x07, 0xc0, 0x07, 0xc0, 0x07, 0x00, 0x0e, 0x00, 0x01, 0xc0, 0x00, 0x70, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x70, 0x1c, 0x70, 0x00, + 0x70, 0x1c, 0x70, 0x1c, 0x03, 0x80, 0x70, 0x1c, 0x70, 0x1c, 0x03, 0x80, + 0x00, 0x38, 0x39, 0xc0, 0x03, 0x80, 0x73, 0x9c, 0x70, 0x1c, 0x70, 0x1c, + 0x70, 0x1c, 0x70, 0x1c, 0x78, 0x00, 0x70, 0x00, 0x07, 0x00, 0x70, 0x1c, + 0x38, 0x38, 0x73, 0x9c, 0x1c, 0x70, 0x70, 0x1c, 0x00, 0xe0, 0x3e, 0x00, + 0x03, 0x80, 0x01, 0xf0, 0x73, 0xdc, 0xf0, 0x1e, 0x7f, 0xfc, 0x7f, 0xfc, + 0x55, 0x55, 0x03, 0xfe, 0x03, 0xfe, 0x03, 0xfc, 0x03, 0xfe, 0x00, 0x00, + 0x03, 0x80, 0x03, 0x80, 0x03, 0xfe, 0x00, 0x00, 0x03, 0x80, 0x03, 0x80, + 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x03, 0x80, 0x03, 0x80, 0x00, 0x00, 0x03, 0x80, 0x03, 0x80, + 0x03, 0x80, 0x01, 0xc0, 0x70, 0x1c, 0x07, 0x00, 0x1c, 0x00, 0x03, 0x80, + 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 0x1c, 0x70, 0x03, 0xbc, 0x03, 0x80, + 0x38, 0xee, 0x00, 0x00, 0x0e, 0x00, 0x00, 0xe0, 0x03, 0x80, 0x03, 0x80, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x7e, 0x1c, 0x03, 0x80, + 0x01, 0xc0, 0x00, 0x3c, 0x70, 0x1c, 0x00, 0x1c, 0x70, 0x1c, 0x01, 0xc0, + 0x78, 0x3c, 0x1f, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, + 0x00, 0x38, 0x03, 0x80, 0x77, 0x0e, 0x7f, 0xfc, 0x70, 0x1c, 0x70, 0x00, + 0x70, 0x1c, 0x70, 0x00, 0x70, 0x00, 0x70, 0x1c, 0x70, 0x1c, 0x03, 0x80, + 0x00, 0x38, 0x7e, 0x00, 0x70, 0x00, 0x70, 0x0e, 0x70, 0xfc, 0x70, 0x1c, + 0x7f, 0xf0, 0x70, 0x1c, 0x7f, 0xf0, 0x00, 0x3c, 0x03, 0x80, 0x70, 0x1c, + 0x1c, 0x70, 0x73, 0xce, 0x07, 0xc0, 0x03, 0x80, 0x0e, 0x00, 0x0e, 0x00, + 0x01, 0xc0, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xfc, + 0x70, 0x1c, 0x70, 0x00, 0x70, 0x1c, 0x70, 0x1c, 0x03, 0x80, 0x70, 0x1c, + 0x70, 0x1c, 0x03, 0x80, 0x00, 0x38, 0x3b, 0x80, 0x03, 0x80, 0x73, 0x9c, + 0x70, 0x1c, 0x70, 0x1c, 0x70, 0x1c, 0x70, 0x1c, 0x70, 0x00, 0x78, 0x00, + 0x07, 0x00, 0x70, 0x1c, 0x38, 0x38, 0x73, 0x9c, 0x0e, 0xe0, 0x70, 0x1c, + 0x01, 0xc0, 0x07, 0x00, 0x03, 0x80, 0x03, 0x80, 0x71, 0xf8, 0xe0, 0x0e, + 0x7f, 0xfc, 0x3f, 0xf8, 0xaa, 0xaa, 0x03, 0xfe, 0x03, 0xfe, 0x03, 0xfe, + 0x03, 0xfe, 0x00, 0x00, 0x03, 0x80, 0x03, 0x80, 0x03, 0xfe, 0x00, 0x00, + 0x03, 0x80, 0x03, 0x80, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x03, 0x80, 0x00, 0x00, + 0x03, 0x80, 0x03, 0x80, 0x01, 0xc0, 0x03, 0x80, 0x70, 0x1c, 0x7f, 0xfe, + 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 0x1c, 0x70, + 0x03, 0x9c, 0x07, 0x00, 0x70, 0x7c, 0x00, 0x00, 0x0e, 0x00, 0x00, 0xe0, + 0x07, 0xc0, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, + 0x7c, 0x1c, 0x03, 0x80, 0x03, 0x80, 0x00, 0x1c, 0x70, 0x1c, 0x00, 0x1c, + 0x70, 0x1c, 0x01, 0xc0, 0x70, 0x1c, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, + 0x0e, 0x00, 0x7f, 0xfc, 0x00, 0x70, 0x03, 0x80, 0x77, 0x0e, 0x70, 0x1c, + 0x70, 0x1c, 0x70, 0x00, 0x70, 0x1c, 0x70, 0x00, 0x70, 0x00, 0x70, 0x1c, + 0x70, 0x1c, 0x03, 0x80, 0x00, 0x38, 0x77, 0x00, 0x70, 0x00, 0x70, 0x0e, + 0x70, 0x7c, 0x70, 0x1c, 0x70, 0x00, 0x70, 0x1c, 0x7e, 0x00, 0x00, 0x1c, + 0x03, 0x80, 0x70, 0x1c, 0x1c, 0x70, 0x73, 0xce, 0x0e, 0xe0, 0x03, 0x80, + 0x1c, 0x00, 0x0e, 0x00, 0x00, 0xe0, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x3f, 0xfc, 0x70, 0x1c, 0x70, 0x00, 0x70, 0x1c, 0x7f, 0xfc, + 0x03, 0x80, 0x70, 0x1c, 0x70, 0x1c, 0x03, 0x80, 0x00, 0x38, 0x3f, 0x00, + 0x03, 0x80, 0x73, 0x9c, 0x70, 0x1c, 0x70, 0x1c, 0x70, 0x1c, 0x70, 0x1c, + 0x70, 0x00, 0x3f, 0xf0, 0x07, 0x00, 0x70, 0x1c, 0x1c, 0x70, 0x73, 0x9c, + 0x07, 0xc0, 0x70, 0x1c, 0x03, 0x80, 0x07, 0x00, 0x03, 0x80, 0x03, 0x80, + 0x70, 0xf0, 0xe0, 0x0e, 0x7f, 0xfc, 0x1f, 0xf0, 0x55, 0x55, 0x00, 0x70, + 0x03, 0x80, 0x03, 0x8e, 0x03, 0x80, 0x00, 0x00, 0x03, 0x80, 0x03, 0x80, + 0x00, 0x70, 0x00, 0x00, 0x03, 0x80, 0x03, 0x80, 0x00, 0x00, 0x03, 0x80, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, + 0x03, 0x80, 0x00, 0x00, 0x03, 0x80, 0x03, 0x80, 0x00, 0xe0, 0x07, 0x00, + 0x70, 0x1c, 0x7f, 0xfe, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x7f, 0xfc, 0x03, 0x9c, 0x07, 0x00, 0x70, 0x38, 0x00, 0x00, + 0x0e, 0x00, 0x00, 0xe0, 0x0e, 0xe0, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x07, 0x00, 0x78, 0x1c, 0x03, 0x80, 0x07, 0x00, 0x00, 0x1c, + 0x7f, 0xfc, 0x00, 0x1c, 0x70, 0x1c, 0x03, 0x80, 0x70, 0x1c, 0x00, 0x1c, + 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x7f, 0xfc, 0x00, 0xe0, 0x03, 0x80, + 0x77, 0x9e, 0x70, 0x1c, 0x70, 0x1c, 0x70, 0x00, 0x70, 0x1c, 0x70, 0x00, + 0x70, 0x00, 0x70, 0x1c, 0x70, 0x1c, 0x03, 0x80, 0x00, 0x38, 0x73, 0x80, + 0x70, 0x00, 0x70, 0x0e, 0x70, 0x3c, 0x70, 0x1c, 0x70, 0x00, 0x70, 0x1c, + 0x77, 0x00, 0x00, 0x1c, 0x03, 0x80, 0x70, 0x1c, 0x1c, 0x70, 0x77, 0xee, + 0x0e, 0xe0, 0x03, 0x80, 0x38, 0x00, 0x0e, 0x00, 0x00, 0xe0, 0x00, 0x70, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x1c, 0x70, 0x1c, 0x70, 0x00, + 0x70, 0x1c, 0x7f, 0xfc, 0x03, 0x80, 0x70, 0x1c, 0x70, 0x1c, 0x03, 0x80, + 0x00, 0x38, 0x3f, 0x00, 0x03, 0x80, 0x73, 0x9c, 0x70, 0x1c, 0x70, 0x1c, + 0x70, 0x1c, 0x70, 0x1c, 0x70, 0x00, 0x1f, 0xf8, 0x07, 0x00, 0x70, 0x1c, + 0x1c, 0x70, 0x73, 0x9c, 0x07, 0xc0, 0x70, 0x1c, 0x07, 0x00, 0x07, 0x00, + 0x03, 0x80, 0x03, 0x80, 0x00, 0x00, 0xe0, 0x0e, 0x7f, 0xfc, 0x0f, 0xe0, + 0xaa, 0xaa, 0x00, 0x70, 0x03, 0x80, 0x03, 0x8e, 0x03, 0x80, 0x00, 0x00, + 0x03, 0x80, 0x03, 0x80, 0x00, 0x70, 0x00, 0x00, 0x03, 0x80, 0x03, 0x80, + 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x03, 0x80, 0x03, 0x80, 0x00, 0x00, 0x03, 0x80, 0x03, 0x80, + 0x00, 0x70, 0x0e, 0x00, 0x70, 0x1c, 0x38, 0x00, 0x1c, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xfc, 0x03, 0x9c, 0x0e, 0xf8, + 0x70, 0x38, 0x00, 0x00, 0x0e, 0x00, 0x00, 0xe0, 0x1c, 0x70, 0x03, 0x80, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x70, 0x1c, 0x03, 0x80, + 0x0e, 0x00, 0x00, 0x1c, 0x7f, 0xfc, 0x00, 0x1c, 0x70, 0x1c, 0x03, 0x80, + 0x70, 0x1c, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, + 0x01, 0xc0, 0x00, 0x00, 0x73, 0xfe, 0x70, 0x1c, 0x70, 0x1c, 0x70, 0x00, + 0x70, 0x1c, 0x70, 0x00, 0x70, 0x00, 0x70, 0x1c, 0x70, 0x1c, 0x03, 0x80, + 0x70, 0x38, 0x71, 0xc0, 0x70, 0x00, 0x70, 0x0e, 0x70, 0x1c, 0x70, 0x1c, + 0x70, 0x00, 0x70, 0x1c, 0x73, 0x80, 0x00, 0x1c, 0x03, 0x80, 0x70, 0x1c, + 0x0e, 0xe0, 0x7e, 0x7e, 0x1c, 0x70, 0x03, 0x80, 0x70, 0x00, 0x0e, 0x00, + 0x00, 0x70, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x1c, + 0x70, 0x1c, 0x70, 0x00, 0x70, 0x1c, 0x70, 0x00, 0x03, 0x80, 0x70, 0x1c, + 0x70, 0x1c, 0x03, 0x80, 0x00, 0x38, 0x3b, 0x80, 0x03, 0x80, 0x73, 0x9c, + 0x70, 0x1c, 0x70, 0x1c, 0x70, 0x1c, 0x70, 0x1c, 0x70, 0x00, 0x00, 0x3c, + 0x07, 0x00, 0x70, 0x1c, 0x1c, 0x70, 0x73, 0x9c, 0x0e, 0xe0, 0x70, 0x1c, + 0x0e, 0x00, 0x07, 0x00, 0x03, 0x80, 0x03, 0x80, 0x00, 0x00, 0xe0, 0x0e, + 0x7f, 0xfc, 0x07, 0xc0, 0x55, 0x55, 0x00, 0x70, 0x03, 0xf8, 0x03, 0xfc, + 0x03, 0xf8, 0x00, 0x00, 0x03, 0x80, 0x03, 0x80, 0x00, 0x70, 0x00, 0x00, + 0x03, 0x80, 0x03, 0x80, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x03, 0x80, 0x03, 0x80, 0x00, 0x00, + 0x03, 0x80, 0x03, 0x80, 0x00, 0x38, 0x1c, 0x00, 0x70, 0x1c, 0x70, 0x00, + 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x70, + 0x73, 0x9c, 0x0f, 0xfc, 0x70, 0x38, 0x00, 0x00, 0x07, 0x00, 0x01, 0xc0, + 0x38, 0x38, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, + 0x70, 0x1c, 0x03, 0x80, 0x1c, 0x00, 0x70, 0x1c, 0x00, 0x1c, 0x00, 0x1c, + 0x70, 0x1c, 0x03, 0x80, 0x70, 0x1c, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, + 0x01, 0xc0, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 0x71, 0xf6, 0x70, 0x1c, + 0x70, 0x1c, 0x70, 0x1c, 0x70, 0x1c, 0x70, 0x00, 0x70, 0x00, 0x70, 0x1c, + 0x70, 0x1c, 0x03, 0x80, 0x70, 0x38, 0x70, 0xe0, 0x70, 0x00, 0x70, 0x0e, + 0x70, 0x1c, 0x70, 0x1c, 0x70, 0x00, 0x70, 0x1c, 0x71, 0xc0, 0x70, 0x1c, + 0x03, 0x80, 0x70, 0x1c, 0x0e, 0xe0, 0x7e, 0x7e, 0x1c, 0x70, 0x03, 0x80, + 0x70, 0x00, 0x0e, 0x00, 0x00, 0x70, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x70, 0x1c, 0x70, 0x1c, 0x70, 0x00, 0x70, 0x1c, 0x70, 0x00, + 0x03, 0x80, 0x70, 0x1c, 0x70, 0x1c, 0x03, 0x80, 0x00, 0x38, 0x39, 0xc0, + 0x03, 0x80, 0x73, 0x9c, 0x70, 0x1c, 0x70, 0x1c, 0x70, 0x1c, 0x70, 0x1c, + 0x70, 0x00, 0x00, 0x1c, 0x07, 0x00, 0x70, 0x1c, 0x0e, 0xe0, 0x73, 0x9c, + 0x1c, 0x70, 0x70, 0x1c, 0x1c, 0x00, 0x07, 0x00, 0x03, 0x80, 0x03, 0x80, + 0x00, 0x00, 0xe0, 0x0e, 0x7f, 0xfc, 0x03, 0x80, 0xaa, 0xaa, 0x00, 0x70, + 0x03, 0xf8, 0x03, 0xf0, 0x03, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, + 0x00, 0x70, 0x00, 0x00, 0x03, 0x80, 0x03, 0x80, 0x00, 0x00, 0x03, 0x80, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x03, 0x80, + 0x03, 0x80, 0x00, 0x00, 0x03, 0x80, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, + 0x70, 0x1c, 0x00, 0x00, 0x1c, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, + 0x00, 0x00, 0x1c, 0x70, 0x7b, 0xbc, 0x1d, 0xdc, 0x70, 0x38, 0x00, 0x00, + 0x07, 0x00, 0x01, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, + 0x03, 0x80, 0x1c, 0x00, 0x70, 0x1c, 0x03, 0x80, 0x38, 0x00, 0x70, 0x1c, + 0x00, 0x1c, 0x70, 0x1c, 0x70, 0x1c, 0x03, 0x80, 0x70, 0x1c, 0x00, 0x1c, + 0x03, 0x80, 0x03, 0x80, 0x00, 0xe0, 0x00, 0x00, 0x07, 0x00, 0x03, 0x80, + 0x70, 0x00, 0x70, 0x1c, 0x70, 0x1c, 0x70, 0x1c, 0x70, 0x38, 0x70, 0x00, + 0x70, 0x00, 0x70, 0x1c, 0x70, 0x1c, 0x03, 0x80, 0x70, 0x38, 0x70, 0x70, + 0x70, 0x00, 0x70, 0x0e, 0x70, 0x1c, 0x70, 0x1c, 0x70, 0x00, 0x73, 0x9c, + 0x70, 0xe0, 0x70, 0x1c, 0x03, 0x80, 0x70, 0x1c, 0x0e, 0xe0, 0x7c, 0x3e, + 0x38, 0x38, 0x03, 0x80, 0x70, 0x00, 0x0e, 0x00, 0x00, 0x38, 0x00, 0x70, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x1c, 0x70, 0x1c, 0x70, 0x1c, + 0x70, 0x1c, 0x70, 0x00, 0x03, 0x80, 0x70, 0x1c, 0x70, 0x1c, 0x03, 0x80, + 0x00, 0x38, 0x38, 0xe0, 0x03, 0x80, 0x73, 0x9c, 0x70, 0x1c, 0x70, 0x1c, + 0x70, 0x1c, 0x70, 0x1c, 0x70, 0x00, 0x00, 0x1c, 0x07, 0x00, 0x70, 0x1c, + 0x0e, 0xe0, 0x73, 0x9c, 0x38, 0x38, 0x70, 0x1c, 0x38, 0x00, 0x07, 0x00, + 0x03, 0x80, 0x03, 0x80, 0x00, 0x00, 0xe0, 0x0e, 0x7f, 0xfc, 0x00, 0x00, + 0x55, 0x55, 0x00, 0x70, 0x03, 0x80, 0x03, 0xb8, 0x03, 0x80, 0x00, 0x00, + 0x00, 0x00, 0x03, 0x80, 0x00, 0x70, 0x00, 0x00, 0x03, 0x80, 0x03, 0x80, + 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, + 0x00, 0x00, 0x03, 0x80, 0x03, 0x80, 0x00, 0x00, 0x03, 0x80, 0x03, 0x80, + 0x00, 0x00, 0x00, 0x00, 0x70, 0x1c, 0x00, 0x00, 0x1c, 0x1c, 0x00, 0x00, + 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 0x1c, 0x70, 0x3f, 0xf8, 0x1d, 0xdc, + 0x78, 0x7c, 0x00, 0x00, 0x03, 0x80, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, + 0x03, 0x80, 0x00, 0x00, 0x03, 0x80, 0x1c, 0x00, 0x78, 0x3c, 0x03, 0x80, + 0x70, 0x00, 0x78, 0x3c, 0x00, 0x1c, 0x78, 0x1c, 0x78, 0x3c, 0x03, 0x80, + 0x78, 0x3c, 0x00, 0x3c, 0x03, 0x80, 0x03, 0x80, 0x00, 0x70, 0x00, 0x00, + 0x0e, 0x00, 0x03, 0x80, 0x78, 0x00, 0x70, 0x1c, 0x70, 0x3c, 0x78, 0x3c, + 0x70, 0x78, 0x70, 0x00, 0x70, 0x00, 0x78, 0x3c, 0x70, 0x1c, 0x03, 0x80, + 0x78, 0x78, 0x70, 0x38, 0x70, 0x00, 0x70, 0x0e, 0x70, 0x1c, 0x78, 0x3c, + 0x70, 0x00, 0x79, 0xfc, 0x70, 0x70, 0x78, 0x3c, 0x03, 0x80, 0x78, 0x3c, + 0x07, 0xc0, 0x78, 0x1e, 0x38, 0x38, 0x03, 0x80, 0x70, 0x00, 0x0e, 0x00, + 0x00, 0x38, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x1c, + 0x70, 0x3c, 0x78, 0x3c, 0x78, 0x1c, 0x78, 0x1c, 0x03, 0x80, 0x78, 0x1c, + 0x70, 0x1c, 0x03, 0x80, 0x00, 0x38, 0x38, 0x70, 0x03, 0x80, 0x73, 0x9c, + 0x70, 0x1c, 0x78, 0x3c, 0x70, 0x3c, 0x78, 0x1c, 0x70, 0x00, 0x78, 0x3c, + 0x07, 0x80, 0x78, 0x1c, 0x07, 0xc0, 0x7b, 0xbc, 0x70, 0x1c, 0x78, 0x1c, + 0x70, 0x00, 0x07, 0x80, 0x03, 0x80, 0x07, 0x80, 0x00, 0x00, 0xe0, 0x0e, + 0x7f, 0xfc, 0x00, 0x00, 0xaa, 0xaa, 0x00, 0x70, 0x03, 0x80, 0x03, 0x9c, + 0x03, 0x80, 0x00, 0x00, 0x7f, 0xfc, 0x03, 0xfe, 0x00, 0x70, 0x00, 0x00, + 0x03, 0x80, 0x03, 0x80, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x03, 0x80, 0x00, 0x00, + 0x03, 0x80, 0x03, 0x80, 0x3f, 0xfc, 0x3f, 0xfc, 0x70, 0x1c, 0x00, 0x00, + 0x7f, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 0x1c, 0x70, + 0x1f, 0xf0, 0x39, 0xfc, 0x3f, 0xee, 0x00, 0x00, 0x01, 0xc0, 0x07, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 0x03, 0x80, 0x38, 0x00, + 0x3f, 0xf8, 0x1f, 0xf0, 0x7f, 0xfc, 0x3f, 0xf8, 0x00, 0x1c, 0x3f, 0xf8, + 0x3f, 0xf8, 0x03, 0x80, 0x3f, 0xf8, 0x3f, 0xf8, 0x03, 0x80, 0x03, 0x80, + 0x00, 0x38, 0x00, 0x00, 0x1c, 0x00, 0x03, 0x80, 0x3f, 0xfe, 0x70, 0x1c, + 0x7f, 0xf8, 0x3f, 0xf8, 0x7f, 0xf0, 0x7f, 0xfc, 0x70, 0x00, 0x3f, 0xf8, + 0x70, 0x1c, 0x0f, 0xe0, 0x3f, 0xf0, 0x70, 0x1c, 0x7f, 0xfc, 0x70, 0x0e, + 0x70, 0x1c, 0x3f, 0xf8, 0x70, 0x00, 0x3f, 0xf8, 0x70, 0x38, 0x3f, 0xf8, + 0x03, 0x80, 0x3f, 0xf8, 0x07, 0xc0, 0x70, 0x0e, 0x70, 0x1c, 0x03, 0x80, + 0x7f, 0xfc, 0x0f, 0xf0, 0x00, 0x1c, 0x0f, 0xf0, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x3f, 0xfc, 0x7f, 0xf8, 0x3f, 0xf8, 0x3f, 0xfc, 0x3f, 0xfc, + 0x03, 0x80, 0x3f, 0xfc, 0x70, 0x1c, 0x0f, 0xe0, 0x00, 0x38, 0x38, 0x38, + 0x0f, 0xe0, 0x73, 0x9c, 0x70, 0x1c, 0x3f, 0xf8, 0x7f, 0xf8, 0x3f, 0xfc, + 0x70, 0x00, 0x3f, 0xf8, 0x03, 0xfc, 0x3f, 0xfc, 0x07, 0xc0, 0x3f, 0xf8, + 0x70, 0x1c, 0x3f, 0xfc, 0x7f, 0xfc, 0x03, 0xf0, 0x03, 0x80, 0x3f, 0x00, + 0x00, 0x00, 0xff, 0xfe, 0x7f, 0xfc, 0x00, 0x00, 0x55, 0x55, 0x00, 0x70, + 0x03, 0x80, 0x03, 0x8e, 0x03, 0x80, 0x00, 0x00, 0x7f, 0xfc, 0x03, 0xfe, + 0x00, 0x70, 0x00, 0x00, 0x03, 0x80, 0x03, 0x80, 0x00, 0x00, 0x03, 0x80, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, + 0x03, 0x80, 0x00, 0x00, 0x03, 0x80, 0x03, 0x80, 0x3f, 0xfc, 0x3f, 0xfc, + 0x70, 0x1c, 0x00, 0x00, 0x7f, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, + 0x00, 0x00, 0x1c, 0x70, 0x03, 0x80, 0x38, 0xf8, 0x1f, 0xce, 0x00, 0x00, + 0x00, 0xe0, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, + 0x03, 0x80, 0x38, 0x00, 0x1f, 0xf0, 0x1f, 0xf0, 0x7f, 0xfc, 0x1f, 0xf0, + 0x00, 0x1c, 0x1f, 0xf0, 0x1f, 0xf0, 0x03, 0x80, 0x1f, 0xf0, 0x3f, 0xf0, + 0x03, 0x80, 0x03, 0x80, 0x00, 0x1c, 0x00, 0x00, 0x38, 0x00, 0x03, 0x80, + 0x1f, 0xfe, 0x70, 0x1c, 0x7f, 0xf0, 0x1f, 0xf0, 0x7f, 0xc0, 0x7f, 0xfc, + 0x70, 0x00, 0x1f, 0xf0, 0x70, 0x1c, 0x0f, 0xe0, 0x1f, 0xe0, 0x70, 0x0c, + 0x7f, 0xfc, 0x70, 0x0e, 0x70, 0x1c, 0x1f, 0xf0, 0x70, 0x00, 0x1f, 0xf0, + 0x70, 0x1c, 0x1f, 0xf0, 0x03, 0x80, 0x1f, 0xf0, 0x07, 0xc0, 0x70, 0x0e, + 0x70, 0x1c, 0x03, 0x80, 0x7f, 0xfc, 0x0f, 0xf0, 0x00, 0x1c, 0x0f, 0xf0, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xfc, 0x7f, 0xf0, 0x1f, 0xf0, + 0x1f, 0xfc, 0x1f, 0xf8, 0x03, 0x80, 0x1f, 0xfc, 0x70, 0x1c, 0x0f, 0xe0, + 0x00, 0x38, 0x38, 0x1c, 0x0f, 0xe0, 0x73, 0x9c, 0x70, 0x1c, 0x1f, 0xf0, + 0x7f, 0xf0, 0x1f, 0xfc, 0x70, 0x00, 0x1f, 0xf0, 0x01, 0xfc, 0x1f, 0xfc, + 0x07, 0xc0, 0x1f, 0xf0, 0x70, 0x1c, 0x1f, 0xfc, 0x7f, 0xfc, 0x01, 0xf0, + 0x03, 0x80, 0x3e, 0x00, 0x00, 0x00, 0xff, 0xfe, 0x00, 0x00, 0x00, 0x00, + 0xaa, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x03, 0x80, + 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x03, 0x80, 0x03, 0x80, 0x00, 0x00, 0x03, 0x80, 0x03, 0x80, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, + 0x00, 0x00, 0x00, 0x00, 0x38, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x03, 0x80, 0x03, 0x80, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x03, 0x80, 0x00, 0x00, + 0x03, 0x80, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xfc, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x38, 0x38, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x1c, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xaa, 0xaa, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x03, 0x80, 0x00, 0x00, 0x03, 0x80, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, + 0x03, 0x80, 0x00, 0x00, 0x03, 0x80, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x7f, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, + 0x3c, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x70, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x03, 0x80, + 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0x03, 0x80, 0x03, 0x80, 0x00, 0x00, 0x03, 0x80, 0x03, 0x80, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xf8, + 0x00, 0x00, 0x00, 0x00, 0x1f, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xf8, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xaa, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x03, 0x80, 0x03, 0x80, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x03, 0x80, 0x03, 0x80, 0x00, 0x00, + 0x03, 0x80, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x3f, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xe0, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x1c, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x3f, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x03, 0x80, 0x00, 0x00, 0x03, 0x80, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x03, 0x80, + 0x03, 0x80, 0x00, 0x00, 0x03, 0x80, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +}; + +static const font_t font32 = { + .bits = font32_bits, + .depth = 1, + .width = 16, + .height = 32, + .stride = 256 +}; diff --git a/z80core/sim8080.c b/z80core/sim8080.c index 6509507e..8d7b4645 100644 --- a/z80core/sim8080.c +++ b/z80core/sim8080.c @@ -11,10 +11,11 @@ #include "simmem.h" #include "simcore.h" #include "simport.h" +#include "sim8080.h" + #ifdef WANT_ICE #include "simice.h" #endif -#include "sim8080.h" #ifdef FRONTPANEL #include "frontpanel.h" @@ -114,13 +115,9 @@ static int op_undoc_call(void); #ifdef FRONTPANEL static inline void addr_leds(WORD data) { - uint64_t clk; - - clk = get_clock_us(); fp_led_address = data; fp_clock++; fp_sampleData(); - cpu_time -= get_clock_us() - clk; } #endif @@ -408,12 +405,15 @@ void cpu_8080(void) Tstates_t T_max, T_dma; uint64_t t1, t2; int tdiff; -#ifdef FRONTPANEL - uint64_t clk; -#endif T_max = T + tmax; t1 = get_clock_us(); +#ifdef FRONTPANEL + if (F_flag) { + fp_clock++; + fp_sampleData(); + } +#endif do { @@ -461,10 +461,8 @@ void cpu_8080(void) if (bus_request) { /* DMA bus request */ #ifdef FRONTPANEL if (F_flag) { - clk = get_clock_us(); fp_clock += 1000; fp_sampleData(); - cpu_time -= get_clock_us() - clk; } #endif if (dma_bus_master) { @@ -482,10 +480,8 @@ void cpu_8080(void) } #ifdef FRONTPANEL if (F_flag) { - clk = get_clock_us(); fp_clock += 1000; fp_sampleData(); - cpu_time -= get_clock_us() - clk; } #endif } @@ -506,13 +502,11 @@ void cpu_8080(void) #endif #ifdef FRONTPANEL if (F_flag) { - clk = get_clock_us(); fp_clock += 1000; fp_led_data = (int_data != -1) ? (BYTE) int_data : 0xff; fp_sampleData(); wait_int_step(); - cpu_time -= get_clock_us() - clk; if (cpu_state & ST_RESET) goto leave; } @@ -527,10 +521,8 @@ void cpu_8080(void) #endif #ifdef FRONTPANEL if (F_flag) { - clk = get_clock_us(); fp_clock++; fp_sampleLightGroup(0, 0); - cpu_time -= get_clock_us() - clk; } #endif @@ -640,12 +632,10 @@ void cpu_8080(void) #endif #ifdef FRONTPANEL if (F_flag) { - clk = get_clock_us(); fp_led_address = PC; fp_led_data = getmem(PC); fp_clock++; fp_sampleData(); - cpu_time -= get_clock_us() - clk; } #endif #ifdef SIMPLEPANEL @@ -673,13 +663,9 @@ static int op_nop(void) /* NOP */ static int op_hlt(void) /* HLT */ { - uint64_t clk; - #ifdef BUS_8080 cpu_bus = CPU_WO | CPU_HLTA | CPU_MEMR; #endif - - clk = get_clock_us(); #ifdef FRONTPANEL if (!F_flag) { #endif @@ -697,9 +683,7 @@ static int op_hlt(void) /* HLT */ if (int_int) cpu_bus = CPU_INTA | CPU_WO | CPU_HLTA | CPU_M1; #endif - busy_loop_cnt = 0; - #ifdef FRONTPANEL } else { fp_led_address = 0xffff; @@ -733,9 +717,7 @@ static int op_hlt(void) /* HLT */ } } } -#endif - cpu_time -= get_clock_us() - clk; - +#endif /* FRONTPANEL */ return 7; } diff --git a/z80core/simcore.c b/z80core/simcore.c index 00857dba..e6500dff 100644 --- a/z80core/simcore.c +++ b/z80core/simcore.c @@ -115,12 +115,10 @@ void switch_cpu(int new_cpu) */ void run_cpu(void) { - uint64_t t; - + cpu_start = get_clock_us(); cpu_state = ST_CONTIN_RUN; cpu_error = NONE; - t = get_clock_us(); - for (;;) { + while (true) { switch (cpu) { #ifndef EXCLUDE_Z80 case Z80: @@ -141,7 +139,7 @@ void run_cpu(void) } else break; } - cpu_time += get_clock_us() - t; + cpu_time += get_clock_us() - cpu_start; } /* @@ -149,11 +147,9 @@ void run_cpu(void) */ void step_cpu(void) { - uint64_t t; - + cpu_start = get_clock_us(); cpu_state = ST_SINGLE_STEP; cpu_error = NONE; - t = get_clock_us(); switch (cpu) { #ifndef EXCLUDE_Z80 case Z80: @@ -168,8 +164,8 @@ void step_cpu(void) default: break; } - cpu_time += get_clock_us() - t; cpu_state = ST_STOPPED; + cpu_time += get_clock_us() - cpu_start; } /* @@ -253,7 +249,6 @@ void report_cpu_stats(void) */ BYTE io_in(BYTE addrl, BYTE addrh) { - uint64_t clk; #ifdef FRONTPANEL bool val; #else @@ -262,8 +257,6 @@ BYTE io_in(BYTE addrl, BYTE addrh) #endif #endif - clk = get_clock_us(); - io_port = addrl; if (port_in[addrl]) io_data = (*port_in[addrl])(); @@ -303,8 +296,6 @@ BYTE io_in(BYTE addrl, BYTE addrh) LOGD(TAG, "input %02x from port %02x", io_data, io_port); - cpu_time -= get_clock_us() - clk; - return io_data; } @@ -315,13 +306,10 @@ BYTE io_in(BYTE addrl, BYTE addrh) */ void io_out(BYTE addrl, BYTE addrh, BYTE data) { - uint64_t clk; #if !defined(FRONTPANEL) && !defined(SIMPLEPANEL) UNUSED(addrh); #endif - clk = get_clock_us(); - io_port = addrl; io_data = data; @@ -359,8 +347,6 @@ void io_out(BYTE addrl, BYTE addrh, BYTE data) #ifdef IOPANEL port_flags[addrl].out = true; #endif - - cpu_time -= get_clock_us() - clk; } /* diff --git a/z80core/simdis.c b/z80core/simdis.c index 65260c34..19ca5974 100644 --- a/z80core/simdis.c +++ b/z80core/simdis.c @@ -449,16 +449,17 @@ static char *btoh(BYTE b, char *p) static char *wtoa(WORD w, char *p) { register char c; - register int onlyz, shift; + register int shift; + register bool onlyz; - onlyz = 1; + onlyz = true; for (shift = 12; shift >= 0; shift -= 4) { c = (w >> shift) & 0xf; if (onlyz && c > 9) *p++ = '0'; if (!onlyz || c) { *p++ = c + (c < 10 ? '0' : 'A' - 10); - onlyz = 0; + onlyz = false; } } if (onlyz) diff --git a/z80core/simglb.c b/z80core/simglb.c index 70384052..ff081855 100644 --- a/z80core/simglb.c +++ b/z80core/simglb.c @@ -40,7 +40,8 @@ BYTE IFF; /* interrupt flags */ cpu_regs_t cpu_regs; /* CPU registers */ #endif Tstates_t T; /* CPU clock */ -uint64_t cpu_time; /* time spent running CPU in us */ +uint64_t cpu_start; /* timestamp at start of CPU run/step */ +int64_t cpu_time; /* time spent running CPU in us */ #ifdef BUS_8080 BYTE cpu_bus; /* CPU bus status, for frontpanels */ @@ -111,6 +112,13 @@ bool F_flag = true; /* flag for -F option */ #ifdef HAS_NETSERVER bool n_flag; /* flag for -n option */ #endif +#ifdef INFOPANEL +#ifdef FRONTPANEL +bool p_flag = true; /* flag for -p option */ +#else +bool p_flag = false; /* flag for -p option */ +#endif +#endif /* * Variables for configuration and disk images diff --git a/z80core/simglb.h b/z80core/simglb.h index 231c6f06..b9d97814 100644 --- a/z80core/simglb.h +++ b/z80core/simglb.h @@ -32,7 +32,8 @@ extern BYTE IFF; #include "altregs.h" #endif extern Tstates_t T; -extern uint64_t cpu_time; +extern uint64_t cpu_start; +extern int64_t cpu_time; #ifdef BUS_8080 extern BYTE cpu_bus; @@ -86,6 +87,9 @@ extern bool F_flag; #ifdef HAS_NETSERVER extern bool n_flag; #endif +#ifdef INFOPANEL +extern bool p_flag; +#endif extern char xfn[MAX_LFN]; #ifdef HAS_DISKS diff --git a/z80core/simice.c b/z80core/simice.c index 8da18bc9..d4702c58 100644 --- a/z80core/simice.c +++ b/z80core/simice.c @@ -302,7 +302,7 @@ static void do_go(char *s) (*ice_before_go)(); install_softbp(); start_time = cpu_time; - for (;;) { + while (true) { run_cpu(); if (cpu_error && (cpu_error != OPHALT || handle_break())) break; @@ -493,7 +493,7 @@ static void do_modify(char *s) s++; if (isxdigit((unsigned char) *s)) wrk_addr = strtol(s, NULL, 16); - for (;;) { + while (true) { printf("%04x = %02x : ", (unsigned int) wrk_addr, getmem(wrk_addr)); if (!get_cmdline(arg, LENCMD) || arg[0] == '\0') diff --git a/z80core/simmain.c b/z80core/simmain.c index 00350759..46ddd806 100644 --- a/z80core/simmain.c +++ b/z80core/simmain.c @@ -37,6 +37,10 @@ #include "simfun.h" #include "simint.h" +#ifdef INFOPANEL +#include "simpanel.h" +#endif + static void save_core(void); static bool load_core(void); @@ -238,6 +242,11 @@ int main(int argc, char *argv[]) n_flag = true; break; #endif +#ifdef INFOPANEL + case 'p': /* toggle introspection panel */ + p_flag = !p_flag; + break; +#endif case '?': case 'h': @@ -329,6 +338,9 @@ int main(int argc, char *argv[]) #endif #ifdef HAS_NETSERVER puts("\t-n = enable web-based frontend"); +#endif +#ifdef INFOPANEL + puts("\t-p = toggle introspection panel"); #endif return EXIT_FAILURE; } @@ -422,12 +434,20 @@ puts(" ##### ### ##### ### ##### ### # #"); int_on(); /* initialize UNIX interrupts */ init_io(); /* initialize I/O devices */ +#ifdef INFOPANEL + if (p_flag) + init_panel(); /* initialize introspection panel */ +#endif mon(); /* run system */ if (s_flag) /* save core */ save_core(); +#ifdef INFOPANEL + if (p_flag) + exit_panel(); /* stop introspection panel */ +#endif exit_io(); /* stop I/O devices */ int_off(); /* stop UNIX interrupts */ diff --git a/z80core/simpanel.c b/z80core/simpanel.c new file mode 100644 index 00000000..9b1eccd9 --- /dev/null +++ b/z80core/simpanel.c @@ -0,0 +1,987 @@ +/* + * Z80SIM - a Z80-CPU simulator + * + * Copyright (C) 2015-2019 by Udo Munk + * Copyright (C) 2025 by Thomas Eberhardt + */ + +/* + * This module contains an introspection panel to view various + * status information of the simulator. + */ + +#include +#ifdef WANT_SDL +#include +#else +#include +#include +#include +#include +#include +#endif + +#include "sim.h" +#include "simdefs.h" +#include "simglb.h" +#include "simmem.h" +#include "simpanel.h" +#include "simport.h" +#ifdef WANT_SDL +#include "simsdl.h" +#endif + +/* #define LOG_LOCAL_LEVEL LOG_DEBUG */ +#include "log.h" +static const char *TAG = "panel"; + +/* 888 RGB colors */ +#define C_BLACK 0x00000000 +#define C_RED 0x00ff0000 +#define C_GREEN 0x0000ff00 +#define C_BLUE 0x000000ff +#define C_CYAN 0x0000ffff +#define C_MAGENTA 0x00ff00ff +#define C_YELLOW 0x00ffff00 +#define C_WHITE 0x00ffffff +#define C_DKRED 0x00800000 +#define C_DKGREEN 0x00008000 +#define C_DKBLUE 0x00000080 +#define C_DKCYAN 0x00008080 +#define C_DKMAGENTA 0x00800080 +#define C_DKYELLOW 0x00808000 +#define C_GRAY 0x00808080 +#define C_ORANGE 0x00ffa500 +#define C_WHEAT 0x00f5deb3 + +/* + * Font type. Depth is ignored and assumed to be 1. + */ +typedef const struct font { + const uint8_t *bits; + const unsigned depth; + const unsigned width; + const unsigned height; + const unsigned stride; +} font_t; + +/* + * Grid type for drawing text with character based coordinates. + */ +typedef struct draw_grid { + const font_t *font; + unsigned xoff; + unsigned yoff; + unsigned spc; + unsigned cwidth; + unsigned cheight; + unsigned cols; + unsigned rows; +} draw_grid_t; + +/* include Terminus bitmap fonts */ +#include "fonts/font12.h" +#include "fonts/font14.h" +#include "fonts/font16.h" +#include "fonts/font18.h" +#include "fonts/font20.h" +#include "fonts/font22.h" +#include "fonts/font24.h" +#include "fonts/font28.h" +#include "fonts/font32.h" + +/* SDL2/X11 stuff */ +static unsigned xsize, ysize; +static uint32_t *pixels; +static int pitch; +#ifdef WANT_SDL +static int panel_win_id = -1; +static SDL_Window *window; +static SDL_Renderer *renderer; +static SDL_Texture *texture; +#else +static Display *display; +static Visual *visual; +static Window window; +static int screen; +static GC gc; +static XImage *ximage; +static Colormap colormap; +static XEvent event; +#endif + +#ifndef WANT_SDL +/* UNIX stuff */ +static pthread_t thread; +#endif + +/* + * Create the SDL2 or X11 window for panel display + */ +static void open_display(void) +{ + xsize = 240; + ysize = 135; + +#ifdef WANT_SDL + window = SDL_CreateWindow("Z80pack", + SDL_WINDOWPOS_UNDEFINED, + SDL_WINDOWPOS_UNDEFINED, + xsize, ysize, 0); + if (window == NULL) { + LOGW(TAG, "can't create window: %s", SDL_GetError()); + return; + } + renderer = SDL_CreateRenderer(window, -1, (SDL_RENDERER_ACCELERATED | + SDL_RENDERER_PRESENTVSYNC)); + if (renderer == NULL) { + LOGW(TAG, "can't create renderer: %s", SDL_GetError()); + SDL_DestroyWindow(window); + window = NULL; + return; + } + texture = SDL_CreateTexture(renderer, SDL_PIXELFORMAT_XRGB8888, + SDL_TEXTUREACCESS_STREAMING, xsize, ysize); + if (texture == NULL) { + LOGW(TAG, "can't create texture: %s", SDL_GetError()); + SDL_DestroyRenderer(renderer); + renderer = NULL; + SDL_DestroyWindow(window); + window = NULL; + return; + } +#else /* !WANT_SDL */ + Window rootwindow; + XSetWindowAttributes swa; + XSizeHints *size_hints = XAllocSizeHints(); + Atom wm_delete_window; + XVisualInfo vinfo; + + display = XOpenDisplay(NULL); + if (display == NULL) { + LOGW(TAG, "can't open display %s", getenv("DISPLAY")); + return; + } + XLockDisplay(display); + screen = DefaultScreen(display); + if (!XMatchVisualInfo(display, screen, 24, TrueColor, &vinfo)) { + LOGW(TAG, "couldn't find a 24-bit TrueColor visual"); + XUnlockDisplay(display); + XCloseDisplay(display); + display = NULL; + return; + } + rootwindow = RootWindow(display, vinfo.screen); + visual = vinfo.visual; + colormap = XCreateColormap(display, rootwindow, visual, AllocNone); + swa.border_pixel = 0; + swa.colormap = colormap; + swa.event_mask = ButtonPressMask | ButtonReleaseMask; + window = XCreateWindow(display, rootwindow, 0, 0, xsize, ysize, + 1, vinfo.depth, InputOutput, visual, + CWBorderPixel | CWColormap | CWEventMask, &swa); + XStoreName(display, window, "Z80pack"); + size_hints->flags = PSize | PMinSize | PMaxSize; + size_hints->min_width = xsize; + size_hints->min_height = ysize; + size_hints->base_width = xsize; + size_hints->base_height = ysize; + size_hints->max_width = xsize; + size_hints->max_height = ysize; + XSetWMNormalHints(display, window, size_hints); + XFree(size_hints); + wm_delete_window = XInternAtom(display, "WM_DELETE_WINDOW", False); + XSetWMProtocols(display, window, &wm_delete_window, 1); + gc = XCreateGC(display, window, 0, NULL); + pixels = (uint32_t *) malloc (xsize * ysize * sizeof(uint32_t)); + ximage = XCreateImage(display, visual, vinfo.depth, ZPixmap, 0, + (char *) pixels, xsize, ysize, 32, 0); + /* force little-endian pixels, Xlib will convert if necessary */ + ximage->byte_order = LSBFirst; + pitch = ximage->bytes_per_line / 4; + + XMapWindow(display, window); + XUnlockDisplay(display); +#endif /* !WANT_SDL */ +} + +/* + * Close the SDL2 or X11 window for panel display + */ +static void close_display(void) +{ +#ifdef WANT_SDL + if (texture != NULL) { + SDL_DestroyTexture(texture); + texture = NULL; + } + if (renderer != NULL) { + SDL_DestroyRenderer(renderer); + renderer = NULL; + } + if (window != NULL) { + SDL_DestroyWindow(window); + window = NULL; + } +#else + if (display != NULL) { + XLockDisplay(display); + free(pixels); + ximage->data = NULL; + XDestroyImage(ximage); + XFreeGC(display, gc); + XDestroyWindow(display, window); + XFreeColormap(display, colormap); + XUnlockDisplay(display); + XCloseDisplay(display); + display = NULL; + } +#endif +} + +#ifdef WANT_SDL + +/* + * Process a SDL event + */ +static void process_event(SDL_Event *event) +{ + switch (event->type) { + case SDL_MOUSEBUTTONDOWN: + break; + case SDL_MOUSEBUTTONUP: + break; + default: + break; + } +} + +#else /* !WANT_SDL */ + +/* + * Process the X11 event queue + */ +static inline void process_events(void) +{ + while (XPending(display)) { + XNextEvent(display, &event); + switch (event.type) { + case ButtonPress: + break; + case ButtonRelease: + break; + default: + break; + } + } +} + +#endif /* !WANT_SDL */ + +#define DRAW_DEBUG + +/* + * Fill the pixmap with the specified color. + */ +static inline void draw_clear(const uint32_t color) +{ + uint32_t *p = pixels; + unsigned x, y; + +#ifdef DRAW_DEBUG + if (pixels == NULL) { + fprintf(stderr, "%s: pixels texture is NULL\n", __func__); + return; + } +#endif + for (x = 0; x < xsize; x++) + *p++ = color; + for (y = 1; y < ysize; y++) { + memcpy(p, pixels, pitch * 4); + p += pitch; + } +} + +/* + * Draw a pixel in the specified color. + */ +static inline void draw_pixel(const unsigned x, const unsigned y, + const uint32_t color) +{ +#ifdef DRAW_DEBUG + if (pixels == NULL) { + fprintf(stderr, "%s: pixels texture is NULL\n", __func__); + return; + } + if (x >= xsize || y >= ysize) { + fprintf(stderr, "%s: coord (%d,%d) is outside (0,0)-(%d,%d)\n", + __func__, x, y, xsize - 1, ysize - 1); + return; + } +#endif + *(pixels + y * pitch + x) = color; +} + +/* + * Draw a character in the specfied font and colors. + */ +static inline void draw_char(const unsigned x, const unsigned y, const char c, + const font_t *font, const uint32_t fgc, + const uint32_t bgc) +{ + const unsigned off = (c & 0x7f) * font->width; + const uint8_t *p0 = font->bits + (off >> 3), *p; + const uint8_t m0 = 0x80 >> (off & 7); + uint8_t m; + uint32_t *q0, *q; + unsigned i, j; + +#ifdef DRAW_DEBUG + if (pixels == NULL) { + fprintf(stderr, "%s: pixels texture is NULL\n", __func__); + return; + } + if (font == NULL) { + fprintf(stderr, "%s: font is NULL\n", __func__); + return; + } + if (x >= xsize || y >= ysize || x + font->width > xsize || + y + font->height > ysize) { + fprintf(stderr, "%s: char '%c' at (%d,%d)-(%d,%d) is " + "outside (0,0)-(%d,%d)\n", __func__, c, x, y, + x + font->width - 1, y + font->height - 1, + xsize - 1, ysize - 1); + return; + } +#endif + q0 = pixels + y * pitch + x; + for (j = font->height; j > 0; j--) { + m = m0; + p = p0; + q = q0; + for (i = font->width; i > 0; i--) { + if (*p & m) + *q = fgc; + else + *q = bgc; + if ((m >>= 1) == 0) { + m = 0x80; + p++; + } + q++; + } + p0 += font->stride; + q0 += pitch; + } +} + +/* + * Draw a horizontal line in the specified color. + */ +static inline void draw_hline(const unsigned x, const unsigned y, unsigned w, + const uint32_t col) +{ + uint32_t *p; + +#ifdef DRAW_DEBUG + if (pixels == NULL) { + fprintf(stderr, "%s: pixels texture is NULL\n", __func__); + return; + } + if (x >= xsize || y >= ysize || x + w > xsize) { + fprintf(stderr, "%s: line (%d,%d)-(%d,%d) is outside " + "(0,0)-(%d,%d)\n", __func__, x, y, x + w - 1, y, + xsize - 1, ysize - 1); + return; + } +#endif + p = pixels + y * pitch + x; + while (w--) + *p++ = col; +} + +/* + * Draw a vertical line in the specified color. + */ +static inline void draw_vline(const unsigned x, const unsigned y, unsigned h, + const uint32_t col) +{ + uint32_t *p; + +#ifdef DRAW_DEBUG + if (pixels == NULL) { + fprintf(stderr, "%s: pixels texture is NULL\n", __func__); + return; + } + if (x >= xsize || y >= ysize || y + h > ysize) { + fprintf(stderr, "%s: line (%d,%d)-(%d,%d) is outside " + "(0,0)-(%d,%d)\n", __func__, x, y, x, y + h - 1, + xsize - 1, ysize - 1); + return; + } +#endif + p = pixels + y * pitch + x; + while (h--) { + *p = col; + p += pitch; + } +} + +/* + * Setup a text grid defined by font and spacing. + * If col < 0 then use the entire pixels texture width. + * If row < 0 then use the entire pixels texture height. + */ +static inline void draw_setup_grid(draw_grid_t *grid, const unsigned xoff, + const unsigned yoff, const int cols, + const int rows, const font_t *font, + const unsigned spc) +{ +#ifdef DRAW_DEBUG + if (pixels == NULL) { + fprintf(stderr, "%s: pixels texture is NULL\n", __func__); + return; + } + if (grid == NULL) { + fprintf(stderr, "%s: grid is NULL\n", __func__); + return; + } + if (font == NULL) { + fprintf(stderr, "%s: font is NULL\n", __func__); + return; + } + if (cols == 0) { + fprintf(stderr," %s: number of columns is zero\n", __func__); + return; + } + if (cols >= 0 && (unsigned) cols > (xsize - xoff) / font->width) { + fprintf(stderr," %s: number of columns %d is too large\n", + __func__, cols); + return; + } + if (rows == 0) { + fprintf(stderr," %s: number of rows is zero\n", __func__); + return; + } + if (rows >= 0 && (unsigned) rows > ((ysize - yoff + spc) / + (font->height + spc))) { + fprintf(stderr," %s: number of rows %d is too large\n", + __func__, rows); + return; + } +#endif + grid->font = font; + grid->xoff = xoff; + grid->yoff = yoff; + grid->spc = spc; + grid->cwidth = font->width; + grid->cheight = font->height + spc; + if (cols < 0) + grid->cols = (xsize - xoff) / grid->cwidth; + else + grid->cols = cols; + if (rows < 0) + grid->rows = (ysize - yoff + spc) / grid->cheight; + else + grid->rows = rows; +} + +/* + * Draw a character using grid coordinates in the specified color. + */ +static inline void draw_grid_char(const unsigned x, const unsigned y, + const char c, const draw_grid_t *grid, + const uint32_t fgc, const uint32_t bgc) +{ +#ifdef DRAW_DEBUG + if (pixels == NULL) { + fprintf(stderr, "%s: pixels texture is NULL\n", __func__); + return; + } + if (grid == NULL) { + fprintf(stderr, "%s: grid is NULL\n", __func__); + return; + } +#endif + draw_char(x * grid->cwidth + grid->xoff, + y * grid->cheight + grid->yoff, + c, grid->font, fgc, bgc); +} + +/* + * Draw a horizontal grid line in the middle of the spacing + * above the y grid coordinate specified. + */ +static inline void draw_grid_hline(unsigned x, unsigned y, unsigned w, + const draw_grid_t *grid, const uint32_t col) +{ +#ifdef DRAW_DEBUG + if (pixels == NULL) { + fprintf(stderr, "%s: pixels texture is NULL\n", __func__); + return; + } + if (grid == NULL) { + fprintf(stderr, "%s: grid is NULL\n", __func__); + return; + } +#endif + if (w) { + x = x * grid->cwidth; + if (y) + y = y * grid->cheight - (grid->spc + 1) / 2; + w = w * grid->cwidth; + draw_hline(x + grid->xoff, y + grid->yoff, w, col); + } +} + +/* + * Draw a vertical grid line in the middle of the x grid coordinate + * specified. + */ +static inline void draw_grid_vline(unsigned x, unsigned y, unsigned h, + const draw_grid_t *grid, const uint32_t col) +{ +#ifdef DRAW_DEBUG + if (pixels == NULL) { + fprintf(stderr, "%s: pixels texture is NULL\n", __func__); + return; + } + if (grid == NULL) { + fprintf(stderr, "%s: grid is NULL\n", __func__); + return; + } +#endif + unsigned hadj = 0; + + if (h) { + x = x * grid->cwidth + (grid->cwidth + 1) / 2; + if (y + h < grid->rows) + hadj += grid->spc / 2 + 1; + if (y) { + y = y * grid->cheight - (grid->spc + 1) / 2; + hadj += (grid->spc + 1) / 2; + } + h = h * grid->cheight - grid->spc + hadj; + draw_vline(x + grid->xoff, y + grid->yoff, h, col); + } +} + +/* + * Draw a 10x10 LED circular bracket. + */ +static inline void draw_led_bracket(const unsigned x, const unsigned y) +{ + draw_hline(x + 2, y, 6, C_GRAY); + draw_pixel(x + 1, y + 1, C_GRAY); + draw_pixel(x + 8, y + 1, C_GRAY); + draw_vline(x, y + 2, 6, C_GRAY); + draw_vline(x + 9, y + 2, 6, C_GRAY); + draw_pixel(x + 1, y + 8, C_GRAY); + draw_pixel(x + 8, y + 8, C_GRAY); + draw_hline(x + 2, y + 9, 6, C_GRAY); +} + +/* + * Draw a LED inside a 10x10 circular bracket. + */ +static inline void draw_led(const unsigned x, const unsigned y, + const uint32_t col) +{ + int i; + + for (i = 1; i < 9; i++) { + if (i == 1 || i == 8) + draw_hline(x + 2, y + i, 6, col); + else + draw_hline(x + 1, y + i, 8, col); + } +} + +/* + * CPU status displays: + * + * Z80 CPU using font20 (10 x 20 pixels): + * + * 01234567890123456789012 + * 0 A xx BC xxxx DE xxxx + * 1 HL xxxx SP xxxx PC xxxx + * 2 IX xxxx IY xxxx AF'xxxx + * 3 BC'xxxx DE'xxxx HL'xxxx + * 4 F SZHPNC IF12 IR xxxx + * Model x.x o xx.xx°C + * + * 8080 CPU using font28 (14 x 28 pixels): + * + * 0123456789012345 + * 0 A xx BC xxxx + * 1 DE xxxx HL xxxx + * 2 SP xxxx PC xxxx + * 3 F SZHPC IF 1 + * Model x.x o xx.xx°C + */ + +typedef struct reg { + uint8_t x; + uint8_t y; + enum { RB, RW, RF, RI, RA, RR } type; + const char *l; + union { + struct { + const BYTE *p; + } b; + struct { + const WORD *p; + } w; + struct { + char c; + uint8_t m; + } f; + }; +} reg_t; + +#ifndef EXCLUDE_Z80 + +#define XOFF20 5 /* x pixel offset of text grid for font20 */ +#define YOFF20 0 /* y pixel offset of text grid for font20 */ +#define SPC20 3 /* vertical text spacing for font20 */ + +static const reg_t regs_z80[] = { + { 4, 0, RB, "A", .b.p = &A }, + { 12, 0, RB, "BC", .b.p = &B }, + { 14, 0, RB, NULL, .b.p = &C }, + { 20, 0, RB, "DE", .b.p = &D }, + { 22, 0, RB, NULL, .b.p = &E }, + { 4, 1, RB, "HL", .b.p = &H }, + { 6, 1, RB, NULL, .b.p = &L }, + { 14, 1, RW, "SP", .w.p = &SP }, + { 22, 1, RW, "PC", .w.p = &PC }, + { 6, 2, RW, "IX", .w.p = &IX }, + { 14, 2, RW, "IY", .w.p = &IY }, + { 20, 2, RB, "AF\'", .b.p = &A_ }, + { 22, 2, RA, NULL, .b.p = NULL }, + { 4, 3, RB, "BC\'", .b.p = &B_ }, + { 6, 3, RB, NULL, .b.p = &C_ }, + { 12, 3, RB, "DE\'", .b.p = &D_ }, + { 14, 3, RB, NULL, .b.p = &E_ }, + { 20, 3, RB, "HL\'", .b.p = &H_ }, + { 22, 3, RB, NULL, .b.p = &L_ }, + { 3, 4, RF, NULL, .f.c = 'S', .f.m = S_FLAG }, + { 4, 4, RF, "F", .f.c = 'Z', .f.m = Z_FLAG }, + { 5, 4, RF, NULL, .f.c = 'H', .f.m = H_FLAG }, + { 6, 4, RF, NULL, .f.c = 'P', .f.m = P_FLAG }, + { 7, 4, RF, NULL, .f.c = 'N', .f.m = N_FLAG }, + { 8, 4, RF, NULL, .f.c = 'C', .f.m = C_FLAG }, + { 13, 4, RI, NULL, .f.c = '1', .f.m = 1 }, + { 14, 4, RI, "IF", .f.c = '2', .f.m = 2 }, + { 20, 4, RB, "IR", .b.p = &I }, + { 22, 4, RR, NULL, .b.p = NULL } +}; +static const int num_regs_z80 = sizeof(regs_z80) / sizeof(reg_t); + +#endif /* !EXCLUDE_Z80 */ + +#ifndef EXCLUDE_I8080 + +#define XOFF28 8 /* x pixel offset of text grid for font28 */ +#define YOFF28 0 /* y pixel offset of text grid for font28 */ +#define SPC28 1 /* vertical text spacing for font28 */ + +static const reg_t regs_8080[] = { + { 4, 0, RB, "A", .b.p = &A }, + { 13, 0, RB, "BC", .b.p = &B }, + { 15, 0, RB, NULL, .b.p = &C }, + { 4, 1, RB, "DE", .b.p = &D }, + { 6, 1, RB, NULL, .b.p = &E }, + { 13, 1, RB, "HL", .b.p = &H }, + { 15, 1, RB, NULL, .b.p = &L }, + { 6, 2, RW, "SP", .w.p = &SP }, + { 15, 2, RW, "PC", .w.p = &PC }, + { 3, 3, RF, NULL, .f.c = 'S', .f.m = S_FLAG }, + { 4, 3, RF, "F", .f.c = 'Z', .f.m = Z_FLAG }, + { 5, 3, RF, NULL, .f.c = 'H', .f.m = H_FLAG }, + { 6, 3, RF, NULL, .f.c = 'P', .f.m = P_FLAG }, + { 7, 3, RF, NULL, .f.c = 'C', .f.m = C_FLAG }, + { 15, 3, RI, "IF", .f.c = '1', .f.m = 3 } +}; +static const int num_regs_8080 = sizeof(regs_8080) / sizeof(reg_t); + +#endif /* !EXCLUDE_I8080 */ + +/* + * Refresh the display buffer + */ +static void refresh(bool tick) +{ + char c; + int i, j, f, digit, n = 0; + bool onlyz; + unsigned x, y; + WORD w; + const char *s; + const reg_t *rp = NULL; + draw_grid_t grid = { }; + int cpu_type = cpu; + uint64_t t; + static int freq; + + /* use cpu_type in the rest of this function, since cpu can change */ + +#ifndef EXCLUDE_Z80 + if (cpu_type == Z80) { + rp = regs_z80; + n = num_regs_z80; + } +#endif +#ifndef EXCLUDE_I8080 + if (cpu_type == I8080) { + rp = regs_8080; + n = num_regs_8080; + } +#endif + + draw_clear(C_DKBLUE); + + /* setup text grid and draw grid lines */ +#ifndef EXCLUDE_Z80 + if (cpu_type == Z80) { + draw_setup_grid(&grid, XOFF20, YOFF20, -1, 5, &font20, + SPC20); + + /* draw vertical grid lines */ + draw_grid_vline(7, 0, 4, &grid, C_DKYELLOW); + draw_grid_vline(10, 4, 1, &grid, C_DKYELLOW); + draw_grid_vline(15, 0, 5, &grid, C_DKYELLOW); + /* draw horizontal grid lines */ + for (i = 1; i < 5; i++) + draw_grid_hline(0, i, grid.cols, &grid, + C_DKYELLOW); + } +#endif +#ifndef EXCLUDE_I8080 + if (cpu_type == I8080) { + draw_setup_grid(&grid, XOFF28, YOFF28, -1, 4, &font28, + SPC28); + + /* draw vertical grid line */ + draw_grid_vline(8, 0, 4, &grid, C_DKYELLOW); + /* draw horizontal grid lines */ + for (i = 1; i < 4; i++) + draw_grid_hline(0, i, grid.cols, &grid, + C_DKYELLOW); + } +#endif + /* draw register labels & contents */ + for (i = 0; i < n; rp++, i++) { + if ((s = rp->l) != NULL) { + x = rp->x - (rp->type == RW ? 6 : 4); + if (rp->type == RI) + x++; + while (*s) + draw_grid_char(x++, rp->y, *s++, &grid, + C_WHITE, C_DKBLUE); + } + switch (rp->type) { + case RB: /* byte sized register */ + w = *(rp->b.p); + j = 2; + break; + case RW: /* word sized register */ + w = *(rp->w.p); + j = 4; + break; + case RF: /* flags */ + draw_grid_char(rp->x, rp->y, rp->f.c, &grid, + (F & rp->f.m) ? C_GREEN : C_RED, + C_DKBLUE); + continue; + case RI: /* interrupt register */ + draw_grid_char(rp->x, rp->y, rp->f.c, &grid, + (IFF & rp->f.m) == rp->f.m ? + C_GREEN : C_RED, C_DKBLUE); + continue; +#ifndef EXCLUDE_Z80 + case RA: /* alternate flags (int) */ + w = F_; + j = 2; + break; + case RR: /* refresh register */ + w = (R_ & 0x80) | (R & 0x7f); + j = 2; + break; +#endif + default: + continue; + } + x = rp->x; + while (j--) { + c = w & 0xf; + c += (c < 10 ? '0' : 'A' - 10); + draw_grid_char(x--, rp->y, c, &grid, C_GREEN, + C_DKBLUE); + w >>= 4; + } + } + + y = ysize - font20.height; + n = xsize / font20.width; + x = (xsize - n * font20.width) / 2; + + /* draw product info */ + s = "Z80pack " RELEASE; + for (i = 0; *s; i++) + draw_char(i * font20.width + x, y, *s++, &font20, + C_ORANGE, C_DKBLUE); + + /* draw frequency label */ + draw_char((n - 6) * font20.width + x, y, '.', &font20, + C_ORANGE, C_DKBLUE); + draw_char((n - 3) * font20.width + x, y, 'M', &font20, + C_ORANGE, C_DKBLUE); + draw_char((n - 2) * font20.width + x, y, 'H', &font20, + C_ORANGE, C_DKBLUE); + draw_char((n - 1) * font20.width + x, y, 'z', &font20, + C_ORANGE, C_DKBLUE); + + /* update frequency every second */ + if (tick) { + t = cpu_time; + if (cpu_state == ST_CONTIN_RUN || cpu_state == ST_SINGLE_STEP) + t += get_clock_us() - cpu_start; + if (t) + freq = (int) ((float) T / (float) t * 100.0); + } + f = freq; + digit = 100000; + onlyz = true; + for (i = 0; i < 7; i++) { + c = '0'; + while (f > digit) { + f -= digit; + c++; + } + if (onlyz && i < 3 && c == '0') + c = ' '; + else + onlyz = false; + draw_char((n - 10 + i) * font20.width + x, y, + c, &font20, C_ORANGE, C_DKBLUE); + if (i < 6) + digit /= 10; + if (i == 3) + i++; /* skip decimal point */ + } +} + +#ifdef WANT_SDL + +/* function for updating the display */ +static void update_display(bool tick) +{ + SDL_LockTexture(texture, NULL, (void **) &pixels, &pitch); + pitch /= 4; + refresh(tick); + SDL_UnlockTexture(texture); + SDL_RenderCopy(renderer, texture, NULL, NULL); + SDL_RenderPresent(renderer); +} + +static win_funcs_t panel_funcs = { + open_display, + close_display, + process_event, + update_display +}; + +#else /* !WANT_SDL */ + +static void kill_thread(void) +{ + if (thread != 0) { + sleep_for_ms(50); + pthread_cancel(thread); + pthread_join(thread, NULL); + thread = 0; + } +} + +/* thread for updating the display */ +static void *update_display(void *arg) +{ + uint64_t t1, t2, ttick; + int tdiff; + bool tick = true; + + UNUSED(arg); + + t1 = get_clock_us(); + ttick = t1 + 1000000; + + while (true) { + + /* lock display, don't cancel thread while locked */ + pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL); + XLockDisplay(display); + + /* process X11 event queue */ + process_events(); + + /* update display window */ + refresh(tick); + XPutImage(display, window, gc, ximage, 0, 0, 0, 0, + xsize, ysize); + XSync(display, False); + + /* unlock display, thread can be canceled again */ + XUnlockDisplay(display); + pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL); + + t2 = get_clock_us(); + + /* update seconds tick */ + if ((tick = (t2 >= ttick))) + ttick = t2 + 1000000; + + /* sleep rest to 16667us so that we get 60 fps */ + tdiff = t2 - t1; + if ((tdiff > 0) && (tdiff < 16667)) + sleep_for_us(16667 - tdiff); + + t1 = get_clock_us(); + } + + /* just in case it ever gets here */ + pthread_exit(NULL); +} + +#endif /* !WANT_SDL */ + +void init_panel(void) +{ +#ifdef WANT_SDL + if (panel_win_id < 0) + panel_win_id = simsdl_create(&panel_funcs); +#else + if (display == NULL) { + open_display(); + + if (pthread_create(&thread, NULL, update_display, (void *) NULL)) { + LOGE(TAG, "can't create thread"); + exit(EXIT_FAILURE); + } + } +#endif +} + +void exit_panel(void) +{ +#ifdef WANT_SDL + if (panel_win_id >= 0) { + simsdl_destroy(panel_win_id); + panel_win_id = -1; + } +#else /* !WANT_SDL */ + kill_thread(); + if (display != NULL) + close_display(); +#endif /* !WANT_SDL */ +} diff --git a/z80core/simpanel.h b/z80core/simpanel.h new file mode 100644 index 00000000..3b4f2f52 --- /dev/null +++ b/z80core/simpanel.h @@ -0,0 +1,13 @@ +/* + * Z80SIM - a Z80-CPU simulator + * + * Copyright (C) 2025 by Thomas Eberhardt + */ + +#ifndef SIMPANEL_INC +#define SIMPANEL_INC + +extern void init_panel(void); +extern void exit_panel(void); + +#endif /* !SIMPANEL_INC */ diff --git a/z80core/simsdl.c b/z80core/simsdl.c index 9e50d782..1c3e90b8 100644 --- a/z80core/simsdl.c +++ b/z80core/simsdl.c @@ -64,6 +64,9 @@ int main(int argc, char *argv[]) } if (Mix_OpenAudio(44100, MIX_DEFAULT_FORMAT, 2, 2048) < 0) { fprintf(stderr, "Can't initialize SDL_mixer: %s\n", Mix_GetError()); + IMG_Quit(); + SDL_Quit(); + return EXIT_FAILURE; } #endif @@ -80,7 +83,7 @@ int main(int argc, char *argv[]) return EXIT_FAILURE; } - tick = false; + tick = true; t1 = SDL_GetTicks64() + 1000; while (!quit) { /* process event queue */ @@ -109,12 +112,9 @@ int main(int argc, char *argv[]) } /* update seconds tick */ - tick = false; t2 = SDL_GetTicks64(); - if (t2 >= t1) { - tick = true; + if ((tick = (t2 >= t1))) t1 = t2 + 1000; - } if (sim_finished) quit = true; diff --git a/z80core/simz80-cb.c b/z80core/simz80-cb.c index c16fe4cf..221d04ce 100644 --- a/z80core/simz80-cb.c +++ b/z80core/simz80-cb.c @@ -18,7 +18,6 @@ #ifdef FRONTPANEL #include "frontpanel.h" -#include "simport.h" #endif #if !defined(EXCLUDE_Z80) && !defined(ALT_Z80) @@ -372,9 +371,6 @@ int op_cb_handle(void) #undef UNDOC register int t; -#ifdef FRONTPANEL - uint64_t clk; -#endif #ifdef BUS_8080 /* M1 opcode fetch */ @@ -383,11 +379,9 @@ int op_cb_handle(void) #endif #ifdef FRONTPANEL if (F_flag) { - clk = get_clock_us(); /* update frontpanel */ fp_clock++; fp_sampleLightGroup(0, 0); - cpu_time -= get_clock_us() - clk; } #endif diff --git a/z80core/simz80-dd.c b/z80core/simz80-dd.c index ccbc353e..e9654283 100644 --- a/z80core/simz80-dd.c +++ b/z80core/simz80-dd.c @@ -19,7 +19,6 @@ #ifdef FRONTPANEL #include "frontpanel.h" -#include "simport.h" #endif #if !defined(EXCLUDE_Z80) && !defined(ALT_Z80) @@ -339,9 +338,6 @@ int op_dd_handle(void) #undef UNDOC register int t; -#ifdef FRONTPANEL - uint64_t clk; -#endif #ifdef BUS_8080 /* M1 opcode fetch */ @@ -350,11 +346,9 @@ int op_dd_handle(void) #endif #ifdef FRONTPANEL if (F_flag) { - clk = get_clock_us(); /* update frontpanel */ fp_clock++; fp_sampleLightGroup(0, 0); - cpu_time -= get_clock_us() - clk; } #endif diff --git a/z80core/simz80-ed.c b/z80core/simz80-ed.c index 386535f4..d42b373d 100644 --- a/z80core/simz80-ed.c +++ b/z80core/simz80-ed.c @@ -19,7 +19,6 @@ #ifdef FRONTPANEL #include "frontpanel.h" -#include "simport.h" #endif #if !defined(EXCLUDE_Z80) && !defined(ALT_Z80) @@ -321,9 +320,6 @@ int op_ed_handle(void) #undef UNDOC register int t; -#ifdef FRONTPANEL - uint64_t clk; -#endif #ifdef BUS_8080 /* M1 opcode fetch */ @@ -332,11 +328,9 @@ int op_ed_handle(void) #endif #ifdef FRONTPANEL if (F_flag) { - clk = get_clock_us(); /* update frontpanel */ fp_clock++; fp_sampleLightGroup(0, 0); - cpu_time -= get_clock_us() - clk; } #endif diff --git a/z80core/simz80-fd.c b/z80core/simz80-fd.c index 9e600d3b..120c7570 100644 --- a/z80core/simz80-fd.c +++ b/z80core/simz80-fd.c @@ -19,7 +19,6 @@ #ifdef FRONTPANEL #include "frontpanel.h" -#include "simport.h" #endif #if !defined(EXCLUDE_Z80) && !defined(ALT_Z80) @@ -339,9 +338,6 @@ int op_fd_handle(void) #undef UNDOC register int t; -#ifdef FRONTPANEL - uint64_t clk; -#endif #ifdef BUS_8080 /* M1 opcode fetch */ @@ -350,11 +346,9 @@ int op_fd_handle(void) #endif #ifdef FRONTPANEL if (F_flag) { - clk = get_clock_us(); /* update frontpanel */ fp_clock++; fp_sampleLightGroup(0, 0); - cpu_time -= get_clock_us() - clk; } #endif diff --git a/z80core/simz80.c b/z80core/simz80.c index 1efc8a31..3f19002e 100644 --- a/z80core/simz80.c +++ b/z80core/simz80.c @@ -11,15 +11,16 @@ #include "simmem.h" #include "simcore.h" #include "simport.h" -#ifdef WANT_ICE -#include "simice.h" -#endif #include "simz80.h" #include "simz80-cb.h" #include "simz80-dd.h" #include "simz80-ed.h" #include "simz80-fd.h" +#ifdef WANT_ICE +#include "simice.h" +#endif + #ifdef FRONTPANEL #include "frontpanel.h" #include "simctl.h" @@ -389,12 +390,15 @@ void cpu_z80(void) uint64_t t1, t2; int tdiff; WORD p; -#ifdef FRONTPANEL - uint64_t clk; -#endif T_max = T + tmax; t1 = get_clock_us(); +#ifdef FRONTPANEL + if (F_flag) { + fp_clock++; + fp_sampleData(); + } +#endif do { @@ -444,10 +448,8 @@ void cpu_z80(void) if (bus_request) { /* DMA bus request */ #ifdef FRONTPANEL if (F_flag) { - clk = get_clock_us(); fp_clock += 1000; fp_sampleData(); - cpu_time -= get_clock_us() - clk; } #endif if (dma_bus_master) { @@ -465,10 +467,8 @@ void cpu_z80(void) } #ifdef FRONTPANEL if (F_flag) { - clk = get_clock_us(); fp_clock += 1000; fp_sampleData(); - cpu_time -= get_clock_us() - clk; } #endif } @@ -499,13 +499,11 @@ void cpu_z80(void) #endif #ifdef FRONTPANEL if (F_flag) { - clk = get_clock_us(); fp_clock += 1000; fp_led_data = (int_data != -1) ? (BYTE) int_data : 0xff; fp_sampleData(); wait_int_step(); - cpu_time -= get_clock_us() - clk; if (cpu_state & ST_RESET) goto leave; } @@ -652,12 +650,10 @@ void cpu_z80(void) #endif #ifdef FRONTPANEL if (F_flag) { - clk = get_clock_us(); fp_led_address = PC; fp_led_data = getmem(PC); fp_clock++; fp_sampleData(); - cpu_time -= get_clock_us() - clk; } #endif #ifdef SIMPLEPANEL @@ -675,13 +671,9 @@ static int op_nop(void) /* NOP */ static int op_halt(void) /* HALT */ { - uint64_t clk; - #ifdef BUS_8080 cpu_bus = CPU_WO | CPU_HLTA | CPU_MEMR; #endif - - clk = get_clock_us(); #ifdef FRONTPANEL if (!F_flag) { #endif @@ -701,9 +693,7 @@ static int op_halt(void) /* HALT */ if (int_int) cpu_bus = CPU_INTA | CPU_WO | CPU_HLTA | CPU_M1; #endif - busy_loop_cnt = 0; - #ifdef FRONTPANEL } else { fp_led_address = 0xffff; @@ -740,9 +730,7 @@ static int op_halt(void) /* HALT */ } } } -#endif - cpu_time -= get_clock_us() - clk; - +#endif /* FRONTPANEL */ return 4; } diff --git a/z80sim/srcsim/Makefile b/z80sim/srcsim/Makefile index 686cb1d3..6185dffa 100644 --- a/z80sim/srcsim/Makefile +++ b/z80sim/srcsim/Makefile @@ -4,6 +4,10 @@ # (simple) machine name - will be suffixed with 'sim' # and the executable saved as '../machinesim' MACHINE = z80 +# show an introspection panel +INFOPANEL ?= NO +# use SDL2 instead of X11 +WANT_SDL ?= NO # machine specific system source files MACHINE_SRCS = simcfg.c simio.c simmem.c simctl.c # machine specific I/O source files @@ -32,8 +36,48 @@ VPATH = $(CORE_DIR) $(IO_DIR) include $(CORE_DIR)/Makefile.in-os -DEFS = -INCS = -I. -I$(CORE_DIR) -I$(IO_DIR) +### +### SDL2/X11 INFOPANEL PLATFORM VARIABLES +### +ifeq ($(INFOPANEL),YES) +ifeq ($(WANT_SDL),YES) +PLAT_DEFS = -DINFOPANEL -DWANT_SDL +PLAT_SRCS = simpanel.c simsdl.c +ifeq ($(TARGET_OS),BSD) +PLAT_INCS = -I/usr/local/include/SDL2 +PLAT_LDFLAGS = -L/usr/local/lib +PLAT_LDLIBS = -lSDL2 -lSDL2main +else ifeq ($(TARGET_OS),LINUX) +PLAT_INCS = -I/usr/include/SDL2 +PLAT_LDLIBS = -lSDL2 -lSDL2main +else ifeq ($(TARGET_OS),OSX) +PLAT_INCS = -F/Library/Frameworks -I/Library/Frameworks/SDL2.framework/Headers +PLAT_LDFLAGS = -Wl,-search_paths_first -Wl,-headerpad_max_install_names \ + -Wl,-rpath,/Library/Frameworks +PLAT_LDLIBS = -framework SDL2 +endif +else +PLAT_DEFS = -DINFOPANEL +PLAT_SRCS = simpanel.c +ifeq ($(TARGET_OS),BSD) +PLAT_INCS = -I/usr/local/include +PLAT_LDFLAGS = -L/usr/local/lib +PLAT_LDLIBS = -lX11 -lpthread +else ifeq ($(TARGET_OS),LINUX) +PLAT_LDLIBS = -lX11 -lpthread +else ifeq ($(TARGET_OS),OSX) +PLAT_INCS = -I/opt/X11/include -I/opt/local/include -I/usr/local/include +PLAT_LDFLAGS = -L/opt/X11/lib -L/usr/local/lib +PLAT_LDLIBS = -lX11 -lpthread +endif +endif +endif +### +### END INFOPANEL SDL2/X11 PLATFORM VARIABLES +### + +DEFS = $(PLAT_DEFS) +INCS = -I. -I$(CORE_DIR) -I$(IO_DIR) $(PLAT_INCS) CPPFLAGS = $(DEFS) $(INCS) CSTDS = -std=c99 -D_DEFAULT_SOURCE # -D_XOPEN_SOURCE=700L @@ -54,8 +98,8 @@ endif CFLAGS = $(CSTDS) $(COPTS) $(CWARNS) -LDFLAGS = -LDLIBS = +LDFLAGS = $(PLAT_LD_FLAGS) +LDLIBS = $(PLAT_LDLIBS) INSTALL = install INSTALL_PROGRAM = $(INSTALL) @@ -65,7 +109,7 @@ INSTALL_DATA = $(INSTALL) -m 644 CORE_SRCS = sim8080.c simcore.c simdis.c simfun.c simglb.c simice.c simint.c \ simmain.c simz80.c simz80-cb.c simz80-dd.c simz80-ddcb.c simz80-ed.c \ simz80-fd.c simz80-fdcb.c -SRCS = $(CORE_SRCS) $(MACHINE_SRCS) $(IO_SRCS) +SRCS = $(CORE_SRCS) $(MACHINE_SRCS) $(IO_SRCS) $(PLAT_SRCS) OBJS = $(SRCS:.c=.o) DEPS = $(SRCS:.c=.d) From adfa77c04e97f52c72cda4e09eb3db1a4cbc47e5 Mon Sep 17 00:00:00 2001 From: Thomas Eberhardt Date: Tue, 21 Jan 2025 12:10:22 +0100 Subject: [PATCH 02/22] forget to add comment that is in imsaisim --- altairsim/srcsim/simctl.c | 2 +- cromemcosim/srcsim/simctl.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/altairsim/srcsim/simctl.c b/altairsim/srcsim/simctl.c index 862a8e47..a3417f99 100644 --- a/altairsim/srcsim/simctl.c +++ b/altairsim/srcsim/simctl.c @@ -280,7 +280,7 @@ static void run_clicked(int state, int val) switch (state) { case FP_SW_DOWN: if (cpu_state != ST_CONTIN_RUN) { - cpu_state = ST_STOPPED; + cpu_state = ST_STOPPED; /* get out of ST_SINGLE_STEP */ fp_led_wait = 0; cpu_switch = CPUSW_RUN; } diff --git a/cromemcosim/srcsim/simctl.c b/cromemcosim/srcsim/simctl.c index a9099942..c94cfac9 100644 --- a/cromemcosim/srcsim/simctl.c +++ b/cromemcosim/srcsim/simctl.c @@ -286,7 +286,7 @@ static void run_clicked(int state, int val) switch (state) { case FP_SW_UP: if (cpu_state != ST_CONTIN_RUN) { - cpu_state = ST_STOPPED; + cpu_state = ST_STOPPED; /* get out of ST_SINGLE_STEP */ fp_led_wait = 0; cpu_switch = CPUSW_RUN; } From 8ef33c12fe11e709557473de6dca4c83422ee4f2 Mon Sep 17 00:00:00 2001 From: Thomas Eberhardt Date: Tue, 21 Jan 2025 13:05:52 +0100 Subject: [PATCH 03/22] fix typo in Makefile's, add back HALT and I/O ports cpu time adjustments Still not right with the frequency in cpmsim, working on it. --- altairsim/srcsim/simctl.c | 4 ++-- cpmsim/srcsim/Makefile | 2 +- cromemcosim/srcsim/simctl.c | 4 ++-- imsaisim/srcsim/simctl.c | 4 ++-- mosteksim/srcsim/Makefile | 2 +- z80core/alt8080.h | 3 +++ z80core/altz80.h | 3 +++ z80core/sim8080.c | 8 ++++++-- z80core/simcore.c | 10 ++++++++++ z80core/simglb.c | 2 +- z80core/simglb.h | 2 +- z80core/simz80.c | 8 ++++++-- z80sim/srcsim/Makefile | 2 +- 13 files changed, 39 insertions(+), 15 deletions(-) diff --git a/altairsim/srcsim/simctl.c b/altairsim/srcsim/simctl.c index a3417f99..c9611629 100644 --- a/altairsim/srcsim/simctl.c +++ b/altairsim/srcsim/simctl.c @@ -355,7 +355,7 @@ bool wait_step(void) sleep_for_ms(10); ret = true; t2 = get_clock_us(); - cpu_time -= t2 - t1; + cpu_start += t2 - t1; t1 = t2; } @@ -382,7 +382,7 @@ void wait_int_step(void) fp_sampleData(); sleep_for_ms(10); t2 = get_clock_us(); - cpu_time -= t2 - t1; + cpu_start += t2 - t1; t1 = t2; } } diff --git a/cpmsim/srcsim/Makefile b/cpmsim/srcsim/Makefile index 770ae897..60a1272b 100644 --- a/cpmsim/srcsim/Makefile +++ b/cpmsim/srcsim/Makefile @@ -103,7 +103,7 @@ endif CFLAGS = $(CSTDS) $(COPTS) $(CWARNS) -LDFLAGS = $(PLAT_LD_FLAGS) +LDFLAGS = $(PLAT_LDFLAGS) LDLIBS = $(PLAT_LDLIBS) INSTALL = install diff --git a/cromemcosim/srcsim/simctl.c b/cromemcosim/srcsim/simctl.c index c94cfac9..b1063d86 100644 --- a/cromemcosim/srcsim/simctl.c +++ b/cromemcosim/srcsim/simctl.c @@ -360,7 +360,7 @@ bool wait_step(void) sleep_for_ms(10); ret = true; t2 = get_clock_us(); - cpu_time -= t2 - t1; + cpu_start += t2 - t1; t1 = t2; } @@ -387,7 +387,7 @@ void wait_int_step(void) fp_sampleData(); sleep_for_ms(10); t2 = get_clock_us(); - cpu_time -= t2 - t1; + cpu_start += t2 - t1; t1 = t2; } } diff --git a/imsaisim/srcsim/simctl.c b/imsaisim/srcsim/simctl.c index 09b7b1c0..0200a245 100644 --- a/imsaisim/srcsim/simctl.c +++ b/imsaisim/srcsim/simctl.c @@ -361,7 +361,7 @@ bool wait_step(void) sleep_for_ms(10); ret = true; t2 = get_clock_us(); - cpu_time -= t2 - t1; + cpu_start += t2 - t1; t1 = t2; } @@ -388,7 +388,7 @@ void wait_int_step(void) fp_sampleData(); sleep_for_ms(10); t2 = get_clock_us(); - cpu_time -= t2 - t1; + cpu_start += t2 - t1; t1 = t2; } } diff --git a/mosteksim/srcsim/Makefile b/mosteksim/srcsim/Makefile index 625b3016..c2b4a39e 100644 --- a/mosteksim/srcsim/Makefile +++ b/mosteksim/srcsim/Makefile @@ -106,7 +106,7 @@ endif CFLAGS = $(CSTDS) $(COPTS) $(CWARNS) -LDFLAGS = $(PLAT_LD_FLAGS) +LDFLAGS = $(PLAT_LDFLAGS) LDLIBS = $(PLAT_LDLIBS) INSTALL = install diff --git a/z80core/alt8080.h b/z80core/alt8080.h index 1c179001..bc62eea4 100644 --- a/z80core/alt8080.h +++ b/z80core/alt8080.h @@ -76,6 +76,7 @@ BYTE t, res, cout, P; cpu_reg_t w; /* working register */ + uint64_t clk; #define W w.w #define WH w.h @@ -739,6 +740,7 @@ break; case 0x76: /* HLT */ + clk = get_clock_us(); #ifdef BUS_8080 cpu_bus = CPU_WO | CPU_HLTA | CPU_MEMR; #endif @@ -797,6 +799,7 @@ } } #endif /* FRONTPANEL */ + cpu_start += get_clock_us() - clk; t += 3; break; diff --git a/z80core/altz80.h b/z80core/altz80.h index fdc8d6fa..52b1334c 100644 --- a/z80core/altz80.h +++ b/z80core/altz80.h @@ -85,6 +85,7 @@ #endif cpu_reg_t w; /* working register */ cpu_reg_t ir; /* current index register (HL, IX, IY) */ + uint64_t clk; #define W w.w #define WH w.h @@ -801,6 +802,7 @@ break; case 0x76: /* HALT */ + clk = get_clock_us(); #ifdef BUS_8080 cpu_bus = CPU_WO | CPU_HLTA | CPU_MEMR; #endif @@ -863,6 +865,7 @@ } } #endif /* FRONTPANEL */ + cpu_start += get_clock_us() - clk; break; case 0x77: /* LD (ir),A */ diff --git a/z80core/sim8080.c b/z80core/sim8080.c index 8d7b4645..4f61dbe6 100644 --- a/z80core/sim8080.c +++ b/z80core/sim8080.c @@ -454,7 +454,7 @@ void cpu_8080(void) without BUS_ACK */ T += (T_dma = (*dma_bus_master)(0)); if (f_value) - cpu_time += T_dma / f_value; + cpu_start -= T_dma / f_value; } } @@ -470,7 +470,7 @@ void cpu_8080(void) with BUS_ACK */ T += (T_dma = (*dma_bus_master)(1)); if (f_value) - cpu_time += T_dma / f_value; + cpu_start -= T_dma / f_value; } /* FOR NOW - MAY BE NEED A PRIORITY SYSTEM LATER */ @@ -663,6 +663,9 @@ static int op_nop(void) /* NOP */ static int op_hlt(void) /* HLT */ { + uint64_t clk; + + clk = get_clock_us(); #ifdef BUS_8080 cpu_bus = CPU_WO | CPU_HLTA | CPU_MEMR; #endif @@ -718,6 +721,7 @@ static int op_hlt(void) /* HLT */ } } #endif /* FRONTPANEL */ + cpu_start += get_clock_us() - clk; return 7; } diff --git a/z80core/simcore.c b/z80core/simcore.c index e6500dff..c2f4a7ad 100644 --- a/z80core/simcore.c +++ b/z80core/simcore.c @@ -249,6 +249,7 @@ void report_cpu_stats(void) */ BYTE io_in(BYTE addrl, BYTE addrh) { + uint64_t clk; #ifdef FRONTPANEL bool val; #else @@ -257,6 +258,8 @@ BYTE io_in(BYTE addrl, BYTE addrh) #endif #endif + clk = get_clock_us(); + io_port = addrl; if (port_in[addrl]) io_data = (*port_in[addrl])(); @@ -296,6 +299,8 @@ BYTE io_in(BYTE addrl, BYTE addrh) LOGD(TAG, "input %02x from port %02x", io_data, io_port); + cpu_start += get_clock_us() - clk; + return io_data; } @@ -306,10 +311,13 @@ BYTE io_in(BYTE addrl, BYTE addrh) */ void io_out(BYTE addrl, BYTE addrh, BYTE data) { + uint64_t clk; #if !defined(FRONTPANEL) && !defined(SIMPLEPANEL) UNUSED(addrh); #endif + clk = get_clock_us(); + io_port = addrl; io_data = data; @@ -347,6 +355,8 @@ void io_out(BYTE addrl, BYTE addrh, BYTE data) #ifdef IOPANEL port_flags[addrl].out = true; #endif + + cpu_start += get_clock_us() - clk; } /* diff --git a/z80core/simglb.c b/z80core/simglb.c index ff081855..3a941ac4 100644 --- a/z80core/simglb.c +++ b/z80core/simglb.c @@ -40,7 +40,7 @@ BYTE IFF; /* interrupt flags */ cpu_regs_t cpu_regs; /* CPU registers */ #endif Tstates_t T; /* CPU clock */ -uint64_t cpu_start; /* timestamp at start of CPU run/step */ +int64_t cpu_start; /* timestamp at start of CPU run/step */ int64_t cpu_time; /* time spent running CPU in us */ #ifdef BUS_8080 diff --git a/z80core/simglb.h b/z80core/simglb.h index b9d97814..5c5870ce 100644 --- a/z80core/simglb.h +++ b/z80core/simglb.h @@ -32,7 +32,7 @@ extern BYTE IFF; #include "altregs.h" #endif extern Tstates_t T; -extern uint64_t cpu_start; +extern int64_t cpu_start; extern int64_t cpu_time; #ifdef BUS_8080 diff --git a/z80core/simz80.c b/z80core/simz80.c index 3f19002e..76280692 100644 --- a/z80core/simz80.c +++ b/z80core/simz80.c @@ -441,7 +441,7 @@ void cpu_z80(void) without BUS_ACK */ T += (T_dma = (*dma_bus_master)(0)); if (f_value) - cpu_time += T_dma / f_value; + cpu_start -= T_dma / f_value; } } @@ -457,7 +457,7 @@ void cpu_z80(void) with BUS_ACK */ T += (T_dma = (*dma_bus_master)(1)); if (f_value) - cpu_time += T_dma / f_value; + cpu_start -= T_dma / f_value; } /* FOR NOW - MAY BE NEED A PRIORITY SYSTEM LATER */ @@ -671,6 +671,9 @@ static int op_nop(void) /* NOP */ static int op_halt(void) /* HALT */ { + uint64_t clk; + + clk = get_clock_us(); #ifdef BUS_8080 cpu_bus = CPU_WO | CPU_HLTA | CPU_MEMR; #endif @@ -731,6 +734,7 @@ static int op_halt(void) /* HALT */ } } #endif /* FRONTPANEL */ + cpu_start += get_clock_us() - clk; return 4; } diff --git a/z80sim/srcsim/Makefile b/z80sim/srcsim/Makefile index 6185dffa..483c7ac6 100644 --- a/z80sim/srcsim/Makefile +++ b/z80sim/srcsim/Makefile @@ -98,7 +98,7 @@ endif CFLAGS = $(CSTDS) $(COPTS) $(CWARNS) -LDFLAGS = $(PLAT_LD_FLAGS) +LDFLAGS = $(PLAT_LDFLAGS) LDLIBS = $(PLAT_LDLIBS) INSTALL = install From 7a4136222e584628dc0cc5b53254b77001864e14 Mon Sep 17 00:00:00 2001 From: Thomas Eberhardt Date: Wed, 22 Jan 2025 09:06:32 +0100 Subject: [PATCH 04/22] time/timing code rework Changed get_clock_us() to ensure time doesn't go backwards. Happens a lot in intelmdssim, probably because of a lot of really close (timewise) calls in the 260us loop in the timing/interrupt thread. Removed checks in the code for negative time differences. This uncovered a bug in altair-88-sio.c, altair-88-2sio.c and imsai-sio2.c. Added a reset function for these that initialize the timing variables. It previously worked only because of integer arithmetic overflows. We really should be using something like clock_gettime(CLOCK_MONOTONIC,...) for time measurements. The global variable cpu_tadj accumulates time spend doing stuff not related to the CPU core. This is currently done in io_in()/io_out() and wait_step()/wait_int_step() and HALT/HLT. Added a parameter to wait_step() to not calculate a time adjustment. Needed for io_in()/io_out() since they also calclate an adjustment. This caused the wild frequency estimation jumps before. Timing is now calculated in cpu_8080()/cpu_z80() in the speed adjustment code block (which is now also used for timing calculations when f_value=0 every 100000 T-states) and at the end of these functions. Redid the timing code in all loops what repeat at a specific interval, so they all use equal code for this. --- altairsim/srcsim/simctl.c | 20 ++++++++-------- altairsim/srcsim/simctl.h | 2 +- altairsim/srcsim/simio.c | 5 ++++ altairsim/srcsim/simmem.h | 4 ++-- cpmsim/srcsim/simio.c | 5 +++- cromemcosim/srcsim/simctl.c | 20 ++++++++-------- cromemcosim/srcsim/simctl.h | 2 +- cromemcosim/srcsim/simmem.h | 4 ++-- imsaisim/srcsim/simctl.c | 20 ++++++++-------- imsaisim/srcsim/simctl.h | 2 +- imsaisim/srcsim/simio.c | 2 ++ imsaisim/srcsim/simmem.h | 4 ++-- intelmdssim/srcsim/simctl.c | 4 +++- intelmdssim/srcsim/simctl.h | 2 +- intelmdssim/srcsim/simio.c | 14 +++++++----- iodevices/altair-88-2sio.c | 24 ++++++++++++-------- iodevices/altair-88-2sio.h | 2 ++ iodevices/altair-88-sio.c | 24 ++++++++++++-------- iodevices/altair-88-sio.h | 2 ++ iodevices/cromemco-88ccc.c | 15 ++++++------ iodevices/cromemco-dazzler.c | 17 +++++++------- iodevices/imsai-sio2.c | 44 ++++++++++++++++-------------------- iodevices/imsai-sio2.h | 2 ++ iodevices/imsai-vio.c | 17 +++++++------- iodevices/proctec-vdm.c | 18 +++++++-------- picosim/srcsim/picosim.c | 5 +++- z80core/alt8080.h | 5 ++-- z80core/altz80.h | 5 ++-- z80core/sim8080.c | 42 ++++++++++++++++++++++------------ z80core/simcore.c | 26 ++++++++++----------- z80core/simfun.c | 13 +++++++++-- z80core/simglb.c | 8 ++++--- z80core/simglb.h | 5 ++-- z80core/simmain.c | 10 ++++++-- z80core/simpanel.c | 21 ++++++----------- z80core/simz80-dd.c | 8 ------- z80core/simz80-fd.c | 8 ------- z80core/simz80.c | 42 ++++++++++++++++++++++------------ 38 files changed, 253 insertions(+), 220 deletions(-) diff --git a/altairsim/srcsim/simctl.c b/altairsim/srcsim/simctl.c index c9611629..58b72788 100644 --- a/altairsim/srcsim/simctl.c +++ b/altairsim/srcsim/simctl.c @@ -324,10 +324,10 @@ static void step_clicked(int state, int val) /* * Single step through the machine cycles after first M1 */ -bool wait_step(void) +bool wait_step(bool tadj) { bool ret = false; - uint64_t t1, t2; + uint64_t t = 0; if (cpu_state != ST_SINGLE_STEP) { cpu_bus &= ~CPU_M1; @@ -342,7 +342,8 @@ bool wait_step(void) cpu_switch = CPUSW_STEPCYCLE; - t1 = get_clock_us(); + if (tadj) + t = get_clock_us(); while ((cpu_switch == CPUSW_STEPCYCLE) && !reset) { /* when INP update data bus LEDs */ if (cpu_bus == (CPU_WO | CPU_INP)) { @@ -354,10 +355,9 @@ bool wait_step(void) fp_sampleData(); sleep_for_ms(10); ret = true; - t2 = get_clock_us(); - cpu_start += t2 - t1; - t1 = t2; } + if (tadj) + cpu_tadj += get_clock_us() - t; cpu_bus &= ~CPU_M1; m1_step = false; @@ -369,22 +369,20 @@ bool wait_step(void) */ void wait_int_step(void) { - uint64_t t1, t2; + uint64_t t; if (cpu_state != ST_SINGLE_STEP) return; cpu_switch = CPUSW_STEPCYCLE; - t1 = get_clock_us(); + t = get_clock_us(); while ((cpu_switch == CPUSW_STEPCYCLE) && !reset) { fp_clock++; fp_sampleData(); sleep_for_ms(10); - t2 = get_clock_us(); - cpu_start += t2 - t1; - t1 = t2; } + cpu_tadj += get_clock_us() - t; } /* diff --git a/altairsim/srcsim/simctl.h b/altairsim/srcsim/simctl.h index 7e12a2c1..b3be48c9 100644 --- a/altairsim/srcsim/simctl.h +++ b/altairsim/srcsim/simctl.h @@ -14,7 +14,7 @@ extern int boot_switch; /* boot address for switch */ extern void mon(void); -extern bool wait_step(void); +extern bool wait_step(bool tadj); extern void wait_int_step(void); #endif /* !SIMCTL_INC */ diff --git a/altairsim/srcsim/simio.c b/altairsim/srcsim/simio.c index 8e05b9aa..12e79494 100644 --- a/altairsim/srcsim/simio.c +++ b/altairsim/srcsim/simio.c @@ -155,6 +155,9 @@ void init_io(void) /* create local sockets */ init_unix_server_socket(&ucons[0], "altairsim.tape"); init_unix_server_socket(&ucons[1], "altairsim.sio2"); + + altair_sio_reset(); + altair_2sio_reset(); } /* @@ -191,6 +194,8 @@ void reset_io(void) cromemco_dazzler_off(); tarbell_reset(); altair_dsk_reset(); + altair_sio_reset(); + altair_2sio_reset(); } #if 0 /* currently not used */ diff --git a/altairsim/srcsim/simmem.h b/altairsim/srcsim/simmem.h index 216020ff..5d484ed2 100644 --- a/altairsim/srcsim/simmem.h +++ b/altairsim/srcsim/simmem.h @@ -86,7 +86,7 @@ static inline void memwrt(WORD addr, BYTE data) fp_led_address = addr; fp_led_data = 0xff; fp_sampleData(); - wait_step(); + wait_step(true); } else cpu_bus &= ~CPU_M1; #endif @@ -148,7 +148,7 @@ static inline BYTE memrdr(WORD addr) fp_led_address = addr; fp_led_data = data; fp_sampleData(); - wait_step(); + wait_step(true); } else cpu_bus &= ~CPU_M1; #endif diff --git a/cpmsim/srcsim/simio.c b/cpmsim/srcsim/simio.c index 8b7f429d..8eaa2d1e 100644 --- a/cpmsim/srcsim/simio.c +++ b/cpmsim/srcsim/simio.c @@ -2076,8 +2076,11 @@ static BYTE speedl_in(void) static void speedh_out(BYTE data) { speed += data << 8; - tmax = speed * 10000; f_value = speed; + if (f_value) + tmax = speed * 10000; + else + tmax = 100000; } /* diff --git a/cromemcosim/srcsim/simctl.c b/cromemcosim/srcsim/simctl.c index b1063d86..bdf3242f 100644 --- a/cromemcosim/srcsim/simctl.c +++ b/cromemcosim/srcsim/simctl.c @@ -329,10 +329,10 @@ static void step_clicked(int state, int val) /* * Single step through the machine cycles after M1 */ -bool wait_step(void) +bool wait_step(bool tadj) { bool ret = false; - uint64_t t1, t2; + uint64_t t = 0; if (cpu_state != ST_SINGLE_STEP) { cpu_bus &= ~CPU_M1; @@ -347,7 +347,8 @@ bool wait_step(void) cpu_switch = CPUSW_STEPCYCLE; - t1 = get_clock_us(); + if (tadj) + t = get_clock_us(); while ((cpu_switch == CPUSW_STEPCYCLE) && !reset) { /* when INP update data bus LEDs */ if (cpu_bus == (CPU_WO | CPU_INP)) { @@ -359,10 +360,9 @@ bool wait_step(void) fp_sampleData(); sleep_for_ms(10); ret = true; - t2 = get_clock_us(); - cpu_start += t2 - t1; - t1 = t2; } + if (tadj) + cpu_tadj += get_clock_us() - t; cpu_bus &= ~CPU_M1; m1_step = false; @@ -374,22 +374,20 @@ bool wait_step(void) */ void wait_int_step(void) { - uint64_t t1, t2; + uint64_t t; if (cpu_state != ST_SINGLE_STEP) return; cpu_switch = CPUSW_STEPCYCLE; - t1 = get_clock_us(); + t = get_clock_us(); while ((cpu_switch == CPUSW_STEPCYCLE) && !reset) { fp_clock++; fp_sampleData(); sleep_for_ms(10); - t2 = get_clock_us(); - cpu_start += t2 - t1; - t1 = t2; } + cpu_tadj += get_clock_us() - t; } /* diff --git a/cromemcosim/srcsim/simctl.h b/cromemcosim/srcsim/simctl.h index 2687713a..afb7986b 100644 --- a/cromemcosim/srcsim/simctl.h +++ b/cromemcosim/srcsim/simctl.h @@ -12,7 +12,7 @@ extern void mon(void); -extern bool wait_step(void); +extern bool wait_step(bool tadj); extern void wait_int_step(void); #endif /* !SIMCTL_INC */ diff --git a/cromemcosim/srcsim/simmem.h b/cromemcosim/srcsim/simmem.h index 1b6b1891..9e972df9 100644 --- a/cromemcosim/srcsim/simmem.h +++ b/cromemcosim/srcsim/simmem.h @@ -104,7 +104,7 @@ static inline void memwrt(WORD addr, BYTE data) fp_led_address = addr; fp_led_data = data; fp_sampleData(); - wait_step(); + wait_step(true); } else cpu_bus &= ~CPU_M1; #endif @@ -168,7 +168,7 @@ static inline BYTE memrdr(WORD addr) fp_led_address = addr; fp_led_data = data; fp_sampleData(); - wait_step(); + wait_step(true); } else cpu_bus &= ~CPU_M1; #endif diff --git a/imsaisim/srcsim/simctl.c b/imsaisim/srcsim/simctl.c index 0200a245..21959292 100644 --- a/imsaisim/srcsim/simctl.c +++ b/imsaisim/srcsim/simctl.c @@ -330,10 +330,10 @@ static void step_clicked(int state, int val) /* * Single step through the machine cycles after M1 */ -bool wait_step(void) +bool wait_step(bool tadj) { bool ret = false; - uint64_t t1, t2; + uint64_t t = 0; if (cpu_state != ST_SINGLE_STEP) { cpu_bus &= ~CPU_M1; @@ -348,7 +348,8 @@ bool wait_step(void) cpu_switch = CPUSW_STEPCYCLE; - t1 = get_clock_us(); + if (tadj) + t = get_clock_us(); while ((cpu_switch == CPUSW_STEPCYCLE) && !reset) { /* when INP update data bus LEDs */ if (cpu_bus == (CPU_WO | CPU_INP)) { @@ -360,10 +361,9 @@ bool wait_step(void) fp_sampleData(); sleep_for_ms(10); ret = true; - t2 = get_clock_us(); - cpu_start += t2 - t1; - t1 = t2; } + if (tadj) + cpu_tadj += get_clock_us() - t; cpu_bus &= ~CPU_M1; m1_step = false; @@ -375,22 +375,20 @@ bool wait_step(void) */ void wait_int_step(void) { - uint64_t t1, t2; + uint64_t t; if (cpu_state != ST_SINGLE_STEP) return; cpu_switch = CPUSW_STEPCYCLE; - t1 = get_clock_us(); + t = get_clock_us(); while ((cpu_switch == CPUSW_STEPCYCLE) && !reset) { fp_clock++; fp_sampleData(); sleep_for_ms(10); - t2 = get_clock_us(); - cpu_start += t2 - t1; - t1 = t2; } + cpu_tadj += get_clock_us() - t; } /* diff --git a/imsaisim/srcsim/simctl.h b/imsaisim/srcsim/simctl.h index 7d04615e..4377a178 100644 --- a/imsaisim/srcsim/simctl.h +++ b/imsaisim/srcsim/simctl.h @@ -12,7 +12,7 @@ extern void mon(void); -extern bool wait_step(void); +extern bool wait_step(bool tadj); extern void wait_int_step(void); #endif /* !SIMCTL_INC */ diff --git a/imsaisim/srcsim/simio.c b/imsaisim/srcsim/simio.c index 2856ecd5..ec5e968c 100644 --- a/imsaisim/srcsim/simio.c +++ b/imsaisim/srcsim/simio.c @@ -285,6 +285,7 @@ void init_io(void) imsai_vio_init(); } + imsai_sio_reset(); imsai_fif_reset(); #ifdef HAS_DAZZLER @@ -340,6 +341,7 @@ void reset_io(void) #ifdef HAS_DAZZLER cromemco_dazzler_off(); #endif + imsai_sio_reset(); imsai_fif_reset(); #ifdef HAS_APU am_reset(am9511); diff --git a/imsaisim/srcsim/simmem.h b/imsaisim/srcsim/simmem.h index c3ad0b9c..f893c525 100644 --- a/imsaisim/srcsim/simmem.h +++ b/imsaisim/srcsim/simmem.h @@ -125,7 +125,7 @@ static inline void memwrt(WORD addr, BYTE data) fp_led_address = addr; fp_led_data = data; fp_sampleData(); - wait_step(); + wait_step(true); } else cpu_bus &= ~CPU_M1; #endif @@ -183,7 +183,7 @@ static inline BYTE memrdr(WORD addr) fp_led_address = addr; fp_led_data = data; fp_sampleData(); - wait_step(); + wait_step(true); } else cpu_bus &= ~CPU_M1; #endif diff --git a/intelmdssim/srcsim/simctl.c b/intelmdssim/srcsim/simctl.c index 3b686751..fd738a9f 100644 --- a/intelmdssim/srcsim/simctl.c +++ b/intelmdssim/srcsim/simctl.c @@ -221,8 +221,10 @@ static void int_clicked(int state, int val) /* * Single step through the machine cycles after M1 */ -bool wait_step(void) +bool wait_step(bool tadj) { + UNUSED(tadj); + cpu_bus &= ~CPU_M1; m1_step = false; return false; diff --git a/intelmdssim/srcsim/simctl.h b/intelmdssim/srcsim/simctl.h index 14724854..ed44f194 100644 --- a/intelmdssim/srcsim/simctl.h +++ b/intelmdssim/srcsim/simctl.h @@ -15,7 +15,7 @@ extern BYTE boot_switch; extern void mon(void); -extern bool wait_step(void); +extern bool wait_step(bool tadj); extern void wait_int_step(void); #endif /* !SIMCTL_INC */ diff --git a/intelmdssim/srcsim/simio.c b/intelmdssim/srcsim/simio.c index 8a44e3c1..99b957c4 100644 --- a/intelmdssim/srcsim/simio.c +++ b/intelmdssim/srcsim/simio.c @@ -458,16 +458,15 @@ static void hwctl_out(BYTE data) static void *timing(void *arg) { uint64_t t, tick; - int64_t tdiff; + long tleft; UNUSED(arg); tick = 0; + t = get_clock_us(); while (true) { /* 260 usec per loop iteration */ - t = get_clock_us(); - /* do nothing if thread is suspended */ if (th_suspend) goto next; @@ -495,11 +494,14 @@ static void *timing(void *arg) int_pending(); next: - tdiff = 260L - (get_clock_us() - t); - if (tdiff > 0) - sleep_for_us(tdiff); + /* sleep rest to 260us */ + tleft = 260L - (long) (get_clock_us() - t); + if (tleft > 0) + sleep_for_us(tleft); tick++; + + t = get_clock_us(); } /* never reached, this thread is running endless */ diff --git a/iodevices/altair-88-2sio.c b/iodevices/altair-88-2sio.c index 6dcef272..c27ad3da 100644 --- a/iodevices/altair-88-2sio.c +++ b/iodevices/altair-88-2sio.c @@ -65,6 +65,14 @@ int sio2_baud_rate = 115200; static uint64_t sio2_t1, sio2_t2; static BYTE sio2_stat; +/* + * reset Altair 88-2SIO + */ +void altair_2sio_reset(void) +{ + sio1_t1 = sio2_t1 = get_clock_us(); +} + /* * read status register * @@ -74,13 +82,11 @@ static BYTE sio2_stat; BYTE altair_sio1_status_in(void) { struct pollfd p[1]; - int tdiff; sio1_t2 = get_clock_us(); - tdiff = sio1_t2 - sio1_t1; - if (sio1_baud_rate > 0) - if ((tdiff >= 0) && (tdiff < BAUDTIME / sio1_baud_rate)) - return sio1_stat; + if (sio1_baud_rate > 0 && + (int) (sio1_t2 - sio1_t1) < BAUDTIME / sio1_baud_rate) + return sio1_stat; p[0].fd = fileno(stdin); p[0].events = POLLIN; @@ -186,7 +192,6 @@ void altair_sio1_data_out(BYTE data) BYTE altair_sio2_status_in(void) { struct pollfd p[1]; - int tdiff; /* if socket not connected check for a new connection */ if (ucons[1].ssc == 0) { @@ -205,10 +210,9 @@ BYTE altair_sio2_status_in(void) } sio2_t2 = get_clock_us(); - tdiff = sio2_t2 - sio2_t1; - if (sio2_baud_rate > 0) - if ((tdiff >= 0) && (tdiff < BAUDTIME / sio2_baud_rate)) - return sio2_stat; + if (sio2_baud_rate > 0 && + (int) (sio2_t2 - sio2_t1) < BAUDTIME / sio2_baud_rate) + return sio2_stat; /* if socket is connected check for I/O */ if (ucons[1].ssc != 0) { diff --git a/iodevices/altair-88-2sio.h b/iodevices/altair-88-2sio.h index d9b656c5..473cf841 100644 --- a/iodevices/altair-88-2sio.h +++ b/iodevices/altair-88-2sio.h @@ -41,6 +41,8 @@ extern bool sio2_strip_parity; /* SIO 2 strip parity from output */ extern bool sio2_drop_nulls; /* SIO 2 drop nulls after CR/LF */ extern int sio2_baud_rate; /* SIO 2 baud rate */ +extern void altair_2sio_reset(void); + extern BYTE altair_sio1_status_in(void); extern void altair_sio1_status_out(BYTE data); extern BYTE altair_sio1_data_in(void); diff --git a/iodevices/altair-88-sio.c b/iodevices/altair-88-sio.c index 2f8f1a51..371a0e96 100644 --- a/iodevices/altair-88-sio.c +++ b/iodevices/altair-88-sio.c @@ -60,6 +60,14 @@ int sio3_baud_rate = 1200; static uint64_t sio3_t1, sio3_t2; static BYTE sio3_stat = 0x81; +/* + * reset Altair 88-SIO + */ +void altair_sio_reset(void) +{ + sio0_t1 = sio3_t1 = get_clock_us(); +} + /* * read status register * @@ -74,7 +82,6 @@ static BYTE sio3_stat = 0x81; BYTE altair_sio0_status_in(void) { struct pollfd p[1]; - int tdiff; if (sio0_revision == 0) sio0_stat = 0; @@ -82,10 +89,9 @@ BYTE altair_sio0_status_in(void) sio0_stat = 0x81; sio0_t2 = get_clock_us(); - tdiff = sio0_t2 - sio0_t1; - if (sio0_baud_rate > 0) - if ((tdiff >= 0) && (tdiff < BAUDTIME / sio0_baud_rate)) - return sio0_stat; + if (sio0_baud_rate > 0 && + (int) (sio0_t2 - sio0_t1) < BAUDTIME / sio0_baud_rate) + return sio0_stat; p[0].fd = fileno(stdin); p[0].events = POLLIN; @@ -206,7 +212,6 @@ void altair_sio0_data_out(BYTE data) BYTE altair_sio3_status_in(void) { struct pollfd p[1]; - int tdiff; /* if socket not connected check for a new connection */ if (ucons[0].ssc == 0) { @@ -225,10 +230,9 @@ BYTE altair_sio3_status_in(void) } sio3_t2 = get_clock_us(); - tdiff = sio3_t2 - sio3_t1; - if (sio3_baud_rate > 0) - if ((tdiff >= 0) && (tdiff < BAUDTIME / sio3_baud_rate)) - return sio3_stat; + if (sio3_baud_rate > 0 && + (int) (sio3_t2 - sio3_t1) < BAUDTIME / sio3_baud_rate) + return sio3_stat; /* if socket is connected check for I/O */ if (ucons[0].ssc != 0) { diff --git a/iodevices/altair-88-sio.h b/iodevices/altair-88-sio.h index 001fd660..d38ef7b2 100644 --- a/iodevices/altair-88-sio.h +++ b/iodevices/altair-88-sio.h @@ -36,6 +36,8 @@ extern int sio0_baud_rate; /* SIO 0 baud rate */ extern int sio3_baud_rate; /* SIO 3 baud rate */ +extern void altair_sio_reset(void); + extern BYTE altair_sio0_status_in(void); extern void altair_sio0_status_out(BYTE data); extern BYTE altair_sio0_data_in(void); diff --git a/iodevices/cromemco-88ccc.c b/iodevices/cromemco-88ccc.c index b5c0993d..d8ed9def 100644 --- a/iodevices/cromemco-88ccc.c +++ b/iodevices/cromemco-88ccc.c @@ -45,8 +45,8 @@ static pthread_t thread = 0; /* thread for requesting, receiving & storing the camera image using DMA */ static void *store_image(void *arg) { - uint64_t t1, t2; - int tdiff; + uint64_t t; + long tleft; int i, j, len; BYTE buffer[FIELDSIZE]; struct { @@ -60,7 +60,7 @@ static void *store_image(void *arg) UNUSED(arg); memset(&msg, 0, sizeof(msg)); - t1 = get_clock_us(); + t = get_clock_us(); while (state) { /* do until total frame is received */ if (net_device_alive(DEV_88ACC)) { @@ -99,12 +99,11 @@ static void *store_image(void *arg) /* sleep_for_ms(j); */ /* sleep rest of total frame time */ - t2 = get_clock_us(); - tdiff = t2 - t1; - if (tdiff < (j * 1000)) - sleep_for_ms(j - tdiff / 1000); + tleft = j * 1000 - (long) (get_clock_us() - t1); + if (tleft > 0) + sleep_for_us(tleft); - LOGD(TAG, "Time: %d", tdiff); + LOGD(TAG, "Time: %ld", tleft); state = false; } diff --git a/iodevices/cromemco-dazzler.c b/iodevices/cromemco-dazzler.c index 2757de8a..ea1f4576 100644 --- a/iodevices/cromemco-dazzler.c +++ b/iodevices/cromemco-dazzler.c @@ -742,12 +742,12 @@ static win_funcs_t dazzler_funcs = { /* thread for updating the X11 display or web server */ static void *update_thread(void *arg) { - uint64_t t1, t2; - int tdiff; + uint64_t t; + long tleft; UNUSED(arg); - t1 = get_clock_us(); + t = get_clock_us(); while (true) { /* do forever or until canceled */ @@ -788,13 +788,12 @@ static void *update_thread(void *arg) sleep_for_ms(4); flags = 64; - /* sleep rest to 33ms so that we get 30 fps */ - t2 = get_clock_us(); - tdiff = t2 - t1; - if ((tdiff > 0) && (tdiff < 33000)) - sleep_for_ms(33 - (tdiff / 1000)); + /* sleep rest to 33333us so that we get 30 fps */ + tleft = 33333L - (long) (get_clock_us() - t); + if (tleft > 0) + sleep_for_us(tleft); - t1 = get_clock_us(); + t = get_clock_us(); } /* just in case it ever gets here */ diff --git a/iodevices/imsai-sio2.c b/iodevices/imsai-sio2.c index 5940b8fa..92fb6afb 100644 --- a/iodevices/imsai-sio2.c +++ b/iodevices/imsai-sio2.c @@ -87,6 +87,14 @@ int sio2b_baud_rate = 2400; static uint64_t sio2b_t1, sio2b_t2; static BYTE sio2b_stat = 0; +/* + * reset IMSAI SIO-2 + */ +void imsai_sio_reset(void) +{ + sio1a_t1 = sio1b_t1 = sio2a_t1 = sio2b_t1 = get_clock_us(); +} + /* * the IMSAI SIO-2 occupies 16 I/O ports, from which only * 5 have a function. the following two functions are used @@ -118,13 +126,10 @@ void imsai_sio_nofun_out(BYTE data) */ BYTE imsai_sio1a_status_in(void) { - int tdiff; - sio1a_t2 = get_clock_us(); - tdiff = sio1a_t2 - sio1a_t1; - if (sio1a_baud_rate > 0) - if ((tdiff >= 0) && (tdiff < BAUDTIME / sio1a_baud_rate)) - return sio1a_stat; + if (sio1a_baud_rate > 0 && + (int) (sio1a_t2 - sio1a_t1) < BAUDTIME / sio1a_baud_rate) + return sio1a_stat; hal_status_in(SIO1A, &sio1a_stat); @@ -196,13 +201,10 @@ void imsai_sio1a_data_out(BYTE data) */ BYTE imsai_sio1b_status_in(void) { - int tdiff; - sio1b_t2 = get_clock_us(); - tdiff = sio1b_t2 - sio1b_t1; - if (sio1b_baud_rate > 0) - if ((tdiff >= 0) && (tdiff < BAUDTIME / sio1b_baud_rate)) - return sio1b_stat; + if (sio1b_baud_rate > 0 && + (int) (sio1b_t2 - sio1b_t1) < BAUDTIME / sio1b_baud_rate) + return sio1b_stat; hal_status_in(SIO1B, &sio1b_stat); @@ -271,13 +273,10 @@ void imsai_sio1b_data_out(BYTE data) */ BYTE imsai_sio2a_status_in(void) { - int tdiff; - sio2a_t2 = get_clock_us(); - tdiff = sio2a_t2 - sio2a_t1; - if (sio2a_baud_rate > 0) - if ((tdiff >= 0) && (tdiff < BAUDTIME / sio2a_baud_rate)) - return sio2a_stat; + if (sio2a_baud_rate > 0 && + (int) (sio2a_t2 - sio2a_t1) < BAUDTIME / sio2a_baud_rate) + return sio2a_stat; hal_status_in(SIO2A, &sio2a_stat); @@ -352,13 +351,10 @@ void imsai_sio2a_data_out(BYTE data) */ BYTE imsai_sio2b_status_in(void) { - int tdiff; - sio2b_t2 = get_clock_us(); - tdiff = sio2b_t2 - sio2b_t1; - if (sio2b_baud_rate > 0) - if ((tdiff >= 0) && (tdiff < BAUDTIME / sio2b_baud_rate)) - return sio2b_stat; + if (sio2b_baud_rate > 0 && + (int) (sio2b_t2 - sio2b_t1) < BAUDTIME / sio2b_baud_rate) + return sio2b_stat; hal_status_in(SIO2B, &sio2b_stat); diff --git a/iodevices/imsai-sio2.h b/iodevices/imsai-sio2.h index 881b38ff..a2b6133c 100644 --- a/iodevices/imsai-sio2.h +++ b/iodevices/imsai-sio2.h @@ -60,6 +60,8 @@ extern bool sio2b_strip_parity; /* SIO 2 B strip parity from output */ extern bool sio2b_drop_nulls; /* SIO 2 B drop nulls after CR/LF */ extern int sio2b_baud_rate; /* SIO 2 B simulated baud rate */ +extern void imsai_sio_reset(void); + extern BYTE imsai_sio_nofun_in(void); extern void imsai_sio_nofun_out(BYTE data); diff --git a/iodevices/imsai-vio.c b/iodevices/imsai-vio.c index 0b0fc914..d35e7f70 100644 --- a/iodevices/imsai-vio.c +++ b/iodevices/imsai-vio.c @@ -690,12 +690,12 @@ static win_funcs_t vio_funcs = { /* thread for updating the X11 display or web server */ static void *update_thread(void *arg) { - uint64_t t1, t2; - int tdiff; + uint64_t t; + long tleft; UNUSED(arg); - t1 = get_clock_us(); + t = get_clock_us(); while (state) { #ifdef HAS_NETSERVER @@ -721,13 +721,12 @@ static void *update_thread(void *arg) ws_refresh(); #endif - /* sleep rest to 33ms so that we get 30 fps */ - t2 = get_clock_us(); - tdiff = t2 - t1; - if ((tdiff > 0) && (tdiff < 33000)) - sleep_for_ms(33 - (tdiff / 1000)); + /* sleep rest to 33333us so that we get 30 fps */ + tleft = 33333L - (long) (get_clock_us() - t); + if (tleft > 0) + sleep_for_us(tleft); - t1 = get_clock_us(); + t = get_clock_us(); } pthread_exit(NULL); diff --git a/iodevices/proctec-vdm.c b/iodevices/proctec-vdm.c index eef8fd42..5aa69fc1 100644 --- a/iodevices/proctec-vdm.c +++ b/iodevices/proctec-vdm.c @@ -413,15 +413,14 @@ static win_funcs_t proctec_funcs = { /* thread for updating the display */ static void *update_display(void *arg) { - uint64_t t1, t2; - int tdiff; + uint64_t t; + long tleft; UNUSED(arg); - t1 = get_clock_us(); + t = get_clock_us(); while (state) { - /* lock display, don't cancel thread while locked */ pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL); XLockDisplay(display); @@ -436,13 +435,12 @@ static void *update_display(void *arg) XUnlockDisplay(display); pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL); - /* sleep rest to 33ms so that we get 30 fps */ - t2 = get_clock_us(); - tdiff = t2 - t1; - if ((tdiff > 0) && (tdiff < 33000)) - sleep_for_ms(33 - (tdiff / 1000)); + /* sleep rest to 33333us so that we get 30 fps */ + tleft = 33333L - (long) (get_clock_us() - t); + if (tleft > 0) + sleep_for_us(tleft); - t1 = get_clock_us(); + t = get_clock_us(); } pthread_exit(NULL); diff --git a/picosim/srcsim/picosim.c b/picosim/srcsim/picosim.c index 7cee05df..b741d7da 100644 --- a/picosim/srcsim/picosim.c +++ b/picosim/srcsim/picosim.c @@ -205,7 +205,10 @@ int main(void) config(); /* configure the machine */ f_value = speed; /* setup speed of the CPU */ - tmax = speed * 10000; /* theoretically */ + if (f_value) + tmax = speed * 10000; /* theoretically */ + else + tmax = 100000; put_pixel(0x440000); /* LED green */ diff --git a/z80core/alt8080.h b/z80core/alt8080.h index bc62eea4..353fd8b6 100644 --- a/z80core/alt8080.h +++ b/z80core/alt8080.h @@ -76,7 +76,6 @@ BYTE t, res, cout, P; cpu_reg_t w; /* working register */ - uint64_t clk; #define W w.w #define WH w.h @@ -740,7 +739,7 @@ break; case 0x76: /* HLT */ - clk = get_clock_us(); + t2 = get_clock_us(); #ifdef BUS_8080 cpu_bus = CPU_WO | CPU_HLTA | CPU_MEMR; #endif @@ -799,7 +798,7 @@ } } #endif /* FRONTPANEL */ - cpu_start += get_clock_us() - clk; + cpu_tadj += get_clock_us() - t2; t += 3; break; diff --git a/z80core/altz80.h b/z80core/altz80.h index 52b1334c..a3761387 100644 --- a/z80core/altz80.h +++ b/z80core/altz80.h @@ -85,7 +85,6 @@ #endif cpu_reg_t w; /* working register */ cpu_reg_t ir; /* current index register (HL, IX, IY) */ - uint64_t clk; #define W w.w #define WH w.h @@ -802,7 +801,7 @@ break; case 0x76: /* HALT */ - clk = get_clock_us(); + t2 = get_clock_us(); #ifdef BUS_8080 cpu_bus = CPU_WO | CPU_HLTA | CPU_MEMR; #endif @@ -865,7 +864,7 @@ } } #endif /* FRONTPANEL */ - cpu_start += get_clock_us() - clk; + cpu_tadj += get_clock_us() - t2; break; case 0x77: /* LD (ir),A */ diff --git a/z80core/sim8080.c b/z80core/sim8080.c index 4f61dbe6..e31f57ed 100644 --- a/z80core/sim8080.c +++ b/z80core/sim8080.c @@ -404,7 +404,7 @@ void cpu_8080(void) Tstates_t T_max, T_dma; uint64_t t1, t2; - int tdiff; + long tdiff; T_max = T + tmax; t1 = get_clock_us(); @@ -453,8 +453,10 @@ void cpu_8080(void) /* hand control to the DMA bus master without BUS_ACK */ T += (T_dma = (*dma_bus_master)(0)); - if (f_value) - cpu_start -= T_dma / f_value; + if (f_value) { + T_freq = T; + cpu_time += T_dma / f_value; + } } } @@ -469,8 +471,10 @@ void cpu_8080(void) /* hand control to the DMA bus master with BUS_ACK */ T += (T_dma = (*dma_bus_master)(1)); - if (f_value) - cpu_start -= T_dma / f_value; + if (f_value) { + T_freq = T; + cpu_time += T_dma / f_value; + } } /* FOR NOW - MAY BE NEED A PRIORITY SYSTEM LATER */ @@ -589,15 +593,19 @@ void cpu_8080(void) #include "alt8080.h" #endif - if (f_value) { /* adjust CPU speed */ - if (T >= T_max && !cpu_needed) { + if (T >= T_max) { /* adjust CPU speed and update time */ + T_max = T + tmax; + t2 = get_clock_us(); + tdiff = t2 - t1; + if (f_value && !cpu_needed && tdiff < 10000L) { + sleep_for_us(10000L - tdiff); t2 = get_clock_us(); tdiff = t2 - t1; - if ((tdiff > 0) && (tdiff < 10000)) - sleep_for_us(10000 - tdiff); - T_max = T + tmax; - t1 = get_clock_us(); } + T_freq = T; + cpu_time += tdiff - cpu_tadj; + cpu_tadj = 0; + t1 = t2; } #ifdef WANT_ICE @@ -642,6 +650,12 @@ void cpu_8080(void) fp_led_address = PC; fp_led_data = getmem(PC); #endif + + /* update CPU time */ + tdiff = get_clock_us() - t1; + T_freq = T; + cpu_time += tdiff - cpu_tadj; + cpu_tadj = 0; } #ifndef ALT_I8080 @@ -663,9 +677,9 @@ static int op_nop(void) /* NOP */ static int op_hlt(void) /* HLT */ { - uint64_t clk; + uint64_t t; - clk = get_clock_us(); + t = get_clock_us(); #ifdef BUS_8080 cpu_bus = CPU_WO | CPU_HLTA | CPU_MEMR; #endif @@ -721,7 +735,7 @@ static int op_hlt(void) /* HLT */ } } #endif /* FRONTPANEL */ - cpu_start += get_clock_us() - clk; + cpu_tadj += get_clock_us() - t; return 7; } diff --git a/z80core/simcore.c b/z80core/simcore.c index c2f4a7ad..1d044eea 100644 --- a/z80core/simcore.c +++ b/z80core/simcore.c @@ -115,7 +115,6 @@ void switch_cpu(int new_cpu) */ void run_cpu(void) { - cpu_start = get_clock_us(); cpu_state = ST_CONTIN_RUN; cpu_error = NONE; while (true) { @@ -139,7 +138,6 @@ void run_cpu(void) } else break; } - cpu_time += get_clock_us() - cpu_start; } /* @@ -147,7 +145,6 @@ void run_cpu(void) */ void step_cpu(void) { - cpu_start = get_clock_us(); cpu_state = ST_SINGLE_STEP; cpu_error = NONE; switch (cpu) { @@ -165,7 +162,6 @@ void step_cpu(void) break; } cpu_state = ST_STOPPED; - cpu_time += get_clock_us() - cpu_start; } /* @@ -236,9 +232,9 @@ void report_cpu_stats(void) if (cpu_time) { printf("CPU ran %" PRIu64 " ms ", cpu_time / 1000); - printf("and executed %" PRIu64 " t-states\n", T); + printf("and executed %" PRIu64 " t-states\n", T_freq); printf("Clock frequency %4.2f MHz\n", - (float) (T) / (float) cpu_time); + (float) (T_freq) / (float) cpu_time); } } @@ -249,16 +245,17 @@ void report_cpu_stats(void) */ BYTE io_in(BYTE addrl, BYTE addrh) { - uint64_t clk; + uint64_t t; #ifdef FRONTPANEL bool val; #else #ifndef SIMPLEPANEL + UNUSED(addrh); #endif #endif - clk = get_clock_us(); + t = get_clock_us(); io_port = addrl; if (port_in[addrl]) @@ -281,7 +278,7 @@ BYTE io_in(BYTE addrl, BYTE addrh) fp_led_address = (addrh << 8) + addrl; fp_led_data = io_data; fp_sampleData(); - val = wait_step(); + val = wait_step(false); /* when single stepped INP get last set value of port */ if (val && port_in[addrl]) @@ -299,7 +296,7 @@ BYTE io_in(BYTE addrl, BYTE addrh) LOGD(TAG, "input %02x from port %02x", io_data, io_port); - cpu_start += get_clock_us() - clk; + cpu_tadj += get_clock_us() - t; return io_data; } @@ -311,12 +308,13 @@ BYTE io_in(BYTE addrl, BYTE addrh) */ void io_out(BYTE addrl, BYTE addrh, BYTE data) { - uint64_t clk; + uint64_t t; + #if !defined(FRONTPANEL) && !defined(SIMPLEPANEL) UNUSED(addrh); #endif - clk = get_clock_us(); + t = get_clock_us(); io_port = addrl; io_data = data; @@ -344,7 +342,7 @@ void io_out(BYTE addrl, BYTE addrh, BYTE data) fp_led_address = (addrh << 8) + addrl; fp_led_data = IO_DATA_UNUSED; fp_sampleData(); - wait_step(); + wait_step(false); } #endif #ifdef SIMPLEPANEL @@ -356,7 +354,7 @@ void io_out(BYTE addrl, BYTE addrh, BYTE data) port_flags[addrl].out = true; #endif - cpu_start += get_clock_us() - clk; + cpu_tadj += get_clock_us() - t; } /* diff --git a/z80core/simfun.c b/z80core/simfun.c index c4e9c8a7..e91f55df 100644 --- a/z80core/simfun.c +++ b/z80core/simfun.c @@ -94,14 +94,23 @@ void sleep_for_ms(unsigned time) } /* - * returns time in microseconds + * returns monotonic time in microseconds */ uint64_t get_clock_us(void) { struct timeval tv; + uint64_t t; + static uint64_t old_t; gettimeofday(&tv, NULL); - return (uint64_t) (tv.tv_sec) * 1000000ULL + (uint64_t) (tv.tv_usec); + t = (uint64_t) (tv.tv_sec) * 1000000ULL + (uint64_t) (tv.tv_usec); + if (t < old_t) { + LOGD(TAG, "get_clock_us() time jumped backwards %" + PRIu64 " > %" PRIu64, old_t, t); + t = old_t; + } else + old_t = t; + return t; } #ifdef WANT_ICE diff --git a/z80core/simglb.c b/z80core/simglb.c index 3a941ac4..04713d86 100644 --- a/z80core/simglb.c +++ b/z80core/simglb.c @@ -40,8 +40,9 @@ BYTE IFF; /* interrupt flags */ cpu_regs_t cpu_regs; /* CPU registers */ #endif Tstates_t T; /* CPU clock */ -int64_t cpu_start; /* timestamp at start of CPU run/step */ -int64_t cpu_time; /* time spent running CPU in us */ +Tstates_t T_freq; /* CPU clock used for frequency calculation */ +uint64_t cpu_time; /* time spent running CPU in us */ +uint64_t cpu_tadj; /* time spent in non CPU execution areas */ #ifdef BUS_8080 BYTE cpu_bus; /* CPU bus status, for frontpanels */ @@ -64,7 +65,8 @@ bool int_protection; /* to delay interrupts after EI */ BYTE bus_request; /* request address/data bus from CPU */ BusDMA_t bus_mode; /* current bus mode for DMA */ BusDMAFunc_t *dma_bus_master; /* DMA bus master call back func */ -int tmax; /* max t-states to execute in 10ms */ +int tmax; /* max t-states to execute in 10ms or + when to update the CPU times */ bool cpu_needed; /* don't adjust CPU freq if needed */ /* diff --git a/z80core/simglb.h b/z80core/simglb.h index 5c5870ce..db9df46c 100644 --- a/z80core/simglb.h +++ b/z80core/simglb.h @@ -31,9 +31,8 @@ extern BYTE IFF; #else #include "altregs.h" #endif -extern Tstates_t T; -extern int64_t cpu_start; -extern int64_t cpu_time; +extern Tstates_t T, T_freq; +extern uint64_t cpu_time, cpu_tadj; #ifdef BUS_8080 extern BYTE cpu_bus; diff --git a/z80core/simmain.c b/z80core/simmain.c index 46ddd806..b7907517 100644 --- a/z80core/simmain.c +++ b/z80core/simmain.c @@ -66,7 +66,10 @@ int main(int argc, char *argv[]) #endif #ifdef CPU_SPEED f_value = CPU_SPEED; - tmax = CPU_SPEED * 10000; /* theoretically */ + if (f_value) + tmax = CPU_SPEED * 10000; /* theoretically */ + else + tmax = 100000; #endif while (--argc > 0 && (*++argv)[0] == '-') @@ -113,7 +116,10 @@ int main(int argc, char *argv[]) argv++; f_value = atoi(argv[0]); } - tmax = f_value * 10000; /* theoretically */ + if (f_value) + tmax = f_value * 10000; /* theoretically */ + else + tmax = 100000; break; case 'x': /* get filename with executable */ diff --git a/z80core/simpanel.c b/z80core/simpanel.c index 9b1eccd9..2b1dd4da 100644 --- a/z80core/simpanel.c +++ b/z80core/simpanel.c @@ -721,7 +721,6 @@ static void refresh(bool tick) const reg_t *rp = NULL; draw_grid_t grid = { }; int cpu_type = cpu; - uint64_t t; static int freq; /* use cpu_type in the rest of this function, since cpu can change */ @@ -843,13 +842,8 @@ static void refresh(bool tick) C_ORANGE, C_DKBLUE); /* update frequency every second */ - if (tick) { - t = cpu_time; - if (cpu_state == ST_CONTIN_RUN || cpu_state == ST_SINGLE_STEP) - t += get_clock_us() - cpu_start; - if (t) - freq = (int) ((float) T / (float) t * 100.0); - } + if (tick && cpu_time) + freq = (int) ((float) T_freq / (float) cpu_time * 100.0); f = freq; digit = 100000; onlyz = true; @@ -908,16 +902,15 @@ static void kill_thread(void) static void *update_display(void *arg) { uint64_t t1, t2, ttick; - int tdiff; + long tleft; bool tick = true; UNUSED(arg); t1 = get_clock_us(); - ttick = t1 + 1000000; + ttick = t + 1000000; while (true) { - /* lock display, don't cancel thread while locked */ pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL); XLockDisplay(display); @@ -942,9 +935,9 @@ static void *update_display(void *arg) ttick = t2 + 1000000; /* sleep rest to 16667us so that we get 60 fps */ - tdiff = t2 - t1; - if ((tdiff > 0) && (tdiff < 16667)) - sleep_for_us(16667 - tdiff); + tleft = 16667L - (long) (t2 - t1); + if (tleft > 0) + sleep_for_us(tleft); t1 = get_clock_us(); } diff --git a/z80core/simz80-dd.c b/z80core/simz80-dd.c index e9654283..162469e0 100644 --- a/z80core/simz80-dd.c +++ b/z80core/simz80-dd.c @@ -365,14 +365,6 @@ int op_dd_handle(void) */ static int trap_dd(void) { -#ifdef UNDOC_INST - if (!u_flag) { - /* Treat 0xdd prefix as NOP on non IX-instructions */ - PC--; - R--; - return 4; - } -#endif cpu_error = OPTRAP2; cpu_state = ST_STOPPED; return 0; diff --git a/z80core/simz80-fd.c b/z80core/simz80-fd.c index 120c7570..32bc1053 100644 --- a/z80core/simz80-fd.c +++ b/z80core/simz80-fd.c @@ -365,14 +365,6 @@ int op_fd_handle(void) */ static int trap_fd(void) { -#ifdef UNDOC_INST - if (!u_flag) { - /* Treat 0xfd prefix as NOP on non IY-instructions */ - PC--; - R--; - return 4; - } -#endif cpu_error = OPTRAP2; cpu_state = ST_STOPPED; return 0; diff --git a/z80core/simz80.c b/z80core/simz80.c index 76280692..674a02b6 100644 --- a/z80core/simz80.c +++ b/z80core/simz80.c @@ -388,7 +388,7 @@ void cpu_z80(void) Tstates_t T_max, T_dma; uint64_t t1, t2; - int tdiff; + long tdiff; WORD p; T_max = T + tmax; @@ -440,8 +440,10 @@ void cpu_z80(void) /* hand control to the DMA bus master without BUS_ACK */ T += (T_dma = (*dma_bus_master)(0)); - if (f_value) - cpu_start -= T_dma / f_value; + if (f_value) { + T_freq = T; + cpu_time += T_dma / f_value; + } } } @@ -456,8 +458,10 @@ void cpu_z80(void) /* hand control to the DMA bus master with BUS_ACK */ T += (T_dma = (*dma_bus_master)(1)); - if (f_value) - cpu_start -= T_dma / f_value; + if (f_value) { + T_freq = T; + cpu_time += T_dma / f_value; + } } /* FOR NOW - MAY BE NEED A PRIORITY SYSTEM LATER */ @@ -607,15 +611,19 @@ void cpu_z80(void) #include "altz80.h" #endif - if (f_value) { /* adjust CPU speed */ - if (T >= T_max && !cpu_needed) { + if (T >= T_max) { /* adjust CPU speed and update time */ + T_max = T + tmax; + t2 = get_clock_us(); + tdiff = t2 - t1; + if (f_value && !cpu_needed && tdiff < 10000L) { + sleep_for_us(10000L - tdiff); t2 = get_clock_us(); tdiff = t2 - t1; - if ((tdiff > 0) && (tdiff < 10000)) - sleep_for_us(10000 - tdiff); - T_max = T + tmax; - t1 = get_clock_us(); } + T_freq = T; + cpu_time += tdiff - cpu_tadj; + cpu_tadj = 0; + t1 = t2; } #ifdef WANT_ICE @@ -648,6 +656,7 @@ void cpu_z80(void) if (!(cpu_bus & CPU_INTA)) cpu_bus = CPU_WO | CPU_M1 | CPU_MEMR; #endif + #ifdef FRONTPANEL if (F_flag) { fp_led_address = PC; @@ -660,6 +669,11 @@ void cpu_z80(void) fp_led_address = PC; fp_led_data = getmem(PC); #endif + + /* update CPU time */ + T_freq = T; + cpu_time += get_clock_us() - t1 - cpu_tadj; + cpu_tadj = 0; } #ifndef ALT_Z80 @@ -671,9 +685,9 @@ static int op_nop(void) /* NOP */ static int op_halt(void) /* HALT */ { - uint64_t clk; + uint64_t t; - clk = get_clock_us(); + t = get_clock_us(); #ifdef BUS_8080 cpu_bus = CPU_WO | CPU_HLTA | CPU_MEMR; #endif @@ -734,7 +748,7 @@ static int op_halt(void) /* HALT */ } } #endif /* FRONTPANEL */ - cpu_start += get_clock_us() - clk; + cpu_tadj += get_clock_us() - t; return 4; } From 9eaf9062e6fa89d845791f70d0f6c7d9e748fd88 Mon Sep 17 00:00:00 2001 From: Thomas Eberhardt Date: Thu, 23 Jan 2025 01:00:04 +0100 Subject: [PATCH 05/22] more time work, hopefully last one; use dma_read/write() in simbdos.c Add back adjustment calculations to fp_sample*() calls including in memrdr()/memwrt() which wasn't done before. Remove parameter from wait_step(), not needed anymore, because of memrdr()/memwrt() changes. Only use cpu_tadj when in free running mode (f_value == 0) to get a hopefully sensible CPU frequency. In frequency locked mode the adjustment doesn't make sense in my opinion. When single stepping pretend we spent the right amount of time, or in free running mode use an arbitrary 100 MHz value. Changed simbdos.c to use dma_read/write() instead of memrdr()/memwrt(). Seems to make more sense, and it was the only I/O device that used memrdr()/memwrt() and using these in I/O devices screws up the time adjustment calculations. --- altairsim/srcsim/simctl.c | 11 +------- altairsim/srcsim/simctl.h | 2 +- altairsim/srcsim/simmem.h | 16 +++++++++-- cromemcosim/srcsim/simctl.c | 11 +------- cromemcosim/srcsim/simctl.h | 2 +- cromemcosim/srcsim/simmem.h | 15 ++++++++-- imsaisim/srcsim/simctl.c | 11 +------- imsaisim/srcsim/simctl.h | 2 +- imsaisim/srcsim/simmem.h | 16 +++++++++-- intelmdssim/srcsim/simctl.c | 4 +-- intelmdssim/srcsim/simctl.h | 2 +- iodevices/simbdos.c | 10 +++---- z80core/altz80.h | 8 ++++++ z80core/sim8080.c | 56 +++++++++++++++++++++++++++++-------- z80core/simcore.c | 4 +-- z80core/simz80-cb.c | 6 ++++ z80core/simz80-dd.c | 6 ++++ z80core/simz80-ed.c | 6 ++++ z80core/simz80-fd.c | 6 ++++ z80core/simz80.c | 49 +++++++++++++++++++++++++------- 20 files changed, 172 insertions(+), 71 deletions(-) diff --git a/altairsim/srcsim/simctl.c b/altairsim/srcsim/simctl.c index 58b72788..0b704aba 100644 --- a/altairsim/srcsim/simctl.c +++ b/altairsim/srcsim/simctl.c @@ -324,10 +324,9 @@ static void step_clicked(int state, int val) /* * Single step through the machine cycles after first M1 */ -bool wait_step(bool tadj) +bool wait_step(void) { bool ret = false; - uint64_t t = 0; if (cpu_state != ST_SINGLE_STEP) { cpu_bus &= ~CPU_M1; @@ -342,8 +341,6 @@ bool wait_step(bool tadj) cpu_switch = CPUSW_STEPCYCLE; - if (tadj) - t = get_clock_us(); while ((cpu_switch == CPUSW_STEPCYCLE) && !reset) { /* when INP update data bus LEDs */ if (cpu_bus == (CPU_WO | CPU_INP)) { @@ -356,8 +353,6 @@ bool wait_step(bool tadj) sleep_for_ms(10); ret = true; } - if (tadj) - cpu_tadj += get_clock_us() - t; cpu_bus &= ~CPU_M1; m1_step = false; @@ -369,20 +364,16 @@ bool wait_step(bool tadj) */ void wait_int_step(void) { - uint64_t t; - if (cpu_state != ST_SINGLE_STEP) return; cpu_switch = CPUSW_STEPCYCLE; - t = get_clock_us(); while ((cpu_switch == CPUSW_STEPCYCLE) && !reset) { fp_clock++; fp_sampleData(); sleep_for_ms(10); } - cpu_tadj += get_clock_us() - t; } /* diff --git a/altairsim/srcsim/simctl.h b/altairsim/srcsim/simctl.h index b3be48c9..7e12a2c1 100644 --- a/altairsim/srcsim/simctl.h +++ b/altairsim/srcsim/simctl.h @@ -14,7 +14,7 @@ extern int boot_switch; /* boot address for switch */ extern void mon(void); -extern bool wait_step(bool tadj); +extern bool wait_step(void); extern void wait_int_step(void); #endif /* !SIMCTL_INC */ diff --git a/altairsim/srcsim/simmem.h b/altairsim/srcsim/simmem.h index 5d484ed2..5fea327d 100644 --- a/altairsim/srcsim/simmem.h +++ b/altairsim/srcsim/simmem.h @@ -37,6 +37,7 @@ #endif #ifdef FRONTPANEL #include "simctl.h" +#include "simport.h" #include "frontpanel.h" #endif @@ -73,6 +74,10 @@ extern void init_memory(void); */ static inline void memwrt(WORD addr, BYTE data) { +#ifdef FRONTPANEL + uint64_t t; +#endif + #ifdef BUS_8080 #ifndef FRONTPANEL cpu_bus &= ~CPU_M1; @@ -82,11 +87,13 @@ static inline void memwrt(WORD addr, BYTE data) #ifdef FRONTPANEL if (F_flag) { + t = get_clock_us(); fp_clock++; fp_led_address = addr; fp_led_data = 0xff; fp_sampleData(); - wait_step(true); + wait_step(); + cpu_tadj += get_clock_us() - t; } else cpu_bus &= ~CPU_M1; #endif @@ -105,6 +112,9 @@ static inline void memwrt(WORD addr, BYTE data) static inline BYTE memrdr(WORD addr) { register BYTE data; +#ifdef FRONTPANEL + uint64_t t; +#endif #ifdef WANT_HB if (hb_flag && hb_addr == addr) { @@ -144,11 +154,13 @@ static inline BYTE memrdr(WORD addr) #ifdef FRONTPANEL if (F_flag) { + t = get_clock_us(); fp_clock++; fp_led_address = addr; fp_led_data = data; fp_sampleData(); - wait_step(true); + wait_step(); + cpu_tadj += get_clock_us() - t; } else cpu_bus &= ~CPU_M1; #endif diff --git a/cromemcosim/srcsim/simctl.c b/cromemcosim/srcsim/simctl.c index bdf3242f..df645a41 100644 --- a/cromemcosim/srcsim/simctl.c +++ b/cromemcosim/srcsim/simctl.c @@ -329,10 +329,9 @@ static void step_clicked(int state, int val) /* * Single step through the machine cycles after M1 */ -bool wait_step(bool tadj) +bool wait_step(void) { bool ret = false; - uint64_t t = 0; if (cpu_state != ST_SINGLE_STEP) { cpu_bus &= ~CPU_M1; @@ -347,8 +346,6 @@ bool wait_step(bool tadj) cpu_switch = CPUSW_STEPCYCLE; - if (tadj) - t = get_clock_us(); while ((cpu_switch == CPUSW_STEPCYCLE) && !reset) { /* when INP update data bus LEDs */ if (cpu_bus == (CPU_WO | CPU_INP)) { @@ -361,8 +358,6 @@ bool wait_step(bool tadj) sleep_for_ms(10); ret = true; } - if (tadj) - cpu_tadj += get_clock_us() - t; cpu_bus &= ~CPU_M1; m1_step = false; @@ -374,20 +369,16 @@ bool wait_step(bool tadj) */ void wait_int_step(void) { - uint64_t t; - if (cpu_state != ST_SINGLE_STEP) return; cpu_switch = CPUSW_STEPCYCLE; - t = get_clock_us(); while ((cpu_switch == CPUSW_STEPCYCLE) && !reset) { fp_clock++; fp_sampleData(); sleep_for_ms(10); } - cpu_tadj += get_clock_us() - t; } /* diff --git a/cromemcosim/srcsim/simctl.h b/cromemcosim/srcsim/simctl.h index afb7986b..2687713a 100644 --- a/cromemcosim/srcsim/simctl.h +++ b/cromemcosim/srcsim/simctl.h @@ -12,7 +12,7 @@ extern void mon(void); -extern bool wait_step(bool tadj); +extern bool wait_step(void); extern void wait_int_step(void); #endif /* !SIMCTL_INC */ diff --git a/cromemcosim/srcsim/simmem.h b/cromemcosim/srcsim/simmem.h index 9e972df9..8f1a402b 100644 --- a/cromemcosim/srcsim/simmem.h +++ b/cromemcosim/srcsim/simmem.h @@ -36,6 +36,7 @@ #endif #ifdef FRONTPANEL #include "simctl.h" +#include "simport.h" #include "frontpanel.h" #endif @@ -90,6 +91,9 @@ extern void reset_fdc_rom_map(void); static inline void memwrt(WORD addr, BYTE data) { register int i; +#ifdef FRONTPANEL + uint64_t t; +#endif #ifdef BUS_8080 #ifndef FRONTPANEL @@ -100,11 +104,13 @@ static inline void memwrt(WORD addr, BYTE data) #ifdef FRONTPANEL if (F_flag) { + t = get_clock_us(); fp_clock++; fp_led_address = addr; fp_led_data = data; fp_sampleData(); - wait_step(true); + wait_step(); + cpu_tadj += get_clock_us() - t; } else cpu_bus &= ~CPU_M1; #endif @@ -134,6 +140,9 @@ static inline void memwrt(WORD addr, BYTE data) static inline BYTE memrdr(WORD addr) { register BYTE data; +#ifdef FRONTPANEL + uint64_t t; +#endif #ifdef WANT_HB if (hb_flag && hb_addr == addr) { @@ -164,11 +173,13 @@ static inline BYTE memrdr(WORD addr) #ifdef FRONTPANEL if (F_flag) { + t = get_clock_us(); fp_clock++; fp_led_address = addr; fp_led_data = data; fp_sampleData(); - wait_step(true); + wait_step(); + cpu_tadj += get_clock_us() - t; } else cpu_bus &= ~CPU_M1; #endif diff --git a/imsaisim/srcsim/simctl.c b/imsaisim/srcsim/simctl.c index 21959292..cbf87856 100644 --- a/imsaisim/srcsim/simctl.c +++ b/imsaisim/srcsim/simctl.c @@ -330,10 +330,9 @@ static void step_clicked(int state, int val) /* * Single step through the machine cycles after M1 */ -bool wait_step(bool tadj) +bool wait_step(void) { bool ret = false; - uint64_t t = 0; if (cpu_state != ST_SINGLE_STEP) { cpu_bus &= ~CPU_M1; @@ -348,8 +347,6 @@ bool wait_step(bool tadj) cpu_switch = CPUSW_STEPCYCLE; - if (tadj) - t = get_clock_us(); while ((cpu_switch == CPUSW_STEPCYCLE) && !reset) { /* when INP update data bus LEDs */ if (cpu_bus == (CPU_WO | CPU_INP)) { @@ -362,8 +359,6 @@ bool wait_step(bool tadj) sleep_for_ms(10); ret = true; } - if (tadj) - cpu_tadj += get_clock_us() - t; cpu_bus &= ~CPU_M1; m1_step = false; @@ -375,20 +370,16 @@ bool wait_step(bool tadj) */ void wait_int_step(void) { - uint64_t t; - if (cpu_state != ST_SINGLE_STEP) return; cpu_switch = CPUSW_STEPCYCLE; - t = get_clock_us(); while ((cpu_switch == CPUSW_STEPCYCLE) && !reset) { fp_clock++; fp_sampleData(); sleep_for_ms(10); } - cpu_tadj += get_clock_us() - t; } /* diff --git a/imsaisim/srcsim/simctl.h b/imsaisim/srcsim/simctl.h index 4377a178..7d04615e 100644 --- a/imsaisim/srcsim/simctl.h +++ b/imsaisim/srcsim/simctl.h @@ -12,7 +12,7 @@ extern void mon(void); -extern bool wait_step(bool tadj); +extern bool wait_step(void); extern void wait_int_step(void); #endif /* !SIMCTL_INC */ diff --git a/imsaisim/srcsim/simmem.h b/imsaisim/srcsim/simmem.h index f893c525..1c279456 100644 --- a/imsaisim/srcsim/simmem.h +++ b/imsaisim/srcsim/simmem.h @@ -38,6 +38,7 @@ #endif #ifdef FRONTPANEL #include "simctl.h" +#include "simport.h" #include "frontpanel.h" #endif @@ -112,6 +113,10 @@ extern void groupswap(void); */ static inline void memwrt(WORD addr, BYTE data) { +#ifdef FRONTPANEL + uint64_t t; +#endif + #ifdef BUS_8080 #ifndef FRONTPANEL cpu_bus &= ~CPU_M1; @@ -121,11 +126,13 @@ static inline void memwrt(WORD addr, BYTE data) #ifdef FRONTPANEL if (F_flag) { + t = get_clock_us(); fp_clock++; fp_led_address = addr; fp_led_data = data; fp_sampleData(); - wait_step(true); + wait_step(); + cpu_tadj += get_clock_us() - t; } else cpu_bus &= ~CPU_M1; #endif @@ -147,6 +154,9 @@ static inline void memwrt(WORD addr, BYTE data) static inline BYTE memrdr(WORD addr) { register BYTE data; +#ifdef FRONTPANEL + uint64_t t; +#endif #ifdef WANT_HB if (hb_flag && hb_addr == addr) { @@ -179,11 +189,13 @@ static inline BYTE memrdr(WORD addr) #ifdef FRONTPANEL if (F_flag) { + t = get_clock_us(); fp_clock++; fp_led_address = addr; fp_led_data = data; fp_sampleData(); - wait_step(true); + wait_step(); + cpu_tadj += get_clock_us() - t; } else cpu_bus &= ~CPU_M1; #endif diff --git a/intelmdssim/srcsim/simctl.c b/intelmdssim/srcsim/simctl.c index fd738a9f..3b686751 100644 --- a/intelmdssim/srcsim/simctl.c +++ b/intelmdssim/srcsim/simctl.c @@ -221,10 +221,8 @@ static void int_clicked(int state, int val) /* * Single step through the machine cycles after M1 */ -bool wait_step(bool tadj) +bool wait_step(void) { - UNUSED(tadj); - cpu_bus &= ~CPU_M1; m1_step = false; return false; diff --git a/intelmdssim/srcsim/simctl.h b/intelmdssim/srcsim/simctl.h index ed44f194..14724854 100644 --- a/intelmdssim/srcsim/simctl.h +++ b/intelmdssim/srcsim/simctl.h @@ -15,7 +15,7 @@ extern BYTE boot_switch; extern void mon(void); -extern bool wait_step(bool tadj); +extern bool wait_step(void); extern void wait_int_step(void); #endif /* !SIMCTL_INC */ diff --git a/iodevices/simbdos.c b/iodevices/simbdos.c index 224a33db..00d50a33 100644 --- a/iodevices/simbdos.c +++ b/iodevices/simbdos.c @@ -96,14 +96,14 @@ void host_bdos_out(BYTE outByte) if ((C == OPENF) || (C == MAKEF)) { for (i = 0; i < 8; i++) { /* copy file name */ - fname[i] = tolower(memrdr(fcbAddr + 1 + i)); + fname[i] = tolower(dma_read(fcbAddr + 1 + i)); if (fname[i] == ' ') break; } fname[i] = 0; for (i = 0; i < 3; i++) { /* copy extension */ - extension[i] = tolower(memrdr(fcbAddr + 9 + i)); + extension[i] = tolower(dma_read(fcbAddr + 9 + i)); if (extension[i] == ' ') break; } @@ -152,9 +152,9 @@ void host_bdos_out(BYTE outByte) xferLen = fread(buf, 1, SECLEN, fp); if (xferLen != 0) { for (i = 0; i < xferLen; i++) - memwrt(dmaAddr + i, buf[i]); + dma_write(dmaAddr + i, buf[i]); for (; i < SECLEN; i++) - memwrt(dmaAddr + i, CTRL_Z); + dma_write(dmaAddr + i, CTRL_Z); A = 0; } } @@ -165,7 +165,7 @@ void host_bdos_out(BYTE outByte) else if (C == WRITEF) { if (fp != NULL) { for (xferLen = 0; xferLen < SECLEN; xferLen++) { - buf[xferLen] = memrdr(dmaAddr + xferLen); + buf[xferLen] = dma_read(dmaAddr + xferLen); if ((buf[xferLen] == CTRL_Z) && textFile) break; /* ctrl-z (EOF) found */ } diff --git a/z80core/altz80.h b/z80core/altz80.h index a3761387..1bfe2161 100644 --- a/z80core/altz80.h +++ b/z80core/altz80.h @@ -1379,9 +1379,11 @@ #endif #ifdef FRONTPANEL if (F_flag) { + t2 = get_clock_us(); /* update frontpanel */ fp_clock++; fp_sampleLightGroup(0, 0); + cpu_adj += get_clock_us() - t2; } #endif @@ -1621,9 +1623,11 @@ #endif #ifdef FRONTPANEL if (F_flag) { + t2 = get_clock_us(); /* update frontpanel */ fp_clock++; fp_sampleLightGroup(0, 0); + cpu_tadj += get_clock_us() - t2; } #endif @@ -1717,9 +1721,11 @@ #endif #ifdef FRONTPANEL if (F_flag) { + t2 = get_clock_us(); /* update frontpanel */ fp_clock++; fp_sampleLightGroup(0, 0); + cpu_tadj += get_clock_us() - t2; } #endif @@ -2395,9 +2401,11 @@ #endif #ifdef FRONTPANEL if (F_flag) { + t2 = get_clock_us(); /* update frontpanel */ fp_clock++; fp_sampleLightGroup(0, 0); + cpu_tadj += get_clock_us() - t2; } #endif diff --git a/z80core/sim8080.c b/z80core/sim8080.c index e31f57ed..55cdf8d3 100644 --- a/z80core/sim8080.c +++ b/z80core/sim8080.c @@ -115,9 +115,13 @@ static int op_undoc_call(void); #ifdef FRONTPANEL static inline void addr_leds(WORD data) { + uint64_t t; + + t = get_clock_us(); fp_led_address = data; fp_clock++; fp_sampleData(); + cpu_tadj += get_clock_us() - t; } #endif @@ -402,16 +406,23 @@ void cpu_8080(void) #endif /* !ALT_I8080 */ - Tstates_t T_max, T_dma; + Tstates_t T_max, T_dma, T_start; uint64_t t1, t2; long tdiff; + bool single_step; + + /* remember CPU clock and single step mode for frequency calculation */ + T_start = T; + single_step = (cpu_state & ST_SINGLE_STEP) != 0; T_max = T + tmax; t1 = get_clock_us(); #ifdef FRONTPANEL if (F_flag) { + t2 = get_clock_us(); fp_clock++; fp_sampleData(); + cpu_tadj += get_clock_us() - t2; } #endif @@ -463,8 +474,10 @@ void cpu_8080(void) if (bus_request) { /* DMA bus request */ #ifdef FRONTPANEL if (F_flag) { + t2 = get_clock_us(); fp_clock += 1000; fp_sampleData(); + cpu_tadj += get_clock_us() - t2; } #endif if (dma_bus_master) { @@ -484,8 +497,10 @@ void cpu_8080(void) } #ifdef FRONTPANEL if (F_flag) { + t2 = get_clock_us(); fp_clock += 1000; fp_sampleData(); + cpu_tadj += get_clock_us() - t2; } #endif } @@ -506,11 +521,13 @@ void cpu_8080(void) #endif #ifdef FRONTPANEL if (F_flag) { + t2 = get_clock_us(); fp_clock += 1000; fp_led_data = (int_data != -1) ? (BYTE) int_data : 0xff; fp_sampleData(); wait_int_step(); + cpu_tadj += get_clock_us() - t2; if (cpu_state & ST_RESET) goto leave; } @@ -525,8 +542,10 @@ void cpu_8080(void) #endif #ifdef FRONTPANEL if (F_flag) { + t2 = get_clock_us(); fp_clock++; fp_sampleLightGroup(0, 0); + cpu_tadj += get_clock_us() - t2; } #endif @@ -593,17 +612,21 @@ void cpu_8080(void) #include "alt8080.h" #endif - if (T >= T_max) { /* adjust CPU speed and update time */ + /* adjust CPU speed and update time */ + if (T >= T_max && !single_step) { T_max = T + tmax; t2 = get_clock_us(); tdiff = t2 - t1; - if (f_value && !cpu_needed && tdiff < 10000L) { - sleep_for_us(10000L - tdiff); - t2 = get_clock_us(); - tdiff = t2 - t1; - } + if (f_value) { + if (!cpu_needed && tdiff < 10000L) { + sleep_for_us(10000L - tdiff); + t2 = get_clock_us(); + tdiff = t2 - t1; + } + } else + tdiff -= cpu_tadj; T_freq = T; - cpu_time += tdiff - cpu_tadj; + cpu_time += tdiff; cpu_tadj = 0; t1 = t2; } @@ -640,10 +663,12 @@ void cpu_8080(void) #endif #ifdef FRONTPANEL if (F_flag) { + t2 = get_clock_us(); fp_led_address = PC; fp_led_data = getmem(PC); fp_clock++; fp_sampleData(); + cpu_tadj += get_clock_us() - t2; } #endif #ifdef SIMPLEPANEL @@ -651,10 +676,19 @@ void cpu_8080(void) fp_led_data = getmem(PC); #endif - /* update CPU time */ - tdiff = get_clock_us() - t1; + /* update CPU time */ + if (single_step) { + if (f_value) /* use f_value MHz in single step */ + tdiff = (T - T_start) / f_value; + else /* else use 100 MHz in single step */ + tdiff = (T - T_start) / 100; + } else { + tdiff = get_clock_us() - t1; + if (!f_value) + tdiff -= cpu_tadj; + } T_freq = T; - cpu_time += tdiff - cpu_tadj; + cpu_time += tdiff; cpu_tadj = 0; } diff --git a/z80core/simcore.c b/z80core/simcore.c index 1d044eea..c4678887 100644 --- a/z80core/simcore.c +++ b/z80core/simcore.c @@ -278,7 +278,7 @@ BYTE io_in(BYTE addrl, BYTE addrh) fp_led_address = (addrh << 8) + addrl; fp_led_data = io_data; fp_sampleData(); - val = wait_step(false); + val = wait_step(); /* when single stepped INP get last set value of port */ if (val && port_in[addrl]) @@ -342,7 +342,7 @@ void io_out(BYTE addrl, BYTE addrh, BYTE data) fp_led_address = (addrh << 8) + addrl; fp_led_data = IO_DATA_UNUSED; fp_sampleData(); - wait_step(false); + wait_step(); } #endif #ifdef SIMPLEPANEL diff --git a/z80core/simz80-cb.c b/z80core/simz80-cb.c index 221d04ce..975622e1 100644 --- a/z80core/simz80-cb.c +++ b/z80core/simz80-cb.c @@ -17,6 +17,7 @@ #include "simz80-cb.h" #ifdef FRONTPANEL +#include "simport.h" #include "frontpanel.h" #endif @@ -371,6 +372,9 @@ int op_cb_handle(void) #undef UNDOC register int t; +#ifdef FRONTPANEL + uint64_t t0; +#endif #ifdef BUS_8080 /* M1 opcode fetch */ @@ -379,9 +383,11 @@ int op_cb_handle(void) #endif #ifdef FRONTPANEL if (F_flag) { + t0 = get_clock_us(); /* update frontpanel */ fp_clock++; fp_sampleLightGroup(0, 0); + cpu_tadj += get_clock_us() - t0; } #endif diff --git a/z80core/simz80-dd.c b/z80core/simz80-dd.c index 162469e0..349a5fae 100644 --- a/z80core/simz80-dd.c +++ b/z80core/simz80-dd.c @@ -18,6 +18,7 @@ #include "simz80-ddcb.h" #ifdef FRONTPANEL +#include "simport.h" #include "frontpanel.h" #endif @@ -338,6 +339,9 @@ int op_dd_handle(void) #undef UNDOC register int t; +#ifdef FRONTPANEL + uint64_t t0; +#endif #ifdef BUS_8080 /* M1 opcode fetch */ @@ -346,9 +350,11 @@ int op_dd_handle(void) #endif #ifdef FRONTPANEL if (F_flag) { + t0 = get_clock_us(); /* update frontpanel */ fp_clock++; fp_sampleLightGroup(0, 0); + cpu_tadj += get_clock_us() - t0; } #endif diff --git a/z80core/simz80-ed.c b/z80core/simz80-ed.c index d42b373d..ed7813aa 100644 --- a/z80core/simz80-ed.c +++ b/z80core/simz80-ed.c @@ -18,6 +18,7 @@ #include "simz80-ed.h" #ifdef FRONTPANEL +#include "simport.h" #include "frontpanel.h" #endif @@ -320,6 +321,9 @@ int op_ed_handle(void) #undef UNDOC register int t; +#ifdef FRONTPANEL + uint64_t t0; +#endif #ifdef BUS_8080 /* M1 opcode fetch */ @@ -328,9 +332,11 @@ int op_ed_handle(void) #endif #ifdef FRONTPANEL if (F_flag) { + t0 = get_clock_us(); /* update frontpanel */ fp_clock++; fp_sampleLightGroup(0, 0); + cpu_tadj += get_clock_us() - t0; } #endif diff --git a/z80core/simz80-fd.c b/z80core/simz80-fd.c index 32bc1053..6057c76e 100644 --- a/z80core/simz80-fd.c +++ b/z80core/simz80-fd.c @@ -18,6 +18,7 @@ #include "simz80-fdcb.h" #ifdef FRONTPANEL +#include "simport.h" #include "frontpanel.h" #endif @@ -338,6 +339,9 @@ int op_fd_handle(void) #undef UNDOC register int t; +#ifdef FRONTPANEL + uint64_t t0; +#endif #ifdef BUS_8080 /* M1 opcode fetch */ @@ -346,9 +350,11 @@ int op_fd_handle(void) #endif #ifdef FRONTPANEL if (F_flag) { + t0 = get_clock_us(); /* update frontpanel */ fp_clock++; fp_sampleLightGroup(0, 0); + cpu_tadj += get_clock_us() - t0; } #endif diff --git a/z80core/simz80.c b/z80core/simz80.c index 674a02b6..769a5878 100644 --- a/z80core/simz80.c +++ b/z80core/simz80.c @@ -386,17 +386,24 @@ void cpu_z80(void) }; #endif /* !ALT_Z80 */ - Tstates_t T_max, T_dma; + Tstates_t T_max, T_dma, T_start; uint64_t t1, t2; long tdiff; WORD p; + bool single_step; + + /* remember CPU clock and single step mode for frequency calculation */ + T_start = T; + single_step = (cpu_state & ST_SINGLE_STEP) != 0; T_max = T + tmax; t1 = get_clock_us(); #ifdef FRONTPANEL if (F_flag) { + t2 = get_clock_us(); fp_clock++; fp_sampleData(); + cpu_tadj += get_clock_us() - t2; } #endif @@ -450,8 +457,10 @@ void cpu_z80(void) if (bus_request) { /* DMA bus request */ #ifdef FRONTPANEL if (F_flag) { + t2 = get_clock_us(); fp_clock += 1000; fp_sampleData(); + cpu_tadj += get_clock_us() - t2; } #endif if (dma_bus_master) { @@ -471,8 +480,10 @@ void cpu_z80(void) } #ifdef FRONTPANEL if (F_flag) { + t2 = get_clock_us(); fp_clock += 1000; fp_sampleData(); + cpu_tadj += get_clock_us() - t2; } #endif } @@ -503,11 +514,13 @@ void cpu_z80(void) #endif #ifdef FRONTPANEL if (F_flag) { + t2 = get_clock_us(); fp_clock += 1000; fp_led_data = (int_data != -1) ? (BYTE) int_data : 0xff; fp_sampleData(); wait_int_step(); + cpu_tadj += get_clock_us() - t2; if (cpu_state & ST_RESET) goto leave; } @@ -611,17 +624,21 @@ void cpu_z80(void) #include "altz80.h" #endif - if (T >= T_max) { /* adjust CPU speed and update time */ + /* adjust CPU speed and update time */ + if (T >= T_max && !single_step) { T_max = T + tmax; t2 = get_clock_us(); tdiff = t2 - t1; - if (f_value && !cpu_needed && tdiff < 10000L) { - sleep_for_us(10000L - tdiff); - t2 = get_clock_us(); - tdiff = t2 - t1; - } + if (f_value) { + if (!cpu_needed && tdiff < 10000L) { + sleep_for_us(10000L - tdiff); + t2 = get_clock_us(); + tdiff = t2 - t1; + } + } else + tdiff -= cpu_tadj; T_freq = T; - cpu_time += tdiff - cpu_tadj; + cpu_time += tdiff; cpu_tadj = 0; t1 = t2; } @@ -659,10 +676,12 @@ void cpu_z80(void) #ifdef FRONTPANEL if (F_flag) { + t2 = get_clock_us(); fp_led_address = PC; fp_led_data = getmem(PC); fp_clock++; fp_sampleData(); + cpu_tadj += get_clock_us() - t2; } #endif #ifdef SIMPLEPANEL @@ -670,9 +689,19 @@ void cpu_z80(void) fp_led_data = getmem(PC); #endif - /* update CPU time */ + /* update CPU time */ + if (single_step) { + if (f_value) /* use f_value MHz in single step */ + tdiff = (T - T_start) / f_value; + else /* else use 100 MHz in single step */ + tdiff = (T - T_start) / 100; + } else { + tdiff = get_clock_us() - t1; + if (!f_value) + tdiff -= cpu_tadj; + } T_freq = T; - cpu_time += get_clock_us() - t1 - cpu_tadj; + cpu_time += tdiff; cpu_tadj = 0; } From b64800054971db453bb69101cad7b3aa6e5e639d Mon Sep 17 00:00:00 2001 From: Thomas Eberhardt Date: Thu, 23 Jan 2025 01:39:54 +0100 Subject: [PATCH 06/22] use curr. frequency instead of 100 MHz single stepping in free running mode --- z80core/sim8080.c | 10 ++++++---- z80core/simz80.c | 10 ++++++---- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/z80core/sim8080.c b/z80core/sim8080.c index 55cdf8d3..f3e1dc54 100644 --- a/z80core/sim8080.c +++ b/z80core/sim8080.c @@ -677,11 +677,13 @@ void cpu_8080(void) #endif /* update CPU time */ - if (single_step) { - if (f_value) /* use f_value MHz in single step */ + if (single_step) { /* if single stepping */ + if (f_value) /* use f_value MHz in locked mode */ tdiff = (T - T_start) / f_value; - else /* else use 100 MHz in single step */ - tdiff = (T - T_start) / 100; + else if (T_freq) /* else use current frequency */ + tdiff = ((T - T_start) * cpu_time) / T_freq; + else /* avoid division by 0 */ + tdiff = T - T_start; } else { tdiff = get_clock_us() - t1; if (!f_value) diff --git a/z80core/simz80.c b/z80core/simz80.c index 769a5878..68cae836 100644 --- a/z80core/simz80.c +++ b/z80core/simz80.c @@ -690,11 +690,13 @@ void cpu_z80(void) #endif /* update CPU time */ - if (single_step) { - if (f_value) /* use f_value MHz in single step */ + if (single_step) { /* if single stepping */ + if (f_value) /* use f_value MHz in locked mode */ tdiff = (T - T_start) / f_value; - else /* else use 100 MHz in single step */ - tdiff = (T - T_start) / 100; + else if (T_freq) /* else use current frequency */ + tdiff = ((T - T_start) * cpu_time) / T_freq; + else /* avoid division by 0 */ + tdiff = T - T_start; } else { tdiff = get_clock_us() - t1; if (!f_value) From 030124ac8ca6b78d1f906b4dc92f17bfae5c6333 Mon Sep 17 00:00:00 2001 From: Thomas Eberhardt Date: Thu, 23 Jan 2025 01:54:08 +0100 Subject: [PATCH 07/22] add history entr --- iodevices/simbdos.c | 1 + 1 file changed, 1 insertion(+) diff --git a/iodevices/simbdos.c b/iodevices/simbdos.c index 00d50a33..746b317d 100644 --- a/iodevices/simbdos.c +++ b/iodevices/simbdos.c @@ -28,6 +28,7 @@ * * History: * 03-OCT-2019 (Mike Douglas) Original + * 23-JAN-2025 (Thomas Eberhardt) Use DMA memory access */ #include From 0e6d4456e336dcb8a0459b57006d12bf77be767b Mon Sep 17 00:00:00 2001 From: Thomas Eberhardt Date: Thu, 23 Jan 2025 06:57:42 +0100 Subject: [PATCH 08/22] add memory display to introspection panel Still needs way to change address of display memory page.:x Fixes compilation with X11. --- z80core/simpanel.c | 371 +++++++++++++++++++++++++++++++-------------- 1 file changed, 258 insertions(+), 113 deletions(-) diff --git a/z80core/simpanel.c b/z80core/simpanel.c index 2b1dd4da..6c749b2f 100644 --- a/z80core/simpanel.c +++ b/z80core/simpanel.c @@ -90,6 +90,8 @@ typedef struct draw_grid { #include "fonts/font28.h" #include "fonts/font32.h" +WORD mbase; + /* SDL2/X11 stuff */ static unsigned xsize, ysize; static uint32_t *pixels; @@ -120,8 +122,8 @@ static pthread_t thread; */ static void open_display(void) { - xsize = 240; - ysize = 135; + xsize = 576; /* 72 * 8 */ + ysize = 376; #ifdef WANT_SDL window = SDL_CreateWindow("Z80pack", @@ -375,6 +377,44 @@ static inline void draw_char(const unsigned x, const unsigned y, const char c, } } +/* + * Draw a string using the specified font and colors. + */ +static inline void draw_string(unsigned x, const unsigned y, const char *s, + const font_t *font, const uint32_t fgc, + const uint32_t bgc) +{ +#ifdef DRAW_DEBUG + int n; + + if (pixels == NULL) { + fprintf(stderr, "%s: pixels texture is NULL\n", __func__); + return; + } + if (s == NULL) { + fprintf(stderr, "%s: string is NULL\n", __func__); + return; + } + if (font == NULL) { + fprintf(stderr, "%s: font is NULL\n", __func__); + return; + } + n = strlen(s); + if (x >= xsize || y >= ysize || x + n * font->width > xsize || + y + font->height > ysize) { + fprintf(stderr, "%s: string \"%s\" at (%d,%d)-(%d,%d) is " + "outside (0,0)-(%d,%d)\n", __func__, s, x, y, + x + n * font->width - 1, y + font->height - 1, + xsize - 1, ysize - 1); + return; + } +#endif + while (*s) { + draw_char(x, y, *s++, font, fgc, bgc); + x += font->width; + } +} + /* * Draw a horizontal line in the specified color. */ @@ -598,32 +638,24 @@ static inline void draw_led(const unsigned x, const unsigned y, } /* - * CPU status displays: + * Draw CPU registers: * - * Z80 CPU using font20 (10 x 20 pixels): + * Z80 CPU: * - * 01234567890123456789012 - * 0 A xx BC xxxx DE xxxx - * 1 HL xxxx SP xxxx PC xxxx - * 2 IX xxxx IY xxxx AF'xxxx - * 3 BC'xxxx DE'xxxx HL'xxxx - * 4 F SZHPNC IF12 IR xxxx - * Model x.x o xx.xx°C + * AF 0123 BC 0123 DE 0123 HL 0123 SP 0123 PC 0123 + * AF'0123 BC'0123 DE'0123 HL'0123 IX 0123 IY 0123 + * F SXHPNC IF 12 I 00 R 00 * - * 8080 CPU using font28 (14 x 28 pixels): + * 8080 CPU: * - * 0123456789012345 - * 0 A xx BC xxxx - * 1 DE xxxx HL xxxx - * 2 SP xxxx PC xxxx - * 3 F SZHPC IF 1 - * Model x.x o xx.xx°C + * AF 0123 BC 0123 DE 0123 HL 0123 SP 0123 PC 0123 + * F SZHPC IF 1 */ typedef struct reg { uint8_t x; uint8_t y; - enum { RB, RW, RF, RI, RA, RR } type; + enum { RB, RW, RJ, RF, RI, RR } type; const char *l; union { struct { @@ -632,6 +664,9 @@ typedef struct reg { struct { const WORD *p; } w; + struct { + const int *p; + } i; struct { char c; uint8_t m; @@ -639,42 +674,43 @@ typedef struct reg { }; } reg_t; -#ifndef EXCLUDE_Z80 +#define RXOFF 5 /* x pixel offset of registers text grid */ +#define RYOFF 0 /* y pixel offset of registers text grid */ +#define RSPC 3 /* vertical text spacing */ -#define XOFF20 5 /* x pixel offset of text grid for font20 */ -#define YOFF20 0 /* y pixel offset of text grid for font20 */ -#define SPC20 3 /* vertical text spacing for font20 */ +#ifndef EXCLUDE_Z80 static const reg_t regs_z80[] = { - { 4, 0, RB, "A", .b.p = &A }, + { 4, 0, RB, "AF", .b.p = &A }, + { 6, 0, RJ, NULL, .i.p = &F }, { 12, 0, RB, "BC", .b.p = &B }, { 14, 0, RB, NULL, .b.p = &C }, { 20, 0, RB, "DE", .b.p = &D }, { 22, 0, RB, NULL, .b.p = &E }, - { 4, 1, RB, "HL", .b.p = &H }, - { 6, 1, RB, NULL, .b.p = &L }, - { 14, 1, RW, "SP", .w.p = &SP }, - { 22, 1, RW, "PC", .w.p = &PC }, - { 6, 2, RW, "IX", .w.p = &IX }, - { 14, 2, RW, "IY", .w.p = &IY }, - { 20, 2, RB, "AF\'", .b.p = &A_ }, - { 22, 2, RA, NULL, .b.p = NULL }, - { 4, 3, RB, "BC\'", .b.p = &B_ }, - { 6, 3, RB, NULL, .b.p = &C_ }, - { 12, 3, RB, "DE\'", .b.p = &D_ }, - { 14, 3, RB, NULL, .b.p = &E_ }, - { 20, 3, RB, "HL\'", .b.p = &H_ }, - { 22, 3, RB, NULL, .b.p = &L_ }, - { 3, 4, RF, NULL, .f.c = 'S', .f.m = S_FLAG }, - { 4, 4, RF, "F", .f.c = 'Z', .f.m = Z_FLAG }, - { 5, 4, RF, NULL, .f.c = 'H', .f.m = H_FLAG }, - { 6, 4, RF, NULL, .f.c = 'P', .f.m = P_FLAG }, - { 7, 4, RF, NULL, .f.c = 'N', .f.m = N_FLAG }, - { 8, 4, RF, NULL, .f.c = 'C', .f.m = C_FLAG }, - { 13, 4, RI, NULL, .f.c = '1', .f.m = 1 }, - { 14, 4, RI, "IF", .f.c = '2', .f.m = 2 }, - { 20, 4, RB, "IR", .b.p = &I }, - { 22, 4, RR, NULL, .b.p = NULL } + { 28, 0, RB, "HL", .b.p = &H }, + { 30, 0, RB, NULL, .b.p = &L }, + { 38, 0, RW, "SP", .w.p = &SP }, + { 46, 0, RW, "PC", .w.p = &PC }, + { 4, 1, RB, "AF\'", .b.p = &A_ }, + { 6, 1, RJ, NULL, .i.p = &F_ }, + { 12, 1, RB, "BC\'", .b.p = &B_ }, + { 14, 1, RB, NULL, .b.p = &C_ }, + { 20, 1, RB, "DE\'", .b.p = &D_ }, + { 22, 1, RB, NULL, .b.p = &E_ }, + { 28, 1, RB, "HL\'", .b.p = &H_ }, + { 30, 1, RB, NULL, .b.p = &L_ }, + { 38, 1, RW, "IX", .w.p = &IX }, + { 46, 1, RW, "IY", .w.p = &IY }, + { 3, 2, RF, NULL, .f.c = 'S', .f.m = S_FLAG }, + { 4, 2, RF, "F", .f.c = 'Z', .f.m = Z_FLAG }, + { 5, 2, RF, NULL, .f.c = 'H', .f.m = H_FLAG }, + { 6, 2, RF, NULL, .f.c = 'P', .f.m = P_FLAG }, + { 7, 2, RF, NULL, .f.c = 'N', .f.m = N_FLAG }, + { 8, 2, RF, NULL, .f.c = 'C', .f.m = C_FLAG }, + { 19, 2, RI, "IF", .f.c = '1', .f.m = 1 }, + { 20, 2, RI, NULL, .f.c = '2', .f.m = 2 }, + { 28, 2, RB, "I", .b.p = &I }, + { 36, 2, RR, "R", .b.p = NULL } }; static const int num_regs_z80 = sizeof(regs_z80) / sizeof(reg_t); @@ -682,46 +718,38 @@ static const int num_regs_z80 = sizeof(regs_z80) / sizeof(reg_t); #ifndef EXCLUDE_I8080 -#define XOFF28 8 /* x pixel offset of text grid for font28 */ -#define YOFF28 0 /* y pixel offset of text grid for font28 */ -#define SPC28 1 /* vertical text spacing for font28 */ - static const reg_t regs_8080[] = { - { 4, 0, RB, "A", .b.p = &A }, - { 13, 0, RB, "BC", .b.p = &B }, - { 15, 0, RB, NULL, .b.p = &C }, - { 4, 1, RB, "DE", .b.p = &D }, - { 6, 1, RB, NULL, .b.p = &E }, - { 13, 1, RB, "HL", .b.p = &H }, - { 15, 1, RB, NULL, .b.p = &L }, - { 6, 2, RW, "SP", .w.p = &SP }, - { 15, 2, RW, "PC", .w.p = &PC }, - { 3, 3, RF, NULL, .f.c = 'S', .f.m = S_FLAG }, - { 4, 3, RF, "F", .f.c = 'Z', .f.m = Z_FLAG }, - { 5, 3, RF, NULL, .f.c = 'H', .f.m = H_FLAG }, - { 6, 3, RF, NULL, .f.c = 'P', .f.m = P_FLAG }, - { 7, 3, RF, NULL, .f.c = 'C', .f.m = C_FLAG }, - { 15, 3, RI, "IF", .f.c = '1', .f.m = 3 } + { 4, 0, RB, "AF", .b.p = &A }, + { 6, 0, RJ, NULL, .i.p = &F }, + { 12, 0, RB, "BC", .b.p = &B }, + { 14, 0, RB, NULL, .b.p = &C }, + { 20, 0, RB, "DE", .b.p = &D }, + { 22, 0, RB, NULL, .b.p = &E }, + { 28, 0, RB, "HL", .b.p = &H }, + { 30, 0, RB, NULL, .b.p = &L }, + { 38, 0, RW, "SP", .w.p = &SP }, + { 46, 0, RW, "PC", .w.p = &PC }, + { 3, 1, RF, NULL, .f.c = 'S', .f.m = S_FLAG }, + { 4, 1, RF, "F", .f.c = 'Z', .f.m = Z_FLAG }, + { 5, 1, RF, NULL, .f.c = 'H', .f.m = H_FLAG }, + { 6, 1, RF, NULL, .f.c = 'P', .f.m = P_FLAG }, + { 7, 1, RF, NULL, .f.c = 'C', .f.m = C_FLAG }, + { 19, 1, RI, "IF", .f.c = '1', .f.m = 3 } }; static const int num_regs_8080 = sizeof(regs_8080) / sizeof(reg_t); #endif /* !EXCLUDE_I8080 */ -/* - * Refresh the display buffer - */ -static void refresh(bool tick) +static void draw_cpu_regs(void) { char c; - int i, j, f, digit, n = 0; - bool onlyz; - unsigned x, y; + int i, j, n = 0; + unsigned x; WORD w; const char *s; const reg_t *rp = NULL; draw_grid_t grid = { }; int cpu_type = cpu; - static int freq; /* use cpu_type in the rest of this function, since cpu can change */ @@ -738,35 +766,34 @@ static void refresh(bool tick) } #endif - draw_clear(C_DKBLUE); - /* setup text grid and draw grid lines */ #ifndef EXCLUDE_Z80 if (cpu_type == Z80) { - draw_setup_grid(&grid, XOFF20, YOFF20, -1, 5, &font20, - SPC20); + draw_setup_grid(&grid, RXOFF, RYOFF, 47, 3, &font18, RSPC); /* draw vertical grid lines */ - draw_grid_vline(7, 0, 4, &grid, C_DKYELLOW); - draw_grid_vline(10, 4, 1, &grid, C_DKYELLOW); - draw_grid_vline(15, 0, 5, &grid, C_DKYELLOW); + draw_grid_vline(7, 0, 2, &grid, C_DKYELLOW); + draw_grid_vline(15, 0, 3, &grid, C_DKYELLOW); + draw_grid_vline(23, 0, 3, &grid, C_DKYELLOW); + draw_grid_vline(31, 0, 3, &grid, C_DKYELLOW); + draw_grid_vline(39, 0, 2, &grid, C_DKYELLOW); /* draw horizontal grid lines */ - for (i = 1; i < 5; i++) - draw_grid_hline(0, i, grid.cols, &grid, - C_DKYELLOW); + draw_grid_hline(0, 1, grid.cols, &grid, C_DKYELLOW); + draw_grid_hline(0, 2, grid.cols, &grid, C_DKYELLOW); } #endif #ifndef EXCLUDE_I8080 if (cpu_type == I8080) { - draw_setup_grid(&grid, XOFF28, YOFF28, -1, 4, &font28, - SPC28); + draw_setup_grid(&grid, RXOFF, RYOFF, 47, 2, &font18, RSPC); - /* draw vertical grid line */ - draw_grid_vline(8, 0, 4, &grid, C_DKYELLOW); - /* draw horizontal grid lines */ - for (i = 1; i < 4; i++) - draw_grid_hline(0, i, grid.cols, &grid, - C_DKYELLOW); + /* draw vertical grid lines */ + draw_grid_vline(7, 0, 1, &grid, C_DKYELLOW); + draw_grid_vline(15, 0, 2, &grid, C_DKYELLOW); + draw_grid_vline(23, 0, 1, &grid, C_DKYELLOW); + draw_grid_vline(31, 0, 1, &grid, C_DKYELLOW); + draw_grid_vline(39, 0, 1, &grid, C_DKYELLOW); + /* draw horizontal grid line */ + draw_grid_hline(0, 1, grid.cols, &grid, C_DKYELLOW); } #endif /* draw register labels & contents */ @@ -788,6 +815,10 @@ static void refresh(bool tick) w = *(rp->w.p); j = 4; break; + case RJ: /* F or F_ integer register */ + w = *(rp->i.p); + j = 2; + break; case RF: /* flags */ draw_grid_char(rp->x, rp->y, rp->f.c, &grid, (F & rp->f.m) ? C_GREEN : C_RED, @@ -799,10 +830,6 @@ static void refresh(bool tick) C_GREEN : C_RED, C_DKBLUE); continue; #ifndef EXCLUDE_Z80 - case RA: /* alternate flags (int) */ - w = F_; - j = 2; - break; case RR: /* refresh register */ w = (R_ & 0x80) | (R & 0x7f); j = 2; @@ -820,26 +847,132 @@ static void refresh(bool tick) w >>= 4; } } +} + +/* + * Draw the memory page: + * + * 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F + * 0000 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 0123456789ABCDEF + * 0010 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 0123456789ABCDEF + * 0020 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 0123456789ABCDEF + * 0030 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 0123456789ABCDEF + * 0040 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 0123456789ABCDEF + * 0050 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 0123456789ABCDEF + * 0060 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 0123456789ABCDEF + * 0070 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 0123456789ABCDEF + * 0080 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 0123456789ABCDEF + * 0090 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 0123456789ABCDEF + * 00A0 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 0123456789ABCDEF + * 00B0 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 0123456789ABCDEF + * 00C0 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 0123456789ABCDEF + * 00D0 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 0123456789ABCDEF + * 00E0 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 0123456789ABCDEF + * 00F0 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 0123456789ABCDEF + */ + +#define MXOFF 4 +#define MYOFF 64 +#define MSPC 1 + +static void draw_mem_page(WORD mbase) +{ + char c, dc; + int i, j; + draw_grid_t grid; + + draw_setup_grid(&grid, MXOFF, MYOFF, 71, 17, &font16, MSPC); + + /* draw vertical grid lines */ + for (i = 0; i < 17; i++) + draw_grid_vline(5 + i * 3, 0, grid.rows, &grid, C_DKYELLOW); + + for (i = 0; i < 16; i++) { + draw_grid_char(6 + i * 3, 0, '0', &grid, C_GREEN, C_DKBLUE); + c = i + (i < 10 ? '0' : 'A' - 10); + draw_grid_char(7 + i * 3, 0, c, &grid, C_GREEN, C_DKBLUE); + } + for (j = 1; j < 17; j++) { + draw_grid_hline(0, j, grid.cols, &grid, C_DKYELLOW); + c = (mbase >> 12) & 0xf; + c += (c < 10 ? '0' : 'A' - 10); + draw_grid_char(0, j, c, &grid, C_GREEN, C_DKBLUE); + c = (mbase >> 8) & 0xf; + c += (c < 10 ? '0' : 'A' - 10); + draw_grid_char(1, j, c, &grid, C_GREEN, C_DKBLUE); + c = (mbase >> 4) & 0xf; + c += (c < 10 ? '0' : 'A' - 10); + draw_grid_char(2, j, c, &grid, C_GREEN, C_DKBLUE); + c = mbase & 0xf; + c += (c < 10 ? '0' : 'A' - 10); + draw_grid_char(3, j, c, &grid, C_GREEN, C_DKBLUE); + for (i = 0; i < 16; i++) { + c = (getmem(mbase) >> 4) & 0xf; + c += (c < 10 ? '0' : 'A' - 10); + draw_grid_char(6 + i * 3, j, c, &grid, C_CYAN, + C_DKBLUE); + c = getmem(mbase++) & 0xf; + c += (c < 10 ? '0' : 'A' - 10); + draw_grid_char(7 + i * 3, j, c, &grid, C_CYAN, + C_DKBLUE); + } + mbase -= 16; + for (i = 0; i < 16; i++) { + c = getmem(mbase++); + dc = c & 0x7f; + if (dc < 32 || dc == 127) + dc = '.'; + draw_grid_char(55 + i, j, dc, &grid, + (c & 0x80) ? C_ORANGE : C_YELLOW, + C_DKBLUE); + } + } +} - y = ysize - font20.height; - n = xsize / font20.width; - x = (xsize - n * font20.width) / 2; +/* + * Draw the info line: + * + * Z80pack x.xx xxxx.xx MHz + */ +static void draw_info(bool tick) +{ + char c; + int i, f, digit; + bool onlyz; + const char *s; + const font_t *font = &font18; + const unsigned w = font->width; + const unsigned n = xsize / w; + const unsigned x = (xsize - n * w) / 2; + const unsigned y = ysize - font->height; + static int count, fps, freq; /* draw product info */ s = "Z80pack " RELEASE; for (i = 0; *s; i++) - draw_char(i * font20.width + x, y, *s++, &font20, - C_ORANGE, C_DKBLUE); + draw_char(i * w + x, y, *s++, font, C_ORANGE, C_DKBLUE); /* draw frequency label */ - draw_char((n - 6) * font20.width + x, y, '.', &font20, - C_ORANGE, C_DKBLUE); - draw_char((n - 3) * font20.width + x, y, 'M', &font20, - C_ORANGE, C_DKBLUE); - draw_char((n - 2) * font20.width + x, y, 'H', &font20, - C_ORANGE, C_DKBLUE); - draw_char((n - 1) * font20.width + x, y, 'z', &font20, - C_ORANGE, C_DKBLUE); + draw_char((n - 7) * w + x, y, '.', font, C_ORANGE, C_DKBLUE); + draw_char((n - 3) * w + x, y, 'M', font, C_ORANGE, C_DKBLUE); + draw_char((n - 2) * w + x, y, 'H', font, C_ORANGE, C_DKBLUE); + draw_char((n - 1) * w + x, y, 'z', font, C_ORANGE, C_DKBLUE); + + /* update fps every second */ + count++; + if (tick) { + fps = count; + count = 0; + } + draw_char(30 * w + x, y, fps > 99 ? fps / 100 + '0' : ' ', + font, C_ORANGE, C_DKBLUE); + draw_char(31 * w + x, y, fps > 9 ? (fps / 10) % 10 + '0' : ' ', + font, C_ORANGE, C_DKBLUE); + draw_char(32 * w + x, y, fps % 10 + '0', + font, C_ORANGE, C_DKBLUE); + draw_char(34 * w + x, y, 'f', font, C_ORANGE, C_DKBLUE); + draw_char(35 * w + x, y, 'p', font, C_ORANGE, C_DKBLUE); + draw_char(36 * w + x, y, 's', font, C_ORANGE, C_DKBLUE); /* update frequency every second */ if (tick && cpu_time) @@ -857,8 +990,8 @@ static void refresh(bool tick) c = ' '; else onlyz = false; - draw_char((n - 10 + i) * font20.width + x, y, - c, &font20, C_ORANGE, C_DKBLUE); + draw_char((n - 11 + i) * w + x, y, c, + font, C_ORANGE, C_DKBLUE); if (i < 6) digit /= 10; if (i == 3) @@ -866,6 +999,18 @@ static void refresh(bool tick) } } +/* + * Refresh the display buffer + */ +static void refresh(bool tick) +{ + draw_clear(C_DKBLUE); + + draw_cpu_regs(); + draw_mem_page(mbase); + draw_info(tick); +} + #ifdef WANT_SDL /* function for updating the display */ @@ -908,7 +1053,7 @@ static void *update_display(void *arg) UNUSED(arg); t1 = get_clock_us(); - ttick = t + 1000000; + ttick = t1 + 1000000; while (true) { /* lock display, don't cancel thread while locked */ From 0d97e869d1529d0f0cb16ad3fdc3e0d1b238ce5c Mon Sep 17 00:00:00 2001 From: Udo Munk Date: Thu, 23 Jan 2025 09:05:24 +0100 Subject: [PATCH 09/22] more logical order of VM initialization --- picosim/srcsim/picosim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/picosim/srcsim/picosim.c b/picosim/srcsim/picosim.c index b741d7da..e5c78e2c 100644 --- a/picosim/srcsim/picosim.c +++ b/picosim/srcsim/picosim.c @@ -198,10 +198,10 @@ int main(void) #endif init_cpu(); /* initialize CPU */ + PC = 0xff00; /* power on jump into the boot ROM */ init_disks(); /* initialize disk drives */ init_memory(); /* initialize memory configuration */ init_io(); /* initialize I/O devices */ - PC = 0xff00; /* power on jump into the boot ROM */ config(); /* configure the machine */ f_value = speed; /* setup speed of the CPU */ From 5924ac3c4dcbdbe56ce97f96649abbf95c5b9ca7 Mon Sep 17 00:00:00 2001 From: Thomas Eberhardt Date: Fri, 24 Jan 2025 09:29:42 +0100 Subject: [PATCH 10/22] restore line deleted by mistake and fix typo --- cromemcosim/srcsim/simctl.c | 2 +- z80core/altz80.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cromemcosim/srcsim/simctl.c b/cromemcosim/srcsim/simctl.c index df645a41..1007839d 100644 --- a/cromemcosim/srcsim/simctl.c +++ b/cromemcosim/srcsim/simctl.c @@ -369,7 +369,7 @@ bool wait_step(void) */ void wait_int_step(void) { - + if (cpu_state != ST_SINGLE_STEP) return; cpu_switch = CPUSW_STEPCYCLE; diff --git a/z80core/altz80.h b/z80core/altz80.h index 1bfe2161..4535e463 100644 --- a/z80core/altz80.h +++ b/z80core/altz80.h @@ -1383,7 +1383,7 @@ /* update frontpanel */ fp_clock++; fp_sampleLightGroup(0, 0); - cpu_adj += get_clock_us() - t2; + cpu_tadj += get_clock_us() - t2; } #endif From 66669ed8be4caa9e0da21467b529b895b2783453 Mon Sep 17 00:00:00 2001 From: Thomas Eberhardt Date: Fri, 24 Jan 2025 09:32:42 +0100 Subject: [PATCH 11/22] another timing update... Remove unnecessary single_step stuff. Keep a constantly updated cpu_freq frequency estimate variable and use integer arithmetic for frequency calculations. When sleeping for CPU speed adjustment don't use the timing adjustment, in all other cases subtract it from the spent time. Move "leave" label inside the "if (int_int)" block, looks cleaner. --- picosim/srcsim/picosim.c | 8 +++-- z80core/sim8080.c | 72 +++++++++++++++---------------------- z80core/simcore.c | 9 +++-- z80core/simglb.c | 4 +-- z80core/simglb.h | 4 +-- z80core/simice.c | 10 +++--- z80core/simmain.c | 5 +-- z80core/simpanel.c | 7 ++-- z80core/simz80.c | 76 ++++++++++++++++------------------------ 9 files changed, 87 insertions(+), 108 deletions(-) diff --git a/picosim/srcsim/picosim.c b/picosim/srcsim/picosim.c index e5c78e2c..157adbe5 100644 --- a/picosim/srcsim/picosim.c +++ b/picosim/srcsim/picosim.c @@ -208,7 +208,7 @@ int main(void) if (f_value) tmax = speed * 10000; /* theoretically */ else - tmax = 100000; + tmax = 100000; /* for periodic CPU accounting updates */ put_pixel(0x440000); /* LED green */ @@ -295,6 +295,7 @@ static void picosim_ice_cmd(char *cmd, WORD *wrk_addr) BYTE save[3]; WORD save_PC; Tstates_t T0; + unsigned freq; #ifdef WANT_HB bool save_hb_flag; #endif @@ -346,10 +347,11 @@ static void picosim_ice_cmd(char *cmd, WORD *wrk_addr) s = "JMP"; #endif if (cpu_error == NONE) { + freq = (unsigned) ((T - T0) / 30000ULL); printf("CPU executed %" PRIu64 " %s instructions " "in 3 seconds\n", (T - T0) / 10, s); - printf("clock frequency = %5.2f MHz\n", - ((float) (T - T0)) / 3000000.0); + printf("clock frequency = %5u.%02u MHz\n", + freq / 100, freq % 100); } else puts("Interrupted by user"); break; diff --git a/z80core/sim8080.c b/z80core/sim8080.c index f3e1dc54..b1783566 100644 --- a/z80core/sim8080.c +++ b/z80core/sim8080.c @@ -406,14 +406,9 @@ void cpu_8080(void) #endif /* !ALT_I8080 */ - Tstates_t T_max, T_dma, T_start; + Tstates_t T_max, T_dma; uint64_t t1, t2; long tdiff; - bool single_step; - - /* remember CPU clock and single step mode for frequency calculation */ - T_start = T; - single_step = (cpu_state & ST_SINGLE_STEP) != 0; T_max = T + tmax; t1 = get_clock_us(); @@ -463,11 +458,11 @@ void cpu_8080(void) if (dma_bus_master) { /* hand control to the DMA bus master without BUS_ACK */ - T += (T_dma = (*dma_bus_master)(0)); - if (f_value) { - T_freq = T; - cpu_time += T_dma / f_value; - } + T_dma = (*dma_bus_master)(0); + T += T_dma; + if (cpu_freq) + cpu_time += (1000000ULL * + T_dma) / cpu_freq; } } @@ -483,11 +478,11 @@ void cpu_8080(void) if (dma_bus_master) { /* hand control to the DMA bus master with BUS_ACK */ - T += (T_dma = (*dma_bus_master)(1)); - if (f_value) { - T_freq = T; - cpu_time += T_dma / f_value; - } + T_dma = (*dma_bus_master)(1); + T += T_dma; + if (cpu_freq) + cpu_time += (1000000ULL * + T_dma) / cpu_freq; } /* FOR NOW - MAY BE NEED A PRIORITY SYSTEM LATER */ @@ -510,7 +505,7 @@ void cpu_8080(void) if (int_int) { if (IFF != 3) goto leave; - if (int_protection) /* protect first instr */ + if (int_protection) /* protect first instruction */ goto leave; /* after EI */ IFF = 0; @@ -597,8 +592,8 @@ void cpu_8080(void) if (F_flag) m1_step = true; #endif + leave: } -leave: #ifdef BUS_8080 /* M1 opcode fetch */ @@ -612,22 +607,22 @@ void cpu_8080(void) #include "alt8080.h" #endif - /* adjust CPU speed and update time */ - if (T >= T_max && !single_step) { + /* adjust CPU speed and + update CPU accounting */ + if (T >= T_max) { T_max = T + tmax; t2 = get_clock_us(); tdiff = t2 - t1; - if (f_value) { - if (!cpu_needed && tdiff < 10000L) { - sleep_for_us(10000L - tdiff); - t2 = get_clock_us(); - tdiff = t2 - t1; - } + if (f_value && !cpu_needed && tdiff < 10000L) { + sleep_for_us(10000L - tdiff); + t2 = get_clock_us(); + tdiff = t2 - t1; /* should be really close + to 10000, but isn't */ + cpu_time += tdiff; } else - tdiff -= cpu_tadj; - T_freq = T; - cpu_time += tdiff; + cpu_time += tdiff - cpu_tadj; cpu_tadj = 0; + cpu_freq = T * 1000000ULL / cpu_time; t1 = t2; } @@ -676,22 +671,10 @@ void cpu_8080(void) fp_led_data = getmem(PC); #endif - /* update CPU time */ - if (single_step) { /* if single stepping */ - if (f_value) /* use f_value MHz in locked mode */ - tdiff = (T - T_start) / f_value; - else if (T_freq) /* else use current frequency */ - tdiff = ((T - T_start) * cpu_time) / T_freq; - else /* avoid division by 0 */ - tdiff = T - T_start; - } else { - tdiff = get_clock_us() - t1; - if (!f_value) - tdiff -= cpu_tadj; - } - T_freq = T; - cpu_time += tdiff; + /* update CPU accounting */ + cpu_time += (get_clock_us() - t1) - cpu_tadj; cpu_tadj = 0; + cpu_freq = T * 1000000ULL / cpu_time; } #ifndef ALT_I8080 @@ -716,6 +699,7 @@ static int op_hlt(void) /* HLT */ uint64_t t; t = get_clock_us(); + #ifdef BUS_8080 cpu_bus = CPU_WO | CPU_HLTA | CPU_MEMR; #endif diff --git a/z80core/simcore.c b/z80core/simcore.c index c4678887..add91b88 100644 --- a/z80core/simcore.c +++ b/z80core/simcore.c @@ -229,12 +229,15 @@ void report_cpu_error(void) */ void report_cpu_stats(void) { + unsigned freq; + if (cpu_time) { + freq = (unsigned) (cpu_freq / 10000ULL); printf("CPU ran %" PRIu64 " ms ", cpu_time / 1000); - printf("and executed %" PRIu64 " t-states\n", T_freq); - printf("Clock frequency %4.2f MHz\n", - (float) (T_freq) / (float) cpu_time); + printf("and executed %" PRIu64 " t-states\n", T); + printf("Clock frequency %4u.%02u MHz\n", + freq / 100, freq % 100); } } diff --git a/z80core/simglb.c b/z80core/simglb.c index 04713d86..a76bc800 100644 --- a/z80core/simglb.c +++ b/z80core/simglb.c @@ -40,9 +40,9 @@ BYTE IFF; /* interrupt flags */ cpu_regs_t cpu_regs; /* CPU registers */ #endif Tstates_t T; /* CPU clock */ -Tstates_t T_freq; /* CPU clock used for frequency calculation */ uint64_t cpu_time; /* time spent running CPU in us */ uint64_t cpu_tadj; /* time spent in non CPU execution areas */ +uint64_t cpu_freq; /* estimated CPU frequency in Hz */ #ifdef BUS_8080 BYTE cpu_bus; /* CPU bus status, for frontpanels */ @@ -66,7 +66,7 @@ BYTE bus_request; /* request address/data bus from CPU */ BusDMA_t bus_mode; /* current bus mode for DMA */ BusDMAFunc_t *dma_bus_master; /* DMA bus master call back func */ int tmax; /* max t-states to execute in 10ms or - when to update the CPU times */ + when to update the CPU accounting */ bool cpu_needed; /* don't adjust CPU freq if needed */ /* diff --git a/z80core/simglb.h b/z80core/simglb.h index db9df46c..aa0cb993 100644 --- a/z80core/simglb.h +++ b/z80core/simglb.h @@ -31,8 +31,8 @@ extern BYTE IFF; #else #include "altregs.h" #endif -extern Tstates_t T, T_freq; -extern uint64_t cpu_time, cpu_tadj; +extern Tstates_t T; +extern uint64_t cpu_time, cpu_tadj, cpu_freq; #ifdef BUS_8080 extern BYTE cpu_bus; diff --git a/z80core/simice.c b/z80core/simice.c index d4702c58..82585754 100644 --- a/z80core/simice.c +++ b/z80core/simice.c @@ -1341,9 +1341,10 @@ static void do_clock(void) BYTE save[3]; WORD save_PC; Tstates_t T0; - static struct sigaction newact; - static struct itimerval tim; const char *s = NULL; + struct sigaction newact; + struct itimerval tim; + unsigned freq; #ifdef WANT_HB bool save_hb_flag; @@ -1387,10 +1388,11 @@ static void do_clock(void) s = "JMP"; #endif if (cpu_error == NONE) { + freq = (unsigned) ((T - T0) / 30000ULL); printf("CPU executed %" PRIu64 " %s instructions " "in 3 seconds\n", (T - T0) / 10, s); - printf("clock frequency = %5.2f MHz\n", - ((float) (T - T0)) / 3000000.0); + printf("clock frequency = %5u.%02u MHz\n", + freq / 100, freq % 100); } else puts("Interrupted by user"); } diff --git a/z80core/simmain.c b/z80core/simmain.c index b7907517..f89d09e0 100644 --- a/z80core/simmain.c +++ b/z80core/simmain.c @@ -69,7 +69,7 @@ int main(int argc, char *argv[]) if (f_value) tmax = CPU_SPEED * 10000; /* theoretically */ else - tmax = 100000; + tmax = 100000; /* for periodic CPU accounting updates */ #endif while (--argc > 0 && (*++argv)[0] == '-') @@ -119,7 +119,8 @@ int main(int argc, char *argv[]) if (f_value) tmax = f_value * 10000; /* theoretically */ else - tmax = 100000; + tmax = 100000; /* for periodic CPU + accounting updates */ break; case 'x': /* get filename with executable */ diff --git a/z80core/simpanel.c b/z80core/simpanel.c index 6c749b2f..5f6b01c8 100644 --- a/z80core/simpanel.c +++ b/z80core/simpanel.c @@ -945,7 +945,8 @@ static void draw_info(bool tick) const unsigned n = xsize / w; const unsigned x = (xsize - n * w) / 2; const unsigned y = ysize - font->height; - static int count, fps, freq; + static unsigned count, fps; + static uint64_t freq; /* draw product info */ s = "Z80pack " RELEASE; @@ -976,8 +977,8 @@ static void draw_info(bool tick) /* update frequency every second */ if (tick && cpu_time) - freq = (int) ((float) T_freq / (float) cpu_time * 100.0); - f = freq; + freq = cpu_freq; + f = (unsigned) (freq / 10000ULL); digit = 100000; onlyz = true; for (i = 0; i < 7; i++) { diff --git a/z80core/simz80.c b/z80core/simz80.c index 68cae836..736b90d6 100644 --- a/z80core/simz80.c +++ b/z80core/simz80.c @@ -5,6 +5,8 @@ * Copyright (C) 2024 by Thomas Eberhardt */ +#include + #include "sim.h" #include "simdefs.h" #include "simglb.h" @@ -386,15 +388,10 @@ void cpu_z80(void) }; #endif /* !ALT_Z80 */ - Tstates_t T_max, T_dma, T_start; + Tstates_t T_max, T_dma; uint64_t t1, t2; long tdiff; WORD p; - bool single_step; - - /* remember CPU clock and single step mode for frequency calculation */ - T_start = T; - single_step = (cpu_state & ST_SINGLE_STEP) != 0; T_max = T + tmax; t1 = get_clock_us(); @@ -446,11 +443,11 @@ void cpu_z80(void) if (dma_bus_master) { /* hand control to the DMA bus master without BUS_ACK */ - T += (T_dma = (*dma_bus_master)(0)); - if (f_value) { - T_freq = T; - cpu_time += T_dma / f_value; - } + T_dma = (*dma_bus_master)(0); + T += T_dma; + if (cpu_freq) + cpu_time += (1000000ULL * + T_dma) / cpu_freq; } } @@ -466,11 +463,11 @@ void cpu_z80(void) if (dma_bus_master) { /* hand control to the DMA bus master with BUS_ACK */ - T += (T_dma = (*dma_bus_master)(1)); - if (f_value) { - T_freq = T; - cpu_time += T_dma / f_value; - } + T_dma = (*dma_bus_master)(1); + T += T_dma; + if (cpu_freq) + cpu_time += (1000000ULL * + T_dma) / cpu_freq; } /* FOR NOW - MAY BE NEED A PRIORITY SYSTEM LATER */ @@ -503,8 +500,8 @@ void cpu_z80(void) if (int_int) { /* maskable interrupt */ if (IFF != 3) goto leave; - if (int_protection) /* protect first instr */ - goto leave; + if (int_protection) /* protect first instruction */ + goto leave; /* after EI */ IFF = 0; @@ -607,8 +604,8 @@ void cpu_z80(void) m1_step = true; #endif R++; /* increment refresh register */ + leave: } -leave: #ifdef BUS_8080 /* M1 opcode fetch */ @@ -624,22 +621,22 @@ void cpu_z80(void) #include "altz80.h" #endif - /* adjust CPU speed and update time */ - if (T >= T_max && !single_step) { + /* adjust CPU speed and + update CPU accounting */ + if (T >= T_max) { T_max = T + tmax; t2 = get_clock_us(); tdiff = t2 - t1; - if (f_value) { - if (!cpu_needed && tdiff < 10000L) { - sleep_for_us(10000L - tdiff); - t2 = get_clock_us(); - tdiff = t2 - t1; - } + if (f_value && !cpu_needed && tdiff < 10000L) { + sleep_for_us(10000L - tdiff); + t2 = get_clock_us(); + tdiff = t2 - t1; /* should be really close + to 10000, but isn't */ + cpu_time += tdiff; } else - tdiff -= cpu_tadj; - T_freq = T; - cpu_time += tdiff; + cpu_time += tdiff - cpu_tadj; cpu_tadj = 0; + cpu_freq = T * 1000000ULL / cpu_time; t1 = t2; } @@ -689,22 +686,10 @@ void cpu_z80(void) fp_led_data = getmem(PC); #endif - /* update CPU time */ - if (single_step) { /* if single stepping */ - if (f_value) /* use f_value MHz in locked mode */ - tdiff = (T - T_start) / f_value; - else if (T_freq) /* else use current frequency */ - tdiff = ((T - T_start) * cpu_time) / T_freq; - else /* avoid division by 0 */ - tdiff = T - T_start; - } else { - tdiff = get_clock_us() - t1; - if (!f_value) - tdiff -= cpu_tadj; - } - T_freq = T; - cpu_time += tdiff; + /* update CPU accounting */ + cpu_time += (get_clock_us() - t1) - cpu_tadj; cpu_tadj = 0; + cpu_freq = T * 1000000ULL / cpu_time; } #ifndef ALT_Z80 @@ -719,6 +704,7 @@ static int op_halt(void) /* HALT */ uint64_t t; t = get_clock_us(); + #ifdef BUS_8080 cpu_bus = CPU_WO | CPU_HLTA | CPU_MEMR; #endif From 24e82607432e4ca4f9f644eb222501fba0d2dd85 Mon Sep 17 00:00:00 2001 From: Thomas Eberhardt Date: Fri, 24 Jan 2025 10:15:47 +0100 Subject: [PATCH 12/22] fix frequency formatting --- picosim/srcsim/picosim.c | 2 +- z80core/simcore.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/picosim/srcsim/picosim.c b/picosim/srcsim/picosim.c index 157adbe5..06292145 100644 --- a/picosim/srcsim/picosim.c +++ b/picosim/srcsim/picosim.c @@ -350,7 +350,7 @@ static void picosim_ice_cmd(char *cmd, WORD *wrk_addr) freq = (unsigned) ((T - T0) / 30000ULL); printf("CPU executed %" PRIu64 " %s instructions " "in 3 seconds\n", (T - T0) / 10, s); - printf("clock frequency = %5u.%02u MHz\n", + printf("clock frequency = %u.%02u MHz\n", freq / 100, freq % 100); } else puts("Interrupted by user"); diff --git a/z80core/simcore.c b/z80core/simcore.c index add91b88..23b9c488 100644 --- a/z80core/simcore.c +++ b/z80core/simcore.c @@ -236,7 +236,7 @@ void report_cpu_stats(void) freq = (unsigned) (cpu_freq / 10000ULL); printf("CPU ran %" PRIu64 " ms ", cpu_time / 1000); printf("and executed %" PRIu64 " t-states\n", T); - printf("Clock frequency %4u.%02u MHz\n", + printf("Clock frequency %u.%02u MHz\n", freq / 100, freq % 100); } } From 8315ac4c0c80a15656104bb10a6dbd46b3b19ff5 Mon Sep 17 00:00:00 2001 From: Thomas Eberhardt Date: Fri, 24 Jan 2025 10:28:37 +0100 Subject: [PATCH 13/22] add zero check before division --- z80core/sim8080.c | 6 ++++-- z80core/simz80.c | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/z80core/sim8080.c b/z80core/sim8080.c index b1783566..0f1aa503 100644 --- a/z80core/sim8080.c +++ b/z80core/sim8080.c @@ -622,7 +622,8 @@ void cpu_8080(void) } else cpu_time += tdiff - cpu_tadj; cpu_tadj = 0; - cpu_freq = T * 1000000ULL / cpu_time; + if (cpu_time) + cpu_freq = T * 1000000ULL / cpu_time; t1 = t2; } @@ -674,7 +675,8 @@ void cpu_8080(void) /* update CPU accounting */ cpu_time += (get_clock_us() - t1) - cpu_tadj; cpu_tadj = 0; - cpu_freq = T * 1000000ULL / cpu_time; + if (cpu_time) + cpu_freq = T * 1000000ULL / cpu_time; } #ifndef ALT_I8080 diff --git a/z80core/simz80.c b/z80core/simz80.c index 736b90d6..90471385 100644 --- a/z80core/simz80.c +++ b/z80core/simz80.c @@ -636,7 +636,8 @@ void cpu_z80(void) } else cpu_time += tdiff - cpu_tadj; cpu_tadj = 0; - cpu_freq = T * 1000000ULL / cpu_time; + if (cpu_time) + cpu_freq = T * 1000000ULL / cpu_time; t1 = t2; } @@ -689,7 +690,8 @@ void cpu_z80(void) /* update CPU accounting */ cpu_time += (get_clock_us() - t1) - cpu_tadj; cpu_tadj = 0; - cpu_freq = T * 1000000ULL / cpu_time; + if (cpu_time) + cpu_freq = T * 1000000ULL / cpu_time; } #ifndef ALT_Z80 From 1f6edca131866809dcf4c3bce258997837fb094b Mon Sep 17 00:00:00 2001 From: Thomas Eberhardt Date: Fri, 24 Jan 2025 12:39:25 +0100 Subject: [PATCH 14/22] add some keyboard/mouse controls to change memory display base address Left/Right changes base address by 1. Up/Down by 16. Page Up/Page Down by 256. Begin rounds down to xxx0. End rounds up to xxx0. Shift multiplies/rounding change by 16. Mouse wheel works too. Also move "leave" label back. My Mac compiler didn't like it. --- z80core/sim8080.c | 2 +- z80core/simpanel.c | 138 +++++++++++++++++++++++++++++++++++++++++++-- z80core/simz80.c | 2 +- 3 files changed, 136 insertions(+), 6 deletions(-) diff --git a/z80core/sim8080.c b/z80core/sim8080.c index 0f1aa503..ae44bc6d 100644 --- a/z80core/sim8080.c +++ b/z80core/sim8080.c @@ -592,8 +592,8 @@ void cpu_8080(void) if (F_flag) m1_step = true; #endif - leave: } + leave: #ifdef BUS_8080 /* M1 opcode fetch */ diff --git a/z80core/simpanel.c b/z80core/simpanel.c index 5f6b01c8..25cb0266 100644 --- a/z80core/simpanel.c +++ b/z80core/simpanel.c @@ -96,6 +96,7 @@ WORD mbase; static unsigned xsize, ysize; static uint32_t *pixels; static int pitch; +static bool shift; #ifdef WANT_SDL static int panel_win_id = -1; static SDL_Window *window; @@ -178,7 +179,8 @@ static void open_display(void) colormap = XCreateColormap(display, rootwindow, visual, AllocNone); swa.border_pixel = 0; swa.colormap = colormap; - swa.event_mask = ButtonPressMask | ButtonReleaseMask; + swa.event_mask = KeyPressMask | KeyReleaseMask | + ButtonPressMask | ButtonReleaseMask; window = XCreateWindow(display, rootwindow, 0, 0, xsize, ysize, 1, vinfo.depth, InputOutput, visual, CWBorderPixel | CWColormap | CWEventMask, &swa); @@ -251,8 +253,72 @@ static void process_event(SDL_Event *event) switch (event->type) { case SDL_MOUSEBUTTONDOWN: break; + case SDL_MOUSEBUTTONUP: break; + + case SDL_KEYUP: + if (event->window.windowID != SDL_GetWindowID(window)) + break; + + switch (event->key.keysym.sym) { + case SDLK_LSHIFT: + case SDLK_RSHIFT: + shift = false; + break; + default: + break; + } + break; + + case SDL_KEYDOWN: + if (event->window.windowID != SDL_GetWindowID(window)) + break; + + switch (event->key.keysym.sym) { + case SDLK_LSHIFT: + case SDLK_RSHIFT: + shift = true; + break; + case SDLK_LEFT: + mbase -= shift ? 0x0010 : 0x0001; + break; + case SDLK_RIGHT: + mbase += shift ? 0x0010 : 0x0001; + break; + case SDLK_UP: + mbase -= shift ? 0x0100 : 0x0010; + break; + case SDLK_DOWN: + mbase += shift ? 0x0100 : 0x0010; + break; + case SDLK_PAGEUP: + mbase -= shift ? 0x1000 : 0x0100; + break; + case SDLK_PAGEDOWN: + mbase += shift ? 0x1000 : 0x0100; + break; + case SDLK_HOME: + mbase &= shift ? 0xff00 : 0xfff0; + break; + case SDLK_END: + if (shift) + mbase = (mbase + 0x00ff) & 0xff00; + else + mbase = (mbase + 0x000f) & 0xfff0; + break; + default: + break; + } + break; + + case SDL_MOUSEWHEEL: + if (event->wheel.direction == SDL_MOUSEWHEEL_NORMAL) + mbase += event->wheel.y * (shift ? 0x0100 : 0x0010); + else + mbase -= event->wheel.y * (shift ? 0x0100 : 0x0010); + break; + default: break; } @@ -265,13 +331,77 @@ static void process_event(SDL_Event *event) */ static inline void process_events(void) { + char buffer[5]; + KeySym key; + XComposeStatus compose; + while (XPending(display)) { XNextEvent(display, &event); switch (event.type) { case ButtonPress: + if (event.xbutton.button == 4) + mbase += shift ? 0x0100 : 0x0010; + else if (event.xbutton.button == 5) + mbase -= shift ? 0x0100 : 0x0010; break; + case ButtonRelease: break; + + case KeyRelease: + XLookupString(&event.xkey, buffer, bufsize, &key, &compose); + + switch (key) { + case XK_Shift_L: + case XK_Shift_R: + shift = false; + break; + default: + break; + } + break; + + case KeyPress: + XLookupString(&event.xkey, buffer, sizeof(buffer), + &key, &compose); + + switch (key) { + case XK_Shift_L: + case XK_Shift_R: + shift = true; + break; + case XK_Left: + mbase -= shift ? 0x0010 : 0x0001; + break; + case XK_Right: + mbase += shift ? 0x0010 : 0x0001; + break; + case XK_Up: + mbase -= shift ? 0x0100 : 0x0010; + break; + case XK_Down: + mbase += shift ? 0x0100 : 0x0010; + break; + case XK_Page_Up: + mbase -= shift ? 0x1000 : 0x0100; + break; + case XK_Page_Down: + mbase += shift ? 0x1000 : 0x0100; + break; + case XK_Home: + mbase &= shift ? 0xff00 : 0xfff0; + break; + case XK_End: + if (shift) + mbase = (mbase + 0x00ff) & 0xff00; + else + mbase = (mbase + 0x000f) & 0xfff0; + break; + default: + break; + } + break; + default: break; } @@ -852,7 +982,7 @@ static void draw_cpu_regs(void) /* * Draw the memory page: * - * 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F + * 0 1 2 3 4 5 6 7 8 9 A B C D E F * 0000 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 0123456789ABCDEF * 0010 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 0123456789ABCDEF * 0020 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 0123456789ABCDEF @@ -888,8 +1018,8 @@ static void draw_mem_page(WORD mbase) draw_grid_vline(5 + i * 3, 0, grid.rows, &grid, C_DKYELLOW); for (i = 0; i < 16; i++) { - draw_grid_char(6 + i * 3, 0, '0', &grid, C_GREEN, C_DKBLUE); - c = i + (i < 10 ? '0' : 'A' - 10); + c = ((mbase & 0xf) + i) & 0xf; + c += (c < 10 ? '0' : 'A' - 10); draw_grid_char(7 + i * 3, 0, c, &grid, C_GREEN, C_DKBLUE); } for (j = 1; j < 17; j++) { diff --git a/z80core/simz80.c b/z80core/simz80.c index 90471385..b5604e27 100644 --- a/z80core/simz80.c +++ b/z80core/simz80.c @@ -604,8 +604,8 @@ void cpu_z80(void) m1_step = true; #endif R++; /* increment refresh register */ - leave: } + leave: #ifdef BUS_8080 /* M1 opcode fetch */ From e68961d54fa1b30220e479124376d091a62db92f Mon Sep 17 00:00:00 2001 From: Thomas Eberhardt Date: Sat, 25 Jan 2025 00:50:30 +0100 Subject: [PATCH 15/22] fix mouse wheel with multiple windows in SDL2 --- frontpanel/lp_window.c | 15 +++++++++------ z80core/simpanel.c | 13 +++++++++++-- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/frontpanel/lp_window.c b/frontpanel/lp_window.c index 629b334d..19671c9d 100644 --- a/frontpanel/lp_window.c +++ b/frontpanel/lp_window.c @@ -84,6 +84,12 @@ static bool lmouse; void Lpanel_procEvent(Lpanel_t *p, SDL_Event *event) { switch (event->type) { + case SDL_QUIT: + // call user quit callback if exists + if (p->quit_callbackfunc) + (*p->quit_callbackfunc)(); + break; + case SDL_WINDOWEVENT: if (event->window.windowID != SDL_GetWindowID(p->window)) break; @@ -105,12 +111,6 @@ void Lpanel_procEvent(Lpanel_t *p, SDL_Event *event) } break; - case SDL_QUIT: - // call user quit callback if exists - if (p->quit_callbackfunc) - (*p->quit_callbackfunc)(); - break; - case SDL_MOUSEBUTTONDOWN: if (event->button.windowID != SDL_GetWindowID(p->window)) break; @@ -294,6 +294,9 @@ void Lpanel_procEvent(Lpanel_t *p, SDL_Event *event) break; case SDL_MOUSEWHEEL: + if (event->motion.windowID != SDL_GetWindowID(p->window)) + break; + if (event->wheel.direction == SDL_MOUSEWHEEL_NORMAL) p->view.pan[2] += event->wheel.preciseY / 5.0; else diff --git a/z80core/simpanel.c b/z80core/simpanel.c index 25cb0266..3fdf0142 100644 --- a/z80core/simpanel.c +++ b/z80core/simpanel.c @@ -250,6 +250,8 @@ static void close_display(void) */ static void process_event(SDL_Event *event) { + int n; + switch (event->type) { case SDL_MOUSEBUTTONDOWN: break; @@ -313,10 +315,17 @@ static void process_event(SDL_Event *event) break; case SDL_MOUSEWHEEL: + if (event->window.windowID != SDL_GetWindowID(window)) + break; + + if (event->wheel.preciseY < 0) + n = (int) (event->wheel.preciseY - 0.5); + else + n = (int) (event->wheel.preciseY + 0.5); if (event->wheel.direction == SDL_MOUSEWHEEL_NORMAL) - mbase += event->wheel.y * (shift ? 0x0100 : 0x0010); + mbase += n * (shift ? 0x0100 : 0x0010); else - mbase -= event->wheel.y * (shift ? 0x0100 : 0x0010); + mbase -= n * (shift ? 0x0100 : 0x0010); break; default: From a926847dc9678d8b5930c4bb4cd0f3f1a37f7d95 Mon Sep 17 00:00:00 2001 From: Thomas Eberhardt Date: Sat, 25 Jan 2025 03:51:04 +0100 Subject: [PATCH 16/22] fix wrong parameter --- z80core/simpanel.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/z80core/simpanel.c b/z80core/simpanel.c index 3fdf0142..8c8a79e9 100644 --- a/z80core/simpanel.c +++ b/z80core/simpanel.c @@ -358,7 +358,8 @@ static inline void process_events(void) break; case KeyRelease: - XLookupString(&event.xkey, buffer, bufsize, &key, &compose); + XLookupString(&event.xkey, buffer, sizeof(buffer), + &key, &compose); switch (key) { case XK_Shift_L: From ed1c86db4dd3d163d0b281965e5e278efc041a45 Mon Sep 17 00:00:00 2001 From: Thomas Eberhardt Date: Sat, 25 Jan 2025 05:33:00 +0100 Subject: [PATCH 17/22] remove include only needed for debugging printf's --- z80core/simz80.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/z80core/simz80.c b/z80core/simz80.c index b5604e27..29acae92 100644 --- a/z80core/simz80.c +++ b/z80core/simz80.c @@ -5,8 +5,6 @@ * Copyright (C) 2024 by Thomas Eberhardt */ -#include - #include "sim.h" #include "simdefs.h" #include "simglb.h" From 175946da62ece029a88d4ed1248229656b130ba6 Mon Sep 17 00:00:00 2001 From: Thomas Eberhardt Date: Sun, 26 Jan 2025 07:13:54 +0100 Subject: [PATCH 18/22] add I/O ports view to introspection panel Adds buttons to switch between memory and ports display. Sticky button in ports display makes the port lights sticky, so one can see all the ports accessed in a code run. --- z80core/simcore.c | 4 +- z80core/simdefs.h | 2 +- z80core/simglb.c | 4 +- z80core/simglb.h | 2 +- z80core/simpanel.c | 484 ++++++++++++++++++++++++++++++++------------- 5 files changed, 352 insertions(+), 144 deletions(-) diff --git a/z80core/simcore.c b/z80core/simcore.c index 23b9c488..977d4962 100644 --- a/z80core/simcore.c +++ b/z80core/simcore.c @@ -293,7 +293,7 @@ BYTE io_in(BYTE addrl, BYTE addrh) fp_led_data = io_data; #endif -#ifdef IOPANEL +#if defined(INFOPANEL) || defined(IOPANEL) port_flags[addrl].in = true; #endif @@ -353,7 +353,7 @@ void io_out(BYTE addrl, BYTE addrh, BYTE data) fp_led_data = IO_DATA_UNUSED; #endif -#ifdef IOPANEL +#if defined(INFOPANEL) || defined(IOPANEL) port_flags[addrl].out = true; #endif diff --git a/z80core/simdefs.h b/z80core/simdefs.h index d9373e88..573603ff 100644 --- a/z80core/simdefs.h +++ b/z80core/simdefs.h @@ -99,7 +99,7 @@ typedef enum { BUS_DMA_NONE, BUS_DMA_BYTE, BUS_DMA_BURST, BUS_DMA_CONTINUOUS } BusDMA_t; typedef Tstates_t (BusDMAFunc_t)(const BYTE bus_ack); -#ifdef IOPANEL +#if defined(INFOPANEL) || defined(IOPANEL) typedef struct port_flags { bool in: 1; /* input port accessed */ bool out: 1; /* output port accessed */ diff --git a/z80core/simglb.c b/z80core/simglb.c index a76bc800..41417247 100644 --- a/z80core/simglb.c +++ b/z80core/simglb.c @@ -84,9 +84,9 @@ BYTE fp_led_output = 0xff; /* inverted IMSAI/Cromemco programmed output */ #endif /* - * Variables for iopanel + * Variables for I/O ports panel */ -#ifdef IOPANEL +#if defined(INFOPANEL) || defined(IOPANEL) port_flags_t port_flags[256]; /* port access flags */ #endif diff --git a/z80core/simglb.h b/z80core/simglb.h index aa0cb993..3b4ea676 100644 --- a/z80core/simglb.h +++ b/z80core/simglb.h @@ -68,7 +68,7 @@ extern BYTE fp_led_data; extern BYTE fp_led_output; #endif -#ifdef IOPANEL +#if defined(INFOPANEL) || defined(IOPANEL) extern port_flags_t port_flags[256]; #endif diff --git a/z80core/simpanel.c b/z80core/simpanel.c index 8c8a79e9..61eebd01 100644 --- a/z80core/simpanel.c +++ b/z80core/simpanel.c @@ -35,6 +35,10 @@ #include "log.h" static const char *TAG = "panel"; +/* panel types */ +#define MEMORY_PANEL 0 +#define PORTS_PANEL 1 + /* 888 RGB colors */ #define C_BLACK 0x00000000 #define C_RED 0x00ff0000 @@ -54,21 +58,23 @@ static const char *TAG = "panel"; #define C_ORANGE 0x00ffa500 #define C_WHEAT 0x00f5deb3 +#define C_TRANS 0xffffffff + /* * Font type. Depth is ignored and assumed to be 1. */ typedef const struct font { const uint8_t *bits; - const unsigned depth; - const unsigned width; - const unsigned height; - const unsigned stride; + unsigned depth; + unsigned width; + unsigned height; + unsigned stride; } font_t; /* * Grid type for drawing text with character based coordinates. */ -typedef struct draw_grid { +typedef struct grid { const font_t *font; unsigned xoff; unsigned yoff; @@ -77,7 +83,23 @@ typedef struct draw_grid { unsigned cheight; unsigned cols; unsigned rows; -} draw_grid_t; +} grid_t; + +/* + * Button type + */ +typedef struct button { + bool enabled; + bool active; + bool pressed; + bool clicked; + const unsigned x; + const unsigned y; + const unsigned width; + const unsigned height; + const font_t *font; + const char *text; +} button_t; /* include Terminus bitmap fonts */ #include "fonts/font12.h" @@ -90,7 +112,27 @@ typedef struct draw_grid { #include "fonts/font28.h" #include "fonts/font32.h" -WORD mbase; +static void check_buttons(unsigned x, unsigned y, bool press); + +/* + * Buttons + */ +#define MEMORY_BUTTON 0 +#define PORTS_BUTTON 1 +#define STICKY_BUTTON 2 + +button_t buttons[] = { + [ MEMORY_BUTTON ] = { + false, false, false, false, 500, 1, 60, 19, &font12, "Memory" + }, + [ PORTS_BUTTON ] = { + false, false, false, false, 500, 22, 60, 19, &font12, "Ports" + }, + [ STICKY_BUTTON ] = { + false, false, false, false, 500, 43, 60, 19, &font12, "Sticky" + } +}; +const int nbuttons = sizeof(buttons) / sizeof(button_t); /* SDL2/X11 stuff */ static unsigned xsize, ysize; @@ -118,6 +160,11 @@ static XEvent event; static pthread_t thread; #endif +/* panel stuff */ +static int panel; /* current panel type */ +static WORD mbase; /* memory panel base address */ +static bool sticky; /* I/O ports panel sticky flag */ + /* * Create the SDL2 or X11 window for panel display */ @@ -254,9 +301,17 @@ static void process_event(SDL_Event *event) switch (event->type) { case SDL_MOUSEBUTTONDOWN: + if (event->window.windowID != SDL_GetWindowID(window)) + break; + + check_buttons(event->button.x, event->button.y, true); break; case SDL_MOUSEBUTTONUP: + if (event->window.windowID != SDL_GetWindowID(window)) + break; + + check_buttons(event->button.x, event->button.y, false); break; case SDL_KEYUP: @@ -283,31 +338,40 @@ static void process_event(SDL_Event *event) shift = true; break; case SDLK_LEFT: - mbase -= shift ? 0x0010 : 0x0001; + if (panel == MEMORY_PANEL) + mbase -= shift ? 0x0010 : 0x0001; break; case SDLK_RIGHT: - mbase += shift ? 0x0010 : 0x0001; + if (panel == MEMORY_PANEL) + mbase += shift ? 0x0010 : 0x0001; break; case SDLK_UP: - mbase -= shift ? 0x0100 : 0x0010; + if (panel == MEMORY_PANEL) + mbase -= shift ? 0x0100 : 0x0010; break; case SDLK_DOWN: - mbase += shift ? 0x0100 : 0x0010; + if (panel == MEMORY_PANEL) + mbase += shift ? 0x0100 : 0x0010; break; case SDLK_PAGEUP: - mbase -= shift ? 0x1000 : 0x0100; + if (panel == MEMORY_PANEL) + mbase -= shift ? 0x1000 : 0x0100; break; case SDLK_PAGEDOWN: - mbase += shift ? 0x1000 : 0x0100; + if (panel == MEMORY_PANEL) + mbase += shift ? 0x1000 : 0x0100; break; case SDLK_HOME: - mbase &= shift ? 0xff00 : 0xfff0; + if (panel == MEMORY_PANEL) + mbase &= shift ? 0xff00 : 0xfff0; break; case SDLK_END: - if (shift) - mbase = (mbase + 0x00ff) & 0xff00; - else - mbase = (mbase + 0x000f) & 0xfff0; + if (panel == MEMORY_PANEL) { + if (shift) + mbase = (mbase + 0x00ff) & 0xff00; + else + mbase = (mbase + 0x000f) & 0xfff0; + } break; default: break; @@ -318,14 +382,16 @@ static void process_event(SDL_Event *event) if (event->window.windowID != SDL_GetWindowID(window)) break; - if (event->wheel.preciseY < 0) - n = (int) (event->wheel.preciseY - 0.5); - else - n = (int) (event->wheel.preciseY + 0.5); - if (event->wheel.direction == SDL_MOUSEWHEEL_NORMAL) - mbase += n * (shift ? 0x0100 : 0x0010); - else - mbase -= n * (shift ? 0x0100 : 0x0010); + if (panel == MEMORY_PANEL) { + if (event->wheel.preciseY < 0) + n = (int) (event->wheel.preciseY - 0.5); + else + n = (int) (event->wheel.preciseY + 0.5); + if (event->wheel.direction == SDL_MOUSEWHEEL_NORMAL) + mbase += n * (shift ? 0x0100 : 0x0010); + else + mbase -= n * (shift ? 0x0100 : 0x0010); + } break; default: @@ -348,13 +414,21 @@ static inline void process_events(void) XNextEvent(display, &event); switch (event.type) { case ButtonPress: - if (event.xbutton.button == 4) - mbase += shift ? 0x0100 : 0x0010; - else if (event.xbutton.button == 5) - mbase -= shift ? 0x0100 : 0x0010; + if (event.xbutton.button < 4) + check_buttons(event.xbutton.x, event.xbutton.y, + true); + else if (panel == MEMORY_PANEL) { + if (event.xbutton.button == 4) + mbase += shift ? 0x0100 : 0x0010; + else if (event.xbutton.button == 5) + mbase -= shift ? 0x0100 : 0x0010; + } break; case ButtonRelease: + if (event.xbutton.button < 4) + check_buttons(event.xbutton.x, event.xbutton.y, + false); break; case KeyRelease: @@ -381,31 +455,42 @@ static inline void process_events(void) shift = true; break; case XK_Left: - mbase -= shift ? 0x0010 : 0x0001; + if (panel == MEMORY_PANEL) + mbase -= shift ? 0x0010 : 0x0001; break; case XK_Right: - mbase += shift ? 0x0010 : 0x0001; + if (panel == MEMORY_PANEL) + mbase += shift ? 0x0010 : 0x0001; break; case XK_Up: - mbase -= shift ? 0x0100 : 0x0010; + if (panel == MEMORY_PANEL) + mbase -= shift ? 0x0100 : 0x0010; break; case XK_Down: - mbase += shift ? 0x0100 : 0x0010; + if (panel == MEMORY_PANEL) + mbase += shift ? 0x0100 : 0x0010; break; case XK_Page_Up: - mbase -= shift ? 0x1000 : 0x0100; + if (panel == MEMORY_PANEL) + mbase -= shift ? 0x1000 : 0x0100; break; case XK_Page_Down: - mbase += shift ? 0x1000 : 0x0100; + if (panel == MEMORY_PANEL) + mbase += shift ? 0x1000 : 0x0100; break; case XK_Home: - mbase &= shift ? 0xff00 : 0xfff0; + if (panel == MEMORY_PANEL) + mbase &= shift ? 0xff00 : 0xfff0; break; case XK_End: - if (shift) - mbase = (mbase + 0x00ff) & 0xff00; - else - mbase = (mbase + 0x000f) & 0xfff0; + if (panel == MEMORY_PANEL) { + if (shift) + mbase = (mbase + 0x00ff) & + 0xff00; + else + mbase = (mbase + 0x000f) & + 0xfff0; + } break; default: break; @@ -502,10 +587,13 @@ static inline void draw_char(const unsigned x, const unsigned y, const char c, p = p0; q = q0; for (i = font->width; i > 0; i--) { - if (*p & m) - *q = fgc; - else - *q = bgc; + if (*p & m) { + if (fgc != C_TRANS) + *q = fgc; + } else { + if (bgc != C_TRANS) + *q = bgc; + } if ((m >>= 1) == 0) { m = 0x80; p++; @@ -517,44 +605,6 @@ static inline void draw_char(const unsigned x, const unsigned y, const char c, } } -/* - * Draw a string using the specified font and colors. - */ -static inline void draw_string(unsigned x, const unsigned y, const char *s, - const font_t *font, const uint32_t fgc, - const uint32_t bgc) -{ -#ifdef DRAW_DEBUG - int n; - - if (pixels == NULL) { - fprintf(stderr, "%s: pixels texture is NULL\n", __func__); - return; - } - if (s == NULL) { - fprintf(stderr, "%s: string is NULL\n", __func__); - return; - } - if (font == NULL) { - fprintf(stderr, "%s: font is NULL\n", __func__); - return; - } - n = strlen(s); - if (x >= xsize || y >= ysize || x + n * font->width > xsize || - y + font->height > ysize) { - fprintf(stderr, "%s: string \"%s\" at (%d,%d)-(%d,%d) is " - "outside (0,0)-(%d,%d)\n", __func__, s, x, y, - x + n * font->width - 1, y + font->height - 1, - xsize - 1, ysize - 1); - return; - } -#endif - while (*s) { - draw_char(x, y, *s++, font, fgc, bgc); - x += font->width; - } -} - /* * Draw a horizontal line in the specified color. */ @@ -612,7 +662,7 @@ static inline void draw_vline(const unsigned x, const unsigned y, unsigned h, * If col < 0 then use the entire pixels texture width. * If row < 0 then use the entire pixels texture height. */ -static inline void draw_setup_grid(draw_grid_t *grid, const unsigned xoff, +static inline void draw_setup_grid(grid_t *grid, const unsigned xoff, const unsigned yoff, const int cols, const int rows, const font_t *font, const unsigned spc) @@ -670,7 +720,7 @@ static inline void draw_setup_grid(draw_grid_t *grid, const unsigned xoff, * Draw a character using grid coordinates in the specified color. */ static inline void draw_grid_char(const unsigned x, const unsigned y, - const char c, const draw_grid_t *grid, + const char c, const grid_t *grid, const uint32_t fgc, const uint32_t bgc) { #ifdef DRAW_DEBUG @@ -693,7 +743,7 @@ static inline void draw_grid_char(const unsigned x, const unsigned y, * above the y grid coordinate specified. */ static inline void draw_grid_hline(unsigned x, unsigned y, unsigned w, - const draw_grid_t *grid, const uint32_t col) + const grid_t *grid, const uint32_t col) { #ifdef DRAW_DEBUG if (pixels == NULL) { @@ -719,7 +769,7 @@ static inline void draw_grid_hline(unsigned x, unsigned y, unsigned w, * specified. */ static inline void draw_grid_vline(unsigned x, unsigned y, unsigned h, - const draw_grid_t *grid, const uint32_t col) + const grid_t *grid, const uint32_t col) { #ifdef DRAW_DEBUG if (pixels == NULL) { @@ -747,10 +797,13 @@ static inline void draw_grid_vline(unsigned x, unsigned y, unsigned h, } /* - * Draw a 10x10 LED circular bracket. + * Draw a LED inside a 10x10 circular bracket. */ -static inline void draw_led_bracket(const unsigned x, const unsigned y) +static inline void draw_led(const unsigned x, const unsigned y, + const uint32_t col) { + int i; + draw_hline(x + 2, y, 6, C_GRAY); draw_pixel(x + 1, y + 1, C_GRAY); draw_pixel(x + 8, y + 1, C_GRAY); @@ -759,16 +812,6 @@ static inline void draw_led_bracket(const unsigned x, const unsigned y) draw_pixel(x + 1, y + 8, C_GRAY); draw_pixel(x + 8, y + 8, C_GRAY); draw_hline(x + 2, y + 9, 6, C_GRAY); -} - -/* - * Draw a LED inside a 10x10 circular bracket. - */ -static inline void draw_led(const unsigned x, const unsigned y, - const uint32_t col) -{ - int i; - for (i = 1; i < 9; i++) { if (i == 1 || i == 8) draw_hline(x + 2, y + i, 6, col); @@ -888,7 +931,7 @@ static void draw_cpu_regs(void) WORD w; const char *s; const reg_t *rp = NULL; - draw_grid_t grid = { }; + grid_t grid = { }; int cpu_type = cpu; /* use cpu_type in the rest of this function, since cpu can change */ @@ -990,36 +1033,24 @@ static void draw_cpu_regs(void) } /* - * Draw the memory page: + * Draw the memory panel: * * 0 1 2 3 4 5 6 7 8 9 A B C D E F * 0000 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 0123456789ABCDEF - * 0010 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 0123456789ABCDEF - * 0020 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 0123456789ABCDEF - * 0030 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 0123456789ABCDEF - * 0040 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 0123456789ABCDEF - * 0050 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 0123456789ABCDEF - * 0060 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 0123456789ABCDEF - * 0070 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 0123456789ABCDEF - * 0080 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 0123456789ABCDEF - * 0090 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 0123456789ABCDEF - * 00A0 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 0123456789ABCDEF - * 00B0 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 0123456789ABCDEF - * 00C0 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 0123456789ABCDEF - * 00D0 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 0123456789ABCDEF - * 00E0 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 0123456789ABCDEF + * ... * 00F0 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 0123456789ABCDEF */ #define MXOFF 4 -#define MYOFF 64 +#define MYOFF 68 #define MSPC 1 -static void draw_mem_page(WORD mbase) +static void draw_memory_panel(void) { char c, dc; int i, j; - draw_grid_t grid; + WORD a; + grid_t grid; draw_setup_grid(&grid, MXOFF, MYOFF, 71, 17, &font16, MSPC); @@ -1027,48 +1058,102 @@ static void draw_mem_page(WORD mbase) for (i = 0; i < 17; i++) draw_grid_vline(5 + i * 3, 0, grid.rows, &grid, C_DKYELLOW); + a = mbase; for (i = 0; i < 16; i++) { - c = ((mbase & 0xf) + i) & 0xf; + c = ((a & 0xf) + i) & 0xf; c += (c < 10 ? '0' : 'A' - 10); draw_grid_char(7 + i * 3, 0, c, &grid, C_GREEN, C_DKBLUE); } - for (j = 1; j < 17; j++) { - draw_grid_hline(0, j, grid.cols, &grid, C_DKYELLOW); - c = (mbase >> 12) & 0xf; + for (j = 0; j < 16; j++) { + draw_grid_hline(0, j + 1, grid.cols, &grid, C_DKYELLOW); + c = (a >> 12) & 0xf; c += (c < 10 ? '0' : 'A' - 10); - draw_grid_char(0, j, c, &grid, C_GREEN, C_DKBLUE); - c = (mbase >> 8) & 0xf; + draw_grid_char(0, j + 1, c, &grid, C_GREEN, C_DKBLUE); + c = (a >> 8) & 0xf; c += (c < 10 ? '0' : 'A' - 10); - draw_grid_char(1, j, c, &grid, C_GREEN, C_DKBLUE); - c = (mbase >> 4) & 0xf; + draw_grid_char(1, j + 1, c, &grid, C_GREEN, C_DKBLUE); + c = (a >> 4) & 0xf; c += (c < 10 ? '0' : 'A' - 10); - draw_grid_char(2, j, c, &grid, C_GREEN, C_DKBLUE); - c = mbase & 0xf; + draw_grid_char(2, j + 1, c, &grid, C_GREEN, C_DKBLUE); + c = a & 0xf; c += (c < 10 ? '0' : 'A' - 10); - draw_grid_char(3, j, c, &grid, C_GREEN, C_DKBLUE); + draw_grid_char(3, j + 1, c, &grid, C_GREEN, C_DKBLUE); for (i = 0; i < 16; i++) { - c = (getmem(mbase) >> 4) & 0xf; + c = (getmem(a) >> 4) & 0xf; c += (c < 10 ? '0' : 'A' - 10); - draw_grid_char(6 + i * 3, j, c, &grid, C_CYAN, + draw_grid_char(6 + i * 3, j + 1, c, &grid, C_CYAN, C_DKBLUE); - c = getmem(mbase++) & 0xf; + c = getmem(a++) & 0xf; c += (c < 10 ? '0' : 'A' - 10); - draw_grid_char(7 + i * 3, j, c, &grid, C_CYAN, + draw_grid_char(7 + i * 3, j + 1, c, &grid, C_CYAN, C_DKBLUE); } - mbase -= 16; + a -= 16; for (i = 0; i < 16; i++) { - c = getmem(mbase++); + c = getmem(a++); dc = c & 0x7f; if (dc < 32 || dc == 127) dc = '.'; - draw_grid_char(55 + i, j, dc, &grid, + draw_grid_char(55 + i, j + 1, dc, &grid, (c & 0x80) ? C_ORANGE : C_YELLOW, C_DKBLUE); } } } +/* + * Draw the I/O ports panel: + * + * 0 1 2 3 4 5 6 7 8 9 A B C D E F + * 0000 o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o + * ... + * 00F0 o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o + */ + +#define IOXOFF 20 +#define IOYOFF 68 +#define IOSPC 1 + +static void draw_ports_panel(void) +{ + port_flags_t *p = port_flags; + char c; + int i, j; + unsigned x, y; + grid_t grid; + static Tstates_t T_old; + + draw_setup_grid(&grid, IOXOFF, IOYOFF, 67, 17, &font16, IOSPC); + + /* draw vertical grid lines */ + for (i = 0; i < 16; i++) + draw_grid_vline(3 + i * 4, 0, grid.rows, &grid, C_DKYELLOW); + + for (i = 0; i < 16; i++) { + c = i + (i < 10 ? '0' : 'A' - 10); + draw_grid_char(5 + i * 4, 0, c, &grid, C_GREEN, C_DKBLUE); + } + for (j = 0; j < 16; j++) { + draw_grid_hline(0, j + 1, grid.cols, &grid, C_DKYELLOW); + c = j + (j < 10 ? '0' : 'A' - 10); + draw_grid_char(0, j + 1, c, &grid, C_GREEN, C_DKBLUE); + draw_grid_char(1, j + 1, '0', &grid, C_GREEN, C_DKBLUE); + for (i = 0; i < 16; i++) { + x = (4 + i * 4) * grid.cwidth + grid.xoff + 1; + y = (j + 1) * grid.cheight + grid.yoff + 3; + draw_led(x, y, p->in ? C_GREEN : C_DKBLUE); + draw_led(x + 13, y, p->out ? C_RED : C_DKBLUE); + p++; + } + } + + /* clear access flags when CPU clock is advancing */ + if (!sticky && T_old != T) { + memset(port_flags, 0, sizeof(port_flags)); + T_old = T; + } +} + /* * Draw the info line: * @@ -1141,14 +1226,132 @@ static void draw_info(bool tick) } /* - * Refresh the display buffer + * Draw buttons + */ +static void draw_buttons(void) +{ + int i; + unsigned x, y; + button_t *p = buttons; + uint32_t color; + const char *s; + + for (i = 0; i < nbuttons; i++) { + if (p->enabled) { + draw_hline(p->x + 2, p->y, p->width - 4, C_WHITE); + draw_pixel(p->x + 1, p->y + 1, C_WHITE); + draw_pixel(p->x + p->width - 2, p->y + 1, C_WHITE); + draw_vline(p->x, p->y + 2, p->height - 4, C_WHITE); + draw_vline(p->x + p->width - 1, p->y + 2, + p->height - 4, C_WHITE); + draw_pixel(p->x + 1, p->y + p->height - 2, C_WHITE); + draw_pixel(p->x + p->width - 2, p->y + p->height - 2, + C_WHITE); + draw_hline(p->x + 2, p->y + p->height - 1, + p->width - 4, C_WHITE); + + color = C_DKBLUE; + if (p->active) + color = C_DKGREEN; + if (p->pressed) + color = C_DKYELLOW; + draw_hline(p->x + 2, p->y + 1, p->width - 4, color); + for (y = p->y + 2; y < p->y + p->height - 2; y++) + draw_hline(p->x + 1, y, p->width - 2, color); + draw_hline(p->x + 2, p->y + p->height - 2, + p->width - 4, color); + + x = p->x + 1 + (p->width - 2 - strlen(p->text) * + p->font->width) / 2; + y = p->y + 1 + (p->height - 2 - p->font->height) / 2; + for (s = p->text; *s; s++) { + draw_char(x, y, *s, p->font, C_CYAN, C_TRANS); + x += p->font->width; + } + } + p++; + } +} + +/* + * Update button states + */ +static void update_buttons(void) +{ + int i; + button_t *p = buttons; + + for (i = 0; i < nbuttons; i++) { + if (p->clicked) { + switch (i) { + case MEMORY_BUTTON: + if (panel != MEMORY_PANEL) { + buttons[MEMORY_BUTTON].active = true; + buttons[PORTS_BUTTON].active = false; + buttons[STICKY_BUTTON].enabled = false; + panel = MEMORY_PANEL; + } + break; + case PORTS_BUTTON: + if (panel != PORTS_PANEL) { + buttons[MEMORY_BUTTON].active = false; + buttons[PORTS_BUTTON].active = true; + buttons[STICKY_BUTTON].enabled = true; + panel = PORTS_PANEL; + } + break; + case STICKY_BUTTON: + sticky = !sticky; + buttons[STICKY_BUTTON].active = sticky; + break; + default: + break; + } + p->clicked = false; + break; + } + p++; + } +} + +/* + * Check for button presses + */ +static void check_buttons(unsigned x, unsigned y, bool press) +{ + int i; + button_t *p = buttons; + + for (i = 0; i < nbuttons; i++) { + if (p->enabled) { + if (press && x >= p->x && x < p->x + p->width && + y >= p->y && y < p->y + p->height) { + p->pressed = true; + break; + } else if (p->pressed) { + p->pressed = false; + p->clicked = true; + break; + } + } + p++; + } +} + +/* + * Refresh the display buffer */ static void refresh(bool tick) { draw_clear(C_DKBLUE); + update_buttons(); + draw_buttons(); draw_cpu_regs(); - draw_mem_page(mbase); + if (panel == MEMORY_PANEL) + draw_memory_panel(); + else if (panel == PORTS_PANEL) + draw_ports_panel(); draw_info(tick); } @@ -1249,6 +1452,11 @@ void init_panel(void) } } #endif + + panel = MEMORY_PANEL; + buttons[MEMORY_BUTTON].enabled = true; + buttons[MEMORY_BUTTON].active = true; + buttons[PORTS_BUTTON].enabled = true; } void exit_panel(void) From f4b42c9e2cd8b0ac4467fb57b83b9df29d341984 Mon Sep 17 00:00:00 2001 From: Thomas Eberhardt Date: Sun, 26 Jan 2025 07:38:09 +0100 Subject: [PATCH 19/22] fix p_tab access in reset_clicked() on altairsim --- altairsim/srcsim/simctl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/altairsim/srcsim/simctl.c b/altairsim/srcsim/simctl.c index 0b704aba..351d15c5 100644 --- a/altairsim/srcsim/simctl.c +++ b/altairsim/srcsim/simctl.c @@ -407,7 +407,8 @@ static void reset_clicked(int state, int val) /* update front panel */ fp_led_address = PC; fp_led_data = fp_read(PC); - if ((p_tab[PC] == MEM_RO) || (p_tab[PC] == MEM_WPROT)) + if ((p_tab[PC >> 8] == MEM_RO) || + (p_tab[PC >> 8] == MEM_WPROT)) mem_wp = 1; else mem_wp = 0; From 1e898b5567dd28bed5d24171c40e43c3f2afb485 Mon Sep 17 00:00:00 2001 From: Thomas Eberhardt Date: Sun, 26 Jan 2025 07:58:59 +0100 Subject: [PATCH 20/22] remove not working attempt at making port light stick during single stepping --- z80core/simpanel.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/z80core/simpanel.c b/z80core/simpanel.c index 61eebd01..17dcae57 100644 --- a/z80core/simpanel.c +++ b/z80core/simpanel.c @@ -1121,7 +1121,6 @@ static void draw_ports_panel(void) int i, j; unsigned x, y; grid_t grid; - static Tstates_t T_old; draw_setup_grid(&grid, IOXOFF, IOYOFF, 67, 17, &font16, IOSPC); @@ -1147,11 +1146,9 @@ static void draw_ports_panel(void) } } - /* clear access flags when CPU clock is advancing */ - if (!sticky && T_old != T) { + /* clear access flags if sticky flag is not set */ + if (!sticky) memset(port_flags, 0, sizeof(port_flags)); - T_old = T; - } } /* From 6162afe0227ea4d9054a90d487c065184af10de2 Mon Sep 17 00:00:00 2001 From: Thomas Eberhardt Date: Sun, 26 Jan 2025 11:48:49 +0100 Subject: [PATCH 21/22] make buttons static, no draw debug by default --- z80core/simpanel.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/z80core/simpanel.c b/z80core/simpanel.c index 17dcae57..7f460236 100644 --- a/z80core/simpanel.c +++ b/z80core/simpanel.c @@ -121,7 +121,7 @@ static void check_buttons(unsigned x, unsigned y, bool press); #define PORTS_BUTTON 1 #define STICKY_BUTTON 2 -button_t buttons[] = { +static button_t buttons[] = { [ MEMORY_BUTTON ] = { false, false, false, false, 500, 1, 60, 19, &font12, "Memory" }, @@ -132,7 +132,7 @@ button_t buttons[] = { false, false, false, false, 500, 43, 60, 19, &font12, "Sticky" } }; -const int nbuttons = sizeof(buttons) / sizeof(button_t); +static const int nbuttons = sizeof(buttons) / sizeof(button_t); /* SDL2/X11 stuff */ static unsigned xsize, ysize; @@ -505,8 +505,6 @@ static inline void process_events(void) #endif /* !WANT_SDL */ -#define DRAW_DEBUG - /* * Fill the pixmap with the specified color. */ From d74ae145a38139f44d07d3361c0d5cdccac68b61 Mon Sep 17 00:00:00 2001 From: Thomas Eberhardt Date: Mon, 27 Jan 2025 05:21:06 +0100 Subject: [PATCH 22/22] make buttons behave a bit more like in a GUI --- z80core/simpanel.c | 111 +++++++++++++++++++++++++++++++-------------- 1 file changed, 76 insertions(+), 35 deletions(-) diff --git a/z80core/simpanel.c b/z80core/simpanel.c index 7f460236..bf6037ac 100644 --- a/z80core/simpanel.c +++ b/z80core/simpanel.c @@ -71,6 +71,17 @@ typedef const struct font { unsigned stride; } font_t; +/* include Terminus bitmap fonts */ +#include "fonts/font12.h" +#include "fonts/font14.h" +#include "fonts/font16.h" +#include "fonts/font18.h" +#include "fonts/font20.h" +#include "fonts/font22.h" +#include "fonts/font24.h" +#include "fonts/font28.h" +#include "fonts/font32.h" + /* * Grid type for drawing text with character based coordinates. */ @@ -93,6 +104,7 @@ typedef struct button { bool active; bool pressed; bool clicked; + bool hilighted; const unsigned x; const unsigned y; const unsigned width; @@ -101,19 +113,6 @@ typedef struct button { const char *text; } button_t; -/* include Terminus bitmap fonts */ -#include "fonts/font12.h" -#include "fonts/font14.h" -#include "fonts/font16.h" -#include "fonts/font18.h" -#include "fonts/font20.h" -#include "fonts/font22.h" -#include "fonts/font24.h" -#include "fonts/font28.h" -#include "fonts/font32.h" - -static void check_buttons(unsigned x, unsigned y, bool press); - /* * Buttons */ @@ -123,17 +122,30 @@ static void check_buttons(unsigned x, unsigned y, bool press); static button_t buttons[] = { [ MEMORY_BUTTON ] = { - false, false, false, false, 500, 1, 60, 19, &font12, "Memory" + false, false, false, false, false, + 500, 1, 60, 19, &font12, "Memory" }, [ PORTS_BUTTON ] = { - false, false, false, false, 500, 22, 60, 19, &font12, "Ports" + false, false, false, false, false, + 500, 22, 60, 19, &font12, "Ports" }, [ STICKY_BUTTON ] = { - false, false, false, false, 500, 43, 60, 19, &font12, "Sticky" + false, false, false, false, false, + 500, 43, 60, 19, &font12, "Sticky" } }; static const int nbuttons = sizeof(buttons) / sizeof(button_t); +/* + * Button events + */ + +#define EVENT_PRESS 0 +#define EVENT_RELEASE 1 +#define EVENT_MOTION 2 + +static void check_buttons(unsigned x, unsigned y, int event); + /* SDL2/X11 stuff */ static unsigned xsize, ysize; static uint32_t *pixels; @@ -227,7 +239,8 @@ static void open_display(void) swa.border_pixel = 0; swa.colormap = colormap; swa.event_mask = KeyPressMask | KeyReleaseMask | - ButtonPressMask | ButtonReleaseMask; + ButtonPressMask | ButtonReleaseMask | + PointerMotionMask; window = XCreateWindow(display, rootwindow, 0, 0, xsize, ysize, 1, vinfo.depth, InputOutput, visual, CWBorderPixel | CWColormap | CWEventMask, &swa); @@ -304,14 +317,21 @@ static void process_event(SDL_Event *event) if (event->window.windowID != SDL_GetWindowID(window)) break; - check_buttons(event->button.x, event->button.y, true); + check_buttons(event->button.x, event->button.y, EVENT_PRESS); break; case SDL_MOUSEBUTTONUP: if (event->window.windowID != SDL_GetWindowID(window)) break; - check_buttons(event->button.x, event->button.y, false); + check_buttons(event->button.x, event->button.y, EVENT_RELEASE); + break; + + case SDL_MOUSEMOTION: + if (event->window.windowID != SDL_GetWindowID(window)) + break; + + check_buttons(event->motion.x, event->motion.y, EVENT_MOTION); break; case SDL_KEYUP: @@ -416,7 +436,7 @@ static inline void process_events(void) case ButtonPress: if (event.xbutton.button < 4) check_buttons(event.xbutton.x, event.xbutton.y, - true); + EVENT_PRESS); else if (panel == MEMORY_PANEL) { if (event.xbutton.button == 4) mbase += shift ? 0x0100 : 0x0010; @@ -428,7 +448,12 @@ static inline void process_events(void) case ButtonRelease: if (event.xbutton.button < 4) check_buttons(event.xbutton.x, event.xbutton.y, - false); + EVENT_RELEASE); + break; + + case MotionNotify: + check_buttons(event.xmotion.x, event.xmotion.y, + EVENT_MOTION); break; case KeyRelease: @@ -1233,17 +1258,18 @@ static void draw_buttons(void) for (i = 0; i < nbuttons; i++) { if (p->enabled) { - draw_hline(p->x + 2, p->y, p->width - 4, C_WHITE); - draw_pixel(p->x + 1, p->y + 1, C_WHITE); - draw_pixel(p->x + p->width - 2, p->y + 1, C_WHITE); - draw_vline(p->x, p->y + 2, p->height - 4, C_WHITE); + color = p->hilighted ? C_ORANGE : C_WHITE; + draw_hline(p->x + 2, p->y, p->width - 4, color); + draw_pixel(p->x + 1, p->y + 1, color); + draw_pixel(p->x + p->width - 2, p->y + 1, color); + draw_vline(p->x, p->y + 2, p->height - 4, color); draw_vline(p->x + p->width - 1, p->y + 2, - p->height - 4, C_WHITE); - draw_pixel(p->x + 1, p->y + p->height - 2, C_WHITE); + p->height - 4, color); + draw_pixel(p->x + 1, p->y + p->height - 2, color); draw_pixel(p->x + p->width - 2, p->y + p->height - 2, - C_WHITE); + color); draw_hline(p->x + 2, p->y + p->height - 1, - p->width - 4, C_WHITE); + p->width - 4, color); color = C_DKBLUE; if (p->active) @@ -1312,20 +1338,35 @@ static void update_buttons(void) /* * Check for button presses */ -static void check_buttons(unsigned x, unsigned y, bool press) +static void check_buttons(unsigned x, unsigned y, int event) { int i; + bool inside; button_t *p = buttons; for (i = 0; i < nbuttons; i++) { if (p->enabled) { - if (press && x >= p->x && x < p->x + p->width && - y >= p->y && y < p->y + p->height) { - p->pressed = true; + inside = (x >= p->x && x < p->x + p->width && + y >= p->y && y < p->y + p->height); + switch (event) { + case EVENT_PRESS: + if (inside) + p->pressed = true; break; - } else if (p->pressed) { + case EVENT_RELEASE: + if (inside && p->pressed) + p->clicked = true; p->pressed = false; - p->clicked = true; + break; + case EVENT_MOTION: + if (inside) + p->hilighted = true; + else { + p->pressed = false; + p->hilighted = false; + } + break; + default: break; } }