Crusader_Decomp/docs/jp-remorse-windows-modding-feasibility.md
Maddo 1b70294ef7 Add feasibility assessments for Japanese No Remorse Windows modding and Observer NPC analysis
- Created a new document outlining the feasibility of modding the Japanese version of No Remorse on Windows, detailing executive assessments, established evidence, modding base suitability, and potential risks.
- Introduced a comprehensive analysis of the Observer NPC in No Remorse, including its identity, data structure, AI behavior, and comparisons with similar NPCs, along with open questions for further investigation.
2026-10-10 14:42:43 +02:00

12 KiB

Japanese No Remorse Windows Modding Feasibility

Executive Assessment

The Japanese No Remorse release is a credible base for a separate Windows-native mod target, especially for data and script experiments. It is not a drop-in replacement for Western DOS retail, and executable patches or data should not be shared across those builds without validation.

Question Assessment Main boundary
Use JP as a modding base Feasible with a version-specific toolchain JP has a native Win32 executable and a substantial data set, but maps and scripts are not interchangeable with Western retail by default. Rebuilt assets have not yet been proven in-game.
Launch natively on Windows 10/11 Plausible; runtime proof needed The game is a Win32 PE and does not require DOSBox by architecture. DirectDraw, DirectSound, display, and configuration behavior still need testing on current Windows.
Reuse Western retail decompilation or patches Low without translation and validation JP is a flat Win32 implementation; Western retail is a Phar Lap protected-mode MZ/NE executable. Addresses, ABI, loader, and some runtime behavior differ.
Use JP as a cross-reference Useful selectively Shared data and behavior can corroborate hypotheses, but JP-specific interpreter/debugger behavior must be checked per build.

Track JP as its own target profile: separate executable fingerprint, asset manifest, USECODE assumptions, patch format, and Windows launch tests. Keep Western DOS/NE retail as a separate target for existing patches and DOSBox workflows.

Established Evidence

The prior Win9x investigation found that JP is a PE-style Win32 application loaded at 0x00400000, with Windows startup/window creation, registry-backed configuration, DirectDraw/DirectSound initialization, and a GetVersion/TLS branch for Win9x behavior. This strongly supports an intended native Windows 9x path. It does not certify runtime behavior on Windows 95, nor Windows 10/11 compatibility.

The active /ja/CRUSADER.EXE Ghidra program was also queried for 004459b0 (video_init_directdraw_and_directsound). It calls DirectDrawCreate, sets the display mode to 0x280 x 0x1e0 (640x480), creates a palette and primary surface, and initializes DirectSound. Its decompilation is still imperfect: the flat Win32 function has a ulonglong __fastcall signature, undefined4 parameters, synthetic extraout_ECX values, and calls through interface-vtable offsets. This is a useful concrete example of both the clearer Windows API boundary and the remaining decompiler cleanup.

The local JP assets and renderer evidence establish substantial shared format support, not drop-in data identity:

  • Retail, 1.01, and JP expose the same 63 detected maps, and the map viewer exports JP scenes.
  • Every shared JP/Western-retail map differs in the normalized exported scene payload. Similar top-line counts in sampled maps do not make the payloads identical.
  • COMBAT.DAT is byte-identical across JP and the listed Western builds, showing that some gameplay data is exactly shared.

See family export differences and COMBAT.DAT evidence. A successful map export proves the reader can inspect the format; it does not prove that a rebuilt archive loads in the original JP game.

Feasibility As A Modding Base

Good fits

  • JP-targeted map and asset work: STATIC_JP contains a substantial game data set, including FIXED.DAT and major graphics/resource archives, and the viewer supports JP map exports. Keep JP inputs and outputs together and test edits in the JP executable.
  • Shared data: files confirmed byte-identical, such as COMBAT.DAT, are candidates for shared tooling and cross-build tests. Matching filenames alone are not evidence of compatibility.
  • Windows-native experiments: JP is a better host than DOS retail when the goal is to investigate the Windows API path or build a mod that avoids DOSBox.
  • Behavioral cross-reference: JP can help explain shared game concepts, data structures, and services, but each conclusion should be checked against its intended target.

Boundaries and risks

  • Not a Western-retail replacement: JP map payloads differ, the local JP archive is named JUSECODE.FLX, and executable behavior is version-specific. Do not mix JP and Western fixed data or scripts without format and in-game validation.
  • USECODE compatibility is not established: the JP interpreter dispatches opcodes 0x00..0x79; 0x71 and 0x72 take an invalid-token path. Its 0x5b/0x5c handlers also differ from the classic DOS hidden-debugger line/current-entry behavior. This is concrete reason not to assume Western compiled USECODE is a safe JP replacement. See JP USECODE dispatch analysis and JP debugger investigation.
  • Archive naming needs closure: the JP executable contains an eusecode.flx string associated with its -u startup override, while the local static folder contains JUSECODE.FLX. The override helper does not establish the default JP archive lookup. Trace or runtime-test the default loader before renaming files or designing an override package. See JP launch parameters.
  • Palette caveat: the viewer currently falls back to Western GAMEPAL.PAL when the JP copy is absent. That is a renderer workaround, not proof the JP game expects or accepts that palette. See version differences.
  • No known general plugin ABI: native code changes need build-specific PE patching or a separately validated shim/injection mechanism. Existing NE patch definitions and relocation logic target the DOS executable and cannot be reused as-is.
  • Japanese integration matters: the executable imports DBCS/code-page and IME APIs. Preserve the intended text/input environment during tests and distinguish localization failures from game logic failures.

Modding verdict: JP is reasonable for JP-targeted data mods and controlled binary experiments, provided executable and assets are fingerprinted as one profile. It is not yet a turnkey mod platform: the archive rebuild/load loop, JP USECODE round-trip/compiler path, and runtime acceptance of edited resources remain unproven. For Western retail mod support, retain the DOS/NE target and its existing patch/data feasibility path.

Windows 10/11 Native Launch Feasibility

Why direct launch is plausible

JP is already a Win32 executable, not a DOS program dependent on RUN286, Phar Lap, NE segment loading, or DOS interrupts. A 32-bit Win32 application can generally run on x64 Windows through WoW64, which is Windows' x86 compatibility layer, not DOSBox. The recovered imports include windowing, registry, file, timing, joystick, DirectDraw, and DirectSound APIs. The Win9x TLS branch handles a Win9x-specific allocation constraint; no blanket Windows NT rejection has been established.

This makes unmodified direct launch the right first experiment. It does not prove all legacy API behavior works on current Windows, or that the original installer runs on x64 Windows. The prior analysis did not identify the required DirectX/runtime prerequisites or test Windows 95 in a VM.

Compatibility work, ordered by risk

  1. Test the unmodified executable first on clean Windows 10 and 11 x64 systems with a complete JP data set, expected working directory, and writable game directory. Test the game separately from its installer. Record startup, menu/game entry, display mode, input, audio, config/save paths, and shutdown.
  2. Add a launch wrapper only for environment setup if needed: establish the working directory, pass supported arguments, and capture diagnostics. Do not silently rewrite data paths or mix asset versions.
  3. Use compatibility settings or shims only for a reproduced failure. Investigate legacy DirectDraw fullscreen/palette behavior, DirectSound initialization, display changes/Alt-Tab, registry assumptions, and writes beneath protected install directories. These are risks inferred from the API surface, not observed Windows 10/11 failures.
  4. Patch the PE only for a localized, repeatable failure. Identify the exact version check or failing call first. The Win9x GetVersion branch alone is not a reason to patch version detection. Tie changes to an exact executable fingerprint and retest ordinary startup.

Current claim: native Windows 10/11 support looks attainable and may work without a code patch, but is unverified. If "native" means no DOSBox, the PE architecture is favorable. If it means no WoW64 or compatibility behavior on x64 Windows, that is not a realistic requirement for a 32-bit game.

Decompilation And Reverse-Engineering Differences

Surface Japanese Windows build Western retail build
Executable model Flat Win32 PE image, reported at 0x00400000 DOS MZ containing an NE image, with Phar Lap protected-mode loading
Addressing Linear 32-bit addresses and PE imports/relocations Segment:offset addresses, far calls, NE fixups, extender/runtime services
Platform boundary Windows windowing, registry, DirectDraw/DirectSound, WinMM DOS/extender, segmented memory, hardware/service calls, DOS-oriented paths
Decompiler friction Win32 API behavior, flat pointers, Windows structures; still has ABI/type recovery work 16-bit widths, near/far pointer provenance, segmented calls, loader fixups, uncertain conventions
Reuse value Native Windows implementation and semantic parallels Canonical target for current Western exports, ABI work, and NE patches

These are distinct implementations, not two load formats for an interchangeable binary. JP addresses do not map to NE addresses by a constant offset. PE and NE relocations, pointer widths, calling conventions, and data layouts require independent recovery. JP decompilation is not a source drop-in for exports/src_remorse, and the Western NE patcher cannot patch the JP PE.

There is meaningful overlap at the behavior and data level: JP retains USECODE execution, familiar launch/cheat concepts, and shared assets such as COMBAT.DAT. But the JP debugger and opcode analyses show implementation differences. Use function comparisons to test specific hypotheses; do not infer source identity from matching names, strings, or file formats.

No complete function-by-function JP-versus-Western diff is claimed. Existing evidence is strongest for executable format, Windows integration, selected USECODE behavior, and resource/export differences. A broader code-equivalence map needs a dedicated comparison pass.

  1. Runtime gate: launch the unmodified JP game on Windows 10 and 11 x64 from a writable copy; establish startup, menu/game entry, resolution, input, audio, config/save paths, and shutdown.
  2. Loader gate: trace/test JP lookup for FIXED.DAT, JUSECODE.FLX, palette, and core assets. Resolve the JUSECODE.FLX versus eusecode.flx discrepancy before recommending overrides.
  3. Data-mod gate: make one reversible JP map or asset edit, rebuild it, and prove the original executable loads it. Renderer export success is not this gate.
  4. USECODE gate: establish a JP-compatible round-trip/compiler corpus and compare supported opcodes, intrinsics, class/event tables, and archive conventions before porting Western scripts.
  5. Patch gate: fingerprint the JP PE and prototype one low-risk reversible patch only after launch behavior is known. Define PE-specific RVA/file-offset and relocation handling; do not reuse NE patch records.
  6. Cross-build gate: maintain separate JP and Western retail test profiles, promoting only verified shared formats or behavior into common tooling.

Evidence Boundary

This assessment combines the existing live-Ghidra JP Win9x, launch-parameter, debugger, and USECODE investigations with local version/resource comparisons, and directly inspected JP video_init_directdraw_and_directsound at 004459b0. It does not claim a Windows 95/10/11 runtime pass, successful JP asset rebuild-and-load, or complete function-level equivalence. Those remain explicit validation gates.