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 * * This file is part of FreeWPC. * @@ -51,8 +51,11 @@ static inline U8 *free_timer_update (U8 *timer_ptr) /** Realtime timer update function. Each timer value is simply decremented by 1 tick (33ms) if it is nonzero. */ +/* RTT(name=free_timer_rtt freq=32) */ void free_timer_rtt (void) { + if (MAX_FREE_TIMERS == 0) + return; U8 *timer_ptr = free_timers; do { timer_ptr = free_timer_update (timer_ptr); @@ -64,7 +67,7 @@ void free_timer_rtt (void) /** Restart a timer. */ -void free_timer_restart (free_timer_id_t tid, U8 ticks) +void __free_timer_restart (U8 tid, U8 ticks) { ticks /= 2; free_timers[tid] = ticks; @@ -72,7 +75,7 @@ void free_timer_restart (free_timer_id_t tid, U8 ticks) /** Start a timer. If it is already started, do nothing. */ -void free_timer_start (free_timer_id_t tid, U8 ticks) +void __free_timer_start (U8 tid, U8 ticks) { if (free_timers[tid] == 0) { @@ -83,14 +86,14 @@ void free_timer_start (free_timer_id_t tid, U8 ticks) /** Stop a timer. */ -void free_timer_stop (free_timer_id_t tid) +void __free_timer_stop (U8 tid) { free_timers[tid] = 0; } /** Test the value of a timer. */ -U8 free_timer_test (free_timer_id_t tid) +U8 __free_timer_test (U8 tid) { return free_timers[tid] / 2; } diff --git a/kernel/game.c b/kernel/game.c index a61b3dfda..783308138 100644 --- a/kernel/game.c +++ b/kernel/game.c @@ -1,5 +1,5 @@ /* - * Copyright 2006, 2007, 2008, 2009, 2010 by Brian Dominy + * Copyright 2006, 2007, 2008, 2009, 2010, 2011 by Brian Dominy * * This file is part of FreeWPC. * @@ -26,6 +26,7 @@ #include #include #include +#include /** * \file @@ -65,6 +66,11 @@ __fastram__ U8 in_bonus; /** Nonzero if the current game is currently in tilt mode */ __fastram__ U8 in_tilt; +/* Equivalent to (win_top != NULL), but as a byte, this can + * be tested with a single instruction. + * IDEA: these two variables could be overlapped into a union. */ +__fastram__ enum test_mode in_test; + /** Nonzero if the current ball has reached valid playfield; i.e. * ball loss is allowed to end the ball. When zero, * ball loss is not allowed and will result in a new ball being @@ -91,6 +97,9 @@ U8 timed_game_timer; U8 timed_game_suspend_count; void start_ball (void); +void end_ball (void); +void end_ball2 (void); +void end_ball_task (void); /** Starts the attract mode */ @@ -135,50 +144,65 @@ void dump_game (void) #endif + + /** Handles the end game condition. * This is called directly from the trough update function during * endball. It is also called by test mode when it starts up. */ -void end_game (void) -{ +static void end_game_task (void) { U8 was_in_game = in_game; - /* Common stop/end game logic */ stop_game (); /* From here, it is possible to restart a new game and interrupt all of the following effects */ - - if (was_in_game) - { + if (was_in_game) { /* Kill the flippers in case still enabled */ flipper_disable (); /* If in test mode now (i.e. the game was aborted by pressing Enter), then skip over the end game effects. */ - if (!in_test) - { - deff_start_sync (DEFF_SCORES_IMPORTANT); + if (!in_test) { + callset_invoke (end_game);//this will also start end game music high_score_check (); callset_invoke (extra_initials_check); match_start (); + callset_invoke (fade_out); log_event (SEV_INFO, MOD_GAME, EV_STOP, 0); - callset_invoke (end_game); - } - } + deff_start_sync (DEFF_SCORES_IMPORTANT); + }//end of if (!in_test) + }//end of if (was_in_game) task_sleep (TIME_33MS); /* not needed? */ lamp_all_off (); /* Return to attract mode, unless the game was aborted to enter test mode */ - if (!in_test) - { + if (!in_test) { deff_start (DEFF_GAME_OVER); - amode_start (); + amode_start (); //this kills sounds } + task_exit (); +}//end of function + + + + +/* To limit stack size, spawn this in a separate + * task context. We are already nested pretty deeply here, and + * end game effects will need to sleep to do synchronous deffs. I've + * observed stack overflow here when running the stress test. + * Ensure that this task doesn't get killed due to any duration + * change - notably entering test mode. */ +void end_game (void) { + task_remove_duration (TASK_DURATION_GAME); + task_create_gid1 (GID_END_GAME, end_game_task); + task_sleep (TIME_16MS); } + + /** * Handle end-of-ball. This is called from the ball device * subsystem whenever it detects that the number of balls in play @@ -232,31 +256,44 @@ void end_ball (void) /* If the ball was not tilted, start bonus. */ in_bonus = TRUE; - music_disable (); - if (!in_tilt) - callset_invoke (bonus); - - /* 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 (TIM_IGNORE_TILT)) - task_sleep (TIME_100MS); - - /* Cancel the tilt effects */ -#ifdef DEFF_TILT - deff_stop (DEFF_TILT); -#endif -#ifdef LEFF_TILT - leff_stop (LEFF_TILT); -#endif - in_tilt = FALSE; + //music_disable (); + if (!in_tilt) { + if (flag_test(FLAG_BACK_IN_THE_FRIDGE_ENDING) ) callset_invoke (bitf_end); + else callset_invoke (bonus); } + else callset_invoke (bonus_complete); // if tilted, player gets no bonus + + //create a task to monitor bonus -- if bonus exits + //properly then it will continue to serve the next ball + //if not then this timer will send the ball eventually + task_create_gid1 (GID_END_BALL_TASK, end_ball_task); /* Stop tasks that should run only until end-of-ball. */ task_remove_duration (TASK_DURATION_BALL); task_duration_expire (TASK_DURATION_BALL); + + /* End the endball task */ + task_exit (); +}//end of function + + + +void end_ball_task (void) { + task_sleep_sec(20); + end_ball2 (); + task_exit(); +}//end of function + + + +CALLSET_ENTRY(game, bonus_complete){ + task_kill_gid(GID_END_BALL_TASK); + end_ball2 (); +}//end of function + + + +void end_ball2 (void) { in_bonus = FALSE; /* If the player has extra balls stacked, then start the @@ -264,14 +301,14 @@ void end_ball (void) if (decrement_extra_balls ()) { #ifdef DEFF_SHOOT_AGAIN - deff_start_sync (DEFF_SHOOT_AGAIN); + deff_start (DEFF_SHOOT_AGAIN); #endif #ifdef LEFF_SHOOT_AGAIN leff_start (LEFF_SHOOT_AGAIN); #endif callset_invoke (shoot_again); start_ball (); - goto done; + return; } /* If this is the last ball of the game for this player, @@ -283,7 +320,7 @@ void end_ball (void) { callset_invoke (buyin_start_ball); start_ball (); - goto done; + return; } else { @@ -302,7 +339,7 @@ void end_ball (void) { player_restore (); start_ball (); - goto done; + return; } else { @@ -322,23 +359,15 @@ void end_ball (void) if (ball_up <= system_config.balls_per_game) { start_ball (); - goto done; + return; } } - /* After the max balls per game have been played, go into - * end game */ + /* After the max balls per game have been played, go into end game */ end_game (); +} -done: -#ifdef DEBUGGER - /* Dump the game state */ - dump_game (); -#endif - /* End the endball task */ - task_exit (); -} #ifdef CONFIG_TIMED_GAME @@ -491,9 +520,10 @@ void start_ball (void) #ifdef CONFIG_GI gi_enable (PINIO_GI_STRINGS); #endif - ball_search_timeout_set (12); + ball_search_timeout_set (15); ball_search_monitor_start (); + /* If timed game support is built-in and enabled, then start a task to monitor the game time. */ #ifdef CONFIG_TIMED_GAME @@ -520,6 +550,7 @@ void set_valid_playfield (void) valid_playfield = TRUE; callset_invoke (valid_playfield); effect_update_request (); +// ball_search_timeout_set (15); } } @@ -568,7 +599,7 @@ void start_game (void) { if (!in_game) { - task_kill_gid (GID_END_BALL); + task_kill_gid (GID_END_GAME); in_game = TRUE; in_bonus = FALSE; in_tilt = FALSE; @@ -601,7 +632,7 @@ void start_game (void) /** * stop_game is called whenever a game is restarted, or test mode * is entered. It is functionally equivalent to end_game aside - * from normal end * game features like match, high score check, etc. + * from normal end game features like match, high score check, etc. */ void stop_game (void) { @@ -625,11 +656,17 @@ void stop_game (void) callset_invoke (stop_game); deff_stop_all (); leff_stop_all (); + + /* Forcibly stop tasks that should run only during a game. + Do this last, so that the stop_game event handlers gives modules + a chance to do cleanup before this happens. */ + task_remove_duration (TASK_DURATION_GAME); + task_duration_expire (TASK_DURATION_GAME); } /** Perform final checks before allowing a game to start. */ -bool verify_start_ok (void) +static bool verify_start_ok (void) { #ifndef DEVNO_TROUGH return FALSE; @@ -642,6 +679,7 @@ bool verify_start_ok (void) /* check ball devices stable */ if (!in_game && !device_check_start_ok ()) return FALSE; + #ifdef MACHINE_TZ /* Don't allow the game to start if we are still * loading balls into the gumball */ @@ -649,7 +687,10 @@ bool verify_start_ok (void) if (gumball_enable_from_trough) return FALSE; #endif - return TRUE; + + /* Give other modules a chance to decide if game start + is OK. Return FALSE whenever start should be denied. */ + return callset_invoke_boolean (game_start_allowed); } @@ -669,8 +710,8 @@ CALLSET_ENTRY (game, start_button_handler) } /* If a game is already in progress and is tilted, do not allow - further players to be added */ - if (in_tilt) + further players to be added. Also do not allow when in test mode. */ + if (in_test || in_tilt) return; /* See if a game is already in progress. */ diff --git a/kernel/idle.c b/kernel/idle.c index 0f660d937..5abec33c9 100644 --- a/kernel/idle.c +++ b/kernel/idle.c @@ -1,5 +1,5 @@ /* - * Copyright 2007-2010 by Brian Dominy + * Copyright 2007-2011 by Brian Dominy * * This file is part of FreeWPC. * @@ -61,6 +61,9 @@ reaches 10, we clear it and consider that 10 seconds have passed. */ U8 idle_10second_timer; +#ifndef CONFIG_RTC +U8 idle_minute_timer; +#endif /** Runs the periodic functions. This function is called * about once every 16ms, but it may run less often when @@ -99,6 +102,14 @@ void do_periodic (void) { idle_10second_timer -= 10; callset_invoke (idle_every_ten_seconds); +#ifndef CONFIG_RTC + idle_minute_timer++; + if (idle_minute_timer >= 6) + { + idle_minute_timer -= 6; + callset_invoke (minute_elapsed); + } +#endif } } } @@ -109,4 +120,7 @@ CALLSET_ENTRY (idle, init) idle_ready_time = get_sys_time () + TIME_100MS; idle_second_timer = 0; idle_10second_timer = 0; +#ifndef CONFIG_RTC + idle_minute_timer = 0; +#endif } diff --git a/kernel/init.c b/kernel/init.c index 31d8f17c1..6ea490bf3 100644 --- a/kernel/init.c +++ b/kernel/init.c @@ -39,10 +39,7 @@ U8 periodic_ok; running. The splash screen is kept until this reverts to zero. */ U8 sys_init_pending_tasks; -#ifdef CONFIG_PLATFORM_WPC -const U8 wpc_machine_type = WPC_TYPE; -#endif - +/* RTT(name=advance_time_rtt freq=16 inline=1) */ /** * Handle a warm reboot. @@ -57,8 +54,11 @@ __noreturn__ void warm_reboot (void) #ifdef __m6809__ start (); #else - disable_interrupts (); - freewpc_init (); +#ifdef CONFIG_SIM + sim_exit (1); +#else + exit (1); +#endif #endif } @@ -89,7 +89,11 @@ __noreturn__ void freewpc_init (void) /* Initialize the real-time scheduler. The periodic functions are scheduled at compile-time using the 'gensched' utility. */ +#ifdef CONFIG_GEN_RTT + VOIDCALL (rtt_init); +#else VOIDCALL (tick_init); +#endif /* Initialize the hardware. * After each init call, tickle the watchdog (IRQ isn't enabled yet) @@ -113,8 +117,10 @@ __noreturn__ void freewpc_init (void) gi_init (); pinio_watchdog_reset (); #endif +#ifdef CONFIG_DMD_OR_ALPHA display_init (); pinio_watchdog_reset (); +#endif switch_init (); pinio_watchdog_reset (); flipper_init (); @@ -144,6 +150,16 @@ __noreturn__ void freewpc_init (void) log_init (); #ifdef CONFIG_NATIVE + { + void realtime_loop (void); + + /* This is done here, because the task subsystem isn't ready + inside main () */ + task_create_gid_while (GID_LINUX_REALTIME, realtime_loop, + TASK_DURATION_INF); + } +#endif +#ifdef CONFIG_SIM /* Notify the simulator when the core OS is up and running. */ sim_init (); #endif @@ -167,7 +183,9 @@ __noreturn__ void freewpc_init (void) order of invocation. For most things the order doesn't matter. */ deff_init (); leff_init (); +#ifdef CONFIG_TEST test_init (); +#endif adj_init (); callset_invoke (init); diff --git a/kernel/lamp.c b/kernel/lamp.c index 53e69de34..e9a9a11e4 100644 --- a/kernel/lamp.c +++ b/kernel/lamp.c @@ -1,5 +1,5 @@ /* - * Copyright 2006-2010 by Brian Dominy + * Copyright 2006-2012 by Brian Dominy * * This file is part of FreeWPC. * @@ -65,25 +65,24 @@ #include -__fastram__ U8 lamp_matrix[NUM_LAMP_COLS]; - -U8 lamp_flash_matrix[NUM_LAMP_COLS]; - -__fastram__ U8 lamp_flash_matrix_now[NUM_LAMP_COLS]; - -__fastram__ U8 lamp_leff1_matrix[NUM_LAMP_COLS]; - -__fastram__ U8 lamp_leff1_allocated[NUM_LAMP_COLS]; - -__fastram__ U8 lamp_leff2_matrix[NUM_LAMP_COLS]; - -__fastram__ U8 lamp_leff2_allocated[NUM_LAMP_COLS]; +__fastram__ lamp_set lamp_matrix; +lamp_set lamp_flash_matrix; +__fastram__ lamp_set lamp_flash_matrix_now; +__fastram__ lamp_set lamp_leff1_matrix; +__fastram__ lamp_set lamp_leff1_allocated; +__fastram__ lamp_set lamp_leff2_matrix; +__fastram__ lamp_set lamp_leff2_allocated; U8 bit_matrix[BITS_TO_BYTES (MAX_FLAGS)]; U8 global_bits[BITS_TO_BYTES (MAX_GLOBAL_FLAGS)]; -__fastram__ U8 lamp_strobe_mask; +#ifdef CONFIG_LAMP_STROBE16 +typedef U16 lamp_strobe_t; +#else +typedef U8 lamp_strobe_t; +#endif +__fastram__ lamp_strobe_t lamp_strobe_mask; __fastram__ U8 lamp_strobe_column; @@ -98,13 +97,13 @@ U16 lamp_power_idle_timer; void lamp_init (void) { /* Clear all lamps/flags */ - matrix_all_off (lamp_matrix); - matrix_all_off (lamp_flash_matrix); - matrix_all_off (lamp_flash_matrix_now); - matrix_all_off (lamp_leff1_matrix); - matrix_all_off (lamp_leff2_matrix); - matrix_all_off (bit_matrix); - matrix_all_off (global_bits); + lamp_set_zero (lamp_matrix); + lamp_set_zero (lamp_flash_matrix); + lamp_set_zero (lamp_flash_matrix_now); + lamp_set_zero (lamp_leff1_matrix); + lamp_set_zero (lamp_leff2_matrix); + memset (bit_matrix, 0, sizeof (bit_matrix)); + memset (global_bits, 0, sizeof (global_bits)); /* Lamp effect allocation matrices are "backwards", * in the sense that a '1' means free, and '0' means @@ -123,102 +122,25 @@ void lamp_init (void) /** Runs periodically to invert any lamps in the flashing state. * (This is hard realtime now; it could probably be dropped in * priority, though.) */ +/* RTT(name=lamp_flash_rtt freq=128) */ void lamp_flash_rtt (void) { U16 *lamp_matrix_words = (U16 *)lamp_flash_matrix_now; U16 *lamp_flash_matrix_words = (U16 *)lamp_flash_matrix; lamp_matrix_words[0] ^= lamp_flash_matrix_words[0]; +#if (PINIO_NUM_LAMPS > 16) lamp_matrix_words[1] ^= lamp_flash_matrix_words[1]; +#endif +#if (PINIO_NUM_LAMPS > 32) lamp_matrix_words[2] ^= lamp_flash_matrix_words[2]; +#endif +#if (PINIO_NUM_LAMPS > 48) lamp_matrix_words[3] ^= lamp_flash_matrix_words[3]; -} - - -/** Runs periodically to update the physical lamp state. */ -void lamp_rtt (void) -{ - U8 bits; - - /* Turn off the lamp circuits before recalculating. But don't - do this in native mode, because the simulator doesn't simulate - well-enough. */ -#ifdef CONFIG_NATIVE - pinio_write_lamp_strobe (0); -#else -#ifdef __m6809__ - /* On the 6809, avoid using the CLR instruction which is known to cause - problems in the WPC ASIC. Also, always write ROW first to avoid - spurious lamps. */ - __asm__ volatile ("clrb"); - __asm__ volatile ("stb\t" C_STRING (WPC_LAMP_ROW_OUTPUT)); - __asm__ volatile ("stb\t" C_STRING (WPC_LAMP_COL_STROBE)); -#else - pinio_write_lamp_data (0); - pinio_write_lamp_strobe (0); -#endif /* __m6809__ */ -#endif /* CONFIG_NATIVE */ - - /* Implement lamp power saver. When the timer is nonzero, it means - to keep the lamp circuits off for this many IRQ iterations. */ - if (unlikely (lamp_power_timer)) - { - --lamp_power_timer; - return; - } - - /* Grab the default lamp values */ - bits = lamp_matrix[lamp_strobe_column]; - - /* 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[lamp_strobe_column]; - - /* 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 &= lamp_leff2_allocated[lamp_strobe_column]; - bits |= lamp_leff2_matrix[lamp_strobe_column]; - bits &= lamp_leff1_allocated[lamp_strobe_column]; - bits |= lamp_leff1_matrix[lamp_strobe_column]; - - /* Write the result to the hardware */ - pinio_write_lamp_data (bits); - pinio_write_lamp_strobe (lamp_strobe_mask); - - /* Advance the strobe value for the next iteration. - Keep this together with the above so that lamp_strobe_mask - is already in a register. */ - lamp_strobe_mask <<= 1; - if (lamp_strobe_mask == 0) - { - /* All columns strobed : reset strobe */ - lamp_strobe_mask++; - lamp_strobe_column = 0; - - /* After strobing all lamps, reload the power saver timer */ - lamp_power_timer = lamp_power_level; - } - else - { - /* Advance strobe to next position for next iteration */ - lamp_strobe_column++; - } +#endif +#if (PINIO_NUM_LAMPS > 64) + lamp_matrix_words[4] ^= lamp_flash_matrix_words[4]; +#endif } @@ -238,6 +160,10 @@ void lamp_power_set (U8 level) always use the WPC shift hardware and may not be optimal. The bitarray macros are preferred. */ +#ifdef CONFIG_SINGLE_BIT_SET_ARRAY +U8 single_bit_set_array[8] = { 0x1, 0x2, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80 }; +#endif + void bit_on (bitset matrix, U8 bit) { bitarray_set (matrix, bit); @@ -281,7 +207,7 @@ bool bit_test_all_off (const_bitset matrix) } -__attribute__((pure)) U8 *matrix_lookup (lamp_matrix_id_t id) +__pure__ U8 *matrix_lookup (lamp_matrix_id_t id) { switch (id) { @@ -301,17 +227,11 @@ __attribute__((pure)) U8 *matrix_lookup (lamp_matrix_id_t id) fatal (ERR_INVALID_MATRIX); } -void matrix_all_on (bitset matrix) +void lamp_set_on (lamp_set lset) { - memset (matrix, 0xFF, NUM_LAMP_COLS); + memset (lset, 0xFF, NUM_LAMP_COLS); } -void matrix_all_off (bitset matrix) -{ - memset (matrix, 0, NUM_LAMP_COLS); -} - - /* * Lamp manipulation routines * @@ -397,21 +317,21 @@ bool lamp_flash_test (lampnum_t lamp) void lamp_all_on (void) { disable_interrupts (); - matrix_all_off (lamp_flash_matrix); + lamp_set_zero (lamp_flash_matrix); enable_interrupts (); - matrix_all_on (lamp_matrix); + lamp_set_on (lamp_matrix); } void lamp_all_off (void) { disable_interrupts (); - matrix_all_off (lamp_flash_matrix_now); - matrix_all_off (lamp_flash_matrix); - matrix_all_off (lamp_leff1_matrix); - matrix_all_off (lamp_leff2_matrix); + lamp_set_zero (lamp_flash_matrix_now); + lamp_set_zero (lamp_flash_matrix); + lamp_set_zero (lamp_leff1_matrix); + lamp_set_zero (lamp_leff2_matrix); enable_interrupts (); - matrix_all_off (lamp_matrix); + lamp_set_zero (lamp_matrix); } /* @@ -426,27 +346,27 @@ void lamp_all_off (void) void lamp_leff1_allocate_all (void) { - matrix_all_off (lamp_leff1_allocated); + lamp_set_zero (lamp_leff1_allocated); } void lamp_leff1_erase (void) { - matrix_all_off (lamp_leff1_matrix); + lamp_set_zero (lamp_leff1_matrix); } void lamp_leff1_free_all (void) { - matrix_all_on (lamp_leff1_allocated); + lamp_set_on (lamp_leff1_allocated); } void lamp_leff2_erase (void) { - matrix_all_off (lamp_leff2_matrix); + lamp_set_zero (lamp_leff2_matrix); } void lamp_leff2_free_all (void) { - matrix_all_on (lamp_leff2_allocated); + lamp_set_on (lamp_leff2_allocated); } diff --git a/kernel/lamplist.c b/kernel/lamplist.c index 80b2b4d35..04566ba6d 100644 --- a/kernel/lamplist.c +++ b/kernel/lamplist.c @@ -1,5 +1,5 @@ /* - * Copyright 2006-2010 by Brian Dominy + * Copyright 2006-2011 by Brian Dominy * * This file is part of FreeWPC. * @@ -265,8 +265,8 @@ bool lamplist_test_any (lamplist_id_t id, lamp_boolean_operator_t op) } -static __attribute__((pure)) -lamp_boolean_operator_t matrix_test_operator (const bitset matrix) +static __pure__ +lamp_boolean_operator_t matrix_test_operator (const lamp_set matrix) { if (matrix == lamp_matrix) { diff --git a/kernel/lampset.c b/kernel/lampset.c new file mode 100644 index 000000000..fcfa35997 --- /dev/null +++ b/kernel/lampset.c @@ -0,0 +1,93 @@ +/* + * Copyright 2010-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 + +/** + * Lamp set low-level operators. Each lamp set is just a bitmap, + * one bit per resource (lamp/GI string/flasher). These are + * optimized according to the maximum number of resources we have. + */ + +/* TODO - look at PINIO_NUM_LAMPS */ + +void lamp_set_zero (lamp_set dst) +{ + memset (dst, 0, sizeof (lamp_set)); +} + +void lamp_set_copy (lamp_set dst, const lamp_set src) +{ + register U16 *dst1 = (U16 *)dst; + register U16 *src1 = (U16 *)src; + + dst1[0] = src1[0]; + dst1[1] = src1[1]; + dst1[2] = src1[2]; + dst1[3] = src1[3]; + dst1[4] = src1[4]; + dst1[5] = src1[5]; +} + +void lamp_set_add (lamp_set dst, const lamp_set src) +{ + register U16 *dst1 = (U16 *)dst; + register U16 *src1 = (U16 *)src; + + dst1[0] |= src1[0]; + dst1[1] |= src1[1]; + dst1[2] |= src1[2]; + dst1[3] |= src1[3]; + dst1[4] |= src1[4]; + dst1[5] |= src1[5]; +} + +void lamp_set_subtract (lamp_set dst, const lamp_set src) +{ + register U16 *dst1 = (U16 *)dst; + register U16 *src1 = (U16 *)src; + + dst1[0] &= ~src1[0]; + dst1[1] &= ~src1[1]; + dst1[2] &= ~src1[2]; + dst1[3] &= ~src1[3]; + dst1[4] &= ~src1[4]; + dst1[5] &= ~src1[5]; +} + +bool lamp_set_disjoint (const lamp_set a, const lamp_set b) +{ + register U16 *a1 = (U16 *)a; + register U16 *b1 = (U16 *)b; + + /* In each component, a zero value means there is conflict + (both a and b are 1). So when all are nonzero, there is + no conflict and the sets are disjoint. */ + if (((a1[0] ^ b1[0]) | ~a1[0]) && + ((a1[1] ^ b1[1]) | ~a1[1]) && + ((a1[2] ^ b1[2]) | ~a1[2]) && + ((a1[3] ^ b1[3]) | ~a1[3]) && + ((a1[4] ^ b1[4]) | ~a1[4]) && + ((a1[5] ^ b1[5]) | ~a1[5])) + return TRUE; + return FALSE; +} + + diff --git a/machine/afm/lefthole.c b/kernel/lang.c similarity index 77% rename from machine/afm/lefthole.c rename to kernel/lang.c index d47cefb8d..51135f096 100644 --- a/machine/afm/lefthole.c +++ b/kernel/lang.c @@ -1,5 +1,5 @@ /* - * Copyright 2006, 2007, 2008, 2010 by Brian Dominy + * Copyright 2010 by Brian Dominy * * This file is part of FreeWPC. * @@ -7,12 +7,12 @@ * 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 @@ -20,8 +20,16 @@ #include +#if (NUM_STR_LANGS > 1) +U8 str_off; +#endif + -CALLSET_ENTRY (left_hole, dev_left_hole_enter) +CALLSET_ENTRY (lang, init) { +#if (NUM_STR_LANGS > 1) + str_off = CONFIG_LANG_DEFAULT; + str_off = STR_FR_OFF; +#endif } diff --git a/kernel/leff.c b/kernel/leff.c index 6d4320a99..2f81324e5 100644 --- a/kernel/leff.c +++ b/kernel/leff.c @@ -41,6 +41,10 @@ * matrices, and can run concurrently. */ +#ifndef PINIO_GI_STRINGS +#define PINIO_GI_STRINGS 0 +#endif + /** Indicates in a leff definition that it does not allocate any lamps */ #define L_NOLAMPS 0x0 @@ -56,7 +60,6 @@ /* Declare externs for all of the deff functions */ #define DECL_LEFF(num, flags, pri, b1, b2, fn, fnpage) \ extern void fn (void); - #ifdef MACHINE_LAMP_EFFECTS MACHINE_LAMP_EFFECTS #endif @@ -76,10 +79,10 @@ static const leff_t leff_table[] = { /* Declare externs for lamp bit matrices used by leffs */ -extern __fastram__ U8 lamp_leff1_allocated[NUM_LAMP_COLS]; -extern __fastram__ U8 lamp_leff1_matrix[NUM_LAMP_COLS]; -extern __fastram__ U8 lamp_leff2_allocated[NUM_LAMP_COLS]; -extern __fastram__ U8 lamp_leff2_matrix[NUM_LAMP_COLS]; +extern __fastram__ lamp_set lamp_leff1_allocated; +extern __fastram__ lamp_set lamp_leff1_matrix; +extern __fastram__ lamp_set lamp_leff2_allocated; +extern __fastram__ lamp_set lamp_leff2_matrix; /** Indicates the priority of the exclusive leff currently running */ @@ -89,6 +92,9 @@ U8 leff_prio; * otherwise. */ U8 leffs_running[BITS_TO_BYTES (MAX_LEFFS)]; +void leff_dump (void) +{ +} /** Test if a lamp effect is running. */ bool leff_running_p (leffnum_t dn) diff --git a/kernel/log.c b/kernel/log.c index c6bcc9f2b..6ce224cd6 100644 --- a/kernel/log.c +++ b/kernel/log.c @@ -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. * diff --git a/kernel/player.c b/kernel/player.c index a0b683605..0f932c764 100644 --- a/kernel/player.c +++ b/kernel/player.c @@ -102,3 +102,19 @@ void player_restore (void) memcpy (LOCAL_BASE, save_area->local_vars, AREA_SIZE(local)); } +/** + * When entering/exiting test while a game is running, preserve player + * local variables, especially default playfield lamps. + */ +CALLSET_ENTRY (player, test_start) +{ + if (in_game) + player_save (); +} + +CALLSET_ENTRY (player, test_exit) +{ + if (in_game) + player_restore (); +} + diff --git a/kernel/puts.c b/kernel/puts.c index d6866bc30..8d86ed379 100644 --- a/kernel/puts.c +++ b/kernel/puts.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/kernel/score.c b/kernel/score.c index 29f4f8ff1..6d51fc05e 100644 --- a/kernel/score.c +++ b/kernel/score.c @@ -50,6 +50,9 @@ score_t deff_score; /** The last multiplier as displayed */ U8 deff_multiplier; +/** Nonzero if the current score has changed and needs to be redrawn */ +bool score_update_needed; + /** Clears a score */ void score_zero (score_t s) @@ -144,7 +147,7 @@ I8 score_compare (const score_t s1, const score_t s2) /** Adds to the current score. The input score is given as a BCD-string. */ static void score_award (const bcd_t *s) { - if (in_tilt) + if (in_tilt || in_test) return; if (!in_game) { @@ -164,9 +167,9 @@ void score_award_compact (U8 offset, bcd_t val) { U8 mult; - if (in_tilt) + if (in_tilt || in_test) return; - if (!in_live_game) + if (!in_game) { nonfatal (ERR_SCORE_NOT_IN_GAME); return; @@ -264,6 +267,7 @@ void score_multiplier_set (U8 m) CALLSET_ENTRY (score, start_ball) { score_multiplier_set (1); + score_update_request (); } CALLSET_ENTRY (score, factory_reset) diff --git a/kernel/segment.c b/kernel/segment.c index 5affecc3b..905834ef2 100644 --- a/kernel/segment.c +++ b/kernel/segment.c @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010 by Brian Dominy + * Copyright 2005-2011 by Brian Dominy * * This file is part of FreeWPC. * @@ -229,6 +229,20 @@ void seg_show_other (void) } +/** Called from a deff when it wants to toggle between two images. + * 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); + } +} + + /** * Copy the contents of the current writable page to the * secondary one. diff --git a/kernel/sol.c b/kernel/sol.c index a31267073..03e26629e 100644 --- a/kernel/sol.c +++ b/kernel/sol.c @@ -1,5 +1,5 @@ /* - * Copyright 2006-2010 by Brian Dominy + * Copyright 2006-2011 by Brian Dominy * * This file is part of FreeWPC. * @@ -109,16 +109,6 @@ struct { } sol_req_queue; -/** - * Dump the state of the solenoid request driver. - */ -#ifdef DEBUGGER -void sol_req_dump (void) -{ -} -#endif - - /** * Pulse a solenoid with a specific duty/time. */ @@ -145,7 +135,11 @@ sol_req_start_specific (U8 sol, U8 mask, U8 time) req_reg_read = sol_get_read_reg (sol); req_bit = sol_get_bit (sol); sol_pulse_duty = mask; - req_inverted = sol_inverted (sol) ? 0xFF : 0x00; +#ifdef PINIO_SOL_INVERTED + req_inverted = PINIO_SOL_INVERTED (sol) ? 0xFF : 0x00; +#else + req_inverted = 0; +#endif /* This must be last, as it triggers the IRQ code */ sol_pulse_timer = time / 4; @@ -305,13 +299,13 @@ void sol_request (U8 sol) } -extern inline void sol_req_on (void) +static inline void sol_req_on (void) { writeb (req_reg_write, (*req_reg_read |= req_bit) ^ req_inverted); } -extern inline void sol_req_off (void) +static inline void sol_req_off (void) { writeb (req_reg_write, (*req_reg_read &= ~req_bit) ^ req_inverted); } @@ -323,6 +317,7 @@ extern inline void sol_req_off (void) * It works identically to the code for the flashers, except there can only be * one at a time. */ +/* RTT(name=sol_req_rtt freq=4) */ void sol_req_rtt (void) { if (sol_pulse_timer != 0) @@ -344,109 +339,6 @@ void sol_req_rtt (void) } -/** Return 0 if the given solenoid/flasher should be off, -else return the bitmask that reflects that solenoid's -position in the output register. */ -extern inline U8 sol_update1 (const U8 id) -{ - if (MACHINE_SOL_FLASHERP (id)) - if (likely (sol_timers[id - SOL_MIN_FLASHER] != 0)) - { - sol_timers[id - SOL_MIN_FLASHER]--; - - if (likely (sol_duty_state[id - SOL_MIN_FLASHER] & sol_duty_mask)) - return 1; - } - return 0; -} - - -/** Update the value 'bits' to reflect whether a specific solenoid -should be turned on at this instant. 'id' is the solenoid number. -bits stores the output state for an entire bank of 8 solenoids at -a time. */ -#define sol_contribute(id,bits) \ - if (sol_update1 (id)) { bits |= (1 << ((id) & (CHAR_BIT - 1))); } - - -/** Update a set of 8 solenoids that share the same output register. - * base_id is the solenoid number for the first solenoid in the set. - * asic_addr is the hardware register to be written with all 8 values - * at once. */ -extern inline void sol_update_set (const U8 set) -{ - register U8 out __areg__ = *sol_get_read_reg (set * 8); - - /* Update each of the 8 solenoids in the bank, updating timers - and calculating whether or not each should be on or off. */ - sol_contribute (set * CHAR_BIT + 0, out); - sol_contribute (set * CHAR_BIT + 1, out); - sol_contribute (set * CHAR_BIT + 2, out); - sol_contribute (set * CHAR_BIT + 3, out); - sol_contribute (set * CHAR_BIT + 4, out); - sol_contribute (set * CHAR_BIT + 5, out); - sol_contribute (set * CHAR_BIT + 6, out); - sol_contribute (set * CHAR_BIT + 7, out); - - /* Write the final output to the hardware */ - pinio_write_solenoid_set (set, out); -} - - -/** Like sol_update_set, but updates the Fliptronic outputs. - * The base_id and asic_addr are implied here. */ -extern inline void sol_update_fliptronic_powered (void) -{ - extern U8 fliptronic_powered_coil_outputs; - register U8 out __areg__ = fliptronic_powered_coil_outputs; - - /* Update each of the 8 solenoids in the bank, updating timers - and calculating whether or not each should be on or off. */ - sol_contribute (32, out); - sol_contribute (33, out); - sol_contribute (34, out); - sol_contribute (35, out); - sol_contribute (36, out); - sol_contribute (37, out); - sol_contribute (38, out); - sol_contribute (39, out); - - /* Write the final output to the hardware */ - fliptronic_powered_coil_outputs = out; -} - - -/** Realtime update of the first set of flasher outputs */ -void sol_update_rtt_0 (void) -{ - pinio_write_solenoid_set (0, *sol_get_read_reg (0)); - sol_update_set (2); -#ifdef CONFIG_PLATFORM_WPC - if (WPC_HAS_CAP (WPC_CAP_FLIPTRONIC)) - sol_update_fliptronic_powered (); -#endif -} - - -/** Realtime update of the second set of flasher outputs */ -void sol_update_rtt_1 (void) -{ - pinio_write_solenoid_set (1, *sol_get_read_reg (8)); - sol_update_set (3); -#ifdef MACHINE_SOL_EXTBOARD1 - sol_update_set (5); -#endif - - /* Rotate the duty mask for the next iteration. */ - /* TODO - the assembly code generated here is not ideal. - It could be done in two instructions, by shifting and then - adding the carry. Need a way from gcc to request this. */ - sol_duty_mask <<= 1; - if (sol_duty_mask == 0) - sol_duty_mask = 1; -} - - /** Starts a solenoid. The duty_mask controls how much power is applied to the coil; the timeout says how long it should be applied. Infinite timeout is *not* supported here, but can diff --git a/kernel/sound.c b/kernel/sound.c index 5db6ef6ae..377bbd792 100644 --- a/kernel/sound.c +++ b/kernel/sound.c @@ -339,6 +339,7 @@ void sound_board_init (void) } + /** * Write a 16-bit value to the sound board. */ @@ -368,6 +369,7 @@ __attribute__((noinline)) void sound_write (sound_code_t code) } + /** Send a command to the sound board. */ void sound_send (sound_code_t code) { @@ -377,6 +379,7 @@ void sound_send (sound_code_t code) } + /** Send a volume set command to the sound board */ void volume_set (U8 vol) { @@ -416,6 +419,15 @@ void volume_set (U8 vol) } + +U8 get_volume (void) { return current_volume; } + + + +void lower_volume (void) { volume_set (current_volume - 1); } + + + CALLSET_ENTRY (sound, music_refresh) { if (!in_game && (deff_get_active () == DEFF_VOLUME_CHANGE)) @@ -423,6 +435,7 @@ CALLSET_ENTRY (sound, music_refresh) } + /** Decrease the master volume */ CALLSET_ENTRY (sound, volume_down) { @@ -433,6 +446,7 @@ CALLSET_ENTRY (sound, volume_down) } + /** Increase the master volume */ CALLSET_ENTRY (sound, volume_up) { @@ -442,6 +456,8 @@ CALLSET_ENTRY (sound, volume_up) effect_update_request (); } + + void volume_refresh (void) { csum_area_check (&volume_csum_info); @@ -449,6 +465,7 @@ void volume_refresh (void) } + CALLSET_ENTRY (sound, file_register) { file_register (&volume_csum_info); diff --git a/kernel/switches.c b/kernel/switches.c index cd9111ad8..e924d02a9 100644 --- a/kernel/switches.c +++ b/kernel/switches.c @@ -81,7 +81,7 @@ __fastram__ switch_bits_t sw_logical; /** Nonzero for each switch that is in the switch queue. * This is not strictly needed, but it provides a fast way to * see if a switch is already in the queue without having to - * can the entire array. */ + * scan the entire array. */ switch_bits_t sw_queued; /* An array of pending switches which have not fully debounced yet. @@ -151,150 +151,6 @@ void switch_short_detect (void) } -/* Before any switch data can be accessed on a WPC-S - * or WPC95 machine, we need to poll the PIC and see - * if the unlock code must be sent to it. On pre- - * security games, this is not necessary. - * - * The function is split into two pieces, to eliminate the - * need for delaying between writing and reading back. - */ -#if (MACHINE_PIC == 1) -void pic_rtt_unlock (void) -{ - /* We need to unlock it again. */ - extern U8 pic_unlock_code[3]; - - /* The unlock sequence is four bytes long, but we can't - write everything without some delay between bytes. - The 'null_function' calls are there just to delay for - a few tens of cycles. Although this slows the IRQ down, we - can't read switches until this is done, and it happens - infrequently, so the overhead is minimal. */ - wpc_write_pic (WPC_PIC_UNLOCK); - null_function (); - null_function (); - wpc_write_pic (pic_unlock_code[0]); - null_function (); - null_function (); - wpc_write_pic (pic_unlock_code[1]); - null_function (); - null_function (); - wpc_write_pic (pic_unlock_code[2]); - null_function (); - null_function (); -} -#endif - - -#if defined(CONFIG_PLATFORM_WPC) && defined(__m6809__) -extern inline void switch_rowpoll (const U8 col) -{ - /* Load the raw switch value from the hardware. */ - if (col == 0) - { - /* Column 0 = Dedicated Switches */ - __asm__ volatile ("ldb\t" C_STRING (WPC_SW_CABINET_INPUT)); - } - else if (col <= 8) - { - /* Columns 1-8 = Switch Matrix - Load method is different on PIC vs. non-PIC games. */ -#if (MACHINE_PIC == 1) - __asm__ volatile ("ldb\t" C_STRING (WPCS_PIC_READ)); -#else - __asm__ volatile ("ldb\t" C_STRING (WPC_SW_ROW_INPUT)); -#endif - } - else if (col == 9) - { - /* Column 9 = Flipper Inputs - Load method is different on WPC-95 vs. older Fliptronic games */ -#if (MACHINE_WPC95 == 1) - __asm__ volatile ("ldb\t" C_STRING (WPC95_FLIPPER_SWITCH_INPUT)); -#else - __asm__ volatile ("ldb\t" C_STRING (WPC_FLIPTRONIC_PORT_A)); -#endif - } - - /* Save the raw switch */ - __asm__ volatile ("stb\t%0" :: "m" (sw_raw[col]) ); - - /* Set up the column strobe for the next read (on the next - * iteration). Don't do this if the next read will be the dedicated - * switches. - * - * PIC vs. non-PIC games set up the column strobe differently. */ - if (col < 8) - { -#if (MACHINE_PIC == 1) - __asm__ volatile ( - "lda\t%0\n" - "\tsta\t" C_STRING (WPCS_PIC_WRITE) :: "n" (WPC_PIC_COLUMN (col)) ); -#else - __asm__ volatile ( - "lda\t%0\n" - "\tsta\t" C_STRING (WPC_SW_COL_STROBE) :: "n" (1 << col) ); -#endif - } - - /* Update stable/unstable states. This is an optimized - version of the C code below, which works around some GCC - problems that are unlikely to ever be fixed. I took the - gcc output and optimized it by hand. */ - __asm__ volatile ( - "eorb %0\n" - "\ttfr b,a\n" - "\tandb %1\n" - "\tsta %1\n" - "\torb %2\n" - "\tstb %2\n" - "\tcoma\n" - "\tanda %2\n" - "\tora %3\n" - "\tsta %3" :: - "m" (sw_logical[col]), "m" (sw_edge[col]), - "m" (sw_stable[col]), "m" (sw_unstable[col]) ); -} - -#else /* !__m6809__ */ - -/** Poll a single switch column. - * Column 0 corresponds to the cabinet switches. - * Columns 1-8 refer to the playfield columns. - * It is assumed that columns are polled in order, as - * during the read of column N, the strobe is set so that - * the next read will come from column N+1. - */ -extern inline void switch_rowpoll (const U8 col) -{ - U8 edge; - - /* - * Read the raw switch. - */ - if (col == 0) - sw_raw[col] = pinio_read_dedicated_switches (); - else if (col <= 8) - sw_raw[col] = pinio_read_switch_rows (); - else if (col == 9) - sw_raw[col] = wpc_read_flippers (); - - /* Set up the column strobe for the next read (on the next - * iteration) */ - if (col < 8) - pinio_write_switch_column (col); - - /* Update stable/unstable states. */ - 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; -} - -#endif - - /** Return TRUE if the given switch is CLOSED. * This scans the logical values calculated at periodic service time. */ bool switch_poll (const switchnum_t sw) @@ -320,28 +176,6 @@ bool switch_poll_logical (const switchnum_t sw) } -void switch_rtt (void) -{ - switch_rowpoll (0); - if (switch_scanning_ok ()) - { - switch_rowpoll (1); - switch_rowpoll (2); - switch_rowpoll (3); - switch_rowpoll (4); - switch_rowpoll (5); - switch_rowpoll (6); - switch_rowpoll (7); - switch_rowpoll (8); - } - -#if (MACHINE_FLIPTRONIC == 1) - /* Poll the Fliptronic flipper switches */ - switch_rowpoll (9); -#endif -} - - typedef struct { const switch_info_t *swinfo; @@ -519,11 +353,12 @@ void switch_transitioned (const U8 sw) /* Latch the transition. sw_logical is still an open/closed level. * By clearing the stable/unstable bits, IRQ will begin scanning * for new transitions at this point. */ - disable_irq (); + rtt_disable (); bit_toggle (sw_logical, sw); bit_off (sw_stable, sw); bit_off (sw_unstable, sw); - enable_irq (); + bit_off (sw_edge, sw); + rtt_enable (); /* See if the transition requires scheduling. It does if the switch is declared 'edge' (it schedules when becoming active @@ -567,10 +402,11 @@ void switch_queue_add (const switchnum_t sw) void switch_queue_remove (pending_switch_t *entry) { /* Copy the last entry in the queue into the slot being deleted. */ + dbprintf ("removing %d from queue\n", entry->id); + bit_off (sw_queued, entry->id); entry->id = (switch_queue_top-1)->id; entry->timer = (switch_queue_top-1)->timer; switch_queue_top--; - bit_off (sw_queued, entry->id); } /** Initialize the switch queue */ @@ -606,27 +442,34 @@ void switch_service_queue (void) entry->timer -= elapsed_time; if (entry->timer <= 0) { - /* Debounce interval is complete. The entry can be removed - from the queue */ - switch_queue_remove (entry); + /* Debounce interval is complete. */ /* See if the switch held its state during the debounce period */ if (bit_test (sw_unstable, entry->id)) { /* Debouncing failed, so don't process the switch. * Restart IRQ-level scanning. */ - disable_irq (); + rtt_disable (); bit_off (sw_stable, entry->id); bit_off (sw_unstable, entry->id); - enable_irq (); + rtt_enable (); } else { /* Debouncing succeeded, so process the switch */ switch_transitioned (entry->id); } + + /* The queue entry can be removed now. + Note we do not advance the 'entry' pointer in + this case, as we may have copied a legitimate + entry here. */ + switch_queue_remove (entry); + } + else + { + entry++; } - entry++; } switch_last_service_time = get_sys_time (); @@ -762,8 +605,8 @@ CALLSET_ENTRY (switch, diagnostic_check) diag_post_error ("12V SWITCH POWER\nIS NOT PRESENT\n", SYS_PAGE); #endif -#ifdef SW_SLAM_TILT - if (unlikely (rt_switch_poll (SW_SLAM_TILT))) +#ifdef MACHINE_SLAM_TILT_SWITCH + if (unlikely (rt_switch_poll (MACHINE_SLAM_TILT_SWITCH))) diag_post_error ("SLAM TILT IS\nSTUCK CLOSED\n", SYS_PAGE); #endif } diff --git a/kernel/system.sched b/kernel/system.sched index 89c833183..e74785dd0 100644 --- a/kernel/system.sched +++ b/kernel/system.sched @@ -1,5 +1,5 @@ # -# Copyright 2007-2010 by Brian Dominy +# Copyright 2007-2011 by Brian Dominy # # This file is part of FreeWPC. # diff --git a/kernel/task.c b/kernel/task.c new file mode 100644 index 000000000..36aacd956 --- /dev/null +++ b/kernel/task.c @@ -0,0 +1,25 @@ + +#include + +/* These are the portable task functions, which are common to all + implementations of the task layer. */ + +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); +} + + +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); +} + diff --git a/kernel/timedmode.c b/kernel/timedmode.c index a262398c1..dfe2932fd 100644 --- a/kernel/timedmode.c +++ b/kernel/timedmode.c @@ -1,5 +1,5 @@ /* - * Copyright 2008-2010 by Brian Dominy + * Copyright 2008-2011 by Brian Dominy * * This file is part of FreeWPC. * @@ -128,6 +128,17 @@ void timed_mode_end (struct timed_mode_ops *ops) } +/** + * End a mode without handler. + */ +void timed_mode_end2 (struct timed_mode_ops *ops) +{ + task_kill_gid (ops->gid); + *ops->timer = 0; +} + + + /** * Get the current timer for a mode. This can be zero for a mode that is in * its grace period. diff --git a/kernel/timer.c b/kernel/timer.c index 2aa6e45b2..ed704dbb4 100644 --- a/kernel/timer.c +++ b/kernel/timer.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. * @@ -36,7 +36,6 @@ #define TIMER_FREERUNNING_GRAN TIME_100MS -#define TIMER_PAUSABLE_GRAN TIME_100MS /** * When nonzero, system timers are paused. This feature can allow you to pause @@ -78,13 +77,16 @@ void timer_unlock (void) * * Returns TRUE if timers should not run for some reason. * Returns FALSE if timers should continue to run. + * + * In a game, timers will normally run, so most of the time, this + * entire function will be executed; thus, it is mostly useless to + * try to optimize this by moving things around. The best way to + * optimize this is to reduce the total number of checks by + * usign timer locks. */ bool system_timer_pause (void) { - if (!in_game || in_bonus || !valid_playfield) - return TRUE; - - if (timer_lock_count) + if (!in_game || !valid_playfield || timer_lock_count) return TRUE; if (global_flag_test (GLOBAL_FLAG_BALL_AT_PLUNGER) && single_ball_play ()) diff --git a/kernel/triac.c b/kernel/triac.c index 802000d7f..0f0756ef7 100644 --- a/kernel/triac.c +++ b/kernel/triac.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. * @@ -137,6 +137,7 @@ static __attribute__((noinline)) void triac_rtt_1 (U8 dim_bits) /** Update the triacs at interrupt time */ +/* RTT(name=triac_rtt freq=1) */ void triac_rtt (void) { /* We only need to update the triacs if dimming @@ -179,7 +180,11 @@ void triac_update (void) latch = triac_output; latch &= ~gi_leff_alloc; latch |= gi_leff_output; +#ifdef CONFIG_TRIAC + pinio_write_triac (latch); +#else pinio_write_gi (latch); +#endif } @@ -205,11 +210,16 @@ void gi_disable (U8 triac) #ifdef CONFIG_TRIAC /** Enable dimming for a GI string. */ -void gi_dim (U8 triac, U8 intensity) +void gi_dim (U8 triac, U8 brightness) { gi_clear_dimming (triac, gi_dimming); triac_output &= ~triac; - gi_dimming[intensity] |= triac; + if (brightness == 0) + ; + else if (brightness < 7 && system_config.allow_dim_illum == YES) + gi_dimming[7 - brightness] |= triac; + else + triac_output |= triac; triac_update (); } #endif diff --git a/mach b/mach new file mode 100644 index 000000000..6568ce92d Binary files /dev/null and b/mach differ diff --git a/machine/README b/machine/README index 8afcdb588..c67895719 100644 --- a/machine/README +++ b/machine/README @@ -7,8 +7,7 @@ description file (same basename as the directory, with suffix .md). For WPC, the top of the .md should define the generation of machine used. Here are the values to use and the games that they -apply to (taken from information at http://www.pinrepair.com/wpc/index1.htm). -Games with "+" already have at least a basic machine description. +apply to. Games with "+" already have at least a basic machine description. 1. WPC Alphanumeric diff --git a/machine/afm/Makefile b/machine/afm/Makefile deleted file mode 100644 index 41d793dc4..000000000 --- a/machine/afm/Makefile +++ /dev/null @@ -1,59 +0,0 @@ - -# -# Game specific Makefile extensions -# - -MACHINE_FILE = afm.md - -# Define the name of the GAME_ROM. This is -# optional; you can delete it and a suitable -# default will be taken. -GAME_ROM_PREFIX = fafm - -# Set ROM_PAGE_COUNT to the number of 16KB pages -# that should be present in the output image. -# The hardware supports a maximum of 64 pages; -# you can't exceed this. -# -# The 'system' will always reside in the uppermost -# two pages. If the ROM is less than a full 64 -# pages, then the pages are numbered from [N..64] -# anyway. -# -# 128KB.....8 pages -# 256KB.....16 pages -# 512KB.....32 pages -# 1MB...... 64 pages -# -ROM_PAGE_COUNT = 64 - -################################################# -# -# Simulation options. -# -# These options control the way that the game -# ROM is made available to pinmame for testing. -# They are only used during installation into -# the pinmame roms directory. -# -################################################# - -MACHINE_MAJOR = 0 -MACHINE_MINOR = 32 - -PINMAME_MACHINE = afm_113 - -PINMAME_GAME_ROM = afm_1_13.bin - -PINMAME_OTHER_ROMS = afm_s*.l1 - -# -# Object files exported by this game -# - -GAME_PAGED_OBJS = afm_leff.o misc.o shot.o rules.o deffs.o - -GAME_INCLUDES = - -IMAGE_MAP += $(M)/afm.ild - diff --git a/machine/afm/afm.ild b/machine/afm/afm.ild deleted file mode 100644 index 9719a3588..000000000 --- a/machine/afm/afm.ild +++ /dev/null @@ -1,5 +0,0 @@ - -IMG_UFO: !machine/afm/images/ufo.pgm -IMG_EIFFEL: !machine/afm/images/eiffel.pgm -IMG_WORLDMAP: !machine/afm/images/worldmap.pgm -IMG_ROCKET: !machine/afm/images/rocket.pgm diff --git a/machine/afm/afm.md b/machine/afm/afm.md deleted file mode 100644 index f4b92b828..000000000 --- a/machine/afm/afm.md +++ /dev/null @@ -1,339 +0,0 @@ -#-------------------------------------------------------------------------- -# AFM machine description for FreeWPC -# (C) Copyright 2006, 2009, 2010 by Brian Dominy -# -# See tools/genmachine for more information about the format of this file. -#-------------------------------------------------------------------------- - -Title: Attack From Mars -include platform/wpc/wpc95.md - -Pinmame-Zip: afm_113b.zip -Pinmame-ROM: afm_113b.bin - -define MACHINE_NUMBER 541 -define MACHINE_CUSTOM_AMODE -define MACHINE_BALL_SAVE_LAMP LM_RETURN_TO_BATTLE - -# Replay level ranges from 50M-500M (default is 100M). -# Replay boost ranges from 10-100M (default is 25M). -define REPLAY_MILLIONS -define REPLAY_SCORE_MIN 50 -define REPLAY_SCORE_STEP 5 -define REPLAY_SCORE_MAX 500 -define REPLAY_SCORE_DEFAULT 100 -define REPLAY_BOOST_MIN 10 -define REPLAY_BOOST_STEP 1 -define REPLAY_BOOST_MAX 100 -define REPLAY_BOOST_DEFAULT 25 - -# For Challenge rules -define MACHINE_BALL_SAVE_TIME 0 - -[lamps] -11: RTU Super Jets -12: RTU Super Jackpot -13: RTU Martian MB -14: RTU Total Ann. -15: Return to Battle -16: RTU Conquer Mars -17: RTU 5 Way -18: Saucer -21: L. Ramp 1 -22: L. Ramp 2 -23: L. Ramp 3 -24: L. Ramp Jackpot -25: L. Ramp Arrow -26: Lock 2 -27: Lock 3 -28: Lock Jackpot -31: R. Ramp 1 -32: R. Ramp 2 -33: R. Ramp 3 -34: R. Ramp Jackpot -35: R. Ramp Arrow -36: Martian Attack -37: Rule the Universe -38: Stroke of Luck -41: R. Loop Arrow -42: Lock Arrow -43: L. Top Lane -44: R. Top Lane -45: Motor Bank 1 -46: Motor Bank 2 -47: Motor Bank 3 -48: Martian 4 -51: Attack Mars -52: Country 5 -53: Country 4 -54: Light Lock -55: Lock 1 -56: Country 3 -57: Country 2 -58: Country 1 -61: Martian 7 -62: Martian 6 -63: R. Loop 1 -64: R. Loop 2 -65: R. Loop 3 -66: R. Loop Jackpot -67: Extra Ball -68: Martian 5 -71: L. Loop 1 -72: L. Loop 2 -73: L. Loop 3 -74: L. Loop Jackpot -75: L. Loop Arrow -76: Martian 1 -77: Martian 2 -78: Martian 3 -81: Shoot Again, shoot-again -82: Left Outlane -83: Left Inlane -84: Right Inlane -85: Right Outlane -86: Launch Button -88: Start Button - -[switches] -11: Launch Button, launch-button, cabinet, noplay -13: Start Button, yellow, start-button, cabinet, intest -14: Tilt, tilt, noplay, cabinet -16: Left Outlane -17: Right Inlane -18: Shooter, edge, shooter, noplay, debounce(TIME_200MS) -21: Slam Tilt, slam-tilt, ingame, cabinet -26: Left Inlane -27: Right Outlane -31: Trough Eject, opto, noscore, noplay -32: Trough 1, trough, opto, noscore, noplay -33: Trough 2, trough, opto, noscore, noplay -34: Trough 3, trough, opto, noscore, noplay -35: Trough 4, trough, opto, noscore, noplay -36: Left Popper, opto -37: Right Popper, opto -38: Left Top Lane -41: Martian 6, lamp(LM_MARTIAN_6) -42: Martian 7, lamp(LM_MARTIAN_7) -43: Martian 4, lamp(LM_MARTIAN_4) -44: Martian 5, lamp(LM_MARTIAN_5) -45: Motor Bank 1, ingame -46: Motor Bank 2, ingame -47: Motor Bank 3, ingame -48: Right Top Lane -51: Left Slingshot, noplay -52: Right Slingshot, noplay -53: Left Jet, noplay -54: Bottom Jet, noplay -55: Right Jet, noplay -56: Martian 1, lamp(LM_MARTIAN_1) -57: Martian 2, lamp(LM_MARTIAN_2) -58: Martian 3, lamp(LM_MARTIAN_3) -61: Left Ramp Enter -62: Center Ramp Enter -63: Right Ramp Enter -64: Left Ramp Exit -65: Right Ramp Exit -66: Motor Bank Down, noplay, intest, service -67: Motor Bank Up, noplay, intest, service -71: Right Loop High, noplay -72: Right Loop Low, noplay -73: Left Loop High -74: Left Loop Low -75: L. Saucer Tgt. -76: R. Saucer Tgt. -77: Drop Target, debounce(TIME_200MS) -78: Center Trough - -[drives] -H1: Auto Launch, launch -H2: Trough Eject, ballserve -H3: Left Popper -H4: Right Popper -H5: L.L. Martian, nosearch -H6: U.L. Martian, nosearch -H7: Knocker, knocker -H8: U.R. Martian, nosearch - -L1: Left Slingshot -L2: Right Slingshot -L3: Left Jet -L4: Bottom Jet -L5: Right Jet -L6: L.R. Martian, nosearch -L7: Saucer Shake, nosearch -L8: Drop Target - -G1: Saucer Flash 5, flash -G2: Saucer Flash 4, flash -G3: Saucer Flash 6, flash -G4: R. Martian Flash, flash -G5: Saucer Arrow, flash -G7: Saucer Flash, flash -G8: Motor Bank - -A1: Saucer Flash 2, flash -A2: Saucer Flash 3, flash -A3: Saucer Flash 1, flash -A4: L. Martian Flash, flash -A5: L.E.D. Clock, nosearch -A6: L.E.D. Data, nosearch -A7: Strobe Light, flash -A8: Coin Meter, nosearch - -F5: Right Gate -F6: Left Gate -F7: Divertor Power, nosearch -F8: Divertor Hold, nosearch - -[gi] -0: Lower Playfield -1: Middle Playfield -2: Upper Playfield - -[tests] - -############################################################# - -[lamplists] -Countries: Country 1, Country 2, Country 3, Country 4, Country 5 -Locks: Lock 1, Lock 2, Lock 3 -L. Loop Count: L. Loop 1, L. Loop 2, L. Loop 3 -L. Ramp Count: L. Ramp 1, L. Ramp 2, L. Ramp 3 -R. Ramp Count: R. Ramp 1, R. Ramp 2, R. Ramp 3 -R. Loop Count: R. Loop 1, R. Loop 2, R. Loop 3 -Arrows: L. Loop Arrow, L. Ramp Arrow, Lock Arrow, R. Ramp Arrow, R. Loop Arrow -Jackpots: L. Loop Jackpot, L. Ramp Jackpot, Lock Jackpot, R. Ramp Jackpot, R. Loop Jackpot -Martians: Martian 1, Martian 2, Martian 3, Martian 4, Martian 5, Martian 6, Martian 7 -Bottom Lanes: Left Outlane, Left Inlane, Right Inlane, Right Outlane -RTU Progress: RTU Super Jets, RTU Super Jackpot, RTU Total Ann., RTU Martian MB, RTU Conquer Mars, RTU 5 Way -Motor Bank: Motor Bank 1, Motor Bank 2, Motor Bank 3 -Countries and Attack: Countries, Attack Mars -Lock Lane: Light Lock, Locks, Lock Jackpot, Lock Arrow -Top Lanes: L. Top Lane, R. Top Lane -Right Hole: Rule the Universe, Martian Attack, Stroke of Luck, Extra Ball -L. Loop All: L. Loop Count, L. Loop Jackpot, L. Loop Arrow -L. Ramp All: L. Ramp Count, L. Ramp Jackpot, L. Ramp Arrow -R. Ramp All: R. Ramp Count, R. Ramp Jackpot, R. Ramp Arrow -R. Loop All: R. Loop Count, R. Loop Jackpot, R. Loop Arrow - -[containers] -Trough: trough, Trough Eject, Trough 1, Trough 2, Trough 3, Trough 4, init_max_count(4) -Left Hole: Left Popper, Left Popper -Right Hole: Right Popper, Right Popper - -############################################################# - -[adjustments] -Game Timer: integer, 90 -Martian Time: integer, 30 -Multiplier Time: integer, 20 -Attack Time: integer, 20 -Jet Start: integer, 30 -Jet Increase: integer, 10 -Martian Hard: yes_no, NO -Multiplier Pause: integer, 3 -Martian Pause: integer, 3 -Multiball Pause: integer, 3 -Free Luck: yes_no, YES -Luck Time: integer, 15 -Max. Balls: integer, 4 -Saucer Carryover: yes_no, YES - -[audits] - -[system_sounds] - -[system_music] - -[scores] -170: -1K: -5K: -10K: -20K: -25K: -50K: -100K: -250K: -500K: -1M: - -[highscores] - -[flags] - -[globalflags] - -[deffs] -#Chal Running: PRI_GAME_MODE1, page(MACHINE_PAGE) -#Chal Sudden Death: PRI_GAME_MODE1, page(MACHINE_PAGE) -#Chal Award: PRI_GAME_QUICK1, page(MACHINE_PAGE), D_SCORE+D_RESTARTABLE -#Chal Phase Finished: PRI_GAME_QUICK1, page(MACHINE_PAGE), D_QUEUED+D_PAUSE, c_decl(chal_all_shots_deff) -#Chal Ball Drain: PRI_GAME_QUICK2, page(MACHINE_PAGE) -#Chal Timeout Endgame: PRI_GAME_QUICK1, page(MACHINE_PAGE) -#Martian Kill: PRI_GAME_QUICK2, page(MACHINE_PAGE), D_RESTARTABLE -#BonusMB Running: PRI_GAME_MODE3, page(MACHINE_PAGE) -#BonusMB Ending: PRI_GAME_MODE3, page(MACHINE_PAGE), D_QUEUED - -Jackpot: page(MACHINE_PAGE), PRI_GAME_QUICK2, D_SCORE+D_RESTARTABLE -PF Mult Advance: page(MACHINE_PAGE), PRI_GAME_QUICK1, D_SCORE+D_RESTARTABLE -PF Mult Shot: page(MACHINE_PAGE), PRI_GAME_QUICK1, D_SCORE+D_RESTARTABLE -Martian Advance: page(MACHINE_PAGE), PRI_GAME_QUICK1, D_SCORE+D_RESTARTABLE -Martian Spelled: page(MACHINE_PAGE), PRI_GAME_QUICK3 -Luck Lit: page(MACHINE_PAGE), PRI_GAME_QUICK3 -Luck Award: page(MACHINE_PAGE), PRI_GAME_QUICK5 -MB Running: page(MACHINE_PAGE), PRI_GAME_MODE3 -MB Super Award: page(MACHINE_PAGE), PRI_GAME_QUICK6 -MB Increase Jackpot: page(MACHINE_PAGE), PRI_GAME_QUICK2 -Attack Lit: page(MACHINE_PAGE), PRI_GAME_QUICK1 -Attack Running: page(MACHINE_PAGE), PRI_GAME_MODE2 -Attack Score: page(MACHINE_PAGE), PRI_GAME_QUICK5, D_SCORE+D_RESTARTABLE -Jet Level Up: page(MACHINE_PAGE), PRI_GAME_QUICK2 - -[leffs] -Amode: runner, PRI_LEFF1, LAMPS(ALL), GI(ALL), page(MACHINE_PAGE) -Flashfest: PRI_LEFF2, page(MACHINE_PAGE) -Flash Random: PRI_LEFF3, page(MACHINE_PAGE) -#GI Strobe: PRI_LEFF4, GI(ALL), page(MACHINE_PAGE) -#GI Flash: PRI_LEFF4, GI(ALL), page(MACHINE_PAGE) - -[fonts] - -[timers] -Center Ramp Entered: -Right Ramp Entered: -Center Trough Entered: -Ball In Jets: - -[templates] -Left Sling: driver(spsol), - sw=SW_LEFT_SLINGSHOT, sol=SOL_LEFT_SLINGSHOT, - ontime=3, offtime=16 - -Right Sling: driver(spsol), - sw=SW_RIGHT_SLINGSHOT, sol=SOL_RIGHT_SLINGSHOT, - ontime=3, offtime=16 - -Left Jet: driver(spsol), sw=SW_LEFT_JET, sol=SOL_LEFT_JET, ontime=3, offtime=16 - -Right Jet: driver(spsol), sw=SW_RIGHT_JET, sol=SOL_RIGHT_JET, ontime=3, offtime=16 - -Bottom Jet: driver(spsol), sw=SW_BOTTOM_JET, sol=SOL_BOTTOM_JET, ontime=3, offtime=16 - -Left Gate: driver(duty), - sol=SOL_LEFT_GATE, - ontime=TIME_300MS, duty_ontime=TIME_33MS, duty_offtime=TIME_16MS, timeout=60 - -Right Gate: driver(duty), - sol=SOL_RIGHT_GATE, - ontime=TIME_300MS, duty_ontime=TIME_33MS, duty_offtime=TIME_16MS, timeout=60 - -Divertor: driver(flipduty), power=SOL_DIVERTOR_POWER, hold=SOL_DIVERTOR_HOLD, time=TIME_66MS - -Drop Target: driver(drop), sol_up=SOL_DROP_TARGET, sol_down=SOL_NOT_DEFINED, - sw=SW_DROP_TARGET, sw_event=sw_drop_target - -Motor Bank: driver(motorbank), sol=SOL_MOTOR_BANK, - up_sw_event=sw_motor_bank_up, down_sw_event=sw_motor_bank_down - diff --git a/machine/afm/afm_leff.c b/machine/afm/afm_leff.c deleted file mode 100644 index 67c2a58ff..000000000 --- a/machine/afm/afm_leff.c +++ /dev/null @@ -1,70 +0,0 @@ - -#include - -U8 lamplist; - -void flashleff_entry (void) -{ - U8 *flasherp = task_current_class_data (U8); - for (;;) - { - flasher_start (*flasherp, 0x1, TIME_500MS); - task_sleep (TIME_300MS); - flasher_start (*flasherp, 0x11, TIME_400MS); - task_sleep (TIME_200MS); - flasher_start (*flasherp, 0x55, TIME_200MS); - task_sleep (TIME_100MS); - flasher_start (*flasherp, 0x11, TIME_400MS); - task_sleep (TIME_200MS); - } - task_exit (); -} - - -static inline void flashleff_spawn (const U8 flasher) -{ - task_pid_t tp; - tp = task_create_peer (flashleff_entry); - *(task_init_class_data (tp, U8)) = flasher; - task_sleep (TIME_100MS); -} - - -void flashfest_leff (void) -{ - flashleff_spawn (FLASH_SAUCER_FLASH_1); - flashleff_spawn (FLASH_SAUCER_FLASH_2); - flashleff_spawn (FLASH_SAUCER_FLASH_3); - flashleff_spawn (FLASH_SAUCER_FLASH_4); - flashleff_spawn (FLASH_SAUCER_FLASH_5); - flashleff_spawn (FLASH_SAUCER_FLASH_6); - task_kill_peers (); - leff_exit (); -} - -void flash_random_leff (void) -{ - flasher_randomize (TIME_166MS, 3); - leff_exit (); -} - -static void amode_leff1 (void) -{ - register U8 my_lamplist = lamplist; - lamplist_set_apply_delay (TIME_66MS); - for (;;) - lamplist_apply (my_lamplist, leff_toggle); -} - - -void amode_leff (void) -{ - gi_leff_enable (PINIO_GI_STRINGS); - for (lamplist = LAMPLIST_MARTIANS; lamplist <= LAMPLIST_R_LOOP_ALL; lamplist++) - { - leff_create_peer (amode_leff1); - task_sleep (TIME_66MS); - } - task_exit (); -} - diff --git a/machine/afm/bonusmb.c b/machine/afm/bonusmb.c deleted file mode 100644 index bfae126f1..000000000 --- a/machine/afm/bonusmb.c +++ /dev/null @@ -1,146 +0,0 @@ -/* - * Copyright 2006-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 - -/* An example of how to use the multiball mode module. - For this simple 2-ball multiball, shoot the center 3-bank - 10 times to start, then continue to hit to score jackpots. */ - -enum mb_mode_state bonus_mb_state; - -U8 mb_total_shots_needed; - -U8 mb_shots_to_start; - -U8 mb_jackpot_count; - -static void bonus_mb_jackpot (void) -{ - mb_jackpot_count++; - score (SC_10); -} - -static void afm_bonus_mb_update (enum mb_mode_state state) -{ - switch (state) - { - case MB_INACTIVE: - mb_jackpot_count = 0; - /* fallthru for effects */ - - case MB_IN_GRACE: - lamp_tristate_off (LM_LOCK_JACKPOT); - break; - - case MB_ACTIVE: - lamp_tristate_on (LM_LOCK_JACKPOT); - set_ball_count (2); - break; - } -} - -struct mb_mode_ops afm_bonus_mb_mode = -{ - DEFAULT_MBMODE, - .state = &bonus_mb_state, - .update = afm_bonus_mb_update, - .deff_running = DEFF_BONUSMB_RUNNING, - .deff_ending = DEFF_BONUSMB_ENDING, - .prio = PRI_GAME_MODE3, - .gid_running = GID_BONUS_MB, - .gid_in_grace = GID_BONUS_MB_GRACE, - .grace_period = TIME_3S, -}; - -void bonusmb_running_deff (void) -{ - dmd_alloc_low_clean (); - font_render_string_center (&font_fixed10, 64, 16, "BONUS MB"); - dmd_show_low (); - for (;;) - task_sleep (TIME_4S); -} - -void bonusmb_ending_deff (void) -{ - dmd_alloc_low_clean (); - font_render_string_center (&font_fixed10, 64, 16, "BONUS MB OVER"); - dmd_show_low (); - task_sleep (TIME_2S); - deff_exit (); -} - -CALLSET_ENTRY (bonusmb, start_player) -{ - mb_total_shots_needed = 10; - mb_shots_to_start = 10; -} - -CALLSET_ENTRY (bonusmb, any_motor_bank) -{ - if (mb_mode_running_p (&afm_bonus_mb_mode)) - { - bonus_mb_jackpot (); - } - else - { - mb_shots_to_start--; - if (mb_shots_to_start == 0) - { - mb_mode_start (&afm_bonus_mb_mode); - if (mb_total_shots_needed < 50) - mb_total_shots_needed += 10; - mb_shots_to_start = mb_total_shots_needed; - } - } -} - -CALLSET_ENTRY (bonusmb, start_ball) -{ - bonus_mb_state = MB_INACTIVE; -} - -CALLSET_ENTRY (bonusmb, single_ball_play) -{ - mb_mode_single_ball (&afm_bonus_mb_mode); -} - -CALLSET_ENTRY (bonusmb, end_ball) -{ - mb_mode_end_ball (&afm_bonus_mb_mode); -} - -CALLSET_ENTRY (bonusmb, display_update) -{ - mb_mode_display_update (&afm_bonus_mb_mode); -} - -CALLSET_ENTRY (bonusmb, music_refresh) -{ - mb_mode_music_refresh (&afm_bonus_mb_mode); -} - -#if 1 -CALLSET_ENTRY (bonusmb, center_ramp_shot) -{ - mb_mode_start (&afm_bonus_mb_mode); -} -#endif diff --git a/machine/afm/challenge.c b/machine/afm/challenge.c deleted file mode 100644 index 56296922e..000000000 --- a/machine/afm/challenge.c +++ /dev/null @@ -1,479 +0,0 @@ -/* - * 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 - */ - -/* - * This file implements a single 'challenge ruleset' for Attack From Mars. - * The goal is not a game that you can play all day, but something that will average - * 3-5 minutes, or maybe 10 minutes if you are really good. - * The basic rules are as follows: - * - * A single shot is lit at any time for 'big points'. Other shots like targets, - * bumpers, etc. may score small points but scoring is dominated by the One Lit Shot. - * - * The game is timed. You need to make all 7 main shots once to complete a 'phase', then - * the timer is reset, but smaller than before, so it gets harder to finish each time. - * - * You are allowed to drain the ball 2 times without penalty; on the third drain, the - * game ends regardless of the timer. - * - * When the timer expires, you go into Sudden Death. Draining now will end the game, - * but if you have a ball save left, completing a certain number of martian targets - * will cost you 1 ball save and restore the timer to its original value. - * - * The shots to make move from left to right on the first phase, then right to left for - * the next, etc. - * - * Bonus points are awarded at the completion of each phase for any time remaining, - * comparable to the main scoring so this is desirable. - * - * Only 1-player games are supported. - * - * TODO: - * - Award Extra Ball Save after completing Phase 1 & 3. - * - Add Extra Time rule. Completing all 7 martian targets (except in Sudden Death) will - reset the timer to its original value for that round. - * - Add fast scoring rule. Value for each shot = base value (100 currently) + bonus for - how much time is left. Because timer gets shorter every phase, bonus is - (time_left * phase_number). - * - Pause the timer briefly anytime a "long shot" like a ramp or loop is made, not - necessarily so long until the player gets the ball back, but just a little time bonus - for hitting _something_. - * - Add Bonus Wave after completion of every other phase. This is a 30 second timed - multiball mode where all standups (Martians and Center Bank) score 1 point each, and - completing ALL 10 targets scores a Bonus Jackpot equal to the number of points scored - already in the round. - * - Add Saucer rule. After making the Forcefield shot in each phase, lower the 3-bank to - expose the Saucer drop. Hit the drop target N times (increasing for each phase) to - spot the next shot. - * - Add Attract mode rules display explaining how it works. - */ - -#include - -__local__ U8 chal_level; -__local__ U8 chal_shot_lit; -__local__ S8 chal_shot_direction; -__local__ S16 chal_timer; -__local__ U8 chal_timer_reset_value; -__local__ U8 martians_max; -__local__ U8 ball_saves; - -score_t chal_shot_score; - -U8 martians_needed; - - -#define TIMER_MULT 8 - -enum { - CS_LEFT_LOOP = 0, - CS_LEFT_RAMP, - CS_CENTER_RAMP, - CS_FORCEFIELD, - CS_RIGHT_HOLE, - CS_RIGHT_RAMP, - CS_RIGHT_LOOP, -}; - -U8 chal_shot_lamplists[] = { - [CS_LEFT_LOOP] = LAMPLIST_L_LOOP_ALL, - [CS_LEFT_RAMP] = LAMPLIST_L_RAMP_ALL, - [CS_CENTER_RAMP] = LAMPLIST_LOCK_LANE, - [CS_FORCEFIELD] = LAMPLIST_MOTOR_BANK, - [CS_RIGHT_HOLE] = LAMPLIST_RIGHT_HOLE, - [CS_RIGHT_RAMP] = LAMPLIST_R_RAMP_ALL, - [CS_RIGHT_LOOP] = LAMPLIST_R_LOOP_ALL, -}; - -const char *chal_shot_names[] = { - [CS_LEFT_LOOP] = "LEFT LOOP", - [CS_LEFT_RAMP] = "LEFT RAMP", - [CS_CENTER_RAMP] = "CENTER RAMP", - [CS_FORCEFIELD] = "CENTER TARGETS", - [CS_RIGHT_HOLE] = "RIGHT HOLE", - [CS_RIGHT_RAMP] = "RIGHT RAMP", - [CS_RIGHT_LOOP] = "RIGHT LOOP", -}; - -void chal_render_static (void) -{ - dmd_map_overlay (); - dmd_clean_page_low (); - font_render_string_center (&font_var5, 16, 4, "TIME"); - sprintf ("%d SAVES", ball_saves); - font_render_string_center (&font_var5, 16, 29, sprintf_buffer); - - sprintf ("LEVEL %d", chal_level+1); - font_render_string_center (&font_var5, 80, 29, sprintf_buffer); - - sprintf ("SHOOT %s", chal_shot_names[chal_shot_lit]); - font_render_string_center (&font_var5, 80, 4, sprintf_buffer); -} - -void chal_running_deff (void) -{ - chal_render_static (); - for (;;) - { - dmd_alloc_low (); - pinio_dmd_window_set (PINIO_DMD_WINDOW_1, DMD_OVERLAY_PAGE); - dmd_copy_page (dmd_low_buffer, dmd_high_buffer); - pinio_dmd_window_set (PINIO_DMD_WINDOW_1, - pinio_dmd_window_get (PINIO_DMD_WINDOW_0)); - - sprintf_current_score (); - font_render_string_center (&font_fixed6, 80, 16, sprintf_buffer); - - sprintf ("%ld", chal_timer / 8); - font_render_string_center (&font_fixed10, 16, 16, sprintf_buffer); - - dmd_show_low (); - task_sleep (TIME_250MS); - } -} - -void chal_award_deff (void) -{ - dmd_alloc_low_clean (); - sprintf ("LEVEL %d AWARD", chal_level); - font_render_string_center (&font_var5, 64, 8, sprintf_buffer); - sprintf_score (score_deff_get ()); - font_render_string_center (&font_fixed6, 64, 18, sprintf_buffer); - dmd_show_low (); - task_sleep (TIME_1500MS); - deff_exit (); -} - -void chal_ball_drain_deff (void) -{ - dmd_alloc_low_clean (); - dmd_show_low (); - font_render_string_center (&font_fixed6, 64, 8, "BALL SAVED"); - task_sleep (TIME_1500MS); - deff_exit (); -} - -void chal_timeout_endgame_deff (void) -{ - dmd_alloc_low_clean (); - font_render_string_center (&font_fixed10, 64, 16, "OUT OF TIME"); - dmd_show_low (); - task_sleep (TIME_1500MS); - deff_exit (); -} - -void chal_all_shots_deff (void) -{ - dmd_alloc_low_clean (); - font_render_string_center (&font_fixed6, 64, 9, "ALL SHOTS MADE"); - sprintf ("TIMER AT %d SEC.", chal_timer_reset_value / 8); - font_render_string_center (&font_fixed6, 64, 22, sprintf_buffer); - dmd_show_low (); - task_sleep (TIME_2S); - deff_exit (); -} - -void chal_sudden_death_deff (void) -{ - dmd_alloc_pair (); - dmd_clean_page_low (); - font_render_string_center (&font_var5, 64, 6, "SUDDEN DEATH"); - font_render_string_center (&font_var5, 64, 27, "TO CONTINUE GAME"); - dmd_copy_low_to_high (); - sprintf ("SHOOT %d MARTIANS", martians_needed); - font_render_string_center (&font_fixed6, 64, 16, sprintf_buffer); - dmd_show_low (); - for (;;) - { - dmd_show_other (); - task_sleep (TIME_250MS); - } -} - -void martian_kill_deff (void) -{ - dmd_alloc_pair (); - dmd_clean_page_low (); - sprintf ("%d", martians_needed); - font_render_string_center (&font_lucida9, 64, 16, sprintf_buffer); - dmd_copy_low_to_high (); - dmd_invert_page (dmd_low_buffer); - dmd_show_low (); - task_sleep (TIME_200MS); - dmd_show_other (); - task_sleep (TIME_500MS); - deff_exit (); -} - -void gi_strobe_leff (void) -{ - U8 i; - gi_leff_disable (PINIO_GI_STRINGS); - for (;;) - { - for (i=0; i < 3; i++) - { - gi_leff_enable (TRIAC_GI_STRING (i)); - task_sleep (TIME_300MS); - gi_leff_disable (TRIAC_GI_STRING (i)); - } - } -} - -void gi_flash_leff (void) -{ - for (;;) - { - gi_leff_enable (PINIO_GI_STRINGS); - task_sleep (TIME_500MS); - gi_leff_disable (PINIO_GI_STRINGS); - task_sleep (TIME_500MS); - } -} - -void chal_level_lamp_set (void) -{ - lamplist_apply (chal_shot_lamplists[chal_shot_lit], lamp_flash_on); -} - -void chal_level_lamp_reset (void) -{ - if (martians_needed == 0) - { - lamplist_apply (chal_shot_lamplists[chal_shot_lit], lamp_flash_off); - lamplist_apply (chal_shot_lamplists[chal_shot_lit], lamp_on); - } -} - -void chal_level_lamp_erase (void) -{ - U8 i; - for (i=0; i < 7; i++) - { - lamplist_apply (chal_shot_lamplists[i], lamp_flash_off); - lamplist_apply (chal_shot_lamplists[i], lamp_off); - } -} - -void chal_endgame (void) -{ - flipper_disable (); - leff_start (LEFF_TILT); - in_tilt = TRUE; - callset_invoke (tilt); -} - -void chal_timer_task (void) -{ - leff_stop (LEFF_GI_FLASH); - leff_start (LEFF_GI_STROBE); - task_sleep (TIME_500MS); - while (chal_timer > 0) - { - do { - task_sleep (TIME_166MS); - } while (system_timer_pause ()); - chal_timer--; - task_sleep (TIME_166MS); - chal_timer--; - task_sleep (TIME_166MS); - chal_timer--; - } - task_sleep (TIME_1500MS); - if (ball_saves) - { - ball_saves--; - martians_needed = martians_max; - if (martians_max < 20) - martians_max += 5; - lamplist_apply (LAMPLIST_MARTIANS, lamp_flash_on); - lamplist_apply (chal_shot_lamplists[chal_shot_lit], lamp_flash_off); - leff_stop (LEFF_GI_STROBE); - leff_start (LEFF_GI_FLASH); - } - else - { - chal_endgame (); - } - task_exit (); -} - -void chal_timer_reset (void) -{ - chal_timer = chal_timer_reset_value; - martians_needed = 0; - task_recreate_gid (GID_CHALLENGE_TIMER, chal_timer_task); -} - -void chal_finish_phase (void) -{ - chal_level_lamp_erase (); - - /* Reverse the direction of the shots */ - chal_shot_direction = -chal_shot_direction; - - /* Reset the next shot lit: it is the same as the last one made */ - chal_shot_lit += chal_shot_direction; - - /* Decrease the timer starting value. The sequence is: - 30, 25, 20, 15 */ - if (chal_timer_reset_value > 15 * TIMER_MULT) - chal_timer_reset_value -= 5 * TIMER_MULT; - - /* TODO - because the last shot is always a loop shot, catch it - in the bumpers and hopefully it will fall into the SoL hole so - that the finish effects can play out. Maybe disable the jets - during this time to increase likelihood... */ -} - -void chal_advance_level (void) -{ - chal_level_lamp_reset (); - - score_copy (chal_shot_score, score_table[SC_100]); - score_long (chal_shot_score); - /* TODO : time bonus */ - - deff_start (DEFF_CHAL_AWARD); - chal_level++; - chal_shot_lit += chal_shot_direction; - - if (chal_shot_lit == 7 || chal_shot_lit == 0xFF) - { - deff_start (DEFF_CHAL_PHASE_FINISHED); - chal_finish_phase (); - } - - /* Timer resets on every shot made */ - chal_timer_reset (); - - dbprintf ("lit = %d, dir = %d\n", chal_shot_lit, chal_shot_direction); - chal_level_lamp_set (); -} - -void chal_collect (U8 shot) -{ - if (shot == chal_shot_lit && !martians_needed) - { - chal_advance_level (); - } -} - -CALLSET_ENTRY (chal, left_loop_shot) -{ chal_collect (CS_LEFT_LOOP); } -CALLSET_ENTRY (chal, left_ramp_shot) -{ chal_collect (CS_LEFT_RAMP); } -CALLSET_ENTRY (chal, center_ramp_shot) -{ chal_collect (CS_CENTER_RAMP); } -CALLSET_ENTRY (chal, any_motor_bank) -{ chal_collect (CS_FORCEFIELD); } -CALLSET_ENTRY (chal, dev_right_hole_enter) -{ chal_collect (CS_RIGHT_HOLE); } -CALLSET_ENTRY (chal, right_ramp_shot) -{ chal_collect (CS_RIGHT_RAMP); } -CALLSET_ENTRY (chal, right_loop_shot) -{ chal_collect (CS_RIGHT_LOOP); } - -CALLSET_ENTRY (chal, any_martian) -{ - if (martians_needed) - { - deff_start (DEFF_MARTIAN_KILL); - task_sleep (TIME_33MS); - martians_needed--; - if (!martians_needed) - { - chal_level_lamp_set (); - lamplist_apply (LAMPLIST_MARTIANS, lamp_flash_off); - chal_timer_reset (); - } - } -} - -CALLSET_ENTRY (chal, device_update) -{ - /* TODO - loop gates should remain open except - on the final shot of the phase, to divert the ball - briefly to allow the end phase effects to be seen */ - /* TODO - motor bank should remain up */ - /* TODO - lock should open for first level to make - the shot easier */ -} - -CALLSET_ENTRY (chal, display_update) -{ - if (in_live_game && valid_playfield) - { - if (martians_needed) - deff_start_bg (DEFF_CHAL_SUDDEN_DEATH, PRI_GAME_MODE1); - else - deff_start_bg (DEFF_CHAL_RUNNING, PRI_GAME_MODE1); - } -} - -CALLSET_ENTRY (chal, start_player) -{ - ball_saves = 2; - chal_level = 0; - chal_level_lamp_set (); - chal_shot_lit = 0; - chal_shot_direction = 1; - martians_max = 5; - chal_timer_reset_value = 30U * TIMER_MULT; - chal_timer_reset (); -} - -CALLSET_ENTRY (chal, start_ball) -{ - task_kill_gid (GID_CHALLENGE_TIMER); -} - -CALLSET_ENTRY (chal, valid_playfield) -{ - chal_timer_reset (); - ball_up = system_config.balls_per_game; -} - -CALLSET_BOOL_ENTRY (chal, ball_drain) -{ - if (mb_mode_running_count ()) - { - dbprintf ("Multiball drain\n"); - return TRUE; - } - else if (martians_needed) - { - dbprintf ("Sudden death drain\n"); - return TRUE; - } - else if (ball_saves > 0) - { - dbprintf ("Ball saved\n"); - ball_saves--; - serve_ball_auto (); - return FALSE; - } - else - { - dbprintf ("No ball saves\n"); - return TRUE; - } -} - diff --git a/machine/afm/deffs.c b/machine/afm/deffs.c deleted file mode 100644 index b5a9b7c99..000000000 --- a/machine/afm/deffs.c +++ /dev/null @@ -1,250 +0,0 @@ -/* - * 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 - -/* Library calls */ - -void message_end (void) -{ - dmd_show_low (); - task_sleep (TIME_2S+TIME_166MS); - deff_exit (); -} - -void message1 (const font_t *f, const char *line) -{ - dmd_alloc_low_clean (); - font_render_string_center (f, 64, 16, line); - message_end (); -} - -void message2 (const font_t *f, const char *line1, const char *line2) -{ - dmd_alloc_low_clean (); - font_render_string_center (f, 64, 10, line1); - font_render_string_center (f, 64, 22, line2); - message_end (); -} - -/* AFM display effects */ - -const char *shot_names[] = { - "LEFT LOOP", "LEFT RAMP", "CENTER RAMP", - "RIGHT RAMP", "RIGHT LOOP" -}; - -const char *jackpot_levels[] = { - "SUPER", "DOUBLE SUPER", "TRIPLE SUPER", "4X SUPER" -}; - -const char *luck_awards[] = { - "BIG POINTS", - "LIGHT MARTIAN ATTACK", - "JACKPOT", - "ADD-A-BALL", - "ADD TIME", - "START 2X SCORING", - "ADD TO JACKPOT", - "SPOT MARTIAN", -}; - -void jackpot_deff (void) -{ - dmd_alloc_low_clean (); - font_render_string_center (&font_fixed6, 64, 10, "JACKPOT"); - sprintf_score (last_score); - font_render_string_center (&font_fixed6, 64, 22, sprintf_buffer); - dmd_show_low (); - task_sleep (TIME_2S+TIME_166MS); - deff_exit (); -} - -void pf_mult_advance_deff (void) -{ - message1 (&font_fixed6, "ADV. MULTIPLIER"); -} - -void pf_mult_shot_deff (void) -{ - message1 (&font_fixed10, "ADVANCE SHOT"); -} - -void martian_spell (bool on) -{ - const char text[] = "MARTIAN"; - const char *s; - U8 x = 16; - U8 i; - char c[2]; - - s = text; - i = 0; - while (*s) - { - bool b = lamp_test (lamplist_index (LAMPLIST_MARTIANS, i)); - if (!on) - b = !b; - if (b) - { - c[0] = *s; - c[1] = '\0'; - font_render_string_center (&font_times8, x, 11, c); - } - x += 16; - s++; - i++; - } -} - -void martian_advance_deff (void) -{ - dmd_alloc_pair (); - dmd_clean_page_low (); - martian_spell (TRUE); - font_render_string_center (&font_var5, 64, 25, "COMPLETE FOR EXTRA TIME"); - dmd_copy_low_to_high (); - martian_spell (FALSE); - dmd_show2 (); - task_sleep (TIME_2S); - deff_exit (); -} - -void martian_spelled_deff (void) -{ - dmd_alloc_pair (); - dmd_clean_page_low (); - martian_spell (TRUE); - font_render_string_center (&font_var5, 64, 25, "EXTRA TIME ADDED"); - dmd_copy_low_to_high (); - dmd_show2 (); - task_sleep (TIME_2S+TIME_500MS); - deff_exit (); -} - -void luck_lit_deff (void) -{ - message2 (&font_fixed6, "STROKE OF LUCK", "IS LIT"); -} - -void luck_award_deff (void) -{ - const char *award = luck_awards[0]; - message2 (&font_fixed6, "STROKE OF LUCK", award); -} - -void mb_running_deff (void) -{ - extern U8 mb_targets_left; - -target_change: - dmd_map_overlay (); - frame_draw (IMG_UFO); - font_render_string_center (&font_mono5, 92, 5, "MULTIBALL"); - dmd_rough_copy (64, 2, 64, 6); - if (mb_targets_left == 0) - sprintf ("SUPER JACKPOT LIT"); - else if (mb_targets_left == 1) - sprintf ("%d TARGET LEFT", mb_targets_left); - else - sprintf ("%d TARGETS LEFT", mb_targets_left); - font_render_string_center (&font_var5, 88, 27, sprintf_buffer); - - U8 t = mb_targets_left; -score_change: - for (;;) - { - dmd_map_overlay (); - sprintf_current_score (); - dmd_rough_erase (64, 11, 64, 10); - font_render_string_center (&font_mono9, 92, 16, sprintf_buffer); - dmd_rough_copy (64, 11, 64, 10); - - for (;;) - { - score_update_start (); - dmd_map_overlay (); - dmd_dup_mapped (); - dmd_show2 (); - task_sleep (TIME_200MS); - if (score_update_required ()) - goto score_change; - - dmd_map_overlay (); - dmd_dup_mapped (); - dmd_rough_erase (64, 11, 64, 10); - dmd_flip_low_high (); - dmd_rough_erase (64, 11, 64, 10); - dmd_flip_low_high (); - dmd_show2 (); - task_sleep (TIME_200MS); - if (score_update_required ()) - goto score_change; - } - } -} - -void mb_super_award_deff (void) -{ - dmd_alloc_low_clean (); - font_render_string_center (&font_fixed6, 64, 10, "SUPER JACKPOT"); - sprintf_score (last_score); - font_render_string_center (&font_fixed6, 64, 22, sprintf_buffer); - dmd_show_low (); - task_sleep (TIME_3S); - deff_exit (); -} - -void mb_increase_jackpot_deff (void) -{ - extern score_t mb_super_value; - dmd_alloc_low_clean (); - font_render_string_center (&font_mono5, 64, 7, "SUPER JACKPOT AT"); - sprintf_score (mb_super_value); - font_render_string_center (&font_fixed6, 64, 16, sprintf_buffer); - dmd_show_low (); - task_sleep (TIME_2S); - deff_exit (); -} - -void attack_lit_deff (void) -{ - message2 (&font_fixed6, "MARTIAN ATTACK", "IS LIT"); -} - -void attack_running_deff (void) -{ - for (;;) - { - dmd_alloc_low_clean (); - font_render_string_center (&font_mono5, 64, 5, "MARTIAN ATTACK"); - sprintf_current_score (); - font_render_string_center (&font_fixed6, 64, 16, sprintf_buffer); - dmd_show_low (); - do { - task_sleep (TIME_166MS); - } while (!score_update_required ()); - } -} - -void attack_score_deff (void) { deff_exit (); } - -void jet_deff (void) { deff_exit (); } -void jet_level_up_deff (void) { deff_exit (); } diff --git a/machine/afm/images/eiffel.pgm b/machine/afm/images/eiffel.pgm deleted file mode 100644 index 28444e24f..000000000 --- a/machine/afm/images/eiffel.pgm +++ /dev/null @@ -1,4100 +0,0 @@ -P2 -# CREATOR: GIMP PNM Filter Version 1.1 -128 32 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -219 -191 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -217 -170 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -228 -157 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -225 -155 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -221 -155 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -220 -153 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -217 -152 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -215 -150 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -213 -149 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -208 -145 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -205 -144 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -206 -144 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -203 -142 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -197 -140 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -188 -136 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -170 -134 -238 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -230 -148 -138 -178 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -156 -138 -139 -135 -251 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -140 -255 -255 -156 -231 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -172 -175 -255 -255 -218 -174 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -241 -149 -232 -255 -255 -255 -138 -242 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -186 -146 -241 -248 -248 -248 -160 -180 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -205 -159 -158 -162 -162 -162 -162 -159 -158 -222 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -164 -135 -135 -135 -135 -136 -135 -135 -136 -169 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -221 -136 -140 -134 -159 -166 -171 -162 -148 -139 -141 -249 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -251 -139 -137 -168 -255 -255 -255 -255 -255 -255 -185 -137 -156 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -150 -136 -205 -255 -255 -255 -255 -255 -255 -255 -255 -172 -135 -223 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -194 -135 -168 -255 -255 -255 -255 -255 -255 -255 -255 -255 -251 -135 -145 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 diff --git a/machine/afm/images/rocket.pgm b/machine/afm/images/rocket.pgm deleted file mode 100644 index 15d6d9507..000000000 --- a/machine/afm/images/rocket.pgm +++ /dev/null @@ -1,4100 +0,0 @@ -P2 -# CREATOR: GIMP PNM Filter Version 1.1 -128 32 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -191 -153 -182 -160 -176 -175 -174 -183 -211 -239 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -101 -253 -210 -199 -255 -255 -255 -246 -217 -188 -171 -154 -163 -161 -159 -158 -180 -208 -236 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -116 -255 -200 -198 -255 -255 -255 -255 -255 -255 -255 -208 -255 -255 -255 -254 -230 -200 -169 -148 -145 -143 -141 -138 -156 -193 -231 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -144 -255 -243 -195 -255 -255 -255 -255 -255 -255 -255 -197 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -232 -191 -149 -121 -116 -112 -127 -169 -212 -249 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -141 -255 -233 -198 -255 -255 -255 -255 -255 -255 -255 -206 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -238 -196 -155 -118 -101 -98 -131 -143 -143 -143 -143 -143 -143 -144 -147 -149 -151 -153 -155 -157 -159 -161 -163 -165 -167 -169 -171 -173 -175 -178 -180 -187 -232 -229 -223 -223 -223 -223 -223 -223 -217 -126 -180 -183 -183 -183 -182 -95 -66 -55 -100 -218 -223 -223 -223 -223 -223 -249 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -132 -255 -204 -191 -255 -255 -255 -255 -255 -255 -255 -196 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -199 -251 -183 -119 -141 -169 -237 -235 -233 -232 -230 -228 -226 -224 -222 -220 -218 -148 -194 -211 -181 -0 -0 -0 -0 -100 -192 -170 -95 -137 -146 -148 -150 -152 -154 -156 -158 -92 -180 -183 -183 -183 -183 -183 -175 -148 -137 -142 -147 -150 -153 -155 -158 -78 -152 -250 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -128 -182 -145 -144 -177 -178 -178 -179 -180 -180 -181 -142 -181 -181 -181 -181 -182 -182 -182 -182 -186 -193 -201 -206 -200 -193 -186 -179 -172 -167 -175 -187 -198 -210 -213 -221 -226 -249 -185 -185 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -209 -198 -255 -251 -3 -0 -0 -0 -81 -255 -255 -207 -205 -255 -255 -255 -255 -255 -255 -255 -181 -216 -255 -255 -255 -255 -189 -37 -0 -0 -157 -255 -255 -255 -255 -255 -192 -206 -114 -157 -238 -223 -153 -237 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -132 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -159 -191 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -245 -169 -255 -255 -30 -0 -0 -0 -42 -255 -255 -239 -190 -255 -255 -255 -255 -255 -255 -255 -186 -186 -255 -255 -255 -255 -197 -122 -0 -0 -127 -255 -255 -255 -255 -255 -190 -255 -255 -145 -159 -147 -56 -119 -125 -128 -125 -114 -163 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -130 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -167 -193 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -249 -167 -255 -255 -33 -0 -0 -0 -44 -255 -255 -218 -188 -255 -255 -174 -203 -172 -255 -255 -180 -202 -255 -255 -255 -255 -211 -82 -33 -42 -186 -255 -255 -255 -255 -255 -188 -255 -232 -153 -155 -146 -76 -128 -135 -145 -144 -138 -175 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -121 -185 -139 -142 -185 -185 -185 -185 -184 -184 -184 -134 -190 -189 -188 -190 -194 -197 -201 -205 -208 -212 -216 -217 -209 -200 -191 -182 -173 -170 -170 -170 -169 -169 -169 -202 -204 -209 -185 -198 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -225 -197 -255 -253 -5 -0 -0 -0 -43 -185 -187 -156 -151 -197 -203 -196 -190 -193 -211 -203 -152 -199 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -180 -208 -69 -166 -240 -221 -156 -246 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -127 -255 -187 -189 -255 -255 -255 -255 -255 -255 -255 -187 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -203 -222 -157 -141 -127 -187 -237 -236 -234 -232 -230 -228 -226 -224 -222 -220 -218 -171 -196 -219 -194 -0 -0 -0 -0 -53 -137 -130 -59 -64 -87 -87 -87 -87 -87 -87 -84 -64 -52 -171 -194 -190 -185 -180 -177 -171 -166 -162 -157 -153 -148 -143 -139 -82 -151 -251 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -153 -255 -197 -194 -255 -255 -255 -255 -255 -255 -255 -196 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -244 -203 -162 -120 -85 -77 -88 -131 -145 -148 -151 -152 -154 -155 -156 -157 -159 -160 -161 -163 -164 -165 -166 -168 -169 -170 -172 -173 -174 -176 -178 -181 -187 -233 -244 -240 -236 -232 -231 -231 -231 -231 -199 -183 -183 -183 -183 -183 -101 -51 -54 -115 -229 -231 -231 -231 -231 -231 -252 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -173 -255 -197 -199 -255 -255 -255 -255 -255 -255 -255 -198 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -237 -198 -156 -114 -86 -79 -93 -132 -174 -216 -251 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -136 -255 -202 -202 -255 -255 -255 -255 -255 -255 -255 -201 -254 -255 -254 -230 -199 -168 -137 -116 -118 -118 -120 -139 -172 -204 -236 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -129 -253 -214 -199 -255 -255 -242 -212 -182 -152 -130 -116 -123 -127 -126 -147 -176 -206 -236 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -200 -126 -144 -125 -144 -141 -152 -180 -207 -235 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 diff --git a/machine/afm/images/ufo.pgm b/machine/afm/images/ufo.pgm deleted file mode 100644 index 05239f0d0..000000000 --- a/machine/afm/images/ufo.pgm +++ /dev/null @@ -1,4100 +0,0 @@ -P2 -# CREATOR: GIMP PNM Filter Version 1.1 -128 32 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -247 -233 -222 -220 -220 -218 -214 -223 -234 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -254 -208 -205 -231 -230 -229 -229 -227 -221 -214 -198 -176 -243 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -176 -233 -229 -228 -226 -227 -228 -227 -220 -211 -200 -188 -151 -225 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -158 -231 -227 -225 -222 -221 -221 -221 -219 -212 -204 -193 -181 -166 -130 -235 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -179 -197 -225 -221 -219 -216 -214 -213 -213 -209 -203 -194 -183 -170 -155 -137 -130 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -108 -226 -218 -214 -210 -207 -207 -197 -177 -169 -164 -166 -170 -156 -142 -124 -98 -228 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -115 -219 -209 -204 -204 -179 -152 -143 -147 -147 -143 -137 -130 -133 -125 -108 -90 -143 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -253 -230 -209 -191 -163 -103 -209 -200 -165 -124 -117 -125 -129 -131 -130 -128 -123 -116 -108 -102 -92 -102 -90 -184 -198 -214 -234 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -248 -222 -182 -165 -173 -179 -187 -192 -60 -161 -88 -90 -99 -105 -110 -114 -115 -114 -112 -108 -102 -95 -92 -104 -112 -96 -201 -194 -188 -181 -173 -189 -227 -249 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -242 -180 -157 -166 -174 -182 -190 -198 -206 -217 -57 -61 -70 -78 -85 -90 -95 -97 -98 -98 -96 -92 -87 -91 -105 -119 -114 -123 -212 -212 -205 -197 -189 -181 -173 -164 -190 -245 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -244 -151 -149 -157 -165 -175 -183 -192 -201 -210 -215 -196 -74 -50 -57 -64 -71 -76 -79 -81 -83 -82 -80 -78 -88 -104 -122 -143 -60 -181 -183 -202 -215 -207 -198 -189 -180 -171 -163 -155 -163 -249 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -153 -133 -142 -151 -159 -168 -177 -186 -195 -203 -213 -209 -189 -176 -234 -18 -51 -56 -60 -63 -66 -66 -66 -65 -84 -102 -122 -127 -150 -170 -160 -180 -198 -215 -207 -199 -190 -181 -172 -163 -155 -146 -138 -164 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -228 -122 -121 -129 -138 -147 -155 -164 -173 -181 -190 -198 -206 -214 -206 -188 -170 -200 -184 -139 -31 -32 -43 -49 -50 -64 -89 -76 -211 -191 -160 -166 -183 -201 -214 -208 -200 -192 -183 -175 -166 -158 -149 -141 -132 -123 -127 -238 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -201 -96 -104 -113 -121 -129 -137 -146 -153 -162 -170 -177 -185 -192 -199 -207 -212 -210 -202 -186 -193 -207 -220 -171 -139 -172 -221 -204 -196 -176 -187 -202 -210 -211 -207 -200 -193 -185 -178 -170 -162 -155 -146 -138 -130 -122 -113 -105 -97 -211 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -194 -77 -86 -93 -101 -108 -116 -124 -131 -139 -146 -153 -159 -166 -172 -179 -184 -190 -195 -200 -205 -210 -213 -211 -209 -208 -209 -210 -213 -213 -209 -204 -199 -194 -189 -183 -177 -171 -165 -158 -151 -145 -137 -130 -123 -115 -107 -99 -92 -85 -76 -205 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -219 -55 -63 -70 -77 -85 -92 -99 -106 -113 -119 -125 -132 -138 -144 -149 -154 -159 -164 -167 -171 -174 -177 -179 -181 -182 -183 -183 -182 -181 -179 -176 -174 -170 -167 -162 -157 -153 -147 -142 -136 -130 -123 -117 -111 -103 -97 -90 -83 -75 -68 -60 -48 -231 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -218 -63 -62 -50 -59 -66 -73 -79 -86 -91 -98 -103 -109 -114 -119 -123 -128 -132 -136 -140 -142 -144 -147 -149 -150 -151 -151 -151 -150 -149 -148 -145 -144 -141 -137 -134 -130 -125 -121 -115 -111 -105 -100 -94 -88 -82 -75 -69 -62 -55 -46 -42 -212 -180 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -254 -152 -85 -228 -53 -45 -51 -57 -62 -68 -73 -78 -84 -88 -92 -97 -100 -103 -107 -110 -112 -115 -117 -118 -118 -120 -119 -120 -118 -117 -117 -115 -113 -110 -108 -104 -100 -98 -93 -89 -84 -79 -75 -69 -64 -58 -52 -43 -64 -33 -169 -153 -160 -245 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -219 -137 -148 -117 -154 -50 -186 -35 -37 -44 -56 -61 -64 -68 -72 -75 -78 -80 -82 -84 -85 -87 -88 -88 -88 -88 -88 -87 -86 -84 -82 -80 -78 -75 -72 -68 -64 -61 -56 -45 -43 -29 -84 -197 -122 -176 -160 -138 -113 -172 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -247 -161 -82 -107 -120 -132 -127 -190 -142 -68 -129 -83 -180 -115 -32 -41 -44 -41 -47 -42 -45 -41 -45 -46 -44 -50 -44 -47 -38 -44 -42 -38 -36 -141 -107 -181 -76 -117 -165 -115 -158 -137 -124 -104 -80 -53 -112 -234 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -239 -147 -27 -26 -48 -65 -86 -104 -111 -97 -114 -102 -169 -121 -120 -159 -92 -164 -125 -212 -143 -144 -173 -94 -169 -120 -197 -125 -127 -142 -93 -131 -111 -119 -112 -95 -76 -59 -39 -23 -13 -5 -113 -221 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -171 -76 -1 -0 -0 -5 -12 -18 -25 -30 -36 -44 -50 -60 -62 -69 -66 -71 -71 -68 -70 -62 -61 -51 -48 -39 -32 -27 -21 -15 -8 -0 -0 -0 -0 -0 -60 -144 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -170 -72 -32 -0 -0 -0 -0 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -0 -0 -0 -0 -26 -61 -149 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -194 -115 -26 -0 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -0 -17 -27 -97 -175 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -40 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -129 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -67 -56 -56 -56 -56 -56 -56 -56 -56 -56 -56 -56 -57 -53 -152 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -177 -48 -113 -110 -106 -106 -106 -106 -106 -110 -110 -83 -219 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -178 -148 -115 -107 -105 -111 -125 -168 -200 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 diff --git a/machine/afm/images/worldmap.pgm b/machine/afm/images/worldmap.pgm deleted file mode 100644 index 0381a7c3a..000000000 --- a/machine/afm/images/worldmap.pgm +++ /dev/null @@ -1,4100 +0,0 @@ -P2 -# CREATOR: GIMP PNM Filter Version 1.1 -128 32 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -253 -233 -183 -130 -64 -19 -19 -30 -64 -147 -214 -223 -196 -181 -149 -109 -59 -30 -24 -48 -115 -116 -143 -193 -212 -212 -235 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -254 -246 -241 -239 -242 -244 -245 -249 -255 -255 -255 -255 -255 -255 -255 -252 -243 -251 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -228 -230 -255 -223 -85 -41 -197 -135 -37 -31 -99 -153 -242 -133 -37 -14 -14 -14 -14 -15 -14 -14 -15 -14 -14 -14 -14 -14 -96 -233 -255 -255 -255 -255 -255 -255 -255 -254 -217 -189 -169 -163 -170 -193 -253 -242 -245 -252 -255 -248 -214 -194 -195 -214 -238 -253 -255 -255 -255 -255 -255 -255 -255 -255 -252 -150 -135 -197 -252 -253 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -248 -214 -193 -214 -233 -205 -225 -211 -213 -223 -174 -182 -140 -107 -142 -214 -255 -242 -116 -53 -57 -41 -14 -15 -15 -14 -14 -14 -14 -15 -14 -14 -14 -54 -169 -255 -255 -255 -255 -255 -255 -255 -255 -255 -251 -213 -196 -222 -251 -249 -253 -255 -255 -255 -255 -255 -255 -255 -255 -255 -234 -206 -216 -246 -255 -255 -255 -255 -255 -255 -255 -251 -229 -170 -108 -93 -132 -178 -242 -255 -255 -255 -255 -255 -255 -236 -221 -229 -248 -247 -248 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -169 -130 -163 -173 -142 -180 -227 -215 -196 -201 -199 -176 -151 -129 -160 -216 -252 -255 -255 -255 -255 -248 -157 -22 -15 -14 -15 -14 -14 -14 -15 -19 -102 -150 -206 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -252 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -166 -125 -187 -255 -255 -221 -231 -237 -240 -208 -139 -67 -14 -14 -14 -14 -14 -28 -93 -84 -142 -162 -161 -162 -178 -255 -255 -255 -214 -190 -230 -232 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -211 -118 -42 -45 -99 -119 -143 -191 -233 -243 -219 -205 -182 -209 -245 -224 -126 -39 -40 -57 -178 -236 -166 -116 -215 -137 -109 -90 -52 -23 -66 -186 -245 -255 -255 -248 -184 -20 -14 -14 -14 -14 -17 -23 -21 -119 -215 -255 -255 -255 -251 -245 -252 -255 -255 -255 -255 -255 -255 -240 -185 -109 -70 -125 -208 -241 -252 -254 -254 -255 -246 -216 -219 -233 -246 -215 -52 -122 -65 -16 -24 -42 -14 -14 -14 -14 -15 -14 -14 -14 -14 -15 -15 -15 -14 -16 -46 -15 -16 -15 -14 -14 -14 -37 -70 -111 -164 -215 -241 -212 -183 -218 -227 -230 -252 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -181 -100 -38 -14 -14 -14 -14 -14 -14 -14 -21 -15 -14 -14 -14 -14 -20 -41 -61 -57 -41 -37 -30 -18 -14 -22 -56 -163 -243 -255 -204 -53 -52 -90 -196 -255 -253 -201 -16 -14 -14 -19 -88 -197 -243 -250 -255 -227 -170 -159 -230 -255 -255 -255 -255 -255 -255 -255 -240 -104 -25 -17 -30 -24 -14 -40 -131 -196 -178 -103 -52 -36 -32 -27 -20 -14 -18 -46 -88 -47 -21 -15 -14 -15 -15 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -15 -14 -14 -14 -14 -14 -15 -15 -14 -14 -14 -14 -14 -14 -14 -15 -14 -14 -40 -75 -91 -141 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -242 -232 -121 -29 -14 -14 -14 -14 -14 -14 -14 -14 -15 -15 -15 -14 -14 -15 -14 -14 -14 -14 -15 -14 -20 -64 -184 -192 -203 -220 -190 -121 -125 -94 -212 -255 -255 -255 -242 -126 -26 -75 -199 -255 -255 -255 -255 -255 -220 -194 -214 -255 -255 -242 -251 -255 -255 -241 -150 -43 -14 -56 -137 -127 -14 -20 -21 -31 -23 -14 -14 -14 -15 -15 -14 -14 -15 -14 -14 -14 -14 -15 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -15 -14 -14 -14 -14 -14 -14 -32 -47 -27 -14 -14 -31 -116 -222 -255 -255 -250 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -211 -126 -63 -92 -237 -255 -255 -206 -142 -82 -24 -14 -14 -15 -14 -14 -14 -14 -14 -14 -14 -14 -53 -208 -253 -255 -255 -221 -109 -14 -34 -190 -182 -225 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -251 -234 -240 -255 -226 -81 -88 -19 -97 -208 -210 -104 -53 -30 -17 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -15 -15 -14 -16 -42 -100 -159 -163 -159 -206 -202 -147 -153 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -241 -244 -247 -246 -246 -255 -255 -255 -255 -255 -255 -215 -49 -16 -14 -15 -14 -14 -14 -14 -14 -14 -14 -15 -19 -40 -100 -206 -218 -115 -14 -14 -14 -14 -55 -168 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -246 -192 -123 -185 -255 -255 -239 -171 -183 -190 -122 -34 -14 -14 -14 -14 -15 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -133 -229 -255 -255 -255 -255 -199 -63 -106 -247 -243 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -251 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -248 -229 -109 -29 -14 -15 -14 -14 -14 -14 -14 -14 -15 -14 -14 -14 -44 -70 -47 -14 -15 -34 -74 -102 -118 -170 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -253 -229 -241 -175 -137 -114 -65 -14 -14 -14 -14 -14 -14 -15 -14 -14 -14 -14 -15 -15 -14 -14 -14 -15 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -15 -15 -15 -14 -65 -168 -223 -255 -255 -223 -231 -252 -255 -255 -255 -251 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -126 -23 -14 -14 -14 -14 -14 -14 -14 -14 -19 -78 -131 -71 -27 -23 -18 -18 -67 -168 -242 -232 -190 -206 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -194 -68 -14 -14 -14 -16 -33 -21 -14 -14 -16 -29 -62 -95 -55 -14 -15 -26 -63 -23 -15 -18 -16 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -15 -14 -14 -14 -70 -176 -241 -236 -247 -243 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -245 -82 -14 -15 -14 -14 -14 -14 -14 -14 -15 -14 -14 -35 -31 -33 -23 -25 -137 -242 -252 -252 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -238 -59 -31 -15 -71 -202 -234 -181 -143 -133 -71 -14 -37 -202 -195 -195 -176 -93 -14 -34 -194 -62 -14 -14 -15 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -15 -14 -14 -14 -21 -121 -227 -255 -209 -181 -231 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -174 -57 -14 -15 -14 -14 -14 -14 -14 -14 -15 -15 -14 -15 -14 -61 -215 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -246 -139 -117 -175 -209 -180 -175 -244 -211 -235 -223 -208 -230 -92 -71 -40 -15 -14 -14 -22 -126 -63 -22 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -61 -163 -190 -102 -255 -243 -149 -109 -173 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -212 -99 -19 -14 -14 -15 -15 -14 -14 -14 -14 -16 -14 -99 -217 -255 -255 -255 -251 -253 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -246 -92 -15 -14 -14 -14 -14 -109 -199 -232 -221 -209 -221 -236 -244 -87 -14 -14 -15 -14 -14 -14 -14 -15 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -44 -160 -255 -245 -128 -131 -174 -225 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -237 -174 -118 -23 -14 -14 -42 -126 -205 -210 -253 -149 -171 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -246 -239 -224 -61 -18 -14 -15 -14 -15 -14 -14 -15 -16 -16 -15 -15 -17 -86 -69 -29 -14 -16 -51 -202 -104 -27 -14 -14 -14 -14 -15 -15 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -15 -15 -14 -35 -151 -255 -254 -247 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -247 -245 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -253 -234 -157 -34 -14 -87 -229 -255 -255 -255 -202 -173 -195 -232 -251 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -190 -23 -14 -14 -15 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -15 -14 -134 -102 -21 -14 -16 -55 -57 -104 -187 -235 -198 -126 -31 -14 -14 -14 -14 -34 -64 -18 -14 -15 -14 -14 -21 -74 -142 -210 -247 -253 -249 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -247 -229 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -210 -111 -67 -103 -128 -26 -201 -255 -247 -229 -230 -206 -239 -249 -251 -253 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -252 -255 -234 -138 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -14 -36 -160 -153 -14 -14 -23 -62 -172 -246 -255 -255 -255 -162 -40 -14 -67 -176 -255 -255 -144 -53 -14 -17 -85 -255 -255 -255 -241 -235 -248 -255 -255 -255 -255 -255 -255 -253 -255 -255 -255 -255 -255 -255 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -247 -158 -22 -156 -255 -255 -253 -249 -236 -252 -231 -232 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -247 -252 -237 -146 -14 -14 -14 -15 -15 -14 -14 -15 -15 -14 -14 -14 -14 -14 -15 -15 -14 -21 -87 -177 -200 -255 -249 -252 -255 -255 -255 -255 -255 -74 -95 -213 -255 -255 -249 -255 -196 -96 -23 -30 -142 -247 -255 -246 -194 -176 -255 -255 -255 -255 -255 -253 -248 -255 -255 -255 -255 -255 -254 -252 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -241 -216 -197 -135 -35 -21 -23 -30 -70 -168 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -248 -179 -19 -14 -14 -14 -14 -14 -14 -14 -15 -14 -14 -14 -14 -14 -14 -15 -14 -16 -21 -48 -220 -254 -255 -255 -255 -255 -255 -246 -229 -204 -220 -255 -255 -254 -250 -235 -223 -218 -224 -246 -255 -255 -255 -223 -186 -221 -255 -242 -251 -252 -251 -255 -247 -238 -251 -255 -255 -255 -255 -250 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -253 -255 -255 -221 -111 -14 -15 -15 -15 -14 -14 -14 -83 -246 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -251 -220 -219 -244 -255 -227 -151 -20 -14 -15 -14 -14 -14 -14 -14 -15 -14 -14 -65 -199 -254 -255 -255 -255 -255 -255 -255 -246 -253 -255 -255 -255 -255 -255 -255 -194 -157 -196 -255 -229 -157 -32 -137 -250 -252 -250 -255 -255 -255 -255 -255 -251 -255 -255 -255 -255 -253 -252 -255 -253 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -254 -246 -240 -253 -255 -133 -14 -15 -14 -14 -14 -14 -14 -17 -42 -122 -104 -175 -232 -250 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -253 -254 -246 -54 -15 -14 -15 -14 -14 -14 -14 -14 -32 -140 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -169 -112 -192 -194 -44 -89 -136 -187 -236 -240 -230 -183 -178 -206 -237 -250 -244 -246 -253 -255 -255 -254 -249 -255 -234 -246 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -158 -30 -14 -14 -14 -14 -14 -15 -14 -14 -14 -14 -14 -14 -68 -203 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -254 -215 -49 -14 -14 -14 -14 -14 -14 -14 -114 -233 -255 -255 -255 -251 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -251 -226 -186 -200 -224 -232 -233 -233 -232 -240 -250 -205 -109 -64 -120 -187 -245 -245 -233 -242 -255 -255 -255 -255 -244 -248 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -244 -148 -14 -14 -14 -15 -14 -14 -14 -14 -14 -14 -14 -54 -164 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -252 -63 -14 -14 -14 -14 -15 -15 -14 -83 -195 -246 -228 -250 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -254 -250 -251 -246 -195 -112 -215 -255 -232 -237 -242 -250 -255 -253 -250 -251 -255 -255 -255 -255 -255 -255 -253 -243 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -254 -246 -252 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -212 -67 -18 -14 -14 -14 -14 -15 -15 -14 -14 -113 -240 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -253 -201 -45 -14 -15 -14 -14 -14 -14 -38 -164 -255 -180 -26 -233 -249 -252 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -193 -74 -14 -14 -14 -94 -103 -60 -101 -255 -255 -255 -255 -255 -249 -236 -255 -255 -243 -247 -255 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -251 -251 -254 -249 -251 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -246 -167 -25 -14 -14 -14 -15 -14 -14 -37 -142 -229 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -87 -17 -14 -14 -14 -15 -14 -192 -255 -212 -117 -120 -250 -255 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -240 -105 -36 -19 -14 -15 -15 -15 -14 -14 -14 -21 -80 -238 -255 -255 -255 -252 -248 -255 -255 -255 -255 -254 -252 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -254 -252 -254 -255 -255 -255 -251 -255 -252 -254 -255 -255 -255 -255 -255 -255 -255 -255 -241 -138 -23 -14 -14 -15 -14 -21 -131 -250 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -207 -69 -14 -15 -14 -14 -162 -243 -255 -251 -245 -249 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -232 -55 -14 -15 -14 -14 -14 -14 -15 -15 -15 -14 -15 -96 -229 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -236 -105 -21 -14 -14 -17 -41 -114 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -138 -38 -29 -62 -170 -249 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -111 -34 -31 -60 -107 -120 -62 -37 -21 -14 -14 -19 -154 -242 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -208 -15 -14 -14 -14 -89 -221 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -253 -250 -249 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -251 -247 -250 -254 -255 -255 -254 -254 -147 -27 -14 -80 -243 -255 -255 -255 -255 -255 -255 -183 -212 -247 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -245 -166 -14 -14 -139 -239 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -248 -217 -236 -254 -255 -255 -255 -255 -254 -228 -191 -214 -246 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -236 -143 -14 -86 -226 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -254 -223 -125 -243 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -227 -116 -15 -186 -249 -255 -253 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -252 -235 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -253 -248 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -252 -229 -188 -203 -242 -248 -248 -255 -255 -255 -255 -255 -249 -246 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -253 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 diff --git a/machine/afm/misc.c b/machine/afm/misc.c deleted file mode 100644 index 5f2a88cf9..000000000 --- a/machine/afm/misc.c +++ /dev/null @@ -1,8 +0,0 @@ - -#include - - -CALLSET_ENTRY (misc, any_pf_switch) -{ -} - diff --git a/machine/afm/newrules.txt b/machine/afm/newrules.txt deleted file mode 100644 index 6d950c2fc..000000000 --- a/machine/afm/newrules.txt +++ /dev/null @@ -1,173 +0,0 @@ - -Timed Play ----------- -The game is timed; you begin with 90 seconds on the clock (configurable). -When the timer reaches zero, the flippers are disabled and the game will soon end. - -Timers are paused in various cases: the ball is in the jets, a kickout is -being held, and briefly after any Jackpot/Super Jackpot is scored. - -You can extend the game by completing the set of MARTIAN standup targets. -Each target scores 10K unlit, 25K already lit, or 50K when flashing. -Getting all targets lit scores a bonus of 500K+250K and adds 30 seconds. -Note that the timer will not exceed 60 seconds at any time though. -(Extra time configurable.) - -For the first completion, all targets begin flashing, and already lit -targets in the same bank will spot an adjacent flashing target. For the -second round, all targets flash but there is no spotting. For the third -and subsequent rounds, the targets must be hit in order, one at a time. - -There is no penalty for draining, except that Martian Attack and -Double Scoring rounds end like an endball. - -The game cannot end while a timed or multiball mode is running (Double Scoring, -Martian Attack, or the regular Multiball). When the timer expires while one -of these is true, then that condition goes away, there is a brief grace period -before the game truly ends. (This is the same as the mode's grace period.) -During any of these grace periods, you can "restart" the -game by restarting one of those conditions, or adding to the timer. - -The "blue lamps" will show the time left by expiring the lamps as the -timer decreases. Each lamp starts on, then blinks, then blinks rapidly, -then goes off. - - -The 5 Shots ------------ -The main 5 scoring shots of the game are: Left Loop, Left Ramp, Center Ramp, -Right Ramp, and Right Loop. Each can be lit for Jackpot, and each can count -up to 3 total shots. - -At the start of the game, each shot has a base value of 100K and is lit -for a Jackpot. -Collecting all 5 Jackpots adds a ball into play, and relights all Jackpots. -See "Multiball" below. - -Each additional hit to the same shot increases the shot value for the rest of -the game: 100K+20K to a maximum of 200K (6 shots). The shot value -is tracked separately per shot. The 1, 2, 3 lamps for each shot indicate -the score value (flashing is the next shot to be awarded, lit if already -awarded, unlit otherwise). - -On every 3rd shot, Double Scoring is started/advanced; see below. - -When lit for Jackpot, the shot value is awarded, plus the Jackpot Value. -Jackpot value depends on Combos; 100K normally, or 150K if it's the last -shot of a 2-way combo, then 200K, etc. - -The Center Ramp never opens for Lock in these rules. -Idea: maybe open Lock on a Stroke of Luck award to make it easier to collect. - -Multiball ---------- -Multiball is starting/advanced by making all Jackpots. Doing so immediately -adds one ball into play, possibly extending a previously multiball. You can -have up to 4 balls in play. The number of balls in play affects the multiplier -for the Super Jackpot (2 balls=SJ, 3=Double SJ, 4=Quadruple SJ) only. - -All other scoring features continue as usual during Multiball. The only -difference is the availability of a Super Jackpot at the Saucer Hole. - -The base Super Jackpot value is 500K. During non-multiball play, the value -is increased by 25K for each hit to the center 3-bank, which is up. The -maximum value is 1.5M. (Each target also scores 25K right away.) - -In multiball, the 3-bank is lowered to reveal the saucer. The drop target is -initially UP. You must first score a certain number of saucer target/drop hits, -then collect it. Initially you need 5 hits to qualify the Super. Each hit is -50K, or 250K in qualifying. This is also multiplied by balls in play. - -Thereafter it takes 5 more hits for each Super, up to a maximum of 15 hits. -Progress towards a Super is remembered if multiball ends. Also, the value -of the Super increases by 250K for each one collected, up to the 1.5M maximum. - -During multiball, you can continue to advance the 5 shots again to try to add a ball, -start Double Scoring, or extend the game time. - -There is a brief (5 second) ball saver each time a ball is added to play; during -this, mode timers are paused. - -Each Super scored advances one light on the City Ladder. Collecting 5 Supers -starts "Attack Mars". - - -Double Scoring --------------- -On every 3rd shot (the 140K or 200K scores), Double Scoring is started/advanced. -The playfield multiplier is increased by 1, and the timer is reset to 15 seconds. -So if you have 6 seconds left of 2X, and you complete another 3rd shot, it -boosts the multiplier to 3X and resets to 15 seconds. - -Double Scoring ends whenever a ball drains. - -The shot made to start DS does not reset its lamps again until Double Scoring -times out completely, so you must make other shots instead to try to stack them. -It is theoretically possible to get 6X scoring if all are active simultaneously. -Try to stack this with multiball :) - -The factory Super Jackpot moving sound ticks off while this mode runs. - - -Stroke of Luck --------------- -Completing the inlane/outlane lamps as usual lights Stroke of Luck. The awards are -pseudorandom. - -You can light more than Stroke of Luck award at a time; they will stack. - -The algorithm is as follows. Each of the major awards is given at most once per -game, until all awards have been given. They are awarded top to bottom, -skipping if conditions do not allow it at the time. - - - Awards 1, 4, 7,... - - Jackpot (not if only 1 Jackpot lit) - - Light Martian Attack (not if it is already lit) - - Spot Martian (not if Martian Attack is running) - - Double Scoring (not if already running) - - Awards 2, 5, 8... - - Increase Jackpot - - Increase Super Jackpot - - Big Points - - Awards 3, 6, 9... - Add 15 Seconds (every 3rd award gives this) - - -Martian Attack --------------- -Jet Bumpers count up towards lighting Martian Attack. Initially it takes 25 jets to -light, then 30, then 35 etc. - -Martian Attack can be stacked, by not collecting it and then lighting it again -with more jets or a Stroke of Luck award. - -When collected, Martian targets score an additional 50K per hit (in addition to the -default points) for 20 seconds. If you restart it again due to stacking, the timer -is reset 20 seconds, and the value is increased to 100K each, etc. - - -Bonus X -------- -Completing the Bonus X lanes does not award Bonus X - there is no bonus in this game :) - -Instead it temporarily boosts the value of the jet hits that follow. Each jet is -normally 5K each, but the lanes boost to 6K, 7K, etc. up to 10K each. The multiplier -times out when the ball leaves the jets. This works in multiball too. - -Inlane/outlane/bonus X switches score 1K each. - - -Attack Mars ------------ -After the 5th Super Jackpot, Attack Mars mode starts. The game timer is paused completely. -All 4 balls are launched into play (if necessary). The target bank goes back UP. -A jackpot value of 1M is lit at the 3-bank and begins to count down to 500K. -Any target hit collects the value; completing the bank also collects the value (2X hit). -There is a 30 second ballsaver, after which drained balls are not returned, and the jackpot -value stops counting. -Every hit pauses the hurryup countdown for a few seconds. -When multiball ends, you reset back to City #1 to defend for the next round. - diff --git a/machine/afm/rules.c b/machine/afm/rules.c deleted file mode 100644 index b4fc740ae..000000000 --- a/machine/afm/rules.c +++ /dev/null @@ -1,541 +0,0 @@ -/* - * 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 -#include -#include -#include - -/* Shot table */ - -enum shot_id { - S_LEFT_LOOP = 0, - S_LEFT_RAMP, - S_CENTER_RAMP, - S_RIGHT_RAMP, - S_RIGHT_LOOP, - S_COUNT, -}; - -/* Jackpots */ - -__local__ score_t jackpot_value[S_COUNT]; - -void jackpot_reset (void) -{ - lamplist_apply (LAMPLIST_JACKPOTS, lamp_off); - lamplist_apply (LAMPLIST_JACKPOTS, lamp_flash_on); -} - -void jackpot_shot (enum shot_id id) -{ - U8 lamp = lamplist_index (LAMPLIST_JACKPOTS, id); - score_long (jackpot_value[id]); - if (lamp_flash_test (lamp)) - { - deff_start (DEFF_JACKPOT); - lamp_flash_off (lamp); - lamp_on (lamp); - } - score_add (jackpot_value[id], score_table[SC_20K]); -} - -CALLSET_ENTRY (jackpot, left_loop_shot) { jackpot_shot (S_LEFT_LOOP); } -CALLSET_ENTRY (jackpot, left_ramp_shot) { jackpot_shot (S_LEFT_RAMP); } -CALLSET_ENTRY (jackpot, center_ramp_shot) { jackpot_shot (S_CENTER_RAMP); } -CALLSET_ENTRY (jackpot, right_ramp_shot) { jackpot_shot (S_RIGHT_RAMP); } -CALLSET_ENTRY (jackpot, right_loop_shot) { jackpot_shot (S_RIGHT_LOOP); } - -CALLSET_ENTRY (jackpot, start_player) -{ - jackpot_reset (); -} - -/* Playfield Multiplier */ - -U8 shot_multiplier; -U8 ball_count_multiplier; -U8 pf_mult_count[S_COUNT]; - -U8 pf_mult_timer; - -void pf_mode_exit (void); - -struct timed_mode_ops pf_mult_mode = { - DEFAULT_MODE, - .exit = pf_mode_exit, - .gid = GID_PF_MULT_MODE, - .timer = &pf_mult_timer, - .init_timer = 15, - .grace_timer = 3, -}; - -const U8 pf_lamplists[S_COUNT] = { - LAMPLIST_L_LOOP_COUNT, - LAMPLIST_L_RAMP_COUNT, - LAMPLIST_LOCKS, - LAMPLIST_R_RAMP_COUNT, - LAMPLIST_R_LOOP_COUNT, -}; - -void pf_mult_update (void) -{ - score_multiplier_set (shot_multiplier * ball_count_multiplier); -} - -void pf_mult_shot_reset (enum shot_id id) -{ - pf_mult_count[id] = 0; - lamplist_apply (pf_lamplists[id], lamp_off); - lamplist_apply (pf_lamplists[id], lamp_flash_off); - lamp_flash_on (lamplist_index (pf_lamplists[id], 0)); -} - -void pf_mode_exit (void) -{ - U8 n; - for (n=0; n < S_COUNT; n++) - if (pf_mult_count[n] == 3) - pf_mult_shot_reset (n); -} - -void pf_mult_shot (enum shot_id id) -{ - if (pf_mult_count[id] < 3) - { - lamp_tristate_on (lamplist_index (pf_lamplists[id], pf_mult_count[id])); - pf_mult_count[id]++; - if (pf_mult_count[id] < 3) - lamp_flash_on (lamplist_index (pf_lamplists[id], pf_mult_count[id])); - else - timed_mode_begin (&pf_mult_mode); - } -} - -extern void mb_add_ball (void); - -CALLSET_ENTRY (pf_mult, left_loop_shot) { pf_mult_shot (S_LEFT_LOOP); } -CALLSET_ENTRY (pf_mult, left_ramp_shot) { pf_mult_shot (S_LEFT_RAMP); } -CALLSET_ENTRY (pf_mult, center_ramp_shot) { pf_mult_shot (S_CENTER_RAMP); mb_add_ball (); } -CALLSET_ENTRY (pf_mult, right_ramp_shot) { pf_mult_shot (S_RIGHT_RAMP); } -CALLSET_ENTRY (pf_mult, right_loop_shot) { pf_mult_shot (S_RIGHT_LOOP); } - -CALLSET_ENTRY (pf_mult, start_ball, end_ball) -{ - shot_multiplier = ball_count_multiplier = 1; - pf_mult_update (); -} - -CALLSET_ENTRY (pf_mult, start_player) -{ - memset (pf_mult_count, 0, sizeof (pf_mult_count)); -} - -CALLSET_ENTRY (pf_mult, ball_count_change) -{ - if (live_balls > 1) - { - ball_count_multiplier = live_balls; - pf_mult_update (); - } -} - -/* Add Time */ - -__local__ U8 add_time_level; - -void add_time_reset (void) -{ - lamplist_apply (LAMPLIST_MARTIANS, lamp_off); - lamplist_apply (LAMPLIST_MARTIANS, lamp_flash_on); -} - -void add_time_award (void) -{ - add_time_level++; - add_time_reset (); -} - -void add_time_martian (U8 id) -{ - callset_invoke (any_martian_target); - if (lamp_flash_test (id)) - { - lamp_tristate_on (id); - if (lamplist_test_all (LAMPLIST_MARTIANS, lamp_test)) - { - add_time_award (); - deff_start (DEFF_MARTIAN_SPELLED); - } - else - { - deff_start (DEFF_MARTIAN_ADVANCE); - } - } -} - -CALLSET_ENTRY (add_time, sw_martian_1) { add_time_martian (LM_MARTIAN_1); } -CALLSET_ENTRY (add_time, sw_martian_2) { add_time_martian (LM_MARTIAN_2); } -CALLSET_ENTRY (add_time, sw_martian_3) { add_time_martian (LM_MARTIAN_3); } -CALLSET_ENTRY (add_time, sw_martian_4) { add_time_martian (LM_MARTIAN_4); } -CALLSET_ENTRY (add_time, sw_martian_5) { add_time_martian (LM_MARTIAN_5); } -CALLSET_ENTRY (add_time, sw_martian_6) { add_time_martian (LM_MARTIAN_6); } -CALLSET_ENTRY (add_time, sw_martian_7) { add_time_martian (LM_MARTIAN_7); } - -CALLSET_ENTRY (add_time, start_player) -{ - add_time_level = 0; - add_time_reset (); -} - -/* Stroke of Luck */ - -__local__ U8 luck_count_lit; -__local__ U8 luck_count_given; - -void lower_lane_score (U8 id) -{ - score (SC_5K); - lamp_on (id); - if (lamplist_test_all (LAMPLIST_BOTTOM_LANES, lamp_test)) - { - lamplist_apply (LAMPLIST_BOTTOM_LANES, lamp_off); - deff_start (DEFF_LUCK_LIT); - luck_count_lit++; - } -} - -CALLSET_ENTRY (luck, sw_left_outlane) { lower_lane_score (LM_LEFT_OUTLANE); } -CALLSET_ENTRY (luck, sw_left_inlane) { lower_lane_score (LM_LEFT_INLANE); } -CALLSET_ENTRY (luck, sw_right_inlane) { lower_lane_score (LM_RIGHT_INLANE); } -CALLSET_ENTRY (luck, sw_right_outlane) { lower_lane_score (LM_RIGHT_OUTLANE); } -CALLSET_ENTRY (luck, sw_left_button) -{ lamplist_rotate_previous (LAMPLIST_BOTTOM_LANES, matrix_lookup (LMX_DEFAULT)); } -CALLSET_ENTRY (luck, sw_right_button) -{ lamplist_rotate_next (LAMPLIST_BOTTOM_LANES, matrix_lookup (LMX_DEFAULT)); } - -CALLSET_ENTRY (luck, right_hole_front_shot) -{ - if (luck_count_lit) - { - luck_count_lit--; - luck_count_given++; - } -} - -CALLSET_ENTRY (luck, start_player) -{ - luck_count_lit = luck_count_given = 0; -} - -CALLSET_ENTRY (luck, lamp_update) -{ - lamp_flash_if (LM_STROKE_OF_LUCK, luck_count_lit); -} - - -/* Multiball */ - -#define MB_MAX_BALLS 4 - -__local__ U8 mb_count; -__local__ U8 mb_target_level; -U8 mb_targets_left; -score_t mb_super_value; - -struct fixed_ladder mb_super_score_rule = { - .base = score_table[SC_500K], - .increment = score_table[SC_25K], - .max = score_table[SC_1M], - .current = mb_super_value, -}; - -bool mb_running_p (void) -{ - return live_balls > 1; -} - -void mb_super_reset (void) -{ - mb_target_level = 3; - mb_targets_left = mb_target_level; -} - -void mb_target_award (void) -{ - if (mb_targets_left > 0) - { - mb_targets_left--; - score_update_request (); - score (SC_50K); - } - else - { - score (SC_10K); - } -} - -void mb_super_award (void) -{ - score_long (mb_super_value); - drop_target_reset (); - if (mb_target_level < 15) - mb_target_level += 3; - mb_targets_left = mb_target_level; -} - -void mb_add_ball (void) -{ - if (live_balls < MB_MAX_BALLS) - add_ball_count (1); -} - -CALLSET_ENTRY (mb, sw_motor_bank_1, sw_motor_bank_2, sw_motor_bank_3) -{ - if (!mb_running_p ()) - { - fixed_ladder_advance (&mb_super_score_rule); - score (SC_25K); - deff_start (DEFF_MB_INCREASE_JACKPOT); - } -} - -CALLSET_ENTRY (mb, sw_l_saucer_tgt, sw_r_saucer_tgt, drop_target_down) -{ - if (mb_running_p ()) - mb_target_award (); -} - -CALLSET_ENTRY (mb, dev_left_hole_enter) -{ - if (mb_running_p ()) - { - if (mb_targets_left == 0) - mb_super_award (); - } -} - -CALLSET_ENTRY (mb, single_ball_play) -{ -} - -CALLSET_ENTRY (mb, start_player) -{ - mb_count = 0; - fixed_ladder_reset (&mb_super_score_rule); - mb_super_reset (); -} - -CALLSET_ENTRY (mb, display_update) -{ - if (mb_running_p ()) - deff_start_bg (DEFF_MB_RUNNING, 0); -} - -/* Martian Attack */ - -__local__ U8 attack_lit; -__local__ U16 attack_hits; - -U8 attack_timer; -struct timed_mode_ops attack_mode = { - DEFAULT_MODE, - .gid = GID_ATTACK_MODE, - .deff_running = DEFF_ATTACK_RUNNING, - .timer = &attack_timer, - .init_timer = 20, - .grace_timer = 4, -}; - -void attack_light (void) -{ - attack_lit++; - deff_start (DEFF_ATTACK_LIT); -} - -CALLSET_ENTRY (attack, any_martian_target) -{ - if (timed_mode_running_p (&attack_mode)) - { - deff_start (DEFF_ATTACK_SCORE); - attack_hits++; - } -} - -CALLSET_ENTRY (attack, right_hole_front_shot) -{ - if (attack_lit) - { - attack_lit--; - timed_mode_begin (&attack_mode); - } -} - -CALLSET_ENTRY (attack, end_ball) -{ - timed_mode_end (&attack_mode); -} - -CALLSET_ENTRY (attack, lamp_update) -{ - lamp_flash_if (LM_MARTIAN_ATTACK, attack_lit); -} - -CALLSET_ENTRY (attack, display_update) -{ - timed_mode_display_update (&attack_mode); -} - -CALLSET_ENTRY (attack, start_player) -{ - attack_lit = 0; - attack_hits = 0; -} - -/* Jet Value */ - -__local__ U8 jet_count_goal; -__local__ U8 jet_count; -score_t jet_value; - -void jet_level_up (void) -{ - if (jet_count_goal < 100) - jet_count_goal += 10; - jet_count = 0; - attack_light (); -} - -void upper_lane_score (U8 id) -{ - score (SC_5K); -} - -CALLSET_ENTRY (jet, any_jet) {} -CALLSET_ENTRY (jet, sw_left_top_lane) { upper_lane_score (LM_L_TOP_LANE); } -CALLSET_ENTRY (jet, sw_right_top_lane) { upper_lane_score (LM_R_TOP_LANE); } -CALLSET_ENTRY (jet, sw_left_button) -{ lamplist_rotate_next (LAMPLIST_TOP_LANES, matrix_lookup (LMX_DEFAULT)); } -CALLSET_ENTRY (jet, sw_right_button) -{ lamplist_rotate_previous (LAMPLIST_TOP_LANES, matrix_lookup (LMX_DEFAULT)); } - -CALLSET_ENTRY (jet, sw_left_jet, sw_bottom_jet, sw_right_jet) -{ - score_long (jet_value); -} - -CALLSET_ENTRY (jet, start_player) -{ - jet_count_goal = 30; - jet_count = 0; - score_copy (jet_value, score_table[SC_5K]); -} - -/* Device update rules */ - -CALLSET_ENTRY (divertor_rule, device_update) -{ - divertor_stop (); -} - -CALLSET_ENTRY (drop_rule, drop_target_down) -{ - /* In multiball, the drop should be re-raised until - the Super Jackpot is qualified. */ - if (mb_targets_left != 0) - drop_target_reset (); -} - -CALLSET_ENTRY (motor_bank_rule, device_update) -{ - if (mb_running_p ()) - motor_bank_move_down (); - else - motor_bank_move_up (); -} - - -/* Timed game rules */ - -__local__ U8 game_timer; -__local__ U8 timed_game_locks; -task_ticks_t game_delay; - -void timed_game_update (void) -{ - if (game_delay) - game_delay -= TIME_200MS; -} - -bool timed_game_pause_p (void) -{ - if (game_delay) - return TRUE; - return system_timer_pause (); -} - -void timed_game_delay (task_ticks_t ticks) -{ - game_delay += ticks; - if (game_delay >= TIME_3S) - game_delay = TIME_3S; -} - -void new_timed_game_extend (U8 secs) -{ -} - -void timed_game_lock (U8 reason) -{ - timed_game_locks |= reason; -} - -void timed_game_unlock (U8 reason) -{ - timed_game_locks &= ~reason; -} - -struct timed_mode_ops timed_game_mode = { - DEFAULT_MODE, - .gid = GID_TIMED_GAME_MODE, - .update = timed_game_update, - .pause = timed_game_pause_p, - .timer = &game_timer, - .init_timer = 60, - .grace_timer = 4, -}; - -CALLSET_ENTRY (timed_game, start_player) -{ -} - -CALLSET_ENTRY (timed_game, start_ball, valid_playfield) -{ -} - -CALLSET_ENTRY (timed_game, end_ball) -{ -} - -CALLSET_ENTRY (timed_game, lamp_update) -{ -} - diff --git a/machine/afm/shot.c b/machine/afm/shot.c deleted file mode 100644 index 997e54a5c..000000000 --- a/machine/afm/shot.c +++ /dev/null @@ -1,134 +0,0 @@ - -#include - -/* - * Loop detection - */ - -CALLSET_ENTRY (shot, sw_left_loop_low) -{ - callset_invoke (left_loop_shot); -} - -CALLSET_ENTRY (shot, sw_left_loop_high) -{ -} - -CALLSET_ENTRY (shot, sw_right_loop_low) -{ - if (!global_flag_test (GLOBAL_FLAG_BALL_AT_PLUNGER)) - { - set_valid_playfield (); - callset_invoke (right_loop_shot); - } -} - -CALLSET_ENTRY (shot, sw_right_loop_high) -{ - if (!global_flag_test (GLOBAL_FLAG_BALL_AT_PLUNGER)) - { - set_valid_playfield (); - } -} - -/* - * Ramp detection - */ - -CALLSET_ENTRY (shot, sw_left_ramp_exit) -{ - callset_invoke (left_ramp_shot); -} - -CALLSET_ENTRY (shot, sw_center_ramp_enter) -{ - free_timer_start (TIM_CENTER_RAMP_ENTERED, TIME_3S); -} - -CALLSET_ENTRY (shot, sw_right_ramp_enter) -{ - free_timer_start (TIM_RIGHT_RAMP_ENTERED, TIME_2S); -} - -CALLSET_ENTRY (shot, sw_right_ramp_exit) -{ - if (free_timer_test (TIM_CENTER_RAMP_ENTERED)) - { - callset_invoke (center_ramp_shot); - free_timer_stop (TIM_CENTER_RAMP_ENTERED); - } - if (free_timer_test (TIM_RIGHT_RAMP_ENTERED)) - { - callset_invoke (right_ramp_shot); - free_timer_stop (TIM_CENTER_RAMP_ENTERED); - } -} - -/* - * Center hole / ball lock - */ - -CALLSET_ENTRY (shot, sw_center_trough) -{ - free_timer_restart (TIM_CENTER_TROUGH_ENTERED, TIME_3S); -} - -CALLSET_ENTRY (shot, dev_left_hole_enter) -{ - if (free_timer_test (TIM_CENTER_TROUGH_ENTERED)) - { - callset_invoke (center_hole_shot); - } - else - { - callset_invoke (lock_lane_shot); - } -} - -/* - * Stroke of Luck front/back - */ - -CALLSET_ENTRY (shot, sw_left_jet, sw_bottom_jet, sw_right_jet) -{ - callset_invoke (any_jet); - free_timer_restart (TIM_BALL_IN_JETS, TIME_4S); -} - -CALLSET_ENTRY (shot, sw_left_top_lane, sw_right_top_lane) -{ - free_timer_restart (TIM_BALL_IN_JETS, TIME_4S); -} - -CALLSET_ENTRY (shot, dev_right_hole_enter) -{ - if (free_timer_test (TIM_BALL_IN_JETS)) - { - callset_invoke (right_hole_back_shot); - } - else - { - callset_invoke (right_hole_front_shot); - } -} - -/* - * Standup targets - */ - -CALLSET_ENTRY (shot, sw_motor_bank_1, sw_motor_bank_2, sw_motor_bank_3) -{ - callset_invoke (any_motor_bank); -} - - -CALLSET_ENTRY (shot, sw_martian_1, sw_martian_2, sw_martian_3, sw_martian_4) -{ - callset_invoke (any_martian); -} - -CALLSET_ENTRY (shot, sw_martian_5, sw_martian_6, sw_martian_7) -{ - callset_invoke (any_martian); -} - diff --git a/machine/bop/Makefile b/machine/bop/Makefile deleted file mode 100644 index 888996e4b..000000000 --- a/machine/bop/Makefile +++ /dev/null @@ -1,60 +0,0 @@ - -# -# Game specific Makefile extensions -# - -MACHINE_FILE = bop.md - -# Define the name of the GAME_ROM. This is -# optional; you can delete it and a suitable -# default will be taken. -GAME_ROM_PREFIX = fbop - -# Set ROM_PAGE_COUNT to the number of 16KB pages -# that should be present in the output image. -# The hardware supports a maximum of 64 pages; -# you can't exceed this. -# -# The 'system' will always reside in the uppermost -# two pages. If the ROM is less than a full 64 -# pages, then the pages are numbered from [N..64] -# anyway. -# -# 128KB.....8 pages -# 256KB.....16 pages -# 512KB.....32 pages -# 1MB...... 64 pages -# -ROM_PAGE_COUNT = 16 # L9 uses a larger ROM - -################################################# -# -# Simulation options. -# -# These options control the way that the game -# ROM is made available to pinmame for testing. -# They are only used during installation into -# the pinmame roms directory. -# -################################################# - -MACHINE_MAJOR = 0 -MACHINE_MINOR = 0 - -PINMAME_MACHINE = bop_l7 - -PINMAME_GAME_ROM = tmbopl_7.rom - -PINMAME_OTHER_ROMS = Mach_u* - -# -# Object files exported by this game -# - -GAME_OBJS = - -GAME_PAGED_OBJS = leffs.o skill.o outhole.o jets.o head.o \ - lanes.o loop.o centreramp.o leftramp.o bop_spinner.o - -GAME_INCLUDES = - diff --git a/machine/bop/bop.md b/machine/bop/bop.md deleted file mode 100644 index 4f2bb25e0..000000000 --- a/machine/bop/bop.md +++ /dev/null @@ -1,401 +0,0 @@ -#-------------------------------------------------------------------------- -# Machine description for The Machine: Bride of Pinbot -# (C) Copyright 2007, 2009, 2010 by Brian Dominy -# -# See tools/genmachine for more information about the format of this file. -#-------------------------------------------------------------------------- - -# This file describes many characteristics of a pinball machine, -# mostly physical stuff, although some rules can be coded here also. - -########################################################################## -# General section (before a [section] header is given. -# Miscellaneous parameters are specified here. -########################################################################## -Title: Bride of Pinbot -include platform/wpc/wpc89.md - -#Pinmame-Zip: -#Pinmame-ROM: -#Lamp-Matrix-Width: -#Lamp-Matrix-Height: - -########################################################################## -# Use 'define' to emit a plain #define for anything not covered by -# some other means. -########################################################################## -#define MACHINE_SYS11_SOUND -#define MACHINE_SCORE_DIGITS -#define MACHINE_MUSIC_GAME -#define MACHINE_MUSIC_PLUNGER -#define MACHINE_REPLAY_SCORE_CHOICES 10 -#define MACHINE_REPLAY_START_CHOICE 5 -#define MACHINE_DEBUGGER_HOOK -#define MACHINE_OUTHOLE_KICK_HOOK -define MACHINE_BALL_SAVE_TIME 0 -define MACHINE_MAX_BALLS 2 - -#define MACHINE_CUSTOM_AMODE -define MACHINE_GRAND_CHAMPION_INITIALS { 'L', 'E', 'D' } -define MACHINE_GRAND_CHAMPION_SCORE { 0x00, 0x15, 0x00, 0x00, 0x00 } -define MACHINE_HIGH_SCORE_INITIALS { 'B', 'C', 'D' }, { 'Q', 'Q', 'Q' }, { 'D', 'E', 'H' }, { 'J', 'N', 'D' } -define MACHINE_HIGH_SCORES { 0x00, 0x10, 0x00, 0x00, 0x00 }, { 0x00, 0x09, 0x00, 0x00, 0x00 }, { 0x00, 0x08, 0x00, 0x00, 0x00 }, { 0x00, 0x07, 0x00, 0x00, 0x00 } - -########################################################################## -# Lamp Description -# The key is given in column/row format. The first parameter must be -# the lamp name. Optionally you can specify a color, and x() and y() -# for the location on the playfield. Only a subset of lamp colors are -# recognized; see tools/genmachine for details. Lamp location is -# given in terms of the Lamp-Matrix-Width and Lamp-Matrix-Height. -########################################################################## -[lamps] -11: Left Outlane -12: Left Inlane -13: Right Inlane -14: Right Outlane -15: Left Standup -16: Right Top Standup -17: Right Bottom Standup -18: Shoot Again, shoot-again -21: SW Lite Jackpot -22: BW Lite Billion -23: BW Extra Ball -24: SW Lite Extra Ball -25: SW 50K -26: SW 100K -27: Values x2 -28: Spin SW -31: SW 250K -32: BW 10M -33: BW 50M -34: BW Special -35: BW 5M -36: BW 1M -37: Space Shuttle -38: Launch Pad -41: Skill Shot 50K -42: Skill Shot 75K -43: Skill Shot 100K -44: Skill Shot 200K -45: Skill Shot 25K -46: Left Eye -47: Right Eye -48: Mouth -51: Left Loop 500K -52: Left Loop 100K -53: Left Loop 50K -54: Left Loop 25K -55: Right Loop 500K -56: Right Loop 100K -57: Right Loop 50K -58: Right Loop 25K -61: Centre Ramp 100K -62: Centre Ramp 500K -63: Centre Ramp 1M -64: Wire ball lock -65: Jet 500K -66: Jet 100K -67: Jet 50K -68: Jet 25K -71: Jackpot 8M -72: Jackpot 7M -73: Jackpot 6M -74: Jackpot 5M -75: Jackpot 4M -76: Jackpot 3M -77: Jackpot 2M -78: Jackpot 1M -81: Backglass Hip -82: Backglass Middle Leg -83: Backglass Knee -84: Backglass Foot -85: Backglass Shoulder -86: MPF 100K -87: MPF 200K -88: MPF 300K - - -########################################################################## -# Switch Description -# The key is in column/row format. The first parameter must be the switch -# name. Options can be given in any order: -# ingame - only service the switch during a game -# intest - also service the switch in test mode -# noplay - tripping this switch does NOT mark ball in play -# standup - this is a standup -# button - this is a button -# edge - this switch should be serviced on either transition -# opto - this switch is optical and activates on closed->open -# -# These parameters mark various well-known switches. Only one of these -# can exist per type: -# outhole, slam-tilt, tilt, shooter, start-button, buyin-button -# -# Use sound() to invoke a sound call automatically when the switch activates. -# Use lamp() to flicker a lamp automatically on activation. TODO: -# this requires the c_name, and not the friendly md name. -# Use c_decl() to override the default name of the switch event. -# -########################################################################## -[switches] -11: Right Flipper, button, intest, c_decl(sw_right_button) -12: Left Flipper, button, intest, c_decl(sw_left_button) -13: Start Button, start-button, intest -14: Plumb bob tilt, c_decl(sw_tilt), cabinet, tilt, ingame, noplay -15: Left Outlane -16: Left Inlane -17: Right Inlane -18: Right Outlane -21: Slam Tilt, slam-tilt, ingame, cabinet -23: Ticket Opto, cabinet, opto, noplay -25: Trough Right, noscore -26: Trough Center, noscore -27: Trough Left, noscore -28: Left Standup, standup -31: Skill Shot 50K -32: Skill Shot 75K -33: Skill Shot 100K -34: Skill Shot 200K -35: Skill Shot 25K -36: Right Top Standup, standup -37: Right Bottom Standup, standup -38: Outhole, outhole, noscore -41: Centre Ramp Made -43: Left Loop, ingame -44: Right Loop Top, ingame -45: Right Loop Bottom, ingame -46: Under Playfield Kickback -47: Enter Head -51: Spinner, ingame -52: Shooter, shooter, edge, noplay, debounce(TIME_200MS) -53: UR Jet, ingame, c_decl(jet_hit) -54: UL Jet, ingame, c_decl(jet_hit) -55: Lower Jet, ingame, c_decl(jet_hit) -56: Jet Sling, ingame, c_decl(jet_hit) -57: Left Sling, ingame -58: Right Sling, ingame -63: Left Eye, intest -64: Right Eye, intest -65: Mouth, intest -67: Face Position, edge, intest -71: Wireform Top -72: Wireform Bottom -73: Enter MPF -74: MPF Exit Left -75: MPF Exit Right -76: Left Ramp Enter -77: Centre Ramp Enter - -########################################################################## -# Drives -# This describes the names of the solenoid/motor drives. -# Hn = high power solenoids -# Ln = low power solenoids -# Gn = general purpose solenoids -# etc. -# -# The following options are supported: -# flash - this is a flasher (default is solenoid, flash implies nosearch) -# motor - this is a motor (default is solenoid) -# nosearch - do not activate this during ball search -# -# The following options denote well-known drives: -# knocker, ballserve -# -########################################################################## -[drives] -H1: Outhole -H2: Trough Release, ballserve -H3: UPF Kicker -H4: MPF Gate -H5: SShot Kicker -H6: Wire Post -H7: Knocker, knocker -H8: Mouth, nosearch - -L1: UL Jet -L2: Left Sling -L3: UR Jet -L4: Right Sling -L5: Lower Jet -L6: Jet Sling -L7: Left Eye, nosearch -L8: Right Eye, nosearch - -G1: Billion, flash -G2: Left Ramp, flash -G3: Jackpot, flash -G4: Skill Shot, flash -G5: Left Helmet, flash -G6: Right Helmet, flash -G7: Jets Enter, flash -G8: Left Loop, flash - -A1: Helmet Data, nosearch -A2: Helmet Clock, nosearch -A3: Head Motor Relay, nosearch -A4: Head Motor, motor, nosearch - -########################################################################## -# General Illumination -########################################################################## -[gi] -0: Backglass and body -1: Helmet -2: Rear playfield -3: Backglass only -4: Front Playfield -7: Flippers - -########################################################################## -# Tests -# These are additional test items that should appear in the TESTS menu. -########################################################################## -[tests] - - -########################################################################## -# Lampsets -# These denote logical groupings of lamps. -# The key is a textual name for the set. The options specify which lamps -# are a part of that set. You can specify 1 or more lamp values, -# separated by commas, where each value can be: 1) a single lamp name, -# 2) another lampset name, already defined, or 3) a lamp range in the -# form lamp1..lampN. -# -# The special construct PF:function indicates that a Perl subroutine -# should be used to select and sort the lamps. Some functions are -# builtin to genmachine; others can be defined by you and included -# via the 'perlinclude' directive. -# -# Note that a lampset may contain only one lamp. The lampset is the -# unit of 'allocation' for a lamp effect. -########################################################################## -[lamplists] -Playfield: PF:all -Lanes: Left Outlane..Right Outlane -Left loops: Left Loop 500K..Left Loop 25K -Right loops: Right Loop 500K..Right Loop 25K -Skillshot: Skill Shot 50K..Skill Shot 25K - -[containers] -Trough: trough, Trough Release, Trough Right, Trough Center, Trough Left, init_max_count(2) - -Head: Wire Post, init_max_count(0), Enter Head, Wireform Top, Wireform Bottom - -UPFKicker: UPF Kicker, init_max_count(0), Under Playfield Kickback - -SShotKicker: SShot Kicker, init_max_count(0), Skill Shot 50K - -#------------------------------------------------------------------------ -# The remaining sections describe software aspects, and not the physical -# machine. -#------------------------------------------------------------------------ - -########################################################################## -# Items for the Feature Adjustments menu. Parameters indicate the -# type of adjustment and the default value. -########################################################################## -[adjustments] - -########################################################################## -# Items for the Feature Audits menu. -########################################################################## -[audits] - -########################################################################## -# Sound calls for well-known events -########################################################################## -[system_sounds] -Add Coin: SND_COIN -Tilt Warning: SND_TILT_WARNING -Tilt: SND_TILT - -########################################################################## -# Music calls for well-known events -########################################################################## -[system_music] -Start Ball: MUS_MAIN1_PLUNGER -Ball In Play: MUS_MAIN1_1 -End Game: MUS_GAME_OVER -Volume Change: MUS_SECRET_FANFARE - -########################################################################## -# A list of all scores needed by the game rules. -########################################################################## -[scores] -110: -1K: -2570: -5K: -5130: -10K: -25K: -50K: -75K: -100K: -125K: -150K: -175K: -200K: -225K: -250K: -275K: -300K: -500K: -750K: -1M: - - -########################################################################## -# Bit flags. -########################################################################## -[flags] -Skillshot enabled: - -########################################################################## -# Display effects -########################################################################## -[deffs] -Skillshot: page(MACHINE_PAGE), PRI_GAME_QUICK6, D_QUEUED+D_PAUSE+D_SCORE -Jet Hit: page(MACHINE_PAGE), PRI_GAME_QUICK2, D_RESTARTABLE -Jets Level Up: page(MACHINE_PAGE), PRI_GAME_MODE3, D_QUEUED -Loop: page(MACHINE_PAGE), PRI_GAME_QUICK4, D_RESTARTABLE+D_SCORE -Centre Ramp: page(MACHINE_PAGE), PRI_GAME_QUICK5, D_RESTARTABLE -Shuttle Launch: page(MACHINE_PAGE), PRI_GAME_QUICK5, D_RESTARTABLE -Rollover Completed: page(MACHINE_PAGE), PRI_GAME_QUICK2, D_RESTARTABLE - -########################################################################## -# Lamp effects -########################################################################## -[leffs] -Amode: runner, PRI_LEFF1, LAMPS(PLAYFIELD), GI(ALL), page(MACHINE_PAGE) -#Circle Out: PRI_LEFF3, LAMPS(CIRCLE_OUT), page(MACHINE_PAGE) -#Shooter: PRI_LEFF2, page(MACHINE_PAGE) -#Skillshot: PRI_LEFF2, page(MACHINE_PAGE), LAMPS(SKILLSHOT) - -[timers] - -[templates] - -Left Sling: driver(spsol), sw=SW_LEFT_SLING, sol=SOL_LEFT_SLING, ontime=4, offtime=20 - -Right Sling: driver(spsol), sw=SW_RIGHT_SLING, sol=SOL_RIGHT_SLING, ontime=4, offtime=20 - -Jet Sling: driver(spsol), sw=SW_JET_SLING, sol=SOL_JET_SLING, ontime=4, offtime=20 - -UL Jet: driver(spsol), sw=SW_UL_JET, sol=SOL_UL_JET, ontime=4, offtime=20 - -UR Jet: driver(spsol), sw=SW_UR_JET, sol=SOL_UR_JET, ontime=4, offtime=20 - -Lower Jet: driver(spsol), sw=SW_LOWER_JET, sol=SOL_LOWER_JET, ontime=4, offtime=20 - -Spinner: driver(spinner), sw_event=sw_spinner, sw_number=SW_SPINNER - -Gate: driver(duty), sol=SOL_MPF_GATE, ontime=TIME_300MS, duty_ontime=TIME_33MS, duty_offtime=TIME_16MS, timeout=60 - -Head Motor: driver(duty), sol=SOL_HEAD_MOTOR, ontime=0, duty_ontime=TIME_33MS, duty_offtime=TIME_16MS, timeout=20 -Head Motor Relay: driver(duty), sol=SOL_HEAD_MOTOR_RELAY, ontime=0, duty_ontime=TIME_33MS, duty_offtime=TIME_16MS, timeout=20 - -Outhole: driver(outhole), sol=SOL_OUTHOLE, swno=SW_OUTHOLE, swevent=sw_outhole diff --git a/machine/bop/bop_spinner.c b/machine/bop/bop_spinner.c deleted file mode 100644 index 34ec41ba5..000000000 --- a/machine/bop/bop_spinner.c +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright 2010 by Ewan Meadows (sonny_jim@hotmail.com) - * - * 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 - -//sound_code_t spinner_sounds[] = { -// SND_SPINNER1, SND_SPINNER2, SND_SPINNER3, SND_SPINNER3 -//}; - -score_t spinner_total; - -CALLSET_ENTRY (bop_spinner, sw_spinner_slow) -{ - score (SC_1K); - score_add (spinner_total, score_table[SC_1K]); - sound_send (SND_SPINNER1 + random_scaled (4)); -} - -CALLSET_ENTRY (bop_spinner, start_ball) -{ - score_zero (spinner_total); -} diff --git a/machine/bop/centreramp.c b/machine/bop/centreramp.c deleted file mode 100644 index 36015b806..000000000 --- a/machine/bop/centreramp.c +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright 2010 by Ewan Meadows (sonny_jim@hotmail.com) - * - * 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 - -U8 centreramps; - -void centre_ramp_deff (void) -{ - seg_alloc_clean (); - seg_write_row_center (0, "HEARTBEAT"); - psprintf ("1 RAMP", "%d RAMPS", centreramps); - seg_write_row_center (1, sprintf_buffer); - seg_show (); - task_sleep_sec (2); - deff_exit (); -} - -CALLSET_ENTRY (centreramp, sw_centre_ramp_enter) -{ - if (event_did_follow (centre_ramp_enter, centre_ramp_fail)) - { - sound_send (SND_CENTRE_RAMP_FAIL); - } - else - { - sound_send (SND_CENTRE_RAMP_ENTER); - } - - event_can_follow (centre_ramp_enter, centre_ramp_made, TIME_3S); - event_can_follow (centre_ramp_enter, centre_ramp_fail, TIME_2S); -} - -CALLSET_ENTRY (centreramp, sw_centre_ramp_made) -{ - if (event_did_follow (centre_ramp_enter, centre_ramp_made)) - { - sound_send (SND_CENTRE_RAMP_1); - bounded_increment (centreramps, 254); - deff_start (DEFF_CENTRE_RAMP); - } - -} - -CALLSET_ENTRY (centreramp, start_ball) -{ - centreramps = 0; -} diff --git a/machine/bop/empty.c b/machine/bop/empty.c deleted file mode 100644 index 0de3d8049..000000000 --- a/machine/bop/empty.c +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright 2010 by Ewan Meadows (sonny_jim@hotmail.com) - * - * 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 diff --git a/machine/bop/head.c b/machine/bop/head.c deleted file mode 100644 index 49876d345..000000000 --- a/machine/bop/head.c +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright 2010 by Ewan Meadows (sonny_jim@hotmail.com) - * - * 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 - -CALLSET_ENTRY (head, sw_mouth) -{ - sol_request (SOL_MOUTH); - task_sleep_sec (1); -} - -CALLSET_ENTRY (head, sw_wireform_bottom) -{ - sol_request (SOL_WIRE_POST); - task_sleep_sec (1); -} diff --git a/machine/bop/jets.c b/machine/bop/jets.c deleted file mode 100644 index 41341ca3b..000000000 --- a/machine/bop/jets.c +++ /dev/null @@ -1,128 +0,0 @@ -/* - * Copyright 2010 by Ewan Meadows (sonny_jim@hotmail.com) - * - * 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 -U8 jets_hit; -__local__ U8 jets_level; -U8 jets_sound_index; - -sound_code_t jet_sounds[5][3] = { - { SND_POWER_UP1_1, SND_POWER_UP1_2, SND_POWER_UP1_3 }, - { SND_POWER_UP3_1, SND_POWER_UP3_2, SND_POWER_UP3_3 }, - { SND_POWER_UP4_1, SND_POWER_UP4_2, SND_POWER_UP4_3 }, - { SND_POWER_UP5_1, SND_POWER_UP5_2, SND_POWER_UP5_3 }, - { SND_POWER_UP6_1, SND_POWER_UP6_2, SND_POWER_UP6_3 } -}; - - -/* How much is earned for going up a level */ -const score_id_t jets_level_up_scores[] = { - SC_100K, SC_200K, SC_300K, SC_500K, SC_1M -}; - -const score_t jets_level_up_score_table[] = { - { SC_100K, SC_200K, SC_300K, SC_500K, SC_1M } -}; - -const struct generic_ladder jets_level_up_score_rule = { - 5, - jets_level_up_scores, - &jets_level, -}; - -/* How much each jet scores per level */ -const score_id_t jets_hit_scores[] = { - SC_1K, SC_10K, SC_25K, SC_50K, SC_100K -}; - -/* How many jets are needed to level up, - * jet count is reset on level up */ -const U8 jets_needed[] = { - 10, 20, 30, 40, 50 -}; - -void jets_level_up_deff (void) -{ - seg_alloc_clean (); - sprintf ("JET LEVEL %d", jets_level); - seg_write_row_center (0, sprintf_buffer); -// sprintf_score (jets_level_up_score_table[jets_level]); - seg_write_row_center (1, sprintf_buffer); - seg_sched_transition (&seg_trans_center_out); - seg_show (); - task_sleep_sec (3); - deff_exit (); -} - - -void jet_hit_deff (void) -{ - seg_alloc_clean (); - sprintf ("%d JETS LEFT TILL", (jets_needed[jets_level] - jets_hit)); - seg_write_row_center (0, sprintf_buffer); -// sprintf_score (jets_level_up_score_table[jets_level + 1]); - seg_write_row_center (1, "NEXT LEVEL"); - seg_show (); - task_sleep (TIME_500MS); - deff_exit (); -} - -CALLSET_ENTRY (jets, jet_hit) -{ - if (!in_live_game) - return; - /* Make a sound, based on level */ - sound_send (jet_sounds[jets_level][jets_sound_index]); - jets_sound_index++; - if (jets_sound_index > 2) - jets_sound_index = 0; - - /* Score the hit, based on level */ - //score (jets_hit_scores[jets_level]); - score (SC_25K); - - bounded_increment (jets_hit, 255); - - /* Level up if needed */ - if (jets_hit >= jets_needed[jets_level]) - { - timer_restart_free (GID_JETS_LEVEL_UP, TIME_3S); - generic_ladder_score_and_advance (&jets_level_up_score_rule); - jets_hit = 0; - deff_start (DEFF_JETS_LEVEL_UP); - } - else if (!task_find_gid (GID_JETS_LEVEL_UP)) - { - deff_restart (DEFF_JET_HIT); - } -} - -CALLSET_ENTRY (jets, start_player) -{ - jets_level = 0; -} - -CALLSET_ENTRY (jets, start_ball) -{ - generic_ladder_reset (&jets_level_up_score_rule); - jets_sound_index = 0; - jets_hit = 0; -} diff --git a/machine/bop/lanes.c b/machine/bop/lanes.c deleted file mode 100644 index 181d5bb3a..000000000 --- a/machine/bop/lanes.c +++ /dev/null @@ -1,132 +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 - */ - -#include - -/* How many times the rollovers have been completed */ -U8 rollover_count; - -void rollover_completed_deff (void) -{ - seg_alloc_clean (); - psprintf ("1 ROLLOVER", "%d ROLLOVERS", rollover_count); - seg_write_row_center (0, sprintf_buffer); - seg_show (); - task_sleep_sec (2); - deff_exit (); - -} -static void handle_outlane (void) -{ - /* Start a timer to tell the difference between an outlane - * drain and a center drain when the ball reaches the trough. */ - event_can_follow (any_outlane, center_drain, TIME_7S); - sound_send (SND_BALL_DRAIN); -// deff_start (DEFF_BALL_DRAIN_OUTLANE); - -// if (!multi_ball_play ()) -// leff_start (LEFF_STROBE_DOWN); -} - -static bool rollover_completed (void) -{ - if (lamp_test (LM_LEFT_OUTLANE) - && lamp_test (LM_LEFT_INLANE) - && lamp_test (LM_RIGHT_INLANE) - && lamp_test (LM_RIGHT_OUTLANE)) - return TRUE; - else - return FALSE; -} - -static void award_rollover_completed (void) -{ - bounded_increment (rollover_count, 99); - score (SC_1M); - - /* Show animation */ - deff_start (DEFF_ROLLOVER_COMPLETED); - /* Flash and turn off inlane lamps */ - lamplist_apply (LAMPLIST_LANES, lamp_off); - lamplist_apply (LAMPLIST_LANES, lamp_flash_on); - task_sleep_sec (1); - lamplist_apply (LAMPLIST_LANES, lamp_flash_off); -} - -static void check_rollover (void) -{ - /* Check to see if rollover has been completed - * and start the spiralaward timer if a set has been - * completed */ - if (rollover_completed () == TRUE) - { - award_rollover_completed (); - } -} - -/* Flipper button handlers */ -CALLSET_ENTRY (lanes, sw_left_button) -{ - if (in_game) - lamplist_rotate_previous (LAMPLIST_LANES, lamp_matrix); -} - -CALLSET_ENTRY (lanes, sw_right_button) -{ - if (in_game) - lamplist_rotate_next (LAMPLIST_LANES, lamp_matrix); -} - -CALLSET_ENTRY (lanes, sw_left_outlane) -{ - lamp_on (LM_LEFT_OUTLANE); - check_rollover (); - score (SC_10K); - handle_outlane (); -} - -CALLSET_ENTRY (lanes, sw_right_outlane) -{ - lamp_on (LM_RIGHT_OUTLANE); - check_rollover (); - score (SC_10K); - handle_outlane (); -} - -CALLSET_ENTRY (lanes, sw_left_inlane) -{ - lamp_on (LM_LEFT_INLANE); - check_rollover (); - score (SC_1K); -} - -CALLSET_ENTRY (lanes, sw_right_inlane) -{ - lamp_on (LM_RIGHT_INLANE); - check_rollover (); - score (SC_1K); -} - -CALLSET_ENTRY (lanes, start_ball) -{ - /* Turn off all inlanes at start of ball */ - lamplist_apply (LAMPLIST_LANES, lamp_off); - rollover_count = 0; -} diff --git a/machine/bop/leffs.c b/machine/bop/leffs.c deleted file mode 100644 index 88319d0c1..000000000 --- a/machine/bop/leffs.c +++ /dev/null @@ -1,11 +0,0 @@ - -#include - -void skillshot_leff (void) -{ - leff_exit (); -} -void amode_leff (void) -{ - leff_exit (); -} diff --git a/machine/bop/loop.c b/machine/bop/loop.c deleted file mode 100644 index 0ab74ff3a..000000000 --- a/machine/bop/loop.c +++ /dev/null @@ -1,212 +0,0 @@ -/* - * Copyright 2010 by Ewan Meadows (sonny_jim@hotmail.com) - * - * 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 NUM_LOOP_LEVELS 4 - -/* Delay in seconds before the loop level decreases by one */ -#define LOOP_LEVEL_DELAY 10 -#include - -U8 left_loop_level; -U8 right_loop_level; -U8 left_loop_timer; -U8 right_loop_timer; -U8 last_left_loop_level; -U8 last_right_loop_level; - -U8 total_loops; - -score_id_t loop_score_table[] = { - SC_25K, SC_50K, SC_100K, SC_500K -}; - -lampnum_t left_loop_lamps[] = { - LM_LEFT_LOOP_25K, LM_LEFT_LOOP_50K, LM_LEFT_LOOP_100K, LM_LEFT_LOOP_500K -}; - -lampnum_t right_loop_lamps[] = { - LM_RIGHT_LOOP_25K, LM_RIGHT_LOOP_50K, LM_RIGHT_LOOP_100K, LM_RIGHT_LOOP_500K -}; - -void loop_deff (void) -{ - seg_alloc_clean (); - psprintf ("1 LOOP", "%d LOOPS", total_loops); - seg_write_row_center (0, sprintf_buffer); - sprintf_score (score_deff_get ()); - seg_write_row_center (1, sprintf_buffer); - seg_show (); - task_sleep_sec (2); - deff_exit (); -} - -/* task to take the loop levels down by one every 10 seconds */ -/* TODO This needs to be changed so it'll handle system wide - * pausing properly */ -static void loop_level_timer_task (void) -{ - while (in_live_game) - { - if (left_loop_timer == 0 && left_loop_level != 0) - { - bounded_decrement (left_loop_level, 0); - left_loop_timer = LOOP_LEVEL_DELAY; - } - else - { - bounded_decrement (left_loop_timer, 0); - } - - if (right_loop_timer == 0 && right_loop_level != 0) - { - bounded_decrement (right_loop_level, 0); - right_loop_timer = LOOP_LEVEL_DELAY; - } - else - { - bounded_decrement (right_loop_timer, 0); - } - task_sleep_sec (1); - } - task_exit (); -} - -static void award_loop (void) -{ - /* Start a timer to go down a level after 10 seconds */ - if (!task_find_gid (GID_LOOP_LEVEL_TIMER)) - task_create_gid (GID_LOOP_LEVEL_TIMER, loop_level_timer_task); - - bounded_increment (total_loops, 254); - deff_start (DEFF_LOOP); -} - -static void award_left_loop (void) -{ - /* This causes a compiler warning as I don't think it - * knows about bounded_increment when checking for - * array bounds */ - bounded_increment (left_loop_level, NUM_LOOP_LEVELS - 1); - /* Reset the loop level timer */ - left_loop_timer = LOOP_LEVEL_DELAY; - score (loop_score_table[left_loop_level]); - award_loop (); -} - -static void award_right_loop (void) -{ - bounded_increment (right_loop_level, NUM_LOOP_LEVELS - 1); - right_loop_timer = LOOP_LEVEL_DELAY; - score (loop_score_table[right_loop_level]); - award_loop (); -} - -CALLSET_ENTRY (loop, sw_left_loop) -{ - award_left_loop (); -} - -CALLSET_ENTRY (loop, sw_right_loop_top) -{ - if (event_did_follow (right_loop_bottom, right_loop_top)) - { - /* Ball came in from the bottom - * score differently? */ - award_right_loop (); - } - event_should_follow (right_loop_top, right_loop_bottom, TIME_2S); -} - -CALLSET_ENTRY (loop, sw_right_loop_bottom) -{ - if (event_did_follow (right_loop_top, right_loop_bottom)) - { - award_right_loop (); - } - else if (event_did_follow (right_loop_bottom, right_loop_bottom)) - { - /* Ball came out the bottom, no loop */ - } - event_should_follow (right_loop_bottom, right_loop_top, TIME_2S); - event_can_follow (right_loop_bottom, right_loop_bottom, TIME_2S); -} - -void light_left_loop_lamps (void) -{ - /* Don't bother doing anything if nothing has changed */ - if (last_left_loop_level == left_loop_level) - return; - - /* Turn off all lamps */ - lamplist_apply (LAMPLIST_LEFT_LOOPS, lamp_off); - - /* Light up previous lamps and flash the current level */ - U8 i; - for (i = 0; i < left_loop_level; i++) - { - lamp_tristate_on (left_loop_lamps[i]); - } - //lamp_tristate_flash (left_loop_lamps[left_loop_level]); - - /* Store left_loop_level */ - last_left_loop_level = left_loop_level; -} - -void light_right_loop_lamps (void) -{ - /* Turn off all lamps */ - lamplist_apply (LAMPLIST_RIGHT_LOOPS, lamp_off); - - /* Light up previous lamps and flash the current level */ - U8 i; - for (i = 0; i < right_loop_level; i++) - { - lamp_tristate_on (right_loop_lamps[i]); - } - //lamp_tristate_flash (right_loop_lamps[right_loop_level]); - - /* Store right_loop_level */ - last_right_loop_level = right_loop_level; -} - -CALLSET_ENTRY (loop, start_ball) -{ - total_loops = 0; - right_loop_level = 0; - left_loop_level = 0; - last_right_loop_level = 1; - last_left_loop_level = 1; - lamplist_apply (LAMPLIST_RIGHT_LOOPS, lamp_off); -} - -CALLSET_ENTRY (loop, end_ball) -{ - task_kill_gid (GID_LOOP_LEVEL_TIMER); -} - -CALLSET_ENTRY (loop, lamp_update) -{ - /* Don't bother doing anything if nothing has changed */ - if (last_left_loop_level != left_loop_level) - light_left_loop_lamps (); - - if (last_right_loop_level != right_loop_level) - light_right_loop_lamps (); -} diff --git a/machine/bop/outhole.c b/machine/bop/outhole.c deleted file mode 100644 index 7c40d60f2..000000000 --- a/machine/bop/outhole.c +++ /dev/null @@ -1,34 +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 - */ - -#include - -CALLSET_ENTRY (outhole, sw_outhole) -{ - /* Wait for ball to settle */ - task_sleep (TIME_100MS); - sol_request (SOL_OUTHOLE); -} - -CALLSET_ENTRY (outhole, init) -{ - if (switch_poll_logical (SW_OUTHOLE)) - sol_request (SOL_OUTHOLE); -} diff --git a/machine/bop/rightreturn.c b/machine/bop/rightreturn.c deleted file mode 100644 index 0de3d8049..000000000 --- a/machine/bop/rightreturn.c +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright 2010 by Ewan Meadows (sonny_jim@hotmail.com) - * - * 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 diff --git a/machine/bop/skill.c b/machine/bop/skill.c deleted file mode 100644 index eab8ffa25..000000000 --- a/machine/bop/skill.c +++ /dev/null @@ -1,137 +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 - */ - -#include - -/* Strange order as 25K is treated as last */ -const sound_code_t skill_sounds[] = { - SND_SKILL_SHOT_2, SND_SKILL_SHOT_3, - SND_SKILL_SHOT_4, SND_SKILL_SHOT_5, SND_SKILL_SHOT_1 -}; - -void skillshot_deff (void) -{ - seg_alloc_clean (); - seg_write_row_center (0, "SKILL SHOT"); - sprintf_score (score_deff_get ()); - seg_write_row_center (1, sprintf_buffer); - seg_sched_transition (&seg_trans_rtl); - seg_show (); - task_sleep_sec (3); - kickout_unlock (KLOCK_DEFF); - deff_exit (); -} - -CALLSET_ENTRY (skill, enable_skill_shot) -{ - flag_on (FLAG_SKILLSHOT_ENABLED); - //leff_start (LEFF_SKILLSHOT); -} - -static void award_skill_switch (U8 sw) -{ - set_valid_playfield (); - if (task_find_gid (GID_SKILL_DEBOUNCE) - || !flag_test (FLAG_SKILLSHOT_ENABLED)) - return; - - timer_restart_free (GID_SKILL_DEBOUNCE, TIME_10S); - kickout_lock (KLOCK_DEFF); - deff_start (DEFF_SKILLSHOT); - - sound_send (skill_sounds[sw]); - switch (sw) - { - case 0: - score (SC_50K); - break; - case 1: - score (SC_75K); - break; - case 2: - score (SC_100K); - break; - case 3: - score (SC_200K); - sound_send (SND_YAHOO); - break; - case 4: - score (SC_25K); - break; - } - flag_off (FLAG_SKILLSHOT_ENABLED); - //sol_request (SOL_SSHOT_KICKER); -} - -CALLSET_ENTRY (skill, ball_search) -{ - if (switch_poll_logical (SW_SKILL_SHOT_50K)) - sol_request (SOL_SSHOT_KICKER); -} - -/* TODO Bug workaround */ -CALLSET_ENTRY (skill, start_ball) -{ - flag_on (FLAG_SKILLSHOT_ENABLED); - task_kill_gid (GID_SKILL_DEBOUNCE); -} - -CALLSET_ENTRY (skill, serve_ball) -{ - flag_on (FLAG_SKILLSHOT_ENABLED); - task_kill_gid (GID_SKILL_DEBOUNCE); -} - -CALLSET_ENTRY (skill, end_ball) -{ - flag_off (FLAG_SKILLSHOT_ENABLED); -} - -CALLSET_ENTRY (skill, sw_shooter) -{ - if (flag_test (FLAG_SKILLSHOT_ENABLED)) - sound_send (SND_SKILL_SHOT_LAUNCH); -} - -/* Switch handlers */ -CALLSET_ENTRY (skill, sw_skill_shot_50k) -{ - award_skill_switch (0); -} - -CALLSET_ENTRY (skill, sw_skill_shot_75k) -{ - award_skill_switch (1); -} - -CALLSET_ENTRY (skill, sw_skill_shot_100k) -{ - award_skill_switch (2); -} - -CALLSET_ENTRY (skill, sw_skill_shot_200k) -{ - award_skill_switch (3); -} - -CALLSET_ENTRY (skill, sw_skill_shot_25k) -{ - award_skill_switch (4); -} diff --git a/machine/corvette/corvette.md b/machine/corvette/corvette.md index 117c33014..b19a05407 100644 --- a/machine/corvette/corvette.md +++ b/machine/corvette/corvette.md @@ -74,7 +74,7 @@ define MACHINE_HAS_UPPER_LEFT_FLIPPER 55: Corvette 5, yellow, y(35), x(9) 56: Pit Stop Arrow, amber, y(18), x(9) 57: Spinner Arrow, amber, y(17), x(11) -58: Drive Again, red, y(45), x(9) +58: Drive Again, red, y(45), x(9), extra-ball, ball-save 61: Left Outer Tail, red, y(40), x(6) # Bonus X2 62: Left Inner Tail, red, y(40), x(5) # Bonus X4 63: Catch Me, white, y(41), x(9) @@ -106,23 +106,23 @@ define MACHINE_HAS_UPPER_LEFT_FLIPPER 11: Kickback, ingame # actually "Left Out Lane" 12: Right Out Lane, ingame 13: Start Button, start-button, cabinet, intest -14: Tilt, cabinet, tilt, ingame, noplay +14: Tilt, cabinet, tilt, ingame, novalid # not called 'Shooter', see: trivial.c/CALLSET_ENTRY (trivial, sw_plunger) 15: Plunger, shooter, edge, debounce(TIME_200MS) 16: Left Return Lane, ingame 17: Right Return Lane, ingame 18: Spinner, ingame 21: Slam Tilt, cabinet, ingame, slam-tilt -22: Coin Door Closed, noscore, noplay +22: Coin Door Closed, noscore, novalid 23: Buyin Button, buyin-button, cabinet #24: Always Closed -31: Trough 1, noscore, noplay, opto -32: Trough 2, noscore, noplay, opto -33: Trough 3, noscore, noplay, opto -34: Trough 4, noscore, noplay, opto +31: Trough 1, noscore, novalid, opto +32: Trough 2, noscore, novalid, opto +33: Trough 3, noscore, novalid, opto +34: Trough 4, noscore, novalid, opto 35: Route 66 Entry, ingame, opto 36: Pit Stop Popper, ingame, opto -37: Trough Eject, noscore, noplay, opto # stuck off = ball jam +37: Trough Eject, noscore, novalid, opto # stuck off = ball jam 38: Inner Loop Entry, ingame 41: ZR1 Bottom Entry, ingame, opto 42: ZR1 Top Entry, ingame, opto @@ -138,16 +138,16 @@ define MACHINE_HAS_UPPER_LEFT_FLIPPER 56: Right Race Encoder, noscore, opto 57: Route 66 Kickout, ingame 58: Skid Route 66 Exit, ingame -61: Left Slingshot, ingame, noplay -62: Right Slingshot, ingame, noplay -63: Left Jet, ingame, noplay -64: Lower Jet, ingame, noplay -65: Upper Jet, ingame, noplay # actually the RIGHT jet +61: Left Slingshot, ingame, novalid +62: Right Slingshot, ingame, novalid +63: Left Jet, ingame, novalid +64: Lower Jet, ingame, novalid +65: Upper Jet, ingame, novalid # actually the RIGHT jet 66: Left Rollover, ingame 67: Middle Rollover, ingame 68: Right Rollover, ingame -71: ZR1 Full Left, opto, noplay, noscore -72: ZR1 Full Right, opto, noplay, noscore +71: ZR1 Full Left, opto, novalid, noscore +72: ZR1 Full Right, opto, novalid, noscore 75: ZR1 Exit, ingame 76: ZR1 Lock Ball 1, ingame 77: ZR1 Lock Ball 2, ingame @@ -155,8 +155,8 @@ define MACHINE_HAS_UPPER_LEFT_FLIPPER 81: Million Standup, standup 82: Skid Pad Standup, standup 83: Right Standup, standup # lite kickback -84: Right Rubber, noplay # playfield has hole for switch but no switch -86: Jet Rubber, noplay # playfield has hole for switch but no switch +84: Right Rubber, novalid # playfield has hole for switch but no switch +86: Jet Rubber, novalid # playfield has hole for switch but no switch 87: Left Outer Loop, ingame 88: Right Outer Loop, ingame diff --git a/machine/corvette/corvette.sched b/machine/corvette/corvette.sched index c07e644ba..13146bd81 100644 --- a/machine/corvette/corvette.sched +++ b/machine/corvette/corvette.sched @@ -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. # diff --git a/machine/corvette/jets.c b/machine/corvette/jets.c old mode 100755 new mode 100644 index aa46ba372..d9a334b7b --- a/machine/corvette/jets.c +++ b/machine/corvette/jets.c @@ -11,7 +11,7 @@ __local__ U8 ultra_jet_count; void jet_deff (void) { dmd_alloc_low_clean (); - font_render_string_center (&font_mono5, 96, 5, "ZIG ZAG"); + font_render_string_center (&font_var5, 96, 5, "ZIG ZAG"); sprintf ("%d", jet_count); font_render_string_center (&font_fixed10, 96, 16, sprintf_buffer); diff --git a/machine/corvette/kickback.c b/machine/corvette/kickback.c old mode 100755 new mode 100644 index 4243a1d36..daad91689 --- a/machine/corvette/kickback.c +++ b/machine/corvette/kickback.c @@ -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. * diff --git a/machine/corvette/racetrack_test.c b/machine/corvette/racetrack_test.c index 5fdbc45de..64629c0ec 100644 --- a/machine/corvette/racetrack_test.c +++ b/machine/corvette/racetrack_test.c @@ -107,11 +107,11 @@ void racetrack_test_init (void) } void racetrack_draw_test_title(void) { - font_render_string_center (&font_mono5, 64, 2, "RACETRACK TEST"); + font_render_string_center (&font_var5, 64, 2, "RACETRACK TEST"); dmd_draw_horiz_line ((U16 *)dmd_low_buffer, 5); } -// 21 characters wide max when using font_mono5 +// 21 characters wide max when using font_var5 // ~30 characters when using font_var5 #define LINE_1_Y 7 @@ -190,7 +190,7 @@ void racetrack_test_draw (void) dmd_draw_horiz_line ((U16 *)dmd_low_buffer, 25); sprintf(racetrack_test_short_names[racetrack_test_command]); - font_render_string_left (&font_mono5, 0, 27, sprintf_buffer); + font_render_string_left (&font_var5, 0, 27, sprintf_buffer); dmd_show_low (); } diff --git a/machine/corvette/sling.c b/machine/corvette/sling.c old mode 100755 new mode 100644 index 327aee869..9eecee896 --- a/machine/corvette/sling.c +++ b/machine/corvette/sling.c @@ -28,7 +28,7 @@ __local__ U8 sling_count; void sling_deff (void) { dmd_alloc_low_clean (); - font_render_string_center (&font_mono5, 96, 5, "BABES"); + font_render_string_center (&font_var5, 96, 5, "BABES"); sprintf ("%d", sling_count); font_render_string_center (&font_fixed10, 96, 16, sprintf_buffer); diff --git a/machine/corvette/zr1_multiball.c b/machine/corvette/zr1_multiball.c old mode 100755 new mode 100644 index cd01dbbc9..a8fb3c166 --- a/machine/corvette/zr1_multiball.c +++ b/machine/corvette/zr1_multiball.c @@ -80,7 +80,7 @@ void zr1_mb_running_deff (void) score_update_start (); dmd_alloc_pair (); dmd_clean_page_low (); - font_render_string_center (&font_mono5, 64, 5, "MULTIBALL"); + font_render_string_center (&font_var5, 64, 5, "MULTIBALL"); sprintf_current_score (); font_render_string_center (&font_fixed6, 64, 16, sprintf_buffer); dmd_copy_low_to_high (); diff --git a/machine/corvette/zr1_test.c b/machine/corvette/zr1_test.c old mode 100755 new mode 100644 index 8af296702..34b8a22ba --- a/machine/corvette/zr1_test.c +++ b/machine/corvette/zr1_test.c @@ -80,7 +80,7 @@ void zr1_test_init (void) } void zr1_draw_test_title(void) { - font_render_string_center (&font_mono5, 64, 2, "ZR1 ENGINE TEST"); + font_render_string_center (&font_var5, 64, 2, "ZR1 ENGINE TEST"); dmd_draw_horiz_line ((U16 *)dmd_low_buffer, 5); } @@ -167,7 +167,7 @@ void zr1_test_draw (void) dmd_draw_horiz_line ((U16 *)dmd_low_buffer, 25); sprintf(zr1_test_short_names[zr1_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/machine/dm/Makefile b/machine/dm/Makefile new file mode 100644 index 000000000..b9daed362 --- /dev/null +++ b/machine/dm/Makefile @@ -0,0 +1,141 @@ +################################################# +# +# Machine-specific Makefile +# +################################################# +MACHINE_FILE = dm.md + +################################################# +# Define the name of the GAME_ROM. This is +# optional; you can delete it and a suitable +# default will be taken. +################################################# +GAME_ROM_PREFIX = dman_sji_1024 + + +################################################# +# Set ROM_PAGE_COUNT to the number of 16KB pages +# that should be present in the output image. +# The hardware supports a maximum of 64 pages; +# you can't exceed this. +# +# The 'system' will always reside in the uppermost +# two pages. If the ROM is less than a full 64 +# pages, then the pages are numbered from [N..64] +# anyway. +# +# 128KB.....8 pages +# 256KB.....16 pages +# 512KB.....32 pages +# 1MB...... 64 pages +################################################# +ROM_PAGE_COUNT = 64 + + + +################################################# +# rev number for screen in format X.XX - must be an octal number +################################################# +MACHINE_MAJOR = 0 +MACHINE_MINOR = 65 + +################################################# +# +# Simulation options. +# +# These options control the way that the game +# ROM is made available to pinmame for testing. +# They are only used during installation into +# the pinmame roms directory. +# +################################################# +#PINMAME_MACHINE = dm_lx4 +#PINMAME_GAME_ROM = dman_lx4.rom +#PINMAME_OTHER_ROMS = dmu*.rom + + + +################################################# +# Object files exported by this game +# +# GAME_OBJS = .text page -- +# the system page.  No decorator needed on function prototypes. +# RTTs must go here. also place files that are called often here. +# +# +# GAME_PAGED_OBJS = page 59 = Preferably, game functions go here. +# This works safely for any file that only uses CALLSET_ENTRY functions, deffs, and leffs. +# GAME_PAGED_OBJS (probably should have been called GAME1_OBJS) is page +# 59 (labelled MACHINE in the display at the bottom of the "err" file). +# Prototypes need __machine__.  The space is shared with "EVENT", which +# means that it is not as large as the other pages, but since "EVENT" is +# the machinery behind callsets, files which have lots of CALLSET_ENTRY +# points are more efficient when placed here. +# +# +# +# GAME_OBJS = .text page, no labeling or prototype needed +# GAME_PAGED_OBJS = page 59, labelled MACHINE, prototypes use __machine__ +# GAME_TEST_OBJS = page 58, no labeling or prototype needed +# EFFECTS = page 57, +# COMMON = page 56, , prototypes use __common__ +# GAME2_OBJS = page 55, labelled MACHINE2, prototypes use __machine2__ +# GAME3_OBJS = page 54, labelled MACHINE3, prototypes use __machine3__ +# GAME4_OBJS = page 53, labelled MACHINE4, prototypes use __machine4__ +# GAME5_OBJS = page 52, labelled MACHINE5, prototypes use __machine5__ +# +# note: if we put tabs in between the file names you will get a linker error +# note: continue line with a '\' --make sure to leave off on last line or you will get a linker error +#GAME_TEST_OBJS = +#GAME_INCLUDES = +################################################# + +# page .text +GAME_OBJS = simple_switches.o orbits.o ramps.o arrow_handler.o jackpots.o \ +superjets.o diverter_check.o +#call_tester.o + +#can use CALLSET_ENTRY functions, deffs, and leffs +#this is about 30% full from the OS - page 59 +#also called MACHINE_PAGE in the file definition +GAME_PAGED_OBJS = inlanes.o rollovers.o extra_ball.o super_jackpot_reminder.o \ +standupfrenzy.o acmag.o startup_shutdown.o cryoclaw.o + + +#all files here that have deffs and are less frequently called +#also called MACHINE2_PAGE - page 55 +GAME2_OBJS = car_chase_mode.o demotime.o \ +explode.o override_deffs.o huxley.o underground.o + +#all files here that have deffs and are less frequently called +#also called MACHINE3_PAGE - page 54 +GAME3_OBJS = bonus.o capture_simon.o prison_break.o fortress.o \ +lock_freeze_mbstart.o wasteland.o leffs.o + + +#all files here that have deffs and are less frequently called +#also called MACHINE4_PAGE - page 53 +GAME4_OBJS = top_popper.o vm_handler.o kaboom.o eject.o \ +shooting_gallery.o back_in_the_fridge.o + + +#all files here that have deffs and are less frequently called +#also called MACHINE5_PAGE - page 52 +GAME5_OBJS = cryoprison.o eyeball.o dm_amode.o skillshot.o \ + museum.o combos.o car_crash.o special_shots.o + +#check common/makefile for other things added to common page +#COMMON_SW_OBJS += machine/dm/jets.o + + + +################################################# +#listing of images used +# +# THIS FILE IS CURRENTLY BLANK AND I HAVE MOVE MY ILD DECLARATIONS +# TO platform/wpc/wpc.ild +# +################################################# +#IMAGE_MAP += $(M)/dm2.ild + + diff --git a/machine/dm/acmag.c b/machine/dm/acmag.c new file mode 100644 index 000000000..fa28a1f7e --- /dev/null +++ b/machine/dm/acmag.c @@ -0,0 +1,327 @@ +/* + * demolition man + * acmag.c + * + * written by James Cardona + * + * Location Description: + * mode started by claw switch acmag -points scored by center ramp. + * + * Scoring Description: (original game) + * counts up as time goes down from 5 million to 12.5 million, typically + * about a 20 second mode. Only shot that scores is the very wide + * center ramp + * + * Scoring Description: (my rules) + * same as above except: + * scoring is higher to balance with other modes + * 2nd and 3rd acmag mode score higher to encourage doing mode more than once + * + * estimate of average acmag mode score: 60 million to 125 million + * + * + * + */ +/* CALLSET_SECTION (acmag, __machine__) */ + + + +#include +#include "dm/global_constants.h" +#include "clawmagnet.h" + +//constants + +//local variables +U8 acmag_mode_shots_made; +__local__ U8 acmag_modes_achieved; +U8 acmag_mode_timer; +score_t acmag_mode_score; +score_t acmag_mode_next_score; +score_t acmag_mode_score_total_score; + +//external variables + +//internally called function prototypes --external found at protos.h +void acmag_reset (void); +void acmag_player_reset (void); +void acmag_effect_deff(void); +void acmag_mode_init (void); +void acmag_mode_expire (void); +void acmag_mode_exit (void); +void star_draw (void); +void show_text_on_stars (U8 times); + + +/**************************************************************************** + * mode definition structure + ***************************************************************************/ +struct timed_mode_ops acmag_mode = { + DEFAULT_MODE, + .init = acmag_mode_init, + .exit = acmag_mode_exit, + .gid = GID_ACMAG_MODE_RUNNING, + .music = MUS_ACMAG, + .deff_starting = DEFF_ACMAG_START_EFFECT, + .deff_running = DEFF_ACMAG_EFFECT, +// .deff_ending = DEFF_ACMAG_END_EFFECT, + .prio = PRI_GAME_MODE2, + .init_timer = 33, + .timer = &acmag_mode_timer, + .grace_timer = 2, //default is 2 +// .pause = system_timer_pause, +}; + + + +/**************************************************************************** + * initialize and exit + ***************************************************************************/ +void acmag_reset (void) { + flag_off (FLAG_IS_ACMAG_RUNNING); +}//end of function + + + +void acmag_player_reset (void) { + acmag_reset(); + acmag_modes_achieved = 0; + acmag_mode_shots_made = 0; + score_zero(acmag_mode_score_total_score); +}//end of function + + + +void acmag_mode_init (void) { + //the claw mode can expire on its own and since it is a lower priority it will not display + //callset_invoke (end_claw_mode); // this seemed to cause occasional crashes + clawmagnet_off (); + flag_off(FLAG_IS_BALL_ON_CLAW); + flipper_enable (); + ballsave_add_time (10); + acmag_mode_shots_made = 0; + flag_on (FLAG_IS_ACMAG_RUNNING); + center_ramp_arrow_update(); + ++acmag_modes_achieved; + sound_start (ST_SPEECH, SPCH_ACMAG_ACTIVATED, SL_4S, PRI_GAME_QUICK5); + //flash lamp for a time + lamp_tristate_flash(LM_CLAW_ACMAG); + task_sleep(TIME_500MS); + lamp_tristate_on(LM_CLAW_ACMAG); + score_zero(acmag_mode_score); + score_zero(acmag_mode_next_score); + switch (acmag_modes_achieved ){ + case 1: score_add(acmag_mode_next_score, score_table[ACMAG_HIT_SCORE_1]); break; + case 2: score_add(acmag_mode_next_score, score_table[ACMAG_HIT_SCORE_2]); break; + default: + case 3: score_add(acmag_mode_next_score, score_table[ACMAG_HIT_SCORE_3]); break; + }//end of switch +}//end of function + + + +void acmag_mode_expire (void) { + flag_off (FLAG_IS_ACMAG_RUNNING); + center_ramp_arrow_update(); +}//end of function + + +void acmag_mode_exit (void) { acmag_mode_expire();} + + +/**************************************************************************** + * external event listeners + ****************************************************************************/ +CALLSET_ENTRY (acmag, music_refresh) { timed_mode_music_refresh (&acmag_mode); } +CALLSET_ENTRY (acmag, end_ball) { if (timed_mode_running_p(&acmag_mode) ) timed_mode_end (&acmag_mode); } +CALLSET_ENTRY (acmag, display_update) { timed_mode_display_update (&acmag_mode); } + +CALLSET_ENTRY (acmag, start_player) { acmag_player_reset(); } +CALLSET_ENTRY (acmag, start_ball) { acmag_reset(); } + + + + +/**************************************************************************** + * + * body + * + ***************************************************************************/ +CALLSET_ENTRY (acmag, sw_claw_acmag) { + demotime_increment(); + timed_mode_begin (&acmag_mode);//start mode +}//end of function + + + //center ramp shot made during acmag mode +void acmag_made(void) { + ++acmag_mode_shots_made; + sound_start (ST_SAMPLE, EXPLOSION, SL_2S, PRI_GAME_QUICK5); + //flash lamp for a time + lamp_tristate_flash(LM_CENTER_RAMP_MIDDLE); + lamp_tristate_flash(LM_CENTER_RAMP_OUTER); + lamp_tristate_flash(LM_CENTER_RAMP_INNER); + task_sleep(TIME_1S); + lamp_tristate_off(LM_CENTER_RAMP_MIDDLE); + lamp_tristate_off(LM_CENTER_RAMP_OUTER); + lamp_tristate_off(LM_CENTER_RAMP_INNER); + + switch (acmag_modes_achieved ){ + case 1: + score (ACMAG_HIT_SCORE_1); + score_add (acmag_mode_score, score_table[ACMAG_HIT_SCORE_1]); + score_add (acmag_mode_score_total_score, score_table[ACMAG_HIT_SCORE_1]); + break; + case 2: + //2nd time we are in acmag - score differently + score (ACMAG_HIT_SCORE_2); + score_add (acmag_mode_score, score_table[ACMAG_HIT_SCORE_2]); + score_add (acmag_mode_score_total_score, score_table[ACMAG_HIT_SCORE_2]); + break; + default: + case 3: + //3rd time we are in acmag - score differently + score (ACMAG_HIT_SCORE_3); + score_add (acmag_mode_score, score_table[ACMAG_HIT_SCORE_3]); + score_add (acmag_mode_score_total_score, score_table[ACMAG_HIT_SCORE_3]); + break; + }//end of switch + deff_start (DEFF_ACMAG_HIT_EFFECT);//under /kernel/deff.c +}//end of function + + + +/**************************************************************************** + * + * DMD display and sound effects + * + ****************************************************************************/ +void acmag_start_effect_deff(void) { + dmd_map_overlay (); + dmd_clean_page_high (); + dmd_clean_page_low (); + dmd_draw_thin_border (dmd_low_buffer); + font_render_string_center (&font_steel, DMD_MIDDLE_X, DMD_BIG_CY_Top, "ACMAG"); + font_render_string_center (&font_term6, DMD_MIDDLE_X, DMD_BIG_CY_Bot, "CENTER RAMP"); + show_text_on_stars (40); //about 4 seconds + deff_exit (); +}//end of mode_effect_deff + + + +void acmag_hit_effect_deff(void) { + dmd_map_overlay (); + dmd_clean_page_high (); + dmd_clean_page_low (); + dmd_draw_thin_border (dmd_low_buffer); +// font_render_string_center (&font_steel, DMD_MIDDLE_X, DMD_BIG_CY_Top, "ACMAG"); + sprintf_score (acmag_mode_next_score); + font_render_string_center (&font_fixed10, DMD_MIDDLE_X, DMD_BIG_CY_Cent, sprintf_buffer); + show_text_on_stars (20); + deff_exit (); +}//end of mode_effect_deff + + + +void acmag_effect_deff(void) { + U8 i = 0; + U8 j = 0; + __boolean TOGGLE = FALSE; + __boolean TOGGLE_BOTTOM = FALSE; + + for (;;) { + dmd_map_overlay (); + dmd_clean_page_high (); + dmd_clean_page_low (); + dmd_draw_thin_border (dmd_low_buffer); + + sprintf_score(current_score); + font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_SMALL_CY_1, sprintf_buffer); + + font_render_string_center (&font_steel, DMD_MIDDLE_X, DMD_BIG_CY_Top + 2, "ACMAG"); + + if (++i % 3 == 0) { if (TOGGLE) TOGGLE = FALSE; else TOGGLE = TRUE; }//change TOGGLE once per n seconds + if (++j % 6 == 0) { if (TOGGLE_BOTTOM) TOGGLE_BOTTOM = FALSE; else TOGGLE_BOTTOM = TRUE; }//change TOGGLE once per n seconds + + if (i % 20 != 0) { //draw for 4/5 and blank for 1/5 + if (TOGGLE) { + sprintf ("%d SEC", acmag_mode_timer); + font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_SMALL_CY_3 + 3, sprintf_buffer); + }//end of if (TOGGLE) + else { + sprintf ("%d HIT", acmag_mode_shots_made); + font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_SMALL_CY_3 + 3, sprintf_buffer); + }//end of else + }//end of if (i % 5 != 0) + + if (TOGGLE_BOTTOM) font_render_string_center (&font_term6, DMD_MIDDLE_X, DMD_MED_CY_3, "SHOOT CENTER RAMP"); + else { sprintf_score (acmag_mode_next_score); + font_render_string_center (&font_term6, DMD_MIDDLE_X, DMD_MED_CY_3 + 2, sprintf_buffer); } + + show_text_on_stars (8); //about 800 ms + }//END OF ENDLESS LOOP +}//end of mode_effect_deff + + + +#define MAX_STARS 12 +#define MAX_STATE 4 +struct star_state { + U8 time; + U8 state; + U8 x; + U8 y; +} star_states[MAX_STARS]; + +static const U8 star_bitmaps[] = { + 3, 3, 0, 0, 0, + 3, 3, 0, 2, 0, + 3, 3, 0, 2, 0, + 3, 3, 2, 5, 2, + 3, 3, 2, 7, 2, + 3, 3, 2, 7, 2, +}; + +void star_draw (void) { + U8 n; + for (n = 0; n < MAX_STARS; n++) { + struct star_state *s = &star_states[n]; + if (s->time) { + //bitmap_erase_asm (...); + bitmap_blit2 (star_bitmaps + s->state * 5, s->x, s->y); + + s->time--; + + if (random () < 128) + ; + if (s->state == MAX_STATE) s->state--; + else if (s->state == 0) s->state++; + else if (random () < 192) s->state++; + else s->state--; + }//end of if s->time + else { + if (random () < 64) { + s->time = 4 + random_scaled (8); + s->x = 4 + random_scaled (120); + s->y = 2 + random_scaled (24); + s->state = 0; + }//end of if (random () < 64 + }//end of else + }//end of for loop +}//end of function + + + +void show_text_on_stars (U8 times) { + U8 n; + for (n = 0; n < times; n++) { + dmd_dup_mapped ();//allocate new space but make it a copy of what is on DMD now + dmd_overlay_onto_color ();//mono overlay onto current color page + star_draw (); + dmd_show2 ();//shows a 4 color image + task_sleep (TIME_100MS); + dmd_map_overlay ();/** Map a consecutive display page pair into windows 0 & 1 */ + } + dmd_alloc_pair_clean (); +} + diff --git a/machine/dm/arrow_handler.c b/machine/dm/arrow_handler.c new file mode 100644 index 000000000..2541ecd7a --- /dev/null +++ b/machine/dm/arrow_handler.c @@ -0,0 +1,122 @@ +/* + * demolition man + * arrow_handler.c + * + * written by James Cardona + * + */ + +#include +#include "dm/global_constants.h" + +//local variables + +//prototypes + +/**************************************************************************** + * initialize and exit + ***************************************************************************/ +CALLSET_ENTRY (arrow_handler, start_player, start_ball) { + flag_off (FLAG_IS_UGROUND_ARROW_ACTIVATED); + + flag_off (FLAG_IS_R_LOOP_ARROW_ACTIVATED); + flag_off (FLAG_IS_L_LOOP_ARROW_ACTIVATED); + + flag_off (FLAG_IS_L_RAMP_ARROW_ACTIVATED); + flag_off (FLAG_IS_C_RAMP_ARROW_ACTIVATED); + flag_off (FLAG_IS_S_RAMP_ARROW_ACTIVATED); + flag_off (FLAG_IS_R_RAMP_ARROW_ACTIVATED); +}//end of function + + +/**************************************************************************** + * + * Arrow handlers + * + ****************************************************************************/ +void center_ramp_arrow_update(void) { + if ( flag_test (FLAG_IS_CAPSIM_CENTERRAMP_ACTIVATED) + || flag_test (FLAG_IS_ACMAG_RUNNING) + || flag_test (FLAG_IS_COMBO_CENTERRAMP_ACTIVATED) + || flag_test (FLAG_IS_C_RAMP_JACKPOT_ACTIVATED) ) + cramp_arrow_light_on(); + else + cramp_arrow_light_off(); +}//end of function + + + +void uground_arrow_update(void) { + if ( flag_test (FLAG_IS_CAPSIM_UNDER_ACTIVATED) + || flag_test (FLAG_IS_COMBO_UNDER_ACTIVATED) + || flag_test (FLAG_IS_UGROUND_JACKPOT_ACTIVATED) ) + underground_arrow_light_on(); + else + underground_arrow_light_off(); +}//end of function + + + +void l_ramp_arrow_update(void) { + if ( flag_test (FLAG_IS_CAPSIM_LEFTRAMP_ACTIVATED) + || flag_test (FLAG_IS_COMBO_LEFTRAMP_ACTIVATED) + || flag_test (FLAG_IS_L_RAMP_JACKPOT_ACTIVATED) ) + lramp_arrow_light_on(); + else + lramp_arrow_light_off(); +}//end of function + + + +void s_ramp_arrow_update(void) { + if ( flag_test (FLAG_IS_CAPSIM_SIDERAMP_ACTIVATED) + || flag_test (FLAG_IS_COMBO_SIDERAMP_ACTIVATED) + || flag_test (FLAG_IS_S_RAMP_JACKPOT_ACTIVATED) ) + sramp_arrow_light_on(); + else + sramp_arrow_light_off(); +}//end of function + + +void r_ramp_arrow_update(void) { + if ( flag_test (FLAG_IS_CAPSIM_RIGHTRAMP_ACTIVATED) + || flag_test (FLAG_IS_COMBO_RIGHTRAMP_ACTIVATED) + || flag_test (FLAG_IS_R_RAMP_JACKPOT_ACTIVATED) ) + rramp_arrow_light_on(); + else + rramp_arrow_light_off(); +}//end of function + + + + +void l_orb_arrow_update(void) { + if ( flag_test (FLAG_IS_CAPSIM_LEFTORB_ACTIVATED) + || flag_test (FLAG_IS_COMBO_LEFTORB_ACTIVATED) + || flag_test (FLAG_IS_L_LOOP_JACKPOT_ACTIVATED) ) + ll_arrow_light_on(); + else + ll_arrow_light_off(); +}//end of function + + + +void r_orb_arrow_update(void) { + if ( flag_test (FLAG_IS_CAPSIM_RIGHTORB_ACTIVATED) + || flag_test (FLAG_IS_COMBO_RIGHTORB_ACTIVATED) + || flag_test (FLAG_IS_R_LOOP_JACKPOT_ACTIVATED) ) + rl_arrow_light_on(); + else + rl_arrow_light_off(); +}//end of function + + +void all_arrow_update(void) { + center_ramp_arrow_update(); + l_ramp_arrow_update(); + r_ramp_arrow_update(); + s_ramp_arrow_update(); + l_orb_arrow_update(); + r_orb_arrow_update(); + uground_arrow_update(); +}//end of function diff --git a/machine/dm/bonus.c b/machine/dm/bonus.c new file mode 100644 index 000000000..8e9f4b9af --- /dev/null +++ b/machine/dm/bonus.c @@ -0,0 +1,607 @@ +/* + * bonus.c + */ +/* CALLSET_SECTION (bonus, __machine3__) */ + + + +#include +#include +#include +#include "dm/global_constants.h" + +//constants + +//local variables +score_t total_bonus; /* Total bonus score */ +score_t bonus_scored; /* Temp variable used to calculate bonus per item etc */ +bool buttons_held; + +//external variables +extern U8 car_crash_shots_made; //from car_crash.c + +extern U8 car_chase_mode_shots_made; //from car_chase.c +extern U8 car_chase_modes_achieved; +extern U8 car_chase_modes_completed; + +extern U8 capture_simon_mode_shots_made; //from capture_simon.c +extern U8 capture_simon_modes_achieved; +extern U8 capture_simon_modes_completed; + +extern U8 prison_break_mode_shots_made; //from prison_break.c +extern U8 prison_break_modes_achieved; + +extern U8 acmag_mode_shots_made; //from acmag.c +extern U8 acmag_modes_achieved; + +extern U8 explode_mode_shots_made; //from EXPLODE.c +extern score_t explode_mode_score; + +extern U8 superjets_modes_achieved; //from superjets.c +extern U8 superjets_mode_shots_made; + +extern U8 standupFrenzy_modes_achieved; //from standupfrenzy.c +extern U8 standupFrenzyNumHits; +// + +extern U8 combo_counter; //from combos.c +extern U8 fortress_jackpot_shots_made; + +extern U8 rollover_bonus_multiplier; //from rollovers.c + +extern U8 fortress_jackpot_shots_made; +extern U8 demotime_jackpot_shots_made; +extern U8 wasteland_jackpot_shots_made; +extern U8 cryoprison_jackpot_shots_made; + +extern U8 demotime_jackpot_shots_made; + +extern U8 huxley_mode_shots_made; + +extern U8 back_in_the_fridge_shots_made; + + + + + +//internally called function prototypes --external found at protos.h +void bonus_button_monitor (void); +void bonus_sched_transition (void); +void bonus_pause (void); +bool check_for_big_score (void); +bool check_for_puny_score (void); + +/**************************************************************************** + * body + ****************************************************************************/ + +CALLSET_ENTRY (bonus, bonus){ + deff_start (DEFF_BONUS); +// leff_start (LEFF_BONUS); +// task_sleep_sec (1); +// while (deff_get_active() == DEFF_BONUS) task_sleep (TIME_500MS); +// leff_stop (LEFF_BONUS); +}//end of function + + + +void bonus_deff (void) { + in_bonus = TRUE; +// music_disable(); +// task_kill_gid (GID_MUSIC_REFRESH); +// music_off (); + + task_sleep (TIME_100MS); /* Wait a bit so the previous music_stop doesn't kill the sounds */ + sound_start1 (ST_ANY, BONUS_SHORT); + score_zero (total_bonus); /* Clear the bonus score */ + /* Show Initial bonus screen */ + dmd_alloc_low_clean (); + font_render_string_center (&font_fixed10, DMD_MIDDLE_X, DMD_BIG_CY_Cent, "BONUS"); + dmd_sched_transition (&trans_scroll_down); + dmd_show_low (); + task_sleep_sec (1); + + task_recreate_gid (GID_BONUS_BUTTON_MONITOR, bonus_button_monitor); /* Start a task to monitor the buttons */ + + /** + * *car crash scoring and display * + * **/ + if (car_crash_shots_made > 0) { + sound_start1 (ST_ANY, BONUS_SHORT); + dmd_alloc_low_clean (); + score_zero (bonus_scored); + score_add (bonus_scored, score_table[SC_100K]); + score_mul (bonus_scored, car_crash_shots_made); + score_add (total_bonus, bonus_scored); + + sprintf_score (bonus_scored); + font_render_string_center (&font_fixed10, DMD_MIDDLE_X, DMD_BIG_CY_Cent, sprintf_buffer); + sprintf ("CAR CRASH"); + font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_SMALL_CY_1, sprintf_buffer); + bonus_sched_transition (); + dmd_show_low (); + bonus_pause (); + }/***end of car crash scoring and display ***/ + + + + /** + * *car chase scoring and display * + * **/ + if (car_chase_modes_achieved > 0) { + sound_start1 (ST_ANY, BONUS_SHORT); + dmd_alloc_low_clean (); + score_zero (bonus_scored); + score_add (bonus_scored, score_table[SC_100K]); + score_mul (bonus_scored, car_chase_mode_shots_made); + score_add (total_bonus, bonus_scored); + + score_zero (bonus_scored); + score_add (bonus_scored, score_table[SC_1M]); + score_mul (bonus_scored, car_chase_modes_achieved); + score_add (total_bonus, bonus_scored); + + sprintf_score (bonus_scored); + font_render_string_center (&font_fixed10, DMD_MIDDLE_X, DMD_BIG_CY_Cent, sprintf_buffer); + sprintf ("CAR CHASE"); + font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_SMALL_CY_1, sprintf_buffer); + bonus_sched_transition (); + dmd_show_low (); + bonus_pause (); + }/***end of car chase scoring and display ***/ + + + + /** + * *capture_simon scoring and display * + * **/ + if (capture_simon_modes_achieved > 0) { + sound_start1 (ST_ANY, BONUS_SHORT); + dmd_alloc_low_clean (); + score_zero (bonus_scored); + score_add (bonus_scored, score_table[SC_100K]); + score_mul (bonus_scored, capture_simon_mode_shots_made); + score_add (total_bonus, bonus_scored); + + score_zero (bonus_scored); + score_add (bonus_scored, score_table[SC_1M]); + score_mul (bonus_scored, capture_simon_modes_achieved); + score_add (total_bonus, bonus_scored); + + score_zero (bonus_scored); + score_add (bonus_scored, score_table[SC_5M]); + score_mul (bonus_scored, capture_simon_modes_completed); + score_add (total_bonus, bonus_scored); + + sprintf_score (bonus_scored); + font_render_string_center (&font_fixed10, DMD_MIDDLE_X, DMD_BIG_CY_Cent, sprintf_buffer); + sprintf ("CAPTURE SIMON"); + font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_SMALL_CY_1, sprintf_buffer); + bonus_sched_transition (); + dmd_show_low (); + bonus_pause (); + }/***end of capture_simon scoring and display ***/ + + + + /** + * *prison_break scoring and display * + * **/ + if (prison_break_modes_achieved > 0) { + sound_start1 (ST_ANY, BONUS_SHORT); + dmd_alloc_low_clean (); + score_zero (bonus_scored); + score_add (bonus_scored, score_table[SC_100K]); + score_mul (bonus_scored, prison_break_mode_shots_made); + score_add (total_bonus, bonus_scored); + + score_zero (bonus_scored); + score_add (bonus_scored, score_table[SC_1M]); + score_mul (bonus_scored, prison_break_modes_achieved); + score_add (total_bonus, bonus_scored); + + sprintf_score (bonus_scored); + font_render_string_center (&font_fixed10, DMD_MIDDLE_X, DMD_BIG_CY_Cent, sprintf_buffer); + sprintf ("BREAKOUT"); + font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_SMALL_CY_1, sprintf_buffer); + bonus_sched_transition (); + dmd_show_low (); + bonus_pause (); + }/***end of prison_break scoring and display ***/ + + /** + * *acmag scoring and display * + * **/ + if (acmag_modes_achieved > 0) { + sound_start1 (ST_ANY, BONUS_SHORT); + dmd_alloc_low_clean (); + score_zero (bonus_scored); + score_add (bonus_scored, score_table[SC_100K]); + score_mul (bonus_scored, acmag_mode_shots_made); + score_add (total_bonus, bonus_scored); + + score_zero (bonus_scored); + score_add (bonus_scored, score_table[SC_1M]); + score_mul (bonus_scored, acmag_modes_achieved); + score_add (total_bonus, bonus_scored); + + sprintf_score (bonus_scored); + font_render_string_center (&font_fixed10, DMD_MIDDLE_X, DMD_BIG_CY_Cent, sprintf_buffer); + sprintf ("ACMAG"); + font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_SMALL_CY_1, sprintf_buffer); + bonus_sched_transition (); + dmd_show_low (); + bonus_pause (); + }/***end of acmag scoring and display ***/ + + /** + * *explode scoring and display * + * **/ + if (explode_mode_shots_made > 0) { + sound_start1 (ST_ANY, BONUS_SHORT); + dmd_alloc_low_clean (); + score_zero (bonus_scored); + score_add (bonus_scored, score_table[SC_100K]); + score_mul (bonus_scored, explode_mode_shots_made); + score_add (bonus_scored, score_table[SC_1M]); + score_add (total_bonus, bonus_scored); + + sprintf_score (bonus_scored); + font_render_string_center (&font_fixed10, DMD_MIDDLE_X, DMD_BIG_CY_Cent, sprintf_buffer); + sprintf ("EXPLODE"); + font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_SMALL_CY_1, sprintf_buffer); + bonus_sched_transition (); + dmd_show_low (); + bonus_pause (); + }/***end of explode scoring and display ***/ + + /** + * *superjets scoring and display * + * **/ + if (superjets_modes_achieved > 0) { + sound_start1 (ST_ANY, BONUS_SHORT); + dmd_alloc_low_clean (); + score_zero (bonus_scored); + score_add (bonus_scored, score_table[SC_100K]); + score_mul (bonus_scored, superjets_mode_shots_made); + score_add (total_bonus, bonus_scored); + + score_zero (bonus_scored); + score_add (bonus_scored, score_table[SC_1M]); + score_mul (bonus_scored, superjets_modes_achieved); + score_add (total_bonus, bonus_scored); + + sprintf_score (bonus_scored); + font_render_string_center (&font_fixed10, DMD_MIDDLE_X, DMD_BIG_CY_Cent, sprintf_buffer); + sprintf ("SUPERJETS"); + font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_SMALL_CY_1, sprintf_buffer); + bonus_sched_transition (); + dmd_show_low (); + bonus_pause (); + }/***end of superjets scoring and display ***/ + + + + /** + * *standupFrenzy scoring and display * + * **/ + if (standupFrenzy_modes_achieved > 0) { + sound_start1 (ST_ANY, BONUS_SHORT); + dmd_alloc_low_clean (); + score_zero (bonus_scored); + score_add (bonus_scored, score_table[SC_100K]); + score_mul (bonus_scored, standupFrenzyNumHits); + score_add (total_bonus, bonus_scored); + + score_zero (bonus_scored); + score_add (bonus_scored, score_table[SC_1M]); + score_mul (bonus_scored, standupFrenzy_modes_achieved); + score_add (total_bonus, bonus_scored); + + sprintf_score (bonus_scored); + font_render_string_center (&font_fixed10, DMD_MIDDLE_X, DMD_BIG_CY_Cent, sprintf_buffer); + sprintf ("FRENZY"); + font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_SMALL_CY_1, sprintf_buffer); + bonus_sched_transition (); + dmd_show_low (); + bonus_pause (); + }/***end of standupFrenzy scoring and display ***/ + + + + + /** + * *fortress scoring and display * + * **/ + if (fortress_jackpot_shots_made > 0) { + sound_start1 (ST_ANY, BONUS_SHORT); + dmd_alloc_low_clean (); + score_zero (bonus_scored); + score_add (bonus_scored, score_table[SC_100K]); + score_mul (bonus_scored, fortress_jackpot_shots_made); + score_add (total_bonus, bonus_scored); + + sprintf_score (bonus_scored); + font_render_string_center (&font_fixed10, DMD_MIDDLE_X, DMD_BIG_CY_Cent, sprintf_buffer); + sprintf ("FORTRESS"); + font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_SMALL_CY_1, sprintf_buffer); + bonus_sched_transition (); + dmd_show_low (); + bonus_pause (); + }/***end of fortress scoring and display ***/ + + + + + /** + * *demotime scoring and display * + * **/ + if (demotime_jackpot_shots_made > 0) { + sound_start1 (ST_ANY, BONUS_SHORT); + dmd_alloc_low_clean (); + score_zero (bonus_scored); + score_add (bonus_scored, score_table[SC_100K]); + score_mul (bonus_scored, demotime_jackpot_shots_made); + score_add (total_bonus, bonus_scored); + + sprintf_score (bonus_scored); + font_render_string_center (&font_fixed10, DMD_MIDDLE_X, DMD_BIG_CY_Cent, sprintf_buffer); + sprintf ("demotime"); + font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_SMALL_CY_1, sprintf_buffer); + bonus_sched_transition (); + dmd_show_low (); + bonus_pause (); + }/***end of demotime_ scoring and display ***/ + + + + + /** + * *wasteland scoring and display * + * **/ + if (wasteland_jackpot_shots_made > 0) { + sound_start1 (ST_ANY, BONUS_SHORT); + dmd_alloc_low_clean (); + score_zero (bonus_scored); + score_add (bonus_scored, score_table[SC_100K]); + score_mul (bonus_scored, wasteland_jackpot_shots_made); + score_add (total_bonus, bonus_scored); + + sprintf_score (bonus_scored); + font_render_string_center (&font_fixed10, DMD_MIDDLE_X, DMD_BIG_CY_Cent, sprintf_buffer); + sprintf ("WASTELAND"); + font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_SMALL_CY_1, sprintf_buffer); + bonus_sched_transition (); + dmd_show_low (); + bonus_pause (); + }/***end of wasteland_ scoring and display ***/ + + + + + + /** + * *cryoprison scoring and display * + * **/ + if (cryoprison_jackpot_shots_made > 0) { + sound_start1 (ST_ANY, BONUS_SHORT); + dmd_alloc_low_clean (); + score_zero (bonus_scored); + score_add (bonus_scored, score_table[SC_100K]); + score_mul (bonus_scored, cryoprison_jackpot_shots_made); + score_add (total_bonus, bonus_scored); + + sprintf_score (bonus_scored); + font_render_string_center (&font_fixed10, DMD_MIDDLE_X, DMD_BIG_CY_Cent, sprintf_buffer); + sprintf ("CRYOPRISON"); + font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_SMALL_CY_1, sprintf_buffer); + bonus_sched_transition (); + dmd_show_low (); + bonus_pause (); + }/***end of cryoprison_ scoring and display ***/ + + + + + /** + * *demotime scoring and display * + * **/ + if (demotime_jackpot_shots_made > 0) { + sound_start1 (ST_ANY, BONUS_SHORT); + dmd_alloc_low_clean (); + score_zero (bonus_scored); + score_add (bonus_scored, score_table[SC_100K]); + score_mul (bonus_scored, demotime_jackpot_shots_made); + score_add (total_bonus, bonus_scored); + + sprintf_score (bonus_scored); + font_render_string_center (&font_fixed10, DMD_MIDDLE_X, DMD_BIG_CY_Cent, sprintf_buffer); + sprintf ("DEMOLITION TIME"); + font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_SMALL_CY_1, sprintf_buffer); + bonus_sched_transition (); + dmd_show_low (); + bonus_pause (); + }/***end of demotime_ scoring and display ***/ + + + + + + /** + * *huxley scoring and display * + * **/ + if (huxley_mode_shots_made > 0) { + sound_start1 (ST_ANY, BONUS_SHORT); + dmd_alloc_low_clean (); + score_zero (bonus_scored); + score_add (bonus_scored, score_table[SC_100K]); + score_mul (bonus_scored, huxley_mode_shots_made); + score_add (total_bonus, bonus_scored); + + sprintf_score (bonus_scored); + font_render_string_center (&font_fixed10, DMD_MIDDLE_X, DMD_BIG_CY_Cent, sprintf_buffer); + sprintf ("HUXLEY"); + font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_SMALL_CY_1, sprintf_buffer); + bonus_sched_transition (); + dmd_show_low (); + bonus_pause (); + }/***end of huxley scoring and display ***/ + + + + + + /** + * *back_in_the_fridge scoring and display * + * **/ + if (back_in_the_fridge_shots_made > 0) { + sound_start1 (ST_ANY, BONUS_SHORT); + dmd_alloc_low_clean (); + score_zero (bonus_scored); + score_add (bonus_scored, score_table[SC_100K]); + score_mul (bonus_scored, back_in_the_fridge_shots_made); + score_add (total_bonus, bonus_scored); + + sprintf_score (bonus_scored); + font_render_string_center (&font_fixed10, DMD_MIDDLE_X, DMD_BIG_CY_Cent, sprintf_buffer); + sprintf ("FRIDGE"); + font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_SMALL_CY_1, sprintf_buffer); + bonus_sched_transition (); + dmd_show_low (); + bonus_pause (); + }/***end of back_in_the_fridge scoring and display ***/ + + + + + /* Show final score */ + sound_start1 (ST_ANY, BONUS_LONG); + + score_long (total_bonus); // Add to total bonus to player score + dmd_alloc_low_clean (); + scores_draw (); + dmd_sched_transition (&trans_scroll_up); + dmd_show_low (); + task_kill_gid (GID_BONUS_BUTTON_MONITOR); + task_sleep_sec (1); +// task_kill_gid (GID_BONUS_TALKING); + + /*make verbal comments on final score*/ + U8 BSoundCounter; + BSoundCounter = random_scaled(5); + if (check_for_puny_score () ) { + if (BSoundCounter == 0) sound_start1 (ST_ANY, SPCH_PATHETIC); + if (BSoundCounter == 1) sound_start1 (ST_ANY, SPCH_SIMON_LAUGH_LONG); + if (BSoundCounter == 2) sound_start1 (ST_ANY, SPCH_SIMON_SNICKER); + if (BSoundCounter == 3) sound_start1 (ST_ANY, SPCH_PATHETIC); + if (BSoundCounter == 4) sound_start1 (ST_ANY, SPCH_HATE_WHEN_THAT_HAPPENS); + } + else if (check_for_big_score () ) { + if (BSoundCounter == 0) sound_start1 (ST_ANY, SPCH_BEST_DAY_OF_MY_LIFE); + if (BSoundCounter == 1) sound_start1 (ST_ANY, SPCH_HOW_NICE); + if (BSoundCounter == 2) sound_start1 (ST_ANY, SPCH_LOVE_THIS_GUY); + if (BSoundCounter == 3) sound_start1 (ST_ANY, SPCH_SOMETHING_RIGHT_PREV_LIFE); + if (BSoundCounter == 4) sound_start1 (ST_ANY, SPCH_OUTSTANDING); + } + task_sleep_sec (2); + in_bonus = FALSE; + //this will start second half of end_ball routine in kernal/game.c + //or if tilted will reset tilt at common/tilt.c + callset_invoke (bonus_complete); + deff_exit (); +}//END OF FUNCTION + + + + +/**************************************************************************** + * + * bonus helper functions + * + ****************************************************************************/ +/* Speed up the bonus if flipper buttons are pressed */ +void bonus_button_monitor (void) { + buttons_held = FALSE; + for (;;) { + if ( switch_poll_logical (SW_LEFT_BUTTON) + || switch_poll_logical (SW_RIGHT_BUTTON) + || switch_poll_logical (SW_U_L_FLIPPER_BUTTON) + || switch_poll_logical (SW_U_R_FLIPPER_BUTTON) ) + buttons_held = TRUE; + else buttons_held = FALSE; + task_sleep (TIME_200MS); + }//end of for loop +}//end of function + + + + + +/* Function so we can call two different transistions + * depending on whether the buttons were pressed */ +void bonus_sched_transition (void) { + if (buttons_held == TRUE) + dmd_sched_transition (&trans_scroll_down_fast); + else + dmd_sched_transition (&trans_scroll_down); +}//end of function + + + + +void bonus_pause (void) { + if (buttons_held) task_sleep (TIME_100MS); + else task_sleep_sec (1); +}//end of function + + + + + + +/* Used to announce if the player has played well */ +bool check_for_big_score (void) { + if (score_compare (total_bonus, score_table[SC_5M]) == 1) return TRUE; + else return FALSE; +}//end of function + + + + + + +//returns 1 if s1 > s2 +bool check_for_puny_score (void) { + if (score_compare (score_table[SC_5M], total_bonus) == 1) return TRUE; + else return FALSE; +}//end of function + + + + + + +/* See if it's the players last ball */ +/* +bool check_if_last_ball_for_multiplayer (void) +{ + if (ball_up == system_config.balls_per_game && num_players > 1 && extra_balls == 0) + return TRUE; + else + return FALSE; +} +*/ + + + + +/* +bool check_if_last_ball_of_multiplayer_game (void) +{ + if (ball_up == system_config.balls_per_game && player_up == num_players && + num_players > 1 && extra_balls == 0) + return TRUE; + else + return FALSE; +} +*/ diff --git a/machine/dm/call_tester.c b/machine/dm/call_tester.c new file mode 100644 index 000000000..bd11778e2 --- /dev/null +++ b/machine/dm/call_tester.c @@ -0,0 +1,165 @@ +/* + * demolition man + * calltester.c + * + * written by James Cardona + * + * + */ +#include + +#define RAMPS +#define CAPTURE +#define PRISON +#define CMAG //acmag.c +#define LOCK +#define CARCHASE +#define FORTRESS +#define EXPLO //expolde.c +//#define JETS +#define COMBOS +#define JACKPOTS +#define INLANES +#define ARROWS +#define DEMOTIME +#define CRYOPRISON +#define WASTELAND +#define CRASH +#define UGROUND +#define HUXLEY +//#define SKILL +//#define XTRABALL +//#define SJ_REMINDER + + +#ifndef SJETS +U8 superjets_modes_achieved; //from superjets.c +U8 superjets_mode_shots_made; +#endif + + +#ifndef SKILL +void award_skill_shot (U8 type_skill_shot_made){} +#endif + +#ifndef XTRABALL +void start_extraball(void){} +void end_extraball(void){} +#endif + +#ifndef SJ_REMINDER +void start_super_jackpot_reminder (void){} +void end_super_jackpot_reminder (void){} +#endif + +#ifndef PLD +void enable_back_in_the_fridge(void){} +void start_back_in_the_fridge(void){} +void back_in_the_fridge_shot_made(void){} +#endif + +#ifndef HUXLEY +void huxley_increment(void){} +void huxley_begin(void){} +void huxley_mode_shot_made(void){} +void huxley_made(void){} +#endif + +#ifndef ARROWS +void center_ramp_arrow_update(void){} +void all_arrow_update(void){} +#endif + + +#ifndef INLANES +void access_claw_light_on(void){} +void light_quick_freeze_light_on (void){} +void light_quick_freeze_light_off (void){} +#endif + + +#ifndef JETS +const U8 jet_shots_made = 0; //needed by eyeball.c +#endif + +#ifndef COMBOS +void comp_award_light_arrows(void){} +void combo_hit(void ){} +void combo_init(void){} +#endif + +#ifndef JACKPOTS +void jackpot_reset (void){} +void choose_random_jackpot(void){} +void score_jackpot(void){} +void set_all_jackpots (void){} +#endif + +#ifndef EXPLO +void start_explode(void){} +void explode_made(void){} +#endif + + +#ifndef CMAG +void acmag_made(void){ } //needed by ramps.c +#endif + +#ifndef RAMPS +#endif + +#ifndef LOCK +//lock_freeze_mbstart.c +void maximize_freeze(void){} +void increment_freeze(void){} +void multiball_start (void){} +void multiball_started (void){} +#endif + +#ifndef CAPTURE +void capture_simon_made(void){} +#endif + +#ifndef CARCHASE +void start_car_chase(void){} +void car_chase_ramp_made(void){} + +void comp_award_trip_car_crash(void){} +#endif + +#ifndef PRISON +//prison_break.c +void prison_break_made (void){} +#endif + +#ifndef FORTRESS +void fortress_start(void){} +void fortress_jackpot_made(void){} +#endif + + +#ifndef UGROUND +void underground_jackpot_light_on(void){} +void underground_jackpot_light_off(void){} +void underground_arrow_light_on(void){} +void underground_arrow_light_off(void){} +void computer_light_on(void){} +void computer_light_off(void){} +#endif + +#ifndef DEMOTIME +void demotime_increment (void){} +void demotime_start(void){} +void demotime_jackpot_made(void){} +#endif + +#ifndef CRYOPRISON +void cryoprison_start(U8 num){} +void cryoprison_jackpot_made(void){} +void cryoprison_award_super_jackpot(void){} +#endif + +#ifndef WASTELAND +void wasteland_start(void){} +void wasteland_jackpot_made(void){} +#endif diff --git a/machine/dm/capture_simon.c b/machine/dm/capture_simon.c new file mode 100644 index 000000000..5a19bd7e8 --- /dev/null +++ b/machine/dm/capture_simon.c @@ -0,0 +1,552 @@ +/* + * demolition man + * capture_simon.c + * + * written by James Cardona + * + * Location Description: + * mode started by claw switch capture_simon + * + * Scoring Description: (original game) + * The ball is dropped down a tunnel and served to the + * right ramp just like the Underground. The seven + * major shots are lit for 5 mil each for three shots. + * A 25 million award for completing all three shots for a total of 40 million + + * Scoring Description: (my rules) + * same as above except: + * major shots are lit for 15 mil each for three shots. + * A 50 million award for completing all three shots for a total of 95 million. + * + * estimate of average capture simon mode score: 30 million to 95 million + * + */ +/* CALLSET_SECTION (capture_simon, __machine3__) */ + +#include +#include "dm/global_constants.h" +#include "clawmagnet.h" +#include //autogenerated by divhold.ct +#include "capture_simon.h" + +//constants +const U8 CAP_SIM_EASY_GOAL = 3; +const U8 CAP_SIM_MED_GOAL = 4; +const U8 CAP_SIM_HARD_GOAL = 5; +const U8 CAP_SIM_GOAL_INCREMENT = 1; +const U8 CAP_SIM_GOAL_MAX = 10; + +//local variables +U8 capture_simon_SoundCounter; +U8 capture_simon_mode_shots_made; +U8 capture_simon_mode_shots_goal; +__local__ U8 capture_simon_modes_achieved; +__local__ U8 capture_simon_modes_completed; +U8 capture_simon_mode_timer; +score_t capture_simon_mode_score; +score_t capture_simon_mode_last_score; +score_t capture_simon_mode_next_score; +score_t capture_simon_mode_score_total_score; + + +//external variables + +//internally called function prototypes --external found at protos.h +void capture_simon_reset (void); +void capture_simon_player_reset (void); +void capture_simon_effect_deff(void); +void capture_simon_mode_init (void); +void capture_simon_mode_expire (void); +void capture_simon_mode_exit (void); +void cap_simon_choose_random_flag_set(void); + +/**************************************************************************** + * mode definition structure + ***************************************************************************/ +struct timed_mode_ops capture_simon_mode = { + DEFAULT_MODE, + .init = capture_simon_mode_init, + .exit = capture_simon_mode_expire, + .gid = GID_CAPTURE_SIMON_MODE_RUNNING, + .music = MUS_MD_CAPTURE_SIMON, + .deff_starting = DEFF_CAPTURE_SIMON_START_EFFECT, + .deff_running = DEFF_CAPTURE_SIMON_EFFECT, + .deff_ending = DEFF_CAPTURE_SIMON_END_EFFECT, + .prio = PRI_GAME_MODE4, + .init_timer = 48, + .timer = &capture_simon_mode_timer, + .grace_timer = 2, +// .pause = system_timer_pause, +}; + + + +/**************************************************************************** + * initialize and exit + ***************************************************************************/ +void capture_simon_reset (void) { + flag_off (FLAG_IS_CAPSIM_SIDERAMP_ACTIVATED); + flag_off (FLAG_IS_CAPSIM_LEFTRAMP_ACTIVATED); + flag_off (FLAG_IS_CAPSIM_RIGHTRAMP_ACTIVATED); + flag_off (FLAG_IS_CAPSIM_UNDER_ACTIVATED); + flag_off (FLAG_IS_CAPSIM_CENTERRAMP_ACTIVATED); + flag_off (FLAG_IS_CAPSIM_LEFTORB_ACTIVATED); + flag_off (FLAG_IS_CAPSIM_RIGHTORB_ACTIVATED); + flag_off (FLAG_CAPTURE_SIMON_INITIALSTART); +}//end of function + + +void capture_simon_player_reset (void) { + capture_simon_reset(); + capture_simon_modes_achieved = 0; + capture_simon_modes_completed = 0;//these need to be zeroed in before we enter the mode so bonus doesn't fake trigger + capture_simon_mode_shots_made = 0; + capture_simon_mode_shots_goal = CAP_SIM_EASY_GOAL; + score_zero(capture_simon_mode_score_total_score); + capture_simon_SoundCounter = 0; +}//end of function + + + +//purpose here is to prevent underground from triggering since +//this shot feeds to underground +void capture_simon_startup_task (void) { + flag_on(FLAG_CAPTURE_SIMON_INITIALSTART); + task_sleep_sec(10); + //this is just here in case deff hangs or does not play + flag_off (FLAG_CAPTURE_SIMON_INITIALSTART); + task_exit(); +}//end of function + + + + +void capture_simon_mode_init (void) { + task_create_gid1(GID_CAP_SIM_START, capture_simon_startup_task); + //the claw mode can expire on its own and since it is a lower priority it will not display + //callset_invoke (end_claw_mode); // as this seemed to cause occasional crashes + clawmagnet_off (); + flag_off(FLAG_IS_BALL_ON_CLAW); + flipper_enable (); + ballsave_add_time (10); + capture_simon_mode_shots_made = 0; + ++capture_simon_modes_achieved; + kill_combos (); + //flash lamp for a time + lamp_tristate_flash(LM_CLAW_CAPTURE_SIMON); + task_sleep(TIME_500MS); + lamp_tristate_on(LM_CLAW_CAPTURE_SIMON); + score_zero(capture_simon_mode_score); + score_zero(capture_simon_mode_last_score); + score_zero(capture_simon_mode_next_score); + switch (capture_simon_modes_achieved ){ + case 1: score_add(capture_simon_mode_next_score, score_table[CAPSIM_HIT_SCORE_1]); break; + case 2: score_add(capture_simon_mode_next_score, score_table[CAPSIM_HIT_SCORE_2]); break; + default: + case 3: score_add(capture_simon_mode_next_score, score_table[CAPSIM_HIT_SCORE_3]); break; + }//end of switch + //this pause is here to give sounds time to finish + task_sleep(TIME_500MS); + task_sleep(TIME_500MS); + task_sleep(TIME_500MS); + cap_simon_choose_random_flag_set(); + all_arrow_update(); + demotime_increment(); + diverter_stop();//defined in divhold2.ct + task_kill_gid (GID_CR_LIGHTS); +}//end of function + + + + +//this is an exit on timeout, ball still in play +void capture_simon_mode_expire (void) { + flag_off (FLAG_IS_CAPSIM_SIDERAMP_ACTIVATED); + flag_off (FLAG_IS_CAPSIM_LEFTRAMP_ACTIVATED); + flag_off (FLAG_IS_CAPSIM_RIGHTRAMP_ACTIVATED); + flag_off (FLAG_IS_CAPSIM_UNDER_ACTIVATED); + flag_off (FLAG_IS_CAPSIM_CENTERRAMP_ACTIVATED); + flag_off (FLAG_IS_CAPSIM_LEFTORB_ACTIVATED); + flag_off (FLAG_IS_CAPSIM_RIGHTORB_ACTIVATED); + all_arrow_update(); + flag_off (FLAG_CAPTURE_SIMON_INITIALSTART); + + diverter_check(); + + capture_simon_mode_shots_goal += CAP_SIM_GOAL_INCREMENT;//increment goal for next time + + combo_init (); +}//end of function + + + +//this is an exit on end of ball +//must do this differently to prevent excessive cycling of diverter which +//tends to blow fuses +void capture_simon_mode_exit (void) { + flag_off (FLAG_IS_CAPSIM_SIDERAMP_ACTIVATED); + flag_off (FLAG_IS_CAPSIM_LEFTRAMP_ACTIVATED); + flag_off (FLAG_IS_CAPSIM_RIGHTRAMP_ACTIVATED); + flag_off (FLAG_IS_CAPSIM_UNDER_ACTIVATED); + flag_off (FLAG_IS_CAPSIM_CENTERRAMP_ACTIVATED); + flag_off (FLAG_IS_CAPSIM_LEFTORB_ACTIVATED); + flag_off (FLAG_IS_CAPSIM_RIGHTORB_ACTIVATED); + all_arrow_update(); + flag_off (FLAG_CAPTURE_SIMON_INITIALSTART); + + capture_simon_mode_shots_goal += CAP_SIM_GOAL_INCREMENT;//increment goal for next time + + timed_mode_end2 (&capture_simon_mode); + }//end of function + + + +/**************************************************************************** + * external event listeners + ****************************************************************************/ +CALLSET_ENTRY (capture_simon, music_refresh) { timed_mode_music_refresh (&capture_simon_mode); } +CALLSET_ENTRY (capture_simon, end_ball) { if (timed_mode_running_p(&capture_simon_mode) ) capture_simon_mode_exit(); } +CALLSET_ENTRY (capture_simon, display_update) { timed_mode_display_update (&capture_simon_mode); } + +CALLSET_ENTRY (capture_simon, start_player) { capture_simon_player_reset(); } +CALLSET_ENTRY (capture_simon, start_ball) { capture_simon_reset(); } + + + +/**************************************************************************** + * + * body + * + ***************************************************************************/ +CALLSET_ENTRY (capture_simon, sw_claw_capture_simon) { + demotime_increment(); + timed_mode_begin (&capture_simon_mode);//start mode +}//end of function + + + + //center ramp shot made during capture_simon mode +void capture_simon_made(void) { + ++capture_simon_mode_shots_made; + score_zero(capture_simon_mode_last_score); + switch (capture_simon_modes_achieved ){ + case 1: + score (CAPSIM_HIT_SCORE_1); + score_add(capture_simon_mode_last_score, score_table[CAPSIM_HIT_SCORE_1]); + break; + case 2: + //2nd time we are in capture_simon - score differently + score (CAPSIM_HIT_SCORE_2); + score_add(capture_simon_mode_last_score, score_table[CAPSIM_HIT_SCORE_2]); + break; + default: + case 3: + //3rd time we are in capture_simon - score differently + score (CAPSIM_HIT_SCORE_3); + score_add(capture_simon_mode_last_score, score_table[CAPSIM_HIT_SCORE_3]); + break; + }//end of switch + score_add (capture_simon_mode_score, capture_simon_mode_last_score); + score_add (capture_simon_mode_score_total_score, capture_simon_mode_last_score); + + if (capture_simon_mode_shots_made < capture_simon_mode_shots_goal ) { + cap_simon_choose_random_flag_set(); + all_arrow_update(); + deff_start (DEFF_CAPTURE_SIMON_HIT_EFFECT); + + } //IF FINAL CAPTURE SIMON SHOT MADE + else { + score (CAP_SIM_COMPLETED_SCORE); + score_add(capture_simon_mode_score, score_table[CAP_SIM_COMPLETED_SCORE]); + score_add (capture_simon_mode_score_total_score, score_table[CAP_SIM_COMPLETED_SCORE]); + deff_start (DEFF_CAPTURE_SIMON_END_EFFECT); + capture_simon_mode_exit(); + } +}//end of function + + + +/**************************************************************************** + * + * DMD display and sound effects + * + ****************************************************************************/ +void cap_sim_animation_display_effect (U16 start_frame, U16 end_frame){ + U16 fno; + for (fno = start_frame; fno <= end_frame; fno += 2) { + dmd_alloc_pair (); + frame_draw(fno); + dmd_show2 (); + task_sleep (TIME_100MS); + }//end of inner loop +} + + + +void capture_simon_frame_bitfade_fast (U16 frame){ + dmd_sched_transition (&trans_bitfade_fast); + dmd_alloc_pair (); + frame_draw(frame); + dmd_show2 (); + task_sleep (TIME_100MS); +} + + + + +U8 capture_simon_MessageCounter; +void capture_simon_start_effect_deff(void) { + capture_simon_MessageCounter = random_scaled(2); + if (++capture_simon_MessageCounter > 1) capture_simon_MessageCounter = 0; //for testing + + dmd_clean_page_high ();// + dmd_clean_page_low ();// + + sound_start (ST_SPEECH, SPCH_UNDER_ARREST, SL_3S, PRI_GAME_QUICK1); + + switch (capture_simon_MessageCounter) { + default: + case 0: + cap_sim_animation_display_effect (IMG_CAPSIMON_A_START, IMG_CAPSIMON_A_END); + capture_simon_frame_bitfade_fast(IMG_SIMON_B_START); + + sound_start (ST_SPEECH, SPCH_SO_SCARED, SL_4S, PRI_GAME_QUICK1); + + cap_sim_animation_display_effect (IMG_SIMON_B_START, IMG_SIMON_B_END); + dmd_map_overlay (); + dmd_clean_page_low (); + font_render_string_center (&font_bitoutline, DMD_MIDDLE_X - 20, DMD_BIG_CY_Top, "CAPTURE"); + font_render_string_center (&font_bitoutline, DMD_MIDDLE_X + 20, DMD_BIG_CY_Bot, "SIMON"); + dmd_text_outline (); + dmd_alloc_pair (); + frame_draw(IMG_SIMON_B_END); + dmd_overlay_outline (); + dmd_show2 (); + break; + case 1: + cap_sim_animation_display_effect (IMG_SIMON_B_START, IMG_SIMON_B_END); + capture_simon_frame_bitfade_fast(IMG_CAPSIMON_A_START); + + sound_start (ST_SPEECH, SPCH_SO_SCARED, SL_4S, PRI_GAME_QUICK1); + + cap_sim_animation_display_effect (IMG_CAPSIMON_A_START, IMG_CAPSIMON_A_END); + dmd_map_overlay (); + dmd_clean_page_low (); + font_render_string_center (&font_bitoutline, DMD_MIDDLE_X - 20, DMD_BIG_CY_Top, "CAPTURE"); + font_render_string_center (&font_bitoutline, DMD_MIDDLE_X + 20, DMD_BIG_CY_Bot, "SIMON"); + dmd_text_outline (); + dmd_alloc_pair (); + frame_draw(IMG_CAPSIMON_A_END); + dmd_overlay_outline (); + dmd_show2 (); + break; + }//end of switch + task_sleep_sec (1); + flag_off (FLAG_CAPTURE_SIMON_INITIALSTART); + task_sleep_sec (1); + deff_exit (); +}//end of mode_effect_deff + + + +void capture_simon_hit_effect_deff(void) { + //capture_simon_mode_shots_made++; //for testing only + dmd_alloc_low_clean (); + U8 cap_simon_effect_randomizer = random_scaled(2); + switch (cap_simon_effect_randomizer) { + case 0 : + // DRAW HAND CUFFS + sound_start (ST_SPEECH, SPCH_WES_LAUGH1, SL_4S, PRI_GAME_QUICK5); + bitmap_blit (cuffs_1_bits, 0, 0); + font_render_string_center (&font_bitoutline, DMD_MIDDLE_X + 20, DMD_BIG_CY_Top, "CAUGHT"); + sprintf_score (capture_simon_mode_last_score); + font_render_string_center (&font_bitoutline, DMD_MIDDLE_X + 20, DMD_BIG_CY_Bot, sprintf_buffer); + dmd_show_low (); + task_sleep_sec (2); + // DRAW FOOT STEPS RUNNING AWAY + dmd_clean_page_low (); + bitmap_blit (footstep_left_2_bits, 104, 18); + dmd_show_low (); + sound_start (ST_EFFECT, TOINK1, SL_1S, PRI_GAME_QUICK5); + task_sleep (TIME_200MS); + bitmap_blit (footstep_left_1_bits, 76, 6); + sound_start (ST_EFFECT, TOINK2, SL_1S, PRI_GAME_QUICK5); + dmd_show_low (); + task_sleep (TIME_200MS); + bitmap_blit (footstep_left_2_bits, 48, 18); + dmd_show_low (); + sound_start (ST_EFFECT, TOINK1, SL_1S, PRI_GAME_QUICK5); + task_sleep (TIME_200MS); + bitmap_blit (footstep_left_1_bits, 20, 6); + sound_start (ST_EFFECT, TOINK2, SL_1S, PRI_GAME_QUICK5); + task_sleep (TIME_200MS); + dmd_show_low (); + task_sleep_sec (1); + break; + case 1 : + // DRAW HAND CUFFS + sound_start (ST_SPEECH, SPCH_WES_LAUGH2, SL_4S, PRI_GAME_QUICK5); + bitmap_blit (cuffs_3_bits, 0, 10); + font_render_string_center (&font_bitoutline, DMD_MIDDLE_X + 20, DMD_BIG_CY_Top, "CAUGHT"); + sprintf_score (capture_simon_mode_last_score); + font_render_string_center (&font_bitoutline, DMD_MIDDLE_X + 20, DMD_BIG_CY_Bot, sprintf_buffer); + dmd_show_low (); + task_sleep_sec (2); + // DRAW FOOT STEPS RUNNING AWAY + dmd_clean_page_low (); + bitmap_blit (footstep_right_2_bits, 0, 18); + dmd_show_low (); + sound_start (ST_EFFECT, TOINK1, SL_1S, PRI_GAME_QUICK5); + task_sleep (TIME_200MS); + bitmap_blit (footstep_right_1_bits, 28, 6); + sound_start (ST_EFFECT, TOINK2, SL_1S, PRI_GAME_QUICK5); + dmd_show_low (); + task_sleep (TIME_200MS); + bitmap_blit (footstep_right_2_bits, 56, 18); + dmd_show_low (); + sound_start (ST_EFFECT, TOINK1, SL_1S, PRI_GAME_QUICK5); + task_sleep (TIME_200MS); + bitmap_blit (footstep_right_1_bits, 84, 6); + sound_start (ST_EFFECT, TOINK2, SL_1S, PRI_GAME_QUICK5); + dmd_show_low (); + task_sleep (TIME_200MS); + task_sleep_sec (1); + break; + }//end of switch + deff_exit (); +}//end of mode_effect_deff + + + + + +void capture_simon_end_effect_deff(void) { + //capture_simon_mode_shots_made++; //for testing only + dmd_alloc_low_clean (); + sound_start (ST_SPEECH, SPCH_UNDER_ARREST, SL_3S, PRI_GAME_QUICK1); + // DRAW HAND CUFFS + bitmap_blit (cuffs_3_bits, 0, 0); + font_render_string_center (&font_bitoutline, DMD_MIDDLE_X + 20, DMD_BIG_CY_Top, "CAUGHT"); + sprintf_score (capture_simon_mode_score); + font_render_string_center (&font_bitoutline, DMD_MIDDLE_X + 10, DMD_BIG_CY_Bot, sprintf_buffer); + dmd_show_low (); + task_sleep_sec (2); + deff_exit (); +}//end of mode_effect_deff + + + + + +void capture_simon_effect_deff(void) { + U8 i = 0; + U8 j = 0; + __boolean TOGGLE = FALSE; + __boolean TOGGLE_BOTTOM = FALSE; + + for (;;) { + dmd_alloc_pair_clean(); + + dmd_draw_thin_border (dmd_low_buffer); + + if (++i % 10 == 0) { if (TOGGLE) TOGGLE = FALSE; else TOGGLE = TRUE; }//change TOGGLE once per second + + if (i % 10 != 0) { //draw for 4/5 and blank for 1/5 + if (TOGGLE) { + font_render_string_center (&font_bitoutline, DMD_MIDDLE_X + 23, DMD_BIG_CY_Top - 3, "SIMON"); + }//end of if (TOGGLE) + else { + font_render_string_center (&font_bitoutline, DMD_MIDDLE_X + 23, DMD_BIG_CY_Top - 3, "CAPTURE"); + }//end of else + }//end of if (i % 5 != 0) + + if (++j % 40 == 0) { if (TOGGLE_BOTTOM) TOGGLE_BOTTOM = FALSE; else TOGGLE_BOTTOM = TRUE; }//change TOGGLE once per second + + if (j % 40 != 0) { //draw for 9/10 and blank for 1/10 + if (TOGGLE_BOTTOM) { + sprintf ("%d SEC, %d HIT", capture_simon_mode_timer, capture_simon_mode_shots_made); + font_render_string_center (&font_var5, DMD_MIDDLE_X + 23, DMD_SMALL_CY_3, sprintf_buffer); + + sprintf_score (capture_simon_mode_next_score); + font_render_string_center (&font_term6, DMD_MIDDLE_X + 23, DMD_MED_CY_3, sprintf_buffer); + bitmap_blit (cuffs_1_bits, 0, 1); + }//end of if (TOGGLE) + else { + sprintf ("SHOOT"); + font_render_string_center (&font_term6, DMD_MIDDLE_X + 25, DMD_MED_CY_2, sprintf_buffer); + sprintf ("ARROWS"); + font_render_string_center (&font_term6, DMD_MIDDLE_X + 25, DMD_MED_CY_3, sprintf_buffer); + bitmap_blit (cuffs_3_bits, 0, 1); + }//end of else + }//end of if (i % 10 != 0) + + dmd_show_low (); + task_sleep (TIME_200MS); + }//END OF ENDLESS LOOP +}//end of mode_effect_deff + + + + + +/**************************************************************************** + * + * randomize flag chosen + * + * we are using a very stupid and in-elegant + * way of randomness - basically, we have a number + * of predefined sets of flags and we randomly + * pick one of those sets + ****************************************************************************/ +void cap_simon_choose_random_flag_set(void) { + U8 random_chooser; + random_chooser = random_scaled(5); + switch (random_chooser) { + case 0: + flag_on (FLAG_IS_CAPSIM_SIDERAMP_ACTIVATED); + flag_on (FLAG_IS_CAPSIM_LEFTRAMP_ACTIVATED); + flag_off (FLAG_IS_CAPSIM_RIGHTRAMP_ACTIVATED); + flag_off (FLAG_IS_CAPSIM_UNDER_ACTIVATED); + flag_off (FLAG_IS_CAPSIM_CENTERRAMP_ACTIVATED); + flag_on (FLAG_IS_CAPSIM_LEFTORB_ACTIVATED); + flag_off (FLAG_IS_CAPSIM_RIGHTORB_ACTIVATED); + break; + case 1: + flag_on (FLAG_IS_CAPSIM_SIDERAMP_ACTIVATED); + flag_on (FLAG_IS_CAPSIM_LEFTRAMP_ACTIVATED); + flag_off (FLAG_IS_CAPSIM_RIGHTRAMP_ACTIVATED); + flag_off (FLAG_IS_CAPSIM_UNDER_ACTIVATED); + flag_off (FLAG_IS_CAPSIM_CENTERRAMP_ACTIVATED); + flag_off (FLAG_IS_CAPSIM_LEFTORB_ACTIVATED); + flag_on (FLAG_IS_CAPSIM_RIGHTORB_ACTIVATED); + break; + case 2: + flag_off (FLAG_IS_CAPSIM_SIDERAMP_ACTIVATED); + flag_off (FLAG_IS_CAPSIM_LEFTRAMP_ACTIVATED); + flag_on (FLAG_IS_CAPSIM_RIGHTRAMP_ACTIVATED); + flag_on (FLAG_IS_CAPSIM_UNDER_ACTIVATED); + flag_on (FLAG_IS_CAPSIM_CENTERRAMP_ACTIVATED); + flag_off (FLAG_IS_CAPSIM_LEFTORB_ACTIVATED); + flag_off (FLAG_IS_CAPSIM_RIGHTORB_ACTIVATED); + break; + case 3: + flag_off (FLAG_IS_CAPSIM_SIDERAMP_ACTIVATED); + flag_off (FLAG_IS_CAPSIM_LEFTRAMP_ACTIVATED); + flag_on (FLAG_IS_CAPSIM_RIGHTRAMP_ACTIVATED); + flag_on (FLAG_IS_CAPSIM_UNDER_ACTIVATED); + flag_off (FLAG_IS_CAPSIM_CENTERRAMP_ACTIVATED); + flag_off (FLAG_IS_CAPSIM_LEFTORB_ACTIVATED); + flag_on (FLAG_IS_CAPSIM_RIGHTORB_ACTIVATED); + break; + case 4: + flag_on (FLAG_IS_CAPSIM_SIDERAMP_ACTIVATED); + flag_off (FLAG_IS_CAPSIM_LEFTRAMP_ACTIVATED); + flag_off (FLAG_IS_CAPSIM_RIGHTRAMP_ACTIVATED); + flag_off (FLAG_IS_CAPSIM_UNDER_ACTIVATED); + flag_on (FLAG_IS_CAPSIM_CENTERRAMP_ACTIVATED); + flag_on (FLAG_IS_CAPSIM_LEFTORB_ACTIVATED); + flag_off (FLAG_IS_CAPSIM_RIGHTORB_ACTIVATED); + break; + }//end of switch +}//end of function + diff --git a/machine/dm/capture_simon.h b/machine/dm/capture_simon.h new file mode 100644 index 000000000..da49d1028 --- /dev/null +++ b/machine/dm/capture_simon.h @@ -0,0 +1,122 @@ + +/**************************************************************************** + * cuffs + ****************************************************************************/ + +#define cuffs_1_width 48 +#define cuffs_1_height 29 +static U8 cuffs_1_bits[] = { cuffs_1_width , cuffs_1_height, + 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, // # # # + 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, // ###### + 0x00, 0x00, 0x80, 0x3F, 0x00, 0x00, // ####### + 0xF0, 0x1F, 0xC0, 0x17, 0x00, 0x00, // ######### ##### # + 0xF8, 0x3F, 0xC0, 0x00, 0x00, 0x00, // ########### ## + 0xFC, 0x7F, 0xE0, 0x01, 0x00, 0x00, // ############# #### + 0x3E, 0xE0, 0xE0, 0x00, 0x00, 0x00, // ##### ### ### + 0x1F, 0xF0, 0xF1, 0x01, 0x00, 0x00, // ##### ##### ##### + 0x0E, 0xE0, 0xE0, 0x00, 0x00, 0x00, // ### ### ### + 0x07, 0xC0, 0x71, 0x00, 0xC0, 0x01, // ### ### ### ### + 0x0F, 0x80, 0xF3, 0x00, 0x80, 0x01, // #### ### #### ## + 0x07, 0x80, 0xF1, 0x00, 0xC0, 0x01, // ### ## #### ### + 0x07, 0x80, 0xE3, 0x00, 0x80, 0x01, // ### ### ### ## + 0x07, 0x80, 0xE1, 0x01, 0xC0, 0x01, // ### ## #### ### + 0x03, 0x80, 0xE3, 0x00, 0x80, 0x03, // ## ### ### ### + 0x07, 0xC0, 0xC1, 0x17, 0xC0, 0x01, // ### ### ##### # ### + 0x0F, 0xC0, 0xC3, 0x2F, 0xE0, 0x01, // #### #### ###### # #### + 0x07, 0xF0, 0x81, 0xFF, 0xFF, 0x01, // ### ##### ################## + 0x0E, 0xF0, 0x03, 0xFF, 0xFF, 0x00, // ### ###### ################ + 0x1F, 0xFC, 0x07, 0xFF, 0x7F, 0x00, // ##### ######### ############### + 0xFC, 0xFE, 0x83, 0xFF, 0x0F, 0x00, // ###### ######### ############# + 0xFC, 0xFF, 0x81, 0xFF, 0x05, 0x00, // ############### ########## # + 0xF8, 0xFF, 0x00, 0xFE, 0x01, 0x00, // ############# ######## + 0xF0, 0x7F, 0x01, 0xF4, 0x01, 0x00, // ########### # # ##### + 0x80, 0x3E, 0x02, 0x88, 0x00, 0x00, // # ##### # # # + 0x00, 0x7C, 0x45, 0x04, 0x00, 0x00, // ##### # # # # + 0x00, 0x98, 0x20, 0x08, 0x00, 0x00, // ## # # # + 0x00, 0x10, 0x55, 0x05, 0x00, 0x00, // # # # # # # # + 0x00, 0x00, 0x0A, 0x02, 0x00, 0x00, // # # # +}; + + +#define cuffs_3_width 48 +#define cuffs_3_height 17 +static U8 cuffs_3_bits[] = { cuffs_3_width , cuffs_3_height, + 0xC0, 0x03, 0x00, 0x00, 0xFF, 0x00, // #### ######## + 0xE0, 0x0F, 0x00, 0x80, 0xE3, 0x01, // ####### ### #### + 0x70, 0x3C, 0x00, 0xC0, 0xC1, 0x01, // ### #### ### ### + 0x18, 0x38, 0x00, 0xE0, 0x80, 0x01, // ## ### ### ## + 0x18, 0x70, 0x00, 0x74, 0x80, 0x01, // ## ### # ### ## + 0x08, 0xE0, 0x07, 0x7E, 0x80, 0x00, // # ###### ###### # + 0x0C, 0xF0, 0x07, 0x7F, 0x80, 0x01, // ## ####### ####### ## + 0x06, 0xF0, 0xBB, 0x7F, 0x80, 0x01, // ## ###### ### ######## ## + 0x07, 0xF0, 0x57, 0xFF, 0xC1, 0x01, // ### ####### # # ######### ### + 0x03, 0xF8, 0x6B, 0xFA, 0xE1, 0x00, // ## ####### # ## # ###### ### + 0x01, 0xC0, 0x7C, 0x80, 0x7F, 0x00, // # ## ##### ######## + 0x03, 0x00, 0x00, 0x00, 0x3C, 0x00, // ## #### + 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, // ## + 0x07, 0x02, 0x00, 0x00, 0x00, 0x00, // ### # + 0x0E, 0x03, 0x00, 0x00, 0x00, 0x00, // ### ## + 0xFC, 0x01, 0x00, 0x00, 0x00, 0x00, // ####### + 0xFC, 0x01, 0x00, 0x00, 0x00, 0x00, // ####### + +}; + + +/**************************************************************************** + * footsteps + ****************************************************************************/ + +#define footstep_left_1_width 24 +#define footstep_left_1_height 8 +static U8 footstep_left_1_bits[] = { footstep_left_1_width , footstep_left_1_height, + 0xFC, 0x03, 0x00, // ######## + 0xFF, 0x07, 0x00, // ########### + 0xFF, 0x8F, 0x07, // ############ #### + 0xFF, 0xCF, 0x0F, // ############ ###### + 0xFF, 0xDF, 0x0F, // ############# ###### + 0xFF, 0xDF, 0x0F, // ############# ###### + 0xFF, 0x87, 0x07, // ########### #### + 0x3E, 0x00, 0x00, // ##### +}; + + +#define footstep_left_2_width 24 +#define footstep_left_2_height 8 +static U8 footstep_left_2_bits[] = { footstep_left_2_width , footstep_left_2_height, + 0x3E, 0x00, 0x00, // ##### + 0xFF, 0x87, 0x07, // ########### #### + 0xFF, 0xCF, 0x0F, // ############ ###### + 0xFF, 0xDF, 0x0F, // ############# ###### + 0xFF, 0x8F, 0x0F, // ############ ##### + 0xFF, 0x8F, 0x07, // ############ #### + 0xFF, 0x07, 0x00, // ########### + 0xFC, 0x03, 0x00, // ######## +}; + + +#define footstep_right_1_width 24 +#define footstep_right_1_height 8 +static U8 footstep_right_1_bits[] = { footstep_right_1_width , footstep_right_1_height, + 0x00, 0xFC, 0x03, // ######## + 0x00, 0xFE, 0x0F, // ########### + 0x1E, 0xFF, 0x0F, // #### ############ + 0x3F, 0xFF, 0x0F, // ###### ############ + 0xBF, 0xFF, 0x0F, // ###### ############# + 0xBF, 0xFF, 0x0F, // ###### ############# + 0x1E, 0xFE, 0x0F, // #### ########### + 0x00, 0xC0, 0x07, // ##### +}; + + +#define footstep_right_2_width 24 +#define footstep_right_2_height 8 +static U8 footstep_right_2_bits[] = { footstep_right_2_width , footstep_right_2_height, + 0x00, 0xC0, 0x07, // ##### + 0x1E, 0xFE, 0x0F, // #### ########### + 0x3F, 0xFF, 0x0F, // ###### ############ + 0xBF, 0xFF, 0x0F, // ###### ############# + 0x1F, 0xFF, 0x0F, // ##### ############ + 0x1E, 0xFF, 0x0F, // #### ############ + 0x00, 0xFE, 0x0F, // ########### + 0x00, 0xFC, 0x03, // ######## +}; diff --git a/machine/dm/car_chase_mode.c b/machine/dm/car_chase_mode.c new file mode 100644 index 000000000..7e6279000 --- /dev/null +++ b/machine/dm/car_chase_mode.c @@ -0,0 +1,377 @@ +/* + * demolition man + * car_chase_mode.c + * + * written by James Cardona + * + * Location Description: + * Located to the left and above the retina scan is the Car Crash target. + * the Car Crash contains two captive cars (yes, that's right ... captive cars) behind the impact target. + * Triggering the switch causes two miniature cars to crash. + * The ball will rocket off this target, but there's a ballsaver if it goes STDM. + * + * Scoring Description: (original game) + * Hitting the target with three lights lit award the Car Crash. + * Car Crash lights Car Chase on the left/right lamps. + * + * Scoring Description: (my rules) + * same as above except: + * car chase is not a single lit ramp after a car crash hit but an entire mode + * The car chase mode is lit after a predefined number of car crashes where the second car makes the switch. Then + * the mode starts and lights both ramps for car chases. The car chase stays lit until ball drain + * or until car crash is hit. Car chase ramps score 15 million per shot. + * + * estimate of average carcrash mode score: 45 million to 90 million + * + */ +/* CALLSET_SECTION (car_chase_mode, __machine2__) */ + + +#include +#include "dm/global_constants.h" +#include //autogenerated by divhold.ct + +//constants +const U8 car_chase_TotalNumOfSounds = 11; //num between 0 and N-1 == N total +const sound_code_t car_chase_SoundsArray[] = { SPCH_STOP_THIS, SPCH_OHH_YEAH3, SPCH_LETS_GO1, + SPCH_YEEAHHAA, SPCH_WOOH, SPCH_WOW, + SPCH_PUNCH_IT, SPCH_PUSH_PEDAL_HARD, SPCH_GO_LEFT, + SPCH_CATCH_UP, SPCH_STEP_ON_IT}; + + +//local variables +__local__ U8 car_chase_modes_achieved; +U8 car_chase_mode_shots_made; +U8 car_chase_mode_timer; +U8 carchase_MessageCounter; +score_t car_chase_mode_score; +score_t car_chase_mode_temp_score; +score_t car_chase_mode_score_total_score; + + +//external variables + +//internally called function prototypes --external found at protos.h +void car_chase_reset (void); +void car_chase_player_reset (void); +void car_chase_mode_init (void); +void car_chase_mode_expire (void); +void car_chase_mode_exit (void); + + +/**************************************************************************** + * mode definition structure + ***************************************************************************/ +struct timed_mode_ops car_chase_mode = { + DEFAULT_MODE, + .init = car_chase_mode_init, + .exit = car_chase_mode_expire, + .gid = GID_CAR_CHASE_MODE_RUNNING, + .music = MUS_MD_CAR_CRASH, + .deff_starting = DEFF_CAR_CHASE_START_EFFECT, + .deff_running = DEFF_CAR_CHASE_EFFECT, +// .deff_ending = DEFF_CAR_CHASE_END_EFFECT, + .prio = PRI_GAME_MODE1, + .init_timer = 33, + .timer = &car_chase_mode_timer, + .grace_timer = 2, +// .pause = system_timer_pause, +}; + + + +/**************************************************************************** + * initialize and exit + ***************************************************************************/ +void car_chase_reset (void) { + flag_off (FLAG_IS_CARCHASE_MODE_RUNNING); +}//end of function + + + +void car_chase_player_reset (void) { + car_chase_reset(); + car_chase_modes_achieved = 0; + car_chase_mode_shots_made = 0; + score_zero(car_chase_mode_score_total_score); + carchase_MessageCounter = 0; +}//end of function + + + +void car_chase_mode_init (void) { + car_chase_mode_shots_made = 0; + flag_on (FLAG_IS_CARCHASE_MODE_RUNNING); + ballsave_add_time (10); + ++car_chase_modes_achieved; + diverter_stop();//defined in divhold2.ct + task_kill_gid (GID_CR_LIGHTS); + carchase_mode_on(); //at ramps.c + serve_ball_auto(); //add one ball to the playfield - NOT a multiball since doesn't change global ball count + sound_start (ST_SPEECH, SPCH_WUSS_SPARTAN, SL_4S, PRI_GAME_QUICK5); + task_sleep_sec (2); + sound_start (ST_SPEECH, SPCH_EXCUSE_ME, SL_4S, PRI_GAME_QUICK5); + task_sleep_sec (1); + sound_start (ST_SPEECH, SPCH_BETWEEN_YOU_N_ME, SL_4S, PRI_GAME_QUICK5); + //flash lamp for a time + score_zero(car_chase_mode_score); + + lamp_tristate_off (LM_CLAW_READY); +}//end of function + + + +//this is an exit on timeout, ball still in play +void car_chase_mode_expire (void) { + carchase_mode_off(); //at ramps.c + flag_off (FLAG_IS_CARCHASE_MODE_RUNNING); + diverter_check(); +}//end of function + + + + + +//this is an exit on end of ball +//must do this differently to prevent excessive cycling of diverter which +//tends to blow fuses +void car_chase_mode_exit (void) { + carchase_mode_off(); //at ramps.c + flag_off (FLAG_IS_CARCHASE_MODE_RUNNING); + + timed_mode_end2(&car_chase_mode); +}//end of function + + + + +/**************************************************************************** + * external event listeners + ****************************************************************************/ +CALLSET_ENTRY (car_chase, music_refresh) { timed_mode_music_refresh (&car_chase_mode); } +CALLSET_ENTRY (car_chase, end_ball) { if (timed_mode_running_p(&car_chase_mode) ) car_chase_mode_exit(); } +CALLSET_ENTRY (car_chase, display_update) { timed_mode_display_update (&car_chase_mode); } + +CALLSET_ENTRY (car_chase, start_player) { car_chase_player_reset(); } +CALLSET_ENTRY (car_chase, start_ball) { car_chase_reset(); } + + + + +/**************************************************************************** + * + * body + * + ***************************************************************************/ +//this is called from car_crash.c +void start_car_chase(void) { + timed_mode_begin (&car_chase_mode);//start mode +}//end of function + + +void car_chase_ramp_made(void) { + ++car_chase_mode_shots_made; + + deff_start (DEFF_CAR_CHASE_HIT_EFFECT); + + score_zero(car_chase_mode_temp_score); + switch (car_chase_modes_achieved ){ + case 1: + score (CARCHASE_HIT_SCORE_1); + score_add(car_chase_mode_temp_score, score_table[CARCHASE_HIT_SCORE_1]); + break; + case 2: //2nd time we are in car_chase - score differently + score (CARCHASE_HIT_SCORE_2); + score_add(car_chase_mode_temp_score, score_table[CARCHASE_HIT_SCORE_2]); + break; + default: //all cases past 3rd time we are in car_chase + case 3: //3rd time we are in car_chase - score differently + score (CARCHASE_HIT_SCORE_3); + score_add(car_chase_mode_temp_score, score_table[CARCHASE_HIT_SCORE_3]); + break; + }//end of switch + score_add (car_chase_mode_score, car_chase_mode_temp_score); + score_add (car_chase_mode_score_total_score, car_chase_mode_temp_score); +}//end of function + + + + +/**************************************************************************** + * + * DMD display and sound effects + * + ****************************************************************************/ +void car_chase_animation_display_effect (U16 start_frame, U16 end_frame){ + U16 fno; + dmd_alloc_pair_clean ();// Clean both pages + for (fno = start_frame; fno <= end_frame; fno += 2) { + dmd_alloc_pair (); + frame_draw(fno); + dmd_show2 (); + task_sleep (TIME_100MS); + }//end of inner loop +} + + + +void car_chase_animation_display_effect_w_words (U16 start_frame, U16 end_frame){ + U16 fno; + dmd_alloc_pair_clean ();// Clean both pages + for (fno = start_frame; fno <= end_frame; fno += 2) { + dmd_map_overlay (); + dmd_clean_page_low (); + font_render_string_center (&font_fipps, DMD_MIDDLE_X - 20, DMD_BIG_CY_Top, "CAR_CHASE"); + dmd_text_outline (); + dmd_alloc_pair (); + frame_draw(fno); + dmd_overlay_outline (); + dmd_show2 (); + task_sleep (TIME_100MS); + }//end of inner loop +}//end of mode_effect_deff + + + + +void car_chase_frame_bitfade_fast (U16 frame){ + dmd_sched_transition (&trans_bitfade_fast); + dmd_alloc_pair (); + frame_draw(frame); + dmd_show2 (); + task_sleep (TIME_100MS); +}//end of mode_effect_deff + + + + +void car_frame_with_words_display_fipps_effect (U16 frame, U8 x, U8 y, char *words){ + dmd_alloc_pair_clean ();// Clean both pages + dmd_map_overlay (); + dmd_clean_page_low (); + font_render_string_center (&font_fipps, x, y, words); + dmd_text_outline (); + dmd_alloc_pair (); + frame_draw(frame); + dmd_overlay_outline (); + dmd_show2 (); + task_sleep (TIME_100MS); +}//end of mode_effect_deff + + + + +void car_chase_start_effect_deff(void) { + sound_start (ST_SAMPLE, CAR_SKID, SL_2S, PRI_GAME_QUICK5); + + car_chase_animation_display_effect (IMG_CARCHASE_A_START, IMG_CARCHASE_A_END); + car_chase_animation_display_effect (IMG_CARCHASE_B_START, IMG_CARCHASE_B_END); + car_chase_animation_display_effect (IMG_CARCHASE_C_START, IMG_CARCHASE_C_END); + car_chase_animation_display_effect (IMG_CARCHASE_D_START, IMG_CARCHASE_D_END); + + dmd_sched_transition (&trans_scroll_left_fast); + dmd_alloc_low_clean (); + + sound_start (ST_SAMPLE, CAR_SKID, SL_2S, PRI_GAME_QUICK5); + + font_render_string_center (&font_fipps, DMD_MIDDLE_X, DMD_BIG_CY_Cent, "SHOOT RAMPS"); + dmd_show_low (); + task_sleep_sec (1); + deff_exit (); +}//end of mode_effect_deff + + + + +void car_chase_hit_effect_deff(void) { + U8 car_chase_SoundCounter; + car_chase_SoundCounter = random_scaled(car_chase_TotalNumOfSounds);//from kernal/random.c + dmd_clean_page_high ();// + dmd_clean_page_low ();// + + //NOTE: skid sound is played on ramp enter at ramps.c + //these sounds are on ramp exit + sound_start (ST_SPEECH, car_chase_SoundsArray[car_chase_SoundCounter], SL_4S, PRI_GAME_QUICK2); + sound_start (ST_EFFECT, CAR_GEAR_CHANGE, SL_2S, PRI_GAME_QUICK2); + + if (IN_TEST) { if (++carchase_MessageCounter > 8) carchase_MessageCounter = 0; } + else carchase_MessageCounter = random_scaled(9); + + + switch (carchase_MessageCounter) { + default: + case 0: + car_chase_animation_display_effect (IMG_CARCHASE_B_START, IMG_CARCHASE_B_END); + car_chase_animation_display_effect (IMG_CARCHASE_A_START, IMG_CARCHASE_A_END); + break; + case 1: + car_chase_animation_display_effect (IMG_CARCHASE_C_START, IMG_CARCHASE_C_END); + car_chase_animation_display_effect (IMG_CARCHASE_B_START, IMG_CARCHASE_B_END); + break; + case 2: + car_chase_animation_display_effect (IMG_CARCHASE_D_START, IMG_CARCHASE_D_END); + car_chase_animation_display_effect (IMG_CARCHASE_C_START, IMG_CARCHASE_C_END); + break; + case 3: + car_chase_animation_display_effect (IMG_CARCHASE_H_START, IMG_CARCHASE_H_END); + car_chase_animation_display_effect (IMG_CARCHASE_D_START, IMG_CARCHASE_D_END); + break; + case 4: + car_chase_animation_display_effect (IMG_CARCHASE_F1_START, IMG_CARCHASE_F1_END); + car_chase_animation_display_effect (IMG_CARCHASE_E_START, IMG_CARCHASE_E_END); + break; + case 5: + car_chase_animation_display_effect (IMG_CARCHASE_F2_START, IMG_CARCHASE_F2_END); + car_chase_animation_display_effect (IMG_CARCHASE_H_START, IMG_CARCHASE_H_END); + break; + case 6: + car_chase_animation_display_effect (IMG_CARCHASE_F2_START, IMG_CARCHASE_F2_END); + car_chase_animation_display_effect (IMG_CARCHASE_F1_START, IMG_CARCHASE_F1_END); + break; + case 7: + car_chase_animation_display_effect (IMG_CARCHASE_A_START, IMG_CARCHASE_A_END); + car_chase_animation_display_effect (IMG_CARCHASE_J_START, IMG_CARCHASE_J_END); + break; + case 8: + car_chase_animation_display_effect (IMG_CARCHASE_J_START, IMG_CARCHASE_J_END); + car_chase_animation_display_effect (IMG_CARCHASE_E_START, IMG_CARCHASE_E_END); + break; + }//end of switch + task_sleep (TIME_100MS); + deff_exit (); +}//end of function + + + +void car_chase_effect_deff(void) { + U8 i = 0; + for (;;) { + if (++i % 5 == 0) { + sound_start (ST_SAMPLE, CAR_SKID, SL_2S, PRI_GAME_QUICK5); + dmd_sched_transition (&trans_scroll_left_fast); + } + dmd_alloc_low_clean (); + font_render_string_center (&font_fipps, DMD_MIDDLE_X, DMD_BIG_CY_Top, "CAR_CHASE"); + sprintf ("%d SEC LEFT, %d HIT", car_chase_mode_timer, car_chase_mode_shots_made); + font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_SMALL_CY_3, sprintf_buffer); + sprintf_score (car_chase_mode_score); + font_render_string_center (&font_term6, DMD_MIDDLE_X, DMD_MED_CY_3, sprintf_buffer); + dmd_show_low (); + task_sleep (TIME_500MS); + }//END OF ENDLESS LOOP +}//end of mode_effect_deff + + + + + +void car_chase_end_effect_deff(void) { + dmd_alloc_low_clean (); + font_render_string_center (&font_fipps, DMD_MIDDLE_X, DMD_BIG_CY_Top, "CAR_CHASE"); + sprintf("COMPLETE"); + font_render_string_center (&font_fipps, DMD_MIDDLE_X, DMD_BIG_CY_Bot, sprintf_buffer); + dmd_show_low (); + task_sleep_sec (2); + deff_exit (); + }//end of mode_effect_deff + diff --git a/machine/dm/car_crash.c b/machine/dm/car_crash.c new file mode 100644 index 000000000..cac2815cd --- /dev/null +++ b/machine/dm/car_crash.c @@ -0,0 +1,392 @@ +/* + * demolition man + * car_crash.c + * + * written by James Cardona + * + * Location Description: + * Located to the left and above the retina scan is the Car Crash target. + * the Car Crash contains two captive cars (yes, that's right ... captive cars) behind the impact target. + * Triggering the switch causes two miniature cars to crash. + * The ball will rocket off this target, but there's a ballsaver if it goes STDM. + * + * Scoring Description: (original game) + * Hitting the target adds to the Car Crash value and lights an additional Car Crash light. + * Hitting the target with three lights lit award the Car Crash value. + * Car Crash is worth three, then six, then ten million (for 1/2/3 hits) and is doubled + * if the top car hits the target at the end of the captive lane. + * Car Crash lights Car Chase on the left/right lamps. + * once 10 million shot is lit, it stays lit + * + * Scoring Description: (my rules) + * same as above except: + * first switch hit is 250K, first car (2nd switch) is three, then six, then ten million. + * Second car (Third switch) still doubles + * + * Also, car chase is not a single lit ramp after a car crash hit but an entire mode + * The car chase mode is lit after a predefined number of car crashes where the second car makes the switch. Then + * the mode starts and lights both ramps for car chases. The car chase stays lit until ball drain + * or until car crash is hit. Car chase ramps score 15 million per shot. + * + * once 10 million shot is lit, it starts mode and car crash lights reset to lowest value + * + * estimate of average carcrash mode score: 45 million to 90 million + * estimate of average car score: 9 million to 21 million + * + */ +/* CALLSET_SECTION (car_crash, __machine5__) */ + +#include +#include "dm/global_constants.h" + + + +//constants +const U8 CAR_CRASH_EASY_GOAL = 1; +const U8 CAR_CRASH_HARD_GOAL = 5; +const U8 CAR_CRASH_GOAL_STEP = 4; //increment for later goals +const U8 CAR_CRASH_GOAL_MAX = 50; + +//local variables +U8 carCrashFirstSwitchDebouncer; +U8 carCrashSecondSwitchDebouncer; +U8 carCrashThirdSwitchDebouncer; +U8 car_crash_multiplier; +__local__ U8 car_crash_shots_made; //non-mode shots made counter +__local__ U8 car_crash_goal; //goal to reach mode +__local__ __boolean is_car_crash_six_lit; //tracks which score to be awarded +__local__ __boolean is_car_crash_ten_lit; //tracks which score to be awarded +__local__ __boolean is_car_crash_three_lit; //tracks which score to be awarded +__boolean carcrash_ballsave; + +//external variables + +//internally called function prototypes --external found at protos.h +void car_crash_reset (void); +void player_car_crash_reset (void); +void car_crash_first_switch_task (void); +void car_crash_second_switch_task (void); +void car_crash_third_switch_task (void); +void cc_lights_task (void); + +/**************************************************************************** + * initialize and exit + ***************************************************************************/ +void car_crash_reset (void) { + carCrashFirstSwitchDebouncer = 0; + carCrashSecondSwitchDebouncer = 0; + carCrashThirdSwitchDebouncer = 0; + car_crash_multiplier = 1; + lamp_tristate_off (LM_CAR_CRASH_TOP); + lamp_tristate_off (LM_CAR_CRASH_CENTER); + lamp_tristate_off (LM_CAR_CRASH_BOTTOM); + if (is_car_crash_ten_lit) lamp_tristate_on (LM_CAR_CRASH_TOP); + if (is_car_crash_six_lit) lamp_tristate_on (LM_CAR_CRASH_CENTER); + if (is_car_crash_three_lit) lamp_tristate_on (LM_CAR_CRASH_BOTTOM); + carcrash_ballsave = FALSE; + + task_sleep (TIME_1S); + if (flag_test(FLAG_IS_CARCHASE_MODE_ENABLED) ) leff_start (LEFF_CAR_CRASH_RUNNER); + else leff_stop (LEFF_CAR_CRASH_RUNNER); +}//end of function + + + +void player_car_crash_reset (void) { + car_crash_shots_made = 0; + car_crash_goal = CAR_CRASH_EASY_GOAL; + car_crash_reset(); + flag_on(FLAG_IS_CARCHASE_MODE_ENABLED); +#ifdef CONFIG_DIFFICULTY_LEVEL +if (system_config.difficulty == EASY) { + car_crash_goal = CAR_CRASH_EASY_GOAL; +}//end of if +else { + car_crash_goal = CAR_CRASH_HARD_GOAL; +} //END OF ELSE +#endif +}//end of function + + + +CALLSET_ENTRY (car_crash, start_ball) { car_crash_reset (); } +CALLSET_ENTRY (car_crash, start_player) { player_car_crash_reset (); } + + + +/**************************************************************************** + * playfield lights and flags + ***************************************************************************/ +void carcrash_three_on(void) { + is_car_crash_three_lit = TRUE; + lamp_tristate_flash(LM_CAR_CRASH_BOTTOM); + task_sleep (TIME_1S); + lamp_tristate_on (LM_CAR_CRASH_BOTTOM); +}//end of function + +void carcrash_three_off(void) { + is_car_crash_three_lit = FALSE; + lamp_tristate_off (LM_CAR_CRASH_BOTTOM); +}//end of function + +void carcrash_six_on(void) { + is_car_crash_six_lit = TRUE; + lamp_tristate_flash(LM_CAR_CRASH_CENTER); + task_sleep (TIME_1S); + lamp_tristate_on (LM_CAR_CRASH_CENTER); +}//end of function + +void carcrash_six_off(void) { + is_car_crash_six_lit = FALSE; + lamp_tristate_off (LM_CAR_CRASH_CENTER); +}//end of function + +void carcrash_ten_on(void) { + is_car_crash_ten_lit = TRUE; + lamp_tristate_flash(LM_CAR_CRASH_TOP); + task_sleep (TIME_1S); + lamp_tristate_on (LM_CAR_CRASH_TOP); +}//end of function + +void carcrash_ten_off(void) { + is_car_crash_ten_lit = FALSE; + lamp_tristate_off (LM_CAR_CRASH_TOP); +}//end of function + + +void restore_carcrash_lights_state(void) { + if (is_car_crash_six_lit) lamp_tristate_on (LM_CAR_CRASH_CENTER); + else lamp_tristate_off (LM_CAR_CRASH_CENTER); + + if (is_car_crash_ten_lit) lamp_tristate_on (LM_CAR_CRASH_TOP); + else lamp_tristate_off (LM_CAR_CRASH_TOP); + + if (is_car_crash_three_lit) lamp_tristate_on (LM_CAR_CRASH_BOTTOM); + else lamp_tristate_off (LM_CAR_CRASH_BOTTOM); +}//end of function + +/**************************************************************************** + * + * body + * + ***************************************************************************/ +CALLSET_BOOL_ENTRY (car_crash, ball_drain) { //thrown by device.c + if (carcrash_ballsave) { + serve_ball_auto (); + sound_start (ST_SPEECH, CAR_SKID, SL_2S, PRI_GAME_QUICK5); + return FALSE; //this is not a valid drain, don't count it + } + else return TRUE; //this is a valid drain +}//end of callset + + + +void car_crash_first_switch_task (void) { + task_sleep (TIME_500MS); + carcrash_ballsave = FALSE; + task_sleep_sec(1); + task_sleep (TIME_500MS); + carCrashFirstSwitchDebouncer = 0; + task_exit(); +}//end of function + + + +//first car switch at bottom of car lane +CALLSET_ENTRY (car_crash, sw_chase_car_1) { + if (in_game) { + if (++carCrashFirstSwitchDebouncer == 1) { + carcrash_ballsave = TRUE; + sound_start (ST_SAMPLE, CAR_SKID, SL_2S, PRI_GAME_QUICK5); + score (CARCRASH_SCORE_CAR1); + flasher_pulse (FLASH_CAR_CHASE_LOWER_FLASHER); + }//end of if DEBOUNCER + task_create_gid1 (GID_CAR_CRASH_1, car_crash_first_switch_task); + } +}//end of function + + + +void car_crash_second_switch_task (void) { + task_sleep_sec(4); + carCrashSecondSwitchDebouncer = 0; + task_exit(); +}//end of function + + + +//second car switch at bottom of car lane +CALLSET_ENTRY (car_crash, sw_chase_car_2) { + if (in_game) { + if (++carCrashSecondSwitchDebouncer == 1) { + flasher_pulse (FLASH_CAR_CHASE_CENTER_FLASHER); + //TODO: check for tilt here + U8 i; + for (i = 1; i <= car_crash_multiplier; i++){ + if (is_car_crash_ten_lit) score (SC_10M); + else if (is_car_crash_six_lit) score (SC_6M); + else if (is_car_crash_three_lit) score (SC_3M); + else score (CARCRASH_SCORE_CAR2); + }//end of loop + }//end of if DEBOUNCER + task_create_gid1 (GID_CAR_CRASH_2, car_crash_second_switch_task); + } +}//end of function + + + +void car_crash_third_switch_task (void) { + task_sleep_sec(3); + carCrashThirdSwitchDebouncer = 0; + task_exit(); +}//end of function + + +//second car switch at top of car lane +CALLSET_ENTRY (car_crash, sw_car_chase_standup) { + if (in_game) { + if (++carCrashThirdSwitchDebouncer == 1) { + ++car_crash_shots_made; + sound_start (ST_SAMPLE, CAR_CRASH, SL_2S, PRI_GAME_QUICK5); + flasher_pulse (FLASH_CAR_CHASE_UPPER_FLASHER); + //goal made then start mode + if (!flag_test(FLAG_BACK_IN_THE_FRIDGE_RUNNING) + && car_crash_shots_made >= car_crash_goal) { + flag_off(FLAG_IS_CARCHASE_MODE_ENABLED); + leff_stop ( LEFF_CAR_CRASH_RUNNER); + car_crash_shots_made = 0; + //increment goal for next time + if (car_crash_goal < CAR_CRASH_GOAL_MAX) car_crash_goal += CAR_CRASH_GOAL_STEP; + + huxley_increment(); + //start ramp mode + start_car_chase(); //at car_chase_mode.c + //turn off car crash lights + carcrash_three_off(); + carcrash_six_off(); + carcrash_ten_off(); + }//end of if (car_crash_shots_made == car_crash_goal) + else {//no car chase yet + deff_start (DEFF_CARCRASH_EFFECT); + //set point values and lights for car crash + if (car_crash_shots_made == 1) { + if (!is_car_crash_six_lit) carcrash_three_on(); + } else if (car_crash_shots_made == 2) { + if (!is_car_crash_six_lit) carcrash_six_on(); + if (!is_car_crash_three_lit) carcrash_three_on(); + } else if (car_crash_shots_made >= 3) { + if (!is_car_crash_ten_lit) carcrash_ten_on(); + if (!is_car_crash_six_lit) carcrash_six_on(); + if (!is_car_crash_three_lit) carcrash_three_on(); + //set up flag if one shot away from car chase + if (car_crash_goal - car_crash_shots_made <= 1) { + flag_on(FLAG_IS_CARCHASE_MODE_ENABLED); + leff_start (LEFF_CAR_CRASH_RUNNER); + }//end of if + }//end of else no chase yet + }//end of else not >= goal + //effectively doubles the score + U8 i; + for (i = 1; i <= car_crash_multiplier; i++){ + if (is_car_crash_six_lit) score (SC_6M); + else if (is_car_crash_ten_lit) score (SC_10M); + else if (is_car_crash_three_lit) score (SC_3M); + else score (SC_1M); + }//end of loop + }//end of if (++carCrashThirdSwitchDebouncer == 1) + task_create_gid1 (GID_CAR_CRASH_3, car_crash_third_switch_task); + } +}//end of function + + +//called from comp award at underground.c +void comp_award_trip_car_crash(void) { + car_crash_multiplier = 3; +}//end of function + + + + +/**************************************************************************** + * + * lighting effects + * + ****************************************************************************/ +void car_crash_runner_leff (void) { +for (;;) { + //listed from botton to top + leff_on (LM_CAR_CRASH_BOTTOM); + task_sleep (TIME_200MS); + leff_off (LM_CAR_CRASH_BOTTOM); + leff_on (LM_CAR_CRASH_CENTER); + task_sleep (TIME_200MS); + leff_off (LM_CAR_CRASH_CENTER); + leff_on (LM_CAR_CRASH_TOP); + task_sleep (TIME_200MS); + leff_off (LM_CAR_CRASH_TOP); + task_sleep (TIME_200MS); + + if (is_car_crash_three_lit) leff_on (LM_CAR_CRASH_BOTTOM); + if (is_car_crash_six_lit) leff_on (LM_CAR_CRASH_CENTER); + if (is_car_crash_ten_lit) leff_on (LM_CAR_CRASH_TOP); + task_sleep (TIME_1S); + + leff_off (LM_CAR_CRASH_BOTTOM); + leff_off (LM_CAR_CRASH_CENTER); + leff_off (LM_CAR_CRASH_TOP); + task_sleep (TIME_200MS); + }//END OF LOOP + leff_exit(); +}//end of function + + +/**************************************************************************** + * DMD display and sound effects + ****************************************************************************/ +U8 carcrash_MessageCounter; +void carcrash_effect_deff(void) { + U16 fno; + dmd_alloc_pair_clean (); + + switch (++carcrash_MessageCounter % 5) { + default: + for (fno = IMG_CAR_CRASH_START; fno <= IMG_CAR_CRASH_END; fno += 2) { + dmd_alloc_pair (); + frame_draw(fno); + dmd_show2 (); + task_sleep (TIME_100MS); + }//end of inner loop + + dmd_alloc_pair_clean ();// Clean both pages + dmd_map_overlay (); + dmd_clean_page_low (); + sprintf ("CRASH %d MORE", car_crash_goal - car_crash_shots_made ); + font_render_string_center( &font_fipps, DMD_MIDDLE_X, DMD_BIG_CY_Top, sprintf_buffer); + sprintf ("FOR CHASE"); + font_render_string_center( &font_fipps, DMD_MIDDLE_X, DMD_BIG_CY_Bot, sprintf_buffer); + dmd_text_outline (); + dmd_alloc_pair (); + frame_draw(IMG_CAR_CRASH_END); + dmd_overlay_outline (); + dmd_show2 (); + break; + case 1: + dmd_map_overlay (); + dmd_clean_page_low (); + font_render_string_center (&font_term6, DMD_MIDDLE_X, DMD_MED_CY_1, "EXPLODE AND CHASE"); + font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_MED_CY_2, "LEAD TO"); + font_render_string_center (&font_fipps, DMD_MIDDLE_X, DMD_BIG_CY_Bot, "HUXLEY"); + dmd_text_outline (); + dmd_alloc_pair (); + frame_draw(IMG_HUXLEY_B1_END); + dmd_overlay_outline (); + dmd_show2 (); + break; + }//end of switch + task_sleep_sec (2); + deff_exit (); +}//end of standard_effect_deff + + + + diff --git a/machine/dm/combos.c b/machine/dm/combos.c new file mode 100644 index 000000000..983ceebe2 --- /dev/null +++ b/machine/dm/combos.c @@ -0,0 +1,397 @@ +/* + * demolition man + * combos.c + * + * written by James Cardona + * + * + * Scoring Description: (original game) + * a combo is obviously making more than one shot in a row + * we detect this using a task timer and change the arrows that are lit after + * each shot. if the player makes the next lit arrow then they are + * awarded a combo and so on. if N number of combos are reached then computer award is lit. + * computer award can be gotten at underground shot. + * + */ +/* CALLSET_SECTION (combos, __machine5__) */ + + +#include +#include "dm/global_constants.h" + +//constants +const U8 COMBO_WAIT_TIME = 12; //TOTAL = WAIT + HURRYUP +const U8 COMBO_HURRY_TIME = 5; +const U8 COMBO_EASY_GOAL = 10; +const U8 COMBO_HARD_GOAL = 20; +const U8 COMBO_EASY_GOAL_STEP = 10; +const U8 COMBO_HARD_GOAL_STEP = 20; +const U8 COMBO_VM_EASY_GOAL = 5; +const U8 COMBO_VM_HARD_GOAL = 15; + +//local variables +U8 combo_counter; +__local__ U8 combo_goal; +__local__ U8 combo_vm_goal; + +//external variables + +//internally called function prototypes --external found at protos.h +void combo_reset (void); +void player_combo_reset (void); +void flash_combos(void); +void choose_random_flag_set(void); +void combo_task (void); + +/**************************************************************************** + * initialize and exit + ***************************************************************************/ +//we always start with these 3 lights on because those are the skillshots +void combo_reset (void) { + flag_on (FLAG_IS_COMBO_SIDERAMP_ACTIVATED); + flag_on (FLAG_IS_COMBO_LEFTRAMP_ACTIVATED); + flag_off (FLAG_IS_COMBO_RIGHTRAMP_ACTIVATED); + flag_on (FLAG_IS_COMBO_UNDER_ACTIVATED); + flag_off (FLAG_IS_COMBO_CENTERRAMP_ACTIVATED); + flag_off (FLAG_IS_COMBO_LEFTORB_ACTIVATED); + flag_off (FLAG_IS_COMBO_RIGHTORB_ACTIVATED); + flag_on (FLAG_IS_COMBOS_RESTARTABLE); + if (flag_test (FLAG_IS_COMPUTER_ACTIVATED) ) computer_light_on(); + all_arrow_update(); // at arrow_handler.c +}//end of function + + + +void player_combo_reset (void) { + if (IN_TEST) { combo_goal = 10; combo_vm_goal = 2; } + else { combo_goal = COMBO_EASY_GOAL; combo_vm_goal = COMBO_VM_EASY_GOAL; } + + combo_counter = 0; + flag_off (FLAG_IS_COMPUTER_ACTIVATED); + + #ifdef CONFIG_DIFFICULTY_LEVEL +if (system_config.difficulty == EASY) { + combo_goal = COMBO_EASY_GOAL; + combo_vm_goal = COMBO_VM_EASY_GOAL; +}//end of if +else { + combo_goal = COMBO_HARD_GOAL; + combo_vm_goal = COMBO_VM_HARD_GOAL; +} //END OF ELSE +#endif +}//end of function + +CALLSET_ENTRY (combo, start_player) { player_combo_reset(); } +CALLSET_ENTRY (combo, start_ball) { combo_reset(); } +CALLSET_ENTRY (combo, valid_playfield) { combo_init(); } + +/**************************************************************************** + * + * body + * + ****************************************************************************/ +void combo_init(void) { + flag_off (FLAG_IS_COMBOS_KILLED); + flag_on (FLAG_IS_COMBOS_RESTARTABLE); + choose_random_flag_set(); + all_arrow_update(); // at arrow_handler.c + task_create_gid1 (GID_COMBO, combo_task); +}//end of function + + + +//this is a hard kill that prevents combos from restarting +//we only use this during certain modes +void kill_combos(void) { + flag_off (FLAG_IS_COMBO_SIDERAMP_ACTIVATED); + flag_off (FLAG_IS_COMBO_LEFTRAMP_ACTIVATED); + flag_off (FLAG_IS_COMBO_RIGHTRAMP_ACTIVATED); + flag_off (FLAG_IS_COMBO_UNDER_ACTIVATED); + flag_off (FLAG_IS_COMBO_CENTERRAMP_ACTIVATED); + flag_off (FLAG_IS_COMBO_LEFTORB_ACTIVATED); + flag_off (FLAG_IS_COMBO_RIGHTORB_ACTIVATED); + + flag_on (FLAG_IS_COMBOS_KILLED); + flag_off (FLAG_IS_COMBOS_RESTARTABLE); + all_arrow_update(); +}//end of function + + + +void combo_task (void) { + task_sleep_sec(COMBO_WAIT_TIME); + //no combo made yet so flash active lamps + flash_combos(); + task_sleep_sec(COMBO_HURRY_TIME); + //still no hits so turn off flags and lamps until something is hit + flag_off (FLAG_IS_COMBO_SIDERAMP_ACTIVATED); + flag_off (FLAG_IS_COMBO_LEFTRAMP_ACTIVATED); + flag_off (FLAG_IS_COMBO_RIGHTRAMP_ACTIVATED); + flag_off (FLAG_IS_COMBO_UNDER_ACTIVATED); + flag_off (FLAG_IS_COMBO_CENTERRAMP_ACTIVATED); + flag_off (FLAG_IS_COMBO_LEFTORB_ACTIVATED); + flag_off (FLAG_IS_COMBO_RIGHTORB_ACTIVATED); + flag_on (FLAG_IS_COMBOS_KILLED); + flag_on (FLAG_IS_COMBOS_RESTARTABLE); + all_arrow_update(); + task_exit(); +}//end of function + + + +//flashing overides being on solid, so if multiple modes +//are running, lamp will flash, but when timer ends, will go back to solid +void flash_combos(void){ + if (flag_test (FLAG_IS_COMBO_SIDERAMP_ACTIVATED) ) lamp_tristate_flash (LM_SIDE_RAMP_ARROW); + if (flag_test (FLAG_IS_COMBO_LEFTRAMP_ACTIVATED) ) lamp_tristate_flash (LM_LEFT_RAMP_ARROW); + if (flag_test (FLAG_IS_COMBO_RIGHTRAMP_ACTIVATED) ) lamp_tristate_flash (LM_RIGHT_RAMP_ARROW); + if (flag_test (FLAG_IS_COMBO_UNDER_ACTIVATED) ) lamp_tristate_flash (LM_UNDERGROUND_ARROW); + if (flag_test (FLAG_IS_COMBO_CENTERRAMP_ACTIVATED) ) lamp_tristate_flash (LM_CENTER_RAMP_ARROW); + if (flag_test (FLAG_IS_COMBO_LEFTORB_ACTIVATED) ) lamp_tristate_flash (LM_LEFT_LOOP_ARROW); + if (flag_test (FLAG_IS_COMBO_RIGHTORB_ACTIVATED) ) lamp_tristate_flash (LM_RIGHT_LOOP_ARROW); +}//end of function + + + +void combo_hit(void ) { + //video mode + if (++combo_counter >= combo_vm_goal && !flag_test (FLAG_VIDEO_MODE_ENABLED) ) { + if (IN_TEST) combo_vm_goal += 2; + else { + #ifdef CONFIG_DIFFICULTY_LEVEL + if (system_config.difficulty == EASY) combo_vm_goal += COMBO_EASY_GOAL_STEP; + else combo_vm_goal += COMBO_HARD_GOAL_STEP; + #elif + combo_vm_goal += COMBO_EASY_GOAL_STEP; + #endif + }//end of else + + flag_on (FLAG_VIDEO_MODE_ENABLED); + deff_start (DEFF_VM_EFFECT); + } + //computer award + else if (combo_counter >= combo_goal && !flag_test (FLAG_IS_COMPUTER_ACTIVATED) ) { + if (IN_TEST) combo_goal += 2; + else { + #ifdef CONFIG_DIFFICULTY_LEVEL + if (system_config.difficulty == EASY) combo_goal += COMBO_EASY_GOAL_STEP; + else combo_goal += COMBO_HARD_GOAL_STEP; + #elif + combo_goal += COMBO_EASY_GOAL_STEP; + #endif + }//end of else + + computer_light_on(); //at underground.c + deff_start (DEFF_COMBO_EFFECT); + } + //not at a goal yet + else deff_start (DEFF_COMBO_EFFECT); + // reset the task timer + choose_random_flag_set(); + all_arrow_update(); + task_recreate_gid (GID_COMBO, combo_task); +}//end of function + + +//this is for stacking +void combo_rehit_check(void ) { + //video mode + if (combo_counter >= combo_vm_goal && !flag_test (FLAG_VIDEO_MODE_ENABLED) ) { + combo_vm_goal += COMBO_EASY_GOAL_STEP; + flag_on (FLAG_VIDEO_MODE_ENABLED); + } + //computer award + else if (combo_counter >= combo_goal && !flag_test (FLAG_IS_COMPUTER_ACTIVATED) ) { + combo_goal += COMBO_EASY_GOAL_STEP; + computer_light_on(); //at underground.c + } +}//end of function + + + + +//called from computer award in underground.c +void comp_award_light_arrows(void) { + flag_off (FLAG_IS_COMBOS_KILLED); + flag_on (FLAG_IS_COMBO_SIDERAMP_ACTIVATED); + flag_on (FLAG_IS_COMBO_LEFTRAMP_ACTIVATED); + flag_on (FLAG_IS_COMBO_RIGHTRAMP_ACTIVATED); + flag_on (FLAG_IS_COMBO_UNDER_ACTIVATED); + flag_on (FLAG_IS_COMBO_CENTERRAMP_ACTIVATED); + flag_on (FLAG_IS_COMBO_LEFTORB_ACTIVATED); + flag_on (FLAG_IS_COMBO_RIGHTORB_ACTIVATED); + all_arrow_update(); + task_recreate_gid (GID_COMBO, combo_task); +}//end of function + + + + + +/**************************************************************************** + * + * randomize flag chosen + * + * we are using a very stupid and in-elegant + * way of randomness - basically, we have a number + * of predefined sets of flags and we randomly + * pick one of those sets + ****************************************************************************/ +void choose_random_flag_set(void) { + U8 random_chooser; + random_chooser = random_scaled(5); + switch (random_chooser) { + case 0: + flag_on (FLAG_IS_COMBO_SIDERAMP_ACTIVATED); + flag_on (FLAG_IS_COMBO_LEFTRAMP_ACTIVATED); + flag_off (FLAG_IS_COMBO_RIGHTRAMP_ACTIVATED); + flag_off (FLAG_IS_COMBO_UNDER_ACTIVATED); + flag_on (FLAG_IS_COMBO_CENTERRAMP_ACTIVATED); + flag_off (FLAG_IS_COMBO_LEFTORB_ACTIVATED); + flag_on (FLAG_IS_COMBO_RIGHTORB_ACTIVATED); + break; + case 1: + flag_on (FLAG_IS_COMBO_SIDERAMP_ACTIVATED); + flag_on (FLAG_IS_COMBO_LEFTRAMP_ACTIVATED); + flag_off (FLAG_IS_COMBO_RIGHTRAMP_ACTIVATED); + flag_off (FLAG_IS_COMBO_UNDER_ACTIVATED); + flag_off (FLAG_IS_COMBO_CENTERRAMP_ACTIVATED); + flag_on (FLAG_IS_COMBO_LEFTORB_ACTIVATED); + flag_off (FLAG_IS_COMBO_RIGHTORB_ACTIVATED); + break; + case 2: + flag_off (FLAG_IS_COMBO_SIDERAMP_ACTIVATED); + flag_off (FLAG_IS_COMBO_LEFTRAMP_ACTIVATED); + flag_on (FLAG_IS_COMBO_RIGHTRAMP_ACTIVATED); + flag_on (FLAG_IS_COMBO_UNDER_ACTIVATED); + flag_on (FLAG_IS_COMBO_CENTERRAMP_ACTIVATED); + flag_off (FLAG_IS_COMBO_LEFTORB_ACTIVATED); + flag_on (FLAG_IS_COMBO_RIGHTORB_ACTIVATED); + break; + case 3: + flag_off (FLAG_IS_COMBO_SIDERAMP_ACTIVATED); + flag_off (FLAG_IS_COMBO_LEFTRAMP_ACTIVATED); + flag_on (FLAG_IS_COMBO_RIGHTRAMP_ACTIVATED); + flag_on (FLAG_IS_COMBO_UNDER_ACTIVATED); + flag_off (FLAG_IS_COMBO_CENTERRAMP_ACTIVATED); + flag_on (FLAG_IS_COMBO_LEFTORB_ACTIVATED); + flag_off (FLAG_IS_COMBO_RIGHTORB_ACTIVATED); + break; + case 4: + flag_on (FLAG_IS_COMBO_SIDERAMP_ACTIVATED); + flag_off (FLAG_IS_COMBO_LEFTRAMP_ACTIVATED); + flag_on (FLAG_IS_COMBO_RIGHTRAMP_ACTIVATED); + flag_off (FLAG_IS_COMBO_UNDER_ACTIVATED); + flag_off (FLAG_IS_COMBO_CENTERRAMP_ACTIVATED); + flag_off (FLAG_IS_COMBO_LEFTORB_ACTIVATED); + flag_on (FLAG_IS_COMBO_RIGHTORB_ACTIVATED); + break; + }//end of switch + //if 1 or less shot away from computer award then do not light underground shot + if ( flag_test(FLAG_IS_COMBO_UNDER_ACTIVATED) + && (flag_test(FLAG_IS_COMPUTER_ACTIVATED) + || combo_goal == combo_counter + 1) ) flag_off (FLAG_IS_COMBO_UNDER_ACTIVATED); +}//end of function + + +/**************************************************************************** + * + * display effects + * + ****************************************************************************/ +void combo_effect_deff(void) { + U16 fno; + if (IN_TEST) combo_counter++; + + sound_start (ST_EFFECT, SUBWAY2, SL_2S, SP_NORMAL); + if (combo_counter % 2 == 0) { + for (fno = IMG_COMBO1_START; fno <= IMG_COMBO1_END; fno += 2) { + dmd_alloc_pair (); + frame_draw(fno); + dmd_show2 (); + task_sleep (TIME_100MS); + }//end of for loop + sound_start (ST_EFFECT, SUBWAY2, SL_2S, SP_NORMAL); + + dmd_map_overlay (); + dmd_clean_page_low (); + if (flag_test (FLAG_IS_COMPUTER_ACTIVATED) ) sprintf ("COMPUTER READY"); + else sprintf ("%d TO COMPUTER", combo_goal - combo_counter); + font_render_string_center (&font_fixed6, DMD_MIDDLE_X, DMD_MED_CY_3, sprintf_buffer); + + sprintf ("%d", combo_counter); + font_render_string_center (&font_fixed10, DMD_MIDDLE_X - 15, DMD_MED_CY_1 + 4, sprintf_buffer); + + dmd_text_outline (); + dmd_alloc_pair (); + frame_draw(IMG_COMBO1_END); + dmd_overlay_outline (); + dmd_show2 (); + }//end f % 2 + else { + for (fno = IMG_COMBO2_START; fno <= IMG_COMBO2_END; fno += 2) { + dmd_alloc_pair (); + frame_draw(fno); + dmd_show2 (); + task_sleep (TIME_100MS); + }//end of for loop + sound_start (ST_EFFECT, SUBWAY2, SL_2S, SP_NORMAL); + + dmd_map_overlay (); + dmd_clean_page_low (); + if (flag_test (FLAG_VIDEO_MODE_ENABLED) ) { + font_render_string_center (&font_term6, DMD_MIDDLE_X - 20, DMD_MED_CY_2 + 6, "VIDEO MODE"); + font_render_string_center (&font_term6, DMD_MIDDLE_X + 45, DMD_MED_CY_3, "READY"); + } + else { + sprintf ("%d TO", combo_vm_goal - combo_counter); + font_render_string_left (&font_term6, 5, DMD_MED_CY_2, sprintf_buffer); + font_render_string_left (&font_term6, 50, DMD_MED_CY_3 - 5, "VIDEO MODE"); + } + + sprintf ("%d", combo_counter); + font_render_string_center (&font_fixed10, DMD_MIDDLE_X - 20, DMD_MED_CY_1 + 2, sprintf_buffer); + + dmd_text_outline (); + dmd_alloc_pair (); + frame_draw(IMG_COMBO2_END); + dmd_overlay_outline (); + dmd_show2 (); + }//end of else + + task_sleep_sec (2); + deff_exit (); +}//end of deff + + + + + +void vm_effect_deff(void) { + U16 fno; + sound_start (ST_EFFECT, SUBWAY2, SL_2S, SP_NORMAL); + for (fno = IMG_COMBO1_START; fno <= IMG_COMBO1_END; fno += 2) { + dmd_alloc_pair (); + frame_draw(fno); + dmd_show2 (); + task_sleep (TIME_100MS); + }//end of for loop + sound_start (ST_EFFECT, SUBWAY2, SL_2S, SP_NORMAL); + + dmd_map_overlay (); + dmd_clean_page_low (); + font_render_string_center (&font_term6, DMD_MIDDLE_X - 20, DMD_MED_CY_2 + 6, "VIDEO MODE"); + font_render_string_center (&font_term6, DMD_MIDDLE_X + 45, DMD_MED_CY_3, "READY"); + + sprintf ("%d", combo_counter); + font_render_string_center (&font_fixed10, DMD_MIDDLE_X - 15, DMD_MED_CY_1 + 4, sprintf_buffer); + + dmd_text_outline (); + dmd_alloc_pair (); + frame_draw(IMG_COMBO1_END); + dmd_overlay_outline (); + dmd_show2 (); + task_sleep_sec (2); + deff_exit (); +}//end of deff + diff --git a/machine/dm/cryoclaw.c b/machine/dm/cryoclaw.c new file mode 100644 index 000000000..e8b331706 --- /dev/null +++ b/machine/dm/cryoclaw.c @@ -0,0 +1,358 @@ +/* + * demolition man + * cryoclaw.c + * + * written by James Cardona + * + * Location Description: + * + * + */ +/* CALLSET_SECTION (cryoclaw, __machine__) */ + + + +#include +#include "dm/global_constants.h" +#include "elevator.h" +#include "claw.h" +#include "clawmagnet.h" +#include "search.h" + +//local variables +U8 cryoclaw_mode_timer; +__boolean parked_at_left; +__boolean claw_in_ball_search; +__boolean claw_home; +__local__ U8 dc_next_award; + +//internally called function prototypes --external found at protos.h +void cryoclaw_mode_init (void); +void cryoclaw_mode_expire (void); +void cryoclaw_mode_exit (void); + +/**************************************************************************** + * mode definition structure + ***************************************************************************/ +struct timed_mode_ops cryoclaw_mode = { + DEFAULT_MODE, + .init = cryoclaw_mode_init, + .exit = cryoclaw_mode_exit, + .gid = GID_CRYOCLAW_MODE_RUNNING, + .music = MUS_CLAW, + .deff_running = DEFF_CRYOCLAW_EFFECT, + .prio = PRI_GAME_MODE1, + .init_timer = 14, + .timer = &cryoclaw_mode_timer, + .grace_timer = 0, //default is 2 +}; + + +/**************************************************************************** + * initialize and exit + ***************************************************************************/ +CALLSET_ENTRY (cryoclaw, start_ball) { + flag_off(FLAG_IS_BALL_ON_CLAW); + flag_off (FLAG_IS_CRYOCLAW_RUNNING); + claw_in_ball_search = FALSE; +}//end of function + +CALLSET_ENTRY (cryoclaw, start_player) { + dc_next_award = 0; +}//end of function + + + +void cryoclaw_mode_init (void) { + if (system_config.disable_claw == NO) { + ball_search_monitor_stop (); + flag_on (FLAG_IS_CRYOCLAW_RUNNING); + sound_start (ST_SPEECH, SPCH_USE_TRIGGERS_TO_MOVE_CRYOCLAW, SL_4S, PRI_GAME_QUICK5); + flipper_disable (); //approximately 4 secs, the player cannot control anything + leff_start (LEFF_CLAW); + + //routine which has claw starting from parked at left + claw_go_right(); + task_sleep(TIME_2S); + clawmagnet_on (); + elevator_move_up(); //move up + task_sleep(TIME_100MS); //then back down back to home + elevator_move_down(); + task_sleep(TIME_1S);//was 500MS + claw_go_left_to_center(); + + sound_start (ST_SPEECH, SPCH_USE_BUTTONS_TO_RELEASE_BALL, SL_4S, PRI_GAME_QUICK5); + + task_sleep(TIME_1S); + /* + //routine which has claw starting from parked at right + clawmagnet_on (); + elevator_move_up(); //move up + task_sleep(TIME_100MS); //then back down back to home + elevator_move_down(); + task_sleep(TIME_500MS); + claw_go_left_to_center(); + task_sleep(TIME_1S); +*/ + flag_on(FLAG_IS_BALL_ON_CLAW); //this enables control of claw with flippers + rramp_clawready_off(); //turn off diverter + } +}//end of fufnction + + + +void cryoclaw_mode_expire (void) { + flag_off (FLAG_IS_CRYOCLAW_RUNNING); + if (!flag_test(FLAG_VIDEO_MODE_RUNNING) ) flipper_enable (); + clawmagnet_off (); + flag_off(FLAG_IS_BALL_ON_CLAW); + task_sleep(TIME_1S); + //move claw back to home position + claw_go_right(); //this is in case the mode picked was acmag + task_sleep(TIME_200MS); + claw_go_left(); + + //routine which has claw starting from parked at right + //claw_go_right(); + check_access_claw_relight();//if claw modes are stacked up then relight claw at inlanes.c + if (!flag_test(FLAG_VIDEO_MODE_RUNNING) ) ball_search_monitor_start (); +}//end of function + + + +void cryoclaw_mode_exit (void) { cryoclaw_mode_expire();} + + + +/**************************************************************************** + * external event listeners + ****************************************************************************/ +CALLSET_ENTRY (cryoclaw, music_refresh) { timed_mode_music_refresh (&cryoclaw_mode); } +CALLSET_ENTRY (cryoclaw, end_ball) { if (timed_mode_running_p(&cryoclaw_mode) ) timed_mode_end (&cryoclaw_mode); } +CALLSET_ENTRY (cryoclaw, display_update) { timed_mode_display_update (&cryoclaw_mode); } + + +/**************************************************************************** + * + * body + * + ****************************************************************************/ +CALLSET_ENTRY (cryoclaw, ball_search) { + if (system_config.disable_claw == NO) { + claw_in_ball_search = TRUE; + + if (claw_in_ball_search) task_sleep(TIME_1S); + if (claw_in_ball_search) claw_home = FALSE; + if (claw_in_ball_search) claw_go_right(); + if (claw_in_ball_search) task_sleep(TIME_2S); + if (claw_in_ball_search) clawmagnet_on (); + if (claw_in_ball_search) elevator_move_up(); //move up + if (claw_in_ball_search) task_sleep(TIME_100MS); //then back down back to home + if (claw_in_ball_search) elevator_move_down(); + if (claw_in_ball_search) task_sleep(TIME_1S); + if (claw_in_ball_search) claw_go_left(); + if (claw_in_ball_search) task_sleep(TIME_2S); + if (claw_in_ball_search) claw_home = TRUE; + clawmagnet_off (); //drop ball on acmag + }//end of if +}//end of function + + + + +CALLSET_ENTRY (cryoclaw, ball_search_end, end_ball) { + if (system_config.disable_claw == NO) { + claw_in_ball_search = FALSE; + if (!claw_home) { //put claw in the home + clawmagnet_off (); + elevator_move_down(); + claw_go_left(); + claw_home = TRUE; + }//end of if + } +}//end of function + + + + + +//if ball lands on top of elevator then switch will be made +CALLSET_ENTRY (cryoclaw, sw_elevator_hold) { + if (system_config.disable_claw == NO) { + if (!claw_in_ball_search && valid_playfield && !in_bonus) { + if (!timed_mode_running_p(&cryoclaw_mode) ) timed_mode_begin (&cryoclaw_mode);//start mode + + flasher_pulse (FLASH_ELEVATOR_1_FLASHER); + flasher_pulse (FLASH_ELEVATOR_2_FLASHER); + flasher_pulse (FLASH_CLAW_FLASHER); + task_sleep (TIME_100MS); + flasher_pulse (FLASH_ELEVATOR_1_FLASHER); + flasher_pulse (FLASH_ELEVATOR_2_FLASHER); + flasher_pulse (FLASH_CLAW_FLASHER); + task_sleep (TIME_100MS); + flasher_pulse (FLASH_ELEVATOR_1_FLASHER); + flasher_pulse (FLASH_ELEVATOR_2_FLASHER); + flasher_pulse (FLASH_CLAW_FLASHER); + }//END OF INNER IF + } +}//end of function + + +// this is how we handle activating claw modes when the claw is disabled +// +// this is called by right ramp hit at ramps.c +// +// claw can be disabled by player in options menu for the following reasons: +// 1) diverter, claw motor, elevator, or magnet broke +// 2) for tournaments because it makes game harder +// +void disabled_claw_hit (void) { + if (++dc_next_award >= 5) dc_next_award = 0; + switch (dc_next_award) { + case 0: callset_invoke (sw_claw_capture_simon); break; //capture simon + case 1: callset_invoke (sw_claw_acmag); break; //acmag + case 2: callset_invoke (sw_claw_freeze); break; //frenzy + case 3: callset_invoke (sw_claw_prison_break); break; //cryoprison breakout + case 4: callset_invoke (sw_claw_super_jets); break; //super jets + }// end of switch + rramp_clawready_off (); //turn of claw enabled flag and light +}//end of function + + +//release ball +CALLSET_ENTRY (cryoclaw, sw_left_handle_button, sw_launch_button) { + if (flag_test(FLAG_IS_BALL_ON_CLAW)) { + clawmagnet_off (); + }//end of if +}//end of function + + + +//end mode +CALLSET_ENTRY (cryoclaw, end_claw_mode) { + if (timed_mode_running_p(&cryoclaw_mode) ) timed_mode_end (&cryoclaw_mode); +}//end of function + + + + + +//move claw left +CALLSET_ENTRY (cryoclaw, sw_left_button, sw_upper_left_button) { + if (system_config.disable_claw == NO) + if (flag_test(FLAG_IS_BALL_ON_CLAW) ) claw_bump_left (); +}//end of function + + + + + +//move claw right +CALLSET_ENTRY (cryoclaw, sw_right_button, sw_upper_right_button) { + if (system_config.disable_claw == NO) + if (flag_test(FLAG_IS_BALL_ON_CLAW) ) claw_bump_right (); +}//end of function + + + +//ensure claw is all the way to the right +CALLSET_ENTRY (cryoclaw, amode_start) { + if (system_config.disable_claw == NO && !in_test) { //prevent going to test menu triggering movement of claw + + // routine which has claw parked at left + flag_off(FLAG_IS_BALL_ON_CLAW); + clawmagnet_off (); + task_sleep(TIME_1S); + claw_go_right(); + claw_home = FALSE; + task_sleep(TIME_2S); + claw_go_left(); + parked_at_left = TRUE; + claw_home = TRUE; +/* + //routine which has claw parked at right + flag_off(FLAG_IS_BALL_ON_CLAW); + clawmagnet_off (); + task_sleep(TIME_1S); + claw_go_left(); + task_sleep(TIME_2S); + claw_go_right(); + parked_at_left = FALSE; +*/ + }//end of if +}//end of function + + + + +CALLSET_ENTRY (cryoclaw, player_start) { + flag_off(FLAG_IS_BALL_ON_CLAW); + clawmagnet_off (); +}//end of function + + + +/**************************************************************************** + * + * lighting effects + * + ****************************************************************************/ +void claw_leff (void) { + flasher_pulse(FLASH_CLAW_FLASHER); + flasher_pulse(FLASH_ELEVATOR_1_FLASHER); + flasher_pulse(FLASH_ELEVATOR_2_FLASHER); + task_sleep(TIME_200MS); + flasher_pulse(FLASH_CLAW_FLASHER); + flasher_pulse(FLASH_ELEVATOR_1_FLASHER); + flasher_pulse(FLASH_ELEVATOR_2_FLASHER); + task_sleep(TIME_200MS); + flasher_pulse(FLASH_CLAW_FLASHER); + flasher_pulse(FLASH_ELEVATOR_1_FLASHER); + flasher_pulse(FLASH_ELEVATOR_2_FLASHER); + task_sleep(TIME_200MS); + flasher_pulse(FLASH_CLAW_FLASHER); + flasher_pulse(FLASH_ELEVATOR_1_FLASHER); + flasher_pulse(FLASH_ELEVATOR_2_FLASHER); + task_sleep(TIME_200MS); + + leff_exit(); +}//end of function + + + + + +/**************************************************************************** + * + * DMD display + * + ****************************************************************************/ +//the image is 4 color in 2 panes, so we must increment by 2's not 1's +U8 cryoclaw_effect_deff_table[] = { 0, 2, 4, 4, 2, 0, //left stays up, right goes down and up --6 frames + 0, 6, 8, 10, 10, 8, 6, 0, //left goes down and up, right stays up --8 frames + 0, 6, 8, 10, 12, 14, 16, 18, 18, 16, 14, 12, 10, 8, 6, 0, //--16 frames left goes down then right goes down and up then left goes up + 0, 6, 8, 10, 10, 8, 6, 0 }; //left goes down and up, right stays up --8 frames + + +void cryoclaw_effect_deff (void) { + U8 cryoclaw_display_counter = 0; + + for (;;) { + dmd_map_overlay (); + dmd_clean_page_low (); + dmd_draw_thin_border (dmd_low_buffer); + sprintf ("%d %d", cryoclaw_mode_timer, cryoclaw_mode_timer); + font_render_string_center (&font_term6, DMD_MIDDLE_X, DMD_MED_CY_1, sprintf_buffer); + font_render_string_center (&font_term6, DMD_MIDDLE_X, DMD_MED_CY_3, sprintf_buffer); + font_render_string_center (&font_steel, DMD_MIDDLE_X, DMD_BIG_CY_Top, "CRYO CLAW"); + dmd_text_outline (); + dmd_alloc_pair (); + frame_draw(IMG_CRYOPRISON_RUN_0 + cryoclaw_effect_deff_table[cryoclaw_display_counter]); + dmd_overlay_outline (); + dmd_show2 (); + task_sleep (TIME_200MS); + + cryoclaw_display_counter++; + if (cryoclaw_display_counter >= 36) cryoclaw_display_counter = 0; + }//END OF ENDLESS LOOP +}//end of function diff --git a/machine/dm/cryoprison.c b/machine/dm/cryoprison.c new file mode 100644 index 000000000..469ed08ac --- /dev/null +++ b/machine/dm/cryoprison.c @@ -0,0 +1,474 @@ +/* + * demolition man + * cryoprison.c + * + * written by James Cardona + * + * cryoprison multiball + * + * + * */ +/* CALLSET_SECTION (cryoprison, __machine5__) */ + + +#include +#include "dm/global_constants.h" +#include //autogenerated by divhold.ct +#include "cryoprison.h" + +//local variables +score_t cryoprison_score; +U8 cryoprison_jackpot_shots_made; +U8 cryoprison_MessageCounter; +__boolean cryoprison_start_music; +U8 cryoprison_display_counter; +U8 CRYO_TOGGLE; +U8 snake_pos; +__boolean cryoprison_ballsave; + +//external variables +extern U8 NumBallsFrozen; //from lock_freeze_mbstart.c + +//internally called function prototypes --external found at protos.h +void cryoprison_player_reset (void); + + + +/**************************************************************************** + * multiball definition structure + ***************************************************************************/ +struct mb_mode_ops cryoprison_mode = { + DEFAULT_MBMODE, + //.update = , /* The update callback is invoked whenever the state of the multiball changes. */ + .music = MUS_MB, + .deff_starting = DEFF_CRYOPRISON_START_EFFECT, + .deff_running = DEFF_CRYOPRISON_EFFECT, + //.deff_ending = , +//.active_task = // default => .active_task = mb_mode_active_task, + .prio = PRI_MULTIBALL, //default => .prio = PRI_NULL, +//.grace_period = //default => .grace_period = 500ms +}; +//task_gid_t gid_running; +//task_gid_t gid_in_grace; + + +/**************************************************************************** + * initialize and exit + ***************************************************************************/ +void cryoprison_player_reset (void) { + flag_off(FLAG_IS_CRYOPRISON_MB_RUNNING); + score_zero(cryoprison_score); + cryoprison_jackpot_shots_made = 0; //these need to be zeroed in before we enter the mode so bonus doesn't fake trigger + cryoprison_start_music = FALSE; +}//end of function + + +CALLSET_ENTRY (cryoprison, start_player) { cryoprison_player_reset(); } + + + +/**************************************************************************** + * external event listeners + ****************************************************************************/ +CALLSET_ENTRY (cryoprison, music_refresh) { +// if (cryoprison_start_music) music_request (SIREN, PRI_GAME_QUICK8); +// else mb_mode_music_refresh (&cryoprison_mode); + if (flag_test(FLAG_IS_CRYOPRISON_MB_RUNNING)) music_request (MUS_MB, PRI_GAME_QUICK7); +}//end of function + + + + +CALLSET_ENTRY (cryoprison, display_update) { + if (flag_test(FLAG_IS_CRYOPRISON_MB_RUNNING)) + deff_start_bg (DEFF_CRYOPRISON_EFFECT, PRI_MULTIBALL); +}//end of function + + + +CALLSET_ENTRY (cryoprison, end_ball) { + if (flag_test(FLAG_IS_CRYOPRISON_MB_RUNNING)) { + mb_mode_end_ball (&cryoprison_mode); + jackpot_reset(); + end_super_jackpot_reminder(); + flag_off(FLAG_IS_CRYOPRISON_MB_RUNNING); + + if (!flag_test(FLAG_BACK_IN_THE_FRIDGE_ACTIVATED) ) + enable_back_in_the_fridge(); //at completion of our 4th MB we enable the wizard mode + } +}//end of function + + + +//puts in grace period if set +CALLSET_ENTRY (cryoprison, single_ball_play) { + if (flag_test(FLAG_IS_CRYOPRISON_MB_RUNNING)) { + mb_mode_end_ball (&cryoprison_mode); + end_super_jackpot_reminder(); + combo_init(); + diverter_check(); + + enable_back_in_the_fridge(); //at completion of our 4th MB we enable the wizard mode + + //this acts as kind of a grace period for the jackpots + task_sleep_sec(3); + flag_off(FLAG_IS_CRYOPRISON_MB_RUNNING); + jackpot_reset(); + } +}//end of function + + + +//if a ball drains during the mode and with time still on the ballsave timer - send it back in play +CALLSET_BOOL_ENTRY (cryoprison, ball_drain) { //thrown by device.c + if (flag_test(FLAG_IS_CRYOPRISON_MB_RUNNING) + && cryoprison_ballsave) { + sound_start (ST_SPEECH, SPCH_JOHN_SCREAM, SL_2S, PRI_GAME_QUICK5); + serve_ball_auto (); + return FALSE; //this is not a valid drain, don't count it + } + else return TRUE; //this is a valid drain +}//end of callset + + + + + + + + +/**************************************************************************** + * + * body + * + ***************************************************************************/ +void cryoprison_ballsave_task (void) { + task_sleep_sec(15); + cryoprison_ballsave = FALSE; + task_exit(); +}//end of function + + + + +void cryoprison_start_sounds (void) { + U8 i; + for(i = 0; i < 6; i++) { + sound_start (ST_ANY, SIREN, SL_1S, PRI_GAME_QUICK5); + task_sleep (TIME_500MS); + } + task_exit(); +}//end of function + + + + + +void cryoprison_start(U8 num) { + kill_combos(); +// cryoprison_start_music = TRUE; //for to play the helicopter instead of the music + task_create_gid1 (GID_CRYOPRISON_START_NOISE, cryoprison_start_sounds); + flag_on(FLAG_IS_CRYOPRISON_MB_RUNNING); + cryoprison_display_counter = 0; + CRYO_TOGGLE = 0; + snake_pos = 0; + cryoprison_ballsave = TRUE; + mb_mode_start(&cryoprison_mode); + multiball_started();//reset all MB start criteria for next time + + score_add (cryoprison_score, score_table[CRYOPRISON_MB_SCORE]); + score (CRYOPRISON_MB_SCORE); + + deff_start (DEFF_CRYOPRISON_START_EFFECT); + diverter_stop();//defined in divhold2.ct + task_kill_gid (GID_CR_LIGHTS); + + //LIGHTS + lamp_tristate_flash(LM_CRYOPRISON_MULTIBALL); + task_sleep (TIME_2S); + lamp_tristate_on (LM_CRYOPRISON_MULTIBALL); + lamp_tristate_off (LM_FREEZE_1); + lamp_tristate_off (LM_FREEZE_2); + lamp_tristate_off (LM_FREEZE_3); + lamp_tristate_off (LM_FREEZE_4); + + //SOUNDS + U8 cryoprison_SoundCounter; + cryoprison_SoundCounter = random_scaled(2);//from kernal/random.c - pick number from 0 to 2 + if (cryoprison_SoundCounter == 0) + sound_start (ST_SPEECH, SPCH_SIMON_SAYS_SLY, SL_4S, PRI_GAME_QUICK5); + else + sound_start (ST_SPEECH, SPCH_PHOENIX_SHORT, SL_4S, PRI_GAME_QUICK5); + task_sleep (TIME_3S); + sound_start (ST_SPEECH, SPCH_SIMON_SAYS, SL_4S, PRI_GAME_QUICK5); + cryoprison_start_music = FALSE; //for to kill the music + + //serve balls + set_ball_count (5); + task_create_gid1 (GID_CRYOPRISON_BALL_SAVE, cryoprison_ballsave_task); + + task_sleep (TIME_3S); + set_all_jackpots(); //all 6 lit +}//end of function + + + +//jackpot shot +void cryoprison_jackpot_made(void) { + score_add (cryoprison_score, score_table[CRYOPRISON_JP_MB_SCORE]); + score (CRYOPRISON_JP_MB_SCORE); + deff_start (DEFF_CRYOPRISON_JACKPOT_EFFECT); + choose_multiple_random_jackpot(3); + + if (IN_TEST) { start_super_jackpot_reminder(); } + else if (cryoprison_jackpot_shots_made % 5 == 0) start_super_jackpot_reminder(); +}//end of function + + + +void cryoprison_award_super_jackpot(void) { + score_add (cryoprison_score, score_table[CRYOPRISON_SUPER_JP_MB_SCORE]); + score (CRYOPRISON_SUPER_JP_MB_SCORE); + deff_start(DEFF_CRYOPRISON_SUPER_JACKPOT); +}//end of function + + + + + +/**************************************************************************** + * + * DMD display and sound effects + * + ****************************************************************************/ +void cryoprison_super_jackpot_deff (void) { + U8 i; + + for (i = 0; i < 8; i++) { + switch (i) { + case 0: sound_start (ST_SPEECH, SPCH_AHHHGGG, SL_2S, PRI_GAME_QUICK5); break; + case 4: sound_start (ST_SPEECH, SPCH_HURRY_UP, SL_2S, PRI_GAME_QUICK5); break; + case 8: sound_start (ST_SPEECH, SPCH_CLOSE_ENOUGH, SL_2S, PRI_GAME_QUICK5); break; + case 1: + case 3: + case 5: + case 7: sound_start (ST_ANY, EXPLOSION1_SHORT, SL_2S, PRI_GAME_QUICK5); + }//END OF SWITCH + dmd_sched_transition (&trans_scroll_up); + dmd_alloc_low_clean (); + font_render_string_center (&font_fireball, 64, 8, "SUPER"); + font_render_string_center (&font_fireball, 64, 24, "JACKPOT"); + dmd_show_low (); + }//end of loop + sample_start (MACHINE14_LONG, SL_1S); + task_sleep (TIME_500MS); + + speech_start (SPCH_SUPER_JACKPOT, SL_1S); + task_sleep_sec (1); + deff_exit (); +}//end of function + + + + +void cryoprison_animation_display_effect (U16 start_frame, U16 end_frame){ + U16 fno; + for (fno = start_frame; fno <= end_frame; fno += 2) { + dmd_alloc_pair (); + frame_draw(fno); + dmd_show2 (); + task_sleep (TIME_100MS); + }//end of inner loop +} + + + +void cryoprison_frame_bitfade_fast (U16 frame){ + dmd_sched_transition (&trans_bitfade_fast); + dmd_alloc_pair (); + frame_draw(frame); + dmd_show2 (); + task_sleep (TIME_100MS); +} + + + + +void cryoprison_frame_with_words_display_steel_effect (U16 frame, U8 x, U8 y, char *words){ + dmd_alloc_pair_clean ();// Clean both pages + dmd_map_overlay (); + dmd_clean_page_low (); + font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_SMALL_CY_1, "CRYOPRISON"); + font_render_string_center (&font_steel, x, y, words); + dmd_text_outline (); + dmd_alloc_pair (); + frame_draw(frame); + dmd_overlay_outline (); + dmd_show2 (); + task_sleep (TIME_100MS); +} + + +void cryoprison_start_effect_deff(void) { + U16 fno; + dmd_alloc_pair_clean ();// Clean both pages + cryoprison_animation_display_effect (IMG_CRYOPRISON_E1_START, IMG_CRYOPRISON_E1_END); + + cryoprison_frame_bitfade_fast(IMG_CRYOPRISON_E2_START); + + cryoprison_animation_display_effect (IMG_CRYOPRISON_E2_START, IMG_CRYOPRISON_E2_END); + + cryoprison_frame_bitfade_fast(IMG_CAPSIMON_C_START); + + dmd_alloc_pair_clean ();// Clean both pages + for (fno = IMG_CAPSIMON_C_START; fno <= IMG_CAPSIMON_C_END; fno += 2) { + dmd_map_overlay (); + dmd_clean_page_low (); + font_render_string_center (&font_steel, DMD_MIDDLE_X - 30, DMD_BIG_CY_Top, "CRYO"); + font_render_string_center (&font_steel, DMD_MIDDLE_X - 20, DMD_BIG_CY_Bot, "PRISON"); + dmd_text_outline (); + dmd_alloc_pair (); + frame_draw(fno); + dmd_overlay_outline (); + dmd_show2 (); + task_sleep (TIME_100MS); + }//end of inner loop + task_sleep_sec (2); + deff_exit (); +}//end of mode_effect_deff + + + +void cryoprison_jackpot_sounds_task(void) { + U8 cryoprison_MessageCounter; + cryoprison_MessageCounter = random_scaled(3); + if (++cryoprison_jackpot_shots_made % 2 == 0) { + switch (cryoprison_MessageCounter) { + case 0: sound_start (ST_SPEECH, SPCH_DOUBLE_JACKPOT_WES, SL_2S, PRI_GAME_QUICK5); break; + case 1: sound_start (ST_SPEECH, SPCH_DOUBLE_JACKPOT_SLY, SL_2S, PRI_GAME_QUICK5); break; + case 2: sound_start (ST_SPEECH, SPCH_DOUBLE, SL_2S, PRI_GAME_QUICK5); break; + }//end of switch + }//end of if + else { + switch (cryoprison_MessageCounter) { + case 0: sound_start (ST_SPEECH, SPCH_AHHHGGG, SL_2S, PRI_GAME_QUICK5); break; + case 1: sound_start (ST_SPEECH, SPCH_JOHN_SCREAM, SL_2S, PRI_GAME_QUICK5); break; + case 2: sound_start (ST_SPEECH, SPCH_UHHN, SL_2S, PRI_GAME_QUICK5); break; + }//end of switch + }//end of else + task_sleep (TIME_500MS); + sound_start (ST_EFFECT, FREEZE5, SL_1S, PRI_GAME_QUICK5); + task_sleep (TIME_200MS); + sound_start (ST_EFFECT, FREEZE5, SL_1S, PRI_GAME_QUICK5); + task_sleep (TIME_200MS); + sound_start (ST_EFFECT, FREEZE5, SL_1S, PRI_GAME_QUICK5); + task_sleep (TIME_200MS); + sound_start (ST_EFFECT, FREEZE5, SL_1S, PRI_GAME_QUICK5); + task_sleep (TIME_200MS); + sound_start (ST_EFFECT, EJECT, SL_2S, PRI_GAME_QUICK5); + task_sleep (TIME_500MS); + task_exit(); +}//end of mode_effect_deff + + + + + + +U8 cryoprison_jackpot_MessageCounter; +void cryoprison_jackpot_effect_deff(void) { +// if (++cryoprison_jackpot_MessageCounter > 3) cryoprison_jackpot_MessageCounter = 0; + cryoprison_jackpot_MessageCounter = random_scaled(4); + dmd_clean_page_high ();// + dmd_clean_page_low ();// + + task_create_gid1 (GID_CRYOPRISON_JACKPOT_SOUND, cryoprison_jackpot_sounds_task); + + switch (cryoprison_jackpot_MessageCounter) { + default: + case 0: + cryoprison_animation_display_effect (IMG_CAPSIMON_C_START, IMG_CAPSIMON_C_END); + cryoprison_frame_with_words_display_steel_effect (IMG_CAPSIMON_C_END, DMD_MIDDLE_X - 20, DMD_BIG_CY_Bot, "JACKPOT"); + break; + case 1: + cryoprison_animation_display_effect (IMG_CRYOPRISON_E2_START, IMG_CRYOPRISON_E2_END); + cryoprison_frame_with_words_display_steel_effect (IMG_CRYOPRISON_E2_END, DMD_MIDDLE_X - 20, DMD_BIG_CY_Bot, "JACKPOT"); + break; + case 2: + cryoprison_animation_display_effect (IMG_CRYOPRISON_E1_START, IMG_CRYOPRISON_E1_END); + cryoprison_frame_with_words_display_steel_effect (IMG_CRYOPRISON_E1_END, DMD_MIDDLE_X - 20, DMD_BIG_CY_Bot, "JACKPOT"); + break; + case 3: + cryoprison_animation_display_effect (IMG_DR_COCTEAU_B_START, IMG_DR_COCTEAU_B_END); + cryoprison_frame_with_words_display_steel_effect (IMG_DR_COCTEAU_B_END, DMD_MIDDLE_X - 20, DMD_BIG_CY_Bot, "JACKPOT"); + break; + }//end of switch + task_sleep_sec (1); + deff_exit (); +}//end of mode_effect_deff + + + + + + +void show_snake (U8 section) { + U8 j; + U8 i; + + for (i = 0; i < section; i++) { + for (j = 0; j < 4; j++) { + switch (j) { + case 0: bitmap_blit (cryoprison_snake1_bits, i*16, 1); bitmap_blit (cryoprison_snake4_bits, 124-(i*16), 27); break; + case 1: bitmap_blit (cryoprison_snake2_bits, i*16 + 4, 1); bitmap_blit (cryoprison_snake3_bits, 124-(i*16+4), 27); break; + case 2: bitmap_blit (cryoprison_snake3_bits, i*16 + 8, 1); bitmap_blit (cryoprison_snake2_bits, 124-(i*16+8), 27); break; + case 3: bitmap_blit (cryoprison_snake4_bits, i*16 + 12, 1); bitmap_blit (cryoprison_snake1_bits, 124-(i*16+12), 27); break; + } //end of case + } //end of j loop + } //end of i loop + + + for (j = 0; j < 4; j++) { + switch (j) { + case 0: bitmap_blit (cryoprison_snake1_bits, section * 16, 1); bitmap_blit (cryoprison_snake4_bits, 124-(section*16), 27); break; + case 1: bitmap_blit (cryoprison_snake2_bits, section * 16 + 4, 1); bitmap_blit (cryoprison_snake3_bits, 124-(section*16+4), 27); break; + case 2: bitmap_blit (cryoprison_snake3_bits, section * 16 + 8, 1); bitmap_blit (cryoprison_snake2_bits, 124-(section*16+8), 27); break; + case 3: bitmap_blit (cryoprison_snake4_bits, section * 16 + 12, 1); bitmap_blit (cryoprison_snake1_bits, 124-(section*16+12), 27); break; + }//end of case + + dmd_show_low ();//shows a 4 color image + task_sleep (TIME_200MS); + }//end of j loop + + dmd_alloc_pair_clean(); +}//end of func + + + +void cryoprison_effect_deff (void) { + dmd_alloc_pair_clean(); + + for (;;) { + dmd_draw_thin_border (dmd_low_buffer); + + font_render_string_center (&font_steel, DMD_MIDDLE_X, DMD_BIG_CY_Top - 2, "CRYOPRISON"); + + sprintf_score(current_score); + font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_SMALL_CY_3 - 2, sprintf_buffer); + + if (CRYO_TOGGLE == 0) { sprintf ("15 MILLION"); font_render_string_center (&font_steel, DMD_MIDDLE_X, DMD_BIG_CY_Bot - 2, sprintf_buffer); } + else if (CRYO_TOGGLE == 1) { sprintf ("JACKPOT LIT"); font_render_string_center (&font_steel, DMD_MIDDLE_X, DMD_BIG_CY_Bot - 2, sprintf_buffer); } + else if (CRYO_TOGGLE == 2) {sprintf ("%d JACKPOTS", cryoprison_jackpot_shots_made); font_render_string_center (&font_steel, DMD_MIDDLE_X, DMD_BIG_CY_Bot - 2, sprintf_buffer); } + else if (CRYO_TOGGLE == 3) { if (flag_test(FLAG_IS_SUPER_JACKPOT_ACTIVATED) ) sprintf ("SUPER LIT"); + else sprintf ("%d FOR SUPER", 5 - (cryoprison_jackpot_shots_made % 5) ); + font_render_string_center (&font_steel, DMD_MIDDLE_X, DMD_BIG_CY_Bot - 2, sprintf_buffer); } + + show_snake(snake_pos); // takes approx 1.5 seconds + + if (snake_pos < 7) snake_pos ++; + else snake_pos = 0; + + if (++cryoprison_display_counter % 7 == 0) { if (++CRYO_TOGGLE > 3) CRYO_TOGGLE = 0; } //change CRYO_TOGGLE once per second + }//END OF ENDLESS LOOP +}//end of function + diff --git a/machine/dm/demotime.c b/machine/dm/demotime.c new file mode 100644 index 000000000..b99cce9ed --- /dev/null +++ b/machine/dm/demotime.c @@ -0,0 +1,455 @@ +/* + * demolition man + * demotime.c + * + * written by James Cardona + * + * demotime multiball + * + * + * */ +/* CALLSET_SECTION (demotime, __machine2__) */ + + +#include +#include "dm/global_constants.h" +#include //autogenerated by divhold.ct +#include "search.h" +//constants +const U8 DEMOTIME_EASY_GOAL = 5; +const U8 DEMOTIME_HARD_GOAL = 8; +const U8 DEMOTIME_GOAL_INCREMENT = 3; + +//local variables +__boolean demotime_start_music; +score_t demotime_score; +U8 demotime_jackpot_shots_made; +U8 demotime_MessageCounter; +__local__ U8 demotime_counter; +__local__ U8 demotime_goal; +__boolean demotime_ballsave; + + +//internally called function prototypes --external found at protos.h +void demotime_player_reset (void); + + + +/**************************************************************************** + * multiball definition structure + ***************************************************************************/ +struct mb_mode_ops demotime_mode = { + DEFAULT_MBMODE, + //.update = , /* The update callback is invoked whenever the state of the multiball changes. */ + .music = MUS_MB_B, +// .deff_starting = DEFF_DEMOTIME_START_EFFECT, + .deff_running = DEFF_DEMOTIME_EFFECT, + //.deff_ending = , +//.active_task = // default => .active_task = mb_mode_active_task, + .prio = PRI_MULTIBALL, //default => .prio = PRI_NULL, +//.grace_period = //default => .grace_period = 500ms +}; +//task_gid_t gid_running; +//task_gid_t gid_in_grace; + + + +/**************************************************************************** + * initialize and exit + ***************************************************************************/ +void demotime_player_reset (void) { + demotime_counter = 0; + demotime_goal = DEMOTIME_EASY_GOAL; + flag_off(FLAG_IS_DEMOTIME_ENABLED); + flag_off(FLAG_IS_DEMOTIME_RUNNING); + flag_off(FLAG_IS_DEMOTIME_IS_STARTING); + score_zero(demotime_score); + demotime_jackpot_shots_made = 0; //these need to be zeroed in before we enter the mode so bonus doesn't fake trigger + demotime_start_music = FALSE; + lamp_tristate_off (LM_DEMO_TIME); + +#ifdef CONFIG_DIFFICULTY_LEVEL + if (system_config.difficulty == EASY) demotime_goal = DEMOTIME_EASY_GOAL; + else demotime_goal = DEMOTIME_HARD_GOAL; +#endif +}//end of function + + + +CALLSET_ENTRY (demotime, start_player) { demotime_player_reset(); } + + + +/**************************************************************************** + * external event listeners + ****************************************************************************/ +CALLSET_ENTRY (demotime, music_refresh) { + if (demotime_start_music) music_request (LOW_HORN, PRI_GAME_QUICK8); + else if (flag_test(FLAG_IS_DEMOTIME_RUNNING)) music_request (MUS_MB_B, PRI_GAME_QUICK7); +}//end of function + + + +CALLSET_ENTRY (demotime, display_update) { + if (flag_test(FLAG_IS_DEMOTIME_RUNNING)) + deff_start_bg (DEFF_DEMOTIME_EFFECT, PRI_MULTIBALL); +}//end of function + + + +CALLSET_ENTRY (demotime, end_ball) { + if (flag_test(FLAG_IS_DEMOTIME_RUNNING)) { + mb_mode_end_ball (&demotime_mode); + jackpot_reset(); + end_super_jackpot_reminder(); + lamp_tristate_off (LM_DEMO_TIME); + flag_off(FLAG_IS_DEMOTIME_RUNNING); + flag_off(FLAG_IS_DEMOTIME_ENABLED); + } +}//end of function + + + +//puts in grace period if set, otherwise ends mode +CALLSET_ENTRY (demotime, single_ball_play) { + if (flag_test(FLAG_IS_DEMOTIME_RUNNING)) { + mb_mode_end_ball (&demotime_mode); + end_super_jackpot_reminder(); + lamp_tristate_off (LM_DEMO_TIME); + flag_off(FLAG_IS_DEMOTIME_ENABLED); + combo_init(); + diverter_check(); + + //this acts as kind of a grace period for the jackpots + task_sleep_sec(3); + flag_off(FLAG_IS_DEMOTIME_RUNNING); + jackpot_reset(); + }//end of if +}//end of function + + + + +//if a ball drains during the mode and with time still on the ballsave timer - send it back in play +CALLSET_BOOL_ENTRY (demotime, ball_drain) { //thrown by device.c + if (flag_test(FLAG_IS_DEMOTIME_RUNNING) + && demotime_ballsave) { + sound_start (ST_SPEECH, EXPLOSION, SL_2S, PRI_GAME_QUICK5); + serve_ball_auto (); + return FALSE; //this is not a valid drain, don't count it + } + else return TRUE; //this is a valid drain +}//end of callset + + + + + + + +/**************************************************************************** + * + * body + * + ***************************************************************************/ +void demotime_ballsave_task (void) { + task_sleep_sec(15); + demotime_ballsave = FALSE; + task_exit(); +}//end of function + + +//MAKING ANY OF THE CLAW MODE SHOTS CALLS THIS +void demotime_increment (void) { + if (++demotime_counter >= demotime_goal) { + flag_on(FLAG_IS_DEMOTIME_ENABLED); + deff_start (DEFF_DEMOTIME_INFO_EFFECT);//under /kernel/deff.c + lamp_tristate_flash (LM_DEMO_TIME); + } +}//end of function + + +//for testing +void demotime_increment_all (void) { + flag_on(FLAG_IS_DEMOTIME_ENABLED); + deff_start (DEFF_DEMOTIME_INFO_EFFECT);//under /kernel/deff.c + lamp_tristate_flash (LM_DEMO_TIME); +}//end of function + + + +//ONCE ENABLED IT IS STARTED BY A UNDERGROUND SHOT +void demotime_start(void) { + ball_search_monitor_stop (); + kill_combos(); + demotime_ballsave = TRUE; + demotime_start_music = TRUE; + flag_on(FLAG_IS_DEMOTIME_IS_STARTING); + flag_on(FLAG_IS_DEMOTIME_RUNNING); + flag_off(FLAG_IS_DEMOTIME_ENABLED); + mb_mode_start(&demotime_mode); + diverter_stop();//defined in divhold2.ct + task_kill_gid (GID_CR_LIGHTS); + + //LIGHTS + lamp_tristate_on (LM_DEMO_TIME); + + //reset all start criteria for next time + demotime_goal += (DEMOTIME_GOAL_INCREMENT); + demotime_counter = 0; + + deff_start_sync(DEFF_DEMOTIME_START_EFFECT); + + set_all_jackpots(); + set_ball_count (5); + + task_create_gid1 (GID_DEMOTIME_BALL_SAVE, demotime_ballsave_task); + sol_request_async(SOL_BOTTOM_POPPER); + flag_off(FLAG_IS_DEMOTIME_IS_STARTING); + ball_search_monitor_start (); +}//end of function + + + +//jackpot shot +void demotime_jackpot_made(void) { + score_add (demotime_score, score_table[DEMOTIME_JP_MB_SCORE]); + score (DEMOTIME_JP_MB_SCORE); + deff_start (DEFF_DEMOTIME_JACKPOT_EFFECT); +}//end of function + + + +/**************************************************************************** + * + * DMD display and sound effects + * + ****************************************************************************/ +void demotime_animation_display_effect (U16 start_frame, U16 end_frame){ + U16 fno; + for (fno = start_frame; fno <= end_frame; fno += 2) { + dmd_alloc_pair (); + frame_draw(fno); + dmd_show2 (); + task_sleep (TIME_100MS); + }//end of inner loop +} + + + +void demotime_frame_bitfade_fast (U16 frame){ + dmd_sched_transition (&trans_bitfade_fast); + dmd_alloc_pair (); + frame_draw(frame); + dmd_show2 (); + task_sleep (TIME_100MS); +} + + + + +void demotime_frame_with_words_display_steel_effect (U16 frame, U8 x, U8 y, char *words){ + dmd_alloc_pair_clean ();// Clean both pages + dmd_map_overlay (); + dmd_clean_page_low (); + font_render_string_center (&font_steel, x, y, words); + dmd_text_outline (); + dmd_alloc_pair (); + frame_draw(frame); + dmd_overlay_outline (); + dmd_show2 (); + task_sleep (TIME_100MS); +} + + + +void demotime_info_effect_deff(void) { + dmd_clean_page_high (); + dmd_clean_page_low (); + font_render_string_center (&font_term6, DMD_MIDDLE_X, DMD_MED_CY_1, "SHOOT SUBWAY"); + font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_MED_CY_2, "FOR"); + + font_render_string_center (&font_fipps, DMD_MIDDLE_X, DMD_BIG_CY_Bot, "DEMOLITION TIME"); + dmd_show_low(); + task_sleep_sec (3); + deff_exit (); +}//end of mode_effect_deff + + + + +void demotime_start_effect_deff(void) { + sound_start (ST_SAMPLE, EXPLOSION, SL_2S, PRI_GAME_QUICK5); + sound_start (ST_SPEECH, SPCH_YOU_AND_ME, SL_4S, PRI_GAME_QUICK5); + demotime_animation_display_effect (IMG_FORTRESS_D1_START, IMG_FORTRESS_D1_END); + + dmd_map_overlay (); + dmd_clean_page_low (); + font_render_string_center (&font_steel, DMD_MIDDLE_X - 20, DMD_BIG_CY_Top, "DEMOLITION"); + font_render_string_center (&font_steel, DMD_MIDDLE_X - 20, DMD_BIG_CY_Bot, "TIME"); + dmd_text_outline (); + dmd_alloc_pair (); + frame_draw(IMG_FORTRESS_D1_END); + dmd_overlay_outline (); + dmd_show2 (); + task_sleep (TIME_100MS); + + sound_start (ST_SAMPLE, EXPLOSION, SL_2S, PRI_GAME_QUICK5); + demotime_frame_bitfade_fast(IMG_FIGHT_A_START); + sound_start (ST_SPEECH, SPCH_MUST_HAVE_HURT, SL_4S, PRI_GAME_QUICK5); + sound_start (ST_SAMPLE, EXPLOSION, SL_2S, PRI_GAME_QUICK5); + demotime_animation_display_effect (IMG_FIGHT_A_START, IMG_FIGHT_A_END); + + dmd_map_overlay (); + dmd_clean_page_low (); + font_render_string_center (&font_steel, DMD_MIDDLE_X - 20, DMD_BIG_CY_Top, "DEMOLITION"); + font_render_string_center (&font_steel, DMD_MIDDLE_X - 20, DMD_BIG_CY_Bot, "TIME"); + dmd_text_outline (); + dmd_alloc_pair (); + frame_draw(IMG_MUSEUM_D2_END); + dmd_overlay_outline (); + dmd_show2 (); + task_sleep (TIME_100MS); + + sound_start (ST_SAMPLE, EXPLOSION, SL_2S, PRI_GAME_QUICK5); + demotime_frame_bitfade_fast(IMG_WASTELAND_A1_START); + sound_start (ST_SPEECH, SPCH_IN_THIS_CENTURY, SL_4S, PRI_GAME_QUICK5); + sound_start (ST_SAMPLE, EXPLOSION, SL_2S, PRI_GAME_QUICK5); + demotime_animation_display_effect (IMG_WASTELAND_A1_START, IMG_WASTELAND_A1_END); + + dmd_map_overlay (); + dmd_clean_page_low (); + font_render_string_center (&font_steel, DMD_MIDDLE_X + 10, DMD_BIG_CY_Top, "DEMOLITION"); + font_render_string_center (&font_steel, DMD_MIDDLE_X - 20, DMD_BIG_CY_Bot, "TIME"); + dmd_text_outline (); + dmd_alloc_pair (); + frame_draw(IMG_WASTELAND_A1_END); + dmd_overlay_outline (); + dmd_show2 (); + task_sleep (TIME_100MS); + + sound_start (ST_SAMPLE, EXPLOSION, SL_2S, PRI_GAME_QUICK5); + demotime_frame_bitfade_fast(IMG_CAPSIMON_C_START); + sound_start (ST_SPEECH, SPCH_JOHN_SPARTAN, SL_4S, PRI_GAME_QUICK5); + sound_start (ST_SAMPLE, EXPLOSION, SL_2S, PRI_GAME_QUICK5); + demotime_animation_display_effect (IMG_CAPSIMON_C_START, IMG_CAPSIMON_C_END); + + dmd_map_overlay (); + dmd_clean_page_low (); + font_render_string_center (&font_steel, DMD_MIDDLE_X + 10, DMD_BIG_CY_Top, "DEMOLITION"); + font_render_string_center (&font_steel, DMD_MIDDLE_X - 20, DMD_BIG_CY_Bot, "TIME"); + dmd_text_outline (); + dmd_alloc_pair (); + frame_draw(IMG_CAPSIMON_C_END); + dmd_overlay_outline (); + dmd_show2 (); + task_sleep (TIME_100MS); + + sound_start (ST_SAMPLE, EXPLOSION, SL_2S, PRI_GAME_QUICK5); + sound_start (ST_SPEECH, SPCH_DEMOLITION_MAN, SL_4S, PRI_GAME_QUICK5); + task_sleep (TIME_200MS); + demotime_start_music = FALSE; //kill the start music + deff_exit (); +}//end of mode_effect_deff + + + +U8 demotime_SoundCounter; +void demotime_jackpot_sounds_task(void) { + if (IN_TEST) { if (++demotime_SoundCounter > 5) demotime_SoundCounter = 0; } + else demotime_SoundCounter = random_scaled(6); + + switch (demotime_SoundCounter) { + case 0: sound_start (ST_SPEECH, SPCH_TRESPASSING, SL_2S, PRI_GAME_QUICK5); break; + case 1: sound_start (ST_SPEECH, SPCH_ARREST, SL_2S, PRI_GAME_QUICK5); break; + case 2: sound_start (ST_SPEECH, SPCH_DREAMIN_KILLING_YOU, SL_2S, PRI_GAME_QUICK5); break; + }//end of switch + sound_start (ST_EFFECT, GUNSHOT_MUFFLED, SL_1S, PRI_GAME_QUICK5); + task_sleep (TIME_200MS); + sound_start (ST_EFFECT, GUNSHOT_MUFFLED, SL_1S, PRI_GAME_QUICK5); + task_sleep (TIME_200MS); + sound_start (ST_EFFECT, GUNSHOT_MUFFLED, SL_1S, PRI_GAME_QUICK5); + task_sleep (TIME_200MS); + sound_start (ST_EFFECT, GUNSHOT, SL_2S, PRI_GAME_QUICK5); + task_sleep (TIME_500MS); + switch (demotime_SoundCounter) { + case 3: sound_start (ST_SPEECH, SPCH_JOHN_SCREAM, SL_2S, PRI_GAME_QUICK5); break; + case 4: sound_start (ST_SPEECH, SPCH_DONT_WORRY, SL_2S, PRI_GAME_QUICK5); break; + case 5: sound_start (ST_SPEECH, SPCH_KEEP_DREAMING, SL_2S, PRI_GAME_QUICK5); break; + }//end of switch + task_exit(); +}//end of mode_effect_deff + + + +U8 demotime_MessageCounter; +void demotime_jackpot_effect_deff(void) { + dmd_clean_page_high ();// + dmd_clean_page_low ();// + + if (IN_TEST) { if (++demotime_MessageCounter > 3) demotime_MessageCounter = 0; } + else demotime_MessageCounter = random_scaled(4); + + task_create_gid1 (GID_DEMOTIME_JACKPOT_SOUND, demotime_jackpot_sounds_task); + + switch (demotime_MessageCounter) { + //FROM FORTRESS + default: + case 0: + demotime_animation_display_effect (IMG_FORTRESS_D1_START, IMG_FORTRESS_D1_END); + demotime_frame_with_words_display_steel_effect (IMG_FORTRESS_D1_END, DMD_MIDDLE_X - 20, DMD_BIG_CY_Bot, "DEMOLITION"); + break; + + //FROM MUSEUM + case 1: + demotime_animation_display_effect (IMG_FIGHT_A_START, IMG_FIGHT_A_END); + demotime_frame_with_words_display_steel_effect (IMG_FIGHT_A_END, DMD_MIDDLE_X + 20, DMD_BIG_CY_Bot, "DEMOLITION"); + break; + + //FROM CRYOPRISON + case 2: + demotime_animation_display_effect (IMG_CAPSIMON_C_START, IMG_CAPSIMON_C_END); + demotime_frame_with_words_display_steel_effect (IMG_CAPSIMON_C_END, DMD_MIDDLE_X - 20, DMD_BIG_CY_Bot, "DEMOLITION"); + break; + + //FROM WASTELAND + case 3: + demotime_animation_display_effect (IMG_WASTELAND_A1_START, IMG_WASTELAND_A1_END); + demotime_frame_with_words_display_steel_effect (IMG_WASTELAND_A1_END, DMD_MIDDLE_X + 20, DMD_BIG_CY_Bot, "DEMOLITION"); + break; + }//end of switch + task_sleep_sec (1); + deff_exit (); +}//end of mode_effect_deff + + + + +void demotime_effect_deff (void) { + U8 demotime_display_counter = 0; + __boolean TOGGLE = FALSE; + dmd_alloc_pair_clean(); + + for (;;) { + dmd_clean_page_low (); + dmd_draw_thin_border (dmd_low_buffer); + font_render_string_center (&font_steel, DMD_MIDDLE_X, DMD_BIG_CY_Top - 2, "DEMOTIME"); + + sprintf_score(current_score); + font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_SMALL_CY_3, sprintf_buffer); + + if (demotime_display_counter % 10 != 0) { //draw for 9/10 and blank for 1/10 + if (TOGGLE) sprintf ("15 MILLION"); + else sprintf ("JACKPOT LIT"); } + else sprintf (""); + font_render_string_center (&font_steel, DMD_MIDDLE_X, DMD_BIG_CY_Bot, sprintf_buffer); + + dmd_show_low (); + task_sleep (TIME_200MS); + + demotime_display_counter++; + if (demotime_display_counter >= 30) demotime_display_counter = 0; + if (demotime_display_counter % 10 == 0) { if (TOGGLE) TOGGLE = FALSE; else TOGGLE = TRUE; }//change TOGGLE once per second + }//END OF ENDLESS LOOP +}//end of function + diff --git a/machine/dm/dm.md b/machine/dm/dm.md new file mode 100644 index 000000000..3858f7b50 --- /dev/null +++ b/machine/dm/dm.md @@ -0,0 +1,951 @@ +#-------------------------------------------------------------------------- +# Demolition Man Machine description for FreeWPC +# See tools/genmachine for more information about the format of this file. +#-------------------------------------------------------------------------- +# This file describes many characteristics of a pinball machine, +# mostly physical stuff, although some rules can be coded here also. +#-------------------------------------------------------------------------- +########################################################################## +# General section (before a [section] header is given. +# Miscellaneous parameters are specified here. +########################################################################## +Title: Demolition Time +#the following tags are required because the wpc-dcs md is not finished +DMD: Yes +Fliptronic: Yes +DCS: Yes +WPC95: No + +Lamp-Matrix-Width: 18 +Lamp-Matrix-Height: 34 + + + + + +########################################################################## +# Include standard definitions that apply to all WPC games. +########################################################################## +include platform/wpc/wpc-dcs.md + + + + + +########################################################################## +# Use 'define' to emit a plain #define for anything not covered by +# some other means. +########################################################################## +define MACHINE_HAS_FLIPPER_GUN_HANDLES +define MACHINE_HAS_UPPER_LEFT_FLIPPER +define MACHINE_BALL_SAVE_TIME 7 +define MACHINE_MAX_BALLS 5 +define MACHINE_CUSTOM_AMODE +define MACHINE_AMODE_EFFECTS +define AUTOFIRE_DELAY 20 +define MACHINE_DEMO_MAN +define END_GAME_ON_TEST_ENTER +define DEMO_MAN_BALL_SAVE_EFFECT +define DEMO_MAN_PLUNGE_BALL_EFFECT +#this means we have X sols below +define MACHINE_SOL_EXTBOARD1 +define MACHINE_BALL_SEARCH_TIME 10 +define MACHINE_ADD_CREDIT_SOUND PLONK + +define CONFIG_DIFFICULTY_LEVEL #add these to configuration menu +define CONFIG_DISABLE_CLAW + + +define MACHINE_VOLUME_CHANGE_MUSIC MUS_HIGH_SCORE + +#define LOWER_IMAGE_BRIGHTNESS1 +define LOWER_IMAGE_BRIGHTNESS2 + + +########################################################################## +# Lamp Description +# The key is given in column/row format. The first parameter must be +# the lamp name. Optionally you can specify a color, and x() and y() +# for the location on the playfield. Only a subset of lamp colors are +# recognized; see tools/genmachine for details. Lamp location is +# given in terms of the Lamp-Matrix-Width and Lamp-Matrix-Height. +########################################################################## +[lamps] +11: Ball Save, red, x(28), y(6) +12: Fortress Multiball, white, x(33), y(9) +13: Museum Multiball, white, x(31), y(9) +14: Cryoprison Multiball, white, x(29), y(9) +15: Wasteland Multiball, white, x(30), y(9) +16: Shoot Again, ball-save, red, x(34), y(9) +17: Access Claw, yellow, x(27), y(1) +18: Left Ramp Explode, yellow, x(22), y(9) +21: Right Ramp Jackpot, red, x(22), y(14) +22: Right Loop Explode, yellow, x(23), y(15) +23: Light Quick Freeze, yellow, x(27), y(15) +24: Freeze 4, white, x(26), y(14) +25: Claw Ready, yellow, x(25), y(12) +26: Freeze 3, white, x(28), y(12) +27: Freeze 2, white, x(28), y(6) +28: Freeze 1, white, x(26), y(2) +31: Right Loop Jackpot, red, x(21), y(16) +32: Standup 5, blue, x(19), y(15) +33: Right Ramp Arrow, red, x(19), y(14) +34: Left Ramp Jackpot, red, x(20), y(8) +35: Left Loop Jackpot, red, x(19), y(6) +36: Car Crash Top, yellow, x(20), y(2) +37: Standup 1, blue, x(21), y(5) +38: Car Crash Center, yellow, x(22), y(3) +41: Right Ramp Explode, yellow, x(23), y(14) +42: Right Ramp Car Chase, yellow, x(24), y(13) +43: Quick Freeze, yellow, x(24), y(10) +44: Left Ramp Car Chase, yellow, x(23), y(9) +45: Extra Ball, extra-ball, yellow, x(24), y(9) +46: Start Multiball, yellow, x(23), y(8) +47: Car Crash Bottom, yellow, x(23), y(4) +48: Left Loop Explode, yellow, x(22), y(7) +51: Underground Arrow, red, x(11), y(10) +52: Underground Jackpot, red, x(12), y(9) +53: Standup 2, blue, x(13), y(8) +54: Left Ramp Arrow, red, x(14), y(7) +55: Side Ramp Jackpot, red, x(16), y(9) +56: Side Ramp Arrow, red, x(15), y(9) +57: left Loop Arrow, red, x(14), y(4) +58: Center Ramp Jackpot, red, x(10), y(9) +61: Claw Capture Simon, red, x(1), y(7) +62: Claw Super Jets, red, x(3), y(6) +63: Claw Prison Break, red, x(4), y(5) +64: Claw Freeze, red, x(5), y(2) +65: Claw Acmag, red, x(5), y(1) +66: Middle Rollover, green, x(2), y(14) +67: Top Rollover, green, x(2), y(15) +68: Lower Rollover, green, x(2), y(17) +71: Super Jackpot, yellow, x(7), y(11) +72: Computer, blue, x(8), y(11) +73: Demo Time, yellow, x(9), y(11) +74: Not Used 1 +75: Not Used 2 +76: Standup 4, blue, x(18), y(13) +77: Standup 3, blue, x(17), y(10) +78: Retina Scan, yellow, x(23), y(1) +81: Center Ramp Middle, red, x(6), y(9) +82: Center Ramp Outer, red, x(6), y(8) +83: Center Ramp Inner, red, x(6), y(9) +84: Center Ramp Arrow, red, x(9), y(9) +85: Right Loop Arrow, red, x(16), y(18) +86: Buy In Button, buyin, cabinet, yellow, x(33), y(18) +87: Ball Launch, launch, cabinet, red, x(34), y(16) +88: Start Button, start, cabinet, yellow, x(1), y(1) + + + + + +########################################################################## +# Switch Description +# The key is in column/row format. The first parameter must be the switch +# name. Options can be given in any order: +# ingame - only service the switch during a game +# intest - also service the switch in test mode +# novalid - tripping this switch does NOT mark ball in play +# standup - this is a standup +# button - this is a button +# edge - this switch should be serviced on either transition +# opto - this switch is optical and activates on closed->open +# +# These parameters mark various well-known switches. Only one of these +# can exist per type: +# outhole, slam-tilt, tilt, shooter, start-button, buyin-button +# +# Use sound() to invoke a sound call automatically when the switch activates. +# Use lamp() to flicker a lamp automatically on activation. TODO: +# this requires the c_name, and not the friendly md name. +# Use c_decl() to override the default name of the switch event. +# +########################################################################## +[switches] +11: Launch Button, launch-button, cabinet, novalid +12: Left Handle Button, cabinet, novalid +13: Start Button, start-button, cabinet, intest, novalid, debounce(TIME_100MS) +14: Tilt, tilt, ingame, novalid, cabinet, sound(TILT) +15: Left Outlane, ingame +16: Left Inlane, ingame +17: Right Inlane, ingame +18: Right Outlane, ingame + +21: Slam Tilt, slam-tilt, ingame, novalid, cabinet, sound(TILT) +22: Coin Door Closed, novalid, cabinet +23: Buyin Button, buyin-button, cabinet, novalid +24: Always Closed, novalid +25: Claw Position 1, opto, noscore, novalid +26: Claw Position 2, opto, noscore, novalid +27: Shooter, shooter, noscore, novalid, edge +28: Not Used 1, novalid + +31: Trough 1, noscore, novalid, opto +32: Trough 2, noscore, novalid, opto +33: Trough 3, noscore, novalid, opto +34: Trough 4, noscore, novalid, opto +35: Trough 5, noscore, novalid, opto +36: Trough Jam, noscore, novalid, opto +37: Not Used 2, novalid +38: Standup 5, ingame, standup + +41: Left Sling, ingame, c_decl(sw_sling) +42: Right Sling, ingame, c_decl(sw_sling) +43: Left Jet, ingame, c_decl(sw_jet) +44: Top Sling, ingame, c_decl(sw_jet) +45: Right Jet, ingame, c_decl(sw_jet) +46: Right Ramp Enter, ingame +47: Right Ramp Exit, ingame +48: Right Freeway, ingame + +51: Left Ramp Enter, ingame +52: Left Ramp Exit, ingame +53: Center Ramp, ingame +54: Upper Rebound, ingame, novalid +55: Left Loop, ingame +56: Standup 2, standup, ingame +57: Standup 3, standup, ingame +58: Standup 4, standup, ingame + +61: Side Ramp Enter, ingame +62: Side Ramp Exit, ingame +63: Left Rollover, ingame +64: Center Rollover, ingame +65: Right Rollover, ingame +66: Eject, ingame +67: Elevator Index, opto, novalid +68: Not Used 3, novalid + +71: Chase Car 1, opto, novalid +72: Chase Car 2, opto, novalid +73: Top Popper, opto, edge, novalid, debounce(TIME_200MS) +74: Elevator Hold, opto, novalid +75: Not Used 4, novalid +76: Bottom Popper, opto, edge, , novalid, debounce(TIME_200MS) +77: Eyeball Standup, standup, ingame +78: Standup 1, standup, ingame + +81: Claw Capture Simon, ingame +82: Claw Super Jets, ingame +83: Claw Prison Break, ingame +84: Claw Freeze, ingame +85: Claw Acmag, ingame +86: Upper Left Flipper Gate, ingame +87: Car Chase Standup, ingame +88: Lower Rebound, ingame + + + + + +########################################################################## +# Drives +# This describes the names of the solenoid/motor drives. +# Hn = high power solenoids +# Ln = low power solenoids +# Gn = general purpose solenoids +# etc. +# +# The following options are supported: +# flash - this is a flasher (default is solenoid, flash implies nosearch) +# motor - this is a motor (default is solenoid) +# nosearch - do not activate this during ball search +# +# The following options denote well-known drives: +# knocker, ballserve, launch +# +########################################################################## +# THIS IS LIST IS SHOWN IN THE SAME ORDER AS THE SOLENOID/FLASHER TABLE +[drives] +#H = high power J130 +H1: BallServe, ballserve, duty(SOL_DUTY_100), time(TIME_133MS) +H2: Bottom Popper, time(TIME_133MS) +H3: Launch, launch, nosearch, duty(SOL_DUTY_100), time(TIME_133MS) +H4: Top Popper, time(TIME_100MS) +H5: Diverter Power, duty(SOL_DUTY_75) +H6: Not Used 1, nosearch +H7: Knocker, knocker, time(TIME_16MS), nosearch + +#L = low power J127 +L1: Left Sling, duty(SOL_DUTY_100) +L2: Right Sling, duty(SOL_DUTY_100) +L3: Left Jet, duty(SOL_DUTY_100) +L4: Top Sling, duty(SOL_DUTY_100) +L5: Right Jet, duty(SOL_DUTY_100) + +L6: Eject, duty(SOL_DUTY_75), time(TIME_66MS) +L7: Diverter Hold, nosearch +L8: : Not Used 2, nosearch + +# G = J126 on Power Driver Board +G1: Claw Flasher, flash, nosearch + +G2: Elevator Motor, motor, nosearch +G3: Claw Left, motor, nosearch +G4: Claw Right, motor, nosearch + +G5: Jets Flasher, flash, nosearch +G6: Side Ramp Flasher, flash, nosearch +G7: Left Ramp Up Flasher, flash, nosearch +G8: Left Ramp Lower Flasher, flash, nosearch + +# A = J122 +A1: Car Chase Center Flasher, flash, nosearch +A2: Car Chase Lower Flasher, flash, nosearch +A3: Right Ramp Flasher, flash, nosearch +A4: Eject Flasher, flash, nosearch + +# F = J902 on Fliptronic II +F1: L.R. Flip Power +F2: L.R. Flip Hold +F3: L.L. Flip Power +F4: L.L. Flip Hold +F5: Claw Magnet +F6: Not Used, nosearch +F7: U.L. Flip Power, time(TIME_33MS) +F8: U.L. Flip Hold, time(TIME_100MS) + +#X = J4 on 8 driver board +X1: Car Chase Upper Flasher, flash, nosearch +X2: Lower Rebound Flasher, flash, nosearch +X3: Eyeball Flasher, flash, nosearch +X4: Center Ramp Flasher, flash, nosearch +X5: Elevator 2 Flasher, flash, nosearch +X6: Elevator 1 Flasher, flash, nosearch +X7: Diverter Flasher, flash, nosearch +X8: Right Ramp Up Flasher, flash, nosearch + + + + + +########################################################################## +# templates +# This section contains template definitions for device drivers. +# For each device requiring a driver, it specifies the file that +# contains the template code, and any parameters for the specific +# device. +# +# some of the templates have auto generated function calls in them that you will +# use to start and stop the coil. For example divhold.ct creates functions +# self_start and self_stop, where self is the name of the diverter that you specify. +# +# look in the drivers directory for details on each driver +# the templates are autogenrated by ctemp in tools directory +# +# some notes on the various kinds of parameters +# +# note - spaces between parameters and arguments will cause crashes +# +# divhold +# mode --Set to 1 if the solenoids are fliptronic powered, 0 == normal +# power_pulse_ms --Durations of the pulse for the full power solenoid (in ms) must be divisible by the value used by the schedule_ms parameter +# schedule_ms --try 32 first as highest number, then experiment down from there +# +# spsol +# ontime - how long the coil is kept on +# offtime - how long the coil is kept off after it was fired, before polling the switch again. This prevents constant lock-on. +# auto - if nonzero, then automatically enable during start ball. +# +########################################################################## +[templates] +Left Sling: driver(sling), sw=SW_LEFT_SLING, sol=SOL_LEFT_SLING, ontime=3, offtime=16 +Right Sling: driver(sling), sw=SW_RIGHT_SLING, sol=SOL_RIGHT_SLING, ontime=3, offtime=16 +Left Jet: driver(jet), sw=SW_LEFT_JET, sol=SOL_LEFT_JET, ontime=3, offtime=16 +Right Jet: driver(jet), sw=SW_RIGHT_JET, sol=SOL_RIGHT_JET, ontime=3, offtime=16 +Top Sling: driver(jet), sw=SW_TOP_SLING, sol=SOL_TOP_SLING, ontime=3, offtime=16 +Diverter: driver(divhold), power_sol=SOL_DIVERTER_POWER, hold_sol=SOL_DIVERTER_HOLD, mode=0, power_pulse_ms=64, schedule_ms=32, includetest(yes) + +Elevator: driver(motorbank2), sol=SOL_ELEVATOR_MOTOR, up_sw_event=SW_ELEVATOR_HOLD, down_sw_event=SW_ELEVATOR_INDEX, initial_position=ELEVATOR_DOWN, includetest(yes) + +Claw: driver(bivar2), left_sol=SOL_CLAW_LEFT, right_sol=SOL_CLAW_RIGHT, left_sw=SW_CLAW_POSITION_1, right_sw=SW_CLAW_POSITION_2, includetest(yes) + +ClawMagnet: driver(magnet), sol=SOL_CLAW_MAGNET + + + + + +########################################################################## +# General Illumination +########################################################################## +[gi] +0: Backbox +1: U.Right Playfield +2: U.Left Playfield +3: L.Right Playfield +4: L.Left Playfield + + + + + +########################################################################## +# Tests +# These are additional test items that should appear in the TESTS menu. +########################################################################## +[tests] +diverter: #autogenerated-test, see defintion in [templates] section. +elevator: #autogenerated-test, see defintion in [templates] section. +claw: #autogenerated-test, see defintion in [templates] section. + + + + + +########################################################################## +# Lampsets +# These denote logical groupings of lamps. +# The key is a textual name for the set. The options specify which lamps +# are a part of that set. You can specify 1 or more lamp values, +# separated by commas, where each value can be: 1) a single lamp name, +# 2) another lampset name, already defined, or 3) a lamp range in the +# form lamp1..lampN. +# +# The special construct PF:function indicates that a Perl subroutine +# should be used to select and sort the lamps. Some functions are +# builtin to genmachine; others can be defined by you and included +# via the 'perlinclude' directive. +# +# Note that a lampset may contain only one lamp. The lampset is the +# unit of 'allocation' for a lamp effect. +########################################################################## +[lamplists] +Right Ramp Awards: Right Ramp Arrow, Right Ramp Jackpot, Right Ramp Explode, Right Ramp Car Chase, Claw Ready +Left Ramp Awards: Left Ramp Arrow, Left Ramp Jackpot, Left Ramp Explode, Left Ramp Car Chase, Quick Freeze +Right Loop Awards: Right Loop Arrow, Right Loop Jackpot, Right Loop Explode +Left Loop Awards: left Loop Arrow, Left Loop Jackpot, Left Loop Explode, Start Multiball, Extra Ball +Freeze: Freeze 1, Freeze 2, Freeze 3, Freeze 4 +Rollovers: Middle Rollover, Top Rollover, Lower Rollover +Multiballs: Fortress Multiball, Museum Multiball, Cryoprison Multiball, Wasteland Multiball +Claw: Claw Capture Simon, Claw Super Jets, Claw Prison Break, Claw Freeze, Claw Acmag +Underground Scoop: Underground Arrow, Underground Jackpot +Standups: Standup 1, Standup 2, Standup 3, Standup 4, Standup 5 +Center Ramp: Center Ramp Arrow, Center Ramp Middle, Center Ramp Outer, Center Ramp Inner, Center Ramp Jackpot +Side Ramp: Side Ramp Jackpot, Side Ramp Arrow +Inlanes: Access Claw, Light Quick Freeze +Car Crash: Car Crash Top, Car Crash Center, Car Crash Bottom + +Left Right: PF:lamp_sort_bottom_to_top +Right Left: PF:lamp_sort_top_to_bottom +Bottom Top: PF:lamp_sort_left_to_right +Top Bottom: PF:lamp_sort_right_to_left +#Circle Out: PF:lamp_sort_circle_out + +Amode All: Right Ramp Awards, Left Ramp Awards, Right Loop Awards, Left Loop Awards, Freeze, Rollovers, Multiballs, +Claw, Underground Scoop, Standups, Center Ramp, Inlanes, Car Crash +Amode Rand: Amode All + +#Red Lamps: COLOR:red +#White Lamps: COLOR:white +#Yellow Lamps: COLOR:yellow + + + + + +########################################################################## +# Containers +# These denote devices that can hold, count, and eject pinballs. +# The key is the name of the device. The first parameter is the name +# of the solenoid that kicks out a ball. The 'trough' parameter should +# be specified on the single trough device. The 'init_max_count' +# parameter should say how many balls are normally held in this device +# at startup. The remaining parameters are the names of the switches +# that count pinball, in front from entry to exit. +########################################################################## +[containers] +#name: solenoid, switch +Top Sol: Top Popper, Top Popper +Subway VUK: Bottom Popper, Bottom Popper +Trough: BallServe, init_max_count(5), Trough 1, Trough 2, Trough 3, Trough 4, Trough 5 + +Eyeball Eject: Eject, Eject + + + +########################################################################## +########################################################################## +########################################################################## +#------------------------------------------------------------------------ +# The remaining sections describe software aspects, and not the physical +# machine. +#------------------------------------------------------------------------ +########################################################################## +########################################################################## +########################################################################## + + + + + +########################################################################## +# Items for the Feature Adjustments menu. Parameters indicate the +# type of adjustment and the default value. +########################################################################## +[adjustments] + + + + + +########################################################################## +# Items for the Feature Audits menu. +########################################################################## +[audits] + + + + + +########################################################################## +# Sound calls for well-known events +########################################################################## +[system_sounds] + + + + + +########################################################################## +# Music calls for well-known events +########################################################################## +[system_music] + + + + + +########################################################################## +# A list of all scores needed by the game rules. +########################################################################## +[scores] +540: +1010: +5K: +5770: +10K: +25K: +50K: +75K: +100K: +150K: +200K: +250K: +500K: +750K: +1M: +2M: +3M: +4M: +5M: +6M: +7M: +8M: +9M: +10M: +11M: +12M: +13M: +15M: +20M: +25M: +30M: +35M: +40M: +45M: +50M: +100M: #used for score compare in bonus display + + + + + +########################################################################## +# The default high scores. Use GC to indicate the grand champion. +# The parameters are the initials followed by the score value. Periods +# may optionally be used to group digits, but they are not necessary. +# Commas _cannot_ be used for this purpose since they separate parameters. +########################################################################## +[highscores] + + + + + +########################################################################## +# Per-player bit flags. +# +#limit of 64 total +########################################################################## +[flags] +IS_ACMAG_RUNNING: +IS_CARCHASE_MODE_RUNNING: +IS_EXPLODE_MODE_RUNNING: +IS_COMPUTER_ACTIVATED: +IS_EXTRABALL_LIT: +IS_SUPERJETS_RUNNING: +IS_SUPER_JACKPOT_ACTIVATED: + +IS_COMBO_SIDERAMP_ACTIVATED: +IS_COMBO_LEFTRAMP_ACTIVATED: +IS_COMBO_RIGHTRAMP_ACTIVATED: +IS_COMBO_UNDER_ACTIVATED: +IS_COMBO_CENTERRAMP_ACTIVATED: +IS_COMBO_LEFTORB_ACTIVATED: +IS_COMBO_RIGHTORB_ACTIVATED: + +IS_CAPSIM_SIDERAMP_ACTIVATED: +IS_CAPSIM_LEFTRAMP_ACTIVATED: +IS_CAPSIM_RIGHTRAMP_ACTIVATED: +IS_CAPSIM_UNDER_ACTIVATED: +IS_CAPSIM_CENTERRAMP_ACTIVATED: +IS_CAPSIM_LEFTORB_ACTIVATED: +IS_CAPSIM_RIGHTORB_ACTIVATED: + +IS_UGROUND_ARROW_ACTIVATED: +IS_L_LOOP_ARROW_ACTIVATED: +IS_R_LOOP_ARROW_ACTIVATED: +IS_L_RAMP_ARROW_ACTIVATED: +IS_C_RAMP_ARROW_ACTIVATED: +IS_S_RAMP_ARROW_ACTIVATED: +IS_R_RAMP_ARROW_ACTIVATED: + +IS_UGROUND_JACKPOT_ACTIVATED: +IS_L_LOOP_JACKPOT_ACTIVATED: +IS_R_LOOP_JACKPOT_ACTIVATED: +IS_L_RAMP_JACKPOT_ACTIVATED: +IS_C_RAMP_JACKPOT_ACTIVATED: +IS_S_RAMP_JACKPOT_ACTIVATED: +IS_R_RAMP_JACKPOT_ACTIVATED: + +IS_CRYOCLAW_RUNNING: +IS_MULTIBALL_ENABLED: +IS_BALL_ON_CLAW: +IS_R_RAMP_CLAWREADY: +SKILLSHOT_ENABLED: +IS_PBREAK_RUNNING: +IS_FORTRESS_MB_RUNNING: + +IS_MUSEUM_MB_RUNNING: +IS_CRYOPRISON_MB_RUNNING: +IS_WASTELAND_MB_RUNNING: +IS_DEMOTIME_RUNNING: +IS_LRAMP_QUICKFREEZE_ACTIVATED: +IS_HUXLEY_RUNNING: +IS_DEMOTIME_IS_STARTING: + +IS_DEMOTIME_ENABLED: +IS_COMBOS_KILLED: +IS_COMBOS_RESTARTABLE: +KILL_NORMAL_EJECT: +CAPTURE_SIMON_INITIALSTART: +BACK_IN_THE_FRIDGE_ACTIVATED: +BACK_IN_THE_FRIDGE_RUNNING: + +VIDEO_MODE_RUNNING: +BACK_IN_THE_FRIDGE_ENDING: +VIDEO_MODE_ENABLED: +IS_CARCHASE_MODE_ENABLED: +IS_EXPLODE_MODE_ENABLED: +IS_HUXLEY_ENABLED: +LASER_SHOT_ENABLED: +LASER_SHOT_COMPLETED: + +#64 + + + + + +########################################################################## +# System-wide bit flags. +# +#limit of 32 total +########################################################################## +[globalflags] + + + + + +########################################################################## +# Fonts used in this game. +# these are in addition to default fonts +# default fonts do not have to be listed (they are declared under platform/wpc/wpc-common.md) and are: +# font_mono9 +# font_num5x7 +# font_fixed10 ---good only for very short words +# font_tinynum +# font_var5 ---small text messages +# font_fixed6 ---standups and standup frenzy +# font_fixed10 ---fortress MB +# font_cu17 ---good for large single letters only +# font_term6 ---car crash and car chase freeze and many smaller lines +# font_fixed10 ---capture simon +# font_bitmap8 +# +# The number at the end doesn't correspond to their point size like you would think. +# The best thing to do is look at the actual font in the development menu +# Here are others that are available - from the fonts directory +#lithograph: ---EXPLODE, amode title, ball save, shoot reminder +#v5prc: ---prison break +#steel: ---ACMAG + +#pcsenior: #---good only for very short words +#addlg: #---good only for very short words +#Adore64: #---good only for very short words, remember to drop the cap A when using this in your code +#ffextra: #---these are not letters, but symbols, like wingdings +#times10: +#arcadepi: +#micron55: +#pixchicago: +#px_sans_nouveaux: +#twizone: +#uni05_54: +#uni05_63: +#uni05_64: +#xpaiderp: +#fixed12: +#arial11b: +#emulogic +#nayupixel10: +#quadrit: +#arial11a: +#antiqua: +#abstract: +#c64: #---similar to amiga4ever +#pixelmix: +#hellovetica: + + +###problems with these +#utopia: ---looks garbled +#schu: ---looks garbled +#joystix: ---don't show +#ambitsek: ---don't show +#uni05_53: +#v5prd: +#v5prf: +#bitmap: +#arial11: +#miscfixed: +#luctype: +########################################################################## +#can pick, at most, 4 to 10 extra fonts, depending on file size, outside of the system fonts without +#receiving compile errors for overflowing the fonts page +# +#FYI: to allow more fonts, I deleted some of the system fonts +########################################################################## +[fonts] +v5prc: +lithograph: +steel: +fipps: +bitoutline: +bitcube10: +fireball: +antiqua: + + + + +########################################################################## +# Display effects -- text page (?) +########################################################################## +[deffs] +superjets effect: PRI_GAME_MODE1, D_QUEUED +superjets hit effect: PRI_GAME_QUICK6, D_RESTARTABLE + + +########################################################################## +# Display effects -- common page (?) +########################################################################## +#check generic.md for stuff I stuck on the common page because I ran out of room + +########################################################################## +# Display effects -- page 1 (56) +########################################################################## +clw inlanes effect: page(MACHINE_PAGE), PRI_GAME_LOW6, D_QUEUED+D_TIMEOUT +qf inlanes effect: page(MACHINE_PAGE), PRI_GAME_LOW6, D_QUEUED+D_TIMEOUT + +rollovers effect: page(MACHINE_PAGE), PRI_GAME_LOW5, D_RESTARTABLE +all rollovers effect: page(MACHINE_PAGE), PRI_GAME_QUICK5 + + +standupfrenzy start effect: page(MACHINE_PAGE), PRI_GAME_MODE3 +standupfrenzy effect: page(MACHINE_PAGE), PRI_GAME_MODE2, D_QUEUED +standup effect: page(MACHINE_PAGE), PRI_GAME_LOW4 + +acmag start effect: page(MACHINE_PAGE), PRI_GAME_MODE3 +acmag effect: page(MACHINE_PAGE), PRI_GAME_MODE2, D_QUEUED +acmag hit effect: page(MACHINE_PAGE), PRI_GAME_QUICK4, D_RESTARTABLE + +startup effect: page(MACHINE_PAGE), PRI_BALL_LAUNCH_MENU, D_QUEUED + +cryoclaw effect: page(MACHINE_PAGE), PRI_GAME_MODE2, D_QUEUED + + + +########################################################################## +# Display effects -- page 2 (55) +########################################################################## +car chase start effect: page(MACHINE2_PAGE), PRI_GAME_MODE3 +car chase effect: page(MACHINE2_PAGE), PRI_GAME_MODE2, D_QUEUED +car chase hit effect: page(MACHINE2_PAGE), PRI_GAME_QUICK5, D_RESTARTABLE + +demotime start effect: page(MACHINE2_PAGE), PRI_SCORES_IMPORTANT, D_QUEUED +demotime jackpot effect: page(MACHINE2_PAGE), PRI_JACKPOT, D_QUEUED+D_RESTARTABLE +demotime info effect: page(MACHINE2_PAGE), PRI_GAME_MODE2, D_QUEUED +demotime effect: page(MACHINE2_PAGE), PRI_MULTIBALL + +explode start effect: page(MACHINE2_PAGE), PRI_GAME_MODE3 +explode effect: page(MACHINE2_PAGE), PRI_GAME_MODE2, D_QUEUED +explode hit effect: page(MACHINE2_PAGE), PRI_GAME_QUICK4, D_RESTARTABLE + +troubleshooting: page(MACHINE2_PAGE), PRI_SCORES_IMPORTANT, D_QUEUED +shoot again: page(MACHINE2_PAGE), PRI_SCORES_IMPORTANT, D_QUEUED + +huxley info effect: page(MACHINE2_PAGE), PRI_GAME_QUICK7, D_QUEUED+D_RESTARTABLE +huxley start effect: page(MACHINE2_PAGE), PRI_GAME_MODE3 +huxley effect: page(MACHINE2_PAGE), PRI_GAME_MODE2, D_QUEUED +huxley hit effect: page(MACHINE2_PAGE), PRI_GAME_QUICK4, D_RESTARTABLE + +underground effect: page(MACHINE2_PAGE), PRI_GAME_LOW5 +computer award: page(MACHINE2_PAGE), PRI_GAME_QUICK6 + + + + + +########################################################################## +# Display effects -- page 3 (54) +########################################################################## +bonus: page(MACHINE3_PAGE), PRI_BONUS, D_QUEUED + +capture simon start effect: page(MACHINE3_PAGE), PRI_GAME_MODE3 +capture simon effect: page(MACHINE3_PAGE), PRI_GAME_MODE2, D_QUEUED +capture simon hit effect: page(MACHINE3_PAGE), PRI_GAME_QUICK4, D_RESTARTABLE +capture simon end effect: page(MACHINE3_PAGE), PRI_GAME_QUICK5, D_QUEUED + +prison break start effect: page(MACHINE3_PAGE), PRI_GAME_MODE3 +prison break effect: page(MACHINE3_PAGE), PRI_GAME_MODE2, D_QUEUED +prison break hit effect: page(MACHINE3_PAGE), PRI_GAME_QUICK4, D_RESTARTABLE + +fortress start effect: page(MACHINE3_PAGE), PRI_SCORES_IMPORTANT, D_QUEUED +fortress jackpot effect: page(MACHINE3_PAGE), PRI_JACKPOT, D_QUEUED+D_RESTARTABLE +fortress effect: page(MACHINE3_PAGE), PRI_MULTIBALL +fortress super jackpot: page(MACHINE3_PAGE), PRI_SUPER_JACKPOT, D_QUEUED+D_RESTARTABLE + +freeze effect: page(MACHINE3_PAGE), PRI_GAME_QUICK7, D_QUEUED + +wasteland start effect: page(MACHINE3_PAGE), PRI_SCORES_IMPORTANT, D_QUEUED +wasteland jackpot effect: page(MACHINE3_PAGE), PRI_JACKPOT, D_QUEUED+D_RESTARTABLE +wasteland effect: page(MACHINE3_PAGE), PRI_MULTIBALL +wasteland super jackpot: page(MACHINE3_PAGE), PRI_SUPER_JACKPOT, D_QUEUED+D_RESTARTABLE + + + + + +########################################################################## +# Display effects -- page 4 (53) +########################################################################## +top popper effect: page(MACHINE4_PAGE), PRI_GAME_LOW5 +extra ball effect: page(MACHINE4_PAGE), PRI_GAME_QUICK5, D_QUEUED + +sg intro: page(MACHINE4_PAGE), PRI_VIDEO_MODE, D_QUEUED +sg: page(MACHINE4_PAGE), PRI_VIDEO_MODE, D_QUEUED+D_RESTARTABLE +sg end: page(MACHINE4_PAGE), PRI_VIDEO_MODE, D_QUEUED + +#retina scan effect at eject.c +eject effect: page(MACHINE4_PAGE), PRI_GAME_LOW5, D_NORMAL + +kaboom: page(MACHINE4_PAGE), PRI_VIDEO_MODE, D_QUEUED+D_RESTARTABLE +kaboom intro: page(MACHINE4_PAGE), PRI_VIDEO_MODE, D_QUEUED +kaboom end: page(MACHINE4_PAGE), PRI_VIDEO_MODE, D_QUEUED + +bitf start effect: page(MACHINE4_PAGE), PRI_SCORES_IMPORTANT, D_QUEUED +bitf hit effect: page(MACHINE4_PAGE), PRI_JACKPOT, D_QUEUED+D_RESTARTABLE +bitf info effect: page(MACHINE4_PAGE), PRI_GAME_MODE2, D_QUEUED +bitf effect: page(MACHINE4_PAGE), PRI_MULTIBALL +bitf end effect: page(MACHINE4_PAGE), PRI_SCORES_IMPORTANT, D_QUEUED + + + + +########################################################################## +# Display effects -- page 5 (52) +########################################################################## +eyeball effect: page(MACHINE5_PAGE), PRI_GAME_LOW2, D_QUEUED + +cryoprison start effect: page(MACHINE5_PAGE), PRI_SCORES_IMPORTANT, D_QUEUED +cryoprison jackpot effect: page(MACHINE5_PAGE), PRI_JACKPOT, D_QUEUED+D_RESTARTABLE +cryoprison effect: page(MACHINE5_PAGE), PRI_MULTIBALL +cryoprison super jackpot: page(MACHINE5_PAGE), PRI_SUPER_JACKPOT, D_QUEUED+D_RESTARTABLE + +museum start effect: page(MACHINE5_PAGE), PRI_SCORES_IMPORTANT, D_QUEUED +museum jackpot effect: page(MACHINE5_PAGE), PRI_JACKPOT, D_QUEUED+D_RESTARTABLE +museum effect: page(MACHINE5_PAGE), PRI_MULTIBALL +museum super jackpot: page(MACHINE5_PAGE), PRI_SUPER_JACKPOT, D_QUEUED+D_RESTARTABLE + +skillshot: page(MACHINE5_PAGE), PRI_SPECIAL + +combo effect: page(MACHINE5_PAGE), PRI_GAME_LOW2, D_QUEUED+D_RESTARTABLE +vm effect: page(MACHINE5_PAGE), PRI_GAME_LOW2, D_PAUSE+D_QUEUED + +carcrash effect: page(MACHINE5_PAGE), PRI_GAME_QUICK1 + +laser shot: page(MACHINE5_PAGE), PRI_GAME_QUICK1 + + +########################################################################## +# Lamp effects +########################################################################## +[leffs] +#flashers only +lower rebound: shared, PRI_LEFF2 +upper rebound: shared, PRI_LEFF2 +skillshot: shared, PRI_LEFF2, page(MACHINE5_PAGE) +eyeball: shared, PRI_LEFF2, page(MACHINE5_PAGE) +top popper: shared, PRI_LEFF2, page(MACHINE4_PAGE) +huxley: shared, PRI_LEFF2, page(MACHINE2_PAGE) +left ramp: shared, PRI_LEFF2 +right ramp: shared, PRI_LEFF2 +center ramp: shared, PRI_LEFF2 +side ramp: shared, PRI_LEFF2 + + +#lamps +orbits runner: shared, PRI_LEFF1, LAMPS(LEFT_LOOP_AWARDS), page(MACHINE5_PAGE) +car crash runner: PRI_LEFF1, LAMPS(CAR_CRASH), page(MACHINE5_PAGE) +inlane quick freeze: shared, PRI_LEFF1, LAMPS(LEFT_RAMP_AWARDS), page(MACHINE_PAGE) +inlane cryoclaw: shared, PRI_LEFF1, LAMPS(RIGHT_RAMP_AWARDS), page(MACHINE_PAGE) +ramp quickfreeze: shared, PRI_LEFF1, LAMPS(LEFT_RAMP_AWARDS) +ramp clawready: shared, PRI_LEFF1, LAMPS(RIGHT_RAMP_AWARDS) + +eject: shared, PRI_LEFF2, page(MACHINE4_PAGE) +Underground: shared, PRI_LEFF2, LAMPS(UNDERGROUND_SCOOP), page(MACHINE2_PAGE) +claw: shared, PRI_LEFF2, page(MACHINE_PAGE) + +freeze: PRI_LEFF3, LAMPS(AMODE_ALL), page(MACHINE3_PAGE) +extraball: PRI_LEFF3, LAMPS(AMODE_ALL), page(MACHINE4_PAGE) +computer award: PRI_LEFF3, LAMPS(AMODE_ALL), page(MACHINE2_PAGE) +shoot again: PRI_LEFF3, LAMPS(AMODE_ALL), page(MACHINE2_PAGE) +flash all: PRI_LEFF3, LAMPS(AMODE_ALL), page(MACHINE3_PAGE) +bot2top: PRI_LEFF3, LAMPS(AMODE_ALL), page(MACHINE3_PAGE) +top2bot: PRI_LEFF3, LAMPS(AMODE_ALL), page(MACHINE3_PAGE) +right2left: PRI_LEFF3, LAMPS(AMODE_ALL), page(MACHINE3_PAGE) +left2right: PRI_LEFF3, LAMPS(AMODE_ALL), page(MACHINE3_PAGE) + +Amode: runner, PRI_LEFF1, LAMPS(AMODE_ALL), GI(ALL), page(MACHINE5_PAGE) + + +#gi +gi cycle: PRI_LEFF1, GI(ALL), page(MACHINE3_PAGE) +no gi onesec: PRI_LEFF1, GI(ALL), page(MACHINE3_PAGE) +no gi twosec: PRI_LEFF1, GI(ALL), page(MACHINE3_PAGE) +turn off gi: PRI_LEFF1, GI(ALL), page(MACHINE3_PAGE) +turn on gi: PRI_LEFF1, GI(ALL), page(MACHINE3_PAGE) +flash gi: PRI_LEFF1, GI(ALL), page(MACHINE3_PAGE) diff --git a/machine/dm/dm_amode.c b/machine/dm/dm_amode.c new file mode 100644 index 000000000..b6f7b4de4 --- /dev/null +++ b/machine/dm/dm_amode.c @@ -0,0 +1,466 @@ +/* + * demolition man + * dm_amode.c + * + * written by James Cardona + * - some code liberally borrowed from tz + * + * this is a custom attract mode + * + * dmd_sched_transition (&transition type); + * + * transition types are as follows: + * trans_scroll_up --fastest + * trans_scroll_up_avg + * trans_scroll_up_slow + * + * trans_scroll_down + * trans_scroll_down_avg + * trans_scroll_down_slow + * + * trans_scroll_left --slowest + * 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 + * + */ + +/* CALLSET_SECTION (dm_amode, __machine5__) */ + +#include +#include "dm/global_constants.h" + + +U8 alternator; + +/**************************************************************************** + * lighting effects + ***************************************************************************/ +U8 lamplist; + +static void amode_leff1 (void) { + register U8 my_lamplist = lamplist; + lamplist_set_apply_delay (TIME_133MS); + for (;;) + lamplist_apply (my_lamplist, leff_toggle); +}//end of function + + + +void amode_leff (void) { + gi_leff_enable (PINIO_GI_STRINGS); + for (lamplist = LAMPLIST_RIGHT_RAMP_AWARDS; lamplist <= LAMPLIST_CAR_CRASH; lamplist++) { + leff_create_peer (amode_leff1); + task_sleep (TIME_133MS); + }//END OF LOOP + task_exit (); +}//end of function + + +/**************************************************************************** + * display effects + ***************************************************************************/ +void dm_amode_animation_display_effect (U16 start_frame, U16 end_frame){ + U16 fno; + for (fno = start_frame; fno <= end_frame; fno += 2) { + dmd_alloc_pair (); + frame_draw(fno); + dmd_show2 (); + task_sleep (TIME_100MS); + }//end of inner loop +} + + + +void dm_amode_animation_display_effect_reverse (U16 start_frame, U16 end_frame){ + U16 fno; + for (fno = start_frame; fno >= end_frame; fno -= 2) { + dmd_alloc_pair (); + frame_draw(fno); + dmd_show2 (); + task_sleep (TIME_100MS); + }//end of inner loop +} + + + + +void dm_amode_frame_bitfade_fast (U16 frame){ + dmd_sched_transition (&trans_bitfade_fast); + dmd_alloc_pair (); + frame_draw(frame); + dmd_show2 (); + task_sleep (TIME_100MS); +} + + + + +void show_john_spartan_animation(void) { + dmd_alloc_pair_clean (); // Clean both pages + dm_amode_animation_display_effect (IMG_FORTRESS_D1_START, IMG_FORTRESS_D1_END); + dm_amode_frame_bitfade_fast(IMG_FORTRESS_D2_START); + dm_amode_animation_display_effect (IMG_FORTRESS_D2_START, IMG_FORTRESS_D2_END); + dm_amode_frame_bitfade_fast(IMG_FORTRESS_D3_START); + dm_amode_animation_display_effect (IMG_FORTRESS_D3_START, IMG_FORTRESS_D4_END); + + dmd_alloc_pair_clean ();// Clean both pages + dmd_map_overlay (); + dmd_clean_page_low (); + font_render_string_center (&font_steel, DMD_MIDDLE_X - 20, DMD_BIG_CY_Top, "JOHN"); + font_render_string_center (&font_steel, DMD_MIDDLE_X - 20, DMD_BIG_CY_Bot, "SPARTAN"); + dmd_text_outline (); + dmd_alloc_pair (); + frame_draw(IMG_FORTRESS_D4_END); + dmd_overlay_outline (); + dmd_show2 (); + task_sleep(TIME_2S); +}//end of mode_effect_deff + + +void show_john_spartan2_animation(void) { + dmd_alloc_pair_clean ();// Clean both pages + dm_amode_animation_display_effect_reverse (IMG_JOHN_SPARTAN_A_END, IMG_JOHN_SPARTAN_A_START); + + dm_amode_animation_display_effect (IMG_JOHN_SPARTAN_A_START, IMG_JOHN_SPARTAN_A_END); + dmd_map_overlay (); + dmd_clean_page_low (); + font_render_string_center (&font_steel, DMD_MIDDLE_X + 25, DMD_BIG_CY_Top, "JOHN"); + font_render_string_center (&font_steel, DMD_MIDDLE_X + 25, DMD_BIG_CY_Bot, "SPARTAN"); + dmd_text_outline (); + dmd_alloc_pair (); + frame_draw(IMG_JOHN_SPARTAN_A_END); + dmd_overlay_outline (); + dmd_show2 (); + task_sleep(TIME_2S); +}//end of mode_effect_deff + + + +void show_simon_phoenix_animation(void) { + dmd_alloc_pair_clean (); dm_amode_animation_display_effect (IMG_SIMON_B_START, IMG_SIMON_B_END); + dm_amode_animation_display_effect (IMG_SIMON_C_START, IMG_SIMON_C_END); + + dmd_alloc_pair_clean ();// Clean both pages + dmd_map_overlay (); + dmd_clean_page_low (); + font_render_string_center (&font_steel, DMD_MIDDLE_X - 20, DMD_BIG_CY_Top, "SIMON"); + font_render_string_center (&font_steel, DMD_MIDDLE_X - 30, DMD_BIG_CY_Bot, "PHOENIX"); + dmd_text_outline (); + dmd_alloc_pair (); + frame_draw(IMG_SIMON_C_END); + dmd_overlay_outline (); + dmd_show2 (); + task_sleep(TIME_2S); +}//end of mode_effect_deff + + + +void show_simon_phoenix2_animation(void) { + dmd_alloc_pair_clean (); dm_amode_animation_display_effect (IMG_MUSEUM_D1_START, IMG_MUSEUM_D1_END); + dm_amode_frame_bitfade_fast(IMG_MUSEUM_C2_START); + dm_amode_animation_display_effect (IMG_MUSEUM_C2_START, IMG_MUSEUM_C2_END); + dm_amode_frame_bitfade_fast(IMG_MUSEUM_D3_START); + dm_amode_animation_display_effect (IMG_MUSEUM_D3_START, IMG_MUSEUM_D3_END); + dm_amode_animation_display_effect (IMG_MUSEUM_D3_START, IMG_MUSEUM_D3_END); + dm_amode_animation_display_effect (IMG_MUSEUM_D3_START, IMG_MUSEUM_D3_END); + dm_amode_animation_display_effect (IMG_MUSEUM_D3_START, IMG_MUSEUM_D3_END); + + dmd_alloc_pair_clean ();// Clean both pages + dmd_map_overlay (); + dmd_clean_page_low (); + font_render_string_center (&font_steel, DMD_MIDDLE_X - 20, DMD_BIG_CY_Top, "SIMON"); + font_render_string_center (&font_steel, DMD_MIDDLE_X - 30, DMD_BIG_CY_Bot, "PHOENIX"); + dmd_text_outline (); + dmd_alloc_pair (); + frame_draw(IMG_MUSEUM_D3_END); + dmd_overlay_outline (); + dmd_show2 (); + task_sleep(TIME_2S); +}//end of mode_effect_deff + + + +void show_assoc_bob_animation(void) { + dmd_alloc_pair_clean (); + dm_amode_animation_display_effect (IMG_ASSOC_BOB_START, IMG_ASSOC_BOB_END); + dm_amode_animation_display_effect_reverse (IMG_ASSOC_BOB_END, IMG_ASSOC_BOB_START); + dm_amode_animation_display_effect (IMG_ASSOC_BOB_START, IMG_ASSOC_BOB_END); + + dmd_alloc_pair_clean ();// Clean both pages + dmd_map_overlay (); + dmd_clean_page_low (); + font_render_string_center (&font_steel, DMD_MIDDLE_X - 20, DMD_BIG_CY_Top, "ASSOCIATE"); + font_render_string_center (&font_steel, DMD_MIDDLE_X - 30, DMD_BIG_CY_Bot, "BOB"); + dmd_text_outline (); + dmd_alloc_pair (); + frame_draw(IMG_ASSOC_BOB_END); + dmd_overlay_outline (); + dmd_show2 (); + task_sleep(TIME_2S); +}//end of mode_effect_deff + + + + +void show_chief_earle_animation(void) { + dmd_alloc_pair_clean (); + dm_amode_animation_display_effect (IMG_CHIEF_EARLE2_START, IMG_CHIEF_EARLE2_END); + dm_amode_animation_display_effect_reverse (IMG_CHIEF_EARLE2_END, IMG_CHIEF_EARLE2_START); + dm_amode_animation_display_effect (IMG_CHIEF_EARLE2_START, IMG_CHIEF_EARLE2_END); + + dmd_alloc_pair_clean ();// Clean both pages + dmd_map_overlay (); + dmd_clean_page_low (); + font_render_string_center (&font_steel, DMD_MIDDLE_X - 20, DMD_BIG_CY_Top, "CHIEF"); + font_render_string_center (&font_steel, DMD_MIDDLE_X - 30, DMD_BIG_CY_Bot, "EARLE"); + dmd_text_outline (); + dmd_alloc_pair (); + frame_draw(IMG_CHIEF_EARLE2_END); + dmd_overlay_outline (); + dmd_show2 (); + task_sleep(TIME_2S); +}//end of mode_effect_deff + + + + +void show_cocteau_animation(void) { + dmd_alloc_pair_clean (); + dm_amode_animation_display_effect (IMG_DR_COCTEAU_B_START, IMG_DR_COCTEAU_B_END); + dm_amode_animation_display_effect_reverse (IMG_DR_COCTEAU_B_END, IMG_DR_COCTEAU_B_START); + dm_amode_animation_display_effect (IMG_DR_COCTEAU_B_START, IMG_DR_COCTEAU_B_END); + + dmd_alloc_pair_clean ();// Clean both pages + dmd_map_overlay (); + dmd_clean_page_low (); + font_render_string_center (&font_steel, DMD_MIDDLE_X - 20, DMD_BIG_CY_Top, "DR"); + font_render_string_center (&font_steel, DMD_MIDDLE_X - 30, DMD_BIG_CY_Bot, "COCTEAU"); + dmd_text_outline (); + dmd_alloc_pair (); + frame_draw(IMG_DR_COCTEAU_B_END); + dmd_overlay_outline (); + dmd_show2 (); + task_sleep(TIME_2S); +}//end of mode_effect_deff + + + + + +void show_lenina1_animation(void) { + dmd_alloc_pair_clean (); + dm_amode_animation_display_effect (IMG_HUXLEY_A_START, IMG_HUXLEY_A_END); + dm_amode_frame_bitfade_fast(IMG_HUXLEY_B1_START); + dm_amode_animation_display_effect (IMG_HUXLEY_B1_START, IMG_HUXLEY_B1_END); + dm_amode_frame_bitfade_fast(IMG_HUXLEY_B2_START); + dm_amode_animation_display_effect (IMG_HUXLEY_B2_START, IMG_HUXLEY_B2_END); + + dmd_alloc_pair_clean ();// Clean both pages + dmd_map_overlay (); + dmd_clean_page_low (); + font_render_string_center (&font_steel, DMD_MIDDLE_X - 30, DMD_BIG_CY_Top, "LENINA"); + font_render_string_center (&font_steel, DMD_MIDDLE_X - 30, DMD_BIG_CY_Bot, "HUXLEY"); + dmd_text_outline (); + dmd_alloc_pair (); + frame_draw(IMG_HUXLEY_B2_END); + dmd_overlay_outline (); + dmd_show2 (); + task_sleep(TIME_2S); +}//end of mode_effect_deff + + + +void show_lenina2_animation(void) { + dmd_alloc_pair_clean (); + dm_amode_animation_display_effect (IMG_HUXLEY_D_START, IMG_HUXLEY_D_END); + dm_amode_frame_bitfade_fast(IMG_HUXLEY_E_START); + dm_amode_animation_display_effect (IMG_HUXLEY_E_START, IMG_HUXLEY_E_END); + + dmd_alloc_pair_clean ();// Clean both pages + dmd_map_overlay (); + dmd_clean_page_low (); + font_render_string_center (&font_steel, DMD_MIDDLE_X - 30, DMD_BIG_CY_Top, "LENINA"); + font_render_string_center (&font_steel, DMD_MIDDLE_X - 30, DMD_BIG_CY_Bot, "HUXLEY"); + dmd_text_outline (); + dmd_alloc_pair (); + frame_draw(IMG_HUXLEY_E_END); + dmd_overlay_outline (); + dmd_show2 (); + task_sleep(TIME_2S); +}//end of mode_effect_deff + + + +void show_huxley_info (void) { + dmd_alloc_pair_clean (); + dm_amode_animation_display_effect (IMG_HUXLEY_B1_START, IMG_HUXLEY_B1_END); + dm_amode_frame_bitfade_fast(IMG_HUXLEY_B2_START); + dm_amode_animation_display_effect (IMG_HUXLEY_B2_START, IMG_HUXLEY_B2_END); + task_sleep_sec (1); + dmd_sched_transition (&trans_scroll_down); + dmd_clean_page_low (); + font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_SMALL_CY_1, "START 4 NON-CLAW"); + font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_SMALL_CY_2, "MODES FOR"); + font_render_string_center (&font_fipps, DMD_MIDDLE_X, DMD_BIG_CY_Bot, "HUXLEY"); + dmd_show_low(); + task_sleep_sec (3); +}//end of mode_effect_deff + + + + + +void show_rollovers1_info (void) { + dmd_alloc_pair_clean (); + dm_amode_animation_display_effect (IMG_CAPSIMON_C_START, IMG_CAPSIMON_C_END); + task_sleep_sec (1); + dmd_sched_transition (&trans_scroll_down); + dmd_clean_page_low (); + font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_SMALL_CY_1, "LIGHT ALL M T L"); + font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_SMALL_CY_2, "ROLLOVERS"); + font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_SMALL_CY_3, "TO"); + font_render_string_center (&font_bitcube10, DMD_MIDDLE_X, DMD_SMALL_CY_4, "LIGHT CRYOCLAW"); + dmd_show_low(); + task_sleep_sec (3); +}//end of mode_effect_deff + + + + +void show_standups_info (void) { + dmd_alloc_pair_clean (); + dm_amode_animation_display_effect (IMG_WASTELAND_A1_START, IMG_WASTELAND_A1_END); + dm_amode_frame_bitfade_fast(IMG_WASTELAND_A2_START); + dm_amode_animation_display_effect (IMG_WASTELAND_A2_START, IMG_WASTELAND_A2_END); + task_sleep_sec (1); + dmd_sched_transition (&trans_scroll_down); + dmd_clean_page_low (); + font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_SMALL_CY_1, "HIT STANDUPS"); + font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_SMALL_CY_3, "TO"); + font_render_string_center (&font_bitcube10, DMD_MIDDLE_X, DMD_SMALL_CY_4, "LIGHT QUICK FREEZE"); + dmd_show_low(); + task_sleep_sec (3); +}//end of mode_effect_deff + + + +void show_demotime_info (void) { + dmd_alloc_pair_clean (); + dm_amode_animation_display_effect (IMG_FIGHT_A_START, IMG_FIGHT_A_END); + task_sleep_sec (1); + + dmd_sched_transition (&trans_scroll_down); + dmd_clean_page_low (); + font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_SMALL_CY_1, "START 5"); + font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_SMALL_CY_2, "CLAW MODES"); + font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_SMALL_CY_3, "FOR"); + font_render_string_center (&font_bitcube10, DMD_MIDDLE_X, DMD_SMALL_CY_4, "DEMOLITION TIME"); + dmd_show_low(); + task_sleep_sec (3); +}//end of mode_effect_deff + + + + + + + + + + +CALLSET_ENTRY (dm_amode, amode_page) { + U8 numOfAlts = 4; + alternator++; + dmd_clean_page_low (); + font_render_string_center (&font_steel, 64, 7, "DEMOLITION"); + font_render_string_center (&font_steel, 64, 22, "TIME"); + dmd_show_low (); + task_sleep(TIME_4S); + + if (alternator % numOfAlts == 0) { + dmd_sched_transition (&trans_scroll_right); + show_john_spartan_animation (); + + } else if (alternator % numOfAlts == 1) { + dmd_sched_transition (&trans_scroll_right); + show_assoc_bob_animation(); + + } else if (alternator % numOfAlts == 2) { + dmd_sched_transition (&trans_scroll_left); + show_john_spartan2_animation (); + + } else if (alternator % numOfAlts == 3) { + dmd_sched_transition (&trans_scroll_left); + show_lenina1_animation(); + } + + dmd_sched_transition (&trans_bitfade_slow); + dmd_clean_page_low (); + font_render_string_center (&font_term6, 64, 7, "GAME RULES BY"); + font_render_string_center (&font_lithograph, 64, 20, "CARDONA"); + dmd_show_low (); + task_sleep(TIME_2S); + + dmd_sched_transition (&trans_scroll_up_slow); + dmd_clean_page_low (); + font_render_string_center (&font_lithograph, 64, 7, "DOTS BY"); + font_render_string_center (&font_term6, 64, 20, "SJI"); + dmd_show_low (); + task_sleep(TIME_2S); + + if (alternator % numOfAlts == 0) { + dmd_sched_transition (&trans_scroll_right); + show_simon_phoenix_animation (); + + } else if (alternator % numOfAlts == 1) { + dmd_sched_transition (&trans_scroll_left); + show_cocteau_animation(); + + } else if (alternator % numOfAlts == 2) { + dmd_sched_transition (&trans_scroll_right); + show_simon_phoenix2_animation (); + + } else if (alternator % numOfAlts == 3) { + dmd_sched_transition (&trans_scroll_left); + show_chief_earle_animation(); + } + + dmd_sched_transition (&trans_bitfade_slow); + dmd_clean_page_low (); + font_render_string_center (&font_steel, 64, 7, "DEMOLITION"); + font_render_string_center (&font_steel, 64, 22, "TIME"); + dmd_show_low (); + task_sleep(TIME_4S); + + if (alternator % numOfAlts == 0) { + dmd_sched_transition (&trans_scroll_right); + show_huxley_info (); + + } else if (alternator % numOfAlts == 1) { + dmd_sched_transition (&trans_scroll_left); + show_rollovers1_info (); + + } else if (alternator % numOfAlts == 2) { + dmd_sched_transition (&trans_scroll_right); + show_standups_info (); + + } else if (alternator % numOfAlts == 3) { + dmd_sched_transition (&trans_scroll_left); + show_demotime_info (); + } + +}//end of function + diff --git a/machine/dm/eject.c b/machine/dm/eject.c new file mode 100644 index 000000000..9aeada8fe --- /dev/null +++ b/machine/dm/eject.c @@ -0,0 +1,260 @@ +/* + * demolition man + * eject.c + * + * written by James Cardona + * + * Location Description: + * Retina Scan: This is the leftmost shot of the game. The ball passes through a gate + * and into an eject that feeds the left inlane. + * If hit hard enough through the gate, it will hit the captive eyeball. + * + */ +/* CALLSET_SECTION (eject, __machine4__) */ + +#include +#include "dm/global_constants.h" +#include "search.h" + +//local variables +U8 eject_killer_counter; +U8 retina_scan_multiplier; +U8 ejectDeffCounter; +score_t temp_score; + +//external variables +extern __local__ U8 jet_shots_made;//external ref to eject.c + +//internally called function prototypes --external found at protos.h +void eject_reset (void); +void player_eject_reset (void); +void eject_killer_task (void); + + + +/**************************************************************************** + * initialize and exit + ***************************************************************************/ +void eject_reset (void) { + retina_scan_multiplier = 1; + flag_off(FLAG_KILL_NORMAL_EJECT); + +}//end of function + + +void player_eject_reset (void) { + eject_killer_counter = 0; + eject_reset (); + ejectDeffCounter = 0; +}//end of function + +CALLSET_ENTRY (eject, start_player) { player_eject_reset(); } +CALLSET_ENTRY (eject, start_ball) { eject_reset(); } + + + +/**************************************************************************** + * eject saucer + ****************************************************************************/ +//this is to prevent a retrigger of the eject switch as soon as ball exits +void eject_killer_task (void){ + task_sleep (TIME_2S); + eject_killer_counter = 0; + task_exit(); +}//end of function + + + +CALLSET_ENTRY (eject, dev_eyeball_eject_enter) { + //HUXLEY MADE + if ( !flag_test(FLAG_BACK_IN_THE_FRIDGE_RUNNING) + && task_kill_gid(GID_LEFT_INLANE_MADE) ) { +// flag_on(FLAG_KILL_NORMAL_EJECT); + huxley_made(); + return; +// task_sleep (TIME_300MS);//give time for huxley to catch up + } + + //START VIDEO MODE + else if ( !flag_test(FLAG_BACK_IN_THE_FRIDGE_RUNNING) + && !flag_test(FLAG_IS_FORTRESS_MB_RUNNING) + && !flag_test(FLAG_IS_MUSEUM_MB_RUNNING) + && !flag_test(FLAG_IS_CRYOPRISON_MB_RUNNING) + && !flag_test(FLAG_IS_WASTELAND_MB_RUNNING) + && !flag_test(FLAG_IS_DEMOTIME_RUNNING) + && flag_test (FLAG_VIDEO_MODE_ENABLED) ) { +// flag_on(FLAG_KILL_NORMAL_EJECT); + start_video_mode(3); + + sound_start (ST_ANY, SPCH_PLAYER_TWO, SL_1S, PRI_GAME_QUICK5); + task_sleep (TIME_500MS); + task_sleep (TIME_500MS); + task_sleep (TIME_500MS); + task_sleep (TIME_500MS); + + + combo_rehit_check (); //check to see if enough combos to relight video mode + sol_request (SOL_EJECT); //request to fire the eject sol + ball_search_monitor_start (); +// return; + task_sleep (TIME_300MS); + }//end of start video mode + + //NORMAL RETINA SCAN + else //if (!flag_test(FLAG_KILL_NORMAL_EJECT) ) + { + leff_start (LEFF_EJECT); + + sound_start (ST_SAMPLE, RETINA_SCAN_LONG, SL_4S, PRI_GAME_QUICK1); + score (EJECT_SCORE); + //100k per jet hit here + if (jet_shots_made > 0) { + score_zero (temp_score);//zero out temp score + score_add (temp_score, score_table[SC_100K]);//multiply 100K by jet count + score_mul (temp_score, jet_shots_made);//multiply 100K by jet count + score_long (temp_score); //add temp score to player's score + }//end of if + + if (retina_scan_multiplier == 2) { + sound_start(ST_SPEECH, SPCH_DOUBLE_RETINA_SCAN, SL_4S, PRI_GAME_QUICK5); + score (EJECT_SCORE); + score_long (temp_score); //add temp score to player's score + } + + deff_start (DEFF_EJECT_EFFECT); + task_sleep_sec (1); + + sol_request (SOL_EJECT); //request to fire the eject sol + }//end of else !flag_test(FLAG_KILL_NORMAL_EJECT) +}//end of function + + + + +//called from comp award at underground.c +void comp_award_doub_retina(void) { + retina_scan_multiplier = 2; +}//end of function + + + +void eject_video_mode_finished(void) { +// task_create_gid1(GID_EJECT_LEFF, eject_leff); + sol_request (SOL_EJECT); //request to fire the eject sol + ball_search_monitor_start (); +// task_sleep (TIME_300MS); +// flag_off(FLAG_KILL_NORMAL_EJECT); +} //end of function + + + + +/**************************************************************************** + * + * lighting effects + * + ****************************************************************************/ +void eject_leff (void){ + lamp_tristate_flash(LM_RETINA_SCAN); + flasher_pulse (FLASH_EJECT_FLASHER); + task_sleep (TIME_100MS); + flasher_pulse (FLASH_EJECT_FLASHER); + task_sleep (TIME_100MS); + flasher_pulse (FLASH_EJECT_FLASHER); + task_sleep (TIME_100MS); + flasher_pulse (FLASH_EJECT_FLASHER); + task_sleep (TIME_100MS); + flasher_pulse (FLASH_EJECT_FLASHER); + task_sleep (TIME_100MS); + flasher_pulse (FLASH_EJECT_FLASHER); + task_sleep (TIME_100MS); + flasher_pulse (FLASH_EJECT_FLASHER); + task_sleep (TIME_100MS); + flasher_pulse (FLASH_EJECT_FLASHER); + task_sleep (TIME_100MS); + flasher_pulse (FLASH_EJECT_FLASHER); + task_sleep (TIME_100MS); + flasher_pulse (FLASH_EJECT_FLASHER); + task_sleep (TIME_100MS); + flasher_pulse (FLASH_EJECT_FLASHER); + task_sleep (TIME_100MS); + flasher_pulse (FLASH_EJECT_FLASHER); + task_sleep (TIME_100MS); + flasher_pulse (FLASH_EJECT_FLASHER); + task_sleep (TIME_100MS); + flasher_pulse (FLASH_EJECT_FLASHER); + task_sleep (TIME_100MS); + lamp_tristate_off(LM_RETINA_SCAN); + leff_exit(); +}//end of function + + + + +/**************************************************************************** + * + * DISPLAY EFFECTS + * + ****************************************************************************/ +void eject_effect_deff(void) { + U16 fno; + dmd_clean_page_high ();// + dmd_clean_page_low ();// + switch (++ejectDeffCounter % 2) { + default: + case 0: + for (fno = IMG_EYE_B_START; fno <= IMG_EYE_B_END; fno += 2) { + dmd_alloc_pair (); + frame_draw(fno); + dmd_show2 (); + task_sleep (TIME_66MS); + }//end of inner loop + + for (fno = IMG_EYE_B_END - 2; fno >= IMG_EYE_B_START + 6; fno -= 2) { + dmd_alloc_pair (); + frame_draw(fno); + dmd_show2 (); + task_sleep (TIME_66MS); + }//end of inner loop + + for (fno = IMG_EYE_B_START + 4; fno >= IMG_EYE_B_START + 2; fno -= 2) { + dmd_map_overlay (); + dmd_clean_page_low (); + font_render_string_center (&font_fireball, DMD_MIDDLE_X, DMD_BIG_CY_Top, "RETINA"); + font_render_string_center (&font_fireball, DMD_MIDDLE_X, DMD_BIG_CY_Bot, "SCAN"); + dmd_text_outline (); + dmd_alloc_pair (); + frame_draw(fno); + dmd_overlay_outline (); + dmd_show2 (); + task_sleep (TIME_66MS); + }//end of inner loop + break; + case 1: + for (fno = IMG_EYE_START; fno <= IMG_EYE_27; fno += 2) { + dmd_alloc_pair (); + frame_draw(fno); + dmd_show2 (); + task_sleep (TIME_66MS); + }//end of inner loop + + dmd_alloc_pair_clean ();// Clean both pages + for (fno = IMG_EYE_28; fno <= IMG_EYE_END; fno += 2) { + dmd_map_overlay (); + dmd_clean_page_low (); + font_render_string_center (&font_fireball, DMD_MIDDLE_X, DMD_BIG_CY_Top, "RETINA"); + font_render_string_center (&font_fireball, DMD_MIDDLE_X, DMD_BIG_CY_Bot, "SCAN"); + dmd_text_outline (); + dmd_alloc_pair (); + frame_draw(fno); + dmd_overlay_outline (); + dmd_show2 (); + task_sleep (TIME_66MS); + }//end of inner loop + break; + }//end of switch + deff_exit (); +}//end of mode_effect_deff + + + diff --git a/machine/dm/explode.c b/machine/dm/explode.c new file mode 100644 index 000000000..d4480baf6 --- /dev/null +++ b/machine/dm/explode.c @@ -0,0 +1,401 @@ +/* + * demolition man + * explode.c + * + * written by James Cardona + * + * Location Description: + * Retina Scan: This is the leftmost shot of the game. The ball passes through a gate + * and into an eject that feeds the left inlane. + * If hit hard enough through the gate, it will hit the captive eyeball. + * + * Scoring Description: (original game) + * Shots that knock the captive eyeball into the upper target award the Retina Scan value. + * The Jet Bumpers increase the Retina Value.(eyeball) + * It starts at 5M and goes up 100K per jet. + * + * At certain numbers of Retina Scans hits, Explode Hurry Up is activated. + * It takes 1 hit for the first Hurry-Up, four for the next on the easiest level. + * + * All four Explode ramps are lit at a value of 15M that begins counting down. + * Hit any explode lamp to collect and add 10M to the value for the next Explode shot. + * The round times out when the countdown reaches 5M (or higher if you've collected a few of the shots). + * An extra ball is lit at three Retina Scans. + * + * + * Scoring Description: (my rules) + * same as above except explode mode times out after 30 seconds or ball drain + * and eyeball shot can be hit in addition to explode arrows + * + * estimate of average explode mode score: 80 million to 120 million + * estimate of average eyeball score: 10 million to 20 million + * + */ +/* CALLSET_SECTION (explode, __machine2__) */ + +#include +#include "dm/global_constants.h" +#include //autogenerated by divhold.ct + +//constants +const U8 EXPLODE_TIMER_DEFAULT = 43; + +//local variables +U8 explode_MessageCounter; +U8 explode_temp_counter; //temporary counter +U8 explode_SoundCounter; +U8 explode_mode_timer; +U8 explode_mode_shots_made;//number of times an explode is hit +__local__ U8 explode_modes_achieved_counter;//number of times mode achieved +score_t explode_mode_score; +score_t explode_mode_last_score; +score_t explode_mode_temp_score; +score_t explode_mode_display_score; +__boolean explode_ballsave; + +//external variables + +//internally called function prototypes --external found at protos.h +void explode_mode_init (void); +void explode_mode_expire (void); +void explode_mode_exit (void); +void explode_reset (void); +void player_explode_reset (void); +void explode_ballsave_task (void); + + + +/**************************************************************************** + * mode definition structure + ***************************************************************************/ +struct timed_mode_ops explode_mode = { + DEFAULT_MODE, + .init = explode_mode_init, + .exit = explode_mode_expire, + .gid = GID_EXPLODE_MODE_RUNNING, + .music = MUS_MD_EXPLODE, + .deff_starting = DEFF_EXPLODE_START_EFFECT, + .deff_running = DEFF_EXPLODE_EFFECT, +// .deff_ending = DEFF_EXPLODE_END, + .prio = PRI_GAME_MODE5, + .init_timer = 43, //make sure to set EXPLODE_TIMER_DEFAULT to the same value + .timer = &explode_mode_timer, + .grace_timer = 2, //DEFAULT IS 2 +// .pause = system_timer_pause, +}; + + + + +/**************************************************************************** + * initialize and exit + ***************************************************************************/ +void player_explode_reset (void) { + flag_off (FLAG_IS_EXPLODE_MODE_RUNNING); + explode_modes_achieved_counter = 0;//these need to be zeroed in before we enter the mode so bonus doesn't fake trigger + explode_mode_shots_made = 0; + explode_SoundCounter = 0; +}//end of function + + + +void explode_reset (void) { + flag_off (FLAG_IS_EXPLODE_MODE_RUNNING); +}//end of function + + + +void explode_mode_init (void) { + //check if explode is already running and do these things at first start only + if (!flag_test (FLAG_IS_EXPLODE_MODE_RUNNING) ) { + explode_mode_shots_made = 0; + diverter_stop();//defined in divhold2.ct + task_kill_gid (GID_CR_LIGHTS); + + score_zero(explode_mode_score); + } //otherwise we are already in explode so add time to timer + else timed_mode_add (&explode_mode, 10); + + //do all the rest in either case + explode_ballsave = TRUE; + flag_on (FLAG_IS_EXPLODE_MODE_RUNNING); + //start the ball save timer + task_create_gid1 (GID_EXPLODE_BALLSAVE_TIMER, explode_ballsave_task); + serve_ball_auto(); //add one ball to the playfield - NOT a multiball since doesn't change global ball count + if ( (explode_SoundCounter++ % 2) == 0 )//check if even + sound_start (ST_SPEECH, SPCH_EXPLODE_ACTIVATED, SL_4S, PRI_GAME_QUICK5); + else + sound_start (ST_SPEECH, SPCH_EXPLODE_HURRYUP, SL_4S, PRI_GAME_QUICK5); + score(EXPLODE_START); + score_add (explode_mode_score, score_table[SC_15M]); + ++explode_modes_achieved_counter; + + task_sleep(TIME_2S);//wait for served ball so that explode made not trigger by it + //leave these here to take care of end of grace period conditions + activate_explode_inserts_ramps(); + activate_explode_inserts_orbits(); +}//end of function + + +//this is an exit on timeout, ball still in play +void explode_mode_expire (void) { + flag_off (FLAG_IS_EXPLODE_MODE_RUNNING); + deactivate_explode_inserts_ramps(); + deactivate_explode_inserts_orbits(); + + diverter_check(); +}//end of function + + + +//this is an exit on end of ball +//must do this differently to prevent excessive cycling of diverter which +//tends to blow fuses +void explode_mode_exit (void) { + flag_off (FLAG_IS_EXPLODE_MODE_RUNNING); + deactivate_explode_inserts_ramps(); + deactivate_explode_inserts_orbits(); + + timed_mode_end2(&explode_mode); +}//end of function + + + +//if a ball drains during the mode and with time still on the ballsave timer - send it back in play +CALLSET_BOOL_ENTRY (explode, ball_drain) { //thrown by device.c + if (flag_test(FLAG_IS_EXPLODE_MODE_RUNNING) + && explode_ballsave) { + sound_start (ST_SAMPLE, EXPLOSION, SL_2S, PRI_GAME_QUICK1); + serve_ball_auto (); + sound_start (ST_SAMPLE, EXPLOSION, SL_2S, PRI_GAME_QUICK1); + return FALSE; //this is not a valid drain, don't count it + } + else return TRUE; //this is a valid drain +}//end of callset + + + + + + + + +/**************************************************************************** + * external event listeners + ****************************************************************************/ +CALLSET_ENTRY (explode, music_refresh) { timed_mode_music_refresh (&explode_mode); } +CALLSET_ENTRY (explode, end_ball) { if (timed_mode_running_p(&explode_mode) ) explode_mode_exit(); } +CALLSET_ENTRY (explode, display_update) { timed_mode_display_update (&explode_mode); } +CALLSET_ENTRY (explode, start_player) { player_explode_reset(); } +CALLSET_ENTRY (explode, start_ball) { explode_reset(); } + +/**************************************************************************** + * + * body + * + ***************************************************************************/ +void explode_ballsave_task (void) { + task_sleep_sec(15); + explode_ballsave = FALSE; + task_exit(); +}//end of function + + +void start_explode(void) { + huxley_increment(); + timed_mode_begin (&explode_mode);//start explode mode +}//end of function + + + + +void explode_lights_task (void) { + U8 i; + sound_start (ST_SAMPLE, EXPLOSION, SL_1S, PRI_GAME_QUICK5); + for (i = 0; i < 5; i++) { + flasher_pulse (FLASH_DIVERTER_FLASHER); //FLASH followed by name of flasher in caps + task_sleep (TIME_33MS); + flasher_pulse (FLASH_LEFT_RAMP_UP_FLASHER); + task_sleep (TIME_33MS); + flasher_pulse (FLASH_RIGHT_RAMP_UP_FLASHER); + task_sleep (TIME_133MS); + if (i % 2 == 0) sound_start (ST_SAMPLE, EXPLOSION, SL_1S, PRI_GAME_QUICK5); + } + task_sleep (TIME_133MS); + sound_start (ST_SAMPLE, EXPLOSION, SL_1S, PRI_GAME_QUICK5); + task_exit(); +}// end of function + + + + +void explode_made(void) { + task_create_gid1 (GID_EXPLODE_LIGHTS, explode_lights_task); + ++explode_mode_shots_made; + //score xx million counting down to 0 at end of mode + 1 million for # of explodes hit + score_zero(explode_mode_temp_score); + score_add (explode_mode_temp_score, score_table[EXPLODE_SCORE]); + score_mul (explode_mode_temp_score, explode_mode_timer); + score_zero(explode_mode_last_score); + score_add (explode_mode_last_score, explode_mode_temp_score); + score_long (explode_mode_temp_score); + score_add (explode_mode_score, explode_mode_temp_score); + + deff_start (DEFF_EXPLODE_HIT_EFFECT); +}//end of function + + + +/**************************************************************************** + * + * DMD display and sound effects + * + ****************************************************************************/ +void explode_start_effect_deff(void) { + U8 count = 8; + dmd_alloc_pair_clean (); + dmd_draw_border (dmd_low_buffer); + font_render_string_center (&font_lithograph, DMD_MIDDLE_X, DMD_BIG_CY_Cent, "EXPLODE"); + /* low = text, high = blank */ + while (--count > 0){ + dmd_show2 (); + task_sleep (TIME_100MS); + + dmd_flip_low_high (); + dmd_show2 (); + task_sleep (TIME_100MS); + + dmd_show_high (); + task_sleep (TIME_200MS); + + dmd_show2 (); + task_sleep (TIME_100MS); + dmd_flip_low_high (); + } + deff_exit (); +}//end of mode_effect_deff + + + +void explode_hit_effect_deff(void) { + U16 fno; + sound_start (ST_SAMPLE, EXPLOSION, SL_2S, PRI_GAME_QUICK1); + + dmd_alloc_pair_clean ();// Clean both pages + + switch (++explode_MessageCounter % 4) { + default: + case 0: + for (fno = IMG_FORTRESS_C_START; fno <= IMG_FORTRESS_C_MID-2; fno += 2) { + dmd_alloc_pair_clean ();// Clean both pages + frame_draw(fno); + dmd_show2 (); + task_sleep (TIME_66MS); + } + dmd_alloc_pair_clean ();// Clean both pages + dmd_map_overlay (); + dmd_clean_page_low (); + font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_SMALL_CY_1, "EXPLODE"); + font_render_string_center (&font_lithograph, DMD_MIDDLE_X, DMD_BIG_CY_Bot, "BOOM BABY"); + dmd_text_outline (); + dmd_alloc_pair (); + frame_draw(IMG_FORTRESS_C_MID); + dmd_overlay_outline (); + dmd_show2 (); + task_sleep (TIME_200MS); + break; + case 1: + for (fno = IMG_FORTRESS_C_MID; fno <= IMG_FORTRESS_C_END-2; fno += 2) { + dmd_alloc_pair_clean ();// Clean both pages + frame_draw(fno); + dmd_show2 (); + task_sleep (TIME_66MS); + } + dmd_map_overlay (); + dmd_clean_page_low (); + font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_SMALL_CY_1, "EXPLODE"); + font_render_string_center (&font_lithograph, DMD_MIDDLE_X, DMD_BIG_CY_Bot, "BOOOOOYAH"); + dmd_text_outline (); + dmd_alloc_pair (); + frame_draw(IMG_FORTRESS_C_END); + dmd_overlay_outline (); + dmd_show2 (); + task_sleep (TIME_200MS); + break; + case 2: + for (fno = IMG_FORTRESS_C_MID; fno <= IMG_FORTRESS_C_END-2; fno += 2) { + dmd_alloc_pair_clean ();// Clean both pages + frame_draw(fno); + dmd_show2 (); + task_sleep (TIME_66MS); + } + + dmd_map_overlay (); + dmd_clean_page_low (); + dmd_clean_page_high ();// + font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_SMALL_CY_1, "EXPLODE"); + font_render_string_center (&font_lithograph, DMD_MIDDLE_X, DMD_BIG_CY_Bot, "BOOM BOOM"); + dmd_text_outline (); + dmd_alloc_pair (); + frame_draw(IMG_FORTRESS_C_END); + dmd_overlay_outline (); + dmd_show2 (); + task_sleep (TIME_66MS); + break; + case 3: + for (fno = IMG_FORTRESS_C_START; fno <= IMG_FORTRESS_C_MID-2; fno += 2) { + dmd_alloc_pair_clean ();// Clean both pages + frame_draw(fno); + dmd_show2 (); + task_sleep (TIME_66MS); + } + + dmd_alloc_pair_clean (); + dmd_map_overlay (); + dmd_clean_page_low (); + font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_SMALL_CY_1, "EXPLODE"); + font_render_string_center (&font_lithograph, DMD_MIDDLE_X, DMD_BIG_CY_Bot, "POW"); + dmd_text_outline (); + dmd_alloc_pair (); + frame_draw(IMG_FORTRESS_C_MID); + dmd_overlay_outline (); + dmd_show2 (); + task_sleep (TIME_66MS); + break; + }//end of switch + deff_exit (); +}//end of mode_effect_deff + + + + + +void explode_effect_deff(void) { + U8 i; + for (;;) { + dmd_alloc_low_clean (); + dmd_draw_border (dmd_low_buffer); + +// sprintf_score(current_score); +// font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_SMALL_CY_1, sprintf_buffer); + + font_render_string_center (&font_lithograph, DMD_MIDDLE_X, DMD_BIG_CY_Top, "EXPLODE"); + score_zero(explode_mode_display_score); + score_add (explode_mode_display_score, score_table[EXPLODE_SCORE]); + score_mul (explode_mode_display_score, explode_mode_timer); + + sprintf_score (explode_mode_display_score); + font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_SMALL_CY_3, sprintf_buffer); + + //DMD size is 128x32 + for (i = 5; i < (118 - (explode_mode_timer * ( 118/EXPLODE_TIMER_DEFAULT) ) ); i++) { + sprintf ("I"); + font_render_string_left (&font_var5, i, DMD_SMALL_CY_4, sprintf_buffer); + }//end of for loop + dmd_show_low (); + task_sleep (TIME_500MS);//score goes down by second so update every xxms is plenty soon enough + }//END OF ENDLESS LOOP +}//end of mode_effect_deff + + + diff --git a/machine/dm/eyeball.c b/machine/dm/eyeball.c new file mode 100644 index 000000000..12edb0752 --- /dev/null +++ b/machine/dm/eyeball.c @@ -0,0 +1,235 @@ +/* + * demolition man + * eyeball.c + * + * written by James Cardona + * + * Location Description: + * Retina Scan: This is the leftmost shot of the game. The ball passes through a gate + * and into an eject that feeds the left inlane. + * If hit hard enough through the gate, it will hit the captive eyeball. + * + * Scoring Description: (original game) + * Shots that knock the captive eyeball into the upper target award the Retina Scan value. + * The Jet Bumpers increase the Retina Value.(eyeball) + * It starts at 5M and goes up 100K per jet. + * + * At certain numbers of Retina Scans hits, Explode Hurry Up is activated. + * + */ +/* CALLSET_SECTION (eyeball, __machine5__) */ + +#include +#include "dm/global_constants.h" +#include "eyeball.h" + +//constants +const U8 EYE_EASY_GOAL = 1; +const U8 EYE_HARD_GOAL = 5; +const U8 EYE_GOAL_STEP = 3; +const U8 EYE_GOAL_MAX = 11; + +const U8 EYE_EB_EASY_GOAL = 10; +const U8 EYE_EB_HARD_GOAL = 22; + +//local variables +U8 eyeball_MessageCounter; +__local__ U8 eyeball_shots_made; +__local__ U8 eyeball_eb_shots_made; +__local__ U8 total_eyeball_shots_made; //for entire game +__local__ U8 eyeball_goal; //num of hits to start explode +__local__ U8 eyeball_eb_goal; //num of hits to light extraball +__local__ __boolean eyeball_eb_made; //num of hits to light extraball +U8 eyeball_switch_debounce; + + + +//internally called function prototypes --external found at protos.h +void eyeball_reset (void); +void player_eyeball_reset (void); +void eyeball_goal_award (void); +void eyeball_eb_award (void); + +/**************************************************************************** + * initialize and exit + ***************************************************************************/ +void player_eyeball_reset (void) { + total_eyeball_shots_made = 0; + eyeball_shots_made = 0; + eyeball_eb_shots_made = 0; + eyeball_goal = EYE_EASY_GOAL; + eyeball_eb_goal = EYE_EB_EASY_GOAL; + eyeball_eb_made = FALSE; + eyeball_switch_debounce = 0; + flag_on(FLAG_IS_EXPLODE_MODE_ENABLED); + + #ifdef CONFIG_DIFFICULTY_LEVEL + if (system_config.difficulty == EASY) { + eyeball_goal = EYE_EASY_GOAL; + eyeball_eb_goal = EYE_EB_EASY_GOAL; + }//end of if + else { + eyeball_goal = EYE_HARD_GOAL; + eyeball_eb_goal = EYE_EB_HARD_GOAL; + } //END OF ELSE +#endif +}//end of function + +/**************************************************************************** + * external event listeners + ****************************************************************************/ +CALLSET_ENTRY (eyeball, start_player) { player_eyeball_reset(); } + +/**************************************************************************** + * + * body + * + ***************************************************************************/ +void eyeball_goal_award (void) { + flag_off(FLAG_IS_EXPLODE_MODE_ENABLED); + eyeball_shots_made = 0; + if (eyeball_goal < EYE_GOAL_MAX) eyeball_goal += EYE_GOAL_STEP; + sound_start (ST_SPEECH, SPCH_LOVE_WHEN_THAT_HAPPENS, SL_2S, PRI_GAME_QUICK5); + start_explode();//start explode mode +}//end of function + + + +void eyeball_eb_award (void) { + eyeball_eb_made = TRUE; + sound_start (ST_SPEECH, SPCH_LOVE_WHEN_THAT_HAPPENS, SL_2S, PRI_GAME_QUICK5); + start_extraball(); +}//end of function + + + + +void eyeball_switch_debounce_task (void) { + task_sleep_sec(2); + eyeball_switch_debounce = 0; + task_exit(); +}//end of function + + + +CALLSET_ENTRY (eyeball, sw_eyeball_standup) { + if (in_game) { + if (++eyeball_switch_debounce == 1) { + ballsave_add_time (1); + ++eyeball_shots_made; + ++eyeball_eb_shots_made; + sound_start (ST_SAMPLE, EXPLOSION1_MED, SL_2S, PRI_GAME_QUICK1); + leff_start(LEFF_EYEBALL); + + if ( !eyeball_eb_made + && (eyeball_eb_shots_made >= eyeball_eb_goal) ) eyeball_eb_award();//award extraball + else if (!flag_test(FLAG_BACK_IN_THE_FRIDGE_RUNNING) + && eyeball_shots_made >= eyeball_goal) eyeball_goal_award();//start explode + else { + deff_start (DEFF_EYEBALL_EFFECT); + if (eyeball_goal - eyeball_shots_made <= 1) flag_on(FLAG_IS_EXPLODE_MODE_ENABLED);//set flag if one shot away + } + + score (EYEBALL_SCORE); + }//end of if DEBOUNCER + task_create_gid1 (GID_EYEBALL_DEBOUNCE, eyeball_switch_debounce_task); + } +}//end of function + + + + + +/**************************************************************************** + * + * lighting effects + * + ****************************************************************************/ +void eyeball_leff1 (void) { + U8 i; + for (i = 0; i < 20; i++) { + leff_toggle(LM_RETINA_SCAN); + task_sleep (TIME_100MS); + }// end of loop +}//end of function + +void eyeball_leff (void){ + leff_create_peer (eyeball_leff1); + flasher_pulse (FLASH_EYEBALL_FLASHER); + flasher_pulse (FLASH_EYEBALL_FLASHER); + flasher_pulse (FLASH_EYEBALL_FLASHER); + flasher_pulse (FLASH_EYEBALL_FLASHER); + task_sleep (TIME_1S); + flasher_pulse (FLASH_EYEBALL_FLASHER); + flasher_pulse (FLASH_EYEBALL_FLASHER); + flasher_pulse (FLASH_EYEBALL_FLASHER); + flasher_pulse (FLASH_EYEBALL_FLASHER); + flasher_pulse (FLASH_EYEBALL_FLASHER); + task_sleep (TIME_1S); + leff_exit(); +}//end of function + + + + + +/**************************************************************************** + * + * display effects + * + ****************************************************************************/ +void eyeball_effect_deff(void) { + dmd_alloc_pair_clean (); + dmd_sched_transition (&trans_scroll_up); + + switch (++eyeball_MessageCounter % 5) { + case 4: + dmd_map_overlay (); + dmd_clean_page_low (); + font_render_string_center (&font_term6, DMD_MIDDLE_X, DMD_MED_CY_1, "EXPLODE AND CHASE"); + font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_MED_CY_2, "LEAD TO"); + font_render_string_center (&font_fipps, DMD_MIDDLE_X, DMD_BIG_CY_Bot, "HUXLEY"); + dmd_text_outline (); + dmd_alloc_pair (); + frame_draw(IMG_HUXLEY_B2_START); + dmd_overlay_outline (); + dmd_show2 (); + break; + case 1: + font_render_string_center (&font_term6, DMD_MIDDLE_X + 20, DMD_MED_CY_1, "JETS"); + font_render_string_center (&font_term6, DMD_MIDDLE_X + 20, DMD_MED_CY_2, "INCREASE"); + font_render_string_center (&font_lithograph, DMD_MIDDLE_X, DMD_BIG_CY_Bot, "RETINA SCAN"); + bitmap_blit (eye3SM_bits, 15, 2); + dmd_show_low (); + break; + case 2: + font_render_string_center (&font_term6, DMD_MIDDLE_X - 30, DMD_MED_CY_1, "EXTRA BALL"); + font_render_string_center (&font_term6, DMD_MIDDLE_X - 30, DMD_MED_CY_2, "AT"); + sprintf ("%d HITS", eyeball_eb_goal - eyeball_eb_shots_made); + font_render_string_center (&font_lithograph, DMD_MIDDLE_X - 30, DMD_BIG_CY_Bot, sprintf_buffer); + bitmap_blit (eye5_bits, 80, 2); + dmd_show_low (); + break; + case 3: + font_render_string_center (&font_term6, DMD_MIDDLE_X - 25, DMD_MED_CY_1, "EXPLODE"); + font_render_string_center (&font_term6, DMD_MIDDLE_X - 25, DMD_MED_CY_2, "AT"); + sprintf ("%d HITS", eyeball_goal - eyeball_shots_made); + font_render_string_center (&font_lithograph, DMD_MIDDLE_X - 25, DMD_BIG_CY_Bot, sprintf_buffer); + bitmap_blit (eye3_bits, 86, 2); + dmd_show_low (); + break; + case 0: + sprintf ("OOOHHH"); + font_render_string_center (&font_lithograph, DMD_MIDDLE_X + 25, DMD_BIG_CY_Top, sprintf_buffer); + sprintf ("MY EYE"); + font_render_string_center (&font_lithograph, DMD_MIDDLE_X + 25, DMD_BIG_CY_Bot, sprintf_buffer); + bitmap_blit (eye3_bits, 2, 2); + dmd_show_low (); + break; + }//END OF SWITCH + + task_sleep (TIME_500MS); + deff_exit (); +}//end of mode_effect_deff + + diff --git a/machine/dm/eyeball.h b/machine/dm/eyeball.h new file mode 100644 index 000000000..f138d34bb --- /dev/null +++ b/machine/dm/eyeball.h @@ -0,0 +1,82 @@ +#define eye3_width 40 +#define eye3_height 20 +static U8 eye3_bits[] = { eye3_width , eye3_height, + 0x00, 0x00, 0x00, 0x00, 0x80, // # + 0x00, 0x41, 0x00, 0x00, 0xC0, // # # ## + 0x00, 0x01, 0x10, 0x10, 0xE0, // # # # ### + 0x00, 0x21, 0x08, 0x08, 0xF0, // # # # # #### + 0x80, 0xB1, 0x07, 0x06, 0x78, // ## ## #### ## #### + 0x80, 0xFF, 0xFF, 0x07, 0x3E, // #################### ##### + 0x80, 0xFF, 0xFF, 0xFF, 0x0F, // ############################# + 0xC0, 0xFF, 0xFF, 0xFF, 0x07, // ############################# + 0xE0, 0xCF, 0xFE, 0xFF, 0x03, // ####### ## ################# + 0xF0, 0xFE, 0x84, 0x7F, 0x00, // #### ####### # ######## + 0xF8, 0xFE, 0x84, 0x0F, 0x00, // ##### ####### # ##### + 0xDC, 0xFC, 0xE4, 0x1F, 0x00, // ### ## ###### # ######## + 0xCC, 0x78, 0xE6, 0x7F, 0x00, // ## ## #### ## ########## + 0x86, 0x81, 0xF3, 0xE0, 0x01, // ## ## ### #### #### + 0x02, 0xFF, 0xF9, 0x81, 0x03, // # ######### ###### ### + 0x02, 0x7E, 0xFC, 0x03, 0x00, // # ###### ######## + 0xE1, 0xB3, 0x1F, 0x0C, 0x00, // # ##### ## ###### ## + 0xF0, 0xFF, 0x1F, 0x18, 0x00, // ################# ## + 0x04, 0xFE, 0x03, 0x00, 0x00, // # ######### + 0x00, 0xF0, 0x00, 0x00, 0x00, // #### +}; + +#define eye3SM_width 32 +#define eye3SM_height 14 +static U8 eye3SM_bits[] = { eye3SM_width , eye3SM_height, +0x40, 0x04, 0x00, 0x10, // # # # +0x40, 0x40, 0x10, 0x18, // # # # ## +0x40, 0x02, 0x00, 0x1C, // # # ### +0xE0, 0xFF, 0x0F, 0x0F, // ############### #### +0xE0, 0xFF, 0xFF, 0x03, // ##################### +0xF0, 0xFD, 0xFF, 0x01, // ##### ############### +0xB8, 0x2F, 0x3E, 0x00, // ### ##### # ##### +0xBC, 0x2F, 0x0E, 0x00, // #### ##### # ### +0x36, 0xB7, 0x3F, 0x00, // ## ## ### ## ####### +0x62, 0xD8, 0xE1, 0x00, // # ## ## ### ### +0x80, 0xE7, 0x07, 0x00, // #### ###### +0x71, 0x7A, 0x08, 0x00, // # ### # #### # +0xF8, 0x7F, 0x10, 0x00, // ############ # +0x00, 0x0E, 0x00, 0x00, // ### +}; + + +#define eye5_width 48 +#define eye5_height 30 +static U8 eye5_bits[] = { eye5_width , eye5_height, + 0x00, 0x00, 0x00, 0x80, 0x11, 0x03, // ## # ## + 0x00, 0x00, 0x00, 0x02, 0x33, 0x03, // # ## ## ## + 0x00, 0x00, 0x00, 0x64, 0x27, 0x03, // # ## ### # ## + 0x00, 0x00, 0x09, 0x44, 0x26, 0x03, // # # # # ## # ## + 0x00, 0x00, 0x08, 0x62, 0xB6, 0x03, // # # ## ## ## ### + 0x00, 0x00, 0x11, 0xEF, 0xF6, 0x13, // # # #### ### ## ###### # + 0x00, 0x04, 0xF9, 0xFF, 0xFF, 0x1F, // # # ########################## + 0x00, 0x88, 0xFF, 0xFF, 0xFF, 0x1F, // # ############################## + 0x00, 0xC8, 0x3F, 0x8C, 0xFF, 0x27, // # ######## ## ############ # + 0x00, 0xF8, 0x7F, 0x08, 0xFE, 0x0F, // ############ # ########### + 0x00, 0x78, 0x7B, 0x18, 0xF0, 0x11, // #### ## #### ## ##### # + 0x20, 0x1E, 0x7B, 0x08, 0xC0, 0x07, // # #### ## #### # ##### + 0x20, 0x33, 0x7F, 0x18, 0xE0, 0x07, // # ## ## ####### ## ###### + 0xC0, 0x30, 0x3E, 0x08, 0xF0, 0x00, // ## ## ##### # #### + 0xE0, 0x30, 0x1C, 0x04, 0xF8, 0x01, // ### ## ### # ###### + 0x24, 0x60, 0x00, 0x04, 0xFC, 0x07, // # # ## # ######### + 0x1C, 0x60, 0x00, 0x02, 0x9E, 0x07, // ### ## # #### #### + 0x0C, 0xC0, 0x00, 0x83, 0x0F, 0x0E, // ## ## ## ##### ### + 0x06, 0x80, 0xE3, 0xC1, 0x03, 0x0C, // ## ### #### #### ## + 0x02, 0x00, 0x3E, 0x70, 0x06, 0x08, // # ##### ### ## # + 0x03, 0x00, 0x00, 0x3E, 0x0C, 0x00, // ## ##### ## + 0xFF, 0x27, 0xAA, 0x33, 0x18, 0x00, // ########### # # # # ### ## ## + 0xDF, 0xFF, 0xFF, 0x23, 0x10, 0x00, // ##### #################### # # + 0x00, 0xFE, 0x7F, 0x61, 0x00, 0x00, // ############## # ## + 0x00, 0x8C, 0x30, 0xC2, 0x00, 0x00, // ## # ## # ## + 0x00, 0x00, 0x01, 0x81, 0x00, 0x00, // # # # + 0x00, 0x0C, 0x21, 0x00, 0x00, 0x00, // ## # # + 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, // # # + 0x00, 0x04, 0x01, 0x00, 0x00, 0x00, // # # + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // # +}; + + + diff --git a/machine/dm/fortress.c b/machine/dm/fortress.c new file mode 100644 index 000000000..53e624552 --- /dev/null +++ b/machine/dm/fortress.c @@ -0,0 +1,502 @@ +/* + * demolition man + * fortress.c + * + * written by James Cardona + * + * handles the lock freezes and the trigger of multiballs + * + * + * */ +/* CALLSET_SECTION (fortress, __machine3__) */ + + +#include +#include "dm/global_constants.h" +#include //autogenerated by divhold.ct + +//local variables +score_t fortress_score; +U8 fortress_jackpot_shots_made; +U8 fortress_MessageCounter; +__boolean fortress_start_music; +__boolean fortress_ballsave; +U8 fortress_display_counter; +U8 FORT_TOGGLE; + +//external variables +extern U8 NumBallsFrozen; //from lock_freeze_mbstart.c + +//internally called function prototypes --external found at protos.h +void fortress_player_reset (void); + + + +/**************************************************************************** + * multiball definition structure + ***************************************************************************/ + + +struct mb_mode_ops fortress_mode = { + DEFAULT_MBMODE, + //.update = , /* The update callback is invoked whenever the state of the multiball changes. */ + .music = MUS_MB, //handled below + .deff_starting = DEFF_FORTRESS_START_EFFECT, + .deff_running = DEFF_FORTRESS_EFFECT, + //.deff_ending = , +//.active_task = // default => .active_task = mb_mode_active_task, + .prio = PRI_MULTIBALL, //default => .prio = PRI_NULL, +//.grace_period = //default => .grace_period = 500ms + + // .gid_running = GID_FORTRESS_MB, + //.gid_in_grace = , //of type task_gid_t +}; + + +/**************************************************************************** + * initialize and exit + ***************************************************************************/ +void fortress_player_reset (void) { + flag_off(FLAG_IS_FORTRESS_MB_RUNNING); + score_zero(fortress_score); + fortress_jackpot_shots_made = 0; //these need to be zeroed in before we enter the mode so bonus doesn't fake trigger + fortress_start_music = FALSE; + fortress_ballsave = FALSE; +}//end of function + + + +CALLSET_ENTRY (fortress, start_player) { fortress_player_reset(); } + + + + + + +/**************************************************************************** + * external event listeners + ****************************************************************************/ +CALLSET_ENTRY (fortress, music_refresh) { + //if (fortress_start_music) music_request (HELICOPTER, PRI_GAME_QUICK8); + //else + if (flag_test(FLAG_IS_FORTRESS_MB_RUNNING)) music_request (MUS_MB, PRI_GAME_QUICK7); +}//end of function + + + +CALLSET_ENTRY (fortress, display_update) { + //mb_mode_display_update (&fortress_mode); //this doesn't work --why??? + if (flag_test(FLAG_IS_FORTRESS_MB_RUNNING)) + deff_start_bg (DEFF_FORTRESS_EFFECT, PRI_MULTIBALL); +}//end of function + + + +CALLSET_ENTRY (fortress, end_ball) { + if (flag_test(FLAG_IS_FORTRESS_MB_RUNNING)) { + mb_mode_end_ball (&fortress_mode); + jackpot_reset(); + end_super_jackpot_reminder(); + flag_off(FLAG_IS_FORTRESS_MB_RUNNING); + } +}//end of function + + + +//puts in grace period if set +CALLSET_ENTRY (fortress, single_ball_play) { + if ( flag_test(FLAG_IS_FORTRESS_MB_RUNNING) + && !fortress_ballsave ) { + mb_mode_end_ball (&fortress_mode); + end_super_jackpot_reminder(); + combo_init(); + diverter_check(); + //this acts as kind of a grace period for the jackpots + task_sleep_sec(3); + flag_off(FLAG_IS_FORTRESS_MB_RUNNING); + jackpot_reset(); + } +}//end of function + + + + +//if a ball drains during the mode and with time still on the ballsave timer - send it back in play +CALLSET_BOOL_ENTRY (fortress, ball_drain) { //thrown by device.c + if (flag_test(FLAG_IS_FORTRESS_MB_RUNNING) + && fortress_ballsave) { + sound_start (ST_SPEECH, SPCH_AHHHGGG, SL_2S, PRI_GAME_QUICK5); + serve_ball_auto (); + return FALSE; //this is not a valid drain, don't count it + } + else return TRUE; //this is a valid drain +}//end of callset + + + + + +/**************************************************************************** + * + * body + * + ***************************************************************************/ +void fortress_ballsave_task (void) { + task_sleep_sec(15); + fortress_ballsave = FALSE; + task_exit(); +}//end of function + + + + +void fortress_start_sounds (void) { + U8 i; + for(i = 0; i < 8; i++) { + sound_start (ST_ANY, HELICOPTER, SL_1S, PRI_GAME_QUICK5); + task_sleep (TIME_500MS); + } + task_exit(); +}//end of function + + + + + +void fortress_start(U8 num) { + kill_combos(); +// fortress_start_music = TRUE; //for to play the helicopter instead of the music + task_create_gid1 (GID_FORTRESS_START_NOISE, fortress_start_sounds); + flag_on(FLAG_IS_FORTRESS_MB_RUNNING); + fortress_display_counter = 0; + FORT_TOGGLE = 0; + fortress_ballsave = TRUE; + + mb_mode_start(&fortress_mode); + score_add (fortress_score, score_table[FORTRESS_MB_SCORE]); + score (FORTRESS_MB_SCORE); + + deff_start (DEFF_FORTRESS_START_EFFECT); + multiball_started();//reset all MB start criteria for next time + diverter_stop();//defined in divhold2.ct + task_kill_gid (GID_CR_LIGHTS); + + //LIGHTS + lamp_tristate_flash(LM_FORTRESS_MULTIBALL); + task_sleep (TIME_2S); + lamp_tristate_on (LM_FORTRESS_MULTIBALL); + lamp_tristate_off (LM_FREEZE_1); + lamp_tristate_off (LM_FREEZE_2); + lamp_tristate_off (LM_FREEZE_3); + lamp_tristate_off (LM_FREEZE_4); + + //SOUNDS + U8 fortress_SoundCounter; + fortress_SoundCounter = random_scaled(2);//from kernal/random.c - pick number from 0 to 2 + if (fortress_SoundCounter == 0) + sound_start (ST_SPEECH, SPCH_SOMETHING_RIGHT_PREV_LIFE, SL_4S, PRI_GAME_QUICK5); + else + sound_start (ST_SPEECH, SPCH_SEND_MANIAC, SL_4S, PRI_GAME_QUICK5); + task_sleep (TIME_3S); + fortress_start_music = FALSE; //for to kill the music + + //serve balls +// serve_ball_auto(); //add one ball to the playfield + if (num >= 4) set_ball_count (5); + else set_ball_count (num + 1); + task_sleep (TIME_3S); + set_all_jackpots(); //all 6 lit + + //start the ball save timer + task_create_gid1 (GID_FORTRESS_BALLSAVE_TIMER, fortress_ballsave_task); +}//end of function + + + + +/******************* + * start with all jackpot shots lit and as shots are made decrease # of lights lit + ******************/ +void fortress_jackpot_made(void) { + ++fortress_jackpot_shots_made; + score_add (fortress_score, score_table[FORTRESS_JP_MB_SCORE]); + score (FORTRESS_JP_MB_SCORE); + + deff_start (DEFF_FORTRESS_JACKPOT_EFFECT); + + if (fortress_jackpot_shots_made < 2) choose_multiple_random_jackpot (3); //after 1 made, at most 3 lit + else if (fortress_jackpot_shots_made < 4) choose_multiple_random_jackpot (2); //for 2nd and 3rd, at most 2 lit + else choose_random_jackpot (); //for rest, only 1 lit + + if (IN_TEST) { start_super_jackpot_reminder(); } + else if (fortress_jackpot_shots_made % 5 == 0) start_super_jackpot_reminder(); +}//end of function + + + +void fortress_award_super_jackpot(void) { + score_add (fortress_score, score_table[FORTRESS_SUPER_JP_MB_SCORE]); + score (FORTRESS_SUPER_JP_MB_SCORE); + deff_start(DEFF_FORTRESS_SUPER_JACKPOT); +}//end of function + + + + + +/**************************************************************************** + * + * DMD display and sound effects + * + ****************************************************************************/ +void fortress_super_jackpot_deff (void) { + U8 i; + + for (i = 0; i < 7; i++) { //slid from side + switch (i) { + case 0: sound_start (ST_SPEECH, SPCH_AHHHGGG, SL_2S, PRI_GAME_QUICK5); break; + case 4: sound_start (ST_SPEECH, SPCH_HURRY_UP, SL_2S, PRI_GAME_QUICK5); break; + case 8: sound_start (ST_SPEECH, SPCH_CLOSE_ENOUGH, SL_2S, PRI_GAME_QUICK5); + }//END OF SWITCH + dmd_alloc_low_clean (); + sprintf ("SUPER"); + if (i < 7) sprintf_buffer[i + 1] = '\0'; + font_render_string_center (&font_fireball, 64, 8, sprintf_buffer); + + sprintf ("JACKPOT"); + if (i < 7) sprintf_buffer[i + 1] = '\0'; + font_render_string_center (&font_fireball, 64, 24, sprintf_buffer); + + dmd_show_low (); + sound_start (ST_ANY, EXPLOSION1_SHORT, SL_2S, PRI_GAME_QUICK5); + task_sleep (TIME_300MS); + } + sample_start (MACHINE14_LONG, SL_1S); + + task_sleep (TIME_500MS); + speech_start (SPCH_SUPER_JACKPOT, SL_1S); + task_sleep_sec (1); + deff_exit (); +}//end of function + + + + + + +void fortress_animation_display_effect (U16 start_frame, U16 end_frame){ + U16 fno; + for (fno = start_frame; fno <= end_frame; fno += 2) { + dmd_alloc_pair (); + frame_draw(fno); + dmd_show2 (); + task_sleep (TIME_100MS); + }//end of inner loop +} + + + +void fortress_frame_bitfade_fast (U16 frame){ + dmd_sched_transition (&trans_bitfade_fast); + dmd_alloc_pair (); + frame_draw(frame); + dmd_show2 (); + task_sleep (TIME_100MS); +} + + + +void fortress_frame_with_words_display_steel_effect (U16 frame, U8 x, U8 y, char *words){ + dmd_alloc_pair_clean ();// Clean both pages + dmd_map_overlay (); + dmd_clean_page_low (); + font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_SMALL_CY_1, "FORTRESS"); + font_render_string_center (&font_steel, x, y, words); + dmd_text_outline (); + dmd_alloc_pair (); + frame_draw(frame); + dmd_overlay_outline (); + dmd_show2 (); + task_sleep (TIME_100MS); +} + + + + +//30 frames - should last about 3 seconds +void fortress_start_effect_deff(void) { + U8 fortress_MessageCounter; + U16 fno; + + fortress_MessageCounter = random_scaled(2); + dmd_alloc_pair_clean(); + + switch (fortress_MessageCounter) { + default: + case 0: + fortress_animation_display_effect (IMG_FORTRESS_D1_START, IMG_FORTRESS_D1_END); + fortress_frame_bitfade_fast(IMG_FORTRESS_D2_START); + fortress_animation_display_effect (IMG_FORTRESS_D2_START, IMG_FORTRESS_D2_END); + fortress_frame_bitfade_fast(IMG_FORTRESS_D3_START); + fortress_animation_display_effect (IMG_FORTRESS_D3_START, IMG_FORTRESS_D3_END); + fortress_frame_bitfade_fast(IMG_FORTRESS_D4_START); + + dmd_alloc_pair_clean ();// Clean both pages + for (fno = IMG_FORTRESS_D4_START; fno <= IMG_FORTRESS_D4_END; fno += 2) { + dmd_map_overlay (); + dmd_clean_page_low (); + font_render_string_center (&font_steel, DMD_MIDDLE_X - 20, DMD_BIG_CY_Top, "FORTRESS"); + font_render_string_center (&font_steel, DMD_MIDDLE_X - 15, DMD_BIG_CY_Bot, "MULTIBALL"); + dmd_text_outline (); + dmd_alloc_pair (); + frame_draw(fno); + dmd_overlay_outline (); + dmd_show2 (); + task_sleep (TIME_100MS); + }//end of inner loop + break; + case 1: + fortress_animation_display_effect (IMG_FORTRESS_A_START, IMG_FORTRESS_A_END); + fortress_frame_bitfade_fast(IMG_FORTRESS_D4_START); + + dmd_alloc_pair_clean ();// Clean both pages + for (fno = IMG_FORTRESS_D4_START; fno <= IMG_FORTRESS_D4_END; fno += 2) { + dmd_map_overlay (); + dmd_clean_page_low (); + font_render_string_center (&font_steel, DMD_MIDDLE_X - 20, DMD_BIG_CY_Top, "FORTRESS"); + font_render_string_center (&font_steel, DMD_MIDDLE_X - 15, DMD_BIG_CY_Bot, "MULTIBALL"); + dmd_text_outline (); + dmd_alloc_pair (); + frame_draw(fno); + dmd_overlay_outline (); + dmd_show2 (); + task_sleep (TIME_100MS); + }//end of inner loop + }//end of switch + task_sleep_sec (1); + deff_exit (); +}//end of mode_effect_deff + + + + + +void fortress_jackpot_sounds_task(void) { + U8 fortress_MessageCounter; + fortress_MessageCounter = random_scaled(3); + + sound_start (ST_EFFECT, GUNSHOT_MUFFLED, SL_1S, PRI_GAME_QUICK5); + task_sleep (TIME_200MS); + sound_start (ST_EFFECT, GUNSHOT_MUFFLED, SL_1S, PRI_GAME_QUICK5); + task_sleep (TIME_200MS); + sound_start (ST_EFFECT, RICOCHET, SL_2S, PRI_GAME_QUICK5); + task_sleep (TIME_500MS); + + switch (fortress_MessageCounter) { + case 0: sound_start (ST_SPEECH, SPCH_AHHHGGG, SL_2S, PRI_GAME_QUICK5); break; + case 1: sound_start (ST_SPEECH, SPCH_JOHN_SCREAM, SL_2S, PRI_GAME_QUICK5); break; + case 2: sound_start (ST_SPEECH, SPCH_UHHN, SL_2S, PRI_GAME_QUICK5); break; + }//end of switch + + sound_start (ST_EFFECT, GUNSHOT_MUFFLED, SL_1S, PRI_GAME_QUICK5); + task_sleep (TIME_200MS); + sound_start (ST_EFFECT, GUNSHOT_MUFFLED, SL_1S, PRI_GAME_QUICK5); + task_sleep (TIME_200MS); + sound_start (ST_EFFECT, GUNSHOT_MUFFLED, SL_1S, PRI_GAME_QUICK5); + task_sleep (TIME_200MS); + sound_start (ST_EFFECT, RICOCHET, SL_2S, PRI_GAME_QUICK5); + task_sleep (TIME_200MS); + + if (fortress_jackpot_shots_made % 2 == 0) { + switch (fortress_MessageCounter) { + case 0: sound_start (ST_SPEECH, SPCH_DOUBLE_JACKPOT_WES, SL_2S, PRI_GAME_QUICK5); break; + case 1: sound_start (ST_SPEECH, SPCH_DOUBLE_JACKPOT_SLY, SL_2S, PRI_GAME_QUICK5); break; + case 2: sound_start (ST_SPEECH, SPCH_DOUBLE, SL_2S, PRI_GAME_QUICK5); break; + }//end of switch + }//end of if + + task_exit(); +}//end of mode_effect_deff + + + + +void fortress_jackpot_effect_deff(void) { +// if (++fortress_MessageCounter > 4) fortress_MessageCounter = 0; //for testing + fortress_MessageCounter = random_scaled(4); + dmd_alloc_pair_clean(); + + task_create_gid1 (GID_FORTRESS_JACKPOT_SOUND, fortress_jackpot_sounds_task); + + switch (fortress_MessageCounter) { + default: + case 0: + fortress_animation_display_effect (IMG_FORTRESS_A_START, IMG_FORTRESS_A_END); + fortress_frame_with_words_display_steel_effect (IMG_FORTRESS_A_END, DMD_MIDDLE_X + 20, DMD_BIG_CY_Bot, "JACKPOT"); + break; + case 1: + fortress_animation_display_effect (IMG_FORTRESS_D1_START, IMG_FORTRESS_D1_END); + fortress_animation_display_effect (IMG_FORTRESS_D2_START, IMG_FORTRESS_D2_END); + fortress_frame_with_words_display_steel_effect (IMG_FORTRESS_D2_END, DMD_MIDDLE_X - 20, DMD_BIG_CY_Bot, "JACKPOT"); + break; + case 2: + fortress_animation_display_effect (IMG_FORTRESS_D3_START, IMG_FORTRESS_D3_END); + fortress_animation_display_effect (IMG_FORTRESS_D4_START, IMG_FORTRESS_D4_END); + fortress_frame_with_words_display_steel_effect (IMG_FORTRESS_D4_END, DMD_MIDDLE_X - 20, DMD_BIG_CY_Bot, "JACKPOT"); + break; + case 3: + fortress_animation_display_effect (IMG_BURN_FORTRESS_START, IMG_BURN_FORTRESS_END); + fortress_frame_with_words_display_steel_effect (IMG_BURN_FORTRESS_END, DMD_MIDDLE_X + 20, DMD_BIG_CY_Bot, "JACKPOT"); + break; + }//end of switch + task_sleep_sec (1); + deff_exit (); +}//end of mode_effect_deff + + + + +//the image is 4 color in 2 panes, so we must increment by 2's not 1's +U8 fortress_effect_deff_table[] = { 0, 2, 0, 2, 4, 2, 4, 2, 0, 0, + 2, 4, 6, 8, 6, 8, 4, 2, 0, 6, + 2, 6, 8, 4, 6, 8, 2, 0, 2, 0, 4, 2 }; + +void fortress_effect_deff (void) { + dmd_alloc_pair_clean(); + for (;;) { + dmd_map_overlay (); + dmd_clean_page_low (); + dmd_draw_thin_border (dmd_low_buffer); + + sprintf_score(current_score); + font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_SMALL_CY_3, sprintf_buffer); + + font_render_string_center (&font_steel, DMD_MIDDLE_X, DMD_BIG_CY_Top - 2, "FORTRESS"); + if (fortress_display_counter % 10 != 0) { //draw for 9/10 and blank for 1/10 + if (FORT_TOGGLE == 0) { sprintf ("10 MILLION"); font_render_string_center (&font_steel, DMD_MIDDLE_X, DMD_BIG_CY_Bot, sprintf_buffer); } + else if (FORT_TOGGLE == 1) { sprintf ("JACKPOT LIT"); font_render_string_center (&font_steel, DMD_MIDDLE_X, DMD_BIG_CY_Bot, sprintf_buffer); } + else if (FORT_TOGGLE == 2) { + sprintf ("%d JACKPOTS MADE", fortress_jackpot_shots_made); + font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_SMALL_CY_4, sprintf_buffer); + + if (flag_test(FLAG_IS_SUPER_JACKPOT_ACTIVATED) ) sprintf ("SUPER JACKPOT LIT"); + else sprintf ("SHOOT %d TO LIGHT SUPER", 5 - (fortress_jackpot_shots_made % 5) ); + font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_SMALL_CY_5, sprintf_buffer); + } + } else sprintf (""); + + dmd_text_outline (); + dmd_alloc_pair (); + frame_draw(IMG_FORTRESS_RUN_0 + fortress_effect_deff_table[fortress_display_counter]); + dmd_overlay_outline (); + dmd_show2 (); + task_sleep (TIME_200MS); + + if (++fortress_display_counter >= 30) fortress_display_counter = 0; + if (fortress_display_counter % 20 == 0) { + if (++FORT_TOGGLE > 2) FORT_TOGGLE = 0; //change FORT_TOGGLE once per second + if (IN_TEST) score (FORTRESS_MB_SCORE); + } + }//END OF ENDLESS LOOP +}//end of function + diff --git a/machine/dm/huxley.c b/machine/dm/huxley.c new file mode 100644 index 000000000..76fd5b822 --- /dev/null +++ b/machine/dm/huxley.c @@ -0,0 +1,524 @@ +/* + * demolition man + * huxley.c + * + * written by James Cardona + * + * Description: + * wizrd mode started by completing at least 4 non-claw modes + * + * Scoring Description: (my rules) + * scores 1 million per shot - everything scores + * + */ +/* CALLSET_SECTION (huxley, __machine2__) */ + +#include +#include "dm/global_constants.h" +#include //autogenerated by divhold.ct +#include "search.h" + +//constants +const U8 HUXLEY_EASY_GOAL = 3; +const U8 HUXLEY_HARD_GOAL = 7; + +//constants +const U8 huxley_TotalNumOfSounds = 8; //num between 0 and N-1 == N total +const sound_code_t huxley_SoundsArray[] = { SPCH_WEEAHOO, SPCH_I_GOT_IT, SPCH_WOAH, + SPCH_WHAT_ARE_YOU_DOING, SPCH_DONT_YOU_WANT_SOMETHING_HAPPEN, SPCH_COMPETITION, + SPCH_EXCUSE_ME, SPCH_SOME_ACTION}; + + +//local variables + +__local__ U8 huxley_counter; +U8 huxley_mode_shots_made; +U8 huxley_mode_timer; +__local__ U8 huxley_goal; +__local__ U8 huxley_modes_achieved; +score_t huxley_mode_score; +score_t huxley_mode_last_score; +score_t huxley_mode_next_score; +score_t huxley_mode_score_total_score; +//external variables + +//internally called function prototypes --external found at protos.h +void huxley_reset (void); +void huxley_player_reset (void); +void huxley_mode_init (void); +void huxley_mode_expire (void); +void huxley_mode_exit (void); +void play_huxley_sounds(void); + +/**************************************************************************** + * mode definition structure + ***************************************************************************/ +struct timed_mode_ops huxley_mode = { + DEFAULT_MODE, + .init = huxley_mode_init, + .exit = huxley_mode_exit, + .gid = GID_HUXLEY_MODE_RUNNING, + .music = MUS_MB_B,//MUS_MB_A, +// .deff_starting = DEFF_HUXLEY_START_EFFECT, //- started at init + .deff_running = DEFF_HUXLEY_EFFECT, +// .deff_ending = DEFF_HUXLEY_END_EFFECT, + .prio = PRI_GAME_MODE3, + .init_timer = 93, + .timer = &huxley_mode_timer, + .grace_timer = 2, //default is 2 +// .pause = system_timer_pause, +}; + + +/**************************************************************************** + * reminder when mode enabled but not started yet + ***************************************************************************/ +void huxley_reminder_task (void) { + for (;;) { + task_sleep_sec(67); + deff_start (DEFF_HUXLEY_INFO_EFFECT); + }//end of loop + task_exit(); +}//end of function + + + +/**************************************************************************** + * initialize and exit + ***************************************************************************/ +void huxley_reset (void) { + flag_off (FLAG_IS_HUXLEY_RUNNING); +}//end of function + + + +void huxley_player_reset (void) { + if (IN_TEST) huxley_goal = 1; + else huxley_goal = HUXLEY_EASY_GOAL; + + flag_off(FLAG_IS_HUXLEY_ENABLED); + flag_off(FLAG_IS_HUXLEY_RUNNING); + huxley_reset(); + huxley_counter = 0; + huxley_modes_achieved = 0; + huxley_mode_shots_made = 0; + score_zero(huxley_mode_score_total_score); + task_kill_gid(GID_HUXLEY_REMINDER); + +#ifdef CONFIG_DIFFICULTY_LEVEL + if (system_config.difficulty == EASY) huxley_goal = HUXLEY_EASY_GOAL; + else huxley_goal = HUXLEY_HARD_GOAL; +#endif +}//end of function + + + + +void huxley_mode_init (void) { + ball_search_monitor_stop (); + task_kill_gid(GID_HUXLEY_REMINDER); + flag_on (FLAG_IS_HUXLEY_RUNNING); + huxley_mode_shots_made = 0; + ++huxley_modes_achieved; + + score_zero(huxley_mode_score); + score_zero(huxley_mode_last_score); + score_zero(huxley_mode_next_score); + + score(HUXLEY_START_SCORE); + score_add(huxley_mode_score, score_table[HUXLEY_START_SCORE]); + score_add(huxley_mode_next_score, score_table[HUXLEY_MODE_HIT_SCORE]); + + huxley_goal += (HUXLEY_EASY_GOAL * 2); + flag_off(FLAG_IS_HUXLEY_ENABLED); + + deff_start_sync (DEFF_HUXLEY_START_EFFECT);//under /kernel/deff.c + ballsave_add_time (5); + + + leff_start(LEFF_HUXLEY); + + sol_request_async (SOL_EJECT); //request to fire the eject sol + task_sleep (TIME_300MS); + flag_off(FLAG_KILL_NORMAL_EJECT); + ball_search_monitor_start (); +}//end of function + + + +void huxley_mode_expire (void) { + flag_off (FLAG_IS_HUXLEY_RUNNING); + diverter_check(); +}//end of function + + +void huxley_mode_exit (void) { huxley_mode_expire();} + + +/**************************************************************************** + * external event listeners + ****************************************************************************/ +CALLSET_ENTRY (huxley, music_refresh) { timed_mode_music_refresh (&huxley_mode); } +CALLSET_ENTRY (huxley, end_ball) { if (timed_mode_running_p(&huxley_mode) ) timed_mode_end (&huxley_mode); } +CALLSET_ENTRY (huxley, display_update) { timed_mode_display_update (&huxley_mode); } + +CALLSET_ENTRY (huxley, start_player) { huxley_player_reset(); } +CALLSET_ENTRY (huxley, start_ball) { huxley_reset(); } + + + + +/**************************************************************************** + * + * body + * + ***************************************************************************/ +void huxley_increment (void) { + if (++huxley_counter >= huxley_goal) { + flag_on(FLAG_IS_HUXLEY_ENABLED); + task_create_gid1 (GID_HUXLEY_REMINDER, huxley_reminder_task); + } +}//end of function + + + +void huxley_increment_all (void) { + flag_on(FLAG_IS_HUXLEY_ENABLED); +}//end of function + + + +//Once huxley mode is enabled it is started by a huxley shot (backwards to retina scan) +void huxley_made(void){ + play_huxley_sounds(); + if (flag_test(FLAG_IS_HUXLEY_ENABLED) ) timed_mode_begin (&huxley_mode);//start mode + else { + score (HUXLEY_SCORE); + + deff_start_sync (DEFF_HUXLEY_INFO_EFFECT); + sol_request_async (SOL_EJECT); //request to fire the eject sol + task_sleep (TIME_300MS); + flag_off(FLAG_KILL_NORMAL_EJECT); + }//end of else +}//end of function + + + + //shot made during huxley mode +void huxley_mode_shot_made(void) { + deff_start (DEFF_HUXLEY_HIT_EFFECT);//under /kernel/deff.c + ++huxley_mode_shots_made; + score (HUXLEY_MODE_HIT_SCORE); + score_add (huxley_mode_score, score_table[HUXLEY_MODE_HIT_SCORE]); + score_add (huxley_mode_score_total_score, score_table[HUXLEY_MODE_HIT_SCORE]); +}//end of function + + + +/**************************************************************************** + * + * sound effects + * + ****************************************************************************/ +void play_huxley_sounds(void){ + U8 huxley_SoundCounter; + huxley_SoundCounter = random_scaled(huxley_TotalNumOfSounds);//from kernal/random.c + sound_start (ST_SPEECH, huxley_SoundsArray[huxley_SoundCounter], SL_4S, PRI_GAME_QUICK5); +}//end of function + + + +/**************************************************************************** + * + * lighting effects + * + ****************************************************************************/ +void huxley_leff1 (void) { + U8 i; + for (i = 0; i < 15; i++) { + leff_toggle(LM_RETINA_SCAN); + task_sleep (TIME_100MS); + }// end of loop +}//end of function + +void huxley_leff (void){ + U8 i; + leff_create_peer (huxley_leff1); + for (i = 0; i < 15; i++) { + flasher_pulse (FLASH_EJECT_FLASHER); + task_sleep (TIME_100MS); + } + leff_exit(); +}//end of function + + + + +/**************************************************************************** + * + * DMD display + * + ****************************************************************************/ +void huxley_animation_display_effect (U16 start_frame, U16 end_frame){ + U16 fno; + for (fno = start_frame; fno <= end_frame; fno += 2) { + dmd_alloc_pair (); + frame_draw(fno); + dmd_show2 (); + task_sleep (TIME_100MS); + }//end of inner loop +} + + + + +void huxley_frame_bitfade_fast (U16 frame){ + dmd_sched_transition (&trans_bitfade_fast); + dmd_alloc_pair (); + frame_draw(frame); + dmd_show2 (); + task_sleep (TIME_100MS); +} + + + + +void huxley_frame_with_words_display_fipps_effect (U16 frame, U8 x, U8 y, char *words){ + dmd_alloc_pair_clean ();// Clean both pages + dmd_map_overlay (); + dmd_clean_page_low (); + font_render_string_center (&font_fipps, x, y, words); + dmd_text_outline (); + dmd_alloc_pair (); + frame_draw(frame); + dmd_overlay_outline (); + dmd_show2 (); + task_sleep (TIME_100MS); +} + + + + +void huxley_start_effect_deff(void) { + dmd_alloc_pair_clean (); + sound_start (ST_SAMPLE, EXPLOSION, SL_2S, PRI_GAME_QUICK5); + font_render_string_center (&font_fipps, DMD_MIDDLE_X, DMD_BIG_CY_Top, "LENINA"); + font_render_string_center (&font_fipps, DMD_MIDDLE_X, DMD_BIG_CY_Bot, "HUXLEY"); + dmd_show_low(); + task_sleep (TIME_500MS); + + sound_start (ST_SPEECH, SPCH_SOME_ACTION, SL_4S, PRI_GAME_QUICK5); + dmd_sched_transition (&trans_scroll_down); + dmd_alloc_pair_clean (); + huxley_animation_display_effect (IMG_HUXLEY_A_START, IMG_HUXLEY_A_END); + + sound_start (ST_SAMPLE, EXPLOSION, SL_2S, PRI_GAME_QUICK5); + dmd_sched_transition (&trans_scroll_down); + dmd_alloc_pair_clean (); + font_render_string_center (&font_fipps, DMD_MIDDLE_X, DMD_BIG_CY_Top, "STANDUPS"); + font_render_string_center (&font_fipps, DMD_MIDDLE_X, DMD_BIG_CY_Bot, "1 MILLION"); + dmd_show_low(); + task_sleep (TIME_300MS); + + sound_start (ST_SPEECH, SPCH_WEEAHOO, SL_4S, PRI_GAME_QUICK5); + dmd_sched_transition (&trans_scroll_down); + dmd_alloc_pair_clean (); + huxley_animation_display_effect (IMG_HUXLEY_B1_START, IMG_HUXLEY_B1_END); + + sound_start (ST_SAMPLE, EXPLOSION, SL_2S, PRI_GAME_QUICK5); + dmd_sched_transition (&trans_scroll_down); + dmd_alloc_pair_clean (); + font_render_string_center (&font_fipps, DMD_MIDDLE_X, DMD_BIG_CY_Top, "REBOUNDS"); + font_render_string_center (&font_fipps, DMD_MIDDLE_X, DMD_BIG_CY_Bot, "1 MILLION"); + dmd_show_low(); + task_sleep (TIME_300MS); + + sound_start (ST_SPEECH, SPCH_EXCUSE_ME, SL_4S, PRI_GAME_QUICK5); + dmd_sched_transition (&trans_scroll_down); + dmd_alloc_pair_clean (); + huxley_animation_display_effect (IMG_HUXLEY_B2_START, IMG_HUXLEY_B2_END); + + sound_start (ST_SAMPLE, EXPLOSION, SL_2S, PRI_GAME_QUICK5); + dmd_sched_transition (&trans_scroll_down); + dmd_alloc_pair_clean (); + font_render_string_center (&font_fipps, DMD_MIDDLE_X, DMD_BIG_CY_Top, "ORBITS"); + font_render_string_center (&font_fipps, DMD_MIDDLE_X, DMD_BIG_CY_Bot, "1 MILLION"); + dmd_show_low(); + task_sleep (TIME_300MS); + + sound_start (ST_SPEECH, SPCH_WHAT_ARE_YOU_DOING, SL_4S, PRI_GAME_QUICK5); + dmd_sched_transition (&trans_scroll_down); + dmd_alloc_pair_clean (); + huxley_animation_display_effect (IMG_HUXLEY_D_START, IMG_HUXLEY_D_END); + + sound_start (ST_SAMPLE, EXPLOSION, SL_2S, PRI_GAME_QUICK5); + dmd_sched_transition (&trans_scroll_down); + dmd_alloc_pair_clean (); + font_render_string_center (&font_fipps, DMD_MIDDLE_X, DMD_BIG_CY_Top, "RAMPS"); + font_render_string_center (&font_fipps, DMD_MIDDLE_X, DMD_BIG_CY_Bot, "1 MILLION"); + dmd_show_low(); + task_sleep (TIME_300MS); + + sound_start (ST_SPEECH, SPCH_I_GOT_IT, SL_4S, PRI_GAME_QUICK5); + dmd_sched_transition (&trans_scroll_down); + dmd_alloc_pair_clean (); + huxley_animation_display_effect (IMG_HUXLEY_E_START, IMG_HUXLEY_E_END); + + sound_start (ST_SAMPLE, EXPLOSION, SL_2S, PRI_GAME_QUICK5); + dmd_sched_transition (&trans_scroll_down); + dmd_alloc_pair_clean (); + font_render_string_center (&font_fipps, DMD_MIDDLE_X, DMD_BIG_CY_Top, "SUBWAY"); + font_render_string_center (&font_fipps, DMD_MIDDLE_X, DMD_BIG_CY_Bot, "1 MILLION"); + dmd_show_low(); + task_sleep (TIME_300MS); + deff_exit (); +}//end of mode_effect_deff + + + + +void huxley_hit_sounds_task(void) { + sound_send (EXPLOSION1_SHORT); + task_sleep (TIME_100MS); + sound_send (EXPLOSION1_SHORT); + task_sleep (TIME_100MS); + sound_send (EXPLOSION1_SHORT); + task_sleep (TIME_100MS); + sound_send (EXPLOSION1_MED); + task_sleep (TIME_100MS); + sound_send (EXPLOSION1_LONG); + task_sleep (TIME_500MS); + sound_send (EXPLOSION1_LONG); + task_sleep (TIME_500MS); + sound_send (EXPLOSION1_LONG); + task_sleep (TIME_500MS); + + play_huxley_sounds(); + + task_exit(); +}//end of mode_effect_deff + + + + + +void huxley_hit_effect_deff(void) { + U8 huxley_MessageCounter; + huxley_MessageCounter = random_scaled(5); + dmd_clean_page_high ();// + dmd_clean_page_low ();// + + task_create_gid1 (GID_HUXLEY_HIT_SOUND, huxley_hit_sounds_task); + + switch (huxley_MessageCounter) { + default: + case 0: + huxley_animation_display_effect (IMG_HUXLEY_A_START, IMG_HUXLEY_A_END); + huxley_frame_with_words_display_fipps_effect (IMG_HUXLEY_A_END, DMD_MIDDLE_X - 30, DMD_BIG_CY_Bot, "1 MILLION"); + break; + case 1: + huxley_animation_display_effect (IMG_HUXLEY_B1_START, IMG_HUXLEY_B1_END); + huxley_frame_with_words_display_fipps_effect (IMG_HUXLEY_B1_END, DMD_MIDDLE_X - 30, DMD_BIG_CY_Bot, "HUXLEY"); + break; + case 2: + huxley_animation_display_effect (IMG_HUXLEY_B2_START, IMG_HUXLEY_B2_END); + huxley_frame_with_words_display_fipps_effect (IMG_HUXLEY_B2_END, DMD_MIDDLE_X - 30, DMD_BIG_CY_Bot, "1 MILLION"); + break; + case 3: + huxley_animation_display_effect (IMG_HUXLEY_D_START, IMG_HUXLEY_D_END); + huxley_frame_with_words_display_fipps_effect (IMG_HUXLEY_D_END, DMD_MIDDLE_X + 30, DMD_BIG_CY_Bot, "HUXLEY"); + break; + case 4: + huxley_animation_display_effect (IMG_HUXLEY_E_START, IMG_HUXLEY_E_END); + huxley_frame_with_words_display_fipps_effect (IMG_HUXLEY_E_END, DMD_MIDDLE_X - 30, DMD_BIG_CY_Bot, "HUXLEY"); + break; + }//end of switch + task_sleep_sec (1); + deff_exit (); +}//end of mode_effect_deff + + + + + +void huxley_effect_deff(void) { + U8 frame = 0; + U8 frame_counter = 0; + for (;;) { + //change the background every 5 seconds or so + if (++frame_counter % 10 == 0) { if (frame >= 11) frame = 0; else frame ++; play_huxley_sounds(); } + dmd_alloc_pair_clean(); + dmd_map_overlay (); + dmd_clean_page_low (); + dmd_draw_thin_border (dmd_low_buffer); + + sprintf_score(current_score); + font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_SMALL_CY_1, sprintf_buffer); + + sprintf ("%d", huxley_mode_timer); + font_render_string_center (&font_var5, DMD_MIDDLE_X - 50, DMD_SMALL_CY_5, sprintf_buffer); + font_render_string_center (&font_var5, DMD_MIDDLE_X + 50, DMD_SMALL_CY_5, sprintf_buffer); + sprintf_score (huxley_mode_score); + font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_SMALL_CY_5, sprintf_buffer); + switch (frame) { + case 0: font_render_string_center (&font_fipps, DMD_MIDDLE_X + 35, DMD_BIG_CY_Top + 5, "HUXLEY"); break; //ok + case 2: font_render_string_center (&font_fipps, DMD_MIDDLE_X + 35, DMD_BIG_CY_Bot, "HUXLEY"); break; //ok + case 4: font_render_string_center (&font_fipps, DMD_MIDDLE_X + 35, DMD_BIG_CY_Bot, "HUXLEY"); break; //ok + case 6: font_render_string_center (&font_fipps, DMD_MIDDLE_X + 35, DMD_BIG_CY_Bot, "HUXLEY"); break; //ok + case 8: font_render_string_center (&font_fipps, DMD_MIDDLE_X + 35, DMD_BIG_CY_Top + 5, "HUXLEY"); break; //ok + case 10: font_render_string_center (&font_fipps, DMD_MIDDLE_X - 35, DMD_BIG_CY_Top + 5, "HUXLEY"); break; //ok + }//end of switch + dmd_text_outline (); + dmd_alloc_pair (); + switch (frame) { + default: + case 0: frame_draw(IMG_HUXLEY_END_SCENE_START); break; + case 1: frame_draw(IMG_HUXLEY_END_SCENE_1); break; + case 2: frame_draw(IMG_HUXLEY_END_SCENE_2); break; + case 3: frame_draw(IMG_HUXLEY_END_SCENE_3); break; + case 4: frame_draw(IMG_HUXLEY_END_SCENE_4); break; + case 5: frame_draw(IMG_HUXLEY_END_SCENE_5); break; + case 6: frame_draw(IMG_HUXLEY_END_SCENE_6); break; + case 7: frame_draw(IMG_HUXLEY_END_SCENE_7); break; + case 8: frame_draw(IMG_HUXLEY_END_SCENE_8); break; + case 9: frame_draw(IMG_HUXLEY_END_SCENE_9); break; + case 10: frame_draw(IMG_HUXLEY_END_SCENE_10); break; + case 11: frame_draw(IMG_HUXLEY_END_SCENE_11); break; + }//end of switch + dmd_overlay_outline (); + dmd_show2 (); + task_sleep (TIME_500MS); + }//END OF ENDLESS LOOP +}//end of mode_effect_deff + + + + + + + + + + + +void huxley_info_effect_deff(void) { + U16 fno; + dmd_alloc_pair_clean (); + dmd_sched_transition (&trans_bitfade_slow); + + for (fno = IMG_HUXLEY_B2_START; fno <= IMG_HUXLEY_B2_END; fno += 2) { + dmd_map_overlay (); + dmd_clean_page_low (); + font_render_string_center (&font_fipps, DMD_MIDDLE_X - 20, DMD_BIG_CY_Bot, "HUXLEY"); + dmd_text_outline (); + dmd_alloc_pair (); + frame_draw(fno); + dmd_overlay_outline (); + dmd_show2 (); + task_sleep (TIME_100MS); + }//end of for loop + deff_exit (); +}//end of mode_effect_deff + + + diff --git a/machine/dm/inlanes.c b/machine/dm/inlanes.c new file mode 100644 index 000000000..92ebd47fb --- /dev/null +++ b/machine/dm/inlanes.c @@ -0,0 +1,285 @@ +/* + * demolition man + * inlanes.c + * + * written by James Cardona + * + * Location Description: + * inlanes are lanes that feed to flippers as opposed to outlanes which feed + * to the drain + * + * Scoring Description: (original game) + * an unlit or lit lane score 5770 + * if lit, you recieve whatever the light says - access claw on left + * will move the claw diverter to open it - when the diverter moves, the + * light goes out + * on the right inlane is quick freeze, getting this inlane will then + * light quick freeze light on left ramp and to freeze a ball you must then shoot + * the left ramp. The light quick freeze inlane light does not go out until + * the left ramp is shot and the ball is frozen + * + * access claw can be lit by completing MTL rollovers, + * + * Depending on machine settings, One, Two, or Three sets of + * standup targets must be completed to light Quick Freeze, depending on + * whether Quick Freeze is set to easy, medium, or hard. + * + * Scoring Description: (my rules) + * same as above + * + * + * */ +/* CALLSET_SECTION (inlanes, __machine__) */ + +#include +#include "dm/global_constants.h" + +//local variables +__local__ __boolean left_inlane_Access_Claw_activated; +__local__ __boolean right_inlane_Light_Quick_Freeze_activated; +__local__ U8 increment_access_claw_light; +__local__ U8 increment_quick_freeze_light; +//external variables + +//prototypes +void left_inlane_task (void); + + + +/**************************************************************************** + * initialize and exit + ***************************************************************************/ +void new_player_inlanes_reset (void) { + left_inlane_Access_Claw_activated = TRUE; + lamp_tristate_on(LM_ACCESS_CLAW); + right_inlane_Light_Quick_Freeze_activated = TRUE; + lamp_tristate_on(LM_LIGHT_QUICK_FREEZE); + increment_access_claw_light = 0; + increment_quick_freeze_light = 1; +}//end of reset + + + +CALLSET_ENTRY (inlanes, start_player) { new_player_inlanes_reset(); } + +CALLSET_ENTRY (inlanes, start_ball) { + if (left_inlane_Access_Claw_activated) lamp_tristate_on (LM_ACCESS_CLAW); + if (right_inlane_Light_Quick_Freeze_activated) lamp_tristate_on (LM_LIGHT_QUICK_FREEZE); +}//end of function + + + + +/**************************************************************************** + * left inlane + * + * access claw can be lit by completing MTL rollovers, random award from top hole, + * random award from computer (subway shot) or completing certain number of + * arrow shots + ***************************************************************************/ +void increment_access_claw_light_on(void) { + increment_access_claw_light++; + if (!left_inlane_Access_Claw_activated) access_claw_light_on(); +}//end of function + + + +void check_access_claw_relight (void) { + if (increment_access_claw_light) access_claw_light_on(); +}//end of function + + + +void access_claw_light_on(void) { + increment_access_claw_light--; + left_inlane_Access_Claw_activated = TRUE; + lamp_tristate_flash(LM_ACCESS_CLAW); + task_sleep (TIME_500MS); + lamp_tristate_on (LM_ACCESS_CLAW); +}//end of function + + + +void access_claw_light_off(void) { + left_inlane_Access_Claw_activated = FALSE; + lamp_tristate_flash(LM_ACCESS_CLAW); + task_sleep (TIME_500MS); + lamp_tristate_off (LM_ACCESS_CLAW); +}//end of function + + +//this task is here to detect a HUXLEY shot +void left_inlane_task (void) { task_sleep_sec(1); task_sleep (TIME_500MS); task_exit(); } + + + +U8 light_tester; +CALLSET_ENTRY (inlanes, sw_left_inlane) { + if (++light_tester >=8) light_tester = 0; + switch (light_tester) { + case 0: leff_start (LEFF_INLANE_QUICK_FREEZE); break; + case 1: leff_start (LEFF_INLANE_CRYOCLAW); break; +// case 2: leff_start (LEFF_GI_CYCLE); break; +// case 3: leff_start (LEFF_NO_GI_TWOSEC); break; +// case 4: leff_start (LEFF_NO_GI_ONESEC); break; +// case 5: leff_start (LEFF_TURN_ON_GI); break; +// case 6: leff_start (LEFF_FLASH_ALL); break; +// case 7: leff_start (LEFF_FLASH_GI); break; + }//end of switch + + task_create_gid1 (GID_LEFT_INLANE_MADE, left_inlane_task); + score(INLANE_SCORE); + sound_start (ST_SAMPLE, INLANE_SOUND, SL_2S, PRI_GAME_QUICK5); + if ( !flag_test(FLAG_IS_R_RAMP_CLAWREADY) + && !flag_test(FLAG_BACK_IN_THE_FRIDGE_RUNNING) + && left_inlane_Access_Claw_activated + && !flag_test(FLAG_IS_CARCHASE_MODE_RUNNING) + && !flag_test(FLAG_IS_EXPLODE_MODE_RUNNING) + && !flag_test(FLAG_IS_FORTRESS_MB_RUNNING) + && !flag_test(FLAG_IS_MUSEUM_MB_RUNNING) + && !flag_test(FLAG_IS_CRYOPRISON_MB_RUNNING) + && !flag_test(FLAG_IS_WASTELAND_MB_RUNNING) + && !flag_test (FLAG_IS_CAPSIM_RIGHTRAMP_ACTIVATED) + && !flag_test (FLAG_IS_HUXLEY_RUNNING) + && !flag_test(FLAG_IS_DEMOTIME_RUNNING) ){ + rramp_clawready_on();//at ramps.c - diverter moved there + access_claw_light_off(); + sound_start (ST_SPEECH, SPCH_CRYOCLAW_ACTIVATED, SL_4S, PRI_GAME_QUICK5); + deff_start (DEFF_CLW_INLANES_EFFECT); + }//end of if +}//end of function + + + +/**************************************************************************** + * right inlane + ***************************************************************************/ +void increment_light_quick_freeze_light (void) { + increment_quick_freeze_light++; + if (!right_inlane_Light_Quick_Freeze_activated) access_claw_light_on(); +}//end of function + + + +void light_quick_freeze_light_on (void) { + right_inlane_Light_Quick_Freeze_activated = TRUE; + sound_start (ST_SPEECH, SPCH_QUICK_FREEZE_ACTIVATED, SL_4S, PRI_GAME_QUICK5); + lamp_tristate_flash(LM_LIGHT_QUICK_FREEZE); + task_sleep (TIME_500MS); + lamp_tristate_on (LM_LIGHT_QUICK_FREEZE); +}//end of function + + +//called by lock_freeze...c when left ramp is hit and freeze is inc'ed +void light_quick_freeze_light_off(void) { + if (--increment_quick_freeze_light <= 0){ + increment_quick_freeze_light = 0; + right_inlane_Light_Quick_Freeze_activated = FALSE; + lamp_tristate_flash(LM_LIGHT_QUICK_FREEZE); + task_sleep (TIME_500MS); + lamp_tristate_off (LM_LIGHT_QUICK_FREEZE); + } +}//end of function + + + +CALLSET_ENTRY (inlanes, sw_right_inlane) { + score(INLANE_SCORE); + sound_start (ST_SAMPLE, INLANE_SOUND, SL_2S, PRI_GAME_QUICK5); + if (!flag_test(FLAG_IS_LRAMP_QUICKFREEZE_ACTIVATED) && right_inlane_Light_Quick_Freeze_activated) { + activate_left_ramp_quickfreeze();//at ramps.c + deff_start (DEFF_QF_INLANES_EFFECT); + } +}//end of function + + +/**************************************************************************** + * + * sound effects + * + ****************************************************************************/ + + + + +/**************************************************************************** + * + * lighting effects + * + ****************************************************************************/ +void inlane_quick_freeze_leff (void) { + U8 i; + for (i = 0; i < 5; i++) { + lamplist_apply (LAMPLIST_LEFT_RAMP_AWARDS, leff_toggle); + task_sleep (TIME_66MS); + }//end of loop + leff_exit (); +}//end of function + + + +void inlane_cryoclaw_leff (void) { + U8 i; + for (i = 0; i < 5; i++) { + lamplist_apply (LAMPLIST_RIGHT_RAMP_AWARDS, leff_toggle); + task_sleep (TIME_33MS); + }//end of loop + leff_exit (); +}//end of function + + + + +/**************************************************************************** + * + * display effects + * + ****************************************************************************/ +//the image is 4 color in 2 panes, so we must increment by 2's not 1's +U8 inlanes_cryoclaw_effect_deff_table[] = { 0, 2, 4, 4, 2, 0, //left stays up, right goes down and up --6 frames + 0, 6, 8, 10, 10, 8, 6, 0 }; //left goes down and up, right stays up --8 frames + +void clw_inlanes_effect_deff(void) { + U8 i; + for (i = 0; i < 14; i++) { + dmd_map_overlay (); + dmd_clean_page_low (); + font_render_string_center (&font_fixed6, DMD_MIDDLE_X, DMD_BIG_CY_Top, "CRYO CLAW"); + font_render_string_center (&font_fixed6, DMD_MIDDLE_X, DMD_BIG_CY_Bot, "RIGHT RAMP"); + dmd_text_outline (); + dmd_alloc_pair (); + frame_draw(IMG_CRYOPRISON_RUN_0 + inlanes_cryoclaw_effect_deff_table[i]); + dmd_overlay_outline (); + dmd_show2 (); + task_sleep (TIME_100MS); + }//END OF LOOP + task_sleep_sec (1); + deff_exit (); +}//end of mode_effect_deff + + + + + +void qf_inlanes_effect_deff(void) { + U16 fno; + for (fno = IMG_FREEZE_A_START; fno <= IMG_FREEZE_A_END; fno += 2) { + dmd_alloc_pair_clean (); + frame_draw(fno); + dmd_show2 (); + task_sleep (TIME_100MS); + }//end of inner loop + dmd_alloc_pair_clean ();// Clean both pages + dmd_map_overlay (); + dmd_clean_page_low (); + font_render_string_center (&font_fixed6, DMD_MIDDLE_X, DMD_BIG_CY_Top, "QUICK FREEZE"); + font_render_string_center (&font_fixed6, DMD_MIDDLE_X, DMD_BIG_CY_Bot, "LEFT RAMP"); + dmd_text_outline (); + dmd_alloc_pair (); + frame_draw(IMG_FREEZE_A_END); + dmd_overlay_outline (); + dmd_show2 (); + task_sleep_sec (1); + deff_exit (); +}//end of mode_effect_deff + diff --git a/machine/dm/jackpots.c b/machine/dm/jackpots.c new file mode 100644 index 000000000..d2a4e6d13 --- /dev/null +++ b/machine/dm/jackpots.c @@ -0,0 +1,137 @@ +/* + * demolition man + * jackpots.c + * + * written by James Cardona + * + * + */ + + +#include +#include "dm/global_constants.h" + + + +//constants +const U8 lramp_mask = 0x1; +const U8 rramp_mask = 0x2; +const U8 sramp_mask = 0x4; +const U8 cramp_mask = 0x8; +const U8 lloop_mask = 0x10; //since this is hex, 10h = 16d +const U8 rloop_mask = 0x20; //since this is hex, 20h = 32d +const U8 ugrnd_mask = 0x40; //since this is hex, 40h = 64d + +//local variables + +//external variables + +//prototypes + +/**************************************************************************** + * initialize and exit + ***************************************************************************/ +void jackpot_reset (void) { + lramp_jackpot_light_off(); + rramp_jackpot_light_off(); + sramp_jackpot_light_off(); + cramp_jackpot_light_off(); + underground_jackpot_light_off(); + ll_jackpot_light_off(); + rl_jackpot_light_off(); + end_super_jackpot_reminder(); +}//end of function + + + +CALLSET_ENTRY (jackpot, start_player, start_ball) { jackpot_reset(); } + + + + + +/**************************************************************************** + * body + * + ****************************************************************************/ +void score_jackpot(void) { + if (flag_test(FLAG_IS_FORTRESS_MB_RUNNING) ) fortress_jackpot_made(); + else if (flag_test(FLAG_IS_MUSEUM_MB_RUNNING) ) museum_jackpot_made(); + else if (flag_test(FLAG_IS_CRYOPRISON_MB_RUNNING) ) cryoprison_jackpot_made(); + else if (flag_test(FLAG_IS_WASTELAND_MB_RUNNING) ) wasteland_jackpot_made(); + else if (flag_test(FLAG_IS_DEMOTIME_RUNNING) ) demotime_jackpot_made(); +}//END OF FUNCTION + + + +void score_super_jackpot (void) { + if (flag_test(FLAG_IS_FORTRESS_MB_RUNNING) ) fortress_award_super_jackpot(); + else if (flag_test(FLAG_IS_MUSEUM_MB_RUNNING) ) museum_award_super_jackpot(); + else if (flag_test(FLAG_IS_CRYOPRISON_MB_RUNNING) ) cryoprison_award_super_jackpot(); + else if (flag_test(FLAG_IS_WASTELAND_MB_RUNNING) ) wasteland_award_super_jackpot(); + + end_super_jackpot_reminder(); +}//end of function + + + + +void choose_single_jackpot(void) { + U8 random_chooser; + random_chooser = random_scaled(6); // choose random # from 0 to 6 + U8 mask = 1;//make a 1 bit flag so that only 1 jackpot is lit + mask <<= random_chooser;//slide the bit over a random # of times - could be 0 + //turn on the appropriate jackpot + //TODO: handle jackpots already picked + if (lramp_mask & mask) lramp_jackpot_light_on(); + if (rramp_mask & mask) rramp_jackpot_light_on(); + if (sramp_mask & mask) sramp_jackpot_light_on(); + if (cramp_mask & mask) cramp_jackpot_light_on(); + if (lloop_mask & mask) ll_jackpot_light_on(); + if (rloop_mask & mask) rl_jackpot_light_on(); + if (ugrnd_mask & mask) underground_jackpot_light_on(); +}//end of function + + + +void choose_random_jackpot(void) { + jackpot_reset (); + task_sleep (TIME_33MS); + choose_single_jackpot(); + all_arrow_update(); // at arrow_handler.c +}//end of function + + + +//the most we will choose here is 3 +void choose_multiple_random_jackpot(U8 numOfJackpots) { + jackpot_reset (); + task_sleep (TIME_33MS); + if (numOfJackpots > 5) set_all_jackpots (); + else { + U8 i; + for (i = 0; i < numOfJackpots; i++) { + choose_single_jackpot(); + }//end of loop + all_arrow_update(); // at arrow_handler.c + }//end of else +}//end of function + + + +//this only used for wizard modes --- CURRENTLY ONLY DEMO TIME +void set_all_jackpots (void) { + lramp_jackpot_light_on(); + rramp_jackpot_light_on(); + sramp_jackpot_light_on(); + cramp_jackpot_light_on(); + ll_jackpot_light_on(); + rl_jackpot_light_on(); + underground_jackpot_light_on(); + all_arrow_update(); // at arrow_handler.c +}//end of function + + + + + diff --git a/machine/dm/jets.c b/machine/dm/jets.c new file mode 100644 index 000000000..3a93d78ba --- /dev/null +++ b/machine/dm/jets.c @@ -0,0 +1,287 @@ +/* + * demolition man + * jets.c + * + * written by James Cardona + * + * Location Description: + * Jet Bumpers: There are two regular jet bumpers and a top slingshot + * which scores the same as a jet bumper. They advance the + * Retina Scan value. The left jet bumper can also be hit from + * the center ramp -- it acts as the right wall of the center ramp. + * + * Scoring Description: (original game) + * The Jet Bumpers increase the Retina Value.(eyeball) + * It starts at 5M and goes up 100K per jet. + * There are two Jet Bumpers and one slingshot ... the slingshot counts as a jet bumper. + * Jet Bumpers award 250k a Pop. + * superjets mode award 1 million each + * + * Scoring Description: (my rules) + * same as above except + * superjets mode award 2 million each + * successive modes award more + * + * estimate of average superjets mode score: 20 million to 80 million + * estimate of average jets score: 2.5 million + * + */ +/*this is not needed ---> ALLSET_SECTION (jets, __common__) */ +//this file is currently being compiled into the common page since we have ran out of +//room on the other 5 pages. check common/makefile and platform/wpc/generic.md + + + +#include +#include "dm/global_constants.h" +#include "jets.h" + + +//constants +const U8 JETS_EASY_GOAL = 25; +const U8 JETS_HARD_GOAL = 50; +const U8 JETS_GOAL_STEP = 15; +const U8 JETS_GOAL_MAX = 150; + +//local variables +U8 jet_goal; +U8 mode_jet_shots_made; +U8 jets_modes_achieved; +__boolean jets_inBall_search; +score_t jets_temp_score; +__local__ U8 jet_shots_made;//external ref to eject.c + +//external variables + +//internally called function prototypes --external found at protos.h +void jet_flasher(void); +void jets_effect_deff(void); +void jet_goal_reset(void); +void jet_goal_award(void); +void player_jet_goal_reset(void); + + +/**************************************************************************** + * initialize and exit + ***************************************************************************/ +void jet_goal_reset (void) { + jets_inBall_search = FALSE; +}//end of function + +void player_jet_goal_reset (void) { + mode_jet_shots_made = 0; + jet_shots_made = 0; + jets_modes_achieved = 0; + jet_goal = JETS_EASY_GOAL; + jet_goal_reset(); + +#ifdef CONFIG_DIFFICULTY_LEVEL + if (system_config.difficulty == EASY) jet_goal = JETS_EASY_GOAL; + else jet_goal = JETS_HARD_GOAL; +#endif +}//end of function + +CALLSET_ENTRY (jets, start_player) { player_jet_goal_reset (); } +CALLSET_ENTRY (jets, start_ball) { jet_goal_reset (); } +CALLSET_ENTRY (jets, ball_search) { jets_inBall_search = TRUE; } +CALLSET_ENTRY (jets, ball_search_end) { jets_inBall_search = FALSE; } + + +/**************************************************************************** + * + * body + * + ***************************************************************************/ +void jet_goal_award (void) { + mode_jet_shots_made = 0; + switch (++jets_modes_achieved) { //score higher if mode done more than once + case 0: break; //never entered mode + case 1: score (JETS_GOAL_SCORE1); break; + case 2: score (JETS_GOAL_SCORE2); break; + case 3: score (JETS_GOAL_SCORE3); break; + case 4: score (JETS_GOAL_SCORE4); break; + default: score (JETS_GOAL_SCORE5); break; + }//end of switch + sound_start (ST_SAMPLE, EXPLOSION, SL_2S, PRI_GAME_QUICK5); + deff_start (DEFF_JETS_COMPLETED_EFFECT); + if (jet_goal < JETS_GOAL_MAX) jet_goal += JETS_GOAL_STEP; + //light access claw + increment_access_claw_light_on();//at inlanes.c +}//END OF FUNCTION + + + +CALLSET_ENTRY (jets, sw_jet) { + if (!jets_inBall_search) { + if (flag_test (FLAG_IS_PBREAK_RUNNING) ) { prison_break_made(); } + else if (!flag_test (FLAG_IS_SUPERJETS_RUNNING) ) {//not in super jets mode + ++jet_shots_made; + ++mode_jet_shots_made; + score(JETS_HIT_SCORE); + if (mode_jet_shots_made >= jet_goal) jet_goal_award ();//sound played in call + else deff_start (DEFF_JETS_EFFECT);//under /kernel/deff.c + }//end of not in superjets mode + sound_start (ST_EFFECT, MACHINE3, SL_1S, PRI_GAME_QUICK5); + flasher_pulse (FLASH_JETS_FLASHER); + } +}//end of function + + + + +/**************************************************************************** + * + * DMD display effects + * + ****************************************************************************/ +void jets_effect_deff(void) { + U8 i = 0; + if (IN_TEST) { + jet_shots_made += 4; + jet_goal = 20; + jets_modes_achieved++; + } + score_zero (jets_temp_score); //zero out temp score + + if (jets_modes_achieved % 2 == 0) { //DISPLAY THIS ON EVEN NUMBERED JETS MODES + switch (jets_modes_achieved) { //score higher if mode done more than once + case 0: score_add (jets_temp_score, score_table[JETS_GOAL_SCORE1]); break; + case 1: score_add (jets_temp_score, score_table[JETS_GOAL_SCORE2]); break; + case 2: score_add (jets_temp_score, score_table[JETS_GOAL_SCORE3]); break; + case 3: score_add (jets_temp_score, score_table[JETS_GOAL_SCORE4]); break; + default: score_add (jets_temp_score, score_table[JETS_GOAL_SCORE5]); break; + }//end of switch + do { + dmd_alloc_low_clean (); + dmd_draw_thin_border (dmd_low_buffer); + + if (i < 2 ) bitmap_blit (box1_bits, 95, 0); + else if (i < 4 ) bitmap_blit (box2_bits, 95, 0); + else if (i < 6 ) bitmap_blit (box3_bits, 95, 0); + else if (i < 8 ) bitmap_blit (box4_bits, 95, 0); + else if (i < 10 ) bitmap_blit (box5_bits, 95, 0); + else if (i < 12 ) bitmap_blit (box6_bits, 95, 0); + else if (i < 14 ) bitmap_blit (box5_bits, 95, 0); + else if (i < 16 ) bitmap_blit (box4_bits, 95, 0); + else if (i < 18 ) bitmap_blit (box3_bits, 95, 0); + else if (i < 20 ) bitmap_blit (box2_bits, 95, 0); + else bitmap_blit (box1_bits, 95, 0); + + psprintf ("1 JET", "%d JETS", mode_jet_shots_made); + font_render_string_center (&font_fixed6, DMD_MIDDLE_X - 20, DMD_MED_CY_1, sprintf_buffer); + sprintf ("%d FOR BONUS", jet_goal-mode_jet_shots_made); + font_render_string_center (&font_term6, DMD_MIDDLE_X - 20, DMD_MED_CY_2, sprintf_buffer); + sprintf_score (jets_temp_score); + font_render_string_center (&font_fixed6, DMD_MIDDLE_X - 20, DMD_MED_CY_3, sprintf_buffer); + dmd_show_low (); + task_sleep (TIME_66MS); + } while (i++ < 22); + }//end of if + else { // DISPLAY THIS ON ODD NUMBERED JETS MODES + score_add (jets_temp_score, score_table[SC_100K]); + score_mul (jets_temp_score, jet_shots_made); //multiply 100K by jet count + score_add (jets_temp_score, score_table[EJECT_SCORE]); //add in normal retina scan score + + do { + dmd_alloc_low_clean (); + dmd_draw_thin_border (dmd_low_buffer); + if (i < 3 ) bitmap_blit (jets_eye3_bits, 2, 4); + else if (i < 6 ) bitmap_blit (jets_eye4_bits, 2, 4); + else if (i < 9 ) bitmap_blit (jets_eye5_bits, 2, 4); + else if (i < 12 ) bitmap_blit (jets_eye6_bits, 2, 4); + else if (i < 15 ) bitmap_blit (jets_eye5_bits, 2, 4); + else if (i < 18 ) bitmap_blit (jets_eye4_bits, 2, 4); + else bitmap_blit (jets_eye3_bits, 2, 4); + + sprintf ("JETS"); + font_render_string_center (&font_fixed6, DMD_MIDDLE_X, DMD_MED_CY_1, sprintf_buffer); + + sprintf ("INCREASE"); + font_render_string_center (&font_var5, DMD_MIDDLE_X + 39, DMD_MED_CY_1, sprintf_buffer); + + sprintf ("RETINA SCAN"); + font_render_string_center (&font_fixed6, DMD_MIDDLE_X + 18, DMD_MED_CY_2 + 1, sprintf_buffer); + + sprintf_score (jets_temp_score); + font_render_string_center (&font_term6, DMD_MIDDLE_X + 20, DMD_MED_CY_3, sprintf_buffer); + + dmd_show_low (); + task_sleep (TIME_66MS); + } while (i++ < 21); + }//end of else + deff_exit (); +}//end of jets_effect_deff + + + + + + +void jets_completed_effect_deff(void) { + U8 i = 0; + score_zero (jets_temp_score); //zero out temp score + switch (jets_modes_achieved) { //score higher if mode done more than once + case 1: score_add (jets_temp_score, score_table[JETS_GOAL_SCORE1]); break; + case 2: score_add (jets_temp_score, score_table[JETS_GOAL_SCORE2]); break; + case 3: score_add (jets_temp_score, score_table[JETS_GOAL_SCORE3]); break; + case 4: score_add (jets_temp_score, score_table[JETS_GOAL_SCORE4]); break; + default: score_add (jets_temp_score, score_table[JETS_GOAL_SCORE5]); break; + }//end of switch + + + if (jets_modes_achieved % 2 == 0) { //DISPLAY THIS ON EVEN NUMBERED JETS MODES + do { + dmd_alloc_low_clean (); + dmd_draw_thin_border (dmd_low_buffer); + if (i < 3 ) bitmap_blit (jets_eye3_bits, 2, 4); + else if (i < 6 ) bitmap_blit (jets_eye4_bits, 2, 4); + else if (i < 9 ) bitmap_blit (jets_eye5_bits, 2, 4); + else if (i < 12 ) bitmap_blit (jets_eye6_bits, 2, 4); + else if (i < 15 ) bitmap_blit (jets_eye5_bits, 2, 4); + else if (i < 18 ) bitmap_blit (jets_eye4_bits, 2, 4); + else bitmap_blit (jets_eye3_bits, 2, 4); + + sprintf ("JETS"); + font_render_string_center (&font_fixed6, DMD_MIDDLE_X + 18, DMD_MED_CY_1, sprintf_buffer); + + sprintf ("COMPLETED"); + font_render_string_center (&font_fixed6, DMD_MIDDLE_X + 18, DMD_MED_CY_2 + 1, sprintf_buffer); + + sprintf_score (jets_temp_score); + font_render_string_center (&font_term6, DMD_MIDDLE_X + 20, DMD_MED_CY_3, sprintf_buffer); + + dmd_show_low (); + task_sleep (TIME_66MS); + } while (i++ < 21); + }//end of if + else { // DISPLAY THIS ON ODD NUMBERED JETS MODES + do { + dmd_alloc_low_clean (); + dmd_draw_thin_border (dmd_low_buffer); + + if (i < 2 ) bitmap_blit (box1_bits, 95, 0); + else if (i < 4 ) bitmap_blit (box2_bits, 95, 0); + else if (i < 6 ) bitmap_blit (box3_bits, 95, 0); + else if (i < 8 ) bitmap_blit (box4_bits, 95, 0); + else if (i < 10 ) bitmap_blit (box5_bits, 95, 0); + else if (i < 12 ) bitmap_blit (box6_bits, 95, 0); + else if (i < 14 ) bitmap_blit (box5_bits, 95, 0); + else if (i < 16 ) bitmap_blit (box4_bits, 95, 0); + else if (i < 18 ) bitmap_blit (box3_bits, 95, 0); + else if (i < 20 ) bitmap_blit (box2_bits, 95, 0); + else bitmap_blit (box1_bits, 95, 0); + + sprintf ("JETS"); + font_render_string_center (&font_fixed6, DMD_MIDDLE_X - 20, DMD_MED_CY_1, sprintf_buffer); + sprintf ("COMPLETED"); + font_render_string_center (&font_term6, DMD_MIDDLE_X - 20, DMD_MED_CY_2, sprintf_buffer); + sprintf_score (jets_temp_score); + font_render_string_center (&font_fixed6, DMD_MIDDLE_X - 20, DMD_MED_CY_3, sprintf_buffer); + dmd_show_low (); + task_sleep (TIME_66MS); + } while (i++ < 22); + }//end of else + deff_exit (); +}//end of mode_effect_deff + + diff --git a/machine/dm/leffs.c b/machine/dm/leffs.c new file mode 100644 index 000000000..0c045eed0 --- /dev/null +++ b/machine/dm/leffs.c @@ -0,0 +1,207 @@ +/* CALLSET_SECTION (leffs, __machine3__) */ + +#include + + +//cycle through one GI string at a time +void gi_cycle_leff (void) { +// U8 i, j; +// gi_leff_enable (PINIO_GI_STRINGS); +/* + for (j = 0; j < 3; j++) { + for (i = 0; i < 3; i++) { + gi_leff_disable (TRIAC_GI_STRING (i) ); + task_sleep (TIME_100MS); + gi_leff_enable (TRIAC_GI_STRING (i) ); + task_sleep (TIME_100MS); + }//end of loop + }//end of loop +*/ + gi_leff_disable (TRIAC_GI_STRING (0) ); + sound_start (ST_ANY, SPCH_PLAYER_ONE, SL_1S, PRI_GAME_QUICK5); + task_sleep (TIME_500MS); + task_sleep (TIME_500MS); + gi_leff_enable (TRIAC_GI_STRING (0) ); + task_sleep (TIME_500MS); + task_sleep (TIME_500MS); + + gi_leff_disable (TRIAC_GI_STRING (1) ); + sound_start (ST_ANY, SPCH_PLAYER_ONE, SL_1S, PRI_GAME_QUICK5); + task_sleep (TIME_500MS); + task_sleep (TIME_500MS); + gi_leff_enable (TRIAC_GI_STRING (1) ); + task_sleep (TIME_500MS); + task_sleep (TIME_500MS); + + gi_leff_disable (TRIAC_GI_STRING (2) ); + sound_start (ST_ANY, SPCH_PLAYER_TWO, SL_1S, PRI_GAME_QUICK5); + task_sleep (TIME_500MS); + task_sleep (TIME_500MS); + gi_leff_enable (TRIAC_GI_STRING (2) ); + task_sleep (TIME_500MS); + task_sleep (TIME_500MS); + + gi_leff_disable (TRIAC_GI_STRING (3) ); + sound_start (ST_ANY, SPCH_PLAYER_THREE, SL_1S, PRI_GAME_QUICK5); + task_sleep (TIME_500MS); + task_sleep (TIME_500MS); + gi_leff_enable (TRIAC_GI_STRING (3) ); + task_sleep (TIME_500MS); + task_sleep (TIME_500MS); + + gi_leff_disable (TRIAC_GI_STRING (4) ); + sound_start (ST_ANY, SPCH_PLAYER_FOUR, SL_1S, PRI_GAME_QUICK5); + task_sleep (TIME_500MS); + task_sleep (TIME_500MS); + gi_leff_enable (TRIAC_GI_STRING (4) ); + task_sleep (TIME_500MS); + task_sleep (TIME_500MS); + +// gi_leff_enable (PINIO_GI_STRINGS); +}// end of function + + + +// turn off GIs for a time +void no_gi_onesec_leff (void) { + gi_leff_disable (PINIO_GI_STRINGS); + task_sleep_sec (1); + gi_leff_enable (PINIO_GI_STRINGS); + task_sleep_sec (1); + leff_exit (); +}// end of function + + + + +// turn off GIs for a time +void no_gi_twosec_leff (void) { + gi_leff_disable (PINIO_GI_STRINGS); + task_sleep_sec (2); + gi_leff_enable (PINIO_GI_STRINGS); + task_sleep_sec (1); + leff_exit (); +}// end of function + + + +void turn_off_gi_leff (void) { + gi_disable (PINIO_GI_STRINGS); + task_sleep_sec (1); + leff_exit (); +}// end of function + + + +void turn_on_gi_leff (void) { + gi_enable (PINIO_GI_STRINGS); + task_sleep_sec (1); + leff_exit (); +}// end of function + + + + +void flash_all_leff (void) { + U8 i; + lamplist_set_apply_delay (0); + gi_leff_enable (PINIO_GI_STRINGS); + lamplist_apply_leff_alternating (LAMPLIST_AMODE_ALL, 0); //turn all lamps off + for (i=0; i < 28; i++) { + lamplist_apply (LAMPLIST_AMODE_ALL, leff_toggle); //toggle + task_sleep (TIME_66MS); + }//end of loop + lamplist_apply (LAMPLIST_AMODE_ALL, leff_on); // + task_sleep_sec (1); + leff_exit (); +}// end of function + + + + +void bot2top_leff (void) { + lamplist_set_apply_delay (TIME_16MS); +// gi_leff_enable (PINIO_GI_STRINGS); +// lamplist_apply_leff_alternating (LAMPLIST_AMODE_ALL, 0); //turn all lamps off + + lamplist_apply (LAMPLIST_BOTTOM_TOP, leff_toggle); //toggle + task_sleep (TIME_500MS); + + lamplist_apply (LAMPLIST_TOP_BOTTOM, leff_toggle); //toggle + task_sleep (TIME_500MS); + +// lamplist_apply (LAMPLIST_AMODE_ALL, leff_on); // + task_sleep_sec (1); + leff_exit (); +}// end of function + + + + +void top2bot_leff (void) { + lamplist_set_apply_delay (TIME_16MS); +// gi_leff_enable (PINIO_GI_STRINGS); +// lamplist_apply_leff_alternating (LAMPLIST_AMODE_ALL, 0); //turn all lamps off + + lamplist_apply (LAMPLIST_TOP_BOTTOM, leff_toggle); //toggle + task_sleep (TIME_500MS); + + lamplist_apply (LAMPLIST_BOTTOM_TOP, leff_toggle); //toggle + task_sleep (TIME_500MS); + +// lamplist_apply (LAMPLIST_AMODE_ALL, leff_on); // + task_sleep_sec (1); + leff_exit (); +}// end of function + + + + +void left2right_leff (void) { + lamplist_set_apply_delay (TIME_16MS); +// gi_leff_enable (PINIO_GI_STRINGS); +// lamplist_apply_leff_alternating (LAMPLIST_AMODE_ALL, 0); //turn all lamps off + + lamplist_apply (LAMPLIST_LEFT_RIGHT, leff_toggle); //toggle + task_sleep (TIME_500MS); + + lamplist_apply (LAMPLIST_RIGHT_LEFT, leff_toggle); //toggle + task_sleep (TIME_500MS); + +// lamplist_apply (LAMPLIST_AMODE_ALL, leff_on); // + task_sleep_sec (1); + leff_exit (); +}// end of function + + + + +void right2left_leff (void) { + lamplist_set_apply_delay (TIME_16MS); +// gi_leff_enable (PINIO_GI_STRINGS); +// lamplist_apply_leff_alternating (LAMPLIST_AMODE_ALL, 0); //turn all lamps off + + lamplist_apply (LAMPLIST_RIGHT_LEFT, leff_toggle); //toggle + task_sleep (TIME_500MS); + + lamplist_apply (LAMPLIST_LEFT_RIGHT, leff_toggle); //toggle + task_sleep (TIME_500MS); + +// lamplist_apply (LAMPLIST_AMODE_ALL, leff_on); // + task_sleep_sec (1); + leff_exit (); +}// end of function + + + +void flash_gi_leff (void) { + U8 i; + for (i = 1; i < 7; i++) { + gi_leff_disable (PINIO_GI_STRINGS); + task_sleep (TIME_100MS); + gi_leff_enable (PINIO_GI_STRINGS); + task_sleep (TIME_100MS); + }//end of loop + gi_leff_enable (PINIO_GI_STRINGS); + leff_exit (); +}// end of function diff --git a/machine/dm/lock_freeze_mbstart.c b/machine/dm/lock_freeze_mbstart.c new file mode 100644 index 000000000..a90425e22 --- /dev/null +++ b/machine/dm/lock_freeze_mbstart.c @@ -0,0 +1,282 @@ +/* + * demolition man + * lock_freeze_mbstart.c + * + * written by James Cardona + * + * handles the lock freezes and the trigger of multiballs + * + * + */ +/* CALLSET_SECTION (lock_freeze_mbstart, __machine3__) */ + +#include +#include "dm/global_constants.h" + + +//local variables +__local__ U8 NumBallsFrozen; +__local__ U8 NumMBsDone; + U8 lock_SoundCounter; +__local__ U8 NumBallsNeededForNextMB; + U8 freeze_MessageCounter; +//external variables + +//internally called function prototypes --external found at protos.h +void lock_reset (void); +void lfmb_ball_reset (void); +void lfmb_player_reset (void); +void check_multiball_requirements(void); + +/**************************************************************************** + * initialize and exit + ***************************************************************************/ +void lock_reset (void) { + multiball_light_off();//goto orbits.c to turn off light and flag +}//end of reset + + + +void lfmb_ball_reset (void) { + switch (NumBallsFrozen) { + case 1: lamp_tristate_on (LM_FREEZE_1); break; + case 2: + lamp_tristate_on (LM_FREEZE_1); + lamp_tristate_on (LM_FREEZE_2); + break; + case 3: + lamp_tristate_on (LM_FREEZE_1); + lamp_tristate_on (LM_FREEZE_2); + lamp_tristate_on (LM_FREEZE_3); + break; + case 4: + lamp_tristate_on (LM_FREEZE_1); + lamp_tristate_on (LM_FREEZE_2); + lamp_tristate_on (LM_FREEZE_3); + lamp_tristate_on (LM_FREEZE_4); + break; + }//end of switch +} + + + +void lfmb_player_reset (void) { + lock_reset(); + NumBallsFrozen = 0; + lock_SoundCounter = 0; + NumMBsDone = 0; + NumBallsNeededForNextMB = 1; + freeze_MessageCounter = 0; +}//end of function + + + +CALLSET_ENTRY (lock_freeze_mbstart, start_player) { lfmb_player_reset(); } +CALLSET_ENTRY (lock_freeze_mbstart, start_ball) { lfmb_ball_reset(); } + +/**************************************************************************** + * body + * + ***************************************************************************/ +CALLSET_ENTRY (lock_freeze_mbstart, music_refresh) { + if (in_live_game && flag_test(FLAG_IS_MULTIBALL_ENABLED) ) music_request (MUS_MB_READY, PRI_GAME_MODE1);//must be higher priority than PRI_SCORES +}//end of function + + + +void maximize_freeze(void) { + NumBallsFrozen = 4; //see note below + increment_freeze(); //will add another here +}//end of function + + + + +void increment_freeze(void) { + sound_start (ST_EFFECT, LOCK_FREEZE_PLOINK, SL_1S, PRI_GAME_QUICK1); + if (NumBallsFrozen < 5) + switch (++NumBallsFrozen) { + case 1: + lamp_tristate_flash(LM_FREEZE_1); + task_sleep (TIME_500MS); + lamp_tristate_on (LM_FREEZE_1); + break; + case 2: + lamp_tristate_flash(LM_FREEZE_2); + task_sleep (TIME_500MS); + lamp_tristate_on (LM_FREEZE_1); + lamp_tristate_on (LM_FREEZE_2); + break; + case 3: + lamp_tristate_flash(LM_FREEZE_3); + task_sleep (TIME_500MS); + lamp_tristate_on (LM_FREEZE_1); + lamp_tristate_on (LM_FREEZE_2); + lamp_tristate_on (LM_FREEZE_3); + break; + case 4: + lamp_tristate_flash(LM_FREEZE_4); + task_sleep (TIME_500MS); + lamp_tristate_on (LM_FREEZE_1); + lamp_tristate_on (LM_FREEZE_2); + lamp_tristate_on (LM_FREEZE_3); + lamp_tristate_on (LM_FREEZE_4); + break; + case 5://THERE ARE ONLY 4 LIGHTS, this is just here of for the case of maximize freezes, to prevent any from flashing + lamp_tristate_on (LM_FREEZE_1); + lamp_tristate_on (LM_FREEZE_2); + lamp_tristate_on (LM_FREEZE_3); + lamp_tristate_on (LM_FREEZE_4); + break; + }//end of switch + deactivate_left_ramp_quickfreeze();//goto ramps.c + light_quick_freeze_light_off();//goto inlanes.c + if (!flag_test(FLAG_BACK_IN_THE_FRIDGE_RUNNING) ) check_multiball_requirements(); +}//end of function + + + + +void check_multiball_requirements(void) { + //if requirements met for next mb - light left loop shot to start mb + //Fortress Multiball = 1 ball min needs to be frozen + //Museum Multiball = 2 ball min needs to be frozen + //Cryoprison Multiball = 3 ball min needs to be frozen + //Wasteland Multiball = 4 ball min needs to be frozen + if (NumBallsFrozen > (NumMBsDone % 4) ) { // % is modulus + multiball_light_on();//goto orbits.c + flag_on(FLAG_IS_MULTIBALL_ENABLED); + if ( (lock_SoundCounter++ % 2) == 0 )//check if even + sound_start (ST_SPEECH, SPCH_MULTIBALL_ACTIVATED, SL_4S, PRI_GAME_QUICK5); + else + sound_start (ST_SPEECH, SPCH_SHOOT_LEFT_LOOP, SL_4S, PRI_GAME_QUICK5); + } //end of if (NumBallsFrozen > (NumMBsDone % 4) ) + + leff_start(LEFF_FREEZE); + deff_start (DEFF_FREEZE_EFFECT); +}//end of function + + + +//this is called from left loop shot at orbits.c +void multiball_start (void) { + if ( (NumMBsDone % 4) == 0) fortress_start(NumBallsFrozen); + else if ( (NumMBsDone % 4) == 1) museum_start(NumBallsFrozen); + else if ( (NumMBsDone % 4) == 2) wasteland_start(NumBallsFrozen); + else if ( (NumMBsDone % 4) == 3) cryoprison_start(NumBallsFrozen); +}//end of function + + + +//after we are sure we have a valid MB start, we reset everything for next time +void multiball_started(void) { + NumMBsDone++; + if (NumBallsNeededForNextMB < 4) ++NumBallsNeededForNextMB; + flag_off(FLAG_IS_MULTIBALL_ENABLED); + NumBallsFrozen = 0; + lock_reset(); +}//end of function + + + + + + +/**************************************************************************** + * + * lighting effects + * + ****************************************************************************/ +void freeze_leff(void) { + gi_leff_disable (PINIO_GI_STRINGS); //turn off gi + leff_start(LEFF_FLASH_ALL); + gi_leff_enable (PINIO_GI_STRINGS); //turn on gi + task_sleep_sec (TIME_1S); + leff_exit(); +}//end of function + + + + +/**************************************************************************** + * + * display effects + * + ****************************************************************************/ +void freeze_effect_deff(void) { + U16 fno; + dmd_alloc_pair_clean (); + if (flag_test(FLAG_IS_MULTIBALL_ENABLED) ) { + for (fno = IMG_CLAW_A_START; fno <= IMG_CLAW_A_END; fno += 2) { + dmd_alloc_pair_clean (); + frame_draw(fno); + dmd_show2 (); + task_sleep (TIME_100MS); + }//end of inner loop + + for (fno = IMG_CLAW_B_START; fno <= IMG_CLAW_B_END; fno += 2) { + dmd_alloc_pair_clean (); + frame_draw(fno); + dmd_show2 (); + task_sleep (TIME_100MS); + }//end of inner loop + + dmd_alloc_pair_clean ();// Clean both pages + dmd_map_overlay (); + dmd_clean_page_low (); + font_render_string_center (&font_term6, DMD_MIDDLE_X - 30, DMD_BIG_CY_Top, "MULTIBALL"); + font_render_string_center (&font_term6, DMD_MIDDLE_X - 15, DMD_BIG_CY_Bot, "READY"); + dmd_text_outline (); + dmd_alloc_pair (); + frame_draw(IMG_CLAW_B_END); + dmd_overlay_outline (); + dmd_show2 (); + } + else + switch (++freeze_MessageCounter % 2) { + default: + case 0: + for (fno = IMG_FREEZE_A_START; fno <= IMG_FREEZE_A_END; fno += 2) { + dmd_alloc_pair_clean (); + frame_draw(fno); + dmd_show2 (); + task_sleep (TIME_100MS); + }//end of inner loop + dmd_alloc_pair_clean ();// Clean both pages + dmd_map_overlay (); + dmd_clean_page_low (); + font_render_string_center (&font_term6, DMD_MIDDLE_X - 30, DMD_BIG_CY_Top, "FREEZE"); + dmd_text_outline (); + dmd_alloc_pair (); + frame_draw(IMG_FREEZE_A_END); + dmd_overlay_outline (); + dmd_show2 (); + break; + case 1: + for (fno = IMG_WASTELAND_B1_START; fno <= IMG_WASTELAND_B1_END; fno += 2) { + dmd_alloc_pair_clean (); + frame_draw(fno); + dmd_show2 (); + task_sleep (TIME_100MS); + }//end of inner loop + for (fno = IMG_WASTELAND_B2_START; fno <= IMG_WASTELAND_B2_END; fno += 2) { + dmd_alloc_pair_clean (); + frame_draw(fno); + dmd_show2 (); + task_sleep (TIME_100MS); + }//end of inner loop + dmd_alloc_pair_clean ();// Clean both pages + dmd_map_overlay (); + dmd_clean_page_low (); + font_render_string_center (&font_term6, DMD_MIDDLE_X - 30, DMD_BIG_CY_Top, "FREEZE"); + dmd_text_outline (); + dmd_alloc_pair (); + frame_draw(IMG_WASTELAND_B2_END); + dmd_overlay_outline (); + dmd_show2 (); + break; + }//end of switch + task_sleep_sec (1); + deff_exit (); +}//end of mode_effect_deff + diff --git a/machine/dm/museum.c b/machine/dm/museum.c new file mode 100644 index 000000000..a1cbc0c55 --- /dev/null +++ b/machine/dm/museum.c @@ -0,0 +1,533 @@ +/* + * demolition man + * museum.c + * + * written by James Cardona + * + * handles the lock freezes and the trigger of multiballs + * + * + * */ +/* CALLSET_SECTION (museum, __machine5__) */ + + +#include +#include "dm/global_constants.h" +#include //autogenerated by divhold.ct +#include "museum.h" + +//local variables +score_t museum_score; +U8 museum_jackpot_shots_made; +__boolean museum_start_music; +U8 museum_MessageCounter; +U8 museum_display_counter; +U8 MUS_TOGGLE; +__boolean museum_ballsave; + + +//external variables +extern U8 NumBallsFrozen; //from lock_freeze_mbstart.c + +//internally called function prototypes --external found at protos.h +void museum_player_reset (void); + + + +/**************************************************************************** + * multiball definition structure + ***************************************************************************/ +struct mb_mode_ops museum_mode = { + DEFAULT_MBMODE, + //.update = , /* The update callback is invoked whenever the state of the multiball changes. */ + .music = MUS_MB, + .deff_starting = DEFF_MUSEUM_START_EFFECT, + .deff_running = DEFF_MUSEUM_EFFECT, + //.deff_ending = , +//.active_task = // default => .active_task = mb_mode_active_task, + .prio = PRI_MULTIBALL, //default => .prio = PRI_NULL, +//.grace_period = //default => .grace_period = 500ms +}; +//task_gid_t gid_running; +//task_gid_t gid_in_grace; + + +/**************************************************************************** + * initialize and exit + ***************************************************************************/ +void museum_player_reset (void) { + flag_off(FLAG_IS_MUSEUM_MB_RUNNING); + score_zero(museum_score); + museum_jackpot_shots_made = 0; //these need to be zeroed in before we enter the mode so bonus doesn't fake trigger + museum_start_music = FALSE; + museum_MessageCounter = 0; +}//end of function + + + +CALLSET_ENTRY (museum, start_player) { museum_player_reset(); } + + + +/**************************************************************************** + * external event listeners + ****************************************************************************/ +CALLSET_ENTRY (museum, music_refresh) { +// if (museum_start_music) music_request (SPARKS, PRI_GAME_QUICK8); +// else mb_mode_music_refresh (&museum_mode); + if (flag_test(FLAG_IS_MUSEUM_MB_RUNNING)) music_request (MUS_MB, PRI_GAME_QUICK7); +}//end of function + + + +CALLSET_ENTRY (museum, display_update) { + if (flag_test(FLAG_IS_MUSEUM_MB_RUNNING) ) + deff_start_bg (DEFF_MUSEUM_EFFECT, PRI_MULTIBALL); +}//end of function + + + +CALLSET_ENTRY (museum, end_ball) { + if (flag_test(FLAG_IS_MUSEUM_MB_RUNNING)) { + mb_mode_end_ball (&museum_mode); + jackpot_reset(); + end_super_jackpot_reminder(); + flag_off(FLAG_IS_MUSEUM_MB_RUNNING); + } +}//end of function + + + +//puts in grace period if set +CALLSET_ENTRY (museum, single_ball_play) { + if (flag_test(FLAG_IS_MUSEUM_MB_RUNNING)) { + mb_mode_end_ball (&museum_mode); + end_super_jackpot_reminder(); + combo_init(); + diverter_check(); + + //this acts as kind of a grace period for the jackpots + task_sleep_sec(3); + flag_off(FLAG_IS_MUSEUM_MB_RUNNING); + jackpot_reset(); + } +}//end of function + + +//if a ball drains during the mode and with time still on the ballsave timer - send it back in play +CALLSET_BOOL_ENTRY (museum, ball_drain) { //thrown by device.c + if (flag_test(FLAG_IS_MUSEUM_MB_RUNNING) + && museum_ballsave) { + sound_start (ST_SPEECH, SPCH_UHHN, SL_2S, PRI_GAME_QUICK5); + serve_ball_auto (); + return FALSE; //this is not a valid drain, don't count it + } + else return TRUE; //this is a valid drain +}//end of callset + + + + + + + +/**************************************************************************** + * + * body + * + ***************************************************************************/ +void museum_ballsave_task (void) { + task_sleep_sec(15); + museum_ballsave = FALSE; + task_exit(); +}//end of function + + + +void museum_start_sounds (void) { + U8 i; + for(i = 0; i < 6; i++) { + sound_start (ST_ANY, SPARKS, SL_1S, PRI_GAME_QUICK5); + task_sleep (TIME_500MS); + } + task_exit(); +}//end of function + + + +void museum_start(U8 num) { + kill_combos(); +// museum_start_music = TRUE; //for to play the helicopter instead of the music + task_create_gid1 (GID_MUSEUM_START_NOISE, museum_start_sounds); + flag_on(FLAG_IS_MUSEUM_MB_RUNNING); + museum_ballsave = TRUE; + mb_mode_start(&museum_mode); + + score_add (museum_score, score_table[MUSEUM_MB_SCORE]); + score (MUSEUM_MB_SCORE); + + museum_display_counter = 0; + MUS_TOGGLE = 0; + multiball_started();//reset all MB start criteria for next time + deff_start (DEFF_MUSEUM_START_EFFECT); + diverter_stop();//defined in divhold2.ct + task_kill_gid (GID_CR_LIGHTS); + + //LIGHTS + lamp_tristate_flash(LM_MUSEUM_MULTIBALL); + task_sleep (TIME_2S); + lamp_tristate_on (LM_MUSEUM_MULTIBALL); + lamp_tristate_off (LM_FREEZE_1); + lamp_tristate_off (LM_FREEZE_2); + lamp_tristate_off (LM_FREEZE_3); + lamp_tristate_off (LM_FREEZE_4); + + //SOUNDS + U8 museum_SoundCounter; + museum_SoundCounter = random_scaled(2);//from kernal/random.c - pick number from 0 to 2 + if (museum_SoundCounter == 0) + sound_start (ST_SPEECH, SPCH_WHAT_YOU_DOING_HERE, SL_4S, PRI_GAME_QUICK5); + else + sound_start (ST_SPEECH, SPCH_GET_THIS_PARTNER, SL_4S, PRI_GAME_QUICK5); + task_sleep (TIME_3S); + museum_start_music = FALSE; //for to kill the music + + //serve balls +// set_ball_count (3); + if (num >= 4) set_ball_count (5); + else set_ball_count (num + 1); + + task_create_gid1 (GID_MUSEUM_BALL_SAVE, museum_ballsave_task); + task_sleep (TIME_3S); + choose_multiple_random_jackpot(2); +}//end of function + + + +//jackpot shot +void museum_jackpot_made(void) { + score_add (museum_score, score_table[MUSEUM_JP_MB_SCORE]); + score (MUSEUM_JP_MB_SCORE); + deff_start (DEFF_MUSEUM_JACKPOT_EFFECT); + choose_multiple_random_jackpot(2); //switch which shots are jackpot shots + + if (IN_TEST) { start_super_jackpot_reminder(); } + else if (museum_jackpot_shots_made % 5 == 0) start_super_jackpot_reminder(); +}//end of function + + + +void museum_award_super_jackpot(void) { + score_add (museum_score, score_table[MUSEUM_SUPER_JP_MB_SCORE]); + score (MUSEUM_SUPER_JP_MB_SCORE); + deff_start(DEFF_MUSEUM_SUPER_JACKPOT); +}//end of function + + + + +/**************************************************************************** + * + * display effects + * + ****************************************************************************/ +void museum_super_jackpot_deff (void) { + U8 i; + + /* Flash Jackpot */ + for (i = 0; i < 3; i++) { + switch (i) { + case 0: sound_start (ST_SPEECH, SPCH_AHHHGGG, SL_2S, PRI_GAME_QUICK5); break; + case 1: sound_start (ST_SPEECH, SPCH_YOU_GOT_IT, SL_2S, PRI_GAME_QUICK5); break; + case 2: sound_start (ST_SPEECH, SPCH_WHO_IS_THAT, SL_2S, PRI_GAME_QUICK5); + }//end of switch + dmd_alloc_pair (); + frame_draw (IMG_JACKPOT_END - 2); + dmd_show2 (); + sample_start (MACHINE10, SL_100MS); + task_sleep (TIME_200MS); + + dmd_alloc_pair (); + frame_draw (IMG_JACKPOT_END); + dmd_show2 (); + sample_start (MACHINE10, SL_100MS); + task_sleep (TIME_500MS); + + dmd_alloc_pair (); + frame_draw (IMG_JACKPOT_END - 2); + dmd_show2 (); + sample_start (MACHINE10, SL_100MS); + task_sleep (TIME_500MS); + + dmd_alloc_pair (); + frame_draw (IMG_JACKPOT_END); + dmd_show2 (); + sample_start (MACHINE10, SL_100MS); + task_sleep (TIME_500MS); + }//end of loop + + sample_start (MACHINE14_LONG, SL_1S); + task_sleep (TIME_500MS); + speech_start (SPCH_SUPER_JACKPOT, SL_1S); + task_sleep_sec (1); + + deff_exit (); +}//end of function + + + + +void museum_animation_display_effect (U16 start_frame, U16 end_frame){ + U16 fno; + for (fno = start_frame; fno <= end_frame; fno += 2) { + dmd_alloc_pair (); + frame_draw(fno); + dmd_show2 (); + task_sleep (TIME_100MS); + }//end of inner loop +} + + + +void museum_frame_bitfade_fast (U16 frame){ + dmd_sched_transition (&trans_bitfade_fast); + dmd_alloc_pair (); + frame_draw(frame); + dmd_show2 (); + task_sleep (TIME_100MS); +} + + + +void museum_frame_with_words_display_steel_effect (U16 frame, U8 x, U8 y, char *words){ + dmd_alloc_pair_clean ();// Clean both pages + dmd_map_overlay (); + dmd_clean_page_low (); + font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_SMALL_CY_1, "MUSEUM"); + font_render_string_center (&font_steel, x, y, words); + dmd_text_outline (); + dmd_alloc_pair (); + frame_draw(frame); + dmd_overlay_outline (); + dmd_show2 (); + task_sleep (TIME_100MS); +} + + + + +void museum_start_effect_deff(void) { + U8 start_MessageCounter; + start_MessageCounter = random_scaled(3); + dmd_clean_page_high ();// + dmd_clean_page_low ();// + switch (start_MessageCounter) { + default: + case 0: + museum_animation_display_effect (IMG_MUSEUM_D1_START, IMG_MUSEUM_D1_END); + museum_frame_bitfade_fast(IMG_MUSEUM_D2_START); + museum_animation_display_effect (IMG_MUSEUM_D2_START, IMG_MUSEUM_D2_END); + museum_frame_bitfade_fast(IMG_SIMON_C_START); + museum_animation_display_effect (IMG_SIMON_C_START, IMG_SIMON_C_END); + dmd_map_overlay (); + dmd_clean_page_low (); + font_render_string_center (&font_steel, DMD_MIDDLE_X - 25, DMD_BIG_CY_Top, "MUSEUM"); + font_render_string_center (&font_steel, DMD_MIDDLE_X + 20, DMD_BIG_CY_Bot, "MULTIBALL"); + dmd_text_outline (); + dmd_alloc_pair (); + frame_draw(IMG_SIMON_C_END); + dmd_overlay_outline (); + dmd_show2 (); + break; + case 1: + museum_animation_display_effect (IMG_MUSEUM_D1_START, IMG_MUSEUM_D1_END); + museum_frame_bitfade_fast(IMG_MUSEUM_D2_START); + museum_animation_display_effect (IMG_MUSEUM_D2_START, IMG_MUSEUM_D2_END); + museum_frame_bitfade_fast(IMG_MUSEUM_D3_START); + museum_animation_display_effect (IMG_MUSEUM_D3_START, IMG_MUSEUM_D3_END); + museum_animation_display_effect (IMG_MUSEUM_D3_START, IMG_MUSEUM_D3_END); + museum_animation_display_effect (IMG_MUSEUM_D3_START, IMG_MUSEUM_D3_END); + dmd_map_overlay (); + dmd_clean_page_low (); + font_render_string_center (&font_steel, DMD_MIDDLE_X - 25, DMD_BIG_CY_Top, "MUSEUM"); + font_render_string_center (&font_steel, DMD_MIDDLE_X + 20, DMD_BIG_CY_Bot, "MULTIBALL"); + dmd_text_outline (); + dmd_alloc_pair (); + frame_draw(IMG_MUSEUM_D3_END); + dmd_overlay_outline (); + dmd_show2 (); + break; + case 2: + museum_animation_display_effect (IMG_MUSEUM_C2_START, IMG_MUSEUM_C2_END); + museum_frame_bitfade_fast(IMG_MUSEUM_D2_START); + museum_animation_display_effect (IMG_MUSEUM_D2_START, IMG_MUSEUM_D2_END); + dmd_map_overlay (); + dmd_clean_page_low (); + font_render_string_center (&font_steel, DMD_MIDDLE_X - 25, DMD_BIG_CY_Top, "MUSEUM"); + font_render_string_center (&font_steel, DMD_MIDDLE_X + 20, DMD_BIG_CY_Bot, "MULTIBALL"); + dmd_text_outline (); + dmd_alloc_pair (); + frame_draw(IMG_MUSEUM_D2_END); + dmd_overlay_outline (); + dmd_show2 (); + break; + }//end of switch + task_sleep_sec (2); + deff_exit (); +}//end of mode_effect_deff + + + +void museum_jackpot_sounds_task(void) { + U8 jackpot_sounds_MessageCounter; + jackpot_sounds_MessageCounter = random_scaled(3); + if (++museum_jackpot_shots_made % 2 == 0) { + switch (jackpot_sounds_MessageCounter) { + case 0: sound_start (ST_SPEECH, SPCH_DOUBLE_JACKPOT_WES, SL_2S, PRI_GAME_QUICK5); break; + case 1: sound_start (ST_SPEECH, SPCH_DOUBLE_JACKPOT_SLY, SL_2S, PRI_GAME_QUICK5); break; + case 2: sound_start (ST_SPEECH, SPCH_DOUBLE, SL_2S, PRI_GAME_QUICK5); break; + }//end of switch + }//end of if + else { + switch (jackpot_sounds_MessageCounter) { + case 0: sound_start (ST_SPEECH, SPCH_AHHHGGG, SL_2S, PRI_GAME_QUICK5); break; + case 1: sound_start (ST_SPEECH, SPCH_JOHN_SCREAM, SL_2S, PRI_GAME_QUICK5); break; + case 2: sound_start (ST_SPEECH, SPCH_UHHN, SL_2S, PRI_GAME_QUICK5); break; + }//end of switch + }//end of else + task_sleep (TIME_500MS + TIME_300MS); + sound_start (ST_EFFECT, SPARKS, SL_1S, PRI_GAME_QUICK5); + task_sleep (TIME_200MS); + sound_start (ST_EFFECT, SPARKS, SL_1S, PRI_GAME_QUICK5); + task_sleep (TIME_200MS); + sound_start (ST_EFFECT, SPARKS, SL_1S, PRI_GAME_QUICK5); + task_sleep (TIME_200MS); + sound_start (ST_EFFECT, ZAPP, SL_2S, PRI_GAME_QUICK5); + task_sleep (TIME_200MS); + sound_start (ST_EFFECT, ZAPP, SL_2S, PRI_GAME_QUICK5); + task_sleep (TIME_200MS); + sound_start (ST_EFFECT, ZAPP, SL_2S, PRI_GAME_QUICK5); + task_sleep (TIME_500MS); + task_exit(); +}//end of mode_effect_deff + + + + + +void museum_jackpot_effect_deff(void) { +// if (++museum_MessageCounter > 4) museum_MessageCounter = 0; // = random_scaled(6); + museum_MessageCounter = random_scaled(5); + dmd_clean_page_high ();// + dmd_clean_page_low ();// + + task_create_gid1 (GID_MUSEUM_JACKPOT_SOUND, museum_jackpot_sounds_task); + + switch (museum_MessageCounter) { + default: + case 0: + museum_animation_display_effect (IMG_MUSEUM_D3_START, IMG_MUSEUM_D3_END); + museum_animation_display_effect (IMG_MUSEUM_D3_START, IMG_MUSEUM_D3_END); + museum_animation_display_effect (IMG_MUSEUM_D3_START, IMG_MUSEUM_D3_END); + museum_animation_display_effect (IMG_MUSEUM_D3_START, IMG_MUSEUM_D3_END); + museum_frame_with_words_display_steel_effect (IMG_MUSEUM_D3_END, DMD_MIDDLE_X + 20, DMD_BIG_CY_Bot, "JACKPOT"); + break; + case 1: + museum_animation_display_effect (IMG_MUSEUM_C2_START, IMG_MUSEUM_C2_END); + museum_frame_with_words_display_steel_effect (IMG_MUSEUM_C2_END, DMD_MIDDLE_X + 20, DMD_BIG_CY_Bot, "JACKPOT"); + break; + case 2: + museum_animation_display_effect (IMG_FIGHT_A_START, IMG_FIGHT_A_END); + museum_frame_with_words_display_steel_effect (IMG_FIGHT_A_END, DMD_MIDDLE_X + 20, DMD_BIG_CY_Bot, "JACKPOT"); + break; + case 3: + museum_animation_display_effect (IMG_SIMON_C_START, IMG_SIMON_C_END); + museum_frame_with_words_display_steel_effect (IMG_SIMON_C_END, DMD_MIDDLE_X - 20, DMD_BIG_CY_Bot, "JACKPOT"); + break; + case 4: + museum_animation_display_effect (IMG_MUSEUM_D1_START, IMG_MUSEUM_D1_END); + museum_animation_display_effect (IMG_MUSEUM_D2_START, IMG_MUSEUM_D2_END); + museum_frame_with_words_display_steel_effect (IMG_MUSEUM_D2_END, DMD_MIDDLE_X + 20, DMD_BIG_CY_Bot, "JACKPOT"); + break; + }//end of switch + task_sleep_sec (1); + deff_exit (); +}//end of mode_effect_deff + + + +void show_sparkle (void) { +U8 i; + for (i = 0; i < 5; i++) { + dmd_dup_mapped ();//allocate new space but make it a copy of what is on DMD now + dmd_overlay_onto_color ();//mono overlay onto current color page + + //right side sparkles + switch (random_scaled(8)) { + case 0: bitmap_blit (museum_spark_right_1_bits, 115, 0); dmd_flip_low_high (); bitmap_blit (museum_spark_right_1_bits, 115, 1); break; + case 1: bitmap_blit (museum_spark_right_2_bits, 115, 0); dmd_flip_low_high (); bitmap_blit (museum_spark_right_2_bits, 115, 1); break; + case 2: bitmap_blit (museum_spark_right_3_bits, 115, 0); dmd_flip_low_high (); bitmap_blit (museum_spark_right_3_bits, 115, 1); break; + case 3: bitmap_blit (museum_spark_right_4_bits, 115, 0); dmd_flip_low_high (); bitmap_blit (museum_spark_right_4_bits, 115, 1); break; + case 4: bitmap_blit (museum_spark_right_5_bits, 115, 0); dmd_flip_low_high (); bitmap_blit (museum_spark_right_5_bits, 115, 1); break; + case 5: bitmap_blit (museum_spark_right_6_bits, 115, 0); dmd_flip_low_high (); bitmap_blit (museum_spark_right_6_bits, 115, 1); break; + case 6: bitmap_blit (museum_spark_right_7_bits, 115, 0); dmd_flip_low_high (); bitmap_blit (museum_spark_right_7_bits, 115, 1); break; + case 7: bitmap_blit (museum_spark_right_8_bits, 115, 0); dmd_flip_low_high (); bitmap_blit (museum_spark_right_8_bits, 115, 1); break; + }//end of case + + //left side sparkles + switch (random_scaled(8)) { + case 0: bitmap_blit (museum_spark_left_1_bits, 7, 0); dmd_flip_low_high (); bitmap_blit (museum_spark_left_1_bits, 7, 1); break; + case 1: bitmap_blit (museum_spark_left_2_bits, 7, 0); dmd_flip_low_high (); bitmap_blit (museum_spark_left_2_bits, 7, 1); break; + case 2: bitmap_blit (museum_spark_left_3_bits, 7, 0); dmd_flip_low_high (); bitmap_blit (museum_spark_left_3_bits, 7, 1); break; + case 3: bitmap_blit (museum_spark_left_4_bits, 7, 0); dmd_flip_low_high (); bitmap_blit (museum_spark_left_4_bits, 7, 1); break; + case 4: bitmap_blit (museum_spark_left_5_bits, 7, 0); dmd_flip_low_high (); bitmap_blit (museum_spark_left_5_bits, 7, 1); break; + case 5: bitmap_blit (museum_spark_left_6_bits, 7, 0); dmd_flip_low_high (); bitmap_blit (museum_spark_left_6_bits, 7, 1); break; + case 6: bitmap_blit (museum_spark_left_7_bits, 7, 0); dmd_flip_low_high (); bitmap_blit (museum_spark_left_7_bits, 7, 1); break; + case 7: bitmap_blit (museum_spark_left_8_bits, 7, 0); dmd_flip_low_high (); bitmap_blit (museum_spark_left_8_bits, 7, 1); break; + }//end of case + + dmd_show2 ();//shows a 4 color image + task_sleep (TIME_300MS); + dmd_map_overlay ();/** Map a consecutive display page pair into windows 0 & 1 */ + }//end of loop + dmd_alloc_pair_clean (); +}//end of func + + + + +void museum_effect_deff (void) { + for (;;) { + dmd_map_overlay (); + dmd_clean_page_high (); + dmd_clean_page_low (); + dmd_draw_thin_border (dmd_low_buffer); + + bitmap_blit (museum_up_left_bits, 0, 2); //8x16 + bitmap_blit (museum_up_right_bits, 123, 2); //8x16 + + bitmap_blit (museum_bot_left_bits, 0, 20); //24x10 + bitmap_blit (museum_bot_right_bits, 108, 20); //24x10 + + font_render_string_center (&font_steel, DMD_MIDDLE_X, DMD_BIG_CY_Top - 2, "MUSEUM"); + + sprintf_score(current_score); + font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_SMALL_CY_3, sprintf_buffer); + + if (MUS_TOGGLE == 0) { sprintf ("15 MILLION"); font_render_string_center (&font_steel, DMD_MIDDLE_X, DMD_BIG_CY_Bot, sprintf_buffer); } + else if (MUS_TOGGLE == 1) { sprintf ("JACKPOT LIT"); font_render_string_center (&font_steel, DMD_MIDDLE_X, DMD_BIG_CY_Bot, sprintf_buffer); } + else if (MUS_TOGGLE == 2) { + sprintf ("%d JACKPOTS MADE", museum_jackpot_shots_made); + font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_SMALL_CY_4, sprintf_buffer); + + if (flag_test(FLAG_IS_SUPER_JACKPOT_ACTIVATED) ) sprintf ("SUPER JACKPOT LIT"); + else sprintf ("SHOOT %d TO LIGHT SUPER", 5 - (museum_jackpot_shots_made % 5) ); + font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_SMALL_CY_5, sprintf_buffer); + }//end of else if (MUS_TOGGLE == 2) + + show_sparkle(); // takes approx 1.5 seconds + if (++museum_display_counter % 4 == 0) { if (++MUS_TOGGLE > 2) MUS_TOGGLE = 0; } //change MUS_TOGGLE once per second + }//END OF ENDLESS LOOP + deff_exit(); +}//end of function + diff --git a/machine/dm/orbits.c b/machine/dm/orbits.c new file mode 100644 index 000000000..77f867964 --- /dev/null +++ b/machine/dm/orbits.c @@ -0,0 +1,282 @@ +/* + * demolition man + * orbits.c + * + * written by James Cardona + * + * Location Description: + * Also called loops. + * Left Loop: This loop is just to the right of the upper flipper. + * It feeds to a sinkhole when hit hard enough; otherwise, the ball passes + * behind the top ramp into the MTL rollovers or can pass all the way to + * the right loop -making a complete orbit. + * This shot can be lit to start multiball and award extra balls, otherwise it + * awards a mystery bonus. + * Lights are, from bottom up, Extra Ball, Start Multi-Ball, Explode, Jackpot, Combo arrow. + * + * Right Loop: This shot feeds the ball past the MTL rollovers and all + * the way around to the upper left flipper. If it doesn't make it + * (ie: weak shot) the ball will fall into the MTL rollovers. + * Lights are, from bottom up, Explode, Jackpot, Combo Arrow. + * + * Scoring Description: (original game) + * + * depending upon # of freeze required, shoot left loop will start MB with X num of balls, + * ends when 1 ball left if shoot light freeze from claw will grant instant 5 ball MB + * if at least 1 ball already frozen, else will light a ball + * and shoot left loop to start MB + * + */ + +#include +#include "dm/global_constants.h" + +//constants + +//local variables +U8 orbits_SoundCounter; +__boolean left_Loop_Explode_activated; +__boolean right_Loop_Explode_activated; + +//external variables + +//prototypes +void orbits_reset (void); +void left_orbit_task (void); +void right_orbit_task (void); +void left_orbit_shot_made(void); +void right_orbit_shot_made(void); +void eb_mb_lights_task (void); + +/**************************************************************************** + * initialize and exit + ***************************************************************************/ +void orbits_reset (void) { + left_Loop_Explode_activated = FALSE; + right_Loop_Explode_activated = FALSE; + if (flag_test(FLAG_IS_EXTRABALL_LIT)) lamp_tristate_on (LM_EXTRA_BALL); + if (flag_test(FLAG_IS_MULTIBALL_ENABLED)) lamp_tristate_on (LM_START_MULTIBALL); + + if (flag_test(FLAG_IS_EXTRABALL_LIT) || flag_test(FLAG_IS_MULTIBALL_ENABLED) ) + leff_start (LEFF_ORBITS_RUNNER); +}//end of function + +void player_orbits_reset (void) { + orbits_SoundCounter = 0; + flag_off(FLAG_IS_MULTIBALL_ENABLED); + flag_off(FLAG_IS_EXTRABALL_LIT); +}//end of function + +CALLSET_ENTRY (orbits, start_player) { player_orbits_reset(); } +CALLSET_ENTRY (orbits, start_ball) { orbits_reset(); } +CALLSET_ENTRY (orbits, end_ball) { leff_stop (LEFF_ORBITS_RUNNER); } + + +/**************************************************************************** + * playfield lights and flags + ***************************************************************************/ +void extraball_light_on(void) { + lamp_tristate_on (LM_EXTRA_BALL); + leff_start (LEFF_ORBITS_RUNNER); +}//end of function + +void extraball_light_off(void) { + lamp_tristate_off (LM_EXTRA_BALL); + if (!flag_test(FLAG_IS_MULTIBALL_ENABLED) ) leff_stop (LEFF_ORBITS_RUNNER); +}//end of function + +void multiball_light_on(void) { + lamp_tristate_on (LM_START_MULTIBALL); + leff_start (LEFF_ORBITS_RUNNER); +}//end of function + +void multiball_light_off(void) { + flag_off(FLAG_IS_MULTIBALL_ENABLED); + lamp_tristate_off (LM_START_MULTIBALL); + if (!flag_test(FLAG_IS_EXTRABALL_LIT) ) leff_stop (LEFF_ORBITS_RUNNER); +}//end of function + +void activate_explode_inserts_orbits(void) { + left_Loop_Explode_activated = TRUE; + right_Loop_Explode_activated = TRUE; + lamp_tristate_flash (LM_LEFT_LOOP_EXPLODE); + lamp_tristate_flash (LM_RIGHT_LOOP_EXPLODE); +}//end of function + +void deactivate_explode_inserts_orbits(void) { + left_Loop_Explode_activated = FALSE; + right_Loop_Explode_activated = FALSE; + lamp_tristate_off (LM_LEFT_LOOP_EXPLODE); + lamp_tristate_off (LM_RIGHT_LOOP_EXPLODE); +}//end of function + +void ll_jackpot_light_on(void) { + flag_on (FLAG_IS_L_LOOP_JACKPOT_ACTIVATED); + lamp_tristate_on (LM_LEFT_LOOP_JACKPOT); +}//end of function + +void ll_jackpot_light_off(void) { + flag_off (FLAG_IS_L_LOOP_JACKPOT_ACTIVATED); + lamp_tristate_off (LM_LEFT_LOOP_JACKPOT); +}//end of function + +void rl_jackpot_light_on(void) { + flag_on (FLAG_IS_R_LOOP_JACKPOT_ACTIVATED); + lamp_tristate_on (LM_RIGHT_LOOP_JACKPOT); +}//end of function + +void rl_jackpot_light_off(void) { + flag_off (FLAG_IS_R_LOOP_JACKPOT_ACTIVATED); + lamp_tristate_off (LM_RIGHT_LOOP_JACKPOT); +}//end of function + +void ll_arrow_light_on(void) { + flag_on (FLAG_IS_L_LOOP_ARROW_ACTIVATED); + lamp_tristate_on (LM_LEFT_LOOP_ARROW); +}//end of function + +void ll_arrow_light_off(void) { + flag_off (FLAG_IS_L_LOOP_ARROW_ACTIVATED); + lamp_tristate_off (LM_LEFT_LOOP_ARROW); +}//end of function + +void rl_arrow_light_on(void) { + flag_on (FLAG_IS_R_LOOP_ARROW_ACTIVATED); + lamp_tristate_on (LM_RIGHT_LOOP_ARROW); +}//end of function + +void rl_arrow_light_off(void) { + flag_off (FLAG_IS_R_LOOP_ARROW_ACTIVATED); + lamp_tristate_off (LM_RIGHT_LOOP_ARROW); +}//end of function + + +/**************************************************************************** + * + * body + * + ****************************************************************************/ +void left_orbit_task (void) { task_sleep_sec(2); task_exit(); } +void right_orbit_task (void) { task_sleep_sec(2); task_exit(); } + + + +// full orbit right to left +// or start left to right check +CALLSET_ENTRY (orbits, sw_left_loop) { + if (flag_test(FLAG_BACK_IN_THE_FRIDGE_RUNNING) ) back_in_the_fridge_shot_made(); + else if (flag_test(FLAG_IS_L_LOOP_JACKPOT_ACTIVATED) ) score_jackpot(); + else if (flag_test(FLAG_IS_HUXLEY_RUNNING) ) huxley_mode_shot_made(); + else if (flag_test (FLAG_IS_CAPSIM_LEFTORB_ACTIVATED) ) capture_simon_made(); + else if (flag_test (FLAG_IS_PBREAK_RUNNING) ) prison_break_made(); + else if (flag_test(FLAG_IS_COMBO_LEFTORB_ACTIVATED) ) combo_hit(); + else if (flag_test(FLAG_IS_COMBOS_KILLED) + && flag_test(FLAG_IS_COMBOS_RESTARTABLE) ) combo_init(); + + //regardless of what else is going on, we can do these + if (flag_test (FLAG_IS_EXPLODE_MODE_RUNNING) ) explode_made(); + + + if ( task_kill_gid(GID_RIGHT_ORBIT_MADE) ) right_orbit_shot_made(); + else { + task_create_gid1 (GID_LEFT_ORBIT_MADE, left_orbit_task); + if (!flag_test (FLAG_IS_PBREAK_RUNNING) ) { + if ( (orbits_SoundCounter++ % 2) == 0 )//check if even + sound_start (ST_EFFECT, RACE_BY, SL_2S, PRI_GAME_QUICK5); + else + sound_start (ST_EFFECT, RACE_BY_2, SL_2S, PRI_GAME_QUICK5); + }//end of if ! pbreak + }//end of else +}//end of function + + + +// full orbit left to right +// or start right to left check +CALLSET_ENTRY (orbits, sw_right_freeway) { + if (flag_test(FLAG_BACK_IN_THE_FRIDGE_RUNNING) ) back_in_the_fridge_shot_made(); + else if (flag_test(FLAG_IS_R_LOOP_JACKPOT_ACTIVATED) ) score_jackpot(); + else if (flag_test(FLAG_IS_HUXLEY_RUNNING) ) huxley_mode_shot_made(); + else if (flag_test (FLAG_IS_CAPSIM_RIGHTORB_ACTIVATED) ) capture_simon_made(); + else if (flag_test (FLAG_IS_PBREAK_RUNNING) ) prison_break_made(); + else if (flag_test(FLAG_IS_COMBO_RIGHTORB_ACTIVATED) ) combo_hit(); + else if (flag_test(FLAG_IS_COMBOS_KILLED) + && flag_test(FLAG_IS_COMBOS_RESTARTABLE) ) combo_init(); + + //regardless of what else is going on, we can do these + if (flag_test (FLAG_IS_EXPLODE_MODE_RUNNING) ) explode_made(); + + if ( task_kill_gid(GID_LEFT_ORBIT_MADE) ) left_orbit_shot_made(); + else { + task_create_gid1 (GID_RIGHT_ORBIT_MADE, right_orbit_task); + if (!flag_test (FLAG_IS_PBREAK_RUNNING) ) { + if ( (orbits_SoundCounter++ % 2) == 0 )//check if even + sound_start (ST_EFFECT, RACE_BY, SL_2S, PRI_GAME_QUICK5); + else + sound_start (ST_EFFECT, RACE_BY_2, SL_2S, PRI_GAME_QUICK5); + }//end of if ! pbreak + }//end of else +}//end of function + + + +void left_orbit_shot_made(void) { + score (ORBIT_SCORE);//located in kernal/score.c + if (!flag_test (FLAG_IS_PBREAK_RUNNING) ) sound_start (ST_SAMPLE, MACHINE12, SL_2S, PRI_GAME_QUICK1); +}//end of function + + + +void right_orbit_shot_made(void) { + score (ORBIT_SCORE);//located in kernal/score.c + if (!flag_test (FLAG_IS_PBREAK_RUNNING) ) sound_start (ST_SAMPLE, MACHINE12, SL_2S, PRI_GAME_QUICK1); +}//end of function + + + +/**************************************************************************** + * + * lighting effects + * + ****************************************************************************/ +void orbits_runner_leff (void) { //left loop + for (;;) { + //listed from botton to top + leff_on (LM_EXTRA_BALL); + task_sleep (TIME_100MS); + leff_off (LM_EXTRA_BALL); + leff_on (LM_START_MULTIBALL); + task_sleep (TIME_100MS); + leff_off (LM_START_MULTIBALL); + leff_on (LM_LEFT_LOOP_EXPLODE); + task_sleep (TIME_100MS); + leff_off (LM_LEFT_LOOP_EXPLODE); + leff_on (LM_LEFT_LOOP_JACKPOT); + task_sleep (TIME_100MS); + leff_off (LM_LEFT_LOOP_JACKPOT); + leff_on (LM_LEFT_LOOP_ARROW); + task_sleep (TIME_100MS); + leff_off (LM_LEFT_LOOP_ARROW); + task_sleep (TIME_100MS); + + if (flag_test(FLAG_IS_EXTRABALL_LIT)) leff_on (LM_EXTRA_BALL); + if (flag_test(FLAG_IS_MULTIBALL_ENABLED)) leff_on (LM_START_MULTIBALL); + if (left_Loop_Explode_activated) leff_on (LM_LEFT_LOOP_EXPLODE); + if (flag_test(FLAG_IS_L_LOOP_JACKPOT_ACTIVATED)) leff_on (LM_LEFT_LOOP_JACKPOT); + if (flag_test(FLAG_IS_L_LOOP_ARROW_ACTIVATED)) leff_on (LM_LEFT_LOOP_ARROW); + task_sleep (TIME_1S); + + leff_off (LM_EXTRA_BALL); + leff_off (LM_START_MULTIBALL); + leff_off (LM_LEFT_LOOP_EXPLODE); + leff_off (LM_LEFT_LOOP_JACKPOT); + leff_off (LM_LEFT_LOOP_ARROW); + task_sleep (TIME_200MS); + }//end of loop + leff_exit(); +}//end of function + + + + + diff --git a/machine/dm/override_deffs.c b/machine/dm/override_deffs.c new file mode 100644 index 000000000..a47b43fd1 --- /dev/null +++ b/machine/dm/override_deffs.c @@ -0,0 +1,163 @@ +/* + * demolition man + * override_deffs.c + * + * written by James Cardona + * + * */ +/* CALLSET_SECTION (override_deffs, __machine2__) */ + + +#include +#include "dm/global_constants.h" +#include + +extern __local__ U8 jet_shots_made;//external ref to eject.c + + + +void shoot_again_leff(void) { + leff_start(LEFF_BOT2TOP); + task_sleep_sec (TIME_1S); + leff_exit(); +}//end of function + + + + +void shoot_again_deff (void) { + U8 sa_rnd_sound; + U16 fno; + dmd_alloc_pair_clean ();// Clean both pages + sa_rnd_sound = random_scaled(2); + sound_start (ST_EFFECT, EXTRA_BALL_SOUND, SL_2S, SP_NORMAL); + + for (fno = IMG_FREEZER1_START; fno <= IMG_FREEZER1_END; fno += 2) { + dmd_alloc_pair (); + frame_draw(fno); + dmd_show2 (); + task_sleep (TIME_66MS); + }//end of for loop + + for (fno = IMG_FREEZER2_START; fno <= IMG_FREEZER2_END; fno += 2) { + dmd_alloc_pair (); + frame_draw(fno); + dmd_show2 (); + task_sleep (TIME_66MS); + }//end of for loop + + if (sa_rnd_sound) sound_start (ST_SPEECH, SPCH_SHOOT_AGAIN, SL_2S, SP_NORMAL); + else sound_start (ST_SPEECH, SPCH_SHOOT_AGAIN_SLY, SL_2S, SP_NORMAL); + + for (fno = IMG_FREEZER3_START; fno <= IMG_FREEZER3_END; fno += 2) { + dmd_map_overlay (); + dmd_clean_page_low (); + font_render_string_center (&font_fireball, DMD_MIDDLE_X - 25, DMD_BIG_CY_Top, "SHOOT"); + font_render_string_center (&font_fireball, DMD_MIDDLE_X - 25, DMD_BIG_CY_Bot, "AGAIN"); + dmd_text_outline (); + dmd_alloc_pair (); + frame_draw(fno); + dmd_overlay_outline (); + dmd_show2 (); + task_sleep (TIME_66MS); + }//end of for loop + + deff_exit (); +}//end of function + + + + +CALLSET_ENTRY (override_deffs, tilt) { + sound_send (TILT); + task_sleep_sec (2); + sound_send (SPCH_PLAY_ACCORDION_TOO); +}//end of function + + + +CALLSET_ENTRY (override_deffs, tilt_warning) { + sound_send (TILT); +}//end of function + + + + + + +/**************************************************************************** + * + * trouble shooting + * + ****************************************************************************/ +CALLSET_ENTRY (override_deffs, sw_left_handle_button) { + if (IN_TEST) { + deff_start (DEFF_TROUBLESHOOTING); + } +}//end of function + + + + +void troubleshooting_deff(void) { + dmd_alloc_low_clean (); + +/* sprintf ("%d", jet_shots_made); + font_render_string_left (&font_var5, 70, 1, sprintf_buffer); + sprintf ("JETS"); + font_render_string_right (&font_var5, 64, 1, sprintf_buffer); + + sprintf_score (REPLAY_SCORE_OFFSET); + font_render_string_left (&font_var5, 70, 8, sprintf_buffer); + sprintf ("REPLAY SCORE OFFSET"); + font_render_string_right (&font_var5, 64, 8, sprintf_buffer); + + sprintf_score (current_score); + font_render_string_left (&font_var5, 70, 16, sprintf_buffer); + sprintf ("CURRENT SCORE"); + font_render_string_right (&font_var5, 64, 16, sprintf_buffer); + + sprintf_score (current_score + REPLAY_SCORE_OFFSET); + font_render_string_left (&font_var5, 70, 23, sprintf_buffer); + sprintf ("CURR *"); + font_render_string_right (&font_var5, 64, 23, sprintf_buffer); +*/ + + //curr = (replay_score_t *)(current_score + REPLAY_SCORE_OFFSET); + + +/*trough and ball checking*/ +/* + sprintf ("LIVE BALLS %d", live_balls); + font_render_string_center (&font_var5, 64, 5, sprintf_buffer); + + sprintf ("TROUGH COUNT %d", device_recount(device_entry (DEVNO_TROUGH)) ); + font_render_string_center (&font_var5, 64, 10, sprintf_buffer); + + if (switch_poll_logical(SW_TROUGH_1) ) font_render_string_center (&font_var5, 5, 19, "1"); + if (switch_poll_logical(SW_TROUGH_2) ) font_render_string_center (&font_var5, 10, 19, "2"); + if (switch_poll_logical(SW_TROUGH_3) ) font_render_string_center (&font_var5, 15, 19, "3"); + if (switch_poll_logical(SW_TROUGH_4) ) font_render_string_center (&font_var5, 20, 19, "4"); + if (switch_poll_logical(SW_TROUGH_5) ) font_render_string_center (&font_var5, 25, 19, "5"); + */ + + + + +/* if (in_live_game) sprintf ("ILG"); + font_render_string_center (&font_var5, 25, 5, sprintf_buffer); + + #if defined(HAVE_AUTO_SERVE) sprintf ("SRV"); + font_render_string_center (&font_var5, 25 , 11, sprintf_buffer); + #endif + +if (global_flag_test (GLOBAL_FLAG_BALL_AT_PLUNGER)) sprintf ("BALL"); + font_render_string_center (&font_var5, 50 , 11, sprintf_buffer); +*/ + + dmd_show_low (); + task_sleep_sec (1); + deff_exit (); +}//end of deff + + diff --git a/machine/dm/prison_break.c b/machine/dm/prison_break.c new file mode 100644 index 000000000..68d60bb8a --- /dev/null +++ b/machine/dm/prison_break.c @@ -0,0 +1,357 @@ +/* + * demolition man + * prison_break.c + * + * written by James Cardona + * + * Location Description: + * mode started by claw switch Prison Break + * + * Scoring Description: (original game) + * This is an award/shoot mode that's very quick. The ball is dropped above the upper left + * flipper and you are awarded 15 million. A reflex shot into the + * Underground doubles this, a reflex shot into the side ramp triples this. + * Prison Break also lights Car Chase which is an alternating ramp award + * very similar to PayBack Time on T2. Awards are 5 million per successful ramp. + * + * Scoring Description: (my rules) + * I do not like this mode and plan on completely changing it to something else, + * as it is right now we are using prison_break style scoring on only side ramp and underground shots + * + */ +/* CALLSET_SECTION (prison_break, __machine3__) */ + +#include +#include "dm/global_constants.h" +#include "clawmagnet.h" + +//constants +const U8 PRISON_BREAK_EASY_GOAL = 3; +const U8 PRISON_BREAK_MED_GOAL = 4; +const U8 PRISON_BREAK_HARD_GOAL = 5; +const U8 PRISON_BREAK_GOAL_INCREMENT = 1; +const U8 PRISON_BREAK_GOAL_MAX = 10; + +//local variables +U8 prison_break_mode_shots_made; //number of shots made this mode +__local__ U8 prison_break_modes_achieved; +U8 prison_break_mode_timer; +score_t prison_break_mode_score; //score for this mode only +score_t prison_break_mode_last_score; +score_t prison_break_mode_next_score; +score_t prison_break_mode_score_total_score; + +//external variables + +//internally called function prototypes --external found at protos.h +void prison_break_reset (void); +void prison_break_player_reset (void); +void prison_break_effect_deff(void); +void prison_break_mode_init (void); +void prison_break_mode_expire (void); +void prison_break_mode_exit (void); + +/**************************************************************************** + * mode definition structure + ***************************************************************************/ +struct timed_mode_ops prison_break_mode = { + DEFAULT_MODE, + .init = prison_break_mode_init, + .exit = prison_break_mode_exit, + .gid = GID_PRISON_BREAK_MODE_RUNNING, + .music = MUS_MD_CRYO_PRISON_BREAKOUT, + .deff_starting = DEFF_PRISON_BREAK_START_EFFECT, + .deff_running = DEFF_PRISON_BREAK_EFFECT, +// .deff_ending = DEFF_prison_break_END_EFFECT, + .prio = PRI_GAME_MODE6, + .init_timer = 48, + .timer = &prison_break_mode_timer, + .grace_timer = 2, +// .pause = system_timer_pause, +}; + + +/**************************************************************************** + * initialize and exit + ***************************************************************************/ +void prison_break_reset (void) { + flag_off (FLAG_IS_PBREAK_RUNNING); +}//end of function + + + +void prison_break_player_reset (void) { + prison_break_reset(); + prison_break_modes_achieved = 0; + prison_break_mode_shots_made = 0; + score_zero(prison_break_mode_score_total_score); +}//end of function + + + +void prison_break_mode_init (void) { + //the claw mode can expire on its own and since it is a lower priority it will not display + //callset_invoke (end_claw_mode); // this seemed to cause occasional crashes + clawmagnet_off (); + flag_off(FLAG_IS_BALL_ON_CLAW); + flipper_enable (); + ballsave_add_time (10); + prison_break_mode_shots_made = 0; + ++prison_break_modes_achieved; + sound_start (ST_SPEECH, SPCH_CRYO_PRISON_BREAKOUT, SL_4S, PRI_GAME_QUICK5); + //flash lamp for a time + lamp_tristate_flash(LM_CLAW_PRISON_BREAK); + task_sleep(TIME_500MS); + lamp_tristate_on(LM_CLAW_PRISON_BREAK); + score_zero(prison_break_mode_score); + score_zero(prison_break_mode_last_score); + score_add(prison_break_mode_last_score, score_table[PRIS_BREAK_HIT_SCORE]); + + score_zero(prison_break_mode_next_score); + switch (prison_break_modes_achieved) { + case 1: + score(PRIS_BREAK_START_SCORE1); + score_add(prison_break_mode_score, score_table[PRIS_BREAK_START_SCORE1]); + break; + case 2: + score(PRIS_BREAK_START_SCORE2); + score_add(prison_break_mode_score, score_table[PRIS_BREAK_START_SCORE2]); + break; + default: + score(PRIS_BREAK_START_SCORE3); + score_add(prison_break_mode_score, score_table[PRIS_BREAK_START_SCORE3]); + }//end of switch + flag_on (FLAG_IS_PBREAK_RUNNING); +}//end of function + + + +void prison_break_mode_expire (void) { + flag_off (FLAG_IS_PBREAK_RUNNING); +}//end of function + + +void prison_break_mode_exit (void) { prison_break_mode_expire();} + + +/**************************************************************************** + * external event listeners + ****************************************************************************/ +CALLSET_ENTRY (prison_break, music_refresh) { timed_mode_music_refresh (&prison_break_mode); } +CALLSET_ENTRY (prison_break, end_ball) { if (timed_mode_running_p(&prison_break_mode) ) timed_mode_end (&prison_break_mode); } +CALLSET_ENTRY (prison_break, display_update) { timed_mode_display_update (&prison_break_mode); } + +CALLSET_ENTRY (prison_break, start_player) { prison_break_player_reset(); } +CALLSET_ENTRY (prison_break, start_ball) { prison_break_reset(); } + + + + +/**************************************************************************** + * + * body + * + ***************************************************************************/ +CALLSET_ENTRY (prison_break, sw_claw_prison_break) { + demotime_increment(); + timed_mode_begin (&prison_break_mode);//start mode +}//end of function + + + +void prison_break_made (void) { + ++prison_break_mode_shots_made; + score_add(prison_break_mode_score, prison_break_mode_last_score); + score_add (prison_break_mode_score_total_score, prison_break_mode_last_score); + score_long (prison_break_mode_last_score); + deff_start (DEFF_PRISON_BREAK_HIT_EFFECT);//under /kernel/deff.c +}//end of function + + + +/**************************************************************************** + * + * display effects + * + ****************************************************************************/ +void prison_break_animation_display_effect (U16 start_frame, U16 end_frame){ + U16 fno; + for (fno = start_frame; fno <= end_frame; fno += 2) { + dmd_alloc_pair (); + frame_draw(fno); + dmd_show2 (); + task_sleep (TIME_100MS); + }//end of inner loop +} + + + +void prison_break_frame_bitfade_fast (U16 frame){ + dmd_sched_transition (&trans_bitfade_fast); + dmd_alloc_pair (); + frame_draw(frame); + dmd_show2 (); + task_sleep (TIME_100MS); +} + + + +void frame_with_words_display_v5prc_effect (U16 frame, U8 x, U8 y, char *words){ + dmd_alloc_pair_clean ();// Clean both pages + dmd_map_overlay (); + dmd_clean_page_low (); + font_render_string_center (&font_v5prc, x, y, words); + dmd_text_outline (); + dmd_alloc_pair (); + frame_draw(frame); + dmd_overlay_outline (); + dmd_show2 (); + task_sleep (TIME_100MS); +} + + + +void prison_break_start_effect_deff(void) { + U8 prison_break_MessageCounter; + prison_break_MessageCounter = random_scaled(2); + dmd_clean_page_high ();// + dmd_clean_page_low ();// + switch (prison_break_MessageCounter) { + default: + case 0: + prison_break_animation_display_effect (IMG_CHIEF_EARLE2_START, IMG_CHIEF_EARLE2_END); + prison_break_frame_bitfade_fast(IMG_JAIL_BREAK_START); + prison_break_animation_display_effect (IMG_JAIL_BREAK_START, IMG_JAIL_BREAK_END); + prison_break_frame_bitfade_fast(IMG_ASSOC_BOB_START); + prison_break_animation_display_effect (IMG_ASSOC_BOB_START, IMG_ASSOC_BOB_END); + frame_with_words_display_v5prc_effect (IMG_ASSOC_BOB_END, DMD_MIDDLE_X - 10, DMD_BIG_CY_Bot, "BREAKOUT"); + break; + case 1: + prison_break_animation_display_effect (IMG_ASSOC_BOB_START, IMG_ASSOC_BOB_END); + prison_break_frame_bitfade_fast(IMG_PRISON_BREAKOUT_B_START); + prison_break_animation_display_effect (IMG_PRISON_BREAKOUT_B_START, IMG_PRISON_BREAKOUT_B_MID); + prison_break_animation_display_effect (IMG_PRISON_BREAKOUT_B_MID, IMG_PRISON_BREAKOUT_B_END); + prison_break_frame_bitfade_fast(IMG_CHIEF_EARLE2_START); + prison_break_animation_display_effect (IMG_CHIEF_EARLE2_START, IMG_CHIEF_EARLE2_END); + frame_with_words_display_v5prc_effect (IMG_CHIEF_EARLE2_END, DMD_MIDDLE_X - 10, DMD_BIG_CY_Bot, "BREAKOUT"); + break; + }//end of switch + task_sleep_sec (2); + deff_exit (); +}//end of mode_effect_deff + + + +U8 prison_break_MessageCounter; +void prison_break_hit_effect_deff(void) { +// if (++prison_break_MessageCounter > 6) prison_break_MessageCounter = 0; //for testing + prison_break_MessageCounter = random_scaled(7); + + dmd_alloc_pair_clean (); + sound_start (ST_SAMPLE, EXPLOSION, SL_2S, PRI_GAME_QUICK5); + switch (prison_break_MessageCounter) { + default: + case 0: + prison_break_animation_display_effect (IMG_CHIEF_EARLE2_START, IMG_CHIEF_EARLE2_END); + sprintf_score (prison_break_mode_score); + frame_with_words_display_v5prc_effect (IMG_CHIEF_EARLE2_END, DMD_MIDDLE_X + 20, DMD_BIG_CY_Top, sprintf_buffer); + break; + case 1: + prison_break_animation_display_effect (IMG_JAIL_BREAK_START, IMG_JAIL_BREAK_END); + sprintf_score (prison_break_mode_score); + frame_with_words_display_v5prc_effect (IMG_JAIL_BREAK_END, DMD_MIDDLE_X + 20, DMD_BIG_CY_Top, sprintf_buffer); + break; + case 2: + prison_break_animation_display_effect (IMG_ASSOC_BOB_START, IMG_ASSOC_BOB_END); + sprintf_score (prison_break_mode_score); + frame_with_words_display_v5prc_effect (IMG_ASSOC_BOB_END, DMD_MIDDLE_X + 20, DMD_BIG_CY_Top, sprintf_buffer); + break; + case 3: + prison_break_animation_display_effect (IMG_PRISON_BREAKOUT_B_START, IMG_PRISON_BREAKOUT_B_MID); + sprintf_score (prison_break_mode_score); + frame_with_words_display_v5prc_effect (IMG_PRISON_BREAKOUT_B_MID, DMD_MIDDLE_X + 20, DMD_BIG_CY_Top, sprintf_buffer); + break; + case 4: + prison_break_animation_display_effect (IMG_PRISON_BREAKOUT_B_MID, IMG_PRISON_BREAKOUT_B_END); + sprintf_score (prison_break_mode_score); + frame_with_words_display_v5prc_effect (IMG_PRISON_BREAKOUT_B_END, DMD_MIDDLE_X + 20, DMD_BIG_CY_Top, sprintf_buffer); + break; + case 5: + prison_break_animation_display_effect (IMG_PRISON_BREAK_D1_START, IMG_PRISON_BREAK_D1_END); + sprintf_score (prison_break_mode_score); + frame_with_words_display_v5prc_effect (IMG_PRISON_BREAK_D1_END, DMD_MIDDLE_X + 20, DMD_BIG_CY_Top, sprintf_buffer); + break; + case 6: + prison_break_animation_display_effect (IMG_PRISON_BREAK_D2_START, IMG_PRISON_BREAK_D2_END); + sprintf_score (prison_break_mode_score); + frame_with_words_display_v5prc_effect (IMG_PRISON_BREAK_D2_END, DMD_MIDDLE_X + 20, DMD_BIG_CY_Top, sprintf_buffer); + break; + }//end of switch + task_sleep (TIME_500MS); + deff_exit (); +}//end of mode_effect_deff + + + +//THE MORE HITS THAT ARE MADE, THE LESS BARS THAT ARE DRAWN +void dmd_draw_jail_bars (U8 *dbuf) { + U8 i; + dbuf += 16; //skip first 2 rows + dbuf += 16; + for (i = 1; i <= 28; i++) { + if (prison_break_mode_shots_made < 1) dbuf[8] = 0x07; + if (prison_break_mode_shots_made < 2) dbuf[10] = 0x07; + if (prison_break_mode_shots_made < 3) dbuf[6] = 0x07; + if (prison_break_mode_shots_made < 4) dbuf[12] = 0x07; + if (prison_break_mode_shots_made < 5) dbuf[4] = 0x07; + if (prison_break_mode_shots_made < 6) dbuf[14] = 0x07; + if (prison_break_mode_shots_made < 7) dbuf[2] = 0x07; + dbuf += 16; + }//end of loop +}//end of mode_effect_deff + + + + + +void prison_break_effect_deff(void) { + U8 draw_jail_bars_timer; + draw_jail_bars_timer = 0; + U8 i = 0; + U8 toggle = 0; + + for (;;) { + i++; + + if (i % 20 == 0) if (++toggle > 3) toggle = 0;//change TOGGLE once per n seconds + + dmd_alloc_pair_clean(); + dmd_draw_border (dmd_low_buffer); + + if (IN_TEST) { + ++draw_jail_bars_timer; + if ( (draw_jail_bars_timer % 5) == 0) prison_break_mode_shots_made++; + } + + dmd_draw_jail_bars (dmd_low_buffer); + + sprintf("BREAKOUT"); + sprintf_buffer[1 + prison_break_mode_shots_made] = '\0'; + font_render_string_center (&font_v5prc, DMD_MIDDLE_X, DMD_SMALL_CY_2, sprintf_buffer); + + sprintf ("%d", prison_break_mode_timer); + font_render_string_center (&font_term6, DMD_MIDDLE_X - 55, DMD_SMALL_CY_4, sprintf_buffer); + font_render_string_center (&font_term6, DMD_MIDDLE_X + 55, DMD_SMALL_CY_4, sprintf_buffer); + + if (toggle == 1) sprintf ("%d SEC LEFT", prison_break_mode_timer); + else if (toggle == 2) sprintf ("%d HIT", prison_break_mode_shots_made); + else if (toggle == 0) sprintf ("SHOOT EVERYTHING"); + + font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_SMALL_CY_3 + 1, sprintf_buffer); + + sprintf_score (prison_break_mode_score); + font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_SMALL_CY_5 - 3, sprintf_buffer); + dmd_show_low (); + task_sleep (TIME_500MS); + }//END OF ENDLESS LOOP +}//end of mode_effect_deff diff --git a/machine/dm/ramps.c b/machine/dm/ramps.c new file mode 100644 index 000000000..4266717c9 --- /dev/null +++ b/machine/dm/ramps.c @@ -0,0 +1,669 @@ +/* + * demolition man + * ramps.c + * + * written by James Cardona + * + * Location Description: + * There are 4 ramps total + * + * Left Ramp: Directly to the right of the left loop is this ramp which always + * feeds to the left inlane. It can be lit for "Quick Freeze" and the "Car Chase" round. + * Lights are, from bottom up, Quick Freeze, Car Chase, Explode, Jackpot, Combo arrow. + * + * Center Ramp (the ACMag): Located at the very top of the playfield, it is + * a wide ramp (three pinball widths wide) that is triggered only by a gate. + * Balls drop immediately and roll either down the left loop or into + * the MTL rollovers. The center ramp has a Jackpot lamp and a Combo arrow. + * The Center Ramp is bounded on the left by the Upper Rebound and on the right + * by the left jet bumper. + * + * Side Ramp: This is a small, twisting, and difficult ramp just below the + * Computer. It is used for the skill shot. The Side Ramp has a jackpot + * lamp and a Combo Arrow. + * + * Right Ramp: This is a tall ramp similar to the right ramp in Judge Dredd. + * It has a diverter which normally sends the ball to the right inlane, + * but it can send the ball to the Cryo-Claw when that feature is available. + * It's also used during the Car Chase round, and to score Super Jackpots. + * Lights are, from bottom up, Claw Ready, Car Chase, Explode, Jackpot, Combo + * Arrow. There is a Super Jackpot light mounted over the ramp. + * + * + * Scoring Description: (original game) + * Ramps score depending on mode running as follows: + * basic score - no mode running: ramp 100k enter - 250k exit + * explode running: scores only on left and right ramps- 5 to 15 million depending on time left + * car crash running: scores only on left and right ramps- 10 million + * car chase in orig is not a mode but single lights that can be lit on either L or R ramp + * MB quick freeze - right inlane activates quick freeze light from left ramp - shoot left ramp to freeze. + + * Scoring Description: (my rules) + * same as original except: + * car chase is a mode here (not in original) --L or R ramp for xx million shot --handled in carchase.c + * + * + */ + +#include +#include //autogenerated by divhold.ct +#include "dm/global_constants.h" + +//constants +const U8 RampsTotalNumOfSounds = 18; //num between 0 and 24 == 25 total +const sound_code_t rampSoundsArray[] = { SPCH_NICE_SHOOTING_SLY, SPCH_NICE_SHOT_SLY, + SPCH_GREAT_SHOT_SLY, SPCH_GREAT_SHOOTING, SPCH_NOW_THATS_WHAT_I_CALL_SHOOTING, + SPCH_OHH_YEAH1, SPCH_OHH_YEAH2, SPCH_OUTSTANDING_SLY, + SPCH_NICE, SPCH_VERY_NICE, SPCH_NICE_MOVE_SLY, + SPCH_GOOD_ONE, SPCH_GREAT_SHOT, SPCH_GOOD_SHOT, + SPCH_NICE_SHOT, SPCH_NICE_SHOOTING, SPCH_NICE_SHOOTING, + SPCH_EXCELLENT }; + +const U8 missedTotalNumOfSounds =11; +const sound_code_t missedRampSoundsArray[] = {SPCH_TOO_BAD, SPCH_PATHETIC, SPCH_HATE_WHEN_THAT_HAPPENS, + SPCH_OHH_NO, SPCH_BAD_AIM, SPCH_DULCH, + SPCH_WES_LAUGH_SHORT1, SPCH_SIMON_SNICKER, SPCH_WES_LAUGH_SHORT2, + SPCH_WES_LAUGH_SHORT3, SPCH_JUST_LOVELY }; + +//local variables +U8 ramp_SoundCounter; +__boolean left_Ramp_CarChase_activated; +__boolean left_Ramp_Explode_activated; +__boolean right_Ramp_CarChase_activated; +__boolean right_Ramp_Explode_activated; + +//external variables + +//prototypes +void ramps_reset (void); +void right_ramp_task (void); +void left_ramp_task (void); +void ramps_flasher (char * flasher); +void side_ramp_task (void); +void ramp_sounds (void); +void missed_ramp_sounds (void); +void left_ramp_made(void); +void right_ramp_made(void); +void side_ramp_made(void); + + +/**************************************************************************** + * initialize and exit + ***************************************************************************/ +void ramps_reset (void) { + left_Ramp_CarChase_activated = FALSE; + left_Ramp_Explode_activated = FALSE; + right_Ramp_CarChase_activated = FALSE; + right_Ramp_Explode_activated = FALSE; + if (flag_test(FLAG_IS_R_RAMP_CLAWREADY) ) callset_invoke (rramp_clawready_on); + else callset_invoke (rramp_clawready_off); +}//end of function + +void players_ramps_reset (void) { + ramp_SoundCounter = 0; + flag_off(FLAG_IS_LRAMP_QUICKFREEZE_ACTIVATED); + flag_off(FLAG_IS_R_RAMP_CLAWREADY); +}//end of function + +CALLSET_ENTRY (ramps, start_player) { players_ramps_reset(); } +CALLSET_ENTRY (ramps, start_ball) { ramps_reset(); } + + + +/**************************************************************************** + * playfield lights and flags -- MULTIPLE RAMPS AT SAME TIME + ***************************************************************************/ +//called from eyeball_explode.c for explode mode start +void activate_explode_inserts_ramps(void) { + left_Ramp_Explode_activated = TRUE; + right_Ramp_Explode_activated = TRUE; + lamp_tristate_flash (LM_LEFT_RAMP_EXPLODE); + lamp_tristate_flash (LM_RIGHT_RAMP_EXPLODE); +}//end of function + + +void deactivate_explode_inserts_ramps(void) { + left_Ramp_Explode_activated = FALSE; + right_Ramp_Explode_activated = FALSE; + lamp_tristate_off (LM_LEFT_RAMP_EXPLODE); + lamp_tristate_off (LM_RIGHT_RAMP_EXPLODE); +}//end of function + + +//called from carcrash.c for carcrash mode start +void carchase_mode_on(void) { + left_Ramp_CarChase_activated = TRUE; + right_Ramp_CarChase_activated = TRUE; + lamp_tristate_flash (LM_LEFT_RAMP_CAR_CHASE); + lamp_tristate_flash (LM_RIGHT_RAMP_CAR_CHASE); +}//end of function + +void carchase_mode_off(void) { + left_Ramp_CarChase_activated = FALSE; + right_Ramp_CarChase_activated = FALSE; + lamp_tristate_off (LM_LEFT_RAMP_CAR_CHASE); + lamp_tristate_off (LM_RIGHT_RAMP_CAR_CHASE); +}//end of function + + +/**************************************************************************** + * playfield lights and flags - LEFT RAMP + ***************************************************************************/ +// called by right inlane switch --see inlanes.c +// or called by certain number of standups made --see standupfrenzy.c +void activate_left_ramp_quickfreeze(void) { + flag_on(FLAG_IS_LRAMP_QUICKFREEZE_ACTIVATED); + lamp_tristate_flash (LM_QUICK_FREEZE); + leff_start(LEFF_RAMP_QUICKFREEZE); +}//end of function + +void deactivate_left_ramp_quickfreeze(void) { + flag_off(FLAG_IS_LRAMP_QUICKFREEZE_ACTIVATED); + lamp_tristate_off (LM_QUICK_FREEZE); + leff_stop(LEFF_RAMP_QUICKFREEZE); +}//end of function + +void lramp_jackpot_light_on(void) { + flag_on(FLAG_IS_L_RAMP_JACKPOT_ACTIVATED); + lamp_tristate_on (LM_LEFT_RAMP_JACKPOT); +}//end of function + +void lramp_jackpot_light_off(void) { + flag_off(FLAG_IS_L_RAMP_JACKPOT_ACTIVATED); + lamp_tristate_off (LM_LEFT_RAMP_JACKPOT); +}//end of function + +void lramp_arrow_light_on(void) { + flag_on (FLAG_IS_L_RAMP_ARROW_ACTIVATED); + lamp_tristate_on (LM_LEFT_RAMP_ARROW); +}//end of function + +void lramp_arrow_light_off(void) { + flag_off (FLAG_IS_L_RAMP_ARROW_ACTIVATED); + lamp_tristate_off (LM_LEFT_RAMP_ARROW); +}//end of function + + +/**************************************************************************** + * playfield lights and flags - RIGHT RAMP + ***************************************************************************/ +void rramp_jackpot_light_on(void) { + flag_on(FLAG_IS_R_RAMP_JACKPOT_ACTIVATED); + lamp_tristate_on (LM_RIGHT_RAMP_JACKPOT); +}//end of function + +void rramp_jackpot_light_off(void) { + flag_off(FLAG_IS_R_RAMP_JACKPOT_ACTIVATED); + lamp_tristate_off (LM_RIGHT_RAMP_JACKPOT); +}//end of function + +void rramp_arrow_light_on(void) { + flag_on (FLAG_IS_R_RAMP_ARROW_ACTIVATED); + lamp_tristate_on (LM_RIGHT_RAMP_ARROW); +}//end of function + +void rramp_arrow_light_off(void) { + flag_off (FLAG_IS_R_RAMP_ARROW_ACTIVATED); + lamp_tristate_off (LM_RIGHT_RAMP_ARROW); +}//end of function + +//called by left inlane --see inlanes.c +void rramp_clawready_on(void) { + flag_on(FLAG_IS_R_RAMP_CLAWREADY); + lamp_tristate_on (LM_CLAW_READY); + flasher_pulse (FLASH_DIVERTER_FLASHER); + leff_start(LEFF_RAMP_CLAWREADY); + + if (system_config.disable_claw == NO) diverter_start();//defined in divhold2.ct +}//end of function + +//called by claw after ball is passed to it from elevator +void rramp_clawready_off(void) { + flag_off(FLAG_IS_R_RAMP_CLAWREADY); + lamp_tristate_off (LM_CLAW_READY); + flasher_pulse (FLASH_DIVERTER_FLASHER); + diverter_stop(); //defined in divhold2.ct + leff_stop(LEFF_RAMP_CLAWREADY); +}//end of function + + +/**************************************************************************** + * playfield lights and flags - CENTER RAMP + ***************************************************************************/ +void cramp_jackpot_light_on(void) { + flag_on(FLAG_IS_C_RAMP_JACKPOT_ACTIVATED); + lamp_tristate_on (LM_CENTER_RAMP_JACKPOT); +}//end of function + +void cramp_jackpot_light_off(void) { + flag_off(FLAG_IS_C_RAMP_JACKPOT_ACTIVATED); + lamp_tristate_off (LM_CENTER_RAMP_JACKPOT); +}//end of function + +void cramp_arrow_light_on(void) { + flag_on (FLAG_IS_C_RAMP_ARROW_ACTIVATED); + lamp_tristate_on (LM_CENTER_RAMP_ARROW); +}//end of function + +void cramp_arrow_light_off(void) { + flag_off (FLAG_IS_C_RAMP_ARROW_ACTIVATED); + lamp_tristate_off (LM_CENTER_RAMP_ARROW); +}//end of function + + +/**************************************************************************** + * playfield lights and flags - SIDE RAMP + ***************************************************************************/ +void sramp_jackpot_light_on(void) { + flag_on(FLAG_IS_S_RAMP_JACKPOT_ACTIVATED); + lamp_tristate_on (LM_SIDE_RAMP_JACKPOT); +}//end of function + +void sramp_jackpot_light_off(void) { + flag_off(FLAG_IS_S_RAMP_JACKPOT_ACTIVATED); + lamp_tristate_off (LM_SIDE_RAMP_JACKPOT); +}//end of function + +void sramp_arrow_light_on(void) { + flag_on (FLAG_IS_S_RAMP_ARROW_ACTIVATED); + lamp_tristate_on (LM_SIDE_RAMP_ARROW); +}//end of function + +void sramp_arrow_light_off(void) { + flag_off (FLAG_IS_S_RAMP_ARROW_ACTIVATED); + lamp_tristate_off (LM_SIDE_RAMP_ARROW); +}//end of function + +/**************************************************************************** + * + * left ramp + * + ***************************************************************************/ +void left_ramp_task (void) { task_sleep_sec(2); task_exit(); } + + +CALLSET_ENTRY (ramps, sw_left_ramp_enter) { + task_create_gid1 (GID_LEFT_RAMP_ENTERED, left_ramp_task); + score (RAMPS_ENTER_SCORE); + if (flag_test (FLAG_IS_CARCHASE_MODE_RUNNING) ) sound_start (ST_SAMPLE, CAR_SKID, SL_3S, PRI_GAME_QUICK1); + + flasher_pulse (FLASH_LEFT_RAMP_UP_FLASHER); //FLASH followed by name of flasher in caps + flasher_pulse (FLASH_LEFT_RAMP_LOWER_FLASHER); + task_sleep (TIME_100MS); + flasher_pulse (FLASH_LEFT_RAMP_UP_FLASHER); + flasher_pulse (FLASH_LEFT_RAMP_LOWER_FLASHER); + task_sleep (TIME_100MS); + flasher_pulse (FLASH_LEFT_RAMP_UP_FLASHER); + flasher_pulse (FLASH_LEFT_RAMP_LOWER_FLASHER); +}//end of function + + + +CALLSET_ENTRY (ramps, sw_left_ramp_exit) { + leff_start(LEFF_LEFT_RAMP); + if ( task_kill_gid (GID_LEFT_RAMP_ENTERED) ) left_ramp_made(); +}//end of function + + +void left_ramp_made(void) { + score (RAMPS_MADE_SCORE); + if (flag_test(FLAG_SKILLSHOT_ENABLED) ) award_skill_shot(3); + else if (flag_test(FLAG_BACK_IN_THE_FRIDGE_RUNNING) ) back_in_the_fridge_shot_made(); + else if (flag_test(FLAG_IS_HUXLEY_RUNNING) ) huxley_mode_shot_made(); + else if (flag_test(FLAG_IS_L_RAMP_JACKPOT_ACTIVATED) ) score_jackpot(); + else if (flag_test (FLAG_IS_CAPSIM_LEFTRAMP_ACTIVATED) ) capture_simon_made(); + else if (flag_test (FLAG_IS_PBREAK_RUNNING) ) prison_break_made(); + else if ( flag_test(FLAG_IS_COMBO_LEFTRAMP_ACTIVATED) ) combo_hit(); + else if (flag_test(FLAG_IS_COMBOS_KILLED) + && flag_test(FLAG_IS_COMBOS_RESTARTABLE) ) combo_init(); + + //regardless of what else is going on, we can do these + if (flag_test(FLAG_IS_LRAMP_QUICKFREEZE_ACTIVATED) ) increment_freeze(); //goto lock_freeze_mbstart.c + if (flag_test (FLAG_IS_EXPLODE_MODE_RUNNING) ) explode_made(); //goto eyeball_explode.c for scoring + if (flag_test (FLAG_IS_CARCHASE_MODE_RUNNING) ) car_chase_ramp_made(); //goto carchase.c for scoring + + //if not in a mode then perform normal sounds and display effects + if ( !flag_test (FLAG_IS_EXPLODE_MODE_RUNNING) + && !flag_test (FLAG_IS_CARCHASE_MODE_RUNNING) + && !flag_test (FLAG_IS_CAPSIM_LEFTRAMP_ACTIVATED) ) + ramp_sounds(); +}//end of function + + +/**************************************************************************** + * + * right ramp + * + ***************************************************************************/ +void right_ramp_task (void) { task_sleep_sec(2); task_exit(); } + + +CALLSET_ENTRY (ramps, sw_right_ramp_enter) { + task_create_gid1 (GID_RIGHT_RAMP_ENTERED, right_ramp_task); + score (RAMPS_ENTER_SCORE); + if (flag_test (FLAG_IS_CARCHASE_MODE_RUNNING) ) sound_start (ST_SAMPLE, CAR_SKID, SL_3S, PRI_GAME_QUICK1); + + flasher_pulse (FLASH_RIGHT_RAMP_UP_FLASHER); + flasher_pulse (FLASH_RIGHT_RAMP_FLASHER); + task_sleep (TIME_100MS); + flasher_pulse (FLASH_RIGHT_RAMP_UP_FLASHER); + flasher_pulse (FLASH_RIGHT_RAMP_FLASHER); + task_sleep (TIME_100MS); + flasher_pulse (FLASH_RIGHT_RAMP_UP_FLASHER); + flasher_pulse (FLASH_RIGHT_RAMP_FLASHER); + task_sleep (TIME_100MS); +}//end of function + + + + +CALLSET_ENTRY (ramps, sw_right_ramp_exit) { + leff_start(LEFF_RIGHT_RAMP); + if ( task_kill_gid(GID_RIGHT_RAMP_ENTERED) ) right_ramp_made(); +}//end of function + + +void right_ramp_made(void) { + score (RAMPS_MADE_SCORE); + if (flag_test(FLAG_BACK_IN_THE_FRIDGE_RUNNING) ) back_in_the_fridge_shot_made(); + else if (flag_test (FLAG_IS_SUPER_JACKPOT_ACTIVATED) ) score_super_jackpot(); + else if (flag_test (FLAG_IS_R_RAMP_JACKPOT_ACTIVATED) ) score_jackpot(); + else if (flag_test (FLAG_IS_HUXLEY_RUNNING) ) huxley_mode_shot_made(); + else if (flag_test (FLAG_IS_PBREAK_RUNNING) ) prison_break_made(); + else if (flag_test (FLAG_IS_CAPSIM_RIGHTRAMP_ACTIVATED) ) capture_simon_made(); + else if (flag_test (FLAG_IS_COMBO_RIGHTRAMP_ACTIVATED) ) combo_hit(); + else if (flag_test (FLAG_IS_COMBOS_KILLED) + && flag_test (FLAG_IS_COMBOS_RESTARTABLE) ) combo_init(); + + //regardless of what else is going on, we can do these + if (flag_test (FLAG_IS_EXPLODE_MODE_RUNNING) ) explode_made(); //goto eyeball_explode.c for scoring + if (flag_test (FLAG_IS_CARCHASE_MODE_RUNNING) ) car_chase_ramp_made(); //goto carchase.c for scoring + + //if claw is disabled then and claw ready then right ramp + //acts like a claw hit + if ( system_config.disable_claw == YES + && flag_test(FLAG_IS_R_RAMP_CLAWREADY ) ) disabled_claw_hit (); + + + + //if not in a mode then perform normal sounds and display effects + if ( !flag_test (FLAG_IS_EXPLODE_MODE_RUNNING) + && !flag_test (FLAG_IS_CARCHASE_MODE_RUNNING) + && !flag_test (FLAG_IS_CAPSIM_RIGHTRAMP_ACTIVATED) ) + ramp_sounds(); +}//end of function + + +/**************************************************************************** + * + * center ramp + * note: center ramp has only 1 switch + * + ***************************************************************************/ +CALLSET_ENTRY (ramps, sw_center_ramp) { + leff_start(LEFF_CENTER_RAMP); + score (RAMPS_MADE_SCORE); + + if (flag_test(FLAG_BACK_IN_THE_FRIDGE_RUNNING) ) back_in_the_fridge_shot_made(); + else if (flag_test(FLAG_IS_C_RAMP_JACKPOT_ACTIVATED) ) score_jackpot(); + else if (flag_test(FLAG_IS_HUXLEY_RUNNING) ) huxley_mode_shot_made(); + else if (flag_test(FLAG_IS_ACMAG_RUNNING) ) acmag_made(); + else if (flag_test (FLAG_IS_CAPSIM_CENTERRAMP_ACTIVATED) ) capture_simon_made(); + else if (flag_test (FLAG_IS_PBREAK_RUNNING) ) prison_break_made(); + else if (flag_test (FLAG_LASER_SHOT_ENABLED) ) laser_shot_made(); + else if ( flag_test(FLAG_IS_COMBO_CENTERRAMP_ACTIVATED) ) combo_hit(); + else if (flag_test(FLAG_IS_COMBOS_KILLED) + && flag_test(FLAG_IS_COMBOS_RESTARTABLE) ) combo_init(); + + if (!flag_test (FLAG_IS_PBREAK_RUNNING) ) ramp_sounds(); +}//end of function + + + + + +/**************************************************************************** + * + * side ramp + * + ***************************************************************************/ +void side_ramp_task (void) { task_sleep_sec(2); task_exit(); } + + +CALLSET_ENTRY (ramps, sw_side_ramp_enter) { + task_create_gid1 (GID_SIDE_RAMP_ENTERED, side_ramp_task); + flasher_pulse (FLASH_SIDE_RAMP_FLASHER); //FLASH followed by name of flasher in caps + task_sleep (TIME_100MS); + score (RAMPS_ENTER_SCORE); + + flasher_pulse (FLASH_DIVERTER_FLASHER); //FLASH followed by name of flasher in caps + flasher_pulse (FLASH_SIDE_RAMP_FLASHER); + task_sleep (TIME_100MS); + flasher_pulse (FLASH_DIVERTER_FLASHER); //FLASH followed by name of flasher in caps + flasher_pulse (FLASH_SIDE_RAMP_FLASHER); + task_sleep (TIME_100MS); + flasher_pulse (FLASH_DIVERTER_FLASHER); //FLASH followed by name of flasher in caps + flasher_pulse (FLASH_SIDE_RAMP_FLASHER); + task_sleep (TIME_100MS); +}//end of function + + + +CALLSET_ENTRY (ramps, sw_side_ramp_exit) { + leff_start(LEFF_SIDE_RAMP); + if ( task_kill_gid(GID_SIDE_RAMP_ENTERED) ) side_ramp_made(); +}//end of function + + + + +void side_ramp_made(void) { + score (RAMPS_MADE_SCORE); + + if (flag_test(FLAG_SKILLSHOT_ENABLED) ) award_skill_shot(2); + else if (flag_test(FLAG_BACK_IN_THE_FRIDGE_RUNNING) ) back_in_the_fridge_shot_made(); + else if (flag_test(FLAG_IS_S_RAMP_JACKPOT_ACTIVATED) ) score_jackpot(); + else if (flag_test (FLAG_IS_CAPSIM_SIDERAMP_ACTIVATED) ) capture_simon_made(); + else if (flag_test(FLAG_IS_HUXLEY_RUNNING) ) huxley_mode_shot_made(); + else if (flag_test (FLAG_IS_PBREAK_RUNNING) ) prison_break_made(); + else if ( flag_test(FLAG_IS_COMBO_SIDERAMP_ACTIVATED) ) combo_hit(); + else if (flag_test(FLAG_IS_COMBOS_KILLED) + && flag_test(FLAG_IS_COMBOS_RESTARTABLE) ) combo_init(); + + ramp_sounds(); +}//end of function + + + + +/**************************************************************************** + * + * sound effects + * + ****************************************************************************/ +void ramp_sounds (void) { + ramp_SoundCounter = random_scaled(RampsTotalNumOfSounds);//from kernal/random.c + sound_start (ST_SPEECH, rampSoundsArray[ramp_SoundCounter], SL_4S, PRI_GAME_QUICK5); +}//end of function + +void missed_ramp_sounds (void) { + ramp_SoundCounter = random_scaled(missedTotalNumOfSounds);//from kernal/random.c + sound_start (ST_SPEECH, missedRampSoundsArray[ramp_SoundCounter], SL_4S, PRI_GAME_QUICK2); +}//end of function + + + + +/**************************************************************************** + * + * lighting effects + * + ****************************************************************************/ +void ramp_quickfreeze_leff (void) { + for (;;) { + //listed from botton to top + leff_on (LM_QUICK_FREEZE); + task_sleep (TIME_100MS); + leff_off (LM_QUICK_FREEZE); + leff_on (LM_LEFT_RAMP_CAR_CHASE); + task_sleep (TIME_100MS); + leff_off (LM_LEFT_RAMP_CAR_CHASE); + leff_on (LM_LEFT_RAMP_EXPLODE); + task_sleep (TIME_100MS); + leff_off (LM_LEFT_RAMP_EXPLODE); + leff_on (LM_LEFT_RAMP_JACKPOT); + task_sleep (TIME_100MS); + leff_off (LM_LEFT_RAMP_JACKPOT); + leff_on (LM_LEFT_RAMP_ARROW); + task_sleep (TIME_100MS); + leff_off (LM_LEFT_RAMP_ARROW); + task_sleep (TIME_100MS); + + if (flag_test(FLAG_IS_LRAMP_QUICKFREEZE_ACTIVATED)) leff_on (LM_QUICK_FREEZE); + if (left_Ramp_CarChase_activated) leff_on (LM_LEFT_RAMP_CAR_CHASE); + if (left_Ramp_Explode_activated) leff_on (LM_LEFT_LOOP_EXPLODE); + if (flag_test(FLAG_IS_L_RAMP_JACKPOT_ACTIVATED)) leff_on (LM_LEFT_RAMP_JACKPOT); + if (flag_test(FLAG_IS_L_RAMP_ARROW_ACTIVATED)) leff_on (LM_LEFT_RAMP_ARROW); + task_sleep (TIME_1S); + + leff_off (LM_QUICK_FREEZE); + leff_off (LM_LEFT_RAMP_CAR_CHASE); + leff_off (LM_LEFT_RAMP_EXPLODE); + leff_off (LM_LEFT_RAMP_JACKPOT); + leff_off (LM_LEFT_RAMP_ARROW); + task_sleep (TIME_200MS); + }//END OF LOOP + leff_exit(); +}//end of function + + + +void ramp_clawready_leff (void) { + for (;;) { + //listed from botton to top + leff_on (LM_CLAW_READY); + task_sleep (TIME_100MS); + leff_off (LM_CLAW_READY); + leff_on (LM_RIGHT_RAMP_CAR_CHASE); + task_sleep (TIME_100MS); + leff_off (LM_RIGHT_RAMP_CAR_CHASE); + leff_on (LM_RIGHT_RAMP_EXPLODE); + task_sleep (TIME_100MS); + leff_off (LM_RIGHT_RAMP_EXPLODE); + leff_on (LM_RIGHT_RAMP_JACKPOT); + task_sleep (TIME_100MS); + leff_off (LM_RIGHT_RAMP_JACKPOT); + leff_on (LM_RIGHT_RAMP_ARROW); + task_sleep (TIME_100MS); + leff_off (LM_RIGHT_RAMP_ARROW); + task_sleep (TIME_100MS); + + if (flag_test(FLAG_IS_R_RAMP_CLAWREADY)) leff_on (LM_CLAW_READY); + if (right_Ramp_CarChase_activated) leff_on (LM_RIGHT_RAMP_CAR_CHASE); + if (right_Ramp_Explode_activated) leff_on (LM_RIGHT_LOOP_EXPLODE); + if (flag_test(FLAG_IS_R_RAMP_JACKPOT_ACTIVATED)) leff_on (LM_RIGHT_RAMP_JACKPOT); + if (flag_test(FLAG_IS_R_RAMP_ARROW_ACTIVATED)) leff_on (LM_RIGHT_RAMP_ARROW); + task_sleep (TIME_1S); + + leff_off (LM_CLAW_READY); + leff_off (LM_RIGHT_RAMP_CAR_CHASE); + leff_off (LM_RIGHT_RAMP_EXPLODE); + leff_off (LM_RIGHT_RAMP_JACKPOT); + leff_off (LM_RIGHT_RAMP_ARROW); + task_sleep (TIME_200MS); + }//END OF LOOP + leff_exit(); +}//end of function + + + + +void left_ramp_leff (void) { + flasher_pulse (FLASH_DIVERTER_FLASHER); + flasher_pulse (FLASH_LEFT_RAMP_LOWER_FLASHER); + task_sleep (TIME_100MS); + flasher_pulse (FLASH_DIVERTER_FLASHER); + flasher_pulse (FLASH_LEFT_RAMP_LOWER_FLASHER); + task_sleep (TIME_100MS); + flasher_pulse (FLASH_DIVERTER_FLASHER); + flasher_pulse (FLASH_LEFT_RAMP_LOWER_FLASHER); + task_sleep (TIME_100MS); + flasher_pulse (FLASH_DIVERTER_FLASHER); + flasher_pulse (FLASH_LEFT_RAMP_LOWER_FLASHER); + task_sleep (TIME_100MS); + flasher_pulse (FLASH_DIVERTER_FLASHER); + flasher_pulse (FLASH_LEFT_RAMP_LOWER_FLASHER); + leff_exit(); +}//end of function + + + +void right_ramp_leff (void) { + flasher_pulse (FLASH_DIVERTER_FLASHER); + flasher_pulse (FLASH_RIGHT_RAMP_FLASHER); + task_sleep (TIME_100MS); + flasher_pulse (FLASH_DIVERTER_FLASHER); + flasher_pulse (FLASH_RIGHT_RAMP_FLASHER); + task_sleep (TIME_100MS); + flasher_pulse (FLASH_DIVERTER_FLASHER); + flasher_pulse (FLASH_RIGHT_RAMP_FLASHER); + task_sleep (TIME_100MS); + flasher_pulse (FLASH_DIVERTER_FLASHER); + flasher_pulse (FLASH_RIGHT_RAMP_FLASHER); + task_sleep (TIME_100MS); + flasher_pulse (FLASH_DIVERTER_FLASHER); + flasher_pulse (FLASH_RIGHT_RAMP_FLASHER); + leff_exit(); +}//end of function + + + +void center_ramp_leff1 (void) { + U8 i; + for (i = 0; i < 5; i++) { + leff_toggle (LM_CENTER_RAMP_MIDDLE); + leff_toggle (LM_CENTER_RAMP_OUTER); + leff_toggle (LM_CENTER_RAMP_INNER); + task_sleep (TIME_100MS); + }// end of loop +}//end of function + +void center_ramp_leff (void) { + leff_create_peer (center_ramp_leff1); + + flasher_pulse (FLASH_LEFT_RAMP_UP_FLASHER); + flasher_pulse (FLASH_RIGHT_RAMP_UP_FLASHER); + flasher_pulse (FLASH_DIVERTER_FLASHER); + task_sleep (TIME_100MS); + flasher_pulse (FLASH_LEFT_RAMP_UP_FLASHER); + flasher_pulse (FLASH_RIGHT_RAMP_UP_FLASHER); + flasher_pulse (FLASH_DIVERTER_FLASHER); + task_sleep (TIME_100MS); + flasher_pulse (FLASH_LEFT_RAMP_UP_FLASHER); + flasher_pulse (FLASH_RIGHT_RAMP_UP_FLASHER); + flasher_pulse (FLASH_DIVERTER_FLASHER); + task_sleep (TIME_300MS); + leff_exit(); +}//end of function + + + + +void side_ramp_leff (void) { + flasher_pulse (FLASH_LEFT_RAMP_UP_FLASHER); + flasher_pulse (FLASH_SIDE_RAMP_FLASHER); + task_sleep (TIME_100MS); + flasher_pulse (FLASH_LEFT_RAMP_UP_FLASHER); + flasher_pulse (FLASH_SIDE_RAMP_FLASHER); + task_sleep (TIME_100MS); + flasher_pulse (FLASH_LEFT_RAMP_UP_FLASHER); + flasher_pulse (FLASH_SIDE_RAMP_FLASHER); + task_sleep (TIME_100MS); + flasher_pulse (FLASH_LEFT_RAMP_UP_FLASHER); + flasher_pulse (FLASH_SIDE_RAMP_FLASHER); + task_sleep (TIME_100MS); + flasher_pulse (FLASH_LEFT_RAMP_UP_FLASHER); + flasher_pulse (FLASH_SIDE_RAMP_FLASHER); + leff_exit(); +}//end of function + diff --git a/machine/dm/rollovers.c b/machine/dm/rollovers.c new file mode 100644 index 000000000..ad521a624 --- /dev/null +++ b/machine/dm/rollovers.c @@ -0,0 +1,504 @@ +/* + * demolition man + * rollovers.c + * + * written by James Cardona + * + * Location Description: + * MTL rollovers: In the top right corner are three rollovers which advance + * the bonus multiplier. Balls leave the rollovers into the jet bumpers. + * These are very hard to see from the player's point of view. + * Especially the leftmost (M) rollover. + * + * MTL rollovers + * are actually left, center, right but + * are labeled middle, top, lower where + * left is called middle + * center is called top + * right is called lower + * + * Scoring Description: (original game) + * MTL Rollovers light an increasing bonus (2x, 3x, 4x, 5x) multiplier. The bonus + * multiplier is not scored until the end of the ball. + * Getting the 5x bonus multiplier also lights the extra ball on the left loop (orbit). + * Each completed MTL rollover sequence lights Access Claw at the left inlane. + * Hitting an unlit 250k, lit one 100k + * all 3 500k bonus + * + * Scoring Description: (my rules) + * same as original + * + */ +/* CALLSET_SECTION (rollovers, __machine2__) */ + + +#include +#include "dm/global_constants.h" + +//constants +const U8 max_rollover_bonus_multiplier = 5; + +//local variables +__boolean middle_rollover_activated; +__boolean top_rollover_activated; +__boolean lower_rollover_activated; +U8 rollover_bonus_multiplier; // 0 to 5 +U8 rollover_SoundCounter; +U8 rollover_MessageCounter; + +//external variables + + +//internally called function prototypes --external found at protos.h +void rollover_reset (void); +void all_rollover_made (void); +void rollover_sounds_already_lit(void); +void rollovers_mtl_effect(void); + +/**************************************************************************** + * initialize and exit + ***************************************************************************/ +void rollover_reset (void) { + rollover_SoundCounter = 0; + rollover_MessageCounter = 0; + middle_rollover_activated = TRUE; + top_rollover_activated = FALSE; + lower_rollover_activated = FALSE; + rollover_bonus_multiplier = 1; + + lamp_tristate_on(LM_MIDDLE_ROLLOVER); + lamp_tristate_off(LM_TOP_ROLLOVER); + lamp_tristate_off(LM_LOWER_ROLLOVER); +}//end of rollover_reset + +void player_rollover_reset (void) { }//end of function + +CALLSET_ENTRY (rollovers, start_player) { player_rollover_reset(); } +CALLSET_ENTRY (rollovers, start_ball) { rollover_reset(); } + + +/**************************************************************************** + * body + ***************************************************************************/ +void all_rollover_made (void){ + lamp_tristate_flash(LM_MIDDLE_ROLLOVER); + lamp_tristate_flash(LM_TOP_ROLLOVER); + lamp_tristate_flash(LM_LOWER_ROLLOVER); + if (rollover_bonus_multiplier < max_rollover_bonus_multiplier) { + ++rollover_bonus_multiplier; + deff_start (DEFF_ALL_ROLLOVERS_EFFECT); + } + else if (rollover_bonus_multiplier == max_rollover_bonus_multiplier) start_extraball(); + task_sleep (TIME_2S); + lamp_tristate_off(LM_MIDDLE_ROLLOVER); + lamp_tristate_off(LM_TOP_ROLLOVER); + lamp_tristate_off(LM_LOWER_ROLLOVER); + middle_rollover_activated = FALSE; + top_rollover_activated = FALSE; + lower_rollover_activated = FALSE; + score (ALL_ROLLOVERS_SCORE); + //light access claw + increment_access_claw_light_on();//at inlanes.c +}//end of function + + +//note that switch is called left rollover corresponds to light called middle rollover +CALLSET_ENTRY (rollovers, sw_left_rollover) { + //if already lit + if (middle_rollover_activated) { + rollover_sounds_already_lit(); + score (ROLLOVERS_SCORE1); + } + else { //else - not already lit, so activate rollover + lamp_tristate_flash(LM_MIDDLE_ROLLOVER); + task_sleep (TIME_500MS); + lamp_tristate_on(LM_MIDDLE_ROLLOVER); + middle_rollover_activated = TRUE; + score (ROLLOVERS_SCORE2); + //check to see if this is the third rollover to activate + if (top_rollover_activated && lower_rollover_activated) all_rollover_made(); + else deff_start (DEFF_ROLLOVERS_EFFECT); + }//end of else - not already lit, so activate rollover +}//end of function rollovers_sw_middle_rollover + + + +//note that switch is called center rollover corresponds to light called top rollover +CALLSET_ENTRY (rollovers, sw_center_rollover) { + if (top_rollover_activated) { + rollover_sounds_already_lit(); + score (ROLLOVERS_SCORE1); + } + else { //activate rollover + lamp_tristate_flash(LM_TOP_ROLLOVER); + task_sleep (TIME_500MS); + lamp_tristate_on(LM_TOP_ROLLOVER); + top_rollover_activated = TRUE; + score (ROLLOVERS_SCORE2); + //check to see if this is the third rollover to activate + if (middle_rollover_activated && lower_rollover_activated) all_rollover_made(); + else deff_start (DEFF_ROLLOVERS_EFFECT); + }//end of else - not already lit, so activate rollover +}//end of function rollovers_sw_top_rollover + + + +//note that switch called right rollover corresponds to light called lower rollover +CALLSET_ENTRY (rollovers, sw_right_rollover) { + if (lower_rollover_activated) { + rollover_sounds_already_lit(); + score (ROLLOVERS_SCORE1); + } + else { //activate rollover + lamp_tristate_flash(LM_LOWER_ROLLOVER); + task_sleep (TIME_500MS); + lamp_tristate_on(LM_LOWER_ROLLOVER); + lower_rollover_activated = TRUE; + score (ROLLOVERS_SCORE2); + //check to see if this is the third rollover to activate + if (middle_rollover_activated && top_rollover_activated) all_rollover_made(); + else deff_start (DEFF_ROLLOVERS_EFFECT); + }//end of else - not already lit, so activate rollover +}//end of function rollovers_sw_lower_rollover + + + + /**************************************************************************** + * rotate rollovers when buttons pressed + ***************************************************************************/ +CALLSET_ENTRY (rollovers, sw_left_button, sw_upper_left_button) { + if (valid_playfield && !flag_test(FLAG_VIDEO_MODE_RUNNING) ) { + if (top_rollover_activated && lower_rollover_activated) { //left (M) not activated + lamp_tristate_on(LM_MIDDLE_ROLLOVER); + lamp_tristate_on(LM_TOP_ROLLOVER); + lamp_tristate_off(LM_LOWER_ROLLOVER); + middle_rollover_activated = TRUE; + top_rollover_activated = TRUE; + lower_rollover_activated = FALSE; + } + else if (middle_rollover_activated && lower_rollover_activated) { //center (T) not activated + lamp_tristate_off(LM_MIDDLE_ROLLOVER); + lamp_tristate_on(LM_TOP_ROLLOVER); + lamp_tristate_on(LM_LOWER_ROLLOVER); + middle_rollover_activated = FALSE; + top_rollover_activated = TRUE; + lower_rollover_activated = TRUE; + } + else if (middle_rollover_activated && top_rollover_activated) { //right (L) not activated + lamp_tristate_on(LM_MIDDLE_ROLLOVER); + lamp_tristate_off(LM_TOP_ROLLOVER); + lamp_tristate_on(LM_LOWER_ROLLOVER); + middle_rollover_activated = TRUE; + top_rollover_activated = FALSE; + lower_rollover_activated = TRUE; + } + else if (middle_rollover_activated) { //center and right not activated + lamp_tristate_off(LM_MIDDLE_ROLLOVER); + lamp_tristate_off(LM_TOP_ROLLOVER); + lamp_tristate_on(LM_LOWER_ROLLOVER); + middle_rollover_activated = FALSE; + lower_rollover_activated = TRUE; + top_rollover_activated = FALSE; + } + else if (top_rollover_activated) { //left and right not activated + lamp_tristate_on(LM_MIDDLE_ROLLOVER); + lamp_tristate_off(LM_TOP_ROLLOVER); + lamp_tristate_off(LM_LOWER_ROLLOVER); + middle_rollover_activated = TRUE; + top_rollover_activated = FALSE; + lower_rollover_activated = FALSE; + } + else if (lower_rollover_activated) { //left and center not activated + lamp_tristate_off(LM_MIDDLE_ROLLOVER); + lamp_tristate_on(LM_TOP_ROLLOVER); + lamp_tristate_off(LM_LOWER_ROLLOVER); + middle_rollover_activated = FALSE; + top_rollover_activated = TRUE; + lower_rollover_activated = FALSE; + } + }//end of if (in_live_game) +}//end of function to rotate left + + + +//rotate rollovers when buttons pressed +CALLSET_ENTRY (rollovers, sw_right_button, sw_upper_right_button) { + if (valid_playfield && !flag_test(FLAG_VIDEO_MODE_RUNNING) ) { + if (top_rollover_activated && lower_rollover_activated) { //left not activated + lamp_tristate_on(LM_MIDDLE_ROLLOVER); + lamp_tristate_off(LM_TOP_ROLLOVER); + lamp_tristate_on(LM_LOWER_ROLLOVER); + middle_rollover_activated = TRUE; + top_rollover_activated = FALSE; + lower_rollover_activated = TRUE; + } + else if (middle_rollover_activated && lower_rollover_activated) { //center not activated + lamp_tristate_on(LM_MIDDLE_ROLLOVER); + lamp_tristate_on(LM_TOP_ROLLOVER); + lamp_tristate_off(LM_LOWER_ROLLOVER); + middle_rollover_activated = TRUE; + top_rollover_activated = TRUE; + lower_rollover_activated = FALSE; + } + else if (middle_rollover_activated && top_rollover_activated) { //right not activated + lamp_tristate_off(LM_MIDDLE_ROLLOVER); + lamp_tristate_on(LM_TOP_ROLLOVER); + lamp_tristate_on(LM_LOWER_ROLLOVER); + middle_rollover_activated = FALSE; + top_rollover_activated = TRUE; + lower_rollover_activated = TRUE; + } + else if (middle_rollover_activated) { //center and right not activated + lamp_tristate_off(LM_MIDDLE_ROLLOVER); + lamp_tristate_on(LM_TOP_ROLLOVER); + lamp_tristate_off(LM_LOWER_ROLLOVER); + middle_rollover_activated = FALSE; + top_rollover_activated = TRUE; + lower_rollover_activated = FALSE; + } + else if (top_rollover_activated) { //left and right not activated + lamp_tristate_off(LM_MIDDLE_ROLLOVER); + lamp_tristate_off(LM_TOP_ROLLOVER); + lamp_tristate_on(LM_LOWER_ROLLOVER); + middle_rollover_activated = FALSE; + top_rollover_activated = FALSE; + lower_rollover_activated = TRUE; + } + else if (lower_rollover_activated) { //left and center not activated + lamp_tristate_on(LM_MIDDLE_ROLLOVER); + lamp_tristate_off(LM_TOP_ROLLOVER); + lamp_tristate_off(LM_LOWER_ROLLOVER); + middle_rollover_activated = TRUE; + top_rollover_activated = FALSE; + lower_rollover_activated = FALSE; + } + }//end of if (in_live_game) +}//end of function to rotate right + + + + + + +/**************************************************************************** + * + * sound effects + * + ****************************************************************************/ +void rollover_sounds_already_lit(void) { + rollover_SoundCounter = random_scaled(2);//from kernal/random.c + if ( rollover_SoundCounter == 0 ) { + sound_start (ST_EFFECT, TOINK1, SL_2S, PRI_GAME_QUICK5); + task_sleep (TIME_100MS); + sound_start (ST_EFFECT, TOINK1, SL_2S, PRI_GAME_QUICK5); + task_sleep (TIME_100MS); + sound_start (ST_EFFECT, TOINK1, SL_2S, PRI_GAME_QUICK5); + task_sleep (TIME_100MS); + sound_start (ST_EFFECT, TOINK1, SL_2S, PRI_GAME_QUICK5); + } +else if ( rollover_SoundCounter == 1 ) { + sound_start (ST_EFFECT, TOINK2, SL_2S, PRI_GAME_QUICK5); + task_sleep (TIME_100MS); + sound_start (ST_EFFECT, TOINK2, SL_2S, PRI_GAME_QUICK5); + task_sleep (TIME_100MS); + sound_start (ST_EFFECT, TOINK2, SL_2S, PRI_GAME_QUICK5); + task_sleep (TIME_100MS); + sound_start (ST_EFFECT, TOINK2, SL_2S, PRI_GAME_QUICK5); +} +}//end of function + + + + +/**************************************************************************** + * + * display effects + * + ****************************************************************************/ +void rollovers_animation_display_effect (U16 start_frame, U16 end_frame){ + U16 fno; + for (fno = start_frame; fno <= end_frame; fno += 2) { + dmd_alloc_pair (); + frame_draw(fno); + dmd_show2 (); + task_sleep (TIME_100MS); + }//end of inner loop +}//end of function + + + +void rollovers_animation_display_effect_reverse (U16 start_frame, U16 end_frame){ + U16 fno; + for (fno = start_frame; fno >= end_frame; fno -= 2) { + dmd_alloc_pair (); + frame_draw(fno); + dmd_show2 (); + task_sleep (TIME_100MS); + }//end of inner loop +}//end of function + + + +void all_rollovers_effect_deff(void) { + U16 fno; + dmd_alloc_pair_clean ();// Clean both pages + + rollover_SoundCounter = random_scaled(3);//from kernal/random.c + if ( rollover_SoundCounter == 0 ) sound_start (ST_EFFECT, STORM1_SHORT, SL_2S, PRI_GAME_QUICK5); + else if ( rollover_SoundCounter == 1 ) sound_start (ST_EFFECT, STORM1_MED, SL_2S, PRI_GAME_QUICK5); + else if ( rollover_SoundCounter == 2 ) sound_start (ST_EFFECT, STORM1_LONG, SL_2S, PRI_GAME_QUICK5); + + rollovers_animation_display_effect_reverse (IMG_GUN_END, IMG_GUN_START); + + rollover_SoundCounter = random_scaled(3);//from kernal/random.c + if ( rollover_SoundCounter == 0 ) sound_start (ST_EFFECT, STORM1_SHORT, SL_2S, PRI_GAME_QUICK5); + else if ( rollover_SoundCounter == 1 ) sound_start (ST_EFFECT, STORM1_MED, SL_2S, PRI_GAME_QUICK5); + else if ( rollover_SoundCounter == 2 ) sound_start (ST_EFFECT, STORM1_LONG, SL_2S, PRI_GAME_QUICK5); + + dmd_alloc_pair_clean ();// Clean both pages + for (fno = IMG_GUN_START; fno <= IMG_GUN_END; fno += 2) { + switch (rollover_bonus_multiplier) { + default: + case 2: sprintf ("2 X"); break; + case 3: sprintf ("3 X"); break; + case 4: sprintf ("4 X"); break; + case 5: sprintf ("5 X"); break; + }//end of switch + dmd_map_overlay (); + dmd_clean_page_low (); + font_render_string_center (&font_fireball, DMD_MIDDLE_X + 30, DMD_BIG_CY_Cent, sprintf_buffer); + dmd_text_outline (); + dmd_alloc_pair (); + frame_draw(fno); + dmd_overlay_outline (); + dmd_show2 (); + task_sleep (TIME_100MS); + }//end of for loop + + rollover_SoundCounter = random_scaled(3);//from kernal/random.c + if ( rollover_SoundCounter == 0 ) sound_start (ST_EFFECT, STORM1_SHORT, SL_2S, PRI_GAME_QUICK5); + else if ( rollover_SoundCounter == 1 ) sound_start (ST_EFFECT, STORM1_MED, SL_2S, PRI_GAME_QUICK5); + else if ( rollover_SoundCounter == 2 ) sound_start (ST_EFFECT, STORM1_LONG, SL_2S, PRI_GAME_QUICK5); + + dmd_alloc_pair_clean ();// Clean both pages + for (fno = IMG_GUN_END; fno >= IMG_GUN_START; fno -= 2) { + sprintf ("BONUS"); + dmd_map_overlay (); + dmd_clean_page_low (); + font_render_string_center (&font_fireball, DMD_MIDDLE_X + 30, DMD_BIG_CY_Cent, sprintf_buffer); + font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_SMALL_CY_5, "CLAW LIT"); + dmd_text_outline (); + dmd_alloc_pair (); + frame_draw(fno); + dmd_overlay_outline (); + dmd_show2 (); + task_sleep (TIME_100MS); + }//end of for loop + + rollover_SoundCounter = random_scaled(3);//from kernal/random.c + if ( rollover_SoundCounter == 0 ) sound_start (ST_EFFECT, STORM1_SHORT, SL_2S, PRI_GAME_QUICK5); + else if ( rollover_SoundCounter == 1 ) sound_start (ST_EFFECT, STORM1_MED, SL_2S, PRI_GAME_QUICK5); + else if ( rollover_SoundCounter == 2 ) sound_start (ST_EFFECT, STORM1_LONG, SL_2S, PRI_GAME_QUICK5); + + task_sleep_sec (1); + deff_exit (); +}//end of mode_effect_deff + + + + + +void rollovers_mtl_effect(void) { + U16 fno; + dmd_alloc_pair_clean ();// Clean both pages + + rollover_SoundCounter = random_scaled(3);//from kernal/random.c + + if ( rollover_SoundCounter == 0 ) sound_start (ST_EFFECT, MACHINE1_SHORT, SL_2S, PRI_GAME_QUICK5); + else if ( rollover_SoundCounter == 1 ) sound_start (ST_EFFECT, MACHINE1_MED, SL_2S, PRI_GAME_QUICK5); + else if ( rollover_SoundCounter == 2 ) sound_start (ST_EFFECT, MACHINE1_LONG, SL_2S, PRI_GAME_QUICK5); + + for (fno = IMG_GUN_START; fno <= IMG_GUN_END; fno += 2) { + sprintf ("M T L"); + dmd_map_overlay (); + dmd_clean_page_low (); + font_render_string_center (&font_fireball, DMD_MIDDLE_X, DMD_BIG_CY_Cent, sprintf_buffer); + dmd_text_outline (); + dmd_alloc_pair (); + frame_draw(fno); + dmd_overlay_outline (); + dmd_show2 (); + task_sleep (TIME_100MS); + }//end of for loop + +}//end of mode_effect_deff + + + +void rollovers_effect_deff(void) { + rollovers_mtl_effect(); + + rollover_SoundCounter = random_scaled(3);//from kernal/random.c + + if ( rollover_SoundCounter == 0 ) sound_start (ST_EFFECT, MACHINE1_SHORT, SL_2S, PRI_GAME_QUICK5); + else if ( rollover_SoundCounter == 1 ) sound_start (ST_EFFECT, MACHINE1_MED, SL_2S, PRI_GAME_QUICK5); + else if ( rollover_SoundCounter == 2 ) sound_start (ST_EFFECT, MACHINE1_LONG, SL_2S, PRI_GAME_QUICK5); + + dmd_alloc_pair_clean ();// Clean both pages + + if (IN_TEST) { if (++rollover_MessageCounter > 2) rollover_MessageCounter = 0; } + else rollover_MessageCounter = random_scaled(3); + + switch (rollover_MessageCounter) { + default: + case 0: + dmd_map_overlay (); + dmd_clean_page_low (); + dmd_sched_transition (&trans_bitfade_slow); + font_render_string_center (&font_term6, DMD_MIDDLE_X, DMD_MED_CY_1, "LIGHT M T L"); + font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_SMALL_CY_3, "TO"); + font_render_string_center (&font_bitcube10, DMD_MIDDLE_X, DMD_MED_CY_3, "ADVANCE BONUS X"); + dmd_text_outline (); + dmd_alloc_pair (); + frame_draw(IMG_GUN_END); + dmd_overlay_outline (); + dmd_show2 (); + break; + case 1: + dmd_map_overlay (); + dmd_clean_page_low (); + dmd_sched_transition (&trans_bitfade_slow); + font_render_string_center (&font_term6, DMD_MIDDLE_X, DMD_MED_CY_1, "LIGHT M T L"); + font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_SMALL_CY_3, "TO"); + font_render_string_center (&font_bitcube10, DMD_MIDDLE_X, DMD_MED_CY_3, "LIGHT CRYOCLAW"); + dmd_text_outline (); + dmd_alloc_pair (); + frame_draw(IMG_GUN_END); + dmd_overlay_outline (); + dmd_show2 (); + break; + case 2: + dmd_map_overlay (); + dmd_clean_page_low (); + dmd_sched_transition (&trans_bitfade_slow); + font_render_string_center (&font_term6, DMD_MIDDLE_X, DMD_MED_CY_1, "LIGHT M T L"); + font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_MED_CY_2, "5 TIMES TO"); + font_render_string_center (&font_bitcube10, DMD_MIDDLE_X, DMD_MED_CY_3, "LIGHT EXTRA BALL"); + dmd_text_outline (); + dmd_alloc_pair (); + frame_draw(IMG_GUN_END); + dmd_overlay_outline (); + dmd_show2 (); + break; + }//end of switch + + rollover_SoundCounter = random_scaled(3);//from kernal/random.c + + if ( rollover_SoundCounter == 0 ) sound_start (ST_EFFECT, MACHINE1_SHORT, SL_2S, PRI_GAME_QUICK5); + else if ( rollover_SoundCounter == 1 ) sound_start (ST_EFFECT, MACHINE1_MED, SL_2S, PRI_GAME_QUICK5); + else if ( rollover_SoundCounter == 2 ) sound_start (ST_EFFECT, MACHINE1_LONG, SL_2S, PRI_GAME_QUICK5); + + task_sleep_sec (1); + deff_exit (); +}//end of mode_effect_deff + diff --git a/machine/dm/simple_switches.c b/machine/dm/simple_switches.c new file mode 100644 index 000000000..81029a00d --- /dev/null +++ b/machine/dm/simple_switches.c @@ -0,0 +1,205 @@ +/* + * demolition man + * simple_swithces.c + * + * written by James Cardona + * + * Location Description: + * Upper Rebound : This is a three inch piece of rubber forming the left wall of + * the Center Ramp that is stretched across a switch ... hitting the rubber + * activates the switch, just like the left and right 110 switches on Whirlwind. + * + * Right Rebound : This is a three inch piece of rubber on the right side + * of the playfield, just above the right outlane. Just like the Upper Rebound, + * it is rubber stretched across a switch. + * + * + * Scoring Description: (original game) + * rebounds score 1010 + * slings score 1000 + * + * Scoring Description: (my rules) + * same as original + * + * */ + +#include +#include "dm/global_constants.h" + +//constants +const U8 SSTotalNumOfSounds = 11; + +const sound_code_t outlaneSoundArray[] = { SPCH_TOO_BAD, SPCH_PATHETIC, SPCH_HATE_WHEN_THAT_HAPPENS, + SPCH_OHH_NO, SPCH_BAD_AIM, SPCH_DULCH, + SPCH_WES_LAUGH_SHORT1, SPCH_SIMON_SNICKER, SPCH_WES_LAUGH_SHORT2, + SPCH_WES_LAUGH_SHORT3, SPCH_JUST_LOVELY }; + + +//local variables +U8 secretCodeCount; +__boolean simple_ball_search; + +//external variables + +//prototypes +void simple_sounds(void); + +/**************************************************************************** + * body + * + ****************************************************************************/ +CALLSET_ENTRY (simple_switches, start_ball) { simple_ball_search = FALSE; } + + + +CALLSET_ENTRY (simple_switches, sw_right_outlane, sw_left_outlane) { + score(OUTLANE_SCORE); + U8 outlaneSoundCounter; + outlaneSoundCounter = random_scaled(SSTotalNumOfSounds);//from kernal/random.c + sound_start (ST_SPEECH, outlaneSoundArray[outlaneSoundCounter], SL_4S, PRI_GAME_QUICK5); +}//end of function + + + +CALLSET_ENTRY (simple_switches, sw_upper_left_flipper_gate) { + if (flag_test(FLAG_IS_HUXLEY_RUNNING) ) huxley_mode_shot_made(); + else if (flag_test (FLAG_IS_PBREAK_RUNNING) ) prison_break_made(); + else score(UP_LEFT_FLIP_GATE_SCORE); +}//end of function + + +CALLSET_ENTRY (simple_switches, sw_upper_rebound) { + leff_start (LEFF_UPPER_REBOUND); + if (flag_test(FLAG_IS_HUXLEY_RUNNING) ) huxley_mode_shot_made(); + else if (flag_test (FLAG_IS_PBREAK_RUNNING) ) { prison_break_made(); } + else { + score(UPPER_REBOUND_SCORE); + simple_sounds(); + }//end of else +}//end of function + + + + + +CALLSET_ENTRY (simple_switches, sw_lower_rebound) { + leff_start (LEFF_LOWER_REBOUND); + if (flag_test(FLAG_IS_HUXLEY_RUNNING) ) huxley_mode_shot_made(); + else if (flag_test (FLAG_IS_PBREAK_RUNNING) ) { prison_break_made(); } + else { + simple_sounds(); + score(LOWER_REBOUND_SCORE); + }//end of else +}//end of function + + + +CALLSET_ENTRY (simple_switches, sw_sling) { + if (!simple_ball_search) { + score(SLING_SCORE); + simple_sounds(); + } +}//end of function + + + +CALLSET_ENTRY (simple_switches, ball_search){ + //VERIFY WE DON'T HAVE ALL THE BALLS IN THE TROUGH AND JUST LOST COUNT + U8 temp_live_balls; + temp_live_balls = (5 - device_recount(device_entry (DEVNO_TROUGH) )); + if (live_balls > temp_live_balls) live_balls = temp_live_balls; + if (live_balls == 0) { + live_balls++; + device_remove_live (); //this will remove only 1 + } + simple_ball_search = TRUE; + + //the smart thing to do would be to actually be a "real" programmer + //and figure out why search.c is not working - maybe I'll do that + //someday. but for now, here is some really crappy code! + if (simple_ball_search) { sol_request_async(SOL_LEFT_SLING); task_sleep (TIME_300MS); } + if (simple_ball_search) { sol_request_async(SOL_RIGHT_SLING); task_sleep (TIME_300MS); } + if (simple_ball_search) { sol_request_async(SOL_LEFT_JET); task_sleep (TIME_300MS); } + if (simple_ball_search) { sol_request_async(SOL_RIGHT_JET); task_sleep (TIME_300MS); } + if (simple_ball_search) { sol_request_async(SOL_TOP_SLING); task_sleep (TIME_300MS); } + if (simple_ball_search) { sol_request (SOL_EJECT); task_sleep (TIME_300MS); } + if (simple_ball_search) { sol_request_async(SOL_TOP_POPPER); task_sleep (TIME_300MS); } + if (simple_ball_search) { sol_request_async(SOL_BOTTOM_POPPER); } +}//end of function + + + +CALLSET_ENTRY (simple_switches, ball_search_end){ simple_ball_search = FALSE; } +CALLSET_ENTRY (simple_switches, start_player) { secretCodeCount = 0; } + + +//secret testing button +CALLSET_ENTRY (simple_switches, sw_left_handle_button) { + if (IN_TEST) { + secretCodeCount++; +// if (secretCodeCount == 3) huxley_increment_all(); +// if (secretCodeCount == 6) demotime_increment_all(); + if (secretCodeCount == 5) enable_back_in_the_fridge(); + +// increment_freeze(); + }//END OF IN TEST +}//end of function + + +//secret testing button +CALLSET_ENTRY (simple_switches, sw_escape) { if (IN_TEST) scores_reset (); } + +/**************************************************************************** + * lighting effects + ****************************************************************************/ +void upper_rebound_leff (void) { + flasher_pulse (FLASH_LEFT_RAMP_UP_FLASHER); + task_sleep (TIME_33MS); + flasher_pulse (FLASH_DIVERTER_FLASHER); + task_sleep (TIME_33MS); + flasher_pulse (FLASH_RIGHT_RAMP_UP_FLASHER); + task_sleep (TIME_100MS); + + flasher_pulse (FLASH_LEFT_RAMP_UP_FLASHER); + task_sleep (TIME_33MS); + flasher_pulse (FLASH_DIVERTER_FLASHER); + task_sleep (TIME_33MS); + flasher_pulse (FLASH_RIGHT_RAMP_UP_FLASHER); + task_sleep (TIME_100MS); + + flasher_pulse (FLASH_LEFT_RAMP_UP_FLASHER); + task_sleep (TIME_33MS); + flasher_pulse (FLASH_DIVERTER_FLASHER); + task_sleep (TIME_33MS); + flasher_pulse (FLASH_RIGHT_RAMP_UP_FLASHER); + leff_exit (); +}//end of function + + + +void lower_rebound_leff (void) { + flasher_pulse (FLASH_LOWER_REBOUND_FLASHER); + task_sleep (TIME_100MS); + flasher_pulse (FLASH_LOWER_REBOUND_FLASHER); + task_sleep (TIME_100MS); + flasher_pulse (FLASH_LOWER_REBOUND_FLASHER); + task_sleep (TIME_100MS); + flasher_pulse (FLASH_LOWER_REBOUND_FLASHER); + leff_exit (); +}//end of function + + + + +/**************************************************************************** + * sound effects + ****************************************************************************/ +void simple_sounds (void) { + U8 simple_SoundCounter; + simple_SoundCounter = random_scaled(4);//from kernal/random.c + if ( simple_SoundCounter == 0 ) sound_start (ST_EFFECT, ZAPP_1, SL_2S, PRI_GAME_QUICK5); + else if ( simple_SoundCounter == 1 ) sound_start (ST_EFFECT, JOINK, SL_2S, PRI_GAME_QUICK5); + else if ( simple_SoundCounter == 2 ) sound_start (ST_EFFECT, JOINK_2, SL_2S, PRI_GAME_QUICK5); + else if ( simple_SoundCounter == 3 ) sound_start (ST_EFFECT, ZAPP_2, SL_2S, PRI_GAME_QUICK5); +}//end of function + diff --git a/machine/dm/standupfrenzy.c b/machine/dm/standupfrenzy.c new file mode 100644 index 000000000..a1540a3f9 --- /dev/null +++ b/machine/dm/standupfrenzy.c @@ -0,0 +1,614 @@ +/* + * demolition man + * standupfrenzy.c + * + * written by James Cardona - based loosely on greed mode from TZ code + * + * Location Description: + * Standups: There are 5 yellow standup targets scattered about the playfield, + * like those in TZ. However, these targets are very important to game play. + * One is located directly below the upper left flipper; another is to the + * right of the left ramp; two more are angled to the left of the right ramp; + * and one is to the right of the right ramp. + * + * Scoring Description: (original game) + * These are similar to Twilight Zone's Greed targets. + * They are worth 1 million plus 1 million per number of hits + * (resets on each ball). Maximum of 20 hits. + * + * Depending on machine settings, One, Two, or Three sets of + * targets must be completed to light Quick Freeze, depending on + * whether Quick Freeze is set to easy, medium, or hard. + * + * an unlit target scores nothing + * once all 5 hit - they extinguish and all 5 relight + * + * Scoring Description: (my rules) + * same as above except + * in frenzy mode worth 5 million plus 1 million per number of hits + * no max number of hits - 20 second timer + * outside frenzy worth 500k points + * + * + * estimate of average standupfrenzy mode score: 21 million to 56 million + * estimate of average standup score: 2.5 million + * + * */ +/* CALLSET_SECTION (standupfrenzy, __machine__) */ + +#include +#include "dm/global_constants.h" +#include "clawmagnet.h" +#include "standupfrenzy.h" + +//constants +#define NO_TARGETS 0x0/** Bitmask referring to all 5 standup targets */ +#define ALL_TARGETS 0x1f/** Bitmask referring to all 5 standup targets */ +const U8 STANDUP_EASY_GOAL = 1; +const U8 STANDUP_HARD_GOAL = 7; +const U8 STANDUP_GOAL_INCREMENT = 5; +const U8 STANDUP_HARD_GOAL_INCREMENT = 10; +const U8 STANDUP_GOAL_MAX = 100; + +//local variables +U8 standup_MessageCounter; +U8 standupFrenzy_temp_counter;//generic counter +U8 standupFrenzy_SoundCounter = 0;//used for randomizing sound calls +U8 standup_SoundCounter = 0;//used for randomizing sound calls +score_t standupFrenzy_temp_score;//generic score for calculations + +__local__ U8 standupFrenzy_modes_achieved; +__local__ U8 standupFrenzyNumHits; + U8 standupFrenzyTimer; +score_t standupFrenzyTotalScore; +score_t standupFrenzyLastScore; +score_t standupFrenzyNextScore; + U8 standupFrenzyLightsLit; //tracks which LIGHTS ARE LIT + U8 standupLightsLit; //tracks which LIGHTS ARE LIT +__local__ U8 standup_num_of_hits; +__local__ U8 standup_goal; +__boolean isStandupFrenzyActivated; +__local__ U8 exploded[5]; + +//external variables + +//internally called function prototypes --external found at protos.h +void standupFrenzy_mode_init (void); +void standupFrenzy_mode_exit (void); +void standupHandler (U8 target); +void standupHandler1 (U8 target, U8 lamp); +void frenzyHandler (U8 target, U8 lamp); +void standup_lamp_update1 (U8 mask, U8 lamp); +void standupFrenzy_sounds (void); +void standup_sounds (void); + + +/**************************************************************************** + * mode definition structure + ***************************************************************************/ +struct timed_mode_ops standupFrenzy_mode = { + DEFAULT_MODE, + .init = standupFrenzy_mode_init, + .exit = standupFrenzy_mode_exit, + .gid = GID_STANDUPFRENZY_MODE_RUNNING, + .music = MUS_MD_STANDUP_FRENZY, + .deff_starting = DEFF_STANDUPFRENZY_START_EFFECT, + .deff_running = DEFF_STANDUPFRENZY_EFFECT, +// .deff_ending = DEFF_STANDUPFRENZY_END_EFFECT, + .prio = PRI_GAME_MODE5, + .init_timer = 48, //time displayed plus length of starting deff + .timer = &standupFrenzyTimer, + .grace_timer = 3, //default is 2 + //.pause = , // default is null_false_function - other is system_timer_pause, +}; + + +/**************************************************************************** + * initialize and exit + ***************************************************************************/ +void standupFrenzy_mode_init (void) { + //the claw mode can expire on its own and since it is a lower priority it will not display + //callset_invoke (end_claw_mode); // this seemed to cause occasional crashes + clawmagnet_off (); + flag_off(FLAG_IS_BALL_ON_CLAW); + flipper_enable (); + ballsave_add_time (10); + isStandupFrenzyActivated = TRUE; + ++standupFrenzy_modes_achieved; + standupFrenzyNumHits = 0; + standupFrenzyLightsLit = ALL_TARGETS; + callset_invoke (lamp_update); + score_zero (standupFrenzyTotalScore); + score_zero (standupFrenzyLastScore); + score_zero (standupFrenzyNextScore); + score_add (standupFrenzyNextScore, score_table[FRENZY_HIT_SCORE]); + score_add (standupFrenzyTotalScore, score_table[FRENZY_START_SCORE]); + score (FRENZY_START_SCORE); + U8 i; + for (i = 0; i < 5; i++) exploded[i] = 0; +}//end of standupFrenzy_mode_init + + + +void standupFrenzy_mode_exit (void) { + /* Light all 'default' lamps */ + isStandupFrenzyActivated = FALSE; + task_sleep (TIME_100MS); + standupLightsLit = ALL_TARGETS; + callset_invoke (lamp_update); + // standupFrenzyLightsLit = NO_TARGETS; +}//end of standupFrenzy_mode_exit + + + +CALLSET_ENTRY (standupFrenzy, start_ball) { + /* Light all 'default' lamps */ + standupFrenzyLightsLit = NO_TARGETS; + standupLightsLit = ALL_TARGETS; + callset_invoke (lamp_update); +}//end of function + + +CALLSET_ENTRY (standupFrenzy, start_player) { + standup_MessageCounter = 0; + standupFrenzy_modes_achieved = 0; //these need to be zeroed in before we enter the mode so bonus doesn't fake trigger + standupFrenzyNumHits = 0; + /* Light all 'default' lamps */ + standupFrenzyLightsLit = NO_TARGETS; + standupLightsLit = ALL_TARGETS; + standup_num_of_hits = 0; + standup_goal = STANDUP_EASY_GOAL; + isStandupFrenzyActivated = FALSE; + callset_invoke (lamp_update); + +#ifdef CONFIG_DIFFICULTY_LEVEL + if (system_config.difficulty == EASY) standup_goal = STANDUP_EASY_GOAL; + else standup_goal = STANDUP_HARD_GOAL; +#endif +}//end of function + + +/**************************************************************************** + * external event listeners + ****************************************************************************/ +CALLSET_ENTRY (standupFrenzy, music_refresh) { timed_mode_music_refresh (&standupFrenzy_mode); } +CALLSET_ENTRY (standupFrenzy, end_ball) { if (timed_mode_running_p(&standupFrenzy_mode) ) timed_mode_end (&standupFrenzy_mode); } +CALLSET_ENTRY (standupFrenzy, display_update) { timed_mode_display_update (&standupFrenzy_mode); } + + +/**************************************************************************** + * standup target hit + ****************************************************************************/ +/* declare event listeners for standup target hits*/ +/* target is given as a bitmask to cover all the switches*/ +CALLSET_ENTRY (standupFrenzy, sw_standup_1) { standupHandler(0x1); } +CALLSET_ENTRY (standupFrenzy, sw_standup_2) { standupHandler(0x2); } +CALLSET_ENTRY (standupFrenzy, sw_standup_3) { standupHandler(0x4); } +CALLSET_ENTRY (standupFrenzy, sw_standup_4) { standupHandler(0x8); } +CALLSET_ENTRY (standupFrenzy, sw_standup_5) { standupHandler(0x10); } + + + +void standupHandler (U8 target) { + const U8 sw = task_get_arg (); + const U8 lamp = switch_lookup_lamp (sw); + + //verify target hit was a lit target and verify mode is running + if ((standupFrenzyLightsLit & target) && timed_mode_running_p(&standupFrenzy_mode)) frenzyHandler (target, lamp); + + //else frenzy mode NOT running - check for other modes + else if (flag_test(FLAG_IS_HUXLEY_RUNNING) ) huxley_mode_shot_made(); //do not change status of standup light + else if (flag_test (FLAG_IS_PBREAK_RUNNING) ) prison_break_made(); //do not change status of standup light + + //else no modes running ---verify target hit was a lit target + else if ((standupLightsLit & target) && !timed_mode_running_p(&standupFrenzy_mode)) standupHandler1 (target, lamp); + //otherwise - do nothing since an unlit target was hit +}//end of standupHandler + + + +void update_exploded (U8 target){ + switch (target) { + case 0x1: exploded[0]++; break; + case 0x2: exploded[1]++; break; + case 0x4: exploded[2]++; break; + case 0x8: exploded[3]++; break; + case 0x10: exploded[4]++; break; + }//end of switch +}//end of function + + + +void frenzyHandler (U8 target, U8 lamp) { + ++standupFrenzyNumHits; + sound_send (EXPLOSION1_LONG); + update_exploded(target); //this triggers explosion in display + standupFrenzyLightsLit &= ~target; // flag that target as hit + standup_lamp_update1 (target, lamp);//turn that lamp off + standupFrenzy_sounds(); + + //score 5 million plus 1 million times number of hits + score_zero (standupFrenzy_temp_score);//zero out temp score + score_add (standupFrenzy_temp_score, score_table[FRENZY_ADD_SCORE]);//multiply 1M by num hits + score_mul (standupFrenzy_temp_score, standupFrenzyNumHits); + score (FRENZY_HIT_SCORE); + score_long_unmultiplied (standupFrenzy_temp_score); //add temp score to player's score + + //do same for mode score + score_add (standupFrenzyTotalScore, score_table[FRENZY_HIT_SCORE]); + score_add (standupFrenzyTotalScore, standupFrenzy_temp_score); + + //do same for last score-this is the one we display + score_zero (standupFrenzyLastScore); + score_add (standupFrenzyLastScore, score_table[FRENZY_HIT_SCORE]); + score_add (standupFrenzyLastScore, standupFrenzy_temp_score); + + //do same for next score-this is the one we display + score_zero (standupFrenzyNextScore); + score_add (standupFrenzyNextScore, score_table[FRENZY_HIT_SCORE]); + score_add (standupFrenzyNextScore, standupFrenzy_temp_score); + score_add (standupFrenzyNextScore, score_table[FRENZY_ADD_SCORE]);//next score will be 1 million more + //if 5th light out then reset all lights back on + if (standupFrenzyNumHits % 5 == 0) { + standupFrenzyLightsLit = ALL_TARGETS; + callset_invoke (lamp_update);//turn all lamps on + U8 i; + for (i = 0; i < 5; i++) exploded[i] = 0; //RESET DEFF DISPLAY + } +}//end of function + + + +void standupHandler1 (U8 target, U8 lamp) { + ++standup_num_of_hits; + standupLightsLit &= ~target; /* flag that target as hit */ + standup_lamp_update1 (target, lamp); + if (flag_test (FLAG_IS_PBREAK_RUNNING) ) prison_break_made(); + else standup_sounds(); + lamp_tristate_flash (lamp); + score (STANDUP_SCORE); + //if we reached our quick freeze goal and quick freeze is not already set + if (standup_num_of_hits >= standup_goal) { + increment_light_quick_freeze_light();//sent to inlanes.c + + #ifdef CONFIG_DIFFICULTY_LEVEL + if (system_config.difficulty == EASY) standup_goal += STANDUP_GOAL_INCREMENT; + else standup_goal += STANDUP_HARD_GOAL_INCREMENT; + #elif + standup_goal += STANDUP_GOAL_INCREMENT; + #endif + + } + deff_start (DEFF_STANDUP_EFFECT); + //if 5th light out then reset all lights back on + if (standup_num_of_hits % 5 == 0) { + standupLightsLit = ALL_TARGETS; + callset_invoke (lamp_update);//turn all lamps on + } +}//end of function + + + + +/**************************************************************************** + * stand up lamps update + ****************************************************************************/ +void standup_lamp_update1 (U8 mask, U8 lamp) { + if (isStandupFrenzyActivated) { + //target was not hit yet, flash it + if (standupFrenzyLightsLit & mask) lamp_tristate_flash (lamp); + else lamp_tristate_off (lamp); + }//end of if + else { //mode not running + //target was not hit yet so it is on + if (standupLightsLit & mask) lamp_tristate_on (lamp); + else lamp_tristate_off (lamp); + }//end of else +}//end of standup_lamp_update1 + + + +CALLSET_ENTRY (standupFrenzy, lamp_update) { + standup_lamp_update1 (0x1, LM_STANDUP_1); + standup_lamp_update1 (0x2, LM_STANDUP_2); + standup_lamp_update1 (0x4, LM_STANDUP_3); + standup_lamp_update1 (0x8, LM_STANDUP_4); + standup_lamp_update1 (0x10, LM_STANDUP_5); +}//end of lamp_update + + +//claw freeze starts standup frenzy instead of locking a ball +CALLSET_ENTRY (standupFrenzy, sw_claw_freeze) { + demotime_increment(); + timed_mode_begin (&standupFrenzy_mode); +} + + + +/* not sure about this +void standupFrenzy_mode_expire (void) { + if (score_compare (score_table[SC_10M], standupFrenzyTotalScore) == 1) + callset_invoke (start_hurryup); +}// end of standupFrenzy_mode_expire +*/ + + +/**************************************************************************** + * + * sound effects + * + ****************************************************************************/ +void standup_sounds (void) { + standup_SoundCounter = random_scaled(3);//from kernal/random.c + if ( standup_SoundCounter == 0 ) + sound_start (ST_EFFECT, ZAPP_3_SHORT, SL_2S, PRI_GAME_QUICK5); + else if ( standup_SoundCounter == 1 ) + sound_start (ST_EFFECT, ZAPP_3_MED, SL_2S, PRI_GAME_QUICK5); + else if ( standup_SoundCounter == 2 ) + sound_start (ST_EFFECT, ZAPP_3_LONG, SL_2S, PRI_GAME_QUICK5); +}//end of function + + + +void standupFrenzy_sounds (void) { + standupFrenzy_SoundCounter = random_scaled(3);//from kernal/random.c + if ( standupFrenzy_SoundCounter == 0 ) + sound_start (ST_EFFECT, CHORD1, SL_2S, PRI_GAME_QUICK5); + else if ( standupFrenzy_SoundCounter == 1 ) + sound_start (ST_EFFECT, CHORD2, SL_2S, PRI_GAME_QUICK5); + else if ( standupFrenzy_SoundCounter == 2 ) + sound_start (ST_EFFECT, CHORD3, SL_2S, PRI_GAME_QUICK5); +}//end of function + + +/**************************************************************************** + * + * display effects -- frenzy mode only + * + ****************************************************************************/ +void standupfrenzy_start_effect_deff (void) { + U8 x; + U8 y; + U8 i = 0; + sound_send (EXPLOSION1_SHORT); + do { // Shake the text + dmd_alloc_pair_clean (); + dmd_draw_thin_border (dmd_low_buffer); + if (i < 5) { x = random_scaled (1); y = random_scaled (2); } + else if (i < 10) { x = random_scaled (2); y = random_scaled (3); } + else if (i < 15) { x = random_scaled (4); y = random_scaled (5); } + else if (i < 22) { x = random_scaled (8); y = random_scaled (4); } + else { x = random_scaled (10); y = random_scaled (5); } + if (i % 2 == 0) { + font_render_string_center (&font_fireball, DMD_MIDDLE_X + x, y + DMD_BIG_CY_Cent, "FRENZY"); + font_render_string_center (&font_fireball, DMD_MIDDLE_X - x, DMD_BIG_CY_Cent - y, "FRENZY"); + } + else { + font_render_string_center (&font_fireball, DMD_MIDDLE_X + x, y - DMD_BIG_CY_Cent, "FRENZY"); + font_render_string_center (&font_fireball, DMD_MIDDLE_X - x, DMD_BIG_CY_Cent + y, "FRENZY"); + } + // dmd_show_high (); +// dmd_show2 ();//shows a 4 color image + dmd_show_low (); + if (i == 0) sound_send (EXPLOSION1_SHORT); + if (i == 10) sound_send (EXPLOSION1_SHORT); + if (i == 18) sound_send (EXPLOSION1_SHORT); + if (i == 24) sound_send (EXPLOSION1_SHORT); + if (i == 28) sound_send (EXPLOSION1_MED); + task_sleep (TIME_66MS); + } while (i++ < 30); //APPROX 2 SEC + //pulsate words in middle + sound_send (EXPLOSION1_LONG); + i = 4; + dmd_alloc_pair_clean (); + dmd_draw_thin_border (dmd_low_buffer); + font_render_string_center (&font_fireball, DMD_MIDDLE_X, DMD_BIG_CY_Cent, "FRENZY"); + // low = text, high = blank + while (--i > 0){ + dmd_show2 (); + task_sleep (TIME_66MS); + + dmd_flip_low_high (); + dmd_show2 (); + task_sleep (TIME_66MS); + + dmd_show_high (); + task_sleep (TIME_66MS); + + dmd_show2 (); + task_sleep (TIME_66MS); + dmd_flip_low_high (); + }//end of loop - APPROX 1 SEC + deff_exit (); //TOTAL OF 3 SEC +} // standupFrenzyTotalScore_deff + + + +void standupfrenzy_show_circle_1_rotate_cw (U8 step, U8 x, U8 y) { + switch (step) { + case 0: bitmap_blit (circle1_1_low_bits, x, y); break; + case 1: bitmap_blit (circle1_2_low_bits, x, y); break; + case 2: bitmap_blit (circle1_3_low_bits, x, y); break; + case 3: bitmap_blit (circle1_4_low_bits, x, y); break; + case 4: bitmap_blit (circle1_5_low_bits, x, y); break; + case 5: bitmap_blit (circle1_6_low_bits, x, y); break; + case 6: bitmap_blit (circle1_7_low_bits, x, y); break; + case 7: bitmap_blit (circle1_8_low_bits, x, y); break; + }//end of switch +}//end of function + +void standupfrenzy_show_circle_1_rotate_ccw (U8 step, U8 x, U8 y) { + switch (step) { + case 0: bitmap_blit (circle1_8_low_bits, x, y); break; + case 1: bitmap_blit (circle1_7_low_bits, x, y); break; + case 2: bitmap_blit (circle1_6_low_bits, x, y); break; + case 3: bitmap_blit (circle1_5_low_bits, x, y); break; + case 4: bitmap_blit (circle1_4_low_bits, x, y); break; + case 5: bitmap_blit (circle1_3_low_bits, x, y); break; + case 6: bitmap_blit (circle1_2_low_bits, x, y); break; + case 7: bitmap_blit (circle1_1_low_bits, x, y); break; + }//end of switch +}//end of function + +void standupfrenzy_show_circle_2_rotate_cw (U8 step, U8 x, U8 y) { + switch (step) { + case 0: bitmap_blit (circle2_1_low_bits, x, y); break; + case 1: bitmap_blit (circle2_2_low_bits, x, y); break; + case 2: bitmap_blit (circle2_3_low_bits, x, y); break; + case 3: bitmap_blit (circle2_4_low_bits, x, y); break; + case 4: bitmap_blit (circle2_5_low_bits, x, y); break; + case 5: bitmap_blit (circle2_6_low_bits, x, y); break; + case 6: bitmap_blit (circle2_7_low_bits, x, y); break; + case 7: bitmap_blit (circle2_8_low_bits, x, y); break; + }//end of switch +}//end of function + +void standupfrenzy_show_circle_2_rotate_ccw (U8 step, U8 x, U8 y) { + switch (step) { + case 0: bitmap_blit (circle2_8_low_bits, x, y); break; + case 1: bitmap_blit (circle2_7_low_bits, x, y); break; + case 2: bitmap_blit (circle2_6_low_bits, x, y); break; + case 3: bitmap_blit (circle2_5_low_bits, x, y); break; + case 4: bitmap_blit (circle2_4_low_bits, x, y); break; + case 5: bitmap_blit (circle2_3_low_bits, x, y); break; + case 6: bitmap_blit (circle2_2_low_bits, x, y); break; + case 7: bitmap_blit (circle2_1_low_bits, x, y); break; + }//end of switch +}//end of function + +void standupfrenzy_show_rotate_ccw_exploded (U8 step, U8 x, U8 y) { + switch (step) { + case 0: bitmap_blit (explos1_1_low_bits, x, y); break; + case 1: bitmap_blit (explos1_2_low_bits, x, y); break; + case 2: bitmap_blit (explos1_3_low_bits, x, y); break; + case 3: bitmap_blit (explos1_4_low_bits, x, y); break; + case 4: bitmap_blit (explos1_5_low_bits, x, y); break; + case 5: bitmap_blit (explos1_6_low_bits, x, y); break; + case 6: bitmap_blit (explos1_7_low_bits, x, y); break; + case 7: break; + }//end of switch +}//end of function + +void standupfrenzy_show_rotate_cw_exploded (U8 step, U8 x, U8 y) { + switch (step) { + case 0: bitmap_blit (explos2_1_low_bits, x, y); break; + case 1: bitmap_blit (explos2_2_low_bits, x, y); break; + case 2: bitmap_blit (explos2_3_low_bits, x, y); break; + case 3: bitmap_blit (explos2_4_low_bits, x, y); break; + case 4: bitmap_blit (explos2_5_low_bits, x, y); break; + case 5: bitmap_blit (explos2_6_low_bits, x, y); break; + case 6: bitmap_blit (explos2_7_low_bits, x, y); break; + case 7: bitmap_blit (explos2_8_low_bits, x, y); break; + case 8: bitmap_blit (explos2_9_low_bits, x, y); break; + case 9: bitmap_blit (explos2_10_low_bits, x, y); break; + }//end of switch +}//end of function + + + +void standupfrenzy_effect_deff (void) { + U8 i = 0; + U8 toggle = 0; + for (;;) { + i++; + //for testing only + if (IN_TEST) { + if (i == 30) {exploded[0]++;} + if (i == 50) {exploded[1]++;} + if (i == 70) {exploded[2]++;} + if (i == 90) {exploded[3]++;} + if (i == 110) {exploded[4]++;} + } + dmd_alloc_low_clean (); + dmd_draw_thin_border (dmd_low_buffer); + + if (i % 50 == 0) if (++toggle > 3) toggle = 0;//change TOGGLE once per n seconds + + if (toggle == 1) sprintf ("%d SEC LEFT", standupFrenzyTimer); + else if (toggle == 2) sprintf ("%d HIT", standupFrenzyNumHits); + else if (toggle == 0) sprintf ("SHOOT STANDUP TARGETS"); + + font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_SMALL_CY_1, sprintf_buffer); + + if (exploded[0]) standupfrenzy_show_rotate_ccw_exploded( exploded[0]++, 2, 8); + else standupfrenzy_show_circle_2_rotate_ccw ( (i)%8, 2, 8); + + if (exploded[1]) standupfrenzy_show_rotate_cw_exploded( exploded[1]++, 27, 8); + else standupfrenzy_show_circle_1_rotate_cw ( (i+3)%8, 27, 8); + + if (exploded[2]) standupfrenzy_show_rotate_ccw_exploded( exploded[2]++, 52, 8); + else standupfrenzy_show_circle_1_rotate_ccw ( (i+1)%8, 52, 8); + + if (exploded[3]) standupfrenzy_show_rotate_cw_exploded( exploded[3]++, 77, 8); + else standupfrenzy_show_circle_2_rotate_cw ( (i+5)%8, 77, 8); + + if (exploded[4]) standupfrenzy_show_rotate_ccw_exploded( exploded[4]++, 102, 8); + else standupfrenzy_show_circle_1_rotate_ccw ( (i+1)%8,102, 8); + dmd_show_low (); + task_sleep (TIME_100MS); + }//END OF ENDLESS LOOP +}//end of standupFrenzy_mode_deff + + +void standupfrenzy_end_effect_deff (void) { + dmd_alloc_low_clean (); + font_render_string_center (&font_fireball, DMD_MIDDLE_X, DMD_BIG_CY_Top, "FRENZY"); + sprintf_score (standupFrenzyTotalScore); + font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_BIG_CY_Bot, sprintf_buffer); + dmd_show_low (); + task_sleep_sec (2); + deff_exit (); +} // standupFrenzyTotalScore_deff + + + + + + +/**************************************************************************** + * + * DMD display - non-frenzy + * + ****************************************************************************/ +void standup_effect_deff (void) { + U8 i = 0; + if (IN_TEST) { if (++standup_MessageCounter > 2) standup_MessageCounter = 0; standup_num_of_hits++;} + else standup_MessageCounter = random_scaled(3); + + for (i = 0; i < 20; i++) { + dmd_alloc_low_clean (); + standupfrenzy_show_circle_2_rotate_ccw ( (i)%8, 102, 8); + + switch (standup_MessageCounter) { + default: + case 0: + sprintf ("%d", standup_num_of_hits); + font_render_string_right (&font_fireball, 80, DMD_BIG_CY_Top - 7, sprintf_buffer); + font_render_string_right (&font_fireball, 95, DMD_BIG_CY_Bot - 7, "TARGETS"); + break; + case 1: + if (!flag_test(FLAG_IS_LRAMP_QUICKFREEZE_ACTIVATED)) { + sprintf ("HIT %d MORE", standup_goal - standup_num_of_hits); + font_render_string_right (&font_term6, 95, DMD_MED_CY_1 - 4, sprintf_buffer); + font_render_string_right (&font_var5, 95, DMD_SMALL_CY_3 - 3, "TO LIGHT"); + font_render_string_right (&font_lithograph, 95, DMD_MED_CY_3 - 9, "FREEZE"); + } + else { + font_render_string_right (&font_lithograph, 95, DMD_BIG_CY_Top - 7, "FREEZE"); + font_render_string_right (&font_lithograph, 99, DMD_BIG_CY_Bot - 7, "ACTIVATED"); + } + break; + case 2: + font_render_string_right (&font_term6, 95, DMD_MED_CY_1 - 4, "CLAW FREEZE"); + font_render_string_right (&font_var5, 95, DMD_SMALL_CY_3 - 6, "STARTS"); + font_render_string_right (&font_fireball, 95, DMD_MED_CY_3 - 9, "FRENZY"); + break; + }//end of switch + task_sleep (TIME_100MS); + dmd_show_low (); + }//end of for loop + deff_exit (); +}//end of standupFrenzy_mode_deff + + + diff --git a/machine/dm/standupfrenzy.h b/machine/dm/standupfrenzy.h new file mode 100644 index 000000000..da4af59fa --- /dev/null +++ b/machine/dm/standupfrenzy.h @@ -0,0 +1,935 @@ + +/**************************************************************************** + * circle 1 + ****************************************************************************/ + +#define circle1_1_low_width 24 +#define circle1_1_low_height 22 +static U8 circle1_1_low_bits[] = { circle1_1_low_width , circle1_1_low_height, + 0x00, 0x3F, 0x00, // ###### + 0xC0, 0xFF, 0x00, // ########## + 0xF0, 0xC7, 0x07, // ####### ##### + 0xF8, 0x00, 0x07, // ##### ### + 0xF8, 0x38, 0x06, // ##### ### ## + 0x7C, 0xFC, 0x1D, // ##### ####### ### + 0x3E, 0xC6, 0x19, // ##### ## ### ## + 0x3E, 0x87, 0x19, // ##### ### ## ## + 0x1F, 0x03, 0x3B, // ##### ## ## ### + 0x3F, 0x03, 0x3B, // ###### ## ## ### + 0x1F, 0x03, 0x3B, // ##### ## ## ### + 0x1F, 0xCF, 0x3B, // ##### #### #### ### + 0x1F, 0xFE, 0x39, // ##### ######## ### + 0x3E, 0xFE, 0x19, // ##### ######## ## + 0x1F, 0xFC, 0x38, // ##### ###### ### + 0x7E, 0x38, 0x1C, // ###### ### ### + 0x7C, 0x00, 0x0C, // ##### ## + 0xFC, 0x00, 0x0E, // ###### ### + 0xF8, 0xC3, 0x07, // ####### ##### + 0xF0, 0xFF, 0x03, // ############## + 0xE0, 0xFF, 0x03, // ############# + 0x00, 0x1F, 0x00, // ##### +}; + + +#define circle1_2_low_width 24 +#define circle1_2_low_height 23 +static U8 circle1_2_low_bits[] = { circle1_2_low_width , circle1_2_low_height, + 0x00, 0x7E, 0x00, // ###### + 0xC0, 0xFF, 0x03, // ############ + 0xF0, 0xFF, 0x07, // ############### + 0xF8, 0x9F, 0x0F, // ########## ##### + 0xF8, 0x01, 0x0C, // ###### ## + 0xFC, 0x40, 0x18, // ###### # ## + 0x7C, 0xF9, 0x19, // ##### # ###### ## + 0x3F, 0xBC, 0x33, // ###### #### ### ## + 0x3E, 0x06, 0x73, // ##### ## ## ### + 0x3E, 0x06, 0x3E, // ##### ## ##### + 0x1F, 0x0E, 0x36, // ##### ### ## ## + 0x3E, 0x0E, 0x22, // ##### ### # # + 0x1E, 0x0F, 0x77, // #### #### ### ### + 0x1E, 0x7E, 0x33, // #### ###### ## ## + 0x1E, 0xFE, 0x3B, // #### ######### ### + 0x3E, 0xFC, 0x3C, // ##### ###### #### + 0x3C, 0x20, 0x0E, // #### # ### + 0x78, 0x00, 0x0F, // #### #### + 0xF0, 0x43, 0x0B, // ###### # ## # + 0xE0, 0xD7, 0x03, // ###### # #### + 0x40, 0x7F, 0x01, // # ####### # + 0x00, 0x5E, 0x00, // #### # + 0x00, 0x04, 0x00, // # +}; + + +#define circle1_3_low_width 24 +#define circle1_3_low_height 22 +static U8 circle1_3_low_bits[] = { circle1_3_low_width , circle1_3_low_height, + 0x80, 0x3E, 0x00, // # ##### + 0xC0, 0xFF, 0x00, // ########## + 0xF0, 0xFF, 0x01, // ############# + 0xF8, 0xFF, 0x07, // ################ + 0xFC, 0xFF, 0x0F, // ################## + 0x7E, 0xD1, 0x0F, // ###### # # ###### + 0x7E, 0x00, 0x1F, // ###### ##### + 0x1E, 0x00, 0x1E, // #### #### + 0x0F, 0x7C, 0x38, // #### ##### ### + 0x0F, 0xFF, 0x38, // #### ######## ### + 0x87, 0xC7, 0x39, // ### #### ### ### + 0xC7, 0x07, 0x33, // ### ##### ## ## + 0xC7, 0x03, 0x33, // ### #### ## ## + 0xC6, 0x03, 0x33, // ## #### ## ## + 0x8E, 0x87, 0x19, // ### #### ## ## + 0x8E, 0xC7, 0x19, // ### #### ### ## + 0x0E, 0xFF, 0x0D, // ### ######### ## + 0x1E, 0x3C, 0x0E, // #### #### ### + 0x78, 0x00, 0x0F, // #### #### + 0xF0, 0xFF, 0x01, // ############# + 0xC0, 0xFF, 0x01, // ########### + 0x80, 0x3E, 0x00, // # ##### +}; + + +#define circle1_4_low_width 24 +#define circle1_4_low_height 23 +static U8 circle1_4_low_bits[] = { circle1_4_low_width , circle1_4_low_height, + 0x00, 0x90, 0x00, // # # + 0x80, 0xFF, 0x00, // ######### + 0xC0, 0xFF, 0x03, // ############ + 0xE0, 0xFF, 0x0F, // ############### + 0xF0, 0xFF, 0x1F, // ################# + 0xF8, 0xE8, 0x1F, // ##### # ######## + 0x3C, 0x00, 0x3F, // #### ###### + 0x18, 0x00, 0x3E, // ## ##### + 0x1C, 0x04, 0x3D, // ### # # #### + 0x1E, 0x7F, 0x78, // #### ####### #### + 0x8F, 0xFF, 0x78, // #### ######### #### + 0x86, 0x9F, 0x79, // ## ###### ## #### + 0x8E, 0x83, 0x79, // ### ### ## #### + 0xC4, 0x83, 0x71, // # #### ## ### + 0x9E, 0x03, 0x73, // #### ### ## ### + 0x88, 0x81, 0x39, // # ## ## ### + 0x3C, 0xC7, 0x39, // #### ### ### ### + 0x78, 0xFF, 0x38, // #### ######## ### + 0xE0, 0x34, 0x1C, // ### # ## ### + 0xF0, 0x21, 0x0F, // ##### # #### + 0x80, 0xF7, 0x03, // #### ###### + 0x80, 0xFF, 0x00, // ######### + 0x00, 0x44, 0x00, // # # +}; + + +#define circle1_5_low_width 24 +#define circle1_5_low_height 22 +static U8 circle1_5_low_bits[] = { circle1_5_low_width , circle1_5_low_height, + 0x00, 0x3E, 0x00, // ##### + 0xF0, 0xFF, 0x01, // ############# + 0xF0, 0xFF, 0x03, // ############## + 0xF8, 0xF0, 0x07, // ##### ####### + 0x1C, 0xC0, 0x0F, // ### ###### + 0x0C, 0x80, 0x0F, // ## ##### + 0x0E, 0x87, 0x1F, // ### ### ###### + 0xC7, 0x0F, 0x3E, // ### ###### ##### + 0xE6, 0x1F, 0x1F, // ## ######## ##### + 0xE7, 0x1F, 0x3E, // ### ######## ##### + 0xF7, 0x3C, 0x3E, // ### #### #### ##### + 0x37, 0x30, 0x3E, // ### ## ## ##### + 0x37, 0x30, 0x3F, // ### ## ## ###### + 0x37, 0x30, 0x3E, // ### ## ## ##### + 0x66, 0x38, 0x1F, // ## ## ### ##### + 0xE6, 0x18, 0x1F, // ## ### ## ##### + 0xEE, 0x8F, 0x0F, // ### ####### ##### + 0x18, 0xC7, 0x07, // ## ### ##### + 0x38, 0xC0, 0x07, // ### ##### + 0xF8, 0xF8, 0x03, // ##### ####### + 0xC0, 0xFF, 0x00, // ########## + 0x00, 0x3F, 0x00, // ###### +}; + + +#define circle1_6_low_width 24 +#define circle1_6_low_height 23 +static U8 circle1_6_low_bits[] = { circle1_6_low_width , circle1_6_low_height, + 0x00, 0x10, 0x00, // # + 0x00, 0x3D, 0x00, // # #### + 0x40, 0x7F, 0x01, // # ####### # + 0xE0, 0xF5, 0x03, // #### # ###### + 0x68, 0xE1, 0x07, // # ## # ###### + 0x78, 0x00, 0x0F, // #### #### + 0x38, 0x02, 0x1E, // ### # #### + 0x9E, 0x1F, 0x3E, // #### ###### ##### + 0xEE, 0x3F, 0x3C, // ### ######### #### + 0x66, 0x3F, 0x3C, // ## ## ###### #### + 0x77, 0x78, 0x3C, // ### ### #### #### + 0x22, 0x38, 0x3E, // # # ### ##### + 0x36, 0x38, 0x7C, // ## ## ### ##### + 0x3E, 0x30, 0x3E, // ##### ## ##### + 0x67, 0x30, 0x3E, // ### ## ## ##### + 0xE6, 0x1E, 0x7E, // ## ### #### ###### + 0xCC, 0x4F, 0x1F, // ## ###### # ##### + 0x0C, 0x81, 0x1F, // ## # ###### + 0x18, 0xC0, 0x0F, // ## ###### + 0xF8, 0xFC, 0x0F, // ##### ########## + 0xF0, 0xFF, 0x07, // ############### + 0xE0, 0xFF, 0x01, // ############ + 0x00, 0x3F, 0x00, // ###### +}; + + +#define circle1_7_low_width 24 +#define circle1_7_low_height 22 +static U8 circle1_7_low_bits[] = { circle1_7_low_width , circle1_7_low_height, + 0x00, 0x5F, 0x00, // ##### # + 0xE0, 0xFF, 0x00, // ########### + 0xE0, 0xFF, 0x03, // ############# + 0x3C, 0x80, 0x07, // #### #### + 0x1C, 0x0F, 0x1E, // ### #### #### + 0xEC, 0x3F, 0x1C, // ## ######### ### + 0xE6, 0x78, 0x1C, // ## ### #### ### + 0x66, 0x78, 0x1C, // ## ## #### ### + 0x33, 0xF0, 0x18, // ## ## #### ## + 0x33, 0xF0, 0x38, // ## ## #### ### + 0x33, 0xF8, 0x38, // ## ## ##### ### + 0xE7, 0x78, 0x38, // ### ### #### ### + 0xC7, 0x3F, 0x3C, // ### ######## #### + 0x87, 0x0F, 0x3C, // ### ##### #### + 0x1E, 0x00, 0x1E, // #### #### + 0x3E, 0x80, 0x1F, // ##### ###### + 0xFC, 0xA2, 0x1F, // ###### # # ###### + 0xFC, 0xFF, 0x0F, // ################## + 0xF8, 0xFF, 0x07, // ################ + 0xE0, 0xFF, 0x03, // ############# + 0xC0, 0xFF, 0x00, // ########## + 0x00, 0x5F, 0x00, // ##### # +}; + + +#define circle1_8_low_width 24 +#define circle1_8_low_height 23 +static U8 circle1_8_low_bits[] = { circle1_8_low_width , circle1_8_low_height, + 0x00, 0x11, 0x00, // # # + 0x80, 0xFF, 0x00, // ######### + 0xE0, 0xF7, 0x00, // ###### #### + 0x78, 0xC2, 0x07, // #### # ##### + 0x1C, 0x96, 0x03, // ### ## # ### + 0x8E, 0x7F, 0x0F, // ### ######## #### + 0xCE, 0x71, 0x1E, // ### ### ### #### + 0xCE, 0xC0, 0x08, // ### ## ## # + 0x67, 0xE0, 0x3C, // ### ## ### #### + 0xC7, 0xE0, 0x11, // ### ## #### # + 0xCF, 0xE0, 0x38, // #### ## ### ### + 0xCF, 0xFC, 0x30, // #### ## ###### ## + 0x8F, 0xFF, 0x78, // #### ######### #### + 0x0F, 0x7F, 0x3C, // #### ####### #### + 0x5E, 0x10, 0x1C, // #### # # ### + 0x3E, 0x00, 0x0C, // ##### ## + 0x7E, 0x00, 0x1E, // ###### #### + 0xFC, 0x8B, 0x0F, // ######## # ##### + 0xFC, 0xFF, 0x07, // ################# + 0xF8, 0xFF, 0x03, // ############### + 0xE0, 0xFF, 0x01, // ############ + 0x80, 0xFF, 0x00, // ######### + 0x80, 0x04, 0x00, // # # +}; + + +/**************************************************************************** + * circle 2 + ****************************************************************************/ + + +#define circle2_1_low_width 24 +#define circle2_1_low_height 23 +static U8 circle2_1_low_bits[] = { circle2_1_low_width , circle2_1_low_height, + 0x00, 0x3F, 0x00, // ###### + 0xC0, 0xFF, 0x01, // ########### + 0xF0, 0xC0, 0x07, // #### ##### + 0x30, 0x80, 0x0F, // ## ##### + 0x1C, 0x1E, 0x0C, // ### #### ## + 0x8C, 0xFF, 0x18, // ## ######### ## + 0xC2, 0xFF, 0x19, // # ########### ## + 0xE6, 0xE7, 0x33, // ## ###### ##### ## + 0xE3, 0x81, 0x63, // ## #### ### ## + 0xE3, 0x98, 0x63, // ## ### ## ### ## + 0xE3, 0xB8, 0x63, // ## ### ### ### ## + 0xE3, 0xB8, 0x63, // ## ### ### ### ## + 0xE3, 0x89, 0x63, // ## #### # ### ## + 0xE3, 0x80, 0x73, // ## ### ### ### + 0xE2, 0x83, 0x33, // # ##### ### ## + 0xC6, 0xFF, 0x39, // ## ########### ### + 0x8E, 0xFF, 0x3C, // ### ######### #### + 0x0C, 0x7F, 0x1C, // ## ####### ### + 0x3C, 0x80, 0x1F, // #### ###### + 0xF8, 0xE1, 0x07, // ###### ###### + 0xE0, 0xFF, 0x07, // ############## + 0x80, 0xFF, 0x00, // ######### + 0x00, 0x1F, 0x00, // ##### +}; + + + +#define circle2_2_low_width 24 +#define circle2_2_low_height 23 +static U8 circle2_2_low_bits[] = { circle2_2_low_width , circle2_2_low_height, + 0x80, 0x76, 0x00, // # ## ### + 0xA0, 0xFE, 0x03, // # # ######### + 0xF0, 0x40, 0x07, // #### # ### + 0x38, 0x00, 0x0E, // ### ### + 0x18, 0x5E, 0x1C, // ## #### # ### + 0x0C, 0xFF, 0x18, // ## ######## ## + 0x04, 0xFF, 0x31, // # ######### ## + 0xC6, 0xEB, 0x33, // ## #### # ##### ## + 0xE6, 0x83, 0x73, // ## ##### ### ### + 0xE7, 0xA1, 0x77, // ### #### # #### ### + 0xE3, 0x30, 0x67, // ## ### ## ### ## + 0xE3, 0x3C, 0x67, // ## ### #### ### ## + 0xE7, 0x90, 0x67, // ### ### # #### ## + 0xE6, 0xA1, 0x33, // ## #### # ### ## + 0xCE, 0xC3, 0x23, // ### #### #### # + 0xCC, 0xE7, 0x20, // ## ##### ### # + 0x1E, 0xFF, 0x30, // #### ######## ## + 0x1C, 0x7E, 0x38, // ### ###### ### + 0xFC, 0x02, 0x1C, // ###### # ### + 0xF8, 0xE7, 0x0F, // ######## ####### + 0xC0, 0xFF, 0x05, // ########### # + 0x80, 0xFE, 0x01, // # ######## + 0x00, 0x2C, 0x00, // ## # +}; + + + +#define circle2_3_low_width 24 +#define circle2_3_low_height 23 +static U8 circle2_3_low_bits[] = { circle2_3_low_width , circle2_3_low_height, + 0x00, 0x7E, 0x00, // ###### + 0xC0, 0xFF, 0x01, // ########### + 0xF0, 0x80, 0x06, // #### # ## + 0x78, 0x00, 0x06, // #### ## + 0x18, 0x00, 0x1C, // ## ### + 0x1C, 0xFF, 0x18, // ### ######## ## + 0x8C, 0xFF, 0x31, // ## ########## ## + 0xCE, 0xFF, 0x33, // ### ############ ## + 0xEF, 0xC5, 0x63, // #### #### # #### ## + 0xE7, 0x81, 0x67, // ### #### #### ## + 0xE7, 0x80, 0x67, // ### ### #### ## + 0xE7, 0x3C, 0x67, // ### ### #### ### ## + 0xE7, 0x38, 0x67, // ### ### ### ### ## + 0xEE, 0x98, 0x63, // ### ### ## ### ## + 0xEE, 0x80, 0x33, // ### ### ### ## + 0xDE, 0xFF, 0x3B, // #### ############ ### + 0x9C, 0xFF, 0x39, // ### ########## ### + 0x1C, 0xFF, 0x18, // ### ######## ## + 0x7C, 0x00, 0x1C, // ##### ### + 0xF0, 0x00, 0x0F, // #### #### + 0xF0, 0x83, 0x03, // ###### ### + 0xC0, 0xFF, 0x00, // ########## + 0x00, 0x7E, 0x00, // ###### +}; + + + + +#define circle2_4_low_width 24 +#define circle2_4_low_height 23 +static U8 circle2_4_low_bits[] = { circle2_4_low_width , circle2_4_low_height, + 0x00, 0x3C, 0x00, // #### + 0x40, 0xFF, 0x00, // # ######## + 0xF0, 0xE7, 0x03, // ####### ##### + 0xF8, 0x01, 0x0E, // ###### ### + 0x78, 0x00, 0x1C, // #### ### + 0x18, 0x7E, 0x38, // ## ###### ### + 0x9C, 0xFF, 0x10, // ### ######### # + 0x9E, 0xFF, 0x70, // #### ######### ### + 0xCC, 0xE3, 0x03, // ## #### ##### + 0xFE, 0xC1, 0x67, // ######## ##### ## + 0xEF, 0x08, 0x67, // #### ### # ### ## + 0x67, 0x88, 0x27, // ### ## # #### # + 0x66, 0x1C, 0x67, // ## ## ### ### ## + 0xEF, 0xBA, 0x63, // #### ### # ### ### ## + 0xEE, 0x81, 0x77, // ### #### #### ### + 0xCE, 0xE7, 0x23, // ### ##### ##### # + 0x0E, 0xFF, 0x31, // ### ######### ## + 0x08, 0xFF, 0x38, // # ######## ### + 0x1C, 0x3C, 0x1C, // ### #### ### + 0x38, 0x00, 0x0E, // ### ### + 0x70, 0xE2, 0x07, // ### # ###### + 0xE0, 0xFF, 0x01, // ############ + 0x00, 0x7C, 0x00, // ##### +}; + + + + +#define circle2_5_low_width 24 +#define circle2_5_low_height 23 +static U8 circle2_5_low_bits[] = { circle2_5_low_width , circle2_5_low_height, + 0x00, 0x7C, 0x00, // ##### + 0x80, 0xFF, 0x00, // ######### + 0xF0, 0xFF, 0x03, // ############## + 0xF0, 0xC3, 0x0F, // ###### ###### + 0xFC, 0x00, 0x1E, // ###### #### + 0x1C, 0x7F, 0x18, // ### ####### ## + 0x9E, 0xFF, 0x38, // #### ######### ### + 0xCE, 0xFF, 0x31, // ### ########### ## + 0xE6, 0xE0, 0x23, // ## ### ##### # + 0xE7, 0x80, 0x63, // ### ### ### ## + 0xE3, 0xC8, 0x63, // ## ### # #### ## + 0xE3, 0x8E, 0x63, // ## ### ### ### ## + 0xE3, 0x8E, 0x63, // ## ### ### ### ## + 0xE3, 0x8C, 0x63, // ## ### ## ### ## + 0xE3, 0xC0, 0x63, // ## ### #### ## + 0xE6, 0xF3, 0x33, // ## ##### ###### ## + 0xCC, 0xFF, 0x21, // ## ########### # + 0x8C, 0xFF, 0x18, // ## ######### ## + 0x18, 0x3C, 0x1C, // ## #### ### + 0xF8, 0x00, 0x06, // ##### ## + 0xF0, 0x81, 0x07, // ##### #### + 0xC0, 0xFF, 0x01, // ########### + 0x00, 0x7E, 0x00, // ###### +}; + + + + +#define circle2_6_low_width 24 +#define circle2_6_low_height 23 +static U8 circle2_6_low_bits[] = { circle2_6_low_width , circle2_6_low_height, + 0x00, 0x1A, 0x00, // # ## + 0xC0, 0xBF, 0x00, // ######## # + 0xD0, 0xFF, 0x01, // # ########### + 0xF8, 0xF3, 0x0F, // ####### ######## + 0x1C, 0xA0, 0x1F, // ### # ###### + 0x0E, 0x3F, 0x1C, // ### ###### ### + 0x86, 0x7F, 0x3C, // ## ######## #### + 0x82, 0xF3, 0x19, // # ### ##### ## + 0xE2, 0xE1, 0x39, // # #### #### ### + 0xE6, 0xC2, 0x33, // ## ### # #### ## + 0xF3, 0x84, 0x73, // ## #### # ### ### + 0x73, 0x9E, 0x63, // ## ### #### ### ## + 0x73, 0x86, 0x63, // ## ### ## ### ## + 0xF7, 0xC2, 0x73, // ### #### # #### ### + 0xE7, 0xE0, 0x33, // ### ### ##### ## + 0xE6, 0xEB, 0x31, // ## ##### # #### ## + 0xC6, 0x7F, 0x10, // ## ######### # + 0x8C, 0x7F, 0x18, // ## ######## ## + 0x1C, 0x3D, 0x0C, // ### # #### ## + 0x38, 0x00, 0x0E, // ### ### + 0x70, 0x81, 0x07, // ### # #### + 0xE0, 0xBF, 0x02, // ######### # # + 0x00, 0xB7, 0x00, // ### ## # +}; + + + + +#define circle2_7_low_width 24 +#define circle2_7_low_height 23 +static U8 circle2_7_low_bits[] = { circle2_7_low_width , circle2_7_low_height, + 0x00, 0x3F, 0x00, // ###### + 0x80, 0xFF, 0x01, // ########## + 0xE0, 0xE0, 0x07, // ### ###### + 0x78, 0x80, 0x07, // #### #### + 0x1C, 0x00, 0x1F, // ### ##### + 0x8C, 0x7F, 0x1C, // ## ######## ### + 0xCE, 0xFF, 0x1C, // ### ########## ### + 0xEE, 0xFF, 0x3D, // ### ############ #### + 0xE6, 0x80, 0x3B, // ## ### ### ### + 0xE3, 0x8C, 0x3B, // ## ### ## ### ### + 0x73, 0x8E, 0x73, // ## ### ### ### ### + 0x73, 0x9E, 0x73, // ## ### #### ### ### + 0xF3, 0x80, 0x73, // ## #### ### ### + 0xF3, 0xC0, 0x73, // ## #### #### ### + 0xE3, 0xD1, 0x7B, // ## #### # #### #### + 0xE6, 0xFF, 0x39, // ## ############ ### + 0xC6, 0xFF, 0x18, // ## ########## ## + 0x8C, 0x7F, 0x1C, // ## ######## ### + 0x1C, 0x00, 0x0C, // ### ## + 0x30, 0x00, 0x0F, // ## #### + 0xB0, 0x80, 0x07, // ## # #### + 0xC0, 0xFF, 0x01, // ########### + 0x00, 0x3F, 0x00, // ###### +}; + + + + +#define circle2_8_low_width 24 +#define circle2_8_low_height 23 +static U8 circle2_8_low_bits[] = { circle2_8_low_width , circle2_8_low_height, + 0x00, 0x1F, 0x00, // ##### + 0xC0, 0xFF, 0x03, // ############ + 0xF0, 0x23, 0x07, // ###### # ### + 0x38, 0x00, 0x0E, // ### ### + 0x1C, 0x1E, 0x1C, // ### #### ### + 0x8E, 0x7F, 0x08, // ### ######## # + 0xC6, 0x7F, 0x38, // ## ######### ### + 0xE2, 0xF3, 0x39, // # ##### ##### ### + 0xF7, 0xC0, 0x3B, // ### #### #### ### + 0xE3, 0xAE, 0x7B, // ## ### ### # ### #### + 0x73, 0x1C, 0x33, // ## ### ### ## ## + 0xF2, 0x08, 0x73, // # #### # ## ### + 0x73, 0x88, 0x7B, // ## ### # ### #### + 0xF3, 0xC1, 0x3F, // ## ##### ######## + 0xE0, 0xE3, 0x19, // ##### #### ## + 0x87, 0xFF, 0x3C, // ### ######### #### + 0x84, 0xFF, 0x1C, // # ######### ### + 0x0E, 0x3F, 0x0C, // ### ###### ## + 0x1C, 0x00, 0x0F, // ### #### + 0x38, 0xC0, 0x0F, // ### ###### + 0xE0, 0xF3, 0x07, // ##### ####### + 0x80, 0x7F, 0x01, // ######## # + 0x00, 0x1E, 0x00, // #### +}; + + +/**************************************************************************** + * explosion 1 + ****************************************************************************/ +#define explos1_1_low_width 24 +#define explos1_1_low_height 15 +static U8 explos1_1_low_bits[] = { explos1_1_low_width , explos1_1_low_height, + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x08, 0x00, // # + 0x00, 0x36, 0x00, // ## ## + 0x00, 0x7E, 0x00, // ###### + 0x00, 0x7E, 0x00, // ###### + 0x00, 0x7C, 0x00, // ##### + 0x00, 0x5C, 0x00, // ### # + 0x00, 0x20, 0x00, // # +}; + + + +#define explos1_2_low_width 24 +#define explos1_2_low_height 17 +static U8 explos1_2_low_bits[] = { explos1_2_low_width , explos1_2_low_height, + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0xA0, 0x01, // # ## + 0x00, 0xFE, 0x01, // ######## + 0x00, 0xFE, 0x03, // ######### + 0x00, 0xFF, 0x03, // ########## + 0x80, 0xFF, 0x07, // ############ + 0x00, 0xFE, 0x07, // ########## + 0x00, 0xFF, 0x03, // ########## + 0x00, 0xFF, 0x03, // ########## + 0x00, 0xFE, 0x03, // ######### + 0x00, 0xFA, 0x05, // # ###### # + 0x00, 0xF4, 0x01, // # ##### +}; + + + +#define explos1_3_low_width 24 +#define explos1_3_low_height 18 +static U8 explos1_3_low_bits[] = { explos1_3_low_width , explos1_3_low_height, + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x68, 0x00, // # ## + 0x80, 0xFF, 0x00, // ######### + 0x80, 0xFF, 0x00, // ######### + 0xE0, 0xFF, 0x00, // ########### + 0xC0, 0xFF, 0x01, // ########### + 0xE0, 0xFF, 0x01, // ############ + 0xC0, 0xFF, 0x01, // ########### + 0xE0, 0xFF, 0x03, // ############# + 0xE0, 0xFE, 0x01, // ### ######## + 0xC0, 0xBF, 0x00, // ######## # + 0xC0, 0xEF, 0x01, // ###### #### + 0x80, 0xFE, 0x00, // # ####### + 0x00, 0x64, 0x00, // # ## +}; + + + +#define explos1_4_low_width 24 +#define explos1_4_low_height 18 +static U8 explos1_4_low_bits[] = { explos1_4_low_width , explos1_4_low_height, + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x10, 0x00, // # + 0x00, 0x70, 0x01, // ### # + 0x80, 0xF7, 0x03, // #### ###### + 0xC0, 0xFB, 0x05, // #### ###### # + 0x80, 0xFE, 0x03, // # ######### + 0xA0, 0xFF, 0x07, // # ############ + 0xC0, 0xFE, 0x03, // ## ######### + 0x60, 0xBF, 0x06, // ## ###### # ## + 0xA0, 0xFF, 0x05, // # ########## # + 0xD0, 0x7E, 0x07, // # ## ###### ### + 0xE0, 0xF6, 0x00, // ### ## #### + 0xA0, 0xFD, 0x03, // # ## ######## + 0xC0, 0xAD, 0x00, // ### ## # # + 0x00, 0x0A, 0x00, // # # +}; + + + + +#define explos1_5_low_width 24 +#define explos1_5_low_height 18 +static U8 explos1_5_low_bits[] = { explos1_5_low_width , explos1_5_low_height, + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x90, 0x00, // # # + 0x00, 0x24, 0x01, // # # # + 0x00, 0x59, 0x02, // # ## # # + 0x80, 0xB4, 0x05, // # # ## ## # + 0x00, 0x7D, 0x01, // # ##### # + 0xA0, 0x6A, 0x0B, // # # # # ## ## # + 0xC0, 0xDB, 0x02, // #### ## ## # + 0x00, 0x76, 0x01, // ## ### # + 0x10, 0x54, 0x03, // # # # # ## + 0xA0, 0x54, 0x05, // # # # # # # # + 0x00, 0xA9, 0x02, // # # # # # + 0x40, 0x12, 0x00, // # # # + 0x40, 0x04, 0x00, // # # + +}; + + + + +#define explos1_6_low_width 24 +#define explos1_6_low_height 17 +static U8 explos1_6_low_bits[] = { explos1_6_low_width , explos1_6_low_height, + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x54, 0x00, // # # # + 0x00, 0x08, 0x00, // # + 0x40, 0x50, 0x00, // # # # + 0x40, 0x92, 0x00, // # # # # + 0x80, 0x24, 0x02, // # # # # + 0x00, 0x91, 0x00, // # # # + 0x00, 0x22, 0x00, // # # + 0x00, 0x80, 0x00, // # + 0x00, 0x24, 0x00, // # # + 0x00, 0x00, 0x01, // # +}; + + + + +#define explos1_7_low_width 24 +#define explos1_7_low_height 12 +static U8 explos1_7_low_bits[] = { explos1_7_low_width , explos1_7_low_height, + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x05, 0x00, // # # + 0x00, 0x08, 0x00, // # + 0x00, 0x02, 0x00, // # +}; + + + +/**************************************************************************** + * explosion 2 + ****************************************************************************/ +#define explos2_1_low_width 24 +#define explos2_1_low_height 21 +static U8 explos2_1_low_bits[] = { explos2_1_low_width , explos2_1_low_height, + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x17, 0x00, // ### # + 0x00, 0x1F, 0x00, // ##### + 0xC0, 0xAF, 0x00, // ###### # # + 0xC0, 0xFF, 0x00, // ########## + 0xD0, 0xF3, 0x00, // # #### #### + 0xE0, 0x7D, 0x01, // #### ##### # + 0xE0, 0xB3, 0x00, // ##### ## # + 0xE0, 0x27, 0x03, // ###### # ## + 0xE0, 0x7B, 0x00, // ##### #### + 0xD0, 0xB5, 0x02, // # ### # ## # # + 0x40, 0x28, 0x01, // # # # # + 0x00, 0x4A, 0x02, // # # # # + 0x00, 0x10, 0x00, // # + 0x00, 0x02, 0x00, // # + 0x40, 0x10, 0x00, // # # + 0x00, 0x00, 0x00, // + 0x00, 0x02, 0x00, // # +}; + + + +#define explos2_2_low_width 24 +#define explos2_2_low_height 21 +static U8 explos2_2_low_bits[] = { explos2_2_low_width , explos2_2_low_height, + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0xF5, 0x00, // # # #### + 0x80, 0xFB, 0x05, // ### ###### # + 0xC0, 0xF6, 0x0F, // ## ## ######## + 0xE0, 0xEB, 0x1D, // ##### # #### ### + 0xA0, 0xC6, 0x1F, // # # ## ####### + 0xF0, 0xFD, 0x3F, // ##### ############ + 0xEC, 0xC7, 0x3F, // ## ###### ######## + 0xF8, 0xEF, 0x1F, // ######### ######## + 0xF8, 0xD7, 0x0F, // ######## # ###### + 0xFA, 0xFF, 0x0B, // # ############### # + 0xFC, 0xBF, 0x0D, // ############ ## ## + 0xE8, 0xBF, 0x07, // # ######### #### + 0xFC, 0xFF, 0x0F, // ################## + 0x7C, 0xFF, 0x07, // ##### ########### + 0xF0, 0xFF, 0x0F, // ################ + 0xC0, 0xF9, 0x0F, // ### ######### + 0x00, 0xD0, 0x07, // # ##### + 0x00, 0x20, 0x00, // # +}; + + + +#define explos2_3_low_width 24 +#define explos2_3_low_height 23 +static U8 explos2_3_low_bits[] = { explos2_3_low_width , explos2_3_low_height, + 0x00, 0x78, 0x07, // #### ### + 0x00, 0xF8, 0x0F, // ######### + 0x00, 0xF8, 0x1F, // ########## + 0x40, 0xFA, 0x3F, // # # ########### + 0x80, 0xFC, 0x3F, // # ############ + 0x74, 0xF1, 0x7F, // # ### # ########### + 0xF5, 0xFE, 0x7F, // # # #### ############## + 0xFD, 0xF2, 0x7F, // # ###### # ########### + 0x7E, 0xED, 0x3F, // ###### # ## ######### + 0xFF, 0xF5, 0x7F, // ######### # ########### + 0xEC, 0xDF, 0x3F, // ## ######## ######## + 0xFF, 0xFF, 0x1F, // ##################### + 0xFF, 0xDF, 0x3F, // ############# ######## + 0xFF, 0xEF, 0x0F, // ############ ####### + 0x7F, 0xFB, 0x1F, // ####### ## ########## + 0xFF, 0xF7, 0x07, // ########### ####### + 0xFE, 0xFE, 0x0F, // ####### ########### + 0xF5, 0xFF, 0x37, // # # ############### ## + 0xED, 0xFF, 0x0F, // # ## ############### + 0xF8, 0xFF, 0x1F, // ################## + 0x22, 0xFF, 0x03, // # # ########## + 0xC0, 0xFE, 0x15, // ## ######## # # + 0x80, 0x5C, 0x01, // # ### # # +}; + + + +#define explos2_4_low_width 24 +#define explos2_4_low_height 23 +static U8 explos2_4_low_bits[] = { explos2_4_low_width , explos2_4_low_height, + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0xBC, 0x16, // #### # ## # + 0x00, 0x7F, 0x15, // ####### # # # + 0x80, 0xFE, 0x15, // # ######## # # + 0xD8, 0xFF, 0x6F, // ## ############## ## + 0xB0, 0xFF, 0x3B, // ## ########### ### + 0xF0, 0x6F, 0x7F, // ######## ## ####### + 0xFD, 0x5F, 0x7D, // # ########### # # ##### + 0xFE, 0xAF, 0x3E, // ########### # # ##### + 0xFC, 0x5B, 0x3D, // ######## ## # # #### + 0xFB, 0xD3, 0x7B, // ## ####### # #### #### + 0xFF, 0x97, 0x7E, // ########### # # ###### + 0xFE, 0x7F, 0x2B, // ############## ## # # + 0xFE, 0xEF, 0x5F, // ########### ######## # + 0xFE, 0xFD, 0x1E, // ######## ###### #### + 0xFD, 0xEB, 0x1F, // # ######## # ######## + 0xFE, 0xFF, 0x17, // ################## # + 0xF8, 0xF7, 0x1D, // ######## ##### ### + 0xD0, 0xED, 0x2F, // # ### ## ####### # + 0x20, 0xFD, 0x0B, // # # ######## # + 0x80, 0xEA, 0x0F, // # # # ####### + 0x00, 0xB4, 0x12, // # ## # # # +}; + + + + +#define explos2_5_low_width 24 +#define explos2_5_low_height 23 +static U8 explos2_5_low_bits[] = { explos2_5_low_width , explos2_5_low_height, + 0x00, 0x00, 0x00, // + 0x00, 0xBA, 0x0A, // # ### # # # + 0x00, 0x25, 0x09, // # # # # # + 0x80, 0x7A, 0x13, // # # #### ## # + 0x20, 0xDF, 0x2C, // # ##### ## ## # + 0xE0, 0xB6, 0x2B, // ### ## ## ### # # + 0xAA, 0x3F, 0x7A, // # # # ####### # #### + 0x68, 0xC7, 0x2D, // # ## ### ### ## # + 0xFA, 0x3D, 0x5E, // # ###### #### #### # + 0xF2, 0xC3, 0x7C, // # ###### ## ##### + 0xDE, 0xAF, 0x58, // #### ###### # # ## # + 0xF4, 0x54, 0x13, // # #### # # # ## # + 0xFD, 0xDB, 0x6A, // # ######## ## ## # # ## + 0xFC, 0xAB, 0x17, // ######## # # #### # + 0xF5, 0x7E, 0x2A, // # # #### ###### # # # + 0xFE, 0xD1, 0x0D, // ######## # ### ## + 0xF0, 0x6E, 0x1F, // #### ### ## ##### + 0xA4, 0xD1, 0x26, // # # ## # ## ## # + 0x28, 0xB5, 0x0F, // # # # # ## ##### + 0x40, 0xD5, 0x15, // # # # # ### # # + 0x00, 0x6A, 0x0B, // # # ## ## # + 0x00, 0x98, 0x02, // ## # # + 0x00, 0x50, 0x04, // # # # +}; + + + + +#define explos2_6_low_width 24 +#define explos2_6_low_height 23 +static U8 explos2_6_low_bits[] = { explos2_6_low_width , explos2_6_low_height, + 0x00, 0x00, 0x00, // + 0x00, 0x40, 0x00, // # + 0x00, 0x34, 0x0A, // # ## # # + 0x00, 0xC9, 0x10, // # # ## # + 0x40, 0x5B, 0x23, // # ## ## # ## # + 0x00, 0xAE, 0x0C, // ### # # ## + 0xE8, 0x5A, 0x6B, // # ### # ## # ## # ## + 0xC8, 0x16, 0x52, // # ## ## # # # # + 0xD0, 0x2D, 0x36, // # ### ## # ## ## + 0x6C, 0x93, 0x28, // ## ## ## # # # # + 0xF0, 0xAD, 0x52, // ##### ## # # # # # + 0xAA, 0xAB, 0x50, // # # # ### # # # # # + 0x7A, 0xAB, 0x03, // # #### ## # # ### + 0xFC, 0x52, 0x29, // ###### # # # # # # + 0xEA, 0xAC, 0x12, // # # ### ## # # # # + 0xD8, 0x51, 0x15, // ## ### # # # # # + 0x78, 0x65, 0x25, // #### # # ## # # # + 0x40, 0x49, 0x14, // # # # # # # + 0xB0, 0x90, 0x0B, // ## # # ### # + 0x00, 0xA5, 0x06, // # # # # ## + 0x00, 0xA8, 0x0C, // # # # ## + 0x00, 0x12, 0x11, // # # # # + 0x00, 0xA0, 0x02, // # # # +}; + + + + +#define explos2_7_low_width 24 +#define explos2_7_low_height 22 +static U8 explos2_7_low_bits[] = { explos2_7_low_width , explos2_7_low_height, + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x20, 0x00, // # + 0x00, 0x4A, 0x02, // # # # # + 0x00, 0x5A, 0x04, // # ## # # + 0x40, 0x82, 0x11, // # # ## # + 0x90, 0x5A, 0x2A, // # # # ## # # # # + 0x80, 0x14, 0x20, // # # # # + 0x90, 0x44, 0x45, // # # # # # # # + 0x20, 0x0B, 0x10, // # ## # # + 0xD0, 0x24, 0x22, // # ## # # # # + 0xAA, 0x4A, 0x04, // # # # # # # # # + 0xD0, 0x9A, 0x20, // # ## # ## # # + 0xB4, 0x20, 0x09, // # ## # # # # + 0xA8, 0x44, 0x02, // # # # # # # + 0x60, 0x89, 0x08, // ## # # # # + 0x4A, 0x29, 0x11, // # # # # # # # # + 0x50, 0x42, 0x02, // # # # # # + 0x80, 0x20, 0x09, // # # # # + 0x10, 0x40, 0x02, // # # # + 0x80, 0x44, 0x0A, // # # # # # + 0x00, 0x90, 0x00, // # # +}; + + + +#define explos2_8_low_width 24 +#define explos2_8_low_height 22 +static U8 explos2_8_low_bits[] = { explos2_8_low_width , explos2_8_low_height, + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x90, 0x08, // # # # + 0x00, 0x22, 0x01, // # # # + 0x00, 0x00, 0x08, // # + 0x00, 0x24, 0x41, // # # # # + 0x40, 0x08, 0x04, // # # # + 0x00, 0x28, 0x08, // # # # + 0x40, 0x01, 0x00, // # # + 0x00, 0x54, 0x01, // # # # # + 0xA0, 0x00, 0x04, // # # # + 0x00, 0x42, 0x00, // # # + 0xA0, 0x04, 0x04, // # # # # + 0x00, 0x80, 0x20, // # # + 0xA8, 0x12, 0x02, // # # # # # # + 0x00, 0x00, 0x00, // + 0x20, 0x14, 0x05, // # # # # # + 0x00, 0x41, 0x00, // # # + 0x00, 0x00, 0x00, // + 0x00, 0x80, 0x00, // # + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x04, // # +}; + + + +#define explos2_9_low_width 24 +#define explos2_9_low_height 17 +static U8 explos2_9_low_bits[] = { explos2_9_low_width , explos2_9_low_height, + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x40, 0x00, // # + 0x00, 0x80, 0x00, // # + 0x00, 0x00, 0x01, // # + 0x00, 0x12, 0x04, // # # # + 0x00, 0x00, 0x00, // + 0x00, 0x04, 0x00, // # + 0x00, 0x48, 0x00, // # # + 0x40, 0x00, 0x04, // # # + 0x80, 0x10, 0x00, // # # + 0x00, 0x00, 0x00, // + 0x80, 0x10, 0x00, // # # + 0x04, 0x80, 0x00, // # # + 0x20, 0x00, 0x00, // # + 0x40, 0x02, 0x00, // # # + 0x00, 0x90, 0x00, // # # +}; + + + +#define explos2_10_low_width 24 +#define explos2_10_low_height 14 +static U8 explos2_10_low_bits[] = { explos2_10_low_width , explos2_10_low_height, + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x40, 0x00, 0x00, // # + 0x80, 0x10, 0x00, // # # + 0x00, 0x00, 0x00, // + 0x00, 0x10, 0x00, // # + 0x00, 0x80, 0x00, // # +}; diff --git a/machine/dm/startup_shutdown.c b/machine/dm/startup_shutdown.c new file mode 100644 index 000000000..0a6218f01 --- /dev/null +++ b/machine/dm/startup_shutdown.c @@ -0,0 +1,148 @@ +/* + * demolition man + * startup_shutdown.c + * + * written by James Cardona + * + */ +/* CALLSET_SECTION (startup_shutdown, __machine__) */ + +#include +#include "dm/global_constants.h" + + +//local variables +__boolean in_ending; + + +//external variables + +//prototypes + + + +/**************************************************************************** + * body + ***************************************************************************/ +void startup_effect_deff (void){ + U16 fno; + dmd_alloc_pair_clean (); + sound_start (ST_SPEECH, SPCH_DEMOLITION_MAN, SL_4S, PRI_GAME_QUICK5); + + for (fno = IMG_JAIL_A_START; fno <= IMG_JAIL_A_END; fno += 2) { + dmd_alloc_pair (); + frame_draw(fno); + dmd_show2 (); + task_sleep (TIME_100MS); + }//end of loop + deff_exit (); +}//end of function + + + + +CALLSET_ENTRY (startup_shutdown, start_player) { + in_ending = FALSE; + deff_start (DEFF_STARTUP_EFFECT); +}//end of function + + + +CALLSET_ENTRY (startup_shutdown, sw_launch_button) { + if (in_game && !valid_playfield ) sound_start (ST_ANY, EXPLOSION, SL_4S, PRI_GAME_QUICK5); +}//end of function + + + +//default music handler --see sound_effect.c +CALLSET_ENTRY (startup_shutdown, music_refresh) { + + //note that there is a music disable call in /kernel/game.c:255 that is commented out + if (in_tilt) music_request (MUS_HIGH_SCORE, PRI_GAME_OVER); + else if (in_bonus) music_request (MUS_END_GAME, PRI_GAME_OVER); + else if (in_ending) music_request (MUS_END_GAME, PRI_GAME_OVER); + else if (!in_live_game) music_request (0, PRI_GAME_OVER); + + //if this far then we are in a live game, but not in bonus + else if (valid_playfield) music_request (MUS_BG, PRI_SCORES); + else music_request (MUS_PLUNGER, PRI_EGG4); +}//end of function + + + +//This is made into a task so that it will run concurrently +//with the enter initials screen +void dm_end_game_task (void) { + task_sleep_sec (20); + callset_invoke(fade_out); + task_sleep_sec(25); + in_ending = FALSE; + task_exit(); +}//end of function + + + + +// LET END GAME MUSIC PLAY WHILE INITIALS ARE BEING ENTERED +CALLSET_ENTRY (startup_shutdown, end_game) { + in_ending = TRUE; + task_create_gid1 (GID_END_GAME_DM, dm_end_game_task); +}//end of function + + + + + +//this is invoked once initials are entered +//or after task time out (above) - which ever sooner +CALLSET_ENTRY (startup_shutdown, fade_out) { +// U8 i; +// U8 volume_restore_point; +// volume_restore_point = get_volume(); //record current volume level :: at kernal/sound.c + + // N-second fadeout + //FIXME: this actually lowers volume permanently + //so if game is turned off during this time, then volume will be permanently lowered +// for (i = 0; i < volume_restore_point - 1; i++) { //go down to volume level 2 +// lower_volume (); //lower volume by 1 tick :: at sound.c +// task_sleep (TIME_2S); +// }//end of loop + +// in_ending = FALSE; //turn off all music +// task_sleep_sec (2); //wait for all tasks to catch up +// volume_set (volume_restore_point); //restore volume level for next game +}//end of function + + + +//U8 once_through = 0; +//this is to ensure all flashers/sols/flippers are off after a crash or bad boot +//ALLSET_ENTRY (startup_shutdown, amode_start) { +// if (once_through == 0) { +// kill_all_sols(); +// sol_init(); +// flash_all_flashers(); +// } +// once_through++; +//}//end of function + + + + + +//ensure no balls left on shooter lane +CALLSET_ENTRY (startup_shutdown, amode_start) { + if (!in_test && switch_poll_logical (MACHINE_SHOOTER_SWITCH) ) launch_ball(); + +}//end of function + + + + + +CALLSET_ENTRY (startup_shutdown, tilt) { + if (!in_game) sound_start (ST_EFFECT, TILT, SL_1S, PRI_GAME_QUICK5); +}//end of function + + + diff --git a/machine/dm/superjets.c b/machine/dm/superjets.c new file mode 100644 index 000000000..2b5f8d709 --- /dev/null +++ b/machine/dm/superjets.c @@ -0,0 +1,289 @@ +/* + * demolition man + * superjets.c + * written by James Cardona + * + * Location Description: + * Jet Bumpers: There are two regular jet bumpers and a top slingshot + * which scores the same as a jet bumper. They advance the + * Retina Scan value. The left jet bumper can also be hit from + * the center ramp -- it acts as the right wall of the center ramp. + * + * Scoring Description: (original game) + * The Jet Bumpers increase the Retina Value.(eyeball) + * It starts at 5M and goes up 100K per jet. + * There are two Jet Bumpers and one slingshot ... the slingshot counts as a jet bumper. + * Jet Bumpers award 250k a Pop. + * superjets mode award 1 million each + * + * Scoring Description: (my rules) + * same as above except + * superjets mode award 2 million each + * successive modes award more + * + * estimate of average superjets mode score: 20 million to 80 million + * + */ + + + +#include +#include "dm/global_constants.h" +#include "clawmagnet.h" +#include "superjets.h" + +//constants +const U8 SUPERJETS_EASY_GOAL = 20; +const U8 SUPERJETS_MED_GOAL = 30; +const U8 SUPERJETS_HARD_GOAL = 40; +const U8 SUPERJETS_GOAL_STEP = 10; +const U8 SUPERJETS_GOAL_MAX = 100; + +//local variables +U8 superjets_mode_shots_made; +__local__ U8 superjets_modes_achieved; +__local__ U8 superjets_modes_completed; +U8 superjets_mode_timer; +score_t superjets_mode_score; +score_t superjets_mode_next_score; +score_t superjets_mode_score_total_score; +U8 superjets_goal; +U8 sj_counter; //counter used for display effects + + +//external variables + +//internally called function prototypes --external found at protos.h +void superjets_reset (void); +void superjets_player_reset (void); +void superjets_effect_deff(void); +void superjets_mode_init (void); +void superjets_mode_expire (void); +void superjets_mode_exit (void); +void superjets_goal_award(void); + +/**************************************************************************** + * mode definition structure + ***************************************************************************/ +struct timed_mode_ops superjets_mode = { + DEFAULT_MODE, + .init = superjets_mode_init, + .exit = superjets_mode_exit, + .gid = GID_SUPERJETS_MODE_RUNNING, + .music = MUS_MD_SUPERJETS, +// .deff_starting = DEFF_SUPERJETS_START_EFFECT, + .deff_running = DEFF_SUPERJETS_EFFECT, +// .deff_ending = DEFF_SUPERJETS_END_EFFECT, + .prio = PRI_GAME_MODE3, + .init_timer = 58, + .timer = &superjets_mode_timer, + .grace_timer = 2, //default is 2 +// .pause = system_timer_pause, +}; + + + +/**************************************************************************** + * initialize and exit + ***************************************************************************/ +void superjets_reset (void) { + flag_off (FLAG_IS_SUPERJETS_RUNNING); +}//end of function + + +void superjets_player_reset (void) { + superjets_reset(); + superjets_mode_shots_made = 0; //these need to be zeroed in before we enter the mode so bonus doesn't fake trigger + superjets_modes_achieved = 0; + superjets_modes_completed = 0; + score_zero(superjets_mode_score_total_score); + superjets_goal = SUPERJETS_EASY_GOAL; +}//end of function + + + +void superjets_mode_init (void) { + //the claw mode can expire on its own and since it is a lower priority it will not display + // callset_invoke (end_claw_mode); // this seemed to cause occasional crashes + clawmagnet_off (); + flag_off(FLAG_IS_BALL_ON_CLAW); + flipper_enable (); + superjets_mode_shots_made = 0; + flag_on (FLAG_IS_SUPERJETS_RUNNING); + ++superjets_modes_achieved; + sound_start (ST_SPEECH, SPCH_SUPERJETS_ACTIVATED, SL_4S, PRI_GAME_QUICK5); + //flash lamp for a time + lamp_tristate_flash(LM_CLAW_SUPER_JETS); + task_sleep(TIME_500MS); + lamp_tristate_on(LM_CLAW_SUPER_JETS); + score_zero(superjets_mode_score); + score_zero(superjets_mode_next_score); + switch (superjets_modes_achieved ){ + case 1: + score_add(superjets_mode_next_score, score_table[SUPERJETS_HIT_SCORE1]); + score_add(superjets_mode_score, score_table[SUPERJETS_START_SCORE1]); + score(SUPERJETS_START_SCORE1); + break; + case 2: + score_add(superjets_mode_next_score, score_table[SUPERJETS_HIT_SCORE2]); + score_add(superjets_mode_score, score_table[SUPERJETS_START_SCORE2]); + score(SUPERJETS_START_SCORE2); + break; + default: + case 3: + score_add(superjets_mode_next_score, score_table[SUPERJETS_HIT_SCORE3]); + score_add(superjets_mode_score, score_table[SUPERJETS_START_SCORE3]); + score(SUPERJETS_START_SCORE3); + break; + }//end of switch + serve_ball_auto(); //add one ball to the playfield - NOT a multiball since doesn't change global ball count +}//end of function + + + +void superjets_mode_expire (void) { + flag_off (FLAG_IS_SUPERJETS_RUNNING); +}//end of function + + +void superjets_mode_exit (void) { superjets_mode_expire();} + + +/**************************************************************************** + * external event listeners + ****************************************************************************/ +CALLSET_ENTRY (superjets, music_refresh) { timed_mode_music_refresh (&superjets_mode); } +CALLSET_ENTRY (superjets, end_ball) { if (timed_mode_running_p(&superjets_mode) ) timed_mode_end (&superjets_mode); } +CALLSET_ENTRY (superjets, display_update) { timed_mode_display_update (&superjets_mode); } + +CALLSET_ENTRY (superjets, start_player) { superjets_player_reset(); } +CALLSET_ENTRY (superjets, start_ball) { superjets_reset(); } + + +/**************************************************************************** + * body + * + ***************************************************************************/ +CALLSET_ENTRY (superjets, sw_claw_super_jets) { + demotime_increment(); + timed_mode_begin (&superjets_mode);//start mode +}//end of function + + + +CALLSET_ENTRY (superjets, sw_jet) { + if (timed_mode_running_p(&superjets_mode) ) { + ++superjets_mode_shots_made; + //score higher if mode done more than once + switch (superjets_modes_achieved) { + case 0: break; //never entered mode? + case 1: + score (SUPERJETS_HIT_SCORE1); + score_add (superjets_mode_score, score_table[SUPERJETS_HIT_SCORE1]); + break; + case 2: + score (SUPERJETS_HIT_SCORE2); + score_add (superjets_mode_score, score_table[SUPERJETS_HIT_SCORE2]); + break; + default: + case 3: + score (SUPERJETS_HIT_SCORE3); + score_add (superjets_mode_score, score_table[SUPERJETS_HIT_SCORE3]); + break; + }//end of switch + if (superjets_mode_shots_made >= superjets_goal) superjets_goal_award(); + else /* goal not met yet */ deff_start (DEFF_SUPERJETS_HIT_EFFECT); + }//end of if +}//end of function + + + +void superjets_goal_award (void) { + sound_start (ST_SPEECH, SPCH_SUPERJETS_COMPLETED, SL_4S, PRI_GAME_QUICK5); + score (SUPERJETS_GOAL_SCORE); + score_add (superjets_mode_score, score_table[SUPERJETS_GOAL_SCORE]); + if (superjets_goal < SUPERJETS_GOAL_MAX) superjets_goal += SUPERJETS_GOAL_STEP; + timed_mode_end (&superjets_mode); +}//END OF FUNCTION + + + + +/**************************************************************************** + * + * display effects + * + ****************************************************************************/ +void superjets_hit_effect_deff(void) { + U8 i = 0; + sj_counter = 0; + U8 superjets_SoundCounter; + //sounds ********************* + superjets_SoundCounter = random_scaled(3);//from kernal/random.c - pick number from 0 to 2 + if ( (superjets_SoundCounter) == 0 ) sound_start (ST_SPEECH, SPCH_DULCH, SL_2S, PRI_GAME_QUICK5); + else if ( (superjets_SoundCounter) == 1 ) sound_start (ST_SPEECH, SPCH_WOOH, SL_2S, PRI_GAME_QUICK5); + else sound_start (ST_SPEECH, SPCH_WOW, SL_2S, PRI_GAME_QUICK5); + //display ********************* + do { + U8 x = random_scaled (8); + U8 y = random_scaled (3); + sj_counter++; + dmd_alloc_low_clean (); + if (sj_counter < 2) bitmap_blit (superjets_bounce0_bits, 0, 0); + else if (sj_counter < 6) bitmap_blit (superjets_bounce4_bits, 0, 0); + else bitmap_blit (superjets_bounce0_bits, 0, 0); + + + sprintf ("%d", superjets_mode_shots_made); + if (i % 2 == 0) font_render_string_center (&font_antiqua, DMD_RIGHT_X + x, DMD_MIDDLE_Y + y, sprintf_buffer); + else font_render_string_center (&font_antiqua, DMD_RIGHT_X - x, DMD_MIDDLE_Y - y, sprintf_buffer); + + dmd_show_low (); + task_sleep (TIME_100MS); + } while (i++ < 8);//about .8sec + sj_counter = 0;//reset for return to other mode + deff_exit (); +}//end of mode_effect_deff + + + + + + + +void superjets_effect_deff(void) { + U8 sj_swap = 0; + U8 TOGGLE = 0; + + for (;;) { + sprintf_score(current_score); + font_render_string_center (&font_var5, 90, DMD_SMALL_CY_1, sprintf_buffer); + + if (TOGGLE == 0) font_render_string_center (&font_antiqua, DMD_RIGHT_X, DMD_SMALL_CY_2, "SUPER"); + else if (TOGGLE == 1) font_render_string_center (&font_antiqua, DMD_RIGHT_X, DMD_SMALL_CY_2, "JETS"); + else if (TOGGLE == 2) font_render_string_center (&font_antiqua, DMD_RIGHT_X, DMD_SMALL_CY_2, "SHOOT"); + else if (TOGGLE == 3) font_render_string_center (&font_antiqua, DMD_RIGHT_X, DMD_SMALL_CY_2, "BUMPERS"); + + sprintf ("%d SEC", superjets_mode_timer ); + font_render_string_center (&font_var5, DMD_RIGHT_X, DMD_SMALL_CY_4, sprintf_buffer); + + sprintf ("%d TO GOAL", superjets_goal - superjets_mode_shots_made); + font_render_string_center (&font_var5, DMD_RIGHT_X, DMD_SMALL_CY_5, sprintf_buffer); + + sj_counter++; //display coord in upper left corner - 40 bits wide at largest + + if (sj_counter % 5 == 1) bitmap_blit (superjets_bounce1_bits, 0, 0); + if (sj_counter % 5 == 2) bitmap_blit (superjets_bounce2_bits, 0, 0); + if (sj_counter % 5 == 3) bitmap_blit (superjets_bounce3_bits, 0, 0); + if (sj_counter % 5 == 4) bitmap_blit (superjets_bounce2_bits, 0, 0); + if (sj_counter % 5 == 0) { bitmap_blit (superjets_bounce1_bits, 0, 0); sj_counter = 0; } + + dmd_show_low (); + task_sleep (TIME_500MS); + + if (++sj_swap % 4 == 0) { if (++TOGGLE > 3) TOGGLE = 0; } //change TOGGLE once xx second + dmd_clean_page_low (); + }//END OF ENDLESS LOOP + deff_exit(); +}//end of mode_effect_deff + diff --git a/machine/dm/superjets.h b/machine/dm/superjets.h new file mode 100644 index 000000000..812c2f179 --- /dev/null +++ b/machine/dm/superjets.h @@ -0,0 +1,177 @@ +/****************************************************************************************** +****************************************************************************************** +* super jet ski BOUNCING up and down +****************************************************************************************** +********************************************************************************************/ +#define superjets_bounce1_width 40 +#define superjets_bounce1_height 29 +static U8 superjets_bounce1_bits[] = { superjets_bounce1_width , superjets_bounce1_height, + 0x00, 0xC0, 0x01, 0x00, 0x00, // ### + 0x00, 0xC0, 0x03, 0x00, 0x00, // #### + 0x00, 0xF0, 0x03, 0x00, 0x00, // ###### + 0x00, 0xF8, 0x01, 0x00, 0x00, // ###### + 0x00, 0xFC, 0x01, 0x00, 0x00, // ####### + 0x00, 0x7E, 0x00, 0x00, 0x00, // ###### + 0x00, 0x7F, 0x00, 0x00, 0x00, // ####### + 0x00, 0xFF, 0x01, 0x00, 0x00, // ######### + 0x00, 0xDF, 0xCF, 0x07, 0x00, // ##### ###### ##### + 0x00, 0x0F, 0xCC, 0x0F, 0x00, // #### ## ###### + 0x00, 0x1F, 0xF8, 0x1F, 0x00, // ##### ########## + 0x00, 0x3E, 0xF8, 0xFF, 0x01, // ##### ############## + 0x00, 0x7C, 0xFC, 0xFF, 0x3F, // ##### #################### + 0x00, 0xF0, 0xFE, 0xFF, 0x1F, // #### #################### + 0x00, 0xE0, 0xFF, 0xFF, 0x1F, // ######################## + 0x00, 0xF9, 0xFF, 0xFF, 0x1F, // # ########################## + 0xF0, 0xFF, 0xFF, 0xFF, 0x07, // ############################### + 0xF8, 0xFF, 0xFF, 0xFF, 0x03, // ############################### + 0xF0, 0xFF, 0xFF, 0xFF, 0x03, // ############################## + 0x00, 0xFE, 0xFF, 0xFF, 0x00, // ####################### + 0x00, 0xFE, 0xFF, 0x3F, 0x00, // ##################### + 0xC0, 0xFF, 0xFF, 0x1F, 0x00, // ####################### + 0xF0, 0xFF, 0xFF, 0x03, 0x00, // ###################### + 0xF8, 0xFF, 0xFF, 0x00, 0x00, // ##################### + 0xFC, 0xFF, 0x07, 0x00, 0x00, // ################# + 0xFE, 0x7F, 0x00, 0x00, 0x00, // ############## + 0xFF, 0x0F, 0x00, 0x00, 0x00, // ############ + 0xFE, 0x03, 0x00, 0x00, 0x00, // ######### + 0x3F, 0x00, 0x00, 0x00, 0x00, // ###### +}; + +#define superjets_bounce2_width 48 +#define superjets_bounce2_height 30 +static U8 superjets_bounce2_bits[] = { superjets_bounce2_width , superjets_bounce2_height, + 0x00, 0x00, 0x3C, 0x00, 0x00, 0x00, // #### + 0x00, 0x00, 0x7C, 0x00, 0x00, 0x00, // ##### + 0x00, 0xC0, 0xFF, 0x00, 0x00, 0x00, // ########## + 0x00, 0xE0, 0x1F, 0x00, 0x00, 0x00, // ######## + 0x00, 0xF0, 0x1F, 0x00, 0x00, 0x00, // ######### + 0x00, 0xF8, 0x03, 0x00, 0x00, 0x00, // ####### + 0x00, 0xFC, 0x03, 0x00, 0x00, 0x00, // ######## + 0x00, 0xFC, 0x07, 0x00, 0x00, 0x00, // ######### + 0x00, 0xFC, 0x1F, 0x00, 0x00, 0x00, // ########### + 0x00, 0x3C, 0x7C, 0x0C, 0x00, 0x00, // #### ##### ## + 0x00, 0x7C, 0xE0, 0x7C, 0x00, 0x00, // ##### ### ##### + 0x00, 0xF8, 0xC0, 0xFF, 0x00, 0x00, // ##### ########## + 0x00, 0xF0, 0xC1, 0xFF, 0x01, 0x00, // ##### ########### + 0x00, 0xE0, 0xF3, 0xFF, 0x03, 0x00, // ##### ############## + 0x00, 0xC0, 0xFB, 0xFF, 0x03, 0x00, // #### ############### + 0xE0, 0x83, 0xFF, 0xFF, 0x3F, 0x00, // ##### ####################### + 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0x03, // ####################################### + 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0x03, // ####################################### + 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0x03, // ## ################################### + 0x00, 0xFC, 0xFF, 0xFF, 0xFF, 0x03, // ################################ + 0x00, 0xFC, 0xFF, 0xFF, 0xFF, 0x01, // ############################### + 0xE0, 0xFF, 0xFF, 0xFF, 0x7F, 0x00, // ################################## + 0xF8, 0xFF, 0xFF, 0xFF, 0x3F, 0x00, // ################################### + 0xFC, 0xFF, 0xFF, 0xFF, 0x0F, 0x00, // ################################## + 0xFF, 0xFF, 0xFF, 0xFF, 0x03, 0x00, // ################################## + 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, // ################################ + 0xFF, 0xFF, 0xFF, 0x03, 0x00, 0x00, // ########################## + 0xFF, 0xFF, 0x01, 0x00, 0x00, 0x00, // ################# + 0xFF, 0x03, 0x00, 0x00, 0x00, 0x00, // ########## + 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, // # +}; + +#define superjets_bounce3_width 40 +#define superjets_bounce3_height 27 +static U8 superjets_bounce3_bits[] = { superjets_bounce3_width , superjets_bounce3_height, + 0x00, 0x00, 0x0C, 0x00, 0x00, // ## + 0x00, 0x00, 0x1F, 0x00, 0x00, // ##### + 0x00, 0x00, 0x1F, 0x00, 0x00, // ##### + 0x00, 0x80, 0x1F, 0x00, 0x00, // ###### + 0x00, 0xE0, 0x0F, 0x00, 0x00, // ####### + 0x00, 0xF0, 0x0F, 0x00, 0x00, // ######## + 0x00, 0xF0, 0x03, 0x00, 0x00, // ###### + 0x00, 0xF8, 0x07, 0x00, 0x00, // ######## + 0x00, 0xF8, 0x0F, 0x00, 0x00, // ######### + 0x00, 0xF8, 0x7F, 0x00, 0x00, // ############ + 0x00, 0x78, 0x40, 0x00, 0x00, // #### # + 0x00, 0x78, 0x40, 0x01, 0x00, // #### # # + 0x00, 0x78, 0xE0, 0x0F, 0x00, // #### ####### + 0x00, 0xE0, 0xF0, 0x1F, 0x00, // ### ######### + 0x78, 0xE0, 0xFC, 0x1F, 0x00, // #### ### ########### + 0xF8, 0xFF, 0xFD, 0x3F, 0x00, // ############## ############ + 0xF0, 0xFF, 0xFF, 0x7F, 0x00, // ########################### + 0x80, 0xFF, 0xFF, 0xFF, 0x01, // ########################## + 0x00, 0xFF, 0xFF, 0xFF, 0x07, // ########################### + 0xF8, 0xFF, 0xFF, 0xFF, 0x1F, // ################################## + 0xFE, 0xFF, 0xFF, 0xFF, 0x1F, // #################################### + 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, // ##################################### + 0xFF, 0xFF, 0xFF, 0xFF, 0x07, // ################################### + 0xFF, 0xFF, 0xFF, 0xFF, 0x03, // ################################## + 0xFF, 0xFF, 0xFF, 0xFF, 0x00, // ################################ + 0xFF, 0xFF, 0xFF, 0x1F, 0x00, // ############################# + 0x70, 0x01, 0x70, 0x00, 0x00, // ### # ### +}; + +#define superjets_bounce0_width 40 +#define superjets_bounce0_height 30 +static U8 superjets_bounce0_bits[] = { superjets_bounce0_width , superjets_bounce0_height, + 0x00, 0x06, 0x00, 0x00, 0x00, // ## + 0x00, 0x0F, 0x00, 0x00, 0x00, // #### + 0x00, 0x0F, 0x00, 0x00, 0x00, // #### + 0x80, 0x0F, 0x00, 0x00, 0x00, // ##### + 0xC0, 0x0F, 0x00, 0x00, 0x00, // ###### + 0xE0, 0x03, 0x00, 0x00, 0x00, // ##### + 0xE0, 0x03, 0xFE, 0x00, 0x00, // ##### ####### + 0xF0, 0xFF, 0xFE, 0xC0, 0x01, // ############ ####### ### + 0xF0, 0xFE, 0xFF, 0xFF, 0x00, // #### ####################### + 0xF0, 0x80, 0xFF, 0xFF, 0x00, // #### ################# + 0xF0, 0xC0, 0xFF, 0xFF, 0x00, // #### ################## + 0xF0, 0xC3, 0xFF, 0xFF, 0x00, // ###### ################## + 0xE0, 0xCF, 0xFF, 0x7F, 0x00, // ####### ################# + 0x00, 0xFF, 0xFF, 0x3F, 0x00, // ###################### + 0x00, 0xFC, 0xFF, 0x1F, 0x00, // ################### + 0x00, 0xFF, 0xFF, 0x0F, 0x00, // #################### + 0xE0, 0xFF, 0xFF, 0x0F, 0x00, // ####################### + 0xFC, 0xFF, 0xFF, 0x03, 0x00, // ######################## + 0xFE, 0xFF, 0xFF, 0x01, 0x00, // ######################## + 0xBE, 0xFF, 0x7F, 0x00, 0x00, // ##### ################ + 0x00, 0xFF, 0x3F, 0x00, 0x00, // ############## + 0xE0, 0xFF, 0x07, 0x00, 0x00, // ############## + 0xF0, 0xFF, 0x00, 0x00, 0x00, // ############ + 0xF8, 0xFF, 0x00, 0x00, 0x00, // ############# + 0xFC, 0x1F, 0x00, 0x00, 0x00, // ########### + 0xFC, 0x0F, 0x00, 0x00, 0x00, // ########## + 0xFE, 0x03, 0x00, 0x00, 0x00, // ######### + 0xFF, 0x01, 0x00, 0x00, 0x00, // ######### + 0x3E, 0x00, 0x00, 0x00, 0x00, // ##### + 0x1F, 0x00, 0x00, 0x00, 0x00, // ##### +}; + +#define superjets_bounce4_width 24 +#define superjets_bounce4_height 32 +static U8 superjets_bounce4_bits[] = { superjets_bounce4_width , superjets_bounce4_height, + 0x80, 0x01, 0x00, // ## + 0xC0, 0x03, 0x00, // #### + 0xC0, 0x01, 0x00, // ### + 0xE0, 0x03, 0x00, // ##### + 0xE0, 0x00, 0x00, // ### + 0xF0, 0x00, 0x00, // #### + 0xF0, 0x01, 0x00, // ##### + 0xF0, 0x01, 0x00, // ##### + 0x70, 0x03, 0x60, // ### ## ## + 0x70, 0xFF, 0x7D, // ### ######### ##### + 0x70, 0xFE, 0x7F, // ### ############## + 0x70, 0xF8, 0x7F, // ### ############ + 0x70, 0xFC, 0x3F, // ### ############ + 0x60, 0xFE, 0x3F, // ## ############# + 0x60, 0xFE, 0x3F, // ## ############# + 0xE0, 0xFF, 0x1F, // ################ + 0xE0, 0xFF, 0x0F, // ############### + 0xE0, 0xFF, 0x0F, // ############### + 0xC0, 0xFF, 0x07, // ############# + 0xF0, 0xFF, 0x03, // ############## + 0xFC, 0xFF, 0x00, // ############## + 0xFE, 0x7F, 0x00, // ############## + 0xEF, 0x3F, 0x00, // #### ######### + 0xE2, 0x0F, 0x00, // # ####### + 0xF8, 0x07, 0x00, // ######## + 0xF8, 0x03, 0x00, // ####### + 0xFC, 0x01, 0x00, // ####### + 0xFC, 0x00, 0x00, // ###### + 0x7E, 0x00, 0x00, // ###### + 0x3E, 0x00, 0x00, // ##### + 0x1E, 0x00, 0x00, // #### + 0x06, 0x00, 0x00, // ## +}; diff --git a/machine/dm/top_popper.c b/machine/dm/top_popper.c new file mode 100644 index 000000000..c2213946a --- /dev/null +++ b/machine/dm/top_popper.c @@ -0,0 +1,310 @@ +/* + * demolition man + * top_popper.c + * + * written by James Cardona + * + * Location Description: + * + * Scoring Description: (original game) + * + * + * Scoring Description: (my rules) + * same as above except + * + */ +/* CALLSET_SECTION (top_popper, __machine4__) */ + + +#include +#include +#include "search.h" +#include "dm/global_constants.h" + +//constants +const U8 top_popperAwardsNumOfSounds = 6; //num between 0 and N +const sound_code_t top_popperAwardsSoundsArray[] = { SPCH_YOU_LOOK_GREAT_TODAY, SPCH_ILUMINATE, + SPCH_AMAZING_WES, SPCH_AMAZING_SLY, + SPCH_GLORIOUS, SPCH_OUTSTANDING}; + +//local variables + U8 top_popperSwitchDebouncer; +__local__ U8 top_popper_shots_made; + +//external variables + +//internally called function prototypes --external found at protos.h +void top_popper_lights_task (void); + +/**************************************************************************** + * initialize and exit + ***************************************************************************/ +CALLSET_ENTRY (top_popper, start_player, start_ball) { + top_popperSwitchDebouncer = 0; + top_popper_shots_made = 0; +} + +/**************************************************************************** + * + * body + * + ****************************************************************************/ +//called from /common/replay.c +CALLSET_ENTRY (top_popper, award_extra_ball_effect) { + leff_start (LEFF_TOP_POPPER); + deff_start (DEFF_EXTRA_BALL_EFFECT); +}//end of function + + + +//sw_top_popper +CALLSET_ENTRY (top_popper, dev_top_sol_enter) { + ball_search_monitor_stop (); + + //BACK IN FRIDGE WIZARD MODE + if (flag_test(FLAG_BACK_IN_THE_FRIDGE_ACTIVATED)) { + start_back_in_the_fridge (); + task_sleep_sec(1); + leff_start (LEFF_TOP_POPPER); + sol_request_async(SOL_TOP_POPPER); + } + + //EXTRABALL AWARD OR MULTIBALL START OR BOTH + else if (flag_test(FLAG_IS_EXTRABALL_LIT) + || (!flag_test(FLAG_BACK_IN_THE_FRIDGE_RUNNING) + && flag_test (FLAG_IS_MULTIBALL_ENABLED) )) { + + //EXTRABALL AWARD + if (flag_test(FLAG_IS_EXTRABALL_LIT) ) { + increment_extra_balls(); + end_extraball(); + leff_start (LEFF_EXTRABALL); + deff_start_sync (DEFF_EXTRA_BALL_EFFECT); + task_sleep_sec(1); + }//end of EB + + //START MULTIBALL + if ( !flag_test(FLAG_BACK_IN_THE_FRIDGE_RUNNING) + && flag_test (FLAG_IS_MULTIBALL_ENABLED) ) { + multiball_start(); + task_sleep_sec(1); + }//end of multiball start + + //do for both + leff_start (LEFF_TOP_POPPER); + sol_request_async(SOL_TOP_POPPER); + }//END of EB or MB + + //START VIDEO MODE + else if ( !flag_test(FLAG_BACK_IN_THE_FRIDGE_RUNNING) + && !flag_test(FLAG_IS_FORTRESS_MB_RUNNING) + && !flag_test(FLAG_IS_MUSEUM_MB_RUNNING) + && !flag_test(FLAG_IS_CRYOPRISON_MB_RUNNING) + && !flag_test(FLAG_IS_WASTELAND_MB_RUNNING) + && !flag_test(FLAG_IS_DEMOTIME_RUNNING) + && flag_test (FLAG_VIDEO_MODE_ENABLED) )//this is set at combos + start_video_mode(1); + + //NOTHING SPECIAL + else { + score (TOP_POP_SCORE);//located in kernal/score.c + //LIGHTING EFFECTS + // leff_start (LEFF_UNDERGROUND_KICKOUT); + deff_start_sync (DEFF_TOP_POPPER_EFFECT); //if nothing special, do normal display effects + leff_start (LEFF_TOP_POPPER); + sol_request_async(SOL_TOP_POPPER); + }//end of else NOTHING SPECIAL + + ball_search_monitor_start (); +}//end of function + + + +void top_popper_video_mode_finished (void) { + leff_start (LEFF_TOP_POPPER); + sol_request_async(SOL_TOP_POPPER); +}//end of function + + + + +/**************************************************************************** + * + * lighting effects + * + ****************************************************************************/ +void top_popper_leff (void) { + U8 i; + + for (i = 0; i < 6; i++) { + flasher_pulse (FLASH_DIVERTER_FLASHER); + task_sleep (TIME_33MS); + flasher_pulse(FLASH_CLAW_FLASHER); + task_sleep (TIME_33MS); + flasher_pulse(FLASH_ELEVATOR_1_FLASHER); + task_sleep (TIME_33MS); + flasher_pulse(FLASH_ELEVATOR_2_FLASHER); + task_sleep (TIME_100MS); + } + + for (i = 0; i < 6; i++) { + flasher_pulse (FLASH_LEFT_RAMP_UP_FLASHER); + task_sleep (TIME_33MS); + flasher_pulse (FLASH_DIVERTER_FLASHER); + task_sleep (TIME_33MS); + flasher_pulse (FLASH_RIGHT_RAMP_UP_FLASHER); + sound_start (ST_EFFECT, ZAPP_3_MED, SL_2S, PRI_GAME_QUICK2); + task_sleep (TIME_100MS); + } + leff_exit(); +}//end of function + + + +void extraball_leff(void) { + gi_leff_disable (PINIO_GI_STRINGS); //turn off gi + leff_start(LEFF_FLASH_ALL); + gi_leff_enable (PINIO_GI_STRINGS); //turn on gi + task_sleep_sec (TIME_1S); + leff_exit(); +}//end of function + + + + + + + +/**************************************************************************** + * + * display effects + * + ****************************************************************************/ +//nothing is going on effect +U8 top_popper_MessageCounter; +void top_popper_effect_deff(void) { + U16 fno; + + if (IN_TEST) { + if (++top_popper_MessageCounter > 3) top_popper_MessageCounter = 0; + } + else top_popper_MessageCounter = random_scaled(3); + + dmd_alloc_pair_clean ();// Clean both pages + + switch (top_popper_MessageCounter) { + default: + case 0: + sound_start (ST_EFFECT, TRAIN_PULL_IN, SL_2S, SP_NORMAL); + for (fno = IMG_SIMON_E_END-2; fno >= IMG_SIMON_E_START; fno -= 2) { + dmd_alloc_pair (); + frame_draw(fno); + dmd_show2 (); + task_sleep (TIME_100MS); + }//end of for loop + + sound_start (ST_EFFECT, TRAIN_PULL_IN, SL_2S, SP_NORMAL); + for (fno = IMG_SIMON_E_START; fno <= IMG_SIMON_E_END; fno += 2) { + dmd_map_overlay (); + dmd_clean_page_low (); + font_render_string_center (&font_term6, DMD_MIDDLE_X, DMD_MED_CY_1, "LIGHT ALL M T L"); + font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_MED_CY_2, "5 TIMES TO"); + font_render_string_center (&font_bitcube10, DMD_MIDDLE_X, DMD_MED_CY_3, "LIGHT EXTRA BALL"); + dmd_text_outline (); + dmd_alloc_pair (); + frame_draw(fno); + dmd_overlay_outline (); + dmd_show2 (); + task_sleep (TIME_100MS); + }//end of for loop + break; + case 1: + sound_start (ST_EFFECT, COMPUTER3, SL_2S, SP_NORMAL); + for (fno = IMG_CLAW_B_START; fno <= IMG_CLAW_B_END; fno += 2) { + dmd_alloc_pair (); + frame_draw(fno); + dmd_show2 (); + task_sleep (TIME_100MS); + }//end of for loop + + sound_start (ST_EFFECT, COMPUTER3, SL_2S, SP_NORMAL); + dmd_map_overlay (); + dmd_clean_page_low (); + font_render_string_center (&font_term6, DMD_MIDDLE_X, DMD_MED_CY_1, "SHOOT EYEBALL"); + font_render_string_center (&font_term6, DMD_MIDDLE_X, DMD_MED_CY_2, "TO LIGHT"); + font_render_string_center (&font_bitcube10, DMD_MIDDLE_X, DMD_MED_CY_3, "EXTRA BALL"); + dmd_text_outline (); + dmd_alloc_pair (); + frame_draw(IMG_CLAW_B_END); + dmd_overlay_outline (); + dmd_show2 (); + break; + case 2: + sound_start (ST_EFFECT, COMPUTER3, SL_2S, SP_NORMAL); + for (fno = IMG_CLAW_A_START; fno <= IMG_CLAW_A_END; fno += 2) { + dmd_alloc_pair (); + frame_draw(fno); + dmd_show2 (); + task_sleep (TIME_100MS); + }//end of for loop + + sound_start (ST_EFFECT, COMPUTER3, SL_2S, SP_NORMAL); + dmd_map_overlay (); + dmd_clean_page_low (); + font_render_string_center (&font_term6, DMD_MIDDLE_X, DMD_MED_CY_1, "SHOOT COMBOS"); + font_render_string_center (&font_term6, DMD_MIDDLE_X, DMD_MED_CY_2, "TO LIGHT"); + font_render_string_center (&font_bitcube10, DMD_MIDDLE_X, DMD_MED_CY_3, "VIDEO MODE"); + dmd_text_outline (); + dmd_alloc_pair (); + frame_draw(IMG_CLAW_A_END); + dmd_overlay_outline (); + dmd_show2 (); + break; + }//END OF SWITCH + deff_exit (); +}//end of mode_effect_deff + + + + +void extra_ball_effect_deff(void) { + U8 eb_rnd_sound; + U16 fno; + dmd_alloc_pair_clean ();// Clean both pages + eb_rnd_sound = random_scaled(2); + sound_start (ST_EFFECT, EXTRA_BALL_SOUND, SL_2S, SP_NORMAL); + + for (fno = IMG_FREEZER1_START; fno <= IMG_FREEZER1_END; fno += 2) { + dmd_alloc_pair (); + frame_draw(fno); + dmd_show2 (); + task_sleep (TIME_66MS); + }//end of for loop + + for (fno = IMG_FREEZER2_START; fno <= IMG_FREEZER2_END; fno += 2) { + dmd_alloc_pair (); + frame_draw(fno); + dmd_show2 (); + task_sleep (TIME_66MS); + }//end of for loop + + if (eb_rnd_sound) sound_start (ST_SPEECH, SPCH_EXTRABALL_WES, SL_2S, SP_NORMAL); + else sound_start (ST_SPEECH, SPCH_EXTRABALL_SLY, SL_2S, SP_NORMAL); + + for (fno = IMG_FREEZER3_START; fno <= IMG_FREEZER3_END; fno += 2) { + dmd_map_overlay (); + dmd_clean_page_low (); + font_render_string_center (&font_fireball, DMD_MIDDLE_X - 25, DMD_BIG_CY_Top, "EXTRA"); + 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_66MS); + }//end of for loop + + deff_exit (); +}//end of mode_effect_deff + + diff --git a/machine/dm/underground.c b/machine/dm/underground.c new file mode 100644 index 000000000..67da5ebf3 --- /dev/null +++ b/machine/dm/underground.c @@ -0,0 +1,1343 @@ +/* + * demolition man + * underground.c + * + * written by James Cardona + * + * Location Description: + * subway / underground is a scoop across from the upper flipper and to the left of the jets + * and to the right of the center ramp, with the opening on the left side. It is an easy + * shot from the upper left flipper, and it can also be made with a little luck from either + * of the lower flippers. The Computer and Demolition Time are awarded here. The + * Underground has a Jackpot lamp and a Combo arrow. The ball is returned, via a VUK + * to the right ramp habitrail. The Computer and Demolition time are indicated by + * yellow and blue lights mounted over the Underground entrance. + * + * The Computer is accessed via the UnderGround shot and is lit by a yellow lamp + * immediately above. Lit every 10 combos, the Computer is a random award like + * the Camera on Twilight Zone. Awards seen so far : + * Light Extra Ball + * Light Explodes (lights all four explode 10M lamps) + * 3x Car Crash + * 2x Retina Scan + * Light Arrows (lights Laser millions on all combo shots) + * Maximize Freezes (freezes four balls and lights multiball) + * Collect Bonus (complete with bonus music!) + * Collect Standups (awards all the lit yellow targets) + * + * Scoring Description: (original game) + * + * + * Scoring Description: (my rules) + * same as above except + * + */ +/*CALLSET_SECTION (underground, __machine2__)*/ +#include +#include "dm/global_constants.h" +#include "search.h" + +//constants +const U8 computerAwardsChooserNumOfSounds = 7; //num between 0 and 6 +const sound_code_t computerAwardsChooserSoundsArray[] = { COMPUTER1, COMPUTER_ADDING, COMPUTER_AWARD_SMALL, + COMPUTER_AWARD_LONG, COMPUTER2, SPCH_ACCESSING, + SPCH_COMPUTER_AWARD}; + +//local variables +U8 undergroundSwitchDebouncer; +U8 underground_goal; +U8 MessageCounter; +U8 underground_SoundCounter; +__boolean underground_inBall_search; +__boolean computer_award_just_awarded; +score_t ca_bonus_scored; +score_t ca_total_bonus; +__local__ U8 computerAwardsChooser; +__local__ U8 nextcomputerAwardsChooser; +__local__ U8 underground_shots_made; + + + +//external variables +extern __local__ U8 special_shot_selector; //from special_shots.c + +extern __local__ U8 standup_num_of_hits; + +extern U8 car_crash_shots_made; //from car_crash.c + +extern U8 car_chase_mode_shots_made; //from car_chase.c +extern U8 car_chase_modes_achieved; +extern U8 car_chase_modes_completed; + +extern U8 capture_simon_mode_shots_made; //from capture_simon.c +extern U8 capture_simon_modes_achieved; +extern U8 capture_simon_modes_completed; + +extern U8 prison_break_mode_shots_made; //from prison_break.c +extern U8 prison_break_modes_achieved; + +extern U8 acmag_mode_shots_made; //from acmag.c +extern U8 acmag_modes_achieved; + +extern U8 explode_mode_shots_made; //from EXPLODE.c +extern score_t explode_mode_score; + +extern U8 superjets_modes_achieved; //from superjets.c +extern U8 superjets_mode_shots_made; + +extern U8 standupFrenzy_modes_achieved; //from standupfrenzy.c +extern U8 standupFrenzyNumHits; +// + +extern U8 combo_counter; //from combos.c +extern U8 fortress_jackpot_shots_made; + +extern U8 rollover_bonus_multiplier; //from rollovers.c + +extern U8 fortress_jackpot_shots_made; +extern U8 demotime_jackpot_shots_made; +extern U8 wasteland_jackpot_shots_made; +extern U8 cryoprison_jackpot_shots_made; + +extern U8 demotime_jackpot_shots_made; + +extern U8 huxley_mode_shots_made; + +extern U8 back_in_the_fridge_shots_made; + + + + + +//internally called function prototypes --external found at protos.h +void underground_reset (void); +void underground_task (void); +void square_draw (U8 sq); +void show_text_on_squares (U8 times); +void square_init (void); +void computer_award(void); +void computer_light_off (void); + +/**************************************************************************** + * initialize and exit + ***************************************************************************/ +void underground_reset (void) { + undergroundSwitchDebouncer = 0; + underground_shots_made = 0; + underground_goal = 0; + underground_inBall_search = FALSE; + computer_award_just_awarded = FALSE; +}//end of function + + + +void player_underground_reset(void) { + if (IN_TEST) { + computerAwardsChooser = 0; + nextcomputerAwardsChooser = 1; + } + else { + computerAwardsChooser = random_scaled(10); + nextcomputerAwardsChooser = random_scaled(10); + } + underground_reset(); + MessageCounter = 0; + underground_SoundCounter = 0; +}//end of function + + + +CALLSET_ENTRY (underground, start_player) { player_underground_reset(); } +CALLSET_ENTRY (underground, start_ball) { underground_reset(); } +CALLSET_ENTRY (underground, ball_search) { underground_inBall_search = TRUE; } +CALLSET_ENTRY (underground, ball_search_end) { underground_inBall_search = FALSE; } +CALLSET_ENTRY (underground, end_game) { computer_light_off(); } + + + +/**************************************************************************** + * playfield lights and flags + ***************************************************************************/ +void underground_jackpot_light_on(void) { + flag_on(FLAG_IS_UGROUND_JACKPOT_ACTIVATED); + lamp_tristate_on (LM_UNDERGROUND_JACKPOT); +}//end of function + +void underground_jackpot_light_off(void) { + flag_off(FLAG_IS_UGROUND_JACKPOT_ACTIVATED); + lamp_tristate_off (LM_UNDERGROUND_JACKPOT); +}//end of function + +void underground_arrow_light_on(void) { + flag_on (FLAG_IS_UGROUND_ARROW_ACTIVATED); + lamp_tristate_on (LM_UNDERGROUND_ARROW); +}//end of function + +void underground_arrow_light_off(void) { + flag_off (FLAG_IS_UGROUND_ARROW_ACTIVATED); + lamp_tristate_off (LM_UNDERGROUND_ARROW); +}//end of function + +void computer_light_on(void) { + flag_on (FLAG_IS_COMPUTER_ACTIVATED); + lamp_tristate_flash (LM_COMPUTER); +}//end of function + +void computer_light_off(void) { + flag_off (FLAG_IS_COMPUTER_ACTIVATED); + lamp_tristate_off (LM_COMPUTER); + lamp_tristate_off (LM_DEMO_TIME); +}//end of function + + + +/**************************************************************************** + * + * body + * + ****************************************************************************/ +//sw_bottom_popper +CALLSET_ENTRY (underground, dev_subway_vuk_enter) { + if (!underground_inBall_search) { + if (!flag_test (FLAG_CAPTURE_SIMON_INITIALSTART) ){ + ball_search_monitor_stop (); + computer_award_just_awarded = FALSE; + ++underground_shots_made; + score (BOT_POP_SCORE);//located in kernal/score.c + + //CALLS ***************************** + if (flag_test(FLAG_SKILLSHOT_ENABLED) ) award_skill_shot (1); + else if (flag_test(FLAG_BACK_IN_THE_FRIDGE_RUNNING) ) back_in_the_fridge_shot_made(); + else if (flag_test(FLAG_IS_DEMOTIME_ENABLED) ) demotime_start(); + else if (flag_test(FLAG_IS_HUXLEY_RUNNING) ) huxley_mode_shot_made(); + else if (flag_test(FLAG_IS_UGROUND_JACKPOT_ACTIVATED) ) score_jackpot(); + else if (flag_test (FLAG_IS_CAPSIM_UNDER_ACTIVATED) ) capture_simon_made(); + else if (flag_test(FLAG_IS_COMPUTER_ACTIVATED) ) { leff_start (LEFF_COMPUTER_AWARD); + deff_start_sync (DEFF_COMPUTER_AWARD); } + else if (flag_test (FLAG_IS_PBREAK_RUNNING) ) prison_break_made(); + + else if ( flag_test(FLAG_IS_COMBO_UNDER_ACTIVATED)) combo_hit(); + else if (flag_test(FLAG_IS_COMBOS_KILLED) + && flag_test(FLAG_IS_COMBOS_RESTARTABLE) ) combo_init(); + + //if nothing special, do normal effects + if( !flag_test (FLAG_IS_PBREAK_RUNNING) + && !flag_test (FLAG_IS_CAPSIM_UNDER_ACTIVATED) + && !computer_award_just_awarded + && !flag_test (FLAG_IS_UGROUND_JACKPOT_ACTIVATED) + && !flag_test(FLAG_IS_DEMOTIME_IS_STARTING) ) { + + if ( underground_shots_made > 5 + && special_shot_selector == 0 + && !flag_test(FLAG_LASER_SHOT_ENABLED) ) { + + underground_shots_made = 0; + //special_shot_selector++; + flag_on (FLAG_LASER_SHOT_ENABLED); + } + + deff_start (DEFF_UNDERGROUND_EFFECT); + + }//end of if nothing special + computer_award_just_awarded = FALSE; + + if ( !flag_test(FLAG_IS_DEMOTIME_IS_STARTING) + && !flag_test(FLAG_VIDEO_MODE_RUNNING) ) { + leff_start (LEFF_UNDERGROUND); + sol_request_async(SOL_BOTTOM_POPPER); + } + ball_search_monitor_start (); + }//end of !flag_test FLAG_CAPTURE_SIMON_INITIALSTART + }//end of !underground_inBall_search +}//end of function + + + + + + +/**************************************************************************** + * + * lighting effects + * + ****************************************************************************/ +void underground_leff1 (void) { + U8 i; + lamplist_set_apply_delay (TIME_66MS); + for (i = 0; i < 8; i++) + lamplist_apply (LAMPLIST_UNDERGROUND_SCOOP, leff_toggle); + leff_exit (); +}//end of function + + +void underground_leff (void) { + leff_create_peer (underground_leff1); + + flasher_pulse (FLASH_DIVERTER_FLASHER); + flasher_pulse (FLASH_LEFT_RAMP_UP_FLASHER); + task_sleep (TIME_100MS); + + flasher_pulse (FLASH_RIGHT_RAMP_UP_FLASHER); + flasher_pulse (FLASH_DIVERTER_FLASHER); + task_sleep (TIME_100MS); + + flasher_pulse (FLASH_LEFT_RAMP_UP_FLASHER); + flasher_pulse (FLASH_RIGHT_RAMP_UP_FLASHER); + task_sleep (TIME_100MS); + + flasher_pulse (FLASH_DIVERTER_FLASHER); + flasher_pulse (FLASH_LEFT_RAMP_UP_FLASHER); + task_sleep (TIME_100MS); + + flasher_pulse (FLASH_RIGHT_RAMP_UP_FLASHER); + flasher_pulse (FLASH_DIVERTER_FLASHER); + task_sleep (TIME_100MS); + + flasher_pulse (FLASH_LEFT_RAMP_UP_FLASHER); + flasher_pulse (FLASH_RIGHT_RAMP_UP_FLASHER); + task_sleep (TIME_100MS); + leff_exit (); +}//end of function + + + + +void computer_award_leff(void) { + gi_leff_disable (PINIO_GI_STRINGS); //turn off gi + leff_start(LEFF_FLASH_ALL); + gi_leff_enable (PINIO_GI_STRINGS); //turn on gi + task_sleep_sec (TIME_1S); + leff_exit(); +}//end of function + + + + + + +/**************************************************************************** + * + * display effects + * + ****************************************************************************/ +void underground_effect_deff(void) { + U16 fno; + + if (IN_TEST) { + if (++MessageCounter > 5) MessageCounter = 0; + if (++underground_SoundCounter > 3) underground_SoundCounter = 0; + } + else { +// MessageCounter = random_scaled(3); + underground_SoundCounter = random_scaled(2);//from kernal/random.c + } + + dmd_alloc_pair_clean ();// Clean both pages + + //one shot away from HUXLEY so tell the player so + if (flag_test(FLAG_IS_HUXLEY_ENABLED) || (IN_TEST && MessageCounter == 0) ) { + sound_start (ST_EFFECT, SUBWAY2, SL_2S, SP_NORMAL); + for (fno = IMG_JOHN_SPARTAN_A_START; fno <= IMG_JOHN_SPARTAN_A_END; fno += 2) { + dmd_alloc_pair (); + frame_draw(fno); + dmd_show2 (); + task_sleep (TIME_100MS); + }//end of for loop + sound_start (ST_EFFECT, SUBWAY2, SL_2S, SP_NORMAL); + for (fno = IMG_JOHN_SPARTAN_A_END; fno >= IMG_JOHN_SPARTAN_A_START; fno -= 2) { + dmd_map_overlay (); + dmd_clean_page_low (); + font_render_string_center (&font_fireball, DMD_MIDDLE_X, DMD_BIG_CY_Top, "HUXLEY"); + font_render_string_center (&font_fireball, DMD_MIDDLE_X, DMD_BIG_CY_Bot, "READY"); + dmd_text_outline (); + dmd_alloc_pair (); + frame_draw(fno); + dmd_overlay_outline (); + dmd_show2 (); + task_sleep (TIME_100MS); + }//end of for loop + }//END OF - one shot away from HUXLEY so tell the player so + else + + //one shot away from car chase so tell the player so + if (flag_test(FLAG_IS_CARCHASE_MODE_ENABLED) || (IN_TEST && MessageCounter == 1) ) { + sound_start (ST_EFFECT, SUBWAY2, SL_2S, SP_NORMAL); + for (fno = IMG_PHOENIX_A2_START; fno <= IMG_PHOENIX_A2_END; fno += 2) { + dmd_alloc_pair (); + frame_draw(fno); + dmd_show2 (); + task_sleep (TIME_100MS); + }//end of for loop + sound_start (ST_EFFECT, SUBWAY2, SL_2S, SP_NORMAL); + for (fno = IMG_PHOENIX_A2_END; fno >= IMG_PHOENIX_A2_START; fno -= 2) { + dmd_map_overlay (); + dmd_clean_page_low (); + font_render_string_center (&font_fireball, DMD_MIDDLE_X, DMD_BIG_CY_Top, "CAR CHASE"); + font_render_string_center (&font_fireball, DMD_MIDDLE_X, DMD_BIG_CY_Bot, "READY"); + dmd_text_outline (); + dmd_alloc_pair (); + frame_draw(fno); + dmd_overlay_outline (); + dmd_show2 (); + task_sleep (TIME_100MS); + }//end of for loop + }//END OF - one shot away from car chase so tell the player so + else + + //one shot away from explode so tell the player so + if (flag_test(FLAG_IS_EXPLODE_MODE_ENABLED) || (IN_TEST && MessageCounter == 2) ) { + sound_start (ST_EFFECT, SUBWAY2, SL_2S, SP_NORMAL); + for (fno = IMG_JOHN_SPARTAN_A_START; fno <= IMG_JOHN_SPARTAN_A_END; fno += 2) { + dmd_alloc_pair (); + frame_draw(fno); + dmd_show2 (); + task_sleep (TIME_100MS); + }//end of for loop + sound_start (ST_EFFECT, SUBWAY2, SL_2S, SP_NORMAL); + for (fno = IMG_JOHN_SPARTAN_A_END; fno >= IMG_JOHN_SPARTAN_A_START; fno -= 2) { + dmd_map_overlay (); + dmd_clean_page_low (); + font_render_string_center (&font_fireball, DMD_MIDDLE_X, DMD_BIG_CY_Top, "EXPLODE"); + font_render_string_center (&font_fireball, DMD_MIDDLE_X, DMD_BIG_CY_Bot, "READY"); + dmd_text_outline (); + dmd_alloc_pair (); + frame_draw(fno); + dmd_overlay_outline (); + dmd_show2 (); + task_sleep (TIME_100MS); + }//end of for loop + }//END OF - one shot away from explode so tell the player so + else + + //one shot away from video mode so tell the player so + if (flag_test(FLAG_VIDEO_MODE_ENABLED) || (IN_TEST && MessageCounter == 3) ) { + sound_start (ST_EFFECT, SUBWAY2, SL_2S, SP_NORMAL); + for (fno = IMG_PHOENIX_A2_START; fno <= IMG_PHOENIX_A2_END; fno += 2) { + dmd_alloc_pair (); + frame_draw(fno); + dmd_show2 (); + task_sleep (TIME_100MS); + }//end of for loop + sound_start (ST_EFFECT, SUBWAY2, SL_2S, SP_NORMAL); + for (fno = IMG_PHOENIX_A2_END; fno >= IMG_PHOENIX_A2_START; fno -= 2) { + dmd_map_overlay (); + dmd_clean_page_low (); + font_render_string_center (&font_fireball, DMD_MIDDLE_X, DMD_BIG_CY_Top, "VIDEO MODE"); + font_render_string_center (&font_fireball, DMD_MIDDLE_X, DMD_BIG_CY_Bot, "READY"); + dmd_text_outline (); + dmd_alloc_pair (); + frame_draw(fno); + dmd_overlay_outline (); + dmd_show2 (); + task_sleep (TIME_100MS); + }//end of for loop + }//END OF - one shot away from video mode so tell the player so + + //set up for laser shot + else if (flag_test(FLAG_LASER_SHOT_ENABLED) || (IN_TEST && MessageCounter == 4) ) { + sound_start (ST_EFFECT, SUBWAY2, SL_2S, SP_NORMAL); + for (fno = IMG_SIMON_FIRE1_START; fno <= IMG_SIMON_FIRE1_END; fno += 2) { + dmd_alloc_pair (); + frame_draw(fno); + dmd_show2 (); + task_sleep (TIME_100MS); + }//end of for loop + sound_start (ST_EFFECT, SUBWAY2, SL_2S, SP_NORMAL); + for (fno = IMG_SIMON_FIRE1_END; fno >= IMG_SIMON_FIRE1_START; fno -= 2) { + dmd_map_overlay (); + dmd_clean_page_low (); + font_render_string_center (&font_fireball, DMD_MIDDLE_X, DMD_BIG_CY_Top, "CENTER"); + font_render_string_center (&font_fireball, DMD_MIDDLE_X, DMD_BIG_CY_Bot, "COW SHOT"); + dmd_text_outline (); + dmd_alloc_pair (); + frame_draw(fno); + dmd_overlay_outline (); + dmd_show2 (); + task_sleep (TIME_100MS); + }//end of for loop + }//END OF - set up for laser shot + + else { // STANDARD DISPLAY OR (IN_TEST && MessageCounter == 5) + sound_start (ST_EFFECT, SUBWAY2, SL_2S, SP_NORMAL); + for (fno = IMG_SIMON_FIRE1_START; fno <= IMG_SIMON_FIRE1_END; fno += 2) { + dmd_alloc_pair (); + frame_draw(fno); + dmd_show2 (); + task_sleep (TIME_100MS); + }//end of for loop + sound_start (ST_EFFECT, SUBWAY2, SL_2S, SP_NORMAL); + for (fno = IMG_SIMON_FIRE1_END; fno >= IMG_SIMON_FIRE1_START; fno -= 2) { + sprintf ("SUBWAY"); + dmd_map_overlay (); + dmd_clean_page_low (); + font_render_string_center (&font_fireball, DMD_MIDDLE_X - 25, DMD_BIG_CY_Bot, sprintf_buffer); + dmd_text_outline (); + dmd_alloc_pair (); + frame_draw(fno); + dmd_overlay_outline (); + dmd_show2 (); + task_sleep (TIME_100MS); + }//end of for loop + }//end of else + + task_sleep (TIME_500MS); + deff_exit (); +}//end of mode_effect_deff + + + + + + +void computer_award_deff(void) { + U8 i; + ball_search_monitor_stop (); + + sound_start (ST_ANY, SPCH_ACCESSING, SL_3S, PRI_GAME_QUICK6); + + dmd_alloc_low_clean (); + dmd_draw_thin_border (dmd_low_buffer); + sprintf ("COMPUTER AWARD"); + font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_SMALL_CY_1, sprintf_buffer); + dmd_show_low (); + task_sleep_sec (1); + + dmd_map_overlay (); + dmd_clean_page_high (); + dmd_clean_page_low (); + dmd_draw_thin_border (dmd_low_buffer); + sprintf ("COMPUTER AWARD"); + font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_SMALL_CY_1, sprintf_buffer); + + sound_start (ST_EFFECT, COMPUTER_ADDING, SL_3S, PRI_GAME_QUICK6); + + show_text_on_squares (10);//5 times per second + + sound_start (ST_EFFECT, COMPUTER_AWARD_LONG, SL_3S, PRI_GAME_QUICK6); + task_sleep(TIME_2S); + + dmd_alloc_low_clean (); + + if (IN_TEST) { if (++computerAwardsChooser > 9) { + computerAwardsChooser = 0; + nextcomputerAwardsChooser = 1; + } + else nextcomputerAwardsChooser++; + }//end of if in test + else { + computerAwardsChooser = nextcomputerAwardsChooser; + nextcomputerAwardsChooser = random_scaled(10); + }//end of else - not in test + + switch (computerAwardsChooser) { +//COLLECT BONUS + case 0 : + dmd_draw_thin_border (dmd_low_buffer); + sound_start(ST_SPEECH, SPCH_COLLECT_BONUS, SL_4S, PRI_GAME_QUICK5); + sprintf ("COLLECT"); + font_render_string_center (&font_steel, DMD_MIDDLE_X, DMD_BIG_CY_Top, sprintf_buffer); + sprintf ("BONUS"); + font_render_string_center (&font_steel, DMD_MIDDLE_X, DMD_BIG_CY_Bot, sprintf_buffer); + dmd_show_low (); + task_sleep_sec (1); + + in_bonus = TRUE; + task_sleep (TIME_100MS); /* Wait a bit so the previous music_stop doesn't kill the sounds */ + sound_start1 (ST_ANY, BONUS_SHORT); + score_zero (ca_total_bonus); /* Clear the bonus score */ + /* Show Initial bonus screen */ + dmd_alloc_low_clean (); + font_render_string_center (&font_fixed10, DMD_MIDDLE_X, DMD_BIG_CY_Cent, "BONUS"); + dmd_sched_transition (&trans_scroll_down); + dmd_show_low (); + task_sleep_sec (1); + + /** + * *car crash scoring and display * + * **/ + if (car_crash_shots_made > 0) { + sound_start1 (ST_ANY, BONUS_SHORT); + dmd_alloc_low_clean (); + score_zero (ca_bonus_scored); + score_add (ca_bonus_scored, score_table[SC_100K]); + score_mul (ca_bonus_scored, car_crash_shots_made); + score_add (ca_total_bonus, ca_bonus_scored); + + sprintf_score (ca_bonus_scored); + font_render_string_center (&font_fixed10, DMD_MIDDLE_X, DMD_BIG_CY_Cent, sprintf_buffer); + sprintf ("CAR CRASH"); + font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_SMALL_CY_1, sprintf_buffer); + dmd_sched_transition (&trans_scroll_down); + dmd_show_low (); + task_sleep_sec (1); + }/***end of car crash scoring and display ***/ + + /** + * *car chase scoring and display * + * **/ + if (car_chase_modes_achieved > 0) { + sound_start1 (ST_ANY, BONUS_SHORT); + dmd_alloc_low_clean (); + score_zero (ca_bonus_scored); + score_add (ca_bonus_scored, score_table[SC_100K]); + score_mul (ca_bonus_scored, car_chase_mode_shots_made); + score_add (ca_total_bonus, ca_bonus_scored); + + score_zero (ca_bonus_scored); + score_add (ca_bonus_scored, score_table[SC_1M]); + score_mul (ca_bonus_scored, car_chase_modes_achieved); + score_add (ca_total_bonus, ca_bonus_scored); + + sprintf_score (ca_bonus_scored); + font_render_string_center (&font_fixed10, DMD_MIDDLE_X, DMD_BIG_CY_Cent, sprintf_buffer); + sprintf ("CAR CHASE"); + font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_SMALL_CY_1, sprintf_buffer); + dmd_sched_transition (&trans_scroll_down); + dmd_show_low (); + task_sleep_sec (1); + }/***end of car chase scoring and display ***/ + + /** + * *capture_simon scoring and display * + * **/ + if (capture_simon_modes_achieved > 0) { + sound_start1 (ST_ANY, BONUS_SHORT); + dmd_alloc_low_clean (); + score_zero (ca_bonus_scored); + score_add (ca_bonus_scored, score_table[SC_100K]); + score_mul (ca_bonus_scored, capture_simon_mode_shots_made); + score_add (ca_total_bonus, ca_bonus_scored); + + score_zero (ca_bonus_scored); + score_add (ca_bonus_scored, score_table[SC_1M]); + score_mul (ca_bonus_scored, capture_simon_modes_achieved); + score_add (ca_total_bonus, ca_bonus_scored); + + score_zero (ca_bonus_scored); + score_add (ca_bonus_scored, score_table[SC_5M]); + score_mul (ca_bonus_scored, capture_simon_modes_completed); + score_add (ca_total_bonus, ca_bonus_scored); + + sprintf_score (ca_bonus_scored); + font_render_string_center (&font_fixed10, DMD_MIDDLE_X, DMD_BIG_CY_Cent, sprintf_buffer); + sprintf ("CAPTURE SIMON"); + font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_SMALL_CY_1, sprintf_buffer); + dmd_sched_transition (&trans_scroll_down); + dmd_show_low (); + task_sleep_sec (1); + }/***end of capture_simon scoring and display ***/ + + /** + * *prison_break scoring and display * + * **/ + if (prison_break_modes_achieved > 0) { + sound_start1 (ST_ANY, BONUS_SHORT); + dmd_alloc_low_clean (); + score_zero (ca_bonus_scored); + score_add (ca_bonus_scored, score_table[SC_100K]); + score_mul (ca_bonus_scored, prison_break_mode_shots_made); + score_add (ca_total_bonus, ca_bonus_scored); + + score_zero (ca_bonus_scored); + score_add (ca_bonus_scored, score_table[SC_1M]); + score_mul (ca_bonus_scored, prison_break_modes_achieved); + score_add (ca_total_bonus, ca_bonus_scored); + + sprintf_score (ca_bonus_scored); + font_render_string_center (&font_fixed10, DMD_MIDDLE_X, DMD_BIG_CY_Cent, sprintf_buffer); + sprintf ("BREAKOUT"); + font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_SMALL_CY_1, sprintf_buffer); + dmd_sched_transition (&trans_scroll_down); + dmd_show_low (); + task_sleep_sec (1); + }/***end of prison_break scoring and display ***/ + + /** + * *acmag scoring and display * + * **/ + if (acmag_modes_achieved > 0) { + sound_start1 (ST_ANY, BONUS_SHORT); + dmd_alloc_low_clean (); + score_zero (ca_bonus_scored); + score_add (ca_bonus_scored, score_table[SC_100K]); + score_mul (ca_bonus_scored, acmag_mode_shots_made); + score_add (ca_total_bonus, ca_bonus_scored); + + score_zero (ca_bonus_scored); + score_add (ca_bonus_scored, score_table[SC_1M]); + score_mul (ca_bonus_scored, acmag_modes_achieved); + score_add (ca_total_bonus, ca_bonus_scored); + + sprintf_score (ca_bonus_scored); + font_render_string_center (&font_fixed10, DMD_MIDDLE_X, DMD_BIG_CY_Cent, sprintf_buffer); + sprintf ("ACMAG"); + font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_SMALL_CY_1, sprintf_buffer); + dmd_sched_transition (&trans_scroll_down); + dmd_show_low (); + task_sleep_sec (1); + }/***end of acmag scoring and display ***/ + + /** + * *explode scoring and display * + * **/ + if (explode_mode_shots_made > 0) { + sound_start1 (ST_ANY, BONUS_SHORT); + dmd_alloc_low_clean (); + score_zero (ca_bonus_scored); + score_add (ca_bonus_scored, score_table[SC_100K]); + score_mul (ca_bonus_scored, explode_mode_shots_made); + score_add (ca_bonus_scored, score_table[SC_1M]); + score_add (ca_total_bonus, ca_bonus_scored); + + sprintf_score (ca_bonus_scored); + font_render_string_center (&font_fixed10, DMD_MIDDLE_X, DMD_BIG_CY_Cent, sprintf_buffer); + sprintf ("EXPLODE"); + font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_SMALL_CY_1, sprintf_buffer); + dmd_sched_transition (&trans_scroll_down); + dmd_show_low (); + task_sleep_sec (1); + }/***end of explode scoring and display ***/ + + /** + * *superjets scoring and display * + * **/ + if (superjets_modes_achieved > 0) { + sound_start1 (ST_ANY, BONUS_SHORT); + dmd_alloc_low_clean (); + score_zero (ca_bonus_scored); + score_add (ca_bonus_scored, score_table[SC_100K]); + score_mul (ca_bonus_scored, superjets_mode_shots_made); + score_add (ca_total_bonus, ca_bonus_scored); + + score_zero (ca_bonus_scored); + score_add (ca_bonus_scored, score_table[SC_1M]); + score_mul (ca_bonus_scored, superjets_modes_achieved); + score_add (ca_total_bonus, ca_bonus_scored); + + sprintf_score (ca_bonus_scored); + font_render_string_center (&font_fixed10, DMD_MIDDLE_X, DMD_BIG_CY_Cent, sprintf_buffer); + sprintf ("SUPERJETS"); + font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_SMALL_CY_1, sprintf_buffer); + dmd_sched_transition (&trans_scroll_down); + dmd_show_low (); + task_sleep_sec (1); + }/***end of superjets scoring and display ***/ + + /** + * *standupFrenzy scoring and display * + * **/ + if (standupFrenzy_modes_achieved > 0) { + sound_start1 (ST_ANY, BONUS_SHORT); + dmd_alloc_low_clean (); + score_zero (ca_bonus_scored); + score_add (ca_bonus_scored, score_table[SC_100K]); + score_mul (ca_bonus_scored, standupFrenzyNumHits); + score_add (ca_total_bonus, ca_bonus_scored); + + score_zero (ca_bonus_scored); + score_add (ca_bonus_scored, score_table[SC_1M]); + score_mul (ca_bonus_scored, standupFrenzy_modes_achieved); + score_add (ca_total_bonus, ca_bonus_scored); + + sprintf_score (ca_bonus_scored); + font_render_string_center (&font_fixed10, DMD_MIDDLE_X, DMD_BIG_CY_Cent, sprintf_buffer); + sprintf ("FRENZY"); + font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_SMALL_CY_1, sprintf_buffer); + dmd_sched_transition (&trans_scroll_down); + dmd_show_low (); + task_sleep_sec (1); + }/***end of standupFrenzy scoring and display ***/ + + /** + * *fortress scoring and display * + * **/ + if (fortress_jackpot_shots_made > 0) { + sound_start1 (ST_ANY, BONUS_SHORT); + dmd_alloc_low_clean (); + score_zero (ca_bonus_scored); + score_add (ca_bonus_scored, score_table[SC_100K]); + score_mul (ca_bonus_scored, fortress_jackpot_shots_made); + score_add (ca_total_bonus, ca_bonus_scored); + + sprintf_score (ca_bonus_scored); + font_render_string_center (&font_fixed10, DMD_MIDDLE_X, DMD_BIG_CY_Cent, sprintf_buffer); + sprintf ("FORTRESS"); + font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_SMALL_CY_1, sprintf_buffer); + dmd_sched_transition (&trans_scroll_down); + dmd_show_low (); + task_sleep_sec (1); + }/***end of fortress scoring and display ***/ + + /** + * *wasteland scoring and display * + * **/ + if (wasteland_jackpot_shots_made > 0) { + sound_start1 (ST_ANY, BONUS_SHORT); + dmd_alloc_low_clean (); + score_zero (ca_bonus_scored); + score_add (ca_bonus_scored, score_table[SC_100K]); + score_mul (ca_bonus_scored, wasteland_jackpot_shots_made); + score_add (ca_total_bonus, ca_bonus_scored); + + sprintf_score (ca_bonus_scored); + font_render_string_center (&font_fixed10, DMD_MIDDLE_X, DMD_BIG_CY_Cent, sprintf_buffer); + sprintf ("WASTELAND"); + font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_SMALL_CY_1, sprintf_buffer); + dmd_sched_transition (&trans_scroll_down); + dmd_show_low (); + task_sleep_sec (1); + }/***end of wasteland_ scoring and display ***/ + + /** + * *cryoprison scoring and display * + * **/ + if (cryoprison_jackpot_shots_made > 0) { + sound_start1 (ST_ANY, BONUS_SHORT); + dmd_alloc_low_clean (); + score_zero (ca_bonus_scored); + score_add (ca_bonus_scored, score_table[SC_100K]); + score_mul (ca_bonus_scored, cryoprison_jackpot_shots_made); + score_add (ca_total_bonus, ca_bonus_scored); + + sprintf_score (ca_bonus_scored); + font_render_string_center (&font_fixed10, DMD_MIDDLE_X, DMD_BIG_CY_Cent, sprintf_buffer); + sprintf ("CRYOPRISON"); + font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_SMALL_CY_1, sprintf_buffer); + dmd_sched_transition (&trans_scroll_down); + dmd_show_low (); + task_sleep_sec (1); + }/***end of cryoprison_ scoring and display ***/ + + /** + * *demotime scoring and display * + * **/ + if (demotime_jackpot_shots_made > 0) { + sound_start1 (ST_ANY, BONUS_SHORT); + dmd_alloc_low_clean (); + score_zero (ca_bonus_scored); + score_add (ca_bonus_scored, score_table[SC_100K]); + score_mul (ca_bonus_scored, demotime_jackpot_shots_made); + score_add (ca_total_bonus, ca_bonus_scored); + + sprintf_score (ca_bonus_scored); + font_render_string_center (&font_fixed10, DMD_MIDDLE_X, DMD_BIG_CY_Cent, sprintf_buffer); + sprintf ("DEMOLITION TIME"); + font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_SMALL_CY_1, sprintf_buffer); + dmd_sched_transition (&trans_scroll_down); + dmd_show_low (); + task_sleep_sec (1); + }/***end of demotime_ scoring and display ***/ + + /** + * *huxley scoring and display * + * **/ + if (huxley_mode_shots_made > 0) { + sound_start1 (ST_ANY, BONUS_SHORT); + dmd_alloc_low_clean (); + score_zero (ca_bonus_scored); + score_add (ca_bonus_scored, score_table[SC_100K]); + score_mul (ca_bonus_scored, huxley_mode_shots_made); + score_add (ca_total_bonus, ca_bonus_scored); + + sprintf_score (ca_bonus_scored); + font_render_string_center (&font_fixed10, DMD_MIDDLE_X, DMD_BIG_CY_Cent, sprintf_buffer); + sprintf ("HUXLEY"); + font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_SMALL_CY_1, sprintf_buffer); + dmd_sched_transition (&trans_scroll_down); + dmd_show_low (); + task_sleep_sec (1); + }/***end of huxley scoring and display ***/ + + /** + * *back_in_the_fridge scoring and display * + * **/ + if (back_in_the_fridge_shots_made > 0) { + sound_start1 (ST_ANY, BONUS_SHORT); + dmd_alloc_low_clean (); + score_zero (ca_bonus_scored); + score_add (ca_bonus_scored, score_table[SC_100K]); + score_mul (ca_bonus_scored, back_in_the_fridge_shots_made); + score_add (ca_total_bonus, ca_bonus_scored); + + sprintf_score (ca_bonus_scored); + font_render_string_center (&font_fixed10, DMD_MIDDLE_X, DMD_BIG_CY_Cent, sprintf_buffer); + sprintf ("FRIDGE"); + font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_SMALL_CY_1, sprintf_buffer); + dmd_sched_transition (&trans_scroll_down); + dmd_show_low (); + task_sleep_sec (1); + }/***end of back_in_the_fridge scoring and display ***/ + + /* Show final score */ + sound_start1 (ST_ANY, BONUS_LONG); + + score_long (ca_total_bonus); // Add to total bonus to player score + dmd_alloc_low_clean (); + scores_draw (); + dmd_sched_transition (&trans_scroll_up); + dmd_show_low (); + task_sleep_sec (1); + in_bonus = FALSE; + break; + +//TRIPLE CAR CRASH + case 1 : + dmd_draw_thin_border (dmd_low_buffer); + sound_start(ST_SPEECH, SPCH_TRIPLE_CAR_CRASH, SL_4S, PRI_GAME_QUICK5); + sprintf ("TRIPLE"); + font_render_string_center (&font_steel, DMD_MIDDLE_X, DMD_BIG_CY_Top, sprintf_buffer); + sprintf ("CAR CRASH"); + font_render_string_center (&font_steel, DMD_MIDDLE_X, DMD_BIG_CY_Bot, sprintf_buffer); + dmd_show_low (); + comp_award_trip_car_crash(); + task_sleep_sec (1); + lamp_tristate_flash (LM_CAR_CRASH_TOP); + lamp_tristate_flash (LM_CAR_CRASH_CENTER); + lamp_tristate_flash (LM_CAR_CRASH_BOTTOM); + for (i = 0; i < 3; i++) { + sound_start (ST_EFFECT, ZAPP_3_SHORT, SL_2S, PRI_GAME_QUICK2); + flasher_pulse (FLASH_CAR_CHASE_LOWER_FLASHER); + flasher_pulse (FLASH_CAR_CHASE_CENTER_FLASHER); + flasher_pulse (FLASH_CAR_CHASE_UPPER_FLASHER); + task_sleep (TIME_300MS); + } + for (i = 0; i < 3; i++) { + sound_start (ST_EFFECT, ZAPP_3_MED, SL_2S, PRI_GAME_QUICK2); + flasher_pulse (FLASH_CAR_CHASE_LOWER_FLASHER); + flasher_pulse (FLASH_CAR_CHASE_CENTER_FLASHER); + flasher_pulse (FLASH_CAR_CHASE_UPPER_FLASHER); + task_sleep (TIME_500MS); + } + task_sleep_sec (1); + sound_start (ST_EFFECT, ZAPP_3_LONG, SL_2S, PRI_GAME_QUICK2); + restore_carcrash_lights_state(); + task_sleep_sec (1); + break; +//COLLECT STANDUPS + case 2 : + dmd_draw_thin_border (dmd_low_buffer); + sound_start(ST_SPEECH, SPCH_COLLECT_STANDUPS, SL_4S, PRI_GAME_QUICK5); + sprintf ("COLLECT"); + font_render_string_center (&font_steel, DMD_MIDDLE_X, DMD_BIG_CY_Top, sprintf_buffer); + sprintf ("STANDUPS"); + font_render_string_center (&font_steel, DMD_MIDDLE_X, DMD_BIG_CY_Bot, sprintf_buffer); + dmd_show_low (); + task_sleep_sec (2); + /////////////////////collectstandups deff + U8 collect_standups_counter = 0; + U8 digit_counter = 0; + for (collect_standups_counter = 0; collect_standups_counter <= standup_num_of_hits; collect_standups_counter++) { + score (SC_500K); + + dmd_alloc_pair (); + dmd_clean_page_low (); + +// sprintf ("%d", standup_num_of_hits - collect_standups_counter); + if (collect_standups_counter == 0) sprintf ("500 THOUSAND"); + else if (collect_standups_counter %2 == 1) { digit_counter++; sprintf ("%d MILLION", digit_counter); } + else if (collect_standups_counter %2 == 0) { sprintf ("%d.5 MILLION", digit_counter); } + + font_render_string_center(&font_fireball, DMD_MIDDLE_X, DMD_MIDDLE_Y, sprintf_buffer); + dmd_copy_low_to_high (); + dmd_show_low (); + dmd_invert_page (dmd_low_buffer); + deff_swap_low_high (1, TIME_100MS); + + + if (collect_standups_counter < 3 ) { + sound_start (ST_EFFECT, ZAPP_3_LONG, SL_2S, PRI_GAME_QUICK2); + task_sleep (TIME_500MS); + task_sleep (TIME_250MS); + } else if (collect_standups_counter < 6) { + sound_start (ST_EFFECT, ZAPP_3_MED, SL_2S, PRI_GAME_QUICK3); + task_sleep (TIME_500MS); + } else { + sound_start (ST_EFFECT, ZAPP_3_SHORT, SL_2S, PRI_GAME_QUICK5); + task_sleep (TIME_300MS); + } + }//end of loop + task_sleep_sec (1); + break; +//LIGHT ARROWS + case 3 : + dmd_draw_thin_border (dmd_low_buffer); + sound_start(ST_SPEECH, SPCH_LIGHT_ARROWS, SL_4S, PRI_GAME_QUICK5); + sprintf ("LIGHT"); + font_render_string_center (&font_steel, DMD_MIDDLE_X, DMD_BIG_CY_Top, sprintf_buffer); + sprintf ("ARROWS"); + font_render_string_center (&font_steel, DMD_MIDDLE_X, DMD_BIG_CY_Bot, sprintf_buffer); + dmd_show_low (); + task_sleep_sec (1); + + lamp_tristate_flash (LM_SIDE_RAMP_ARROW); + lamp_tristate_flash (LM_LEFT_RAMP_ARROW); + lamp_tristate_flash (LM_RIGHT_RAMP_ARROW); + lamp_tristate_flash (LM_UNDERGROUND_ARROW); + lamp_tristate_flash (LM_CENTER_RAMP_ARROW); + lamp_tristate_flash (LM_LEFT_LOOP_ARROW); + lamp_tristate_flash (LM_RIGHT_LOOP_ARROW); + + for (i = 0; i < 3; i++) { + sound_start (ST_EFFECT, ZAPP_3_SHORT, SL_2S, PRI_GAME_QUICK2); + task_sleep (TIME_300MS); + } + for (i = 0; i < 2; i++) { + sound_start (ST_EFFECT, ZAPP_3_MED, SL_2S, PRI_GAME_QUICK2); + task_sleep (TIME_500MS); + } + for (i = 0; i < 2; i++) { + sound_start (ST_EFFECT, ZAPP_3_LONG, SL_2S, PRI_GAME_QUICK2); + task_sleep (TIME_500MS); + } + + comp_award_light_arrows(); // combos.c + task_sleep_sec (1); + break; +//LIGHT EXTRA BALL + case 4 : + dmd_draw_thin_border (dmd_low_buffer); + sound_start(ST_SPEECH, SPCH_LIGHT_EXTRA_BALL, SL_4S, PRI_GAME_QUICK5); + sprintf ("LIGHT"); + font_render_string_center (&font_steel, DMD_MIDDLE_X, DMD_BIG_CY_Top, sprintf_buffer); + sprintf ("EXTRA BALL"); + font_render_string_center (&font_steel, DMD_MIDDLE_X, DMD_BIG_CY_Bot, sprintf_buffer); + dmd_show_low (); + + flasher_pulse (FLASH_ELEVATOR_1_FLASHER); + task_sleep (TIME_33MS); + flasher_pulse (FLASH_ELEVATOR_2_FLASHER); + task_sleep (TIME_33MS); + flasher_pulse (FLASH_CLAW_FLASHER); + sound_start (ST_EFFECT, ZAPP_3_SHORT, SL_2S, PRI_GAME_QUICK2); + task_sleep (TIME_100MS); + + flasher_pulse (FLASH_CLAW_FLASHER); + task_sleep (TIME_33MS); + flasher_pulse (FLASH_ELEVATOR_2_FLASHER); + task_sleep (TIME_33MS); + flasher_pulse (FLASH_ELEVATOR_1_FLASHER); + sound_start (ST_EFFECT, ZAPP_3_SHORT, SL_2S, PRI_GAME_QUICK2); + task_sleep (TIME_100MS); + + flasher_pulse (FLASH_ELEVATOR_1_FLASHER); + task_sleep (TIME_33MS); + flasher_pulse (FLASH_CLAW_FLASHER); + task_sleep (TIME_33MS); + flasher_pulse (FLASH_ELEVATOR_2_FLASHER); + sound_start (ST_EFFECT, ZAPP_3_MED, SL_2S, PRI_GAME_QUICK2); + task_sleep (TIME_100MS); + + for (i = 0; i < 6; i++) { + flasher_pulse (FLASH_LEFT_RAMP_UP_FLASHER); + task_sleep (TIME_33MS); + flasher_pulse (FLASH_DIVERTER_FLASHER); + task_sleep (TIME_33MS); + flasher_pulse (FLASH_RIGHT_RAMP_UP_FLASHER); + sound_start (ST_EFFECT, ZAPP_3_MED, SL_2S, PRI_GAME_QUICK2); + task_sleep (TIME_100MS); + } + + start_extraball(); + task_sleep_sec (1); + break; +//MAXIMIZE FREEZES + case 5 : + dmd_draw_thin_border (dmd_low_buffer); + sound_start(ST_SPEECH, SPCH_MAXIMIZE_FREEZES, SL_4S, PRI_GAME_QUICK5); + sprintf ("MAXIMIZE"); + font_render_string_center (&font_steel, DMD_MIDDLE_X, DMD_BIG_CY_Top, sprintf_buffer); + sprintf ("FREEZES"); + font_render_string_center (&font_steel, DMD_MIDDLE_X, DMD_BIG_CY_Bot, sprintf_buffer); + dmd_show_low (); + + lamp_tristate_flash (LM_FREEZE_1); + lamp_tristate_flash (LM_FREEZE_2); + lamp_tristate_flash (LM_FREEZE_3); + lamp_tristate_flash (LM_FREEZE_4); + + for (i = 0; i < 3; i++) { + sound_start (ST_EFFECT, ZAPP_3_SHORT, SL_2S, PRI_GAME_QUICK2); + task_sleep (TIME_300MS); + } + sound_start (ST_EFFECT, ZAPP_3_MED, SL_2S, PRI_GAME_QUICK2); + task_sleep (TIME_500MS); + sound_start (ST_EFFECT, ZAPP_3_MED, SL_2S, PRI_GAME_QUICK2); + task_sleep (TIME_500MS); + + sound_start (ST_EFFECT, ZAPP_3_LONG, SL_2S, PRI_GAME_QUICK2); + task_sleep (TIME_500MS); + sound_start (ST_EFFECT, ZAPP_3_LONG, SL_2S, PRI_GAME_QUICK2); + task_sleep (TIME_500MS); + + maximize_freeze(); + task_sleep_sec (1); + break; +//DOUBLE RETINA SCAN + case 6 : + dmd_draw_thin_border (dmd_low_buffer); + sound_start(ST_SPEECH, SPCH_DOUBLE_RETINA_SCAN, SL_4S, PRI_GAME_QUICK5); + sprintf ("DOUBLE"); + font_render_string_center (&font_steel, DMD_MIDDLE_X, DMD_BIG_CY_Top, sprintf_buffer); + sprintf ("RETINA SCAN"); + font_render_string_center (&font_steel, DMD_MIDDLE_X, DMD_BIG_CY_Bot, sprintf_buffer); + dmd_show_low (); + + lamp_tristate_flash(LM_RETINA_SCAN); + for (i = 0; i < 3; i++) { + flasher_pulse (FLASH_EJECT_FLASHER); + flasher_pulse (FLASH_EYEBALL_FLASHER); + flasher_pulse (FLASH_EJECT_FLASHER); + flasher_pulse (FLASH_EYEBALL_FLASHER); + sound_start (ST_EFFECT, ZAPP_3_SHORT, SL_2S, PRI_GAME_QUICK2); + task_sleep (TIME_300MS); + } + for (i = 0; i < 4; i++) { + flasher_pulse (FLASH_EJECT_FLASHER); + flasher_pulse (FLASH_EYEBALL_FLASHER); + flasher_pulse (FLASH_EJECT_FLASHER); + flasher_pulse (FLASH_EYEBALL_FLASHER); + sound_start (ST_EFFECT, ZAPP_3_MED, SL_2S, PRI_GAME_QUICK2); + task_sleep (TIME_500MS); + } + comp_award_doub_retina(); + lamp_tristate_off(LM_RETINA_SCAN); + task_sleep_sec (1); + break; + //BIG POINTS + case 7 : + score (SC_10M); + dmd_draw_thin_border (dmd_low_buffer); + sprintf ("BIG POINTS"); + font_render_string_center (&font_steel, DMD_MIDDLE_X, DMD_BIG_CY_Top, sprintf_buffer); + sprintf ("10 MILLION"); + font_render_string_center (&font_steel, DMD_MIDDLE_X, DMD_BIG_CY_Bot, sprintf_buffer); + dmd_show_low (); + + for (i = 0; i < 5; i++) { + flasher_pulse (FLASH_LEFT_RAMP_UP_FLASHER); + task_sleep (TIME_33MS); + flasher_pulse (FLASH_DIVERTER_FLASHER); + task_sleep (TIME_33MS); + flasher_pulse (FLASH_RIGHT_RAMP_UP_FLASHER); + sound_start (ST_EFFECT, ZAPP_3_MED, SL_2S, PRI_GAME_QUICK2); + task_sleep (TIME_100MS); + } + + task_sleep (TIME_500MS); + break; + //CAR CHASE + case 8 : + dmd_draw_thin_border (dmd_low_buffer); + sprintf ("START"); + font_render_string_center (&font_steel, DMD_MIDDLE_X, DMD_BIG_CY_Top, sprintf_buffer); + sprintf ("CAR CHASE"); + font_render_string_center (&font_steel, DMD_MIDDLE_X, DMD_BIG_CY_Bot, sprintf_buffer); + dmd_show_low (); + task_sleep_sec (1); + start_car_chase(); //at car_chase_mode.c + break; + //EXPLODE + case 9 : + dmd_draw_thin_border (dmd_low_buffer); + sprintf ("START"); + font_render_string_center (&font_steel, DMD_MIDDLE_X, DMD_BIG_CY_Top, sprintf_buffer); + sprintf ("EXPLODE"); + font_render_string_center (&font_steel, DMD_MIDDLE_X, DMD_BIG_CY_Bot, sprintf_buffer); + dmd_show_low (); + task_sleep_sec (1); + start_explode();//start explode mode + break; + }//end of switch + task_sleep(TIME_500MS); + + ////////////////////////////////////////////////////////////////////// + dmd_alloc_pair_clean ();// Clean both pages + dmd_draw_thin_border (dmd_low_buffer); + sprintf ("NEXT AWARD"); + font_render_string_center (&font_steel, DMD_MIDDLE_X, DMD_BIG_CY_Top, sprintf_buffer); + + switch (nextcomputerAwardsChooser) { + case 0 : font_render_string_center (&font_steel, DMD_MIDDLE_X, DMD_BIG_CY_Bot, "BONUS"); break; + case 1 : font_render_string_center (&font_steel, DMD_MIDDLE_X, DMD_BIG_CY_Bot, "3X CRASH"); break; + case 2 : font_render_string_center (&font_steel, DMD_MIDDLE_X, DMD_BIG_CY_Bot, "STANDUPS"); break; + case 3 : font_render_string_center (&font_steel, DMD_MIDDLE_X, DMD_BIG_CY_Bot, "ARROWS"); break; + case 4 : font_render_string_center (&font_steel, DMD_MIDDLE_X, DMD_BIG_CY_Bot, "EXTRA BALL"); break; + case 5 : font_render_string_center (&font_steel, DMD_MIDDLE_X, DMD_BIG_CY_Bot, "MAX FREEZES"); break; + case 6 : font_render_string_center (&font_steel, DMD_MIDDLE_X, DMD_BIG_CY_Bot, "2X RETINA SCAN"); break; + case 7 : font_render_string_center (&font_steel, DMD_MIDDLE_X, DMD_BIG_CY_Bot, "BIG POINTS"); break; + case 8 : font_render_string_center (&font_steel, DMD_MIDDLE_X, DMD_BIG_CY_Bot, "CAR CHASE"); break; + case 9 : font_render_string_center (&font_steel, DMD_MIDDLE_X, DMD_BIG_CY_Bot, "EXPLODE"); break; + }//end of switch + dmd_show_low (); + task_sleep(TIME_1S); + + computer_light_off(); //turns off flag here also + combo_rehit_check (); //check to see if enough combos for next computer award + ball_search_monitor_start (); + computer_award_just_awarded = TRUE; + deff_exit (); +}//end of function + + + + + +#define MAX_SQUARE 24 +#define MAX_STATE_SQUARE 5 + +struct square_state { + U8 state; + U8 x; + U8 y; +} square_states[MAX_SQUARE]; + + + +/* + * The format of the image data is the same as for a font glyph: +the first byte is its bit-width, the second byte is its +bit-height, and the remaining bytes are the image data, going +from left to right, top to bottom. + *font_byte_width = (font_width + 7) >> 3 + */ +static const U8 open_square_bitmaps1[] = {//open, big hole in middle + 8, 8, + 0xFF, 0X81, 0X81, 0X81, + 0X81, 0X81, 0X81, 0xFF, + +}; + +static const U8 open_square_bitmaps2[] = {//open, small hole in middle + 8, 8, + 0xFF, 0XFF, 0XC3, 0XC3, + 0XC3, 0XC3, 0XFF, 0xFF, +}; + +static const U8 closed_square_bitmaps[] = {//solid square + 8, 8, + 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, +}; + +static const U8 closed_square_bitmaps2[] = {//small solid square + 8, 8, + 0x00, 0x00, 0x3C, 0x3C, + 0x3C, 0x3C, 0x00, 0x00, +}; + +static const U8 closed_square_bitmaps3[] = {//tiny solid square + 8, 8, + 0x00, 0x00, 0x18, 0x18, + 0x18, 0x18, 0x00, 0x00, +}; + +void square_init (void) { + U8 TEMPX = 6; + U8 TEMPY = 0; + U8 n; + for (n = 0; n < 24; n++) { + struct square_state *s = &square_states[n]; + if (n % 12 == 0) { + TEMPX = 6; + TEMPY += 9; + } + s->x = TEMPX; // from 14 to 114 --total size is 128 + s->y = TEMPY; + TEMPX += 10; + s->state = random_scaled (12); // 0 to n-1 + } +}//end of function + + + +void square_draw (U8 sq) { + struct square_state *s = &square_states[sq]; +// s->state = 1; // 0 to n-1 + s->state = random_scaled (12); // 0 to n-1 + switch (s->state) { + case 0: + bitmap_blit (open_square_bitmaps1, s->x, s->y); //open square - light + break; + case 1: + bitmap_blit (open_square_bitmaps1, s->x, s->y); //open square - dark + dmd_flip_low_high(); + bitmap_blit (open_square_bitmaps1, s->x, s->y); + dmd_flip_low_high(); + break; + case 2: + bitmap_blit (open_square_bitmaps2, s->x, s->y); //open small square - light + break; + case 3: + bitmap_blit (open_square_bitmaps2, s->x, s->y); //open small square - dark + dmd_flip_low_high(); + bitmap_blit (open_square_bitmaps2, s->x, s->y); + dmd_flip_low_high(); + break; + case 4: + bitmap_blit (closed_square_bitmaps, s->x, s->y); //closed square, light + break; + case 5: + bitmap_blit (closed_square_bitmaps, s->x, s->y); //closed square, dark + dmd_flip_low_high(); + bitmap_blit (closed_square_bitmaps, s->x, s->y); + dmd_flip_low_high(); + break; + case 6: + bitmap_blit (closed_square_bitmaps2, s->x, s->y); //closed small square, light + break; + case 7: + bitmap_blit (closed_square_bitmaps2, s->x, s->y); //closed small square, dark + dmd_flip_low_high(); + bitmap_blit (closed_square_bitmaps2, s->x, s->y); + dmd_flip_low_high(); + break; + case 8: + bitmap_blit (open_square_bitmaps1, s->x, s->y); //dark in middle, light outside + dmd_flip_low_high(); //slightly tilted to left + bitmap_blit (closed_square_bitmaps2, s->x, s->y); + dmd_flip_low_high(); + break; + case 9: + bitmap_blit (closed_square_bitmaps2, s->x, s->y); //light in middle, dark outside + dmd_flip_low_high(); //slightly tilted to left + bitmap_blit (open_square_bitmaps1, s->x, s->y); + dmd_flip_low_high(); + break; + case 10: + bitmap_blit (open_square_bitmaps1, s->x, s->y); //dark in middle, light outside + dmd_flip_low_high(); //slightly tilted to left + bitmap_blit (closed_square_bitmaps3, s->x, s->y); + dmd_flip_low_high(); + break; + case 11: + bitmap_blit (closed_square_bitmaps3, s->x, s->y); //light in middle, dark outside + dmd_flip_low_high(); //slightly tilted to left + bitmap_blit (open_square_bitmaps1, s->x, s->y); + dmd_flip_low_high(); + break; + default: + bitmap_blit (closed_square_bitmaps2, s->x, s->y); + break; + } +// bitmap_blit2 (square_bitmaps + s->state * 5, s->x, s->y);//bitmap_erase_asm (...); +}//end of function + + + +void show_text_on_squares (U8 times) { + square_init(); + U8 n; + U8 z; + for (z = 0; z < times; z++) { + dmd_dup_mapped ();//allocate new space but make it a copy of what is on DMD now + dmd_overlay_onto_color ();//mono overlay onto current color page + for (n = 0; n < 24; n++) { + square_draw (n); + } + // dmd_show_low();//shows a 2 color image + dmd_show2 ();//shows a 4 color image + task_sleep (TIME_200MS); + // dmd_map_overlay ();/** Map a consecutive display page pair into windows 0 & 1 */ + dmd_alloc_pair_clean (); + } +}//END OF FUNCTION diff --git a/machine/dm/wasteland.c b/machine/dm/wasteland.c new file mode 100644 index 000000000..b95d52950 --- /dev/null +++ b/machine/dm/wasteland.c @@ -0,0 +1,655 @@ +/* + * demolition man + * wasteland.c + * + * written by James Cardona + * + * handles the lock freezes and the trigger of multiballs + * + * + * */ +/* CALLSET_SECTION (wasteland, __machine4__) */ + + +#include +#include "dm/global_constants.h" +#include //autogenerated by divhold.ct +#include "wasteland.h" + +//local variables +score_t wasteland_score; +U8 wasteland_jackpot_shots_made; +U8 wasteland_MessageCounter; +__boolean wasteland_start_music; +U8 wasteland_display_counter; +U8 WL_TOGGLE; +__boolean wasteland_ballsave; + + +//external variables +extern U8 NumBallsFrozen; //from lock_freeze_mbstart.c + +//internally called function prototypes --external found at protos.h +void wasteland_player_reset (void); + + + +/**************************************************************************** + * multiball definition structure + ***************************************************************************/ +struct mb_mode_ops wasteland_mode = { + DEFAULT_MBMODE, + //.update = , /* The update callback is invoked whenever the state of the multiball changes. */ + .music = MUS_MB, + .deff_starting = DEFF_WASTELAND_START_EFFECT, + .deff_running = DEFF_WASTELAND_EFFECT, + //.deff_ending = , +//.active_task = // default => .active_task = mb_mode_active_task, + .prio = PRI_MULTIBALL, //default => .prio = PRI_NULL, +//.grace_period = //default => .grace_period = 500ms +}; +//task_gid_t gid_running; +//task_gid_t gid_in_grace; + + + +/**************************************************************************** + * initialize and exit + ***************************************************************************/ +void wasteland_player_reset (void) { + flag_off(FLAG_IS_WASTELAND_MB_RUNNING); + score_zero(wasteland_score); + wasteland_jackpot_shots_made = 0; //these need to be zeroed in before we enter the mode so bonus doesn't fake trigger + wasteland_start_music = FALSE; +}//end of function + + + +CALLSET_ENTRY (wasteland, start_player) { wasteland_player_reset(); } + + + +/**************************************************************************** + * external event listeners + ****************************************************************************/ +CALLSET_ENTRY (wasteland, music_refresh) { +// if (wasteland_start_music) music_request (GROUND_HUMM, PRI_GAME_QUICK8); +// else mb_mode_music_refresh (&wasteland_mode); + if (flag_test(FLAG_IS_WASTELAND_MB_RUNNING)) music_request (MUS_MB, PRI_GAME_QUICK7); +}//end of function + + + +CALLSET_ENTRY (wasteland, display_update) { + if (flag_test(FLAG_IS_WASTELAND_MB_RUNNING)) + deff_start_bg (DEFF_WASTELAND_EFFECT, PRI_MULTIBALL); +}//end of function + + + +CALLSET_ENTRY (wasteland, end_ball) { + if (flag_test(FLAG_IS_WASTELAND_MB_RUNNING)) { + mb_mode_end_ball (&wasteland_mode); + jackpot_reset(); + end_super_jackpot_reminder(); + flag_off(FLAG_IS_WASTELAND_MB_RUNNING); + } +}//end of function + + + +//puts in grace period if set +CALLSET_ENTRY (wasteland, single_ball_play) { + if (flag_test(FLAG_IS_WASTELAND_MB_RUNNING)) { +// mb_mode_single_ball (&wasteland_mode); + mb_mode_end_ball (&wasteland_mode); + end_super_jackpot_reminder(); + combo_init(); + diverter_check(); + + //this acts as kind of a grace period for the jackpots + task_sleep_sec(3); + flag_off(FLAG_IS_WASTELAND_MB_RUNNING); + jackpot_reset(); + } +}//end of function + + + +//if a ball drains during the mode and with time still on the ballsave timer - send it back in play +CALLSET_BOOL_ENTRY (wasteland, ball_drain) { //thrown by device.c + if (flag_test(FLAG_IS_WASTELAND_MB_RUNNING) + && wasteland_ballsave) { + sound_start (ST_SPEECH, SPCH_AHHHGGG, SL_2S, PRI_GAME_QUICK5); + serve_ball_auto (); + return FALSE; //this is not a valid drain, don't count it + } + else return TRUE; //this is a valid drain +}//end of callset + + + + + + + + +/**************************************************************************** + * + * body + * + ***************************************************************************/ +void wasteland_ballsave_task (void) { + task_sleep_sec(15); + wasteland_ballsave = FALSE; + task_exit(); +}//end of function + + + + +void wasteland_start_sounds (void) { + U8 i; + for(i = 0; i < 6; i++) { + sound_start (ST_ANY, SIREN, SL_1S, PRI_GAME_QUICK5); + task_sleep (TIME_500MS); + } + task_exit(); +}//end of function + + + + + +void wasteland_start(U8 num) { + kill_combos(); +// wasteland_start_music = TRUE; //for to play the helicopter instead of the music + task_create_gid1 (GID_WASTELAND_START_NOISE, wasteland_start_sounds); + flag_on(FLAG_IS_WASTELAND_MB_RUNNING); + mb_mode_start(&wasteland_mode); + + score_add (wasteland_score, score_table[WASTELAND_MB_SCORE]); + score (WASTELAND_MB_SCORE); + + wasteland_display_counter = 0; + WL_TOGGLE = 0; + wasteland_ballsave = TRUE; + + multiball_started();//reset all MB start criteria for next time + deff_start (DEFF_WASTELAND_START_EFFECT); + diverter_stop();//defined in divhold2.ct + task_kill_gid (GID_CR_LIGHTS); + + //LIGHTS + lamp_tristate_flash(LM_WASTELAND_MULTIBALL); + task_sleep (TIME_2S); + lamp_tristate_on (LM_WASTELAND_MULTIBALL); + lamp_tristate_off (LM_FREEZE_1); + lamp_tristate_off (LM_FREEZE_2); + lamp_tristate_off (LM_FREEZE_3); + lamp_tristate_off (LM_FREEZE_4); + + //SOUNDS + U8 wasteland_SoundCounter; + wasteland_SoundCounter = random_scaled(2);//from kernal/random.c - pick number from 0 to 2 + if (wasteland_SoundCounter == 0) + sound_start (ST_SPEECH, SPCH_IN_THIS_CENTURY, SL_4S, PRI_GAME_QUICK5); + else + sound_start (ST_SPEECH, SPCH_FEEL_GOOD_TOO, SL_4S, PRI_GAME_QUICK5); + task_sleep (TIME_3S); + wasteland_start_music = FALSE; //for to kill the music + + //serve balls +// set_ball_count (4); + if (num >= 4) set_ball_count (5); + else set_ball_count (4); + task_create_gid1 (GID_WASTELAND_BALL_SAVE, wasteland_ballsave_task); + + task_sleep (TIME_3S); + set_all_jackpots(); //all 6 lit +}//end of function + + + +//jackpot shot +void wasteland_jackpot_made(void) { + score_add (wasteland_score, score_table[WASTELAND_JP_MB_SCORE]); + score (WASTELAND_JP_MB_SCORE); + deff_start (DEFF_WASTELAND_JACKPOT_EFFECT); + choose_multiple_random_jackpot(3); + + if (IN_TEST) { start_super_jackpot_reminder(); } + else if (wasteland_jackpot_shots_made % 5 == 0) start_super_jackpot_reminder(); +}//end of function + + + + + +void wasteland_award_super_jackpot(void) { + score_add (wasteland_score, score_table[WASTELAND_SUPER_JP_MB_SCORE]); + score (WASTELAND_SUPER_JP_MB_SCORE); + deff_start(DEFF_WASTELAND_SUPER_JACKPOT); +}//end of function + + + + + +/**************************************************************************** + * + * display effects + * + ****************************************************************************/ +void wasteland_super_jackpot_deff (void) { + sound_start (ST_SPEECH, SPCH_AHHHGGG, SL_2S, PRI_GAME_QUICK5); + dmd_alloc_pair (); + dmd_clean_page_low (); + font_render_string_center (&font_lithograph, 64, 8, "SUPER"); + font_render_string_center (&font_lithograph, 64, 24, "JACKPOT"); + dmd_copy_low_to_high (); + dmd_show_low (); + dmd_invert_page (dmd_low_buffer); + deff_swap_low_high (1, TIME_100MS); + sound_start (ST_ANY, EXPLOSION1_SHORT, SL_2S, PRI_GAME_QUICK5); + + deff_swap_low_high (6, TIME_100MS); + sound_start (ST_SPEECH, SPCH_HURRY, SL_2S, PRI_GAME_QUICK5); + + deff_swap_low_high (6, TIME_100MS); + sound_start (ST_ANY, EXPLOSION1_SHORT, SL_2S, PRI_GAME_QUICK5); + + deff_swap_low_high (6, TIME_100MS); + sound_start (ST_SPEECH, SPCH_COWS, SL_2S, PRI_GAME_QUICK5); + + deff_swap_low_high (6, TIME_100MS); + sample_start (MACHINE14_LONG, SL_1S); + task_sleep (TIME_500MS); + + speech_start (SPCH_SUPER_JACKPOT, SL_1S); + task_sleep_sec (1); + deff_exit (); +}//end of function + + + + +void wasteland_animation_display_effect (U16 start_frame, U16 end_frame){ + U16 fno; + for (fno = start_frame; fno <= end_frame; fno += 2) { + dmd_alloc_pair (); + frame_draw(fno); + dmd_show2 (); + task_sleep (TIME_100MS); + }//end of inner loop +} + + +void wasteland_frame_with_words_display_steel_effect (U16 frame, U8 x, U8 y, char *words){ + dmd_alloc_pair_clean ();// Clean both pages + dmd_map_overlay (); + dmd_clean_page_low (); + font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_SMALL_CY_1, "WASTELAND"); + font_render_string_center (&font_steel, x, y, words); + dmd_text_outline (); + dmd_alloc_pair (); + frame_draw(frame); + dmd_overlay_outline (); + dmd_show2 (); + task_sleep (TIME_100MS); +} + + + + +void wasteland_frame_bitfade_fast (U16 frame){ + dmd_sched_transition (&trans_bitfade_fast); + dmd_alloc_pair (); + frame_draw(frame); + dmd_show2 (); + task_sleep (TIME_100MS); +} + + + + + +void wasteland_start_effect_deff(void) { + U16 fno; + dmd_clean_page_high ();// + dmd_clean_page_low ();// + for (fno = IMG_WASTELAND_A1_START; fno <= IMG_WASTELAND_A1_END; fno += 2) { + dmd_alloc_pair (); + frame_draw(fno); + dmd_show2 (); + task_sleep (TIME_100MS); + }//end of inner loop + + dmd_sched_transition (&trans_bitfade_fast); + dmd_alloc_pair (); + frame_draw(IMG_WASTELAND_A2_START); + dmd_show2 (); + task_sleep (TIME_100MS); + + + for (fno = IMG_WASTELAND_A2_START; fno <= IMG_WASTELAND_A2_END; fno += 2) { + dmd_alloc_pair (); + frame_draw(fno); + dmd_show2 (); + task_sleep (TIME_100MS); + }//end of inner loop + + dmd_sched_transition (&trans_bitfade_fast); + dmd_alloc_pair (); + frame_draw(IMG_WASTELAND_A3_START); + dmd_show2 (); + task_sleep (TIME_100MS); + + + dmd_alloc_pair_clean ();// Clean both pages + for (fno = IMG_WASTELAND_A3_START; fno <= IMG_WASTELAND_A3_END; fno += 2) { + dmd_map_overlay (); + dmd_clean_page_low (); + font_render_string_center (&font_steel, DMD_MIDDLE_X + 10, DMD_BIG_CY_Bot, "WASTELAND"); + dmd_text_outline (); + dmd_alloc_pair (); + frame_draw(fno); + dmd_overlay_outline (); + dmd_show2 (); + task_sleep (TIME_100MS); + }//end of inner loop + task_sleep_sec (2); + deff_exit (); +}//end of mode_effect_deff + + + +void wasteland_jackpot_sounds_task(void) { + U8 wasteland_MessageCounter; + wasteland_MessageCounter = random_scaled(3); + if (++wasteland_jackpot_shots_made % 2 == 0) { + switch (wasteland_MessageCounter) { + case 0: sound_start (ST_SPEECH, SPCH_DOUBLE_JACKPOT_WES, SL_2S, PRI_GAME_QUICK5); break; + case 1: sound_start (ST_SPEECH, SPCH_DOUBLE_JACKPOT_SLY, SL_2S, PRI_GAME_QUICK5); break; + case 2: sound_start (ST_SPEECH, SPCH_DOUBLE, SL_2S, PRI_GAME_QUICK5); break; + }//end of switch + }//end of if + else { + switch (wasteland_MessageCounter) { + case 0: sound_start (ST_SPEECH, SPCH_AHHHGGG, SL_2S, PRI_GAME_QUICK5); break; + case 1: sound_start (ST_SPEECH, SPCH_JOHN_SCREAM, SL_2S, PRI_GAME_QUICK5); break; + case 2: sound_start (ST_SPEECH, SPCH_UHHN, SL_2S, PRI_GAME_QUICK5); break; + }//end of switch + }//end of else + task_sleep (TIME_500MS); + sound_start (ST_EFFECT, MACHINE14_SHORT, SL_1S, PRI_GAME_QUICK5); + task_sleep (TIME_200MS); + sound_start (ST_EFFECT, MACHINE14_SHORT, SL_1S, PRI_GAME_QUICK5); + task_sleep (TIME_200MS); + sound_start (ST_EFFECT, MACHINE14_SHORT, SL_1S, PRI_GAME_QUICK5); + task_sleep (TIME_200MS); + sound_start (ST_EFFECT, MACHINE14_SHORT, SL_1S, PRI_GAME_QUICK5); + task_sleep (TIME_200MS); + sound_start (ST_EFFECT, MACHINE14_LONG, SL_2S, PRI_GAME_QUICK5); + task_sleep (TIME_500MS); + task_exit(); +}//end of mode_effect_deff + + + + + +U8 wasteland_MessageCounter; +void wasteland_jackpot_effect_deff(void) { +// if (++wasteland_MessageCounter > 3) wasteland_MessageCounter = 0; + wasteland_MessageCounter = random_scaled(4); + dmd_alloc_pair_clean (); + + task_create_gid1 (GID_WASTELAND_JACKPOT_SOUND, wasteland_jackpot_sounds_task); + + switch (wasteland_MessageCounter) { + default: + case 0: + wasteland_animation_display_effect (IMG_WASTELAND_A2_START, IMG_WASTELAND_A2_END); + wasteland_frame_with_words_display_steel_effect (IMG_WASTELAND_A2_END, DMD_MIDDLE_X + 20, DMD_BIG_CY_Bot, "JACKPOT"); + break; + case 1: + wasteland_animation_display_effect (IMG_WASTELAND_A3_START, IMG_WASTELAND_A3_END); + wasteland_frame_with_words_display_steel_effect (IMG_WASTELAND_A3_END, DMD_MIDDLE_X + 20, DMD_BIG_CY_Bot, "JACKPOT"); + break; + case 2: + wasteland_animation_display_effect (IMG_WASTELAND_A1_START, IMG_WASTELAND_A1_END); + wasteland_frame_with_words_display_steel_effect (IMG_WASTELAND_A1_END, DMD_MIDDLE_X + 20, DMD_BIG_CY_Bot, "JACKPOT"); + break; + case 3: + wasteland_animation_display_effect (IMG_FLYKICK_A_START, IMG_FLYKICK_A_END); + wasteland_frame_with_words_display_steel_effect (IMG_FLYKICK_A_END, DMD_MIDDLE_X + 20, DMD_BIG_CY_Bot, "JACKPOT"); + break; + }//end of switch + task_sleep_sec (2); + deff_exit (); +}//end of mode_effect_deff + + + + + + + +void show_drips (void) { + dmd_dup_mapped ();//allocate new space but make it a copy of what is on DMD now + dmd_overlay_onto_color ();//mono overlay onto current color page + + //right side drips + switch (random_scaled(8)) { + case 0: bitmap_blit (wasteland_drip1_bits, 123, 27); break; + case 1: bitmap_blit (wasteland_drip2_bits, 124, 27); break; + case 2: bitmap_blit (wasteland_drip3_bits, 123, 27); break; + case 3: bitmap_blit (wasteland_drip4_bits, 124, 27); break; + }//end of case + + //left side drips top + switch (random_scaled(8)) { + case 3: bitmap_blit (wasteland_drip1_bits, 25, 16); break; + case 4: bitmap_blit (wasteland_drip2_bits, 25, 16); break; + case 5: bitmap_blit (wasteland_drip3_bits, 25, 16); break; + case 6: bitmap_blit (wasteland_drip4_bits, 25, 16); break; + }//end of case + + //left side drips bottom #1 + switch (random_scaled(8)) { + case 0: bitmap_blit (wasteland_drip1_bits, 17, 23); break; + case 1: bitmap_blit (wasteland_drip2_bits, 17, 23); break; + case 6: bitmap_blit (wasteland_drip3_bits, 17, 23); break; + case 7: bitmap_blit (wasteland_drip4_bits, 17, 23); break; + }//end of case + + //left side drips bottom #2 + switch (random_scaled(16)) { + case 2: bitmap_blit (wasteland_drip1_bits, 23, 24); break; + case 3: bitmap_blit (wasteland_drip2_bits, 23, 24); break; + case 4: bitmap_blit (wasteland_drip3_bits, 23, 24); break; + case 5: bitmap_blit (wasteland_drip4_bits, 23, 24); break; + }//end of case + + //right side steam #1 + switch (random_scaled(8)) { + case 0: bitmap_blit (wasteland_steam1_bits, 102, 5); break; + case 1: bitmap_blit (wasteland_steam2_bits, 103, 4); break; + case 2: bitmap_blit (wasteland_steam3_bits, 104, 5); break; + case 3: bitmap_blit (wasteland_steam4_bits, 102, 3); break; + }//end of case + + //right side steam #2 + switch (random_scaled(8)) { + case 0: bitmap_blit (wasteland_steam1_bits, 109, 5); break; + case 1: bitmap_blit (wasteland_steam2_bits, 110, 4); break; + case 2: bitmap_blit (wasteland_steam3_bits, 109, 5); break; + case 3: bitmap_blit (wasteland_steam4_bits, 110, 3); break; + }//end of case + + //right side steam #3 + switch (random_scaled(16)) { + case 0: bitmap_blit (wasteland_steam1_bits, 116, 3); break; + case 1: bitmap_blit (wasteland_steam2_bits, 115, 4); break; + case 2: bitmap_blit (wasteland_steam3_bits, 116, 2); break; + case 3: bitmap_blit (wasteland_steam4_bits, 115, 3); break; + }//end of case + + //right side steam #4 + switch (random_scaled(8)) { + case 0: bitmap_blit (wasteland_steam1_bits, 97, 5); break; + case 1: bitmap_blit (wasteland_steam2_bits, 98, 4); break; + case 2: bitmap_blit (wasteland_steam3_bits, 97, 5); break; + case 3: bitmap_blit (wasteland_steam4_bits, 98, 3); break; + }//end of case + + //right side steam #5 + switch (random_scaled(8)) { + case 0: bitmap_blit (wasteland_steam1_bits, 122, 13); break; + case 1: bitmap_blit (wasteland_steam2_bits, 121, 12); break; + case 2: bitmap_blit (wasteland_steam3_bits, 122, 12); break; + case 3: bitmap_blit (wasteland_steam4_bits, 121, 13); break; + }//end of case + + //right side steam #6 + switch (random_scaled(12)) { + case 0: bitmap_blit (wasteland_steam1_bits, 126, 9); break; + case 1: bitmap_blit (wasteland_steam2_bits, 126, 9); break; + case 2: bitmap_blit (wasteland_steam3_bits, 125, 8); break; + case 3: bitmap_blit (wasteland_steam4_bits, 125, 9); break; + }//end of case + + dmd_flip_low_high (); + + //right side drips + switch (random_scaled(8)) { + case 0: bitmap_blit (wasteland_drip1_bits, 122, 26); break; + case 1: bitmap_blit (wasteland_drip2_bits, 123, 25); break; + case 2: bitmap_blit (wasteland_drip3_bits, 124, 24); break; + case 3: bitmap_blit (wasteland_drip4_bits, 125, 26); break; + }//end of case + + //left side drips top + switch (random_scaled(8)) { + case 0: bitmap_blit (wasteland_drip1_bits, 25, 15); break; + case 1: bitmap_blit (wasteland_drip2_bits, 25, 15); break; + case 2: bitmap_blit (wasteland_drip3_bits, 25, 15); break; + case 3: bitmap_blit (wasteland_drip4_bits, 25, 15); break; + }//end of case + + //left side drips bottom #1 + switch (random_scaled(8)) { + case 0: bitmap_blit (wasteland_drip1_bits, 16, 22); break; + case 1: bitmap_blit (wasteland_drip2_bits, 17, 22); break; + case 2: bitmap_blit (wasteland_drip3_bits, 16, 22); break; + case 3: bitmap_blit (wasteland_drip4_bits, 17, 22); break; + }//end of case + + //left side drips bottom #2 + switch (random_scaled(16)) { + case 0: bitmap_blit (wasteland_drip1_bits, 22, 23); break; + case 1: bitmap_blit (wasteland_drip2_bits, 23, 23); break; + case 2: bitmap_blit (wasteland_drip3_bits, 24, 23); break; + case 3: bitmap_blit (wasteland_drip4_bits, 23, 23); break; + }//end of case + + //right side steam #1 + switch (random_scaled(8)) { + case 0: bitmap_blit (wasteland_steam1_bits, 102, 5); break; + case 1: bitmap_blit (wasteland_steam2_bits, 103, 3); break; + case 2: bitmap_blit (wasteland_steam3_bits, 102, 5); break; + case 3: bitmap_blit (wasteland_steam4_bits, 103, 4); break; + }//end of case + + //right side steam #2 + switch (random_scaled(8)) { + case 0: bitmap_blit (wasteland_steam2_bits, 109, 5); break; + case 1: bitmap_blit (wasteland_steam1_bits, 110, 4); break; + case 2: bitmap_blit (wasteland_steam4_bits, 109, 5); break; + case 3: bitmap_blit (wasteland_steam3_bits, 110, 3); break; + }//end of case + + //right side steam #3 + switch (random_scaled(16)) { + case 0: bitmap_blit (wasteland_steam2_bits, 116, 3); break; + case 1: bitmap_blit (wasteland_steam3_bits, 115, 4); break; + case 2: bitmap_blit (wasteland_steam4_bits, 116, 2); break; + case 3: bitmap_blit (wasteland_steam1_bits, 115, 3); break; + }//end of case + + //right side steam #4 + switch (random_scaled(8)) { + case 0: bitmap_blit (wasteland_steam4_bits, 97, 5); break; + case 1: bitmap_blit (wasteland_steam3_bits, 98, 4); break; + case 2: bitmap_blit (wasteland_steam2_bits, 97, 5); break; + case 3: bitmap_blit (wasteland_steam1_bits, 98, 3); break; + }//end of case + + //right side steam #5 + switch (random_scaled(8)) { + case 0: bitmap_blit (wasteland_steam2_bits, 122, 13); break; + case 1: bitmap_blit (wasteland_steam3_bits, 121, 12); break; + case 2: bitmap_blit (wasteland_steam4_bits, 122, 12); break; + case 3: bitmap_blit (wasteland_steam1_bits, 121, 13); break; + }//end of case + + //right side steam #6 + switch (random_scaled(12)) { + case 0: bitmap_blit (wasteland_steam4_bits, 126, 9); break; + case 1: bitmap_blit (wasteland_steam3_bits, 126, 9); break; + case 2: bitmap_blit (wasteland_steam2_bits, 125, 8); break; + case 3: bitmap_blit (wasteland_steam1_bits, 125, 9); break; + }//end of case + + + dmd_flip_low_high (); + + dmd_show2 ();//shows a 4 color image + task_sleep (TIME_300MS); + dmd_alloc_pair_clean (); +}//end of func + + + + + + +void wasteland_effect_deff (void) { + dmd_alloc_pair_clean(); + + for (;;) { + dmd_map_overlay (); + dmd_clean_page_high (); + dmd_clean_page_low (); + dmd_draw_thin_border (dmd_low_buffer); + + font_render_string_center (&font_steel, DMD_MIDDLE_X, DMD_BIG_CY_Top - 2, "WASTELAND"); + + sprintf_score(current_score); + font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_SMALL_CY_3, sprintf_buffer); + + if (WL_TOGGLE == 0) { sprintf ("15 MILLION"); font_render_string_center (&font_steel, DMD_MIDDLE_X, DMD_BIG_CY_Bot, sprintf_buffer); } + else if (WL_TOGGLE == 1) { sprintf ("JACKPOT LIT"); font_render_string_center (&font_steel, DMD_MIDDLE_X, DMD_BIG_CY_Bot, sprintf_buffer); } + else if (WL_TOGGLE == 2) { + sprintf ("%d JACKPOTS MADE", wasteland_jackpot_shots_made); + font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_SMALL_CY_4, sprintf_buffer); + + if (flag_test(FLAG_IS_SUPER_JACKPOT_ACTIVATED) ) sprintf ("SUPER JACKPOT LIT"); + else sprintf ("SHOOT %d TO LIGHT SUPER", 5 - (wasteland_jackpot_shots_made % 5) ); + font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_SMALL_CY_5, sprintf_buffer); + }//end of else if (WL_TOGGLE == 2) + + dmd_text_outline (); + dmd_alloc_pair (); + frame_draw(IMG_WASTELAND_RUNNING); + dmd_overlay_outline (); + dmd_show2 (); + task_sleep (TIME_200MS); + + show_drips(); + + if (++wasteland_display_counter % 10 == 0) { if (++WL_TOGGLE > 2) WL_TOGGLE = 0; } //change WL_TOGGLE once per second + }//END OF ENDLESS LOOP +}//end of function + diff --git a/machine/dm/zz_unused.c b/machine/dm/zz_unused.c new file mode 100644 index 000000000..dd6b4d83d --- /dev/null +++ b/machine/dm/zz_unused.c @@ -0,0 +1,239 @@ +/* + * demolition man + * zz_unused + * written by James Cardona + * + * This is a list of item that have not yet been implememented in the code yet + * + */ +[lamps] +86: Buy In Button, yellow, buyin, cabinet, x(33), y(18) + + +#define WATER_SPRAYER 0x68 +#define SPRAY_CAN 0x81 + + + +#define ORCHESTRA 0x0210 + +#define SPCH_TRIPLE 0x0376 +#define SPCH_CAR_CRASH_TRIPLED 0x03EE + + +end ball and match feature +#define SPCH_TWO_PRICE_ONE 0x02A9 +#define SPCH_REPLAY 0x0384 + +enter name for high scores +#define SPCH_PLAYER_ONE 0x0405 +#define SPCH_PLAYER_TWO 0x0406 +#define SPCH_PLAYER_THREE 0x0407 +#define SPCH_PLAYER_FOUR 0x0408 + + + + +/****************************************************** +VIDEO ANIMATIONS these are good and are not used - RAN OUT OF SPACE ON THE ROM +*******************************************************/ +IMG_CAPSIMON_B_START: images/capture_simon/cap_simon_1772.pgm +images/capture_simon/cap_simon_1776.pgm +images/capture_simon/cap_simon_1779.pgm +images/capture_simon/cap_simon_1784.pgm +images/capture_simon/cap_simon_1788.pgm +images/capture_simon/cap_simon_1791.pgm +images/capture_simon/cap_simon_1800.pgm +IMG_CAPSIMON_B_END: images/capture_simon/cap_simon_1803.pgm + +IMG_SIMON_A_START: images/wasteland/simon_1_80.pgm +images/wasteland/simon_1_82.pgm +images/wasteland/simon_1_84.pgm +images/wasteland/simon_1_86.pgm +images/wasteland/simon_1_88.pgm +images/wasteland/simon_1_90.pgm +images/wasteland/simon_1_92.pgm +images/wasteland/simon_1_94.pgm +images/wasteland/simon_1_96.pgm +IMG_SIMON_A_END: images/wasteland/simon_1_98.pgm + +/****************************************************** +VIDEO ANIMATIONS - KINDA GOOD BUT NOT GOING TO USE +*******************************************************/ +IMG_SHOT_DOC_B_START: machine/dm/animation/wasteland/shoot_dr_cocteau_2_1088.pgm +machine/dm/animation/wasteland/shoot_dr_cocteau_2_1091.pgm +machine/dm/animation/wasteland/shoot_dr_cocteau_2_1093.pgm +machine/dm/animation/wasteland/shoot_dr_cocteau_2_1096.pgm +machine/dm/animation/wasteland/shoot_dr_cocteau_2_1099.pgm +machine/dm/animation/wasteland/shoot_dr_cocteau_2_1102.pgm +machine/dm/animation/wasteland/shoot_dr_cocteau_2_1103.pgm +IMG_SHOT_DOC_B_END: machine/dm/animation/wasteland/shoot_dr_cocteau_2_1104.pgm + +IMG_MUSEUM_B1_START: machine/dm/animation/museum/museum_5254.pgm +machine/dm/animation/museum/museum_5259.pgm +IMG_MUSEUM_B1_END: machine/dm/animation/museum/museum_5663.pgm + + +IMG_HUXLEY_C_START: machine/dm/animation/huxley/huxley_4_211.pgm +machine/dm/animation/huxley/huxley_4_213.pgm +machine/dm/animation/huxley/huxley_4_215.pgm +machine/dm/animation/huxley/huxley_4_219.pgm +machine/dm/animation/huxley/huxley_4_221.pgm +machine/dm/animation/huxley/huxley_4_223.pgm +machine/dm/animation/huxley/huxley_4_227.pgm +machine/dm/animation/huxley/huxley_4_229.pgm +IMG_HUXLEY_C_END: machine/dm/animation/huxley/huxley_4_231.pgm + +IMG_HUXLEY_F_START: machine/dm/animation/huxley/huxley_8_872.pgm +machine/dm/animation/huxley/huxley_8_874.pgm +machine/dm/animation/huxley/huxley_8_876.pgm +machine/dm/animation/huxley/huxley_8_880.pgm +machine/dm/animation/huxley/huxley_8_884.pgm +machine/dm/animation/huxley/huxley_8_888.pgm +IMG_HUXLEY_F_END: machine/dm/animation/huxley/huxley_8_892.pgm + +IMG_CONTROLLER_START: machine/dm/animation/cryoprison/prison_break_5_30.pgm +machine/dm/animation/cryoprison/prison_break_5_34.pgm +machine/dm/animation/cryoprison/prison_break_5_36.pgm +machine/dm/animation/cryoprison/prison_break_5_38.pgm +machine/dm/animation/cryoprison/prison_break_5_42.pgm +machine/dm/animation/cryoprison/prison_break_5_46.pgm +machine/dm/animation/cryoprison/prison_break_5_48.pgm +machine/dm/animation/cryoprison/prison_break_5_50.pgm +IMG_CONTROLLER_END: machine/dm/animation/cryoprison/prison_break_5_54.pgm + +IMG_MUSEUM_B2_START: machine/dm/animation/museum/museum_6440.pgm +machine/dm/animation/museum/museum_6443.pgm +machine/dm/animation/museum/museum_6444.pgm +machine/dm/animation/museum/museum_6445.pgm +machine/dm/animation/museum/museum_6446.pgm +machine/dm/animation/museum/museum_6447.pgm +machine/dm/animation/museum/museum_6792.pgm +IMG_MUSEUM_B2_END: machine/dm/animation/museum/museum_6794.pgm + +IMG_MUSEUM_B3_START: machine/dm/animation/museum/museum_7024.pgm +machine/dm/animation/museum/museum_7025.pgm +machine/dm/animation/museum/museum_7029.pgm +IMG_MUSEUM_B3_END: machine/dm/animation/museum/museum_7030.pgm + + +IMG_FORTRESS_B_START: images/fortress/museum_a_188.pgm +images/fortress/museum_a_192.pgm +images/fortress/museum_a_196.pgm +images/fortress/museum_a_200.pgm +images/fortress/museum_a_204.pgm +images/fortress/museum_a_208.pgm +images/fortress/museum_a_212.pgm +images/fortress/museum_a_216.pgm +images/fortress/museum_a_220.pgm +images/fortress/museum_a_224.pgm +images/fortress/museum_a_228.pgm +images/fortress/museum_a_232.pgm +images/fortress/museum_a_236.pgm +images/fortress/museum_a_240.pgm +images/fortress/museum_a_244.pgm +images/fortress/museum_a_248.pgm +images/fortress/museum_a_252.pgm +images/fortress/museum_a_254.pgm +images/fortress/museum_a_341.pgm +images/fortress/museum_a_345.pgm +images/fortress/museum_a_349.pgm +IMG_FORTRESS_B_END: images/fortress/museum_a_357.pgm + +IMG_MUSEUM_C1_START: images/museum/museum_7294.pgm +images/museum/museum_7301.pgm +images/museum/museum_7306.pgm +images/museum/museum_7313.pgm +images/museum/museum_7318.pgm +IMG_MUSEUM_C1_END: images/museum/museum_7325.pgm + +IMG_SIMON_D_START: images/wasteland/simon_4_165.pgm +images/wasteland/simon_4_169.pgm +images/wasteland/simon_4_177.pgm +images/wasteland/simon_4_185.pgm +images/wasteland/simon_4_197.pgm +images/wasteland/simon_4_205.pgm +IMG_SIMON_D_END: images/wasteland/simon_4_209.pgm + +IMG_SIMON_SHOOT_START: images/wasteland/simon_4_72.pgm +images/wasteland/simon_4_75.pgm +images/wasteland/simon_4_78.pgm +images/wasteland/simon_4_79.pgm +images/wasteland/simon_4_80.pgm +images/wasteland/simon_4_81.pgm +IMG_SIMON_SHOOT_END: images/wasteland/simon_4_82.pgm + +IMG_FIGHT_B_START: images/wasteland/fight_2_02.pgm +images/wasteland/fight_2_06.pgm +images/wasteland/fight_2_10.pgm +images/wasteland/fight_2_14.pgm +images/wasteland/fight_2_18.pgm +images/wasteland/fight_2_22.pgm +images/wasteland/fight_2_26.pgm +images/wasteland/fight_2_30.pgm +images/wasteland/fight_2_34.pgm +images/wasteland/fight_2_38.pgm +images/wasteland/fight_2_42.pgm +images/wasteland/fight_2_46.pgm +images/wasteland/fight_2_50.pgm +images/wasteland/fight_2_54.pgm +images/wasteland/fight_2_58.pgm +images/wasteland/fight_2_62.pgm +images/wasteland/fight_2_66.pgm +images/wasteland/fight_2_70.pgm +images/wasteland/fight_2_74.pgm +images/wasteland/fight_2_78.pgm +images/wasteland/fight_2_82.pgm +images/wasteland/fight_2_86.pgm +images/wasteland/fight_2_90.pgm +images/wasteland/fight_2_101.pgm +images/wasteland/fight_2_103.pgm +images/wasteland/fight_2_105.pgm +images/wasteland/fight_2_107.pgm +images/wasteland/fight_2_109.pgm +IMG_FIGHT_B_END: images/wasteland/fight_2_111.pgm + +IMG_DR_COCTEAU_A_START: machine/dm/animation/side_chars/dr_cocteau_2_137.pgm +machine/dm/animation/side_chars/dr_cocteau_2_141.pgm +machine/dm/animation/side_chars/dr_cocteau_2_145.pgm +machine/dm/animation/side_chars/dr_cocteau_2_149.pgm +IMG_DR_COCTEAU_A_END: machine/dm/animation/side_chars/dr_cocteau_2_153.pgm + +IMG_SHOT_DOC_A_START: images/wasteland/shoot_dr_cocteau_1055.pgm +images/wasteland/shoot_dr_cocteau_1056.pgm +images/wasteland/shoot_dr_cocteau_1057.pgm +images/wasteland/shoot_dr_cocteau_1058.pgm +images/wasteland/shoot_dr_cocteau_1059.pgm +images/wasteland/shoot_dr_cocteau_1062.pgm +IMG_SHOT_DOC_A_END: images/wasteland/shoot_dr_cocteau_1065.pgm + +IMG_PHOENIX_A1_START: machine/dm/animation/demo_time/phoenix_441.pgm +machine/dm/animation/demo_time/phoenix_442.pgm +machine/dm/animation/demo_time/phoenix_444.pgm +machine/dm/animation/demo_time/phoenix_446.pgm +machine/dm/animation/demo_time/phoenix_447.pgm +IMG_PHOENIX_A1_END: machine/dm/animation/demo_time/phoenix_449.pgm + +IMG_CAPSIMON_C7_START: machine/dm/animation/cryoprison/cryoprison_a_1045.pgm +machine/dm/animation/cryoprison/cryoprison_a_1053.pgm +machine/dm/animation/cryoprison/cryoprison_a_1061.pgm +machine/dm/animation/cryoprison/cryoprison_a_1069.pgm +machine/dm/animation/cryoprison/cryoprison_a_1077.pgm +machine/dm/animation/cryoprison/cryoprison_a_1085.pgm +machine/dm/animation/cryoprison/cryoprison_a_1093.pgm +IMG_CAPSIMON_C7_END: machine/dm/animation/cryoprison/cryoprison_a_1101.pgm + +IMG_SPARTAN_START: machine/dm/animation/demo_time/spartan_284.pgm +machine/dm/animation/demo_time/spartan_286.pgm +machine/dm/animation/demo_time/spartan_287.pgm +machine/dm/animation/demo_time/spartan_289.pgm +machine/dm/animation/demo_time/spartan_291.pgm +machine/dm/animation/demo_time/spartan_292.pgm +machine/dm/animation/demo_time/spartan_294.pgm +machine/dm/animation/demo_time/spartan_296.pgm +machine/dm/animation/demo_time/spartan_297.pgm +machine/dm/animation/demo_time/spartan_299.pgm +machine/dm/animation/demo_time/spartan_301.pgm +machine/dm/animation/demo_time/spartan_302.pgm +IMG_SPARTAN_END: machine/dm/animation/demo_time/spartan_304.pgm + diff --git a/machine/funhouse/funhouse.md b/machine/funhouse/funhouse.md index d7eba47e5..c28ecb5f7 100644 --- a/machine/funhouse/funhouse.md +++ b/machine/funhouse/funhouse.md @@ -1,6 +1,6 @@ #-------------------------------------------------------------------------- # Machine description for Funhouse -# (C) Copyright 2007, 2009, 2010 by Brian Dominy +# (C) Copyright 2007, 2009, 2010, 2011 by Brian Dominy # # See tools/genmachine for more information about the format of this file. #-------------------------------------------------------------------------- @@ -28,8 +28,6 @@ include platform/wpc/wpc89.md #define MACHINE_SCORE_DIGITS #define MACHINE_MUSIC_GAME #define MACHINE_MUSIC_PLUNGER -#define MACHINE_DEBUGGER_HOOK -#define MACHINE_OUTHOLE_KICK_HOOK define MACHINE_BALL_SAVE_TIME 0 # Define replay values @@ -131,7 +129,7 @@ define MACHINE_HIGH_SCORES { 0x00, 0x10, 0x00, 0x00, 0x00 }, { 0x00, 0x09, 0x00, # name. Options can be given in any order: # ingame - only service the switch during a game # intest - also service the switch in test mode -# noplay - tripping this switch does NOT mark ball in play +# novalid - tripping this switch does NOT mark ball in play # standup - this is a standup # button - this is a button # edge - this switch should be serviced on either transition @@ -151,13 +149,13 @@ define MACHINE_HIGH_SCORES { 0x00, 0x10, 0x00, 0x00, 0x00 }, { 0x00, 0x09, 0x00, 11: Right Flipper, button, intest, c_decl(sw_right_button) 12: Left Flipper, button, intest, c_decl(sw_left_button) 13: Start Button, start-button, intest -14: Plumb Bob Tilt, c_decl(sw_tilt), cabinet, tilt, ingame, noplay +14: Plumb Bob Tilt, c_decl(sw_tilt), cabinet, tilt, ingame, novalid 15: Steps Frenzy 16: Upper Ramp 17: Step S, lamp(LM_STEP_S) 18: Upper Left Jet 21: Slam Tilt, slam-tilt, ingame, cabinet -23: Ticket Opto, cabinet, opto, noplay +23: Ticket Opto, cabinet, opto, novalid 25: Lock Right 26: Step Extra Ball 27: Lock Center @@ -179,27 +177,27 @@ define MACHINE_HIGH_SCORES { 0x00, 0x10, 0x00, 0x00, 0x00 }, { 0x00, 0x09, 0x00, 47: Left Plunger, edge, debounce(TIME_200MS) 48: Ramp Exit 51: Dummy Jaw, opto -52: Right Outlane, noplay +52: Right Outlane, novalid 53: Right Slingshot 54: Step T, lamp(LM_STEP_T) 55: Step Exit, opto 56: Ramp Enter -57: Jet Lane, noplay +57: Jet Lane, novalid 58: Tunnel Kickout 61: Inner Right Inlane -62: Right Plunger, shooter, edge, noplay, debounce(TIME_200MS) -63: Right Trough, trough, noscore, noplay +62: Right Plunger, shooter, edge, novalid, debounce(TIME_200MS) +63: Right Trough, trough, noscore, novalid 64: Step E, lamp(LM_STEP_E) 65: Dummy Eject Hole 66: Right Gangway 67: Lower Right Hole 68: Lower Jet 71: Outer Right Inlane -72: Left Trough, trough, noscore, noplay +72: Left Trough, trough, noscore, novalid 73: Outhole, outhole, noscore -74: Center Trough, trough, noscore, noplay +74: Center Trough, trough, noscore, novalid 75: Upper Loop -76: Trap Door Closed, noplay, service +76: Trap Door Closed, novalid, service 77: Upper Right Jet ########################################################################## diff --git a/machine/funhouse/rules.c b/machine/funhouse/rules.c index b34ace3d1..68292d419 100644 --- a/machine/funhouse/rules.c +++ b/machine/funhouse/rules.c @@ -1,5 +1,5 @@ /* - * Copyright 2009, 2010 by Brian Dominy + * Copyright 2009, 2010, 2011 by Brian Dominy * * This file is part of FreeWPC. * diff --git a/machine/funhouse/trapdoor.c b/machine/funhouse/trapdoor.c index 3d1ac4b24..4d303699b 100644 --- a/machine/funhouse/trapdoor.c +++ b/machine/funhouse/trapdoor.c @@ -68,7 +68,7 @@ static void trap_door_pulse (void) sol_request (SOL_TRAP_DOOR_OPEN); task_sleep (TIME_500MS); - /* TODO - read 'closed' sw. to see if it worked OK */ + /* ODO - read 'closed' sw. to see if it worked OK */ task_exit (); } diff --git a/machine/mon/Makefile b/machine/mon/Makefile deleted file mode 100644 index a655c1ca7..000000000 --- a/machine/mon/Makefile +++ /dev/null @@ -1,66 +0,0 @@ - -# -# Game specific Makefile extensions -# - -MACHINE_FILE = mon.md - -#MACHINE_SCHEDULE = $(M)/t2.sched -#SCHED_FLAGS += -i t2/driver.h - -# Define the name of the GAME_ROM. This is -# optional; you can delete it and a suitable -# default will be taken. -GAME_ROM_PREFIX = fmon - -# Set ROM_PAGE_COUNT to the number of 16KB pages -# that should be present in the output image. -# The hardware supports a maximum of 64 pages; -# you can't exceed this. -# -# The 'system' will always reside in the uppermost -# two pages. If the ROM is less than a full 64 -# pages, then the pages are numbered from [N..64] -# anyway. -# -# 128KB.....8 pages -# 256KB.....16 pages -# 512KB.....32 pages -# 1MB...... 64 pages -# -ROM_PAGE_COUNT = 8 - -################################################# -# -# Simulation options. -# -# These options control the way that the game -# ROM is made available to pinmame for testing. -# They are only used during installation into -# the pinmame roms directory. -# -################################################# - -PINMAME_MACHINE = monopoly - -PINMAME_GAME_ROM = moncpu.320 - -PINMAME_OTHER_ROMS = mondsp* mnsnd* - -# -# Object files exported by this game -# -# GAME_OBJS go into the system page, which should be a last resort or for common -# functions, or for those which have to for some reason. All feature tests can -# go into GAME_TEST_OBJS. Preferably, game functions go into GAME_PAGED_OBJS. -# This works safely for any file that only uses CALLSET_ENTRY functions, deffs, -# and leffs. RTTs must go into GAME_OBJS. -# - -GAME_OBJS = - -GAME_TEST_OBJS = - -GAME_INCLUDES = - -GAME_PAGED_OBJS = diff --git a/machine/mon/mon.md b/machine/mon/mon.md deleted file mode 100644 index 8d3899c20..000000000 --- a/machine/mon/mon.md +++ /dev/null @@ -1,176 +0,0 @@ -#-------------------------------------------------------------------------- -# Machine description for Stern Monopoly -# (C) Copyright 2007, 2009 by Brian Dominy -# -# See tools/genmachine for more information about the format of this file. -#-------------------------------------------------------------------------- - -# This file describes many characteristics of a pinball machine, -# mostly physical stuff, although some rules can be coded here also. - -########################################################################## -# General section (before a [section] header is given. -# Miscellaneous parameters are specified here. -########################################################################## -Title: Monopoly - -include platform/whitestar/whitestar.md - -define MACHINE_PLATFORM_WHITESTAR -define MACHINE_LACKS_ALL_INCLUDES - -########################################################################## -# Lamp Description -# The key is given in column/row format. The first parameter must be -# the lamp name. Optionally you can specify a color, and x() and y() -# for the location on the playfield. Only a subset of lamp colors are -# recognized; see tools/genmachine for details. Lamp location is -# given in terms of the Lamp-Matrix-Width and Lamp-Matrix-Height. -########################################################################## -[lamps] - - -########################################################################## -# Switch Description -# The key is in column/row format. The first parameter must be the switch -# name. Options can be given in any order: -# ingame - only service the switch during a game -# intest - also service the switch in test mode -# noplay - tripping this switch does NOT mark ball in play -# standup - this is a standup -# button - this is a button -# edge - this switch should be serviced on either transition -# opto - this switch is optical and activates on closed->open -# -# These parameters mark various well-known switches. Only one of these -# can exist per type: -# outhole, slam-tilt, tilt, shooter, start-button, buyin-button -# -# Use sound() to invoke a sound call automatically when the switch activates. -# Use lamp() to flicker a lamp automatically on activation. TODO: -# this requires the c_name, and not the friendly md name. -# Use c_decl() to override the default name of the switch event. -# -########################################################################## -[switches] - -########################################################################## -# Drives -# This describes the names of the solenoid/motor drives. -# Hn = high power solenoids -# Ln = low power solenoids -# Gn = general purpose solenoids -# etc. -# -# The following options are supported: -# flash - this is a flasher (default is solenoid, flash implies nosearch) -# motor - this is a motor (default is solenoid) -# nosearch - do not activate this during ball search -# -# The following options denote well-known drives: -# knocker, ballserve -# -########################################################################## -[drives] - -########################################################################## -# General Illumination -########################################################################## -[gi] - -########################################################################## -# Tests -# These are additional test items that should appear in the TESTS menu. -########################################################################## -[tests] - - -########################################################################## -# Lampsets -# These denote logical groupings of lamps. -# The key is a textual name for the set. The options specify which lamps -# are a part of that set. You can specify 1 or more lamp values, -# separated by commas, where each value can be: 1) a single lamp name, -# 2) another lampset name, already defined, or 3) a lamp range in the -# form lamp1..lampN. -# -# The special construct PF:function indicates that a Perl subroutine -# should be used to select and sort the lamps. Some functions are -# builtin to genmachine; others can be defined by you and included -# via the 'perlinclude' directive. -# -# Note that a lampset may contain only one lamp. The lampset is the -# unit of 'allocation' for a lamp effect. -########################################################################## -[lamplists] - -########################################################################## -# Containers -# These denote devices that can hold, count, and eject pinballs. -# The key is the name of the device. The first parameter is the name -# of the solenoid that kicks out a ball. The 'trough' parameter should -# be specified on the single trough device. The 'init_max_count' -# parameter should say how many balls are normally held in this device -# at startup. The remaining parameters are the names of the switches -# that count pinball, in front from entry to exit. -########################################################################## -[containers] - -#------------------------------------------------------------------------ -# The remaining sections describe software aspects, and not the physical -# machine. -#------------------------------------------------------------------------ - -########################################################################## -# Items for the Feature Adjustments menu. Parameters indicate the -# type of adjustment and the default value. -########################################################################## -[adjustments] - -########################################################################## -# Items for the Feature Audits menu. -########################################################################## -[audits] - -########################################################################## -# Sound calls for well-known events -########################################################################## -[system_sounds] - -########################################################################## -# Music calls for well-known events -########################################################################## -[system_music] - -########################################################################## -# A list of all scores needed by the game rules. -########################################################################## -[scores] - -########################################################################## -# The default high scores. Use GC to indicate the grand champion. -# The parameters are the initials followed by the score value. Periods -# may optionally be used to group digits, but they are not necessary. -# Commas _cannot_ be used for this purpose since they separate parameters. -########################################################################## -[highscores] - -########################################################################## -# Bit flags. -########################################################################## -[flags] - -########################################################################## -# Display effects -########################################################################## -[deffs] - -########################################################################## -# Lamp effects -########################################################################## -[leffs] - -########################################################################## -# Fonts used in this game. -########################################################################## -[fonts] diff --git a/machine/t2/Makefile b/machine/t2/Makefile deleted file mode 100644 index 116a18e70..000000000 --- a/machine/t2/Makefile +++ /dev/null @@ -1,71 +0,0 @@ - -# -# Game specific Makefile extensions -# - -MACHINE_FILE = t2.md - -#MACHINE_SCHEDULE = $(M)/t2.sched -#SCHED_FLAGS += -i t2/driver.h - -# Define the name of the GAME_ROM. This is -# optional; you can delete it and a suitable -# default will be taken. -GAME_ROM_PREFIX = ft2 - - -# Set ROM_PAGE_COUNT to the number of 16KB pages -# that should be present in the output image. -# The hardware supports a maximum of 64 pages; -# you can't exceed this. -# -# The 'system' will always reside in the uppermost -# two pages. If the ROM is less than a full 64 -# pages, then the pages are numbered from [N..64] -# anyway. -# -# 128KB.....8 pages -# 256KB.....16 pages -# 512KB.....32 pages -# 1MB...... 64 pages -# -ROM_PAGE_COUNT = 32 - -################################################# -# -# Simulation options. -# -# These options control the way that the game -# ROM is made available to pinmame for testing. -# They are only used during installation into -# the pinmame roms directory. -# -################################################# - -MACHINE_MAJOR = 0 -MACHINE_MINOR = 32 - -PINMAME_MACHINE = t2_l8 - -PINMAME_GAME_ROM = t2_l8.rom - -PINMAME_OTHER_ROMS = t2_u* - -# -# Object files exported by this game -# -# GAME_OBJS go into the system page, which should be a last resort or for common -# functions, or for those which have to for some reason. All feature tests can -# go into GAME_TEST_OBJS. Preferably, game functions go into GAME_PAGED_OBJS. -# This works safely for any file that only uses CALLSET_ENTRY functions, deffs, -# and leffs. RTTs must go into GAME_OBJS. -# - -GAME_OBJS = - -GAME_TEST_OBJS = - -GAME_INCLUDES = - -GAME_PAGED_OBJS = amode.o targets.o drop.o misc.o - diff --git a/machine/t2/amode.c b/machine/t2/amode.c deleted file mode 100644 index c392ae653..000000000 --- a/machine/t2/amode.c +++ /dev/null @@ -1,58 +0,0 @@ - -#include - -static U8 lamplist; - - -void amode_leff1 (void) -{ - register U8 my_lamplist = lamplist; - lamplist_set_apply_delay (TIME_66MS); - for (;;) - lamplist_apply (my_lamplist, leff_toggle); -} - -void amode_leff_eyes (void) -{ - U8 n; - - for (;;) - { - task_sleep_sec (4); - for (n=0; n < 4; n++) - { - leff_toggle (LM_EYES_LOWER); - task_sleep (TIME_100MS); - } - - task_sleep_sec (6); - for (n=0; n < 6; n++) - { - leff_toggle (LM_EYES_LOWER); - task_sleep (TIME_66MS); - } - } -} - -void amode_leff (void) -{ - gi_leff_enable (PINIO_GI_STRINGS); - - for (lamplist = LAMPLIST_BONUS_X; lamplist <= LAMPLIST_RIGHT_LOOP; lamplist++) - { - leff_create_peer (amode_leff1); - task_sleep (TIME_33MS); - } - leff_create_peer (amode_leff_eyes); - task_exit (); -} - - -void amode_deff (void) -{ - dmd_alloc_pair (); - frame_draw (IMG_FREEWPC); - dmd_show2 (); - for (;;) - task_sleep_sec (5); -} diff --git a/machine/t2/drop.c b/machine/t2/drop.c deleted file mode 100644 index dd546ae65..000000000 --- a/machine/t2/drop.c +++ /dev/null @@ -1,17 +0,0 @@ - -#include -#include "skull_drop.h" - -CALLSET_ENTRY (drop, skull_drop_down) -{ - sound_send (SND_SPLAT); - score (SC_100K); - skull_drop_reset (); -} - - -CALLSET_ENTRY (drop, start_ball) -{ - skull_drop_reset (); -} - diff --git a/machine/t2/misc.c b/machine/t2/misc.c deleted file mode 100644 index a2267a25c..000000000 --- a/machine/t2/misc.c +++ /dev/null @@ -1,34 +0,0 @@ - -#include -#include - -CALLSET_ENTRY (misc, sw_left_sling) -{ - sound_send (SND_SLING); - score (SC_110); -} - - -CALLSET_ENTRY (misc, sw_right_sling) -{ - sound_send (SND_SLING); - score (SC_110); -} - -CALLSET_ENTRY (misc, sw_left_jet) -{ - sound_send (SND_DATABASE_BEEP1); - score (SC_5K); -} - -CALLSET_ENTRY (misc, sw_right_jet) -{ - sound_send (SND_DATABASE_BEEP2); - score (SC_5K); -} - -CALLSET_ENTRY (misc, sw_bottom_jet) -{ - sound_send (SND_DATABASE_BEEP3); - score (SC_5K); -} diff --git a/machine/t2/t2.md b/machine/t2/t2.md deleted file mode 100644 index e648e5ec5..000000000 --- a/machine/t2/t2.md +++ /dev/null @@ -1,394 +0,0 @@ -#-------------------------------------------------------------------------- -# Machine description for Terminator 2 -# (C) Copyright 2007-2010 by Brian Dominy -# -# See tools/genmachine for more information about the format of this file. -#-------------------------------------------------------------------------- - -# This file describes many characteristics of a pinball machine, -# mostly physical stuff, although some rules can be coded here also. - -########################################################################## -# General section (before a [section] header is given. -# Miscellaneous parameters are specified here. -########################################################################## -Title: Terminator 2 - -include platform/wpc/wpc-dmd.md - -#Pinmame-Zip: -#Pinmame-ROM: -#Lamp-Matrix-Width: -#Lamp-Matrix-Height: - - -########################################################################## -# Use 'define' to emit a plain #define for anything not covered by -# some other means. -########################################################################## -define MACHINE_LACKS_PROTOS_H -define MACHINE_CUSTOM_AMODE -define MACHINE_BALL_IN_PLAY_MUSIC MUS_T2_IN_PLAY -define MACHINE_START_BALL_MUSIC MUS_T2_PLUNGER - -#define MACHINE_SCORE_DIGITS -#define MACHINE_DEBUGGER_HOOK -#define MACHINE_REPLAY_SCORE_CHOICES 10 -#define MACHINE_OUTHOLE_KICK_HOOK - -########################################################################## -# Lamp Description -# The key is given in column/row format. The first parameter must be -# the lamp name. Optionally you can specify a color, and x() and y() -# for the location on the playfield. Only a subset of lamp colors are -# recognized; see tools/genmachine for details. Lamp location is -# given in terms of the Lamp-Matrix-Width and Lamp-Matrix-Height. -########################################################################## -[lamps] -11: 2X -12: 4X -13: Hold Bonus -14: 6X -15: 8X -16: Free Ride, shoot-again -17: Skull Teeth -21: Kickback -22: Special -23: Left Return Lane -24: Right Return Lane -25: Super Jackpot -26: Load Gun -27: Extra Ball, extra-ball -28: Load For Jackpot -31: Skill 1 -32: Skill 2 -33: Skill 3 -34: Skill 4 -35: Skill 5 -36: Center 1 -37: Center 2 -38: Center 3 -41: Top Lock -42: Video Mode -43: Award 10M -44: Award Extra Ball -45: Award Multiball -46: Award Lanes -47: Award Hold Bonus -48: Award Sec. Pass -51: Eyes Lower -52: Eyes Upper -53: 5 Million -54: 3 Million -55: 1 Million -56: 750K -57: 500K -58: 250K -61: Left Ramp 5 -62: Left Ramp 4 -63: Left Ramp 3 -64: Left Ramp 2 -65: Left Ramp 1 -66: Left Lock -67: Database -68: Left Ramp Million -71: Right Ramp 5 -72: Right Ramp 4 -73: Right Ramp 3 -74: Right Ramp 2 -75: Right Ramp 1 -76: Relight Kick Top -77: Relight Kick Middle -78: Relight Kick Bottom -81: Right Loop -82: Right Ramp Million -83: Hurry Up -84: Start, start -85: Drop Target, debounce(TIME_200MS) -86: Top Lane Left -87: Top Lane Middle -88: Top Lane Right - - -########################################################################## -# Switch Description -# The key is in column/row format. The first parameter must be the switch -# name. Options can be given in any order: -# ingame - only service the switch during a game -# intest - also service the switch in test mode -# noplay - tripping this switch does NOT mark ball in play -# standup - this is a standup -# button - this is a button -# edge - this switch should be serviced on either transition -# opto - this switch is optical and activates on closed->open -# -# These parameters mark various well-known switches. Only one of these -# can exist per type: -# outhole, slam-tilt, tilt, shooter, start-button, buyin-button -# -# Use sound() to invoke a sound call automatically when the switch activates. -# Use lamp() to flicker a lamp automatically on activation. TODO: -# this requires the c_name, and not the friendly md name. -# Use c_decl() to override the default name of the switch event. -# -########################################################################## -[switches] -11: Right Flipper, button, intest, c_decl(sw_right_button) -12: Left Flipper, button, intest, c_decl(sw_left_button) -13: Start Button, start-button, intest -14: Plumb Bob Tilt, c_decl(sw_tilt), tilt, ingame, noplay, cabinet -15: Trough Left, c_decl(sw_trough), noplay -16: Trough Center, c_decl(sw_trough), noplay -17: Trough Right, c_decl(sw_trough), noplay -18: Outhole, outhole, intest, noplay -21: Slam Tilt, slam-tilt, ingame, cabinet -23: Ticket Opto, opto, cabinet -25: Left Outlane -26: Left Return Lane, lamp(LM_LEFT_RETURN_LANE) -27: Right Return Lane, lamp(LM_RIGHT_RETURN_LANE) -28: Right Outlane -31: Gun Loaded -32: Gun Mark, noplay, intest, service -33: Gun Home, noplay, intest, service -# TODO : it *must* be named this, even though T2 prefers 'grip trigger' -34: Launch Button, cabinet, launch-button, noplay -36: Standup Mid. Left, lamp(LM_CENTER_1) -37: Standup Mid. Center, lamp(LM_CENTER_2) -38: Standup Mid. Right, lamp(LM_CENTER_3) -41: Left Jet -42: Right Jet -43: Bottom Jet -44: Left Sling -45: Right Sling -46: Standup Right Top, lamp(LM_RELIGHT_KICK_TOP) -47: Standup Right Mid., lamp(LM_RELIGHT_KICK_MIDDLE) -48: Standup Right Bot., lamp(LM_RELIGHT_KICK_BOTTOM) -51: Left Lock -53: Lower Escape Route -54: Upper Escape Route -55: Top Lock -56: Top Lane Left, lamp(LM_TOP_LANE_LEFT) -57: Top Lane Center, lamp(LM_TOP_LANE_MIDDLE) -58: Top Lane Right, lamp(LM_TOP_LANE_RIGHT) -61: Left Ramp Entry -62: Left Ramp Made -63: Right Ramp Entry -64: Right Ramp Made -65: Lower Chase Loop -66: Upper Chase Loop -71: Target 1 High, lamp(LM_SKILL_1) -72: Target 2, lamp(LM_SKILL_2) -73: Target 3, lamp(LM_SKILL_3) -74: Target 4, lamp(LM_SKILL_4) -75: Target 5 Low, lamp(LM_SKILL_5) -76: Ball Popper -77: Drop Target, edge -78: Shooter, edge, shooter, noplay, debounce(TIME_200MS) - -########################################################################## -# Drives -# This describes the names of the solenoid/motor drives. -# Hn = high power solenoids -# Ln = low power solenoids -# Gn = general purpose solenoids -# etc. -# -# The following options are supported: -# flash - this is a flasher (default is solenoid, flash implies nosearch) -# motor - this is a motor (default is solenoid) -# nosearch - do not activate this during ball search -# -# The following options denote well-known drives: -# knocker, ballserve -# -########################################################################## -[drives] -H1: Ball Popper -H2: Gun Kicker -H3: Outhole -H4: Ball Serve, ballserve -H5: Right Sling -H6: Left Sling -H7: Knocker, knocker -H8: Kickback - -L1: Plunger, launch -L2: Top Lock -L3: Gun Motor, motor, nosearch -L4: Skull Drop Down, nosearch -L5: Left Jet -L6: Right Jet -L7: Bottom Jet -L8: Left Lock - -G1: Hot Dog 4, flash -G2: Right Sling 2, flash -G3: Left Sling 2, flash -G4: Left Lock 2, flash -G5: Gun 2, flash -G6: Right Ramp, flash -G7: Left Ramp, flash -G8: Backglass, flash - -A1: Targets, flash -A2: Left Popper, flash -A3: Right Popper, flash -A4: Skull Drop Up, nosearch - -########################################################################## -# General Illumination -########################################################################## -[gi] -0: Top Insert -1: Bottom Insert -2: Right Playfield -3: CPU String -4: Left Playfield - -########################################################################## -# Tests -# These are additional test items that should appear in the TESTS menu. -########################################################################## -[tests] - - -########################################################################## -# Lampsets -# These denote logical groupings of lamps. -# The key is a textual name for the set. The options specify which lamps -# are a part of that set. You can specify 1 or more lamp values, -# separated by commas, where each value can be: 1) a single lamp name, -# 2) another lampset name, already defined, or 3) a lamp range in the -# form lamp1..lampN. -# -# The special construct PF:function indicates that a Perl subroutine -# should be used to select and sort the lamps. Some functions are -# builtin to genmachine; others can be defined by you and included -# via the 'perlinclude' directive. -# -# Note that a lampset may contain only one lamp. The lampset is the -# unit of 'allocation' for a lamp effect. -########################################################################## -[lamplists] -Bonus X: 2X, 4X, 6X, 8X -Skill: Skill 1, Skill 2, Skill 3, Skill 4, Skill 5 -Center: Center 1, Center 2, Center 3 -Left Loop: Award Sec. Pass, Award Hold Bonus, Award Lanes, Award Multiball, Award Extra Ball, Award 10M -Left Ramp: Left Ramp 1, Left Ramp 2, Left Ramp 3, Left Ramp 4, Left Ramp 5 -Right Ramp: Right Ramp 1, Right Ramp 2, Right Ramp 3, Right Ramp 4, Right Ramp 5 -Top Lanes: Top Lane Left, Top Lane Middle, Top Lane Right -Relight Kickback: Relight Kick Top, Relight Kick Middle, Relight Kick Bottom -Left Hole: Left Lock, Database -Return Lanes: Left Return Lane, Right Return Lane -Skull Lamps: Super Jackpot, Load Gun, Extra Ball, Load For Jackpot, Drop Target -Right Loop: 250K, 500K, 750K, 1 Million, 3 Million, 5 Million - -Locks: Left Lock, Top Lock - -########################################################################## -# Containers -# These denote devices that can hold, count, and eject pinballs. -# The key is the name of the device. The first parameter is the name -# of the solenoid that kicks out a ball. The 'trough' parameter should -# be specified on the single trough device. The 'init_max_count' -# parameter should say how many balls are normally held in this device -# at startup. The remaining parameters are the names of the switches -# that count pinball, in front from entry to exit. -########################################################################## -[containers] -# Note: not defining a trough will cause a compile error! -Trough: Ball Serve, trough, init_max_count(3), Trough Left, Trough Center, Trough Right -Left Lock: Left Lock, Left Lock -Top Lock: Top Lock, Top Lock -Gun: Gun Kicker, Gun Loaded -Skull Lock: Ball Popper, Ball Popper - -#------------------------------------------------------------------------ -# The remaining sections describe software aspects, and not the physical -# machine. -#------------------------------------------------------------------------ - -########################################################################## -# Items for the Feature Adjustments menu. Parameters indicate the -# type of adjustment and the default value. -########################################################################## -[adjustments] - -########################################################################## -# Items for the Feature Audits menu. -########################################################################## -[audits] - -########################################################################## -# Sound calls for well-known events -########################################################################## -[system_sounds] - -########################################################################## -# Music calls for well-known events -########################################################################## -[system_music] - -########################################################################## -# A list of all scores needed by the game rules. -########################################################################## -[scores] -110: -1K: -5K: -25K: -100K: -250K: -500K: -750K: -1M: -3M: -5M: -10M: - -########################################################################## -# The default high scores. Use GC to indicate the grand champion. -# The parameters are the initials followed by the score value. Periods -# may optionally be used to group digits, but they are not necessary. -# Commas _cannot_ be used for this purpose since they separate parameters. -########################################################################## -[highscores] - -########################################################################## -# Bit flags. -########################################################################## -[flags] - -########################################################################## -# Display effects -########################################################################## -[deffs] -Amode: runner, PRI_AMODE, page(MACHINE_PAGE) - -########################################################################## -# Lamp effects -########################################################################## -[leffs] -Amode: runner, PRI_LEFF1, LAMPS(ALL), GI(ALL), page(MACHINE_PAGE) - -########################################################################## -# Fonts used in this game. -########################################################################## -[fonts] - -[templates] - -Left Sling: driver(sling), sw=SW_LEFT_SLING, sol=SOL_LEFT_SLING -Right Sling: driver(sling), sw=SW_RIGHT_SLING, sol=SOL_RIGHT_SLING -Left Jet: driver(jet), sw=SW_LEFT_JET, sol=SOL_LEFT_JET -Upper Jet: driver(jet), sw=SW_RIGHT_JET, sol=SOL_RIGHT_JET -Lower Jet: driver(jet), sw=SW_BOTTOM_JET, sol=SOL_BOTTOM_JET - -Kickback Driver: driver(spsol), - sw=SW_LEFT_OUTLANE, sol=SOL_KICKBACK, ontime=12, offtime=18 - -Skull Drop: driver(drop), - sol_up=SOL_SKULL_DROP_UP, sol_down=SOL_SKULL_DROP_DOWN, - sw=SW_DROP_TARGET, sw_event=sw_drop_target - -Outhole: driver(outhole), sol=SOL_OUTHOLE, swno=SW_OUTHOLE, swevent=sw_outhole diff --git a/machine/t2/targets.c b/machine/t2/targets.c deleted file mode 100644 index 08adfd1c8..000000000 --- a/machine/t2/targets.c +++ /dev/null @@ -1,294 +0,0 @@ - -#include - -extern inline const switch_info_t *switch_lookup_current (void) -{ - extern const switch_info_t switch_table[]; - const U8 sw = (U8)task_get_arg (); - return &switch_table[sw]; -} - - -typedef const struct -{ - void (*made) (void); - void (*make_unlit) (void); - void (*make_lit) (void); - void (*make_flash) (void); - void (*light_all) (void); - void (*flash_all) (void); -} bank_ops_t; - - -typedef const struct -{ - bank_ops_t *ops; - const char *name; - U8 gid; - U8 sw_count; - U8 switches[8]; - U8 lamplist; -} bank_properties_t; - -#define BANK_SKILL 0 -#define BANK_CENTER 1 -#define BANK_RIGHT 2 -#define BANK_TOP 3 - - -extern void callset_bank_center_made (void); /* callset_invoke (bank_center_made) */ -extern void callset_bank_center_make_unlit (void); /* callset_invoke (bank_center_make_unlit) */ -extern void callset_bank_center_make_lit (void); /* callset_invoke (bank_center_make_lit) */ -extern void callset_bank_center_make_flash (void); /* callset_invoke (bank_center_make_flash) */ -extern void callset_bank_center_light_all (void); /* callset_invoke (bank_center_light_all) */ -extern void callset_bank_center_flash_all (void); /* callset_invoke (bank_center_flash_all) */ - -const bank_ops_t bank_center_ops = { - .made = callset_bank_center_made, - .make_unlit = callset_bank_center_make_unlit, - .make_lit = callset_bank_center_make_lit, - .make_flash = callset_bank_center_make_flash, - .light_all = callset_bank_center_light_all, - .flash_all = callset_bank_center_flash_all, -}; - -extern void callset_bank_top_made (void); /* callset_invoke (bank_top_made) */ -extern void callset_bank_top_make_unlit (void); /* callset_invoke (bank_top_make_unlit) */ -extern void callset_bank_top_make_lit (void); /* callset_invoke (bank_top_make_lit) */ -extern void callset_bank_top_make_flash (void); /* callset_invoke (bank_top_make_flash) */ -extern void callset_bank_top_light_all (void); /* callset_invoke (bank_top_light_all) */ -extern void callset_bank_top_flash_all (void); /* callset_invoke (bank_top_flash_all) */ - -const bank_ops_t bank_top_ops = { - .made = callset_bank_top_made, - .make_unlit = callset_bank_top_make_unlit, - .make_lit = callset_bank_top_make_lit, - .make_flash = callset_bank_top_make_flash, - .light_all = callset_bank_top_light_all, - .flash_all = callset_bank_top_flash_all, -}; - - -const bank_properties_t bank_properties_table[] = { - [BANK_SKILL] = { - .name = "SKILL 5-BANK", - .gid = GID_BANK_SKILL, - .sw_count = 5, - .lamplist = LAMPLIST_SKILL, - }, - - [BANK_CENTER] = { - .ops = &bank_center_ops, - .name = "CENTER 3-BANK", - .gid = GID_BANK_CENTER, - .sw_count = 3, - .switches = { SW_STANDUP_MID_LEFT, SW_STANDUP_MID_CENTER, SW_STANDUP_MID_RIGHT, }, - .lamplist = LAMPLIST_CENTER, - }, - - [BANK_RIGHT] = { - .name = "RIGHT 3-BANK", - .gid = GID_BANK_RIGHT, - .sw_count = 3, - .lamplist = LAMPLIST_RELIGHT_KICKBACK, - }, - - [BANK_TOP] = { - .ops = &bank_top_ops, - .name = "TOP LANES", - .gid = GID_BANK_TOP, - .sw_count = 3, - .switches = { SW_TOP_LANE_LEFT, SW_TOP_LANE_CENTER, SW_TOP_LANE_RIGHT, }, - .lamplist = LAMPLIST_TOP_LANES, - }, -}; - - -U8 bank_get_lamplist (const U8 bankno) -{ - return bank_properties_table[bankno].lamplist; -} - - -void bank_clear (const U8 bankno) -{ - const bank_properties_t *bank = &bank_properties_table[bankno]; - U8 i; - for (i=0 ; i < bank->sw_count; i++) - lamp_tristate_off (switch_lookup_lamp (bank->switches[i])); -} - -void bank_flash (const U8 bankno) -{ - const bank_properties_t *bank = &bank_properties_table[bankno]; - U8 i; - for (i=0 ; i < bank->sw_count; i++) - lamp_tristate_flash (switch_lookup_lamp (bank->switches[i])); -} - -void bank_set (const U8 bankno) -{ - const bank_properties_t *bank = &bank_properties_table[bankno]; - U8 i; - for (i=0 ; i < bank->sw_count; i++) - lamp_tristate_on (switch_lookup_lamp (bank->switches[i])); -} - -bool bank_test_all (const U8 bankno) -{ - const bank_properties_t *bank = &bank_properties_table[bankno]; - U8 i; - for (i=0 ; i < bank->sw_count; i++) - if (!lamp_test (switch_lookup_lamp (bank->switches[i]))) - return FALSE; - return TRUE; -} - - -U8 bank_active; -const switch_info_t *bank_swinfo; - - -void bank_target_off (void) -{ - lamp_tristate_off (bank_swinfo->lamp); -} - - -void bank_target_on (void) -{ - lamp_tristate_on (bank_swinfo->lamp); - if (bank_test_all (bank_active)) - { - dbprintf ("yep, completed it\n"); - far_indirect_call_handler (bank_properties_table[bank_active].ops->light_all, EVENT_PAGE); - } -} - - -void bank_target_flash (void) -{ - lamp_tristate_flash (bank_swinfo->lamp); -} - - -/** Handle any switch that is part of a target bank. */ -void bank_sw_handler (const U8 bankno) -{ - const bank_properties_t *bank = &bank_properties_table[bankno]; - - /* Debounce hits to the entire target bank, not just to - individual switches. Each bank has its timer for this. */ - if (timer_find_gid (bank->gid)) - { - dbprintf ("bank %d skipped debounce, gid %d\n", bankno, bank->gid); - return; - } - else - timer_restart_free (bank->gid, TIME_200MS); - - /* Lookup information on the specific switch that triggered */ - bank_swinfo = switch_lookup_current (); - bank_active = bankno; - - /* Throw an event just saying that the bank was hit */ - far_indirect_call_handler (bank->ops->made, EVENT_PAGE); - - /* Throw an event based on the state of the lamp for the - affected switch */ - if (lamp_flash_test (bank_swinfo->lamp)) - { - dbprintf ("bank %d made flashing\n", bankno); - far_indirect_call_handler (bank->ops->make_flash, EVENT_PAGE); - dbprintf ("called %p\n", bank->ops->make_flash); - } - else if (lamp_test (bank_swinfo->lamp)) - { - dbprintf ("bank %d made lit\n", bankno); - far_indirect_call_handler (bank->ops->make_lit, EVENT_PAGE); - } - else - { - dbprintf ("bank %d made unlit\n", bankno); - far_indirect_call_handler (bank->ops->make_unlit, EVENT_PAGE); - } -} - - -CALLSET_ENTRY (centerbank, bank_center_make_lit) -{ - sound_send (SND_TARGET_1); -} - - -CALLSET_ENTRY (centerbank, bank_center_make_flash) -{ - sound_send (SND_TARGET_5); - score (SC_25K); - bank_target_on (); -} - -CALLSET_ENTRY (centerbank, bank_center_light_all) -{ - bank_flash (BANK_CENTER); - score (SC_250K); - sound_send (SND_EXTRA_BALL_COLLECT); -} - - - -CALLSET_ENTRY (bonus_x, bank_top_make_unlit) -{ - sound_send (SND_DATABASE_CLICK); - score (SC_5K); - bank_target_on (); -} - - -CALLSET_ENTRY (bonus_x, bank_top_light_all) -{ - sound_send (SND_COPTER_1); - score (SC_100K); - bank_clear (BANK_TOP); -} - - -CALLSET_ENTRY (centerbank, start_game) -{ - bank_flash (BANK_CENTER); - bank_clear (BANK_TOP); - bank_clear (BANK_RIGHT); - bank_clear (BANK_SKILL); -} - - -CALLSET_ENTRY (lanes, sw_left_button) -{ - if (in_live_game) - { - lamplist_rotate_previous (LAMPLIST_TOP_LANES, lamp_matrix); - } -} - -CALLSET_ENTRY (lanes, sw_right_button) -{ - if (in_live_game) - { - lamplist_rotate_next (LAMPLIST_TOP_LANES, lamp_matrix); - } -} - -CALLSET_ENTRY (bank, sw_standup_mid_left) -{ bank_sw_handler (BANK_CENTER); } -CALLSET_ENTRY (bank, sw_standup_mid_center) -{ bank_sw_handler (BANK_CENTER); } -CALLSET_ENTRY (bank, sw_standup_mid_right) -{ bank_sw_handler (BANK_CENTER); } - -CALLSET_ENTRY (bank, sw_top_lane_left) -{ bank_sw_handler (BANK_TOP); } -CALLSET_ENTRY (bank, sw_top_lane_center) -{ bank_sw_handler (BANK_TOP); } -CALLSET_ENTRY (bank, sw_top_lane_right) -{ bank_sw_handler (BANK_TOP); } - diff --git a/machine/template/Makefile b/machine/template/Makefile deleted file mode 100644 index 3de509379..000000000 --- a/machine/template/Makefile +++ /dev/null @@ -1,84 +0,0 @@ -# -# Machine-specific Makefile -# - -MACHINE_FILE = template.md -MACHINE_SCHEDULE = $(M)/template.sched -SCHED_FLAGS += -i tz/driver.h - -# Define the name of the GAME_ROM. This is -# optional; you can delete it and a suitable -# default will be taken. -GAME_ROM_PREFIX = ftz - -# Set ROM_PAGE_COUNT to the number of 16KB pages -# that should be present in the output image. -# The hardware supports a maximum of 64 pages; -# you can't exceed this. -# -# The 'system' will always reside in the uppermost -# two pages. If the ROM is less than a full 64 -# pages, then the pages are numbered from [N..64] -# anyway. -# -# 128KB.....8 pages -# 256KB.....16 pages -# 512KB.....32 pages -# 1MB...... 64 pages -# -ROM_PAGE_COUNT = 32 - -################################################# -# -# Simulation options. -# -# These options control the way that the game -# ROM is made available to pinmame for testing. -# They are only used during installation into -# the pinmame roms directory. -# -################################################# - -PINMAME_MACHINE = tz_92 - -PINMAME_GAME_ROM = tzone9_2.rom - -PINMAME_OTHER_ROMS = tzu*.rom - -# -# Object files exported by this game -# -# GAME_OBJS go into the system page, which should be a last resort or for common -# functions, or for those which have to for some reason. All feature tests can -# go into GAME_TEST_OBJS. Preferably, game functions go into GAME_PAGED_OBJS. -# This works safely for any file that only uses CALLSET_ENTRY functions, deffs, -# and leffs. RTTs must go into GAME_OBJS. -# - -GAME_OBJS = clock.o magnet.o sling.o jets.o autofire.o gumball.o \ - rampdiv.o amode.o lock.o door.o ballsave.o - -GAME_TEST_OBJS = clocktest.o gumball_test.o magtest.o powerball_test.o - -GAME_INCLUDES = - -GAME_PAGED_OBJS = lanes.o leftramp.o skill.o deadend.o camera.o \ - config.o rightramp.o hitch.o piano.o rocket.o slot.o greed.o \ - mpf.o powerball.o clocktarget.o vmode.o deffs.o bonus.o star.o \ - multiball.o loop.o sssmb.o chaosmb.o leffs.o - -cow1 : build/cow1.xbm - -cow2 : build/cow2.o - -build/cow1.xbm build/cow2.prg: build/pgmtest - build/pgmtest - -build/pgmtest : build/pgmtest.o tools/pgmlib/pgmlib2.o - $(HOSTCC) -o $@ build/pgmtest.o tools/pgmlib/pgmlib2.o - -build/pgmtest.o : machine/tz/pgmtest.c - $(HOSTCC) -o $@ -Itools/pgmlib -c $< - -tools/pgmlib/pgmlib2.o : tools/pgmlib/pgmlib.c - $(HOSTCC) -o $@ -DNO_MAIN -Itools/pgmlib -Iinclude -c $< diff --git a/machine/template/template.md b/machine/template/template.md deleted file mode 100644 index 5092217c9..000000000 --- a/machine/template/template.md +++ /dev/null @@ -1,212 +0,0 @@ -#-------------------------------------------------------------------------- -# Machine description for FreeWPC -# (C) Copyright 2007, 2009 by Brian Dominy -# -# See tools/genmachine for more information about the format of this file. -#-------------------------------------------------------------------------- - -# This file describes many characteristics of a pinball machine, -# mostly physical stuff, although some rules can be coded here also. - -########################################################################## -# General section (before a [section] header is given. -# Miscellaneous parameters are specified here. -########################################################################## -Title: xyz -DMD: Yes/No -Fliptronic: Yes/No -DCS: Yes/No -WPC95: Yes/No - -# Uncomment and set the following if you know the filename for this -# machine used by PinMAME. -#Pinmame-Zip: -#Pinmame-ROM: -#Lamp-Matrix-Width: -#Lamp-Matrix-Height: - -########################################################################## -# Include standard definitions that apply to all WPC games. -# This will set some defaults for things you leave out here. -########################################################################## -# Choose ONE of the following: -#include platform/wpc/wpc89.md -#include platform/wpc/wpc-dmd.md -#include platform/wpc/wpc-fliptronic.md -#include platform/wpc/wpc-dcs.md -#include platform/wpc/wpc-security.md -#include platform/wpc/wpc95.md - -########################################################################## -# Use 'define' to emit a plain #define for anything not covered by -# some other means. -########################################################################## -#define MACHINE_SOL_EXTBOARD1 -#define MACHINE_CUSTOM_AMODE -#define MACHINE_SCORE_DIGITS -#define MACHINE_MUSIC_GAME -#define MACHINE_MUSIC_PLUNGER -#define MACHINE_DEBUGGER_HOOK -#define MACHINE_OUTHOLE_KICK_HOOK - -########################################################################## -# Lamp Description -# The key is given in column/row format. The first parameter must be -# the lamp name. Optionally you can specify a color, and x() and y() -# for the location on the playfield. Only a subset of lamp colors are -# recognized; see tools/genmachine for details. Lamp location is -# given in terms of the Lamp-Matrix-Width and Lamp-Matrix-Height. -########################################################################## -[lamps] - -########################################################################## -# Switch Description -# The key is in column/row format. The first parameter must be the switch -# name. Options can be given in any order: -# ingame - only service the switch during a game -# intest - also service the switch in test mode -# noplay - tripping this switch does NOT mark ball in play -# standup - this is a standup -# button - this is a button -# edge - this switch should be serviced on either transition -# opto - this switch is optical and activates on closed->open -# -# These parameters mark various well-known switches. Only one of these -# can exist per type: -# outhole, slam-tilt, tilt, shooter, start-button, buyin-button -# -# Use sound() to invoke a sound call automatically when the switch activates. -# Use lamp() to flicker a lamp automatically on activation. TODO: -# this requires the c_name, and not the friendly md name. -# Use c_decl() to override the default name of the switch event. -# -########################################################################## -[switches] - -########################################################################## -# Drives -# This describes the names of the solenoid/motor drives. -# Hn = high power solenoids -# Ln = low power solenoids -# Gn = general purpose solenoids -# etc. -# -# The following options are supported: -# flash - this is a flasher (default is solenoid, flash implies nosearch) -# motor - this is a motor (default is solenoid) -# nosearch - do not activate this during ball search -# -# The following options denote well-known drives: -# knocker, ballserve -# -########################################################################## -[drives] - - -########################################################################## -# General Illumination -########################################################################## -[gi] - - -########################################################################## -# Tests -# These are additional test items that should appear in the TESTS menu. -########################################################################## -[tests] - - -########################################################################## -# Lampsets -# These denote logical groupings of lamps. -# The key is a textual name for the set. The options specify which lamps -# are a part of that set. You can specify 1 or more lamp values, -# separated by commas, where each value can be: 1) a single lamp name, -# 2) another lampset name, already defined, or 3) a lamp range in the -# form lamp1..lampN. -# -# The special construct PF:function indicates that a Perl subroutine -# should be used to select and sort the lamps. Some functions are -# builtin to genmachine; others can be defined by you and included -# via the 'perlinclude' directive. -# -# Note that a lampset may contain only one lamp. The lampset is the -# unit of 'allocation' for a lamp effect. -########################################################################## -[lamplists] - -########################################################################## -# Containers -# These denote devices that can hold, count, and eject pinballs. -# The key is the name of the device. The first parameter is the name -# of the solenoid that kicks out a ball. The 'trough' parameter should -# be specified on the single trough device. The 'init_max_count' -# parameter should say how many balls are normally held in this device -# at startup. The remaining parameters are the names of the switches -# that count pinball, in front from entry to exit. -########################################################################## -[containers] - -#------------------------------------------------------------------------ -# The remaining sections describe software aspects, and not the physical -# machine. -#------------------------------------------------------------------------ - -########################################################################## -# Items for the Feature Adjustments menu. Parameters indicate the -# type of adjustment and the default value. -########################################################################## -[adjustments] - -########################################################################## -# Items for the Feature Audits menu. -########################################################################## -[audits] - -########################################################################## -# Sound calls for well-known events -########################################################################## -[system_sounds] - -########################################################################## -# Music calls for well-known events -########################################################################## -[system_music] - -########################################################################## -# A list of all scores needed by the game rules. -########################################################################## -[scores] - -########################################################################## -# The default high scores. Use GC to indicate the grand champion. -# The parameters are the initials followed by the score value. Periods -# may optionally be used to group digits, but they are not necessary. -# Commas _cannot_ be used for this purpose since they separate parameters. -########################################################################## -[highscores] - -########################################################################## -# Per-player bit flags. -########################################################################## -[flags] - -########################################################################## -# System-wide bit flags. -########################################################################## -[globalflags] - -########################################################################## -# Display effects -########################################################################## -[deffs] - -########################################################################## -# Lamp effects -########################################################################## -[leffs] - -########################################################################## -# Fonts used in this game. -########################################################################## -[fonts] diff --git a/machine/template/template.sched b/machine/template/template.sched deleted file mode 100644 index 1eb4f813e..000000000 --- a/machine/template/template.sched +++ /dev/null @@ -1,23 +0,0 @@ -# -# Copyright 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 -# - - -# Schedule for real-time tasks - diff --git a/machine/tester/Makefile b/machine/tester/Makefile deleted file mode 100644 index 3e40a8505..000000000 --- a/machine/tester/Makefile +++ /dev/null @@ -1,68 +0,0 @@ - -# -# Game specific Makefile extensions -# - -MACHINE_FILE = tester.md - -ifeq ($(hw),) -hw=WPC_TEST_DMD -endif - -EXTRA_CFLAGS += -D$(hw) - -CONFIG_PLAYABLE := n - -# Define the name of the GAME_ROM. This is -# optional; you can delete it and a suitable -# default will be taken. -GAME_ROM_PREFIX = wpct - -# Set ROM_PAGE_COUNT to the number of 16KB pages -# that should be present in the output image. -# The hardware supports a maximum of 64 pages; -# you can't exceed this. -# -# The 'system' will always reside in the uppermost -# two pages. If the ROM is less than a full 64 -# pages, then the pages are numbered from [N..64] -# anyway. -# -# 128KB.....8 pages -# 256KB.....16 pages -# 512KB.....32 pages -# 1MB...... 64 pages -# -ROM_PAGE_COUNT = 32 - -################################################# -# -# Simulation options. -# -# These options control the way that the game -# ROM is made available to pinmame for testing. -# They are only used during installation into -# the pinmame roms directory. -# -################################################# - -MACHINE_MAJOR = 0 -MACHINE_MINOR = 31 - -PINMAME_MACHINE = tz_92 - -PINMAME_GAME_ROM = tzone9_2.rom - -PINMAME_OTHER_ROMS = tzu*.rom - -# -# Object files exported by this game -# - -GAME_OBJS = - -GAME_TEST_OBJS = - -GAME_INCLUDES = - -GAME_PAGED_OBJS = diff --git a/machine/tester/tester.md b/machine/tester/tester.md deleted file mode 100644 index 0798cdcca..000000000 --- a/machine/tester/tester.md +++ /dev/null @@ -1,7 +0,0 @@ -Title: WPC-DMD Tester -include platform/wpc/wpc-fliptronic.md -define MACHINE_LACKS_ALL_INCLUDES -define MACHINE_HAS_UPPER_LEFT_FLIPPER -define MACHINE_HAS_UPPER_RIGHT_FLIPPER -[templates] -Null: driver(null) diff --git a/machine/tspp/Makefile b/machine/tspp/Makefile deleted file mode 100644 index c93bcbbe7..000000000 --- a/machine/tspp/Makefile +++ /dev/null @@ -1,64 +0,0 @@ - -# -# Game specific Makefile extensions -# - -PLATFORM := whitestar - -MACHINE_FILE := tspp.md - -# Define the name of the GAME_ROM. This is -# optional; you can delete it and a suitable -# default will be taken. -GAME_ROM_PREFIX = fspp - -# Set ROM_PAGE_COUNT to the number of 16KB pages -# that should be present in the output image. -# The hardware supports a maximum of 64 pages; -# you can't exceed this. -# -# The 'system' will always reside in the uppermost -# two pages. If the ROM is less than a full 64 -# pages, then the pages are numbered from [N..64] -# anyway. -# -# 128KB.....8 pages -# 256KB.....16 pages -# 512KB.....32 pages -# 1MB...... 64 pages -# -ROM_PAGE_COUNT = 8 - -################################################# -# -# Simulation options. -# -# These options control the way that the game -# ROM is made available to pinmame for testing. -# They are only used during installation into -# the pinmame roms directory. -# -################################################# - -PINMAME_MACHINE = simpprty -PINMAME_GAME_ROM = spp-cpu.400 -PINMAME_OTHER_ROMS = spp1* sppdspa.400 - -# -# Object files exported by this game -# -# GAME_OBJS go into the system page, which should be a last resort or for common -# functions, or for those which have to for some reason. All feature tests can -# go into GAME_TEST_OBJS. Preferably, game functions go into GAME_PAGED_OBJS. -# This works safely for any file that only uses CALLSET_ENTRY functions, deffs, -# and leffs. RTTs must go into GAME_OBJS. -# - -GAME_OBJS = - -GAME_TEST_OBJS = - -GAME_INCLUDES = - -GAME_PAGED_OBJS = - diff --git a/machine/tspp/tspp.md b/machine/tspp/tspp.md deleted file mode 100644 index 6b402fb76..000000000 --- a/machine/tspp/tspp.md +++ /dev/null @@ -1,4 +0,0 @@ -Title: Simpsons Pin Party -DMD: No -include platform/whitestar/whitestar.md -define MACHINE_LACKS_ALL_INCLUDES diff --git a/machine/tz/Makefile b/machine/tz/Makefile index 8ab1c70f8..9e821eda8 100644 --- a/machine/tz/Makefile +++ b/machine/tz/Makefile @@ -63,30 +63,33 @@ EXTRA_CFLAGS += -DCONFIG_MUTE_PAUSE # and leffs. RTTs must go into GAME_OBJS. # -GAME_OBJS = sling.o autofire.o gumball.o \ +SCHED_HEADERS += build/left_sling.h build/right_sling.h build/left_jet.h \ + build/right_jet.h build/lower_jet.h build/left_mpf.h build/right_mpf.h + +GAME_OBJS = jets.o autofire.o gumball.o \ config.o loop.o rampdiv.o magnet.o \ - maghelper.o + maghelper.o clock.o -GAME_TEST_OBJS = gumball_test.o powerball_test.o magtest.o +GAME_TEST_OBJS = gumball_test.o powerball_test.o clocktest.o magtest.o ac_detect.o GAME_INCLUDES = GAME_PAGED_OBJS = leftramp.o rightramp.o skill.o \ - fastlock.o door.o slot.o \ + fastlock.o door.o slot.o sling.o \ mpf.o chaosmb.o powerball.o \ multiball.o sssmb.o deffs.o -GAME2_OBJS = lanes.o unlit.o spiralaward.o leffs.o \ - bonus.o tz_amode.o star.o rocket.o \ - outhole.o lock.o camera.o combo.o deadend.o \ - hitch.o +GAME2_OBJS = unlit.o spiralaward.o leffs.o star.o rocket.o tz_amode.o \ + outhole.o camera.o deadend.o hitch.o birthday.o alarm.o dixon.o \ + music.o oddchange.o shots.o mode_select.o bitmap_test.o GAME3_OBJS = tz_flipcode.o rules.o greed.o clockmillions.o \ - spiral.o tnf.o bttz.o factoids.o master.o - -GAME4_OBJS = jets.o + spiral.o bttz.o factoids.o master.o snake.o \ + lock.o lanes.o combo.o deffs2.o hurryup.o +GAME4_OBJS = bonus.o dollar.o bar.o tnf.o sdss.o pb_lock.o wheelie.o wpctris.o IMAGE_MAP += $(M)/tz.ild -CONFIG_EVENT_PAGE := 57 +SCHED_HEADERS += build/clock_mech.h build/bridge_open.h build/shooter_div.h \ + build/ramp_div.h build/gumball_div.h diff --git a/machine/tz/animation/bttzmelt/bttzmelt_029.pgm b/machine/tz/animation/bttzmelt/bttzmelt_029.pgm index c3d5f6d12..051ac5b8b 100644 --- a/machine/tz/animation/bttzmelt/bttzmelt_029.pgm +++ b/machine/tz/animation/bttzmelt/bttzmelt_029.pgm @@ -2151,7 +2151,7 @@ P2 255 255 255 -64 +255 255 255 255 diff --git a/machine/tz/animation/bttzmelt/bttzmelt_032.pgm b/machine/tz/animation/bttzmelt/bttzmelt_032.pgm index 4a4b7d602..2da6ccdd2 100644 --- a/machine/tz/animation/bttzmelt/bttzmelt_032.pgm +++ b/machine/tz/animation/bttzmelt/bttzmelt_032.pgm @@ -2035,7 +2035,6 @@ P2 255 255 255 -110 255 255 255 @@ -2151,7 +2150,8 @@ P2 255 255 255 -245 +255 +250 255 255 255 diff --git a/machine/tz/animation/bttzmelt/bttzmelt_033.pgm b/machine/tz/animation/bttzmelt/bttzmelt_033.pgm index c6811a727..0e4117338 100644 --- a/machine/tz/animation/bttzmelt/bttzmelt_033.pgm +++ b/machine/tz/animation/bttzmelt/bttzmelt_033.pgm @@ -2035,8 +2035,8 @@ P2 255 255 255 -30 -231 +255 +255 255 255 255 diff --git a/machine/tz/animation/bttzmelt/bttzmelt_034.pgm b/machine/tz/animation/bttzmelt/bttzmelt_034.pgm index 8c094d9dc..c1dab3418 100644 --- a/machine/tz/animation/bttzmelt/bttzmelt_034.pgm +++ b/machine/tz/animation/bttzmelt/bttzmelt_034.pgm @@ -2034,9 +2034,9 @@ P2 255 255 255 -242 -46 -146 +255 +255 +255 255 255 255 diff --git a/machine/tz/animation/bttzmelt/bttzmelt_035.pgm b/machine/tz/animation/bttzmelt/bttzmelt_035.pgm index b06791dac..d69e88f5d 100644 --- a/machine/tz/animation/bttzmelt/bttzmelt_035.pgm +++ b/machine/tz/animation/bttzmelt/bttzmelt_035.pgm @@ -2034,9 +2034,9 @@ P2 255 255 255 -212 -94 -75 +255 +255 +255 255 255 255 diff --git a/machine/tz/animation/bttzmelt/bttzmelt_036.pgm b/machine/tz/animation/bttzmelt/bttzmelt_036.pgm index 0789a16fd..acf5b7f42 100644 --- a/machine/tz/animation/bttzmelt/bttzmelt_036.pgm +++ b/machine/tz/animation/bttzmelt/bttzmelt_036.pgm @@ -2034,9 +2034,6 @@ P2 255 255 255 -144 -93 -20 255 255 255 @@ -3096,7 +3093,6 @@ P2 255 255 255 -27 255 255 255 @@ -3412,7 +3408,11 @@ P2 255 255 255 -219 +255 +255 +255 +255 +255 255 255 255 @@ -3540,7 +3540,6 @@ P2 255 255 255 -22 255 255 255 @@ -3559,7 +3558,8 @@ P2 255 255 255 -80 +255 +255 255 255 255 @@ -3734,8 +3734,8 @@ P2 255 255 255 -79 -189 +211 +255 255 255 255 @@ -3943,7 +3943,7 @@ P2 255 123 37 -206 +212 255 255 255 diff --git a/machine/tz/animation/bttzmelt/bttzmelt_037.pgm b/machine/tz/animation/bttzmelt/bttzmelt_037.pgm index a8fe661fe..8694268a0 100644 --- a/machine/tz/animation/bttzmelt/bttzmelt_037.pgm +++ b/machine/tz/animation/bttzmelt/bttzmelt_037.pgm @@ -2034,9 +2034,9 @@ P2 255 255 255 -85 -67 -46 +255 +255 +255 255 255 255 diff --git a/machine/tz/animation/bttzmelt/bttzmelt_038.pgm b/machine/tz/animation/bttzmelt/bttzmelt_038.pgm index 006dc42a6..d25f24dc5 100644 --- a/machine/tz/animation/bttzmelt/bttzmelt_038.pgm +++ b/machine/tz/animation/bttzmelt/bttzmelt_038.pgm @@ -2034,9 +2034,9 @@ P2 255 255 255 -41 -129 -114 +255 +255 +255 255 255 255 diff --git a/machine/tz/animation/bttzmelt/bttzmelt_039.pgm b/machine/tz/animation/bttzmelt/bttzmelt_039.pgm index 90939702e..3e80b0e90 100644 --- a/machine/tz/animation/bttzmelt/bttzmelt_039.pgm +++ b/machine/tz/animation/bttzmelt/bttzmelt_039.pgm @@ -2034,9 +2034,6 @@ P2 255 255 255 -19 -164 -182 255 255 255 @@ -3734,9 +3731,6 @@ P2 255 255 255 -224 -14 -31 255 255 255 @@ -3940,10 +3934,6 @@ P2 255 255 255 -67 -235 -205 -12 255 255 255 @@ -4013,11 +4003,24 @@ P2 255 255 255 -95 -232 -68 -180 -96 +255 +255 +255 +255 +255 +255 +255 +255 +255 +255 +255 +255 +255 +255 +254 +255 +255 +255 255 255 255 @@ -4068,11 +4071,8 @@ P2 255 255 255 -25 -95 255 255 -14 255 255 255 diff --git a/machine/tz/animation/bttzmelt/bttzmelt_040.pgm b/machine/tz/animation/bttzmelt/bttzmelt_040.pgm index 7507f761e..4a5b84d78 100644 --- a/machine/tz/animation/bttzmelt/bttzmelt_040.pgm +++ b/machine/tz/animation/bttzmelt/bttzmelt_040.pgm @@ -2034,9 +2034,6 @@ P2 255 255 255 -7 -8 -245 255 255 255 @@ -3735,8 +3732,6 @@ P2 255 255 255 -141 -177 255 255 255 @@ -3939,11 +3934,6 @@ P2 255 255 255 -195 -232 -1 -86 -48 255 255 255 @@ -4013,10 +4003,23 @@ P2 255 255 255 -199 -146 -3 -244 +255 +255 +255 +255 +255 +255 +255 +255 +255 +255 +252 +250 +247 +255 +255 +255 +255 255 255 255 @@ -4068,11 +4071,8 @@ P2 255 255 255 -31 -131 255 255 -11 255 255 255 diff --git a/machine/tz/animation/bttzwave/bttzwave_0001_002.pgm b/machine/tz/animation/bttzwave/bttzwave_0001_002.pgm index f3f4c82fd..3889067a0 100644 --- a/machine/tz/animation/bttzwave/bttzwave_0001_002.pgm +++ b/machine/tz/animation/bttzwave/bttzwave_0001_002.pgm @@ -2,21 +2,7 @@ P2 # CREATOR: GIMP PNM Filter Version 1.1 128 32 255 -1 -1 -1 -1 -1 -1 0 -1 -7 -10 -22 -28 -28 -20 -2 0 0 0 @@ -80,93 +66,44 @@ P2 0 0 0 -23 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 38 -8 -1 -9 -14 -30 +0 +0 +0 +0 +4 +23 +34 +34 +34 34 -36 -36 -36 -36 37 38 38 37 37 -36 34 -31 23 8 0 -4 -15 -17 -19 -21 -21 -19 -18 -17 -16 -16 -30 -37 -31 -37 -30 -16 -16 -17 -18 -19 -16 -13 -11 -12 0 0 -38 -24 -26 -28 -29 -29 -29 -29 -26 -25 -22 -20 -16 -12 -6 -3 -1 0 -2 -5 -18 -29 -20 -21 -20 -42 -47 -49 -49 -50 -52 -55 -53 -46 -32 -20 -6 0 0 0 @@ -177,6 +114,11 @@ P2 0 0 0 +4 +37 +8 +37 +4 0 0 0 @@ -188,117 +130,21 @@ P2 0 0 0 +38 0 0 0 0 0 -6 -19 -41 -55 -46 -35 -34 -34 -34 -34 -33 -31 -21 -6 -1 -5 -2 0 -17 -31 -34 -38 -39 -39 -39 -34 -31 -28 -25 -24 -21 -21 -21 -22 -26 -34 -25 -7 0 0 0 0 -1 -11 -14 -16 -18 -20 -21 -19 -19 -19 -19 -20 -20 -17 -14 -9 -1 0 -1 -4 -10 0 0 -32 -32 -35 -36 -37 -38 -38 -38 -38 -37 -36 -36 -36 -36 -35 -32 -29 -25 -16 -4 -1 -4 -1 0 -14 -28 -33 -35 -36 -37 -38 -38 -38 -37 -37 -36 -35 -34 -31 -21 -6 0 0 0 @@ -310,43 +156,15 @@ P2 0 0 0 -2 -11 -15 -10 -2 0 0 0 0 -7 -24 -32 -34 -36 -39 -39 -39 -35 -31 -30 -26 -25 -28 -32 -22 -7 0 0 -14 -31 -26 -17 -4 -1 -1 0 0 +13 0 0 0 @@ -355,145 +173,38 @@ P2 0 0 0 -9 -29 -35 -27 -6 -1 0 0 0 0 0 0 -1 -3 -5 -7 -9 -9 -7 -4 -1 0 0 0 0 -3 -4 -1 -4 0 0 0 -31 -25 -28 -31 -33 -34 -36 -36 -39 -39 -40 -40 -39 -39 -39 -36 -34 -30 -18 -5 0 0 -11 -27 -35 -24 -16 -16 -17 -17 -17 -18 -19 -19 -19 -20 -19 -27 -33 -24 -17 -17 -17 -17 -14 -12 -12 -10 -9 -7 -6 -1 -3 -9 -3 -3 -12 -16 -16 -17 -25 -34 -25 -15 -11 -7 -3 -1 -1 -1 -1 -1 -1 -11 -29 -34 -24 -6 -11 -33 -29 -6 0 0 0 0 0 -1 -6 -10 -11 -13 -14 -14 -13 -9 -1 -7 -33 -36 -35 -32 +0 +0 +41 +55 +46 +28 +23 +23 +23 +23 18 -14 -10 -6 -2 +8 0 0 0 @@ -501,150 +212,30 @@ P2 0 0 0 +8 +23 +38 +39 +39 +39 +23 +8 0 0 0 -2 -8 -14 -31 -30 -22 -10 -1 0 0 0 -32 -6 0 0 -1 -1 -1 -3 -4 -6 -6 -9 -9 -10 -11 -15 -21 -30 -31 -19 -5 -8 -24 -35 -28 -10 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -11 -29 -36 -36 -37 -37 -38 -37 -36 -36 -35 -34 -31 -26 -9 -1 +23 0 -2 -13 -28 -34 -36 -36 -37 -28 -7 -1 0 0 -1 -7 -11 -18 -18 -16 -10 -1 -12 -29 -34 -27 -34 -33 -11 -3 -19 -46 -47 -48 -52 -54 -55 -55 -55 -55 -55 -54 -53 -44 -6 0 -3 -37 -37 -36 -36 -36 -35 -34 -32 -28 -24 -21 -17 -15 -15 -15 -18 -23 -28 -34 -35 -36 -37 -32 -32 -26 -11 0 0 0 -14 -1 0 0 0 @@ -658,157 +249,54 @@ P2 0 0 0 -1 -5 -17 -32 -32 -21 -19 -34 -33 -16 -1 -8 -24 -25 -26 -26 -26 -26 -26 -25 -24 -11 -1 -11 -19 -19 -20 -20 -20 -20 -24 -25 -26 -27 -29 -32 -28 -11 -7 -14 -28 -32 -25 -23 -19 -20 -9 0 -20 -38 -45 -52 -53 -54 -54 -53 -51 -36 -11 -2 -12 -30 -39 -40 -19 -1 -16 -43 -54 -58 -59 -59 -59 -59 -59 -58 -57 -57 -56 -54 -54 -50 -4 -1 -10 -26 -30 +0 +0 +0 +0 +0 +0 +0 +0 +13 +13 +28 34 -36 -40 -40 -39 -39 -38 37 -36 -36 -36 -36 -36 38 -39 -40 -36 +38 +38 +38 +37 +34 +34 +34 +34 28 -5 -9 -25 -33 -26 +13 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +18 +22 +0 +0 +0 +0 0 0 0 -27 0 -24 -35 -37 -36 -35 -34 -33 -30 -27 22 -20 -17 -14 -9 -5 -3 -17 -34 -36 -36 -35 23 -1 -6 -30 -51 -53 -54 -56 -56 -56 -55 -54 -51 -36 -12 +8 0 0 0 @@ -820,169 +308,43 @@ P2 0 0 0 -4 -26 -35 -36 -36 -36 -35 -24 -6 0 0 0 0 -15 -44 -54 -57 -59 -54 -49 -44 -39 -44 -53 -38 -11 -1 -11 -12 -6 0 -5 +0 +0 +0 +0 +0 +0 +0 +0 +13 +23 34 -51 39 -27 -6 -6 -2 -2 -2 -1 -1 -1 -1 -4 -54 -54 39 -12 +39 +28 +8 +4 0 0 0 -1 -4 -8 -11 -16 -19 -23 -25 -26 -26 -26 -26 -22 -19 -14 -7 +13 0 0 0 -1 -6 -24 -34 0 0 +8 0 -28 -18 -41 -52 -56 -57 -57 -57 -57 -56 -56 -56 -56 -55 -53 -46 -29 -4 -1 -17 -34 -36 -30 -1 -1 -20 -53 -51 -37 -38 -36 -31 -31 -30 -31 -44 -53 -37 -20 -21 -26 -27 -27 -27 -22 -19 -18 -12 -7 -1 -2 -29 -39 -37 -35 -29 -9 -3 -14 -19 -22 -27 -43 -56 -31 -13 -8 -2 -2 -2 -3 -17 -46 -54 -37 -11 0 0 0 0 -20 -54 -44 -14 0 0 0 @@ -994,23 +356,13 @@ P2 0 0 0 -15 -44 -55 -44 -6 0 +28 0 0 0 0 0 -1 -1 -1 -1 -1 -1 0 0 0 @@ -1018,278 +370,66 @@ P2 0 0 0 -6 -18 -12 -2 -8 -24 0 0 0 -13 -37 -51 -50 -43 -44 -46 -46 -49 -49 -51 -53 -54 -57 -58 -57 -54 -31 -3 0 -1 -1 0 0 -10 -52 -55 -36 -1 -1 -1 -1 -1 -1 -3 -19 -45 -54 -46 -49 -55 -57 -57 -57 -56 -56 -54 -52 -46 -12 0 -1 -1 -1 0 0 -1 -14 -41 -54 -55 -56 -57 -40 -9 -1 0 0 -3 -9 -10 -3 -16 -46 -54 -38 -24 -29 +0 +0 +0 +0 +0 +0 +8 +0 +0 +8 +18 +23 34 -39 -50 -56 -28 -1 -14 -31 34 39 39 +40 +40 39 39 39 34 -31 -16 -1 -11 -51 -56 -50 -44 -41 -35 -31 -27 -21 -14 -9 -6 -4 +23 4 -7 -9 -11 -19 -24 -30 -37 -49 -53 -50 -49 -16 -3 -8 0 0 0 0 -51 -54 -39 -7 0 0 +28 0 0 0 0 0 -1 -6 -12 -29 -50 -51 -30 -7 0 0 0 0 -50 -57 -48 -1 -3 -19 -24 -25 -29 -34 -16 -3 -19 -44 -57 -48 -34 -29 -29 -29 -38 -39 -45 -49 -54 -51 -12 -0 0 0 0 -1 -6 -38 -54 -47 -40 -38 -35 -14 -1 -33 -53 -62 -68 -70 -59 -9 -3 -16 -46 -55 -56 -56 -57 -57 -58 -41 -2 -6 -46 -74 -75 -76 -76 -76 -76 -76 -75 -74 -59 -9 0 -5 -50 -57 -57 -57 -57 -56 -55 -54 -54 -53 -53 -51 -53 -53 -52 -54 -55 -56 -57 -57 -58 -54 -46 -56 -44 18 -3 0 0 0 0 -55 -44 -9 -0 -1 -2 0 0 0 @@ -1297,335 +437,47 @@ P2 0 0 0 -1 -6 -26 -49 -51 -39 -36 -36 -38 -40 -54 -59 -2 0 -17 -70 -72 -73 -73 -72 -51 -17 -3 -19 -36 -26 -6 0 0 0 0 0 0 -4 -44 -56 -50 -49 -48 -48 -51 -52 -54 -56 -50 -16 0 0 0 0 -19 -61 -75 -77 -77 -78 -73 -62 -6 -3 -14 -44 -39 -39 -33 -29 -25 -12 -1 -26 -74 -72 -63 -61 -59 -59 -59 -61 -64 -69 -76 -67 -10 -1 -12 23 -27 -31 -36 -44 -48 -52 -58 -59 -59 -58 -58 -59 -57 -53 -48 -39 -29 -19 -9 -2 -16 -44 -53 -42 -17 0 0 0 0 -47 -9 0 -1 -55 -68 -66 -57 -54 -50 -49 -46 -41 -30 -11 -6 -26 -49 -57 -57 -57 -57 -57 -57 -25 0 0 -71 -76 -62 -57 -51 -61 -74 -51 -16 -3 -8 -6 -11 -29 -29 -26 -24 -18 -9 -1 -1 -44 -57 -59 -59 -59 -59 -59 -58 -59 -22 -1 -7 -16 -19 -25 -43 -76 -51 -26 -21 -20 -74 -73 -63 0 -1 -2 -1 -1 -1 -1 -1 0 -14 -53 -75 -49 -1 0 0 0 0 -0 -1 -7 -68 -75 -57 -17 -1 +23 0 0 0 -1 -1 -1 -1 -6 -10 -14 -15 -15 -11 -6 -3 -1 -1 +18 0 0 0 -4 -4 -4 -39 -51 -41 0 0 0 0 -10 0 0 -53 -72 -76 -77 -77 -77 -77 -77 -77 -74 -66 -41 -12 -6 -21 -29 -29 -27 -26 -24 -23 -7 0 -54 -76 -68 -4 -3 -4 -24 -61 -72 -33 -1 -1 -11 -41 -68 -75 -74 -74 -74 -67 -17 0 -2 -6 -8 -8 -8 -8 -8 -11 -25 -2 -3 -49 -74 -74 -74 -75 -69 -29 -1 -1 -4 -20 -68 -71 -3 -1 -2 -6 -10 -14 -19 -29 -30 -30 -58 -60 -19 -1 0 0 0 @@ -1634,17 +486,9 @@ P2 0 0 18 -59 -73 -54 -33 -29 -25 -24 -14 -9 -3 -0 +34 +28 +13 0 0 0 @@ -1653,1797 +497,3315 @@ P2 0 0 0 -8 -19 -37 -49 -62 -55 -25 -1 -11 -39 -51 0 0 0 0 -7 0 -52 -71 -78 -45 -28 -29 -32 -34 -38 -41 -51 -67 -68 -41 -12 -1 0 0 0 -1 -1 -1 0 0 -54 -77 -4 -1 -15 -16 +8 4 -36 -74 -52 -35 -29 -41 -69 -70 -57 -56 -61 -69 -75 -72 -19 -1 0 0 0 0 0 0 -1 -2 +13 +0 +0 +0 +0 +0 +0 0 -42 -74 -77 -70 -67 -67 -58 -2 -11 -42 -20 -4 -57 -73 -61 -43 -46 -69 -72 -73 -73 -74 -70 -57 -62 -58 -17 -16 -50 -62 -62 -62 -60 -56 -21 -1 -39 -75 -75 -75 -74 -74 -72 -68 -71 -69 -63 -54 -49 -44 -43 -44 -52 -42 -47 -70 -74 -75 -77 -78 -74 -59 -19 -1 -24 -50 0 0 0 0 -10 0 -57 -75 -45 -14 -1 0 0 0 0 -2 -11 -36 -66 -68 -46 -30 -29 -29 -30 -29 -26 -31 -39 -44 -66 -77 -3 4 -87 -64 -1 -31 -76 -74 -72 -64 -67 -66 -47 -14 -1 -1 -6 -61 -76 -67 -59 -55 -57 -54 -53 -53 -49 -33 8 -27 -67 -80 -34 -1 -1 -6 -46 0 -20 -86 -52 -1 -48 -77 -76 -71 -71 -77 -78 -77 -71 -68 -68 -72 -73 -62 -24 -17 -65 -92 -92 -92 -90 -89 -49 -3 -22 -54 -52 -51 -51 -52 -62 -72 -77 -78 -77 -77 -76 -76 -76 -76 -77 -72 -76 -72 -52 -34 -19 -20 -55 -71 -58 -8 -21 -50 0 0 0 0 -10 0 -57 -76 -29 -4 -27 -45 -45 -42 -38 -29 -13 -9 -35 -67 -76 -74 -74 -74 -74 -69 -63 -68 -74 -75 -77 -77 -10 -1 -91 -72 -1 -20 -51 -47 -57 -73 -77 -57 -17 -5 -12 -10 -1 -3 -57 -74 -76 -77 -77 -77 -77 -77 -75 -67 -40 -46 -71 -51 -9 0 0 0 -1 0 -13 -90 -65 -1 -20 -40 -44 -66 -74 -46 -20 -9 -4 -2 -20 -55 -73 -64 -29 -9 -35 -54 -54 -63 -82 -86 -49 -2 -6 -14 -3 -1 -1 -3 -12 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +34 +34 +37 +37 38 -75 -12 -16 -21 -29 -32 -29 -26 -36 -72 -69 -19 -1 -1 +37 +34 +34 +28 +23 +8 0 0 -14 -69 -63 -14 -24 -51 0 0 0 0 -10 0 -57 -76 -29 -3 -46 -84 -92 -91 -88 -78 -50 -14 -9 -36 -57 -54 -54 -53 -56 -63 -73 -65 -47 -38 -33 -27 -5 -1 -91 -78 -0 -3 -3 -4 -21 -56 -62 -36 -8 -14 -63 -84 -21 -1 -6 -60 -51 -33 -27 -29 -29 +23 34 -47 -68 -69 -67 -77 -41 -6 -30 -64 -25 -1 +34 +37 +0 +0 +0 +0 +0 +0 0 -4 -91 -74 0 -2 -1 -8 -34 -42 -18 -2 0 0 0 0 -8 -56 -70 -43 -10 0 0 -3 -29 -74 -72 -28 0 -1 -9 23 -30 -30 -24 -8 0 -1 +23 +18 0 0 0 -1 -1 -1 0 -4 -31 -10 -4 -39 -64 -66 -25 -2 -52 -60 -11 -26 -52 0 0 0 0 -6 0 -59 -76 -29 -3 -48 -87 -73 -53 -60 -79 -80 -40 -3 -10 -6 -1 -1 -1 -6 -26 -49 -32 -8 -1 -1 -1 0 -1 -88 -82 0 -9 -29 -22 -5 -39 -49 -11 -6 -27 -69 -89 -27 -2 0 -14 -14 -6 -1 0 0 -2 -11 -38 -67 -77 -58 -21 -2 -39 -81 -43 -6 0 -1 -90 -84 -4 -11 -14 -10 -6 -14 -5 -26 -54 -67 -62 -23 0 -9 -69 -71 -39 -5 -1 -19 -62 -81 -41 -3 0 -11 -45 -75 -87 -88 -77 -48 -9 0 -2 -79 -56 -42 -65 -72 -54 -5 0 -4 -55 -86 -91 -91 -71 -3 -54 -56 -9 +37 +37 +34 +34 +34 28 -54 +23 +13 0 0 0 0 -6 0 -62 -77 -27 -3 -49 -87 -53 -6 -19 -61 -83 -45 0 -3 -14 -21 -24 -21 -14 -7 -10 -6 +0 +0 +0 +0 +23 +28 +34 +37 +13 +13 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +10 +10 +0 +0 +0 +2 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +13 +0 +0 +0 +0 +0 +13 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +4 +39 +40 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +4 +23 +34 +40 +40 +39 +39 +38 +37 +34 +34 +34 +34 +34 +38 +39 +40 +34 +0 +0 +0 +0 +18 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +23 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +4 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +8 +23 +39 +39 +39 +39 +39 +23 +8 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +23 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +18 +53 +62 +68 +70 +59 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +46 +74 +75 +76 +76 +76 +76 +76 +75 +74 +59 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +70 +72 +73 +73 +72 +51 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +61 +75 +77 +77 +78 +73 +62 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +74 +72 +63 +61 +59 +59 +59 +61 +64 +69 +76 +67 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +55 +68 +66 +57 +54 +50 +49 +46 +41 +4 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +71 +76 +62 +57 +51 +61 +74 +51 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +43 +76 +51 +26 +21 +20 +74 +73 +63 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +53 +75 +49 +1 +0 +0 +0 +0 +0 +1 +7 +68 +75 +57 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +53 +72 +76 +77 +77 +77 +77 +77 +77 +74 +66 +41 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +54 +76 +68 +4 +3 +4 +24 +61 +72 +18 +0 +0 +0 +41 +68 +75 +74 +74 +74 +67 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +49 +74 +74 +74 +75 +69 +29 +1 +1 +4 +20 +68 +71 +0 +0 +0 +0 +0 +0 +0 +0 +4 +4 +58 +60 +19 +1 +0 +0 +0 +0 +0 +0 +0 +18 +59 +73 +54 +18 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +37 +49 +62 +55 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +52 +71 +78 +45 +28 +29 +32 +34 +38 +41 +51 +67 +68 +41 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +54 +77 +4 +1 +15 +16 +4 +36 +74 +52 +28 +0 +41 +69 +70 +57 +56 +61 +69 +75 +72 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +42 +74 +77 +70 +67 +67 +58 +2 +11 +42 +20 +4 +57 +73 +61 +43 +46 +69 +72 +73 +73 +74 +70 +57 +62 +58 +17 +16 +50 +62 +62 +62 +60 +56 +21 +1 +39 +75 +75 +75 +74 +74 +72 +68 +71 +69 +63 +54 +49 +44 +43 +44 +52 +42 +47 +70 +74 +75 +77 +78 +74 +59 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +57 +75 +45 +14 +1 +0 +0 +0 +0 +2 +11 +36 +66 +68 +46 +4 +0 +0 +4 +0 +0 +8 +39 +44 +66 +77 +3 +4 +87 +64 +1 +31 +76 +74 +72 +64 +67 +66 +47 +14 +1 +1 +6 +61 +76 +67 +59 +55 +57 +54 +53 +53 +49 +18 +0 +0 +67 +80 +34 +1 +1 +6 +46 +0 +20 +86 +52 +1 +48 +77 +76 +71 +71 +77 +78 +77 +71 +68 +68 +72 +73 +62 +24 +17 +65 +92 +92 +92 +90 +89 +49 +3 +22 +54 +52 +51 +51 +52 +62 +72 +77 +78 +77 +77 +76 +76 +76 +76 +77 +72 +76 +72 +52 +34 +19 +20 +55 +71 +58 +0 +0 +0 +0 +0 +0 +0 +0 +0 +57 +76 +29 +4 +27 +45 +45 +42 +38 +29 +13 +9 +35 +67 +76 +74 +74 +74 +74 +69 +63 +68 +74 +75 +77 +77 +10 +1 +91 +72 +1 +20 +51 +47 +57 +73 +77 +57 +17 +5 +12 +10 +1 +3 +57 +74 +76 +77 +77 +77 +77 +77 +75 +67 +40 +46 +71 +51 +9 +0 +0 +0 +1 +0 +13 +90 +65 +1 +20 +40 +44 +66 +74 +46 +20 +9 +4 +2 +20 +55 +73 +64 +29 +9 +35 +54 +54 +63 +82 +86 +49 +2 +6 +14 +3 +1 +1 +3 +12 +38 +75 +12 +16 +21 +29 +32 +29 +26 +36 +72 +69 +19 +1 +1 +0 +0 +14 +69 +63 +0 +0 +0 +0 +0 +0 +0 +0 +0 +57 +76 +29 +3 +46 +84 +92 +91 +88 +78 +50 +14 +9 +36 +57 +54 +54 +53 +56 +63 +73 +65 +47 +38 +33 +27 +5 +1 +91 +78 +0 +3 +3 +4 +21 +56 +62 +36 +8 +14 +63 +84 +21 +1 +6 +60 +51 +33 +27 +29 +29 +34 +47 +68 +69 +67 +77 +41 +6 +30 +64 +25 +1 +0 +4 +91 +74 +0 +2 +1 +8 +34 +42 +18 +2 +0 +0 +0 +0 +8 +56 +70 +43 +10 +0 +0 +3 +29 +74 +72 +28 +0 +1 +9 +23 +30 +30 +24 +8 +0 +1 +0 +0 +0 +1 +1 +1 +0 +4 +31 +10 +4 +39 +64 +66 +25 +2 +52 +60 +0 +0 +0 +0 +0 +0 +0 +0 +0 +59 +76 +29 +3 +48 +87 +73 +53 +60 +79 +80 +40 +3 +10 +6 +1 +1 +1 +6 +26 +49 +32 +8 +1 +1 +1 +0 +1 +88 +82 +0 +9 +29 +22 +5 +39 +49 +11 +6 +27 +69 +89 +27 +2 +0 +14 +14 +6 +1 +0 +0 +2 +11 +38 +67 +77 +58 +21 +2 +39 +81 +43 +6 +0 +1 +90 +84 +4 +11 +14 +10 +6 +14 +5 +26 +54 +67 +62 +23 +0 +9 +69 +71 +39 +5 +1 +19 +62 +81 +41 +3 +0 +11 +45 +75 +87 +88 +77 +48 +9 +0 +2 +79 +56 +42 +65 +72 +54 +5 +0 +4 +55 +86 +91 +91 +71 +3 +54 +56 +0 +0 +0 +0 +0 +0 +0 +0 +0 +62 +77 +27 +3 +49 +87 +53 +6 +19 +61 +83 +45 +0 +3 +14 +21 +24 +21 +14 +7 +10 +6 +16 +36 +49 +39 +10 +1 +88 +84 +4 +41 +79 +42 +4 +31 +52 +12 +17 +74 +92 +91 +87 +79 +21 +1 +3 +21 +40 +44 +41 +31 +12 +9 +37 +68 +47 +8 +22 +63 +87 +76 +62 +22 +2 +71 +87 +42 +83 +85 +55 +7 +0 +10 +52 +84 +89 +87 +77 +14 +0 +52 +74 +55 +9 +10 +49 +83 +55 +10 +0 +4 +35 +84 +79 +62 +64 +79 +83 +46 +0 +9 +91 +91 +89 +91 +91 +92 +36 +1 +35 +82 +43 +12 +69 +69 +2 +56 +51 +0 +0 +0 +0 +0 +0 +0 +0 +0 +64 +77 +26 +2 +49 +87 +71 +46 +51 +72 +70 +26 +0 +16 +65 +79 +82 +81 +62 +21 +0 +14 +56 +83 +89 +80 +33 +4 +86 +86 +19 +80 +56 +11 +11 +41 +54 +13 +11 +64 +90 +92 +92 +90 +32 +2 +29 +62 +81 +88 +88 +77 +48 +13 +9 +47 +50 +9 +34 +81 +92 +92 +91 +39 +3 +62 +90 +82 +90 +91 +89 +36 +0 +21 +82 +76 +44 +59 +84 +38 +1 +51 +69 +27 +4 +35 +79 +67 +21 +0 +0 +10 +51 +84 +49 +6 +9 +47 +89 +64 +0 +18 +91 +84 +31 +6 +54 +87 +47 +7 +62 +87 +79 +90 +71 +4 +9 +64 +44 +0 +0 +0 +0 +0 +0 +0 +0 +0 +67 +78 +17 +2 +51 +87 +92 +92 +92 +88 +64 +20 +1 +21 +72 +57 +48 +64 +86 +51 +4 +38 +84 +71 +46 +60 +34 +5 +82 +87 +69 +80 +22 +1 +24 +68 +66 +26 +2 +5 +61 +89 +51 +31 +11 +11 +52 +84 +71 +54 +59 +78 +80 +39 +1 +33 +54 +11 +16 +56 +84 +74 +49 +20 +1 +57 +91 +67 +34 +52 +89 +57 +1 +34 +88 +64 +37 +67 +88 +45 +4 +49 +57 +1 +16 +69 +77 +35 +1 +0 +0 +14 +57 +81 +42 +2 +4 +40 +90 +57 +1 +24 +90 +71 +0 +5 +39 +84 +38 16 +69 +79 +17 +11 +35 +5 +19 +74 +4 +0 +0 +0 +0 +0 +0 +0 +0 +0 +67 +76 +12 +1 +55 +87 +65 +46 +51 +71 +85 +57 +8 +9 +30 +20 +24 +43 +89 +57 +10 +53 +81 +39 +4 +15 +9 +2 +79 +89 +77 +84 +32 +3 +21 +64 +77 +69 +18 +1 +59 +87 +41 +8 +0 +18 +62 +80 +41 +5 +9 +48 +89 +56 +0 +27 +64 +29 +4 +24 +74 +60 +13 +0 +1 +50 +89 +43 +6 +24 +77 +62 +1 +37 +91 +84 +67 +54 36 -49 -39 -10 +15 +1 +48 +33 +4 +42 +89 +72 +45 +43 +43 +29 +14 +51 +86 +67 +41 +45 +67 +82 +43 +0 +33 +89 +56 +0 +7 +50 +78 +28 +8 +67 +89 +91 +92 +90 +2 +28 +74 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +68 +72 +9 1 +59 88 +41 +5 +6 +43 84 +70 +24 +23 +59 +69 +67 +74 +89 +57 +12 +57 +79 +37 +4 +22 +21 4 -41 79 -42 +87 +23 +85 +72 +17 4 -31 -52 -12 +30 +74 +73 +26 +1 +54 +84 +49 +13 +1 +17 +62 +79 +39 +3 +5 +40 +90 +59 +0 +24 +78 +61 +14 +23 +73 +64 +16 +1 +0 +46 +89 +39 +0 17 +71 +66 +3 +28 +89 +67 +27 +33 +50 +21 +1 +64 +34 +8 +60 +92 +92 +92 +92 +92 +48 +9 +26 +62 +83 +89 +87 +77 +51 +14 +0 +32 +89 +55 +0 +10 +55 +72 +20 +1 +19 +63 +67 +43 +0 +7 +58 +73 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +69 +68 +8 +0 +72 +89 +72 +55 +50 +66 +86 +64 +25 +49 +84 +53 +21 +42 +89 +57 +7 +47 +87 +67 +55 +70 +39 +6 +79 +87 +1 +49 +84 +56 +5 +11 +57 74 +27 +1 +48 +82 +79 +64 +26 +11 +51 +86 +67 +41 +43 +66 +84 +50 +0 +24 +78 +62 +18 +21 +71 +77 +51 +26 +2 +44 +89 +41 +0 +16 +69 +68 +7 +4 +81 +88 +90 92 91 -87 -79 -21 +33 1 -3 -21 -40 +68 +34 +6 +39 44 -41 -31 -12 -9 37 -68 -47 -8 -22 -63 -87 -76 -62 +29 22 +18 +6 +1 2 -71 -87 -42 -83 -85 -55 -7 -0 +12 +24 +30 +34 +25 10 -52 -84 -89 -87 -77 -14 0 -52 -74 -55 -9 -10 -49 -83 -55 -10 +1 +21 +51 +26 +1 +6 +26 +22 +4 +6 +1 +1 0 4 -35 -84 -79 -62 -64 -79 -83 -46 +19 +49 +74 +18 +0 +0 +0 0 -9 -91 -91 -89 -91 -91 -92 -36 -1 -35 -82 -43 -12 -69 -69 -2 -56 -51 -8 -31 -54 0 0 0 +13 0 +34 +70 +62 +8 5 -2 +73 +89 +92 +91 +89 +81 64 +30 +10 +41 +81 +79 +70 77 +84 +54 +1 26 -2 -49 -87 -71 -46 -51 +67 +85 +88 72 -70 -26 +24 +1 +78 +84 0 -16 +9 +61 +54 +15 +11 +57 +77 +34 +3 +18 +64 +87 +85 +41 +4 +25 65 -79 +84 +89 +89 82 -81 62 21 -0 +4 +33 +78 +64 +20 14 -56 -83 +57 +87 89 -80 -33 +51 4 -86 -86 -19 -80 -56 -11 -11 -41 -54 -13 -11 -64 -90 -92 -92 -90 +40 +87 +45 +0 +14 +67 +67 +12 +0 +15 +60 +67 +60 +40 +9 +0 +71 +40 +6 +0 +0 +0 +0 +0 +0 +1 +59 +23 +5 +1 +1 +1 +6 +21 +39 +21 +1 +1 +3 +22 +14 +0 +0 +27 +66 +31 32 +79 +77 +77 +74 +34 +0 +0 +0 +0 +0 +0 +0 +0 +8 +0 +42 +71 +63 +25 2 -29 -62 -81 -88 -88 -77 -48 -13 -9 -47 -50 -9 -34 -81 -92 -92 -91 -39 -3 -62 -90 -82 -90 -91 -89 -36 0 -21 -82 -76 -44 -59 -84 -38 +0 +9 +26 +31 +29 +17 +5 1 +14 +41 +54 51 -69 -27 -4 +41 +46 +30 +2 +6 +21 35 -79 -67 +33 21 +4 0 +4 +1 +4 +1 0 -10 -51 -84 -49 -6 -9 -47 -89 -64 0 +4 +22 +58 +76 +66 18 -91 -84 +4 +16 +29 31 -6 +18 +2 +5 +21 +43 54 -87 +54 +44 +19 +3 +21 +57 +76 +68 +31 +6 +23 +51 +53 +26 +1 +21 47 -7 -62 -87 -79 -90 -71 +24 +1 +6 +25 +21 4 -9 -64 -44 6 -34 -64 0 0 0 0 -5 -6 -67 +0 +0 +57 +76 +72 +45 +48 +57 +68 +77 78 -17 -2 -51 -87 -92 -92 -92 -88 -64 -20 -1 -21 +78 +77 +76 +77 +77 +78 +77 72 +69 +69 +75 +62 +54 +54 57 -48 -64 -86 -51 -4 -38 -84 -71 -46 -60 -34 -5 -82 -87 69 -80 -22 -1 -24 +64 68 -66 -26 -2 -5 -61 -89 +76 +77 +72 +76 +74 +62 +51 +28 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 51 +74 +62 31 -11 -11 -52 -84 -71 -54 -59 -78 -80 -39 +16 +8 1 -33 -54 +0 +0 +2 11 -16 -56 -84 -74 -49 -20 +28 +26 +9 1 -57 -91 -67 -34 -52 -89 -57 1 -34 -88 -64 -37 -67 -88 -45 +2 +2 4 -49 -57 +5 +19 +22 +5 1 +1 +3 +24 +6 +2 +5 16 -69 -77 -35 +26 +21 +24 +34 +63 +74 +72 +76 +63 +21 +3 +0 +0 +4 +19 +23 +6 1 0 0 -14 +1 +6 +22 57 -81 -42 +73 +66 +72 +59 +21 +3 +0 +0 2 4 -40 -90 -57 1 -24 -90 -71 -0 -5 -39 -84 -38 +1 +3 16 -69 -79 -17 -11 -35 -5 +14 +0 +0 19 +62 +24 +14 +17 +29 +49 +60 +76 +69 +67 74 -30 -1 -38 +75 +74 +74 +64 +56 +50 +46 +45 +48 +51 +54 +62 +65 +69 +61 +69 +72 +72 +72 +72 +72 +73 69 +64 +51 +28 0 0 0 0 -4 -11 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +57 +0 +0 +0 +52 +72 +76 +77 +77 +78 +78 +74 +60 +60 67 +64 +50 +42 +40 +40 +41 +43 +44 +59 +60 +51 +50 +54 +60 +74 76 -12 -1 -55 -87 -65 +78 +77 +77 +77 +77 +77 +76 +72 +58 +0 +59 +74 +67 +57 +50 46 -51 -71 -85 +44 57 -8 -9 -30 -20 -24 +61 43 -89 -57 -10 -53 -81 -39 +35 +30 +29 +29 +38 +59 +72 +52 4 -15 -9 -2 -79 -89 -77 -84 -32 -3 -21 -64 -77 -69 -18 -1 +54 +72 59 -87 -41 -8 +31 +26 +30 +34 +38 +36 +36 +39 +54 +54 +48 +54 +65 +76 +78 +78 +77 +76 +75 +74 +72 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 0 -18 -62 -80 -41 -5 -9 -48 -89 -56 0 -27 -64 -29 -4 -24 -74 -60 -13 0 -1 -50 -89 -43 -6 -24 -77 -62 -1 -37 -91 -84 -67 -54 -36 -15 -1 -48 -33 -4 -42 -89 -72 -45 -43 -43 -29 -14 -51 -86 -67 -41 -45 -67 -82 -43 0 -33 -89 -56 0 -7 -50 -78 -28 -8 -67 -89 -91 -92 -90 -2 -28 -74 -21 0 55 -64 +54 0 0 0 0 -4 -16 -68 -72 -9 -1 -59 -88 -41 -5 -6 -43 -84 -70 -24 -23 -59 +0 +0 +47 +57 +63 69 +74 +70 +61 67 74 -89 -57 -12 -57 -79 -37 -4 -22 -21 -4 -79 -87 -23 -85 +74 +74 +74 +74 +73 +72 +70 72 -17 -4 -30 +74 74 73 -26 -1 -54 -84 -49 -13 -1 -17 -62 -79 -39 -3 -5 -40 -90 -59 +72 +71 +68 +65 +60 +55 +51 +46 +46 +48 +45 0 -24 -78 -61 -14 -23 -73 -64 -16 -1 0 -46 -89 -39 0 -17 -71 -66 -3 -28 -89 -67 -27 -33 +57 +72 +74 +75 +75 +76 +72 +72 +75 +76 +76 +77 +77 +75 +69 50 -21 -1 -64 -34 -8 -60 -92 -92 -92 -92 -92 -48 -9 -26 -62 -83 -89 -87 +0 +0 +0 +54 +73 +77 +77 +77 77 +76 +75 +75 +75 +74 +74 +75 +75 +74 51 -14 +62 +59 +47 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 0 -32 -89 -55 0 -10 -55 -72 -20 -1 -19 -63 -67 -43 0 -7 -58 -73 -16 0 -54 -52 0 0 0 -16 -3 -22 -69 -68 -8 0 -72 -89 -72 -55 -50 -66 -86 -64 -25 -49 -84 -53 -21 -42 -89 -57 -7 -47 -87 -67 -55 -70 -39 -6 -79 -87 -1 -49 -84 -56 -5 -11 -57 -74 -27 -1 -48 -82 -79 -64 -26 -11 -51 -86 -67 -41 -43 -66 -84 -50 0 -24 -78 -62 -18 -21 -71 -77 -51 -26 -2 -44 -89 -41 0 -16 -69 -68 -7 -4 -81 -88 -90 -92 -91 -33 -1 -68 -34 -6 -39 -44 -37 -29 -22 -18 -6 -1 -2 -12 -24 -30 -34 -25 -10 0 -1 -21 -51 -26 -1 -6 -26 -22 -4 -6 -1 -1 0 4 -19 -49 -74 -33 0 -14 -54 -18 0 0 0 -32 -2 -36 -70 -62 -8 -5 -73 -89 -92 -91 -89 -81 -64 -30 -10 -41 -81 -79 -70 -77 -84 +34 54 -1 -26 -67 -85 -88 -72 -24 -1 -78 -84 +50 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 0 -9 -61 -54 -15 -11 -57 -77 -34 -3 -18 -64 -87 -85 -41 -4 -25 -65 -84 -89 -89 -82 -62 -21 -4 -33 -78 -64 -20 -14 -57 -87 -89 -51 -4 -40 -87 -45 0 -14 -67 -67 -12 0 -15 -60 -67 -60 -40 -9 0 -71 -40 -6 0 0 0 0 0 0 -1 -59 -23 -5 -1 -1 -1 -6 -21 -39 -21 -1 -1 -3 -22 -14 0 0 -27 -66 -31 -32 -79 -77 -77 -74 -36 -2 -6 -56 -46 -2 0 0 0 -31 -1 -42 -71 -63 -25 -2 0 0 -9 -26 -31 -29 -17 -5 -1 -14 -41 -54 -51 -41 -46 -30 -2 -6 -21 -35 -33 -21 -4 0 -4 -1 -4 -1 0 0 -4 -22 -58 -76 -66 -18 -4 -16 -29 -31 -18 -2 -5 -21 -43 -54 -54 -44 -19 -3 -21 -57 -76 -68 -31 -6 -23 -51 -53 -26 -1 -21 -47 -24 -1 -6 -25 -21 -4 -6 0 0 0 0 0 0 -57 -76 -72 +0 +0 +23 +23 +23 +39 +41 +44 45 -48 -57 -68 -77 -78 -78 -77 -76 -77 -77 -78 -77 -72 -69 -69 -75 -62 -54 -54 -57 -69 -64 -68 -76 -77 -72 -76 -74 -62 -51 -35 +46 +46 23 -2 0 -57 -50 -17 0 0 0 0 -18 -1 -9 -51 -74 -62 -31 -16 -8 -1 +42 +47 +46 +44 +42 +39 +37 +37 +34 +13 +0 +0 +0 +0 +0 +0 +0 +0 +0 0 0 -2 -11 -28 -26 -9 -1 -1 -2 -2 -4 -5 -19 -22 -5 -1 -1 -3 -24 -6 -2 -5 -16 -26 -21 -24 -34 -63 -74 -72 -76 -63 -21 -3 0 0 -4 -19 -23 -6 -1 0 0 -1 -6 -22 -57 -73 -66 -72 -59 -21 -3 0 0 -2 -4 -1 -1 -3 -16 -14 0 0 -19 -62 -24 -14 -17 -29 -49 -60 -76 -69 -67 -74 -75 -74 -74 -64 -56 -50 -46 -45 -48 -51 -54 -62 -65 -69 -61 -69 -72 -72 -72 -72 -72 -73 -69 -64 -51 -35 0 0 0 @@ -3451,102 +3813,48 @@ P2 0 0 0 -56 -51 -22 0 0 0 0 0 -57 -11 0 -6 -52 -72 -76 -77 -77 -78 -78 -74 -60 -60 -67 -64 -50 -42 -40 -40 -41 -43 -44 -59 -60 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +28 51 -50 -54 -60 -74 -76 -78 -77 -77 -77 -77 -77 -76 -72 +56 58 -23 -59 -74 -67 -57 -50 -46 -44 -57 -61 -43 -35 -30 -29 -29 -38 59 -72 +58 52 -30 -54 -72 -59 -31 -26 -30 -34 -38 -36 -36 -39 -54 -54 -48 -54 -65 -76 -78 -78 -77 -76 -75 -74 -72 -6 -26 -21 -9 +46 +41 +13 +0 0 0 0 @@ -3572,154 +3880,29 @@ P2 0 0 0 -9 -15 -24 -33 -41 -48 -57 -51 -25 0 -11 0 0 +39 0 0 -55 -54 -14 0 -5 -13 -21 -28 -47 -57 -63 -69 -74 -70 -61 -67 -74 -74 -74 -74 -74 -73 -72 -70 -72 -74 -74 -73 -72 -71 -68 -65 -60 -55 -51 -46 -46 -48 -45 -16 0 -11 -57 -72 -74 -75 -75 -76 -72 -72 -75 -76 -76 -77 -77 -75 -69 -50 -16 -2 -19 -54 -73 -77 -77 -77 -77 -76 -75 -75 -75 -74 -74 -75 -75 -74 -51 -62 -59 -47 -28 -17 -9 0 0 0 0 0 -9 -17 -26 -52 -57 -57 -58 -57 -57 -52 -28 -26 -22 -19 -19 -16 -16 -16 -14 -17 -19 -26 -52 -58 -59 -58 -57 -57 -57 -56 -54 -45 -26 -1 -9 -30 0 0 0 0 -36 -54 -50 -15 -1 +0 +0 +0 +0 +0 +28 0 0 0 @@ -3729,20 +3912,6 @@ P2 0 0 0 -3 -14 -21 -22 -26 -26 -26 -24 -22 -21 -19 -16 -4 -1 0 0 0 @@ -3754,43 +3923,7 @@ P2 0 0 0 -1 -4 0 -3 -9 -19 -25 -28 -34 -34 -34 -39 -41 -44 -45 -46 -46 -34 -14 -3 -8 -4 -18 -42 -47 -46 -44 -42 -39 -37 -37 -36 -32 -28 -25 -18 -2 0 0 0 @@ -3798,94 +3931,11 @@ P2 0 0 0 -12 -37 -51 -59 -59 -58 -57 -55 -55 -54 -53 -54 -54 -54 -54 -54 -54 -54 -55 -56 -57 -57 -57 -57 -57 -54 -54 -51 -45 -41 -35 -29 -21 -14 -8 -7 -28 -27 -12 0 0 0 0 0 -25 -9 -35 -51 -56 -58 -59 -58 -52 -46 -41 -32 -20 -13 -8 -8 -2 -1 -1 -1 -1 -1 -1 -4 -1 -1 -1 -3 -7 -9 -11 -14 -16 -18 -20 -21 -24 -24 -21 -18 -19 -39 -11 -1 0 0 0 @@ -3899,12 +3949,6 @@ P2 0 0 0 -1 -6 -22 -35 -16 -2 0 0 0 @@ -3912,51 +3956,13 @@ P2 0 0 0 -1 0 0 0 0 0 -1 -7 -14 -29 -41 -49 -57 -58 -55 -54 -54 -45 -37 -26 0 -5 -14 -17 -20 -20 -17 -14 -11 -5 -2 0 -1 -2 -6 -25 -25 -6 -2 -1 -5 -17 -26 -27 -10 0 0 0 @@ -3970,12 +3976,6 @@ P2 0 0 0 -27 -1 -6 -12 -18 -26 41 49 55 @@ -4018,46 +4018,46 @@ P2 46 41 38 -34 -31 -28 -29 -27 -27 -26 -26 -24 -24 -33 +23 +8 +0 +0 +0 +0 +0 +0 +0 +0 +18 46 54 42 -26 -24 -24 -25 -26 -28 -28 -31 -33 -35 -37 -41 -53 -59 -59 -57 -57 -57 -56 -55 -48 -24 -10 0 -19 -23 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 0 0 0 diff --git a/machine/tz/animation/bttzwave/bttzwave_0001_003.pgm b/machine/tz/animation/bttzwave/bttzwave_0001_003.pgm index 1cbb23573..2a58acd7e 100644 --- a/machine/tz/animation/bttzwave/bttzwave_0001_003.pgm +++ b/machine/tz/animation/bttzwave/bttzwave_0001_003.pgm @@ -67,66 +67,68 @@ P2 0 0 0 -22 -50 -41 -34 -35 -35 -35 -34 -31 -25 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 1 1 2 0 0 -13 -29 -31 -33 -34 -35 -34 -19 -15 +12 +0 +0 +0 +0 +0 +0 +3 +10 11 9 5 3 1 -13 -28 -27 -16 +12 +0 0 +2 0 0 0 0 0 -19 +0 +10 41 24 -16 +2 +5 17 -21 -19 -16 -13 -9 -6 -4 -1 +10 +2 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 0 0 0 0 0 -1 -4 -11 0 0 0 @@ -180,66 +182,17 @@ P2 0 0 0 -5 -10 24 40 31 -10 0 0 0 0 -4 -17 -30 -33 -34 -36 -38 -39 -40 -35 -30 -25 -21 -27 -34 -26 -1 0 0 -11 -30 -33 -35 -37 -39 -37 -37 -37 -36 -36 -36 -35 -32 -29 -26 -22 -19 -15 -13 -10 -6 +5 0 -4 -14 -19 -19 -20 -21 -17 -11 0 0 0 @@ -247,58 +200,17 @@ P2 0 0 0 -6 -10 -14 -16 -15 -8 -1 -3 0 0 +7 0 0 0 -4 -4 -3 -4 -4 -4 -4 -4 -4 -4 -5 -6 -8 -9 -11 +1 +0 +0 11 -9 -4 -2 -6 -4 0 -7 -23 -31 -34 -35 -36 -36 -36 -37 -36 -36 -35 -34 -32 -30 -25 -1 0 0 0 @@ -310,296 +222,55 @@ P2 0 0 0 -3 -12 -11 -1 0 -4 -6 -9 -19 -33 -31 -22 -22 -20 -16 -11 -6 -2 -1 -1 -1 -11 -29 -34 -26 -3 +0 +0 +0 10 -28 -34 -24 -21 -19 -21 -25 -28 -33 -37 -40 -40 -39 -39 -39 -38 -37 -36 -35 -34 -31 -24 -6 0 -5 -11 -8 -4 -1 0 0 -1 -8 -13 -20 -25 -29 -34 -35 -36 -35 -34 -31 -24 +0 +0 +0 +0 10 -1 +10 +13 +17 +5 +0 +0 +0 0 0 0 0 0 -24 -31 -32 -33 -34 -34 -34 -34 -35 -36 -36 -36 -36 -36 -35 -33 -28 -17 -5 0 0 -8 -24 -34 -26 -19 -20 -20 -21 -21 -21 -24 -26 -29 -31 -33 -34 -31 -27 -1 0 -1 -4 -5 -7 -9 -11 -11 -12 -9 -1 -4 2 0 -16 -31 -34 -34 -36 -34 -16 -1 -1 -1 -1 -1 0 0 0 -5 -9 -1 -12 -29 -34 -24 -21 -30 -31 -21 -6 0 0 0 0 0 -3 -7 -10 -14 -16 -19 -24 -29 -33 -34 -34 -32 -33 -26 -6 0 0 0 0 0 -4 -12 -34 -35 -36 -38 -39 -39 -36 -31 -25 -20 -19 -26 -32 -26 -10 0 0 0 0 0 -42 -34 -36 -37 -38 -39 -39 -39 -39 -40 -40 -40 -37 -35 -33 -31 -31 -31 -19 -5 -8 -24 -35 -28 -10 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -4 -36 -34 -31 -33 -34 -35 -35 -35 -35 -34 -34 -32 -25 -11 -1 0 -11 -29 -35 -36 -34 -33 -25 -1 -6 -17 -20 -23 -26 -31 -36 -42 -48 -41 -8 -2 -11 -30 -36 -36 -35 -25 -10 -1 -5 -5 -1 0 0 0 @@ -612,169 +283,71 @@ P2 0 0 0 -1 -1 -35 -35 -28 -9 -14 -19 -23 -29 -34 -36 -39 -31 -24 -16 -10 -4 0 0 0 0 -2 -9 -24 -34 -28 0 0 0 0 0 -44 -22 -14 -14 -14 -14 -14 -14 -13 -11 -9 -4 -1 0 0 -5 -16 -32 -32 -21 -26 -36 -29 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 10 0 -12 -24 -25 -26 -26 -21 -19 -15 -10 -5 -1 -1 -7 -35 -39 -39 -39 -40 -40 -37 -34 -32 -29 -27 -32 -27 -20 -21 -28 -36 -20 -3 0 0 0 -1 -19 -50 -53 -54 -55 -56 -56 -57 -56 -52 -44 -5 -1 -9 -31 -31 -27 -14 +12 +2 0 -5 -22 -46 -46 -41 -39 -34 -29 -26 -21 -14 -10 -6 -1 0 0 0 0 -4 -36 -36 -36 -36 -37 -39 -39 -37 -28 -1 0 0 0 0 0 -8 -15 -20 -24 -13 3 +10 +0 +0 +0 +7 +10 7 -26 -34 0 0 0 0 0 -24 -10 -1 0 0 0 @@ -787,157 +360,27 @@ P2 0 0 0 -1 -2 -17 -33 -36 -37 -29 -10 0 -12 -39 -52 -54 -55 -55 -54 -54 -54 -52 -50 -45 -2 -1 -5 -5 -6 -4 -3 -1 -1 0 0 0 -5 -24 -35 -37 -38 -38 -27 -8 0 0 0 -1 -6 -51 -54 -46 -46 -39 -36 -32 -26 -21 -49 -54 -45 0 -1 0 0 0 +12 0 0 -18 -44 -51 -55 -57 -57 -57 -57 -57 -56 -56 -55 -55 -51 -46 -41 -38 -9 0 -4 -36 -33 -26 -20 -14 -6 -1 -1 -2 -13 -25 -35 -44 -53 -54 -55 -54 -51 -40 -17 -3 -6 -26 0 0 0 0 0 -7 -1 -11 -23 -26 -26 -27 -28 -29 -31 -34 -34 -37 -40 -42 -29 -4 -2 -16 -26 -25 -14 0 -13 -39 -55 -43 -30 -30 -36 -39 -44 -48 -52 -55 -52 -44 -4 0 0 0 @@ -946,172 +389,45 @@ P2 0 0 0 -1 -4 -1 -4 -25 -29 -26 -24 -11 -2 -16 -37 -44 -49 -51 -57 -54 -2 -2 -2 -1 -1 -1 -3 -17 -47 -54 -41 -6 0 0 0 0 -14 -39 -51 -46 -33 -28 -32 -35 -38 -38 -46 -51 -57 -59 -59 -57 -56 -54 -41 -10 0 -1 0 0 0 0 0 -4 -19 -53 -54 -56 -57 -58 -56 -46 -38 -32 -41 -51 -43 -16 -2 -6 0 0 0 0 0 0 -9 -31 -51 -55 -57 -57 -57 -57 -57 -57 -57 -57 -57 -55 -54 -31 -4 +5 +0 +0 0 0 0 0 +0 +10 12 -39 -56 -44 -16 -1 -1 -1 -1 -2 -2 -3 -6 -56 -54 -43 -29 -43 -41 -41 -42 -42 -47 -48 -50 -49 12 -1 +7 +7 +7 +0 +0 +0 0 0 0 0 0 -9 -34 -52 -57 -58 -58 -59 -8 0 -3 -8 -13 -18 -24 -16 -3 -19 -46 -53 -41 -36 -36 -36 -35 -39 -50 -49 -30 -10 0 0 0 @@ -1119,176 +435,29 @@ P2 0 0 0 -1 -6 -14 -18 -22 -43 -54 -42 -7 0 -5 -14 -29 -37 -48 -54 -55 -52 -41 -28 -18 -9 -1 -1 -1 -4 -14 -38 -53 -44 -16 -1 0 0 0 0 0 0 -31 -51 -49 -37 -35 -35 -35 -34 -31 -29 -29 -26 -24 -31 -51 -55 -31 -9 -11 -16 -19 -34 -55 -44 -16 -1 -17 -25 -24 -17 -12 -6 -1 -3 -11 -53 -54 -49 -54 -57 -57 -58 -58 -58 -57 -57 -54 -51 -11 -3 -6 -6 -9 -11 -22 -46 -47 -29 -21 -19 -14 2 0 -62 -70 -71 -71 -70 -54 -15 -3 -19 -44 -56 -57 -57 -57 -57 -57 -51 -34 -12 -4 -15 -25 -26 -26 -19 -12 -3 0 0 0 0 +2 0 -15 -44 -55 -48 -53 -54 -55 -57 -57 -59 -49 -29 -1 -1 -1 0 0 -9 -21 -28 -19 -4 -11 -39 -53 -44 -15 0 0 0 0 0 0 -51 -52 -30 -4 0 0 0 @@ -1297,1742 +466,3259 @@ P2 0 0 0 -1 -6 -26 -53 -56 -54 -55 -55 -54 -54 -48 -16 -1 -18 -46 -72 -72 -72 -71 -70 -63 -4 -3 -15 -48 -58 -40 -24 -19 -19 -19 -19 -17 -16 -39 -54 -50 -52 -54 -54 -54 -54 -54 -55 -38 -9 0 +7 0 0 0 -41 -72 -77 -78 -75 -71 -73 -56 -15 -3 -17 -36 -36 -36 -36 -36 -36 -29 -14 -4 -22 -55 -74 -75 -76 -75 -74 -74 -69 -60 -54 -46 -17 -1 -14 -47 -58 -58 -49 -33 -21 -12 -1 -1 0 -14 -21 -39 -59 -69 -73 -74 -70 -56 -25 -4 -10 -39 -52 -44 0 0 0 0 0 0 -52 -31 -5 -5 -19 -22 -24 -24 -26 -29 -33 -34 -29 -11 -6 -26 -55 -57 -53 -47 -42 -38 -21 +2 +10 0 -17 -54 -74 -69 -60 -65 -72 -78 -73 -59 -11 -3 -16 -31 -19 -3 0 0 0 0 0 0 -10 -38 -55 -58 -59 -59 -59 -57 -53 -49 -16 -2 -15 -26 -29 -42 -64 -78 -32 -13 -7 -11 -74 -73 -51 0 -1 -1 -1 -1 -1 -1 -1 0 -3 -22 -55 -72 -60 -51 -51 -62 -65 -73 -78 -78 -77 -75 -57 -15 -1 -7 -3 0 -1 -1 0 0 -9 -27 -72 -67 -63 -74 -77 -70 -59 -51 -58 -71 -59 -24 -3 -9 -45 -52 0 0 0 0 0 0 -31 -5 -4 -30 -67 -75 -75 -75 -75 -76 -76 -74 -66 -41 -11 -6 -7 -2 0 -1 -2 -1 -1 0 -36 -73 -68 -41 -3 -4 -4 -11 -73 -74 -54 -14 -3 -7 -4 -14 -32 -39 -39 -41 -40 -23 -4 +0 +0 +0 +0 +0 +12 10 -19 -19 -18 -15 -8 -4 -7 -22 -1 -11 -54 -74 -74 -74 -77 -49 -9 -1 0 -4 -9 -77 -61 -14 -16 -19 -24 -25 -25 -25 -25 -23 -23 -44 -70 -53 -19 0 0 0 0 0 0 -4 -11 -67 -75 -60 -9 0 -3 -11 -30 -45 -59 -70 -73 -77 -65 -67 -74 -48 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 10 -1 -1 -5 -19 -51 -72 -59 -16 -1 -34 -52 0 0 0 0 0 0 -6 -4 -28 -67 -73 -61 -58 -56 -52 -51 -49 -51 -67 -68 -41 -11 0 0 -2 -9 -11 -18 -25 -29 -47 -75 -52 -2 -2 -6 0 -4 -16 -64 -72 -25 -1 -1 -12 -41 -67 -75 -75 -75 -74 -59 -26 -4 0 0 0 0 0 0 -1 -1 0 -47 -76 -72 -64 -61 -59 -43 -1 -36 -61 -13 -4 -79 -72 -68 -54 -63 -73 -74 -74 -74 -74 -70 -57 -54 -64 -29 -4 -19 -32 -24 -19 -15 -8 -4 0 -6 -72 -74 -73 -73 -74 -73 -73 -76 -78 -69 -51 -2 -7 -34 -35 -8 0 -19 -29 -23 -6 -16 -57 -72 -31 -4 -32 -53 0 0 0 0 0 0 -4 -17 -65 -73 -52 -9 0 0 0 0 -2 -11 -36 -66 -69 -55 -55 -68 -73 -69 -57 -62 -73 -73 -74 -77 -54 0 -11 -87 -79 -9 -4 -55 -74 -53 -37 -29 -39 -68 -69 -51 -44 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +5 +13 +17 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +10 +0 +0 +0 +0 +0 +0 +0 +2 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +2 +0 +0 +7 +0 +0 +0 +0 +0 +0 +10 +5 +0 +0 +17 +10 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +12 +7 +0 +0 +12 +0 +0 +0 +0 +0 +10 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +21 +0 +0 +0 +0 +0 +0 +0 +17 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +13 +10 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +5 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +17 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +7 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +12 +0 +0 +0 +0 +0 +0 +5 +0 +0 +0 +0 +0 +0 +0 +0 +5 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +17 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +2 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +2 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +5 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +10 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +2 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +2 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +7 +24 +2 +0 +10 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +7 +21 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +7 +0 +0 +0 +0 +0 +0 +0 +0 +0 +2 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +10 +0 +0 +0 +0 +0 +0 +2 +10 +0 +0 +0 +2 +0 +5 +25 +24 +5 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +21 +0 +0 +0 +17 +10 +0 +0 +0 +62 +70 +71 +71 +70 +54 +0 +0 +10 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +25 +26 +26 +10 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +17 +28 +10 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +2 +0 +7 +46 +72 +72 +72 +71 +70 +63 +0 +0 +0 +0 +0 +0 +10 +10 +10 +10 +10 +5 +2 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +41 +72 +77 +78 +75 +71 +73 +56 +0 +0 +5 +0 +0 +0 +0 +0 +0 +0 +0 +0 +21 +55 +74 +75 +76 +75 +74 +74 +69 +60 +54 +46 +5 +0 +0 +0 +0 +0 +0 +0 +17 +0 +0 +0 +0 +0 +17 +39 +59 +69 +73 +74 +70 +56 +25 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +10 +21 +24 +24 +26 +29 +33 +34 +29 +0 +0 +0 +0 +0 +0 +0 +0 +0 +17 +0 +5 +54 +74 +69 +60 +65 +72 +78 +73 +59 +0 +0 +2 +0 +10 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +2 +0 +0 +26 +29 +42 +64 +78 +32 +13 +7 +11 +74 +73 +51 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +21 +55 +72 +60 +51 +51 +62 +65 +73 +78 +78 +77 +75 +57 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +27 +72 +67 +63 +74 +77 +70 +59 +51 +58 +71 +59 +24 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +30 +67 +75 +75 +75 +75 +76 +76 +74 +66 +41 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +36 +73 +68 +41 +3 +4 +4 +11 +73 +74 +54 +0 +0 +0 +0 +0 +32 +39 +39 +41 +40 +23 +0 +0 +10 +10 +7 +0 +0 +0 +0 +21 +0 +0 +54 +74 +74 +74 +77 +49 +9 +1 +0 +4 +9 +77 +61 +0 +2 +10 +24 +25 +25 +25 +25 +23 +23 +44 +70 +53 +19 +0 +0 +0 +0 +0 +0 +4 +11 +67 +75 +60 +0 +0 +0 +0 +30 +45 +59 +70 +73 +77 +65 +67 +74 +48 +10 +1 +1 +5 +19 +51 +72 +59 +2 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +28 +67 +73 +61 +58 +56 +52 +51 +49 +51 +67 +68 +41 +0 +0 +0 +0 +0 +0 +7 +25 +29 +47 +75 +52 +2 +2 +6 +0 +4 +16 +64 +72 +25 +0 +0 +0 +41 +67 +75 +75 +75 +74 +59 +26 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +47 +76 +72 +64 +61 +59 +43 +1 +36 +61 +13 +4 +79 +72 +68 +54 +63 +73 +74 +74 +74 +74 +70 +57 +54 +64 +29 +4 +19 +32 +24 +19 +15 +8 +4 +0 +6 +72 +74 +73 +73 +74 +73 +73 +76 +78 +69 +51 +2 +7 +34 +35 +8 +0 +19 +29 +23 +6 +16 +57 +72 +31 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +5 +65 +73 +52 +9 +0 +0 +0 +0 +2 +11 +36 +66 +69 +55 +55 +68 +73 +69 +57 +62 +73 +73 +74 +77 +54 +0 +11 +87 +79 +9 +4 +55 +74 +53 +37 +29 +39 +68 +69 +51 +44 +44 +55 +72 +59 +39 +36 +39 +41 +42 +44 +43 +31 +0 +27 +69 +80 +29 +1 +1 +11 +31 +0 +49 +87 +21 +3 +75 +75 +72 +77 +69 +57 +52 +51 +51 +53 +62 +72 +73 +64 +29 +13 +56 +92 +92 +92 +91 +90 +75 +4 +6 +69 +72 +69 +66 +59 +51 +69 +26 +1 +2 +0 +13 +13 +8 +4 +8 +67 +87 +85 +67 +26 +2 +40 +69 +33 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +10 +69 +62 +10 +4 +20 +26 +27 +30 +26 +14 +9 +36 +67 +77 +77 +78 +78 +74 +74 +72 +58 +51 +51 +57 +47 +0 +9 +90 +87 +19 +2 +53 +76 +74 +72 +64 +65 +69 44 +11 +1 +1 +15 +50 +71 +73 +74 +75 +76 +76 +76 +74 +66 +40 +45 +71 +50 +5 +0 +5 +2 +1 +0 +34 +89 +31 +2 +11 +4 +31 +67 +46 +12 +2 +1 +1 +5 +21 +51 +72 +63 +29 +8 +36 +59 +59 +66 +84 +88 +68 +4 +4 +21 +4 +1 +1 +2 +10 +16 +0 +11 +21 +84 +82 +48 +8 +1 +75 +85 +64 +63 +83 +46 +6 +38 +69 +33 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +13 +69 +60 +6 +19 +80 +92 +91 +88 +78 +50 +14 +13 +31 +28 +22 +11 +6 +21 +61 +49 +14 +3 +3 +3 +3 +0 +2 +88 +87 +21 +2 +21 +36 +39 +57 +72 +75 +58 +16 +7 +24 +23 +5 +14 +51 +69 55 +45 +42 +42 +42 +51 +68 +68 +67 +76 +41 +5 +45 +85 +20 +0 +0 +28 +89 +34 +0 +0 +0 +2 +22 +7 +9 +28 +39 +37 +22 +6 +16 +52 +67 +42 +11 +0 +0 +3 +29 +74 72 +28 +0 +0 +5 +23 +34 +44 +37 +10 +0 +8 +84 +89 +77 +82 +66 +12 +21 +89 +64 +39 +65 +87 +51 +9 +38 +70 +31 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +17 +70 59 +6 +21 +84 +84 +64 +64 +79 +78 +33 +4 +4 +1 +1 +0 +0 +1 +16 +7 +6 +20 +21 +14 +4 +0 +1 +82 +88 +25 +1 +2 +2 +4 +21 +57 +66 +40 +7 +19 +69 +69 +15 +0 +16 +37 +14 +3 +1 +1 +3 +12 +38 +67 +77 +58 +19 +1 +46 +89 +26 +6 +1 +24 +89 +51 +49 +68 +54 +4 +0 +7 +51 +81 +89 +86 +70 +26 +2 +36 +68 +69 +36 +5 +1 +21 +67 +81 +41 +3 +0 +14 +49 +79 +89 +88 +82 +50 +0 +21 +91 +30 +15 +67 +68 +10 +35 +90 +79 +49 +39 +32 +13 +1 39 +70 +31 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +23 +70 +57 +6 +23 +84 +67 +7 +16 +62 +79 +32 +0 +19 +47 +65 +76 +66 +16 +0 +4 +37 +75 +87 +82 +48 +0 +1 +79 +88 +27 +6 +31 +44 +24 +5 +33 +50 +11 +7 36 +76 +78 39 +19 +1 +1 +9 +25 +34 +36 +29 +12 +9 +37 +68 +46 +7 +30 +72 +91 +89 +87 +5 +21 +90 +78 +84 +90 +89 +36 +1 +35 +83 +57 +33 +59 +86 +38 +4 41 +70 +60 +24 +4 +21 +60 +81 +46 +9 +0 +5 +44 +84 +64 +35 +43 +86 +82 +0 +40 +83 +0 +11 +68 +67 +3 +34 +86 +64 +50 +54 +61 +21 +1 +58 +74 +30 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +25 +70 +55 +6 +26 +84 +74 +36 +45 +73 +61 +14 +1 +49 +79 +69 +73 +89 +67 +0 +21 +83 +83 +73 +81 +87 +19 +3 +71 +88 +30 +34 +69 +71 +33 +4 +32 +51 +11 +23 +76 +92 +92 +91 +69 +4 +8 +43 +75 +87 +88 +77 +48 +13 +10 +48 +47 +8 +44 +84 +92 +92 +88 +4 +21 +91 +75 +37 +52 +89 +51 +6 +59 +87 +73 +76 +89 +91 +29 +0 +49 +65 +12 +1 +22 +65 +82 +46 +11 +0 +0 +17 +67 +74 +21 +1 +3 +91 +72 +1 +92 +71 +0 +16 +74 +64 +0 +17 +67 +83 +90 +92 +90 +24 +1 +63 +74 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +29 +71 +52 +5 +29 +85 +92 +92 +92 +88 +63 +21 +1 +34 +29 +14 +7 +90 +76 +4 42 -44 -43 -31 +86 +54 9 -27 +11 +57 +17 +3 +71 +88 +60 69 -80 +71 +39 +8 +13 +46 +54 +12 +14 +59 +85 +87 +74 +50 +5 29 +83 +80 +62 +62 +77 +80 +36 +1 +38 +49 +9 +16 +55 +86 +32 +0 +0 +21 +90 +44 +3 +26 +89 +50 +13 +68 +81 +26 1 +7 +11 1 11 +51 31 +1 +16 +79 +87 +39 +7 +0 +0 +0 +22 +77 +77 +18 +1 +44 +87 +39 +1 +90 +59 +0 +17 +79 +56 +0 +4 +21 +36 +35 +30 +25 +6 +0 +64 +74 +0 +0 +0 +0 +0 +0 +0 +0 +0 +5 +0 +34 +72 +47 +4 +34 +85 +75 +51 +51 +69 +84 +45 +7 +26 +54 +77 +88 +91 +73 +7 +50 +82 +44 +2 +1 +1 +0 +1 +71 +89 +79 +84 +59 +15 +1 +30 +69 +64 +29 +4 +17 +69 +76 +19 +0 +7 +45 +86 +53 +6 +9 +49 +89 +48 +0 +36 +64 +30 +4 +40 +84 +29 +0 +0 +21 +89 +32 +0 +25 +89 +43 +8 +65 +88 +90 +92 +91 +63 +3 +26 +62 +25 +12 +57 +92 +92 +90 +86 +82 +79 +26 +9 +79 +91 +91 +91 +85 +52 +0 +12 +62 +26 +1 +4 +6 +0 +11 +21 +7 +1 +0 0 -49 -87 -21 -3 -75 +0 +0 +53 75 72 -77 -69 -57 -52 +0 +0 +0 +0 +0 +0 +0 +0 +0 +30 +0 +37 +73 +42 +4 +40 +86 51 +5 +7 51 +87 53 -62 -72 -73 +23 64 -29 -13 -56 -92 -92 -92 -91 -90 -75 +64 +9 4 -6 +90 69 +6 +44 +87 +67 +28 +25 +55 +19 +3 +71 +89 +59 72 -69 -66 +73 +31 +3 +24 +62 +78 59 -51 +14 +17 69 -26 +74 +20 1 +9 +49 +83 +44 2 +5 +45 +89 +48 0 -13 -13 -8 -4 +36 +79 +49 +9 +41 +84 +35 8 -67 -87 -85 -67 +1 26 -2 +89 +26 +0 +27 +87 +27 +1 +21 +64 +73 +64 +55 +27 +1 +39 +57 +21 +10 40 -69 -33 +64 +71 +77 +82 +84 +82 +21 +1 +19 +58 +65 +58 +31 +0 +13 +1 +1 3 -33 +30 +9 +0 +21 54 +61 +49 +48 +52 +56 +60 +66 +75 +74 0 0 0 0 0 0 +0 +0 +0 +0 +21 +0 +42 +74 +37 4 -19 -69 -62 -10 -4 -20 -26 -27 -30 -26 -14 -9 -36 -67 -77 -77 +46 +87 +72 +55 +59 78 +87 +33 +28 +88 +83 +61 78 -74 -74 -72 -58 -51 -51 -57 -47 -0 -9 -90 87 -19 -2 -53 -76 -74 -72 64 -65 +1 +24 69 +86 +90 +89 +84 +21 +2 +71 +88 +34 +42 +79 +63 +19 +5 +36 +72 +60 +18 +18 +68 +79 44 -11 -1 -1 -15 -50 +22 +8 +41 +87 +68 +37 +43 71 +79 +34 +1 +39 +78 +49 +9 +39 +87 +91 +81 +6 +33 +86 +19 +0 +27 +41 +5 +5 +0 +0 +0 +0 +0 +0 73 -74 -75 -76 -76 76 74 -66 40 -45 -71 -50 -5 +4 +0 +0 +0 +0 +0 0 -5 -2 -1 0 -34 -89 -31 -2 -11 4 -31 -67 -46 12 -2 -1 -1 5 -21 -51 -72 -63 -29 -8 -36 -59 -59 -66 -84 -88 -68 -4 -4 -21 -4 1 -1 -2 -10 -16 0 -11 -21 -84 -82 -48 -8 1 -75 -85 +15 +56 64 -63 -83 -46 -6 -38 +29 +44 +53 +70 +74 +78 +77 +72 69 -33 -3 -33 -54 +74 +76 +75 +75 +75 +74 +72 +10 0 0 0 0 0 0 -4 -20 -69 -60 -6 -19 -80 +0 +0 +0 +0 +0 +0 +51 +75 +31 +3 +49 +86 92 91 88 -78 -50 -14 -13 -31 -28 -22 -11 -6 -21 -61 -49 -14 -3 -3 -3 -3 -0 +74 +37 +1 2 -88 -87 -21 +55 +81 +77 +54 +55 +41 2 -21 -36 -39 -57 -72 -75 -58 -16 -7 -24 -23 5 +23 +49 +64 +64 +39 +0 +1 +77 +85 +29 +12 +55 +80 +47 +6 +22 +63 +59 +19 14 +56 +87 +89 +62 +6 +22 +68 +84 +89 +88 +78 +46 +11 +11 51 -69 +78 +49 +10 +18 +73 +84 55 -45 -42 -42 -42 -51 -68 -68 +1 +21 +24 +4 +1 +0 +0 +25 67 +29 +25 +36 +74 +79 +78 76 +71 +72 +77 +79 +77 +74 +69 41 -5 -45 -85 -20 -0 -0 -28 -89 +36 34 +34 +48 +58 +44 +69 +77 +78 +77 +73 +74 +75 +74 +73 +72 +69 +57 +50 +36 +27 +29 +24 +17 +5 +2 0 0 0 -2 -22 -7 -9 -28 -39 -37 -22 -6 -16 -52 -67 -42 -11 -0 0 -3 -29 -74 -72 -28 0 0 -5 -23 -34 -44 -37 -10 0 -8 -84 -89 -77 -82 -66 -12 -21 -89 -64 -39 -65 -87 -51 -9 -38 -70 -31 -3 -35 -54 0 0 0 0 0 0 -4 -21 -70 -59 -6 -21 -84 -84 -64 -64 -79 -78 -33 -4 -4 -1 -1 0 0 -1 -16 -7 -6 -20 -21 +66 +78 +22 +3 14 +23 +22 +20 +11 4 0 -1 -82 -88 -25 +8 +3 +0 1 2 +1 2 4 -21 -57 -66 -40 -7 -19 -69 -69 -15 -0 -16 -37 14 -3 +20 +5 1 +0 +0 1 -3 -12 -38 -67 -77 -58 -19 1 -46 -89 -26 -6 +0 +9 +21 +10 1 +18 +39 +32 +9 24 -89 -51 -49 -68 -54 -4 -0 -7 +64 +65 +30 +6 +23 51 -81 -89 -86 -70 -26 -2 -36 -68 -69 -36 -5 +55 +32 1 +5 21 -67 -81 -41 -3 +46 +52 +48 +32 +11 +9 +40 +69 +76 +62 +23 +1 0 -14 -49 -79 -89 -88 -82 +0 +1 +4 +1 +2 +6 +53 +48 +64 +78 +73 +76 +76 +74 +71 +65 +63 50 0 -21 -91 -30 -15 +34 +64 67 -68 -10 -35 -90 -79 -49 -39 -32 -13 -1 +71 +72 +74 +74 +74 +74 +76 +74 +71 +73 +73 +69 +62 +54 +42 39 -70 31 -1 -35 -54 +21 +2 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 0 0 0 0 0 0 -4 -23 -70 -57 -6 -23 -84 -67 -7 -16 -62 -79 -32 0 -19 -47 -65 -76 -66 -16 0 -4 -37 +54 75 -87 -82 -48 -0 -1 -79 -88 -27 -6 -31 -44 -24 -5 -33 -50 -11 -7 -36 -76 78 -39 -19 -1 +15 +0 +0 +0 +0 1 9 -25 -34 36 +64 +36 +20 +23 +26 29 -12 -9 +34 37 -68 -46 -7 -30 -72 -91 -89 -87 -5 -21 -90 -78 -84 -90 -89 -36 -1 -35 -83 57 -33 59 -86 -38 +44 +34 +28 +21 +21 +39 4 -41 -70 -60 -24 +2 +2 4 -21 -60 -81 -46 9 +4 0 -5 -44 -84 -64 -35 -43 -86 -82 -0 -40 -83 0 11 -68 -67 +41 +69 +73 +57 +23 3 -34 -86 -64 -50 -54 -61 +0 +0 +1 +14 21 +6 1 -58 +0 +0 +3 +13 +43 +69 +59 +59 +71 +63 +14 +9 +18 +31 +53 +62 +73 +77 74 -30 -1 +74 +74 +59 36 -54 0 0 0 0 0 0 -3 -25 -70 -55 -6 -26 -84 -74 -36 -45 -73 -61 -14 -1 -49 -79 -69 -73 -89 -67 0 -21 -83 -83 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +5 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +13 +0 +0 +53 +74 +78 +78 +78 +78 +78 +78 +77 +75 +71 +76 +76 +75 +74 +74 73 -81 -87 -19 -3 +72 71 -88 -30 +72 +75 +76 +76 +77 +77 +78 +77 +74 +62 +59 +56 +50 +42 +39 +50 +69 +64 +59 +70 +58 +38 +34 34 +36 +53 +60 +43 +36 +37 +37 +42 +54 69 -71 -33 -4 -32 -51 -11 -23 +59 +24 +17 +57 76 -92 -92 -91 -69 -4 -8 -43 -75 -87 -88 +78 +77 77 -48 -13 -10 -48 -47 -8 -44 -84 -92 -92 -88 -4 -21 -91 75 -37 -52 -89 -51 -6 -59 -87 73 -76 -89 -91 -29 +72 +66 +37 +7 +0 +0 0 -49 -65 -12 -1 -22 -65 -82 -46 -11 0 0 -17 -67 -74 -21 -1 -3 -91 -72 -1 -92 -71 0 -16 -74 -64 0 +7 +10 17 -67 -83 -90 -92 -90 -24 -1 -63 -74 +17 +17 +13 10 +7 +2 +0 +0 +0 +0 +0 0 -36 -54 0 0 0 0 0 -2 -3 -29 -71 -52 5 -29 -85 -92 -92 -92 -88 -63 -21 -1 -34 -29 -14 -7 -90 -76 -4 -42 -86 -54 -9 -11 -57 17 -3 -71 -88 -60 -69 -71 -39 -8 -13 -46 -54 -12 -14 -59 -85 -87 -74 -50 -5 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 29 -83 -80 -62 -62 -77 -80 -36 -1 -38 -49 -9 -16 -55 -86 -32 0 0 -21 -90 -44 -3 -26 -89 -50 -13 -68 -81 -26 -1 -7 -11 -1 -11 -51 -31 -1 -16 -79 -87 -39 -7 0 0 +71 0 -22 -77 -77 -18 -1 -44 -87 -39 -1 -90 -59 +13 0 -17 -79 +0 +43 +54 +56 +56 +56 +56 +54 +49 +39 +33 +33 +30 +26 +26 +25 +26 +25 +26 +30 +34 +35 +46 +49 56 -0 -4 +63 +68 +72 +72 +72 +74 +75 +76 +76 +75 +62 +33 +24 +51 +72 +76 +76 +76 +76 +73 +72 +75 +76 +76 +75 +75 +71 +54 21 -36 -35 -30 -25 -6 0 -64 -74 -9 0 -52 -54 0 +55 +60 +51 +33 +10 0 0 0 0 -17 -3 -34 -72 -47 -4 -34 -85 -75 -51 -51 -69 -84 -45 -7 -26 -54 -77 -88 -91 -73 -7 -50 -82 -44 -2 -1 -1 0 -1 -71 -89 -79 -84 -59 -15 -1 -30 -69 -64 -29 -4 -17 -69 -76 -19 0 -7 -45 -86 -53 -6 -9 -49 -89 -48 +5 +0 0 -36 -64 -30 -4 -40 -84 -29 0 0 -21 -89 -32 0 -25 -89 -43 -8 -65 -88 -90 -92 -91 -63 -3 -26 -62 -25 -12 -57 -92 -92 -90 -86 -82 -79 -26 -9 -79 -91 -91 -91 -85 -52 0 -12 -62 -26 -1 -4 -6 0 -11 -21 -7 -1 0 0 0 0 -53 -75 -72 -8 0 -52 -54 0 0 0 0 0 -30 -2 -37 -73 -42 -4 -40 -86 -51 -5 -7 -51 -87 -53 -23 -64 -64 -9 -4 -90 -69 -6 -44 -87 -67 -28 -25 -55 -19 -3 -71 -89 -59 -72 -73 -31 -3 -24 -62 -78 -59 -14 -17 -69 -74 -20 -1 -9 -49 -83 -44 -2 -5 -45 -89 -48 0 -36 -79 -49 -9 -41 -84 -35 -8 -1 -26 -89 -26 0 -27 -87 -27 -1 -21 -64 -73 -64 -55 -27 -1 -39 -57 -21 -10 -40 -64 -71 -77 -82 -84 -82 -21 -1 -19 -58 -65 -58 -31 0 -13 -1 -1 -3 -30 -9 0 -21 -54 -61 -49 -48 -52 -56 -60 -66 -75 -74 -13 0 0 -51 -52 0 0 0 0 0 -22 -1 -42 -74 -37 -4 -46 -87 -72 -55 -59 -78 -87 -33 -28 -88 -83 -61 -78 -87 -64 -1 -24 -69 -86 -90 -89 -84 -21 +0 +0 +0 +0 +0 +0 +0 +0 +10 +17 +10 2 -71 -88 -34 -42 -79 -63 -19 -5 +0 +0 +0 +0 +0 +0 +0 +0 +0 +29 36 -72 -60 -18 -18 -68 -79 -44 -22 -8 -41 -87 -68 -37 -43 -71 -79 -34 -1 -39 -78 -49 -9 -39 -87 -91 -81 -6 -33 -86 -19 0 -27 -41 -5 -5 0 0 0 0 0 0 -73 -76 -74 -40 -4 +7 0 0 0 @@ -3040,277 +3726,103 @@ P2 0 0 0 -4 -12 -5 -1 0 -1 -15 -56 -64 -29 -44 -53 -70 -74 -78 -77 -72 -69 -74 -76 -75 -75 -75 -74 -72 -19 -1 0 -51 -54 -50 0 0 0 0 0 -6 0 -51 -75 -31 -3 -49 -86 -92 -91 -88 -74 -37 -1 -2 -55 -81 -77 -54 -55 -41 -2 -5 -23 -49 -64 -64 -39 0 -1 -77 -85 -29 -12 -55 -80 -47 -6 -22 -63 -59 -19 -14 -56 -87 -89 -62 -6 -22 -68 -84 -89 -88 -78 -46 -11 -11 -51 -78 -49 -10 -18 -73 -84 -55 -1 -21 -24 -4 -1 0 0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +2 +17 25 -67 -29 -25 -36 -74 -79 -78 -76 -71 -72 -77 -79 -77 -74 -69 -41 -36 +28 34 +35 +26 +0 +0 +7 +36 +40 +40 +39 +39 +35 34 -48 -58 -44 -69 -77 -78 -77 -73 -74 -75 -74 -73 -72 -69 -57 -50 36 -27 -29 +35 +33 +31 +28 24 -21 -17 -16 -11 -10 -1 0 -51 -56 -52 -6 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 0 0 0 0 0 5 +10 +21 +17 +17 +17 5 -66 -78 -22 -3 -14 -23 -22 -20 -11 -4 0 -8 -3 0 -1 -2 -1 -2 -4 -14 -20 -5 -1 0 0 -1 -1 0 -9 -21 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +17 10 -1 -18 -39 -32 -9 -24 -64 -65 -30 -6 -23 -51 -55 -32 -1 -5 -21 -46 -52 -48 -32 -11 -9 -40 -69 -76 -62 -23 -1 0 0 -1 -4 -1 -2 -6 -53 -48 -64 -78 -73 -76 -76 -74 -71 -65 -63 -50 -7 -34 -64 -67 -71 -72 -74 -74 -74 -74 -76 -74 -71 -73 -73 -69 -62 -54 -42 -39 -31 -22 -16 -4 0 +10 0 +17 0 0 0 @@ -3322,91 +3834,22 @@ P2 0 0 0 -49 -56 -53 -6 0 0 0 0 0 0 -5 -9 -54 -75 -78 -15 0 0 0 0 -1 -9 -36 -64 -36 -20 -23 -26 -29 -34 -37 -57 -59 -44 -34 -28 -21 -21 -39 -4 -2 -2 -4 -9 -4 0 0 -11 -41 -69 -73 -57 -23 -3 0 0 -1 -14 -21 -6 -1 0 0 -3 -13 -43 -69 -59 -59 -71 -63 -14 -9 -18 -31 -53 -62 -73 -77 -74 -74 -74 -59 -36 -3 0 0 0 @@ -3422,304 +3865,66 @@ P2 0 0 0 -1 -3 -3 -3 -1 0 0 0 0 0 -1 -1 -1 +21 +2 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 0 0 -11 -17 -26 -31 -34 -38 -41 -44 -45 -49 -51 -50 -50 -54 -52 -6 0 0 0 0 0 0 -46 -20 -2 -11 -53 -74 -78 -78 -78 -78 -78 -78 -77 -75 -71 -76 -76 -75 -74 -74 -73 -72 -71 -72 -75 -76 -76 -77 -77 -78 -77 -74 -62 -59 -56 -50 -42 -39 -50 -69 -64 -59 -70 -58 -38 -34 -34 -36 -53 -60 -43 -36 -37 -37 -42 -54 -69 -59 -24 -21 -57 -76 -78 -77 -77 -75 -73 -72 -66 -37 -18 -4 0 0 0 -6 -11 -15 -18 -19 -21 -21 -21 -20 -19 -18 -16 -14 -11 -9 5 -1 +5 0 0 0 -4 -8 -12 -17 -21 -28 -34 -41 -46 -54 -58 -58 -57 -57 -57 -57 -57 -56 -56 -56 -55 -55 -54 -53 -51 -9 0 0 -29 0 0 0 0 -71 -49 -20 -2 -14 -43 -54 -56 -56 -56 -56 -54 -49 -39 -33 -33 -30 -26 -26 -25 -26 -25 -26 -30 -34 -35 -46 -49 -56 -63 -68 -72 -72 -72 -74 -75 -76 -76 -75 -62 -33 -24 -51 -72 -76 -76 -76 -76 -73 -72 -75 -76 -76 -75 -75 -71 -54 -22 -2 -1 -11 -55 -60 -51 -33 -19 -10 +5 0 0 +10 0 0 -6 -17 -56 -59 -58 -58 -57 -57 -57 -57 -55 -55 -56 -57 -57 -57 -57 -58 -58 -58 -59 -59 -58 -59 -59 -58 -57 -57 -56 -55 -55 -54 -54 -54 -45 -39 -34 -28 -24 -21 -19 -16 -15 -13 -11 -9 -7 -7 -6 -1 0 -29 -36 0 0 0 0 -49 -55 -51 -18 -2 0 0 0 @@ -3727,103 +3932,21 @@ P2 0 0 0 +7 +10 0 -1 -1 -1 -1 -1 -1 -1 -1 -4 -1 -1 -1 -1 0 0 0 0 0 -2 -7 -16 21 -25 -28 -34 -35 -26 -6 -2 -18 -36 -40 -40 -39 -39 -35 -34 -36 -35 -33 -31 -28 -24 -12 -2 -26 -11 -1 0 0 0 0 0 0 -14 -39 -51 -59 -58 -54 -48 -41 -36 -33 -26 -25 -24 -22 -21 -21 -23 -25 -26 -29 -30 -34 -36 -41 -43 -44 -44 -44 -43 -39 -36 -32 -28 -23 -19 -14 -9 -1 -19 -29 -23 -2 0 0 0 @@ -3843,39 +3966,6 @@ P2 0 0 0 -2 -42 -54 -51 -49 -46 -45 -45 -44 -45 -45 -45 -46 -46 -48 -49 -51 -52 -52 -52 -51 -50 -45 -41 -37 -34 -30 -22 -16 -11 -8 -2 -1 0 0 0 @@ -3883,9 +3973,6 @@ P2 0 0 0 -9 -12 -2 0 0 0 @@ -3893,32 +3980,7 @@ P2 0 0 0 -1 -1 -1 -1 -1 0 -5 -31 -56 -46 -17 -17 -31 -41 -49 -58 -58 -56 -55 -51 -42 -25 -14 -29 -24 -5 0 0 0 @@ -3931,17 +3993,6 @@ P2 0 0 0 -5 -18 -24 -28 -29 -29 -29 -28 -27 -22 -10 0 0 0 @@ -3971,77 +4022,26 @@ P2 0 0 0 -1 -4 -39 -53 -54 -55 -55 -55 -55 -55 -55 -55 -55 -54 -53 -53 -53 -51 -51 -51 -53 -54 -54 -54 -55 -56 -56 -57 -57 -58 -58 -59 -57 -53 -46 -43 -40 -37 -34 -32 -39 -40 -31 -29 -31 -31 -31 -34 -33 -35 -36 -38 -39 -41 -44 -51 -55 -54 -49 -53 -56 -56 -56 -55 -54 -45 -21 -9 -1 -28 -7 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +17 +0 +0 +0 +0 0 0 0 diff --git a/machine/tz/animation/bttzwave/bttzwave_0001_004.pgm b/machine/tz/animation/bttzwave/bttzwave_0001_004.pgm index bbdd8e91a..06512db80 100644 --- a/machine/tz/animation/bttzwave/bttzwave_0001_004.pgm +++ b/machine/tz/animation/bttzwave/bttzwave_0001_004.pgm @@ -59,28 +59,6 @@ P2 0 0 0 -2 -16 -28 -22 -32 -30 -32 -34 -35 -35 -35 -35 -35 -34 -33 -31 -36 -40 -32 -28 -20 -8 0 0 0 @@ -96,17 +74,7 @@ P2 0 0 0 -2 -27 -16 -2 -9 -1 0 -5 -7 -4 -1 0 0 0 @@ -124,9 +92,6 @@ P2 0 0 0 -1 -3 -11 0 0 0 @@ -173,132 +138,25 @@ P2 0 0 0 -5 -18 -28 -29 -20 -11 -5 0 -1 -11 -16 -13 -4 0 0 0 0 -14 -30 -34 -37 -39 -39 -39 -39 -39 -39 -39 -39 -37 -34 -31 -22 -6 -1 -6 -10 -6 0 -1 0 -8 -17 -26 -29 -29 -20 -8 -1 -6 -12 -18 -24 -29 -33 -31 -29 -6 0 0 0 0 -6 -11 -16 -19 -20 -22 -24 -25 -26 -29 -29 -29 -29 -28 -26 -26 -20 -7 -1 -3 0 0 0 0 0 0 -27 -30 -13 -1 -3 -5 -9 -11 -13 -14 -18 -18 -17 -16 -15 -11 -4 -2 -7 -9 0 0 -1 -30 -35 -41 -45 -45 -45 -45 -45 -43 -38 -35 -31 -30 -24 -4 0 0 0 @@ -311,316 +169,35 @@ P2 0 0 0 -15 -6 0 -4 -8 -13 -16 -27 -35 -19 -10 -9 -9 -6 -6 -6 -9 -9 -10 -12 -15 -27 -33 -22 -7 -1 -1 0 -3 -13 -26 -26 -24 -23 -23 -24 -27 -31 -36 -36 -36 -38 -38 -39 -34 -27 -35 -26 -18 -24 -29 -34 -36 -36 -37 -37 -37 -38 -38 -39 -39 -39 -39 -39 -39 -38 -37 -35 -32 -26 -9 -1 0 0 0 0 0 -19 -18 -21 -25 -33 -36 -36 -36 -36 -37 -37 -38 -37 -37 -36 -34 -29 -17 -5 0 0 0 -3 -29 -33 -34 -36 -38 -39 -38 -39 -39 -39 -39 -39 -37 -35 -32 -26 -5 -6 -7 -10 -12 -17 -20 -21 -22 -22 -8 0 -1 0 -1 -21 -32 -34 -36 -37 -28 -8 -1 -1 0 0 0 0 -1 -1 -1 -1 -1 -11 -29 -34 -24 -6 -1 -4 -16 -30 -32 -34 -36 -36 -37 -38 -39 -40 -40 -36 -30 -18 -11 -3 0 -9 -34 -36 -37 -38 -39 -36 -31 -25 -21 -18 -14 -12 -11 -10 -7 -7 -6 -6 -6 -6 -6 -11 -26 -33 -27 -10 0 0 0 0 0 -2 -31 -35 -37 -39 -39 -39 -35 -31 -29 -26 -24 -19 -19 -20 -23 -30 -31 -19 -4 -1 -4 -31 -35 -37 -10 -10 -10 -11 -12 -12 -12 -12 -11 -10 -6 -6 -36 -35 -34 -34 -35 -36 -36 -36 -36 -36 -34 -32 -26 -10 -1 0 -17 -34 -34 -32 -31 -29 -17 0 -11 -23 -26 -26 -26 -26 -26 -24 -24 -21 -11 -1 -11 -30 -34 -24 -11 -19 -33 -35 -26 -14 -14 -15 -16 -14 -10 -6 -1 0 0 0 0 0 -6 -1 -7 -25 -16 -10 -4 -1 -1 -1 0 0 0 @@ -634,22 +211,12 @@ P2 0 0 0 -1 -5 -26 -34 -27 0 0 0 0 0 0 -28 -16 -14 -11 -5 0 0 0 @@ -658,18 +225,6 @@ P2 0 0 0 -1 -5 -17 -31 -32 -19 -9 -31 -36 -39 -11 -2 0 0 0 @@ -680,264 +235,46 @@ P2 0 0 0 -1 -7 -35 -39 -39 -39 -37 -35 -33 -30 -26 -24 -24 -32 -28 -25 -26 -31 -36 -16 0 0 0 0 -6 -29 -51 -53 -54 -54 -54 -54 -54 -54 -51 -36 -11 -2 -11 -31 -36 -36 -36 -36 -24 -8 -1 0 0 0 0 0 0 -1 -9 -24 -36 -44 -53 -41 -3 0 0 0 0 0 -10 -16 -25 -30 -33 -36 -39 -41 -42 -44 -46 -47 -47 -46 -45 -36 -13 -1 -6 -26 -34 0 0 0 0 0 0 -13 -1 0 0 0 0 -1 -6 -11 -16 -20 -22 -25 -19 -8 -4 -18 -34 -36 -35 -36 -39 -11 -2 0 -24 -34 -32 -33 -31 -31 -31 -31 -31 -31 -10 -1 -9 -9 -4 -1 -1 0 0 0 0 0 -6 -24 -35 -38 -39 -39 -24 -4 0 -1 -5 -9 -19 -52 -49 -38 -39 -39 -39 -39 -39 -39 -44 -53 -38 -11 -1 -11 -26 -32 -31 -20 -2 0 -12 -31 -37 -39 -43 -47 -52 -55 -56 -57 -58 -58 -51 -54 -46 -16 -29 -38 -44 -53 -54 -55 -56 -57 -57 -57 -57 -58 -58 -58 -59 -59 -59 -58 -57 -54 -46 -15 -2 -6 -25 0 0 0 0 0 0 -2 -11 -26 -34 -39 -48 -53 -55 -55 -56 -57 -56 -54 -47 -29 -8 -4 -16 -34 -39 -39 -9 -2 0 -23 -45 -54 -55 -56 -56 -56 -56 -56 -54 -51 -36 -11 0 0 0 @@ -945,175 +282,25 @@ P2 0 0 0 -1 -5 -6 -1 -6 -24 -26 -20 -15 -7 -1 -21 -45 -54 -54 -55 -55 -26 -1 -1 -1 -1 -1 -1 -3 -17 -46 -54 -38 -11 -1 0 0 0 0 -1 -19 -45 -53 -56 -57 -59 -59 -57 -49 -32 -21 -10 0 -11 -51 -56 -56 -57 -57 -59 -50 -42 -34 -27 -24 -21 -18 -16 -11 -9 -8 -5 -5 -5 -5 -16 -43 -54 -46 -16 -2 -7 0 0 0 0 0 0 -9 -34 -52 -57 -57 -58 -59 -57 -51 -46 -40 -38 -40 -49 -50 -30 -7 0 0 -1 -3 -1 0 -24 -46 -56 -39 -29 -31 -31 -32 -32 -31 -30 -44 -53 -37 -22 -26 -34 -35 -36 -39 -42 -50 -50 -49 -14 -1 0 0 0 0 0 -14 -42 -55 -58 -59 -54 -40 -1 -9 -24 -24 -24 -24 -24 -15 -3 -18 -46 -54 -39 -19 -19 -14 -11 -11 -26 -54 -56 -36 -4 -1 0 0 0 @@ -1121,19 +308,6 @@ P2 0 0 0 -7 -1 -5 -42 -31 -19 -11 -2 -1 -1 -1 -1 -1 0 0 0 @@ -1144,1766 +318,216 @@ P2 0 0 0 -1 -6 -41 -54 -45 -16 -3 0 +28 0 0 0 0 0 -32 -53 -44 -25 -19 -14 -3 0 0 0 0 -1 -8 -26 -49 -51 -31 -9 -1 0 0 0 -23 -46 -57 -42 -15 -1 -1 -1 -1 -1 -1 -3 -19 -45 -54 -46 -49 -56 -57 -57 -57 -57 -57 -56 -54 -51 -12 -4 -6 -11 -16 -19 -38 -54 -39 -13 -3 0 0 -3 -41 -72 -73 -73 -73 -71 -51 -15 -3 -18 -46 -55 -55 -55 -55 -55 -55 -55 -50 -27 0 -3 -6 -9 -12 -19 -38 -49 -61 -74 -59 -9 0 0 0 0 0 -9 -19 -31 -37 -43 -48 -51 -39 -40 -57 -63 -67 -67 -69 -68 -53 -18 -1 -7 -41 -53 -44 -17 0 0 0 0 0 0 -53 -48 -18 -1 0 0 0 0 -6 -13 -17 -19 -10 -6 -26 -51 -56 -54 -54 -51 -41 -36 -46 -56 -42 -15 -1 -14 -29 -28 -28 -28 -27 -16 -3 -19 -45 -57 -49 -34 -29 -27 -26 -23 -21 -19 -39 -54 -51 -54 -54 -54 -55 -55 -56 -48 -19 -1 0 0 -6 -25 -73 -69 -52 -52 -49 -61 -73 -51 -16 -3 -16 -39 -39 -39 -39 -39 -44 -39 -21 -1 -11 -44 -73 -74 -76 -77 -77 -77 -78 -69 -74 -66 -20 -34 -49 -54 -69 -73 -74 -74 -75 -76 -77 -77 -71 -72 -77 -77 -78 -78 -78 -78 -75 -67 -20 -2 -9 -39 -51 -41 0 0 0 0 0 0 -49 -22 -2 -22 -46 -54 -64 -72 -74 -74 -73 -64 -41 -11 -4 -26 -51 -59 -59 -59 -57 -57 -57 -40 -15 -1 -14 -47 -72 -73 -73 -73 -71 -52 -16 -3 -18 -41 -30 -6 0 0 0 0 0 0 -11 -38 -55 -59 -59 -57 -51 -47 -45 -32 -4 -21 -57 -69 -73 -74 -72 -35 -2 -2 -4 -25 -60 -72 -35 0 -1 -1 -1 -1 -1 -1 -1 0 -3 -22 -49 -72 -60 -47 -38 -30 -19 -6 0 -16 -72 -74 -75 -76 -77 -77 -75 -58 -49 -39 -34 -27 -24 -36 -71 -73 -37 -11 -6 -6 -6 -20 -59 -74 -64 -21 -3 -9 -42 -51 0 0 0 0 0 0 -24 -3 -17 -57 -75 -77 -78 -78 -76 -70 -65 -69 -69 -41 -8 0 0 -2 -6 -14 -19 -23 -26 -15 -1 -15 -49 -74 -67 -52 -54 -54 -62 -74 -53 -14 -3 -9 -9 -8 -25 -34 -34 -36 -37 -22 -4 -10 -17 -14 -4 -1 0 -1 -8 -9 -14 -56 -75 -78 -74 -67 -55 -1 -19 -45 -20 -4 -51 -74 -54 -34 -26 -30 -33 -32 -29 -29 -25 -23 -23 -44 -69 -49 -14 0 0 0 0 -3 -15 -1 -68 -56 -39 -26 -21 -39 -48 -1 -1 -1 -1 -1 0 -5 -32 -21 -3 0 0 0 0 -1 -7 -57 -74 -62 -16 -1 -29 -49 0 0 0 0 0 0 -4 -14 -54 -75 -49 -22 -10 -2 0 -1 -11 -36 -68 -71 -43 -8 0 0 0 0 0 -1 -1 0 0 -31 -73 -66 -33 -3 -3 -4 -22 -64 -72 -46 0 -1 -6 -34 -65 -75 -75 -75 -74 -59 -26 -4 0 0 0 0 -2 -8 -6 -5 -45 -74 -49 -9 -1 -9 -26 0 -53 -87 -21 -2 -65 -77 -77 -71 -68 -72 -75 -75 -75 -75 -74 -70 -57 -59 -61 -21 -11 -48 -69 -82 -91 -90 -52 -1 -19 -3 0 0 0 0 -1 -16 -39 -32 -48 -62 -49 -9 -4 -1 -9 -55 -79 -84 -68 -21 -1 -9 -63 -72 -32 -5 -25 -47 0 0 0 0 0 0 -3 -32 -71 -53 -14 -1 0 0 -3 -10 -9 -7 -35 -69 -76 -73 -70 -65 -57 -51 -40 -31 -33 -34 -33 -50 -75 -49 -1 -9 -24 -16 -4 -26 -77 -56 -19 -20 -30 -64 -70 -53 -44 -44 -55 -72 -59 -42 -44 -49 -57 -68 -72 -64 -39 -26 -66 -56 -11 0 -7 -4 0 -1 -67 -88 -7 -2 -2 -3 -30 -75 -72 -42 -27 -26 -30 -34 -41 -58 -71 -74 -57 -16 -26 -79 -92 -88 -85 -86 0 0 -9 -40 -64 -69 -48 -10 0 -44 -83 -78 -87 -90 -85 -40 -4 -1 -67 -89 -91 -91 -90 -82 -12 -1 -44 -69 -37 -7 -24 -47 0 0 0 0 0 0 -3 -37 -74 -34 -2 -44 -85 -90 -89 -79 -51 -13 -8 -36 -69 -76 -78 -78 -77 -77 -71 -67 -69 -74 -74 -74 -77 -48 0 -27 -87 -62 -1 -21 -77 -72 -71 -64 -61 -72 -46 -11 -1 -1 -16 -49 -71 -74 -75 -77 -77 -78 -77 -74 -71 -58 -75 -36 -3 -54 -79 -13 0 -1 -79 -87 -4 -12 -16 -9 -4 -24 -10 0 0 0 0 0 -4 -16 -51 -73 -53 -9 -4 -3 0 -16 -76 -7 0 -9 -59 -86 -91 -91 -86 -43 0 -49 -91 -67 -35 -53 -86 -59 -6 -21 -87 -74 -14 -9 -62 -89 -36 -4 -41 -68 -37 -7 -24 -47 -3 0 0 0 0 -2 -2 -40 -74 -29 -1 -72 -91 -88 -80 -83 -82 -41 -3 -11 -8 -1 -4 -9 -19 -34 -60 -72 -62 -49 -44 -45 -46 -31 0 -29 -90 -64 -1 -16 -60 -58 -62 -72 -74 -61 -16 -9 -29 -26 -5 -15 -51 -62 -40 -29 -20 -6 -10 -39 -71 -77 -55 -11 0 -64 -79 -56 -21 -1 -90 -82 -62 -87 -82 -50 -9 0 -6 -27 -66 -85 -87 -67 -23 -2 -9 -64 -74 -46 -1 0 -11 -65 -25 0 -2 -44 -84 -45 -10 -38 -90 -55 -1 -53 -89 -35 -3 -26 -82 -62 -4 -32 -89 -90 -87 -87 -89 -91 -38 -4 -41 -68 -39 -8 -22 -46 -33 0 0 0 0 -13 -2 -42 -74 -26 -1 -78 -90 -9 -8 -54 -84 -42 0 -2 -8 -4 -1 0 0 -4 -26 -36 -26 -8 -2 -2 -2 -1 0 -31 -90 -64 -1 -3 -3 -4 -18 -59 -71 -44 -7 -23 -72 -60 -12 0 -18 -23 -6 -1 0 0 -1 -4 -36 -68 -36 -3 -67 -92 -92 -90 -16 -2 -91 -87 -65 -61 -82 -68 -25 -5 -39 -82 -80 -72 -79 -88 -80 -9 -3 -51 -74 -64 -12 -8 -59 -51 0 0 -12 -66 -71 -12 0 -24 -90 -49 -1 -55 -88 -24 0 -23 -82 -62 -4 -27 -88 -73 -16 -4 -6 -6 -4 -1 -39 -67 -39 -9 -21 -46 -40 0 0 0 0 -25 -1 -48 -77 -12 0 -82 -85 -21 -29 -67 -69 -24 0 -15 -59 -79 -88 -82 -56 -21 -7 -6 -5 -16 -34 -38 -29 -11 0 -31 -90 -62 -1 -11 -24 -19 -5 -25 -54 -11 -9 -46 -82 -75 -49 -24 -1 -2 -24 -51 -77 -79 -48 -9 -9 -55 -32 -2 -66 -84 -58 -14 0 -15 -91 -59 -1 -27 -89 -59 -2 -33 -84 -87 -64 -37 -44 -77 -77 -23 -12 -56 -61 -20 -7 -82 -72 -1 0 0 -18 -71 -77 -14 -16 -61 -81 -29 -1 -57 -88 -22 0 -23 -82 -62 -4 -5 -79 -90 -87 -87 -84 -80 -15 -1 -52 -72 -41 -9 -21 -46 -52 0 0 0 0 -33 -1 -62 -78 -8 -4 -82 -92 -92 -92 -89 -65 -21 -1 -22 -78 -69 -59 -73 -87 -62 -17 -1 -26 -60 -82 -88 -79 -42 -4 -33 -90 -59 -11 -50 -79 -48 -5 -26 -53 -11 -28 -79 -92 -92 -91 -49 -3 -31 -70 -87 -91 -88 -86 -43 -1 -57 -28 0 -13 -81 -34 0 0 -28 -89 -4 0 -29 -90 -57 0 -29 -92 -72 -16 -11 -43 -49 -36 -9 -21 -51 -28 -12 -86 -84 -25 -21 -32 -27 -14 -65 -89 -91 -90 -82 -48 -8 0 -60 -86 -19 0 -21 -81 -59 -4 0 -17 -64 -85 -91 -92 -90 -16 -1 -56 -74 -31 -4 -20 -45 -64 0 0 0 0 -13 0 -67 -71 -7 -14 -83 -87 -67 -62 -72 -84 -54 -8 -11 -29 -10 -3 -6 -81 -82 -24 -10 -55 -85 -71 -55 -64 -52 -11 -35 -89 -66 -46 -77 -50 -11 -9 -40 -54 -11 -16 -56 -84 -77 -52 -20 -10 -61 -84 -21 -3 -39 -90 -44 0 -65 -78 -17 -37 -86 -34 -17 -2 -49 -87 0 -3 -36 -86 -48 0 -12 -77 -90 -91 -92 -89 -87 -14 -1 -33 -39 -1 -50 -92 -92 -92 -92 -92 -52 -8 -24 -64 -75 -64 -39 -9 -1 -1 -19 -24 -6 -1 -3 -11 -6 -1 -6 -1 -3 -4 -6 -11 -12 -3 0 -55 -74 -30 -1 -24 -49 -69 0 0 0 0 -6 -6 -68 -66 -6 -21 -84 -64 -6 -6 -46 -85 -61 -23 -26 -57 -73 -83 -88 -90 -85 -24 -21 -65 -79 -39 -5 -17 -22 -6 -39 -89 -82 -79 -67 -18 -1 -25 -69 -64 -29 -4 -29 -75 -57 -11 0 -21 -74 -62 0 0 -26 -90 -30 0 -72 -72 -11 -44 -91 -91 -57 -1 -83 -62 0 -4 -31 -59 -30 0 -4 -19 -56 -74 -80 -87 -90 -6 0 -70 -37 -1 -44 -78 -72 -63 -57 -44 -19 -1 -1 -1 0 0 -2 -16 -38 -19 -1 -1 -4 -41 -7 0 0 -28 -62 -24 -5 0 0 0 0 0 -44 -69 -73 -29 -1 -26 -55 -70 0 0 0 0 -5 -13 -69 -56 -5 -33 -87 -71 -51 -51 -71 -87 -53 -24 -52 -84 -54 -9 -3 -87 -86 -22 -21 -69 -78 -36 -4 -12 -17 -5 -41 -89 -74 -70 -74 -31 -3 -24 -62 -78 -53 -12 -30 -77 -57 -14 -1 -22 -84 -78 -19 -22 -67 -70 -11 -6 -78 -55 -7 -15 -67 -58 0 0 0 -1 -9 -13 0 0 -4 -17 -20 -5 -1 0 0 0 0 0 -1 -74 -41 -1 0 0 0 @@ -2911,401 +535,32 @@ P2 0 0 0 -36 -24 -11 -20 -29 -41 -55 -72 -61 -55 -59 -61 -72 -67 -67 -69 -72 -76 -74 -73 -69 -69 -67 -65 -62 -72 -74 -44 -13 -1 -24 -54 -68 0 0 0 0 -4 -24 -71 -41 -4 -48 -86 -92 -91 -88 -79 -58 -23 -9 -41 -82 -79 -64 -78 -91 -85 -21 -9 -61 -87 -68 -47 -58 -48 -11 -41 -89 -53 -39 -79 -64 -19 -5 -37 -72 -53 -13 -31 -77 -77 -65 -24 -8 -82 -89 -90 -89 -71 -21 -1 -45 -76 -62 -17 -1 0 0 -21 -19 -26 -30 -47 -52 -37 -41 -45 -62 -61 -41 -31 -27 -24 -18 -14 -21 -76 -76 -73 -41 -14 -20 -26 -35 -40 -48 -55 -72 -77 -77 -77 -77 -75 -71 -70 -73 -74 -73 -73 -72 -73 -74 -74 -74 -57 -68 -74 -74 -74 -74 -74 -74 -73 -39 -10 -1 -16 -38 -54 -63 0 0 0 -20 -2 -41 -74 -33 -4 -14 -20 -21 -23 -24 -22 -11 -4 -1 -14 -44 -67 -74 -62 -69 -80 -18 -1 -27 -65 -85 -89 -80 -43 -6 -40 -87 -47 -12 -53 -80 -47 -6 -26 -67 -52 -13 -18 -62 -87 -83 -11 0 -18 -57 -62 -36 -15 -1 -41 -73 -59 -74 -64 -27 -69 -78 -77 -76 -76 -74 -74 -74 -75 -75 -75 -68 -69 -75 -77 -77 -77 -77 -77 -77 -72 -61 -68 -76 -77 -77 -77 -77 -76 -76 -75 -73 -70 -62 -53 -46 -37 -31 -28 -26 -23 -20 -16 -15 -11 -11 -10 -10 -6 -8 -9 -10 -10 -12 -16 -17 -20 -8 -1 -19 -43 -55 -49 -54 0 0 0 -34 -1 -47 -74 -71 -21 -1 0 0 0 0 -3 -14 -34 -28 -9 -1 -1 -2 0 0 -4 -6 -4 -5 -19 -33 -39 -34 -14 0 -21 -45 -24 -1 -19 -41 -28 -6 -29 -67 -62 -25 -6 -16 -21 -4 0 -11 -3 -1 -1 -1 -9 -44 -74 -26 -17 -59 -74 -76 -64 -56 -46 -37 -31 -27 -26 -24 -23 -23 -24 -21 -24 -31 -34 -36 -39 -44 -48 -50 -37 -9 -32 -50 -49 -46 -41 -36 -32 -26 -18 -11 -1 0 0 0 0 0 -1 -1 -1 -1 0 0 0 @@ -3322,83 +577,26 @@ P2 0 0 0 -20 -45 -55 -47 -30 -14 0 0 0 -18 0 -2 -59 -76 -79 -78 -78 -78 -77 -74 -69 -67 -71 -65 -51 -34 -26 -19 -13 -11 -8 -8 -41 -23 -5 -1 -1 -2 -11 -10 -1 -1 -3 -6 -4 0 0 -19 -54 -72 -74 -57 -21 -2 0 -4 -24 -62 -35 -43 -54 -66 -77 -72 -25 -1 0 -17 -35 0 0 0 0 -1 -1 0 0 +23 +0 +0 +0 +0 +28 0 0 0 @@ -3425,172 +623,12 @@ P2 0 0 0 -9 -16 -19 -26 -30 -33 -36 -39 -40 -42 -43 -45 -46 -49 -49 -49 -49 -49 -49 -46 -45 -44 -42 -39 -37 -47 -54 -41 -25 -1 -13 0 0 0 -54 -14 -1 -6 -52 -63 -62 -62 -64 -65 -71 -74 -70 -57 -67 -74 -74 -76 -77 -77 -78 -76 -71 -74 -66 -57 -54 -50 -49 -54 -51 -44 -44 -46 -49 -50 -48 -49 -63 -73 -49 -57 -72 -74 -77 -78 -78 -77 -72 -74 -74 -74 -73 -59 -16 -1 -33 -15 -2 -6 -14 -22 -31 -36 -42 -45 -49 -48 -50 -51 -51 -50 -48 -46 -43 -40 -36 -33 -30 -28 -27 -26 -26 -26 -27 -28 -28 -30 -31 -34 -37 -44 -48 -57 -59 -58 -57 -57 -56 -55 -55 -55 -56 -56 -55 -55 -55 -55 -55 -55 -56 -56 -56 -56 -56 -56 -56 -56 -55 -53 -38 -17 -1 -1 -17 0 0 0 -54 -46 -20 -2 0 0 0 @@ -3599,162 +637,143 @@ P2 0 0 0 -1 -6 -15 23 -31 -45 -51 -59 -65 -67 -67 -67 -72 -74 -74 -74 -74 -74 -74 -74 -74 -74 -74 -75 -75 -75 -74 -46 -11 -15 -58 -72 -67 -64 -57 -45 -29 -21 -11 -3 0 0 -6 -34 -54 -42 -58 -58 -57 -57 -56 -55 -55 -55 -54 -54 -54 -54 -54 -54 -54 -55 -56 -56 -56 -57 -57 -57 -57 -56 -55 -56 -57 -57 -57 -57 -57 -57 -57 -56 -55 -55 -51 -45 -40 -36 -30 -26 -24 -21 -20 -19 -16 -15 -15 -14 -14 -14 -14 -14 -14 -15 -15 -16 -18 -20 -21 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 23 -12 0 -4 -14 -47 0 0 -31 -36 -53 -48 -46 -44 -41 -39 -36 -31 -26 -15 -9 -3 -3 -1 -1 -1 -1 0 0 0 0 -4 -6 -9 -16 -17 -19 -21 -22 -22 -24 -22 -22 -21 -19 -19 -18 -16 -4 0 0 0 @@ -3763,58 +782,8 @@ P2 0 0 0 -1 -1 -1 -8 -34 -46 -57 -51 -43 -47 -41 -34 -24 -18 -13 -9 -6 -3 0 -7 -7 -7 -7 0 -1 -3 -6 -9 -14 -19 -22 -25 -26 -26 -28 -28 -29 -30 -30 -30 -29 -26 -22 -17 -13 -8 -1 -13 -25 -29 -23 -12 0 0 0 @@ -3836,46 +805,8 @@ P2 0 0 0 -20 -34 -57 -54 0 0 -16 -4 -39 -52 -54 -55 -55 -56 -56 -56 -57 -57 -58 -59 -59 -52 -44 -37 -31 -20 -14 -8 -3 -6 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 0 0 0 @@ -3883,25 +814,6 @@ P2 0 0 0 -37 -11 -6 -11 -15 -21 -34 -41 -48 -55 -59 -57 -54 -53 -42 -21 -5 -26 -24 0 0 0 @@ -3924,15 +836,6 @@ P2 0 0 0 -5 -10 -18 -22 -22 -24 -22 -22 -10 0 0 0 @@ -3970,62 +873,3159 @@ P2 0 0 0 -13 -10 -13 -16 -16 -16 -10 -1 -4 -9 -16 -24 -33 -46 -51 -53 -54 -55 -56 -57 -58 -59 -59 -56 -52 -51 -51 -51 -51 -46 -46 -46 -46 -46 -46 -51 -51 -51 -53 -55 -57 -54 -57 -57 -58 -57 -57 -56 -54 -54 -49 -32 -16 -4 -10 -28 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +41 +72 +73 +73 +73 +71 +51 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +38 +49 +61 +74 +59 +0 +0 +0 +0 +0 +0 +0 +0 +0 +37 +43 +48 +51 +39 +40 +57 +63 +67 +67 +69 +68 +53 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +73 +69 +52 +52 +49 +61 +73 +51 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +44 +73 +74 +76 +77 +77 +77 +78 +69 +74 +66 +0 +23 +49 +54 +69 +73 +74 +74 +75 +76 +77 +77 +71 +72 +77 +77 +78 +78 +78 +78 +75 +67 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +46 +54 +64 +72 +74 +74 +73 +64 +41 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +47 +72 +73 +73 +73 +71 +52 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +57 +69 +73 +74 +72 +35 +2 +2 +4 +25 +60 +72 +28 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +49 +72 +60 +47 +38 +30 +19 +6 +0 +16 +72 +74 +75 +76 +77 +77 +75 +58 +49 +39 +34 +27 +24 +36 +71 +73 +37 +11 +6 +6 +6 +20 +59 +74 +64 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +57 +75 +77 +78 +78 +76 +70 +65 +69 +69 +41 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +49 +74 +67 +52 +54 +54 +62 +74 +53 +0 +0 +0 +0 +0 +0 +23 +23 +34 +37 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +56 +75 +78 +74 +67 +55 +1 +19 +45 +20 +4 +51 +74 +54 +23 +0 +0 +0 +0 +0 +0 +0 +0 +0 +44 +69 +49 +14 +0 +0 +0 +0 +3 +15 +1 +68 +56 +39 +26 +21 +39 +48 +1 +1 +1 +1 +1 +0 +5 +32 +21 +3 +0 +0 +0 +0 +1 +7 +57 +74 +62 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +54 +75 +49 +22 +10 +2 +0 +1 +11 +36 +68 +71 +43 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +73 +66 +33 +3 +3 +4 +22 +64 +72 +46 +0 +0 +0 +23 +65 +75 +75 +75 +74 +59 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +45 +74 +49 +9 +1 +9 +26 +0 +53 +87 +21 +2 +65 +77 +77 +71 +68 +72 +75 +75 +75 +75 +74 +70 +57 +59 +61 +21 +11 +48 +69 +82 +91 +90 +52 +1 +19 +3 +0 +0 +0 +0 +1 +16 +39 +32 +48 +62 +49 +9 +4 +1 +9 +55 +79 +84 +68 +21 +1 +9 +63 +72 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +71 +53 +14 +1 +0 +0 +3 +10 +9 +7 +35 +69 +76 +73 +70 +65 +57 +51 +40 +0 +0 +23 +0 +50 +75 +49 +1 +9 +24 +16 +4 +26 +77 +56 +0 +0 +0 +64 +70 +53 +44 +44 +55 +72 +59 +42 +44 +49 +57 +68 +72 +64 +39 +0 +66 +56 +11 +0 +7 +4 +0 +1 +67 +88 +7 +2 +2 +3 +30 +75 +72 +42 +27 +26 +30 +34 +41 +58 +71 +74 +57 +16 +26 +79 +92 +88 +85 +86 +0 +0 +9 +40 +64 +69 +48 +10 +0 +44 +83 +78 +87 +90 +85 +40 +4 +1 +67 +89 +91 +91 +90 +82 +12 +1 +44 +69 +37 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +37 +74 +34 +2 +44 +85 +90 +89 +79 +51 +13 +8 +36 +69 +76 +78 +78 +77 +77 +71 +67 +69 +74 +74 +74 +77 +48 +0 +27 +87 +62 +1 +21 +77 +72 +71 +64 +61 +72 +46 +11 +1 +1 +16 +49 +71 +74 +75 +77 +77 +78 +77 +74 +71 +58 +75 +36 +3 +54 +79 +13 +0 +1 +79 +87 +4 +12 +16 +9 +4 +24 +10 +0 +0 +0 +0 +0 +4 +16 +51 +73 +53 +9 +4 +3 +0 +16 +76 +7 +0 +9 +59 +86 +91 +91 +86 +43 +0 +49 +91 +67 +35 +53 +86 +59 +6 +21 +87 +74 +14 +9 +62 +89 +36 +4 +41 +68 +37 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +40 +74 +29 +1 +72 +91 +88 +80 +83 +82 +41 +3 +11 +8 +1 +4 +9 +19 +34 +60 +72 +62 +49 +44 +45 +46 +31 +0 +29 +90 +64 +1 +16 +60 +58 +62 +72 +74 +61 +16 +9 +29 +26 +5 +15 +51 +62 +40 +29 +20 +6 +10 +39 +71 +77 +55 +11 +0 +64 +79 +56 +21 +1 +90 +82 +62 +87 +82 +50 +9 +0 +6 +27 +66 +85 +87 +67 +23 +2 +9 +64 +74 +46 +1 +0 +11 +65 +25 +0 +2 +44 +84 +45 +10 +38 +90 +55 +1 +53 +89 +35 +3 +26 +82 +62 +4 +32 +89 +90 +87 +87 +89 +91 +38 +4 +41 +68 +39 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +42 +74 +26 +1 +78 +90 +9 +8 +54 +84 +42 +0 +2 +8 +4 +1 +0 +0 +4 +26 +36 +26 +8 +2 +2 +2 +1 +0 +31 +90 +64 +1 +3 +3 +4 +18 +59 +71 +44 +7 +23 +72 +60 +12 +0 +18 +23 +6 +1 +0 +0 +1 +4 +36 +68 +36 +3 +67 +92 +92 +90 +16 +2 +91 +87 +65 +61 +82 +68 +25 +5 +39 +82 +80 +72 +79 +88 +80 +9 +3 +51 +74 +64 +12 +8 +59 +51 +0 +0 +12 +66 +71 +12 +0 +24 +90 +49 +1 +55 +88 +24 +0 +23 +82 +62 +4 +27 +88 +73 +16 +4 +6 +6 +4 +1 +39 +67 +39 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +48 +77 +12 +0 +82 +85 +21 +29 +67 +69 +24 +0 +15 +59 +79 +88 +82 +56 +21 +7 +6 +5 +16 +34 +38 +29 +11 +0 +31 +90 +62 +1 +11 +24 +19 +5 +25 +54 +11 +9 +46 +82 +75 +49 +24 +1 +2 +24 +51 +77 +79 +48 +9 +9 +55 +32 +2 +66 +84 +58 +14 +0 +15 +91 +59 +1 +27 +89 +59 +2 +33 +84 +87 +64 +37 +44 +77 +77 +23 +12 +56 +61 +20 +7 +82 +72 +1 +0 +0 +18 +71 +77 +14 +16 +61 +81 +29 +1 +57 +88 +22 +0 +23 +82 +62 +4 +5 +79 +90 +87 +87 +84 +80 +15 +1 +52 +72 +41 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +62 +78 +8 +4 +82 +92 +92 +92 +89 +65 +21 +1 +22 +78 +69 +59 +73 +87 +62 +17 +1 +26 +60 +82 +88 +79 +42 +4 +33 +90 +59 +11 +50 +79 +48 +5 +26 +53 +11 +28 +79 +92 +92 +91 +49 +3 +31 +70 +87 +91 +88 +86 +43 +1 +57 +28 +0 +13 +81 +34 +0 +0 +28 +89 +4 +0 +29 +90 +57 +0 +29 +92 +72 +16 +11 +43 +49 +36 +9 +21 +51 +28 +12 +86 +84 +25 +21 +32 +27 +14 +65 +89 +91 +90 +82 +48 +8 +0 +60 +86 +19 +0 +21 +81 +59 +4 +0 +17 +64 +85 +91 +92 +90 +16 +1 +56 +74 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +67 +71 +7 +14 +83 +87 +67 +62 +72 +84 +54 +8 +11 +29 +10 +3 +6 +81 +82 +24 +10 +55 +85 +71 +55 +64 +52 +11 +35 +89 +66 +46 +77 +50 +11 +9 +40 +54 +11 +16 +56 +84 +77 +52 +20 +10 +61 +84 +21 +3 +39 +90 +44 +0 +65 +78 +17 +37 +86 +34 +17 +2 +49 +87 +0 +3 +36 +86 +48 +0 +12 +77 +90 +91 +92 +89 +87 +14 +1 +33 +39 +1 +50 +92 +92 +92 +92 +92 +52 +8 +24 +64 +75 +64 +39 +9 +1 +1 +19 +24 +6 +1 +3 +11 +6 +1 +6 +1 +3 +4 +6 +11 +12 +3 +0 +55 +74 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +68 +66 +6 +21 +84 +64 +6 +6 +46 +85 +61 +23 +26 +57 +73 +83 +88 +90 +85 +24 +21 +65 +79 +39 +5 +17 +22 +6 +39 +89 +82 +79 +67 +18 +1 +25 +69 +64 +29 +4 +29 +75 +57 +11 +0 +21 +74 +62 +0 +0 +26 +90 +30 +0 +72 +72 +11 +44 +91 +91 +57 +1 +83 +62 +0 +4 +31 +59 +30 +0 +4 +19 +56 +74 +80 +87 +90 +6 +0 +70 +37 +1 +44 +78 +72 +63 +57 +44 +19 +1 +1 +1 +0 +0 +2 +16 +38 +19 +1 +1 +4 +41 +7 +0 +0 +28 +62 +24 +5 +0 +0 +0 +0 +0 +44 +69 +73 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +69 +56 +5 +33 +87 +71 +51 +51 +71 +87 +53 +24 +52 +84 +54 +9 +3 +87 +86 +22 +21 +69 +78 +36 +4 +12 +17 +5 +41 +89 +74 +70 +74 +31 +3 +24 +62 +78 +53 +12 +30 +77 +57 +14 +1 +22 +84 +78 +19 +22 +67 +70 +11 +6 +78 +55 +7 +15 +67 +58 +0 +0 +0 +1 +9 +13 +0 +0 +4 +17 +20 +5 +1 +0 +0 +0 +0 +0 +1 +74 +41 +1 +0 +0 +0 +0 +0 +0 +0 +36 +24 +11 +20 +29 +41 +55 +72 +61 +55 +59 +61 +72 +67 +67 +69 +72 +76 +74 +73 +69 +69 +67 +65 +62 +72 +74 +44 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +71 +41 +4 +48 +86 +92 +91 +88 +79 +58 +23 +9 +41 +82 +79 +64 +78 +91 +85 +21 +9 +61 +87 +68 +47 +58 +48 +11 +41 +89 +53 +39 +79 +64 +19 +5 +37 +72 +53 +13 +31 +77 +77 +65 +24 +8 +82 +89 +90 +89 +71 +21 +1 +45 +76 +62 +17 +1 +0 +0 +21 +19 +26 +30 +47 +52 +37 +41 +45 +62 +61 +41 +31 +27 +24 +18 +14 +21 +76 +76 +73 +41 +14 +20 +26 +35 +40 +48 +55 +72 +77 +77 +77 +77 +75 +71 +70 +73 +74 +73 +73 +72 +73 +74 +74 +74 +57 +68 +74 +74 +74 +74 +74 +74 +73 +39 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +41 +74 +33 +4 +14 +20 +21 +23 +24 +22 +11 +4 +1 +14 +44 +67 +74 +62 +69 +80 +18 +1 +27 +65 +85 +89 +80 +43 +6 +40 +87 +47 +12 +53 +80 +47 +6 +26 +67 +52 +13 +18 +62 +87 +83 +11 +0 +18 +57 +62 +36 +15 +1 +41 +73 +59 +74 +64 +27 +69 +78 +77 +76 +76 +74 +74 +74 +75 +75 +75 +68 +69 +75 +77 +77 +77 +77 +77 +77 +72 +61 +68 +76 +77 +77 +77 +77 +76 +76 +75 +73 +70 +62 +53 +46 +37 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +23 +0 +47 +74 +71 +21 +1 +0 +0 +0 +0 +3 +14 +34 +28 +9 +1 +1 +2 +0 +0 +4 +6 +4 +5 +19 +33 +39 +34 +14 +0 +21 +45 +24 +1 +19 +41 +28 +6 +29 +67 +62 +25 +6 +16 +21 +4 +0 +11 +3 +1 +1 +1 +9 +44 +74 +0 +0 +59 +74 +76 +64 +56 +46 +37 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +23 +34 +39 +44 +48 +50 +37 +0 +0 +50 +49 +46 +41 +34 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +59 +76 +79 +78 +78 +78 +77 +74 +69 +67 +71 +65 +51 +34 +26 +19 +13 +11 +8 +8 +41 +23 +5 +1 +1 +2 +11 +10 +1 +1 +3 +6 +4 +0 +0 +19 +54 +72 +74 +57 +21 +2 +0 +4 +24 +62 +35 +43 +54 +66 +77 +72 +0 +0 +0 +0 +28 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +52 +63 +62 +62 +64 +65 +71 +74 +70 +57 +67 +74 +74 +76 +77 +77 +78 +76 +71 +74 +66 +57 +54 +50 +49 +54 +51 +44 +44 +46 +49 +50 +48 +49 +63 +73 +49 +57 +72 +74 +77 +78 +78 +77 +72 +74 +74 +74 +73 +59 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +45 +51 +59 +65 +67 +67 +67 +72 +74 +74 +74 +74 +74 +74 +74 +74 +74 +74 +75 +75 +75 +74 +46 +0 +0 +58 +72 +67 +64 +57 +45 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 0 0 0 diff --git a/machine/tz/animation/bttzwave/bttzwave_0001_006.pgm b/machine/tz/animation/bttzwave/bttzwave_0001_006.pgm index a4e71ab13..3f914d051 100644 --- a/machine/tz/animation/bttzwave/bttzwave_0001_006.pgm +++ b/machine/tz/animation/bttzwave/bttzwave_0001_006.pgm @@ -69,39 +69,8 @@ P2 0 0 0 -2 -34 -54 -38 -33 -33 -32 -24 -7 0 0 -11 -31 -28 -19 -16 -14 -11 -9 -9 -6 -6 -4 -3 -1 -1 -1 -2 -4 -32 -34 -26 -6 0 0 0 @@ -109,15 +78,46 @@ P2 0 0 0 -1 -5 -8 -11 -15 -18 -18 -16 -16 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +7 +7 +2 +2 35 28 0 @@ -166,10 +166,6 @@ P2 0 0 0 -25 -44 -43 -6 0 0 0 @@ -181,36 +177,10 @@ P2 0 0 0 -3 -11 -15 -9 -3 0 0 0 0 -4 -17 -29 -31 -34 -35 -36 -37 -39 -39 -36 -29 -5 -32 -34 -24 -5 -11 -33 -28 -8 0 0 0 @@ -226,42 +196,16 @@ P2 0 0 0 -6 -32 -36 -29 -24 -22 -21 -17 -12 -8 -4 0 0 0 0 0 0 -13 -17 -21 -20 -19 -18 -16 -16 -18 -31 -40 -35 -26 -11 0 0 0 0 -2 0 0 0 @@ -282,225 +226,50 @@ P2 0 0 0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +5 +17 +13 +10 +7 +2 2 7 -19 -32 -41 -53 -38 -34 -34 -34 -35 -35 -35 -34 31 -26 -1 -5 -9 -14 -16 -19 -19 -21 -20 -19 -9 -1 -4 -6 -2 -3 -9 -12 -11 -11 -19 -33 -30 -22 -22 -19 -16 -11 -6 -1 -1 -1 -1 -11 -29 -34 -29 +40 35 -30 -10 -4 -21 -34 -39 -41 -43 -47 -48 -51 -51 -52 -52 -51 -50 -45 -6 +26 +0 +0 +0 0 -6 -31 -38 -38 -38 -38 -37 -36 -35 -34 -28 -23 -17 -10 -5 0 0 0 -2 -6 -9 -12 -16 -18 -19 -19 -19 -16 -15 -13 -11 0 0 -13 -14 -15 -14 -14 -14 -13 -11 -11 -10 -10 -10 -10 -11 -11 -11 -11 -9 -4 -2 -7 -5 0 -8 -24 -32 -35 -36 -39 -39 -39 -35 -31 -26 -18 -14 -31 -34 -34 -35 -36 -38 -38 -38 -38 -36 -35 -33 -28 -10 -1 0 -6 -19 -29 -34 -35 -36 -36 -30 -12 -1 -1 -1 0 0 -1 -10 -21 -43 -9 -2 -11 -32 -40 -34 -12 -4 -24 -47 -55 -57 -58 -59 -59 -59 -59 -59 -59 -59 -58 -57 -54 -45 -7 0 -7 -11 -14 -16 -19 -25 -30 -35 -40 -39 -38 -36 -36 -34 -30 -8 -1 0 0 0 @@ -509,222 +278,38 @@ P2 0 0 0 -1 -4 -4 -6 -11 0 0 -9 -31 -34 -36 -36 -36 -37 -37 -36 -36 -36 -36 -36 -36 -36 -35 -33 -28 -17 -5 0 0 -6 -23 -34 -25 -14 -14 -10 -4 -1 -1 -1 -1 -1 -1 -8 -37 -36 -31 -21 -16 -11 -7 -4 -1 -1 -28 -35 -34 -31 -29 -29 -34 -27 -19 -18 -19 -19 -9 0 -19 -34 -39 -47 -52 -53 -54 -57 -53 -38 -12 -1 -6 0 0 -2 -22 -48 -46 -23 -14 -12 -8 -6 -4 -4 -2 -2 -2 -2 -6 -52 -56 -44 -9 0 0 0 0 0 -1 -1 -1 -7 -11 -18 -26 -32 -39 -36 -35 -34 -28 -22 -17 -14 -11 -9 -5 -3 -1 0 0 0 -3 0 0 -2 -29 -21 -21 -22 -24 -26 -28 -29 -30 -30 -31 -30 -29 -28 -27 -27 -31 -31 -19 -5 -6 -22 -35 -29 -9 -1 0 0 0 0 -5 -11 -18 -28 -9 -1 -1 0 0 0 0 0 0 -4 -6 -1 -5 -26 -35 -37 -40 -39 -21 -6 -1 0 0 0 0 -28 -51 -56 -58 -54 -48 -37 -3 -13 -47 -54 -38 -6 0 -8 -16 -29 -47 -48 -21 -2 0 0 0 @@ -736,45 +321,12 @@ P2 0 0 0 -8 -50 -56 -45 -40 -37 -33 -29 -25 -16 -10 0 0 0 0 -1 -1 -1 -27 -34 -39 -39 -38 -37 -36 -36 -36 -35 -34 -32 -30 -22 -6 -1 0 0 -2 -14 -1 0 0 0 @@ -787,39 +339,30 @@ P2 0 0 0 -1 5 -17 -31 -32 -21 -24 -35 -30 -11 +23 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 0 -18 -32 -38 -49 -52 -53 -54 -53 -51 -39 -4 -1 -14 -30 -39 -47 -54 -54 -52 -43 -18 -2 0 0 0 @@ -827,190 +370,20 @@ P2 0 0 0 -27 -44 -46 -47 -48 -56 -59 -2 -2 -2 -1 0 -9 -3 -19 -46 -53 -49 -54 -54 -55 -57 -49 -22 -3 -16 -49 -61 -65 -69 -69 -71 -71 -71 -70 -65 -6 0 -9 -49 -57 -58 -57 -57 -56 -55 -54 -54 -48 -39 -32 -21 -12 -6 0 0 0 -4 -12 -18 -22 -24 -26 -26 -29 -31 -31 -31 -33 -29 -6 0 0 2 +7 +10 +10 +10 2 -9 -21 -22 -20 -19 -18 -15 -14 -14 -14 -14 -14 -13 -11 -6 -4 -18 -32 -37 -37 -31 -11 0 -14 -44 -54 -57 -59 -57 -50 -44 -29 -46 -54 -46 -37 -55 -57 -59 -59 -50 -41 -41 -51 -44 -31 -24 -24 -21 -17 -16 -17 -39 -54 -54 -55 -56 -54 -48 -1 -4 -21 -31 -70 -70 -54 -16 -3 -16 -50 -59 -47 -41 -34 -27 -18 -4 -15 -53 -74 -77 -78 -78 -78 -78 -78 -78 -78 -76 -66 -9 -1 -9 -15 -19 -21 -26 -30 -38 -46 -56 -58 -57 -56 -54 -54 -53 -24 -11 0 0 0 @@ -1021,224 +394,39 @@ P2 0 0 0 -1 -10 -25 -34 -29 0 0 -2 -9 -33 -51 -55 -56 -57 -56 -56 -56 -56 -56 -56 -56 -53 -46 -29 -8 -4 -15 -23 -22 -11 0 -14 -42 -56 -31 -10 -3 -2 -2 -1 -3 -15 -54 -54 -50 -22 -8 0 0 0 0 -5 -44 -59 -59 -59 -59 -59 -57 -56 -56 -54 -39 -14 0 0 0 0 -7 -49 -77 -77 -67 -65 -73 -51 -15 -2 -6 -1 -1 -1 0 0 0 -14 -51 -72 -55 -16 -9 -5 -4 -4 -4 -4 -6 -72 -76 -62 -11 0 0 0 0 0 -1 -1 -1 -4 -14 -21 -32 -43 -51 -59 -54 -53 -51 -41 -32 -25 -21 -19 -19 -19 -18 -16 -10 -3 -8 -25 -34 0 0 -8 -35 -53 -48 -36 -35 -36 -38 -39 -39 -41 -41 -41 -41 -43 -49 -50 -30 -9 0 0 0 0 -12 -41 -57 -34 -4 0 -4 -10 -20 -37 -14 -3 -6 -49 -18 0 -1 -11 -21 -33 -18 0 0 0 0 0 -1 -1 -1 -9 -26 -25 -7 -9 -24 -31 -31 -34 -74 -79 -4 -4 -4 -24 -60 -72 -19 0 -3 -15 -23 -31 -39 -43 -41 -32 -62 -57 -14 -1 0 0 0 @@ -1246,49 +434,10 @@ P2 0 0 0 -8 -67 -74 -61 -56 -52 -49 -41 -36 -31 -19 -9 0 0 -1 -1 -1 -1 -9 -42 -54 -58 -57 -57 -56 -56 -55 -55 -55 -54 -50 -38 -18 -3 -8 -24 0 0 -18 -54 -48 -24 -3 0 0 0 @@ -1297,1484 +446,2967 @@ P2 0 0 0 -1 -8 -26 -49 -50 -34 -24 -24 -25 -26 -41 -56 -36 -5 0 -69 -71 -72 -74 -72 -58 -3 -3 -7 -1 -44 -74 -74 -76 -77 -70 -21 -9 -11 -11 -10 -8 -6 -3 -1 0 0 -41 -68 -69 -76 -78 -78 -77 -4 -1 -18 -19 -4 -46 -73 -58 -44 -54 -72 -74 -75 -75 -76 -72 -62 -71 -51 -7 -27 -75 -84 -87 -87 -87 -82 -9 -1 -63 -77 -77 -77 -77 -76 -74 -72 -73 -73 -72 -60 -50 -39 -23 -13 -1 -1 -1 -1 -10 -20 -28 -33 -36 -39 -39 -39 -37 -44 -51 -42 -18 -3 -8 0 0 -19 -46 -22 -3 -11 -29 -31 -31 -29 -28 -28 -28 -26 -21 -10 -6 -26 -49 -57 -57 -57 -57 -56 -57 -36 -6 0 -70 -76 -62 -51 -32 -67 -74 -58 -1 0 -44 -75 -57 -5 -4 -56 -73 -72 -71 -74 -74 -74 -74 -72 -63 -39 -11 -46 -76 -80 -36 -6 +0 +0 +0 5 -3 -59 0 -19 -86 -51 -1 -49 -77 -77 -76 -74 -62 -46 -38 -34 -35 -57 -72 -74 -50 -6 -31 -85 -92 -92 -92 -89 -91 -12 -1 -31 -21 -20 -23 -26 -34 -49 -68 -67 -62 -78 -77 -76 -75 -74 -72 -72 -27 -13 0 0 -1 0 -1 -1 -1 -1 -1 -4 -15 -37 -52 -44 -16 -1 0 0 -27 -18 -3 -13 -44 -71 -76 -76 -76 -76 -76 -76 -74 -65 -41 -12 -6 -21 -31 -30 -29 -26 -26 -23 -6 0 -67 -76 -55 -2 -1 -4 -14 -78 -53 -51 -44 -76 -51 0 -9 -3 -12 -51 -71 -59 -51 -49 -51 -54 -60 -70 -70 -51 -63 -74 -30 -1 0 +24 0 -1 -1 0 -26 -89 -46 -1 -19 -19 -31 -72 -47 -11 -1 -1 -1 -4 -16 -53 -73 -51 -7 -4 -10 -11 -6 -53 -89 -69 -8 0 -4 -2 -1 0 0 -2 -11 -31 -37 -1 -4 -15 -30 -40 -55 -66 -79 -74 -68 -45 -37 -39 -33 -29 -25 -25 -25 -23 -16 -4 -11 -39 -54 -48 -11 0 0 -25 -4 -16 -46 -72 -66 -47 -43 -43 -43 -44 -45 -52 -67 -68 -41 -12 -1 0 0 0 -1 -1 -1 0 0 -74 -64 -2 -26 -61 -10 -5 -77 -75 -72 -72 -64 -1 -62 -75 -15 0 -17 -29 -10 -1 -1 -1 -3 -13 -38 -68 -77 -74 -59 -14 -6 -59 -83 -18 0 0 -31 -89 -41 0 -1 0 -1 -23 -7 -10 -34 -48 -46 -24 -5 -14 -59 -70 -44 -5 0 0 -21 -79 -84 -21 -1 0 -5 -34 -57 -60 -54 -36 -12 -1 -1 -2 0 0 -1 -2 -1 -2 -4 -54 -72 -75 -70 -71 -74 -74 -74 -74 -74 -70 -54 -25 -4 -9 -44 -54 -63 0 0 -28 -2 -34 -70 -64 -30 -4 0 0 0 0 -2 -11 -36 -66 -68 -49 -40 -41 -44 -45 -40 -37 -60 -69 -71 -75 -54 0 -62 -87 -1 -16 -29 -14 -69 -72 -4 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +23 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +17 +0 +0 +23 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +28 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +28 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +29 +0 +0 +5 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +26 +29 +25 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +30 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +30 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +27 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +17 +0 +0 +49 +61 +65 +69 +69 +71 +71 +71 +70 +65 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +30 +5 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +5 +17 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +29 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +31 +24 +24 +5 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +5 +31 +70 +70 +54 +0 +0 +0 +0 +0 +0 +0 +23 +27 +0 +0 +0 +53 +74 +77 +78 +78 +78 +78 +78 +78 +78 +76 +66 +0 +0 +0 +0 +0 +5 +26 +30 +0 +0 +0 +0 +0 +0 +0 +0 +0 +24 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +26 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +29 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +31 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +17 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +49 +77 +77 +67 +65 +73 +51 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +51 +72 +55 +16 +9 +5 +4 +4 +4 +4 +6 +72 +76 +62 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +5 +30 +0 +0 +0 +0 +0 +0 +0 +30 +25 +5 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +30 +0 +0 +0 +0 +0 +0 +0 +0 +23 +0 +0 +0 +0 +0 +37 +0 +0 +0 +0 +0 +0 +0 +0 +5 +33 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +26 +25 +0 +0 +24 +31 +31 +34 +74 +79 +4 +4 +4 +24 +60 +72 +0 +0 +0 +0 +23 +31 +39 +43 +41 +32 +62 +57 +14 +1 +0 +0 +0 +0 +0 +0 +0 +8 +67 +74 +61 +56 +52 +49 +41 +36 +31 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +24 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +26 +0 +0 +23 +24 +24 +25 +26 +0 +0 +0 +0 +0 +69 +71 +72 +74 +72 +58 +0 +0 +0 +0 +44 +74 +74 +76 +77 +70 +5 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +41 +68 +69 +76 +78 +78 +77 +4 +1 +18 +19 +4 +46 +73 +58 +44 +54 +72 +74 +75 +75 +76 +72 +62 +71 +51 +7 +27 +75 +84 +87 +87 +87 +82 +9 +1 +63 +77 +77 +77 +77 +76 +74 +72 +73 +73 +72 +60 +50 +39 +23 +0 +0 +0 +0 +0 +0 +0 +28 +26 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +17 +0 +0 +29 +31 +31 +29 +28 +28 +28 +26 +5 +0 +0 +26 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +70 +76 +62 +51 +32 +67 +74 +58 +0 +0 +44 +75 +57 +5 +4 +56 +73 +72 +71 +74 +74 +74 +74 +72 +63 +39 +0 +46 +76 +80 +36 +6 +5 +3 +59 +0 +19 +86 +51 +1 +49 +77 +77 +76 +74 +62 +46 +38 +34 +35 +57 +72 +74 +50 +6 +31 +85 +92 +92 +92 +89 +91 +12 +1 +31 +21 +20 +23 +26 +34 +49 +68 +67 +62 +78 +77 +76 +75 +74 +72 +72 +27 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +27 +0 +0 +0 +44 +71 +76 +76 +76 +76 +76 +76 +74 +65 +41 +0 +0 +5 +31 +30 +29 +26 +26 +23 +0 +0 +67 +76 +55 +2 +1 +4 +14 +78 +53 +51 +44 +76 +51 +0 +9 +3 +12 +51 +71 +59 +51 +49 +51 +54 +60 +70 +70 +51 +63 +74 +30 +1 +0 +0 +1 +1 +0 +26 +89 +46 +1 +19 +19 +31 +72 +47 +11 +1 +1 +1 +4 +16 +53 +73 +51 +7 +4 +10 +11 +6 +53 +89 +69 +8 +0 +4 +2 +1 +0 +0 +2 +11 +31 +37 +1 +4 +15 +30 +40 +55 +66 +79 +74 +68 +45 +37 +39 +33 +29 +25 +25 +25 +23 +0 +0 +0 +0 +0 +0 +0 +0 +0 +25 +0 +0 +46 +72 +66 +47 +43 +43 +43 +44 +45 +52 +67 +68 +41 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +74 +64 +2 +26 +61 +10 +5 +77 +75 +72 +72 +64 +1 +62 +75 +15 +0 +17 +29 +10 +1 +1 +1 +3 +13 +38 +68 +77 +74 +59 +14 +6 +59 +83 +18 +0 +0 +31 +89 +41 +0 +1 +0 +1 +23 +7 +10 +34 +48 +46 +24 +5 +14 +59 +70 +44 +5 +0 +0 +21 +79 +84 +21 +1 +0 +5 +34 +57 +60 +54 +36 +12 +1 +1 +2 +0 +0 +1 +2 +1 +2 +4 +54 +72 +75 +70 +71 +74 +74 +74 +74 +74 +70 +54 +25 +0 +0 +0 +0 +0 +0 +0 +28 +0 +34 +70 +64 +30 +4 +0 +0 +0 +0 +2 +11 +36 +66 +68 +49 +40 +41 +44 +45 +40 +37 +60 +69 +71 +75 +54 +0 +62 +87 +1 +16 +29 +14 +69 +72 +4 +14 +74 +77 +45 +24 +1 +2 +21 +42 +51 +47 +34 +12 +9 +37 +68 +59 +14 +3 +23 +72 +81 +34 +17 +1 +37 +89 +51 +43 +62 +51 +4 +0 +8 +48 +82 +89 +86 +69 +24 +2 +42 +70 +73 +27 +2 +6 +69 +89 +39 +5 +0 +1 +49 +78 +87 +90 +88 +79 +48 +13 +0 +11 +74 +51 +34 +29 +24 +13 +0 +8 +32 +75 +74 +57 +49 +49 +51 +51 +53 +61 +71 +59 +24 +0 +0 +0 +0 +0 +0 +30 +0 +39 +72 +45 +6 +16 +39 +43 +42 +40 +33 +14 +9 +36 +66 +77 +76 +77 +77 +77 +72 +74 +78 +70 +65 +57 +18 +1 +77 +87 +0 +2 +1 +4 +20 +44 +8 +74 +92 +92 +91 +39 +2 +35 +72 +86 +89 +88 +79 +49 +13 +10 +48 +54 +11 +21 +76 +92 +92 +91 +62 +4 +41 +90 +78 +83 +90 +87 +38 +1 +28 +83 +67 +46 +61 +83 +45 +7 +36 +69 +56 +11 +0 +47 +86 +62 +11 +0 +0 +16 +72 +84 +51 +36 +49 +77 +79 +40 +0 +11 +79 +85 +77 +77 +87 +84 +57 +14 +4 +30 +29 +19 +9 +2 +1 +1 +4 +21 +51 +71 +61 +0 +0 +0 +0 +0 +0 +33 +0 +42 +74 +39 +4 +38 +84 +92 +91 +89 +79 +50 14 +13 +31 +31 +27 +26 +21 +26 +66 +67 +21 +3 +3 +1 +0 +1 +89 +72 +6 +59 +83 +6 +35 +16 +12 +57 +84 +68 +36 +9 +15 +71 +84 +42 +26 +44 +79 +79 +29 +1 +41 +50 +10 +16 +57 +84 +82 +62 +34 +2 +44 +91 74 +41 +53 +87 +57 +3 +43 +87 +64 +49 +67 +87 +52 +10 +36 +64 +24 +2 +28 +78 +79 +21 +1 +0 +0 +26 77 +71 +24 +2 +9 +57 +89 +59 +0 +11 +79 +91 +69 +59 +70 +86 +92 +49 +8 +0 +2 +6 +20 +31 +34 +29 +19 +6 +16 +56 +72 +25 +0 +0 +0 +0 +0 +34 +0 45 +74 +36 +4 +44 +87 +67 +43 +53 +79 +76 24 +3 +4 1 -2 -21 -42 -51 +1 +0 +0 +0 +18 +9 +4 +22 47 -34 -12 +41 +6 +1 +91 +36 +57 +87 +16 +13 +73 +27 +4 +31 +79 +44 +6 +0 +29 +83 +63 9 -37 -68 +0 +6 +73 +90 +29 +0 +44 +64 +30 +4 +27 +74 +62 +13 +0 +0 +48 +89 +46 +6 +26 +81 59 -14 +4 +46 +89 +74 +47 +41 +36 +20 +4 +35 +46 +11 +9 +64 +86 +40 +6 +0 +0 +0 +24 +74 +77 +29 3 -23 -72 -81 -34 -17 +12 +57 +89 +60 1 -37 +11 +84 89 -51 +41 +11 +15 +56 +90 +71 +31 +0 +1 43 -62 -51 -4 +64 +80 +88 +85 +66 +29 +2 +39 +71 +24 +0 +0 +0 +0 +0 +33 0 -8 48 +74 +32 +3 +49 +87 +41 +5 +27 +74 +71 +19 +0 +26 +56 +79 +84 +67 +18 +0 +6 +46 +84 +89 +85 +20 +14 +89 +61 +90 +24 +1 +69 +77 +58 +11 +39 +83 +45 +9 +0 +29 +89 +78 +13 +1 +29 82 +84 +21 +0 +47 +79 +50 +11 +29 +75 +62 +16 +1 +0 +44 89 +38 +0 +20 +80 +61 +1 +34 86 -69 +64 +42 +46 +50 24 -2 +1 42 -70 -73 -27 -2 -6 +45 +10 +30 +78 +90 +77 69 +67 +67 +29 +13 +63 +87 +71 +57 +59 +77 +79 +46 +0 +11 +84 +88 +29 +0 +9 +39 89 +62 39 -5 +4 +23 +73 +82 +64 +57 +66 +83 +57 +9 +35 +71 +23 0 -1 -49 -78 -87 -90 -88 -79 -48 -13 0 -11 -74 -51 -34 -29 -24 -13 0 -8 -32 +0 +0 +17 +0 +50 75 +29 +2 +55 +88 74 -57 -49 -49 -51 -51 -53 +64 +74 +82 +37 +4 +2 +75 +80 61 71 +89 59 -24 1 -6 -49 -57 -0 -0 +36 +84 +51 +21 +60 +12 +52 +89 +79 +81 +31 +1 30 -2 -39 72 -45 -6 -16 -39 -43 +51 +9 42 -40 -33 -14 +85 +84 +87 9 -36 -66 -77 -76 -77 -77 -77 -72 -74 +9 +80 +89 +91 +90 +89 +91 +51 +8 +4 +53 78 -70 -65 -57 -18 -1 +51 +13 +29 +74 77 -87 -0 +54 +26 2 +41 +89 +41 +0 +19 +76 +64 1 -4 -20 -44 -8 -74 -92 -92 -91 -39 -2 -35 +11 72 86 -89 -88 -79 +90 +92 +91 +43 +1 +46 49 -13 -10 -48 -54 11 -21 -76 +31 +77 92 92 -91 +92 +92 +92 +44 +9 +26 62 -4 -41 -90 -78 83 -90 +89 +86 +74 +52 +19 +0 +11 +86 +88 +27 +0 +9 +41 +88 +59 +36 +7 +37 +84 87 -38 -1 -28 -83 67 -46 -61 -83 -45 -7 -36 -69 -56 -11 +44 +53 +81 +64 +14 +34 +71 +24 0 -47 -86 -62 -11 0 0 -16 -72 -84 -51 -36 -49 -77 -79 -40 0 +0 +17 +0 +57 +76 +26 +1 +59 +89 +92 +92 +92 +89 +67 11 -79 -85 -77 -77 +1 +33 +4 +3 +21 +89 +62 +11 +66 +71 +13 +0 +4 +5 +69 87 -84 -57 -14 +28 +79 +64 4 -30 -29 19 -9 +67 +48 +7 +17 +72 +89 +68 2 1 -1 +19 +59 +77 +79 +69 +38 4 -21 +1 +26 +63 +78 51 -71 -61 -9 +14 +16 +58 +87 +89 +56 4 -42 -18 +34 +88 +47 0 +16 +71 +63 +8 0 -33 +18 +55 +64 +58 +51 +23 1 42 -74 -39 -4 -38 -84 -92 -91 -89 -79 -50 +52 14 -13 -31 -31 -27 -26 -21 +10 26 -66 -67 -21 -3 +32 +30 +30 +30 +30 +15 3 -1 +4 +17 +31 +39 +39 +29 +14 +0 0 -1 -89 -72 -6 -59 -83 -6 -35 -16 -12 -57 -84 -68 -36 9 -15 -71 +83 84 +24 +0 +10 42 -26 -44 -79 +87 +59 +31 +6 +34 +87 79 -29 -1 -41 +54 +46 50 -10 -16 +54 +35 +7 +33 +69 +25 +0 +0 +0 +0 +0 +17 +0 57 -84 -82 -62 +77 +24 +1 +63 +89 +42 +22 +23 +74 +88 34 -2 -44 -91 +1 +40 74 -41 +79 +78 +89 53 -87 -57 -3 -43 -87 -64 +18 +73 +77 +16 +15 49 -67 -87 -52 +6 +84 +79 10 -36 +73 64 -24 +12 +25 +68 +63 +20 2 -28 -78 -79 -21 1 0 0 -26 -77 -71 -24 -2 -9 -57 -89 -59 -0 -11 -79 -91 -69 -59 -70 -86 -92 -49 -8 +4 +15 +4 +1 0 -2 -6 -20 -31 -34 -29 -19 -6 -16 -56 -72 -25 -6 -43 -11 0 0 -34 1 -45 -74 +0 36 -4 -44 -87 -67 -43 -53 -79 +64 +72 76 -24 -3 -4 +63 +28 +6 +23 +54 +59 +39 +1 +18 +62 +38 1 +6 +25 +19 +4 +5 1 0 0 0 -18 -9 -4 +0 +0 +18 +57 +67 +39 +9 +0 +0 +0 +0 +0 +0 +0 +21 22 -47 -41 6 1 -91 -36 -57 -87 +1 +1 +3 +10 16 -13 -73 -27 +15 +0 4 +14 +7 +1 +6 31 -79 -44 +70 +49 6 +1 +17 +79 +89 +74 +57 +47 +41 +22 +1 +41 +73 +26 0 -29 -83 -63 -9 0 -6 -73 -90 -29 0 -44 -64 -30 -4 -27 -74 -62 -13 0 0 -48 +17 +0 +57 +77 +17 +1 +71 +90 +21 +1 +11 +71 +90 +35 +28 +90 +56 +14 +38 89 -46 -6 -26 -81 -59 -4 -46 +39 +9 +69 89 -74 +91 +88 +28 +1 +84 47 -41 -36 -20 -4 -35 -46 -11 -9 -64 -86 -40 -6 0 0 0 -24 +9 +52 +73 74 -77 -29 -3 -12 -57 -89 -60 -1 -11 -84 -89 -41 -11 +62 15 -56 -90 +9 +12 +18 +39 +61 +34 +21 +19 +16 +12 +23 +45 71 -31 +73 +51 +59 +70 +56 +23 +3 +0 +0 0 1 -43 -64 -80 -88 -85 -66 -29 -2 -39 -71 -24 -8 -44 -11 0 0 -33 1 -48 +8 +14 +0 +0 +14 +45 +26 +6 +4 +11 +17 +23 +46 +76 74 -32 -3 +67 +50 +43 +43 +45 +45 +45 +45 +45 +59 +60 49 -87 +43 +42 +40 41 -5 -27 -74 -71 -19 +46 +62 +65 +12 +2 +2 +4 +24 +14 0 -26 -56 -79 -84 -67 -18 0 -6 -46 +0 +0 +1 +4 +19 +64 84 -89 -85 -20 -14 -89 -61 90 -24 -1 -69 -77 -58 -11 -39 -83 -45 -9 +92 +91 +52 +2 +43 +74 0 -29 -89 -78 -13 +0 +0 +0 +0 +0 +17 +0 +57 +77 +17 1 -29 +71 +90 82 -84 -21 -0 -47 79 -50 -11 -29 -75 -62 -16 -1 -0 -44 +81 89 -38 -0 -20 +84 +10 +32 +87 80 -61 +68 +77 +81 +33 1 -34 -86 -64 -42 -46 -50 24 -1 -42 -45 -10 -30 -78 -90 -77 69 -67 -67 +77 29 -13 -63 -87 -71 -57 -59 +2 +0 +0 +2 +17 +16 +27 +55 +72 +44 +58 +75 +78 77 -79 -46 +77 +77 +75 +72 +76 +77 +77 +77 +77 +77 +75 +74 +45 0 -11 -84 -88 +23 +52 +70 +58 29 -0 +15 +11 9 -39 -89 -62 -39 -4 -23 -73 -82 -64 -57 -66 -83 -57 +15 +6 9 +14 +27 +51 +26 35 -71 -23 -9 -44 -0 -0 -0 -22 -1 -50 +51 +69 +67 +63 +68 +76 +78 +78 +77 +68 +54 +64 75 -29 -2 -55 -88 +76 +77 +76 +76 +76 +76 +76 +74 74 -64 74 -82 -37 -4 -2 75 -80 -61 -71 -89 -59 -1 -36 -84 -51 -21 +75 +76 +76 +74 +72 +75 +77 +77 +69 60 -12 -52 -89 -79 -81 -31 -1 +64 +54 30 -72 -51 -9 -42 -85 -84 -87 -9 -9 -80 -89 -91 -90 +21 +18 +34 +62 +23 +4 +0 +3 +18 +29 +41 +26 +1 +41 +74 +0 +0 +0 +26 +0 +0 +17 +0 +57 +77 +17 +1 +65 89 +92 91 +86 +66 +17 +0 +6 51 -8 +65 +55 +39 +34 +12 4 +2 +0 +1 +3 +29 +9 +25 +75 +78 +77 +76 +74 +48 +0 +0 +59 +63 +57 +54 +50 +43 +39 +43 +44 +49 53 -78 +57 +62 +55 +34 +0 +0 +0 +5 51 -13 -29 -74 +72 77 -54 -26 -2 -41 -89 -41 -0 -19 +78 +78 +79 +77 +77 +77 +79 +78 76 -64 -1 -11 -72 -86 -90 -92 -91 -43 -1 -46 -49 -11 -31 77 -92 -92 -92 -92 -92 -44 -9 -26 -62 -83 -89 -86 +77 +77 +70 +68 74 -52 -19 -0 -11 -86 -88 -27 +75 +75 +74 +74 +65 +51 0 -9 +32 +49 +46 +45 41 -88 -59 +38 +38 +36 +36 +36 +35 +35 +36 36 -7 37 -84 -87 -67 -44 +37 +41 +43 53 -81 -64 -14 -34 -71 -24 -8 -44 +60 +67 +72 +72 +73 +74 +76 +77 +77 +77 +77 +72 +40 +22 +6 0 0 0 -22 -1 +0 +21 +62 +73 +0 +0 +0 +0 +0 +0 +17 +0 57 -76 -26 +77 +22 1 -59 -89 -92 -92 -92 -89 -67 +8 11 -1 -33 -4 -3 -21 -89 -62 11 -66 -71 -13 +11 +9 +4 0 +8 4 +1 +1 +2 +3 5 -69 -87 -28 -79 -64 -4 -19 -67 -48 7 -17 -72 -89 -68 -2 -1 -19 -59 +44 +20 +9 +41 +60 +76 77 -79 +76 69 -38 -4 -1 +59 +49 +35 26 -63 -78 -51 -14 -16 -58 -87 -89 -56 -4 -34 -88 -47 0 -16 -71 -63 -8 0 -18 -55 -64 -58 -51 -23 -1 -42 -52 -14 -10 -26 -32 -30 -30 -30 -30 -15 -3 -4 -17 -31 -39 -39 -29 -14 0 0 -9 -83 -84 -24 0 -10 -42 -87 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +44 59 -31 -6 +67 +74 +74 +76 +75 +75 +75 +74 +72 +71 +63 +59 +48 +36 34 -87 -79 -54 -46 -50 -54 +29 +24 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +26 35 -7 -33 +47 +54 +58 +49 69 -25 -6 -44 -11 +75 +77 +77 +78 +68 +55 +46 +59 +75 +43 0 0 -22 -1 -57 -77 -24 +0 +0 +0 +0 +17 +0 +52 +74 +72 +20 1 -63 -89 -42 +0 +0 +0 +0 +5 +27 +66 +35 22 -23 -74 -88 +29 34 -1 -40 +44 +52 +60 74 -79 -78 -89 -53 -18 -73 77 -16 -15 -49 -6 -84 -79 -10 +77 +74 73 -64 -12 -25 -68 -63 -20 -2 -1 +71 +55 +39 0 0 -4 -15 -4 -1 0 0 0 -1 0 -36 -64 -72 -76 -63 -28 -6 23 -54 -59 -39 -1 -18 -62 -38 -1 -6 -25 -19 -4 +0 +0 +0 +0 5 -1 0 0 0 0 0 -18 -57 -67 -39 -9 +0 +0 +0 +0 +0 +0 +24 +0 +0 +0 +0 +0 +0 +0 +0 +45 +51 +51 +53 +54 +54 +50 +45 +39 +0 +0 +0 +0 +0 0 0 0 @@ -2782,463 +3414,240 @@ P2 0 0 0 -21 -22 -6 -1 -1 -1 -3 -10 -16 -15 0 -4 -14 -7 -1 -6 -31 -70 -49 -6 -1 -17 -79 -89 -74 -57 -47 -41 -22 -1 -41 -73 -26 -6 -43 -11 0 0 -22 -1 -57 -77 -17 -1 -71 -90 -21 -1 -11 -71 -90 -35 -28 -90 -56 -14 -38 -89 -39 -9 -69 -89 -91 -88 -28 -1 -84 -47 0 0 0 -9 -52 -73 -74 -62 -15 -9 -12 -18 -39 -61 -34 -21 -19 -16 -12 23 -45 -71 -73 -51 -59 -70 -56 23 -3 +25 +28 +29 +29 +29 +29 +29 +26 +17 +0 +0 +0 +0 +0 +0 +0 0 0 0 -1 0 0 -1 -8 -14 0 0 -14 45 -26 -6 -4 -11 -17 -23 -46 -76 +56 +66 74 -67 -50 -43 -43 -45 -45 -45 -45 -45 -59 -60 -49 -43 -42 -40 -41 -46 -62 -65 -12 -2 -2 -4 -24 -14 +75 +75 +74 +53 0 0 0 0 -1 -4 -19 -64 -84 -90 -92 -91 -52 -2 -43 -74 -11 -4 -46 -18 0 0 -22 -1 -57 -77 -17 -1 -71 -90 -82 -79 -81 -89 -84 -10 -32 -87 -80 -68 -77 -81 -33 -1 -24 -69 -77 -29 -2 +0 +25 0 0 -2 -17 -16 -27 55 -72 -44 -58 -75 -78 -77 -77 -77 -75 -72 -76 -77 -77 -77 -77 -77 75 -74 -45 -18 -23 -52 -70 -58 -29 -15 -11 -9 -15 -6 -9 -14 -27 -51 -26 -35 -51 +71 69 -67 -63 68 +68 +68 +70 76 78 -78 +74 77 -68 -54 -64 -75 -76 77 76 -76 -76 -76 -76 -74 74 74 -75 -75 -76 -76 -74 72 -75 -77 -77 69 -60 -64 -54 +67 +69 +57 +28 +0 +0 +0 +0 +0 +0 +24 +26 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +24 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +17 30 -21 -18 -34 -62 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 23 -4 +28 +5 0 -3 -18 -29 -41 -26 -1 -41 -74 -11 -4 -55 -33 0 0 -22 -1 -57 -77 -17 -1 -65 -89 -92 -91 -86 -66 -17 0 -6 -51 -65 -55 -39 -34 -12 -4 -2 0 -1 -3 +0 +0 +0 +0 +23 +31 +0 +0 29 -9 -25 -75 -78 -77 -76 -74 -48 -9 -14 -59 -63 -57 +0 +0 +23 +0 +0 +0 +0 +0 +0 54 -50 -43 -39 -43 -44 -49 -53 -57 -62 -55 -34 -11 -2 -2 -21 -51 72 -77 -78 -78 -79 -77 -77 -77 -79 -78 -76 -77 -77 -77 -70 -68 74 -75 -75 74 74 -65 -51 -8 -32 -49 -46 +74 +74 +74 +67 +44 +56 +50 45 -41 -38 -38 -36 -36 -36 35 -35 -36 -36 -37 -37 -41 -43 -53 -60 -67 -72 -72 -73 -74 -76 -77 -77 -77 -77 -72 -40 -22 -6 +30 +17 0 0 0 0 -21 -62 -73 -12 0 -54 -52 0 0 -22 -1 -57 -77 -22 -1 -8 -11 -11 -11 -9 -4 0 -8 -4 -1 -1 -2 -3 -5 -7 -44 -20 -9 -41 -60 -76 -77 -76 -69 -59 -49 -35 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +23 +0 +0 +0 +0 +0 26 -8 0 0 0 @@ -3252,38 +3661,10 @@ P2 0 0 0 +17 0 0 0 -1 -1 -16 -11 -5 -18 -44 -59 -67 -74 -74 -76 -75 -75 -75 -74 -72 -71 -63 -59 -48 -36 -34 -29 -24 -18 -13 -9 -2 0 0 0 @@ -3306,102 +3687,24 @@ P2 0 0 0 -4 -12 -19 -26 -35 -47 -54 -58 -49 -69 -75 -77 -77 -78 -68 -55 -46 -59 -75 -43 -4 0 -54 -57 0 0 -22 -1 -52 -74 -72 -20 -1 0 0 0 0 -5 -27 -66 -35 -22 -29 -34 -44 -52 -60 -74 -77 -77 -74 -73 -71 -55 -39 0 0 0 0 0 0 -34 -11 -8 -14 -18 -21 -26 -29 -29 -29 -29 -26 -22 -16 -13 -7 -8 -24 -41 -39 -17 -2 0 +31 +5 0 0 -9 -45 -51 -51 -53 -54 -54 -50 -45 -39 0 0 0 @@ -3414,27 +3717,6 @@ P2 0 0 0 -3 -7 -11 -14 -17 -19 -23 -23 -25 -28 -29 -29 -29 -29 -29 -26 -22 -17 -14 -8 -1 0 0 0 @@ -3444,81 +3726,11 @@ P2 0 0 0 -9 -45 -56 -66 -74 -75 -75 -74 -53 -11 0 -47 -54 -59 0 0 -25 -1 -6 -55 -75 -71 -69 -68 -68 -68 -70 -76 -78 -74 -77 -77 -76 -74 -74 -72 -69 -67 -69 -57 -28 -12 0 0 -1 -6 -15 -24 -33 -40 -47 -54 -57 -58 -58 -57 -57 -57 -57 -57 -57 -57 -57 -57 -57 -57 -57 -54 -51 -52 -53 -42 -24 -13 -6 0 0 0 @@ -3527,328 +3739,111 @@ P2 0 0 0 +5 +0 0 0 0 0 0 0 -6 -11 -16 -22 30 -36 -40 -43 -46 -51 -57 -59 -59 -58 -58 -58 -58 -57 -57 -57 -57 -57 -57 -57 -57 -57 -57 -57 -58 -59 -54 -48 -41 -34 -28 -21 -14 -8 -1 +17 +0 +0 +0 +0 +0 +30 +27 +0 0 0 0 0 -1 -13 -23 -31 -16 -1 -29 -55 -51 -23 0 0 -62 -15 -1 -6 -54 -72 -74 -74 -74 -74 -74 -74 -67 -44 -56 -50 -45 -35 -30 -22 -14 -6 0 0 -1 -1 -4 -16 -52 -59 -58 -57 -57 -55 -53 -51 -49 -45 -41 -36 -33 -28 -28 -28 -28 -27 -30 -34 -37 -41 -46 -51 -46 -34 -41 -51 -56 -57 -59 -26 -14 -5 0 0 0 -1 -1 0 0 0 -1 -7 -14 -22 -57 -59 -58 -58 -57 -57 -55 -54 -54 -55 -55 -55 -49 -46 -42 -40 -39 -34 -34 -30 -27 -27 27 -30 -34 -37 -41 -46 -54 -54 -54 -55 -56 -57 -57 -57 -58 -59 -58 -31 -21 -13 -3 0 0 0 0 -19 -51 -54 -3 -19 0 0 -65 -54 -15 -1 -6 -9 -9 -9 -9 -9 -8 -2 0 0 0 0 -1 -1 -1 -1 -4 -1 -6 -21 -38 -49 -59 -57 -54 -46 -40 -32 -22 -16 -9 -3 -7 -19 -30 -27 -20 -2 -2 -2 -2 -2 -12 -23 -28 -25 -13 -3 -7 -8 -14 -27 -39 -47 -54 -58 -59 -56 -49 -43 -40 -39 -39 -40 -41 -44 -49 -54 -59 -58 -58 -57 -55 -48 -43 -36 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 29 23 -19 -14 -9 -6 -1 -13 -19 -25 -30 -28 -23 -12 -2 -2 -2 -12 -23 -28 -28 -16 -7 -3 -8 -13 -19 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 24 -32 -37 -44 -49 -55 -55 -57 -58 -59 -56 -47 -40 -36 -49 -54 -14 +30 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 0 28 0 0 -64 -54 -50 -17 -1 0 0 0 @@ -3856,26 +3851,31 @@ P2 0 0 0 -1 -9 -12 -19 +0 +0 +0 +0 +0 +0 +0 +0 +0 23 31 -35 -41 -48 -54 -59 -57 -55 -54 -50 -40 -6 -17 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 30 -18 +0 0 0 0 @@ -3901,31 +3901,32 @@ P2 0 24 26 -2 -34 -46 -54 -55 -56 -57 -57 -57 -57 -57 -57 -56 -56 -56 -55 -54 -54 -48 -39 +0 +23 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 26 -5 +0 23 29 -22 +17 +0 0 0 0 @@ -3952,53 +3953,52 @@ P2 0 0 0 -10 27 26 -14 0 -2 +0 +0 29 -37 -44 -51 -55 -55 -54 -51 -19 0 -6 -56 0 0 -37 -36 -53 -47 -44 -46 -46 -51 -51 -51 -53 -56 -59 -58 -58 -57 -57 +0 +0 +0 +0 +0 +0 +0 56 -55 -54 -54 -53 -48 -34 -19 -9 -4 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +23 +0 +0 +0 30 0 0 @@ -4031,26 +4031,25 @@ P2 0 0 30 -7 -6 -16 +0 +0 +0 24 -40 -45 -48 -49 -49 -49 -47 -44 -35 +0 +0 +0 +0 +0 +0 +0 +0 +0 24 -17 -11 -3 -10 +0 +0 +0 +0 28 -20 0 0 0 @@ -4087,14 +4086,15 @@ P2 0 0 0 -12 +0 +0 28 -16 0 -6 -10 -10 -1 -2 +0 +0 +0 +0 +0 +0 50 0 diff --git a/machine/tz/animation/bttzwave/bttzwave_0001_012.pgm b/machine/tz/animation/bttzwave/bttzwave_0001_012.pgm index 3a3eaac32..5d1565b82 100644 --- a/machine/tz/animation/bttzwave/bttzwave_0001_012.pgm +++ b/machine/tz/animation/bttzwave/bttzwave_0001_012.pgm @@ -3,99 +3,19 @@ P2 128 32 255 0 -7 -20 -28 -25 -10 0 -4 -10 -19 -36 -36 -36 -35 -34 -29 -18 -4 0 0 -31 -36 -24 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -6 -36 -34 -27 -22 -19 -15 -11 -7 -4 0 0 0 0 0 0 -10 -36 -37 -40 -32 -8 0 0 0 -6 -31 -34 -36 -38 -39 -39 -39 -39 -39 -39 -39 -37 -35 -31 -25 -3 -1 -4 -1 0 -9 -24 -27 -29 -30 -31 -31 -19 -16 -11 -6 -1 -25 -16 0 0 0 @@ -131,104 +51,343 @@ P2 0 0 0 -3 -6 -11 -19 -24 -29 -34 -36 +0 +0 36 37 40 -33 -29 -26 -30 -31 -19 -4 -26 -36 -31 -1 -2 -13 -18 -20 -22 -22 -20 -19 -14 -9 -5 -1 -5 -34 -38 -38 -37 -37 -36 -36 -35 -34 -31 -17 -14 -9 -3 +32 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +5 +32 +35 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +39 +42 +37 +34 +34 +34 +37 +41 +40 +30 +30 +30 +27 +21 +5 +2 +2 +5 +5 +5 +2 +0 0 -1 -14 -11 -1 0 -4 -9 -14 -26 -36 -9 -6 -6 -6 -6 -6 -6 -6 -6 -6 -6 -7 -34 -34 -26 -3 0 0 -9 -26 -32 -34 -36 -38 -39 -39 -38 -37 -36 -36 -34 -26 -18 -4 -2 -20 -28 -10 0 0 0 @@ -254,72 +413,12 @@ P2 0 0 0 -17 -32 -35 -14 0 -27 -30 -33 -34 -36 -38 -39 -40 -39 -32 -24 0 0 -5 -17 -31 -32 -28 -34 -39 -3 0 -14 -50 -52 -54 -54 -54 -54 -54 -52 -50 -41 -2 -1 -5 -9 -13 -16 -21 -26 -31 -34 -39 -39 -37 -34 -32 -26 -7 0 -1 -1 0 -21 -33 -35 -36 -39 -10 -1 0 0 0 @@ -330,98 +429,11 @@ P2 0 0 0 -1 -7 -35 -34 -26 -3 -10 -28 -34 -24 -6 -4 -4 -4 -19 -22 -27 -33 -40 -39 -39 -37 -36 -32 -27 -22 -14 -8 -4 -1 -4 -14 -39 -42 -37 -34 -34 -34 -37 -41 -40 -30 -30 -30 -27 -22 -17 -16 -16 -17 -17 -17 -16 -15 -14 -11 0 -47 -34 -36 -39 -39 -33 -19 -11 -5 0 0 0 -1 -4 -4 -18 -32 -38 -39 -12 0 -6 -51 -54 -44 -44 -42 -42 -42 -45 -46 -50 -53 -46 -2 0 0 0 @@ -431,43 +443,9 @@ P2 0 0 0 -2 -5 -17 -25 -32 -29 -7 0 0 -20 -34 -29 -21 -19 -5 -1 0 -37 -44 -45 -46 -46 -46 -46 -45 -44 -40 -4 -1 -7 -36 -34 -31 -32 -35 -26 -5 0 0 0 @@ -476,163 +454,29 @@ P2 0 0 0 -3 -10 -17 -33 -41 -39 -39 -37 -35 -33 -31 -27 -2 0 -3 -15 -19 -19 -19 -19 -19 -19 -20 -20 -20 -20 -21 -21 -21 -20 -18 -16 -13 -11 -9 -6 -6 -11 0 -47 -21 -10 -7 -4 0 0 0 0 0 -4 -13 -26 -29 -6 -4 -14 -16 -11 -1 0 -49 -57 -45 -2 -2 -2 -2 -2 -2 -3 -11 -54 -54 -44 -28 -34 -34 -29 -21 -16 -10 -5 0 0 0 0 -7 -24 -35 -36 -35 -35 -35 -27 -6 0 0 0 0 -39 -53 -56 -57 -58 -58 -58 -58 -57 -57 -52 -42 -5 -1 -7 -36 -39 -40 -26 -5 0 -15 -41 -27 -24 -21 -14 -6 0 0 0 0 0 -1 -6 -12 -19 -27 -31 -33 -33 -29 -4 0 -4 -6 -7 -7 -7 -7 -6 -5 -3 -3 -3 -3 -1 -1 0 0 0 @@ -640,101 +484,245 @@ P2 0 0 0 -1 -2 0 -28 -9 -1 0 0 0 -1 -10 -32 -42 -53 -55 -54 -54 -31 -8 0 0 0 0 -38 -56 -53 -2 -1 -10 -10 -10 10 10 +10 +10 +10 +10 +13 +13 +13 +13 +17 +17 +17 +13 7 -3 -9 -58 -54 -49 -52 -56 -56 -56 -55 -55 -54 -52 -49 -44 -14 -3 -7 -24 +2 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +23 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +2 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +23 +31 +31 +31 +31 +23 +23 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 31 -34 -33 -26 -7 -6 -22 -46 -47 -48 -54 -58 -15 -9 -9 -9 -9 -9 -9 -11 -53 -54 -43 -5 -1 -4 -5 -5 -3 0 -16 -45 -45 -54 -54 -55 -55 -54 -48 -39 -29 -11 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +31 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 2 0 0 @@ -742,11 +730,6 @@ P2 0 0 0 -2 -35 -35 -28 -6 0 0 0 @@ -761,168 +744,185 @@ P2 0 0 0 -1 -5 -8 -12 -14 -16 -15 -8 -1 0 -6 -1 -14 -30 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +23 +31 +39 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +39 +0 +0 +0 +69 +71 +71 +71 +70 +59 +0 +0 +0 +0 +31 +0 +0 +0 +0 +0 +0 +31 +31 +23 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +23 +39 39 -44 -51 -55 -57 -58 -59 -53 -44 -55 -53 -32 -22 -30 -35 39 -52 -59 -4 0 -14 -69 -71 -71 -71 -70 -59 -4 -3 -10 -51 -58 -44 -32 -33 -41 -46 -52 -58 -58 -57 -54 -48 -19 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 2 0 0 0 0 0 -6 +0 +39 +39 31 -56 -57 -59 -59 -59 -15 -1 +23 +23 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 0 0 0 0 0 0 -3 -11 -54 -54 -43 -5 0 0 0 0 -16 -25 -46 -51 -45 -43 -51 -59 -59 -58 -57 -57 -55 -55 -48 -41 -32 -19 -11 -4 0 -3 -34 -36 -29 -24 -24 -22 -21 -22 23 -26 -26 -29 -29 -29 -30 -32 -34 -34 -35 -36 -36 -35 -34 31 -25 -9 +39 +31 +0 +0 +0 +0 +0 +0 +0 +0 +0 +23 +23 +23 +31 0 0 -11 -36 -52 -57 -58 -59 -58 -44 -21 -7 -1 -8 -26 -53 -56 -56 -57 -57 -57 -58 -9 0 -8 71 77 74 @@ -931,36 +931,36 @@ P2 74 73 66 -4 -3 -14 -31 -21 -6 0 0 0 0 -1 -3 -7 -41 -54 -50 -31 -29 -24 -24 -24 -24 -37 -58 -31 -9 -7 -7 -7 -1 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +31 +0 +0 +0 +0 +0 +0 0 53 62 @@ -968,86 +968,86 @@ P2 62 62 57 -6 -3 -12 -53 -53 -48 -47 -47 -47 -28 -30 -44 -52 -42 -21 0 0 -7 -16 -23 -31 -46 -54 -59 -59 -58 -57 -55 -53 -45 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 2 0 -6 -31 -39 -38 -38 -38 -38 -39 -39 -39 -39 -39 -39 +0 +0 +0 39 39 -40 -40 -37 -33 -29 -25 +31 23 -19 -26 -32 -27 0 0 -36 -54 -41 -24 -15 -8 0 0 0 0 -5 -9 -1 -26 -41 -36 -26 -20 -15 -10 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 0 0 69 @@ -1060,30 +1060,30 @@ P2 76 74 61 -9 -3 -7 -5 -7 -16 -15 -8 -1 0 0 0 -5 -42 -57 -59 -59 -59 -59 -59 -58 -59 +0 +0 +2 +0 +0 +0 +0 +0 +0 +0 +0 +23 +39 +39 +39 +39 +39 31 -6 +39 +0 +0 0 0 0 @@ -1097,19 +1097,40 @@ P2 77 73 59 -6 -3 -11 -52 -58 -59 -59 -57 -56 -56 -54 -44 -25 +0 +0 +0 +0 +31 +39 +39 +23 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 0 0 0 @@ -1119,56 +1140,35 @@ P2 0 0 0 -5 -12 -21 -29 -42 -49 -54 -49 -4 0 -7 -10 -12 -13 -14 -14 -14 -13 -11 -10 -6 -6 -6 -4 -3 -1 0 0 0 0 0 -2 -9 -24 -34 0 0 -54 -44 -14 -1 0 0 -1 -19 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +10 49 66 64 41 -4 +0 0 0 0 @@ -1188,10 +1188,10 @@ P2 9 74 71 -15 -1 -1 -10 +0 +0 +0 +0 30 58 74 @@ -1199,18 +1199,18 @@ P2 73 69 63 -20 -1 -4 -7 -7 -7 -7 -7 -7 -12 -26 -6 +13 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 0 35 61 @@ -1226,37 +1226,50 @@ P2 72 73 59 -6 -2 -9 -8 -8 -29 -34 -41 -44 -49 -29 -1 0 -19 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +10 41 43 38 29 -16 -6 +2 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 0 0 0 0 0 0 -8 -54 -56 -46 -7 0 0 0 @@ -1273,20 +1286,7 @@ P2 0 0 0 -4 -9 -14 -19 -19 -13 -3 -8 -25 0 -8 -44 -15 -1 32 59 69 @@ -1297,7 +1297,7 @@ P2 73 69 43 -15 +0 24 34 44 @@ -1328,16 +1328,16 @@ P2 78 76 67 -20 -1 +13 +0 +0 +0 0 0 0 0 0 0 -1 -2 0 35 68 @@ -1354,19 +1354,19 @@ P2 16 71 71 -8 0 0 0 0 -1 -1 -1 -1 -1 -3 -1 -16 +0 +0 +0 +0 +0 +0 +0 +0 +2 45 66 74 @@ -1379,41 +1379,41 @@ P2 51 42 26 -11 0 -4 -55 -56 -49 -42 -42 -40 -39 -38 -38 -38 -39 -41 -41 -46 -45 -46 -47 -50 -53 -54 -54 -54 -54 -50 -39 -18 -3 -8 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 0 31 -14 -1 +0 +0 33 69 77 @@ -1465,7 +1465,7 @@ P2 64 58 36 -5 +0 35 68 79 @@ -1488,12 +1488,12 @@ P2 59 37 28 -17 -9 +5 +0 +0 0 0 0 -13 41 64 69 @@ -1508,39 +1508,39 @@ P2 77 74 59 -9 0 -4 -51 -58 -59 -59 -57 -57 -57 -57 -57 -57 -58 -58 -58 -57 -57 -59 -59 -59 -53 -49 -41 +0 +0 +0 +31 +39 +39 +23 +23 +23 +23 +23 +23 +31 +31 +31 +23 +23 39 -44 -51 -42 -18 -3 +39 +39 +0 +0 +0 +0 +0 +0 +0 +0 +0 0 32 -2 +0 32 69 79 @@ -1637,38 +1637,38 @@ P2 62 75 64 -4 0 -6 -8 -8 -8 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -4 -3 -1 -1 -1 -1 -4 -16 -37 -52 -42 -18 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +2 +0 +0 +0 +0 0 29 -1 +0 55 77 15 @@ -1766,7 +1766,6 @@ P2 64 75 68 -6 0 0 0 @@ -1783,19 +1782,20 @@ P2 0 0 0 -1 -7 -12 -19 -22 -15 -4 -12 -37 -52 -42 0 -11 +0 +0 +0 +10 +21 +0 +0 +0 +0 +0 +0 +0 +0 0 64 77 @@ -1918,13 +1918,13 @@ P2 70 54 25 -4 -12 -37 -51 0 -6 -6 +0 +0 +0 +0 +0 +0 67 67 5 @@ -2047,12 +2047,12 @@ P2 71 58 25 -4 -12 -39 0 -5 -12 +0 +0 +0 +0 +0 69 47 3 @@ -2175,11 +2175,11 @@ P2 51 71 57 -22 -2 -24 +21 +0 +0 +0 0 -4 26 72 36 @@ -2304,10 +2304,10 @@ P2 53 72 43 -7 -19 0 -3 +0 +0 +0 34 74 26 @@ -2432,10 +2432,10 @@ P2 31 67 49 -12 -20 0 -3 +0 +0 +0 42 75 16 @@ -2560,10 +2560,10 @@ P2 25 62 49 -11 -21 -13 -2 +0 +0 +0 +0 51 77 8 @@ -2688,10 +2688,10 @@ P2 25 62 48 -11 -24 +0 +0 28 -1 +0 61 76 7 @@ -2816,8 +2816,8 @@ P2 26 62 45 -9 -26 +0 +0 34 0 67 @@ -2944,8 +2944,8 @@ P2 33 69 43 -7 -29 +0 +0 27 0 67 @@ -3072,10 +3072,10 @@ P2 42 74 29 -1 -33 -22 -1 +0 +0 +21 +0 52 74 62 @@ -3111,8 +3111,8 @@ P2 59 65 30 -9 -20 +0 +13 51 72 77 @@ -3199,12 +3199,12 @@ P2 1 46 74 -19 +10 +0 0 -54 25 0 -9 +0 50 72 74 @@ -3213,24 +3213,9 @@ P2 49 35 25 -13 -9 0 0 0 -1 -1 -2 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 0 0 0 @@ -3240,8 +3225,23 @@ P2 0 0 0 -1 -14 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 29 44 52 @@ -3259,8 +3259,8 @@ P2 72 74 42 -11 -17 +0 +5 56 72 68 @@ -3315,68 +3315,68 @@ P2 8 0 0 -4 -18 -22 -7 -1 +4 +18 +22 +7 +1 +0 +0 +0 +0 +26 +67 +73 +0 +0 +0 +0 +0 +0 +0 +31 +0 +0 +0 +0 +0 +0 0 0 0 0 -26 -67 -73 13 -0 -54 -63 -11 -1 -12 +26 31 +27 +10 0 0 0 0 0 0 -2 -1 -8 -14 -20 -26 -31 -34 -36 -37 -39 -39 -39 -40 -40 -40 -39 -37 -36 -34 +0 +0 +0 +10 +27 32 29 23 -19 -13 -11 -37 -13 -2 +10 +0 +0 +0 +0 +0 +0 0 0 0 0 0 0 -7 36 50 59 @@ -3386,10 +3386,10 @@ P2 74 68 50 -22 -4 -2 -20 +21 +0 +0 +13 52 72 75 @@ -3456,69 +3456,69 @@ P2 74 24 0 -6 -54 -71 -56 -14 -1 0 0 -6 -14 -22 +0 +0 +0 +0 +0 +0 +0 +0 +21 31 -40 -49 -56 -58 -57 -57 -57 -56 -56 -55 -55 -55 -55 -55 -55 -55 -55 -55 -56 -56 -56 -56 -57 -57 -57 -57 -56 -54 -53 -44 -39 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 32 -22 -14 -9 -1 +21 0 0 0 0 -6 -16 +0 +0 +0 +0 +2 24 31 31 24 -9 -6 -9 -5 -18 +0 +0 +0 +0 +7 46 59 62 @@ -3582,84 +3582,84 @@ P2 76 74 34 -2 0 -56 -51 -49 -55 -59 +0 +0 +0 +0 +0 +0 +5 17 -21 -57 -59 -58 -57 -57 -56 -54 -53 -44 -38 -34 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +27 27 24 -22 -20 -19 -17 -16 -15 -15 -15 -15 -16 -17 -19 -20 21 +13 +10 +5 +2 +0 +0 +0 +0 +2 +5 +10 +13 +17 23 25 30 -36 -39 -44 -52 -54 -55 -56 -57 -58 -58 -59 +10 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 27 -18 -9 -1 -1 -1 -1 +7 0 0 0 -1 -7 -33 -13 0 0 0 -1 -3 -3 -5 -8 +0 +0 +0 +0 +31 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +2 10 -11 -15 -16 -19 -22 +21 26 29 27 @@ -3671,8 +3671,8 @@ P2 36 36 36 -16 -9 +2 +0 25 34 34 @@ -3709,27 +3709,79 @@ P2 34 31 25 -4 0 -57 -54 -33 -19 -37 -54 -57 -57 -55 -48 -41 -34 -24 -16 -9 -1 -19 +0 +0 +0 +31 +10 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +10 29 -20 +13 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +13 +28 +25 +0 +0 +0 +17 +30 +0 +0 +0 +0 +0 +0 +0 +0 +27 +27 +2 +0 +0 +0 +31 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 0 0 0 @@ -3749,41 +3801,13 @@ P2 0 0 0 -20 -28 -25 0 -8 -13 -21 -30 -39 -45 -54 -57 -57 -59 -51 -42 -34 -27 -16 -11 -6 -11 -33 -54 -47 -13 -1 0 0 0 0 0 0 -1 -1 0 0 0 @@ -3813,14 +3837,8 @@ P2 0 0 0 -1 -1 -1 -1 0 0 -1 -1 0 0 0 @@ -3838,19 +3856,6 @@ P2 0 0 0 -44 -56 -41 -1 -7 -9 -37 -52 -43 -29 -11 -29 -22 0 0 0 @@ -3880,102 +3885,178 @@ P2 0 0 0 +28 +23 +0 +31 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +10 +31 +31 +25 +17 +10 +2 +0 +0 +0 +0 +0 +0 +0 +0 +0 +5 +13 +17 +17 +24 +24 +29 +29 +29 +29 +29 +29 +29 +29 +29 +30 +30 +30 +30 +30 +30 +24 +21 +13 +2 +0 +0 +0 +0 +0 +0 +0 +10 +17 +24 +24 +29 +31 +32 +10 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +13 +21 +0 +0 +17 +32 +0 +0 +0 +0 +0 +0 +23 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 0 0 0 0 -5 -28 -23 0 -33 -43 -54 -54 -55 -57 -57 -58 -59 -59 -52 -51 -53 -54 -49 -45 -42 -41 -39 -39 -37 -36 -33 -31 -25 -21 -19 -16 -13 -13 -11 -11 -11 -11 -13 -13 -14 -17 -20 -21 -21 -24 -24 -29 -29 -29 -29 -29 -29 -29 -29 -29 -30 -30 -30 -30 -30 -30 -24 -22 -20 -16 -11 -7 -7 -7 -9 -11 -14 -19 -21 -24 -24 -29 -31 -32 -36 -42 -54 -52 -1 -1 0 -1 -7 -3 -16 -20 0 0 0 @@ -4016,85 +4097,4 @@ P2 0 0 0 -20 -22 -1 -11 -21 -32 -44 -48 -54 -54 -52 -47 -35 -41 -51 -54 -56 -57 -57 -57 -57 -57 -57 -58 -58 -58 -57 -59 -59 -59 -59 -58 -59 -59 -59 -59 -59 -58 -58 -57 -56 -56 -57 -57 -57 -57 -57 -57 -57 -57 -57 -57 -57 -57 -56 -56 -56 -56 -57 -57 -57 -58 -59 -59 -58 -59 -59 -59 -58 -57 -58 -57 -57 -57 -57 -57 -56 -54 -51 -11 0 -8 diff --git a/machine/tz/animation/bttzwave/bttzwave_0001_013.pgm b/machine/tz/animation/bttzwave/bttzwave_0001_013.pgm index e6f7bf837..355ebb2fd 100644 --- a/machine/tz/animation/bttzwave/bttzwave_0001_013.pgm +++ b/machine/tz/animation/bttzwave/bttzwave_0001_013.pgm @@ -3,44 +3,42 @@ P2 128 32 255 4 -12 -34 -36 -36 -38 -38 -39 -39 -40 -39 -37 -35 -33 -33 -31 -19 +8 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 3 1 7 -31 -36 -37 -10 -10 -14 -17 -22 -26 -31 +0 +0 +0 +0 +0 +0 +0 +0 +0 +25 34 38 39 39 37 35 -31 -21 -6 +25 0 0 0 @@ -52,17 +50,19 @@ P2 0 0 0 -1 -14 -9 -1 0 0 0 0 0 -23 -31 +0 +0 +0 +0 +0 +0 +0 +25 34 36 38 @@ -75,13 +75,12 @@ P2 39 35 34 -31 -22 -3 -2 -17 +25 +0 +0 +0 +0 36 -8 0 0 0 @@ -121,100 +120,16 @@ P2 0 0 0 -31 -30 -15 -15 -16 -13 -11 +0 25 +13 0 -26 -33 -39 -33 -29 -24 -17 -14 -10 -6 -2 0 0 -4 -16 -34 -34 -19 -7 -32 -36 -39 -8 -1 0 -1 -1 -1 -1 -1 -1 -1 -3 -4 -6 -7 -27 -33 -24 -11 -10 -11 -12 -15 -18 -29 -29 -28 -26 -8 0 -1 -1 0 -14 -26 -29 -29 -30 -34 -36 -9 -6 -6 -6 -6 -6 -6 -6 -19 -19 -22 -26 -29 -32 -27 -3 -1 -6 -10 -8 0 -14 -30 -18 0 0 0 @@ -233,6 +148,7 @@ P2 0 0 0 +7 0 0 0 @@ -242,25 +158,7 @@ P2 0 0 0 -6 -22 -37 -39 -25 -16 -17 -19 -19 -19 -16 -11 -4 -11 -36 0 -34 -26 -1 0 0 0 @@ -269,288 +167,65 @@ P2 0 0 0 +33 0 -2 -1 -1 -17 -36 -36 -35 -36 -39 -6 -1 0 -22 -29 -24 -18 -13 -9 -4 0 0 0 0 -1 -7 -29 -36 -36 -36 -37 -37 -37 -39 -39 -37 -35 -33 -29 -9 -1 0 15 -29 +15 +11 +3 +0 +0 +0 +0 +0 +0 +3 +15 +15 +20 34 36 -38 -39 -39 -10 -1 0 0 0 0 0 -1 -1 -1 -1 -1 -1 -7 -37 -34 -24 -6 -1 -1 0 0 -8 -16 -16 -10 -6 -2 -1 -7 -16 -28 -30 -28 -27 -23 -23 -27 -28 -30 -28 -16 -16 -17 -27 -23 -17 -16 -16 -17 -17 -18 -19 -19 -19 -19 -21 -21 -18 -10 -6 -2 0 0 0 -1 -38 0 -33 -3 0 -9 -15 -21 -31 -37 -42 -48 -53 -53 -46 -29 -4 -1 -17 -36 -37 -34 -3 +0 +30 +0 +0 0 0 -28 -45 -53 -53 -54 -54 -53 -52 -51 -49 -44 -41 -4 -1 -4 -5 -5 -5 -5 -5 -5 -5 -5 -5 -4 -26 -34 -32 -31 -33 -34 -36 -19 -6 -5 -5 -5 -1 0 -37 -44 -45 -46 -27 -24 -19 -15 -12 -7 -3 -1 -9 -31 -34 -23 -6 0 0 -9 -23 -29 -32 -33 -34 -34 -34 -34 -31 -27 -26 -25 -24 -23 -23 -24 -24 -25 -24 -24 -4 0 -2 -19 -21 -19 -17 -16 -14 13 -11 -9 -8 -6 -4 -1 0 0 0 0 0 -5 -6 0 -24 0 -6 -4 -51 -55 -56 -57 -57 -58 -58 -59 -59 -58 -55 -54 -31 -4 0 0 0 -1 0 0 -30 -48 -56 -45 -38 -44 -49 -57 -59 -59 -57 -57 -52 -42 -5 0 0 0 @@ -562,64 +237,16 @@ P2 0 0 0 -3 -28 -40 -40 -40 -39 -17 -1 0 0 0 0 0 +0 +0 +37 39 -53 -56 -57 -55 -55 -54 -54 -53 -51 -49 -41 -7 -1 -12 -29 -34 -25 -4 -12 -27 -32 -29 -26 -27 -33 -38 -39 -39 -39 -39 -39 -39 -39 -39 -39 -39 -38 -36 -35 -33 -27 -4 0 -1 0 0 0 @@ -629,150 +256,546 @@ P2 0 0 0 +36 0 0 0 -1 -6 -17 -24 -29 -30 -22 -8 -15 0 -1 -28 -56 -47 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +36 +36 +36 +37 +37 +37 39 -31 -23 -16 -10 -4 -1 -6 -26 -54 -55 -31 -5 -3 -3 +39 +37 +35 +33 +15 +0 0 0 -34 -51 -57 -42 -19 -1 -2 -2 -2 -4 -5 -9 -11 -53 -54 -43 -29 -44 -46 -47 -48 -48 -48 -47 -46 -44 -14 -1 -1 -2 -1 -1 -1 -1 0 -28 -44 -46 -47 -48 -54 -58 15 -29 -33 +34 +36 +38 39 -45 -51 -59 -58 -56 -51 +39 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 37 -11 -2 -12 -32 -36 34 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +13 +0 +0 +0 +0 +0 +0 +13 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +38 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +34 +30 +25 +33 34 -35 -29 -17 -9 +36 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +25 +34 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +37 +45 +53 +53 +58 +58 +59 +59 +58 +37 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +45 +0 +0 +0 +0 +53 +59 +59 +53 +53 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +40 +40 +40 +39 +0 +0 +0 +0 +0 +0 +0 +0 +0 +45 +53 +37 +37 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +30 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +13 +0 +0 +0 +0 +0 +0 +45 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +37 +0 +0 +0 +0 +0 +0 +0 +0 +53 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +58 +0 +0 +0 +0 +0 +0 +59 +58 +45 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +37 +45 +0 +0 +0 +0 0 0 0 -1 -4 -5 -9 -9 -10 -11 -11 -11 -11 -9 -8 -9 -32 -35 -28 -4 0 0 -3 -6 -9 -12 -14 -17 -18 -19 -21 -25 -29 -32 -34 -36 -37 -36 -35 -32 -26 -10 0 -16 -52 -9 0 0 0 @@ -781,83 +804,84 @@ P2 0 0 0 -2 -1 -26 -55 -56 -54 -54 -54 -51 -45 -51 -57 -39 -18 -1 -4 -13 -6 0 0 0 0 -3 -11 -54 -54 -51 -56 -57 +45 +53 59 59 59 59 58 -57 -54 -48 -12 +53 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 0 0 -1 -2 -1 0 -31 -52 -57 -57 -59 -59 -59 -15 -1 -1 -1 -2 -2 -3 -10 -16 -21 -44 -53 -37 -11 -1 -9 -36 -39 -40 -29 -14 -4 -2 -6 -5 -1 0 0 0 @@ -871,37 +895,13 @@ P2 0 0 0 -6 -33 -36 -31 -33 -35 -35 -35 -36 -36 -36 -37 -37 -37 -37 -39 -39 -40 -39 -31 -18 -11 -10 -26 34 -30 +13 +0 +0 +0 +0 0 -50 -14 -1 -18 33 44 52 @@ -910,125 +910,125 @@ P2 71 65 41 -6 -2 -26 -54 -56 -56 -59 -58 -57 -58 -34 -12 -1 -8 -26 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 69 70 68 67 62 58 -6 -3 -11 -53 -59 -31 -9 -7 -7 -7 -7 -7 -7 -41 -54 -52 -53 -54 -54 -54 -54 -54 -56 -59 -26 -9 -7 -7 -7 -1 -1 -13 -20 -10 -1 0 -1 -1 -3 -19 +0 +0 +0 +59 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 45 -54 -38 -9 -1 +59 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 0 -1 -6 -7 -3 -6 -14 -31 -51 -53 -52 -49 -48 -48 -48 -48 -48 -48 -48 -47 -46 -42 -6 0 -6 -34 -39 -39 -39 -35 -31 -28 -26 -24 -20 -20 -19 -17 -14 -11 -6 -1 0 0 0 -1 -2 -26 34 0 -49 0 -23 +0 +0 69 76 77 @@ -1039,18 +1039,18 @@ P2 76 73 42 -6 0 0 0 0 -1 -6 -12 -16 -9 0 -11 +0 +0 +0 +0 +0 +0 +0 36 72 76 @@ -1060,11 +1060,6 @@ P2 77 73 60 -7 -3 -11 -26 -6 0 0 0 @@ -1072,24 +1067,29 @@ P2 0 0 0 -5 -44 +0 +0 +0 +0 +0 +0 +0 59 59 -57 -51 -49 -51 -54 +53 +0 +0 +0 +0 58 -26 -3 0 0 0 0 0 -15 +0 +0 +0 38 70 70 @@ -1097,46 +1097,12 @@ P2 52 44 36 -16 -3 -19 -46 -54 -40 -6 -1 0 0 0 -7 -24 -38 -53 -52 -57 -58 -59 -59 -59 -59 -59 -59 -59 -59 -58 -57 -54 -45 -7 0 -4 -1 0 0 -1 -1 -1 -1 0 0 0 @@ -1146,16 +1112,50 @@ P2 0 0 0 -5 -14 -25 -14 -1 -4 -25 0 0 -21 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 69 66 36 @@ -1168,17 +1168,17 @@ P2 72 72 43 -9 -7 -4 -4 0 0 0 0 0 0 -28 +0 +0 +0 +0 +0 72 74 66 @@ -1189,9 +1189,9 @@ P2 72 74 59 -6 -3 -3 +0 +0 +0 0 35 61 @@ -1199,18 +1199,18 @@ P2 64 64 63 -20 -1 -1 -1 0 0 0 0 -1 -8 -23 -1 +0 +0 +0 +0 +0 +0 +0 +0 0 35 61 @@ -1226,63 +1226,63 @@ P2 74 71 51 -15 -3 -18 -48 -54 -54 -52 -46 -39 -33 -35 -43 -53 -47 -27 0 -1 -6 -7 -7 -7 -7 -7 -7 -7 -7 -9 -50 -55 -46 -6 0 0 -1 -6 -11 -15 -19 -21 -26 -26 -26 -26 -28 -32 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 37 -42 -49 -54 -54 -51 -41 -15 0 -6 -14 -6 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 65 69 22 @@ -1317,8 +1317,8 @@ P2 15 71 71 -8 -1 +0 +0 0 35 68 @@ -1328,15 +1328,15 @@ P2 78 76 67 -18 -1 0 -3 -10 -14 -13 -9 -3 +0 +0 +0 +0 +0 +0 +0 +0 0 0 41 @@ -1355,21 +1355,23 @@ P2 61 73 52 -15 -3 -15 -48 -54 +0 +0 +0 +0 +0 59 58 -57 -57 -57 53 -41 -21 +53 +53 +0 +0 +0 +0 +0 +0 0 -1 0 0 0 @@ -1381,36 +1383,34 @@ P2 0 0 0 -8 -51 -56 -49 -51 -54 -54 -54 -54 -55 -55 -55 -56 -56 -56 -55 -56 -57 -57 -58 -59 -58 -50 45 -51 -44 -13 -1 -29 -14 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 70 44 4 @@ -1465,7 +1465,7 @@ P2 72 64 39 -1 +0 41 68 79 @@ -1485,18 +1485,18 @@ P2 72 43 0 -1 -2 -1 -5 -14 -19 -24 -29 -29 -14 -1 -7 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 34 68 69 @@ -1508,37 +1508,37 @@ P2 64 64 60 -9 0 -9 -51 +0 +0 +0 59 59 -57 -52 -48 -44 -38 -36 -30 -30 -30 -30 -30 -29 -27 -23 -16 -9 -2 -2 -16 -37 -52 -46 -11 -26 -20 +53 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 72 36 2 @@ -1612,18 +1612,18 @@ P2 32 76 54 -21 -11 -7 -1 0 0 0 0 0 0 -4 -16 +0 +0 +0 +0 +0 +0 43 74 76 @@ -1637,36 +1637,36 @@ P2 78 76 63 -10 0 -6 -2 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 0 0 0 0 0 -4 -3 -12 -38 -54 -48 -30 -26 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 74 29 1 @@ -1749,8 +1749,8 @@ P2 46 41 38 -26 -24 +0 +0 42 72 68 @@ -1766,34 +1766,34 @@ P2 68 75 62 -9 0 0 -4 -8 -16 -21 -26 -29 +0 +0 +0 +0 +0 +0 +0 36 36 36 36 -29 -24 -31 +0 +0 +25 41 44 53 62 69 54 -21 -4 -12 -39 -54 -55 +0 +0 +0 +0 +0 +37 36 74 26 @@ -1917,11 +1917,11 @@ P2 79 74 62 -25 -4 -11 -46 -59 +0 +0 +0 +0 +0 40 75 21 @@ -2046,10 +2046,10 @@ P2 55 72 58 -22 -1 -34 -60 +0 +0 +0 +0 45 76 14 @@ -2175,9 +2175,9 @@ P2 54 72 40 -6 -34 -61 +0 +0 +0 48 77 11 @@ -2303,9 +2303,9 @@ P2 24 67 46 -6 -34 -62 +0 +0 +0 51 77 8 @@ -2431,9 +2431,9 @@ P2 20 61 45 -6 -35 -64 +0 +0 +0 54 78 7 @@ -2559,9 +2559,9 @@ P2 20 61 44 -5 -35 -64 +0 +0 +0 57 74 8 @@ -2687,9 +2687,9 @@ P2 20 62 41 -4 -37 -67 +0 +0 +0 62 72 24 @@ -2815,9 +2815,9 @@ P2 27 69 39 -3 -39 -71 +0 +0 +0 56 75 67 @@ -2942,11 +2942,11 @@ P2 3 33 74 -26 0 -41 -69 -1 +0 +0 +0 +0 54 73 77 @@ -3070,32 +3070,32 @@ P2 1 34 74 -21 0 -55 -58 0 -7 -46 -45 -36 -33 -29 -26 -24 -21 -15 -16 -16 -16 -16 -18 -20 -21 -23 -24 -27 -31 +0 +0 +0 +0 +46 +45 +36 +33 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +25 35 44 51 @@ -3198,12 +3198,7 @@ P2 12 54 74 -20 0 -54 -68 -11 -1 0 0 0 @@ -3212,26 +3207,31 @@ P2 0 0 0 -1 -1 -1 -1 -1 -1 -1 -1 -3 -1 -1 -1 -1 0 0 0 0 -6 -17 -26 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 37 49 59 @@ -3326,40 +3326,40 @@ P2 49 76 51 -7 0 -54 -63 -56 -19 +0 +0 +0 +0 +0 +0 +0 +25 19 +5 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +14 26 -31 -35 -38 -41 -42 -45 -46 -46 -49 -49 -49 -47 -46 -44 -44 -40 -39 -36 -33 -30 -22 -16 -9 -1 -1 -1 +13 +0 +0 +0 +0 +0 +0 0 0 0 @@ -3370,7 +3370,7 @@ P2 73 56 36 -24 +0 57 76 72 @@ -3389,7 +3389,7 @@ P2 61 72 55 -31 +25 56 74 63 @@ -3453,53 +3453,53 @@ P2 77 75 59 -16 -1 -34 -54 -50 -54 -57 -57 -57 -57 -57 -57 -56 -56 -56 -54 -54 -54 -54 -54 -54 -54 -54 -54 -54 -55 -56 -56 -56 -57 -57 -58 -57 -49 -41 -31 -19 -11 0 0 0 -4 -18 -20 -14 -1 -12 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +25 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 56 72 74 @@ -3516,9 +3516,9 @@ P2 77 72 62 -25 -1 -12 +0 +0 +0 60 76 76 @@ -3580,15 +3580,15 @@ P2 55 48 46 +0 +0 +0 +0 +0 +0 +10 +0 26 -1 -19 -51 -54 -11 -37 -39 -33 27 23 20 @@ -3611,27 +3611,27 @@ P2 22 25 30 -37 -45 -54 -54 -55 -57 -57 -58 -58 -17 -6 +10 +0 +0 +0 +0 +0 +0 0 0 0 0 0 -1 -10 -19 -27 -31 +0 +0 +0 +0 +0 +0 +0 +0 +25 36 46 45 @@ -3643,11 +3643,11 @@ P2 65 65 57 -27 -1 0 -1 -15 +0 +0 +0 +0 54 72 74 @@ -3671,9 +3671,9 @@ P2 36 36 36 -18 -9 -26 +0 +0 +0 36 36 36 @@ -3697,11 +3697,6 @@ P2 45 41 34 -29 -22 -17 -6 -1 0 0 0 @@ -3709,11 +3704,16 @@ P2 0 0 0 -9 -41 -55 -31 -4 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 19 28 20 @@ -3738,25 +3738,214 @@ P2 0 0 0 -12 -28 -25 -1 -9 -16 -26 -37 -46 -54 -58 -59 -49 -36 -12 -2 -32 -13 -2 +12 +28 +25 +1 +9 +16 +26 +10 +0 +0 +0 +0 +0 +14 +0 +0 +30 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +37 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +5 +29 +14 +29 +0 +0 +0 +0 +0 +0 +0 +0 +5 +26 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +5 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 0 0 0 @@ -3768,25 +3957,6 @@ P2 0 0 0 -1 -2 -4 -4 -1 -17 -11 -4 -14 -24 -26 -26 -26 -24 -22 -21 -16 -7 -2 0 0 0 @@ -3810,13 +3980,6 @@ P2 0 0 0 -2 -4 -7 -7 -7 -4 -2 0 0 0 @@ -3831,16 +3994,6 @@ P2 0 0 0 -1 -4 -6 -9 -12 -15 -33 -55 -44 -13 0 0 0 @@ -3850,6 +4003,11 @@ P2 0 0 0 +20 +16 +4 +16 +30 0 0 0 @@ -3868,108 +4026,35 @@ P2 0 0 0 +10 +10 0 0 0 0 -5 -29 -14 -29 -43 -54 -55 -56 -57 -54 -51 -46 -38 -33 -24 -20 -16 -12 -8 -6 -3 -1 -1 -1 -1 -1 +30 0 -4 -16 -38 -39 -17 -3 0 0 0 +25 +30 +34 +36 +30 +21 0 0 0 -1 -1 0 0 0 0 -3 -7 -13 -17 -21 -24 -29 -29 -29 -29 -29 -29 -29 -29 -24 -21 -20 -14 -9 -4 0 0 0 0 -1 -1 -1 -1 -1 0 -4 -8 -11 -14 -16 -20 -21 -31 -35 -41 -45 -49 -54 -57 -59 -59 -59 -57 -56 -51 -22 -1 -10 0 0 0 @@ -4003,98 +4088,13 @@ P2 0 0 0 -20 -16 -4 -16 -32 -51 -53 -51 -53 -55 -56 -57 -58 -58 -59 -59 -58 -57 -56 -53 -46 -44 -41 -37 -37 -42 -51 -53 -43 -32 -29 -29 -29 -29 -31 -32 -34 -36 -38 -40 -44 -53 -59 -59 -58 -58 -58 -57 -57 -57 -57 -57 -55 -54 -55 -57 -57 -57 -58 -58 -59 -59 -57 -56 -52 -51 -51 -51 -51 -51 -53 -55 -57 -59 -59 -59 -58 -57 -57 -57 -57 -56 -56 -56 -56 -55 -55 -55 -54 -51 -47 -36 -1 -2 -24 +35 +35 +35 +0 +0 +0 +0 +0 +0 +0 diff --git a/machine/tz/animation/bttzwave/bttzwave_0001_014.pgm b/machine/tz/animation/bttzwave/bttzwave_0001_014.pgm index 5692c7045..30bc17163 100644 --- a/machine/tz/animation/bttzwave/bttzwave_0001_014.pgm +++ b/machine/tz/animation/bttzwave/bttzwave_0001_014.pgm @@ -2,44 +2,44 @@ P2 # CREATOR: GIMP PNM Filter Version 1.1 128 32 255 -35 -36 -37 -37 -38 -38 -38 -38 -40 -40 -39 -39 -37 -36 -34 -28 -17 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +5 3 0 1 0 0 -23 -32 -34 -36 -38 -39 -39 -39 -39 -39 -39 -39 -37 -35 -31 -26 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 1 0 0 @@ -62,10 +62,10 @@ P2 0 1 10 -22 -45 -36 -16 +0 +0 +0 +6 0 0 0 @@ -141,19 +141,19 @@ P2 1 5 9 -12 -16 -21 -26 -31 -31 -19 +11 +6 +0 +0 +0 +0 +0 1 0 0 -24 -34 -36 +0 +0 +0 9 6 6 @@ -166,19 +166,19 @@ P2 6 6 7 -34 -34 -31 -33 -35 -35 -35 -35 -33 -31 -31 -28 -26 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 8 0 1 @@ -190,19 +190,19 @@ P2 0 0 0 -14 -26 -31 -33 -34 -35 -34 -34 -34 -42 -52 -41 -14 +9 +0 +0 +0 +0 +0 +0 +0 +0 +0 +21 +0 +9 0 0 0 @@ -273,14 +273,14 @@ P2 0 1 5 -16 -34 -35 -19 +6 +0 +0 +0 2 -24 -34 -38 +0 +0 +0 10 1 0 @@ -295,132 +295,132 @@ P2 0 1 7 -37 -39 -39 -36 -36 -36 -38 -40 -39 -37 -35 -33 -29 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 9 1 0 4 10 -21 -31 -28 -24 -21 -26 -34 -29 -22 -25 -29 -34 -37 -40 -39 -38 -37 -36 -34 -32 -30 -26 -5 -14 -17 -31 -26 -17 -16 -16 -16 -16 -16 -16 -16 -16 -16 -13 -7 -4 -1 -4 -7 -11 -11 -12 -7 0 -4 -14 -19 -19 -20 -21 -18 -12 -8 -4 -1 0 0 -1 -6 -11 -16 -19 -21 -19 -7 0 -8 0 0 -44 -53 -54 -55 -55 -55 -55 -54 -51 -45 -41 -34 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +5 +9 +5 +0 +0 +5 +6 +6 +6 +6 +6 +6 +6 +6 +6 +10 +7 +4 +1 +4 +7 +11 +11 +11 +7 +0 +4 +14 +19 +19 +20 +21 +18 +12 +8 +4 +1 +0 +0 +1 +6 +11 +6 +0 +0 +0 +7 +0 +8 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +27 26 16 6 3 -17 -38 -36 -33 -35 -39 +5 +0 +0 +0 +0 +0 10 1 0 -37 -44 -45 -46 -46 -46 -46 -45 -44 -41 +15 +0 +0 +0 +0 +0 +0 +0 +0 +0 4 1 1 @@ -434,21 +434,21 @@ P2 1 2 4 -26 -34 -32 -20 -16 -15 -24 -34 -35 -36 -36 -36 -37 -31 -14 +0 +0 +0 +0 +6 +8 +0 +0 +0 +0 +0 +0 +0 +0 +9 1 1 1 @@ -456,38 +456,38 @@ P2 1 6 10 -14 -17 -20 -27 -30 -32 -32 -26 +9 +5 +0 +0 +0 +0 +0 +0 2 1 4 1 0 9 -23 -26 -28 -29 -30 -31 -31 -31 -31 -34 -36 -36 -36 -36 -35 -34 -32 -23 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 8 0 5 @@ -502,54 +502,54 @@ P2 0 4 10 -32 -35 -36 -36 -36 -34 -31 -26 +0 +0 +0 +0 +0 +0 +0 +0 7 0 0 0 -54 -51 -51 -53 -53 -56 -56 -59 -59 -58 -58 -57 -54 -46 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 29 6 1 -17 -37 -39 -39 +5 +0 +0 +0 10 1 0 -39 -53 -56 -57 -58 -58 -58 -58 -57 -57 -52 -45 +5 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 2 0 2 @@ -563,19 +563,19 @@ P2 0 0 3 -28 -39 -38 -37 -36 -35 -37 -23 -16 -18 -22 -24 -17 +0 +0 +0 +0 +0 +0 +0 +0 +6 +2 +0 +0 +5 1 6 12 @@ -590,33 +590,33 @@ P2 1 1 7 -37 -34 -26 +0 +0 +0 3 0 0 9 -26 -32 -34 -36 -38 -39 -39 -39 -40 -40 -40 -39 -35 -31 -28 -24 -21 -26 -34 -24 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 8 0 0 @@ -625,24 +625,24 @@ P2 0 1 6 -16 -22 -28 -34 -35 -36 -39 -32 -27 -21 -18 -26 -33 -29 +6 +0 +0 +0 +0 +0 +0 +0 +0 +0 +2 +0 +0 +0 8 0 0 -41 +0 7 0 0 @@ -654,9 +654,9 @@ P2 10 15 24 -35 -49 -50 +23 +0 +0 31 4 0 @@ -665,9 +665,9 @@ P2 5 1 0 -39 -54 -58 +5 +0 +0 15 9 9 @@ -676,28 +676,28 @@ P2 9 9 11 -53 -54 -46 +0 +0 +0 31 -52 -54 -55 -55 -55 -54 -54 -51 -47 +0 +0 +0 +0 +0 +0 +0 +0 +0 14 1 3 -17 -23 -29 -34 -39 -23 +5 +0 +0 +0 +0 +0 11 3 0 @@ -706,12 +706,12 @@ P2 0 6 29 -50 -51 -52 -49 -43 -37 +0 +0 +0 +0 +0 +15 32 27 21 @@ -719,14 +719,14 @@ P2 8 1 5 -38 -34 -26 +0 +0 +0 3 9 -27 -34 -25 +0 +0 +0 6 4 5 @@ -743,31 +743,31 @@ P2 0 0 10 -28 -35 -26 -19 -20 -22 -26 -30 -34 -35 -36 -37 -38 -39 -36 -29 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 2 0 0 0 2 -9 -25 -34 -29 +9 +0 +0 +0 0 0 6 @@ -784,17 +784,17 @@ P2 1 7 26 -49 -52 +0 +0 31 2 0 0 0 0 -39 -54 -59 +5 +0 +0 15 1 0 @@ -805,19 +805,19 @@ P2 0 3 11 -57 -54 -54 -55 -51 -49 -51 -52 -57 -59 -57 -54 -48 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 14 1 0 @@ -833,27 +833,27 @@ P2 19 19 31 -54 -52 -48 -54 -59 -57 -57 -57 -55 -54 -51 -39 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +5 5 2 5 -37 -34 -30 -32 -35 -26 +0 +0 +0 +0 +0 +0 5 0 0 @@ -872,18 +872,18 @@ P2 12 1 10 -29 -37 -37 -37 -38 -39 -39 -40 -36 -32 -19 -14 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +9 7 0 0 @@ -894,8 +894,8 @@ P2 12 3 8 -26 -34 +0 +0 0 0 5 @@ -913,15 +913,15 @@ P2 11 6 26 -51 -56 -54 -53 -51 -47 -45 -53 -58 +0 +0 +0 +0 +0 +0 +0 +0 +0 15 1 0 @@ -934,8 +934,8 @@ P2 6 3 9 -57 -59 +0 +0 22 0 0 @@ -944,9 +944,9 @@ P2 1 1 3 -41 -54 -50 +0 +0 +0 31 21 16 @@ -956,13 +956,13 @@ P2 0 9 26 -46 -54 -55 -56 -57 -51 -34 +0 +0 +0 +0 +0 +0 +27 2 2 8 @@ -970,41 +970,41 @@ P2 21 26 29 -36 -44 -53 -41 +19 +0 +0 +0 4 1 5 -36 -39 -40 -27 +0 +0 +0 +0 6 0 15 -40 -46 -46 -47 -49 -53 -55 -55 -55 -56 -56 -55 -53 -39 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +5 13 1 10 -19 -19 -18 -16 +0 +0 +2 +6 11 8 3 @@ -1016,14 +1016,14 @@ P2 0 6 16 -52 -53 -50 -38 +0 +0 +0 +10 18 3 7 -26 +0 0 0 37 @@ -1042,13 +1042,13 @@ P2 12 6 24 -46 -54 -59 -59 -58 -57 -59 +0 +0 +0 +0 +0 +0 +0 15 1 0 @@ -1073,22 +1073,22 @@ P2 0 0 5 -42 -54 -57 -56 -55 -54 -47 -38 +0 +0 +0 +0 +0 +0 +0 +10 30 -34 -47 -52 -42 -38 -39 -39 +27 +0 +0 +0 +10 +5 +5 26 1 1 @@ -1099,10 +1099,10 @@ P2 1 1 3 -18 -46 -54 -43 +18 +0 +0 +0 2 1 3 @@ -1111,22 +1111,22 @@ P2 3 0 15 -44 -54 -56 -57 -59 -59 -59 -56 -51 -46 -41 -37 -34 -42 -54 -39 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +15 +27 +0 +0 +5 14 0 0 @@ -1140,15 +1140,15 @@ P2 9 21 28 -37 -48 -54 -55 -59 -53 -49 -51 -42 +15 +0 +0 +0 +0 +0 +0 +0 +0 18 3 7 @@ -1203,16 +1203,16 @@ P2 4 11 31 -41 -47 -56 -59 -58 -57 -57 -56 -54 -36 +0 +0 +0 +0 +0 +0 +0 +0 +0 +19 10 0 0 @@ -1229,18 +1229,18 @@ P2 16 3 18 -48 -54 -43 +0 +0 +0 1 0 0 0 0 15 -45 -55 -39 +0 +0 +5 11 6 3 @@ -1253,31 +1253,31 @@ P2 0 0 15 -43 -55 -41 +0 +0 +0 28 29 29 -33 -36 -41 -46 -53 -54 -54 -55 -56 -57 -58 -54 -44 +31 +19 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 29 1 16 -39 -52 -42 +5 +0 +0 18 3 0 @@ -1337,9 +1337,9 @@ P2 14 20 27 -34 -41 -36 +27 +0 +19 10 6 19 @@ -1358,16 +1358,16 @@ P2 16 3 17 -48 -54 -54 -54 -51 -50 -48 -51 -55 -40 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 7 0 0 @@ -1382,19 +1382,19 @@ P2 18 1 15 -43 -57 -57 -57 -57 -57 -57 -58 -59 -57 -49 -44 -36 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +19 28 19 7 @@ -1404,9 +1404,9 @@ P2 0 1 9 -39 -52 -41 +5 +0 +0 18 0 0 @@ -1487,14 +1487,14 @@ P2 16 3 16 -46 -50 -53 -57 -59 -59 -59 -39 +0 +0 +0 +0 +0 +0 +0 +5 7 0 26 @@ -1533,9 +1533,9 @@ P2 19 3 11 -38 -51 -41 +10 +0 +0 0 0 73 @@ -1662,8 +1662,8 @@ P2 21 3 11 -38 -52 +10 +0 0 0 73 @@ -1791,7 +1791,7 @@ P2 21 1 17 -49 +0 8 0 74 @@ -1919,7 +1919,7 @@ P2 62 8 10 -44 +0 16 0 74 @@ -2047,8 +2047,8 @@ P2 71 21 9 -43 -38 +0 +10 0 74 31 @@ -2175,8 +2175,8 @@ P2 74 22 6 -41 -57 +0 +0 0 74 29 @@ -2303,8 +2303,8 @@ P2 74 24 4 -41 -70 +0 +0 0 75 28 @@ -2431,8 +2431,8 @@ P2 73 26 1 -39 -65 +5 +0 0 75 25 @@ -2559,8 +2559,8 @@ P2 72 27 0 -38 -56 +10 +0 0 75 27 @@ -2687,8 +2687,8 @@ P2 74 26 1 -36 -54 +19 +0 0 73 71 @@ -2815,8 +2815,8 @@ P2 74 14 1 -34 -53 +27 +0 0 54 74 @@ -2944,7 +2944,7 @@ P2 36 1 25 -51 +0 0 8 53 @@ -3072,8 +3072,8 @@ P2 46 2 21 -55 -39 +0 +5 1 8 11 @@ -3200,8 +3200,8 @@ P2 44 1 14 -54 -69 +0 +0 16 1 0 @@ -3327,21 +3327,21 @@ P2 73 3 0 -4 -54 -52 -50 -49 -49 -49 -49 -49 -46 -45 -42 -41 -39 -36 +4 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +10 +24 32 26 19 @@ -3455,28 +3455,28 @@ P2 26 3 0 -43 -54 -51 -51 -54 -55 -55 -55 -55 -56 -56 -56 -56 -56 -55 -56 -57 -57 -58 -56 -45 -36 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +24 26 16 1 @@ -3583,8 +3583,8 @@ P2 9 0 26 -51 -54 +0 +0 30 6 6 @@ -3600,14 +3600,14 @@ P2 22 26 32 -38 -46 -54 -54 -55 -57 -58 -56 +15 +0 +0 +0 +0 +0 +0 +0 15 3 1 @@ -3710,9 +3710,9 @@ P2 0 0 15 -44 -55 -39 +0 +0 +5 13 0 0 @@ -3733,12 +3733,12 @@ P2 8 15 24 -35 -44 -54 -57 -59 -46 +28 +0 +0 +0 +0 +0 32 9 1 @@ -3837,9 +3837,9 @@ P2 21 21 23 -36 -55 -46 +19 +0 +0 20 1 0 @@ -3864,15 +3864,15 @@ P2 29 14 29 -42 -54 -54 -56 -59 -57 -48 -41 -34 +0 +0 +0 +0 +0 +0 +0 +0 +32 31 23 18 @@ -3953,20 +3953,20 @@ P2 18 21 24 -34 -38 -44 -46 -52 -57 -59 -59 -59 -58 -58 -57 -54 -46 +27 +10 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 22 1 4 @@ -3996,24 +3996,24 @@ P2 3 13 26 -47 -54 -54 -55 -56 -56 -57 -57 -58 -58 -59 -59 -57 -52 -44 -47 -44 -36 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +24 31 28 26 @@ -4063,37 +4063,37 @@ P2 31 31 31 -33 -33 -34 -36 -37 -39 -41 -42 -44 -51 -56 -58 -58 -59 -58 -58 -58 -57 -57 -57 -56 -55 -56 -55 -55 -55 -49 -46 -43 -34 -33 +31 +31 +27 +19 +15 +5 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +27 +31 21 1 4 diff --git a/machine/tz/animation/bttzwave/bttzwave_0001_015.pgm b/machine/tz/animation/bttzwave/bttzwave_0001_015.pgm index 06c086c72..9677e18d1 100644 --- a/machine/tz/animation/bttzwave/bttzwave_0001_015.pgm +++ b/machine/tz/animation/bttzwave/bttzwave_0001_015.pgm @@ -2,22 +2,22 @@ P2 # CREATOR: GIMP PNM Filter Version 1.1 128 32 255 -34 -35 -36 -36 -36 -36 -34 -31 -31 -31 -31 -31 -31 -30 -29 -25 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +4 +8 +20 16 3 1 @@ -25,29 +25,28 @@ P2 0 0 23 -33 -35 -38 -37 -34 -33 -33 -34 -36 -40 -39 -37 -35 -31 -26 -6 0 0 0 -1 -22 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +17 +0 +0 +0 +0 +0 +21 27 -12 0 0 0 @@ -102,76 +101,26 @@ P2 0 0 0 -12 +0 +0 29 25 -16 +2 +5 17 -21 -19 -16 -14 10 -8 -6 -4 -3 -1 -1 +2 +0 +0 +0 0 0 0 0 0 -1 -1 -5 -11 -12 -6 0 -17 -21 -26 -31 -35 -41 -40 -40 -40 -40 -40 -39 -39 -39 -37 -35 -31 -18 -3 0 0 -24 -34 -37 -4 -2 -1 -1 -1 -1 -1 -1 -2 -4 -6 -7 -34 -34 -24 -12 -8 -3 0 0 0 @@ -181,15 +130,9 @@ P2 0 0 0 -3 -11 -16 -15 -16 -27 -28 -18 5 +17 +17 0 0 0 @@ -204,8 +147,11 @@ P2 0 0 0 +18 +3 0 0 +22 0 0 0 @@ -222,20 +168,28 @@ P2 0 0 0 -5 -10 22 -30 -17 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 2 -3 -6 +0 +2 +27 +28 7 0 -3 -19 -17 -11 0 0 0 @@ -247,149 +201,38 @@ P2 0 0 0 -1 -1 -1 -1 0 0 0 -3 -11 -6 0 -1 0 0 0 0 0 -1 -1 -4 -4 -4 -4 -4 -4 -7 -17 -34 -34 -19 -3 -24 -34 -38 -5 0 0 -1 -2 -4 -4 -2 0 0 0 0 -1 -7 -29 -36 -35 -35 -34 -28 -23 -18 -15 -14 -11 -11 -11 -7 -1 -3 -13 -7 -1 0 0 0 0 0 +0 +0 +0 +21 4 -14 -29 -31 -31 -35 -43 -45 -45 -45 -45 -45 -45 -43 -42 -40 -19 -14 -6 -19 -9 +5 0 -3 -9 -11 -14 -17 -18 -18 -18 -18 -19 -19 -22 -26 -29 -32 -33 -31 -23 -8 0 -1 0 0 0 -4 -8 -11 -16 -20 -23 -26 -29 -31 -33 -34 -34 -33 -31 -29 -20 -8 -1 -4 -6 0 -16 -26 -20 -15 10 5 0 @@ -401,286 +244,535 @@ P2 0 0 0 -1 -17 -35 -34 -31 -35 -39 -10 -1 0 -46 -49 -51 -52 -52 -52 -51 -49 -44 -41 -4 -1 -11 -28 -32 -39 -39 -39 -38 -37 -36 -36 -35 -34 -32 -25 -11 -1 0 0 0 -10 -17 -19 -17 -14 -19 -32 -33 -31 -36 -39 -39 -39 -39 -39 -39 -39 -38 -37 -35 -31 -25 -1 -1 -1 0 -5 -21 -31 -34 -36 -37 -37 -38 -38 -38 -38 -39 -39 -39 -39 -39 -34 -30 -34 -24 -7 0 -3 -10 -30 -34 -35 -36 -36 -37 -38 -39 -39 -39 -40 -39 -39 -39 -37 -35 -32 -25 -10 -1 -11 0 -44 -53 -55 -56 -56 -55 -55 -54 -52 -48 -48 -48 -47 -42 -27 -4 -1 -17 -36 -39 -39 -10 -1 0 -39 -54 -57 -58 -59 -59 -59 -59 -57 -57 -51 -36 -11 -1 0 0 -4 -10 -16 -20 -24 -26 -26 -25 -24 -26 -32 -28 -11 -4 0 -15 -26 -31 -34 -36 -36 -36 -32 -21 -1 -1 -1 -3 -4 -6 -6 -6 -6 -6 -6 -8 -34 -34 -28 -1 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 0 5 -21 -31 -26 -21 -19 -19 -19 -19 -20 -19 -18 -15 -12 -8 -4 0 0 -6 -28 -35 -28 -29 -35 -36 -37 -39 -34 -30 -25 +19 +3 +22 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +8 +0 +0 +0 +0 +11 +23 +7 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +8 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +10 +0 +0 +10 +0 +0 +0 +0 +0 +0 +5 +7 +7 +7 +7 +10 +10 21 17 -15 -12 +8 +0 +0 +0 +23 +0 +0 +0 +0 +0 +0 +0 +0 +0 +2 +13 +23 +17 +8 +0 +0 +0 +0 +0 +0 +8 +13 +0 +0 +0 +0 +0 +2 +26 +13 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +5 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +11 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +20 +0 +0 +0 +0 +0 +0 +5 +10 +5 +0 +10 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +20 +0 +0 +0 +0 +0 +17 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +4 +0 +22 +0 +0 +0 +0 +4 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +20 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +27 +0 +0 +5 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +24 +0 +0 +0 +0 +0 +0 +2 +13 +22 +17 +17 +20 +22 +17 +0 +11 +0 +0 +0 +0 +17 +0 +0 +0 +0 +0 +0 +17 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +11 +0 +0 +0 +17 +0 +17 +17 +10 +10 +10 +10 +13 10 7 -6 -6 -6 -6 -12 -26 -32 -26 +0 +0 +0 +0 +0 +0 +0 11 +0 11 +8 +0 +0 +0 +0 0 -57 -39 -29 -35 -42 -48 -54 -59 -59 -59 -59 -59 -58 -56 -52 -31 -4 -1 4 +20 +17 5 -5 -1 0 -39 -54 -58 -15 -9 -9 -9 -9 -9 +0 +0 +0 +0 +0 +0 +0 +0 +17 +0 +17 +0 +0 +0 +0 +0 +29 +28 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +31 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 29 29 -44 -53 -39 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +22 +0 +0 +0 +0 +0 +0 +14 +10 +7 +10 +22 +2 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +17 +0 +21 +0 +22 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 8 -1 +0 +0 +0 +0 +21 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +22 +0 +17 +21 +0 +30 +0 +0 0 0 0 @@ -691,42 +783,15 @@ P2 0 0 0 -6 -24 -35 -36 -35 -35 -33 -35 27 -19 -18 -19 -24 -16 -1 -3 -9 -5 -1 0 0 +31 0 0 0 0 0 -1 -6 -38 -34 -26 -8 -22 -33 -24 -7 0 0 0 @@ -740,291 +805,226 @@ P2 0 0 2 -6 -1 +0 +0 +0 +30 +24 +32 +30 +24 +17 +10 10 -29 -38 -39 -36 -31 -22 -1 -1 -1 -1 0 0 0 0 0 +17 +0 +0 +0 +0 +20 +0 +0 0 0 0 0 0 -1 -8 -24 -33 26 -22 0 -30 -9 -1 0 0 0 0 0 -1 -2 -6 -7 -11 -27 -53 -54 -31 -4 0 0 0 0 -14 -41 -56 -43 -14 -1 -1 -1 -1 -1 -1 -3 -16 -49 -54 -47 -30 -36 -34 -30 -24 -21 -19 -19 -14 -13 -10 -2 -6 -26 -33 -36 -41 -39 -25 -11 -2 0 0 0 0 -6 -26 -50 -51 -52 -52 -51 -50 -49 -46 -44 -40 -2 -1 -4 -36 -36 -36 -36 -25 -8 -5 -18 +0 +0 +0 +20 +0 +0 +7 26 26 29 29 31 -34 -38 -41 -46 -49 -54 -53 -42 -11 -1 -10 -12 -4 +32 0 -1 -1 0 -4 -9 -14 -19 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +10 24 29 30 32 -34 -35 -36 -35 -29 -14 -3 -8 +32 +28 24 -34 -36 +28 +29 +0 +0 +0 +22 +0 +0 +0 0 -4 0 26 38 33 -22 -14 -9 -1 +21 +0 +0 +0 +0 +0 +0 +0 +0 +26 +0 +0 +28 +24 +17 +17 +13 +32 +0 +0 +24 +0 +0 +26 +27 +25 +21 +13 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 0 0 0 0 -2 -26 -49 -50 -35 -24 -21 -21 -20 -32 -54 -49 -24 -1 -10 -26 -27 -25 -22 -20 -11 -3 -9 -58 -54 -49 -51 -55 -56 -56 -55 -55 -55 -54 -52 -45 -15 -1 0 0 0 -1 -5 -4 -1 -11 24 26 27 27 -34 -54 -51 -45 -49 -53 -56 -59 -59 -58 -57 -52 -46 -1 -1 -8 -31 -29 -21 +32 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 8 -5 +17 +0 +0 24 -44 -54 -56 -57 -57 -57 -58 -58 -59 -59 -59 -53 -49 -54 -40 -14 0 0 0 -5 -15 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 23 -50 -53 -54 -54 -54 -55 -56 -57 -57 -57 -57 -57 -55 -51 -39 -18 -3 -8 -24 -46 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +7 +0 +0 +22 +0 0 0 40 @@ -1039,20 +1039,20 @@ P2 70 59 39 -6 -6 +0 +0 26 -49 -56 -56 -55 -55 -54 -54 -53 -34 -1 -4 +0 +0 +0 +0 +0 +0 +0 +0 +32 +0 +0 31 71 72 @@ -1060,99 +1060,99 @@ P2 71 70 63 -4 -3 -15 -47 -57 -49 -42 -46 -48 -51 -52 -54 -53 -53 -54 -49 -14 -4 -2 -1 0 0 0 -16 -34 -50 -55 -57 -57 -57 -49 -25 -1 -2 -2 -2 -2 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 2 -3 -6 -59 -54 -44 -6 -1 +32 +0 +0 +0 +0 +0 +0 +25 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 0 0 0 -3 24 -46 -49 -36 +0 +0 +24 27 24 -22 -18 -12 -8 -2 +21 +7 +0 +0 +0 +0 +0 +0 +0 0 0 0 -11 -46 -55 -41 32 -41 -50 -54 -54 -56 -58 -59 -54 -48 -44 -39 -36 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +24 31 29 28 28 26 29 -42 -51 -42 -18 -3 +0 +0 +0 7 -46 +0 +0 +0 0 60 73 @@ -1168,19 +1168,19 @@ P2 78 73 41 -11 -6 +0 +0 25 -50 -54 -56 -57 -57 -57 -55 -2 0 -5 +0 +0 +0 +0 +0 +0 +0 +0 +0 70 77 77 @@ -1189,98 +1189,98 @@ P2 78 73 56 -14 -3 -19 -42 -46 -18 0 0 +10 0 0 -1 -1 -3 -43 -56 -52 -51 -50 -49 -48 -45 -41 -44 -53 -47 -34 +7 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +32 29 29 29 -15 -1 -9 +0 +0 +0 23 -19 -15 -12 -7 -4 -3 -9 -54 -54 -40 -16 -19 -19 -21 +10 +0 +0 +0 +0 +0 +0 +0 +0 +0 +2 +10 +10 +17 32 -46 -50 +0 +0 31 -7 0 0 0 0 0 0 -3 -9 -11 -11 -1 -14 -44 -57 -57 -58 -58 -51 -42 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 33 -9 -3 -1 -1 -1 -1 -1 -1 -1 0 0 0 -4 -15 -37 -52 -43 -17 -2 -24 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +13 +0 +0 +5 +0 +22 0 67 78 @@ -1297,16 +1297,16 @@ P2 67 69 41 -8 0 -2 -5 -8 -8 -9 -12 -12 -2 +0 +0 +0 +0 +0 +0 +0 +0 +0 0 46 72 @@ -1318,11 +1318,22 @@ P2 62 74 51 -15 -3 -7 -21 -1 +0 +0 +0 +17 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 0 0 0 @@ -1330,24 +1341,13 @@ P2 0 0 0 -7 -40 -56 -58 -58 -58 -58 -58 -57 -57 -47 25 -6 0 0 0 0 -18 +0 +7 46 72 73 @@ -1355,20 +1355,20 @@ P2 72 70 58 -6 -3 -13 -49 -54 -55 -55 -56 -57 -57 -51 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 31 -8 -8 +0 +0 31 49 57 @@ -1379,36 +1379,36 @@ P2 74 74 55 -17 -1 -14 +5 +0 +0 28 -20 -11 -2 -1 -1 -1 +13 0 0 0 -3 -6 -12 -21 +0 +0 +0 +0 +0 +0 +0 +0 +17 27 29 32 31 29 -16 -4 -11 -39 -53 -45 -15 -12 +2 +0 +0 +0 +0 +0 +0 +0 0 69 69 @@ -1426,14 +1426,14 @@ P2 67 72 43 -6 0 0 0 0 -1 -1 -1 +0 +0 +0 +0 0 0 44 @@ -1448,8 +1448,8 @@ P2 73 62 0 -3 -3 +0 +0 0 31 52 @@ -1458,19 +1458,19 @@ P2 54 51 23 -4 -9 +0 +0 +5 +10 +10 +10 +13 17 -19 -19 -19 -20 -21 25 -34 +32 25 -6 -11 +0 +0 29 36 36 @@ -1484,18 +1484,18 @@ P2 66 73 58 -9 -3 -15 -41 -38 -35 +0 +0 +0 +0 +0 +28 30 30 30 23 -8 -8 +0 +0 36 68 77 @@ -1508,13 +1508,13 @@ P2 60 74 56 -18 -1 +7 0 0 0 -4 -16 +0 +0 +2 27 37 63 @@ -1531,12 +1531,12 @@ P2 70 53 24 -4 -10 -41 -54 -48 -11 +0 +0 +0 +0 +0 +0 0 69 64 @@ -1575,8 +1575,8 @@ P2 10 75 71 -8 -1 +0 +0 0 25 56 @@ -1587,17 +1587,17 @@ P2 75 59 26 -4 0 0 0 0 0 0 -1 -7 -5 -11 +0 +0 +0 +0 +0 41 68 76 @@ -1614,15 +1614,15 @@ P2 72 51 0 -1 -1 -1 -1 0 0 0 0 -7 +0 +0 +0 +0 +0 34 65 64 @@ -1659,12 +1659,12 @@ P2 65 72 62 -21 -2 -6 -45 -54 -41 +17 +0 +0 +0 +0 +0 26 70 61 @@ -1723,8 +1723,8 @@ P2 39 36 26 -10 -11 +0 +0 41 69 66 @@ -1741,9 +1741,9 @@ P2 28 77 58 -16 -12 -17 +2 +0 +5 24 26 29 @@ -1788,12 +1788,12 @@ P2 56 74 66 -17 +5 +0 +0 +0 +0 0 -12 -38 -52 -65 71 58 6 @@ -1918,10 +1918,10 @@ P2 75 57 23 -1 -14 -50 -59 +0 +0 +0 +0 72 56 6 @@ -2046,10 +2046,10 @@ P2 52 73 55 -7 -3 -36 -53 +0 +0 +24 +0 72 53 6 @@ -2175,9 +2175,9 @@ P2 68 69 25 -1 +0 31 -50 +0 72 51 6 @@ -2303,9 +2303,9 @@ P2 50 72 34 -6 +0 24 -48 +0 73 48 6 @@ -2431,9 +2431,9 @@ P2 43 69 40 +0 10 -19 -45 +0 73 48 6 @@ -2559,9 +2559,9 @@ P2 35 64 47 -13 -15 -44 +0 +0 +0 72 49 7 @@ -2687,9 +2687,9 @@ P2 28 62 51 -14 -13 -41 +0 +0 +0 70 62 25 @@ -2815,9 +2815,9 @@ P2 27 65 57 -16 -9 -40 +2 +0 +0 49 74 66 @@ -2943,10 +2943,10 @@ P2 29 74 54 -14 -7 -39 -15 +0 +0 +0 +0 49 73 78 @@ -3071,11 +3071,11 @@ P2 26 74 49 -3 -6 -41 -2 -14 +0 +0 +0 +0 +0 47 66 74 @@ -3199,14 +3199,14 @@ P2 44 74 48 -3 -7 -55 -20 -2 0 -1 +0 +0 13 +0 +0 +0 +0 24 36 53 @@ -3327,12 +3327,12 @@ P2 76 65 31 -2 -9 -54 -46 -22 -9 +0 +0 +0 +0 +21 +0 0 0 0 @@ -3454,23 +3454,23 @@ P2 76 65 31 -1 -4 -19 -54 -51 -57 -58 -54 -44 -36 -22 -12 -1 0 0 -6 -20 +10 +0 +0 +0 +0 +0 +0 +34 +21 +0 +0 +0 +0 +0 +13 31 44 69 @@ -3516,9 +3516,9 @@ P2 76 76 62 -19 -2 -20 +10 +0 +13 52 72 77 @@ -3581,29 +3581,29 @@ P2 48 46 31 -1 -7 +0 +0 26 -56 -52 +0 +0 31 -42 -54 -55 -56 -57 -58 -59 -57 -17 -3 +6 0 0 0 0 0 -10 -18 +0 +0 +5 +0 +0 +0 +0 +0 +0 +0 +7 25 30 34 @@ -3644,10 +3644,10 @@ P2 72 59 23 -1 +0 +0 +0 7 -5 -18 41 46 51 @@ -3691,9 +3691,10 @@ P2 46 29 23 -18 -11 -3 +7 +0 +0 +0 0 0 0 @@ -3709,10 +3710,9 @@ P2 0 0 0 -7 33 -56 -51 +0 +0 33 28 19 @@ -3720,31 +3720,31 @@ P2 12 20 30 -41 -48 -57 -58 -59 -49 -37 +11 +0 +0 +0 +0 +0 +30 27 -12 -3 -1 -1 -1 -1 -1 -1 -1 -1 0 0 0 0 -2 -9 -21 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +17 26 29 34 @@ -3755,9 +3755,9 @@ P2 49 52 44 -12 -1 -17 +0 +0 +5 46 52 51 @@ -3768,23 +3768,23 @@ P2 32 28 23 -18 7 -1 -1 -11 +0 +0 +0 +0 34 -16 2 0 0 0 0 0 -1 -4 -16 -21 +0 +0 +0 +2 +17 24 27 33 @@ -3800,8 +3800,8 @@ P2 44 42 40 -21 -9 +17 +0 26 35 34 @@ -3809,39 +3809,39 @@ P2 29 26 24 -20 -16 -4 -1 +13 +2 0 0 0 0 0 -1 -1 -1 -1 0 -5 -11 -15 -21 -21 -21 +0 +0 +0 +0 +0 +0 +0 +0 +0 +17 +17 +17 24 24 24 24 24 24 -21 -20 +17 +13 33 -55 -48 +0 +0 23 -1 +0 0 0 0 @@ -3851,31 +3851,40 @@ P2 23 2 34 -48 -55 -56 -57 -57 -57 -59 -58 -51 -46 -40 -36 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +16 +34 34 31 24 -21 -16 -11 -7 -3 -1 -1 -1 -1 -1 +17 +2 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 0 0 0 @@ -3883,9 +3892,6 @@ P2 0 0 0 -2 -8 -1 0 0 0 @@ -3893,26 +3899,14 @@ P2 0 0 0 -1 -1 -1 -1 -1 0 -11 39 54 43 23 -17 -14 -11 -6 -1 +5 0 0 -1 -1 0 0 0 @@ -3941,35 +3935,41 @@ P2 0 0 0 -1 -3 -9 -13 -18 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +7 24 -36 -41 -49 -57 -58 -58 -58 -57 -57 -57 -57 -57 -57 -57 -57 -57 -57 -56 -54 -46 -22 -1 -4 +24 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +21 +0 +0 0 0 0 @@ -3984,40 +3984,40 @@ P2 16 24 32 -41 -46 -51 -53 -54 -54 -54 -55 -56 -56 -57 -57 -58 -58 -59 -59 -53 -44 -39 -36 +11 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +21 +34 32 29 26 24 -21 -19 17 +10 +5 24 38 -21 -16 17 -20 -21 +2 +5 +13 +17 24 26 28 @@ -4047,16 +4047,16 @@ P2 28 26 25 -22 -21 -19 -19 -18 -18 -19 -19 -21 21 +17 +10 +10 +7 +7 +10 +10 +17 +17 23 24 26 @@ -4065,36 +4065,36 @@ P2 29 30 31 -34 -37 -40 -46 -56 -59 -59 -58 -57 -57 -55 -54 -55 -54 -51 -45 -40 +32 +13 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 32 29 25 -22 -20 -20 -20 -20 21 +13 +13 +13 +13 +17 24 26 27 -16 -1 -6 -21 +2 +0 +0 +17 diff --git a/machine/tz/autofire.c b/machine/tz/autofire.c index 89d9730fe..70a0fdf29 100644 --- a/machine/tz/autofire.c +++ b/machine/tz/autofire.c @@ -29,42 +29,56 @@ U8 shooter_div_delay_time; /** Delay time in seconds before closing the shooter divertor */ U8 shooter_div_open_time; -/* Flag to say whether the autofire is busy firing a ball */ -bool autofire_busy; extern bool hold_balls_in_autofire; -void sw_autofire (void) +CALLSET_ENTRY (autofire, sw_autofire1, sw_autofire2) { - /* TODO : balls landing here when not expected - still need to be ejected. See amode_start below. This - would also need to happen if the autofire monitor - failed to kick properly; some retry logic is needed. */ sol_stop (SOL_RAMP_DIVERTOR); - shooter_div_stop (); + /* Don't close the divertor if we are trying to launch the ball */ + if (!task_find_gid (GID_AUTOFIRE_HANDLER)) + shooter_div_stop (); score (SC_100); } -CALLSET_ENTRY (autofire, sw_autofire1) +/* Function to wait 6 seconds or until the autofire is detected as loaded */ +static void autofire_ball_catch_wait (void) { - sw_autofire (); + U8 timeout = 60; /* 6 seconds */ + while (!switch_poll_logical (SW_AUTOFIRE2) + && --timeout != 0) + { + task_sleep (TIME_100MS); + } } - -CALLSET_ENTRY (autofire, sw_autofire2) +static void autofire_ball_launch_wait (void) { - sw_autofire (); + /* Give the ball time to settle and things to start */ + task_sleep (TIME_300MS); + while (kickout_locks || task_find_gid (GID_LOCK_KICKED) + || deff_get_active () == DEFF_MB_START + || !switch_poll_logical (SW_AUTOFIRE2)) + { + task_sleep (TIME_100MS); + } } -/* Function to wait 6 seconds or until the autofire is detected as loaded */ -static inline void autofire_ball_catch_wait (void) +static void autofire_launch (void) { - U8 timeout = 60; /* 6 seconds */ - while (!switch_poll_logical (SW_AUTOFIRE2) - && --timeout != 0) + sol_request (SOL_AUTOFIRE); + if (in_live_game && single_ball_play ()) { - task_sleep (TIME_100MS); + sound_send (SND_EXPLOSION_1); + leff_start (LEFF_STROBE_UP); } + /* Say that the ball is heading into the right loop + * This stops the right magnet from trying to grab the ball */ + timer_restart_free (GID_BALL_LAUNCH, TIME_2S); + event_can_follow (autolaunch, right_loop, TIME_4S); + /* Clear the magnet so we can fire a ball */ + magnet_disable_catch (MAG_RIGHT); } + /** A task that manages the autolaunching of balls. Upon entry, the autofire divertor solenoid is already pulsing and a ball is being kicked from the trough. */ @@ -76,60 +90,48 @@ void autofire_monitor (void) if (shooter_div_delay_time) task_sleep_sec (shooter_div_delay_time); - autofire_busy = TRUE; //if (autofire_full () // don't open to catch + + if (!switch_poll_logical (SW_AUTOFIRE2)) shooter_div_start (); - /* TODO - If the autofire switch trips during the 'open - time', we can abort this delay early and go ahead and - close the divertor. This is safe because only one - ball can appear here at a time. */ - //task_sleep_sec (shooter_div_open_time); + + /* Wait for the ball to enter the autofire */ autofire_ball_catch_wait (); shooter_div_stop (); - /* Wait a little longer for the ball to settle - * and the divertor to close */ - task_sleep (TIME_500MS); /* If Right inlane -> Left ramp combo, start tnf mode */ - if (event_did_follow (left_ramp_exit, tnf) && single_ball_play ()) + if (task_kill_gid (GID_TNF_APPROACHING) && single_ball_play ()) { callset_invoke (tnf_start); } /* Wait until allowed to kickout */ - while (kickout_locks > 0) - task_sleep (TIME_100MS); - + + autofire_ball_launch_wait (); /* Open diverter again */ shooter_div_start (); - /* Wait for the diverter to fully open before firing */ - task_sleep_sec (1); - if (in_live_game && single_ball_play ()) + /* Wait for the diverter to fully open before firing */ + task_sleep_sec (1); + task_sleep (TIME_200MS); + /* Launch the ball */ + if (feature_config.fire_empty == NO) { - sound_send (SND_EXPLOSION_1); - leff_start (LEFF_STROBE_UP); + if (switch_poll_logical (SW_AUTOFIRE2)) + autofire_launch (); } - /* Say that the ball is heading into the right loop */ - timer_restart_free (GID_BALL_LAUNCH, TIME_3S); - event_can_follow (autolaunch, right_loop, TIME_4S); - /* Clear the magnet so we can fire a ball */ - magnet_disable_catch (MAG_RIGHT); - /* Launch the ball */ - sol_request (SOL_AUTOFIRE); - /* Wait for the ball to clear the divertor - * before closing*/ + else + autofire_launch (); + + /* Wait for the ball to clear before closing the divertor */ task_sleep (TIME_700MS); shooter_div_stop (); - autofire_busy = FALSE; task_exit (); } -/** Called just before the trough kicks a ball when it ought to -go to the autofire lane rather than the manual plunger. */ -void autofire_open_for_trough (void) +static void autofire_sleep_while_busy (void) { /* Do not proceed if another ball is in the process of being autofired. */ @@ -140,11 +142,17 @@ void autofire_open_for_trough (void) not in the interface */ task_sleep_sec (1); } +} + +/** Called just before the trough kicks a ball when it ought to +go to the autofire lane rather than the manual plunger. */ +void autofire_open_for_trough (void) +{ + autofire_sleep_while_busy (); dbprintf ("Shooter divertor open to catch\n"); shooter_div_delay_time = 0; shooter_div_open_time = 2; task_create_gid_while (GID_AUTOFIRE_HANDLER, autofire_monitor, TASK_DURATION_INF); - task_sleep (TIME_500MS); } @@ -221,7 +229,13 @@ CALLSET_ENTRY (autofire, clear_autofire) * during attract mode */ shooter_div_start (); task_sleep_sec (2); - sol_request (SOL_AUTOFIRE); + if (feature_config.fire_empty == NO) + { + if (switch_poll_logical (SW_AUTOFIRE2)) + sol_request (SOL_AUTOFIRE); + } + else + sol_request (SOL_AUTOFIRE); task_sleep_sec (1); shooter_div_stop (); } @@ -231,25 +245,19 @@ CALLSET_ENTRY (autofire, ball_search) /* The shooter divertor/autofire are both kicked here since there is a dependency between the two. The main ball search routine is told not to kick either one of them. */ - if (switch_poll_logical (SW_AUTOFIRE2) || switch_poll_logical (SW_AUTOFIRE1)) - { - callset_invoke (clear_autofire); - } - else if (feature_config.fire_when_detected_empty == YES) - { - callset_invoke (clear_autofire); - } + callset_invoke (clear_autofire); } CALLSET_ENTRY (autofire, start_ball) { + /* TODO Bug in trough mech, multidrain can cause all other balls to be autofired + * live_balls > 0 even at the start of a ball*/ + live_balls = 0; autofire_request_count = 0; - autofire_busy = FALSE; } CALLSET_ENTRY (autofire, init) { autofire_request_count = 0; - autofire_busy = FALSE; } diff --git a/machine/tz/bonus.c b/machine/tz/bonus.c index 263af8743..d836e1910 100644 --- a/machine/tz/bonus.c +++ b/machine/tz/bonus.c @@ -17,15 +17,12 @@ * along with FreeWPC; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -/* CALLSET_SECTION (bonus, __machine2__) */ #include #include #include /* Total bonus score */ score_t total_bonus; -/* Temp variable used to calculate bonus per door/loop etc */ -score_t bonus_scored; /* 1 Ball Hi score values */ score_t start_ball_score; score_t points_this_ball; @@ -44,7 +41,7 @@ extern U8 spawny_get_hi; U8 current_one_ball_hi_player; /* On which ball was the current 1 ball hi score */ U8 current_one_ball_hi_ball_number; -U8 current_player_rankings[4]; +//U8 current_player_rankings[4]; U8 countup_pause_iterations; bool buttons_held; @@ -58,15 +55,15 @@ extern U8 score_ranks[MAX_PLAYERS]; extern U8 door_panels_started; extern U8 loops; extern U8 jets_bonus_level; -extern U8 jets_scored; +extern U16 jets_scored; extern U8 left_ramps; extern U8 gumball_collected_count; extern U8 spiralawards_collected; extern U8 dead_end_count; extern U8 hitch_count; extern U8 rollover_count; -extern bool backdoor_award_collected; -extern bool multidrain_awarded; +extern __local__ bool backdoor_award_collected; +extern U8 multidrain_count; extern bool stdm_death; extern bool unfair_death; @@ -74,14 +71,13 @@ extern U8 two_way_combos; extern U8 three_way_combos; extern U8 lucky_bounces; - /* Function to find who holds what score position * eg * find_player_ranked (N) returns the player ranked first * returns player number - 1 for score purposes */ -static U8 find_player_ranked (U8 ranking) +U8 find_player_ranked (U8 ranking) { /* If out of range, return last place */ if (ranking > MAX_PLAYERS) @@ -94,31 +90,35 @@ static U8 find_player_ranked (U8 ranking) /* Speed up the bonus if both flipper buttons are pressed */ -static void bonus_button_monitor (void) +void bonus_button_monitor (void) { buttons_held = FALSE; - for (;;) + while (in_bonus) { if ((switch_poll_logical (SW_LEFT_BUTTON) && switch_poll_logical (SW_RIGHT_BUTTON)) && buttons_held == FALSE) { buttons_held = TRUE; - sound_send (SND_FIST_BOOM1); + } + else + { + buttons_held = FALSE; } task_sleep (TIME_100MS); } + task_exit (); } static void bonus_pause (void) { if (buttons_held) - task_sleep (TIME_100MS); + task_sleep_sec (3); else - task_sleep_sec (1); + task_sleep (TIME_100MS); } - -void countup_pause (void) +#if 0 +static void countup_pause (void) { if (buttons_held) { @@ -134,31 +134,17 @@ void countup_pause (void) else task_sleep (TIME_33MS); } - +#endif /* Function so we can call two different transistions * depending on whether the buttons were pressed */ -static void bonus_sched_transition (void) +static inline void bonus_sched_transition (void) { - if (buttons_held == TRUE) + if (!buttons_held) dmd_sched_transition (&trans_scroll_down_fast); else dmd_sched_transition (&trans_scroll_down); } -/* Function to calculate bonus score */ -static void bonus_add_up_score (U8 award_count, score_id_t award_amount) -{ - /* Zero the temporary score */ - score_zero (bonus_scored); - /* Add the award amount to the temp score */ - score_add (bonus_scored, score_table[award_amount]); - /* Multiply it by award_count */ - score_mul (bonus_scored, award_count); - /* Add the temp score to the total bonus */ - score_add (total_bonus, bonus_scored); - sprintf_score (bonus_scored); -} - static void bonus_talking_task (void) { sound_send (SND_NOT_AN_ORDINARY_GAME); @@ -187,7 +173,7 @@ static void bonus_talking_task (void) } /* Used to announce if the player has played well */ -static bool check_for_big_score (void) +inline bool check_for_big_score (void) { if (score_compare (points_this_ball, score_table[SC_100M]) == 1) return TRUE; @@ -195,7 +181,7 @@ static bool check_for_big_score (void) return FALSE; } -static bool check_for_puny_score (void) +inline bool check_for_puny_score (void) { if (score_compare (score_table[SC_10M], points_this_ball) == 1) return TRUE; @@ -204,7 +190,7 @@ static bool check_for_puny_score (void) } -static void points_this_ball_sound_task (void) +void points_this_ball_sound_task (void) { sound_send (SND_NOT_AN_ORDINARY_GAME); task_sleep_sec (2); @@ -214,7 +200,7 @@ static void points_this_ball_sound_task (void) } /* See if it's the players last ball */ -static bool check_if_last_ball_for_multiplayer (void) +inline bool check_if_last_ball_for_multiplayer (void) { if (ball_up == system_config.balls_per_game && num_players > 1 && extra_balls == 0) return TRUE; @@ -222,67 +208,60 @@ static bool check_if_last_ball_for_multiplayer (void) return FALSE; } -static bool check_if_last_ball_of_multiplayer_game (void) +inline bool check_if_last_ball_of_multiplayer_game (void) { - if (ball_up == system_config.balls_per_game && player_up == num_players && - num_players > 1 && extra_balls == 0) + if (ball_up == system_config.balls_per_game && player_up == num_players && num_players > 1 && extra_balls == 0) return TRUE; else return FALSE; } -void bonus_deff (void) +static void draw_taunts (void) { /* * Taunts..... * */ - - /* Wait a bit so the previous music_stop doesn't kill the taunt sounds */ - task_sleep (TIME_100MS); - if (multidrain_awarded == TRUE) + +// task_sleep (TIME_500MS); +// + if (multidrain_count >= 3) { dmd_alloc_low_clean (); sprintf ("MULTIDRAIN"); - font_render_string_center (&font_fixed10, 64, 16, sprintf_buffer); + font_render_string_center (&font_bitoutline, 64, 16, sprintf_buffer); dmd_sched_transition (&trans_bitfade_slow); dmd_show_low (); - multidrain_awarded = FALSE; sound_send (SND_HEY_ITS_ONLY_PINBALL); task_sleep_sec (2); } - - if (stdm_death == TRUE) + else if (unfair_death) { - sound_send (SND_HEY_ITS_ONLY_PINBALL); dmd_alloc_low_clean (); - sprintf ("SDTM DEATH"); - font_render_string_center (&font_fixed10, 64, 16, sprintf_buffer); + font_render_string_center (&font_bitoutline, 64, 11, "BAD SHOW"); + font_render_string_center (&font_nayupixel10, 64, 22, "UNFAIR DEATH"); dmd_sched_transition (&trans_bitfade_slow); dmd_show_low (); + sound_send (SND_HAHA_POWERFIELD_EXIT); task_sleep_sec (2); } - - if (unfair_death == TRUE) + + + else if (stdm_death) { - sound_send (SND_HAHA_POWERFIELD_EXIT); dmd_alloc_low_clean (); - font_render_string_center (&font_fixed10, 64, 11, "BAD SHOW"); - font_render_string_center (&font_var5, 64, 26, "UNFAIR DEATH"); + sprintf ("SDTM DEATH"); + font_render_string_center (&font_bitoutline, 64, 16, sprintf_buffer); dmd_sched_transition (&trans_bitfade_slow); dmd_show_low (); + sound_send (SND_HEY_ITS_ONLY_PINBALL); task_sleep_sec (2); - /* Don't bother taunting the player about a quick death - * Hardly seems fair! */ - quickdeath_timer_running = FALSE; } - - if (quickdeath_timer_running == TRUE) + + else if (quickdeath_timer_running && !unfair_death) { - /* TODO This should only taunt if the game time was <10 seconds - * atm it does so when any ball is served, rather than the first */ dmd_alloc_low_clean (); sprintf ("YOU LASTED LONG"); - font_render_string_center (&font_fixed6, 64, 16, sprintf_buffer); + font_render_string_center (&font_quadrit, 64, 16, sprintf_buffer); dmd_sched_transition (&trans_bitfade_slow); dmd_show_low (); sound_send (SND_HAHA_POWERFIELD_EXIT); @@ -299,16 +278,129 @@ void bonus_deff (void) dmd_sched_transition (&trans_bitfade_slow); dmd_show_low (); sound_send (SND_NEVER_UNDERESTIMATE_POWER); - task_sleep_sec (4); + task_sleep_sec (3); } +} + +/* Function to calculate bonus score */ +static void bonus_add_up_score (U8 award_value, U8 amount) +{ + score_t bonus_score; + /* Zero the temporary score */ + score_zero (bonus_score); + /* Add the award amount to the temp score */ + score_add (bonus_score, score_table[award_value]); + /* Multiply it by award_count */ + score_mul (bonus_score, amount); + /* Store in sprintf_buffer */ + score_add (total_bonus, bonus_score); + sprintf_score (bonus_score); +} + +static void bonus_add_up_jets (void) +{ + score_t bonus_score; + score_zero (bonus_score); + score_add (bonus_score, score_table[SC_100K]); + score_mul (bonus_score, jets_scored); + score_add (total_bonus, bonus_score); + + score_zero (bonus_score); + score_add (bonus_score, score_table[SC_1M]); + score_mul (bonus_score, jets_bonus_level); + score_add (total_bonus, bonus_score); + sprintf_score (bonus_score); +} + +static void calc_and_draw_bonus (U8 award_value, U8 amount) +{ + dmd_alloc_low_clean (); + bonus_add_up_score (award_value, amount); + font_render_string_center (&font_quadrit, 64, 16, sprintf_buffer); + sprintf ("%d X %10b", amount, score_table[award_value]); + font_render_string_center (&font_var5, 64, 26, sprintf_buffer); +} + +void trans_and_show (void) +{ + bonus_sched_transition (); + dmd_show_low (); + sound_send (SND_GREED_MODE_BOOM); + bonus_pause (); +} + +void one_ball_score_task (void) +{ + /* + * + * Total points this ball + * + */ + + /* Calculate */ + score_zero (points_this_ball); + score_copy (points_this_ball, current_score); + score_sub (points_this_ball, start_ball_score); + + /* Don't show if on first ball, you can just look at the scoreboard */ + if (ball_up != 1 && feature_config.adv_bonus_info == YES) + { + dmd_alloc_low_clean (); + font_render_string_center (&font_fixed6, 64, 6, "POINTS THIS BALL"); + sprintf_score (points_this_ball); + font_render_string_center (&font_quadrit, 64, 24, sprintf_buffer); + dmd_show_low (); + if (check_for_puny_score ()) + sound_send (SND_BUYIN_CANCELLED); + else if (check_for_big_score ()) + task_sleep_sec (2); + else + sound_send (SND_GREED_MODE_BOOM); + + bonus_sched_transition (); + task_sleep_sec (2); + } + /* Store and sort the current one ball hi scores during multiplayer */ + if (num_players > 1 && score_compare (points_this_ball, current_one_ball_hi_score) == 1) + { + score_zero (current_one_ball_hi_score); + score_copy (current_one_ball_hi_score, points_this_ball); + current_one_ball_hi_player = player_up; + current_one_ball_hi_ball_number = ball_up; + } + + /* If it's the last player of a multi player game ... */ + if (num_players > 1 && player_up == num_players && ball_up != 1 && extra_balls == 0 && feature_config.adv_bonus_info == YES) + { + /* show highest 1 ball score so far*/ + dmd_alloc_low_clean (); + font_render_string_center (&font_var5, 64, 4, "HIGHEST 1 BALL SCORE"); + sprintf_score (current_one_ball_hi_score); + font_render_string_center (&font_quadrit, 64, 16, sprintf_buffer); + if (current_one_ball_hi_ball_number == ball_up) + sprintf ("P%d ON THEIR LAST BALL", current_one_ball_hi_player); + else if (current_one_ball_hi_ball_number == ball_up && current_one_ball_hi_player == player_up) + sprintf ("P%d ON THE LAST BALL", current_one_ball_hi_player); + else + sprintf ("PLAYER %d ON BALL %d", current_one_ball_hi_player, current_one_ball_hi_ball_number); + font_render_string_center (&font_var5, 64, 26, sprintf_buffer); + bonus_sched_transition (); + dmd_show_low (); + task_sleep_sec (2); + } +} + +void bonus_deff (void) +{ + draw_taunts (); /* Clear the bonus score */ score_zero (total_bonus); /* Show Initial bonus screen */ sample_start (MUS_FADE_BONUS, SL_500MS); dmd_alloc_low_clean (); - font_render_string_center (&font_times10, 64, 16, "BONUS"); + font_render_string_center (&font_fireball, 64, 16, "BONUS"); dmd_sched_transition (&trans_bitfade_fast); dmd_show_low (); task_sleep_sec (1); @@ -316,52 +408,32 @@ void bonus_deff (void) /* Start a task to monitor the buttons */ task_recreate_gid (GID_BONUS_BUTTON_MONITOR, bonus_button_monitor); - if (door_panels_started) + if (door_panels_started > 0) { - dmd_alloc_low_clean (); - score_multiple (SC_1M, door_panels_started); - psprintf ("%d DOOR PANEL", "%d DOOR PANELS", door_panels_started); - font_render_string_center (&font_mono5, 64, 4, sprintf_buffer); - - bonus_add_up_score (door_panels_started, SC_1M); - font_render_string_center (&font_fixed10, 64, 16, sprintf_buffer); - sprintf ("%d X 1,000,000", door_panels_started); - font_render_string_center (&font_mono5, 64, 26, sprintf_buffer); - bonus_sched_transition (); - dmd_show_low (); - sound_send (SND_GREED_MODE_BOOM); - bonus_pause (); + calc_and_draw_bonus (SC_1M, door_panels_started); + font_render_string_center (&font_nayupixel10, 64, 4, "DOOR PANELS"); + trans_and_show (); } - if (loops) + if (loops > 0) { - dmd_alloc_low_clean (); - psprintf ("%d LOOP", "%d LOOPS", loops); - font_render_string_center (&font_mono5, 64, 4, sprintf_buffer); - - bonus_add_up_score (loops, SC_100K); - font_render_string_center (&font_fixed10, 64, 16, sprintf_buffer); - sprintf ("%d X 100,000", loops); - font_render_string_center (&font_mono5, 64, 26, sprintf_buffer); - bonus_sched_transition (); - dmd_show_low (); - sound_send (SND_GREED_MODE_BOOM); - if (loops < loop_master_hi) - bonus_pause (); - else + calc_and_draw_bonus (SC_1M, loops); + font_render_string_center (&font_nayupixel10, 64, 4, "LOOPS"); + trans_and_show (); + if (loops > loop_master_hi) { loop_master_hi = loops; loop_master_initial_enter = player_up; task_sleep_sec (1); dmd_alloc_low_clean (); - font_render_string_center (&font_fixed10, 64, 16, "LOOP MASTER"); + font_render_string_center (&font_quadrit, 64, 16, "LOOP MASTER"); dmd_sched_transition (&trans_sequential_boxfade); dmd_show_low (); sound_send (SND_GLASS_BREAKS); task_sleep_sec (2); dmd_alloc_low_clean (); sprintf ("%d LOOPS", loop_master_hi); - font_render_string_center (&font_fixed10, 64, 16, sprintf_buffer); + font_render_string_center (&font_quadrit, 64, 16, sprintf_buffer); dmd_show_low (); task_sleep_sec (2); } @@ -370,145 +442,60 @@ void bonus_deff (void) if (jets_scored > 0) { dmd_alloc_low_clean (); - score_zero (bonus_scored); - score_add (bonus_scored, score_table[SC_100K]); - score_mul (bonus_scored, jets_scored); - score_add (total_bonus, bonus_scored); - - score_zero (bonus_scored); - score_add (bonus_scored, score_table[SC_1M]); - score_mul (bonus_scored, jets_bonus_level); - score_add (total_bonus, bonus_scored); - - sprintf_score (bonus_scored); - font_render_string_center (&font_fixed10, 64, 16, sprintf_buffer); + bonus_add_up_jets (); + font_render_string_center (&font_quadrit, 64, 16, sprintf_buffer); sprintf ("TOWNSQUARE JETS"); - font_render_string_center (&font_mono5, 64, 4, sprintf_buffer); - bonus_sched_transition (); - dmd_show_low (); - sound_send (SND_GREED_MODE_BOOM); - bonus_pause (); + font_render_string_center (&font_nayupixel10, 64, 4, sprintf_buffer); + trans_and_show (); } if (left_ramps > 0) { - dmd_alloc_low_clean (); - score_zero (bonus_scored); - score_add (bonus_scored, score_table[SC_100K]); - score_mul (bonus_scored, left_ramps); - score_add (total_bonus, bonus_scored); - sprintf_score (bonus_scored); - font_render_string_center (&font_fixed10, 64, 16, sprintf_buffer); - sprintf ("LEFT RAMPS"); - font_render_string_center (&font_mono5, 64, 4, sprintf_buffer); - sprintf ("%d X 100,000", (left_ramps)); - font_render_string_center (&font_mono5, 64, 26, sprintf_buffer); - bonus_sched_transition (); - dmd_show_low (); - sound_send (SND_GREED_MODE_BOOM); - bonus_pause (); + calc_and_draw_bonus (SC_100K, left_ramps); + font_render_string_center (&font_nayupixel10, 64, 4, "LEFT RAMPS"); + trans_and_show (); } if (gumball_collected_count > 0) { - dmd_alloc_low_clean (); - score_zero (bonus_scored); - score_add (bonus_scored, score_table[SC_1M]); - score_mul (bonus_scored, gumball_collected_count); - score_add (total_bonus, bonus_scored); - sprintf_score (bonus_scored); - font_render_string_center (&font_fixed10, 64, 16, sprintf_buffer); - psprintf ("%d GUMBALL", "%d GUMBALLS", gumball_collected_count); - font_render_string_center (&font_mono5, 64, 4, sprintf_buffer); - sprintf ("%d X 1,000,000", (gumball_collected_count)); - font_render_string_center (&font_mono5, 64, 26, sprintf_buffer); - bonus_sched_transition (); - dmd_show_low (); - sound_send (SND_GREED_MODE_BOOM); - bonus_pause (); + calc_and_draw_bonus (SC_1M, gumball_collected_count); + font_render_string_center (&font_nayupixel10, 64, 4, "GUMBALLS"); + trans_and_show (); } if (spiralawards_collected > 0) { - dmd_alloc_low_clean (); - score_zero (bonus_scored); - score_add (bonus_scored, score_table[SC_1M]); - score_mul (bonus_scored, spiralawards_collected); - score_add (total_bonus, bonus_scored); - sprintf_score (bonus_scored); - font_render_string_center (&font_fixed10, 64, 16, sprintf_buffer); - psprintf ("%d SPIRAL AWARD", "%d SPIRAL AWARDS", spiralawards_collected); - font_render_string_center (&font_mono5, 64, 6, sprintf_buffer); - sprintf ("%d X 1,000,000", (spiralawards_collected)); - font_render_string_center (&font_mono5, 64, 26, sprintf_buffer); - bonus_sched_transition (); - dmd_show_low (); - sound_send (SND_GREED_MODE_BOOM); - bonus_pause (); + calc_and_draw_bonus (SC_1M, spiralawards_collected); + font_render_string_center (&font_nayupixel10, 64, 4, "SPIRALAWARDS"); + trans_and_show (); } if (dead_end_count > 0) { - dmd_alloc_low_clean (); - score_zero (bonus_scored); - score_add (bonus_scored, score_table[SC_1M]); - score_mul (bonus_scored, dead_end_count); - score_add (total_bonus, bonus_scored); - sprintf_score (bonus_scored); - font_render_string_center (&font_fixed10, 64, 16, sprintf_buffer); - psprintf ("%d DEAD END", "%d DEAD ENDS", dead_end_count); - font_render_string_center (&font_mono5, 64, 4, sprintf_buffer); - sprintf ("%d X 1,000,000", (dead_end_count)); - font_render_string_center (&font_mono5, 64, 26, sprintf_buffer); - bonus_sched_transition (); - dmd_show_low (); - sound_send (SND_GREED_MODE_BOOM); - bonus_pause (); + calc_and_draw_bonus (SC_1M, dead_end_count); + font_render_string_center (&font_nayupixel10, 64, 4, "DEAD ENDS"); + trans_and_show (); } if (hitch_count > 0) { - dmd_alloc_low_clean (); - score_zero (bonus_scored); - score_add (bonus_scored, score_table[SC_1M]); - score_mul (bonus_scored, hitch_count); - score_add (total_bonus, bonus_scored); - psprintf ("%d HITCHHIKER", "%d HITCHHIKERS", hitch_count); - font_render_string_center (&font_mono5, 64, 4, sprintf_buffer); - sprintf_score (bonus_scored); - font_render_string_center (&font_fixed10, 64, 16, sprintf_buffer); - sprintf ("%d X 1,000,000", (hitch_count)); - font_render_string_center (&font_mono5, 64, 26, sprintf_buffer); - bonus_sched_transition (); - dmd_show_low (); - sound_send (SND_GREED_MODE_BOOM); - bonus_pause (); + calc_and_draw_bonus (SC_1M, hitch_count); + font_render_string_center (&font_nayupixel10, 64, 4, "HITCHHIKERS"); + trans_and_show (); + } - if (rollover_count) + if (rollover_count > 0) { - dmd_alloc_low_clean (); - score_zero (bonus_scored); - score_add (bonus_scored, score_table[SC_1M]); - score_mul (bonus_scored, rollover_count); - psprintf ("%d ROLLOVER", "%d ROLLOVERS", rollover_count); - font_render_string_center (&font_mono5, 64, 4, sprintf_buffer); - sprintf_score (bonus_scored); - font_render_string_center (&font_fixed10, 64, 16, sprintf_buffer); - sprintf ("%d X 1,000,000", (rollover_count)); - font_render_string_center (&font_mono5, 64, 26, sprintf_buffer); - bonus_sched_transition (); - dmd_show_low (); - sound_send (SND_GREED_MODE_BOOM); - - if (rollover_count < 9) - bonus_pause (); - else + calc_and_draw_bonus (SC_1M, rollover_count); + font_render_string_center (&font_nayupixel10, 64, 4, "ROLLOVERS"); + trans_and_show (); + if (rollover_count > 9) { task_sleep_sec (2); dmd_alloc_low_clean (); - font_render_string_center (&font_mono5, 64, 10, "KEEPING THOSE"); - font_render_string_center (&font_mono5, 64, 20, "BUTTONS BUSY"); + font_render_string_center (&font_nayupixel10, 64, 10, "KEEPING THOSE"); + font_render_string_center (&font_nayupixel10, 64, 20, "BUTTONS BUSY"); dmd_sched_transition (&trans_sequential_boxfade); dmd_show_low (); sound_send (SND_GLASS_BREAKS); @@ -518,37 +505,23 @@ void bonus_deff (void) if (two_way_combos + three_way_combos) { - dmd_alloc_low_clean (); - score_zero (bonus_scored); - score_add (bonus_scored, score_table[SC_5M]); - score_mul (bonus_scored, two_way_combos + three_way_combos); - score_add (total_bonus, bonus_scored); - psprintf ("%d COMBO", "%d COMBOS", two_way_combos + three_way_combos); - font_render_string_center (&font_mono5, 64, 4, sprintf_buffer); - sprintf_score (bonus_scored); - font_render_string_center (&font_fixed10, 64, 16, sprintf_buffer); - sprintf ("%d X 5,000,000", (two_way_combos + three_way_combos)); - font_render_string_center (&font_mono5, 64, 26, sprintf_buffer); - bonus_sched_transition (); - dmd_show_low (); - sound_send (SND_GREED_MODE_BOOM); - - if (two_way_combos + three_way_combos < combo_master_hi) - bonus_pause (); - else + calc_and_draw_bonus (SC_5M, two_way_combos + three_way_combos); + font_render_string_center (&font_nayupixel10, 64, 4, "COMBOS"); + trans_and_show (); + if (two_way_combos + three_way_combos > combo_master_hi) { combo_master_hi = two_way_combos + three_way_combos; combo_master_initial_enter = player_up; task_sleep_sec (1); dmd_alloc_low_clean (); - font_render_string_center (&font_fixed10, 64, 16, "COMBO MASTER"); + font_render_string_center (&font_quadrit, 64, 16, "COMBO MASTER"); dmd_sched_transition (&trans_sequential_boxfade); dmd_show_low (); sound_send (SND_GLASS_BREAKS); task_sleep_sec (2); dmd_alloc_low_clean (); psprintf ("%d COMBO", "%d COMBOS", combo_master_hi); - font_render_string_center (&font_fixed10, 64, 16, sprintf_buffer); + font_render_string_center (&font_quadrit, 64, 16, sprintf_buffer); dmd_show_low (); task_sleep_sec (2); } @@ -557,25 +530,14 @@ void bonus_deff (void) if (lucky_bounces) { - dmd_alloc_low_clean (); - score_zero (bonus_scored); - score_add (bonus_scored, score_table[SC_5M]); - score_mul (bonus_scored, lucky_bounces); - score_add (total_bonus, bonus_scored); - psprintf ("%d LUCKYS", "%d LUCKYS", lucky_bounces); - font_render_string_center (&font_mono5, 64, 4, sprintf_buffer); - sprintf_score (bonus_scored); - font_render_string_center (&font_fixed10, 64, 16, sprintf_buffer); - sprintf ("%d X 5,000,000", (lucky_bounces)); - font_render_string_center (&font_mono5, 64, 26, sprintf_buffer); - bonus_sched_transition (); - dmd_show_low (); - sound_send (SND_GREED_MODE_BOOM); + calc_and_draw_bonus (SC_5M, lucky_bounces); + font_render_string_center (&font_nayupixel10, 64, 4, "LUCKY BOUNCES"); + trans_and_show (); if (lucky_bounces > 4 && lucky_bounces < spawny_get_hi) { dmd_alloc_low_clean (); - font_render_string_center (&font_fixed10, 64, 16, "SPAWNY GET"); + font_render_string_center (&font_quadrit, 64, 16, "SPAWNY GET"); dmd_sched_transition (&trans_sequential_boxfade); dmd_show_low (); sound_send (SND_LUCKY); @@ -585,7 +547,7 @@ void bonus_deff (void) { spawny_get_hi = lucky_bounces; dmd_alloc_low_clean (); - font_render_string_center (&font_fixed10, 64, 16, "SPAWNIEST GET"); + font_render_string_center (&font_quadrit, 64, 16, "SPAWNIEST GET"); dmd_sched_transition (&trans_sequential_boxfade); dmd_show_low (); sound_send (SND_GLASS_BREAKS); @@ -595,17 +557,14 @@ void bonus_deff (void) bonus_pause (); } - /* Do not allow the player to skip the next bonuses */ - task_kill_gid (GID_BONUS_BUTTON_MONITOR); - if (backdoor_award_collected == TRUE) { dmd_alloc_low_clean (); score_add (total_bonus, score_table[SC_20M]); sprintf ("BACKDOOR AWARD"); - font_render_string_center (&font_mono5, 64, 4, sprintf_buffer); + font_render_string_center (&font_nayupixel10, 64, 4, sprintf_buffer); sprintf ("20 MILLION"); - font_render_string_center (&font_fixed10, 64, 16, sprintf_buffer); + font_render_string_center (&font_quadrit, 64, 16, sprintf_buffer); dmd_sched_transition (&trans_bitfade_fast); dmd_show_low (); sound_send (SND_SURVIVAL_IS_EVERYTHING); @@ -613,7 +572,7 @@ void bonus_deff (void) } if (backdoor_award_collected == TRUE - && door_panels_started + && door_panels_started >= 10 && loops && jets_bonus_level && left_ramps @@ -629,227 +588,112 @@ void bonus_deff (void) dmd_alloc_low_clean (); score_add (total_bonus, score_table[SC_100M]); sprintf ("TOURIST AWARD"); - font_render_string_center (&font_mono5, 64, 4, sprintf_buffer); + font_render_string_center (&font_var5, 64, 4, sprintf_buffer); sprintf ("100 MILLION"); - font_render_string_center (&font_fixed10, 64, 16, sprintf_buffer); + font_render_string_center (&font_quadrit, 64, 16, sprintf_buffer); dmd_sched_transition (&trans_bitfade_slow); dmd_show_low (); task_sleep_sec (6); } - score_zero (temp_score); - - bonus_sched_transition (); - - /* Restart the button monitor in case the user wants to skip - * total points shown but hasn't pressed the buttons yet */ - if (!task_find_gid (GID_BONUS_BUTTON_MONITOR) - && buttons_held == FALSE) - { - task_recreate_gid (GID_BONUS_BUTTON_MONITOR, bonus_button_monitor); - } - - countup_pause_iterations = 0; + /* Add total bonus to player score */ + score_long (total_bonus); /* Show total Bonus */ - do { - dmd_alloc_low_clean (); - /* Shake the text */ - U8 x; - U8 y; - bounded_increment (countup_pause_iterations, 254); - if (countup_pause_iterations < 10) - { - x = random_scaled (1); - y = random_scaled (2); - } - else if (countup_pause_iterations < 20) - { - x = random_scaled (2); - y = random_scaled (3); - } - else if (countup_pause_iterations < 30) - { - x = random_scaled (4); - y = random_scaled (5); - } - else if (countup_pause_iterations < 40) - { - x = random_scaled (8); - y = random_scaled (4); - } - else - { - x = random_scaled (10); - y = random_scaled (5); - } - - font_render_string_center (&font_fixed6, 64, 6, "TOTAL BONUS"); - sprintf_score (temp_score); - font_render_string_center (&font_fixed10, 60 + x, 22 + y, sprintf_buffer); - dmd_show_low (); - score_add (temp_score, score_table[SC_5130]); - score_add (temp_score, score_table[SC_500K]); - sound_send (SND_THUD); - countup_pause (); - } while ( score_compare (total_bonus, temp_score) == 1 ); - - sound_send (SND_GREED_MODE_BOOM); dmd_alloc_low_clean (); - font_render_string_center (&font_fixed6, 64, 6, "TOTAL BONUS"); + font_render_string_center (&font_fireball, 64, 8, "TOTAL BONUS"); sprintf_score (total_bonus); - font_render_string_center (&font_fixed10, 64, 24, sprintf_buffer); - dmd_show_low (); - task_sleep_sec (2); - - /* Add to total bonus to player score */ - score_long (total_bonus); - - /* - * - * Total points this ball - * - */ - - /* Calculate */ - score_zero (points_this_ball); - score_copy (points_this_ball, current_score); - score_sub (points_this_ball, start_ball_score); - - score_zero (temp_score); - - /* Don't show if on first ball, you can just look at the scoreboard */ - if (ball_up != 1) - { - task_kill_gid (GID_BONUS_TALKING); - - countup_pause_iterations = 0; - do { - dmd_alloc_low_clean (); - - /* Shake the text */ - U8 x = random_scaled (8); - U8 y = random_scaled (4); - - font_render_string_center (&font_fixed6, 64, 6, "POINTS THIS BALL"); - sprintf_score (temp_score); - font_render_string_center (&font_fixed10, 60 + x, 22 + y, sprintf_buffer); - /* TODO : points this ball counts up very slow for really good balls */ - dmd_show_low (); - score_add (temp_score, score_table[SC_5130]); - score_add (temp_score, score_table[SC_500K]); - /* Make some noise based on points */ - if (score_compare (temp_score, score_table[SC_100M]) == 1 \ - && !task_find_gid (GID_BONUS_TALKING)) - task_create_gid (GID_BONUS_TALKING, points_this_ball_sound_task); - else if (!task_find_gid (GID_BONUS_TALKING)) - sound_send (SND_THUD); - bounded_increment (countup_pause_iterations, 254); - if (buttons_held == TRUE) - score_copy (temp_score, points_this_ball); - countup_pause (); - } while ( score_compare (points_this_ball, temp_score) == 1 ); - - dmd_alloc_low_clean (); - font_render_string_center (&font_fixed6, 64, 6, "POINTS THIS BALL"); - sprintf_score (points_this_ball); - font_render_string_center (&font_fixed10, 64, 24, sprintf_buffer); - dmd_show_low (); - if (check_for_puny_score ()) - sound_send (SND_BUYIN_CANCELLED); - else if (check_for_big_score ()) - task_sleep_sec (2); - else - sound_send (SND_GREED_MODE_BOOM); + font_render_string_center (&font_quadrit, 64, 24, sprintf_buffer); + bonus_sched_transition (); + dmd_show_low (); + sound_send (SND_GREED_MODE_BOOM); + bonus_pause (); + task_sleep_sec (1); - bonus_sched_transition (); - task_sleep_sec (2); - } - /* Store and sort the current one ball hi scores during multiplayer */ - if (num_players > 1 && score_compare (points_this_ball, current_one_ball_hi_score) == 1) - { - score_zero (current_one_ball_hi_score); - score_copy (current_one_ball_hi_score, points_this_ball); - current_one_ball_hi_player = player_up; - current_one_ball_hi_ball_number = ball_up; - } - - /* If it's the last player of a multi player game ... */ - if (num_players > 1 && player_up == num_players && ball_up != 1 && extra_balls == 0) + /* Calculate and show 1 ball hiscores */ +// one_ball_score_task (); + /* Calculate lead into temp_score */ + if (num_players > 1) { - /* show highest 1 ball score so far*/ - dmd_alloc_low_clean (); - font_render_string_center (&font_mono5, 64, 4, "HIGHEST 1 BALL SCORE"); - sprintf_score (current_one_ball_hi_score); - font_render_string_center (&font_fixed10, 64, 16, sprintf_buffer); - if (current_one_ball_hi_ball_number == ball_up) - sprintf ("P%d ON THEIR LAST BALL", current_one_ball_hi_player); - else if (current_one_ball_hi_ball_number == ball_up && current_one_ball_hi_player == player_up) - sprintf ("P%d ON THE LAST BALL", current_one_ball_hi_player); - else - sprintf ("PLAYER %d ON BALL %d", current_one_ball_hi_player, current_one_ball_hi_ball_number); - font_render_string_center (&font_mono5, 64, 26, sprintf_buffer); - bonus_sched_transition (); - dmd_show_low (); - task_sleep_sec (3); - - - /* Calculate lead into temp_score */ score_zero (temp_score); score_copy (temp_score, scores[find_player_ranked(1)]); score_sub (temp_score, scores[find_player_ranked(2)]); sprintf_score (temp_score); + } - + if (system_config.lowest_goes_next == NO) + { if (check_if_last_ball_of_multiplayer_game ()) { task_sleep_sec (2); } - else + /* Check if last ball of game */ + else if (num_players > 1 && player_up == num_players && ball_up != 1) { sound_send (SND_RABBLE_RABBLE); dmd_alloc_low_clean (); sprintf("PLAYER %d LEADS BY", find_player_ranked(1) + 1); - font_render_string_center (&font_mono5, 64, 4, sprintf_buffer); + font_render_string_center (&font_var5, 64, 4, sprintf_buffer); sprintf_score(temp_score); - font_render_string_center (&font_fixed10, 64, 16, sprintf_buffer); + font_render_string_center (&font_quadrit, 64, 16, sprintf_buffer); if (num_players == 3) { sprintf("2ND P%d 3RD P%d", find_player_ranked(2) + 1, find_player_ranked(3) + 1); - font_render_string_center (&font_mono5, 64, 26, sprintf_buffer); + font_render_string_center (&font_var5, 64, 26, sprintf_buffer); } else if (num_players == 4) { sprintf("2ND P%d 3RD P%d 4TH P%d", find_player_ranked(2) + 1, find_player_ranked(3) + 1, find_player_ranked(4) + 1); - - font_render_string_center (&font_var5, 64, 26, sprintf_buffer); + font_render_string_center (&font_var5, 64, 26, sprintf_buffer); } dmd_show_low (); - task_sleep_sec (4); + task_sleep_sec (3); } - } - if (check_if_last_ball_of_multiplayer_game ()) + + if (check_if_last_ball_of_multiplayer_game () + && feature_config.adv_bonus_info == YES) + + { + task_create_gid (GID_BONUS_TALKING, bonus_talking_task); + sound_send (SND_PLAYER_PIANO_UNUSED); + dmd_alloc_low_clean (); + + sprintf("PLAYER %d WINS BY", find_player_ranked(1) + 1); + font_render_string_center (&font_var5, 64, 3, sprintf_buffer); + sound_send (SND_GREED_MODE_BOOM); + sprintf_score (temp_score); + font_render_string_center (&font_quadrit, 64, 16, sprintf_buffer); + if (score_compare (score_table[SC_10M], temp_score) == 1) + { + font_render_string_center (&font_var5, 64, 29, "THAT WAS CLOSE"); + } + else if (score_compare (temp_score, score_table[SC_100M]) == 1) + { + font_render_string_center (&font_var5, 64, 29, "A LITTLE LOPSIDED"); + } + else + { + font_render_string_center (&font_var5, 64, 29, "CONGRATULATIONS"); + } + dmd_show_low (); + task_sleep_sec (5); + } + } + else if (check_if_last_ball_for_multiplayer ()) { - task_create_gid (GID_BONUS_TALKING, bonus_talking_task); sound_send (SND_PLAYER_PIANO_UNUSED); dmd_alloc_low_clean (); - - sprintf("PLAYER %d WINS BY", find_player_ranked(1) + 1); - font_render_string_center (&font_mono5, 64, 3, sprintf_buffer); - sound_send (SND_GREED_MODE_BOOM); - sprintf_score (temp_score); - font_render_string_center (&font_fixed10, 64, 13, sprintf_buffer); - font_render_string_center (&font_mono5, 64, 23, "CONGRATULATIONS"); - + font_render_string_center (&font_fireball, 64, 8, "GAME OVER!"); + sprintf ("PLAYER %d", player_up); + font_render_string_center (&font_quadrit, 64, 22, sprintf_buffer); dmd_show_low (); - task_sleep_sec (6); + task_sleep_sec (4); } - /* Show final score */ dmd_alloc_low_clean (); scores_draw (); @@ -866,20 +710,28 @@ void bonus_deff (void) deff_exit (); } +CALLSET_ENTRY (bonus, serve_ball) +{ + if (check_if_last_ball_of_multiplayer_game () + && system_config.lowest_goes_next == NO + && feature_config.adv_bonus_info == YES) + deff_start_sync (DEFF_SCORE_TO_BEAT); +} + void score_to_beat_deff (void) { dmd_alloc_low_clean (); - font_render_string_center (&font_mono5, 64, 19, "POINTS NEEDED"); + font_render_string_center (&font_var5, 64, 19, "POINTS NEEDED"); if (find_player_ranked(1) + 1 == player_up) { - font_render_string_center (&font_fixed10, 64, 8, "NO"); + font_render_string_center (&font_quadrit, 64, 8, "NO"); if (check_if_last_ball_of_multiplayer_game ()) { - font_render_string_center (&font_mono5, 64, 26, "SHOWBOAT A LITTLE"); + font_render_string_center (&font_var5, 64, 26, "SHOWBOAT A LITTLE"); } else { - font_render_string_center (&font_mono5, 64, 26, "INCREASE YOUR LEAD"); + font_render_string_center (&font_var5, 64, 26, "INCREASE YOUR LEAD"); } } else if (score_compare (scores[find_player_ranked(1)], current_score) == 1) @@ -889,21 +741,30 @@ void score_to_beat_deff (void) score_sub (temp_score, current_score); sprintf_score (temp_score); - font_render_string_center (&font_fixed10, 64, 8, sprintf_buffer); + font_render_string_center (&font_quadrit, 64, 8, sprintf_buffer); if (player_up > current_hi_player) sprintf ("TO BEAT PLAYER %d", current_hi_player); else sprintf ("TO CATCH UP TO P%d", current_hi_player); - font_render_string_center (&font_mono5, 64, 26, sprintf_buffer); + font_render_string_center (&font_var5, 64, 26, sprintf_buffer); } dmd_show_low (); task_sleep_sec (4); deff_exit (); } +CALLSET_ENTRY (bonus, start_ball) +{ + /* Store the start ball store */ + score_copy (start_ball_score, current_score); + quickdeath_timer_already_run = FALSE; + quickdeath_timer_running = FALSE; +} + CALLSET_ENTRY (bonus, start_game) { /* Initiliase hi score storage variables */ + score_zero (start_ball_score); score_zero (current_one_ball_hi_score); current_one_ball_hi_player = 0; current_one_ball_hi_ball_number = 0; @@ -933,22 +794,14 @@ CALLSET_ENTRY (bonus, valid_playfield) task_create_gid (GID_QUICKDEATH, quickdeath_timer_task); } -CALLSET_ENTRY (bonus, start_ball) -{ - /* Store the start ball store */ - score_zero (start_ball_score); - score_copy (start_ball_score, current_score); - quickdeath_timer_already_run = FALSE; - quickdeath_timer_running = FALSE; -} - CALLSET_ENTRY (bonus, rank_change) { /* Don't do anything if the player up isn't now in first place */ - if (!in_live_game && score_ranks[player_up-1] == 1) + if (!in_live_game || (score_ranks[player_up - 1] != 1)) return; - - /* Check for last ball and last player of game */ + if (system_config.lowest_goes_next == YES) + return; + /* Check if last ball of game */ /* Don't count extra balls because we don't need to */ if (ball_up == system_config.balls_per_game && player_up == num_players @@ -969,18 +822,18 @@ CALLSET_ENTRY (bonus, status_report) status_page_init (); if (num_players > 1) { - font_render_string_center (&font_mono5, 64, 19, "POINTS NEEDED"); + font_render_string_center (&font_var5, 64, 19, "POINTS NEEDED"); /* find_player_ranked returns from 0 */ if (find_player_ranked(1) + 1 == player_up) { - font_render_string_center (&font_fixed10, 64, 8, "NO"); + font_render_string_center (&font_quadrit, 64, 8, "NO"); if (check_if_last_ball_of_multiplayer_game ()) { - font_render_string_center (&font_mono5, 64, 26, "SHOWBOAT A LITTLE"); + font_render_string_center (&font_var5, 64, 26, "SHOWBOAT A LITTLE"); } else { - font_render_string_center (&font_mono5, 64, 26, "INCREASE YOUR LEAD"); + font_render_string_center (&font_var5, 64, 26, "INCREASE YOUR LEAD"); } } else if (score_compare (scores[find_player_ranked(1)], current_score) == 1) @@ -990,12 +843,12 @@ CALLSET_ENTRY (bonus, status_report) score_sub (temp_score, current_score); sprintf_score (temp_score); - font_render_string_center (&font_fixed10, 64, 8, sprintf_buffer); + font_render_string_center (&font_quadrit, 64, 8, sprintf_buffer); if (player_up > current_hi_player) sprintf ("TO BEAT PLAYER %d", current_hi_player); else sprintf ("TO CATCH UP TO P%d", current_hi_player); - font_render_string_center (&font_mono5, 64, 26, sprintf_buffer); + font_render_string_center (&font_var5, 64, 26, sprintf_buffer); } } /* Single ball play */ @@ -1006,7 +859,7 @@ CALLSET_ENTRY (bonus, status_report) score_sub (points_this_ball, start_ball_score); font_render_string_center (&font_fixed6, 64, 6, "POINTS THIS BALL"); sprintf_score (points_this_ball); - font_render_string_center (&font_fixed10, 64, 24, sprintf_buffer); + font_render_string_center (&font_quadrit, 64, 24, sprintf_buffer); } status_page_complete (); } diff --git a/machine/tz/bttz.c b/machine/tz/bttz.c index 98d512251..ba9341742 100644 --- a/machine/tz/bttz.c +++ b/machine/tz/bttz.c @@ -64,11 +64,12 @@ void tbc_deff (void) font_render_string_center (&font_fixed6, 64, 4, "TO BE CONTINUED"); dmd_show_low (); - task_sleep_sec (2); + task_sleep_sec (1); font_render_string_center (&font_var5, 64, 12, "FOR NOW, HAVE 100M"); sound_send (SND_KACHING); dmd_sched_transition (&trans_bitfade_slow); dmd_show_low (); + task_sleep_sec (2); deff_exit (); } @@ -97,7 +98,7 @@ void bttz_start_task (void) callset_invoke (empty_balls_test); device_request_empty (device_entry (DEVNO_LOCK)); - set_ball_count (6); + device_multiball_set (6); balls_needed_to_load = 3; task_exit (); } @@ -107,6 +108,7 @@ CALLSET_ENTRY (bttz, door_start_bttz) //task_create_anon (bttz_start_task); deff_start (DEFF_TBC); score (SC_100M); + callset_invoke (reset_door); } /* Once the ballsave has run out, start holding balls in the autofire */ @@ -167,7 +169,7 @@ CALLSET_ENTRY (bttz, single_ball_play) lamplist_apply (LAMPLIST_DOOR_PANELS_AND_HANDLE, lamp_flash_off); flag_on (FLAG_SLOT_DOOR_LIT); callset_invoke (door_enable); - effect_update_request (); + music_refresh (); } CALLSET_ENTRY (bttz, end_ball) diff --git a/machine/tz/camera.c b/machine/tz/camera.c index f2c20b37a..496c6320d 100644 --- a/machine/tz/camera.c +++ b/machine/tz/camera.c @@ -28,10 +28,15 @@ extern void mball_start_3_ball (void); extern U8 unlit_shot_count; extern U8 jackpot_level; extern U8 mball_locks_lit; +extern U8 mball_locks_made; extern U8 gumball_enable_count; extern U8 chaosmb_level; extern U8 chaosmb_hits_to_relight; - +extern U8 three_way_combos; +extern U8 left_ramps; +extern U8 mball_locks_lit; +extern struct timed_mode_ops hitch_mode; +extern __local__ U8 door_panels_started; typedef enum { CAMERA_AWARD_LIGHT_LOCK=0, @@ -43,33 +48,38 @@ typedef enum { } camera_award_t; __local__ U8 cameras_lit; - __local__ camera_award_t camera_award_count; /* Needed to store award for deff */ camera_award_t camera_award_count_stored; -extern U8 mball_locks_lit; -extern struct timed_mode_ops hitch_mode; -extern U8 left_ramps; +U8 camera_hits_to_relight_jackpot; void left_ramp_lights_camera_deff (void) { dmd_alloc_low_clean (); dmd_sched_transition (&trans_scroll_right); - if (timed_mode_running_p (&hitch_mode)) + + if (global_flag_test (GLOBAL_FLAG_MULTIBALL_RUNNING) + && !global_flag_test (GLOBAL_FLAG_MB_JACKPOT_LIT)) + { + sprintf ("%d MORE TO", camera_hits_to_relight_jackpot); + font_render_string_center (&font_quadrit, 64, 6, sprintf_buffer); + font_render_string_center (&font_quadrit, 64, 22, "RELIGHT JACKPOT"); + } + else if (timed_mode_running_p (&hitch_mode)) { - font_render_string_center (&font_fixed6, 64, 6, "TRY A"); - font_render_string_center (&font_fixed6, 64, 22, "BIT LOWER"); + font_render_string_center (&font_quadrit, 64, 6, "TRY A"); + font_render_string_center (&font_quadrit, 64, 22, "BIT LOWER"); } else if (left_ramps < 3) { - font_render_string_center (&font_fixed6, 64, 6, "LEFT RAMP"); - font_render_string_center (&font_fixed6, 64, 22, "LIGHTS CAMERA"); + font_render_string_center (&font_quadrit, 64, 8, "LEFT RAMP"); + font_render_string_center (&font_quadrit, 64, 22, "LIGHTS CAMERA"); } else { - font_render_string_center (&font_fixed6, 64, 6, "4 ROLLOVERS"); - font_render_string_center (&font_fixed6, 64, 22, "LIGHTS CAMERA"); + font_render_string_center (&font_quadrit, 64, 8, "4 ROLLOVERS"); + font_render_string_center (&font_quadrit, 64, 22, "LIGHTS CAMERA"); } dmd_show_low (); task_sleep_sec (1); @@ -97,8 +107,8 @@ void camera_award_deff (void) dmd_alloc_low_clean (); dmd_draw_border (dmd_low_buffer); /* camera_award_count_stored starts from 0 */ - sprintf ("CAMERA AWARD %d", camera_award_count_stored + 1); - font_render_string_center (&font_mono5, 64, 6, sprintf_buffer); + sprintf ("CAMERA %d", camera_award_count_stored + 1); + font_render_string_center (&font_bitoutline, 64, 9, sprintf_buffer); switch (camera_award_count_stored) { case CAMERA_AWARD_LIGHT_LOCK: @@ -119,18 +129,18 @@ void camera_award_deff (void) default: break; } - font_render_string_center (&font_fixed6, 64, 23, sprintf_buffer); + font_render_string_center (&font_quadrit, 64, 23, sprintf_buffer); dmd_sched_transition (&trans_scroll_down_fast); dmd_show_low (); sound_send (SND_GUMBALL_LOADED); - task_sleep_sec (1); + task_sleep_sec (2); deff_exit (); } CALLSET_ENTRY (camera, status_report) { status_page_init (); - font_render_string_center (&font_mono5, 64, 6, "NEXT CAMERA AWARD"); + font_render_string_center (&font_var5, 64, 6, "NEXT CAMERA AWARD"); switch (camera_award_count) { case CAMERA_AWARD_LIGHT_LOCK: @@ -172,11 +182,11 @@ static void do_camera_award (void) { magnet_disable_catch (MAG_RIGHT); unlit_shot_count = 0; + /* Don't light the lock if unable to do so */ + if (mball_locks_lit + mball_locks_made >= 2 && camera_award_count == CAMERA_AWARD_LIGHT_LOCK) + camera_award_count = CAMERA_AWARD_10_MILLION; camera_award_count_stored = camera_award_count; - /* Don't light the lock if already lit */ - if (mball_locks_lit == 2 && camera_award_count == CAMERA_AWARD_LIGHT_LOCK) - camera_award_count = CAMERA_AWARD_DOOR_PANEL; - deff_start (DEFF_CAMERA_AWARD); + deff_start_sync (DEFF_CAMERA_AWARD); switch (camera_award_count) { case CAMERA_AWARD_LIGHT_LOCK: @@ -187,7 +197,11 @@ static void do_camera_award (void) sound_send (SND_TEN_MILLION_POINTS); score (SC_10M); /* Spot door panel if not lit */ - lamp_on (LM_PANEL_10M); + if (!lamp_test (LM_PANEL_10M)) + { + lamp_on (LM_PANEL_10M); + door_panels_started++; + } break; case CAMERA_AWARD_DOOR_PANEL: /* Spot Door Panel */ @@ -197,11 +211,10 @@ static void do_camera_award (void) /* Quick Multiball */ task_create_anon (mball_start_2ball_task); break; + default: case CAMERA_AWARD_20_MILLION: score (SC_20M); break; - default: - break; } bounded_decrement (cameras_lit, 0); camera_award_count++; @@ -219,25 +232,50 @@ inline bool can_award_camera (void) return FALSE; } -/* Spawned as a seperate task to avoid the deadly overflow */ -void mpf_collected_task (void) +/* Add another 10M to the jackpot if collected during MB with the jackpot lit + * otherwise it takes 3 hits to relight the first time, 6 the second time and so + * on */ +static void award_multiball_camera (void) { - callset_invoke (mpf_collected); - task_exit (); + if (global_flag_test (GLOBAL_FLAG_MB_JACKPOT_LIT)) + { + if (jackpot_level < 4) + { + jackpot_level++; + deff_start (DEFF_MB_TEN_MILLION_ADDED); + } + } + else + { + bounded_decrement (camera_hits_to_relight_jackpot, 0); + if (camera_hits_to_relight_jackpot == 0) + { + global_flag_on (GLOBAL_FLAG_MB_JACKPOT_LIT); + deff_start (DEFF_JACKPOT_RELIT); + camera_hits_to_relight_jackpot = 3 * jackpot_level; + } + else + // TODO use a better deff name, as that deff displays + // other things as well + deff_start (DEFF_LEFT_RAMP_LIGHTS_CAMERA); + } } -CALLSET_ENTRY (camera, sw_camera) +CALLSET_ENTRY (camera, mball_start) { - device_switch_can_follow (camera, slot, TIME_3S); - - if (event_did_follow (gumball_exit, camera) - || event_did_follow (dead_end, camera)) - { - /* Do nothing */ - } - else if (event_did_follow (mpf_top, camera)) + camera_hits_to_relight_jackpot = 3; +} + +CALLSET_ENTRY (camera, camera_shot) +{ + if (task_find_or_kill_gid (GID_L_RAMP_TO_LOCK_TO_CAMERA)) { - task_create_anon (mpf_collected_task); + sound_send (SND_THREE_WAY_COMBO); + score (SC_20M); + deff_start_sync (DEFF_THREE_WAY_COMBO); + bounded_increment (three_way_combos, 99); + /* Award the camera even if unlit */ + do_camera_award (); } else if (can_award_camera ()) { @@ -245,15 +283,8 @@ CALLSET_ENTRY (camera, sw_camera) score (SC_500K); sound_send (SND_CAMERA_AWARD_SHOWN); } - /* Add another 10M to the jackpot if collected during MB with the jackpot lit */ - else if (multi_ball_play ()&& global_flag_test (GLOBAL_FLAG_MB_JACKPOT_LIT)) - { - if (jackpot_level < 4) - { - jackpot_level++; - deff_start (DEFF_MB_TEN_MILLION_ADDED); - } - } + else if (global_flag_test (GLOBAL_FLAG_MULTIBALL_RUNNING)) + award_multiball_camera (); else { if (!global_flag_test (GLOBAL_FLAG_CHAOSMB_RUNNING) @@ -273,6 +304,7 @@ CALLSET_ENTRY (camera, right_ball_grabbed) { if (!multi_ball_play () && can_award_camera ()) { + sound_send (SND_TWILIGHT_ZONE_SHORT_SOUND); deff_start (DEFF_SHOOT_CAMERA); } } @@ -298,6 +330,7 @@ CALLSET_ENTRY (camera, lamp_update) CALLSET_ENTRY (camera, start_player) { cameras_lit = 1; + camera_award_count_stored = 3; camera_award_count = 0; } diff --git a/machine/tz/chaosmb.c b/machine/tz/chaosmb.c index caa374ec4..f2a9eefb8 100644 --- a/machine/tz/chaosmb.c +++ b/machine/tz/chaosmb.c @@ -1,5 +1,5 @@ /* - * Copyright 2006, 2007, 2008, 2009, 2010 by Brian Dominy + * Copyright 2006, 2007, 2008, 2009 by Brian Dominy * * This file is part of FreeWPC. * @@ -79,8 +79,8 @@ void chaos_jackpot_deff (void) { dmd_alloc_pair (); dmd_clean_page_low (); - font_render_string_center (&font_fixed10, 64, 9, "CHAOS"); - font_render_string_center (&font_fixed10, 64, 23, "JACKPOT"); + font_render_string_center (&font_fireball, 64, 9, "CHAOS"); + font_render_string_center (&font_fireball, 64, 23, "JACKPOT"); dmd_show_low (); dmd_copy_low_to_high (); dmd_invert_page (dmd_low_buffer); @@ -89,7 +89,7 @@ void chaos_jackpot_deff (void) dmd_alloc_pair (); dmd_clean_page_low (); sprintf ("%d MILLION", chaosmb_shots[chaosmb_level_stored].jackpot_value); - font_render_string_center (&font_fixed10, 64, 16, sprintf_buffer); + font_render_string_center (&font_quadrit, 64, 16, sprintf_buffer); sound_send (SND_EXPLOSION_1); dmd_show_low (); dmd_copy_low_to_high (); @@ -100,28 +100,45 @@ void chaos_jackpot_deff (void) void chaosmb_running_deff (void) { + U16 fno; for (;;) { - score_deff_begin (&font_fixed6, 64, 4, "CHAOS MULTIBALL"); - if (chaosmb_hits_to_relight == 0) + for (fno = IMG_BOLT_TESLA_START; fno <= IMG_BOLT_TESLA_END; fno += 2) { - sprintf ("SHOOT %s", chaosmb_shots[chaosmb_level].shot_name); - font_render_string_center (&font_var5, 64, 27, sprintf_buffer); + dmd_alloc_pair_clean (); + dmd_map_overlay (); + dmd_clean_page_low (); + font_render_string_left (&font_bitoutline, 1, 1, "CHAOS"); + font_render_string_left (&font_quadrit, 59, 2, "MULTIBALL"); + sprintf_current_score (); + font_render_string_center (&font_cowboy, 64, 16, sprintf_buffer); + if (chaosmb_hits_to_relight == 0) + { + sprintf ("SHOOT %s", chaosmb_shots[chaosmb_level].shot_name); + font_render_string_center (&font_var5, 64, 27, sprintf_buffer); + } + else if (chaosmb_hits_to_relight == 1) + { + font_render_string_center (&font_var5, 64, 27, + "HIT CLOCK TO LIGHT JACKPOT"); + lamp_tristate_flash (LM_CLOCK_MILLIONS); + } + else + { + sprintf ("HIT CLOCK %d MORE TIMES", chaosmb_hits_to_relight); + font_render_string_center (&font_var5, 64, 27, sprintf_buffer); + lamp_tristate_flash (LM_CLOCK_MILLIONS); + } + dmd_text_outline (); + dmd_alloc_pair (); + frame_draw (fno); + callset_invoke (score_overlay); + dmd_overlay_outline (); + dmd_show2 (); + task_sleep (TIME_66MS); } - else if (chaosmb_hits_to_relight == 1) - { - font_render_string_center (&font_var5, 64, 27, - "HIT CLOCK TO LIGHT JACKPOT"); - lamp_tristate_flash (LM_CLOCK_MILLIONS); - } - else - { - sprintf ("HIT CLOCK %d MORE TIMES", chaosmb_hits_to_relight); - font_render_string_center (&font_var5, 64, 27, sprintf_buffer); - lamp_tristate_flash (LM_CLOCK_MILLIONS); - } - score_deff_end (TIME_100MS); } + } static void chaosmb_check_jackpot_lamps (void) @@ -191,7 +208,17 @@ static void chaosmb_score_jackpot (void) chaosmb_check_jackpot_lamps (); deff_start (DEFF_JACKPOT); + leff_start (LEFF_PIANO_JACKPOT_COLLECTED); + leff_start (LEFF_FLASH_GI2); deff_start (DEFF_CHAOS_JACKPOT); + tz_clock_start_forward (); +} + +static void start_clock_task (void) +{ + task_sleep_sec (2); + tz_clock_start_forward (); + task_exit (); } CALLSET_ENTRY (chaosmb, chaosmb_start) @@ -209,13 +236,18 @@ CALLSET_ENTRY (chaosmb, chaosmb_start) //ballsave_add_time (10); /* Check and light jackpot lamp */ chaosmb_check_jackpot_lamps (); + /* TODO vary speed based on jackpot? */ + task_create_anon (start_clock_task); } } CALLSET_ENTRY (chaosmb, chaosmb_stop) { if (mball_jackpot_uncollected == TRUE) + { sound_send (SND_NOOOOOOOO); + callset_invoke (start_hurryup); + } global_flag_off (GLOBAL_FLAG_CHAOSMB_RUNNING); /* Turn off jackpot lamps */ @@ -223,7 +255,8 @@ CALLSET_ENTRY (chaosmb, chaosmb_stop) lamplist_apply (LAMPLIST_CHAOSMB_JACKPOTS, lamp_flash_off); lamplist_apply (LAMPLIST_CHAOSMB_JACKPOTS, lamp_off); deff_stop (DEFF_CHAOSMB_RUNNING); - effect_update_request (); + music_refresh (); + tz_clock_reset (); } static inline void chaosmb_check_level (U8 level) @@ -299,7 +332,19 @@ CALLSET_ENTRY (chaosmb, sw_clock_target) { if (global_flag_test (GLOBAL_FLAG_CHAOSMB_RUNNING)) { - score (SC_250K); + leff_start (LEFF_CLOCK_TARGET); + if (chaosmb_hits_to_relight == 0 && !timer_find_gid (GID_STOP_IT_DEBOUNCE)) + { + tz_clock_stop (); + sound_send (SND_STOP_IT); + timer_restart_free (GID_STOP_IT_DEBOUNCE, TIME_5S); + } + else if (chaosmb_hits_to_relight != 0) + { + sound_send (SND_CLOCK_BELL); + score (SC_250K); + tz_clock_reverse_direction (); + } bounded_decrement (chaosmb_hits_to_relight, 0); } } diff --git a/machine/tz/clock.c b/machine/tz/clock.c index 40990a347..4a2a59fd9 100644 --- a/machine/tz/clock.c +++ b/machine/tz/clock.c @@ -1,5 +1,5 @@ /* - * Copyright 2006-2010 by Brian Dominy + * Copyright 2006-2009 by Brian Dominy * * This file is part of FreeWPC. * @@ -18,6 +18,15 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +/* Full rotation of the clock takes: + * + * Duty + * 100% = ~12 seconds + * 50% = ~25 seconds + * 25% = ~55 seconds + */ + +/* CALLSET_SECTION (clock, __machine__) */ #include #include #include @@ -31,6 +40,10 @@ enum mech_clock_mode CLOCK_RUNNING_FORWARD, /** The clock should run backward */ CLOCK_RUNNING_BACKWARD, + /** The clock should run forward after being unpaused */ + CLOCK_PAUSED_FORWARD, + /** The clock should run backward after being unpaused */ + CLOCK_PAUSED_BACKWARD, /** The clock should be calibrated */ CLOCK_CALIBRATING, /** The clock is trying to find a particular location, @@ -67,11 +80,6 @@ __fastram__ U8 clock_find_target; * switch transitions */ __fastram__ U8 clock_last_sw; - -/** How long calibration will be allowed to continue, before - * giving up. */ -U8 clock_calibration_time; - /** The clock time "decoded" as the number of 15-minute intervals past 12:00, ranging from 0 to 47. */ U8 clock_decode; @@ -85,7 +93,12 @@ task_gid_t clock_owner; /** The current clock hour, as an integer from 0-11 */ U8 clock_hour; -static void check_tz_clock (void); +U8 mech_speed_stored; +extern struct timed_mode_ops mpf_mode; + +/* rtc hour and minute */ +extern U8 hour; +extern U8 minute; void tz_dump_clock (void) { @@ -168,8 +181,6 @@ U8 tz_clock_gettime (void) return clock_decode; } - - /** The real-time task driver for the clock. * This function is called once every 8ms. */ void tz_clock_switch_rtt (void) @@ -184,7 +195,7 @@ void tz_clock_switch_rtt (void) clock_switch_disable (); /* Unless any switches change, there's nothing else to do */ - if (unlikely (clock_sw != clock_last_sw)) + if ((clock_sw != clock_last_sw)) { /* Always remember the last minute opto seen. The hour optos can be read at any time, but the minute optos are only active @@ -200,29 +211,30 @@ void tz_clock_switch_rtt (void) clock_hour = tz_clock_opto_to_hour[clock_sw >> 4]; } else if (clock_minute_sw == CLK_SW_MIN00 && + // CLK_SW_MIN (clock_last_sw) == CLK_SW_MIN45 && clock_mode == CLOCK_RUNNING_FORWARD) { clock_hour++; if (clock_hour == 12) clock_hour = 0; } + else if (clock_minute_sw == CLK_SW_MIN00 + && clock_mode == CLOCK_RUNNING_BACKWARD) + { + if (clock_hour) + clock_hour--; + else + clock_hour = 11; + } } - else if (unlikely (CLK_SW_MIN (clock_last_sw) == CLK_SW_MIN45 - && clock_mode == CLOCK_RUNNING_BACKWARD)) - { - if (clock_hour) - clock_hour--; - else - clock_hour = 11; - } - /* If searching for a specific target, see if we're there */ - if (unlikely (clock_mode == CLOCK_FIND)) + if ((clock_mode == CLOCK_FIND)) { if (clock_sw == clock_find_target) { /* Yep, stop NOW! */ clock_mech_stop_from_interrupt (); + global_flag_on (GLOBAL_FLAG_CLOCK_HOME); } else if (CLK_SW_HOUR_EQUAL_P (clock_sw, clock_find_target) && (clock_mech_get_speed () < BIVAR_DUTY_25)) @@ -231,14 +243,20 @@ void tz_clock_switch_rtt (void) clock_mech_set_speed (BIVAR_DUTY_25); } /* Otherwise, the clock keeps running as it was */ + /* BUG workaround: Goes very slowly backwards when it's miles away from home */ + // if (clock_mech_get_speed () == BIVAR_DUTY_25 + // && (clock_hour != 11 || clock_hour != 0)) + // { + // clock_mech_set_speed (BIVAR_DUTY_100); + // } + } - else if (unlikely (clock_mode == CLOCK_CALIBRATING)) + else if ((clock_mode == CLOCK_CALIBRATING)) { /* Update the active/inactive switch list for calibration */ - clock_sw_seen_active |= clock_sw; clock_sw_seen_inactive |= ~clock_sw; + clock_sw_seen_active |= clock_sw; } - check_tz_clock (); } } @@ -248,7 +266,7 @@ void tz_clock_switch_rtt (void) */ void tz_clock_clear_owner (void) { - clock_owner = 0; + clock_owner = NULL; } @@ -259,7 +277,7 @@ bool tz_clock_alloc (task_gid_t owner) { if (clock_owner == owner) return TRUE; - if (clock_owner != 0) + if (clock_owner != NULL) return FALSE; clock_owner = owner; return TRUE; @@ -275,23 +293,115 @@ void tz_clock_free (task_gid_t owner) tz_clock_clear_owner (); } +void tz_clock_show_time (U8 hours, U8 minutes) +{ + if (hours > 12) + hours = 12; + else if (hours == 0) + hours = 12; + if (minutes > 59); + minutes = 59; + + if (minutes < 15) + clock_find_target = tz_clock_hour_to_opto[hours - 1] | CLK_SW_MIN00; + else if (minutes < 30) + clock_find_target = tz_clock_hour_to_opto[hours - 1] | CLK_SW_MIN15; + else if (minutes < 45) + clock_find_target = tz_clock_hour_to_opto[hours - 1] | CLK_SW_MIN30; + else if (minutes >= 45) + clock_find_target = tz_clock_hour_to_opto[hours - 1] | CLK_SW_MIN45; + clock_mode = CLOCK_FIND; +} + +/** +* Pause the clock and restart again +*/ +bool clock_moving (void) +{ + if (clock_mode == CLOCK_RUNNING_FORWARD || clock_mode == CLOCK_RUNNING_BACKWARD) + return TRUE; + else + return FALSE; +} + +bool clock_paused (void) +{ + if (clock_mode == CLOCK_PAUSED_FORWARD || clock_mode == CLOCK_PAUSED_BACKWARD) + return TRUE; + else + return FALSE; +} + +bool should_pause_clock (void) +{ + if (kickout_locks > 0 || timed_mode_running_p (&mpf_mode)) + return TRUE; + else + return FALSE; +} + +CALLSET_ENTRY (clock, idle_every_second) +{ + if (!in_live_game) + return; + if (should_pause_clock () && clock_moving ()) + { + mech_speed_stored = clock_mech_get_speed (); + if (clock_mode == CLOCK_RUNNING_FORWARD) + { + clock_mode = CLOCK_PAUSED_FORWARD; + } + else + { + clock_mode = CLOCK_PAUSED_BACKWARD; + } + clock_mech_stop (); + } + else if (clock_paused () && !should_pause_clock ()) + { + clock_mech_set_speed (mech_speed_stored); + if (clock_mode == CLOCK_PAUSED_FORWARD) + { + tz_clock_start_forward (); + } + else + { + tz_clock_start_backward (); + } + } +} void tz_clock_start_forward (void) { if (in_test || global_flag_test (GLOBAL_FLAG_CLOCK_WORKING)) { - clock_mech_start_forward (); + global_flag_off (GLOBAL_FLAG_CLOCK_HOME); clock_mode = CLOCK_RUNNING_FORWARD; + clock_mech_start_forward (); } } - void tz_clock_start_backward (void) { if (in_test || global_flag_test (GLOBAL_FLAG_CLOCK_WORKING)) { + global_flag_off (GLOBAL_FLAG_CLOCK_HOME); + clock_mode = CLOCK_RUNNING_BACKWARD; clock_mech_start_reverse (); + } +} + +void tz_clock_reverse_direction (void) +{ + if (clock_mode == CLOCK_RUNNING_FORWARD) + { clock_mode = CLOCK_RUNNING_BACKWARD; + clock_mech_start_reverse (); + } + else if (clock_mode == CLOCK_RUNNING_BACKWARD) + { + clock_mode = CLOCK_RUNNING_FORWARD; + clock_mech_start_forward (); } } @@ -325,28 +435,40 @@ void tz_clock_reset (void) dbprintf ("Clock resetting to home.\n"); /* See where the clock is and start it if it's not already home. */ clock_find_target = tz_clock_hour_to_opto[11] | CLK_SW_MIN00; - if (clock_sw != clock_find_target) + if (clock_sw != clock_find_target && !global_flag_test (GLOBAL_FLAG_CLOCK_HOME)) { - clock_mech_set_speed (BIVAR_DUTY_100); if (clock_hour <= 6) clock_mech_start_reverse (); else clock_mech_start_forward (); + timer_start_free (GID_CLOCK_FINDING, TIME_15S); + + if (clock_mode != CLOCK_FIND && clock_mode != CLOCK_CALIBRATING) + clock_mech_set_speed (BIVAR_DUTY_100); clock_mode = CLOCK_FIND; } } } +/* Manually set the clock to home */ +CALLSET_ENTRY (tz_clock, clock_at_home) +{ + tz_clock_stop (); + global_flag_on (GLOBAL_FLAG_CLOCK_HOME); + clock_hour = 0; + clock_sw_seen_active = 0xFF; + clock_sw_seen_inactive = 0xFF; +} /** * A periodic, lower priority function that updates the * state machine depending on what has been seen recently. */ -static void check_tz_clock (void) +CALLSET_ENTRY (tz_clock, idle_every_100ms) { /* When calibrating, once all switches have been active and inactive * at least once, claim victory and go back to the home position. */ - if (unlikely (clock_mode == CLOCK_CALIBRATING)) + if (clock_mode == CLOCK_CALIBRATING) { if ((clock_sw_seen_active & clock_sw_seen_inactive) == 0xFF) { @@ -356,12 +478,17 @@ static void check_tz_clock (void) } /* If calibration doesn't succeed within a certain number * of iterations, give up. */ - else if (--clock_calibration_time == 0) + if (!timer_find_gid (GID_CLOCK_CALIBRATING)) { dbprintf ("Calibration aborted.\n"); tz_clock_error (); } } + else if (clock_mode == CLOCK_FIND && !timer_find_gid (GID_CLOCK_FINDING)) + { + dbprintf ("Finding failed.\n"); + tz_clock_stop (); + } } @@ -370,6 +497,7 @@ static void check_tz_clock (void) */ CALLSET_ENTRY (tz_clock, init) { + global_flag_off (GLOBAL_FLAG_CLOCK_HOME); clock_mode = CLOCK_STOPPED; clock_sw_seen_active = 0; clock_sw_seen_inactive = 0; @@ -378,6 +506,7 @@ CALLSET_ENTRY (tz_clock, init) clock_hour = 0; global_flag_on (GLOBAL_FLAG_CLOCK_WORKING); clock_mech_set_speed (BIVAR_DUTY_100); + mech_speed_stored = BIVAR_DUTY_100; tz_clock_clear_owner (); } @@ -390,33 +519,53 @@ CALLSET_ENTRY (tz_clock, amode_start) /* If not all of the other clock switches have been seen in both * active and inactive states, start the clock. */ - else if ((clock_sw_seen_active & clock_sw_seen_inactive) != 0xFF) + else if ((clock_sw_seen_active & clock_sw_seen_inactive) != 0xFF + && !global_flag_test (GLOBAL_FLAG_CLOCK_HOME)) { dbprintf ("Clock calibration started.\n"); - clock_calibration_time = 11; /* 10 seconds ~ 1 rotations */ + timer_restart_free (GID_CLOCK_CALIBRATING, TIME_15S); global_flag_on (GLOBAL_FLAG_CLOCK_WORKING); clock_mech_set_speed (BIVAR_DUTY_100); clock_mode = CLOCK_CALIBRATING; clock_mech_start_forward (); } - else - { + else if (global_flag_test (GLOBAL_FLAG_CLOCK_HOME)) + tz_clock_show_time (hour, minute); + else tz_clock_reset (); - } } +void tz_clock_set_speed (U8 speed) +{ + if (speed > 3) + speed = 3; + switch (speed) + { + default: + case 0: + case 1: + clock_mech_set_speed (BIVAR_DUTY_25); + break; + case 2: + clock_mech_set_speed (BIVAR_DUTY_50); + break; + case 3: + clock_mech_set_speed (BIVAR_DUTY_100); + break; + + } +} CALLSET_ENTRY (tz_clock, diagnostic_check) { if (feature_config.disable_clock) - diag_post_error ("CLOCK DISABLED\nBY ADJUSTMENT\n", MACHINE_PAGE); + diag_post_error ("CLOCK DISABLED\nBY ADJUSTMENT\n", PAGE); while (unlikely (clock_mode == CLOCK_CALIBRATING)) task_sleep (TIME_100MS); if (!global_flag_test (GLOBAL_FLAG_CLOCK_WORKING)) - diag_post_error ("CLOCK IS\nNOT WORKING\n", MACHINE_PAGE); + diag_post_error ("CLOCK IS\nNOT WORKING\n", PAGE); } - /** * Stop the clock when entering test mode */ @@ -425,7 +574,6 @@ CALLSET_ENTRY (tz_clock, amode_stop, test_start) tz_clock_stop (); } - /** * Reset the clock to the home position at the start of * each ball. diff --git a/machine/tz/clockmillions.c b/machine/tz/clockmillions.c index abf22f132..2e3bf10fb 100644 --- a/machine/tz/clockmillions.c +++ b/machine/tz/clockmillions.c @@ -1,5 +1,5 @@ /* - * Copyright 2006, 2007, 2008, 2010 by Brian Dominy + * Copyright 2006, 2007, 2008 by Brian Dominy * * This file is part of FreeWPC. * @@ -22,7 +22,6 @@ #include - U8 clock_millions_mode_timer; U8 clock_mode_hits; score_t clock_mode_score; @@ -62,42 +61,114 @@ void clock_millions_mode_total_deff (void) void clock_millions_explode_deff (void) -{ - dmd_alloc_low_clean (); +{ + dmd_alloc_pair_clean (); + U16 fno; + sound_send (SND_GREED_MODE_BOOM); + for (fno = IMG_EXPLODE_START; fno <= IMG_EXPLODE_END; fno += 2) + { + dmd_map_overlay (); + dmd_clean_page_low (); + font_render_string_center (&font_fixed6, 64, 10, "CLOCK DESTROYED"); + font_render_string_center (&font_var5, 64, 21, "20 MILLION"); + dmd_text_outline (); + dmd_alloc_pair (); + frame_draw (fno); + dmd_overlay_outline (); + dmd_show2 (); + task_sleep (TIME_33MS); + } + dmd_alloc_pair_clean (); font_render_string_center (&font_fixed6, 64, 10, "CLOCK DESTROYED"); - font_render_string_center (&font_mono5, 64, 21, "20 MILLION"); - dmd_show_low (); + font_render_string_center (&font_var5, 64, 21, "20 MILLION"); + dmd_copy_low_to_high (); + dmd_show2 (); task_sleep_sec (2); deff_exit (); - } void clock_millions_hit_deff (void) -{ - dmd_alloc_low_clean (); +{ + U16 fno; + U16 img_start = 0; + U16 img_end = 0; + dmd_alloc_pair_clean (); + switch (random_scaled (3)) + { + case 0: + img_start = IMG_FLASH_START; + img_end = IMG_FLASH_END; + break; + case 1: + img_start = IMG_FLASHCENTRE_START; + img_end = IMG_FLASHCENTRE_END; + break; + case 2: + img_start = IMG_FLASHLEFT_START; + img_end = IMG_FLASHLEFT_END; + break; + } + + for (fno = img_start; fno < img_end; fno += 2) + { + U8 x = random_scaled (4); + U8 y = random_scaled (4); + dmd_map_overlay (); + dmd_clean_page_low (); + + psprintf ("CLOCK HIT %d TIME", "CLOCK HIT %d TIMES", clock_mode_hits); + font_render_string_center (&font_fixed6, 64 + x, 10 + y, sprintf_buffer); + sprintf_score (clock_mode_score); + font_render_string_center (&font_var5, 64, 21, sprintf_buffer); + + dmd_text_outline (); + dmd_alloc_pair (); + frame_draw (fno); + dmd_overlay_outline (); + dmd_show2 (); + task_sleep (TIME_33MS); + } + /* Redraw it so the 'HITS' text is centred */ + dmd_clean_page_low (); + dmd_clean_page_high (); + dmd_alloc_low (); psprintf ("CLOCK HIT %d TIME", "CLOCK HIT %d TIMES", clock_mode_hits); font_render_string_center (&font_fixed6, 64, 10, sprintf_buffer); sprintf_score (clock_mode_score); - font_render_string_center (&font_mono5, 64, 21, sprintf_buffer); - dmd_show_low (); + font_render_string_center (&font_var5, 64, 21, sprintf_buffer); + dmd_show_low (); task_sleep_sec (2); deff_exit (); } void clock_millions_mode_deff (void) { + //U16 fno; for (;;) { - dmd_alloc_low_clean (); - font_render_string_center (&font_var5, 64, 5, "CLOCK MILLIONS"); - sprintf_current_score (); - font_render_string_center (&font_fixed6, 64, 16, sprintf_buffer); - font_render_string_center (&font_var5, 64, 27, "SHOOT CLOCK"); - sprintf ("%d", clock_millions_mode_timer); - font_render_string (&font_var5, 2, 2, sprintf_buffer); - font_render_string_right (&font_var5, 126, 2, sprintf_buffer); - dmd_show_low (); - task_sleep (TIME_200MS); +// for (fno = IMG_CLOCK_START; fno <= IMG_CLOCK_END; fno += 2) +// { + dmd_alloc_pair_clean (); + // dmd_map_overlay (); + // dmd_clean_page_low (); + + font_render_string_center (&font_nayupixel10, 64, 5, "CLOCK MILLIONS"); + sprintf_current_score (); + font_render_string_center (&font_quadrit, 64, 16, sprintf_buffer); + psprintf ("SHOOT CLOCK 1 MORE TIME", "SHOOT CLOCK %d MORE TIMES", 6 - clock_mode_hits); + font_render_string_center (&font_var5, 64, 27, sprintf_buffer); + sprintf ("%d", clock_millions_mode_timer); + font_render_string (&font_var5, 2, 2, sprintf_buffer); + font_render_string_right (&font_var5, 126, 2, sprintf_buffer); + // dmd_text_outline (); + // dmd_alloc_pair (); + //frame_draw (fno); + dmd_copy_low_to_high (); + callset_invoke (score_overlay); + // dmd_overlay_outline (); + dmd_show2 (); + task_sleep (TIME_66MS); +// } } } @@ -123,14 +194,9 @@ CALLSET_ENTRY (clock_millions, sw_clock_target) score_add (clock_mode_score, score_table[SC_5M]); deff_start (DEFF_CLOCK_MILLIONS_HIT); } - } - else if (global_flag_test (GLOBAL_FLAG_CHAOSMB_RUNNING) - && chaosmb_hits_to_relight != 0) - { - /* Target was hit during ChaosMB */ - leff_start (LEFF_CLOCK_TARGET); - sound_send (SND_CLOCK_BELL); - score (SC_1M); + if (!global_flag_test (GLOBAL_FLAG_CHAOSMB_RUNNING)) + tz_clock_reverse_direction (); + tz_clock_set_speed (clock_mode_hits); } else if (!global_flag_test (GLOBAL_FLAG_CHAOSMB_RUNNING)) { @@ -138,11 +204,6 @@ CALLSET_ENTRY (clock_millions, sw_clock_target) score (SC_50K); sound_send (SND_NO_CREDITS); } - else - { - score (SC_50K); - sound_send (SND_NO_CREDITS); - } } void clock_millions_mode_init (void) @@ -150,16 +211,19 @@ void clock_millions_mode_init (void) clock_mode_hits = 0; score_zero (clock_mode_score); lamp_tristate_flash (LM_CLOCK_MILLIONS); + tz_clock_start_forward (); } void clock_millions_mode_expire (void) { - lamp_tristate_off (LM_CLOCK_MILLIONS); + if (clock_mode_hits <= 2) + callset_invoke (start_hurryup); } void clock_millions_mode_exit (void) { lamp_tristate_off (LM_CLOCK_MILLIONS); + tz_clock_reset (); } CALLSET_ENTRY (clock_millions, end_ball) diff --git a/machine/tz/clocktest.c b/machine/tz/clocktest.c index fbc759551..c6d5c9d90 100644 --- a/machine/tz/clocktest.c +++ b/machine/tz/clocktest.c @@ -1,5 +1,5 @@ /* - * Copyright 2006, 2007, 2008, 2010 by Brian Dominy + * Copyright 2006, 2007, 2008 by Brian Dominy * * This file is part of FreeWPC. * @@ -26,7 +26,10 @@ S8 clock_test_setting; U8 clock_can_run; - +extern U8 clock_minute_sw; +extern U8 clock_hour; +extern U8 clock_sw_seen_active; +extern U8 clock_sw_seen_inactive; void tz_clock_test_update (void) { @@ -36,10 +39,14 @@ void tz_clock_test_update (void) { switch (clock_test_setting) { - case -2: + case -3: clock_mech_set_speed (BIVAR_DUTY_100); tz_clock_start_backward (); break; + case -2: + clock_mech_set_speed (BIVAR_DUTY_50); + tz_clock_start_backward (); + break; case -1: clock_mech_set_speed (BIVAR_DUTY_25); tz_clock_start_backward (); @@ -52,6 +59,10 @@ void tz_clock_test_update (void) tz_clock_start_forward (); break; case 2: + clock_mech_set_speed (BIVAR_DUTY_50); + tz_clock_start_forward (); + break; + case 3: clock_mech_set_speed (BIVAR_DUTY_100); tz_clock_start_forward (); break; @@ -80,37 +91,44 @@ void tz_clock_test_draw (void) U8 minute; dmd_alloc_low_clean (); - font_render_string_center (&font_mono5, 64, 2, "CLOCK MECH. TEST"); + font_render_string_center (&font_var5, 64, 2, "CLOCK MECH. TEST"); switch (clock_test_setting) { - case -2: sprintf ("REV. FAST"); break; + case -3: sprintf ("REV. FAST"); break; + case -2: sprintf ("REV. MID"); break; case -1: sprintf ("REV. SLOW"); break; case 0: sprintf ("NO SPEED"); break; case 1: sprintf ("FWD. SLOW"); break; - case 2: sprintf ("FWD. FAST"); break; + case 2: sprintf ("FWD. MID"); break; + case 3: sprintf ("FWD. FAST"); break; } - font_render_string_center (&font_mono5, 32, 11, sprintf_buffer); + font_render_string_center (&font_var5, 32, 11, sprintf_buffer); - font_render_string_center (&font_mono5, 96, 11, + font_render_string_center (&font_var5, 96, 11, clock_can_run ? "RUNNING" : "STOPPED"); intervals = tz_clock_gettime (); hour = intervals / 4; minute = (intervals % 4 * 15); - sprintf ("%02d:%02d", hour, minute); - font_render_string_center (&font_mono5, 32, 18, sprintf_buffer); + //sprintf ("%02d:%02d", hour, minute); + sprintf ("MIN: %02X", clock_minute_sw); + font_render_string_center (&font_var5, 32, 18, sprintf_buffer); + sprintf ("HOUR: %d", clock_hour); + font_render_string_center (&font_var5, 32, 24, sprintf_buffer); sprintf ("SW.: %02X", clock_sw); - font_render_string_center (&font_mono5, 96, 18, sprintf_buffer); + font_render_string_center (&font_var5, 96, 18, sprintf_buffer); + sprintf ("ACTIVE: %02X", (clock_sw_seen_active & clock_sw_seen_inactive)); + font_render_string_center (&font_var5, 96, 24, sprintf_buffer); dmd_show_low (); } void tz_clock_test_down (void) { - if (clock_test_setting > -2) + if (clock_test_setting > -3) clock_test_setting--; tz_clock_test_update (); } @@ -118,7 +136,7 @@ void tz_clock_test_down (void) void tz_clock_test_up (void) { - if (clock_test_setting < 2) + if (clock_test_setting < 3) clock_test_setting++; tz_clock_test_update (); } @@ -131,6 +149,17 @@ void tz_clock_test_enter (void) tz_clock_test_update (); } +void tz_clock_test_start (void) +{ + //tz_clock_reset (); +} + +void tz_clock_test_right (void) +{ + /* Set as 12:00 */ + callset_invoke (clock_at_home); +} + void tz_clock_test_thread (void) { for (;;) @@ -146,8 +175,10 @@ struct window_ops tz_clock_test_window = { .draw = tz_clock_test_draw, .up = tz_clock_test_up, .down = tz_clock_test_down, + .right = tz_clock_test_right, .exit = tz_clock_stop, .enter = tz_clock_test_enter, + .start = tz_clock_test_start, .thread = tz_clock_test_thread, }; diff --git a/machine/tz/combo.c b/machine/tz/combo.c index 12aa28c87..805f404a4 100644 --- a/machine/tz/combo.c +++ b/machine/tz/combo.c @@ -25,7 +25,7 @@ * There's a few in loop.c * */ -/* CALLSET_SECTION (combo, __machine2__) */ +/* CALLSET_SECTION (combo, __machine3__) */ #include @@ -45,10 +45,17 @@ static void lucky_bounce (void) bounded_increment (lucky_bounces, 99); } -/* Left ramp, Right ramp, Piano combo */ +/* Left ramp, Right ramp, Piano combo and Left ramp, lock, camera combo */ CALLSET_ENTRY (combo, sw_left_ramp_exit) { event_can_follow (left_ramp, right_ramp, TIME_5S); + timer_restart_free (GID_L_RAMP_TO_LOCK, TIME_5S); +} + +CALLSET_ENTRY (combo, dev_lock_enter) +{ + if (task_find_or_kill_gid (GID_L_RAMP_TO_LOCK)) + timer_restart_free (GID_L_RAMP_TO_LOCK_TO_CAMERA, TIME_4S); } CALLSET_ENTRY (combo, sw_right_ramp) @@ -107,7 +114,7 @@ CALLSET_ENTRY (combo, sw_standup_7) CALLSET_ENTRY (combo, sw_piano) { //TODO Hack to remove piano.c - device_switch_can_follow (piano, slot, TIME_3S + TIME_500MS); + device_switch_can_follow (piano, slot, TIME_3S + TIME_200MS); if (event_did_follow (right_loop, piano)) { diff --git a/machine/tz/config.c b/machine/tz/config.c index 1784a308d..a13dfab46 100644 --- a/machine/tz/config.c +++ b/machine/tz/config.c @@ -19,6 +19,9 @@ */ #include +#ifdef __m6809__ +#include +#endif U8 balls_served; @@ -29,6 +32,24 @@ bool faster_quote_given; * Machine-specific miscellaneous functions. */ +static inline U8 decimal_to_bcd_byte (U8 decimal) +{ +#ifdef __m6809__ + U8 quot, rem; + DIV10 (decimal, quot, rem); + return (quot << 4) + rem; +#else + return ((decimal / 10) << 4) + (decimal % 10); +#endif +} + + +void replay_code_to_score (score_t s, U8 val) +{ + + s[1] = decimal_to_bcd_byte (val * 10); +} + CALLSET_ENTRY (tz, start_ball) { @@ -39,8 +60,11 @@ CALLSET_ENTRY (tz, start_ball) CALLSET_ENTRY (tz, add_player) { #ifdef CONFIG_TZONE_IP - if (num_players > 1) + if (num_players >= 1 && num_players <= 4) sound_send (SND_PLAYER_ONE + num_players - 1); + else + sound_send (SND_YOU_WANT_MORE); + #endif } @@ -102,7 +126,7 @@ CALLSET_ENTRY (config, start_ball) balls_served = 0; } -/* Reset the count so we can have a ballsave */ +/* Reset the count so we can have a ballsave on the next ball only */ CALLSET_ENTRY (config, mball_start) { balls_served = 1; @@ -113,3 +137,4 @@ CALLSET_ENTRY (config, serve_ball) { balls_served++; } + diff --git a/machine/tz/deadend.c b/machine/tz/deadend.c index 3529369e2..f389ddc1e 100644 --- a/machine/tz/deadend.c +++ b/machine/tz/deadend.c @@ -24,7 +24,6 @@ #include U8 dead_end_count; -extern __local__ U8 gumball_enable_count; extern void award_unlit_shot (U8 unlit_called_from); bool __local__ extra_ball_lit_from_deadend; @@ -32,8 +31,8 @@ void inlane_lights_dead_end_deff (void) { dmd_alloc_low_clean (); dmd_sched_transition (&trans_scroll_right); - font_render_string_center (&font_fixed6, 64, 6, "RIGHT INLANE"); - font_render_string_center (&font_fixed6, 64, 22, "LIGHTS DEAD END"); + font_render_string_center (&font_quadrit, 64, 10, "RIGHT INLANE"); + font_render_string_center (&font_quadrit, 64, 22, "LIGHTS DEAD END"); dmd_show_low (); task_sleep_sec (1); deff_exit (); @@ -43,27 +42,33 @@ void dead_end_deff (void) { dmd_alloc_low_clean(); sound_send (SND_DEAD_END_SCREECH); - dmd_sched_transition (&trans_scroll_right); - frame_draw (IMG_CAR); + dmd_sched_transition (&trans_scroll_left); + frame_draw (IMG_NEWCAR); dmd_show2 (); - task_sleep_sec (1); + dmd_alloc_pair_clean (); + U16 fno; sound_send (SND_DEAD_END_CRASH); + for (fno = IMG_EXPLODE_START; fno < IMG_EXPLODE_END; fno += 2) + { + dmd_map_overlay (); + dmd_clean_page_low (); + + U8 x = random_scaled (4); + U8 y = random_scaled (4); + psprintf ("1 DEAD END", "%d DEAD ENDS", dead_end_count); + font_render_string_center (&font_fireball, 64+x, 7+y, sprintf_buffer); - U8 i = 0; - do { - U8 x = random_scaled (4); - U8 y = random_scaled (4); - dmd_alloc_low_clean (); - psprintf ("1 DEAD END", "%d DEAD ENDS", dead_end_count); - font_render_string_center (&font_fixed6, 64+x, 7+y, sprintf_buffer); - dmd_show_low (); - task_sleep (TIME_33MS); - } while (i++ < 8); - - dmd_alloc_low_clean (); + dmd_text_outline (); + dmd_alloc_pair (); + frame_draw (fno); + dmd_overlay_outline (); + dmd_show2 (); + task_sleep (TIME_66MS); + } + + dmd_alloc_pair_clean (); psprintf ("1 DEAD END", "%d DEAD ENDS", dead_end_count); - font_render_string_center (&font_fixed6, 64, 7, sprintf_buffer); - dmd_show_low (); + font_render_string_center (&font_fireball, 64, 7, sprintf_buffer); if (extra_ball_lit_from_deadend == FALSE && can_award_extra_ball()) { @@ -87,9 +92,10 @@ void dead_end_deff (void) { sprintf (""); } - - font_render_string_center (&font_mono5, 64, 21, sprintf_buffer); - dmd_show_low (); + + font_render_string_center (&font_nayupixel10, 64, 21, sprintf_buffer); + dmd_copy_low_to_high (); + dmd_show2 (); task_sleep_sec (2); deff_exit (); } @@ -102,25 +108,27 @@ CALLSET_ENTRY (deadend, start_player) extra_ball_lit_from_deadend = TRUE; else extra_ball_lit_from_deadend = FALSE; -} - -CALLSET_ENTRY (deadend, start_ball) -{ dead_end_count = 0; - lamp_off (LM_DEAD_END); + lamp_on (LM_DEAD_END); } CALLSET_ENTRY (deadend, sw_dead_end) { - device_switch_can_follow (dead_end, slot, TIME_2S + TIME_500MS); - event_can_follow (dead_end, camera, TIME_2S); - event_can_follow (camera_or_piano, slot_prox, TIME_5S); +// device_switch_can_follow (dead_end, slot, TIME_2S + TIME_500MS); +// event_can_follow (dead_end, camera, TIME_2S); + timer_restart_free (GID_DEADEND_TO_SLOT, TIME_4S); + //event_can_follow (camera_or_piano, slot_prox, TIME_5S); if (lamp_test (LM_DEAD_END)) { - deff_start (DEFF_DEAD_END); + leff_start (LEFF_RIGHT_LOOP); dead_end_count++; - gumball_enable_count++; + deff_start_sync (DEFF_DEAD_END); + if (!flag_test (FLAG_SNAKE_READY) && single_ball_play ()) + { + flag_on (FLAG_SNAKE_READY); + deff_start_sync (DEFF_SNAKE_READY); + } switch (dead_end_count) { case 1: @@ -144,6 +152,7 @@ CALLSET_ENTRY (deadend, sw_dead_end) { score (SC_10M); } + dead_end_count = 0; break; default: score (SC_2M); diff --git a/machine/tz/deffs.c b/machine/tz/deffs.c index d4b2be5e4..505757148 100644 --- a/machine/tz/deffs.c +++ b/machine/tz/deffs.c @@ -1,5 +1,5 @@ /* - * Copyright 2006, 2007, 2008, 2010 by Brian Dominy + * Copyright 2006-2011 by Brian Dominy * * This file is part of FreeWPC. * @@ -20,20 +20,19 @@ #include -extern struct timed_mode_ops hitch_mode; void cow_deff (void) { - dmd_alloc_pair (); - frame_draw (IMG_COW); + dmd_alloc_pair_clean (); +// frame_draw (IMG_COW); font_render_string_center (&font_var5, 40, 11, "THE POWER"); font_render_string_center (&font_var5, 40, 22, "SAYS ..."); dmd_show2 (); task_sleep_sec (2); sound_send (SND_POWER_GRUNT_1); - dmd_alloc_pair (); - frame_draw (IMG_COW); + dmd_alloc_pair_clean (); +// frame_draw (IMG_COW); font_render_string_center (&font_fixed6, 40, 11, "MOO"); dmd_show2 (); task_sleep_sec (4); @@ -44,7 +43,7 @@ void flash_and_exit_deff (U8 flash_count, task_ticks_t flash_delay) { dmd_alloc_pair (); dmd_clean_page_low (); - font_render_string_center (&font_fixed10, 64, 16, sprintf_buffer); + font_render_string_center (&font_fipps, 64, 16, sprintf_buffer); dmd_show_low (); dmd_copy_low_to_high (); dmd_invert_page (dmd_low_buffer); @@ -56,7 +55,7 @@ void flash_small_deff (U8 flash_count, task_ticks_t flash_delay) { dmd_alloc_pair (); dmd_clean_page_low (); - font_render_string_center (&font_fixed6, 64, 16, sprintf_buffer); + font_render_string_center (&font_quadrit, 64, 16, sprintf_buffer); dmd_show_low (); dmd_copy_low_to_high (); dmd_invert_page (dmd_low_buffer); @@ -72,7 +71,7 @@ void extra_ball_deff (void) dmd_alloc_pair (); frame_draw (fno); dmd_show2 (); - task_sleep (TIME_66MS); + task_sleep (TIME_33MS); } task_sleep_sec (2); deff_exit (); @@ -105,6 +104,12 @@ void printf_thousands (U8 n) sprintf ("%d,000", n); } +void anti_cradle_deff (void) +{ + sprintf ("ANTICRADLE"); + flash_and_exit_deff (20, TIME_66MS); +} + void replay_deff (void) { sprintf ("REPLAY"); @@ -120,6 +125,7 @@ void special_deff (void) void pb_jackpot_deff (void) { + sound_send (SND_POWERBALL_QUOTE); sprintf ("PB JACKPOT"); flash_and_exit_deff (20, TIME_100MS); } @@ -130,16 +136,6 @@ void two_way_combo_deff (void) flash_and_exit_deff (15, TIME_66MS); } -void shoot_camera_deff (void) -{ - sound_send (SND_TWILIGHT_ZONE_SHORT_SOUND); - if (timed_mode_running_p (&hitch_mode)) - sprintf ("SHOOT HITCH"); - else - sprintf ("SHOOT CAMERA"); - flash_and_exit_deff (15, TIME_66MS); -} - void shoot_jackpot_deff (void) { if (!global_flag_test (GLOBAL_FLAG_MB_JACKPOT_LIT)) @@ -160,6 +156,8 @@ void home_and_dry_deff (void) void in_the_lead_deff (void) { + if (in_bonus) + return; sound_send (SND_GO_FOR_THE_HILL); sprintf ("IN THE LEAD"); flash_small_deff (15, TIME_33MS); @@ -197,9 +195,9 @@ void ball_from_lock_deff (void) void button_masher_deff (void) { sprintf ("IS MIKE PLAYING"); - flash_small_deff (10, TIME_66MS); - sprintf ("BUTTON MASHER"); flash_small_deff (20, TIME_33MS); + sprintf ("BUTTON MASHER"); + flash_small_deff (10, TIME_66MS); deff_exit (); } @@ -218,32 +216,48 @@ void three_way_combo_deff (void) flash_and_exit_deff (20, TIME_66MS); } +void shoot_right_loop_deff (void) +{ + dmd_alloc_pair (); + dmd_clean_page_low (); + font_render_string_center (&font_fireball, 64, 9, "SHOOT THE"); + font_render_string_center (&font_fireball, 64, 24, "RIGHT LOOP"); + dmd_show_low (); + dmd_copy_low_to_high (); + dmd_invert_page (dmd_low_buffer); + deff_swap_low_high (25, TIME_100MS); + deff_exit (); +} + /* Jackpot animation contributed by highrise */ void jackpot_deff (void) { U16 fno; U8 i; sample_start (SND_JACKPOT_BACKGROUND, SL_1S); - /* Loop the start if the animation 3 times */ + /* Loop the start of the animation 3 times */ for (i = 3; i > 0; --i) { - for (fno = IMG_JACKPOT_START; fno <= IMG_JACKPOT_END - 9; fno += 1) + for (fno = IMG_JACKPOT_START; fno <= IMG_JACKPOT_END - 9; fno += 2) { //dmd_alloc_low_high (); dmd_alloc_pair (); frame_draw (fno); dmd_show2 (); - task_sleep (i); + if (i == 3) + task_sleep (TIME_100MS); + else + task_sleep (TIME_66MS); } } /* Show once fully */ - for (fno = IMG_JACKPOT_START; fno <= IMG_JACKPOT_END - 2; fno += 1) + for (fno = IMG_JACKPOT_START; fno <= IMG_JACKPOT_END - 2; fno += 2) { //dmd_alloc_low_high (); dmd_alloc_pair (); frame_draw (fno); dmd_show2 (); - task_sleep (TIME_16MS); + task_sleep (TIME_66MS); } /* Flash Jackpot */ dmd_alloc_pair (); @@ -272,111 +286,6 @@ void jackpot_deff (void) sound_send (SND_FIST_BOOM2); deff_exit (); } - -U16 tv_static_data[] = { - 0x4964UL, 0x3561UL, 0x2957UL, 0x1865UL, - 0x8643UL, 0x8583UL, 0x18C9UL, 0x9438UL, - 0x2391UL, 0x1684UL, 0x6593UL, -}; - -void tv_static_deff (void) -{ - U8 loop; - register U16 *dmd; - U8 r; - - for (loop = 0; loop < 32; loop++) - { - dmd_alloc_pair (); - dmd = (U16 *)dmd_low_buffer; - while (dmd < (U16 *)dmd_high_buffer) - { - r = random_scaled (11); - *dmd++ = tv_static_data[r++]; - *dmd++ = tv_static_data[r++]; - } - - dmd = (U16 *)dmd_high_buffer; - while (dmd < ((U16 *)(dmd_high_buffer + DMD_PAGE_SIZE))) - { - r = random_scaled (11); - *dmd++ = tv_static_data[r++]; - *dmd++ = tv_static_data[r++]; - } - dmd_show2 (); - task_sleep (TIME_66MS); - } - deff_exit (); -} - - -void text_color_flash_deff (void) -{ - U8 count = 8; - - dmd_alloc_pair_clean (); - font_render_string_center (&font_fixed10, 64, 9, "QUICK"); - font_render_string_center (&font_fixed10, 64, 22, "MULTIBALL"); - - /* low = text, high = blank */ - while (--count > 0) - { - dmd_show2 (); - task_sleep (TIME_100MS); - - dmd_flip_low_high (); - dmd_show2 (); - task_sleep (TIME_100MS); - - dmd_show_high (); - task_sleep (TIME_200MS); - - dmd_show2 (); - task_sleep (TIME_100MS); - dmd_flip_low_high (); - } - - deff_exit (); -} - - -void spell_test_deff (void) -{ - U8 count = 4; - dmd_alloc_pair (); - dmd_clean_page_low (); - sprintf ("%*s", count, "FASTLOCK"); - font_render_string_left (&font_fixed10, 16, 9, sprintf_buffer); - dmd_flip_low_high (); - dmd_clean_page_low (); - font_render_string_left (&font_fixed10, 16, 9, "FASTLOCK"); - dmd_flip_low_high (); - dmd_show2 (); - task_sleep_sec (3); - deff_exit (); -} - - -void two_color_flash_deff (void) -{ - U8 n; - - dmd_alloc_pair_clean (); - font_render_string_center (&font_fixed6, 64, 21, "BRIGHT"); - dmd_copy_low_to_high (); - font_render_string_center (&font_fixed6, 64, 9, "DARK"); - - for (n = 0; n < 5; n++) - { - dmd_show2 (); - task_sleep (TIME_300MS); - dmd_show_high (); - task_sleep (TIME_300MS); - } - deff_exit (); -} - - void bg_flash_deff (void) { const U8 flash_time = TIME_50MS; @@ -410,9 +319,8 @@ void ball_drain_outlane_deff (void) dmd_alloc_pair (); frame_draw (fno); dmd_show2 (); - task_sleep (TIME_66MS); + task_sleep (TIME_33MS); } - dmd_sched_transition (&trans_scroll_down_fast); deff_exit (); } @@ -420,26 +328,28 @@ void ball_explode_deff (void) { U16 fno; extern bool powerball_death; - if (!multi_ball_play () && !ballsave_test_active ()) - music_request (MUS_POWERFIELD, PRI_GAME_MODE1); - + + dmd_sched_transition (&trans_scroll_down_fast); dmd_alloc_pair_clean (); + callset_invoke (score_overlay); dmd_show2 (); - task_sleep (TIME_200MS); dmd_sched_transition (&trans_scroll_down_fast); - dmd_alloc_pair (); - frame_draw (IMG_BALLEXPLODE_START); - dmd_show2 (); if (powerball_death == FALSE) sound_send (SND_EXPLOSION_3); - for (fno = IMG_BALLEXPLODE_START + 1; fno <= IMG_BALLEXPLODE_END; fno += 2) + for (fno = IMG_BALLEXPLODE_START; fno < IMG_BALLEXPLODE_END; fno += 2) { dmd_alloc_pair (); frame_draw (fno); + callset_invoke (score_overlay); dmd_show2 (); task_sleep (TIME_66MS); } + /* Show a blank frame */ + dmd_alloc_pair_clean (); + callset_invoke (score_overlay); + dmd_show2 (); + task_sleep (TIME_66MS); /* Play in reverse if ballsave is active */ if (ballsave_test_active ()) { @@ -448,9 +358,24 @@ void ball_explode_deff (void) { dmd_alloc_pair (); frame_draw (fno); + callset_invoke (score_overlay); dmd_show2 (); task_sleep (TIME_66MS); } + if (random_scaled (3) == 1) + sprintf ("TRY HARDER"); + else + sprintf ("WHOOPSY DAISY"); + flash_small_deff (15, TIME_66MS); + + } + /* This should stop the scores from showing just before the bonus screen */ + for (fno = 0; fno < 5; fno++) + { + dmd_alloc_pair_clean (); + callset_invoke (score_overlay); + dmd_show2 (); + task_sleep (TIME_100MS); } deff_exit (); } diff --git a/machine/tz/door.c b/machine/tz/door.c index bef55045b..aa684f1eb 100644 --- a/machine/tz/door.c +++ b/machine/tz/door.c @@ -1,5 +1,5 @@ /* - * Copyright 2006, 2007, 2008, 2009, 2010 by Brian Dominy + * Copyright 2006, 2007, 2008, 2009 by Brian Dominy * * This file is part of FreeWPC. * @@ -31,31 +31,53 @@ extern __local__ U8 extra_ball_enable_count; extern U8 unlit_shot_count; //bool door_awarded_from_slot; U8 door_active_lamp; - /** Total number of door panels, not counting the handle */ #define NUM_DOOR_PANELS 14 #define BTTZ_DOOR_INDEX NUM_DOOR_PANELS /** Names of all the door panels, in order */ -const char *door_panel_names[] = { - "TOWNSQUARE MADNESS", - "LIGHT EXTRA BALL", - "SUPER SLOT", - "CLOCK MILLIONS", - "THE SPIRAL", - "BATTLE THE POWER", +const char *door_panel_names_line1[] = { + "TOWNSQUARE", + "EXTRA BALL", + "SUPER", + "CLOCK", + "SPIRAL", + "BATTLE THE", "10 MILLION", "GREED", - "THE CAMERA", + "CAMERA", "HITCHHIKER", "CLOCK CHAOS", - "SUPER SKILL MB", - "FAST LOCK", - "LIGHT GUMBALL", - "BACK TO THE ZONE", + "SUPER SKILL", + "FASTLOCK", + "GUMBALL", + "BACK TO", +}; +const char *door_panel_names_line2[] = { + "MADNESS", + "LIT", + "SLOT MACHINE", + "MILLIONS", + "ROUND", + "POWER", + "POINTS", + "ROUND", + "LIT", + "ROUND", + "MULTIBALL", + "MULTIBALL", + "ROUND", + "LIT", + "THE ZONE", }; +static void door_award_draw_text (U8 award) +{ + font_render_string_left (&font_nayupixel10, 3, 3, door_panel_names_line1[award]); + font_render_string_left (&font_nayupixel10, 3, 16, door_panel_names_line2[award]); +} + const char *door_award_goals[] = { "JET BUMPERS", "LOCK LANE", @@ -66,7 +88,7 @@ const char *door_award_goals[] = { "ANYTHING", "YELLOW TARGETS", "THE CAMERA", - "BELOW THE CAMERA", + "THE HITCHHIKER", "CLOCK TARGET", "LEFT RAMP", "LOCK LANE", @@ -108,7 +130,7 @@ extern inline U8 door_get_flashing_lamp (void) return door_get_lamp (door_index); } -static inline bool can_award_door_panel (void) +inline bool can_award_door_panel (void) { /* Panels not awarded during any multiball */ if (multi_ball_play () || global_flag_test (GLOBAL_FLAG_BTTZ_RUNNING)) @@ -125,7 +147,7 @@ static inline void door_set_flashing (U8 id) } -static inline void door_advance_flashing (void) +void door_advance_flashing (void) { U8 new_door_index; @@ -168,12 +190,10 @@ void slot_animation_sound_task (void) task_exit (); } -void door_award_deff (void) +static void door_award_sound_task (U8 award) { - U8 index = door_index_awarded; - U16 fno; - - switch (door_index_awarded) + sound_send (SND_NEXT_CAMERA_AWARD_SHOWN); + switch (award) { case 0: sound_send (SND_THERE_IS_MADNESS); @@ -233,121 +253,65 @@ void door_award_deff (void) sound_send (SND_YOU_HAVE_COME_TO_THE_END); break; } - sound_send (SND_NEXT_CAMERA_AWARD_SHOWN); + +} + +void door_award_deff (void) +{ + U8 index = door_index_awarded; + U16 fno; + door_award_sound_task (door_index_awarded); /* Play once normally */ + dmd_alloc_pair_clean (); for (fno = IMG_DOOR_START; fno <= IMG_DOOR_END; fno += 2) { + dmd_map_overlay (); + dmd_clean_page_low (); + door_award_draw_text (door_index_awarded); + dmd_text_outline (); dmd_alloc_pair (); frame_draw (fno); - /* Flip it, as text is drawn to the low page */ - dmd_flip_low_high (); - //draw_door_award_text (); - switch (door_index_awarded) - { - case 0: - font_render_string_left (&font_mono5, 3, 3, "TOWNSQUARE"); - font_render_string_left (&font_mono5, 3, 16, "MADNESS"); - break; - case 1: - font_render_string_left (&font_mono5, 3, 3, "EXTRA BALL"); - font_render_string_left (&font_mono5, 3, 16, "LIT"); - break; - - case 2: - font_render_string_left (&font_mono5, 3, 3, "SUPER"); - font_render_string_left (&font_mono5, 3, 16, "SLOT MACHINE"); - break; - - case 3: - font_render_string_left (&font_mono5, 3, 3, "CLOCK"); - font_render_string_left (&font_mono5, 3, 16, "MILLIONS"); - break; - - case 4: - font_render_string_left (&font_mono5, 3, 3, "SPIRAL"); - font_render_string_left (&font_mono5, 3, 16, "ROUND"); - break; - case 5: - font_render_string_left (&font_mono5, 3, 3, "BATTLE THE"); - font_render_string_left (&font_mono5, 3, 16, "POWER"); - break; - - case 6: - font_render_string_left (&font_mono5, 3, 3, "10 MILLION"); - font_render_string_left (&font_mono5, 3, 16, "POINTS"); - break; - - case 7: - font_render_string_left (&font_mono5, 3, 3, "GREED"); - font_render_string_left (&font_mono5, 3, 16, "ROUND"); - break; - - case 8: - font_render_string_left (&font_mono5, 3, 3, "CAMERA"); - font_render_string_left (&font_mono5, 3, 16, "LIT"); - break; - - case 9: - font_render_string_left (&font_mono5, 3, 3, "HITCHHIKER"); - font_render_string_left (&font_mono5, 3, 16, "ROUND"); - break; - - case 10: - font_render_string_left (&font_mono5, 3, 3, "CLOCK CHAOS"); - font_render_string_left (&font_mono5, 3, 16, "MULTIBALL"); - break; - - case 11: - font_render_string_left (&font_mono5, 3, 3, "SUPER SKILL"); - font_render_string_left (&font_mono5, 3, 16, "MULTIBALL"); - break; - - case 12: - font_render_string_left (&font_mono5, 3, 3, "FASTLOCK"); - font_render_string_left (&font_mono5, 3, 16, "ROUND"); - break; - - case 13: - font_render_string_left (&font_mono5, 3, 3, "GUMBALL"); - font_render_string_left (&font_mono5, 3, 16, "LIT"); - break; - - case 14: - font_render_string_left (&font_mono5, 3, 3, "BACK TO"); - font_render_string_left (&font_mono5, 3, 16, "THE ZONE"); - break; - - } - /* Flip it again so text is now on high page */ - dmd_flip_low_high (); + dmd_overlay_outline (); dmd_show2 (); - task_sleep (TIME_66MS); + task_sleep (TIME_33MS); } task_sleep_sec (1); /* Play backwards */ sound_send (SND_SPIRAL_EB_LIT); + bool on = TRUE; + dmd_alloc_pair_clean (); for (fno = IMG_DOOR_END; fno >= IMG_DOOR_START; fno -= 2) { - dmd_alloc_pair (); - /* Draw the frame, leave it blank at the end */ - if (fno == IMG_DOOR_START) + dmd_map_overlay (); + dmd_clean_page_low (); + font_render_string_center (&font_fireball, 48, 9, "SHOOT"); + if (on) { - dmd_clean_page_low (); - dmd_clean_page_high (); + font_render_string_center (&font_nayupixel10, 48, 22, door_award_goals[index]); + on = FALSE; } else - frame_draw (fno); - - /* Flip it, as text is drawn to the low page */ - dmd_flip_low_high (); - font_render_string_center (&font_fixed6, 48, 9, "SHOOT"); - font_render_string_center (&font_var5, 48, 22, door_award_goals[index]); - /* Flip it again so text is now on high page */ - dmd_flip_low_high (); + on = TRUE; + + dmd_text_outline (); + dmd_alloc_pair (); + frame_draw (fno); + dmd_overlay_outline (); dmd_show2 (); - task_sleep (TIME_66MS); + task_sleep (TIME_33MS); + } + timer_restart_free (GID_DOOR_DEFF, TIME_2S); + while (task_find_gid (GID_DOOR_DEFF)) + { + dmd_alloc_pair_clean (); + font_render_string_center (&font_fireball, 48, 9, "SHOOT"); + font_render_string_center (&font_nayupixel10, 48, 22, door_award_goals[index]); + dmd_copy_low_to_high (); + callset_invoke (score_overlay); + dmd_show2 (); + + task_sleep (TIME_100MS); } - task_sleep_sec (2); deff_exit (); } @@ -393,13 +357,13 @@ void award_door_panel_task (void) task_kill_gid (GID_DOOR_AWARD_ROTATE); /* Store the current door index */ door_index_awarded = door_index; - /* Start the event and show deff */ - deff_start (DEFF_DOOR_AWARD); - door_start_event (door_index); /* Find and turn on the current flashing lamp */ door_active_lamp = door_get_flashing_lamp (); lamp_tristate_on (door_active_lamp); + /* Start the event and show deff */ + deff_start (DEFF_DOOR_AWARD); leff_start (LEFF_DOOR_STROBE); + door_start_event (door_index); score (SC_5M); timed_game_extend (10); @@ -429,48 +393,20 @@ void award_door_panel_task (void) task_exit (); } -CALLSET_ENTRY(door, sw_piano) +CALLSET_ENTRY (door, chaosmb_stop, sssmb_stop) { - if (can_award_door_panel () && flag_test (FLAG_PIANO_DOOR_LIT)) - { - flag_off (FLAG_PIANO_DOOR_LIT); - flag_on (FLAG_SLOT_DOOR_LIT); - //callset_invoke (award_door_panel); - task_create_anon (award_door_panel_task); - } - else - { - /* Relight the piano if it was unlit when hit */ - if ( feature_config.easy_light_door_panels == YES - && door_panels_started < 8) - { - flag_on (FLAG_PIANO_DOOR_LIT); - } - award_unlit_shot (SW_PIANO); - score (SC_5130); - sound_send (SND_ODD_CHANGE_BEGIN); - } + door_award_enable (); } -CALLSET_ENTRY (door, shot_slot_machine) +/* Relight the piano if it was unlit when hit */ +bool check_relight_slot_or_piano (void) { - if (can_award_door_panel () && flag_test (FLAG_SLOT_DOOR_LIT)) - { - flag_off (FLAG_SLOT_DOOR_LIT); - flag_on (FLAG_PIANO_DOOR_LIT); - callset_invoke (award_door_panel); - } + if ( feature_config.easy_lite_door == YES + && door_panels_started < 8 + && single_ball_play ()) + return TRUE; else - { - /* Relight the slot if it was unlit when hit */ - if ( feature_config.easy_light_door_panels == YES - && door_panels_started < 8) - { - flag_on (FLAG_SLOT_DOOR_LIT); - } - award_unlit_shot (SW_SLOT); - score (SC_5130); - } + return FALSE; } CALLSET_ENTRY (door, door_start_eb) @@ -487,7 +423,8 @@ CALLSET_ENTRY(door, start_player) flag_on (FLAG_PIANO_DOOR_LIT); flag_on (FLAG_SLOT_DOOR_LIT); - if (system_config.max_ebs == 0) + /* Light the eb door panel if eb's are disabled */ + if (!can_award_extra_ball ()) { lamp_on (LM_PANEL_EB); door_panels_started++; @@ -501,13 +438,13 @@ CALLSET_ENTRY(door, start_ball) door_award_enable (); } -CALLSET_ENTRY(door, machine_paused) +CALLSET_ENTRY(door, machine_paused, stop_door_rotate) { /* Stop the door lamps rotating */ task_kill_gid (GID_DOOR_AWARD_ROTATE); } -CALLSET_ENTRY(door, machine_unpaused) +CALLSET_ENTRY(door, machine_unpaused, start_door_rotate) { /* Start the door lamps rotating again */ door_award_enable (); diff --git a/machine/tz/factoids.c b/machine/tz/factoids.c index c3f9f8e7e..5ef0ec55a 100644 --- a/machine/tz/factoids.c +++ b/machine/tz/factoids.c @@ -21,7 +21,9 @@ /* CALLSET_SECTION (factoids, __machine3__) */ #include -#define NUM_FACTOIDS 20 +#include + +#define NUM_FACTOIDS 22 const struct { const char *line1; @@ -36,7 +38,7 @@ const struct { { "THE SLOT MACHINE", "ON THE PLAYFIELD", "IS FROM THE EPISODE", "THE FEVER" }, { "THE PLAYER PIANO", "ON THE PLAYFIELD", "IS FROM THE EPISODE", "A PIANO IN THE HOUSE" }, { "THE CAMERA", "ON THE PLAYFIELD", "IS FROM THE EPISODE", "A MOST UNUSUAL CAMERA" }, - { "WILLIAMS MANUFACTURED", "15,235 UNITS OF TWILIGHT ZONE", "COMPARED TO 20,270 UNITS", "FOR THE ADDAMS FAMILY" }, + { "WILLIAMS MANUFACTURED", "15,235 UNITS OF TWILIGHT ZONE", "COMPARED TO 20,270 UNITS", "OF THE ADDAMS FAMILY" }, { "FREEWPC DEVELOPMENT", "STARTED IN 2005 AND THE", "FIRST HARDWARE TEST", "WAS IN OCTOBER 2008" }, { "FREEWPC WAS ORIGINALLY", "100% ASSEMBLY LANGUAGE", "IT IS NOW 90% C", "6% PERL AND 4% ASM"}, { "GOTTLIEB'S HUMPTY DUMPTY", "MANUFACTURED IN 1947 WAS", "THE FIRST TABLE TO HAVE", "ELECTRIC FLIPPERS" }, @@ -49,7 +51,9 @@ const struct { { "DOLPHINS SLEEP", "WITH ONE EYE OPEN", "", "" }, { "TWELVE OR MORE COWS", "ARE KNOWN AS", "A FLINK" }, { "THE MAN FEATURED BY", "THE UPPER RIGHT FLIPPER", "IS BURGESS MEREDITH FROM", "THE ROCKY FILMS" }, -}; + { "FRANK MILLER STARTED", "HIS CAREER WORKING ON", "THE TWILIGHT ZONE", "COMIC BOOKS" }, + { "GBVQV", "AN FV", "XHEGFRG", "" }, + }; static void factoid_msg (U8 factoid) { @@ -64,11 +68,28 @@ void show_random_factoid (void) dmd_map_overlay (); dmd_clean_page_high (); dmd_clean_page_low (); - font_render_string_center (&font_fixed6, 64, 10, "RANDOM FACTOID"); + font_render_string_center (&font_bitoutline, 64, 8, "RANDOM"); + font_render_string_center (&font_bitoutline, 64, 20, "FACTOID"); show_text_on_stars (); - dmd_alloc_pair_clean (); + dmd_alloc_low_clean (); factoid_msg(random_scaled(NUM_FACTOIDS)); - dmd_show2 (); - task_sleep_sec (6); + dmd_show_low (); + amode_sleep_sec (6); } + +void random_factoid_deff (void) +{ + U8 i; + for (i = 0; i < NUM_FACTOIDS; i++) + { + dmd_alloc_pair_clean (); + factoid_msg(i); + dmd_copy_low_to_high (); + dmd_show2 (); + task_sleep_sec (6); + dmd_sched_transition (&trans_scroll_up_slower); + } + deff_exit (); +} + diff --git a/machine/tz/fastlock.c b/machine/tz/fastlock.c index ad81b47a8..c8b3bf168 100644 --- a/machine/tz/fastlock.c +++ b/machine/tz/fastlock.c @@ -25,6 +25,7 @@ U8 fastlock_award; /* Stored for Deff */ U8 fastlock_award_stored; U8 fastlocks_collected; +U8 display_loop_time; void fastlock_mode_init (void); void fastlock_mode_exit (void); @@ -44,41 +45,73 @@ struct timed_mode_ops fastlock_mode = { .grace_timer = 3, .pause = system_timer_pause, }; - + +/* Fudge loop time in ms into + * something semi-meaningful to display */ +static inline void calc_display_loop_time (void) +{ + display_loop_time = 100; + display_loop_time -= loop_time; + if (display_loop_time < 1) + display_loop_time = 1; +} + + void fastlock_mode_deff (void) { + U16 fno; + for (;;) { - /* Fudge loop time in ms into - * something semi-meaningful to display */ - U8 display_loop_time; - display_loop_time = 100; - display_loop_time -= loop_time; - if (display_loop_time < 1) - display_loop_time = 1; - - dmd_alloc_low_clean (); - font_render_string_center (&font_var5, 64, 5, "SHOOT FAST LOOPS"); - sprintf("%d MILLION", fastlock_award); - font_render_string_center (&font_fixed6, 64, 16, sprintf_buffer); - sprintf ("LAST LOOP WAS %dMPH", display_loop_time); - font_render_string_center (&font_var5, 64, 27, sprintf_buffer); - sprintf ("%d", fastlock_mode_timer); - font_render_string (&font_var5, 2, 2, sprintf_buffer); - font_render_string_right (&font_var5, 126, 2, sprintf_buffer); - dmd_show_low (); - task_sleep (TIME_200MS); + for (fno = IMG_FASTLOCK_START; fno <= IMG_FASTLOCK_END; fno += 2) + { + dmd_alloc_pair_clean (); + dmd_map_overlay (); + dmd_clean_page_low (); + font_render_string_center (&font_var5, 64, 5, "FASTLOOPS BUILD JACKPOT"); + if (timer_find_gid (GID_FASTLOCK_LOOP_AWARDED)) + { + calc_display_loop_time (); + sprintf ("%d MPH", display_loop_time); + font_render_string_center (&font_fixed6, 64, 16, sprintf_buffer); + font_render_string_center (&font_var5, 64, 27, "LAST LOOP"); + } + else + { + sprintf("%d MILLION", fastlock_award); + font_render_string_center (&font_fixed6, 64, 16, sprintf_buffer); + font_render_string_center (&font_var5, 64, 27, "SHOOT LOCK TO COLLECT"); + } + sprintf ("%d", fastlock_mode_timer); + font_render_string (&font_var5, 2, 16, sprintf_buffer); + font_render_string_right (&font_var5, 126, 16, sprintf_buffer); + dmd_text_outline (); + + dmd_alloc_pair (); + frame_draw (fno); + callset_invoke (score_overlay); + dmd_overlay_outline (); + dmd_show2 (); + task_sleep (TIME_66MS); + } } } void fastlock_award_deff (void) { - dmd_alloc_low_clean (); - font_render_string_center (&font_var5, 64, 5, "JACKPOT"); - sprintf("%d MILLION", fastlock_award_stored); - font_render_string_center (&font_fixed6, 64, 16, sprintf_buffer); - dmd_show_low (); - task_sleep_sec (2); + timer_restart_free (GID_FASTLOCK_DEFF, TIME_5S); + while (task_find_gid (GID_FASTLOCK_DEFF)) + { + dmd_alloc_pair_clean (); + callset_invoke (score_overlay); + font_render_string_center (&font_bitoutline, 64, 3, "FASTLOCK"); + sprintf("%d MILLION", fastlock_award_stored); + font_render_string_center (&font_quadrit, 64, 24, sprintf_buffer); + dmd_copy_low_to_high (); + font_render_string_center (&font_fireball, 64, 10, "JACKPOT"); + dmd_show2 (); + task_sleep (TIME_100MS); + } deff_exit (); } @@ -89,6 +122,12 @@ void fastlock_mode_init (void) magnet_reset (); } +void fastlock_mode_expire (void) +{ + if (fastlocks_collected == 1) + callset_invoke (start_hurryup); +} + void fastlock_mode_exit (void) { lamp_off (LM_LOCK_ARROW); @@ -102,17 +141,21 @@ bool fastlock_running (void) return FALSE; } -CALLSET_ENTRY (fastlock, fastlock_lock_entered) +void fastlock_award_task (void) +{ + fastlock_award_stored = fastlock_award; + deff_start_sync (DEFF_FASTLOCK_AWARD); + score_multiple (SC_1M, fastlock_award); + fastlocks_collected++; + fastlock_award = (fastlocks_collected * 5); + timed_mode_add (&fastlock_mode, 20); + task_exit (); +} + +void fastlock_lock_entered (void) { if (fastlock_running ()) - { - deff_start (DEFF_FASTLOCK_AWARD); - fastlock_award_stored = fastlock_award; - score_multiple (SC_1M, fastlock_award); - fastlocks_collected++; - fastlock_award = (fastlocks_collected * 5); - fastlock_mode_timer =+ 10; - } + task_create_anon (fastlock_award_task); } void fastlock_loop_completed (void) diff --git a/machine/tz/greed.c b/machine/tz/greed.c index 9034a778a..3202c7666 100644 --- a/machine/tz/greed.c +++ b/machine/tz/greed.c @@ -19,7 +19,10 @@ */ /* TODO Change so hitting standups increases jackpot * jackpot is collected by hitting slot machine - * Suggested by litz */ + * Suggested by litz + * + * Hitting green clock target shifts the lit lamps one step to the left and wraps + * */ /* CALLSET_SECTION (greed, __machine3__) */ #include @@ -60,26 +63,49 @@ struct timed_mode_ops greed_mode = { .deff_running = DEFF_GREED_MODE, .deff_ending = DEFF_GREED_MODE_TOTAL, .prio = PRI_GAME_MODE2, - .init_timer = 20, + .init_timer = 40, .timer = &greed_mode_timer, .grace_timer = 3, .pause = system_timer_pause, }; +/* Note: The oddchange_deff handles the hits during greed mode */ void greed_mode_deff (void) { + dmd_alloc_pair_clean (); + U16 fno; for (;;) { - dmd_alloc_low_clean (); - font_render_string_center (&font_fixed6, 64, 5, "GREED"); - sprintf_current_score (); - font_render_string_center (&font_fixed6, 64, 16, sprintf_buffer); - font_render_string_center (&font_var5, 64, 27, "SHOOT FLASHING STANDUPS"); - sprintf ("%d", greed_mode_timer); - font_render_string (&font_var5, 2, 2, sprintf_buffer); - font_render_string_right (&font_var5, 126, 2, sprintf_buffer); - dmd_show_low (); - task_sleep (TIME_200MS); + U8 i = 0; + for (fno = IMG_GREED_START; fno <= IMG_GREED_END; fno += 2) + { + dmd_map_overlay (); + dmd_clean_page_low (); + font_render_string_center (&font_fixed6, 64, 5, "GREED"); + i++; + if (i > 1) + { + sprintf_score (greed_mode_total); + font_render_string_center (&font_fixed6, 64, 16, sprintf_buffer); + } + + if (i > 2) + { + i = 0; + } + + font_render_string_center (&font_var5, 64, 27, "SHOOT FLASHING STANDUPS"); + sprintf ("%d", greed_mode_timer); + font_render_string (&font_var5, 2, 2, sprintf_buffer); + font_render_string_right (&font_var5, 126, 2, sprintf_buffer); + dmd_text_outline (); + dmd_alloc_pair (); + frame_draw (fno); + callset_invoke (score_overlay); + dmd_overlay_outline (); + dmd_show2 (); + task_sleep (TIME_66MS); + } } } @@ -96,6 +122,22 @@ void greed_mode_total_deff (void) deff_exit (); } +/* Award 500K for a clock hit during Greed and cycle lamps */ + +static inline void rotate_greed_lamps (void) +{ + greed_set = (greed_set >> 1) | (greed_set << (7 - 1)); +} + +CALLSET_ENTRY (greed, sw_clock_target) +{ + if (timed_mode_running_p (&greed_mode)) + { + score_add (greed_mode_total, score_table[SC_500K]); + rotate_greed_lamps (); + } +} + void standup_lamp_update1 (U8 mask, U8 lamp) { if (timed_mode_running_p (&greed_mode)) @@ -133,6 +175,10 @@ CALLSET_ENTRY (standup, lamp_update) /** target is given as a bitmask */ void common_greed_handler (U8 target) { + /* Increase the odcchange pot, which also shows the deff */ + if (in_live_game) + callset_invoke (grow_oddchange); + const U8 sw = task_get_arg (); const U8 lamp = switch_lookup_lamp (sw); @@ -174,6 +220,12 @@ void greed_mode_init (void) score_zero (greed_mode_total); } +void greed_mode_expire (void) +{ + if (score_compare (score_table[SC_10M], greed_mode_total) == 1) + callset_invoke (start_hurryup); +} + void greed_mode_exit (void) { greed_set = NO_TARGETS; diff --git a/machine/tz/gumball.c b/machine/tz/gumball.c index ee2bd2e27..bec70f090 100644 --- a/machine/tz/gumball.c +++ b/machine/tz/gumball.c @@ -1,5 +1,5 @@ /* - * Copyright 2006-2010 by Brian Dominy + * Copyright 2006-2009 by Brian Dominy * * This file is part of FreeWPC. * @@ -42,7 +42,6 @@ U8 gumball_score; extern U8 pb_location; extern bool hold_balls_in_autofire; - //TODO Start a timer to check if a ball came out, if not, turn again /*************************************************************/ @@ -66,8 +65,8 @@ void award_gumball_score (void) if (global_flag_test(GLOBAL_FLAG_POWERBALL_IN_PLAY)) { - score (SC_20M); - gumball_score =+ 20; + score (SC_5M); + gumball_score =+ 5; } } @@ -76,11 +75,15 @@ void award_gumball_score (void) * the gumball */ bool gumball_load_is_enabled (void) { - if (in_live_game && (gumball_enable_count > 0) - && !multi_ball_play ()) - return TRUE; + if (!in_live_game) + return FALSE; + /* Don't enable if the powerball is likely to be out undetected + * We should wait for a detection event first */ + else if (pb_maybe_in_play () ) + return FALSE; /* If powerball is out during single ball play, enable */ - else if (global_flag_test (GLOBAL_FLAG_POWERBALL_IN_PLAY) && !multi_ball_play ()) + else if ((global_flag_test (GLOBAL_FLAG_POWERBALL_IN_PLAY) || gumball_enable_count) + && !multi_ball_play ()) return TRUE; else return FALSE; @@ -95,7 +98,7 @@ void gumball_load_from_trough (void) void gumball_release_task (void) { - event_should_follow (gumball_release, gumball_exit, TIME_3S); + event_should_follow (gumball_release, gumball_exit, TIME_4S); while (gumball_pending_releases > 0) { gumball_geneva_tripped = FALSE; @@ -151,23 +154,19 @@ void sw_gumball_right_loop_entered (void) { magnet_disable_catch (MAG_RIGHT); gumball_divertor_open (); - return; } /* Don't open if autofired into play or dropped from the lock*/ - if (event_did_follow (autolaunch, right_loop) - || event_did_follow (dev_lock_kick_attempt, right_loop) + else if (event_did_follow (autolaunch, right_loop) || timer_find_gid (GID_LOCK_KICKED)) { - return; } /* Don't open if the magnet is about to grab the ball * but remembering that it will always let the powerball through */ - if ((magnet_enabled (MAG_RIGHT) || magnet_busy (MAG_RIGHT)) + else if ((magnet_enabled (MAG_RIGHT) || magnet_busy (MAG_RIGHT)) && !global_flag_test (GLOBAL_FLAG_POWERBALL_IN_PLAY)) { - return; } - if (gumball_load_is_enabled ()) + else if (gumball_load_is_enabled ()) { gumball_divertor_open (); if (in_live_game && !multi_ball_play ()) @@ -183,23 +182,22 @@ void sw_gumball_right_loop_entered (void) CALLSET_ENTRY (gumball, sw_gumball_exit) { - if (!global_flag_test (GLOBAL_FLAG_MULTIBALL_RUNNING)) - sound_send (SND_GUMBALL_LOADED); - if (event_did_follow (gumball_geneva, gumball_exit) +// if (!global_flag_test (GLOBAL_FLAG_MULTIBALL_RUNNING)) +// sound_send (SND_GUMBALL_LOADED); + if (task_kill_gid (GID_GENEVA_TRIPPED) || event_did_follow (gumball_release, gumball_exit)) { + /* Start a timer to tell the slot where the ball came from */ + timer_restart_free (GID_GUMBALL_TO_SLOT, TIME_5S); /* Signal the release motor to stop */ gumball_exit_tripped = TRUE; /* A ball successfully came out of the gumball machine.*/ bounded_decrement (gumball_count, 0); - if (feature_config.easy_light_gumball == YES) + if (feature_config.easy_lite_gumball == YES) { lamp_off (LM_GUM); lamp_off (LM_BALL); } - device_switch_can_follow (gumball_exit, slot, TIME_5S); - event_can_follow (gumball_exit, camera, TIME_5S); - event_can_follow (gumball_exit, slot, TIME_5S); } } @@ -210,7 +208,7 @@ CALLSET_ENTRY (gumball, sw_gumball_geneva) /* Don't trigger too early */ if (timeout < 10) gumball_geneva_tripped = TRUE; - event_should_follow (gumball_geneva, gumball_exit, TIME_2S); + timer_restart_free (GID_GENEVA_TRIPPED, TIME_4S); } CALLSET_ENTRY (gumball, sw_gumball_enter) @@ -231,6 +229,7 @@ CALLSET_ENTRY (gumball, sw_gumball_enter) if (powerball_loaded_into_gumball == TRUE) { powerball_loaded_into_gumball = FALSE; + leff_start (LEFF_FLASH_GI2); callset_invoke (mball_start); callset_invoke (mball_start_3_ball); callset_invoke (powerball_in_gumball); @@ -326,6 +325,8 @@ void sw_far_left_trough_monitor (void) void gumball_deff (void) { sound_send (SND_GUMBALL_LOAD_START); + //music_effect_start (SND_GUMBALL_LOAD_START, SL_3S); +// task_recreate_gid (GID_GUMBALL_MUSIC_BUG, gumball_music_bug_task); U16 fno; for (fno = IMG_GUMBALL_START; fno <= IMG_GUMBALL_END; fno += 2) { @@ -347,15 +348,21 @@ void gumball_deff (void) dmd_show2 (); task_sleep (TIME_100MS); } - sound_send (SND_GUMBALL_LOAD_END); + music_effect_start (SND_GUMBALL_LOAD_END, SL_3S); task_sleep_sec (2); - dmd_alloc_low_clean (); - psprintf("1 GUMBALL", "%d GUMBALLS", gumball_collected_count); - font_render_string_center (&font_fixed6, 64, 7, sprintf_buffer); - sprintf("%d MILLION", gumball_score); - font_render_string_center (&font_fixed6, 64, 18, sprintf_buffer); - dmd_show_low (); - task_sleep_sec (1); + for (fno = 0; fno < 20; fno++) + { + dmd_alloc_pair_clean (); + dmd_clean_page_low (); + psprintf("1 GUMBALL", "%d GUMBALLS", gumball_collected_count); + font_render_string_center (&font_fireball, 64, 8, sprintf_buffer); + sprintf("%d MILLION", gumball_score); + font_render_string_center (&font_quadrit, 64, 22, sprintf_buffer); + dmd_copy_low_to_high (); + callset_invoke (score_overlay); + dmd_show2 (); + task_sleep (TIME_100MS); + } deff_exit (); } @@ -397,7 +404,7 @@ CALLSET_ENTRY (gumball, end_ball) gumball_divertor_close (); } -CALLSET_ENTRY (gumball, start_player) +CALLSET_ENTRY (gumball, start_player, init) { gumball_enable_count = 0; } @@ -466,9 +473,9 @@ CALLSET_ENTRY (gumball, status_report) { status_page_init (); sprintf ("%d GUMBALLS ENABLED", gumball_enable_count); - font_render_string_center (&font_mono5, 64, 10, sprintf_buffer); + font_render_string_center (&font_var5, 64, 10, sprintf_buffer); sprintf ("%d COLLECTED", gumball_collected_count); - font_render_string_center (&font_mono5, 64, 18, sprintf_buffer); + font_render_string_center (&font_var5, 64, 18, sprintf_buffer); sprintf ("%d BALLS IN GUMBALL", gumball_count); font_render_string_center (&font_var5, 64, 25, sprintf_buffer); status_page_complete (); diff --git a/machine/tz/gumball_test.c b/machine/tz/gumball_test.c index 0559e8c79..8740cef89 100644 --- a/machine/tz/gumball_test.c +++ b/machine/tz/gumball_test.c @@ -1,5 +1,5 @@ /* - * Copyright 2006, 2007, 2010 by Brian Dominy + * Copyright 2006, 2007 by Brian Dominy * * This file is part of FreeWPC. * @@ -48,6 +48,7 @@ const switch_monitor_t tz_gumball_test_switch_monitor[] = { { SW_GUMBALL_ENTER, "ENTER", SW_MON_COORD(45, 24), }, { SW_GUMBALL_GENEVA, "GENEVA", SW_MON_COORD(90, 17), }, { SW_GUMBALL_EXIT, "EXIT", SW_MON_COORD(90, 24), }, + { 0, NULL, SW_MON_COORD(0, 0), }, }; #define NUM_GUMBALL_SWITCHES \ @@ -55,22 +56,25 @@ const switch_monitor_t tz_gumball_test_switch_monitor[] = { sizeof (tz_gumball_test_switch_monitor[0])) -void switch_monitor_draw (const switch_monitor_t *monitor, U8 count) +void switch_monitor_prepare (const switch_monitor_t *monitor) { - while (count > 0) + while (monitor->name != NULL) + { + font_render_string_left (&font_var5, monitor->text_coord.x, + monitor->text_coord.y, monitor->name); + monitor++; + } +} + + +void switch_monitor_poll (const switch_monitor_t *monitor) +{ + while (monitor->name != NULL) { if (switch_poll_logical (monitor->sw)) - { bitmap_draw (monitor->box_coord, BM_X5); - } else - { bitmap_draw (monitor->box_coord, BM_BOX5); - } - font_render_string_left (&font_var5, - monitor->text_coord.x, monitor->text_coord.y, - monitor->name); - count--; monitor++; } } @@ -85,8 +89,10 @@ void tz_gumball_test_init (void) void tz_gumball_test_draw (void) { + extern U8 gumball_count; + dmd_alloc_low_clean (); - font_render_string_center (&font_mono5, 64, 2, "GUMBALL TEST"); + font_render_string_center (&font_var5, 64, 2, "GUMBALL TEST"); switch (gumball_op) { case TEST_GUMBALL_LOAD: @@ -94,10 +100,11 @@ void tz_gumball_test_draw (void) case TEST_GUMBALL_RELEASE: sprintf ("RELEASE"); break; } - font_render_string_center (&font_mono5, 64, 10, sprintf_buffer); - - switch_monitor_draw (tz_gumball_test_switch_monitor, NUM_GUMBALL_SWITCHES); + font_render_string_center (&font_var5, 32, 10, sprintf_buffer); + sprintf ("%d", gumball_count); + font_render_string_center (&font_var5, 96, 10, sprintf_buffer); + switch_monitor_prepare (tz_gumball_test_switch_monitor); dmd_show_low (); } @@ -106,8 +113,10 @@ void tz_gumball_test_thread (void) { for (;;) { - /* TODO - poll more frequently, and draw less often */ tz_gumball_test_draw (); + switch_monitor_poll (tz_gumball_test_switch_monitor); + task_sleep (TIME_33MS); + switch_monitor_poll (tz_gumball_test_switch_monitor); task_sleep (TIME_33MS); } } diff --git a/machine/tz/hitch.c b/machine/tz/hitch.c index 490d525a9..be394fdf2 100644 --- a/machine/tz/hitch.c +++ b/machine/tz/hitch.c @@ -1,5 +1,5 @@ /* - * Copyright 2006-2010 by Brian Dominy + * Copyright 2006-2009 by Brian Dominy * * This file is part of FreeWPC. * @@ -38,8 +38,8 @@ struct timed_mode_ops hitch_mode = { .music = MUS_FASTLOCK_ADDAMS_FAMILY, .deff_running = DEFF_HITCH_MODE, .prio = PRI_GAME_MODE6, - .timer = &hitch_mode_timer, .init_timer = 30, + .timer = &hitch_mode_timer, .grace_timer = 3, .pause = system_timer_pause, }; @@ -48,33 +48,34 @@ void hitchhiker_deff (void) { /* Start a timer so jets won't stop animation */ timer_restart_free (GID_HITCHHIKER, TIME_3S); + dmd_alloc_pair_clean (); U16 fno; for (fno = IMG_HITCHHIKER_START; fno <= IMG_HITCHHIKER_END; fno += 2) { - dmd_alloc_pair_clean (); - frame_draw (fno); - /* text can only be printed to the low page so we flip them */ - dmd_flip_low_high (); - + dmd_map_overlay (); + dmd_clean_page_low (); + if (timed_mode_running_p (&hitch_mode)) { - sprintf("10M"); - font_render_string_center (&font_fixed6, 98, 5, sprintf_buffer); + sprintf("10 MILLION"); + font_render_string_center (&font_fireball, 64, 16, sprintf_buffer); } else { sprintf ("HITCHERS"); - font_render_string_center (&font_mono5, 98, 5, sprintf_buffer); + font_render_string_center (&font_nayupixel10, 98, 5, sprintf_buffer); sprintf ("%d", hitch_count); - font_render_string_center (&font_fixed6, 99, 24, sprintf_buffer); + font_render_string_center (&font_quadrit, 99, 24, sprintf_buffer); } - /* Flip back again */ - dmd_flip_low_high (); - + + dmd_text_outline (); + dmd_alloc_pair (); + frame_draw (fno); + dmd_overlay_outline (); dmd_show2 (); - task_sleep (TIME_66MS); + //task_sleep (TIME_33MS); } - task_sleep (TIME_700MS); + task_sleep (TIME_500MS); /* Stop the timer so jets.c can show deffs again */ timer_kill_gid (GID_HITCHHIKER); deff_exit (); @@ -83,17 +84,23 @@ void hitchhiker_deff (void) void hitch_mode_deff (void) { + dmd_alloc_pair_clean (); for (;;) { - dmd_alloc_low_clean (); - font_render_string_center (&font_var5, 64, 5, "SHOOT HITCHHIKER"); + dmd_map_overlay (); + dmd_clean_page_low (); + font_render_string_center (&font_nayupixel10, 64, 5, "SHOOT HITCHHIKER"); sprintf_current_score (); - font_render_string_center (&font_fixed6, 64, 16, sprintf_buffer); - font_render_string_center (&font_var5, 64, 27, "FOR 10M"); + font_render_string_center (&font_antiqua, 64, 13, sprintf_buffer); + font_render_string_center (&font_nayupixel10, 64, 27, "FOR 10M"); sprintf ("%d", hitch_mode_timer); font_render_string (&font_var5, 2, 2, sprintf_buffer); font_render_string_right (&font_var5, 126, 2, sprintf_buffer); - dmd_show_low (); + dmd_text_outline (); + dmd_alloc_pair (); + frame_draw (IMG_HITCHHIKER_START); + dmd_overlay_outline (); + dmd_show2 (); task_sleep (TIME_200MS); } } @@ -135,19 +142,8 @@ CALLSET_ENTRY (hitch, sw_hitchhiker) } bounded_increment (hitch_count, 99); - /* Yes, I know it's ugly, I'll fix it at some point */ - if (hitch_count == 5 || - hitch_count == 10 || - hitch_count == 15 || - hitch_count == 20 || - hitch_count == 30 || - hitch_count == 40 || - hitch_count == 50 || - hitch_count == 60 || - hitch_count == 70 || - hitch_count == 80 || - hitch_count == 90 || - hitch_count == 99 ) + if ((hitch_count < 20 && hitch_count % 5 == 0) + || (hitch_count >= 20 && hitch_count % 10 == 0)) { mpf_enable_count++; sound_send (SND_ARE_YOU_READY_TO_BATTLE); diff --git a/machine/tz/jets.c b/machine/tz/jets.c index c77103983..c9d59284e 100644 --- a/machine/tz/jets.c +++ b/machine/tz/jets.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/machine/tz/magtest.c b/machine/tz/magtest.c old mode 100755 new mode 100644 diff --git a/machine/tz/mpf.c b/machine/tz/mpf.c index 924445331..f43ddc150 100644 --- a/machine/tz/mpf.c +++ b/machine/tz/mpf.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/machine/tz/multiball.c b/machine/tz/multiball.c index a91ca1b67..ce9e78c18 100644 --- a/machine/tz/multiball.c +++ b/machine/tz/multiball.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. * diff --git a/machine/tz/powerball.c b/machine/tz/powerball.c index 965999d6e..4373cd94c 100644 --- a/machine/tz/powerball.c +++ b/machine/tz/powerball.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. * diff --git a/machine/tz/powerball_test.c b/machine/tz/powerball_test.c index ccdea3c1c..0a3a1a307 100644 --- a/machine/tz/powerball_test.c +++ b/machine/tz/powerball_test.c @@ -41,7 +41,7 @@ void pb_test_init (void) void pb_test_draw (void) { dmd_alloc_low_clean (); - font_render_string_center (&font_mono5, 64, 0, "POWERBALL TEST"); + font_render_string_center (&font_mono5, 64, 3, "POWERBALL TEST"); if (pb_location == PB_MISSING) sprintf ("LOST"); diff --git a/machine/tz/rampdiv.c b/machine/tz/rampdiv.c old mode 100755 new mode 100644 diff --git a/machine/tz/tz.md b/machine/tz/tz.md index 37a967088..eeface0e0 100644 --- a/machine/tz/tz.md +++ b/machine/tz/tz.md @@ -120,7 +120,7 @@ define CONFIG_TZONE_IP y # name. Options can be given in any order: # ingame - only service the switch during a game # intest - also service the switch in test mode -# noplay - tripping this switch does NOT mark ball in play +# novalid - tripping this switch does NOT mark ball in play # standup - this is a standup # button - this is a button # edge - this switch should be serviced on either transition @@ -140,22 +140,22 @@ define CONFIG_TZONE_IP y 11: Right Inlane, ingame, sound(SND_INSIDE_LEFT_INLANE) 12: Right Outlane, ingame, sound(SND_DRAIN) 13: Start Button, start-button, intest, debounce(TIME_100MS) -14: Tilt, tilt, ingame, noplay, cabinet +14: Tilt, tilt, ingame, novalid, cabinet 15: Right Trough, noscore 16: Center Trough, noscore 17: Left Trough, noscore -18: Outhole, outhole, service, noplay, intest +18: Outhole, outhole, service, novalid, intest 21: Slam Tilt, slam-tilt, ingame, cabinet 23: Buyin Button, buyin-button 25: Far Left Trough, noscore 26: Trough Proximity, edge, noscore 27: Shooter, edge, shooter, noscore, debounce(TIME_200MS) 28: Rocket Kicker -31: Left Jet, ingame, c_decl(sw_jet), noplay, lamp(LM_LEFT_JET) -32: Right Jet, ingame, c_decl(sw_jet), noplay, lamp(LM_RIGHT_JET) -33: Bottom Jet, ingame, c_decl(sw_jet), noplay, lamp(LM_LOWER_JET) -34: Left Sling, ingame, c_decl(sw_sling), noplay -35: Right Sling, ingame, c_decl(sw_sling), noplay +31: Left Jet, ingame, c_decl(sw_jet), novalid, lamp(LM_LEFT_JET) +32: Right Jet, ingame, c_decl(sw_jet), novalid, lamp(LM_RIGHT_JET) +33: Bottom Jet, ingame, c_decl(sw_jet), novalid, lamp(LM_LOWER_JET) +34: Left Sling, ingame, c_decl(sw_sling), novalid +35: Right Sling, ingame, c_decl(sw_sling), novalid 36: Left Outlane, ingame, sound(SND_DRAIN) 37: Left Inlane 1, ingame, sound(SND_INSIDE_LEFT_INLANE) 38: Left Inlane 2, ingame, sound(SND_INSIDE_LEFT_INLANE) @@ -175,16 +175,16 @@ define CONFIG_TZONE_IP y 56: Gumball Exit, noscore 57: Slot Proximity, edge, noscore 58: Slot -61: Skill Bottom, ingame, noplay -62: Skill Center, ingame, noplay -63: Skill Top, ingame, noplay +61: Skill Bottom, ingame, novalid +62: Skill Center, ingame, novalid +63: Skill Top, ingame, novalid 64: Standup 4, standup, ingame, lamp(LM_UR_5M) 65: Power Payoff, standup, ingame 66: Standup 5, standup, ingame, lamp(LM_MR1_5M) 67: Standup 6, standup, ingame, lamp(LM_MR2_5M) 68: Standup 7, standup, ingame, lamp(LM_LR_5M) -71: Autofire1, opto, noplay, ingame -72: Autofire2, opto, noplay, ingame +71: Autofire1, opto, novalid, ingame +72: Autofire2, opto, novalid, ingame 73: Right Ramp, opto, ingame 74: Gumball Popper, opto, intest 75: MPF Top, opto, ingame @@ -531,6 +531,7 @@ Clock Working: # Display effects ########################################################################## [deffs] +Enter PIN: page(COMMON_PAGE), PRI_PIN_ENTRY Cow: page(MACHINE_PAGE), PRI_EGG1 TZ Flipcode entry: page(MACHINE3_PAGE), PRI_REPLAY TZ Flipcode entered: page(MACHINE3_PAGE), PRI_DEBUGGER, D_PAUSE+D_QUEUED diff --git a/machine/tz/tz_flipcode.c b/machine/tz/tz_flipcode.c index 920b1c480..768a632f6 100644 --- a/machine/tz/tz_flipcode.c +++ b/machine/tz/tz_flipcode.c @@ -205,3 +205,9 @@ CALLSET_ENTRY (tz_flipcode, machine_unpaused) tz_flipcode_entry_stop (); } } + +CALLSET_BOOL_ENTRY (tz_flipcode, allow_high_scores) +{ + return !flipcode_used; +} + diff --git a/machine/tzsound/Makefile b/machine/tzsound/Makefile deleted file mode 100644 index 2681020fe..000000000 --- a/machine/tzsound/Makefile +++ /dev/null @@ -1,46 +0,0 @@ - -# -# Machine specific sound-board configuration -# - -PLATFORM := wpcsound -MACHINE_FILE := tzsound.md - -# Define the name of the GAME_ROM. This is -# optional; you can delete it and a suitable -# default will be taken. -GAME_ROM_PREFIX = ftzs - -ROM_PAGE_COUNT = 32 - -################################################# -# -# Simulation options. -# -# These options control the way that the game -# ROM is made available to pinmame for testing. -# They are only used during installation into -# the pinmame roms directory. -# -################################################# - -PINMAME_MACHINE = tz_92 - -PINMAME_GAME_ROM = tzu18_l2.rom - -PINMAME_OTHER_ROMS = tzone9_2.rom tzu14_l2.rom tzu15_l2.rom - -# -# Object files exported by this game -# -# GAME_OBJS go into the system page, which should be a last resort or for common -# functions, or for those which have to for some reason. All feature tests can -# go into GAME_TEST_OBJS. Preferably, game functions go into GAME_PAGED_OBJS. -# This works safely for any file that only uses CALLSET_ENTRY functions, deffs, -# and leffs. RTTs must go into GAME_OBJS. -# - -GAME_OBJS = -GAME_TEST_OBJS = -GAME_INCLUDES = -GAME_PAGED_OBJS = diff --git a/machine/tzsound/tzsound.md b/machine/tzsound/tzsound.md deleted file mode 100644 index 4486ffc38..000000000 --- a/machine/tzsound/tzsound.md +++ /dev/null @@ -1,4 +0,0 @@ -Title: Twilight Zone Sound -include platform/wpcsound/wpcsound.md -Sound: Yes -define MACHINE_LACKS_ALL_INCLUDES diff --git a/machine/wcs/amode.c b/machine/wcs/amode.c index 8a4ca09f5..fbd2a3efd 100644 --- a/machine/wcs/amode.c +++ b/machine/wcs/amode.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/machine/wcs/multiball.c b/machine/wcs/multiball.c index 07619833f..36f92053f 100644 --- a/machine/wcs/multiball.c +++ b/machine/wcs/multiball.c @@ -160,29 +160,25 @@ static void mb_award_super_jackpot (void) } } -static void mb_award_lock (U8 flag, U8 devno) +static void mb_award_lock (U8 devno) { - if (!flag_test (flag)) - { - flag_on (flag); - device_lock_ball (device_entry (devno)); - sound_start (ST_SAMPLE, SND_LOCK_MAGNET, SL_4S, PRI_GAME_QUICK5); - deff_start (DEFF_BALL_LOCKED); - lock_count++; - } + device_lock_ball (device_entry (devno)); + sound_start (ST_SAMPLE, SND_LOCK_MAGNET, SL_4S, PRI_GAME_QUICK5); + deff_start (DEFF_BALL_LOCKED); + lock_count++; } CALLSET_ENTRY (mb, dev_left_eject_enter) { - if (!flag_test (FLAG_MULTIBALL_RUNNING)) - mb_award_lock (FLAG_LEFT_EJECT_LOCK, DEVNO_LEFT_EJECT); + if (!flag_test (FLAG_MULTIBALL_RUNNING) && !flag_test_and_set (FLAG_LEFT_EJECT_LOCK)) + mb_award_lock (DEVNO_LEFT_EJECT); } CALLSET_ENTRY (mb, dev_right_eject_enter) { - if (!flag_test (FLAG_MULTIBALL_RUNNING)) - mb_award_lock (FLAG_RIGHT_EJECT_LOCK, DEVNO_RIGHT_EJECT); + if (!flag_test (FLAG_MULTIBALL_RUNNING) && !flag_test_and_set (FLAG_RIGHT_EJECT_LOCK)) + mb_award_lock (DEVNO_RIGHT_EJECT); } CALLSET_ENTRY (mb, dev_left_eject_surprise_release) diff --git a/machine/wcs/wcs.md b/machine/wcs/wcs.md index 6bfd2da75..d94b2c34a 100644 --- a/machine/wcs/wcs.md +++ b/machine/wcs/wcs.md @@ -1,6 +1,6 @@ #-------------------------------------------------------------------------- # WCS machine description for FreeWPC -# (C) Copyright 2006-2010 by Brian Dominy +# (C) Copyright 2006-2011 by Brian Dominy # # See tools/genmachine for more information about the format of this file. #-------------------------------------------------------------------------- @@ -94,7 +94,7 @@ define MACHINE_BALL_IN_PLAY_MUSIC MUS_MAIN 11: Unused 12: Magnet Button, button, noscore, cabinet 13: Start Button, start-button, cabinet, intest -14: Tilt, cabinet, tilt, ingame, noplay +14: Tilt, cabinet, tilt, ingame, novalid 15: Left Flipper Lane, ingame 16: Striker 3, ingame 17: Right Flipper Lane, ingame @@ -115,8 +115,8 @@ define MACHINE_BALL_IN_PLAY_MUSIC MUS_MAIN 38: Shooter, edge, noscore, shooter, debounce(TIME_200MS) 41: Goal Trough, opto, ingame 42: Goal Popper, opto, ingame -43: Goalie Left, noplay, intest, service, opto -44: Goalie Right, noplay, intest, service, opto +43: Goalie Left, novalid, intest, service, opto +44: Goalie Right, novalid, intest, service, opto 45: TV Popper, opto, ingame 46: Unused 47: Travel Lane, ingame @@ -141,11 +141,11 @@ define MACHINE_BALL_IN_PLAY_MUSIC MUS_MAIN 76: Lock Low, ingame 77: Lock High, ingame 78: R. Ramp Exit, ingame -81: Left Jet, ingame, noplay -82: Upper Jet, ingame, noplay -83: Lower Jet, ingame, noplay -84: Left Slingshot, ingame, noplay -85: Right Slingshot, ingame, noplay +81: Left Jet, ingame, novalid +82: Upper Jet, ingame, novalid +83: Lower Jet, ingame, novalid +84: Left Slingshot, ingame, novalid +85: Right Slingshot, ingame, novalid 86: Kickback, ingame 87: Upper Left Lane, ingame 88: Upper Right Lane, ingame diff --git a/platform/generic.md b/platform/generic.md new file mode 100644 index 000000000..f8ede480d --- /dev/null +++ b/platform/generic.md @@ -0,0 +1,57 @@ +#-------------------------------------------------------------------------- +# FreeWPC generic machine description +# (C) Copyright 2006-2012 by Brian Dominy +# +# See tools/genmachine for more information about the format of this file. +# +# This file contains generic definitions that are common to all platforms. +# That means only things which are not hardware specific. +#-------------------------------------------------------------------------- + +[deffs] + +NULL: c_decl(deff_exit), PRI_NULL +Amode: page(COMMON_PAGE), c_decl(system_amode_deff), runner, PRI_AMODE +Scores: runner, page(EFFECT_PAGE), PRI_SCORES +Scores Important: page(EFFECT_PAGE), PRI_SCORES_IMPORTANT, D_RESTARTABLE +Score Goal: page(EFFECT_PAGE), PRI_SCORE_GOAL, D_TIMEOUT +Credits: page(EFFECT_PAGE), PRI_CREDITS +Tilt Warning: page(EFFECT_PAGE), PRI_TILT_WARNING +Tilt: runner, page(EFFECT_PAGE), PRI_TILT +Game Over: page(EFFECT_PAGE), PRI_GAME_OVER +Volume Change: page(EFFECT_PAGE), runner, PRI_VOLUME_CHANGE_DISPLAY, D_PAUSE +Slam Tilt: page(EFFECT_PAGE), runner, PRI_SLAMTILT +Status Report: page(COMMON_PAGE), runner, PRI_STATUS +Nonfatal Error: page(EFFECT_PAGE), PRI_DEBUGGER +HSEntry: page(COMMON_PAGE), runner, PRI_HSENTRY +HSCredits: page(COMMON_PAGE), runner, PRI_HSENTRY +Match: page(COMMON_PAGE), runner, PRI_MATCH +Buyin Offer: page(EFFECT_PAGE), PRI_MATCH +Locating Balls: page(EFFECT_PAGE), PRI_BALL_SEARCH +Player Tournament Ready: page(EFFECT_PAGE), PRI_STATUS +System Reset: PRI_RESET, page(COMMON_PAGE) +# TODO : priority below? +Coin Door Buttons: page(EFFECT_PAGE), PRI_JACKPOT +Plunge Ball: page(EFFECT_PAGE), PRI_SCORE_GOAL +Coin Door Power: page(EFFECT_PAGE), PRI_JACKPOT +Ball Save: page(EFFECT_PAGE), c_decl(ball_save_deff), PRI_BALLSAVE +Enter Initials: page(COMMON_PAGE), PRI_HSENTRY + +jets effect: page(COMMON_PAGE), PRI_GAME_QUICK1, D_QUEUED+D_RESTARTABLE +jets completed effect: page(COMMON_PAGE), PRI_GAME_QUICK2, D_QUEUED + + + + + +[leffs] +NULL: PRI_NULL +Amode: runner, PRI_AMODE, c_decl(system_amode_leff), page(COMMON_PAGE) +Tilt Warning: PRI_TILT_WARNING, GI(ALL), c_decl(tilt_warning_leff), page(COMMON_PAGE) +Tilt: runner, PRI_TILT, LAMPS(ALL), GI(ALL), c_decl(no_lights_leff), page(COMMON_PAGE) +Ball Save: shared, PRI_LEFF3, LAMPS(BALL_SAVE), page(COMMON_PAGE) + +[globalflags] +Ball At Plunger: +Coin Door Opened: + diff --git a/platform/min/Makefile b/platform/min/Makefile new file mode 100644 index 000000000..a30ad195b --- /dev/null +++ b/platform/min/Makefile @@ -0,0 +1,14 @@ + +P := platform/min +$(eval $(call have,CONFIG_PLATFORM_MIN)) + +ifndef CONFIG_SIM +CPU := native +$(eval $(call have,CONFIG_CALLIO)) +$(eval $(call have,CONFIG_PTHREADS)) +$(eval $(call have,CONFIG_LINUX_GPIO)) +$(eval $(call have,CONFIG_LINUX_INPUT)) +include cpu/$(CPU)/Makefile +endif + +KERNEL_HW_OBJS += $(P)/min-hw.o diff --git a/platform/min/min-hw.c b/platform/min/min-hw.c new file mode 100644 index 000000000..639b0074e --- /dev/null +++ b/platform/min/min-hw.c @@ -0,0 +1,112 @@ + +#include +#include "system/platform.h" +#include "native/gpio.h" +#include "native/log.h" + +/* RTTX(name=triac_rtt freq=1) */ +/* RTTX(name=pinio_active_led_toggle freq=64) */ +/* RTTX(name=sound_write_rtt freq=2) */ + +#define GPIO_SOL_0 GPID(1,6) +#define GPIO_SOL_1 GPID(1,7) +#define GPIO_SOL_2 GPID(1,2) +#define GPIO_SOL_3 GPID(1,3) + +U8 last_lamps; +U8 last_sols; + +#ifndef CONFIG_SIM +void writeb (IOPTR ptr, U8 val) +{ + switch (ptr) + { + case IO_LAMP: + if (val != last_lamps) + { + gpio_write_led (0, val & 1); + gpio_write_led (1, val & 2); + gpio_write_led (2, val & 4); + gpio_write_led (3, val & 8); + last_lamps = val; + } + break; + case IO_SOL: + if (val != last_sols) + { + gpio_write (GPIO_SOL_0, val & 1); + gpio_write (GPIO_SOL_1, val & 2); + gpio_write (GPIO_SOL_2, val & 4); + gpio_write (GPIO_SOL_3, val & 8); + last_sols = val; + } + break; + } +} + +U8 readb (IOPTR ptr) +{ + U8 val = 0; + //printf ("readb(%X) -> %X\n", ptr, val); + return val; +} +#endif + +/* RTT(name=switch_rtt freq=2) */ +void switch_rtt (void) +{ + platform_switch_input (0, readb (IO_SWITCH)); + platform_switch_debounce (0); +#ifndef CONFIG_SIM + int c = posix_input_poll (0); + if (c > 0) + { + if (c == ' ') + print_log ("space found\n"); + } +#endif +} + +/* RTT(name=lamp_rtt freq=16) */ +void lamp_rtt (void) +{ + writeb (IO_LAMP, platform_lamp_compute (0)); +} + +/* RTT(name=sol_update_rtt_0 freq=1) */ +void sol_update_rtt_0 (void) +{ + pinio_write_solenoid_set (0, *sol_get_read_reg (0)); +} + +void sol_update_rtt_1 (void) +{ +} + +void platform_init (void) +{ + /* Request GPIOs */ +#ifndef CONFIG_SIM + gpio_request_output (GPIO_SOL_0); + gpio_request_output (GPIO_SOL_1); + gpio_request_output (GPIO_SOL_2); + gpio_request_output (GPIO_SOL_3); + posix_input_config (0); +#endif + last_lamps = last_sols = 0; +} + +void amode_leff (void) +{ + for (;;) + { + leff_on (LM_SHOOT_AGAIN); + task_sleep (TIME_166MS); + leff_off (LM_SHOOT_AGAIN); + leff_on (LM_TARGET); + task_sleep (TIME_166MS); + leff_off (LM_TARGET); + task_sleep (TIME_166MS); + } +} + diff --git a/platform/min/min.md b/platform/min/min.md new file mode 100644 index 000000000..5a55f9005 --- /dev/null +++ b/platform/min/min.md @@ -0,0 +1,48 @@ + +include platform/generic.md + +#switches-numbered: integer +#lamps-numbered: integer +#drives-numbered: integer +#gi-numbered: integer + +define MACHINE_CUSTOM_AMODE + +# The system needs a minimum of 4 switches to compile: a +# start button, two flipper buttons, and a trough switch. +# A 5th scoring target is needed in order to cycle through a +# game - otherwise valid playfield can never be set. + +[switches] +D1: Start Button, start-button, debounce(TIME_100MS) +D2: Left Button, cabinet +D3: Right Button, cabinet +D4: Trough, noscore +D5: Target, ingame + +[lamps] +11: Start Button, start +12: Shoot Again, shoot-again, ball-save +13: Target +14: GI + +[drives] +H1: Ball Release +H2: Left Flipper +H3: Right Flipper + +# The ball save requires a lamplist in order to denote ball +# save active as a lamp effect. + +[lamplists] +Ball Save: Shoot Again +Playfield: Shoot Again, Target + +# There must be a trough device + +[containers] +Trough: Ball Release, trough, init_max_count(1), Trough + +[leffs] +Amode: runner, PRI_AMODE, c_decl(amode_leff) + diff --git a/platform/p2k/Makefile b/platform/p2k/Makefile new file mode 100644 index 000000000..6ba6d2437 --- /dev/null +++ b/platform/p2k/Makefile @@ -0,0 +1,17 @@ + +P := platform/p2k +$(eval $(call have,CONFIG_PLATFORM_P2K)) + +ifndef CONFIG_SIM +CPU := native +$(eval $(call have,CONFIG_CALLIO)) +$(eval $(call have,CONFIG_PTHREADS)) +include cpu/$(CPU)/Makefile +endif + +#$(eval $(call have,CONFIG_VIDEO)) +$(eval $(call have,CONFIG_AC)) +$(eval $(call nohave,CONFIG_GI)) + +KERNEL_HW_OBJS += $(P)/main.o + diff --git a/platform/p2k/main.c b/platform/p2k/main.c new file mode 100644 index 000000000..c0b45c5be --- /dev/null +++ b/platform/p2k/main.c @@ -0,0 +1,99 @@ +/* + * Copyright 2010-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 "native/log.h" + +U8 p2k_write_cache[0x20]; + +/** + * readb/writeb talk to the parallel port driver. + */ +#ifndef CONFIG_SIM +void writeb (IOPTR addr, U8 val) +{ + print_log ("writeb(%X,%02X)\n", addr, val); +} + +U8 readb (IOPTR addr) +{ + print_log ("readb(%X)\n", addr); + return 0; +} +#endif + + +/** + * Write to a P2K output register. + */ +void p2k_write (U8 reg, U8 val) +{ + print_log ("p2k_write: [%d] <- %02X\n", reg, val); + p2k_write_cache[reg] = val; + writeb (LPT_DATA, reg); + writeb (LPT_CONTROL, LPT_REG_LATCH); + writeb (LPT_CONTROL, 0); + writeb (LPT_DATA, val); + writeb (LPT_CONTROL, LPT_REG_OE); + writeb (LPT_CONTROL, 0); +} + + +/** + * Read from a P2K input register. + */ +U8 p2k_read (U8 reg) +{ + U8 val; + writeb (LPT_DATA, reg); + writeb (LPT_CONTROL, LPT_REG_LATCH); + writeb (LPT_CONTROL, 0); + writeb (LPT_CONTROL, 0x29); /* what are these bits? */ + val = readb (LPT_DATA); + writeb (LPT_CONTROL, 0); + print_log ("p2k_read: [%d] -> %02X\n", reg, val); + return val; +} + +/* RTT(name=switch_rtt freq=2) */ +void switch_rtt (void) +{ +} + +/* RTT(name=lamp_rtt freq=20) */ +void lamp_rtt (void) +{ +} + +/* RTT(name=sol_update_rtt_0 freq=1) */ +void sol_update_rtt_0 (void) +{ +} + +void sol_update_rtt_1 (void) +{ +} + + +void platform_init (void) +{ +} + + diff --git a/platform/p2k/p2k.md b/platform/p2k/p2k.md new file mode 100644 index 000000000..8b4742cd7 --- /dev/null +++ b/platform/p2k/p2k.md @@ -0,0 +1,83 @@ +#-------------------------------------------------------------------------- +# Platform description for Pinball 2000 +# (C) Copyright 2006-2010 by Brian Dominy +# +# See tools/genmachine for more information about the format of this file. +#-------------------------------------------------------------------------- + +include platform/generic.md + +[lamps] +11: First Lamp +88: Last Lamp + +[switches] +D1: Left Coin, cabinet +D2: Center Coin, cabinet +D3: Right Coin, cabinet +D4: Fourth Coin, cabinet + +F1: Slam Tilt +F2: Coin Door Closed +F3: Tilt +F5: Right Button, button, intest, c_decl(sw_right_button) +F6: Left Button, button, intest, c_decl(sw_left_button) +F7: Right Action, button +F8: Left Action, button + +#D73: Escape, service, intest, cabinet, button +#D74: Down, service, intest, cabinet, button +#D75: Up, service, intest, cabinet, button +#D76: Enter, service, intest, cabinet, button +#D77: L.R. EOS +#D78: L.L. EOS +#D79: U.R. EOS +#D80: U.L. EOS + +[drives] +H1: High Power Sol. 1, notinstalled +H2: High Power Sol. 2, notinstalled +H3: High Power Sol. 3, notinstalled +H4: High Power Sol. 4, notinstalled +H5: High Power Sol. 5, notinstalled +H6: High Power Sol. 6, notinstalled +H7: High Power Sol. 7, notinstalled +H8: High Power Sol. 8, notinstalled + +L1: Low Power Sol. 1, notinstalled +L2: Low Power Sol. 2, notinstalled +L3: Low Power Sol. 3, notinstalled +L4: Low Power Sol. 4, notinstalled +L5: Low Power Sol. 5, notinstalled +L6: Low Power Sol. 6, notinstalled +L7: Low Power Sol. 7, notinstalled +L8: Low Power Sol. 8, notinstalled + +G1: General Sol. 1, notinstalled +G2: General Sol. 2, notinstalled +G3: General Sol. 3, notinstalled +G4: General Sol. 4, notinstalled +G5: General Sol. 5, notinstalled +G6: General Sol. 6, notinstalled +G7: General Sol. 7, notinstalled +G8: General Sol. 8, notinstalled + +A1: Aux. Sol. 1, notinstalled +A2: Aux. Sol. 2, notinstalled +A3: Aux. Sol. 3, notinstalled +A4: Aux. Sol. 4, notinstalled + +F1: L.R. Flip Power, time(TIME_33MS) +F2: L.R. Flip Hold, time(TIME_100MS) +F3: L.L. Flip Power, time(TIME_33MS) +F4: L.L. Flip Hold, time(TIME_200MS) +F5: U.R. Flip Power, time(TIME_33MS) +F6: U.R. Flip Hold, time(TIME_100MS) +F7: U.L. Flip Power, time(TIME_33MS) +F8: U.L. Flip Hold, time(TIME_100MS) + +[lamplists] +ALL: 11..88 +Ball Save: %ball-save + + diff --git a/platform/proc/Makefile b/platform/proc/Makefile new file mode 100644 index 000000000..9c517aa6b --- /dev/null +++ b/platform/proc/Makefile @@ -0,0 +1,17 @@ + +P := platform/proc +$(eval $(call have,CONFIG_PLATFORM_PROC)) + +ifndef CONFIG_SIM +CPU := native +$(eval $(call have,CONFIG_CALLIO)) +$(eval $(call have,CONFIG_PTHREADS)) +$(eval $(call have,CONFIG_LINUX_GPIO)) +$(eval $(call have,CONFIG_LINUX_INPUT)) +include cpu/$(CPU)/Makefile +endif + +KERNEL_HW_OBJS += $(P)/init-proc.o +KERNEL_HW_OBJS += $(P)/serial.o +KERNEL_HW_OBJS += $(P)/procdmd.o + diff --git a/machine/bop/mpf.c b/platform/proc/init-proc.c similarity index 50% rename from machine/bop/mpf.c rename to platform/proc/init-proc.c index efcd7d4e5..4da95c5c4 100644 --- a/machine/bop/mpf.c +++ b/platform/proc/init-proc.c @@ -1,5 +1,5 @@ /* - * Copyright 2010 by Ewan Meadows (sonny_jim@hotmail.com) + * Copyright 2012 by Brian Dominy * * This file is part of FreeWPC. * @@ -18,25 +18,60 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ - #include -#include +#include "native/log.h" + +void proc_debug_write (U8 c) +{ + putchar (c); +} + +/** + * Post a switch transition. + */ +void proc_post_switch_transition (switchnum_t swno) +{ + extern __fastram__ switch_bits_t sw_stable; + bit_toggle (sw_stable, swno); +} + + +#ifndef CONFIG_SIM +void writeb (IOPTR addr, U8 val) +{ +} -CALLSET_ENTRY (leftramp, sw_enter_mpf) +U8 readb (IOPTR addr) { - gate_stop (); - sound_send (MUS_MPF_ENTER); + return 0; } +#endif -CALLSET_ENTRY (leftramp, sw_mpf_exit_left) + +/* RTT(name=switch_rtt freq=2) */ +void switch_rtt (void) +{ +} + +/* RTT(name=lamp_rtt freq=16) */ +void lamp_rtt (void) +{ + writeb (IO_LAMP, platform_lamp_compute (0)); +} + +/* RTT(name=sol_update_rtt_0 freq=1) */ +void sol_update_rtt_0 (void) +{ + pinio_write_solenoid_set (0, *sol_get_read_reg (0)); +} + +void sol_update_rtt_1 (void) { - sound_send (SND_MPF_EXIT); - event_should_follow (mpf_exit, right_inlane, TIME_4S); } -CALLSET_ENTRY (leftramp, sw_mpf_exit_right) +void platform_init (void) { - sound_send (SND_MPF_EXIT); - flag_on (FLAG_SKILLSHOT_ENABLED); - event_should_follow (mpf_exit, shooter, TIME_4S); + //remote_dmd_init (); } + + diff --git a/platform/proc/proc.md b/platform/proc/proc.md new file mode 100644 index 000000000..67ca26dbf --- /dev/null +++ b/platform/proc/proc.md @@ -0,0 +1,82 @@ +include platform/generic.md + +[lamps] +11: First Lamp +88: Last Lamp + +[switches] +D1: Left Coin, cabinet +D2: Center Coin, cabinet +D3: Right Coin, cabinet +D4: Fourth Coin, cabinet +D5: Escape, service, intest, cabinet, button +D6: Down, service, intest, cabinet, button +D7: Up, service, intest, cabinet, button +D8: Enter, service, intest, cabinet, button +22: Coin Door Closed, cabinet, edge, intest +24: Always Closed, virtual, c_decl(sw_unused) + +F1: L. R. Flipper EOS, opto, cabinet +F2: L. R. Flipper Button, button, opto, intest, c_decl(sw_right_button) +F3: L. L. Flipper EOS, opto, cabinet +F4: L. L. Flipper Button, button, opto, intest, c_decl(sw_left_button) +F5: U. R. Flipper EOS, opto, cabinet +F6: U. R. Flipper Button, button, opto +F7: U. L. Flipper EOS, opto, cabinet +F8: U. L. Flipper Button, button, opto + +[drives] +H1: High Power Sol. 1, notinstalled +H2: High Power Sol. 2, notinstalled +H3: High Power Sol. 3, notinstalled +H4: High Power Sol. 4, notinstalled +H5: High Power Sol. 5, notinstalled +H6: High Power Sol. 6, notinstalled +H7: High Power Sol. 7, notinstalled +H8: High Power Sol. 8, notinstalled + +L1: Low Power Sol. 1, notinstalled +L2: Low Power Sol. 2, notinstalled +L3: Low Power Sol. 3, notinstalled +L4: Low Power Sol. 4, notinstalled +L5: Low Power Sol. 5, notinstalled +L6: Low Power Sol. 6, notinstalled +L7: Low Power Sol. 7, notinstalled +L8: Low Power Sol. 8, notinstalled + +G1: General Sol. 1, notinstalled +G2: General Sol. 2, notinstalled +G3: General Sol. 3, notinstalled +G4: General Sol. 4, notinstalled +G5: General Sol. 5, notinstalled +G6: General Sol. 6, notinstalled +G7: General Sol. 7, notinstalled +G8: General Sol. 8, notinstalled + +A1: Aux. Sol. 1, notinstalled +A2: Aux. Sol. 2, notinstalled +A3: Aux. Sol. 3, notinstalled +A4: Aux. Sol. 4, notinstalled + +F1: L.R. Flip Power, duty(SOL_DUTY_75), time(TIME_33MS) +F2: L.R. Flip Hold, duty(SOL_DUTY_75), time(TIME_200MS) +F3: L.L. Flip Power, duty(SOL_DUTY_75), time(TIME_33MS) +F4: L.L. Flip Hold, duty(SOL_DUTY_75), time(TIME_200MS) + +[lamplists] +ALL: 11..88 +Ball Save: MACHINE_BALL_SAVE_LAMP + +[fonts] +mono5: +num5x7: +lucida9: +tinynum: +var5: +fixed6: +cu17: +fixed10: +term6: +times8: +bitmap8: + diff --git a/platform/whitestar/Makefile b/platform/whitestar/Makefile index 41391b4ba..ffe8cda1d 100644 --- a/platform/whitestar/Makefile +++ b/platform/whitestar/Makefile @@ -1,20 +1,20 @@ # Root directory for the platform files -P=platform/wpc +P=platform/whitestar +ifndef CPU CPU := m6809 $(eval $(call have,CONFIG_PERIODIC_FIRQ)) CONFIG_TASK := y include cpu/$(CPU)/Makefile +$(eval $(call have,CONFIG_MMIO)) +endif # Subplatform support -CONFIG_WHITESTAR ?= y -CONFIG_FONT ?= $(CONFIG_DMD) -CONFIG_AC ?= n -CONFIG_ANIMATION ?= $(CONFIG_DMD) -$(eval $(call have,CONFIG_MMIO)) -$(eval $(call have,CONFIG_GI)) +$(eval $(call have,CONFIG_PLATFORM_WHITESTAR)) $(eval $(call nohave,CONFIG_AC)) +$(eval $(call have,CONFIG_GI)) +$(eval $(call have,CONFIG_NO_DEFFS)) # ROM bank switching CONFIG_ROM_BANK_SIZE := 16 @@ -24,23 +24,20 @@ CONFIG_CODE_PAGE_LIST := 56 57 58 59 60 61 CONFIG_SYSTEM_CODE_PAGE := 62 # Additional CFLAGS required on the WPC platform -CFLAGS += -mdirect -DCONFIG_PLATFORM_WHITESTAR -fno-builtin -mcode-section=.text -mdata-section=.text -mbss-section=ram -EXTRA_ASFLAGS += -DCONFIG_PLATFORM_WHITESTAR +ifeq ($(CPU),m6809) +CFLAGS += -mint8 -mdirect -fno-builtin -mcode-section=.text -mdata-section=.text -mbss-section=ram +endif # Don't check format strings, because we define those differently than ANSI C. CFLAGS += -Wno-format -# Optional CFLAGS -CFLAGS += -mint8 - -### NOTE: -mwpc is totally not acceptable, as Whitestar doesn't have -# the shifter hardware. But gcc6809 is crashing on some bit shift -# statements, so for _now_, keep this here until the compiler can be -# fixed, so we can fix up other problems. -CFLAGS += -mwpc - # Optimization flags CFLAGS += -O2 -fomit-frame-pointer -fstrength-reduce -frerun-loop-opt -Wunknown-pragmas -foptimize-sibling-calls -fstrict-aliasing -fregmove +KERNEL_SW_OBJS += $(P)/ws_hw.o +ifeq ($(CPU),m6809) +KERNEL_ASM_OBJS += platform/wpc/start.o KERNEL_SW_OBJS += $(P)/main.o -KERNEL_ASM_OBJS += $(P)/start.o +endif + +platform/wpc/start.o : EXTRA_ASFLAGS += -DTOP_BANK=$(TOP_BANK) -DBOTTOM_BANK=$(BOTTOM_BANK) diff --git a/platform/whitestar/main.c b/platform/whitestar/main.c new file mode 100644 index 000000000..5e655c35c --- /dev/null +++ b/platform/whitestar/main.c @@ -0,0 +1,27 @@ + +#include +#undef int + +/* TODO: Fix not to use this */ +__fastram__ U8 wpc_rom_bank; + +void exit (void) +{ + fatal (ERR_LIBC_ABORT); +} + + +/** Called by the standard library on some errors. + * This maps to our fatal() function. */ +void abort (void) +{ + fatal (ERR_LIBC_ABORT); +} + + +int main (void) +{ + freewpc_init (); + return 0; +} + diff --git a/platform/whitestar/whitestar.md b/platform/whitestar/whitestar.md index 55812c61a..281fbe52d 100644 --- a/platform/whitestar/whitestar.md +++ b/platform/whitestar/whitestar.md @@ -5,6 +5,8 @@ # See tools/genmachine for more information about the format of this file. #-------------------------------------------------------------------------- +include platform/generic.md + [lamps] 11: First Lamp 88: Last Lamp @@ -69,40 +71,6 @@ A8: Aux. Sol. 8 ALL: 11..88 Ball Save: MACHINE_BALL_SAVE_LAMP -[deffs] -NULL: c_decl(deff_exit), 0 -Amode: page(EFFECT_PAGE), c_decl(default_amode_deff), runner, PRI_AMODE -Inspector: page(COMMON_PAGE), runner, PRI_DEBUGGER -Scores: runner, PRI_SCORES -Scores Important: PRI_SCORES_IMPORTANT -Score Goal: page(EFFECT_PAGE), runner, PRI_SCORE_GOAL -Credits: page(COMMON_PAGE), PRI_CREDITS -Tilt Warning: page(COMMON_PAGE), PRI_TILT_WARNING -Tilt: runner, page(COMMON_PAGE), PRI_TILT -Game Over: page(EFFECT_PAGE), PRI_GAME_OVER -Volume Change: page(EFFECT_PAGE), runner, PRI_VOLUME_CHANGE_DISPLAY -Slam Tilt: page(COMMON_PAGE), runner, PRI_SLAMTILT -Status Report: page(COMMON_PAGE), runner, PRI_STATUS -Nonfatal Error: page(EFFECT_PAGE), PRI_DEBUGGER -HSEntry: page(COMMON_PAGE), runner, PRI_HSENTRY -Match: page(COMMON_PAGE), runner, PRI_MATCH -Buyin Offer: page(COMMON_PAGE), PRI_MATCH -Onecoin Buyin: page(COMMON_PAGE), PRI_MATCH -Locating Balls: page(EFFECT_PAGE), PRI_BALL_SEARCH -Player Tournament Ready: page(COMMON_PAGE), PRI_STATUS -System Reset: PRI_RESET, page(COMMON_PAGE) -Coin Door Buttons: page(COMMON_PAGE), PRI_JACKPOT -Plunge Ball: page(EFFECT_PAGE), PRI_SCORE_GOAL -Coin Door Power: page(COMMON_PAGE), PRI_JACKPOT -Ball Save: page(EFFECT_PAGE), c_decl(ball_save_deff), PRI_BALLSAVE -Enter Initials: page(COMMON_PAGE), PRI_HSENTRY - -[leffs] -NULL: 0 -Tilt Warning: runner, PRI_TILT_WARNING, LAMPS(ALL), c_decl(no_lights_leff), page(COMMON_PAGE) -Tilt: runner, PRI_TILT, LAMPS(ALL), GI(ALL), c_decl(no_lights_leff), page(COMMON_PAGE) -Ball Save: shared, PRI_LEFF3, LAMPS(BALL_SAVE), page(COMMON_PAGE) - [fonts] mono5: lucida9: @@ -114,8 +82,3 @@ fixed10: term6: times8: -[timers] -Ignore Tilt: - -[globalflags] -Ball At Plunger: diff --git a/platform/whitestar/ws_hw.c b/platform/whitestar/ws_hw.c new file mode 100644 index 000000000..5820ca508 --- /dev/null +++ b/platform/whitestar/ws_hw.c @@ -0,0 +1,34 @@ + +#include +#include + +U8 ws_page_led_io; +U8 ws_aux_ctrl_io; + +void puts_default (const char *s) +{ +} + +void switch_rtt (void) +{ +} + +void lamp_rtt (void) +{ +} + +void sol_update_rtt_0 (void) +{ +} + +void sol_update_rtt_1 (void) +{ +} + +void platform_init (void) +{ + ws_page_led_io = 0; + ws_aux_ctrl_io = 0; +} + + diff --git a/platform/wpc/Makefile b/platform/wpc/Makefile index 18b5e0743..ce2bab3ef 100644 --- a/platform/wpc/Makefile +++ b/platform/wpc/Makefile @@ -1,29 +1,45 @@ # The configuration for the WPC platform -CONFIG_GAME_ROM := y - # Root directory for the platform files P := platform/wpc # Common 6809 configuration +ifndef CPU CPU := m6809 $(eval $(call have,CONFIG_PERIODIC_IRQ)) +$(eval $(call have,CONFIG_FIRQ)) CONFIG_TASK := y include cpu/$(CPU)/Makefile +$(eval $(call have,CONFIG_MMIO)) +endif # Subplatform support # Eventually, this section will contain conditionals for building on the # different WPC variations. For now, all of these are mandatory though. $(eval $(call have,CONFIG_PLATFORM_WPC)) -$(eval $(call have,CONFIG_MMIO)) CONFIG_FONT ?= $(CONFIG_DMD) $(eval $(call have,CONFIG_AC)) $(eval $(call have,CONFIG_GI)) $(eval $(call have,CONFIG_TRIAC)) $(eval $(call have,CONFIG_RTC)) $(eval $(call have,CONFIG_BUYIN)) +$(eval $(call have,CONFIG_VOLUME_CONTROL)) +$(eval $(call have,CONFIG_HW_WATCHDOG)) +$(eval $(call have,CONFIG_DEBUG_INPUT)) +$(eval $(call have,CONFIG_DEBUG_OUTPUT)) CONFIG_SCORE_RANK := y +# Some features are dependent on having a working display +# module (DMD or alphanumeric), and are excluded otherwise. +ifeq ($(CONFIG_DMD), y) +$(eval $(call have,CONFIG_DMD_OR_ALPHA)) +$(eval $(call have,CONFIG_TEST)) +endif +ifeq ($(CONFIG_ALPHA), y) +$(eval $(call have,CONFIG_DMD_OR_ALPHA)) +$(eval $(call have,CONFIG_TEST)) +endif + # ROM bank switching CONFIG_ROM_BANK_SIZE := 16 CONFIG_FIXED_PAGE_COUNT := 2 @@ -47,21 +63,30 @@ CONFIG_SYSTEM_CODE_PAGE := 62 # This is non-standard but it generates much better code. It should be # possible to build without this, though. # +ifeq ($(CPU),m6809) INT_CFLAGS = -mint8 # TODO : Don't hardcode code/data sections here like this! -CFLAGS += $(INT_CFLAGS) -DHAVE_NVRAM -mdirect -mwpc -fno-builtin -mcode-section=.text -mdata-section=.text -mbss-section=ram -Wno-format -Werror=implicit-function-declaration +CFLAGS += $(INT_CFLAGS) -DHAVE_NVRAM -mdirect -mwpc -fno-builtin -mcode-section=.text -mdata-section=.text -mbss-section=ram EXTRA_ASFLAGS += -D__int8__ +# TODO : should these next two be common? +CFLAGS += -Wno-format -Werror=implicit-function-declaration +endif # Say which source files need to be compiled in for the WPC platform only. # Use KERNEL_HW_OBJS for C sources, and KERNEL_ASM_OBJS for assembler files. -KERNEL_HW_OBJS += $(P)/main.o KERNEL_HW_OBJS += $(P)/interrupt.o KERNEL_HW_OBJS += $(P)/init-wpc.o +KERNEL_HW_OBJS += $(P)/wpc-switch.o +KERNEL_HW_OBJS += $(P)/wpc-lamp.o +KERNEL_HW_OBJS += $(P)/wpc-sol.o +ifeq ($(CPU),m6809) +KERNEL_HW_OBJS += $(P)/main.o KERNEL_ASM_OBJS += $(if $(CONFIG_DMD), $(P)/bitmap.o) KERNEL_ASM_OBJS += $(if $(CONFIG_DMD), $(P)/dmd.o) KERNEL_ASM_OBJS += $(if $(CONFIG_DMD), $(P)/dot.o) KERNEL_ASM_OBJS += $(if $(CONFIG_DMD), $(P)/shadow.o) KERNEL_ASM_OBJS += $(P)/start.o +endif # Import images that are common to all games. ifeq ($(CONFIG_DMD),y) diff --git a/platform/wpc/bitmap.s b/platform/wpc/bitmap.s index 021258525..52ed1d0ff 100644 --- a/platform/wpc/bitmap.s +++ b/platform/wpc/bitmap.s @@ -128,7 +128,7 @@ loop8: orb 1,x ; Merge into DMD page (2nd byte) std ,x ; Save 16-bits to DMD memory in one shot leax 16,x - dec _bitmap_height + dec *_bitmap_height bne loop8 stu _bitmap_src puls u,y,pc @@ -146,7 +146,7 @@ loop16: orb 1,x std ,x ; Save to DMD memory leax 16,x - dec _bitmap_height + dec *_bitmap_height bne loop16 stu _bitmap_src puls u,y,pc @@ -220,7 +220,7 @@ large_middle_loop: comb andb #15 abx - dec _bitmap_height + dec *_bitmap_height bne large_row_loop stu _bitmap_src puls u,y,pc @@ -349,7 +349,7 @@ erase_large_middle_loop: comb andb #15 abx - dec _bitmap_height + dec *_bitmap_height bne erase_large_row_loop puls y,pc diff --git a/platform/wpc/fliptronic.md b/platform/wpc/fliptronic.md index 27bd16db4..a6f334b29 100644 --- a/platform/wpc/fliptronic.md +++ b/platform/wpc/fliptronic.md @@ -4,9 +4,9 @@ F2: L. R. Flipper Button, button, opto, intest, c_decl(sw_right_button) F3: L. L. Flipper EOS, opto, cabinet F4: L. L. Flipper Button, button, opto, intest, c_decl(sw_left_button) F5: U. R. Flipper EOS, opto, cabinet -F6: U. R. Flipper Button, button, opto +F6: U. R. Flipper Button, button, opto, c_decl(sw_upper_right_button) F7: U. L. Flipper EOS, opto, cabinet -F8: U. L. Flipper Button, button, opto +F8: U. L. Flipper Button, button, opto, c_decl(sw_upper_left_button) [drives] F1: L.R. Flip Power, duty(SOL_DUTY_75), time(TIME_33MS), nosearch diff --git a/platform/wpc/init-wpc.c b/platform/wpc/init-wpc.c index d3bcfebdc..8681d682e 100644 --- a/platform/wpc/init-wpc.c +++ b/platform/wpc/init-wpc.c @@ -1,5 +1,5 @@ /* - * Copyright 2009, 2010 by Brian Dominy + * Copyright 2009, 2010, 2011 by Brian Dominy * * This file is part of FreeWPC. * @@ -27,6 +27,9 @@ __fastram__ U8 wpc_rom_bank; /** The last value written to the WPC_LEDS register */ U8 wpc_led_reg; +/** The type of WPC board (DCS, WPC95, etc.) */ +const U8 wpc_machine_type = WPC_TYPE; + /** * Initialize the WPC platform. diff --git a/platform/wpc/interrupt.c b/platform/wpc/interrupt.c index 90893379f..dd0e64c90 100644 --- a/platform/wpc/interrupt.c +++ b/platform/wpc/interrupt.c @@ -61,11 +61,13 @@ void do_firq (void) here... */ interrupt_dbprintf ("Timer interrupt.\n"); } +#ifdef CONFIG_DMD else if (WPC_HAS_CAP (WPC_CAP_DMD)) { /* It is a DMD interrupt. */ dmd_rtt (); } +#endif #ifdef __m6809__ m6809_firq_restore_regs (); diff --git a/platform/wpc/wpc-common.md b/platform/wpc/wpc-common.md index b4fe50393..5114e2e98 100644 --- a/platform/wpc/wpc-common.md +++ b/platform/wpc/wpc-common.md @@ -1,6 +1,6 @@ #-------------------------------------------------------------------------- # System description for FreeWPC -# (C) Copyright 2006-2010 by Brian Dominy +# (C) Copyright 2006-2011 by Brian Dominy # # See tools/genmachine for more information about the format of this file. #-------------------------------------------------------------------------- @@ -13,6 +13,8 @@ # It will include this for you. #-------------------------------------------------------------------------- +include platform/generic.md + [lamps] 11: First Lamp 88: Last Lamp @@ -72,62 +74,23 @@ A4: General Sol. 4, notinstalled [lamplists] ALL: 11..88 -Ball Save: MACHINE_BALL_SAVE_LAMP - -[deffs] -NULL: c_decl(deff_exit), PRI_NULL -Amode: page(COMMON_PAGE), c_decl(system_amode_deff), runner, PRI_AMODE -Scores: runner, page(EFFECT_PAGE), PRI_SCORES -Scores Important: page(EFFECT_PAGE), PRI_SCORES_IMPORTANT, D_RESTARTABLE -Score Goal: page(EFFECT_PAGE), PRI_SCORE_GOAL, D_TIMEOUT -Credits: page(COMMON_PAGE), PRI_CREDITS -Tilt Warning: page(COMMON_PAGE), PRI_TILT_WARNING -Tilt: runner, page(COMMON_PAGE), PRI_TILT -Game Over: page(EFFECT_PAGE), PRI_GAME_OVER -Volume Change: page(EFFECT_PAGE), runner, PRI_VOLUME_CHANGE_DISPLAY, D_PAUSE -Slam Tilt: page(COMMON_PAGE), runner, PRI_SLAMTILT -Status Report: page(COMMON_PAGE), runner, PRI_STATUS -Nonfatal Error: page(EFFECT_PAGE), PRI_DEBUGGER -HSEntry: page(COMMON_PAGE), runner, PRI_HSENTRY -HSCredits: page(COMMON_PAGE), runner, PRI_HSENTRY -Match: page(COMMON_PAGE), runner, PRI_MATCH -Buyin Offer: page(COMMON_PAGE), PRI_MATCH -Locating Balls: page(EFFECT_PAGE), PRI_BALL_SEARCH -Player Tournament Ready: page(COMMON_PAGE), PRI_STATUS -System Reset: PRI_RESET, page(COMMON_PAGE) -# TODO : priority below? -Coin Door Buttons: page(COMMON_PAGE), PRI_JACKPOT -Plunge Ball: page(EFFECT_PAGE), PRI_SCORE_GOAL -Coin Door Power: page(COMMON_PAGE), PRI_JACKPOT -Ball Save: page(EFFECT_PAGE), c_decl(ball_save_deff), PRI_BALLSAVE -Enter Initials: page(COMMON_PAGE), PRI_HSENTRY -Enter PIN: page(COMMON_PAGE), PRI_PIN_ENTRY - -[leffs] -NULL: PRI_NULL -Amode: runner, PRI_AMODE, c_decl(system_amode_leff), page(COMMON_PAGE) -Tilt Warning: PRI_TILT_WARNING, GI(ALL), c_decl(tilt_warning_leff), page(COMMON_PAGE) -Tilt: runner, PRI_TILT, LAMPS(ALL), GI(ALL), c_decl(no_lights_leff), page(COMMON_PAGE) -Ball Save: shared, PRI_LEFF3, LAMPS(BALL_SAVE), page(COMMON_PAGE) +Ball Save: %ball-save [fonts] -mono5: mono9: num5x7: -lucida9: tinynum: var5: fixed6: -cu17: fixed10: term6: -times8: +symbol: bitmap8: +mono5: +lucida9: # used in common/score_deff_dmd.c only, could be replaced -[timers] -Ignore Tilt: - -[globalflags] -Ball At Plunger: -Coin Door Opened: +##################################################################################### +# the below system fonts were eliminated to allow more custom fonts +#times8: #replaced with term6 -- was only used on common/highscore.c for one line +#cu17: #replaced with fixed10 -- was only used on common/effect.c for one line diff --git a/platform/wpc/wpc-lamp.c b/platform/wpc/wpc-lamp.c new file mode 100644 index 000000000..5892551b2 --- /dev/null +++ b/platform/wpc/wpc-lamp.c @@ -0,0 +1,65 @@ + +#include +#include + +/** Runs periodically to update the physical lamp state. */ +/* RTT(name=lamp_rtt freq=2) */ +void lamp_rtt (void) +{ + U8 bits; + + /* Turn off the lamp circuits before recalculating. But don't + do this in native mode, because the simulator doesn't simulate + well-enough. */ +#ifdef CONFIG_NATIVE + pinio_write_lamp_strobe (0); +#else +#ifdef __m6809__ + /* On the 6809, avoid using the CLR instruction which is known to cause + problems in the WPC ASIC. Also, always write ROW first to avoid + spurious lamps. */ + __asm__ volatile ("clrb"); + __asm__ volatile ("stb\t" C_STRING (WPC_LAMP_ROW_OUTPUT)); + __asm__ volatile ("stb\t" C_STRING (WPC_LAMP_COL_STROBE)); +#else + pinio_write_lamp_data (0); + pinio_write_lamp_strobe (0); +#endif /* __m6809__ */ +#endif /* CONFIG_NATIVE */ + + /* Implement lamp power saver. When the timer is nonzero, it means + to keep the lamp circuits off for this many IRQ iterations. */ + if (unlikely (lamp_power_timer)) + { + --lamp_power_timer; + return; + } + + /* Compute the lamps to be turned on. */ + bits = platform_lamp_compute (lamp_strobe_column); + + /* Write the result to the hardware */ + pinio_write_lamp_data (bits); + pinio_write_lamp_strobe (lamp_strobe_mask); + + /* Advance the strobe value for the next iteration. + Keep this together with the above so that lamp_strobe_mask + is already in a register. */ + lamp_strobe_mask <<= 1; + if (lamp_strobe_mask == 0) + { + /* All columns strobed : reset strobe */ + lamp_strobe_mask++; + lamp_strobe_column = 0; + + /* After strobing all lamps, reload the power saver timer */ + lamp_power_timer = lamp_power_level; + } + else + { + /* Advance strobe to next position for next iteration */ + lamp_strobe_column++; + } +} + + diff --git a/platform/wpc/wpc-sol.c b/platform/wpc/wpc-sol.c new file mode 100644 index 000000000..d2591980e --- /dev/null +++ b/platform/wpc/wpc-sol.c @@ -0,0 +1,115 @@ + +#include +#include + +/** Return 0 if the given solenoid/flasher should be off, +else return the bitmask that reflects that solenoid's +position in the output register. */ +extern inline U8 platform_sol_timer_check (const U8 id) +{ + if (MACHINE_SOL_FLASHERP (id)) + if (likely (sol_timers[id - SOL_MIN_FLASHER] != 0)) + { + sol_timers[id - SOL_MIN_FLASHER]--; + + if (likely (sol_duty_state[id - SOL_MIN_FLASHER] & sol_duty_mask)) + return 1; + } + return 0; +} + + +/** Update the value 'bits' to reflect whether a specific solenoid +should be turned on at this instant. 'id' is the solenoid number. +bits stores the output state for an entire bank of 8 solenoids at +a time. */ +#define platform_sol_timer_contribute(id,bits) \ + if (platform_sol_timer_check (id)) { bits |= (1 << ((id) & (CHAR_BIT - 1))); } + + +/** Update a set of 8 solenoids that share the same output register. + * base_id is the solenoid number for the first solenoid in the set. + * asic_addr is the hardware register to be written with all 8 values + * at once. */ +extern inline void platform_sol_update_timed (const U8 set) +{ + register U8 out __areg__ = *sol_get_read_reg (set * CHAR_BIT); + + /* Update each of the 8 solenoids in the bank, updating timers + and calculating whether or not each should be on or off. */ + platform_sol_timer_contribute (set * CHAR_BIT + 0, out); + platform_sol_timer_contribute (set * CHAR_BIT + 1, out); + platform_sol_timer_contribute (set * CHAR_BIT + 2, out); + platform_sol_timer_contribute (set * CHAR_BIT + 3, out); + platform_sol_timer_contribute (set * CHAR_BIT + 4, out); + platform_sol_timer_contribute (set * CHAR_BIT + 5, out); + platform_sol_timer_contribute (set * CHAR_BIT + 6, out); + platform_sol_timer_contribute (set * CHAR_BIT + 7, out); + + /* Write the final output to the hardware */ + pinio_write_solenoid_set (set, out); +} + + +/** Like platform_sol_update_timed, but updates the Fliptronic outputs. + * The base_id and asic_addr are implied here. */ +extern inline void sol_update_fliptronic_powered (void) +{ + extern U8 fliptronic_powered_coil_outputs; + register U8 out __areg__ = fliptronic_powered_coil_outputs; + + /* Update each of the 8 solenoids in the bank, updating timers + and calculating whether or not each should be on or off. */ + platform_sol_timer_contribute (32, out); + platform_sol_timer_contribute (33, out); + platform_sol_timer_contribute (34, out); + platform_sol_timer_contribute (35, out); + platform_sol_timer_contribute (36, out); + platform_sol_timer_contribute (37, out); + platform_sol_timer_contribute (38, out); + platform_sol_timer_contribute (39, out); + + /* Write the final output to the hardware */ + fliptronic_powered_coil_outputs = out; +} + +extern inline void platform_sol_update_direct (const U8 sol_set) +{ + pinio_write_solenoid_set (sol_set, *sol_get_read_reg (sol_set * CHAR_BIT)); +} + + +/** Realtime update of the first set of flasher outputs */ +/* RTT(name=sol_update_rtt_0 freq=2) */ +void sol_update_rtt_0 (void) +{ + platform_sol_update_direct (0); + platform_sol_update_timed (2); +#ifdef CONFIG_PLATFORM_WPC + if (WPC_HAS_CAP (WPC_CAP_FLIPTRONIC)) + sol_update_fliptronic_powered (); +#endif +} + + +/** Realtime update of the second set of flasher outputs */ +/* RTT(name=sol_update_rtt_1 freq=2) */ +void sol_update_rtt_1 (void) +{ + platform_sol_update_direct (1); + platform_sol_update_timed (3); +#ifdef MACHINE_SOL_EXTBOARD1 + platform_sol_update_timed (5); +#endif + + /* Rotate the duty mask for the next iteration. */ + /* TODO - the assembly code generated here is not ideal. + It could be done in two instructions, by shifting and then + adding the carry. Need a way from gcc to request this. */ + sol_duty_mask <<= 1; + if (sol_duty_mask == 0) + sol_duty_mask = 1; +} + + + diff --git a/platform/wpc/wpc-switch.c b/platform/wpc/wpc-switch.c new file mode 100644 index 000000000..7b081b8e7 --- /dev/null +++ b/platform/wpc/wpc-switch.c @@ -0,0 +1,173 @@ + +#include +#include + +/* Before any switch data can be accessed on a WPC-S + * or WPC95 machine, we need to poll the PIC and see + * if the unlock code must be sent to it. On pre- + * security games, this is not necessary. + * + * The function is split into two pieces, to eliminate the + * need for delaying between writing and reading back. + */ +#if (MACHINE_PIC == 1) +void pic_rtt_unlock (void) +{ + /* We need to unlock it again. */ + extern U8 pic_unlock_code[3]; + + /* The unlock sequence is four bytes long, but we can't + write everything without some delay between bytes. + The 'null_function' calls are there just to delay for + a few tens of cycles. Although this slows the IRQ down, we + can't read switches until this is done, and it happens + infrequently, so the overhead is minimal. */ + wpc_write_pic (WPC_PIC_UNLOCK); + null_function (); + null_function (); + wpc_write_pic (pic_unlock_code[0]); + null_function (); + null_function (); + wpc_write_pic (pic_unlock_code[1]); + null_function (); + null_function (); + wpc_write_pic (pic_unlock_code[2]); + null_function (); + null_function (); +} +#endif + + +#if defined(CONFIG_PLATFORM_WPC) && defined(__m6809__) +extern inline void switch_rowpoll (const U8 col) +{ + /* Load the raw switch value from the hardware. */ + if (col == 0) + { + /* Column 0 = Dedicated Switches */ + __asm__ volatile ("ldb\t" C_STRING (WPC_SW_CABINET_INPUT)); + } + else if (col <= 8) + { + /* Columns 1-8 = Switch Matrix + Load method is different on PIC vs. non-PIC games. */ +#if (MACHINE_PIC == 1) + __asm__ volatile ("ldb\t" C_STRING (WPCS_PIC_READ)); +#else + __asm__ volatile ("ldb\t" C_STRING (WPC_SW_ROW_INPUT)); +#endif + } + else if (col == 9) + { + /* Column 9 = Flipper Inputs + Load method is different on WPC-95 vs. older Fliptronic games */ +#if (MACHINE_WPC95 == 1) + __asm__ volatile ("ldb\t" C_STRING (WPC95_FLIPPER_SWITCH_INPUT)); +#else + __asm__ volatile ("ldb\t" C_STRING (WPC_FLIPTRONIC_PORT_A)); +#endif + } + + /* Save the raw switch */ + __asm__ volatile ("stb\t%0" :: "m" (sw_raw[col]) ); + + /* Set up the column strobe for the next read (on the next + * iteration). Don't do this if the next read will be the dedicated + * switches. + * + * PIC vs. non-PIC games set up the column strobe differently. */ + if (col < 8) + { +#if (MACHINE_PIC == 1) + __asm__ volatile ( + "lda\t%0\n" + "\tsta\t" C_STRING (WPCS_PIC_WRITE) :: "n" (WPC_PIC_COLUMN (col)) ); +#else + __asm__ volatile ( + "lda\t%0\n" + "\tsta\t" C_STRING (WPC_SW_COL_STROBE) :: "n" (1 << col) ); +#endif + } + + /* Update stable/unstable states. This is an optimized + version of the C code below, which works around some GCC + problems that are unlikely to ever be fixed. I took the + gcc output and optimized it by hand. */ + __asm__ volatile ( + "eorb %0\n" + "\ttfr b,a\n" + "\tandb %1\n" + "\tsta %1\n" + "\torb %2\n" + "\tstb %2\n" + "\tcoma\n" + "\tanda %2\n" + "\tora %3\n" + "\tsta %3" :: + "m" (sw_logical[col]), "m" (sw_edge[col]), + "m" (sw_stable[col]), "m" (sw_unstable[col]) ); +} + +#else /* !__m6809__ */ + +/** Poll a single switch column. + * Column 0 corresponds to the cabinet switches. + * Columns 1-8 refer to the playfield columns. + * It is assumed that columns are polled in order, as + * during the read of column N, the strobe is set so that + * the next read will come from column N+1. + */ +extern inline void switch_rowpoll (const U8 col) +{ + U8 edge; + + /* + * Read the raw switch. + */ + if (col == 0) + sw_raw[col] = pinio_read_dedicated_switches (); + else if (col <= 8) + sw_raw[col] = pinio_read_switch_rows (); + else if (col == 9) + sw_raw[col] = wpc_read_flippers (); + + /* Set up the column strobe for the next read (on the next + * iteration) */ + if (col < 8) + pinio_write_switch_column (col); + + /* Update stable/unstable states. */ + 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; +} + +#endif + + + +/* RTT(name=switch_rtt freq=2) */ +void switch_rtt (void) +{ + switch_rowpoll (0); + if (switch_scanning_ok ()) + { + switch_rowpoll (1); + switch_rowpoll (2); + switch_rowpoll (3); + switch_rowpoll (4); + switch_rowpoll (5); + switch_rowpoll (6); + switch_rowpoll (7); + switch_rowpoll (8); + } + +#if (MACHINE_FLIPTRONIC == 1) + /* Poll the Fliptronic flipper switches */ + switch_rowpoll (9); +#endif +} + + + diff --git a/platform/wpc/wpc.ild b/platform/wpc/wpc.ild index 26828c2cc..05d5ee31b 100644 --- a/platform/wpc/wpc.ild +++ b/platform/wpc/wpc.ild @@ -1,3 +1,8 @@ +################################################################################## +################################################################################## +#### ATTRACT MODE +################################################################################## +################################################################################## IMG_FREEWPC_SMALL: images/freewpc_logo_6.pgm images/freewpc_logo_5.pgm images/freewpc_logo_4.pgm @@ -5,3 +10,1168 @@ images/freewpc_logo_3.pgm images/freewpc_logo_2.pgm images/freewpc_logo_1.pgm IMG_FREEWPC: images/freewpc_logo.pgm + + + + +################################################################################## +################################################################################## +#### ROLLOVERS / BALLSAVE +################################################################################## +################################################################################## +IMG_GUN_START: images/demo_time/gun_002.pgm +images/demo_time/gun_007.pgm +images/demo_time/gun_012.pgm +images/demo_time/gun_017.pgm +IMG_GUN_END: images/demo_time/gun_022.pgm + + + + +################################################################################## +################################################################################## +#### UNDERGROUND / SUBWAY / PLUNGE BALL +################################################################################## +################################################################################## +IMG_PHOENIX_A2_START: images/demo_time/phoenix_a_662.pgm +images/demo_time/phoenix_a_665.pgm +images/demo_time/phoenix_a_668.pgm +images/demo_time/phoenix_a_670.pgm +images/demo_time/phoenix_a_672.pgm +images/demo_time/phoenix_a_675.pgm +images/demo_time/phoenix_a_678.pgm +images/demo_time/phoenix_a_680.pgm +IMG_PHOENIX_A2_END: images/demo_time/phoenix_a_682.pgm + +IMG_JOHN_SPARTAN_A_START: images/cryoprison/john_s_1_107.pgm +images/cryoprison/john_s_1_108.pgm +images/cryoprison/john_s_1_111.pgm +images/cryoprison/john_s_1_113.pgm +images/cryoprison/john_s_1_115.pgm +images/cryoprison/john_s_1_143.pgm +images/cryoprison/john_s_1_147.pgm +images/cryoprison/john_s_1_149.pgm +images/cryoprison/john_s_1_151.pgm +images/cryoprison/john_s_1_153.pgm +images/cryoprison/john_s_1_155.pgm +images/cryoprison/john_s_1_157.pgm +images/cryoprison/john_s_1_161.pgm +images/cryoprison/john_s_1_163.pgm +IMG_JOHN_SPARTAN_A_END: images/cryoprison/john_s_1_165.pgm + +IMG_SIMON_FIRE1_START: images/wasteland/simon_fortress_1_12.pgm +images/wasteland/simon_fortress_1_14.pgm +images/wasteland/simon_fortress_1_16.pgm +images/wasteland/simon_fortress_1_18.pgm +images/wasteland/simon_fortress_1_20.pgm +images/wasteland/simon_fortress_1_22.pgm +images/wasteland/simon_fortress_1_24.pgm +images/wasteland/simon_fortress_1_27.pgm +IMG_SIMON_FIRE1_END: images/wasteland/simon_fortress_1_28.pgm + + + + +################################################################################## +################################################################################## +#### OPENING SEQUENCE +################################################################################## +################################################################################## +IMG_JAIL_A_START: images/capture_simon/jail_1_150.pgm +images/capture_simon/jail_1_154.pgm +images/capture_simon/jail_1_158.pgm +images/capture_simon/jail_1_162.pgm +images/capture_simon/jail_1_166.pgm +images/capture_simon/jail_1_170.pgm +images/capture_simon/jail_1_174.pgm +images/capture_simon/jail_1_178.pgm +images/capture_simon/jail_1_182.pgm +images/capture_simon/jail_1_186.pgm +images/capture_simon/jail_1_190.pgm +images/capture_simon/jail_1_194.pgm +images/capture_simon/jail_1_198.pgm +images/capture_simon/jail_1_202.pgm +images/capture_simon/jail_1_206.pgm +images/capture_simon/jail_1_210.pgm +images/capture_simon/jail_1_214.pgm +images/capture_simon/jail_1_218.pgm +images/capture_simon/jail_1_222.pgm +images/capture_simon/jail_1_226.pgm +images/capture_simon/jail_1_230.pgm +images/capture_simon/jail_1_234.pgm +images/capture_simon/jail_1_238.pgm +images/capture_simon/jail_1_242.pgm +images/capture_simon/jail_1_246.pgm +images/capture_simon/jail_1_250.pgm +images/capture_simon/jail_1_254.pgm +images/capture_simon/jail_1_258.pgm +images/capture_simon/jail_1_262.pgm +images/capture_simon/jail_1_266.pgm +images/capture_simon/jail_1_270.pgm +images/capture_simon/jail_1_274.pgm +images/capture_simon/jail_1_278.pgm +images/capture_simon/jail_1_282.pgm +images/capture_simon/jail_1_286.pgm +images/capture_simon/jail_1_290.pgm +images/capture_simon/jail_1_294.pgm +images/capture_simon/jail_1_298.pgm +images/capture_simon/jail_1_302.pgm +images/capture_simon/jail_1_306.pgm +images/capture_simon/jail_1_310.pgm +images/capture_simon/jail_1_314.pgm +images/capture_simon/jail_1_318.pgm +images/capture_simon/jail_1_322.pgm +images/capture_simon/jail_1_326.pgm +images/capture_simon/jail_1_330.pgm +images/capture_simon/jail_1_334.pgm +images/capture_simon/jail_1_338.pgm +images/capture_simon/jail_1_342.pgm +images/capture_simon/jail_1_346.pgm +images/capture_simon/jail_1_350.pgm +images/capture_simon/jail_1_354.pgm +images/capture_simon/jail_1_358.pgm +images/capture_simon/jail_1_362.pgm +images/capture_simon/jail_1_366.pgm +images/capture_simon/jail_1_370.pgm +images/capture_simon/jail_1_374.pgm +images/capture_simon/jail_1_378.pgm +images/capture_simon/jail_1_382.pgm +images/capture_simon/jail_1_386.pgm +images/capture_simon/jail_1_390.pgm +images/capture_simon/jail_1_394.pgm +images/capture_simon/jail_1_437.pgm +images/capture_simon/jail_1_441.pgm +images/capture_simon/jail_1_445.pgm +images/capture_simon/jail_1_449.pgm +IMG_JAIL_A_END: images/capture_simon/jail_1_452.pgm + + + + +################################################################################## +################################################################################## +#### LOCK FREEZE +################################################################################## +################################################################################## +IMG_FREEZE_A_START: images/freeze/freeze_601.pgm +images/freeze/freeze_603.pgm +images/freeze/freeze_605.pgm +images/freeze/freeze_606.pgm +images/freeze/freeze_608.pgm +images/freeze/freeze_610.pgm +images/freeze/freeze_611.pgm +images/freeze/freeze_613.pgm +images/freeze/freeze_615.pgm +images/freeze/freeze_616.pgm +IMG_FREEZE_A_MID: images/freeze/freeze_618.pgm +images/freeze/freeze_620.pgm +images/freeze/freeze_621.pgm +images/freeze/freeze_623.pgm +images/freeze/freeze_625.pgm +images/freeze/freeze_628.pgm +images/freeze/freeze_630.pgm +images/freeze/freeze_631.pgm +images/freeze/freeze_633.pgm +images/freeze/freeze_635.pgm +IMG_FREEZE_A_END: images/freeze/freeze_636.pgm + +IMG_WASTELAND_B1_START: images/wasteland/museum_8737.pgm +images/wasteland/museum_8738.pgm +images/wasteland/museum_8740.pgm +images/wasteland/museum_8741.pgm +images/wasteland/museum_8743.pgm +images/wasteland/museum_8744.pgm +images/wasteland/museum_8745.pgm +images/wasteland/museum_8746.pgm +images/wasteland/museum_8748.pgm +images/wasteland/museum_8752.pgm +images/wasteland/museum_8754.pgm +images/wasteland/museum_8755.pgm +images/wasteland/museum_8767.pgm +images/wasteland/museum_8768.pgm +images/wasteland/museum_8769.pgm +images/wasteland/museum_8770.pgm +images/wasteland/museum_8772.pgm +IMG_WASTELAND_B1_END: images/wasteland/museum_8774.pgm + +IMG_WASTELAND_B2_START: images/wasteland/museum_8776.pgm +images/wasteland/museum_8780.pgm +images/wasteland/museum_8781.pgm +images/wasteland/museum_8783.pgm +IMG_WASTELAND_B2_END: images/wasteland/museum_8784.pgm + + + +################################################################################## +################################################################################## +#### CAR CRASH +################################################################################## +################################################################################## +IMG_CAR_CRASH_START: images/car_chase/carchase_5531.pgm +images/car_chase/carchase_5534.pgm +images/car_chase/carchase_5537.pgm +images/car_chase/carchase_5539.pgm +images/car_chase/carchase_5541.pgm +images/car_chase/carchase_5544.pgm +images/car_chase/carchase_5547.pgm +images/car_chase/carchase_5549.pgm +images/car_chase/carchase_5551.pgm +images/car_chase/carchase_5554.pgm +images/car_chase/carchase_5557.pgm +images/car_chase/carchase_5559.pgm +images/car_chase/carchase_5561.pgm +images/car_chase/carchase_5564.pgm +images/car_chase/carchase_5565.pgm +images/car_chase/carchase_5567.pgm +IMG_CAR_CRASH_END: images/car_chase/carchase_5569.pgm + + + + +################################################################################## +################################################################################## +#### TOP POPPER +################################################################################## +################################################################################## +IMG_SIMON_E_START: images/wasteland/simon_laugh_429.pgm +images/wasteland/simon_laugh_431.pgm +images/wasteland/simon_laugh_433.pgm +images/wasteland/simon_laugh_435.pgm +images/wasteland/simon_laugh_437.pgm +images/wasteland/simon_laugh_439.pgm +IMG_SIMON_E_END: images/wasteland/simon_laugh_441.pgm + +IMG_CLAW_A_START: images/cryoprison/claw_1_170.pgm +images/cryoprison/claw_1_174.pgm +images/cryoprison/claw_1_178.pgm +images/cryoprison/claw_1_180.pgm +images/cryoprison/claw_1_182.pgm +images/cryoprison/claw_1_186.pgm +images/cryoprison/claw_1_188.pgm +images/cryoprison/claw_1_190.pgm +images/cryoprison/claw_1_194.pgm +images/cryoprison/claw_1_196.pgm +images/cryoprison/claw_1_198.pgm +images/cryoprison/claw_1_202.pgm +images/cryoprison/claw_1_204.pgm +images/cryoprison/claw_1_206.pgm +images/cryoprison/claw_1_210.pgm +images/cryoprison/claw_1_212.pgm +images/cryoprison/claw_1_214.pgm +images/cryoprison/claw_1_218.pgm +IMG_CLAW_A_END: images/cryoprison/claw_1_220.pgm + +IMG_CLAW_B_START: images/cryoprison/claw_2_324.pgm +images/cryoprison/claw_2_328.pgm +images/cryoprison/claw_2_330.pgm +images/cryoprison/claw_2_332.pgm +images/cryoprison/claw_2_336.pgm +images/cryoprison/claw_2_338.pgm +images/cryoprison/claw_2_340.pgm +images/cryoprison/claw_2_344.pgm +images/cryoprison/claw_2_346.pgm +images/cryoprison/claw_2_348.pgm +images/cryoprison/claw_2_352.pgm +images/cryoprison/claw_2_354.pgm +images/cryoprison/claw_2_356.pgm +images/cryoprison/claw_2_360.pgm +images/cryoprison/claw_2_362.pgm +images/cryoprison/claw_2_364.pgm +IMG_CLAW_B_END: images/cryoprison/claw_2_368.pgm + + + + +################################################################################## +################################################################################## +#### EJECT -- RETINA SCAN +################################################################################## +################################################################################## +IMG_EYE_START: images/eyeball/eye_2713.pgm +images/eyeball/eye_2714.pgm +images/eyeball/eye_2715.pgm +images/eyeball/eye_2716.pgm +images/eyeball/eye_2717.pgm +images/eyeball/eye_2718.pgm +images/eyeball/eye_2719.pgm +images/eyeball/eye_2736.pgm +images/eyeball/eye_2740.pgm +images/eyeball/eye_2744.pgm +images/eyeball/eye_2746.pgm +images/eyeball/eye_2747.pgm +images/eyeball/eye_2749.pgm +images/eyeball/eye_2751.pgm +images/eyeball/eye_2759.pgm +images/eyeball/eye_2771.pgm +images/eyeball/eye_2773.pgm +images/eyeball/eye_2776.pgm +images/eyeball/eye_2777.pgm +images/eyeball/eye_2778.pgm +images/eyeball/eye_2779.pgm +images/eyeball/eye_2780.pgm +images/eyeball/eye_2781.pgm +images/eyeball/eye_2782.pgm +images/eyeball/eye_2783.pgm +images/eyeball/eye_2784.pgm +IMG_EYE_27: images/eyeball/eye_2785.pgm +IMG_EYE_28: images/eyeball/eye_2786.pgm +IMG_EYE_END: images/eyeball/eye_2787.pgm + +IMG_EYE_B_START: images/eyeball/eye_2909.pgm +IMG_EYE_B_2: images/eyeball/eye_2914.pgm +images/eyeball/eye_2921.pgm +images/eyeball/eye_2926.pgm +images/eyeball/eye_2933.pgm +images/eyeball/eye_2938.pgm +images/eyeball/eye_2945.pgm +images/eyeball/eye_2950.pgm +images/eyeball/eye_2957.pgm +images/eyeball/eye_2962.pgm +images/eyeball/eye_2969.pgm +images/eyeball/eye_2974.pgm +images/eyeball/eye_2981.pgm +images/eyeball/eye_2986.pgm +images/eyeball/eye_2993.pgm +IMG_EYE_B_END: images/eyeball/eye_2998.pgm + + + + +################################################################################## +################################################################################## +#### CRYOCLAW +################################################################################## +################################################################################## +IMG_CRYOPRISON_RUN_0: images/cryoprison/claw_both_up.pgm +IMG_CRYOPRISON_RUN_1: images/cryoprison/claw_l1_r2.pgm +IMG_CRYOPRISON_RUN_2: images/cryoprison/claw_l1_r3.pgm +IMG_CRYOPRISON_RUN_3: images/cryoprison/claw_l2_r1.pgm +IMG_CRYOPRISON_RUN_4: images/cryoprison/claw_l3_r1.pgm +IMG_CRYOPRISON_RUN_5: images/cryoprison/claw_l4_r1.pgm +IMG_CRYOPRISON_RUN_6: images/cryoprison/claw_l4_r2.pgm +IMG_CRYOPRISON_RUN_7: images/cryoprison/claw_l4_r3.pgm +IMG_CRYOPRISON_RUN_8: images/cryoprison/claw_l4_r4.pgm +IMG_CRYOPRISON_RUN_9: images/cryoprison/claw_l4_r5.pgm + + + + +################################################################################## +################################################################################## +#### EXPLODE MODE +################################################################################## +################################################################################## +IMG_FORTRESS_C_START: images/fortress/1museum_a_001.pgm +images/fortress/1museum_a_003.pgm +images/fortress/1museum_a_005.pgm +images/fortress/1museum_a_007.pgm +images/fortress/1museum_a_009.pgm +images/fortress/1museum_a_014.pgm +images/fortress/1museum_a_022.pgm +images/fortress/1museum_a_030.pgm +images/fortress/1museum_a_038.pgm +IMG_FORTRESS_C_MID: images/fortress/1museum_a_046.pgm +images/fortress/1museum_a_054.pgm +images/fortress/1museum_a_062.pgm +images/fortress/1museum_a_070.pgm +images/fortress/1museum_a_078.pgm +images/fortress/1museum_a_086.pgm +images/fortress/1museum_a_094.pgm +images/fortress/1museum_a_102.pgm +images/fortress/1museum_a_110.pgm +images/fortress/1museum_a_118.pgm +images/fortress/1museum_a_126.pgm +images/fortress/1museum_a_134.pgm +images/fortress/1museum_a_142.pgm +images/fortress/1museum_a_150.pgm +images/fortress/1museum_a_158.pgm +images/fortress/1museum_a_167.pgm +images/fortress/1museum_a_175.pgm +images/fortress/1museum_a_183.pgm +images/fortress/1museum_a_191.pgm +IMG_FORTRESS_C_END: images/fortress/1museum_a_199.pgm + + + + +################################################################################## +################################################################################## +#### CAPTURE SIMON MODE +################################################################################## +################################################################################## +IMG_SIMON_B_START: images/wasteland/simon_2_65.pgm +images/wasteland/simon_2_69.pgm +images/wasteland/simon_2_73.pgm +images/wasteland/simon_2_77.pgm +images/wasteland/simon_2_81.pgm +images/wasteland/simon_2_83.pgm +images/wasteland/simon_2_85.pgm +images/wasteland/simon_2_89.pgm +images/wasteland/simon_2_91.pgm +images/wasteland/simon_2_93.pgm +images/wasteland/simon_2_97.pgm +IMG_SIMON_B_END: images/wasteland/simon_2_99.pgm + +IMG_CAPSIMON_A_START: images/capture_simon/cap_simon_353.pgm +images/capture_simon/cap_simon_365.pgm +images/capture_simon/cap_simon_377.pgm +images/capture_simon/cap_simon_389.pgm +images/capture_simon/cap_simon_401.pgm +images/capture_simon/cap_simon_413.pgm +images/capture_simon/cap_simon_425.pgm +images/capture_simon/cap_simon_437.pgm +images/capture_simon/cap_simon_442.pgm +IMG_CAPSIMON_A_END: images/capture_simon/cap_simon_449.pgm + + + + + +################################################################################## +################################################################################## +#### PRISON BREAK MODE +################################################################################## +################################################################################## +IMG_JAIL_BREAK_START: images/capture_simon/jail_1467.pgm +images/capture_simon/jail_1472.pgm +images/capture_simon/jail_1477.pgm +images/capture_simon/jail_1479.pgm +images/capture_simon/jail_1482.pgm +images/capture_simon/jail_1484.pgm +images/capture_simon/jail_1487.pgm +images/capture_simon/jail_1489.pgm +images/capture_simon/jail_1492.pgm +images/capture_simon/jail_1494.pgm +IMG_JAIL_BREAK_END: images/capture_simon/jail_1497.pgm + +IMG_ASSOC_BOB_START: images/demo_time/assoc_bob_01.pgm +images/demo_time/assoc_bob_06.pgm +images/demo_time/assoc_bob_08.pgm +images/demo_time/assoc_bob_11.pgm +images/demo_time/assoc_bob_16.pgm +images/demo_time/assoc_bob_18.pgm +images/demo_time/assoc_bob_21.pgm +images/demo_time/assoc_bob_26.pgm +images/demo_time/assoc_bob_28.pgm +IMG_ASSOC_BOB_END: images/demo_time/assoc_bob_31.pgm + +IMG_CHIEF_EARLE2_START: images/side_chars/chief_earle_2_698.pgm +images/side_chars/chief_earle_2_702.pgm +images/side_chars/chief_earle_2_703.pgm +images/side_chars/chief_earle_2_706.pgm +images/side_chars/chief_earle_2_710.pgm +images/side_chars/chief_earle_2_711.pgm +images/side_chars/chief_earle_2_714.pgm +images/side_chars/chief_earle_2_718.pgm +IMG_CHIEF_EARLE2_END: images/side_chars/chief_earle_2_721.pgm + +IMG_PRISON_BREAKOUT_B_START: images/cryoprison/prison_break_2_002.pgm +images/cryoprison/prison_break_2_004.pgm +images/cryoprison/prison_break_2_008.pgm +images/cryoprison/prison_break_2_009.pgm +images/cryoprison/prison_break_2_010.pgm +images/cryoprison/prison_break_2_012.pgm +images/cryoprison/prison_break_2_014.pgm +images/cryoprison/prison_break_2_016.pgm +images/cryoprison/prison_break_2_018.pgm +images/cryoprison/prison_break_2_020.pgm +images/cryoprison/prison_break_2_022.pgm +images/cryoprison/prison_break_2_024.pgm +images/cryoprison/prison_break_2_026.pgm +images/cryoprison/prison_break_2_028.pgm +images/cryoprison/prison_break_2_029.pgm +IMG_PRISON_BREAKOUT_B_MID: images/cryoprison/prison_break_2_031.pgm + +images/cryoprison/prison_break_2_051.pgm +images/cryoprison/prison_break_2_058.pgm +images/cryoprison/prison_break_2_059.pgm +images/cryoprison/prison_break_2_060.pgm +images/cryoprison/prison_break_2_062.pgm +images/cryoprison/prison_break_2_063.pgm +images/cryoprison/prison_break_2_065.pgm +images/cryoprison/prison_break_2_066.pgm +IMG_PRISON_BREAKOUT_B_END: images/cryoprison/prison_break_2_067.pgm + +IMG_PRISON_BREAK_D1_START: images/cryoprison/prison_break_5_265.pgm +images/cryoprison/prison_break_5_266.pgm +images/cryoprison/prison_break_5_267.pgm +images/cryoprison/prison_break_5_268.pgm +images/cryoprison/prison_break_5_269.pgm +images/cryoprison/prison_break_5_271.pgm +images/cryoprison/prison_break_5_273.pgm +images/cryoprison/prison_break_5_274.pgm +images/cryoprison/prison_break_5_275.pgm +images/cryoprison/prison_break_5_277.pgm +images/cryoprison/prison_break_5_278.pgm +IMG_PRISON_BREAK_D1_END: images/cryoprison/prison_break_5_279.pgm + +IMG_PRISON_BREAK_D2_START: images/cryoprison/prison_break_5_289.pgm +images/cryoprison/prison_break_5_290.pgm +images/cryoprison/prison_break_5_291.pgm +images/cryoprison/prison_break_5_293.pgm +images/cryoprison/prison_break_5_294.pgm +images/cryoprison/prison_break_5_295.pgm +images/cryoprison/prison_break_5_297.pgm +images/cryoprison/prison_break_5_298.pgm +images/cryoprison/prison_break_5_299.pgm +images/cryoprison/prison_break_5_301.pgm +IMG_PRISON_BREAK_D2_END: images/cryoprison/prison_break_5_302.pgm + + + + + +################################################################################## +################################################################################## +#### CAR CHASE MODE +################################################################################## +################################################################################## +IMG_CARCHASE_A_START: images/car_chase/carchase_626.pgm +images/car_chase/carchase_629.pgm +images/car_chase/carchase_632.pgm +images/car_chase/carchase_634.pgm +images/car_chase/carchase_637.pgm +images/car_chase/carchase_639.pgm +images/car_chase/carchase_642.pgm +images/car_chase/carchase_644.pgm +images/car_chase/carchase_647.pgm +IMG_CARCHASE_A_END: images/car_chase/carchase_649.pgm + +IMG_CARCHASE_B_START: images/car_chase/carchase_969.pgm +images/car_chase/carchase_972.pgm +images/car_chase/carchase_974.pgm +images/car_chase/carchase_977.pgm +images/car_chase/carchase_979.pgm +images/car_chase/carchase_982.pgm +images/car_chase/carchase_984.pgm +images/car_chase/carchase_987.pgm +images/car_chase/carchase_989.pgm +images/car_chase/carchase_992.pgm +IMG_CARCHASE_B_END: images/car_chase/carchase_994.pgm + +IMG_CARCHASE_C_START: images/car_chase/carchase_1001.pgm +images/car_chase/carchase_1002.pgm +images/car_chase/carchase_1004.pgm +images/car_chase/carchase_1006.pgm +images/car_chase/carchase_1007.pgm +images/car_chase/carchase_1009.pgm +images/car_chase/carchase_1011.pgm +images/car_chase/carchase_1012.pgm +images/car_chase/carchase_1014.pgm +images/car_chase/carchase_1016.pgm +images/car_chase/carchase_1019.pgm +IMG_CARCHASE_C_END: images/car_chase/carchase_1021.pgm + +IMG_CARCHASE_D_START: images/car_chase/carchase_1158.pgm +images/car_chase/carchase_1161.pgm +images/car_chase/carchase_1163.pgm +images/car_chase/carchase_1166.pgm +images/car_chase/carchase_1168.pgm +images/car_chase/carchase_1171.pgm +images/car_chase/carchase_1173.pgm +images/car_chase/carchase_1176.pgm +images/car_chase/carchase_1178.pgm +images/car_chase/carchase_1181.pgm +images/car_chase/carchase_1183.pgm +images/car_chase/carchase_1186.pgm +images/car_chase/carchase_1188.pgm +IMG_CARCHASE_D_END: images/car_chase/carchase_1191.pgm + +IMG_CARCHASE_E_START: images/car_chase/carchase_2310.pgm +images/car_chase/carchase_2312.pgm +images/car_chase/carchase_2315.pgm +images/car_chase/carchase_2317.pgm +images/car_chase/carchase_2320.pgm +images/car_chase/carchase_2322.pgm +images/car_chase/carchase_2325.pgm +images/car_chase/carchase_2327.pgm +images/car_chase/carchase_2330.pgm +images/car_chase/carchase_2332.pgm +images/car_chase/carchase_2499.pgm +images/car_chase/carchase_2501.pgm +images/car_chase/carchase_2504.pgm +images/car_chase/carchase_2506.pgm +images/car_chase/carchase_2509.pgm +images/car_chase/carchase_2511.pgm +images/car_chase/carchase_2514.pgm +IMG_CARCHASE_E_END: images/car_chase/carchase_2516.pgm + +IMG_CARCHASE_F1_START: images/car_chase/carchase_3718.pgm +images/car_chase/carchase_3720.pgm +images/car_chase/carchase_3722.pgm +images/car_chase/carchase_3725.pgm +images/car_chase/carchase_3728.pgm +images/car_chase/carchase_3730.pgm +images/car_chase/carchase_3732.pgm +images/car_chase/carchase_3735.pgm +images/car_chase/carchase_3738.pgm +images/car_chase/carchase_3740.pgm +images/car_chase/carchase_3742.pgm +images/car_chase/carchase_3745.pgm +images/car_chase/carchase_3748.pgm +images/car_chase/carchase_3750.pgm +images/car_chase/carchase_3752.pgm +IMG_CARCHASE_F1_END: images/car_chase/carchase_3755.pgm + +IMG_CARCHASE_F2_START: images/car_chase/carchase_3782.pgm +images/car_chase/carchase_3784.pgm +images/car_chase/carchase_3786.pgm +images/car_chase/carchase_3789.pgm +images/car_chase/carchase_3792.pgm +images/car_chase/carchase_3794.pgm +images/car_chase/carchase_3796.pgm +images/car_chase/carchase_3799.pgm +images/car_chase/carchase_3802.pgm +images/car_chase/carchase_3804.pgm +images/car_chase/carchase_3806.pgm +images/car_chase/carchase_3809.pgm +images/car_chase/carchase_3812.pgm +images/car_chase/carchase_3814.pgm +IMG_CARCHASE_F2_END: images/car_chase/carchase_3816.pgm + +IMG_CARCHASE_H_START: images/car_chase/carchase_5225.pgm +images/car_chase/carchase_5227.pgm +images/car_chase/carchase_5230.pgm +images/car_chase/carchase_5233.pgm +images/car_chase/carchase_5235.pgm +images/car_chase/carchase_5237.pgm +images/car_chase/carchase_5240.pgm +images/car_chase/carchase_5243.pgm +images/car_chase/carchase_5504.pgm +images/car_chase/carchase_5505.pgm +images/car_chase/carchase_5506.pgm +images/car_chase/carchase_5509.pgm +IMG_CARCHASE_H_END: images/car_chase/carchase_5510.pgm + +IMG_CARCHASE_J_START: images/car_chase/carchase_a_03.pgm +images/car_chase/carchase_a_05.pgm +images/car_chase/carchase_a_07.pgm +images/car_chase/carchase_a_10.pgm +images/car_chase/carchase_a_13.pgm +images/car_chase/carchase_a_15.pgm +images/car_chase/carchase_a_17.pgm +images/car_chase/carchase_a_20.pgm +images/car_chase/carchase_a_23.pgm +images/car_chase/carchase_a_25.pgm +images/car_chase/carchase_a_27.pgm +images/car_chase/carchase_a_30.pgm +images/car_chase/carchase_a_33.pgm +images/car_chase/carchase_a_35.pgm +images/car_chase/carchase_a_37.pgm +images/car_chase/carchase_a_40.pgm +images/car_chase/carchase_a_43.pgm +images/car_chase/carchase_a_45.pgm +images/car_chase/carchase_a_47.pgm +IMG_CARCHASE_J_END: images/car_chase/carchase_a_50.pgm + + + + +################################################################################## +################################################################################## +#### FORTRESS MULTIBALL +################################################################################## +################################################################################## +IMG_FORTRESS_RUN_0: images/fortress/fortress_background0.pgm +IMG_FORTRESS_RUN_1: images/fortress/fortress_background1.pgm +IMG_FORTRESS_RUN_2: images/fortress/fortress_background2.pgm +IMG_FORTRESS_RUN_3: images/fortress/fortress_background3.pgm +IMG_FORTRESS_RUN_4: images/fortress/fortress_background4.pgm + +IMG_FORTRESS_A_START: images/fortress/museum_a_001.pgm +images/fortress/museum_a_007.pgm +images/fortress/museum_a_013.pgm +images/fortress/museum_a_019.pgm +images/fortress/museum_a_025.pgm +images/fortress/museum_a_031.pgm +images/fortress/museum_a_037.pgm +images/fortress/museum_a_043.pgm +images/fortress/museum_a_049.pgm +images/fortress/museum_a_055.pgm +images/fortress/museum_a_106.pgm +images/fortress/museum_a_110.pgm +images/fortress/museum_a_114.pgm +images/fortress/museum_a_118.pgm +images/fortress/museum_a_122.pgm +images/fortress/museum_a_126.pgm +images/fortress/museum_a_130.pgm +images/fortress/museum_a_134.pgm +images/fortress/museum_a_138.pgm +images/fortress/museum_a_142.pgm +images/fortress/museum_a_146.pgm +IMG_FORTRESS_A_END: images/fortress/museum_a_154.pgm + +IMG_FORTRESS_D1_START: images/fortress/fortress759.pgm +images/fortress/fortress763.pgm +images/fortress/fortress765.pgm +images/fortress/fortress769.pgm +images/fortress/fortress771.pgm +images/fortress/fortress775.pgm +images/fortress/fortress777.pgm +images/fortress/fortress781.pgm +images/fortress/fortress783.pgm +images/fortress/fortress787.pgm +images/fortress/fortress789.pgm +IMG_FORTRESS_D1_END: images/fortress/fortress793.pgm + +IMG_FORTRESS_D2_START: images/fortress/fortress_2_0203.pgm +images/fortress/fortress_2_0207.pgm +images/fortress/fortress_2_0211.pgm +images/fortress/fortress_2_0215.pgm +images/fortress/fortress_2_0219.pgm +images/fortress/fortress_2_590.pgm +images/fortress/fortress_2_594.pgm +IMG_FORTRESS_D2_END: images/fortress/fortress_2_598.pgm + +IMG_FORTRESS_D3_START: images/fortress/fortress_2_770.pgm +images/fortress/fortress_2_774.pgm +images/fortress/fortress_2_778.pgm +images/fortress/fortress_2_782.pgm +images/fortress/fortress_2_834.pgm +IMG_FORTRESS_D3_END: images/fortress/fortress_2_838.pgm + +IMG_FORTRESS_D4_START: images/fortress/fortress_2_842.pgm +images/fortress/fortress_2_846.pgm +images/fortress/fortress_2_850.pgm +IMG_FORTRESS_D4_END: images/fortress/fortress_2_854.pgm + +IMG_BURN_FORTRESS_START: images/fortress/burn_fortress_1_63.pgm +images/fortress/burn_fortress_1_65.pgm +images/fortress/burn_fortress_1_67.pgm +images/fortress/burn_fortress_1_69.pgm +images/fortress/burn_fortress_1_71.pgm +images/fortress/burn_fortress_1_73.pgm +images/fortress/burn_fortress_1_75.pgm +images/fortress/burn_fortress_1_79.pgm +images/fortress/burn_fortress_1_81.pgm +IMG_BURN_FORTRESS_END: images/fortress/burn_fortress_1_83.pgm + + + + +################################################################################## +################################################################################## +#### MUSEUM MULTIBALL +################################################################################## +################################################################################## +IMG_MUSEUM_C1_START: images/museum/museum_7294.pgm +images/museum/museum_7301.pgm +images/museum/museum_7306.pgm +images/museum/museum_7313.pgm +images/museum/museum_7318.pgm +IMG_MUSEUM_C1_END: images/museum/museum_7325.pgm + +IMG_MUSEUM_C2_START: images/museum/museum_7960.pgm +images/museum/museum_7963.pgm +images/museum/museum_7965.pgm +images/museum/museum_7968.pgm +images/museum/museum_7970.pgm +images/museum/museum_7975.pgm +images/museum/museum_7978.pgm +images/museum/museum_7981.pgm +images/museum/museum_7984.pgm +images/museum/museum_8005.pgm +IMG_MUSEUM_C2_END: images/museum/museum_8008.pgm + +IMG_MUSEUM_D1_START: images/museum/museum_0289.pgm +images/museum/museum_0295.pgm +images/museum/museum_0301.pgm +images/museum/museum_0307.pgm +images/museum/museum_0319.pgm +IMG_MUSEUM_D1_END: images/museum/museum_0325.pgm + +IMG_MUSEUM_D2_START: images/museum/museum_4672.pgm +images/museum/museum_4679.pgm +images/museum/museum_4684.pgm +images/museum/museum_4691.pgm +images/museum/museum_4696.pgm +IMG_MUSEUM_D2_END: images/museum/museum_4703.pgm + +IMG_MUSEUM_D3_START: images/museum/museum_4862.pgm +images/museum/museum_4863.pgm +images/museum/museum_4864.pgm +images/museum/museum_4865.pgm +IMG_MUSEUM_D3_END: images/museum/museum_4866.pgm + +IMG_FIGHT_A_START: images/wasteland/fight_1_682.pgm +images/wasteland/fight_1_683.pgm +images/wasteland/fight_1_684.pgm +images/wasteland/fight_1_686.pgm +images/wasteland/fight_1_687.pgm +images/wasteland/fight_1_688.pgm +images/wasteland/fight_1_690.pgm +images/wasteland/fight_1_692.pgm +images/wasteland/fight_1_694.pgm +images/wasteland/fight_1_695.pgm +images/wasteland/fight_1_696.pgm +images/wasteland/fight_1_698.pgm +IMG_FIGHT_A_END: images/wasteland/fight_1_700.pgm + +IMG_SIMON_D_START: images/wasteland/simon_4_165.pgm +images/wasteland/simon_4_169.pgm +images/wasteland/simon_4_177.pgm +images/wasteland/simon_4_185.pgm +images/wasteland/simon_4_197.pgm +images/wasteland/simon_4_205.pgm +IMG_SIMON_D_END: images/wasteland/simon_4_209.pgm + +IMG_SIMON_C_START: images/wasteland/simon_3_233.pgm +images/wasteland/simon_3_237.pgm +images/wasteland/simon_3_241.pgm +images/wasteland/simon_3_245.pgm +images/wasteland/simon_3_249.pgm +images/wasteland/simon_3_253.pgm +images/wasteland/simon_3_256.pgm +images/wasteland/simon_3_260.pgm +images/wasteland/simon_3_264.pgm +images/wasteland/simon_3_268.pgm +images/wasteland/simon_3_271.pgm +images/wasteland/simon_3_273.pgm +IMG_SIMON_C_END: images/wasteland/simon_3_276.pgm + +IMG_JACKPOT_14: machine/tz/animation/jackpot/jackpot14.pgm +IMG_JACKPOT_END: machine/tz/animation/jackpot/jackpot15.pgm + + + +################################################################################## +################################################################################## +#### WASTELAND MULTIBALL +################################################################################## +################################################################################## +IMG_WASTELAND_RUNNING: images/wasteland/wasteland_running_1.pgm + + +IMG_FLYKICK_A_START: images/wasteland/fly_kick_385.pgm +images/wasteland/fly_kick_386.pgm +images/wasteland/fly_kick_387.pgm +images/wasteland/fly_kick_389.pgm +images/wasteland/fly_kick_390.pgm +images/wasteland/fly_kick_391.pgm +images/wasteland/fly_kick_393.pgm +images/wasteland/fly_kick_394.pgm +images/wasteland/fly_kick_395.pgm +images/wasteland/fly_kick_397.pgm +IMG_FLYKICK_A_END: images/wasteland/fly_kick_398.pgm + +IMG_WASTELAND_A1_START: images/wasteland/museum_7748.pgm +images/wasteland/museum_7752.pgm +images/wasteland/museum_7756.pgm +images/wasteland/museum_7780.pgm +images/wasteland/museum_7784.pgm +images/wasteland/museum_7788.pgm +images/wasteland/museum_7987.pgm +images/wasteland/museum_7990.pgm +images/wasteland/museum_7993.pgm +images/wasteland/museum_7996.pgm +IMG_WASTELAND_A1_END: images/wasteland/museum_7999.pgm + +IMG_WASTELAND_A2_START: images/wasteland/museum_8011.pgm +images/wasteland/museum_8014.pgm +images/wasteland/museum_8017.pgm +images/wasteland/museum_8020.pgm +images/wasteland/museum_8023.pgm +images/wasteland/museum_8026.pgm +images/wasteland/museum_8029.pgm +images/wasteland/museum_8032.pgm +images/wasteland/museum_8035.pgm +IMG_WASTELAND_A2_END: images/wasteland/museum_8038.pgm + +IMG_WASTELAND_A3_START: images/wasteland/museum_8050.pgm +images/wasteland/museum_8053.pgm +images/wasteland/museum_8056.pgm +images/wasteland/museum_8059.pgm +images/wasteland/museum_8062.pgm +IMG_WASTELAND_A3_END: images/wasteland/museum_8065.pgm + + + + + +################################################################################## +################################################################################## +#### CRYOPRISON MULTIBALL +################################################################################## +################################################################################## +IMG_CAPSIMON_C_START: images/capture_simon/cap_simon_2504.pgm +images/capture_simon/cap_simon_2516.pgm +images/capture_simon/cap_simon_2540.pgm +images/capture_simon/cap_simon_2552.pgm +images/capture_simon/cap_simon_2564.pgm +images/capture_simon/cap_simon_2588.pgm +images/capture_simon/cap_simon_2600.pgm +images/capture_simon/cap_simon_2612.pgm +images/capture_simon/cap_simon_2636.pgm +images/capture_simon/cap_simon_2660.pgm +images/capture_simon/cap_simon_2672.pgm +images/capture_simon/cap_simon_2684.pgm +images/capture_simon/cap_simon_2696.pgm +IMG_CAPSIMON_C_END: images/capture_simon/cap_simon_2708.pgm + +IMG_CRYOPRISON_E1_START: images/fortress/museum_001.pgm +images/fortress/museum_002.pgm +images/fortress/museum_003.pgm +images/fortress/museum_004.pgm +images/fortress/museum_006.pgm +images/fortress/museum_008.pgm +images/fortress/museum_009.pgm +images/fortress/museum_010.pgm +images/fortress/museum_012.pgm +images/fortress/museum_013.pgm +images/fortress/museum_015.pgm +images/fortress/museum_016.pgm +images/fortress/museum_017.pgm +IMG_CRYOPRISON_E1_END: images/fortress/museum_018.pgm + +IMG_CRYOPRISON_E2_START: images/fortress/museum_019.pgm +images/fortress/museum_020.pgm +images/fortress/museum_024.pgm +images/fortress/museum_025.pgm +images/fortress/museum_029.pgm +images/fortress/museum_030.pgm +images/fortress/museum_031.pgm +images/fortress/museum_033.pgm +IMG_CRYOPRISON_E2_END: images/fortress/museum_035.pgm + +IMG_DR_COCTEAU_B_START: images/side_chars/dr_cocteau_4_736.pgm +images/side_chars/dr_cocteau_4_740.pgm +images/side_chars/dr_cocteau_4_748.pgm +images/side_chars/dr_cocteau_4_756.pgm +images/side_chars/dr_cocteau_4_760.pgm +IMG_DR_COCTEAU_B_END: images/side_chars/dr_cocteau_4_774.pgm + + + + + +################################################################################## +################################################################################## +#### HUXLEY - WIZARD MODE +################################################################################## +################################################################################## +IMG_HUXLEY_A_START: images/huxley/huxley_1_77.pgm +images/huxley/huxley_1_81.pgm +images/huxley/huxley_1_85.pgm +images/huxley/huxley_1_89.pgm +images/huxley/huxley_1_93.pgm +images/huxley/huxley_1_97.pgm +images/huxley/huxley_1_101.pgm +images/huxley/huxley_1_105.pgm +images/huxley/huxley_1_109.pgm +images/huxley/huxley_1_113.pgm +images/huxley/huxley_1_117.pgm +images/huxley/huxley_1_191.pgm +IMG_HUXLEY_A_END: images/huxley/huxley_1_195.pgm + +IMG_HUXLEY_B1_START: images/huxley/huxley_2_411.pgm +images/huxley/huxley_2_413.pgm +images/huxley/huxley_2_415.pgm +images/huxley/huxley_2_417.pgm +images/huxley/huxley_2_419.pgm +images/huxley/huxley_2_421.pgm +images/huxley/huxley_2_423.pgm +images/huxley/huxley_2_425.pgm +IMG_HUXLEY_B1_END: images/huxley/huxley_2_427.pgm + +IMG_HUXLEY_B2_START: images/huxley/huxley_2_594.pgm +images/huxley/huxley_2_598.pgm +images/huxley/huxley_2_602.pgm +images/huxley/huxley_2_606.pgm +images/huxley/huxley_2_610.pgm +images/huxley/huxley_2_614.pgm +images/huxley/huxley_2_618.pgm +images/huxley/huxley_2_622.pgm +images/huxley/huxley_2_626.pgm +images/huxley/huxley_2_630.pgm +images/huxley/huxley_2_634.pgm +images/huxley/huxley_2_638.pgm +images/huxley/huxley_2_642.pgm +IMG_HUXLEY_B2_END: images/huxley/huxley_2_646.pgm + +IMG_HUXLEY_D_START: images/huxley/huxley_7_715.pgm +images/huxley/huxley_7_723.pgm +images/huxley/huxley_7_731.pgm +images/huxley/huxley_7_735.pgm +images/huxley/huxley_7_747.pgm +images/huxley/huxley_7_751.pgm +images/huxley/huxley_7_755.pgm +images/huxley/huxley_7_783.pgm +images/huxley/huxley_7_795.pgm +images/huxley/huxley_7_799.pgm +images/huxley/huxley_7_807.pgm +images/huxley/huxley_7_815.pgm +IMG_HUXLEY_D_END: images/huxley/huxley_7_827.pgm + +IMG_HUXLEY_E_START: images/huxley/huxley_6_635.pgm +images/huxley/huxley_6_893.pgm +images/huxley/huxley_6_901.pgm +images/huxley/huxley_6_905.pgm +images/huxley/huxley_6_913.pgm +images/huxley/huxley_6_917.pgm +images/huxley/huxley_6_925.pgm +images/huxley/huxley_6_933.pgm +images/huxley/huxley_6_937.pgm +images/huxley/huxley_6_941.pgm +images/huxley/huxley_6_945.pgm +images/huxley/huxley_6_949.pgm +images/huxley/huxley_6_957.pgm +images/huxley/huxley_6_961.pgm +images/huxley/huxley_6_965.pgm +images/huxley/huxley_6_969.pgm +images/huxley/huxley_6_973.pgm +images/huxley/huxley_6_977.pgm +images/huxley/huxley_6_981.pgm +images/huxley/huxley_6_985.pgm +images/huxley/huxley_6_993.pgm +IMG_HUXLEY_E_END: images/huxley/huxley_6_1001.pgm + +IMG_HUXLEY_END_SCENE_START: images/huxley/huxley_scene_539.pgm +IMG_HUXLEY_END_SCENE_1: images/huxley/huxley_scene_547.pgm +IMG_HUXLEY_END_SCENE_2: images/huxley/huxley_scene_585.pgm +IMG_HUXLEY_END_SCENE_3: images/huxley/huxley_scene_596.pgm +IMG_HUXLEY_END_SCENE_4: images/huxley/huxley_scene_599.pgm +IMG_HUXLEY_END_SCENE_5: images/huxley/huxley_scene_606.pgm +IMG_HUXLEY_END_SCENE_6: images/huxley/huxley_scene_774.pgm +IMG_HUXLEY_END_SCENE_7: images/huxley/huxley_scene_787.pgm +IMG_HUXLEY_END_SCENE_8: images/huxley/huxley_scene_792.pgm +IMG_HUXLEY_END_SCENE_9: images/huxley/huxley_scene_826.pgm +IMG_HUXLEY_END_SCENE_10: images/huxley/huxley_scene_838.pgm +IMG_HUXLEY_END_SCENE_11: images/huxley/huxley_scene_910.pgm + + + + +################################################################################## +################################################################################## +#### BACK IN THE FRIDGE - WIZARD MODE +################################################################################## +################################################################################## +IMG_FREEZER1_START: images/demo_time/freezer_a_740.pgm +images/demo_time/freezer_a_743.pgm +images/demo_time/freezer_a_791.pgm +images/demo_time/freezer_a_794.pgm +images/demo_time/freezer_a_797.pgm +images/demo_time/freezer_a_799.pgm +images/demo_time/freezer_a_801.pgm +images/demo_time/freezer_a_804.pgm +images/demo_time/freezer_a_807.pgm +images/demo_time/freezer_a_809.pgm +images/demo_time/freezer_a_811.pgm +images/demo_time/freezer_a_814.pgm +images/demo_time/freezer_a_817.pgm +images/demo_time/freezer_a_819.pgm +images/demo_time/freezer_a_821.pgm +images/demo_time/freezer_a_824.pgm +IMG_FREEZER1_END: images/demo_time/freezer_a_827.pgm + +IMG_FREEZER2_START: images/demo_time/freezer_a_854.pgm +images/demo_time/freezer_a_856.pgm +images/demo_time/freezer_a_859.pgm +images/demo_time/freezer_a_862.pgm +images/demo_time/freezer_a_864.pgm +images/demo_time/freezer_a_866.pgm +images/demo_time/freezer_a_869.pgm +images/demo_time/freezer_a_872.pgm +images/demo_time/freezer_a_874.pgm +images/demo_time/freezer_a_876.pgm +images/demo_time/freezer_a_879.pgm +images/demo_time/freezer_a_882.pgm +images/demo_time/freezer_a_884.pgm +images/demo_time/freezer_a_886.pgm +images/demo_time/freezer_a_889.pgm +images/demo_time/freezer_a_892.pgm +images/demo_time/freezer_a_894.pgm +IMG_FREEZER2_END: images/demo_time/freezer_a_896.pgm + +IMG_FREEZER3_START: images/demo_time/freezer_a_931.pgm +images/demo_time/freezer_a_933.pgm +images/demo_time/freezer_a_936.pgm +images/demo_time/freezer_a_939.pgm +images/demo_time/freezer_a_941.pgm +images/demo_time/freezer_a_943.pgm +images/demo_time/freezer_a_946.pgm +images/demo_time/freezer_a_949.pgm +images/demo_time/freezer_a_951.pgm +images/demo_time/freezer_a_953.pgm +images/demo_time/freezer_a_956.pgm +images/demo_time/freezer_a_959.pgm +images/demo_time/freezer_a_961.pgm +images/demo_time/freezer_a_963.pgm +IMG_FREEZER3_END: images/demo_time/freezer_a_966.pgm + + + + + + +################################################################################## +################################################################################## +#### COMBOS +################################################################################## +################################################################################## +IMG_COMBO1_START: images/combos/combo1.pgm +images/combos/combo2.pgm +images/combos/combo3.pgm +images/combos/combo4.pgm +images/combos/combo5.pgm +images/combos/combo6.pgm +images/combos/combo7.pgm +images/combos/combo8.pgm +IMG_COMBO1_END: images/combos/combo9.pgm + + +IMG_COMBO2_START: images/combos/combo2-1.pgm +images/combos/combo2-2.pgm +images/combos/combo2-3.pgm +images/combos/combo2-4.pgm +images/combos/combo2-5.pgm +images/combos/combo2-6.pgm +images/combos/combo2-7.pgm +images/combos/combo2-8.pgm +images/combos/combo2-9.pgm +images/combos/combo2-10.pgm +images/combos/combo2-11.pgm +IMG_COMBO2_END: images/combos/combo2-12.pgm + + + + + + +################################################################################## +################################################################################## +#### SPECIAL SHOTS +################################################################################## +################################################################################## +IMG_SIMON_FIRE2_START: images/wasteland/simon_fortress_2_88.pgm +images/wasteland/simon_fortress_2_90.pgm +images/wasteland/simon_fortress_2_92.pgm +images/wasteland/simon_fortress_2_95.pgm +images/wasteland/simon_fortress_2_97.pgm +images/wasteland/simon_fortress_2_99.pgm +images/wasteland/simon_fortress_2_101.pgm +images/wasteland/simon_fortress_2_136.pgm +images/wasteland/simon_fortress_2_139.pgm +images/wasteland/simon_fortress_2_140.pgm +images/wasteland/simon_fortress_2_143.pgm +images/wasteland/simon_fortress_2_147.pgm +images/wasteland/simon_fortress_2_149.pgm +images/wasteland/simon_fortress_2_151.pgm +IMG_SIMON_FIRE2_END: images/wasteland/simon_fortress_2_152.pgm + + + + + +################################################################################## +################################################################################## +################################################################################## +################################################################################## +################################################################################## +################################################################################## +################################################################################## +################################################################################## + + + + diff --git a/sim/Makefile b/sim/Makefile index 2bf47106c..b8d3b7a9d 100644 --- a/sim/Makefile +++ b/sim/Makefile @@ -4,39 +4,23 @@ # redefines those things which are necessarily different for simulation. D := sim -P := platform/wpc NATIVE_OBJS := -# Common native mode CPU configuration -CPU := native +# Common simulation CPU configuration +CPU ?= native +$(eval $(call have,CONFIG_SIM)) $(eval $(call have,CONFIG_PTH)) +$(eval $(call have,CONFIG_CALLIO)) CONFIG_UI ?= curses -$(eval $(call have,CONFIG_SOFT_REALTIME)) include cpu/$(CPU)/Makefile - -# Subplatform support -# Eventually, this section will contain conditionals for building on the -# different WPC variations. For now, all of these are mandatory though. -$(eval $(call have,CONFIG_PLATFORM_WPC)) -CONFIG_FONT ?= $(CONFIG_DMD) -$(eval $(call have,CONFIG_AC)) -$(eval $(call have,CONFIG_GI)) -$(eval $(call have,CONFIG_TRIAC)) -$(eval $(call have,CONFIG_RTC)) -$(eval $(call have,CONFIG_BUYIN)) -CONFIG_ANIMATION ?= $(CONFIG_DMD) -CONFIG_SCORE_RANK := y - -# Platform dependent files -KERNEL_HW_OBJS += $(P)/interrupt.o -KERNEL_HW_OBJS += $(P)/init-wpc.o +include $(PMAKEFILE) # Additional defines -CFLAGS += -I$(D) -DCONFIG_PLATFORM_WPC -DPAGE=0 +CFLAGS += -I$(D) -DPAGE=0 # Additional object files to be linked into the kernel region -NATIVE_OBJS += $(D)/main.o $(D)/switch.o $(D)/section.o \ - $(D)/bcd_string.o $(D)/timing.o $(D)/watchdog.o \ +NATIVE_OBJS += $(D)/main.o $(D)/switch.o \ + $(D)/timing.o $(D)/watchdog.o \ $(D)/signal.o $(D)/hwtimer.o $(D)/sound.o NATIVE_OBJS += $(if $(CONFIG_AC), $(D)/zerocross.o) @@ -47,6 +31,8 @@ NATIVE_OBJS += $(D)/node.o NATIVE_OBJS += $(D)/io.o NATIVE_OBJS += $(D)/keyboard.o NATIVE_OBJS += $(if $(CONFIG_PLATFORM_WPC), $(D)/io_wpc.o) +NATIVE_OBJS += $(if $(CONFIG_PLATFORM_MIN), $(D)/io_min.o) +NATIVE_OBJS += $(if $(CONFIG_PLATFORM_P2K), $(D)/io_p2k.o) NATIVE_OBJS += $(if $(CONFIG_PIC), $(D)/wpc-pic.o) ifeq ($(MACHINE),tz) $(eval $(call have,CONFIG_MACHINE_SIM)) @@ -54,34 +40,17 @@ NATIVE_OBJS += $(D)/tz_sim.o endif # For ASCII DMD -NATIVE_OBJS += $(if $(CONFIG_DMD), $(D)/asciidmd.o, $(D)/segment.o) +NATIVE_OBJS += $(if $(CONFIG_DMD), $(D)/asciidmd.o) +NATIVE_OBJS += $(if $(CONFIG_ALPHA), $(D)/segment.o) NATIVE_OBJS += $(if $(CONFIG_DMD), tools/imglib/imglib.o) NATIVE_OBJS += $(if $(CONFIG_DMD), cpu/native/dot.o) $(D)/asciidmd.o : CFLAGS += -Itools/imglib -# 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. -$(D)/section.o : CFLAGS += -U_FORTIFY_SOURCE - $(NATIVE_OBJS) : CFLAGS += -DNATIVE_SYSTEM $(UI_CFLAGS) # Add machine type flags CFLAGS += $(if $(CONFIG_DMD), -DMACHINE_DMD=1) -CFLAGS += -DMACHINE_SHORTNAME=\"$(MACHINE)\" - -ifeq ($(CONFIG_DMD),y) -IMAGE_MAP += platform/wpc/wpc.ild -endif - # CALLSET_ENTRYs in the simulator directory work too! CALLSET_FLAGS += -D $(D) -FIRST_BANK=0 - -# Invoke 'make attach' to start up a GDB session that attaches itself to -# a running instance of the native mode program. -attach: - gdb -p `ps -ef | grep $(NATIVE_PROG) | head -n 1 | grep -o "[0-9].*" | awk '{print $$1}'` -x gdbmacros diff --git a/sim/asciidmd.c b/sim/asciidmd.c index 21043cb8b..4fdebfe31 100644 --- a/sim/asciidmd.c +++ b/sim/asciidmd.c @@ -34,8 +34,8 @@ U8 asciidmd_pages[MAX_PHASES] = { 0, 0 }; unsigned int asciidmd_phase = 0; -U8 *linux_dmd_low_page; -U8 *linux_dmd_high_page; +U8 *pinio_dmd_low_page; +U8 *pinio_dmd_high_page; U8 asciidmd_visible_page; @@ -60,9 +60,9 @@ void asciidmd_map_page (int mapping, int page) { page &= 0x0F; if (mapping == 0) - linux_dmd_low_page = asciidmd_buffers[page]->_data; + pinio_dmd_low_page = asciidmd_buffers[page]->_data; else if (mapping == 1) - linux_dmd_high_page = asciidmd_buffers[page]->_data; + pinio_dmd_high_page = asciidmd_buffers[page]->_data; } diff --git a/sim/coil.c b/sim/coil.c index 14a716672..450a14688 100644 --- a/sim/coil.c +++ b/sim/coil.c @@ -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. * @@ -21,6 +21,18 @@ #include #include +/* This module simulates the actions of the playfield coils. + The CPU writes binary values to the coil outputs, but these do not directly + correspond to action; for example, a flipper coil needs to be pulsed for + a certain period of time before it raises. Also, the CPU will typically + duty cycle coils, rapidly turning them on and off; the logical state of the + coil must then be calculated from a series of CPU writes. + + Multiple "types" of coils can be defined, each with different properties. + */ + +int sim_coils_all_disabled = 0; + extern device_properties_t device_properties_table[]; struct sim_coil_state; @@ -117,6 +129,10 @@ void coil_clone (unsigned int parent_id, unsigned int child_id) } +/* Define the action for a device-type coil. + When the solenoid arm reaches its maximum value, initiate + a ball kick on the associated device node. */ + void device_coil_at_max (struct sim_coil_state *c) { node_kick (c->node); @@ -130,6 +146,15 @@ struct sim_coil_type device_type_coil = { .at_max = device_coil_at_max, }; +void device_coil_init (unsigned int id, struct ball_node *node) +{ + struct sim_coil_state *c = coil_states + id; + c->node = node; + c->type = &device_type_coil; +} + + +/* Define the action for a flasher output. */ void flasher_coil_at_max (struct sim_coil_state *c) { @@ -142,18 +167,25 @@ struct sim_coil_type flasher_type_coil = { .at_max = flasher_coil_at_max, }; + +/* Define the action for a "generic coil". + Use the machine description to check the solenoid number + against one of the predefined types. This is a "catch-all". + TODO - this should be broken up into multiple smaller + functions that are registered against their coils at init. */ + void generic_coil_at_max (struct sim_coil_state *c) { unsigned int solno = c - coil_states; #ifdef SOL_OUTHOLE if (solno == SOL_OUTHOLE) - node_kick (&switch_nodes[MACHINE_OUTHOLE_SWITCH]); + node_kick (&outhole_node); #endif #ifdef MACHINE_LAUNCH_SOLENOID if (solno == MACHINE_LAUNCH_SOLENOID) - node_kick (&switch_nodes[MACHINE_SHOOTER_SWITCH]); + node_kick (&shooter_node); #endif #ifdef MACHINE_KNOCKER_SOLENOID @@ -169,6 +201,9 @@ struct sim_coil_type generic_type_coil = { .off_step = -1, }; + +/* Define the action for a flipper coil. */ + struct sim_coil_type flipper_power_type_coil = { /* TODO - trigger EOS when coil reaches peak */ .max_pos = 32, @@ -182,12 +217,17 @@ struct sim_coil_type flipper_hold_type_coil = { .off_step = -1, }; + +/* Define the action for an outhole type coil. */ + struct sim_coil_type outhole_type_coil = { .max_pos = 40, .on_step = 4, .off_step = -1, }; +/* Define the action for a diverter coil. */ + void diverter_coil_0 (struct sim_coil_state *c) { c->node->index = 0; @@ -215,13 +255,6 @@ void diverter_coil_init (unsigned int id, struct ball_node *node) c->type = &diverter_type_coil; } -void device_coil_init (unsigned int id, struct ball_node *node) -{ - struct sim_coil_state *c = coil_states + id; - c->node = node; - c->type = &device_type_coil; -} - void motor_coil_at_rest (struct sim_coil_state *c) { @@ -332,12 +365,16 @@ void sim_coil_change (unsigned int coil, unsigned int on) { struct sim_coil_state *c = coil_states + coil; - if (c->disabled) + /* Ignore all writes to a disabled device */ + if (sim_coils_all_disabled || c->disabled) return; + /* Only take action when the CPU writes a different value */ if (c->on != on) { c->on = on; + /* Start a periodic function, called every 1ms, to update the value + of this coil, if it has not already been started. */ if (!c->scheduled) { sim_time_register (1, FALSE, (time_handler_t)sim_coil_update, c); @@ -347,7 +384,7 @@ void sim_coil_change (unsigned int coil, unsigned int on) } -#ifdef MACHINE_TZ +#ifdef MACHINE_TZ /* TODO - move to tz_sim.c */ static void mach_coil_init (void) { coil_states[SOL_GUMBALL_RELEASE].type = &motor_type_coil; @@ -375,34 +412,46 @@ static void fliptronic_coil_init (U8 power_sol) } #endif + +/* Initialize the coil simulation. */ void sim_coil_init (void) { int devno; int sol; - /* Initialize everything to zero first */ + /* Initialize all coils/flashers to some default. Use the machine + description to guide this. */ for (sol = 0; sol < PINIO_NUM_SOLS; sol++) { char item_name[32]; struct sim_coil_state *c = coil_states + sol; memset (c, 0, sizeof (struct sim_coil_state)); + ui_write_solenoid (sol, 0); if (MACHINE_SOL_FLASHERP (sol)) c->type = &flasher_type_coil; else c->type = &generic_type_coil; c->master = c; + + /* When the configuration item "coil.X.disabled" is read, this + will cause coil X to be disabled. Use this to simulate a broken + wire. Also, if "coils.disabled" is 1, then all coils will be + disabled. */ snprintf (item_name, sizeof (item_name), "coil.%d.disabled", sol); conf_add (item_name, &c->disabled); } + conf_add ("coils.disabled", &sim_coils_all_disabled); - /* Note coils which are attached to ball devices */ + /* Redefine coils which are attached to ball devices, so that the + action of the coil will trigger remove events on the device nodes. */ for (devno = 0; devno < NUM_DEVICES; devno++) { const device_properties_t *props = &device_properties_table[devno]; device_coil_init (props->sol, &device_nodes[devno]); } - /* Initialize Fliptronic coils */ + /* Redefine Fliptronic flipper coils so that the power/hold coils are + tied together into a single action. */ #if (MACHINE_FLIPTRONIC == 1) fliptronic_coil_init (SOL_LL_FLIP_POWER); fliptronic_coil_init (SOL_LR_FLIP_POWER); diff --git a/sim/hwtimer.c b/sim/hwtimer.c index 3fb88ba0a..788fa1757 100644 --- a/sim/hwtimer.c +++ b/sim/hwtimer.c @@ -1,5 +1,5 @@ /* - * Copyright 2008, 2009 by Brian Dominy + * Copyright 2008-2011 by Brian Dominy * * This file is part of FreeWPC. * diff --git a/sim/io.c b/sim/io.c index 33bf19f42..e30e6d31f 100644 --- a/sim/io.c +++ b/sim/io.c @@ -34,6 +34,9 @@ struct io_region io_region_table[NUM_IO_ADDRS]; +static U8 sim_sols[PINIO_NUM_SOLS / 8] = {}; + + /* Default read/write handlers for invalid addresses, or addresses that were not installed by the simulator */ @@ -81,6 +84,101 @@ U8 readb (IOPTR addr) } +/* Generic I/O handlers that plug into a simple byte variable. + The CPU "reads" and "writes" the value of the memory directly. */ + +U8 io_mem_reader (U8 *valp, unsigned int addr) +{ + return valp[addr]; +} + +void io_mem_writer (U8 *valp, unsigned int addr, U8 val) +{ + valp[addr] = val; +} + + +/* A generic I/O handler that plugs into a configuration variable. + VALP points to an 'int' which has been passed to conf_add to + allow it to be set using a conf file or the 'set' command. + ADDR is not used. Pass this as the reader argument to io_add() + to allow the running CPU to get to the config data. */ +U8 io_conf_reader (int *valp, unsigned int addr) +{ + return (U8)*valp; +} + + +/* Generic lamp and switch matrix handling */ + +/** Write to a multiplexed output; i.e. a register in which distinct + * outputs are multiplexed together into a single 8-bit I/O location. + * UI_UPDATE provides a function for displaying the contents of a single + * output; it takes the output number and a zero(off)/non-zero(on) state. + * INDEX gives the output number of the first bit of the byte of data. + * MEMP points to the data byte, containing 8 outputs. + * NEWVAL is the value to be written; it is assigned to *MEMP. + */ +void mux_write (mux_ui ui_update, int index, U8 *memp, U8 newval, unsigned int sigbase) +{ + U8 oldval = *memp; + int n; + for (n = 0; n < 8; n++) + { + if ((newval & (1 << n)) != (oldval & (1 << n))) + { + /* Update the user interface to reflect the change in output */ + if (ui_update) + ui_update (index + n, newval & (1 << n)); + + /* Notify the signal tracker that the output changed */ + signal_update (sigbase+index+n, newval & (1 << n)); + } + } + + /* Latch the write; save the value written */ + *memp = newval; +} + + +/** Simulate writing to a set of 8 solenoids. */ +void sim_sol_write (int index, U8 *memp, U8 val) +{ + int n; + + /* Update the state of each solenoid from the signal coming + into it. */ + for (n = 0; n < 8; n++) + { + unsigned int solno = index+n; + + if (solno < PINIO_NUM_SOLS) + sim_coil_change (solno, val & (1 << n)); + } + + /* Commit the new state */ + mux_write (ui_write_solenoid, index, memp, val, SIGNO_SOL); +} + + +/* Handle solenoid writes */ +void io_write_sol (U8 *memp, unsigned int addr, U8 val) +{ + int bankno = memp - sim_sols; + sim_sol_write (bankno * 8, memp, val); +} + +void io_add_sol_bank (IOPTR addr, U8 solno) +{ + io_add_wo (addr, io_write_sol, &sim_sols[solno / 8]); +} + +void io_add_direct_switches (IOPTR addr, U8 switchno) +{ + io_add_ro (addr, io_mem_reader, sim_switch_matrix_get () + (switchno / 8)); +} + + /* Add read/write handlers for a particular I/O address region. This is the lowest level function that defines how to do I/O. All other variants call this one ultimately. */ @@ -121,6 +219,12 @@ void io_init (void) is required. */ #ifdef CONFIG_PLATFORM_WPC io_wpc_init (); -#endif +#endif +#ifdef CONFIG_PLATFORM_MIN + io_min_init (); +#endif +#ifdef CONFIG_PLATFORM_P2K + io_p2k_init (); +#endif } diff --git a/sim/io_min.c b/sim/io_min.c new file mode 100644 index 000000000..509927da3 --- /dev/null +++ b/sim/io_min.c @@ -0,0 +1,11 @@ + +#include +#include +#include + +void io_min_init (void) +{ + io_add_direct_switches (IO_SWITCH, 0); + io_add_sol_bank (IO_SOL, 0); +} + diff --git a/machine/bop/leftramp.c b/sim/io_p2k.c similarity index 54% rename from machine/bop/leftramp.c rename to sim/io_p2k.c index 23b07a7ff..e9297436c 100644 --- a/machine/bop/leftramp.c +++ b/sim/io_p2k.c @@ -1,5 +1,5 @@ /* - * Copyright 2010 by Ewan Meadows (sonny_jim@hotmail.com) + * Copyright 2010 by Brian Dominy * * This file is part of FreeWPC. * @@ -18,38 +18,41 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ - #include -#include +#include +#include + +struct io_p2k +{ + U8 indata; + U8 status; +}; + +struct io_p2k p2k_hw; + + +U8 io_p2k_read_data (struct io_p2k *obj, unsigned int addr) +{ +} -void shuttle_launch_deff (void) +void io_p2k_write_data (struct io_p2k *obj, unsigned int addr, U8 val) { - seg_alloc_clean (); - seg_write_row_center (0, "SHUTTLE LAUNCH"); - seg_write_row_center (1, "WOOOSH"); - seg_show (); - task_sleep_sec (2); - deff_exit (); } -void head_divert_to_mpf (void) +U8 io_p2k_read_status (struct io_p2k *obj, unsigned int addr) { - gate_start (); - task_sleep_sec (4); - gate_stop (); } -CALLSET_ENTRY (leftramp, sw_left_ramp_enter) +void io_p2k_write_control (struct io_p2k *obj, unsigned int addr, U8 val) { - if (!event_did_follow (left_ramp, left_ramp_fail)) - { - sound_send (SND_SHUTTLE_LAUNCH); - deff_start (DEFF_SHUTTLE_LAUNCH); - head_divert_to_mpf (); - } - else - { - sound_send (SND_ABORT_ABORT); - } - event_can_follow (left_ramp, left_ramp_fail, TIME_2S); } + + +void io_p2k_init (void) +{ + io_add_rw (LPT_DATA, io_p2k_read_data, io_p2k_write_data, &p2k_hw); + io_add_wo (LPT_CONTROL, io_p2k_write_control, &p2k_hw); + io_add_ro (LPT_STATUS, io_p2k_read_status, &p2k_hw); +} + + diff --git a/sim/io_wpc.c b/sim/io_wpc.c index f1011f5b3..12fa7c5c0 100644 --- a/sim/io_wpc.c +++ b/sim/io_wpc.c @@ -45,9 +45,6 @@ struct wpc_debug_port }; -/** The simulated solenoid outputs */ -static U8 sim_sols[PINIO_NUM_SOLS / 8]; - /** Pointer to the current switch matrix element */ static U8 *sim_switch_data_ptr; @@ -64,7 +61,7 @@ struct wpc_debug_port wpc_debug_port; struct sim_triac wpc_triac; /** The flipper relay on non-Fliptronic games */ -#ifdef CONFIG_FLIPTRONIC +#if (MACHINE_FLIPTRONIC == 1) static U8 wpc_flipper_relay; #endif @@ -103,66 +100,6 @@ static U8 wpc_read_debug_status (struct wpc_debug_port *port, unsigned int addr) } - -/* A generic I/O handler that plugs into a configuration variable. - VALP points to an 'int' which has been passed to conf_add to - allow it to be set using a conf file or the 'set' command. - ADDR is not used. Pass this as the reader argument to io_add() - to allow the running CPU to get to the config data. */ -static U8 io_conf_reader (int *valp, unsigned int addr) -{ - return (U8)*valp; -} - - -/* A generic I/O handlers that plugs into a simple byte variable. - The CPU "reads" and "writes" the value of the memory directly. */ - -static U8 io_mem_reader (U8 *valp, unsigned int addr) -{ - return valp[addr]; -} - -static void io_mem_writer (U8 *valp, unsigned int addr, U8 val) -{ - valp[addr] = val; -} - - -/* Generic lamp and switch matrix handling */ - -/** Write to a multiplexed output; i.e. a register in which distinct - * outputs are multiplexed together into a single 8-bit I/O location. - * UI_UPDATE provides a function for displaying the contents of a single - * output; it takes the output number and a zero(off)/non-zero(on) state. - * INDEX gives the output number of the first bit of the byte of data. - * MEMP points to the data byte, containing 8 outputs. - * NEWVAL is the value to be written; it is assigned to *MEMP. - */ -void mux_write (mux_ui ui_update, int index, U8 *memp, U8 newval, unsigned int sigbase) -{ - U8 oldval = *memp; - int n; - for (n = 0; n < 8; n++) - { - if ((newval & (1 << n)) != (oldval & (1 << n))) - { - /* Update the user interface to reflect the change in output */ -#ifdef CONFIG_UI - if (ui_update) - ui_update (index + n, newval & (1 << n)); -#endif - - /* Notify the signal tracker that the output changed */ - signal_update (sigbase+index+n, newval & (1 << n)); - } - } - - /* Latch the write; save the value written */ - *memp = newval; -} - - void io_matrix_strobe (struct io_matrix *mx, U8 val, mux_ui ui_update, unsigned int signo) { if (val == 0) @@ -189,6 +126,16 @@ U8 io_matrix_reader (struct io_matrix *mx, unsigned int addr) return mx->rowlatch; } +/** Update the output side of the triac/flipper relay register. + * This becomes zero when a zerocrossing occurs. When the input side of the latch + * is written, GI strings can be turned on but not turned off. + */ +void sim_triac_update (U8 val) +{ + mux_write (ui_write_triac, 0, &linux_triac_outputs, val, SIGNO_TRIAC); +} + + struct io_switch_matrix sim_switch_matrix; @@ -211,43 +158,6 @@ void wpc_key_press (char val) } -/** Update the output side of the triac/flipper relay register. - * This becomes zero when a zerocrossing occurs. When the input side of the latch - * is written, GI strings can be turned on but not turned off. - */ -void sim_triac_update (U8 val) -{ - mux_write (ui_write_triac, 0, &linux_triac_outputs, val, SIGNO_TRIAC); -} - - -/** Simulate writing to a set of 8 solenoids. */ -static void sim_sol_write (int index, U8 *memp, U8 val) -{ - int n; - - /* Update the state of each solenoid from the signal coming - into it. */ - for (n = 0; n < 8; n++) - { - unsigned int solno = index+n; - - if (solno < PINIO_NUM_SOLS) - sim_coil_change (solno, val & (1 << n)); - } - - /* Commit the new state */ - mux_write (ui_write_solenoid, index, memp, val, SIGNO_SOL); -} - - -/* Handle solenoid writes */ -static void wpc_write_sol (U8 *memp, unsigned int addr, U8 val) -{ - int bankno = memp - sim_sols; - sim_sol_write (bankno * 8, memp, val); -} - /* Handle the diagnostic LED */ static void wpc_write_led (void *unused1, unsigned int unused2, U8 val) { @@ -273,15 +183,6 @@ void wpc_write (void *unused, unsigned int addr, U8 val) { switch (addr) { -#if (MACHINE_WPC95 == 1) - case WPC95_FLIPPER_COIL_OUTPUT: - sim_sol_write (32, &sim_sols[4], val); -#elif (MACHINE_FLIPTRONIC == 1) - case WPC_FLIPTRONIC_PORT_A: - sim_sol_write (32, &sim_sols[4], ~val); -#endif - break; - case WPC_GI_TRIAC: /* The input side of the triac has a latch; store only the G.I. related bits there */ @@ -406,16 +307,6 @@ static void io_add_lamp_matrix (IOPTR addr_strobe, IOPTR addr_output, U8 lampno) } -/** - * Map a range of solenoid sets. - * ADDR gives the CPU's register that it uses to write to the set. - * SOLNO gives the solenoid number of the first solenoid in the set. - */ -static void io_add_sol_bank (IOPTR addr, U8 solno) -{ - io_add_wo (addr, wpc_write_sol, &sim_sols[solno / 8]); -} - /* Handle writes to map a page of DMD memory into a CPU window. ADDR identifies the mapping number. VAL is the physical page. Each window points to page 0 on reset. */ @@ -468,6 +359,12 @@ void io_wpc_init (void) io_add_sol_bank (WPC_SOL_LOWPOWER_OUTPUT, SOL_BASE_LOW); io_add_sol_bank (WPC_SOL_FLASHER_OUTPUT, SOL_BASE_GENERAL); io_add_sol_bank (WPC_SOL_GEN_OUTPUT, SOL_BASE_AUXILIARY); +#if (MACHINE_WPC95 == 1) + io_add_sol_bank (WPC95_FLIPPER_COIL_OUTPUT, 32); +#endif +#if (MACHINE_FLIPTRONIC == 1) + io_add_sol_bank (WPC_FLIPTRONIC_PORT_A, 32); +#endif #ifdef MACHINE_SOL_EXTBOARD1 io_add_sol_bank (WPC_EXTBOARD1, SOL_BASE_EXTENDED); #endif diff --git a/sim/keyboard.c b/sim/keyboard.c index e29044382..02e1fe013 100644 --- a/sim/keyboard.c +++ b/sim/keyboard.c @@ -1,5 +1,5 @@ /* - * Copyright 2010-2011 by Brian Dominy + * Copyright 2010-2012 by Brian Dominy * * This file is part of FreeWPC. * @@ -114,7 +114,11 @@ void sim_key_install_shooter (char key) static char sim_getchar (void) { char inbuf; +#ifdef CONFIG_PTH ssize_t res = pth_read (sim_input_fd, &inbuf, 1); +#else + ssize_t res = read (sim_input_fd, &inbuf, 1); +#endif if (res <= 0) { task_sleep_sec (2); @@ -148,28 +152,40 @@ static void sim_interface_thread (void) int simulator_keys = 1; int toggle_mode = 1; +#ifndef CONFIG_UI_SDL /* Put stdin in raw mode so that 'enter' doesn't have to be pressed after each keystroke. */ keybuffering (0); /* Let the system initialize before accepting keystrokes */ task_sleep_sec (3); +#endif if (exec_file && exec_late_flag) exec_script_file (exec_file); for (;;) { + task_yield (); #ifdef CONFIG_GTK gtk_poll (); - task_yield (); +#endif +#ifdef CONFIG_UI_SDL + ui_refresh_all (); + *inbuf = ui_poll_events (); #else *inbuf = sim_getchar (); +#endif + + /* Try again if no character was read */ + if (*inbuf == '\0') + continue; /* If switch simulation is turned off, then keystrokes are fed into the simulated serial port... meaning it is interpreted by the game program itself, and not the simulator. Use the tilde to toggle between the two modes. */ +#ifdef CONFIG_DEBUG_INPUT if (simulator_keys == 0) { /* Except tilde turns it off as usual. */ @@ -178,12 +194,15 @@ static void sim_interface_thread (void) simlog (SLC_DEBUG, "Input directed to switch matrix."); simulator_keys ^= 1; } +#ifdef CONFIG_PLATFORM_WPC else { wpc_key_press (*inbuf); } +#endif continue; } +#endif /* CONFIG_DEBUG_INPUT */ switch (*inbuf) { @@ -242,12 +261,14 @@ static void sim_interface_thread (void) node_kick (&open_node); break; +#ifdef CONFIG_DEBUG_INPUT case '`': /* The tilde toggles between keystrokes being treated as switches, and as input into the runtime debugger. */ simulator_keys ^= 1; simlog (SLC_DEBUG, "Input directed to built-in debugger."); break; +#endif case '\x1b': sim_exit (0); @@ -308,7 +329,6 @@ static void sim_interface_thread (void) simlog (SLC_DEBUG, "invalid key '%c' pressed (0x%02X)", *inbuf, *inbuf); } -#endif } } @@ -331,6 +351,7 @@ void keyboard_init (void) #ifdef MACHINE_BUYIN_SWITCH sim_key_install ('2', MACHINE_BUYIN_SWITCH); #endif +#ifdef CONFIG_PLATFORM_WPC sim_key_install ('3', SW_LEFT_COIN); sim_key_install ('4', SW_CENTER_COIN); sim_key_install ('5', SW_RIGHT_COIN); @@ -339,6 +360,12 @@ void keyboard_init (void) sim_key_install ('8', SW_DOWN); sim_key_install ('9', SW_UP); sim_key_install ('0', SW_ENTER); +#endif +#ifdef CONFIG_PLATFORM_WHITESTAR + sim_key_install ('8', SW_RED_BUTTON); + sim_key_install ('9', SW_GREEN_BUTTON); + sim_key_install ('0', SW_BLACK_BUTTON); +#endif sim_key_install (',', SW_LEFT_BUTTON); sim_key_install ('.', SW_RIGHT_BUTTON); #ifdef SW_COIN_DOOR_CLOSED diff --git a/sim/main.c b/sim/main.c index a72b54dc8..01efa4797 100644 --- a/sim/main.c +++ b/sim/main.c @@ -1,5 +1,5 @@ /* - * Copyright 2006-2010 by Brian Dominy + * Copyright 2006-2011 by Brian Dominy * * This file is part of FreeWPC. * @@ -26,9 +26,6 @@ * is redirected to function calls here that simulate the behavior. This * allows FreeWPC to be tested directly on a Linux or Windows development machine, * even when there is no PinMAME. - * - * If CONFIG_UI is also defined, then various activities are displayed to the - * user. Several different UIs are available. */ #include @@ -40,8 +37,6 @@ #include #include -extern void do_firq (void); -extern void do_irq (void); extern void exit (int); @@ -51,12 +46,6 @@ static time_t sim_boot_time; /** The rate at which the simulated clock should run */ int linux_irq_multiplier = 1; -/** True if the IRQ is enabled */ -bool linux_irq_enable; - -/** True if the FIRQ is enabled */ -bool linux_firq_enable; - /** When nonzero, the system is held in reset afer power on. This lets you fire up gdb and debug the early initialization. From the debugger, you should clear this flag, e.g. "set sim_debug_init 0". You set the @@ -96,7 +85,6 @@ void simlog (enum sim_log_class class, const char *format, ...) vsprintf (buf, format, ap); va_end (ap); -#ifdef CONFIG_UI ui_write_debug (class, buf); if (sim_output_stream == stdout) @@ -104,10 +92,6 @@ void simlog (enum sim_log_class class, const char *format, ...) else ofp = sim_output_stream; -#else - ofp = sim_output_stream; -#endif - if (ofp) { if (class != SLC_DEBUG_PORT) @@ -122,6 +106,11 @@ void simlog (enum sim_log_class class, const char *format, ...) } +void puts_sim (const char *s) +{ + simlog (SLC_DEBUG_PORT, "%s", s); +} + /* Called to shutdown the simulation. This performs all cleanup before exiting back to the native OS. */ @@ -129,9 +118,7 @@ __noreturn__ void sim_exit (U8 error_code) { simlog (SLC_DEBUG, "Shutting down simulation."); protected_memory_save (); -#ifdef CONFIG_UI ui_exit (); -#endif if (crash_on_error && error_code) *(int *)0 = 1; exit (error_code); @@ -139,46 +126,6 @@ __noreturn__ void sim_exit (U8 error_code) -/** Realtime callback function. - * - * This event simulates an elapsed 1ms. - */ -CALLSET_ENTRY (native, realtime_tick) -{ -#define FIRQ_FREQ 8 -#define PERIODIC_FREQ 16 - - static unsigned long next_firq_time = FIRQ_FREQ; - static unsigned long next_periodic_time = PERIODIC_FREQ; - - /* Update all of the simulator modules that need periodic processing */ - sim_time_step (); - - /* Simulate an IRQ every 1ms */ - if (linux_irq_enable) - tick_driver (); - - /* Simulate an FIRQ every 8ms */ - if (linux_firq_enable) - { - while (realtime_read () >= next_firq_time) - { - do_firq (); - next_firq_time += FIRQ_FREQ; - } - } - - /* Call periodic processes every 16ms */ - if (realtime_read () >= next_periodic_time) - { - db_periodic (); - if (likely (periodic_ok)) - do_periodic (); - next_periodic_time += PERIODIC_FREQ; - } -} - - /** * Return the current wall clock time in minutes. */ @@ -198,12 +145,6 @@ sim_get_wall_clock (void) */ void sim_init (void) { - void realtime_loop (void); - - /* This is done here, because the task subsystem isn't ready - inside main () */ - task_create_gid_while (GID_LINUX_REALTIME, realtime_loop, TASK_DURATION_INF); - /* Initialize the keyboard handler */ keyboard_init (); @@ -286,13 +227,12 @@ int main (int argc, char *argv[]) } } -#ifdef CONFIG_UI - /* Initialize the user interface */ + /* Initialize the user interface. GTK gets initialized + separately as it wants to see argc/argv. */ #ifdef CONFIG_GTK gtk_init (&argc, &argv); #endif ui_init (); -#endif /* Initialize signal tracker */ signal_init (); @@ -301,7 +241,9 @@ int main (int argc, char *argv[]) * the reset vector is invoked. */ signal_update (SIGNO_RESET, 1); disable_interrupts (); +#ifdef CONFIG_AC sim_zc_init (); +#endif #if (MACHINE_PIC == 1) simulation_pic_init (); #endif @@ -314,9 +256,11 @@ int main (int argc, char *argv[]) io_init (); /* Set the hardware registers to their initial values. */ +#ifdef CONFIG_PLATFORM_WPC writeb (WPC_LAMP_COL_STROBE, 0); #if !(MACHINE_PIC == 1) writeb (WPC_SW_COL_STROBE, 0); +#endif #endif /* Initialize the state of the switches; optos are backwards */ diff --git a/sim/node.c b/sim/node.c index db6a5e306..c9d96716d 100644 --- a/sim/node.c +++ b/sim/node.c @@ -34,9 +34,12 @@ extern device_properties_t device_properties_table[]; extern int sim_installed_balls; +/* Every node has an associated type object, which allows you to + customize how that node behaves when a ball is inserted or removed. */ -/* Node types for ball devices. A single node tracks the entire device, - regardless of how many balls it can hold. */ +/* A device-type node tracks an entire ball device; when used, the + individual switch nodes are unused. It counts the number of balls + in the device. */ void device_type_insert (struct ball_node *node, struct ball *ball) { @@ -60,25 +63,18 @@ struct ball_node_type device_type_node = { }; -/* Nodes for the open playfield */ +/* The open playfield node type does not require any custom behavior. */ struct ball_node_type open_type_node = { }; -/* Node types for single balls detected by a switch, but without a ball device */ +/* The node type for a single switch, not associated with a ball device. + It simply updates the state of the associated switch. */ void switch_type_insert_or_remove (struct ball_node *node, struct ball *ball) { simlog (SLC_DEBUG, "Switch %d holds %d balls", node->index, node->count); -#ifdef CONFIG_TZ - if (ball->flags & 0x01) - { - simlog (SLC_DEBUG, "Slot prox ignored by Powerball"); - sim_switch_set (node->index, 0); - } - else -#endif sim_switch_set (node->index, node->count); } @@ -88,18 +84,41 @@ struct ball_node_type switch_type_node = { }; +/* Proximity switches have a separate type, for which ceramic balls do not + cause any action. */ + +void prox_switch_insert_or_remove (struct ball_node *node, struct ball *ball) +{ + if (ball->flags & BALL_CERAMIC) + sim_switch_set (node->index, 0); + else + switch_type_insert_or_remove (node, ball); +} + + +struct ball_node_type proximity_switch_type_node = { + .insert = prox_switch_insert_or_remove, + .remove = prox_switch_insert_or_remove, +}; + + +/* A mux type node is one which does not have a single exit point; balls + could go one of several places afterwards. This is used to implement + divertors. Note that there is no playfield switch at all associated + with these nodes. Logically, the node is placed at the location where + the ball makes a choice about where to go next. */ struct ball_node_type mux_type_node = { .insert = NULL, .remove = NULL, }; +/* Declare the basic nodes that every pinball table has. */ struct ball_node open_node; struct ball_node device_nodes[MAX_DEVICES]; struct ball_node switch_nodes[NUM_SWITCHES]; - -struct ball the_ball[6]; /* TBD - don't hardcode count */ +struct ball the_ball[MACHINE_MAX_BALLS]; /* Return true if a node is full (can hold no more pinballs) */ bool node_full_p (struct ball_node *node) @@ -139,9 +158,7 @@ void node_insert (struct ball_node *node, struct ball *ball) ball->pos = offset; if (node->type->insert) node->type->insert (node, ball); -#ifdef CONFIG_UI ui_update_ball_tracker (ball->index, node->name); -#endif simlog (SLC_DEBUG, "node_insert: added %s to %s, count=%d", ball->name, node->name, node->count); if (node->unlocked && !node_full_p (node->next)) @@ -149,7 +166,7 @@ void node_insert (struct ball_node *node, struct ball *ball) } -/* Remove the head of the node queue. */ +/* Remove the head ball from a node queue and return it. */ struct ball *node_remove (struct ball_node *node) { unsigned int offset; @@ -174,9 +191,7 @@ struct ball *node_remove (struct ball_node *node) ball->node = NULL; if (node->type->remove) node->type->remove (node, ball); -#ifdef CONFIG_UI ui_update_ball_tracker (ball->index, "Free"); -#endif simlog (SLC_DEBUG, "node_remove: took %s from %s", ball->name, node->name); if (node->prev && node->prev->unlocked && node->prev->count != 0) @@ -187,10 +202,13 @@ struct ball *node_remove (struct ball_node *node) return ball; } -/* The minimum delay in milliseconds */ +/* Insert a ball at a node after some number of milliseconds has expired. + Until then the ball is not attached to any node. + Use this to simulate the distance between nodes. + The delay period must be given as a multiple of MIN_DELAY. */ #define MIN_DELAY 100 -void node_insert_delay_update (struct ball *ball) +static void node_insert_delay_update (struct ball *ball) { ball->timer -= MIN_DELAY; if (ball->timer <= 0) @@ -204,9 +222,6 @@ void node_insert_delay_update (struct ball *ball) (time_handler_t)node_insert_delay_update, ball); } - -/* Insert a ball at a node after some number of milliseconds has expired. -Until then the ball is not attached to any node. */ void node_insert_delay (struct ball_node *dst, struct ball *ball, unsigned int delay) { @@ -218,7 +233,8 @@ void node_insert_delay (struct ball_node *dst, struct ball *ball, /* Move a ball from one location to another. The two nodes do not - have to be connected via the default topology. */ + have to be connected via the default topology. Use this directly when + needing to move balls around in an arbitrary manner, as if "by hand". */ void node_move (struct ball_node *dst, struct ball_node *src) { struct ball *ball; @@ -249,22 +265,24 @@ void node_move (struct ball_node *dst, struct ball_node *src) node_insert (dst, ball); else { -#ifdef CONFIG_UI - ui_update_ball_tracker (ball->index, src->name); -#endif + ui_update_ball_tracker (ball->index, src->name); node_insert_delay (dst, ball, src->delay); } } -/* To kick a node means to force a pinball that is there to move to - the next node. */ +/* Move a ball to its default "next" location, using the topology graph. + This is the normal call to make when a ball should be allowed to move on its own. */ void node_kick (struct ball_node *node) { node_move (node->next, node); } +/* Construct a logical connection between two nodes. + This should only be used during initialization, to define the playfield topology. + It says that by default, balls travel from the source node to the sink node + after the given amount of delay. */ void node_join (struct ball_node *source, struct ball_node *sink, unsigned int delay) { source->next = sink; @@ -314,7 +332,7 @@ void node_init (void) /* The outhole and the shooter switches, initialized above, can actually hold more pinballs than 1; they just queue up undetected. - They are also unlocked, meaning that they stay there until something + They are also locked nodes, meaning that balls stay there until something forces them to move on. */ #ifdef MACHINE_OUTHOLE_SWITCH outhole_node.size = MAX_BALLS_PER_NODE; @@ -327,8 +345,8 @@ void node_init (void) node_join (&shooter_node, &open_node, 0); #endif - /* Initialize the open playfield node, which feeds into the trough - (or outhole if present). */ + /* Initialize the open playfield node, which feeds into the trough or + outhole (generically called the drain node) */ open_node.name = "Playfield"; open_node.type = &open_type_node; open_node.size = MAX_BALLS_PER_NODE; diff --git a/sim/script.c b/sim/script.c index 4b623edd4..eecf021ee 100644 --- a/sim/script.c +++ b/sim/script.c @@ -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/sim/segment.c b/sim/segment.c index c1a7c2727..abdae36ad 100644 --- a/sim/segment.c +++ b/sim/segment.c @@ -1,5 +1,5 @@ /* - * Copyright 2008-2009 by Brian Dominy + * Copyright 2008-2011 by Brian Dominy * * This file is part of FreeWPC. * diff --git a/sim/signal.c b/sim/signal.c index 3918bc8e7..970a71204 100644 --- a/sim/signal.c +++ b/sim/signal.c @@ -1,5 +1,5 @@ /* - * Copyright 2008-2010 by Brian Dominy + * Copyright 2008-2011 by Brian Dominy * * This file is part of FreeWPC. * @@ -65,7 +65,7 @@ signal_readings_t *signal_readings[MAX_SIGNALS] = { NULL, }; * The last known value of each signal. This does not * provide any history. Each signal is stored as a single bit. */ -uint32_t signal_states[(MAX_SIGNALS + 32) / 32] = { 0, }; +uint32_t signal_states[(MAX_SIGNALS + 31) / 32] = { 0, }; /** A list of the signals currently being captured */ @@ -84,12 +84,13 @@ uint64_t signal_trace_start_time; double signal_value (uint32_t signo); +#ifdef CONFIG_AC double signal_ac_angle_value (uint32_t offset) { extern double sim_zc_angle (void); return sim_zc_angle (); } - +#endif double signal_sol_voltage_value (uint32_t offset) { @@ -109,10 +110,12 @@ const value_signal signal_value_table[] = { to 1.0, depending on the current phase of the AC cycle. */ signal_sol_voltage_value, +#ifdef CONFIG_AC /* SIGNO_AC_ANGLE is similar, but just returns the -1.0 to 1.0 value that represents the phase angle, without consideration for any particular solenoid line. */ signal_ac_angle_value, +#endif }; @@ -290,7 +293,6 @@ void signal_write (void) void signal_update (signal_number_t signo, unsigned int state) { signal_readings_t *sigrd; - simulated_time_interval_t last_change_time; /* Update last state */ if (state) @@ -316,10 +318,16 @@ void signal_update (signal_number_t signo, unsigned int state) /* See what time the signal last changed state. By comparing this to the current time, we can say how long it held its last value. */ +#if 0 + simulated_time_interval_t last_change_time; if (sigrd->count == 0) last_change_time = 0; else last_change_time = sigrd->t[sigrd->count - 1]; + /* Print the last signal state */ + simlog (SLC_DEBUG, "Signo(%d) was %s for %ldms", signo, !state ? "high" : "low", + realtime_read () - last_change_time); +#endif /* Allocate a new block if the previous block is full. */ if (sigrd->count == MAX_READINGS) @@ -330,11 +338,6 @@ void signal_update (signal_number_t signo, unsigned int state) sigrd = sigrd->next = new_sigrd; } -#if 0 - /* Print the last signal state */ - simlog (SLC_DEBUG, "Signo(%d) was %s for %ldms", signo, !state ? "high" : "low", - realtime_read () - last_change_time); -#endif /* Save the new state along with the timestamp of the change */ sigrd->t[sigrd->count++] = realtime_read (); diff --git a/sim/sound.c b/sim/sound.c index 902cbc9da..54ab22c0b 100644 --- a/sim/sound.c +++ b/sim/sound.c @@ -24,16 +24,12 @@ static void sound_ext_reset (void) { -#ifdef CONFIG_UI ui_write_sound_reset (); -#endif } void sound_ext_command (U16 cmd) { -#ifdef CONFIG_UI ui_write_sound_command (cmd); -#endif } static void sound_ext_write_data (U8 val) diff --git a/sim/switch.c b/sim/switch.c index 93ac80567..481d15360 100644 --- a/sim/switch.c +++ b/sim/switch.c @@ -1,5 +1,5 @@ /* - * Copyright 2008-2010 by Brian Dominy + * Copyright 2008-2011 by Brian Dominy * * This file is part of FreeWPC. * @@ -45,12 +45,10 @@ static void sim_switch_update (int sw) U8 level = sim_switch_matrix[sw/8] & (1 << (sw%8)); /* Redraw the switch */ -#ifdef CONFIG_UI if (show_switch_levels) ui_write_switch (sw, level); else ui_write_switch (sw, level ^ switch_is_opto (sw)); -#endif /* Update the signal tracker */ signal_update (SIGNO_SWITCH + sw, !!level); @@ -84,19 +82,31 @@ void sim_switch_set (int sw, int on) sim_switch_update (sw); } +unsigned int sim_switch_timer; int sim_switch_read (int sw) { return sim_switch_matrix[sw/8] & (1 << (sw%8)); } +void sim_switch_finish (int sw) +{ + if (--sim_switch_timer == 0) + { + sim_switch_toggle (sw); + } + else + sim_time_register (16, FALSE, (time_handler_t)sim_switch_finish, sw); +} void sim_switch_depress (int sw) { - sim_switch_toggle (sw); - task_sleep (TIME_166MS); - sim_switch_toggle (sw); - task_sleep (TIME_66MS); + if (sim_switch_timer == 0) + { + sim_switch_toggle (sw); + sim_switch_timer = 10; + sim_time_register (16, FALSE, (time_handler_t)sim_switch_finish, sw); + } } @@ -131,5 +141,8 @@ void sim_switch_init (void) { sim_switch_toggle (sw); } + else + sim_switch_update (sw); + sim_switch_timer = 0; } diff --git a/sim/timing.c b/sim/timing.c index e043effd0..f86cd894d 100644 --- a/sim/timing.c +++ b/sim/timing.c @@ -1,5 +1,5 @@ /* - * Copyright 2008, 2010 by Brian Dominy + * Copyright 2008, 2010, 2011 by Brian Dominy * * This file is part of FreeWPC. * diff --git a/sim/tz_sim.c b/sim/tz_sim.c index c210692d6..ce1e70c76 100644 --- a/sim/tz_sim.c +++ b/sim/tz_sim.c @@ -49,6 +49,7 @@ struct ball_node autofire_node; struct ball_node shooter_diverter_node; +/* TODO - not used */ void node_clone (struct ball_node *dst, struct ball_node *src) { dst->name = src->name; @@ -59,6 +60,8 @@ void node_clone (struct ball_node *dst, struct ball_node *src) } +/* Construct a node where a switch is located, but the ball does not + automatically move from it when it lands there. */ void locked_switch_node_init (struct ball_node *node, unsigned int swno) { node->name = names_of_switches[swno]; @@ -71,13 +74,18 @@ void locked_switch_node_init (struct ball_node *node, unsigned int swno) void open_node_init (struct ball_node *node, const char *name) { - node->name = "Gumball"; + node->name = name; node->type = &open_type_node; node->size = MAX_BALLS_PER_NODE; node->unlocked = 0; } +/* Initialize a multiplex point. + mux_node is the node for the multiplexor itself. When a ball reaches + here, and the given solenoid is active, the ball will transition to + the active node; otherwise to the inactive node. It will not remain + at the multiplexer very long. */ void diverting_node_init (struct ball_node *mux_node, unsigned int sol, struct ball_node *inactive_node, struct ball_node *active_node) { @@ -106,7 +114,8 @@ void diverting_node_init (struct ball_node *mux_node, unsigned int sol, } - +/* Construct a kicking node. This is used for one-ball devices + where the game code does not define a proper "device" for it. */ void kicking_node_init (struct ball_node *node, unsigned int sol) { device_coil_init (sol, node); @@ -119,6 +128,9 @@ void kicking_node_init (struct ball_node *node, unsigned int sol) } +/* Construct a magnet node. This is a special case of a diverter, + where the ball is held at the multiplexing point when the magnet + is active. */ void magnet_node_init (struct ball_node *magnet_node, unsigned int sol, struct ball_node *exit_node) { @@ -178,7 +190,12 @@ void mach_node_init (void) open_node_init (&gumball_machine_node, "Gumball Mech."); open_node_init (&powerfield_node, "Powerfield"); - /* Mark the Powerball */ - //the_ball[0].flags |= 0x1; + /* Mark one of the balls as the Powerball */ + the_ball[0].flags |= BALL_CERAMIC; + + /* Change the types of the proximity switches, so that they do not cause any + action on ceramic balls. */ + switch_nodes[SW_FAR_LEFT_TROUGH].type = &proximity_switch_type_node; + switch_nodes[SW_SLOT_PROXIMITY].type = &proximity_switch_type_node; } diff --git a/sim/ui_curses.c b/sim/ui_curses.c index bf1bf58ef..faa49c751 100644 --- a/sim/ui_curses.c +++ b/sim/ui_curses.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. * @@ -20,11 +20,7 @@ #include #include -#ifdef CONFIG_HOST_CYGWIN -#include -#else #include -#endif #include #include @@ -45,29 +41,14 @@ WINDOW *ball_tracker_win; WINDOW *cmdline_win; -static void print_center (WINDOW *w, int x, int y, const char *format, ...) -{ - va_list ap; - int len; - char buf[80]; - - va_start (ap, format); - vsprintf (buf, format, ap); - va_end (ap); - - len = strlen (buf); - x = x - len/2; - wmove (w, y, x); - wprintw (w, format); -} - static WINDOW * ui_window_create (int width, int height, int x, int y, const char *title) { WINDOW *w = newwin (height, width, y, x); if (title) { box (w, 0, 0); - print_center (w, width/2, 0, title); + wmove (w, 0, 2); + wprintw (w, title); } wrefresh (w); return w; @@ -92,6 +73,9 @@ void ui_write_debug (enum sim_log_class c, const char *buffer) if (c != SLC_DEBUG_PORT) wprintw (debug_win, "[SIM] "); wprintw (debug_win, "%s", buffer); +#ifndef CONFIG_DEBUG_INPUT + if (c != SLC_DEBUG_PORT) +#endif waddch (debug_win, '\n'); wrefresh (debug_win); } @@ -193,7 +177,8 @@ void ui_refresh_asciidmd (unsigned char *data) } wrefresh (display_win); } -#else +#endif +#if (MACHINE_ALPHANUMERIC == 1) void ui_refresh_display (unsigned int x, unsigned int y, char c) { wmove (display_win, y+1, x+1); @@ -216,13 +201,18 @@ void ui_init (void) initscr (); clear (); int x = 0, y = 0; + int xwidth; - switch_win = ui_window_create (34, 10, x, y, " Switches "); + xwidth = 3 * ((PINIO_NUM_SWITCHES + 7) / 8) + 3; + xwidth = (xwidth >= 16) ? xwidth : 16; + switch_win = ui_window_create (xwidth, 10, x, y, " Switches "); cmdline_win = ui_window_create (62, 3, x, y + 10, " Command Line "); - x += 33 + 1; + x += xwidth; - lamp_win = ui_window_create (28, 10, x, y, " Lamps "); - x += 27 + 1; + xwidth = 3 * ((PINIO_NUM_LAMPS + 7) / 8) + 3; + xwidth = (xwidth >= 16) ? xwidth : 16; + lamp_win = ui_window_create (xwidth, 10, x, y, " Lamps "); + x += xwidth; sol_win = ui_window_create (20, 10, x, y, " Solenoids "); triac_win = ui_window_create (12, 3, x, y+10, " Triacs "); @@ -244,11 +234,13 @@ void ui_init (void) x += 130 + 1; y = 0; debug_win = ui_window_create (64, 46, x, y, NULL); -#else +#elif (MACHINE_ALPHANUMERIC == 1) display_win = ui_window_create (20, 4, x, y, " Display Panel "); x = 0; y += 4 + 1; debug_win = ui_window_create (80, 25, x, y, NULL); +#else + debug_win = ui_window_create (80, 25, x, y, NULL); #endif scrollok (debug_win, 1); diff --git a/sim/ui_gtk.c b/sim/ui_gtk.c index 0eb4d4c69..dba79814c 100644 --- a/sim/ui_gtk.c +++ b/sim/ui_gtk.c @@ -39,23 +39,21 @@ GtkTextBuffer *msg_text_buffer; GtkAdjustment *msg_adj; GtkWidget *dmd_widget; -GdkColor dmd_colors[4]; +GdkColor dmd_colors[PINIO_DMD_PIXEL_COLORS]; int dmd_current_color = -1; -unsigned char dmd_prev[4096]; -unsigned char dmd_next[4096]; +unsigned char dmd_prev[PINIO_DMD_WIDTH * PINIO_DMD_HEIGHT]; +unsigned char dmd_next[PINIO_DMD_WIDTH * PINIO_DMD_HEIGHT]; void ui_print_command (const char *cmdline) { } -void ui_write_debug (enum sim_log_class c, const char *format, va_list ap) +void ui_write_debug (enum sim_log_class c, const char *buf) { - char buf[256]; GtkTextBuffer *gtk_buf; GtkAdjustment *gtk_adj; - vsprintf (buf, format, ap); gtk_buf = (c == SLC_DEBUG_PORT) ? debug_text_buffer : msg_text_buffer; gtk_adj = (c == SLC_DEBUG_PORT) ? debug_adj : msg_adj; @@ -103,7 +101,7 @@ void ui_write_task (int taskno, int gid) #if (MACHINE_DMD == 1) void ui_refresh_asciidmd (unsigned char *data) { - memcpy (dmd_next, data, 4096); + memcpy (dmd_next, data, PINIO_DMD_WIDTH * PINIO_DMD_HEIGHT); gdk_window_invalidate_rect (dmd_widget->window, NULL, FALSE); } #else @@ -113,9 +111,8 @@ void ui_refresh_display (unsigned int x, unsigned int y, char c) #endif -void ui_update_ball_tracker (unsigned int ballno, unsigned int location) +void ui_update_ball_tracker (unsigned int ballno, const char *location) { - extern const char *sim_ball_location_name (unsigned int location); } void sw_toggle_cb (GtkObject *sw, gpointer user) @@ -138,32 +135,41 @@ gboolean display_expose_event_cb (GtkWidget *widget, GdkEventExpose *event, static int inited = 0; int color; +#define DMD_COLOR_BLACK 0 +#define DMD_COLOR_DEFAULT 2 + if (!inited) { gdk_color_parse ("black", &dmd_colors[0]); +#ifdef CONFIG_PLATFORM_WPC gdk_color_parse ("orange3", &dmd_colors[1]); gdk_color_parse ("orange2", &dmd_colors[2]); gdk_color_parse ("orange1", &dmd_colors[3]); +#else +#error "No colormap defined for this platform" +#endif gtk_widget_modify_bg (widget, GTK_STATE_NORMAL, &dmd_colors[0]); - dmd_current_color = 2; - gtk_widget_modify_fg (widget, GTK_STATE_NORMAL, &dmd_colors[2]); + dmd_current_color = DMD_COLOR_DEFAULT; + gtk_widget_modify_fg (widget, GTK_STATE_NORMAL, &dmd_colors[DMD_COLOR_DEFAULT]); inited = 1; } fg = widget->style->fg_gc[gtk_widget_get_state (widget)]; bg = widget->style->bg_gc[gtk_widget_get_state (widget)]; - for (color = 0; color < 4; color++) +#define DMD_PIXEL_BOX_SIZE 4 + + for (color = 0; color < PINIO_DMD_PIXEL_COLORS; color++) { nx = dmd_next; - for (y = 0; y < 32; y++) + for (y = 0; y < PINIO_DMD_HEIGHT; y++) { - for (x = 0; x < 128; x++, nx++) + for (x = 0; x < PINIO_DMD_WIDTH; x++, nx++) { if (color != *nx) continue; - if (color == 0) + if (color == DMD_COLOR_BLACK) gc = bg; else if (color != dmd_current_color) { @@ -174,9 +180,9 @@ gboolean display_expose_event_cb (GtkWidget *widget, GdkEventExpose *event, } else gc = fg; - width = (*nx != 0) ? 3 : 4; + width = (*nx != 0) ? (DMD_PIXEL_BOX_SIZE-1) : DMD_PIXEL_BOX_SIZE; gdk_draw_rectangle (widget->window, gc, TRUE, - x*4+1, y*4+1, width, width); + x*DMD_PIXEL_BOX_SIZE+1, y*DMD_PIXEL_BOX_SIZE+1, width, width); } } } @@ -243,6 +249,7 @@ void ui_init (void) dmd_widget = ui_widget_named ("display_area"); /* Connect the coin door buttons */ + /* TODO - autogenerate this block */ ui_connect_sw ("sw_left_coin", 0); ui_connect_sw ("sw_center_coin", 1); ui_connect_sw ("sw_right_coin", 2); diff --git a/sim/ui_sdl.c b/sim/ui_sdl.c new file mode 100644 index 000000000..e43fb9baf --- /dev/null +++ b/sim/ui_sdl.c @@ -0,0 +1,282 @@ +/* + * 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 + */ + +#define TTF + +#include +#ifdef TTF +#include +#endif +#include +#include + +#define FONT_PATH "/usr/share/fonts/truetype/freefont/" + +SDL_Surface *screen; +Uint32 color_pixels[4]; +Uint32 on_color; +Uint32 off_color; +Uint32 black; +TTF_Font *font; +SDL_Color text_fg = { 255, 255, 255 }; +SDL_Color text_bg = { 0, 0, 0 }; +SDL_Rect loc; + +int sdl_sol_history[NUM_POWER_DRIVES] = {}; + +#define WINDOW_WIDTH 800 +#define WINDOW_HEIGHT 400 + +#define BOX_SIZE 12 +#define BOX_BORDER 4 +#define BOX_DIM (BOX_SIZE + BOX_BORDER) + +#define DMD_XPOS 0 +#define DMD_YPOS 0 + +#define LAMP_XPOS 0 +#define LAMP_YPOS 120 + +#define SW_XPOS 200 +#define SW_YPOS 120 + +#define SOL_XPOS 400 +#define SOL_YPOS 120 + +static void box (unsigned int x, unsigned int y, unsigned int width, unsigned int height, Uint32 color) +{ + Uint32 *bufp; + int i; + + if (!screen) + return; + while (height > 0) + { + bufp = (Uint32 *)screen->pixels + y * screen->pitch/4 + x; + for (i=0; i < width; i++) + *bufp++ = color; + height--; + y++; + } +} + +static void text_redraw (SDL_Rect rect, const char *string, SDL_Color color) +{ + SDL_Surface *surf; + + box (rect.x, rect.y, rect.w, rect.h, black); + surf = TTF_RenderText_Blended (font, string, color); + SDL_BlitSurface (surf, NULL, screen, &rect); + SDL_FreeSurface (surf); +} + + +void ui_print_command (const char *cmdline) +{ +} + +void ui_console_render_string (const char *buffer) +{ +} + +void ui_write_debug (enum sim_log_class c, const char *buffer) +{ + printf ("%s\n", buffer); +} + +void ui_write_solenoid (int solno, int on_flag) +{ + int x = solno / 8; + int y = solno % 8; + box (SOL_XPOS + x * BOX_DIM, SOL_YPOS + y * BOX_DIM, BOX_SIZE, BOX_SIZE, on_flag ? on_color : off_color); + //sdl_sol_history[solno] = on_flag ? 0 : 254; +} + +void ui_write_lamp (int lampno, int on_flag) +{ + int x = lampno / 8; + int y = lampno % 8; + box (LAMP_XPOS + x * BOX_DIM, LAMP_YPOS + y * BOX_DIM, BOX_SIZE, BOX_SIZE, on_flag ? on_color : off_color); +} + +void ui_write_triac (int triacno, int on_flag) +{ + box (LAMP_XPOS + triacno * BOX_DIM, LAMP_YPOS + 12 * BOX_DIM, BOX_SIZE, BOX_SIZE, on_flag ? on_color : off_color); +} + +void ui_write_switch (int switchno, int on_flag) +{ + int x = switchno / 8; + int y = switchno % 8; + box (SW_XPOS + x * BOX_DIM, SW_YPOS + y * BOX_DIM, BOX_SIZE, BOX_SIZE, on_flag ? on_color : off_color); +} + +void ui_write_sound_command (unsigned int x) +{ +} + +void ui_write_sound_reset (void) +{ +} + +void ui_write_task (int taskno, int gid) +{ +} + +#if (MACHINE_DMD == 1) +void ui_refresh_asciidmd (unsigned char *data) +{ + int x, y; + for (y = 0; y < PINIO_DMD_HEIGHT; y++) + { + for (x = 0; x < PINIO_DMD_WIDTH; x++) + { + Uint32 color = color_pixels[(*data <= 3) ? *data : 0]; + box (DMD_XPOS + x * 3, DMD_YPOS + y * 3, 2, 2, color); + data++; + } + } +} +#else +void ui_refresh_display (unsigned int x, unsigned int y, char c) +{ +} +#endif + +void ui_update_ball_tracker (unsigned int ballno, const char *location) +{ + SDL_Rect r; + r.x = 540; + r.y = ballno * 20; + r.w = 200; + r.h = 20; + text_redraw (r, location, text_fg); +} + +U8 ui_poll_events (void) +{ + SDL_Event event; + static U8 key = '\0'; + + if (SDL_PollEvent (&event)) + { + if (event.type == SDL_KEYDOWN && key == '\0') + return (key = event.key.keysym.unicode & 0x7F); + else if (event.type == SDL_KEYUP) + key = '\0'; + } + return '\0'; +} + +void ui_init (void) +{ + SDL_Surface *surf; + + printf ("Initializing SDL UI\n"); + + if (SDL_Init (SDL_INIT_AUDIO | SDL_INIT_VIDEO) < 0) { + fprintf (stderr, "error: unable to initialize SDL\n"); + exit (1); + } + atexit (SDL_Quit); + +#ifdef TTF + if (TTF_Init () < 0) { + fprintf (stderr, "error: unable to initialize TTF\n"); + exit (1); + } + atexit (TTF_Quit); +#endif + + SDL_WM_SetCaption ("FreeWPC Simulation - " MACHINE_NAME, NULL); + + screen = SDL_SetVideoMode (WINDOW_WIDTH, WINDOW_HEIGHT, 32, SDL_SWSURFACE); + if (screen == NULL) { + fprintf (stderr, "error: unable to set video mode\n"); + exit (1); + } + + SDL_EnableUNICODE (1); + + black = color_pixels[0] = SDL_MapRGB (screen->format, 0, 0, 0); + off_color = SDL_MapRGB (screen->format, 64, 64, 64); + color_pixels[1] = SDL_MapRGB (screen->format, 128, 128, 128); + color_pixels[2] = SDL_MapRGB (screen->format, 192, 192, 192); + on_color = color_pixels[3] = SDL_MapRGB (screen->format, 255, 255, 255); + +#ifdef TTF + font = TTF_OpenFont (FONT_PATH "FreeSerif.ttf", 16); + if (font == NULL) { + fprintf (stderr, "error: cannot open font\n"); + exit (1); + } + + loc.x = LAMP_XPOS; + loc.y = LAMP_YPOS + 10 * BOX_DIM; + surf = TTF_RenderText_Blended (font, "LAMPS", text_fg); + SDL_BlitSurface (surf, NULL, screen, &loc); + SDL_FreeSurface (surf); + + loc.y += 3 * BOX_DIM; + surf = TTF_RenderText_Blended (font, "G.I. STRINGS", text_fg); + SDL_BlitSurface (surf, NULL, screen, &loc); + SDL_FreeSurface (surf); + + loc.x = SW_XPOS; + loc.y = SW_YPOS + 130; + surf = TTF_RenderText_Blended (font, "SWITCHES", text_fg); + SDL_BlitSurface (surf, NULL, screen, &loc); + SDL_FreeSurface (surf); + + loc.x = SOL_XPOS; + loc.y = SOL_YPOS + 130; + surf = TTF_RenderText_Blended (font, "COILS", text_fg); + SDL_BlitSurface (surf, NULL, screen, &loc); + SDL_FreeSurface (surf); +#endif +} + +void ui_refresh_all (void) +{ + int sol; + + if (!screen) + return; +#if 0 + for (sol=0; sol < NUM_POWER_DRIVES; sol++) + { + if (sdl_sol_history[sol] > 64) + { + int x = sol / 8; + int y = sol % 8; + int intensity = --sdl_sol_history[sol]; + box (SOL_XPOS + x * BOX_DIM, SOL_YPOS + y * BOX_DIM, BOX_SIZE, BOX_SIZE, + SDL_MapRGB (screen->format, intensity, intensity, intensity)); + } + } +#endif + SDL_UpdateRect (screen, 0, 0, WINDOW_WIDTH, WINDOW_HEIGHT); +} + +void ui_exit (void) +{ + TTF_CloseFont (font); +} + diff --git a/sim/watchdog.c b/sim/watchdog.c index 476d5f3de..c0bf0f4b0 100644 --- a/sim/watchdog.c +++ b/sim/watchdog.c @@ -80,6 +80,8 @@ void sim_watchdog_reset (void) void sim_watchdog_init (void) { signal_update (SIGNO_BLANKING, 0); +#ifdef CONFIG_PLATFORM_WPC sim_time_register (8, TRUE, sim_watchdog_periodic, NULL); +#endif } diff --git a/sim/wpc-pic.c b/sim/wpc-pic.c index fd2dc394b..3c583cb83 100644 --- a/sim/wpc-pic.c +++ b/sim/wpc-pic.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/stressbuild b/stressbuild old mode 100755 new mode 100644 index 5e9e9a668..c1648189b --- a/stressbuild +++ b/stressbuild @@ -6,7 +6,7 @@ typeset -i count typeset -i mincount -machines="tz corvette wcs funhouse t2 afm bop tester" +machines="tz corvette wcs funhouse t2 afm bop tester min p2ktest tspp" sim_options="n y" gcc_options="4.3.4" debugger_options="y n" @@ -38,6 +38,9 @@ case $option in --nobpt) bpt_options="n" ;; + --sys*) + machines="tester" + ;; --fast) machines="funhouse t2 tz wcs afm" sim_options="n" @@ -95,7 +98,7 @@ for sim in $sim_options; do export GCC_VERSION=$gcc export CONFIG_SIM export CONFIG_BPT - make $make_options DOTCONFIG="" $target 2>&1 > /dev/null + make $make_options CONFIG="" $target 2>&1 > /dev/null rc="$?" if [ -f err ]; then diff --git a/test/Makefile b/test/Makefile index 15b88641e..8c91ebc63 100644 --- a/test/Makefile +++ b/test/Makefile @@ -1,14 +1,14 @@ -TEST_OBJS += test/window.o +TEST_OBJS += $(if $(CONFIG_TEST), test/window.o) TEST2_OBJS += test/format.o -TEST2_OBJS += test/preset.o +TEST2_OBJS += $(if $(CONFIG_TEST), test/preset.o) TEST2_OBJS += $(if $(CONFIG_DMD),test/swtest.o) TEST2_OBJS += $(if $(CONFIG_DMD),test/dmdtest.o) TEST2_OBJS += test/adjust.o TEST2_OBJS += test/histogram.o TEST2_OBJS += test/timestamp.o TEST2_OBJS += test/stress.o -TEST2_OBJS += test/wire.o +TEST2_OBJS += $(if $(CONFIG_TEST), test/wire.o) TEST2_OBJS += test/pricing.o TEST2_OBJS += test/burnin.o diff --git a/test/adjust.c b/test/adjust.c index c9f9df144..c91032155 100644 --- a/test/adjust.c +++ b/test/adjust.c @@ -102,7 +102,7 @@ struct adjustment standard_adjustments[] = { { "BALLS PER GAME", &balls_per_game_value, 3, &system_config.balls_per_game }, { "TILT WARNINGS", &balls_per_game_value, 3, &system_config.tilt_warnings }, { "MAX E.B.", &max_eb_value, 5, &system_config.max_ebs }, - { "MAX E.B. PER B.I.P.", &max_eb_value, 4, &system_config.max_ebs_per_bip }, + { "MAX E.B. PER B.I.P.", &max_eb_value, 3, &system_config.max_ebs_per_bip }, { "REPLAY SYSTEM", &replay_system_value, REPLAY_FIXED, &system_config.replay_system }, { "REPLAY PERCENT", &replay_percent_value, 7, &system_config.replay_percent }, { "REPLAY START", &replay_score_value, REPLAY_SCORE_TYPE_DEFAULT, &system_config.replay_start }, @@ -112,12 +112,12 @@ struct adjustment standard_adjustments[] = { { "REPLAY 3 " STR_LEVEL, &replay_score_value, 0, &system_config.replay_level[2] }, { "REPLAY 4 " STR_LEVEL, &replay_score_value, 0, &system_config.replay_level[3] }, #ifdef CONFIG_REPLAY_BOOST_BOOLEAN - { "REPLAY BOOST", &on_off_value, ON, &system_config.replay_boost }, + { "REPLAY BOOST", &on_off_value, OFF, &system_config.replay_boost }, #else { "REPLAY BOOST", &replay_boost_value, REPLAY_BOOST_TYPE_DEFAULT, &system_config.replay_boost }, #endif - { "REPLAY AWARD", &free_award_value, FREE_AWARD_CREDIT, &system_config.replay_award }, - { "SPECIAL AWARD", &free_award_value, FREE_AWARD_CREDIT, &system_config.special_award }, + { "REPLAY AWARD", &free_award_value, FREE_AWARD_EB, &system_config.replay_award }, + { "SPECIAL AWARD", &free_award_value, FREE_AWARD_EB, &system_config.special_award }, { "MATCH AWARD", &free_award_value, FREE_AWARD_CREDIT, &system_config.match_award }, { "EX. BALL TICKET", &yes_no_value, NO, &system_config.extra_ball_ticket }, { "MAX. TICKET/PLAYER" ,&max_tickets_value, 25, &system_config.max_tickets_per_player }, @@ -148,24 +148,32 @@ verified/initialized correctly because of this */ struct adjustment feature_adjustments[] = { /* The first few feature adjustments are provided by the core system but only enabled if the game supports it. */ - +#ifdef CONFIG_BUYIN { "BUY EXTRA BALL", &yes_no_value, NO, &system_config.buy_extra_ball }, - +#endif #ifdef MACHINE_LAUNCH_SWITCH - { "TIMED PLUNGER", &on_off_value, OFF, &system_config.timed_plunger }, + { "TIMED PLUNGER", &on_off_value, ON, &system_config.timed_plunger }, { "FLIPPER PLUNGER", &on_off_value, OFF, &system_config.flipper_plunger }, #endif - - { "FAMILY MODE", &yes_no_value, NO, &system_config.family_mode }, - -#ifdef MACHINE_HAS_NOVICE_MODE +#ifdef CONFIG_FAMILY_MODE + { "FAMILY MODE", &yes_no_value, YES, &system_config.family_mode }, +#endif +#ifdef CONFIG_NOVICE_MODE { "NOVICE MODE", &yes_no_value, NO, &system_config.novice_mode }, #endif { "GAME MUSIC", &on_off_value, ON, &system_config.game_music }, #ifdef CONFIG_TIMED_GAME - { "TIMED GAME", &yes_no_value, YES, &system_config.timed_game }, + { "TIMED GAME", &yes_no_value, NO, &system_config.timed_game }, +#endif + +#ifdef CONFIG_DIFFICULTY_LEVEL + { "DIFFICULTY", &easy_or_hard_value, EASY, &system_config.difficulty }, +#endif + +#ifdef CONFIG_DISABLE_CLAW + { "DISABLE CLAW", &yes_no_value, NO, &system_config.disable_claw }, #endif /* The game-specific feature adjustments go here. */ @@ -210,7 +218,7 @@ struct adjustment pricing_adjustments[] = { #ifdef FREE_ONLY { "", &yes_no_value, YES, &price_config.free_play }, #else - { "FREE PLAY", &yes_no_value, NO, &price_config.free_play }, + { "FREE PLAY", &yes_no_value, YES, &price_config.free_play }, #endif { "HIDE COIN AUDITS", &yes_no_value, NO, &price_config.hide_coin_audits }, @@ -230,11 +238,11 @@ struct adjustment hstd_adjustments[] = { { "HIGHEST SCORES", &on_off_value, ON, &hstd_config.highest_scores }, { "H.S.T.D. AWARD", &free_award_value, FREE_AWARD_CREDIT, &hstd_config.hstd_award }, { "CHAMP. H.S.T.D.", &on_off_value, ON, &hstd_config.champion_hstd }, - { "CHAMP. CREDITS", &credit_count_value, 2, &hstd_config.champion_credits }, - { "H.S.T.D. 1 CREDITS", &credit_count_value, 1, &hstd_config.hstd_credits[0] }, - { "H.S.T.D. 2 CREDITS", &credit_count_value, 1, &hstd_config.hstd_credits[1] }, - { "H.S.T.D. 3 CREDITS", &credit_count_value, 1, &hstd_config.hstd_credits[2] }, - { "H.S.T.D. 4 CREDITS", &credit_count_value, 1, &hstd_config.hstd_credits[3] }, + { "CHAMP. CREDITS", &credit_count_value, 0, &hstd_config.champion_credits }, + { "H.S.T.D. 1 CREDITS", &credit_count_value, 0, &hstd_config.hstd_credits[0] }, + { "H.S.T.D. 2 CREDITS", &credit_count_value, 0, &hstd_config.hstd_credits[1] }, + { "H.S.T.D. 3 CREDITS", &credit_count_value, 0, &hstd_config.hstd_credits[2] }, + { "H.S.T.D. 4 CREDITS", &credit_count_value, 0, &hstd_config.hstd_credits[3] }, /* The next adjustment is stored in units of 250 games, so this is really 3000 games per reset ... */ { "H.S. RESET EVERY", &hs_reset_value, 12, &hstd_config.hs_reset_every }, @@ -281,17 +289,29 @@ struct adjustment debug_adjustments[] = { }; #endif +extern U8 tilt_warnings; +extern U8 extra_balls; +struct adjustment modify_game_adjustments[] = { + { "BALL NUMBER", &balls_per_game_value, 1, &ball_up }, /* dynamic range restrict */ + { "PLAYER UP", &players_per_game_value, 1, &player_up }, /* dynamic range restrict */ + { "NUM. PLAYERS", &players_per_game_value, 1, &num_players }, /* dynamic range restrict */ + { "TILT WARNINGS", &integer_value, 0, &tilt_warnings }, /* dynamic range restrict */ + { "EXTRA BALLS", &integer_value, 0, &extra_balls }, /* dynamic range restrict */ + { NULL, NULL, 0, NULL }, +}; + + + struct adjustment empty_adjustments[] = { { "EMPTY ADJ. SET", &integer_value, 0, NULL }, { NULL, NULL, 0, NULL }, }; -void adj_reset (struct adjustment *adjs) -{ - while (adjs->name != NULL) - { - if (adjs->nvram) - { + + +void adj_reset (struct adjustment *adjs) { + while (adjs->name != NULL) { + if (adjs->nvram) { *(adjs->nvram) = adjs->factory_default; } adjs++; @@ -299,31 +319,33 @@ void adj_reset (struct adjustment *adjs) } -void adj_verify (struct adjustment *adjs) -{ + + +void adj_verify (struct adjustment *adjs) { U8 val; - while (adjs->name != NULL) - { - if (adjs->nvram) - { + while (adjs->name != NULL) { + if (adjs->nvram) { val = *(adjs->nvram); - if ((val < adjs->values->min) || (val > adjs->values->max)) - { + if ((val < adjs->values->min) || (val > adjs->values->max)) { pinio_nvram_unlock (); *(adjs->nvram) = adjs->factory_default; pinio_nvram_lock (); - } - } + + sound_start (ST_ANY, LOW_HORN, SL_1S, PRI_GAME_QUICK5); + task_sleep (TIME_500MS); + task_sleep (TIME_500MS); + }//end of inner if + }//end of outer if adjs++; - } -} + }//end of while +}//end of function + struct adjustment *adj_lookup; -void adj_prepare_lookup (struct adjustment *table) -{ +void adj_prepare_lookup (struct adjustment *table) { adj_lookup = table; } @@ -331,30 +353,30 @@ void adj_prepare_lookup (struct adjustment *table) /** Render the name of the adjustment that is located at the given protected memory address, and its current value, to the display. If there is no match, nothing is printed. */ +#ifdef CONFIG_DMD_OR_ALPHA void adj_name_for_preset (U8 * const nvram, const U8 value) { if (adj_lookup == NULL) return; - /* Searching through all adjustments, and then printing was known - to be slow at one point, so these sleeps were added. It may not - be necessary now that printing is done in assembly. */ - task_sleep (TIME_16MS); while (adj_lookup->nvram != NULL) { if (adj_lookup->nvram == nvram) { - task_sleep (TIME_16MS); - font_render_string_center (&font_mono5, 64, 16, adj_lookup->name); + if (adj_lookup->name[0] == '\0') + return; + font_render_string_center (&font_var5, 48, 20, adj_lookup->name); adj_lookup->values->render (value); - print_row_center (&font_mono5, 24); + font_render_string_center (&font_var5, 96, 20, sprintf_buffer); return; } adj_lookup++; } } +#endif +//called by csum failure at kernal/adj.c void adj_reset_all (void) { adj_reset (standard_adjustments); @@ -365,6 +387,7 @@ void adj_reset_all (void) } +//called at init to verify adjustment is in range void adj_verify_all (void) { adj_verify (standard_adjustments); @@ -375,12 +398,15 @@ void adj_verify_all (void) } + + void adj_set_current (struct adjustment *first) { current_adjustment_set = first; } + U8 adj_count_current (void) { U8 count = 0; @@ -443,12 +469,14 @@ bool adj_current_hidden_p (void) std_adj_p (replay_levels))) return TRUE; +#ifdef CONFIG_DMD_OR_ALPHA /* Allow other things to be added too. Machines or other modules should return FALSE if the current adjustment should not be visible. (Note this is inverted logic from the rest of this function.) */ if (!callset_invoke_boolean (adjustment_visible)) return TRUE; +#endif /* Otherwise, this adjustment is OK to show */ return FALSE; diff --git a/test/burnin.c b/test/burnin.c index e405a520d..9736b101d 100644 --- a/test/burnin.c +++ b/test/burnin.c @@ -66,14 +66,18 @@ void burnin_flasher_thread (void) task_sleep (TIME_200MS); } } + task_sleep (TIME_500MS); } - task_sleep (TIME_500MS); } void burnin_lamp_thread (void) { +#ifdef CONFIG_TEST SECTION_VOIDCALL (__test__, all_lamp_test_thread); +#else +/* TODO */ +#endif } #if (MACHINE_FLIPTRONIC == 1) @@ -87,18 +91,22 @@ void burnin_flipper_thread (void) } #endif +#ifdef CONFIG_DMD_OR_ALPHA void burnin_draw (void) { time_audit_format (&burnin_duration); font_render_string_left (&font_mono5, 4, 20, sprintf_buffer); } +#endif void burnin_time_audit_thread (void) { for (;;) { time_audit_add_sec (&burnin_duration, 1); +#ifdef CONFIG_DMD_OR_ALPHA SECTION_VOIDCALL (__test__, window_redraw); +#endif task_sleep_sec (1); } } diff --git a/test/format.c b/test/format.c index 272754aa1..0614a02d5 100644 --- a/test/format.c +++ b/test/format.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. * @@ -291,9 +291,6 @@ void integer_audit (audit_t val) sprintf ("%ld", val); } -void long_integer_audit (long_audit_t *val) -{ -} void secs_audit (audit_t val) { @@ -457,9 +454,6 @@ void render_audit (audit_t val, audit_format_type_t type) case AUDIT_TYPE_AVG_PER_BALL: average_per_ball_audit (val); break; - case AUDIT_TYPE_LONGINT: - /* TODO long_integer_audit (val); */ - break; #ifndef CONFIG_NATIVE /* Timestamp audits are broken in native mode because we are using a 16-bit as a pointer, which only works on the 6809. */ diff --git a/test/histogram.c b/test/histogram.c index cd26c34bd..71f3f5470 100644 --- a/test/histogram.c +++ b/test/histogram.c @@ -111,6 +111,7 @@ void game_time_histogram_add (U16 val) histogram_add (&game_time_histogram, val); } +#ifdef CONFIG_DMD_OR_ALPHA void histogram_browser_draw_1 (void) { extern U8 browser_max; @@ -141,3 +142,4 @@ void histogram_browser_init_1 (void) browser_max = browser_histogram->count - 1; } +#endif diff --git a/test/preset.c b/test/preset.c index 5b83e728d..bbe78b71e 100644 --- a/test/preset.c +++ b/test/preset.c @@ -1,5 +1,5 @@ /* - * Copyright 2008, 2009 by Brian Dominy + * Copyright 2008-2011 by Brian Dominy * * This file is part of FreeWPC. * @@ -33,10 +33,19 @@ struct preset preset_ ## N = { \ .comps = preset_ ## N ## _comps \ }; +#ifndef FREE_ONLY +#define PRESET_FREE_PLAY \ + { pricing_adjustments, &price_config.free_play, YES }, +#else +#define PRESET_FREE_PLAY +#endif + extern struct adjustment standard_adjustments[]; extern struct adjustment feature_adjustments[]; extern struct adjustment pricing_adjustments[]; +struct preset_component *preset_component_ptr; + PRESET_BEGIN (3ball) { standard_adjustments, &system_config.balls_per_game, 3 }, @@ -49,22 +58,23 @@ PRESET_END (5ball, "5-BALL") PRESET_BEGIN (tournament) + PRESET_FREE_PLAY { standard_adjustments, &system_config.balls_per_game, 3 }, - { standard_adjustments, &system_config.replay_award, FREE_AWARD_OFF }, + { standard_adjustments, &system_config.replay_award, FREE_AWARD_EB }, { standard_adjustments, &system_config.special_award, FREE_AWARD_OFF }, - { pricing_adjustments, &price_config.free_play, YES }, { standard_adjustments, &system_config.game_restart, GAME_RESTART_NEVER }, { standard_adjustments, &system_config.max_ebs, 0 }, { standard_adjustments, &system_config.match_feature, OFF }, { standard_adjustments, &system_config.tournament_mode, ON }, { standard_adjustments, &system_config.no_bonus_flips, NO }, + { standard_adjustments, &system_config.allow_chase_ball, NO }, { feature_adjustments, &system_config.buy_extra_ball, NO }, PRESET_END (tournament, "TOURNAMENT") PRESET_BEGIN (show) - { pricing_adjustments, &price_config.free_play, YES }, - { standard_adjustments, &system_config.replay_award, FREE_AWARD_OFF }, + PRESET_FREE_PLAY + { standard_adjustments, &system_config.replay_award, FREE_AWARD_EB }, { standard_adjustments, &system_config.special_award, FREE_AWARD_OFF }, { standard_adjustments, &system_config.match_feature, OFF }, PRESET_END (show, "SHOW") @@ -136,7 +146,7 @@ PRESET_BEGIN (eu) PRESET_END (eu, "E.U.") PRESET_BEGIN (dev) - { pricing_adjustments, &price_config.free_play, YES }, + PRESET_FREE_PLAY PRESET_END (dev, "DEVELOPER") PRESET_BEGIN (buyin_test) @@ -258,60 +268,41 @@ bool preset_installed_p (U8 index) } -void preset_show_components (void) +void preset_select (void) { struct preset *pre = preset_table[menu_selection]; - struct preset_component *comps = pre->comps; + preset_component_ptr = pre->comps; +} - dmd_alloc_low_clean (); - dmd_sched_transition (&trans_scroll_left); - font_render_string_center (&font_mono5, 64, 5, pre->name); - dmd_draw_horiz_line ((U16 *)dmd_low_buffer, 11); - sound_send (SND_TEST_SCROLL); - dmd_show_low (); - task_sleep (TIME_1S + TIME_500MS); - while (comps->nvram != NULL) - { - struct adjustment *info = comps->info; - dmd_alloc_low_clean (); - font_render_string_center (&font_mono5, 64, 5, pre->name); - dmd_draw_horiz_line ((U16 *)dmd_low_buffer, 11); - - if (info == NULL) - { - sprintf ("SET %p TO %02X", comps->nvram, comps->value); - font_render_string_center (&font_mono5, 64, 16, sprintf_buffer); - } -#ifdef CONFIG_DMD /* TODO */ - else - { - union dmd_coordinate coord; - /* WARNING - you cannot make a farcall when some of the args - * are on the stack! The called function sees the saved - * value of the page instead of the args. This has to be - * fixed in the compiler itself. - * So for now, we split into two function calls... */ - adj_prepare_lookup (info); - adj_name_for_preset (comps->nvram, comps->value); - coord.x = 24; - coord.y = 24; - if (*comps->nvram == comps->value) - { - bitmap_draw (coord, BM_X5); - } - else - { - bitmap_draw (coord, BM_BOX5); - } - } -#endif +#if (MACHINE_DMD == 1) +void preset_draw_component (void) +{ + struct adjustment *info; - dmd_show_low (); - sound_send (SND_TEST_CONFIRM); - task_sleep (TIME_1S + TIME_500MS); - comps++; + if (!preset_component_ptr || !preset_component_ptr->nvram) + return; + + info = preset_component_ptr->info; + if (!info) + return; + + /* WARNING - you cannot make a farcall when some of the args + * are on the stack! The called function sees the saved + * value of the page instead of the args. This has to be + * fixed in the compiler itself. + * So for now, we split into two function calls... */ + adj_prepare_lookup (info); + adj_name_for_preset (preset_component_ptr->nvram, preset_component_ptr->value); + + if (*preset_component_ptr->nvram == preset_component_ptr->value) + { + dmd_rough_invert (0, 18, 128, 5); } - task_exit (); + + preset_component_ptr++; + if (preset_component_ptr->nvram == NULL) + preset_select (); } +#endif diff --git a/test/stress.c b/test/stress.c index 768bc414e..637b1532a 100644 --- a/test/stress.c +++ b/test/stress.c @@ -1,5 +1,5 @@ /* - * Copyright 2009, 2010 by Brian Dominy + * Copyright 2009, 2010, 2011 by Brian Dominy * * This file is part of FreeWPC. * @@ -20,10 +20,11 @@ #include -U8 switch_stress_enable; - -U8 switch_stress_drain_prob; +#ifndef CONFIG_STRESS_DRAIN_PROB +#define CONFIG_STRESS_DRAIN_PROB 30 +#endif +U8 switch_stress_enable; /** * Pulse the flippers periodically during stress test. @@ -83,6 +84,8 @@ void switch_stress_task (void) for (;;) { task_sleep (TIME_100MS); + if (in_test) + continue; /* Choose a switch at random. Skip certain well-known switches that are * never to be activated. */ @@ -112,7 +115,7 @@ void switch_stress_task (void) more frequently. We need to do this occasionally so that multiball modes will eventually end, else nothing else gets tested. */ - if (random () < switch_stress_drain_prob * live_balls) + if (random () < CONFIG_STRESS_DRAIN_PROB * live_balls) switch_stress_drain (); } else if (dev->max_count < dev->size) @@ -147,8 +150,25 @@ CALLSET_ENTRY (stress, init) #else switch_stress_enable = NO; #endif - switch_stress_drain_prob = 30; } +/* +static void stress_start_button_task (void) +{ + callset_invoke (sw_start_button); + task_exit (); +} +*/ +CALLSET_ENTRY (stress, minute_elapsed) +{ +#ifdef CONFIG_STRESS_AUTO + if (switch_stress_enable && !in_game && deff_get_active () == DEFF_AMODE) + { + dbprintf ("Stress auto start.\n"); + task_create_anon (stress_start_button_task); + } +#endif +} + /** * Start the simulation as soon as valid playfield is declared, diff --git a/test/swtest.c b/test/swtest.c index 41947774c..a568a38a5 100644 --- a/test/swtest.c +++ b/test/swtest.c @@ -25,6 +25,8 @@ extern U8 sw_last_scheduled; extern U8 switch_display_timer; +/* TODO - this is very WPC specific at the moment */ +#define MAKE_SWITCH(col,row) (((col) * 8) + (row) - 1) void switch_matrix_draw (void) { diff --git a/test/timestamp.c b/test/timestamp.c index 93b6e972a..7a8a736cc 100644 --- a/test/timestamp.c +++ b/test/timestamp.c @@ -1,5 +1,5 @@ /* - * Copyright 2009, 2010 by Brian Dominy + * Copyright 2009, 2010, 2011 by Brian Dominy * * This file is part of FreeWPC. * diff --git a/test/window.c b/test/window.c index eccf18727..994986cc0 100644 --- a/test/window.c +++ b/test/window.c @@ -1,5 +1,5 @@ /* - * Copyright 2006-2010 by Brian Dominy + * Copyright 2006-2011 by Brian Dominy * * This file is part of FreeWPC. * @@ -72,7 +72,6 @@ #include #include -#undef CONFIG_TEST_DURING_GAME //#define CONFIG_FIXED_TEST_FONT #define MAX_WIN_STACK 6 @@ -81,37 +80,32 @@ * no window is open. */ struct window *win_top; -/* Equivalent to (win_top != NULL), but as a byte, this can - * be tested with a single instruction. - * IDEA: these two variables could be overlapped into a union. */ -__fastram__ enum test_mode in_test; - - /* The window stack keeps track of where you came from, so when you * exit a menu/window/whatever, you can go back to where you started. * There is a maximum depth here, which should be sufficient. */ struct window win_stack[MAX_WIN_STACK]; -/** Push the first window onto the stack. This ends any game in progress - * marks 'in test'. It also resets sound, display, and lamps. */ +/** Push the first window onto the stack. This does not end a game + * if it is in progress, but instead pauses it. */ void window_push_first (void) { set_test_mode (TEST_DEFAULT); -#ifdef CONFIG_TEST_DURING_GAME - if (!switch_poll_logical (SW_LEFT_BUTTON)) + task_setgid (GID_TEST_MODE_STARTING); + + timer_lock (); + deff_stop_all (); +#ifdef LEFF_AMODE + leff_stop (LEFF_AMODE); #endif - { - end_game (); - /* Stop tasks that should run only until end-of-game. */ - task_remove_duration (TASK_DURATION_GAME); - task_duration_expire (TASK_DURATION_GAME); - } +#ifdef MACHINE_START_LAMP + lamp_tristate_off (MACHINE_START_LAMP); +#endif + sound_reset (); - /* Reset sound, but delay a little to allow the reset + /* After resetting sound, delay a little to allow the reset * to finish before we attempt to play the 'enter' sound * later. */ - sound_reset (); task_sleep (TIME_100MS); callset_invoke (test_start); } @@ -127,13 +121,12 @@ void window_pop_first (void) * exiting test mode; this keeps extra presses * of the escape button from adding service credits. */ task_sleep_sec (1); -#ifdef CONFIG_TEST_DURING_GAME - if (!switch_poll_logical (SW_LEFT_BUTTON)) -#endif - { + callset_invoke (test_exit); + if (!in_game) amode_start (); - } + timer_unlock (); set_test_mode (NO_TEST); + /* In a game, effects will be refreshed once test flag is cleared */ } /** Starts the window's thread function, if it exists. */ @@ -808,9 +801,7 @@ static U8 count_submenus (struct menu *m) void menu_init (void) { - struct menu *m = win_top->w_class.priv; - - win_top->w_class.menu.self = m; + win_top->w_class.menu.self = (struct menu *)win_top->w_class.priv; win_top->w_class.menu.parent = NULL; menu_selection = 0; } @@ -1288,42 +1279,6 @@ struct menu dev_deff_stress_test_item = { }; -/************ Symbol Test *****************/ - -#if (MACHINE_DMD == 1) - -void symbol_test_init (void) -{ - browser_init (); - menu_selection = browser_min = 1; - browser_max = BM_LAST-1; -} - -void symbol_test_draw (void) -{ - union dmd_coordinate coord; - - browser_draw (); - coord.x = 96; - coord.y = 20; - bitmap_draw (coord, menu_selection); -} - -struct window_ops symbol_test_window = { - INHERIT_FROM_BROWSER, - .init = symbol_test_init, - .draw = symbol_test_draw, -}; - -struct menu symbol_test_item = { - .name = "SYMBOL BROWSER", - .flags = M_ITEM, - .var = { .subwindow = { &symbol_test_window, NULL } }, -}; - -#endif /* MACHINE_DMD == 1 */ - - /*********** Lampsets **********************/ U8 lamplist_update_mode; @@ -2187,9 +2142,6 @@ struct menu *dev_menu_items[] = { #endif &dev_force_error_item, &dev_deff_stress_test_item, -#if (MACHINE_DMD == 1) - &symbol_test_item, -#endif &sched_test_item, #ifndef CONFIG_NATIVE &irqload_test_item, @@ -2274,7 +2226,7 @@ struct menu clear_audits_item = { void clear_coins_confirm (void) { - /* TODO */ + /* TODO - clear coin related audits */ timestamp_update (&system_timestamps.coins_cleared); confirm_start (); } @@ -2446,9 +2398,9 @@ void presets_init (void) dmd_map_overlay (); dmd_clean_page_low (); font_render_string_left (&font_mono5, 1, 1, "PRESETS"); - font_render_string_center (&font_var5, 64, 20, "PRESS ENTER TO INSTALL"); - font_render_string_center (&font_var5, 64, 27, "PRESS START TO VIEW DETAILS"); + font_render_string_center (&font_var5, 64, 27, "PRESS ENTER TO INSTALL"); #endif + SECTION_VOIDCALL (__test2__, preset_select); } @@ -2464,6 +2416,8 @@ void presets_draw (void) font_render_string_right (&font_mono5, 127, 9, preset_installed_p (menu_selection) ? "YES" : "NO"); + task_sleep (TIME_16MS); + SECTION_VOIDCALL (__test2__, preset_draw_component); dmd_overlay (); #else sprintf ("%d.", menu_selection+1); @@ -2481,19 +2435,43 @@ void presets_draw (void) void presets_enter (void) { + window_stop_thread (); dmd_alloc_low_clean (); - font_render_string_center (&font_mono5, 64, 8, "INSTALLING PRESET"); + font_render_string_center (&font_mono5, 64, 8, "INSTALLING"); preset_render_name (menu_selection); print_row_center (&font_mono5, 16); dmd_show_low (); task_sleep_sec (2); sound_send (SND_TEST_CONFIRM); preset_install_from_test (); + window_start_thread (); +} + +void presets_up (void) +{ + browser_up (); + SECTION_VOIDCALL (__test2__, preset_select); } -void presets_start (void) +void presets_down (void) { - far_task_create_gid (GID_WINDOW_THREAD, preset_show_components, TEST2_PAGE); + browser_down (); + SECTION_VOIDCALL (__test2__, preset_select); +} + + +void presets_thread (void) +{ +#if (MACHINE_DMD == 1) + for (;;) + { + task_sleep (TIME_700MS); + dmd_alloc_low_clean (); + presets_draw (); + } +#else + task_exit (); +#endif } struct window_ops presets_window = { @@ -2501,7 +2479,12 @@ struct window_ops presets_window = { .init = presets_init, .draw = presets_draw, .enter = presets_enter, - .start = presets_start, + .up = presets_up, + .down = presets_down, + .left = window_stop_thread, + .right = window_stop_thread, + .start = window_stop_thread, + .thread = presets_thread, }; struct menu presets_menu_item = { @@ -2844,15 +2827,19 @@ struct menu switch_levels_item = { void switch_item_number (U8 val) { - if (val < NUM_DEDICATED_SWITCHES) +#ifdef CONFIG_PLATFORM_WPC + if (val >= WPC_SW_DIRECT && val < WPC_SW_PLAYFIELD) sprintf ("D%d", val+1); - else if (val >= NUM_PF_SWITCHES + NUM_DEDICATED_SWITCHES) - sprintf ("F%d", val - (NUM_PF_SWITCHES + NUM_DEDICATED_SWITCHES) + 1); + else if (val >= WPC_SW_FLIPTRONIC) + sprintf ("F%d", val - WPC_SW_FLIPTRONIC + 1); else { - val -= NUM_DEDICATED_SWITCHES; + val -= WPC_SW_PLAYFIELD; sprintf ("%d%d", (val / 8)+1, (val % 8)+1); } +#else + sprintf ("SW%d", val); +#endif } void single_switch_init (void) @@ -3108,9 +3095,7 @@ void driver_test_init (void) } browser_item_number = browser_decimal_item_number; browser_action = sol_get_time (menu_selection); -#ifdef NUM_POWER_DRIVES browser_max = NUM_POWER_DRIVES-1; -#endif driver_update_duty (); } @@ -3258,20 +3243,11 @@ struct menu flasher_test_item = { U8 gi_test_brightness; -U8 gi_test_values[] = { - 0, - TRIAC_GI_STRING(0), - TRIAC_GI_STRING(1), - TRIAC_GI_STRING(2), - TRIAC_GI_STRING(3), - TRIAC_GI_STRING(4), - PINIO_GI_STRINGS, -}; - - void gi_test_init (void) { browser_init (); + /* menu_selection ranges from 0 to the number of strings+1; the last value + represnts all strings on */ browser_max = NUM_GI_TRIACS+1; gi_test_brightness = 8; gi_disable (PINIO_GI_STRINGS); @@ -3285,25 +3261,32 @@ void gi_test_exit (void) void gi_test_draw (void) { browser_draw (); + U8 gi; if (menu_selection == 0) + { browser_print_operation ("ALL OFF"); + gi = 0; + } else if (menu_selection == NUM_GI_TRIACS+1) + { browser_print_operation ("ALL ON"); + gi = PINIO_GI_STRINGS; + } else { sprintf_far_string (names_of_gi + menu_selection - 1); browser_print_operation (sprintf_buffer); + gi = 1 << (menu_selection - 1); } - sprintf ("BRIGHTNESS %d", gi_test_brightness); - print_row_center (&font_mono5, 29); - gi_disable (PINIO_GI_STRINGS); #ifdef CONFIG_TRIAC - gi_dim (gi_test_values[menu_selection], gi_test_brightness); + sprintf ("BRIGHTNESS %d", gi_test_brightness); + print_row_center (&font_mono5, 29); + gi_dim (gi, gi_test_brightness); #else - gi_enable (gi_test_values[menu_selection]); + gi_enable (gi); #endif } @@ -3671,6 +3654,27 @@ struct menu display_test_item = { #endif +#ifdef LAMPLIST_ORDERED_TEST + +void ordered_lamp_test_init (void) +{ + browser_init (); + browser_max = PINIO_NUM_LAMPS-1; +} + +struct window_ops ordered_lamp_test_window = { + INHERIT_FROM_BROWSER, + .init = ordered_lamp_test_init, +}; + +struct menu ordered_lamp_test_item = { + .name = "ORDERED LAMPS", + .flags = M_ITEM, + .var = { .subwindow = { &ordered_lamp_test_window, NULL } }, +}; + +#endif + /****************** TEST MENU **************************/ struct menu *test_menu_items[] = { @@ -3694,7 +3698,9 @@ struct menu *test_menu_items[] = { #if (MACHINE_DMD == 1) &display_test_item, #endif - /* TODO : ordered_lamp_test_item */ +#ifdef LAMPLIST_ORDERED_TEST + &ordered_lamp_test_item, +#endif &lamp_row_col_test_item, &dipsw_test_item, #ifdef MACHINE_TEST_MENU_ITEMS @@ -3717,7 +3723,23 @@ struct menu test_menu = { .var = { .submenus = test_menu_items, }, }; +/**********************************************************/ + +/* TODO - modifying game state requires some post-processing. + Tilt warnings and extra balls can be reset arbitrarily. + Does num players make sense? + Ball number/player up? Better modeled as forward/backward? + */ +struct menu game_menu = { + .name = "MODIFY GAME", + .flags = M_ITEM | M_LETTER_PREFIX, + .var = { .subwindow = { &adj_browser_window, modify_game_adjustments } }, +}; + +/**********************************************************/ + struct menu *main_menu_items[] = { + &game_menu, &bookkeeping_menu, &adjustments_menu, &test_menu, @@ -3727,12 +3749,14 @@ struct menu *main_menu_items[] = { NULL, }; -struct menu main_menu = { +struct menu main_menu_template = { .name = "MAIN MENU", .flags = M_MENU, .var = { .submenus = main_menu_items, }, }; +struct menu main_menu; + /**********************************************************/ /* A window class for a text scroller. */ @@ -3864,7 +3888,7 @@ void sysinfo_stats1 (void) { } void sysinfo_stats2 (void) { -#ifdef TASKCOUNT +#ifdef CONFIG_DEBUG_TASKCOUNT extern U16 task_max_count; sprintf ("MAX TASKS %d", task_max_count); #else @@ -3883,6 +3907,9 @@ scroller_item sysinfo_scroller[] = { void sysinfo_enter (void) { + memcpy (&main_menu, &main_menu_template, sizeof (struct menu)); + if (!in_game) + main_menu.var.submenus++; window_push (&menu_window, &main_menu); } diff --git a/tools/ctemp b/tools/ctemp old mode 100755 new mode 100644 index 2a5a54c4e..ed797213b --- a/tools/ctemp +++ b/tools/ctemp @@ -1,6 +1,6 @@ #!/usr/bin/perl # -# Copyright 2008-2010 by Brian Dominy +# Copyright 2008-2011 by Brian Dominy # # This file is part of FreeWPC. # diff --git a/tools/dcc.pl b/tools/dcc.pl new file mode 100644 index 000000000..c773ebef1 --- /dev/null +++ b/tools/dcc.pl @@ -0,0 +1,453 @@ +#!/usr/bin/perl -w +# +# 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 +# +use POSIX qw(ceil); + +# The attribute hash contains all of the deff properties. +# There are two types of attributes here: per-element and global. +# They are listed in that order. +# +# Any attribute can be set by using a command of the same name in +# the source file. The exact syntax of the arguments varies though. +# +# Attributes are kept in a stack, which is pushed whenever a new scope +# is started, so that exiting the scope will restore all modified attributes +# back to their original values. +# +# The values listed here are the global defaults; you need not specify any +# of these if the default suffices. +my $attr = { + parent => undef, + + # The area that the current element occupies + x => 0, y => 0, + width=> 128, height => 32, + + # The attributes for the next "print" element. + color => 3, + bgcolor => 0, + font => "mono5", + blink => "none", # options: none, or a time rate + align => "center", # options: left, center, right + valign => "center", # options: top, center, bottom + background => "none", # options: none, shadow, box + + name => "unnamed", + rate => "TIME_50MS", + transition => "none", + flash => "none", +}; + + +# A list of font heights, taken from the .fon files +my %fontheight = ( + "cu17" => 22, + "var5" => 5, + "mono5" => 5, + "fixed6" => 9, + "fixed10" => 12, + "fixed12" => 18, + "lucida9" => 13, + "luctype" => 10, + "miscfixed" => 10, + "schu" => 10, + "term6" => 8, + "times10" => 12, + "times8" => 12, + "utopia" => 10, +); + + +# An array of the effect's elements. A display effect is composed +# of multiple items: text labels, images, borders, etc. Each is +# represented by an entry here. +# +# Each element is a copy of the attribute hash at the time it +# was declared, plus additional data specific to each element type, +# and a field named "type" to identify the type of element. +my @elements; + + +# Effects may take arguments; these are external data variables that +# they need to see, for conditionals or for printing changing values. +my @arguments; + + +# For diagnostic purposes, track the file/line number of the +# source file. +$lineno = 0; +$file = $ARGV[0] || "stdin"; + +sub warning { + my ($message, $no) = @_; + $no = $lineno if (!defined $no); + print STDERR "$file:$no: warning: $message\n"; +} + +sub error { + my ($message, $no) = @_; + $no = $lineno if (!defined $no); + print STDERR "$file:$no: error: $message\n"; + die; +} + +sub internal_error { + print STDERR "internal error: " . (shift) . "\n"; + die; +} + + +# For debug purposes to display the internal data structures. + +sub debug_attr { + my $ref = $attr; + while ($ref) { + print ">> "; + for my $field (sort keys %$ref) { + next if ($field eq "parent"); + print $field, ":", $ref->{$field}, " "; + } + print "\n"; + $ref = $ref->{"parent"}; + } +} + +sub debug_elem { + for my $elem (@elements) { + print "("; + for my $field (sort keys %$elem) { + print $field, ":", $elem->{$field}, " "; + } + print ")\n"; + } +} + +# Push/pop scopes. + +sub push_scope { + my %new_attr = %$attr; + my $new_ref = \%new_attr; + $new_ref->{"parent"} = $attr; + $attr = $new_ref; +} + +sub pop_scope { + $attr = $attr->{"parent"}; + if (!defined $attr) { + error "illegal use of end; not in a scope?"; + } +} + +# Emit code to display a single element. + +sub emit_element { + my $elem = shift; + my $type = $elem->{"type"}; + error "unknown type" if (!defined $type); + if ($type eq "print") { + my $align = $elem->{"align"}; + my $valign = $elem->{"valign"}; + my $y = $elem->{"y"}; + my $text = $elem->{"text"}; + my $argv = $elem->{"argv"}; + my $font = $elem->{"font"}; + + if ($align eq "center") { $x = ceil ($elem->{"x"} + $elem->{"width"} / 2); } + elsif ($align eq "right") { $x = $elem->{"width"} - 1; } + else { $x = $elem->{"x"}; } + + if ($valign eq "center") { $y = ceil ($elem->{"y"} + $elem->{"height"} / 2); } + elsif ($valign eq "bottom") { $y = int ($elem->{"y"} + $elem->{"height"} - $fontheight{$font} / 2); } + else { $y = ceil ($elem->{"y"} + $fontheight{$font} / 2); } + + if ($text eq "current_score") { + pr ("sprintf_current_score ();"); + $text = "sprintf_buffer"; + } + elsif ($elem->{"argc"} > 1) { + my @args = @$argv; + pr ("sprintf ($text, $args[1]);"); + $text = "sprintf_buffer"; + } + pr ("font_render_string_$align (&font_$font, $x, $y, $text);"); + } + elsif ($type eq "image") { + pr ("frame_draw (" . $elem->{"id"} . ");"); + } + elsif ($type eq "overlay") { + pr ("dmd_map_overlay ();"); + pr ("dmd_dup_mapped ();"); + } + elsif ($type eq "border") { + if ($elem->{"border_width"} == 1) { + pr ("dmd_draw_thin_border (dmd_low_buffer);"); + } + elsif ($elem->{"border_width"} == 2) { + pr ("dmd_draw_border (dmd_low_buffer);"); + } + } + else { + internal_error "unknown type '$type' encountered"; + } +} + +# Emit code for the entire display effect. + +sub emit_deff { + local $indent = 0; + sub pr { for (my $i=0; $i < $indent; $i++) { print " "; } print (shift); print "\n"; } + sub block { pr ("{"); $indent += 3; } + sub endblock { $indent -= 3; pr ("}"); } + + if (!$header_emitted) { + pr "#include \n"; + $header_emitted = 1; + } + + # Sort the final list of elements. + @elements = sort { $a->{"sort_order"} <=> $b->{"sort_order"} } @elements; + + # Count the number of distinct colors used. + # From this, determine the number of planes that need to be generated. + # If an image is being drawn, we always use 2 planes. + my $planes = 0; + my $clean = 1; + my $last_color = -1; + for my $elem (@elements) { + if ($elem->{"color"} == 255) { + $planes = 2; + $clean = 0; + } + elsif ($elem->{"color"} != $last_color) { + $planes++; + $last_color = $elem->{"color"}; + } + } + + # Count the number of static and non-static elements, and the + # number of blinking elements. + my $statics = 0; + my $dynamics = 0; + my $blinks = 0; + for my $elem (@elements) { + if ($elem->{"sort_order"} >= 200) { + $dynamics++; + } + else { + $statics++; + } + if ($elem->{"blink"} ne "none") { + $blinks++; + # verify that blink rate is multiple of total effect rate + } + } + + # Determine the functions to be used for alloc and show. + # If one page is needed, use dmd_alloc_low/dmd_show_low. + # If two are needed, use dmd_alloc_low_high/dmd_show2. + # If the pages need to be cleaned after allocation (typical, + # unless a full-size image is being shown), then do that too. + my $allocator; + my $shower; + + if ($planes == 1) { + $allocator = "dmd_alloc_low"; + $allocator .= "_clean" if ($clean == 1); + $shower = "dmd_show_low"; + } + else { + $allocator = "dmd_alloc_low_high"; + $allocator .= "(); dmd_clean_page_low" if ($clean == 1); + $shower = "dmd_show2"; + } + + my $name = $attr->{"name"} . "_deff"; + pr ("void $name (void)"); + block (); + + # If there is a mixture of static/nonstatic elements, then + # factor the static parts out of the loop onto the overlay pages. + # Replace the element with a call to display the overlay. + if ($dynamics) { + pr ("/* TODO : factor out static elements to overlay */"); + } + + # Emit code for each element. + # + # Ensure that an image is always displayed first, since that will overwrite + # everything else. + # + # After displaying all elements, emit code to show the final composite + # and wait the right amount of time before looping back and showing it + # again, or exiting. + pr ("for (;;)"); + block (); + pr ("$allocator ();"); + for my $elem (@elements) { + # TODOs: + # If the element has the 'blink' attribute, then it should only be drawn + # on some iterations. Use the blink rate and the overall run rate to + # determine when to draw it. When we don't draw it, treat like a false + # conditional. We'll also need a runtime counter to track state. + # + # 'blink' on a static label that was moved to overlay requires code + # in the loop on the erase cycle. + # + # If there are multiple colors in use, then render color=3 first, + # copy low to high, then render color=2 (flip low/high first), + # then color=1. But if only color=1 is used, then it is simpler. + if ($cond = $elem->{"cond"}) { + pr ("if " . $cond); + block (); + } + emit_element ($elem); + if ($cond) { + endblock (); + } + } + if (($trans = $attr->{"transition"}) ne "none") { + pr ("dmd_sched_transition (&$trans);"); + } + pr ("$shower ();"); + + $run = $attr->{"run"}; + if (($flash = $attr->{"flash"}) ne "none") { + if ($planes > 1) { + error "flash unsupported on 2-plane images"; + } + pr ("dmd_copy_low_to_high ();"); + pr ("dmd_invert_page (dmd_low_buffer);"); + pr ("deff_swap_low_high ($run / $flash, $flash);"); + pr ("break;"); + } + elsif ($run ne "forever") { + pr ("task_sleep ($run);"); + pr ("break;"); + } + else { + my $rate = $attr->{"rate"}; + pr ("task_sleep ($rate);"); + } + endblock (); + + # emit exit code + pr ("deff_exit ();"); + endblock (); + pr (""); +} + +# Allocate a new element object. + +sub new_elem { + my %elem = %$attr; + my $elemref = \%elem; + delete $elemref->{"parent"}; + $elemref->{"type"} = shift; + $elemref->{"lineno"} = $lineno; + return $elemref; +} + +# Parse one line from the source file. + +sub cmd { + my $line = $_; + $line =~ /(^\w+)[ \t]*(.*)$/; + my ($opcode, $argstring) = ($1, $2); + my @args = split /,[ \t]+/, $argstring; + + if ($opcode =~ /vbox$|hbox$/) { + my $size_field = ($opcode eq "vbox") ? "height" : "width"; + my $pos_field = ($opcode eq "vbox") ? "y" : "x"; + + if (!defined $attr->{"parent"}) { + push_scope (); + } + else { + my $pos = $attr->{$pos_field} + $attr->{$size_field}; + pop_scope (); + push_scope (); + $attr->{$pos_field} = $pos; + } + + if ($args[0] =~ /([0-9]+)\%$/) { + my $percentage = $1; + $attr->{$size_field} = $attr->{"parent"}->{$size_field} * $percentage / 100; + } + else { + $attr->{$size_field} = $args[0]; + } + } + elsif ($opcode eq "end") { + pop_scope (); + } + elsif ($opcode eq "print") { + my $elemref = new_elem "print"; + $elemref->{"text"} = $args[0]; + $elemref->{"argc"} = @args; + $elemref->{"argv"} = \@args; + if ($elemref->{"text"} eq "current_score") { + $elemref->{"argc"}++; + } + $elemref->{"sort_order"} = 100 * $elemref->{"argc"} + 4 - $elemref->{"color"}; + push @elements, $elemref; + } + elsif ($opcode eq "image") { + my $elemref = new_elem "image"; + $elemref->{"color"} = 255; + $elemref->{"id"} = $args[0]; + $elemref->{"sort_order"} = -100; + push @elements, $elemref; + } + elsif ($opcode eq "border") { + my $elemref = new_elem "border"; + $elemref->{"border_width"} = $args[0] || 2; + $elemref->{"sort_order"} = -50; + push @elements, $elemref; + } + elsif ($opcode =~ /U8$|U16$/) { + my $argref = {}; + $argref->{"type"} = $opcode; + $argref->{"name"} = $args[0]; + push @arguments, $argref; + } + elsif ($opcode eq "exit") { + emit_deff (); + @elements = (); + @arguments = (); + } + else { + if (!defined ($args[0])) { + error ("syntax error"); + } + $attr->{$opcode} = $args[0]; + } +} + +# Main loop. Parse the entire source file. +while (<>) { + $lineno++; + chomp; + s/^[ \t]//; s/[ \t]$//; + next if /^#/; next if /^$/; + cmd ($_); +} + +#debug_attr (); +#debug_elem (); diff --git a/tools/gencallset b/tools/gencallset old mode 100755 new mode 100644 index fb1f86154..127d9063f --- a/tools/gencallset +++ b/tools/gencallset @@ -1,6 +1,6 @@ #!/usr/bin/perl # -# Copyright 2006, 2007, 2008, 2009, 2010 by Brian Dominy +# Copyright 2006-2011 by Brian Dominy # # This file is part of FreeWPC. # @@ -157,6 +157,7 @@ foreach $src (@srclist) { my $primary = $sets[0]; foreach my $set (@sets) { + $set = lc($set); if (!defined $functionhash{$set}) { $functionhash{$set} = ""; } @@ -261,6 +262,8 @@ foreach $set (keys %functionhash) { print FH " ${module}_$primary (); /* $modulehash{$module} */\n"; } } + $debug_id = $debug_id & 0xFFC0; + $debug_id += 0x40; if ($rettype eq $bool_type) { print FH " return TRUE;\n"; } diff --git a/tools/genmachine b/tools/genmachine old mode 100755 new mode 100644 index 25ed57545..f7a5b160b --- a/tools/genmachine +++ b/tools/genmachine @@ -1,6 +1,6 @@ #!/usr/bin/perl # -# Copyright 2006-2010 by Brian Dominy +# Copyright 2006-2011 by Brian Dominy # # This file is part of FreeWPC. # @@ -100,6 +100,7 @@ my %BinaryProperties = ( "opto" => 1, "edge" => 1, "noplay" => 1, + "novalid" => 1, "ingame" => 1, "intest" => 1, "button" => 1, @@ -123,6 +124,7 @@ my %BinaryProperties = ( "buyin" => $GLOBAL_OBJECT, "extra-ball" => $GLOBAL_OBJECT, "shoot-again" => $GLOBAL_OBJECT, + "ball-save" => $GLOBAL_OBJECT, "cabinet" => 1, }, "drives" => { @@ -244,6 +246,13 @@ my %FixedMaxima = ( "deffs", "leffs", "lamplists", "gi", "fonts"); +# The contexts which are emitted as ordinary variable declarations. +my %VarDecl = ( + "flags" => "flag_t", + "globalflags" => "global_flag_t", + "timers" => "free_timer_id_t", +); + ################################################################### # @@ -303,7 +312,7 @@ sub check_define_global { sub close_switch_or_lamp { my ($def) = @_; - $def->{'ID'} =~ m/(.)(.)/; + $def->{'ID'} =~ m/(.)(.*)/; my ($first, $second) = ($1, $2); if ($first eq "D") { $def->{'number'} = $second - 1; @@ -614,7 +623,7 @@ LINE: else { # Handle lines that aren't data definitions. - error "unrecognized element at line " . $lineno . "\n"; + error "unrecognized element $_ at line " . $lineno . "\n"; } } close FH; @@ -638,7 +647,10 @@ sub machine_finish { } } - # TODO : Are there any GLOBAL_OBJECTS that aren't defined? + # Are there any GLOBAL_OBJECTS that aren't defined? + if (!defined $m->{'*lamps:ball-save'}) { + $m->{'*lamps:ball-save'} = $m->{'*lamps:shoot-again'}; + } } @@ -684,6 +696,20 @@ sub print_c_ident { } } +sub machine_write_var_decls { + print $START_SOURCE; + foreach $context (keys %ContextPrefixes) { + my $type = $VarDecl{$context}; + next if (!defined $type); + my $mc = $m->{$context}; + foreach my $def (unique ($mc)) { + print "$type " . $def->{'c_ident'} . ";\n"; + } + print "\n"; + } + print $END_SOURCE; +} + sub machine_write_defines { # Print object IDs foreach $context (keys %ContextPrefixes) { @@ -691,10 +717,16 @@ sub machine_write_defines { my $indexRe = $contextDefinitionRe{$context}; my $number = -1; $indexRe = "[0-9]+" if ($indexRe eq "AUTO"); + my $type = $VarDecl{$context}; print "/* Definitions of $context */\n"; foreach my $def (unique ($mc)) { $number = $def->{'number'}; - print "#define " . $def->{'c_ident'} . " " . $number . "\n"; + if (defined $type) { + print "extern U8 " . $def->{'c_ident'} . ";\n"; + } + else { + print "#define " . $def->{'c_ident'} . " " . $number . "\n"; + } } my $max = $ContextMaxima{$context}; if (defined $max) { @@ -734,6 +766,7 @@ sub machine_write_defines { print_c_ident ($m->{'*lamps:start'}, "MACHINE_START_LAMP"); print_c_ident ($m->{'*lamps:buyin'}, "MACHINE_BUYIN_LAMP"); print_c_ident ($m->{'*lamps:shoot-again'}, "MACHINE_SHOOT_AGAIN_LAMP"); + print_c_ident ($m->{'*lamps:ball-save'}, "MACHINE_BALL_SAVE_LAMP"); print_c_ident ($m->{'*lamps:extra-ball'}, "MACHINE_EXTRA_BALL_LAMP"); print_c_ident ($m->{'*drives:launch'}, "MACHINE_LAUNCH_SOLENOID"); @@ -1005,13 +1038,18 @@ sub machine_write_switch_decls { if (defined $sw->{'noscore'}) { $sw->{'playfield'} = undef; - $sw->{'noplay'} = 1; + $sw->{'novalid'} = 1; $sw->{'intest'} = 1; } + if (defined $sw->{'noplay'}) { + warning "deprecated property 'noplay' seen on switch " . $sw->{'name'} . " ; use 'novalid' instead."; + $sw->{'novalid'} = 1; + } + add_flag ($sw, "opto", "flags", "SW_OPTICAL"); add_flag ($sw, "edge", "flags", "SW_EDGE"); - add_flag ($sw, "noplay", "flags", "SW_NOVALID"); + add_flag ($sw, "novalid", "flags", "SW_NOVALID"); add_flag ($sw, "ingame", "flags", "SW_IN_GAME"); add_flag ($sw, "intest", "flags", "SW_IN_TEST"); add_flag ($sw, "playfield", "flags", "SW_PLAYFIELD"); @@ -1157,8 +1195,12 @@ END sub machine_lamp_get_value { my ($lampid) = @_; - return $lampid if ($lampid =~ /^MACHINE_/); - $lamp = ($m->{'lamps'})->{$lampid}; + if ($lampid =~ /^%(.*)$/) { + $lamp = $m->{"*lamps:$1"}; + } + else { + $lamp = ($m->{'lamps'})->{$lampid}; + } die "undefined lamp $lampid" if (!defined $lamp); return $lamp->{'number'}; } @@ -1290,7 +1332,7 @@ sub machine_write_lamplist_decls { print "};\n\n"; $ls->{'value'} = $lamplist; - if ($ls->{'set'} == 1) { + if (1) { $c_decl = $ls->{'c_decl'}; $c_decl =~ s/lamplist/lampset/g; print "const U8 " . $c_decl . "[] = {\n "; @@ -1325,7 +1367,7 @@ sub machine_write_lamplist_decls { print "const U8 * lampset_table[] = {\n"; for $ls (unique ($m->{"lamplists"})) { - if ($ls->{'set'} == 1) { + if (1) { $name = $ls->{'c_decl'}; $name =~ s/lamplist/lampset/g; } @@ -1386,8 +1428,7 @@ sub machine_write_deff_decls { print " [" . $deff->{'c_ident'} . "] = {\n"; print " .flags = $flags,\n"; print " .prio = $prio,\n"; - print " .fn = " . $deff->{'c_decl'} . ",\n"; - print " .page = $page\n"; + print " DEFF_FUNCTION (" . $deff->{'c_decl'} . ", " . $page . ")\n"; print " },\n"; } print "};\n"; @@ -1537,6 +1578,13 @@ elsif ($command eq "drives") { machine_write_solenoid_decls (); } +####################################################### +# generate build/mach-vars.c +####################################################### +elsif ($command eq "vars") { + machine_write_var_decls (); +} + elsif ($command eq "dump") { machine_dump (); } diff --git a/tools/genrtt b/tools/genrtt new file mode 100644 index 000000000..e9ffa7b0d --- /dev/null +++ b/tools/genrtt @@ -0,0 +1,202 @@ +#!/usr/bin/perl +# +# 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 +# +# ------------------------------------------------------------------ +# genrtt - generate real time task list +# ------------------------------------------------------------------ +# +# Scan all source files and search them for rtt entries +# and callset invocations. +# +# The output of this script is a file build/rtt.c. +# +# RTT attributes: +# name= Entry point to the real time task +# freq= Frequency to be scheduled, in milliseconds +# depends= Function that needs to be execed first + +# A list of directories to be searched. +my @SearchDirs = (); + +# A list of RTT declarations +my @rtlist; + +# A hash of RTTs by their function name +my %rtt_by_name; + +# The output file name +$OutputFile = "build/rtt.c"; + +# A list of all include files that the result file will need +# to include +@IncludeFiles = (); + + +############################################################# +# Parse command-line arguments +############################################################# + +while (my $arg = shift @ARGV) { + if ($arg =~ /^-h/) { + print "\nOptions:\n"; + print "-o Write C code to this file (default is build/callset.c)\n"; + print "--include Add an #include to the output file\n"; + print "\n"; + exit 0; + } + elsif ($arg =~ /^-o$/) { + $OutputFile = shift @ARGV; + } + elsif ($arg =~ /^--include$/) { + push @IncludeFiles, (shift @ARGV); + } + elsif ($arg =~ /^-i$/) { + push @IncludeFiles, (shift @ARGV); + } + elsif ($arg =~ /^-D$/) { + $arg = shift @ARGV; + } + else { + push @srclist, $arg; + } +} + + +############################################################# +# Build the list of all filenames to be searched. +############################################################# + +foreach $dir (@SearchDirs) { + my @files = split /\n+/, + `cd $dir && find . -name "*.c" -or -name "*.h"`; + foreach $file (@files) { + push @srclist, "$dir/" . $file; + } +} + +############################################################# +# For each file, search for entries and invocations. +############################################################# + +foreach $src (@srclist) { + sub warning { print STDERR "$src:$lineno: warning: " . (shift) . "\n"; } + sub error { print STDERR "$src:$lineno: error: " . (shift) . "\n"; die; } + $section = ""; + if ($src =~ /(.*):(.*)/) { + $src = $1; + if ($2 ne "SYSTEM_PAGE") { + $section = "__far__(C_STRING(" . $2 . "))"; + } + } + open FH, $src; + $lineno = 0; + while () { + chomp; + ++$lineno; + if (/RTT[ \t]*\(([^)]*)\)/) { + my $rtt_args = $1; + my $rtt = {}; + $rtt->{"priority"} = 50; + $rtt->{"filename"} = $src; + $rtt->{"fardecl"} = $section; + + my @attrs = split /[ \t]+/, $rtt_args; + foreach my $attr (@attrs) { + my ($key, $value) = split /=/, $attr; + $rtt->{$key} = $value; + } + if ($rtt->{'name'} =~ /,/) { + error "$name is invalid"; + } + if ($rtt->{'freq'} > 255) { + error "$name has invalid frequency"; + } + push @rtlist, $rtt; + $rtt_by_name{ $rtt->{'name'} } = $rtt; + } + elsif (/([a-z_0-9]*_rtt[a-z_0-9]*)[ \t].*void/) { + my $name = $1; + if (!defined $rtt_by_name{$name}) + { + warning "found possible function '$name' without an RTT header"; + } + } + } + close FH; +} + +# Sort the records by increasing schedule frequency. +@rtlist = sort { + ($a->{'freq'} <=> $b->{'freq'}) || + ($a->{'priority'} <=> $b->{'priority'}) +} @rtlist; + +############################################################# +# Write the output file. +############################################################# + +$timervar = "sys_timer_ticks"; + +open FH, ">$OutputFile"; +print FH "/* Automatically generated by genrtt */\n\n"; +for $include (@IncludeFiles) { + print FH "#include <$include>\n"; +} +print FH"\n"; + +foreach $rtt (@rtlist) { + next if ($rtt->{"inline"}); + my $fardecl = $rtt->{"fardecl"}; + print FH "extern $fardecl void " . $rtt->{"name"} . " (void);\n"; +} +print FH "\n"; + +print FH "U8 $timervar;\n\n"; + +$freq = 1; +$indentsize = 3; +$indent = $indentsize; + +print FH "void exec_rtt (void)\n{\n"; +print FH " " x $indent; +print FH "$timervar++;\n"; + +foreach $rtt (@rtlist) { + if ($rtt->{"freq"} > $freq) + { + $freq = $rtt->{"freq"}; + print FH "\n"; + print FH " " x $indent; + print FH "if (($timervar & ($freq-1)) == 0) {\n"; + $indent += $indentsize; + } + print FH " " x $indent; + print FH $rtt->{"name"} . "(); /* " . $rtt->{"filename"} . " */\n"; +} +while ($indent > 0) { + $indent -= $indentsize; + print FH " " x $indent; + print FH "}\n"; +} +print FH "\n"; + +print FH "void rtt_init (void) {}\n\n"; +close FH; + diff --git a/tools/imgld/imgld.c b/tools/imgld/imgld.c index 0e9c9d856..8db7b1727 100644 --- a/tools/imgld/imgld.c +++ b/tools/imgld/imgld.c @@ -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. * @@ -68,7 +68,6 @@ #include #include #include -#include #define MAX_FRAMES 2048 @@ -380,6 +379,32 @@ struct buffer *pgm_get_plane (struct buffer *buf, unsigned int plane) /* Each byte in the image contains an intensity value ranging from 0 to 255. For FreeWPC images, these need to be scaled down to one of 4 levels (0-3). */ +#ifdef LOWER_IMAGE_BRIGHTNESS1 + /*tried 25/75/90 - images too dark*/ + /*tried 25/50/75 - images too bright*/ + if (buf->data[off] <= 32 * 0xFF / 100) + level = 0; + else if (buf->data[off] <= 67 * 0xFF / 100) + level = 1; + else if (buf->data[off] <= 82 * 0xFF / 100) + level = 2; + else + level = 3; + +#elif defined (LOWER_IMAGE_BRIGHTNESS2) + /*tried 25/75/90 - images too dark*/ + /*tried 32/67/82 - some images too bright like faces mainly, some too dark - mainly car chase scenes*/ + /*tried 25/50/75 - images too bright*/ + if (buf->data[off] <= 28 * 0xFF / 100) + level = 0; + else if (buf->data[off] <= 69 * 0xFF / 100) + level = 1; + else if (buf->data[off] <= 84 * 0xFF / 100) + level = 2; + else + level = 3; + +#else if (buf->data[off] <= 25 * 0xFF / 100) level = 0; else if (buf->data[off] <= 50 * 0xFF / 100) @@ -388,7 +413,7 @@ struct buffer *pgm_get_plane (struct buffer *buf, unsigned int plane) level = 2; else level = 3; - +#endif /* Set the data byte to a '1' if the level is enabled in this plane, or '0' otherwise. */ planebuf->data[off] = (level & (1 << plane)) ? 1 : 0; diff --git a/tools/imgld/imgld.make b/tools/imgld/imgld.make index 02790dd7e..c8be306c0 100644 --- a/tools/imgld/imgld.make +++ b/tools/imgld/imgld.make @@ -1,8 +1,8 @@ IMGLD := $(D)/imgld TOOLS += $(IMGLD) -OBJS := $(D)/imgld.o tools/pgmlib/pgmlib.o tools/imglib/imglib.o -$(OBJS) : TOOL_CFLAGS=-Itools/pgmlib -Itools/imglib -Iinclude -DNO_MAIN -DCONFIG_NATIVE -DWPC_DMD_LOW_PAGE=0 -DWPC_DMD_HIGH_PAGE=0 +OBJS := $(D)/imgld.o tools/imglib/imglib.o +$(OBJS) : TOOL_CFLAGS=-Itools/imglib -Iinclude -DNO_MAIN -DCONFIG_NATIVE -DWPC_DMD_LOW_PAGE=0 -DWPC_DMD_HIGH_PAGE=0 HOST_OBJS += $(OBJS) $(IMGLD) : $(OBJS) diff --git a/tools/imglib/mach-config.h b/tools/imglib/mach-config.h index a54ba64d7..e1466c12d 100644 --- a/tools/imglib/mach-config.h +++ b/tools/imglib/mach-config.h @@ -1,7 +1,5 @@ #define MAX_FLAGS 0 #define MAX_GLOBAL_FLAGS 0 #define MACHINE_DMD 1 -#define DMD_LOW_BASE 0 -#define DMD_HIGH_BASE 0 #define WPC_DMD_LOW_PAGE 0 #define WPC_DMD_HIGH_PAGE 0 diff --git a/tools/mapcheck b/tools/mapcheck old mode 100755 new mode 100644 index 3d48d0e29..d32e5f73a --- a/tools/mapcheck +++ b/tools/mapcheck @@ -25,7 +25,7 @@ checkpage () { section=$1; shift addr=$1; shift - sz=`grep " l_${section}" ${mapfile} | awk '{print $1}'` + sz=`grep " l_${section} " ${mapfile} | awk '{print $1}'` max=$(($addr)); used=$((0x$sz)); avail=$(($max - 0x$sz)); @@ -42,10 +42,10 @@ checkpage () done if [ "$used" -gt "$max" ]; then - echo " error: overflow ($*)" + echo " error: overflow $percent_used% ($*)" return 1 fi - if [ "$percent_used" -gt 95 ]; then + if [ "$percent_used" -gt 50 ]; then echo -n " warning: $percent_used% full" fi diff --git a/tools/pgmlib/Makefile b/tools/pgmlib/Makefile deleted file mode 100644 index 0f2124b12..000000000 --- a/tools/pgmlib/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -CC = gcc -CFLAGS = -g -I../../include - -all : pgmlib pgmlib2.o - -pgmlib : pgmlib.c - -pgmlib2.o : pgmlib.c - $(CC) $(CFLAGS) -DNO_MAIN -o $@ -c $< diff --git a/tools/pgmlib/pgmlib.c b/tools/pgmlib/pgmlib.c deleted file mode 100644 index 98ebcf35b..000000000 --- a/tools/pgmlib/pgmlib.c +++ /dev/null @@ -1,873 +0,0 @@ -/* - * Copyright 2006, 2007, 2008 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 - */ - -/** - * pgmlib is a library of functions for manipulating graphics images that - * are supported on the FreeWPC platform. - * - * To use, you write a C source file with a function named machgen() and - * link it with pgmlib. (pgmlib provides the main function -- you should - * not write one yourself.) When compiled, this produces a program that - * will initialize the PGM library, parse recognized command-line options, - * then invoke your machgen() function, which should do whatever it is you - * want to do. - * - * The library provides the following data structures: - * - * PGM is the preferred internal image format. If you're generating a - * new image from scratch, create a PGM using pgm_alloc(). You should - * also set the number of planes using pgm_set_mono() or pgm_set_four_color(). - * - * XBM is a simpler format, but it only supports 1 bit plane. Use - * pgm_write_xbm() to downconvert a PGM into XBM format. - * - * XBMSET is a FreeWPC construction, where multiple XBM images are - * output in the same file. This is the preferred output format. - * Use pgm_write_xbmset() to downconvert a PGM to an xbmset. - * - * XBMPROG is also a FreeWPC construction. It is a compressed - * XBM format, similar to XBM (1-bit) but with certain byte values - * assigned special meaning. It requires a decoder in order to display - * these. FreeWPC dmd.c can show these using the dmd_draw_xbmprog() - * routine. - **/ - -#include -#include -#include -#include "pgmlib.h" -#include "xbmprog.h" - -unsigned int opt_debug = 0; - -/** Zero when the -q option is given to turn on verbose messages. */ -unsigned int opt_verbose = 1; - -unsigned int opt_compress = 1; - -/** The name of a makefile fragment. This file contains the names of - * all of the XBM files that were generated by the program, along with - * rules on how to build them. - */ -const char *opt_makefile_fragment_name = "build/Makefile.xbms"; - - -#define dprintf(format, rest...) \ - if (opt_debug) fprintf (stderr, format, ## rest) - - -/** Allocate some memory */ -inline void *xmalloc (size_t size) -{ - return malloc (size); -} - - -/** Allocate a new xbmprog */ -XBMPROG * -xbmprog_alloc (void) -{ - XBMPROG *xbmprog = xmalloc (sizeof (XBMPROG)); - return (xbmprog); -} - - -/** Free an xbmprog */ -void -xbmprog_free (XBMPROG *prog) -{ - XBMPROG * elem = prog; - XBMPROG * tmp; - do { - tmp = elem->next; - free (elem); - elem = tmp; - } while (elem != prog); -} - - -/** Returns zero if two XBM program elements are the same */ -int -xbmprog_equal_p (XBMPROG *prog1, XBMPROG *prog2) -{ - if (prog1->op != prog2->op) - return 1; - - switch (prog1->op) - { - default: - return 0; - case XBMOP_LITERAL: - return prog1->args.literal.count == prog2->args.literal.count - && !memcmp (prog1->args.literal.bytes, - prog2->args.literal.bytes, - prog1->args.literal.count); - - case XBMOP_REPEAT_BYTE: - return prog1->args.repeat.count == prog2->args.repeat.count - && prog1->args.repeat.data && prog2->args.repeat.data; - - case XBMOP_REPEAT_WORD: - case XBMOP_SKIP: - return prog1->args.skip.count == prog2->args.skip.count; - } - - return 0; -} - - -/** Writes an XBMPROG to a file. */ -void -xbmprog_write (FILE *fp, const char *name, int plane, XBMPROG *xbmprog) -{ - int i; - unsigned int size = 0; - XBMPROG *head = xbmprog; - - if (name) - { - /* xbmprog.h is not normally included and thus must be added */ - fprintf (fp, "#include \n"); - fprintf (fp, "#include \n"); - - /* Start the declaration */ - fprintf (fp, "__xbmprog__ unsigned char %s%d_prg[] = { 0x%02X,\n", - name, plane, head->stats.flags); - } - - /* Write each element of the xbmprog */ - do { - switch (xbmprog->op) - { - case XBMOP_LITERAL: - /* Write 1 or more literal bytes that couldn't be compressed */ - for (i=0; i < xbmprog->args.literal.count; i++) - { - unsigned char c = xbmprog->args.literal.bytes[i]; - if ((c == XBMPROG_RLE_SKIP) || (c == XBMPROG_RLE_REPEAT)) - { - /* We can't output a literal for any byte that matches - a prefix flag. This must be encoded as sequences of 1 - byte. */ - fprintf (fp, "XBMPROG_RLE_REPEAT, 0x%02X, 1, ", c); - } - else - { - fprintf (fp, "0x%02X, ", c); - } - } - size += xbmprog->args.literal.count + 1; - break; - case XBMOP_SKIP: - /* Write a skip sequence */ - fprintf (fp, "XBMPROG_RLE_SKIP, %d, ", xbmprog->args.skip.count); - size++; - break; - case XBMOP_REPEAT_BYTE: - /* Write a repeat sequence */ - fprintf (fp, "XBMPROG_RLE_REPEAT, 0x%02X, %d, ", - xbmprog->args.repeat.data, xbmprog->args.repeat.count); - size += 2; - break; - default: - fprintf (fp, "!!! bad opcode %02X\n", xbmprog->op); - goto done; - } - xbmprog = xbmprog->next; - } while (xbmprog != head); - -done: - /* Finish the declaration */ - if (name) - { - fprintf (fp, "\n// size = %d\n", head->stats.size); - fprintf (fp, "};\n"); - } -} - - -static int -xbm_read_byte (XBM *xbm, int offset) -{ - int y = offset / ((xbm->width + 7) / 8); - int x = offset % ((xbm->width + 7) / 8); - return xbm->bytes[y][x]; -} - - -/** Makes an XBM Program from an XBM image. This effectively - * compresses the XBM. The XBMPROG is not the final encoded form - * of the program, but rather an internal format that can be - * further manipulated before writing it. - */ -XBMPROG * -xbm_make_prog (XBM *xbm) -{ - XBMPROG *head = NULL, *tail = NULL; - unsigned int off = 0; - unsigned int n_bytes; - unsigned int byte; - unsigned int count; - XBMPROG *elem; - unsigned int size = 0; - - n_bytes = ((xbm->width + 7) / 8) * xbm->height; - dprintf ("Image has %d bytes total.\n", n_bytes); - while (off < n_bytes) - { - elem = NULL; - - /* At the current offset, which is the best way of compressing - the next sequence of data? */ - - /* Scan for a repeating sequence. */ - byte = xbm_read_byte (xbm, off); - count = 1; - while ((xbm_read_byte (xbm, off+count) == byte) - && (off+count < n_bytes) && (count < 255)) - count++; - - if (count <= 2) - { - /* If the run length is 1 or 2, then there's no value - in compressing this, so output a literal. - If the last output was a literal, then try to append - to that, otherwise allocate a new literal. */ - if (tail - && tail->op == XBMOP_LITERAL - && tail->args.literal.count < 16) - { - tail->args.literal.bytes [ tail->args.literal.count++ ] = byte; - } - else - { - elem = xbmprog_alloc (); - elem->op = XBMOP_LITERAL; - elem->args.literal.count = 0; - elem->args.literal.bytes [ elem->args.literal.count++ ] = byte; - } - off++; - size++; - } - else if (byte == 0) - { - /* Repeated zeroes are especially optimal. - Output a skip. */ - elem = xbmprog_alloc (); - elem->op = XBMOP_SKIP; - elem->args.skip.count = count; - off += count; - size += 2; - } - else - { - /* Output a repeat. */ - elem = xbmprog_alloc (); - elem->op = XBMOP_REPEAT_BYTE; - elem->args.repeat.count = count; - elem->args.repeat.data = byte; - off += count; - size += 3; - } - - if (elem) - { - /* If we created a new element, add it to the chain. */ - if (head == NULL) - { - elem->prev = elem->next = elem; - head = tail = elem; - } - else - { - tail->next = head->prev = elem; - elem->prev = tail; - elem->next = head; - tail = elem; - } - } - } - - head->stats.flags = XBMPROG_METHOD_RLE; - head->stats.size = size; - return (head); -} - - -XBMSET * -pgm_append_xbmset (XBMSET *xbmset, PGM *pgm) -{ - unsigned int plane, x, y; - XBM *xbm; - - if (xbmset == NULL) - { - xbmset = xmalloc (sizeof (XBMSET)); - xbmset->frame_count = 0; - xbmset->c_name = "image"; - - switch (pgm->maxval) - { - case 1: - xbmset->n_planes = 1; - break; - case 3: - xbmset->n_planes = 2; - break; - default: - fprintf (stderr, "Invalid maxval %d for XBM conversion", pgm->maxval); - exit (1); - } - } - - for (plane = 0; plane < xbmset->n_planes; plane++) - { - xbm = xbmset->planes[plane][xbmset->frame_count] = xmalloc (sizeof (XBM)); - xbm->width = pgm->width; - xbm->height = pgm->height; - memset (xbm->bytes, 0, sizeof (xbm->bytes)); - - for (x = 0; x < pgm->width; x++) - { - for (y = 0; y < pgm->height; y++) - { - xbm->bytes[y][x / 8] |= - ((pgm->bits[y][x] & (1 << plane)) << (x % 8)) >> plane; - } - } - } - - xbmset->frame_count++; - return (xbmset); -} - - -int -xbm_unique_byte_count (XBM * xbm) -{ - unsigned int x, y; - unsigned int bytemap[256] = { 0, }; - unsigned int unique_count = 0; - - for (y = 0; y < xbm->height; y++) - for (x = 0; x < (xbm->width + 7) / 8; x++) - { - if (bytemap[xbm->bytes[y][x]] == 0) - unique_count++; - bytemap[xbm->bytes[y][x]]++; - } - - return unique_count; -} - - -int -xbm_zero_count (XBM *xbm) -{ - unsigned int x, y; - unsigned int zero_count = 0; - - for (y = 0; y < xbm->height; y++) - for (x = 0; x < (xbm->width + 7) / 8; x++) - { - if (xbm->bytes[y][x] == 0) - zero_count++; - } - - return zero_count; -} - - -void -xbm_write_stats (FILE *fp, XBM *xbm) -{ - fprintf (fp, "/* Statistics:\n"); - fprintf (fp, " * unique_byte_count = %d\n", xbm_unique_byte_count (xbm)); - fprintf (fp, " * zero_byte_count = %d\n", xbm_zero_count (xbm)); - fprintf (fp, " */\n"); -} - - -/** Write an animation: a sequence of frames contained within an -xbmset */ -void -xbmset_write_animation (FILE *fp, XBMSET *xbmset) -{ - int plane, frame; - - fprintf (fp, "#include \n"); - - /* TODO : need to work on this */ - fprintf (fp, "static unsigned char __end = XBMPROG_METHOD_END;\n"); - for (plane = xbmset->n_planes-1; plane >=0; plane--) - for (frame = xbmset->frame_count-1; frame >= 0; frame--) - { - XBM *xbm = xbmset->planes[plane][frame]; - XBMPROG *xbmprog = xbm_make_prog (xbm); - xbmprog_write (fp, xbmset->c_name, plane, xbmprog); - xbmprog_free (xbmprog); - } -} - - -/** Writes an XBMSET to a file. */ -void -xbmset_write (FILE *fp, XBMSET *xbmset, int plane, int write_flags) -{ - unsigned int x, y; - XBM *xbm; - - unsigned int bytes = 0; - - if (plane == XBMSET_ALL_PLANES) - { - /* TODO - the order in which planes are output should be - different depending on the version of GCC being used. - FreeWPC needs the planes in a particular order. */ - for (plane = xbmset->n_planes-1; plane >=0; plane--) - xbmset_write (fp, xbmset, plane, write_flags); - return; - } - - xbm = xbmset->planes[plane][0]; - - fprintf (fp, "#define %s%d_width %d\n", xbmset->c_name, plane, xbm->width); - fprintf (fp, "#define %s%d_height %d\n", xbmset->c_name, plane, xbm->height); - fprintf (fp, "static unsigned char %s%d_bits[] = {\n", xbmset->c_name, plane); - - if (write_flags & XBM_WRITE_HEADER) - fprintf (fp, "0x%02x, 0x%02x,\n", xbm->width, xbm->height); - - for (y = 0; y < xbm->height; y++) - for (x = 0; x < (xbm->width + 7) / 8; x++, bytes++) - { - fprintf (fp, "0x%02x, ", xbm->bytes[y][x]); - if ((bytes % 8) == 7) - fprintf (fp, "\n"); - } - - fprintf (fp, "};\n"); - - if (opt_compress) - { - xbm_write_stats (fp, xbm); - XBMPROG *xbmprog = xbm_make_prog (xbm); - fprintf (fp, "/* -- compressed representation\n"); - xbmprog_write (fp, xbmset->c_name, plane, xbmprog); - fprintf (fp, "*/\n"); - xbmprog_free (xbmprog); - } -} - - -void -xbmset_free (XBMSET *xbmset) -{ - free (xbmset); -} - - -XBM * -xbmset_plane (XBMSET *xbmset, int plane) -{ - return xbmset->planes[plane][0]; -} - - -/** Create a new PGM with default properties. */ -PGM * -pgm_alloc (void) -{ - PGM *pgm = xmalloc (sizeof (PGM)); - pgm->width = MAX_WIDTH; - pgm->height = MAX_HEIGHT; - pgm->maxval = MAX_MAXVAL; - memset (pgm->bits, 0, sizeof (pgm->bits)); - return (pgm); -} - - -/** Delete a PGM. */ -void -pgm_free (PGM *pgm) -{ - free (pgm); -} - - -/** Change the width and height of a PGM. */ -void -pgm_resize (PGM *pgm, - unsigned int width, unsigned int height) -{ - pgm->width = width; - pgm->height = height; -} - - -void -pgm_set_maxval (PGM *pgm, - unsigned int depth) -{ - pgm->maxval = depth; -} - - -PGM * -pgm_read (const char *filename) -{ - PGM *pgm; - FILE *fp; - char line[80]; - unsigned int x, y; - - pgm = pgm_alloc (); - fp = fopen (filename, "r"); - if (!fp) - { - pgm_free (pgm); - return NULL; - } - - fgets (line, 79, fp); /* magic */ - fgets (line, 79, fp); /* comment */ - - fgets (line, 79, fp); - sscanf (line, "%d %d", &pgm->width, &pgm->height); - - fgets (line, 79, fp); - sscanf (line, "%d", &pgm->maxval); - - for (y=0; y < pgm->height; y++) - for (x=0; x < pgm->width; x++) - { - fgets (line, 79, fp); - sscanf (line, "%d\n", &pgm->bits[y][x]); - } - - fclose (fp); - return (pgm); -} - - -void -pgm_write (PGM *pgm, const char *filename) -{ - unsigned int x, y; - - FILE *fp = fopen (filename, "wb"); - fprintf (fp, "P2\n"); - fprintf (fp, "#\n"); - fprintf (fp, "%d %d\n", pgm->width, pgm->height); - fprintf (fp, "%d\n", pgm->maxval); - for (y = 0; y < pgm->height; y++) - for (x = 0; x < pgm->width; x++) - fprintf (fp, "%d\n", pgm->bits[y][x]); - fclose (fp); -} - - -void -pgm_draw_pixel (PGM *pgm, - unsigned int x, unsigned int y, unsigned int val) -{ - pgm->bits[y][x] = val; -} - - -unsigned int -pgm_read_pixel (PGM *pgm, - unsigned int x, unsigned int y) -{ - return pgm->bits[y][x]; -} - - -void -pgm_draw_hline (PGM *pgm, - unsigned int x1, unsigned int x2, unsigned int y, unsigned int val) -{ - unsigned int x; - for (x = x1; x <= x2; x++) - pgm_draw_pixel (pgm, x, y, val); -} - - -void -pgm_draw_vline (PGM *pgm, - unsigned int x, unsigned int y1, unsigned int y2, unsigned int val) -{ - unsigned int y; - for (y = y1; y <= y2; y++) - pgm_draw_pixel (pgm, x, y, val); -} - - -void -pgm_draw_box (PGM *pgm, - unsigned int x1, unsigned int y1, unsigned int x2, unsigned int y2, - unsigned int val) -{ - pgm_draw_hline (pgm, x1, x2, y1, val); - pgm_draw_hline (pgm, x1, x2, y2, val); - pgm_draw_vline (pgm, x1, y1, y2, val); - pgm_draw_vline (pgm, x2, y1, y2, val); -} - - -void -pgm_draw_border (PGM *pgm, - unsigned int width, unsigned int val) -{ - unsigned int off; - for (off = 0; off < width; off++) - pgm_draw_box (pgm, off, off, pgm->width - off - 1, pgm->height - off - 1, val); -} - - -void -pgm_fill_box (PGM *pgm, - unsigned int x1, unsigned int y1, unsigned int x2, unsigned int y2, - unsigned int val) -{ - unsigned int x, y; - for (x = x1; x <= x2; x++) - for (y = y1; y <= y2; y++) - pgm_draw_pixel (pgm, x, y, val); -} - - -void -pgm_fill (PGM *pgm, unsigned int val) -{ - pgm_fill_box (pgm, 0, 0, pgm->width - 1, pgm->height - 1, val); -} - - -void -pgm_translate (PGM *dst, PGM *src, - int xshift, int yshift) -{ - unsigned int x, y; - for (x = 0; x < src->width; x++) - for (y = 0; y < src->height; y++) - { - unsigned int pixel = pgm_read_pixel (src, x, y); - - if ((x+xshift >= 0) && (x+xshift < dst->width) - && (y+yshift >= 0) && (y+yshift < dst->height)) - { - pgm_draw_pixel (dst, x+xshift, y+yshift, pixel); - } - } -} - - -void -pgm_paste (PGM *dst, PGM *src, unsigned int xpos, unsigned int ypos) -{ - unsigned int x, y; - for (x = 0; x < src->width; x++) - for (y = 0; y < src->height; y++) - if ((xpos+x >= 0) - && (xpos+x < dst->width) - && (ypos+y >= 0) - && (ypos+y < dst->height)) - pgm_draw_pixel (dst, xpos+x, ypos+y, pgm_read_pixel (src, x, y)); -} - - -void -pgm_scale (PGM *pgm, - double factor) -{ -} - - -void -pgm_xor (PGM *dst, PGM *src1, PGM *src2) -{ - unsigned int x, y; - /* verify dst, src1 and src2 are the same size */ - for (x = 0; x < src1->width; x++) - for (y = 0; y < src1->height; y++) - pgm_draw_pixel (dst, x, y, - pgm_read_pixel (src1, x, y) ^ pgm_read_pixel (src2, x, y)); -} - - -void -pgm_change_maxval (PGM *pgm, unsigned int new_maxval) -{ - unsigned int x, y; - double factor; - - if (new_maxval == pgm->maxval) - return; - - factor = pgm->maxval / new_maxval; - for (y = 0; y < pgm->height; y++) - for (x = 0; x < pgm->width; x++) - pgm->bits[y][x] = ((unsigned int)( - ((double)pgm->bits[y][x] / factor) + 0.5)); - pgm->maxval = new_maxval; -} - - -void -pgm_pixel_add_saturated (PGM *pgm, unsigned int x, unsigned int y, int delta) -{ - int val = pgm->bits[y][x]; - val += delta; - if (val < 0) - val = 0; - if (val > pgm->maxval) - val = pgm->maxval; - pgm->bits[y][x] = val; -} - - -void -pgm_dither (PGM *pgm, unsigned int new_maxval) -{ - unsigned int x, y; - int factor; - - /* Dithering not appropriate here -- just bump the values */ - if (new_maxval >= pgm->maxval) - { - pgm_change_maxval (pgm, new_maxval); - return; - } - - factor = (pgm->maxval + 1) / (new_maxval+1); - - /* Apply the Floyd-Steinberg dithering algorithm. */ - for (y = 0; y < pgm->height; y++) - for (x = 0; x < pgm->width; x++) - { - /* Calculate the new value for this pixel, after applying - the scaling factor. */ - /* e.g. from 256 to 4 colors: - 0 -> 0 - 64 -> 1 - 128 -> 2 - 192 -> 3 - (256) -> (4) - */ - unsigned int newval = (pgm->bits[y][x] / factor) * factor; - - /* Calculate the (signed) difference from the existing value */ - int diff = pgm->bits[y][x] - newval; - - /* Distribute the difference to adjacent cells. - Take care not to underflow/overflow the values. */ - pgm_pixel_add_saturated (pgm, x-1, y+1, (3 * diff) >> 4); - pgm_pixel_add_saturated (pgm, x, y+1, (5 * diff) >> 4); - pgm_pixel_add_saturated (pgm, x+1, y+1, (1 * diff) >> 4); - pgm_pixel_add_saturated (pgm, x+1, y, (7 * diff) >> 4); - } - - for (y = 0; y < pgm->height; y++) - for (x = 0; x < pgm->width; x++) - pgm->bits[y][x] /= factor; - pgm->maxval = new_maxval; -} - - -void -pgm_invert (PGM *pgm) -{ - unsigned int x, y; - for (y = 0; y < pgm->height; y++) - for (x = 0; x < pgm->width; x++) - pgm->bits[y][x] = pgm->maxval - pgm->bits[y][x]; -} - - -void -pgm_output_file (const char *filename) -{ -#ifndef NO_MAIN - FILE *fp; - static int first_output = 0; - char objname[64], *p; - - fp = fopen (opt_makefile_fragment_name, first_output ? "a" : "w"); - first_output = 1; - - strcpy (objname, filename); - p = strchr (objname, '.'); - if (p) - sprintf (p+1, "o"); - else - strcat (objname, ".o"); - - fprintf (fp, "%s : %s\n", objname, filename); - fprintf (fp, "XBMGEN_OBJS += %s\n", objname); - fclose (fp); -#endif -} - - -void -pgm_finish_output_file (void) -{ - FILE *fp = fopen (opt_makefile_fragment_name, "a"); - fprintf (fp, "xbmgen_objs : $(XBMGEN_OBJS)\n"); - fclose (fp); -} - - -void -pgm_write_xbmset (PGM *pgm, const char *filename, const char *name) -{ - XBMSET *xbmset; - FILE *fp; - - xbmset = pgm_make_xbmset (pgm); - xbmset_name (xbmset, name); - fp = fopen (filename, "wb"); - pgm_output_file (filename); - xbmset_write (fp, xbmset, XBMSET_ALL_PLANES, 0); - fclose (fp); - xbmset_free (xbmset); -} - - -void -pgm_write_xbm (PGM *pgm, const char *filename, const char *name, int plane) -{ - XBMSET *xbmset; - FILE *fp; - - xbmset = pgm_make_xbmset (pgm); - xbmset_name (xbmset, name); - fp = fopen (filename, "wb"); - pgm_output_file (filename); - xbmset_write (fp, xbmset, plane, 0); - fclose (fp); - xbmset_free (xbmset); -} - - -#ifndef NO_MAIN -#error "standalone binary for pgmlib no longer supported" -#endif /* NO_MAIN */ diff --git a/tools/pgmlib/pgmlib.h b/tools/pgmlib/pgmlib.h deleted file mode 100644 index 9b3c3ed23..000000000 --- a/tools/pgmlib/pgmlib.h +++ /dev/null @@ -1,169 +0,0 @@ -/* - * Copyright 2006, 2007, 2008 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 __PGMLIB_H -#define __PGMLIB_H - -#include - -#define MAX_WIDTH 128 -#define MAX_HEIGHT 32 -#define MAX_MAXVAL 15 -#define MAX_XBMSET_PLANES 4 -#define MAX_XBMSET_FRAMES 256 - -#define PGM_COLOR(pgm, percent) ((unsigned int)(((pgm)->maxval) * (percent))) -#define PGM_BLACK(pgm) PGM_COLOR(pgm, 0.0) -#define PGM_DARK(pgm) PGM_COLOR(pgm, 0.34) -#define PGM_BRIGHT(pgm) PGM_COLOR(pgm, 0.67) -#define PGM_WHITE(pgm) PGM_COLOR(pgm, 1.0) - -#define pgm_set_plane_count(pgm,n) pgm_set_maxval (pgm, ((1 << (n)) - 1)) -#define pgm_set_mono(pgm) pgm_set_plane_count (pgm, 1) -#define pgm_set_four_color(pgm) pgm_set_plane_count (pgm, 2) -#define pgm_copy(dst, src) pgm_paste (dst, src, 0, 0) - -#define XBMSET_ALL_PLANES -1 - -#define xbmset_name(xbmset, name) xbmset->c_name = name - -#define XBM_WRITE_HEADER 0x1 - -typedef struct { - unsigned int width; - unsigned int height; - unsigned int maxval; - unsigned int bits[MAX_HEIGHT][MAX_WIDTH]; -} PGM; - - -typedef struct { - unsigned int width; - unsigned int height; - unsigned int bytes[MAX_HEIGHT][MAX_WIDTH / 8]; -} XBM; - -typedef struct { - const char *c_name; - unsigned int n_planes; - unsigned int frame_count; - XBM *planes[MAX_XBMSET_PLANES][MAX_XBMSET_FRAMES]; -} XBMSET; - -#define XBMOP_MAX_LITERALS 0x20 -#define XBM_LITERAL_P(op) \ - (((op) >= XBMOP_LITERAL) && ((op) < XBM_OP_LITERAL+XBMOP_MAX_LITERALS)) -#define XBM_LITERAL_SIZE(op) ((op)+1) - -typedef enum { - /* Opcode 0x00-0x1F is followed by literal data. The amount is embedded - in the opcode and can be from 1 to 32 bytes */ - XBMOP_LITERAL=0x0, - - /* Opcode 0x20-0x3F is followed by a single byte of literal data, - which repeats up to 32 times in a row */ - XBMOP_REPEAT_BYTE=0x20, - - /* Opcode 0x40-0x5F is followed by a single word of literal data, - which repeats up to 32 times in a row (for up to 64 bytes) */ - XBMOP_REPEAT_WORD=0x40, - - /* Opcode 0x60-0x7F indicates up to 32 bytes needs to be "skipped", - with nothing done at those locations */ - XBMOP_SKIP=0x60, - - /* Opcode 0x80-0x8F precedes a sequence of up to 16 bytes, that defines - a character map. */ - XBMOP_CHARMAP_DEFINE=0x80, - - /* Opcode 0x90-0xCF spans 64 possible values. Each of these values - refers to a 2-element set, with each element having eight possible - values. Those values refer to the character map. This allows semi-random - data to be compressed more efficiently. */ - XBMOP_CHARMAP_REF=0xA0, - - /* Opcode 0xFF indicates end of image */ - XBMOP_EOI=0xEF, -} XBMOP; - -typedef struct xbm_prog_elem { - struct xbm_prog_elem *prev, *next; - XBMOP op; - union { - struct { - unsigned int count; - unsigned int bytes[16]; - } literal; - struct { - unsigned int count; - unsigned int data; - } repeat; - struct { - unsigned int count; - } skip; - struct { - } set_cursor; - } args; - struct { - unsigned int flags; - unsigned int size; - } stats; -} XBMPROG; - - -#define pgm_make_xbmset(pgm) pgm_append_xbmset (NULL, pgm) - -XBMSET * pgm_append_xbmset (XBMSET *xbmset, PGM *pgm); -int xbm_unique_byte_count (XBM * xbm); -void xbm_write_stats (FILE *fp, XBM *xbm); -void xbmset_write (FILE *fp, XBMSET *xbmset, int plane, int write_flags); -void xbmset_free (XBMSET *xbmset); -XBM *xbmset_plane (XBMSET *xbmset, int plane); -XBMPROG *xbm_make_prog (XBM *xbm); -void xbmprog_write (FILE *fp, const char *name, int plane, XBMPROG *xbmprog); -void xbmprog_free (XBMPROG *prog); - -PGM * pgm_alloc (void); -void pgm_free (PGM *pgm); -void pgm_resize (PGM *pgm, unsigned int width, unsigned int height); -void pgm_set_maxval (PGM *pgm, unsigned int depth); -void pgm_write (PGM *pgm, const char *filename); -void pgm_draw_pixel (PGM *pgm, unsigned int x, unsigned int y, unsigned int val); -unsigned int pgm_read_pixel (PGM *pgm, unsigned int x, unsigned int y); -void pgm_draw_hline (PGM *pgm, unsigned int x1, unsigned int x2, unsigned int y, unsigned int val); -void pgm_draw_vline (PGM *pgm, unsigned int x, unsigned int y1, unsigned int y2, unsigned int val); -void pgm_draw_box (PGM *pgm, unsigned int x1, unsigned int y1, unsigned int x2, unsigned int y2, unsigned int val); -void pgm_draw_border (PGM *pgm, unsigned int width, unsigned int val); -void pgm_fill_box (PGM *pgm, unsigned int x1, unsigned int y1, unsigned int x2, unsigned int y2, unsigned int val); -void pgm_fill (PGM *pgm, unsigned int val); -void pgm_translate (PGM *dst, PGM *src, int xshift, int yshift); -void pgm_paste (PGM *dst, PGM *src, unsigned int xpos, unsigned int ypos); -void pgm_scale (PGM *pgm, double factor); -void pgm_xor (PGM *dst, PGM *src1, PGM *src2); -void pgm_write_xbmset (PGM *pgm, const char *filename, const char *name); -void pgm_write_xbm (PGM *pgm, const char *filename, const char *name, int plane); -void pgm_change_maxval (PGM *pgm, unsigned int new_maxval); -PGM * pgm_read (const char *filename); -void pgm_dither (PGM *pgm, unsigned int new_maxval); -void pgm_invert (PGM *pgm); - -extern void machgen (void); - -#endif /* __PGMLIB_H */ diff --git a/wpcsound/Makefile b/wpcsound/Makefile deleted file mode 100644 index a27df7af5..000000000 --- a/wpcsound/Makefile +++ /dev/null @@ -1,61 +0,0 @@ - -CC = /usr/local/m6809/bin/gcc -CFLAGS = -I. -I../include -save-temps -O2 -Wall -Wno-format -fno-builtin -fstrength-reduce -frerun-loop-opt -Wunknown-pragmas -foptimize-sibling-calls -fstrict-aliasing -fregmove -mdirect -mint8 - -C_OBJS = sndhw.o vector.o -ASM_OBJS = delay.o -OBJS = $(C_OBJS) $(ASM_OBJS) - -DEPS = Makefile - -ROMDIR = /home/bcd/roms/pinmame - -SR = ../tools/srec2bin/srec2bin - -ZIP = tz_92.zip - -ROM = tzu18_l2.rom -SREC = tzu18_l2.srec -BIN = tzu18_l2.bin - -.PHONY : install -install : build - @echo "Installing into ZIP..." && \ - cp -p $(ROMDIR)/$(ZIP) . && \ - zip -d $(ZIP) $(ROM) && \ - zip $(ZIP) $(ROM) && \ - cp -p $(ZIP) $(ROMDIR) - -.PHONY : build -build : $(ROM) - -$(ROM) : blank496.bin $(BIN) - @echo "Concatenating..." && cat $^ > $(ROM) - -blank%.bin: - @echo "Creating blank space..." && dd if=/dev/zero of=$@ bs=1k count=$* > /dev/null 2>&1 - -$(BIN) : $(SREC) - @echo "Converting from S-records to binary..." && \ - ../tools/srec2bin/srec2bin -o $@ -s 0xC000 -l 0x4000 -f 0xFF $< - - -$(SREC): $(OBJS) $(DEPS) - @echo "Linking..." && $(CC) -Wl,--map \ - -Wl,--section-start -Wl,direct=0x200 \ - -Wl,-Tbss -Wl,0x300 \ - -Wl,-Ttext -Wl,0xC000 \ - -Wl,-Tdata -Wl,0xF000 \ - -o $@ $(OBJS) -nostdlib - -$(OBJS) : $(DEPS) - -$(C_OBJS) : %.o : %.c sndhw.h - @echo "Compiling $<..." && $(CC) $(CFLAGS) -o $@ -c $< - -$(ASM_OBJS) : %.o : %.s - @echo "Compiling $<..." && $(CC) $(CFLAGS) -o $@ -x assembler-with-cpp -c $< - -.PHONY : clean -clean : - rm -f $(OBJS) *.map *.bin $(ROM) $(SREC) *.i diff --git a/wpcsound/delay.s b/wpcsound/delay.s deleted file mode 100644 index e4b795de0..000000000 --- a/wpcsound/delay.s +++ /dev/null @@ -1,18 +0,0 @@ - - .area .ctors -__ctors:: - .area .dtors -__dtors:: - -; MDELAY_COUNT = 290 ; works for 1s delays -MDELAY_COUNT = 315 ; works for 1s delays - - .area .text - .globl _mdelay1 -_mdelay1: - ldx #MDELAY_COUNT -1$: - leax -1,x - bne 1$ - rts - diff --git a/wpcsound/sndhw.c b/wpcsound/sndhw.c deleted file mode 100644 index 790bfd832..000000000 --- a/wpcsound/sndhw.c +++ /dev/null @@ -1,243 +0,0 @@ -/* - * Copyright 2007, 2008, 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 - */ - -/* Taken blatantly from freewpc.h */ -typedef unsigned char bcd_t, BCD; -typedef signed char I8, S8; -typedef unsigned char U8; -typedef long I16, S16; -typedef unsigned long U16; -typedef unsigned int INTPTR; -typedef U8 bool; -#define TRUE (1) -#define FALSE (0) -#define NULL 0UL -#define C_STRING(x) C_STR(x) -#define C_STR(x) #x - -#include -#include -#include -#include - -__attribute__((section("direct"))) U8 tmp; -U8 tmp2; -U8 tmp3 = 0; - -const U8 *dac_sequence; - -const U8 *dac_sequence_end; - - -extern inline void increase_volume (void) -{ - adjust_volume (0); -} - -extern inline void decrease_volume (void) -{ - adjust_volume (1); -} - -/**********************************************************************/ - -/* This is a sequence of DAC samples that produces the - * WPC sound board 'gong' at startup. */ - -const U8 dac_beep[] = { 0xFF, 0x00, 0x00, 0x7F, 0x00, 0x01, 0x7F, 0x01, -0x01, 0x7E, 0x01, 0x02, 0x7E, 0x02, 0x02, 0x7D, 0x02, 0x03, 0x7D, 0x03, -0x03, 0x7C, 0x03, 0x04, 0x7C, 0x04, 0x04, 0x7B, 0x04, 0x05, 0x7B, 0x05, -0x05, 0x7A, 0x05, 0x06, 0x7A, 0x06, 0x06, 0x79, 0x06, 0x07, 0x79, 0x07, -0x07, 0x78, 0x07, 0x08, 0x78, 0x08, 0x08, 0x77, 0x08, 0x09, 0x77, 0x09, -0x09, 0x76, 0x09, 0x0A, 0x76, 0x0A, 0x0A, 0x75, 0x0A, 0x0B, 0x75, 0x0B, -0x0B, 0x74, 0x0B, 0x0C, 0x74, 0x0C, 0x0C, 0x73, 0x0C, 0x0D, 0x73, 0x0D, -0x0D, 0x72, 0x0D, 0x0E, 0x72, 0x0E, 0x0E, 0x71, 0x0E, 0x0F, 0x71, 0x0F, -0x0F, 0x70, 0x0F, 0x10, 0x70, 0x10, 0x10, 0x6F, 0x10, 0x11, 0x6F, 0x11, -0x11, 0x6E, 0x11, 0x12, 0x6E, 0x12, 0x12, 0x6D, 0x12, 0x13, 0x6D, 0x13, -0x13, 0x6C, 0x13, 0x14, 0x6C, 0x14, 0x14, 0x6B, 0x14, 0x15, 0x6B, 0x15, -0x15, 0x6A, 0x15, 0x16, 0x6A, 0x16, 0x16, 0x69, 0x16, 0x17, 0x69, 0x17, -0x17, 0x68, 0x17, 0x18, 0x68, 0x18, 0x18, 0x67, 0x18, 0x19, 0x67, 0x19, -0x19, 0x66, 0x19, 0x1A, 0x66, 0x1A, 0x1A, 0x65, 0x1A, 0x1B, 0x65, 0x1B, -0x1B, 0x64, 0x1B, 0x1C, 0x64, 0x1C, 0x1C, 0x63, 0x1C, 0x1D, 0x63, 0x1D, -0x1D, 0x62, 0x1D, 0x1E, 0x62, 0x1E, 0x1E, 0x61, 0x1E, 0x1F, 0x61, 0x1F, -0x1F, 0x60, 0x1F, 0x20, 0x60, 0x20, 0x20, 0x5F, 0x20, 0x21, 0x5F, 0x21, -0x21, 0x5E, 0x21, 0x22, 0x5E, 0x22, 0x22, 0x5D, 0x22, 0x23, 0x5D, 0x23, -0x23, 0x5C, 0x23, 0x24, 0x5C, 0x24, 0x24, 0x5B, 0x24, 0x25, 0x5B, 0x25, -0x25, 0x5A, 0x25, 0x26, 0x5A, 0x26, 0x26, 0x59, 0x26, 0x27, 0x59, 0x27, -0x27, 0x58, 0x27, 0x28, 0x58, 0x28, 0x28, 0x57, 0x28, 0x29, 0x57, 0x29, -0x29, 0x56, 0x29, 0x2A, 0x56, 0x2A, 0x2A, 0x55, 0x2A, 0x2B, 0x55, 0x2B, -0x2B, 0x54, 0x2B, 0x2C, 0x54, 0x2C, 0x2C, 0x53, 0x2C, 0x2D, 0x53, 0x2D, -0x2D, 0x52, 0x2D, 0x2E, 0x52, 0x2E, 0x2E, 0x51, 0x2E, 0x2F, 0x51, 0x2F, -0x2F, 0x50, 0x2F, 0x30, 0x50, 0x30, 0x30, 0x4F, 0x30, 0x31, 0x4F, 0x31, -0x31, 0x4E, 0x31, 0x32, 0x4E, 0x32, 0x32, 0x4D, 0x32, 0x33, 0x4D, 0x33, -0x33, 0x4C, 0x33, 0x34, 0x4C, 0x34, 0x34, 0x4B, 0x34, 0x35, 0x4B, 0x35, -0x35, 0x4A, 0x35, 0x36, 0x4A, 0x36, 0x36, 0x49, 0x36, 0x37, 0x49, 0x37, -0x37, 0x48, 0x37, 0x38, 0x48, 0x38, 0x38, 0x47, 0x38 }; - - -/**********************************************************************/ - - -/* Delay for a certain number of milliseconds */ -void mdelay (U8 count) -{ - do { - mdelay1 (); - count--; - } while (count != 0); -} - - -/* Delay for a certain number of seconds */ -void sdelay (U8 count) -{ - do { - mdelay (250); - mdelay (250); - mdelay (250); - mdelay (220); - count--; - } while (count != 0); -} - - -/* Change the volume by a given delta (up or down) */ -void change_volume (S8 diff) -{ - if (diff < 0) - { - do { - decrease_volume (); - mdelay1 (); - diff++; - } while (diff != 0); - } - else - { - do { - increase_volume (); - mdelay1 (); - diff--; - } while (diff != 0); - } -} - - -/* Silence the volume control */ -void silence_volume (void) -{ - change_volume (-120); -} - - -/* Set the current volume */ -void set_volume (U8 level) -{ - silence_volume (); - change_volume (level); -} - - - -void wpc_sound_init (void) -{ - U16 i; - U8 reg; - - dac_sequence = dac_sequence_end = NULL; - - /* Initialize the volume control */ - set_volume (72); - - /* Initialize the FM chip */ - for (reg=0; reg <= 0xFE; reg++) - fm_write (reg, 0); - fm_write (0xFF, 0); - - fm_write (FM_ADDR_CLOCK_FUNCTIONS, FM_CLOCK_RESET_A+FM_CLOCK_RESET_B); - fm_write (FM_ADDR_CLOCK_A1, 0xFD); - fm_write (FM_ADDR_CLOCK_A2, 0x02); - fm_write (FM_ADDR_CLOCK_FUNCTIONS, FM_CLOCK_RESET_A+FM_CLOCK_IRQ_A+FM_CLOCK_LOAD_A); - enable_firq (); - - /* Emit the 'gong' sound. - * 1 sample per 1ms = 1000 samples/sec x 8 bits/sample = 8Khz */ - dac_sequence = dac_beep; - dac_sequence_end = dac_beep + sizeof (dac_beep); -} - - -__attribute__((noreturn)) void wpc_sound_main_loop (void) -{ - for (;;) - { - } -} - - -/** The reset handler, called at CPU reset time */ -__attribute__((naked)) __attribute__((noreturn)) -void wpc_sound_reset (void) -{ - set_stack_pointer (0x1000); - set_direct_page_pointer (0x02); - - wpc_sound_init (); - wpc_sound_main_loop (); -} - - -/** Generated when the CPU board writes a value to the sound board */ -__attribute__((interrupt)) void wpc_sound_irq (void) -{ - /* Read the value from the CPU and queue it for processing later. */ -} - - -/** Generated by the FM chip when its programmable timer expires. */ -__attribute__((interrupt)) void wpc_sound_firq (void) -{ - m6809_firq_save_regs (); - - /* Emit 1st byte in DAC sequence */ - if (dac_sequence) - dac_write (*dac_sequence++); - - hard_delay (320); - - /* Emit 2nd byte in DAC sequence */ - if (dac_sequence) - { - dac_write (*dac_sequence++); - if (dac_sequence >= dac_sequence_end) - { - dac_sequence = NULL; - } - } - - /* Restart the timer */ - fm_write (FM_ADDR_CLOCK_FUNCTIONS, FM_CLOCK_RESET_A+FM_CLOCK_IRQ_A+FM_CLOCK_LOAD_A); - - /* Restore registers and return */ - m6809_firq_restore_regs (); - return; -} - - diff --git a/wpcsound/sndhw.h b/wpcsound/sndhw.h deleted file mode 100644 index 3de0cdeb6..000000000 --- a/wpcsound/sndhw.h +++ /dev/null @@ -1,143 +0,0 @@ -/* - * Copyright 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 _SNDHW_H -#define _SNDHW_H - -/* Williams sound board I/O registers */ - -/** ROM bank register */ -#define WPCS_ROM_BANK 0x2000 - -/** Address (W) / status (R) register for the FM chip (YM2151) */ -#define WPCS_FM_ADDR_STATUS 0x2400 - -/** Data register (R/W) for the FM chip */ -#define WPCS_FM_DATA 0x2401 - -/** DAC output register */ -#define WPCS_DAC_DATA 0x2800 - -/** CVSD output register */ -#define WPCS_CVSD_DATA 0x2C00 - -/** Input from the CPU board. When the CPU writes a value to -the sound board, an IRQ is generated on the sound board and -the value is available here. */ -#define WPCS_CPU_INPUT 0x3000 - -/** CVSD clear register */ -#define WPCS_CVSD_CLEAR 0x3400 - -/** Volume control (e-pot) register */ -#define WPCS_VOLUME 0x3800 - -/** Output to the CPU board. The value is latched so that the CPU -can retrieve it when it is ready. */ -#define WPCS_CPU_OUTPUT 0x3C00 - - -/* YM2151 FM chip addresses */ - -#define FM_ADDR_TEST_LFO_RESET 0x1 -#define FM_ADDR_KEY_ON 0x8 -#define FM_ADDR_NOISE_ENABLE 0xF -#define FM_ADDR_CLOCK_A1 0x10 -#define FM_ADDR_CLOCK_A2 0x11 -#define FM_ADDR_CLOCK_B 0x12 -#define FM_ADDR_CLOCK_FUNCTIONS 0x14 - #define FM_CLOCK_CSM 0x80 - #define FM_CLOCK_RESET_B 0x20 - #define FM_CLOCK_RESET_A 0x10 - #define FM_CLOCK_IRQ_B 0x8 - #define FM_CLOCK_IRQ_A 0x4 - #define FM_CLOCK_LOAD_B 0x2 - #define FM_CLOCK_LOAD_A 0x1 -#define FM_ADDR_LOW_FREQUENCY 0x18 -#define FM_ADDR_PHASE_AMP_MOD 0x19 -#define FM_ADDR_CONTROL_WAVEFORM 0x1B -#define FM_ADDR_CHANNEL_CTRL 0x20 -#define FM_ADDR_KEYCODE0 0x28 -#define FM_ADDR_KEYCODE1 0x29 -#define FM_ADDR_KEYCODE2 0x2A -#define FM_ADDR_KEYCODE3 0x2B -#define FM_ADDR_KEYCODE4 0x2C -#define FM_ADDR_KEYCODE5 0x2D -#define FM_ADDR_KEYCODE6 0x2E -#define FM_ADDR_KEYCODE7 0x2F -#define FM_ADDR_FRACTION0 0x30 -#define FM_ADDR_FRACTION1 0x31 -#define FM_ADDR_FRACTION2 0x32 -#define FM_ADDR_FRACTION3 0x33 -#define FM_ADDR_FRACTION4 0x34 -#define FM_ADDR_FRACTION5 0x35 -#define FM_ADDR_FRACTION6 0x36 -#define FM_ADDR_FRACTION7 0x37 - -extern inline void hard_delay (const U16 loops) -{ - asm __volatile__ ("ldx\t%0" :: "n" (loops) : "x"); - asm __volatile__ ("1$: leax\t-1,x"); - asm __volatile__ ("bne\t1$"); -} - -extern inline void io_write (U16 addr, U8 val) -{ - *(volatile U8 *)addr = val; -} - -extern inline U8 io_read (U16 addr) -{ - return *(volatile U8 *)addr; -} - - -extern inline void fm_write (U8 fm_reg, U8 val) -{ - while (io_read (WPCS_FM_DATA) & 0x80); - io_write (WPCS_FM_ADDR_STATUS, fm_reg); - while (io_read (WPCS_FM_DATA) & 0x80); - io_write (WPCS_FM_DATA, val); -} - -extern inline U8 cpu_latch_read (void) -{ - return io_read (WPCS_CPU_INPUT); -} - -extern inline void cpu_latch_write (U8 val) -{ - io_write (WPCS_CPU_OUTPUT, val); -} - -extern inline void dac_write (U8 val) -{ - io_write (WPCS_DAC_DATA, val); -} - - -extern inline void adjust_volume (const U8 up_down_flag) -{ - io_write (WPCS_VOLUME, (up_down_flag << 1) | 1); - io_write (WPCS_VOLUME, (up_down_flag << 1) | 0); -} - - -#endif /* _SNDHW */ diff --git a/wpcsound/vector.c b/wpcsound/vector.c deleted file mode 100644 index 5092ce3f3..000000000 --- a/wpcsound/vector.c +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright 2007, 2008 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 The 6809 interrupt vector table - * - * This module defines the contents of the vector table and places the - * structure at a fixed location, named "vector", which is mapped at - * link-time to address 0xFFF0. - */ - -extern void wpc_sound_reset (void); -extern void wpc_sound_irq (void); -extern void wpc_sound_firq (void); - - -/** The 6809 vector table structure */ -typedef struct -{ - void (*unused) (void); - void (*swi3) (void); - void (*swi2) (void); - void (*firq) (void); - void (*irq) (void); - void (*swi) (void); - void (*nmi) (void); - void (*reset) (void); -} m6809_vector_table_t; - - -/** The interrupt vector table */ -__attribute__((section("vector"))) m6809_vector_table_t m6809_vectors = { - .unused = wpc_sound_reset, - .swi3 = wpc_sound_reset, - .swi2 = wpc_sound_reset, - .firq = wpc_sound_firq, - .irq = wpc_sound_irq, - .swi = wpc_sound_reset, - .nmi = wpc_sound_reset, - .reset = wpc_sound_reset, -}; -