mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08:00
Keep memory map values in hardware_constants.asm
This commit is contained in:
parent
5d229dcef2
commit
47e4f21e62
@ -1,4 +1,19 @@
|
||||
; Graciously aped from http://nocash.emubase.de/pandocs.htm .
|
||||
; Graciously aped from:
|
||||
; http://nocash.emubase.de/pandocs.htm
|
||||
; http://gameboy.mongenel.com/dmg/asmmemmap.html
|
||||
|
||||
; memory map
|
||||
VRAM_Begin EQU $8000
|
||||
VRAM_End EQU $a000
|
||||
SRAM_Begin EQU $a000
|
||||
SRAM_End EQU $c000
|
||||
WRAM0_Begin EQU $c000
|
||||
WRAM0_End EQU $d000
|
||||
WRAM1_Begin EQU $d000
|
||||
WRAM1_End EQU $e000
|
||||
; hardware registers $ff00-$ff80 (see below)
|
||||
HRAM_Begin EQU $ff80
|
||||
HRAM_End EQU $ffff
|
||||
|
||||
; MBC3
|
||||
MBC3SRamEnable EQU $0000
|
||||
|
@ -1398,8 +1398,8 @@ ClearWRAM:: ; 25a
|
||||
push af
|
||||
ld [rSVBK], a
|
||||
xor a
|
||||
ld hl, WRAM1_Start
|
||||
ld bc, WRAM1_End - WRAM1_Start
|
||||
ld hl, WRAM1_Begin
|
||||
ld bc, WRAM1_End - WRAM1_Begin
|
||||
call ByteFill
|
||||
pop af
|
||||
inc a
|
||||
|
@ -111,8 +111,8 @@ _ResetWRAM: ; 5bae
|
||||
xor a
|
||||
call ByteFill
|
||||
|
||||
ld hl, WRAM1_Start
|
||||
ld bc, wGameData - WRAM1_Start
|
||||
ld hl, WRAM1_Begin
|
||||
ld bc, wGameData - WRAM1_Begin
|
||||
xor a
|
||||
call ByteFill
|
||||
|
||||
|
@ -69,8 +69,8 @@ Init:: ; 17d
|
||||
ld [rLCDC], a
|
||||
|
||||
; Clear WRAM bank 0
|
||||
ld hl, WRAM0_Start
|
||||
ld bc, WRAM0_End - WRAM0_Start
|
||||
ld hl, WRAM0_Begin
|
||||
ld bc, WRAM0_End - WRAM0_Begin
|
||||
.ByteFill:
|
||||
ld [hl], 0
|
||||
inc hl
|
||||
@ -87,8 +87,8 @@ Init:: ; 17d
|
||||
ld a, [hFFEA]
|
||||
push af
|
||||
xor a
|
||||
ld hl, HRAM_START
|
||||
ld bc, HRAM_END - HRAM_START
|
||||
ld hl, HRAM_Begin
|
||||
ld bc, HRAM_End - HRAM_Begin
|
||||
call ByteFill
|
||||
pop af
|
||||
ld [hFFEA], a
|
||||
@ -201,8 +201,8 @@ ClearWRAM:: ; 25a
|
||||
push af
|
||||
ld [rSVBK], a
|
||||
xor a
|
||||
ld hl, WRAM1_Start
|
||||
ld bc, WRAM1_End - WRAM1_Start
|
||||
ld hl, WRAM1_Begin
|
||||
ld bc, WRAM1_End - WRAM1_Begin
|
||||
call ByteFill
|
||||
pop af
|
||||
inc a
|
||||
|
3
hram.asm
3
hram.asm
@ -1,4 +1,3 @@
|
||||
HRAM_START EQU $ff80
|
||||
hPushOAM EQU $ff80 ; 10 bytes
|
||||
|
||||
hROMBankBackup EQU $ff8a
|
||||
@ -124,5 +123,3 @@ hDMATransfer EQU $ffe8
|
||||
hMobile EQU $ffe9
|
||||
hFFEA EQU $ffea
|
||||
hClockResetTrigger EQU $ffeb
|
||||
|
||||
HRAM_END EQU $ffff
|
||||
|
6
sram.asm
6
sram.asm
@ -1,9 +1,3 @@
|
||||
SRAM_Begin EQU $a000
|
||||
SRAM_End EQU $c000
|
||||
|
||||
GLOBAL SRAM_Begin, SRAM_End
|
||||
|
||||
|
||||
SECTION "Scratch", SRAM
|
||||
|
||||
sScratch:: ds $600 ; a000
|
||||
|
6
vram.asm
6
vram.asm
@ -1,9 +1,3 @@
|
||||
VRAM_Begin EQU $8000
|
||||
VRAM_End EQU $a000
|
||||
|
||||
GLOBAL VRAM_Begin, VRAM_End
|
||||
|
||||
|
||||
SECTION "VRAM0", VRAM
|
||||
|
||||
VTiles0:: ds $800
|
||||
|
Loading…
Reference in New Issue
Block a user