mirror of
https://github.com/pret/pokegold-spaceworld.git
synced 2026-08-09 03:34:37 -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.
22 lines
377 B
NASM
22 lines
377 B
NASM
INCLUDE "constants.asm"
|
|
|
|
SECTION "home/delay.asm", ROM0
|
|
|
|
DelayFrame::
|
|
; Wait for one frame
|
|
ld a, 1
|
|
ld [wVBlankOccurred], a
|
|
.halt
|
|
; Wait for the next VBlank, halting to conserve battery
|
|
halt ; rgbasm adds a nop after this instruction by default
|
|
ld a, [wVBlankOccurred]
|
|
and a
|
|
jr nz, .halt
|
|
ret
|
|
|
|
DelayFrames::
|
|
; Wait c frames
|
|
call DelayFrame
|
|
dec c
|
|
jr nz, DelayFrames
|
|
ret |