Browse Source

Removed unnecessary palette change (rst.asm).

* Made better use of local labels in the functions include.
master
Ian Burgmyer 4 years ago
parent
commit
0e0e697ad5
  1. 14
      common/functions.inc
  2. 3
      cpu/rst.asm

14
common/functions.inc

@ -2,10 +2,10 @@ SECTION "functions", ROM0[$2000]
; Wait for vblank without using interrupts.
waitVBlank:
push af
.waitVBlankLoop:
.loop:
ldh a, [$ff44]
cp $90
jr nz, .waitVBlankLoop
jr nz, .loop
pop af
ret
@ -19,10 +19,10 @@ fillTile:
push de
ld d, 16
ld a, b
.fillTileLoop:
.loop:
ld [hli], a
dec d
jr nz, .fillTileLoop
jr nz, .loop
pop de
pop af
ret
@ -42,15 +42,15 @@ clearLogo:
; wipe the logo
ld hl, $81A0
.clearLogoLoop:
.loop:
ld a, $0
ld [hld], a
ld a, h
cp $80
jr nz, .clearLogoLoop
jr nz, .loop
ld a, l
cp $0f
jr nz, .clearLogoLoop
jr nz, .loop
; enable the LCD and return
ld hl, $ff40

3
cpu/rst.asm

@ -59,9 +59,6 @@ ProgramStart:
call waitVBlank
call clearLogo
ld a, %11100100
ldh [$ff47], a
ld b, $ff
call waitVBlank
rst $00

Loading…
Cancel
Save