Checklist
Describe the Bug
The Witch and the Hundred Knight: Revival Edition (CUSA02799) suffers from an unhandled shader translation field and an uninitialized structure bug in the HLE audio engine (libSceNgs2), resulting in a fatal 0xc0000005 access violation.
When both are patched locally via stubs, the game successfully passes the loading splash screen, shifts play state, and renders the main menu layout seamlessly. However, it completely softlocks upon hitting "New Game" or "Load Game" due to an infinite loop waiting on sceNgs2VoiceGetState updates.
Reproduction Steps
- Launch CUSA02799 on default master branch builds.
- Observe immediate compiler failure/crash regarding missing
GetLdsDirect implementation inside Shader::IR::IREmitter (encountered enum operand value 254).
- If bypassed by stubbing
OperandField::LdsDirect in translate.cpp with a zero immediate value, the game boots further but immediately drops a fatal 0xc0000005 Access Violation at address 0x800c93d99.
- This memory fault is traced to
sceNgs2ParseWaveformData in ngs2.cpp, which exits leaving OrbisNgs2WaveformInfo* outInfo entirely uninitialized.
Expected Behavior
The shader recompiler should safely process or gracefully stub LdsDirect operands, and libSceNgs2 should safely initialize memory outputs (or return appropriate error states) to prevent the game's core execution thread from encountering random uninitialized memory structures.
Furthermore, sceNgs2VoiceGetState requires proper cycle/playback flag transitions to allow games reliant on NIS engines to pass initialization locks and advance into 3D world levels.
Specify OS Version
Windows 11
CPU
AMD Ryzen 7 8845HS
GPU
GeForce RTX 4060
Amount of RAM in GB
16 GB

Checklist
Describe the Bug
The Witch and the Hundred Knight: Revival Edition (CUSA02799) suffers from an unhandled shader translation field and an uninitialized structure bug in the HLE audio engine (
libSceNgs2), resulting in a fatal0xc0000005access violation.When both are patched locally via stubs, the game successfully passes the loading splash screen, shifts play state, and renders the main menu layout seamlessly. However, it completely softlocks upon hitting "New Game" or "Load Game" due to an infinite loop waiting on
sceNgs2VoiceGetStateupdates.Reproduction Steps
GetLdsDirectimplementation insideShader::IR::IREmitter(encountered enum operand value 254).OperandField::LdsDirectintranslate.cppwith a zero immediate value, the game boots further but immediately drops a fatal0xc0000005Access Violation at address0x800c93d99.sceNgs2ParseWaveformDatainngs2.cpp, which exits leavingOrbisNgs2WaveformInfo* outInfoentirely uninitialized.Expected Behavior
The shader recompiler should safely process or gracefully stub
LdsDirectoperands, andlibSceNgs2should safely initialize memory outputs (or return appropriate error states) to prevent the game's core execution thread from encountering random uninitialized memory structures.Furthermore,
sceNgs2VoiceGetStaterequires proper cycle/playback flag transitions to allow games reliant on NIS engines to pass initialization locks and advance into 3D world levels.Specify OS Version
Windows 11
CPU
AMD Ryzen 7 8845HS
GPU
GeForce RTX 4060
Amount of RAM in GB
16 GB