From 4c8c5c10a8c7619cfadf68072f2c52ae0e724386 Mon Sep 17 00:00:00 2001 From: Rangi Date: Sat, 25 Aug 2018 22:38:57 -0400 Subject: [PATCH] Use rgbasm's GameBoy graphics literal for initializing wCreditsFaux2bpp In the 2BPP format, two bytes %ABCDEFGH %abcdefgh define eight pixels %Aa %Bb %Cc %Dd %Ee %Ff %Gg %Hh. Four valid colors: %00 = 0 = white, %01 = 1 = dark, %10 = 2 = light, %11 = 3 = black. Thus `22222222 = pixels %10 %10 %10 %10 %10 %10 %10 %10 = bytes %11111111 %00000000 = $ff00. --- engine/movie/credits.asm | 4 ++-- engine/movie/crystal_intro.asm | 2 +- wram.asm | 9 +++++---- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/engine/movie/credits.asm b/engine/movie/credits.asm index 462c30523..f3939004c 100644 --- a/engine/movie/credits.asm +++ b/engine/movie/credits.asm @@ -21,8 +21,8 @@ Credits:: call ClearSprites ld hl, wCreditsFaux2bpp - ld c, $80 - ld de, $ff00 + ld c, wCreditsFaux2bppEnd - wCreditsFaux2bpp + ld de, `22222222 ; eight pixels, each with color #2 .load_loop ld a, e diff --git a/engine/movie/crystal_intro.asm b/engine/movie/crystal_intro.asm index 8bbfb9be8..5c4f38151 100644 --- a/engine/movie/crystal_intro.asm +++ b/engine/movie/crystal_intro.asm @@ -795,7 +795,7 @@ IntroScene9: call DelayFrame call DelayFrame call DelayFrame - ld a, $c ; $980c + ld a, LOW(vBGMap0 + $c) ; $c ldh [hBGMapAddress], a call DelayFrame call DelayFrame diff --git a/wram.asm b/wram.asm index 56eea23eb..1c0bdd547 100644 --- a/wram.asm +++ b/wram.asm @@ -45,7 +45,7 @@ wCurNoteDuration:: db ; used in MusicE0 and LoadNote wCurMusicByte:: db ; c298 wCurChannel:: db ; c299 wVolume:: ; c29a -; corresponds to $ff24 +; corresponds to rNR50 ; Channel control / ON-OFF / Volume (R/W) ; bit 7 - Vin->SO2 ON/OFF ; bit 6-4 - SO2 output level (volume) (# 0-7) @@ -53,12 +53,12 @@ wVolume:: ; c29a ; bit 2-0 - SO1 output level (volume) (# 0-7) db wSoundOutput:: ; c29b -; corresponds to $ff25 +; corresponds to rNR51 ; bit 4-7: ch1-4 so2 on/off ; bit 0-3: ch1-4 so1 on/off db wSoundInput:: ; c29c -; corresponds to $ff26 +; corresponds to rNR52 ; bit 7: global on/off ; bit 0: ch1 on/off ; bit 1: ch2 on/off @@ -1069,7 +1069,8 @@ wc9f9:: ds 7 UNION ; ca00 ; blank credits tile buffer -wCreditsFaux2bpp:: ds 128 +wCreditsFaux2bpp:: ds 8 * LEN_2BPP_TILE +wCreditsFaux2bppEnd:: NEXTU ; ca00 ; mystery gift data