Commit Graph
374 Commits
Author SHA1 Message Date
iChris4 131da8a7a9 Keep the cockpit wheel with the view and let the native wheel recover
Found on a Quest 3 through Virtual Desktop (VirtualDesktopXR, Vulkan):
the race camera's view matched the scene camera exactly and the kart's
own wheel animated (228 draws a frame took the copy), but during the
race's opening pan no draw took it, the 30-frame fallback latched the VR
wheel for that vehicle, and it stayed until the scene changed.

The fallback now heals: copies keep being published, the VR wheel stands
in only while draws are not taking them, and the vehicle's own wheel
returns as soon as they are. Both switches are logged, a few per race.

With first_person_rotation "yaw_pitch" or "full" the wheel copy and the
hands' wheel geometry now ride in the view's own frame (the kart's
orientation around the seat) instead of the level seat, so the wheel no
longer tilts against the view on slopes.

Aurora logs, after about half a second, five seconds and a minute of
copies, how many draws bound a copied array (inside and outside its
window), how many matched, and the closest position matrix against the
expected one, so a mismatch says whether the array or the matrix differs.
2026-09-22 03:56:38 +02:00
iChris4 0d07df14c9 Add the cockpit and hand-steering settings, docs and credits
F10 > VR (and the headset panel) gains a Seat choice (cockpit or custom,
with the cockpit scale or the existing custom sliders), "Turn the steering
wheel", "Use the vehicle's own wheel", "Hand steering (by heurazy)" and its
tuning, plus a line saying which wheel the cockpit found and how many
draws took the animated copy. "Reset first-person defaults" covers the
seat and wheel keys; hand steering keeps its own choice.

OPENXR.md documents the seats and a new "Steering wheel and hand
steering" section, fixes the stale first-person defaults in the sample
configuration, and lists the headset validation still owed. README and
THIRD-PARTY-NOTICES credit heurazy's mario-kart-wii-VR-port (GPL-3.0) and
the references it credits.
2026-09-22 03:56:30 +02:00
iChris4 9b61715ab9 Turn the cockpit wheel with the steering, and add hand steering
Every XR frame in the cockpit seat the pacing thread locates both grips in
the seated frame (the immersive base turned by the lean-back angle, the
frame the eye transforms place the vehicle in) and publishes a driving
snapshot. The wheel or handlebar shows the left stick's steering at the
configured full-lock angle, eased; the vehicle's own wheel reads that angle
on the guest thread.

With hand_steering on (off by default), squeezing a grip near the wheel or
handlebar takes hold of it (a short pulse on grab and release); one or two
hands turn it through heurazy's SteeringWheel, and while it is held the
wheel replaces the left stick's X axis in both the Wii Remote and gamepad
presentations, the stick's Y still aims items, and a holding grip no
longer presses C or a shoulder. The settings panel withholds it like any
other input.

The stereo packet carries the cockpit overlay: the hands, in the runtime's
hand mesh (XR_EXT_hand_tracking + XR_FB_hand_tracking_mesh, requested only
when hand steering is on at launch) or procedural gloves, and the separate
VR wheel or handlebar whenever the vehicle's own is not the one turning.
2026-09-22 03:56:23 +02:00
iChris4 3463813a65 Seat first person in the cockpit and animate the vehicle's own wheel
first_person_seat = "cockpit" (the new default) places the head at the
driver's own eyes, measured once from the character's head bone while the
kart drives straight and undamaged, kept behind the steering wheel, at a
life-size scale (cockpit_units_per_meter, grown with the character's
height and the player's size). "yaw" takes the kart's driving direction
from a level seat frame that follows the simulation's position and
direction, so damage spins and tricks do not turn the seat.
first_person_seat = "custom" keeps the previous offset placement.

At the race draw boundary the vehicle's steering wheel disc (karts) or
handle part (bikes, re-seated level while the bike banks) is decoded from
its MDL0, turned on a copy, and posted to the GX thread for Aurora to
substitute into the player's own draws; the copies are dropped after the
frame's draws. The anchor carries the wheel or handlebar geometry in the
seated frame and the frame's exact scale, which reaches the policy and
aurora_set_stereo_scene_anchor_scaled. If no draw takes the copies for 30
frames the vehicle falls back to the VR wheel, and the log says so.

The wheel copy is matched against RaceCamera::GetViewMtx with no dolly
offset, since the scene camera is only set once the draws run; the log
reports its distance from the scene camera once a second.

Nothing turns the wheel yet: the angle comes from the XR side's driving
snapshot, which the next change publishes.

Guest offsets ported from heurazy's mario-kart-wii-VR-port, each
re-checked against the generated leaf getters and the decompilation.
2026-09-22 03:56:04 +02:00
iChris4 50dc354123 Add the cockpit, steering-wheel and hand-steering building blocks
The pure pieces of the first-person cockpit and hand steering, ported from
heurazy's mario-kart-wii-VR-port: the SteeringWheel grab/turn model, the
native wheel vertex rotation, the level seat stabiliser, the seated-eye and
wheel/handlebar geometry, and the XR_FB_hand_tracking_mesh loader. Adds
openxr_driving.h, the OpenXR-free snapshot the pacing thread will publish for
the guest thread, with the hand-off rule (a held wheel replaces the left
stick's X and releases that hand's grip for the game) and the wheel's
displayed angle.

New [vr] keys: first_person_seat (cockpit), cockpit_units_per_meter (100),
steering_wheel (true), native_steering_wheel (true), hand_steering (false)
and the seven wheel_* tuning keys. Nothing reads them yet.

The fresh-config template now writes the first-person defaults the
constants hold (50 / 1.5 / 0); d86dcb0 updated the constants but not the
template.

Tests: mkw_steering_wheel_tests (the fork's), mkw_vr_cockpit_tests,
mkw_vr_hand_steering_tests.
2026-09-22 03:55:40 +02:00
iChris4 21b8d209dd Add the VR cockpit overlay to Aurora's eye replay
A stereo packet can now carry an AuroraCockpit: tracked hands and, when the
vehicle's own wheel cannot be animated, a synthetic steering wheel or
handlebar, all in metres in the seated frame. Each eye draws it inside the
scene's pass just before the first virtual-screen draw, depth-tested with
the world's own depth mapping (captured from a full-view world draw), so
the kart and track occlude the hands and the 2D layer cannot hide them.
Hands use a runtime-provided hand mesh when one is supplied and a
procedural glove otherwise.

aurora_set_stereo_scene_anchor_scaled lets the sealed frame own its world
scale: each eye's head translation is rescaled from the packet's scale to
the frame's. A non-finite cockpit is dropped with one warning; the frame
still renders.

Ported from heurazy's mario-kart-wii-VR-port (GPL-3.0-or-later).
2026-09-22 03:55:31 +02:00
iChris4 f3d7277ff3 Add native steering-wheel vertex substitution to Aurora
The VR first-person camera will animate the local vehicle's steering wheel
by handing Aurora a rotated copy of one of the vehicle's position arrays.
A draw picks up the copy only when it binds that exact array with the local
vehicle's position matrix (per-position ownership for indexed-matrix
draws), so opponents sharing the asset keep the original vertices. The copy
takes the same padded upload path as the original and never touches the
shared array cache.

Ported from heurazy's mario-kart-wii-VR-port (GPL-3.0-or-later).
2026-09-22 03:54:33 +02:00
iChris4 709fa89ed9 Add PatchesPage functionality and related resources 2026-09-22 03:54:10 +02:00
iChris4andClaude Opus 5 4504a5a67d Stage the DirectX shader compiler into the custom Dawn package
Dawn's install produces only its own DLL, but this package replaces
dawn_prebuilt wholesale and LocalBuild.ps1 copies dxcompiler.dll and dxil.dll
out of it into the product. Dawn loads those at run time instead of importing
them, so a package without them builds and installs cleanly and then fails to
compile shaders on D3D12.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-21 02:55:28 +02:00
iChris4andClaude Opus 5 8245af6607 Fix the Dawn source extraction under Windows PowerShell
Windows PowerShell drops the inner double quotes when it builds a native
command line, so Python received filter=data as a bare name and the build
stopped at extraction with "Python 3.12+ required".

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-21 02:35:04 +02:00
iChris4andClaude Opus 5 7498b78ce4 Release 0.2.42 and Quest app 0.3.0
Bump the backend to 0.2.42 and the Quest app to versionCode 3 / 0.3.0-quest.
This release carries the Windows Vulkan OpenXR binding, so it ships the custom
Dawn DLL that exports the Aurora Vulkan ABI.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-21 02:34:31 +02:00
iChris4andClaude Opus 5 1d8fcac35e Scan GX_DEFERRED overrides, and guard the Retro-WFC payload
The native-registration scan only knew PPC_NATIVE_OVERRIDE, so every
GX_DEFERRED_OVERRIDE_VOID was missing from the index; the deferred form
registers `symbol` and posts the hand-written `symbol_gx`.

A Retro Rewind kit built from a translation without the Retro-WFC payload now
refuses to package instead of crashing on entering WFC, and on Android ImGui
keeps off SDL's cursor, which ART aborts on from a guest fiber's stack.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-21 02:34:31 +02:00
iChris4 c84de48f7d Clarify launcher configuration details for OpenXR VR; specify graphics API selection process 2026-09-21 00:43:51 +02:00
iChris4 e7b670b2cc Added Vulkan PC OpenXR Support 2026-09-21 00:31:46 +02:00
iChris4 fbc9ce7217 Implement render-first pacing for D3D12 and Vulkan backends; enhance packet management and diagnostics 2026-09-20 17:36:08 +02:00
iChris4 787dbcf7d2 Implement more detailed diagnostics for OpenXR stages 2026-09-20 17:24:16 +02:00
iChris4 c4c7078afc Enhance texture management and profiling in GX thread; add reinitialization flag and optimize consumer behavior 2026-09-20 17:10:00 +02:00
iChris4 6a1641e0b7 Implement GX Thread for Asynchronous Rendering
- Introduced a new GX thread to handle the rendering pipeline, allowing the game thread to post commands without blocking.
- Added `gx_thread.h` and `gx_thread.cpp` to manage the command ring buffer and thread synchronization.
- Updated `vi.cpp` to utilize the GX thread for rendering tasks, improving frame pacing and responsiveness.
- Modified `main.cpp` to configure and start the GX thread, ensuring it integrates with the existing rendering workflow.
- Enhanced `openxr_integration.cpp` to register the GX thread with OpenXR for better performance in VR scenarios.
- Refactored `settings_overlay.cpp` to remove unnecessary waits for the frame worker, as the overlay now draws directly into the game thread's ImGui frame.
- Improved error handling and logging in the GX thread to capture exceptions during command execution.
2026-09-19 22:57:49 +02:00
iChris4 ffa63fa60a Implement render-first pacing for Vulkan backend and enhance view location handling 2026-09-19 20:36:03 +02:00
iChris4 47b59c7294 Implement per-pass GPU timing for performance tracking and optimization & fixed mono in Immersive 2026-09-19 19:23:57 +02:00
iChris4 f0e5e43985 README: replace header image with the WiiCompiled VR logo 2026-09-19 18:26:46 +02:00
iChris4andClaude Opus 5 80b4be4f6c Release 0.2.41 and Quest app 0.2.0
Bump the backend to 0.2.41 and the Quest app to versionCode 2 / 0.2.0-quest.
They ship together because the app's game kit fingerprints runtime/include,
and a 0.2.40 installation's headers no longer match it, so WheelWizard's
Build for Quest needs the matching setup.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-19 15:52:54 +02:00
iChris4 7c981888d6 Set default render scale for VR to 0.8 on Quest and update related configurations 2026-09-19 15:33:27 +02:00
iChris4 e681294709 Refactor OpenXR controller input handling and update settings panel interactions 2026-09-19 15:28:20 +02:00
iChris4 60c443654f Added performance level configuration for OpenXR runtime and enhance Aurora's frame worker 2026-09-19 04:43:47 +02:00
iChris4 d296b3dcb3 Quest: optimize compilation rules, adjust stack protection, and increase indirect dispatch cache size 2026-09-19 03:18:07 +02:00
iChris4 7f2113dbc5 - Added new strings for installation reset prompts and messages in strings.xml.
- Created InstallReset.kt to handle the removal of game files, built games, and mod packs while preserving user data.
- Implemented unit tests for InstallReset to ensure correct functionality and file handling.
- Updated RetroRewindPackTest to include new test cases for update and deletion order.
- Enhanced Vulkan interop and OpenXR integration to support new thread scheduling hints for Android.
- Improved error handling and logging for GPU submission failures in Vulkan backend.
2026-09-19 00:08:58 +02:00
iChris4 d4a3f0b350 Quest Fixed Vulkan pipeline cache management and storage mechanisms 2026-09-18 23:38:55 +02:00
iChris4andClaude Opus 5 bf3b53555b Release 0.2.40
Bump the backend version for the release that adds the Meta Quest app and
merges upstream v0.2.32, and point the DISTRIBUTION.md verify example at the
tag that goes with it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-18 02:41:56 +02:00
iChris4 5899114b4c Add ReverbHi audio processing functions and improve memory handling 2026-09-18 02:24:02 +02:00
iChris4 d2fa3789b0 Updated Quest Launcher & Added Retro Rewind Automatic Download 2026-09-18 01:27:17 +02:00
iChris4andClaude Opus 5 ee5df403ac Merge upstream/main (v0.2.32) into openxr-work
Brings in the keyboard/mouse rebinding overhaul (#162), the Kamek
skip-return hook fixes (#182, #218), the exit button and controller LED
fix (#221), the autohide-cursor and mute hotkey fix (#211), the Linux
--sysroot plumbing (#224) and the switch to the theofficialgman
dawn-build fork (#215).

Conflicts resolved to keep the VR integration intact:

- settings_overlay.cpp/.h: kept both new declarations. The controller
  rebinding UI takes upstream's click-to-rebind widgets wholesale - our
  only edit there was wrapping the combo width in Scaled(), and
  upstream's bindingWidth is already font-relative, so the headset
  panel still scales. Kept our DrawResolutionMenu() extraction (the VR
  panel reuses it) while adopting upstream's DrawExitPrompt() and its
  new DrawTopBar() prologue; kept our Diagnostics menu alongside
  upstream's exit-button width math. HandleEvents merges both keyboard
  paths, with the VR recenter hotkey now guarded by !g_rebind.active so
  it cannot fire while a binding is being captured.

- AuroraDawnProvider.cmake: dropped our now-dead Android hash block.
  Upstream restructured the pins into an if/elseif chain that already
  covers android/aarch64, with the digest for the new dawn-build fork;
  our leftover block was unreachable and carried the old encounter
  digest.

- Version plumbing (Build-Installer.ps1, Setup.Windows Program.cs and
  csproj): kept this fork's own line, which is 0.2.39 and centralised in
  Launcher/Directory.Build.props, rather than regressing to upstream's
  hardcoded 0.2.32.

Verified: translator 654/654; runtime ctest 14/14 including every VR
test; WiiCompiled and RetroRewind link; aurora gx_fifo_tests 262/263,
the one failure being the TevRegisterLiveness case already documented as
pre-existing on this branch.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-17 23:02:33 +02:00
iChris4 321db74a0f Added Support for both Base and Retro Rewind in the launher 2026-09-17 22:46:15 +02:00
iChris4 58c0890983 Added Retro Rewind Quest Support 2026-09-17 21:36:00 +02:00
iChris4 0bf2675db1 Introduced translator_host C program to start the WiiCompiled translator on the headset, managing heap pointer tagging and dynamic library loading. 2026-09-17 20:33:43 +02:00
iChris4 2f85207c39 Added Android Launcher and Disk Extration 2026-09-17 18:32:04 +02:00
iChris4 1346e53cd6 Implement OpenXR Settings Panel and Stereo Overlay 2026-09-17 04:32:22 +02:00
iChris4 f222eedf6b Implement log export functionality and OpenXR diagnostics 2026-09-17 02:05:12 +02:00
iChris4 19485b9e8b Implement OpenXR Wii Remote support 2026-09-16 23:58:04 +02:00
iChris4 75f0f5f26d Refactor QuestSurface and Build-Quest scripts for improved surface handling and performance logging 2026-09-16 22:30:05 +02:00
iChris4 e52227baf5 Added Android Meta Quest Support 2026-09-16 22:06:34 +02:00
iChris4 49b8602543 Remove OpenXR Vulkan backend implementation files 2026-09-16 22:04:30 +02:00
iChris4 3e8bdcfd7b Added Support for Multiplayer Player 1 Immersive View 2026-09-16 17:06:03 +02:00
patchzyy 7e6604c415 Why did this change the readme?
I merged a PR and missed it changed the readme...
2026-09-15 22:53:20 +02:00
patchzyy 6fb593749e version 2026-09-14 20:36:18 +02:00
theofficialgman 8ec3a1b752 Switch to custom patched llvm 22.1.8 in Linux appimage builder (#214)
* linux prepare-portable-tools: derive llvm and cmake asset paths directly from archive names

* switch to patched LLVM 22.X release

Release assets are extracted and re-uploaded from official CI run on a WIP PR: https://github.com/llvm/llvm-project/actions/runs/34549173201?pr=222821
2026-09-14 18:27:49 +02:00
Nicholas Bly 8705e957c7 Fix autohide cursor + mute hotkey (#211)
* Fix autohide cursor + mute hotkey

* fixes

* Fix rebinding + spacing fixes
2026-09-14 17:00:08 +02:00
theofficialgmanandpatchzyy 8e0cc96898 Scope Kamek bl-patch LR-continuation detection to genuine skip-return… (#218)
* Scope Kamek bl-patch LR-continuation detection to genuine skip-return targets

Fix crash from Kamek skip-return hooks (Item Rain crash) (#182) added every
Kamek BranchLink patch target to lrContinuationCallTargets unconditionally,
with no filter analogous to the RetroWfcHookSetsLinkRegister check already
used for RetroWFC hooks. Since bl is the ordinary PowerPC call instruction,
this made the codegen treat effectively every patched call in the mod as a
potential skip-return hook, forcing conservative handling (full register
reload, disabled resident-call fast paths, local LR-continuation dispatch
tables) onto thousands of calls that just return normally.

For Retro Rewind this inflated total translated mod size by +42%
(1,414,327 -> 2,005,284 lines), concentrated in ~10 unrelated overlay
functions that happened to call a patched target, and was enough to make
one aggregate build shard pathologically slow to compile (hangs Linux CI).

Instead, only mark a bl target as LR-continuation-aware if a lightweight
discovery-only decode of its own body actually finds evidence of
skip-return behavior via DiscoverLrRelativeIndirectJumpOffsets. Falls back
to the conservative (old) behavior if a target can't be statically
analyzed, so no skip-return case is silently missed.

Verified against the real Retro Rewind mod: total mod size returns to
1,416,350 lines (+0.14% vs. pre-fix, down from +42%), all 6 genuinely new
continuation functions from the original fix are preserved, zero
functions lost, and all 609 existing translator tests still pass.

* Distinguish exhausted from truncated LR-relative offset search

CodeRabbit flagged that TargetExhibitsLrSkipReturn (added in ad2d4e7) treated
an empty DiscoverLrRelativeIndirectJumpOffsets result as a verified "this
target never skip-returns," but the analysis silently drops any path state
once more than MaxStatesPerInstruction (16) distinct states reach one
instruction - a bctr/return on a dropped state can never contribute its
offset, so an empty result could be an incomplete search rather than a real
negative. Treating every capped case as "skip-return possible" outright was
rejected as too broad a fallback given how conservative/expensive that path
already is.

Instead: raise MaxStatesPerInstruction 16 -> 512 (an arbitrary conservative
bound to begin with, not something correctness depended on) so genuinely
branchy functions have far more headroom to reach an exhaustive answer, and
give DiscoverLrRelativeIndirectJumpOffsets an optional onStateCapExceeded
callback that fires exactly when a state is dropped. TargetExhibitsLrSkipReturn
now only falls back to the conservative "treat as skip-return" answer when
the search both found nothing and the cap was actually hit during that run -
not whenever the cap merely exists - so a target is trusted as clean once the
search genuinely exhausts it.

Verified: all 609 translator tests pass, and a full translate-mod run against
the real Retro Rewind mod produces byte-for-byte identical output to the
prior fix (same 4,065 functions, 1,416,350 total lines) - confirming the
16-state cap was never actually the limiting factor in practice and this
change is a pure safety-net closure, not a behavior change for this mod.

* Add LR continuation regression tests

* Refine LR continuation hook analysis

---------

Co-authored-by: patchzyy <64382339+patchzyy@users.noreply.github.com>
2026-09-14 16:47:28 +02:00
jamie 6458ec6abe feat(linux): add --sysroot plumbing for bundled toolchains (#224)
* feat(linux): add --sysroot plumbing for bundled toolchains

* fix(linux): clear cached CMAKE_SYSROOT when --sysroot is omitted

* fix(linux): reject null/empty --sysroot in install command
2026-09-13 22:49:40 +02:00
theofficialgman 209405dfb7 switch to dawn-build fork building on Ubuntu 22.04 rather than 24.04 runners (#215)
fixes https://github.com/patchzyy/Wiicompiled/issues/159
previous requirement for ubuntu 24.04+ libstdc++ inherited from dawn prebuilds now dropped to ubuntu 22.04+ libstdc++ like the rest of the prebuilds

also add all architectures to the URL_HASH check since the dawn tag doesn't change but the binaries have
2026-09-13 14:15:30 +02:00