Commit Graph
234 Commits
Author SHA1 Message Date
iChris4andClaude Opus 5 fd42edf303 Merge kart draws again while the native steering wheel is animated
The animated copy is registered for the vehicle's whole position array, and a
race frame has 228 primitives that bind it. Suppressing draw merging for all of
them turned the kart's display list back into hundreds of separate draw calls,
each recorded once and replayed in the mono pass and both eyes: on a Quest 3 the
app frame went from 15.7 ms to 21.7 ms with the GPU pinned at 97 %, which past
the 72 Hz deadline reads as 56 FPS against 42.

Merging is unsafe only between draws that resolved the array differently, since
the merged whole renders through the binding of the draw it folds into. So
resolve the replacement once per draw, before the merge test, and merge into a
draw that reached the same decision. Draws of an opponent sharing the asset
merge with each other again too, and with no set registered the test is exactly
what it was before the feature.

Measured at the same place on a Quest 3: 60 FPS against 42, the app frame back
to 13.9 ms, 564 draw calls a frame with 11808 primitives merged away.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-23 01:04:06 +02:00
iChris4andClaude Opus 5 3d240c890e Log the draw calls a frame costs beside its GPU timings
The Android frame-rate line already says where the wall clock went; what it
could not say is how many draw commands the recorded frame holds, which is what
the mono pass and both eye replays each pay for. An overlay that stops draws
merging shows up here long before it shows up as a frame rate.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-23 00:59:14 +02:00
iChris4andClaude Opus 5 248bd6787d Curl the runtime hand mesh's fingers towards the palm
The Quest offers XR_FB_hand_tracking_mesh without the app declaring hand
tracking, so a Quest 3 draws the runtime's own hand mesh rather than the
procedural gloves, and its fingers bent backwards on grip: the mesh's
joints point -Z towards the fingertip and +Y out of the back of the hand,
so flexion is negative about the joint's own X, on both hands. Fix and
test by the repository owner; OPENXR.md said the Quest always drew the
gloves, which was wrong.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-22 23:40:14 +02:00
iChris4andClaude Opus 5 90a09aec0b Record that hand steering works on a Quest 3
The kart's own wheel animates and the wheel can be grabbed and turned. The
driver's eye still went uncalibrated in that race, leaving the wheel about
13 cm above eye level.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-22 22:54:28 +02:00
iChris4andClaude Opus 5 d0a53363ac Build the VR gloves on the grip space OpenXR defines
On a Quest 3 the gloves' fingers pointed up out of the fist and bent out
of the back of the hand as the grip closed: they were built along the
grip's -Z, which runs up the tube the curled fingers form towards the
thumb, and curled towards -Y, which is backwards on the right hand.

The fingers now run along Y, forwards out of the palm (+Y on the right
hand, -Y on the left, the frame being right-handed), and close towards
+X, the palm's outward normal, with the thumb on the -Z side of both
hands. A test pins the reach, the closing direction and that nothing
bends out of the back of the hand.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-22 22:41:00 +02:00
iChris4andClaude Opus 5 8b01b47253 Add the cockpit seat and hand steering to the Quest launcher
The Quest launcher's Settings > VR gains a Seat choice (cockpit or
custom, first_person_seat) and a Hand steering switch (hand_steering, off
by default like the runtime), which is only enabled in the first-person
cockpit because the wheel belongs to that seat. About credits heurazy for
the turning steering wheel and hand steering. The runtime side was already
shared with the Quest build.

OPENXR.md records what one Quest 3 race showed: the kart's own wheel
animated (228 draws a frame) with the race camera's view matching the
scene's exactly, but the driver's eye was never calibrated and the
fallback put the wheel centre about 13 cm above eye level. The Quest
declares no hand-tracking permission, so hands are the procedural gloves.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-22 18:11:30 +02:00
iChris4 7c6a6da3d5 Implement passthrough feature for menu screens in OpenXR 2026-09-22 18:05:43 +02:00
iChris4andClaude Opus 5 54c07c982b Show the headset settings panel as its own OpenXR quad layer
The panel was drawn into the eye images, so below a 1.00x OpenXR
resolution its 1440x1080 canvas was minified into a small eye region and
the text became hard to read. It is now submitted as a quad layer of its
own over the scene's projection or menu quad, which the compositor samples
directly at any render scale.

Each backend (D3D12, Windows Vulkan, Quest) makes the panel's swapchain
pair (plus two shared buffers on the Quest) the first time the panel
opens. While it is open, the frame hands Aurora one more stereo target
after the eyes, which the bridge fills with the panel texture or a
transparent image. The panel image follows the eyes' displayed/retained
pairing, so a cancelled frame never shows an unwritten panel. The quad
hangs where the pointer's hits are tested. Aurora leaves the panel out of
the eyes in layer mode, and a backend that cannot make the layer falls
back to drawing it into the eyes.

On the Quest, debug.wiicompiled.panel_layer 0 selects the old path at
run time. Measured there at a race start (render_scale 0.8), the layer
costs nothing while the panel is closed; while it is open, app GPU time is
10.5 ms against 9.7 ms drawn into the eyes, with unchanged frame rates.

The replay tests cover lazy creation, cancelled frames, closed and
unplaced panels, and render-first pacing on D3D12 and Windows Vulkan.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-22 16:26:28 +02:00
iChris4andClaude Opus 5 dd7f046214 Toggle the first-person camera with a right thumbstick click
Clicking the right thumbstick flips first person exactly as the F10
checkbox does, and saves it the same way. It works on the VR controllers
in either presentation (with a short tick on the right controller) and on
any other gamepad while VR is running. It never reached the game: SDL's
stick click only lands in Aurora's extended buttons.

A click counts on release, and only if the left thumbstick stayed up and
the headset settings panel stayed closed throughout, so the two-thumbstick
panel chord in gamepad mode never toggles the camera. A gamepad whose
right stick click is bound to a GameCube control on its port, as a button
or in an input expression, keeps it for the game. The XR side only posts
a request; the toggle itself runs on the game thread with the checkbox.

[vr] first_person_toggle_click (default true) and a checkbox under the
camera toggle turn the click off. mkw_vr_camera_toggle_tests covers the
click rule.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-22 15:03:17 +02:00
iChris4andClaude Opus 5 c11a7c9a61 Add USB steering wheel and pedal support
Ported from heurazy's mario-kart-wii-VR-port. F10 > Controllers > USB
wheel and pedals (also in the headset panel) picks and calibrates the
steering axis and both pedals by moving them, and assigns buttons by
pressing them, over raw SDL joysticks: no per-model table or gamepad
mapping, and separate pedals, reversed axes and combined pedal axes all
calibrate the same way. Settings live in PhysicalWheel.toml beside
Config.toml; heurazy's five-button files load unchanged.

The wheel is player 1's GameCube controller. In a race it owns port 0
(steering on the stick, the accelerator on A, the brake pedal braking then
reversing over A and drift, the paddles on R and L), keeping only the
other source's pause and item aim. In menus it adds only deliberate
presses. It arms once every pedal and button is released, stays neutral
in a race while its setup is incomplete, and nothing is opened until it
is enabled. Optional light rumble follows the game's own, capped at 15 %.

Added here: its confirm, a new back button and the steering device's
first hat (D-pad) work the menus, since our VR controllers default to a
Wii Remote and the wheel needs to navigate on its own. Devices SDL
classifies as wheels are marked in the list.

In the VR cockpit the wheel follows the hardware steering and hand
steering steps aside while it drives. README documents setup and
Logitech notes (G HUB, the G29's PS3 switch, shifter gears as buttons);
not yet tried on a physical wheel.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-22 14:53:14 +02:00
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