diff options
| author | dannye <33dannye@gmail.com> | 2021-04-30 14:03:34 -0500 |
|---|---|---|
| committer | dannye <33dannye@gmail.com> | 2021-04-30 14:03:34 -0500 |
| commit | 0cbd5acb76d0f5df35ebf529bd227c201e0b3115 (patch) | |
| tree | fcc3124631cbbc05d3f4df670d13e5f2a3e02e59 /sram.asm | |
| parent | pokered -> pokeyellow (diff) | |
| parent | Use {interpolation} to generate sequences of RAM labels (diff) | |
| download | pokeyellow-0cbd5acb76d0f5df35ebf529bd227c201e0b3115.tar.gz pokeyellow-0cbd5acb76d0f5df35ebf529bd227c201e0b3115.tar.xz pokeyellow-0cbd5acb76d0f5df35ebf529bd227c201e0b3115.zip | |
Merge branch 'master' of https://github.com/pret/pokered
Diffstat (limited to 'sram.asm')
| -rw-r--r-- | sram.asm | 31 |
1 files changed, 18 insertions, 13 deletions
@@ -21,25 +21,30 @@ sTileAnimations:: ds 1 sMainDataCheckSum:: ds 1 +; The PC boxes will not fit into one SRAM bank, +; so they use multiple SECTIONs +box_n = 0 +boxes: MACRO +rept \1 +box_n = box_n + 1 +sBox{d:box_n}:: ds wBoxDataEnd - wBoxDataStart +endr +ENDM + SECTION "Saved Boxes 1", SRAM ; BANK 2 -sBox1:: ds wBoxDataEnd - wBoxDataStart -sBox2:: ds wBoxDataEnd - wBoxDataStart -sBox3:: ds wBoxDataEnd - wBoxDataStart -sBox4:: ds wBoxDataEnd - wBoxDataStart -sBox5:: ds wBoxDataEnd - wBoxDataStart -sBox6:: ds wBoxDataEnd - wBoxDataStart +; sBox1 - sBox6 + boxes 6 sBank2AllBoxesChecksum:: ds 1 sBank2IndividualBoxChecksums:: ds 6 - SECTION "Saved Boxes 2", SRAM ; BANK 3 -sBox7:: ds wBoxDataEnd - wBoxDataStart -sBox8:: ds wBoxDataEnd - wBoxDataStart -sBox9:: ds wBoxDataEnd - wBoxDataStart -sBox10:: ds wBoxDataEnd - wBoxDataStart -sBox11:: ds wBoxDataEnd - wBoxDataStart -sBox12:: ds wBoxDataEnd - wBoxDataStart +; sBox7 - sBox12 + boxes 6 sBank3AllBoxesChecksum:: ds 1 sBank3IndividualBoxChecksums:: ds 6 + +; All 12 boxes fit within 2 SRAM banks + assert box_n == NUM_BOXES, \ + "boxes: Expected {d:NUM_BOXES} total boxes, got {d:box_n}" |
