Pool-allocate the bank-20 relocated region - #29
Merged
Conversation
|
🎮 FF4 IPS Build Ready! Your patch has been built successfully! Download the IPS file from the artifacts: 📦 Artifact: The artifact will be available for 30 days. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The bank-20 relocated region in
ff4.sused the legacy*=0x208000org-pointer pattern: a hand-placed block mixing inline routines,.importmodules,.if-gated sub-blocks, and.incbinasset blobs. Reading required tracing the implicit org through ~30 directives, and inserting code anywhere silently shifted everything below.This branch declares the bank-20 free-space layout with the allocator pattern master adopted for bank-01 (commit
9b3eaa7). A single.pool bank20_reloc { range 0x208000 0x20FFFF; strategy order }owns the bank; a.alloc bank20_main in bank20_reloc { ... }block pins the 5 inline reloc helpers (conditional_bg1_vofs,clear_ram,multiply_item_index_12,multiply_by_12,brk_handler).strategy orderkeeps them in declaration order so the hardcodedconditional_bg1_vofs := 0x208000constant still holds..importmodules and.incbinasset blobs stay top-level because (a) modules without their own*=directive inherit the parent file's implicit org, and (b)assets.scarries multi-bank*=placements ($0AF000, $0FA710, $0E9800 patches plus $21+ freespace data) that a single.allocwould clip. A single*=0x208100after the.allocreseats the org chain in bank-20 so the imports land where they always have.Dogfooding the new
.pool/.allocsyntax againstff4.ssurfaced four formatter and codegen bugs in a816, all filed and fixed upstream over the course of this work (overflow Q#10 through Q#14). Pin bumps land in the second commit: a816 to 1.1.0a22 (incrementally past a17, a18, a19, a20, a21 through PyPI releases as fixes shipped) and kintsuki to 0.0.0a13 (picks up the battle profiling hooks the tooling will need next).The pre-commit hook switches from
language: systemtolanguage: pythonwith the pinnedadditional_dependenciesso CI cannot drift from the developer venv.Test plan
python3 build.pyproducesbuild/ff4.ips(262282 bytes) andbuild/ff4.sym(1064 symbols)a816 format --check ff4.spasses idempotent on a22--no-verifybank20_mainpool symbol; every other label preserved