Repository navigation
Stronghold Crusader 1.2-release
Stronghold HD, Stronghold Crusader HD and Stronghold Crusader Extreme HD in one Android ARM64 APK.
This release adds native rendering and audio paths, reduces audio latency, shares equivalent engine code between editions, and improves the launcher, diagnostics and touch controls.
Bring your own PC game files. Original executables and game assets are not included in the APK.
Audio
- Replace the DirectSound compatibility path with a native Miles output driver. Music, effects, voices and Bink videos continue to use the original game mixer.
- Use a priority AAudio callback with a bounded output queue. The callback neither waits for a mutex nor executes guest game code.
- Reduce the normal pre-mixed Miles reserve from approximately 323 ms to approximately 80 ms, preserving the original eight guest fragments and explicitly configured non-default lookahead values.
- Wait for output space before pulling the next Miles block, and account for the device burst size. Increase the device buffer by one burst when an xrun occurs.
- Recover from stream errors or lost callbacks while preserving PCM that has not yet reached the device. Fix false stall detection caused by concurrent timestamp updates, including a timestamp ahead of the observer.
- Freeze Miles clocks precisely during pause and drain the output queues on exit to preserve the audio tail.
- Add a per-edition Compatible audio output setting for BOOX and other devices with interrupted sound. It is off by default, takes effect after a full game restart and may increase latency.
- Implement the compatible mode with OpenSL ES, four 10 ms buffers at 48 kHz and an approximately 100 ms Miles reserve. Failed buffer submissions do not advance counters; recovery attempts are bounded, and shutdown waits for the queue and hardware tail.
- Add native batch and NEON paths for Miles mixing, copying and resampling while preserving PCM8/PCM16, mono/stereo formats and original scheduling boundaries.
- Expand telemetry for submitted and dropped frames, errors, stream recovery, xruns, callback silence and Miles underruns.
Rendering and performance
- Replace the DirectDraw screen layer with native game-buffer handling and direct OpenGL ES presentation. Preserve RGB565, pitch, clipping, transparency, overlapping copies, locks and surface ownership.
- Keep interface layers, text and touch coordinates aligned with the same coverage masks and geometry.
- Batch TGX/GM1 rows and commands, half-scale and palette sprites, opaque runs, RGB565 copies and fills, and HUD coverage updates.
- Avoid unnecessary blending calculations for fully opaque Stronghold HD interface regions.
- Allow the guest Miles timer to run during long GLES driver calls, including shader compilation/linking, texture allocation/upload and drawing, reducing audio interruptions during driver work.
- Optimize Bink RGB16 conversion while retaining the original video playback logic.
- Process the first three directions of each route-search group in a native loop in Crusader HD and Extreme; preserve the original scheduler boundary for the fourth direction.
Performance gains depend on the device, driver, map, zoom and settings; this release does not guarantee a fixed frame rate.
Maps, saves and shared ARM64 code
- Move PKWARE DCL compression and decompression for map/save blocks into native code, preserving headers, CRC32 and the existing format. Use system zlib for CRC32.
- Include source and license notices for blast and StormLib PKLIB.
- Share matching engine functions, Miles, Bink and host modules through
libstronghold_common.so, reducing duplicate code across the three editions. - Support equivalent bodies shared by all three editions or by a pair. Each edition retains its own guest state and original addresses for diagnostics.
- Compare code in each edition's compilation context before sharing it; keep differing host modules separate.
- Resolve PE host exports through both the edition and common libraries. Verify link records and hashes before packaging to reject mismatched library sets.
Touch controls and recent apps
- Fix touch dispatch for digging and filling moats when the original game stores the operation in tile flags rather than the cursor operation number.
- Allow a single assassin to receive the original movement order onto a raised enemy fortification tile despite the blocked cursor, enabling touch commands to climb walls and occupy gatehouses.
- Position the zoom readout above the radar tabs so it does not obstruct their selection.
- Align Android activity/task handling to avoid duplicate recent-app cards while retaining separate game processes.
Launcher, imports and localization
- Verify ZIP archives whose filenames contain an MD5 checksum before offering extraction. Show the name, progress, processed size and Cancel action; stop on mismatch.
- Reuse the verified file descriptor for extraction.
- Remove
md5_<32 hex>and standalone 32-digit checksum tokens from extraction-folder names. - Use consistent decimal megabytes and rounding in archive verification and extraction dialogs.
- Use complete translated messages and language-appropriate quotation marks in copy/extraction prompts; correct awkward wording.
- Show game settings, mods, renderer information, launch options and UCP after game files have been found. Keep file selection, file access, language and diagnostics available before setup.
- Display the measured OpenGL ES version and GPU in the renderer card and explain how the 2D game is presented.
- Add system game-mode guidance for HyperOS, One UI, realme UI/ColorOS/OxygenOS, vivo and HONOR, with a Don't show again checkbox and a launcher setting.
- Translate new UI into all 11 supported languages: English, Russian, Ukrainian, German, Polish, French, Spanish, Brazilian Portuguese, Japanese and Simplified Chinese.
FPS overlay
- Add an FPS switch to the launch card, off on fresh installations; the first enable shows only FPS.
- Provide separate controls for the frame-time graph, frame-time range and system-information rows.
- Count frames accepted by the screen surface through
eglSwapBuffers. Do not collect frame history while the overlay is off. - Integrate the shared launcher components for FPS, system information, archive MD5 checks and game-mode guidance with this three-edition launcher.
Crash and renderer diagnostics
- Enable crash monitoring by default for all editions, with log rotation and early native-signal recording.
- Save
last-crash.txtin the edition's userdata directory and make the report copyable from Diagnostics. Reports stay on the device. - Include the game log, available Java/native details, termination cause and whether the first frame was presented.
- Distinguish Java failures, native signals, ANRs, low memory, exit codes and system kills. Use available Android exit history on Android 11+; on Android 8-10, flag a recent critical memory warning as a suspected low-memory kill.
- Explain recognized causes once after returning to the launcher; retain unknown causes in Diagnostics without an extra dialog.
- Show dedicated details and a copy-report action for GLES startup failure and early context loss. Record later context loss as a normal crash with a renderer explanation.
- Stop the game when its renderer fails. OpenGL ES is the only available renderer, so the launcher explains that no alternatives are available and does not switch automatically.
Compatibility and build validation
- Lower the minimum Android version from 9 to 8.0 / API 26. Retain ARM64, OpenGL ES 3.0 and target SDK 28.
- Guard newer Android APIs, load AAudio
setUsagedynamically and build the GOG reader without aposix_spawnprequirement. - Add an audit of native imports and Java API use against Android 8.0.
- Expand checks for audio faults, pause/recovery/drain, PCM preservation, map codecs, touch orders, render buffers, the shared launcher and recent-app behavior.
- Verify APK signatures, ZIP CRCs, XZ round trips, native payloads and 16 KiB ELF/ZIP alignment.
- Update build instructions, architecture documentation, third-party notices and exclusions for private/local files.
Validation and known limits
- 42 Python tests passed. The API 26 audit checked 99 Java classes with no issues.
- Relinked all three editions using current host/common objects and unchanged previously validated guest objects. Audited source/header/compiler/flag/object fingerprints for 36/36/34 host units.
- Verified APK v2/v3 signatures, ZIP CRCs, six native payloads, XZ round trips and 16 KiB alignment.
- Earlier device checks of the latest audio changes covered all three games on HA22AHP1 and BOOX, matches, background/resume, output queues and normal exit. BOOX also passed a continuous digital-tone check under camera load; the diagnostic tone is not included in this APK.
- Queue sizes are not an acoustic speaker-latency measurement. Microphone-based latency, Bluetooth and physical audio-route switching were not tested.
- Android 8.0/8.1 API compatibility was audited, but no physical API 26-27 device was available. Full campaigns, every map and maximum Extreme army sizes have not been exhaustively tested.
- The exact final APK was verified offline; it was not installed during the final amend pass.
Download
- Version: 1.2-release, version code 34.
- APK:
stronghold-crusader-1.2-release-b45b9638.apk(42,446,445 bytes). - SHA-256:
b45b9638a02779f6d60c80b664d87887c37d017b0b271d5060e03549eacde034. - Requirements: Android 8.0 or later, ARM64 and OpenGL ES 3.0.