Initial LegendOfZeldaALinkToThePastSNESRecomp scaffold
This commit is contained in:
commit
0cd0e5555c
24 files changed
+1253
No files matched your search
@@ -0,0 +1,35 @@
|
||||
# recomp/
|
||||
|
||||
Analysis input for Legend of Zelda: A Link to the Past. `tools/regen.sh` reads this directory and
|
||||
writes `src/gen/`.
|
||||
|
||||
| File | Owner | Notes |
|
||||
|---|---|---|
|
||||
| `bank*.cfg` | you, plus generated blocks | Per-bank analysis directives |
|
||||
| `symbols.toml` | you | Progressive name map; the source of truth |
|
||||
| `funcs.h` | generated | Re-synced by `tools/regen.sh` — do not hand-edit |
|
||||
|
||||
The block between `>>> BEGIN symbols.toml` and `<<< END symbols.toml` in
|
||||
each bank cfg is rewritten from `symbols.toml` on every regen. Edit
|
||||
`symbols.toml`, not the block.
|
||||
|
||||
Python 3.11+ includes the TOML reader. On older Python, install it with
|
||||
`python -m pip install tomli`. Projects without `symbols.toml` do not need it.
|
||||
|
||||
Each `[[func]]` has a C identifier `name`, a 16-bit hexadecimal `addr`
|
||||
(for example, `"8000"`), and an integer `bank` (for example, `0xc0`).
|
||||
Missing bank configs are created automatically; hand-written directives outside
|
||||
the generated blocks are preserved. Removing an entry also removes its generated
|
||||
directives on the next regen.
|
||||
|
||||
- `emit = false` (the default) writes a `symbol` label and `force_lle` boundary:
|
||||
it stays interpreted, with no generated `func` declaration in `funcs.h`.
|
||||
- `emit = true` writes a `func` declaration and requests analysis from that
|
||||
entry, even without `--cfg-roots`. Only variants the analyzer proves safe
|
||||
become AOT code; others still use the interpreter. Optional `entry_m` and
|
||||
`entry_x` select the initial register-width flags (0 or 1, both default to 1).
|
||||
|
||||
An unchanged cfg file is not by itself evidence of failed code generation:
|
||||
`src/gen/bank*_v2.c` contains code discovered from the ROM, while `bank*.cfg`
|
||||
contains analysis inputs. Discovery does not copy every reached function back
|
||||
into the configs.
|
||||
@@ -0,0 +1,11 @@
|
||||
# Legend of Zelda: A Link to the Past (USA) — LLE-first seed
|
||||
# Regenerate with tools/regen.sh. Promote functions by editing recomp/symbols.toml
|
||||
# and re-running the regen script, which rewrites the block below.
|
||||
bank = 0
|
||||
auto_vectors
|
||||
tier_down_stubs
|
||||
|
||||
# Reset vector $8000, native NMI $80c9 (from the cartridge header).
|
||||
|
||||
# >>> BEGIN symbols.toml (generated — do not edit)
|
||||
# <<< END symbols.toml
|
||||
@@ -0,0 +1,21 @@
|
||||
# Progressive symbol map for Legend of Zelda: A Link to the Past.
|
||||
#
|
||||
# Each [[func]] names an address the analyzer should treat as a function.
|
||||
# Set emit = true to promote one into ahead-of-time codegen; leave it false
|
||||
# to keep it interpreted. tools/regen.sh syncs labels and tier choices into
|
||||
# each recomp/bankNN.cfg; only emit=true adds a func/funcs.h declaration.
|
||||
# Do not hand-edit the generated blocks in the bank configs.
|
||||
|
||||
[[func]]
|
||||
name = "I_RESET"
|
||||
addr = "8000"
|
||||
bank = 0
|
||||
emit = false
|
||||
note = "Emulation RESET vector ($FFFC)"
|
||||
|
||||
[[func]]
|
||||
name = "I_NMI"
|
||||
addr = "80c9"
|
||||
bank = 0
|
||||
emit = false
|
||||
note = "Native NMI vector ($FFEA)"
|
||||
Reference in new issue
Block a user