No project description provided
Project description
Crimsonland 1.9.93 decompilation + rewrite
This repository is a reverse engineering + high‑fidelity reimplementation of Crimsonland 1.9.93 (2003).
- Target build:
v1.9.93(GOG "Crimsonland Classic") — see docs/provenance.md for exact hashes. - Rewrite: a runnable reference implementation in Python + raylib under
src/. - Analysis: decompiles, name/type maps, and runtime evidence under
analysis/. - Docs: long-form notes and parity tracking under
docs/(start at docs/index.md).
The north star is behavioral parity with the original Windows build: timings, RNG, UI/layout quirks, asset decoding, and gameplay rules should match as closely as practical.
Read the full story of how this project came together: reverse engineering workflow, custom asset formats, AI-assisted decompilation, and game preservation philosophy.
Quick start
Install uv package manager.
Run the latest packaged build
If you just want to play the rewrite:
uvx crimsonland@latest
Run from a checkout
gh repo clone banteg/crimson
cd crimson
uv run crimson
Keep runtime files local to the repo
By default, runtime files (e.g. crimson.cfg, game.cfg, highscores, logs, downloaded PAQs) live in your per-user data dir.
To keep everything under this checkout:
export CRIMSON_RUNTIME_DIR="$PWD/artifacts/runtime"
mkdir -p artifacts/runtime
uv run crimson
Assets + binaries
There are two separate “inputs” to this repo:
- Runtime assets for the rewrite (PAQ archives)
- Original Windows binaries for reverse engineering (
crimsonland.exe,grim.dll, …)
We keep them out of git and expect a local layout like:
game_bins/
crimsonland/
1.9.93-gog/
crimsonland.exe
grim.dll
crimson.paq
music.paq
sfx.paq
artifacts/
runtime/ # optional: where you run the rewrite (cfg/status/paqs)
assets/ # optional: extracted PAQs for inspection/tools
Running the rewrite
The rewrite loads the assets from original archives:
crimson.paqmusic.paqsfx.paq
Extracted assets
For inspection/diffs/tools, you can extract PAQs into a filesystem tree:
uv run crimson extract crimsonland_1.9.93 artifacts/assets
Same as the original, many loaders can work from either:
- PAQ-backed assets (preferred when available), or
- the extracted filesystem layout under
artifacts/assets/.
CLI cheat sheet
Everything is exposed via the crimson CLI (alias: crimsonland):
uv run crimson # run the game (default command)
uv run crimson view ui # debug views / sandboxes
uv run crimson quests 1.1 # print quest spawn script
uv run crimson config # inspect crimson.cfg
uv run crimson extract <game_dir> artifacts/assets
Useful flags:
--base-dir PATH/CRIMSON_RUNTIME_DIR=...— where saves/config/logs live--assets-dir PATH— where.paqarchives (or extracted assets) are loaded from--seed N— deterministic runs for parity testing--demo— enable shareware/demo paths--no-intro— skip logos/intro music
Docs
Docs are authored in docs/ and built as a static site at https://crimson.banteg.xyz/
For development, it's useful to have a live local build:
uv tool install zensical
zensical serve
Development
Tests
uv run pytest
Lint / checks
uv run lint-imports
uv run python scripts/check_asset_loader_usage.py
justfile shortcuts
If you have just installed:
just --list
just test
just docs-build
just ghidra-exe
just ghidra-grim
Reverse engineering workflow
High level:
- Static analysis is the source of truth.
- Update names/types in analysis/ghidra/maps/.
- Treat analysis/ghidra/raw/ as generated output (regenerate; do not hand-edit).
- Runtime tooling (Frida / WinDbg) validates ambiguous behavior and captures ground truth.
- Evidence summaries live under analysis/frida/.
Contributing notes
- Keep changes small and reviewable (one subsystem/feature at a time).
- Prefer measured parity (captures/logs/deterministic tests) over “looks right”.
- When porting float constants from decompilation, prefer the intended value
(e.g.
0.6instead of0.6000000238418579when it’s clearly a float32 artifact).
Legal
This project is an independent reverse engineering and reimplementation effort for preservation, research, and compatibility.
No original assets or binaries are included. Use your own legally obtained copy.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file crimsonland-0.1.0.dev18.tar.gz.
File metadata
- Download URL: crimsonland-0.1.0.dev18.tar.gz
- Upload date:
- Size: 346.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5c32adb47590a8f0d66df13c87c5ab5756e2478a12f19e5328269fcf010a9d57
|
|
| MD5 |
4226c2d9999e13d66252eb761cd3b03b
|
|
| BLAKE2b-256 |
16e0744857795ced20cbf3d558761a5feb6ba6d0d01fbf0152b21d2230781e8f
|
Provenance
The following attestation bundles were made for crimsonland-0.1.0.dev18.tar.gz:
Publisher:
release.yml on banteg/crimson
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
crimsonland-0.1.0.dev18.tar.gz -
Subject digest:
5c32adb47590a8f0d66df13c87c5ab5756e2478a12f19e5328269fcf010a9d57 - Sigstore transparency entry: 912970094
- Sigstore integration time:
-
Permalink:
banteg/crimson@36f69542c71305e8238a247aa9462230ef377466 -
Branch / Tag:
refs/tags/v0.1.0.dev18 - Owner: https://github.com/banteg
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@36f69542c71305e8238a247aa9462230ef377466 -
Trigger Event:
push
-
Statement type:
File details
Details for the file crimsonland-0.1.0.dev18-py3-none-any.whl.
File metadata
- Download URL: crimsonland-0.1.0.dev18-py3-none-any.whl
- Upload date:
- Size: 437.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ad6b738d35aca2aeb61c08761b1c0fdb1447494424aa331e02ad96b1dfdd8784
|
|
| MD5 |
129a8de0aeb4071c57f7a0f39cce9842
|
|
| BLAKE2b-256 |
793383d0798d05c8e4429ad61f57c6285cb18ac39b9e0e714141dd4e72b8d7d3
|
Provenance
The following attestation bundles were made for crimsonland-0.1.0.dev18-py3-none-any.whl:
Publisher:
release.yml on banteg/crimson
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
crimsonland-0.1.0.dev18-py3-none-any.whl -
Subject digest:
ad6b738d35aca2aeb61c08761b1c0fdb1447494424aa331e02ad96b1dfdd8784 - Sigstore transparency entry: 912970154
- Sigstore integration time:
-
Permalink:
banteg/crimson@36f69542c71305e8238a247aa9462230ef377466 -
Branch / Tag:
refs/tags/v0.1.0.dev18 - Owner: https://github.com/banteg
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@36f69542c71305e8238a247aa9462230ef377466 -
Trigger Event:
push
-
Statement type: