Skip to content

[APP BUG]:[CUSA02799] The Witch and the Hundred Knight: Revival Edition - Shader translation and NGS2 audio softlock #4608

Description

@ManyV05

Checklist

  • I have searched for a similar issue in this repository and did not find one.
  • I am using an official build obtained from releases or updated one of those builds using its in-app updater.

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

  1. Launch CUSA02799 on default master branch builds.
  2. Observe immediate compiler failure/crash regarding missing GetLdsDirect implementation inside Shader::IR::IREmitter (encountered enum operand value 254).
  3. 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.
  4. 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

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions