Projects / open-amagami

open-amagami

A study of Amagami ebKore+, a PS2 visual novel with a scripting engine of its own. The project documents how it works, builds tools for its data and scripts, and writes new code that does the same job on modern machines.

Status
Active
Started
October 2026
Languages
C++, Python
Source
Not published yet
0.15%

of the game's own code (480 of 319,400 bytes) already rebuilds to the original bytes. The compiler work is done; from here it goes function by function.

Code map

Each square is 256 bytes of the game's program. Coloured squares already rebuild to the original bytes.

Rebuilt, matches the originalStill to rebuildClosed-source libraries, left as they are

Real data from the project's own progress tool. Hover a square to see its address.

The first night

Bytes of the game's own code rebuilt to match, at each step of the work on October 12. Real history from the repository.

020040060022:58023:0413623:0713623:1041623:16480

Times are commit times in UTC.

Progress

Five stages, in the order they are tackled.

Foundations

A build that recreates the game's program byte for byte.

Exit criterion met
Done

Disc formats

Open every file on the disc and pack it back identically.

6 of 11 planned tasks done. Every archive and all 2,848 images round-trip.
Follow-ups

The script language

Read, edit and recompile the scenario scripts.

7 of 12 planned tasks done. Every script round-trips; 99.7% of methods read as source.
In progress

The engine, rebuilt

Rewrite the game's own code so it compiles to the original bytes.

480 of 319,400 bytes of own code matched
Started

Windows port

One full route playable on a PC, with no emulator.

Waiting on the stages above
Not started

Milestones

  1. The program rebuilds byte for byteThe reassembly build reproduces the original executable.
  2. Compiler identifiedThe exact compiler and flags are known; the first functions match.
  3. Disc archives round-tripEvery archive on the disc unpacks and packs back identically.
  4. First line of the prologueThe reference model plays from boot to the first line, with the game's own font.
  5. Characters and pictures drawnChecked against the real game running in an emulator.

How it works

Three pictures of what the project does. All drawn by us.

From the disc to the screenThe game is a virtual machine. Files come off the disc, scripts are read from the archives, the machine runs them, and our renderer draws the result.Game discOne disc imageArchivesPackages of filesScripts2,485 classesVirtual machineRuns the scriptsScreen and soundOur own rendererextractdecompileinterpretrenderThese steps unpack and repack back to the identical bytes
The game is a virtual machine. We take the files apart, read its scripts and run them with our own code.
What matching meansOur source is compiled with the same compiler and flags as the original. If the bytes are identical, the function matches.Original programOur C++Rebuilt programcomparecompileIdentical bytes means the function matches
"Matching" is the strict test: we write the code, build it with the same compiler and flags, and the result must equal the original byte for byte.
How much of the program is the game's own codeAbout 47 percent of the executable is the game's own code. The rest is closed-source middleware and system libraries that are left as they are.Game code (first part)149,112 bytesAudio and video middleware177,680 bytesConsole libraries188,064 bytesGame code (second part)170,288 bytes47% of the program is the game's own code, and that is what we rebuildHatched parts are closed-source libraries, left as they are.
Roughly half of the executable is code we do not touch. The rest is the game's own, which is where the work is.

Screenshots

Output of our own engine, not of the original game.

Title screen as drawn by the reference model.
Title screen
A frame of the opening sequence as drawn by the reference model.
Opening sequence
A line of dialogue shown with the game's own font by the reference model.
Dialogue, with the game's own font
A menu screen as drawn by the reference model.
A menu
The map screen as drawn by the reference model.
The map

Captures come from the game running under our own tools. This site is not affiliated with the game's makers, and you need your own copy of the game to use anything here.

Original and rebuilt

Drag to compare. These are placeholder panels until real captures are added.

open-amagami engine
Original game

Devlog

Scope

Reverse engineering and preservation: understanding how the game works so it can be studied, translated and kept playable. The tools for its script language are useful to anyone who wants to read it.

  • Not affiliated with the game’s makers or publishers.
  • No game files are distributed here.
  • You need your own copy of the disc to use any of it.