Reverse Engineering the Classic Dune Game
๐ GitHub Page
- About the Project
- Project Goals
- Technology - Spice86
- Status
- Prerequisites
- Build & Run
- Screenshots
- Contributing
- Resources
- License
Cryogenic is an ambitious reverse engineering project dedicated to understanding and modernizing Cryo's Dune (CD Version, 1992) - one of the most atmospheric adventure games of the early 90s.
Using the powerful Spice86 reverse engineering toolkit, we're gradually rewriting the game from x86 assembly into readable, maintainable C# code. The game is fully playable right now, complete with sound and music support.
As we continue to replace assembly routines with C# implementations, the codebase becomes more accessible to modern developers while preserving the exact behavior of the original DOS executable.
SHA256 signature of supported DNCDPRG.EXE:
5f30aeb84d67cf2e053a83c09c2890f010f2e25ee877ebec58ea15c5b30cfff9
๐ Understand the Game - Deep dive into the inner workings of Dune's game engine, uncovering how Cryo implemented dialogue systems, resource management, and real-time strategy elements in the DOS era.
๐ Incremental Rewriting - Gradually replace x86 assembly routines with clean, documented C# code while maintaining 100% behavioral compatibility with the original game.
๐ Document Everything - Create comprehensive documentation of game mechanics, data structures, and algorithms to preserve this knowledge for future developers and gaming historians.
๐ฎ Preserve Gaming History - Ensure this classic adventure game remains playable on modern systems and provide a foundation for potential future enhancements and ports.
๐ ๏ธ Educational Resource - Serve as a reference implementation for reverse engineering techniques and demonstrate the power of hybrid emulation approaches.
๐ Cross-Platform Support - Leverage .NET 8's cross-platform capabilities to run the game natively on Windows, macOS, and Linux without emulation layers.
Spice86 is a revolutionary reverse engineering toolkit and PC emulator specifically designed for 16-bit real mode x86 programs. Unlike traditional emulators that simply run old software, Spice86 enables you to gradually modernize legacy DOS applications by replacing assembly code with high-level C# implementations.
Built on .NET 8, Spice86 provides a unique hybrid execution model where the original DOS executable runs alongside your C# overrides, allowing for incremental reverse engineering and testing.
- ๐ Hybrid Execution - Run original DOS binaries while selectively replacing functions with C# implementations. Test your reverse-engineered code against the real thing in real-time.
- ๐ฌ Runtime Analysis - Collect memory dumps, execution traces, and runtime data while the program runs.
- ๐ฏ Ghidra Integration - Import runtime data into Ghidra for static analysis.
- ๐ Advanced Debugging - Built-in debugger with GDB remote protocol support.
- ๐ฎ Hardware Emulation - Complete support for VGA/EGA/CGA graphics, PC Speaker, AdLib, SoundBlaster, keyboard, and mouse.
- ๐ Cross-Platform - Built on .NET 8 for Windows, macOS, and Linux.
- Override Registration - Cryogenic registers C# function overrides in
DuneCdOverrideSupplierthat replace specific assembly routines at runtime. - Segment Management - Memory segments (CS1=0x1000 for main code, CS2/3/4 for drivers, CS5=0xF000 for BIOS) are carefully managed.
- Hybrid Execution - When DNCDPRG.EXE calls an overridden function, Spice86 redirects execution to the C# implementation.
- State Synchronization - Global game state accessors like
globalsOnDsensure C# code and assembly share the same memory.
Thanks to the hybrid ASM / .NET mode provided by Spice86, the game is fully playable, including sound and music.
The goal is to have more and more logic written in human-readable C#, making the codebase accessible to modern developers while preserving the classic gameplay experience.
Before you begin, ensure you have:
- .NET 8 SDK - Required to build and run the project
- Dune CD Version 3.7 - You must obtain
DNCDPRG.EXEandDUNE.DATseparately (copyrighted material)
You can verify your executable with PowerShell:
Get-FileHash DNCDPRG.EXE -Algorithm SHA256Or on Linux/Mac:
sha256sum DNCDPRG.EXEClone the repository and build the project:
git clone https://github.com/OpenRakis/Cryogenic
cd Cryogenic/src
dotnet buildEnsure that DUNE.DAT and DNCDPRG.EXE are in the same folder, then run:
cd Cryogenic/src
dotnet run --Exe C:/path/to/dunecd/DNCDPRG.EXE --UseCodeOverride true -p 4096--UseCodeOverride true or your C# code won't execute!
For the full experience with AdLib music and PCM sound effects:
cd Cryogenic/src/Cryogenic
dotnet publish
bin/Release/net8.0/publish/Cryogenic --Exe C:/path/to/dunecd/DNCDPRG.EXE --UseCodeOverride true -p 4096 -a "ADL220 SBP2227"We welcome contributions from developers of all skill levels! Whether you're experienced in reverse engineering or just getting started, there's a place for you in this project.
- ๐ Reverse Engineering - Analyze assembly code, identify functions, and create C# implementations
- ๐ Documentation - Help document game mechanics, data structures, and code functionality
- ๐งช Testing - Play the game, find bugs, and verify that C# overrides behave identically to the original
- ๐ ๏ธ Code Quality - Improve existing C# code, refactor for clarity, and add helpful comments
- Fork the repository on GitHub
- Clone your fork locally
- Read the CONTRIBUTING.md file for detailed guidelines
- Pick an issue labeled
good first issueorhelp wanted - Create a feature branch for your work
- Make your changes and test thoroughly
- Submit a pull request
For detailed contribution guidelines, architecture notes, and coding conventions, please see our CONTRIBUTING.md file.
- ๐ Project Website - Comprehensive documentation
- ๐ GitHub Repository - Source code, issues, and releases
- ๐ถ๏ธ Spice86 Project - The reverse engineering toolkit powering Cryogenic
- ๐ฆ Releases - Download the latest version
- ๐ Dune (1992) - Wikipedia - Learn about the original game
Cryogenic is open-source software licensed under the Apache License 2.0.
ยฉ 2021-2024 Kevin Ferrare and contributors.
Dune is ยฉ Cryo Interactive Entertainment. This project is not affiliated with or endorsed by Cryo Interactive Entertainment or any rights holders.



