Zero Hour rebuilt from EA's source: x64, Direct3D 11, VS2022/CMake, ~60 original bugs fixed, an AI that builds a base. Bring your own game.
C++ cmakecnccommand-and-conquercppdirectx11game-enginegame-preservationgeneralsrtssage-enginex64zero-hour
test(ci): re-pin the e1 replay crcs for 60 hz logic
Olcay Seygand23986a55bd0
diff --git a/GeneralsMD/Code/Tools/linux-packages-check.sh b/GeneralsMD/Code/Tools/linux-packages-check.shindex 6140ef089..9754c1e33 100755--- a/GeneralsMD/Code/Tools/linux-packages-check.sh+++ b/GeneralsMD/Code/Tools/linux-packages-check.sh@@ -19,8 +19,8 @@## minimal the package installed with only what it Depends/Requires (no recommended or weak dependencies),# then cut off the network: E1 (Tools/replay-check.sh --installed) through /usr/bin/zero-hour-reforged,-# its launcher and its own overlay discovery, at the pins: seed 0 at 1200 frames, seeds 0 and 1 at-# 12000. The game data is mounted read-only (rule 9 as ever: the runs root at a farm of it);+# its launcher and its own overlay discovery, at the pins: seed 0 at 2400 frames, seeds 0 and 1 at+# 24000. The game data is mounted read-only (rule 9 as ever: the runs root at a farm of it);# drawn the package installed as a player gets it (recommended dependencies on; on Arch, the Vulkan and# X11 optdepends), Xvfb, and Mesa's software Vulkan (lavapipe): one windowed skirmish frame, written# with -screenshot, which must be a picture (many colours), not a blank.@@ -58,7 +58,7 @@ PKGS="$(cd "$PKGS" && pwd -P)"; DATA="$(cd "$DATA" && pwd -P)"file_of() { ls "$PKGS"/$1 2>/dev/null | head -1; }DEB="$(file_of 'zero-hour-reforged_*_amd64.deb')"; RPM="$(file_of 'zero-hour-reforged-*.x86_64.rpm')"ARCHPKG="$(file_of 'zero-hour-reforged-*-x86_64.pkg.tar.zst')"; APPIMAGE="$(file_of 'zero-hour-reforged-*-x86_64.AppImage')"-PIN_1200=0x43105931 PIN_0=0x240A0702 PIN_1=0x35F5CF4D # E1's pins since upstream 1e94f8c7+PIN_2400=0x67F86891 PIN_0=0x6404352D PIN_1=0x90B6D230 # E1's pins since the logic went to 60 Hz (measured on Windows x64)failed=0 pulled=""say() { echo "linux-packages-check: $*"; }crc() { printf '%s\n' "$1" | sed -n "s/.*seed $2, 2 players: HEADLESS CRC \(0x[0-9A-Fa-f]*\) at frame $3.*/\1/p" | head -1; } # <E1 output> <seed> <frame>@@ -115,14 +115,14 @@ RUNNERchmod +x "$T/runner"local target=( --installed /usr/bin/zero-hour-reforged ) e1a e1b[ "$format" = appimage ] && target=( --appimage "$APPIMAGE" )- e1a="$(TMPDIR="$T/tmp" REPLAY_CHECK_RUNNER="$T/runner" bash "$CODE/Tools/replay-check.sh" "${target[@]}" --data "$DATA" --seeds 0 --maxframes 1200 2>&1)"- e1b="$(TMPDIR="$T/tmp" REPLAY_CHECK_RUNNER="$T/runner" bash "$CODE/Tools/replay-check.sh" "${target[@]}" --data "$DATA" --seeds "0 1" --maxframes 12000 2>&1)"+ e1a="$(TMPDIR="$T/tmp" REPLAY_CHECK_RUNNER="$T/runner" bash "$CODE/Tools/replay-check.sh" "${target[@]}" --data "$DATA" --seeds 0 --maxframes 2400 2>&1)"+ e1b="$(TMPDIR="$T/tmp" REPLAY_CHECK_RUNNER="$T/runner" bash "$CODE/Tools/replay-check.sh" "${target[@]}" --data "$DATA" --seeds "0 1" --maxframes 24000 2>&1)"printf '%s\n%s\n' "$e1a" "$e1b" | grep -E "HEADLESS CRC|agree|DIVERGED|no result|INSTALL" | sed 's/^/ /'- [ "$(crc "$e1a" 0 1200)" = $PIN_1200 ] && printf '%s' "$e1a" | grep -q "the playback and the second run agree" \- || { say "$label: E1 seed 0 at 1200 is not $PIN_1200 (or did not agree)"; bad=1; }- [ "$(crc "$e1b" 0 12000)" = $PIN_0 ] && [ "$(crc "$e1b" 1 12000)" = $PIN_1 ] \+ [ "$(crc "$e1a" 0 2400)" = $PIN_2400 ] && printf '%s' "$e1a" | grep -q "the playback and the second run agree" \+ || { say "$label: E1 seed 0 at 2400 is not $PIN_2400 (or did not agree)"; bad=1; }+ [ "$(crc "$e1b" 0 24000)" = $PIN_0 ] && [ "$(crc "$e1b" 1 24000)" = $PIN_1 ] \&& [ "$(printf '%s' "$e1b" | grep -c "the playback and the second run agree")" -eq 2 ] \- || { say "$label: E1 seeds 0 and 1 at 12000 are not $PIN_0 and $PIN_1 (or did not agree)"; bad=1; }+ || { say "$label: E1 seeds 0 and 1 at 24000 are not $PIN_0 and $PIN_1 (or did not agree)"; bad=1; }[ $bad -eq 0 ] && say "$label: E1 at the three pins, through the installed launcher (minimal install, offline)"docker rm -f "$name" > /dev/nulldiff --git a/PORTING.md b/PORTING.mdindex a84089105..3f8a82edc 100644--- a/PORTING.md+++ b/PORTING.md@@ -229,7 +229,8 @@ structure, so a disagreement stops the build instead of desynchronising a game.**E1**, the replay check (`Tools/replay-check.sh`, `replay-check.ps1` on Windows), plays a headless skirmish,plays its replay back and plays the seed again, and compares the three runs' world CRCs. The pinned results-are seed 0 at 1200 frames `0x43105931`, seed 0 at 12000 `0x240A0702` and seed 1 at 12000 `0x35F5CF4D`, since+are seed 0 at 2400 frames `0x67F86891`, seed 0 at 24000 `0x6404352D` and seed 1 at 24000 `0x90B6D230` (logic at 60 Hz,+measured on Windows x64; macOS and Linux not re-run since), sinceupstream 1e94f8c7 was merged; they are identical on macOS arm64, macOS x86_64 under Rosetta,Linux x86_64 (GCC), Windows x64 and Windows ARM64 (MSVC; ARM64 from a Windows ARM64 CI run on the integratedtree). Replays recorded on one platform play back on the others, and a two-host LAN match between macOS and@@ -278,7 +279,7 @@ headless game, the renderer funnel, a game that draws, and a game that ships.`ctest` in the build folder runs every suite: the engine's own (`test_gameengine`), the libraries', and theport's (the POSIX device, the shader generators, the file systems, input, audio, LAN, packaging). With-`-DZH_GAME_DATA=<folder>` the data tests run too: `replay_check` (E1, including two 12000-frame matches),+`-DZH_GAME_DATA=<folder>` the data tests run too: `replay_check` (E1, including two 24000-frame matches),`locomotor_check`, `net_check` (two copies of the game in one LAN match), the install andoverlay checks and more. Automated runs never make a sound or show a window.@@ -315,7 +316,7 @@ MSVC's own casts on Windows), `license-headers.py --check`, `fingerprint-manifes- **The portal's folder dialog itself is untested**: it needs a person to click it. The chooser logic behind itis tested headless, the Generals question included.- **An `_INTERNAL` build has not been built.** A Windows x64 Debug build compiles and passes ctest and E1 (seed 0- at 1200 frames, Release's pin) since 2026-09-29; before that it did not compile, and did not before the port+ at 2400 frames, Release's pin) since 2026-09-29; before that it did not compile, and did not before the porteither, for a different reason.- **Texture stage 2 is invisible to the Direct3D 11 backend** (suspected, by reading: `shader.cpp` sets itthrough raw `DX8CALL`). Upstream's code, not the port's; not fixed.diff --git a/windows-ci.ps1 b/windows-ci.ps1index 646fed6ab..21be82a39 100644--- a/windows-ci.ps1+++ b/windows-ci.ps1@@ -39,7 +39,7 @@the farm is made and again after the runs, and a difference fails the check. Symbolic links need anelevated session or Developer Mode.- -ExpectCrc "0@1200:0xE5C34BF3","1@12000:0xA631761E" fails the check when a run's recorded CRC is another+ -ExpectCrc "0@2400:0x67F86891","1@24000:0x90B6D230" fails the check when a run's recorded CRC is anotherone: that is the cross-platform comparison ("seed:crc" means that seed at -MaxFrames). Without it thecheck only asks that each replay plays back to the same world. Pin -ExpectCrc to the commit the numberswere made on: upstream gameplay data moves them.@@ -51,9 +51,9 @@one, with the same arguments, and exits with its status..EXAMPLE- .\windows-ci.ps1 -DataDir D:\ZeroHourData -Runs "0@1200","0@12000","1@12000" -ExpectCrc "0@1200:0xE5C34BF3","0@12000:0x0C1B85E4","1@12000:0xA631761E"+ .\windows-ci.ps1 -DataDir D:\ZeroHourData -Runs "0@2400","0@24000","1@24000" -ExpectCrc "0@2400:0x67F86891","0@24000:0x6404352D","1@24000:0x90B6D230"(the E1 pins PORTING.md gives; upstream gameplay data changes move them)- .\windows-ci.ps1 -DataDir D:\ZeroHourData -SkipBuild -Seeds 0 -MaxFrames 1200+ .\windows-ci.ps1 -DataDir D:\ZeroHourData -SkipBuild -Seeds 0 -MaxFrames 2400.\windows-ci.ps1 -Bundle D:\bundles\branch.bundle -Ref my-branch -DataDir D:\ZeroHourDataExit status: 0 when everything passed, 1 otherwise. The summary says which part failed.@@ -65,7 +65,7 @@ param([string] $Config = "Release",[switch] $SkipBuild,[string[]] $Seeds = @("0", "1"),- [int] $MaxFrames = 12000,+ [int] $MaxFrames = 24000,# "seed@frames" pairs, in place of -Seeds at -MaxFrames[string[]] $Runs = @(),# "seed:0xCRC" pairs the recorded CRCs must equal