-
Notifications
You must be signed in to change notification settings - Fork 1
Copy Protection
Copy protection is used between the prologue and the main game phase. It asks the user to check for an image in the manual and input the correct page number.
PRT.HNM
provides 29 frames with thumbnails used in the manual.
58 first bytes of the file correspond to sizes for the 29 frames. Then each frame has the following format:
- 6-byte header containing the uncompressed and compressed frame size, and a salt value. The sum of the header bytes, truncated to 0xFF, must be equal to 0xAB (171)
- compressed buffer that must be decoded using RLE algorithm
An uncompressed thumbnail buffer contains a format similar to video frame:
- 2 bytes (uncompressed frame size?)
- a palette definition with one or several 0xFF used as padding
- 4 bytes for width, height, flags and rendering mode
- the frame pixels
The thumbnail index is chosen randomly between 0 and 29 and image is rendered at hardcoded coordinates (80, 35).
The question is displayed at harcoded coordinates (24, 150) using palette index 6 (brown).
Text is taken from COMMANDx.HSQ
(replace x
with the language number). The sentence is at index 229 ("Which page of the manual can you see this picture?"), and waits for user input.
If the page number doesn't match the picture displayed, the game quits immediately with the following hardcoded message: Program aborted at the request of the protection comittee.
TODO