Give game 1.1.1 the direct mouse camera: two sites in the camera's input update take the raw mouse counts after the stick's dead zone and curve, and the Controls tab shows the mouse rows again.

The counts are divided by the frames the game steps and by the camera speed, as the game multiplies the processed stick by both, so a count turns the camera 0.08 degrees on both axes at every frame rate and stick camera speed. The 1.4.3 selectors stay off on 1.1.1. NX2NAVI_MOUSE_TRACE=1 logs the camera input updates and the camera's direction for measurements, and tests/mouse_direct_check.py checks the 1.1.1 hooks.
This commit is contained in:
Gaetarra
2026-11-10 20:47:58 +01:00
parent a7b8810d37
commit ef0b2b49a3
14 changed files with 260 additions and 19 deletions

View File

@@ -48,6 +48,20 @@ site osolver main 38afd10 bd440d02 1e2a1002 # the same three words in the seco
site osolver main 38afd1c 1f010800 1f218800
site osolver main 38afd20 1e380001 1e280001
# Mouse camera: the camera's stick input update (main+0x37c300) puts the right stick through a radial dead zone of
# 0.005, scales the radius to one, clamps it and raises it to StickExponent (2, the default of
# game__component__PlayerCameraParam); then come the reset timer at +0x5e0 (the stick reads zero while it runs), the X/Y
# inversion (w21 bits 1 and 2) and the idle test (flags +0x530 bit 4: the processed stick under 10%). At 37c45c s1 and
# s0 hold the processed x and y for the stores at +0x538 and +0x53c: the host callback performs the displaced store of
# s1 and adds the raw mouse counts to both (runtime/mouse_direct.c camera_input_oot), so the mouse never becomes a stick
# value and meets no dead zone or curve. At 37c4f0, the displaced ldp d9, d8, [sp, #0x10] before the update's last
# `str w8, [x20, #0x530]`, w8 holds the flags: a second callback clears the idle bit for an update the mouse moved in
# (camera_activity_oot). x30 is the function's own saved one at both sites. The callbacks' addresses are page +0xfd0
# and +0xfc0; the page is main+0x4ea0000 on this build.
set mouse_direct NX2NAVI_MOUSE_DIRECT_PATCH 1
site mouse_direct main 37c45c bd053a81 952c92dd # str s1, [x20, #0x538] -> bl page+0xfd0
site mouse_direct main 37c4f0 6d4123e9 952c92b4 # ldp d9, d8, [sp, #0x10] -> bl page+0xfc0
# Game image: the graphics setup (main+0x1202ce0) fills the renderer's configuration with the size of the picture the
# game presents, 2560x1440 at every console mode (config +0x14, copied to renderer +0x9c, which main+0x346be50 reads
# for the main render target set, main+0xf49040), and the display settings object (main+0x31f3890) stores the same size