Reverse engineering - ateska/warlords GitHub Wiki
Reverse engineering of the Warlords
Tools
Spice86
A PC emulator for real mode reverse engineering.
The Warlords game launches into a first screen and then the tool crashes.
This was however good enough for reverse engineering of how .PCK
images files are loaded and decompressed.
I used the "Debug" mode to step thru the game code.
Breakpoints on various conditions are quite useful, especially with --VerboseLogs
switch.
I had to push one fix to Spice86: https://github.com/OpenRakis/Spice86/pull/1177
Installation:
The tool must be cloned locally and compiled by dotnet
(you must install one):
dotnet build
Execution:
Spice86/src/Spice86/bin/Debug/net8.0/Spice86 \
--Debug \
--AudioEngine Dummy \
--InitializeDOS \
--VerboseLogs \
-e /Applications/Warlords.app/Contents/Resources/game/WARLORDS.EXE
dosbox-x
DOSBox-X is an open-source DOS emulator for running DOS applications and games.
The Warlords game runs nicely.
Execution:
Run dosbox-x
from the terminal!
It enables the Debugger - I discovered this quite late in the process.
I used it to dump the palette from VGA.
/Applications/dosbox-x.app/Contents/MacOS/dosbox-x
Then in the DOS:
MOUNT C /Applications/Warlords.app/Contents/Resources/game/
C:
WARLORDS.EXE
To start debugging, use Menu to "Start DOSBox-X Debugger" (must be launched from the terminal).