mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-01-23 09:16:20 -08: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
|
push af
|
||||||
ld [rSVBK], a
|
ld [rSVBK], a
|
||||||
xor a
|
xor a
|
||||||
ld hl, wRAM1Start
|
ld hl, WRAM1_Start
|
||||||
ld bc, $1000
|
ld bc, WRAM1_End - WRAM1_Start
|
||||||
call ByteFill
|
call ByteFill
|
||||||
pop af
|
pop af
|
||||||
inc a
|
inc a
|
||||||
|
@ -1008,8 +1008,8 @@ PushSGBBorder:
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
SGB_ClearVRAM:
|
SGB_ClearVRAM:
|
||||||
ld hl, VTiles0
|
ld hl, VRAM_Begin
|
||||||
ld bc, VRAM_End - VTiles0
|
ld bc, VRAM_End - VRAM_Begin
|
||||||
xor a
|
xor a
|
||||||
call ByteFill
|
call ByteFill
|
||||||
ret
|
ret
|
||||||
|
@ -111,8 +111,8 @@ _ResetWRAM: ; 5bae
|
|||||||
xor a
|
xor a
|
||||||
call ByteFill
|
call ByteFill
|
||||||
|
|
||||||
ld hl, wRAM1Start
|
ld hl, WRAM1_Start
|
||||||
ld bc, wGameData - wRAM1Start
|
ld bc, wGameData - WRAM1_Start
|
||||||
xor a
|
xor a
|
||||||
call ByteFill
|
call ByteFill
|
||||||
|
|
||||||
|
@ -69,8 +69,8 @@ Init:: ; 17d
|
|||||||
ld [rLCDC], a
|
ld [rLCDC], a
|
||||||
|
|
||||||
; Clear WRAM bank 0
|
; Clear WRAM bank 0
|
||||||
ld hl, wRAM0Start
|
ld hl, WRAM0_Start
|
||||||
ld bc, wRAM1Start - wRAM0Start
|
ld bc, WRAM0_End - WRAM0_Start
|
||||||
.ByteFill:
|
.ByteFill:
|
||||||
ld [hl], 0
|
ld [hl], 0
|
||||||
inc hl
|
inc hl
|
||||||
@ -201,8 +201,8 @@ ClearWRAM:: ; 25a
|
|||||||
push af
|
push af
|
||||||
ld [rSVBK], a
|
ld [rSVBK], a
|
||||||
xor a
|
xor a
|
||||||
ld hl, wRAM1Start
|
ld hl, WRAM1_Start
|
||||||
ld bc, $1000
|
ld bc, WRAM1_End - WRAM1_Start
|
||||||
call ByteFill
|
call ByteFill
|
||||||
pop af
|
pop af
|
||||||
inc a
|
inc a
|
||||||
|
@ -303,8 +303,8 @@ ClearVBank1:: ; d79
|
|||||||
ld a, 1
|
ld a, 1
|
||||||
ld [rVBK], a
|
ld [rVBK], a
|
||||||
|
|
||||||
ld hl, VTiles0
|
ld hl, VRAM_Begin
|
||||||
ld bc, VRAM_End - VTiles0
|
ld bc, VRAM_End - VRAM_Begin
|
||||||
xor a
|
xor a
|
||||||
call ByteFill
|
call ByteFill
|
||||||
|
|
||||||
|
2
sram.asm
2
sram.asm
@ -6,7 +6,7 @@ GLOBAL SRAM_Begin, SRAM_End
|
|||||||
|
|
||||||
SECTION "Scratch", SRAM
|
SECTION "Scratch", SRAM
|
||||||
|
|
||||||
sScratch::
|
sScratch:: ds $600 ; a000
|
||||||
|
|
||||||
|
|
||||||
SECTION "SRAM Bank 0", SRAM
|
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
|
VTiles0:: ds $800
|
||||||
VTiles1:: ds $800
|
VTiles1:: ds $800
|
||||||
VTiles2:: ds $800
|
VTiles2:: ds $800
|
||||||
VBGMap0:: ds $400
|
VBGMap0:: ds $400
|
||||||
VBGMap1:: ds $400
|
VBGMap1:: ds $400
|
||||||
|
|
||||||
SECTION "VRAM1", VRAM, BANK [1]
|
|
||||||
|
SECTION "VRAM1", VRAM
|
||||||
|
|
||||||
VTiles3:: ds $800
|
VTiles3:: ds $800
|
||||||
VTiles4:: ds $800
|
VTiles4:: ds $800
|
||||||
VTiles5:: ds $800
|
VTiles5:: ds $800
|
||||||
VBGMap2:: ds $400
|
VBGMap2:: ds $400
|
||||||
VBGMap3:: 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 "macros/wram.asm"
|
||||||
INCLUDE "vram.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
|
SECTION "Stack", WRAM0
|
||||||
|
|
||||||
wRAM0Start::
|
|
||||||
StackBottom::
|
StackBottom::
|
||||||
ds $100 - 1
|
ds $100 - 1
|
||||||
Stack::
|
Stack::
|
||||||
@ -1503,7 +1509,6 @@ wDaysSince:: db
|
|||||||
|
|
||||||
SECTION "WRAM 1", WRAMX
|
SECTION "WRAM 1", WRAMX
|
||||||
|
|
||||||
wRAM1Start::
|
|
||||||
wd000:: ds 1
|
wd000:: ds 1
|
||||||
|
|
||||||
DefaultSpawnpoint:: db
|
DefaultSpawnpoint:: db
|
||||||
|
Loading…
x
Reference in New Issue
Block a user