diff options
-rw-r--r-- | docs/bugs_and_glitches.md | 4 | ||||
-rw-r--r-- | engine/color.asm | 4 | ||||
-rwxr-xr-x | engine/intro_menu.asm | 4 | ||||
-rw-r--r-- | home/init.asm | 8 | ||||
-rw-r--r-- | home/palettes.asm | 4 | ||||
-rw-r--r-- | sram.asm | 2 | ||||
-rw-r--r-- | vram.asm | 14 | ||||
-rw-r--r-- | wram.asm | 9 |
8 files changed, 31 insertions, 18 deletions
diff --git a/docs/bugs_and_glitches.md b/docs/bugs_and_glitches.md index 6e346f60d..3c940ef78 100644 --- a/docs/bugs_and_glitches.md +++ b/docs/bugs_and_glitches.md @@ -1398,8 +1398,8 @@ ClearWRAM:: ; 25a push af ld [rSVBK], a xor a - ld hl, wRAM1Start - ld bc, $1000 + ld hl, WRAM1_Start + ld bc, WRAM1_End - WRAM1_Start call ByteFill pop af inc a diff --git a/engine/color.asm b/engine/color.asm index f4a420f1c..e000476c3 100644 --- a/engine/color.asm +++ b/engine/color.asm @@ -1008,8 +1008,8 @@ PushSGBBorder: ret SGB_ClearVRAM: - ld hl, VTiles0 - ld bc, VRAM_End - VTiles0 + ld hl, VRAM_Begin + ld bc, VRAM_End - VRAM_Begin xor a call ByteFill ret diff --git a/engine/intro_menu.asm b/engine/intro_menu.asm index ec53549f8..7dd6cc01b 100755 --- a/engine/intro_menu.asm +++ b/engine/intro_menu.asm @@ -111,8 +111,8 @@ _ResetWRAM: ; 5bae xor a call ByteFill - ld hl, wRAM1Start - ld bc, wGameData - wRAM1Start + ld hl, WRAM1_Start + ld bc, wGameData - WRAM1_Start xor a call ByteFill diff --git a/home/init.asm b/home/init.asm index 9023fada2..41bc3960f 100644 --- a/home/init.asm +++ b/home/init.asm @@ -69,8 +69,8 @@ Init:: ; 17d ld [rLCDC], a ; Clear WRAM bank 0 - ld hl, wRAM0Start - ld bc, wRAM1Start - wRAM0Start + ld hl, WRAM0_Start + ld bc, WRAM0_End - WRAM0_Start .ByteFill: ld [hl], 0 inc hl @@ -201,8 +201,8 @@ ClearWRAM:: ; 25a push af ld [rSVBK], a xor a - ld hl, wRAM1Start - ld bc, $1000 + ld hl, WRAM1_Start + ld bc, WRAM1_End - WRAM1_Start call ByteFill pop af inc a diff --git a/home/palettes.asm b/home/palettes.asm index 10f537dde..bf414eee7 100644 --- a/home/palettes.asm +++ b/home/palettes.asm @@ -303,8 +303,8 @@ ClearVBank1:: ; d79 ld a, 1 ld [rVBK], a - ld hl, VTiles0 - ld bc, VRAM_End - VTiles0 + ld hl, VRAM_Begin + ld bc, VRAM_End - VRAM_Begin xor a call ByteFill @@ -6,7 +6,7 @@ GLOBAL SRAM_Begin, SRAM_End SECTION "Scratch", SRAM -sScratch:: +sScratch:: ds $600 ; a000 SECTION "SRAM Bank 0", SRAM @@ -1,14 +1,22 @@ -SECTION "VRAM0", VRAM, BANK [0] +VRAM_Begin EQU $8000 +VRAM_End EQU $a000 + +GLOBAL VRAM_Begin, VRAM_End + + +SECTION "VRAM0", VRAM + VTiles0:: ds $800 VTiles1:: ds $800 VTiles2:: ds $800 VBGMap0:: ds $400 VBGMap1:: ds $400 -SECTION "VRAM1", VRAM, BANK [1] + +SECTION "VRAM1", VRAM + VTiles3:: ds $800 VTiles4:: ds $800 VTiles5:: ds $800 VBGMap2:: ds $400 VBGMap3:: ds $400 -VRAM_End:: @@ -2,10 +2,16 @@ INCLUDE "includes.asm" INCLUDE "macros/wram.asm" INCLUDE "vram.asm" +WRAM0_Start EQU $c000 +WRAM0_End EQU $d000 +WRAM1_Start EQU $d000 +WRAM1_End EQU $e000 + +GLOBAL WRAM0_Start, WRAM0_End, WRAM1_Start, WRAM1_End + SECTION "Stack", WRAM0 -wRAM0Start:: StackBottom:: ds $100 - 1 Stack:: @@ -1503,7 +1509,6 @@ wDaysSince:: db SECTION "WRAM 1", WRAMX -wRAM1Start:: wd000:: ds 1 DefaultSpawnpoint:: db |