Scene Kingdom Hearts coded

Kingdom Hearts coded, the lost Japanese phone game, is fully preserved after a $2,000 brute force

Sora exploring Destiny Islands in Kingdom Hearts coded, running at 15 FPS in openDoJa
Sora exploring Destiny Islands in Kingdom Hearts coded, running at 15 FPS in openDoJa

The original Kingdom Hearts coded, the episodic phone game that Square Enix released only in Japan, can be played again. Preservationist Yuvi announced on 28 November that the game is now preserved in full, after months of work and more than 2,000 US dollars spent renting graphics cards to crack its encryption. The whole process is told in a long write-up on Yuvi's Medium page, and a gameplay video shows it running.

Coded came out in eight monthly episodes between June 2009 and January 2010 for NTT DoCoMo handsets, through the Kingdom Hearts Mobile service. When the service closed in April 2013, the episodes went with it. Most players know the story from the Nintendo DS remake, Kingdom Hearts Re:coded, but the keitai original plays differently and had never been playable outside a working phone.

Sora running down a stone path past Heartless and data blocks in a Kingdom Hearts coded action stage
Sora running down a stone path past Heartless and data blocks in a Kingdom Hearts coded action stage

Why it took so long

The program itself was recovered years ago from a donated phone, but on its own it is useless: the game keeps almost everything on the memory card, in 29 files locked with the C2 cipher. The key is tied to a hidden area of the card that ordinary readers can't see, so a plain copy of the files was not enough. Yuvi's only option was brute force, searching a space of about 72 quadrillion possible keys for every single file.

The breakthrough was a small index text file that lists what sits inside each data archive. Clues from a self-contained demo episode helped Yuvi recognise the right key for it, and the index then made it possible to check guesses against the compressed data inside the nine world archives. Running on around 190 GPUs, mostly RTX 4090 and 5090 cards, at over 21 trillion keys a second, those nine files took about eight hours. The 19 movie files, which turned out to be MP4 videos in a custom wrapper, needed roughly seven more.

The world select screen of Kingdom Hearts coded with Destiny Islands highlighted
The world select screen of Kingdom Hearts coded with Destiny Islands highlighted

Online features and emulation

Coded was tied to the Kingdom Hearts Mobile minigames and the Avatar Kingdom service, where players earned and spent money. Yuvi finished a replacement server for all of it, so the connected features work again. The game runs in openDoJa, an open-source reimplementation of the DoJa runtime behind i-mode Java games; Yuvi tuned it until coded held its native 15 frames per second, where the old official SDK emulator managed two or three.

An English translation is coming

The game is entirely in Japanese for now. Aid1043, who earlier translated the demo episode, is working with professional translators on a full English patch, and warns that coded is a much bigger game than it looks, so it will take a while.

Yuvi's Medium story is the place to follow the project. As always, playing it needs your own copy of the game data.

Comments 0

Add a comment

Log in with Discord to use your Discord name and avatar, vote, and get notified of replies. Or comment without an account:

Be kind and stay on topic. No links to ROMs, ISOs or other game files. Comments without an account are read before they appear. We publish only the name, avatar and text shown here (privacy).

No comments yet. Be the first.