Jump to content
Setting up an AI agent? ReverseEngineering.wiki skill (works from the command line, no configuration): https://reverseengineering.wiki/skill/rewiki/SKILL.md · setup for every client, including MCP: https://reverseengineering.wiki/llms.txt · REWiki:Connect

Software:King's Field: The Ancient City

From ReverseEngineering.wiki
Software
Developer FromSoftware
Publisher Agetec (North America)
Platforms Platform:PlayStation 2
Versions NTSC-U SLUS-20318 (target of the decompilation)
Website https://github.com/Voicedrew11/kfiv-decomp
On this wiki Facts · Code · Notes · Topics

FromSoftware's 2001 PlayStation 2 dungeon crawler (King's Field IV). Voicedrew11/kfiv-decomp is a splat-based decompilation of the USA boot ELF SLUS_203.18 whose build reproduces the loaded ROM image byte for byte, with the game code still mostly assembly.

Overview

King's Field: The Ancient City (King's Field IV) is a PlayStation 2 game. The repository Voicedrew11/kfiv-decomp (MIT) targets the USA retail boot ELF SLUS_203.18 (README). Its status text says the build reproduces the retail ROM image (all bytes the console loads) byte for byte; the SDK, libc, libm and libgcc code (181 units in src/sce/, about 12 % of .text) is C and the game itself is still splat-disassembled assembly.

Builds

Toolchain

README table: ee-gcc 2.9-ee-991111-01 with -O2 compiles everything; ee-as 2.9-991111 assembles libc, libm, libgcc and splat's assembly; Sony's SDK libraries use SCE ee-as 2.10-ee-001003-1; GNU ld 2.10 with R5900 patches links; dvp-as is for the VU1 microprograms. SDK library versions listed in the README: libkernl, libcdvd and libmc 2.2.4; libgraph, libdma, libpad, libipu, libmpeg and libsdr 2.2.0. The README states the game was built with the same toolchain and SDK release as the Ico decompilation (nathanialf/ico), and that more than 680 SDK, libc and libgcc functions compiled from that project's sources are byte-identical to code in this game (a claim of the README, not checked here).

Using the project

config/symbol_addrs.txt carries about 4,500 lines of names, mostly SDK and libc functions recognised by matching bytes, in splat syntax with // type:func comments. Game-specific names are fewer. See Tool:Splat and Technique:Matching decompilation.

Code & repositories

See the repository link on this page.

  • https://github.com/Voicedrew11/kfiv-decomp @ 88b0978f8e949ba66659654c87b4b84cad8b8409 · license: MIT (declared by the contributor for the files used; GitHub reports MIT (read from LICENSE; GitHub's API was busy) for the repository)
    Splat-based decompilation of the USA boot ELF SLUS_203.18 (sha1sums.txt, symbol_addrs.txt, SDK/libc units in C); no disc data in the repository.
    Tested on: source read, not run: Read at commit 88b0978f8e: README, config/sha1sums.txt, config/symbol_addrs.txt; not built. · checked 2026-10-18