Another Mind
TechnologyNative C/C++ port (engine reimplementation)
Available forWindows, Linux, macOS
View official projectAbout the project
Another Mind es un videojuego de acción y aventura en 1998.
Official project information
Another Mind (アナザー・マインド)<br>Source Code Reconstruction Project
<!-- PROGRESS_START --> <table> <tr> <td width="340" align="center" valign="middle"> <img src="docs/pics/Another_Mind_Coverart.png" alt="Another Mind Cover Art" width="320"> </td> <td valign="middle"> <p> <strong>Engine</strong>: 22 / 204 functions (10.78%)<br> <img src="docs/pics/progress_engine.svg" alt="Engine Progress" width="260" height="16"> </p> <p> <strong>Kernel</strong>: 204 / 696 functions (29.31%)<br> <img src="docs/pics/progress_kernel.svg" alt="Kernel Progress" width="260" height="16"> </p> <p> <a href="docs/md_reference/report.md">See full stats</a> </p> </td> </tr> </table> <!-- PROGRESS_END -->A Source Code Reconstruction of Squaresoft's Live Action FMV visual novel Another Mind <br>for the PlayStation 1
Set in modern-day Japan, you wake up as a voice inside the head of 16-year-old high school student named Hitomi Hayama. Together, you are put into the center of a mystery involving a murder, suicide attempts, and an attempted bombing.
You communicate with Hitomi using the "Taiwa" dialogue system, constructing your own sentences out of context-sensitive keywords and phrases provided by the game, rather than simply choosing from predetermined options like a typical visual novel.
This game was never released outside Japan.
<sup>What is Source Code Reconstruction? <sup>[?]</sup></sup>
| <img src="docs/pics/ss1.png" width="320" alt="Screenshot 1"> | <img src="docs/pics/ss2.jpg" width="320" alt="Screenshot 2"> |
| <img src="docs/pics/ss3.jpg" width="320" alt="Screenshot 3"> | <img src="docs/pics/ss4.jpg" width="320" alt="Screenshot 4"> |
Getting Started
1. Clone the Repository
Clone the repository and its submodules recursively:
git clone --recursive git@github.com:halkuncode/anothermind-decomp.git
cd anothermind-decomp
If you previously cloned without --recursive, initialize submodules with:
git submodule update --init --recursive
2. Install System Dependencies
Debian / Ubuntu
sudo add-apt-repository ppa:longsleep/golang-backports
sudo apt update
sudo apt install golang-go ninja-build 7zip bchunk binutils-mipsel-linux-gnu gcc-mipsel-linux-gnu
# Optional: install doxygen to generate documentation with `make docs`
sudo apt install doxygen
Arch Linux
sudo pacman -S go ninja 7zip bchunk
yay -S mipsel-linux-gnu-binutils mipsel-linux-gnu-gcc
# Optional: install doxygen to generate documentation with `make docs`
sudo pacman -S doxygen
3. Set Up Python Virtual Environment
Install required Python dependencies (splat, etc.):
make requirements
4. Provide the Game Disc
Place your Japanese retail disc image files into the disk/ directory:
disk/Another Mind (Japan).bindisk/Another Mind (Japan).cue
5. Extract Disc Data and Assets
Extract the game files, executable (SLPS_016.55), and decompress assets:
make disk
This extracts disk/jp/ and automatically decompresses all game assets into assets/jp/progdata/ organized by logical groups.
6. Build and Verify
Compile the project and verify byte-matching checksums:
make check
7. Build Playable Disc Image
Rebuild a playable PlayStation ISO from the compiled executable and assets:
make cd
This compiles build/jp/another.exe, packs assets from assets/jp/progdata/ (recompressing any modified files), recalculates CDPOS.DAT, and outputs disk/another_build.iso.
Available Make Targets
| Target | Description |
|---|---|
make all | Default target. Extracts disc data and builds the executable (disk + build). |
make requirements | Creates the Python virtual environment (.venv) and installs requirements.txt. |
make disk | Converts BIN/CUE to ISO using bchunk, extracts disk/jp/ with 7z, and extracts assets into assets/jp/progdata/. |
make assets | Extracts and decompresses all game assets from disk/jp/PROGDATA/ into assets/jp/progdata/. |
make build | Ensures compiler toolchain is ready, generates ninja rules, and builds build/jp/another.exe. |
make check | Runs make build and validates SHA-1 checksums against the retail SLPS_016.55. |
make cd | Compiles the executable and builds a playable CD image (disk/another_build.iso) with updated CDPOS.DAT. |
make clean | Cleans up build artifacts, ninja logs, intermediate object files, and generated docs. |
make docs | Generates HTML documentation using Doxygen into docs/html/index.html (optional, requires doxygen). |
make rebuild | Runs a clean build (make clean followed by make build). |
make format | Formats all C codebase files using clang-format. |
make submit | Runs make clean, make build, make format, and stages config/, include/, and src/ with git add. |
make ctx FILE=<path> | Generates ctx.c context file (used for decomp.me or m2c) for a C file (e.g. make ctx FILE=src/main.c). |
Decompilation Workflow
1. Decompile a Function
Use mako.sh to disassemble and decompile a function placeholder from assembly into C:
./mako.sh dec <function_name>
This replaces INCLUDE_ASM in the corresponding C file with decompiled C code from m2c.
2. Generate Context for decomp.me
Generate a preprocessed context file (ctx.c) to import into decomp.me:
make ctx FILE=src/main.c
# Or invoke m2ctx directly:
python3 tools/m2ctx.py src/main.c
(The generated ctx.c is automatically ignored by Git).
3. Check Matching Progress
Verify your changes compile and match the target binary:
make check
4. Other Helper Commands
# Rank non-decompiled functions from easiest to hardest
./mako.sh rank
# Generate a progress report
./mako.sh report
5. Generate Documentation (Optional)
The codebase uses Doxygen-formatted comments. Doxygen is completely optional and not required to build or contribute, but if you have doxygen installed, you can generate local HTML documentation:
make docs
The documentation will be generated in docs/html/index.html (untracked by Git). The configuration file is tracked at docs/Doxyfile.
