mirror of
https://github.com/gbdev/rgbds.git
synced 2026-08-22 14:54:33 +00:00
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.
26 lines
444 B
NASM
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
|