mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-09-09 09:51:34 -07:00
Copy sram.asm's global start/end constants for wram.asm and vram.asm
This commit is contained in:
parent
172dba3c0b
commit
5d229dcef2
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
2
sram.asm
2
sram.asm
@ -6,7 +6,7 @@ GLOBAL SRAM_Begin, SRAM_End
|
||||
|
||||
SECTION "Scratch", SRAM
|
||||
|
||||
sScratch::
|
||||
sScratch:: ds $600 ; a000
|
||||
|
||||
|
||||
SECTION "SRAM Bank 0", SRAM
|
||||
|
14
vram.asm
14
vram.asm
@ -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::
|
||||
|
9
wram.asm
9
wram.asm
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user