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
Doom: built, released and tested with the other big games
Mason363f0915a9b07da
diff --git a/Makefile b/Makefileindex 9f7439ef..29be7181 100644--- a/Makefile+++ b/Makefile@@ -24,7 +24,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+BIG_APPS = Celeste HollowKnight Undertale ChampionIsland FinalEarth2 NumPowder NumBlocks NumDrive SubwaySurfers FiveNightsAtFreddys Doom# the calculator's space for installed apps (0x90200000 to 0x903F0000 in its flash)APP_SPACE = 2031616# Upsilon, the N0110 and N0115's custom software, gives .nwa apps less RAM: NumPlay-Upsilon.nwa has@@ -210,6 +210,7 @@ APP_subway = games/subway/output/subway.nwa:SubwaySurfers.nwaAPP_fnaf = games/fnaf/output/fnaf.nwa:FiveNightsAtFreddys.nwaAPP_finalearth2 = games/finalearth2/output/finalearth2.nwa:FinalEarth2.nwaAPP_numpowder = games/numpowder/output/numpowder.nwa:NumPowder.nwa+APP_doom = games/doom/output/doom.nwa:Doom.nwaapps: | $(B)$(MAKE) -C games/numdash build NWLINK="node node_modules/nwlink/bin/nwlink"@@ -228,6 +229,7 @@ apps: | $(B)$(MAKE) -C games/fnaf build NWLINK="$(NWLINK)"$(MAKE) -C games/finalearth2 build NWLINK="$(NWLINK)"$(MAKE) -C games/numpowder build NWLINK="$(NWLINK)"+ $(MAKE) -C games/doom build NWLINK="$(NWLINK)"cd games/tetris/tetris && NWLINK="$(NWLINK)" $(CARGO) build --release --quietcp $(word 1,$(subst :, ,$(APP_numdash))) $(B)/apps/$(word 2,$(subst :, ,$(APP_numdash)))cp $(word 1,$(subst :, ,$(APP_crossyroad))) $(B)/apps/$(word 2,$(subst :, ,$(APP_crossyroad)))@@ -246,6 +248,7 @@ apps: | $(B)cp $(word 1,$(subst :, ,$(APP_fnaf))) $(B)/apps/$(word 2,$(subst :, ,$(APP_fnaf)))cp $(word 1,$(subst :, ,$(APP_finalearth2))) $(B)/apps/$(word 2,$(subst :, ,$(APP_finalearth2)))cp $(word 1,$(subst :, ,$(APP_numpowder))) $(B)/apps/$(word 2,$(subst :, ,$(APP_numpowder)))+ cp $(word 1,$(subst :, ,$(APP_doom))) $(B)/apps/$(word 2,$(subst :, ,$(APP_doom)))arm-none-eabi-strip --strip-unneeded $(B)/apps/Tetris.nwaSTD_APPS = $(foreach g,$(STD_GAMES),$(B)/apps/$(NWA_$(g)))@@ -305,5 +308,6 @@ clean:-$(MAKE) -C games/fnaf clean-$(MAKE) -C games/finalearth2 clean-$(MAKE) -C games/numpowder clean+ -$(MAKE) -C games/doom clean-cd games/tetris/tetris && $(CARGO) clean-$(foreach g,$(STD_GAMES),$(MAKE) -C games/$(g) clean;)diff --git a/games/doom/src/pd_render.cpp b/games/doom/src/pd_render.cppindex 132474a0..005facee 100644--- a/games/doom/src/pd_render.cpp+++ b/games/doom/src/pd_render.cpp@@ -366,8 +366,15 @@ static uint8_t col_fd[RENDER_COL_MAX];#endifstatic int16_t render_col_free;+#if NUMWORKS+extern "C" { uint32_t nw_col_overflows, nw_col_peak; } // (tests read these)+#endifstatic int16_t alloc_pd_column(int x) {if (render_col_free < 0) {+#if NUMWORKS+ if (render_col_count >= (int)nw_col_peak) nw_col_peak = render_col_count + 1;+ if (render_col_count == RENDER_COL_MAX) nw_col_overflows++;+#endifif (render_col_count == RENDER_COL_MAX) {assert(x>=0 && x<SCREENWIDTH);not_fully_covered_cols[x/(4*32)] |= 1u << ((x/4)&31);diff --git a/tests/test_games.py b/tests/test_games.pyindex 4009c1a5..9f42db88 100644--- a/tests/test_games.py+++ b/tests/test_games.py@@ -148,6 +148,11 @@ GAMES = {# the intro, then OK draws for a while (the autosave on Home); next time it comes back and more is drawn"numpowder": ("NumPowder.nwa", "numpowder.sav", presses((2000, "ok"), (3000, "ok", 1500)), 6000,presses((2000, "ok"), (2500, "right", 600), (3200, "ok", 800)), 5000),+ # the title, the menu, New Game, Knee-Deep in the Dead, Hurt Me Plenty: the hangar, walking; Home keeps the+ # moment, and the next start is back in it+ "doom": ("Doom.nwa", "doomres.sav",+ presses((2500, "ok"), (3200, "ok"), (3900, "ok"), (4600, "ok"), (6500, "up", 1500)), 9500,+ presses((4000, "up", 1000)), 7000),# Press OK to Play: the first scenario, its first goal closed, the city runs; then Continue"finalearth2": ("FinalEarth2.nwa", "finalearth2.sav", presses((2000, "ok"), (3000, "ok")), 9000,presses((2000, "ok")), 6000),@@ -180,7 +185,7 @@ SEEDS = {COPIES = {"championisland": "champion_saves.py", "numblocks": "numblocks_saves.py", "celeste": "celeste_saves.py","hollowknight": "hollowknight_saves.py", "finalearth2": "finalearth2_saves.py","numpowder": "numpowder_saves.py", "undertale": "undertale_saves.py", "subway": "subway_saves.py",- "fnaf": "fnaf_saves.py"}+ "fnaf": "fnaf_saves.py", "doom": "doom_saves.py"}CHECKS = {# the island remembers where Lucky was; after the reinstall, from the copy"championisland": (lambda v: v[:3] == b"CI1" and b"PLAYER_LOC" in v,) * 2,@@ -200,6 +205,8 @@ CHECKS = {# the night kept ("FNAF", its seconds at 40); after the reinstall, from the copy, it goes on"fnaf": (lambda v: v[:4] == b"FNAF" and struct.unpack_from("<f", v, 40)[0] > 2,lambda v: v[:4] == b"FNAF" and struct.unpack_from("<f", v, 40)[0] > 6.5),+ # the moment kept (a save named "the moment"); after the reinstall, from the copy, loaded and kept again+ "doom": (lambda v: v[:10] == b"the moment",) * 2,# a simulation saved ("NPWD"); after the reinstall, from the copy, it goes on and is saved again"numpowder": (lambda v: v[:4] == b"NPWD",) * 2,# a game saved ("HKSV", then the play time at 152); after the reinstall, from the copy, it goes ondiff --git a/tools/release.py b/tools/release.pyindex b4196ac6..739e5b69 100644--- a/tools/release.py+++ b/tools/release.py@@ -41,6 +41,8 @@ ALONE = {"elements. Too big to share the calculator with NumPlay: install it on its own"),"finalearth2": ("The Final Earth 2", "build a city on floating islands in space, every scenario and free play map. ""Too big to share the calculator with NumPlay: install it on its own"),+ "doom": ("Doom", "id Software's Doom, the shareware episode Knee-Deep in the Dead: all nine levels of Phobos. Too "+ "big to share the calculator with NumPlay: install it on its own"),}VARIANTS = [("NumPlay-Invisible.nwa", "The same app, hidden: a blank icon with no name"),