Skip to content

HLE Readiness and Public DSP XISO Proof

OpenAI Codex edited this page Nov 2, 2026 · 2 revisions

HLE readiness: public DSP XISO proof

Reviewed November 2, 2026. Emulator #384 + #385, source 69a3c570. Public test source 123d731, test PR #69. These branches are under review/HOLD, not released features.

We are ready to develop narrowly scoped native DSP routines against executable input/output tests. General live game HLE remains unqualified. The new demonstration runs a public XISO through real GP instructions and external DMA, validates every output, replays the selected captured frame 100 times, then compares three isolated native arithmetic routines with those guest outputs. An intentional error is detected.

The complete evidence package includes output arrays, identities, failure controls, setup failures and limitations. Issue #383 retains the broader closure gates; the tool guide covers the underlying kit.

The follow-on concurrent shadow and OpenAL proof adds copied-input native execution alongside the real DSP frame, per-route coverage, partial fallback, detected candidate faults and rejected zero coverage. It also documents exact gain matches through OpenAL Soft on Deck and cloud. DSP remains authoritative; the historical isolated-process results below remain distinct.

What the proof demonstrates

public synthetic XISO → real GP program → 192 GP words + scratch DMA
                                  ↓
                     guest checks + paused host checks
                                  ↓
full-program trigger → one captured frame → 100 isolated replays
                                  ↓
            same 64 inputs → three native C gain routines
                                  ↓
         compare all 192 outputs; injected error must fail

Live recognized-game dispatch is a later, separately qualified integration.

The input includes zero, ±1, signed 24-bit extrema, odd positive/negative values and a deterministic sequence. Gains are +1/2, -1/2 and +1/4, with exact floor rounding. The guest checks 192 DSP output words, the corresponding 192 RAM DMA words, and preserved inputs. The host independently repeats those checks and verifies all 4096 program words. The native process must execute all three routines; it has no LLE fallback.

Test on Steam Deck Result
Guest and host program/input/output checks PASS; 192/192 GP and 192/192 DMA words match
Selected frame restored and replayed 100/100 BASELINE_MATCH
Three isolated native arithmetic routines 192/192 outputs match
One-bit corruption in native comparison MISMATCH at route 0/sample 0; exit 1
Deliberate wrong-answer guest FAIL; two checks reject the wrong expectation; host exit 1
Native portable boundary/rejection tests 3/3 pass; C compiled with warnings as errors
Emulator focused DSP suite 11/11 targets; DMA/replay target includes 28 subtests
Interpreter guest attempt QMP timeout; INCOMPLETE, not a passing result

Hardware: Steam Deck AMD Custom APU 0405, SteamOS, OpenGL and dummy audio, full-DSP/JIT. The monitor PCM for this arithmetic fixture is silent. Validation concerns arithmetic memory outputs and DMA; it does not establish audible parity.

Reproduce it

The fixture README contains full build, guest run, native comparison, repeated replay and negative-control commands.

git clone --branch test/dsp-xiso-io-proof https://github.com/Mainkill1/xemu-perf-tests.git
cd xemu-perf-tests/tools/dsp-io-proof
export NXDK_DIR=/path/to/built/nxdk
export PATH="$NXDK_DIR/bin:$PATH"
make NXDK_DIR="$NXDK_DIR" -W "$PWD/main.c"
cc -std=c11 -O2 -Wall -Wextra -Werror native_gain.c -o native_gain
python3 test_native.py
python3 run_guest.py --emulator /path/to/xemu \
  --iso "$PWD/dsp-io-proof.iso" --program-header "$PWD/program.h" \
  --config /path/to/xemu.toml --output /path/to/new-result --capture
python3 compare_native.py --guest-report /path/to/new-result/report.json \
  --worker "$PWD/native_gain"
python3 compare_native.py --guest-report /path/to/new-result/report.json \
  --worker "$PWD/native_gain" --inject-fault

The last command is an expected failure. For --capture, build xemu branch test/dsp-xiso-io-proof with -Dxemu_dsp_capture=true. The host script creates a private program image and supplies XEMU_DSP_CAPTURE_GP_PROGRAM, so the recorder waits for the exact enabled GP workload. Without this trigger the first frame can belong to BIOS work and reconstruction can reject it as lacking physical context.

Then run replay_capture.py with the capture, PR #384 tool directory, production replay worker, a new reconstruction directory and --repeat 100. Firmware and private writable images are supplied locally and copied for the owned run; no game microcode is needed. The source includes the assembled public program, so a DSP assembler is optional for rebuilding the unchanged fixture. Build timestamps can change ISO bytes; record the new hash rather than treating the historical hash as a reproducible-build promise.

Bind results to exact artifacts

Artifact Tested SHA-256
Positive XISO 9353253e7c466b5fa830bdef8cfaa50e457a10230efcb713c8bb275db005bf10
Negative XISO 95da24c1dc4976ef0342c9af53df9142ff75fe913342630aa2b7bd2b33d4723d
Full normalized program 41a14ad0eff5ce00e45fb73c81f497d1d1056bf1ffc6301b91b1d78d5663778a
Emulator ELF 0a258ade60bf8fb6f75032130911c46bccf9d0a4021d6697436538e7f82fff0b
Native arithmetic worker 0aab394f55081b6c7faee6e4c40f1baa18a2b001f909720402bc3a1ee169bc93
Selected capture 3195e3d68e28babc4b42a15cbc381e771b2ef1e479cdd3952a81b107ac1dab93

The complete manifest also identifies the replay ELF and every replay input. Reconstruction reports 772 known RAM bytes and 67,108,092 unknown zero-filled bytes, retaining INCOMPLETE/UNVERIFIED authority. A repeated modeled baseline is not a sealed hardware oracle. No firmware, private configuration, surrounding dump or copyrighted audio is published.

Moving from proof to expensive game routes

The three gains demonstrate the qualification process; they are not measured game hotspots and the native worker does not reroute a live APU. The XISO's program identity differs from the game-filter signature in #379/#380. Enabling that filter flag alone will not accelerate this synthetic program.

The existing filter prototype recognizes one complete program and supports guarded fixed-point filter sections, gain/limiting and history updates, with staged commit and JIT fallback. Its historical supported private frame reduced provider calls from 44 to 25 while matching complete state/I/O. That establishes limited native execution coverage, not a performance improvement or qualification from this new XISO. A fresh local component run produced 32 passing checks and one skipped private-frame test.

Use the following gates for the first real route:

  1. Profile within GP/EP and identify the expensive routine and exact program/overlay, entrypoint, modes and persistent state. Historical whole-GP cost is not per-routine attribution.
  2. Add a routine-specific public known-answer stimulus where possible, plus authorized private captures when a game program is needed.
  3. Run reference and candidate on separate cloned state/memory. Compare outputs, ordered reads/writes, persistent state, and safe continuation/fallback. Require positive native coverage; an all-fallback run cannot qualify the native path.
  4. Verify program mutation, reset, restore, engine change and unsupported-mode rejection before enabling live execution. Commit no side effects before a decline.
  5. Qualify actual audio, matched game cadence/tails/CPU/resources, required XISO correctness/timings and the broader structured campaigns before merging/enabling.

Timing here is NOT COMPARABLE throughput: dummy audio, timer polling and diagnostic capture affect execution. No game speedup, hardware parity, Windows qualification or production HLE readiness is claimed. A/V synchronization remains #382.

Failures retained

The initial host read preceded APU mapping; startup handling now waits. A DMA pointer lost its high bits in a 24-bit mailbox; low/high words repaired it. First-N capture selected empty BIOS frames; full-image triggering repaired selection. A synthetic trigger test needed explicit P-memory initialization. The interpreter timeout remains unresolved. These findings are preserved in the linked evidence rather than counted as passing runs.

Clone this wiki locally