GameBoy test ROMs for Plip.
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.
|
|
|
HeaderTitle EQUS "\"LCDTOGGLE\""
|
|
|
|
|
|
|
|
include "common/defines.inc"
|
|
|
|
include "common/header.inc"
|
|
|
|
include "common/functions.inc"
|
|
|
|
|
|
|
|
SECTION "home", ROM0
|
|
|
|
wait:
|
|
|
|
call waitVBlank
|
|
|
|
dec d
|
|
|
|
jr nz, wait
|
|
|
|
ret
|
|
|
|
|
|
|
|
ProgramStart:
|
|
|
|
ld b, $00
|
|
|
|
|
|
|
|
reset:
|
|
|
|
ld hl, $8010
|
|
|
|
ld a, b
|
|
|
|
xor $ff
|
|
|
|
ld b, a
|
|
|
|
|
|
|
|
.loop:
|
|
|
|
; Disable the LCD
|
|
|
|
call waitVBlank
|
|
|
|
ldh a, [$ff40]
|
|
|
|
res 7, a
|
|
|
|
ldh [$ff40], a
|
|
|
|
|
|
|
|
; Mess with the logo, as we often do.
|
|
|
|
call fillTile
|
|
|
|
|
|
|
|
; Enable the LCD
|
|
|
|
ldh a, [$ff40]
|
|
|
|
set 7, a
|
|
|
|
ldh [$ff40], a
|
|
|
|
|
|
|
|
; Wait for a few frames.
|
|
|
|
ld d, 8
|
|
|
|
call wait
|
|
|
|
|
|
|
|
; Check to see if we need to reset hl, then rinse and repeat.
|
|
|
|
ld a, h
|
|
|
|
cp $81
|
|
|
|
jr nz, .loop
|
|
|
|
ld a, l
|
|
|
|
cp $90
|
|
|
|
jr nz, .loop
|
|
|
|
jr reset
|