Run Minecraft: runtime HLE, D3D12.X device on the host GPU, shader IR
Loader: map title-shipped DLLs, patch static TLS loads to slot 0, crash reporter, title paths for GetModuleFileName*. HLE: task queue and async, XUser (one offline user), system ids, title id, features, invites, game events, persistent local storage, GameInput with no devices, xmem, console audio hardware queues, life cycle (close suspends, then terminates), and a file layer with virtual drives rewritten in path-taking imports. GPU: D3D12.X device, DXGI chain, heaps, resources, fences, queues and command lists translated onto a host D3D12 device; clears, barriers, copies, resolves and PresentX into the title's window. Shaders: SGD5 reader and `victory translate`; SSA IR with node splitting for irreducible flow; structurisation removing EXEC. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
12caefe804
commit
754619f30e
61 files changed
+12775
-88
No files matched your search
+32
-3
@@ -33,7 +33,7 @@ Converting them ahead of time from files is only a warm-up.
|
||||
| `victory-pe` | read-only PE32+ and import-library analysis |
|
||||
| `victory-loader` | prepare, map, bind and start the title image |
|
||||
| `victory-hle` | console API implementations, host pass-through policy |
|
||||
| `victory-gpu` | D3D12.X packet streams and GPU memory → host D3D12 (skeleton) |
|
||||
| `victory-gpu` | D3D12.X objects, command lists and GPU memory → host D3D12 |
|
||||
| `victory-shader` | Xbox shader containers → host shaders |
|
||||
| `victory-formats` | texture layouts, BCPack, audio codecs (skeleton) |
|
||||
| `victory-pipeline` | converter trait, content-addressed cache |
|
||||
@@ -51,7 +51,36 @@ For every `dll!function` the title imports, in order:
|
||||
|
||||
1. our implementation in `victory-hle::modules` (always wins);
|
||||
2. the host's own function, if `HostPolicy` allows that DLL;
|
||||
3. a generated stub that names the import when called (`--unimplemented
|
||||
3. an export of a DLL the title ships beside its executable, mapped like
|
||||
the executable (only DLLs neither of the above serves);
|
||||
4. a generated stub that names the import when called (`--unimplemented
|
||||
trap` breaks into the debugger and aborts; `zero` logs once and returns 0).
|
||||
|
||||
`victory census` shows this classification without running anything.
|
||||
`LoadLibrary*` of a console-only DLL we implement (e.g. `xgameruntime.dll`)
|
||||
returns a pseudo handle; `GetProcAddress` on it finds our functions.
|
||||
`QueryApiImpl` hands out our runtime objects by provider (task queues and
|
||||
async blocks so far, `victory-hle::modules::xasync`).
|
||||
|
||||
Title storage is a drive on the console, and titles build paths on that.
|
||||
`victory-hle::modules::files` binds every path-taking title import
|
||||
(kernel32 and the C/C++ runtime) and rewrites paths on a virtual drive to
|
||||
the host folder behind it; persistent local storage is one such drive over
|
||||
a folder under `VICTORY_DATA_DIR`. Other paths reach the host unchanged.
|
||||
|
||||
An exe's code reaches its static TLS as slot 0; mapped as a DLL it gets
|
||||
another slot, so the loader redirects those loads (`victory-loader::tls`).
|
||||
`victory run --execute` installs a crash reporter that names faults as
|
||||
`module+rva` (`victory-loader::crash`).
|
||||
|
||||
`victory census` shows this classification without running anything (it
|
||||
does not map title DLLs; `victory run` without `--execute` does).
|
||||
|
||||
## Shaders
|
||||
|
||||
`victory_shader::ir::build` turns a native program into SSA, one
|
||||
instruction per machine instruction. `victory_shader::structure` then
|
||||
removes EXEC: lane masks become per-lane booleans, wave-wide mask tests
|
||||
become per-lane branches, and vector instructions keep a guard only where
|
||||
a lane can reach them with its EXEC bit clear. `victory translate` runs
|
||||
every shader it finds (containers, SGD5 files) through both and lists what
|
||||
they cannot handle yet.
|
||||
Reference in new issue
Block a user