#!/usr/bin/env python3 | |
# | |
# Deobfuscate Another World DOS executable. | |
# | |
# The 20kb executable of the game can be divided in three main sections. | |
# | |
# 1. From offset 0x20, LZ91 packed data (https://bellard.org/lzexe.html). Each byte is xor'ed with the previous byte. | |
# 2. Some relocation code that jumps to the LZ91 decompression routine. Each byte of the x86 bytecode is off by 0xD. | |
# 3. The start code that patches the relocation code. | |
# |
The game bytecode in auto00.prc
checks for a subset of all shapes from the card shipped with the game.
[0002] (09) localvars[1] = random(104)
[0006] (0F) SET object[236].costume, localvars[1]
The sheet below contains the 104 shapes that can be requested on game start.
Being released in the early 90s, the developers from Delphine Software protected the game code to prevent piracy.
On start (and later in the game !), the player would have to lookup some symbols in the manual provided with the game.
This document tries to list the game engine routines related to the game protection.
The addresses and routines are based on the disassembly of the French DOS version executable.
#!/usr/bin/env python | |
# | |
# Compress .ISO to .CSO (v1), similar to https://sourceforge.net/projects/ciso/ | |
# | |
# - compression level is set to 9 (maximum) | |
# - each block is compressed using the 3 zlib strategies (default, filtered, huffman), the smallest is kept | |
# | |
from __future__ import print_function |
Heart of Darkness from Amazing Studio is known for its long development time. When released in 1998, the game was available on both Windows and PlayStation platforms.
The Windows version uses a 256 colors palette for its graphics. This is likely inherited from its early development years when DOS and VGA cards were the principal gaming configuration on PC.
The PlayStation version was released a few months after the Windows version. Let’s figure out the native graphics file format used.