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
Hollow Knight: Fungal Wastes as its own app in the build, release and tests
Mason3633ad61f3789d3
diff --git a/Makefile b/Makefileindex 0aa08090..fed09f45 100644--- a/Makefile+++ b/Makefile@@ -18,7 +18,7 @@ PY ?= python3CARGO ?= cargoB = build/data# Conventional games honor a configurable output directory; special layouts are kept local.-GAMES_REDIRECT = angrybirds badtime balatro blockblast breakout buckshot catninja celeste championisland chess clashroyale connectfour cookieclicker coreball dinorun donkeykong doodlejump doom dune famidash finalearth2 flappybird flappydunk fnaf fnaf2 fnaf3 fnaf4 fnf g2048 hillclimb hollowknight invaders isaac jetpackjoyride leveldevil mahjong meowdoku minesweeper monkeymart numblocks numpowder numvisuals pacman paperclips polytrack portal pvz rider snake snowrider sokoban solitaire sonic stickmanhook subway sudoku suika templerun tombofthemask towerblock twoplayer undertale uno uttt+GAMES_REDIRECT = angrybirds badtime balatro blockblast breakout buckshot catninja celeste championisland chess clashroyale connectfour cookieclicker coreball dinorun donkeykong doodlejump doom dune famidash finalearth2 flappybird flappydunk fnaf fnaf2 fnaf3 fnaf4 fnf g2048 hillclimb hkfungal hollowknight invaders isaac jetpackjoyride leveldevil mahjong meowdoku minesweeper monkeymart numblocks numpowder numvisuals pacman paperclips polytrack portal pvz rider snake snowrider sokoban solitaire sonic stickmanhook subway sudoku suika templerun tombofthemask towerblock twoplayer undertale uno utttGAMES_OUT = dinorunGAME_REDIRECT_ARG = $(if $(filter $(1),$(GAMES_OUT)),OUT=../../$(B)/games/$(1),BUILD_DIR=../../$(B)/games/$(1))# the RAM the oldest calculator software that runs apps gives them (23.2: 148928 bytes; 25.2 gives 153676).@@ -29,7 +29,7 @@ RAM_LIMIT = 148928# custom builds of Epsilon 25.2's source give apps less: 133652 bytes; every game fits there too, in NumPlay and on# its own (their big buffers are on the stack, 32 KB apart from that RAM, or in the RAM the software has left)CUSTOM_RAM = 133652-BIG_APPS = Celeste HollowKnight Undertale ChampionIsland FinalEarth2 NumPowder NumBlocks NumDrive SubwaySurfers FiveNightsAtFreddys Doom BindingOfIsaac HillClimbRacing PlantsVsZombies SonicTheHedgehog CookieClicker LevelDevil JetpackJoyride StickmanHook DonkeyKong Dune MonkeyMart TombOfTheMask UNO FridayNightFunkin AngryBirds PolyTrack UniversalPaperclips BadTimeSimulator Mahjong Rider SnowRider3D TempleRun FiveNightsAtFreddys2 FiveNightsAtFreddys3 FiveNightsAtFreddys4 Famidash ClashRoyale UniversalPaperclips-French CatNinja+BIG_APPS = Celeste HollowKnight HollowKnightFungalWastes Undertale ChampionIsland FinalEarth2 NumPowder NumBlocks NumDrive SubwaySurfers FiveNightsAtFreddys Doom BindingOfIsaac HillClimbRacing PlantsVsZombies SonicTheHedgehog CookieClicker LevelDevil JetpackJoyride StickmanHook DonkeyKong Dune MonkeyMart TombOfTheMask UNO FridayNightFunkin AngryBirds PolyTrack UniversalPaperclips BadTimeSimulator Mahjong Rider SnowRider3D TempleRun FiveNightsAtFreddys2 FiveNightsAtFreddys3 FiveNightsAtFreddys4 Famidash ClashRoyale UniversalPaperclips-French CatNinja# the calculator's space for installed apps: from the end of its software (64 KiB aligned) to 64 KiB before the# end of its 4 MiB slot of flash, 0x903F0000. The software's size sets the start: 0x90200000 is the latest a# NumPlay counts on (1.94 MB, APP_SPACE); Epsilon 26.4 on an N0120 ends at 0x90180000 (2.44 MB, the@@ -47,7 +47,7 @@ XL_APP_SPACE = 6291456# the spaces the customizer website offers (kit.json "spaces"; tools/kit.py links a NumPlay at each)SPACES = std:$(APP_START):$(APP_END) e26:$(APP_START_26):$(APP_END) xl:$(APP_START):$(XL_END) xl26:$(APP_START_26):$(XL_END)# big games that must install on their own without Enlarged Extra Apps: make check holds them to APP_SPACE-APP_SPACE_APPS = HillClimbRacing FridayNightFunkin AngryBirds PolyTrack UniversalPaperclips UniversalPaperclips-French BadTimeSimulator Mahjong SnowRider3D TempleRun Famidash CatNinja+APP_SPACE_APPS = HollowKnight HollowKnightFungalWastes HillClimbRacing FridayNightFunkin AngryBirds PolyTrack UniversalPaperclips UniversalPaperclips-French BadTimeSimulator Mahjong SnowRider3D TempleRun Famidash CatNinja# Upsilon, the N0110 and N0115's custom software, gives .nwa apps less RAM: NumPlay-Upsilon.nwa has# the games that fit it (NumPlay draws their text there: see launcher/src/compat.c)UPSILON_RAM = 107674@@ -304,6 +304,7 @@ APP_numvisuals = $(B)/games/numvisuals/numvisuals.nwa:NumVisuals.nwaAPP_celeste = $(B)/games/celeste/celeste.nwa:Celeste.nwaAPP_championisland = $(B)/games/championisland/championisland.nwa:ChampionIsland.nwaAPP_hollowknight = $(B)/games/hollowknight/hollowknight.nwa:HollowKnight.nwa+APP_hkfungal = $(B)/games/hkfungal/hkfungal.nwa:HollowKnightFungalWastes.nwaAPP_undertale = $(B)/games/undertale/undertale.nwa:Undertale.nwaAPP_subway = $(B)/games/subway/subway.nwa:SubwaySurfers.nwaAPP_fnaf = $(B)/games/fnaf/fnaf.nwa:FiveNightsAtFreddys.nwa@@ -353,6 +354,7 @@ apps: | $(B)$(MAKE) -C games/celeste build NWLINK="$(NWLINK)" BUILD_DIR=../../$(B)/games/celeste$(MAKE) -C games/championisland build NWLINK="$(NWLINK)" BUILD_DIR=../../$(B)/games/championisland$(MAKE) -C games/hollowknight build NWLINK="$(NWLINK)" BUILD_DIR=../../$(B)/games/hollowknight+ $(MAKE) -C games/hkfungal build NWLINK="$(NWLINK)" BUILD_DIR=../../$(B)/games/hkfungal$(MAKE) -C games/undertale build NWLINK="$(NWLINK)" BUILD_DIR=../../$(B)/games/undertale$(MAKE) -C games/subway build NWLINK="$(NWLINK)" BUILD_DIR=../../$(B)/games/subway$(MAKE) -C games/fnaf build NWLINK="$(NWLINK)" BUILD_DIR=../../$(B)/games/fnaf@@ -400,6 +402,7 @@ apps: | $(B)cp $(word 1,$(subst :, ,$(APP_celeste))) $(B)/apps/$(word 2,$(subst :, ,$(APP_celeste)))cp $(word 1,$(subst :, ,$(APP_championisland))) $(B)/apps/$(word 2,$(subst :, ,$(APP_championisland)))cp $(word 1,$(subst :, ,$(APP_hollowknight))) $(B)/apps/$(word 2,$(subst :, ,$(APP_hollowknight)))+ cp $(word 1,$(subst :, ,$(APP_hkfungal))) $(B)/apps/$(word 2,$(subst :, ,$(APP_hkfungal)))cp $(word 1,$(subst :, ,$(APP_undertale))) $(B)/apps/$(word 2,$(subst :, ,$(APP_undertale)))cp $(word 1,$(subst :, ,$(APP_subway))) $(B)/apps/$(word 2,$(subst :, ,$(APP_subway)))cp $(word 1,$(subst :, ,$(APP_fnaf))) $(B)/apps/$(word 2,$(subst :, ,$(APP_fnaf)))@@ -489,6 +492,7 @@ clean:-$(MAKE) -C games/numvisuals clean-$(MAKE) -C games/championisland clean-$(MAKE) -C games/hollowknight clean+ -$(MAKE) -C games/hkfungal clean-$(MAKE) -C games/undertale clean-$(MAKE) -C games/subway clean-$(MAKE) -C games/fnaf cleandiff --git a/docs/media/thumb_hkfungal.png b/docs/media/thumb_hkfungal.pngnew file mode 100644index 00000000..eebba9c8Binary files /dev/null and b/docs/media/thumb_hkfungal.png differdiff --git a/games/games.json b/games/games.jsonindex 4890698b..3830cdad 100644--- a/games/games.json+++ b/games/games.json@@ -669,6 +669,31 @@"default": false,"xl": true},+ {+ "id": "hkfungal",+ "rank": 39,+ "title": "Hollow Knight: Fungal Wastes",+ "tagline": "Hallownest past Greenpath",+ "credit": "Based on Hollow Knight by Team Cherry",+ "top": "0x35606B",+ "bottom": "0x0A1418",+ "accent": "0xE8EEF5",+ "colors": 16,+ "heap": 20480,+ "records": [+ "hk1.sav",+ "hk2.sav",+ "hk3.sav",+ "hk4.sav",+ "hollowknight_saves.py"+ ],+ "shots": [+ "docs/shot.png"+ ],+ "repo": "https://github.com/Mason363/NumPlay/tree/main/games/hkfungal",+ "default": false,+ "xl": true+ },{"id": "undertale","rank": 3,diff --git a/games/hkfungal/.gitignore b/games/hkfungal/.gitignorenew file mode 100644index 00000000..ea1472ec--- /dev/null+++ b/games/hkfungal/.gitignore@@ -0,0 +1 @@+output/diff --git a/games/hkfungal/Makefile b/games/hkfungal/Makefilenew file mode 100644index 00000000..92a8be0a--- /dev/null+++ b/games/hkfungal/Makefile@@ -0,0 +1,13 @@+# Hollow Knight: Fungal Wastes, the second part of Hollow Knight, sharing its saves. Its code and data are+# Hollow Knight's (games/hollowknight, PART=2); this builds it.+# make output/hkfungal.nwa+# make check link it like the calculator does (output/hkfungal.bin)+NWLINK ?= npx --yes -- [email protected]+BUILD_DIR = output++.PHONY: build check clean+build check:+ $(MAKE) -C ../hollowknight $@ PART=2 NWLINK="$(NWLINK)" BUILD_DIR=$(abspath $(BUILD_DIR))++clean:+ rm -rf $(BUILD_DIR)diff --git a/games/hkfungal/README.md b/games/hkfungal/README.mdnew file mode 100644index 00000000..e8c13157--- /dev/null+++ b/games/hkfungal/README.md@@ -0,0 +1,50 @@+> **Hollow Knight: Fungal Wastes is a [NumPlay](../../README.md) game that comes on its own.** It is the second part of [Hollow Knight](../hollowknight/README.md) and shares its saves. Get `HollowKnightFungalWastes.nwa` from the [latest release](https://github.com/Mason363/NumPlay/releases/latest).++<p align="center">+ <img src="../hollowknight/src/icon_fw.png" width="84" alt="Hollow Knight: Fungal Wastes icon">+</p>++<h1 align="center">Hollow Knight: Fungal Wastes</h1>++<p align="center">+ <b>Hallownest past Greenpath, on the NumWorks calculator.</b><br>+ Down from the Forgotten Crossroads into the Fungal Wastes.+</p>++<p align="center">+ <a href="https://github.com/Mason363/NumPlay/releases/latest/download/HollowKnightFungalWastes.nwa"><b>Download HollowKnightFungalWastes.nwa</b></a>+ · <a href="#how-to-play">How to play</a>+</p>++<p align="center">+ <img src="docs/shot.png" width="390" alt="A Fungoon in the Fungal Wastes">+</p>++## How to play++Play Hollow Knight first. At the Forgotten Crossroads' way down to the Fungal Wastes, the game saves and tells you to install this app. Install it, choose Start Game and the same save: the Knight walks in there. Going back up saves the same way, for Hollow Knight to go on.++Keys, charms, benches and the rest are as in Hollow Knight: see its [controls](../hollowknight/README.md#controls).++## What's in++* **The way down:** the Crossroads' last room and the Fungal Wastes' first.+* **Its creatures:** Fungoons and their gas, Funglings, Amblooms, Shrumelings and Fungified Husks, each with its own moves.++## Good to know++* **One app at a time:** each part takes all the room the calculator has for apps, so installing one swaps out the other, and NumPlay. Your saves are kept.+* **A new game starts in Hollow Knight:** this app opens saves that have come this far.+* **No music or sound:** the calculator has no speaker.++## Credits++Inspired by Hollow Knight, not affiliated with Team Cherry.++* The pictures, animations, maps, texts and fonts come from the game's own files.++Made by Mason Chen as part of NumPlay.++## License++The game's code is licensed under the GNU General Public License v3.0: see the `LICENSE` file at the root of the repository. The game's pictures, animations, maps, texts and fonts keep their own terms (see Credits).diff --git a/games/hkfungal/docs/shot.png b/games/hkfungal/docs/shot.pngnew file mode 100644index 00000000..21f72518Binary files /dev/null and b/games/hkfungal/docs/shot.png differdiff --git a/games/hollowknight/Makefile b/games/hollowknight/Makefileindex e205d9e1..62c31c40 100644--- a/games/hollowknight/Makefile+++ b/games/hollowknight/Makefile@@ -4,7 +4,8 @@# make host build/play: the game on a computer, for tests and screenshots# make test checks of the host build (tests/check.py)# make data regenerate src/data.bin from the game (HOLLOWKNIGHT=<its Data folder>)-# PART=2 the second app, Hollow Knight: Fungal Wastes (src/data_fw.bin, output/fw): Hallownest in parts,+# PART=2 the second app, Hollow Knight: Fungal Wastes (src/data_fw.bin, build/fw/hkfungal.nwa; games/hkfungal+# builds it): Hallownest in parts,# each an app of the calculator's usual size, sharing the savesQ ?= @CC = arm-none-eabi-gcc@@ -13,12 +14,14 @@ STRIP ?= arm-none-eabi-strip --strip-unneededPART ?= 1ifeq ($(PART),2)DATA = src/data_fw.bin-BUILD_DIR = output/fw+BUILD_DIR = build/fw+NAME = hkfungalICON = src/icon_fw.pngPART_FLAGS = -DHK_FW=1elseDATA = src/data.binBUILD_DIR = output+NAME = hollowknightICON = src/icon.pngendifGAME = src/res.c src/tex.c src/room.c src/gfx.c src/phys.c src/anim.c src/hero.c src/camera.c src/game.c src/world.c src/obj.c src/enemy.c src/hud.c src/spell.c src/text.c src/npc.c src/title.c src/vm.c src/msg.c src/save.c src/death.c src/menu.c src/inv.c src/shop.c src/collect.c src/stag.c src/map.c src/lzma/LzmaDec.c@@ -34,18 +37,18 @@ LDFLAGS += -Wl,-e,main -Wl,-u,eadk_app_name -Wl,-u,eadk_app_icon -Wl,-u,eadk_apiLDFLAGS += -Wl,--gc-sections -flinker-output=nolto-rel.PHONY: build check clean host data test-build: $(BUILD_DIR)/hollowknight.nwa+build: $(BUILD_DIR)/$(NAME).nwa# the RAM the calculator gives apps (data + bss) depends on its software: 153676 bytes on 25.2, 149500 on 24.10,# 148928 on 23.2; checked against the least-check: $(BUILD_DIR)/hollowknight.nwa- $(Q) $(NWLINK) nwa-bin --ram-length 148928 $< $(BUILD_DIR)/hollowknight.bin- @echo "BIN $(BUILD_DIR)/hollowknight.bin: $$(wc -c < $(BUILD_DIR)/hollowknight.bin) bytes"+check: $(BUILD_DIR)/$(NAME).nwa+ $(Q) $(NWLINK) nwa-bin --ram-length 148928 $< $(BUILD_DIR)/$(NAME).bin+ @echo "BIN $(BUILD_DIR)/$(NAME).bin: $$(wc -c < $(BUILD_DIR)/$(NAME).bin) bytes"$(BUILD_DIR)/data.o: src/data.S $(DATA) | $(BUILD_DIR)$(Q) $(CC) -c -DDATA_BIN='"$(DATA)"' $< -o $@-$(BUILD_DIR)/hollowknight.nwa: $(SRC) $(HEADERS) $(BUILD_DIR)/icon.o $(BUILD_DIR)/data.o+$(BUILD_DIR)/$(NAME).nwa: $(SRC) $(HEADERS) $(BUILD_DIR)/icon.o $(BUILD_DIR)/data.o@echo "LD $@"$(Q) $(CC) $(CFLAGS) $(LDFLAGS) $(SRC) $(BUILD_DIR)/data.o $(BUILD_DIR)/icon.o -lm -o $@$(Q) $(STRIP) $@diff --git a/games/hollowknight/src/data_fw.bin b/games/hollowknight/src/data_fw.binindex c0b995b4..21d0e9c6 100644Binary files a/games/hollowknight/src/data_fw.bin and b/games/hollowknight/src/data_fw.bin differdiff --git a/games/hollowknight/src/enemy_fw.c b/games/hollowknight/src/enemy_fw.cindex 3a56f361..5aa7a75c 100644--- a/games/hollowknight/src/enemy_fw.c+++ b/games/hollowknight/src/enemy_fw.c@@ -181,7 +181,7 @@ static void gas_draw(void) {if (k <= 0) continue;float d = (1.5f * gas_scale(g) + 1.0f) * k;Inst in;- sprite_inst(SPRITE_GAS, g->x, g->y, -0.001f, d, d, tint, &in);+ sprite_inst(SPRITE_GAS, g->x, g->y, -0.001f, d / 4, d / 4, tint, &in); /* (its sprite 4 units wide) */gfx_actor_minor(&in, SORT_KEY(0, 0));}}diff --git a/games/hollowknight/tests/cross.sav b/games/hollowknight/tests/cross.savnew file mode 100644index 00000000..5e1e9587Binary files /dev/null and b/games/hollowknight/tests/cross.sav differdiff --git a/games/hollowknight/tools/pack.py b/games/hollowknight/tools/pack.pyindex 6159772f..17fa58a9 100644--- a/games/hollowknight/tools/pack.py+++ b/games/hollowknight/tools/pack.py@@ -518,8 +518,8 @@ def main():pgb = unity.prefab("sharedassets149.assets", 34)fleurs["SPRITE_GRASS_BALL"] = SPRITES.id(pgb, next(c["v"] for c in pgb["objects"][0]["c"] if c["type"] == "SpriteRenderer")["m_Sprite"], 1)if PART == 2:- # (the gas the Fungoons spit: their Gas Attack particles' texture, a unit wide)- fleurs["SPRITE_GAS"] = SPRITES.tex("sharedassets128.assets", 7, 1.0)+ # (the gas the Fungoons spit: their Gas Attack particles' texture, 4 units wide)+ fleurs["SPRITE_GAS"] = SPRITES.tex("sharedassets128.assets", 7, 4.0)# (a soul orb: Soul Orb R's sprite, as stretched as it gets; its sorting)pso = unity.prefab(*vm.SOUL_ORB)fleurs["SPRITE_SOUL_ORB"] = SPRITES.id(pso, next(c["v"] for c in pso["objects"][0]["c"] if c["type"] == "SpriteRenderer")["m_Sprite"], 2)diff --git a/tests/test_games.py b/tests/test_games.pyindex 5c9aecac..9e87c5a7 100644--- a/tests/test_games.py+++ b/tests/test_games.py@@ -171,6 +171,10 @@ GAMES = {presses((2500, "ok"), (4500, "ok"), (5500, "ok"), (6500, "ok")) + every(18000, 22000, 600, "right", 400),25000,presses((2500, "ok"), (4500, "ok")) + every(9000, 11000, 600, "left", 400), 14000),+ # Hollow Knight's second app, from a save of the first's made as the Knight went from the Crossroads towards+ # the Fungal Wastes: Start Game, the first profile, and the Knight walks in down there; Home saves; then again+ "hkfungal": ("HollowKnightFungalWastes.nwa", "hk1.sav", presses((2500, "ok"), (4500, "ok")) + every(9000, 11000, 600, "left", 400),+ 14000, presses((2500, "ok"), (4500, "ok")), 12000),# past the intro and the title, the name "A", Done, Yes: Frisk falls on the golden flowers and walks; Home keeps# the moment, and the next start is back there"undertale": ("Undertale.nwa", "utresume.sav",@@ -359,6 +363,9 @@ def monkeymart_save():SEEDS = {+ # (games/hollowknight/tests/cross.sav: the first app's save as the Knight goes into the second's part)+ "hkfungal": open(os.path.join(os.path.dirname(os.path.abspath(__file__)), "..", "games", "hollowknight", "tests",+ "cross.sav"), "rb").read(),"monkeymart": monkeymart_save(),# level 5 to play, 9 reached, how to play not read yet"coreball": coreball_save(5, 9),@@ -380,7 +387,7 @@ SEEDS = {# NumWorks installer keeps): before the second session, as after installing# the app again, only the scripts are left, and the save must come backCOPIES = {"championisland": "champion_saves.py", "numblocks": "numblocks_saves.py", "celeste": "celeste_saves.py",- "hollowknight": "hollowknight_saves.py", "finalearth2": "finalearth2_saves.py",+ "hollowknight": "hollowknight_saves.py", "hkfungal": "hollowknight_saves.py", "finalearth2": "finalearth2_saves.py","numpowder": "numpowder_saves.py", "undertale": "undertale_saves.py", "subway": "subway_saves.py","fnaf": "fnaf_saves.py", "doom": "doom_saves.py", "isaac": "isaac_saves.py","hillclimb": "hillclimb_saves.py", "pvz": "pvz_saves.py", "sonic": "sonic_saves.py",@@ -534,6 +541,9 @@ CHECKS = {# a game saved ("HKSV", then the play time at 152); after the reinstall, from the copy, it goes on"hollowknight": (lambda v: v[:4] == b"HKSV" and struct.unpack_from("<f", v, 152)[0] > 0,lambda v: v[:4] == b"HKSV" and struct.unpack_from("<f", v, 152)[0] > 10),+ # (the seed's play time 3.8 s, the way taken spent: played on, saved; then again)+ "hkfungal": (lambda v: v[:4] == b"HKSV" and struct.unpack_from("<f", v, 152)[0] > 6,+ lambda v: v[:4] == b"HKSV" and struct.unpack_from("<f", v, 152)[0] > 10),"numvisuals": (lambda v: v[:2] == b"V\1" and v[3] == 4 and struct.unpack_from("<i", v, 8)[0] == 2,lambda v: struct.unpack_from("<i", v, 8)[0] == 3), # the add-on and its count# a run kept (guide read), the ball on its way; then further along the same rundiff --git a/tools/release.py b/tools/release.pyindex d4871778..ccf73e2d 100644--- a/tools/release.py+++ b/tools/release.py@@ -28,6 +28,7 @@ EXTRAS = set()ALONE = {"celeste": ("Celeste", "the whole climb up Celeste Mountain"),"hollowknight": ("Hollow Knight", "from King's Pass to Hornet in Greenpath"),+ "hkfungal": ("Hollow Knight: Fungal Wastes", "Hallownest past Greenpath, sharing Hollow Knight's saves"),"undertale": ("Undertale", "the whole Underground, to the barrier and the neutral ending"),"subway": ("Subway Surfers", "the endless run down the subway's tracks, in 3D"),"fnaf": ("Five Nights at Freddy's", "five nights at Freddy Fazbear's Pizza, the 6th and the Custom Night"),