mirror of
https://github.com/pret/pokegold-spaceworld.git
synced 2026-08-26 18:45:44 -05:00
Addresses of sections will now be added to the linkerscript via `org`, and the section name will be the path/to/file. If there is more than one section in the file, then add a @SectionName after the path/to/file to describe the section.
25 lines
368 B
NASM
25 lines
368 B
NASM
INCLUDE "constants.asm"
|
|
|
|
; if DEBUG
|
|
SECTION "home/sram.asm", ROM0
|
|
; else
|
|
; SECTION "SRAM functions", ROM0[$326B]
|
|
; endc
|
|
|
|
OpenSRAM:: ; 32a7
|
|
push af
|
|
ld a, 1
|
|
ld [MBC3LatchClock], a
|
|
ld a, SRAM_ENABLE
|
|
ld [MBC3SRamEnable], a
|
|
pop af
|
|
ld [MBC3SRamBank], a
|
|
ret
|
|
|
|
CloseSRAM:: ; 32b7
|
|
push af
|
|
ld a, SRAM_DISABLE
|
|
ld [MBC3LatchClock], a
|
|
ld [MBC3SRamEnable], a
|
|
pop af
|
|
ret |