Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

Notable changes to Wisp are recorded here.

## 2.7.8 - 2026-12-01

- Reading the current car’s tune works again on Forza Horizon 6 build 3.498.592.0 (Xbox app / Microsoft Store).
- When Wisp cannot verify the Tune reader for a game build, it checks for a compatibility update without waiting for the next scheduled check.
- The HUD recovers when Windows restarts desktop composition while a frame is being shown.
- Recording starts on graphics cards that change the video output format before the first encoded frame.
- A recorder failure is reported with its original cause when the recorder closes during a request.
- Starting the update helper by itself no longer replaces the result of an installation that is waiting to be reported.

## 2.7.7 - 2026-11-26

- Winter mode is on by default. Ice-blue snowflakes fall and fade behind the dashboard readouts. Turn Winter mode off in Extras to return to wisps.
Expand Down
4 changes: 2 additions & 2 deletions LICENSES/library-sources-distribution.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"schemaVersion": 1,
"version": "2.7.7",
"version": "2.7.8",
"archive": {
"filename": "Wisp-2.7.7-library-sources.zip",
"filename": "Wisp-2.7.8-library-sources.zip",
"sourceVersion": "2.6.8",
"url": "https://github.com/Views2k/Wisp/releases/download/library-sources-2.6.8/Wisp-2.6.8-library-sources.zip",
"bytes": 879043478,
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ Wisp 2.7 is a reliability update. Clips keep recording when the graphics card is

[Clips](#clips) · [Tune](#tune) · [Lap review](#lap-review) · [Live map and lap delta](#live-map-and-lap-delta) · [Install](#install) · [2.7 release notes](docs/releases/Wisp-2.7.0-release-notes.md)

### Wisp 2.7.8

Wisp 2.7.8 restores Tune readings on the current Xbox app build of Forza Horizon 6 and fixes HUD, Clips and update errors reported from 2.7.7. See the [2.7.8 release notes](docs/releases/Wisp-2.7.8-release-notes.md).

### Wisp 2.7.7

Wisp 2.7.7 adds falling snow to the dashboard and checks Drift Zone scoring curves on newer Forza Horizon 6 builds. See the [2.7.7 release notes](docs/releases/Wisp-2.7.7-release-notes.md).
Expand Down
6 changes: 6 additions & 0 deletions docs/adaptive-game-compatibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ Both platforms require typed code witnesses for all 18 direct-gauge fields. Stea

The field reader code carries the game's thread-local storage slot offset as an immediate operand (`mov edx, imm32` after the `gs:[0x58]` access). That offset is recompiled per build: 0x420 through 6.461.691.0 and 3.461.691.0, 0x42C from 6.483.970.0 and 3.483.970.0, where it rejected the direct gauge on every PC. The type function template and the 18 initializer templates declare it as a `threadLocalSlot` operand: it is masked like an address operand, it has no target, and every matched reader must carry the same 4-byte-aligned value below 64 KB. Getters do not contain it, and their member displacements are still compared byte for byte.

Three Store Tune guards pass a one-byte enumeration member to a call (`mov dl, imm8` before an indirect call). A game update that adds a member renumbers every member after it and changes nothing else in the guard: Store 3.498.592.0 moved all 30 such bytes up by one, which rejected Tune on that build while the HUD and the direct gauge kept working. The profile declares these bytes as `enumArgument` operands with their reference value. They are masked like an address operand and have no target. Every guard must agree on the value found for each reference value, the values must keep their order, and none may move by more than 8. A different opcode, member offset or constant beside the argument is still rejected. The Steam guards contain no such call.

The same update renumbered a member that three other Store templates pass the same way: two of the four identity anchors of the HUD's UI service table, which left that table at its minimum of two matching anchors, and one binding of the direct gauge's child table, which fell back to its alternative. These four bytes are declared as `enumArgument` operands too. A template whose argument is outside the limit, or differs from the value already found for the same member, counts as changed: an optional anchor or an alternative binding is passed over, and a required guard is rejected.

A reference that two templates share may reach its target through a single 5-byte jump thunk on one side and directly on the other (Store 3.483.970.0 routes one Tune guard's call to a helper that the gauge templates call directly through such a thunk). Both shared-reference checks accept exactly that case and keep the helper itself; the thunk bytes join the proof. Any other disagreement between shared references is still rejected.

Steam's secondary HUD table is linked to the already verified main HUD table through the same complete-object RTTI type and hierarchy. Its subobject offset, full inheritance topology and slot code must still match, and the candidate must be unique. Table spacing and numeric RTTI labels are not treated as stable identities. This relationship was checked in both retained versions of both platforms.
Expand Down Expand Up @@ -60,6 +64,8 @@ Successful results retain addresses and small evidence hashes, not a full image

## Evidence and remaining validation

For a Tune compatibility fix, park the affected car with Forza in the foreground. Run `Wisp.UiReview.exe --tune-live-check --output artifacts/tune-check --expect-game-version <game-version>` from the checkout, using a fresh output directory and the exact four-part version from the affected installation. The report records the version from each capture and requires two complete, consistent reads of the current setup. Compare the reported values with the fitted settings in the game's Tune menu, using the same units. Record the platform, game version and result with the release evidence.

Reference profiles were generated from Steam 6.440.853.0 and Store 3.440.853.0. Production discovery was exercised against retained images from Steam 6.461.691.0 and Store 3.461.691.0 without supplying the new address maps to discovery. The new maps were used only as the result oracle.

- Steam: all 115 core, Tune and direct-gauge roles matched the independently established new map in a replay combining the retained image with 8,206 bytes of accepted live field evidence. Only the captured absolute type-slot pointer was rebased; code and property names were unchanged.
Expand Down
23 changes: 23 additions & 0 deletions docs/releases/Wisp-2.7.8-release-notes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Wisp 2.7.8

Wisp 2.7.8 restores Tune readings on the current Xbox app build of Forza Horizon 6 and fixes HUD, Clips and update errors reported from 2.7.7.

[Download the latest Wisp release for Windows](https://github.com/Views2k/Wisp/releases/latest)

## Tune

- Reading the current car’s tune works again on Forza Horizon 6 build 3.498.592.0 (Xbox app / Microsoft Store).
- When Wisp cannot verify the Tune reader for a game build, it checks for a compatibility update without waiting for the next scheduled check.

## HUD

- The HUD recovers when Windows restarts desktop composition while a frame is being shown.

## Clips

- Recording starts on graphics cards that change the video output format before the first encoded frame.
- A recorder failure is reported with its original cause when the recorder closes during a request.

## Updates

- Starting the update helper by itself no longer replaces the result of an installation that is waiting to be reported.
79 changes: 4 additions & 75 deletions installer/Build-Installer.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -296,46 +296,6 @@ function Invoke-UpdaterGuardSmoke {
[System.IO.Directory]::CreateDirectory($smokeDirectory) | Out-Null

$smokeUpdaterPath = Join-Path $smokeDirectory 'Wisp.Updater.exe'
$backupPath = Join-Path $smokeDirectory 'previous-update-result.bin'
$localApplicationData = [Environment]::GetFolderPath(
[Environment+SpecialFolder]::LocalApplicationData)
if ([string]::IsNullOrWhiteSpace($localApplicationData)) {
throw 'The local application-data directory is unavailable for the updater smoke test.'
}
$resultDirectory = Join-Path $localApplicationData 'Wisp'
$resultPath = Join-Path $resultDirectory 'update-result.json'
$resultDirectoryExisted = Test-Path -LiteralPath $resultDirectory -PathType Container
if (Test-Path -LiteralPath $resultDirectory) {
$resultDirectoryItem = Get-Item -LiteralPath $resultDirectory -Force
if (-not $resultDirectoryItem.PSIsContainer -or
($resultDirectoryItem.Attributes -band [System.IO.FileAttributes]::ReparsePoint) -ne 0) {
throw 'The updater diagnostic directory is not a regular local directory.'
}
}

$hadResult = Test-Path -LiteralPath $resultPath -PathType Leaf
if ((Test-Path -LiteralPath $resultPath) -and -not $hadResult) {
throw 'The updater diagnostic path is not a regular file.'
}
$previousHash = $null
$previousAttributes = $null
$previousCreationTime = $null
$previousWriteTime = $null
if ($hadResult) {
$resultItem = Get-Item -LiteralPath $resultPath -Force
if (($resultItem.Attributes -band [System.IO.FileAttributes]::ReparsePoint) -ne 0) {
throw 'The updater diagnostic file must not be a symbolic link.'
}
$previousHash = (Get-FileHash -LiteralPath $resultPath -Algorithm SHA256).Hash
$previousAttributes = $resultItem.Attributes
$previousCreationTime = $resultItem.CreationTimeUtc
$previousWriteTime = $resultItem.LastWriteTimeUtc
[System.IO.File]::Copy($resultPath, $backupPath, $false)
if ((Get-FileHash -LiteralPath $backupPath -Algorithm SHA256).Hash -ne $previousHash) {
throw 'The existing updater diagnostic could not be backed up for the smoke test.'
}
}

try {
[System.IO.File]::Copy($UpdaterPath, $smokeUpdaterPath, $false)
if ((Get-FileHash -LiteralPath $smokeUpdaterPath -Algorithm SHA256).Hash -ne
Expand All @@ -348,6 +308,7 @@ function Invoke-UpdaterGuardSmoke {
$startInfo.Arguments = '--packaging-smoke'
$startInfo.UseShellExecute = $false
$startInfo.CreateNoWindow = $true
$startInfo.RedirectStandardError = $true
$process = [System.Diagnostics.Process]::Start($startInfo)
if ($null -eq $process) {
throw 'The staged update helper did not start for its guard smoke test.'
Expand All @@ -361,50 +322,18 @@ function Invoke-UpdaterGuardSmoke {
if ($process.ExitCode -ne 2) {
throw "The staged update helper returned unexpected guard exit code $($process.ExitCode)."
}
if ($process.StandardError.ReadToEnd().Trim() -cne 'UPDATE_ARGUMENTS') {
throw 'The staged update helper returned an unexpected guard diagnostic.'
}
}
finally {
$process.Dispose()
}

if (Test-Path -LiteralPath $resultPath -PathType Leaf) {
$diagnostic = ConvertFrom-Json `
-InputObject ([System.IO.File]::ReadAllText($resultPath)) `
-ErrorAction Stop
if ($diagnostic.schemaVersion -ne 1 -or $diagnostic.state -cne 'failed' -or
$diagnostic.sourceVersion -cne '' -or $diagnostic.targetVersion -cne '' -or
$diagnostic.errorCode -cne 'UPDATE_ARGUMENTS' -or
$diagnostic.message -cne 'The update helper received invalid arguments.') {
throw 'The staged update helper wrote an unexpected guard diagnostic.'
}
}
else {
throw 'The staged update helper wrote no guard diagnostic.'
}
}
finally {
if ($hadResult) {
[System.IO.File]::Copy($backupPath, $resultPath, $true)
[System.IO.File]::SetCreationTimeUtc($resultPath, $previousCreationTime)
[System.IO.File]::SetLastWriteTimeUtc($resultPath, $previousWriteTime)
[System.IO.File]::SetAttributes($resultPath, $previousAttributes)
if ((Get-FileHash -LiteralPath $resultPath -Algorithm SHA256).Hash -ne $previousHash) {
throw 'The updater diagnostic was not restored after the smoke test.'
}
}
elseif (Test-Path -LiteralPath $resultPath -PathType Leaf) {
[System.IO.File]::Delete($resultPath)
}

if (-not $resultDirectoryExisted -and (Test-Path -LiteralPath $resultDirectory -PathType Container) -and
[System.IO.Directory]::GetFileSystemEntries($resultDirectory).Length -eq 0) {
[System.IO.Directory]::Delete($resultDirectory, $false)
}
if (Test-Path -LiteralPath $smokeUpdaterPath -PathType Leaf) {
[System.IO.File]::Delete($smokeUpdaterPath)
}
if (Test-Path -LiteralPath $backupPath -PathType Leaf) {
[System.IO.File]::Delete($backupPath)
}
if ((Test-Path -LiteralPath $smokeDirectory -PathType Container) -and
[System.IO.Directory]::GetFileSystemEntries($smokeDirectory).Length -eq 0) {
[System.IO.Directory]::Delete($smokeDirectory, $false)
Expand Down
2 changes: 1 addition & 1 deletion installer/Wisp.iss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#define MyAppName "Wisp"
#define MyAppVersion "2.7.7"
#define MyAppVersion "2.7.8"
#define MyAppDisplayVersion MyAppVersion
#define MyAppOutputVersion MyAppVersion
#define MyAppPublisher "Wisp"
Expand Down
11 changes: 11 additions & 0 deletions src/Wisp.App/AppController.Tunes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,17 @@ private async Task<TuneCaptureResult> CaptureTuneAsync(CancellationToken token)
var result = _tuneCapture is { } capture ? await capture.RequestSnapshotAsync(token)
: new TuneCaptureResult(null, TuneCaptureStatus.Unavailable,
"Current-car reading is unavailable in this preview. Saved tunes can still be opened.");
if (_tuneCapture is not null && _compatibilityUpdates.IsConfigured)
{
void ObserveCapture()
{
if (!_disposed && !token.IsCancellationRequested)
_compatibilitySchedule.ObserveTuneCapture(result);
}

if (_dispatcher.CheckAccess()) ObserveCapture();
else if (!_dispatcher.HasShutdownStarted) _ = _dispatcher.InvokeAsync(ObserveCapture);
}
var outcome = _tuneCapture is null || result.Incident?.Reason == "not_ready" ? "idle" :
result.Success && result.Snapshot is { IsComplete: true } ? "success" : result.Success ? "unknown" : result.Status switch
{
Expand Down
4 changes: 4 additions & 0 deletions src/Wisp.App/ApplicationUpdateLauncher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,10 @@ internal static bool TryConsumeResult(
return false;
}

// Older helpers also left a result when launched independently without an apply request.
if (record is { State: "failed", ErrorCode: "UPDATE_ARGUMENTS", SourceVersion: null, TargetVersion: null })
return false;

if (record.State == "installed" && record.TargetVersion is { } targetVersion)
{
var startedTarget = targetVersion == ApplicationVersionInfo.MachineVersion;
Expand Down
26 changes: 17 additions & 9 deletions src/Wisp.App/Clips/RecorderProcessClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,10 @@ internal sealed class RecorderProcessClient : IAsyncDisposable
private readonly object _sync = new();
private IRecorderChild? _child;
private Task? _output, _error, _exitReport;
private readonly Dictionary<long, TaskCompletionSource<RecorderReply>> _pending = new();
// A pipe write or a cancelled wait can end the sender before it receives this completion.
// Only the sending operation throws. The private reply task can always be safely abandoned.
private readonly record struct CommandResult(RecorderReply? Reply, string? Failure = null);
private readonly Dictionary<long, TaskCompletionSource<CommandResult>> _pending = new();
private long _nextRequest, _stopRequest;
private bool _stopping, _configured;
// A save, including its library copy, keeps the private buffer open until it ends.
Expand Down Expand Up @@ -410,7 +413,7 @@ private async Task<RecorderReply> SendAsync(string command, Dictionary<string, o
try
{
await _commands.WaitAsync(operation.Token).ConfigureAwait(false); entered = true;
TaskCompletionSource<RecorderReply> pending;
TaskCompletionSource<CommandResult> pending;
IRecorderChild child;
long request;
lock (_sync)
Expand All @@ -431,11 +434,16 @@ private async Task<RecorderReply> SendAsync(string command, Dictionary<string, o
await child.Input.WriteAsync(new byte[] { (byte)'\n' }, operation.Token).ConfigureAwait(false);
await child.Input.FlushAsync(operation.Token).ConfigureAwait(false);
_commands.Release(); entered = false;
RecorderReply reply;
CommandResult result;
// The reader sets the reply before it reports a later state or exit, but this wait sees it through a
// queued continuation, so a shutdown that follows can cancel the wait first. A reply that arrived is kept.
try { reply = await pending.Task.WaitAsync(operation.Token).ConfigureAwait(false); }
catch (OperationCanceledException) when (pending.Task.IsCompletedSuccessfully) { reply = await pending.Task.ConfigureAwait(false); }
try { result = await pending.Task.WaitAsync(operation.Token).ConfigureAwait(false); }
catch (OperationCanceledException) when (pending.Task.IsCompletedSuccessfully)
{
result = await pending.Task.ConfigureAwait(false);
if (result.Reply is null) throw;
}
var reply = result.Reply ?? throw new RecorderClientException(result.Failure!);
if (!reply.Ok) throw new RecorderClientException(reply.Reason) { NativeRequestRejected = true };
if (command != "save" && reply.Media is not null) throw new RecorderClientException("protocol_error");
return reply;
Expand Down Expand Up @@ -485,12 +493,12 @@ private async Task ReadOutputAsync(Stream output)
StateChanged?.Invoke(this, state); continue;
}
var reply = (RecorderReply)message;
TaskCompletionSource<RecorderReply>? pending;
TaskCompletionSource<CommandResult>? pending;
lock (_sync)
{
if (!_pending.Remove(reply.Request, out pending)) throw new RecorderClientException("protocol_error");
}
pending.TrySetResult(reply);
pending.TrySetResult(new(reply));
}
lock (_sync)
{
Expand All @@ -504,7 +512,7 @@ private async Task ReadOutputAsync(Stream output)
// The helper ended after a stop request without answering it: the stop is done.
if (_stopping && _pending.Count == 1 && _pending.Remove(_stopRequest, out var stop))
{
stop.TrySetResult(new(_stopRequest, true, "none"));
stop.TrySetResult(new(new RecorderReply(_stopRequest, true, "none")));
return;
}
}
Expand Down Expand Up @@ -605,7 +613,7 @@ private async Task ReportExitAsync()
// Caller owns _sync. Continuations always run outside this lock.
private void FailPending(string reason)
{
foreach (var pending in _pending.Values) pending.TrySetException(new RecorderClientException(reason));
foreach (var pending in _pending.Values) pending.TrySetResult(new(null, reason));
_pending.Clear();
}

Expand Down
Loading