Skip to content

[BUNDLE] Four fixes carried from Peppacodes' fork: #762 #764 #765 #832 - #1603

Closed
MamaLeVrai wants to merge 9 commits into
Marvisak:mainfrom
MamaLeVrai:bundle/carried-peppacodes
Closed

MamaLeVrai wants to merge 9 commits into
Marvisak:mainfrom
MamaLeVrai:bundle/carried-peppacodes

Conversation

@MamaLeVrai

Copy link
Copy Markdown

Four small fixes from one contributor's fork, in one PR. Each was reported as an issue with a branch, a commit, a repro and a test, written when pull requests were still limited to collaborators, and none has a pull request. The branches are merged here as they are, with their commits and their author, onto main (ffe310e); nothing is changed.

For reviewers and for anyone verifying with an agent (Claude, Codex, a person): this is a [BUNDLE] PR. The re-verification commands are below.

What is inside

Issue Fork branch Commit(s) What it fixes
#762 Peppacodes/VIctory:fix/title-dll-name-case 1e24f34, 22c3d00 a title DLL in a case-sensitive folder (WSL makes them) is found by any spelling, and a folder spelled like it does not hide it
#764 Peppacodes/VIctory:fix/getprocaddress-last-error d0662f4 GetProcAddress on our pseudo modules sets ERROR_PROC_NOT_FOUND on a miss, as the host's does
#765 Peppacodes/VIctory:fix/oem-key-empty-subkey 8e9f9b3 RegOpenKeyW / RegOpenKeyExW with a null or empty subkey under our OEM key open the key itself
#832 Peppacodes/VIctory:fix/fcmp-false-true e04929d v_cmp_f_* and v_cmp_tru_* on floats lower as constants, not fcmp false / fcmp true, which remove the WARP device

Every one has its own test (the two loader tests skip where Windows cannot make a case-sensitive folder). The reasoning of each is in its issue.

Notes

Verification

Windows 11, RX 6950 XT, Rust 1.98.1 (the pinned toolchain):

Check Result
cargo clippy --workspace --all-targets --locked -- -D warnings clean
cargo clippy --workspace --all-targets --all-features --locked -- -D warnings clean
cargo test --workspace --locked 347 passed, 0 failed, 6 ignored (main: 342 passed, 6 ignored)

The title was not run. No game data is used or committed.

Re-verify in one go

git fetch https://github.com/MamaLeVrai/VIctory.git bundle/carried-peppacodes
git checkout FETCH_HEAD
cargo clippy --workspace --all-targets --locked -- -D warnings
cargo clippy --workspace --all-targets --all-features --locked -- -D warnings
cargo test --workspace --locked

AI-assisted (Claude Code); no game data.

🤖 Generated with Claude Code

Peppacodes and others added 9 commits November 24, 2026 20:57
map_dll lowercased the DLL's name and joined that to the title folder.
On a case-sensitive folder (WSL creates them so, and new subfolders
inherit the flag) GameLib.dll is not gamelib.dll: is_file() was false
and the DLL was skipped without an error, so its imports went to stubs
and a title's own LoadLibrary saw "not a title image".

The lowercased name stays the key (seen, wanted, the returned list).
The file is the name as written or, failing that, the folder's entry
that matches it ignoring ASCII case, as the Windows loader ignores case.

Test: a case-sensitive temp folder (fsutil setCaseSensitiveInfo, no
admin) holding Late.dll, loaded as Late.dll, LATE.DLL and late.dll.
Skipped where Windows cannot make such a folder.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GetProcAddress on one of our pseudo modules returned NULL for a name it
does not export, or for any ordinal, without setting the last error. The
host sets ERROR_PROC_NOT_FOUND (127), and a caller that builds its
failure from GetLastError() got 0, HRESULT_FROM_WIN32(0) being S_OK.

Test: a missing name on kernel32 (the host's, for comparison), and a
missing name and an ordinal on xgameruntime.dll, each after clearing
the last error.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
RegOpenKeyW and RegOpenKeyExW returned ERROR_FILE_NOT_FOUND for any
path below our stand-in for HKLM\...\CurrentVersion\OEM, including a
null or empty one. The documented behaviour, and the host's: RegOpenKeyW
gives back the key it was passed, RegOpenKeyExW a handle to the same
key. Other paths below it still are not found (it has no subkeys).

Test: both functions with a null and an empty subkey, on our key and on
a host key for comparison.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The case-ignoring fallback took the folder's first entry that matched the
name and only then checked it was a file. A folder listed before the file
(NTFS lists LATE.DLL before late.dll) made the DLL not found. It now
takes the first matching entry that is a file.

Found by MichaelSmithAI in Wine on ext4; the same happens on a
case-sensitive NTFS folder.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
v_cmp_f_{f32,f16} and v_cmp_tru_{f32,f16} lowered to fcmp false and
fcmp true (predicates 0 and 15). DXC folds those away, so drivers never
see them from it, and WARP removes its device at the first dispatch of
a pipeline that has one ("The GPU device instance has been suspended").
The hardware adapter (RTX 5080) runs them. A removed WARP device stays
removed for the process, so everything after it fails too.

They are false and true whatever the operands, NaNs included (RDNA2
ISA), so they now lower as constants, as the integer v_cmp_f/v_cmp_t
already do. FALSE and TRUE stay in the predicate table, unused.

Found with a sweep of every 32-bit VALU instruction on the hardware
adapter against WARP: all 62 compares now run and agree on both.

Test: float_compares_that_are_always_false_or_true, f32 and f16 with
ordinary and NaN operands, on the hardware adapter and WARP. On main
WARP's dispatch fails with the device suspended.
…ak#764 Marvisak#765 Marvisak#832), verified together

Merges the branches fix/title-dll-name-case, fix/getprocaddress-last-error,
fix/oem-key-empty-subkey and fix/fcmp-false-true of Peppacodes/VIctory onto
main (ffe310e), each with its commits and its author unchanged, no
conflicts and no changes of mine. cargo clippy --workspace --all-targets
--locked -- -D warnings, with and without --all-features, is clean and
cargo test --workspace --locked passes (347 passed, 6 ignored; main has
342 passed, 6 ignored).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@Marvisak

Copy link
Copy Markdown
Owner

Automated triage for the maintainers. Closing because this pull request re-packages other open pull requests. Each of those is reviewed on its own, so a bundle cannot be merged.

See #1434.

If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution.

@Marvisak Marvisak closed this Nov 25, 2026

Copy link
Copy Markdown
Owner

Automated triage for the maintainers.

Needs rebase. This pull request conflicts with main (conflicting: crates/victory-hle/src/modules/kernel.rs). It will be reviewed once it is rebased onto the current main.


Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants