A work-in-progress byte-matching decompilation and reverse engineering project for The Sims 3 on the Nintendo DS.
The primary goal of this project is to analyze, document, and preserve the inner mechanics of the game, enabling future modding support, native recompilation, and platform ports.
The Sims 3 is a registered trademark of Electronic Arts Inc.
This repository does not distribute any copyrighted game assets, proprietary code, binary dumps, or ROM files. To use this project, you must provide a legally obtained copy of the game. All assets are extracted locally on the user's machine to comply with copyright laws.
This project is created strictly for:
- Digital preservation
- Interoperability research
- Educational and reverse engineering purposes
To participate in the research or build the project, the following environment is recommended:
- Ghidra (v12.1+ configured for
ARM:LE:32:v5t) - melonDS (for real-time RAM debugging and emulation)
- devkitARM (GCC toolchain for compiling Nintendo DS binaries)
- Visual Studio Code (for C/ASM development)
- Git (for version control)
ts3ds_decomp/
├── asm/ # Undecompiled ARM assembly code (.s files)
├── src/ # Reconstructed C source code (.c files)
├── include/ # Hardware definitions, game structures, and headers (.h files)
├── docs/ # Technical notes, file format specifications (.gbf, etc.)
├── research/ # Ghidra analysis databases and reverse engineering logs
├── tools/ # Asset extraction, checksum verification, and build utilities
└── build/ # Temporary compilation output (ignored by Git)
Unlike standard homebrew, a modern decompilation project isolates the logic from the data. The workflow follows a strict security pipeline:
[ User's Legal ROM ] ──► [ Extraction Scripts ] ──► [ Local Unpacked Assets ]
│ (Never committed)
[ Reconstructed C ] ──► [ devkitARM Compiler ] ──► [ Rebuilt Target Binary ]
│
▼
[ SHA-1 Verification ] ◄────────────────────────────────────────┘
- extract_assets.py: Unpacks the game filesystem, splitting components like arm9.bin and internal asset packs.
- verify_checksum.py: Validates the compiled binary against the original SHA-1 hash to ensure 100% precision.
- Environment Setup & Toolchain Definition
- ROM File System Mapping & Asset Extraction Tools
- Core Engine Initialization (main.c / Loop Entry Analysis)
- Subsystem Decompilation (Graphics, Audio, Save State Management)
- Entity & Sim Logic Simulation Matching
- Modern Platform Recompilation Target
Achieving a matching decompilation means that the C code written in src/ must compile into an identical sequence of bytes as the original 2010 retail cartridge. This accuracy is verified during the build process by comparing cryptographic signatures (MD5/SHA-1) of the resulting binary segments.
# Nintendo DS ROMs and Saves
*.nds
*.sav
*.bin
# Local Asset Dumps
assets/
dump/
baserom/
*.gbf
# Build and Object Outputs
build/
out/
bin/
*.o
*.obj
*.elf
# Ghidra Project Databases
*.gpr
*.rep
*.gpr.lock
# IDE and OS Cache
.vscode/
.DS_Store
Thumbs.db
__pycache__/
*.pyc
*.log
tmp/
Some documentation, repository structures, and descriptions within this research may be assisted by AI models (such as Google Gemini). All technical data, structural validation, and decompilation logic are strictly audited and managed by the repository owner.
Contributions regarding function mapping, documentation of data structures, and ASM translation are highly appreciated. Please ensure no proprietary assets are ever included in your Pull Requests.