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.
 
 
 
 

44 lines
796 B

INCLUDE "hardware.inc"
SECTION "Title Loop", ROM0
titleTiles: INCBIN "png/bg/title.2bpp"
titleMap: INCBIN "png/bg/title.tilemap"
titleMapEnd:
DEF TITLE_TILES_SIZE EQUS "titleMap - titleTiles"
DEF TITLE_MAP_SIZE EQUS "titleMapEnd - titleMap"
Title_Start::
; load title screen
ld bc, _VRAM
ld hl, titleTiles
ld de, TITLE_TILES_SIZE
call memcpy16
; could probably be sped up...
FOR Y, 18
ld bc, _SCRN0 + 32 * Y
ld hl, titleMap + 20 * Y
ld d, 20
call memcpy
ENDR
; enable lcd, sprites and interrupts
ld hl, rLCDC
set 7, [hl]
set 1, [hl]
ei
.loop:
ld hl, frame
inc [hl]
call Keys_Update
; todo: check for start press and transition to game state
; wait for vblank
halt
jr .loop