fix(camera): follow Link through crawl passages on wider screens #2009
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/renderer
area/saves
area/tooling
area/upscaling
beanstalk: approved
beanstalk: failed
beanstalk: needs approval
beanstalk: running
beanstalk: tested
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!2009
Loading…
Reference in a new issue
No description provided.
Delete branch "PirateKingIsh/Longshot:fix/crawl-camera-wide"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
At 32:9, crawl halfway through Kokiri's sword-training passage: on main the camera stays near the entrance while Link crawls away. This change lets it follow him inside, while keeping the picture wide. Fixes #1703.
Read
nx2/oot_wide.pyandtests/test_oot_camera_clearance.py. The camera sizes its near-plane clearance sphere fromh = tan(fov / 2) * near,w = h * ratio, andsqrt(w*w + h*h), followed by a margin and minimum. Feeding it 32:9 makes the square-root term about 1.81 times its 16:9 value (calculated, before the margin).The fix adjusts only the scalar after each of two clearance reads, at main offsets
0x71a844and0x71b624inf_8073a4a0. At the current head, when the picture is not 16:9 and the loaded value exactly matches that picture ratio, it supplies 16:9 to the calculation. A value 0.009 above the picture ratio stays as loaded. Both original instruction words are checked. The stored ratio, other readers, wide drawing matrices and culling stay unchanged. An opt-in lift-time diagnostic switch adds clearance tracing; ordinary builds do not enable it.The second calculation is a follow-up path in the same routine. A state flag can skip its preceding query; otherwise nonzero query outputs lead to it, subject to the camera-parameter checks. The specific gameplay condition selecting it was not established. Its execution in these production runs was not counted; the test exercises both generated hooks independently.
Testing
Tested: Windows 11 build 26200, RTX 5090, NVIDIA 621.24. Built and played unchanged main
f1f2dc5band this PR74994b08with the same committed hot list and build settings. At 5120x1440, main's camera stayed near the passage entrance and the patch followed inside. The patch also followed at 5120x2160, 2560x1440 and 2304x1440. At 5120x2160 I watched the continuation from the captured midpoint out through the far exit and all the way back, and the camera followed throughout. No crash. Render resolution was explicitly set and read back at 100% in every run; HUD Screen's edges, frame generation off, FPS counter on, Debug tools off, cap 60. Actual rates are below. At 16:10, Windows rounded the client to 2303x1440; the game's output, render readback and native capture were 2304x1440, and its picture-ratio log was 1.6000. The output dimensions set the ratio used by this code.The game-free test runs the real installer and compiles its generated C with authored register data. At
74994b08it failed on main by retaining the wrong ratio, passed 124 whole-context cases, and failed separately when either hook was deliberately removed. The current fixture additionally checks diagnostic output at each site with distinct input and host bits, as well as exact matching and the bounded trace; these later changes have not been reported as run. The fixture covers matching and nonmatching values, wide/narrow/16:9 pictures, invalid inputs, untouched registers, and missing or changed instruction words. Vector-only splices remain eligible for integer-register and flag locals, with a separate fixture covering emitted local-register handling. Windows llvm-mingw compiled the fixture and the real generated game. The wide-UI, HUD-layout, saved-picture, bubble and jitter checks pass. The lift-cache check fails identically on both trees:...and the others still by their code.The direct Windows collection used the same compiler, permissions, six workers and platform skips: main 777 passed / 77 failed / 51 skipped; patch 778 passed / 77 failed / 51 skipped. The new test is the added pass; no new failure. This is
tests/run_all.py, not a successfulmise run testclaim.test_job_queue.pywas isolated because earlier unchanged-main checks interrupted parent commands; it is not a pass.test_vbytes.pyreached the same 600-second timeout on both sides. The pinned lint tools were not installed or run.Failures present on both main and this change:
tests/test_appimage_player_build.py;tests/test_auto_handheld.py;tests/test_bug_report_defaults.py;tests/test_capture_read_once.py;tests/test_capture_readback_visibility.py;tests/test_crash_dialog.py;tests/test_crash_record.py;tests/test_crt_options.py;tests/test_damage_debug_menu.py;tests/test_dev_ab.py;tests/test_dev_build.py;tests/test_dev_migrate.py;tests/test_dev_packs.py;tests/test_device_lost_exit.py;tests/test_display_startup_failure.py;tests/test_dlss_feature_size.py;tests/test_draw_binds.py;tests/test_draw_stream_visibility.py;tests/test_failed_compile_keeps_objects.py;tests/test_flush_nothing_held.py;tests/test_frame_overlap.py;tests/test_fsr_image_retirement.py;tests/test_fsr_uniform_ownership.py;tests/test_game_menu_mouse_buttons.py;tests/test_gpu_wait_stats.py;tests/test_guest_imported.py;tests/test_high_fps_fixes.py;tests/test_host_guest_writes.py;tests/test_libc_hooks.py;tests/test_lift_cache.py;tests/test_linux_preflight.py;tests/test_linux_pressure.py;tests/test_low_vram_texture_mips.py;tests/test_make_game_ngx.py;tests/test_mesh_conv.py;tests/test_mise_build.py;tests/test_missing_nup.py;tests/test_mods_list.py;tests/test_ngx_sdk.py;tests/test_oot_shadow_fit.py;tests/test_pads_after_menu.py;tests/test_pass_barrier.py;tests/test_pending_guest_import.py;tests/test_perf_report.py;tests/test_pipeline_play_cache.py;tests/test_portable_builder_home.py;tests/test_portable_builder_startup.py;tests/test_prepare_cache_save.py;tests/test_present_queue_default.py;tests/test_present_source_crop.py;tests/test_profiling_mode.py;tests/test_psychov35_fsr3_fg.py;tests/test_readback_timeout_source.py;tests/test_recorder_own_idle.py;tests/test_recorder_sync.py;tests/test_recording_admission.py;tests/test_reflex_swapchain_lifetime.py;tests/test_renderer_new_handler.py;tests/test_renhdrum.py;tests/test_replay_write_order.py;tests/test_sampler_admission.py;tests/test_sdiv_overflow.py;tests/test_slow_frames.py;tests/test_song_note_cue.py;tests/test_sparse_mirror.py;tests/test_staging_burst.py;tests/test_target_reuse_memory.py;tests/test_texel_buffer_ownership.py;tests/test_ub_update_batch.py;tests/test_ui_record.py;tests/test_upscaler_rows.py;tests/test_vbytes.py;tests/test_vcore_escape.py;tests/test_vcore_mask0.py;tests/test_vk_occlusion_queries.py;tests/test_walk_key.py;tests/test_work_lock.py.Still to test:
Measurements
Verdict: The matched 32:9 comparison changes the camera from staying near the entrance to following Link inside. The other three patched shapes followed too. These are functional observations, one launch per row, not a throughput benchmark or an interleaved performance comparison.
All observational numbers are measured. Shapes, settings, tolerances and test limits describe configuration; the sphere-size multiplier above is calculated.
Setup: same PC, private save, scripted crawl and matched midpoint, same renderer source and settings. Frame rates use the frame log's host clock from crawl start to just before the midpoint screenshot, excluding the screenshots. The before column is the current-main 32:9 control; no extra main launches were made at the other shapes.
f1f2dc5b74994b08Before moving, the 32:9 runs captured the same open-forest position and heading. The outer thirds retain the same observed static fence posts, shelter, tree, sign and lantern. Full-third mean absolute RGB differences on the 0-255 scale were 13.7187 left and 3.1204 right. Animation, fog, lighting and elapsed time after load were not locked; this is not a pixel-identical claim or proof of all culling. The midpoint patch capture shows opaque tunnel walls at both edges. A prior probe read the 32:9 clearance input as 3.55555558 and confirmed replacement at the first site; production has no clearance diagnostic counters.
Risks
This adjusts camera collision clearance whenever the loaded scalar matches a non-16:9 picture ratio. Keeping the game's 16:9 sphere can put the wider picture's corners closer to walls. No see-through edge was observed in this passage, but other spaces and the second path need the checks above. It also restores the game's clearance at narrower shapes; the 16:10 crawl was checked, other narrow camera actions were not. At 16:9 the hook leaves the value alone.
The two hooks add a ratio check to these reads. The opt-in A64_CAMERA_DIAGNOSTICS build polls a host marker on every hit and logs bounded per-site counters and input and host bits. The build reference documents this switch and cached translation invalidation; the build now logs executable size. In the earlier diagnostic build the first read ran about once a frame (483 reads over a crawl bracket of about 8 seconds at 60 fps), so the added work is one comparison per read per frame. The capped functional runs do not quantify an uncapped CPU cost. A changed instruction word leaves that individual hook uninstalled with the existing warning. There is no switch; reverting the fix restores the earlier behavior. An update from a cached base translation must relift, adding first-update work; unchanged generated objects can still be reused. Matched cached-update and clean-build timings and executable sizes remain to be measured. No save or settings migration. Normal runtime caches may be updated by play.
Checklist
Ready for review
main; the title is a Conventional Commit.mise run testpasses (any failure that also fails onmainis named). The direct Windows runner, shared failures, timeout and skips are disclosed above; pinned lint and the strict suite remain to be run.main, or Measurements says why there is nothing to measure. Functional comparison only; no performance claim.third_party/untouched; nothing GPL-incompatible.When it applies
mainand passes here.tests/that reads changed source is updated, not weakened.mainand here, for a change that shows on screen.Assisted-by:/Co-Authored-By:trailers.The host adds marker polling for opt-in diagnostics; there is no new player option. The generated C at
74994b08was built on Windows. Linux remains in Still to test. No player documentation change is needed for this correction.Ready to merge
Windows 11 build 26200, RTX 5090, NVIDIA 621.24. Played production commit
74994b08ec, built with the committed hot list, against mainf1f2dc5b. In Kokiri's training passage at 5120x1440, main's camera stayed near the entrance and the patch followed inside. The patch also followed at 5120x2160 through and back (I watched from the midpoint through the far exit and all the way back), 2560x1440 and 2304x1440. Render resolution was set and read back at 100%, frame generation off, HUD Screen's edges, Debug tools off, cap 60. Actual midpoint-approach rates: main32:9 60.038; patch32:9 60.016, monitor 60.016,16:9 60.003,16:10 60.002 FPS. Matched outside stills retained the same observed edge scenery; no see-through tunnel edge seen. No crash. Both hooks pass the authored regression test; runtime execution of the second path was not established. Linux and other camera spaces remain untested.Recommendation: Request changes. The matched Windows run shows the camera following Link through the 32:9 crawl passage. The hook also rewrites nearby, distinct ratios, and the regression test can be skipped on a supported Windows toolchain.
The patch keeps the 16:9 collision sphere at two camera reads while preserving the wide projection. The small hook fixes the reported passage, but it also changes clearance in other camera modes, affects how the lifter optimizes the entire camera routine, and triggers a relift on update.
@fixwill do (8)nx2/oot_wide.py:47: The 0.01 window can mistake a different camera ratio for the host override. (more on the line)nx2/oot_wide.py:142: The two new guards commit the original instruction words as raw literals, and the test repeats them at line 24. (more on the line)tests/test_oot_camera_clearance.py:19: The suite forces gcc and the standalone default ignores CC. (more on the line)nx2/oot_wide.py:142: Allow hooks that touch only vector lanes to preserve integer and flag localization, with an emission test for that contract.nx2/oot_wide.py:143: Use local diagnostic counters at both sites to identify a reproducible action and record which path changed the ratio.nx2/oot_wide.py:142: Report the existing builder's per-stage timings and executable size. The translation cache must invalidate when emitted code changes.For the author (4) (a run, a measurement or a decision)
nx2/oot_wide.py:142: The per-read estimate misses a cost outside the hook. (more on the line)nx2/oot_wide.py:143: The fixture invokes the second hook directly and the production runs did not establish that gameplay reached it. (more on the line)nx2/oot_wide.py:142: The new lift key invalidates an existing translation on the first update. (more on the line)Checks: Still running:
CI / Conventional Commit title (pull_request),CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request),CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request),CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request),CI / Workflow lint (actionlint) (pull_request),CI / Website build and checks (pull_request),Guide screenshots / Guide images and local UI source review (pull_request),Third-party parts / As their notes say (pull_request),Third-party parts / The same as upstream (pull_request),PR description / Description follows the template (pull_request_target).More: does it help, other systems, switches, what was read
Does it help: Yes for the reported Windows 32:9 bug. On Windows 11 with an RTX 5090,
f1f2dc5bd2stayed at the entrance and74994b08ecfollowed Link inside at 5120×1440. The author reports one matched launch per side and 124 passing fixture cases, with a failure when either hook is removed. The capped 60.038 versus 60.016 FPS readings do not establish CPU or frame-pacing cost. The second path and Linux gameplay remain unverified.Other systems: The hooks change scalar registers used by camera collision. They add no projection or culling writes, Vulkan dependency, save or settings writes, audio work, or input work. Camera behavior can change on all GPUs, including the Steam Deck at its native 16:10 shape. The existing host aspect options determine when the hooks act. The changed generator participates in the lift cache key.
Switches: No runtime switch, player option, or switch-table change. The new test's --cc option defaults to gcc, and the runner forces that choice. Use the configured native C compiler by default and keep --cc as an explicit override.
Reviewed:
74994b08ecagainstf1f2dc5bd2: Read nx2/oot_wide.py, tests/test_oot_camera_clearance.py, AGENTS.md, CONTRIBUTING.md, docs/dev/standards.md, and the Forgejo PR template in full. Read the relevant developer rules, lift installation and emission, register lowering, host ratio initialization and publication, compiler discovery, and lift cache code. No separate review checklist or sibling Tooling checkout was present. Reviewed the supplied run summaries. Raw logs, screenshots, and the generated game C were unavailable.; nothing run (a code review).Checked and fine:
Testing: Read-only review. The author reports 777 passed, 77 failed, and 51 skipped on main versus 778 passed, 77 failed, and 51 skipped on the head in the direct Windows collection. The prior failures and timeout are shared. The isolated queue check and pinned lint are outstanding. The supplied CI checks were still running, with no head-only failure reported.
Overlaps and merge order: No overlapping pull request found in the available checkout history or review material.
Automated code review by BeanBot (gpt-6.2-sol), on the pull request's opening. Nothing was run; a maintainer decides.
@ -43,0 +44,4 @@"""The camera's near-plane clearance sphere keeps the game's ratio, not the picture's (issue 1703)."""return ("{ extern volatile float hos_wide_ratio; const float _w = hos_wide_ratio; ""if (_w > 0.0f && _w != (16.0f / 9.0f)) { float _r; memcpy(&_r, c->vreg[%d], 4); ""const float _d = _r - _w; if (_d <= 0.01f && _d >= -0.01f) { "L1: The 0.01 window can mistake a different camera ratio for the host override. With a 2312×1440 picture, for example, a camera that supplies its own 16:10 ratio would have its clearance computed at 16:9. The existing widescreen writer stores the host float directly. Verify that both reads receive that value and use exact equality if they do. If a path transforms the value, identify the override at its source. Make the nearby-ratio fixture cases check that distinct values survive.
@ -130,2 +139,4 @@(0x23b9a8, 0x2d558c00, _ratio(3, 0)),(0x33b82c, 0x2d558440, _ratio(1, 2)),# the near-plane clearance sphere and its follow-up branch: ldr s10/s14, [x19, #0x51c](0x71a844, 0xbd451e6a, _clearance(10)),L2: The two new guards commit the original instruction words as raw literals, and the test repeats them at line 24. The repository forbids committing samples from the game. Keep the guard by matching the decoded load operands or by deriving the words from independently authored AArch64 encodings. Use authored encodings in the fixture and document their provenance.
L4 (minor): The per-read estimate misses a cost outside the hook. keep_spliced excludes the hot camera routine from guest register and flag localization across its whole body, even when the runtime ratio is zero. The hooks also break fast-float regions at their sites. Compare the emitted routine with main and measure uncapped CPU frame time and lows in the crawl and a CPU-limited scene, including at 16:9.
L6 (minor): The new lift key invalidates an existing translation on the first update. Report the relift in Risks and time a matched cached update and a clean build on both commits, with lift time, total build time, and output size.
@ -131,1 +140,4 @@(0x33b82c, 0x2d558440, _ratio(1, 2)),# the near-plane clearance sphere and its follow-up branch: ldr s10/s14, [x19, #0x51c](0x71a844, 0xbd451e6a, _clearance(10)),(0x71b624, 0xbd451e6e, _clearance(14)),L5 (minor): The fixture invokes the second hook directly and the production runs did not establish that gameplay reached it. Identify an action that hits it and compare main and head for camera following and visible wall clipping. Include an extreme wide shape, a narrow shape, and an elevated gameplay Field of view setting where applicable.
@ -0,0 +16,4 @@import tempfilefrom types import SimpleNamespaceRUN_ALL_ARGS = ["--cc", "gcc"]L3: The suite forces gcc and the standalone default ignores CC. On a Windows checkout with llvm-mingw clang but no gcc on PATH, run_all skips this test or fails before running it in strict mode, even with CC configured. Resolve the compiler through the existing native toolchain support, honoring --cc then CC and using the platform's native compiler as the fallback.
@fix
I changed this pull request where an edit could (the rest needs runs, measurements or decisions): the new head is
75cbae778b.Changed
Changed in part (the rest is for the author)
Left for the author
Still for the author (no edit does these)
Nothing was built or run: check the change. Its review follows.
Automated fix by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.
Recommendation: Request changes. Both clearance hooks still depend on an exact match whose provenance is unverified in gameplay, and the supplied crawl results predate that change. The standalone fixture can also force MinGW flags onto an explicitly selected Windows Clang, and the PR description still describes the earlier implementation.
The patch gives both camera clearance calculations a 16:9 input when the loaded value equals the host picture ratio. This can let the camera follow Link through tight passages while keeping the wide picture. The fix is localized to two guarded loads and preserves eligibility for integer and flag locals, but it still splits fast-float regions and invalidates cached translations on update.
@fixwill do (9)nx2/oot_wide.py:54: The new diagnostics can expose a mismatch, but both hooks still require an exact match. A follow-up clearance value rounded by one bit would retain the wide sphere. Trace the writes to the shared field on both paths, verify the logged bits in play, and identify the display override at its source if either path transforms it.tests/test_oot_camera_clearance.py:137: Compiler discovery runs before checking --cc or CC. A Windows contributor using an explicit MSVC-target Clang with the checkout's llvm-mingw folder present and LONGSHOT_MINGW unset now passes GNU target and linker flags to that Clang, which can fail to find the MinGW headers or libraries. Discover the bundled compiler only for fallback selection and derive the flags from the selected toolchain.nx2/guest_locals.py:60: If the diff shows lost fast-float work, keep eligible arithmetic on either side batched without moving the replacement past its first consumer.nx2/oot_wide.py:190: Keep the counters and expose an on-demand snapshot or a bounded trace so short actions can be bracketed without logging for the entire session.nx2/make_game.py:3562: Use the existing stage timings and the game executable size on both sides. Cache invalidation is required for changed emitted code.tests/test_oot_camera_clearance.py:147: The fixture compiles the diagnostics only when the caller happens to export A64_CAMERA_DIAGNOSTICS=1, and it prints the diagnostic output without checking it. (more on the line)For the author (4) (a run, a measurement or a decision)
nx2/guest_locals.py:60: The synthetic fixture shows localization is allowed for a vector-only splice. It does not show what happens to the real camera routine across the two fast-float boundaries. Compare emitted code with main and measure uncapped CPU frame time and lows in the crawl and a CPU-limited scene, including at 16:9.nx2/oot_wide.py:190: The per-hit lines can now distinguish short actions. Use them to find an action that increases the second site's changed count, then compare following and wall clipping on main and head at extreme wide and narrow ratios and at elevated gameplay FOV where available.nx2/make_game.py:3562: The size line fills one input to the comparison. A player updating with a cached base translation still needs a relift when the translator code changes. Disclose that in Risks and compare matched cached updates and clean builds for lift time, total time and executable size.Since the last review (on
74994b08ec)Resolved: L2 (The two new guards commit the original instruction words as raw literals, and the test rep…)
Still open: L1 (The new diagnostics can expose a mismatch, but both hooks still require an exact match. A…); L3 (Compiler discovery runs before checking --cc or CC. A Windows contributor using an explici…); L4 (The synthetic fixture shows localization is allowed for a vector-only splice. It does not…); L5 (The per-hit lines can now distinguish short actions. Use them to find an action that incre…); L6 (The size line fills one input to the comparison. A player updating with a cached base tran…); L7 (Linux gameplay and the Steam Deck's default 16:10 path still lack an in-game check. Comple…); L8 (The Ready for review box marks mise run test as passing, but Testing reports a direct coll…); L9 (The supplied review has no paired midpoint images or source log lines, although the screen…)
New: L10 (Diagnostic lines go to stdout. In an icon launch the game opens its log on stderr, so the…); L11 (Update the description to 55faa745 and list the full diff, exact matching, retained local…); L12 (The fixture compiles the diagnostics only when the caller happens to export A64_CAMERA_DIA…)
Checks: Still running:
CI / Conventional Commit title (pull_request),CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request),CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request),CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request),CI / Workflow lint (actionlint) (pull_request),CI / Website build and checks (pull_request),Guide screenshots / Guide images and local UI source review (pull_request),Third-party parts / As their notes say (pull_request),Third-party parts / The same as upstream (pull_request).More: does it help, other systems, switches, what was read
Does it help: Unproven at 55faa745. On Windows 11 with an RTX 5090, the author reports that main
f1f2dc5bstayed near the entrance at 32:9 and74994b08followed Link inside. The single capped runs measured 60.038 versus 60.016 FPS. The earlier patch also followed at 5120x2160, 16:9 and 16:10. These observations support the earlier functional fix. A matched run on the exact-match head, execution of the second path, and uncapped frame-time costs remain unverified.Other systems: The two hooks write only the loaded scalar registers. Their code leaves projection stores, culling, HUD, save thumbnails, audio and input untouched. The earlier Windows run retained the observed scenery at both edges. Clearance can still change wall clipping on wide screens and camera placement on narrow ones. Native Linux, AMD and Steam Deck gameplay remain unverified. The first cached update from main needs a relift. Diagnostic builds write every hit through the host logger, which queues on Windows by default and writes synchronously on Linux.
Switches: A64_CAMERA_DIAGNOSTICS is a developer lift switch. It is off unless set to exactly 1, which is the right default for per-hit logging. The lift key includes it. It is outside the RX_/HOS_/LONGSHOT_ runtime switch table and needs developer documentation. No player switch or option changes.
Reviewed:
75cbae778bagainstf1f2dc5bd2: Read AGENTS.md, CONTRIBUTING.md, the Forgejo PR template and docs/dev/standards.md in full. No local review checklist or adjacent Tooling checkout was found. Read the base and since diffs, the commit history, nx2/oot_wide.py, nx2/guest_locals.py and both camera tests in full. Read the changed build finalization and relevant cache, lifter, compiler discovery and host logging paths in context. Reviewed the supplied run summaries and comment. Guest writers, emitted production camera code, captures and source logs were unavailable.; nothing run (a code review).Checked and fine:
Testing: Read-only review. Git diff --check passed. No builds or tests were run. The earlier Windows direct collection reports 777 passed, 77 failed and 51 skipped on main versus 778 passed, 77 failed and 51 skipped on
74994b08. The supplied CI checks are still running. No head-only failures are listed.Overlaps and merge order: None found in the supplied material or checkout.
Automated code review by BeanBot (gpt-6.2-sol), asked for by BeanBot, after its fix. Nothing was run; a maintainer decides.
@ -155,0 +183,4 @@"if (_r == _w) { __atomic_fetch_add(&_changed, 1, __ATOMIC_RELAXED); ")text = text.replace("const float _w = hos_wide_ratio;", "const float _w = _ratio;")reg = word & 31text = VectorOnly("{ extern volatile float hos_wide_ratio; static unsigned long long _hits, _changed; uint32_t _input, _host; "L10 (minor): Diagnostic lines go to stdout. In an icon launch the game opens its log on stderr, so the counters can run and leave no evidence in longshot_log.txt. Emit through hos_log so ordinary launches and captured test runs receive the lines.
@ -0,0 +144,4 @@if os.name == "nt" and "clang" in os.path.basename(cc).lower() and toolchain.mingw(host=True) else [])words = {oot_wide.MAIN + off: word for off, word, _ in oot_wide.SITES}words.update({oot_wide.MAIN + off: word for off, word, _ in SITES})after, _ = installed(words)L12 (minor): The fixture compiles the diagnostics only when the caller happens to export A64_CAMERA_DIAGNOSTICS=1, and it prints the diagnostic output without checking it. Swapping the logged input and host bits would still pass the context checks and mislead the provenance investigation. Explicitly exercise both switch states and check the counters and reported bits for matching and nonmatching inputs at both sites.
@fix
I changed this pull request where an edit could (the rest needs runs, measurements or decisions): the new head is
00ce8ae3b6.Changed
Changed in part (the rest is for the author)
Left for the author
Still for the author (no edit does these)
nx2/oot_wide.py:192: Use the bounded trace to identify a reproducible action that increments the second site’s changed count. Compare following and wall clipping on base and head at extreme wide and narrow ratios and at elevated gameplay FOV where available.Nothing was built or run: check the change. Its review follows.
Automated fix by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.
Recommendation: Request changes. The 32:9 crawl improved on the earlier tolerance-based build. The current hooks require exact equality, and the PR still describes the old behavior and marks the strict test suite as passing without a qualifying run.
The patch keeps the wide picture while giving two camera clearance calculations a 16:9 input when the loaded value exactly matches the picture ratio. The change is confined to two guarded scalar loads and preserves eligibility for integer and flag locals. It adds checks at those loads, splits potential fast-float regions, and requires a relift on update from a cached base translation.
@fixwill do (9)nx2/oot_wide.py:54: The new diagnostics can expose a mismatch, but both hooks still require an exact match. A follow-up clearance value rounded by one bit would retain the wide sphere. Trace the writes to the shared field on both paths, verify the logged bits in play, and identify the display override at its source if either path transforms it.nx2/guest_locals.py:60: If the diff shows lost fast-float work, keep eligible arithmetic on either side batched without moving the replacement past its first consumer.nx2/make_game.py:3564: Use the existing phase timings and executable-size output on both revisions. The cached translation must be invalidated when emitted code changes.Guide screenshots / Guide images and local UI source review (pull_request)fails on this head and passes on the base branch: Failing after 18s.CI / Website build and checks (pull_request)fails on this head and passes on the base branch: Failing after 25s.tests/test_oot_camera_clearance.py:150: Every logged hit now uses the same value for input and host. (more on the line)For the author (4) (a run, a measurement or a decision)
nx2/guest_locals.py:60: The synthetic fixture shows localization is allowed for a vector-only splice. It does not show what happens to the real camera routine across the two fast-float boundaries. Compare emitted code with main and measure uncapped CPU frame time and lows in the crawl and a CPU-limited scene, including at 16:9.nx2/oot_wide.py:192: Use the bounded trace to identify a reproducible action that increments the second site’s changed count. Compare following and wall clipping on base and head at extreme wide and narrow ratios and at elevated gameplay FOV where available.nx2/make_game.py:3564: The build reference now records the relift, but a player updating from a cached base translation still has no estimate of the added wait. Disclose the relift in PR Risks and compare matched cached updates and clean builds for lift time, total time, and executable size.Since the last review (on
75cbae778b)Resolved: L3 (Explicit MSVC-target Clang now avoids GNU flags, but it also gets no _CRT_SECURE_NO_WARNIN…); L12 (The fixture compiles the diagnostics only when the caller happens to export A64_CAMERA_DIA…)
Still open: L1 (The new diagnostics can expose a mismatch, but both hooks still require an exact match. A…); L4 (The synthetic fixture shows localization is allowed for a vector-only splice. It does not…); L5 (Use the bounded trace to identify a reproducible action that increments the second site’s…); L6 (The build reference now records the relift, but a player updating from a cached base trans…); L7 (Linux gameplay and the Steam Deck's default 16:10 path still lack an in-game check. Comple…); L8 (The Ready for review box marks mise run test as passing, but Testing reports a direct coll…); L9 (The supplied review has no paired midpoint images or source log lines, although the screen…); L11 (Bring the description up to 01854937. A loaded value 0.009 above the picture ratio is pres…)
New: L13 (The check
Guide screenshots / Guide images and local UI source review (pull_request)fai…); L14 (The checkCI / Website build and checks (pull_request)fails on this head and passes on…); L15 (The new temporary working directory also applies to the compiler, but the command still us…); L16 (The fixture keeps the marker present and invokes each hook only 62 times. Removing the cap…); L17 (Every logged hit now uses the same value for input and host. Swapping those fields or logg…)More: does it help, other systems, switches, what was read
Does it help: Unproven at HEAD 01854937. The author's matched Windows RTX 5090 run showed the camera staying near the entrance on
f1f2dc5band following Link inside on74994b08. The capped rates were 60.038 and 60.016 FPS, respectively, from one run per side. That demonstrates a functional improvement on the older build. The exact-match revision, the second path in play, and uncapped CPU frame times remain unverified.Other systems: Both loads are in shared lifted camera code, so the change can affect Windows, Linux, and Steam Deck across GPU vendors. Wide view corners can get closer to walls, and narrow views can get greater clearance. The earlier Windows run covered the target passage and three other picture shapes, but broader camera actions and Linux, AMD, and Deck gameplay remain unverified. The hooks do not write the projection, culling inputs, saves, or settings. Object-cache entries can still be reused after the relift where generated objects are unchanged.
Switches:
A64_CAMERA_DIAGNOSTICS=1is a lift-time developer switch, off when unset, and included in the lift key. That default keeps file checks and counters out of normal play. In a diagnostic build, thecamera-clearance.tracemarker is absent by default. Creating it enables up to 256 log lines per site, and a hit with it absent rearms that site's trace. Both controls are documented in the build reference. No player option or runtime switch-table entry is needed.Reviewed:
00ce8ae3b6againstf1f2dc5bd2: Verified the checkout at 01854937 and the merge base atf1f2dc5b. Read AGENTS.md, CONTRIBUTING.md, the PR template, developer standards, the commit log, both diffs, the full build reference, nx2/oot_wide.py, nx2/guest_locals.py, and both changed tests. Read the changed sections and relevant callers in host/hos_main.c and nx2/make_game.py, plus the lift, fast-float, logging, and compiler-selection code they rely on. Read the supplied comments, ledger, fix report, and CI status. The rest of the large host and builder files was outside the reviewed sections. No separate review checklist, sibling Tooling checkout, guest writer code, generated camera routine, paired captures, or source frame logs were available.; nothing run (a code review).Checked and fine:
Testing: Read-only review.
git diff --checkpassed. No build, test, or project script was run. The supplied Windows direct collection reports 777 passed, 77 failed, and 51 skipped on base versus 778 passed, 77 failed, and 51 skipped on the earlier patch. The supplied CI status lists two head-only failures, which are tracked separately by the bot. No gameplay or fixture run was supplied for 01854937.Overlaps and merge order: None found in the supplied material.
Automated code review by BeanBot (gpt-6.2-sol), asked for by BeanBot, after its fix. Nothing was run; a maintainer decides.
@ -0,0 +142,4 @@check(site, 16.0f/9.0f, 32.0f/9.0f, 0);check(site, NAN, 32.0f/9.0f, 0);}CHECK(logs == 0); /* No marker: hits and changes still accumulate. */L16 (minor): The fixture keeps the marker present and invokes each hook only 62 times. Removing the cap or breaking rearming would still pass. Exercise a marker-absent hit, at least 257 enabled hits per site, and a remove-and-recreate cycle, checking both log counts and cumulative counters.
@ -0,0 +147,4 @@CHECK(marker != NULL);CHECK(fclose(marker) == 0);for (unsigned site = 0; site < 2; site++) {for (unsigned i = 0; i < 257; i++) check(site, shapes[0], shapes[0], 1);L17 (minor): Every logged hit now uses the same value for input and host. Swapping those fields or logging the host value twice would pass, although that would hide the mismatch the trace is meant to diagnose. Include a nonmatching input among the 257 enabled hits at each site so the existing log check covers distinct bits and a hit that leaves the changed counter alone.
@ -0,0 +190,4 @@after, _ = installed(words)os.environ["A64_CAMERA_DIAGNOSTICS"] = "1"diagnostic_after, _ = installed(words)if original_switch is None:L15: The new temporary working directory also applies to the compiler, but the command still uses the original cc value. On Linux, --cc ./tools/clang used to resolve from the caller’s directory and now resolves inside the fixture directory. Compile from the original working directory and use the temporary directory for the fixture executable only.
@fix
I changed this pull request where an edit could (the rest needs runs, measurements or decisions): the new head is
db957be18b.Changed
Left for the author
Still for the author (no edit does these)
nx2/oot_wide.py:192: Use the bounded trace to identify a reproducible action that increments the second site’s changed count. Compare following and wall clipping on base and head at extreme wide and narrow ratios and at elevated gameplay FOV where available.Nothing was built or run: check the change. Its review follows.
Automated fix by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.
Recommendation: Request changes. The reported Windows run shows the camera following Link at 32:9, and the new fixture covers distinct diagnostic values at both hooks. Both hooks still skip a picture ratio rounded by one float step, and the PR description still gives the wrong matching rule and marks the strict suite as passing.
The change restores 16:9 collision clearance at two camera reads when the loaded ratio exactly matches the picture ratio. It keeps the wide projection and confines the replacement to the loaded vector register. It adds a comparison at each read, changes fast-float region boundaries, and invalidates cached translations from the base.
@fixwill do (8)nx2/oot_wide.py:54: The new diagnostics can expose a mismatch, but both hooks still require an exact match. A follow-up clearance value rounded by one bit would retain the wide sphere. Trace the writes to the shared field on both paths, verify the logged bits in play, and identify the display override at its source if either path transforms it.nx2/guest_locals.py:60: If the diff shows lost fast-float work, keep eligible arithmetic on either side batched without moving the replacement past its first consumer.nx2/make_game.py:3564: Use the existing phase timings and executable-size output on both revisions. The cached translation must be invalidated when emitted code changes.Guide screenshots / Guide images and local UI source review (pull_request)fails on this head and passes on the base branch: Failing after 18s.CI / Website build and checks (pull_request)fails on this head and passes on the base branch: Failing after 25s.For the author (4) (a run, a measurement or a decision)
nx2/guest_locals.py:60: The synthetic fixture shows localization is allowed for a vector-only splice. It does not show what happens to the real camera routine across the two fast-float boundaries. Compare emitted code with main and measure uncapped CPU frame time and lows in the crawl and a CPU-limited scene, including at 16:9.nx2/oot_wide.py:192: Use the bounded trace to identify a reproducible action that increments the second site’s changed count. Compare following and wall clipping on base and head at extreme wide and narrow ratios and at elevated gameplay FOV where available.nx2/make_game.py:3564: The build reference now records the relift, but a player updating from a cached base translation still has no estimate of the added wait. Disclose the relift in PR Risks and compare matched cached updates and clean builds for lift time, total time, and executable size.Since the last review (on
00ce8ae3b6)Resolved: L17 (Every logged hit now uses the same value for input and host. Swapping those fields or logg…)
Still open: L1 (The new diagnostics can expose a mismatch, but both hooks still require an exact match. A…); L4 (The synthetic fixture shows localization is allowed for a vector-only splice. It does not…); L5 (Use the bounded trace to identify a reproducible action that increments the second site’s…); L6 (The build reference now records the relift, but a player updating from a cached base trans…); L7 (Linux gameplay and the Steam Deck's default 16:10 path still lack an in-game check. Comple…); L8 (The Ready for review box marks mise run test as passing, but Testing reports a direct coll…); L9 (The supplied review has no paired midpoint images or source log lines, although the screen…); L11 (Update the PR description to 892ca612. A loaded value 0.009 above the picture ratio now st…); L13 (The check
Guide screenshots / Guide images and local UI source review (pull_request)fai…); L14 (The checkCI / Website build and checks (pull_request)fails on this head and passes on…)More: does it help, other systems, switches, what was read
Does it help: Yes for the reported Windows crawl on
74994b08. At 5120×1440 on an RTX 5090, basef1f2dc5bstayed near the entrance at 60.038 FPS and the patch followed Link at 60.016 FPS. The PR reports one capped run per side from the host frame log. Uncapped CPU cost, build cost, and gameplay at 892ca612 remain unproven.Other systems: The camera hooks are shared across Windows and Linux and can change collision clearance at wide and narrow ratios. Other passages, the second path, Linux, Steam Deck, and other affected Tier 1 configurations lack gameplay evidence. Projection and culling code are untouched, and the author observed the same static edge scenery in the paired 32:9 outside views. The builder must relift a cached base translation and can reuse unchanged objects.
Switches:
A64_CAMERA_DIAGNOSTICS=1is a developer build option and defaults off. That keeps the counters and per-hit file polling out of player builds. The option is documented in the build reference and included in the lift key. In diagnostic builds, thecamera-clearance.tracemarker defaults absent and enables up to 256 logs per site per trace.Reviewed:
db957be18bagainstf1f2dc5bd2: Read AGENTS.md, CONTRIBUTING.md, docs/dev/standards.md, the Forgejo PR template, docs/dev/reference/build.md, nx2/oot_wide.py, nx2/guest_locals.py, and both camera tests in full. Read the PR diff, the since-ledger diff, and the changed sections and relevant callers in host/hos_main.c and nx2/make_game.py. Read relevant lifter, fast-float, logging, and test-runner sections, plus the supplied PR, comment, CI summary, and fix report. No local review-checklist.md or sibling Tooling checkout was present. The review used the checked-out 892ca612 as HEAD, matching the range diff.; nothing run (a code review).Checked and fine:
Testing: Read-only review. The author reports 777 passed on base and 778 passed on
74994b08, with 77 failures and 51 skips on each side in the direct Windows collection. The current fixture and diagnostic host build have no supplied run results. Pinned lint, strict-suite results, Linux and Deck gameplay, and the measurements in the open ledger are pending. Two supplied CI checks fail only on the head and are tracked by the bot.Overlaps and merge order: None found in the local history or supplied discussion.
Automated code review by BeanBot (gpt-6.2-sol), asked for by BeanBot, after its fix. Nothing was run; a maintainer decides.
@fix
I didn't fix this pull request: it failed (the Codex runner answered 409: busy). Nothing was pushed.
Automated fix by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.
@fix
I edited this pull request's description (8 edits); no file needed changing.
Changed
74994b08, and documented local eligibility, marker polling, executable-size logging and build-reference changes.Changed in part (the rest is for the author)
Left for the author
Still for the author (no edit does these)
nx2/oot_wide.py:54: The new diagnostics can expose a mismatch, but both hooks still require an exact match. A follow-up clearance value rounded by one bit would retain the wide sphere. Trace the writes to the shared field on both paths, verify the logged bits in play, and identify the display override at its source if either path transforms it.nx2/oot_wide.py:192: Use the bounded trace to identify a reproducible action that increments the second site’s changed count. Compare following and wall clipping on base and head at extreme wide and narrow ratios and at elevated gameplay FOV where available.Guide screenshots / Guide images and local UI source review (pull_request)fails on this head and passes on the base branch: Failing after 18s.CI / Website build and checks (pull_request)fails on this head and passes on the base branch: Failing after 25s.Automated fix by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.
@fix
I didn't fix this pull request: it isn't open.
Automated fix by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.