diff --git a/.config b/.config
new file mode 100644
index 000000000..6f1753172
--- /dev/null
+++ b/.config
@@ -0,0 +1,107 @@
+#
+# This is an example FreeWPC config file.
+# If you don't already have a .config, you can rename this one
+# and change anything you don't like.
+#
+# Some features must be enabled using an "eval-call-have" command.
+# This ensures that the conditional is seen by makefiles, C
+# files, and assembly language files. Failure to do so may
+# cause features to be only partially enabled. There are
+# exceptions, for example, when a conditional is only needed
+# by the makefiles. Use this example config to guide you.
+#
+
+
+# Parallel make will speed up compiles slightly. In general
+# the argument to -j should be the number of processors you have,
+# plus one.
+#MAKEFLAGS := -j2
+#MAKEFLAGS := -j3
+
+# If you want to simulate, enable CONFIG_SIM. This builds a
+# program you can run on your build system, instead of a ROM.
+# You should also choose a UI for how the system will be displayed;
+# 'curses' is the most complete, but there are alternatives.
+# $(eval $(call have,CONFIG_SIM))
+#CONFIG_UI := curses
+#CONFIG_UI := console
+#CONFIG_UI := sdl
+#CONFIG_UI := remote
+
+# Set the machine you are trying to build.
+# If you are primarily working with a single machine type, it is
+# easier to specify it here than saying MACHINE=xxx every time you run
+# make.
+#MACHINE := tz
+MACHINE := dm
+#MACHINE := afm
+#MACHINE := wcs
+#MACHINE := t2
+#MACHINE := fh
+#MACHINE := tester
+#MACHINE := tspp
+#MACHINE := afm
+#MACHINE := tom
+#MACHINE := bop
+#MACHINE := corvette
+
+#
+# Set this to the directory in which MAME roms should be installed.
+# If you don't have MAME, then you can leave this undefined.
+# If it is set, then by default, your newly compiled game ROM will
+# temporarily overwrite one of the PinMAME ROMs, so that running
+# PinMAME will test our version instead of the factory. Which ROM
+# gets overwritten is set in the machine's Makefile.
+#
+# To restore the factory ROM, run "make uninstall".
+#
+# Under Windows+Cygwin, use something like the following. make has
+# trouble with filenames that have spaces or colons in them.
+#TARGET_ROMPATH := "/cygdrive/c/Progra~1/VPinmame/roms"
+
+#
+# Set FREEWPC_DEBUGGER if you want to enable dbprintf() statements throughout
+# the code. They will be written to the serial/parallel port. This requires
+# a patched PinMAME in order to view the messages. This has no effect in
+# a real machine. In simulation, these messages get written to a log file.
+#
+#$(eval $(call have,DEBUGGER))
+
+#
+# Enable CONFIG_BPT if you want to enable breakpoints. You can press
+# Escape anytime and the non-interrupt driven part of the system will
+# pause, and you can inspect memory addresses. This also lets you
+# set breakpoints at specific adddresses. When enabled, this
+# automatically enables FREE ONLY.
+#
+#$(eval $(call have,CONFIG_BPT))
+
+
+#
+# Set if you wish to override the major/minor version numbers
+# to be used. SYSTEM refers to the core code, MACHINE to the
+# game rev.
+#
+#SYSTEM_MAJOR=
+#SYSTEM_MINOR=
+#MACHINE_MAJOR=
+#MACHINE_MINOR=
+
+# Set to the version of gcc6809 installed.
+# The 4.3.x releases are recommended, although 4.2.x releases
+# should still work. This option is ignored when simulating; your
+# local 'gcc' will be used instead.
+#GCC_VERSION := 4.2.3
+GCC_VERSION := 4.3.4
+#GCC_VERSION := 4.3.6
+
+# If you have other flags to pass to the compiler, define them here.
+#EXTRA_CFLAGS += -save-temps
+# $(eval $(call have,CONFIG_DEBUG_STACK))
+#EXTRA_CFLAGS += -DFREE_ONLY
+
+# For debugging the compiler itself. Do not define this unless you
+# working on gcc6809.
+#DEBUG_COMPILER := y
+
+# vim: set filetype=make:
diff --git a/.cproject b/.cproject
new file mode 100644
index 000000000..9841de2e8
--- /dev/null
+++ b/.cproject
@@ -0,0 +1,88 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/include/afm/protos.h b/.include_mach
similarity index 100%
rename from include/afm/protos.h
rename to .include_mach
diff --git a/.mach b/.mach
new file mode 100644
index 000000000..e69de29bb
diff --git a/.project b/.project
new file mode 100644
index 000000000..3ddc3dd85
--- /dev/null
+++ b/.project
@@ -0,0 +1,79 @@
+
+
+ freewpc
+
+
+
+
+
+ org.eclipse.cdt.managedbuilder.core.genmakebuilder
+ clean,full,incremental,
+
+
+ ?name?
+
+
+
+ org.eclipse.cdt.make.core.append_environment
+ true
+
+
+ org.eclipse.cdt.make.core.autoBuildTarget
+ all
+
+
+ org.eclipse.cdt.make.core.buildArguments
+
+
+
+ org.eclipse.cdt.make.core.buildCommand
+ make
+
+
+ org.eclipse.cdt.make.core.cleanBuildTarget
+ clean
+
+
+ org.eclipse.cdt.make.core.contents
+ org.eclipse.cdt.make.core.activeConfigSettings
+
+
+ org.eclipse.cdt.make.core.enableAutoBuild
+ false
+
+
+ org.eclipse.cdt.make.core.enableCleanBuild
+ true
+
+
+ org.eclipse.cdt.make.core.enableFullBuild
+ true
+
+
+ org.eclipse.cdt.make.core.fullBuildTarget
+ all
+
+
+ org.eclipse.cdt.make.core.stopOnError
+ true
+
+
+ org.eclipse.cdt.make.core.useDefaultBuildCmd
+ true
+
+
+
+
+ org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder
+ full,incremental,
+
+
+
+
+
+ org.eclipse.cdt.core.cnature
+ org.eclipse.cdt.core.ccnature
+ org.eclipse.cdt.managedbuilder.core.managedBuildNature
+ org.eclipse.cdt.managedbuilder.core.ScannerConfigNature
+
+
diff --git a/Makefile b/Makefile
index c5f6ce791..3ce0adaaa 100644
--- a/Makefile
+++ b/Makefile
@@ -19,6 +19,7 @@ export SHELL
define have
$1 := y
+HAVE_LIST += $1
AUTO_CFLAGS += -D$1
EXTRA_ASFLAGS += -D$1
SCHED_FLAGS += -D $1
@@ -31,9 +32,9 @@ EXTRA_ASFLAGS += -U$1
endef
# Include the .config file, which must exist
-DOTCONFIG ?= .config
-ifneq ($(DOTCONFIG),)
-include $(DOTCONFIG)
+CONFIG ?= .config
+ifneq ($(CONFIG),)
+include $(CONFIG)
endif
define require
@@ -96,13 +97,11 @@ check_prereqs : clean_err
KERNEL_OBJS :=
COMMON_BASIC_OBJS :=
-# TODO : include the real, non-sim Makefile after the simulation
-# Makefile too.
+PMAKEFILE := platform/$(PLATFORM)/Makefile
ifeq ($(CONFIG_SIM), y)
include sim/Makefile
else
-PMAKEFILE := platform/$(PLATFORM)/Makefile
--include $(PMAKEFILE)
+include $(PMAKEFILE)
endif
@@ -114,7 +113,8 @@ BUILD_YEAR := $(shell date +%Y)
.PHONY : platform_target
ifeq ($(CPU), native)
-platform_target : native
+NATIVE_PROG := $(BLDDIR)/freewpc_$(MACHINE)
+platform_target : $(NATIVE_PROG)
else
ifdef TARGET_ROMPATH
platform_target : install
@@ -177,9 +177,12 @@ D := tools/$1
include tools/$1/$1.make
endef
+ifndef CONFIG_GEN_RTT
$(eval $(call include-tool,sched)) # Realtime scheduler
+endif
+ifeq ($(CONFIG_DMD),y)
$(eval $(call include-tool,imgld)) # Image linker
-
+endif
ifeq ($(CPU),m6809)
$(eval $(call include-tool,srec2bin)) # SREC to binary converter
$(eval $(call include-tool,csum)) # Checksum update utility
@@ -215,13 +218,13 @@ include common/Makefile
ifeq ($(CONFIG_FONT),y)
include fonts/Makefile
endif
-ifdef CONFIG_PLATFORM_WPC
include test/Makefile
-endif
-# FUTURE : include effect/Makefile
EVENT_OBJS = $(BLDDIR)/callset.o
+ifdef CONFIG_GEN_RTT
+EVENT_OBJS += $(BLDDIR)/rtt.o
+endif
BASIC_OBJS = $(KERNEL_BASIC_OBJS) $(COMMON_BASIC_OBJS) $(FONT_OBJS) $(TRANS_OBJS)
@@ -254,7 +257,7 @@ CFLAGS += -Wall -Wstrict-prototypes
CFLAGS += -DBUILD_MONTH=$(BUILD_MONTH) -DBUILD_DAY=$(BUILD_DAY) -DBUILD_YEAR=$(BUILD_YEAR)
SYSTEM_MAJOR ?= 1
-SYSTEM_MINOR ?= 20
+SYSTEM_MINOR ?= 30
SYSTEM_EXTRAVERSION ?= DEV
MACHINE_MAJOR ?= 0
MACHINE_MINOR ?= 00
@@ -267,7 +270,6 @@ ifeq ($(FREEWPC_DEBUGGER),y)
CFLAGS += -DDEBUGGER
EXTRA_ASFLAGS += -DDEBUGGER
endif
-
CFLAGS += $(EXTRA_CFLAGS) $(AUTO_CFLAGS)
SCHED_HEADERS := include/freewpc.h include/interrupt.h $(SCHED_HEADERS)
@@ -280,7 +282,6 @@ else
GAME_ROM = freewpc.rom
endif
MAP_FILE = $(GAME_ROM:.rom=.map)
-NATIVE_PROG = $(BLDDIR)/freewpc_$(MACHINE)
ifndef MACHINE_FILE
MACHINE_FILE = $(MACHINE).md
@@ -305,7 +306,8 @@ SYSTEM_MD_OBJS = \
$(BLDDIR)/mach-switches.o \
$(BLDDIR)/mach-containers.o \
$(BLDDIR)/mach-drives.o \
- $(BLDDIR)/mach-deffs.o
+ $(BLDDIR)/mach-deffs.o \
+ $(BLDDIR)/mach-vars.o
ifeq ($(CONFIG_FONT),y)
SYSTEM_MD_OBJS += $(BLDDIR)/mach-fonts.o
@@ -317,7 +319,7 @@ MD_OBJS = $(PAGED_MD_OBJS) $(SYSTEM_MD_OBJS)
### Object File Distribution
#######################################################################
-ifneq ($(CONFIG_SIM), y)
+ifeq ($(CPU), m6809)
NUM_PAGED_SECTIONS := $(words $(CONFIG_CODE_PAGE_LIST))
NUM_BLANK_PAGES := $(shell echo $$(($(ROM_PAGE_COUNT) - $(CONFIG_FIXED_PAGE_COUNT) - $(NUM_PAGED_SECTIONS))))
BLANK_SIZE := $(shell echo $$(( $(NUM_BLANK_PAGES) * $(CONFIG_ROM_BANK_SIZE))))
@@ -328,6 +330,7 @@ TOP_BANK = $(lastword $(CONFIG_CODE_PAGE_LIST))
else
BLANK_SIZE := 512
CONFIG_SYSTEM_CODE_PAGE := 0
+FIRST_BANK := 0
endif
#
@@ -358,10 +361,18 @@ $(eval $(call AREA_SETUP, stack, 0x1680, 0x0180, virtual))
$(eval $(call AREA_SETUP, nvram, 0x1810, 0x06F0))
$(eval $(call AREA_SETUP, dirtab, 0x1F00, 0x0100))
$(eval $(call AREA_SETUP, paged, 0x4000, 0x4000, virtual))
-$(eval $(call AREA_SETUP, sysrom, 0x8000, 0x7FF0, virtual))
+$(eval $(call AREA_SETUP, sysrom, 0x8000, 0x7FB0, virtual))
+$(eval $(call AREA_SETUP, registers, 0xFFB0, 0x0040))
$(eval $(call AREA_SETUP, vector, 0xFFF0, 0x0010, virtual))
-SYSROM_SIZE := $(shell echo $$(($(AREASIZE_sysrom) + $(AREASIZE_vector))))
+# Declare pseudo-sections for non-variable objects. The
+# adddresses are used as autogenerated IDs; we use the linker
+# facilities instead of genmachine to make these.
+$(eval $(call AREA_SETUP, .flag, 0x0000, 0x0100))
+$(eval $(call AREA_SETUP, .globalflag, 0x0000, 0x0100))
+$(eval $(call AREA_SETUP, .freetimer, 0x0000, 0x0100))
+
+SYSROM_SIZE := $(shell echo $$(($(AREASIZE_sysrom) + $(AREASIZE_vector) + $(AREASIZE_registers))))
MACHINE_SYS_OBJS = $(patsubst %,$(MACHINE_DIR)/%,$(GAME_OBJS))
MACHINE_TEST_OBJS = $(patsubst %,$(MACHINE_DIR)/%,$(GAME_TEST_OBJS))
@@ -443,6 +454,10 @@ C_OBJS := $(MD_OBJS) $(KERNEL_OBJS) $(COMMON_OBJS) $(COMMON2_OBJS) $(EVENT_OBJS)
$(MACHINE2_OBJS) $(MACHINE3_OBJS) $(MACHINE4_OBJS) $(MACHINE5_OBJS) \
$(FONT_OBJS) $(EFFECT_OBJS) \
$(INIT_OBJS) $(DEFF_OBJS) $(LEFF_OBJS) $(SCHED_OBJ)
+C_OBJS_SUFFIXES := $(sort $(suffix $(C_OBJS)))
+ifneq ($(C_OBJS_SUFFIXES), .o)
+$(error $(filter-out %.o,$(C_OBJS)) : non-.o files listed as objects)
+endif
ifeq ($(PLATFORM),wpc)
OBJS = $(C_OBJS) $(AS_OBJS) $(FON_OBJS)
@@ -456,7 +471,9 @@ endif
MACH_LINKS = .mach .include_mach
-MAKE_DEPS = Makefile kernel/Makefile common/Makefile $(MMAKEFILE) $(BLDDIR)/mach-Makefile $(DOTCONFIG)
+ifndef QUICK_MAKE
+MAKE_DEPS = Makefile kernel/Makefile common/Makefile $(MMAKEFILE) $(BLDDIR)/mach-Makefile $(CONFIG)
+endif
ifeq ($(CONFIG_FONT),y)
MAKE_DEPS += fonts/Makefile
endif
@@ -480,38 +497,6 @@ clean_err:
.PHONY : check_prereqs
check_prereqs : $(BLDDIR) tools sched
-.PHONY : run
-run:
- # Start pinmame up and let it run indefinitely.
- $(PINMAME) $(PINMAME_MACHINE) $(PINMAME_FLAGS) &
-
-.PHONY : debug
-debug:
- # Start pinmame up and let it run indefinitely.
- $(PINMAME) $(PINMAME_MACHINE) -d $(PINMAME_FLAGS) &
-
-.PHONY : rund
-rund: run $(DBCON)
- xterm -e "$(DBCON) -1" &
-
-.PHONY : rund-file
-rund-file: run $(DBCON)
- xterm -e "$(DBCON) -1 > $(DBCON_FILE) 2>&1" &
-
-.PHONY : endrun
-endrun :
- kill $(shell pidof $(PINMAME))
-
-.PHONY : timedrun
-timedrun:
- $(MAKE) rund-file DBCON_FILE="test.log"
- sleep 30
- $(MAKE) endrun
-
-.PHONY : runcon
-runcon: $(BLDDIR)/$(GAME_ROM)
- wpc-run $(BLDDIR)/$(GAME_ROM)
-
.PHONY : install
install : $(TARGET_ROMPATH)/$(PINMAME_MACHINE).zip
@@ -616,12 +601,9 @@ $(BLDDIR)/$(MAP_FILE) : build/freewpc.s19
ifeq ($(CPU),m6809)
$(BINFILES:.bin=.s19) : %.s19 : %.lnk $(OBJS) $(AS_OBJS) $(PAGE_HEADER_OBJS)
$(Q)echo "Linking $@..." && $(CC) -Wl,-T -Wl,$< >> $(ERR) 2>&1
-endif
-
-ifeq ($(CPU),native)
-native : $(NATIVE_PROG)
+else
$(NATIVE_PROG) : $(IMAGE_ROM) $(OBJS) $(NATIVE_OBJS)
- $(Q)echo "Linking $@ ..." && $(HOSTCC) $(HOST_LFLAGS) `pth-config --ldflags` -o $(NATIVE_PROG) $(OBJS) $(NATIVE_OBJS) $(HOST_LIBS) >> $(ERR) 2>&1
+ $(Q)echo "Linking $@ ..." && $(LD) $(HOST_LFLAGS) `pth-config --ldflags` -o $(NATIVE_PROG) $(OBJS) $(NATIVE_OBJS) $(HOST_LIBS) >> $(ERR) 2>&1
endif
#
@@ -702,7 +684,7 @@ $(LINKCMD) : $(MAKE_DEPS) $(PMAKEFILE)
echo "-b .text = $(AREA_sysrom)" >> $(LINKCMD) ;\
echo "$(BLDDIR)/freewpc.o" >> $(LINKCMD) ;\
for f in `echo $(SYSTEM_OBJS)`; do echo $$f >> $(LINKCMD); done ;\
- echo "-v" >> $(LINKCMD) ;\
+ echo "-o" >> $(LINKCMD) ;\
for f in `echo $(PAGED_OBJS)`; do echo $$f >> $(LINKCMD); done ;\
echo "-o" >> $(LINKCMD) ;\
echo "-e" >> $(LINKCMD)
@@ -771,7 +753,7 @@ $(filter-out $(HOST_OBJS),$(NATIVE_OBJS)) $(C_OBJS) $(FON_OBJS):
ifeq ($(CPU),m6809)
$(Q)echo "Compiling $< (in page $(PAGE)) ..." && $(CC) -x c -o $@ $(CFLAGS) -c $(PAGEFLAGS) -DPAGE=$(PAGE) -mfar-code-page=$(PAGE) $(SOFTREG_CFLAGS) $< >> $(ERR) 2>&1
else
- $(Q)echo "Compiling $< ..." && $(HOSTCC) -x c -o $@ $(CFLAGS) -c $(PAGEFLAGS) $< >> $(ERR) 2>&1
+ $(Q)echo "Compiling $< ..." && $(CC) -x c -o $@ $(CFLAGS) -c $(PAGEFLAGS) $< >> $(ERR) 2>&1
endif
ifeq ($(CONFIG_PROFILING),y)
$(Q)mkdir -p gprof.data
@@ -781,7 +763,7 @@ endif
#######################################################################
### Machine Description Compiler
#######################################################################
-CONFIG_CMDS = strings switchmasks containers switches scores lamplists deffs drives
+CONFIG_CMDS = strings switchmasks containers switches scores lamplists deffs drives vars
ifeq ($(CONFIG_FONT),y)
CONFIG_CMDS += fonts
endif
@@ -866,10 +848,21 @@ fonts clean-fonts:
#######################################################################
.PHONY : sched
+ifdef CONFIG_GEN_RTT
+sched : $(BLDDIR)/rtt.c
+
+$(BLDDIR)/rtt.c : $(MACH_LINKS) tools/genrtt $(filter-out $(OBJS:.o=.c),$(BLDDIR)/rtt.c)
+ $(Q)echo "Generating RTTs ... " && rm -f $@ \
+ && tools/genrtt $(SCHED_FLAGS) \
+ $(foreach section,$(CALLSET_SECTIONS),$($(section)_OBJS:.o=.c:$(section)_PAGE)) \
+ $(NATIVE_OBJS:.o=.c)
+
+else
sched: $(SCHED_SRC) tools/sched/sched.make
$(SCHED_SRC): $(SYSTEM_SCHEDULE) $(MACHINE_SCHEDULE) $(SCHED) $(SCHED_HEADERS) $(MAKE_DEPS)
shopt -s nullglob && $(SCHED) -o $@ $(SCHED_FLAGS) $(SYSTEM_SCHEDULE) $(MACHINE_SCHEDULE) $(MACHINE_SCHED_FLAGS)
+endif
#######################################################################
### Tracing
@@ -910,9 +903,9 @@ $(sort $(HOST_OBJS)) : %.o : %.c
# Provide a target for .config that will run 'configure' or abort if it
# does not exist.
-ifneq ($(DOTCONFIG),)
-$(DOTCONFIG):
- echo "No $(DOTCONFIG)" && exit 1
+ifneq ($(CONFIG),)
+$(CONFIG):
+ echo "No config specified. $(CONFIG) does not exist." && exit 1
endif
#
@@ -990,6 +983,9 @@ areainfo:
@true $(foreach area,$(AREA_LIST),&& echo $(area) $(AREASIZE_$(area)))
@true $(foreach page,$(PAGED_SECTIONS),&& echo $(page) 0x4000 $($(page)_SECTIONS))
+.PHONY : have
+have:
+ @true $(foreach item,$(HAVE_LIST),&& echo "$(item)")
#
# 'make clean' does what you think.
diff --git a/cardona b/cardona
new file mode 100644
index 000000000..8d1c8b69c
--- /dev/null
+++ b/cardona
@@ -0,0 +1 @@
+
diff --git a/common/Makefile b/common/Makefile
index 28f793555..5b02f6153 100644
--- a/common/Makefile
+++ b/common/Makefile
@@ -10,17 +10,17 @@ COMMON_BASIC_OBJS += common/amode.o
COMMON_BASIC_OBJS += $(if $(CONFIG_PLAYABLE), common/ballsave.o)
COMMON_BASIC_OBJS += common/coin.o
COMMON_BASIC_OBJS += common/db.o
-COMMON_BASIC_OBJS += $(if $(CONFIG_EBFLEX), common/ebflex.o)
COMMON2_OBJS += common/event-audit.o
-COMMON_BASIC_OBJS += $(if $(CONFIG_PIC),,common/flipcode.o)
+COMMON2_OBJS += $(if $(CONFIG_FLEX), common/flex.o)
+COMMON_BASIC_OBJS += common/flipcode.o
COMMON_BASIC_OBJS += common/initials.o
-COMMON_BASIC_OBJS += $(if $(MACHINE_TZ),,common/pin.o)
+COMMON_BASIC_OBJS += $(if $(CONFIG_ENTER_PIN),common/pin.o)
COMMON_BASIC_OBJS += common/locale.o
COMMON_BASIC_OBJS += $(if $(CONFIG_PLAYABLE), common/match.o)
COMMON_BASIC_OBJS += common/optocheck.o
COMMON_BASIC_OBJS += $(if $(CONFIG_MUTE_PAUSE), common/pause.o)
COMMON_BASIC_OBJS += common/plunger.o
-COMMON_BASIC_OBJS += common/printer.o
+COMMON_BASIC_OBJS += $(if $(CONFIG_TEST), common/printer.o)
COMMON_BASIC_OBJS += common/reset.o
COMMON_BASIC_OBJS += $(if $(CONFIG_RTC), common/rtc.o)
COMMON2_OBJS += $(if $(CONFIG_SCORE_RANK), common/score_rank.o)
@@ -30,7 +30,7 @@ COMMON_BASIC_OBJS += $(if $(CONFIG_PLATFORM_WPC), common/service.o)
COMMON_BASIC_OBJS += common/start_button.o
COMMON_BASIC_OBJS += $(if $(CONFIG_TICKET), common/ticket.o)
COMMON_BASIC_OBJS += common/tilt.o
-COMMON_BASIC_OBJS += $(if $(CONFIG_WHITESTAR),,common/tournament.o)
+COMMON_BASIC_OBJS += common/tournament.o
COMMON_BASIC_OBJS += common/trough.o
# The 'init' objects are only used during startup.
@@ -42,13 +42,18 @@ COMMON_SW_OBJS += $(if $(CONFIG_PLAYABLE), common/auto_replay.o)
COMMON_SW_OBJS += $(if $(CONFIG_BUYIN), common/buyin.o)
COMMON_SW_OBJS += $(if $(CONFIG_PLAYABLE), common/device.o)
COMMON_SW_OBJS += common/diag.o
-COMMON_SW_OBJS += $(if $(CONFIG_PLATFORM_WPC), common/highscore.o)
+COMMON_SW_OBJS += common/highscore.o
COMMON_SW_OBJS += common/knocker.o
COMMON_SW_OBJS += $(if $(CONFIG_PLAYABLE), common/replay.o)
COMMON_SW_OBJS += common/search.o
-COMMON_SW_OBJS += $(if $(CONFIG_PLATFORM_WPC), common/status.o)
+COMMON_SW_OBJS += common/status.o
COMMON_SW_OBJS += $(if $(CONFIG_PLAYABLE), common/special.o)
+# this added from dm
+COMMON_SW_OBJS += machine/dm/jets.o
+
+
+
COMMON_OBJS = $(COMMON_BASIC_OBJS) $(COMMON_SW_OBJS)
# Transition objects are separated out: in time these should be broken up
@@ -62,11 +67,11 @@ TRANS_OBJS += $(if $(CONFIG_DMD), common/dmd_overlay.o)
# separated out for the same reason. These may be placed into a
# different ROM page.
EFFECT_OBJS += common/eb.o
-EFFECT_OBJS += common/effect.o
+EFFECT_OBJS += $(if $(CONFIG_DMD_OR_ALPHA), common/effect.o)
EFFECT_OBJS += common/effect_update.o
EFFECT_OBJS += common/flash.o
EFFECT_OBJS += common/lamptimer.o
-EFFECT_OBJS += common/score_deff.o
+EFFECT_OBJS += $(if $(CONFIG_DMD_OR_ALPHA), common/score_deff.o)
EFFECT_OBJS += $(if $(CONFIG_DMD), common/score_deff_dmd.o)
EFFECT_OBJS += $(if $(CONFIG_ALPHA), common/score_deff_seg.o)
EFFECT_OBJS += common/shootalert.o
diff --git a/common/abort.c b/common/abort.c
index 94e761843..f55ea002d 100644
--- a/common/abort.c
+++ b/common/abort.c
@@ -43,13 +43,8 @@ void abort_monitor_task (void)
}
-CALLSET_ENTRY (abort, sw_left_button)
+CALLSET_ENTRY (abort, sw_left_button, sw_right_button)
{
task_recreate_gid (GID_FLIPPER_ABORT_MONITOR, abort_monitor_task);
}
-CALLSET_ENTRY (abort, sw_right_button)
-{
- abort_sw_left_button ();
-}
-
diff --git a/common/amode.c b/common/amode.c
index 4609c6580..530e3d89a 100644
--- a/common/amode.c
+++ b/common/amode.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2006, 2007, 2008, 2009, 2010 by Brian Dominy
+ * Copyright 2006-2011 by Brian Dominy
*
* This file is part of FreeWPC.
*
@@ -62,6 +62,7 @@ void amode_flipper_sound (void)
}
}
+#ifdef CONFIG_DMD_OR_ALPHA
void amode_sleep_sec (U8 secs)
{
@@ -107,7 +108,7 @@ void amode_score_page (void)
if (system_config.tournament_mode == YES)
amode_page_end (120);
else
- amode_page_end (5);
+ amode_page_end (3);
}
@@ -124,7 +125,7 @@ void amode_logo_page (void)
task_sleep (TIME_66MS);
}
dmd_sched_transition (&trans_bitfade_slow);
- amode_page_end (3);
+ amode_page_end (1);
}
#endif
@@ -132,7 +133,7 @@ void amode_credits_page (void)
{
credits_draw ();
dmd_show_low ();
- amode_page_end (3);
+ amode_page_end (1);
}
void amode_freeplay_page (void)
@@ -150,11 +151,11 @@ void amode_high_score_page (void)
if (hstd_config.highest_scores == ON)
{
high_score_draw_gc ();
- amode_sleep_sec (3);
+ amode_sleep_sec (2);
high_score_draw_12 ();
- amode_sleep_sec (3);
+ amode_sleep_sec (2);
high_score_draw_34 ();
- amode_sleep_sec (3);
+ amode_sleep_sec (2);
}
amode_page_end (0);
}
@@ -165,7 +166,7 @@ void amode_date_time_page (void)
if (system_config.show_date_and_time == YES)
{
rtc_show_date_time (¤t_date);
- amode_page_end (3);
+ amode_page_end (2);
}
}
#endif
@@ -176,9 +177,11 @@ void amode_kill_music (void)
amode_page_end (0);
}
+#endif
void (*amode_page_table[]) (void) = {
+#ifdef CONFIG_DMD_OR_ALPHA
amode_score_page,
#if (MACHINE_DMD == 1)
amode_logo_page,
@@ -193,6 +196,7 @@ void (*amode_page_table[]) (void) = {
#ifdef MACHINE_AMODE_EFFECTS
MACHINE_AMODE_EFFECTS
#endif
+#endif /* CONFIG_DMD_OR_ALPHA */
};
@@ -226,7 +230,6 @@ __attribute__((noinline)) void amode_page_change (S8 delta)
amode_page_changed = 1;
}
-
CALLSET_ENTRY (amode, sw_left_button)
{
if (deff_get_active () == DEFF_AMODE)
diff --git a/common/ballsave.c b/common/ballsave.c
index 64928eabb..fc707f74f 100644
--- a/common/ballsave.c
+++ b/common/ballsave.c
@@ -61,14 +61,19 @@ void ball_save_leff (void)
/**
- * Start/extend the ballsaver.
+ * Start / extend a ballsaver
+ * but limit the total time that we can have ballsave to something reasonable
*/
-void ballsave_add_time (U8 secs)
-{
- if (in_tilt)
- return;
- timed_mode_add (&ball_save_mode, secs);
-}
+void ballsave_add_time (U8 secs) {
+ if (in_tilt) return;
+ if (timed_mode_running_p (&ball_save_mode) ) {
+ if (timed_mode_get_timer(&ball_save_mode) < 15 ) timed_mode_reset (&ball_save_mode, 15);
+ }
+ else { //its not already running so start it fresh
+ timed_mode_begin (&ball_save_mode); //starts mode with default time
+ timed_mode_reset (&ball_save_mode, secs); //reset time to the time we want
+ }
+}//end of function
/**
diff --git a/common/buyin.c b/common/buyin.c
index 35e4bf698..6950e8a89 100644
--- a/common/buyin.c
+++ b/common/buyin.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2006-2009 by Brian Dominy
+ * Copyright 2006-2011 by Brian Dominy
*
* This file is part of FreeWPC.
*
@@ -38,48 +38,6 @@ bool buyin_passed;
/** The number of buyins each player has had */
__local__ U8 buyin_count;
-/** Display effect that runs during the extra ball buyin */
-void buyin_offer_deff (void)
-{
- U8 prev_timer;
-
-#if (MACHINE_DMD == 1)
- dmd_sched_transition (&trans_bitfade_slow);
-#else
- seg_sched_transition (&seg_trans_fast_center_out);
-#endif
- while (buyin_offer_timer > 0)
- {
- prev_timer = buyin_offer_timer;
- dmd_alloc_low_clean ();
- dmd_draw_border (dmd_low_buffer);
- font_render_string_center (&font_term6, 64, 5, "CONTINUE GAME");
-#if (MACHINE_DMD == 1)
- sprintf ("%d", buyin_offer_timer);
- font_render_string_left (&font_mono5, 4, 3, sprintf_buffer);
- font_render_string_right (&font_mono5, 123, 3, sprintf_buffer);
- if (buyin_offer_timer % 2)
- {
- font_render_string_center (&font_bitmap8, 64, 16, "INSERT COINS");
- font_render_string_center (&font_bitmap8, 64, 26, "FOR EXTRA BALL");
- }
- else
- {
- font_render_string_center (&font_bitmap8, 64, 16, "THEN PRESS");
- font_render_string_center (&font_bitmap8, 64, 26, "BUY EXTRA BALL");
- }
-#else
- sprintf ("%d SECS", buyin_offer_timer);
- seg_write_row_center (1, sprintf_buffer);
-#endif
- dmd_show_low ();
- while (prev_timer == buyin_offer_timer)
- task_sleep (TIME_133MS);
- }
- task_sleep (TIME_1500MS);
- deff_exit ();
-}
-
/* Start/restart the buyin feature */
static void buyin_init (void)
{
diff --git a/common/coin.c b/common/coin.c
index a1b468145..3a5b5f8b4 100644
--- a/common/coin.c
+++ b/common/coin.c
@@ -55,115 +55,6 @@ const struct area_csum coin_csum_info = {
extern __common__ void buyin_coin_insert (void);
-/** Reduce a credit fraction to simplest terms. */
-static inline void reduce_unit_fraction (U8 *units, U8 *units_per_credit)
-{
- switch (*units_per_credit)
- {
- case 4:
- if (*units == 2)
- {
- *units = 1;
- *units_per_credit = 2;
- }
- break;
-
- case 6:
- switch (*units)
- {
- case 2:
- *units = 1;
- *units_per_credit = 3;
- break;
- case 4:
- *units = 2;
- *units_per_credit = 3;
- break;
- }
- break;
- }
-}
-
-
-/** Render the number of credits */
-void credits_render (void)
-{
-#ifdef FREE_ONLY
- sprintf ("FREE ONLY");
-#else
- if (price_config.free_play)
- sprintf ("FREE PLAY");
- else
- {
- if (coin_state.units != 0)
- {
- U8 units = coin_state.units;
- U8 units_per_credit = price_config.units_per_credit;
-
- /* There are fractional credits. Reduce to the
- * lowest common denominator before printing. */
-
- reduce_unit_fraction (&units, &units_per_credit);
-
- if (coin_state.credits == 0)
- sprintf ("%d/%d CREDIT", units, units_per_credit);
- else
- sprintf ("%d %d/%d CREDITS",
- coin_state.credits, units, units_per_credit);
- }
- else
- {
- if (coin_state.credits == 1)
- sprintf ("%d CREDIT", coin_state.credits);
- else
- sprintf ("%d CREDITS", coin_state.credits);
- }
- }
-#endif
- if (diag_get_error_count ())
- {
- sprintf ("%E.");
- }
-}
-
-
-/** Draw the current credits full screen */
-void credits_draw (void)
-{
- dmd_alloc_pair ();
- dmd_clean_page_low ();
-
- credits_render ();
- font_render_string_center (&font_fixed6, 64, 9, sprintf_buffer);
- dmd_copy_low_to_high ();
-
- if (!has_credits_p ())
- {
- if (price_config.payment_method == PAY_COIN)
- sprintf ("INSERT COINS");
- else if (price_config.payment_method == PAY_TOKEN)
- sprintf ("INSERT TOKENS");
- else if (price_config.payment_method == PAY_CARD)
- sprintf ("SWIPE CARD");
- else if (price_config.payment_method == PAY_BILL)
- sprintf ("INSERT BILLS");
- }
- else
- {
- sprintf ("PRESS START");
- }
- font_render_string_center (&font_fixed6, 64, 22, sprintf_buffer);
-}
-
-
-/** The display effect function for showing the number of credits. */
-void credits_deff (void)
-{
- credits_draw ();
- deff_swap_low_high (in_live_game ? 12 : 20, 2 * TIME_100MS);
- deff_delay_and_exit (TIME_1S);
-}
-
/** Update the start button lamp. It will flash when a new game
* can be started, or be solid on during a game. It will be
@@ -171,7 +62,7 @@ void credits_deff (void)
void lamp_start_update (void)
{
#ifdef MACHINE_START_LAMP
- if (has_credits_p ())
+ if (!in_test && has_credits_p ())
{
if (!in_game)
lamp_tristate_flash (MACHINE_START_LAMP);
@@ -306,7 +197,9 @@ static void do_coin (U8 slot)
add_units (price_config.coin_units[slot]);
audit_increment (&system_audits.coins_added[slot]);
+#ifdef CONFIG_BUYIN
buyin_coin_insert ();
+#endif
}
/* TODO - use more robust drivers for the coin switches to
diff --git a/common/db.c b/common/db.c
index 879a80e89..97d7d8c55 100644
--- a/common/db.c
+++ b/common/db.c
@@ -60,9 +60,11 @@ void db_dump_all (void)
VOIDCALL (dump_game);
VOIDCALL (dump_deffs);
switch_queue_dump ();
- VOIDCALL (sol_req_dump);
+#ifdef CONFIG_TRIAC
VOIDCALL (triac_dump);
+#endif
SECTION_VOIDCALL (__common__, device_debug_all);
+ VOIDCALL (leff_dump);
}
#endif
@@ -111,6 +113,7 @@ U8 button_check (U8 sw)
void bpt_display (void)
{
+#if (MACHINE_DMD == 1)
dmd_alloc_low_clean ();
sprintf ("%p", bpt_mem_addr);
@@ -142,6 +145,7 @@ void bpt_display (void)
sprintf ("C%04lX", prev_log_callset);
font_render_string_left (&font_bitmap8, 0, 24, sprintf_buffer);
dmd_show_low ();
+#endif
}
@@ -199,8 +203,10 @@ void bpt_hit (void)
task_runs_long ();
}
}
+#ifdef CONFIG_DMD_OR_ALPHA
dmd_alloc_low_clean ();
dmd_show_low ();
+#endif
}
#endif /* CONFIG_BPT */
@@ -208,24 +214,24 @@ void bpt_hit (void)
/** Check for debug input periodically */
void db_periodic (void)
{
- extern void MACHINE_DEBUGGER_HOOK (U8);
-
#ifdef CONFIG_BPT
if (!in_test && button_check (SW_ESCAPE))
bpt_stop ();
#endif
-#ifdef DEBUGGER
+#ifdef CONFIG_DEBUG_INPUT
if (pinio_debug_read_ready ())
{
char c = pinio_debug_read ();
puts_handler = puts_debug;
switch (c)
{
+#ifdef DEBUGGER
case 'a':
/* Dump all debugging information */
db_dump_all ();
break;
+#endif
#ifdef CONFIG_BPT
case 'p':
@@ -235,11 +241,6 @@ void db_periodic (void)
#endif
default:
-#ifdef MACHINE_DEBUGGER_HOOK
- /* Allow the machine to define additional commands.
- * This function must reside in the system page. */
- MACHINE_DEBUGGER_HOOK (c);
-#endif
break;
}
}
@@ -256,7 +257,7 @@ void db_init (void)
bpt_debounce_timer = 0x1C00;
#endif
-#ifdef DEBUGGER
+#ifdef CONFIG_DEBUG_INPUT
/* Signal the debugger that the system has just reset. */
if (pinio_debug_read_ready ())
{
@@ -267,7 +268,14 @@ void db_init (void)
{
puts_handler = puts_parallel;
}
+#elif defined(CONFIG_SIM)
+ puts_handler = puts_sim;
+#else
+ extern void puts_default (const char *);
+ puts_handler = puts_default;
+#endif
+#ifdef DEBUGGER
/* Announce myself to the world. */
dbprintf ("FreeWPC\n");
dbprintf ("System Version %s.%s\n",
diff --git a/common/device.c b/common/device.c
index 26e19d72a..f1c400683 100644
--- a/common/device.c
+++ b/common/device.c
@@ -151,7 +151,7 @@ void device_register (devicenum_t devno, device_properties_t *props)
return;
dev->devno = devno;
- dev->devno_mask = (1 << devno);
+ dev->devno_mask = single_bit_set (devno);
dev->props = props;
dev->size = props->sw_count;
dev->max_count = props->init_max_count;
@@ -240,6 +240,9 @@ void device_update (void)
*/
task_sleep (dev->props->settle_delay);
+start_update:
+ task_sleep (TIME_50MS);
+
/* The device is probably stable now. Poll all of the
* switches and recount */
device_recount (dev);
@@ -282,7 +285,10 @@ void device_update (void)
* Treat this as an enter event (or multiple events, if the
* count goes up by more than 1). */
U8 enter_count = dev->actual_count - dev->previous_count;
- set_valid_playfield ();
+
+ //do not trigger valid playfield on trough entry, but on everything else
+ if (!trough_dev_p (dev)) set_valid_playfield ();
+
while (enter_count > 0)
{
callset_invoke (any_device_enter);
@@ -397,14 +403,14 @@ void device_update (void)
{
/* Container ready to kick, but 1 or more
* locks are held so we must wait. */
- goto wait_and_recount;
+ goto start_update;
}
else if (!device_call_boolean_op (dev, kick_request))
{
/* Inform other modules that a kick was requested.
These handlers can return FALSE to delay (but not
cancel) the kick. */
- goto wait_and_recount;
+ goto start_update;
}
/* TODO - if multiple devices want to kick at the same time,
* they should be staggered a bit. Another case should be
@@ -445,7 +451,7 @@ void device_update (void)
be a race condition where a switch closure gets missed. */
device_recount (dev);
if (dev->actual_count != dev->previous_count)
- goto wait_and_recount;
+ goto start_update;
task_exit ();
}
diff --git a/common/diag.c b/common/diag.c
index 470ead01f..66c9f48f7 100644
--- a/common/diag.c
+++ b/common/diag.c
@@ -35,7 +35,7 @@ U8 diag_error_count;
* as they are found */
U8 diag_announce_flag;
-
+#ifdef CONFIG_DMD_OR_ALPHA
static void
diag_message_start (void)
{
@@ -70,6 +70,7 @@ diag_message_scroll (void)
task_sleep_sec (5);
barrier ();
}
+#endif
/**
@@ -93,6 +94,7 @@ diag_post_error (char *message, U8 page)
/* Increment total error count */
diag_error_count++;
+#ifdef CONFIG_DMD_OR_ALPHA
/* If announcements are on, then write a message.
If it is the first such error detected, then print the
initial "TEST REPORT" message too. */
@@ -108,6 +110,7 @@ diag_post_error (char *message, U8 page)
message_write (message, page);
diag_message_scroll ();
}
+#endif
}
@@ -137,10 +140,12 @@ diag_announce_if_errors (void)
{
if (diag_error_count > 0)
{
+#ifdef CONFIG_DMD_OR_ALPHA
diag_message_start ();
font_render_string_center (&font_mono5, 64, 10, "PRESS ENTER");
font_render_string_center (&font_mono5, 64, 21, "FOR TEST REPORT");
diag_message_flash ();
+#endif
}
}
diff --git a/common/dmd_rough.c b/common/dmd_rough.c
index f2aebf491..7e329bf90 100644
--- a/common/dmd_rough.c
+++ b/common/dmd_rough.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2008-2010 by Brian Dominy
+ * Copyright 2008-2011 by Brian Dominy
*
* This file is part of FreeWPC.
*
@@ -46,14 +46,14 @@ __attribute__((noinline)) void dmd_rough_copy1 (void)
do {
dst = dmd_rough_args.dst;
src = dst - DMD_PAGE_SIZE;
- U8 bytes = dmd_rough_args.bwidth;
+ U8 bytes = dmd_rough_args.size.x;
do {
*dst++ = *src++;
bytes--;
} while (bytes > 0);
dmd_rough_args.dst += DMD_BYTE_WIDTH;
- dmd_rough_args.height--;
- } while (dmd_rough_args.height > 0);
+ dmd_rough_args.size.y--;
+ } while (dmd_rough_args.size.y > 0);
}
@@ -69,14 +69,14 @@ __attribute__((noinline)) void dmd_rough_erase1 (void)
do {
dst = dmd_rough_args.dst;
- U8 bytes = dmd_rough_args.bwidth;
+ U8 bytes = dmd_rough_args.size.x;
do {
*dst++ = 0;
bytes--;
} while (bytes > 0);
dmd_rough_args.dst += DMD_BYTE_WIDTH;
- dmd_rough_args.height--;
- } while (dmd_rough_args.height > 0);
+ dmd_rough_args.size.y--;
+ } while (dmd_rough_args.size.y > 0);
}
@@ -92,14 +92,14 @@ __attribute__((noinline)) void dmd_rough_invert1 (void)
do {
dst = dmd_rough_args.dst;
- U8 bytes = dmd_rough_args.bwidth;
+ U8 bytes = dmd_rough_args.size.x;
do {
*dst++ ^= 0xFF;
bytes--;
} while (bytes > 0);
dmd_rough_args.dst += DMD_BYTE_WIDTH;
- dmd_rough_args.height--;
- } while (dmd_rough_args.height > 0);
+ dmd_rough_args.size.y--;
+ } while (dmd_rough_args.size.y > 0);
}
diff --git a/common/dmd_shadow.c b/common/dmd_shadow.c
index 3e1dcdfcb..56600a75c 100644
--- a/common/dmd_shadow.c
+++ b/common/dmd_shadow.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2008-2010 by Brian Dominy
+ * Copyright 2008-2011 by Brian Dominy
*
* This file is part of FreeWPC.
*
diff --git a/common/dmdtrans.c b/common/dmdtrans.c
index e6d58bea0..30ac88fdf 100644
--- a/common/dmdtrans.c
+++ b/common/dmdtrans.c
@@ -223,6 +223,15 @@ dmd_transition_t trans_scroll_left = {
};
+dmd_transition_t trans_scroll_left_fast = {
+ .composite_init = trans_scroll_left_init,
+ .composite_old = trans_scroll_left_old,
+ .composite_new = trans_scroll_left_new,
+ .delay = 0,
+ .arg = { .u16 = 0 },
+ .count = 16,
+};
+
/*********************************************************************/
void trans_scroll_right_init (void)
@@ -265,6 +274,16 @@ dmd_transition_t trans_scroll_right = {
.count = 16,
};
+
+dmd_transition_t trans_scroll_right_fast = {
+ .composite_init = trans_scroll_right_init,
+ .composite_old = trans_scroll_right_old,
+ .composite_new = trans_scroll_right_new,
+ .delay = 0,
+ .arg = { .u16 = 0 },
+ .count = 16,
+};
+
/*********************************************************************/
static U16 sequential_boxfade_offset_table[] = {
@@ -508,6 +527,16 @@ dmd_transition_t trans_bitfade_fast = {
.count = 8,
};
+
+dmd_transition_t trans_bitfade_fastest = {
+ .composite_init = trans_bitfade_init,
+ .composite_old = trans_bitfade_old,
+ .composite_new = trans_bitfade_new,
+ .delay = 0,
+ .arg = { .u16 = 0 },
+ .count = 8,
+};
+
/*********************************************************************/
const U8 rows_from_center[] = {
diff --git a/common/effect.c b/common/effect.c
index f3b36060c..bc91a7e39 100644
--- a/common/effect.c
+++ b/common/effect.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2007-2010 by Brian Dominy
+ * Copyright 2007-2012 by Brian Dominy
*
* This file is part of FreeWPC.
*
@@ -21,14 +21,45 @@
#include
#include
#include
+#include
+#include
+#include "dm/global_constants.h"
extern U8 last_nonfatal_error_code;
extern task_gid_t last_nonfatal_error_gid;
extern __nvram__ U8 current_volume;
-void ball_save_deff (void)
-{
+
+
+const U8 ball_save_TotalNumOfSounds = 6; //num between 0 and N-1 == N total
+const sound_code_t ball_save_SoundsArray[] = { SPCH_AINT_OVER_YET, SPCH_DONT_MOVE_PHOENIX, SPCH_DONT_MOVE,
+ SPCH_SECOND_CHANCE, SPCH_HEADS_UP, SPCH_NEXT_SHOT };
+
+
+void ball_save_deff (void) {
+#ifdef DEMO_MAN_BALL_SAVE_EFFECT
+ U16 fno;
+ U8 ball_save_SoundCounter;
+ ball_save_SoundCounter = random_scaled(ball_save_TotalNumOfSounds);//from kernal/random.c
+
+ dmd_alloc_pair_clean ();// Clean both pages
+ sound_start (ST_SPEECH, ball_save_SoundsArray[ball_save_SoundCounter], SL_4S, PRI_GAME_QUICK5);
+
+ for (fno = IMG_GUN_START; fno <= IMG_GUN_END; fno += 2) {
+ dmd_map_overlay ();
+ dmd_clean_page_low ();
+ font_render_string_center (&font_fireball, DMD_MIDDLE_X + 30, DMD_BIG_CY_Top, "BALL");
+ font_render_string_center (&font_fireball, DMD_MIDDLE_X + 30, DMD_BIG_CY_Bot, "SAVE");
+ dmd_text_outline ();
+ dmd_alloc_pair ();
+ frame_draw(fno);
+ dmd_overlay_outline ();
+ dmd_show2 ();
+ task_sleep (TIME_100MS);
+ }//end of for loop
+ task_sleep (TIME_2S);
+#else
dmd_alloc_pair ();
dmd_clean_page_low ();
sprintf ("PLAYER %d", player_up);
@@ -37,6 +68,7 @@ void ball_save_deff (void)
font_render_string_center (&font_fixed6, 64, 22, "BALL SAVED");
dmd_show_low ();
deff_swap_low_high (24, TIME_100MS);
+#endif
deff_exit ();
}
@@ -212,8 +244,41 @@ void score_goal_deff (void)
}
-void plunge_ball_deff (void)
-{
+
+
+
+
+const U8 shoot_reminder_TotalNumOfSounds = 10; //num between 0 and N-1 == N total
+const sound_code_t shoot_reminder_SoundsArray[] = { SPCH_COME_GET_ME, SPCH_LETS_GO2, SPCH_MOVE_IT_SLY,
+ SPCH_DRIVE, SPCH_GO_SLY,
+ SPCH_DO_SOMETHING, SPCH_MOVE, SPCH_MOVE_IT,
+ SPCH_GO_WES, SPCH_NOW };
+
+
+void plunge_ball_deff (void) {
+#ifdef DEMO_MAN_BALL_SAVE_EFFECT
+ U16 fno;
+ U8 shoot_reminder_SoundCounter;
+ shoot_reminder_SoundCounter = random_scaled(shoot_reminder_TotalNumOfSounds);//from kernal/random.c
+
+ dmd_alloc_pair_clean ();// Clean both pages
+ sound_start (ST_SPEECH, shoot_reminder_SoundsArray[shoot_reminder_SoundCounter], SL_4S, PRI_GAME_QUICK5);
+
+ for (fno = IMG_PHOENIX_A2_START; fno <= IMG_PHOENIX_A2_END; fno += 2) {
+ dmd_map_overlay ();
+ dmd_clean_page_low ();
+ font_render_string_center (&font_fireball, DMD_MIDDLE_X - 25, DMD_BIG_CY_Top, "PLUNGE");
+ font_render_string_center (&font_fireball, DMD_MIDDLE_X - 25, DMD_BIG_CY_Bot, "BALL");
+ dmd_text_outline ();
+ dmd_alloc_pair ();
+ frame_draw(fno);
+ dmd_overlay_outline ();
+ dmd_show2 ();
+ task_sleep (TIME_100MS);
+ }//end of for loop
+ task_sleep (TIME_500MS);
+
+#else
dmd_alloc_pair ();
dmd_clean_page_low ();
@@ -227,6 +292,263 @@ void plunge_ball_deff (void)
font_render_string_center (&font_fixed6, 64, 22, "PLUNGE THE BALL");
#endif
deff_swap_low_high (13, TIME_300MS);
+#endif
deff_exit ();
}
+
+
+void coin_door_buttons_deff (void)
+{
+ dmd_alloc_low_clean ();
+#if (MACHINE_DMD == 1)
+ font_render_string_center (&font_var5, 64, 3, "COIN DOOR IS CLOSED");
+#endif
+ font_render_string_center (&font_var5, 64, 10, "OPEN COIN DOOR");
+ font_render_string_center (&font_var5, 64, 17, "TO USE BUTTONS");
+ dmd_show_low ();
+ task_sleep_sec (3);
+ deff_exit ();
+}
+
+
+void coin_door_power_deff (void)
+{
+ U8 n;
+ for (n=0; n < 5; n++)
+ {
+ dmd_alloc_low_clean ();
+ dmd_show_low ();
+ task_sleep (TIME_200MS);
+
+ dmd_alloc_low_clean ();
+#if (MACHINE_DMD == 1)
+ font_render_string_center (&font_fixed6, 64, 6, "COIN DOOR IS OPEN");
+ font_render_string_center (&font_fixed6, 64, 16, "HIGH POWER");
+ font_render_string_center (&font_fixed6, 64, 26, "IS DISABLED");
+#else
+ font_render_string_center (&font_fixed6, 64, 10, "HIGH POWER");
+ font_render_string_center (&font_fixed6, 64, 21, "IS DISABLED");
+#endif
+ dmd_show_low ();
+ sound_send (SND_TEST_ALERT);
+ task_sleep (TIME_300MS);
+ }
+ task_sleep_sec (3);
+ deff_exit ();
+}
+
+
+/** The tilt display effect runs until explicitly cancelled. */
+void tilt_deff (void)
+{
+ dmd_alloc_low_clean ();
+ font_render_string_center (&font_fixed10, 64, 13, "TILT");
+ dmd_show_low ();
+ task_suspend ();
+}
+
+
+void tilt_warning_deff (void)
+{
+ extern U8 tilt_warnings;
+ dmd_alloc_pair_clean ();
+ if (tilt_warnings % 2)
+ {
+ font_render_string_center (&font_fixed10, 64, 16, "DANGER");
+ }
+ else
+ {
+ font_render_string_center (&font_fixed10, 64, 7, "DANGER");
+ font_render_string_center (&font_fixed10, 64, 23, "DANGER");
+ }
+ deff_swap_low_high (24, TIME_66MS);
+ deff_exit ();
+}
+
+
+void slam_tilt_deff (void)
+{
+ dmd_alloc_low_clean ();
+ font_render_string_center (&font_fixed10, 64, 13, "SLAM TILT");
+ dmd_show_low ();
+ task_suspend ();
+}
+
+
+/** Reduce a credit fraction to simplest terms. */
+static inline void reduce_unit_fraction (U8 *units, U8 *units_per_credit)
+{
+ switch (*units_per_credit)
+ {
+ case 4:
+ if (*units == 2)
+ {
+ *units = 1;
+ *units_per_credit = 2;
+ }
+ break;
+
+ case 6:
+ switch (*units)
+ {
+ case 2:
+ *units = 1;
+ *units_per_credit = 3;
+ break;
+ case 4:
+ *units = 2;
+ *units_per_credit = 3;
+ break;
+ }
+ break;
+ }
+}
+
+/** Render the number of credits */
+void credits_render (void)
+{
+#ifdef FREE_ONLY
+ sprintf ("FREE ONLY");
+#else
+ if (price_config.free_play)
+ sprintf ("FREE PLAY");
+ else
+ {
+ if (get_units () != 0)
+ {
+ U8 units = get_units ();
+ U8 units_per_credit = price_config.units_per_credit;
+
+ /* There are fractional credits. Reduce to the
+ * lowest common denominator before printing. */
+
+ reduce_unit_fraction (&units, &units_per_credit);
+
+ if (get_credits () == 0)
+ sprintf ("%d/%d CREDIT", units, units_per_credit);
+ else
+ sprintf ("%d %d/%d CREDITS",
+ get_credits (), units, units_per_credit);
+ }
+ else
+ {
+ if (get_credits () == 1)
+ sprintf ("%d CREDIT", get_credits ());
+ else
+ sprintf ("%d CREDITS", get_credits ());
+ }
+ }
+#endif
+ if (diag_get_error_count ())
+ {
+ sprintf ("%E.");
+ }
+}
+
+
+/** Draw the current credits full screen */
+void credits_draw (void)
+{
+ dmd_alloc_pair ();
+ dmd_clean_page_low ();
+
+ credits_render ();
+ font_render_string_center (&font_fixed6, 64, 9, sprintf_buffer);
+ dmd_copy_low_to_high ();
+
+ if (!has_credits_p ())
+ {
+ if (price_config.payment_method == PAY_COIN)
+ sprintf ("INSERT COINS");
+ else if (price_config.payment_method == PAY_TOKEN)
+ sprintf ("INSERT TOKENS");
+ else if (price_config.payment_method == PAY_CARD)
+ sprintf ("SWIPE CARD");
+ else if (price_config.payment_method == PAY_BILL)
+ sprintf ("INSERT BILLS");
+ }
+ else
+ {
+ sprintf ("PRESS START");
+ }
+ font_render_string_center (&font_fixed6, 64, 22, sprintf_buffer);
+}
+
+
+void credits_deff (void)
+{
+ credits_draw ();
+ deff_swap_low_high (in_live_game ? 12 : 20, 2 * TIME_100MS);
+ deff_delay_and_exit (TIME_1S);
+}
+
+
+/** Display effect that runs during the extra ball buyin */
+void buyin_offer_deff (void)
+{
+ U8 prev_timer;
+ extern U8 buyin_offer_timer;
+
+#if (MACHINE_DMD == 1)
+ dmd_sched_transition (&trans_bitfade_slow);
+#else
+ seg_sched_transition (&seg_trans_fast_center_out);
+#endif
+ while (buyin_offer_timer > 0)
+ {
+ prev_timer = buyin_offer_timer;
+ dmd_alloc_low_clean ();
+ dmd_draw_border (dmd_low_buffer);
+ font_render_string_center (&font_term6, 64, 5, "CONTINUE GAME");
+#if (MACHINE_DMD == 1)
+ sprintf ("%d", buyin_offer_timer);
+ font_render_string_left (&font_mono5, 4, 3, sprintf_buffer);
+ font_render_string_right (&font_mono5, 123, 3, sprintf_buffer);
+ if (buyin_offer_timer % 2)
+ {
+ font_render_string_center (&font_bitmap8, 64, 16, "INSERT COINS");
+ font_render_string_center (&font_bitmap8, 64, 26, "FOR EXTRA BALL");
+ }
+ else
+ {
+ font_render_string_center (&font_bitmap8, 64, 16, "THEN PRESS");
+ font_render_string_center (&font_bitmap8, 64, 26, "BUY EXTRA BALL");
+ }
+#else
+ sprintf ("%d SECS", buyin_offer_timer);
+ seg_write_row_center (1, sprintf_buffer);
+#endif
+ dmd_show_low ();
+ while (prev_timer == buyin_offer_timer)
+ task_sleep (TIME_133MS);
+ }
+ task_sleep (TIME_1500MS);
+ deff_exit ();
+}
+
+void player_tournament_ready_deff (void)
+{
+ U8 timer;
+
+ dmd_alloc_low_clean ();
+#if (MACHINE_DMD == 1)
+ font_render_string_center (&font_fixed6, 64, 5, "TOURNAMENT");
+ font_render_string_center (&font_fixed6, 64, 16, "MODE ENABLED");
+#else
+ font_render_string_center (&font_var5, 64, 5, "TOURNAMENT MODE");
+#endif
+ font_render_string_center (&font_var5, 64, 28, "PRESS START NOW");
+ dmd_show_low ();
+
+ timer = 7;
+ do {
+ task_sleep_sec (1);
+ } while (--timer != 0);
+
+ tournament_mode_enabled = OFF;
+ deff_exit ();
+}
+
+
+
diff --git a/common/flex.c b/common/flex.c
new file mode 100644
index 000000000..c95c2dc9d
--- /dev/null
+++ b/common/flex.c
@@ -0,0 +1,126 @@
+/*
+ * Copyright 2011 by Brian Dominy
+ *
+ * This file is part of FreeWPC.
+ *
+ * FreeWPC is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * FreeWPC is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with FreeWPC; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include
+#include
+
+
+static void flex_recalc (__fardata__ const struct flex_config *fconf)
+{
+ U8 games_wanted;
+ U8 games;
+ U8 level;
+ U8 min_level;
+ U8 max_level;
+ U8 *adj_percent;
+ U8 frequency;
+ U8 n;
+ struct flex_data *fdata;
+
+ far_read_access ();
+ fdata = far_read (fconf, data);
+ min_level = far_read (fconf, min_level);
+ max_level = far_read (fconf, max_level);
+ adj_percent = far_read (fconf, adj_percent);
+ frequency = far_read (fconf, frequency);
+
+ dbprintf ("Recalc flex\n");
+ dbprintf ("percentage=%d\n", *adj_percent);
+ games_wanted = (100 - *adj_percent * frequency) / 100UL;
+ dbprintf ("wanted=%d of %d\n", games_wanted, frequency);
+
+ /* Start by counting the number of games played where the player
+ did not reach the min level for the adjustment. */
+ games = 0;
+ for (n=0; n < fdata->games; n++)
+ if (fdata->history[n] <= min_level)
+ games++;
+
+ /* Now scan the numbers of games played at each of the levels,
+ and stop as soon as the desired count is seen. */
+ for (level = min_level+1; level <= max_level; level++)
+ {
+ for (n=0; n < fdata->games; n++)
+ if (fdata->history[n] == level)
+ games++;
+ if (games >= games_wanted)
+ break;
+ }
+
+ /* Set the flex value to level-1 */
+ pinio_nvram_unlock ();
+ fdata->level = level-1;
+ fdata->games = 0;
+ pinio_nvram_lock ();
+ csum_area_update (far_read (fconf, csum)); // FIXME
+}
+
+void flex_end_game (__fardata__ const struct flex_config *fconf)
+{
+ U8 *adj_percent;
+
+ far_read_access ();
+ adj_percent = far_read (fconf, adj_percent);
+ if (adj_percent && *adj_percent)
+ {
+ struct flex_data *fdata = far_read (fconf, data);
+ U8 frequency = far_read (fconf, frequency);
+ if (fdata->games >= frequency)
+ {
+ flex_recalc (fconf);
+ }
+ }
+}
+
+void flex_end_player (__fardata__ const struct flex_config *fconf, U8 value)
+{
+ struct flex_data *fdata;
+
+ far_read_access ();
+ fdata = far_read (fconf, data);
+ if (fdata->games < MAX_FLEX_GAMES)
+ {
+ pinio_nvram_unlock ();
+ fdata->history[fdata->games++] = value;
+ pinio_nvram_lock ();
+ csum_area_update (far_read (fconf, csum));
+ dbprintf ("Logging flex #%d %d, level is %d\n",
+ fdata->games, value, fdata->level);
+ }
+}
+
+void flex_reset (__fardata__ const struct flex_config *fconf)
+{
+ struct flex_data *fdata;
+ U8 *adj_level;
+
+ far_read_access ();
+ fdata = far_read (fconf, data);
+ dbprintf ("fdata=%p\n", fdata);
+ adj_level = far_read (fconf, adj_level);
+ dbprintf ("adj_level=%p\n", adj_level);
+ if (adj_level)
+ fdata->level = *(adj_level);
+ else
+ fdata->level = far_read (fconf, min_level);
+ fdata->games = 0;
+ dbprintf ("Flex reset to %d\n", fdata->level);
+}
+
diff --git a/common/flipcode.c b/common/flipcode.c
index bf6b5e1d5..226be8ad4 100644
--- a/common/flipcode.c
+++ b/common/flipcode.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2006-2010 by Brian Dominy
+ * Copyright 2011 by Brian Dominy
*
* This file is part of FreeWPC.
*
@@ -20,148 +20,54 @@
/**
* \file
- * \brief A generic flipper code recognizer
+ * \brief The flipper code recognizer
*/
#include
-/* Machines that want flipper codes should define the following macros
-in the .md file:
+/* The next digit to be entered, which is advanced by pressing the
+ left button. */
+U8 flipcode_digit;
- MAX_FLIPCODE_CHARS - the maximum number of characters per flipper
- code sequence.
+/* The total sequence of digits entered (last 4 only) in BCD */
+U16 flipcode_value;
- FLIPCODE_LIST - an array of flipper code sequences. Each sequence
- is given as an array of bytes, the first being the sequence length
- and the remaining being the character codes.
- FLIPCODE_HANDLERS - an array of flipper code handlers. The size
- of this array should match the size of FLIPCODE_LIST.
-*/
-
-#ifndef MAX_FLIPCODE_CHARS
-#define MAX_FLIPCODE_CHARS 4
-#endif
-
-#ifndef FLIPCODE_LIST
-#define FLIPCODE_LIST { { 3, 1, 2, 3 }, { 3, 1, 1, 1 } }
-#endif
-
-#ifndef FLIPCODE_HANDLERS
-#define FLIPCODE_HANDLERS { flipcode_default_1, flipcode_default_2 }
-
-void flipcode_default_1 (void)
-{
- callset_invoke (flipcode_1);
-}
-
-void flipcode_default_2 (void)
-{
- callset_invoke (flipcode_2);
-}
-
-#endif
-
-
-//#define DEBUG_FLIPCODE
-
-
-/** The sequence of characters entered at the flippers */
-U8 flipcode_chars[MAX_FLIPCODE_CHARS];
-
-/** The next position of characters to be set */
-U8 flipcode_pos;
-
-/** The current value being programmed for the next character */
-U8 flipcode_value;
-
-static void (*flipcode_handler[]) (void) = FLIPCODE_HANDLERS;
-
-const char flipcodes[][MAX_FLIPCODE_CHARS+1] = FLIPCODE_LIST;
-
-
-void flipcode_reset (void)
+static void flipcode_reset (void)
{
- flipcode_pos = 0;
+ flipcode_digit = 0;
flipcode_value = 0;
task_kill_gid (GID_FLIPCODE_ACTIVE);
}
-
-void flipcode_active_task (void)
+static void flipcode_active_task (void)
{
-#ifdef DEBUG_FLIPCODE
- dbprintf ("flipcode pos %d value %d\n",
- flipcode_pos, flipcode_value);
-#endif
- task_sleep_sec (3);
+ /* Anytime either flipper is pressed, this task is restarted.
+ After so many seconds of inactivity, the flipper code will reset
+ to zero. */
+ task_sleep_sec (5);
flipcode_reset ();
task_exit ();
}
-
-void flipcode_test (void)
-{
- U8 code;
- U8 i;
-
- callset_invoke (flipper_code_entered);
- for (code=0; code < sizeof (flipcodes) / (MAX_FLIPCODE_CHARS+1); code++)
- {
-#ifdef DEBUG_FLIPCODE
- dbprintf ("Testing against code %d:\n", code);
-#endif
- if (flipcodes[code][0] != flipcode_pos)
- {
-#ifdef DEBUG_FLIPCODE
- dbprintf ("Length was %d, wanted %d\n",
- flipcode_pos, flipcodes[code][0]);
-#endif
- continue;
- }
-
- for (i=0; i < flipcode_pos; i++)
- if (flipcodes[code][i+1] != flipcode_chars[i])
- {
-#ifdef DEBUG_FLIPCODE
- dbprintf ("Failed at position %d\n", i);
-#endif
- continue;
- }
-
- /* Match */
-#ifdef DEBUG_FLIPCODE
- dbprintf ("Pass!\n");
-#endif
- (*flipcode_handler[code]) ();
- return;
- }
-}
-
-void flipcode_advance_char (void)
+static void flipcode_advance_char (void)
{
- flipcode_value++;
+ flipcode_digit++;
task_recreate_gid (GID_FLIPCODE_ACTIVE, flipcode_active_task);
}
-void flipcode_lock_char (void)
+static void flipcode_lock_char (void)
{
- if (flipcode_pos < MAX_FLIPCODE_CHARS)
+ flipcode_value = (flipcode_value << 4) | (flipcode_digit & 0x0F);
+ flipcode_digit = 0;
+ if (flipcode_value)
{
- flipcode_chars[flipcode_pos] = flipcode_value;
- flipcode_value = 0;
- ++flipcode_pos;
task_recreate_gid (GID_FLIPCODE_ACTIVE, flipcode_active_task);
+ callset_invoke (flipper_code_entered);
}
}
-bool flipper_code_check (const U8 *string)
-{
- return FALSE;
-}
-
-
CALLSET_ENTRY (flipcode, sw_left_button)
{
if (deff_get_active () != DEFF_AMODE)
@@ -174,10 +80,8 @@ CALLSET_ENTRY (flipcode, sw_right_button)
if (deff_get_active () != DEFF_AMODE)
return;
flipcode_lock_char ();
- flipcode_test ();
}
-
CALLSET_ENTRY (flipcode, amode_start)
{
flipcode_reset ();
diff --git a/common/highscore.c b/common/highscore.c
index 6219453dd..6ea15a0c7 100644
--- a/common/highscore.c
+++ b/common/highscore.c
@@ -59,14 +59,11 @@ U8 high_score_position;
/* Indicates the player number being checked */
U8 high_score_player;
-#ifdef MACHINE_TZ
- extern bool flipcode_used;
-#endif
/** The default grand champion score */
static U8 default_gc_score[HIGH_SCORE_WIDTH] =
#ifndef MACHINE_GRAND_CHAMPION_SCORE
- { 0x05, 0x00, 0x00, 0x00, 0x00 }
+ { 0x00, 0x05, 0x00, 0x00, 0x00 }
#else
MACHINE_GRAND_CHAMPION_SCORE
#endif
@@ -75,7 +72,7 @@ static U8 default_gc_score[HIGH_SCORE_WIDTH] =
static U8 default_gc_initials[HIGH_SCORE_NAMESZ] =
#ifndef MACHINE_GRAND_CHAMPION_INITIALS
- { 'B', 'C', 'D' }
+ { 'D', 'A', 'D' }
#else
MACHINE_GRAND_CHAMPION_INITIALS
#endif
@@ -84,10 +81,10 @@ static U8 default_gc_initials[HIGH_SCORE_NAMESZ] =
static U8 default_highest_scores[NUM_HIGH_SCORES][HIGH_SCORE_WIDTH] = {
#ifndef MACHINE_HIGH_SCORES
- { 0x04, 0x00, 0x00, 0x00, 0x00 },
- { 0x03, 0x50, 0x00, 0x00, 0x00 },
- { 0x03, 0x00, 0x00, 0x00, 0x00 },
- { 0x02, 0x50, 0x00, 0x00, 0x00 },
+ { 0x00, 0x04, 0x00, 0x00, 0x00 },
+ { 0x00, 0x03, 0x00, 0x00, 0x00 },
+ { 0x00, 0x02, 0x00, 0x00, 0x00 },
+ { 0x00, 0x01, 0x00, 0x00, 0x00 },
#else
MACHINE_HIGH_SCORES
#endif
@@ -96,10 +93,10 @@ static U8 default_highest_scores[NUM_HIGH_SCORES][HIGH_SCORE_WIDTH] = {
static U8 default_high_score_initials[NUM_HIGH_SCORES][HIGH_SCORE_NAMESZ] = {
#ifndef MACHINE_HIGH_SCORE_INITIALS
- { 'Q', 'Q', 'Q' },
- { 'F', 'T', 'L' },
- { 'N', 'P', 'L' },
- { 'P', 'Y', 'L' },
+ { 'S', 'A', 'M' },
+ { 'J', 'O', 'E' },
+ { 'I', 'S', 'A' },
+ { 'M', 'O', 'M' },
#else
MACHINE_HIGH_SCORE_INITIALS
#endif
@@ -108,6 +105,7 @@ static U8 default_high_score_initials[NUM_HIGH_SCORES][HIGH_SCORE_NAMESZ] = {
extern U8 initials_data[];
+#ifdef CONFIG_DMD_OR_ALPHA
/** Renders a single high score table entry.
* If pos is zero, then no position is drawn. */
@@ -134,7 +132,7 @@ void grand_champion_draw (void)
dmd_alloc_low_clean ();
font_render_string_center (&font_fixed6, 64, 8, "HIGHEST SCORE AT");
sprintf_score (high_score_table[0].score);
- font_render_string_center (&font_times8, 64, 22, sprintf_buffer);
+ font_render_string_center (&font_term6, 64, 22, sprintf_buffer);
dmd_show_low ();
}
@@ -172,31 +170,33 @@ void high_score_draw_34 (void)
dmd_show_low ();
}
+#endif
void high_score_check_reset (void)
{
- /* Initialize the counters that will force a reset
- * automatically after some time */
- /* TODO - what if adjustment is OFF ? */
+ ///Initialize the counters that will force a reset
+ // automatically after some time */
+ // TODO - what if adjustment is OFF ? */
hs_reset_counter1 = hstd_config.hs_reset_every;
hs_reset_counter2 = 250;
}
-/** Reset all of the high scores, including the grand champion,
- * to default values */
+// Reset all of the high scores, including the grand champion,
+ // to default values
void high_score_reset (void)
{
+
U8 place;
dbprintf ("Resetting high score table\n");
- /* Reset the grand champion */
+ // Reset the grand champion
memcpy (high_score_table[0].score, default_gc_score, HIGH_SCORE_WIDTH);
memcpy (high_score_table[0].initials, default_gc_initials, HIGH_SCORE_NAMESZ);
- /* Reset the other high scores */
- for (place=0; place < 4; place++)
+ // Reset the other high scores
+ for (place=0; place < NUM_HIGH_SCORES; place++)
{
memcpy (high_score_table[place+1].score, default_highest_scores[place],
HIGH_SCORE_WIDTH);
@@ -206,11 +206,12 @@ void high_score_reset (void)
csum_area_update (&high_csum_info);
- /* Reset when the next auto-reset will occur */
+ // Reset when the next auto-reset will occur
high_score_check_reset ();
-}
+}
+#ifdef CONFIG_DMD_OR_ALPHA
void hsentry_deff (void)
{
dmd_alloc_low_clean ();
@@ -267,7 +268,7 @@ void hscredits_deff (void)
task_sleep_sec (2);
deff_exit ();
}
-
+#endif
/** Check if the high scores need to be reset automatically.
* Called during game start. */
@@ -318,12 +319,6 @@ void high_score_free (U8 position)
void high_score_check_player (U8 player)
{
U8 hs;
- /* Invalidate the score if a flipcode was used */
-
-#ifdef MACHINE_TZ
- if (flipcode_used)
- return;
-#endif
for (hs = 0; hs < HS_COUNT; hs++)
{
@@ -396,6 +391,7 @@ void high_score_enter_initials (U8 position)
csum_area_update (&high_csum_info);
/* Award credits */
+ deff_start (DEFF_HSCREDITS);
if (position == 0)
{
high_score_award_credits (&hstd_config.champion_credits);
@@ -404,7 +400,7 @@ void high_score_enter_initials (U8 position)
{
high_score_award_credits (&hstd_config.hstd_credits[position-1]);
}
- deff_start_sync (DEFF_HSCREDITS);
+ task_sleep (TIME_1500MS);
}
}
@@ -420,6 +416,10 @@ void high_score_check (void)
if (hstd_config.highest_scores == OFF)
return;
+ /* Give games a chance to disable high scores in other ways */
+ if (!callset_invoke_boolean (allow_high_scores))
+ return;
+
dbprintf ("Checking for high scores\n");
/* Scan all players, in order from first to last, and see if they
@@ -447,3 +447,14 @@ CALLSET_ENTRY (high_score, file_register)
file_register (&high_csum_info);
}
+
+CALLSET_ENTRY (high_score, sw_buyin_button)
+{
+#if 0
+ high_score_table[4].initials[0] = 0;
+ high_score_table[3].initials[0] = 1;
+ high_score_enter_initials (4);
+ high_score_enter_initials (3);
+#endif
+}
+
diff --git a/common/initials.c b/common/initials.c
index 70b36b8b7..b99212378 100644
--- a/common/initials.c
+++ b/common/initials.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2006-2010 by Brian Dominy
+ * Copyright 2006-2011 by Brian Dominy
*
* This file is part of FreeWPC.
*
@@ -30,6 +30,8 @@
#define NUM_INITIALS_ALLOWED 3
+#define INITIALS_TIMER_INIT 30
+
/** The array of characters that can be entered.
* Keep the length of this as a power of 2 (32) so that
* the circular buffer implementation is simple.
@@ -59,9 +61,6 @@ U8 initials_selection;
/* The array of initials */
char initials_data[NUM_INITIALS_ALLOWED+1];
-/* The callback function to invoke when initials are entered OK */
-void (*initials_enter_complete) (void);
-
/**
* The display effect for the enter initials screen.
@@ -79,7 +78,11 @@ void enter_initials_deff (void)
U8 n;
dmd_alloc_low_clean ();
font_render_string_left (&font_var5, 0, 1, "ENTER INITIALS");
- font_render_string_left (&font_fixed10, 0, 9, initials_data);
+ for (n=0; n < 3; n++)
+ {
+ font_render_glyph (&font_bitmap8, n * 8, 9,
+ initials_data[n] ? initials_data[n] : '_');
+ }
if (initials_selection < MAX_INITIAL_INITIAL+1)
{
@@ -106,17 +109,13 @@ void enter_initials_deff (void)
dmd_low_buffer[16UL * n + SELECT_OFFSET] ^= 0x7F;
}
- sprintf ("%d", initials_enter_timer);
- font_render_string_right (&font_fixed6, 126, 3, sprintf_buffer);
dmd_show_low ();
-#else
+#elif (MACHINE_ALPHANUMERIC == 1)
seg_alloc_clean ();
seg_write_string (0, 0, "ENTER INITIALS");
sprintf ("%c", initial_chars[initials_selection]);
seg_write_string (0, 15, sprintf_buffer);
seg_write_string (1, 0, initials_data);
- sprintf ("%d", initials_enter_timer);
- seg_write_string (1, 14, sprintf_buffer);
seg_show ();
#endif
}
@@ -136,15 +135,10 @@ void initials_stop (void)
static void initials_running (void)
{
- task_sleep_sec (1);
- initials_enter_timer = 30;
- memset (initials_data, 0, sizeof (initials_data));
+ initials_enter_timer = INITIALS_TIMER_INIT;
+ memset (initials_data, ' ', sizeof (initials_data));
initials_index = 0;
- initials_selection = 0;
-
-#if 1
- initials_enter_complete = null_function;
-#endif
+ initials_selection = ALPHABET_LEN - SELECT_OFFSET;
while (initials_enter_timer > 0)
{
@@ -169,7 +163,7 @@ CALLSET_ENTRY (initials, init)
}
-CALLSET_ENTRY (initials, sw_left_button)
+CALLSET_ENTRY (initials, sw_left_button, sw_upper_left_button)
{
if (initials_enter_timer)
{
@@ -180,7 +174,7 @@ CALLSET_ENTRY (initials, sw_left_button)
}
-CALLSET_ENTRY (initials, sw_right_button)
+CALLSET_ENTRY (initials, sw_right_button, sw_upper_right_button)
{
if (initials_enter_timer)
{
@@ -191,7 +185,7 @@ CALLSET_ENTRY (initials, sw_right_button)
}
-CALLSET_ENTRY (initials, start_button_handler)
+CALLSET_ENTRY (initials, start_button_handler, sw_left_handle_button, sw_launch_button)
{
if (initials_enter_timer && initials_index < NUM_INITIALS_ALLOWED)
{
@@ -199,10 +193,9 @@ CALLSET_ENTRY (initials, start_button_handler)
initial_chars[(initials_selection + SELECT_OFFSET) % ALPHABET_LEN];
score_update_request ();
if (++initials_index == NUM_INITIALS_ALLOWED)
- {
- (*initials_enter_complete) ();
initials_stop ();
- }
+ else
+ initials_enter_timer = INITIALS_TIMER_INIT;
}
}
diff --git a/common/locale.c b/common/locale.c
index 3cba3da09..99b7a694f 100644
--- a/common/locale.c
+++ b/common/locale.c
@@ -90,9 +90,10 @@ CALLSET_ENTRY (locale, init)
if (current_locale != locale_code
|| ~locale_code != locale_code_csum)
{
+#ifdef CONFIG_TEST
/* Install locale-specific adjustments */
preset_install_country_code (current_locale);
-
+#endif
/* Save the current locale so that install does not
need to be performed on the next reboot, unless
the DIP switches are changed. */
diff --git a/common/match.c b/common/match.c
index 407bfa731..7f5e58eef 100644
--- a/common/match.c
+++ b/common/match.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2006-2010 by Brian Dominy
+ * Copyright 2006-2011 by Brian Dominy
*
* This file is part of FreeWPC.
*
@@ -44,6 +44,8 @@ match_award (void)
knocker_fire ();
}
+#ifdef CONFIG_DMD_OR_ALPHA
+
/*
* Draw the constant part of the match animation once.
*/
@@ -119,6 +121,7 @@ match_deff (void)
deff_exit ();
}
+#endif
/**
* Return a score that says how good a particular two-digit number
diff --git a/common/optocheck.c b/common/optocheck.c
index ec635c215..9ec4d1fd0 100644
--- a/common/optocheck.c
+++ b/common/optocheck.c
@@ -34,6 +34,7 @@
*/
void opto_check (void)
{
+#ifdef CONFIG_PLATFORM_WPC
U8 col;
U8 row;
U8 bits;
@@ -64,5 +65,6 @@ void opto_check (void)
*/
dbprintf ("Bad opto power?\n");
task_sleep (TIME_33MS);
+#endif /* CONFIG_PLATFORM_WPC */
}
diff --git a/common/pause.c b/common/pause.c
index 43fe7f19f..3f58c964e 100644
--- a/common/pause.c
+++ b/common/pause.c
@@ -84,7 +84,7 @@ CALLSET_ENTRY (mute_and_pause, sw_buyin_button)
/*
* Ensure that mute/pause is turned off at endball.
*/
-CALLSET_ENTRY (mute_and_pause, end_ball, tilt)
+CALLSET_ENTRY (mute_and_pause, end_ball, tilt, test_start)
{
mute_and_pause_stop ();
}
diff --git a/common/pin.c b/common/pin.c
index 8b98f4ae4..d33eb0f2e 100644
--- a/common/pin.c
+++ b/common/pin.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2006-2010 by Brian Dominy
+ * Copyright 2006-2011 by Brian Dominy
*
* This file is part of FreeWPC.
*
@@ -111,7 +111,7 @@ void enter_pin_deff (void)
sprintf ("%d", pin_enter_timer);
font_render_string_right (&font_fixed6, 126, 3, sprintf_buffer);
dmd_show_low ();
-#else
+#elif (MACHINE_ALPHANUMERIC == 1)
seg_alloc_clean ();
seg_write_string (0, 0, "ENTER PIN");
sprintf ("%c", pin_chars[pin_selection]);
diff --git a/common/plunger.c b/common/plunger.c
index f0893a75a..48a4cc451 100644
--- a/common/plunger.c
+++ b/common/plunger.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2007, 2008, 2009, 2010 by Brian Dominy
+ * Copyright 2007-2011 by Brian Dominy
*
* This file is part of FreeWPC.
*
@@ -41,7 +41,7 @@
void shooter_clear_monitor (void)
{
task_add_duration (TASK_DURATION_INF);
- task_sleep_sec (4); /* this could be machine-specific */
+ task_sleep_sec (2); /* this could be machine-specific */ //was 4
global_flag_off (GLOBAL_FLAG_BALL_AT_PLUNGER);
task_exit ();
}
@@ -101,10 +101,14 @@ static void launch_button_pressed (void)
}
#endif
+
+
+
+
#ifdef INCLUDE_AUTOPLUNGER
static void timed_plunger_monitor (void)
{
- task_sleep_sec (7);
+ task_sleep_sec (25);
launch_button_pressed ();
task_exit ();
}
diff --git a/common/printer.c b/common/printer.c
index 175812fe4..b346ede63 100644
--- a/common/printer.c
+++ b/common/printer.c
@@ -207,11 +207,12 @@ void print_header (void)
*/
if (printer_config.pause_every_page == YES)
{
+#ifdef CONFIG_DMD_OR_ALPHA
dmd_alloc_low_clean ();
font_render_string_center (&font_mono5, 64, 11, "PRESS ENTER");
font_render_string_center (&font_mono5, 64, 21, "FOR NEXT PAGE");
dmd_show_low ();
-
+#endif
while (!switch_poll (SW_ENTER))
task_sleep (TIME_66MS);
while (switch_poll (SW_ENTER))
diff --git a/common/replay.c b/common/replay.c
index dc994fc56..607f0553b 100644
--- a/common/replay.c
+++ b/common/replay.c
@@ -170,6 +170,7 @@ void replay_code_to_boost (score_t score, U8 code)
#endif
+#ifdef CONFIG_DMD_OR_ALPHA
/** Draw the replay screen */
void replay_draw (void)
{
@@ -197,6 +198,7 @@ void replay_draw (void)
font_render_string_center (&font_fixed10, 64, 22, sprintf_buffer);
dmd_show_low ();
}
+#endif
/** Award a single replay to the player up */
@@ -207,46 +209,73 @@ void replay_award (void)
{
case FREE_AWARD_CREDIT:
add_credit ();
+ #ifdef DEFF_REPLAY
+ deff_start (DEFF_REPLAY);
+ #endif
+ #ifdef LEFF_REPLAY
+ leff_start (LEFF_REPLAY);
+ #endif
break;
case FREE_AWARD_EB:
increment_extra_balls ();
+ callset_invoke (award_extra_ball_effect);
break;
case FREE_AWARD_OFF:
break;
}
-#ifdef DEFF_REPLAY
- deff_start (DEFF_REPLAY);
-#endif
-#ifdef LEFF_REPLAY
- leff_start (LEFF_REPLAY);
-#endif
audit_increment (&system_audits.replays);
+ timestamp_update (&system_timestamps.last_replay);
replay_total_this_player++;
knocker_fire ();
}
+
+
+
/** Check if the current score has exceeded the next replay level,
* and a replay needs to be awarded */
-void replay_check_current (void)
-{
- replay_score_t *curr;
+void replay_check_current (void) {
+
+ if (unlikely (system_config.replay_award == FREE_AWARD_OFF)) return;
+ if (unlikely (replay_total_this_player >= 1)) return;
+ if (unlikely (replay_total_this_player >= NUM_REPLAY_LEVELS)) return;
+
+// Compares two scores. Returns -1, 0, or 1 accordingly, like memcmp.
+ if (score_compare (current_score, next_replay_score) >= 0) {
+ callset_invoke (replay);
+ switch (system_config.replay_award) {
+ case FREE_AWARD_CREDIT:
+ add_credit ();
+ #ifdef DEFF_REPLAY
+ deff_start (DEFF_REPLAY);
+ #endif
+ #ifdef LEFF_REPLAY
+ leff_start (LEFF_REPLAY);
+ #endif
+ break;
+
+ case FREE_AWARD_EB:
+ increment_extra_balls ();
+ callset_invoke (award_extra_ball_effect);
+ break;
+
+ case FREE_AWARD_OFF:
+ break;
+ }//end of switch
+
+ audit_increment (&system_audits.replays);
+ timestamp_update (&system_timestamps.last_replay);
+ replay_total_this_player++;
+ knocker_fire ();
+ }//end of if
+}//end
- if (unlikely (system_config.replay_award == FREE_AWARD_OFF))
- return;
- if (unlikely (replay_total_this_player >= NUM_REPLAY_LEVELS))
- return;
- curr = (replay_score_t *)(current_score + REPLAY_SCORE_OFFSET);
- if (unlikely (*curr > next_replay_score))
- {
- replay_award ();
- }
-}
/** Returns true if it is possible to give out a replay award.
diff --git a/common/reset.c b/common/reset.c
index 96bf501b8..6bf212ee6 100644
--- a/common/reset.c
+++ b/common/reset.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2006-2010 by Brian Dominy
+ * Copyright 2006-2011 by Brian Dominy
*
* This file is part of FreeWPC.
*
@@ -68,13 +68,9 @@ extern inline void wait_for_button (const U8 swno)
void factory_reset (void)
{
file_reset ();
-#ifdef __m6809__
memset (AREA_BASE (permanent), 0, AREA_SIZE (permanent));
-#else
- /* TODO - how to clean the permanent area in native mode? */
-#endif
- timestamp_update (&system_timestamps.factory_reset);
callset_invoke (factory_reset);
+ timestamp_update (&system_timestamps.factory_reset);
}
@@ -89,10 +85,12 @@ void factory_reset_if_required (void)
if (!callset_invoke_boolean (init_ok))
{
deff_stop (DEFF_SYSTEM_RESET);
+#ifdef CONFIG_DMD_OR_ALPHA
dmd_alloc_low_clean ();
font_render_string_center (&font_mono5, 64, 10, "FACTORY SETTINGS");
font_render_string_center (&font_mono5, 64, 20, "RESTORED");
dmd_show_low ();
+#endif
factory_reset ();
task_sleep_sec (4);
warm_reboot ();
@@ -107,6 +105,7 @@ void system_accept_freewpc (void)
(freewpc_accepted[2] == ACCEPT_3))
return;
+#ifdef CONFIG_DMD
dmd_alloc_low_clean ();
font_render_string_center (&font_mono5, 64, 3, "FREEWPC");
font_render_string_center (&font_mono5, 64, 9, "WARNING... BALLY WMS");
@@ -137,6 +136,7 @@ void system_accept_freewpc (void)
dmd_alloc_low_clean ();
dmd_show_low ();
task_sleep_sec (1);
+#endif
pinio_nvram_unlock ();
freewpc_accepted[0] = ACCEPT_1;
@@ -161,16 +161,16 @@ void system_reset_deff (void)
font_render_string_center (&font_var5, 64, 17, "SUPPORTED BY BALLY/WILLIAMS");
font_render_string_center (&font_var5, 64, 25, "WWW.ODDCHANGE.COM/FREEWPC");
dmd_show_low ();
-#else
+#endif
+#if (MACHINE_ALPHANUMERIC == 1)
seg_alloc_clean ();
seg_write_row_center (0, "FREEWPC " C_STRING(BUILD_YEAR));
seg_write_row_center (1, "WWW.ODDCHANGE.COM");
seg_show ();
#endif
task_sleep_sec (3);
-
+#ifdef CONFIG_DMD_OR_ALPHA
dmd_alloc_low_clean ();
-
font_render_string_left (&font_mono5, 1, 1, MACHINE_NAME);
#ifdef DEBUGGER
@@ -190,6 +190,7 @@ void system_reset_deff (void)
font_render_string_left (&font_mono5, 1, 26, "TESTING...");
dmd_show_low ();
+#endif
/* Keep the reset display for at least 3 seconds (so
* it is readable), keep it longer if any of the
@@ -248,10 +249,6 @@ void system_reset (void)
/* In test-only mode, pretend ENTER was pressed
* and go straight to test mode. */
-#ifdef CONFIG_STRESS_TEST
- extern U8 switch_stress_enable;
- switch_stress_enable = YES;
-#endif
#ifdef MACHINE_TEST_ONLY
while (sys_init_pending_tasks != 0)
task_sleep (TIME_66MS);
diff --git a/common/rtc.c b/common/rtc.c
index 415bee428..970890604 100644
--- a/common/rtc.c
+++ b/common/rtc.c
@@ -125,8 +125,11 @@ static U8 rtc_days_in_current_month (struct date *d)
/** Calculate the day of the week (0=Sunday, 6=Saturday)
-from the current values of year, month, and day. */
-static enum day_of_week rtc_calc_day_of_week (struct date *d)
+ * from the current values of year, month, and day.
+ * This should only be called when needing to display a
+ * date; the date structure does not maintain this.
+ */
+enum day_of_week rtc_calc_day_of_week (struct date *d)
{
static U8 day_of_week_month_code[] = {
0, 3, 3, 6, 1, 4, 6, 2, 5, 0, 3, 5
@@ -143,22 +146,7 @@ static enum day_of_week rtc_calc_day_of_week (struct date *d)
if (!(d->year % 4) && d->month <= 2)
day_of_week--;
day_of_week --;
-
- /* The mod 7 is the hard part to do on the 6809.
- * The technique used here is to do repeated subtraction.
- * For values larger than 64, subtract 63 at a time to speed up
- * the computation. */
-#ifndef __m6809__
day_of_week %= DAYS_PER_WEEK;
-#else
- while (day_of_week >= DAYS_PER_WEEK)
- {
- if (day_of_week > 64)
- day_of_week -= (64 - 1);
- else
- day_of_week -= DAYS_PER_WEEK;
- }
-#endif
return day_of_week;
}
@@ -190,8 +178,6 @@ static void rtc_normalize (struct date *d)
the year 2256. */
}
- //rtc_calc_day_of_week ();
-
/* Update checksums and save */
csum_area_update (&rtc_csum_info);
pinio_nvram_lock ();
@@ -257,13 +243,12 @@ void rtc_reset (void)
/* Reset the date to the time at which the software
* was built.
* TODO : this should trigger a CLOCK NOT SET message */
- current_date.year = 0;
+ current_date.year = 13;
current_date.month = 1;
current_date.day = 1;
- current_date.hour = 0;
- current_date.minute = 0;
+ current_date.hour = 1;
+ current_date.minute = 30;
last_minute = 0;
- //rtc_calc_day_of_week (¤t_date);
}
@@ -341,6 +326,7 @@ const char *rtc_edit_field_name[] = {
#endif
};
+#ifdef CONFIG_DMD_OR_ALPHA
void rtc_render (struct date *d)
{
@@ -374,6 +360,8 @@ void rtc_show_date_time (struct date *d)
dmd_show_low ();
}
+#endif
+
void rtc_begin_modify (void)
{
diff --git a/common/score_deff.c b/common/score_deff.c
index c4506fc51..4bef72661 100644
--- a/common/score_deff.c
+++ b/common/score_deff.c
@@ -27,10 +27,6 @@
#include
-/** Nonzero if the current score has changed and needs to be redrawn */
-bool score_update_needed;
-
-
/** Draw the current ball number at the bottom of the display. */
void scores_draw_status_bar (void)
{
@@ -59,7 +55,9 @@ void scores_draw_credits (void)
credits_render ();
/* TODO - this could also be moved into a ll_ routine, but
it just happens to work for alphanumeric as well. */
+#ifdef CONFIG_DMD_OR_ALPHA
font_render_string_center (&font_mono5, 64, 29, sprintf_buffer);
+#endif
}
@@ -102,6 +100,7 @@ void scores_draw (void)
scores_draw_current (SCORE_DRAW_ALL);
}
+#ifdef CONFIG_DMD_OR_ALPHA
/** A display effect for showing all the scores, without
flashing. This is used when new players are added or
@@ -150,3 +149,4 @@ void scores_deff (void)
}
}
+#endif
diff --git a/common/score_deff_dmd.c b/common/score_deff_dmd.c
index f48133ad6..d68019eab 100644
--- a/common/score_deff_dmd.c
+++ b/common/score_deff_dmd.c
@@ -154,7 +154,7 @@ const enum score_font_key score_font_info_key[MAX_PLAYERS][MAX_PLAYERS+1][MAX_PL
};
-const U8 *dmd_score_info_base;
+const enum score_font_key *dmd_score_info_base;
U16 ll_dmd_sweep_addr;
diff --git a/common/score_deff_seg.c b/common/score_deff_seg.c
index 1b02d0705..40a97caf4 100644
--- a/common/score_deff_seg.c
+++ b/common/score_deff_seg.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2008-2010 by Brian Dominy
+ * Copyright 2008-2011 by Brian Dominy
*
* This file is part of FreeWPC.
*
diff --git a/common/search.c b/common/search.c
index 9d8cda3f2..29f0a72ed 100644
--- a/common/search.c
+++ b/common/search.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2006-2010 by Brian Dominy
+ * Copyright 2006-2011 by Brian Dominy
*
* This file is part of FreeWPC.
*
@@ -36,10 +36,6 @@
* legitimiately free the ball. This logic avoids drives attached
* to flashers or to any game-defined devices that should be avoided,
* like the knocker or device kickout coils.
- *
- * Ball search is currently indefinite and will gladly run forever.
- * A real machine would give up after a while, or kick another ball
- * into play.
*/
@@ -79,7 +75,7 @@ static bool chase_ball_enabled (void)
*/
static bool ball_search_solenoid_ok (U8 sol)
{
- device_t *dev;
+// device_t *dev;
#if !defined(MACHINE_SOL_FLASHERP)
/* If the machine description is not proper, then we can't know
@@ -109,25 +105,23 @@ static bool ball_search_solenoid_ok (U8 sol)
return (FALSE);
/* Also check for all ball device kick coils; skip them */
- for (dev=device_entry(0); dev < device_entry(NUM_DEVICES); dev++)
- {
- if (sol == dev->props->sol)
- {
+// for (dev=device_entry(0); dev < device_entry(NUM_DEVICES); dev++){
+// if (sol == dev->props->sol){
/* This coil controls a ball device. */
/* If there are no balls detected here, pulse it */
- if (dev->actual_count == 0)
- return TRUE;
+// if (dev->actual_count == 0)
+// return TRUE;
/* If chase ball is turned off, then during the 5th ball search,
pulse it */
- if (!chase_ball_enabled () && ball_search_count == 5)
- return (TRUE);
+// if (!chase_ball_enabled () && ball_search_count == 5)
+// return (TRUE);
/* Default is NOT to fire such a coil */
- return (FALSE);
- }
- }
+// return (FALSE);
+// }
+// }
/* OK, you can use it. */
return (TRUE);
@@ -152,6 +146,10 @@ bool ball_search_timed_out (void)
}
+
+
+
+
/** Run through all solenoids to try to find a ball. */
void ball_search_run (void)
{
@@ -226,7 +224,7 @@ void ball_search_monitor_task (void)
* - ball is on the shooter switch
* - either flipper button is held
*/
- if (in_live_game && !in_bonus && (live_balls || !valid_playfield)
+ if (in_game && !in_test && !in_bonus && (live_balls || !valid_playfield)
#ifdef MACHINE_SHOOTER_SWITCH
&& !switch_poll_logical (MACHINE_SHOOTER_SWITCH)
#endif
@@ -260,10 +258,10 @@ void ball_search_monitor_task (void)
leff_stop (LEFF_TILT);
- if (ball_search_count < 10)
+ if (ball_search_count < 5)
{
/* Delay a small amount for the first few ball searches */
- task_sleep_sec (12);
+ task_sleep_sec (5);
}
else
{
diff --git a/common/serve.c b/common/serve.c
index 29c9dd421..36371b4f2 100644
--- a/common/serve.c
+++ b/common/serve.c
@@ -33,6 +33,13 @@
*/
+__boolean MB_SERVING;
+
+
+CALLSET_ENTRY (serve, start_player) {
+ MB_SERVING = FALSE;
+}
+
/* Use HAVE_AUTO_SERVE around code which deals with autoplunger hardware.
Such code will not compile on machines where there is no such thing. */
#if defined(MACHINE_LAUNCH_SWITCH) && \
@@ -44,11 +51,11 @@ Such code will not compile on machines where there is no such thing. */
/* When using an autoplunger, LAUNCH_DELAY says how much time to wait
after launching a ball, before trying to launch another one (could be
another ball served, or the same ball which failed to launch OK). */
-#ifndef LAUNCH_DELAY
-#define LAUNCH_DELAY TIME_3S
+#define LAUNCH_DELAY TIME_500MS
+#define MACHINE_SHOOTER_SWITCH_DELAY TIME_200MS
#endif
-#endif
+#define SET_BALL_COUNT_TASK_DELAY TIME_2S + TIME_500MS
/* Indicates how many balls we want to be in play. Eventually,
live_balls == live_balls_wanted if everything works OK. */
@@ -58,13 +65,12 @@ U8 live_balls_wanted;
/**
* Returns true if the machine supports autoplunging balls.
*/
-static inline bool have_auto_serve_p (void)
-{
+static inline bool have_auto_serve_p (void) {
#ifdef HAVE_AUTO_SERVE
return TRUE;
#endif
return FALSE;
-}
+} //end of function
/**
@@ -73,15 +79,14 @@ static inline bool have_auto_serve_p (void)
* plunger at the beginning of a ball and after a ball lock.
* It is not used for autoplunges.
*/
-void serve_ball (void)
-{
+void serve_ball (void) {
#ifdef DEVNO_TROUGH
valid_playfield = FALSE;
callset_invoke (serve_ball);
effect_update_request ();
device_request_kick (device_entry (DEVNO_TROUGH));
#endif /* DEVNO_TROUGH */
-}
+} //end of function
/**
@@ -89,9 +94,9 @@ void serve_ball (void)
* been served from the trough ; this just fires the launch
* solenoid.
*/
-static void launch_ball_task (void)
-{
-#ifdef HAVE_AUTO_SERVE
+static void launch_ball_task (void) {
+/* old code
+ #ifdef HAVE_AUTO_SERVE
if (!switch_poll_logical (MACHINE_SHOOTER_SWITCH))
task_sleep (TIME_500MS);
@@ -100,41 +105,46 @@ static void launch_ball_task (void)
task_sleep (LAUNCH_DELAY);
} while (switch_poll_logical (MACHINE_SHOOTER_SWITCH));
#endif
+ */
+ sol_request_async (MACHINE_LAUNCH_SOLENOID);
+ task_sleep (LAUNCH_DELAY);
task_exit ();
-}
+} //end of function
+
+
-void launch_ball (void)
-{
+
+
+void launch_ball (void) {
/* If ball launch is already in progress, do not restart it. */
task_create_gid1 (GID_LAUNCH_BALL, launch_ball_task);
-}
+} //end of function
+
+
/**
* Autolaunch a new ball into play from the trough. This is the
* preferred API to use by ballsavers.
*/
-void serve_ball_auto (void)
-{
+void serve_ball_auto (void) {
#ifdef DEVNO_TROUGH
/* Fall back to manual ball serve if there is no autoplunger. */
- if (!have_auto_serve_p ())
- {
- serve_ball ();
- }
- else
- {
+ if (!have_auto_serve_p ()) serve_ball ();
+ else {
set_valid_playfield ();
- /* TZ's autoplunger is a little different, so it is handled
- specially. */
+ /* TZ's autoplunger is a little different, so it is handled specially. */
#if defined(MACHINE_TZ)
autofire_add_ball ();
#else
device_request_kick (device_entry (DEVNO_TROUGH));
#endif
- }
+ } //end of else
#endif /* DEVNO_TROUGH */
-}
+} //end of function
+
+
+
/**
@@ -142,39 +152,47 @@ void serve_ball_auto (void)
* in play to 'live_balls_wanted'.
*/
#ifdef DEVNO_TROUGH
-static void set_ball_count_task (void)
-{
+static void set_ball_count_task (void) {
device_t *dev = device_entry (DEVNO_TROUGH);
U8 max_live_balls;
U8 retries;
+ U8 temp_live_balls_wanted;
- /* While we are launching balls, we monitor 'live_balls' to
- check that it is going up. */
max_live_balls = live_balls;
+ temp_live_balls_wanted = live_balls_wanted - live_balls;
+ retries = 2;
+
+ //first pass - quick fire balls
+ MB_SERVING = TRUE;
+ while (temp_live_balls_wanted) {
+ temp_live_balls_wanted--;
+ sol_request_async (SOL_BALLSERVE);
+ task_sleep (TIME_500MS); //worked good at 700 - just giving a little margin here
+ task_sleep (TIME_400MS);
+ sol_request_async (MACHINE_LAUNCH_SOLENOID);
+ task_sleep (TIME_500MS);//worked good at 300 - just giving a little margin here
+ }//end of rapid fire serving
+ MB_SERVING = FALSE;
- /* Set the number of times we will attempt to kick a ball.
- This is the number of balls that need to be added to play,
- plus 2 to handle errors. After this, we give up. */
- retries = live_balls_wanted - max_live_balls + 2;
+ //check trough to see if live balls is accurate
+ task_sleep (TIME_1S);
+ live_balls = (5 - device_recount(device_entry (DEVNO_TROUGH)) );
+ max_live_balls = live_balls;
- while (retries && max_live_balls < live_balls_wanted)
- {
+ //if still not all balls out there, retry slower - 2 times
+ // we will usually arrive at this place on a ball-saving type multiball
+ //where balls are constantly draining and refiring
+ //this is okay, since the refiring will slow down which is sort of a punishment to
+ //the player for allowing the balls to drain so fast
+ while (max_live_balls < live_balls_wanted && retries) {
retries--;
- /* Are there enough balls in the trough to satisfy another
- kick request? If not, then we need to add the balls from
- somewhere else. This is machine-specific. */
- if (dev->actual_count < dev->kicks_needed)
- {
- callset_invoke (trough_rescue);
- }
- else
- {
- serve_ball_auto ();
- }
+ /* Are there enough balls in the trough to satisfy another kick request?
+ * If not, then we need to add the balls from somewhere else.*/
+ if (dev->actual_count < dev->kicks_needed) callset_invoke (trough_rescue);
+ else serve_ball_auto ();
- /* Wait a bit for the ball to make it to the shooter lane. */
- task_sleep (TIME_2S + TIME_500MS);
+ task_sleep (SET_BALL_COUNT_TASK_DELAY);
/* As long as there is a ball on the shooter, wait before trying
to continue. This flag will clear once the shooter switch
@@ -185,28 +203,28 @@ static void set_ball_count_task (void)
/* See if the ball count went up, indicating success */
if (live_balls > max_live_balls)
max_live_balls = live_balls;
- }
+ }//end of retry section
+
task_exit ();
-}
+} //end of function
-/**
- * Set the total number of balls in play to COUNT.
- */
-void set_ball_count (U8 count)
-{
+
+
+/* Set the total number of balls in play to COUNT. */
+void set_ball_count (U8 count) {
+ if (count <= live_balls) return;
live_balls_wanted = count;
task_recreate_gid (GID_SET_BALL_COUNT, set_ball_count_task);
-}
+} //end of function
-/**
- * Add COUNT balls into play from the trough.
- */
-void add_ball_count (U8 count)
-{
+
+
+/* Add COUNT balls into play from the trough. */
+void add_ball_count (U8 count) {
set_ball_count (live_balls + count);
-}
+} //end of function
#endif
@@ -214,16 +232,12 @@ void add_ball_count (U8 count)
* If a ball is already on the shooter, or a previous autolaunch
* request is still in progress, then delay kicking further balls.
*/
-CALLSET_BOOL_ENTRY (serve, dev_trough_kick_request)
-{
+CALLSET_BOOL_ENTRY (serve, dev_trough_kick_request) {
/* TODO - ball at plunger should block ALL kick requests? */
- if (global_flag_test (GLOBAL_FLAG_BALL_AT_PLUNGER))
- return FALSE;
- else if (task_find_gid (GID_LAUNCH_BALL))
- return FALSE;
- else
- return TRUE;
-}
+ if (global_flag_test (GLOBAL_FLAG_BALL_AT_PLUNGER)) return FALSE;
+ else if (task_find_gid (GID_LAUNCH_BALL)) return FALSE;
+ else return TRUE;
+} //end of function
/**
@@ -232,13 +246,16 @@ CALLSET_BOOL_ENTRY (serve, dev_trough_kick_request)
* this launch as soon as we know a ball exited the trough (we
* do not have to see the shooter).
*/
-CALLSET_ENTRY (serve, dev_trough_kick_success)
-{
-#ifdef HAVE_AUTO_SERVE
- if (valid_playfield)
- launch_ball ();
+CALLSET_ENTRY (serve, dev_trough_kick_success) {
+#ifndef MACHINE_DEMO_MAN
+ #ifdef HAVE_AUTO_SERVE
+ if (valid_playfield) {
+ task_sleep (TIME_200MS);
+ launch_ball ();
+ }
+ #endif
#endif
-}
+} //end of function
/**
@@ -246,26 +263,27 @@ CALLSET_ENTRY (serve, dev_trough_kick_success)
* we will autolaunch it but not if the door is open or we are
* in tournament mode.
*/
-CALLSET_ENTRY (serve, sw_shooter)
-{
+CALLSET_ENTRY (serve, sw_shooter) {
+#ifdef MACHINE_SHOOTER_SWITCH
+ if (!switch_poll_logical (MACHINE_SHOOTER_SWITCH)) return;
ball_search_timer_reset ();
- if (valid_playfield
+ if ( valid_playfield
&& !tournament_mode_enabled
- && !global_flag_test (GLOBAL_FLAG_COIN_DOOR_OPENED))
- {
- /* TODO - this might be game specific. For example, Simpsons Pinball
- Party would give you a manual skill shot here except during
- multiball. */
+ && !global_flag_test (GLOBAL_FLAG_COIN_DOOR_OPENED)
+ && !MB_SERVING) {
+ task_sleep (MACHINE_SHOOTER_SWITCH_DELAY);
launch_ball ();
- }
-}
+ }//end of if
+#endif
+} //end of function
+
-CALLSET_ENTRY (serve, valid_playfield)
-{
+
+CALLSET_ENTRY (serve, valid_playfield) {
#ifdef MACHINE_LAUNCH_LAMP
/* TODO - where is the lamp turned ON? */
lamp_flash_off (MACHINE_LAUNCH_LAMP);
#endif
-}
+} //end of function
diff --git a/common/service.c b/common/service.c
index c905a3629..f7f462898 100644
--- a/common/service.c
+++ b/common/service.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2006-2010 by Brian Dominy
+ * Copyright 2006-2011 by Brian Dominy
*
* This file is part of FreeWPC.
*
@@ -33,46 +33,6 @@ ought to generate a warning message */
U8 live_balls_before_door_open;
-void coin_door_buttons_deff (void)
-{
- dmd_alloc_low_clean ();
-#if (MACHINE_DMD == 1)
- font_render_string_center (&font_var5, 64, 3, "COIN DOOR IS CLOSED");
-#endif
- font_render_string_center (&font_var5, 64, 10, "OPEN COIN DOOR");
- font_render_string_center (&font_var5, 64, 17, "TO USE BUTTONS");
- dmd_show_low ();
- task_sleep_sec (3);
- deff_exit ();
-}
-
-
-void coin_door_power_deff (void)
-{
- U8 n;
- for (n=0; n < 5; n++)
- {
- dmd_alloc_low_clean ();
- dmd_show_low ();
- task_sleep (TIME_200MS);
-
- dmd_alloc_low_clean ();
-#if (MACHINE_DMD == 1)
- font_render_string_center (&font_fixed6, 64, 6, "COIN DOOR IS OPEN");
- font_render_string_center (&font_fixed6, 64, 16, "HIGH POWER");
- font_render_string_center (&font_fixed6, 64, 26, "IS DISABLED");
-#else
- font_render_string_center (&font_fixed6, 64, 10, "HIGH POWER");
- font_render_string_center (&font_fixed6, 64, 21, "IS DISABLED");
-#endif
- dmd_show_low ();
- sound_send (SND_TEST_ALERT);
- task_sleep (TIME_300MS);
- }
- task_sleep_sec (3);
- deff_exit ();
-}
-
static bool coin_door_warning_needed (void)
{
@@ -112,22 +72,30 @@ CALLSET_ENTRY (service, sw_down)
{
if (coin_door_warning_needed ())
return;
+#ifdef CONFIG_VOLUME_CONTROL
else if (!in_test)
button_invoke (SW_VOLUME_DOWN, volume_down, TIME_500MS, TIME_100MS);
/* callset_invoke (volume_down) */
+#endif
+#ifdef CONFIG_DMD_OR_ALPHA
else
test_down_button ();
+#endif
}
CALLSET_ENTRY (service, sw_up)
{
if (coin_door_warning_needed ())
return;
+#ifdef CONFIG_VOLUME_CONTROL
else if (!in_test)
button_invoke (SW_VOLUME_UP, volume_up, TIME_500MS, TIME_100MS);
/* callset_invoke (volume_up) */
+#endif
+#ifdef CONFIG_DMD_OR_ALPHA
else
test_up_button ();
+#endif
}
/**************************************************************/
@@ -181,6 +149,7 @@ CALLSET_ENTRY (coin_door, amode_start)
CALLSET_ENTRY (coin_door, sw_coin_door_closed)
{
+#ifdef SW_COIN_DOOR_CLOSED
/* Be kind and ignore slam tilt switch briefly after the
coin door is opened/closed */
event_can_follow (sw_coin_door_closed, sw_slam_tilt, TIME_5S);
@@ -189,6 +158,7 @@ CALLSET_ENTRY (coin_door, sw_coin_door_closed)
coin_door_closed ();
else
coin_door_opened ();
+#endif
}
CALLSET_BOOL_ENTRY (coin_door, ball_drain)
diff --git a/common/shootalert.c b/common/shootalert.c
index 4fffb03aa..e12fbe449 100644
--- a/common/shootalert.c
+++ b/common/shootalert.c
@@ -35,13 +35,13 @@
void shoot_alert_task (void)
{
#ifdef MACHINE_SHOOTER_SWITCH
- task_sleep_sec (15);
+ task_sleep_sec (5);
for (;;)
{
if (switch_poll (MACHINE_SHOOTER_SWITCH))
{
deff_start (DEFF_PLUNGE_BALL);
- task_sleep_sec (20);
+ task_sleep_sec (7);
}
else
task_sleep_sec (5);
diff --git a/common/sound_effect.c b/common/sound_effect.c
index 1c38b8c8c..cf69baf2b 100644
--- a/common/sound_effect.c
+++ b/common/sound_effect.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2008, 2009, 2010 by Brian Dominy
+ * Copyright 2008-2011 by Brian Dominy
*
* This file is part of FreeWPC.
*
diff --git a/common/start_button.c b/common/start_button.c
index b12d18647..a6fbf1fab 100644
--- a/common/start_button.c
+++ b/common/start_button.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2008-2010 by Brian Dominy
+ * Copyright 2008-2012 by Brian Dominy
*
* This file is part of FreeWPC.
*
@@ -21,7 +21,9 @@
#include
extern U8 initials_enter_timer;
+#ifdef CONFIG_ENTER_PIN
extern U8 pin_enter_timer;
+#endif
extern U8 switch_stress_enable;
@@ -55,14 +57,18 @@ CALLSET_ENTRY (start_button, sw_start_button)
{
SECTION_VOIDCALL (__common__, initials_start_button_handler);
}
+#ifdef CONFIG_ENTER_PIN
else if (pin_enter_timer)
{
SECTION_VOIDCALL (__common__, pin_start_button_handler);
}
+#endif
+#ifdef CONFIG_TEST
else if (in_test)
{
SECTION_VOIDCALL (__test__, test_mode_start_button_handler);
}
+#endif
else
{
VOIDCALL (game_start_button_handler);
diff --git a/common/status.c b/common/status.c
index 88b7fe4d0..75449f7b1 100644
--- a/common/status.c
+++ b/common/status.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2006, 2007, 2008, 2009, 2010 by Brian Dominy
+ * Copyright 2006-2011 by Brian Dominy
*
* This file is part of FreeWPC.
*
@@ -33,6 +33,7 @@
U8 status_report_cancel_delay;
+#ifdef CONFIG_DMD_OR_ALPHA
void status_page_init (void)
{
dmd_alloc_low_clean ();
@@ -83,6 +84,7 @@ void status_report_deff (void)
deff_exit ();
}
+#endif
/** Task that is restarted anytime a flipper button is initially
* pressed. It polls the flipper switches continously to
diff --git a/common/tilt.c b/common/tilt.c
index d905a0ec0..4d9d1b4bb 100644
--- a/common/tilt.c
+++ b/common/tilt.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2006, 2007, 2008, 2009, 2010 by Brian Dominy
+ * Copyright 2006-2011 by Brian Dominy
*
* This file is part of FreeWPC.
*
@@ -35,63 +35,26 @@
/** The number of tilt warnings that have been issued on this ball. */
U8 tilt_warnings;
+/* A timer that allows tilt to settle during endball before
+ proceeding to the next ball. */
+free_timer_id_t tilt_ignore_timer;
+
/** Lamp effect function for a leff that turns all lights off.
* Used by the system-defined tilt function. */
-void no_lights_leff (void)
-{
+void no_lights_leff (void) {
for (;;)
task_sleep_sec (5);
}
-void tilt_warning_leff (void)
-{
+void tilt_warning_leff (void) {
task_sleep (TIME_500MS);
leff_exit ();
}
-/** The tilt display effect runs until explicitly cancelled. */
-void tilt_deff (void)
-{
- dmd_alloc_low_clean ();
- font_render_string_center (&font_cu17, 64, 13, "TILT");
- dmd_show_low ();
- for (;;)
- task_sleep_sec (10);
-}
-
-
-void tilt_warning_deff (void)
-{
- dmd_alloc_pair_clean ();
- if (tilt_warnings % 2)
- {
- font_render_string_center (&font_fixed10, 64, 16, "DANGER");
- }
- else
- {
- font_render_string_center (&font_fixed10, 64, 7, "DANGER");
- font_render_string_center (&font_fixed10, 64, 23, "DANGER");
- }
- deff_swap_low_high (24, TIME_66MS);
- deff_exit ();
-}
-
-
-void slam_tilt_deff (void)
-{
- dmd_alloc_low_clean ();
- font_render_string_center (&font_fixed10, 64, 13, "SLAM TILT");
- dmd_show_low ();
- task_sleep_sec (3);
- deff_exit ();
-}
-
-
-CALLSET_ENTRY (tilt, sw_tilt)
-{
+CALLSET_ENTRY (tilt, sw_tilt) {
extern U8 in_tilt;
/* Ignore tilt switch activity while already in tilt state.
@@ -99,14 +62,13 @@ CALLSET_ENTRY (tilt, sw_tilt)
* moving, so we can delay endball. */
if (in_tilt)
{
- free_timer_restart (TIM_IGNORE_TILT, TIME_2S);
+ free_timer_restart (tilt_ignore_timer, TIME_2S);
return;
}
/* IDEA : Disable tilt while a ball search is in progress? */
- else if (++tilt_warnings == system_config.tilt_warnings)
- {
+ else if (++tilt_warnings == system_config.tilt_warnings) {
/* Warnings exceeded... tilt the current ball */
sound_reset ();
#ifdef CONFIG_GI
@@ -114,15 +76,18 @@ CALLSET_ENTRY (tilt, sw_tilt)
#endif
deff_start (DEFF_TILT);
leff_start (LEFF_TILT);
- free_timer_restart (TIM_IGNORE_TILT, TIME_2S);
+ free_timer_restart (tilt_ignore_timer, TIME_2S);
in_tilt = TRUE;
+ set_valid_playfield ();
+ flipper_disable ();
+ callset_invoke (tilt);
task_remove_duration (TASK_DURATION_LIVE);
task_duration_expire (TASK_DURATION_LIVE);
- flipper_disable ();
- set_valid_playfield ();
audit_increment (&system_audits.tilts);
audit_increment (&system_audits.plumb_bob_tilts);
- callset_invoke (tilt);
+
+ //at this point ball should drain and bonus should take over
+ //and tilt condition will be reset below
}
else
{
@@ -136,6 +101,7 @@ CALLSET_ENTRY (tilt, sw_tilt)
CALLSET_ENTRY (tilt, sw_slam_tilt)
{
+#ifdef SW_COIN_DOOR_CLOSED
/* Ignore slam tilt switch entirely while coin door is open,
and configured for tournament mode. This is to avoid inadvertent slam tilts
while dealing with problems. */
@@ -145,6 +111,7 @@ CALLSET_ENTRY (tilt, sw_slam_tilt)
/* Ignore right after a coin door open/close */
if (nonball_event_did_follow (sw_coin_door_closed, sw_slam_tilt))
return;
+#endif
/* Kill the current game */
stop_game ();
@@ -164,15 +131,42 @@ CALLSET_ENTRY (tilt, sw_slam_tilt)
if (price_config.slamtilt_penalty)
remove_credit ();
- while (deff_get_active () == DEFF_SLAM_TILT)
- task_sleep (TIME_66MS);
+ /* Wait for the switch to clear before rebooting. */
+#ifdef SW_SLAM_TILT
+ task_sleep_sec (1);
+ for (;;)
+ {
+ task_sleep (TIME_500MS);
+ if (!switch_poll (SW_SLAM_TILT))
+ break;
+ }
+#endif
+ warm_reboot ();
+}
+
+
+CALLSET_ENTRY (tilt, bonus_complete) {
+ /* Clear the tilt flag. Note, this is not combined
+ with the above to handle tilt while bonus is running. */
+ if (in_tilt) {
+ /* Wait for tilt bob to settle */
+ while (free_timer_test (tilt_ignore_timer))
+ task_sleep (TIME_100MS);
- /* TODO: wait for slam switch to become stable, to avoid
- * endless restarts */
- warm_reboot ();
+ /* Cancel the tilt effects */
+#ifdef DEFF_TILT
+ deff_stop (DEFF_TILT);
+#endif
+#ifdef LEFF_TILT
+ leff_stop (LEFF_TILT);
+#endif
+ in_tilt = FALSE;
+ }
}
+
+
CALLSET_ENTRY (tilt, start_ball)
{
tilt_warnings = 0;
diff --git a/common/tournament.c b/common/tournament.c
index f553aab35..8ad03774f 100644
--- a/common/tournament.c
+++ b/common/tournament.c
@@ -31,30 +31,6 @@
U8 tournament_mode_enabled;
-void player_tournament_ready_deff (void)
-{
- U8 timer;
-
- dmd_alloc_low_clean ();
-#if (MACHINE_DMD == 1)
- font_render_string_center (&font_fixed6, 64, 5, "TOURNAMENT");
- font_render_string_center (&font_fixed6, 64, 16, "MODE ENABLED");
-#else
- font_render_string_center (&font_var5, 64, 5, "TOURNAMENT MODE");
-#endif
- font_render_string_center (&font_var5, 64, 28, "PRESS START NOW");
- dmd_show_low ();
-
- timer = 7;
- do {
- task_sleep_sec (1);
- } while (--timer != 0);
-
- tournament_mode_enabled = OFF;
- deff_exit ();
-}
-
-
void tournament_player_detect (void)
{
U8 hold = TIME_5S / TIME_100MS;
diff --git a/common/trough.c b/common/trough.c
index ab3312945..5ce6311d6 100644
--- a/common/trough.c
+++ b/common/trough.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2006-2010 by Brian Dominy
+ * Copyright 2006-2011 by Brian Dominy
*
* This file is part of FreeWPC.
*
diff --git a/conf/afm.conf b/conf/afm.conf
new file mode 100644
index 000000000..06618f858
--- /dev/null
+++ b/conf/afm.conf
@@ -0,0 +1,11 @@
+key a "MOTOR BANK 1"
+key s "MOTOR BANK 2"
+key d "MOTOR BANK 3"
+key f "LEFT TOP LANE"
+key g "RIGHT TOP LANE"
+key z "LEFT LOOP HIGH"
+key x "LEFT RAMP ENTER"
+key c "CENTER RAMP ENTER"
+key v "LEFT RAMP EXIT"
+key b "RIGHT RAMP EXIT"
+key n "RIGHT LOOP HIGH"
diff --git a/conf/corvette.conf b/conf/corvette.conf
new file mode 100644
index 000000000..7092c770b
--- /dev/null
+++ b/conf/corvette.conf
@@ -0,0 +1,13 @@
+key a "LEFT JET"
+key s "UPPER JET"
+key d "LOWER JET"
+key f "LEFT ROLLOVER"
+key g "MIDDLE ROLLOVER"
+key h "RIGHT ROLLOVER"
+key z "LEFT STANDUP 3"
+key x "LEFT STANDUP 2"
+key c "LEFT STANDUP 1"
+key v "LEFT OUTER LOOP"
+key b "ZR1 TOP ENTRY"
+key n "SKID PAD ENTRY"
+key m "RIGHT OUTER LOOP"
diff --git a/conf/min.conf b/conf/min.conf
new file mode 100644
index 000000000..6125fabda
--- /dev/null
+++ b/conf/min.conf
@@ -0,0 +1,3 @@
+key a TARGET
+#key , "LEFT FLIPPER"
+#key . "RIGHT FLIPPER"
diff --git a/config.example b/config.example
index f30e489fd..902ef3ecd 100644
--- a/config.example
+++ b/config.example
@@ -3,14 +3,30 @@
# If you don't already have a .config, you can rename this one
# and change anything you don't like.
#
+# Some features must be enabled using an "eval-call-have" command.
+# This ensures that the conditional is seen by makefiles, C
+# files, and assembly language files. Failure to do so may
+# cause features to be only partially enabled. There are
+# exceptions, for example, when a conditional is only needed
+# by the makefiles. Use this example config to guide you.
+#
+
-# If you want to simulate, define CONFIG_SIM. This builds a
-# program you can run on your build system instead of a ROM.
+# Parallel make will speed up compiles slightly. In general
+# the argument to -j should be the number of processors you have,
+# plus one.
+#MAKEFLAGS := -j2
+#MAKEFLAGS := -j3
+
+# If you want to simulate, enable CONFIG_SIM. This builds a
+# program you can run on your build system, instead of a ROM.
# You should also choose a UI for how the system will be displayed;
-# we recommended 'curses', but there is also 'console'.
-#CONFIG_SIM := y
+# 'curses' is the most complete, but there are alternatives.
+# $(eval $(call have,CONFIG_SIM))
#CONFIG_UI := curses
#CONFIG_UI := console
+#CONFIG_UI := sdl
+#CONFIG_UI := remote
# Set the machine you are trying to build.
# If you are primarily working with a single machine type, it is
@@ -22,7 +38,6 @@
#MACHINE := t2
#MACHINE := fh
#MACHINE := tester
-#MACHINE := tzsound
#MACHINE := tspp
#MACHINE := afm
#MACHINE := tom
@@ -32,23 +47,33 @@
#
# Set this to the directory in which MAME roms should be installed.
# If you don't have MAME, then you can leave this undefined.
+# If it is set, then by default, your newly compiled game ROM will
+# temporarily overwrite one of the PinMAME ROMs, so that running
+# PinMAME will test our version instead of the factory. Which ROM
+# gets overwritten is set in the machine's Makefile.
+#
+# To restore the factory ROM, run "make uninstall".
#
-# Under Cygwin use something like the following. make has trouble
-# with filenames that have spaces or colons in them.
+# Under Windows+Cygwin, use something like the following. make has
+# trouble with filenames that have spaces or colons in them.
#TARGET_ROMPATH := "/cygdrive/c/Progra~1/VPinmame/roms"
#
-# Set FREEWPC_DEBUGGER if you want to enable printf() statements throughout
-# the code. This will be written to the serial/parallel port.
+# Set FREEWPC_DEBUGGER if you want to enable dbprintf() statements throughout
+# the code. They will be written to the serial/parallel port. This requires
+# a patched PinMAME in order to view the messages. This has no effect in
+# a real machine. In simulation, these messages get written to a log file.
#
-#FREEWPC_DEBUGGER := y
+#$(eval $(call have,DEBUGGER))
#
# Enable CONFIG_BPT if you want to enable breakpoints. You can press
# Escape anytime and the non-interrupt driven part of the system will
-# pause, and you can inspect memory addresses.
+# pause, and you can inspect memory addresses. This also lets you
+# set breakpoints at specific adddresses. When enabled, this
+# automatically enables FREE ONLY.
#
-#CONFIG_BPT := y
+#$(eval $(call have,CONFIG_BPT))
#
@@ -63,17 +88,19 @@
# Set to the version of gcc6809 installed.
# The 4.3.x releases are recommended, although 4.2.x releases
-# should still work.
+# should still work. This option is ignored when simulating; your
+# local 'gcc' will be used instead.
#GCC_VERSION := 4.2.3
GCC_VERSION := 4.3.4
+#GCC_VERSION := 4.3.6
-# If you have special flags to pass to the compiler, define them here.
+# If you have other flags to pass to the compiler, define them here.
#EXTRA_CFLAGS += -save-temps
-#EXTRA_CFLAGS += -DCONFIG_DEBUG_STACK
-#EXTRA_CFLAGS += -DCONFIG_PARALLEL_DEBUG
+# $(eval $(call have,CONFIG_DEBUG_STACK))
#EXTRA_CFLAGS += -DFREE_ONLY
-# For debugging the compiler itself.
+# For debugging the compiler itself. Do not define this unless you
+# working on gcc6809.
#DEBUG_COMPILER := y
# vim: set filetype=make:
diff --git a/cpu/m6809/Makefile b/cpu/m6809/Makefile
index 03cffe3ea..f03acb1a2 100644
--- a/cpu/m6809/Makefile
+++ b/cpu/m6809/Makefile
@@ -31,10 +31,16 @@ CFLAGS += -DCONFIG_BPT
endif
# Optimization flags
-CFLAGS += -O2 -fomit-frame-pointer -fstrength-reduce -frerun-loop-opt -Wunknown-pragmas -foptimize-sibling-calls -fstrict-aliasing -fregmove -fgcse-after-reload -fgcse-sm -fgcse-las -ffreestanding
-CFLAGS += -DCONFIG_BIG_ENDIAN -DHAVE_FASTRAM_ATTRIBUTE
+CFLAGS += -O2 -fstrength-reduce -frerun-loop-opt -Wunknown-pragmas -foptimize-sibling-calls -fstrict-aliasing -fregmove -fgcse-after-reload -fgcse-sm -fgcse-las -ffreestanding
+CFLAGS += -DCONFIG_BIG_ENDIAN
# TODO : should -funroll-loops be given?
CFLAGS += $(if $(CONFIG_MALLOC), -DCONFIG_MALLOC)
+ifeq ($(CONFIG_PROFILE),y)
+CFLAGS += -pg
+else
+CFLAGS += -fomit-frame-pointer
+endif
+
# Which version of the 6809 compiler to use by default.
# This is the minimum available version. More often than not,
@@ -49,6 +55,41 @@ KERNEL_ASM_OBJS += $(if $(CONFIG_TASK), $(C)/task_6809.o)
KERNEL_BASIC_OBJS += $(if $(CONFIG_MALLOC), $(C)/malloc.o)
KERNEL_ASM_OBJS += $(C)/string.o
KERNEL_ASM_OBJS += $(C)/bcd_string.o
-KERNEL_ASM_OBJS += $(C)/irqload.o
+KERNEL_ASM_OBJS += $(if $(CONFIG_TEST), $(C)/irqload.o)
KERNEL_ASM_OBJS += $(C)/div32.o
+KERNEL_ASM_OBJS += $(if $(CONFIG_PROFILE), $(C)/mcount.o)
KERNEL_ASM_OBJS += $(if $(CONFIG_BPT), $(C)/breakpoint.o)
+KERNEL_ASM_OBJS += $(C)/section.o
+
+.PHONY : run
+run:
+ # Start pinmame up and let it run indefinitely.
+ $(PINMAME) $(PINMAME_MACHINE) $(PINMAME_FLAGS) &
+
+.PHONY : debug
+debug:
+ # Start pinmame up and let it run indefinitely.
+ $(PINMAME) $(PINMAME_MACHINE) -d $(PINMAME_FLAGS) &
+
+.PHONY : rund
+rund: run $(DBCON)
+ xterm -e "$(DBCON) -1" &
+
+.PHONY : rund-file
+rund-file: run $(DBCON)
+ xterm -e "$(DBCON) -1 > $(DBCON_FILE) 2>&1" &
+
+.PHONY : endrun
+endrun :
+ kill $(shell pidof $(PINMAME))
+
+.PHONY : timedrun
+timedrun:
+ $(MAKE) rund-file DBCON_FILE="test.log"
+ sleep 30
+ $(MAKE) endrun
+
+.PHONY : runcon
+runcon: $(BLDDIR)/$(GAME_ROM)
+ wpc-run $(BLDDIR)/$(GAME_ROM)
+
diff --git a/cpu/m6809/bcd_string.s b/cpu/m6809/bcd_string.s
index 55a3756ce..71f85d8ec 100644
--- a/cpu/m6809/bcd_string.s
+++ b/cpu/m6809/bcd_string.s
@@ -1,5 +1,5 @@
/*
- * Copyright 2009, 2010 Brian Dominy
+ * Copyright 2009, 2010, 2011 Brian Dominy
*
* This file is part of FreeWPC.
*
diff --git a/cpu/m6809/mcount.s b/cpu/m6809/mcount.s
new file mode 100644
index 000000000..fad088f5a
--- /dev/null
+++ b/cpu/m6809/mcount.s
@@ -0,0 +1,34 @@
+;;;
+;;; Copyright 2011 by Brian Dominy
+;;;
+;;; This file is part of FreeWPC.
+;;;
+;;; FreeWPC is free software; you can redistribute it and/or modify
+;;; it under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 2 of the License, or
+;;; (at your option) any later version.
+;;;
+;;; FreeWPC is distributed in the hope that it will be useful,
+;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with FreeWPC; if not, write to the Free Software
+;;; Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+;;;
+
+.module mcount
+
+; This module is linked in when CONFIG_PROFILE is enabled. This
+; causes gcc to insert a call to "_mcount" at the top of every C
+; function. This gives us the ability to do runtime profiling.
+
+.area .text
+
+_mcount::
+#if defined(CONFIG_PROFILE_BPT) && defined(CONFIG_BPT)
+ jsr *bpt_handler
+#endif
+ rts
+
diff --git a/cpu/m6809/section.s b/cpu/m6809/section.s
new file mode 100644
index 000000000..ef560a854
--- /dev/null
+++ b/cpu/m6809/section.s
@@ -0,0 +1,27 @@
+;;; Copyright 2011 by Brian Dominy
+;;;
+;;; This file is part of FreeWPC.
+;;;
+;;; FreeWPC is free software; you can redistribute it and/or modify
+;;; it under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 2 of the License, or
+;;; (at your option) any later version.
+;;;
+;;; FreeWPC is distributed in the hope that it will be useful,
+;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with FreeWPC; if not, write to the Free Software
+;;; Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+;;;
+
+.area .flag
+.area .globalflag
+.area .freetimer
+
+.bank registers
+.area registers (BANK=registers)
+.area timedmodes (BANK=registers)
+.area mbmodes (BANK=registers)
diff --git a/cpu/m6809/string.s b/cpu/m6809/string.s
index d64be258f..151154fa1 100644
--- a/cpu/m6809/string.s
+++ b/cpu/m6809/string.s
@@ -119,16 +119,27 @@ _memcpy:
ldu 4,s ; source pointer
ldd 6,s ; number of bytes
- ; Calculate the number of 16 byte blocks that can be copied fast.
+ ; If less than 16 bytes, then skip the large block copy completely.
+ cmpd #16
+ blt __memcpy_small
+
+ ; Save Y register for block loop
+ sty *m2
+
+ ; Calculate the number of 16 byte blocks to copy.
+ lsrb
+ lsrb
+ lsrb
+ lsrb
+ stb *m0
+ tsta
+ beq __memcpy_large
lsra
- rorb
lsra
- rorb
lsra
- rorb
lsra
- rorb
- beq __memcpy_small
+ adda *m0
+ sta *m0
; Copy the 16 byte blocks first.
; Put this into m0 so decrement sets the condition codes.
@@ -137,8 +148,6 @@ _memcpy:
; we never copy more than that.
; Also save/restore Y register which is needed in this loop.
- stb *m0
- sty *m2
__memcpy_large:
pulu d,y
std ,x
diff --git a/cpu/m6809/task.c b/cpu/m6809/task.c
index ad2af9bf9..d3b08882d 100644
--- a/cpu/m6809/task.c
+++ b/cpu/m6809/task.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2006-2010 by Brian Dominy
+ * Copyright 2006-2011 by Brian Dominy
*
* This file is part of FreeWPC.
*
@@ -227,10 +227,12 @@ void task_dump (void)
malloc_chunk_dump (tp);
}
#endif
+#ifdef CONFIG_EXPAND_STACK
else if (tp->state & BLOCK_STACK)
{
dbprintf ("aux stack\n");
}
+#endif
else
{
dbprintf ("???\n");
@@ -441,31 +443,6 @@ task_t *task_create_gid (task_gid_t gid, task_function_t fn)
}
-/** Create a task, but not if a task with the same GID already exists.
- * The previous task will continue to run. */
-task_t *task_create_gid1 (task_gid_t gid, task_function_t fn)
-{
- task_t *tp = task_find_gid (gid);
- if (tp)
- return (tp);
- return task_create_gid (gid, fn);
-}
-
-
-/** Create a task with a given GID, ensuring that only one task
- * with that GID exists. Any tasks with the same GID are killed
- * prior to starting the new task. */
-task_t *task_recreate_gid (task_gid_t gid, task_function_t fn)
-{
- task_kill_gid (gid);
-#ifdef PARANOID
- if (task_find_gid (gid))
- fatal (ERR_TASK_KILL_FAILED);
-#endif
- return task_create_gid (gid, fn);
-}
-
-
/** Change the GID of the currently running task */
void task_setgid (task_gid_t gid)
{
@@ -694,16 +671,6 @@ void task_set_pointer_arg (task_t *tp, void *arg)
}
-/** Allocate stack size from another task. This should only be
-called immediately after the task is created before it gets a chance
-to run. */
-void *task_alloca (task_t *tp, U8 size)
-{
- tp->stack_size += size;
- return &tp->stack[TASK_STACK_SIZE - tp->stack_size];
-}
-
-
/**
* The task dispatcher. This function selects a new task to run.
*
@@ -746,7 +713,7 @@ void task_dispatcher (task_t *tp)
{
/* Call the debugger. This is not implemented as a true
'idle' event below because it should _always_ be called,
- even when 'sys_init_complete' is not true. This lets us
+ even when 'periodic_ok' is not true. This lets us
debug very early initialization. */
db_periodic ();
diff --git a/cpu/m6809/task_6809.s b/cpu/m6809/task_6809.s
index e7efabc1c..377f1d7fc 100644
--- a/cpu/m6809/task_6809.s
+++ b/cpu/m6809/task_6809.s
@@ -1,5 +1,5 @@
;;;
-;;; Copyright 2006-2010 by Brian Dominy
+;;; Copyright 2006-2011 by Brian Dominy
;;;
;;; This file is part of FreeWPC.
;;;
@@ -171,8 +171,6 @@ _stack_large_error:
stb ,x+
clr ,x
jsr _dbprintf1
- cmps #STACK_BASE
- blt _stack_large_error
#endif
ldb #ERR_TASK_STACK_OVERFLOW
jmp _fatal
@@ -204,8 +202,8 @@ _task_restore:
; Compute the number of extra bytes that were saved
; for adjusting the stack pointer
- pshs b
- suba ,s+
+ stb *m0
+ suba *m0
nega
; Set the destination address
@@ -282,6 +280,7 @@ _task_create:
puls u,pc
+#ifdef CONFIG_TASK_FORK
;-----------------------------------------------------
; task_fork - an implementation of the UNIX fork()
; system call. It is similar to task_create,
@@ -334,6 +333,7 @@ _task_fork_entry:
ldx UREG_SAVE_OFF,x
clrb
jmp ,x
+#endif /* CONFIG_TASK_FORK */
;-----------------------------------------------------
diff --git a/cpu/m6809/vector.c b/cpu/m6809/vector.c
index b40184e22..be817eec3 100644
--- a/cpu/m6809/vector.c
+++ b/cpu/m6809/vector.c
@@ -38,12 +38,6 @@ extern void do_swi (void);
extern void do_nmi (void);
#endif
-#ifdef CONFIG_PLATFORM_WPCSOUND
-extern void wpcs_invalid_interrupt (void);
-extern void wpcs_host_interrupt (void);
-extern void wpcs_periodic_interrupt (void);
-#endif
-
/** The 6809 vector table structure */
typedef struct
{
@@ -86,15 +80,6 @@ __attribute__((section("vector"))) m6809_vector_table_t vectors = {
/* NMI also shouldn't happen, but log it if it does. */
.nmi = do_nmi,
-#endif
-#ifdef CONFIG_PLATFORM_WPCSOUND
- .unused = wpcs_invalid_interrupt,
- .swi3 = wpcs_invalid_interrupt,
- .swi2 = wpcs_invalid_interrupt,
- .irq = wpcs_host_interrupt,
- .firq = wpcs_periodic_interrupt,
- .swi = wpcs_invalid_interrupt,
- .nmi = wpcs_invalid_interrupt,
#endif
.reset = start,
};
diff --git a/cpu/native/Makefile b/cpu/native/Makefile
index aa86610b2..7422263dc 100644
--- a/cpu/native/Makefile
+++ b/cpu/native/Makefile
@@ -1,15 +1,27 @@
+ifndef NATIVE_OBJS
# Root directory for native mode compiler.
CPU := native
C := cpu/$(CPU)
+GCC_ROOT ?= /usr/bin
+GCC_CROSS ?=
+CC := $(GCC_ROOT)/$(GCC_CROSS)gcc
+AS := $(CC) -xassembler-with-cpp
+LD := $(GCC_ROOT)/$(GCC_CROSS)gcc
+REQUIRED += $(CC) $(LD)
+
GCC_VERSION = NATIVE
CFLAGS =
+HOST_LFLAGS += -Wl,-Map=build/freewpc.map
+HOST_LFLAGS += -Wl,--section-start=.globalflag=0x8100000
+HOST_LFLAGS += -Wl,--section-start=.flag=0x8100100
+HOST_LFLAGS += -Wl,--section-start=.freetimer=0x8100200
# TODO : don't define CONFIG_LITTLE_ENDIAN on sparc, etc.
# Additional CFLAGS required for a native build
-CFLAGS += -O -g -DCONFIG_NATIVE -DCONFIG_LITTLE_ENDIAN
+CFLAGS += -O -g -DCONFIG_NATIVE -DCONFIG_LITTLE_ENDIAN -DMACHINE_SHORTNAME=\"$(MACHINE)\"
HOST_LIBS += -lm
@@ -20,6 +32,11 @@ CFLAGS += $(PTH_CFLAGS)
NATIVE_OBJS += $(C)/task_pth.o
endif
+ifeq ($(CONFIG_PTHREADS),y)
+HOST_LIBS += -lpthread
+NATIVE_OBJS += $(C)/task_pthread.o
+endif
+
ifeq ($(CONFIG_NATIVE_PROFILE),y)
CFLAGS += -pg
HOST_LFLAGS += -pg
@@ -32,6 +49,7 @@ endif
ifeq ($(CONFIG_UI), curses)
CFLAGS += -DCONFIG_UI -DCURSES
+CFLAGS += -I$(shell ncurses5-config --includedir)
HOST_LIBS += -lncurses
NATIVE_OBJS += $(D)/ui_curses.o
endif
@@ -53,8 +71,42 @@ CFLAGS += -DCONFIG_UI -DCONFIG_UI_REMOTE
NATIVE_OBJS += $(D)/ui_remote.o
endif
-ifeq ($(CONFIG_SOFT_REALTIME), y)
-NATIVE_OBJS += $(C)/realtime.o
+ifeq ($(CONFIG_UI), sdl)
+CFLAGS += -DCONFIG_UI -DCONFIG_UI_SDL
+UI_CFLAGS += $(shell sdl-config --cflags)
+HOST_LIBS += $(shell sdl-config --libs) -lSDL_ttf
+NATIVE_OBJS += $(D)/ui_sdl.o
+endif
+
+ifeq ($(CONFIG_LINUX_GPIO),y)
+NATIVE_OBJS += $(C)/gpio.o
+endif
+
+ifeq ($(CONFIG_LINUX_INPUT),y)
+NATIVE_OBJS += $(C)/input.o
endif
NATIVE_OBJS += $(C)/bits.o
+NATIVE_OBJS += $(C)/bcd_string.o
+NATIVE_OBJS += $(C)/log.o
+NATIVE_OBJS += $(C)/main.o
+NATIVE_OBJS += $(C)/realtime.o
+NATIVE_OBJS += $(C)/section.o
+
+# For Ubuntu 8.10 and higher: The default compiler flags will try to
+# detect buffer overflows, but we are doing ugly things to read/write
+# persistent memory. We need to disable this 'feature' for this file
+# only.
+$(C)/section.o : CFLAGS += -U_FORTIFY_SOURCE
+
+.PHONY : run
+run: $(NATIVE_PROG)
+ $(NATIVE_PROG)
+
+# Invoke 'make attach' to start up a GDB session that attaches itself to
+# a running instance of the native mode program.
+.PHONY : attach
+attach:
+ gdb -p `ps -ef | grep $(NATIVE_PROG) | head -n 1 | grep -o "[0-9].*" | awk '{print $$1}'` -x gdbmacros
+
+endif
diff --git a/sim/bcd_string.c b/cpu/native/bcd_string.c
similarity index 100%
rename from sim/bcd_string.c
rename to cpu/native/bcd_string.c
diff --git a/cpu/native/gpio.c b/cpu/native/gpio.c
new file mode 100644
index 000000000..8de3f3516
--- /dev/null
+++ b/cpu/native/gpio.c
@@ -0,0 +1,244 @@
+#include
+#include
+#include
+#include "native/gpio.h"
+
+#define CONFIG_BEAGLEBONE
+
+#ifdef CONFIG_BEAGLEBONE
+
+#define MAX_GPIOS 128
+#define MAX_LEDS 4
+
+char gpio_file_name[128];
+
+struct gpio
+{
+ const char *mux;
+ FILE *value_fd;
+ unsigned short connector;
+ unsigned short pin;
+};
+
+#define P8(p) .connector = 8, .pin = p
+#define P9(p) .connector = 9, .pin = p
+
+struct gpio gpio_table[MAX_GPIOS] =
+{
+ [GPID(1,6)] = { .mux = "gpmc_ad6", P8(3) },
+ [GPID(1,7)] = { .mux = "gpmc_ad7", P8(4) },
+ [GPID(1,2)] = { .mux = "gpmc_ad2", P8(5) },
+ [GPID(1,3)] = { .mux = "gpmc_ad3", P8(6) },
+ [GPID(1,13)] = { .mux = "gpmc_ad13", P8(11) },
+ [GPID(1,12)] = { .mux = "gpmc_ad12", P8(12) },
+ [GPID(0,23)] = { .mux = "gpmc_ad9", P8(13) },
+ [GPID(0,26)] = { .mux = "gpmc_ad10", P8(14) },
+ [GPID(1,15)] = { .mux = "gpmc_ad15", P8(15) },
+ [GPID(1,14)] = { .mux = "gpmc_ad14", P8(16) },
+ [GPID(0,27)] = { .mux = "gpmc_ad11", P8(17) },
+ [GPID(2,1)] = { .mux = "gpmc_clk", P8(18) },
+ [GPID(1,31)] = { .mux = "gpmc_csn2", P8(20) },
+ [GPID(1,30)] = { .mux = "gpmc_csn1", P8(21) },
+ [GPID(1,5)] = { .mux = "gpmc_ad5", P8(22) },
+ [GPID(1,4)] = { .mux = "gpmc_ad4", P8(23) },
+ [GPID(1,1)] = { .mux = "gpmc_ad1", P8(24) },
+ [GPID(1,0)] = { .mux = "gpmc_ad0", P8(25) },
+ [GPID(1,29)] = { .mux = "gpmc_csn0", P8(26) },
+ [GPID(2,22)] = { .mux = "lcd_vsync", P8(27) },
+ [GPID(2,24)] = { .mux = "lcd_pclk", P8(28) },
+ [GPID(2,23)] = { .mux = "lcd_hsync", P8(29) },
+ [GPID(2,25)] = { .mux = "lcd_ac_bias_en", P8(30) },
+ [GPID(2,12)] = { .mux = "lcd_data6", P8(39) },
+ [GPID(2,13)] = { .mux = "lcd_data7", P8(40) },
+ [GPID(2,10)] = { .mux = "lcd_data4", P8(41) },
+ [GPID(2,11)] = { .mux = "lcd_data5", P8(42) },
+ [GPID(2,8)] = { .mux = "lcd_data2", P8(43) },
+ [GPID(2,9)] = { .mux = "lcd_data3", P8(44) },
+ [GPID(2,6)] = { .mux = "lcd_data0", P8(45) },
+ [GPID(2,7)] = { .mux = "lcd_data1", P8(46) },
+ [GPID(1,28)] = { .mux = "gpmc_ben1", P9(12) },
+ [GPID(1,16)] = { .mux = "mii1_rxd3", P9(15) },
+ [GPID(1,17)] = { .mux = "gpmc_a1", P9(23) },
+ [GPID(3,21)] = { .mux = "mcasp0_ahclkx", P9(25) },
+ [GPID(3,19)] = { .mux = "mcasp0_fsr", P9(27) },
+ [GPID(0,7)] = { .mux = "", P9(42) },
+};
+
+#endif /* CONFIG_BEAGLEBONE */
+
+
+FILE *led_files[MAX_LEDS];
+
+static FILE *gpio_data_file (gpio_id_t gpio)
+{
+ struct gpio *gp = gpio_table + gpio;
+ if (gp->value_fd == 0)
+ {
+ sprintf (gpio_file_name, "/sys/class/gpio/gpio%d/value", gpio);
+ gp->value_fd = fopen (gpio_file_name, "w");
+ }
+ return gp->value_fd;
+}
+
+static FILE *led_data_file (int led)
+{
+ if (led_files[led] == NULL)
+ {
+ sprintf (gpio_file_name,
+ "/sys/class/leds/beaglebone::usr%d/brightness", led);
+ led_files[led] = fopen (gpio_file_name, "w");
+ }
+ return led_files[led];
+}
+
+int gpio_request (gpio_id_t gpio)
+{
+ FILE *fp = fopen ("/sys/class/gpio/export", "w");
+ if (fp == NULL)
+ return -1;
+ fprintf (fp, "%d", gpio);
+ fclose (fp);
+ return 0;
+}
+
+int gpio_config (gpio_id_t gpio)
+{
+ struct gpio *gp;
+ if (gpio >= MAX_GPIOS)
+ return -1;
+ gp = gpio_table + gpio;
+ if (!gp->mux)
+ return -1;
+ sprintf (gpio_file_name, "/sys/kernel/debug/omap_mux/%s", gp->mux);
+ FILE *fp = fopen (gpio_file_name, "w");
+ if (!fp)
+ return -1;
+ fprintf (fp, "7");
+ fclose (fp);
+ return 0;
+}
+
+int gpio_set_direction (gpio_id_t gpio, const char *direction)
+{
+ sprintf (gpio_file_name, "/sys/class/gpio/gpio%d/direction", gpio);
+ FILE *fp = fopen (gpio_file_name, "w");
+ if (!fp)
+ return -1;
+ fprintf (fp, "%s", direction);
+ fclose (fp);
+ return 0;
+}
+
+int gpio_read (gpio_id_t gpio)
+{
+ FILE *fp = gpio_data_file (gpio);
+ return 0;
+}
+
+int gpio_write (gpio_id_t gpio, int value)
+{
+ FILE *fp = gpio_data_file (gpio);
+ if (fp == NULL)
+ return -1;
+ fputc (value + '0', fp);
+ fputc ('\n', fp);
+ fflush (fp);
+ return 0;
+}
+
+int gpio_write_led (int led, int value)
+{
+ FILE *fp = led_data_file (led);
+ if (fp == NULL)
+ return -1;
+ fputc (value + '0', fp);
+ fputc ('\n', fp);
+ fflush (fp);
+ return 0;
+}
+
+int gpio_release (gpio_id_t gpio)
+{
+ FILE *fp = fopen ("/sys/class/gpio/unexport", "w");
+ if (fp == NULL)
+ return -1;
+ fprintf (fp, "%d", gpio);
+ fclose (fp);
+ return 0;
+}
+
+int gpio_request_input (gpio_id_t gpio)
+{
+ int rc;
+ if ((rc = gpio_request (gpio)) < 0)
+ return rc;
+ if ((rc = gpio_config (gpio)) < 0)
+ return rc;
+ return gpio_set_direction (gpio, "in");
+}
+
+int gpio_request_output (gpio_id_t gpio)
+{
+ int rc;
+ if ((rc = gpio_request (gpio)) < 0)
+ return rc;
+ if ((rc = gpio_config (gpio)) < 0)
+ return rc;
+ return gpio_set_direction (gpio, "out");
+}
+
+#ifdef TESTME
+void sigterm_handler (int signum)
+{
+ gpio_release (71);
+}
+
+int main (void)
+{
+ int c;
+ gpio_id_t g;
+ int i;
+
+ signal (SIGTERM, sigterm_handler);
+ signal (SIGILL, sigterm_handler);
+ signal (SIGKILL, sigterm_handler);
+ signal (SIGSEGV, sigterm_handler);
+
+ for (g=0; g < MAX_GPIOS; g = (g+1) % MAX_GPIOS)
+ {
+ struct gpio *gp = gpio_table + g;
+
+ if (gp->mux == NULL || gp->connector == 0 || gp->connector == 0)
+ continue;
+ printf ("GPIO %d", g);
+ printf (" P%d-%d\n", gp->connector, gp->pin);
+
+ if (gpio_request_output (g) < 0)
+ {
+ printf ("error: could not request GPIO\n");
+ }
+
+repeat: for (i=0; i < 5; i++)
+ {
+ if (gpio_write (g, 1) < 0)
+ {
+ printf ("error: could not write GPIO\n");
+ break;
+ }
+ usleep (500000);
+ gpio_write (g, 0);
+ usleep (500000);
+ }
+
+what_now:
+ printf ("(r)epeat, (n)ext");
+ c = getchar ();
+ if (c == 'r')
+ goto repeat;
+ else if (c == 'n')
+ continue;
+ else
+ goto what_now;
+ }
+}
+#endif /* TESTME */
diff --git a/cpu/native/input.c b/cpu/native/input.c
new file mode 100644
index 000000000..6326075ac
--- /dev/null
+++ b/cpu/native/input.c
@@ -0,0 +1,36 @@
+
+#include
+#include
+#include
+#include
+
+/** Turn on/off keybuffering. Pass a zero to put the
+console in raw mode, so keystrokes are not echoed.
+Pass nonzero flag to go back to the default mode. */
+int posix_input_config (int fd, int buffering)
+{
+ struct termios tio;
+ char buf;
+ tcgetattr (fd, &tio);
+ if (!buffering) /* 0 = no buffering = not default */
+ {
+ tio.c_lflag &= ~ICANON;
+ tio.c_cc[VTIME] = 0;
+ tio.c_cc[VMIN] = 0;
+ }
+ else /* 1 = buffering = default */
+ tio.c_lflag |= ICANON;
+ tcsetattr (fd, TCSANOW, &tio);
+ return 0;
+}
+
+
+int posix_input_poll (int fd)
+{
+ char buf;
+ ssize_t res = read (fd, &buf, 1);
+ if (res <= 0)
+ return res;
+ return buf;
+}
+
diff --git a/cpu/native/log.c b/cpu/native/log.c
new file mode 100644
index 000000000..1389b08a9
--- /dev/null
+++ b/cpu/native/log.c
@@ -0,0 +1,16 @@
+#include
+#include
+
+void print_log (const char *format, ...)
+{
+ va_list ap;
+ char buf[256];
+
+ va_start (ap, format);
+ vsprintf (buf, format, ap);
+ va_end (ap);
+
+ fprintf (stdout, "%s", buf);
+ fflush (stdout);
+}
+
diff --git a/cpu/native/main.c b/cpu/native/main.c
new file mode 100644
index 000000000..112d2c2ce
--- /dev/null
+++ b/cpu/native/main.c
@@ -0,0 +1,24 @@
+
+#ifndef CONFIG_SIM
+void native_init (void)
+{
+ protected_memory_load ();
+}
+
+void native_exit (void)
+{
+ protected_memory_save ();
+}
+
+int main (void)
+{
+ native_init ();
+ freewpc_init ();
+ return 0;
+}
+#endif
+
+void puts_default (const char *s)
+{
+ printf ("%s\n", s);
+}
diff --git a/cpu/native/realtime.c b/cpu/native/realtime.c
index 6eac32ff7..38a918386 100644
--- a/cpu/native/realtime.c
+++ b/cpu/native/realtime.c
@@ -21,8 +21,14 @@
#include
#include
#include
+#include
#include
+bool linux_irq_enable;
+bool linux_firq_enable;
+extern void do_firq (void);
+extern void do_irq (void);
+
/**
* A counter that represents the simulation time, in milliseconds.
@@ -38,6 +44,55 @@ unsigned long realtime_read (void)
return realtime_counter;
}
+/** Realtime callback function.
+ *
+ * This event simulates an elapsed 1ms.
+ */
+void realtime_tick (void)
+{
+#define FIRQ_FREQ 8
+#define PERIODIC_FREQ 16
+
+ static unsigned long next_firq_time = FIRQ_FREQ;
+ static unsigned long next_periodic_time = PERIODIC_FREQ;
+
+#ifdef CONFIG_SIM
+ /* Update all of the simulator modules that need periodic processing */
+ sim_time_step ();
+#endif
+
+ /* Simulate an IRQ every 1ms */
+ if (linux_irq_enable)
+ {
+#ifdef CONFIG_GEN_RTT
+ exec_rtt ();
+#else
+ tick_driver ();
+#endif
+ }
+
+#ifdef CONFIG_FIRQ
+ /* Simulate an FIRQ every 8ms */
+ if (linux_firq_enable)
+ {
+ while (realtime_read () >= next_firq_time)
+ {
+ do_firq ();
+ next_firq_time += FIRQ_FREQ;
+ }
+ }
+#endif
+
+ /* Call periodic processes every 16ms */
+ if (realtime_read () >= next_periodic_time)
+ {
+ db_periodic ();
+ if (likely (periodic_ok))
+ do_periodic ();
+ next_periodic_time += PERIODIC_FREQ;
+ }
+}
+
/**
* Implement a realtime loop on a non-realtime OS.
@@ -76,8 +131,10 @@ void realtime_loop (void)
int usecs_asked = 1000 - usecs_elapsed - 100;
if (usecs_asked > 0)
{
-#ifdef CONFIG_PTH
+#if defined(CONFIG_PTH)
pth_nap (pth_time (0, usecs_asked));
+#elif defined(CONFIG_PTHREADS)
+ usleep (usecs_asked);
#else
#error "No thread library supported for realtime yet"
#endif
@@ -96,8 +153,8 @@ void realtime_loop (void)
/* This is for debugging only to see how good your native OS is.
Print a message when the latency is more than 0.5ms than we requested . */
latency = usecs_elapsed - usecs_asked;
- if (latency > 500)
- simlog (SLC_DEBUG, "latency %d usec", latency);
+ if (latency > 200)
+ print_log ("latency %d usec\n", latency);
#endif
prev_time = curr_time;
@@ -105,14 +162,18 @@ void realtime_loop (void)
So if we slept < 1ms (either the OS lied to us, or we didn't sleep at all),
we'll make forward progress. */
realtime_counter++;
- callset_invoke (realtime_tick);
+ realtime_tick ();
usecs_elapsed -= usecs_asked;
+ if (usecs_elapsed > 20000)
+ {
+ }
+
/* If any remaining millseconds occurred during the wait, handle them */
while (usecs_elapsed >= 1000)
{
realtime_counter++;
- callset_invoke (realtime_tick);
+ realtime_tick ();
usecs_elapsed -= 1000;
}
diff --git a/sim/section.c b/cpu/native/section.c
similarity index 67%
rename from sim/section.c
rename to cpu/native/section.c
index e297dbb1b..82052cbee 100644
--- a/sim/section.c
+++ b/cpu/native/section.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2007, 2008 by Brian Dominy
+ * Copyright 2007-2011 by Brian Dominy
*
* This file is part of FreeWPC.
*
@@ -7,36 +7,31 @@
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
- *
+ *
* FreeWPC is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with FreeWPC; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include
-#include
#undef sprintf
+#include
/**
* \file
* \brief Implements protected memory for native mode.
- *
+ *
* Protected memory variables can be detected because they reside in a special
* section of the output file (in much the same way that the 6809 compile does
* it). The entire block of RAM can be read from/written to a file to
* provide persistence.
*/
-extern char *__start_protected, *__stop_protected;
-extern char *__start_nvram, *__stop_nvram;
-extern char *__start_local, *__stop_local;
-
-
/** The name of the backing file */
char protected_memory_file[256] = "nvram/default.nv";
@@ -44,23 +39,23 @@ char protected_memory_file[256] = "nvram/default.nv";
/** Load the contents of the protected memory from file to RAM. */
void protected_memory_load (void)
{
- int size = (int)&__stop_nvram - (int)&__start_nvram;
+ int size = AREA_SIZE(nvram);
FILE *fp;
/* Use a different file for each machine */
sprintf (protected_memory_file, "nvram/%s.nv", MACHINE_SHORTNAME);
- simlog (SLC_DEBUG, "Loading protected memory from '%s'", protected_memory_file);
+ print_log ("Loading protected memory from '%s'\n", protected_memory_file);
fp = fopen (protected_memory_file, "r");
if (fp)
{
- fread (&__start_nvram, 1, size, fp);
+ fread (AREA_BASE(nvram), 1, size, fp);
fclose (fp);
}
else
{
- simlog (SLC_DEBUG, "Error loading memory, using defaults\n");
- memset (&__start_nvram, 0, size);
+ print_log ("Error loading memory, using defaults\n");
+ memset (AREA_BASE(nvram), 0, size);
}
}
@@ -68,23 +63,23 @@ void protected_memory_load (void)
/** Save the contents of the protected memory from RAM to a file. */
void protected_memory_save (void)
{
- int size = (int)&__stop_nvram - (int)&__start_nvram;
+ int size = AREA_SIZE(nvram);
FILE *fp;
- simlog (SLC_DEBUG, "Saving 0x%X bytes of protected memory to %s", size, protected_memory_file);
+ print_log ("Saving 0x%X bytes of protected memory to %s\n", size, protected_memory_file);
fp = fopen (protected_memory_file, "w");
if (fp)
{
- if (fwrite (&__start_nvram, 1, size, fp) < size)
+ if (fwrite (AREA_BASE(nvram), 1, size, fp) < size)
{
- simlog (SLC_DEBUG, "Warning: could not save all of memory\n");
+ print_log ("Warning: could not save all of memory\n");
task_sleep_sec (1);
}
fclose (fp);
}
else
{
- simlog (SLC_DEBUG, "Warning: could not write to memory file\n");
+ print_log ("Warning: could not write to memory file\n");
task_sleep_sec (1);
}
}
diff --git a/cpu/native/task_pth.c b/cpu/native/task_pth.c
index cb30f87fe..8423ed6d7 100644
--- a/cpu/native/task_pth.c
+++ b/cpu/native/task_pth.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2006-2010 by Brian Dominy
+ * Copyright 2006-2011 by Brian Dominy
*
* This file is part of FreeWPC.
*
@@ -44,9 +44,7 @@ extern int linux_irq_multiplier;
#define PTH_USECS_PER_TICK (16000 / linux_irq_multiplier)
-#ifdef CONFIG_UI
extern void ui_write_task (int, task_gid_t);
-#endif
/* Some WPC per-task data must be stored separately, outside of the pth
* context. The aux_task_data_t structure holds this. */
@@ -64,8 +62,8 @@ aux_task_data_t task_data_table[NUM_TASKS];
void task_dump (void)
{
+#ifdef DEBUGGER
int i;
-
dbprintf ("PID GID ARG FLAGS\n");
for (i=0; i < NUM_TASKS; i++)
{
@@ -79,6 +77,7 @@ void task_dump (void)
td->gid, td->arg.u16, td->duration);
}
}
+#endif
}
@@ -127,36 +126,13 @@ task_pid_t task_create_gid (task_gid_t gid, task_function_t fn)
task_data_table[i].duration = TASK_DURATION_INF;
task_data_table[i].arg.u16 = 0;
task_data_table[i].duration = TASK_DURATION_BALL;
-#ifdef CONFIG_UI
ui_write_task (i, gid);
-#endif
return (pid);
}
fatal (ERR_NO_FREE_TASKS);
}
-/* TODO - this function is identical to the 6809 version */
-task_pid_t task_create_gid1 (task_gid_t gid, task_function_t fn)
-{
- task_pid_t tp = task_find_gid (gid);
- if (tp)
- return (tp);
- return task_create_gid (gid, fn);
-}
-
-
-/* TODO - this function is identical to the 6809 version */
-task_pid_t task_recreate_gid (task_gid_t gid, task_function_t fn)
-{
- task_kill_gid (gid);
-#ifdef PARANOID
- if (task_find_gid (gid))
- fatal (ERR_TASK_KILL_FAILED);
-#endif
- return task_create_gid (gid, fn);
-}
-
void task_setgid (task_gid_t gid)
{
int i;
@@ -177,14 +153,9 @@ void task_sleep (task_ticks_t ticks)
}
-/* TODO - this function is identical to the 6809 version */
void task_sleep_sec1 (U8 secs)
{
- while (secs > 0)
- {
- task_sleep (TIME_1S);
- secs--;
- }
+ pth_nap (pth_time (0, secs * TIME_1S * PTH_USECS_PER_TICK));
}
@@ -199,9 +170,7 @@ void task_exit (void)
if (task_data_table[i].pid == task_getpid ())
{
task_data_table[i].pid = 0;
-#ifdef CONFIG_UI
ui_write_task (i, 0);
-#endif
for (;;)
pth_exit (0);
}
@@ -251,9 +220,7 @@ void task_kill_pid (task_pid_t tp)
if (task_data_table[i].pid == tp)
{
task_data_table[i].pid = 0;
-#ifdef CONFIG_UI
ui_write_task (i, 0);
-#endif
if (tp != 0)
pth_abort (tp);
return;
@@ -401,11 +368,6 @@ task_gid_t task_getgid (void)
}
-void task_set_rom_page (task_pid_t pid, U8 rom_page)
-{
-}
-
-
void *task_get_class_data (task_pid_t pid)
{
int i;
diff --git a/cpu/native/task_pthread.c b/cpu/native/task_pthread.c
new file mode 100644
index 000000000..cd1df4e93
--- /dev/null
+++ b/cpu/native/task_pthread.c
@@ -0,0 +1,419 @@
+/*
+ * Copyright 2012 by Brian Dominy
+ *
+ * This file is part of FreeWPC.
+ *
+ * FreeWPC is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * FreeWPC is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with FreeWPC; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include
+#include
+#include
+
+/**
+ * \file
+ * \brief This module implements the round-robin, non-realtime, non-preemptive
+ * task scheduler under Linux. This uses the GNU pth library.
+ * It exposes the same task_ API functions, with similar semantics.
+ */
+
+/* TODO:
+ - Create tasks in advance to minimize repeated overhead of spawning.
+*/
+
+/** Enable this to turn on verbose debugging of the task subsystem. */
+//#define PTHREAD_DEBUG
+
+#ifdef PTHREAD_DEBUG
+#include
+#define pthread_debug(args...) print_log(args)
+#else
+#define pthread_debug(args...)
+#endif
+
+bool task_dispatching_ok = TRUE;
+
+U8 task_largest_stack = 0;
+
+U8 task_count = 0;
+
+U8 task_max_count = 0;
+
+#ifdef CONFIG_SIM
+extern int linux_irq_multiplier;
+#else
+#define linux_irq_multiplier 1
+#endif
+
+#ifdef CONFIG_SIM
+extern void ui_write_task (int, task_gid_t);
+#endif
+
+/* Some WPC per-task data must be stored separately, outside of the pth
+ * context. The aux_task_data_t structure holds this. */
+typedef struct
+{
+ pthread_t pid;
+ task_gid_t gid;
+ PTR_OR_U16 arg;
+ U8 duration;
+ unsigned char class_data[32];
+} aux_task_data_t;
+
+aux_task_data_t task_data_table[NUM_TASKS];
+
+pthread_attr_t attr_default;
+pthread_attr_t attr_task;
+pthread_attr_t attr_input;
+pthread_attr_t attr_interrupt;
+
+
+void task_dump (void)
+{
+}
+
+
+void idle_profile_rtt (void)
+{
+}
+
+
+/**
+ * The main function for creating a new task.
+ */
+task_pid_t task_create_gid (task_gid_t gid, task_function_t fn)
+{
+ pthread_t pid;
+ pthread_attr_t *attr;
+ struct sched_param param;
+ int i;
+ int rc;
+
+ pthread_debug ("task_create_gid: gid=%d, fn=%p\n", gid, fn);
+
+ if (gid == GID_LINUX_REALTIME) /* time tracking */
+ attr = &attr_interrupt;
+ else if (gid == GID_LINUX_INTERFACE) /* user input */
+ attr = &attr_input;
+ else
+ attr = &attr_task;
+
+ /* TODO - inside of calling the function directly, call a global
+ * function and pass it a pointer to the task_data_table entry
+ * as an argument. */
+ rc = pthread_create (&pid, attr, fn, 0);
+ if (rc != 0)
+ {
+ pthread_debug ("pthread_create failed, errno=%u\n", errno);
+ fatal (ERR_NO_FREE_TASKS);
+ }
+
+ for (i=0; i < NUM_TASKS; i++)
+ if (task_data_table[i].pid == 0)
+ {
+ task_data_table[i].pid = pid;
+ task_data_table[i].gid = gid;
+ task_data_table[i].duration = TASK_DURATION_INF;
+ task_data_table[i].arg.u16 = 0;
+ task_data_table[i].duration = TASK_DURATION_BALL;
+#ifdef CONFIG_SIM
+ ui_write_task (i, gid);
+#endif
+ pthread_debug ("pthread_create: index=%d, pid=%u\n", i, (unsigned)pid);
+ return (pid);
+ }
+
+ fatal (ERR_NO_FREE_TASKS);
+}
+
+
+void task_setgid (task_gid_t gid)
+{
+ int i;
+ for (i=0; i < NUM_TASKS; i++)
+ if (task_data_table[i].pid == task_getpid ())
+ {
+ task_data_table[i].gid = gid;
+ break;
+ }
+}
+
+void task_sleep (task_ticks_t ticks)
+{
+ usleep (ticks * USECS_PER_TICK);
+}
+
+
+void task_sleep_sec1 (U8 secs)
+{
+ usleep (TIME_1S * secs * USECS_PER_TICK);
+}
+
+__noreturn__
+void task_exit (void)
+{
+ int i;
+
+ pthread_debug ("task_exit: pid=%u\n", (unsigned)task_getpid ());
+ for (i=0; i < NUM_TASKS; i++)
+ if (task_data_table[i].pid == task_getpid ())
+ {
+ task_data_table[i].pid = 0;
+#ifdef CONFIG_SIM
+ ui_write_task (i, 0);
+#endif
+ pthread_debug ("pthread_exit: index=%d\n", i);
+ for (;;)
+ pthread_exit (0);
+ }
+ fatal (ERR_TASK_KILL_FAILED);
+}
+
+task_pid_t task_find_gid (task_gid_t gid)
+{
+ int i;
+ for (i=0; i < NUM_TASKS; i++)
+ {
+ if ((task_data_table[i].gid == gid)
+ && (task_data_table[i].pid != 0))
+ return task_data_table[i].pid;
+ }
+ return 0;
+}
+
+
+task_pid_t task_find_gid_next (task_pid_t last, task_gid_t gid)
+{
+ int i;
+ int ok_to_return = 0;
+ for (i=0; i < NUM_TASKS; i++)
+ {
+ if ((task_data_table[i].gid == gid) && (task_data_table[i].pid != 0))
+ {
+ if (ok_to_return)
+ return task_data_table[i].pid;
+ else if (task_data_table[i].pid == last)
+ ok_to_return = 1;
+ }
+ }
+ return 0;
+}
+
+
+void task_kill_pid (task_pid_t tp)
+{
+ int i;
+
+ pthread_debug ("task_kill_pid: pid=%u\n", (unsigned)tp);
+
+ for (i=0; i < NUM_TASKS; i++)
+ if (task_data_table[i].pid == tp)
+ {
+ if (tp != 0)
+ pthread_cancel (tp);
+ task_data_table[i].pid = 0;
+#ifdef CONFIG_SIM
+ ui_write_task (i, 0);
+#endif
+ return;
+ }
+}
+
+bool task_kill_gid (task_gid_t gid)
+{
+ int i;
+ bool rc = FALSE;
+
+ for (i=0; i < NUM_TASKS; i++)
+ {
+ if ((task_data_table[i].gid == gid) &&
+ (task_data_table[i].pid != 0) &&
+ (task_data_table[i].pid != task_getpid ()))
+ {
+ task_kill_pid (task_data_table[i].pid);
+ rc = TRUE;
+ }
+ }
+ return (rc);
+}
+
+
+void task_duration_expire (U8 cond)
+{
+ int i;
+
+ for (i=0; i < NUM_TASKS; i++)
+ {
+ if ((task_data_table[i].pid != 0) &&
+ (task_data_table[i].duration & cond))
+ task_kill_pid (task_data_table[i].pid);
+ }
+}
+
+void task_set_duration (task_pid_t tp, U8 cond)
+{
+ int i;
+ for (i=0; i < NUM_TASKS; i++)
+ {
+ if (task_data_table[i].pid == tp)
+ {
+ task_data_table[i].duration = cond;
+ break;
+ }
+ }
+}
+
+
+void task_add_duration (U8 flags)
+{
+ int i;
+ for (i=0; i < NUM_TASKS; i++)
+ {
+ if (task_data_table[i].pid == task_getpid ())
+ {
+ task_data_table[i].duration |= flags;
+ break;
+ }
+ }
+}
+
+
+void task_remove_duration (U8 flags)
+{
+ int i;
+ for (i=0; i < NUM_TASKS; i++)
+ {
+ if (task_data_table[i].pid == task_getpid ())
+ {
+ task_data_table[i].duration &= ~flags;
+ break;
+ }
+ }
+}
+
+
+U16 task_get_arg (void)
+{
+ int i;
+ for (i=0; i < NUM_TASKS; i++)
+ {
+ if (task_data_table[i].pid == task_getpid ())
+ return task_data_table[i].arg.u16;
+ }
+ fatal (ERR_CANT_GET_HERE);
+}
+
+
+void *task_get_pointer_arg (void)
+{
+ int i;
+ for (i=0; i < NUM_TASKS; i++)
+ {
+ if (task_data_table[i].pid == task_getpid ())
+ return task_data_table[i].arg.ptr;
+ }
+ fatal (ERR_CANT_GET_HERE);
+}
+
+
+void task_set_arg (task_pid_t tp, U16 arg)
+{
+ int i;
+ for (i=0; i < NUM_TASKS; i++)
+ {
+ if (task_data_table[i].pid == tp)
+ {
+ task_data_table[i].arg.u16 = arg;
+ }
+ }
+}
+
+
+void task_set_pointer_arg (task_pid_t tp, void *arg)
+{
+ int i;
+ for (i=0; i < NUM_TASKS; i++)
+ {
+ if (task_data_table[i].pid == tp)
+ {
+ task_data_table[i].arg.ptr = arg;
+ }
+ }
+}
+
+
+task_pid_t task_getpid (void)
+{
+ return pthread_self ();
+}
+
+
+task_gid_t task_getgid (void)
+{
+ int i;
+ for (i=0; i < NUM_TASKS; i++)
+ {
+ if (task_data_table[i].pid == task_getpid ())
+ return task_data_table[i].gid;
+ }
+ return 255;
+}
+
+
+void *task_get_class_data (task_pid_t pid)
+{
+ int i;
+
+ for (i=0; i < NUM_TASKS; i++)
+ if (task_data_table[i].pid == pid)
+ return task_data_table[i].class_data;
+ printf ("task_get_class_data for pid %u failed\n", (unsigned)pid);
+ fatal (0xFD);
+}
+
+void task_set_class_data (task_pid_t pid, size_t size)
+{
+}
+
+
+void task_init (void)
+{
+ memset (task_data_table, 0, sizeof (task_data_table));
+
+ struct sched_param sched_param;
+ sched_param.sched_priority = 1;
+ sched_setscheduler (0, SCHED_FIFO, &sched_param);
+
+ task_data_table[0].pid = task_getpid ();
+ task_data_table[0].gid = GID_FIRST_TASK;
+ task_data_table[0].duration = TASK_DURATION_INF;
+
+ pthread_attr_init (&attr_default);
+
+ attr_task = attr_default;
+ pthread_attr_setdetachstate (&attr_task, PTHREAD_CREATE_DETACHED);
+ pthread_attr_setinheritsched (&attr_task, PTHREAD_EXPLICIT_SCHED);
+ pthread_attr_setschedpolicy (&attr_task, SCHED_FIFO);
+ sched_param.sched_priority = 1;
+ pthread_attr_setschedparam (&attr_task, &sched_param);
+
+ attr_input = attr_task;
+ sched_param.sched_priority = 2;
+ pthread_attr_setschedparam (&attr_input, &sched_param);
+
+ attr_interrupt = attr_task;
+ sched_param.sched_priority = 8;
+ pthread_attr_setschedparam (&attr_interrupt, &sched_param);
+}
diff --git a/deffs/dcc1.deff b/deffs/dcc1.deff
new file mode 100644
index 000000000..ab1f0c70a
--- /dev/null
+++ b/deffs/dcc1.deff
@@ -0,0 +1,13 @@
+vbox 8
+valign top
+print "MULTIBALL"
+vbox 16
+font fixed6
+print current_score
+vbox 8
+valign bottom
+print "SHOOT RIGHT RAMP"
+flash TIME_66MS
+end
+run forever
+exit
diff --git a/deffs/dcc2.deff b/deffs/dcc2.deff
new file mode 100644
index 000000000..f26bf385a
--- /dev/null
+++ b/deffs/dcc2.deff
@@ -0,0 +1,13 @@
+name tilt_warning
+U8 tilt_warning_count
+font fixed10
+cond (tilt_warning_count == 1)
+print "DANGER"
+cond (tilt_warning_count == 2)
+vbox 16
+print "DANGER"
+vbox 16
+print "DANGER"
+run TIME_1500MS
+exit
+
diff --git a/deffs/dcc3.deff b/deffs/dcc3.deff
new file mode 100644
index 000000000..dba80ecb3
--- /dev/null
+++ b/deffs/dcc3.deff
@@ -0,0 +1,3 @@
+image IMG_COW
+run TIME_3S
+exit
diff --git a/deffs/dcc4.deff b/deffs/dcc4.deff
new file mode 100644
index 000000000..4ef539b95
--- /dev/null
+++ b/deffs/dcc4.deff
@@ -0,0 +1,18 @@
+name count
+border
+print "%d HITS TO GO", hits_to_go
+run TIME_1500MS
+exit
+
+name count_zero
+border
+print "JACKPOT IS LIT"
+run TIME_1500MS
+exit
+
+name super_lit
+print "SUPER JACKPOT LIT"
+transition trans_scroll_up
+run TIME_2500MS
+flash TIME_66MS
+exit
diff --git a/deffs/dcc5.deff b/deffs/dcc5.deff
new file mode 100644
index 000000000..ed515439f
--- /dev/null
+++ b/deffs/dcc5.deff
@@ -0,0 +1,11 @@
+
+name dark_bright
+vbox 50%
+color 1
+print "DARK"
+vbox 50%
+color 3
+print "BRIGHT"
+end
+run TIME_2S
+exit
diff --git a/doc/freewpc.texi b/doc/freewpc.texi
index f65cf05ad..cd279d8af 100644
--- a/doc/freewpc.texi
+++ b/doc/freewpc.texi
@@ -67,91 +67,6 @@ Also, knowledge of WPC pinball machines is very helpful.
* Concept Index::
@end menu
-@ignore
-* Frame Rate::
-* Simulating Color::
-* 6809 Instruction Set::
-* The Fastest Copy in Town::
-* Bit Alignment::
-* Compression Techniques::
-* Binary Packages::
-* Source Code Packages::
-* Directory Layout::
-* Configuration::
-* Making the ROM::
-
-@menu
-* Switches::
-* Lamps::
-* Power Drivers::
-* Zerocross Detector::
-* Dot-Matrix Display (DMD)::
-* Sound Board::
-* Triacs and General Illumination::
-* Real-Time Clock::
-* High Precision Timer::
-* Miscellaneous::
-* Debug Port::
-* Paging and Locking::
-* Bit Shifting::
-@end menu
-
-@menu
-* Device Status::
-* Global Status::
-* Events::
-* The Trough Device::
-@end menu
-
-* Adjustments::
-* Audits::
-* Tests::
-* Development::
-
-* Coins and Pricing::
-* Ball Devices::
-* Extra Balls::
-* High Scores::
-* Enter Initials::
-* Tournament Mode::
-* Ball Search::
-* Knocker Driver::
-* PIC Driver::
-* Player Local Data::
-* Adjustments::
-* Audits::
-* Scoring::
-
-* Compression::
-* Using TrueType Fonts::
-* Frame List::
-
-* @command{wpcdebug} and @command{PinMAME}::
-* @command{gdb}::
-* @command{exec09}::
-* @command{Breakpoints}::
-* @command{csum} : ROM Checksum Tool::
-* @command{srec2bin} : S-Record Converter::
-* @command{sched} : Static Scheduler::
-* @command{fontgen2} : TrueType Font Generator::
-
-* Overview::
-* CPU Board::
-* Power Driver Board::
-* Sound Board::
-* Fliptronic Board::
-* Auxiliary Driver Board::
-* Dot Matrix Controller Board::
-* Memory Map::
-
-* Syntax::
-* Fixed Objects::
-* Variable Objects::
-* Directives::
-* Global Configuration::
-* Section Summary::
-* How genmachine works::
-@end ignore
@node Overview
@chapter Overview
@@ -311,14 +226,19 @@ build process, appear here.
@cindex Configuration
FreeWPC can be compiled in many different ways with lots of optional features.
-You cannot just type @command{make} at the top of the directory tree without
-first specifying what you want to build. This is done by creating a file
-named @file{.config}. The file @file{config.example} is provided as an
-example of the kinds of things that can be tuned.
+A config file, written in Makefile syntax, specifies the specific configuration
+you want to build.
+
+By default, the build system will look for a file called @file{.config} in
+the top-level directory. You can create this file yourself with the options
+you want; see @file{config.example} for a list of possible options. After
+setting this up, you can just run @command{make}.
-@file{.config} is written in standard Makefile syntax. (The top-level
-Makefile includes this file.) You set various options by writing
-variable assignments, such as:
+Alternatively, you can point to a different configuration by running
+@command{make CONFIG=filename}. In this way, you can create multiple
+configs and switch between them.
+
+The config file sets various options by writing variable assignments, such as:
@example
MACHINE := wcs
@@ -1210,10 +1130,28 @@ nothing special happens. One common use is for detecting certain
playfield shots when a series of switches needs to activate within
a certain amount of time, say 1 second apart.
+Free timers can only be started in multiples of 1/3 second, up to 8
+seconds.
+
@subsection Periodic Functions
+Periodic functions can be declared to do timing. Your choices for
+frequency are limited to 16ms, 100ms, 1 second, or 10 seconds; if you
+need other timing, you'll have to implement it yourself. For example,
+display effects get updated every 500ms by scheduling a 100ms periodic
+function, but only acting every 5 calls.
+
+These functions are statically scheduled and so run continuously; you
+cannot directly start or stop them. However, you can use variables
+to control whether they do anything or not; but note that there is
+overhead in calling them all the time.
+
@subsection Realtime Functions
+Precision timing should use realtime functions. They give you the most
+accurate timing and allow measuring down to 1ms, but they can be high
+overhead. They should be used carefully when no alternative works.
+
@node Bank Switching
@section Bank Switching
@cindex Bank switching
@@ -1354,7 +1292,6 @@ normal task context at any time.
* Sound Board:: How to talk to the sound board
* General Illumination:: How to control the general illumination strings
* Real-Time Clock:: How to control the realtime clock
-* Debug Port:: How to write to the debugger port
@end menu
@node Switches
@@ -1432,7 +1369,8 @@ and act accordingly.
In addition to polling their levels, the switch driver will detect
when switches have @emph{changed state}, and invoke their event handlers.
The switch entry in the config file names a function to be called when
-these changes occur.
+these changes occur. These functions are always called from within
+their own task context.
The driver performs debouncing, so that rapid open and close
are not considered. By default, a switch is processed if it remains
@@ -1447,8 +1385,8 @@ flicker of the lamp.
@item switch_poll
-Read the stable, physical state of a switch. Returns 1 if it has
-a high level, or 0 for a low level.
+Read the stable, physical state of a switch. Returns nonzero if it has
+a high level, or zero for a low level.
Switch readings are polled by the switch driver continuously; this
API just returns the results of the last time the switch was
@@ -1457,8 +1395,8 @@ on WPC, it is every 2ms.
@item switch_poll_logical
-Read the stable, logical state of a switch. Returns 1 if it is
-active, or 0 for inactive. This is the same as @code{switch_poll}
+Read the stable, logical state of a switch. Returns nonzero if it is
+active, or zero for inactive. This is the same as @code{switch_poll}
but it inverts its result for optos.
@item rt_switch_poll
@@ -1848,21 +1786,20 @@ any changes. The battery provides power to the ASIC even when the game is off
so the real-time clock remains updated.
Game code does not need to call the following APIs. The current date and time
-can simply be read from memory.
+can simply be read from memory, in the variable @var{current_date}.
@table @code
-@item rtc_read
+@item rtc_hw_read
-Update memory based on the current value of the RTC registers.
+Update the hour/minute in memory from the value in the hardware registers.
-@item rtc_write
+@item rtc_hw_write
-Update the RTC chip.
+Update the hour/memory in the hardware from the value in memory. This is
+only used when setting the time.
@end table
-@node Debug Port
-@section Debug Port
@c ======================================================
@node Effects
@@ -2693,7 +2630,8 @@ For example, on Funhouse, the Rudy saucer eject needs to make sure that
the mouth is open before kicking.
Solenoids associated with ball devices will be skipped unless they are empty,
-except after several ball searches have failed.
+except after several ball searches have failed. The chase ball/lost ball
+recovery feature is also implemented and can be enabled by menu adjustment.
Game code can call @code{ball_search_timeout_set} to set the amount of
idle time that must expire before a ball search will occur. The default
@@ -2713,6 +2651,8 @@ Adjustments are 8-bit variables kept in persistent storage. Each group
of related adjustments is checksummed to verify integrity. Adjustments
can be checked by just reading the variable; there is no special API to do so.
+Machines can define their own @emph{feature adjustments} in the machine config.
+
@section Audits
Audits are 16-bit variables kept in the non-volatile area of memory. They
@@ -2721,6 +2661,8 @@ They can also be incremented by an arbitrary value, via @code{audit_add}; or
they can be assigned via @code{audit_assign}. They will not overflow if the
maximum value is reached, but instead will just stop counting up.
+Machines can define their own @emph{feature audits} in the machine config.
+
@section Scoring
A global playfield multiplier is supported; use @code{score_multiplier_set} to
@@ -2728,7 +2670,7 @@ change it. It is automatically set to 1 at the beginning of each ball.
Scores can be stated in two ways: as a 5-byte, binary-coded decimal value, or
as an 8-bit "score code". The long values allow for arbitrary values up to
-one billion points. The short values are more compact and index a table of
+10 billion points. The short values are more compact and index a table of
common score values, which are listed in the machine config.
The first set of APIs operate on arbitary BCD score buffers:
@@ -2824,24 +2766,24 @@ moves into a new place. It is up to each game to decide how to handle it.
To write a timed mode, you need to do two things:
First, create a structure of type @code{struct timed_mode_ops} and fill out
-all of the required information:
+all of the required information. Use the DEFAULT_MODE macro in the initializer
+to set suitable values before declaring your own values. The fields are:
@itemize @bullet
-@item An initialization function. This is called when the mode is started.
-@item An exit function. This is called when the mode is stopped or times out.
-@item A task group ID. Choose any name you want begin with @code{GID}.
-When the mode is started, a task will be created with this group ID.
-@item A music code. Use MUS_NONE if the mode should not update the background music.
-@item The background display effect ID. Use DEFF_NULL if none is needed.
-@item The mode end display effect ID. Use DEFF_NULL if none is needed.
-@item A priority value. Use one of the PRI values.
-@item The initial mode timer, in seconds.
-@item A pointer to a timer variable. You must declare the variable yourself.
-@item The length of the grace period, in seconds. It may be zero.
-@item A pause function. This function is called occasionally while the mode
-is running. If it returns TRUE, the timer is not advanced.
+@item @var{init}, an initialization function. This is called when the mode is started.
+@item @var{exit}, an exit function. This is called when the mode is stopped or times out.
+@item @var{gid}, a task group ID. Choose any name you want begin with @code{GID}.
+This field is mandatory and has no default. When the mode is started, a task will be created with this group ID.
+@item @var{music}, the background music code. Use MUS_NONE if the mode should not update the background music.
+@item @var{deff_running}, the running display effect ID. Use DEFF_NULL if none is needed.
+@item @var{deff_ending}, the ending display effect ID. Use DEFF_NULL if none is needed.
+@item @var{prio}, a priority value. Use one of the PRI values.
+@item @var{init_timer}, tThe initial mode timer, in seconds.
+@item @var{timer}, a pointer to a timer variable. You must declare the variable yourself.
+@item @var{grace_timer}, the length of the grace period, in seconds. It may be zero.
+@item @var{pause}, the pause function. This function is called occasionally while the mode is running. If it returns TRUE, the timer is not advanced.
Use @code{system_timer_pause} when the mode should pause for the "usual cases" only.
-Use @code{null_false_function} if the mode should not pause at all. You can
+Use @code{null_false_function} if the mode should not pause at all. You can also
supply your own function if you need custom behavior.
@end itemize
@@ -2901,11 +2843,12 @@ The base API @code{serve_ball} simply kicks a ball out of the trough.
It also resets the valid playfield flag and refreshes background effects.
This is the same call made by the game state machine during start ball.
-Use @code{serve_ball_auto} instead if you want to ball to be autolaunched
-as soon as it is served successful. Otherwise, it is identical. If
+Use @code{serve_ball_auto} instead if you want the ball to be autolaunched
+as soon as it is served successfully. Otherwise, it is identical to
+@code{serve_ball}. If
a ball is served without autolaunch, it can be launched later by calling
@code{launch_ball}. This happens automatically when the launch button is
-pressed.
+pressed and a ball is detected in the shooter lane.
You normally do not need to call either of those APIs, except in some
rare cases.
@@ -2927,6 +2870,14 @@ will ever be placed in the shooter at a time.
@section Multiball Modes
@cindex Multiball
+Multiball modes can be implemented by defining a structure of type
+@code{struct mb_mode_ops}. They are modeled after the way that timed
+modes are constructed. Use the DEFAULT_MBMODE macro in the initializer
+to set suitable values before declaring your own values.
+
+The key difference is how the mode ends; here, we examine the number
+of balls in play and end the mode when it reduces to 1.
+
@section Mute and Pause Mode
FreeWPC implements the Mute and Pause feature that was included
@@ -2934,13 +2885,20 @@ in the Twilight Zone home ROM. It is optional at compile-time.
The machine must have an extra-ball buyin button for it to work.
When compiled in, and the adjustment "MUTE/PAUSE" is set to YES,
-then pressing buytin during a game will hold the flippers,
-disable ball kickouts, and turn off the background music. To
+then pressing buyin during a game will hold the flippers,
+disable ball kickouts, pause timers, and turn off the background music. To
continue, press the button again. It will also timeout automatically
after 15 minutes.
@section Status Report
+A default status report is builtin which shows basic game information.
+To activate it in a game, hold in either flipper button for about 5
+seconds.
+
+Machines can customize the report by defining their own status pages.
+Modules should declare a handler for the @code{status_report} event.
+
@c ======================================================
@node Fonts and Graphics
@chapter Fonts and Graphics
diff --git a/drivers/bivar.ct b/drivers/bivar.ct
index 8108f8d01..4da4e67cc 100644
--- a/drivers/bivar.ct
+++ b/drivers/bivar.ct
@@ -90,6 +90,7 @@ extern inline @self_state_t @self_get_state (void)
/**
* Realtime update of a duty-cycled device.
*/
+/* RTT(name=@self_service freq=16) */
extern inline void @self_service (void)
{
/* Only act if device is enabled */
diff --git a/drivers/bivar2.ct b/drivers/bivar2.ct
new file mode 100644
index 000000000..340f2a33f
--- /dev/null
+++ b/drivers/bivar2.ct
@@ -0,0 +1,418 @@
+/*
+ * written by James Cardona and based on previous work in bivar.ct
+ *
+ * Driver for a bidirectional, variable-speed motor with two stop-limit switches
+ *
+ * This driver is based on the simpler 'duty' driver, but it
+ * supports a forward and reverse direction, and also variable
+ * pulse width.
+ */
+
+@@class duty
+@@parameter left_sol
+@@parameter right_sol
+@@parameter left_sw
+@@parameter right_sw
+
+
+
+@@
+@@file @self.sched
+@@
+!@self_service 16 80c
+
+
+
+@@
+@@file @self.h
+@@
+
+#include
+
+typedef enum {
+ @SELF_IDLE,
+ @SELF_FORWARD,
+ @SELF_REVERSE,
+} @self_state_t;
+
+typedef enum {
+ @SELF_UNKNOWN,
+ @SELF_LEFT,
+ @SELF_RIGHT,
+} @self_location_t;
+
+
+//this number is equivalent to off time of duty cycle, on time is always 16ms
+#define @SELF_DUTY_100 0
+#define @SELF_DUTY_50 TIME_16MS
+#define @SELF_DUTY_25 TIME_50MS
+#define @SELF_DUTY_10 TIME_166MS
+
+extern __fastram__ @self_state_t @self_state;
+extern __fastram__ U8 @self_timer;
+extern @self_location_t @self_location;
+extern U8 @self_speed;
+
+/* User APIs */
+void @self_go_left (void);
+void @self_go_right (void);
+void @self_set_speed (U8 speed);
+void @self_stop (void);
+void @self_bump_left (void);
+void @self_bump_right (void);
+void @self_go_to_center_monitor (void);
+void @self_go_left_to_center (void);
+void @self_go_right_to_center (void);
+
+
+extern inline void @self_stop_from_interrupt (void) {
+ @self_state = @SELF_IDLE;
+ sol_disable(@left_sol);
+ sol_disable(@right_sol);
+}
+
+
+extern inline void @self_set_speed (U8 speed) { @self_speed = speed; }
+
+extern inline U8 @self_get_speed (void) { return @self_speed; }
+
+extern inline @self_state_t @self_get_state (void) { return @self_state; }
+
+extern inline @self_location_t @self_get_location (void) { return @self_location; }
+
+/**
+ * Realtime update of a duty-cycled device.
+ */
+/* RTT(name=@self_service freq=16) */
+extern inline void @self_service (void) {
+ /* Only act if device is enabled */
+ if (@self_state != @SELF_IDLE) {
+ if (@self_timer == 0) {
+ /* Motor was enabled for 1 tick. We need to
+ turn it off, and restart the off delay. */
+ if (@self_speed == 0)
+ ;
+ else if (@self_state == @SELF_FORWARD)
+ sol_disable (@left_sol);
+ else
+ sol_disable (@right_sol);
+ @self_timer = @self_speed;
+ }
+ else if (--@self_timer == 0) {
+ /* We are in off delay, if timer reaches zero,
+ then turn it back on. */
+ if (@self_state == @SELF_FORWARD)
+ sol_enable (@left_sol);
+ else
+ sol_enable (@right_sol);
+ }
+ }
+}
+
+
+
+
+
+@@
+@@file @self.c
+@@
+
+#include
+#include "@self.h"
+
+__fastram__ @self_state_t @self_state;
+__fastram__ U8 @self_timer;
+@self_location_t @self_location;
+U8 @self_speed;
+
+
+void @self_go_left (void) {
+ disable_interrupts ();
+ @self_timer = 1;
+ @self_state = @SELF_FORWARD;
+ @self_location = @SELF_UNKNOWN;
+ sol_disable (@right_sol);
+ enable_interrupts ();
+}
+
+
+
+void @self_go_right (void) {
+ disable_interrupts ();
+ @self_timer = 1;
+ @self_state = @SELF_REVERSE;
+ @self_location = @SELF_UNKNOWN;
+ sol_disable (@left_sol);
+ enable_interrupts ();
+}
+
+
+void @self_go_to_center_monitor (void) {
+ task_sleep(TIME_500MS);
+ task_sleep(TIME_100MS);
+ disable_interrupts ();
+ @self_state = @SELF_IDLE;
+ sol_disable (@right_sol);
+ sol_disable (@left_sol);
+ enable_interrupts ();
+ task_exit ();
+}
+
+void @self_go_left_to_center (void) {
+ disable_interrupts ();
+ @self_timer = 1;
+ @self_state = @SELF_FORWARD;
+ @self_location = @SELF_UNKNOWN;
+ task_create_gid1 (GID_@SELF_GRTC_MONITOR, @self_go_to_center_monitor);
+ enable_interrupts ();
+}
+
+
+void @self_go_right_to_center (void) {
+ disable_interrupts ();
+ @self_timer = 1;
+ @self_state = @SELF_REVERSE;
+ @self_location = @SELF_UNKNOWN;
+ task_create_gid1 (GID_@SELF_GRTC_MONITOR, @self_go_to_center_monitor);
+ enable_interrupts ();
+}
+
+
+void @self_stop (void) {
+ disable_interrupts ();
+ @self_stop_from_interrupt ();
+ enable_interrupts ();
+ @self_state = @SELF_IDLE;
+ sol_disable (@right_sol);
+ sol_disable (@left_sol);
+}
+
+
+
+CALLSET_ENTRY (@self, @left_sw) {
+ if (!(@self_location == @SELF_LEFT) ) {
+ @self_stop ();
+ @self_location = @SELF_LEFT;
+ }
+}
+
+
+
+CALLSET_ENTRY (@self, @right_sw) {
+ @self_stop ();
+ @self_location = @SELF_RIGHT;
+}
+
+
+void @self_bump_monitor (void) {
+ task_sleep(TIME_100MS);
+ @self_stop ();
+ task_exit ();
+}
+
+
+void @self_bump_left (void) {
+ if ( (@self_location == @SELF_UNKNOWN)
+ || (@self_location == @SELF_RIGHT) ){
+ disable_interrupts ();
+ @self_timer = 1;
+ @self_state = @SELF_FORWARD;
+ @self_location = @SELF_UNKNOWN;
+ sol_disable (@right_sol);
+ sol_enable (@left_sol);
+ task_recreate_gid (GID_@SELF_B_MONITOR, @self_bump_monitor);
+ enable_interrupts ();
+ }
+}
+
+
+
+void @self_bump_right (void) {
+ if ( (@self_location == @SELF_UNKNOWN)
+ || (@self_location == @SELF_LEFT) ){
+ disable_interrupts ();
+ @self_timer = 1;
+ @self_state = @SELF_REVERSE;
+ @self_location = @SELF_UNKNOWN;
+ sol_disable (@left_sol);
+ sol_enable (@right_sol);
+ task_recreate_gid (GID_@SELF_B_MONITOR, @self_bump_monitor);
+ enable_interrupts ();
+ }
+}
+
+
+CALLSET_ENTRY (@self, init) {
+ @self_state = @SELF_IDLE;
+ @self_location = @SELF_UNKNOWN;
+ @self_set_speed (@SELF_DUTY_100);
+}
+
+
+
+
+CALLSET_ENTRY (@self, tilt, stop_game, test_start) {
+ @self_state = @SELF_IDLE;
+ @self_location = @SELF_UNKNOWN;
+ @self_stop ();
+}
+
+
+
+/* vim: set filetype=c: */
+
+
+
+@@
+@@file @self_test.c
+@@
+
+
+/***********************************************************************
+ * @self test:
+ ***********************************************************************/
+
+
+#include
+#include
+#include
+#include "@self.h"
+
+// FIXME - font_render_string_right vertically offsets the text by 1 pixel (downwards)
+// When this is removed removed all references to FR_WORKAROUND
+#define FRSR_WORKAROUND 1
+
+enum {
+ FIRST_TEST = 0,
+ BUMPLEFT = FIRST_TEST,
+ BUMPRIGHT,
+ LEFT,
+ RIGHT,
+ STOP,
+ LAST_TEST = STOP
+} @self_test_command;
+
+
+
+char *@self_test_short_names[] = {
+ "BUMP LEFT",
+ "BUMP RIGHT",
+ "LEFT",
+ "RIGHT",
+ "STOP"
+};
+
+extern @self_location_t @self_location;
+
+
+
+void @self_test_init (void) { @self_test_command = BUMPLEFT; }
+
+
+void @self_test_draw (void) {
+ dmd_alloc_low_clean ();
+ //draw title
+ font_render_string_center (&font_var5, 64, 2, "@SELF TEST");
+ dmd_draw_horiz_line ((U16 *)dmd_low_buffer, 5);
+ dmd_draw_horiz_line ((U16 *)dmd_low_buffer, 25);
+
+
+ //display status of limit switches
+ sprintf ("@self_location");
+ font_render_string_center (&font_var5, 64, 13, sprintf_buffer);
+
+ //name of currently running test
+ sprintf(@self_test_short_names[@self_test_command]);
+ font_render_string_left (&font_var5, 0, 27, sprintf_buffer);
+
+ dmd_show_low ();
+}
+
+
+
+
+void @self_test_thread (void) {
+ for (;;) {
+ task_sleep (TIME_200MS);//this was set to run faster but seemed to cause problems
+ @self_test_draw ();
+ }
+}
+
+
+
+//up test button pressed
+void @self_test_up (void) {
+ if (@self_test_command < LAST_TEST)
+ @self_test_command++;
+}
+
+
+
+//down test button pressed
+void @self_test_down (void) {
+ if (@self_test_command > FIRST_TEST)
+ @self_test_command--;
+}
+
+
+
+//escape test button pressed
+void @self_test_escape (void) {
+ // stop everything
+ @self_stop();
+ window_pop();
+}
+
+
+
+//enter test button pressed
+void @self_test_enter (void) {
+ sound_send (SND_TEST_ENTER);
+ switch (@self_test_command) {
+ case BUMPLEFT:
+ @self_bump_left();
+ @self_test_command = BUMPLEFT;
+ break;
+ case BUMPRIGHT:
+ @self_bump_right();
+ @self_test_command = BUMPRIGHT;
+ break;
+ case LEFT:
+ @self_go_left();
+ @self_test_command = STOP;
+ break;
+ case RIGHT:
+ @self_go_right();
+ @self_test_command = STOP;
+ break;
+ case STOP:
+ @self_stop();
+ @self_test_command = BUMPLEFT;
+ break;
+ }
+}
+
+
+
+struct window_ops @self_test_window = {
+ DEFAULT_WINDOW,
+ .init = @self_test_init,
+ .draw = @self_test_draw,
+ .up = @self_test_up,
+ .down = @self_test_down,
+ .enter = @self_test_enter,
+ .escape = @self_test_escape,
+ .thread = @self_test_thread,
+};
+
+
+
+struct menu @self_test_item = {
+ .name = "@SELF TEST", // needs @SELF for uppercase version of 'self' as test menu font doesn't have lower-case letters.
+ .flags = M_ITEM,
+ .var = { .subwindow = { &@self_test_window, NULL } },
+};
+
+
+
+
diff --git a/drivers/divhold.ct b/drivers/divhold.ct
index 9f1dc08d9..57c2496b7 100644
--- a/drivers/divhold.ct
+++ b/drivers/divhold.ct
@@ -104,7 +104,8 @@ extern inline void @self_service (void)
diverter_sol_disable(@power_sol, out);
diverter_sol_disable(@hold_sol, out);
#else
- sol_disable (@power_sol | @hold_sol);
+ sol_disable (@power_sol);
+ sol_disable (@hold_sol);
#endif
}
@@ -114,15 +115,19 @@ extern inline void @self_service (void)
diverter_sol_enable(@power_sol, out);
diverter_sol_enable(@hold_sol, out);
#else
- sol_enable (@power_sol | @hold_sol);
+ sol_enable (@power_sol);
+ sol_enable (@hold_sol);
#endif
if (--@self_timer == 0)
{
@self_timer = -1;
/* The high power pulse has expired. Switch to hold power */
- //sol_disable (@power_sol);
+#if (@SELF_MODE > 0)
diverter_sol_disable(@power_sol, out);
+#else
+ sol_disable (@power_sol);
+#endif
}
}
@@ -131,7 +136,7 @@ extern inline void @self_service (void)
#if (@SELF_MODE > 0)
diverter_sol_enable(@hold_sol, out);
#else
- //sol_enable (@hold_sol);
+ sol_enable (@hold_sol);
#endif
// We could add a timeout here so that we don't stay on hold power forever but that
// is better left to the game logic, e.g. via timed modes, switches etc.
@@ -269,7 +274,7 @@ void @self_test_init (void)
}
void @self_draw_test_title(void) {
- font_render_string_center (&font_mono5, 64, 2, "DIVERTER TEST");
+ font_render_string_center (&font_var5, 64, 2, "DIVERTER TEST");
dmd_draw_horiz_line ((U16 *)dmd_low_buffer, 5);
}
@@ -306,7 +311,7 @@ void @self_test_draw (void)
dmd_draw_horiz_line ((U16 *)dmd_low_buffer, 25);
sprintf(@self_test_short_names[@self_test_command]);
- font_render_string_left (&font_mono5, 0, 27, sprintf_buffer);
+ font_render_string_left (&font_var5, 0, 27, sprintf_buffer);
diff --git a/drivers/drop.ct b/drivers/drop.ct
index 332ea2331..f97ab7f38 100644
--- a/drivers/drop.ct
+++ b/drivers/drop.ct
@@ -1,5 +1,5 @@
/*
- * Copyright 2009-2010 by Brian Dominy
+ * Copyright 2009-2011 by Brian Dominy
*
* This file is part of FreeWPC.
*
diff --git a/drivers/duty.ct b/drivers/duty.ct
index 41cdd96ca..b031b1942 100644
--- a/drivers/duty.ct
+++ b/drivers/duty.ct
@@ -140,7 +140,7 @@ U8 @self_cycles;
void @self_start (void)
{
/* The entire operation must be done with interrupts disabled,
- * in case the solenoid is always running. */
+ * in case the solenoid is already running. */
disable_interrupts ();
@self_timer = @ontime;
@self_cycles = (@timeout - @ontime) / (@duty_ontime + @duty_offtime);
diff --git a/drivers/duty2.ct b/drivers/duty2.ct
index 1d601b94f..c53e6f82d 100644
--- a/drivers/duty2.ct
+++ b/drivers/duty2.ct
@@ -1,5 +1,5 @@
/*
- * Copyright 2008, 2009, 2010 by Brian Dominy
+ * Copyright 2008, 2009, 2010, 2011 by Brian Dominy
*
* This file is part of FreeWPC.
*
@@ -78,6 +78,7 @@ void @self_stop (void);
/**
* Realtime update of a duty-cycled device.
*/
+/* RTT(name=@self_service freq=4) */
extern inline void @self_service (void)
{
if (unlikely (@self_timer > 0))
diff --git a/drivers/duty3.ct b/drivers/duty3.ct
new file mode 100644
index 000000000..f06330ff5
--- /dev/null
+++ b/drivers/duty3.ct
@@ -0,0 +1,144 @@
+/*
+ * Generic duty cycle driver - version 3
+ *
+ * Yet another duty driver. This one is more generic than the others and
+ * allows for any fraction to be specified, not just 1/2, 1/4, etc.
+ * If you want 3/11, then call start with a cycle size of 11 and an on
+ * time of 3.
+ *
+ * The granularity is also programmable at compile time. It cannot be
+ * lower than the refresh rate of solenoids from memory, which is
+ * currently 4ms.
+ *
+ * You can also provide a timeout, in multiples of the cycle length.
+ */
+
+@@class duty3
+
+/* The solenoid that is being controlled */
+@@parameter sol
+
+/* The timeout, after which the coil will automatically go off.
+ You can specify zero and it will run indefinitely, but that is
+ not recommended. It is given in TIME_xxx format. */
+@@parameter timeout
+
+/* The period at which the service routine is scheduled. */
+@@parameter granularity
+
+
+@@parameter fixed_cycle_size
+
+
+
+@@
+@@file @self.sched
+@@
+!@self_service @granularity 20c
+
+
+@@
+@@file @self.h
+@@
+
+#include
+
+/* Conversion factor between time units and task ticks.
+ The @timeout config option is given in task ticks, and thus
+ must be scaled. */
+#define TIME_UNIT (IRQS_PER_TICK / @granularity)
+
+/* A typedef for time unit variables. Because these are 8-bit,
+ they max at 255. With default granularity of 4ms, that
+ gives a maximum of about a 1s cycle. (Even when 1ms
+ granularity is supported, 8-bits is still adequate.) */
+typedef U8 time_unit_t;
+
+extern time_unit_t @self_cycle_size;
+extern __fastram__ time_unit_t @self_on_time;
+extern __fastram__ time_unit_t @self_cycle;
+extern U8 @self_timeout;
+
+/* RTT(name=@self_service freq=@granularity) */
+extern inline void @self_service (void)
+{
+ if (unlikely (@self_cycle) > 0)
+ {
+ @self_cycle--;
+ if (@self_cycle == 0)
+ {
+ @self_cycle = @self_cycle_size;
+ sol_disable (@sol);
+ if (@self_timeout)
+ {
+ if (--@self_timeout == 0)
+ {
+ @self_cycle = 0;
+ }
+ }
+ }
+ else if (@self_cycle == @self_on_time)
+ {
+ sol_enable (@sol);
+ }
+ }
+}
+
+@@
+@@file @self.c
+@@
+
+#include
+#include "@self.h"
+
+time_unit_t @self_cycle_size;
+__fastram__ time_unit_t @self_on_time;
+__fastram__ time_unit_t @self_cycle;
+time_unit_t @self_timeout;
+
+
+/* Configure the duty cycle and duration.
+ This MUST be called prior to starting the output. */
+#if (@fixed_cycle_size == 0)
+void @self_config (U8 size, U8 on_time)
+{
+ @self_cycle_size = size;
+ @self_on_time = on_time;
+}
+#else
+void @self_config (U8 on_time)
+{
+ @self_on_time = on_time;
+}
+#endif
+
+/* Start the output using preconfigured duty/duration */
+void @self_start (void)
+{
+ rtt_disable ();
+ sol_disable (@sol);
+ @self_cycle = @self_cycle_size;
+ @self_timeout = @timeout * TIME_UNIT; // ticks-to-time-units
+ rtt_enable ();
+}
+
+/* Stop the output */
+void @self_stop (void)
+{
+ rtt_disable ();
+ sol_disable (@sol);
+ @self_cycle = 0;
+ rtt_enable ();
+}
+
+CALLSET_ENTRY (@self, init)
+{
+ @self_cycle = 0;
+}
+
+CALLSET_ENTRY (@self, tilt, stop_game)
+{
+ @self_stop ();
+}
+
+/* vim: set filetype=c: */
diff --git a/drivers/flipduty.ct b/drivers/flipduty.ct
index 6f0a96855..887888d29 100644
--- a/drivers/flipduty.ct
+++ b/drivers/flipduty.ct
@@ -54,6 +54,7 @@ void @self_stop (void);
/**
* Realtime update of a duty-cycled device.
*/
+/* RTT(name=@self_service freq=16) */
extern inline void @self_service (void)
{
if (unlikely (@self_timer > 0))
diff --git a/drivers/flipper.ct b/drivers/flipper.ct
index 0211517ff..a32424c11 100644
--- a/drivers/flipper.ct
+++ b/drivers/flipper.ct
@@ -1,5 +1,5 @@
/*
- * Copyright 2008-2010 by Brian Dominy
+ * Copyright 2008-2012 by Brian Dominy
*
* This file is part of FreeWPC.
*
@@ -36,6 +36,12 @@
@@parameter eos
+@@
+@@file @self.sched
+@@
+!@self_service 4 40c
+
+
@@
@@file @class.h
@@
@@ -43,6 +49,7 @@
#ifndef __@class_DRIVER_H
#define __@class_DRIVER_H
+#include
extern __fastram__ U8 @class_enabled;
extern __fastram__ U8 @class_running;
@@ -95,9 +102,9 @@ CALLSET_ENTRY (@self, end_ball, tilt)
@@file @self.h
@@
-/* Schedule this driver every 8ms. This should be enough
+/* Schedule this driver every 4ms. This should be enough
to see all switch transitions, and to update the coils. */
-#define RTT_SCHED 8
+#define RTT_SCHED 4
/* Length of time for the initial power pulse */
#define POWER_PULSE 40
@@ -106,20 +113,21 @@ to see all switch transitions, and to update the coils. */
#include <@class.h>
extern __fastram__ S8 @self_timer;
-
+extern bool flippers_enabled;
/**
- * The driver for a single flipper.
+ * The service routine for a single flipper.
*/
-extern inline void @self_driver (void)
+extern inline void @self_service (void)
{
- if (flippers_enabled && BUTTON_PRESSED (@button))
+ if (flippers_enabled && rt_switch_poll (@button))
{
/* Flipper button is pressed. See what phase we are in. */
if (@self_timer == 0)
{
/* Start the high power 40ms pulse */
- sol_enable (@power_sol | @hold_sol);
+ sol_enable (@power_sol);
+ sol_enable (@hold_sol);
@self_timer = POWER_TICKS;
}
else if (@self_timer > 0)
@@ -135,11 +143,12 @@ extern inline void @self_driver (void)
else if (@self_timer < 0)
{
/* The flipper is in hold mode. Check for foldback */
- if (EOS_INACTIVE (@eos))
+ if (!rt_switch_poll (@eos)) // TODO - check polarity
{
/* Start another high power pulse.
TODO - a bad EOS switch will fry this puppy. */
- sol_enable (@power_sol | @hold_sol);
+ sol_enable (@power_sol);
+ sol_enable (@hold_sol);
@self_timer = POWER_TICKS;
}
}
@@ -148,7 +157,8 @@ extern inline void @self_driver (void)
{
/* Flipper button is not pressed: the coil should be off */
@self_timer = 0;
- sol_disable (@power_sol | @hold_sol);
+ sol_disable (@power_sol);
+ sol_disable (@hold_sol);
}
}
@@ -157,6 +167,8 @@ extern inline void @self_driver (void)
@@file @self.c
@@
+#include
+
/** Each flipper has its own timer instance variable.
* When zero, it means the flipper is not running at all.
*
diff --git a/drivers/magnet.ct b/drivers/magnet.ct
new file mode 100644
index 000000000..fe21a3846
--- /dev/null
+++ b/drivers/magnet.ct
@@ -0,0 +1,75 @@
+/*
+ *
+ * written by James Cardona and based on previous work in divhold.ct
+ *
+ * support for magnet powered by a fliptonic II's spare circuits.
+ *
+ */
+
+@@class magnet
+
+/* The solenoid that is used*/
+@@parameter sol
+
+@@
+@@file @self.h
+@@
+
+#include
+
+void @self_on (void);
+void @self_off (void);
+
+#define @self_sol_bitmask(id) (1 << ( (id & (CHAR_BIT - 1) ) ) )
+
+#define @self_sol_enable(id, bits) { bits |= @self_sol_bitmask(id); };
+
+#define @self_sol_disable(id, bits) { bits &= ~(@self_sol_bitmask(id)); };
+
+
+
+
+
+
+@@
+@@file @self.c
+@@
+
+#include
+#include "@self.h"
+
+extern U8 fliptronic_powered_coil_outputs;
+
+/**
+ * The user API to turn on.
+ */
+void @self_on (void) {
+ register U8 out __areg__ = fliptronic_powered_coil_outputs;
+ @self_sol_enable(@sol, out);
+ fliptronic_powered_coil_outputs = out;
+}
+
+
+
+/**
+ * The user API to turn off.
+ */
+void @self_off (void) {
+ register U8 out __areg__ = fliptronic_powered_coil_outputs;
+ @self_sol_disable(@sol, out);
+ fliptronic_powered_coil_outputs = out;
+}
+
+
+
+CALLSET_ENTRY (@self, init, tilt, stop_game) { @self_off (); }
+
+/* vim: set filetype=c: */
+
+
+
+
+
+
+
+
diff --git a/drivers/motorbank2.ct b/drivers/motorbank2.ct
new file mode 100644
index 000000000..43e655508
--- /dev/null
+++ b/drivers/motorbank2.ct
@@ -0,0 +1,405 @@
+/***********************************************************************
+ *
+ * written by James Cardona and based on previous work in motorbank.ct and bivar.ct
+ *
+ * handles a duty-cycled, single direction motor which has 2 limit switches, either
+ * upper and lower or left and right to turn off the motor. The motor, if run
+ * continuously will go up and down due to cam mechanism. This driver has support
+ * for task based shutdown of motor if limit switches are broken and a testing
+ * algorithm.
+ */
+
+@@class duty
+@@parameter sol
+@@parameter up_sw_event
+@@parameter down_sw_event
+@@parameter initial_position
+
+
+
+@@
+@@file @self.sched
+@@
+!@self_service 16 80c
+
+
+
+@@
+@@file @self.h
+@@
+
+/***********************************************************************
+ * @self.h
+ ***********************************************************************/
+
+#include
+
+typedef enum {
+ @SELF_INIT,
+ @SELF_UP,
+ @SELF_DOWN,
+ @SELF_OFF,
+}@self_state_t;
+
+//this number is equivalent to off time of duty cycle
+#define @SELF_DUTY_100 0
+#define @SELF_DUTY_50 TIME_16MS
+#define @SELF_DUTY_25 TIME_50MS
+#define @SELF_DUTY_10 TIME_166MS
+
+extern __fastram__ @self_state_t @self_state;
+extern __fastram__ U8 @self_timer;
+extern U8 @self_speed;
+
+
+/* User APIs */
+void @self_stop (void);
+void @self_move_up (void);
+void @self_move_down (void);
+void @self_bump_up (void);
+void @self_bump_down (void);
+
+
+extern inline void @self_stop_from_interrupt (void) {
+ @self_state = @SELF_OFF;
+ sol_disable (@sol);
+}
+
+
+extern inline void @self_set_speed (U8 speed) { @self_speed = speed; }
+
+extern inline U8 @self_get_speed (void) { return @self_speed; }
+
+extern inline @self_state_t @self_get_state (void) { return @self_state; }
+
+
+/**
+ * Realtime update of a duty-cycled device.
+ */
+/* RTT(name=@self_service freq=16) */
+extern inline void @self_service (void) {
+ /* Only act if device is enabled */
+ if (@self_state != @SELF_OFF) {
+ if (@self_timer == 0) {
+ /* enabled for 1 tick. We need to
+ turn it off, and restart the off delay. */
+ if (@self_speed == 0)
+ ;
+ else if (@self_state == @SELF_UP
+ || @self_state == @SELF_DOWN)
+ sol_disable (@sol);
+ @self_timer = @self_speed;
+ }
+ else if (--@self_timer == 0) {
+ /* We are in off delay, if timer reaches zero,
+ then turn it back on. */
+ if (@self_state == @SELF_UP
+ || @self_state == @SELF_DOWN)
+ sol_enable (@sol);
+ }
+ }
+}
+
+
+
+
+
+
+
+@@
+@@file @self.c
+@@
+/***********************************************************************
+ * @self.c
+ ***********************************************************************/
+
+#include
+#include "@self.h"
+
+__fastram__ @self_state_t @self_state;
+__fastram__ U8 @self_timer;
+U8 @self_speed;
+
+__boolean @self_timer;
+
+
+void @self_move_monitor (void) {
+ sol_enable (@sol);
+ task_sleep_sec (4);
+ sol_disable (@sol);
+ @self_state = @SELF_OFF;
+ task_exit ();
+}
+
+
+void @self_stop (void) {
+ dbprintf ("Stopping\n");
+ task_kill_gid (GID_@SELF_MONITOR);
+ @self_state = @SELF_OFF;
+ sol_disable (@sol);
+}
+
+
+
+void @self_move_up (void) {
+ disable_interrupts ();
+ task_create_gid1 (GID_@SELF_MONITOR, @self_move_monitor);
+ @self_timer = 1;
+ sol_enable (@sol);
+ if (@self_state != @SELF_UP)
+ @self_state = @SELF_UP;
+ enable_interrupts ();
+}
+
+
+
+void @self_move_down (void) {
+ disable_interrupts ();
+ task_create_gid1 (GID_@SELF_MONITOR, @self_move_monitor);
+ @self_timer = 1;
+ sol_enable (@sol);
+ if (@self_state != @SELF_DOWN)
+ @self_state = @SELF_DOWN;
+ enable_interrupts ();
+}
+
+
+
+CALLSET_ENTRY (@self, @up_sw_event) {
+ if (@self_state == @SELF_UP)
+ @self_stop ();
+}
+
+
+
+CALLSET_ENTRY (@self, @down_sw_event) {
+ if (@self_state == @SELF_DOWN)
+ @self_stop ();
+}
+
+
+
+void @self_bump_monitor (void) {
+ sol_enable (@sol);
+ task_sleep(TIME_66MS);
+ sol_disable (@sol);
+ @self_state = @SELF_OFF;
+ task_exit ();
+}
+
+
+
+void @self_bump_up (void) {
+ disable_interrupts ();
+ task_create_gid1 (GID_@SELF_B_MONITOR, @self_bump_monitor);
+ @self_timer = 1;
+ sol_enable (@sol);
+ if (@self_state != @SELF_UP)
+ @self_state = @SELF_UP;
+ enable_interrupts ();
+}
+
+
+
+void @self_bump_down (void) {
+ disable_interrupts ();
+ task_create_gid1 (GID_@SELF_B_MONITOR, @self_bump_monitor);
+ @self_timer = 1;
+ sol_enable (@sol);
+ if (@self_state != @SELF_DOWN)
+ @self_state = @SELF_DOWN;
+ enable_interrupts ();
+}
+
+
+
+CALLSET_ENTRY (@self, tilt, test_start) {
+ @self_state = @SELF_OFF;
+ @self_stop ();
+}
+
+
+
+CALLSET_ENTRY (@self, amode_start) {
+ @self_state = @SELF_INIT;
+ if (@initial_position == @SELF_DOWN) @self_move_down();
+ else @self_move_up();
+}
+
+
+
+
+CALLSET_ENTRY (@self, init) {
+ @self_state = @SELF_OFF;
+ @self_set_speed (@SELF_DUTY_25);
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+/* vim: set filetype=c: */
+
+@@
+@@file @self_test.c
+@@
+
+
+/***********************************************************************
+ * @self test:
+ ***********************************************************************/
+
+
+#include
+#include
+#include
+#include "@self.h"
+
+// FIXME - font_render_string_right vertically offsets the text by 1 pixel (downwards)
+// When this is removed removed all references to FR_WORKAROUND
+#define FRSR_WORKAROUND 1
+
+enum {
+ FIRST_TEST = 0,
+ BUMP_UP = FIRST_TEST,
+ BUMP_DOWN,
+ UP,
+ DOWN,
+ STOP,
+ LAST_TEST = STOP
+} @self_test_command;
+
+
+
+char *@self_test_short_names[] = {
+ "BUMP UP",
+ "BUMP DOWN",
+ "UP",
+ "DOWN",
+ "STOP"
+};
+
+
+
+void @self_test_init (void) { @self_test_command = BUMP_UP; }
+
+
+void @self_test_draw (void) {
+ dmd_alloc_low_clean ();
+ font_render_string_center (&font_var5, 64, 2, "@SELF TEST");
+ dmd_draw_horiz_line ((U16 *)dmd_low_buffer, 5);
+ dmd_draw_horiz_line ((U16 *)dmd_low_buffer, 25);
+
+ //display status of upper limit switch
+ sprintf ("@up_sw_event");
+ font_render_string_center (&font_var5, 64, 13, sprintf_buffer);
+// if (switch_poll_logical (@up_sw_event) ) sprintf ("X");
+// else sprintf ("O");
+// font_render_string_center (&font_var5, 20, 13, sprintf_buffer);
+
+ //display status of lower limit switch
+ sprintf ("@down_sw_event");
+ font_render_string_center (&font_var5, 64, 20, sprintf_buffer);
+// if (switch_poll_logical (@down_sw_event) ) sprintf ("X");
+// else sprintf ("O");
+// font_render_string_center (&font_var5, 20, 20, sprintf_buffer);
+
+ //name of currently running test
+ sprintf(@self_test_short_names[@self_test_command]);
+ font_render_string_left (&font_var5, 0, 27, sprintf_buffer);
+ dmd_show_low ();
+}
+
+
+
+
+void @self_test_thread (void) {
+ for (;;) {
+ task_sleep (TIME_200MS);//this was set to run faster but seemed to cause problems
+ @self_test_draw ();
+ }
+}
+
+
+//up test button pressed
+void @self_test_up (void) {
+ if (@self_test_command < LAST_TEST)
+ @self_test_command++;
+}
+
+
+
+//down test button pressed
+void @self_test_down (void) {
+ if (@self_test_command > FIRST_TEST)
+ @self_test_command--;
+}
+
+
+//escape test button pressed
+void @self_test_escape (void) {
+ // stop everything
+ @self_stop();
+ window_pop();
+}
+
+
+//enter test button pressed
+void @self_test_enter (void) {
+ sound_send (SND_TEST_ENTER);
+ switch (@self_test_command) {
+ case BUMP_UP:
+ @self_bump_up();
+ @self_test_command = BUMP_UP;
+ break;
+ case BUMP_DOWN:
+ @self_bump_down();
+ @self_test_command = BUMP_DOWN;
+ break;
+ case UP:
+ @self_move_up();
+ @self_test_command = DOWN;
+ break;
+ case DOWN:
+ @self_move_down();
+ @self_test_command = STOP;
+ break;
+ case STOP:
+ @self_stop();
+ @self_test_command = BUMP_UP;
+ break;
+ }
+}
+
+
+
+struct window_ops @self_test_window = {
+ DEFAULT_WINDOW,
+ .init = @self_test_init,
+ .draw = @self_test_draw,
+ .up = @self_test_up,
+ .down = @self_test_down,
+ .enter = @self_test_enter,
+ .escape = @self_test_escape,
+ .thread = @self_test_thread,
+};
+
+
+
+struct menu @self_test_item = {
+ .name = "@SELF TEST", // needs @SELF for uppercase version of 'self' as test menu font doesn't have lower-case letters.
+ .flags = M_ITEM,
+ .var = { .subwindow = { &@self_test_window, NULL } },
+};
+
+
+
+
diff --git a/drivers/spinner.ct b/drivers/spinner.ct
index f72b9ad12..80f9a9141 100644
--- a/drivers/spinner.ct
+++ b/drivers/spinner.ct
@@ -59,6 +59,7 @@ extern U8 @self_prev_state;
* process all of the spins in one dispatch. This cuts down
* the overhead in switch scanning and task creation.
*/
+/* RTT(name=@self_service freq=8) */
extern inline void @self_service (void)
{
U8 state = rt_switch_poll (@sw_number);
diff --git a/effect/le-lib.c b/effect/le-lib.c
deleted file mode 100644
index 55f76fdd0..000000000
--- a/effect/le-lib.c
+++ /dev/null
@@ -1,92 +0,0 @@
-
-#include
-
-/**
- * Initialize a lamp inside a lamp effect so that it starts out
- * with the opposite of the default value of the lamp.
- */
-void leff_toggle_basic (U8 lampno)
-{
- if (lamp_test (lampno))
- leff_off (lampno);
- else
- leff_on (lampno);
-}
-
-
-/**
- * Flash a lamp inside a lamp effect.
- */
-void le_flash (U8 lampno, task_ticks_t delay)
-{
- leff_toggle_basic (lampno);
- task_sleep (delay);
- leff_toggle (lampno);
- task_sleep (delay);
-}
-
-
-/**
- * Twitch a lamp. 200ms seems reasonable.
- */
-void le_twitch (U8 lampno)
-{
- le_flash (lampno, TIME_200MS);
-}
-
-
-/**
- * Flicker a lamp; this is just a repeated flashing at high
- * speed.
- */
-void le_flicker (U8 lampno, task_ticks_t duration)
-{
- while (duration > 0)
- {
- le_flash (lampno, TIME_33MS);
- duration -= TIME_66MS;
- }
-}
-
-
-/**
- * Allocate one lamp inside a lamp effect. If the lamp cannot be
- * allocated, the task exits.
- */
-void le_alloc_single (U8 lampno)
-{
- if (!lamp_leff2_test_and_allocate (lampno))
- task_exit ();
-}
-
-
-/**
- * Free one lamp inside a lamp effect.
- */
-void le_free_single (U8 lampno)
-{
- lamp_leff2_free (lampno);
-}
-
-
-/**
- * Mark the current task as a lamp effect.
- */
-void le_init (void)
-{
- leff_data_t * const cdata = task_current_class_data (leff_data_t);
- cdata->flags = L_SHARED;
-}
-
-
-void le_example (void)
-{
- le_init ();
-#ifdef MACHINE_SHOOT_AGAIN_LAMP
- le_alloc_single (MACHINE_SHOOT_AGAIN_LAMP);
- le_flicker (MACHINE_SHOOT_AGAIN_LAMP, TIME_4S);
- le_free_single (MACHINE_SHOOT_AGAIN_LAMP);
-#endif /* MACHINE_SHOOT_AGAIN_LAMP */
- task_exit ();
-}
-
diff --git a/err b/err
new file mode 100644
index 000000000..359606e2b
--- /dev/null
+++ b/err
@@ -0,0 +1,41 @@
+common/dmdtrans.c: In function 'trans_unroll_vertical_init':
+common/dmdtrans.c:549: warning: assignment discards qualifiers from pointer target type
+test/stress.c:156: warning: 'stress_start_button_task' defined but not used
+machine/dm/car_chase.h:292: warning: 'car1W_low_bits' defined but not used
+machine/dm/car_chase.h:313: warning: 'car1W_high_bits' defined but not used
+machine/dm/car_chase.h:377: warning: 'car1Y_low_bits' defined but not used
+machine/dm/car_chase.h:398: warning: 'car1Y_high_bits' defined but not used
+machine/dm/bonus.c: In function 'bonus_button_monitor':
+machine/dm/bonus.c:340: warning: statement with no effect
+
+direct XXXXXXXXXXXXXXXXXXXXX...
+ram XXXXXXXXXXXXXXXXXXX.....
+local XXXXXXXXXXXXX...........
+permanent XXXXX...................
+nvram XXXXX...................
+dirtab XXXXXXXXXXXXXXXXXXXXXXXXX warning: 100% full
+registers ........................
+.flag XXXX....................
+.globalfla........................
+.freetimer........................
+page52 XXXXXXXXXXXXX........... (MACHINE5)
+page53 XXXXXXXXXXXXXXXXXX...... (MACHINE4)
+page54 XXXXXXXXXXXXXXXX........ (MACHINE3)
+page55 XXXXXXXXXXXXXXXXXXXXXXXX warning: 99% full (MACHINE2)
+page56 XXXXXXXXXXXXXXXXXX...... (COMMON)
+page57 XXXXXXXXXX.............. (EFFECT DEFF LEFF TRANS INIT)
+page58 XXXXXXXXXXXXXXXXXXXX.... (TEST MACHINE_TEST)
+page59 XXXXX................... (MACHINE EVENT)
+page60 XXXXXXXXXXXXXXXXXXXXXXXX warning: 99% full (PAGED_MD TEST2 COMMON2)
+page61 XXXXXXXXXXXXXXXXXXXX.... (FONT FON)
+.text XXXXXXXXXXXXXXXXXXX.....
+
+
+
+
+
+
+
+
+
+
diff --git a/fonts/cu17.fon b/fonts/Copy of cu17.fon
similarity index 100%
rename from fonts/cu17.fon
rename to fonts/Copy of cu17.fon
diff --git a/fonts/Makefile b/fonts/Makefile
index 86ff3b329..8a9455d77 100644
--- a/fonts/Makefile
+++ b/fonts/Makefile
@@ -2,53 +2,78 @@
# FONT_OBJS are manually constructed and maintained in .c code.
# FON_OBJS are autogenerated from X fonts. They are maintained as .fon
# files in source control, but can always be regenerated if necessary.
-
CONFIG_FON_BITMAP := y
+FONT_OBJS += $(if $(CONFIG_FON_BITMAP), fonts/bitmap.o)
+FONT_OBJS += $(if $(CONFIG_FON_BITMAP8), fonts/bitmap8.o)
+
FONT_OBJS += $(if $(CONFIG_FON_MONO5), fonts/mono5.o)
FONT_OBJS += $(if $(CONFIG_FON_MONO9), fonts/mono9.o)
FONT_OBJS += $(if $(CONFIG_FON_NUM5X7), fonts/num5x7.o)
-FONT_OBJS += $(if $(CONFIG_FON_VAR5), fonts/var5.o)
+FONT_OBJS += $(if $(CONFIG_FON_SYMBOL), fonts/symbol.o)
FONT_OBJS += $(if $(CONFIG_FON_TINYNUM), fonts/tinynum.o)
-FONT_OBJS += $(if $(CONFIG_FON_BITMAP), fonts/bitmap.o)
-FONT_OBJS += $(if $(CONFIG_FON_BITMAP8), fonts/bitmap8.o)
+FONT_OBJS += $(if $(CONFIG_FON_VAR5), fonts/var5.o)
+FON_OBJS += $(if $(CONFIG_FON_CU17), fonts/cu17.o)
FON_OBJS += $(if $(CONFIG_FON_FIXED10), fonts/fixed10.o)
FON_OBJS += $(if $(CONFIG_FON_FIXED12), fonts/fixed12.o)
FON_OBJS += $(if $(CONFIG_FON_FIXED6), fonts/fixed6.o)
FON_OBJS += $(if $(CONFIG_FON_LUCIDA9), fonts/lucida9.o)
-FON_OBJS += $(if $(CONFIG_FON_CU17), fonts/cu17.o)
+FON_OBJS += $(if $(CONFIG_FON_LUCTYPE), fonts/luctype.o)
+FON_OBJS += $(if $(CONFIG_FON_MISCFIXED), fonts/miscfixed.o)
+FON_OBJS += $(if $(CONFIG_FON_SCHU), fonts/schu.o)
FON_OBJS += $(if $(CONFIG_FON_TERM6), fonts/term6.o)
FON_OBJS += $(if $(CONFIG_FON_TIMES10), fonts/times10.o)
FON_OBJS += $(if $(CONFIG_FON_TIMES8), fonts/times8.o)
FON_OBJS += $(if $(CONFIG_FON_UTOPIA), fonts/utopia.o)
-FON_OBJS += $(if $(CONFIG_FON_SCHU), fonts/schu.o)
-FON_OBJS += $(if $(CONFIG_FON_MISCTYPE), fonts/miscfixed.o)
+
+FON_OBJS += $(if $(CONFIG_FON_CARDONA), fonts/cardona.o)
# The fonts below were derived using fontgen2.
FON_OBJS += $(if $(CONFIG_FON_ADORE64), fonts/free/Adore64.o)
FON_OBJS += $(if $(CONFIG_FON_ADDLG), fonts/free/addlg.o)
FON_OBJS += $(if $(CONFIG_FON_AMBITSEK), fonts/free/ambitsek.o)
+FON_OBJS += $(if $(CONFIG_FON_AMIGA4EVER), fonts/free/amiga4ever.o)
FON_OBJS += $(if $(CONFIG_FON_ARCADEPI), fonts/free/arcadepi.o)
FON_OBJS += $(if $(CONFIG_FON_MICRON55), fonts/free/micron55.o)
FON_OBJS += $(if $(CONFIG_FON_PCSENIOR), fonts/free/pcsenior.o)
FON_OBJS += $(if $(CONFIG_FON_PIXCHICAGO), fonts/free/pixchicago.o)
FON_OBJS += $(if $(CONFIG_FON_PX_SANS_NOUVEAUX), fonts/free/px_sans_nouveaux.o)
-FON_OBJS += $(if $(CONFIG_FON_UNI05_53), fonts/free/uni05_53.o)
FON_OBJS += $(if $(CONFIG_FON_UNI05_54), fonts/free/uni05_54.o)
FON_OBJS += $(if $(CONFIG_FON_UNI05_63), fonts/free/uni05_63.o)
FON_OBJS += $(if $(CONFIG_FON_UNI05_64), fonts/free/uni05_64.o)
FON_OBJS += $(if $(CONFIG_FON_XPAIDERP), fonts/free/xpaiderp.o)
FON_OBJS += $(if $(CONFIG_FON_V5PRC), fonts/free/v5prc.o)
-FON_OBJS += $(if $(CONFIG_FON_V5PRD), fonts/free/v5prd.o)
-FON_OBJS += $(if $(CONFIG_FON_V5PRF), fonts/free/v5prf.o)
FON_OBJS += $(if $(CONFIG_FON_STEEL), fonts/free/steel.o)
FON_OBJS += $(if $(CONFIG_FON_LITHOGRAPH), fonts/free/lithograph.o)
FON_OBJS += $(if $(CONFIG_FON_TWIZONE), fonts/free/twizone.o)
FON_OBJS += $(if $(CONFIG_FON_JOYSTIX), fonts/free/joystix.o)
-FON_OBJS += $(if $(CONFIG_FON_ARIAL11A), fonts/free/arial11a.o)
FON_OBJS += $(if $(CONFIG_FON_ARIAL11B), fonts/free/arial11b.o)
+FON_OBJS += $(if $(CONFIG_FON_C64), fonts/free/c64.o)
FON_OBJS += $(if $(CONFIG_FON_FFFEXTRA), fonts/free/fffextra.o)
+FON_OBJS += $(if $(CONFIG_FON_EMULOGIC), fonts/free/emulogic.o)
+FON_OBJS += $(if $(CONFIG_FON_ABSTRACT), fonts/free/abstract.o)
+FON_OBJS += $(if $(CONFIG_FON_COWBOY), fonts/free/cowboy.o)
+FON_OBJS += $(if $(CONFIG_FON_FIPPS), fonts/free/fipps.o)
+FON_OBJS += $(if $(CONFIG_FON_QUADRIT), fonts/free/quadrit.o)
+FON_OBJS += $(if $(CONFIG_FON_BITOUTLINE), fonts/free/bitoutline.o)
+FON_OBJS += $(if $(CONFIG_FON_BITCUBE10), fonts/free/bitcube10.o)
+FON_OBJS += $(if $(CONFIG_FON_FIREBALL), fonts/free/fireball.o)
+FON_OBJS += $(if $(CONFIG_FON_NAYUPIXEL10), fonts/free/nayupixel10.o)
+FON_OBJS += $(if $(CONFIG_FON_ANTIQUA), fonts/free/antiqua.o)
+FON_OBJS += $(if $(CONFIG_FON_SUPERCAR9), fonts/free/supercar9.o)
+FON_OBJS += $(if $(CONFIG_FON_RENEW8), fonts/free/renew8.o)
+
+
+#these don't work or I don't like
+FON_OBJS += $(if $(CONFIG_FON_PIXELMIX), fonts/free/pixelmix.o)
+FON_OBJS += $(if $(CONFIG_FON_HELLOVETICA), fonts/free/hellovetica.o)
+FON_OBJS += $(if $(CONFIG_FON_CELTICBIT8), fonts/free/celticbit8.o)
+FON_OBJS += $(if $(CONFIG_FON_ARIAL11), fonts/free/arial11.o)
+FON_OBJS += $(if $(CONFIG_FON_ARIAL11A), fonts/free/arial11a.o)
+FON_OBJS += $(if $(CONFIG_FON_V5PRD), fonts/free/v5prd.o)
+FON_OBJS += $(if $(CONFIG_FON_V5PRF), fonts/free/v5prf.o)
+FON_OBJS += $(if $(CONFIG_FON_UNI05_53), fonts/free/uni05_53.o)
diff --git a/fonts/cardona.fon b/fonts/cardona.fon
new file mode 100644
index 000000000..87fb88e5e
--- /dev/null
+++ b/fonts/cardona.fon
@@ -0,0 +1,165 @@
+#include
+
+#define glyph_cardona_1_width 16
+#define glyph_cardona_1_height 20
+static char glyph_cardona_1_bits[] = { glyph_cardona_1_width, glyph_cardona_1_height,
+ 0x7f, 0xfE,
+ 0xC0, 0x03,
+ 0x80, 0x01,
+ 0x80, 0x07,
+ 0x80, 0x04,
+ 0x80, 0x04,
+ 0x80, 0x04,
+ 0x80, 0x04,
+ 0x80, 0x04,
+ 0x80, 0x04,
+ 0x80, 0x04,
+ 0x80, 0x04,
+ 0x80, 0x04,
+ 0x80, 0x04,
+ 0x80, 0x04,
+ 0x80, 0x04,
+ 0x80, 0x04,
+ 0x80, 0x04,
+ 0x80, 0x04,
+ 0xFf, 0xfc,};
+
+#define glyph_cardona_1_in_width 16
+#define glyph_cardona_1_in_height 20
+static char glyph_cardona_1_in_bits[] = { glyph_cardona_1_in_width, glyph_cardona_1_in_height,
+ 0x7f, 0xfE,
+ 0xC0, 0x03,
+ 0x80, 0x01,
+ 0x80, 0x07,
+ 0x80, 0x04,
+ 0x80, 0x04,
+ 0x80, 0x04,
+ 0x80, 0x04,
+ 0x80, 0x04,
+ 0x80, 0x04,
+ 0x80, 0x04,
+ 0x80, 0x04,
+ 0x80, 0x04,
+ 0x80, 0x04,
+ 0x80, 0x04,
+ 0x80, 0x04,
+ 0x80, 0x04,
+ 0x80, 0x04,
+ 0x80, 0x04,
+ 0xFf, 0xfc,};
+
+#define glyph_cardona_2_width 10
+#define glyph_cardona_2_height 10
+static char glyph_cardona_2_bits[] = { glyph_cardona_2_width, glyph_cardona_2_height,
+ 0xFF, // 1111 1111 00 ff.0
+ 0x01, // 0000 0100 00 .1 .0.0
+ 0x01, // 0001 0000 00
+ 0x03, // 1100 1000 01
+ 0x21,
+
+
+ 0x02, //
+ 0x21, //
+ 0x02, //
+ 0x21, //
+ 0x02, //
+ 0x3F, //
+ 0x02, //
+ 0x01, //
+ 0x02, //
+ 0xE1, //
+ 0x03, //
+ 0x01, //
+ 0x02, //
+ 0xFF, //
+ 0x03, };
+
+#define glyph_cardona_3_width 10
+#define glyph_cardona_3_height 10
+static char glyph_cardona_3_bits[] = { glyph_cardona_3_width, glyph_cardona_3_height,
+ 0xFF, 0x01, 0x01, 0x03, 0x21, 0x02, 0x21, 0x02, 0x21, 0x02, 0x3F, 0x02,
+ 0x01, 0x02, 0x3F, 0x02, 0x01, 0x02, 0xFF, 0x03, };
+
+#define glyph_cardona_4_width 10
+#define glyph_cardona_4_height 10
+static char glyph_cardona_4_bits[] = { glyph_cardona_4_width, glyph_cardona_4_height,
+ 0xFF, 0x01, 0x21, 0x03, 0x21, 0x02, 0x21, 0x02, 0x21, 0x02, 0x21, 0x02,
+ 0x01, 0x02, 0x3F, 0x02, 0x20, 0x02, 0xE0, 0x03, };
+
+#define glyph_cardona_5_width 10
+#define glyph_cardona_5_height 10
+static char glyph_cardona_5_bits[] = { glyph_cardona_5_width, glyph_cardona_5_height,
+ 0xFF, 0x01, 0x01, 0x03, 0xE1, 0x03, 0x01, 0x02, 0x3F, 0x02, 0x21, 0x02,
+ 0x21, 0x02, 0x21, 0x02, 0x01, 0x02, 0xFF, 0x03, };
+
+#define glyph_cardona_6_width 10
+#define glyph_cardona_6_height 10
+static char glyph_cardona_6_bits[] = { glyph_cardona_6_width, glyph_cardona_6_height,
+ 0xFF, 0x01, 0x01, 0x03, 0xE1, 0x03, 0x01, 0x02, 0x21, 0x02, 0x21, 0x02,
+ 0x21, 0x02, 0x21, 0x02, 0x01, 0x02, 0xFF, 0x03, };
+
+#define glyph_cardona_7_width 10
+#define glyph_cardona_7_height 10
+static char glyph_cardona_7_bits[] = { glyph_cardona_7_width, glyph_cardona_7_height,
+ 0xFF, 0x01, 0x01, 0x03, 0x1F, 0x02, 0x10, 0x02, 0x10, 0x02, 0x10, 0x02,
+ 0x10, 0x02, 0x10, 0x02, 0x10, 0x02, 0xF0, 0x03, };
+
+#define glyph_cardona_8_width 10
+#define glyph_cardona_8_height 10
+static char glyph_cardona_8_bits[] = { glyph_cardona_8_width, glyph_cardona_8_height,
+ 0xFF, 0x01, 0x01, 0x03, 0x21, 0x02, 0x01, 0x02, 0x21, 0x02, 0x21, 0x02,
+ 0x21, 0x02, 0x21, 0x02, 0x01, 0x02, 0xFF, 0x03, };
+
+#define glyph_cardona_9_width 10
+#define glyph_cardona_9_height 10
+static char glyph_cardona_9_bits[] = { glyph_cardona_9_width, glyph_cardona_9_height,
+ 0xFF, 0x01, 0x01, 0x03, 0x21, 0x02, 0x21, 0x02, 0x21, 0x02, 0x21, 0x02,
+ 0x01, 0x02, 0x3F, 0x02, 0x01, 0x02, 0xFF, 0x03, };
+
+#define glyph_cardona_0_width 24
+#define glyph_cardona_0_height 20
+static char glyph_cardona_0_bits[] = { glyph_cardona_0_width, glyph_cardona_0_height,
+ 0xC0, 0x3F, 0x00, // ########
+ 0x30, 0xD0, 0x01, // ## # ###
+ 0x88, 0x22, 0x06, // # # # # ##
+ 0x04, 0x42, 0x08, // # # # #
+ 0x02, 0x00, 0x10, // # #
+ 0x22, 0x00, 0x20, // # # #
+ 0x01, 0x02, 0x20, // # # #
+ 0x01, 0x02, 0x44, // # # # #
+ 0x01, 0x02, 0x4C, // # # ## #
+ 0x01, 0x00, 0x40, // # #
+ 0xE1, 0x00, 0x41, // # ### # #
+ 0xC1, 0x80, 0x41, // # ## ## #
+ 0x41, 0xC9, 0x45, // # # # # ### # #
+ 0xE2, 0x5F, 0x61, // # ######## # # ##
+ 0x84, 0xAC, 0x22, // # # ## # # # #
+ 0x04, 0x13, 0x30, // # ## # ##
+ 0x18, 0x00, 0x10, // ## #
+ 0x20, 0x00, 0x0C, // # ##
+ 0xC0, 0x01, 0x07, // ### ###
+ 0x00, 0xFE, 0x01, // ########
+};
+
+
+#define BASECHAR ' '
+
+static char *cardona_glyphs[] = {
+ ['1' - BASECHAR] = glyph_cardona_1_bits,
+ ['2' - BASECHAR] = glyph_cardona_2_bits,
+ ['3' - BASECHAR] = glyph_cardona_3_bits,
+ ['4' - BASECHAR] = glyph_cardona_4_bits,
+ ['5' - BASECHAR] = glyph_cardona_5_bits,
+ ['6' - BASECHAR] = glyph_cardona_6_bits,
+ ['7' - BASECHAR] = glyph_cardona_7_bits,
+ ['8' - BASECHAR] = glyph_cardona_8_bits,
+ ['9' - BASECHAR] = glyph_cardona_9_bits,
+ ['0' - BASECHAR] = glyph_cardona_0_bits,
+};
+const font_t font_cardona = {
+ .spacing = 1,
+// .height = 22,
+ .height = 26,
+ .glyphs = cardona_glyphs,
+ .basechar = BASECHAR,
+};
diff --git a/fonts/free/abstract.fon b/fonts/free/abstract.fon
new file mode 100644
index 000000000..9f543208e
--- /dev/null
+++ b/fonts/free/abstract.fon
@@ -0,0 +1,408 @@
+#include
+#define glyph_abstract_period_width 3
+#define glyph_abstract_period_height 3
+static char glyph_abstract_period_bits[] = { glyph_abstract_period_width, glyph_abstract_period_height,
+ 0x07, 0x07, 0x07, };
+#define glyph_abstract_atsign_width 24
+#define glyph_abstract_atsign_height 12
+static char glyph_abstract_atsign_bits[] = { glyph_abstract_atsign_width, glyph_abstract_atsign_height,
+ 0xFF, 0xFF, 0xFF, 0x07, 0x00, 0xE0, 0x07, 0x00, 0xE0, 0xE7, 0xFF, 0xE7,
+ 0xE7, 0x00, 0xE7, 0xE7, 0x00, 0xE7, 0xE7, 0x00, 0xFF, 0xE7, 0xFF, 0xFF,
+ 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0xFF, 0xFF, 0x1F, 0xFF, 0xFF, 0x1F,
+ };
+#define glyph_abstract_dollar_width 24
+#define glyph_abstract_dollar_height 15
+static char glyph_abstract_dollar_bits[] = { glyph_abstract_dollar_width, glyph_abstract_dollar_height,
+ 0xFF, 0xFF, 0xFF, 0x07, 0x38, 0x00, 0x07, 0x38, 0x00, 0x07, 0x38, 0x00,
+ 0x07, 0x38, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x38, 0xE0,
+ 0x00, 0x38, 0xE0, 0x00, 0x38, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
+ 0x00, 0x38, 0x00, 0x00, 0x38, 0x00, 0x00, 0x38, 0x00, };
+#define glyph_abstract_comma_width 3
+#define glyph_abstract_comma_height 6
+static char glyph_abstract_comma_bits[] = { glyph_abstract_comma_width, glyph_abstract_comma_height,
+ 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, };
+#define glyph_abstract_plus_width 18
+#define glyph_abstract_plus_height 12
+static char glyph_abstract_plus_bits[] = { glyph_abstract_plus_width, glyph_abstract_plus_height,
+ 0x00, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0x07, 0x00,
+ 0x00, 0x07, 0x00, 0xFF, 0xFF, 0x01, 0xFF, 0xFF, 0x03, 0x00, 0x07, 0x00,
+ 0x00, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0x07, 0x00,
+ };
+#define glyph_abstract_minus_width 21
+#define glyph_abstract_minus_height 3
+static char glyph_abstract_minus_bits[] = { glyph_abstract_minus_width, glyph_abstract_minus_height,
+ 0xFF, 0xFF, 0x0F, 0xFF, 0xFF, 0x0F, 0xFF, 0xFF, 0x0F, };
+#define glyph_abstract_semicolon_width 3
+#define glyph_abstract_semicolon_height 12
+static char glyph_abstract_semicolon_bits[] = { glyph_abstract_semicolon_width, glyph_abstract_semicolon_height,
+ 0x07, 0x07, 0x00, 0x00, 0x00, 0x00, 0x05, 0x07, 0x07, 0x07, 0x07, 0x07,
+ };
+#define glyph_abstract_colon_width 3
+#define glyph_abstract_colon_height 12
+static char glyph_abstract_colon_bits[] = { glyph_abstract_colon_width, glyph_abstract_colon_height,
+ 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x07,
+ };
+#define glyph_abstract_amp_width 23
+#define glyph_abstract_amp_height 12
+static char glyph_abstract_amp_bits[] = { glyph_abstract_amp_width, glyph_abstract_amp_height,
+ 0xF0, 0xFF, 0x00, 0x70, 0xE0, 0x00, 0x70, 0xE0, 0x00, 0xFF, 0xFF, 0x00,
+ 0xFF, 0xFF, 0x00, 0x07, 0xE0, 0x00, 0x07, 0xE0, 0x38, 0x07, 0xE0, 0x7F,
+ 0x07, 0xE0, 0x07, 0x07, 0xE0, 0x07, 0xFF, 0xFF, 0x7F, 0xFF, 0xFF, 0x38,
+ };
+#define glyph_abstract_bang_width 3
+#define glyph_abstract_bang_height 12
+static char glyph_abstract_bang_bits[] = { glyph_abstract_bang_width, glyph_abstract_bang_height,
+ 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x00, 0x00, 0x07, 0x07,
+ };
+#define glyph_abstract_question_width 19
+#define glyph_abstract_question_height 12
+static char glyph_abstract_question_bits[] = { glyph_abstract_question_width, glyph_abstract_question_height,
+ 0xFF, 0xFF, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0x07,
+ 0x00, 0x00, 0x07, 0x00, 0xFF, 0x07, 0x00, 0xFF, 0x07, 0x00, 0x07, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x07, 0x00,
+ };
+#define glyph_abstract_lbrace_width 6
+#define glyph_abstract_lbrace_height 15
+static char glyph_abstract_lbrace_bits[] = { glyph_abstract_lbrace_width, glyph_abstract_lbrace_height,
+ 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07,
+ 0x07, 0x1F, 0x1F, };
+#define glyph_abstract_rbrace_width 5
+#define glyph_abstract_rbrace_height 15
+static char glyph_abstract_rbrace_bits[] = { glyph_abstract_rbrace_width, glyph_abstract_rbrace_height,
+ 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C,
+ 0x1C, 0x1F, 0x1F, };
+#define glyph_abstract_percent_width 18
+#define glyph_abstract_percent_height 12
+static char glyph_abstract_percent_bits[] = { glyph_abstract_percent_width, glyph_abstract_percent_height,
+ 0x66, 0x70, 0x00, 0xE7, 0x38, 0x00, 0xE7, 0x3C, 0x00, 0xE7, 0x1E, 0x00,
+ 0xFF, 0x1F, 0x00, 0x80, 0x03, 0x00, 0xC0, 0xFB, 0x00, 0xE0, 0x9D, 0x03,
+ 0xF0, 0x9C, 0x03, 0xF0, 0x9C, 0x03, 0x3C, 0x9C, 0x03, 0x1E, 0xF8, 0x00,
+ };
+#define glyph_abstract_lpar_width 5
+#define glyph_abstract_lpar_height 15
+static char glyph_abstract_lpar_bits[] = { glyph_abstract_lpar_width, glyph_abstract_lpar_height,
+ 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07,
+ 0x06, 0x0C, 0x1C, };
+#define glyph_abstract_rpar_width 5
+#define glyph_abstract_rpar_height 15
+static char glyph_abstract_rpar_bits[] = { glyph_abstract_rpar_width, glyph_abstract_rpar_height,
+ 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C,
+ 0x0C, 0x06, 0x07, };
+#define glyph_abstract_hash_width 24
+#define glyph_abstract_hash_height 12
+static char glyph_abstract_hash_bits[] = { glyph_abstract_hash_width, glyph_abstract_hash_height,
+ 0xE0, 0x00, 0x07, 0xE0, 0x00, 0x07, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
+ 0xE0, 0x00, 0x07, 0xE0, 0x00, 0x07, 0xE0, 0x00, 0x07, 0xE0, 0x00, 0x07,
+ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x00, 0x07, 0xE0, 0x00, 0x07,
+ };
+#define glyph_abstract_A_width 24
+#define glyph_abstract_A_height 12
+static char glyph_abstract_A_bits[] = { glyph_abstract_A_width, glyph_abstract_A_height,
+ 0xFF, 0xFF, 0xFF, 0x07, 0x00, 0xE0, 0x07, 0x00, 0xE0, 0x07, 0x00, 0xE0,
+ 0x07, 0x00, 0xE0, 0x07, 0x00, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
+ 0x07, 0x00, 0xE0, 0x07, 0x00, 0xE0, 0x07, 0x00, 0xE0, 0x07, 0x00, 0xE0,
+ };
+#define glyph_abstract_B_width 24
+#define glyph_abstract_B_height 12
+static char glyph_abstract_B_bits[] = { glyph_abstract_B_width, glyph_abstract_B_height,
+ 0xFF, 0xFF, 0x7F, 0x07, 0x00, 0xE0, 0x07, 0x00, 0xE0, 0x07, 0x00, 0xE0,
+ 0x07, 0x00, 0xE0, 0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3F, 0x07, 0x00, 0xE0,
+ 0x07, 0x00, 0xE0, 0x07, 0x00, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F,
+ };
+#define glyph_abstract_C_width 24
+#define glyph_abstract_C_height 12
+static char glyph_abstract_C_bits[] = { glyph_abstract_C_width, glyph_abstract_C_height,
+ 0xFF, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00,
+ 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00,
+ 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
+ };
+#define glyph_abstract_D_width 24
+#define glyph_abstract_D_height 12
+static char glyph_abstract_D_bits[] = { glyph_abstract_D_width, glyph_abstract_D_height,
+ 0xFF, 0xFF, 0x7F, 0x07, 0x00, 0xE0, 0x07, 0x00, 0xE0, 0x07, 0x00, 0xE0,
+ 0x07, 0x00, 0xE0, 0x07, 0x00, 0xE0, 0x07, 0x00, 0xE0, 0x07, 0x00, 0xE0,
+ 0x07, 0x00, 0xE0, 0x07, 0x00, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F,
+ };
+#define glyph_abstract_E_width 24
+#define glyph_abstract_E_height 12
+static char glyph_abstract_E_bits[] = { glyph_abstract_E_width, glyph_abstract_E_height,
+ 0xFF, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00,
+ 0x07, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0x00, 0x00,
+ 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
+ };
+#define glyph_abstract_F_width 24
+#define glyph_abstract_F_height 12
+static char glyph_abstract_F_bits[] = { glyph_abstract_F_width, glyph_abstract_F_height,
+ 0xFF, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00,
+ 0x07, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0x00, 0x00,
+ 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00,
+ };
+#define glyph_abstract_G_width 24
+#define glyph_abstract_G_height 12
+static char glyph_abstract_G_bits[] = { glyph_abstract_G_width, glyph_abstract_G_height,
+ 0xFF, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00,
+ 0x07, 0x00, 0x00, 0x07, 0xFE, 0xFF, 0x07, 0xFE, 0xFF, 0x07, 0x00, 0xE0,
+ 0x07, 0x00, 0xE0, 0x07, 0x00, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
+ };
+#define glyph_abstract_H_width 24
+#define glyph_abstract_H_height 12
+static char glyph_abstract_H_bits[] = { glyph_abstract_H_width, glyph_abstract_H_height,
+ 0x07, 0x00, 0xE0, 0x07, 0x00, 0xE0, 0x07, 0x00, 0xE0, 0x07, 0x00, 0xE0,
+ 0x07, 0x00, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0x00, 0xE0,
+ 0x07, 0x00, 0xE0, 0x07, 0x00, 0xE0, 0x07, 0x00, 0xE0, 0x07, 0x00, 0xE0,
+ };
+#define glyph_abstract_I_width 3
+#define glyph_abstract_I_height 12
+static char glyph_abstract_I_bits[] = { glyph_abstract_I_width, glyph_abstract_I_height,
+ 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07,
+ };
+#define glyph_abstract_J_width 24
+#define glyph_abstract_J_height 12
+static char glyph_abstract_J_bits[] = { glyph_abstract_J_width, glyph_abstract_J_height,
+ 0x00, 0x00, 0xE0, 0x00, 0x00, 0xE0, 0x00, 0x00, 0xE0, 0x00, 0x00, 0xE0,
+ 0x00, 0x00, 0xE0, 0x00, 0x00, 0xE0, 0x00, 0x00, 0xE0, 0x00, 0x00, 0xE0,
+ 0x00, 0x00, 0xE0, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
+ };
+#define glyph_abstract_K_width 24
+#define glyph_abstract_K_height 12
+static char glyph_abstract_K_bits[] = { glyph_abstract_K_width, glyph_abstract_K_height,
+ 0x07, 0x00, 0x70, 0x07, 0x00, 0x18, 0x07, 0x00, 0x3C, 0x07, 0x00, 0x0F,
+ 0x07, 0x00, 0x07, 0xFF, 0xFF, 0x07, 0xFF, 0xFF, 0x07, 0x07, 0x00, 0x0F,
+ 0x07, 0x00, 0x1E, 0x07, 0x00, 0x1C, 0x07, 0x00, 0x78, 0x07, 0x00, 0xF0,
+ };
+#define glyph_abstract_L_width 24
+#define glyph_abstract_L_height 12
+static char glyph_abstract_L_bits[] = { glyph_abstract_L_width, glyph_abstract_L_height,
+ 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00,
+ 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00,
+ 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
+ };
+#define glyph_abstract_M_width 28
+#define glyph_abstract_M_height 12
+static char glyph_abstract_M_bits[] = { glyph_abstract_M_width, glyph_abstract_M_height,
+ 0xFF, 0xFF, 0xFF, 0x0F, 0x03, 0x60, 0x00, 0x0C, 0x03, 0x60, 0x00, 0x0C,
+ 0x03, 0x60, 0x00, 0x0C, 0x03, 0x60, 0x00, 0x0C, 0x03, 0x60, 0x00, 0x0C,
+ 0x03, 0x60, 0x00, 0x0C, 0x03, 0x60, 0x00, 0x0C, 0x03, 0x60, 0x00, 0x0C,
+ 0x03, 0x60, 0x00, 0x0C, 0x03, 0x60, 0x00, 0x0C, 0x03, 0x60, 0x00, 0x0C,
+ };
+#define glyph_abstract_N_width 24
+#define glyph_abstract_N_height 12
+static char glyph_abstract_N_bits[] = { glyph_abstract_N_width, glyph_abstract_N_height,
+ 0xFF, 0xFF, 0xFF, 0x07, 0x00, 0xE0, 0x07, 0x00, 0xE0, 0x07, 0x00, 0xE0,
+ 0x07, 0x00, 0xE0, 0x07, 0x00, 0xE0, 0x07, 0x00, 0xE0, 0x07, 0x00, 0xE0,
+ 0x07, 0x00, 0xE0, 0x07, 0x00, 0xE0, 0x07, 0x00, 0xE0, 0x07, 0x00, 0xE0,
+ };
+#define glyph_abstract_O_width 24
+#define glyph_abstract_O_height 12
+static char glyph_abstract_O_bits[] = { glyph_abstract_O_width, glyph_abstract_O_height,
+ 0xFF, 0xFF, 0xFF, 0x07, 0x00, 0xE0, 0x07, 0x00, 0xE0, 0x07, 0x00, 0xE0,
+ 0x07, 0x00, 0xE0, 0x07, 0x00, 0xE0, 0x07, 0x00, 0xE0, 0x07, 0x00, 0xE0,
+ 0x07, 0x00, 0xE0, 0x07, 0x00, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
+ };
+#define glyph_abstract_P_width 24
+#define glyph_abstract_P_height 12
+static char glyph_abstract_P_bits[] = { glyph_abstract_P_width, glyph_abstract_P_height,
+ 0xFF, 0xFF, 0xFF, 0x07, 0x00, 0xE0, 0x07, 0x00, 0xE0, 0x07, 0x00, 0xE0,
+ 0x07, 0x00, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0x00, 0x00,
+ 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00,
+ };
+#define glyph_abstract_Q_width 24
+#define glyph_abstract_Q_height 16
+static char glyph_abstract_Q_bits[] = { glyph_abstract_Q_width, glyph_abstract_Q_height,
+ 0xFF, 0xFF, 0xFF, 0x07, 0x00, 0xE0, 0x07, 0x00, 0xE0, 0x07, 0x00, 0xE0,
+ 0x07, 0x00, 0xE0, 0x07, 0x00, 0xE0, 0x07, 0x00, 0xE0, 0x07, 0x00, 0xE0,
+ 0x07, 0x00, 0xE0, 0x07, 0x00, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
+ 0x00, 0x38, 0x00, 0x00, 0x38, 0x00, 0x00, 0x38, 0x00, 0x00, 0x38, 0x00,
+ };
+#define glyph_abstract_R_width 24
+#define glyph_abstract_R_height 12
+static char glyph_abstract_R_bits[] = { glyph_abstract_R_width, glyph_abstract_R_height,
+ 0xFF, 0xFF, 0xFF, 0x07, 0x00, 0xE0, 0x07, 0x00, 0xE0, 0x07, 0x00, 0xE0,
+ 0x07, 0x00, 0xE0, 0x07, 0x00, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
+ 0x07, 0x00, 0x1E, 0x07, 0x00, 0x1C, 0x07, 0x00, 0x78, 0x07, 0x00, 0xF0,
+ };
+#define glyph_abstract_S_width 24
+#define glyph_abstract_S_height 12
+static char glyph_abstract_S_bits[] = { glyph_abstract_S_width, glyph_abstract_S_height,
+ 0xFF, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00,
+ 0x07, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xE0,
+ 0x00, 0x00, 0xE0, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
+ };
+#define glyph_abstract_T_width 23
+#define glyph_abstract_T_height 12
+static char glyph_abstract_T_bits[] = { glyph_abstract_T_width, glyph_abstract_T_height,
+ 0xFF, 0xFF, 0x7F, 0x00, 0x1C, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x1C, 0x00,
+ 0x00, 0x1C, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x1C, 0x00,
+ 0x00, 0x1C, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x1C, 0x00,
+ };
+#define glyph_abstract_U_width 24
+#define glyph_abstract_U_height 12
+static char glyph_abstract_U_bits[] = { glyph_abstract_U_width, glyph_abstract_U_height,
+ 0x07, 0x00, 0xE0, 0x07, 0x00, 0xE0, 0x07, 0x00, 0xE0, 0x07, 0x00, 0xE0,
+ 0x07, 0x00, 0xE0, 0x07, 0x00, 0xE0, 0x07, 0x00, 0xE0, 0x07, 0x00, 0xE0,
+ 0x07, 0x00, 0xE0, 0x07, 0x00, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
+ };
+#define glyph_abstract_V_width 26
+#define glyph_abstract_V_height 12
+static char glyph_abstract_V_bits[] = { glyph_abstract_V_width, glyph_abstract_V_height,
+ 0x07, 0x00, 0xC0, 0x01, 0x0C, 0x00, 0xE0, 0x00, 0x1C, 0x00, 0xF0, 0x00,
+ 0x3C, 0x00, 0x78, 0x00, 0xF8, 0x00, 0x3C, 0x00, 0xF0, 0x00, 0x3C, 0x00,
+ 0xE0, 0x01, 0x0F, 0x00, 0x80, 0x83, 0x07, 0x00, 0x80, 0xC7, 0x03, 0x00,
+ 0x00, 0xCF, 0x03, 0x00, 0x00, 0xFE, 0x00, 0x00, 0x00, 0x7C, 0x00, 0x00,
+ };
+#define glyph_abstract_W_width 28
+#define glyph_abstract_W_height 12
+static char glyph_abstract_W_bits[] = { glyph_abstract_W_width, glyph_abstract_W_height,
+ 0x03, 0x60, 0x00, 0x0C, 0x03, 0x60, 0x00, 0x0C, 0x03, 0x60, 0x00, 0x0C,
+ 0x03, 0x60, 0x00, 0x0C, 0x03, 0x60, 0x00, 0x0C, 0x03, 0x60, 0x00, 0x0C,
+ 0x03, 0x60, 0x00, 0x0C, 0x03, 0x60, 0x00, 0x0C, 0x03, 0x60, 0x00, 0x0C,
+ 0x03, 0x60, 0x00, 0x0C, 0xFF, 0xFF, 0xFF, 0x0F, 0xFF, 0xFF, 0xFF, 0x0F,
+ };
+#define glyph_abstract_X_width 24
+#define glyph_abstract_X_height 12
+static char glyph_abstract_X_bits[] = { glyph_abstract_X_width, glyph_abstract_X_height,
+ 0x0E, 0x00, 0x70, 0x1C, 0x00, 0x18, 0x38, 0x00, 0x3C, 0x78, 0x00, 0x0F,
+ 0xF0, 0x00, 0x0F, 0xE0, 0xFF, 0x07, 0xE0, 0xFF, 0x07, 0xF0, 0x00, 0x0F,
+ 0x78, 0x00, 0x1E, 0x1C, 0x00, 0x1C, 0x1E, 0x00, 0x78, 0x0F, 0x00, 0xF0,
+ };
+#define glyph_abstract_Y_width 22
+#define glyph_abstract_Y_height 12
+static char glyph_abstract_Y_bits[] = { glyph_abstract_Y_width, glyph_abstract_Y_height,
+ 0x03, 0x00, 0x30, 0x03, 0x00, 0x30, 0x03, 0x00, 0x30, 0x03, 0x00, 0x30,
+ 0x03, 0x00, 0x30, 0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3F, 0x00, 0x0C, 0x00,
+ 0x00, 0x0C, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x0C, 0x00,
+ };
+#define glyph_abstract_Z_width 24
+#define glyph_abstract_Z_height 12
+static char glyph_abstract_Z_bits[] = { glyph_abstract_Z_width, glyph_abstract_Z_height,
+ 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xE0, 0x00, 0x00, 0xE0, 0x00, 0x00, 0xE0,
+ 0x00, 0x00, 0xE0, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0x07, 0x00, 0x00,
+ 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
+ };
+#define glyph_abstract_0_width 24
+#define glyph_abstract_0_height 12
+static char glyph_abstract_0_bits[] = { glyph_abstract_0_width, glyph_abstract_0_height,
+ 0xFF, 0xFF, 0xFF, 0x07, 0x00, 0xE0, 0x07, 0x00, 0xE0, 0x07, 0x00, 0xE0,
+ 0x07, 0x00, 0xE0, 0x07, 0x00, 0xE0, 0x07, 0x00, 0xE0, 0x07, 0x00, 0xE0,
+ 0x07, 0x00, 0xE0, 0x07, 0x00, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
+ };
+#define glyph_abstract_1_width 3
+#define glyph_abstract_1_height 12
+static char glyph_abstract_1_bits[] = { glyph_abstract_1_width, glyph_abstract_1_height,
+ 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07,
+ };
+#define glyph_abstract_2_width 24
+#define glyph_abstract_2_height 12
+static char glyph_abstract_2_bits[] = { glyph_abstract_2_width, glyph_abstract_2_height,
+ 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xE0, 0x00, 0x00, 0xE0, 0x00, 0x00, 0xE0,
+ 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0x00, 0x00,
+ 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
+ };
+#define glyph_abstract_3_width 24
+#define glyph_abstract_3_height 12
+static char glyph_abstract_3_bits[] = { glyph_abstract_3_width, glyph_abstract_3_height,
+ 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xE0, 0x00, 0x00, 0xE0, 0x00, 0x00, 0xE0,
+ 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xE0,
+ 0x00, 0x00, 0xE0, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
+ };
+#define glyph_abstract_4_width 24
+#define glyph_abstract_4_height 12
+static char glyph_abstract_4_bits[] = { glyph_abstract_4_width, glyph_abstract_4_height,
+ 0x07, 0x00, 0xE0, 0x07, 0x00, 0xE0, 0x07, 0x00, 0xE0, 0x07, 0x00, 0xE0,
+ 0x07, 0x00, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xE0,
+ 0x00, 0x00, 0xE0, 0x00, 0x00, 0xE0, 0x00, 0x00, 0xE0, 0x00, 0x00, 0xE0,
+ };
+#define glyph_abstract_5_width 24
+#define glyph_abstract_5_height 12
+static char glyph_abstract_5_bits[] = { glyph_abstract_5_width, glyph_abstract_5_height,
+ 0xFF, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00,
+ 0x07, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xE0,
+ 0x00, 0x00, 0xE0, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
+ };
+#define glyph_abstract_6_width 24
+#define glyph_abstract_6_height 12
+static char glyph_abstract_6_bits[] = { glyph_abstract_6_width, glyph_abstract_6_height,
+ 0xFF, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00,
+ 0x07, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0x00, 0xE0,
+ 0x07, 0x00, 0xE0, 0x07, 0x00, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
+ };
+#define glyph_abstract_7_width 24
+#define glyph_abstract_7_height 12
+static char glyph_abstract_7_bits[] = { glyph_abstract_7_width, glyph_abstract_7_height,
+ 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xE0, 0x00, 0x00, 0xE0, 0x00, 0x00, 0xE0,
+ 0x00, 0x00, 0xE0, 0x00, 0x00, 0xE0, 0x00, 0x00, 0xE0, 0x00, 0x00, 0xE0,
+ 0x00, 0x00, 0xE0, 0x00, 0x00, 0xE0, 0x00, 0x00, 0xE0, 0x00, 0x00, 0xE0,
+ };
+#define glyph_abstract_8_width 24
+#define glyph_abstract_8_height 12
+static char glyph_abstract_8_bits[] = { glyph_abstract_8_width, glyph_abstract_8_height,
+ 0xFF, 0xFF, 0xFF, 0x07, 0x00, 0xE0, 0x07, 0x00, 0xE0, 0x07, 0x00, 0xE0,
+ 0x07, 0x00, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0x00, 0xE0,
+ 0x07, 0x00, 0xE0, 0x07, 0x00, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
+ };
+#define glyph_abstract_9_width 24
+#define glyph_abstract_9_height 12
+static char glyph_abstract_9_bits[] = { glyph_abstract_9_width, glyph_abstract_9_height,
+ 0xFF, 0xFF, 0xFF, 0x07, 0x00, 0xE0, 0x07, 0x00, 0xE0, 0x07, 0x00, 0xE0,
+ 0x07, 0x00, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xE0,
+ 0x00, 0x00, 0xE0, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
+ };
+static char *abstract_glyphs[] = {
+ ['.'] = glyph_abstract_period_bits,
+ ['@'] = glyph_abstract_atsign_bits,
+ ['$'] = glyph_abstract_dollar_bits,
+ [','] = glyph_abstract_comma_bits,
+ ['+'] = glyph_abstract_plus_bits,
+ ['-'] = glyph_abstract_minus_bits,
+ [';'] = glyph_abstract_semicolon_bits,
+ [':'] = glyph_abstract_colon_bits,
+ ['&'] = glyph_abstract_amp_bits,
+ ['!'] = glyph_abstract_bang_bits,
+ ['?'] = glyph_abstract_question_bits,
+ ['['] = glyph_abstract_lbrace_bits,
+ [']'] = glyph_abstract_rbrace_bits,
+ ['%'] = glyph_abstract_percent_bits,
+ ['('] = glyph_abstract_lpar_bits,
+ [')'] = glyph_abstract_rpar_bits,
+ ['#'] = glyph_abstract_hash_bits,
+ ['A'] = glyph_abstract_A_bits,
+ ['B'] = glyph_abstract_B_bits,
+ ['C'] = glyph_abstract_C_bits,
+ ['D'] = glyph_abstract_D_bits,
+ ['E'] = glyph_abstract_E_bits,
+ ['F'] = glyph_abstract_F_bits,
+ ['G'] = glyph_abstract_G_bits,
+ ['H'] = glyph_abstract_H_bits,
+ ['I'] = glyph_abstract_I_bits,
+ ['J'] = glyph_abstract_J_bits,
+ ['K'] = glyph_abstract_K_bits,
+ ['L'] = glyph_abstract_L_bits,
+ ['M'] = glyph_abstract_M_bits,
+ ['N'] = glyph_abstract_N_bits,
+ ['O'] = glyph_abstract_O_bits,
+ ['P'] = glyph_abstract_P_bits,
+ ['Q'] = glyph_abstract_Q_bits,
+ ['R'] = glyph_abstract_R_bits,
+ ['S'] = glyph_abstract_S_bits,
+ ['T'] = glyph_abstract_T_bits,
+ ['U'] = glyph_abstract_U_bits,
+ ['V'] = glyph_abstract_V_bits,
+ ['W'] = glyph_abstract_W_bits,
+ ['X'] = glyph_abstract_X_bits,
+ ['Y'] = glyph_abstract_Y_bits,
+ ['Z'] = glyph_abstract_Z_bits,
+ ['0'] = glyph_abstract_0_bits,
+ ['1'] = glyph_abstract_1_bits,
+ ['2'] = glyph_abstract_2_bits,
+ ['3'] = glyph_abstract_3_bits,
+ ['4'] = glyph_abstract_4_bits,
+ ['5'] = glyph_abstract_5_bits,
+ ['6'] = glyph_abstract_6_bits,
+ ['7'] = glyph_abstract_7_bits,
+ ['8'] = glyph_abstract_8_bits,
+ ['9'] = glyph_abstract_9_bits,
+};
+const font_t font_abstract = {
+ .height = 10,
+ .glyphs = abstract_glyphs,
+};
diff --git a/fonts/free/antiqua.fon b/fonts/free/antiqua.fon
new file mode 100644
index 000000000..4fa48d2d1
--- /dev/null
+++ b/fonts/free/antiqua.fon
@@ -0,0 +1,277 @@
+#include
+#define glyph_antiqua_period_width 2
+#define glyph_antiqua_period_height 2
+static char glyph_antiqua_period_bits[] = { glyph_antiqua_period_width, glyph_antiqua_period_height,
+ 0x03, 0x03, };
+#define glyph_antiqua_atsign_width 7
+#define glyph_antiqua_atsign_height 7
+static char glyph_antiqua_atsign_bits[] = { glyph_antiqua_atsign_width, glyph_antiqua_atsign_height,
+ 0x3C, 0x42, 0x59, 0x55, 0x39, 0x02, 0x3C, };
+#define glyph_antiqua_dollar_width 6
+#define glyph_antiqua_dollar_height 11
+static char glyph_antiqua_dollar_bits[] = { glyph_antiqua_dollar_width, glyph_antiqua_dollar_height,
+ 0x08, 0x1E, 0x2B, 0x0B, 0x0B, 0x1E, 0x28, 0x2B, 0x2B, 0x1E, 0x08, };
+#define glyph_antiqua_comma_width 2
+#define glyph_antiqua_comma_height 3
+static char glyph_antiqua_comma_bits[] = { glyph_antiqua_comma_width, glyph_antiqua_comma_height,
+ 0x03, 0x02, 0x01, };
+#define glyph_antiqua_plus_width 5
+#define glyph_antiqua_plus_height 5
+static char glyph_antiqua_plus_bits[] = { glyph_antiqua_plus_width, glyph_antiqua_plus_height,
+ 0x04, 0x04, 0x1F, 0x04, 0x04, };
+#define glyph_antiqua_minus_width 4
+#define glyph_antiqua_minus_height 1
+static char glyph_antiqua_minus_bits[] = { glyph_antiqua_minus_width, glyph_antiqua_minus_height,
+ 0x0F, };
+#define glyph_antiqua_semicolon_width 2
+#define glyph_antiqua_semicolon_height 6
+static char glyph_antiqua_semicolon_bits[] = { glyph_antiqua_semicolon_width, glyph_antiqua_semicolon_height,
+ 0x03, 0x03, 0x00, 0x03, 0x02, 0x01, };
+#define glyph_antiqua_colon_width 2
+#define glyph_antiqua_colon_height 6
+static char glyph_antiqua_colon_bits[] = { glyph_antiqua_colon_width, glyph_antiqua_colon_height,
+ 0x03, 0x03, 0x00, 0x00, 0x03, 0x03, };
+#define glyph_antiqua_amp_width 7
+#define glyph_antiqua_amp_height 9
+static char glyph_antiqua_amp_bits[] = { glyph_antiqua_amp_width, glyph_antiqua_amp_height,
+ 0x1C, 0x02, 0x06, 0x6C, 0x3E, 0x1B, 0x33, 0x33, 0x6E, };
+#define glyph_antiqua_bang_width 2
+#define glyph_antiqua_bang_height 9
+static char glyph_antiqua_bang_bits[] = { glyph_antiqua_bang_width, glyph_antiqua_bang_height,
+ 0x03, 0x03, 0x03, 0x03, 0x03, 0x02, 0x00, 0x03, 0x03, };
+#define glyph_antiqua_question_width 5
+#define glyph_antiqua_question_height 9
+static char glyph_antiqua_question_bits[] = { glyph_antiqua_question_width, glyph_antiqua_question_height,
+ 0x0F, 0x19, 0x18, 0x0C, 0x06, 0x06, 0x00, 0x06, 0x06, };
+#define glyph_antiqua_lbrace_width 3
+#define glyph_antiqua_lbrace_height 12
+static char glyph_antiqua_lbrace_bits[] = { glyph_antiqua_lbrace_width, glyph_antiqua_lbrace_height,
+ 0x07, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x07,
+ };
+#define glyph_antiqua_rbrace_width 3
+#define glyph_antiqua_rbrace_height 12
+static char glyph_antiqua_rbrace_bits[] = { glyph_antiqua_rbrace_width, glyph_antiqua_rbrace_height,
+ 0x07, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x07,
+ };
+#define glyph_antiqua_percent_width 6
+#define glyph_antiqua_percent_height 7
+static char glyph_antiqua_percent_bits[] = { glyph_antiqua_percent_width, glyph_antiqua_percent_height,
+ 0x33, 0x1B, 0x18, 0x0C, 0x06, 0x36, 0x33, };
+#define glyph_antiqua_lpar_width 3
+#define glyph_antiqua_lpar_height 10
+static char glyph_antiqua_lpar_bits[] = { glyph_antiqua_lpar_width, glyph_antiqua_lpar_height,
+ 0x04, 0x02, 0x02, 0x03, 0x03, 0x03, 0x03, 0x03, 0x02, 0x04, };
+#define glyph_antiqua_rpar_width 3
+#define glyph_antiqua_rpar_height 10
+static char glyph_antiqua_rpar_bits[] = { glyph_antiqua_rpar_width, glyph_antiqua_rpar_height,
+ 0x01, 0x02, 0x06, 0x06, 0x06, 0x06, 0x06, 0x02, 0x02, 0x01, };
+#define glyph_antiqua_hash_width 7
+#define glyph_antiqua_hash_height 9
+static char glyph_antiqua_hash_bits[] = { glyph_antiqua_hash_width, glyph_antiqua_hash_height,
+ 0x36, 0x36, 0x7F, 0x36, 0x36, 0x36, 0x7F, 0x36, 0x36, };
+#define glyph_antiqua_A_width 7
+#define glyph_antiqua_A_height 9
+static char glyph_antiqua_A_bits[] = { glyph_antiqua_A_width, glyph_antiqua_A_height,
+ 0x18, 0x34, 0x32, 0x62, 0x63, 0x7F, 0x63, 0x63, 0x63, };
+#define glyph_antiqua_B_width 6
+#define glyph_antiqua_B_height 9
+static char glyph_antiqua_B_bits[] = { glyph_antiqua_B_width, glyph_antiqua_B_height,
+ 0x1F, 0x33, 0x33, 0x3B, 0x1F, 0x33, 0x33, 0x33, 0x1F, };
+#define glyph_antiqua_C_width 6
+#define glyph_antiqua_C_height 9
+static char glyph_antiqua_C_bits[] = { glyph_antiqua_C_width, glyph_antiqua_C_height,
+ 0x1E, 0x33, 0x03, 0x03, 0x03, 0x03, 0x03, 0x33, 0x1E, };
+#define glyph_antiqua_D_width 6
+#define glyph_antiqua_D_height 9
+static char glyph_antiqua_D_bits[] = { glyph_antiqua_D_width, glyph_antiqua_D_height,
+ 0x1F, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x1B, 0x0F, };
+#define glyph_antiqua_E_width 5
+#define glyph_antiqua_E_height 9
+static char glyph_antiqua_E_bits[] = { glyph_antiqua_E_width, glyph_antiqua_E_height,
+ 0x1F, 0x13, 0x03, 0x03, 0x0F, 0x03, 0x03, 0x03, 0x1F, };
+#define glyph_antiqua_F_width 5
+#define glyph_antiqua_F_height 9
+static char glyph_antiqua_F_bits[] = { glyph_antiqua_F_width, glyph_antiqua_F_height,
+ 0x1F, 0x13, 0x03, 0x03, 0x0F, 0x03, 0x03, 0x03, 0x03, };
+#define glyph_antiqua_G_width 6
+#define glyph_antiqua_G_height 9
+static char glyph_antiqua_G_bits[] = { glyph_antiqua_G_width, glyph_antiqua_G_height,
+ 0x1E, 0x33, 0x03, 0x03, 0x3B, 0x33, 0x33, 0x33, 0x3E, };
+#define glyph_antiqua_H_width 7
+#define glyph_antiqua_H_height 9
+static char glyph_antiqua_H_bits[] = { glyph_antiqua_H_width, glyph_antiqua_H_height,
+ 0x63, 0x63, 0x63, 0x63, 0x7F, 0x63, 0x63, 0x63, 0x63, };
+#define glyph_antiqua_I_width 4
+#define glyph_antiqua_I_height 9
+static char glyph_antiqua_I_bits[] = { glyph_antiqua_I_width, glyph_antiqua_I_height,
+ 0x0F, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x0F, };
+#define glyph_antiqua_J_width 6
+#define glyph_antiqua_J_height 9
+static char glyph_antiqua_J_bits[] = { glyph_antiqua_J_width, glyph_antiqua_J_height,
+ 0x3E, 0x32, 0x30, 0x30, 0x30, 0x30, 0x30, 0x33, 0x1E, };
+#define glyph_antiqua_K_width 6
+#define glyph_antiqua_K_height 9
+static char glyph_antiqua_K_bits[] = { glyph_antiqua_K_width, glyph_antiqua_K_height,
+ 0x23, 0x33, 0x1B, 0x0F, 0x07, 0x0B, 0x1B, 0x33, 0x33, };
+#define glyph_antiqua_L_width 5
+#define glyph_antiqua_L_height 9
+static char glyph_antiqua_L_bits[] = { glyph_antiqua_L_width, glyph_antiqua_L_height,
+ 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x13, 0x1F, };
+#define glyph_antiqua_M_width 9
+#define glyph_antiqua_M_height 9
+static char glyph_antiqua_M_bits[] = { glyph_antiqua_M_width, glyph_antiqua_M_height,
+ 0x83, 0x01, 0xC6, 0x01, 0xEE, 0x01, 0xAA, 0x00, 0xBA, 0x00, 0x92, 0x00,
+ 0x83, 0x01, 0x83, 0x01, 0x83, 0x01, };
+#define glyph_antiqua_N_width 7
+#define glyph_antiqua_N_height 9
+static char glyph_antiqua_N_bits[] = { glyph_antiqua_N_width, glyph_antiqua_N_height,
+ 0x63, 0x63, 0x67, 0x6F, 0x7B, 0x73, 0x63, 0x63, 0x43, };
+#define glyph_antiqua_O_width 7
+#define glyph_antiqua_O_height 9
+static char glyph_antiqua_O_bits[] = { glyph_antiqua_O_width, glyph_antiqua_O_height,
+ 0x3C, 0x72, 0x63, 0x63, 0x63, 0x63, 0x63, 0x27, 0x1E, };
+#define glyph_antiqua_P_width 6
+#define glyph_antiqua_P_height 9
+static char glyph_antiqua_P_bits[] = { glyph_antiqua_P_width, glyph_antiqua_P_height,
+ 0x1F, 0x33, 0x33, 0x33, 0x33, 0x1F, 0x03, 0x03, 0x03, };
+#define glyph_antiqua_Q_width 7
+#define glyph_antiqua_Q_height 10
+static char glyph_antiqua_Q_bits[] = { glyph_antiqua_Q_width, glyph_antiqua_Q_height,
+ 0x3C, 0x72, 0x63, 0x63, 0x63, 0x63, 0x63, 0x27, 0x1E, 0x78, };
+#define glyph_antiqua_R_width 6
+#define glyph_antiqua_R_height 9
+static char glyph_antiqua_R_bits[] = { glyph_antiqua_R_width, glyph_antiqua_R_height,
+ 0x1F, 0x33, 0x33, 0x33, 0x1F, 0x0F, 0x1B, 0x3B, 0x33, };
+#define glyph_antiqua_S_width 6
+#define glyph_antiqua_S_height 9
+static char glyph_antiqua_S_bits[] = { glyph_antiqua_S_width, glyph_antiqua_S_height,
+ 0x1E, 0x33, 0x07, 0x0E, 0x1C, 0x38, 0x30, 0x33, 0x1E, };
+#define glyph_antiqua_T_width 6
+#define glyph_antiqua_T_height 9
+static char glyph_antiqua_T_bits[] = { glyph_antiqua_T_width, glyph_antiqua_T_height,
+ 0x3F, 0x0D, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, };
+#define glyph_antiqua_U_width 6
+#define glyph_antiqua_U_height 9
+static char glyph_antiqua_U_bits[] = { glyph_antiqua_U_width, glyph_antiqua_U_height,
+ 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x2E, };
+#define glyph_antiqua_V_width 7
+#define glyph_antiqua_V_height 9
+static char glyph_antiqua_V_bits[] = { glyph_antiqua_V_width, glyph_antiqua_V_height,
+ 0x63, 0x63, 0x63, 0x63, 0x26, 0x36, 0x14, 0x1C, 0x08, };
+#define glyph_antiqua_W_width 9
+#define glyph_antiqua_W_height 9
+static char glyph_antiqua_W_bits[] = { glyph_antiqua_W_width, glyph_antiqua_W_height,
+ 0xC3, 0x00, 0x83, 0x01, 0x93, 0x01, 0x93, 0x01, 0xBB, 0x01, 0xBB, 0x00,
+ 0xEE, 0x00, 0x66, 0x00, 0x66, 0x00, };
+#define glyph_antiqua_X_width 7
+#define glyph_antiqua_X_height 9
+static char glyph_antiqua_X_bits[] = { glyph_antiqua_X_width, glyph_antiqua_X_height,
+ 0x63, 0x63, 0x26, 0x16, 0x1C, 0x34, 0x32, 0x63, 0x63, };
+#define glyph_antiqua_Y_width 6
+#define glyph_antiqua_Y_height 9
+static char glyph_antiqua_Y_bits[] = { glyph_antiqua_Y_width, glyph_antiqua_Y_height,
+ 0x33, 0x33, 0x33, 0x16, 0x1E, 0x0C, 0x0C, 0x0C, 0x0C, };
+#define glyph_antiqua_Z_width 5
+#define glyph_antiqua_Z_height 9
+static char glyph_antiqua_Z_bits[] = { glyph_antiqua_Z_width, glyph_antiqua_Z_height,
+ 0x1F, 0x19, 0x08, 0x0C, 0x06, 0x06, 0x03, 0x13, 0x1F, };
+#define glyph_antiqua_0_width 7
+#define glyph_antiqua_0_height 7
+static char glyph_antiqua_0_bits[] = { glyph_antiqua_0_width, glyph_antiqua_0_height,
+ 0x1C, 0x36, 0x63, 0x63, 0x63, 0x36, 0x1C, };
+#define glyph_antiqua_1_width 4
+#define glyph_antiqua_1_height 7
+static char glyph_antiqua_1_bits[] = { glyph_antiqua_1_width, glyph_antiqua_1_height,
+ 0x06, 0x07, 0x06, 0x06, 0x06, 0x06, 0x0F, };
+#define glyph_antiqua_2_width 5
+#define glyph_antiqua_2_height 7
+static char glyph_antiqua_2_bits[] = { glyph_antiqua_2_width, glyph_antiqua_2_height,
+ 0x0E, 0x19, 0x18, 0x0C, 0x06, 0x13, 0x1F, };
+#define glyph_antiqua_3_width 5
+#define glyph_antiqua_3_height 9
+static char glyph_antiqua_3_bits[] = { glyph_antiqua_3_width, glyph_antiqua_3_height,
+ 0x0E, 0x19, 0x18, 0x0C, 0x0E, 0x18, 0x18, 0x19, 0x0E, };
+#define glyph_antiqua_4_width 6
+#define glyph_antiqua_4_height 9
+static char glyph_antiqua_4_bits[] = { glyph_antiqua_4_width, glyph_antiqua_4_height,
+ 0x18, 0x1C, 0x06, 0x03, 0x1B, 0x1B, 0x3F, 0x18, 0x18, };
+#define glyph_antiqua_5_width 5
+#define glyph_antiqua_5_height 9
+static char glyph_antiqua_5_bits[] = { glyph_antiqua_5_width, glyph_antiqua_5_height,
+ 0x1F, 0x03, 0x03, 0x0F, 0x18, 0x18, 0x18, 0x19, 0x0E, };
+#define glyph_antiqua_6_width 6
+#define glyph_antiqua_6_height 9
+static char glyph_antiqua_6_bits[] = { glyph_antiqua_6_width, glyph_antiqua_6_height,
+ 0x18, 0x0C, 0x06, 0x1F, 0x33, 0x33, 0x33, 0x33, 0x1E, };
+#define glyph_antiqua_7_width 6
+#define glyph_antiqua_7_height 9
+static char glyph_antiqua_7_bits[] = { glyph_antiqua_7_width, glyph_antiqua_7_height,
+ 0x3F, 0x31, 0x30, 0x18, 0x0C, 0x0C, 0x06, 0x06, 0x06, };
+#define glyph_antiqua_8_width 6
+#define glyph_antiqua_8_height 9
+static char glyph_antiqua_8_bits[] = { glyph_antiqua_8_width, glyph_antiqua_8_height,
+ 0x1E, 0x33, 0x33, 0x33, 0x1E, 0x33, 0x33, 0x33, 0x1E, };
+#define glyph_antiqua_9_width 6
+#define glyph_antiqua_9_height 9
+static char glyph_antiqua_9_bits[] = { glyph_antiqua_9_width, glyph_antiqua_9_height,
+ 0x1E, 0x33, 0x33, 0x33, 0x33, 0x3E, 0x30, 0x18, 0x0E, };
+static char *antiqua_glyphs[] = {
+ ['.'] = glyph_antiqua_period_bits,
+ ['@'] = glyph_antiqua_atsign_bits,
+ ['$'] = glyph_antiqua_dollar_bits,
+ [','] = glyph_antiqua_comma_bits,
+ ['+'] = glyph_antiqua_plus_bits,
+ ['-'] = glyph_antiqua_minus_bits,
+ [';'] = glyph_antiqua_semicolon_bits,
+ [':'] = glyph_antiqua_colon_bits,
+ ['&'] = glyph_antiqua_amp_bits,
+ ['!'] = glyph_antiqua_bang_bits,
+ ['?'] = glyph_antiqua_question_bits,
+ ['['] = glyph_antiqua_lbrace_bits,
+ [']'] = glyph_antiqua_rbrace_bits,
+ ['%'] = glyph_antiqua_percent_bits,
+ ['('] = glyph_antiqua_lpar_bits,
+ [')'] = glyph_antiqua_rpar_bits,
+ ['#'] = glyph_antiqua_hash_bits,
+ ['A'] = glyph_antiqua_A_bits,
+ ['B'] = glyph_antiqua_B_bits,
+ ['C'] = glyph_antiqua_C_bits,
+ ['D'] = glyph_antiqua_D_bits,
+ ['E'] = glyph_antiqua_E_bits,
+ ['F'] = glyph_antiqua_F_bits,
+ ['G'] = glyph_antiqua_G_bits,
+ ['H'] = glyph_antiqua_H_bits,
+ ['I'] = glyph_antiqua_I_bits,
+ ['J'] = glyph_antiqua_J_bits,
+ ['K'] = glyph_antiqua_K_bits,
+ ['L'] = glyph_antiqua_L_bits,
+ ['M'] = glyph_antiqua_M_bits,
+ ['N'] = glyph_antiqua_N_bits,
+ ['O'] = glyph_antiqua_O_bits,
+ ['P'] = glyph_antiqua_P_bits,
+ ['Q'] = glyph_antiqua_Q_bits,
+ ['R'] = glyph_antiqua_R_bits,
+ ['S'] = glyph_antiqua_S_bits,
+ ['T'] = glyph_antiqua_T_bits,
+ ['U'] = glyph_antiqua_U_bits,
+ ['V'] = glyph_antiqua_V_bits,
+ ['W'] = glyph_antiqua_W_bits,
+ ['X'] = glyph_antiqua_X_bits,
+ ['Y'] = glyph_antiqua_Y_bits,
+ ['Z'] = glyph_antiqua_Z_bits,
+ ['0'] = glyph_antiqua_0_bits,
+ ['1'] = glyph_antiqua_1_bits,
+ ['2'] = glyph_antiqua_2_bits,
+ ['3'] = glyph_antiqua_3_bits,
+ ['4'] = glyph_antiqua_4_bits,
+ ['5'] = glyph_antiqua_5_bits,
+ ['6'] = glyph_antiqua_6_bits,
+ ['7'] = glyph_antiqua_7_bits,
+ ['8'] = glyph_antiqua_8_bits,
+ ['9'] = glyph_antiqua_9_bits,
+};
+const font_t font_antiqua = {
+ .height = 12,
+ .spacing = 1,
+ .glyphs = antiqua_glyphs,
+};
diff --git a/fonts/free/bitcube10.fon b/fonts/free/bitcube10.fon
new file mode 100644
index 000000000..5743db918
--- /dev/null
+++ b/fonts/free/bitcube10.fon
@@ -0,0 +1,202 @@
+#include
+#define glyph_bitcube10_dollar_width 6
+#define glyph_bitcube10_dollar_height 8
+static char glyph_bitcube10_dollar_bits[] = { glyph_bitcube10_dollar_width, glyph_bitcube10_dollar_height,
+ 0x3E, 0x3F, 0x33, 0x3D, 0x31, 0x37, 0x39, 0x1F, };
+#define glyph_bitcube10_minus_width 4
+#define glyph_bitcube10_minus_height 2
+static char glyph_bitcube10_minus_bits[] = { glyph_bitcube10_minus_width, glyph_bitcube10_minus_height,
+ 0x0F, 0x00, };
+#define glyph_bitcube10_question_width 6
+#define glyph_bitcube10_question_height 8
+static char glyph_bitcube10_question_bits[] = { glyph_bitcube10_question_width, glyph_bitcube10_question_height,
+ 0x3E, 0x3F, 0x31, 0x37, 0x31, 0x3F, 0x3B, 0x1F, };
+#define glyph_bitcube10_A_width 6
+#define glyph_bitcube10_A_height 8
+static char glyph_bitcube10_A_bits[] = { glyph_bitcube10_A_width, glyph_bitcube10_A_height,
+ 0x3E, 0x3F, 0x31, 0x35, 0x31, 0x35, 0x35, 0x1F, };
+#define glyph_bitcube10_B_width 6
+#define glyph_bitcube10_B_height 8
+static char glyph_bitcube10_B_bits[] = { glyph_bitcube10_B_width, glyph_bitcube10_B_height,
+ 0x3E, 0x3F, 0x31, 0x35, 0x31, 0x35, 0x31, 0x1F, };
+#define glyph_bitcube10_C_width 6
+#define glyph_bitcube10_C_height 8
+static char glyph_bitcube10_C_bits[] = { glyph_bitcube10_C_width, glyph_bitcube10_C_height,
+ 0x3E, 0x3F, 0x31, 0x35, 0x3D, 0x35, 0x31, 0x1F, };
+#define glyph_bitcube10_D_width 6
+#define glyph_bitcube10_D_height 8
+static char glyph_bitcube10_D_bits[] = { glyph_bitcube10_D_width, glyph_bitcube10_D_height,
+ 0x3E, 0x3F, 0x39, 0x35, 0x35, 0x35, 0x39, 0x1F, };
+#define glyph_bitcube10_E_width 6
+#define glyph_bitcube10_E_height 8
+static char glyph_bitcube10_E_bits[] = { glyph_bitcube10_E_width, glyph_bitcube10_E_height,
+ 0x3E, 0x3F, 0x31, 0x3D, 0x31, 0x3D, 0x31, 0x1F, };
+#define glyph_bitcube10_F_width 6
+#define glyph_bitcube10_F_height 8
+static char glyph_bitcube10_F_bits[] = { glyph_bitcube10_F_width, glyph_bitcube10_F_height,
+ 0x3E, 0x3F, 0x31, 0x3D, 0x31, 0x3D, 0x3D, 0x1F, };
+#define glyph_bitcube10_G_width 6
+#define glyph_bitcube10_G_height 8
+static char glyph_bitcube10_G_bits[] = { glyph_bitcube10_G_width, glyph_bitcube10_G_height,
+ 0x3E, 0x3F, 0x31, 0x3D, 0x3D, 0x35, 0x31, 0x1F, };
+#define glyph_bitcube10_H_width 6
+#define glyph_bitcube10_H_height 8
+static char glyph_bitcube10_H_bits[] = { glyph_bitcube10_H_width, glyph_bitcube10_H_height,
+ 0x3E, 0x3F, 0x35, 0x35, 0x31, 0x35, 0x35, 0x1F, };
+#define glyph_bitcube10_I_width 6
+#define glyph_bitcube10_I_height 8
+static char glyph_bitcube10_I_bits[] = { glyph_bitcube10_I_width, glyph_bitcube10_I_height,
+ 0x3E, 0x3F, 0x31, 0x3B, 0x3B, 0x3B, 0x31, 0x1F, };
+#define glyph_bitcube10_J_width 6
+#define glyph_bitcube10_J_height 8
+static char glyph_bitcube10_J_bits[] = { glyph_bitcube10_J_width, glyph_bitcube10_J_height,
+ 0x3E, 0x3F, 0x31, 0x37, 0x37, 0x35, 0x31, 0x1F, };
+#define glyph_bitcube10_K_width 6
+#define glyph_bitcube10_K_height 8
+static char glyph_bitcube10_K_bits[] = { glyph_bitcube10_K_width, glyph_bitcube10_K_height,
+ 0x3E, 0x3F, 0x35, 0x35, 0x39, 0x35, 0x35, 0x1F, };
+#define glyph_bitcube10_L_width 6
+#define glyph_bitcube10_L_height 8
+static char glyph_bitcube10_L_bits[] = { glyph_bitcube10_L_width, glyph_bitcube10_L_height,
+ 0x3E, 0x3F, 0x3D, 0x3D, 0x3D, 0x3D, 0x31, 0x1F, };
+#define glyph_bitcube10_M_width 6
+#define glyph_bitcube10_M_height 8
+static char glyph_bitcube10_M_bits[] = { glyph_bitcube10_M_width, glyph_bitcube10_M_height,
+ 0x3E, 0x3F, 0x35, 0x31, 0x35, 0x35, 0x35, 0x1F, };
+#define glyph_bitcube10_N_width 6
+#define glyph_bitcube10_N_height 8
+static char glyph_bitcube10_N_bits[] = { glyph_bitcube10_N_width, glyph_bitcube10_N_height,
+ 0x3E, 0x3F, 0x31, 0x35, 0x35, 0x35, 0x35, 0x1F, };
+#define glyph_bitcube10_O_width 6
+#define glyph_bitcube10_O_height 8
+static char glyph_bitcube10_O_bits[] = { glyph_bitcube10_O_width, glyph_bitcube10_O_height,
+ 0x3E, 0x3F, 0x31, 0x35, 0x35, 0x35, 0x31, 0x1F, };
+#define glyph_bitcube10_P_width 6
+#define glyph_bitcube10_P_height 8
+static char glyph_bitcube10_P_bits[] = { glyph_bitcube10_P_width, glyph_bitcube10_P_height,
+ 0x3E, 0x3F, 0x31, 0x35, 0x31, 0x3D, 0x3D, 0x1F, };
+#define glyph_bitcube10_Q_width 6
+#define glyph_bitcube10_Q_height 8
+static char glyph_bitcube10_Q_bits[] = { glyph_bitcube10_Q_width, glyph_bitcube10_Q_height,
+ 0x3E, 0x3F, 0x31, 0x35, 0x35, 0x35, 0x31, 0x17, };
+#define glyph_bitcube10_R_width 6
+#define glyph_bitcube10_R_height 8
+static char glyph_bitcube10_R_bits[] = { glyph_bitcube10_R_width, glyph_bitcube10_R_height,
+ 0x3E, 0x3F, 0x31, 0x35, 0x39, 0x35, 0x35, 0x1F, };
+#define glyph_bitcube10_S_width 6
+#define glyph_bitcube10_S_height 8
+static char glyph_bitcube10_S_bits[] = { glyph_bitcube10_S_width, glyph_bitcube10_S_height,
+ 0x3E, 0x3F, 0x31, 0x3D, 0x31, 0x37, 0x31, 0x1F, };
+#define glyph_bitcube10_T_width 6
+#define glyph_bitcube10_T_height 8
+static char glyph_bitcube10_T_bits[] = { glyph_bitcube10_T_width, glyph_bitcube10_T_height,
+ 0x3E, 0x3F, 0x31, 0x3B, 0x3B, 0x3B, 0x3B, 0x1F, };
+#define glyph_bitcube10_U_width 6
+#define glyph_bitcube10_U_height 8
+static char glyph_bitcube10_U_bits[] = { glyph_bitcube10_U_width, glyph_bitcube10_U_height,
+ 0x3E, 0x3F, 0x35, 0x35, 0x35, 0x35, 0x31, 0x1F, };
+#define glyph_bitcube10_V_width 6
+#define glyph_bitcube10_V_height 8
+static char glyph_bitcube10_V_bits[] = { glyph_bitcube10_V_width, glyph_bitcube10_V_height,
+ 0x3E, 0x3F, 0x35, 0x35, 0x35, 0x31, 0x3B, 0x1F, };
+#define glyph_bitcube10_W_width 6
+#define glyph_bitcube10_W_height 8
+static char glyph_bitcube10_W_bits[] = { glyph_bitcube10_W_width, glyph_bitcube10_W_height,
+ 0x3E, 0x3F, 0x35, 0x35, 0x31, 0x31, 0x35, 0x1F, };
+#define glyph_bitcube10_X_width 6
+#define glyph_bitcube10_X_height 8
+static char glyph_bitcube10_X_bits[] = { glyph_bitcube10_X_width, glyph_bitcube10_X_height,
+ 0x3E, 0x3F, 0x35, 0x31, 0x3B, 0x31, 0x35, 0x1F, };
+#define glyph_bitcube10_Y_width 6
+#define glyph_bitcube10_Y_height 8
+static char glyph_bitcube10_Y_bits[] = { glyph_bitcube10_Y_width, glyph_bitcube10_Y_height,
+ 0x3E, 0x3F, 0x35, 0x35, 0x31, 0x3B, 0x3B, 0x1F, };
+#define glyph_bitcube10_Z_width 6
+#define glyph_bitcube10_Z_height 8
+static char glyph_bitcube10_Z_bits[] = { glyph_bitcube10_Z_width, glyph_bitcube10_Z_height,
+ 0x3E, 0x3F, 0x31, 0x37, 0x31, 0x3D, 0x31, 0x1F, };
+#define glyph_bitcube10_0_width 6
+#define glyph_bitcube10_0_height 8
+static char glyph_bitcube10_0_bits[] = { glyph_bitcube10_0_width, glyph_bitcube10_0_height,
+ 0x3E, 0x3F, 0x31, 0x35, 0x35, 0x35, 0x31, 0x1F, };
+#define glyph_bitcube10_1_width 6
+#define glyph_bitcube10_1_height 8
+static char glyph_bitcube10_1_bits[] = { glyph_bitcube10_1_width, glyph_bitcube10_1_height,
+ 0x3E, 0x3F, 0x3B, 0x39, 0x3B, 0x3B, 0x31, 0x1F, };
+#define glyph_bitcube10_2_width 6
+#define glyph_bitcube10_2_height 8
+static char glyph_bitcube10_2_bits[] = { glyph_bitcube10_2_width, glyph_bitcube10_2_height,
+ 0x3E, 0x3F, 0x31, 0x37, 0x31, 0x3D, 0x31, 0x1F, };
+#define glyph_bitcube10_3_width 6
+#define glyph_bitcube10_3_height 8
+static char glyph_bitcube10_3_bits[] = { glyph_bitcube10_3_width, glyph_bitcube10_3_height,
+ 0x3E, 0x3F, 0x31, 0x37, 0x31, 0x37, 0x31, 0x1F, };
+#define glyph_bitcube10_4_width 6
+#define glyph_bitcube10_4_height 8
+static char glyph_bitcube10_4_bits[] = { glyph_bitcube10_4_width, glyph_bitcube10_4_height,
+ 0x3E, 0x3F, 0x35, 0x35, 0x31, 0x37, 0x37, 0x1F, };
+#define glyph_bitcube10_5_width 6
+#define glyph_bitcube10_5_height 8
+static char glyph_bitcube10_5_bits[] = { glyph_bitcube10_5_width, glyph_bitcube10_5_height,
+ 0x3E, 0x3F, 0x31, 0x3D, 0x31, 0x37, 0x31, 0x1F, };
+#define glyph_bitcube10_6_width 6
+#define glyph_bitcube10_6_height 8
+static char glyph_bitcube10_6_bits[] = { glyph_bitcube10_6_width, glyph_bitcube10_6_height,
+ 0x3E, 0x3F, 0x31, 0x3D, 0x31, 0x35, 0x31, 0x1F, };
+#define glyph_bitcube10_7_width 6
+#define glyph_bitcube10_7_height 8
+static char glyph_bitcube10_7_bits[] = { glyph_bitcube10_7_width, glyph_bitcube10_7_height,
+ 0x3E, 0x3F, 0x31, 0x37, 0x37, 0x37, 0x37, 0x1F, };
+#define glyph_bitcube10_8_width 6
+#define glyph_bitcube10_8_height 8
+static char glyph_bitcube10_8_bits[] = { glyph_bitcube10_8_width, glyph_bitcube10_8_height,
+ 0x3E, 0x3F, 0x31, 0x35, 0x31, 0x35, 0x31, 0x1F, };
+#define glyph_bitcube10_9_width 6
+#define glyph_bitcube10_9_height 8
+static char glyph_bitcube10_9_bits[] = { glyph_bitcube10_9_width, glyph_bitcube10_9_height,
+ 0x3E, 0x3F, 0x31, 0x35, 0x31, 0x37, 0x31, 0x1F, };
+static char *bitcube10_glyphs[] = {
+ ['$'] = glyph_bitcube10_dollar_bits,
+ ['-'] = glyph_bitcube10_minus_bits,
+ ['?'] = glyph_bitcube10_question_bits,
+ ['A'] = glyph_bitcube10_A_bits,
+ ['B'] = glyph_bitcube10_B_bits,
+ ['C'] = glyph_bitcube10_C_bits,
+ ['D'] = glyph_bitcube10_D_bits,
+ ['E'] = glyph_bitcube10_E_bits,
+ ['F'] = glyph_bitcube10_F_bits,
+ ['G'] = glyph_bitcube10_G_bits,
+ ['H'] = glyph_bitcube10_H_bits,
+ ['I'] = glyph_bitcube10_I_bits,
+ ['J'] = glyph_bitcube10_J_bits,
+ ['K'] = glyph_bitcube10_K_bits,
+ ['L'] = glyph_bitcube10_L_bits,
+ ['M'] = glyph_bitcube10_M_bits,
+ ['N'] = glyph_bitcube10_N_bits,
+ ['O'] = glyph_bitcube10_O_bits,
+ ['P'] = glyph_bitcube10_P_bits,
+ ['Q'] = glyph_bitcube10_Q_bits,
+ ['R'] = glyph_bitcube10_R_bits,
+ ['S'] = glyph_bitcube10_S_bits,
+ ['T'] = glyph_bitcube10_T_bits,
+ ['U'] = glyph_bitcube10_U_bits,
+ ['V'] = glyph_bitcube10_V_bits,
+ ['W'] = glyph_bitcube10_W_bits,
+ ['X'] = glyph_bitcube10_X_bits,
+ ['Y'] = glyph_bitcube10_Y_bits,
+ ['Z'] = glyph_bitcube10_Z_bits,
+ ['0'] = glyph_bitcube10_0_bits,
+ ['1'] = glyph_bitcube10_1_bits,
+ ['2'] = glyph_bitcube10_2_bits,
+ ['3'] = glyph_bitcube10_3_bits,
+ ['4'] = glyph_bitcube10_4_bits,
+ ['5'] = glyph_bitcube10_5_bits,
+ ['6'] = glyph_bitcube10_6_bits,
+ ['7'] = glyph_bitcube10_7_bits,
+ ['8'] = glyph_bitcube10_8_bits,
+ ['9'] = glyph_bitcube10_9_bits,
+};
+const font_t font_bitcube10 = {
+ .height = 10,
+ .glyphs = bitcube10_glyphs,
+};
diff --git a/fonts/free/bitcube12.fon b/fonts/free/bitcube12.fon
new file mode 100644
index 000000000..b3d2c9f41
--- /dev/null
+++ b/fonts/free/bitcube12.fon
@@ -0,0 +1,289 @@
+#include
+#define glyph_bitcube12_period_width 6
+#define glyph_bitcube12_period_height 6
+static char glyph_bitcube12_period_bits[] = { glyph_bitcube12_period_width, glyph_bitcube12_period_height,
+ 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, };
+#define glyph_bitcube12_dollar_width 10
+#define glyph_bitcube12_dollar_height 13
+static char glyph_bitcube12_dollar_bits[] = { glyph_bitcube12_dollar_width, glyph_bitcube12_dollar_height,
+ 0x54, 0x01, 0xFC, 0x01, 0xFF, 0x01, 0xFF, 0x03, 0xC7, 0x01, 0xFB, 0x03,
+ 0xF3, 0x01, 0xC1, 0x01, 0xCF, 0x03, 0xDF, 0x01, 0xE1, 0x01, 0xF7, 0x00,
+ 0xFF, 0x00, };
+#define glyph_bitcube12_comma_width 6
+#define glyph_bitcube12_comma_height 12
+static char glyph_bitcube12_comma_bits[] = { glyph_bitcube12_comma_width, glyph_bitcube12_comma_height,
+ 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F,
+ };
+#define glyph_bitcube12_minus_width 8
+#define glyph_bitcube12_minus_height 3
+static char glyph_bitcube12_minus_bits[] = { glyph_bitcube12_minus_width, glyph_bitcube12_minus_height,
+ 0x00, 0x7F, 0x00, };
+#define glyph_bitcube12_question_width 10
+#define glyph_bitcube12_question_height 13
+static char glyph_bitcube12_question_bits[] = { glyph_bitcube12_question_width, glyph_bitcube12_question_height,
+ 0xA8, 0x01, 0xFC, 0x01, 0xFF, 0x01, 0xFF, 0x03, 0xC1, 0x01, 0xCF, 0x03,
+ 0xC7, 0x01, 0xC3, 0x01, 0xFF, 0x03, 0xFF, 0x01, 0xE7, 0x01, 0xFF, 0x00,
+ 0xFF, 0x00, };
+#define glyph_bitcube12_A_width 10
+#define glyph_bitcube12_A_height 13
+static char glyph_bitcube12_A_bits[] = { glyph_bitcube12_A_width, glyph_bitcube12_A_height,
+ 0xB4, 0x01, 0xFC, 0x03, 0xFF, 0x01, 0xFF, 0x03, 0xC3, 0x01, 0xD1, 0x03,
+ 0xCB, 0x01, 0xC3, 0x01, 0xC3, 0x03, 0xDB, 0x01, 0xD9, 0x01, 0xFF, 0x01,
+ 0xFF, 0x00, };
+#define glyph_bitcube12_B_width 10
+#define glyph_bitcube12_B_height 13
+static char glyph_bitcube12_B_bits[] = { glyph_bitcube12_B_width, glyph_bitcube12_B_height,
+ 0xB4, 0x01, 0xFC, 0x01, 0xFF, 0x03, 0xFF, 0x01, 0xC3, 0x03, 0xD9, 0x01,
+ 0xCB, 0x03, 0xC3, 0x01, 0xD3, 0x01, 0xCB, 0x03, 0xC3, 0x01, 0xF7, 0x01,
+ 0xFF, 0x00, };
+#define glyph_bitcube12_C_width 10
+#define glyph_bitcube12_C_height 13
+static char glyph_bitcube12_C_bits[] = { glyph_bitcube12_C_width, glyph_bitcube12_C_height,
+ 0xB4, 0x01, 0xFC, 0x03, 0xFF, 0x01, 0xFF, 0x03, 0xC3, 0x01, 0xC9, 0x03,
+ 0xDB, 0x01, 0xFB, 0x01, 0xD9, 0x01, 0xCB, 0x03, 0xC1, 0x01, 0xF7, 0x01,
+ 0xFF, 0x00, };
+#define glyph_bitcube12_D_width 10
+#define glyph_bitcube12_D_height 13
+static char glyph_bitcube12_D_bits[] = { glyph_bitcube12_D_width, glyph_bitcube12_D_height,
+ 0x34, 0x00, 0xFC, 0x03, 0xFF, 0x01, 0xFF, 0x03, 0xE3, 0x01, 0xD9, 0x03,
+ 0xDB, 0x01, 0xC9, 0x01, 0xDB, 0x03, 0xDB, 0x01, 0xE1, 0x01, 0xF7, 0x00,
+ 0xFF, 0x00, };
+#define glyph_bitcube12_E_width 10
+#define glyph_bitcube12_E_height 13
+static char glyph_bitcube12_E_bits[] = { glyph_bitcube12_E_width, glyph_bitcube12_E_height,
+ 0xB4, 0x01, 0xFC, 0x03, 0xFF, 0x01, 0xFF, 0x03, 0xC3, 0x01, 0xF1, 0x03,
+ 0xFB, 0x01, 0xC3, 0x01, 0xD9, 0x01, 0xFB, 0x03, 0xC1, 0x01, 0xF7, 0x01,
+ 0xFF, 0x00, };
+#define glyph_bitcube12_F_width 10
+#define glyph_bitcube12_F_height 13
+static char glyph_bitcube12_F_bits[] = { glyph_bitcube12_F_width, glyph_bitcube12_F_height,
+ 0x54, 0x00, 0xFC, 0x03, 0xFF, 0x01, 0xFF, 0x03, 0xC3, 0x01, 0xF9, 0x03,
+ 0xF3, 0x01, 0xC1, 0x01, 0xF3, 0x03, 0xFB, 0x01, 0xFB, 0x01, 0xFB, 0x01,
+ 0xFF, 0x00, };
+#define glyph_bitcube12_G_width 10
+#define glyph_bitcube12_G_height 13
+static char glyph_bitcube12_G_bits[] = { glyph_bitcube12_G_width, glyph_bitcube12_G_height,
+ 0xB4, 0x01, 0xFC, 0x03, 0xFF, 0x01, 0xFF, 0x03, 0xC3, 0x01, 0xF9, 0x03,
+ 0xFB, 0x01, 0xF9, 0x01, 0xDB, 0x03, 0xCB, 0x01, 0xC1, 0x01, 0xE7, 0x01,
+ 0xFF, 0x00, };
+#define glyph_bitcube12_H_width 10
+#define glyph_bitcube12_H_height 13
+static char glyph_bitcube12_H_bits[] = { glyph_bitcube12_H_width, glyph_bitcube12_H_height,
+ 0xB4, 0x01, 0xFC, 0x03, 0xFF, 0x01, 0xFF, 0x03, 0xDB, 0x01, 0xD9, 0x03,
+ 0xCB, 0x01, 0xC3, 0x01, 0xC9, 0x03, 0xDB, 0x01, 0xDB, 0x01, 0xFB, 0x01,
+ 0xFF, 0x00, };
+#define glyph_bitcube12_I_width 10
+#define glyph_bitcube12_I_height 13
+static char glyph_bitcube12_I_bits[] = { glyph_bitcube12_I_width, glyph_bitcube12_I_height,
+ 0xA8, 0x00, 0xFC, 0x03, 0xFF, 0x01, 0xFF, 0x01, 0xC1, 0x01, 0xE7, 0x03,
+ 0xE7, 0x01, 0xE7, 0x01, 0xE7, 0x03, 0xE7, 0x01, 0xC1, 0x01, 0xE7, 0x00,
+ 0xFF, 0x00, };
+#define glyph_bitcube12_J_width 10
+#define glyph_bitcube12_J_height 13
+static char glyph_bitcube12_J_bits[] = { glyph_bitcube12_J_width, glyph_bitcube12_J_height,
+ 0xB4, 0x01, 0xFC, 0x03, 0xFF, 0x01, 0xFF, 0x03, 0xC3, 0x01, 0xCF, 0x03,
+ 0xDF, 0x01, 0xCF, 0x01, 0xDB, 0x03, 0xCB, 0x01, 0xC1, 0x01, 0xE7, 0x01,
+ 0xFF, 0x00, };
+#define glyph_bitcube12_K_width 10
+#define glyph_bitcube12_K_height 13
+static char glyph_bitcube12_K_bits[] = { glyph_bitcube12_K_width, glyph_bitcube12_K_height,
+ 0xB4, 0x00, 0xFC, 0x03, 0xFF, 0x01, 0xFF, 0x03, 0xDB, 0x01, 0xD9, 0x03,
+ 0xDB, 0x01, 0xE1, 0x01, 0xC3, 0x03, 0xDB, 0x01, 0xD9, 0x01, 0xFF, 0x01,
+ 0xFF, 0x00, };
+#define glyph_bitcube12_L_width 10
+#define glyph_bitcube12_L_height 13
+static char glyph_bitcube12_L_bits[] = { glyph_bitcube12_L_width, glyph_bitcube12_L_height,
+ 0x54, 0x00, 0xFC, 0x03, 0xFF, 0x01, 0xFF, 0x01, 0xFB, 0x01, 0xF9, 0x03,
+ 0xFB, 0x01, 0xF9, 0x01, 0xF9, 0x03, 0xFB, 0x01, 0xC1, 0x01, 0xE7, 0x00,
+ 0xFF, 0x00, };
+#define glyph_bitcube12_M_width 10
+#define glyph_bitcube12_M_height 13
+static char glyph_bitcube12_M_bits[] = { glyph_bitcube12_M_width, glyph_bitcube12_M_height,
+ 0xB4, 0x01, 0xFC, 0x03, 0xFF, 0x01, 0xFF, 0x03, 0xDB, 0x01, 0xC1, 0x03,
+ 0xC3, 0x01, 0xDB, 0x01, 0xC9, 0x03, 0xDB, 0x01, 0xD9, 0x01, 0xFF, 0x01,
+ 0xFF, 0x00, };
+#define glyph_bitcube12_N_width 10
+#define glyph_bitcube12_N_height 13
+static char glyph_bitcube12_N_bits[] = { glyph_bitcube12_N_width, glyph_bitcube12_N_height,
+ 0xB4, 0x01, 0xFC, 0x03, 0xFF, 0x01, 0xFF, 0x03, 0xC3, 0x01, 0xC9, 0x03,
+ 0xDB, 0x01, 0xDB, 0x01, 0xC9, 0x01, 0xDB, 0x03, 0xD9, 0x01, 0xFF, 0x01,
+ 0xFF, 0x00, };
+#define glyph_bitcube12_O_width 10
+#define glyph_bitcube12_O_height 13
+static char glyph_bitcube12_O_bits[] = { glyph_bitcube12_O_width, glyph_bitcube12_O_height,
+ 0xB4, 0x01, 0xFC, 0x01, 0xFF, 0x03, 0xFF, 0x01, 0xC3, 0x03, 0xD9, 0x01,
+ 0xDB, 0x03, 0xDB, 0x01, 0xDB, 0x01, 0xCB, 0x03, 0xC1, 0x01, 0xF7, 0x01,
+ 0xFF, 0x00, };
+#define glyph_bitcube12_P_width 10
+#define glyph_bitcube12_P_height 13
+static char glyph_bitcube12_P_bits[] = { glyph_bitcube12_P_width, glyph_bitcube12_P_height,
+ 0xB4, 0x01, 0xFC, 0x03, 0xFF, 0x01, 0xFF, 0x03, 0xC3, 0x01, 0xC1, 0x03,
+ 0xCB, 0x01, 0xC3, 0x01, 0xF9, 0x01, 0xFB, 0x03, 0xFB, 0x01, 0xFB, 0x01,
+ 0xFF, 0x00, };
+#define glyph_bitcube12_Q_width 10
+#define glyph_bitcube12_Q_height 13
+static char glyph_bitcube12_Q_bits[] = { glyph_bitcube12_Q_width, glyph_bitcube12_Q_height,
+ 0xB4, 0x01, 0xFC, 0x01, 0xFF, 0x03, 0xFF, 0x01, 0xC3, 0x03, 0xD9, 0x01,
+ 0xDB, 0x03, 0xDB, 0x01, 0xCB, 0x01, 0xDB, 0x03, 0xC3, 0x01, 0xC7, 0x01,
+ 0xDF, 0x00, };
+#define glyph_bitcube12_R_width 10
+#define glyph_bitcube12_R_height 13
+static char glyph_bitcube12_R_bits[] = { glyph_bitcube12_R_width, glyph_bitcube12_R_height,
+ 0xB4, 0x01, 0xFC, 0x03, 0xFF, 0x01, 0xFF, 0x03, 0xC3, 0x01, 0xC1, 0x03,
+ 0xDB, 0x01, 0xE3, 0x01, 0xC9, 0x01, 0xDB, 0x03, 0xDB, 0x01, 0xFB, 0x01,
+ 0xFF, 0x00, };
+#define glyph_bitcube12_S_width 10
+#define glyph_bitcube12_S_height 13
+static char glyph_bitcube12_S_bits[] = { glyph_bitcube12_S_width, glyph_bitcube12_S_height,
+ 0xB4, 0x01, 0xFC, 0x03, 0xFF, 0x01, 0xFF, 0x03, 0xC3, 0x01, 0xF9, 0x03,
+ 0xF3, 0x01, 0xC3, 0x01, 0xDF, 0x03, 0xCF, 0x01, 0xC1, 0x01, 0xF7, 0x01,
+ 0xFF, 0x00, };
+#define glyph_bitcube12_T_width 10
+#define glyph_bitcube12_T_height 13
+static char glyph_bitcube12_T_bits[] = { glyph_bitcube12_T_width, glyph_bitcube12_T_height,
+ 0x24, 0x00, 0xFC, 0x03, 0xFF, 0x01, 0xF7, 0x01, 0x81, 0x01, 0xE7, 0x01,
+ 0xE7, 0x01, 0xE7, 0x01, 0xE7, 0x01, 0xE7, 0x01, 0xE7, 0x03, 0xFF, 0x00,
+ 0xFF, 0x00, };
+#define glyph_bitcube12_U_width 10
+#define glyph_bitcube12_U_height 13
+static char glyph_bitcube12_U_bits[] = { glyph_bitcube12_U_width, glyph_bitcube12_U_height,
+ 0xB4, 0x01, 0xFC, 0x03, 0xFF, 0x01, 0xFF, 0x03, 0xDB, 0x01, 0xD9, 0x03,
+ 0xDB, 0x01, 0xCB, 0x01, 0xD9, 0x03, 0xCB, 0x01, 0xC1, 0x01, 0xF7, 0x01,
+ 0xFF, 0x00, };
+#define glyph_bitcube12_V_width 10
+#define glyph_bitcube12_V_height 13
+static char glyph_bitcube12_V_bits[] = { glyph_bitcube12_V_width, glyph_bitcube12_V_height,
+ 0x54, 0x00, 0xFC, 0x03, 0xFF, 0x01, 0xFF, 0x03, 0xDB, 0x01, 0xD9, 0x03,
+ 0xCB, 0x01, 0xD9, 0x01, 0xC3, 0x03, 0xC3, 0x01, 0xE7, 0x01, 0xF7, 0x00,
+ 0xFF, 0x00, };
+#define glyph_bitcube12_W_width 10
+#define glyph_bitcube12_W_height 13
+static char glyph_bitcube12_W_bits[] = { glyph_bitcube12_W_width, glyph_bitcube12_W_height,
+ 0xB4, 0x01, 0xFC, 0x03, 0xFF, 0x01, 0xFF, 0x03, 0xDB, 0x01, 0xD9, 0x03,
+ 0xCB, 0x01, 0xC3, 0x01, 0xC1, 0x03, 0xC3, 0x01, 0xD9, 0x01, 0xFF, 0x01,
+ 0xFF, 0x00, };
+#define glyph_bitcube12_X_width 10
+#define glyph_bitcube12_X_height 13
+static char glyph_bitcube12_X_bits[] = { glyph_bitcube12_X_width, glyph_bitcube12_X_height,
+ 0x54, 0x01, 0xFC, 0x01, 0xFF, 0x01, 0xFF, 0x03, 0xDB, 0x01, 0xC1, 0x03,
+ 0xC3, 0x01, 0xE7, 0x01, 0xC3, 0x01, 0xC3, 0x01, 0xDB, 0x03, 0xFB, 0x00,
+ 0xFF, 0x00, };
+#define glyph_bitcube12_Y_width 10
+#define glyph_bitcube12_Y_height 13
+static char glyph_bitcube12_Y_bits[] = { glyph_bitcube12_Y_width, glyph_bitcube12_Y_height,
+ 0x54, 0x01, 0xFC, 0x01, 0xFF, 0x01, 0xFF, 0x03, 0xDB, 0x01, 0xD9, 0x03,
+ 0xC3, 0x01, 0xC1, 0x01, 0xE7, 0x03, 0xE7, 0x01, 0xE7, 0x01, 0xFF, 0x00,
+ 0xFF, 0x00, };
+#define glyph_bitcube12_Z_width 10
+#define glyph_bitcube12_Z_height 13
+static char glyph_bitcube12_Z_bits[] = { glyph_bitcube12_Z_width, glyph_bitcube12_Z_height,
+ 0xB4, 0x01, 0xFC, 0x03, 0xFF, 0x01, 0xFF, 0x03, 0xC1, 0x01, 0xCF, 0x03,
+ 0xCF, 0x01, 0xC3, 0x01, 0xD3, 0x01, 0xFB, 0x03, 0xC1, 0x01, 0xF7, 0x01,
+ 0xFF, 0x00, };
+#define glyph_bitcube12_0_width 10
+#define glyph_bitcube12_0_height 13
+static char glyph_bitcube12_0_bits[] = { glyph_bitcube12_0_width, glyph_bitcube12_0_height,
+ 0xB4, 0x01, 0xFC, 0x01, 0xFF, 0x03, 0xFF, 0x01, 0xC3, 0x03, 0xD9, 0x01,
+ 0xDB, 0x03, 0xDB, 0x01, 0xDB, 0x01, 0xCB, 0x03, 0xC1, 0x01, 0xF7, 0x01,
+ 0xFF, 0x00, };
+#define glyph_bitcube12_1_width 10
+#define glyph_bitcube12_1_height 13
+static char glyph_bitcube12_1_bits[] = { glyph_bitcube12_1_width, glyph_bitcube12_1_height,
+ 0x24, 0x01, 0xFC, 0x01, 0xFF, 0x01, 0xFF, 0x03, 0xE7, 0x01, 0xE1, 0x01,
+ 0xE3, 0x01, 0xE7, 0x01, 0xE7, 0x01, 0xE7, 0x01, 0xC1, 0x03, 0xD7, 0x00,
+ 0xFF, 0x00, };
+#define glyph_bitcube12_2_width 10
+#define glyph_bitcube12_2_height 13
+static char glyph_bitcube12_2_bits[] = { glyph_bitcube12_2_width, glyph_bitcube12_2_height,
+ 0xB4, 0x01, 0xFC, 0x03, 0xFF, 0x01, 0xFF, 0x03, 0xC1, 0x01, 0xCF, 0x03,
+ 0xCF, 0x01, 0xC3, 0x01, 0xD3, 0x01, 0xFB, 0x03, 0xC1, 0x01, 0xF7, 0x01,
+ 0xFF, 0x00, };
+#define glyph_bitcube12_3_width 10
+#define glyph_bitcube12_3_height 13
+static char glyph_bitcube12_3_bits[] = { glyph_bitcube12_3_width, glyph_bitcube12_3_height,
+ 0xB4, 0x01, 0xFC, 0x03, 0xFF, 0x01, 0xFF, 0x03, 0xC1, 0x01, 0xCF, 0x03,
+ 0xCF, 0x01, 0xC3, 0x01, 0xDF, 0x03, 0xCF, 0x01, 0xC1, 0x01, 0xF7, 0x01,
+ 0xFF, 0x00, };
+#define glyph_bitcube12_4_width 10
+#define glyph_bitcube12_4_height 13
+static char glyph_bitcube12_4_bits[] = { glyph_bitcube12_4_width, glyph_bitcube12_4_height,
+ 0x34, 0x00, 0xFC, 0x03, 0xFF, 0x01, 0xFF, 0x03, 0xDB, 0x01, 0xD9, 0x03,
+ 0xC3, 0x01, 0xC1, 0x01, 0xDF, 0x01, 0xCF, 0x01, 0xDF, 0x03, 0xFF, 0x00,
+ 0xFF, 0x00, };
+#define glyph_bitcube12_5_width 10
+#define glyph_bitcube12_5_height 13
+static char glyph_bitcube12_5_bits[] = { glyph_bitcube12_5_width, glyph_bitcube12_5_height,
+ 0xB4, 0x01, 0xFC, 0x03, 0xFF, 0x01, 0xFF, 0x03, 0xC3, 0x01, 0xF9, 0x03,
+ 0xF3, 0x01, 0xC3, 0x01, 0xDF, 0x03, 0xCF, 0x01, 0xC1, 0x01, 0xF7, 0x01,
+ 0xFF, 0x00, };
+#define glyph_bitcube12_6_width 10
+#define glyph_bitcube12_6_height 13
+static char glyph_bitcube12_6_bits[] = { glyph_bitcube12_6_width, glyph_bitcube12_6_height,
+ 0xB4, 0x01, 0xFC, 0x03, 0xFF, 0x01, 0xFF, 0x03, 0xC3, 0x01, 0xF1, 0x03,
+ 0xFB, 0x01, 0xC3, 0x01, 0xD3, 0x03, 0xCB, 0x01, 0xC1, 0x01, 0xF7, 0x01,
+ 0xFF, 0x00, };
+#define glyph_bitcube12_7_width 10
+#define glyph_bitcube12_7_height 13
+static char glyph_bitcube12_7_bits[] = { glyph_bitcube12_7_width, glyph_bitcube12_7_height,
+ 0xA8, 0x01, 0xFC, 0x03, 0xFF, 0x01, 0xFF, 0x01, 0xC1, 0x01, 0xCF, 0x03,
+ 0xCF, 0x01, 0xDF, 0x01, 0xCF, 0x03, 0xDF, 0x01, 0xCF, 0x01, 0xFF, 0x00,
+ 0xFF, 0x00, };
+#define glyph_bitcube12_8_width 10
+#define glyph_bitcube12_8_height 13
+static char glyph_bitcube12_8_bits[] = { glyph_bitcube12_8_width, glyph_bitcube12_8_height,
+ 0xB4, 0x01, 0xFC, 0x01, 0xFF, 0x03, 0xFF, 0x01, 0xC3, 0x03, 0xD9, 0x01,
+ 0xCB, 0x03, 0xC3, 0x01, 0xD3, 0x01, 0xCB, 0x03, 0xC3, 0x01, 0xF7, 0x01,
+ 0xFF, 0x00, };
+#define glyph_bitcube12_9_width 10
+#define glyph_bitcube12_9_height 13
+static char glyph_bitcube12_9_bits[] = { glyph_bitcube12_9_width, glyph_bitcube12_9_height,
+ 0xB4, 0x01, 0xFC, 0x03, 0xFF, 0x01, 0xFF, 0x03, 0xC3, 0x01, 0xD1, 0x03,
+ 0xCB, 0x01, 0xC3, 0x01, 0xDF, 0x03, 0xCF, 0x01, 0xC3, 0x01, 0xF7, 0x01,
+ 0xFF, 0x00, };
+static char *bitcube12_glyphs[] = {
+ ['.'] = glyph_bitcube12_period_bits,
+ ['$'] = glyph_bitcube12_dollar_bits,
+ [','] = glyph_bitcube12_comma_bits,
+ ['-'] = glyph_bitcube12_minus_bits,
+ ['?'] = glyph_bitcube12_question_bits,
+ ['A'] = glyph_bitcube12_A_bits,
+ ['B'] = glyph_bitcube12_B_bits,
+ ['C'] = glyph_bitcube12_C_bits,
+ ['D'] = glyph_bitcube12_D_bits,
+ ['E'] = glyph_bitcube12_E_bits,
+ ['F'] = glyph_bitcube12_F_bits,
+ ['G'] = glyph_bitcube12_G_bits,
+ ['H'] = glyph_bitcube12_H_bits,
+ ['I'] = glyph_bitcube12_I_bits,
+ ['J'] = glyph_bitcube12_J_bits,
+ ['K'] = glyph_bitcube12_K_bits,
+ ['L'] = glyph_bitcube12_L_bits,
+ ['M'] = glyph_bitcube12_M_bits,
+ ['N'] = glyph_bitcube12_N_bits,
+ ['O'] = glyph_bitcube12_O_bits,
+ ['P'] = glyph_bitcube12_P_bits,
+ ['Q'] = glyph_bitcube12_Q_bits,
+ ['R'] = glyph_bitcube12_R_bits,
+ ['S'] = glyph_bitcube12_S_bits,
+ ['T'] = glyph_bitcube12_T_bits,
+ ['U'] = glyph_bitcube12_U_bits,
+ ['V'] = glyph_bitcube12_V_bits,
+ ['W'] = glyph_bitcube12_W_bits,
+ ['X'] = glyph_bitcube12_X_bits,
+ ['Y'] = glyph_bitcube12_Y_bits,
+ ['Z'] = glyph_bitcube12_Z_bits,
+ ['0'] = glyph_bitcube12_0_bits,
+ ['1'] = glyph_bitcube12_1_bits,
+ ['2'] = glyph_bitcube12_2_bits,
+ ['3'] = glyph_bitcube12_3_bits,
+ ['4'] = glyph_bitcube12_4_bits,
+ ['5'] = glyph_bitcube12_5_bits,
+ ['6'] = glyph_bitcube12_6_bits,
+ ['7'] = glyph_bitcube12_7_bits,
+ ['8'] = glyph_bitcube12_8_bits,
+ ['9'] = glyph_bitcube12_9_bits,
+};
+const font_t font_bitcube12 = {
+ .height = 12,
+ .glyphs = bitcube12_glyphs,
+};
diff --git a/fonts/free/bitoutline.fon b/fonts/free/bitoutline.fon
new file mode 100644
index 000000000..abc1ea367
--- /dev/null
+++ b/fonts/free/bitoutline.fon
@@ -0,0 +1,313 @@
+#include
+#define glyph_bitoutline_period_width 4
+#define glyph_bitoutline_period_height 4
+static char glyph_bitoutline_period_bits[] = { glyph_bitoutline_period_width, glyph_bitoutline_period_height,
+ 0x0F, 0x09, 0x09, 0x0F, };
+#define glyph_bitoutline_atsign_width 10
+#define glyph_bitoutline_atsign_height 10
+static char glyph_bitoutline_atsign_bits[] = { glyph_bitoutline_atsign_width, glyph_bitoutline_atsign_height,
+ 0xFF, 0x01, 0x01, 0x03, 0x01, 0x02, 0x01, 0x02, 0x21, 0x02, 0x3F, 0x02,
+ 0x20, 0x03, 0xE0, 0x01, 0x20, 0x01, 0xE0, 0x01, };
+#define glyph_bitoutline_dollar_width 10
+#define glyph_bitoutline_dollar_height 10
+static char glyph_bitoutline_dollar_bits[] = { glyph_bitoutline_dollar_width, glyph_bitoutline_dollar_height,
+ 0xFF, 0x01, 0x01, 0x03, 0x01, 0x02, 0x01, 0x02, 0x21, 0x02, 0x3F, 0x02,
+ 0x20, 0x03, 0xE0, 0x01, 0x20, 0x01, 0xE0, 0x01, };
+#define glyph_bitoutline_comma_width 4
+#define glyph_bitoutline_comma_height 6
+static char glyph_bitoutline_comma_bits[] = { glyph_bitoutline_comma_width, glyph_bitoutline_comma_height,
+ 0x0F, 0x09, 0x09, 0x0F, 0x0C, 0x08, };
+#define glyph_bitoutline_plus_width 6
+#define glyph_bitoutline_plus_height 6
+static char glyph_bitoutline_plus_bits[] = { glyph_bitoutline_plus_width, glyph_bitoutline_plus_height,
+ 0x1E, 0x33, 0x21, 0x21, 0x33, 0x1E, };
+#define glyph_bitoutline_minus_width 6
+#define glyph_bitoutline_minus_height 3
+static char glyph_bitoutline_minus_bits[] = { glyph_bitoutline_minus_width, glyph_bitoutline_minus_height,
+ 0x3F, 0x21, 0x3F, };
+#define glyph_bitoutline_semicolon_width 10
+#define glyph_bitoutline_semicolon_height 10
+static char glyph_bitoutline_semicolon_bits[] = { glyph_bitoutline_semicolon_width, glyph_bitoutline_semicolon_height,
+ 0xFF, 0x01, 0x01, 0x03, 0x01, 0x02, 0x01, 0x02, 0x21, 0x02, 0x3F, 0x02,
+ 0x20, 0x03, 0xE0, 0x01, 0x20, 0x01, 0xE0, 0x01, };
+#define glyph_bitoutline_colon_width 3
+#define glyph_bitoutline_colon_height 7
+static char glyph_bitoutline_colon_bits[] = { glyph_bitoutline_colon_width, glyph_bitoutline_colon_height,
+ 0x07, 0x05, 0x07, 0x00, 0x07, 0x05, 0x07, };
+#define glyph_bitoutline_amp_width 10
+#define glyph_bitoutline_amp_height 10
+static char glyph_bitoutline_amp_bits[] = { glyph_bitoutline_amp_width, glyph_bitoutline_amp_height,
+ 0xFF, 0x01, 0x01, 0x03, 0x01, 0x02, 0x01, 0x02, 0x21, 0x02, 0x3F, 0x02,
+ 0x20, 0x03, 0xE0, 0x01, 0x20, 0x01, 0xE0, 0x01, };
+#define glyph_bitoutline_bang_width 6
+#define glyph_bitoutline_bang_height 10
+static char glyph_bitoutline_bang_bits[] = { glyph_bitoutline_bang_width, glyph_bitoutline_bang_height,
+ 0x3F, 0x21, 0x21, 0x21, 0x21, 0x21, 0x33, 0x1E, 0x12, 0x1E, };
+#define glyph_bitoutline_question_width 10
+#define glyph_bitoutline_question_height 10
+static char glyph_bitoutline_question_bits[] = { glyph_bitoutline_question_width, glyph_bitoutline_question_height,
+ 0xFF, 0x01, 0x01, 0x03, 0x01, 0x02, 0x01, 0x02, 0x21, 0x02, 0x3F, 0x02,
+ 0x20, 0x03, 0xE0, 0x01, 0x20, 0x01, 0xE0, 0x01, };
+#define glyph_bitoutline_lbrace_width 6
+#define glyph_bitoutline_lbrace_height 10
+static char glyph_bitoutline_lbrace_bits[] = { glyph_bitoutline_lbrace_width, glyph_bitoutline_lbrace_height,
+ 0x3F, 0x21, 0x31, 0x11, 0x11, 0x11, 0x11, 0x31, 0x21, 0x3F, };
+#define glyph_bitoutline_rbrace_width 6
+#define glyph_bitoutline_rbrace_height 10
+static char glyph_bitoutline_rbrace_bits[] = { glyph_bitoutline_rbrace_width, glyph_bitoutline_rbrace_height,
+ 0x3F, 0x21, 0x23, 0x22, 0x22, 0x22, 0x22, 0x23, 0x21, 0x3F, };
+#define glyph_bitoutline_percent_width 8
+#define glyph_bitoutline_percent_height 10
+static char glyph_bitoutline_percent_bits[] = { glyph_bitoutline_percent_width, glyph_bitoutline_percent_height,
+ 0xF7, 0x9D, 0xCF, 0x44, 0x64, 0x26, 0x22, 0xF3, 0xB9, 0xEF, };
+#define glyph_bitoutline_lpar_width 8
+#define glyph_bitoutline_lpar_height 10
+static char glyph_bitoutline_lpar_bits[] = { glyph_bitoutline_lpar_width, glyph_bitoutline_lpar_height,
+ 0xFC, 0x86, 0xC2, 0x63, 0x21, 0x21, 0x63, 0xC2, 0x86, 0xFC, };
+#define glyph_bitoutline_rpar_width 8
+#define glyph_bitoutline_rpar_height 10
+static char glyph_bitoutline_rpar_bits[] = { glyph_bitoutline_rpar_width, glyph_bitoutline_rpar_height,
+ 0x3F, 0x61, 0x43, 0xC6, 0x84, 0x84, 0xC6, 0x43, 0x61, 0x3F, };
+#define glyph_bitoutline_hash_width 10
+#define glyph_bitoutline_hash_height 10
+static char glyph_bitoutline_hash_bits[] = { glyph_bitoutline_hash_width, glyph_bitoutline_hash_height,
+ 0xFF, 0x01, 0x01, 0x03, 0x01, 0x02, 0x01, 0x02, 0x21, 0x02, 0x3F, 0x02,
+ 0x20, 0x03, 0xE0, 0x01, 0x20, 0x01, 0xE0, 0x01, };
+#define glyph_bitoutline_A_width 10
+#define glyph_bitoutline_A_height 10
+static char glyph_bitoutline_A_bits[] = { glyph_bitoutline_A_width, glyph_bitoutline_A_height,
+ 0xFF, 0x01, 0x01, 0x03, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x21, 0x02,
+ 0x01, 0x02, 0x21, 0x02, 0x21, 0x02, 0xFF, 0x03, };
+#define glyph_bitoutline_B_width 10
+#define glyph_bitoutline_B_height 10
+static char glyph_bitoutline_B_bits[] = { glyph_bitoutline_B_width, glyph_bitoutline_B_height,
+ 0xFF, 0x01, 0x01, 0x03, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x21, 0x02,
+ 0x01, 0x03, 0x21, 0x02, 0x01, 0x02, 0xFF, 0x03, };
+#define glyph_bitoutline_C_width 10
+#define glyph_bitoutline_C_height 10
+static char glyph_bitoutline_C_bits[] = { glyph_bitoutline_C_width, glyph_bitoutline_C_height,
+ 0xFF, 0x01, 0x01, 0x03, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x21, 0x02,
+ 0xE1, 0x03, 0x21, 0x02, 0x01, 0x02, 0xFF, 0x03, };
+#define glyph_bitoutline_D_width 10
+#define glyph_bitoutline_D_height 10
+static char glyph_bitoutline_D_bits[] = { glyph_bitoutline_D_width, glyph_bitoutline_D_height,
+ 0xFF, 0x01, 0x01, 0x03, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x21, 0x02,
+ 0x21, 0x02, 0x21, 0x02, 0x01, 0x03, 0xFF, 0x01, };
+#define glyph_bitoutline_E_width 10
+#define glyph_bitoutline_E_height 10
+static char glyph_bitoutline_E_bits[] = { glyph_bitoutline_E_width, glyph_bitoutline_E_height,
+ 0xFF, 0x01, 0x01, 0x03, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xE1, 0x03,
+ 0x01, 0x02, 0xE1, 0x03, 0x01, 0x02, 0xFF, 0x03, };
+#define glyph_bitoutline_F_width 10
+#define glyph_bitoutline_F_height 10
+static char glyph_bitoutline_F_bits[] = { glyph_bitoutline_F_width, glyph_bitoutline_F_height,
+ 0xFF, 0x01, 0x01, 0x03, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xE1, 0x03,
+ 0x01, 0x02, 0xE1, 0x03, 0x21, 0x00, 0x3F, 0x00, };
+#define glyph_bitoutline_G_width 10
+#define glyph_bitoutline_G_height 10
+static char glyph_bitoutline_G_bits[] = { glyph_bitoutline_G_width, glyph_bitoutline_G_height,
+ 0xFF, 0x01, 0x01, 0x03, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xE1, 0x03,
+ 0x21, 0x02, 0x61, 0x02, 0x01, 0x02, 0xFF, 0x03, };
+#define glyph_bitoutline_H_width 10
+#define glyph_bitoutline_H_height 10
+static char glyph_bitoutline_H_bits[] = { glyph_bitoutline_H_width, glyph_bitoutline_H_height,
+ 0xFF, 0x01, 0x21, 0x03, 0x21, 0x02, 0x21, 0x02, 0x21, 0x02, 0x21, 0x02,
+ 0x01, 0x02, 0x21, 0x02, 0x21, 0x02, 0xFF, 0x03, };
+#define glyph_bitoutline_I_width 6
+#define glyph_bitoutline_I_height 10
+static char glyph_bitoutline_I_bits[] = { glyph_bitoutline_I_width, glyph_bitoutline_I_height,
+ 0x1F, 0x31, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x3F, };
+#define glyph_bitoutline_J_width 10
+#define glyph_bitoutline_J_height 10
+static char glyph_bitoutline_J_bits[] = { glyph_bitoutline_J_width, glyph_bitoutline_J_height,
+ 0xE0, 0x01, 0x20, 0x03, 0x20, 0x02, 0x20, 0x02, 0x20, 0x02, 0x3F, 0x02,
+ 0x21, 0x02, 0x21, 0x02, 0x01, 0x02, 0xFF, 0x03, };
+#define glyph_bitoutline_K_width 10
+#define glyph_bitoutline_K_height 10
+static char glyph_bitoutline_K_bits[] = { glyph_bitoutline_K_width, glyph_bitoutline_K_height,
+ 0xFF, 0x01, 0x21, 0x03, 0x21, 0x02, 0x21, 0x02, 0x21, 0x02, 0x21, 0x02,
+ 0x01, 0x03, 0x21, 0x02, 0x21, 0x02, 0xFF, 0x03, };
+#define glyph_bitoutline_L_width 10
+#define glyph_bitoutline_L_height 10
+static char glyph_bitoutline_L_bits[] = { glyph_bitoutline_L_width, glyph_bitoutline_L_height,
+ 0x3F, 0x00, 0x21, 0x00, 0x21, 0x00, 0x21, 0x00, 0x21, 0x00, 0x21, 0x00,
+ 0xE1, 0x03, 0x21, 0x02, 0x01, 0x02, 0xFF, 0x03, };
+#define glyph_bitoutline_M_width 10
+#define glyph_bitoutline_M_height 10
+static char glyph_bitoutline_M_bits[] = { glyph_bitoutline_M_width, glyph_bitoutline_M_height,
+ 0xFF, 0x01, 0x21, 0x03, 0x21, 0x02, 0x21, 0x02, 0x21, 0x02, 0x21, 0x02,
+ 0x21, 0x02, 0x01, 0x02, 0x51, 0x02, 0xFF, 0x03, };
+#define glyph_bitoutline_N_width 10
+#define glyph_bitoutline_N_height 10
+static char glyph_bitoutline_N_bits[] = { glyph_bitoutline_N_width, glyph_bitoutline_N_height,
+ 0xFF, 0x01, 0x61, 0x03, 0x41, 0x02, 0x41, 0x02, 0x41, 0x02, 0x41, 0x02,
+ 0x01, 0x02, 0x11, 0x02, 0x31, 0x02, 0xFF, 0x03, };
+#define glyph_bitoutline_O_width 10
+#define glyph_bitoutline_O_height 10
+static char glyph_bitoutline_O_bits[] = { glyph_bitoutline_O_width, glyph_bitoutline_O_height,
+ 0xFF, 0x01, 0x01, 0x03, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x21, 0x02,
+ 0x21, 0x02, 0x21, 0x02, 0x01, 0x02, 0xFF, 0x03, };
+#define glyph_bitoutline_P_width 10
+#define glyph_bitoutline_P_height 10
+static char glyph_bitoutline_P_bits[] = { glyph_bitoutline_P_width, glyph_bitoutline_P_height,
+ 0xFF, 0x01, 0x01, 0x03, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x21, 0x02,
+ 0x01, 0x02, 0xE1, 0x03, 0x21, 0x00, 0x3F, 0x00, };
+#define glyph_bitoutline_Q_width 10
+#define glyph_bitoutline_Q_height 10
+static char glyph_bitoutline_Q_bits[] = { glyph_bitoutline_Q_width, glyph_bitoutline_Q_height,
+ 0xFF, 0x01, 0x01, 0x03, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x21, 0x02,
+ 0x21, 0x03, 0x01, 0x02, 0x41, 0x02, 0xFF, 0x03, };
+#define glyph_bitoutline_R_width 10
+#define glyph_bitoutline_R_height 10
+static char glyph_bitoutline_R_bits[] = { glyph_bitoutline_R_width, glyph_bitoutline_R_height,
+ 0xFF, 0x01, 0x01, 0x03, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x21, 0x02,
+ 0x01, 0x03, 0x21, 0x02, 0x21, 0x02, 0xFF, 0x03, };
+#define glyph_bitoutline_S_width 10
+#define glyph_bitoutline_S_height 10
+static char glyph_bitoutline_S_bits[] = { glyph_bitoutline_S_width, glyph_bitoutline_S_height,
+ 0xFF, 0x01, 0x01, 0x03, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xC1, 0x03,
+ 0x01, 0x02, 0x3F, 0x02, 0x01, 0x02, 0xFF, 0x03, };
+#define glyph_bitoutline_T_width 10
+#define glyph_bitoutline_T_height 10
+static char glyph_bitoutline_T_bits[] = { glyph_bitoutline_T_width, glyph_bitoutline_T_height,
+ 0xFF, 0x01, 0x01, 0x03, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+ 0x01, 0x02, 0x9F, 0x03, 0x90, 0x00, 0xF0, 0x00, };
+#define glyph_bitoutline_U_width 10
+#define glyph_bitoutline_U_height 10
+static char glyph_bitoutline_U_bits[] = { glyph_bitoutline_U_width, glyph_bitoutline_U_height,
+ 0xFF, 0x01, 0x21, 0x03, 0x21, 0x02, 0x21, 0x02, 0x21, 0x02, 0x21, 0x02,
+ 0x21, 0x02, 0x21, 0x02, 0x01, 0x02, 0xFF, 0x03, };
+#define glyph_bitoutline_V_width 10
+#define glyph_bitoutline_V_height 10
+static char glyph_bitoutline_V_bits[] = { glyph_bitoutline_V_width, glyph_bitoutline_V_height,
+ 0xFF, 0x01, 0x21, 0x03, 0x21, 0x02, 0x21, 0x02, 0x21, 0x02, 0x21, 0x02,
+ 0x21, 0x02, 0x21, 0x02, 0x03, 0x03, 0xFE, 0x01, };
+#define glyph_bitoutline_W_width 10
+#define glyph_bitoutline_W_height 10
+static char glyph_bitoutline_W_bits[] = { glyph_bitoutline_W_width, glyph_bitoutline_W_height,
+ 0xFF, 0x01, 0x51, 0x03, 0x51, 0x02, 0x51, 0x02, 0x51, 0x02, 0x51, 0x02,
+ 0x51, 0x02, 0x01, 0x02, 0x21, 0x02, 0xFF, 0x03, };
+#define glyph_bitoutline_X_width 10
+#define glyph_bitoutline_X_height 10
+static char glyph_bitoutline_X_bits[] = { glyph_bitoutline_X_width, glyph_bitoutline_X_height,
+ 0xFF, 0x01, 0x21, 0x03, 0x21, 0x02, 0x21, 0x02, 0x21, 0x02, 0x21, 0x02,
+ 0x03, 0x03, 0x21, 0x02, 0x21, 0x02, 0xFF, 0x03, };
+#define glyph_bitoutline_Y_width 10
+#define glyph_bitoutline_Y_height 10
+static char glyph_bitoutline_Y_bits[] = { glyph_bitoutline_Y_width, glyph_bitoutline_Y_height,
+ 0xFF, 0x01, 0x21, 0x03, 0x21, 0x02, 0x21, 0x02, 0x21, 0x02, 0x21, 0x02,
+ 0x01, 0x02, 0x9F, 0x03, 0x90, 0x00, 0xF0, 0x00, };
+#define glyph_bitoutline_Z_width 10
+#define glyph_bitoutline_Z_height 10
+static char glyph_bitoutline_Z_bits[] = { glyph_bitoutline_Z_width, glyph_bitoutline_Z_height,
+ 0xFF, 0x01, 0x01, 0x03, 0x01, 0x02, 0x01, 0x02, 0x21, 0x02, 0x3F, 0x02,
+ 0x01, 0x02, 0xE1, 0x03, 0x01, 0x02, 0xFF, 0x03, };
+#define glyph_bitoutline_0_width 10
+#define glyph_bitoutline_0_height 10
+static char glyph_bitoutline_0_bits[] = { glyph_bitoutline_0_width, glyph_bitoutline_0_height,
+ 0xFF, 0x01, 0x01, 0x03, 0x21, 0x02, 0x21, 0x02, 0x21, 0x02, 0x21, 0x02,
+ 0x21, 0x02, 0x21, 0x02, 0x01, 0x02, 0xFF, 0x03, };
+#define glyph_bitoutline_1_width 8
+#define glyph_bitoutline_1_height 10
+static char glyph_bitoutline_1_bits[] = { glyph_bitoutline_1_width, glyph_bitoutline_1_height,
+ 0x7E, 0xC3, 0x81, 0x87, 0x84, 0x84, 0x84, 0x84, 0x84, 0xFC, };
+#define glyph_bitoutline_2_width 10
+#define glyph_bitoutline_2_height 10
+static char glyph_bitoutline_2_bits[] = { glyph_bitoutline_2_width, glyph_bitoutline_2_height,
+ 0xFF, 0x01, 0x01, 0x03, 0x21, 0x02, 0x21, 0x02, 0x21, 0x02, 0x3F, 0x02,
+ 0x01, 0x02, 0xE1, 0x03, 0x01, 0x02, 0xFF, 0x03, };
+#define glyph_bitoutline_3_width 10
+#define glyph_bitoutline_3_height 10
+static char glyph_bitoutline_3_bits[] = { glyph_bitoutline_3_width, glyph_bitoutline_3_height,
+ 0xFF, 0x01, 0x01, 0x03, 0x21, 0x02, 0x21, 0x02, 0x21, 0x02, 0x3F, 0x02,
+ 0x01, 0x02, 0x3F, 0x02, 0x01, 0x02, 0xFF, 0x03, };
+#define glyph_bitoutline_4_width 10
+#define glyph_bitoutline_4_height 10
+static char glyph_bitoutline_4_bits[] = { glyph_bitoutline_4_width, glyph_bitoutline_4_height,
+ 0xFF, 0x01, 0x21, 0x03, 0x21, 0x02, 0x21, 0x02, 0x21, 0x02, 0x21, 0x02,
+ 0x01, 0x02, 0x3F, 0x02, 0x20, 0x02, 0xE0, 0x03, };
+#define glyph_bitoutline_5_width 10
+#define glyph_bitoutline_5_height 10
+static char glyph_bitoutline_5_bits[] = { glyph_bitoutline_5_width, glyph_bitoutline_5_height,
+ 0xFF, 0x01, 0x01, 0x03, 0xE1, 0x03, 0x01, 0x02, 0x3F, 0x02, 0x21, 0x02,
+ 0x21, 0x02, 0x21, 0x02, 0x01, 0x02, 0xFF, 0x03, };
+#define glyph_bitoutline_6_width 10
+#define glyph_bitoutline_6_height 10
+static char glyph_bitoutline_6_bits[] = { glyph_bitoutline_6_width, glyph_bitoutline_6_height,
+ 0xFF, 0x01, 0x01, 0x03, 0xE1, 0x03, 0x01, 0x02, 0x21, 0x02, 0x21, 0x02,
+ 0x21, 0x02, 0x21, 0x02, 0x01, 0x02, 0xFF, 0x03, };
+#define glyph_bitoutline_7_width 10
+#define glyph_bitoutline_7_height 10
+static char glyph_bitoutline_7_bits[] = { glyph_bitoutline_7_width, glyph_bitoutline_7_height,
+ 0xFF, 0x01, 0x01, 0x03, 0x1F, 0x02, 0x10, 0x02, 0x10, 0x02, 0x10, 0x02,
+ 0x10, 0x02, 0x10, 0x02, 0x10, 0x02, 0xF0, 0x03, };
+#define glyph_bitoutline_8_width 10
+#define glyph_bitoutline_8_height 10
+static char glyph_bitoutline_8_bits[] = { glyph_bitoutline_8_width, glyph_bitoutline_8_height,
+ 0xFF, 0x01, 0x01, 0x03, 0x21, 0x02, 0x01, 0x02, 0x21, 0x02, 0x21, 0x02,
+ 0x21, 0x02, 0x21, 0x02, 0x01, 0x02, 0xFF, 0x03, };
+#define glyph_bitoutline_9_width 10
+#define glyph_bitoutline_9_height 10
+static char glyph_bitoutline_9_bits[] = { glyph_bitoutline_9_width, glyph_bitoutline_9_height,
+ 0xFF, 0x01, 0x01, 0x03, 0x21, 0x02, 0x21, 0x02, 0x21, 0x02, 0x21, 0x02,
+ 0x01, 0x02, 0x3F, 0x02, 0x01, 0x02, 0xFF, 0x03, };
+static char *bitoutline_glyphs[] = {
+ ['.'] = glyph_bitoutline_period_bits,
+ ['@'] = glyph_bitoutline_atsign_bits,
+ ['$'] = glyph_bitoutline_dollar_bits,
+ [','] = glyph_bitoutline_comma_bits,
+ ['+'] = glyph_bitoutline_plus_bits,
+ ['-'] = glyph_bitoutline_minus_bits,
+ [';'] = glyph_bitoutline_semicolon_bits,
+ [':'] = glyph_bitoutline_colon_bits,
+ ['&'] = glyph_bitoutline_amp_bits,
+ ['!'] = glyph_bitoutline_bang_bits,
+ ['?'] = glyph_bitoutline_question_bits,
+ ['['] = glyph_bitoutline_lbrace_bits,
+ [']'] = glyph_bitoutline_rbrace_bits,
+ ['%'] = glyph_bitoutline_percent_bits,
+ ['('] = glyph_bitoutline_lpar_bits,
+ [')'] = glyph_bitoutline_rpar_bits,
+ ['#'] = glyph_bitoutline_hash_bits,
+ ['A'] = glyph_bitoutline_A_bits,
+ ['B'] = glyph_bitoutline_B_bits,
+ ['C'] = glyph_bitoutline_C_bits,
+ ['D'] = glyph_bitoutline_D_bits,
+ ['E'] = glyph_bitoutline_E_bits,
+ ['F'] = glyph_bitoutline_F_bits,
+ ['G'] = glyph_bitoutline_G_bits,
+ ['H'] = glyph_bitoutline_H_bits,
+ ['I'] = glyph_bitoutline_I_bits,
+ ['J'] = glyph_bitoutline_J_bits,
+ ['K'] = glyph_bitoutline_K_bits,
+ ['L'] = glyph_bitoutline_L_bits,
+ ['M'] = glyph_bitoutline_M_bits,
+ ['N'] = glyph_bitoutline_N_bits,
+ ['O'] = glyph_bitoutline_O_bits,
+ ['P'] = glyph_bitoutline_P_bits,
+ ['Q'] = glyph_bitoutline_Q_bits,
+ ['R'] = glyph_bitoutline_R_bits,
+ ['S'] = glyph_bitoutline_S_bits,
+ ['T'] = glyph_bitoutline_T_bits,
+ ['U'] = glyph_bitoutline_U_bits,
+ ['V'] = glyph_bitoutline_V_bits,
+ ['W'] = glyph_bitoutline_W_bits,
+ ['X'] = glyph_bitoutline_X_bits,
+ ['Y'] = glyph_bitoutline_Y_bits,
+ ['Z'] = glyph_bitoutline_Z_bits,
+ ['0'] = glyph_bitoutline_0_bits,
+ ['1'] = glyph_bitoutline_1_bits,
+ ['2'] = glyph_bitoutline_2_bits,
+ ['3'] = glyph_bitoutline_3_bits,
+ ['4'] = glyph_bitoutline_4_bits,
+ ['5'] = glyph_bitoutline_5_bits,
+ ['6'] = glyph_bitoutline_6_bits,
+ ['7'] = glyph_bitoutline_7_bits,
+ ['8'] = glyph_bitoutline_8_bits,
+ ['9'] = glyph_bitoutline_9_bits,
+};
+const font_t font_bitoutline = {
+ .height = 11,
+ .spacing = 1,
+ .glyphs = bitoutline_glyphs,
+};
diff --git a/fonts/free/cowboy.fon b/fonts/free/cowboy.fon
new file mode 100644
index 000000000..2b77ae6d2
--- /dev/null
+++ b/fonts/free/cowboy.fon
@@ -0,0 +1,301 @@
+#include
+#define glyph_cowboy_period_width 2
+#define glyph_cowboy_period_height 2
+static char glyph_cowboy_period_bits[] = { glyph_cowboy_period_width, glyph_cowboy_period_height,
+ 0x03, 0x03, };
+#define glyph_cowboy_atsign_width 13
+#define glyph_cowboy_atsign_height 9
+static char glyph_cowboy_atsign_bits[] = { glyph_cowboy_atsign_width, glyph_cowboy_atsign_height,
+ 0xFC, 0x07, 0x02, 0x08, 0x01, 0x10, 0xF9, 0x13, 0x9D, 0x13, 0x79, 0x0F,
+ 0x01, 0x00, 0x02, 0x10, 0xFC, 0x0F, };
+#define glyph_cowboy_dollar_width 8
+#define glyph_cowboy_dollar_height 9
+static char glyph_cowboy_dollar_bits[] = { glyph_cowboy_dollar_width, glyph_cowboy_dollar_height,
+ 0x18, 0x18, 0x7E, 0x07, 0x7E, 0xE0, 0x7F, 0x18, 0x18, };
+#define glyph_cowboy_comma_width 3
+#define glyph_cowboy_comma_height 3
+static char glyph_cowboy_comma_bits[] = { glyph_cowboy_comma_width, glyph_cowboy_comma_height,
+ 0x06, 0x06, 0x03, };
+#define glyph_cowboy_plus_width 6
+#define glyph_cowboy_plus_height 7
+static char glyph_cowboy_plus_bits[] = { glyph_cowboy_plus_width, glyph_cowboy_plus_height,
+ 0x0C, 0x0C, 0x0C, 0x3F, 0x0C, 0x0C, 0x0C, };
+#define glyph_cowboy_minus_width 7
+#define glyph_cowboy_minus_height 1
+static char glyph_cowboy_minus_bits[] = { glyph_cowboy_minus_width, glyph_cowboy_minus_height,
+ 0x7F, };
+#define glyph_cowboy_semicolon_width 3
+#define glyph_cowboy_semicolon_height 6
+static char glyph_cowboy_semicolon_bits[] = { glyph_cowboy_semicolon_width, glyph_cowboy_semicolon_height,
+ 0x06, 0x06, 0x00, 0x06, 0x06, 0x03, };
+#define glyph_cowboy_colon_width 2
+#define glyph_cowboy_colon_height 5
+static char glyph_cowboy_colon_bits[] = { glyph_cowboy_colon_width, glyph_cowboy_colon_height,
+ 0x03, 0x03, 0x00, 0x03, 0x03, };
+#define glyph_cowboy_amp_width 11
+#define glyph_cowboy_amp_height 7
+static char glyph_cowboy_amp_bits[] = { glyph_cowboy_amp_width, glyph_cowboy_amp_height,
+ 0x7E, 0x00, 0x67, 0x00, 0x0E, 0x04, 0xE7, 0x03, 0xD7, 0x01, 0xC7, 0x01,
+ 0xFE, 0x00, };
+#define glyph_cowboy_bang_width 3
+#define glyph_cowboy_bang_height 8
+static char glyph_cowboy_bang_bits[] = { glyph_cowboy_bang_width, glyph_cowboy_bang_height,
+ 0x07, 0x07, 0x07, 0x07, 0x05, 0x02, 0x07, 0x02, };
+#define glyph_cowboy_question_width 7
+#define glyph_cowboy_question_height 8
+static char glyph_cowboy_question_bits[] = { glyph_cowboy_question_width, glyph_cowboy_question_height,
+ 0x3E, 0x77, 0x70, 0x3E, 0x0A, 0x04, 0x0E, 0x04, };
+#define glyph_cowboy_lbrace_width 4
+#define glyph_cowboy_lbrace_height 9
+static char glyph_cowboy_lbrace_bits[] = { glyph_cowboy_lbrace_width, glyph_cowboy_lbrace_height,
+ 0x0F, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x0F, };
+#define glyph_cowboy_rbrace_width 4
+#define glyph_cowboy_rbrace_height 9
+static char glyph_cowboy_rbrace_bits[] = { glyph_cowboy_rbrace_width, glyph_cowboy_rbrace_height,
+ 0x0F, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0F, };
+#define glyph_cowboy_percent_width 12
+#define glyph_cowboy_percent_height 7
+static char glyph_cowboy_percent_bits[] = { glyph_cowboy_percent_width, glyph_cowboy_percent_height,
+ 0x0E, 0x03, 0x9B, 0x01, 0xCE, 0x00, 0x60, 0x00, 0x30, 0x07, 0x98, 0x0D,
+ 0x0C, 0x07, };
+#define glyph_cowboy_lpar_width 4
+#define glyph_cowboy_lpar_height 9
+static char glyph_cowboy_lpar_bits[] = { glyph_cowboy_lpar_width, glyph_cowboy_lpar_height,
+ 0x0C, 0x06, 0x06, 0x03, 0x03, 0x03, 0x06, 0x06, 0x0C, };
+#define glyph_cowboy_rpar_width 4
+#define glyph_cowboy_rpar_height 9
+static char glyph_cowboy_rpar_bits[] = { glyph_cowboy_rpar_width, glyph_cowboy_rpar_height,
+ 0x03, 0x06, 0x06, 0x0C, 0x0C, 0x0C, 0x06, 0x06, 0x03, };
+#define glyph_cowboy_hash_width 13
+#define glyph_cowboy_hash_height 8
+static char glyph_cowboy_hash_bits[] = { glyph_cowboy_hash_width, glyph_cowboy_hash_height,
+ 0x60, 0x06, 0x60, 0x06, 0xFC, 0x1F, 0x30, 0x03, 0x98, 0x01, 0xFF, 0x07,
+ 0xCC, 0x00, 0xCC, 0x00, };
+#define glyph_cowboy_A_width 9
+#define glyph_cowboy_A_height 7
+static char glyph_cowboy_A_bits[] = { glyph_cowboy_A_width, glyph_cowboy_A_height,
+ 0x38, 0x00, 0x38, 0x00, 0x74, 0x00, 0x74, 0x00, 0xEA, 0x00, 0xE2, 0x00,
+ 0xB5, 0x01, };
+#define glyph_cowboy_B_width 9
+#define glyph_cowboy_B_height 7
+static char glyph_cowboy_B_bits[] = { glyph_cowboy_B_width, glyph_cowboy_B_height,
+ 0xFB, 0x00, 0xCE, 0x01, 0xCE, 0x01, 0xFE, 0x00, 0xCE, 0x01, 0xCE, 0x01,
+ 0xFB, 0x00, };
+#define glyph_cowboy_C_width 9
+#define glyph_cowboy_C_height 7
+static char glyph_cowboy_C_bits[] = { glyph_cowboy_C_width, glyph_cowboy_C_height,
+ 0xBC, 0x01, 0xCE, 0x01, 0xC7, 0x01, 0x07, 0x00, 0x07, 0x00, 0x8E, 0x01,
+ 0xFC, 0x00, };
+#define glyph_cowboy_D_width 9
+#define glyph_cowboy_D_height 7
+static char glyph_cowboy_D_bits[] = { glyph_cowboy_D_width, glyph_cowboy_D_height,
+ 0xFB, 0x00, 0xCE, 0x01, 0xCE, 0x01, 0xCE, 0x01, 0xCE, 0x01, 0xCE, 0x01,
+ 0xFB, 0x00, };
+#define glyph_cowboy_E_width 10
+#define glyph_cowboy_E_height 7
+static char glyph_cowboy_E_bits[] = { glyph_cowboy_E_width, glyph_cowboy_E_height,
+ 0xFB, 0x01, 0x8E, 0x03, 0x6E, 0x00, 0x7E, 0x00, 0x6E, 0x00, 0x8E, 0x03,
+ 0xFB, 0x01, };
+#define glyph_cowboy_F_width 10
+#define glyph_cowboy_F_height 7
+static char glyph_cowboy_F_bits[] = { glyph_cowboy_F_width, glyph_cowboy_F_height,
+ 0xFB, 0x01, 0x8E, 0x03, 0x6E, 0x00, 0x7E, 0x00, 0x6E, 0x00, 0x0E, 0x00,
+ 0x1B, 0x00, };
+#define glyph_cowboy_G_width 10
+#define glyph_cowboy_G_height 7
+static char glyph_cowboy_G_bits[] = { glyph_cowboy_G_width, glyph_cowboy_G_height,
+ 0xBC, 0x01, 0xCE, 0x01, 0xC7, 0x01, 0x07, 0x00, 0xE7, 0x03, 0xCE, 0x01,
+ 0x7C, 0x03, };
+#define glyph_cowboy_H_width 11
+#define glyph_cowboy_H_height 7
+static char glyph_cowboy_H_bits[] = { glyph_cowboy_H_width, glyph_cowboy_H_height,
+ 0xDB, 0x06, 0x8E, 0x03, 0x8E, 0x03, 0xFE, 0x03, 0x8E, 0x03, 0x8E, 0x03,
+ 0xDB, 0x06, };
+#define glyph_cowboy_I_width 5
+#define glyph_cowboy_I_height 7
+static char glyph_cowboy_I_bits[] = { glyph_cowboy_I_width, glyph_cowboy_I_height,
+ 0x1B, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x1B, };
+#define glyph_cowboy_J_width 10
+#define glyph_cowboy_J_height 7
+static char glyph_cowboy_J_bits[] = { glyph_cowboy_J_width, glyph_cowboy_J_height,
+ 0x60, 0x03, 0xC0, 0x01, 0xC0, 0x01, 0xC7, 0x01, 0xC7, 0x01, 0xC7, 0x01,
+ 0xFE, 0x00, };
+#define glyph_cowboy_K_width 11
+#define glyph_cowboy_K_height 7
+static char glyph_cowboy_K_bits[] = { glyph_cowboy_K_width, glyph_cowboy_K_height,
+ 0xDB, 0x06, 0x8E, 0x01, 0xCE, 0x00, 0x7E, 0x00, 0xEE, 0x00, 0xCE, 0x01,
+ 0x9B, 0x07, };
+#define glyph_cowboy_L_width 10
+#define glyph_cowboy_L_height 7
+static char glyph_cowboy_L_bits[] = { glyph_cowboy_L_width, glyph_cowboy_L_height,
+ 0x1B, 0x00, 0x0E, 0x00, 0x0E, 0x00, 0x8E, 0x03, 0x8E, 0x03, 0x8E, 0x03,
+ 0xFB, 0x01, };
+#define glyph_cowboy_M_width 11
+#define glyph_cowboy_M_height 7
+static char glyph_cowboy_M_bits[] = { glyph_cowboy_M_width, glyph_cowboy_M_height,
+ 0xCF, 0x06, 0xCE, 0x03, 0xBA, 0x03, 0xBA, 0x03, 0x92, 0x03, 0x92, 0x03,
+ 0xC5, 0x06, };
+#define glyph_cowboy_N_width 9
+#define glyph_cowboy_N_height 7
+static char glyph_cowboy_N_bits[] = { glyph_cowboy_N_width, glyph_cowboy_N_height,
+ 0x47, 0x01, 0x8E, 0x00, 0x9E, 0x00, 0xBA, 0x00, 0xF2, 0x00, 0xE2, 0x00,
+ 0xC5, 0x01, };
+#define glyph_cowboy_O_width 10
+#define glyph_cowboy_O_height 7
+static char glyph_cowboy_O_bits[] = { glyph_cowboy_O_width, glyph_cowboy_O_height,
+ 0xFC, 0x00, 0xCE, 0x01, 0x87, 0x03, 0x87, 0x03, 0x87, 0x03, 0xCE, 0x01,
+ 0xFC, 0x00, };
+#define glyph_cowboy_P_width 10
+#define glyph_cowboy_P_height 7
+static char glyph_cowboy_P_bits[] = { glyph_cowboy_P_width, glyph_cowboy_P_height,
+ 0xFB, 0x01, 0x8E, 0x03, 0x8E, 0x03, 0xFE, 0x01, 0x0E, 0x00, 0x0E, 0x00,
+ 0x1B, 0x00, };
+#define glyph_cowboy_Q_width 11
+#define glyph_cowboy_Q_height 7
+static char glyph_cowboy_Q_bits[] = { glyph_cowboy_Q_width, glyph_cowboy_Q_height,
+ 0xFC, 0x00, 0xCE, 0x01, 0x87, 0x03, 0x87, 0x03, 0xF7, 0x03, 0xCE, 0x01,
+ 0x7C, 0x07, };
+#define glyph_cowboy_R_width 11
+#define glyph_cowboy_R_height 7
+static char glyph_cowboy_R_bits[] = { glyph_cowboy_R_width, glyph_cowboy_R_height,
+ 0xFB, 0x01, 0x8E, 0x03, 0x8E, 0x03, 0xFE, 0x01, 0xEE, 0x00, 0xCE, 0x01,
+ 0x1B, 0x07, };
+#define glyph_cowboy_S_width 9
+#define glyph_cowboy_S_height 7
+static char glyph_cowboy_S_bits[] = { glyph_cowboy_S_width, glyph_cowboy_S_height,
+ 0xBE, 0x01, 0xC3, 0x01, 0x1F, 0x00, 0xFE, 0x00, 0xF0, 0x01, 0x87, 0x01,
+ 0xFB, 0x00, };
+#define glyph_cowboy_T_width 9
+#define glyph_cowboy_T_height 7
+static char glyph_cowboy_T_bits[] = { glyph_cowboy_T_width, glyph_cowboy_T_height,
+ 0x6D, 0x01, 0xBB, 0x01, 0xBB, 0x01, 0x38, 0x00, 0x38, 0x00, 0x38, 0x00,
+ 0x6C, 0x00, };
+#define glyph_cowboy_U_width 9
+#define glyph_cowboy_U_height 7
+static char glyph_cowboy_U_bits[] = { glyph_cowboy_U_width, glyph_cowboy_U_height,
+ 0x5B, 0x01, 0x8E, 0x00, 0x8E, 0x00, 0x8E, 0x00, 0x8E, 0x00, 0x8E, 0x00,
+ 0x7C, 0x00, };
+#define glyph_cowboy_V_width 9
+#define glyph_cowboy_V_height 7
+static char glyph_cowboy_V_bits[] = { glyph_cowboy_V_width, glyph_cowboy_V_height,
+ 0x5B, 0x01, 0x8E, 0x00, 0x8E, 0x00, 0x5C, 0x00, 0x5C, 0x00, 0x38, 0x00,
+ 0x38, 0x00, };
+#define glyph_cowboy_W_width 15
+#define glyph_cowboy_W_height 7
+static char glyph_cowboy_W_bits[] = { glyph_cowboy_W_width, glyph_cowboy_W_height,
+ 0xDB, 0x56, 0x8E, 0x23, 0x8E, 0x23, 0x5C, 0x17, 0x5C, 0x17, 0x38, 0x0E,
+ 0x38, 0x0E, };
+#define glyph_cowboy_X_width 9
+#define glyph_cowboy_X_height 7
+static char glyph_cowboy_X_bits[] = { glyph_cowboy_X_width, glyph_cowboy_X_height,
+ 0x87, 0x01, 0x4E, 0x00, 0x3C, 0x00, 0x38, 0x00, 0x78, 0x00, 0xE4, 0x00,
+ 0xC3, 0x01, };
+#define glyph_cowboy_Y_width 10
+#define glyph_cowboy_Y_height 7
+static char glyph_cowboy_Y_bits[] = { glyph_cowboy_Y_width, glyph_cowboy_Y_height,
+ 0x9B, 0x02, 0x0E, 0x01, 0x9C, 0x00, 0x78, 0x00, 0x70, 0x00, 0x70, 0x00,
+ 0xD8, 0x00, };
+#define glyph_cowboy_Z_width 8
+#define glyph_cowboy_Z_height 7
+static char glyph_cowboy_Z_bits[] = { glyph_cowboy_Z_width, glyph_cowboy_Z_height,
+ 0xDE, 0x77, 0x70, 0x38, 0x1C, 0xCE, 0x7B, };
+#define glyph_cowboy_0_width 8
+#define glyph_cowboy_0_height 6
+static char glyph_cowboy_0_bits[] = { glyph_cowboy_0_width, glyph_cowboy_0_height,
+ 0x7E, 0xE7, 0xF7, 0xEF, 0xE7, 0x7E, };
+#define glyph_cowboy_1_width 4
+#define glyph_cowboy_1_height 5
+static char glyph_cowboy_1_bits[] = { glyph_cowboy_1_width, glyph_cowboy_1_height,
+ 0x0F, 0x0E, 0x0E, 0x0E, 0x0E, };
+#define glyph_cowboy_2_width 6
+#define glyph_cowboy_2_height 5
+static char glyph_cowboy_2_bits[] = { glyph_cowboy_2_width, glyph_cowboy_2_height,
+ 0x1F, 0x39, 0x1C, 0x0E, 0x3F, };
+#define glyph_cowboy_3_width 5
+#define glyph_cowboy_3_height 7
+static char glyph_cowboy_3_bits[] = { glyph_cowboy_3_width, glyph_cowboy_3_height,
+ 0x0F, 0x1D, 0x1C, 0x0F, 0x1C, 0x1C, 0x0F, };
+#define glyph_cowboy_4_width 8
+#define glyph_cowboy_4_height 6
+static char glyph_cowboy_4_bits[] = { glyph_cowboy_4_width, glyph_cowboy_4_height,
+ 0x7C, 0x76, 0x77, 0xFF, 0x70, 0x70, };
+#define glyph_cowboy_5_width 6
+#define glyph_cowboy_5_height 7
+static char glyph_cowboy_5_bits[] = { glyph_cowboy_5_width, glyph_cowboy_5_height,
+ 0x3F, 0x07, 0x07, 0x1E, 0x38, 0x38, 0x1F, };
+#define glyph_cowboy_6_width 8
+#define glyph_cowboy_6_height 6
+static char glyph_cowboy_6_bits[] = { glyph_cowboy_6_width, glyph_cowboy_6_height,
+ 0x7E, 0x07, 0x7F, 0xE7, 0xE7, 0x7E, };
+#define glyph_cowboy_7_width 7
+#define glyph_cowboy_7_height 6
+static char glyph_cowboy_7_bits[] = { glyph_cowboy_7_width, glyph_cowboy_7_height,
+ 0x7F, 0x70, 0x38, 0x1C, 0x0E, 0x0E, };
+#define glyph_cowboy_8_width 8
+#define glyph_cowboy_8_height 7
+static char glyph_cowboy_8_bits[] = { glyph_cowboy_8_width, glyph_cowboy_8_height,
+ 0x7E, 0xE7, 0xE7, 0x7E, 0xE7, 0xE7, 0x7E, };
+#define glyph_cowboy_9_width 8
+#define glyph_cowboy_9_height 7
+static char glyph_cowboy_9_bits[] = { glyph_cowboy_9_width, glyph_cowboy_9_height,
+ 0x7E, 0xE7, 0xE7, 0xFE, 0xE0, 0x70, 0x3E, };
+static char *cowboy_glyphs[] = {
+ ['.'] = glyph_cowboy_period_bits,
+ ['@'] = glyph_cowboy_atsign_bits,
+ ['$'] = glyph_cowboy_dollar_bits,
+ [','] = glyph_cowboy_comma_bits,
+ ['+'] = glyph_cowboy_plus_bits,
+ ['-'] = glyph_cowboy_minus_bits,
+ [';'] = glyph_cowboy_semicolon_bits,
+ [':'] = glyph_cowboy_colon_bits,
+ ['&'] = glyph_cowboy_amp_bits,
+ ['!'] = glyph_cowboy_bang_bits,
+ ['?'] = glyph_cowboy_question_bits,
+ ['['] = glyph_cowboy_lbrace_bits,
+ [']'] = glyph_cowboy_rbrace_bits,
+ ['%'] = glyph_cowboy_percent_bits,
+ ['('] = glyph_cowboy_lpar_bits,
+ [')'] = glyph_cowboy_rpar_bits,
+ ['#'] = glyph_cowboy_hash_bits,
+ ['A'] = glyph_cowboy_A_bits,
+ ['B'] = glyph_cowboy_B_bits,
+ ['C'] = glyph_cowboy_C_bits,
+ ['D'] = glyph_cowboy_D_bits,
+ ['E'] = glyph_cowboy_E_bits,
+ ['F'] = glyph_cowboy_F_bits,
+ ['G'] = glyph_cowboy_G_bits,
+ ['H'] = glyph_cowboy_H_bits,
+ ['I'] = glyph_cowboy_I_bits,
+ ['J'] = glyph_cowboy_J_bits,
+ ['K'] = glyph_cowboy_K_bits,
+ ['L'] = glyph_cowboy_L_bits,
+ ['M'] = glyph_cowboy_M_bits,
+ ['N'] = glyph_cowboy_N_bits,
+ ['O'] = glyph_cowboy_O_bits,
+ ['P'] = glyph_cowboy_P_bits,
+ ['Q'] = glyph_cowboy_Q_bits,
+ ['R'] = glyph_cowboy_R_bits,
+ ['S'] = glyph_cowboy_S_bits,
+ ['T'] = glyph_cowboy_T_bits,
+ ['U'] = glyph_cowboy_U_bits,
+ ['V'] = glyph_cowboy_V_bits,
+ ['W'] = glyph_cowboy_W_bits,
+ ['X'] = glyph_cowboy_X_bits,
+ ['Y'] = glyph_cowboy_Y_bits,
+ ['Z'] = glyph_cowboy_Z_bits,
+ ['0'] = glyph_cowboy_0_bits,
+ ['1'] = glyph_cowboy_1_bits,
+ ['2'] = glyph_cowboy_2_bits,
+ ['3'] = glyph_cowboy_3_bits,
+ ['4'] = glyph_cowboy_4_bits,
+ ['5'] = glyph_cowboy_5_bits,
+ ['6'] = glyph_cowboy_6_bits,
+ ['7'] = glyph_cowboy_7_bits,
+ ['8'] = glyph_cowboy_8_bits,
+ ['9'] = glyph_cowboy_9_bits,
+};
+const font_t font_cowboy = {
+ .height = 8,
+ .spacing = 1,
+ .glyphs = cowboy_glyphs,
+};
diff --git a/fonts/free/emulogic.fon b/fonts/free/emulogic.fon
new file mode 100644
index 000000000..5128b4cdf
--- /dev/null
+++ b/fonts/free/emulogic.fon
@@ -0,0 +1,259 @@
+#include
+#define glyph_emulogic_A_width 14
+#define glyph_emulogic_A_height 17
+static char glyph_emulogic_A_bits[] = { glyph_emulogic_A_width, glyph_emulogic_A_height,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x00, 0xF8, 0x00, 0xDC, 0x03,
+ 0x8E, 0x07, 0x07, 0x07, 0x0F, 0x07, 0xFE, 0x07, 0xFF, 0x07, 0x0F, 0x07,
+ 0x0E, 0x07, 0x07, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
+#define glyph_emulogic_B_width 14
+#define glyph_emulogic_B_height 17
+static char glyph_emulogic_B_bits[] = { glyph_emulogic_B_width, glyph_emulogic_B_height,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x03, 0xFE, 0x03, 0x0F, 0x07,
+ 0x06, 0x07, 0x0F, 0x07, 0xFF, 0x03, 0xFE, 0x01, 0x0F, 0x07, 0x0F, 0x07,
+ 0xFE, 0x01, 0xFF, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
+#define glyph_emulogic_C_width 14
+#define glyph_emulogic_C_height 17
+static char glyph_emulogic_C_bits[] = { glyph_emulogic_C_width, glyph_emulogic_C_height,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x03, 0xF8, 0x03, 0x1C, 0x07,
+ 0x1C, 0x07, 0x0F, 0x00, 0x07, 0x00, 0x0E, 0x00, 0x1C, 0x07, 0x1C, 0x07,
+ 0xF8, 0x01, 0xF8, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
+#define glyph_emulogic_D_width 14
+#define glyph_emulogic_D_height 17
+static char glyph_emulogic_D_bits[] = { glyph_emulogic_D_width, glyph_emulogic_D_height,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xCE, 0x03,
+ 0x87, 0x07, 0x0F, 0x07, 0x0F, 0x07, 0x07, 0x07, 0x8E, 0x07, 0xCF, 0x03,
+ 0xFF, 0x00, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
+#define glyph_emulogic_E_width 14
+#define glyph_emulogic_E_height 17
+static char glyph_emulogic_E_bits[] = { glyph_emulogic_E_width, glyph_emulogic_E_height,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x07, 0xFE, 0x07, 0x0F, 0x00,
+ 0x06, 0x00, 0x0F, 0x00, 0xFF, 0x03, 0xFE, 0x01, 0x0F, 0x00, 0x0F, 0x00,
+ 0xFE, 0x07, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
+#define glyph_emulogic_F_width 14
+#define glyph_emulogic_F_height 17
+static char glyph_emulogic_F_bits[] = { glyph_emulogic_F_width, glyph_emulogic_F_height,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x07, 0xFF, 0x07, 0x0E, 0x00,
+ 0x07, 0x00, 0x0F, 0x00, 0xFF, 0x03, 0xFF, 0x03, 0x0E, 0x00, 0x0F, 0x00,
+ 0x0F, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
+#define glyph_emulogic_G_width 14
+#define glyph_emulogic_G_height 17
+static char glyph_emulogic_G_bits[] = { glyph_emulogic_G_width, glyph_emulogic_G_height,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x07, 0xF8, 0x07, 0x1C, 0x00,
+ 0x1E, 0x00, 0x07, 0x00, 0xC7, 0x07, 0x8E, 0x07, 0x1E, 0x07, 0x1C, 0x07,
+ 0xF8, 0x07, 0xF0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
+#define glyph_emulogic_H_width 14
+#define glyph_emulogic_H_height 17
+static char glyph_emulogic_H_bits[] = { glyph_emulogic_H_width, glyph_emulogic_H_height,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x07, 0x0E, 0x07, 0x0F, 0x07,
+ 0x06, 0x07, 0x0F, 0x07, 0xFF, 0x07, 0xFE, 0x07, 0x0F, 0x07, 0x0F, 0x07,
+ 0x0E, 0x07, 0x07, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
+#define glyph_emulogic_I_width 12
+#define glyph_emulogic_I_height 17
+static char glyph_emulogic_I_bits[] = { glyph_emulogic_I_width, glyph_emulogic_I_height,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x01, 0xFF, 0x01, 0x38, 0x00,
+ 0x38, 0x00, 0x38, 0x00, 0x38, 0x00, 0x38, 0x00, 0x38, 0x00, 0x38, 0x00,
+ 0xFF, 0x01, 0xFF, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
+#define glyph_emulogic_J_width 14
+#define glyph_emulogic_J_height 17
+static char glyph_emulogic_J_bits[] = { glyph_emulogic_J_width, glyph_emulogic_J_height,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x07, 0x00, 0x07,
+ 0x00, 0x07, 0x00, 0x07, 0x00, 0x07, 0x00, 0x07, 0x07, 0x07, 0x0F, 0x07,
+ 0xFC, 0x01, 0xFC, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
+#define glyph_emulogic_K_width 14
+#define glyph_emulogic_K_height 17
+static char glyph_emulogic_K_bits[] = { glyph_emulogic_K_width, glyph_emulogic_K_height,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x07, 0x0E, 0x07, 0xC7, 0x03,
+ 0xEF, 0x01, 0xEE, 0x00, 0x7F, 0x00, 0xFF, 0x00, 0xFE, 0x00, 0xEF, 0x03,
+ 0xCF, 0x07, 0xCE, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
+#define glyph_emulogic_L_width 14
+#define glyph_emulogic_L_height 17
+static char glyph_emulogic_L_bits[] = { glyph_emulogic_L_width, glyph_emulogic_L_height,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x0E, 0x00, 0x07, 0x00,
+ 0x0F, 0x00, 0x0E, 0x00, 0x07, 0x00, 0x0F, 0x00, 0x0E, 0x00, 0x0F, 0x00,
+ 0xFF, 0x07, 0xFE, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
+#define glyph_emulogic_M_width 14
+#define glyph_emulogic_M_height 17
+static char glyph_emulogic_M_bits[] = { glyph_emulogic_M_width, glyph_emulogic_M_height,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x9E, 0x0F, 0x9F, 0x07,
+ 0xFF, 0x0F, 0xFE, 0x0F, 0xFF, 0x0F, 0xFF, 0x07, 0x6E, 0x0F, 0x0F, 0x0F,
+ 0x0F, 0x07, 0x0E, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
+#define glyph_emulogic_N_width 14
+#define glyph_emulogic_N_height 17
+static char glyph_emulogic_N_bits[] = { glyph_emulogic_N_width, glyph_emulogic_N_height,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x07, 0x1E, 0x07, 0x1F, 0x07,
+ 0x7E, 0x07, 0x7F, 0x07, 0xFF, 0x07, 0xFE, 0x07, 0xEF, 0x07, 0xCF, 0x07,
+ 0x8E, 0x07, 0x07, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
+#define glyph_emulogic_O_width 14
+#define glyph_emulogic_O_height 17
+static char glyph_emulogic_O_bits[] = { glyph_emulogic_O_width, glyph_emulogic_O_height,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x03, 0xFC, 0x03, 0x0F, 0x07,
+ 0x06, 0x07, 0x0F, 0x07, 0x0F, 0x07, 0x06, 0x07, 0x0F, 0x07, 0x0F, 0x07,
+ 0xFC, 0x01, 0xFC, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
+#define glyph_emulogic_P_width 14
+#define glyph_emulogic_P_height 17
+static char glyph_emulogic_P_bits[] = { glyph_emulogic_P_width, glyph_emulogic_P_height,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x03, 0xFF, 0x03, 0x0E, 0x07,
+ 0x07, 0x07, 0x0F, 0x07, 0x0F, 0x07, 0xFF, 0x03, 0xFE, 0x03, 0x0F, 0x00,
+ 0x0E, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
+#define glyph_emulogic_Q_width 15
+#define glyph_emulogic_Q_height 17
+static char glyph_emulogic_Q_bits[] = { glyph_emulogic_Q_width, glyph_emulogic_Q_height,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x01, 0xFE, 0x01, 0x0F, 0x07,
+ 0x07, 0x07, 0x0F, 0x07, 0x0F, 0x07, 0xEF, 0x07, 0xE7, 0x07, 0xCF, 0x01,
+ 0x7C, 0x06, 0xFE, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
+#define glyph_emulogic_R_width 14
+#define glyph_emulogic_R_height 17
+static char glyph_emulogic_R_bits[] = { glyph_emulogic_R_width, glyph_emulogic_R_height,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x03, 0xFE, 0x03, 0x0F, 0x07,
+ 0x07, 0x07, 0x8E, 0x07, 0xCF, 0x07, 0xFE, 0x00, 0xFF, 0x00, 0xEF, 0x03,
+ 0xCE, 0x07, 0x87, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
+#define glyph_emulogic_S_width 14
+#define glyph_emulogic_S_height 17
+static char glyph_emulogic_S_bits[] = { glyph_emulogic_S_width, glyph_emulogic_S_height,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x00, 0xFC, 0x00, 0xCF, 0x03,
+ 0xC6, 0x03, 0x0F, 0x00, 0xFC, 0x03, 0xFC, 0x01, 0x0F, 0x07, 0x0F, 0x07,
+ 0xFC, 0x01, 0xFC, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
+#define glyph_emulogic_T_width 12
+#define glyph_emulogic_T_height 17
+static char glyph_emulogic_T_bits[] = { glyph_emulogic_T_width, glyph_emulogic_T_height,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x01, 0xFF, 0x01, 0x38, 0x00,
+ 0x38, 0x00, 0x38, 0x00, 0x38, 0x00, 0x38, 0x00, 0x38, 0x00, 0x38, 0x00,
+ 0x38, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
+#define glyph_emulogic_U_width 14
+#define glyph_emulogic_U_height 17
+static char glyph_emulogic_U_bits[] = { glyph_emulogic_U_width, glyph_emulogic_U_height,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x07, 0x0E, 0x07, 0x0F, 0x07,
+ 0x06, 0x07, 0x0F, 0x07, 0x0F, 0x07, 0x06, 0x07, 0x0F, 0x07, 0x0F, 0x07,
+ 0xFC, 0x01, 0xFC, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
+#define glyph_emulogic_V_width 14
+#define glyph_emulogic_V_height 17
+static char glyph_emulogic_V_bits[] = { glyph_emulogic_V_width, glyph_emulogic_V_height,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x0E, 0x0F, 0x0F, 0x07,
+ 0x0F, 0x0E, 0x9E, 0x0F, 0x9F, 0x0F, 0xFE, 0x03, 0xFC, 0x03, 0xF8, 0x01,
+ 0xF0, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
+#define glyph_emulogic_W_width 14
+#define glyph_emulogic_W_height 17
+static char glyph_emulogic_W_bits[] = { glyph_emulogic_W_width, glyph_emulogic_W_height,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x0E, 0x0F, 0x0F, 0x07,
+ 0x6F, 0x0E, 0xFE, 0x0F, 0xFF, 0x0F, 0xFF, 0x07, 0xFE, 0x0F, 0x9F, 0x0F,
+ 0x9F, 0x07, 0x0E, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
+#define glyph_emulogic_X_width 14
+#define glyph_emulogic_X_height 17
+static char glyph_emulogic_X_bits[] = { glyph_emulogic_X_width, glyph_emulogic_X_height,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x07, 0x9E, 0x07, 0xDF, 0x07,
+ 0xFC, 0x03, 0xFC, 0x01, 0xF8, 0x00, 0xFC, 0x01, 0xFC, 0x03, 0x9F, 0x07,
+ 0x9E, 0x07, 0x0F, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
+#define glyph_emulogic_Y_width 12
+#define glyph_emulogic_Y_height 17
+static char glyph_emulogic_Y_bits[] = { glyph_emulogic_Y_width, glyph_emulogic_Y_height,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC7, 0x01, 0xC7, 0x01, 0xC7, 0x01,
+ 0xC7, 0x01, 0xDF, 0x01, 0xFE, 0x00, 0x38, 0x00, 0x38, 0x00, 0x38, 0x00,
+ 0x38, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
+#define glyph_emulogic_Z_width 14
+#define glyph_emulogic_Z_height 17
+static char glyph_emulogic_Z_bits[] = { glyph_emulogic_Z_width, glyph_emulogic_Z_height,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x07, 0xFE, 0x07, 0xC0, 0x07,
+ 0xE0, 0x03, 0xE0, 0x01, 0xF8, 0x00, 0x78, 0x00, 0x3C, 0x00, 0x1F, 0x00,
+ 0xFE, 0x07, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
+#define glyph_emulogic_0_width 14
+#define glyph_emulogic_0_height 17
+static char glyph_emulogic_0_bits[] = { glyph_emulogic_0_width, glyph_emulogic_0_height,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x70, 0x00, 0xCC, 0x01,
+ 0x8E, 0x03, 0x8F, 0x07, 0x8F, 0x03, 0x8E, 0x07, 0x8E, 0x03, 0x9C, 0x01,
+ 0x70, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
+#define glyph_emulogic_1_width 12
+#define glyph_emulogic_1_height 17
+static char glyph_emulogic_1_bits[] = { glyph_emulogic_1_width, glyph_emulogic_1_height,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x38, 0x00, 0x3E, 0x00,
+ 0x3C, 0x00, 0x38, 0x00, 0x38, 0x00, 0x38, 0x00, 0x38, 0x00, 0x38, 0x00,
+ 0xFF, 0x01, 0xFF, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
+#define glyph_emulogic_2_width 14
+#define glyph_emulogic_2_height 17
+static char glyph_emulogic_2_bits[] = { glyph_emulogic_2_width, glyph_emulogic_2_height,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x03, 0xFC, 0x03, 0x07, 0x07,
+ 0x0E, 0x07, 0xC0, 0x07, 0xE0, 0x03, 0xF8, 0x00, 0xFC, 0x00, 0x1F, 0x00,
+ 0xFE, 0x07, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
+#define glyph_emulogic_3_width 14
+#define glyph_emulogic_3_height 17
+static char glyph_emulogic_3_bits[] = { glyph_emulogic_3_width, glyph_emulogic_3_height,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x07, 0xFC, 0x07, 0xC0, 0x03,
+ 0xE0, 0x01, 0xE0, 0x00, 0xF8, 0x03, 0xF0, 0x01, 0x0F, 0x07, 0x0E, 0x07,
+ 0xFC, 0x01, 0xFC, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
+#define glyph_emulogic_4_width 14
+#define glyph_emulogic_4_height 17
+static char glyph_emulogic_4_bits[] = { glyph_emulogic_4_width, glyph_emulogic_4_height,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x03, 0xF0, 0x01, 0xF8, 0x03,
+ 0xDC, 0x03, 0x9C, 0x03, 0xCF, 0x03, 0xFF, 0x07, 0xFE, 0x07, 0xC0, 0x03,
+ 0xC0, 0x01, 0x80, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
+#define glyph_emulogic_5_width 14
+#define glyph_emulogic_5_height 17
+static char glyph_emulogic_5_bits[] = { glyph_emulogic_5_width, glyph_emulogic_5_height,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x03, 0xFE, 0x03, 0x0F, 0x00,
+ 0xFE, 0x03, 0xFF, 0x01, 0x00, 0x07, 0x00, 0x07, 0x0F, 0x07, 0x0E, 0x07,
+ 0xFC, 0x01, 0xFC, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
+#define glyph_emulogic_6_width 14
+#define glyph_emulogic_6_height 17
+static char glyph_emulogic_6_bits[] = { glyph_emulogic_6_width, glyph_emulogic_6_height,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x03, 0xF0, 0x03, 0x1C, 0x00,
+ 0x1E, 0x00, 0x0F, 0x00, 0xFF, 0x03, 0xFE, 0x01, 0x0F, 0x07, 0x0F, 0x07,
+ 0xFC, 0x01, 0xFC, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
+#define glyph_emulogic_7_width 14
+#define glyph_emulogic_7_height 17
+static char glyph_emulogic_7_bits[] = { glyph_emulogic_7_width, glyph_emulogic_7_height,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x07, 0xFF, 0x07, 0x0F, 0x07,
+ 0x82, 0x03, 0xC0, 0x01, 0xE0, 0x00, 0x70, 0x00, 0x38, 0x00, 0x78, 0x00,
+ 0x78, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
+#define glyph_emulogic_8_width 13
+#define glyph_emulogic_8_height 17
+static char glyph_emulogic_8_bits[] = { glyph_emulogic_8_width, glyph_emulogic_8_height,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x00, 0x3C, 0x00, 0xC3, 0x00,
+ 0xC3, 0x00, 0xC7, 0x00, 0x3C, 0x00, 0xF3, 0x01, 0xD3, 0x01, 0xC3, 0x03,
+ 0xFC, 0x00, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
+#define glyph_emulogic_9_width 14
+#define glyph_emulogic_9_height 17
+static char glyph_emulogic_9_bits[] = { glyph_emulogic_9_width, glyph_emulogic_9_height,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x03, 0xFC, 0x03, 0x0F, 0x07,
+ 0x06, 0x07, 0x0F, 0x07, 0xFC, 0x07, 0xFC, 0x07, 0x00, 0x03, 0xC0, 0x03,
+ 0xFC, 0x00, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
+static char *emulogic_glyphs[] = {
+ ['A'] = glyph_emulogic_A_bits,
+ ['B'] = glyph_emulogic_B_bits,
+ ['C'] = glyph_emulogic_C_bits,
+ ['D'] = glyph_emulogic_D_bits,
+ ['E'] = glyph_emulogic_E_bits,
+ ['F'] = glyph_emulogic_F_bits,
+ ['G'] = glyph_emulogic_G_bits,
+ ['H'] = glyph_emulogic_H_bits,
+ ['I'] = glyph_emulogic_I_bits,
+ ['J'] = glyph_emulogic_J_bits,
+ ['K'] = glyph_emulogic_K_bits,
+ ['L'] = glyph_emulogic_L_bits,
+ ['M'] = glyph_emulogic_M_bits,
+ ['N'] = glyph_emulogic_N_bits,
+ ['O'] = glyph_emulogic_O_bits,
+ ['P'] = glyph_emulogic_P_bits,
+ ['Q'] = glyph_emulogic_Q_bits,
+ ['R'] = glyph_emulogic_R_bits,
+ ['S'] = glyph_emulogic_S_bits,
+ ['T'] = glyph_emulogic_T_bits,
+ ['U'] = glyph_emulogic_U_bits,
+ ['V'] = glyph_emulogic_V_bits,
+ ['W'] = glyph_emulogic_W_bits,
+ ['X'] = glyph_emulogic_X_bits,
+ ['Y'] = glyph_emulogic_Y_bits,
+ ['Z'] = glyph_emulogic_Z_bits,
+ ['0'] = glyph_emulogic_0_bits,
+ ['1'] = glyph_emulogic_1_bits,
+ ['2'] = glyph_emulogic_2_bits,
+ ['3'] = glyph_emulogic_3_bits,
+ ['4'] = glyph_emulogic_4_bits,
+ ['5'] = glyph_emulogic_5_bits,
+ ['6'] = glyph_emulogic_6_bits,
+ ['7'] = glyph_emulogic_7_bits,
+ ['8'] = glyph_emulogic_8_bits,
+ ['9'] = glyph_emulogic_9_bits,
+};
+const font_t font_emulogic = {
+ .height = 17,
+ .glyphs = emulogic_glyphs,
+};
diff --git a/fonts/free/fipps.fon b/fonts/free/fipps.fon
new file mode 100644
index 000000000..758ff40ad
--- /dev/null
+++ b/fonts/free/fipps.fon
@@ -0,0 +1,282 @@
+#include
+#define glyph_fipps_period_width 4
+#define glyph_fipps_period_height 4
+static char glyph_fipps_period_bits[] = { glyph_fipps_period_width, glyph_fipps_period_height,
+ 0x06, 0x0D, 0x0F, 0x0E, };
+#define glyph_fipps_atsign_width 10
+#define glyph_fipps_atsign_height 10
+static char glyph_fipps_atsign_bits[] = { glyph_fipps_atsign_width, glyph_fipps_atsign_height,
+ 0xF8, 0x00, 0x84, 0x01, 0x7A, 0x03, 0x1D, 0x03, 0x6D, 0x03, 0x1D, 0x03,
+ 0xFB, 0x03, 0x06, 0x03, 0xFC, 0x03, 0xF8, 0x03, };
+#define glyph_fipps_dollar_width 8
+#define glyph_fipps_dollar_height 12
+static char glyph_fipps_dollar_bits[] = { glyph_fipps_dollar_width, glyph_fipps_dollar_height,
+ 0x18, 0x74, 0xC2, 0xF5, 0xF5, 0x63, 0xD7, 0xD6, 0xE1, 0xF7, 0x7E, 0x18,
+ };
+#define glyph_fipps_comma_width 5
+#define glyph_fipps_comma_height 6
+static char glyph_fipps_comma_bits[] = { glyph_fipps_comma_width, glyph_fipps_comma_height,
+ 0x0C, 0x1A, 0x1A, 0x1D, 0x0F, 0x06, };
+#define glyph_fipps_plus_width 6
+#define glyph_fipps_plus_height 6
+static char glyph_fipps_plus_bits[] = { glyph_fipps_plus_width, glyph_fipps_plus_height,
+ 0x0C, 0x1A, 0x31, 0x3B, 0x1E, 0x0C, };
+#define glyph_fipps_minus_width 6
+#define glyph_fipps_minus_height 4
+static char glyph_fipps_minus_bits[] = { glyph_fipps_minus_width, glyph_fipps_minus_height,
+ 0x1E, 0x31, 0x3F, 0x3E, };
+#define glyph_fipps_semicolon_width 5
+#define glyph_fipps_semicolon_height 8
+static char glyph_fipps_semicolon_bits[] = { glyph_fipps_semicolon_width, glyph_fipps_semicolon_height,
+ 0x0C, 0x1A, 0x1E, 0x1A, 0x1A, 0x1D, 0x0F, 0x06, };
+#define glyph_fipps_colon_width 4
+#define glyph_fipps_colon_height 6
+static char glyph_fipps_colon_bits[] = { glyph_fipps_colon_width, glyph_fipps_colon_height,
+ 0x06, 0x0D, 0x0F, 0x0D, 0x0F, 0x0E, };
+#define glyph_fipps_amp_width 8
+#define glyph_fipps_amp_height 10
+static char glyph_fipps_amp_bits[] = { glyph_fipps_amp_width, glyph_fipps_amp_height,
+ 0x1C, 0x32, 0x3D, 0x6D, 0xC3, 0xED, 0x6D, 0xD3, 0xFE, 0xFC, };
+#define glyph_fipps_bang_width 4
+#define glyph_fipps_bang_height 10
+static char glyph_fipps_bang_bits[] = { glyph_fipps_bang_width, glyph_fipps_bang_height,
+ 0x06, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0F, 0x0D, 0x0F, 0x0E, };
+#define glyph_fipps_question_width 9
+#define glyph_fipps_question_height 10
+static char glyph_fipps_question_bits[] = { glyph_fipps_question_width, glyph_fipps_question_height,
+ 0x7C, 0x00, 0xC2, 0x00, 0xBD, 0x01, 0xBF, 0x01, 0xDE, 0x01, 0xE8, 0x00,
+ 0x78, 0x00, 0x68, 0x00, 0x78, 0x00, 0x70, 0x00, };
+#define glyph_fipps_lbrace_width 5
+#define glyph_fipps_lbrace_height 10
+static char glyph_fipps_lbrace_bits[] = { glyph_fipps_lbrace_width, glyph_fipps_lbrace_height,
+ 0x0F, 0x19, 0x1D, 0x0D, 0x0D, 0x0D, 0x0D, 0x19, 0x1F, 0x1E, };
+#define glyph_fipps_rbrace_width 5
+#define glyph_fipps_rbrace_height 10
+static char glyph_fipps_rbrace_bits[] = { glyph_fipps_rbrace_width, glyph_fipps_rbrace_height,
+ 0x0E, 0x19, 0x1B, 0x1A, 0x1A, 0x1A, 0x1A, 0x19, 0x1F, 0x1E, };
+#define glyph_fipps_percent_width 9
+#define glyph_fipps_percent_height 10
+static char glyph_fipps_percent_bits[] = { glyph_fipps_percent_width, glyph_fipps_percent_height,
+ 0x7C, 0x00, 0xC2, 0x00, 0xBD, 0x01, 0xBF, 0x01, 0xDE, 0x01, 0xE8, 0x00,
+ 0x78, 0x00, 0x68, 0x00, 0x78, 0x00, 0x70, 0x00, };
+#define glyph_fipps_lpar_width 5
+#define glyph_fipps_lpar_height 10
+static char glyph_fipps_lpar_bits[] = { glyph_fipps_lpar_width, glyph_fipps_lpar_height,
+ 0x0C, 0x1A, 0x1D, 0x0D, 0x0D, 0x0D, 0x0D, 0x1B, 0x1E, 0x1C, };
+#define glyph_fipps_rpar_width 5
+#define glyph_fipps_rpar_height 10
+static char glyph_fipps_rpar_bits[] = { glyph_fipps_rpar_width, glyph_fipps_rpar_height,
+ 0x06, 0x0D, 0x1B, 0x1A, 0x1A, 0x1A, 0x1A, 0x1D, 0x0F, 0x06, };
+#define glyph_fipps_hash_width 8
+#define glyph_fipps_hash_height 8
+static char glyph_fipps_hash_bits[] = { glyph_fipps_hash_width, glyph_fipps_hash_height,
+ 0x3C, 0x6A, 0xC1, 0xEB, 0xC1, 0xEB, 0x7E, 0x3C, };
+#define glyph_fipps_A_width 8
+#define glyph_fipps_A_height 10
+static char glyph_fipps_A_bits[] = { glyph_fipps_A_width, glyph_fipps_A_height,
+ 0x3C, 0x62, 0xDD, 0xDD, 0xC1, 0xDD, 0xDD, 0xDD, 0xFF, 0xEE, };
+#define glyph_fipps_B_width 8
+#define glyph_fipps_B_height 10
+static char glyph_fipps_B_bits[] = { glyph_fipps_B_width, glyph_fipps_B_height,
+ 0x3E, 0x61, 0xDD, 0xDD, 0xE1, 0xDD, 0xDD, 0xE1, 0xFF, 0x7E, };
+#define glyph_fipps_C_width 8
+#define glyph_fipps_C_height 10
+static char glyph_fipps_C_bits[] = { glyph_fipps_C_width, glyph_fipps_C_height,
+ 0x7C, 0xC2, 0xFD, 0xFD, 0x1D, 0x1D, 0x7D, 0xC3, 0xFE, 0xFC, };
+#define glyph_fipps_D_width 8
+#define glyph_fipps_D_height 10
+static char glyph_fipps_D_bits[] = { glyph_fipps_D_width, glyph_fipps_D_height,
+ 0x3E, 0x61, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xE1, 0xFF, 0x7E, };
+#define glyph_fipps_E_width 7
+#define glyph_fipps_E_height 10
+static char glyph_fipps_E_bits[] = { glyph_fipps_E_width, glyph_fipps_E_height,
+ 0x3E, 0x61, 0x7D, 0x3D, 0x61, 0x7D, 0x3D, 0x61, 0x7F, 0x7E, };
+#define glyph_fipps_F_width 7
+#define glyph_fipps_F_height 10
+static char glyph_fipps_F_bits[] = { glyph_fipps_F_width, glyph_fipps_F_height,
+ 0x3E, 0x61, 0x7D, 0x3D, 0x61, 0x7D, 0x7D, 0x0D, 0x0F, 0x0E, };
+#define glyph_fipps_G_width 8
+#define glyph_fipps_G_height 10
+static char glyph_fipps_G_bits[] = { glyph_fipps_G_width, glyph_fipps_G_height,
+ 0x7C, 0xC2, 0xFD, 0xFD, 0xCD, 0xDD, 0xDD, 0xE3, 0xFE, 0x7C, };
+#define glyph_fipps_H_width 8
+#define glyph_fipps_H_height 10
+static char glyph_fipps_H_bits[] = { glyph_fipps_H_width, glyph_fipps_H_height,
+ 0x66, 0xDD, 0xDD, 0xDD, 0xC1, 0xDD, 0xDD, 0xDD, 0xFF, 0xEE, };
+#define glyph_fipps_I_width 4
+#define glyph_fipps_I_height 10
+static char glyph_fipps_I_bits[] = { glyph_fipps_I_width, glyph_fipps_I_height,
+ 0x06, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0F, 0x0E, };
+#define glyph_fipps_J_width 8
+#define glyph_fipps_J_height 10
+static char glyph_fipps_J_bits[] = { glyph_fipps_J_width, glyph_fipps_J_height,
+ 0x60, 0xD0, 0xD0, 0xD0, 0xD6, 0xDD, 0xDD, 0xE3, 0xFE, 0x7C, };
+#define glyph_fipps_K_width 8
+#define glyph_fipps_K_height 10
+static char glyph_fipps_K_bits[] = { glyph_fipps_K_width, glyph_fipps_K_height,
+ 0x66, 0xDD, 0xDD, 0xDD, 0xE1, 0xDD, 0xDD, 0xDD, 0xFF, 0xEE, };
+#define glyph_fipps_L_width 7
+#define glyph_fipps_L_height 10
+static char glyph_fipps_L_bits[] = { glyph_fipps_L_width, glyph_fipps_L_height,
+ 0x06, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x3D, 0x61, 0x7F, 0x7E, };
+#define glyph_fipps_M_width 10
+#define glyph_fipps_M_height 10
+static char glyph_fipps_M_bits[] = { glyph_fipps_M_width, glyph_fipps_M_height,
+ 0x86, 0x01, 0x4D, 0x03, 0x39, 0x03, 0x55, 0x03, 0x6D, 0x03, 0x7D, 0x03,
+ 0x7D, 0x03, 0x4D, 0x03, 0xCF, 0x03, 0x8E, 0x03, };
+#define glyph_fipps_N_width 8
+#define glyph_fipps_N_height 10
+static char glyph_fipps_N_bits[] = { glyph_fipps_N_width, glyph_fipps_N_height,
+ 0x66, 0xDD, 0xD9, 0xD5, 0xCD, 0xDD, 0xDD, 0xDD, 0xFF, 0xEE, };
+#define glyph_fipps_O_width 8
+#define glyph_fipps_O_height 10
+static char glyph_fipps_O_bits[] = { glyph_fipps_O_width, glyph_fipps_O_height,
+ 0x3C, 0x62, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xE3, 0xFE, 0x7C, };
+#define glyph_fipps_P_width 8
+#define glyph_fipps_P_height 10
+static char glyph_fipps_P_bits[] = { glyph_fipps_P_width, glyph_fipps_P_height,
+ 0x3E, 0x61, 0xDD, 0xDD, 0xE1, 0x7D, 0x3D, 0x0D, 0x0F, 0x0E, };
+#define glyph_fipps_Q_width 8
+#define glyph_fipps_Q_height 11
+static char glyph_fipps_Q_bits[] = { glyph_fipps_Q_width, glyph_fipps_Q_height,
+ 0x3C, 0x62, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0x63, 0xDE, 0xFC, 0xE0, };
+#define glyph_fipps_R_width 8
+#define glyph_fipps_R_height 10
+static char glyph_fipps_R_bits[] = { glyph_fipps_R_width, glyph_fipps_R_height,
+ 0x3E, 0x61, 0xDD, 0xDD, 0x61, 0xDD, 0xDD, 0xDD, 0xFF, 0xEE, };
+#define glyph_fipps_S_width 8
+#define glyph_fipps_S_height 10
+static char glyph_fipps_S_bits[] = { glyph_fipps_S_width, glyph_fipps_S_height,
+ 0x7C, 0xC2, 0xFD, 0xFD, 0x63, 0xDE, 0xDE, 0xE1, 0xFF, 0x7E, };
+#define glyph_fipps_T_width 8
+#define glyph_fipps_T_height 10
+static char glyph_fipps_T_bits[] = { glyph_fipps_T_width, glyph_fipps_T_height,
+ 0x7E, 0xC1, 0xF7, 0xF6, 0x34, 0x34, 0x34, 0x34, 0x3C, 0x38, };
+#define glyph_fipps_U_width 8
+#define glyph_fipps_U_height 10
+static char glyph_fipps_U_bits[] = { glyph_fipps_U_width, glyph_fipps_U_height,
+ 0x66, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xE3, 0xFE, 0x7C, };
+#define glyph_fipps_V_width 9
+#define glyph_fipps_V_height 10
+static char glyph_fipps_V_bits[] = { glyph_fipps_V_width, glyph_fipps_V_height,
+ 0xC6, 0x00, 0xAD, 0x01, 0xAD, 0x01, 0xBD, 0x01, 0xDB, 0x01, 0xDA, 0x00,
+ 0xDA, 0x00, 0xE6, 0x00, 0x7C, 0x00, 0x38, 0x00, };
+#define glyph_fipps_W_width 10
+#define glyph_fipps_W_height 10
+static char glyph_fipps_W_bits[] = { glyph_fipps_W_width, glyph_fipps_W_height,
+ 0x86, 0x01, 0x4D, 0x03, 0x4D, 0x03, 0x4D, 0x03, 0x7D, 0x03, 0x6D, 0x03,
+ 0x55, 0x03, 0xBB, 0x03, 0xFE, 0x03, 0xDC, 0x01, };
+#define glyph_fipps_X_width 9
+#define glyph_fipps_X_height 10
+static char glyph_fipps_X_bits[] = { glyph_fipps_X_width, glyph_fipps_X_height,
+ 0xC6, 0x00, 0xAD, 0x01, 0xBD, 0x01, 0xDB, 0x01, 0xE6, 0x00, 0xDA, 0x00,
+ 0xBD, 0x01, 0xBD, 0x01, 0xEF, 0x01, 0xC6, 0x01, };
+#define glyph_fipps_Y_width 10
+#define glyph_fipps_Y_height 10
+static char glyph_fipps_Y_bits[] = { glyph_fipps_Y_width, glyph_fipps_Y_height,
+ 0x86, 0x01, 0x4D, 0x03, 0x5D, 0x03, 0xBB, 0x03, 0xC6, 0x01, 0xEC, 0x00,
+ 0x68, 0x00, 0x68, 0x00, 0x78, 0x00, 0x70, 0x00, };
+#define glyph_fipps_Z_width 8
+#define glyph_fipps_Z_height 10
+static char glyph_fipps_Z_bits[] = { glyph_fipps_Z_width, glyph_fipps_Z_height,
+ 0x7E, 0xC1, 0xDF, 0xEC, 0x74, 0x3A, 0x7D, 0xC1, 0xFF, 0xFE, };
+#define glyph_fipps_0_width 8
+#define glyph_fipps_0_height 10
+static char glyph_fipps_0_bits[] = { glyph_fipps_0_width, glyph_fipps_0_height,
+ 0x3C, 0x62, 0xDD, 0xDD, 0xD5, 0xDD, 0xDD, 0xE3, 0xFE, 0x7C, };
+#define glyph_fipps_1_width 5
+#define glyph_fipps_1_height 10
+static char glyph_fipps_1_bits[] = { glyph_fipps_1_width, glyph_fipps_1_height,
+ 0x0C, 0x1A, 0x19, 0x1B, 0x1A, 0x1A, 0x1A, 0x1A, 0x1E, 0x1C, };
+#define glyph_fipps_2_width 8
+#define glyph_fipps_2_height 10
+static char glyph_fipps_2_bits[] = { glyph_fipps_2_width, glyph_fipps_2_height,
+ 0x3E, 0x61, 0xDF, 0xDC, 0x6C, 0x32, 0x7D, 0xC1, 0xFF, 0xFE, };
+#define glyph_fipps_3_width 8
+#define glyph_fipps_3_height 10
+static char glyph_fipps_3_bits[] = { glyph_fipps_3_width, glyph_fipps_3_height,
+ 0x3E, 0x61, 0xDF, 0xDE, 0x64, 0xDC, 0xDE, 0xE1, 0x7F, 0x3E, };
+#define glyph_fipps_4_width 8
+#define glyph_fipps_4_height 10
+static char glyph_fipps_4_bits[] = { glyph_fipps_4_width, glyph_fipps_4_height,
+ 0x66, 0xDD, 0xDD, 0xDD, 0xC1, 0xDF, 0xDE, 0xD0, 0xF0, 0xE0, };
+#define glyph_fipps_5_width 8
+#define glyph_fipps_5_height 10
+static char glyph_fipps_5_bits[] = { glyph_fipps_5_width, glyph_fipps_5_height,
+ 0x7F, 0xC1, 0xFD, 0x3D, 0x61, 0xDF, 0xDE, 0xE1, 0x7F, 0x3E, };
+#define glyph_fipps_6_width 8
+#define glyph_fipps_6_height 10
+static char glyph_fipps_6_bits[] = { glyph_fipps_6_width, glyph_fipps_6_height,
+ 0x3C, 0x62, 0x7D, 0x1D, 0x61, 0xDD, 0xDD, 0xE3, 0x7E, 0x3C, };
+#define glyph_fipps_7_width 8
+#define glyph_fipps_7_height 10
+static char glyph_fipps_7_bits[] = { glyph_fipps_7_width, glyph_fipps_7_height,
+ 0x7E, 0xC1, 0xDF, 0xE8, 0x74, 0x34, 0x3A, 0x1A, 0x1E, 0x1C, };
+#define glyph_fipps_8_width 8
+#define glyph_fipps_8_height 10
+static char glyph_fipps_8_bits[] = { glyph_fipps_8_width, glyph_fipps_8_height,
+ 0x3C, 0x62, 0xDD, 0xDD, 0x63, 0xDD, 0xDD, 0xE3, 0x7E, 0x3C, };
+#define glyph_fipps_9_width 8
+#define glyph_fipps_9_height 10
+static char glyph_fipps_9_bits[] = { glyph_fipps_9_width, glyph_fipps_9_height,
+ 0x3C, 0x62, 0xDD, 0xDD, 0xC3, 0xDE, 0xDC, 0xE2, 0x7E, 0x3C, };
+static char *fipps_glyphs[] = {
+ ['.'] = glyph_fipps_period_bits,
+ ['@'] = glyph_fipps_atsign_bits,
+ ['$'] = glyph_fipps_dollar_bits,
+ [','] = glyph_fipps_comma_bits,
+ ['+'] = glyph_fipps_plus_bits,
+ ['-'] = glyph_fipps_minus_bits,
+ [';'] = glyph_fipps_semicolon_bits,
+ [':'] = glyph_fipps_colon_bits,
+ ['&'] = glyph_fipps_amp_bits,
+ ['!'] = glyph_fipps_bang_bits,
+ ['?'] = glyph_fipps_question_bits,
+ ['['] = glyph_fipps_lbrace_bits,
+ [']'] = glyph_fipps_rbrace_bits,
+ ['%'] = glyph_fipps_percent_bits,
+ ['('] = glyph_fipps_lpar_bits,
+ [')'] = glyph_fipps_rpar_bits,
+ ['#'] = glyph_fipps_hash_bits,
+ ['A'] = glyph_fipps_A_bits,
+ ['B'] = glyph_fipps_B_bits,
+ ['C'] = glyph_fipps_C_bits,
+ ['D'] = glyph_fipps_D_bits,
+ ['E'] = glyph_fipps_E_bits,
+ ['F'] = glyph_fipps_F_bits,
+ ['G'] = glyph_fipps_G_bits,
+ ['H'] = glyph_fipps_H_bits,
+ ['I'] = glyph_fipps_I_bits,
+ ['J'] = glyph_fipps_J_bits,
+ ['K'] = glyph_fipps_K_bits,
+ ['L'] = glyph_fipps_L_bits,
+ ['M'] = glyph_fipps_M_bits,
+ ['N'] = glyph_fipps_N_bits,
+ ['O'] = glyph_fipps_O_bits,
+ ['P'] = glyph_fipps_P_bits,
+ ['Q'] = glyph_fipps_Q_bits,
+ ['R'] = glyph_fipps_R_bits,
+ ['S'] = glyph_fipps_S_bits,
+ ['T'] = glyph_fipps_T_bits,
+ ['U'] = glyph_fipps_U_bits,
+ ['V'] = glyph_fipps_V_bits,
+ ['W'] = glyph_fipps_W_bits,
+ ['X'] = glyph_fipps_X_bits,
+ ['Y'] = glyph_fipps_Y_bits,
+ ['Z'] = glyph_fipps_Z_bits,
+ ['0'] = glyph_fipps_0_bits,
+ ['1'] = glyph_fipps_1_bits,
+ ['2'] = glyph_fipps_2_bits,
+ ['3'] = glyph_fipps_3_bits,
+ ['4'] = glyph_fipps_4_bits,
+ ['5'] = glyph_fipps_5_bits,
+ ['6'] = glyph_fipps_6_bits,
+ ['7'] = glyph_fipps_7_bits,
+ ['8'] = glyph_fipps_8_bits,
+ ['9'] = glyph_fipps_9_bits,
+};
+const font_t font_fipps = {
+ .height = 8,
+ .spacing = 1,
+ .glyphs = fipps_glyphs,
+};
diff --git a/fonts/free/fireball.fon b/fonts/free/fireball.fon
new file mode 100644
index 000000000..7c8a8eb2b
--- /dev/null
+++ b/fonts/free/fireball.fon
@@ -0,0 +1,349 @@
+#include
+#define glyph_fireball_period_width 4
+#define glyph_fireball_period_height 3
+static char glyph_fireball_period_bits[] = { glyph_fireball_period_width, glyph_fireball_period_height,
+ 0x06, 0x06, 0x00, };
+#define glyph_fireball_atsign_width 14
+#define glyph_fireball_atsign_height 14
+static char glyph_fireball_atsign_bits[] = { glyph_fireball_atsign_width, glyph_fireball_atsign_height,
+ 0x00, 0x00, 0xE0, 0x03, 0x18, 0x0C, 0x0C, 0x18, 0xE6, 0x12, 0x22, 0x13,
+ 0x32, 0x13, 0x12, 0x19, 0x12, 0x09, 0xF6, 0x0F, 0x04, 0x00, 0x1C, 0x0C,
+ 0xF0, 0x03, 0x00, 0x00, };
+#define glyph_fireball_dollar_width 7
+#define glyph_fireball_dollar_height 13
+static char glyph_fireball_dollar_bits[] = { glyph_fireball_dollar_width, glyph_fireball_dollar_height,
+ 0x10, 0x10, 0x78, 0x7C, 0x5E, 0x1E, 0x1C, 0x38, 0x7E, 0x3E, 0x0C, 0x0C,
+ 0x00, };
+#define glyph_fireball_comma_width 3
+#define glyph_fireball_comma_height 5
+static char glyph_fireball_comma_bits[] = { glyph_fireball_comma_width, glyph_fireball_comma_height,
+ 0x00, 0x06, 0x02, 0x02, 0x00, };
+#define glyph_fireball_plus_width 9
+#define glyph_fireball_plus_height 9
+static char glyph_fireball_plus_bits[] = { glyph_fireball_plus_width, glyph_fireball_plus_height,
+ 0x00, 0x00, 0x18, 0x00, 0x10, 0x00, 0x10, 0x00, 0xFE, 0x00, 0x10, 0x00,
+ 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, };
+#define glyph_fireball_minus_width 7
+#define glyph_fireball_minus_height 3
+static char glyph_fireball_minus_bits[] = { glyph_fireball_minus_width, glyph_fireball_minus_height,
+ 0x00, 0x7E, 0x3E, };
+#define glyph_fireball_semicolon_width 4
+#define glyph_fireball_semicolon_height 13
+static char glyph_fireball_semicolon_bits[] = { glyph_fireball_semicolon_width, glyph_fireball_semicolon_height,
+ 0x00, 0x06, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x06, 0x02,
+ 0x02, };
+#define glyph_fireball_colon_width 4
+#define glyph_fireball_colon_height 12
+static char glyph_fireball_colon_bits[] = { glyph_fireball_colon_width, glyph_fireball_colon_height,
+ 0x04, 0x06, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x06, 0x00,
+ };
+#define glyph_fireball_amp_width 8
+#define glyph_fireball_amp_height 12
+static char glyph_fireball_amp_bits[] = { glyph_fireball_amp_width, glyph_fireball_amp_height,
+ 0x00, 0x3C, 0x3C, 0x24, 0x1C, 0x1C, 0x1C, 0x1E, 0x76, 0x7E, 0x4C, 0x00,
+ };
+#define glyph_fireball_bang_width 3
+#define glyph_fireball_bang_height 14
+static char glyph_fireball_bang_bits[] = { glyph_fireball_bang_width, glyph_fireball_bang_height,
+ 0x00, 0x07, 0x07, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x00, 0x00,
+ 0x03, 0x01, };
+#define glyph_fireball_question_width 9
+#define glyph_fireball_question_height 15
+static char glyph_fireball_question_bits[] = { glyph_fireball_question_width, glyph_fireball_question_height,
+ 0x00, 0x00, 0xF8, 0x00, 0xB8, 0x00, 0x9E, 0x01, 0xC4, 0x00, 0x60, 0x00,
+ 0x70, 0x00, 0x30, 0x00, 0x30, 0x00, 0x30, 0x00, 0x30, 0x00, 0x10, 0x00,
+ 0x00, 0x00, 0x30, 0x00, 0x10, 0x00, };
+#define glyph_fireball_lbrace_width 5
+#define glyph_fireball_lbrace_height 15
+static char glyph_fireball_lbrace_bits[] = { glyph_fireball_lbrace_width, glyph_fireball_lbrace_height,
+ 0x0C, 0x0C, 0x04, 0x04, 0x06, 0x06, 0x06, 0x02, 0x06, 0x02, 0x02, 0x02,
+ 0x03, 0x06, 0x02, };
+#define glyph_fireball_rbrace_width 5
+#define glyph_fireball_rbrace_height 15
+static char glyph_fireball_rbrace_bits[] = { glyph_fireball_rbrace_width, glyph_fireball_rbrace_height,
+ 0x18, 0x18, 0x18, 0x18, 0x08, 0x18, 0x08, 0x18, 0x08, 0x0C, 0x0C, 0x0C,
+ 0x0C, 0x04, 0x02, };
+#define glyph_fireball_percent_width 10
+#define glyph_fireball_percent_height 12
+static char glyph_fireball_percent_bits[] = { glyph_fireball_percent_width, glyph_fireball_percent_height,
+ 0x84, 0x00, 0x8E, 0x00, 0x4E, 0x00, 0x7A, 0x00, 0x2F, 0x00, 0xFE, 0x00,
+ 0xD0, 0x01, 0x58, 0x01, 0x68, 0x01, 0xC4, 0x01, 0xC4, 0x00, 0x00, 0x00,
+ };
+#define glyph_fireball_lpar_width 5
+#define glyph_fireball_lpar_height 15
+static char glyph_fireball_lpar_bits[] = { glyph_fireball_lpar_width, glyph_fireball_lpar_height,
+ 0x08, 0x08, 0x0C, 0x0E, 0x06, 0x06, 0x06, 0x06, 0x07, 0x02, 0x02, 0x02,
+ 0x02, 0x04, 0x00, };
+#define glyph_fireball_rpar_width 5
+#define glyph_fireball_rpar_height 15
+static char glyph_fireball_rpar_bits[] = { glyph_fireball_rpar_width, glyph_fireball_rpar_height,
+ 0x04, 0x04, 0x04, 0x08, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0E,
+ 0x06, 0x06, 0x00, };
+#define glyph_fireball_hash_width 11
+#define glyph_fireball_hash_height 12
+static char glyph_fireball_hash_bits[] = { glyph_fireball_hash_width, glyph_fireball_hash_height,
+ 0x00, 0x00, 0x20, 0x03, 0x30, 0x01, 0xB0, 0x01, 0xFC, 0x07, 0xD8, 0x01,
+ 0xD8, 0x00, 0xFE, 0x01, 0x6C, 0x00, 0x6C, 0x00, 0x24, 0x00, 0x00, 0x00,
+ };
+#define glyph_fireball_A_width 11
+#define glyph_fireball_A_height 15
+static char glyph_fireball_A_bits[] = { glyph_fireball_A_width, glyph_fireball_A_height,
+ 0x40, 0x00, 0xF0, 0x00, 0xF8, 0x00, 0xF8, 0x01, 0xFC, 0x01, 0xFC, 0x01,
+ 0xCC, 0x01, 0xEC, 0x03, 0xFE, 0x03, 0xFF, 0x03, 0xFE, 0x03, 0xC6, 0x03,
+ 0x86, 0x03, 0x82, 0x01, 0x00, 0x00, };
+#define glyph_fireball_B_width 10
+#define glyph_fireball_B_height 14
+static char glyph_fireball_B_bits[] = { glyph_fireball_B_width, glyph_fireball_B_height,
+ 0x00, 0x00, 0x3E, 0x00, 0xFE, 0x00, 0xFE, 0x01, 0xE6, 0x01, 0xE6, 0x01,
+ 0xFE, 0x01, 0xFE, 0x00, 0x3F, 0x00, 0xFA, 0x00, 0xE2, 0x01, 0xE7, 0x01,
+ 0xFE, 0x00, 0x3A, 0x00, };
+#define glyph_fireball_C_width 10
+#define glyph_fireball_C_height 14
+static char glyph_fireball_C_bits[] = { glyph_fireball_C_width, glyph_fireball_C_height,
+ 0x80, 0x00, 0xF0, 0x03, 0xF8, 0x03, 0xFC, 0x03, 0x7E, 0x01, 0x1E, 0x00,
+ 0x06, 0x00, 0x07, 0x00, 0x02, 0x00, 0x07, 0x01, 0xFE, 0x03, 0xFE, 0x01,
+ 0xF8, 0x00, 0x30, 0x00, };
+#define glyph_fireball_D_width 11
+#define glyph_fireball_D_height 15
+static char glyph_fireball_D_bits[] = { glyph_fireball_D_width, glyph_fireball_D_height,
+ 0x00, 0x00, 0x3C, 0x00, 0xFE, 0x00, 0xFE, 0x01, 0xFE, 0x01, 0xFE, 0x03,
+ 0xC6, 0x03, 0xC4, 0x03, 0xE6, 0x03, 0xF6, 0x03, 0xFE, 0x01, 0xFE, 0x00,
+ 0x7F, 0x00, 0x1F, 0x00, 0x02, 0x00, };
+#define glyph_fireball_E_width 9
+#define glyph_fireball_E_height 14
+static char glyph_fireball_E_bits[] = { glyph_fireball_E_width, glyph_fireball_E_height,
+ 0x00, 0x00, 0xFC, 0x00, 0xFE, 0x00, 0xFE, 0x00, 0x1E, 0x00, 0x1E, 0x00,
+ 0x0E, 0x00, 0xFE, 0x00, 0x7E, 0x00, 0x0E, 0x00, 0x0E, 0x00, 0xDE, 0x00,
+ 0xFE, 0x00, 0x3C, 0x00, };
+#define glyph_fireball_F_width 8
+#define glyph_fireball_F_height 15
+static char glyph_fireball_F_bits[] = { glyph_fireball_F_width, glyph_fireball_F_height,
+ 0x00, 0xF8, 0xFE, 0xFF, 0x9E, 0x1C, 0x1C, 0xFE, 0x7E, 0x1C, 0x1C, 0x0E,
+ 0x0E, 0x0C, 0x00, };
+#define glyph_fireball_G_width 11
+#define glyph_fireball_G_height 15
+static char glyph_fireball_G_bits[] = { glyph_fireball_G_width, glyph_fireball_G_height,
+ 0x00, 0x00, 0xF8, 0x01, 0xFC, 0x01, 0xFE, 0x01, 0x3E, 0x00, 0x0F, 0x00,
+ 0x03, 0x00, 0x03, 0x00, 0xC3, 0x03, 0x82, 0x07, 0xDE, 0x03, 0xFE, 0x03,
+ 0xFC, 0x03, 0x70, 0x03, 0x00, 0x00, };
+#define glyph_fireball_H_width 10
+#define glyph_fireball_H_height 15
+static char glyph_fireball_H_bits[] = { glyph_fireball_H_width, glyph_fireball_H_height,
+ 0x00, 0x00, 0x87, 0x00, 0x8E, 0x01, 0xCF, 0x01, 0x8F, 0x01, 0xCF, 0x01,
+ 0xFE, 0x01, 0xFF, 0x01, 0xFF, 0x00, 0xCF, 0x00, 0xC7, 0x00, 0xC7, 0x00,
+ 0xC7, 0x00, 0x46, 0x00, 0x00, 0x00, };
+#define glyph_fireball_I_width 5
+#define glyph_fireball_I_height 14
+static char glyph_fireball_I_bits[] = { glyph_fireball_I_width, glyph_fireball_I_height,
+ 0x00, 0x0E, 0x0E, 0x0E, 0x0F, 0x0F, 0x0E, 0x0E, 0x0E, 0x07, 0x0E, 0x07,
+ 0x06, 0x06, };
+#define glyph_fireball_J_width 8
+#define glyph_fireball_J_height 14
+static char glyph_fireball_J_bits[] = { glyph_fireball_J_width, glyph_fireball_J_height,
+ 0x00, 0xE0, 0xF0, 0xF0, 0xE0, 0xF0, 0xE0, 0xE0, 0xF0, 0xE0, 0xE3, 0x7F,
+ 0x7E, 0x38, };
+#define glyph_fireball_K_width 9
+#define glyph_fireball_K_height 15
+static char glyph_fireball_K_bits[] = { glyph_fireball_K_width, glyph_fireball_K_height,
+ 0x00, 0x00, 0x0E, 0x00, 0x4E, 0x00, 0x6E, 0x00, 0x7E, 0x00, 0x3E, 0x00,
+ 0x1F, 0x00, 0x0F, 0x00, 0x1E, 0x00, 0x1E, 0x00, 0x3E, 0x00, 0x7F, 0x00,
+ 0xE6, 0x00, 0xC6, 0x00, 0x00, 0x00, };
+#define glyph_fireball_L_width 7
+#define glyph_fireball_L_height 14
+static char glyph_fireball_L_bits[] = { glyph_fireball_L_width, glyph_fireball_L_height,
+ 0x00, 0x3C, 0x1E, 0x1E, 0x1E, 0x1E, 0x0E, 0x0F, 0x0E, 0x0F, 0x0F, 0x7F,
+ 0x7E, 0x1E, };
+#define glyph_fireball_M_width 12
+#define glyph_fireball_M_height 15
+static char glyph_fireball_M_bits[] = { glyph_fireball_M_width, glyph_fireball_M_height,
+ 0x00, 0x00, 0x06, 0x07, 0x0F, 0x0F, 0x0F, 0x0F, 0x1F, 0x0F, 0x9F, 0x0F,
+ 0x9F, 0x0F, 0xF7, 0x0F, 0xFF, 0x06, 0xEF, 0x0E, 0x4F, 0x06, 0x47, 0x0F,
+ 0x0F, 0x06, 0x0F, 0x02, 0x00, 0x00, };
+#define glyph_fireball_N_width 11
+#define glyph_fireball_N_height 14
+static char glyph_fireball_N_bits[] = { glyph_fireball_N_width, glyph_fireball_N_height,
+ 0x00, 0x00, 0x0F, 0x03, 0x8F, 0x03, 0x1E, 0x03, 0x9F, 0x03, 0x1F, 0x03,
+ 0x3F, 0x03, 0xBE, 0x03, 0x67, 0x03, 0xEF, 0x03, 0xC7, 0x03, 0xCF, 0x03,
+ 0x8E, 0x03, 0x06, 0x03, };
+#define glyph_fireball_O_width 10
+#define glyph_fireball_O_height 14
+static char glyph_fireball_O_bits[] = { glyph_fireball_O_width, glyph_fireball_O_height,
+ 0x00, 0x00, 0xFC, 0x00, 0xFE, 0x01, 0xFC, 0x03, 0xFC, 0x01, 0xCE, 0x03,
+ 0x8E, 0x01, 0xC7, 0x01, 0xC7, 0x01, 0xC7, 0x00, 0xE7, 0x00, 0x7E, 0x00,
+ 0x7C, 0x00, 0x10, 0x00, };
+#define glyph_fireball_P_width 10
+#define glyph_fireball_P_height 15
+static char glyph_fireball_P_bits[] = { glyph_fireball_P_width, glyph_fireball_P_height,
+ 0x08, 0x00, 0x7E, 0x00, 0xFF, 0x01, 0xFE, 0x01, 0xFE, 0x01, 0x9E, 0x01,
+ 0xCE, 0x01, 0xFE, 0x00, 0x7F, 0x00, 0x1E, 0x00, 0x0E, 0x00, 0x0E, 0x00,
+ 0x0E, 0x00, 0x06, 0x00, 0x00, 0x00, };
+#define glyph_fireball_Q_width 10
+#define glyph_fireball_Q_height 15
+static char glyph_fireball_Q_bits[] = { glyph_fireball_Q_width, glyph_fireball_Q_height,
+ 0x10, 0x00, 0x7C, 0x00, 0xFE, 0x00, 0xFE, 0x00, 0xFE, 0x01, 0xC2, 0x01,
+ 0xC2, 0x01, 0xC3, 0x00, 0xE2, 0x00, 0xF3, 0x00, 0x7F, 0x00, 0x7E, 0x00,
+ 0xFC, 0x00, 0xD8, 0x01, 0x00, 0x00, };
+#define glyph_fireball_R_width 10
+#define glyph_fireball_R_height 15
+static char glyph_fireball_R_bits[] = { glyph_fireball_R_width, glyph_fireball_R_height,
+ 0x00, 0x00, 0x3E, 0x00, 0xFF, 0x00, 0xFF, 0x01, 0xFE, 0x01, 0xCE, 0x01,
+ 0xFE, 0x00, 0x3F, 0x00, 0x1E, 0x00, 0x3E, 0x00, 0x7E, 0x00, 0xFE, 0x00,
+ 0xEE, 0x01, 0x86, 0x01, 0x00, 0x00, };
+#define glyph_fireball_S_width 10
+#define glyph_fireball_S_height 14
+static char glyph_fireball_S_bits[] = { glyph_fireball_S_width, glyph_fireball_S_height,
+ 0x00, 0x00, 0xF0, 0x01, 0xFC, 0x01, 0xFE, 0x03, 0xBE, 0x01, 0x06, 0x00,
+ 0x0E, 0x00, 0x3C, 0x00, 0xF0, 0x00, 0xE0, 0x01, 0xC7, 0x01, 0xFE, 0x01,
+ 0xFE, 0x01, 0x7C, 0x00, };
+#define glyph_fireball_T_width 11
+#define glyph_fireball_T_height 15
+static char glyph_fireball_T_bits[] = { glyph_fireball_T_width, glyph_fireball_T_height,
+ 0x00, 0x00, 0xF0, 0x03, 0xFC, 0x03, 0xFE, 0x07, 0xFF, 0x00, 0x70, 0x00,
+ 0x70, 0x00, 0xF0, 0x00, 0x70, 0x00, 0x70, 0x00, 0x70, 0x00, 0x70, 0x00,
+ 0x78, 0x00, 0x38, 0x00, 0x00, 0x00, };
+#define glyph_fireball_U_width 10
+#define glyph_fireball_U_height 14
+static char glyph_fireball_U_bits[] = { glyph_fireball_U_width, glyph_fireball_U_height,
+ 0x00, 0x00, 0x06, 0x01, 0x8F, 0x03, 0x87, 0x03, 0x87, 0x03, 0x87, 0x03,
+ 0x8F, 0x03, 0x87, 0x01, 0x8E, 0x03, 0xC6, 0x01, 0xCE, 0x01, 0xEE, 0x01,
+ 0xFC, 0x00, 0x78, 0x00, };
+#define glyph_fireball_V_width 9
+#define glyph_fireball_V_height 14
+static char glyph_fireball_V_bits[] = { glyph_fireball_V_width, glyph_fireball_V_height,
+ 0x00, 0x00, 0x86, 0x01, 0x87, 0x00, 0xCF, 0x01, 0xC7, 0x00, 0xCF, 0x00,
+ 0xEE, 0x00, 0xEF, 0x00, 0xEE, 0x00, 0xFE, 0x00, 0x7E, 0x00, 0x7E, 0x00,
+ 0x3C, 0x00, 0x38, 0x00, };
+#define glyph_fireball_W_width 14
+#define glyph_fireball_W_height 15
+static char glyph_fireball_W_bits[] = { glyph_fireball_W_width, glyph_fireball_W_height,
+ 0x00, 0x00, 0x0C, 0x18, 0x06, 0x38, 0x0F, 0x38, 0xCF, 0x38, 0xCE, 0x18,
+ 0xEE, 0x1C, 0xEE, 0x1D, 0xEE, 0x1D, 0xFE, 0x0F, 0xBC, 0x0F, 0x3C, 0x0F,
+ 0x38, 0x07, 0x18, 0x07, 0x00, 0x00, };
+#define glyph_fireball_X_width 11
+#define glyph_fireball_X_height 14
+static char glyph_fireball_X_bits[] = { glyph_fireball_X_width, glyph_fireball_X_height,
+ 0x08, 0x00, 0x0E, 0x01, 0x8E, 0x03, 0x9E, 0x03, 0xDC, 0x01, 0xFC, 0x00,
+ 0xF8, 0x00, 0x78, 0x00, 0x78, 0x00, 0xF8, 0x00, 0xFC, 0x00, 0xEE, 0x01,
+ 0xC6, 0x03, 0x42, 0x00, };
+#define glyph_fireball_Y_width 9
+#define glyph_fireball_Y_height 15
+static char glyph_fireball_Y_bits[] = { glyph_fireball_Y_width, glyph_fireball_Y_height,
+ 0x00, 0x00, 0x0E, 0x00, 0xCF, 0x01, 0xDE, 0x01, 0xFC, 0x00, 0xFC, 0x00,
+ 0xF8, 0x00, 0x78, 0x00, 0x70, 0x00, 0x78, 0x00, 0x3C, 0x00, 0x1C, 0x00,
+ 0x1E, 0x00, 0x0C, 0x00, 0x08, 0x00, };
+#define glyph_fireball_Z_width 10
+#define glyph_fireball_Z_height 15
+static char glyph_fireball_Z_bits[] = { glyph_fireball_Z_width, glyph_fireball_Z_height,
+ 0x00, 0x00, 0xFF, 0x01, 0xFE, 0x01, 0xFE, 0x03, 0xE0, 0x01, 0xE0, 0x00,
+ 0xF0, 0x00, 0x78, 0x00, 0x38, 0x00, 0x1C, 0x00, 0x1C, 0x00, 0xDE, 0x03,
+ 0xFE, 0x03, 0xFE, 0x01, 0x00, 0x00, };
+#define glyph_fireball_0_width 7
+#define glyph_fireball_0_height 12
+static char glyph_fireball_0_bits[] = { glyph_fireball_0_width, glyph_fireball_0_height,
+ 0x08, 0x3E, 0x76, 0x66, 0x76, 0x67, 0x76, 0x67, 0x36, 0x3E, 0x3C, 0x00,
+ };
+#define glyph_fireball_1_width 6
+#define glyph_fireball_1_height 12
+static char glyph_fireball_1_bits[] = { glyph_fireball_1_width, glyph_fireball_1_height,
+ 0x10, 0x18, 0x1E, 0x1E, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00,
+ };
+#define glyph_fireball_2_width 7
+#define glyph_fireball_2_height 12
+static char glyph_fireball_2_bits[] = { glyph_fireball_2_width, glyph_fireball_2_height,
+ 0x00, 0x3C, 0x76, 0x66, 0x70, 0x38, 0x38, 0x0C, 0x0E, 0x7E, 0x7E, 0x00,
+ };
+#define glyph_fireball_3_width 7
+#define glyph_fireball_3_height 12
+static char glyph_fireball_3_bits[] = { glyph_fireball_3_width, glyph_fireball_3_height,
+ 0x08, 0x3E, 0x36, 0x76, 0x30, 0x3C, 0x38, 0x70, 0x66, 0x3E, 0x3C, 0x00,
+ };
+#define glyph_fireball_4_width 8
+#define glyph_fireball_4_height 12
+static char glyph_fireball_4_bits[] = { glyph_fireball_4_width, glyph_fireball_4_height,
+ 0x20, 0x78, 0x38, 0x7C, 0x7C, 0x36, 0x76, 0x7F, 0xFE, 0x70, 0x30, 0x10,
+ };
+#define glyph_fireball_5_width 7
+#define glyph_fireball_5_height 12
+static char glyph_fireball_5_bits[] = { glyph_fireball_5_width, glyph_fireball_5_height,
+ 0x34, 0x3E, 0x1E, 0x06, 0x3E, 0x7F, 0x70, 0x70, 0x76, 0x3E, 0x3C, 0x00,
+ };
+#define glyph_fireball_6_width 7
+#define glyph_fireball_6_height 12
+static char glyph_fireball_6_bits[] = { glyph_fireball_6_width, glyph_fireball_6_height,
+ 0x08, 0x3C, 0x36, 0x06, 0x1E, 0x3F, 0x76, 0x66, 0x67, 0x36, 0x3C, 0x00,
+ };
+#define glyph_fireball_7_width 7
+#define glyph_fireball_7_height 12
+static char glyph_fireball_7_bits[] = { glyph_fireball_7_width, glyph_fireball_7_height,
+ 0x36, 0x7E, 0x72, 0x30, 0x30, 0x38, 0x18, 0x1C, 0x1C, 0x0C, 0x0C, 0x00,
+ };
+#define glyph_fireball_8_width 7
+#define glyph_fireball_8_height 12
+static char glyph_fireball_8_bits[] = { glyph_fireball_8_width, glyph_fireball_8_height,
+ 0x08, 0x3E, 0x36, 0x76, 0x36, 0x3E, 0x3E, 0x66, 0x76, 0x3E, 0x1C, 0x00,
+ };
+#define glyph_fireball_9_width 7
+#define glyph_fireball_9_height 12
+static char glyph_fireball_9_bits[] = { glyph_fireball_9_width, glyph_fireball_9_height,
+ 0x08, 0x3C, 0x36, 0x76, 0x66, 0x7E, 0x7E, 0x70, 0x74, 0x36, 0x3C, 0x00,
+ };
+static char *fireball_glyphs[] = {
+ ['.'] = glyph_fireball_period_bits,
+ ['@'] = glyph_fireball_atsign_bits,
+ ['$'] = glyph_fireball_dollar_bits,
+ [','] = glyph_fireball_comma_bits,
+ ['+'] = glyph_fireball_plus_bits,
+ ['-'] = glyph_fireball_minus_bits,
+ [';'] = glyph_fireball_semicolon_bits,
+ [':'] = glyph_fireball_colon_bits,
+ ['&'] = glyph_fireball_amp_bits,
+ ['!'] = glyph_fireball_bang_bits,
+ ['?'] = glyph_fireball_question_bits,
+ ['['] = glyph_fireball_lbrace_bits,
+ [']'] = glyph_fireball_rbrace_bits,
+ ['%'] = glyph_fireball_percent_bits,
+ ['('] = glyph_fireball_lpar_bits,
+ [')'] = glyph_fireball_rpar_bits,
+ ['#'] = glyph_fireball_hash_bits,
+ ['A'] = glyph_fireball_A_bits,
+ ['B'] = glyph_fireball_B_bits,
+ ['C'] = glyph_fireball_C_bits,
+ ['D'] = glyph_fireball_D_bits,
+ ['E'] = glyph_fireball_E_bits,
+ ['F'] = glyph_fireball_F_bits,
+ ['G'] = glyph_fireball_G_bits,
+ ['H'] = glyph_fireball_H_bits,
+ ['I'] = glyph_fireball_I_bits,
+ ['J'] = glyph_fireball_J_bits,
+ ['K'] = glyph_fireball_K_bits,
+ ['L'] = glyph_fireball_L_bits,
+ ['M'] = glyph_fireball_M_bits,
+ ['N'] = glyph_fireball_N_bits,
+ ['O'] = glyph_fireball_O_bits,
+ ['P'] = glyph_fireball_P_bits,
+ ['Q'] = glyph_fireball_Q_bits,
+ ['R'] = glyph_fireball_R_bits,
+ ['S'] = glyph_fireball_S_bits,
+ ['T'] = glyph_fireball_T_bits,
+ ['U'] = glyph_fireball_U_bits,
+ ['V'] = glyph_fireball_V_bits,
+ ['W'] = glyph_fireball_W_bits,
+ ['X'] = glyph_fireball_X_bits,
+ ['Y'] = glyph_fireball_Y_bits,
+ ['Z'] = glyph_fireball_Z_bits,
+ ['0'] = glyph_fireball_0_bits,
+ ['1'] = glyph_fireball_1_bits,
+ ['2'] = glyph_fireball_2_bits,
+ ['3'] = glyph_fireball_3_bits,
+ ['4'] = glyph_fireball_4_bits,
+ ['5'] = glyph_fireball_5_bits,
+ ['6'] = glyph_fireball_6_bits,
+ ['7'] = glyph_fireball_7_bits,
+ ['8'] = glyph_fireball_8_bits,
+ ['9'] = glyph_fireball_9_bits,
+};
+const font_t font_fireball = {
+ .height = 14,
+ .spacing = 0,
+ .glyphs = fireball_glyphs,
+};
diff --git a/fonts/free/hellovetica.fon b/fonts/free/hellovetica.fon
new file mode 100644
index 000000000..7a9202a87
--- /dev/null
+++ b/fonts/free/hellovetica.fon
@@ -0,0 +1,273 @@
+#include
+#define glyph_hellovetica_A_width 13
+#define glyph_hellovetica_A_height 22
+static char glyph_hellovetica_A_bits[] = { glyph_hellovetica_A_width, glyph_hellovetica_A_height,
+ 0x30, 0x00, 0x30, 0x00, 0xD8, 0x00, 0xD8, 0x00, 0xD8, 0x00, 0x06, 0x01,
+ 0x86, 0x01, 0x86, 0x01, 0x86, 0x01, 0xFE, 0x01, 0x03, 0x06, 0x03, 0x06,
+ 0x03, 0x06, 0x03, 0x06, 0x03, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
+#define glyph_hellovetica_B_width 13
+#define glyph_hellovetica_B_height 22
+static char glyph_hellovetica_B_bits[] = { glyph_hellovetica_B_width, glyph_hellovetica_B_height,
+ 0xBF, 0x01, 0x03, 0x06, 0x03, 0x06, 0x03, 0x06, 0x03, 0x06, 0xFF, 0x03,
+ 0xFF, 0x01, 0x03, 0x06, 0x03, 0x06, 0x03, 0x06, 0x03, 0x06, 0x03, 0x06,
+ 0x03, 0x06, 0xFF, 0x01, 0xFF, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
+#define glyph_hellovetica_C_width 13
+#define glyph_hellovetica_C_height 22
+static char glyph_hellovetica_C_bits[] = { glyph_hellovetica_C_width, glyph_hellovetica_C_height,
+ 0xB8, 0x00, 0x86, 0x01, 0x03, 0x06, 0x03, 0x06, 0x03, 0x06, 0x03, 0x00,
+ 0x03, 0x00, 0x03, 0x00, 0x03, 0x00, 0x03, 0x06, 0x03, 0x06, 0x03, 0x06,
+ 0x86, 0x01, 0xFC, 0x01, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
+#define glyph_hellovetica_D_width 13
+#define glyph_hellovetica_D_height 22
+static char glyph_hellovetica_D_bits[] = { glyph_hellovetica_D_width, glyph_hellovetica_D_height,
+ 0x7F, 0x00, 0x83, 0x01, 0x03, 0x01, 0x03, 0x06, 0x03, 0x06, 0x03, 0x06,
+ 0x03, 0x06, 0x03, 0x06, 0x03, 0x06, 0x03, 0x06, 0x03, 0x06, 0x03, 0x06,
+ 0x03, 0x01, 0xFF, 0x01, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
+#define glyph_hellovetica_E_width 13
+#define glyph_hellovetica_E_height 22
+static char glyph_hellovetica_E_bits[] = { glyph_hellovetica_E_width, glyph_hellovetica_E_height,
+ 0xFF, 0x01, 0x03, 0x00, 0x03, 0x00, 0x03, 0x00, 0x03, 0x00, 0x03, 0x00,
+ 0x03, 0x00, 0xFF, 0x01, 0xFF, 0x01, 0x03, 0x00, 0x03, 0x00, 0x03, 0x00,
+ 0x03, 0x00, 0xFF, 0x03, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
+#define glyph_hellovetica_F_width 13
+#define glyph_hellovetica_F_height 22
+static char glyph_hellovetica_F_bits[] = { glyph_hellovetica_F_width, glyph_hellovetica_F_height,
+ 0xFF, 0x01, 0x03, 0x00, 0x03, 0x00, 0x03, 0x00, 0x03, 0x00, 0x03, 0x00,
+ 0x03, 0x00, 0xFF, 0x01, 0xFF, 0x01, 0x03, 0x00, 0x03, 0x00, 0x03, 0x00,
+ 0x03, 0x00, 0x03, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
+#define glyph_hellovetica_G_width 13
+#define glyph_hellovetica_G_height 22
+static char glyph_hellovetica_G_bits[] = { glyph_hellovetica_G_width, glyph_hellovetica_G_height,
+ 0xB8, 0x00, 0x86, 0x01, 0x84, 0x01, 0x03, 0x06, 0x03, 0x06, 0x03, 0x06,
+ 0x03, 0x00, 0xF3, 0x01, 0xF3, 0x01, 0x03, 0x06, 0x03, 0x06, 0x03, 0x06,
+ 0x86, 0x07, 0xFC, 0x07, 0xF8, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
+#define glyph_hellovetica_H_width 13
+#define glyph_hellovetica_H_height 22
+static char glyph_hellovetica_H_bits[] = { glyph_hellovetica_H_width, glyph_hellovetica_H_height,
+ 0x03, 0x06, 0x03, 0x06, 0x03, 0x06, 0x03, 0x06, 0x03, 0x06, 0x03, 0x06,
+ 0x03, 0x06, 0xFF, 0x07, 0xFF, 0x07, 0x03, 0x06, 0x03, 0x06, 0x03, 0x06,
+ 0x03, 0x06, 0x03, 0x06, 0x03, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
+#define glyph_hellovetica_I_width 4
+#define glyph_hellovetica_I_height 22
+static char glyph_hellovetica_I_bits[] = { glyph_hellovetica_I_width, glyph_hellovetica_I_height,
+ 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
+ 0x03, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
+#define glyph_hellovetica_J_width 11
+#define glyph_hellovetica_J_height 22
+static char glyph_hellovetica_J_bits[] = { glyph_hellovetica_J_width, glyph_hellovetica_J_height,
+ 0x80, 0x01, 0x80, 0x01, 0x00, 0x01, 0x80, 0x01, 0x80, 0x01, 0x00, 0x01,
+ 0x80, 0x01, 0x80, 0x01, 0x00, 0x01, 0x80, 0x01, 0x83, 0x01, 0x03, 0x01,
+ 0x83, 0x01, 0xFC, 0x00, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
+#define glyph_hellovetica_K_width 13
+#define glyph_hellovetica_K_height 22
+static char glyph_hellovetica_K_bits[] = { glyph_hellovetica_K_width, glyph_hellovetica_K_height,
+ 0x03, 0x06, 0x03, 0x06, 0x03, 0x01, 0x83, 0x01, 0xC3, 0x00, 0x63, 0x00,
+ 0x33, 0x00, 0x1F, 0x00, 0x3B, 0x00, 0x33, 0x00, 0x43, 0x00, 0xC3, 0x00,
+ 0x83, 0x01, 0x03, 0x03, 0x03, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
+#define glyph_hellovetica_L_width 10
+#define glyph_hellovetica_L_height 22
+static char glyph_hellovetica_L_bits[] = { glyph_hellovetica_L_width, glyph_hellovetica_L_height,
+ 0x03, 0x00, 0x03, 0x00, 0x03, 0x00, 0x03, 0x00, 0x03, 0x00, 0x03, 0x00,
+ 0x03, 0x00, 0x03, 0x00, 0x03, 0x00, 0x03, 0x00, 0x03, 0x00, 0x03, 0x00,
+ 0x03, 0x00, 0x7F, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
+#define glyph_hellovetica_M_width 16
+#define glyph_hellovetica_M_height 22
+static char glyph_hellovetica_M_bits[] = { glyph_hellovetica_M_width, glyph_hellovetica_M_height,
+ 0x03, 0x30, 0x07, 0x3C, 0x1B, 0x36, 0x1B, 0x36, 0x1B, 0x36, 0x03, 0x30,
+ 0xB3, 0x31, 0xB3, 0x31, 0xB3, 0x31, 0xC3, 0x30, 0xC3, 0x30, 0xC3, 0x30,
+ 0x03, 0x30, 0x03, 0x30, 0x03, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
+#define glyph_hellovetica_N_width 13
+#define glyph_hellovetica_N_height 22
+static char glyph_hellovetica_N_bits[] = { glyph_hellovetica_N_width, glyph_hellovetica_N_height,
+ 0x03, 0x06, 0x07, 0x06, 0x1B, 0x06, 0x1B, 0x06, 0x1B, 0x06, 0x03, 0x06,
+ 0x33, 0x06, 0x33, 0x06, 0x33, 0x06, 0xC3, 0x06, 0xC3, 0x06, 0xC3, 0x06,
+ 0x83, 0x07, 0x03, 0x07, 0x03, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
+#define glyph_hellovetica_O_width 14
+#define glyph_hellovetica_O_height 22
+static char glyph_hellovetica_O_bits[] = { glyph_hellovetica_O_width, glyph_hellovetica_O_height,
+ 0xB8, 0x01, 0x06, 0x06, 0x04, 0x02, 0x03, 0x0C, 0x03, 0x0C, 0x03, 0x0C,
+ 0x03, 0x0C, 0x03, 0x0C, 0x03, 0x0C, 0x03, 0x0C, 0x03, 0x0C, 0x03, 0x0C,
+ 0x06, 0x06, 0xFC, 0x03, 0xF8, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
+#define glyph_hellovetica_P_width 13
+#define glyph_hellovetica_P_height 22
+static char glyph_hellovetica_P_bits[] = { glyph_hellovetica_P_width, glyph_hellovetica_P_height,
+ 0xFF, 0x01, 0x03, 0x06, 0x03, 0x06, 0x03, 0x06, 0x03, 0x06, 0x03, 0x06,
+ 0x03, 0x06, 0xFF, 0x01, 0xFF, 0x01, 0x03, 0x00, 0x03, 0x00, 0x03, 0x00,
+ 0x03, 0x00, 0x03, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
+#define glyph_hellovetica_Q_width 14
+#define glyph_hellovetica_Q_height 22
+static char glyph_hellovetica_Q_bits[] = { glyph_hellovetica_Q_width, glyph_hellovetica_Q_height,
+ 0xF8, 0x01, 0x06, 0x06, 0x04, 0x02, 0x03, 0x0C, 0x03, 0x0C, 0x03, 0x0C,
+ 0x03, 0x0C, 0x03, 0x0C, 0x03, 0x0C, 0x03, 0x0C, 0x03, 0x0D, 0x83, 0x0D,
+ 0x06, 0x06, 0xFC, 0x0D, 0xF8, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
+#define glyph_hellovetica_R_width 13
+#define glyph_hellovetica_R_height 22
+static char glyph_hellovetica_R_bits[] = { glyph_hellovetica_R_width, glyph_hellovetica_R_height,
+ 0xFF, 0x01, 0x03, 0x06, 0x03, 0x06, 0x03, 0x06, 0x03, 0x06, 0x03, 0x06,
+ 0x03, 0x06, 0xFF, 0x01, 0xFF, 0x01, 0x03, 0x06, 0x03, 0x06, 0x03, 0x06,
+ 0x03, 0x06, 0x03, 0x06, 0x03, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
+#define glyph_hellovetica_S_width 11
+#define glyph_hellovetica_S_height 22
+static char glyph_hellovetica_S_bits[] = { glyph_hellovetica_S_width, glyph_hellovetica_S_height,
+ 0xBC, 0x00, 0x83, 0x01, 0x83, 0x01, 0x83, 0x01, 0x03, 0x00, 0x1E, 0x00,
+ 0x1C, 0x00, 0xE0, 0x00, 0x00, 0x01, 0x80, 0x01, 0x83, 0x01, 0x83, 0x01,
+ 0x03, 0x01, 0xFC, 0x00, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
+#define glyph_hellovetica_T_width 13
+#define glyph_hellovetica_T_height 22
+static char glyph_hellovetica_T_bits[] = { glyph_hellovetica_T_width, glyph_hellovetica_T_height,
+ 0xFF, 0x07, 0x30, 0x00, 0x30, 0x00, 0x30, 0x00, 0x30, 0x00, 0x30, 0x00,
+ 0x30, 0x00, 0x30, 0x00, 0x30, 0x00, 0x30, 0x00, 0x30, 0x00, 0x30, 0x00,
+ 0x30, 0x00, 0x30, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
+#define glyph_hellovetica_U_width 13
+#define glyph_hellovetica_U_height 22
+static char glyph_hellovetica_U_bits[] = { glyph_hellovetica_U_width, glyph_hellovetica_U_height,
+ 0x03, 0x06, 0x03, 0x06, 0x03, 0x06, 0x03, 0x06, 0x03, 0x06, 0x03, 0x06,
+ 0x03, 0x06, 0x03, 0x06, 0x03, 0x06, 0x03, 0x06, 0x03, 0x06, 0x03, 0x06,
+ 0x86, 0x01, 0xFC, 0x01, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
+#define glyph_hellovetica_V_width 13
+#define glyph_hellovetica_V_height 22
+static char glyph_hellovetica_V_bits[] = { glyph_hellovetica_V_width, glyph_hellovetica_V_height,
+ 0x03, 0x06, 0x03, 0x06, 0x03, 0x06, 0x03, 0x06, 0x86, 0x01, 0x86, 0x01,
+ 0x86, 0x01, 0x86, 0x01, 0x86, 0x01, 0xD8, 0x00, 0xD8, 0x00, 0xD8, 0x00,
+ 0x30, 0x00, 0x30, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
+#define glyph_hellovetica_W_width 16
+#define glyph_hellovetica_W_height 22
+static char glyph_hellovetica_W_bits[] = { glyph_hellovetica_W_width, glyph_hellovetica_W_height,
+ 0x03, 0x30, 0xC3, 0x30, 0x43, 0x30, 0xC3, 0x30, 0xC3, 0x30, 0xC3, 0x30,
+ 0xB3, 0x31, 0xB6, 0x0D, 0x36, 0x0D, 0xB6, 0x0D, 0xB6, 0x0D, 0xB6, 0x0D,
+ 0x18, 0x06, 0x18, 0x06, 0x18, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
+#define glyph_hellovetica_X_width 10
+#define glyph_hellovetica_X_height 22
+static char glyph_hellovetica_X_bits[] = { glyph_hellovetica_X_width, glyph_hellovetica_X_height,
+ 0xC3, 0x00, 0xC3, 0x00, 0x36, 0x00, 0x36, 0x00, 0x36, 0x00, 0x00, 0x00,
+ 0x18, 0x00, 0x18, 0x00, 0x18, 0x00, 0x36, 0x00, 0x36, 0x00, 0x36, 0x00,
+ 0xC3, 0x00, 0xC3, 0x00, 0xC3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
+#define glyph_hellovetica_Y_width 13
+#define glyph_hellovetica_Y_height 22
+static char glyph_hellovetica_Y_bits[] = { glyph_hellovetica_Y_width, glyph_hellovetica_Y_height,
+ 0x01, 0x06, 0x86, 0x01, 0x86, 0x01, 0x86, 0x01, 0xD8, 0x00, 0xD8, 0x00,
+ 0xD8, 0x00, 0x30, 0x00, 0x30, 0x00, 0x30, 0x00, 0x30, 0x00, 0x30, 0x00,
+ 0x30, 0x00, 0x30, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
+#define glyph_hellovetica_Z_width 13
+#define glyph_hellovetica_Z_height 22
+static char glyph_hellovetica_Z_bits[] = { glyph_hellovetica_Z_width, glyph_hellovetica_Z_height,
+ 0xF7, 0x07, 0x80, 0x01, 0xC0, 0x00, 0xC0, 0x00, 0xC0, 0x00, 0x00, 0x00,
+ 0x30, 0x00, 0x30, 0x00, 0x30, 0x00, 0x18, 0x00, 0x18, 0x00, 0x18, 0x00,
+ 0x06, 0x00, 0xFF, 0x07, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
+#define glyph_hellovetica_0_width 2
+#define glyph_hellovetica_0_height 22
+static char glyph_hellovetica_0_bits[] = { glyph_hellovetica_0_width, glyph_hellovetica_0_height,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
+#define glyph_hellovetica_1_width 2
+#define glyph_hellovetica_1_height 22
+static char glyph_hellovetica_1_bits[] = { glyph_hellovetica_1_width, glyph_hellovetica_1_height,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
+#define glyph_hellovetica_2_width 2
+#define glyph_hellovetica_2_height 22
+static char glyph_hellovetica_2_bits[] = { glyph_hellovetica_2_width, glyph_hellovetica_2_height,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
+#define glyph_hellovetica_3_width 2
+#define glyph_hellovetica_3_height 22
+static char glyph_hellovetica_3_bits[] = { glyph_hellovetica_3_width, glyph_hellovetica_3_height,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
+#define glyph_hellovetica_4_width 2
+#define glyph_hellovetica_4_height 22
+static char glyph_hellovetica_4_bits[] = { glyph_hellovetica_4_width, glyph_hellovetica_4_height,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
+#define glyph_hellovetica_5_width 2
+#define glyph_hellovetica_5_height 22
+static char glyph_hellovetica_5_bits[] = { glyph_hellovetica_5_width, glyph_hellovetica_5_height,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
+#define glyph_hellovetica_6_width 2
+#define glyph_hellovetica_6_height 22
+static char glyph_hellovetica_6_bits[] = { glyph_hellovetica_6_width, glyph_hellovetica_6_height,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
+#define glyph_hellovetica_7_width 2
+#define glyph_hellovetica_7_height 22
+static char glyph_hellovetica_7_bits[] = { glyph_hellovetica_7_width, glyph_hellovetica_7_height,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
+#define glyph_hellovetica_8_width 2
+#define glyph_hellovetica_8_height 22
+static char glyph_hellovetica_8_bits[] = { glyph_hellovetica_8_width, glyph_hellovetica_8_height,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
+#define glyph_hellovetica_9_width 2
+#define glyph_hellovetica_9_height 22
+static char glyph_hellovetica_9_bits[] = { glyph_hellovetica_9_width, glyph_hellovetica_9_height,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
+static char *hellovetica_glyphs[] = {
+ ['A'] = glyph_hellovetica_A_bits,
+ ['B'] = glyph_hellovetica_B_bits,
+ ['C'] = glyph_hellovetica_C_bits,
+ ['D'] = glyph_hellovetica_D_bits,
+ ['E'] = glyph_hellovetica_E_bits,
+ ['F'] = glyph_hellovetica_F_bits,
+ ['G'] = glyph_hellovetica_G_bits,
+ ['H'] = glyph_hellovetica_H_bits,
+ ['I'] = glyph_hellovetica_I_bits,
+ ['J'] = glyph_hellovetica_J_bits,
+ ['K'] = glyph_hellovetica_K_bits,
+ ['L'] = glyph_hellovetica_L_bits,
+ ['M'] = glyph_hellovetica_M_bits,
+ ['N'] = glyph_hellovetica_N_bits,
+ ['O'] = glyph_hellovetica_O_bits,
+ ['P'] = glyph_hellovetica_P_bits,
+ ['Q'] = glyph_hellovetica_Q_bits,
+ ['R'] = glyph_hellovetica_R_bits,
+ ['S'] = glyph_hellovetica_S_bits,
+ ['T'] = glyph_hellovetica_T_bits,
+ ['U'] = glyph_hellovetica_U_bits,
+ ['V'] = glyph_hellovetica_V_bits,
+ ['W'] = glyph_hellovetica_W_bits,
+ ['X'] = glyph_hellovetica_X_bits,
+ ['Y'] = glyph_hellovetica_Y_bits,
+ ['Z'] = glyph_hellovetica_Z_bits,
+ ['0'] = glyph_hellovetica_0_bits,
+ ['1'] = glyph_hellovetica_1_bits,
+ ['2'] = glyph_hellovetica_2_bits,
+ ['3'] = glyph_hellovetica_3_bits,
+ ['4'] = glyph_hellovetica_4_bits,
+ ['5'] = glyph_hellovetica_5_bits,
+ ['6'] = glyph_hellovetica_6_bits,
+ ['7'] = glyph_hellovetica_7_bits,
+ ['8'] = glyph_hellovetica_8_bits,
+ ['9'] = glyph_hellovetica_9_bits,
+};
+const font_t font_hellovetica = {
+ .height = 22,
+ .glyphs = hellovetica_glyphs,
+};
diff --git a/fonts/free/nayupixel10.fon b/fonts/free/nayupixel10.fon
new file mode 100644
index 000000000..fec67ab6f
--- /dev/null
+++ b/fonts/free/nayupixel10.fon
@@ -0,0 +1,269 @@
+#include
+#define glyph_nayupixel10_period_width 8
+#define glyph_nayupixel10_period_height 9
+static char glyph_nayupixel10_period_bits[] = { glyph_nayupixel10_period_width, glyph_nayupixel10_period_height,
+ 0x00, 0x00, 0x00, 0x00, 0x06, 0x09, 0x06, 0x00, 0x00, };
+#define glyph_nayupixel10_colon_width 4
+#define glyph_nayupixel10_colon_height 9
+static char glyph_nayupixel10_colon_bits[] = { glyph_nayupixel10_colon_width, glyph_nayupixel10_colon_height,
+ 0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, };
+#define glyph_nayupixel10_semicolon_width 5
+#define glyph_nayupixel10_semicolon_height 9
+static char glyph_nayupixel10_semicolon_bits[] = { glyph_nayupixel10_semicolon_width, glyph_nayupixel10_semicolon_height,
+ 0x00, 0x00, 0x02, 0x02, 0x00, 0x02, 0x03, 0x00, 0x00, };
+#define glyph_nayupixel10_quote_width 4
+#define glyph_nayupixel10_quote_height 9
+static char glyph_nayupixel10_quote_bits[] = { glyph_nayupixel10_quote_width, glyph_nayupixel10_quote_height,
+ 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
+#define glyph_nayupixel10_dollar_width 6
+#define glyph_nayupixel10_dollar_height 9
+static char glyph_nayupixel10_dollar_bits[] = { glyph_nayupixel10_dollar_width, glyph_nayupixel10_dollar_height,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
+#define glyph_nayupixel10_comma_width 6
+#define glyph_nayupixel10_comma_height 9
+static char glyph_nayupixel10_comma_bits[] = { glyph_nayupixel10_comma_width, glyph_nayupixel10_comma_height,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x02, 0x00, };
+#define glyph_nayupixel10_minus_width 7
+#define glyph_nayupixel10_minus_height 9
+static char glyph_nayupixel10_minus_bits[] = { glyph_nayupixel10_minus_width, glyph_nayupixel10_minus_height,
+ 0x00, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, };
+#define glyph_nayupixel10_bang_width 6
+#define glyph_nayupixel10_bang_height 9
+static char glyph_nayupixel10_bang_bits[] = { glyph_nayupixel10_bang_width, glyph_nayupixel10_bang_height,
+ 0x02, 0x02, 0x02, 0x02, 0x00, 0x02, 0x05, 0x02, 0x00, };
+#define glyph_nayupixel10_question_width 7
+#define glyph_nayupixel10_question_height 9
+static char glyph_nayupixel10_question_bits[] = { glyph_nayupixel10_question_width, glyph_nayupixel10_question_height,
+ 0x00, 0x06, 0x09, 0x08, 0x04, 0x02, 0x00, 0x02, 0x00, };
+#define glyph_nayupixel10_lbrace_width 6
+#define glyph_nayupixel10_lbrace_height 9
+static char glyph_nayupixel10_lbrace_bits[] = { glyph_nayupixel10_lbrace_width, glyph_nayupixel10_lbrace_height,
+ 0x07, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x07, 0x00, };
+#define glyph_nayupixel10_rbrace_width 6
+#define glyph_nayupixel10_rbrace_height 9
+static char glyph_nayupixel10_rbrace_bits[] = { glyph_nayupixel10_rbrace_width, glyph_nayupixel10_rbrace_height,
+ 0x07, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x07, 0x00, };
+#define glyph_nayupixel10_percent_width 11
+#define glyph_nayupixel10_percent_height 9
+static char glyph_nayupixel10_percent_bits[] = { glyph_nayupixel10_percent_width, glyph_nayupixel10_percent_height,
+ 0x00, 0x00, 0x42, 0x00, 0x25, 0x00, 0x12, 0x00, 0x48, 0x00, 0xA4, 0x00,
+ 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, };
+#define glyph_nayupixel10_lpar_width 6
+#define glyph_nayupixel10_lpar_height 9
+static char glyph_nayupixel10_lpar_bits[] = { glyph_nayupixel10_lpar_width, glyph_nayupixel10_lpar_height,
+ 0x00, 0x06, 0x01, 0x01, 0x01, 0x01, 0x01, 0x06, 0x00, };
+#define glyph_nayupixel10_rpar_width 6
+#define glyph_nayupixel10_rpar_height 9
+static char glyph_nayupixel10_rpar_bits[] = { glyph_nayupixel10_rpar_width, glyph_nayupixel10_rpar_height,
+ 0x00, 0x03, 0x04, 0x04, 0x04, 0x04, 0x04, 0x03, 0x00, };
+#define glyph_nayupixel10_hash_width 6
+#define glyph_nayupixel10_hash_height 9
+static char glyph_nayupixel10_hash_bits[] = { glyph_nayupixel10_hash_width, glyph_nayupixel10_hash_height,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
+#define glyph_nayupixel10_A_width 9
+#define glyph_nayupixel10_A_height 9
+static char glyph_nayupixel10_A_bits[] = { glyph_nayupixel10_A_width, glyph_nayupixel10_A_height,
+ 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x11, 0x00, 0x11, 0x00, 0x11, 0x00,
+ 0x2E, 0x00, 0x00, 0x00, 0x00, 0x00, };
+#define glyph_nayupixel10_B_width 8
+#define glyph_nayupixel10_B_height 9
+static char glyph_nayupixel10_B_bits[] = { glyph_nayupixel10_B_width, glyph_nayupixel10_B_height,
+ 0x01, 0x01, 0x0F, 0x11, 0x11, 0x11, 0x0F, 0x00, 0x00, };
+#define glyph_nayupixel10_C_width 8
+#define glyph_nayupixel10_C_height 9
+static char glyph_nayupixel10_C_bits[] = { glyph_nayupixel10_C_width, glyph_nayupixel10_C_height,
+ 0x00, 0x00, 0x0E, 0x11, 0x01, 0x11, 0x0E, 0x00, 0x00, };
+#define glyph_nayupixel10_D_width 8
+#define glyph_nayupixel10_D_height 9
+static char glyph_nayupixel10_D_bits[] = { glyph_nayupixel10_D_width, glyph_nayupixel10_D_height,
+ 0x10, 0x10, 0x1E, 0x11, 0x11, 0x11, 0x1E, 0x00, 0x00, };
+#define glyph_nayupixel10_E_width 9
+#define glyph_nayupixel10_E_height 9
+static char glyph_nayupixel10_E_bits[] = { glyph_nayupixel10_E_width, glyph_nayupixel10_E_height,
+ 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x11, 0x00, 0x11, 0x00, 0x0F, 0x00,
+ 0x21, 0x00, 0x1E, 0x00, 0x00, 0x00, };
+#define glyph_nayupixel10_F_width 9
+#define glyph_nayupixel10_F_height 9
+static char glyph_nayupixel10_F_bits[] = { glyph_nayupixel10_F_width, glyph_nayupixel10_F_height,
+ 0x00, 0x00, 0x1C, 0x00, 0x24, 0x00, 0x04, 0x00, 0x1F, 0x00, 0x04, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, };
+#define glyph_nayupixel10_G_width 8
+#define glyph_nayupixel10_G_height 9
+static char glyph_nayupixel10_G_bits[] = { glyph_nayupixel10_G_width, glyph_nayupixel10_G_height,
+ 0x00, 0x00, 0x1E, 0x11, 0x11, 0x1E, 0x10, 0x11, 0x0E, };
+#define glyph_nayupixel10_H_width 8
+#define glyph_nayupixel10_H_height 9
+static char glyph_nayupixel10_H_bits[] = { glyph_nayupixel10_H_width, glyph_nayupixel10_H_height,
+ 0x00, 0x01, 0x01, 0x0F, 0x11, 0x11, 0x11, 0x00, 0x00, };
+#define glyph_nayupixel10_I_width 6
+#define glyph_nayupixel10_I_height 9
+static char glyph_nayupixel10_I_bits[] = { glyph_nayupixel10_I_width, glyph_nayupixel10_I_height,
+ 0x02, 0x05, 0x02, 0x00, 0x02, 0x02, 0x02, 0x02, 0x00, };
+#define glyph_nayupixel10_J_width 8
+#define glyph_nayupixel10_J_height 9
+static char glyph_nayupixel10_J_bits[] = { glyph_nayupixel10_J_width, glyph_nayupixel10_J_height,
+ 0x08, 0x14, 0x08, 0x00, 0x08, 0x08, 0x09, 0x09, 0x06, };
+#define glyph_nayupixel10_K_width 7
+#define glyph_nayupixel10_K_height 9
+static char glyph_nayupixel10_K_bits[] = { glyph_nayupixel10_K_width, glyph_nayupixel10_K_height,
+ 0x00, 0x01, 0x09, 0x05, 0x03, 0x05, 0x09, 0x00, 0x00, };
+#define glyph_nayupixel10_L_width 6
+#define glyph_nayupixel10_L_height 9
+static char glyph_nayupixel10_L_bits[] = { glyph_nayupixel10_L_width, glyph_nayupixel10_L_height,
+ 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x07, 0x00, 0x00, };
+#define glyph_nayupixel10_M_width 10
+#define glyph_nayupixel10_M_height 9
+static char glyph_nayupixel10_M_bits[] = { glyph_nayupixel10_M_width, glyph_nayupixel10_M_height,
+ 0x00, 0x00, 0x00, 0x00, 0x35, 0x00, 0x4B, 0x00, 0x49, 0x00, 0x49, 0x00,
+ 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, };
+#define glyph_nayupixel10_N_width 8
+#define glyph_nayupixel10_N_height 9
+static char glyph_nayupixel10_N_bits[] = { glyph_nayupixel10_N_width, glyph_nayupixel10_N_height,
+ 0x00, 0x00, 0x0D, 0x13, 0x11, 0x11, 0x11, 0x00, 0x00, };
+#define glyph_nayupixel10_O_width 8
+#define glyph_nayupixel10_O_height 9
+static char glyph_nayupixel10_O_bits[] = { glyph_nayupixel10_O_width, glyph_nayupixel10_O_height,
+ 0x00, 0x00, 0x0E, 0x11, 0x11, 0x11, 0x0E, 0x00, 0x00, };
+#define glyph_nayupixel10_P_width 8
+#define glyph_nayupixel10_P_height 9
+static char glyph_nayupixel10_P_bits[] = { glyph_nayupixel10_P_width, glyph_nayupixel10_P_height,
+ 0x00, 0x00, 0x0F, 0x11, 0x11, 0x0F, 0x01, 0x01, 0x01, };
+#define glyph_nayupixel10_Q_width 8
+#define glyph_nayupixel10_Q_height 9
+static char glyph_nayupixel10_Q_bits[] = { glyph_nayupixel10_Q_width, glyph_nayupixel10_Q_height,
+ 0x00, 0x00, 0x1E, 0x11, 0x11, 0x1E, 0x10, 0x10, 0x10, };
+#define glyph_nayupixel10_R_width 8
+#define glyph_nayupixel10_R_height 9
+static char glyph_nayupixel10_R_bits[] = { glyph_nayupixel10_R_width, glyph_nayupixel10_R_height,
+ 0x00, 0x00, 0x0D, 0x13, 0x01, 0x01, 0x01, 0x00, 0x00, };
+#define glyph_nayupixel10_S_width 7
+#define glyph_nayupixel10_S_height 9
+static char glyph_nayupixel10_S_bits[] = { glyph_nayupixel10_S_width, glyph_nayupixel10_S_height,
+ 0x00, 0x06, 0x09, 0x02, 0x04, 0x09, 0x06, 0x00, 0x00, };
+#define glyph_nayupixel10_T_width 8
+#define glyph_nayupixel10_T_height 9
+static char glyph_nayupixel10_T_bits[] = { glyph_nayupixel10_T_width, glyph_nayupixel10_T_height,
+ 0x00, 0x04, 0x04, 0x04, 0x1F, 0x04, 0x14, 0x08, 0x00, };
+#define glyph_nayupixel10_U_width 8
+#define glyph_nayupixel10_U_height 9
+static char glyph_nayupixel10_U_bits[] = { glyph_nayupixel10_U_width, glyph_nayupixel10_U_height,
+ 0x00, 0x00, 0x11, 0x11, 0x11, 0x11, 0x0E, 0x00, 0x00, };
+#define glyph_nayupixel10_V_width 8
+#define glyph_nayupixel10_V_height 9
+static char glyph_nayupixel10_V_bits[] = { glyph_nayupixel10_V_width, glyph_nayupixel10_V_height,
+ 0x00, 0x00, 0x11, 0x11, 0x11, 0x0A, 0x04, 0x00, 0x00, };
+#define glyph_nayupixel10_W_width 10
+#define glyph_nayupixel10_W_height 9
+static char glyph_nayupixel10_W_bits[] = { glyph_nayupixel10_W_width, glyph_nayupixel10_W_height,
+ 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x49, 0x00, 0x49, 0x00, 0x49, 0x00,
+ 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, };
+#define glyph_nayupixel10_X_width 8
+#define glyph_nayupixel10_X_height 9
+static char glyph_nayupixel10_X_bits[] = { glyph_nayupixel10_X_width, glyph_nayupixel10_X_height,
+ 0x00, 0x00, 0x11, 0x0A, 0x04, 0x0A, 0x11, 0x00, 0x00, };
+#define glyph_nayupixel10_Y_width 8
+#define glyph_nayupixel10_Y_height 9
+static char glyph_nayupixel10_Y_bits[] = { glyph_nayupixel10_Y_width, glyph_nayupixel10_Y_height,
+ 0x00, 0x00, 0x11, 0x11, 0x11, 0x1E, 0x10, 0x11, 0x0E, };
+#define glyph_nayupixel10_Z_width 8
+#define glyph_nayupixel10_Z_height 9
+static char glyph_nayupixel10_Z_bits[] = { glyph_nayupixel10_Z_width, glyph_nayupixel10_Z_height,
+ 0x00, 0x00, 0x1F, 0x08, 0x04, 0x02, 0x1F, 0x00, 0x00, };
+#define glyph_nayupixel10_0_width 7
+#define glyph_nayupixel10_0_height 9
+static char glyph_nayupixel10_0_bits[] = { glyph_nayupixel10_0_width, glyph_nayupixel10_0_height,
+ 0x00, 0x06, 0x09, 0x09, 0x09, 0x09, 0x06, 0x00, 0x00, };
+#define glyph_nayupixel10_1_width 6
+#define glyph_nayupixel10_1_height 9
+static char glyph_nayupixel10_1_bits[] = { glyph_nayupixel10_1_width, glyph_nayupixel10_1_height,
+ 0x00, 0x04, 0x06, 0x05, 0x04, 0x04, 0x04, 0x00, 0x00, };
+#define glyph_nayupixel10_2_width 7
+#define glyph_nayupixel10_2_height 9
+static char glyph_nayupixel10_2_bits[] = { glyph_nayupixel10_2_width, glyph_nayupixel10_2_height,
+ 0x00, 0x06, 0x09, 0x08, 0x04, 0x02, 0x0F, 0x00, 0x00, };
+#define glyph_nayupixel10_3_width 7
+#define glyph_nayupixel10_3_height 9
+static char glyph_nayupixel10_3_bits[] = { glyph_nayupixel10_3_width, glyph_nayupixel10_3_height,
+ 0x00, 0x06, 0x09, 0x08, 0x04, 0x08, 0x09, 0x06, 0x00, };
+#define glyph_nayupixel10_4_width 7
+#define glyph_nayupixel10_4_height 9
+static char glyph_nayupixel10_4_bits[] = { glyph_nayupixel10_4_width, glyph_nayupixel10_4_height,
+ 0x00, 0x0C, 0x0A, 0x09, 0x0F, 0x08, 0x08, 0x00, 0x00, };
+#define glyph_nayupixel10_5_width 7
+#define glyph_nayupixel10_5_height 9
+static char glyph_nayupixel10_5_bits[] = { glyph_nayupixel10_5_width, glyph_nayupixel10_5_height,
+ 0x00, 0x0F, 0x01, 0x07, 0x08, 0x08, 0x07, 0x00, 0x00, };
+#define glyph_nayupixel10_6_width 8
+#define glyph_nayupixel10_6_height 9
+static char glyph_nayupixel10_6_bits[] = { glyph_nayupixel10_6_width, glyph_nayupixel10_6_height,
+ 0x00, 0x0E, 0x01, 0x0F, 0x11, 0x11, 0x0E, 0x00, 0x00, };
+#define glyph_nayupixel10_7_width 7
+#define glyph_nayupixel10_7_height 9
+static char glyph_nayupixel10_7_bits[] = { glyph_nayupixel10_7_width, glyph_nayupixel10_7_height,
+ 0x00, 0x0F, 0x08, 0x04, 0x02, 0x01, 0x01, 0x00, 0x00, };
+#define glyph_nayupixel10_8_width 7
+#define glyph_nayupixel10_8_height 9
+static char glyph_nayupixel10_8_bits[] = { glyph_nayupixel10_8_width, glyph_nayupixel10_8_height,
+ 0x06, 0x09, 0x09, 0x06, 0x09, 0x09, 0x06, 0x00, 0x00, };
+#define glyph_nayupixel10_9_width 8
+#define glyph_nayupixel10_9_height 9
+static char glyph_nayupixel10_9_bits[] = { glyph_nayupixel10_9_width, glyph_nayupixel10_9_height,
+ 0x00, 0x1E, 0x11, 0x11, 0x1E, 0x10, 0x10, 0x00, 0x00, };
+static char *nayupixel10_glyphs[] = {
+ ['.'] = glyph_nayupixel10_period_bits,
+ [':'] = glyph_nayupixel10_colon_bits,
+ [';'] = glyph_nayupixel10_semicolon_bits,
+ ['\''] = glyph_nayupixel10_quote_bits,
+ ['$'] = glyph_nayupixel10_dollar_bits,
+ [','] = glyph_nayupixel10_comma_bits,
+ ['-'] = glyph_nayupixel10_minus_bits,
+ ['!'] = glyph_nayupixel10_bang_bits,
+ ['?'] = glyph_nayupixel10_question_bits,
+ ['['] = glyph_nayupixel10_lbrace_bits,
+ [']'] = glyph_nayupixel10_rbrace_bits,
+ ['%'] = glyph_nayupixel10_percent_bits,
+ ['('] = glyph_nayupixel10_lpar_bits,
+ [')'] = glyph_nayupixel10_rpar_bits,
+ ['#'] = glyph_nayupixel10_hash_bits,
+ ['A'] = glyph_nayupixel10_A_bits,
+ ['B'] = glyph_nayupixel10_B_bits,
+ ['C'] = glyph_nayupixel10_C_bits,
+ ['D'] = glyph_nayupixel10_D_bits,
+ ['E'] = glyph_nayupixel10_E_bits,
+ ['F'] = glyph_nayupixel10_F_bits,
+ ['G'] = glyph_nayupixel10_G_bits,
+ ['H'] = glyph_nayupixel10_H_bits,
+ ['I'] = glyph_nayupixel10_I_bits,
+ ['J'] = glyph_nayupixel10_J_bits,
+ ['K'] = glyph_nayupixel10_K_bits,
+ ['L'] = glyph_nayupixel10_L_bits,
+ ['M'] = glyph_nayupixel10_M_bits,
+ ['N'] = glyph_nayupixel10_N_bits,
+ ['O'] = glyph_nayupixel10_O_bits,
+ ['P'] = glyph_nayupixel10_P_bits,
+ ['Q'] = glyph_nayupixel10_Q_bits,
+ ['R'] = glyph_nayupixel10_R_bits,
+ ['S'] = glyph_nayupixel10_S_bits,
+ ['T'] = glyph_nayupixel10_T_bits,
+ ['U'] = glyph_nayupixel10_U_bits,
+ ['V'] = glyph_nayupixel10_V_bits,
+ ['W'] = glyph_nayupixel10_W_bits,
+ ['X'] = glyph_nayupixel10_X_bits,
+ ['Y'] = glyph_nayupixel10_Y_bits,
+ ['Z'] = glyph_nayupixel10_Z_bits,
+ ['0'] = glyph_nayupixel10_0_bits,
+ ['1'] = glyph_nayupixel10_1_bits,
+ ['2'] = glyph_nayupixel10_2_bits,
+ ['3'] = glyph_nayupixel10_3_bits,
+ ['4'] = glyph_nayupixel10_4_bits,
+ ['5'] = glyph_nayupixel10_5_bits,
+ ['6'] = glyph_nayupixel10_6_bits,
+ ['7'] = glyph_nayupixel10_7_bits,
+ ['8'] = glyph_nayupixel10_8_bits,
+ ['9'] = glyph_nayupixel10_9_bits,
+};
+const font_t font_nayupixel10 = {
+ .height = 10,
+ .spacing = -2,
+ .glyphs = nayupixel10_glyphs,
+};
diff --git a/fonts/free/pixelmix.fon b/fonts/free/pixelmix.fon
new file mode 100644
index 000000000..de013a158
--- /dev/null
+++ b/fonts/free/pixelmix.fon
@@ -0,0 +1,259 @@
+#include
+#define glyph_pixelmix_A_width 11
+#define glyph_pixelmix_A_height 13
+static char glyph_pixelmix_A_bits[] = { glyph_pixelmix_A_width, glyph_pixelmix_A_height,
+ 0x00, 0x00, 0x3E, 0x00, 0xFF, 0x00, 0xC3, 0x00, 0xC3, 0x00, 0x7F, 0x00,
+ 0xFF, 0x00, 0xC3, 0x00, 0xC3, 0x00, 0xC3, 0x00, 0xC1, 0x00, 0xC3, 0x00,
+ 0x00, 0x00, };
+#define glyph_pixelmix_B_width 11
+#define glyph_pixelmix_B_height 13
+static char glyph_pixelmix_B_bits[] = { glyph_pixelmix_B_width, glyph_pixelmix_B_height,
+ 0x00, 0x00, 0x3F, 0x00, 0xFF, 0x00, 0xC3, 0x00, 0xC3, 0x00, 0x3F, 0x00,
+ 0x3F, 0x00, 0xC3, 0x00, 0xC3, 0x00, 0xC3, 0x00, 0x3F, 0x00, 0x3F, 0x00,
+ 0x00, 0x00, };
+#define glyph_pixelmix_C_width 11
+#define glyph_pixelmix_C_height 13
+static char glyph_pixelmix_C_bits[] = { glyph_pixelmix_C_width, glyph_pixelmix_C_height,
+ 0x00, 0x00, 0x3E, 0x00, 0xFF, 0x00, 0xC3, 0x00, 0x01, 0x00, 0x03, 0x00,
+ 0x03, 0x00, 0x03, 0x00, 0x03, 0x00, 0xC3, 0x00, 0x7E, 0x00, 0x3E, 0x00,
+ 0x00, 0x00, };
+#define glyph_pixelmix_D_width 11
+#define glyph_pixelmix_D_height 13
+static char glyph_pixelmix_D_bits[] = { glyph_pixelmix_D_width, glyph_pixelmix_D_height,
+ 0x00, 0x00, 0x3F, 0x00, 0xFF, 0x00, 0xC3, 0x00, 0xC3, 0x00, 0xC3, 0x00,
+ 0xC3, 0x00, 0x43, 0x00, 0xC3, 0x00, 0xC3, 0x00, 0x3F, 0x00, 0x3F, 0x00,
+ 0x00, 0x00, };
+#define glyph_pixelmix_E_width 11
+#define glyph_pixelmix_E_height 13
+static char glyph_pixelmix_E_bits[] = { glyph_pixelmix_E_width, glyph_pixelmix_E_height,
+ 0x00, 0x00, 0xFF, 0x00, 0x7F, 0x00, 0x03, 0x00, 0x03, 0x00, 0x3F, 0x00,
+ 0x3F, 0x00, 0x03, 0x00, 0x03, 0x00, 0x03, 0x00, 0x7F, 0x00, 0xFF, 0x00,
+ 0x00, 0x00, };
+#define glyph_pixelmix_F_width 11
+#define glyph_pixelmix_F_height 13
+static char glyph_pixelmix_F_bits[] = { glyph_pixelmix_F_width, glyph_pixelmix_F_height,
+ 0x00, 0x00, 0xFF, 0x00, 0x7F, 0x00, 0x03, 0x00, 0x03, 0x00, 0x3F, 0x00,
+ 0x3F, 0x00, 0x03, 0x00, 0x03, 0x00, 0x03, 0x00, 0x01, 0x00, 0x03, 0x00,
+ 0x00, 0x00, };
+#define glyph_pixelmix_G_width 11
+#define glyph_pixelmix_G_height 13
+static char glyph_pixelmix_G_bits[] = { glyph_pixelmix_G_width, glyph_pixelmix_G_height,
+ 0x00, 0x00, 0x3E, 0x00, 0xFF, 0x00, 0x43, 0x00, 0x03, 0x00, 0x7B, 0x00,
+ 0xFB, 0x00, 0xC3, 0x00, 0xC3, 0x00, 0xC3, 0x00, 0xFC, 0x00, 0xFE, 0x00,
+ 0x00, 0x00, };
+#define glyph_pixelmix_H_width 11
+#define glyph_pixelmix_H_height 13
+static char glyph_pixelmix_H_bits[] = { glyph_pixelmix_H_width, glyph_pixelmix_H_height,
+ 0x00, 0x00, 0xC3, 0x00, 0xC3, 0x00, 0xC3, 0x00, 0xC3, 0x00, 0xFF, 0x00,
+ 0xFF, 0x00, 0x43, 0x00, 0xC3, 0x00, 0xC3, 0x00, 0xC1, 0x00, 0xC3, 0x00,
+ 0x00, 0x00, };
+#define glyph_pixelmix_I_width 9
+#define glyph_pixelmix_I_height 13
+static char glyph_pixelmix_I_bits[] = { glyph_pixelmix_I_width, glyph_pixelmix_I_height,
+ 0x00, 0x00, 0x1F, 0x00, 0x1F, 0x00, 0x06, 0x00, 0x06, 0x00, 0x06, 0x00,
+ 0x06, 0x00, 0x04, 0x00, 0x06, 0x00, 0x06, 0x00, 0x1F, 0x00, 0x1F, 0x00,
+ 0x00, 0x00, };
+#define glyph_pixelmix_J_width 12
+#define glyph_pixelmix_J_height 13
+static char glyph_pixelmix_J_bits[] = { glyph_pixelmix_J_width, glyph_pixelmix_J_height,
+ 0x00, 0x00, 0xF8, 0x00, 0xF8, 0x00, 0x20, 0x00, 0x20, 0x00, 0x20, 0x00,
+ 0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0x23, 0x00, 0x1C, 0x00, 0x1C, 0x00,
+ 0x00, 0x00, };
+#define glyph_pixelmix_K_width 11
+#define glyph_pixelmix_K_height 13
+static char glyph_pixelmix_K_bits[] = { glyph_pixelmix_K_width, glyph_pixelmix_K_height,
+ 0x00, 0x00, 0xC3, 0x00, 0x63, 0x00, 0x33, 0x00, 0x1B, 0x00, 0x0F, 0x00,
+ 0x07, 0x00, 0x1B, 0x00, 0x0B, 0x00, 0x33, 0x00, 0x61, 0x00, 0xC3, 0x00,
+ 0x00, 0x00, };
+#define glyph_pixelmix_L_width 11
+#define glyph_pixelmix_L_height 13
+static char glyph_pixelmix_L_bits[] = { glyph_pixelmix_L_width, glyph_pixelmix_L_height,
+ 0x00, 0x00, 0x03, 0x00, 0x03, 0x00, 0x03, 0x00, 0x01, 0x00, 0x03, 0x00,
+ 0x03, 0x00, 0x03, 0x00, 0x03, 0x00, 0x03, 0x00, 0x7F, 0x00, 0xFF, 0x00,
+ 0x00, 0x00, };
+#define glyph_pixelmix_M_width 11
+#define glyph_pixelmix_M_height 13
+static char glyph_pixelmix_M_bits[] = { glyph_pixelmix_M_width, glyph_pixelmix_M_height,
+ 0x00, 0x00, 0xC3, 0x00, 0xE7, 0x00, 0xF7, 0x00, 0xDB, 0x00, 0xDB, 0x00,
+ 0xDB, 0x00, 0xC3, 0x00, 0xC3, 0x00, 0xC3, 0x00, 0xC1, 0x00, 0xC3, 0x00,
+ 0x00, 0x00, };
+#define glyph_pixelmix_N_width 11
+#define glyph_pixelmix_N_height 13
+static char glyph_pixelmix_N_bits[] = { glyph_pixelmix_N_width, glyph_pixelmix_N_height,
+ 0x00, 0x00, 0xC3, 0x00, 0xC3, 0x00, 0xC3, 0x00, 0xC7, 0x00, 0xCF, 0x00,
+ 0xDB, 0x00, 0xF3, 0x00, 0xF3, 0x00, 0xC3, 0x00, 0xC1, 0x00, 0xC3, 0x00,
+ 0x00, 0x00, };
+#define glyph_pixelmix_O_width 11
+#define glyph_pixelmix_O_height 13
+static char glyph_pixelmix_O_bits[] = { glyph_pixelmix_O_width, glyph_pixelmix_O_height,
+ 0x00, 0x00, 0x3E, 0x00, 0xFF, 0x00, 0xC3, 0x00, 0xC1, 0x00, 0xC3, 0x00,
+ 0xC3, 0x00, 0xC3, 0x00, 0xC3, 0x00, 0xC3, 0x00, 0x3C, 0x00, 0x3E, 0x00,
+ 0x00, 0x00, };
+#define glyph_pixelmix_P_width 11
+#define glyph_pixelmix_P_height 13
+static char glyph_pixelmix_P_bits[] = { glyph_pixelmix_P_width, glyph_pixelmix_P_height,
+ 0x00, 0x00, 0x3F, 0x00, 0xFF, 0x00, 0xC3, 0x00, 0xC3, 0x00, 0x3F, 0x00,
+ 0x3F, 0x00, 0x03, 0x00, 0x03, 0x00, 0x03, 0x00, 0x01, 0x00, 0x03, 0x00,
+ 0x00, 0x00, };
+#define glyph_pixelmix_Q_width 11
+#define glyph_pixelmix_Q_height 13
+static char glyph_pixelmix_Q_bits[] = { glyph_pixelmix_Q_width, glyph_pixelmix_Q_height,
+ 0x00, 0x00, 0x3C, 0x00, 0x7C, 0x00, 0xC3, 0x00, 0xC1, 0x00, 0xC3, 0x00,
+ 0xC3, 0x00, 0xDB, 0x00, 0x53, 0x00, 0x23, 0x00, 0x7D, 0x00, 0xDC, 0x00,
+ 0x00, 0x00, };
+#define glyph_pixelmix_R_width 11
+#define glyph_pixelmix_R_height 13
+static char glyph_pixelmix_R_bits[] = { glyph_pixelmix_R_width, glyph_pixelmix_R_height,
+ 0x00, 0x00, 0x3F, 0x00, 0xFF, 0x00, 0xC3, 0x00, 0xC3, 0x00, 0x3F, 0x00,
+ 0x3F, 0x00, 0x1B, 0x00, 0x1B, 0x00, 0x33, 0x00, 0x61, 0x00, 0xC3, 0x00,
+ 0x00, 0x00, };
+#define glyph_pixelmix_S_width 11
+#define glyph_pixelmix_S_height 13
+static char glyph_pixelmix_S_bits[] = { glyph_pixelmix_S_width, glyph_pixelmix_S_height,
+ 0x00, 0x00, 0xFE, 0x00, 0x7F, 0x00, 0x03, 0x00, 0x03, 0x00, 0x3C, 0x00,
+ 0x3E, 0x00, 0xC0, 0x00, 0xC0, 0x00, 0xC0, 0x00, 0x3F, 0x00, 0x3F, 0x00,
+ 0x00, 0x00, };
+#define glyph_pixelmix_T_width 12
+#define glyph_pixelmix_T_height 13
+static char glyph_pixelmix_T_bits[] = { glyph_pixelmix_T_width, glyph_pixelmix_T_height,
+ 0x00, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0x18, 0x00, 0x08, 0x00, 0x18, 0x00,
+ 0x18, 0x00, 0x08, 0x00, 0x08, 0x00, 0x18, 0x00, 0x18, 0x00, 0x18, 0x00,
+ 0x00, 0x00, };
+#define glyph_pixelmix_U_width 11
+#define glyph_pixelmix_U_height 13
+static char glyph_pixelmix_U_bits[] = { glyph_pixelmix_U_width, glyph_pixelmix_U_height,
+ 0x00, 0x00, 0xC3, 0x00, 0xC3, 0x00, 0xC3, 0x00, 0xC1, 0x00, 0xC3, 0x00,
+ 0xC3, 0x00, 0xC3, 0x00, 0xC3, 0x00, 0xC3, 0x00, 0xFF, 0x00, 0x3E, 0x00,
+ 0x00, 0x00, };
+#define glyph_pixelmix_V_width 11
+#define glyph_pixelmix_V_height 13
+static char glyph_pixelmix_V_bits[] = { glyph_pixelmix_V_width, glyph_pixelmix_V_height,
+ 0x00, 0x00, 0xC3, 0x00, 0xC3, 0x00, 0xC3, 0x00, 0xC3, 0x00, 0xC3, 0x00,
+ 0xC3, 0x00, 0x36, 0x00, 0x34, 0x00, 0x36, 0x00, 0x08, 0x00, 0x18, 0x00,
+ 0x00, 0x00, };
+#define glyph_pixelmix_W_width 11
+#define glyph_pixelmix_W_height 13
+static char glyph_pixelmix_W_bits[] = { glyph_pixelmix_W_width, glyph_pixelmix_W_height,
+ 0x00, 0x00, 0xC3, 0x00, 0xC3, 0x00, 0xC3, 0x00, 0xC3, 0x00, 0xC3, 0x00,
+ 0xDB, 0x00, 0xCB, 0x00, 0xCB, 0x00, 0xDB, 0x00, 0xFF, 0x00, 0x36, 0x00,
+ 0x00, 0x00, };
+#define glyph_pixelmix_X_width 11
+#define glyph_pixelmix_X_height 13
+static char glyph_pixelmix_X_bits[] = { glyph_pixelmix_X_width, glyph_pixelmix_X_height,
+ 0x00, 0x00, 0xC3, 0x00, 0xC3, 0x00, 0xC3, 0x00, 0x36, 0x00, 0x3E, 0x00,
+ 0x18, 0x00, 0x36, 0x00, 0x34, 0x00, 0xC3, 0x00, 0xC3, 0x00, 0xC3, 0x00,
+ 0x00, 0x00, };
+#define glyph_pixelmix_Y_width 11
+#define glyph_pixelmix_Y_height 13
+static char glyph_pixelmix_Y_bits[] = { glyph_pixelmix_Y_width, glyph_pixelmix_Y_height,
+ 0x00, 0x00, 0xC3, 0x00, 0xC3, 0x00, 0xC3, 0x00, 0xC3, 0x00, 0xE7, 0x00,
+ 0x36, 0x00, 0x18, 0x00, 0x08, 0x00, 0x18, 0x00, 0x18, 0x00, 0x18, 0x00,
+ 0x00, 0x00, };
+#define glyph_pixelmix_Z_width 11
+#define glyph_pixelmix_Z_height 13
+static char glyph_pixelmix_Z_bits[] = { glyph_pixelmix_Z_width, glyph_pixelmix_Z_height,
+ 0x00, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xC0, 0x00, 0x30, 0x00, 0x28, 0x00,
+ 0x18, 0x00, 0x06, 0x00, 0x06, 0x00, 0x03, 0x00, 0x7F, 0x00, 0xFF, 0x00,
+ 0x00, 0x00, };
+#define glyph_pixelmix_0_width 11
+#define glyph_pixelmix_0_height 13
+static char glyph_pixelmix_0_bits[] = { glyph_pixelmix_0_width, glyph_pixelmix_0_height,
+ 0x00, 0x00, 0x3E, 0x00, 0xFF, 0x00, 0xC3, 0x00, 0xF3, 0x00, 0xDB, 0x00,
+ 0xDB, 0x00, 0xC7, 0x00, 0xC7, 0x00, 0xC3, 0x00, 0x3C, 0x00, 0x3E, 0x00,
+ 0x00, 0x00, };
+#define glyph_pixelmix_1_width 9
+#define glyph_pixelmix_1_height 13
+static char glyph_pixelmix_1_bits[] = { glyph_pixelmix_1_width, glyph_pixelmix_1_height,
+ 0x00, 0x00, 0x06, 0x00, 0x07, 0x00, 0x07, 0x00, 0x06, 0x00, 0x06, 0x00,
+ 0x06, 0x00, 0x04, 0x00, 0x06, 0x00, 0x06, 0x00, 0x1F, 0x00, 0x1F, 0x00,
+ 0x00, 0x00, };
+#define glyph_pixelmix_2_width 11
+#define glyph_pixelmix_2_height 13
+static char glyph_pixelmix_2_bits[] = { glyph_pixelmix_2_width, glyph_pixelmix_2_height,
+ 0x00, 0x00, 0x3E, 0x00, 0xFF, 0x00, 0xC1, 0x00, 0xC0, 0x00, 0x20, 0x00,
+ 0x30, 0x00, 0x18, 0x00, 0x08, 0x00, 0x06, 0x00, 0x7F, 0x00, 0xFF, 0x00,
+ 0x00, 0x00, };
+#define glyph_pixelmix_3_width 11
+#define glyph_pixelmix_3_height 13
+static char glyph_pixelmix_3_bits[] = { glyph_pixelmix_3_width, glyph_pixelmix_3_height,
+ 0x00, 0x00, 0xFF, 0x00, 0x7F, 0x00, 0x30, 0x00, 0x18, 0x00, 0x38, 0x00,
+ 0x30, 0x00, 0x40, 0x00, 0xC0, 0x00, 0xC3, 0x00, 0x7E, 0x00, 0x3E, 0x00,
+ 0x00, 0x00, };
+#define glyph_pixelmix_4_width 11
+#define glyph_pixelmix_4_height 13
+static char glyph_pixelmix_4_bits[] = { glyph_pixelmix_4_width, glyph_pixelmix_4_height,
+ 0x00, 0x00, 0x30, 0x00, 0x38, 0x00, 0x38, 0x00, 0x36, 0x00, 0x36, 0x00,
+ 0x33, 0x00, 0xFF, 0x00, 0x7F, 0x00, 0x30, 0x00, 0x30, 0x00, 0x30, 0x00,
+ 0x00, 0x00, };
+#define glyph_pixelmix_5_width 11
+#define glyph_pixelmix_5_height 13
+static char glyph_pixelmix_5_bits[] = { glyph_pixelmix_5_width, glyph_pixelmix_5_height,
+ 0x00, 0x00, 0xFF, 0x00, 0x7F, 0x00, 0x03, 0x00, 0x3F, 0x00, 0x7F, 0x00,
+ 0xC0, 0x00, 0xC0, 0x00, 0xC0, 0x00, 0xC3, 0x00, 0x7D, 0x00, 0x3E, 0x00,
+ 0x00, 0x00, };
+#define glyph_pixelmix_6_width 11
+#define glyph_pixelmix_6_height 13
+static char glyph_pixelmix_6_bits[] = { glyph_pixelmix_6_width, glyph_pixelmix_6_height,
+ 0x00, 0x00, 0x38, 0x00, 0x3C, 0x00, 0x06, 0x00, 0x03, 0x00, 0x3F, 0x00,
+ 0x3F, 0x00, 0xC3, 0x00, 0xC3, 0x00, 0xC3, 0x00, 0x3C, 0x00, 0x3E, 0x00,
+ 0x00, 0x00, };
+#define glyph_pixelmix_7_width 12
+#define glyph_pixelmix_7_height 13
+static char glyph_pixelmix_7_bits[] = { glyph_pixelmix_7_width, glyph_pixelmix_7_height,
+ 0x00, 0x00, 0xFF, 0x00, 0xFE, 0x00, 0xC0, 0x00, 0x60, 0x00, 0x30, 0x00,
+ 0x18, 0x00, 0x0C, 0x00, 0x0C, 0x00, 0x0C, 0x00, 0x0C, 0x00, 0x0C, 0x00,
+ 0x00, 0x00, };
+#define glyph_pixelmix_8_width 11
+#define glyph_pixelmix_8_height 13
+static char glyph_pixelmix_8_bits[] = { glyph_pixelmix_8_width, glyph_pixelmix_8_height,
+ 0x00, 0x00, 0x3E, 0x00, 0xFF, 0x00, 0xC3, 0x00, 0xC3, 0x00, 0x3C, 0x00,
+ 0x3E, 0x00, 0xC3, 0x00, 0xC3, 0x00, 0xC3, 0x00, 0x3C, 0x00, 0x3E, 0x00,
+ 0x00, 0x00, };
+#define glyph_pixelmix_9_width 11
+#define glyph_pixelmix_9_height 13
+static char glyph_pixelmix_9_bits[] = { glyph_pixelmix_9_width, glyph_pixelmix_9_height,
+ 0x00, 0x00, 0x3C, 0x00, 0x3C, 0x00, 0xC3, 0x00, 0xC3, 0x00, 0x7D, 0x00,
+ 0xFC, 0x00, 0xC0, 0x00, 0xC0, 0x00, 0x20, 0x00, 0x3C, 0x00, 0x1C, 0x00,
+ 0x00, 0x00, };
+static char *pixelmix_glyphs[] = {
+ ['A'] = glyph_pixelmix_A_bits,
+ ['B'] = glyph_pixelmix_B_bits,
+ ['C'] = glyph_pixelmix_C_bits,
+ ['D'] = glyph_pixelmix_D_bits,
+ ['E'] = glyph_pixelmix_E_bits,
+ ['F'] = glyph_pixelmix_F_bits,
+ ['G'] = glyph_pixelmix_G_bits,
+ ['H'] = glyph_pixelmix_H_bits,
+ ['I'] = glyph_pixelmix_I_bits,
+ ['J'] = glyph_pixelmix_J_bits,
+ ['K'] = glyph_pixelmix_K_bits,
+ ['L'] = glyph_pixelmix_L_bits,
+ ['M'] = glyph_pixelmix_M_bits,
+ ['N'] = glyph_pixelmix_N_bits,
+ ['O'] = glyph_pixelmix_O_bits,
+ ['P'] = glyph_pixelmix_P_bits,
+ ['Q'] = glyph_pixelmix_Q_bits,
+ ['R'] = glyph_pixelmix_R_bits,
+ ['S'] = glyph_pixelmix_S_bits,
+ ['T'] = glyph_pixelmix_T_bits,
+ ['U'] = glyph_pixelmix_U_bits,
+ ['V'] = glyph_pixelmix_V_bits,
+ ['W'] = glyph_pixelmix_W_bits,
+ ['X'] = glyph_pixelmix_X_bits,
+ ['Y'] = glyph_pixelmix_Y_bits,
+ ['Z'] = glyph_pixelmix_Z_bits,
+ ['0'] = glyph_pixelmix_0_bits,
+ ['1'] = glyph_pixelmix_1_bits,
+ ['2'] = glyph_pixelmix_2_bits,
+ ['3'] = glyph_pixelmix_3_bits,
+ ['4'] = glyph_pixelmix_4_bits,
+ ['5'] = glyph_pixelmix_5_bits,
+ ['6'] = glyph_pixelmix_6_bits,
+ ['7'] = glyph_pixelmix_7_bits,
+ ['8'] = glyph_pixelmix_8_bits,
+ ['9'] = glyph_pixelmix_9_bits,
+};
+const font_t font_pixelmix = {
+ .height = 13,
+ .glyphs = pixelmix_glyphs,
+};
diff --git a/fonts/free/quadrit.fon b/fonts/free/quadrit.fon
new file mode 100644
index 000000000..cbcbe6927
--- /dev/null
+++ b/fonts/free/quadrit.fon
@@ -0,0 +1,280 @@
+#include
+#define glyph_quadrit_period_width 2
+#define glyph_quadrit_period_height 2
+static char glyph_quadrit_period_bits[] = { glyph_quadrit_period_width, glyph_quadrit_period_height,
+ 0x03, 0x03, };
+#define glyph_quadrit_atsign_width 14
+#define glyph_quadrit_atsign_height 14
+static char glyph_quadrit_atsign_bits[] = { glyph_quadrit_atsign_width, glyph_quadrit_atsign_height,
+ 0xFC, 0x0F, 0xFE, 0x1F, 0x07, 0x38, 0x03, 0x30, 0xE3, 0x33, 0xF3, 0x33,
+ 0x33, 0x33, 0x33, 0x33, 0xF3, 0x3F, 0xE3, 0x1F, 0x03, 0x00, 0x07, 0x00,
+ 0xFE, 0x0F, 0xFC, 0x0F, };
+#define glyph_quadrit_dollar_width 6
+#define glyph_quadrit_dollar_height 14
+static char glyph_quadrit_dollar_bits[] = { glyph_quadrit_dollar_width, glyph_quadrit_dollar_height,
+ 0x0C, 0x0C, 0x3E, 0x3F, 0x03, 0x03, 0x1F, 0x3E, 0x30, 0x30, 0x3F, 0x1F,
+ 0x0C, 0x0C, };
+#define glyph_quadrit_comma_width 2
+#define glyph_quadrit_comma_height 4
+static char glyph_quadrit_comma_bits[] = { glyph_quadrit_comma_width, glyph_quadrit_comma_height,
+ 0x03, 0x03, 0x02, 0x02, };
+#define glyph_quadrit_plus_width 6
+#define glyph_quadrit_plus_height 6
+static char glyph_quadrit_plus_bits[] = { glyph_quadrit_plus_width, glyph_quadrit_plus_height,
+ 0x0C, 0x0C, 0x3F, 0x3F, 0x0C, 0x0C, };
+#define glyph_quadrit_minus_width 6
+#define glyph_quadrit_minus_height 2
+static char glyph_quadrit_minus_bits[] = { glyph_quadrit_minus_width, glyph_quadrit_minus_height,
+ 0x3F, 0x3F, };
+#define glyph_quadrit_semicolon_width 2
+#define glyph_quadrit_semicolon_height 8
+static char glyph_quadrit_semicolon_bits[] = { glyph_quadrit_semicolon_width, glyph_quadrit_semicolon_height,
+ 0x03, 0x03, 0x00, 0x00, 0x03, 0x03, 0x02, 0x02, };
+#define glyph_quadrit_colon_width 2
+#define glyph_quadrit_colon_height 6
+static char glyph_quadrit_colon_bits[] = { glyph_quadrit_colon_width, glyph_quadrit_colon_height,
+ 0x03, 0x03, 0x00, 0x00, 0x03, 0x03, };
+#define glyph_quadrit_amp_width 9
+#define glyph_quadrit_amp_height 10
+static char glyph_quadrit_amp_bits[] = { glyph_quadrit_amp_width, glyph_quadrit_amp_height,
+ 0x3E, 0x00, 0x7F, 0x00, 0x63, 0x00, 0x03, 0x00, 0xEE, 0x00, 0xEE, 0x00,
+ 0x63, 0x00, 0x63, 0x00, 0xFF, 0x01, 0xDE, 0x01, };
+#define glyph_quadrit_bang_width 2
+#define glyph_quadrit_bang_height 10
+static char glyph_quadrit_bang_bits[] = { glyph_quadrit_bang_width, glyph_quadrit_bang_height,
+ 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x00, 0x00, 0x03, 0x03, };
+#define glyph_quadrit_question_width 6
+#define glyph_quadrit_question_height 10
+static char glyph_quadrit_question_bits[] = { glyph_quadrit_question_width, glyph_quadrit_question_height,
+ 0x1F, 0x3F, 0x30, 0x30, 0x3C, 0x1C, 0x00, 0x00, 0x0C, 0x0C, };
+#define glyph_quadrit_lbrace_width 4
+#define glyph_quadrit_lbrace_height 10
+static char glyph_quadrit_lbrace_bits[] = { glyph_quadrit_lbrace_width, glyph_quadrit_lbrace_height,
+ 0x0F, 0x0F, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x0F, 0x0F, };
+#define glyph_quadrit_rbrace_width 4
+#define glyph_quadrit_rbrace_height 10
+static char glyph_quadrit_rbrace_bits[] = { glyph_quadrit_rbrace_width, glyph_quadrit_rbrace_height,
+ 0x0F, 0x0F, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0F, 0x0F, };
+#define glyph_quadrit_percent_width 15
+#define glyph_quadrit_percent_height 10
+static char glyph_quadrit_percent_bits[] = { glyph_quadrit_percent_width, glyph_quadrit_percent_height,
+ 0x0C, 0x00, 0x1E, 0x03, 0xB3, 0x03, 0xB3, 0x01, 0xDE, 0x19, 0xCC, 0x3C,
+ 0xE0, 0x66, 0x60, 0x66, 0x70, 0x3C, 0x30, 0x18, };
+#define glyph_quadrit_lpar_width 4
+#define glyph_quadrit_lpar_height 10
+static char glyph_quadrit_lpar_bits[] = { glyph_quadrit_lpar_width, glyph_quadrit_lpar_height,
+ 0x0E, 0x0E, 0x07, 0x03, 0x03, 0x03, 0x03, 0x07, 0x0E, 0x0E, };
+#define glyph_quadrit_rpar_width 4
+#define glyph_quadrit_rpar_height 10
+static char glyph_quadrit_rpar_bits[] = { glyph_quadrit_rpar_width, glyph_quadrit_rpar_height,
+ 0x07, 0x07, 0x0E, 0x0C, 0x0C, 0x0C, 0x0C, 0x0E, 0x07, 0x07, };
+#define glyph_quadrit_hash_width 5
+#define glyph_quadrit_hash_height 5
+static char glyph_quadrit_hash_bits[] = { glyph_quadrit_hash_width, glyph_quadrit_hash_height,
+ 0x0A, 0x1F, 0x0A, 0x1F, 0x0A, };
+#define glyph_quadrit_A_width 6
+#define glyph_quadrit_A_height 10
+static char glyph_quadrit_A_bits[] = { glyph_quadrit_A_width, glyph_quadrit_A_height,
+ 0x1E, 0x3F, 0x33, 0x33, 0x3F, 0x3F, 0x33, 0x33, 0x33, 0x33, };
+#define glyph_quadrit_B_width 6
+#define glyph_quadrit_B_height 10
+static char glyph_quadrit_B_bits[] = { glyph_quadrit_B_width, glyph_quadrit_B_height,
+ 0x1F, 0x3F, 0x33, 0x33, 0x1F, 0x1F, 0x33, 0x33, 0x3F, 0x1F, };
+#define glyph_quadrit_C_width 6
+#define glyph_quadrit_C_height 10
+static char glyph_quadrit_C_bits[] = { glyph_quadrit_C_width, glyph_quadrit_C_height,
+ 0x3E, 0x3F, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x3F, 0x3E, };
+#define glyph_quadrit_D_width 6
+#define glyph_quadrit_D_height 10
+static char glyph_quadrit_D_bits[] = { glyph_quadrit_D_width, glyph_quadrit_D_height,
+ 0x1F, 0x3F, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x3F, 0x1F, };
+#define glyph_quadrit_E_width 6
+#define glyph_quadrit_E_height 10
+static char glyph_quadrit_E_bits[] = { glyph_quadrit_E_width, glyph_quadrit_E_height,
+ 0x3F, 0x3F, 0x03, 0x03, 0x3F, 0x3F, 0x03, 0x03, 0x3F, 0x3F, };
+#define glyph_quadrit_F_width 6
+#define glyph_quadrit_F_height 10
+static char glyph_quadrit_F_bits[] = { glyph_quadrit_F_width, glyph_quadrit_F_height,
+ 0x3F, 0x3F, 0x03, 0x03, 0x3F, 0x3F, 0x03, 0x03, 0x03, 0x03, };
+#define glyph_quadrit_G_width 6
+#define glyph_quadrit_G_height 10
+static char glyph_quadrit_G_bits[] = { glyph_quadrit_G_width, glyph_quadrit_G_height,
+ 0x3E, 0x3F, 0x03, 0x03, 0x33, 0x33, 0x33, 0x33, 0x3F, 0x1E, };
+#define glyph_quadrit_H_width 6
+#define glyph_quadrit_H_height 10
+static char glyph_quadrit_H_bits[] = { glyph_quadrit_H_width, glyph_quadrit_H_height,
+ 0x33, 0x33, 0x33, 0x33, 0x3F, 0x3F, 0x33, 0x33, 0x33, 0x33, };
+#define glyph_quadrit_I_width 2
+#define glyph_quadrit_I_height 10
+static char glyph_quadrit_I_bits[] = { glyph_quadrit_I_width, glyph_quadrit_I_height,
+ 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, };
+#define glyph_quadrit_J_width 6
+#define glyph_quadrit_J_height 10
+static char glyph_quadrit_J_bits[] = { glyph_quadrit_J_width, glyph_quadrit_J_height,
+ 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x33, 0x33, 0x3F, 0x1E, };
+#define glyph_quadrit_K_width 6
+#define glyph_quadrit_K_height 10
+static char glyph_quadrit_K_bits[] = { glyph_quadrit_K_width, glyph_quadrit_K_height,
+ 0x33, 0x33, 0x3B, 0x1B, 0x0F, 0x0F, 0x1B, 0x3B, 0x33, 0x33, };
+#define glyph_quadrit_L_width 6
+#define glyph_quadrit_L_height 10
+static char glyph_quadrit_L_bits[] = { glyph_quadrit_L_width, glyph_quadrit_L_height,
+ 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x3F, 0x3F, };
+#define glyph_quadrit_M_width 8
+#define glyph_quadrit_M_height 10
+static char glyph_quadrit_M_bits[] = { glyph_quadrit_M_width, glyph_quadrit_M_height,
+ 0xC3, 0xE7, 0xFF, 0xFF, 0xDB, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, };
+#define glyph_quadrit_N_width 6
+#define glyph_quadrit_N_height 10
+static char glyph_quadrit_N_bits[] = { glyph_quadrit_N_width, glyph_quadrit_N_height,
+ 0x33, 0x37, 0x3F, 0x3F, 0x3B, 0x33, 0x33, 0x33, 0x33, 0x33, };
+#define glyph_quadrit_O_width 6
+#define glyph_quadrit_O_height 10
+static char glyph_quadrit_O_bits[] = { glyph_quadrit_O_width, glyph_quadrit_O_height,
+ 0x1E, 0x3F, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x3F, 0x1E, };
+#define glyph_quadrit_P_width 6
+#define glyph_quadrit_P_height 10
+static char glyph_quadrit_P_bits[] = { glyph_quadrit_P_width, glyph_quadrit_P_height,
+ 0x1F, 0x3F, 0x33, 0x33, 0x3F, 0x1F, 0x03, 0x03, 0x03, 0x03, };
+#define glyph_quadrit_Q_width 6
+#define glyph_quadrit_Q_height 13
+static char glyph_quadrit_Q_bits[] = { glyph_quadrit_Q_width, glyph_quadrit_Q_height,
+ 0x1E, 0x3F, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x3F, 0x1E, 0x0C, 0x3C,
+ 0x38, };
+#define glyph_quadrit_R_width 6
+#define glyph_quadrit_R_height 10
+static char glyph_quadrit_R_bits[] = { glyph_quadrit_R_width, glyph_quadrit_R_height,
+ 0x1F, 0x3F, 0x33, 0x33, 0x3F, 0x1F, 0x33, 0x33, 0x33, 0x33, };
+#define glyph_quadrit_S_width 6
+#define glyph_quadrit_S_height 10
+static char glyph_quadrit_S_bits[] = { glyph_quadrit_S_width, glyph_quadrit_S_height,
+ 0x3E, 0x3F, 0x03, 0x03, 0x1F, 0x3E, 0x30, 0x30, 0x3F, 0x1F, };
+#define glyph_quadrit_T_width 6
+#define glyph_quadrit_T_height 10
+static char glyph_quadrit_T_bits[] = { glyph_quadrit_T_width, glyph_quadrit_T_height,
+ 0x3F, 0x3F, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, };
+#define glyph_quadrit_U_width 6
+#define glyph_quadrit_U_height 10
+static char glyph_quadrit_U_bits[] = { glyph_quadrit_U_width, glyph_quadrit_U_height,
+ 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x3F, 0x1E, };
+#define glyph_quadrit_V_width 6
+#define glyph_quadrit_V_height 10
+static char glyph_quadrit_V_bits[] = { glyph_quadrit_V_width, glyph_quadrit_V_height,
+ 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x3B, 0x1F, 0x0F, 0x07, };
+#define glyph_quadrit_W_width 10
+#define glyph_quadrit_W_height 10
+static char glyph_quadrit_W_bits[] = { glyph_quadrit_W_width, glyph_quadrit_W_height,
+ 0x33, 0x03, 0x33, 0x03, 0x33, 0x03, 0x33, 0x03, 0x33, 0x03, 0x33, 0x03,
+ 0xBB, 0x03, 0xFF, 0x01, 0xFF, 0x00, 0x66, 0x00, };
+#define glyph_quadrit_X_width 6
+#define glyph_quadrit_X_height 10
+static char glyph_quadrit_X_bits[] = { glyph_quadrit_X_width, glyph_quadrit_X_height,
+ 0x33, 0x33, 0x33, 0x1E, 0x0C, 0x0C, 0x1E, 0x33, 0x33, 0x33, };
+#define glyph_quadrit_Y_width 6
+#define glyph_quadrit_Y_height 10
+static char glyph_quadrit_Y_bits[] = { glyph_quadrit_Y_width, glyph_quadrit_Y_height,
+ 0x33, 0x33, 0x33, 0x33, 0x3F, 0x1E, 0x0C, 0x0C, 0x0C, 0x0C, };
+#define glyph_quadrit_Z_width 6
+#define glyph_quadrit_Z_height 10
+static char glyph_quadrit_Z_bits[] = { glyph_quadrit_Z_width, glyph_quadrit_Z_height,
+ 0x3F, 0x3F, 0x30, 0x30, 0x1C, 0x0E, 0x03, 0x03, 0x3F, 0x3F, };
+#define glyph_quadrit_0_width 6
+#define glyph_quadrit_0_height 10
+static char glyph_quadrit_0_bits[] = { glyph_quadrit_0_width, glyph_quadrit_0_height,
+ 0x1E, 0x3F, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x3F, 0x1E, };
+#define glyph_quadrit_1_width 4
+#define glyph_quadrit_1_height 10
+static char glyph_quadrit_1_bits[] = { glyph_quadrit_1_width, glyph_quadrit_1_height,
+ 0x0C, 0x0C, 0x0F, 0x0F, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, };
+#define glyph_quadrit_2_width 6
+#define glyph_quadrit_2_height 10
+static char glyph_quadrit_2_bits[] = { glyph_quadrit_2_width, glyph_quadrit_2_height,
+ 0x1F, 0x3F, 0x30, 0x30, 0x3E, 0x1F, 0x03, 0x03, 0x3F, 0x3F, };
+#define glyph_quadrit_3_width 6
+#define glyph_quadrit_3_height 10
+static char glyph_quadrit_3_bits[] = { glyph_quadrit_3_width, glyph_quadrit_3_height,
+ 0x1F, 0x3F, 0x30, 0x30, 0x1F, 0x1F, 0x30, 0x30, 0x3F, 0x1F, };
+#define glyph_quadrit_4_width 6
+#define glyph_quadrit_4_height 10
+static char glyph_quadrit_4_bits[] = { glyph_quadrit_4_width, glyph_quadrit_4_height,
+ 0x33, 0x33, 0x33, 0x33, 0x3F, 0x3E, 0x30, 0x30, 0x30, 0x30, };
+#define glyph_quadrit_5_width 6
+#define glyph_quadrit_5_height 10
+static char glyph_quadrit_5_bits[] = { glyph_quadrit_5_width, glyph_quadrit_5_height,
+ 0x3F, 0x3F, 0x03, 0x03, 0x1F, 0x3F, 0x30, 0x30, 0x3F, 0x1F, };
+#define glyph_quadrit_6_width 6
+#define glyph_quadrit_6_height 10
+static char glyph_quadrit_6_bits[] = { glyph_quadrit_6_width, glyph_quadrit_6_height,
+ 0x3E, 0x3F, 0x03, 0x03, 0x1F, 0x3F, 0x33, 0x33, 0x3F, 0x1E, };
+#define glyph_quadrit_7_width 6
+#define glyph_quadrit_7_height 10
+static char glyph_quadrit_7_bits[] = { glyph_quadrit_7_width, glyph_quadrit_7_height,
+ 0x1F, 0x3F, 0x30, 0x30, 0x18, 0x18, 0x0C, 0x0C, 0x0C, 0x0C, };
+#define glyph_quadrit_8_width 6
+#define glyph_quadrit_8_height 10
+static char glyph_quadrit_8_bits[] = { glyph_quadrit_8_width, glyph_quadrit_8_height,
+ 0x1E, 0x3F, 0x33, 0x33, 0x1E, 0x1E, 0x33, 0x33, 0x3F, 0x1E, };
+#define glyph_quadrit_9_width 6
+#define glyph_quadrit_9_height 10
+static char glyph_quadrit_9_bits[] = { glyph_quadrit_9_width, glyph_quadrit_9_height,
+ 0x1E, 0x3F, 0x33, 0x33, 0x3F, 0x3E, 0x30, 0x30, 0x3F, 0x1F, };
+static char *quadrit_glyphs[] = {
+ ['.'] = glyph_quadrit_period_bits,
+ ['@'] = glyph_quadrit_atsign_bits,
+ ['$'] = glyph_quadrit_dollar_bits,
+ [','] = glyph_quadrit_comma_bits,
+ ['+'] = glyph_quadrit_plus_bits,
+ ['-'] = glyph_quadrit_minus_bits,
+ [';'] = glyph_quadrit_semicolon_bits,
+ [':'] = glyph_quadrit_colon_bits,
+ ['&'] = glyph_quadrit_amp_bits,
+ ['!'] = glyph_quadrit_bang_bits,
+ ['?'] = glyph_quadrit_question_bits,
+ ['['] = glyph_quadrit_lbrace_bits,
+ [']'] = glyph_quadrit_rbrace_bits,
+ ['%'] = glyph_quadrit_percent_bits,
+ ['('] = glyph_quadrit_lpar_bits,
+ [')'] = glyph_quadrit_rpar_bits,
+ ['#'] = glyph_quadrit_hash_bits,
+ ['A'] = glyph_quadrit_A_bits,
+ ['B'] = glyph_quadrit_B_bits,
+ ['C'] = glyph_quadrit_C_bits,
+ ['D'] = glyph_quadrit_D_bits,
+ ['E'] = glyph_quadrit_E_bits,
+ ['F'] = glyph_quadrit_F_bits,
+ ['G'] = glyph_quadrit_G_bits,
+ ['H'] = glyph_quadrit_H_bits,
+ ['I'] = glyph_quadrit_I_bits,
+ ['J'] = glyph_quadrit_J_bits,
+ ['K'] = glyph_quadrit_K_bits,
+ ['L'] = glyph_quadrit_L_bits,
+ ['M'] = glyph_quadrit_M_bits,
+ ['N'] = glyph_quadrit_N_bits,
+ ['O'] = glyph_quadrit_O_bits,
+ ['P'] = glyph_quadrit_P_bits,
+ ['Q'] = glyph_quadrit_Q_bits,
+ ['R'] = glyph_quadrit_R_bits,
+ ['S'] = glyph_quadrit_S_bits,
+ ['T'] = glyph_quadrit_T_bits,
+ ['U'] = glyph_quadrit_U_bits,
+ ['V'] = glyph_quadrit_V_bits,
+ ['W'] = glyph_quadrit_W_bits,
+ ['X'] = glyph_quadrit_X_bits,
+ ['Y'] = glyph_quadrit_Y_bits,
+ ['Z'] = glyph_quadrit_Z_bits,
+ ['0'] = glyph_quadrit_0_bits,
+ ['1'] = glyph_quadrit_1_bits,
+ ['2'] = glyph_quadrit_2_bits,
+ ['3'] = glyph_quadrit_3_bits,
+ ['4'] = glyph_quadrit_4_bits,
+ ['5'] = glyph_quadrit_5_bits,
+ ['6'] = glyph_quadrit_6_bits,
+ ['7'] = glyph_quadrit_7_bits,
+ ['8'] = glyph_quadrit_8_bits,
+ ['9'] = glyph_quadrit_9_bits,
+};
+const font_t font_quadrit = {
+ .height = 10,
+ .spacing = 1,
+ .glyphs = quadrit_glyphs,
+};
diff --git a/fonts/free/renew8.fon b/fonts/free/renew8.fon
new file mode 100644
index 000000000..c161ad90c
--- /dev/null
+++ b/fonts/free/renew8.fon
@@ -0,0 +1,256 @@
+/*
+ * Generated from renew.ttf
+ *
+ * tools/fontgen2 renew 8 "-crop 8x10-4-0 -crop 0x0+0+3" > renew8.fon
+ *
+ * some of the wider letters, M,W,V,X,Y,Z had to be generated using "-crop 9x10-4-0 -crop 0x0+0+3"
+ * and then merged by hand.
+ */
+#include
+#define glyph_renew8_period_width 4
+#define glyph_renew8_period_height 7
+static char glyph_renew8_period_bits[] = { glyph_renew8_period_width, glyph_renew8_period_height,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, };
+#define glyph_renew8_dollar_width 4
+#define glyph_renew8_dollar_height 7
+static char glyph_renew8_dollar_bits[] = { glyph_renew8_dollar_width, glyph_renew8_dollar_height,
+ 0x0F, 0x05, 0x0F, 0x04, 0x0F, 0x04, 0x00, };
+#define glyph_renew8_comma_width 4
+#define glyph_renew8_comma_height 7
+static char glyph_renew8_comma_bits[] = { glyph_renew8_comma_width, glyph_renew8_comma_height,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, };
+#define glyph_renew8_minus_width 4
+#define glyph_renew8_minus_height 7
+static char glyph_renew8_minus_bits[] = { glyph_renew8_minus_width, glyph_renew8_minus_height,
+ 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, };
+#define glyph_renew8_bang_width 4
+#define glyph_renew8_bang_height 7
+static char glyph_renew8_bang_bits[] = { glyph_renew8_bang_width, glyph_renew8_bang_height,
+ 0x01, 0x01, 0x01, 0x01, 0x00, 0x01, 0x00, };
+#define glyph_renew8_question_width 4
+#define glyph_renew8_question_height 7
+static char glyph_renew8_question_bits[] = { glyph_renew8_question_width, glyph_renew8_question_height,
+ 0x07, 0x04, 0x06, 0x02, 0x00, 0x02, 0x00, };
+#define glyph_renew8_lbrace_width 4
+#define glyph_renew8_lbrace_height 7
+static char glyph_renew8_lbrace_bits[] = { glyph_renew8_lbrace_width, glyph_renew8_lbrace_height,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x03, };
+#define glyph_renew8_rbrace_width 4
+#define glyph_renew8_rbrace_height 7
+static char glyph_renew8_rbrace_bits[] = { glyph_renew8_rbrace_width, glyph_renew8_rbrace_height,
+ 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x03, };
+#define glyph_renew8_percent_width 4
+#define glyph_renew8_percent_height 7
+static char glyph_renew8_percent_bits[] = { glyph_renew8_percent_width, glyph_renew8_percent_height,
+ 0x00, 0x07, 0x05, 0x07, 0x00, 0x00, 0x00, };
+#define glyph_renew8_lpar_width 4
+#define glyph_renew8_lpar_height 7
+static char glyph_renew8_lpar_bits[] = { glyph_renew8_lpar_width, glyph_renew8_lpar_height,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, };
+#define glyph_renew8_rpar_width 4
+#define glyph_renew8_rpar_height 7
+static char glyph_renew8_rpar_bits[] = { glyph_renew8_rpar_width, glyph_renew8_rpar_height,
+ 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, };
+#define glyph_renew8_hash_width 4
+#define glyph_renew8_hash_height 7
+static char glyph_renew8_hash_bits[] = { glyph_renew8_hash_width, glyph_renew8_hash_height,
+ 0x0A, 0x0F, 0x0A, 0x0F, 0x0A, 0x00, 0x00, };
+#define glyph_renew8_A_width 4
+#define glyph_renew8_A_height 7
+static char glyph_renew8_A_bits[] = { glyph_renew8_A_width, glyph_renew8_A_height,
+ 0x0F, 0x09, 0x0F, 0x09, 0x09, 0x09, 0x00, };
+#define glyph_renew8_B_width 4
+#define glyph_renew8_B_height 7
+static char glyph_renew8_B_bits[] = { glyph_renew8_B_width, glyph_renew8_B_height,
+ 0x07, 0x09, 0x0F, 0x09, 0x09, 0x0F, 0x00, };
+#define glyph_renew8_C_width 4
+#define glyph_renew8_C_height 7
+static char glyph_renew8_C_bits[] = { glyph_renew8_C_width, glyph_renew8_C_height,
+ 0x0F, 0x01, 0x01, 0x01, 0x01, 0x0F, 0x00, };
+#define glyph_renew8_D_width 4
+#define glyph_renew8_D_height 7
+static char glyph_renew8_D_bits[] = { glyph_renew8_D_width, glyph_renew8_D_height,
+ 0x07, 0x09, 0x09, 0x09, 0x09, 0x0F, 0x00, };
+#define glyph_renew8_E_width 4
+#define glyph_renew8_E_height 7
+static char glyph_renew8_E_bits[] = { glyph_renew8_E_width, glyph_renew8_E_height,
+ 0x0F, 0x01, 0x07, 0x01, 0x01, 0x0F, 0x00, };
+#define glyph_renew8_F_width 4
+#define glyph_renew8_F_height 7
+static char glyph_renew8_F_bits[] = { glyph_renew8_F_width, glyph_renew8_F_height,
+ 0x0F, 0x01, 0x07, 0x01, 0x01, 0x01, 0x00, };
+#define glyph_renew8_G_width 4
+#define glyph_renew8_G_height 7
+static char glyph_renew8_G_bits[] = { glyph_renew8_G_width, glyph_renew8_G_height,
+ 0x0F, 0x01, 0x0D, 0x09, 0x09, 0x0F, 0x00, };
+#define glyph_renew8_H_width 4
+#define glyph_renew8_H_height 7
+static char glyph_renew8_H_bits[] = { glyph_renew8_H_width, glyph_renew8_H_height,
+ 0x09, 0x09, 0x0F, 0x09, 0x09, 0x09, 0x00, };
+#define glyph_renew8_I_width 4
+#define glyph_renew8_I_height 7
+static char glyph_renew8_I_bits[] = { glyph_renew8_I_width, glyph_renew8_I_height,
+ 0x0F, 0x04, 0x04, 0x04, 0x04, 0x0F, 0x00, };
+#define glyph_renew8_J_width 4
+#define glyph_renew8_J_height 7
+static char glyph_renew8_J_bits[] = { glyph_renew8_J_width, glyph_renew8_J_height,
+ 0x0F, 0x04, 0x04, 0x04, 0x04, 0x07, 0x00, };
+#define glyph_renew8_K_width 4
+#define glyph_renew8_K_height 7
+static char glyph_renew8_K_bits[] = { glyph_renew8_K_width, glyph_renew8_K_height,
+ 0x05, 0x05, 0x0F, 0x09, 0x09, 0x09, 0x00, };
+#define glyph_renew8_L_width 4
+#define glyph_renew8_L_height 7
+static char glyph_renew8_L_bits[] = { glyph_renew8_L_width, glyph_renew8_L_height,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x0F, 0x00, };
+#define glyph_renew8_M_width 5
+#define glyph_renew8_M_height 7
+static char glyph_renew8_M_bits[] = { glyph_renew8_M_width, glyph_renew8_M_height,
+ 0x1F, 0x15, 0x11, 0x11, 0x11, 0x11, 0x00, };
+#define glyph_renew8_N_width 4
+#define glyph_renew8_N_height 7
+static char glyph_renew8_N_bits[] = { glyph_renew8_N_width, glyph_renew8_N_height,
+ 0x09, 0x0B, 0x0D, 0x09, 0x09, 0x09, 0x00, };
+#define glyph_renew8_O_width 4
+#define glyph_renew8_O_height 7
+static char glyph_renew8_O_bits[] = { glyph_renew8_O_width, glyph_renew8_O_height,
+ 0x0F, 0x09, 0x09, 0x09, 0x09, 0x0F, 0x00, };
+#define glyph_renew8_P_width 4
+#define glyph_renew8_P_height 7
+static char glyph_renew8_P_bits[] = { glyph_renew8_P_width, glyph_renew8_P_height,
+ 0x0F, 0x09, 0x0F, 0x01, 0x01, 0x01, 0x00, };
+#define glyph_renew8_Q_width 4
+#define glyph_renew8_Q_height 7
+static char glyph_renew8_Q_bits[] = { glyph_renew8_Q_width, glyph_renew8_Q_height,
+ 0x0F, 0x09, 0x09, 0x09, 0x09, 0x0F, 0x04, };
+#define glyph_renew8_R_width 4
+#define glyph_renew8_R_height 7
+static char glyph_renew8_R_bits[] = { glyph_renew8_R_width, glyph_renew8_R_height,
+ 0x0F, 0x09, 0x0F, 0x05, 0x05, 0x05, 0x00, };
+#define glyph_renew8_S_width 4
+#define glyph_renew8_S_height 7
+static char glyph_renew8_S_bits[] = { glyph_renew8_S_width, glyph_renew8_S_height,
+ 0x0F, 0x01, 0x0F, 0x08, 0x08, 0x0F, 0x00, };
+#define glyph_renew8_T_width 4
+#define glyph_renew8_T_height 7
+static char glyph_renew8_T_bits[] = { glyph_renew8_T_width, glyph_renew8_T_height,
+ 0x0F, 0x04, 0x04, 0x04, 0x04, 0x04, 0x00, };
+#define glyph_renew8_U_width 4
+#define glyph_renew8_U_height 7
+static char glyph_renew8_U_bits[] = { glyph_renew8_U_width, glyph_renew8_U_height,
+ 0x09, 0x09, 0x09, 0x09, 0x09, 0x0F, 0x00, };
+#define glyph_renew8_V_width 5
+#define glyph_renew8_V_height 7
+static char glyph_renew8_V_bits[] = { glyph_renew8_V_width, glyph_renew8_V_height,
+ 0x11, 0x11, 0x11, 0x11, 0x0A, 0x04, 0x00, };
+#define glyph_renew8_W_width 5
+#define glyph_renew8_W_height 7
+static char glyph_renew8_W_bits[] = { glyph_renew8_W_width, glyph_renew8_W_height,
+ 0x11, 0x11, 0x11, 0x11, 0x15, 0x1F, 0x00, };
+#define glyph_renew8_X_width 5
+#define glyph_renew8_X_height 7
+static char glyph_renew8_X_bits[] = { glyph_renew8_X_width, glyph_renew8_X_height,
+ 0x11, 0x0A, 0x04, 0x04, 0x0A, 0x11, 0x00, };
+#define glyph_renew8_Y_width 5
+#define glyph_renew8_Y_height 7
+static char glyph_renew8_Y_bits[] = { glyph_renew8_Y_width, glyph_renew8_Y_height,
+ 0x11, 0x11, 0x1F, 0x04, 0x04, 0x04, 0x00, };
+#define glyph_renew8_Z_width 4
+#define glyph_renew8_Z_height 7
+static char glyph_renew8_Z_bits[] = { glyph_renew8_Z_width, glyph_renew8_Z_height,
+ 0x0F, 0x08, 0x04, 0x02, 0x01, 0x0F, 0x00, };
+#define glyph_renew8_0_width 4
+#define glyph_renew8_0_height 7
+static char glyph_renew8_0_bits[] = { glyph_renew8_0_width, glyph_renew8_0_height,
+ 0x00, 0x07, 0x05, 0x05, 0x05, 0x07, 0x00, };
+#define glyph_renew8_1_width 4
+#define glyph_renew8_1_height 7
+static char glyph_renew8_1_bits[] = { glyph_renew8_1_width, glyph_renew8_1_height,
+ 0x00, 0x02, 0x03, 0x02, 0x02, 0x02, 0x00, };
+#define glyph_renew8_2_width 4
+#define glyph_renew8_2_height 7
+static char glyph_renew8_2_bits[] = { glyph_renew8_2_width, glyph_renew8_2_height,
+ 0x00, 0x07, 0x04, 0x02, 0x01, 0x07, 0x00, };
+#define glyph_renew8_3_width 4
+#define glyph_renew8_3_height 7
+static char glyph_renew8_3_bits[] = { glyph_renew8_3_width, glyph_renew8_3_height,
+ 0x00, 0x07, 0x04, 0x06, 0x04, 0x07, 0x00, };
+#define glyph_renew8_4_width 4
+#define glyph_renew8_4_height 7
+static char glyph_renew8_4_bits[] = { glyph_renew8_4_width, glyph_renew8_4_height,
+ 0x00, 0x05, 0x05, 0x07, 0x04, 0x04, 0x00, };
+#define glyph_renew8_5_width 4
+#define glyph_renew8_5_height 7
+static char glyph_renew8_5_bits[] = { glyph_renew8_5_width, glyph_renew8_5_height,
+ 0x00, 0x07, 0x01, 0x07, 0x04, 0x03, 0x00, };
+#define glyph_renew8_6_width 4
+#define glyph_renew8_6_height 7
+static char glyph_renew8_6_bits[] = { glyph_renew8_6_width, glyph_renew8_6_height,
+ 0x00, 0x07, 0x01, 0x07, 0x05, 0x07, 0x00, };
+#define glyph_renew8_7_width 4
+#define glyph_renew8_7_height 7
+static char glyph_renew8_7_bits[] = { glyph_renew8_7_width, glyph_renew8_7_height,
+ 0x00, 0x07, 0x04, 0x04, 0x04, 0x04, 0x00, };
+#define glyph_renew8_8_width 4
+#define glyph_renew8_8_height 7
+static char glyph_renew8_8_bits[] = { glyph_renew8_8_width, glyph_renew8_8_height,
+ 0x00, 0x07, 0x05, 0x07, 0x05, 0x07, 0x00, };
+#define glyph_renew8_9_width 4
+#define glyph_renew8_9_height 7
+static char glyph_renew8_9_bits[] = { glyph_renew8_9_width, glyph_renew8_9_height,
+ 0x00, 0x07, 0x05, 0x07, 0x04, 0x04, 0x00, };
+static char *renew8_glyphs[] = {
+ ['.'] = glyph_renew8_period_bits,
+ ['$'] = glyph_renew8_dollar_bits,
+ [','] = glyph_renew8_comma_bits,
+ ['-'] = glyph_renew8_minus_bits,
+ ['!'] = glyph_renew8_bang_bits,
+ ['?'] = glyph_renew8_question_bits,
+ ['['] = glyph_renew8_lbrace_bits,
+ [']'] = glyph_renew8_rbrace_bits,
+ ['%'] = glyph_renew8_percent_bits,
+ ['('] = glyph_renew8_lpar_bits,
+ [')'] = glyph_renew8_rpar_bits,
+ ['#'] = glyph_renew8_hash_bits,
+ ['A'] = glyph_renew8_A_bits,
+ ['B'] = glyph_renew8_B_bits,
+ ['C'] = glyph_renew8_C_bits,
+ ['D'] = glyph_renew8_D_bits,
+ ['E'] = glyph_renew8_E_bits,
+ ['F'] = glyph_renew8_F_bits,
+ ['G'] = glyph_renew8_G_bits,
+ ['H'] = glyph_renew8_H_bits,
+ ['I'] = glyph_renew8_I_bits,
+ ['J'] = glyph_renew8_J_bits,
+ ['K'] = glyph_renew8_K_bits,
+ ['L'] = glyph_renew8_L_bits,
+ ['M'] = glyph_renew8_M_bits,
+ ['N'] = glyph_renew8_N_bits,
+ ['O'] = glyph_renew8_O_bits,
+ ['P'] = glyph_renew8_P_bits,
+ ['Q'] = glyph_renew8_Q_bits,
+ ['R'] = glyph_renew8_R_bits,
+ ['S'] = glyph_renew8_S_bits,
+ ['T'] = glyph_renew8_T_bits,
+ ['U'] = glyph_renew8_U_bits,
+ ['V'] = glyph_renew8_V_bits,
+ ['W'] = glyph_renew8_W_bits,
+ ['X'] = glyph_renew8_X_bits,
+ ['Y'] = glyph_renew8_Y_bits,
+ ['Z'] = glyph_renew8_Z_bits,
+ ['0'] = glyph_renew8_0_bits,
+ ['1'] = glyph_renew8_1_bits,
+ ['2'] = glyph_renew8_2_bits,
+ ['3'] = glyph_renew8_3_bits,
+ ['4'] = glyph_renew8_4_bits,
+ ['5'] = glyph_renew8_5_bits,
+ ['6'] = glyph_renew8_6_bits,
+ ['7'] = glyph_renew8_7_bits,
+ ['8'] = glyph_renew8_8_bits,
+ ['9'] = glyph_renew8_9_bits,
+};
+const font_t font_renew8 = {
+ .spacing = 1,
+ .height = 8,
+ .glyphs = renew8_glyphs,
+};
diff --git a/fonts/free/supercar9.fon b/fonts/free/supercar9.fon
new file mode 100644
index 000000000..ad92b863a
--- /dev/null
+++ b/fonts/free/supercar9.fon
@@ -0,0 +1,255 @@
+/*
+ * Generated from supercar.ttf
+ *
+ * tools/genfont2 supercar 9 "-crop 0x0-2-1" > supercar9.fon
+ * spacing defined as 0 as the letters in the font join up.
+ */
+
+#include
+#define glyph_supercar9_period_width 2
+#define glyph_supercar9_period_height 9
+static char glyph_supercar9_period_bits[] = { glyph_supercar9_period_width, glyph_supercar9_period_height,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, };
+#define glyph_supercar9_dollar_width 6
+#define glyph_supercar9_dollar_height 9
+static char glyph_supercar9_dollar_bits[] = { glyph_supercar9_dollar_width, glyph_supercar9_dollar_height,
+ 0x00, 0x00, 0x1F, 0x10, 0x1C, 0x00, 0x04, 0x00, 0x00, };
+#define glyph_supercar9_comma_width 2
+#define glyph_supercar9_comma_height 9
+static char glyph_supercar9_comma_bits[] = { glyph_supercar9_comma_width, glyph_supercar9_comma_height,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, };
+#define glyph_supercar9_minus_width 6
+#define glyph_supercar9_minus_height 9
+static char glyph_supercar9_minus_bits[] = { glyph_supercar9_minus_width, glyph_supercar9_minus_height,
+ 0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x00, };
+#define glyph_supercar9_bang_width 2
+#define glyph_supercar9_bang_height 9
+static char glyph_supercar9_bang_bits[] = { glyph_supercar9_bang_width, glyph_supercar9_bang_height,
+ 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, };
+#define glyph_supercar9_question_width 6
+#define glyph_supercar9_question_height 9
+static char glyph_supercar9_question_bits[] = { glyph_supercar9_question_width, glyph_supercar9_question_height,
+ 0x00, 0x00, 0x1F, 0x10, 0x1C, 0x00, 0x04, 0x00, 0x00, };
+#define glyph_supercar9_lbrace_width 3
+#define glyph_supercar9_lbrace_height 9
+static char glyph_supercar9_lbrace_bits[] = { glyph_supercar9_lbrace_width, glyph_supercar9_lbrace_height,
+ 0x00, 0x03, 0x01, 0x01, 0x01, 0x01, 0x01, 0x03, 0x00, };
+#define glyph_supercar9_rbrace_width 3
+#define glyph_supercar9_rbrace_height 9
+static char glyph_supercar9_rbrace_bits[] = { glyph_supercar9_rbrace_width, glyph_supercar9_rbrace_height,
+ 0x00, 0x03, 0x02, 0x02, 0x02, 0x02, 0x02, 0x03, 0x00, };
+#define glyph_supercar9_percent_width 6
+#define glyph_supercar9_percent_height 9
+static char glyph_supercar9_percent_bits[] = { glyph_supercar9_percent_width, glyph_supercar9_percent_height,
+ 0x00, 0x00, 0x11, 0x09, 0x04, 0x12, 0x11, 0x00, 0x00, };
+#define glyph_supercar9_lpar_width 3
+#define glyph_supercar9_lpar_height 9
+static char glyph_supercar9_lpar_bits[] = { glyph_supercar9_lpar_width, glyph_supercar9_lpar_height,
+ 0x00, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x00, };
+#define glyph_supercar9_rpar_width 3
+#define glyph_supercar9_rpar_height 9
+static char glyph_supercar9_rpar_bits[] = { glyph_supercar9_rpar_width, glyph_supercar9_rpar_height,
+ 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x00, };
+#define glyph_supercar9_hash_width 6
+#define glyph_supercar9_hash_height 9
+static char glyph_supercar9_hash_bits[] = { glyph_supercar9_hash_width, glyph_supercar9_hash_height,
+ 0x00, 0x00, 0x1F, 0x10, 0x1C, 0x00, 0x04, 0x00, 0x00, };
+#define glyph_supercar9_A_width 7
+#define glyph_supercar9_A_height 9
+static char glyph_supercar9_A_bits[] = { glyph_supercar9_A_width, glyph_supercar9_A_height,
+ 0x00, 0x00, 0x1F, 0x10, 0x1F, 0x11, 0x7F, 0x00, 0x00, };
+#define glyph_supercar9_B_width 7
+#define glyph_supercar9_B_height 9
+static char glyph_supercar9_B_bits[] = { glyph_supercar9_B_width, glyph_supercar9_B_height,
+ 0x01, 0x01, 0x1F, 0x11, 0x11, 0x11, 0x7F, 0x00, 0x00, };
+#define glyph_supercar9_C_width 7
+#define glyph_supercar9_C_height 9
+static char glyph_supercar9_C_bits[] = { glyph_supercar9_C_width, glyph_supercar9_C_height,
+ 0x00, 0x00, 0x1F, 0x01, 0x01, 0x01, 0x7F, 0x00, 0x00, };
+#define glyph_supercar9_D_width 7
+#define glyph_supercar9_D_height 9
+static char glyph_supercar9_D_bits[] = { glyph_supercar9_D_width, glyph_supercar9_D_height,
+ 0x10, 0x10, 0x1F, 0x11, 0x11, 0x11, 0x7F, 0x00, 0x00, };
+#define glyph_supercar9_E_width 7
+#define glyph_supercar9_E_height 9
+static char glyph_supercar9_E_bits[] = { glyph_supercar9_E_width, glyph_supercar9_E_height,
+ 0x00, 0x00, 0x1F, 0x11, 0x1F, 0x01, 0x7F, 0x00, 0x00, };
+#define glyph_supercar9_F_width 7
+#define glyph_supercar9_F_height 9
+static char glyph_supercar9_F_bits[] = { glyph_supercar9_F_width, glyph_supercar9_F_height,
+ 0x00, 0x00, 0x7F, 0x01, 0x0F, 0x01, 0x01, 0x01, 0x01, };
+#define glyph_supercar9_G_width 7
+#define glyph_supercar9_G_height 9
+static char glyph_supercar9_G_bits[] = { glyph_supercar9_G_width, glyph_supercar9_G_height,
+ 0x00, 0x00, 0x1F, 0x11, 0x11, 0x11, 0x7F, 0x10, 0x1F, };
+#define glyph_supercar9_H_width 7
+#define glyph_supercar9_H_height 9
+static char glyph_supercar9_H_bits[] = { glyph_supercar9_H_width, glyph_supercar9_H_height,
+ 0x01, 0x01, 0x1F, 0x11, 0x11, 0x11, 0x71, 0x00, 0x00, };
+#define glyph_supercar9_I_width 3
+#define glyph_supercar9_I_height 9
+static char glyph_supercar9_I_bits[] = { glyph_supercar9_I_width, glyph_supercar9_I_height,
+ 0x01, 0x00, 0x01, 0x01, 0x01, 0x01, 0x03, 0x00, 0x00, };
+#define glyph_supercar9_J_width 4
+#define glyph_supercar9_J_height 9
+static char glyph_supercar9_J_bits[] = { glyph_supercar9_J_width, glyph_supercar9_J_height,
+ 0x02, 0x00, 0x02, 0x02, 0x02, 0x02, 0x0E, 0x02, 0x03, };
+#define glyph_supercar9_K_width 7
+#define glyph_supercar9_K_height 9
+static char glyph_supercar9_K_bits[] = { glyph_supercar9_K_width, glyph_supercar9_K_height,
+ 0x01, 0x01, 0x11, 0x09, 0x07, 0x09, 0x31, 0x00, 0x00, };
+#define glyph_supercar9_L_width 4
+#define glyph_supercar9_L_height 9
+static char glyph_supercar9_L_bits[] = { glyph_supercar9_L_width, glyph_supercar9_L_height,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x0F, 0x00, 0x00, };
+#define glyph_supercar9_M_width 7
+#define glyph_supercar9_M_height 9
+static char glyph_supercar9_M_bits[] = { glyph_supercar9_M_width, glyph_supercar9_M_height,
+ 0x00, 0x00, 0x1F, 0x15, 0x15, 0x15, 0x75, 0x00, 0x00, };
+#define glyph_supercar9_N_width 7
+#define glyph_supercar9_N_height 9
+static char glyph_supercar9_N_bits[] = { glyph_supercar9_N_width, glyph_supercar9_N_height,
+ 0x00, 0x00, 0x1F, 0x11, 0x11, 0x11, 0x71, 0x00, 0x00, };
+#define glyph_supercar9_O_width 7
+#define glyph_supercar9_O_height 9
+static char glyph_supercar9_O_bits[] = { glyph_supercar9_O_width, glyph_supercar9_O_height,
+ 0x00, 0x00, 0x1F, 0x11, 0x11, 0x11, 0x7F, 0x00, 0x00, };
+#define glyph_supercar9_P_width 7
+#define glyph_supercar9_P_height 9
+static char glyph_supercar9_P_bits[] = { glyph_supercar9_P_width, glyph_supercar9_P_height,
+ 0x00, 0x00, 0x1F, 0x11, 0x11, 0x11, 0x7F, 0x01, 0x01, };
+#define glyph_supercar9_Q_width 7
+#define glyph_supercar9_Q_height 9
+static char glyph_supercar9_Q_bits[] = { glyph_supercar9_Q_width, glyph_supercar9_Q_height,
+ 0x00, 0x00, 0x1F, 0x11, 0x11, 0x11, 0x7F, 0x10, 0x10, };
+#define glyph_supercar9_R_width 7
+#define glyph_supercar9_R_height 9
+static char glyph_supercar9_R_bits[] = { glyph_supercar9_R_width, glyph_supercar9_R_height,
+ 0x00, 0x00, 0x7F, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, };
+#define glyph_supercar9_S_width 7
+#define glyph_supercar9_S_height 9
+static char glyph_supercar9_S_bits[] = { glyph_supercar9_S_width, glyph_supercar9_S_height,
+ 0x00, 0x00, 0x7F, 0x01, 0x1F, 0x10, 0x1F, 0x00, 0x00, };
+#define glyph_supercar9_T_width 7
+#define glyph_supercar9_T_height 9
+static char glyph_supercar9_T_bits[] = { glyph_supercar9_T_width, glyph_supercar9_T_height,
+ 0x01, 0x01, 0x07, 0x01, 0x01, 0x01, 0x7F, 0x00, 0x00, };
+#define glyph_supercar9_U_width 7
+#define glyph_supercar9_U_height 9
+static char glyph_supercar9_U_bits[] = { glyph_supercar9_U_width, glyph_supercar9_U_height,
+ 0x00, 0x00, 0x11, 0x11, 0x11, 0x11, 0x7F, 0x00, 0x00, };
+#define glyph_supercar9_V_width 7
+#define glyph_supercar9_V_height 9
+static char glyph_supercar9_V_bits[] = { glyph_supercar9_V_width, glyph_supercar9_V_height,
+ 0x00, 0x00, 0x71, 0x11, 0x11, 0x0A, 0x04, 0x00, 0x00, };
+#define glyph_supercar9_W_width 7
+#define glyph_supercar9_W_height 9
+static char glyph_supercar9_W_bits[] = { glyph_supercar9_W_width, glyph_supercar9_W_height,
+ 0x00, 0x00, 0x11, 0x15, 0x15, 0x15, 0x7F, 0x00, 0x00, };
+#define glyph_supercar9_X_width 7
+#define glyph_supercar9_X_height 9
+static char glyph_supercar9_X_bits[] = { glyph_supercar9_X_width, glyph_supercar9_X_height,
+ 0x00, 0x00, 0x71, 0x0A, 0x04, 0x0A, 0x11, 0x00, 0x00, };
+#define glyph_supercar9_Y_width 7
+#define glyph_supercar9_Y_height 9
+static char glyph_supercar9_Y_bits[] = { glyph_supercar9_Y_width, glyph_supercar9_Y_height,
+ 0x00, 0x00, 0x11, 0x11, 0x11, 0x11, 0x7F, 0x10, 0x1F, };
+#define glyph_supercar9_Z_width 7
+#define glyph_supercar9_Z_height 9
+static char glyph_supercar9_Z_bits[] = { glyph_supercar9_Z_width, glyph_supercar9_Z_height,
+ 0x00, 0x00, 0x1F, 0x08, 0x04, 0x02, 0x7F, 0x00, 0x00, };
+#define glyph_supercar9_0_width 7
+#define glyph_supercar9_0_height 9
+static char glyph_supercar9_0_bits[] = { glyph_supercar9_0_width, glyph_supercar9_0_height,
+ 0x00, 0x00, 0x1F, 0x11, 0x11, 0x11, 0x7F, 0x00, 0x00, };
+#define glyph_supercar9_1_width 4
+#define glyph_supercar9_1_height 9
+static char glyph_supercar9_1_bits[] = { glyph_supercar9_1_width, glyph_supercar9_1_height,
+ 0x00, 0x00, 0x03, 0x02, 0x02, 0x02, 0x0F, 0x00, 0x00, };
+#define glyph_supercar9_2_width 7
+#define glyph_supercar9_2_height 9
+static char glyph_supercar9_2_bits[] = { glyph_supercar9_2_width, glyph_supercar9_2_height,
+ 0x00, 0x00, 0x1F, 0x10, 0x1F, 0x01, 0x7F, 0x00, 0x00, };
+#define glyph_supercar9_3_width 7
+#define glyph_supercar9_3_height 9
+static char glyph_supercar9_3_bits[] = { glyph_supercar9_3_width, glyph_supercar9_3_height,
+ 0x00, 0x00, 0x1F, 0x10, 0x1E, 0x10, 0x7F, 0x00, 0x00, };
+#define glyph_supercar9_4_width 7
+#define glyph_supercar9_4_height 9
+static char glyph_supercar9_4_bits[] = { glyph_supercar9_4_width, glyph_supercar9_4_height,
+ 0x00, 0x00, 0x11, 0x11, 0x1F, 0x10, 0x70, 0x00, 0x00, };
+#define glyph_supercar9_5_width 7
+#define glyph_supercar9_5_height 9
+static char glyph_supercar9_5_bits[] = { glyph_supercar9_5_width, glyph_supercar9_5_height,
+ 0x00, 0x00, 0x1F, 0x01, 0x1F, 0x10, 0x7F, 0x00, 0x00, };
+#define glyph_supercar9_6_width 7
+#define glyph_supercar9_6_height 9
+static char glyph_supercar9_6_bits[] = { glyph_supercar9_6_width, glyph_supercar9_6_height,
+ 0x00, 0x00, 0x1F, 0x01, 0x1F, 0x11, 0x7F, 0x00, 0x00, };
+#define glyph_supercar9_7_width 7
+#define glyph_supercar9_7_height 9
+static char glyph_supercar9_7_bits[] = { glyph_supercar9_7_width, glyph_supercar9_7_height,
+ 0x00, 0x00, 0x1F, 0x10, 0x10, 0x10, 0x70, 0x00, 0x00, };
+#define glyph_supercar9_8_width 7
+#define glyph_supercar9_8_height 9
+static char glyph_supercar9_8_bits[] = { glyph_supercar9_8_width, glyph_supercar9_8_height,
+ 0x00, 0x00, 0x1F, 0x11, 0x1F, 0x11, 0x7F, 0x00, 0x00, };
+#define glyph_supercar9_9_width 7
+#define glyph_supercar9_9_height 9
+static char glyph_supercar9_9_bits[] = { glyph_supercar9_9_width, glyph_supercar9_9_height,
+ 0x00, 0x00, 0x1F, 0x11, 0x1F, 0x10, 0x7F, 0x00, 0x00, };
+static char *supercar9_glyphs[] = {
+ ['.'] = glyph_supercar9_period_bits,
+ ['$'] = glyph_supercar9_dollar_bits,
+ [','] = glyph_supercar9_comma_bits,
+ ['-'] = glyph_supercar9_minus_bits,
+ ['!'] = glyph_supercar9_bang_bits,
+ ['?'] = glyph_supercar9_question_bits,
+ ['['] = glyph_supercar9_lbrace_bits,
+ [']'] = glyph_supercar9_rbrace_bits,
+ ['%'] = glyph_supercar9_percent_bits,
+ ['('] = glyph_supercar9_lpar_bits,
+ [')'] = glyph_supercar9_rpar_bits,
+ ['#'] = glyph_supercar9_hash_bits,
+ ['A'] = glyph_supercar9_A_bits,
+ ['B'] = glyph_supercar9_B_bits,
+ ['C'] = glyph_supercar9_C_bits,
+ ['D'] = glyph_supercar9_D_bits,
+ ['E'] = glyph_supercar9_E_bits,
+ ['F'] = glyph_supercar9_F_bits,
+ ['G'] = glyph_supercar9_G_bits,
+ ['H'] = glyph_supercar9_H_bits,
+ ['I'] = glyph_supercar9_I_bits,
+ ['J'] = glyph_supercar9_J_bits,
+ ['K'] = glyph_supercar9_K_bits,
+ ['L'] = glyph_supercar9_L_bits,
+ ['M'] = glyph_supercar9_M_bits,
+ ['N'] = glyph_supercar9_N_bits,
+ ['O'] = glyph_supercar9_O_bits,
+ ['P'] = glyph_supercar9_P_bits,
+ ['Q'] = glyph_supercar9_Q_bits,
+ ['R'] = glyph_supercar9_R_bits,
+ ['S'] = glyph_supercar9_S_bits,
+ ['T'] = glyph_supercar9_T_bits,
+ ['U'] = glyph_supercar9_U_bits,
+ ['V'] = glyph_supercar9_V_bits,
+ ['W'] = glyph_supercar9_W_bits,
+ ['X'] = glyph_supercar9_X_bits,
+ ['Y'] = glyph_supercar9_Y_bits,
+ ['Z'] = glyph_supercar9_Z_bits,
+ ['0'] = glyph_supercar9_0_bits,
+ ['1'] = glyph_supercar9_1_bits,
+ ['2'] = glyph_supercar9_2_bits,
+ ['3'] = glyph_supercar9_3_bits,
+ ['4'] = glyph_supercar9_4_bits,
+ ['5'] = glyph_supercar9_5_bits,
+ ['6'] = glyph_supercar9_6_bits,
+ ['7'] = glyph_supercar9_7_bits,
+ ['8'] = glyph_supercar9_8_bits,
+ ['9'] = glyph_supercar9_9_bits,
+};
+const font_t font_supercar9 = {
+ .spacing = 0,
+ .height = 9,
+ .glyphs = supercar9_glyphs,
+};
diff --git a/fonts/symbol.c b/fonts/symbol.c
new file mode 100644
index 000000000..b2fd5573e
--- /dev/null
+++ b/fonts/symbol.c
@@ -0,0 +1,61 @@
+/*
+ * Copyright 2006 by Brian Dominy
+ *
+ * This file is part of FreeWPC.
+ *
+ * FreeWPC is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * FreeWPC is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with FreeWPC; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+/**
+ * \file
+ * \brief A collection of random, small bitmap images.
+ * These are collected together into a single 'font'; writing in this font
+ * then produces sequences of the symbols on the display.
+ */
+
+#include
+
+/* For each bitmap image, declare a character array with the width, height,
+and data. Bits appear in row-major order. */
+
+char bitmap_common_box3[] = { 3, 3, 0x7, 0x5, 0x7 };
+static char bitmap_common_x3[] = { 3, 3, 0x5, 0x2, 0x5 };
+static char bitmap_common_plus3[] = { 3, 3, 0x2, 0x7, 0x2 };
+
+static char bitmap_common_box5[] = { 5, 5, 0x1f, 0x11, 0x11, 0x11, 0x1f };
+static char bitmap_common_x5[] = { 5, 5, 0x1f, 0x1b, 0x15, 0x1b, 0x1f };
+
+static char bitmap_common_left_arrow5[] = { 3, 5, 0x4, 0x6, 0x7, 0x6, 0x4 };
+static char bitmap_common_right_arrow5[] = { 3, 5, 0x1, 0x3, 0x7, 0x3, 0x1 };
+
+/* A table of all bitmaps grouped together in this 'font'. The index
+is used to retrieve the bitmap later. */
+static char *font_symbol_glyphs[] = {
+ [BM_BOX3] = bitmap_common_box3,
+ [BM_X3] = bitmap_common_x3,
+ [BM_PLUS3] = bitmap_common_plus3,
+ [BM_BOX5] = bitmap_common_box5,
+ [BM_X5] = bitmap_common_x5,
+ [BM_LEFT_ARROW5] = bitmap_common_left_arrow5,
+ [BM_RIGHT_ARROW5] = bitmap_common_right_arrow5,
+};
+
+/* The font descriptor */
+const font_t font_symbol = {
+ .spacing = 0,
+ .height = 0,
+ .glyphs = font_symbol_glyphs,
+};
+
diff --git a/images/backgrounds.c b/images/backgrounds.c
deleted file mode 100644
index f493c9f4a..000000000
--- a/images/backgrounds.c
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * Copyright 2006 by Brian Dominy
- *
- * This file is part of FreeWPC.
- *
- * FreeWPC is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * FreeWPC is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with FreeWPC; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "pgmlib.h"
-
-/**
- * \file
- * \brief Generates background DMD frames.
- * This file is compiled and executed on the build machine. When run,
- * it produces .xbm files that are suitable to be compiled into the
- * target image.
- */
-
-void
-gen_multisquare_background (void)
-{
- PGM *main, *box;
-
- main = pgm_alloc ();
- pgm_set_four_color (main);
-
- box = pgm_alloc ();
- pgm_set_four_color (box);
- pgm_resize (box, 32, 16);
-
- pgm_fill (box, PGM_DARK (box));
- pgm_paste (main, box, 5, 5);
-
- pgm_fill (box, PGM_BRIGHT (box));
- pgm_paste (main, box, 80, 11);
-
- pgm_fill (box, PGM_DARK (box));
- pgm_paste (main, box, 64, 8);
-
- pgm_fill (box, PGM_BRIGHT (box));
- pgm_paste (main, box, 12, 14);
-
- pgm_write_xbmset (main, "images/msqback.xbm", "msqback");
-
- pgm_free (box);
- pgm_free (main);
-}
-
-
-void
-gen_dithered_dark_background (void)
-{
- PGM *pgm;
- unsigned int x, y, count;
-
- pgm = pgm_alloc ();
- pgm_set_four_color (pgm);
-
- for (y = 0; y < 32; y += 4)
- for (x = 0 + (y % 16) / 4; x < 128; x += 4)
- if ((y % 8) == 0)
- pgm_draw_pixel (pgm, x, y, PGM_DARK(pgm));
- else
- pgm_draw_pixel (pgm, x, y, PGM_BRIGHT(pgm));
-
- pgm_write_xbmset (pgm, "images/ditdark.xbm", "ditdark");
- pgm_free (pgm);
-}
-
-
-void
-gen_tile_background (void)
-{
- PGM *pgm;
- unsigned int x, y;
-
- pgm = pgm_alloc ();
- pgm_set_four_color (pgm);
-
- for (y = 0; y < 32; y ++)
- for (x = 0; x < 128; x ++)
- pgm_draw_pixel (pgm, x, y, ((x / 8) + (y / 8)) % 3);
-
- pgm_write_xbmset (pgm, "images/tileback.xbm", "tileback");
- pgm_free (pgm);
-}
-
diff --git a/images/borders.c b/images/borders.c
deleted file mode 100644
index c95d64553..000000000
--- a/images/borders.c
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright 2006 by Brian Dominy
- *
- * This file is part of FreeWPC.
- *
- * FreeWPC is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * FreeWPC is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with FreeWPC; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "pgmlib.h"
-
-/**
- * \file
- * \brief Generates some generic frame borders.
- *
- */
-
-
-/* Generate the multi-color border */
-void
-gen_mborder (void)
-{
- PGM *pgm;
- XBMSET *xbmset;
- FILE *fp;
-
- pgm = pgm_alloc ();
- pgm_set_plane_count (pgm, 2);
- pgm_draw_border (pgm, 3, PGM_DARK(pgm));
- pgm_draw_border (pgm, 2, PGM_BRIGHT(pgm));
- pgm_draw_border (pgm, 1, PGM_WHITE(pgm));
- pgm_write (pgm, "images/mborder.pgm");
- pgm_write_xbmset (pgm, "images/mborder.xbm", "mborder");
- pgm_free (pgm);
-}
-
-
-void
-gen_ball_border (void)
-{
- PGM *pgm[3];
- int i, x, y;
- PGM *main;
- int next_ball = 0;
-
-#define next ({ next_ball = (next_ball+1) % 3; pgm[next_ball]; })
-
- for (i=0; i < 3; i++)
- {
- unsigned int color = i+1;
- pgm[i] = pgm_alloc ();
- pgm_set_plane_count (pgm[i], 2);
- pgm_resize (pgm[i], 4, 4);
- pgm_draw_pixel (pgm[i], 1, 0, color);
- pgm_draw_pixel (pgm[i], 0, 1, color);
- pgm_draw_pixel (pgm[i], 1, 1, color);
- pgm_draw_pixel (pgm[i], 2, 1, color);
- pgm_draw_pixel (pgm[i], 1, 2, color);
- }
-
- main = pgm_alloc ();
- pgm_set_plane_count (main, 2);
-
- for (x=0; x < 128; x += 8)
- pgm_paste (main, next, x, 0);
- for (x=128-4; x >= 0; x -= 8)
- pgm_paste (main, next, x, 31-4);
-
- pgm_write (main, "images/ballborder.pgm");
- pgm_write_xbmset (main, "images/ballborder.xbm", "ballborder");
- pgm_free (main);
-}
-
diff --git a/images/sysgen.c b/images/sysgen.c
deleted file mode 100644
index 950251022..000000000
--- a/images/sysgen.c
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright 2006 by Brian Dominy
- *
- * This file is part of FreeWPC.
- *
- * FreeWPC is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * FreeWPC is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with FreeWPC; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#define TRUE 1
-#define FALSE 0
-#include "pgmlib.h"
-
-void
-pgm_to_xbmset (const char *name, int invert_flag)
-{
- char infilename[64];
- char outfilename[64];
-
- sprintf (infilename, "images/%s.pgm", name);
- sprintf (outfilename, "images/%s.xbm", name);
-
- PGM *pgm = pgm_read (infilename);
- pgm_change_maxval (pgm, 3);
-
- if (invert_flag)
- pgm_invert (pgm);
-
- pgm_write_xbmset (pgm, outfilename, name);
-}
-
-
-/* machgen is the real main function for the xbm generator.
- * The actual main() is in the library in pgmlib.c, which
- * then calls this function after the library has been
- * initialized.
- *
- * Each gen_xxx() function here creates an XBMSET file with
- * .xbm extension, that is capable of being displayed by the
- * FreeWPC runtime DMD module.
- */
-void
-machgen (void)
-{
- pgm_to_xbmset ("hitcher", TRUE);
- pgm_to_xbmset ("coinstack", FALSE);
- pgm_to_xbmset ("oldcar", FALSE);
- pgm_to_xbmset ("pyramid", TRUE);
- pgm_to_xbmset ("robot", TRUE);
- pgm_to_xbmset ("brianhead", TRUE);
-
- //gen_mborder ();
- gen_multisquare_background ();
- gen_dithered_dark_background ();
- gen_tile_background ();
- gen_ball_border ();
-}
-
diff --git a/include/afm/sound.h b/include/afm/sound.h
deleted file mode 100644
index 81bd2f04b..000000000
--- a/include/afm/sound.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Copyright 2006 by Brian Dominy
- *
- * This file is part of FreeWPC.
- *
- * FreeWPC is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * FreeWPC is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with FreeWPC; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef _MACH_SOUND_H
-#define _MACH_SOUND_H
-
-#endif /* _MACH_SOUND_H */
diff --git a/include/audit.h b/include/audit.h
index 709cf91f2..5f9c0f72f 100644
--- a/include/audit.h
+++ b/include/audit.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2006, 2007, 2008, 2009 by Brian Dominy
+ * Copyright 2006-2012 by Brian Dominy
*
* This file is part of FreeWPC.
*
@@ -27,12 +27,6 @@
*/
typedef U16 audit_t;
-/**
- * Some audits need more than 16-bits. These are called
- * long audits and are stored as 3-byte binary-coded decimal.
- */
-typedef U8 long_audit_t[3];
-
/*
* A timestamp audit. The 16-bit variable is not large enough to
@@ -128,7 +122,7 @@ typedef struct
struct date coins_cleared; /* done */
struct date factory_reset; /* done */
struct date last_game_start; /* done */
- struct date last_replay;
+ struct date last_replay; /* done */
struct date last_hstd_reset;
struct date champion_reset;
struct date last_printout; /* done */
diff --git a/include/bop/protos.h b/include/bop/protos.h
deleted file mode 100644
index 958977535..000000000
--- a/include/bop/protos.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * Copyright 2006-2010 by Brian Dominy
- *
- * This file is part of FreeWPC.
- *
- * FreeWPC is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * FreeWPC is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with FreeWPC; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
diff --git a/include/bop/sound.h b/include/bop/sound.h
deleted file mode 100644
index 857faef90..000000000
--- a/include/bop/sound.h
+++ /dev/null
@@ -1,119 +0,0 @@
-#define MUS_MAIN1_PLUNGER 0x01
-#define MUS_MAIN1_1 0x02
-#define MUS_MAIN1_2 0x03
-#define MUS_MAIN2_1 0x04
-#define MUS_MAIN2_2 0x05
-#define MUS_MAIN3_1 0x06
-#define MUS_MAIN3_2 0x07
-#define MUS_MAIN1_3 0x08
-#define MUS_MAIN1_4 0x09
-
-#define MUS_QUIET_SPACE 0x0A
-#define MUS_FACE_4 0x0B
-#define MUS_FANFARE 0x0C
-#define MUS_FANFARE2 0x0D
-#define MUS_SECRET_FANFARE 0x30
-#define MUS_MPF_ENTER 0x80
-#define SND_POWER_UP1_1 0x81
-#define SND_POWER_UP1_2 0x82
-#define SND_POWER_UP1_3 0x83
-#define SND_POWER_UP2 0x84
-#define SND_POWER_UP3_1 0x85
-#define SND_POWER_UP3_2 0x86
-#define SND_POWER_UP3_3 0x87
-#define SND_POWER_UP4_1 0x89
-#define SND_POWER_UP4_2 0x8A
-#define SND_POWER_UP4_3 0x8B
-#define SND_POWER_UP5_1 0x8C
-#define SND_POWER_UP5_2 0x8D
-#define SND_POWER_UP5_3 0x8E
-#define SND_POWER_UP6_1 0x98
-#define SND_POWER_UP6_2 0x9A
-#define SND_POWER_UP6_3 0x9B
-
-#define SND_COIN 0xC0
-#define SND_FLATLINE 0xCF
-#define SND_SKILL_SHOT_LAUNCH 0xB7
-#define SND_SKILL_SHOT_1 0xB8
-#define SND_SKILL_SHOT_2 0xB9
-#define SND_SKILL_SHOT_3 0xBA
-#define SND_SKILL_SHOT_4 0xBB
-#define SND_SKILL_SHOT_5 0xBC
-#define SND_TILT_WARNING 0xBD
-#define SND_TILT 0xBE
-#define SND_SHUTTLE_LAUNCH 0x93
-#define SND_BLOOO 0x9A
-#define SND_BALL_DRAIN 0x9F
-#define SND_MPF_EXIT 0xA0
-#define SND_JACKPOT 0xAA
-
-#define SND_CENTRE_RAMP_1 0xA1
-#define SND_CENTRE_RAMP_2 0xA2
-#define SND_CENTRE_RAMP_3 0xA3
-#define SND_SPINNER1 0xC3
-#define SND_SPINNER2 0xC4
-#define SND_SPINNER3 0xC5
-#define SND_SPINNER4 0xC6
-#define MUS_GAME_OVER 0xEC
-#define SND_CENTRE_RAMP_ENTER 0xED
-#define SND_CENTRE_RAMP_FAIL 0xEE
-
-#define SND_GET_EXTRA_BALL 0x100
-#define SND_WOW 0x101
-#define SND_YES1 0x102
-#define SND_NO_CREDIT 0x104
-#define SND_WE_NEED_SHUTTLE_LAUNCH 0x106
-#define SND_HI_THERE 0x107
-#define SND_LAUGHTER1 0x108
-#define SND_PLAY_ME 0x109
-#define SND_MOO 0x10A
-#define SND_ENGAGE_VOCAL_CIRCUITS 0x10B
-#define SND_ROBOT_OH_NO 0x10C
-#define SND_ENGAGE_OPTICAL_CIRUITS 0x10D
-#define SND_PARTIAL_OPTICAL_LINK 0x10E
-#define SND_COMPLETE_OPTICAL_LINK 0x10F
-#define SND_YES2 0x110
-#define SND_ROBOT_HOW_DO_I_LOOK 0x111
-#define SND_ROBOT_DOES_NOT_COMPUTE 0x112
-#define SND_ROBOT_DONT_WORRY 0x113
-#define SND_GET_JACKPOT 0x114
-#define SND_LAUNCH_SHUTTLE 0x115
-#define SND_YAHOO 0x116
-#define SND_WHATS_HAPPENING 0x117
-#define SND_STANDBY 0x118
-#define SND_THUD1 0x119
-#define SND_THUD2 0x11A
-#define SND_THUD3 0x11B
-#define SND_THUD4 0x11C
-#define SND_WELCOME_TO_BILLIONAIRES_CLUB 0x11D
-#define SND_YOU_LOOK_GOOD 0x11F
-#define SND_THANK_YOU 0x120
-#define SND_LAUGHTER2 0x121
-#define SND_LAUGHTER3 0x122
-#define SND_HEY 0x123
-#define SND_HMM1 0x124
-#define SND_LAUGHTER4 0x125
-#define SND_HMM2 0x126
-#define SND_I_CAN_SPEAK 0x127
-#define SND_MY_GOD_SHES_ALIVE 0x128
-#define SND_NOW_I_SEE_YOU 0x129
-#define SND_WATCH_IT 0x12A
-#define SND_OH_NO 0x12B
-#define SND_WIPEOUT1 0x12C
-#define SND_WIPEOUT2 0x12D
-#define SND_ABORT_ABORT 0x12E
-#define SND_SHES_ALIVE 0x12F
-#define SND_CENTRE_RAMP_JACKPOT1 0x130
-#define SND_CENTRE_RAMP_JACKPOT2 0x131
-#define SND_CENTRE_RAMP_JACKPOT3 0x132
-#define SND_I_FEEL_STRANGE 0x133
-#define SND_LAUGHTER5 0x134
-#define SND_OH_NO2 0x135
-#define SND_IM_LOSING_IT 0x126
-#define SND_IM_TURNING_BACK 0x137
-#define SND_LAUNCH_ALL_SHUTTLES 0x138
-#define SND_MACHINE_COMPLETE 0x139
-#define SND_MISSION_CONTROL 0x13C
-#define SND_HEY_WATCH_IT 0x13D
-#define SND_CRASH1 0x13E
-#define SND_CRASH2 0x13F
diff --git a/include/callset.h b/include/callset.h
index 98801ab5f..f91f3f13b 100644
--- a/include/callset.h
+++ b/include/callset.h
@@ -46,8 +46,16 @@ from EVENT_PAGE. */
* The default is for this to do nothing, but sometimes for debugging it
* is nice to have this print a message or log the event.
*/
-#if defined(DEBUG_CALLSET_MSG)
-#define callset_debug(id) do { dbprintf ("C%04lX\n", id); } while (0)
+
+#ifdef __m6809__
+#define callset_debug(id) \
+ do { \
+ extern U16 log_callset; \
+ if ((id & 0x3F) == 0) \
+ log_callset = id; \
+ else \
+ asm ("inc\t_log_callset+1"); \
+ } while (0)
#else
#define callset_debug(id) do { extern U16 log_callset; log_callset = id; } while (0)
#endif
diff --git a/include/coin.h b/include/coin.h
index 32cdcd00e..e847be702 100644
--- a/include/coin.h
+++ b/include/coin.h
@@ -34,8 +34,8 @@ struct coin_state
U8 total_units;
};
-__common__ void credits_render (void);
-__common__ void credits_draw (void);
+__effect__ void credits_render (void);
+__effect__ void credits_draw (void);
__common__ void lamp_start_update (void);
__common__ void add_credit (void);
__common__ bool has_credits_p (void);
@@ -49,4 +49,11 @@ extern inline U8 get_credits (void)
return coin_state.credits;
}
+extern inline U8 get_units (void)
+{
+ extern struct coin_state coin_state;
+ return coin_state.units;
+}
+
+
#endif /* _COIN_H */
diff --git a/include/deffdata.h b/include/deffdata.h
new file mode 100644
index 000000000..0eb7770cd
--- /dev/null
+++ b/include/deffdata.h
@@ -0,0 +1,83 @@
+/*
+ * Copyright 2011 by Brian Dominy
+ *
+ * This file is part of FreeWPC.
+ *
+ * FreeWPC is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * FreeWPC is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with FreeWPC; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef __DEFFDATA_H
+#define __DEFFDATA_H
+
+#define MAX_DEFF_DATA 10
+
+extern U8 deff_data_pending[];
+extern U8 deff_data_pending_count;
+extern U8 deff_data_active[];
+extern U8 deff_data_active_count;
+
+/**
+ * Renitialize display effect data.
+ * Called prior to deff_start() for any effect where D_SCORE is set.
+ */
+#define deff_data_init() \
+ deff_data_pending_count = 0;
+
+/**
+ * Push a data item to the effect.
+ * Called multiple times, after deff_init(), to send data to the effect for
+ * display. These calls should *immediately* preceed deff_start() to ensure
+ * that the right values get shown.
+ */
+#define deff_data_push(var) \
+ do { \
+ memcpy (deff_data_pending + deff_data_pending_count, &var, sizeof(var)); \
+ deff_data_pending_count += sizeof (var); \
+ } while (0)
+
+/**
+ * Load pushed data into a running effect.
+ * This is called by the OS whenever a new effect actually starts.
+ * deff_start() does not guarantee that the effect will run; if low priority,
+ * the pushed items will simply be discarded, and not affect the current deff.
+ */
+#define deff_data_load() \
+ do { \
+ memcpy (deff_data_active, deff_data_pending, deff_data_pending_count); \
+ deff_data_active_count = 0; \
+ } while (0)
+
+/**
+ * Pull a data item for display. This is called by the running display
+ * effect. Items should be pulled in the same order that they were pushed
+ * (i.e. a first-in, first-out queue).
+ */
+#define deff_data_pull(var) \
+ do { \
+ memcpy (&var, deff_data_active + deff_data_active_count, sizeof(var)); \
+ deff_data_active_count += sizeof (var); \
+ } while (0)
+
+/**
+ * Like deff_data_pull(), but only returns a pointer to the item, and does not
+ * copy it.
+ */
+#define deff_data_pull_pointer(ptr) \
+ do { \
+ ptr = deff_data_active + deff_data_active_count; \
+ deff_data_active_count += sizeof (*ptr); \
+ } while (0)
+
+#endif /* __DEFFDATA_H */
diff --git a/include/dm/global_constants.h b/include/dm/global_constants.h
new file mode 100644
index 000000000..985f146ff
--- /dev/null
+++ b/include/dm/global_constants.h
@@ -0,0 +1,218 @@
+/*
+ * demolition man
+ * global_constants.h
+ *
+ * written by James Cardona
+ *
+ */
+#include
+
+
+#ifndef _DM_GLOBAL_CONSTANTS_H
+#define _DM_GLOBAL_CONSTANTS_H
+
+
+/****************************************************************************
+ * make this TRUE for testing
+ *
+ * this will decrease the amount of hits needed to
+ * activate certain features
+ * AND add ability to increment things with the left gun handle button
+ * see code at simple_switches.c
+ ****************************************************************************/
+//#define IN_TEST TRUE
+#define IN_TEST FALSE
+
+
+
+/****************************************************************************
+ * DMD display coordinates
+ ****************************************************************************/
+//max width is 128
+#define DMD_MIDDLE_X 64
+#define DMD_MIDDLE_Y 16
+
+#define DMD_LEFT_X 10
+#define DMD_RIGHT_X 90
+
+/****************************************************************************/
+//for large fonts of height > 16 but < 30
+#define DMD_BIG_CY_Cent 16
+
+
+//max height is 32 - for larger fonts less than 14
+#define DMD_BIG_CY_Top 8
+#define DMD_BIG_CY_Bot 24
+
+
+//max height is 32 - these are for fonts of height 9 and number is center of font
+#define DMD_MED_CY_1 5
+#define DMD_MED_CY_2 14
+#define DMD_MED_CY_3 25
+
+
+//max height is 32 - these are for fonts of height 5 and number is center of font
+#define DMD_SMALL_CY_1 4
+#define DMD_SMALL_CY_2 10
+#define DMD_SMALL_CY_3 16
+#define DMD_SMALL_CY_4 22
+#define DMD_SMALL_CY_5 28
+
+
+
+
+
+
+/****************************************************************************
+ * SCORING CONSTANTS - CLAW MODES
+ ****************************************************************************/
+// no start points
+// each successive mode start score higher
+#define ACMAG_HIT_SCORE_1 SC_5M
+#define ACMAG_HIT_SCORE_2 SC_8M
+#define ACMAG_HIT_SCORE_3 SC_10M
+
+// no start points
+// each successive mode start score higher
+#define CAPSIM_HIT_SCORE_1 SC_3M
+#define CAPSIM_HIT_SCORE_2 SC_6M
+#define CAPSIM_HIT_SCORE_3 SC_10M
+#define CAP_SIM_COMPLETED_SCORE SC_10M
+
+//This is a "fast scoring" mode where all small point switches such as jets and rebounds score higher
+#define PRIS_BREAK_START_SCORE1 SC_3M
+#define PRIS_BREAK_START_SCORE2 SC_6M
+#define PRIS_BREAK_START_SCORE3 SC_10M
+#define PRIS_BREAK_HIT_SCORE SC_500K
+
+//standup frenzy - hit al the standup targets
+#define FRENZY_START_SCORE SC_5M
+#define FRENZY_HIT_SCORE SC_3M
+#define FRENZY_ADD_SCORE SC_1M //NUMBER HITS * THIS NUMBER
+
+//superjets - goal is typically 20 or 25 jets hit within the time limit
+#define SUPERJETS_START_SCORE1 SC_3M
+#define SUPERJETS_START_SCORE2 SC_6M
+#define SUPERJETS_START_SCORE3 SC_10M
+#define SUPERJETS_HIT_SCORE1 SC_500K
+#define SUPERJETS_HIT_SCORE2 SC_1M
+#define SUPERJETS_HIT_SCORE3 SC_2M
+#define SUPERJETS_GOAL_SCORE SC_5M
+
+
+
+/****************************************************************************
+ * SCORING CONSTANTS - MULTIBALLS
+ ****************************************************************************/
+//multiball jackpot scores
+#define FORTRESS_MB_SCORE SC_5M //start of mode
+#define FORTRESS_JP_MB_SCORE SC_10M
+#define FORTRESS_SUPER_JP_MB_SCORE SC_20M
+
+#define MUSEUM_MB_SCORE SC_10M //start of mode
+#define MUSEUM_JP_MB_SCORE SC_15M
+#define MUSEUM_SUPER_JP_MB_SCORE SC_25M
+
+#define WASTELAND_MB_SCORE SC_10M //start of mode
+#define WASTELAND_JP_MB_SCORE SC_15M
+#define WASTELAND_SUPER_JP_MB_SCORE SC_25M
+
+#define CRYOPRISON_MB_SCORE SC_15M //start of mode
+#define CRYOPRISON_JP_MB_SCORE SC_15M
+#define CRYOPRISON_SUPER_JP_MB_SCORE SC_30M
+
+
+/****************************************************************************
+ * SCORING CONSTANTS - NON-CLAW MODES
+ ****************************************************************************/
+// no start points
+// each successive mode start score higher
+#define CARCHASE_HIT_SCORE_1 SC_3M
+#define CARCHASE_HIT_SCORE_2 SC_6M
+#define CARCHASE_HIT_SCORE_3 SC_9M
+
+#define EXPLODE_START SC_3M
+#define EXPLODE_SCORE SC_250K //this is multiplied by count down timer (30 to 0)
+
+
+
+/****************************************************************************
+ * SCORING CONSTANTS - VIDEO MODES
+ ****************************************************************************/
+#define KABOOM_BOMB_CAUGHT SC_1M
+
+#define SHOOTING_GALLERY_OBJECT_SHOT SC_250K
+
+
+/****************************************************************************
+ * SCORING CONSTANTS - WIZARD MODES
+ ****************************************************************************/
+//started by starting 4 non-claw modes and making a huxley
+//which is hitting the retina scan in reverse
+#define HUXLEY_START_SCORE SC_15M
+#define HUXLEY_MODE_HIT_SCORE SC_1M
+
+//started by starting 5 claw modes and making underground shot
+//like a normal MB mode except all jackpot shots are lit
+#define DEMOTIME_JP_MB_SCORE SC_15M
+
+
+//started by completing all 4 multiballs modes and making top popper shot
+#define BACK_IN_THE_FRIDGE_SCORE SC_15M
+#define BACK_IN_THE_FRIDGE_HIT_SCORE SC_15M
+
+
+
+/****************************************************************************
+ * SCORING CONSTANTS - REGULAR SWITCHES
+ ****************************************************************************/
+//NOTE: car crash end switch are not listed here since their values are listed on the playfield lights
+//and then should not be changed:: they are 3M, 6M, and 10M
+#define CARCRASH_SCORE_CAR1 SC_250K
+#define CARCRASH_SCORE_CAR2 SC_500K //if playfield light not lit
+
+//THIS IS MULTIPLIED BY RETINA SCAN MULTIPLIER - max of 2
+#define EJECT_SCORE SC_1M
+
+#define EYEBALL_SCORE SC_1M
+
+//LOCATED AT SIMPLE SWITCHES
+#define OUTLANE_SCORE SC_5770
+#define UP_LEFT_FLIP_GATE_SCORE SC_1010
+#define LOWER_REBOUND_SCORE SC_1010
+#define UPPER_REBOUND_SCORE SC_1010
+#define SLING_SCORE SC_540
+
+#define INLANE_SCORE SC_5770
+
+#define HUXLEY_SCORE SC_500K
+
+#define STANDUP_SCORE SC_100K
+
+#define JETS_HIT_SCORE SC_250K
+#define JETS_GOAL_SCORE1 SC_3M //HITTING A BUNCH OF JETS - 20 OR MORE
+#define JETS_GOAL_SCORE2 SC_4M
+#define JETS_GOAL_SCORE3 SC_5M
+#define JETS_GOAL_SCORE4 SC_6M
+#define JETS_GOAL_SCORE5 SC_7M
+
+#define ORBIT_SCORE SC_100K
+#define ORBIT_GOAL_SCORE SC_250K
+
+#define ALL_ROLLOVERS_SCORE SC_1M
+#define ROLLOVERS_SCORE1 SC_100K //ROLLOVERS HIT THAT ARE ALREADY LIT
+#define ROLLOVERS_SCORE2 SC_250K //ROLLOVERS HIT THAT ARE NOT ALREADY LIT
+
+#define RAMPS_ENTER_SCORE SC_100K
+#define RAMPS_MADE_SCORE SC_250K
+
+#define TOP_POP_SCORE SC_100K
+#define BOT_POP_SCORE SC_100K
+
+#define SKILLSHOT_UGRND_SCORE SC_1M
+#define SKILLSHOT_SRAMP_SCORE SC_3M
+#define SKILLSHOT_LRAMP_SCORE SC_10M
+
+#define LASER_SHOT_SCORE SC_3M
+
+#endif /* _DM_GLOBAL_CONSTANTS_H */
diff --git a/include/dm/protos.h b/include/dm/protos.h
new file mode 100644
index 000000000..dd3169501
--- /dev/null
+++ b/include/dm/protos.h
@@ -0,0 +1,254 @@
+/*******************************************************************
+ * common page
+ ********************************************************************/
+/* ballsave.c */
+__common__ void ballsave_add_time(U8 secs);
+__common__ void ballsave_disable(void);
+
+
+/*******************************************************************
+ * .text page == GAME_OBJS
+ ********************************************************************/
+/* orbits.c */
+void extraball_light_on(void);
+void extraball_light_off(void);
+void multiball_light_on(void);
+void multiball_light_off(void);
+
+void activate_explode_inserts_orbits(void);
+void deactivate_explode_inserts_orbits(void);
+
+void ll_jackpot_light_on(void);
+void ll_jackpot_light_off(void);
+void rl_jackpot_light_on(void);
+void rl_jackpot_light_off(void);
+
+void ll_arrow_light_on(void);
+void ll_arrow_light_off(void);
+void rl_arrow_light_on(void);
+void rl_arrow_light_off(void);
+
+
+
+/* ramps.c*/
+void activate_explode_inserts_ramps(void);
+void deactivate_explode_inserts_ramps(void);
+void carchase_mode_on(void);
+void carchase_mode_off(void);
+
+void activate_left_ramp_quickfreeze(void);
+void deactivate_left_ramp_quickfreeze(void);
+void rramp_clawready_on(void);
+void rramp_clawready_off(void);
+
+void lramp_jackpot_light_on(void);
+void lramp_jackpot_light_off(void);
+void rramp_jackpot_light_on(void);
+void rramp_jackpot_light_off(void);
+void cramp_jackpot_light_on(void);
+void cramp_jackpot_light_off(void);
+void sramp_jackpot_light_on(void);
+void sramp_jackpot_light_off(void);
+
+void lramp_arrow_light_on(void);
+void lramp_arrow_light_off(void);
+void rramp_arrow_light_on(void);
+void rramp_arrow_light_off(void);
+void sramp_arrow_light_on(void);
+void sramp_arrow_light_off(void);
+void cramp_arrow_light_on(void);
+void cramp_arrow_light_off(void);
+
+
+/* arrow_handler.c*/
+void center_ramp_arrow_update(void);
+void all_arrow_update(void);
+
+
+/*jackpots.c*/
+void jackpot_reset (void);
+void choose_random_jackpot(void);
+void choose_multiple_random_jackpot(U8 numOfJakpots);
+void score_jackpot(void);
+void set_all_jackpots (void);
+void score_super_jackpot (void);
+
+
+/*diverter_check.c*/
+void diverter_check (void);
+
+
+
+
+
+/*******************************************************************
+ * machine page 1
+ ********************************************************************/
+/*inlanes.c*/
+__machine__ void access_claw_light_on(void);
+__machine__ void light_quick_freeze_light_on (void);
+__machine__ void light_quick_freeze_light_off (void);
+__machine__ void increment_access_claw_light_on(void);
+__machine__ void check_access_claw_relight (void);
+__machine__ void increment_light_quick_freeze_light (void);
+
+/*extra_ball.c*/
+__machine__ void start_extraball(void);
+__machine__ void end_extraball(void);
+
+
+/*start_super_jackpot_reminder.c*/
+__machine__ void start_super_jackpot_reminder (void);
+__machine__ void end_super_jackpot_reminder (void);
+
+
+/* standupFrenzy.c */
+
+/* acmag.c */
+__machine__ void acmag_made(void);
+
+__machine__ void disabled_claw_hit (void);
+
+/*******************************************************************
+ * machine page 2
+ ********************************************************************/
+/* car_chase_mode.c */
+__machine2__ void start_car_chase(void);
+__machine2__ void car_chase_ramp_made(void);
+
+
+/* explode.c */
+__machine2__ void start_explode(void);
+__machine2__ void explode_made(void);
+
+
+/* demotime.c */
+__machine2__ void demotime_increment (void);
+__machine2__ void demotime_increment_all (void);
+__machine2__ void demotime_start(void);
+__machine2__ void demotime_jackpot_made(void);
+
+
+/* huxley.c*/
+__machine2__ void huxley_increment(void);
+__machine2__ void huxley_increment_all(void);
+__machine2__ void huxley_begin(void);
+__machine2__ void huxley_mode_shot_made(void);
+__machine2__ void huxley_made(void);
+
+
+/* underground.c */
+__machine2__ void underground_jackpot_light_on(void);
+__machine2__ void underground_jackpot_light_off(void);
+__machine2__ void underground_arrow_light_on(void);
+__machine2__ void underground_arrow_light_off(void);
+__machine2__ void computer_light_on(void);
+__machine2__ void computer_light_off(void);
+
+
+
+
+
+/*******************************************************************
+ * machine page 3
+ ********************************************************************/
+/* capture_simon.c */
+__machine3__ void capture_simon_made(void);
+
+
+/* lock_freeze_mbstart.c */
+__machine3__ void maximize_freeze(void);
+__machine3__ void increment_freeze(void);
+__machine3__ void multiball_start (void);
+__machine3__ void multiball_started (void);
+
+
+/* prison_break.c */
+__machine3__ void prison_break_made (void);
+
+
+/* fortress.c */
+__machine3__ void fortress_start(U8 num);
+__machine3__ void fortress_jackpot_made(void);
+__machine3__ void fortress_award_super_jackpot(void);
+
+
+/* wasteland.c */
+__machine3__ void wasteland_start(U8 num);
+__machine3__ void wasteland_jackpot_made(void);
+__machine3__ void wasteland_award_super_jackpot(void);
+
+
+/*leffs.c*/
+
+
+
+
+/*******************************************************************
+ * machine page 4
+ ********************************************************************/
+/* top_popper.c */
+__machine4__ void top_popper_video_mode_finished (void);
+
+
+/* vm_handler.c */
+__machine4__ void start_video_mode (U8 sender);
+__machine4__ void video_mode_finished (void);
+
+
+/*shooting_gallery.c*/
+__machine4__ void start_shooting_gallery (void);
+
+
+/* eject.c */
+__machine4__ void comp_award_doub_retina(void);
+__machine4__ void eject_video_mode_finished(void);
+
+
+/*kaboom.c*/
+__machine4__ void start_kaboom (void);
+
+
+/*back_in_the_fridge.c*/
+__machine4__ void enable_back_in_the_fridge(void);
+__machine4__ void start_back_in_the_fridge(void);
+__machine4__ void back_in_the_fridge_shot_made(void);
+
+
+
+
+/*******************************************************************
+ * machine page 5
+ ********************************************************************/
+/* museum.c */
+__machine5__ void museum_start(U8 num);
+__machine5__ void museum_jackpot_made(void);
+__machine5__ void museum_award_super_jackpot(void);
+
+
+/* cryoprison.c */
+__machine5__ void cryoprison_start(U8 num);
+__machine5__ void cryoprison_jackpot_made(void);
+__machine5__ void cryoprison_award_super_jackpot(void);
+
+
+
+/*skillshot.c*/
+__machine5__ void award_skill_shot (U8 type_skill_shot_made);
+
+
+/* combos.c */
+__machine5__ void comp_award_light_arrows(void);
+__machine5__ void combo_hit(void );
+__machine5__ void combo_init(void);
+__machine5__ void kill_combos(void);
+__machine5__ void combo_rehit_check(void );
+
+/* car_crash.c */
+__machine5__ void comp_award_trip_car_crash(void);
+__machine5__ void restore_carcrash_lights_state(void);
+
+
+/* special_shots.c */
+__machine5__ void laser_shot_made(void);
+
diff --git a/include/dm/sound.h b/include/dm/sound.h
new file mode 100644
index 000000000..aaff81506
--- /dev/null
+++ b/include/dm/sound.h
@@ -0,0 +1,310 @@
+/*
+ * Copyright 2006 by Brian Dominy
+ *
+ * This file is part of FreeWPC.
+ *
+ * FreeWPC is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * FreeWPC is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have 0received a copy of the GNU General Public License
+ * along with FreeWPC; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef _MACH_SOUND_H
+#define _MACH_SOUND_H
+
+
+
+#define MUS_NONE 0x0
+#define MUS_PLUNGER 0x1
+#define MUS_BG 0x2
+#define MUS_MB_A 0x3
+#define MUS_MB_B 0x4
+#define MUS_MB 0x5
+#define MUS_MB_READY 0x6
+#define MUS_MD_STANDUP_FRENZY 0x8
+#define MUS_ACMAG 0x9
+#define MUS_MD_CAR_CRASH 0xB
+#define MUS_MD_EXPLODE 0xC
+#define MUS_CLAW 0xE
+#define MUS_MD_SUPERJETS 0x10
+#define COMPUTER_AWARD_LONG 0x13
+#define BALL_DRAIN 0x1A
+#define MUS_HIGH_SCORE 0x1F
+#define SPECIAL 0x21
+#define MUS_MD_CAPTURE_SIMON 0x23
+#define MUS_END_GAME 0x24
+#define MUS_MD_CRYO_PRISON_BREAKOUT 0x25
+
+#define SUBWAY 0x64
+#define WATER_SPRAYER 0x68
+#define COMPUTER2 0x6A
+#define MACHINE6 0x6C
+
+#define SUBWAY2 0x70
+#define SIREN 0x72
+#define CAR_SKID 0x73
+#define CAR_CRASH 0x75
+#define ZAPP_1 0x77
+#define PLONK 0x78
+#define JOINK 0x79
+#define JOINK_2 0x7A
+#define ZAPP_2 0x7B
+#define RICOCHET 0x7C
+#define WIPE 0x7E
+
+#define SPRAY_CAN 0x81
+#define HELICOPTER 0x88
+#define STEAM 0x8B
+#define SPECIAL_EFFECT 0x8C
+#define TRAIN_PULL_IN 0x8D
+
+#define ZAPP_3_SHORT 0x93
+#define ZAPP_3_MED 0x94
+#define ZAPP_3_LONG 0x95
+#define GUNSHOT_MUFFLED 0x98
+#define GUNSHOT 0x99
+#define EXPLOSION 0x9B
+
+#define OUTLANE_PIANO 0xA3
+#define RACE_BY 0xA5
+#define RACE_BY_2 0xA6
+#define LOW_HORN 0xAA
+#define COMPUTER_AWARD_SMALL 0xAB
+
+#define TIN_CAN 0xB0
+#define RACE_BY_SHORT 0xB4
+#define RACE_BY_LONG 0xB6
+#define RACE_BY_3 0xB8
+#define BONUS_SHORT 0xB9
+#define BONUS_LONG 0xBA
+#define MACHINE10 0xBC
+#define MACHINE1_SHORT 0xBD
+#define MACHINE1_MED 0xBE
+#define MACHINE1_LONG 0xBF
+
+#define INLANE_SOUND 0xC5
+#define STORM1_MED 0xC6
+#define STORM1_LONG 0xC7
+#define STORM1_SHORT 0xC8
+#define EXPLOSION1_SHORT 0xCB
+#define EXPLOSION1_MED 0xCC
+#define EXPLOSION1_LONG 0xCD
+
+#define MACHINE11 0xD1
+#define MACHINE12 0xD4
+
+#define SPCH_GLORIOUS 0x0140
+#define SPCH_SOME_ACTION 0x0143
+#define SPCH_SECOND_CHANCE 0x0144
+#define SPCH_CLOSE_ENOUGH 0x014A
+#define SPCH_BETWEEN_YOU_N_ME 0x014B
+#define SPCH_SIMON_SAYS_SLY 0x0154
+#define SPCH_BACK_IN_FRIDGE 0x0155
+#define SPCH_GO_LEFT 0x0156
+#define SPCH_CATCH_UP 0x015B
+#define SPCH_LETS_GO1 0x015E
+#define SPCH_WES_LAUGH_SHORT1 0x0162
+#define SPCH_SIMON_SNICKER 0x0163
+#define SPCH_WES_LAUGH_SHORT2 0x0164
+#define SPCH_SIMON_LAUGH_LONG 0x0165
+#define SPCH_JOHN_SCREAM 0x0166
+#define SPCH_OHH_YEAH3 0x016C
+#define SPCH_PUNCH_IT 0x0170
+#define SPCH_PUSH_PEDAL_HARD 0x0171
+#define SPCH_PLAY_ACCORDION_TOO 0x017F
+#define SPCH_WES_LAUGH_SHORT3 0x0181
+#define SPCH_FEEL_GOOD_TOO 0x0182
+#define SPCH_SO_SCARED 0x0188
+#define SPCH_ILUMINATE 0x018A
+
+#define TOINK1 0x01F8
+#define TOINK2 0x01F9
+#define TILT 0x01FB
+#define SPARKS 0x01FC
+#define ZAPP 0x0200
+#define LOCK_FREEZE_PLOINK 0x0201
+#define MACHINE3 0x0202
+#define COMPUTER_ADDING 0x0205
+#define EJECT 0x0208
+#define FREEZE5 0x0209
+#define CHORD1 0x020D
+#define CHORD2 0x020E
+#define CHORD3 0x020F
+#define ORCHESTRA 0x0210
+#define MACHINE14_SHORT 0x0212
+#define MACHINE14_LONG 0x0216
+#define COMPUTER3 0x0218
+#define GROUND_HUMM 0x0219
+#define COMPUTER1 0x021B
+#define RETINA_SCAN_LONG 0x021C
+#define CAR_GEAR_CHANGE 0x021D
+#define NO_MATCH_ACCORDION 0x0220
+#define EXTRA_BALL_SOUND 0x0221
+
+#define SPCH_COWS 0x025A
+#define SPCH_WEEAHOO 0x0261
+#define SPCH_I_GOT_IT 0x0263
+#define SPCH_COMPETITION 0x0264
+#define SPCH_EXCUSE_ME 0x0269
+#define SPCH_WOAH 0x026B
+#define SPCH_WHAT_ARE_YOU_DOING 0x026C
+#define SPCH_IS_IT_COLD_IN_HERE 0x026E
+#define SPCH_STOP_THIS 0x0270
+#define SPCH_HEADS_UP 0x0271
+#define SPCH_SEND_MANIAC 0x0275
+#define SPCH_BEST_DAY_OF_MY_LIFE 0x0279
+#define SPCH_BLAST_FROM_THE_PAST 0x027A
+#define SPCH_GOOD_ONE 0x027C
+#define SPCH_HOW_NICE 0x0289
+#define SPCH_LOVE_THIS_GUY 0x028A
+#define SPCH_MEN_DEFROSTED 0x0291
+#define SPCH_UHHN 0x0292
+#define SPCH_NO_FREE_RIDES 0x0297
+#define SPCH_JUST_LOVELY 0x0298
+#define SPCH_PREPARE_FOR_SIMON 0x029C
+#define SPCH_SOMETHING_RIGHT_PREV_LIFE 0x029E
+#define SPCH_TWO_PRICE_ONE 0x02A9
+#define SPCH_WHAT_YOU_DOING_HERE 0x02AC
+#define SPCH_GET_THIS_PARTNER 0x02AE
+#define SPCH_UNDER_ARREST 0x02AF
+#define SPCH_ARREST 0x02B0
+#define SPCH_TRESPASSING 0x02B1
+#define SPCH_DO_SOMETHING 0x02B2
+#define SPCH_AHHHGGG 0x02B3
+#define SPCH_PHOENIX_LONG 0x02B4
+#define SPCH_EXTRABALL_WES 0x02BC
+#define SPCH_NEED_EXTRABALL 0x02BF
+#define SPCH_MOVE 0x02C3
+#define SPCH_MOVE_IT 0x02C4
+#define SPCH_NICE_MOVE 0x02C5
+#define SPCH_GO_WES 0x02C7
+#define SPCH_GREAT_SHOT 0x02C8
+#define SPCH_GOOD_SHOT 0x02CA
+#define SPCH_HURRY_UP 0x02D2
+#define SPCH_DOUBLE_JACKPOT_WES 0x02D4
+#define SPCH_GET_SUPER_JACKPOT 0x02D6
+#define SPCH_NICE_SHOT 0x02E0
+#define SPCH_NICE_SHOOTING 0x02E1
+#define SPCH_WES_LAUGH1 0x02E7
+#define SPCH_WES_LAUGH2 0x02E8
+#define SPCH_WES_LAUGH3 0x02E9
+#define SPCH_OUTSTANDING 0x02F6
+#define SPCH_SIMON_SAYS 0x02FF
+
+#define SPCH_STEP_ON_IT 0x0303
+#define SPCH_TOO_BAD 0x0306
+#define SPCH_PATHETIC 0x0308
+#define SPCH_YEEAHHAA 0x030B
+#define SPCH_YOU_GOT_IT 0x030C
+#define SPCH_AMAZING_WES 0x030D
+#define SPCH_COME_GET_ME 0x0310
+#define SPCH_AMAZING_SLY 0x0320
+#define SPCH_LETS_GO2 0x0323
+#define SPCH_MOVE_IT_SLY 0x0327
+#define SPCH_NICE 0x0328
+#define SPCH_VERY_NICE 0x0329
+#define SPCH_NICE_MOVE_SLY 0x032A
+#define SPCH_DONT_MOVE 0x032C
+#define SPCH_DRIVE 0x032E
+#define SPCH_EXCELLENT 0x0331
+#define SPCH_GO_SLY 0x033A
+#define SPCH_HURRY 0x033B
+#define SPCH_CRYO_PRISON_BREAKOUT 0x0340
+#define SPCH_BE_WELL_PHOENIX 0x0341
+#define SPCH_EXTRABALL_SLY 0x034A
+#define SPCH_GET_THE_EXTRABALL 0x034D
+#define SPCH_NICE_SHOOTING_SLY 0x0353
+#define SPCH_NICE_SHOT_SLY 0x0354
+#define SPCH_GREAT_SHOT_SLY 0x0355
+#define SPCH_GREAT_SHOOTING 0x0356
+#define SPCH_NOW_THATS_WHAT_I_CALL_SHOOTING 0x0358
+#define SPCH_SHOOT_AGAIN_SLY 0x035B
+#define SPCH_SKILLSHOT 0x0361
+#define SPCH_HATE_WHEN_THAT_HAPPENS 0x0362
+#define SPCH_LOVE_WHEN_THAT_HAPPENS 0x0364
+#define SPCH_JACKPOT 0x036E
+#define SPCH_DOUBLE_JACKPOT_SLY 0x0374
+#define SPCH_DOUBLE 0x0375
+#define SPCH_TRIPLE 0x0376
+#define SPCH_SUPER_JACKPOT 0x0378
+#define SPCH_NOW 0x037B
+#define SPCH_OHH_NO 0x037C
+#define SPCH_OHH_YEAH1 0x037E
+#define SPCH_OHH_YEAH2 0x037F
+#define SPCH_OUTSTANDING_SLY 0x0380
+#define SPCH_REPLAY 0x0384
+#define SPCH_YOU_AND_ME 0x0385
+
+//these must be named this
+//#define SND_TEST_DOWN 0x03D4
+//#define SND_TEST_UP 0x03D5
+//#define SND_TEST_ESCAPE 0x03D6
+//#define SND_TEST_ENTER 0x03D7
+
+//#define SPCH_MENU_BONG 0x03D8
+//#define SPCH_MENU_1 0x03D9
+//#define SPCH_MENU_2 0x03DA
+//#define SPCH_MENU_3 0x03DB
+//#define SPCH_MENU_4 0x03DC
+//#define SPCH_MENU_5 0x03DD
+
+
+#define SPCH_ACMAG_ACTIVATED 0x03E8
+#define SPCH_ACCESSING 0x03EC
+#define SPCH_CAR_CRASH_TRIPLED 0x03EE
+#define SPCH_COMPUTER_AWARD 0x03EF
+#define SPCH_COLLECT_BONUS 0x03F0
+#define SPCH_CRYOCLAW_ACTIVATED 0x03F2
+#define SPCH_EXPLODE_ACTIVATED 0x03FC
+#define SPCH_EXPLODE_HURRYUP 0x03FD
+#define SPCH_PLAYER_ONE 0x0405
+#define SPCH_PLAYER_TWO 0x0406
+#define SPCH_PLAYER_THREE 0x0407
+#define SPCH_PLAYER_FOUR 0x0408
+#define SPCH_SHOOT_AGAIN 0x040E
+#define SPCH_SUPERJETS_COMPLETED 0x0412
+#define SPCH_SUPERJETS_ACTIVATED 0x0414
+#define SPCH_YOU_LOOK_GREAT_TODAY 0x0416
+#define SPCH_USE_BUTTONS_TO_RELEASE_BALL 0x0417
+#define SPCH_USE_TRIGGERS_TO_MOVE_CRYOCLAW 0x0418
+#define SPCH_DONT_YOU_WANT_SOMETHING_HAPPEN 0x041A
+#define SPCH_IN_THIS_CENTURY 0x041B
+#define SPCH_WUSS_SPARTAN 0x041C
+#define SPCH_DEMOLITION_MAN 0x041D
+#define SPCH_STAYED_THERE 0x041E
+#define SPCH_DONT_WORRY 0x0420
+#define SPCH_NEXT_SHOT 0x0421
+#define SPCH_MUST_HAVE_HURT 0x0422
+#define SPCH_JOHN_SPARTAN 0x0423
+#define SPCH_BAD_AIM 0x0424
+#define SPCH_PHOENIX_SHORT 0x0425
+#define SPCH_COW_MOO 0x0427
+#define SPCH_DULCH 0x0429
+#define SPCH_WOOH 0x042A
+#define SPCH_WOW 0x042B
+#define SPCH_TRIPLE_CAR_CRASH 0x042E
+#define SPCH_COLLECT_STANDUPS 0x0431
+#define SPCH_LIGHT_ARROWS 0x0434
+#define SPCH_LIGHT_EXTRA_BALL 0x0435
+#define SPCH_MAXIMIZE_FREEZES 0x0436
+#define SPCH_MULTIBALL_ACTIVATED 0x0437
+#define SPCH_SHOOT_LEFT_LOOP 0x0438
+#define SPCH_QUICK_FREEZE_ACTIVATED 0x0439
+#define SPCH_DOUBLE_RETINA_SCAN 0x043A
+#define SPCH_AINT_OVER_YET 0x043C
+#define SPCH_DONT_MOVE_PHOENIX 0x043D
+#define SPCH_WHO_IS_THAT 0x043E
+#define SPCH_DREAMIN_KILLING_YOU 0x043F
+#define SPCH_KEEP_DREAMING 0x0440
+
+
+#endif /* _MACH_SOUND_H */
diff --git a/include/env.h b/include/env.h
index 1299a9999..61168a579 100644
--- a/include/env.h
+++ b/include/env.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2006-2010 by Brian Dominy
+ * Copyright 2006-2011 by Brian Dominy
*
* This file is part of FreeWPC.
*
@@ -33,13 +33,6 @@
#define HAVE_INTERRUPT_ATTRIBUTE
#endif
-/* Only CPU game ROMs have nvram and locals */
-#ifdef CONFIG_PLATFORM_WPC
-#define HAVE_NVRAM_SECTION
-#define HAVE_LOCAL_SECTION
-#define HAVE_PERMANENT_SECTION
-#endif
-
/** noreturn is a standard GCC attribute and is always
* available. This is just shorthand. */
#define __noreturn__ __attribute__((noreturn))
@@ -48,30 +41,10 @@
* or may not be available depending on the compiler
* version used. */
-#ifdef HAVE_FASTRAM_ATTRIBUTE
#define __fastram__ __attribute__((section("direct")))
-#else
-#define __fastram__
-#endif
-
-#ifdef HAVE_NVRAM_SECTION
#define __nvram__ __attribute__((section ("nvram")))
-#else
-#define __nvram__
-#endif
-
-#ifdef HAVE_LOCAL_SECTION
#define __local__ __attribute__((section ("local")))
-#else
-#define __local__
-#endif
-
-#ifdef HAVE_PERMANENT_SECTION
#define __permanent__ __attribute__((section ("permanent")))
-#else
-#define __permanent__
-#endif
-
/** Section declaration modifiers. These attributes are used
* on function prototypes and data externs to denote which
@@ -118,6 +91,20 @@
#define __leff__
#endif
+#ifndef __attribute_deprecated__
+#ifndef CONFIG_NO_DEPRECATED
+#define __attribute_deprecated__ __attribute__((__deprecated__))
+#else
+#define __attribute_deprecated__
+#endif
+#endif
+
+#ifndef CONFIG_NO_PURE
+#define __pure__ __attribute__((pure))
+#else
+#define __pure__
+#endif
+
#ifdef HAVE_INTERRUPT_ATTRIBUTE
#define __interrupt__ __attribute__((interrupt))
#else
@@ -154,8 +141,11 @@ the target CPU */
/* barrier() is used in several places to tell the compiler not
to perform certain optimizations across both sides of the barrier. */
-#define barrier() asm ("; nop" ::: "memory")
-
+#ifdef __m6809__
+#define barrier() asm ("; barrier" ::: "memory")
+#else
+#define barrier()
+#endif
/* Some versions of the 6809 C compiler have issues.
* Use __GCC6809_AT_LEAST__ to test for a minimum version. */
@@ -189,55 +179,43 @@ do { \
} while (0)
-/***************************************************************
- * I/O accessor functions
+/* Far data accessor functions
*
- * The intent of these functions is to encapsulate all I/O
- * reads and writes, so that they can be simulated in
- * environments where a direct memory map is not present.
- ***************************************************************/
-
-#ifdef CONFIG_MMIO
-extern inline void writeb (IOPTR addr, U8 val)
-{
- *(volatile U8 *)addr = val;
- barrier ();
-}
-#else
-void writeb (IOPTR addr, U8 val);
-#endif
-
-extern inline void writew (IOPTR addr, U16 val)
-{
-#ifdef CONFIG_MMIO
- *(volatile U16 *)addr = val;
- barrier ();
-#else
- writeb (addr, val >> 8);
- writeb (addr+1, val & 0xFF);
-#endif
-}
+ * Inside any banked function which needs to access caller data
+ * that might be in a different bank, first call far_read_access()
+ * as the very first statement in the function. Thereafter, you
+ * can use far_read() to get access to caller data through a paged
+ * pointer.
+ *
+ * The syntax is far_read (ptr, field), where ptr is a pointer
+ * to a struct in a banked area, and field identifies which part
+ * of the struct needs to be read.
+ */
+#define __fardata__
-#ifdef CONFIG_MMIO
-extern inline U8 readb (IOPTR addr)
-{
- return *(volatile U8 *)addr;
-}
+#ifdef __m6809__
+#define far_read_access() \
+ U8 __caller_page; asm ("sta\t%0" : "=m"(__caller_page))
#else
-U8 readb (IOPTR addr);
+#define far_read_access()
#endif
-
-extern inline void io_toggle_bits (U16 addr, U8 val)
-{
-#ifdef CONFIG_NATIVE
- U8 reg = readb (addr);
- reg ^= val;
- writeb (addr, val);
+#ifdef __m6809__
+#define far_read(ptr, __field) \
+ (__builtin_choose_expr ( (sizeof (ptr->__field) == 1), \
+ (far_read8 (&ptr->__field, __caller_page)), \
+ (typeof (ptr->__field))(far_read16 (&ptr->__field, __caller_page))))
#else
- *(volatile U8 *)addr ^= val;
+#define far_read(__ptr, __field) (__ptr->__field)
#endif
-}
+
+/* Types for linker variables.
+ You can declare flags, global flags, and timers using the types below.
+ They are resolved to IDs at link time. Each type is associated with
+ a pseudo-section. */
+#define flag_t __attribute__((section(".flag"))) U8
+#define global_flag_t __attribute__((section(".globalflag"))) U8
+#define free_timer_id_t __attribute__((section(".freetimer"))) U8
#endif /* _ENV_H */
diff --git a/include/filesystem.h b/include/filesystem.h
index b265093fa..a0ab04a70 100644
--- a/include/filesystem.h
+++ b/include/filesystem.h
@@ -46,6 +46,9 @@ enum file_type
FT_VERSION,
FT_ROTEST,
FT_DATE,
+ FT_FLEX1,
+ FT_FLEX2,
+ FT_FLEX3,
};
diff --git a/include/flex.h b/include/flex.h
new file mode 100644
index 000000000..b90e12a2f
--- /dev/null
+++ b/include/flex.h
@@ -0,0 +1,33 @@
+
+#ifndef _FLEX_H
+#define _FLEX_H
+
+#define MAX_FLEX_GAMES 50
+
+struct flex_data
+{
+ U8 level;
+ U8 games;
+ U8 history[MAX_FLEX_GAMES];
+};
+
+
+struct flex_config
+{
+ U8 min_level;
+ U8 max_level;
+ U8 *adj_level;
+ U8 min_percent;
+ U8 max_percent;
+ U8 *adj_percent;
+ U8 frequency;
+ struct flex_data *data;
+ struct area_csum *csum;
+};
+
+__common2__ void flex_end_game (__fardata__ const struct flex_config *fconf);
+__common2__ void flex_end_player (__fardata__ const struct flex_config *fconf, U8 value);
+__common2__ void flex_reset (__fardata__ const struct flex_config *fconf);
+
+#endif /* _FLEX_H */
+
diff --git a/machine/afm/righthole.c b/include/flipcode.h
similarity index 55%
rename from machine/afm/righthole.c
rename to include/flipcode.h
index abfcaa06b..80e82feef 100644
--- a/machine/afm/righthole.c
+++ b/include/flipcode.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2006, 2007, 2008, 2010 by Brian Dominy
+ * Copyright 2011 by Brian Dominy
*
* This file is part of FreeWPC.
*
@@ -18,10 +18,19 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include
+#ifndef _FLIPCODE_H
+#define _FLIPCODE_H
+/* To recognize a flipper code in attract mode, declare a CALLSET_ENTRY
+ for the event 'flipper_code_entered'. Then call either flipcode3()
+ or flipcode4() to get the sequence that was entered, and compare it
+ against the value that you are handling. Values returned are
+ in BCD, so for example, the sequence 1-2-3-4 would be tested as
+ 'flipcode4() == 0x1234'. */
-CALLSET_ENTRY (right_hole, dev_right_hole_enter)
-{
-}
+extern U16 flipcode_value;
+#define flipcode3() (flipcode_value & 0xFFF)
+#define flipcode4() flipcode_value
+
+#endif /* _FLIPCODE_H */
diff --git a/include/format.h b/include/format.h
index b4e1a3b8a..9c66a37ff 100644
--- a/include/format.h
+++ b/include/format.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2007, 2008, 2009, 2010 by Brian Dominy
+ * Copyright 2007-2011 by Brian Dominy
*
* This file is part of FreeWPC.
*
diff --git a/include/freewpc.h b/include/freewpc.h
index bdd88831a..84bc57d4a 100644
--- a/include/freewpc.h
+++ b/include/freewpc.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2006, 2007, 2008, 2009, 2010 by Brian Dominy
+ * Copyright 2006-2012 by Brian Dominy
*
* This file is part of FreeWPC.
*
@@ -111,8 +111,14 @@ extern U8 periodic_ok;
#define C_STRING(x) C_STR(x)
#define C_STR(x) #x
+/*
+ * Round a value to the next highest multiple of 8.
+ */
+#define MULTIPLEOF8(x) (((x) + 7) / 8)
+
#ifdef CONFIG_NATIVE
#include
+#include
#endif
/* Include the standard header files that are needed
@@ -120,6 +126,12 @@ extern U8 periodic_ok;
/* Main configuration - game specific. All machines MUST define one */
#include
+#undef MAX_TIMERS
+#define MAX_TIMERS 32
+#undef MAX_FLAGS
+#define MAX_FLAGS 64
+#undef MAX_GLOBAL_FLAGS
+#define MAX_GLOBAL_FLAGS 32
/* Processor specifics */
#include
@@ -148,6 +160,7 @@ extern U8 periodic_ok;
/* Build system information */
#include
+#include
/* CPU specifics */
#include
@@ -158,16 +171,20 @@ __noreturn__ void freewpc_init (void);
/* Platform specifics */
#ifdef CONFIG_PLATFORM_WHITESTAR
-#define CPU_BOARD
#include
+#define __CPU_BOARD
#endif
#ifdef CONFIG_PLATFORM_WPC
-#define CPU_BOARD
#include
+#define __CPU_BOARD
#endif
-#ifdef CONFIG_PLATFORM_WPCSOUND
-#define SOUND_BOARD
-#include
+#ifdef CONFIG_PLATFORM_P2K
+#include
+#define __CPU_BOARD
+#endif
+#ifdef CONFIG_PLATFORM_MIN
+#include
+#define __CPU_BOARD
#endif
/* Core software structures */
@@ -180,24 +197,29 @@ __noreturn__ void freewpc_init (void);
#endif
/* Basic data structures */
-
#include
-//#include
#include
-#ifdef CPU_BOARD
/* Hardware modules */
+#ifdef __CPU_BOARD
+#ifdef CONFIG_AC
#include
+#endif
#include
#include
#include
#include
#include
#include
+#include
#ifdef CONFIG_GI
#include
#endif
+#ifdef CONFIG_RTC
#include
+#else
+#define timestamp_update(x)
+#endif
/* Common software structures */
#include
@@ -220,11 +242,11 @@ __noreturn__ void freewpc_init (void);
#include
#include
#include
+#include
+#include
/* Uncommon software modules - TODO : shouldn't automatically include */
-#ifdef CONFIG_PLATFORM_WPC
#include
-#endif
#include /* this one HAS to be here for now, for callset.c */
/* Game-specific defines. 'mach' should point to the machine-specific
@@ -253,9 +275,7 @@ __noreturn__ void freewpc_init (void);
#endif
#endif
#endif
-
-#endif /* CPU_BOARD */
-
+#endif /* __CPU_BOARD */
/* This is ugly, but I can't figure out any other way to get
* pragmas working */
diff --git a/include/funhouse/protos.h b/include/funhouse/protos.h
deleted file mode 100644
index 51f2a70de..000000000
--- a/include/funhouse/protos.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright 2009 by Brian Dominy
- *
- * This file is part of FreeWPC.
- *
- * FreeWPC is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * FreeWPC is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with FreeWPC; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef _PROTOS_H
-#define _PROTOS_H
-
-__machine__ void fh_clock_advance (U8);
-__machine__ void rudy_look_left (void);
-__machine__ void rudy_look_straight (void);
-__machine__ void rudy_look_right (void);
-__machine__ void rudy_blink (void);
-
-__machine__ void light_lock (void);
-__machine__ bool lock_lit_p (void);
-__machine__ bool frenzy_lit_p (void);
-__machine__ bool frenzy_running_p (void);
-__machine__ void frenzy_start (void);
-__machine__ void frenzy_collect (void);
-__machine__ void super_frenzy_start (void);
-__machine__ bool multiball_mode_running_p (void);
-
-__machine__ void say (U16 code);
-
-typedef U8 min5_t;
-
-#define CLK_5_MIN 1
-#define CLK_10_MIN 2
-#define CLK_15_MIN 3
-#define CLK_20_MIN 4
-#define CLK_25_MIN 5
-#define CLK_30_MIN 6
-
-__machine__ void fh_clock_set (U8 hour, min5_t minute);
-__machine__ void fh_clock_advance_step (void);
-
-#define TIME_0_MIN 0
-#define TIME_15_MIN 3
-#define TIME_30_MIN 6
-#define TIME_45_MIN 9
-
-/* Effect priorities */
-
-#define PRI_SUPERDOG PRI_GAME_QUICK2
-#define PRI_MB PRI_GAME_QUICK4
-#define PRI_QUICKMB PRI_GAME_QUICK4
-#define PRI_MIRROR PRI_GAME_QUICK6
-
-#define PRI_SUPERDOG_MODE PRI_GAME_MODE2
-#define PRI_FRENZY_MODE PRI_GAME_MODE5
-
-#define PRI_AMODE_LEFF PRI_LEFF1
-#define PRI_RUDY_LEFF PRI_LEFF2
-#define PRI_SHOOTER_LEFF PRI_LEFF2
-#define PRI_SUPERDOG_LEFF PRI_LEFF3
-#define PRI_KICKOUT_LEFF PRI_LEFF3
-#define PRI_MB_LEFF PRI_LEFF4
-#define PRI_JACKPOT_LEFF PRI_LEFF8
-
-#endif
diff --git a/include/funhouse/sound.h b/include/funhouse/sound.h
deleted file mode 100644
index dd976d169..000000000
--- a/include/funhouse/sound.h
+++ /dev/null
@@ -1,150 +0,0 @@
-
-#ifndef _MACH_SOUND_H
-#define _MACH_SOUND_H
-
-#define MUS_MAIN_PLUNGER 0x01
-#define MUS_MAIN 0x02
-#define MUS_STEPS 0x04
-#define MUS_1130 0x05
-#define MUS_1145 0x06
-#define MUS_MIDNIGHT 0x07
-#define MUS_MULTIBALL 0x08
-#define MUS_JACKPOT 0x09
-#define MUS_1130_PLUNGER 0x0A
-#define MUS_RESTART_PLUNGER 0x0C
-#define MUS_RESTART_RUNNING 0x0D
-#define MUS_FRENZY 0x0E
-#define MUS_SUPERDOG 0x0F
-#define MUS_MULTIBALL2 0x10
-#define MUS_HIGH_SCORE 0x11
-
-#define SND_EXTRA_BALL 0x80
-#define SND_LOCK_LIT 0x81
-#define SND_INLANE 0x82
-#define SND_WIND 0x83
-#define SND_OUTLANE 0x84
-#define SND_WIND_TUNNEL 0x86
-#define SND_GONG 0x88
-#define SND_PLUNGE 0x89
-#define SND_JET(x) (0x8A + (x))
-#define SND_LEFT_PLUNGER 0x8E
-#define SND_TILT 0x90
-#define SND_STEP_SPELLED 0x91
-#define SND_TILT_WARNING 0x93
-#define SND_COIN 0x94
-#define SND_SKILL_SHOT 0x9C
-#define SND_STEPS_AWARD 0x9D
-#define SND_OUTER_RIGHT_INLANE 0x9F
-#define SND_SPECIAL_LIT 0xA0
-#define SND_FRENZY_LIT 0xA1
-#define SND_UPPER_LOOP1 0xA3
-#define SND_SLING 0xA4
-#define SND_UPPER_LOOP2 0xA7
-#define SND_MILLION_AWARD 0xA9
-#define SND_3WAY_COMBO 0xAA
-#define SND_RAMP_MADE 0xAC
-#define SND_4WAY_COMBO 0xAD
-#define SND_STEP_TARGETS_MADE 0xAE
-#define SND_LOCK_MB_KICK 0xB0
-#define SND_WHEEEE 0xB5
-#define SND_RAMP_ENTER2 0xB6
-#define SND_KICKOUT 0xBA
-#define SND_STEPS_TOP_AWARD 0xBC
-#define SND_KICKOUT_COMING 0xBF
-#define SND_GONG2 0xC0
-#define SND_RAMP_ENTER 0xC1
-//#define SND_RAMP_MADE 0xC2
-#define SND_LOOP 0xC3
-#define SND_BOOM1 0xC6
-#define SND_BOOM2 0xC7
-#define SND_JACKPOT 0xC8
-#define SND_MULTIBALL_START 0xC9
-#define SND_RESTART_RING 0xCB
-#define SND_QUICK_MB_AWARD 0xCC
-#define SND_REPLAY 0xCE
-#define SND_FRENZY_BLIP1 0xD0
-#define SND_FRENZY_BLIP2 0xD1
-#define SND_FRENZY_BLIP3 0xD2
-#define SND_TARGET1 0xD3
-#define SND_TARGET2 0xD4
-#define SND_BONUS_BLIP1 0xD8
-#define SND_BONUS_BLIP2 0xD9
-#define SND_CHOMP 0xDF
-#define SND_BONUS_FRENZY 0xE0
-#define SND_BONUS_BLIP3 0xE2
-#define SND_BONUS_BLIP4 0xE3
-#define SND_BONUS_BLIP5 0xE4
-#define SND_TARGET_COMPLETE 0xE6
-
-#define SPCH_CHUCKLE 0x101
-#define SPCH_HEY 0x102
-#define SPCH_YOU_CANT_HIDE 0x103
-#define SPCH_I_SEE_YOU_NOW 0x104
-#define SPCH_COME_BACK_HERE 0x105
-#define SPCH_GETTING_LATE 0x107
-#define SPCH_BIG_DEAL 0x108
-#define SPCH_YOU_BIG 0x109
-#define SPCH_WHERE_NOW 0x10A
-#define SPCH_QUIT_PLAYING 0x10B
-#define SPCH_SAUSAGE 0x10C
-#define SPCH_GO_AHEAD_TRY_AND_HIDE 0x10D
-#define SPCH_BLEH 0x10E
-#define SPCH_UHH 0x10F
-#define SPCH_NO_WAY 0x110
-#define SPCH_STOP_RUN_AROUND 0x113
-#define SPCH_STOP_IT 0x114
-#define SPCH_EHH 0x115
-#define SPCH_MILD_OWW 0x116
-#define SPCH_STARTING_TO_ANNOY 0x117
-#define SPCH_PAINFUL_OWW 0x118
-#define SPCH_THATS_NOT_FUNNY 0x119
-#define SPCH_CLOSE_THE_DOOR 0x11A
-#define SPCH_YOU_DONT_WANT 0x11B
-#define SPCH_FUNHOUSE 0x11C
-#define SPCH_BIFF 0x11F
-#define SPCH_BUCKO 0x120
-#define SPCH_BUDDY 0x121
-#define SPCH_BUSTER 0x123
-#define SPCH_CHUCKY 0x124
-#define SPCH_COME_ON_IN 0x126
-#define SPCH_SLICK 0x127
-#define SPCH_FUNHOUSE_CLOSED 0x12A
-#define SPCH_GET_A_HOTDOG 0x12C
-#define SPCH_GO_PLAY_ON_STEPS 0x12D
-#define SPCH_WAY_TO_GO 0x12E
-#define SPCH_YUM_YUM 0x130
-#define SPCH_PHOOEY 0x131
-#define SPCH_THERES_EXTRA_BALL 0x135
-#define SPCH_SHOOT_AGAIN 0x136
-#define SPCH_FRENZY 0x139
-#define SPCH_OH_BOY 0x13B
-#define SPCH_WHAT_WAS_THAT 0x13C
-#define SPCH_NICE_GOING 0x13E
-#define SPCH_HOWDY 0x13F
-#define SPCH_HUNGRY 0x140
-#define SPCH_YOURE_UP 0x141
-#define SPCH_DOORS_OPEN 0x142
-#define SPCH_HEADS_UP 0x143
-#define SPCH_LOOK_OUT 0x144
-#define SPCH_HERE_IT_COMES 0x145
-#define SPCH_YOU_CAN_HAVE_IT_BACK 0x146
-#define SPCH_IM_WATCHING_YA 0x148
-#define SPCH_GOOD_NIGHT 0x149
-#define SPCH_FEEL_LIKE_1M 0x14B
-#define SPCH_HEY_ITS_ONLY_PINBALL 0x14C
-#define SPCH_IM_STILL_HUNGRY 0x14D
-#define SPCH_MAYBE_NEXT_TIME 0x14E
-#define SPCH_IM_NOT_HAPPY 0x14F
-#define SPCH_OH_NO 0x150
-#define SPCH_ITS_LUNCH_TIME 0x151
-#define SPCH_GANGWAY 0x153
-#define SPCH_SNORE1 0x158
-#define SPCH_SNORE2 0x159
-#define SPCH_JACKPOT_SCREAM 0x15A
-#define SPCH_LETS_PLAY_TWO 0x15B
-#define SPCH_EXTRA_BALL 0x15D
-#define SPCH_GULP 0x15E
-#define SPCH_MILLION 0x15F
-#define SPCH_BIG_POINTS 0x163
-
-#endif /* _MACH_SOUND_H */
diff --git a/include/game.h b/include/game.h
index a341e6451..dec9c0a6f 100644
--- a/include/game.h
+++ b/include/game.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2006, 2007, 2008, 2009, 2010 by Brian Dominy
+ * Copyright 2006-2011 by Brian Dominy
*
* This file is part of FreeWPC.
*
@@ -44,7 +44,6 @@ void try_validate_playfield (U8 swno);
void add_player (void);
void start_game (void);
void stop_game (void);
-bool verify_start_ok (void);
void match_start (void);
void amode_start (void);
diff --git a/include/hwsim/ball.h b/include/hwsim/ball.h
index e8e709b18..8ff3da23d 100644
--- a/include/hwsim/ball.h
+++ b/include/hwsim/ball.h
@@ -106,6 +106,9 @@ struct ball
char name[32];
};
+#define BALL_NORMAL 0x0
+#define BALL_CERAMIC 0x1
+
extern struct ball_node open_node;
extern struct ball_node device_nodes[];
extern struct ball_node switch_nodes[];
@@ -122,9 +125,12 @@ extern struct ball_node switch_nodes[];
#endif
extern struct ball_node_type switch_type_node;
+extern struct ball_node_type proximity_switch_type_node;
extern struct ball_node_type mux_type_node;
extern struct ball_node_type open_type_node;
+extern struct ball the_ball[];
+
void node_insert (struct ball_node *node, struct ball *ball);
void node_kick (struct ball_node *node);
void node_move (struct ball_node *dst, struct ball_node *src);
diff --git a/include/hwsim/io.h b/include/hwsim/io.h
index 3e80976a6..fde0a55e8 100644
--- a/include/hwsim/io.h
+++ b/include/hwsim/io.h
@@ -25,7 +25,9 @@
#define MIN_IO_ADDR 0x0
#define MAX_IO_ADDR 0x4000
#else
-#error
+#warning "simulation I/O not configured, taking defaults"
+#define MIN_IO_ADDR 0x0
+#define MAX_IO_ADDR 0x100
#endif
#define NUM_IO_ADDRS (MAX_IO_ADDR - MIN_IO_ADDR)
@@ -46,6 +48,10 @@ void io_null_writer (void *data, unsigned int offset, U8 val);
void writeb (IOPTR addr, U8 val);
U8 readb (IOPTR addr);
void io_add_1 (IOPTR addr, unsigned int len, io_reader reader, io_writer writer, void *data);
+U8 io_mem_reader (U8 *valp, unsigned int addr);
+void io_mem_writer (U8 *valp, unsigned int addr, U8 val);
+
+void io_write_sol (U8 *memp, unsigned int addr, U8 val);
#define io_add(addr, len, reader, writer, data) \
io_add_1 (addr, len, (io_reader)reader, (io_writer)writer, data)
@@ -62,5 +68,10 @@ void io_init (void);
#ifdef CONFIG_PLATFORM_WPC
void io_wpc_init (void);
#endif
+#ifdef CONFIG_PLATFORM_MIN
+void io_min_init (void);
+#endif
+
+U8 io_conf_reader (int *valp, unsigned int addr);
#endif /* _HWSIM_IO_H */
diff --git a/include/interrupt.h b/include/interrupt.h
index 79e0cd61b..17e1f3ecc 100644
--- a/include/interrupt.h
+++ b/include/interrupt.h
@@ -28,9 +28,11 @@ extern inline void do_irq_begin (void)
pinio_set_bank (PINIO_BANK_RAM, 0);
#endif
- /* Clear the source of the periodic interrupt, and reset
+ /* On WPC, clear the source of the periodic interrupt, and reset
the hardware watchdog */
+#ifdef CONFIG_PLATFORM_WPC
pinio_clear_periodic ();
+#endif
}
diff --git a/include/lang.h b/include/lang.h
new file mode 100644
index 000000000..202e20352
--- /dev/null
+++ b/include/lang.h
@@ -0,0 +1,122 @@
+/*
+ * Copyright 2010 by Brian Dominy
+ *
+ * This file is part of FreeWPC.
+ *
+ * FreeWPC is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * FreeWPC is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with FreeWPC; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef _LANG_H
+#define _LANG_H
+
+/* Enumerate all possible supported languages.
+ Each is given a unique integer ID. In any particular build, a subset
+ (nonzero) of these languages may be compiled in.
+ */
+#define STR_EN_OFF 0
+#define STR_FR_OFF 1
+#define STR_GR_OFF 2
+
+
+/* Configuration (TODO : move to .config)
+ Each define CONFIG_LANG_xxx can be enabled or disabled, to say
+ if that language is included at compile-time.
+
+ CONFIG_LANG_DEFAULT should also be defined to the default
+ language (one of the STR_xx_OFF defines).
+ */
+#define CONFIG_LANG_EN
+#define CONFIG_LANG_FR
+#define CONFIG_LANG_GR
+#define CONFIG_LANG_DEFAULT STR_EN_OFF
+
+
+/* Compute how many languages have been enabled at compile time.
+ For each translatable string, we will store it as an array of
+ this many real strings. */
+#define NUM_STR_LANGS 3
+
+
+/* Define a type 'string_array' which is an array of strings, one
+ for each possible translation. */
+typedef const char *string_array[NUM_STR_LANGS];
+
+
+/* Define some helper macros for declaring string translations.
+ The general syntax is:
+ STR_BEGIN(XYZ)
+ STR_EN("xyz")
+ STR_FR("xyz_fr")
+ STR_GR("xyz_gr")
+ STR_END
+
+ STR_BEGIN and STR_END bracket a list of translations.
+ STR_BEGIN also gives the list a label for a name.
+
+ Within the list, use STR_xx to give the translation
+ for each of the languages.
+ All other translations are optional except for the default.
+ If a translation is not given, the default language will be used.
+ */
+#define STR_BEGIN(label) string_array str_ ## label = {
+#define STR_END };
+
+#ifdef CONFIG_LANG_EN
+#define STR_EN(str) [STR_EN_OFF] = str,
+#else
+#define STR_EN(str) STR_EN(str)
+#endif
+
+#ifdef CONFIG_LANG_FR
+#define STR_FR(str) [STR_FR_OFF] = str,
+#else
+#define STR_FR(str) STR_EN(str)
+#endif
+
+#ifdef CONFIG_LANG_GR
+#define STR_GR(str) [STR_GR_OFF] = str,
+#else
+#define STR_GR(str) STR_EN(str)
+#endif
+
+
+/* Define a macro STR_OFF which refers to the current language to
+ be used for string references. */
+#if (NUM_STR_LANGS > 1)
+ /* If more than one language is enabled at compile-time,
+ then we must use a runtime variable to track which one
+ is currently enabled. */
+ extern U8 str_off;
+ #define STR_OFF str_off
+#else
+ /* If only one language is enabled, then runtime checks
+ can be skipped. */
+ #if defined CONFIG_LANG_EN
+ #define STR_OFF STR_EN_OFF
+ #elif defined CONFIG_LANG_FR
+ #define STR_OFF STR_FR_OFF
+ #elif defined CONFIG_LANG_GR
+ #define STR_OFF STR_GR_OFF
+ #endif
+#endif
+
+
+/* STR (label) is used whenever you need a reference to
+ a particular string. The correct translation is returned.
+ Use the same label name that appeared in the translation
+ table's STR_BEGIN() call. */
+#define STR(label) str_ ## label [STR_OFF]
+
+#endif /* _LANG_H */
diff --git a/include/m6809/m6809.h b/include/m6809/m6809.h
index d88a057b4..e1ab52780 100644
--- a/include/m6809/m6809.h
+++ b/include/m6809/m6809.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2006-2010 by Brian Dominy
+ * Copyright 2006-2011 by Brian Dominy
*
* This file is part of FreeWPC.
*
@@ -39,6 +39,31 @@
#define CC_FIRQ 0x40
#define CC_E 0x80
+/** AREA_DECL is used to expose a linker area name within the C
+ * variable namespace. It appears an external name. The asm syntax
+ * is needed so that the normal appending of an underscore does not
+ * occur. */
+#define ASM_DECL(name) name asm (#name)
+#define AREA_DECL(name) extern U8 ASM_DECL (s_ ## name); extern U8 ASM_DECL (l_ ## name);
+
+/** Return the base address of a linker area. This has type (U8 *). */
+#define AREA_BASE(name) (&s_ ## name)
+
+/** Return the runtime size of a linker area. This has type U16.
+ * This is not the maximum allowable space for the area, but rather
+ * reflects how many actual variables have been mapped there. */
+#define AREA_SIZE(name) ((U16)(&l_ ## name))
+
+/* Define externs for all of these areas. AREA_BASE and AREA_SIZE can
+ * only be called on these. */
+AREA_DECL(direct)
+AREA_DECL(ram)
+AREA_DECL(local)
+AREA_DECL(heap)
+AREA_DECL(stack)
+AREA_DECL(permanent)
+AREA_DECL(nvram)
+
/* Defines for various assembler routines that can be called from C */
__attribute__((noreturn)) void start (void);
U8 far_read8 (const void *address, U8 page);
@@ -181,4 +206,16 @@ extern inline void __blockcopy16 (void *s1, const void *s2, U16 n)
#define memcpy __builtin_memcpy
#define memcmp __builtin_memcmp
+
+/**
+ * Load the low-order 8-bits of an address into a byte register for
+ * a function argument.
+ */
+extern inline U8 __addrval (void *p)
+{
+ U8 val;
+ asm ("ldb\t#<%c1" : "=d"(val) : "p" (p));
+ return val;
+}
+
#endif /* _ASM_6809_H */
diff --git a/include/native/gpio.h b/include/native/gpio.h
new file mode 100644
index 000000000..d5cdeba0c
--- /dev/null
+++ b/include/native/gpio.h
@@ -0,0 +1,18 @@
+#ifndef __NATIVE_GPIO_H
+#define __NATIVE_GPIO_H
+
+typedef int gpio_id_t;
+
+#define GPID(i,p) (((i)*32)+p)
+
+int gpio_request (gpio_id_t gpio);
+int gpio_config (gpio_id_t gpio);
+int gpio_set_direction (gpio_id_t gpio, const char *direction);
+int gpio_read (gpio_id_t gpio);
+int gpio_write (gpio_id_t gpio, int value);
+int gpio_write_led (int led, int value);
+int gpio_release (gpio_id_t gpio);
+int gpio_request_input (gpio_id_t gpio);
+int gpio_request_output (gpio_id_t gpio);
+
+#endif /* __NATIVE_GPIO_H */
diff --git a/include/native/log.h b/include/native/log.h
new file mode 100644
index 000000000..f4296168e
--- /dev/null
+++ b/include/native/log.h
@@ -0,0 +1,7 @@
+
+#ifndef __NATIVE_LOG_H
+#define __NATIVE_LOG_H
+
+void print_log (const char *format, ...);
+
+#endif
diff --git a/include/native/native.h b/include/native/native.h
new file mode 100644
index 000000000..560266d77
--- /dev/null
+++ b/include/native/native.h
@@ -0,0 +1,54 @@
+/*
+ * Copyright 2012 by Brian Dominy
+ *
+ * This file is part of FreeWPC.
+ *
+ * FreeWPC is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * FreeWPC is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with FreeWPC; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef _NATIVE_NATIVE_H
+#define _NATIVE_NATIVE_H
+
+/** AREA_DECL is used to expose a linker area name within the C
+ * variable namespace. It appears an external name. The asm syntax
+ * is needed so that the normal appending of an underscore does not
+ * occur. */
+#define AREA_DECL(name) extern U8 *__start_ ## name; extern U8 *__stop_ ## name;
+
+/** Return the base address of a linker area. This has type (U8 *). */
+#define AREA_BASE(name) (&__start_ ## name)
+
+/** Return a pointer to the end of the linker area. */
+#define AREA_END(name) (&__stop_ ## name)
+
+/** Return the runtime size of a linker area. This has type U16.
+ * This is not the maximum allowable space for the area, but rather
+ * reflects how many actual variables have been mapped there. */
+#define AREA_SIZE(name) ((U16)( (int)AREA_END(name) - (int)AREA_BASE(name) ))
+
+/* Define externs for all of these areas. AREA_BASE and AREA_SIZE can
+ * only be called on these. */
+AREA_DECL(direct)
+AREA_DECL(ram)
+AREA_DECL(local)
+AREA_DECL(heap)
+AREA_DECL(stack)
+AREA_DECL(permanent)
+AREA_DECL(nvram)
+
+
+#endif /* _NATIVE_NATIVE_H */
+
+
diff --git a/include/platform/min.h b/include/platform/min.h
new file mode 100644
index 000000000..6f59348e1
--- /dev/null
+++ b/include/platform/min.h
@@ -0,0 +1,109 @@
+/*
+ * Copyright 2012 by Brian Dominy
+ *
+ * This file is part of FreeWPC.
+ *
+ * FreeWPC is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * FreeWPC is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with FreeWPC; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef __PLATFORM_MIN_H
+#define __PLATFORM_MIN_H
+
+/* This is an example of a 'minimal platform' which only provides the
+ basic necessities for a pinball game. */
+
+/* Mandatory PINIO defines */
+#define PINIO_NUM_LAMPS 24
+#define PINIO_NUM_SWITCHES 8
+#define PINIO_NUM_SOLS 4
+#define PINIO_GI_STRINGS 0x3
+
+/* Internal names for I/O addresses. These addresses are "virtual".
+ Each represents an 8-bit input/output register. */
+#define IO_SWITCH 0
+#define IO_LAMP 1 /* 8 direct lamps (0-7) */
+#define IO_SOL 2
+#define IO_DIAG 3
+#define IO_LAMP_MX_ROW 4 /* 4x4 lamp matrix (8-23) */
+#define IO_LAMP_MX_COL 5
+
+/* TODO : we shouldn't need to declare anything if there is no banking... */
+
+#define PINIO_BANK_ROM 0
+#define PINIO_BANK_RAM 1
+extern inline void pinio_set_bank (U8 bankno, U8 val) { }
+extern inline U8 pinio_get_bank (U8 bankno) { return 0; }
+
+/* TODO : why do I have to say this? */
+#define LOCAL_SIZE 64
+
+/* The following two are very similar, and could be merged... */
+
+extern inline void pinio_write_solenoid_set (U8 set, U8 val)
+{
+ if (set == 0)
+ writeb (IO_SOL, val & 0xF);
+}
+
+extern inline IOPTR sol_get_write_reg (U8 sol)
+{
+ return IO_SOL;
+}
+
+/* Other stuff */
+
+extern inline void pinio_reset_sound (void)
+{
+}
+
+extern inline void pinio_write_sound (U8 val)
+{
+}
+
+extern inline bool pinio_sound_ready_p (void)
+{
+ return FALSE;
+}
+
+extern inline U8 pinio_read_sound (void)
+{
+ return 0;
+}
+
+extern inline void pinio_nvram_lock (void)
+{
+}
+
+extern inline void pinio_nvram_unlock (void)
+{
+}
+
+extern inline void pinio_enable_flippers (void)
+{
+}
+
+extern inline void pinio_disable_flippers (void)
+{
+}
+
+extern inline void pinio_active_led_toggle (void)
+{
+}
+
+extern inline U8 pinio_read_locale (void)
+{
+}
+
+#endif /* __PLATFORM_MIN_H */
diff --git a/include/platform/native.h b/include/platform/native.h
index 04e246ec1..15d3e3bb9 100644
--- a/include/platform/native.h
+++ b/include/platform/native.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2007, 2008, 2009, 2010 by Brian Dominy
+ * Copyright 2007, 2008, 2009, 2010, 2011 by Brian Dominy
*
* This file is part of FreeWPC.
*
@@ -59,6 +59,11 @@ extern inline U8 far_indirect_call_value_handler (value_function address, U8 pag
return address ();
}
+/**
+ * Load the low-order 8-bits of an address into a byte register for
+ * a function argument.
+ */
+#define __addrval(p) (((int)p) & 0xFF)
#endif /* _PLATFORM_NATIVE_H */
diff --git a/include/platform/p2k.h b/include/platform/p2k.h
new file mode 100644
index 000000000..02fb7300c
--- /dev/null
+++ b/include/platform/p2k.h
@@ -0,0 +1,265 @@
+/*
+ * Copyright 2010 by Brian Dominy
+ *
+ * This file is part of FreeWPC.
+ *
+ * FreeWPC is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * FreeWPC is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with FreeWPC; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef P2K_H
+#define P2K_H
+
+#undef DEBUGGER
+/* TODO */
+#define WPC_DMD_LOW_PAGE 0xF0
+#define WPC_DMD_HIGH_PAGE 0xF1
+#define WPC_DMD_FIRQ_ROW_VALUE 0xF2
+#define WPC_DMD_ACTIVE_PAGE 0xF3
+extern U8 *pinio_dmd_low_page, *pinio_dmd_high_page;
+
+/* TODO : we shouldn't need to declare anything if there is no banking... */
+
+#define PINIO_BANK_ROM 0
+#define PINIO_BANK_RAM 1
+extern inline void pinio_set_bank (U8 bankno, U8 val) { }
+extern inline U8 pinio_get_bank (U8 bankno) { return 0; }
+
+/* TODO : why do I have to say this? */
+#define LOCAL_SIZE 64
+
+
+/*
+ * Parallel port registers
+ */
+
+#define LPT_BASE 0x27F
+
+#define LPT_DATA (LPT_BASE + 0)
+#define LPT_STATUS (LPT_BASE + 1)
+ #define LPT_ID 0xF8
+#define LPT_CONTROL (LPT_BASE + 2)
+ #define LPT_REG_OE 0x01
+ #define LPT_REG_LATCH 0x04
+ #define LPT_DIR_CTRL 0x08
+
+/*
+ * P2K I/O register set
+ */
+
+#define P2K_COIN_INPUT 0
+#define P2K_FLIPPER_INPUT 1
+ #define P2K_SLAM_TILT 0x1
+ #define P2K_COIN_DOOR_CLOSED 0x2
+ #define P2K_TILT 0x4
+ #define P2K_RIGHT_BUTTON 0x10
+ #define P2K_LEFT_BUTTON 0x20
+ #define P2K_RIGHT_ACTION 0x40
+ #define P2K_LEFT_ACTION 0x80
+#define P2K_DIP_INPUT 2
+#define P2K_EOS_DIR_INPUT 3
+ #define P2K_ESCAPE 0x1
+ #define P2K_DOWN 0x2
+ #define P2K_UP 0x4
+ #define P2K_ENTER 0x8
+ #define P2K_LR_EOS 0x10
+ #define P2K_LL_EOS 0x20
+ #define P2K_UR_EOS 0x40
+ #define P2K_UL_EOS 0x80
+#define P2K_SWITCH_ROW_INPUT 4
+#define P2K_SWITCH_COL_OUTPUT 5
+#define P2K_LAMP_ROW_A_OUTPUT 6
+#define P2K_LAMP_ROW_B_OUTPUT 7
+#define P2K_LAMP_COL_OUTPUT 8
+#define P2K_SOLC_OUTPUT 9
+#define P2K_SOLB_OUTPUT 10
+#define P2K_SOLA_OUTPUT 11
+#define P2K_FLIPPER_OUTPUT 12
+#define P2K_SOLD_OUTPUT 13
+ #define P2K_SOLD_HEALTH 0x10
+ #define P2K_SOLD_POWER_RELAY 0x20
+ #define P2K_SOLD_COIN_COUNTER 0x40
+ #define P2K_SOLD_LAMP_TEST 0x80
+#define P2K_LOGIC_OUTPUT 14
+#define P2K_SYS_INPUT 15
+ #define P2K_SYS_TICKET_NOTCH 0x10
+ #define P2K_SYS_TICKET_LOW 0x20
+ #define P2K_SYS_BLANKING 0x40
+ #define P2K_SYS_ZERO_CROSS 0x80
+#define P2K_LAMP_TEST_A_INPUT 16
+#define P2K_LAMP_TEST_B_INPUT 17
+#define P2K_FUSE_TEST_A_INPUT 18
+#define P2K_FUSE_TEST_B_INPUT 19
+
+
+extern U8 p2k_write_cache[];
+
+void p2k_write (U8 reg, U8 val);
+U8 p2k_read (U8 reg);
+
+
+/**
+ * Write '1' to certain bits of a P2K output register.
+ */
+extern inline void p2k_set_bits (U8 reg, U8 bits)
+{
+ p2k_write (reg, p2k_write_cache[reg] | bits);
+}
+
+
+/**
+ * Write '0' to certain bits of a P2K output register.
+ */
+extern inline void p2k_clear_bits (U8 reg, U8 bits)
+{
+ p2k_write (reg, p2k_write_cache[reg] & ~bits);
+}
+
+
+/*
+ * LED and Fuse numbers
+ */
+
+#define P2K_LED_WATCHDOG 1
+#define P2K_LED_HEALTH 2
+#define P2K_LED_LAMPA 3
+#define P2K_LED_LR_FLIP_POWER 4
+#define P2K_LED_LL_FLIP_POWER 5
+#define P2K_LED_UR_FLIP_POWER 6
+#define P2K_LED_UL_FLIP_POWER 7
+#define P2K_LED_LAMPB 8
+#define P2K_LED_50V_SOL 9
+#define P2K_LED_20V_FLASH 10
+#define P2K_LED_SOL_1 11
+#define P2K_LED_SOL_2 12
+#define P2K_LED_SOL_3 13
+#define P2K_LED_SOL_4 14
+#define P2K_LED_20V 15
+#define P2K_LED_12V 16
+#define P2K_LED_5V 17
+
+/*
+ * Pinball I/O (pinio) functions
+ */
+
+extern inline void pinio_active_led_toggle (void)
+{
+ p2k_set_bits (P2K_SOLD_OUTPUT, P2K_SOLD_HEALTH);
+}
+
+extern inline U8 pinio_read_ac_zerocross (void)
+{
+ return p2k_read (P2K_SYS_INPUT) & P2K_SYS_ZERO_CROSS;
+}
+
+#define PINIO_NUM_LAMPS 128
+
+extern inline void pinio_write_lamp_strobe (U8 val)
+{
+ p2k_write (P2K_LAMP_COL_OUTPUT, val);
+}
+
+extern inline void pinio_write_lamp_data (U16 val)
+{
+ p2k_write (P2K_LAMP_ROW_A_OUTPUT, val & 0xFF);
+ p2k_write (P2K_LAMP_ROW_B_OUTPUT, val << 8);
+}
+
+#define PINIO_NUM_SOLS 48
+
+extern inline void pinio_write_solenoid_set (U8 set, U8 val)
+{
+ switch (set)
+ {
+ case 0:
+ p2k_write (P2K_SOLA_OUTPUT, val);
+ break;
+ case 1:
+ p2k_write (P2K_SOLB_OUTPUT, val);
+ break;
+ case 2:
+ p2k_write (P2K_SOLC_OUTPUT, val);
+ break;
+ case 3:
+ p2k_write (P2K_SOLD_OUTPUT, val);
+ break;
+ case 4:
+ p2k_write (P2K_FLIPPER_OUTPUT, val);
+ break;
+ case 5:
+ p2k_write (P2K_LOGIC_OUTPUT, val);
+ break;
+ }
+}
+
+extern inline IOPTR sol_get_write_reg (U8 sol)
+{
+}
+
+#define PINIO_NUM_SWITCHES 88
+
+extern inline void pinio_write_switch_column (U8 val)
+{
+ p2k_write (P2K_SWITCH_COL_OUTPUT, 1 << val);
+}
+
+extern inline U8 pinio_read_switch_rows (void)
+{
+ return p2k_read (P2K_SWITCH_ROW_INPUT);
+}
+
+extern inline U8 pinio_read_dedicated_switches (void)
+{
+ return p2k_read (P2K_EOS_DIR_INPUT);
+}
+
+extern inline void pinio_enable_flippers (void)
+{
+}
+
+extern inline void pinio_disable_flippers (void)
+{
+}
+
+extern inline void pinio_watchdog_reset (void)
+{
+}
+
+extern inline void pinio_reset_sound (void)
+{
+}
+
+extern inline void pinio_write_sound (U8 val)
+{
+}
+
+extern inline bool pinio_sound_ready_p (void)
+{
+ return FALSE;
+}
+
+extern inline U8 pinio_read_sound (void)
+{
+ return 0xFF;
+}
+
+extern inline U8 pinio_read_locale (void)
+{
+ return 0;
+}
+
+#define pinio_nvram_unlock()
+#define pinio_nvram_lock()
+
+#endif /* P2K_H */
diff --git a/include/platform/proc.h b/include/platform/proc.h
new file mode 100644
index 000000000..627532458
--- /dev/null
+++ b/include/platform/proc.h
@@ -0,0 +1,249 @@
+/*
+ * Copyright 2009-2012 by Brian Dominy
+ *
+ * This file is part of FreeWPC.
+ *
+ * FreeWPC is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * FreeWPC is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with FreeWPC; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+/**
+ * \file
+ * \brief Definitions/macros specific to the P-ROC hardware
+ */
+
+#ifndef __PLATFORM_PROC_H
+#define __PLATFORM_PROC_H
+
+/* A hack -- code should not be calling this unless CONFIG_WPC */
+#define WPC_HAS_CAP(cap) 0
+
+/* A 32-bit request word is divided into four parts:
+ * Command (READ or WRITE) [31]
+ * Number of words [30:20]
+ * Module select [19:16]
+ * Address [15:0]
+ */
+
+#define PACKET_HEADER_LEN(header) ((header >> 20) & 0x3FF)
+
+#define PROC_CMD(rw, count, module, addr) \
+ (((rw) << 31) | ((count) << 20) | ((module) << 16) | (addr))
+
+/* TODO */
+#define SWAP32(n) (n)
+
+/* Module selects */
+#define PROC_MOD_MANAGER 0
+ #define PROC_MANAGER_CHIPID 0
+ #define PROC_MANAGER_VERSION 1
+ #define PROC_MANAGER_WATCHDOG 2
+ #define PROC_MANAGER_DIPSW 3
+
+#define PROC_MOD_BUSMASTER 1
+
+#define PROC_MOD_SWITCH 2
+ #define PROC_SW_BURSTCFG 0
+ #define PROC_SW_DIRECT_PHYS 4
+ #define PROC_SW_MATRIX_PHYS(n) (5 + n)
+ #define PROC_SW_BURST_PHYS(n) (0x9 + n)
+ #define PROC_SW_DIRECT 0xB
+ #define PROC_SW_MATRIX(n) (0xC + n)
+ #define PROC_SW_BURST(n) (0x10 + n)
+
+#define PROC_MOD_OUTPUT 3
+
+#define PROC_MOD_CHANGE 4
+
+#define PROC_MOD_DMD 5
+ #define PROC_DMD_DRVCFG 0
+ #define PROC_DMD_FRAMECFG(n) (0x8 + (n))
+ #define PROC_DMD_MEM 0x1000
+
+#define PROC_MOD_UNASSOC 15
+
+#define PROC_ADDR(module, offset) (offset | (module << 16))
+
+
+/***************************************************************
+ * Memory usage
+ ***************************************************************/
+
+/** The total size of RAM -- 8K */
+#define RAM_SIZE 0x2000UL
+
+/** The usable, nonprotected area of RAM -- the first 6K */
+#define USER_RAM_SIZE 0x1800UL
+
+#define LOCAL_SIZE 0x40
+
+/*
+ * Pinball I/O (pinio) functions
+ */
+
+extern U8 *pinio_dmd_low_page, *pinio_dmd_high_page;
+
+#define MACHINE_DIAG_LED 0
+
+extern inline void pinio_active_led_toggle (void)
+{
+}
+
+extern inline U8 wpc_read_ac_zerocross (void)
+{
+ return 0;
+}
+
+/********************************************/
+/* Lamps */
+/********************************************/
+
+extern inline void pinio_write_lamp_strobe (U8 val)
+{
+}
+
+extern inline void pinio_write_lamp_data (U8 val)
+{
+}
+
+/********************************************/
+/* Solenoids */
+/********************************************/
+
+extern inline void pinio_write_solenoid_set (U8 set, U8 val)
+{
+}
+
+/********************************************/
+/* Switches */
+/********************************************/
+
+extern inline void pinio_write_switch_column (U8 val)
+{
+}
+
+extern inline U8 pinio_read_switch_rows (void)
+{
+ return 0;
+}
+
+extern inline U8 pinio_read_dedicated_switches (void)
+{
+ return 0;
+}
+
+/***************************************************************
+ * Flippers
+ ***************************************************************/
+
+extern inline U8 wpc_read_flippers (void)
+{
+ return 0;
+}
+
+extern inline U8 wpc_read_flipper_buttons (void)
+{
+ return 0;
+}
+
+extern inline U8 wpc_read_flipper_eos (void)
+{
+ return 0;
+}
+
+
+extern inline void wpc_write_flippers (U8 val)
+{
+}
+
+extern inline void pinio_enable_flippers (void)
+{
+}
+
+extern inline void pinio_disable_flippers (void)
+{
+}
+
+extern inline void pinio_watchdog_reset (void)
+{
+}
+
+
+/********************************************/
+/* Bank Switching */
+/********************************************/
+
+#define PINIO_BANK_ROM 0
+
+extern inline void pinio_set_bank (U8 bankno, U8 val)
+{
+}
+
+extern inline U8 pinio_get_bank (U8 bankno)
+{
+ return 0;
+}
+
+/********************************************/
+/* Zero Crossing/IRQ Clear Register */
+/********************************************/
+
+
+extern inline U8 wpc_get_jumpers (void)
+{
+ return 0;
+}
+
+extern inline U8 pinio_read_locale (void)
+{
+ return 0;
+}
+
+
+/********************************************/
+/* Sound */
+/********************************************/
+
+extern inline void pinio_reset_sound (void)
+{
+}
+
+extern inline void pinio_write_sound (U8 val)
+{
+}
+
+extern inline bool pinio_sound_ready_p (void)
+{
+ return FALSE;
+}
+
+extern inline U8 pinio_read_sound (void)
+{
+ return 0;
+}
+
+
+/********************************************/
+/* Triacs */
+/********************************************/
+
+extern inline void pinio_write_triac (U8 val)
+{
+}
+
+#define pinio_nvram_unlock()
+#define pinio_nvram_lock()
+
+#endif /* __PLATFORM_PROC_H */
+
diff --git a/include/platform/whitestar.h b/include/platform/whitestar.h
index 832044e67..5fd2d1f51 100644
--- a/include/platform/whitestar.h
+++ b/include/platform/whitestar.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2006, 2007, 2008, 2009, 2010 by Brian Dominy
+ * Copyright 2006-2011 by Brian Dominy
*
* This file is part of FreeWPC.
*
@@ -32,27 +32,6 @@
* Memory usage
***************************************************************/
-#ifdef __m6809__
-
-#define ASM_DECL(name) name asm (#name)
-
-#define AREA_DECL(name) extern U8 ASM_DECL (s_ ## name); extern U8 ASM_DECL (l_ ## name);
-#define AREA_BASE(name) (&s_ ## name)
-#define AREA_SIZE(name) ((U16)(&l_ ## name))
-
-AREA_DECL(direct)
-AREA_DECL(ram)
-AREA_DECL(local)
-AREA_DECL(heap)
-AREA_DECL(stack)
-AREA_DECL(permanent)
-AREA_DECL(nvram)
-
-#else
-/* TODO */
-#endif /* __m6809__ */
-
-
/** The total size of RAM -- 8K */
#define RAM_SIZE 0x2000UL
@@ -83,16 +62,17 @@ AREA_DECL(nvram)
#define WS_FLIP0 0x2004
#define WS_FLIP1 0x2005
#define WS_AUX_OUT 0x2006
- #define WS_AUX_GI_RELAY 0x1
+#define WS_AUX_IN 0x2007
+#define WS_LAMP_COLUMN_STROBE 0x2008
+#define WS_LAMP_ROW_OUTPUT 0x200A
+#define WS_AUX_CTRL 0x200B
+ #define WS_AUX_GI 0x1 /* 0=GI on, 1=GI off */
+ #define WS_AUX_LEFT_POST_SAVE 0x2
#define WS_AUX_BSTB 0x8
#define WS_AUX_CSTB 0x10
#define WS_AUX_DSTB 0x20
#define WS_AUX_ESTB 0x40
#define WS_AUX_ASTB 0x80
-#define WS_AUX_IN 0x2007
-#define WS_LAMP_COLUMN_STROBE 0x2008
-#define WS_LAMP_ROW_OUTPUT 0x200A
-#define WS_AUX_CTRL 0x200B
#define WS_SW_DEDICATED 0x3000
#define WS_DED_LEFT 0x1
#define WS_DED_LEFT_EOS 0x2
@@ -107,14 +87,17 @@ AREA_DECL(nvram)
#define WS_LED_MASK 0x80
#define WS_SW_COLUMN_STROBE 0x3300
#define WS_SW_ROW_INPUT 0x3400
-#define WS_PLASMA_IN 0x3500
-#define WS_PLASMA_OUT 0x3600
+#define WS_PLASMA_STROBE 0x3500
+#define WS_PLASMA_DATA 0x3600
#define WS_PLASMA_RESET 0x3601
#define WS_PLASMA_STATUS 0x3700
- #define WS_SOUND_BUSY 0x1
- #define WS_DMD_BUSY 0x80
+ #define WS_PLASMA_BUSY 0x80
+ #define WS_PLASMA_TX_READY 0x10 /* 1=ok to send */
#define WS_SOUND_OUT 0x3800
+ #define WS_SOUND_BUSY 0x1
+extern U8 ws_page_led_io;
+extern U8 ws_aux_ctrl_io;
/********************************************/
/* LED */
@@ -123,7 +106,8 @@ AREA_DECL(nvram)
/** Toggle the diagnostic LED. */
extern inline void pinio_active_led_toggle (void)
{
- io_toggle_bits (WS_PAGE_LED, WS_LED_MASK);
+ ws_page_led_io ^= WS_LED_MASK;
+ writeb (WS_PAGE_LED, ws_page_led_io);
}
@@ -133,10 +117,6 @@ extern inline void pinio_active_led_toggle (void)
#undef HAVE_PARALLEL_PORT
-extern inline void pinio_parport_write (U8 data)
-{
-}
-
/********************************************/
/* NVRAM Protection Circuit */
/********************************************/
@@ -155,7 +135,9 @@ extern inline void pinio_set_bank (U8 bankno, U8 val)
switch (bankno)
{
case PINIO_BANK_ROM:
- writeb (WS_PAGE_LED, val & WS_PAGE_MASK);
+ ws_page_led_io &= ~WS_PAGE_MASK;
+ ws_page_led_io |= val;
+ writeb (WS_PAGE_LED, ws_page_led_io);
break;
default:
break;
@@ -167,7 +149,7 @@ extern inline U8 pinio_get_bank (U8 bankno)
switch (bankno)
{
case PINIO_BANK_ROM:
- return readb (WS_PAGE_LED) & WS_PAGE_MASK;
+ return ws_page_led_io & WS_PAGE_MASK;
default:
return 0;
}
@@ -188,6 +170,14 @@ extern inline void wpc_write_flippers (U8 val)
{
}
+extern inline void pinio_enable_flippers (void)
+{
+}
+
+extern inline void pinio_disable_flippers (void)
+{
+}
+
/********************************************/
/* Locale */
@@ -196,7 +186,7 @@ extern inline void wpc_write_flippers (U8 val)
extern inline U8 wpc_get_jumpers (void)
{
- return 0;
+ return ~readb (WS_SW_DIP);
}
extern inline U8 pinio_read_locale (void)
@@ -205,23 +195,16 @@ extern inline U8 pinio_read_locale (void)
}
-extern inline U8 wpc_read_ticket (void)
-{
- return 0;
-}
-
-
-extern inline void wpc_write_ticket (U8 val)
-{
-}
-
/********************************************/
/* Lamps */
/********************************************/
-extern inline void pinio_write_lamp_strobe (U8 val)
+#define PINIO_NUM_LAMPS 80
+
+extern inline void pinio_write_lamp_strobe (U16 val)
{
- writeb (WS_LAMP_COLUMN_STROBE, val);
+ writeb (WS_LAMP_COLUMN_STROBE, val & 0xFF);
+ writeb (WS_LAMP_COLUMN_STROBE+1, val >> 8);
}
extern inline void pinio_write_lamp_data (U8 val)
@@ -233,6 +216,8 @@ extern inline void pinio_write_lamp_data (U8 val)
/* Solenoids */
/********************************************/
+#define PINIO_NUM_SOLS 32
+
extern inline void pinio_write_solenoid_set (U8 set, U8 val)
{
switch (set)
@@ -252,6 +237,21 @@ extern inline void pinio_write_solenoid_set (U8 set, U8 val)
}
}
+extern inline IOPTR sol_get_write_reg (U8 sol)
+{
+ switch (sol / 8)
+ {
+ case 0:
+ return WS_SOLA;
+ case 1:
+ return WS_SOLB;
+ case 2:
+ return WS_SOLC;
+ case 3:
+ return WS_FLASHERS;
+ }
+}
+
/********************************************/
/* Sound */
@@ -263,6 +263,7 @@ extern inline void pinio_reset_sound (void)
extern inline void pinio_write_sound (U8 val)
{
+ writeb (WS_SOUND_OUT, val);
}
extern inline bool pinio_sound_ready_p (void)
@@ -282,9 +283,14 @@ extern inline U8 pinio_read_sound (void)
/* Switches */
/********************************************/
+#define PINIO_NUM_SWITCHES 72
+
+#define SW_LEFT_BUTTON SW_LEFT_FLIPPER
+#define SW_RIGHT_BUTTON SW_RIGHT_FLIPPER
#define SW_ENTER SW_BLACK_BUTTON
#define SW_UP SW_GREEN_BUTTON
#define SW_DOWN SW_RED_BUTTON
+#define SW_ESCAPE SW_RED_BUTTON
extern inline void pinio_write_switch_column (U8 val)
{
@@ -292,12 +298,12 @@ extern inline void pinio_write_switch_column (U8 val)
extern inline U8 pinio_read_switch_rows (void)
{
- return 0;
+ return ~readb (WS_SW_ROW_INPUT);
}
extern inline U8 pinio_read_dedicated_switches (void)
{
- return 0;
+ return ~readb (WS_SW_DEDICATED);
}
@@ -305,7 +311,19 @@ extern inline U8 pinio_read_dedicated_switches (void)
/* Triacs */
/********************************************/
-extern inline void pinio_write_triac (U8 val)
+#define PINIO_GI_STRINGS 0x1
+extern inline void pinio_write_gi (U8 val)
+{
+ val = ~val;
+ ws_aux_ctrl_io = 0xFE | (val & 0x1);
+ writeb (WS_AUX_CTRL, ws_aux_ctrl_io);
+}
+
+/********************************************/
+/* Miscellaneous */
+/********************************************/
+
+extern inline void pinio_watchdog_reset (void)
{
}
diff --git a/include/platform/wpc-mmap.h b/include/platform/wpc-mmap.h
index 8b8f558ab..944068d2a 100644
--- a/include/platform/wpc-mmap.h
+++ b/include/platform/wpc-mmap.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2006-2010 by Brian Dominy
+ * Copyright 2006-2011 by Brian Dominy
*
* This file is part of FreeWPC.
*
diff --git a/include/platform/wpc.h b/include/platform/wpc.h
index 451cc0701..fe8293413 100644
--- a/include/platform/wpc.h
+++ b/include/platform/wpc.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2006-2010 by Brian Dominy
+ * Copyright 2006-2012 by Brian Dominy
*
* This file is part of FreeWPC.
*
@@ -39,38 +39,6 @@
* Memory usage
***************************************************************/
-#ifdef __m6809__
-
-/** AREA_DECL is used to expose a linker area name within the C
- * variable namespace. It appears an external name. The asm syntax
- * is needed so that the normal appending of an underscore does not
- * occur. */
-#define ASM_DECL(name) name asm (#name)
-#define AREA_DECL(name) extern U8 ASM_DECL (s_ ## name); extern U8 ASM_DECL (l_ ## name);
-
-/** Return the base address of a linker area. This has type (U8 *). */
-#define AREA_BASE(name) (&s_ ## name)
-
-/** Return the runtime size of a linker area. This has type U16.
- * This is not the maximum allowable space for the area, but rather
- * reflects how many actual variables have been mapped there. */
-#define AREA_SIZE(name) ((U16)(&l_ ## name))
-
-/* Define externs for all of these areas. AREA_BASE and AREA_SIZE can
- * only be called on these. */
-AREA_DECL(direct)
-AREA_DECL(ram)
-AREA_DECL(local)
-AREA_DECL(heap)
-AREA_DECL(stack)
-AREA_DECL(permanent)
-AREA_DECL(nvram)
-
-#else
-#define AREA_SIZE(name) 0
-#endif /* __m6809__ */
-
-
/** The total size of RAM -- 8K */
#define RAM_SIZE 0x2000UL
@@ -287,10 +255,10 @@ extern inline void pinio_dmd_window_flip (void)
#ifdef CONFIG_NATIVE
/* In native mode, the DMD is emulated using ordinary character
buffers. */
-extern U8 *linux_dmd_low_page;
-extern U8 *linux_dmd_high_page;
+extern U8 *pinio_dmd_low_page;
+extern U8 *pinio_dmd_high_page;
#define pinio_dmd_window_ptr(w) \
- ((w == PINIO_DMD_WINDOW_0) ? linux_dmd_low_page : linux_dmd_high_page)
+ ((w == PINIO_DMD_WINDOW_0) ? pinio_dmd_low_page : pinio_dmd_high_page)
#else
/* WPC can map up to 2 of the DMD pages into address space at
* 0x3800 and 0x3A00. Additionally, on WPC-95, 4 more pages
@@ -304,12 +272,6 @@ extern U8 *linux_dmd_high_page;
#endif
-/* Define addresses for the two page buffer locations we
- * call low and high. This define is DEPRECATED. */
-#define DMD_LOW_BASE pinio_dmd_window_ptr (PINIO_DMD_WINDOW_0)
-#define DMD_HIGH_BASE pinio_dmd_window_ptr (PINIO_DMD_WINDOW_1)
-
-
/**
* Set the given page as visible. It may or may not be
* mapped to one of the windows.
@@ -738,6 +700,13 @@ extern inline void pinio_write_gi (U8 val)
/********************************************/
#define PINIO_NUM_SOLS 48
+#define SOL_BASE_HIGH 0
+#define SOL_BASE_LOW 8
+#define SOL_BASE_GENERAL 16
+#define SOL_BASE_AUXILIARY 24
+#define SOL_BASE_FLIPTRONIC 32
+#define SOL_BASE_EXTENDED 40
+#define SOL_MIN_FLASHER 16
extern inline void pinio_write_solenoid_set (U8 set, U8 val)
{
@@ -770,16 +739,46 @@ extern inline void pinio_write_solenoid_set (U8 set, U8 val)
}
}
-extern inline void pinio_write_solenoid (U8 solno, U8 val)
-{
-}
-extern inline U8 pinio_read_solenoid (U8 solno)
+/** Return the hardware register that can be written
+to enable/disable a coil driver. */
+extern inline IOPTR sol_get_write_reg (U8 sol)
{
+ switch (sol / 8)
+ {
+ case 0:
+ return (IOPTR)WPC_SOL_HIGHPOWER_OUTPUT;
+ case 1:
+ return (IOPTR)WPC_SOL_LOWPOWER_OUTPUT;
+ case 2:
+ return (IOPTR)WPC_SOL_FLASHER_OUTPUT;
+ case 3:
+ return (IOPTR)WPC_SOL_GEN_OUTPUT;
+#if (MACHINE_WPC95 == 1)
+ case 4:
+ return (IOPTR)WPC95_FLIPPER_COIL_OUTPUT;
+#elif (MACHINE_FLIPTRONIC == 1)
+ case 4:
+ return (IOPTR)WPC_FLIPTRONIC_PORT_A;
+#endif
+#ifdef MACHINE_SOL_EXTBOARD1
+ case 5:
+ return (IOPTR)WPC_EXTBOARD1;
+#endif
+ }
return 0;
}
+/** Return nonzero if a solenoid's enable line is inverted; i.e.
+ * writing a 0 turns it on and writing a 1 turns it off.
+ */
+#if (MACHINE_WPC95 == 0)
+#define PINIO_SOL_INVERTED(sol) \
+ (((sol) >= SOL_BASE_FLIPTRONIC) && ((sol) < (SOL_BASE_FLIPTRONIC+8)))
+#endif
+
+
/********************************************/
/* Sound */
/********************************************/
@@ -835,6 +834,16 @@ extern inline U8 pinio_read_sound (void)
/* Switches */
/********************************************/
+#define WPC_SW_DIRECT 0
+#define WPC_SW_PLAYFIELD 8
+#define WPC_SW_FLIPTRONIC 72
+
+#if (MACHINE_FLIPTRONIC == 1)
+#define PINIO_NUM_SWITCHES 80
+#else
+#define PINIO_NUM_SWITCHES 72
+#endif
+
extern inline void pinio_write_switch_column (U8 val)
{
if (WPC_HAS_CAP (WPC_CAP_PIC))
diff --git a/include/platform/wpcsound.h b/include/platform/wpcsound.h
deleted file mode 100644
index ab12cd43c..000000000
--- a/include/platform/wpcsound.h
+++ /dev/null
@@ -1,244 +0,0 @@
-/*
- * Copyright 2008, 2009 by Brian Dominy
- *
- * This file is part of FreeWPC.
- *
- * FreeWPC is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * FreeWPC is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with FreeWPC; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef _WPCSOUND_H
-#define _WPCSOUND_H
-
-/* Memory map */
-
-#define WPCS_IOBASE 0x2000
-
-#define WPCS_ROM_BANK (WPCS_IOBASE + 0)
-#if 1
-#define WPCS_DEBUG_CONTROL (WPCS_IOBASE + 0x200)
-#define WPCS_DEBUG_DATA (WPCS_IOBASE + 0x201)
-#endif
-#define WPCS_FM_ADDR_STATUS (WPCS_IOBASE + 0x400)
-#define WPCS_FM_DATA (WPCS_IOBASE + 0x401)
-#define WPCS_DAC (WPCS_IOBASE + 0x800)
-
-/* Writing to this register sends 1 data bit to the CVSD.
-It is the LSB of the byte written. The input latch
-must be enabled by writing to WPCS_CVSD_CLK first. */
-#define WPCS_CVSD_DATA (WPCS_IOBASE + 0xC00)
-
-/* Read this register to get the last byte written by the host. */
-#define WPCS_HOST_INPUT (WPCS_IOBASE + 0x1000)
-
-/* Opens the CVSD input latch, so that a new bit can be
-clocked in. This must be written before writing WPCS_CVSD_DATA. */
-#define WPCS_CVSD_CLK (WPCS_IOBASE + 0x1400)
-
-/* Write this register to adjust the volume after mixing. */
-#define WPCS_EPOT (WPCS_IOBASE + 0x1800)
-
-/* Write this register to send a data byte back to the host. */
-#define WPCS_HOST_OUTPUT (WPCS_IOBASE + 0x1C00)
-
-/* When writing to the e-pot, bit 1 must be set in order for
-data to be clocked in. Bit 2 determines if the volume is
-increased or decreased. EPOT_MAX says what the maximum
-hardware supported volume is. */
-
-#define EPOT_LOUDER 0x0
-#define EPOT_SOFTER 0x2
-#define EPOT_CLOCK 0x1
-#define EPOT_MAX 128
-
-/* FM chip frequency */
-
-/** The number of cycles/sec that the FM operates at */
-#define FM_HZ 3579545ULL
-
-/** Generate the correct value to be written into a YM2151
- * timer register in order to produce an interrupt N times
- * per second. M is the maximum allowed value of the
- * timer: 1024 for timer A and 256 for timer B.
- */
-#define FM_TIMER_FOR_HZ(M,n) ((M) - (FM_HZ / 64 / (n)))
-
-
-/* FM chip (Yamaha 2151) registers */
-
-#define DEV_MOD1 0
-#define DEV_MOD2 1
-#define DEV_CAR1 2
-#define DEV_CAR2 3
-
-#define FM_ADDR_TEST 0x1
-
- #define FM_LFO_RESET 0x2
-
-#define FM_ADDR_KEY_ON 0x8
-
- #define FM_MOD1 0x40
- #define FM_CAR1 0x20
- #define FM_MOD2 0x10
- #define FM_CAR2 0x8
- #define FM_KEYCH_MASK 0x7
-
-#define FM_ADDR_NOISE_ENABLE 0xF
-
- #define FM_NOISE_ENABLE 0x80
- #define FM_NOISE_FREQ_MASK 0x1F
-
-#define FM_ADDR_CLOCK_A1 0x10
-#define FM_ADDR_CLOCK_A2 0x11
-#define FM_ADDR_CLOCK_B 0x12
-#define FM_ADDR_CLOCK_CTRL 0x14
-
- /* Values for writing to the clock control register */
- #define FM_TIMER_CSM 0x80
- #define FM_TIMER_FRESETB 0x20
- #define FM_TIMER_FRESETA 0x10
- #define FM_TIMER_IRQENB 0x08
- #define FM_TIMER_IRQENA 0x04
- #define FM_TIMER_LOADB 0x02
- #define FM_TIMER_LOADA 0x01
-
- /* Values for reading from the clock control register */
- #define FM_TIMER_ISTB 0x2
- #define FM_TIMER_ISTA 0x1
-
-#define FM_ADDR_LFRQ 0x18
-
-#define FM_ADDR_PMD_AMD 0x19
-
- #define FM_PMD_AMD_SELECT 0x80
- #define FM_SELECT_PMD 0x80
- #define FM_SELECT_AMD 0x0
-
-#define FM_ADDR_CT_W 0x1B
-
- #define FM_CT2 0x80
- #define FM_CT1 0x40
- #define FM_WAVE_SELECT 0x3
-
- #define FM_WAVE_SAW 0x0
- #define FM_WAVE_SQUARE 0x1
- #define FM_WAVE_TRIANGLE 0x2
- #define FM_WAVE_NOISE 0x3
-
-#define FM_ADDR_CHAN_CTRL 0x20
-
- #define FM_CHAN_RIGHT 0x80
- #define FM_CHAN_LEFT 0x40
- #define FM_FB_MASK 0x38
- #define FM_CONNECT_MASK 0x7
-
-#define FM_ADDR_KEYCODE(ch) (0x28 + (ch))
-
-#define FM_ADDR_KEYFRAC(ch) (0x30 + (ch))
-
-#define FM_ADDR_SENS(ch) (0x38 + (ch))
-
-#define FM_ADDR_DETUNE_MULT(dev,ch) (0x40 + 8 * (dev) + (ch))
-
-#define FM_ADDR_LEVEL(dev,ch) (0x60 + 8 * (dev) + (ch))
-
-#define FM_ADDR_ATTACK(dev,ch) (0x80 + 8 * (dev) + (ch))
-
-#define FM_ADDR_DECAY1(dev,ch) (0xA0 + 8 * (dev) + (ch))
-
-#define FM_ADDR_DECAY2(dev,ch) (0xC0 + 8 * (dev) + (ch))
-
-#define FM_ADDR_RELEASE(dev,ch) (0xE0 + 8 * (dev) + (ch))
-
-
-/* Inline Functions */
-
-extern inline void putchar (U8 c)
-{
- writeb (WPCS_DEBUG_DATA, c);
-}
-
-
-/**
- * Waits until the FM chip is ready to receive a new
- * read/write operation.
- */
-extern inline void fm_wait (void)
-{
- __asm__ volatile (
- "lda\t" C_STRING(WPCS_FM_DATA) "\n"
- "\tbmi\t.-3"
- );
-}
-
-
-extern inline void fm_write_inline (const U8 addr,
- const U8 val, const U8 in_interrupt)
-{
- if (!in_interrupt)
- disable_interrupts ();
-
- fm_wait ();
- writeb (WPCS_FM_ADDR_STATUS, addr);
- fm_wait ();
- writeb (WPCS_FM_DATA, val);
-
- if (!in_interrupt)
- enable_interrupts ();
-}
-
-
-extern inline U8 fm_read_inline (const U8 addr, const U8 in_interrupt)
-{
- U8 val;
-
- if (!in_interrupt)
- disable_interrupts ();
-
- fm_wait ();
- writeb (WPCS_FM_ADDR_STATUS, addr);
- fm_wait ();
- val = readb (WPCS_FM_DATA);
-
- if (!in_interrupt)
- enable_interrupts ();
-
- return val;
-}
-
-
-extern inline void fm_timera_config (const U16 hz)
-{
- fm_write_inline (FM_ADDR_CLOCK_A1, FM_TIMER_FOR_HZ(1024,hz) >> 2, 0);
- fm_write_inline (FM_ADDR_CLOCK_A2, FM_TIMER_FOR_HZ(1024,hz) & 0x03, 0);
-}
-
-
-/**
- * Program the FM timer register to generate a periodic
- * interrupt on the FIRQ.
- * This writes a value of 1014 to the TIMER_A1 register,
- * which causes about 5500 FIRQs/sec (5.5Khz). This
- * means that FIRQ is asserted about 6 times per
- * millisecond, or once every 350 CPU clock cycles.
- */
-extern inline void fm_timer_restart (const U8 in_interrupt)
-{
- fm_write_inline (FM_ADDR_CLOCK_CTRL,
- FM_TIMER_FRESETA + FM_TIMER_IRQENA + FM_TIMER_LOADA,
- in_interrupt);
-}
-
-
-#endif /* _WPCSOUND_H */
diff --git a/include/printf.h b/include/printf.h
index 5750febe7..d69272e4a 100644
--- a/include/printf.h
+++ b/include/printf.h
@@ -40,7 +40,7 @@ do { \
/** Access the next argument in the va_list 'va' with type 'type'. */
#ifdef CONFIG_NATIVE
-#define va_arg(va, type) ((va += sizeof (int)), (type *)(((int *)va)[-1]))
+#define va_arg(va, type) ((va += sizeof (int)), (type)(((int *)va)[-1]))
#else
#define va_arg(va, type) ((va += sizeof (type)), ((type *)va)[-1])
#endif
diff --git a/include/priority.h b/include/priority.h
index 5314ee375..9f93228cf 100644
--- a/include/priority.h
+++ b/include/priority.h
@@ -87,6 +87,7 @@ typedef enum _priority {
PRI_STATUS,
PRI_BONUS,
PRI_SHOOT_AGAIN,
+ PRI_VIDEO_MODE,
PRI_TILT,
PRI_GAME_OVER,
PRI_HSENTRY,
diff --git a/include/replay.h b/include/replay.h
index a55976e77..d1756ab9d 100644
--- a/include/replay.h
+++ b/include/replay.h
@@ -96,8 +96,8 @@ __common__ void replay_code_to_boost (score_t, U8);
#ifndef REPLAY_SCORE_DEFAULT
#define REPLAY_SCORE_MIN 10
#define REPLAY_SCORE_STEP 2
-#define REPLAY_SCORE_MAX 50
-#define REPLAY_SCORE_DEFAULT 20
+#define REPLAY_SCORE_MAX 500
+#define REPLAY_SCORE_DEFAULT 100
#define REPLAY_BOOST_MIN 1
#define REPLAY_BOOST_STEP 1
#define REPLAY_BOOST_MAX 10
diff --git a/include/search.h b/include/search.h
index 83d92220a..cb7b370fd 100644
--- a/include/search.h
+++ b/include/search.h
@@ -34,7 +34,7 @@ __common__ void ball_search_now (void);
#ifdef MACHINE_BALL_SEARCH_TIME
#define BS_TIMEOUT_DEFAULT MACHINE_BALL_SEARCH_TIME
#else
-#define BS_TIMEOUT_DEFAULT 15
+#define BS_TIMEOUT_DEFAULT 20
#endif
#endif /* _SEARCH_H */
diff --git a/include/stdadj.h b/include/stdadj.h
index 3ebe908c9..f0bc6ff43 100644
--- a/include/stdadj.h
+++ b/include/stdadj.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2006, 2007, 2008, 2009, 2010 by Brian Dominy
+ * Copyright 2006-2011 by Brian Dominy
*
* This file is part of FreeWPC.
*
@@ -179,16 +179,29 @@ typedef struct
adjval_t allow_chase_ball; /* done */
adjval_t family_mode;
+
#ifdef MACHINE_LAUNCH_SWITCH
adjval_t flipper_plunger;
adjval_t timed_plunger;
#endif
+
adjval_t game_music;
+
#ifdef CONFIG_TIMED_GAME
adjval_t timed_game;
#endif
+
adjval_t buy_extra_ball;
adjval_t coin_door_ball_save;
+
+#ifdef CONFIG_DIFFICULTY_LEVEL
+ adjval_t difficulty;
+#endif
+
+#ifdef CONFIG_DISABLE_CLAW
+ adjval_t disable_claw;
+#endif
+
} std_adj_t;
extern __nvram__ std_adj_t system_config;
@@ -214,7 +227,7 @@ extern __nvram__ std_adj_t system_config;
#define config_timed_plunger (system_config.timed_plunger)
#else
#define config_flipper_plunger OFF
-#define config_timed_plunger OFF
+#define config_timed_plunger ON
#endif
typedef struct
diff --git a/include/system/ac.h b/include/system/ac.h
index 4bcdafa29..eb1507f1f 100644
--- a/include/system/ac.h
+++ b/include/system/ac.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2006, 2008 by Brian Dominy
+ * Copyright 2006-2011 by Brian Dominy
*
* This file is part of FreeWPC.
*
diff --git a/include/system/baud.h b/include/system/baud.h
index 3efbff8c8..10798f1aa 100644
--- a/include/system/baud.h
+++ b/include/system/baud.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2006 by Brian Dominy
+ * Copyright 2006-2011 by Brian Dominy
*
* This file is part of FreeWPC.
*
diff --git a/include/system/bitarray.h b/include/system/bitarray.h
index 2b1887c18..b5d0fa239 100644
--- a/include/system/bitarray.h
+++ b/include/system/bitarray.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2006, 2007, 2008 by Brian Dominy
+ * Copyright 2006-2011 by Brian Dominy
*
* This file is part of FreeWPC.
*
@@ -24,9 +24,17 @@
typedef U8 *bitset;
typedef const U8 *const_bitset;
+#if defined(__m6809__) && !defined(CONFIG_PLATFORM_WPC)
+#define CONFIG_SINGLE_BIT_SET_ARRAY
+extern U8 single_bit_set_array[];
+#define single_bit_set(n) single_bit_set_array[n]
+#else
+#define single_bit_set(n) (1 << (n))
+#endif
+
#define bitarray_const_offset(bits, bitno) (bits[(bitno) / 8])
-#define bitarray_const_mask(bits, bitno) (1 << ((bitno) % 8))
+#define bitarray_const_mask(bits, bitno) single_bit_set ((bitno) % 8)
/* Non-optimized macros for twiddling bits.
*
@@ -85,14 +93,6 @@ typedef const U8 *const_bitset;
#define wpc_testbit(bs, index) \
WPC_BITOP (bs, index, "\tand%1\t,%0")
-#elif defined (CONFIG_PLATFORM_WHITESTAR) && defined (SHIFTER_FAILS)
-
-#define __bitarray_constant_p(bitno) 0
-#define wpc_setbit(bits,bitno) 0
-#define wpc_clearbit(bits,bitno) 0
-#define wpc_togglebit(bits,bitno) 0
-#define wpc_testbit(bits,bitno) 0
-
#else /* !CONFIG_PLATFORM_WPC */
#define __bitarray_constant_p(bitno) 1
diff --git a/include/system/debug.h b/include/system/debug.h
index 32d351a4a..1a5d85842 100644
--- a/include/system/debug.h
+++ b/include/system/debug.h
@@ -32,6 +32,8 @@ __common__ void db_periodic (void);
extern void (*puts_handler) (const char *s);
void puts_debug (const char *s);
void puts_parallel (const char *s);
+void puts_sim (const char *s);
+
/**
* CONFIG_BPT is used to turn on the embedded debugger.
diff --git a/include/system/deff.h b/include/system/deff.h
index a2fa1d4e5..d87894b28 100644
--- a/include/system/deff.h
+++ b/include/system/deff.h
@@ -28,6 +28,11 @@ typedef U8 deffnum_t;
/** Type for a display effect function */
typedef void (*deff_function_t) (void);
+#ifdef CONFIG_NO_DEFFS
+#define DEFF_FUNCTION(_func,_page) .fn=deff_exit, .page=SYS_PAGE
+#else
+#define DEFF_FUNCTION(_func,_page) .fn=_func, .page=_page
+#endif
/** The flags for a normal display effect with no special requirements */
#define D_NORMAL 0x0
@@ -102,7 +107,6 @@ void deff_restart (deffnum_t dn);
void deff_start_highest_priority (void);
__noreturn__ void deff_exit (void);
__noreturn__ void deff_delay_and_exit (task_ticks_t ticks);
-void deff_swap_low_high (S8 count, task_ticks_t delay);
void deff_start_bg (deffnum_t dn, enum _priority prio);
void deff_update (void);
void deff_start_sync (deffnum_t dn);
@@ -139,6 +143,7 @@ extern inline void deff_call_components (void)
}
+#ifdef CONFIG_DMD_OR_ALPHA
extern inline __noreturn__ void generic_deff (
const char *line1, const char *line2)
{
@@ -160,7 +165,7 @@ extern inline __noreturn__ void generic_deff (
task_sleep_sec (2);
deff_exit ();
}
-
+#endif
#ifndef MACHINE_CUSTOM_AMODE
void default_amode_deff (void);
diff --git a/include/system/device.h b/include/system/device.h
index 7b7c0e52f..d9cec065f 100644
--- a/include/system/device.h
+++ b/include/system/device.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2006, 2007, 2008, 2009, 2010 by Brian Dominy
+ * Copyright 2006-2011 by Brian Dominy
*
* This file is part of FreeWPC.
*
diff --git a/include/system/display.h b/include/system/display.h
index dfdea5058..7ed655d4a 100644
--- a/include/system/display.h
+++ b/include/system/display.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2008-2010 by Brian Dominy
+ * Copyright 2008-2011 by Brian Dominy
*
* This file is part of FreeWPC.
*
@@ -28,9 +28,7 @@
/* Portable display functions */
#define display_init dmd_init
#define display_alloc_low dmd_alloc_low
-#define display_alloc_high dmd_alloc_high
#define display_alloc_low_high dmd_alloc_pair
-#define display_map_low_high dmd_map_low_high
#define display_show_low dmd_show_low
#define display_show_high dmd_show_high
#define display_show_other dmd_show_other
@@ -54,9 +52,7 @@
/* Portable display functions */
#define display_init seg_init
#define display_alloc_low seg_alloc_low
-#define display_alloc_high seg_alloc_high
#define display_alloc_low_high seg_alloc_low_high
-#define display_map_low_high seg_map_low_high
#define display_show_low seg_show_low
#define display_show_high seg_show_high
#define display_show_other seg_show_other
@@ -75,7 +71,6 @@ use the DMD, redefine all of these functions to their alphanumeric
equivalents. */
#define dmd_init() seg_init ()
#define dmd_alloc_low() seg_alloc ()
-#define dmd_alloc_high() seg_alloc ()
#define dmd_alloc_pair() seg_alloc ()
#define dmd_map_low_high()
#define dmd_show_low() seg_show ()
@@ -114,16 +109,14 @@ text and centered it well. */
#define font_render_string_right(f,x,y,s) \
seg_write_string (y/16, ((x + 7UL) / 8) - seg_strlen (s), s)
-#else
+#elif (MACHINE_REMOTE_DISPLAY == 1)
/* Not DMD or alphanumeric */
/* Portable display functions */
#define display_init remote_dmd_init
#define display_alloc_low remote_dmd_alloc_low
-#define display_alloc_high remote_dmd_alloc_high
#define display_alloc_low_high remote_dmd_alloc_pair
-#define display_map_low_high remote_dmd_map_low_high
#define display_show_low remote_dmd_show_low
#define display_show_high remote_dmd_show_high
#define display_show_other remote_dmd_show_other
@@ -139,9 +132,7 @@ text and centered it well. */
#define dmd_init()
#define dmd_alloc_low(args...)
-#define dmd_alloc_high(args...)
#define dmd_alloc_pair(args...)
-#define dmd_map_low_high(args...)
#define dmd_show_low()
#define dmd_show_high()
#define dmd_show_other(args...)
diff --git a/include/system/dmd.h b/include/system/dmd.h
index b20f83bb2..56c0739ca 100644
--- a/include/system/dmd.h
+++ b/include/system/dmd.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2006-2010 by Brian Dominy
+ * Copyright 2006-2012 by Brian Dominy
*
* This file is part of FreeWPC.
*
@@ -30,8 +30,33 @@
#ifndef _SYS_DMD_H
#define _SYS_DMD_H
+/** The number of bits per pixel. On true DMD games this must be 1. */
+#ifndef PINIO_DMD_PIXEL_BITS
+#define PINIO_DMD_PIXEL_BITS 1
+#endif
+
+/** The display refresh rate, in frames per second.
+ The default here is for WPC games. */
+#ifndef PINIO_DMD_REFRESH_RATE
+#define PINIO_DMD_REFRESH_RATE 122
+#endif
+
+/* The number of colors per pixel */
+#ifndef PINIO_DMD_PIXEL_COLORS
+#define PINIO_DMD_PIXEL_COLORS 4
+#endif
+
+/** Page flipping is needed when we want to use more colors than we
+ * have bits per pixel */
+#if (PINIO_DMD_PIXEL_COLORS > 1 && PINIO_DMD_PIXEL_BITS == 1)
+#define PINIO_DMD_FLIP_COUNT (LOG2(PINIO_DMD_PIXEL_COLORS)+1)
+#define PINIO_DMD_EFFECTIVE_RATE (PINIO_DMD_REFRESH_RATE / PINIO_DMD_FLIP_COUNT)
+#else
+#define PINIO_DMD_EFFECTIVE_RATE PINIO_DMD_REFRESH_RATE
+#endif
+
/** The width of a DMD page, in bytes */
-#define DMD_BYTE_WIDTH (PINIO_DMD_WIDTH / 8)
+#define DMD_BYTE_WIDTH (PINIO_DMD_WIDTH * PINIO_DMD_PIXEL_BITS / 8)
/** The size of each DMD page, in bytes */
#define DMD_PAGE_SIZE (1UL * DMD_BYTE_WIDTH * PINIO_DMD_HEIGHT)
@@ -123,13 +148,16 @@ extern dmd_transition_t
trans_scroll_down,
trans_scroll_down_fast,
trans_scroll_left,
+ trans_scroll_left_fast,
trans_scroll_right,
+ trans_scroll_right_fast,
trans_sequential_boxfade,
trans_random_boxfade,
trans_vstripe_left2right,
trans_vstripe_right2left,
trans_bitfade_slow,
trans_bitfade_fast,
+ trans_bitfade_fastest,
trans_unroll_vertical
;
@@ -176,12 +204,12 @@ extern inline dmd_pagenum_t dmd_get_blank (const U8 num)
void dmd_init (void);
extern __fastram__ void (*dmd_rtt) (void);
void dmd_alloc_low (void);
-void dmd_alloc_high (void);
void dmd_alloc_pair (void);
void dmd_map_low_high (dmd_pagenum_t page);
void dmd_show_low (void);
void dmd_show_high (void);
void dmd_show_other (void);
+void deff_swap_low_high (S8 count, task_ticks_t delay);
void dmd_flip_low_high (void);
void dmd_show2 (void);
void dmd_clean_page (dmd_buffer_t dbuf);
@@ -202,6 +230,9 @@ void dmd_reset_transition (void);
void frame_draw (U16 id);
void frame_draw2 (U16 id);
void frame_draw_plane (U16 id);
+
+void frame_draw_plane_test (U16 id);
+
void bmp_draw (U8 x, U8 y, U16 id);
__transition__ void dmd_text_outline (void);
@@ -238,15 +269,14 @@ extern inline void dmd_map_overlay (void)
/*
* The parameters to a rough copy or erase operation.
- * The user parameters are given in terms of pixels, however these
- * must be converted into byte coordinates.
+ * The user parameters are completely given in terms of pixels.
+ * The x position and size are converted into a byte-based offset.
*/
struct dmd_rough_args
{
U8 *dst;
- U8 bwidth;
- U8 height;
+ union dmd_coordinate size;
};
@@ -263,8 +293,7 @@ struct dmd_rough_args
extern struct dmd_rough_args dmd_rough_args; \
dmd_rough_args.dst = pinio_dmd_window_ptr (PINIO_DMD_WINDOW_1) + \
((x) / CHAR_BIT) + (U16)(y) * DMD_BYTE_WIDTH; \
- dmd_rough_args.bwidth = (w) / CHAR_BIT; \
- dmd_rough_args.height = h; \
+ dmd_rough_args.size.xy = MKCOORD1 ((w) / CHAR_BIT, (h)); \
dmd_rough_copy1 (); \
} while (0)
@@ -283,8 +312,7 @@ __transition__ void dmd_rough_copy1 (void);
extern struct dmd_rough_args dmd_rough_args; \
dmd_rough_args.dst = pinio_dmd_window_ptr (PINIO_DMD_WINDOW_0) + \
((x) / CHAR_BIT) + (U16)(y) * DMD_BYTE_WIDTH; \
- dmd_rough_args.bwidth = (w) / CHAR_BIT; \
- dmd_rough_args.height = h; \
+ dmd_rough_args.size.xy = MKCOORD1 ((w) / CHAR_BIT, (h)); \
dmd_rough_erase1 (); \
} while (0)
@@ -305,8 +333,7 @@ __transition__ void dmd_rough_erase1 (void);
extern struct dmd_rough_args dmd_rough_args; \
dmd_rough_args.dst = pinio_dmd_window_ptr (PINIO_DMD_WINDOW_0) + \
((x) / CHAR_BIT) + (y) * DMD_BYTE_WIDTH; \
- dmd_rough_args.bwidth = (w) / CHAR_BIT; \
- dmd_rough_args.height = h; \
+ dmd_rough_args.size.xy = MKCOORD1 ((w) / CHAR_BIT, (h)); \
dmd_rough_invert1 (); \
} while (0)
diff --git a/include/system/errno.h b/include/system/errno.h
index ed38d973b..c3bb13a84 100644
--- a/include/system/errno.h
+++ b/include/system/errno.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2006-2010 by Brian Dominy
+ * Copyright 2006-2011 by Brian Dominy
*
* This file is part of FreeWPC.
*
@@ -21,6 +21,13 @@
#ifndef _SYS_ERRNO_H
#define _SYS_ERRNO_H
+/* Error codes are left unchanged as long as they are in use;
+ please don't change the numbering without a good reason.
+ It is easy to remember what some of the numbers mean, and
+ having to re-learn this often isn't productive.
+
+ Many older codes have been deleted; those slots can be reused
+ for other purposes later. */
#define ERR_NO_FREE_TASKS 1 /* Too many tasks are running */
#define ERR_TASK_STACK_OVERFLOW 2 /* A process overflowed its stack */
@@ -32,16 +39,10 @@
#define ERR_SWI3 8 /* SWI3 was taken */
#define ERR_IDLE_CANNOT_SLEEP 9
#define ERR_IDLE_CANNOT_EXIT 10
-#define ERR_INVALID_LAMP_NUM 11
-#define ERR_NO_FREE_TIMERS 12
-#define ERR_DEFF_QUEUE_FULL 13
#define ERR_TASK_KILL_FAILED 14
#define ERR_NOT_IMPLEMENTED_YET 15
-#define ERR_UNPRINTABLE_CHAR 16
#define ERR_TASK_LOCKUP 18
-#define ERR_REAL_HARDWARE 19
#define ERR_NVRAM_UNLOCKED 20
-#define ERR_SOL_CKSUM_ERROR 21
#define ERR_UNLOCK_EMPTY_DEVICE 23
#define ERR_LOCK_FULL_DEVICE 24
#define ERR_INVALID_LEFF_CONFIG 25
@@ -49,18 +50,15 @@
#define ERR_KICK_TOO_MANY 27
#define ERR_KICK_CAUSED_INCREASE 28
#define ERR_IDLE_BALL_LOST 29
-#define ERR_DEVICE_NO_CHANGE 30
#define ERR_CANT_GET_HERE 31
#define ERR_INVALID_IO_ADDR 32
#define ERR_SCORE_NOT_IN_GAME 33
-#define ERR_NO_MORE_SLOW_TIMERS 34
#define ERR_WINDOW_STACK_OVERFLOW 35
#define ERR_LIBC_ABORT 36
#define ERR_MALLOC 37
#define ERR_MUST_BE_LEFF 38
#define ERR_INVALID_MATRIX 39
#define ERR_TASK_STACK_UNDERFLOW 40
-#define ERR_SWITCH_QUEUE_CORRUPT 42
#define ERR_SOL_REQUEST 43
#define ERR_VIRTUAL_DEVICE_COUNT 44
#define ERR_FAILED_DEFF 45
diff --git a/include/system/font.h b/include/system/font.h
index 69e604fcd..e3b0d0dab 100644
--- a/include/system/font.h
+++ b/include/system/font.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2006-2010 by Brian Dominy
+ * Copyright 2006-2011 by Brian Dominy
*
* This file is part of FreeWPC.
*
@@ -101,7 +101,7 @@ void fontargs_render_string_right (const char *);
void fontargs_render_string_left (const char *);
void bitmap_blit (const U8 *blit_data, U8 x, U8 y);
void bitmap_blit2 (const U8 *blit_data, U8 x, U8 y);
-void bitmap_draw (union dmd_coordinate coord, U8 c);
+void fontargs_render_glyph (U8 c);
/**
* Helper macros for packing two 8-bit coordinates
@@ -152,4 +152,18 @@ do { \
fontargs_render_string_right (s); \
} while (0)
+
+#define font_render_glyph(f,x,y,c) \
+do { \
+ DECL_FONTARGS(f,x,y,sprintf_buffer); \
+ fontargs_render_glyph (c); \
+} while (0)
+
+#define bitmap_draw(_coord, _c) \
+do { \
+ font_args.font = &font_symbol; \
+ font_args.coord = _coord; \
+ fontargs_render_glyph (_c); \
+} while (0)
+
#endif /* _SYS_FONT_H */
diff --git a/include/system/io.h b/include/system/io.h
new file mode 100644
index 000000000..f1f18186f
--- /dev/null
+++ b/include/system/io.h
@@ -0,0 +1,72 @@
+/*
+ * Copyright 2006-2012 by Brian Dominy
+ *
+ * This file is part of FreeWPC.
+ *
+ * FreeWPC is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * FreeWPC is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with FreeWPC; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef __SYSTEM_IO_H
+#define __SYSTEM_IO_H
+
+/* Default I/O accessor functions writeb() and readb().
+ *
+ * On memory-mapped I/O platforms, define CONFIG_MMIO and use the memory-
+ * mapped address as your I/O address (IOPTR). Then readb() and writeb()
+ * will work for both the target platform, and for the simulator.
+ *
+ * On other platforms, you should test CONFIG_SIM in your platform header
+ * and only call readb/writeb in simulation. Then it is up to you to
+ * decide how to do the I/O on a real target. If you don't mind function
+ * call overhead, you can also just set CONFIG_CALLIO and then define
+ * your own implementation of readb/writeb to do the right thing.
+ */
+
+#ifdef CONFIG_MMIO
+extern inline void writeb (IOPTR addr, U8 val)
+{
+ *(volatile U8 *)addr = val;
+ barrier ();
+}
+#elif defined(CONFIG_CALLIO) || defined(CONFIG_NATIVE)
+void writeb (IOPTR addr, U8 val);
+#else
+#error
+#endif
+
+extern inline void writew (IOPTR addr, U16 val)
+{
+#ifdef CONFIG_MMIO
+ *(volatile U16 *)addr = val;
+ barrier ();
+#else
+ writeb (addr, val >> 8);
+ writeb (addr+1, val & 0xFF);
+#endif
+}
+
+
+#ifdef CONFIG_MMIO
+extern inline U8 readb (IOPTR addr)
+{
+ return *(volatile U8 *)addr;
+}
+#elif defined(CONFIG_CALLIO) || defined(CONFIG_NATIVE)
+U8 readb (IOPTR addr);
+#else
+#error
+#endif
+
+#endif /* __SYSTEM_IO_H */
diff --git a/include/system/irq.h b/include/system/irq.h
index 3e3d78893..e5d93fc7d 100644
--- a/include/system/irq.h
+++ b/include/system/irq.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2006, 2007, 2008 by Brian Dominy
+ * Copyright 2006-2012 by Brian Dominy
*
* This file is part of FreeWPC.
*
@@ -31,22 +31,40 @@
#define disable_firq() m6809_orcc (CC_FIRQ)
#define enable_firq() m6809_andcc (~CC_FIRQ)
-/** How to enable/disable all interrupts */
-#define disable_interrupts() m6809_orcc (CC_IRQ|CC_FIRQ)
-#define enable_interrupts() m6809_andcc (~(CC_IRQ|CC_FIRQ))
+#ifdef CONFIG_PLATFORM_WPC
+#define rtt_disable() do { disable_irq(); disable_firq(); } while (0)
+#define rtt_enable() do { enable_irq(); enable_firq(); } while (0)
+#else
+#ifdef CONFIG_PERIODIC_IRQ
+#define rtt_disable() disable_irq()
+#define rtt_enable() enable_irq()
+#endif
+#ifdef CONFIG_PERIODIC_FIRQ
+#define rtt_disable() disable_firq()
+#define rtt_enable() enable_firq()
+#endif
+#endif
-#else /* __m6809__ */
+#endif /* __m6809__ */
+
+#ifdef CONFIG_NATIVE
extern bool linux_irq_enable;
extern bool linux_firq_enable;
#define disable_irq() linux_irq_enable = FALSE;
#define disable_firq() linux_firq_enable = FALSE;
+
#define enable_irq() linux_irq_enable = TRUE;
#define enable_firq() linux_firq_enable = TRUE;
-#define disable_interrupts() do { disable_irq(); disable_firq(); } while (0)
-#define enable_interrupts() do { enable_irq(); enable_firq(); } while (0)
-#endif /* __m6809__ */
+#define rtt_disable() disable_irq()
+#define rtt_enable() enable_irq()
+
+#endif /* CONFIG_NATIVE */
+
+/* For compatibility with the older names used */
+#define disable_interrupts() rtt_disable()
+#define enable_interrupts() rtt_enable()
#endif /* _SYS_IRQ_H */
diff --git a/include/system/lamp.h b/include/system/lamp.h
index dd4f3eb52..76111f2a7 100644
--- a/include/system/lamp.h
+++ b/include/system/lamp.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2006, 2007, 2008, 2009, 2010 by Brian Dominy
+ * Copyright 2006-2011 by Brian Dominy
*
* This file is part of FreeWPC.
*
@@ -50,10 +50,13 @@ typedef const lampnum_t lamplist_t[];
/** Lampsets are identified by small integers */
typedef U8 lamplist_id_t;
+/** The set of all lamps, with one bit for each */
+typedef U8 lamp_set[NUM_LAMP_COLS];
-extern __fastram__ U8 lamp_matrix[NUM_LAMP_COLS];
-extern U8 lamp_flash_matrix[NUM_LAMP_COLS];
-extern __fastram__ U8 lamp_flash_matrix_now[NUM_LAMP_COLS];
+
+extern __fastram__ lamp_set lamp_matrix;
+extern lamp_set lamp_flash_matrix;
+extern __fastram__ lamp_set lamp_flash_matrix_now;
extern U8 bit_matrix[BITS_TO_BYTES (MAX_FLAGS)];
extern U8 global_bits[BITS_TO_BYTES (MAX_GLOBAL_FLAGS)];
@@ -83,12 +86,8 @@ typedef enum
void lamp_init (void);
void lamp_flash_rtt (void);
-void lamp_rtt_0 (void);
-void lamp_rtt_1 (void);
-void lamp_rtt_2 (void);
-void lamp_rtt_3 (void);
-__attribute__((pure)) U8 *matrix_lookup (lamp_matrix_id_t id);
+__pure__ U8 *matrix_lookup (lamp_matrix_id_t id);
void lamp_on (lampnum_t lamp);
void lamp_off (lampnum_t lamp);
@@ -105,34 +104,18 @@ void leff_toggle (lampnum_t lamp);
bool leff_test (lampnum_t lamp);
-extern inline void flag_on (const U8 f)
-{
- bitarray_set (bit_matrix, f);
- log_event (SEV_INFO, MOD_LAMP, EV_BIT_ON, f);
-}
+#define flag_on(f) bit_on (bit_matrix, __addrval(&f))
+#define flag_off(f) bit_off (bit_matrix, __addrval(&f))
+#define flag_toggle(f) bit_toggle (bit_matrix, __addrval(&f))
+#define flag_test(f) bit_test (bit_matrix, __addrval(&f))
-extern inline void flag_off (const U8 f)
-{
- bitarray_clear (bit_matrix, f);
- log_event (SEV_INFO, MOD_LAMP, EV_BIT_OFF, f);
-}
+#define global_flag_on(gf) bit_on (global_bits, __addrval(&gf))
+#define global_flag_off(gf) bit_off (global_bits, __addrval(&gf))
+#define global_flag_toggle(gf) bit_toggle (global_bits, __addrval(&gf))
+#define global_flag_test(gf) bit_test (global_bits, __addrval(&gf))
-extern inline void flag_toggle (const U8 f)
-{
- bitarray_toggle (bit_matrix, f);
- log_event (SEV_INFO, MOD_LAMP, EV_BIT_TOGGLE, f);
-}
-
-extern inline bool flag_test (const U8 f)
-{
- return bitarray_test (bit_matrix, f);
-}
-
-
-#define global_flag_on(lamp) bitarray_set (global_bits, lamp)
-#define global_flag_off(lamp) bitarray_clear (global_bits, lamp)
-#define global_flag_toggle(lamp) bitarray_toggle (global_bits, lamp)
-#define global_flag_test(lamp) bitarray_test (global_bits, lamp)
+#define flag_test_and_set(f) \
+ ({ U8 result = flag_test (f); if (!result) { flag_on (f); } result; })
#define lamp_tristate_on(lamp) \
do { lamp_flash_off(lamp); lamp_on(lamp); } while (0)
@@ -185,7 +168,12 @@ void lamplist_rotate_previous (lamplist_id_t id, bitset matrix);
void lamplist_set_count (lamplist_id_t set, U8 count);
bool lamplist_test_all (lamplist_id_t id, lamp_boolean_operator_t op);
-__attribute__((noinline)) void matrix_all_on (bitset matrix);
-__attribute__((noinline)) void matrix_all_off (bitset matrix);
+__attribute__((noinline)) void lamp_set_on (lamp_set matrix);
+
+void lamp_set_zero (lamp_set dst);
+void lamp_set_copy (lamp_set dst, const lamp_set src);
+void lamp_set_add (lamp_set dst, const lamp_set src);
+void lamp_set_subtract (lamp_set dst, const lamp_set src);
+bool lamp_set_disjoint (const lamp_set a, const lamp_set b);
#endif /* _SYS_LAMP_H */
diff --git a/include/system/leff.h b/include/system/leff.h
index 9553f0940..cff7f3716 100644
--- a/include/system/leff.h
+++ b/include/system/leff.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2006, 2007, 2008, 2009 by Brian Dominy
+ * Copyright 2006-2011 by Brian Dominy
*
* This file is part of FreeWPC.
*
@@ -130,12 +130,5 @@ __noreturn__ void leff_exit (void);
void leff_init (void);
void leff_stop_all (void);
-#ifndef MACHINE_SHOOT_AGAIN_LAMP
-#define MACHINE_SHOOT_AGAIN_LAMP 0
-#endif
-#ifndef MACHINE_BALL_SAVE_LAMP
-#define MACHINE_BALL_SAVE_LAMP MACHINE_SHOOT_AGAIN_LAMP
-#endif
-
#endif /* _SYS_LEFF_H */
diff --git a/include/system/platform.h b/include/system/platform.h
new file mode 100644
index 000000000..b86573c86
--- /dev/null
+++ b/include/system/platform.h
@@ -0,0 +1,80 @@
+
+#ifndef __SYS_PLATFORM_H
+#define __SYS_PLATFORM_H
+
+extern __fastram__ switch_bits_t sw_raw;
+extern __fastram__ switch_bits_t sw_edge;
+extern __fastram__ switch_bits_t sw_stable;
+extern __fastram__ switch_bits_t sw_unstable;
+extern __fastram__ switch_bits_t sw_logical;
+
+extern inline void platform_switch_input (const U8 col, U8 value)
+{
+ sw_raw[col] = value;
+}
+
+extern inline void platform_switch_debounce (const U8 col)
+{
+ U8 edge = sw_raw[col] ^ sw_logical[col];
+ sw_stable[col] |= edge & sw_edge[col];
+ sw_unstable[col] |= ~edge & sw_stable[col];
+ sw_edge[col] = edge;
+}
+
+extern __fastram__ U8 lamp_matrix[NUM_LAMP_COLS];
+extern __fastram__ U8 lamp_leff1_matrix[NUM_LAMP_COLS];
+extern __fastram__ U8 lamp_leff1_allocated[NUM_LAMP_COLS];
+extern __fastram__ U8 lamp_leff2_matrix[NUM_LAMP_COLS];
+extern __fastram__ U8 lamp_leff2_allocated[NUM_LAMP_COLS];
+extern __fastram__ U8 lamp_strobe_mask;
+extern __fastram__ U8 lamp_strobe_column;
+extern __fastram__ U8 lamp_power_timer;
+extern U8 lamp_power_level;
+extern U16 lamp_power_idle_timer;
+
+extern inline U8 platform_lamp_compute (const U8 col)
+{
+ /* Grab the default lamp values */
+ U8 bits = lamp_matrix[col];
+
+ /* OR in the flashing lamp values. These are guaranteed to be
+ * zero for any lamps where the flash is turned off.
+ * Otherwise, these bits are periodically inverted by the
+ * (slower) flash rtt function above.
+ * This means that for the flash to work, the default bit
+ * must be OFF when the flash bit is ON. (Use the tristate
+ * macros to ensure this.)
+ */
+ bits |= lamp_flash_matrix_now[col];
+
+ /* TODO : implement lamp strobing, like the newer Stern games
+ do. Implement like DMD page flipping, alternating between 2
+ different lamp matrices rapidly to present 4 different
+ intensities. A background task, like the flash_rtt above,
+ would toggle the intensities at a slower rate. */
+
+ /* Override with the lamp effect lamps.
+ * Leff2 bits are low priority and used for long-running
+ * lamp effects. Leff1 is higher priority and used
+ * for quick effects. Therefore leff2 is applied first,
+ * and leff1 may override it.
+ */
+
+
+/*
+ bits &= leff_free_set[col];
+ bits |= (leff_data_set[col] & ~leff_free_set[col]);
+ return bits;
+*/
+ // old code
+ bits &= lamp_leff2_allocated[col];
+ bits |= lamp_leff2_matrix[col];
+ bits &= lamp_leff1_allocated[col];
+ bits |= lamp_leff1_matrix[col];
+ return bits;
+ //
+}
+
+extern __fastram__ U8 sol_duty_mask;
+
+#endif /* __SYS_PLATFORM_H */
diff --git a/include/system/rtc.h b/include/system/rtc.h
index 15b6ae77a..32e5a938b 100644
--- a/include/system/rtc.h
+++ b/include/system/rtc.h
@@ -59,6 +59,8 @@ __common__ void rtc_begin_modify (void);
__common__ void rtc_end_modify (U8 cancel_flag);
__common__ void rtc_next_field (void);
__common__ void rtc_modify_field (U8 up_flag);
+#ifndef timestamp_update
__common__ void timestamp_update (struct date *timestamp);
+#endif
#endif /* _RTC_H */
diff --git a/include/system/segment.h b/include/system/segment.h
index 86b40f15a..9c91f09bb 100644
--- a/include/system/segment.h
+++ b/include/system/segment.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2005-2009 by Brian Dominy
+ * Copyright 2005-2011 by Brian Dominy
*
* This file is part of FreeWPC.
*
@@ -110,6 +110,7 @@ void seg_alloc_clean (void);
void seg_copy_low_to_high (void);
void seg_show (void);
void seg_show_other (void);
+void deff_swap_low_high (S8 count, task_ticks_t delay);
void dmd_rtt (void);
void seg_sched_transition (seg_transition_t *trans);
void seg_reset_transition (void);
diff --git a/include/system/sol.h b/include/system/sol.h
index 0e5baa59f..62a3b9c49 100644
--- a/include/system/sol.h
+++ b/include/system/sol.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2006, 2007, 2008, 2009, 2010 by Brian Dominy
+ * Copyright 2006-2012 by Brian Dominy
*
* This file is part of FreeWPC.
*
@@ -24,20 +24,14 @@
typedef U8 solnum_t;
#ifndef PINIO_NUM_SOLS
-#error "SOL_COUNT renamed to PINIO_NUM_SOLS"
+#error "PINIO_NUM_SOLS undefined"
#endif
-#define SOL_REG_COUNT (PINIO_NUM_SOLS / 8)
+#define SOL_REG_COUNT MULTIPLEOF8(PINIO_NUM_SOLS)
-/* TODO - these are WPC specific */
-#define SOL_BASE_HIGH 0
-#define SOL_BASE_LOW 8
-#define SOL_BASE_GENERAL 16
-#define SOL_BASE_AUXILIARY 24
-#define SOL_BASE_FLIPTRONIC 32
-#define SOL_BASE_EXTENDED 40
-
-#define SOL_MIN_FLASHER 16
+#ifndef SOL_MIN_FLASHER
+#define SOL_MIN_FLASHER 0
+#endif
extern __fastram__ U8 sol_timers[];
extern U8 sol_duty_state[];
@@ -75,7 +69,8 @@ void sol_init (void);
/* sol_start is a wrapper function, because the 'time' value must be scaled
to the correct resolution. Ticks are normally 1 per 16ms, but
we need 1 per 4ms for solenoids, so scale accordingly. */
-__attribute__((deprecated)) extern inline void sol_start (U8 sol, U8 mask, U8 time)
+__attribute_deprecated__
+extern inline void sol_start (U8 sol, U8 mask, U8 time)
{
sol_start_real (sol, mask, (4 * time));
}
@@ -129,63 +124,21 @@ extern inline U8 *sol_get_read_reg (const solnum_t sol)
}
-/** Return the hardware register that can be written
-to enable/disable a coil driver. */
-extern inline IOPTR sol_get_write_reg (solnum_t sol)
-{
- switch (sol / 8)
- {
-#ifdef CONFIG_PLATFORM_WPC
- case 0:
- return (IOPTR)WPC_SOL_HIGHPOWER_OUTPUT;
- case 1:
- return (IOPTR)WPC_SOL_LOWPOWER_OUTPUT;
- case 2:
- return (IOPTR)WPC_SOL_FLASHER_OUTPUT;
- case 3:
- return (IOPTR)WPC_SOL_GEN_OUTPUT;
- case 4:
-#if (MACHINE_WPC95 == 1)
- return (IOPTR)WPC95_FLIPPER_COIL_OUTPUT;
-#elif (MACHINE_FLIPTRONIC == 1)
- return (IOPTR)WPC_FLIPTRONIC_PORT_A;
-#endif
-#ifdef MACHINE_SOL_EXTBOARD1
- case 5:
- return (IOPTR)WPC_EXTBOARD1;
-#endif
-#endif /* CONFIG_PLATFORM_WPC */
- default:
- fatal (ERR_SOL_REQUEST);
- return (IOPTR)0;
- }
-}
-
-
/** Return the bit position in a hardware register
or memory variable that corresponds to a particular
coil driver. */
extern inline U8 sol_get_bit (const solnum_t sol)
{
- return 1 << (sol % 8);
+ return single_bit_set (sol % 8);
}
-/** Return nonzero if a solenoid's enable line is
- * inverted; i.e. writing a 0 turns it on and
- * writing a 1 turns it off.
+/*
+ * Turn on a solenoid driver immediately.
+ * It will remain on indefinitely.
+ * The hardware may not be updated instantly, however, depending
+ * on the platform driver.
*/
-extern inline U8 sol_inverted (const solnum_t sol)
-{
-#if (MACHINE_WPC95 == 1)
- return 0;
-#else
- return (sol >= 32) && (sol < 40);
-#endif
-}
-
-
-/** Turn on a solenoid driver immediately. */
extern inline void sol_enable (const solnum_t sol)
{
U8 *r = sol_get_read_reg (sol);
@@ -193,7 +146,11 @@ extern inline void sol_enable (const solnum_t sol)
}
-/** Turn off a solenoid driver immediately. */
+/*
+ * Turn off a solenoid driver immediately.
+ * The hardware may not be updated instantly, however, depending
+ * on the platform driver.
+ */
extern inline void sol_disable (const solnum_t sol)
{
U8 *r = sol_get_read_reg (sol);
diff --git a/include/system/sound.h b/include/system/sound.h
index 8fcc7daaf..bbdf5039a 100644
--- a/include/system/sound.h
+++ b/include/system/sound.h
@@ -116,7 +116,7 @@ typedef U16 sound_cmd_t;
#define MIN_VOLUME 0
#define MAX_VOLUME 31
-#define DEFAULT_VOLUME 8
+#define DEFAULT_VOLUME 12
/** Returned by the sound board when the last sound clip finishes. */
#define SND_FINISHED 0x80
@@ -136,4 +136,8 @@ bool sound_version_render (void);
void volume_reset (void);
void volume_refresh (void);
+U8 get_volume (void);
+void lower_volume (void);
+
+
#endif /* _SYS_SOUND_H */
diff --git a/include/system/switch.h b/include/system/switch.h
index 86f1ef075..39e0418aa 100644
--- a/include/system/switch.h
+++ b/include/system/switch.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2006-2010 by Brian Dominy
+ * Copyright 2006-2011 by Brian Dominy
*
* This file is part of FreeWPC.
*
@@ -82,34 +82,28 @@ extern const U8 mach_edge_switches[];
/** Returns the container ID that a switch belongs to */
#define SW_GET_DEVICE(sw) (sw->devno - 1)
-#define NUM_PF_SWITCHES 64
-
-#define NUM_DEDICATED_SWITCHES 8
-
/** On a pre-Fliptronic game, the flipper button switches are in
the ordinary 8x8 switch matrix. On Fliptronic games, these are
accessed separately and tracked in a "9th" switch column internally.
Define SW_LEFT_BUTTON and SW_RIGHT_BUTTON to the correct values
depending on the system type. */
+#ifdef CONFIG_PLATFORM_WPC
#if (MACHINE_FLIPTRONIC == 1)
-#define NUM_FLIPTRONIC_SWITCHES 8
#define SW_LEFT_BUTTON SW_L_L_FLIPPER_BUTTON
#define SW_RIGHT_BUTTON SW_L_R_FLIPPER_BUTTON
#else
-#define NUM_FLIPTRONIC_SWITCHES 0
#define SW_LEFT_BUTTON SW_LEFT_FLIPPER
#define SW_RIGHT_BUTTON SW_RIGHT_FLIPPER
#endif
+#endif
-#define NUM_SWITCHES (NUM_DEDICATED_SWITCHES + NUM_PF_SWITCHES + NUM_FLIPTRONIC_SWITCHES)
+#define NUM_SWITCHES PINIO_NUM_SWITCHES
#define SWITCH_BITS_SIZE (NUM_SWITCHES / 8)
#define SW_COL(x) ((x) >> 3)
#define SW_ROW(x) ((x) & 0x07)
-#define SW_ROWMASK(x) (1 << SW_ROW(x))
-
-#define MAKE_SWITCH(col,row) (((col) * 8) + (row) - 1)
+#define SW_ROWMASK(x) single_bit_set (SW_ROW(x))
/** The form for a matrix of bits, one per switch */
@@ -245,8 +239,8 @@ void switch_idle (void);
bool switch_poll (const switchnum_t sw);
bool switch_is_opto (const switchnum_t sw);
bool switch_poll_logical (const switchnum_t sw);
-const switch_info_t *switch_lookup (const switchnum_t sw) __attribute__((pure));
-U8 switch_lookup_lamp (const switchnum_t sw) __attribute__((pure));
+const switch_info_t *switch_lookup (const switchnum_t sw) __pure__;
+U8 switch_lookup_lamp (const switchnum_t sw) __pure__;
void switch_queue_dump (void);
#if (MACHINE_PIC == 1)
diff --git a/include/system/task.h b/include/system/task.h
index e32e8e8ea..e03d8f179 100644
--- a/include/system/task.h
+++ b/include/system/task.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2006, 2007, 2008, 2009, 2010 by Brian Dominy
+ * Copyright 2006-2011 by Brian Dominy
*
* This file is part of FreeWPC.
*
@@ -34,15 +34,24 @@ extern bool task_dispatching_ok;
#define TASK_DURATION_TEST 0x8
#ifdef CONFIG_NATIVE
-
#include
+#define USECS_PER_TICK (16000 / linux_irq_multiplier)
+#if defined(CONFIG_PTH)
#include
-
typedef pth_t task_pid_t;
+#elif defined(CONFIG_PTHREADS)
+#undef __noreturn__
+#include
+#define __noreturn__ __attribute__((noreturn))
+typedef pthread_t task_pid_t;
+#else
+typedef int task_pid_t;
+#endif
+
typedef unsigned int task_gid_t;
typedef unsigned int task_ticks_t;
typedef void (*task_function_t) (void);
-extern void task_set_rom_page (task_pid_t pid, U8 rom_page);
+#define task_set_rom_page(pid, page)
#else /* !CONFIG_NATIVE */
@@ -248,10 +257,12 @@ void do_periodic (void);
#define task_kill_peers() task_kill_gid (task_getgid ())
/** Yield control to another task, but do not impose a minimum sleep time. */
-#ifdef CONFIG_NATIVE
-#define task_yield() pth_yield(0)
+#if defined(CONFIG_PTH)
+#define task_yield() pth_yield(0)
+#elif defined(CONFIG_PTHREADS)
+#define task_yield() sched_yield()
#else
-#define task_yield() task_sleep (0)
+#define task_yield() task_sleep (0)
#endif
/** Sleep for an integer number of seconds */
diff --git a/include/system/time.h b/include/system/time.h
index 1113b8f66..83dbfee58 100644
--- a/include/system/time.h
+++ b/include/system/time.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2005-2010 by Brian Dominy
+ * Copyright 2005-2011 by Brian Dominy
*
* This file is part of FreeWPC.
*
diff --git a/include/system/triac.h b/include/system/triac.h
index 593d49333..83152acaa 100644
--- a/include/system/triac.h
+++ b/include/system/triac.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2006-2010 by Brian Dominy
+ * Copyright 2006-2011 by Brian Dominy
*
* This file is part of FreeWPC.
*
@@ -32,15 +32,18 @@ per AC cycle */
typedef U8 triacbits_t;
+#ifdef CONFIG_TRIAC
void triac_rtt (void);
+void gi_dim (U8 bits, U8 brightness);
+void gi_leff_dim (U8 bits, U8 brightness);
+#endif
+
void gi_enable (triacbits_t bits);
void gi_disable (triacbits_t bits);
void gi_leff_allocate (U8 triac);
void gi_leff_free (U8 triac);
void gi_leff_enable (U8 triac);
void gi_leff_disable (U8 triac);
-void gi_dim (U8 bits, U8 brightness);
-void gi_leff_dim (U8 bits, U8 brightness);
void gi_init (void);
diff --git a/include/system/watchdog.h b/include/system/watchdog.h
new file mode 100644
index 000000000..c29be3b12
--- /dev/null
+++ b/include/system/watchdog.h
@@ -0,0 +1,9 @@
+#ifndef __SYS_WATCHDOG_H
+#define __SYS_WATCHDOG_H
+
+#ifndef CONFIG_HARDWARE_WATCHDOG
+#define pinio_watchdog_reset()
+#endif
+
+#endif /* __SYS_WATCHDOG_H */
+
diff --git a/include/t2/sound.h b/include/t2/sound.h
deleted file mode 100644
index deb72911d..000000000
--- a/include/t2/sound.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright 2006, 2007 by Brian Dominy
- *
- * This file is part of FreeWPC.
- *
- * FreeWPC is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * FreeWPC is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with FreeWPC; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef _T2_SOUND_H
-#define _T2_SOUND_H
-
-#define MUS_T2_PLUNGER 0x2
-#define MUS_T2_IN_PLAY 0x3
-#define MUS_JACKPOT_LIT 0x4
-#define MUS_JACKPOT_WON 0x5
-#define MUS_MULTIBALL 0x6
-#define MUS_JACKPOT_SHOT 0x7
-#define MUS_SUPER_JACKPOT_WON 0x8
-#define MUS_HURRY_UP1 0x9
-#define MUS_HURRY_UP2 0xA
-#define MUS_SUPER_JACKPOT_SHOT 0xB
-#define MUS_UNKNOWN_C 0xC
-#define MUS_END_OF_BALL 0x10
-#define MUS_HELICOPTER 0x30
-#define SND_BOOM 0x31
-#define SND_WHOOSH 0x81
-#define SND_SPLAT 0x82
-#define SND_REVVING 0x83
-#define SND_DATABASE_CLICK 0x84
-#define SND_DATABASE_BEEP1 0x85
-#define SND_DATABASE_BEEP2 0x86
-#define SND_DATABASE_BEEP3 0x87
-#define SND_INLANE_1 0x8A
-#define SND_INLANE_2 0x8B
-#define SND_SKILL_SHOT_TICK 0x93
-#define SND_LOOP 0x9D
-#define SND_JACKPOT_COLLECT 0xA3
-#define SND_GUN_CLICK 0xA7
-#define SND_TARGET_1 0xAB
-#define SND_TARGET_2 0xAC
-#define SND_TARGET_3 0xAD
-#define SND_TARGET_4 0xAE
-#define SND_TARGET_5 0xAF
-#define SND_EXTRA_BALL_COLLECT 0xB7
-#define SND_TILT_WARNING 0xC1
-#define SND_TILT 0xC2
-#define SND_VIDEO_MODE_SHOT 0xD0
-
-#define SND_COPTER_1 0x100
-#define SND_SLING 0x101
-#define SND_BIKE_1 0x10A
-#define SND_BIKE_2 0x10B
-#define SND_RAMP_ENTRY 0x10C
-#define SND_RAMP_MADE 0x110
-#define SAY_FIRE_AT_WILL 0x113
-#define SAY_YOU_MISSED 0x114
-#define SAY_DIRECT_HIT 0x115
-#define SAY_ILL_BE_BACK 0x11D
-#define SAY_LOAD_THE_CANNON 0x129
-#define SAY_SHOOT_AGAIN 0x12A
-#define SAY_JUDGMENT_DAY 0x12F
-#define SAY_NO 0x139
-#define SAY_WHOOPDEE_DOO 0x140
-#define SND_T2_LOGO 0x141
-
-
-
-
-
-#endif /* _T2_SOUND_H */
diff --git a/include/test.h b/include/test.h
index f0e11507b..38c992a71 100644
--- a/include/test.h
+++ b/include/test.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2006, 2007, 2008, 2009, 2010 by Brian Dominy
+ * Copyright 2006-2011 by Brian Dominy
*
* This file is part of FreeWPC.
*
@@ -118,6 +118,7 @@ enum test_mode
#endif
};
+
extern enum test_mode in_test;
extern inline void set_test_mode (enum test_mode mode)
@@ -131,6 +132,7 @@ extern struct adjustment pricing_adjustments[];
extern struct adjustment hstd_adjustments[];
extern struct adjustment printer_adjustments[];
extern struct adjustment debug_adjustments[];
+extern struct adjustment modify_game_adjustments[];
extern struct adjustment empty_adjustments[];
__test2__ const struct adjustment *adj_get (U8 num);
@@ -157,7 +159,6 @@ typedef enum
AUDIT_TYPE_TOTAL_EARNINGS,
AUDIT_TYPE_AVG_PER_GAME,
AUDIT_TYPE_AVG_PER_BALL,
- AUDIT_TYPE_LONGINT,
AUDIT_TYPE_TIMESTAMP,
AUDIT_TYPE_TIME_PER_BALL,
AUDIT_TYPE_TIME_PER_CREDIT,
diff --git a/include/timedmode.h b/include/timedmode.h
index 2784ae7a3..f57a721a6 100644
--- a/include/timedmode.h
+++ b/include/timedmode.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2008-2010 by Brian Dominy
+ * Copyright 2008-2011 by Brian Dominy
*
* This file is part of FreeWPC.
*
@@ -101,6 +101,7 @@ struct timed_mode_task_config
void timed_mode_begin (struct timed_mode_ops *ops);
void timed_mode_end (struct timed_mode_ops *ops);
+void timed_mode_end2 (struct timed_mode_ops *ops);
U8 timed_mode_get_timer (struct timed_mode_ops *ops);
void timed_mode_reset (struct timed_mode_ops *ops, U8 time);
void timed_mode_add (struct timed_mode_ops *ops, U8 time);
diff --git a/include/timer.h b/include/timer.h
index 15b0afe47..2f6d1d1a5 100644
--- a/include/timer.h
+++ b/include/timer.h
@@ -25,8 +25,6 @@
* has an unrolled loop that requires this. */
#define MAX_FREE_TIMERS (4 * ((MAX_TIMERS + 3) / 4))
-typedef U8 free_timer_id_t;
-
task_pid_t timer_restart (task_gid_t gid, U16 ticks, task_function_t fn);
task_pid_t timer_start1 (task_gid_t gid, U16 ticks, task_function_t fn);
task_pid_t timer_start (task_gid_t gid, U16 ticks, task_function_t fn);
@@ -36,12 +34,18 @@ void timer_lock (void);
void timer_unlock (void);
bool system_timer_pause (void);
void timer_pause_second (void);
-void free_timer_restart (free_timer_id_t tid, U8 ticks);
-void free_timer_start (free_timer_id_t tid, U8 ticks);
-void free_timer_stop (free_timer_id_t tid);
-U8 free_timer_test (free_timer_id_t tid);
+
+void __free_timer_restart (U8 tid, U8 ticks);
+void __free_timer_start (U8 tid, U8 ticks);
+void __free_timer_stop (U8 tid);
+U8 __free_timer_test (U8 tid);
void free_timer_init (void);
+#define free_timer_restart(tid, ticks) __free_timer_restart (__addrval (&tid), ticks)
+#define free_timer_start(tid, ticks) __free_timer_start (__addrval (&tid), ticks)
+#define free_timer_stop(tid) __free_timer_stop(__addrval (&tid))
+#define free_timer_test(tid) __free_timer_test(__addrval (&tid))
+
#define timer_kill_gid task_kill_gid
#define timer_kill_pid task_kill_pid
#define timer_find_gid task_find_gid
diff --git a/kernel/Makefile b/kernel/Makefile
index 374a44272..e26671b9d 100644
--- a/kernel/Makefile
+++ b/kernel/Makefile
@@ -1,12 +1,15 @@
+ifndef CONFIG_GEN_RTT
SYSTEM_SCHEDULE := kernel/system.sched
SCHED_SRC := build/sched_irq.c
SCHED_OBJ := $(SCHED_SRC:.c=.o)
+endif
# Basic kernel modules are generic and do not depend on
# the machine type at all.
KERNEL_BASIC_OBJS += $(if $(CONFIG_DMD), kernel/frame.o)
KERNEL_BASIC_OBJS += kernel/idle.o
+KERNEL_BASIC_OBJS += kernel/lang.o
KERNEL_BASIC_OBJS += kernel/log.o
KERNEL_BASIC_OBJS += kernel/mbmode.o
KERNEL_BASIC_OBJS += kernel/misc.o
@@ -23,9 +26,11 @@ KERNEL_SW_OBJS += $(if $(CONFIG_FONT), kernel/font.o)
KERNEL_SW_OBJS += kernel/game.o
KERNEL_SW_OBJS += kernel/ladder.o
KERNEL_SW_OBJS += kernel/lamplist.o
+KERNEL_SW_OBJS += kernel/lampset.o
KERNEL_SW_OBJS += kernel/player.o
KERNEL_SW_OBJS += kernel/printf.o
-KERNEL_SW_OBJS += $(if $(CONFIG_WHITESTAR),,kernel/score.o)
+KERNEL_SW_OBJS += kernel/score.o
+KERNEL_SW_OBJS += kernel/task.o
# Hardware kernel modules are incredibly hardware dependent,
# and are subject to change on different hardware platforms.
@@ -40,13 +45,13 @@ KERNEL_HW_OBJS += kernel/csum.o
KERNEL_HW_OBJS += $(if $(CONFIG_DMD),kernel/dmd.o)
KERNEL_HW_OBJS += kernel/error.o
KERNEL_HW_OBJS += kernel/file.o
-KERNEL_HW_OBJS += $(if $(CONFIG_WHITESTAR),,kernel/flip.o)
+KERNEL_HW_OBJS += kernel/flip.o
KERNEL_HW_OBJS += kernel/freetimer.o # could be KERNEL_SW_OBJS
# except for RTT.
KERNEL_HW_OBJS += kernel/init.o
KERNEL_HW_OBJS += kernel/lamp.o
KERNEL_HW_OBJS += kernel/leff.o # why not KERNEL_SW_OBJS?
-KERNEL_HW_OBJS += kernel/message.o
+KERNEL_HW_OBJS += $(if $(CONFIG_DMD_OR_ALPHA), kernel/message.o)
KERNEL_HW_OBJS += $(if $(CONFIG_ALPHA),kernel/segment.o)
KERNEL_HW_OBJS += kernel/sol.o
KERNEL_HW_OBJS += kernel/sound.o
diff --git a/kernel/ac.c b/kernel/ac.c
index a338741c1..62655950a 100644
--- a/kernel/ac.c
+++ b/kernel/ac.c
@@ -61,6 +61,7 @@ U8 ac_zerocross_errors;
/**
* Real-time function that checks to see if we are currently at a
* zero crossing point. */
+/* RTT(name=ac_rtt freq=1) */
void ac_rtt (void)
{
if (unlikely (zc_status == ZC_INITIALIZING))
diff --git a/kernel/adj.c b/kernel/adj.c
index 8934887cf..ab388d902 100644
--- a/kernel/adj.c
+++ b/kernel/adj.c
@@ -52,6 +52,12 @@ reason function is in a different ROM page, and we can't
yet store far pointers. */
void adj_csum_failure (void)
{
+ sound_start (ST_ANY, SPCH_PLAYER_ONE, SL_1S, PRI_GAME_QUICK5);
+ task_sleep (TIME_500MS);
+ task_sleep (TIME_500MS);
+ task_sleep (TIME_500MS);
+ task_sleep (TIME_500MS);
+
adj_reset_all ();
}
diff --git a/kernel/deff.c b/kernel/deff.c
index 1798cc494..ee77f772a 100644
--- a/kernel/deff.c
+++ b/kernel/deff.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2006-2010 by Brian Dominy
+ * Copyright 2006-2011 by Brian Dominy
*
* This file is part of FreeWPC.
*
@@ -67,6 +67,11 @@ U8 deff_running;
/** The priority of the running display effect */
U8 deff_prio;
+/** Display effect data management (see deffdata.h) */
+U8 deff_data_pending[MAX_DEFF_DATA];
+U8 deff_data_pending_count;
+U8 deff_data_active[MAX_DEFF_DATA];
+U8 deff_data_active_count;
#define MAX_QUEUED_DEFFS 8
@@ -107,8 +112,10 @@ U8 deff_get_active (void)
static void deff_stop_task (void)
{
deff_debug ("deff_stop_task\n");
+#ifdef CONFIG_DMD
/* TODO : if (!task_find_gid (GID_DEFF_EXITING)) -- not working yet */
dmd_reset_transition ();
+#endif
kickout_unlock (KLOCK_DEFF);
}
@@ -129,9 +136,11 @@ static void deff_start_task (const deff_t *deff)
kickout_lock (KLOCK_DEFF);
/* If this deff wants to show the last score, hold
- * on to that value */
+ * on to that value. Newer deffs can use the deff data
+ * functions to load arbitrary data, not just scores. */
if (deff->flags & D_SCORE)
score_deff_set ();
+ deff_data_load ();
/* Create a task for the new deff */
tp = task_create_gid (GID_DEFF, deff->fn);
@@ -276,6 +285,14 @@ void deff_queue_service (void)
}
}
+ /* Delay updating background effect briefly, to allow
+ synchronous callers to do something else */
+ if (task_getgid () == GID_DEFF_EXITING)
+ {
+ dbprintf ("deff_update delayed on exit\n");
+ task_sleep (TIME_133MS);
+ }
+
/* No queued effect can run now, so try a background update */
deff_update ();
}
@@ -393,21 +410,6 @@ __noreturn__ void deff_delay_and_exit (task_ticks_t ticks)
}
-/** Called from a deff when it wants to toggle between two images
- * on the low and high mapped pages, both in mono mode.
- * COUNT is the number of times to toggle.
- * DELAY is how long to wait between each change. */
-void deff_swap_low_high (S8 count, task_ticks_t delay)
-{
- dmd_show_low ();
- while (--count >= 0)
- {
- dmd_show_other ();
- task_sleep (delay);
- }
-}
-
-
/** Lower the priority of the currently running display effect.
This may cause it to be preempted by something more important. */
void deff_nice (enum _priority prio)
@@ -443,8 +445,10 @@ void deff_stop_all (void)
deff_running = deff_prio = 0;
deff_queue_reset ();
+#ifdef CONFIG_DMD_OR_ALPHA
dmd_alloc_low_clean ();
dmd_show_low ();
+#endif
deff_init ();
}
@@ -483,6 +487,10 @@ void deff_update (void)
{
deffnum_t previous;
+#ifdef CONFIG_NO_DEFFS
+ return;
+#endif
+
/* If there is a transient effect running, then
don't try anything. We'll update the background automatically
when the foreground exits. */
@@ -517,11 +525,16 @@ void deff_update (void)
/** Start a display effect and wait for it to finish before returning. */
void deff_start_sync (deffnum_t dn)
{
- deff_start (dn);
- if (deff_get_active () != dn)
- nonfatal (ERR_FAILED_DEFF);
+ U8 n;
+ for (n=0; n < 24; n++)
+ {
+ deff_start (dn);
+ if (deff_get_active () == dn)
+ break;
+ task_sleep (TIME_166MS);
+ }
while (deff_get_active () == dn)
- task_sleep (TIME_100MS);
+ task_sleep (TIME_66MS);
}
diff --git a/kernel/dmd.c b/kernel/dmd.c
index 66ad74d5a..aacdc609e 100644
--- a/kernel/dmd.c
+++ b/kernel/dmd.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2006-2010 by Brian Dominy
+ * Copyright 2006-2011 by Brian Dominy
*
* This file is part of FreeWPC.
*
@@ -136,6 +136,9 @@ U8 dmd_phase_table[] = {
0, 1, 1, 0, 1, 1
};
+#if PINIO_DMD_PIXEL_BITS == 8
+U8 dmd_current_color;
+#endif
void dmd_new_rtt (void)
{
@@ -156,6 +159,9 @@ void dmd_init (void)
dmd_phase_ptr = dmd_phase_table;
dmd_in_transition = FALSE;
dmd_transition = NULL;
+#if PINIO_DMD_PIXEL_BITS == 8
+ dmd_current_color = 1;
+#endif
/* If DMD_BLANK_PAGE_COUNT is defined, this says how
* many DMD pages should not be allocatable, but should be
@@ -241,29 +247,8 @@ static __attribute__((noinline)) dmd_pagenum_t dmd_alloc (void)
}
-/**
- * Allocate and map a single page, for a mono image.
- *
- * Since the image is mono, we map the same page into both the low
- * and high pages.
- */
-void dmd_alloc_low (void)
-{
- pinio_dmd_window_set (PINIO_DMD_WINDOW_0,
- dmd_alloc ());
- pinio_dmd_window_set (PINIO_DMD_WINDOW_1,
- pinio_dmd_window_get (PINIO_DMD_WINDOW_0));
-}
-
-
-/** Allocate and map a single page, into the 'high' region. */
-void dmd_alloc_high (void)
-{
- pinio_dmd_window_set (PINIO_DMD_WINDOW_1, dmd_alloc ());
-}
-
-
/** Map a consecutive display page pair into windows 0 & 1 */
+__attribute__((noinline))
void dmd_map_low_high (dmd_pagenum_t page)
{
pinio_dmd_window_set (PINIO_DMD_WINDOW_0, page);
@@ -276,12 +261,25 @@ void dmd_map_low_high (dmd_pagenum_t page)
*/
void dmd_alloc_pair (void)
{
- pinio_dmd_window_set (PINIO_DMD_WINDOW_0, dmd_alloc ());
- pinio_dmd_window_set (PINIO_DMD_WINDOW_1,
- pinio_dmd_window_get (PINIO_DMD_WINDOW_0) + 1);
+ dmd_pagenum_t page = dmd_alloc ();
+ dmd_map_low_high (page);
+}
+
+/**
+ * Allocate and map a single page, for a mono image.
+ */
+void dmd_alloc_low (void)
+{
+ if (0) {
+ dmd_pagenum_t page = dmd_alloc ();
+ pinio_dmd_window_set (PINIO_DMD_WINDOW_0, page);
+ pinio_dmd_window_set (PINIO_DMD_WINDOW_1, page);
+ }
+ dmd_alloc_pair ();
}
+
/**
* Show a mono image. Program the hardware to display the
* page that is currently mapped into the low page. The same
@@ -336,6 +334,20 @@ void dmd_show_other (void)
dmd_visible_pages.pair ^= 0x0101;
}
+/** Called from a deff when it wants to toggle between two images
+ * on the low and high mapped pages, both in mono mode.
+ * COUNT is the number of times to toggle.
+ * DELAY is how long to wait between each change. */
+void deff_swap_low_high (S8 count, task_ticks_t delay)
+{
+ dmd_show_low ();
+ while (--count >= 0)
+ {
+ dmd_show_other ();
+ task_sleep (delay);
+ }
+}
+
/**
* Show a 4-color image.
@@ -382,7 +394,11 @@ void dmd_clean_page (dmd_buffer_t dbuf)
void dmd_fill_page_low (void)
{
+#if PINIO_DMD_PIXEL_BITS == 1
memset (dmd_low_buffer, 0xFF, DMD_PAGE_SIZE);
+#else
+ memset (dmd_low_buffer, dmd_current_color, DMD_PAGE_SIZE);
+#endif
}
diff --git a/kernel/error.c b/kernel/error.c
index e9036bd11..b975fedca 100644
--- a/kernel/error.c
+++ b/kernel/error.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2006, 2007, 2008, 2009, 2010 by Brian Dominy
+ * Copyright 2006-2011 by Brian Dominy
*
* This file is part of FreeWPC.
*
@@ -44,6 +44,7 @@ __permanent__ bool new_fatal_error;
* used. (Even better, it should "task_yield" and let other tasks
* run for a while.)
*/
+/* RTT(name=lockup_check_rtt freq=128) */
void lockup_check_rtt (void)
{
#ifndef CONFIG_NATIVE
@@ -86,6 +87,7 @@ void fatal (errcode_t error_code)
#endif
/* TODO - this whole function needs porting to Whitestar */
+ /* Maybe just call platform_init again? */
#ifdef CONFIG_PLATFORM_WPC
if (WPC_HAS_CAP (WPC_CAP_FLIPTRONIC))
wpc_write_flippers (0);
@@ -93,6 +95,7 @@ void fatal (errcode_t error_code)
#ifdef CONFIG_TICKET
pinio_write_ticket (0);
#endif
+ pinio_disable_flippers ();
pinio_write_solenoid_set (0, 0);
pinio_write_solenoid_set (1, 0);
pinio_write_solenoid_set (2, 0);
@@ -107,15 +110,21 @@ void fatal (errcode_t error_code)
audit_assign (&system_audits.lockup1_pid_lef, task_getgid ());
log_event (SEV_ERROR, MOD_SYSTEM, EV_SYSTEM_FATAL, error_code);
- /* Dump all of the task information to the debugger port. */
+ /* Dump all debugging information */
#ifdef DEBUGGER
dbprintf ("Fatal error %d\n", error_code);
db_dump_all ();
#endif
- /* In simulation, exit whenever a fatal occurs. */
-#ifdef CONFIG_NATIVE
+ /* In native mode, exit whenever a fatal occurs. If the
+ simulator is compiled in, let it clean up first. */
+#ifdef CONFIG_SIM
sim_exit (error_code);
+#else
+#ifdef CONFIG_NATIVE
+ native_exit ();
+ exit (error_code);
+#endif
#endif
/* Defining STOP_ON_ERROR is helpful during debugging a problem.
diff --git a/kernel/flip.c b/kernel/flip.c
index e0ac7aa91..94c86a1c5 100644
--- a/kernel/flip.c
+++ b/kernel/flip.c
@@ -182,10 +182,23 @@ void fliptronic_rtt (void)
flipper_service (WPC_LL_FLIP_SW, WPC_LL_FLIP_EOS, WPC_LL_FLIP_POWER, WPC_LL_FLIP_HOLD);
flipper_service (WPC_LR_FLIP_SW, WPC_LR_FLIP_EOS, WPC_LR_FLIP_POWER, WPC_LR_FLIP_HOLD);
+//like on demolition man - upper flipper switch will activate lower flippers
+#ifdef MACHINE_HAS_FLIPPER_GUN_HANDLES
+ flipper_service (WPC_UL_FLIP_SW, WPC_LL_FLIP_EOS, WPC_LL_FLIP_POWER, WPC_LL_FLIP_HOLD);
+ flipper_service (WPC_UR_FLIP_SW, WPC_LR_FLIP_EOS, WPC_LR_FLIP_POWER, WPC_LR_FLIP_HOLD);
+#endif
+
+
/* Some machines use the upper flipper coils for other uses.
* Those can already be handled by the regular solenoid module. */
#ifdef MACHINE_HAS_UPPER_LEFT_FLIPPER
+ //- upper flipper switch will activate upper flippers
flipper_service (WPC_UL_FLIP_SW, WPC_UL_FLIP_EOS, WPC_UL_FLIP_POWER, WPC_UL_FLIP_HOLD);
+
+ //like on demolition man - lower flipper switch will activate upper flippers
+#ifdef MACHINE_HAS_FLIPPER_GUN_HANDLES
+ flipper_service (WPC_LL_FLIP_SW, WPC_UL_FLIP_EOS, WPC_UL_FLIP_POWER, WPC_UL_FLIP_HOLD);
+#endif
#endif
#ifdef MACHINE_HAS_UPPER_RIGHT_FLIPPER
diff --git a/kernel/font.c b/kernel/font.c
index 5ea306b3f..00b0e0949 100644
--- a/kernel/font.c
+++ b/kernel/font.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2006, 2007, 2008, 2009, 2010 by Brian Dominy
+ * Copyright 2006-2011 by Brian Dominy
*
* This file is part of FreeWPC.
*
@@ -71,9 +71,6 @@ __fastram__ const U8 *bitmap_src;
#endif
-extern const font_t font_bitmap_common;
-
-
/* Returns a pointer to the glyph data for a character 'c'
* in the font 'font'. This points directly to the raw bytes
* that can be ORed into the display.
@@ -136,6 +133,7 @@ static inline void font_blit_internal (U8 *dst, U8 byte_width, const U8 shift)
register const U8 *src = bitmap_src;
do {
+#if (PINIO_DMD_PIXEL_BITS == 1)
if (shift == 0)
{
*dst ^= *src;
@@ -145,6 +143,18 @@ static inline void font_blit_internal (U8 *dst, U8 byte_width, const U8 shift)
dst[0] ^= *src << shift;
dst[1] = (*src >> (8-shift)) ^ dst[1];
}
+#elif (PINIO_DMD_PIXEL_BITS == 8)
+ if (*src & 0x01) dst[shift+0] = 0x01; /* TODO - current color */
+ if (*src & 0x02) dst[shift+1] = 0x01;
+ if (*src & 0x04) dst[shift+2] = 0x01;
+ if (*src & 0x08) dst[shift+3] = 0x01;
+ if (*src & 0x10) dst[shift+4] = 0x01;
+ if (*src & 0x20) dst[shift+5] = 0x01;
+ if (*src & 0x40) dst[shift+6] = 0x01;
+ if (*src & 0x80) dst[shift+7] = 0x01;
+#else
+#error
+#endif
src++;
bitmap_src = src;
@@ -415,15 +425,10 @@ void fontargs_render_string_right (const char *s)
fontargs_render_string ();
}
-
-/** Draw a bitmap from the 'symbol' font onto the display.
-The character selects which symbol to be drawn. */
-void bitmap_draw (union dmd_coordinate coord, U8 c)
+void fontargs_render_glyph (U8 c)
{
sprintf_buffer[0] = c;
sprintf_buffer[1] = '\0';
- font_args.font = &font_bitmap_common;
- font_args.coord = coord;
fontargs_render_string ();
}
diff --git a/kernel/frame.c b/kernel/frame.c
index d8e5c269d..8fe6ff19d 100644
--- a/kernel/frame.c
+++ b/kernel/frame.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2006-2010 by Brian Dominy
+ * Copyright 2006-2011 by Brian Dominy
*
* This file is part of FreeWPC.
*
@@ -28,7 +28,6 @@
*/
#include
-#include
/**
* The way that images are accessed is very different in 6809 vs. native mode.
diff --git a/kernel/freetimer.c b/kernel/freetimer.c
index 591181043..a4342b5f0 100644
--- a/kernel/freetimer.c
+++ b/kernel/freetimer.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2007, 2008 by Brian Dominy
+ * Copyright 2007-2011 by Brian Dominy