From 0e0e697ad5a4c49ce7742af90b9d8ec36e53f35a Mon Sep 17 00:00:00 2001 From: Ian Burgmyer Date: Mon, 7 Sep 2020 21:13:27 -0400 Subject: [PATCH] Removed unnecessary palette change (rst.asm). * Made better use of local labels in the functions include. --- common/functions.inc | 14 +++++++------- cpu/rst.asm | 3 --- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/common/functions.inc b/common/functions.inc index a3027a4..06d5953 100644 --- a/common/functions.inc +++ b/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 diff --git a/cpu/rst.asm b/cpu/rst.asm index c81aea3..f172761 100644 --- a/cpu/rst.asm +++ b/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