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.
36 lines
471 B
36 lines
471 B
include "defines.inc"
|
|
include "hardware.inc"
|
|
|
|
section "home/vblank.asm@hram", hram
|
|
h_vblank: db
|
|
|
|
section "home/vblank.asm@int40", rom0[$40]
|
|
push af
|
|
ld a, 1
|
|
ldh [h_vblank], a
|
|
jp vblank
|
|
|
|
section "home/vblank.asm", rom0
|
|
|
|
vblank:
|
|
push hl
|
|
push bc
|
|
push de
|
|
|
|
call joypad_read
|
|
|
|
pop de
|
|
pop bc
|
|
pop hl
|
|
pop af
|
|
reti
|
|
|
|
vblank_wait::
|
|
xor a
|
|
ldh [h_vblank], a
|
|
.loop
|
|
halt
|
|
ld a, [h_vblank]
|
|
and a
|
|
jr z, .loop
|
|
ret
|
|
|