gbdk-2020 | GameBoy Development Kit |
| download: https://git.y1.nz/archives/gbdk.tar.gz | |
| README | Files | Log | Refs | LICENSE |
commit e1890cb8a64741488abe497e8729e1cbd513bffe parent 0c218c8965233257e693cf8b7fd5cb492f4b9903 Author: Toxa <untoxa@mail.ru> Date: Fri, 26 Apr 2024 18:06:25 +0300 EXAMPLES: joypad testing example Diffstat:
| A | gbdk-lib/examples/cross-platform/joytest/Makefile | 85 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | gbdk-lib/examples/cross-platform/joytest/Makefile.targets | 55 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | gbdk-lib/examples/cross-platform/joytest/src/joytest.c | 116 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | gbdk-lib/examples/cross-platform/joytest/src/tiles.c | 117 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
4 files changed, 373 insertions(+), 0 deletions(-)
diff --git a/gbdk-lib/examples/cross-platform/joytest/Makefile b/gbdk-lib/examples/cross-platform/joytest/Makefile @@ -0,0 +1,85 @@ +# If you move this project you can change the directory +# to match your GBDK root directory (ex: GBDK_HOME = "C:/GBDK/" +ifndef GBDK_HOME + GBDK_HOME = ../../../ +endif + +LCC = $(GBDK_HOME)bin/lcc + +# Set platforms to build here, spaced separated. (These are in the separate Makefile.targets) +# They can also be built/cleaned individually: "make gg" and "make gg-clean" +# Possible are: gb gbc pocket megaduck sms gg +TARGETS=gb pocket megaduck sms gg nes + +# Configure platform specific LCC flags here: +LCCFLAGS_gb = -Wm-ys -Wl-yt0x1B -autobank # Set an MBC for banking (1B-ROM+MBC5+RAM+BATT) +LCCFLAGS_pocket = -Wm-ys -Wl-yt0x1B -autobank # Usually the same as required for .gb +LCCFLAGS_duck = -Wm-ys -Wl-yt0x1B -autobank # Usually the same as required for .gb +LCCFLAGS_gbc = -Wm-ys -Wl-yt0x1B -Wm-yc -autobank # Same as .gb with: -Wm-yc (gb & gbc) or Wm-yC (gbc exclusive) +LCCFLAGS_sms = -autobank +LCCFLAGS_gg = -autobank +LCCFLAGS_nes = + +LCCFLAGS += $(LCCFLAGS_$(EXT)) # This adds the current platform specific LCC Flags + +LCCFLAGS += -Wl-j -Wm-yoA -Wm-ya4 -Wb-ext=.rel -Wb-v # MBC + Autobanking related flags + +# GBDK_DEBUG = ON +ifdef GBDK_DEBUG + LCCFLAGS += -debug -v +endif + + +# You can set the name of the ROM file here +PROJECTNAME = joytest + +SRCDIR = src +OBJDIR = obj/$(EXT) +RESDIR = res +BINDIR = build/$(EXT) +MKDIRS = $(OBJDIR) $(BINDIR) # See bottom of Makefile for directory auto-creation + +BINS = $(OBJDIR)/$(PROJECTNAME).$(EXT) +CSOURCES = $(foreach dir,$(SRCDIR),$(notdir $(wildcard $(dir)/*.c))) $(foreach dir,$(RESDIR),$(notdir $(wildcard $(dir)/*.c))) +ASMSOURCES = $(foreach dir,$(SRCDIR),$(notdir $(wildcard $(dir)/*.s))) +OBJS = $(CSOURCES:%.c=$(OBJDIR)/%.o) $(ASMSOURCES:%.s=$(OBJDIR)/%.o) + +# Builds all targets sequentially +all: $(TARGETS) + +# Compile .c files in "src/" to .o object files +$(OBJDIR)/%.o: $(SRCDIR)/%.c + $(LCC) $(LCCFLAGS) $(CFLAGS) -c -o $@ $< + +# Compile .c files in "res/" to .o object files +$(OBJDIR)/%.o: $(RESDIR)/%.c + $(LCC) $(LCCFLAGS) $(CFLAGS) -c -o $@ $< + +# Compile .s assembly files in "src/" to .o object files +$(OBJDIR)/%.o: $(SRCDIR)/%.s + $(LCC) $(LCCFLAGS) $(CFLAGS) -c -o $@ $< + +# If needed, compile .c files in "src/" to .s assembly files +# (not required if .c is compiled directly to .o) +$(OBJDIR)/%.s: $(SRCDIR)/%.c + $(LCC) $(LCCFLAGS) $(CFLAGS) -S -o $@ $< + +# Link the compiled object files into a .gb ROM file +$(BINS): $(OBJS) + $(LCC) $(LCCFLAGS) $(CFLAGS) -o $(BINDIR)/$(PROJECTNAME).$(EXT) $(OBJS) + +clean: + @echo Cleaning + @for target in $(TARGETS); do \ + $(MAKE) $$target-clean; \ + done + +# Include available build targets +include Makefile.targets + + +# create necessary directories after Makefile is parsed but before build +# info prevents the command from being pasted into the makefile +ifneq ($(strip $(EXT)),) # Only make the directories if EXT has been set by a target +$(info $(shell mkdir -p $(MKDIRS))) +endif diff --git a/gbdk-lib/examples/cross-platform/joytest/Makefile.targets b/gbdk-lib/examples/cross-platform/joytest/Makefile.targets @@ -0,0 +1,55 @@ + +# Platform specific flags for compiling (only populate if they're both present) +ifneq ($(strip $(PORT)),) +ifneq ($(strip $(PLAT)),) +CFLAGS += -m$(PORT):$(PLAT) +endif +endif + +# Called by the individual targets below to build a ROM +build-target: $(BINS) + +clean-target: + rm -rf $(OBJDIR) + rm -rf $(BINDIR) + +gb-clean: + ${MAKE} clean-target EXT=gb +gb: + ${MAKE} build-target PORT=sm83 PLAT=gb EXT=gb + + +gbc-clean: + ${MAKE} clean-target EXT=gbc +gbc: + ${MAKE} build-target PORT=sm83 PLAT=gb EXT=gbc + + +pocket-clean: + ${MAKE} clean-target EXT=pocket +pocket: + ${MAKE} build-target PORT=sm83 PLAT=ap EXT=pocket + + +megaduck-clean: + ${MAKE} clean-target EXT=duck +megaduck: + ${MAKE} build-target PORT=sm83 PLAT=duck EXT=duck + + +sms-clean: + ${MAKE} clean-target EXT=sms +sms: + ${MAKE} build-target PORT=z80 PLAT=sms EXT=sms + + +gg-clean: + ${MAKE} clean-target EXT=gg +gg: + ${MAKE} build-target PORT=z80 PLAT=gg EXT=gg + + +nes-clean: + ${MAKE} clean-target EXT=nes +nes: + ${MAKE} build-target PORT=mos6502 PLAT=nes EXT=nes diff --git a/gbdk-lib/examples/cross-platform/joytest/src/joytest.c b/gbdk-lib/examples/cross-platform/joytest/src/joytest.c @@ -0,0 +1,115 @@ +#include <gbdk/platform.h> + +#include <stdint.h> +#include <stdbool.h> + +extern const uint8_t sprite_data[64]; +extern const uint8_t tiles_data[1488]; + +extern const uint8_t normal_buttons[8][4]; +extern const uint8_t pressed_buttons[8][4]; +extern const uint8_t disabled_buttons[8][4]; + +void draw_buttons(uint8_t state, uint8_t x, uint8_t y) { + set_bkg_based_tiles(x, y, 2, 2, (state & J_UP) ? pressed_buttons[0] : normal_buttons[0], 1); + set_bkg_based_tiles(x + 2, y, 2, 2, (state & J_DOWN) ? pressed_buttons[1] : normal_buttons[1], 1); + set_bkg_based_tiles(x + 4, y, 2, 2, (state & J_LEFT) ? pressed_buttons[2] : normal_buttons[2], 1); + set_bkg_based_tiles(x + 6, y, 2, 2, (state & J_RIGHT) ? pressed_buttons[3] : normal_buttons[3], 1); + set_bkg_based_tiles(x + 8, y, 2, 2, (state & J_A) ? pressed_buttons[4] : normal_buttons[4], 1); + set_bkg_based_tiles(x + 10, y, 2, 2, (state & J_B) ? pressed_buttons[5] : normal_buttons[5], 1); + set_bkg_based_tiles(x + 12, y, 2, 2, (state & J_START) ? pressed_buttons[6] : normal_buttons[6], 1); + set_bkg_based_tiles(x + 14, y, 2, 2, (state & J_SELECT) ? pressed_buttons[7] : normal_buttons[7], 1); +} + +void draw_disabled(uint8_t x, uint8_t y) { + set_bkg_based_tiles(x, y, 2, 2, disabled_buttons[0], 1); + set_bkg_based_tiles(x + 2, y, 2, 2, disabled_buttons[1], 1); + set_bkg_based_tiles(x + 4, y, 2, 2, disabled_buttons[2], 1); + set_bkg_based_tiles(x + 6, y, 2, 2, disabled_buttons[3], 1); + set_bkg_based_tiles(x + 8, y, 2, 2, disabled_buttons[4], 1); + set_bkg_based_tiles(x + 10, y, 2, 2, disabled_buttons[5], 1); + set_bkg_based_tiles(x + 12, y, 2, 2, disabled_buttons[6], 1); + set_bkg_based_tiles(x + 14, y, 2, 2, disabled_buttons[7], 1); +} + +void reset_object_pos(void) { + for (uint8_t i = 0; i < 4; i++) { + set_sprite_tile(i, i); + move_sprite(i, + DEVICE_SPRITE_PX_OFFSET_X + (i << 3) + ((DEVICE_SCREEN_PX_WIDTH - (4 * 8)) >> 1), + (DEVICE_SPRITE_PX_OFFSET_Y + 48u) + ((DEVICE_SCREEN_PX_HEIGHT - 8) >> 1) + ); + } +} + +bool toggle = false; +bool isSGB = false; + +joypads_t old_joypads, joypads; +uint8_t old_joy = 0xff, joy = 0; + +void main(void) { + // Wait 4 frames + // For SGB on PAL SNES this delay is required on startup, otherwise borders don't show up + for (uint8_t i = 4; i != 0; i--) vsync(); + +#ifdef NINTENDO + isSGB = sgb_check(); +#endif + // init joypads + joypad_init(4, &joypads); + + set_sprite_data(0, sizeof(sprite_data) >> 4, sprite_data); + set_bkg_data(1, sizeof(tiles_data) >> 4, tiles_data); + fill_bkg_rect(0, 0, DEVICE_SCREEN_WIDTH, DEVICE_SCREEN_HEIGHT, 0); + + if (isSGB) draw_disabled(0, 0); else draw_buttons(joy, 0, 0); + + for (uint8_t i = 0; i != 4; i++) { + if (i <= (joypads.npads - 1)) { + draw_buttons(joypads.joypads[i], 0, 4 + (i << 1)); + } else { + draw_disabled(0, 4 + (i << 1)); + } + } + + reset_object_pos(); + SHOW_SPRITES; SHOW_BKG; + + while(TRUE) { + // poll joypads + if (toggle = !toggle) { + // poll joypad() only if SGB was not detected + if (!isSGB) { + old_joy = joy, joy = joypad(); + + // draw button state if changed + if (joy != old_joy) draw_buttons(joy, 0, 0); + + // start button resets position + if (joy & J_START) reset_object_pos(); + } + } else { + old_joypads = joypads; + joypad_ex(&joypads); + // iterate joypads, move sprites + for (uint8_t i = 0; i < joypads.npads; i++) { + uint8_t j = joypads.joypads[i]; + + // draw joypad + if (old_joypads.joypads[i] != j) draw_buttons(j, 0, 4 + (i << 1)); + + // move objects + if (j & J_LEFT) scroll_sprite(i, -1, 0); + if (j & J_RIGHT) scroll_sprite(i, 1, 0); + if (j & J_UP) scroll_sprite(i, 0, -1); + if (j & J_DOWN) scroll_sprite(i, 0, 1); + + // start button resets position + if (j & J_START) reset_object_pos(); + } + } + // wait for vsync + vsync(); + } +} + diff --git a/gbdk-lib/examples/cross-platform/joytest/src/tiles.c b/gbdk-lib/examples/cross-platform/joytest/src/tiles.c @@ -0,0 +1,117 @@ +#include <stdint.h> + +const uint8_t sprite_data[64] = { + 0x3C,0x3C,0x42,0x7E,0x99,0xFF,0xA9,0xFF,0x89,0xFF,0x89,0xFF,0x42,0x7E,0x3C,0x3C, + 0x3C,0x3C,0x42,0x7E,0xB9,0xFF,0x89,0xFF,0x91,0xFF,0xB9,0xFF,0x42,0x7E,0x3C,0x3C, + 0x3C,0x3C,0x42,0x7E,0x99,0xFF,0x89,0xFF,0x99,0xFF,0x89,0xFF,0x5A,0x7E,0x3C,0x3C, + 0x3C,0x3C,0x42,0x7E,0xA9,0xFF,0xA9,0xFF,0xB9,0xFF,0x89,0xFF,0x42,0x7E,0x3C,0x3C +}; + +const uint8_t tiles_data[1488] = { + 0x03,0x03,0x0c,0x0f,0x10,0x1f,0x20,0x3f,0x21,0x3f,0x41,0x7f,0x43,0x7f,0x43,0x7f, + 0xc0,0xc0,0x30,0xf0,0x08,0xf8,0x04,0xfc,0x84,0xfc,0x82,0xfe,0xc2,0xfe,0xc2,0xfe, + 0x03,0x03,0x0c,0x0f,0x10,0x1f,0x20,0x3f,0x27,0x3f,0x47,0x7f,0x43,0x7f,0x43,0x7f, + 0xc0,0xc0,0x30,0xf0,0x08,0xf8,0x04,0xfc,0xe4,0xfc,0xe2,0xfe,0xc2,0xfe,0xc2,0xfe, + 0x03,0x03,0x0c,0x0f,0x10,0x1f,0x20,0x3f,0x20,0x3f,0x41,0x7f,0x47,0x7f,0x47,0x7f, + 0xc0,0xc0,0x30,0xf0,0x08,0xf8,0x04,0xfc,0x64,0xfc,0xe2,0xfe,0xe2,0xfe,0xe2,0xfe, + 0x03,0x03,0x0c,0x0f,0x10,0x1f,0x20,0x3f,0x26,0x3f,0x47,0x7f,0x47,0x7f,0x47,0x7f, + 0xc0,0xc0,0x30,0xf0,0x08,0xf8,0x04,0xfc,0x04,0xfc,0x82,0xfe,0xe2,0xfe,0xe2,0xfe, + 0x03,0x03,0x0c,0x0f,0x10,0x1f,0x20,0x3f,0x20,0x3c,0x40,0x7b,0x40,0x78,0x40,0x7b, + 0xc0,0xc0,0x30,0xf0,0x08,0xf8,0x04,0xfc,0x04,0x3c,0x02,0xde,0x02,0x1e,0x02,0xde, + 0x03,0x03,0x0c,0x0f,0x10,0x1f,0x20,0x3f,0x20,0x38,0x40,0x7b,0x40,0x78,0x40,0x7b, + 0xc0,0xc0,0x30,0xf0,0x08,0xf8,0x04,0xfc,0x04,0x3c,0x02,0xde,0x02,0x3e,0x02,0xde, + 0x03,0x03,0x0c,0x0f,0x10,0x1f,0x20,0x3f,0x20,0x3c,0x40,0x7b,0x40,0x7c,0x40,0x7f, + 0xc0,0xc0,0x30,0xf0,0x08,0xf8,0x04,0xfc,0x04,0x1c,0x02,0xfe,0x02,0x3e,0x02,0xde, + 0x03,0x03,0x0c,0x0f,0x10,0x1f,0x20,0x3f,0x20,0x3c,0x40,0x7b,0x40,0x79,0x40,0x7c, + 0xc0,0xc0,0x30,0xf0,0x08,0xf8,0x04,0xfc,0x04,0x8c,0x02,0xbe,0x02,0x9e,0x02,0xbe, + 0x47,0x7f,0x67,0x7f,0x60,0x7f,0x30,0x3f,0x3c,0x3f,0x1f,0x1f,0x0f,0x0f,0x03,0x03, + 0xe2,0xfe,0xe6,0xfe,0x06,0xfe,0x0c,0xfc,0x3c,0xfc,0xf8,0xf8,0xf0,0xf0,0xc0,0xc0, + 0x41,0x7f,0x61,0x7f,0x60,0x7f,0x30,0x3f,0x3c,0x3f,0x1f,0x1f,0x0f,0x0f,0x03,0x03, + 0x82,0xfe,0x86,0xfe,0x06,0xfe,0x0c,0xfc,0x3c,0xfc,0xf8,0xf8,0xf0,0xf0,0xc0,0xc0, + 0x41,0x7f,0x60,0x7f,0x60,0x7f,0x30,0x3f,0x3c,0x3f,0x1f,0x1f,0x0f,0x0f,0x03,0x03, + 0xe2,0xfe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fc,0xe4,0xfc,0xe2,0xfe,0xc2,0xfe, + 0x00,0x00,0x03,0x03,0x0c,0x0f,0x10,0x1f,0x20,0x3f,0x20,0x3f,0x41,0x7f,0x47,0x7f, + 0x00,0x00,0xc0,0xc0,0x30,0xf0,0x08,0xf8,0x04,0xfc,0x64,0xfc,0xe2,0xfe,0xe2,0xfe, + 0x00,0x00,0x03,0x03,0x0c,0x0f,0x10,0x1f,0x20,0x3f,0x26,0x3f,0x47,0x7f,0x47,0x7f, + 0x00,0x00,0xc0,0xc0,0x30,0xf0,0x08,0xf8,0x04,0xfc,0x04,0xfc,0x82,0xfe,0xe2,0xfe, + 0x00,0x00,0x03,0x03,0x0c,0x0f,0x10,0x1f,0x20,0x3f,0x20,0x3c,0x40,0x7b,0x40,0x78, + 0x00,0x00,0xc0,0xc0,0x30,0xf0,0x08,0xf8,0x04,0xfc,0x04,0x3c,0x02,0xde,0x02,0x1e, + 0x00,0x00,0x03,0x03,0x0c,0x0f,0x10,0x1f,0x20,0x3f,0x20,0x38,0x40,0x7b,0x40,0x78, + 0x00,0x00,0xc0,0xc0,0x30,0xf0,0x08,0xf8,0x04,0xfc,0x04,0x3c,0x02,0xde,0x02,0x3e, + 0x00,0x00,0x03,0x03,0x0c,0x0f,0x10,0x1f,0x20,0x3f,0x20,0x3c,0x40,0x7b,0x40,0x7c, + 0x00,0x00,0xc0,0xc0,0x30,0xf0,0x08,0xf8,0x04,0xfc,0x04,0x1c,0x02,0xfe,0x02,0x3e, + 0x00,0x00,0x03,0x03,0x0c,0x0f,0x10,0x1f,0x20,0x3f,0x20,0x3c,0x40,0x7b,0x40,0x79, + 0x00,0x00,0xc0,0xc0,0x30,0xf0,0x08,0xf8,0x04,0xfc,0x04,0x8c,0x02,0xbe,0x02,0x9e, + 0x43,0x7f,0x47,0x7f,0x67,0x7f,0x20,0x3f,0x30,0x3f,0x1c,0x1f,0x0f,0x0f,0x03,0x03, + 0xc2,0xfe,0xe2,0xfe,0xe6,0xfe,0x04,0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0, + 0x00,0x00,0x00,0x03,0x03,0x0c,0x0f,0x10,0x1f,0x20,0x1e,0x21,0x3e,0x41,0x3c,0x43, + 0x00,0x00,0x00,0xc0,0xc0,0x30,0xf0,0x08,0xf8,0x04,0x78,0x84,0x7c,0x82,0x3c,0xc2, + 0x00,0x00,0x00,0x03,0x03,0x0c,0x0f,0x10,0x1f,0x20,0x18,0x27,0x38,0x47,0x3c,0x43, + 0x00,0x00,0x00,0xc0,0xc0,0x30,0xf0,0x08,0xf8,0x04,0x18,0xe4,0x1c,0xe2,0x3c,0xc2, + 0x00,0x00,0x00,0x03,0x03,0x0c,0x0f,0x10,0x1f,0x20,0x1f,0x20,0x3e,0x41,0x38,0x47, + 0x00,0x00,0x00,0xc0,0xc0,0x30,0xf0,0x08,0xf8,0x04,0x98,0x64,0x1c,0xe2,0x1c,0xe2, + 0x00,0x00,0x00,0x03,0x03,0x0c,0x0f,0x10,0x1f,0x20,0x19,0x26,0x38,0x47,0x38,0x47, + 0x00,0x00,0x00,0xc0,0xc0,0x30,0xf0,0x08,0xf8,0x04,0xf8,0x04,0x7c,0x82,0x1c,0xe2, + 0x00,0x00,0x00,0x03,0x03,0x0c,0x0f,0x10,0x1f,0x20,0x1c,0x20,0x3b,0x40,0x38,0x40, + 0x00,0x00,0x00,0xc0,0xc0,0x30,0xf0,0x08,0xf8,0x04,0x38,0x04,0xdc,0x02,0x1c,0x02, + 0x00,0x00,0x00,0x03,0x03,0x0c,0x0f,0x10,0x1f,0x20,0x18,0x20,0x3b,0x40,0x38,0x40, + 0x00,0x00,0x00,0xc0,0xc0,0x30,0xf0,0x08,0xf8,0x04,0x38,0x04,0xdc,0x02,0x3c,0x02, + 0x00,0x00,0x00,0x03,0x03,0x0c,0x0f,0x10,0x1f,0x20,0x1c,0x20,0x3b,0x40,0x3c,0x40, + 0x00,0x00,0x00,0xc0,0xc0,0x30,0xf0,0x08,0xf8,0x04,0x18,0x04,0xfc,0x02,0x3c,0x02, + 0x00,0x00,0x00,0x03,0x03,0x0c,0x0f,0x10,0x1f,0x20,0x1c,0x20,0x3b,0x40,0x39,0x40, + 0x00,0x00,0x00,0xc0,0xc0,0x30,0xf0,0x08,0xf8,0x04,0x88,0x04,0xbc,0x02,0x9c,0x02, + 0x3c,0x43,0x38,0x47,0x18,0x67,0x1f,0x20,0x0f,0x30,0x03,0x1c,0x00,0x0f,0x00,0x03, + 0x3c,0xc2,0x1c,0xe2,0x18,0xe6,0xf8,0x04,0xf0,0x0c,0xc0,0x38,0x00,0xf0,0x00,0xc0, + 0x3c,0x43,0x3e,0x41,0x1e,0x61,0x1f,0x20,0x0f,0x30,0x03,0x1c,0x00,0x0f,0x00,0x03, + 0x3c,0xc2,0x7c,0x82,0x78,0x86,0xf8,0x04,0xf0,0x0c,0xc0,0x38,0x00,0xf0,0x00,0xc0, + 0x38,0x47,0x3e,0x41,0x1f,0x60,0x1f,0x20,0x0f,0x30,0x03,0x1c,0x00,0x0f,0x00,0x03, + 0x1c,0xe2,0x1c,0xe2,0x98,0x66,0xf8,0x04,0xf0,0x0c,0xc0,0x38,0x00,0xf0,0x00,0xc0, + 0x38,0x47,0x38,0x47,0x19,0x66,0x1f,0x20,0x0f,0x30,0x03,0x1c,0x00,0x0f,0x00,0x03, + 0x1c,0xe2,0x7c,0x82,0xf8,0x06,0xf8,0x04,0xf0,0x0c,0xc0,0x38,0x00,0xf0,0x00,0xc0, + 0x3b,0x40,0x3b,0x40,0x1b,0x60,0x1f,0x20,0x0f,0x30,0x03,0x1c,0x00,0x0f,0x00,0x03, + 0xdc,0x02,0xdc,0x02,0xd8,0x06,0xf8,0x04,0xf0,0x0c,0xc0,0x38,0x00,0xf0,0x00,0xc0, + 0x3b,0x40,0x3b,0x40,0x18,0x60,0x1f,0x20,0x0f,0x30,0x03,0x1c,0x00,0x0f,0x00,0x03, + 0xdc,0x02,0xdc,0x02,0x38,0x06,0xf8,0x04,0xf0,0x0c,0xc0,0x38,0x00,0xf0,0x00,0xc0, + 0x3f,0x40,0x3f,0x40,0x18,0x60,0x1f,0x20,0x0f,0x30,0x03,0x1c,0x00,0x0f,0x00,0x03, + 0x3c,0x40,0x3e,0x40,0x19,0x60,0x1f,0x20,0x0f,0x30,0x03,0x1c,0x00,0x0f,0x00,0x03, + 0xbc,0x02,0xbc,0x02,0x88,0x06,0xf8,0x04,0xf0,0x0c,0xc0,0x38,0x00,0xf0,0x00,0xc0 +}; + +const uint8_t normal_buttons[8][4] = { + {0x00,0x01,0x10,0x11},{0x02,0x03,0x12,0x13},{0x04,0x05,0x14,0x15},{0x06,0x07,0x16,0x17}, + {0x08,0x09,0x18,0x19},{0x0a,0x0b,0x1a,0x1b},{0x0c,0x0d,0x1c,0x1b},{0x0e,0x0f,0x1d,0x1e} +}; +const uint8_t pressed_buttons[8][4] = { + {0x1f,0x20,0x2f,0x30},{0x21,0x22,0x31,0x32},{0x23,0x24,0x33,0x34},{0x25,0x26,0x35,0x36}, + {0x27,0x28,0x37,0x38},{0x29,0x2a,0x39,0x3a},{0x2b,0x2c,0x3b,0x3a},{0x2d,0x2e,0x3c,0x3d} +}; +const uint8_t disabled_buttons[8][4] = { + {0x3e,0x3f,0x4e,0x4f},{0x40,0x41,0x50,0x51},{0x42,0x43,0x52,0x53},{0x44,0x45,0x54,0x55}, + {0x46,0x47,0x56,0x57},{0x48,0x49,0x58,0x59},{0x4a,0x4b,0x5a,0x59},{0x4c,0x4d,0x5b,0x5c} +};
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.