Free games for graphing calculators: NumWorks, TI-Nspire CX, Casio fx-CG50 and soon TI-84 Plus CE. Balatro, Celeste, Hollow Knight, Minecraft and more.
C calculatorcalculator-gamescasiochesscrossy-roaddrive-madfx-cg50gamesgeometry-dashgraphing-calculatorndlessnumworksnumworks-appsnumworks-calculatornumworks-gamenumworks-gamestetristi-84-plus-ceti-nspire
Add Core Ball as a standalone NumWorks game
Bobydeluxe23df49a147ab
diff --git a/.github/workflows/coreball.yml b/.github/workflows/coreball.ymlnew file mode 100644index 00000000..280ad8c7--- /dev/null+++ b/.github/workflows/coreball.yml@@ -0,0 +1,56 @@+name: Core Ball++on:+ pull_request:+ paths:+ - 'games/coreball/**'+ - 'games/common/**'+ - 'tools/emu.py'+ - 'Makefile'+ - '.github/workflows/coreball.yml'+ push:+ branches: [main]+ paths:+ - 'games/coreball/**'+ - 'games/common/**'+ - '.github/workflows/coreball.yml'+ workflow_dispatch:++permissions:+ contents: read++jobs:+ game:+ runs-on: ubuntu-24.04+ steps:+ - uses: actions/checkout@v4+ - name: ARM toolchain+ run: |+ v=15.2.1-1.1+ curl -fsSL "https://github.com/xpack-dev-tools/arm-none-eabi-gcc-xpack/releases/download/v$v/xpack-arm-none-eabi-gcc-$v-linux-x64.tar.gz" | tar -xz -C "$RUNNER_TEMP"+ echo "$RUNNER_TEMP/xpack-arm-none-eabi-gcc-$v/bin" >> "$GITHUB_PATH"+ - uses: actions/setup-node@v4+ with:+ node-version: 20+ - uses: actions/setup-python@v5+ with:+ python-version: '3.12'+ - name: Tools+ run: |+ npm install -g [email protected]+ pip install pillow numpy pyelftools unicorn==2.1.4+ - name: Build and test Core Ball+ run: |+ make build/apps/CoreBall.nwa NWLINK=nwlink+ make -C games/coreball check test NWLINK=nwlink+ - name: Compare with the pinned original+ run: |+ mkdir -p build/coreball-reference/js+ curl -fsSL "https://raw.githubusercontent.com/Gr4ys0n/Gr4ys0n.github.io/29006b0f11904704c390b457f7055c9fa1e53484/public/assets/games/core-ball/js/index.js" -o build/coreball-reference/js/index.js+ make -C games/coreball fidelity HOST_CC=cc+ - name: ARM profiles, saves and safe exit+ run: python3 games/coreball/tests/test_arm.py --nwlink nwlink+ - uses: actions/upload-artifact@v4+ with:+ name: CoreBall+ path: build/apps/CoreBall.nwadiff --git a/Makefile b/Makefileindex 2b480adb..723d122d 100644--- a/Makefile+++ b/Makefile@@ -199,6 +199,7 @@ APP_buckshot = games/buckshot/output/buckshot.nwa:BuckshotRoulette.nwaAPP_portal = games/portal/output/portal.nwa:PortalReturns.nwaAPP_chess = games/chess/output/chess.nwa:NumChess.nwaAPP_tetris = games/tetris/tetris/target/thumbv7em-none-eabihf/release/tetris:Tetris.nwa+APP_coreball = games/coreball/output/coreball.nwa:CoreBall.nwa# Tetris on its own, without building every game (tools/build.py --game tetris)tetris-app: | $(B)cd games/tetris/tetris && NWLINK="$(NWLINK)" $(CARGO) build --release --quiet@@ -276,6 +277,17 @@ apps: | $(B)cp $(word 1,$(subst :, ,$(APP_jetpackjoyride))) $(B)/apps/$(word 2,$(subst :, ,$(APP_jetpackjoyride)))arm-none-eabi-strip --strip-unneeded $(B)/apps/Tetris.nwa+# Core Ball is published as its own app.+.PHONY: check-coreball+apps: $(B)/apps/CoreBall.nwa+$(B)/apps/CoreBall.nwa: FORCE | $(B)+ $(MAKE) --no-print-directory -C games/coreball build NWLINK="$(NWLINK)"+ mkdir -p $(B)/apps+ cp games/coreball/output/coreball.nwa $@+check: check-coreball+check-coreball: $(B)/apps/CoreBall.nwa+ $(NWLINK) nwa-bin $< $(B)/apps/CoreBall.bin --ram-length $(UPSILON_RAM)+STD_APPS = $(foreach g,$(STD_GAMES),$(B)/apps/$(NWA_$(g)))apps: $(STD_APPS)$(STD_APPS): $(B)/apps/%.nwa: FORCE | $(B)@@ -318,6 +330,7 @@ emu: $(B)/NumPlay.nwaclean:rm -rf $(B)-$(MAKE) -C games/numdash clean+ -$(MAKE) -C games/coreball clean-$(MAKE) -C games/crossyroad clean-$(MAKE) -C games/numdrive clean-$(MAKE) -C games/balatro cleandiff --git a/README.md b/README.mdindex 5364bc78..2b012c95 100644--- a/README.md+++ b/README.md@@ -255,6 +255,8 @@ Read **[Make your own NumWorks game](docs/make-a-game.md)** to go from there, an## Credits+- **[Bobydeluxe](https://github.com/Bobydeluxe)** made the **[Core Ball](games/coreball/README.md)** NumWorks adaptation: 60 original levels with an English interface. It installs on its own as **CoreBall.nwa**, available from the releases once included. Based on the supplied Core Ball reference; original code and lettering are credited in the game README. Not affiliated with its original creators.+NumPlay is a fan project, made out of love for these games and for the NumWorks calculator. If you enjoy a game here, go play the original and support the people who made it. NumWorks also has a great community of people making games by hand: try [Numcraft](https://github.com/yannis300307/NumcraftRust), [Celeste Classic](https://github.com/BenchatonDev/Celeste-Numworks), [Tatone26's All the Apps](https://github.com/Tatone26/Numworks-games), the apps on [Nwagyu](https://nwagyu.org/guide/) and [yannis300307's list](https://gist.github.com/yannis300307/9123136f90877107ec0d49ba96b303e5).- **[Tatone26](https://github.com/Tatone26/Numworks-games)**'s **All the Apps** inspired NumPlay's list of classics. Flappy Bird, Pac-Man, Snake, Connect Four, Solitaire and 2048 are written in C for NumPlay and keep its options, with no code copied from it. Tetris is Tatone26's own, which they released into the public domain, adapted for NumPlay.diff --git a/games/coreball/.gitignore b/games/coreball/.gitignorenew file mode 100644index 00000000..fd6aad7f--- /dev/null+++ b/games/coreball/.gitignore@@ -0,0 +1,2 @@+output/+__pycache__/diff --git a/games/coreball/Makefile b/games/coreball/Makefilenew file mode 100644index 00000000..7ef0cf7e--- /dev/null+++ b/games/coreball/Makefile@@ -0,0 +1,51 @@+# Core Ball: native standalone arcade adaptation by Bobydeluxe.+.DEFAULT_GOAL := build+CC = arm-none-eabi-gcc+NWLINK ?= npx --yes -- [email protected]+PYTHON ?= python3+HOST_CC ?= cc+ARM_LD ?= arm-none-eabi-ld+OBJCOPY ?= arm-none-eabi-objcopy+SRC = src/main.c src/game.c src/save.c src/render.c src/assets.c+OBJECTS = $(patsubst src/%.c,output/%.o,$(SRC))+HEADERS = $(wildcard src/*.h) ../common/epsilon_app.h ../common/epsilon_files.h+PACKER = tools/compact_nwa.py tools/standalone.ld+ASSET_FILES = $(wildcard assets/*.png assets/*.json)+src/assets.c: tools/assets.py $(ASSET_FILES)+ $(PYTHON) tools/assets.py+CFLAGS = -std=c11 $(shell $(NWLINK) eadk-cflags-device) -Os -Wall -Wextra -Werror+CFLAGS += -ffunction-sections -fdata-sections -fstack-usage -fno-tree-loop-distribute-patterns+CFLAGS += -flto -fno-fat-lto-objects -fvisibility=internal+LINK = -nostartfiles --specs=nano.specs -Wl,--relocatable,--gc-sections,-e,main -flinker-output=nolto-rel+.PHONY: build check test test-arm fidelity assets clean+build: output/coreball.nwa+output:+ mkdir -p $@+output/%.o: src/%.c $(HEADERS) | output+ $(CC) $(CFLAGS) -c $< -o $@+output/icon.o: src/icon.png | output+ $(NWLINK) png-icon-o $< $@+output/icon-compact.o: output/icon.o $(PACKER)+ $(PYTHON) tools/compact_nwa.py icon $< $@ --objcopy $(OBJCOPY)+output/coreball-debug.nwa: $(OBJECTS) output/icon-compact.o $(PACKER)+ $(CC) $(CFLAGS) $(LINK) -Wl,-u,eadk_app_name,-u,eadk_app_icon,-u,eadk_api_level $(OBJECTS) output/icon-compact.o -lm -o output/standalone.o+ $(PYTHON) tools/compact_nwa.py app output/standalone.o $@ --ld $(ARM_LD)+output/coreball.nwa: output/coreball-debug.nwa $(PACKER)+ $(PYTHON) tools/compact_nwa.py release $< $@ --objcopy $(OBJCOPY)+check: build+ $(NWLINK) nwa-bin output/coreball.nwa output/coreball.bin --ram-length 107674+ $(NWLINK) nwa-bin output/coreball-debug.nwa output/coreball-debug.bin --ram-length 107674+ $(PYTHON) -c "from pathlib import Path; assert Path('output/coreball.bin').read_bytes() == Path('output/coreball-debug.bin').read_bytes()"+test: | output+ $(HOST_CC) -std=c11 -O2 -Wall -Wextra -Werror -Isrc tests/test.c src/game.c src/save.c src/render.c src/assets.c -lm -o output/test+ cd output && ./test+test-arm:+ $(PYTHON) tests/test_arm.py --nwlink "$(NWLINK)"+fidelity: | output+ node tests/reference.cjs $(REFERENCE_JS)+ $(HOST_CC) -std=c11 -O2 -Wall -Wextra -Werror -Isrc tests/fidelity.c src/game.c src/assets.c -lm -o output/fidelity+ cd output && ./fidelity+assets:+ $(PYTHON) tools/assets.py+clean:+ rm -rf outputdiff --git a/games/coreball/README.md b/games/coreball/README.mdnew file mode 100644index 00000000..183de324--- /dev/null+++ b/games/coreball/README.md@@ -0,0 +1,37 @@+# Core Ball++Native NumWorks adaptation **By Bobydeluxe**, based on the [Core Ball version supplied for this port](https://github.com/Gr4ys0n/Gr4ys0n.github.io/tree/29006b0f11904704c390b457f7055c9fa1e53484/public/assets/games/core-ball).++The standalone application has the original **60 levels**, pin layouts, shot counts and rotation behaviours. Timing reversals, alternating speeds and the last levels' reversal on every shot are retained. Reached levels can be replayed from the level selector. Completing level 60 ends the campaign; it never creates level 61.++| Key | Action |+| --- | --- |+| Press OK, EXE or Shift | Shoot one pin |+| Back during a game | Pause |+| Arrows and OK | Menus and level selection |+| Home or Power | Save and exit |++The original grey title screen, Poiret One title, black playfield, white core and numbered pins are retained. Interface text uses antialiased Segoe UI glyphs rasterized separately at their actual 13/22/32-pixel sizes; headings are never enlarged from small bitmaps. The title and GO artwork also retain four-bit edge coverage. Menus use physical-key navigation and the 320 × 240 layout. Simulation runs at 60 Hz and display updates target 30 Hz, using the same timing on every model. Holding the shoot key does not repeatedly fire.++## Calculator adaptation++The world is scaled from the reference's 560-pixel height. Collision rounding is performed at that reference scale: rounding up the already reduced pin radii would close valid gaps in the last levels. Shots take 50 ms. Failure and completion retain the red/green transition and one-second delay. Rotation state resets for each attempt, so time spent paused or in a menu cannot unexpectedly change it. The original browser's persistent body-click listeners are replaced by game input; menus do not reverse a later level's rotation.++The release file is **35,692 bytes**, including the sharper native-size lettering and antialiased title masks. Lettering uses compact four-bit coverage masks, and level parameters occupy 180 bytes. Static RAM remains **5,557 bytes**. The display uses a single **5,120-byte strip**, without a full-screen framebuffer or heap allocation. Off-screen victory spokes are clipped before drawing to keep animation work bounded. Progress uses a versioned, checked 24-byte `coreball.sav` file. Storage-full handling offers retry, continued play or exit without overwriting other files.++## Build and validation++Requires Python with Pillow, Node.js, `[email protected]` and ARM embedded GCC. Included PNG/JSON assets and generated C data are sufficient; building does not download the browser game.++```sh+python build.py --arm-bin /path/to/arm/bin --nwlink /path/to/nwlink/bin/nwlink+make test HOST_CC=cc+make test-arm NWLINK=nwlink+make fidelity HOST_CC=cc REFERENCE_JS=/path/to/pinned/core-ball/js/index.js+```++The build produces `output/coreball.nwa` and copies it to the repository's `build/apps/CoreBall.nwa`. Run the host tests before ARM tests to generate fixtures. ARM tests require NumPlay's emulator dependencies: Unicorn, pyelftools and Pillow. The fidelity test executes the original JavaScript's actual level/motion functions and checks its SHA-256 before comparing 66,000 samples. See [VALIDATION.md](VALIDATION.md).++The adaptation is local and independent of the NumPlay launcher. The original artwork, lettering and game data retain their original rights; the port does not relicense them. Poiret One is the reference's embedded title font. UI font masks are pre-baked in `assets/ui-fonts.json`; an installed font is not needed to build. `tools/import_fonts.py` can regenerate those masks from supplied regular/bold TTF files. Source revision and digest are recorded in `assets/provenance.json`. NumPlay's common app/file helpers and compact packaging tools retain their existing notices.++This fan adaptation is not affiliated with the original Core Ball creators. UI masks are rasterized from Microsoft Segoe UI; no TTF files are distributed. Borrowed artwork and lettering retain their original rights.diff --git a/games/coreball/VALIDATION.md b/games/coreball/VALIDATION.mdnew file mode 100644index 00000000..5ca95318--- /dev/null+++ b/games/coreball/VALIDATION.md@@ -0,0 +1,27 @@+# Validation — Core Ball++Validated on 21 October 2026 with GCC 15.2.1 (ARM), GCC 16.2 (host), nwlink 1.0.0 and NumPlay's Unicorn-based ARM emulator. The reference is pinned in `assets/provenance.json`.++| Check | Result |+| --- | --- |+| Original campaign | All 60 levels completed by a timing-only solver, 36,964 simulated frames; at most four attempts per level |+| Actual original JavaScript | 66,000 motion samples; worst angular error 0.00632 degrees |+| Rotation soak | 4,320,000 frames across the twelve used motion behaviours; bounded finite angles |+| Save data | Round-trip, null/truncated data rejection, every-byte corruption rejection, final 60/60 progress |+| Actual ARM app | N0110, N0115, N0120 Epsilon memory profiles and the smaller Upsilon profile pass |+| Pause | Game state remains byte-for-byte unchanged until resume |+| Exit | Back/Home/Power handling, held launch keys, execution lock release, clean app RAM and unchanged firmware RAM |+| Filesystem | Existing files retained; checked save reload; full storage supports continued play and exit |+| Ending | Last level unlocks 60/60, saves it and replays level 60; no level 61 |+| Rendering | All 60 level layouts and the dense victory scatter render safely; maximum observed ARM render time 7 ms |+| Release packing | Installed release/debug bytes are identical at the 107,674-byte RAM budget |++Text is now rasterized at its real 13/22/32-pixel sizes with four-bit antialias coverage. Menus, help, counters and the antialiased title/GO masks were inspected at the native 320 × 240 size. No heading is enlarged from a small bitmap. Physics and the existing save format are unchanged.++Release: **35,692 bytes**; installed image: **30,653 bytes**; static app RAM (`.data` + `.bss`): **5,557 bytes**; deepest measured stack: **388 bytes**. No heap is used. The icon is kept in flash and is not counted as static RAM.++SHA-256: `43c1b6d9be3c1d554193d9465cb5c1faa60406498092830b17cb7b371ab359f4`.++Machine-readable results are retained in [docs/validation.json](docs/validation.json). Screenshots in `docs/` come from the tested host renderer or actual ARM app. ARM timings are emulator measurements, not hardware benchmarks; physical LCD transfer and firmware timing can differ. N0115 testing uses its memory budget with the emulator's compatible N0110 processor profile. Hardware playtesting remains the final check for perceived input and display smoothness.++The published artifact is built against the upstream common safety helpers at `979c19e828fee928d2d9b2843f8a2f6f2fea500e`.diff --git a/games/coreball/assets/go.png b/games/coreball/assets/go.pngnew file mode 100644index 00000000..376dc7f3Binary files /dev/null and b/games/coreball/assets/go.png differdiff --git a/games/coreball/assets/levels.json b/games/coreball/assets/levels.jsonnew file mode 100644index 00000000..41fdf587--- /dev/null+++ b/games/coreball/assets/levels.json@@ -0,0 +1,302 @@+{+ "1": [+ "4",+ 8,+ "A1"+ ],+ "2": [+ "6",+ 10,+ "A1"+ ],+ "3": [+ "2",+ 20,+ "A1"+ ],+ "4": [+ "8",+ 12,+ "A2"+ ],+ "5": [+ "12",+ 8,+ "A1"+ ],+ "6": [+ "10",+ 10,+ "A2"+ ],+ "7": [+ "12",+ 12,+ "A1"+ ],+ "8": [+ "16",+ 3,+ "A2"+ ],+ "9": [+ "0",+ 26,+ "A2"+ ],+ "10": [+ "16",+ 10,+ "A1"+ ],+ "11": [+ "10",+ 8,+ "B1"+ ],+ "12": [+ "6",+ 12,+ "B2"+ ],+ "13": [+ "12",+ 4,+ "B1"+ ],+ "14": [+ "8",+ 14,+ "B2"+ ],+ "15": [+ "8",+ 6,+ "B1"+ ],+ "16": [+ "5",+ 10,+ "B2"+ ],+ "17": [+ "6",+ 12,+ "B1"+ ],+ "18": [+ "8",+ 14,+ "B2"+ ],+ "19": [+ "0",+ 23,+ "B1"+ ],+ "20": [+ "10",+ 13,+ "B2"+ ],+ "21": [+ "4",+ 12,+ "C1"+ ],+ "22": [+ "6",+ 10,+ "C1"+ ],+ "23": [+ "8",+ 12,+ "C1"+ ],+ "24": [+ "7",+ 14,+ "C1"+ ],+ "25": [+ "2",+ 18,+ "C1"+ ],+ "26": [+ "4",+ 18,+ "C1"+ ],+ "27": [+ "0",+ 24,+ "C1"+ ],+ "28": [+ "4",+ 10,+ "C2"+ ],+ "29": [+ "6",+ 13,+ "C2"+ ],+ "30": [+ "4",+ 20,+ "C1"+ ],+ "31": [+ "6",+ 8,+ "D1"+ ],+ "32": [+ "2",+ 12,+ "D2"+ ],+ "33": [+ "3",+ 14,+ "D2"+ ],+ "34": [+ "3",+ 18,+ "D1"+ ],+ "35": [+ "8",+ 12,+ "D1"+ ],+ "36": [+ "7",+ 15,+ "D2"+ ],+ "37": [+ "16",+ 8,+ "D2"+ ],+ "38": [+ "0",+ 23,+ "D1"+ ],+ "39": [+ "12",+ 12,+ "D1"+ ],+ "40": [+ "12",+ 15,+ "D2"+ ],+ "41": [+ "5",+ 10,+ "E1"+ ],+ "42": [+ "6",+ 12,+ "E1"+ ],+ "43": [+ "3",+ 15,+ "E1"+ ],+ "44": [+ "3",+ 19,+ "E1"+ ],+ "45": [+ "0",+ 24,+ "E1"+ ],+ "46": [+ "2",+ 15,+ "E2"+ ],+ "47": [+ "4",+ 16,+ "E2"+ ],+ "48": [+ "12",+ 8,+ "E2"+ ],+ "49": [+ "3",+ 20,+ "E2"+ ],+ "50": [+ "16",+ 14,+ "E2"+ ],+ "51": [+ "4",+ 6,+ "D3"+ ],+ "52": [+ "4",+ 12,+ "D4"+ ],+ "53": [+ "6",+ 13,+ "D3"+ ],+ "54": [+ "0",+ 24,+ "D4"+ ],+ "55": [+ "4",+ 21,+ "D3"+ ],+ "56": [+ "16",+ 16,+ "A1"+ ],+ "57": [+ "4",+ 24,+ "C1"+ ],+ "58": [+ "4",+ 26,+ "D1"+ ],+ "59": [+ "4",+ 25,+ "E2"+ ],+ "60": [+ "13",+ 19,+ "E2"+ ]+}diff --git a/games/coreball/assets/provenance.json b/games/coreball/assets/provenance.jsonnew file mode 100644index 00000000..42236a6b--- /dev/null+++ b/games/coreball/assets/provenance.json@@ -0,0 +1,6 @@+{+ "repository": "https://github.com/Gr4ys0n/Gr4ys0n.github.io",+ "path": "public/assets/games/core-ball",+ "commit": "29006b0f11904704c390b457f7055c9fa1e53484",+ "javascript_sha256": "fd9c4ded61a00aa100630e4dc47698bd5e8015fab24068629d369ad5b87ae266"+}diff --git a/games/coreball/assets/title.png b/games/coreball/assets/title.pngnew file mode 100644index 00000000..ba91658dBinary files /dev/null and b/games/coreball/assets/title.png differdiff --git a/games/coreball/assets/ui-fonts.json b/games/coreball/assets/ui-fonts.jsonnew file mode 100644index 00000000..93bf8cb4--- /dev/null+++ b/games/coreball/assets/ui-fonts.json@@ -0,0 +1 @@+[{"size":13,"source":"segoeui.ttf","glyphs":[[0,0,0,0,0,5],[0,2,9,1,0,5],[9,4,3,1,0,6],[15,8,8,0,0,9],[47,6,11,1,-1,8],[80,11,9,0,0,12],[130,11,9,0,0,11],[180,1,3,1,0,4],[182,4,11,0,0,5],[204,4,11,0,0,5],[226,5,4,0,0,6],[236,7,7,1,1,10],[261,2,3,0,8,4],[264,5,1,0,4,6],[267,3,2,0,7,4],[270,7,11,-1,0,6],[309,7,9,0,0,8],[341,4,9,1,0,8],[359,7,9,0,0,8],[391,7,9,0,0,8],[423,7,9,0,0,8],[455,6,9,1,0,8],[482,7,9,0,0,8],[514,7,9,0,0,8],[546,7,9,0,0,8],[578,7,9,0,0,8],[610,3,7,0,2,4],[621,3,9,0,2,4],[635,7,6,1,2,10],[656,7,4,1,3,10],[670,7,6,1,2,10],[691,6,9,0,0,7],[718,11,10,1,0,13],[773,9,9,0,0,9],[814,6,9,1,0,8],[841,8,9,0,0,9],[877,8,9,1,0,10],[913,6,9,1,0,8],[940,5,9,1,0,7],[963,8,9,0,0,10],[999,8,9,1,0,10],[1035,2,9,1,0,4],[1044,4,9,0,0,6],[1062,7,9,1,0,9],[1094,5,9,1,0,7],[1117,10,9,1,0,13],[1162,8,9,1,0,11],[1198,10,9,0,0,11],[1243,6,9,1,0,8],[1270,10,10,0,0,11],[1320,7,9,1,0,9],[1352,7,9,0,0,8],[1384,7,9,0,0,8],[1416,7,9,1,0,10],[1448,8,9,0,0,9],[1484,12,9,0,0,13],[1538,8,9,0,0,9],[1574,8,9,0,0,8],[1610,8,9,0,0,8],[1646,3,11,1,0,5],[1663,7,11,-1,0,6],[1702,3,11,0,0,5],[1719,7,5,1,0,10],[1737,6,1,0,10,6],[1740,3,2,0,-1,4],[1743,6,7,0,2,8],[1764,7,10,1,-1,9],[1799,6,7,0,2,7],[1820,7,10,0,-1,9],[1855,7,7,0,2,8],[1880,5,10,0,-1,5],[1905,7,10,0,2,9],[1940,6,10,1,-1,8],[1970,3,10,0,-1,4],[1985,5,13,-2,-1,4],[2018,6,10,1,-1,7],[2048,2,10,1,-1,4],[2058,10,7,1,2,12],[2093,6,7,1,2,8],[2114,7,7,0,2,9],[2139,7,10,1,2,9],[2174,7,10,0,2,9],[2209,4,7,1,2,6],[2223,5,7,0,2,7],[2241,5,9,0,0,5],[2264,7,7,0,2,8],[2289,7,7,0,2,7],[2314,10,7,0,2,10],[2349,6,7,0,2,7],[2370,7,10,0,2,7],[2405,6,7,0,2,7],[2426,4,11,0,0,5],[2448,2,13,1,-1,4],[2461,4,11,0,0,5],[2483,7,2,1,4,10]],"pixels":"b5a5a5a5949400a5a5e0d1e0d1e0d1001b0a2000570c004ffffff500a2470000c07400bfffffd00480c0000842a00000a0002bfe60b8a370e3a000abb00008e81000aac000a0e292a5e18efc3000a00009ec20095004b17904a0007602a0c10005a1788600000aeb4b4de600000b2d32d0000771c00b2002b00d32d000b2005ed500006de90000001e31c5000001e00b30c30008cc500c2004c7bb11d001e2008c78003d0000be1001e6115de51003ceea33de20eee0008702c009500d100d001c001d000d10095002c0008687000c20068002c000e000d100e002c006800c20770000a205ab7b04b9109182000d000000d000000d0008fffff7000d000000d000000d00002c67921fff602d02d000001d000006800000c200003c000009600001d100006900000c300003c000009600001d10000002bfd300c717e03d000d46a000a679000976a000a53d000d30d717c002cfb20015a97989007900790079007900790079007906deb2009218b000002e000005b00003d20006c20008900002d000004fffff5007dea100821b8000006a00002c4005ff90000029b000001f037118b01beea1000001e600008e60003ca6001c396009709607a00960efffff80000960000096008fffb0960000a40000bfea200029c00000f10001f1921ab0aee910006dfc005c30000d300002d9ed604f714e34e000a62e000a60b814e101bfc4006fffff600002d10000a600002d000009700001e100005b00000a600000d3000002bec300c717d00f100f10a716b003eff302e414d26b000b63e414e305ded50003cec201d517c05b000d35b000c52e516f504dfac400001e10002b700bed70002d02d00000000002d02d002d02d00000000000002c0670920000002930018c4007c60002ba3000003ab4000003a38fffff7000000000000008fffff7491000005c71000006c600003ba104ba30049200001aee702713e20001d1001b4000b40000e00000000000c30000c300003aefd920006d51138d303d13ceb64c0a50d41c40b3d04a0093085d05800c20a3b33c15d44c05b09ea4ec3009c41000000005befeb0000009e0000000eb5000005b6b00000b61f20002f10b70008b006d000dfffff404e1000aa0a800003f10cffd70c403e3c400c4c405c0cfff70c402b8c4005bc402b8cffe80003aeea104e721650d5000004e0000006b0000005d0000001f40000007e61165005cfd91cffec600c4025da0c40002e3c40000b7c40000a7c40000c6c40003e1c4026e60cffea300cfffc0c40000c40000c40000cfff80c40000c40000c40000cffff0cfffcc4000c4000c4000cfff8c4000c4000c4000c40000003aefd704e721490d5000004d0000006b001fff5d00001f1e40001f07e6114f005ceec6c40000f0c40000f0c40000f0c40000f0cffffff0c40000f0c40000f0c40000f0c40000f0c4c4c4c4c4c4c4c4c400880088008800880088008800a602e2cd60c4008b0c406c10c44d200c6d2000cd90000c5d6000c42e500c404e30c4006e20c4000c4000c4000c4000c4000c4000c4000c4000cfffe0cc000002f7ce400008e7c9b0001da7c4d3007997c37900d297c31e15a097c3087c3097c302ec0097c300a50097cd100088cd800088c5e30088c46c0088c40b7088c402e288c4006c88c4000bd8c40002e8005ceeb40006e6116e401e400006d04d000001f26b000000e35d000001f11f400006c007e5127e40005cfeb300cffd80c403d6c4006bc4007ac404d4cffc50c40000c40000c40000005ceeb40006e6116e401e400006d04d000001f26b000000e35d000001f11f400006c007e5127e30005cfeec1000000019e5cffe900c402c70c400790c403d50cffe400c41b800c401e30c4006c0c4000c6003bee701e512902e000000cb2000018e9100001ac000000e337204e21aeec400bfffff9002e000002e000002e000002e000002e000002e000002e000002e0000e20003de20003de20003de20003de20003de30004cc50006a6d313d507dec600b700006b5c0000b60e3002e1098007a004d00c4000d33d0000898800002dd200000cb000a70007c0005d6b000ce200981f101ea600d40c505a6a02e00890a52e06a003d0e10d3a6000e6c0087e20009d7004dd00005f3000e8004e1002e20a900b7001e35c00006bd300000eb000007ad40003e25d000c600b807c0002e3a80004d02e100b500a703d0003e1b50000a9d000003f5000000e2000000e2000000e20005fffffe100000c40000089000003d100001d30000098000004c000001d300000affffff0bf9b30b30b30b30b30b30b30b30b30bf901d10000096000003c000000c20000068000001d000000a5000004b000000d20000077000002d00afa04a04a04a04a04a04a04a04a04aafa0002c00000ab60003b1c100b306904a000c30fffff62c104906deb10831b800006a05adfb4d426b5c22bb1bec7be100000e100000e100000e4cea10eb21a90e3002e0e1001f0e3004d0ea12c70e6ee80001aee50b91363d00005b00004d00000d813602bed400000790000079000007902bec890c713e93d000895b000794c000991e614d904cea7902bec300c715d03d000d35fffff44c000000d6100003cee90001be407a0008700afff008700087000870008700087000870002cfc890c813e93d000895b000794c000991e614d904cea8900000a700016e10beec30e10000e10000e10000e5de90ea13e4e300a6e10097e10097e10097e100970c20000000e10e10e10e10e10e10e1000c20000000000000e1000e1000e1000e1000e1000e1000e1001f0007b03ec200e10000e10000e10000e109b0e16c10e6d200ee7000e4e400e15e30e107d2e1e1e1e1e1e1e1e1e1e1e5de54de70e915eb13f1e300e400c4e100d300b4e100d300b4e100d300b4e100d300b4e5de80ea13e3e300a6e10097e10097e10097e1009702aed800c812c83d0003d5b0001f4d0003d0d812c702bed700e4cea10eb21a90e3002e0e1001f0e3004d0ea12c70e6de800e100000e100000e10000002bec890d713e93d000895b000794c000991e614d904cea79000007900000790000079e6e6ea10e300e200e100e100e10007ee83d1003e30006db20007c0005d4efc400760009700bfff1097000970009700097000890003de101e000b51e000b51e000b51e000b50f000d50d716e504de8b50b6002e06b007901e10c400a52d0005a770000eb200009b0000b600c600e26901ea02c02d068d06800d2a3b3a40096c077d0005c903cb0001f500e7007b00970c43d004cb4000cc0003cc300d44c08a00b7b6001e15b006a01e10b500a61d0004a680000db300008c000009700004e1000ad400006ffff70004c0001d2000a70005b0001d2000affff801b705b0068006800a606d100a600680068005b001b7e0e0e0e0e0e0e0e0e0e0e0e0e08b001b4008500850069001d50790085008500b408b002de82779629ec1"},{"size":22,"source":"segoeuib.ttf","glyphs":[[0,0,0,0,0,6],[0,5,16,1,0,7],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[40,12,10,2,5,16],[1132,10,16,0,0,10],[100,7,2,1,9,9],[107,4,4,1,12,6],[115,11,18,-1,0,10],[214,12,16,0,0,13],[310,7,16,2,0,13],[366,12,16,0,0,13],[462,11,16,1,0,13],[550,13,16,0,0,13],[654,11,16,1,0,13],[742,11,16,1,0,13],[830,11,16,1,0,13],[918,12,16,0,0,13],[1014,12,16,0,0,13],[1110,4,11,1,5,6],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1212,16,16,0,0,15],[1340,13,16,1,0,14],[1444,13,16,0,0,14],[1548,15,16,1,0,16],[1668,10,16,1,0,12],[1748,10,16,1,0,11],[1828,15,16,0,0,16],[1948,15,16,1,0,17],[2068,5,16,1,0,7],[2108,9,16,0,0,10],[2180,14,16,1,0,14],[2292,10,16,1,0,11],[2372,19,16,1,0,21],[2524,15,16,1,0,17],[2644,16,16,0,0,17],[2772,12,16,1,0,14],[2868,18,18,0,0,17],[3030,14,16,1,0,14],[3142,11,16,1,0,12],[3230,13,16,0,0,13],[3334,14,16,1,0,16],[3446,15,16,0,0,15],[3566,22,16,0,0,22],[3742,15,16,0,0,14],[3862,14,16,0,0,13],[3974,13,16,0,0,13],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10]],"pixels":"3fff52fff51fff41fff30fff30fff20eff10eff10dff00cff0000000000009eb14fff74fff709eb100004fd0000000004fd0000000004fd0000000004fd000007ffffffffff07ffffffffff000004fd0000000004fd0000000004fd0000000004fd000007fffff67fffff65ed4effdeffd5ed400000004ffc0000000aff60000002ffe10000008ff80000000eff20000005ffb0000000bff40000002ffd00000009ff70000001eff10000006ff90000000cff30000004ffc0000000aff60000001ffe00000007ff80000000dff20000005ffb000000000029dfd9200004efffffe3001efffffffc007fff519fff40cffa001eff81fff6000bffb3fff40009ffd3fff30008ffd4fff30008ffd3fff40009ffc2fff6000bffa0eff9001eff70afff419fff203ffffffffa0007ffffffc100005befd81000004cfe16bfffebfffffebffeffeab57ffe0007ffe0007ffe0007ffe0007ffe0007ffe0007ffe0007ffe0007ffe0007ffe0007ffe0007ffe0039defd920005fffffffe2005ffffffffb005a4203cfff100000005fff200000006fff10000001dffb0000001bfff3000003dfff6000005effe5000005fffc2000002eff90000000affc00000000efffffffff21ffffffffff22ffffffffff205bdfec60002fffffffb002ffffffff602a4116fff90000000eff70000028fff2003fffffe50003ffffe600003ffffffc20000027fffa00000008ffe00000008fff1973115effd0bffffffff70bfffffffa0039defda40000000003fff400000000bfff400000004ffff40000000dffff40000008ffeff4000003ff9dff400001dfe1dff40000aff50dff40007ff900dff4004ffc100dff4009fffffffffff19fffffffffff19fffffffffff10000000dff4000000000dff4000000000dff4000afffffff800bfffffff800cfffffff800dfe00000000efc00000000ffb00000001fffffd81002fffffffe203ffffffffb0121015efff10000005fff30000006fff2683115effd07ffffffff607fffffff80029defda400000017ceed80003dfffffc002effffffc00bfff8213602fff70000007ffd0000000bff94cee910dffafffffd1efffffffff7dffe413dffccff90007ffd9ffa0007ffd5fff514eff90cffffffff202effffff500019dfea300ffffffffffbffffffffffbffffffffff80000002ffe1000000aff80000003ffe1000000bff80000003fff2000000affa0000001fff50000006ffe1000000bffa0000001fff60000005fff20000008ffe0000000bffc000000004befd9200007fffffff4003ffffffffe008ffe416fff408ff9000cff404ffc002efe1009ffdaefe400009fffff300009fffffff5008ffc204eff30eff30008ff92fff30008ffb1fffb214effa0afffffffff401cfffffff800006cefda4000004befd7000007ffffffc1004ffffffff900bffd31afff10fff5001eff52fff3000cff82fff5000dff90effd318fffa08fffffffff901dffffdcff70019eeb2dff500000005ffe10372016eff9004fffffffe1004ffffffd300029deec810005ed4effdeffd5ed40000000000005ed4effdeffd5ed416bdfda4005fffffff605fffffffe05a411afff2000003fff2000008ffc000006fff300007ffe400002ffe2000006ff70000005ff700000000000000001be90000008fff4000008fff4000001be90000000007fffe10000000000cffff50000000002fffffa0000000008ffafff100000000dff4eff600000003ffe0affb00000008ffb06fff1000000eff601fff6000004fff200cffb000009ffd0008fff10000effffffffff60005fffffffffffc000affffffffffff201effc000006fff706fff6000001effc0bfff1000000afff24ffffffec71004fffffffffd104ffffffffff804fff4017fffa04fff4000fff804fff4018ffe104ffffffffb2004ffffffffa4004ffffffffff604fff4014effe14fff40006fff34fff40007fff44fff4015efff24ffffffffffb04fffffffffd104ffffffec7100000005adefdb60002cfffffffc002effffffffc00cfffc51126a06fffa00000000cffe100000001fffa000000002fff7000000003fff7000000002fff9000000000effe100000000afff9000000003ffffb41137a007fffffffffc0007ffffffffc000028cefeda44ffffffec9300004ffffffffffa1004fffffffffffc004fff40139ffff704fff400005fffe04fff400000bfff34fff4000006fff54fff4000004fff64fff4000004fff54fff4000006fff44fff400000cfff14fff400007fffa04fff40139ffff304fffffffffff6004fffffffffe50004ffffffeb7100004ffffffffa4ffffffffa4ffffffffa4fff4000004fff4000004fff4000004ffffffff44ffffffff44ffffffff44fff4000004fff4000004fff4000004fff4000004fffffffff4fffffffff4fffffffff4ffffffffa4ffffffffa4ffffffffa4fff4000004fff4000004fff4000004fff4000004ffffffff44ffffffff44ffffffff44fff4000004fff4000004fff4000004fff4000004fff4000004fff4000000000049cefec9400001bffffffffa0002dfffffffffa000cfffc5102489006fffb0000000000cffe10000000001fffa00000000002fff7002ffffff63fff7002ffffff62fff9002ffffff60effd000001fff609fff800001fff602ffffa3114fff6006fffffffffff60006efffffffff5000017beffdb7204fff4000006fff14fff4000006fff14fff4000006fff14fff4000006fff14fff4000006fff14fff4000006fff14fffffffffffff14fffffffffffff14fffffffffffff14fff4000006fff14fff4000006fff14fff4000006fff14fff4000006fff14fff4000006fff14fff4000006fff14fff4000006fff14fff44fff44fff44fff44fff44fff44fff44fff44fff44fff44fff44fff44fff44fff44fff44fff400004fff300004fff300004fff300004fff300004fff300004fff300004fff300004fff300004fff300004fff300006fff200009fff07316fffb0affffff40afffff8006dfeb50004fff40005fffb04fff4001effe204fff4009fff5004fff404fffa0004fff41dffd10004fff48fff400004fff6fff8000004fffdffe0000004fffcfff5000004fff5effe200004fff45fffb00004fff40bfff60004fff402effe2004fff4006fffc004fff4000cfff804fff40002ffff34fff4000004fff4000004fff4000004fff4000004fff4000004fff4000004fff4000004fff4000004fff4000004fff4000004fff4000004fff4000004fff4000004ffffffffe4ffffffffe4ffffffffe4ffffe1000000cffff54fffff5000002fffff54fffffa000007fffff54ffdffe10000cfdfff54ffcdff50002ffafff54ffd9ffa0007ff6fff54ffd4ffe100cfe2fff54ffd0dff502ffa2fff54ffd08ffa07ff52fff54ffd03ffe0cfe12fff54ffd00dff5ffa02fff54ffd008ffcff502fff54ffd003ffffe102fff54ffd000dfffa002fff54ffd0008fff5002fff54ffd0003ffe1002fff54fffc000000aff94ffff700000aff94ffffe20000aff94fffffa0000aff94fffeff5000aff94fff8ffd100aff94fff1dff900aff94fff04fff30aff94fff009ffc0aff94fff001eff7aff94fff0005ffebff94fff0000bfffff94fff00002effff94fff000007ffff94fff000000cfff94fff0000003fff9000017befeb600000004efffffffd300004ffffffffffe2001efff8203afffc007fff700000bfff40dffd0000003fff91fff90000000effc2fff70000000cffd3fff70000000cffd2fff90000000effb0effd0000003fff809fff600000bfff302ffff8203afffb0006ffffffffffd100006efffffffc200000018cefda500004ffffffeb5004fffffffffa04ffffffffff64fff4029fffc4fff4000cffe4fff4000afff4fff4000cffd4fff4029fff94fffffffffe24ffffffffe404fffffec82004fff400000004fff400000004fff400000004fff400000004fff40000000000017befeb60000000004efffffffd30000004ffffffffffe200001efff8203afffc00007fff700000bfff4000dffd0000003fff9001fff90000000effc002fff70000000cffd003fff70000000cffd001fff90000000effb000effd0000002fff80009fff700000afff30002ffff8203afffb000006ffffffffffd10000006effffffffd1000000018cefedfffd10000000000001cfffc10000000000001dfffc14ffffffeb600004fffffffffc1004ffffffffff7004fff4017fffc004fff4000dffd004fff4000effb004fff402afff5004fffffffffa0004fffffffd600004fffffffe400004fff41bfff30004fff401effd0004fff4006fff7004fff4000cfff204fff40003fffb04fff400009fff6004adffeb600afffffffd07ffffffffd0dffe51026a0fffb0000000dfff60000008ffffc500001bfffffd400008efffff6000017effff2000001bfff78000002fff8ec51029fff6effffffffe1effffffff5039cefdc8200afffffffffff9afffffffffff9afffffffffff900004fff3000000004fff3000000004fff3000000004fff3000000004fff3000000004fff3000000004fff3000000004fff3000000004fff3000000004fff3000000004fff3000000004fff3000000004fff300006fff100002fff56fff100002fff56fff100002fff56fff100002fff56fff100002fff56fff100002fff56fff100002fff56fff100002fff56fff100002fff56fff100003fff45fff300004fff32fff800009fff00dfff6117fffb006ffffffffff30009ffffffff6000004adfed92000bffe0000003fff66fff4000007fff21fff800000bffb00bffd00001fff6006fff20005fff2001fff60009ffb0000bffb000eff600007fff103fff200002fff407ffc000000cff90cff70000007ffd1fff20000002fff7ffc00000000cffdff7000000007fffff2000000002ffffc0000000000cfff700000afff100009fff50000affc7fff40000dfff90000dff83fff70002ffffd0001fff40effa0006fffff1004fff10affe000affcff5007ffc006fff200efe9ff800aff8003fff503ffa6ffc00dff4000eff807ff62fff01fff1000affb0bff20dff44ffb00006ffe0efe009ff77ff700002fff5ffa006ffbaff400000effaff6002ffdcfe000000affeff2000dffefb0000006ffffd00009ffff70000002ffff900006ffff30000000dfff600002fffe00004fffe00000dffd10afff60007fff5002fffd001effb00008fff507fff300001effc1eff90000007fff8ffe10000000dfffff6000000005ffffd0000000005ffffd100000001dfffff800000009ffe8fff2000003fff81effa00000cffe108fff40006fff7001effd001effe10008fff70afff700001effe1cfff300008fff24fff90000effa00cffe1005fff2005fff600cffa0000dffc03fff300006fff49ffa000000eff9eff30000007fffffb00000001effff4000000008fffb0000000002fff60000000002fff50000000002fff50000000002fff50000000002fff50000000002fff5000000fffffffffffc0fffffffffffc0fffffffffff800000001effc00000000bffe200000007fff600000003fffa00000001dffe10000000afff400000006fff900000002effd10000000cfff300000009fff700000004fffffffffffd8fffffffffffd8fffffffffffd"},{"size":32,"source":"segoeuib.ttf","glyphs":[[0,0,0,0,0,9],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[0,17,23,1,0,18],[196,10,23,3,0,18],[311,16,23,1,0,18],[495,16,23,1,0,18],[679,18,23,0,0,18],[886,15,23,2,0,18],[1059,17,23,1,0,18],[1255,17,23,1,0,18],[1451,17,23,1,0,18],[1647,16,23,1,0,18],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14]],"pixels":"000017bdfeb6100000005efffffffd3000004ffffffffffe20001effffecfffffb0009ffffa104fffff300efffe10008ffff804ffffa00003ffffd08ffff600000fffff0affff400000dffff2cffff300000cffff4dffff200000bffff4effff100000bffff5dffff200000bffff4dffff200000cffff3cffff400000dffff29ffff600000ffffe07ffff900003ffffb03ffffe10009ffff600cffffa004ffffe1005fffffedfffff70000affffffffffb0000009ffffffffa1000000039deed940000000000009fff00003cffff0019ffffff39efffffffafffffffffafffffffffaffe5effffab610effff00000effff00000effff00000effff00000effff00000effff00000effff00000effff00000effff00000effff00000effff00000effff00000effff00000effff00000effff00000effff00038befeda5000003cfffffffffc20009fffffffffffd1009ffffffffffff9009fb51003cffffe00740000002fffff20000000000dffff30000000000effff20000000002ffffe0000000000bffff9000000000affffe200000001bfffff500000003dfffff600000007fffffe500000008fffffc200000007fffff9000000003fffff6000000000cffff60000000003ffffd11111111107ffffffffffffff3affffffffffffff3affffffffffffff3bffffffffffffff30038bdffec82000005ffffffffff700005fffffffffff70005ffecceffffff10059300007fffff50000000000bffff600000000009ffff50000000001dffff1000000025cffff800000dffffffff8000000dffffffa20000000dfffffffd7000000acceffffffa00000000028fffff700000000006ffffd00000000000fffff10000000000fffff10000000004ffffe02a5100005effffa03fffdcdeffffff303ffffffffffff7003ffffffffffe5000038bdffeda6100000000000001efffd0000000000007ffffd000000000001effffd000000000008fffffd00000000003ffffffd0000000000cffffffd0000000007fffdfffd000000003fffb9fffd00000001dfff39fffd0000000afff809fffd0000006fffc009fffd000003ffff3009fffd00001dfff60009fffd0001cfffa00009fffd0006ffffbaaaadfffeaa66ffffffffffffffff86ffffffffffffffff86ffffffffffffffff800000000009fffd00000000000009fffd00000000000009fffd00000000000009fffd00000000000009fffd00009fffffffffff400bfffffffffff400cfffffffffff400dfffffffffff400efff20000000000ffff10000000001ffff00000000002fffe00000000003ffffefeda400004ffffffffffb1005fffffffffffc106fedcdfffffff7000000016effffe0000000004fffff2000000000dffff4000000000bffff4000000000dffff2000000004ffffe0a7200005effff80cffeccefffffe10cffffffffffe300cfffffffffc300027bdefed9500000000000017bdffeb600000007efffffffb000000bfffffffffb00000afffffeccefb00005ffffe61000370000efffe200000000005ffff600000000000bfffe000000000000efffa06befd810003ffff8bffffffe4005ffffeffffffffe205ffffffdadfffff906fffff90006ffffe06ffffe10000cffff35ffffa000009ffff53ffffa000008ffff50ffffc00000affff30bffff30001efffe005ffffc201affff9000cfffffceffffe20002effffffffff5000003dfffffffe4000000006bdfeb71000008fffffffffffffff18fffffffffffffff18fffffffffffffff18ffffffffffffffb000000000006ffff300000000000dfffa000000000007ffff300000000001efffa000000000009ffff300000000001efffb000000000007ffff400000000001efffd000000000006ffff700000000000cffff200000000002ffffb000000000007ffff600000000000dffff200000000003ffffc000000000007ffff900000000000bffff500000000000effff200000000002ffffe000000000005ffffc000000000000039cefeb6100000009ffffffffd400000afffffffffff40005fffffb9dffffd000bffff5001bffff400dfffc00003ffff700dfffa00001ffff600afffd00005ffff2003ffff9003dfff900006ffffedffffa0000004dffffffe600000018efffffffc400002dfffffffffff6000cffff7103cffff405ffff700001efffb09ffff1000009ffff1bffff0000008ffff2affff300000bffff16ffffb10007ffffc01effffea9cfffff6004ffffffffffffa00004dfffffffff800000005adefeb7200000000039deed930000001affffffff900001cffffffffff90009fffffddfffff502ffffe4005ffffd07ffff800008ffff4affff300003ffff8bffff100001ffffbbffff300002ffffd9ffff800007ffffe5fffff7216ffffff0dfffffffffffffe03efffffffeefffd003dfffffd3dfffb000058a9610ffff900000000004ffff50000000000affff10000000005ffffa0066100017fffff2008ffdcdffffff70008ffffffffff900008ffffffffe60000016bdefdb61000000049cefec930000dfffffffff9000fffffffffff800ffffffffffff10fe94239fffff40a100000bffff5000000009ffff400000000cffff100000007ffff900000008ffffc10000009ffffc10000006ffffb10000000efffa000000002ffff1000000003fffd0000000001fffe100000000000000000000000000000000000005dec3000000004ffffe100000007fffff300000003ffffe1000000005dec300000"}]diff --git a/games/coreball/build.py b/games/coreball/build.pynew file mode 100644index 00000000..a41f93a2--- /dev/null+++ b/games/coreball/build.py@@ -0,0 +1,82 @@+#!/usr/bin/env python3+"""Build a standalone Core Ball .nwa, without changing the NumPlay launcher.++python build.py --arm-bin /path/to/arm/bin --nwlink /path/to/nwlink+NWLINK may also name the nwlink JavaScript entry point (run with Node).+"""+import argparse+import hashlib+import struct+import json+import os+from pathlib import Path+import re+import shlex+import shutil+import subprocess+import sys++ROOT = Path(__file__).resolve().parent+REPO = ROOT.parents[1]+OUT = ROOT/'output'++def run(args):+ args = [str(x) for x in args]+ subprocess.run(args, cwd=ROOT, check=True)++def main():+ ap = argparse.ArgumentParser(description=__doc__)+ ap.add_argument('--arm-bin', default=os.environ.get('ARM_BIN',''))+ ap.add_argument('--nwlink', default=os.environ.get('NWLINK','nwlink'))+ a = ap.parse_args()+ OUT.mkdir(exist_ok=True)+ arm = lambda name: str(Path(a.arm_bin)/('arm-none-eabi-'+name)) if a.arm_bin else 'arm-none-eabi-'+name+ if Path(a.nwlink).is_file():+ nw = [a.nwlink] if a.nwlink.endswith(('.exe','.cmd')) else ['node',a.nwlink]+ else:+ nw = ([v.replace('"','') for v in re.findall(r'(?:[^\s"]|"[^"]*")+',a.nwlink)]+ if os.name=='nt' else shlex.split(a.nwlink))+ flags = subprocess.check_output(nw+['eadk-cflags-device'],cwd=ROOT,text=True).strip()+ # nwlink quotes the include directory. Preserve backslashes inside Windows paths.+ target = ([v.replace('"','') for v in re.findall(r'(?:[^\s"]|"[^"]*")+',flags)]+ if os.name=='nt' else shlex.split(flags))+ opts = ['-std=c11',*target,'-Os','-Wall','-Wextra','-Werror','-ffunction-sections',+ '-fdata-sections','-fstack-usage','-fno-tree-loop-distribute-patterns',+ '-flto','-fno-fat-lto-objects','-fvisibility=internal']+ run([sys.executable,'tools/assets.py'])+ objects = []+ for name in ('main','game','save','render','assets'):+ obj = OUT/(name+'.o')+ run([arm('gcc'),*opts,'-c','src/'+name+'.c','-o',obj]);objects.append(obj)+ packer = ROOT/'tools/compact_nwa.py'+ run([*nw,'png-icon-o','src/icon.png',OUT/'icon.o'])+ run([sys.executable,packer,'icon',OUT/'icon.o',OUT/'icon-compact.o','--objcopy',arm('objcopy')])+ run([arm('gcc'),*opts,'-nostartfiles','--specs=nano.specs',+ '-Wl,--relocatable,--gc-sections,-e,main','-flinker-output=nolto-rel',+ '-Wl,-u,eadk_app_name,-u,eadk_app_icon,-u,eadk_api_level',+ *objects,OUT/'icon-compact.o','-lm','-o',OUT/'standalone.o'])+ run([sys.executable,packer,'app',OUT/'standalone.o',OUT/'coreball-debug.nwa','--ld',arm('ld')])+ run([sys.executable,packer,'release',OUT/'coreball-debug.nwa',OUT/'coreball.nwa','--objcopy',arm('objcopy')])+ for name in ('coreball','coreball-debug'):+ run([*nw,'nwa-bin',OUT/(name+'.nwa'),OUT/(name+'.bin'),'--ram-length','107674'])+ installed = (OUT/'coreball.bin').read_bytes()+ assert installed == (OUT/'coreball-debug.bin').read_bytes(), 'Release changes installed bytes'+ apps = REPO/'build/apps';apps.mkdir(parents=True,exist_ok=True)+ shutil.copyfile(OUT/'coreball.nwa',apps/'CoreBall.nwa')+ elf=(OUT/('coreball-debug.nwa')).read_bytes()+ shoff=struct.unpack_from('<I',elf,32)[0];shsize,shcount=struct.unpack_from('<HH',elf,46)+ names_index=struct.unpack_from('<H',elf,50)[0]+ names_header=struct.unpack_from('<10I',elf,shoff+names_index*shsize)+ names=elf[names_header[4]:names_header[4]+names_header[5]]+ static_ram=0+ for i in range(shcount):+ header=struct.unpack_from('<10I',elf,shoff+i*shsize)+ name=names[header[0]:].split(b'\0',1)[0]+ if name in (b'.data',b'.bss'):static_ram+=header[5]+ report = dict(static_ram_bytes=static_ram, sha256=hashlib.sha256((OUT/'coreball.nwa').read_bytes()).hexdigest(), nwa_bytes=(OUT/'coreball.nwa').stat().st_size, installed_bytes=len(installed),+ release_installed_matches_debug=True, artifact=str(apps/'CoreBall.nwa'))+ (OUT/'build-report.json').write_text(json.dumps(report,indent=2)+'\n')+ print(json.dumps(report,indent=2))++if __name__=='__main__':+ main()diff --git a/games/coreball/docs/complete.png b/games/coreball/docs/complete.pngnew file mode 100644index 00000000..ee7cfa41Binary files /dev/null and b/games/coreball/docs/complete.png differdiff --git a/games/coreball/docs/gameplay.png b/games/coreball/docs/gameplay.pngnew file mode 100644index 00000000..dc829289Binary files /dev/null and b/games/coreball/docs/gameplay.png differdiff --git a/games/coreball/docs/help.png b/games/coreball/docs/help.pngnew file mode 100644index 00000000..611f3728Binary files /dev/null and b/games/coreball/docs/help.png differdiff --git a/games/coreball/docs/levels.png b/games/coreball/docs/levels.pngnew file mode 100644index 00000000..c74e926fBinary files /dev/null and b/games/coreball/docs/levels.png differdiff --git a/games/coreball/docs/title.png b/games/coreball/docs/title.pngnew file mode 100644index 00000000..f250c820Binary files /dev/null and b/games/coreball/docs/title.png differdiff --git a/games/coreball/docs/validation.json b/games/coreball/docs/validation.jsonnew file mode 100644index 00000000..0e2a2810--- /dev/null+++ b/games/coreball/docs/validation.json@@ -0,0 +1,86 @@+{+ "date": "2026-10-21",+ "build": {+ "static_ram_bytes": 5557,+ "sha256": "43c1b6d9be3c1d554193d9465cb5c1faa60406498092830b17cb7b371ab359f4",+ "nwa_bytes": 35692,+ "installed_bytes": 30653,+ "release_installed_matches_debug": true+ },+ "host": {+ "levels_solved": 60,+ "simulation_frames": 36964,+ "max_solver_attempts": 4,+ "game_bytes": 164,+ "stats_bytes": 16,+ "remaining_offset": 150,+ "level_offset": 148,+ "rotation_soak_frames": 4320000+ },+ "arm": [+ {+ "profile": "n0120",+ "pause_save_reload_exit": "pass",+ "stack_bytes": 388,+ "frames": 64,+ "slowest_draw_ms": 7,+ "frames_over_33ms": 0+ },+ {+ "profile": "n0110",+ "pause_save_reload_exit": "pass",+ "stack_bytes": 388,+ "frames": 64,+ "slowest_draw_ms": 7,+ "frames_over_33ms": 0+ },+ {+ "profile": "n0115",+ "pause_save_reload_exit": "pass",+ "stack_bytes": 388,+ "frames": 64,+ "slowest_draw_ms": 7,+ "frames_over_33ms": 0+ },+ {+ "profile": "upsilon",+ "pause_save_reload_exit": "pass",+ "stack_bytes": 388,+ "frames": 64,+ "slowest_draw_ms": 7,+ "frames_over_33ms": 0+ },+ {+ "scenes": "60 original levels",+ "slowest_draw_ms": 7,+ "stack_bytes": 388+ },+ {+ "ending": "60/60 saved, last level replayed without level 61"+ },+ {+ "full_storage": "continue and exit preserve other files"+ }+ ],+ "source": {+ "repository": "https://github.com/Gr4ys0n/Gr4ys0n.github.io",+ "path": "public/assets/games/core-ball",+ "commit": "29006b0f11904704c390b457f7055c9fa1e53484",+ "javascript_sha256": "fd9c4ded61a00aa100630e4dc47698bd5e8015fab24068629d369ad5b87ae266"+ },+ "source_comparison": {+ "motion_samples": 66000,+ "max_degrees_error": 0.00632+ },+ "text_rendering": {+ "coverage_bits": 4,+ "native_font_sizes": [+ 13,+ 22,+ 32+ ],+ "bitmap_scaling": false,+ "offset_text_shadow": false+ },+ "upstream_base": "979c19e828fee928d2d9b2843f8a2f6f2fea500e"+}diff --git a/games/coreball/src/assets.c b/games/coreball/src/assets.cnew file mode 100644index 00000000..de132074--- /dev/null+++ b/games/coreball/src/assets.c@@ -0,0 +1,1003 @@+#include "assets.h"+const uint8_t font0_pixels[]={+181,165,165,165,148,148,0,165,165,224,209,224,209,224,209,0,27,10,32,0,87,12,0,79,+255,255,245,0,162,71,0,0,192,116,0,191,255,255,208,4,128,192,0,8,66,160,0,0,+160,0,43,254,96,184,163,112,227,160,0,171,176,0,8,232,16,0,170,192,0,160,226,146,+165,225,142,252,48,0,160,0,9,236,32,9,80,4,177,121,4,160,0,118,2,160,193,0,+5,161,120,134,0,0,10,235,75,77,230,0,0,11,45,50,208,0,7,113,192,11,32,2,+176,13,50,208,0,178,0,94,213,0,0,109,233,0,0,0,30,49,197,0,0,1,224,11,+48,195,0,8,204,80,12,32,4,199,187,17,208,1,226,0,140,120,0,61,0,0,190,16,+1,230,17,93,229,16,3,206,234,51,222,32,238,224,0,135,2,192,9,80,13,16,13,0,+28,0,29,0,13,16,9,80,2,192,0,134,135,0,12,32,6,128,2,192,0,224,0,209,+0,224,2,192,6,128,12,32,119,0,0,162,5,171,123,4,185,16,145,130,0,13,0,0,+0,208,0,0,13,0,8,255,255,247,0,13,0,0,0,208,0,0,13,0,0,44,103,146,+31,255,96,45,2,208,0,0,29,0,0,6,128,0,0,194,0,0,60,0,0,9,96,0,+1,209,0,0,105,0,0,12,48,0,3,192,0,0,150,0,0,29,16,0,0,2,191,211,+0,199,23,224,61,0,13,70,160,0,166,121,0,9,118,160,0,165,61,0,13,48,215,23,+192,2,207,178,0,21,169,121,137,0,121,0,121,0,121,0,121,0,121,0,121,0,121,6,+222,178,0,146,24,176,0,0,46,0,0,5,176,0,3,210,0,6,194,0,8,144,0,2,+208,0,0,79,255,255,80,7,222,161,0,130,27,128,0,0,106,0,0,44,64,5,255,144,+0,0,41,176,0,0,31,3,113,24,176,27,238,161,0,0,1,230,0,0,142,96,0,60,+166,0,28,57,96,9,112,150,7,160,9,96,239,255,255,128,0,9,96,0,0,150,0,143,+255,176,150,0,0,164,0,0,191,234,32,0,41,192,0,0,241,0,1,241,146,26,176,174,+233,16,0,109,252,0,92,48,0,13,48,0,2,217,237,96,79,113,78,52,224,0,166,46,+0,10,96,184,20,225,1,191,196,0,111,255,255,96,0,2,209,0,0,166,0,0,45,0,+0,9,112,0,1,225,0,0,91,0,0,10,96,0,0,211,0,0,2,190,195,0,199,23,+208,15,16,15,16,167,22,176,3,239,243,2,228,20,210,107,0,11,99,228,20,227,5,222,+213,0,3,206,194,1,213,23,192,91,0,13,53,176,0,197,46,81,111,80,77,250,196,0,+0,30,16,0,43,112,11,237,112,0,45,2,208,0,0,0,0,2,208,45,0,45,2,208,+0,0,0,0,0,0,44,6,112,146,0,0,0,41,48,1,140,64,7,198,0,2,186,48,+0,0,58,180,0,0,3,163,143,255,255,112,0,0,0,0,0,0,8,255,255,247,73,16,+0,0,92,113,0,0,6,198,0,0,59,161,4,186,48,4,146,0,0,26,238,112,39,19,+226,0,1,209,0,27,64,0,180,0,0,224,0,0,0,0,0,195,0,0,195,0,0,58,+239,217,32,0,109,81,19,141,48,61,19,206,182,76,10,80,212,28,64,179,208,74,0,147,+8,93,5,128,12,32,163,179,60,21,212,76,5,176,158,164,236,48,9,196,16,0,0,0,+5,190,254,176,0,0,9,224,0,0,0,235,80,0,0,91,107,0,0,11,97,242,0,2,+241,11,112,0,139,0,109,0,13,255,255,244,4,225,0,10,160,168,0,0,63,16,207,253,+112,196,3,227,196,0,196,196,5,192,207,255,112,196,2,184,196,0,91,196,2,184,207,254,+128,0,58,238,161,4,231,33,101,13,80,0,0,78,0,0,0,107,0,0,0,93,0,0,+0,31,64,0,0,7,230,17,101,0,92,253,145,207,254,198,0,196,2,93,160,196,0,2,+227,196,0,0,183,196,0,0,167,196,0,0,198,196,0,3,225,196,2,110,96,207,254,163,+0,207,255,192,196,0,0,196,0,0,196,0,0,207,255,128,196,0,0,196,0,0,196,0,+0,207,255,240,207,255,204,64,0,196,0,12,64,0,207,255,140,64,0,196,0,12,64,0,+196,0,0,0,58,239,215,4,231,33,73,13,80,0,0,77,0,0,0,107,0,31,255,93,+0,0,31,30,64,0,31,7,230,17,79,0,92,238,198,196,0,0,240,196,0,0,240,196,+0,0,240,196,0,0,240,207,255,255,240,196,0,0,240,196,0,0,240,196,0,0,240,196,+0,0,240,196,196,196,196,196,196,196,196,196,0,136,0,136,0,136,0,136,0,136,0,136,+0,166,2,226,205,96,196,0,139,12,64,108,16,196,77,32,12,109,32,0,205,144,0,12,+93,96,0,196,46,80,12,64,78,48,196,0,110,32,196,0,12,64,0,196,0,12,64,0,+196,0,12,64,0,196,0,12,64,0,207,255,224,204,0,0,2,247,206,64,0,8,231,201,+176,0,29,167,196,211,0,121,151,195,121,0,210,151,195,30,21,160,151,195,8,124,48,151,+195,2,236,0,151,195,0,165,0,151,205,16,0,136,205,128,0,136,197,227,0,136,196,108,+0,136,196,11,112,136,196,2,226,136,196,0,108,136,196,0,11,216,196,0,2,232,0,92,+238,180,0,6,230,17,110,64,30,64,0,6,208,77,0,0,1,242,107,0,0,0,227,93,+0,0,1,241,31,64,0,6,192,7,229,18,126,64,0,92,254,179,0,207,253,128,196,3,+214,196,0,107,196,0,122,196,4,212,207,252,80,196,0,0,196,0,0,196,0,0,0,92,+238,180,0,6,230,17,110,64,30,64,0,6,208,77,0,0,1,242,107,0,0,0,227,93,+0,0,1,241,31,64,0,6,192,7,229,18,126,48,0,92,254,236,16,0,0,0,25,229,+207,254,144,12,64,44,112,196,0,121,12,64,61,80,207,254,64,12,65,184,0,196,1,227,+12,64,6,192,196,0,12,96,3,190,231,1,229,18,144,46,0,0,0,203,32,0,1,142,+145,0,0,26,192,0,0,14,51,114,4,226,26,238,196,0,191,255,255,144,2,224,0,0,+46,0,0,2,224,0,0,46,0,0,2,224,0,0,46,0,0,2,224,0,0,46,0,0,+226,0,3,222,32,0,61,226,0,3,222,32,0,61,226,0,3,222,48,0,76,197,0,6,+166,211,19,213,7,222,198,0,183,0,0,107,92,0,0,182,14,48,2,225,9,128,7,160,+4,208,12,64,0,211,61,0,0,137,136,0,0,45,210,0,0,12,176,0,167,0,7,192,+0,93,107,0,12,226,0,152,31,16,30,166,0,212,12,80,90,106,2,224,8,144,165,46,+6,160,3,208,225,13,58,96,0,230,192,8,126,32,0,157,112,4,221,0,0,95,48,0,+232,0,78,16,2,226,10,144,11,112,1,227,92,0,0,107,211,0,0,14,176,0,0,122,+212,0,3,226,93,0,12,96,11,128,124,0,2,227,168,0,4,208,46,16,11,80,10,112,+61,0,3,225,181,0,0,169,208,0,0,63,80,0,0,14,32,0,0,14,32,0,0,14,+32,0,95,255,255,225,0,0,12,64,0,0,137,0,0,3,209,0,0,29,48,0,0,152,+0,0,4,192,0,0,29,48,0,0,175,255,255,240,191,155,48,179,11,48,179,11,48,179,+11,48,179,11,48,191,144,29,16,0,0,150,0,0,3,192,0,0,12,32,0,0,104,0,+0,1,208,0,0,10,80,0,0,75,0,0,0,210,0,0,7,112,0,0,45,0,175,160,+74,4,160,74,4,160,74,4,160,74,4,160,74,175,160,0,44,0,0,10,182,0,3,177,+193,0,179,6,144,74,0,12,48,255,255,246,44,16,73,6,222,177,8,49,184,0,0,106,+5,173,251,77,66,107,92,34,187,27,236,123,225,0,0,14,16,0,0,225,0,0,14,76,+234,16,235,33,169,14,48,2,224,225,0,31,14,48,4,208,234,18,199,14,110,232,0,1,+174,229,11,145,54,61,0,0,91,0,0,77,0,0,13,129,54,2,190,212,0,0,7,144,+0,0,121,0,0,7,144,43,236,137,12,113,62,147,208,0,137,91,0,7,148,192,0,153,+30,97,77,144,76,234,121,2,190,195,0,199,21,208,61,0,13,53,255,255,244,76,0,0,+0,214,16,0,3,206,233,0,1,190,64,122,0,8,112,10,255,240,8,112,0,135,0,8,+112,0,135,0,8,112,0,135,0,2,207,200,144,200,19,233,61,0,8,149,176,0,121,76,+0,9,145,230,20,217,4,206,168,144,0,0,167,0,1,110,16,190,236,48,225,0,0,225,+0,0,225,0,0,229,222,144,234,19,228,227,0,166,225,0,151,225,0,151,225,0,151,225,+0,151,12,32,0,0,0,225,14,16,225,14,16,225,14,16,225,0,12,32,0,0,0,0,+0,0,225,0,14,16,0,225,0,14,16,0,225,0,14,16,0,225,0,31,0,7,176,62,+194,0,225,0,0,225,0,0,225,0,0,225,9,176,225,108,16,230,210,0,238,112,0,228,+228,0,225,94,48,225,7,210,225,225,225,225,225,225,225,225,225,225,229,222,84,222,112,233,+21,235,19,241,227,0,228,0,196,225,0,211,0,180,225,0,211,0,180,225,0,211,0,180,+225,0,211,0,180,229,222,128,234,19,227,227,0,166,225,0,151,225,0,151,225,0,151,225,+0,151,2,174,216,0,200,18,200,61,0,3,213,176,0,31,77,0,3,208,216,18,199,2,+190,215,0,228,206,161,14,178,26,144,227,0,46,14,16,1,240,227,0,77,14,161,44,112,+230,222,128,14,16,0,0,225,0,0,14,16,0,0,2,190,200,144,215,19,233,61,0,8,+149,176,0,121,76,0,9,145,230,20,217,4,206,167,144,0,0,121,0,0,7,144,0,0,+121,230,230,234,16,227,0,226,0,225,0,225,0,225,0,7,238,131,209,0,62,48,0,109,+178,0,7,192,0,93,78,252,64,7,96,0,151,0,191,255,16,151,0,9,112,0,151,0,+9,112,0,137,0,3,222,16,30,0,11,81,224,0,181,30,0,11,81,224,0,181,15,0,+13,80,215,22,229,4,222,139,80,182,0,46,6,176,7,144,30,16,196,0,165,45,0,5,+167,112,0,14,178,0,0,155,0,0,182,0,198,0,226,105,1,234,2,192,45,6,141,6,+128,13,42,59,58,64,9,108,7,125,0,5,201,3,203,0,1,245,0,231,0,123,0,151,+12,67,208,4,203,64,0,204,0,3,204,48,13,68,192,138,0,183,182,0,30,21,176,6,+160,30,16,181,0,166,29,0,4,166,128,0,13,179,0,0,140,0,0,9,112,0,4,225,+0,10,212,0,0,111,255,247,0,4,192,0,29,32,0,167,0,5,176,0,29,32,0,175,+255,248,1,183,5,176,6,128,6,128,10,96,109,16,10,96,6,128,6,128,5,176,1,183,+224,224,224,224,224,224,224,224,224,224,224,224,224,139,0,27,64,8,80,8,80,6,144,1,+213,7,144,8,80,8,80,11,64,139,0,45,232,39,121,98,158,193,+};+const Glyph font0_glyphs[]={+{0,0,0,0,0,5},+{0,2,9,1,0,5},+{9,4,3,1,0,6},+{15,8,8,0,0,9},+{47,6,11,1,-1,8},+{80,11,9,0,0,12},+{130,11,9,0,0,11},+{180,1,3,1,0,4},+{182,4,11,0,0,5},+{204,4,11,0,0,5},+{226,5,4,0,0,6},+{236,7,7,1,1,10},+{261,2,3,0,8,4},+{264,5,1,0,4,6},+{267,3,2,0,7,4},+{270,7,11,-1,0,6},+{309,7,9,0,0,8},+{341,4,9,1,0,8},+{359,7,9,0,0,8},+{391,7,9,0,0,8},+{423,7,9,0,0,8},+{455,6,9,1,0,8},+{482,7,9,0,0,8},+{514,7,9,0,0,8},+{546,7,9,0,0,8},+{578,7,9,0,0,8},+{610,3,7,0,2,4},+{621,3,9,0,2,4},+{635,7,6,1,2,10},+{656,7,4,1,3,10},+{670,7,6,1,2,10},+{691,6,9,0,0,7},+{718,11,10,1,0,13},+{773,9,9,0,0,9},+{814,6,9,1,0,8},+{841,8,9,0,0,9},+{877,8,9,1,0,10},+{913,6,9,1,0,8},+{940,5,9,1,0,7},+{963,8,9,0,0,10},+{999,8,9,1,0,10},+{1035,2,9,1,0,4},+{1044,4,9,0,0,6},+{1062,7,9,1,0,9},+{1094,5,9,1,0,7},+{1117,10,9,1,0,13},+{1162,8,9,1,0,11},+{1198,10,9,0,0,11},+{1243,6,9,1,0,8},+{1270,10,10,0,0,11},+{1320,7,9,1,0,9},+{1352,7,9,0,0,8},+{1384,7,9,0,0,8},+{1416,7,9,1,0,10},+{1448,8,9,0,0,9},+{1484,12,9,0,0,13},+{1538,8,9,0,0,9},+{1574,8,9,0,0,8},+{1610,8,9,0,0,8},+{1646,3,11,1,0,5},+{1663,7,11,-1,0,6},+{1702,3,11,0,0,5},+{1719,7,5,1,0,10},+{1737,6,1,0,10,6},+{1740,3,2,0,-1,4},+{1743,6,7,0,2,8},+{1764,7,10,1,-1,9},+{1799,6,7,0,2,7},+{1820,7,10,0,-1,9},+{1855,7,7,0,2,8},+{1880,5,10,0,-1,5},+{1905,7,10,0,2,9},+{1940,6,10,1,-1,8},+{1970,3,10,0,-1,4},+{1985,5,13,-2,-1,4},+{2018,6,10,1,-1,7},+{2048,2,10,1,-1,4},+{2058,10,7,1,2,12},+{2093,6,7,1,2,8},+{2114,7,7,0,2,9},+{2139,7,10,1,2,9},+{2174,7,10,0,2,9},+{2209,4,7,1,2,6},+{2223,5,7,0,2,7},+{2241,5,9,0,0,5},+{2264,7,7,0,2,8},+{2289,7,7,0,2,7},+{2314,10,7,0,2,10},+{2349,6,7,0,2,7},+{2370,7,10,0,2,7},+{2405,6,7,0,2,7},+{2426,4,11,0,0,5},+{2448,2,13,1,-1,4},+{2461,4,11,0,0,5},+{2483,7,2,1,4,10},+};+const uint8_t font1_pixels[]={+63,255,82,255,245,31,255,65,255,243,15,255,48,255,242,14,255,16,239,241,13,255,0,207,+240,0,0,0,0,0,9,235,20,255,247,79,255,112,158,177,0,0,79,208,0,0,0,0,+79,208,0,0,0,0,79,208,0,0,0,0,79,208,0,0,127,255,255,255,255,240,127,255,+255,255,255,240,0,0,79,208,0,0,0,0,79,208,0,0,0,0,79,208,0,0,0,0,+79,208,0,0,127,255,255,103,255,255,246,94,212,239,253,239,253,94,212,0,0,0,4,255,+192,0,0,0,175,246,0,0,0,47,254,16,0,0,8,255,128,0,0,0,239,242,0,0,+0,95,251,0,0,0,11,255,64,0,0,2,255,208,0,0,0,159,247,0,0,0,30,255,+16,0,0,6,255,144,0,0,0,207,243,0,0,0,79,252,0,0,0,10,255,96,0,0,+1,255,224,0,0,0,127,248,0,0,0,13,255,32,0,0,5,255,176,0,0,0,0,2,+157,253,146,0,0,78,255,255,254,48,1,239,255,255,255,192,7,255,245,25,255,244,12,255,+160,1,239,248,31,255,96,0,191,251,63,255,64,0,159,253,63,255,48,0,143,253,79,255,+48,0,143,253,63,255,64,0,159,252,47,255,96,0,191,250,14,255,144,1,239,247,10,255,+244,25,255,242,3,255,255,255,255,160,0,127,255,255,252,16,0,5,190,253,129,0,0,4,+207,225,107,255,254,191,255,255,235,255,239,254,171,87,255,224,0,127,254,0,7,255,224,0,+127,254,0,7,255,224,0,127,254,0,7,255,224,0,127,254,0,7,255,224,0,127,254,0,+7,255,224,0,127,254,0,57,222,253,146,0,5,255,255,255,254,32,5,255,255,255,255,176,+5,164,32,60,255,241,0,0,0,5,255,242,0,0,0,6,255,241,0,0,0,29,255,176,+0,0,1,191,255,48,0,0,61,255,246,0,0,5,239,254,80,0,0,95,255,194,0,0,+2,239,249,0,0,0,10,255,192,0,0,0,14,255,255,255,255,242,31,255,255,255,255,242,+47,255,255,255,255,242,5,189,254,198,0,2,255,255,255,251,0,47,255,255,255,246,2,164,+17,111,255,144,0,0,0,239,247,0,0,2,143,255,32,3,255,255,254,80,0,63,255,254,+96,0,3,255,255,255,194,0,0,2,127,255,160,0,0,0,143,254,0,0,0,8,255,241,+151,49,21,239,253,11,255,255,255,255,112,191,255,255,255,160,3,157,239,218,64,0,0,0,+0,63,255,64,0,0,0,11,255,244,0,0,0,4,255,255,64,0,0,0,223,255,244,0,+0,0,143,254,255,64,0,0,63,249,223,244,0,0,29,254,29,255,64,0,10,255,80,223,+244,0,7,255,144,13,255,64,4,255,193,0,223,244,0,159,255,255,255,255,255,25,255,255,+255,255,255,241,159,255,255,255,255,255,16,0,0,0,223,244,0,0,0,0,13,255,64,0,+0,0,0,223,244,0,10,255,255,255,248,0,191,255,255,255,128,12,255,255,255,248,0,223,+224,0,0,0,14,252,0,0,0,0,255,176,0,0,0,31,255,255,216,16,2,255,255,255,+254,32,63,255,255,255,251,1,33,1,94,255,241,0,0,0,95,255,48,0,0,6,255,242,+104,49,21,239,253,7,255,255,255,255,96,127,255,255,255,128,2,157,239,218,64,0,0,1,+124,238,216,0,3,223,255,255,192,2,239,255,255,252,0,191,255,130,19,96,47,255,112,0,+0,7,255,208,0,0,0,191,249,76,238,145,13,255,175,255,255,209,239,255,255,255,255,125,+255,228,19,223,252,207,249,0,7,255,217,255,160,0,127,253,95,255,81,78,255,144,207,255,+255,255,242,2,239,255,255,245,0,1,157,254,163,0,255,255,255,255,255,191,255,255,255,255,+251,255,255,255,255,255,128,0,0,2,255,225,0,0,0,175,248,0,0,0,63,254,16,0,+0,11,255,128,0,0,3,255,242,0,0,0,175,250,0,0,0,31,255,80,0,0,6,255,+225,0,0,0,191,250,0,0,0,31,255,96,0,0,5,255,242,0,0,0,143,254,0,0,+0,11,255,192,0,0,0,4,190,253,146,0,0,127,255,255,255,64,3,255,255,255,255,224,+8,255,228,22,255,244,8,255,144,0,207,244,4,255,192,2,239,225,0,159,253,174,254,64,+0,9,255,255,243,0,0,159,255,255,255,80,8,255,194,4,239,243,14,255,48,0,143,249,+47,255,48,0,143,251,31,255,178,20,239,250,10,255,255,255,255,244,1,207,255,255,255,128,+0,6,206,253,164,0,0,4,190,253,112,0,0,127,255,255,252,16,4,255,255,255,255,144,+11,255,211,26,255,241,15,255,80,1,239,245,47,255,48,0,207,248,47,255,80,0,223,249,+14,255,211,24,255,250,8,255,255,255,255,249,1,223,255,253,207,247,0,25,238,178,223,245,+0,0,0,5,255,225,3,114,1,110,255,144,4,255,255,255,254,16,4,255,255,255,211,0,+2,157,238,200,16,0,94,212,239,253,239,253,94,212,0,0,0,0,0,0,94,212,239,253,+239,253,94,212,22,189,253,164,0,95,255,255,255,96,95,255,255,255,224,90,65,26,255,242,+0,0,3,255,242,0,0,8,255,192,0,0,111,255,48,0,7,255,228,0,0,47,254,32,+0,0,111,247,0,0,0,95,247,0,0,0,0,0,0,0,0,27,233,0,0,0,143,255,+64,0,0,143,255,64,0,0,27,233,0,0,0,0,7,255,254,16,0,0,0,0,12,255,+255,80,0,0,0,0,47,255,255,160,0,0,0,0,143,250,255,241,0,0,0,0,223,244,+239,246,0,0,0,3,255,224,175,251,0,0,0,8,255,176,111,255,16,0,0,14,255,96,+31,255,96,0,0,79,255,32,12,255,176,0,0,159,253,0,8,255,241,0,0,239,255,255,+255,255,246,0,5,255,255,255,255,255,252,0,10,255,255,255,255,255,255,32,30,255,192,0,+0,111,255,112,111,255,96,0,0,30,255,192,191,255,16,0,0,10,255,242,79,255,255,254,+199,16,4,255,255,255,255,253,16,79,255,255,255,255,248,4,255,244,1,127,255,160,79,255,+64,0,255,248,4,255,244,1,143,254,16,79,255,255,255,251,32,4,255,255,255,255,164,0,+79,255,255,255,255,246,4,255,244,1,78,255,225,79,255,64,0,111,255,52,255,244,0,7,+255,244,79,255,64,21,239,255,36,255,255,255,255,255,176,79,255,255,255,255,209,4,255,255,+255,236,113,0,0,0,5,173,239,219,96,0,44,255,255,255,252,0,46,255,255,255,255,192,+12,255,252,81,18,106,6,255,250,0,0,0,0,207,254,16,0,0,0,31,255,160,0,0,+0,2,255,247,0,0,0,0,63,255,112,0,0,0,2,255,249,0,0,0,0,14,255,225,+0,0,0,0,175,255,144,0,0,0,3,255,255,180,17,55,160,7,255,255,255,255,252,0,+7,255,255,255,255,192,0,2,140,239,237,164,79,255,255,254,201,48,0,4,255,255,255,255,+255,161,0,79,255,255,255,255,255,192,4,255,244,1,57,255,255,112,79,255,64,0,5,255,+254,4,255,244,0,0,11,255,243,79,255,64,0,0,111,255,84,255,244,0,0,4,255,246,+79,255,64,0,0,79,255,84,255,244,0,0,6,255,244,79,255,64,0,0,207,255,20,255,+244,0,0,127,255,160,79,255,64,19,159,255,243,4,255,255,255,255,255,246,0,79,255,255,+255,255,229,0,4,255,255,255,235,113,0,0,79,255,255,255,250,79,255,255,255,250,79,255,+255,255,250,79,255,64,0,0,79,255,64,0,0,79,255,64,0,0,79,255,255,255,244,79,+255,255,255,244,79,255,255,255,244,79,255,64,0,0,79,255,64,0,0,79,255,64,0,0,+79,255,64,0,0,79,255,255,255,255,79,255,255,255,255,79,255,255,255,255,79,255,255,255,+250,79,255,255,255,250,79,255,255,255,250,79,255,64,0,0,79,255,64,0,0,79,255,64,+0,0,79,255,64,0,0,79,255,255,255,244,79,255,255,255,244,79,255,255,255,244,79,255,+64,0,0,79,255,64,0,0,79,255,64,0,0,79,255,64,0,0,79,255,64,0,0,79,+255,64,0,0,0,0,4,156,239,236,148,0,0,27,255,255,255,255,160,0,45,255,255,255,+255,250,0,12,255,252,81,2,72,144,6,255,251,0,0,0,0,0,207,254,16,0,0,0,+0,31,255,160,0,0,0,0,2,255,247,0,47,255,255,246,63,255,112,2,255,255,255,98,+255,249,0,47,255,255,246,14,255,208,0,0,31,255,96,159,255,128,0,1,255,246,2,255,+255,163,17,79,255,96,6,255,255,255,255,255,246,0,6,239,255,255,255,255,80,0,1,123,+239,253,183,32,79,255,64,0,0,111,255,20,255,244,0,0,6,255,241,79,255,64,0,0,+111,255,20,255,244,0,0,6,255,241,79,255,64,0,0,111,255,20,255,244,0,0,6,255,+241,79,255,255,255,255,255,255,20,255,255,255,255,255,255,241,79,255,255,255,255,255,255,20,+255,244,0,0,6,255,241,79,255,64,0,0,111,255,20,255,244,0,0,6,255,241,79,255,+64,0,0,111,255,20,255,244,0,0,6,255,241,79,255,64,0,0,111,255,20,255,244,0,+0,6,255,241,79,255,68,255,244,79,255,68,255,244,79,255,68,255,244,79,255,68,255,244,+79,255,68,255,244,79,255,68,255,244,79,255,68,255,244,79,255,68,255,244,0,0,79,255,+48,0,4,255,243,0,0,79,255,48,0,4,255,243,0,0,79,255,48,0,4,255,243,0,+0,79,255,48,0,4,255,243,0,0,79,255,48,0,4,255,243,0,0,111,255,32,0,9,+255,240,115,22,255,251,10,255,255,255,64,175,255,255,128,6,223,235,80,0,79,255,64,0,+95,255,176,79,255,64,1,239,254,32,79,255,64,9,255,245,0,79,255,64,79,255,160,0,+79,255,65,223,253,16,0,79,255,72,255,244,0,0,79,255,111,255,128,0,0,79,255,223,+254,0,0,0,79,255,207,255,80,0,0,79,255,94,255,226,0,0,79,255,69,255,251,0,+0,79,255,64,191,255,96,0,79,255,64,46,255,226,0,79,255,64,6,255,252,0,79,255,+64,0,207,255,128,79,255,64,0,47,255,243,79,255,64,0,0,79,255,64,0,0,79,255,+64,0,0,79,255,64,0,0,79,255,64,0,0,79,255,64,0,0,79,255,64,0,0,79,+255,64,0,0,79,255,64,0,0,79,255,64,0,0,79,255,64,0,0,79,255,64,0,0,+79,255,64,0,0,79,255,255,255,254,79,255,255,255,254,79,255,255,255,254,79,255,254,16,+0,0,12,255,255,84,255,255,245,0,0,2,255,255,245,79,255,255,160,0,0,127,255,255,+84,255,223,254,16,0,12,253,255,245,79,252,223,245,0,2,255,175,255,84,255,217,255,160,+0,127,246,255,245,79,253,79,254,16,12,254,47,255,84,255,208,223,245,2,255,162,255,245,+79,253,8,255,160,127,245,47,255,84,255,208,63,254,12,254,18,255,245,79,253,0,223,245,+255,160,47,255,84,255,208,8,255,207,245,2,255,245,79,253,0,63,255,254,16,47,255,84,+255,208,0,223,255,160,2,255,245,79,253,0,8,255,245,0,47,255,84,255,208,0,63,254,+16,2,255,245,79,255,192,0,0,10,255,148,255,255,112,0,0,175,249,79,255,254,32,0,+10,255,148,255,255,250,0,0,175,249,79,255,239,245,0,10,255,148,255,248,255,209,0,175,+249,79,255,29,255,144,10,255,148,255,240,79,255,48,175,249,79,255,0,159,252,10,255,148,+255,240,1,239,247,175,249,79,255,0,5,255,235,255,148,255,240,0,11,255,255,249,79,255,+0,0,46,255,255,148,255,240,0,0,127,255,249,79,255,0,0,0,207,255,148,255,240,0,+0,3,255,249,0,0,23,190,254,182,0,0,0,4,239,255,255,255,211,0,0,79,255,255,+255,255,254,32,1,239,255,130,3,175,255,192,7,255,247,0,0,11,255,244,13,255,208,0,+0,3,255,249,31,255,144,0,0,0,239,252,47,255,112,0,0,0,207,253,63,255,112,0,+0,0,207,253,47,255,144,0,0,0,239,251,14,255,208,0,0,3,255,248,9,255,246,0,+0,11,255,243,2,255,255,130,3,175,255,176,0,111,255,255,255,255,253,16,0,6,239,255,+255,255,194,0,0,0,24,206,253,165,0,0,79,255,255,254,181,0,79,255,255,255,255,160,+79,255,255,255,255,246,79,255,64,41,255,252,79,255,64,0,207,254,79,255,64,0,175,255,+79,255,64,0,207,253,79,255,64,41,255,249,79,255,255,255,255,226,79,255,255,255,254,64,+79,255,255,236,130,0,79,255,64,0,0,0,79,255,64,0,0,0,79,255,64,0,0,0,+79,255,64,0,0,0,79,255,64,0,0,0,0,0,23,190,254,182,0,0,0,0,4,239,+255,255,255,211,0,0,0,79,255,255,255,255,254,32,0,1,239,255,130,3,175,255,192,0,+7,255,247,0,0,11,255,244,0,13,255,208,0,0,3,255,249,0,31,255,144,0,0,0,+239,252,0,47,255,112,0,0,0,207,253,0,63,255,112,0,0,0,207,253,0,31,255,144,+0,0,0,239,251,0,14,255,208,0,0,2,255,248,0,9,255,247,0,0,10,255,243,0,+2,255,255,130,3,175,255,176,0,0,111,255,255,255,255,253,16,0,0,6,239,255,255,255,+253,16,0,0,0,24,206,254,223,255,209,0,0,0,0,0,0,28,255,252,16,0,0,0,+0,0,1,223,255,193,79,255,255,254,182,0,0,79,255,255,255,255,193,0,79,255,255,255,+255,247,0,79,255,64,23,255,252,0,79,255,64,0,223,253,0,79,255,64,0,239,251,0,+79,255,64,42,255,245,0,79,255,255,255,255,160,0,79,255,255,255,214,0,0,79,255,255,+255,228,0,0,79,255,65,191,255,48,0,79,255,64,30,255,208,0,79,255,64,6,255,247,+0,79,255,64,0,207,255,32,79,255,64,0,63,255,176,79,255,64,0,9,255,246,0,74,+223,254,182,0,175,255,255,255,208,127,255,255,255,253,13,255,229,16,38,160,255,251,0,0,+0,13,255,246,0,0,0,143,255,252,80,0,1,191,255,255,212,0,0,142,255,255,246,0,+0,23,239,255,242,0,0,1,191,255,120,0,0,2,255,248,236,81,2,159,255,110,255,255,+255,255,225,239,255,255,255,245,3,156,239,220,130,0,175,255,255,255,255,255,154,255,255,255,+255,255,249,175,255,255,255,255,255,144,0,4,255,243,0,0,0,0,79,255,48,0,0,0,+4,255,243,0,0,0,0,79,255,48,0,0,0,4,255,243,0,0,0,0,79,255,48,0,+0,0,4,255,243,0,0,0,0,79,255,48,0,0,0,4,255,243,0,0,0,0,79,255,+48,0,0,0,4,255,243,0,0,0,0,79,255,48,0,0,0,4,255,243,0,0,111,255,+16,0,2,255,245,111,255,16,0,2,255,245,111,255,16,0,2,255,245,111,255,16,0,2,+255,245,111,255,16,0,2,255,245,111,255,16,0,2,255,245,111,255,16,0,2,255,245,111,+255,16,0,2,255,245,111,255,16,0,2,255,245,111,255,16,0,3,255,244,95,255,48,0,+4,255,243,47,255,128,0,9,255,240,13,255,246,17,127,255,176,6,255,255,255,255,255,48,+0,159,255,255,255,246,0,0,4,173,254,217,32,0,191,254,0,0,0,63,255,102,255,244,+0,0,7,255,242,31,255,128,0,0,191,251,0,191,253,0,0,31,255,96,6,255,242,0,+5,255,242,0,31,255,96,0,159,251,0,0,191,251,0,14,255,96,0,7,255,241,3,255,+242,0,0,47,255,64,127,252,0,0,0,207,249,12,255,112,0,0,7,255,209,255,242,0,+0,0,47,255,127,252,0,0,0,0,207,253,255,112,0,0,0,7,255,255,242,0,0,0,+0,47,255,252,0,0,0,0,0,207,255,112,0,0,175,255,16,0,9,255,245,0,0,175,+252,127,255,64,0,13,255,249,0,0,223,248,63,255,112,0,47,255,253,0,1,255,244,14,+255,160,0,111,255,255,16,4,255,241,10,255,224,0,175,252,255,80,7,255,192,6,255,242,+0,239,233,255,128,10,255,128,3,255,245,3,255,166,255,192,13,255,64,0,239,248,7,255,+98,255,240,31,255,16,0,175,251,11,255,32,223,244,79,251,0,0,111,254,14,254,0,159,+247,127,247,0,0,47,255,95,250,0,111,251,175,244,0,0,14,255,175,246,0,47,253,207,+224,0,0,10,255,239,242,0,13,255,239,176,0,0,6,255,255,208,0,9,255,255,112,0,+0,2,255,255,144,0,6,255,255,48,0,0,0,223,255,96,0,2,255,254,0,0,79,255,+224,0,0,223,253,16,175,255,96,0,127,255,80,2,255,253,0,30,255,176,0,8,255,245,+7,255,243,0,0,30,255,193,239,249,0,0,0,127,255,143,254,16,0,0,0,223,255,255,+96,0,0,0,5,255,255,208,0,0,0,0,95,255,253,16,0,0,0,29,255,255,248,0,+0,0,9,255,232,255,242,0,0,3,255,248,30,255,160,0,0,207,254,16,143,255,64,0,+111,255,112,1,239,253,0,30,255,225,0,8,255,247,10,255,247,0,0,30,255,225,207,255,+48,0,8,255,242,79,255,144,0,14,255,160,12,255,225,0,95,255,32,5,255,246,0,207,+250,0,0,223,252,3,255,243,0,0,111,255,73,255,160,0,0,14,255,158,255,48,0,0,+7,255,255,251,0,0,0,1,239,255,244,0,0,0,0,143,255,176,0,0,0,0,47,255,+96,0,0,0,0,47,255,80,0,0,0,0,47,255,80,0,0,0,0,47,255,80,0,0,+0,0,47,255,80,0,0,0,0,47,255,80,0,0,15,255,255,255,255,255,192,255,255,255,+255,255,252,15,255,255,255,255,255,128,0,0,0,30,255,192,0,0,0,11,255,226,0,0,+0,7,255,246,0,0,0,3,255,250,0,0,0,1,223,254,16,0,0,0,175,255,64,0,+0,0,111,255,144,0,0,0,46,255,209,0,0,0,12,255,243,0,0,0,9,255,247,0,+0,0,4,255,255,255,255,255,253,143,255,255,255,255,255,216,255,255,255,255,255,253,+};+const Glyph font1_glyphs[]={+{0,0,0,0,0,6},+{0,5,16,1,0,7},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{40,12,10,2,5,16},+{1132,10,16,0,0,10},+{100,7,2,1,9,9},+{107,4,4,1,12,6},+{115,11,18,-1,0,10},+{214,12,16,0,0,13},+{310,7,16,2,0,13},+{366,12,16,0,0,13},+{462,11,16,1,0,13},+{550,13,16,0,0,13},+{654,11,16,1,0,13},+{742,11,16,1,0,13},+{830,11,16,1,0,13},+{918,12,16,0,0,13},+{1014,12,16,0,0,13},+{1110,4,11,1,5,6},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1212,16,16,0,0,15},+{1340,13,16,1,0,14},+{1444,13,16,0,0,14},+{1548,15,16,1,0,16},+{1668,10,16,1,0,12},+{1748,10,16,1,0,11},+{1828,15,16,0,0,16},+{1948,15,16,1,0,17},+{2068,5,16,1,0,7},+{2108,9,16,0,0,10},+{2180,14,16,1,0,14},+{2292,10,16,1,0,11},+{2372,19,16,1,0,21},+{2524,15,16,1,0,17},+{2644,16,16,0,0,17},+{2772,12,16,1,0,14},+{2868,18,18,0,0,17},+{3030,14,16,1,0,14},+{3142,11,16,1,0,12},+{3230,13,16,0,0,13},+{3334,14,16,1,0,16},+{3446,15,16,0,0,15},+{3566,22,16,0,0,22},+{3742,15,16,0,0,14},+{3862,14,16,0,0,13},+{3974,13,16,0,0,13},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+};+const uint8_t font2_pixels[]={+0,0,23,189,254,182,16,0,0,0,94,255,255,255,253,48,0,0,79,255,255,255,255,254,+32,0,30,255,255,236,255,255,251,0,9,255,255,161,4,255,255,243,0,239,255,225,0,8,+255,255,128,79,255,250,0,0,63,255,253,8,255,255,96,0,0,255,255,240,175,255,244,0,+0,13,255,255,44,255,255,48,0,0,207,255,244,223,255,242,0,0,11,255,255,78,255,255,+16,0,0,191,255,245,223,255,242,0,0,11,255,255,77,255,255,32,0,0,207,255,243,207,+255,244,0,0,13,255,255,41,255,255,96,0,0,255,255,224,127,255,249,0,0,63,255,251,+3,255,255,225,0,9,255,255,96,12,255,255,160,4,255,255,225,0,95,255,255,237,255,255,+247,0,0,175,255,255,255,255,251,0,0,0,159,255,255,255,250,16,0,0,0,57,222,237,+148,0,0,0,0,0,0,159,255,0,0,60,255,255,0,25,255,255,255,57,239,255,255,255,+175,255,255,255,255,175,255,255,255,255,175,254,94,255,255,171,97,14,255,255,0,0,14,255,+255,0,0,14,255,255,0,0,14,255,255,0,0,14,255,255,0,0,14,255,255,0,0,14,+255,255,0,0,14,255,255,0,0,14,255,255,0,0,14,255,255,0,0,14,255,255,0,0,+14,255,255,0,0,14,255,255,0,0,14,255,255,0,0,14,255,255,0,0,14,255,255,0,+3,139,239,237,165,0,0,3,207,255,255,255,255,194,0,9,255,255,255,255,255,253,16,9,+255,255,255,255,255,255,144,9,251,81,0,60,255,255,224,7,64,0,0,2,255,255,242,0,+0,0,0,0,223,255,243,0,0,0,0,0,239,255,242,0,0,0,0,2,255,255,224,0,+0,0,0,11,255,255,144,0,0,0,0,175,255,254,32,0,0,0,27,255,255,245,0,0,+0,3,223,255,255,96,0,0,0,127,255,255,229,0,0,0,8,255,255,252,32,0,0,0,+127,255,255,144,0,0,0,3,255,255,246,0,0,0,0,12,255,255,96,0,0,0,0,63,+255,253,17,17,17,17,16,127,255,255,255,255,255,255,243,175,255,255,255,255,255,255,243,175,+255,255,255,255,255,255,243,191,255,255,255,255,255,255,243,0,56,189,255,236,130,0,0,5,+255,255,255,255,255,112,0,5,255,255,255,255,255,247,0,5,255,236,206,255,255,255,16,5,+147,0,0,127,255,255,80,0,0,0,0,11,255,255,96,0,0,0,0,9,255,255,80,0,+0,0,0,29,255,255,16,0,0,0,37,207,255,248,0,0,13,255,255,255,255,128,0,0,+13,255,255,255,162,0,0,0,13,255,255,255,253,112,0,0,10,204,239,255,255,250,0,0,+0,0,2,143,255,255,112,0,0,0,0,6,255,255,208,0,0,0,0,0,255,255,241,0,+0,0,0,0,255,255,241,0,0,0,0,4,255,255,224,42,81,0,0,94,255,255,160,63,+255,220,222,255,255,255,48,63,255,255,255,255,255,247,0,63,255,255,255,255,254,80,0,3,+139,223,254,218,97,0,0,0,0,0,0,1,239,255,208,0,0,0,0,0,7,255,255,208,+0,0,0,0,0,30,255,255,208,0,0,0,0,0,143,255,255,208,0,0,0,0,3,255,+255,255,208,0,0,0,0,12,255,255,255,208,0,0,0,0,127,255,223,255,208,0,0,0,+3,255,251,159,255,208,0,0,0,29,255,243,159,255,208,0,0,0,175,255,128,159,255,208,+0,0,6,255,252,0,159,255,208,0,0,63,255,243,0,159,255,208,0,1,223,255,96,0,+159,255,208,0,28,255,250,0,0,159,255,208,0,111,255,251,170,170,223,255,234,166,111,255,+255,255,255,255,255,255,248,111,255,255,255,255,255,255,255,248,111,255,255,255,255,255,255,255,+248,0,0,0,0,0,159,255,208,0,0,0,0,0,0,159,255,208,0,0,0,0,0,0,+159,255,208,0,0,0,0,0,0,159,255,208,0,0,0,0,0,0,159,255,208,0,9,255,+255,255,255,255,244,0,191,255,255,255,255,255,64,12,255,255,255,255,255,244,0,223,255,255,+255,255,255,64,14,255,242,0,0,0,0,0,255,255,16,0,0,0,0,31,255,240,0,0,+0,0,2,255,254,0,0,0,0,0,63,255,254,254,218,64,0,4,255,255,255,255,255,177,+0,95,255,255,255,255,255,193,6,254,220,223,255,255,255,112,0,0,0,22,239,255,254,0,+0,0,0,4,255,255,242,0,0,0,0,13,255,255,64,0,0,0,0,191,255,244,0,0,+0,0,13,255,255,32,0,0,0,4,255,255,224,167,32,0,5,239,255,248,12,255,236,206,+255,255,254,16,207,255,255,255,255,254,48,12,255,255,255,255,252,48,0,39,189,239,237,149,+0,0,0,0,0,0,23,189,255,235,96,0,0,0,126,255,255,255,251,0,0,0,191,255,+255,255,255,176,0,0,175,255,255,236,206,251,0,0,95,255,254,97,0,3,112,0,14,255,+254,32,0,0,0,0,5,255,255,96,0,0,0,0,0,191,255,224,0,0,0,0,0,14,+255,250,6,190,253,129,0,3,255,255,139,255,255,255,228,0,95,255,254,255,255,255,255,226,+5,255,255,255,218,223,255,255,144,111,255,255,144,0,111,255,254,6,255,255,225,0,0,207,+255,243,95,255,250,0,0,9,255,255,83,255,255,160,0,0,143,255,245,15,255,252,0,0,+10,255,255,48,191,255,243,0,1,239,255,224,5,255,255,194,1,175,255,249,0,12,255,255,+252,239,255,254,32,0,46,255,255,255,255,255,80,0,0,61,255,255,255,254,64,0,0,0,+6,189,254,183,16,0,0,143,255,255,255,255,255,255,255,24,255,255,255,255,255,255,255,241,+143,255,255,255,255,255,255,255,24,255,255,255,255,255,255,255,176,0,0,0,0,0,111,255,+243,0,0,0,0,0,13,255,250,0,0,0,0,0,7,255,255,48,0,0,0,0,1,239,+255,160,0,0,0,0,0,159,255,243,0,0,0,0,0,30,255,251,0,0,0,0,0,7,+255,255,64,0,0,0,0,1,239,255,208,0,0,0,0,0,111,255,247,0,0,0,0,0,+12,255,255,32,0,0,0,0,2,255,255,176,0,0,0,0,0,127,255,246,0,0,0,0,+0,13,255,255,32,0,0,0,0,3,255,255,192,0,0,0,0,0,127,255,249,0,0,0,+0,0,11,255,255,80,0,0,0,0,0,239,255,242,0,0,0,0,0,47,255,254,0,0,+0,0,0,5,255,255,192,0,0,0,0,0,0,57,206,254,182,16,0,0,0,159,255,255,+255,253,64,0,0,175,255,255,255,255,255,64,0,95,255,255,185,223,255,253,0,11,255,255,+80,1,191,255,244,0,223,255,192,0,3,255,255,112,13,255,250,0,0,31,255,246,0,175,+255,208,0,5,255,255,32,3,255,255,144,3,223,255,144,0,6,255,255,237,255,255,160,0,+0,4,223,255,255,254,96,0,0,1,142,255,255,255,252,64,0,2,223,255,255,255,255,255,+96,0,207,255,247,16,60,255,255,64,95,255,247,0,0,30,255,251,9,255,255,16,0,0,+159,255,241,191,255,240,0,0,8,255,255,42,255,255,48,0,0,191,255,241,111,255,251,16,+0,127,255,252,1,239,255,254,169,207,255,255,96,4,255,255,255,255,255,255,160,0,4,223,+255,255,255,255,128,0,0,0,90,222,254,183,32,0,0,0,0,57,222,237,147,0,0,0,+26,255,255,255,255,144,0,1,207,255,255,255,255,249,0,9,255,255,253,223,255,255,80,47,+255,254,64,5,255,255,208,127,255,248,0,0,143,255,244,175,255,243,0,0,63,255,248,191,+255,241,0,0,31,255,251,191,255,243,0,0,47,255,253,159,255,248,0,0,127,255,254,95,+255,255,114,22,255,255,255,13,255,255,255,255,255,255,254,3,239,255,255,255,238,255,253,0,+61,255,255,253,61,255,251,0,0,88,169,97,15,255,249,0,0,0,0,0,79,255,245,0,+0,0,0,0,175,255,241,0,0,0,0,5,255,255,160,6,97,0,1,127,255,255,32,8,+255,220,223,255,255,247,0,8,255,255,255,255,255,144,0,8,255,255,255,255,230,0,0,1,+107,222,253,182,16,0,0,0,73,206,254,201,48,0,13,255,255,255,255,249,0,15,255,255,+255,255,255,128,15,255,255,255,255,255,241,15,233,66,57,255,255,244,10,16,0,0,191,255,+245,0,0,0,0,159,255,244,0,0,0,0,207,255,241,0,0,0,7,255,255,144,0,0,+0,143,255,252,16,0,0,9,255,255,193,0,0,0,111,255,251,16,0,0,0,239,255,160,+0,0,0,2,255,255,16,0,0,0,3,255,253,0,0,0,0,1,255,254,16,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,93,236,48,0,0,0,4,255,255,+225,0,0,0,7,255,255,243,0,0,0,3,255,255,225,0,0,0,0,93,236,48,0,0,+};+const Glyph font2_glyphs[]={+{0,0,0,0,0,9},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{0,17,23,1,0,18},+{196,10,23,3,0,18},+{311,16,23,1,0,18},+{495,16,23,1,0,18},+{679,18,23,0,0,18},+{886,15,23,2,0,18},+{1059,17,23,1,0,18},+{1255,17,23,1,0,18},+{1451,17,23,1,0,18},+{1647,16,23,1,0,18},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+};+const Font fonts[]={{font0_glyphs,font0_pixels},{font1_glyphs,font1_pixels},{font2_glyphs,font2_pixels}};+const uint8_t logo_pix[]={+0,0,0,0,0,0,20,103,118,65,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,108,+252,169,154,207,181,0,0,0,0,0,0,0,0,0,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,254,216,16,0,0,0,0,0,0,+0,0,0,0,0,0,0,63,0,0,0,3,240,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,93,197,16,0,0,1,109,211,+0,0,0,0,0,0,0,0,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,241,75,228,0,0,0,0,0,0,0,0,0,0,0,0,+0,63,0,0,0,3,240,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,9,213,0,0,0,0,0,0,100,0,0,0,0,0,0,+0,0,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,240,0,126,32,0,0,0,0,0,0,0,0,0,0,0,0,63,0,0,0,3,+240,0,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,188,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,0,0,0,3,240,0,11,+144,0,0,0,0,0,0,0,0,0,0,0,0,63,0,0,0,3,240,0,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,177,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,240,0,5,208,0,0,0,0,0,+0,0,0,0,0,0,0,63,0,0,0,3,240,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,141,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,0,0,0,0,3,240,0,3,224,0,0,0,0,0,0,0,0,0,0,0,+0,63,0,0,0,3,240,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,226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,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,240,0,5,192,0,0,0,0,0,0,0,0,0,0,0,0,63,0,0,0,3,+240,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,11,144,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,240,0,10,+112,0,0,0,0,0,0,0,0,0,0,0,0,63,0,0,0,3,240,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,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,0,0,0,0,0,3,240,0,110,16,0,0,0,0,0,+0,0,0,0,0,0,0,63,0,0,0,3,240,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,138,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,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,240,41,227,0,0,0,0,0,0,0,0,0,0,0,0,+0,63,0,0,0,3,240,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,198,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,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,254,255,96,0,0,0,0,0,0,0,0,0,0,0,0,0,63,0,0,0,3,+240,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,243,0,0,0,0,0,0,0,0,0,0,0,0,0,23,206,254,182,16,0,0,3,240,+6,206,235,80,0,0,0,23,190,254,182,16,0,0,0,0,0,0,0,0,3,242,72,237,+64,0,0,0,0,23,206,254,182,16,3,240,0,63,0,0,0,3,240,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,241,0,0,0,0,+0,0,0,0,0,0,0,0,7,234,82,18,91,229,0,0,3,241,203,65,38,213,0,0,+6,234,66,18,108,229,0,0,0,0,0,0,0,0,3,240,0,25,245,0,0,0,6,234,+82,18,91,229,3,240,0,63,0,0,0,3,240,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,2,240,0,0,0,0,0,0,0,0,0,0,+0,0,158,64,0,0,0,94,96,0,3,251,128,0,0,19,0,0,157,48,0,0,0,94,+96,0,0,0,0,0,0,0,3,240,0,0,127,48,0,0,158,64,0,0,0,94,115,240,+0,63,0,0,0,3,240,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,2,241,0,0,0,0,0,0,0,0,0,0,0,7,226,0,0,0,+0,3,229,0,3,250,0,0,0,0,0,7,210,0,0,0,0,62,96,0,0,0,0,0,+0,0,3,240,0,0,9,208,0,7,226,0,0,0,0,3,231,240,0,63,0,0,0,3,+240,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+1,242,0,0,0,0,0,0,0,0,0,0,0,47,64,0,0,0,0,0,110,16,3,243,+0,0,0,0,0,47,48,0,0,0,4,230,0,0,0,0,0,0,0,0,3,240,0,0,+1,229,0,47,64,0,0,0,0,0,110,240,0,63,0,0,0,3,240,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,0,0,0,0,+0,0,0,0,0,0,0,154,0,0,0,0,0,0,12,96,3,240,0,0,0,0,0,153,+0,0,0,0,78,96,0,0,0,0,0,0,0,0,3,240,0,0,0,153,0,154,0,0,+0,0,0,0,12,240,0,63,0,0,0,3,240,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,168,0,0,0,0,0,0,0,0,0,0,+0,228,0,0,0,0,0,0,7,176,3,240,0,0,0,0,0,228,0,0,0,4,229,0,+0,0,0,0,0,0,0,0,3,240,0,0,0,93,0,228,0,0,0,0,0,0,7,240,+0,63,0,0,0,3,240,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,93,0,0,0,0,0,0,0,0,0,0,1,241,0,0,0,0,+0,0,4,208,3,240,0,0,0,0,1,241,0,0,0,78,80,0,0,0,0,0,0,0,+0,0,3,240,0,0,0,62,1,241,0,0,0,0,0,0,4,240,0,63,0,0,0,3,+240,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,80,0,0,0,0,0,0,0,0,0,2,240,0,0,0,0,0,0,3,224,3,240,+0,0,0,0,2,240,0,0,4,229,0,0,0,0,0,0,0,0,0,0,3,240,0,0,+0,62,2,240,0,0,0,0,0,0,3,240,0,63,0,0,0,3,240,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,208,0,0,0,+0,0,0,0,0,0,1,241,0,0,0,0,0,0,4,208,3,240,0,0,0,0,1,241,+0,0,78,80,0,0,0,0,0,0,0,0,0,0,3,240,0,0,0,93,1,241,0,0,+0,0,0,0,4,240,0,63,0,0,0,3,240,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,0,0,0,0,0,0,0,0,0,+0,212,0,0,0,0,0,0,7,176,3,240,0,0,0,0,0,213,0,4,229,0,0,0,+0,0,0,0,0,0,0,0,3,240,0,0,0,154,0,228,0,0,0,0,0,0,7,240,+0,63,0,0,0,3,240,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,62,80,0,0,0,0,0,0,0,0,0,153,0,0,0,0,+0,0,12,96,3,240,0,0,0,0,0,155,0,78,80,0,0,0,0,0,0,0,0,0,+0,0,3,240,0,0,1,229,0,153,0,0,0,0,0,0,12,240,0,47,16,0,0,2,+241,0,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,229,0,0,0,0,0,0,0,0,0,46,48,0,0,0,0,0,93,16,3,240,+0,0,0,0,0,46,68,228,0,0,0,0,48,0,0,0,0,0,0,0,3,240,0,0,+8,192,0,47,48,0,0,0,0,0,94,240,0,14,64,0,0,0,228,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,78,112,0,+0,0,0,0,0,1,0,7,210,0,0,0,0,3,228,0,3,240,0,0,0,0,0,6,+238,64,0,0,0,3,192,0,0,0,0,0,0,0,3,240,0,0,94,48,0,7,210,0,+0,0,0,3,230,240,0,9,160,0,0,0,154,0,0,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,204,64,0,0,0,0,5,213,+0,0,157,48,0,0,0,78,112,0,3,240,0,0,0,0,0,0,142,80,0,0,0,110,+112,0,0,0,0,0,0,0,3,240,0,7,228,0,0,0,157,48,0,0,0,78,99,240,+0,2,231,0,0,0,46,112,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,6,221,132,33,18,88,221,96,0,0,6,234,82,18,+91,229,0,0,3,240,0,0,0,0,0,0,6,235,81,19,108,229,0,0,0,0,0,0,+0,0,3,241,38,204,32,0,0,0,6,234,82,18,91,229,3,240,0,0,62,163,16,0,+3,234,49,0,0,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,156,239,254,201,64,0,0,0,0,23,206,254,199,16,0,0,3,240,+0,0,0,0,0,0,0,23,206,254,199,16,0,0,0,0,0,0,0,0,3,254,217,64,+0,0,0,0,0,23,206,254,182,16,3,240,0,0,1,141,192,0,0,24,220,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+};+const Mask logo={180,48,logo_pix};+const uint8_t go_pix[]={+0,0,0,0,0,0,0,0,0,0,20,121,153,135,65,0,0,0,0,0,0,0,0,0,+0,3,87,136,134,65,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,91,255,219,170,188,255,198,16,0,0,0,0,0,0,0,74,239,236,187,205,255,182,16,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,93,250,65,0,0,0,20,158,+231,0,0,0,0,0,0,76,251,98,0,0,0,20,158,231,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,26,249,32,0,0,0,0,0,1,143,16,0,0,0,0,9,250,+48,0,0,0,0,0,1,143,194,0,0,0,0,0,0,0,0,0,0,0,0,0,2,221,+64,0,0,0,0,0,0,0,2,0,0,0,0,1,206,80,0,0,0,0,0,0,0,2,+206,64,0,0,0,0,0,0,0,0,0,0,0,0,46,193,0,0,0,0,0,0,0,0,+0,0,0,0,0,45,210,0,0,0,0,0,0,0,0,0,10,245,0,0,0,0,0,0,+0,0,0,0,0,1,220,16,0,0,0,0,0,0,0,0,0,0,0,0,1,221,16,0,+0,0,0,0,0,0,0,0,0,159,64,0,0,0,0,0,0,0,0,0,0,11,209,0,+0,0,0,0,0,0,0,0,0,0,0,0,11,226,0,0,0,0,0,0,0,0,0,0,+0,11,226,0,0,0,0,0,0,0,0,0,0,127,48,0,0,0,0,0,0,0,0,0,+0,0,0,0,111,64,0,0,0,0,0,0,0,0,0,0,0,1,219,0,0,0,0,0,+0,0,0,0,2,232,0,0,0,0,0,0,0,0,0,0,0,0,0,1,233,0,0,0,+0,0,0,0,0,0,0,0,0,0,95,80,0,0,0,0,0,0,0,0,8,225,0,0,+0,0,0,0,0,0,0,0,0,0,0,8,225,0,0,0,0,0,0,0,0,0,0,0,+0,0,11,192,0,0,0,0,0,0,0,0,14,128,0,0,0,0,0,0,0,0,0,0,+0,0,0,14,144,0,0,0,0,0,0,0,0,0,0,0,0,0,4,244,0,0,0,0,+0,0,0,0,95,48,0,0,0,0,0,0,0,0,0,0,0,0,0,79,48,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,233,0,0,0,0,0,0,0,0,158,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,158,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,173,0,0,0,0,0,0,0,0,202,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,203,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,111,16,0,0,0,+0,0,0,0,232,0,0,0,0,0,0,0,0,0,0,0,0,0,0,232,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,79,48,0,0,0,0,0,0,0,247,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,247,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,63,64,0,0,0,0,0,0,0,247,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,247,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,63,64,0,0,0,+0,0,0,0,231,0,0,0,0,0,0,0,0,0,0,0,0,0,0,247,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,63,64,0,0,0,0,0,0,0,217,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,217,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,79,32,0,0,0,0,0,0,0,171,0,0,0,0,0,4,221,221,221,221,221,+221,16,0,187,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,+0,0,0,0,126,0,0,0,0,0,2,102,102,102,102,102,175,16,0,142,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,172,0,0,0,0,0,0,0,0,63,64,0,0,+0,0,0,0,0,0,0,0,111,16,0,79,48,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,232,0,0,0,0,0,0,0,0,13,160,0,0,0,0,0,0,0,0,0,0,+111,16,0,13,144,0,0,0,0,0,0,0,0,0,0,0,0,0,5,243,0,0,0,0,+0,0,0,0,6,242,0,0,0,0,0,0,0,0,0,0,111,16,0,7,225,0,0,0,+0,0,0,0,0,0,0,0,0,0,12,176,0,0,0,0,0,0,0,0,0,218,0,0,+0,0,0,0,0,0,0,0,111,16,0,1,233,0,0,0,0,0,0,0,0,0,0,0,+0,0,95,64,0,0,0,0,0,0,0,0,0,79,80,0,0,0,0,0,0,0,0,0,+111,16,0,0,95,64,0,0,0,0,0,0,0,0,0,0,0,1,234,0,0,0,0,0,+0,0,0,0,0,9,226,0,0,0,0,0,0,0,0,0,111,16,0,0,10,226,0,0,+0,0,0,0,0,0,0,0,0,11,209,0,0,0,0,0,0,0,0,0,0,0,205,32,+0,0,0,0,0,0,0,0,111,16,0,0,1,205,16,0,0,0,0,0,0,0,0,0,+0,174,48,0,0,0,0,0,0,0,0,0,0,0,28,227,0,0,0,0,0,0,0,0,+111,16,0,0,0,29,210,0,0,0,0,0,0,0,0,0,26,244,0,0,0,0,0,0,+0,0,0,0,0,0,1,191,96,0,0,0,0,0,0,0,111,16,0,0,0,1,206,80,+0,0,0,0,0,0,0,2,206,64,0,0,0,0,0,0,0,0,0,0,0,0,0,7,+252,64,0,0,0,0,0,3,175,16,0,0,0,0,25,250,48,0,0,0,0,0,1,143,+194,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42,252,115,0,0,0,55,207,+214,0,0,0,0,0,0,76,251,98,0,0,0,21,158,231,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,56,223,253,204,223,254,165,0,0,0,0,0,0,0,0,+90,255,236,187,189,255,199,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,1,70,119,101,48,0,0,0,0,0,0,0,0,0,0,4,104,137,135,65,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,+};+const Mask go={80,53,go_pix};+const Level levels[60]={+{4,8,0},+{6,10,0},+{2,20,0},+{8,12,1},+{12,8,0},+{10,10,1},+{12,12,0},+{16,3,1},+{0,26,1},+{16,10,0},+{10,8,2},+{6,12,3},+{12,4,2},+{8,14,3},+{8,6,2},+{5,10,3},+{6,12,2},+{8,14,3},+{0,23,2},+{10,13,3},+{4,12,4},+{6,10,4},+{8,12,4},+{7,14,4},+{2,18,4},+{4,18,4},+{0,24,4},+{4,10,5},+{6,13,5},+{4,20,4},+{6,8,6},+{2,12,7},+{3,14,7},+{3,18,6},+{8,12,6},+{7,15,7},+{16,8,7},+{0,23,6},+{12,12,6},+{12,15,7},+{5,10,10},+{6,12,10},+{3,15,10},+{3,19,10},+{0,24,10},+{2,15,11},+{4,16,11},+{12,8,11},+{3,20,11},+{16,14,11},+{4,6,8},+{4,12,9},+{6,13,8},+{0,24,9},+{4,21,8},+{16,16,0},+{4,24,4},+{4,26,6},+{4,25,11},+{13,19,11}};+const uint8_t preset_offset[]={+0,0,0,2,5,9,14,20,27,35,44,54,65,77,90,104,119,+};+const uint16_t preset_angle[]={+0,180,0,120,240,0,90,180,270,0,72,144,216,288,0,60,120,180,240,300,0,52,103,155,+206,258,309,0,45,90,135,180,225,270,315,0,40,80,120,160,200,240,280,320,0,36,72,108,+144,180,216,252,288,324,0,33,66,99,131,164,197,230,262,295,328,0,30,60,90,120,150,180,+210,240,270,300,330,0,28,56,84,111,139,167,194,222,250,277,305,333,0,26,52,78,103,129,+155,180,206,232,258,283,309,335,0,24,48,72,96,120,144,168,192,216,240,264,288,312,336,0,+23,45,68,90,113,135,158,180,203,225,248,270,293,315,338,+};diff --git a/games/coreball/src/assets.h b/games/coreball/src/assets.hnew file mode 100644index 00000000..4caa4ad0--- /dev/null+++ b/games/coreball/src/assets.h@@ -0,0 +1,14 @@+#ifndef ASSETS_H+#define ASSETS_H+#include <stdint.h>+typedef struct {uint16_t w,h;const uint8_t *pixels;const uint16_t *palette;} Image;+typedef struct {uint16_t offset;uint8_t w,h;int8_t xoff,yoff;uint8_t advance;} Glyph;+typedef struct {const Glyph*glyphs;const uint8_t*pixels;} Font;+extern const Font fonts[3];+typedef struct {uint16_t w,h;const uint8_t*pixels;} Mask;+extern const Mask logo,go;+typedef struct {uint8_t pins,shots,motion;} Level;+extern const Level levels[60];+extern const uint8_t preset_offset[];+extern const uint16_t preset_angle[];+#endifdiff --git a/games/coreball/src/canvas.h b/games/coreball/src/canvas.hnew file mode 100644index 00000000..6dd79617--- /dev/null+++ b/games/coreball/src/canvas.h@@ -0,0 +1,47 @@+#ifndef CANVAS_H+#define CANVAS_H+#include "assets.h"+#include <stdbool.h>+#include <stdint.h>+#define RGB(r,g,b) ((((r)>>3)<<11)|(((g)>>2)<<5)|((b)>>3))+typedef void (*Push)(int,int,int,int,const uint16_t *);+static uint16_t strip[320*8];+static uint32_t hashes[30];+static int band;+static inline void invalidate(void){for(int i=0;i<30;i++)hashes[i]=0;}+static inline void pixel(int x,int y,uint16_t c){if((unsigned)x<320&&(unsigned)(y-band)<8)strip[(y-band)*320+x]=c;}+static inline void rect(int x,int y,int w,int h,uint16_t c){int x0=x<0?0:x,x1=x+w>320?320:x+w,y0=y<band?band:y,y1=y+h>band+8?band+8:y+h;for(int j=y0;j<y1;j++)for(int i=x0;i<x1;i++)strip[(j-band)*320+i]=c;}+static inline unsigned line_region(int x,int y){return (x<0?1:x>319?2:0)|(y<band?4:y>band+7?8:0);}+static inline void line(int x,int y,int x1,int y1,uint16_t c){+ /* Clip to the current strip before rasterising. Victory spokes extend well+ * outside the screen and must never cause thousands of invisible steps. */+ for(unsigned n=0;n<8;n++){unsigned a=line_region(x,y),b=line_region(x1,y1);if(!(a|b))break;if(a&b)return;unsigned out=a?a:b;int px,py;if(out&12){py=out&4?band:band+7;px=x+(x1-x)*(py-y)/(y1-y);}else{px=out&1?0:319;py=y+(y1-y)*(px-x)/(x1-x);}if(out==a)x=px,y=py;else x1=px,y1=py;}+ int dx=x1>x?x1-x:x-x1,sx=x<x1?1:-1,dy=y1>y?y-y1:y1-y,sy=y<y1?1:-1,e=dx+dy;for(;;){pixel(x,y,c);if(x==x1&&y==y1)break;int v=2*e;if(v>=dy){e+=dy;x+=sx;}if(v<=dx){e+=dx;y+=sy;}}+}+static inline void circle(int cx,int cy,int r,uint16_t c){int y0=cy-r<band?band:cy-r,y1=cy+r>band+7?band+7:cy+r;for(int y=y0;y<=y1;y++)for(int x=cx-r;x<=cx+r;x++)if((x-cx)*(x-cx)+(y-cy)*(y-cy)<=r*r)pixel(x,y,c);}+static inline uint16_t blend(uint16_t a,uint16_t b,unsigned n){unsigned r=(((a>>11)*n+(b>>11)*(3-n))+1)/3,g=((((a>>5)&63)*n+((b>>5)&63)*(3-n))+1)/3,v=(((a&31)*n+(b&31)*(3-n))+1)/3;return (uint16_t)((r<<11)|(g<<5)|v);}+static inline const Font* text_font(int size){return &fonts[size<1?0:size>3?2:size-1];}+static inline uint16_t blend_alpha(uint16_t a,uint16_t b,unsigned n){+ unsigned inv=15-n,r=((a>>11)*n+(b>>11)*inv+7)/15;+ unsigned g=(((a>>5)&63)*n+((b>>5)&63)*inv+7)/15,v=((a&31)*n+(b&31)*inv+7)/15;+ return (uint16_t)((r<<11)|(g<<5)|v);+}+static inline unsigned glyph_index(unsigned ch){return ch<32||ch>126?'?'-32:ch-32;}+static inline void glyph(int x,int y,unsigned ch,uint16_t color,int size){+ const Font*f=text_font(size);const Glyph*g=&f->glyphs[glyph_index(ch)];x+=g->xoff;y+=g->yoff;+ int y0=y<band?band:y,y1=y+g->h>band+8?band+8:y+g->h;+ for(int py=y0;py<y1;py++)for(unsigned k=0;k<g->w;k++){+ int px=x+(int)k;if((unsigned)px>=320)continue;+ unsigned i=(py-y)*g->w+k,v=f->pixels[g->offset+i/2],a=(i&1)?v&15:v>>4;+ if(a){uint16_t*p=&strip[(py-band)*320+px];*p=a==15?color:blend_alpha(color,*p,a);}+ }+}+static inline int text_width(const char*s,int size){const Font*f=text_font(size);int w=0;for(;*s;s++)w+=f->glyphs[glyph_index((unsigned char)*s)].advance;return w;}+static inline void text(int x,int y,const char*s,uint16_t c,int size){const Font*f=text_font(size);for(;*s;s++){unsigned i=glyph_index((unsigned char)*s);glyph(x,y,(unsigned char)*s,c,size);x+=f->glyphs[i].advance;}}+static inline void center(int x,int y,const char*s,uint16_t c,int scale){text(x-text_width(s,scale)/2,y,s,c,scale);}+static inline void number(int x,int y,uint32_t n,uint16_t c,int scale,bool centered){char s[11],rev[10];int count=0;do{rev[count++]=(char)('0'+n%10);n/=10;}while(n);for(int i=0;i<count;i++)s[i]=rev[count-1-i];s[count]=0;if(centered)center(x,y,s,c,scale);else text(x,y,s,c,scale);}+static inline uint16_t image_color(const Image *im,int x,int y){unsigned i=y*im->w+x,v=im->pixels[i/2];return im->palette[(i&1)?v&15:v>>4];}+static inline void image(const Image*im,int x,int y,int width,int height){int y0=y<band?band:y,y1=y+height>band+8?band+8:y+height;for(int py=y0;py<y1;py++)for(int px=x<0?0:x;px<x+width&&px<320;px++){unsigned sx=(unsigned)((px-x)*im->w/width),sy=(unsigned)((py-y)*im->h/height),i=sy*im->w+sx,v=im->pixels[i/2],n=(i&1)?v&15:v>>4;if(n)pixel(px,py,im->palette[n]);}}+static inline void outline(int x,int y,int w,int h,uint16_t c){rect(x,y,w,1,c);rect(x,y+h-1,w,1,c);rect(x,y,1,h,c);rect(x+w-1,y,1,h,c);}+static inline void present(Push push){uint32_t h=2166136261u;for(unsigned i=0;i<320*8;i++)h=(h^strip[i])*16777619u;if(h!=hashes[band/8]){hashes[band/8]=h;push(0,band,320,8,strip);}}+#endifdiff --git a/games/coreball/src/game.c b/games/coreball/src/game.cnew file mode 100644index 00000000..8c580857--- /dev/null+++ b/games/coreball/src/game.c@@ -0,0 +1,34 @@+#include "game.h"+#include "assets.h"+#include <math.h>+#include <string.h>+#define DEG .01745329251994329577f+void game_new(Game*g,unsigned level){memset(g,0,sizeof(*g));if(level>=60)level=59;g->level=(uint8_t)level;const Level*l=&levels[level];g->count=l->pins;g->remaining=l->shots;g->motion=l->motion;for(unsigned i=0;i<g->count;i++)g->pins[i]=preset_angle[preset_offset[l->pins]+i];}+void pin_position(const Game*g,unsigned i,float*x,float*y){float a=(g->pins[i]+g->angle)*DEG,r=64.285714f;if(g->phase==CLEARED)r+=25*g->phase_age;*x=160+cosf(a)*r;*y=85.714286f+sinf(a)*r;}+/* Test in the reference's 560-pixel world. Rounding radii after shrinking+ * to 240 pixels artificially closes the narrow gaps in the last levels. */+bool game_collision(const Game*g,float x,float y){for(unsigned i=0;i<g->count;i++){float px,py;pin_position(g,i,&px,&py);float dx=(x-px)*(7.f/3),dy=(y-py)*(7.f/3);int distance=(int)sqrtf(floorf(dx*dx)+floorf(dy*dy));if(distance<=26)return true;}return false;}+void game_step(Game*g,bool fire){+ if(g->ready)return;+ ++g->tick;+ if(g->phase!=RUNNING){if(++g->phase_age>=60)g->ready=1;return;}+ unsigned m=g->motion;+ if(fire&&g->remaining&&m>=10)g->direction^=1;+ if(m==4||m==5){unsigned interval=m==4?180:120;if(++g->motion_age>interval){g->motion_age=0;g->direction^=1;}}+ else if((m>=6&&m<=9)||m==11){unsigned interval=m==11?60:m<8?72:102;if(++g->motion_age>interval){g->motion_age=0;g->speed_phase^=1;}}+ float speed=m<2?1.5f:m<4?2.5f:m==4?2.2f:m==5?3.5f:m<8||m>=10?(g->speed_phase?.3f:2.f):(g->speed_phase?.5f:4.f);+ if(m==1||m==3||m==7||m==9)speed=-speed;+ if(g->direction)speed=-speed;+ g->speed=speed;g->angle=fmodf(g->angle+speed+360.f,360.f);+ for(unsigned i=0;i<6;i++)if(g->flights[i]){+ if(--g->flights[i]==0){+ if(game_collision(g,160,156.f)){g->phase=FAILED;g->phase_age=0;return;}+ if(g->count<MAX_PINS)g->pins[g->count++]=90-g->angle;+ }+ }+ if(fire&&g->remaining){for(unsigned i=0;i<6;i++)if(!g->flights[i]){g->flights[i]=3;--g->remaining;break;}}+ bool flying=false;for(unsigned i=0;i<6;i++)flying|=g->flights[i]!=0;+ if(!g->remaining&&!flying){g->phase=CLEARED;g->phase_age=0;}+}+void game_finish(Stats*s,const Game*g){if(g->phase==CLEARED){unsigned next=g->level+1;if(next>s->unlocked)s->unlocked=next;s->current=next<60?next:59;}}+bool game_valid(const Game*g){return g->level<60&&g->count<=MAX_PINS&&g->remaining<=26&&g->motion<12&&g->phase<=CLEARED&&isfinite(g->angle)&&g->angle>=0&&g->angle<360;}diff --git a/games/coreball/src/game.h b/games/coreball/src/game.hnew file mode 100644index 00000000..e33c0e0f--- /dev/null+++ b/games/coreball/src/game.h@@ -0,0 +1,25 @@+#ifndef GAME_H+#define GAME_H+#include <stdbool.h>+#include <stddef.h>+#include <stdint.h>+#define SAVE_BYTES 24+#define LEVEL_COUNT 60+#define MAX_PINS 32+enum {TITLE,PLAY,PAUSE,RESULT,LEVELS,HELP,SAVE_ERROR};+enum {RUNNING,FAILED,CLEARED};+typedef struct {uint32_t current,unlocked,runs,taps;} Stats;+typedef struct {+ float angle,pins[MAX_PINS],speed;+ uint32_t tick,phase_age,motion_age;+ uint8_t level,count,remaining,motion,phase,flights[6],direction,speed_phase,ready;+} Game;+void game_new(Game*,unsigned);+void game_step(Game*,bool fire);+void game_finish(Stats*,const Game*);+bool game_valid(const Game*);+void pin_position(const Game*,unsigned,float*,float*);+bool game_collision(const Game*,float,float);+void save_encode(const Stats*,uint8_t*);+bool save_decode(Stats*,const uint8_t*,size_t);+#endifdiff --git a/games/coreball/src/icon.png b/games/coreball/src/icon.pngnew file mode 100644index 00000000..7b88cb5fBinary files /dev/null and b/games/coreball/src/icon.png differdiff --git a/games/coreball/src/main.c b/games/coreball/src/main.cnew file mode 100644index 00000000..c744c036--- /dev/null+++ b/games/coreball/src/main.c@@ -0,0 +1,49 @@+#include <eadk.h>+#include "render.h"+#include "../../common/epsilon_app.h"+#include "../../common/epsilon_files.h"+#ifdef __ELF__+const char eadk_app_name[] __attribute__((section(".rodata.eadk_app_name")))="Core Ball";+const uint32_t eadk_api_level __attribute__((section(".rodata.eadk_api_level")))=0;+#endif+#define KEY(k) (UINT64_C(1)<<(k))+static Game game;+static Stats stats;+static uint8_t save_data[SAVE_BYTES];+static bool saved,save_failed;+static uint32_t last_hash;+uint32_t perf_frames,perf_max,perf_slow,current_view;+static void push(int x,int y,int w,int h,const uint16_t*p){eadk_display_push_rect((eadk_rect_t){x,y,w,h},p);}+static bool save(void){save_encode(&stats,save_data);uint32_t h=0;for(unsigned i=SAVE_BYTES-4;i<SAVE_BYTES;i++)h=(h<<8)|save_data[i];if(saved&&h==last_hash&&!save_failed)return true;save_failed=!ef_write("coreball.sav",save_data,SAVE_BYTES);if(!save_failed)saved=true,last_hash=h;return !save_failed;}+static void fresh(unsigned level){if(stats.runs<UINT32_MAX)++stats.runs;stats.current=level;game_new(&game,level);}+int main(void){+ np_app_begin();uint32_t n=0;const uint8_t*p=ef_read("coreball.sav",&n);save_decode(&stats,p,n);game_new(&game,stats.current);+ unsigned view=TITLE,selected=0,error_return=TITLE,error_selection=0;bool ongoing=false,pending=false;+ uint64_t previous=0,keys=eadk_keyboard_scan(),stale=keys;uint32_t now=(uint32_t)eadk_timing_millis(),last=now,draw_at=now,accum=0;+ render_invalidate();+ for(;;){+ now=(uint32_t)eadk_timing_millis();uint32_t elapsed=now-last;last=now;keys=eadk_keyboard_scan();stale&=keys;uint64_t active=keys&~stale,hit=active&~previous;previous=active;+ bool ok=(hit&(KEY(eadk_key_ok)|KEY(eadk_key_exe)))!=0,back=(hit&KEY(eadk_key_back))!=0,right=(hit&KEY(eadk_key_right))!=0,left=(hit&KEY(eadk_key_left))!=0,down=(hit&KEY(eadk_key_down))!=0,up=(hit&KEY(eadk_key_up))!=0;+ if(view!=SAVE_ERROR&&(keys&(KEY(eadk_key_home)|KEY(eadk_key_on_off)))){if(save())break;error_return=view==PLAY?PAUSE:view;error_selection=selected;view=SAVE_ERROR;ok=back=right=left=up=down=false;stale=keys;}+ if(view==PLAY){+ if(back){view=PAUSE;selected=0;pending=false;save();}+ else{pending|=(hit&(KEY(eadk_key_ok)|KEY(eadk_key_exe)|KEY(eadk_key_shift)))!=0;if(elapsed>100)elapsed=100;accum+=elapsed*60;+ while(accum>=1000){unsigned phase=game.phase;if(pending&&game.remaining&&game.phase==RUNNING&&stats.taps<UINT32_MAX)++stats.taps;game_step(&game,pending);pending=false;accum-=1000;if(phase==RUNNING&&game.phase==CLEARED){game_finish(&stats,&game);save();}}+ if(game.ready)view=RESULT,selected=0,ongoing=false;+ }+ }else{+ accum=0;pending=false;+ if(view==TITLE){if(right||down)selected=(selected+1)%3;if(left||up)selected=(selected+2)%3;if(back){if(save())break;error_return=TITLE;error_selection=selected;view=SAVE_ERROR;}+ else if(ok){if(selected==0){if(!ongoing)fresh(stats.current);ongoing=true;view=PLAY;stale|=keys;}else if(selected==1)view=LEVELS,selected=stats.current;else view=HELP;}}+ else if(view==PAUSE){if(down||right)selected=(selected+1)%3;if(up||left)selected=(selected+2)%3;if(back||(ok&&selected==0))view=PLAY,stale|=keys;else if(ok&&selected==1)fresh(game.level),view=PLAY,stale|=keys;else if(ok&&selected==2)view=TITLE,selected=0;}+ else if(view==RESULT){if(up||down||left||right)selected^=1;if(back||(ok&&selected==1))view=TITLE,selected=0;else if(ok){unsigned level=game.phase==CLEARED&&game.level<59?game.level+1:game.level;fresh(level);ongoing=true;view=PLAY;stale|=keys;}}+ else if(view==LEVELS){unsigned limit=stats.unlocked<60?stats.unlocked:59;if(right&&selected<limit)++selected;if(left&&selected)--selected;if(down)selected=selected+5>limit?limit:selected+5;if(up)selected=selected<5?0:selected-5;if(back)view=TITLE,selected=1;else if(ok)fresh(selected),ongoing=true,view=PLAY,stale|=keys;}+ else if(view==HELP){if(back||ok)view=TITLE,selected=2;}+ else if(view==SAVE_ERROR){if(back)break;if(ok&&save())break;if(hit&KEY(eadk_key_one))view=error_return,selected=error_selection;}+ }+ current_view=view;+ if(now-draw_at>=33||hit||!perf_frames){uint32_t start=(uint32_t)eadk_timing_millis();render(&game,&stats,view,selected,ongoing,save_failed,now,push);uint32_t spent=(uint32_t)eadk_timing_millis()-start;if(spent>perf_max)perf_max=spent;if(spent>33)++perf_slow;++perf_frames;draw_at=now;}+ eadk_timing_msleep(2);+ }+ uint32_t released=(uint32_t)eadk_timing_millis();while(eadk_keyboard_scan()&&(uint32_t)eadk_timing_millis()-released<2000)eadk_timing_msleep(10);return np_app_end();+}diff --git a/games/coreball/src/render.c b/games/coreball/src/render.cnew file mode 100644index 00000000..83c42221--- /dev/null+++ b/games/coreball/src/render.c@@ -0,0 +1,42 @@+#include "render.h"+#include "canvas.h"+#include <math.h>+#define BLACK 0+#define WHITE 65535+#define GREY RGB(200,200,200)+static void tiny_digit(int x,int y,unsigned n,uint16_t c){const uint16_t digits[]={31599,11415,29671,29647,23497,31183,31215,29257,31727,31695};uint16_t bits=digits[n%10];for(int j=0;j<5;j++)for(int i=0;i<3;i++)if(bits&(1u<<(14-j*3-i)))pixel(x+i,y+j,c);}+static void tiny_number(int x,int y,unsigned n){if(n>=10){tiny_digit(x-3,y,n/10,BLACK);tiny_digit(x+1,y,n%10,BLACK);}else tiny_digit(x-1,y,n,BLACK);}+static void button(int x,int y,int w,int h,const char*label,bool on){if(on)rect(x,y,w,h,BLACK);outline(x,y,w,h,BLACK);center(x+w/2,y+(h-14)/2,label,on?WHITE:BLACK,1);}+static void round_rect(int x,int y,int w,int h,int r,uint16_t c){rect(x+r,y,w-2*r,h,c);rect(x,y+r,w,h-2*r,c);circle(x+r,y+r,r,c);circle(x+w-r-1,y+r,r,c);circle(x+r,y+h-r-1,r,c);circle(x+w-r-1,y+h-r-1,r,c);}+static void mask(const Mask*im,int x,int y){for(int py=y<band?band:y;py<y+im->h&&py<band+8;py++)for(int px=0;px<im->w;px++){unsigned i=(py-y)*im->w+px,v=im->pixels[i/2],a=i&1?v&15:v>>4;if(a&&(unsigned)(x+px)<320){uint16_t*p=&strip[(py-band)*320+x+px];*p=blend_alpha(BLACK,*p,a);}}}+void render_invalidate(void){invalidate();}+void render(const Game*g,const Stats*s,unsigned view,unsigned selected,bool ongoing,bool failed,uint32_t now,Push push){+ (void)ongoing;(void)now;+ for(band=0;band<240;band+=8){+ uint16_t bg=view==PLAY?(g->phase==FAILED?RGB(184,17,28):g->phase==CLEARED?RGB(28,176,26):BLACK):GREY;+ rect(0,band,320,8,bg);+ if(view==PLAY){+ for(unsigned i=0;i<g->count;i++){float x,y;pin_position(g,i,&x,&y);line(160,86,(int)lroundf(x),(int)lroundf(y),WHITE);circle((int)lroundf(x),(int)lroundf(y),5,WHITE);}+ circle(160,86,21,WHITE);number(160,78,g->level+1,BLACK,2,true);+ for(unsigned i=0;i<g->remaining&&i<5;i++){int y=171+(int)i*15;circle(160,y,5,WHITE);tiny_number(160,y-2,g->remaining-i);}+ for(unsigned i=0;i<6;i++)if(g->flights[i])circle(160,156+g->flights[i]*5,5,WHITE);+ if(g->phase==FAILED){unsigned radii[]={25,15,20,15};unsigned step=g->phase_age/3;if(step>3)step=3;line(160,86,160,150,WHITE);circle(160,150,(int)(radii[step]*(3.f/7)),WHITE);}+ text(10,8,"CORE BALL",WHITE,1);text(10,220,"BACK: PAUSE",RGB(160,160,160),1);+ }else if(view==TITLE){+ mask(&logo,70,23);round_rect(111,88,98,98,10,BLACK);round_rect(112,89,96,96,9,selected==0?RGB(230,230,230):GREY);mask(&go,120,101);text(129,156,"Level",BLACK,1);number(182,156,s->current+1,BLACK,1,true);+ button(12,112,82,32,"LEVELS",selected==1);button(226,112,82,32,"HOW TO",selected==2);+ text(10,222,"By Bobydeluxe",BLACK,1);if(s->unlocked==60)text(226,222,"60 / 60",BLACK,1);+ }else if(view==LEVELS){+ center(160,15,"SELECT LEVEL",BLACK,1);unsigned page=selected/20;+ for(unsigned i=page*20;i<page*20+20;i++){int x=22+(int)(i%5)*58,y=47+(int)((i%20)/5)*39;bool open=i<=s->unlocked;if(i==selected)rect(x,y,44,29,BLACK);else outline(x,y,44,29,open?BLACK:RGB(170,170,170));if(open)number(x+22,y+6,i+1,i==selected?WHITE:BLACK,1,true);else center(x+22,y+6,"-",RGB(150,150,150),1);}+ center(160,218,"ARROWS: SELECT OK: PLAY BACK: MENU",BLACK,1);+ }else if(view==HELP){+ center(160,26,"HOW TO PLAY",BLACK,2);center(160,83,"Press OK, EXE or SHIFT to launch a pin.",BLACK,1);+ center(160,113,"Place every pin on the rotating core.",BLACK,1);center(160,143,"Do not touch another pin.",BLACK,1);center(160,187,"60 original levels. Timing is everything.",BLACK,1);center(160,220,"OK / BACK: RETURN",BLACK,1);+ }else if(view==SAVE_ERROR){center(160,42,"STORAGE FULL",BLACK,2);center(160,104,"Progress could not be saved.",BLACK,1);center(160,145,"OK: RETRY SAVE AND EXIT",BLACK,1);center(160,174,"1: KEEP PLAYING",BLACK,1);center(160,203,"BACK: EXIT WITHOUT SAVING",BLACK,1);+ }else if(view==PAUSE){center(160,38,"PAUSED",BLACK,2);button(84,94,152,32,"RESUME",selected==0);button(84,136,152,32,"RESTART",selected==1);button(84,178,152,32,"MENU",selected==2);+ }else{center(160,26,g->phase==CLEARED?"WELL DONE!":"TRY AGAIN",BLACK,2);number(160,78,g->level+1,BLACK,2,true);center(160,125,g->level==59&&g->phase==CLEARED?"TO BE CONTINUED...":"Core Ball",BLACK,1);button(50,167,102,38,g->phase==CLEARED&&g->level<59?"NEXT":"RETRY",selected==0);button(168,167,102,38,"MENU",selected==1);}+ if(failed&&view!=SAVE_ERROR)text(8,8,"SAVE FAILED",RGB(184,17,28),1);+ present(push);+ }+}diff --git a/games/coreball/src/render.h b/games/coreball/src/render.hnew file mode 100644index 00000000..f74d0936--- /dev/null+++ b/games/coreball/src/render.h@@ -0,0 +1,7 @@+#ifndef RENDER_H+#define RENDER_H+#include "game.h"+typedef void (*Push)(int,int,int,int,const uint16_t*);+void render(const Game*,const Stats*,unsigned,unsigned,bool,bool,uint32_t,Push);+void render_invalidate(void);+#endifdiff --git a/games/coreball/src/save.c b/games/coreball/src/save.cnew file mode 100644index 00000000..2477fddf--- /dev/null+++ b/games/coreball/src/save.c@@ -0,0 +1,7 @@+#include "game.h"+#include <string.h>+static void put(uint8_t*p,uint32_t v){for(int i=0;i<4;i++)p[i]=(uint8_t)(v>>(i*8));}+static uint32_t get(const uint8_t*p){return (uint32_t)p[0]|(uint32_t)p[1]<<8|(uint32_t)p[2]<<16|(uint32_t)p[3]<<24;}+static uint32_t checksum(const uint8_t*p){uint32_t h=2166136261u;for(int i=0;i<SAVE_BYTES-4;i++)h=(h^p[i])*16777619u;return h;}+void save_encode(const Stats*s,uint8_t*out){memset(out,0,SAVE_BYTES);memcpy(out,"CRB1",4);put(out+4,s->current);put(out+8,s->unlocked);put(out+12,s->runs);put(out+16,s->taps);put(out+20,checksum(out));}+bool save_decode(Stats*s,const uint8_t*p,size_t n){if(!p||n!=SAVE_BYTES||memcmp(p,"CRB1",4)||get(p+20)!=checksum(p)||get(p+4)>=60||get(p+8)>60||get(p+4)>get(p+8))return false;*s=(Stats){get(p+4),get(p+8),get(p+12),get(p+16)};return true;}diff --git a/games/coreball/tests/fidelity.c b/games/coreball/tests/fidelity.cnew file mode 100644index 00000000..960da9a5--- /dev/null+++ b/games/coreball/tests/fidelity.c@@ -0,0 +1,5 @@+#include "game.h"+#include <assert.h>+#include <math.h>+#include <stdio.h>+int main(void){FILE*f=fopen("reference.bin","rb");assert(f);float worst=0;for(unsigned level=0;level<60;level++){Game g;game_new(&g,level);for(unsigned frame=1;frame<=1100;frame++){g.count=0;g.remaining=26;for(unsigned i=0;i<6;i++)g.flights[i]=0;game_step(&g,frame%137==0);float expected;assert(fread(&expected,4,1,f)==1);float error=fabsf(remainderf(g.angle-expected,360));if(error>worst)worst=error;if(error>.03f){printf("Mismatch level %u frame %u: %.5f vs %.5f\n",level+1,frame,g.angle,expected);return 1;}}}fclose(f);printf("PASS: 66000 source motion samples; worst angular error %.5f degrees\n",worst);return 0;}diff --git a/games/coreball/tests/reference.cjs b/games/coreball/tests/reference.cjsnew file mode 100644index 00000000..b177ad46--- /dev/null+++ b/games/coreball/tests/reference.cjs@@ -0,0 +1,16 @@+/* Execute the pinned game's actual level and motion functions, not a rewrite. */+const fs=require('fs'),vm=require('vm'),crypto=require('crypto'),path=require('path');+const root=path.resolve(__dirname,'..');+const file=process.argv[2]||path.resolve(root,'../../build/coreball-reference/js/index.js');+const source=fs.readFileSync(file,'utf8'),provenance=JSON.parse(fs.readFileSync(path.join(root,'assets/provenance.json'),'utf8'));+if(crypto.createHash('sha256').update(source).digest('hex')!==provenance.javascript_sha256)throw Error('Wrong source revision');+const code=source.slice(source.indexOf('$AJB.general.Levels = function()'),source.indexOf(' $AJB.general.Collide = function()')).trim().replace(/,$/,'');+const frames=1100,bytes=Buffer.alloc(60*frames*4);let offset=0;+for(let level=1;level<=60;level++){+ let now=0,handlers=[];const context={document:{body:{}},Date:class{valueOf(){return Math.floor(now)}},$AJB:{general:{},lib:{addEvent:()=>((element,event,callback)=>handlers.push(callback))}}};+ vm.runInNewContext(code,context);const levels=context.$AJB.general.Levels(),entry=levels[level],recipe=JSON.parse(fs.readFileSync(path.join(root,'assets/levels.json'),'utf8'))[level];+ if(entry.childs.length!==+recipe[0]||entry.queueCount!==recipe[1])throw Error('Level mismatch '+level);+ const motion=entry.round();+ for(let frame=1;frame<=frames;frame++){now=frame*1000/60;if(frame%137===0)handlers.forEach(h=>h());let angle=((motion()%360)+360)%360;bytes.writeFloatLE(angle,offset);offset+=4;}+}+fs.mkdirSync(path.join(root,'output'),{recursive:true});fs.writeFileSync(path.join(root,'output/reference.bin'),bytes);console.log('Actual source: 60 levels, '+(frames*60)+' motion samples');diff --git a/games/coreball/tests/test.c b/games/coreball/tests/test.cnew file mode 100644index 00000000..a5404e0e--- /dev/null+++ b/games/coreball/tests/test.c@@ -0,0 +1,39 @@+#include "game.h"+#include "assets.h"+#include "render.h"+#include <assert.h>+#include <math.h>+#include <stdio.h>+#include <string.h>+static uint16_t frame[320*240];+static void push(int x,int y,int w,int h,const uint16_t*p){assert(x>=0&&y>=0&&x+w<=320&&y+h<=240);for(int j=0;j<h;j++)memcpy(frame+(y+j)*320+x,p+j*w,w*2);}+static void screenshot(const char*name,Game*g,Stats*s,unsigned view,unsigned selected){render_invalidate();render(g,s,view,selected,false,false,400,push);FILE*f=fopen(name,"wb");assert(f);fprintf(f,"P6\n320 240\n255\n");for(int i=0;i<320*240;i++){uint16_t c=frame[i];uint8_t p[3]={(c>>11)*255/31,((c>>5)&63)*255/63,(c&31)*255/31};fwrite(p,1,3,f);}fclose(f);}+static uint32_t rng=1234567;+static unsigned random_u(void){rng^=rng<<13;rng^=rng>>17;rng^=rng<<5;return rng;}+int main(void){+ Stats s={0},decoded={0};uint8_t bytes[SAVE_BYTES];save_encode(&s,bytes);assert(save_decode(&decoded,bytes,sizeof bytes));for(unsigned i=0;i<sizeof bytes;i++){bytes[i]^=1;assert(!save_decode(&decoded,bytes,sizeof bytes));bytes[i]^=1;}assert(!save_decode(&decoded,NULL,0));+ assert(!save_decode(&decoded,bytes,SAVE_BYTES-1));Stats invalid={.current=60,.unlocked=60};save_encode(&invalid,bytes);assert(!save_decode(&decoded,bytes,sizeof bytes));invalid=(Stats){.current=3,.unlocked=2};save_encode(&invalid,bytes);assert(!save_decode(&decoded,bytes,sizeof bytes));+ unsigned total=0,maxattempts=0;+ for(unsigned level=0;level<60;level++){+ Game g;bool won=false;+ for(unsigned attempt=0;attempt<160&&!won;attempt++){+ game_new(&g,level);unsigned idle=0;+ for(unsigned t=0;t<18000&&g.phase==RUNNING;t++){+ bool fire=false;+ if(g.remaining){Game preview=g;game_step(&preview,true);for(int j=0;j<3;j++)game_step(&preview,false);if(preview.phase!=FAILED&&(random_u()%13)<6){fire=true;idle=0;}else ++idle;}+ game_step(&g,fire);assert(game_valid(&g));++total;if(idle>1500)break;+ }+ if(g.phase==CLEARED){won=true;if(attempt+1>maxattempts)maxattempts=attempt+1;game_finish(&s,&g);assert(s.unlocked==level+1);}+ }+ if(!won){printf("Unsolved level %u, pins %u remaining %u\n",level+1,g.count,g.remaining);return 1;}+ if(level==59){Game clear=g;clear.phase_age=40;FILE*f=fopen("stress.bin","wb");fwrite(&clear,1,sizeof clear,f);fclose(f);}+ game_new(&g,level);for(unsigned t=0;t<45;t++)game_step(&g,false);char path[64];snprintf(path,sizeof path,"fixture%u.bin",level);FILE*f=fopen(path,"wb");fwrite(&g,1,sizeof g,f);fclose(f);+ }+ assert(s.unlocked==60&&s.current==59);+ Game g;game_new(&g,0);g.angle=45;game_step(&g,true);assert(g.remaining==7&&g.count==4);game_step(&g,false);game_step(&g,false);game_step(&g,false);assert(g.count==5);+ game_new(&g,0);g.angle=90;assert(game_collision(&g,160,150));assert(!game_collision(&g,160,180));+ game_new(&g,59);uint8_t direction=g.direction;game_step(&g,true);assert(g.direction!=direction);+ for(unsigned m=0;m<12;m++){game_new(&g,0);g.motion=m;for(unsigned t=0;t<360000;t++)game_step(&g,false);assert(game_valid(&g));}+ s=(Stats){.unlocked=60,.current=0};game_new(&g,0);screenshot("title.ppm",&g,&s,TITLE,0);screenshot("gameplay.ppm",&g,&s,PLAY,0);screenshot("levels.ppm",&g,&s,LEVELS,48);screenshot("help.ppm",&g,&s,HELP,0);+ FILE*f=fopen("host-report.json","w");fprintf(f,"{\"levels_solved\":60,\"simulation_frames\":%u,\"max_solver_attempts\":%u,\"game_bytes\":%u,\"stats_bytes\":%u,\"remaining_offset\":%u,\"level_offset\":%u,\"rotation_soak_frames\":4320000}\n",total,maxattempts,(unsigned)sizeof g,(unsigned)sizeof s,(unsigned)offsetof(Game,remaining),(unsigned)offsetof(Game,level));fclose(f);printf("PASS: 60 levels solved, %u frames, max %u attempts; game %u bytes\n",total,maxattempts,(unsigned)sizeof g);return 0;+}diff --git a/games/coreball/tests/test_arm.py b/games/coreball/tests/test_arm.pynew file mode 100644index 00000000..a29c0cf5--- /dev/null+++ b/games/coreball/tests/test_arm.py@@ -0,0 +1,110 @@+#!/usr/bin/env python3+"""Actual ARM .nwa tests: three calculator profiles, physics, save/reload and safe exit.+Requires the repository emulator's dependencies (Unicorn, pyelftools, Pillow).+"""+import argparse+import io+import json+import os+from pathlib import Path+import re+import shlex+import struct+import tempfile+import types++ROOT = Path(__file__).resolve().parents[1]+REPO = ROOT.parents[1]+emu_path = REPO/'tools/emu.py'+emu = types.ModuleType('arcade_emu');emu.__file__=str(emu_path);emu.io=io+source = emu_path.read_text().replace('ELFFile(open(elf, "rb"))','ELFFile(io.BytesIO(open(elf, "rb").read()))')+source = source.replace('cmd = [nwlink, "nwa-elf",','cmd = nwlink + ["nwa-elf",')+source = source.replace('chunk = CPU_HZ // 1000','chunk = CPU_HZ // 10000')+source = source.replace('self.now_ms += 1\n','self.now_ms += 0.1\n')+source = source.replace(' next_frame = self.now_ms if frame_ms else None',+ ' self.checkpoint = until_ms\n next_frame = self.now_ms if frame_ms else None')+source = source.replace(' self.slept_ms += r0\n',+ ' self.slept_ms += r0\n if self.now_ms >= self.checkpoint: uc.emu_stop()\n')+exec(compile(source,str(emu_path),'exec'),emu.__dict__)++def presses(*items):+ return [(t,t+d,emu.KEYS[k]) for t,k,d in items]++def storage(path,items):+ data=bytearray(emu.STORAGE_SIZE);offset=0+ for name,value in items:+ record=name.encode()+b'\0'+value;size=2+len(record)+ struct.pack_into('<H',data,offset,size);data[offset+2:offset+size]=record;offset+=size+ assert offset+2<=len(data)+ path.write_bytes(data)++def records(data):+ result={};offset=0+ while offset+2<=len(data):+ n=struct.unpack_from('<H',data,offset)[0]+ if not n:break+ assert n>=3 and offset+n<=len(data)+ name,value=data[offset+2:offset+n].split(b'\0',1);result[name.decode()]=value;offset+=n+ return result++def check_exit(c,upsilon=False):+ assert c.exited,'App did not exit'+ assert not c.violations,sorted(set(c.violations))+ assert not c.firmware_ram_changes(),'Firmware RAM changed'+ assert c.app_ram_clean(),'App RAM not cleared'+ assert c.locks==0 and c.max_locks==(0 if upsilon else 1)+ assert c.stack_used()<4096,c.stack_used()++def uint(c,name):+ return struct.unpack('<I',bytes(c.uc.mem_read(c.symbols[name],4)))[0]++def main():+ ap=argparse.ArgumentParser(description=__doc__);ap.add_argument('--nwlink',default='nwlink');a=ap.parse_args()+ nw=['node',a.nwlink] if Path(a.nwlink).is_file() and not a.nwlink.endswith(('.exe','.cmd')) else shlex.split(a.nwlink)+ slug=ROOT.name;dune=slug=='dune';out=ROOT/'output/arm';out.mkdir(parents=True,exist_ok=True);tempfile.tempdir=str(out)+ host=json.loads((ROOT/'output/host-report.json').read_text());size=host['game_bytes'];stats_size=host['stats_bytes']+ nwa=str(ROOT/f'output/{slug}-debug.nwa');report=[];sentinel=b'print(42)\n';save_size=40 if dune else 24+ profiles=[('n0120','n0120','epsilon',153676),('n0110','n0110','epsilon',148928),('n0115','n0110','epsilon',133652),('upsilon','n0110','upsilon',107674)]+ for profile,model,system,ram in profiles:+ emu.configure(model,system,ram);st=out/(profile+'.bin');storage(st,[('keep.py',sentinel)])+ c=emu.Calculator(nwa,storage_file=str(st),nwlink=nw);c.enable_checks()+ c.keys=presses((300,'ok',80),(500,'ok',180),(850,'back',80),(1750,'back',80),(2400,'home',180))+ c.run(250);c.save_png(str(out/(profile+'-title.png')))+ c.run(1200);assert uint(c,'current_view')==2,('Pause menu did not open',uint(c,'current_view'))+ c.save_png(str(out/(profile+'-pause.png')));before=bytes(c.uc.mem_read(c.symbols['game'],size));c.run(1600)+ assert bytes(c.uc.mem_read(c.symbols['game'],size))==before,'Pause advanced physics'+ c.run(2100);c.save_png(str(out/(profile+'-play.png')))+ frames=uint(c,'perf_frames');slowest=uint(c,'perf_max');slow=uint(c,'perf_slow')+ c.run(3000);check_exit(c,system=='upsilon');r=records(st.read_bytes())+ assert r['keep.py']==sentinel and len(r[slug+'.sav'])==save_size+ expected=r[slug+'.sav'][4:4+(26 if dune else 16)]+ d=emu.Calculator(nwa,storage_file=str(st),nwlink=nw);d.enable_checks();d.keys=presses((400,'onoff',150));d.run(250)+ assert bytes(d.uc.mem_read(d.symbols['stats'],len(expected)))==expected,'Saved progress was not restored'+ d.run(900);check_exit(d,system=='upsilon');assert records(st.read_bytes())['keep.py']==sentinel+ report.append(dict(profile=profile,pause_save_reload_exit='pass',stack_bytes=max(c.stack_used(),d.stack_used()),frames=frames,slowest_draw_ms=slowest,frames_over_33ms=slow));print(profile,report[-1],flush=True)+ emu.configure();c=emu.Calculator(nwa,nwlink=nw);c.enable_checks();c.keys=presses((200,'ok',60));c.run(400)+ for i in range(26 if dune else 60):+ fixture=(ROOT/('output/stress.bin' if dune else f'output/fixture{i}.bin')).read_bytes();assert len(fixture)==size+ c.uc.mem_write(c.symbols['game'],fixture)+ if dune:c.uc.mem_write(c.symbols['stats'],struct.pack('<IIIIIIBBxx',100,50000,(1<<26)-1,127,1,1234,i,i%7))+ c.run(c.now_ms+75);assert not c.violations,sorted(set(c.violations))+ if i in (0,3,6,12,25,49,59):c.save_png(str(out/f'scene{i}.png'))+ if not dune:+ c.uc.mem_write(c.symbols['game'],(ROOT/'output/stress.bin').read_bytes());c.run(c.now_ms+180);assert not c.violations+ report.append(dict(scenes='26 balls and all 7 landscapes' if dune else '60 original levels',slowest_draw_ms=uint(c,'perf_max'),stack_bytes=c.stack_used()))+ c.keys=presses((c.now_ms+100,'home',180));c.run(c.now_ms+700);check_exit(c)+ # Last level completes at 60/60 and replays level 60 rather than creating 61.+ c=emu.Calculator(nwa,nwlink=nw);c.enable_checks();c.keys=presses((200,'ok',60));c.run(400)+ fixture=bytearray((ROOT/'output/fixture59.bin').read_bytes());fixture[host['remaining_offset']]=0+ c.uc.mem_write(c.symbols['game'],bytes(fixture));c.keys=[];c.run(c.now_ms+1400)+ assert uint(c,'current_view')==3 and struct.unpack('<II',bytes(c.uc.mem_read(c.symbols['stats'],8)))==(59,60)+ c.save_png(str(out/'complete.png'));now=c.now_ms;c.keys=presses((now+100,'ok',80),(now+500,'home',180));c.run(now+350)+ assert bytes(c.uc.mem_read(c.symbols['game']+host['level_offset'],1))==bytes([59]);c.run(now+1000);check_exit(c)+ report.append(dict(ending='60/60 saved, last level replayed without level 61'))+ st=out/'full.bin';payload=b'x'*(emu.STORAGE_SIZE-2-2-len('keep.py')-1);storage(st,[('keep.py',payload)])+ c=emu.Calculator(nwa,storage_file=str(st),nwlink=nw);c.enable_checks();c.keys=presses((400,'home',180),(1100,'1',80),(1600,'home',100),(2200,'back',80))+ c.run(900);assert not c.exited and uint(c,'current_view')==6;c.save_png(str(out/'storage-full.png'));c.run(1400);assert not c.exited;c.run(2800);check_exit(c)+ assert records(st.read_bytes())=={'keep.py':payload};report.append(dict(full_storage='continue and exit preserve other files'))+ c=emu.Calculator(nwa,nwlink=nw);c.enable_checks();c.keys=presses((0,'ok',600),(850,'home',180));c.run(700);assert uint(c,'current_view')==0;c.run(1500);check_exit(c)+ (out/'report.json').write_text(json.dumps(report,indent=2)+'\n');print(json.dumps(report,indent=2))+if __name__=='__main__':main()diff --git a/games/coreball/tools/assets.py b/games/coreball/tools/assets.pynew file mode 100644index 00000000..68650741--- /dev/null+++ b/games/coreball/tools/assets.py@@ -0,0 +1,40 @@+#!/usr/bin/env python3+"""Reproducible compact assets; no web engine is shipped in the application."""+import json+from pathlib import Path+from PIL import Image+ROOT=Path(__file__).resolve().parents[1]+def rgb(c):return ((c[0]>>3)<<11)|((c[1]>>2)<<5)|(c[2]>>3)+def arr(f,typ,name,values):+ f.write('const '+typ+' '+name+'[]={\n')+ for i in range(0,len(values),24):f.write(','.join(str(x) for x in values[i:i+24])+',\n')+ f.write('};\n')+def image(f,name,im):+ im=im.convert('RGBA'); colors=im.convert('RGB').quantize(colors=15,method=Image.Quantize.MEDIANCUT)+ pal=colors.getpalette()+[0]*768; palette=[0]+[rgb(pal[i*3:i*3+3]) for i in range(15)]+ p=[0 if a<96 else c+1 for c,(_,_,_,a) in zip(colors.getdata(),im.getdata())]+ arr(f,'uint16_t',name+'_pal',palette)+ arr(f,'uint8_t',name+'_pix',[(p[i]<<4)|(p[i+1] if i+1<len(p) else 0) for i in range(0,len(p),2)])+ f.write('const Image '+name+'={'+str(im.width)+','+str(im.height)+','+name+'_pix,'+name+'_pal};\n')+def font(f):+ fonts=json.loads((ROOT/'assets/ui-fonts.json').read_text(encoding='utf8'))+ for i,font in enumerate(fonts):+ arr(f,'uint8_t',f'font{i}_pixels',list(bytes.fromhex(font['pixels'])))+ f.write(f'const Glyph font{i}_glyphs[]={{\n')+ for glyph in font['glyphs']:f.write('{'+','.join(map(str,glyph))+'},\n')+ f.write('};\n')+ f.write('const Font fonts[]={'+','.join('{font'+str(i)+'_glyphs,font'+str(i)+'_pixels}' for i in range(3))+'};\n')+def main():+ with (ROOT/'src/assets.c').open('w',encoding='utf8',newline='\n') as f:+ f.write('#include "assets.h"\n');font(f)+ for name,file in [('logo','title.png'),('go','go.png')]:+ im=Image.open(ROOT/'assets'/file).convert('L');p=[(v+8)//17 for v in im.getdata()]+ arr(f,'uint8_t',name+'_pix',[(p[i]<<4)|(p[i+1] if i+1<len(p) else 0) for i in range(0,len(p),2)])+ f.write('const Mask '+name+'={'+str(im.width)+','+str(im.height)+','+name+'_pix};\n')+ levels=json.loads((ROOT/'assets/levels.json').read_text());motions=['A1','A2','B1','B2','C1','C2','D1','D2','D3','D4','E1','E2']+ f.write('const Level levels[60]={\n'+',\n'.join('{'+str(int(v[0]))+','+str(v[1])+','+str(motions.index(v[2]))+'}' for v in levels.values())+'};\n')+ presets={0:[],2:[0,180],3:[0,120,240],4:[0,90,180,270],5:[0,72,144,216,288],6:list(range(0,360,60)),7:[0,52,103,155,206,258,309],8:list(range(0,360,45)),9:list(range(0,360,40)),10:list(range(0,360,36)),11:[0,33,66,99,131,164,197,230,262,295,328],12:list(range(0,360,30)),13:[0,28,56,84,111,139,167,194,222,250,277,305,333],14:[0,26,52,78,103,129,155,180,206,232,258,283,309,335],15:list(range(0,360,24)),16:[0,23,45,68,90,113,135,158,180,203,225,248,270,293,315,338]}+ offsets=[];angles=[]+ for i in range(17):offsets.append(len(angles));angles+=presets.get(i,[])+ arr(f,'uint8_t','preset_offset',offsets);arr(f,'uint16_t','preset_angle',angles)+if __name__=='__main__':main()diff --git a/games/coreball/tools/compact_nwa.py b/games/coreball/tools/compact_nwa.pynew file mode 100644index 00000000..f320bb54--- /dev/null+++ b/games/coreball/tools/compact_nwa.py@@ -0,0 +1,228 @@+#!/usr/bin/env python3+"""Lossless standalone NWA packing. Python standard library + ARM binutils.++Keep the standard ELF/NWI formats: no runtime decoder, extra RAM, or archive.+"""+import argparse+from bisect import bisect_left, insort+import json+from pathlib import Path+import subprocess+import tempfile++ICON_BYTES = 55 * 56 * 2+++def decode_lz4(data, expected_size):+ """Decode a raw LZ4 block, with an exact output bound for launcher icons."""+ out = bytearray()+ pos = 0++ def length(value):+ nonlocal pos+ if value == 15:+ while True:+ if pos >= len(data):+ raise ValueError('Truncated LZ4 length')+ extra = data[pos]+ pos += 1+ value += extra+ if extra != 255:+ break+ return value++ while pos < len(data):+ token = data[pos]+ pos += 1+ size = length(token >> 4)+ if pos + size > len(data) or len(out) + size > expected_size:+ raise ValueError('Invalid LZ4 literal run')+ out += data[pos:pos + size]+ pos += size+ if pos == len(data):+ break+ if pos + 2 > len(data):+ raise ValueError('Truncated LZ4 offset')+ distance = data[pos] | data[pos + 1] << 8+ pos += 2+ size = length(token & 15) + 4+ if not distance or distance > len(out) or len(out) + size > expected_size:+ raise ValueError('Invalid LZ4 match')+ for _ in range(size):+ out.append(out[-distance])+ if len(out) != expected_size:+ raise ValueError('Unexpected decoded icon size')+ return bytes(out)+++def _extension_cost(value, threshold):+ return 0 if value < threshold else 1 + (value - threshold) // 255+++def compress_lz4(data):+ """Find a minimum-size raw LZ4 parse for a small (<= 65535 byte) image.++ A suffix array finds the longest legal previous match. Dynamic programming+ chooses literal/match lengths, including extension-byte costs. The final+ five bytes are literals; the last match starts at least twelve bytes from+ the end, as required by standard LZ4 block decoders.+ """+ n = len(data)+ if n > 65535:+ raise ValueError('Only small build-time assets are supported')+ if not n:+ return b'\0'+ suffixes = sorted(range(n), key=lambda i: data[i:])+ rank = [0] * n+ for r, pos in enumerate(suffixes):+ rank[pos] = r+ seen = []+ matches = [(0, 0)] * n+ for i in range(n - 11):+ r = rank[i]+ at = bisect_left(seen, r)+ best, distance = 0, 0+ # Among earlier suffixes, a lexicographic neighbour has the longest+ # common prefix. Overlapping matches are legal in LZ4.+ for q in seen[max(0, at - 1):at + 1]:+ j = suffixes[q]+ lo, hi = 0, n - i - 5+ while lo < hi:+ mid = (lo + hi + 1) // 2+ if data[i:i + mid] == data[j:j + mid]:+ lo = mid+ else:+ hi = mid - 1+ if lo > best:+ best, distance = lo, i - j+ matches[i] = best, distance+ insort(seen, r)++ dp = [0] * (n + 1)+ plan = [None] * n+ match_cost = [0] * n+ match_length = [0] * n+ starts = []+ for i in range(n - 1, -1, -1):+ best = n - i + 1 + _extension_cost(n - i, 15)+ longest, _ = matches[i]+ if longest >= 4:+ cost, size = min((2 + _extension_cost(size, 19) + dp[i + size], size)+ for size in range(4, longest + 1))+ match_cost[i], match_length[i] = cost, size+ starts.append(i)+ for j in reversed(starts):+ literal = j - i+ if literal + 3 >= best:+ break+ cost = 1 + literal + _extension_cost(literal, 15) + match_cost[j]+ if cost < best:+ best = cost+ plan[i] = j, match_length[j], matches[j][1]+ dp[i] = best++ out = bytearray()++ def emit_length(value):+ while value >= 255:+ out.append(255)+ value -= 255+ out.append(value)++ anchor = 0+ while anchor < n:+ entry = plan[anchor]+ if entry is None:+ literal = n - anchor+ out.append(min(literal, 15) << 4)+ if literal >= 15:+ emit_length(literal - 15)+ out += data[anchor:]+ break+ j, size, distance = entry+ literal = j - anchor+ out.append(min(literal, 15) << 4 | min(size - 4, 15))+ if literal >= 15:+ emit_length(literal - 15)+ out += data[anchor:j]+ out += bytes((distance & 255, distance >> 8))+ if size >= 19:+ emit_length(size - 19)+ anchor = j + size+ if len(out) != dp[0] or decode_lz4(out, n) != data:+ raise ValueError('Lossless compression verification failed')+ return bytes(out)+++def compact_icon(source, output, objcopy):+ output.parent.mkdir(parents=True, exist_ok=True)+ with tempfile.TemporaryDirectory(dir=output.parent) as folder:+ folder = Path(folder)+ original, packed, obj = folder/'original.nwi', folder/'packed.nwi', folder/'icon.o'+ section = '.rodata.eadk_app_icon'+ subprocess.run([objcopy, '--dump-section=' + section + '=' + str(original),+ str(source), str(obj)], check=True)+ before = original.read_bytes()+ pixels = decode_lz4(before, ICON_BYTES)+ after = compress_lz4(pixels)+ if len(after) > len(before):+ after = before+ packed.write_bytes(after)+ subprocess.run([objcopy, '--update-section=' + section + '=' + str(packed),+ str(obj), str(output)], check=True)+ # Verify the bytes actually stored in the resulting ELF, too.+ subprocess.run([objcopy, '--dump-section=' + section + '=' + str(packed),+ str(output), str(folder/'verify.o')], check=True)+ if decode_lz4(packed.read_bytes(), ICON_BYTES) != pixels:+ raise ValueError('Packed icon pixels changed')+ return dict(source_icon_bytes=len(before), icon_bytes=len(after), decoded_icon_bytes=ICON_BYTES)+++def compact_app(source, output, linker):+ output.parent.mkdir(parents=True, exist_ok=True)+ script = Path(__file__).with_name('standalone.ld')+ with tempfile.TemporaryDirectory(dir=output.parent) as folder:+ packed = Path(folder)/'packed.nwa'+ subprocess.run([linker, '--relocatable', '--script', str(script), str(source),+ '-o', str(packed)], check=True)+ output.write_bytes(packed.read_bytes())+++def compact_release(source, output, objcopy):+ """Remove unused ARM mapping symbols from the transport ELF only.++ GNU objcopy preserves $t/$d symbols specially even when unused. Rename+ them in a temporary release copy, then let objcopy decide which symbols+ relocations still need. Keep the debug ELF intact for ARM disassembly.+ Python builders compare release/debug bytes on all supported profiles;+ Make's check target compares them on the smallest RAM profile.+ """+ output.parent.mkdir(parents=True, exist_ok=True)+ with tempfile.TemporaryDirectory(dir=output.parent) as folder:+ folder = Path(folder)+ stripped, renamed = folder/'stripped.nwa', folder/'renamed.nwa'+ subprocess.run([objcopy, '--strip-unneeded', str(source), str(stripped)], check=True)+ subprocess.run([objcopy, '--redefine-sym=$t=unused_thumb_marker',+ '--redefine-sym=$d=unused_data_marker', str(stripped),+ str(renamed)], check=True)+ subprocess.run([objcopy, '--strip-unneeded', str(renamed), str(output)], check=True)+++def main():+ ap = argparse.ArgumentParser(description=__doc__)+ ap.add_argument('kind', choices=('icon', 'app', 'release'))+ ap.add_argument('source', type=Path)+ ap.add_argument('output', type=Path)+ ap.add_argument('--objcopy', default='arm-none-eabi-objcopy')+ ap.add_argument('--ld', default='arm-none-eabi-ld')+ args = ap.parse_args()+ if args.kind == 'icon':+ print(json.dumps(compact_icon(args.source, args.output, args.objcopy)))+ elif args.kind == 'release':+ compact_release(args.source, args.output, args.objcopy)+ else:+ compact_app(args.source, args.output, args.ld)+++if __name__ == '__main__':+ main()diff --git a/games/coreball/tools/import_fonts.py b/games/coreball/tools/import_fonts.pynew file mode 100644index 00000000..4e23bb53--- /dev/null+++ b/games/coreball/tools/import_fonts.py@@ -0,0 +1,48 @@+#!/usr/bin/env python3+"""Bake native-size antialiased glyphs; the build needs no installed fonts."""+import argparse+import json+import math+from pathlib import Path+from PIL import Image, ImageDraw, ImageFont++ROOT = Path(__file__).resolve().parents[1]++def rasterize(path, size, chars):+ font = ImageFont.truetype(str(path), size)+ cap_top = font.getbbox('H')[1]+ data, glyphs = [], []+ for code in range(32, 127):+ ch = chr(code)+ if ch not in chars:+ glyphs.append(None)+ continue+ left, top, right, bottom = font.getbbox(ch)+ im = Image.new('L', (max(1, right-left), max(1, bottom-top)))+ ImageDraw.Draw(im).text((-left, -top), ch, font=font, fill=255)+ bounds = im.getbbox()+ advance = math.ceil(font.getlength(ch)) + (1 if size == 13 else 0)+ if not bounds:+ glyphs.append([len(data), 0, 0, 0, 0, advance])+ continue+ ink = im.crop(bounds)+ xoff, yoff = left+bounds[0], top-cap_top+bounds[1]+ pixels = [(p+8)//17 for p in ink.getdata()]+ glyphs.append([len(data), ink.width, ink.height, xoff, yoff, advance])+ data.extend((pixels[i]<<4)|(pixels[i+1] if i+1<len(pixels) else 0)+ for i in range(0, len(pixels), 2))+ fallback = glyphs[ord('?')-32]+ glyphs = [g if g is not None else fallback for g in glyphs]+ return dict(size=size, source=Path(path).name, glyphs=glyphs, pixels=bytes(data).hex())++def main():+ parser=argparse.ArgumentParser(description=__doc__)+ parser.add_argument('--regular-font', default='C:/Windows/Fonts/segoeui.ttf')+ parser.add_argument('--bold-font', default='C:/Windows/Fonts/segoeuib.ttf')+ args=parser.parse_args()+ fonts=[rasterize(args.regular_font,13,''.join(map(chr,range(32,127)))),+ rasterize(args.bold_font,22,'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 !?+-.:/'),+ rasterize(args.bold_font,32,'0123456789? ')]+ (ROOT/'assets/ui-fonts.json').write_text(json.dumps(fonts,separators=(',',':'))+'\n',encoding='utf8')+ print(ROOT.name, 'native-size font pixels:',sum(len(f['pixels'])//2 for f in fonts))+if __name__=='__main__': main()diff --git a/games/coreball/tools/standalone.ld b/games/coreball/tools/standalone.ldnew file mode 100644index 00000000..28679582--- /dev/null+++ b/games/coreball/tools/standalone.ld@@ -0,0 +1,15 @@+/* Compact a standalone NWA after the first link has removed unused code.+ * Keep EADK metadata separate, and preserve mergeable strings for nwlink.+ * NumPlay modules retain their original sections for launcher garbage collection.+ */+SECTIONS {+ .rodata.eadk_app_name : { *(.rodata.eadk_app_name) }+ .rodata.eadk_app_icon : { *(.rodata.eadk_app_icon) }+ .rodata.eadk_api_level : { *(.rodata.eadk_api_level) }+ .text : { *(.text.startup.main) *(.text .text.*) }+ .rodata.str1.1 : { *(.rodata*.str1.1) }+ .rodata : { *(.rodata .rodata.*) }+ .data : { *(.data .data.*) }+ .bss : { *(.bss .bss.*) *(COMMON) }+ /DISCARD/ : { *(.comment) *(.note.GNU-stack) }+}diff --git a/tools/release.py b/tools/release.pyindex 24ec1a8c..067f67a8 100644--- a/tools/release.py+++ b/tools/release.py@@ -23,6 +23,7 @@ REPO = "https://github.com/Mason363/NumPlay"EXTRAS = set()# games too big to fit next to NumPlay on the calculator: only on their own, in a section of their ownALONE = {+ "coreball": ("Core Ball", "60 original levels with an English interface, adapted by Bobydeluxe; installed separately"),"celeste": ("Celeste", "the whole climb up Celeste Mountain"),"hollowknight": ("Hollow Knight", "from King's Pass to Hornet in Greenpath"),"undertale": ("Undertale", "the whole Underground, to the barrier and the neutral ending"),