diff --git a/engine/color.asm b/engine/color.asm index 5dea3311a..827a49184 100644 --- a/engine/color.asm +++ b/engine/color.asm @@ -891,13 +891,13 @@ InitCGBPals:: call CheckCGB ret z ; CGB only - ld a, $1 + ld a, BANK(vTiles3) ld [rVBK], a - ld hl, vTiles0 + ld hl, vTiles3 ld bc, $200 tiles xor a call ByteFill - ld a, $0 + ld a, BANK(vTiles0) ld [rVBK], a ld a, 1 << rBGPI_AUTO_INCREMENT ld [rBGPI], a diff --git a/engine/gbc_only.asm b/engine/gbc_only.asm index b2207d436..9aa8a0d1a 100644 --- a/engine/gbc_only.asm +++ b/engine/gbc_only.asm @@ -10,16 +10,16 @@ GBCOnlyScreen: ; 4ea82 call ClearTileMap ld hl, GBCOnlyGFX - ld de, wd000 + ld de, wDecompressBuffer ld a, [rSVBK] push af - ld a, 0 ; this has the same effect as selecting bank 1 (http://gbdev.gg8.se/files/docs/mirrors/pandocs.html#videodisplay) + ld a, 0 ; this has the same effect as selecting bank 1 ld [rSVBK], a call Decompress pop af ld [rSVBK], a - ld de, wd000 + ld de, wDecompressBuffer ld hl, vTiles2 lb bc, BANK(GBCOnlyGFX), $54 call Get2bpp diff --git a/home/init.asm b/home/init.asm index dbdbccf3d..87ecf926b 100644 --- a/home/init.asm +++ b/home/init.asm @@ -96,7 +96,7 @@ Init:: ; 17d ld [hCGB], a call ClearWRAM - ld a, BANK(wd000) + ld a, 1 ld [rSVBK], a call ClearVRAM call ClearSprites @@ -182,11 +182,11 @@ ClearVRAM:: ; 245 ld [rVBK], a call .clear - xor a + xor a ; 0 ld [rVBK], a .clear - ld hl, vTiles0 - ld bc, $2000 + ld hl, VRAM_Begin + ld bc, VRAM_End - VRAM_Begin xor a call ByteFill ret diff --git a/mobile/mobile_46.asm b/mobile/mobile_46.asm index 02fb8a3c7..803202f9e 100755 --- a/mobile/mobile_46.asm +++ b/mobile/mobile_46.asm @@ -2529,9 +2529,9 @@ Function1193a0: ld [wcd3c], a call BattleTowerRoomMenu2 ld hl, $c346 - ld a, LOW(wd000) + ld a, LOW($d000) ld [hli], a - ld a, HIGH(wd000) + ld a, HIGH($d000) ld [hli], a ld a, [wcd3b] ld [hli], a @@ -3467,10 +3467,10 @@ Function119987: ; 119987 ; 1199b4 Function1199b4: ; 1199b4 - ld a, [wd000 + 130] + ld a, [w3_d081+1] and a jr nz, .asm_1199c7 - ld a, [wd000 + 129] + ld a, [w3_d081] cp $7 jr nc, .asm_1199c7 call BattleTowerRoomMenu_IncrementJumptable diff --git a/mobile/mobile_5c.asm b/mobile/mobile_5c.asm index 993105f63..e0d21808d 100755 --- a/mobile/mobile_5c.asm +++ b/mobile/mobile_5c.asm @@ -272,14 +272,14 @@ Function170cc6: ; 170cc6 call Decompress ld a, $1 ld [rVBK], a - ld de, wd000 + ld de, wDecompressBuffer ld hl, vTiles0 lb bc, $6, $c1 call Get2bpp xor a ld [rVBK], a ld hl, LZ_1715a4 - ld de, wd000 + ld de, wDecompressBuffer call Decompress ld de, wBGPals1 ld hl, vTiles0 diff --git a/wram.asm b/wram.asm index f73aaf228..61b8c5f87 100644 --- a/wram.asm +++ b/wram.asm @@ -1565,7 +1565,7 @@ wDaysSince:: db SECTION "WRAM 1", WRAMX -wd000:: ds 1 +wDecompressBuffer:: ds 1 DefaultSpawnpoint:: db @@ -2887,7 +2887,8 @@ SECTION "Battle Tower RAM", WRAMX w3_d000:: ds 1 ; d000 w3_d001:: ds 1 w3_d002:: ds $7e -w3_d080:: ds $10 +w3_d080:: ds 1 +w3_d081:: ds $f w3_d090:: ds $70 w3_d100::