Software:King's Field: The Ancient City
| 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
- NTSC-U SLUS-20318: Build:King's Field: The Ancient City/NTSC-U SLUS-20318 (PlayStation 2, retail DVD).
config/sha1sums.txtand the README table list the SHA-1 of the extracted ELFSLUS_203.18(8031536201dec92889d3013ca80f09374571d626) and ofkfiv.rom, the ELF's PT_LOAD bytes as produced byobjcopy -O binary(87615665d1a4a88e57942126a03ab7ad03cd42c6).
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