Projects / Amagami

Amagami

A study of Amagami ebKore+, a PS2 visual novel with a scripting engine of its own, and a native Windows version of it that runs from your own copy of the game.

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

What already works

You can see and try this today.

How close it is to playable

147 / 174

Engine functions implemented

27 are still placeholders.

Soon

Scenes that run to the end

2,136 scenes to check. The test harness is ready; the first full run is next.

Soon

Script code exercised

The goal is 95%.

Soon

Screens that match the original

A set of 20 to 30 reference screens.

A playable Windows build exists

amagami.exe runs the game in a window on a PC, from your own disc data: logos, title, menu, name entry, the action map and the prologue, at 58 to 60 frames per second, with music, sound effects, voices with lip sync, a game pad, full screen and saved games. The whole thing is our own C++ code, checked against the original running on a console emulator.

40 Minstructions of the real boot where the C++ script machine and the reference agree, line for line
5 of 5checked frames identical to the reference, pixel for pixel
58 to 60frames per second in the window
7.8 Maudio samples decoded bit-exact against the reference decoder

Works today

  • The script machine, in C++, running the real boot
  • Screen objects, textures, text and characters
  • The action map, with its icons and clock
  • Music, sound effects and voices with lip sync
  • Keyboard and game pad, window and full screen
  • Saving and loading

Still missing

  • Every other screen checked against the original
  • A full route played from start to finish

Screenshots

A short loop of the opening: two characters fade in over a snowy grey sky, drawn by the C++ engine.
A short loop of the prologue: the sunset sky pans while a line of dialogue types out in the game's font.
The prologue day calendar and action prompt, drawn by the C++ engine.
A park at sunset with a line of dialogue, drawn by the C++ engine.
A city overlook at dusk with dialogue in the game's font.
The park at night with dialogue, drawn by the C++ engine.

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

2

Where it goes from here

The stages of the work, and what happened lately.

Progress

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.

3,440 of 319,400 bytes of own code matched
Started

Windows port

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

20 of 28 planned tasks done. Sound, voices, pad, full screen and saves work; the rest is testing every scene.
First minutes playable

Enhancements

High resolution and widescreen, translation support, loading mods from loose files, other platforms.

Planned. It waits for the port to be complete, so its tasks are not broken down yet.
Not started

Milestones

  1. A test for every sceneOne command runs any of the game's 2,136 scenes on its own and reports where it stops.
  2. The rebuild of the game's own code movesMatched code grows from 480 to over 1,600 bytes, with new tools to compare function by function.
  3. Checked frame by frame against the consoleThe engine's screens are lined up with the original by tick, down to the movement of the clouds.
  4. Voices, game pad, full screen and savesThe port speaks with lip sync, answers a controller and keeps your progress.
  5. The Windows executable plays the first minutesA Win32 window runs the real boot at 58 to 60 frames per second, from the logos to the first line of the prologue.
  6. Music and sound effects in the portStreamed music is bit-exact against the reference decoder, and effects play from the console's sound banks.
  7. Screen objects in C++, pixel-identicalFive frames of the real boot match the reference model pixel for pixel.
  8. The script machine in C++It agrees with the reference interpreter line for line over tens of millions of instructions.
  9. The program rebuilds byte for byteThe reassembly build reproduces the original executable.
  10. Compiler identifiedThe exact compiler and flags are known; the first functions match.
  11. Disc archives round-tripEvery archive on the disc unpacks and packs back identically.
  12. First line of the prologueThe reference model plays from boot to the first line, with the game's own font.
  13. Characters and pictures drawnChecked against the real game running in an emulator.

Devlog

A test for every scene

Any of the game's 2,136 scenes can now be run on its own, with automatic input, to see where it breaks.

3

Behind the scenes

Not needed to play. For the curious about how it is made.

How it works

  1. Game discOne disc image
  2. ArchivesPackages of files
  3. Scripts2,485 classes
  4. Virtual machineRuns the scriptsRuns natively in amagami.exe
  5. Screen and soundOur own rendererRuns natively in amagami.exe
Original program
Our C++
Rebuilt program

47% of the program is the game's own code, and that is what we rebuild.

  • Game code, first part149,112 bytes
  • Audio and video middleware177,680 bytes
  • Console libraries188,064 bytes
  • Game code, second part170,288 bytes
  1. FoundationsRebuild the program
    Disc formatsOpen every file
  2. Script languageRead, edit, recompile
  3. Engine, rebuiltMatches the original bytes
    Windows portRuns on a PCPlayable today
  4. EnhancementsHigh resolution, translations, mods

Behind the scenes

A side effort: rewriting the game's own code so it compiles to the original bytes, 1.1% done. It does not affect whether the game plays.

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

Rebuilt code over time

0120024003600Oct 120Oct 12136Oct 12136Oct 12416Oct 12480Oct 151656Oct 153440

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.