Files
rgbds/test/link/scramble-specs/a.asm
T
Rangi 5869e0dc60 Fix RGBLINK scrambling algorithm to work for SRAM
Since SRAM sections start from 0, we had been using a signed
`int8_t curScrambleSRAM` counter to allow 0 as a scrambled bank,
but this actually just placed all floating SRAM sections in bank 0.
2026-07-13 22:39:41 -04:00

26 lines
444 B
NASM

DEF N = 6
SECTION "fixed", ROMX, BANK[3]
; XXX: We rely on these landing at certain banks, which isn't *guaranteed*...
FOR i, 1, N + 1
db BANK(xLabel{d:i})
ENDR
FOR i, 1, N + 1
db BANK(wLabel{d:i})
ENDR
FOR i, 1, N + 1
db BANK(sLabel{d:i})
ENDR
ds $1000 - N * 3, $ff
FOR i, 1, N + 1
SECTION "floating{d:i}", ROMX
xLabel{d:i}:: ds $2000, i
SECTION "wram{d:i}", WRAMX
wLabel{d:i}:: dw
SECTION "sram{d:i}", SRAM
sLabel{d:i}:: dw
ENDR