Skip to content

docs: bring the docs in line with the code, and a reference of the testing switches - #1262

Open
itaskaev2 wants to merge 21 commits into
NotRexed:mainfrom
itaskaev2:docs/audit
Open

itaskaev2 wants to merge 21 commits into
NotRexed:mainfrom
itaskaev2:docs/audit

Conversation

@itaskaev2

Copy link
Copy Markdown

The docs had drifted from the code in a number of places. This brings them back in line, and adds a reference of the switches a contributor needs for testing and debugging. Docs only: no code, tests, workflows or third_party/ change.

Every statement changed here was checked against the code at the commit it now describes (current main), and each commit cites the file and line in its message.

Wrong or stale statements, fixed (one commit each):

  • A build deletes its build files unless HOOKSHOT_KEEP_BUILD_FILES=1 (make_game.py), so an update compiles everything again. The readme said the files were kept.
  • Frame pacing paces only frame generation's frames (opts.pace is read only in vk_framegen.cpp's display thread).
  • mouse_sens.txt is written only with HOS_MOUSE_SENS set.
  • Only the Linux AppImage needs an AVX2 CPU. Windows and source builds build for the CPU they run on (nx2/build.py, nx2/host_cpu.py).
  • A new test needs no workflow edit: tests/run_all.py finds it.
  • The development tools come from the installed builder's tools folder; releases no longer carry HookshotBuilder.zip.
  • HOS_SAMPLE samples only with HOS_PROFILE set (host/mkw_glue.c).
  • The mesh shader fallback is back and on by default since v2.0.6.
  • --prepare-shaders is not run by the build.
  • The movies' neural upscale runs only on NVIDIA cards.
  • The design notes, the provenance notes and gpu/vk/VULKAN.md: the facts that drifted.

Added:

  • docs/development.md: a reference of the testing and debugging switches. It covers the input script format, screenshots, frame logs and dumps, the profilers, the GPU and memory switches including RX_VK_WB_DIFF=0 and the DLSS diagnostics, and the build switches. It also gets a table of the hookshot_options.ini keys and values.
  • readme: the mouse and the triggers in the Insert menu.
  • 52 of the switch names the code reads were documented before, 98 are now. Internal switches stay undocumented.

Left alone, for you to decide:

  • docs/versioning.md still says the current version is 0.1.0 and that only the release workflow makes tags, while v2.0.0 to v2.0.11 were tagged by hand and changelog.txt stops at 0.1.0.
  • CONTRIBUTING and third_party/a64-kit/PROVENANCE.md say third_party/ holds unmodified copies, but a64-kit has (hookshot) edits. I did not touch third_party/.
  • The readme and CONTRIBUTING give different Discord invites.
  • The "Not supported" verdict for cards without mesh shaders. Only the factual sentence about the fallback changed.
  • The dated status log in docs/design.md stays as written.

Checked against the game files: HOS_NO_MOVIES does apply to this game. The romfs has 26 movies, all .webm under Event/Movie, which is what host/nn_fs.c refuses.

tests/run_all.py changelog passes.

itaskaev2 and others added 21 commits November 9, 2026 20:27
…UILD_FILES=1

Since 55abe59 make_game.py and the builder delete the translated code and the compiled
objects once the game is ready, so an update translates and compiles the whole game again.
The readme still said the builder keeps them and an update compiles only what changed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
opts.pace is read only by the frame generation display thread (gpu/vk/vk_framegen.cpp
display_main); without frame generation do_present shows each frame as it comes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
menu_tick (gpu/vk/vk_menu.cpp) takes clicks, slider drags, the wheel and a right click as Esc
while the menu is open, and the triggers switch tabs as LB and RB do. The readme listed only
the keys and the controller buttons.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
host/nn_hid.c keeps the mouse sensitivity in the Insert menu's row (hookshot_options.ini) and
moves an old mouse_sens.txt into it; the file in the user folder is written only when
HOS_MOUSE_SENS overrides the menu.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
nx2/build.py builds the game and the Vulkan back end for the CPU it runs on (nx2/host_cpu.py:
x86-64-v3, else v2 or the baseline, issue 363). Only the AppImage's prebuilt back end is built
for x86-64-v3, and make_game.py check_cpu stops there on a CPU without AVX2.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
.github/workflows/source-regressions.yml has no paths lists and no step per test any more: one
step runs tests/run_all.py --strict, which collects every tests/test_*.py and nx2/test_*.py
(its ARGS and SKIP tables take a test's tools and the reasons it cannot run in CI). The job's
limit is 20 minutes, not 10. CONTRIBUTING.md contradicted itself on this.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…shotBuilder.zip

Releases carry HookshotBuilder.exe (the setup) and hookshot-setup.txt; the setup unpacks the
builder and its tools into %LOCALAPPDATA%\HookshotBuilder\versions\<version>\HookshotBuilder,
as the readme already says. The third_party row now names every prebuilt file the readme lists,
and the wgpu-native row says what is lost without it (build.py builds without the WebGPU
fallback, host/rx_nowgpu.c).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CONTRIBUTING.md still said the project had been tested on one Windows PC and one Linux PC;
the readme's status table has reports from many PCs, NVIDIA the most tested.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
hos_prof_start (host/mkw_glue.c, host/posix/prof.c) starts the HOS_SAMPLE thread only when
HOS_PROFILE=<seconds> is set too; with HOS_SAMPLE and HOS_SAMPLE_FILE alone, as the docs said,
nothing is sampled.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Windows and Linux, not Windows only; the Linux file names.
- The status line said the standalone build was next; the game plays.
- The link to DESIGN.md is broken on a case-sensitive host: the file is docs/design.md.
- The compiler is llvm-mingw first (HOOKSHOT_MINGW or llvm-mingw in the clone), and the CPM
  cache is RX_CPM, then cpm in the clone, before the old mkw-recomp and Eglantine caches
  (nx2/build.py cpm_dirs, nx2/make_game.py bundled_mingw).
- The layout table had no builder/, tests/ or host/posix, called a64-kit unmodified (four of its
  files carry (hookshot) changes) and left out third_party/sdl2 and stb.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The development guide named a handful of switches in passing. It now has tables of the ones a
contributor needs, checked against where each is read: running a test (headless, window,
audio, the options a run can force), scripted input and its press format (host/nn_hid.c
parse_presses), screenshots, frame logs and frame dumps, the CPU and GPU profilers and the
scripts that read them, the renderer's debugging switches, and the build's. The paragraph on
HOS_INPUT_EXCLUSIVE now says what it does: the script alone until 5 s after its last press,
on for any value.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
hookshot_options.ini is written by gpu/vk/vk_menu.cpp save() from the menu's rows (ini_key:
the row's name in lower case, output_res for Output resolution) and read at the start by
host/nn_applet.c, host/hos_main.c, gpu/vk/vk_main.cpp and host/nn_hid.c. The readme documents
only the control lines; the development guide now lists every key whose number is not plain
Off and On.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…m the code

- Linux too; the compiler is llvm-mingw, emsdk or the system's clang, the hot functions at -O2
  with the play profile (nx2/build.py); hookshot_vk.dll is loaded unless RX_BACKEND names
  another renderer (host/rx_backend.c rx_start), and the WebGPU fallback exists only in a
  Windows build made with wgpu-native.
- Rule 4: the GPU time the game reads is written by the replay (vk_replay.cpp
  NOP_REPORT_COUNTER) and scaled by RX_VK_TS_SCALE.
- Rule 5: a draw gets a pass of its own when it samples a target its pass already wrote, or
  writes one an earlier draw sampled; a draw that samples its own target stays in the pass
  (vk_draw.cpp draw_hazards).
- Rule 7 named HOS_THREAD_STATS, which nothing reads: the switch is HOS_THREAD_TIMES.
- Section 8: run-vk.ps1 runs the game at High priority unless -Priority says otherwise.

The dated status sections (9 to 11) are a log and stay as written.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… default

- gpu/PROVENANCE.md named mkw_gpu.cpp, mkw_gpu.h and build-gpu.bat, which this repository never
  had; the renderer it describes is the fallback now, gpu/vk the default.
- host/PROVENANCE.md listed mods.c as left out; host/mods.c is back since 3c8b489, the RomFS
  part of Skybound's loader. The replay is gpu/vk by default (host/rx_backend.c).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
VULKAN.md still names mkw_vk.dll, vk_image.cpp and vk_upload.cpp (gone: the code is in
vk_texture.cpp), RX_VK_PIPE_WAIT (not read; RX_VK_PIPE_SKIP=0 waits), RX_VK_DUMP=<file.ppm>
with RX_VK_DUMP_AT (RX_VK_DUMP takes a present number), RX_VK_FRAMEGEN=1 as the way on, the
budgets' old defaults (RX_VK_VRAM_MB 2048 and 4096, RX_VK_TEX_MAX_MB 512, RX_VK_MIRROR_MB
3072) and Eden's recompiler as unmodified (29 files in gpu/vk/eden carry (hookshot) changes).
A note at the top says so and points at the switch reference; the log itself is left as
written.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…erence

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The status table said the fallback for cards without mesh shaders had been taken out again.
07773ab relanded it (first in v2.0.6): gpu/vk/vk_main.cpp turns it on for a GPU with no
VK_EXT_mesh_shader and with buffer device addresses (RX_VK_NO_MESH_FALLBACK=1: off), and
vk_draw.cpp fallback_record leaves out the mesh draws with a count buffer. Whether such cards
count as supported is left as the table had it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The argument table called --prepare-shaders the build's last step. Neither nx2/make_game.py
nor either builder runs it, and none did in this repository's history: a build ends with the
shader list (nx2/shader_census.py) and the shipped pipeline lists, and the game prepares its
shaders at its first start (gpu/vk/vk_main.cpp started_up).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gpu/vk/vk_shader.cpp leaves a cooperative-matrix program out of translation when its key is
not in RX_VK_NETWORK_KEEP (the gameplay TAAU and one more by default) and the card is not
NVIDIA's or multiplies matrices in software; the movie's last pass then becomes the linear
upscale (vk_draw.cpp upscale_stub) whatever RX_VK_MOVIE_UPSCALE says. The readme described the
automatic fallback as if it applied everywhere.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
v2.0.11 turned the write-back diff back on, so the reference names RX_VK_WB_DIFF=0 as the switch. The NVIDIA DLSS and
Reflex switches that arrived with NotRexed#841 point at the readme's NVIDIA DLSS section, with the two diagnostics it does not
list (RX_VK_DLSS_TRACE, RX_VK_DLSS_DEBUG).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant