Crusader_Decomp/docs/jp-remorse-windows-modding-feasibility.md
2026-10-11 18:49:46 +02:00

39 KiB
Raw Permalink Blame History

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 DxWrapper reaches Direct3D device setup; full game stability remains unverified The game is a Win32 PE and does not require DOSBox by architecture. A DDraw-to-D3D9 test creates a 1920x1440 device, but the earlier device-loss/lock failure and a later write access violation mean menu-to-game stability still needs testing.
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.
Rebuild the original or a very similar executable Not currently practical from available materials No source or build project was found on the extracted JP CD. Decompiled output is not compiler-ready, and there is no recovered JP build system or complete source-port implementation.
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.

An independent REA pass with Ghidra 12.1.4 analyzed the byte-identical JP PE (SHA-256 037b7d2be829048a1b305eae15e7f78be72329af80425cc32e2f5fcee0ba5231) and resolved FUN_004459b0 to 0x004459B0–0x00445B6A (443 bytes). It corroborates the DirectDraw/DirectSound setup and also shows ShowCursor(0); this remains static evidence, not a Windows 10/11 runtime test. REA Evidence ID: ev_14075934dbe400153ac7280118a67be1a31059251467a81b81a237b5a2c9f99b.

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: the PE architecture supports running without DOSBox, but the observed DirectX startup failure means an unmodified Windows 10/11 launch is not currently demonstrated. If "native" means no DOSBox, the 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.

Observed DirectX startup failure and likely boundary

The user reports that startup fails with a DirectX error on a modern Windows system. The exact dialog text and the stage label shown by the game have not been captured, so this does not yet identify a root cause. Static analysis provides a concrete first boundary to test: video_init_directdraw_and_directsound at 004459b0 initializes DirectDraw before DirectSound. It calls DirectDrawCreate, sets cooperative level, requests 640x480, creates a palette and primary surface, applies the palette, and then calls DirectSound. The failure handler includes labels for each DirectDraw stage. In this initializer, the DirectSound result appears not to be fatal; that is a static inference, not a runtime finding.

Therefore, if the displayed error comes from this initializer, DirectDraw mode/surface setup is the leading hypothesis. The exact dialog stage label (or a wrapper log showing the last successful API operation) is the cheap check that could disconfirm it. Other startup failures remain possible until that evidence is recorded.

Local dxwrapper test on Windows 11

The writable test copy at K:\ghidra\Crusader_Decomp\JP\CRUSADER_JP_ISO uses the local dxwrapper 1.8.8600.25 payload and its Stub\ddraw.dll; the C:\ analysis copy was not modified. The log identifies Windows 11 x64 build 26100 and confirms that DirectDrawCreate is redirected to D3D9.

  • With Dd7to9 and a 1920x1440 override but D3D9Ex disabled, device creation failed with D3DERR_DEVICELOST; the next logged operation was m_IDirectDrawSurfaceX::Lock2: d3d9 device not setup. The Windows error dialog then reported a write access violation at 00468e13, targeting 0b4e8000. The lock failure is the best-supported cause chain; the dialog alone does not prove which game data structure supplied that pointer.
  • Enabling D3d9to9Ex allowed the D3D9Ex device to initialize, but a later write access violation still occurred. Enabling DdrawEmulateLock did not prevent the same game instruction (00468e13) from faulting; the dxwrapper log recorded exception 0xC0000005 with bad address 0B1B6F4C.
  • An earlier native-resolution comparison restored the game's 640x480 output while retaining D3d9to9Ex=1, DdrawEmulateLock=1, and a 60 FPS test cap. Its log confirmed a 640x480 D3D device and the process was responsive at the last check; the previously failing gameplay transition still needs to be exercised. The user reports that a 30 FPS cap made the fan animation extremely slow and prevented the initial teleport sequence from initializing, so 30 FPS is not a viable setting for this build.
  • The separate 1920x1440 test profile created a 1920x1440 D3D target and measured a top-level window of about 1101x849 at (549,194) with caption and thick-frame style bits. The draggable border was observed, but the visible output was not confirmed as a true 3x on-screen scale.
  • Decoding README.TXT as CP932 confirms a Pentium 90 MHz minimum and a requirement for DirectX 2-compatible graphics/audio; it gives no original FPS target. The 30 FPS cap proved too restrictive. In a later 60-versus-120 FPS comparison, the user reported that 120 FPS made gameplay feel normal; this is not a measured simulation rate or a historically verified target. The text symptom and wrapper tests are documented below.

Frame pacing: why the wrapper cap appears half-rate

The reported result is approximately gameplay rate = LimitPerFrameFPS / 2: a 60 cap feels like 30, while a 120 cap feels like the expected 60. These are user-observed settings and gameplay impressions, not measured render or simulation rates.

The live JP Ghidra trace identifies why an uncapped run can go too fast:

  • 00446250 initializes the window and DirectDraw. Immediately before entering kernel_process_manager_run_loop at 0043efe0, it clears both EAX and EDX at 004462f0: the loop receives interval 0 and a null optional callback.
  • The loop calls kernel_process_manager_update every iteration. Its wait target is start_tick + interval; with interval 0, the target is already reached, so the busy-wait exits immediately. The null callback is skipped. The loop records elapsed scheduler units in DAT_00484368, but does not globally pace iterations.
  • FUN_00464390 calls timeGetTime, converts elapsed milliseconds into 10 ms units, and accumulates those units. This clock quantum feeds some timed/catch-up behavior; it is not a global frame limiter or evidence of a 100 FPS render rate.
  • kernel_process_manager_update uses separate 16 ms and 66 ms deadlines for timed process events. SpriteProcess_Run always performs at least one base pass per invocation; DAT_00484368 selects up to four additional catch-up passes. Thus animation can advance once on every fast loop iteration even when the elapsed-tick value is zero.
  • The inspected primary-surface path at 00445418/00445498 checks surface loss, then locks and unlocks the DirectDraw surface. The core scheduler loop itself contains no DirectDraw flip or vertical-blank wait. The two Sleep references found elsewhere are a Sleep(0) yield and a DirectSound buffer-position polling delay, not a global frame limiter.

The uncapped-speed cause is therefore in the game loop: its actual startup path supplies no interval, so process updates run as fast as the update body and host allow. The 10 ms clock does not prevent per-invocation behavior from accelerating, and the sprite runner's base pass is per invocation. This explains why removing the wrapper cap can produce speeds well above the intended rate; the exact uncapped multiplier depends on loop throughput and is not fixed at 2x.

The separate 60 cap -> 30 and 120 cap -> 60 observation still indicates a 2:1 mismatch between the wrapper's counted pacing events and perceived game updates. The inspected primary-surface Lock/Unlock path is relevant to Dd7to9, but static Ghidra analysis cannot establish how many D3D9 presents dxwrapper counts per update. Treat two wrapper-counted events per game update as a hypothesis, not a proven call count.

The discriminating runtime check is to count kernel_process_manager_update/SpriteProcess_Run iterations and primary-surface Unlock/D3D9 Present events with no cap, then at caps of 60 and 120. This will measure the uncapped loop throughput and determine whether a 2:1 wrapper-event-to-update ratio explains the capped results. Keep 120 as an empirical compatibility setting, not a verified original target.

Practical pacing and patch options

  • Keep the 120 FPS wrapper cap as the low-risk workaround. It is the only setting currently reported to make gameplay feel normal; it is not a measured 60 Hz simulation rate or a historically established target. Keep it in a JP-specific wrapper profile.
  • Test wrapper VSync or frame limiting at a completed-frame boundary. DDrawCompat or dgVoodoo2 could provide a useful comparison if their wait applies once per completed game frame. The inspected JP path uses primary-surface Lock/Unlock and the core loop has no explicit Flip/vblank wait, so a limiter attached to a lower-level operation could preserve or worsen the observed 2:1 mismatch. These wrapper options are untested for frame pacing.
  • Consider a local pacing shim if wrapper settings cannot identify one frame per update. A shim that throttles a mapped update boundary is a better conceptual fit than limiting every surface/presentation event, but the correct hook point has not yet been established. Instrument first; do not assume each Unlock or D3D9 Present equals one simulation update.
  • Prototype a version-specific PE interval patch. Startup clears EAX at 004462f2 immediately before calling the main loop, making its interval zero. The existing clock advances in 10 ms units, so interval 1 is approximately a 10 ms/100 Hz wait and interval 2 approximately 20 ms/50 Hz. These are coarse probes, not exact 60 FPS fixes; a stable 60 Hz target would need fractional/accumulator pacing or finer timing and careful interaction with existing elapsed-time catch-up.

No PE patch or custom shim has been applied. For an executable experiment, use a separate copy, record the exact JP PE hash, resolve the call-site RVA/file offset for that build, and preserve the untouched executable. Compare fan animation, the initial teleport sequence, gameplay timers, input response, and transitions with no cap, interval probes, and the 120-cap baseline before treating any result as a fix.

Original DOS comparison

The original DOS NE build has the same important pacing property: its main process loop is also entered with a zero tick interval. Runtime_InitializeCommandLineAndRunLoop_1040_0079 calls Kernel_RunTimedSchedulerLoop_11d0_31cf with interval zero and a far callback at 1040:0073. That callback stub calls Spanker_CollectProfileAddresses_1218_0953; the target only records profiler data when profiling flags are enabled, and does not wait for retrace or pace frames.

Kernel_RunTimedSchedulerLoop snapshots the SystemTimerProcess counter, calls Kernel_RunProcessSchedulerIteration_11d0_0255, invokes the optional callback, then waits until current_tick >= start_tick + interval. With the startup interval at zero, that condition is already satisfied on every pass. It records the elapsed timer delta in 1478:3a00/3a02, but the delta is not a global loop throttle. Kernel_Init_11d0_000c sets up the timer-interrupt path and creates/registers the BIOS and system timer processes; SystemTimerProcess_Increment_11c0_00f8 increments the system timer's 32-bit counter.

The DOS SpriteProcess_Run_1138_04e2 also performs one base animation pass on every process-manager iteration and uses elapsed timer ticks to select additional catch-up passes. This closely parallels the JP runner at 00461b50. The key difference is the clock plumbing: DOS reads an interrupt-maintained SystemTimerProcess counter and dispatches DOS timer events, while JP polls WinMM timeGetTime() and quantizes elapsed time into 10 ms units. Neither startup path provides a nonzero global frame interval, so both can be host-throughput-sensitive; the DOS timer supports elapsed-time events/catch-up but does not, by itself, pace the main loop. This is static analysis, not a new DOS runtime test.

JP text corruption and PE patch feasibility

The user-provided screenshot shows the game scene and message box rendered normally while the subtitle/menu glyphs appear as fragmented, multicolored pixels. This localizes the visible symptom to text, but does not by itself distinguish bad byte decoding from glyph rasterization or palette conversion.

On the test machine, Get-WinSystemLocale returned it-IT, the active ANSI code page (ACP) is 1252, and the OEM code page is 850. The Japanese executable is a 32-bit x86 PE with SHA-256 037b7d2be829048a1b305eae15e7f78be72329af80425cc32e2f5fcee0ba5231. These are separate facts: the locale values describe the Windows host, while the following API behavior comes from static analysis of the executable.

REA/Ghidra 12.1.4 found imports for CreateFontA, GetTextMetricsA, TextOutA, IsDBCSLeadByte, and GetCPInfo. The font initializer at 0x004100b4 creates a compatible DC and a 32x32 8-bit bitmap, selects a 256-entry palette whose red component is an intensity ramp, and creates a font with charset 0x80 (SHIFTJIS_CHARSET) before calling GetTextMetricsA. The character-width helper at 0x0040fae8 calls GetCharWidthA when it has an HDC. TextOutA and GetCPInfo are present in the import table, but REA found no resolved direct code callers for them; focused import/procedure searches also found no GetACP, MultiByteToWideChar, WideCharToMultiByte, or explicit locale setter. Dynamic or unresolved indirect calls are not ruled out. Evidence: ev_de7bd0221ca25ca3a5a8aa606d4b4570686e040fcdccfdad1a063d5f8bcb0b1d, ev_9e0169945fe29f6e1a23f0c5d3621722adeb7c881d867dcfe4913dd91088f47f, and ev_f9e245025ef4d9c8dd3077053e91028c173b653feb3c5f17fbc73abb8bce8686.

IsDBCSLeadByte is called at seven resolved sites across six functions: 0x00412d10 copies DBCS text, 0x00413188 walks and wraps text while measuring glyph widths, 0x00428ac8 measures strings, 0x00428be4 and 0x00428d40 combine byte pairs before dispatching them to a glyph/layout helper, and 0x004640b8 scans a tokenized string. For example, 0x00428ac8 combines a lead byte and its following byte before asking a font-like object for a width; 0x00413188 uses the same lead-byte test before calling the GetCharWidthA helper. Microsoft documents that IsDBCSLeadByte tests the system default ANSI code page (CP_ACP), while its Ex variant is needed for a specified code page. With ACP 1252, the Japanese CP932 lead-byte ranges are not recognized as DBCS leads. The executable therefore has a concrete dependency on running under a Japanese-compatible ACP, despite selecting a Shift-JIS font charset. Evidence: ev_b12b18650a53d90c9efb8583e65b7e9939594730dbdb290130f4bbccc080c0f6, ev_8cc6c851948c5b1f081ef83f939319c7a5af0f1d06be7ce0bcfc6eb7007f2bf0, ev_d8c64f4077ccdbca248a7166bb4dbf5b3612fa979f9e58933996e236db1a06f8, ev_dcc900b2086b1da3c5de5eaf7431133f3b1c8a40f739b8d3cf0e24cf480544a6, ev_54e5a97e481666d25e6829f052231996050c77fc07566dfba7990ae7222147d9, and ev_d0e9fabd41de9d73a68c42250286f5e1d652928e035ffd63b7bbf963c7776ec5.

The locale mismatch is a strong explanation for DBCS parsing and measurement errors, but it does not alone explain the rainbow pixel colors. The font path's 8-bit bitmap and custom palette leave a separate GDI/DirectDraw conversion hypothesis open. In the current writable test profile, DdrawEmulateSurface=1 produced no reported visual improvement and was restored to 0. Enabling both DdrawReadFromGDI=1 and DdrawWriteToGDI=1 produced a completely black game screen; the wrapper log recorded repeated invalid rectangles {1283,643,640,480}, then exception 0xC0000005 at address 0x00000000. Both options were restored to 0. The current profile keeps LimitPerFrameFPS=120; no game bytes or system locale settings have been changed.

Executable-hack assessment: a PE patch is technically possible, but a reliable fix is not yet established. A first, bounded patch could replace the seven IsDBCSLeadByte call sites with a fixed CP932 lead-byte predicate (0x81-0x9f or 0xe0-0xfc). That would repair DBCS byte-boundary handling in copying, wrapping, measuring, glyph dispatch, and token scanning, but it would not change the ACP behavior of ANSI GDI calls such as GetCharWidthA, nor prove that the 8-bit palette is converted correctly. A complete executable fix may need a CP932-aware shim or conversion to Unicode GDI calls, plus a separate correction to the glyph-bitmap/palette path if the rainbow artifacts remain. This requires tracing the indirect glyph renderer and carefully modifying a version-fingerprinted writable PE; it is substantially more invasive than a one-byte patch. No executable patch has been applied.

The lowest-risk next discriminator is still a process-local Japanese ACP run, which the user deferred for now; no system-wide locale change is recommended. If CP932 fixes the text, prototype the narrow DBCS patch on a separate writable copy and verify subtitles, confirmation menus, ASCII text, and input. If the rainbow pixels persist under CP932, investigate the custom 8-bit glyph palette and indirect drawing helper before attempting a PE rendering patch. Do not reuse the Western DOS/NE patcher for this PE.

English-language content from original game files

A read-only comparison of Western STATIC resources with the writable JP test installation found three likely presentation/data candidates are already byte-identical:

  • FONTS.FLX (198,862 bytes)
  • GUMPS.FLX (501,404 bytes)
  • FIXED.DAT (3,735,392 bytes)

Their SHA-256 hashes match between the two compared installs. Replacing these copies with the Western versions would not introduce English text or change the font data. The Western workspace also has a 25,897-byte FONTS.DAT that is absent from the JP STATIC directory, but its role and JP loader path are not established; its presence alone is not evidence that copying it would help. The identical FONTS.FLX also means the observed glyph corruption is not explained by a different Japanese font archive in these installs; it does not rule out the ACP or bitmap/palette issues described above.

Movie subtitles are a more direct candidate. The JP FLICS directory contains .TXT sidecars paired with many .AVI files. In the sampled 01A.TXT, each @frame marker is followed by an English line and then a Japanese line. The local ScummVM reference documents .txt and .iff subtitle sidecars for Crusader movies. This supports a low-risk, one-movie experiment: on a separate writable copy, preserve the frame markers and English lines while removing the Japanese lines, then check whether the JP game's movie player displays the English-only sidecar. This is a candidate, not a verified JP runtime behavior; it affects movie subtitles only, not menus or in-game dialogue.

The script route is possible but substantially less certain. Western STATIC\\EUSECODE.FLX is 556,613 bytes; JP USECODE\\JUSECODE.FLX is 554,522 bytes. A preliminary header/directory check found 3,074 entries in each and all directory rows pointed within their respective files. That is only coarse structural evidence: the local format extractor is validated against Western EUSECODE.FLX, not the JP archive, and matching entry counts do not establish compatible class records, event bodies, or opcodes. The JP interpreter has documented differences, and its -u/default archive naming path remains unresolved. Do not replace JUSECODE.FLX directly with EUSECODE.FLX; first establish the JP loader path and validate compatibility through an isolated override on a disposable copy. See JP USECODE dispatch analysis and JP launch parameters.

The source of specific menu or confirmation strings, including the observed exit text, was not established by this resource comparison. Trace that string to its executable, script, or data source before choosing an English replacement; do not infer it from the movie subtitle mechanism.

Established wrapper options

The options below are local compatibility layers, not proof that this particular game works with them. Test with a writable copy of the JP installation, one wrapper at a time, and preserve the original executable and data. The game requests 640x480 and uses a palette; the current Dd7to9 scaling experiment is a separate profile from the original-mode startup test.

Wrapper Role Fit for this failure Caveat
DDrawCompat Local ddraw.dll compatibility implementation for legacy DirectDraw First test. It is the least transformative first probe: it can mediate DirectDraw mode, surface, and fullscreen behavior while keeping the game's DirectDraw API path. Its per-directory configuration and logs are useful for recording the failing stage. It is a DirectDraw layer, not an automatic API rewrite. If the failure requires a different rendering backend rather than compatibility fixes, this may not be enough.
dxwrapper, feature Dd7to9 Local proxy wrapper; Dd7to9 translates DirectDraw 1-7 calls to Direct3D 9 Tested locally; D3D9Ex creates the device and the bordered-window style is observed, but lock emulation did not prevent a later game access violation. The project notes that most DirectDraw APIs are implemented, not all. DirectSound handling is separate from Dd7to9; do not assume the graphics conversion fixes audio. Mixed GDI/DirectDraw, surface locks, and palette behavior may need per-game configuration.
dgVoodoo2 Local DirectDraw/Direct3D emulation with configurable virtual devices and output Third comparison. It supports classic resolutions including 640x480 and can emulate old DirectDraw behavior through a different implementation. Its documentation warns that some old GDI/DirectDraw interactions are incomplete and that forced-resolution upscaling is a poor first setting for 8-bit palettized DirectDraw content. Use its local game-folder setup; do not copy wrapper DLLs into Windows system directories.

Suggested test sequence:

  1. Record the exact DirectX dialog text, Windows version, executable hash, and whether the error names a DirectDraw stage. Start with no wrapper on an untouched test copy.
  2. Add only DDrawCompat beside the copied executable, enable its normal logging, and retry without changing the requested 640x480 mode. Save the log and note whether the dialog changes or startup advances.
  3. Remove/disable that wrapper before trying dxwrapper with only Dd7to9 enabled; preserve its logs. If DirectDraw initializes but sound fails later, investigate the separate DirectSound path rather than changing the DDraw configuration blindly.
  4. Repeat as an independent dgVoodoo2 test. Do not combine wrappers, install the bundled DirectX 2/3 setup payloads on modern Windows, or change system DLLs/registry settings as part of this comparison.

DDrawCompat remains an untested comparison because it preserves the DirectDraw API path. Dd7to9 is the only wrapper tested so far; its current test reaches device creation and requests a bordered window, but the game transition and text rendering remain open. dgVoodoo2 is also untested. Do not treat any wrapper as a completed compatibility solution until gameplay, text, input, audio, and shutdown have been checked.

Modding And Rebuild Practicality

Modding relative to Western DOS retail

JP is a better target for understanding and patching Windows-facing behavior: it has a flat 32-bit PE image, Windows imports, and linear addresses, avoiding much of the DOS build's segmented pointer, far-call, and NE-fixup friction. A tightly scoped PE patch or local proxy is consequently more approachable than creating a new DOS NE segment. This does not give JP a supported plugin ABI, and data/archive rebuild-and-load remains unproven.

Western DOS retail has the opposite advantage: the repository already documents concrete STATIC\\FIXED.DAT and -u replacement paths plus a cautious NE patch workflow. Those mechanisms and patch definitions are build-specific and must not be carried over to JP. JP has its own JUSECODE.FLX/override uncertainty, differing map payloads and USECODE behavior, so treat its data and executable as a separate versioned mod target. For narrow data/script changes, the DOS path currently has better-established evidence; for Windows API experiments and a future native PE patch, JP has the simpler executable model.

Can the JP executable be rebuilt?

The extracted CD tree at C:\\RE\\CRUSADER_JP_ISO contains the compiled executable, setup files, and game resources. A targeted search for common C/C++/assembly sources and native project/make files found none there. This only establishes that the supplied CD tree does not expose those build inputs; it cannot rule out separate archival source elsewhere.

Decompilation is not a substitute for that missing source. Even the much-studied Western executable's exports contain unresolved calling conventions, undefined-width values, synthetic temporaries, segmented-pointer reconstruction, and provisional data layouts. The JP PE removes the NE/far-call burden but still needs type and ABI recovery, correct resource and startup behavior, and a complete replacement for the original build and runtime environment. No complete JP function-equivalence map, recovered JP source tree, compiler/toolchain, or link/resource recipe is established here.

The realistic options are distinct:

  • Reproduce the original bytes: not supported by current evidence and unlikely without original source, exact toolchain, build scripts, and assets in their original build form. Decompiled C cannot establish byte identity.
  • Build a behaviorally similar native game: possible in principle, but it is a large source-port/reimplementation effort. The existing Windows rebuild roadmap describes an incomplete host implementation based primarily on Western DOS exports; it is not a JP rebuild pipeline or a near-term way to regenerate CRUSADER.EXE.
  • Modify the existing JP game: the pragmatic route for bounded changes. Prefer version-fingerprinted PE edits, established local wrappers, or validated JP-specific data replacement. Test each against a separate copy and preserve a clean baseline.

Rebuild verdict: a very similar executable is a research project, not a build step available from the CD or current decompilation. A localized mod/compatibility shim has a much better cost-to-result ratio; pursue a source port only if the goal justifies implementing and validating the whole runtime over time.

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.
  7. English subtitle probe: on a separate writable copy, create an English-only version of one paired JP movie subtitle file while preserving @frame markers, then verify that the JP movie player displays it. Keep the original sidecar unchanged and record the tested movie and result.

Evidence Boundary

This assessment combines the existing live-Ghidra JP Win9x, launch-parameter, debugger, and USECODE investigations with local version/resource comparisons, a targeted scan of the supplied CD tree, direct inspection of JP video_init_directdraw_and_directsound at 004459b0, the frame-pacing trace at 0043efe0/00464390/00461b50, and the bounded Windows 11 dxwrapper tests above. The English-resource comparison used Western STATIC files and the writable K: JP test copy; it confirmed matching hashes for FONTS.FLX, GUMPS.FLX, and FIXED.DAT, sampled the bilingual JP FLICS/01A.TXT, and performed only a coarse USECODE directory-bounds check. No game resources were edited and no English-only subtitle or USECODE override was runtime-tested. The 1920x1440 run still faulted at 00468e13 with lock emulation enabled; the native-resolution comparison is awaiting the same gameplay transition. No runtime counter comparison of scheduler updates against D3D9 presents has been performed, so the wrapper-side 2:1 explanation remains an evidence-backed hypothesis. This note does not claim a complete Windows 10/11 runtime pass, successful JP asset rebuild-and-load, or complete function-level equivalence. Those remain explicit validation gates.