project renamed to ui4x, prepare for 40g and 49g

This commit is contained in:
Gwenhael Le Moine 2024-09-25 10:29:29 +02:00
parent b92177ccee
commit 7f2230d8f7
No known key found for this signature in database
GPG key ID: FDFE3669426707A7
17 changed files with 246 additions and 246 deletions

2
.gitignore vendored
View file

@ -52,4 +52,4 @@ Module.symvers
Mkfile.old Mkfile.old
dkms.conf dkms.conf
/ui48 /ui4x

View file

@ -1,6 +1,6 @@
# Makefile # Makefile
TARGETS = ui48 TARGETS = ui4x
VERSION_MAJOR = 0 VERSION_MAJOR = 0
VERSION_MINOR = 0 VERSION_MINOR = 0
PATCHLEVEL = 0 PATCHLEVEL = 0
@ -9,12 +9,12 @@ PKG_CONFIG ?= pkg-config
MAKEFLAGS +=-j$(NUM_CORES) -l$(NUM_CORES) MAKEFLAGS +=-j$(NUM_CORES) -l$(NUM_CORES)
DOTOS = src/ui48_config.o \ DOTOS = src/ui4x_config.o \
src/ui48_emulator.o \ src/ui4x_emulator.o \
src/ui48_sdl2.o \ src/ui4x_sdl2.o \
src/ui48_ncurses.o \ src/ui4x_ncurses.o \
src/ui48_common.o \ src/ui4x_common.o \
src/ui48_main.o src/ui4x_main.o
cc-option = $(shell if $(CC) $(1) -c -x c /dev/null -o /dev/null > /dev/null 2>&1; \ cc-option = $(shell if $(CC) $(1) -c -x c /dev/null -o /dev/null > /dev/null 2>&1; \
then echo $(1); fi) then echo $(1); fi)
@ -68,7 +68,7 @@ LIBS = -lm \
all: $(TARGETS) all: $(TARGETS)
ui48: $(DOTOS) ui4x: $(DOTOS)
# Binaries # Binaries
$(TARGETS): $(TARGETS):

View file

@ -330,94 +330,94 @@ static unsigned char lcurly_bits[] = { 0x18, 0x04, 0x04, 0x02, 0x04, 0x04, 0x18
#define rcurly_height 7 #define rcurly_height 7
static unsigned char rcurly_bits[] = { 0x03, 0x04, 0x04, 0x08, 0x04, 0x04, 0x03 }; static unsigned char rcurly_bits[] = { 0x03, 0x04, 0x04, 0x08, 0x04, 0x04, 0x03 };
#define sqr_gx_width 11 #define sqr_48gx_width 11
#define sqr_gx_height 13 #define sqr_48gx_height 13
static unsigned char sqr_gx_bits[] = { 0x00, 0x03, 0x80, 0x04, 0x00, 0x04, 0x00, 0x02, 0x00, 0x01, 0x80, 0x07, 0x00, static unsigned char sqr_48gx_bits[] = { 0x00, 0x03, 0x80, 0x04, 0x00, 0x04, 0x00, 0x02, 0x00, 0x01, 0x80, 0x07, 0x00,
0x00, 0x66, 0x00, 0x14, 0x00, 0x08, 0x00, 0x14, 0x00, 0x53, 0x00, 0x21, 0x00 }; 0x00, 0x66, 0x00, 0x14, 0x00, 0x08, 0x00, 0x14, 0x00, 0x53, 0x00, 0x21, 0x00 };
#define root_gx_width 18 #define root_48gx_width 18
#define root_gx_height 15 #define root_48gx_height 15
static unsigned char root_gx_bits[] = { 0x66, 0x00, 0x00, 0x14, 0x00, 0x00, 0x08, 0x00, 0x00, 0x14, 0x00, 0x00, 0x53, 0xfe, 0x03, static unsigned char root_48gx_bits[] = { 0x66, 0x00, 0x00, 0x14, 0x00, 0x00, 0x08, 0x00, 0x00, 0x14, 0x00, 0x00, 0x53, 0xfe, 0x03,
0x21, 0x02, 0x02, 0x00, 0x02, 0x00, 0x00, 0x99, 0x00, 0x00, 0x91, 0x00, 0x10, 0x91, 0x00, 0x21, 0x02, 0x02, 0x00, 0x02, 0x00, 0x00, 0x99, 0x00, 0x00, 0x91, 0x00, 0x10, 0x91, 0x00,
0xa0, 0x50, 0x00, 0xc0, 0x60, 0x00, 0x80, 0x20, 0x00, 0x00, 0x14, 0x00, 0x00, 0x0c, 0x00 }; 0xa0, 0x50, 0x00, 0xc0, 0x60, 0x00, 0x80, 0x20, 0x00, 0x00, 0x14, 0x00, 0x00, 0x0c, 0x00 };
#define pow10_gx_width 13 #define pow10_48gx_width 13
#define pow10_gx_height 12 #define pow10_48gx_height 12
static unsigned char pow10_gx_bits[] = { 0x00, 0x12, 0x00, 0x0c, 0x00, 0x04, 0x00, 0x0a, 0x00, 0x09, 0x32, 0x00, static unsigned char pow10_48gx_bits[] = { 0x00, 0x12, 0x00, 0x0c, 0x00, 0x04, 0x00, 0x0a, 0x00, 0x09, 0x32, 0x00,
0x4b, 0x00, 0x4a, 0x00, 0x4a, 0x00, 0x4a, 0x00, 0x4a, 0x00, 0x32, 0x00 }; 0x4b, 0x00, 0x4a, 0x00, 0x4a, 0x00, 0x4a, 0x00, 0x4a, 0x00, 0x32, 0x00 };
#define exp_gx_width 13 #define exp_48gx_width 13
#define exp_gx_height 12 #define exp_48gx_height 12
static unsigned char exp_gx_bits[] = { 0x00, 0xfb, 0x00, 0xf6, 0x00, 0xe6, 0x00, 0xf6, 0x80, 0xed, 0x18, 0xe0, static unsigned char exp_48gx_bits[] = { 0x00, 0xfb, 0x00, 0xf6, 0x00, 0xe6, 0x00, 0xf6, 0x80, 0xed, 0x18, 0xe0,
0x36, 0xe0, 0x36, 0xe0, 0x1f, 0xe0, 0x03, 0xe0, 0x13, 0xe0, 0x0e, 0xe0 }; 0x36, 0xe0, 0x36, 0xe0, 0x1f, 0xe0, 0x03, 0xe0, 0x13, 0xe0, 0x0e, 0xe0 };
#define parens_gx_width 20 #define parens_48gx_width 20
#define parens_gx_height 12 #define parens_48gx_height 12
static unsigned char parens_gx_bits[] = { 0x0c, 0x00, 0x03, 0x06, 0x00, 0x06, 0x06, 0x00, 0x06, 0x03, 0x00, 0x0c, static unsigned char parens_48gx_bits[] = { 0x0c, 0x00, 0x03, 0x06, 0x00, 0x06, 0x06, 0x00, 0x06, 0x03, 0x00, 0x0c,
0x03, 0x00, 0x0c, 0x03, 0x00, 0x0c, 0x03, 0x00, 0x0c, 0x03, 0x00, 0x0c, 0x03, 0x00, 0x0c, 0x03, 0x00, 0x0c, 0x03, 0x00, 0x0c, 0x03, 0x00, 0x0c,
0x03, 0x00, 0x0c, 0x06, 0x00, 0x06, 0x06, 0x00, 0x06, 0x0c, 0x00, 0x03 }; 0x03, 0x00, 0x0c, 0x06, 0x00, 0x06, 0x06, 0x00, 0x06, 0x0c, 0x00, 0x03 };
#define hash_gx_width 8 #define hash_48gx_width 8
#define hash_gx_height 12 #define hash_48gx_height 12
static unsigned char hash_gx_bits[] = { 0x00, 0x00, 0x48, 0x48, 0xfe, 0x24, 0x24, 0x7f, 0x12, 0x12, 0x00, 0x00 }; static unsigned char hash_48gx_bits[] = { 0x00, 0x00, 0x48, 0x48, 0xfe, 0x24, 0x24, 0x7f, 0x12, 0x12, 0x00, 0x00 };
#define bracket_gx_width 12 #define bracket_48gx_width 12
#define bracket_gx_height 12 #define bracket_48gx_height 12
static unsigned char bracket_gx_bits[] = { 0x0f, 0x0f, 0x03, 0x0c, 0x03, 0x0c, 0x03, 0x0c, 0x03, 0x0c, 0x03, 0x0c, static unsigned char bracket_48gx_bits[] = { 0x0f, 0x0f, 0x03, 0x0c, 0x03, 0x0c, 0x03, 0x0c, 0x03, 0x0c, 0x03, 0x0c,
0x03, 0x0c, 0x03, 0x0c, 0x03, 0x0c, 0x03, 0x0c, 0x03, 0x0c, 0x0f, 0x0f }; 0x03, 0x0c, 0x03, 0x0c, 0x03, 0x0c, 0x03, 0x0c, 0x03, 0x0c, 0x0f, 0x0f };
#define under_gx_width 10 #define under_48gx_width 10
#define under_gx_height 12 #define under_48gx_height 12
static unsigned char under_gx_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, static unsigned char under_48gx_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x03, 0xff, 0x03 }; 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x03, 0xff, 0x03 };
#define prog_gx_width 24 #define prog_48gx_width 24
#define prog_gx_height 12 #define prog_48gx_height 12
static unsigned char prog_gx_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0xc3, 0x18, static unsigned char prog_48gx_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0xc3, 0x18,
0x8c, 0x81, 0x31, 0xc6, 0x00, 0x63, 0x63, 0x00, 0xc6, 0xc6, 0x00, 0x63, 0x8c, 0x81, 0x31, 0xc6, 0x00, 0x63, 0x63, 0x00, 0xc6, 0xc6, 0x00, 0x63,
0x8c, 0x81, 0x31, 0x18, 0xc3, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; 0x8c, 0x81, 0x31, 0x18, 0xc3, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
#define quote_gx_width 12 #define quote_48gx_width 12
#define quote_gx_height 12 #define quote_48gx_height 12
static unsigned char quote_gx_bits[] = { 0x05, 0x0a, 0x05, 0x0a, 0x05, 0x0a, 0x05, 0x0a, 0x00, 0x00, 0x00, 0x00, static unsigned char quote_48gx_bits[] = { 0x05, 0x0a, 0x05, 0x0a, 0x05, 0x0a, 0x05, 0x0a, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
#define curly_gx_width 14 #define curly_48gx_width 14
#define curly_gx_height 12 #define curly_48gx_height 12
static unsigned char curly_gx_bits[] = { 0x0c, 0x0c, 0x06, 0x18, 0x06, 0x18, 0x06, 0x18, 0x06, 0x18, 0x03, 0x30, static unsigned char curly_48gx_bits[] = { 0x0c, 0x0c, 0x06, 0x18, 0x06, 0x18, 0x06, 0x18, 0x06, 0x18, 0x03, 0x30,
0x06, 0x18, 0x06, 0x18, 0x06, 0x18, 0x06, 0x18, 0x06, 0x18, 0x0c, 0x0c }; 0x06, 0x18, 0x06, 0x18, 0x06, 0x18, 0x06, 0x18, 0x06, 0x18, 0x0c, 0x0c };
#define colon_gx_width 8 #define colon_48gx_width 8
#define colon_gx_height 12 #define colon_48gx_height 12
static unsigned char colon_gx_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0xc3, 0xc3, 0x00, 0x00, 0xc3, 0xc3, 0x00 }; static unsigned char colon_48gx_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0xc3, 0xc3, 0x00, 0x00, 0xc3, 0xc3, 0x00 };
#define angle_gx_width 12 #define angle_48gx_width 12
#define angle_gx_height 12 #define angle_48gx_height 12
static unsigned char angle_gx_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x80, 0x01, 0xc0, 0x00, 0xe0, 0x01, static unsigned char angle_48gx_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x80, 0x01, 0xc0, 0x00, 0xe0, 0x01,
0xb0, 0x03, 0x18, 0x03, 0x0c, 0x03, 0x06, 0x03, 0xff, 0x0f, 0xff, 0x0f }; 0xb0, 0x03, 0x18, 0x03, 0x0c, 0x03, 0x06, 0x03, 0xff, 0x0f, 0xff, 0x0f };
#define pi_gx_width 10 #define pi_48gx_width 10
#define pi_gx_height 12 #define pi_48gx_height 12
static unsigned char pi_gx_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xfe, 0x03, 0xff, 0x01, static unsigned char pi_48gx_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xfe, 0x03, 0xff, 0x01,
0xcc, 0x00, 0xcc, 0x00, 0xcc, 0x00, 0xcc, 0x00, 0xcc, 0x00, 0xcc, 0x00 }; 0xcc, 0x00, 0xcc, 0x00, 0xcc, 0x00, 0xcc, 0x00, 0xcc, 0x00, 0xcc, 0x00 };
#define nl_gx_width 18 #define nl_48gx_width 18
#define nl_gx_height 12 #define nl_48gx_height 12
static unsigned char nl_gx_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xc0, 0x00, 0x03, 0xf0, 0x00, 0x03, static unsigned char nl_48gx_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xc0, 0x00, 0x03, 0xf0, 0x00, 0x03,
0xfc, 0x00, 0x03, 0xff, 0xff, 0x03, 0xff, 0xff, 0x03, 0xfc, 0x00, 0x00, 0xfc, 0x00, 0x03, 0xff, 0xff, 0x03, 0xff, 0xff, 0x03, 0xfc, 0x00, 0x00,
0xf0, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; 0xf0, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
#define comma_gx_width 3 #define comma_48gx_width 3
#define comma_gx_height 12 #define comma_48gx_height 12
static unsigned char comma_gx_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x07, 0x07, 0x04, 0x04, 0x02 }; static unsigned char comma_48gx_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x07, 0x07, 0x04, 0x04, 0x02 };
#define arrow_gx_width 18 #define arrow_48gx_width 18
#define arrow_gx_height 12 #define arrow_48gx_height 12
static unsigned char arrow_gx_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x3c, 0x00, static unsigned char arrow_48gx_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x3c, 0x00,
0x00, 0xfc, 0x00, 0xff, 0xff, 0x03, 0xff, 0xff, 0x03, 0x00, 0xfc, 0x00, 0x00, 0xfc, 0x00, 0xff, 0xff, 0x03, 0xff, 0xff, 0x03, 0x00, 0xfc, 0x00,
0x00, 0x3c, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; 0x00, 0x3c, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
#define equal_gx_width 8 #define equal_48gx_width 8
#define equal_gx_height 12 #define equal_48gx_height 12
static unsigned char equal_gx_bits[] = { 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00 }; static unsigned char equal_48gx_bits[] = { 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00 };
#endif /* _UI48_BITMAPS_SMALL_FONT_H 1 */ #endif /* _UI48_BITMAPS_SMALL_FONT_H 1 */

View file

@ -1,139 +1,139 @@
#include <stdlib.h> #include <stdlib.h>
#include "ui48_common.h" #include "ui4x_common.h"
#include "ui48_inner.h" #include "ui4x_inner.h"
#include "ui48_sdl2.h" #include "ui4x_sdl2.h"
#include "ui48_ncurses.h" #include "ui4x_ncurses.h"
letter_t small_font[ 128 ] = { letter_t small_font[ 128 ] = {
{0, 0, 0 }, {0, 0, 0 },
{nl_gx_width, nl_gx_height, nl_gx_bits }, /* \x01 == \n gx */ {nl_48gx_width, nl_48gx_height, nl_48gx_bits }, /* \x01 == \n gx */
{comma_gx_width, comma_gx_height, comma_gx_bits }, /* \x02 == comma gx */ {comma_48gx_width, comma_48gx_height, comma_48gx_bits }, /* \x02 == comma gx */
{arrow_gx_width, arrow_gx_height, arrow_gx_bits }, /* \x03 == \-> gx */ {arrow_48gx_width, arrow_48gx_height, arrow_48gx_bits }, /* \x03 == \-> gx */
{equal_gx_width, equal_gx_height, equal_gx_bits }, /* \x04 == equal gx */ {equal_48gx_width, equal_48gx_height, equal_48gx_bits }, /* \x04 == equal gx */
{pi_gx_width, pi_gx_height, pi_gx_bits }, /* \x05 == pi gx */ {pi_48gx_width, pi_48gx_height, pi_48gx_bits }, /* \x05 == pi gx */
{arrow_width, arrow_height, arrow_bits }, /* \x06 == left arrow */ {arrow_width, arrow_height, arrow_bits }, /* \x06 == left arrow */
{diff_width, diff_height, diff_bits }, /* \x07 == differential */ {diff_width, diff_height, diff_bits }, /* \x07 == differential */
{integral_width, integral_height, integral_bits }, /* \x08 == integral */ {integral_width, integral_height, integral_bits }, /* \x08 == integral */
{sigma_width, sigma_height, sigma_bits }, /* \x09 == sigma */ {sigma_width, sigma_height, sigma_bits }, /* \x09 == sigma */
{sqr_width, sqr_height, sqr_bits }, /* \x0a == sqr */ {sqr_width, sqr_height, sqr_bits }, /* \x0a == sqr */
{root_width, root_height, root_bits }, /* \x0b == root */ {root_width, root_height, root_bits }, /* \x0b == root */
{pow10_width, pow10_height, pow10_bits }, /* \x0c == pow10 */ {pow10_width, pow10_height, pow10_bits }, /* \x0c == pow10 */
{exp_width, exp_height, exp_bits }, /* \x0d == exp */ {exp_width, exp_height, exp_bits }, /* \x0d == exp */
{prog_width, prog_height, prog_bits }, /* \x0e == << >> */ {prog_width, prog_height, prog_bits }, /* \x0e == << >> */
{string_width, string_height, string_bits }, /* \x0f == " " */ {string_width, string_height, string_bits }, /* \x0f == " " */
{nl_width, nl_height, nl_bits }, /* \x10 == New Line # 16 */ {nl_width, nl_height, nl_bits }, /* \x10 == New Line # 16 */
{pi_width, pi_height, pi_bits }, /* \x11 == pi */ {pi_width, pi_height, pi_bits }, /* \x11 == pi */
{angle_width, angle_height, angle_bits }, /* \x12 == angle */ {angle_width, angle_height, angle_bits }, /* \x12 == angle */
{sqr_gx_width, sqr_gx_height, sqr_gx_bits }, /* \x13 == sqr gx */ {sqr_48gx_width, sqr_48gx_height, sqr_48gx_bits }, /* \x13 == sqr gx */
{root_gx_width, root_gx_height, root_gx_bits }, /* \x14 == root gx */ {root_48gx_width, root_48gx_height, root_48gx_bits }, /* \x14 == root gx */
{pow10_gx_width, pow10_gx_height, pow10_gx_bits }, /* \x15 == pow10 gx */ {pow10_48gx_width, pow10_48gx_height, pow10_48gx_bits }, /* \x15 == pow10 gx */
{exp_gx_width, exp_gx_height, exp_gx_bits }, /* \x16 == exp gx */ {exp_48gx_width, exp_48gx_height, exp_48gx_bits }, /* \x16 == exp gx */
{parens_gx_width, parens_gx_height, parens_gx_bits }, /* \x17 == ( ) gx */ {parens_48gx_width, parens_48gx_height, parens_48gx_bits }, /* \x17 == ( ) gx */
{hash_gx_width, hash_gx_height, hash_gx_bits }, /* \x18 == # gx */ {hash_48gx_width, hash_48gx_height, hash_48gx_bits }, /* \x18 == # gx */
{bracket_gx_width, bracket_gx_height, bracket_gx_bits }, /* \x19 == [] gx */ {bracket_48gx_width, bracket_48gx_height, bracket_48gx_bits}, /* \x19 == [] gx */
{under_gx_width, under_gx_height, under_gx_bits }, /* \x1a == _ gx */ {under_48gx_width, under_48gx_height, under_48gx_bits }, /* \x1a == _ gx */
{prog_gx_width, prog_gx_height, prog_gx_bits }, /* \x1b == << >> gx */ {prog_48gx_width, prog_48gx_height, prog_48gx_bits }, /* \x1b == << >> gx */
{quote_gx_width, quote_gx_height, quote_gx_bits }, /* \x1c == " " gx */ {quote_48gx_width, quote_48gx_height, quote_48gx_bits }, /* \x1c == " " gx */
{curly_gx_width, curly_gx_height, curly_gx_bits }, /* \x1d == {} gx */ {curly_48gx_width, curly_48gx_height, curly_48gx_bits }, /* \x1d == {} gx */
{colon_gx_width, colon_gx_height, colon_gx_bits }, /* \x1e == :: gx */ {colon_48gx_width, colon_48gx_height, colon_48gx_bits }, /* \x1e == :: gx */
{angle_gx_width, angle_gx_height, angle_gx_bits }, /* \x1f == angle gx */ {angle_48gx_width, angle_48gx_height, angle_48gx_bits }, /* \x1f == angle gx */
{blank_width, blank_height, blank_bits }, /* # 32 */ {blank_width, blank_height, blank_bits }, /* # 32 */
{0, 0, 0 }, {0, 0, 0 },
{0, 0, 0 }, {0, 0, 0 },
{hash_width, hash_height, hash_bits }, {hash_width, hash_height, hash_bits },
{0, 0, 0 }, {0, 0, 0 },
{0, 0, 0 }, {0, 0, 0 },
{0, 0, 0 }, {0, 0, 0 },
{0, 0, 0 }, {0, 0, 0 },
{lbrace_width, lbrace_height, lbrace_bits }, {lbrace_width, lbrace_height, lbrace_bits },
{rbrace_width, rbrace_height, rbrace_bits }, {rbrace_width, rbrace_height, rbrace_bits },
{0, 0, 0 }, {0, 0, 0 },
{0, 0, 0 }, {0, 0, 0 },
{comma_width, comma_height, comma_bits }, {comma_width, comma_height, comma_bits },
{0, 0, 0 }, {0, 0, 0 },
{0, 0, 0 }, {0, 0, 0 },
{slash_width, slash_height, slash_bits }, {slash_width, slash_height, slash_bits },
{zero_width, zero_height, zero_bits }, /* # 48 */ {zero_width, zero_height, zero_bits }, /* # 48 */
{one_width, one_height, one_bits }, {one_width, one_height, one_bits },
{two_width, two_height, two_bits }, {two_width, two_height, two_bits },
{three_width, three_height, three_bits }, {three_width, three_height, three_bits },
{four_width, four_height, four_bits }, {four_width, four_height, four_bits },
{five_width, five_height, five_bits }, {five_width, five_height, five_bits },
{six_width, six_height, six_bits }, {six_width, six_height, six_bits },
{seven_width, seven_height, seven_bits }, {seven_width, seven_height, seven_bits },
{eight_width, eight_height, eight_bits }, {eight_width, eight_height, eight_bits },
{nine_width, nine_height, nine_bits }, {nine_width, nine_height, nine_bits },
{small_colon_width, small_colon_height, small_colon_bits}, {small_colon_width, small_colon_height, small_colon_bits },
{0, 0, 0 }, {0, 0, 0 },
{0, 0, 0 }, {0, 0, 0 },
{equal_width, equal_height, equal_bits }, {equal_width, equal_height, equal_bits },
{0, 0, 0 }, {0, 0, 0 },
{0, 0, 0 }, {0, 0, 0 },
{0, 0, 0 }, /* # 64 */ {0, 0, 0 }, /* # 64 */
{A_width, A_height, A_bits }, {A_width, A_height, A_bits },
{B_width, B_height, B_bits }, {B_width, B_height, B_bits },
{C_width, C_height, C_bits }, {C_width, C_height, C_bits },
{D_width, D_height, D_bits }, {D_width, D_height, D_bits },
{E_width, E_height, E_bits }, {E_width, E_height, E_bits },
{F_width, F_height, F_bits }, {F_width, F_height, F_bits },
{G_width, G_height, G_bits }, {G_width, G_height, G_bits },
{H_width, H_height, H_bits }, {H_width, H_height, H_bits },
{I_width, I_height, I_bits }, {I_width, I_height, I_bits },
{J_width, J_height, J_bits }, {J_width, J_height, J_bits },
{K_width, K_height, K_bits }, {K_width, K_height, K_bits },
{L_width, L_height, L_bits }, {L_width, L_height, L_bits },
{M_width, M_height, M_bits }, {M_width, M_height, M_bits },
{N_width, N_height, N_bits }, {N_width, N_height, N_bits },
{O_width, O_height, O_bits }, {O_width, O_height, O_bits },
{P_width, P_height, P_bits }, /* # 80 */ {P_width, P_height, P_bits }, /* # 80 */
{Q_width, Q_height, Q_bits }, {Q_width, Q_height, Q_bits },
{R_width, R_height, R_bits }, {R_width, R_height, R_bits },
{S_width, S_height, S_bits }, {S_width, S_height, S_bits },
{T_width, T_height, T_bits }, {T_width, T_height, T_bits },
{U_width, U_height, U_bits }, {U_width, U_height, U_bits },
{V_width, V_height, V_bits }, {V_width, V_height, V_bits },
{W_width, W_height, W_bits }, {W_width, W_height, W_bits },
{X_width, X_height, X_bits }, {X_width, X_height, X_bits },
{Y_width, Y_height, Y_bits }, {Y_width, Y_height, Y_bits },
{Z_width, Z_height, Z_bits }, {Z_width, Z_height, Z_bits },
{lbracket_width, lbracket_height, lbracket_bits }, {lbracket_width, lbracket_height, lbracket_bits },
{0, 0, 0 }, {0, 0, 0 },
{rbracket_width, rbracket_height, rbracket_bits }, {rbracket_width, rbracket_height, rbracket_bits },
{0, 0, 0 }, {0, 0, 0 },
{under_width, under_height, under_bits }, {under_width, under_height, under_bits },
{0, 0, 0 }, /* # 96 */ {0, 0, 0 }, /* # 96 */
{0, 0, 0 }, /* a */ {0, 0, 0 }, /* a */
{0, 0, 0 }, /* b */ {0, 0, 0 }, /* b */
{0, 0, 0 }, /* c */ {0, 0, 0 }, /* c */
{d_width, d_height, d_bits }, {d_width, d_height, d_bits },
{e_width, e_height, e_bits }, {e_width, e_height, e_bits },
{0, 0, 0 }, /* f */ {0, 0, 0 }, /* f */
{0, 0, 0 }, /* g */ {0, 0, 0 }, /* g */
{0, 0, 0 }, /* h */ {0, 0, 0 }, /* h */
{i_width, i_height, i_bits }, {i_width, i_height, i_bits },
{0, 0, 0 }, /* j */ {0, 0, 0 }, /* j */
{0, 0, 0 }, /* k */ {0, 0, 0 }, /* k */
{0, 0, 0 }, /* l */ {0, 0, 0 }, /* l */
{0, 0, 0 }, /* m */ {0, 0, 0 }, /* m */
{0, 0, 0 }, /* n */ {0, 0, 0 }, /* n */
{0, 0, 0 }, /* o */ {0, 0, 0 }, /* o */
{p_width, p_height, p_bits }, {p_width, p_height, p_bits },
{0, 0, 0 }, /* q */ {0, 0, 0 }, /* q */
{r_width, r_height, r_bits }, {r_width, r_height, r_bits },
{s_width, s_height, s_bits }, {s_width, s_height, s_bits },
{t_width, t_height, t_bits }, {t_width, t_height, t_bits },
{0, 0, 0 }, /* u */ {0, 0, 0 }, /* u */
{v_width, v_height, v_bits }, {v_width, v_height, v_bits },
{w_width, w_height, w_bits }, {w_width, w_height, w_bits },
{0, 0, 0 }, /* x */ {0, 0, 0 }, /* x */
{y_width, y_height, y_bits }, {y_width, y_height, y_bits },
{0, 0, 0 }, /* z */ {0, 0, 0 }, /* z */
{lcurly_width, lcurly_height, lcurly_bits }, {lcurly_width, lcurly_height, lcurly_bits },
{0, 0, 0 }, {0, 0, 0 },
{rcurly_width, rcurly_height, rcurly_bits }, {rcurly_width, rcurly_height, rcurly_bits },
{0, 0, 0 }, {0, 0, 0 },
{0, 0, 0 }, /* 127 */ {0, 0, 0 }, /* 127 */
}; };
letter_t big_font[ 128 ] = { letter_t big_font[ 128 ] = {
@ -267,7 +267,7 @@ letter_t big_font[ 128 ] = {
{0, 0, 0 } {0, 0, 0 }
}; };
color_t colors_sx[ NB_COLORS ] = { color_t colors_48sx[ NB_COLORS ] = {
{ {
/* #ffffff */ /* #ffffff */
.name = "white", .name = "white",
@ -470,7 +470,7 @@ color_t colors_sx[ NB_COLORS ] = {
}, },
}; };
color_t colors_gx[ NB_COLORS ] = { color_t colors_48gx[ NB_COLORS ] = {
{ {
/* #FFFFFF */ /* #FFFFFF */
.name = "white", .name = "white",
@ -673,7 +673,7 @@ color_t colors_gx[ NB_COLORS ] = {
}, },
}; };
button_t buttons_sx[ NB_KEYS ] = { button_t buttons_48sx[ NB_KEYS ] = {
{.name = "A", {.name = "A",
.x = 0, .x = 0,
.y = 0, .y = 0,
@ -1468,7 +1468,7 @@ button_t buttons_sx[ NB_KEYS ] = {
.sub = 0 }, .sub = 0 },
}; };
button_t buttons_gx[ NB_KEYS ] = { button_t buttons_48gx[ NB_KEYS ] = {
{.name = "A", {.name = "A",
.x = 0, .x = 0,
.y = 0, .y = 0,

View file

@ -1,7 +1,7 @@
#ifndef _UI48_COMMON_H #ifndef _UI48_COMMON_H
#define _UI48_COMMON_H 1 #define _UI48_COMMON_H 1
#include "ui48_config.h" #include "ui4x_config.h"
/*************************************************/ /*************************************************/
/* public API: if it's there it's used elsewhere */ /* public API: if it's there it's used elsewhere */

View file

@ -10,10 +10,10 @@
#include <getopt.h> #include <getopt.h>
#include "ui48_config.h" #include "ui4x_config.h"
static config_t config = { static config_t config = {
.progname = ( char* )"ui48", .progname = ( char* )"ui4x",
.model = MODEL_48GX, .model = MODEL_48GX,
.verbose = false, .verbose = false,

View file

@ -1,5 +1,5 @@
#include "ui48_config.h" #include "ui4x_config.h"
#include "ui48_emulator.h" #include "ui4x_emulator.h"
static config_t config; static config_t config;

View file

@ -3,7 +3,7 @@
#include <stdbool.h> #include <stdbool.h>
#include "ui48_config.h" #include "ui4x_config.h"
// Keys // Keys
#define HPKEY_A 0 #define HPKEY_A 0

View file

@ -1,11 +1,11 @@
#ifndef _UI48_INNER_H #ifndef _UI48_INNER_H
#define _UI48_INNER_H 1 #define _UI48_INNER_H 1
#include "ui48_emulator.h" #include "ui4x_emulator.h"
#include "ui48_bitmaps_misc.h" #include "ui4x_bitmaps_misc.h"
#include "ui48_bitmaps_small_font.h" #include "ui4x_bitmaps_small_font.h"
#include "ui48_bitmaps_big_font.h" #include "ui4x_bitmaps_big_font.h"
// Colors // Colors
/* SX GX */ /* SX GX */
@ -75,11 +75,11 @@ typedef struct button_t {
extern letter_t small_font[ 128 ]; extern letter_t small_font[ 128 ];
extern letter_t big_font[ 128 ]; extern letter_t big_font[ 128 ];
extern color_t colors_sx[ NB_COLORS ]; extern color_t colors_48sx[ NB_COLORS ];
extern color_t colors_gx[ NB_COLORS ]; extern color_t colors_48gx[ NB_COLORS ];
extern button_t buttons_sx[ NB_KEYS ]; extern button_t buttons_48sx[ NB_KEYS ];
extern button_t buttons_gx[ NB_KEYS ]; extern button_t buttons_48gx[ NB_KEYS ];
#define small_ascent 8 #define small_ascent 8
#define small_descent 4 #define small_descent 4

View file

@ -5,8 +5,8 @@
#include <time.h> #include <time.h>
#include <sys/time.h> #include <sys/time.h>
#include "ui48_emulator.h" #include "ui4x_emulator.h"
#include "ui48_common.h" #include "ui4x_common.h"
#define UI_REFRESH_RATE_Hz 64 #define UI_REFRESH_RATE_Hz 64

View file

@ -14,13 +14,13 @@
#include <curses.h> #include <curses.h>
#include "ui48_config.h" #include "ui4x_config.h"
#include "ui48_emulator.h" #include "ui4x_emulator.h"
#include "ui48_common.h" #include "ui4x_common.h"
#include "ui48_inner.h" #include "ui4x_inner.h"
#define COLORS ( config.model == MODEL_48GX ? colors_gx : colors_sx ) #define COLORS ( config.model == MODEL_48GX ? colors_48gx : colors_48sx )
#define BUTTONS ( config.model == MODEL_48GX ? buttons_gx : buttons_sx ) #define BUTTONS ( config.model == MODEL_48GX ? buttons_48gx : buttons_48sx )
#define LCD_OFFSET_X 1 #define LCD_OFFSET_X 1
#define LCD_OFFSET_Y 1 #define LCD_OFFSET_Y 1

View file

@ -2,13 +2,13 @@
#include <SDL2/SDL.h> #include <SDL2/SDL.h>
#include "ui48_config.h" #include "ui4x_config.h"
#include "ui48_emulator.h" #include "ui4x_emulator.h"
#include "ui48_common.h" #include "ui4x_common.h"
#include "ui48_inner.h" #include "ui4x_inner.h"
#define COLORS ( config.model == MODEL_48GX ? colors_gx : colors_sx ) #define COLORS ( config.model == MODEL_48GX ? colors_48gx : colors_48sx )
#define BUTTONS ( config.model == MODEL_48GX ? buttons_gx : buttons_sx ) #define BUTTONS ( config.model == MODEL_48GX ? buttons_48gx : buttons_48sx )
#define KEYBOARD_HEIGHT ( BUTTONS[ LAST_HPKEY ].y + BUTTONS[ LAST_HPKEY ].h ) #define KEYBOARD_HEIGHT ( BUTTONS[ LAST_HPKEY ].y + BUTTONS[ LAST_HPKEY ].h )
#define KEYBOARD_WIDTH ( BUTTONS[ LAST_HPKEY ].x + BUTTONS[ LAST_HPKEY ].w ) #define KEYBOARD_WIDTH ( BUTTONS[ LAST_HPKEY ].x + BUTTONS[ LAST_HPKEY ].w )