Alchemy's bounded compiler set: three C generators, one source pin and build entry point. Pascal approved this package on 2026-10-10:
| Generator | Source | Use |
|---|---|---|
| agscc | GCC 2.96, 2000-07-31, with documented host ports and Thumb options | Both games' Thumb code and shared libgcc C |
| GCC 2.95.2 ARM | GNU archive pinned by SHA-256 in arm/ |
Both games' ARM C |
| old_agbcc | Pinned, unmodified pret/agbcc submodule in agbcc/ |
Sound and flash libraries |
These are reconstruction choices, not recovered original game tooling. This
package builds only old_agbcc from pret's repository; its other generators
are not part of Alchemy's toolchain. Alchemy's AGENTS.md owns the fixed profiles.
Run git submodule update --init --recursive, then make or sh build.sh.
Requires Git, a native C compiler, Make, curl and tar, plus Rosetta on Apple
Silicon for the ARM compiler. The three generators are build/gcc/cc1,
arm/build/gcc/cc1 and agbcc/gcc/old_agbcc; the July build also supplies
xgcc, cpp0 and tradcpp0. AGSCC_JOBS controls build.sh parallelism
(default 8). Building does not install or replace another compiler.
make source-check rejects a missing, changed or dirty nested compiler.
The complete native package currently supports ARM64 macOS. The historical i686 host
descriptor selects the old integer model; it does not describe the host CPU.
The separate stock ARM compiler recipe builds GCC 2.95.2
without changing this GCC 2.96 compiler. Its source archive, host changes
and build recipe live under arm/.
The native Makefiles list the C frontend, ARM backend, host library, and
source generators directly. They preserve the admitted compiler commands and
link order. config/darwin-arm64 contains the host configuration previously
selected by configure on the supported host; paths and compiler options remain
fixed as before. Other hosts need their own reviewed configuration and admitted
binaries before this entry point supports them.
config/arm/tconfig.h and config/arm/tm.h provide the same source-defined
ARM target headers previously generated by configure. The native build and
runtime callers share these headers. The generic configure scripts, installation frameworks, system-header repair,
and disabled translation machinery are omitted; they are not part of this
fixed C/ARM build.
make clean removes generated output. Source generators rebuild ARM tables
from arm.md and RTL definitions; parser outputs remain the pinned Bison 1.28
outputs. Make records header dependencies for incremental builds.
The build enables only C and produces cc1, xgcc, cpp0, and tradcpp0.
Unused C++, Fortran, Chill, Java, and Objective-C frontends and their dedicated
C++, Fortran, and Objective-C test directories are omitted. Target backend
directories other than ARM, and their two dormant MIPS helpers, are omitted.
Only i386/xm-i386.h remains from the i386 backend: it provides the historical
host integer model selected by the existing build recipe, while ARM provides
the target backend. The C
tests, shared test support, generic configuration, build machinery, and
upstream license notices remain unchanged. This trims unused source; it does
not change the compiler options or the behavior of the retained compiler.
The root imports GCC upstream revision
04179d4a511b13cef92eacdb10a51bcd124fea7a from
https://github.com/gcc-mirror/gcc, preserving the recorded GCC 2.96 tree from
PascalPixel/alchemy-gcc. Commit two deletes unused subprojects without changing
any retained file. Subsequent commits separately record:
- Parser generation using unmodified GNU Bison 1.28.
- Fixed-arity generator calls for the Apple ARM64 calling convention.
- Per-slot real-constant copies for 64-bit host pointers.
- Internal linkage for the generated keyword lookup.
- Darwin system-header compatibility.
- This build entry point and documentation.
- A disabled garbage collector in cc1, for host stability.
- Symbol and label hashing in cselib by content, not address, so the output does not depend on where the host places memory.
- Two Thumb options for The Lost Age only:
-mthumb-split-constants(2ab0aca) and-mthumb-call-via-lr(e2b87a3). They reconstruct habits found across that game's code. The bounded study below supports retaining them.
Each patch's commit message records its justification. No other allocator,
scheduler, literal-pool or alignment change is included in the July compiler.
The ARM recipe preserves the stock optimizer and backend with two documented
host fixes. The nested agbcc gitlink preserves pret's source and identity;
no pret compiler source is modified. All compiler source, host patches and
source pins live in this GPL toolchain repository, outside Alchemy's game tree.
Registered on 2026-09-30, before any candidate is built, as Pascal decided.
Question. Does a public GCC from 2000–2002, with stock options, produce The Lost Age's code, so that the two reconstructed options can go?
Candidates. Public GNU GCC from gcc.gnu.org only: one mainline snapshot a
month from 2000-06 to 2002-05, and the releases 2.95.3, 3.0, 3.0.4 and 3.1.
Each gets this repository's host ports and nothing else, and only stock
options vary. First, the public config/arm history is searched for Thumb
constant splitting beyond negation or shifts, and for an indirect call through
a lone BL suffix to lr; snapshots around any hit are added.
Corpora, fixed now.
- A: The Lost Age functions whose The Broken Seal twin is linked C, compiled from the unchanged The Broken Seal text. Functions whose start address has bit 2 clear are the design half; the rest are held out.
- B: every credited The Lost Age function, for regressions only.
- C: every credited The Broken Seal C object, which must stay byte-identical under that game's own route.
- Canaries: DeriMura_TalkShopkeeper's load-versus-constant order; the 107 constant sequences agscc splits differently (such as 0x7784 in recon/tla/raw/0816b6ec.s); the 1,537 pool loads of splittable numbers; and The Lost Age drafts within five halfwords of The Broken Seal C.
Metric. Exact functions on held-out A, then total instruction edits,
scored with the scorer behind Alchemy's make drafts.
Pass mark. Compiler X replaces e2b87a3 and the two options for The Lost Age only if all of these hold: C is unchanged; B loses no function, or the study re-matches it; X beats e2b87a3 with the options on held-out A; X closes at least half of the canaries; and the neighbouring snapshots agree.
Outcomes. If X passes, The Lost Age uses X and both options are deleted. If none passes, Pascal chooses: keep the options, renamed so they cannot pass for real GCC options and documented with the study's counts, or remove them, which returns 33 credited The Lost Age functions to drafts.
Dates. The study stops on 2026-10-12 whatever the result, and the verdict goes to Pascal on 2026-10-13. No compiler change lands before his answer.
Verdict (2026-09-30). No public GCC from 2000–2002 can produce either
habit, so the options stay. The study read all 417 changes to gcc/config/arm
from 1999-12 to 2002-12, on trunk and the 2.95, 3.0 and 3.1 branches, and
the ARM backend of all 28 candidates. Every one builds a Thumb constant
inline only with mov, mov and neg, or mov and lsl, and loads anything else
from the pool; every one calls through a register with a _call_via_rX
stub, and none uses the lone BL-suffix call. Measured with the permuter's
scorer, e2b87a3 with the options matches 88 of 348 held-out A functions and
all 300 of B, and leaves C unchanged; without them it matches 83 and loses 37
of B, each one an inline constant turned back into a pool load. The 2000-08
snapshot, built with these host ports, reproduces e2b87a3 without the
options function for function; the 2000-09 and 2000-10 snapshots break 152
and 163 of B and change 1,470 and 1,661 of C's objects.
Pascal chose on 2026-09-30 to keep both options under their GCC-style names. The expanded 2026-10-10 study supports retaining them as explicit reconstruction features: neither general form was supplied by the tested public compilers. The observed patterns do not establish who implemented the original behavior or prove that its implementation was a particular Camelot GCC patch. The Lost Age also has explicit ARM-kernel loaders and separately compiled library stub calls; the whole game is not described as free of ARM interworking.
The later bounded scan found 8,064 adjacent mov/shift/add constant sequences and 2,495 lr/suffix calls in game-labelled English TLA code, with none of either in its TBS scan. These counts exclude decoded pools and jump tables; they are not a claim to cover every executable byte. In the expanded current source inventory, agscc matches 1,255/1,255 TLA Thumb objects; disabling both options reduces that to 875/1,255, the same count as untouched July GCC. The fractions count objects, not whole-game completion or independent functions. Alchemy's AGENTS.md K1–K3 governs any adoption or change: one setting must explain the relevant whole-game behavior, never one function.
The Lost Age's remaining instruction-order differences do not justify an
additional scheduler option. Alchemy retains stock -mtune=arm9tdmi for
TLA with the ARM7TDMI target. A new compiler change requires new general
evidence and the project's approval; one stubborn function is insufficient.
Original The Broken Seal regression (2026-09-30). e2b87a3 with Alchemy's flags reproduces all 2,260 credited The Broken Seal objects byte for byte. No compiler variant that keeps them identical improves any of its drafts, and four July 2000 ChangeLog reversions are no-ops for Thumb.
The expanded 2026-10-10 study built 31 release/vendor/snapshot versions and
searched local GCC history transitions. Untouched July GCC matches 675/676
current TBS Thumb objects; the host port's symbol/label content hashing
accounts for the one remaining difference. Thus agscc's host changes are
not claimed to be code-generation-equivalent to untouched GNU GCC.
The study still supports the mid-2000 Thumb family, without identifying
Camelot's exact compiler executable. Its public reports live in Alchemy's
tools/alchemy/src/compiler/{study,thumb295,vershist}.md.
A reproducible build. The approved binaries are rebuilt from this source so that they no longer depend on the folder they were built in. Their fingerprints change; every credited file must stay byte-identical.
Compiler build success is not ROM equivalence. Alchemy owns compiler selection, staging, approved executable digests, and full linked-byte verification.
Preserve the upstream COPYING and COPYING.LIB notices and provide corresponding source when distributing compiler binaries. Original game data does not belong in this repository.