This is a chronological implementation record. Add an entry whenever a modernization milestone or meaningful architectural slice is merged.
Baseline:
GeneralsGameCode-main(2).zip- SHA-256
3fa2e6807e842ba51cfa67b5251e4c7f0bdaaedc3dbea5c1f69ddfdde94f08fd
Actions:
- adopted this source tree as the sole modernization baseline;
- audited current build system, renderer seam, and W3D loader architecture;
- recorded x64 + D3D12 as the Evolution target;
- recorded CMake + Ninja + MinGW-w64 GCC as the primary build direction;
- recorded additive EA SAGE W3X support;
- created roadmap, decisions, guardrails, asset, renderer, performance, and build documentation;
- no gameplay/renderer/build implementation changes were made as part of this documentation step.
The baseline already contains a partial renderer abstraction (IRenderBackend + DX8Backend) routing a subset of WW3D operations. This work is recorded as PARTIAL; it is not claimed as newly implemented by the modernization docs pass.
- Added dependency-free W3D/W3X path recognition.
- Added conservative XML sniffing for
.w3xso unrelated binary formats using the same extension are not routed to the future SAGE W3X parser. - Added a standalone C++98-compatible characterization test.
- No asset-manager, renderer, W3D loader, CRC, simulation, or CMake behavior changed.
- W3X XML parsing remains future work under Step 05.
- Added a dependency-free, C++98-compatible W3X XML envelope probe.
- Added root qualified/local-name extraction and root namespace resolution.
- Recognizes the SAGE
AssetDeclaration+uri:ea.com:eala:assetenvelope used by later-SAGE asset documents. - Handles UTF-8 BOM, XML declaration, processing instructions, comments, whitespace, and quoted root attributes.
- Explicitly rejects
DOCTYPEin this narrow probe to avoid accidental entity/parser scope expansion. - Added standalone synthetic tests; no proprietary W3X asset is committed.
- No asset-manager, W3D loader, renderer, simulation, CRC, or CMake behavior changed.
- Child-element parsing and actual W3X importing remain Step 05 work.
- Added a dependency-free, C++98-compatible direct-child discovery seam for validated SAGE
AssetDeclarationdocuments. - Classifies
W3DMesh,W3DHierarchy,W3DContainer,W3DAnimation, andW3DCollisionBox; unknown direct child types are preserved asUnknown. - Reports child qualified/local names and resolved namespace URI, including default, inherited, alternate-prefix, and child-local namespace bindings.
- Ignores comments/whitespace/processing instructions for discovery and validates nested tag closure without decoding nested asset data.
- Added bounded nesting protection and safe malformed/unsupported-DOCTYPE handling.
- Added standalone synthetic A2 tests; A0 and A1 remain unchanged.
- GCC C++98, Clang C++98, AddressSanitizer, and UBSan standalone validation pass for A0/A1/A2.
- No asset-manager routing, W3D loader, renderer, gameplay, CRC, Xfer, replay, network, or CMake behavior changed.
- Includes/references, child-content decoding, neutral import structures, and runtime W3X loading remain Step 05 work.
- Performed a maintenance/refactor step before adding any new W3X capability.
- Removed the implementation-heavy
Core/Libraries/Include/rts/w3x_document_probe.handw3x_child_discovery.h. - Added one public
Core/Libraries/Include/rts/w3x_document.hcontaining the existing A1/A2 contracts. - Centralized A1/A2 implementation in
Core/Libraries/Source/rts/w3x_document.cpp, sharing XML name/tag/namespace scanning rather than maintaining parallel helper families. - Kept
asset_3d_format.hseparate because format routing/sniffing is a distinct responsibility from W3X document parsing. - Updated A1/A2 tests to consume the consolidated API; no additional test source file was created for the refactor.
- GCC and Clang C++98 standalone validation pass for A0/A1/A2 after the consolidation.
- No runtime asset-manager routing, W3D loader, renderer, gameplay, CRC, Xfer, replay, network, or CMake behavior changed.
- Established a project guardrail to prefer consolidation/refactoring over overlapping shared/Core files as modernization work expands.
- Began Step 01 with one isolated characterization slice and no production behavior changes.
- Added
Core/Tests/DeterminismPrimitivesTest.cppas the shared home for small determinism primitive vectors, avoiding one test file per sub-step. - Locked the production
Common/crc.hprimitive's initial/no-op/clear behavior, representative byte vectors, incremental processing, and carry/high-bit behavior. - Clang 17 passes the vectors at
-O0,-O2, and-O3. - GCC 14.2 passes at
-O0; optimized-O2/-O3, ASan, and UBSan runs pass the CRC vectors with-Wno-strict-aliasingto suppress pre-existing warnings from unrelatedLib/BaseType.hfloat helpers. - The strict-aliasing warning is retained as a Step 01 investigation item; no deterministic float behavior was changed in this CRC slice.
- No RNG, Xfer, snapshot, replay, simulation, renderer, W3D/W3X runtime, asset-manager, or build-system implementation changed.
- Step 01 remains
PARTIAL; the next small target is deterministic game-logic RNG sequence/state characterization.
- Extended the existing
Core/Tests/DeterminismPrimitivesTest.cpp; no additional RNG test file or copied RNG implementation was introduced. - Added a narrow
RTS_STANDALONE_DETERMINISM_TESTinclude seam inCore/GameEngine/Source/Common/RandomValue.cppso the production RNG implementation can be linked into the lightweight Linux/GCC/Clang harness without pulling ATL/Win32 throughPreRTS.h. Normal production builds retain the existingPreRTS.hpath. - Locked explicit-seed initialization, replay/base-seed stability, initial/per-draw RNG state CRCs, two deterministic integer sequences, signed-range behavior, same-seed reset reproducibility, equal-range retail state consumption, and retail-compatible
GameLogicRandomValueUnchangedstate advancement. - GCC 14.2 and Clang 17 pass the combined CRC/RNG characterization at
-O0,-O2, and-O3; ASan and UBSan also pass. - The pre-existing optimized GCC strict-aliasing warning from
Lib/BaseType.hremains suppressed only for this lightweight gate and is not changed by this step. - Real-valued RNG, Xfer/snapshot bytes, layout-sensitive structures, and replay fixtures remain future Step 01 work.
- Extended the existing
Core/Tests/DeterminismPrimitivesTest.cpp; no new determinism test source was created. - Added an engine-linked Xfer mode that derives a capture sink from
Xferand calls the production base-class primitive wrappers rather than copying their behavior. - Locked the legacy Windows primitive widths and exact little-endian byte stream for version, byte/bool, 16/32/64-bit integers,
Real, andxferUserraw bytes. - Added
z_determinismtestdirectly to the existing Zero Hour extras CMake path instead of creating another CMake subdirectory/module. - The target is opt-in through the existing
RTS_BUILD_ZEROHOUR_EXTRASswitch; normal game/build behavior is unchanged when extras are off. - The lightweight Linux CRC/RNG characterization remains green. The engine-linked Xfer test requires Windows because the production Xfer/GameEngine header graph is tied to legacy Win32/ATL infrastructure.
- Windows MinGW-w64 i686 and MSVC reference execution commands are documented in
History/STEP_01_DETERMINISM_GUARD.md; reference execution remains pending user validation. - No Xfer serialization implementation, snapshot behavior, replay format, gameplay, renderer, asset manager, or W3D/W3X runtime behavior changed.
- Reused
Core/Tests/DeterminismPrimitivesTest.cppand the existingz_determinismtesttarget; no new source/test module was created. - Added an in-memory
XferSavecapture subclass so the productionXferSave::xferSnapshot()dispatch can be exercised without writing a test file to disk. - Characterized the real production
DamageInfoOutput::xfer()snapshot path with representative non-zero values. - Locked the exact 10-byte Windows stream and field order: version, actual damage dealt, actual damage clipped, then no-effect flag.
- No Xfer, XferSave, Damage, Snapshot, save-game, replay, gameplay, renderer, W3D, or W3X production behavior changed.
- Lightweight Linux CRC/RNG and W3X regressions remain part of the local gate; the engine-linked primitive/snapshot test remains a Windows execution gate for MinGW-w64 i686 and MSVC reference builds.
- Completed the remaining Step 01 characterization in the existing
Core/Tests/DeterminismPrimitivesTest.cpp; no new determinism test file/module was created. - Added exact IEEE-754 game-logic real-RNG vectors and per-draw RNG-state CRCs.
- Characterized the legacy fast float trunc/floor/ceil bit behavior, including historical edge behavior.
- Removed modern C++ strict-aliasing UB from the non-VC6 float bit-conversion path in
Lib/BaseType.husingmemcpy; the VC6 assembly branch and legacy bit-mask/arithmetic algorithm are unchanged. - Compared 199,122 deterministic finite float inputs before/after the alias-safe change; the trunc/floor/ceil output stream/hash was identical.
- GCC 14.2 now passes the lightweight determinism test at
-O0,-O2, and-O3with-Werrorand no-Wno-strict-aliasing; Clang 17 passes the same matrix; ASan and UBSan pass. - Added production
XferCRCcheckpoints for full-word and partial-tail folding. - Added strict Win32 ABI guards for replay/network primitive widths, packed
TransportMessageHeader, nativeGameMessagesize, command-packet capacity, andCommandPacketoffsets/size. - Locked replay/network enum anchors, including
MSG_BEGIN_NETWORK_MESSAGES = 1000,MSG_LOGIC_CRC = 1095, andMSG_END_NETWORK_MESSAGES = 1999. - Added a known 19-byte replay
MSG_LOGIC_CRCcommand-record fixture with production CRC and XferCRC checkpoints. - W3X A0/A1/A2 regressions remain green.
- Step 01 characterization implementation was complete at this point; final Win32 sign-off was still pending and was completed after the focused-target stabilization recorded below.
- User MinGW-w64 GCC 16.2 + Ninja validation reached all 653 compilation steps and failed only at final
z_determinismtestlinkage because the target linked the monolithicz_gameenginearchive. - The unresolved symbols were executable/device responsibilities (
TheKey_*,MapObjectstorage, UI/renderer hooks, language-file globals), not failures in CRC/RNG/Xfer determinism. - Reworked
z_determinismtestas a focused standalone target built from the existing test plus production RandomValue, Snapshot, Xfer, XferCRC, and Damage implementation units; removed thez_gameenginelink dependency. - Kept characterized Xfer primitive/XferCRC/DamageInfoOutput code on the production implementations; only out-of-scope Xfer APIs and identifier/string-allocation plumbing use standalone-test seams.
- Removed the
XferSavedependency from the snapshot capture while continuing to test the realDamageInfoOutput::xfer()field order. - Changed the MinGW i686 configure preset to Ninja and added
mingw-w64-i686-determinismplusz_determinismcheckfor a short build-and-run workflow. - Made the i686 toolchain discover native MSYS2 MINGW32
gcc/g++/ar/ranlib/windres/dlltoolas well as conventional cross-prefixed tool names. - Removed duplicate
_com_utilconversion implementations fromcomsupp_compat.hbecause modern MinGW-w64 already provides them. - Local GCC/Clang lightweight determinism and W3X A0/A1/A2 regressions remained green; final focused Win32 execution was completed successfully after the final linker-isolation correction.
- User validation on Windows passed
cmake --build --preset mingw-w64-i686-determinism --target z_determinismcheckwith MinGW-w64 i686 / GCC 16.2 + Ninja. - Final output:
Step 01 determinism guard passed: float helpers, CRC/RNG, Xfer/XferCRC, snapshot, ABI, and replay checkpoints. - Corrected the provisional replay enum checkpoint from
MSG_LOGIC_CRC = 1093to the source-accurate1095; updated the 19-byte replay fixture and CRC/XferCRC expected values accordingly. - The focused MinGW determinism target uses interprocedural optimization when supported to eliminate unused legacy inline/vtable material without relinking the monolithic GameEngine.
- Step 01 is now DONE. Its CRC/RNG/Xfer/snapshot/ABI/replay contracts are the mandatory regression gate for Step 02 and all later modernization work.
- Step 02 — Command-Line Build System Foundation is now the active milestone.
- Started from the exact Step 01G archive bytes supplied for this chat; the received archive SHA-256 (
796c7e5642d655bebdf0ca079d7a099a5af46d82cb11a9b27282021f800fce07) does not match the user-declared handoff hash (bb179526f5a093397375220025e265ffc66ad223e8569a30b4d933562ac8718a), so the mismatch is recorded rather than silently falling back to another repository. - Added canonical
mingw32-release,mingw32-debug,mingw32-profile, andmingw32-testsNinja presets while retaining the Step 01mingw-w64-i686*names as compatibility aliases. - Added a focused
RTS_BUILD_TESTS_ONLYCMake graph and centralized modernization test wiring inCore/Tests/CMakeLists.txt. - Moved only the CMake ownership of
z_determinismtestout of the Zero Hour tools subtree; the signed-off Win32 production source set,CppMacrosprelude, Zero Hour header precedence, ReactOS ATL use, and MinGW IPO isolation remain intact. - Integrated W3X A0/A1/A2 and the Step 01 lightweight determinism path with CTest without adding new test source files.
- Scoped
-Wsuggest-overrideto C++ project compilation instead of C/vendored targets; moved MinGW compatibility flags/defines/libraries from global injection tocore_config; removed the global-mwindowsinjection. - Replaced direct deprecated
FetchContent_Populate()use for ReactOS ATL, legacy zlib, and LZHL with source-onlyFetchContent_MakeAvailable()flows; marked appropriate vendor include boundaries asSYSTEM. - Hardened i686 toolchain selection with an explicit
RTS_MINGW_ROOT, selected-bin discovery, target-triplet validation, and selected-bin debug-strip lookup. - Reworked WIDL discovery around the selected MinGW/MSYS2 environment plus explicit
RTS_WIDL_ROOT,WIDL_ROOT, andRTS_WIDL_INCLUDE_DIRoverrides. Native MINGW32 now resolves bothwidl.exeand${RTS_MINGW_ROOT}/include/oaidl.idlwithout PATH surgery; Linux Wine include layouts remain fallbacks. The focused test graph no longer requires WIDL. - Local GCC 14.2 CMake/Ninja/CTest passed all four focused tests; Clang 17 CMake/Ninja/CTest passed the same four tests.
- Manual Step 01 lightweight determinism passed GCC and Clang at
-O0,-O2, and-O3; GCC ASan and UBSan passed; standalone W3X A0/A1/A2 passed with both GCC and Clang. - Windows Step 02A verification and the real
z_generalsMinGW build remain pending. No Step 02A Windows pass is claimed.
- Continued strictly from
GeneralsGameCode-Step02A-Command-Line-Build-Foundation-full.zipas supplied in this chat; SHA-256 of the exact Step 02A bytes used as the comparison base isd0ecee0b8dc4810a18eee53b9ddcc278862422f725aa516756ac00090b6bc2ee. - Reproduced a real CMake generation blocker under GNU: unconditional
install(FILES $<TARGET_PDB_FILE:...>)fails becauseTARGET_PDB_FILEis unsupported by the GNU linker, even when the install file isOPTIONAL. The prior Generals/Zero Hour install rules used this expression whenever an install prefix was present. - Consolidated runtime installation in
cmake/debug_strip.cmakethroughrts_install_runtime_target(). MSVC retains optional PDB installation; MinGW Release installs the existing$<TARGET_FILE>.debugsidecar when symbol stripping is available; non-MSVC/GNU generation no longer evaluates a PDB expression. - Replaced the duplicated Generals and Zero Hour target/PDB install blocks with the shared helper and compact target lists.
- Moved full-runtime WIDL discovery/requirement ahead of ReactOS ATL and the other runtime dependency graph. A missing WIDL now fails before external runtime dependencies are populated.
- Added native-Windows validation for
oaidl.idlandocidl.idl, matching the imports inBrowserEngine.idlandBrowserDispatch.idl; focusedmingw32-testsremains WIDL-independent. - Added
cmake/tests/RuntimeInstallPolicyTest.cmakeand registeredbuildsystem_runtime_install_policyin the existingCore/Testsgraph; it uses a tiny nested target to catch linker-specific install-generator-expression regressions and requires the.debugsidecar on MinGW. - GCC 14.2 and Clang 17 focused CMake/Ninja graphs each passed 5/5 CTest tests.
- The lightweight Step 01 determinism harness was rerun under GCC 14.2 and Clang 17 at
-O0,-O2, and-O3; GCC ASan and UBSan also passed. - The repository-owned runtime-install policy test configured, built, and installed successfully through
rts_install_runtime_target()under both GCC and Clang; a separate host-GNU probe also validated the helper directly. A second synthetic GNU probe exercising the MinGW debug-sidecar branch produced and installed both the executable and.debugfile. - A real i686 MinGW compiler is not available in this execution environment and package-network access is unavailable, so no Windows/MinGW
z_generalsbuild pass is claimed. The next Step 02 slice should use the first concrete compiler/linker failure fromcmake --build --preset mingw32-release --target z_generals.
- Advanced from Step 02 after the user reported the Windows canonical build path working; no Step 02 Windows console transcript was supplied, so the repository records user acceptance without inventing formal output.
- Reused
rts/profile.h, the existing profile module, WW3DDebug_Statistics, and the current Tracy seam rather than introducing a parallel profiler/statistics hierarchy. - Added
RTS_BUILD_OPTION_PERF_TELEMETRY; canonicalmingw32-profileenables it while normal release/debug render paths compile the hook out. - Added production
performance_telemetry.cppwith runtime-opt-inRTS_PERF_CAPTURECSV output, buffered periodic flush, stable schema version 1, and optional Tracy plots from the same frame sample. - Bracketed successful primary WW3D render frames only; telemetry reads render/sync identity, CPU microseconds, draw/geometry counters, texture/resource counters, and WW3D allocation/free counts. No telemetry value feeds back into simulation or frame pacing.
- Reused existing texture statistics. CSV capture temporarily promotes
RECORD_TEXTURE_NONEtoRECORD_TEXTURE_SIMPLEonly for the primary frame when needed, then restores it. - Added
performance_telemetry_step03ato the focused CTest graph. GCC 14.2 and Clang 17 each pass 6/6 focused tests. - Final telemetry sealing matrix passed with GCC and Clang at
-O0,-O2, and-O3, plus GCC ASan and UBSan. A telemetry-enabled focused configure confirmedRTS_PERF_TELEMETRYpropagation; the normal focused Release graph confirmed the define stays absent. - Step 03 remains active: GPU timing, full client/update phases, visibility/culling, process memory, asset hotspots, and benchmark automation remain.
- Completed Step 03 by extending the Step 03A render sample into versioned CSV schema v2 with one row per
GameEngine::update(). - Added complete engine update, GameClient, message-stream, network, GameLogic, and primary WW3D render CPU timing while keeping all telemetry observational.
- Added a profile-build drawable visibility snapshot: total drawables, DrawModule-visible drawables, and fully shrouded drawables. This is explicitly a client visibility proxy, not a frustum/GPU occlusion result.
- Preserved existing WW3D draw/geometry/texture/resource counters and Tracy plots; no duplicate renderer-statistics subsystem was introduced.
- Added
scripts/perf-summary.pyfor standard-library-only p50/p95/p99/max timing and mean/max counter summaries. - Deliberately deferred legacy D3D8 GPU timestamp work to D3D12, where native queue timestamp infrastructure will survive the renderer transition.
- Began Step 04 immediately after Step 03 by consolidating MinGW toolchain discovery into one architecture-parameterized implementation.
- Kept
mingw-w64-i686.cmakeas the compatibility/reference wrapper and addedmingw-w64-x86_64.cmakefor the staged x64 lane. - Added
mingw64-testsandRTS_BUILD_X64_READINESS; the x64 lane is initially focused-tests-only, and full x64 runtime configuration fails intentionally with an explanatory diagnostic. - Removed legacy D3D8/DirectInput/DirectSound link requirements from the focused MinGW test graph and avoided ReactOS ATL population in the x64 focused graph when there is no consumer.
- Added
architecture_width_step04a, which validates pointer/uintptr_twidth behavior while locking fixed-width engine/wire primitives and ObjectID/DrawableID to 32 bits. - Local host-native GCC 14.2 and Clang 17 focused CMake/Ninja/CTest runs pass 7/7 tests.
- No Windows x86_64 test pass is claimed;
mingw64-testsremains the Step 04A Windows validation gate. - Final local validation also passed GCC/Clang
-O0/-O2/-O3focused suites (7/7 each), GCC ASan and UBSan (7/7 each), schema-v2 summary text/JSON checks, and telemetry compile-definition isolation. - The validation container did not provide an x86_64 MinGW-w64 compiler, so no Win64 execution/build result was inferred from the host-native 64-bit pass.
Authoritative input: GeneralsGameCode-Step03-Complete-Step04A-x64-Readiness-full.zip (e87de5e1d2f6bd2e916030b5beb487fb4a71eb2beb4e57b14ccca3d22e1d7eba).
Implemented:
- made
GameMessage::TypeexplicitlyInt-backed; - removed the
NetworkDefs.hdependency on runtimeGameMessagelayout and froze legacy command payload capacity at 1008 bytes / 28 compatibility commands; - removed the now-unnecessary
MessageStream.hinclude fromNetworkDefs.h; - widened native-only
WindowMsgDatatouintptr_t; - converted
waveOutOpencallback/instance userdata toDWORD_PTR; - replaced IME pointer-through-
UnsignedIntarithmetic with typed byte-pointer arithmetic; - added
wire_replay_abi_step04b; - added
pointer_wire_source_audit_step04b; - retained fixed-width IDs/protocol fields and did not open the x64 D3D8 runtime graph.
Validation completed in the Linux container with GCC 14.2.0 and Clang 17.0.0. The focused graph contains 9 tests and passed in all of these configurations: GCC -O0, -O2, -O3; Clang -O0, -O2, -O3; GCC AddressSanitizer; GCC UndefinedBehaviorSanitizer. git diff --check and clean patch-application verification are packaging gates for the final deliverables. No Windows or Win64 execution is claimed by this environment.
Authoritative input: GeneralsGameCode-Step04B-Wire-Pointer-Audit-full.zip (b6e983715e74c32ececcbe820964697496a9df25dd5e36cb86d88e6c981a09f9).
Locked compatibility clarification for this slice: Evolution is x64-only and multiplayer compatibility is required only between our own Evolution/game editions. Retail 32-bit multiplayer interoperability is not a target. The frozen i686 build receives no new features and remains temporarily only as a deterministic/replay/network oracle.
Implemented:
- converted
ObjectPoolClassbacking-block chaining from the Win32-accidentaluint32*layout to a native one-pointerBlockHeader, preventing x64 overlap between the eight-byte block link and the first pooled object/free-list entry; - converted
GameMemoryraw byte arithmetic/strides tosize_t, made pool byte alignment followsizeof(void*), added blob multiplication overflow checking, and removed the pointer-through-unsignedalignment check; - retained the separate
GameMemoryInit.cppfour-count rounding rule because it rounds pool counts, not addresses; - made
FastFixedAllocatorchunk storage/stride pointer-aligned and replacedFastAllocatorGeneral's fixed four-byte prefix with a pointer-aligned header that remains four bytes on x86 and becomes eight bytes on x64; - corrected
FastAllocatorGeneral::Reallocso grow/shrink copies only the valid payload prefix instead of the old augmented allocation size; - converted
WindowVideoManagerpointer hashing touintptr_tandHKLlow-word extraction to an explicit native-width handle bridge; - fixed list-box multi-select retrieval so the native
Int*selection array is returned throughInt**, not truncated intoInt; updated the modern Core GameSpy chat caller to use that contract; - added guarded
HAVE_WCSLCPY/HAVE_WCSLCATcompatibility seams used only by the Clang/Linux focused allocator regression, avoiding a new duplicate string implementation; - added
scripts/setup-windows-dev.ps1: x64/MSYS2 GCC + WIDL + CMake + Ninja + Python + Git by default, with the frozen i686 toolchain only behind-IncludeLegacyX86;-VerifyOnly,-SkipMsysUpdate, and-SkipPathUpdateare available for existing installations; - added
runtime_native_width_step04c,runtime_pointer_source_audit_step04c, andwindows_dependency_bootstrap_step04c, increasing the focused graph from 9 to 12 tests.
Validation completed in the Linux container:
- GCC 14.2
-O0,-O2,-O3: 12/12 each; - Clang 17
-O0,-O2,-O3: 12/12 each; - GCC AddressSanitizer: 12/12;
- GCC UndefinedBehaviorSanitizer: 12/12;
- production Step 04C allocator guard reports 64-bit native pointers on this host.
The environment has no PowerShell runtime and no x86_64-w64-mingw32 compiler, so no Windows/Win64 dependency-bootstrap or mingw64-tests pass is claimed. Step 04D is next: bring real deterministic/headless Common/GameLogic units into the x64 lane and start golden x86-versus-x64 CRC timeline validation.
Authoritative input: GeneralsGameCode-Step04C-Native-Width-Runtime-Dependencies-full.zip (e49b157c93e9fced03c61bb76519f4262bddc4b0682d08a35499700e1c47e1d9).
Implemented:
- centralized the duplicated Generals/Zero Hour
setFPMode()implementation in shared Core GameEngine code; - retained the frozen i686 x87 round-to-nearest/24-bit precision behavior while giving x64 a round-to-nearest contract without legacy x87 precision emulation;
- enabled
RTS_BUILD_X64_HEADLESS_COREinmingw64-tests; - added
headless_determinism_step04d, a renderer-free 12,000-frame deterministic executable using production GameLogic RNG, production CRC, and production FP reset; - hashes only explicit fixed-width fields and RNG state, never native pointers/padding/allocator state;
- added the versioned candidate timeline fixture at frames 0, 1, 10, 100, 1000, 5000, 10000 and 12000/end;
- added
scripts/compare-determinism-timelines.pyfor direct i686-vs-x64 oracle comparison; - added deterministic compiler policy guards (
-fno-fast-math,-ffp-contract=off,/fp:stricton MSVC) and source-policy regression coverage; - focused graph increased from 12 to 15 tests.
Local validation: GCC 14.2 O0/O2/O3, Clang 17 O0/O2/O3, GCC ASan and GCC UBSan all passed 15/15 tests. All configurations emitted identical eight-checkpoint timelines through frame 12000.
No Windows/Win64 execution is claimed. The candidate fixture becomes a signed-off cross-architecture oracle only after the same revision matches under the frozen Windows i686 lane and Windows x64 mingw64-tests lane. Step 04E is next: explicit Evolution network/replay protocol and x64-to-x64 validation.
- Windows bootstrap transcript supplied by the user confirmed MSYS2 package update/install completed and discovered the x64 GCC 16.2.0, CMake 4.4.3, Ninja 1.13.2, and
widl.exetools. - The bootstrap then failed during WIDL verification because
scripts/setup-windows-dev.ps1used the generic--versionargument. The installed MSYS2/Wine WIDL accepts-Vinstead;cmake/widl.cmakealready used the correct flag. - Changed both x64 and optional i686 bootstrap WIDL probes to
-Vrather than weakening or skipping WIDL verification. - Extended
WindowsDependencyBootstrapTest.cmaketo require the-Vprobes and reject a regression to--versionfor WIDL. - This transcript proves dependency installation/tool discovery up to the WIDL probe; it does not yet constitute a passing Windows
mingw64-testsor i686-vs-x64 timeline gate. Those remain pending a rerun after this hotfix.
- Windows
mingw64-testsconfigure succeeded under MSYS2 MinGW-w64 GCC 16.2.0 after the WIDL bootstrap correction. - The build exposed two real focused-lane compiler barriers: pre-C++11 global delete declarations disagreed with the standard
noexceptdeclaration from<new>, and aWWASSERT-only object-pool counter became unused in release builds under-Werror. - Updated WWLib, GameMemory and GameMemoryNull standard unsized global delete/delete[] declarations and definitions to the modern non-throwing contract; project-specific debug placement overloads were not changed.
- Scoped the object-pool block-count verification to
DEBUG_CRASHING, preserving the debug invariant without release warning noise. - Extended the existing Step 04C runtime source audit rather than creating another overlapping audit module.
- Focused GCC and Clang allocator/runtime tests pass locally; Windows build/CTest remains pending user rerun and is not claimed here.
Authoritative local input: GeneralsGameCodeEastWind.zip (e290c9bb51c4fc271ed89428b531d33298e498336f61fa4a8db6abcab5ad8502).
Upstream comparison snapshot: GeneralsGameCode-main (1).zip (c5c561ca47ffe874c31732c3cb86bcc0016f246f5ee36cc3435bae50e26427d1).
Implemented:
- imported/adapted newer Dozer/Worker disabled-task handling in both editions and corrected old-stream Xfer gating to branch on the stream
version; - imported newer production cancellation/refund behavior and started-batch guard;
- imported corrected neutron-missile radius/search/damage behavior behind retail-preservation gates and added the required coordinate unary operators without replacing EastWind's strict-aliasing-safe float helpers;
- merged upstream GameMemory robustness into the existing x64-native allocator rather than reverting pointer alignment/
size_twork; - switched active Bink/Miles runtime consumers from stub link targets to the repository runtime loaders so x64 bring-up can degrade cleanly when legacy 32-bit multimedia DLLs are unavailable;
- imported large-glyph/font-buffer safety;
- made the Step 04D fixture header reader tolerate CRLF/LF while leaving all CRC/RNG checkpoint data unchanged;
- added coordinate and source-policy regression tests; focused graph increased from 15 to 17 tests.
Deliberately not imported: upstream's older pointer-width allocator assumptions, unsafe float aliasing, pointer-truncating audio changes, older CMake/network architecture, or the full Miles lifecycle refactor before native-width userdata auditing. EastWind remains the architecture authority.
Shared material divergence against this upstream snapshot fell from 93 to 63 files. Local GCC 14.2/Clang 17 O0/O2/O3 plus GCC ASan/UBSan all pass 17/17, preserving the same Step 04D deterministic timeline. The immediately preceding Step 04D2 baseline has a user-supplied Windows x64 15/15 + fixture pass; Step 04D3 itself still awaits the Windows 17-test rerun and the i686-vs-x64 timeline certification.
- A user-supplied
-IncludeLegacyX86Windows run successfully updated MSYS2 and installed/found both x64 and frozen i686 toolchain packages, then reached x64 tool verification. gcc.exe,g++.exe, andcmake.exelaunched and printed valid version output, but the bootstrap reportedCMake verification failed (exit code -1).- Root cause:
Assert-Toolpiped each native version probe directly intoSelect-Object -First 2; Windows PowerShell can close the native stdout pipe after the requested rows and leave$LASTEXITCODEas-1even though the tool itself succeeded. Assert-Toolnow captures the complete native output first, snapshots$LASTEXITCODEimmediately, and only then pipelines the captured text for two-line display.WindowsDependencyBootstrapTest.cmakenow locks the capture/snapshot/display ordering and rejects the direct native-process-to-Select-Object -Firstpattern.- This transcript confirms the legacy i686 packages are installed, but the run stopped before optional i686 tool verification or any i686 determinism execution. No i686-vs-x64 timeline match is claimed yet.
- Recorded real Windows x64 Step 04D3/04D4 validation at 17/17 plus the matched headless fixture.
- Fixed the frozen i686 Step 01 guard after Step 04B header decoupling by making
DeterminismPrimitivesTest.cppincludeCommon/MessageStream.hdirectly for itsGameMessageABI/replay assertions. - Added a source-policy regression preventing the test from silently depending on
NetworkDefs.hto provide message definitions transitively. - No runtime protocol or deterministic data layout changed.
- Recorded real Windows x64 Step 04D3/04D4 validation at 17/17 plus the matched Step 04D headless fixture.
- Recorded the frozen i686 CTest result at 16/17; only
runtime_native_width_step04cfailed. - Corrected the Step 04C test probe from
uint64_ttouintptr_tso the test validates native pointer-width metadata without imposing an artificial 8-byte alignment requirement on the Win32 oracle. The production WWLib allocator layout is unchanged. - Added a source-policy regression requiring the probe's alignment to be no stronger than
void*. - Updated
compare-determinism-timelines.pyto read plain UTF-8, UTF-8 BOM, or BOM-marked UTF-16 timeline files; the self-test now covers Windows PowerShell-style UTF-16 output. - No deterministic checkpoint, CRC/RNG state, network/replay layout, or allocator implementation changed.
- The final i686 17-test rerun,
z_determinismcheck, and i686-vs-x64 timeline match remain the last Step 04D certification gate before Step 04E.
- Real Windows x64 MinGW-w64 GCC 16.2 focused graph passed 17/17 and matched the Step 04D headless fixture.
- Frozen Windows i686 focused graph passed 17/17; Step 01
z_determinismcheckpassed with the signed-off CRC/RNG/Xfer/snapshot/ABI/replay checkpoint set. - i686 and x64 Step 04D timelines matched all eight checkpoints through frame 12000. Step 04D is closed.
Authoritative input: GeneralsGameCode-Step04D6-i686-Oracle-TestHarness-Hotfix-full.zip (61f5f4ba146c6d15154b983b1e5e8eadca7d963bb2b2c715e701b0532243d7c3).
Implemented explicit little-endian fixed-width command serialization, a shared GameMessage adapter, EVN1 network framing with explicit command batches, and additive EVR1 replay framing using the same command bytes. NetPacketGameCommandData now routes game-command payloads through the Evolution codec. Legacy .rep Recorder behavior is intentionally untouched until runtime replay integration. Added exact byte fixtures plus malformed/version/truncation source/runtime guards; local focused graph grows from 17 to 19 tests.
04E remains active: full transport/Recorder wiring and real x64-to-x64 multiplayer/replay session validation are next.
Authoritative input: sealed GeneralsGameCode-Step04E1-Evolution-Protocol-v1-full.zip, SHA-256 8f87a75d2e7429b572a597abb0669618f9c58397783fb17bc8dd4045c3ecac58.
Implemented:
-
restricted production EVN1/EVR1 runtime activation to Win64 so the frozen i686 runtime remains feature-frozen on the legacy path while portable protocol tests remain cross-architecture;
-
extended EVN1 additively with
RoutedCommandBatch; direct 04E1CommandBatchbytes remain frozen and require the per-record reserved byte to stay zero; -
routed gameplay commands through raw EVN1 UDP queues at the Transport boundary while leaving legacy ACK/control/session traffic on the existing packet transport;
-
preserved current retry/ACK/relay behavior by reconstructing
NetGameCommandMsg/NetCommandRefobjects at receive and feeding the existingConnectionManagerlogic; -
fixed the staged receive seam so legacy packets are decrypted before copying/CRC validation after EVN1 detection;
-
added
EvolutionReplayStreamas the shared EVR1 runtime file bridge; -
wired both Generals and Zero Hour Recorder implementations to write transitional
.rep.evrsidecars and prefer them for command playback when valid, with legacy command-stream fallback when the sidecar cannot be opened/validated; -
delete partial EVR1 sidecars on write/flush failure and synchronize sidecars when saving/archiving replays to avoid stale command streams;
-
added routed-network golden bytes, an executable EVN1-to-EVR1 bridge regression, runtime integration source policy, and
z_evolutionruntimecheck; -
focused graph increased from 19 to 21 tests.
Local validation: GCC O0/O2/O3, Clang O0/O2/O3, GCC ASan and GCC UBSan all pass 21/21. The Step04D deterministic fixture, 04E1 golden protocol fixture, and 04E2 runtime bridge gate pass in every configuration. No real Windows 04E2 runtime or x64-to-x64 multiplayer session is claimed yet.
Release seal: the final Win64-only runtime-gated tree was reconstructed from the exact sealed Step04E1 ZIP, revalidated at 21/21 plus all three explicit gates, patched onto a fresh Step04E1 extraction, and byte-compared with zero repository mismatches. No real Windows 04E2 runtime or x64-to-x64 multiplayer session is claimed yet.
- Real Windows x64 Step04E2 configure succeeded with MinGW-w64 GCC 16.2.0, but the focused build failed in the standalone
evolution_game_message_adapter_step04eobject target. - Root cause: the target intentionally does not use the legacy engine PCH, while
EvolutionGameMessageAdapter.cppincludedMessageStream.hbefore the compatibility macro header;CPP_11/FUNCTION_DELETEwere therefore undefined. - Added an explicit first include of
Utility/CppMacros.hin the adapter translation unit rather than reintroducing a broad PCH/transitive dependency. - Extended the existing Step04E source-policy regression to require
CppMacros.hbeforeMessageStream.h. - Local focused graph passes 21/21 after the hotfix. No wire/replay/deterministic semantics changed; Windows post-hotfix validation remains pending.
- Step04E2A fixed the standalone adapter compile and a clean Windows x64 rebuild completed all focused targets, but
evolution_protocol_v1_step04ecrashed with0xC0000005. - GDB placed the failure in
std::getlineduring fixture loading and showedlibstdc++-6.dllloaded from MSYS2ucrt64while the binary was compiled with themingw64GCC 16.2 toolchain. This is a C++ runtime ABI-family mismatch caused by ambient PATH resolution, not an EVN1/EVR1 serialization defect. - Added directory-scoped MinGW link options
-static-libgcc -static-libstdc++for the focusedCore/Testsgraph, matchingcore_config's self-contained GCC runtime policy without pulling legacy engine dependencies into portable protocol tests. - Extended the existing Step04E source-policy test to require the scoped static runtime rule.
- Local focused graph remains 21/21. No protocol bytes, replay bytes, deterministic checkpoints, runtime layouts, or gameplay semantics changed. Windows post-hotfix rerun remains pending.
Authoritative input: GeneralsGameCode-Step04E2B-Windows-MinGW-Runtime-Isolation-Hotfix-full.zip, SHA-256 fb0d1f1d9f3553a6338cb08b8597a1390185d4d8f2bd637ce142af47e2680900.
- Consolidated routed gameplay datagram composition/decomposition into the existing
EvolutionProtocolmodule and switched the production Win64Connection/ConnectionManagerbridge to those helpers without changing frozen 04E1 directCommandBatchbytes. - Added an x64-only deterministic two-endpoint harness using production Evolution command/framing code rather than a parallel test protocol.
- Covered command sequence/ID, frame, player identity, relay masks, packet loss/retry, legacy ACK interaction, duplicates, delayed/out-of-order delivery, frame synchronization, deterministic ordering, peer CRC agreement,
MSG_LOGIC_CRC = 1095checkpoint transport, malformed runtime-boundary rejection, and intentional EVN1 emission failure/fallback reachability. - Added a source-policy gate that keeps reliability/control/session/disconnect traffic on the existing legacy machinery and verifies successful EVN1 gameplay emission cannot also enter the legacy packetizer.
- Kept i686 feature-frozen: the new session tests are x64-only.
- Local GCC 14.2 Release/Debug, Clang 17 Release, GCC AddressSanitizer, and GCC UndefinedBehaviorSanitizer focused graphs all pass 23/23. Real Windows 04E3 sign-off and representative full-client multiplayer validation are not claimed yet.
Authoritative input: GeneralsGameCode-Step04E3-Deterministic-X64-Session-Validation-full.zip, SHA-256 70b4d429181fed0920a92a6180f52c68dea5ec150ed11e47858e540d0d6a4fd4.
The user first supplied real Windows MinGW-w64 GCC 16.2 output for that baseline: clean configure/build, 23/23 CTest pass, and successful Step04D, 04E1, 04E2 and 04E3 explicit gates. Step 04E3 is therefore Windows-signed-off.
04E4 work:
- added an x64-only 136-command / 68-frame representative full-session harness using production command, routed-EVN1, EVR1 and CRC components;
- froze exact full-session network and replay transcript bytes, final deterministic CRC and command count in
Step04E4EvolutionFullSessionV1.txt; - reconstructs the network side under deterministic first-attempt loss/retry, duplicates and delayed delivery, then requires the same canonical command/CRC timeline as EVR1 replay;
- validates four
MSG_LOGIC_CRC = 1095checkpoint frames; - rejects unsupported EVN1/EVR1/command-codec versions, corrupted command payloads, truncated replay tails and backward frame ordering;
- centralized nondecreasing replay-frame validation as
ReplaySequenceState/advanceReplaySequenceV1and reused it in runtimeEvolutionReplayStreamreads/writes without changing EVR1 bytes; - added a source-policy gate freezing valid-sidecar preference, open-time legacy
.repfallback and fail-closed behavior after a selected sidecar becomes corrupt; - kept legacy control/session/disconnect transport and the i686 oracle unchanged;
- local GCC Release, GCC Debug, Clang Release, GCC AddressSanitizer and GCC UndefinedBehaviorSanitizer focused graphs all pass 25/25, with all prior explicit gates unchanged.
Windows 04E4 sign-off and representative full-client multiplayer/replay execution are not claimed until supplied separately.
Authoritative input: Windows-signed-off Step04E4 full repository, SHA-256 b21a9a42e8ec00c6305ea100efec1f1c976e79ef35b5056a6fd4771fe2f416d4. The user-supplied Windows transcript records MinGW-w64 GCC/G++ 16.2, 25/25 focused tests, and successful Step04D, 04E1, 04E2, 04E3, and 04E4 explicit gates.
Implemented the final Step 04 retirement boundary: removed i686 MinGW presets/toolchain/bootstrap/comparator surfaces; made the canonical MinGW toolchain x86_64-only; rejected non-64-bit MinGW configuration; removed the focused Step01 i686 production/ATL branch; switched WIDL to Win64 generation; strengthened ArchitectureMigrationTest to require 64-bit native pointers; and added x64_retirement_policy_step04f / z_step04fcheck. The old comparator CTest was removed, so the focused graph remains 25 tests.
Project-owner decision: representative full-client multiplayer/replay validation remains a later x64 stabilization task and no longer blocks i686 retirement. Historical x86 verification records remain documentation provenance only.
Local GCC Release, GCC Debug, Clang Release, GCC AddressSanitizer, and GCC UndefinedBehaviorSanitizer focused graphs all pass 25/25. The unchanged Step04D/04E1/04E2/04E3/04E4 gates, z_determinismcheck, and the new Step04F policy target all pass. The final patch applies to a fresh extraction of the exact Step04E4 ZIP, reproduces all 4,579 source files byte-for-byte, and that reconstructed tree also passes 25/25 plus every explicit gate. Windows Step04F validation is pending and must not be claimed until its console output is supplied.
The user supplied the final real-Windows Step 04F validation transcript from MinGW-w64 GCC/G++ 16.2.0. The clean mingw64-tests build passed 25/25 CTest cases and the explicit determinism, headless timeline, Evolution protocol/runtime/session/full-session, and x64-platform gates. Step 04 is therefore closed and the supported Evolution modernization path is x64-only.
Step 05 begins with a repository-maintenance slice before parser growth. The active test/build surface was normalized so names describe permanent responsibilities instead of migration milestones: test source files, golden fixtures, CTest names, policy scripts, custom check targets, and x64 build options were renamed accordingly. Repeated CMake source-policy helper code was consolidated into cmake/tests/PolicyTestHelpers.cmake. The superseded scripts/dockerbuild.sh wrapper was removed in favor of the maintained scripts/docker-build.sh implementation.
Current developer documentation was simplified: top-level README.md, PROJECT_STATE.md, TESTING.md, and MODERNIZATION.md now describe the supported present-day workflow, while detailed chronology remains in this worklog and completed milestone specifications are grouped under Modernization/History/. Step 05 is split into 05A cleanup, 05B XML parser integration, 05C neutral rigid-mesh import, and 05D W3D/W3X routing/validation.
No gameplay, renderer, EVN1/EVR1 format, deterministic algorithm, W3D behavior, or W3X parser semantics changed in 05A. Local GCC Release, GCC Debug, Clang Release, GCC AddressSanitizer, and GCC UndefinedBehaviorSanitizer focused graphs all pass 25/25 after the cleanup. Windows Step 05A validation remains pending.
The user supplied the real Windows Step 05A transcript using MinGW-w64 GCC/G++ 16.2.0. The normalized developer baseline passed 25/25 tests plus all seven durable deterministic/Evolution/x64 checks, so Step 05A is Windows-signed-off.
By project-owner priority, the next functional slice was changed from immediate XML-parser integration to the first real Evolution D3D12 executable so upcoming W3D/W3X work can be exercised in the future x64 process rather than only through unit tests.
Implemented Step 05B locally:
- added standalone
Evolution/runtime target producingGeneralsEvolution.exe; - added dedicated
mingw64-d3d12-shellconfigure/build/workflow presets; - kept the target isolated from the legacy D3D8/D3D9/D3D11, DirectInput/DirectSound, ATL and monolithic game dependency graph;
- added Win32 window/message-loop startup;
- added DXGI factory plus D3D12-capable hardware-adapter selection, with optional WARP diagnostics;
- added D3D12 device and feature-level query;
- added direct command queue, per-frame command allocators, graphics command list, flip-discard swap chain, RTV heap/back buffers, explicit present/render-target barriers and clear/present;
- added fence/event synchronization and GPU-idle shutdown;
- added optional debug-layer request and
--frames Nautomation mode; - added install staging for a self-contained MinGW executable apart from Windows system graphics DLLs;
- added host-portable
d3d12_shell_policy, bringing the focused graph to 26/26 locally.
Local GCC Release, GCC Debug, Clang Release, GCC AddressSanitizer and GCC UndefinedBehaviorSanitizer focused graphs all pass 26/26. The actual D3D12 target cannot be compiled/run in the Linux container because the Windows MinGW/D3D12 SDK environment is not present; real Windows configure/build plus GeneralsEvolution.exe --frames 120 is required for Step 05B sign-off. No simulation, protocol, replay, W3D or W3X parsing semantics changed.
Real Windows MinGW-w64 GCC/G++ 16.2 verified the temporary D3D12 proof shell: it linked, selected Intel(R) UHD Graphics 770 at feature level 12.1, completed the 120-frame hardware smoke run with exit code 0, ran interactively, completed a WARP smoke run, installed/staged correctly, and preserved the 26/26 focused regression graph plus all explicit deterministic/Evolution/x64/D3D12 policy gates.
The project owner then rejected the standalone Evolution/ folder as permanent architecture and directed immediate in-place DX8 replacement. Step 05C therefore removes the standalone shell target/preset/tree and moves the proven device/swap-chain/frame synchronization implementation into the existing Core/Libraries/Source/WWVegas/WW3D2/Backend seam as the x64 D3D12 backend. The x64 game target selects D3D12/DXGI; DX8 backend/implementation sources are excluded from the x64 WW3D source selection. Remaining direct DX8Wrapper callers are an explicit migration backlog before the full x64 game build is ungated.
Step 05C local seal:
- removed the temporary standalone
Evolution/application tree, its dedicated shell preset/option, and the obsolete shell policy test; - added
D3D12Backendbehind the existing WW3DIRenderBackendseam and selected it for Windows x64; - excluded the DX8 backend/implementation source set and D3D8/D3DX8 game link libraries from the x64 renderer selection while retaining the archival 32-bit path;
- added a Windows x64 smoke test that constructs the production backend through
Create_Render_Backend(), covers clear-before-begin, depth/stencil clear, deferredEnd_Scene(false)followed by another scene, explicit flip, regular present, and destruction/GPU synchronization; - retained the full-game x64 configure gate while direct
DX8Wrappercallers remain, avoiding a D3D8-on-D3D12 compatibility facade; - local GCC Release, GCC Debug, Clang Release, GCC ASan, and GCC UBSan focused graphs all pass 26/26, and all deterministic/Evolution/x64/D3D12 source-policy gates remain green.
The production D3D12 backend itself still requires real Windows MinGW compilation and execution. Step 05C Windows sign-off therefore requires the Windows 27/27 graph plus check_d3d12_backend; no Windows pass is claimed from host validation.
The user supplied real Windows MinGW-w64 GCC/G++ 16.2 output for Step 05D. The focused graph passed 27/27, including d3d12_backend_smoke; check_d3d12_backend confirmed indexed position/color geometry submission through the production WW3D backend; and all deterministic, EVN1/EVR1, session, x64-platform, and D3D12 policy gates remained green. Step 05D is therefore Windows-signed-off.
Step 05E starts the real shader migration without adding a parallel shader subsystem. The temporary C++-embedded primitive HLSL is removed and replaced by Core/Libraries/Source/WWVegas/WW3D2/Shaders/PrimitiveColor.hlsl. D3D12Backend resolves and compiles the staged HLSL beside the executable; the Windows smoke target and normal Zero Hour x64 target stage the same file, shader edits participate in link dependencies so staging cannot silently go stale, and the Zero Hour install path includes the shader asset. The existing D3D8-era .nvp/.nvv terrain/filter/tree shader sources remain reference inputs and will be translated only as their matching texture/state/draw paths move to D3D12. No placeholder ports are added.
Step 05F adds no new C++ module. The existing IRenderBackend gains an opaque runtime geometry handle with explicit create/draw/release operations for the current position/color indexed contract. D3D12Backend uploads immutable vertex/index data through temporary upload resources into D3D12_HEAP_TYPE_DEFAULT buffers, records explicit CopyBufferRegion operations and transitions to vertex/index states, then reuses those GPU resources across frames. Release waits for queued GPU work before freeing the resources. The production Windows smoke test retains the transient path and additionally creates one persistent triangle, reuses it across deferred/normal frames, and releases it. This is intentionally completed before texture/SRV/sampler migration because the existing terrain/filter/tree shader sources all depend on texture/state bindings; no legacy shader is translated into dead HLSL.
The project owner reported the Step 05F Windows validation fully passing. Step 05F is therefore the authoritative baseline for the next renderer slice. Step 05G adds the first D3D12 sampled-texture contract without adding a parallel texture subsystem: generation-tagged renderer-neutral texture handles, default-heap RGBA8 texture resources, footprint-aware upload through CopyTextureRegion, a growable shader-visible SRV heap, an explicit static linear-wrap sampler in the root signature, and persistent textured indexed geometry. PrimitiveColor.hlsl gains the matching texture-sampling entries while remaining the single canonical bootstrap shader asset. The production Windows GPU smoke test now creates a 2x2 RGBA8 checker texture, binds it through the same production backend, reuses it across frames, and releases it explicitly. Step 05H is reserved for the first complete normal-game WW3D caller migration so progress becomes visually observable in the actual game rather than only in backend smoke tests.
The project owner confirmed Step 05G passing on real Windows, so sampled RGBA8 upload, shader-visible SRV growth, static sampler binding and textured indexed drawing are signed off as the authoritative starting point for 05H.
Step 05H1 begins using the normal z_generals executable as the migration target instead of adding another renderer proof app. The MinGW full-runtime configuration hard gate is removed and a dedicated mingw64-game preset enables Zero Hour, disables unrelated tools, retains the Evolution x64/headless regression options, and exposes the real game graph for compile/link blocker discovery. RTS_EVOLUTION_X64=1 is now a source-level compile definition so individual real callers can cleanly exclude retired DX8 implementation code as they cross.
The first migrated real caller is untextured Render2DClass, which services W3DDisplay lines, outlines, filled rectangles and rectangle-clock primitives. On Evolution x64 it converts the existing NDC positions and ARGB colors into the renderer-neutral color-vertex contract and calls Draw_2D_Indexed_Triangles(). D3D12Backend owns dedicated depth-disabled opaque, source-alpha and additive PSOs; the dynamic upload implementation is consolidated with the existing transient color primitive path rather than duplicated. W3DDisplay::setGamma() also now routes through IRenderBackend. The legacy DX8 dynamic VB/IB/state implementation remains available only outside RTS_EVOLUTION_X64.
Textured/grayscale Render2D is deliberately not emulated: 05H1 leaves it undrawn on the Evolution branch until real TextureClass CPU/resource lifetime is connected to the existing generation-safe RenderBackendTextureHandle. That is the next coherent renderer responsibility and avoids creating a DX8 texture-on-D3D12 facade.
Local validation: a native GCC 14.2 CMake/Ninja focused build completed all 46 compile/link actions and 26/26 CTest cases passed. All host source-policy scripts, including the extended D3D12 policy and runtime-install probe, pass. The container does not provide the Windows x86_64-w64-mingw32/D3D12 environment, so cmake --preset mingw64-game / cmake --build --preset mingw64-game --target z_generals is intentionally left for real Windows validation. No Windows game-build or runtime sign-off is claimed for 05H1.
The first real Windows cmake --build --preset mingw64-game --target z_generals -- -j1 stopped at WWSaveLoad/persistfactory.h because SimplePersistFactoryClass::Save() cast a native pointer directly to legacy uint32. The corresponding load path also read sizeof(T *), which would have widened the persisted identity field to eight bytes on x64.
05H1A treats that field as identity rather than an address. PersistPointerToken is explicitly std::uint32_t; save-time native pointers receive per-ChunkSaveClass tokens in memory, load-time factories register token-to-native-pointer pairs, and remap requests carry the token separately from the native pointer field being repaired. The SimplePersistFactory, render-object/dazzle factories, AudibleSound identity and SoundSceneObj attachment path are migrated to the same contract. SoundSceneObj m_UserObj, which historically wrote a raw address but was never part of the remap graph, now persists as null runtime-only state. Existing four-byte legacy identity values remain usable as opaque load tokens.
The runtime pointer policy now guards the 32-bit token width and forbids the original pointer cast, native sizeof(T *) persistence and raw SoundSceneObj pointer microchunks. Local source-policy regressions pass, and a host syntax probe compiles the changed pointerremap.cpp; the container still cannot perform the Windows MinGW full-game build. The next action is to rerun the same z_generals -j1 build on Windows and use its new first failure as the 05H migration queue.
- Real Windows
mingw64-gameprogressed through H1J to 132/947 and stopped onassetmgr.cppincluding unavailabled3dx8core.h. - Swept the active x64 graph for D3DX8 dependencies instead of fixing one include at a time.
- Removed unused D3DX8 includes from the Zero Hour asset manager, texture core/loader, height-map/view/client sources, and Zero Hour shadow/web-browser callers.
- Replaced point-orientation and sorting D3DX math with existing WWMath while preserving the old D3D row-vector transform convention.
- Converted shared Bezier basis/evaluation/forward-difference math from D3DX vectors/matrices to renderer-neutral
Matrix4x4/Vector4. - Replaced missing-texture mip generation with the existing
BitmapHandlerCPU mip helper. - Added an Evolution-only CPU
SurfaceClasscopy/scale path usingBitmapHandler; historical D3DX surface operations remain only in the non-Evolution branch. - Removed two
D3DXGetFVFVertexSizeutility calls in the legacy height-map path by using the fixed FVF stride. - Left shader/water/terrain/tree D3DX behavior in place for coherent renderer migration instead of replacing it mechanically.
- Extended D3D12 policy coverage so the migrated active sources cannot silently regain D3DX8 dependencies.
- Host focused graph: 26/26 passed. Windows sign-off pending the next real
z_generals -j1build.
- H1K Windows validation advanced the real
z_generalsgraph toGeneralsMD/.../WW3D2/assetmgr.cppat 125/940. - Replaced the asset-manager pointer-to-
intsubtraction blocker plus the same active copies inW3DAssetManager.cppandmeshmdlio.cppwith pointer-difference arithmetic. - Corrected
PrimitiveAnimationChannelClass::KeyClass::Set_Timefromfloattovoid; the only caller ignores a result and the old implementation returned none. - Extended the x64 platform policy, rebuilt the focused host graph, and passed 26/26 tests. Windows sign-off remains pending the next
z_generals -j1build.
- H1L Windows validation advanced the real game graph to
render2d.cppat 154/942. - Added equality/inequality value semantics to
RenderBackendColorVertexandRenderBackendTexturedVertexso WestwoodDynamicVectorClasscan instantiate its generic comparison/ID machinery. - Both renderer-neutral vertex records remain trivially copyable and keep their existing D3D12 upload layout.
- Host focused graph passed 26/26; Windows sign-off remained pending.
- H1M Windows validation cleared Render2D and advanced to
pointgr.cppat 188/942. - Replaced the unavailable
Matrix3D * Vector3point-orientation expressions withMatrix3D::Rotate_Vector()while preserving the H1K rotation angle/sign. - Widened only
SoundSceneObjClass::On_Eventruntime payloads tostd::uintptr_tso logical listener/sound pointers are not truncated; persisted/gameplay IDs remain fixed-width. - Added complete-object
Delete_This()overrides toPivotMapClassandSnapPointsClassto avoid secondary-basedelete thisdiagnostics. - Clean host tests-only build completed 46/46 actions and 26/26 tests. Windows sign-off requires the next real
z_generals -j1build.