You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

38 lines
523 B

INCLUDE "hardware.inc"
SECTION "Game Loop", ROM0
Game_Start::
; disable ldc (CAN ONLY BE DONE DURING VBLANK) & interrupts
halt
di
ld hl, rLCDC
res 7, [hl]
ld hl, intro_Data
call Map_Load
call Player_Init
; re-enable ldc & interrupts
ld hl, rLCDC
set 7, [hl]
ei
.loop:
ld hl, frame
inc [hl]
call Keys_Update
call Player_Update
; wait for vblank
halt
call Map_Update
; ~160 cycles
ld a, HIGH(_OAM)
call DMA_Start
jr .loop