Building a patch
File patcher turns your project into a bootable disc image and a BPS patch. This page follows one build from the plan to the player.
The placement plan
Open File patcher and choose Build from project. Before a single sector is written, Living Tool works out where each staged change will go. The plan is a dry run: it writes nothing, and it refreshes each time your project saves.

Every change gets one of three results. What decides it is how many sectors the new file needs, compared with the sectors its table entry gives it.
| Result | When | Example |
|---|---|---|
| In place | The file still fits the sectors it has. A smaller file is zero-filled to the end of its extent. | chunk/39 · LBA 24,886 |
| Relocate | It needs more sectors than it has. It is appended past the end of the disc and its entry is repointed. | npc/7 · 96 → 98 |
| Blocked | It would break a loader cap or another hard rule. The build refuses it. | npc/2 · 98 → 99 |
World chunks never move. Each is a fixed 125-sector slot at LBA 20,011 + id × 125, so a chunk change is either in place or blocked. New areas (chunk ids from 1328) have fixed slots past the end of the disc. Relocated files go after them in table order, from LBA 185,985 on retail, so the layout is the same on every build.
Blocked changes
Each loader has a size cap, and a file past its cap hangs the game when it loads. Living Tool checks every staged change against the cap of the loader that reads it. Caps count whole sectors, because the game always reads 2,048-byte sectors. A blocked row names the rule it breaks:
| Code | Blocks when |
|---|---|
BUDGET_NPC_CAP | An npc/* pack needs more than 98 sectors (0x31000). |
BUDGET_STAGING | A file loaded through the staging buffer needs more than 64 sectors (0x20000). |
BUDGET_CHUNK | A chunk needs more than its fixed 125 sectors (0x3E800). |
BUDGET_SLOT | An area overlay is larger than its 0x4000-byte slot in RAM. |
EXE_SIZE_CHANGED | The EXE is not exactly 317,440 bytes. |
BUILD_MOVIE_SECTORS | A staged movie isn't whole 2,336-byte Mode 2 sectors. |
Build patched disc stays disabled while a blocked row is ticked. You have two ways out:
- Trim the change until it fits. Expand the row for its cap meter and an Open in … link to its editor.
- Untick the row. The file is built from the source disc, and
build.jsonnotes it as excluded.
What a build writes
Choose Build patched disc (⌘B). Living Tool copies your source image and writes only into the copy, and every build starts from your dump, never from an earlier build. The Output panel sets what comes out:
| Name | english-v0.4 · default <project slug>-b<N> |
| Folder | builds/0004/ · you can change it |
| Disc image (.bin + .cue) | on |
| BPS patch + player README | on when your disc is verified · disabled when it isn't |
| Boot test in Redux after building | disabled · needs PCSX-Redux, which isn't in Living Tool yet |
| Add 150-sector postgap | on |
While it runs, the job card shows each step, from Copy retail image to Make BPS. The image is written as a .bin.partial file, and gets its real name only after Verify confirms that:
- Each written file reads back as planned, zero-padded to its extent.
- Each written sector passes EDC and ECC, and its header address matches its LBA.
- The file table equals the source's plus the plan's rewrites, and each alias group points at one extent.
- The volume size in the primary volume descriptor matches the image.
Each action gets one line in log.txt, in the same style as inject_disc.py:
wrote npc/7 199820 bytes over 98 sector(s) at LBA 185985 RELOCATED, 98 changed
file table: npc/7 (#70) -> LBA 185985 (98 sectors)
volume size: 185985 -> 186233 sectors (+0.6 MB)
Next to it, build.json records the inputs, the plan, the hashes and any rows you left out. A pre-build snapshot is taken first, so the image can be rebuilt later from your project, that snapshot and the retail disc. A failed or cancelled build leaves only build.json and log.txt.

Checksums and volume size
A raw sector is 2,352 bytes: a header, 2,048 bytes of data and two error checks over them. Change one data byte and the checks stop matching, so Living Tool re-encodes every sector it writes.
| Sync and header | kept · made fresh for appended sectors (MSF of LBA + 150) |
| Submode | 0x08 · 0x89 on the last sector of a file |
| User data | 2,048 B · zero-padded past the end of the file |
| EDC | CRC-32 · poly 0xD8018001 · over 0x010..0x817 |
| ECC P and Q | RS(26,24) + RS(45,43) · header bytes zeroed (Mode 2) |
The encoder is a port of inject_disc.py. A test re-encodes more than 2,000 retail sectors and must get identical bytes back.
Appending also makes the image longer than its ISO volume says it is, so the build rewrites the volume size in the primary volume descriptor at LBA 16. With the postgap on, it adds 150 empty sectors after the last appended file, as retail has after its own.
retail disc LBA 0 .. 185,984 185,985
npc/7 LBA 185,985 .. 186,082 98
postgap LBA 186,083 .. 186,232 150
volume size 185,985 → 186,233
A 74-minute CD-R holds 333,000 sectors, which leaves about 147,000 sectors (about 287 MB) for appended files. A plan that would pass that is refused with BUILD_CAPACITY.
Building on a base
On a project built on a base, such as HackerGC, the image comes from the base: Living Tool builds from the copy it cached when it applied the base's patch to your retail disc. The BPS is still made against retail, so players apply one file to their own dump.

- If retail's CRC32 has changed since the base was mounted, the build stops with
BUILD_BPS_SOURCE_CHANGED. - New areas start at the project's
newAreaFirst(1328 on retail). A lower id the base doesn't hold isBUILD_AREA_RESERVED; one whose slot lands inside the base's image isBUILD_AREA_TAKEN. - HackerGC bases have spare table entries,
new/0tonew/N, and a file staged there is appended. Without one, a new file is blocked withNEW_FILE_NEEDS_EXE_GROWTH.
Applying a patch
Living Tool makes the BPS from the plan instead of diffing all 437 MB, then applies it once to check that it reproduces the build. The README next to it gives players four steps:
- Check the image. One
.binof 437,436,720 B with CRC32cdc72c62. - Apply the .bps. Rom Patcher JS, Floating IPS or Living Tool.
- Make a .cue. One track,
MODE2/2352. - Play. Open the
.cuein DuckStation, PCSX-Redux or another emulator.
To apply one yourself, switch File patcher to Apply a patch and drop the file in. Its card shows the image it needs and the image it makes. Source image shows the disc the patch will be applied to. Apply patch asks where to save the result and writes a .cue next to it.
On a project built on a base, the disc you have open is the base's image, and your retail disc stays open beside it. Living Tool picks whichever one the patch names by size and CRC32. Your project's own BPS is made against retail, so it applies to your retail disc, and the card says "Retail disc, kept open beside the base". A patch made against the base's image applies to the base.
| Format | Status | Notes |
|---|---|---|
.bps | Applied | Holds the source size and CRC32, so the wrong dump is refused. |
.ppf | Not yet | Refused with PATCH_FORMAT in v0.1.6. |
.xdelta .vcdiff | Not yet | Refused with PATCH_FORMAT in v0.1.6. |
.ips | Refused | Its offsets stop at 16 MB (PATCH_IPS). |
If no open disc has the size and CRC32 the patch needs, Living Tool stops with PATCH_WRONG_SOURCE. The new image is written only once its own CRC32 matches, and never over the source.