Browse Source
* Changed REPT blocks to simple DS declarations. * Removed common link layout file. The only reason it was there is because my local install of RGBDS was off kilter. * The common header now jumps to a label instead of a static address. * Switched to using local labels. That was another thing that was weirdly broken in my previous RGBDS build.master
Ian Burgmyer
4 years ago
5 changed files with 112 additions and 122 deletions
@ -1,51 +0,0 @@
|
||||
ROM0 |
||||
org $0000 |
||||
"rst00" |
||||
|
||||
org $0008 |
||||
"rst08" |
||||
|
||||
org $0010 |
||||
"rst10" |
||||
|
||||
org $0018 |
||||
"rst18" |
||||
|
||||
org $0020 |
||||
"rst20" |
||||
|
||||
org $0028 |
||||
"rst28" |
||||
|
||||
org $0030 |
||||
"rst30" |
||||
|
||||
org $0038 |
||||
"rst38" |
||||
|
||||
org $0040 |
||||
"intVblank" |
||||
|
||||
org $0048 |
||||
"intLcdc" |
||||
|
||||
org $0050 |
||||
"intTimer" |
||||
|
||||
org $0058 |
||||
"intSerial" |
||||
|
||||
org $0060 |
||||
"intJoypad" |
||||
|
||||
org $0068 |
||||
"preHeader" |
||||
|
||||
org $0100 |
||||
"headerJump" |
||||
|
||||
org $0104 |
||||
"header" |
||||
|
||||
org $0150 |
||||
"home" |
@ -0,0 +1,60 @@
|
||||
HeaderTitle EQUS "\"LCDTOGGLE\"" |
||||
|
||||
include "common/defines.inc" |
||||
include "common/header.inc" |
||||
|
||||
SECTION "home", ROM0 |
||||
vblankWait: |
||||
; Wait for vblank without interrupts.
|
||||
ldh a, [$ff44] |
||||
cp $90 |
||||
jr nz, vblankWait |
||||
ret |
||||
|
||||
wait: |
||||
call vblankWait |
||||
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 vblankWait |
||||
ldh a, [$ff40] |
||||
res 7, a |
||||
ldh [$ff40], a |
||||
|
||||
; Mess with the logo, as we often do.
|
||||
ld d, 16 |
||||
ld a, b |
||||
.logoDraw: |
||||
ld [hli], a |
||||
dec d |
||||
jr nz, .logoDraw |
||||
|
||||
; 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 |
Loading…
Reference in new issue