summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRangi <remy.oukaour+rangi42@gmail.com>2020-06-15 18:16:50 -0400
committerRangi <remy.oukaour+rangi42@gmail.com>2020-06-15 18:16:50 -0400
commitf62e67f578037373efcfba476e4fd271dbb4ab1f (patch)
treee28637854d98f76dd15a66d757c80abd3dce22b5
parentb768d133250fd2a1d489399bedad57522ca75071 (diff)
Define wStackBottom
-rw-r--r--engine/menus/save.asm2
-rw-r--r--layout.link4
-rw-r--r--wram.asm6
3 files changed, 9 insertions, 3 deletions
diff --git a/engine/menus/save.asm b/engine/menus/save.asm
index f8207204..93250034 100644
--- a/engine/menus/save.asm
+++ b/engine/menus/save.asm
@@ -322,7 +322,7 @@ UpdateStackTop:
FindStackTop:
; Find the furthest point that sp has traversed to.
; This is distinct from the current value of sp.
- ld hl, wStackTop - $fc
+ ld hl, wStackBottom
.loop
ld a, [hl]
or a
diff --git a/layout.link b/layout.link
index bbe9185a..1991fa46 100644
--- a/layout.link
+++ b/layout.link
@@ -262,14 +262,14 @@ WRAM0
"Overworld Map"
"Video"
WRAMX 1
- org $d000
"WRAM 1"
"Game Data"
"Party"
- org $dfff
"Stack"
VRAM $00
+ "VRAM0"
VRAM $01
+ "VRAM1"
SRAM $00
"Scratch"
org $a600
diff --git a/wram.asm b/wram.asm
index 58f7247c..2b6a23c2 100644
--- a/wram.asm
+++ b/wram.asm
@@ -2612,11 +2612,17 @@ ENDU ; df01
wPokemonDataEnd::
wGameDataEnd::
+; df01
SECTION "Stack", WRAMX
+ ds 2
+wStackBottom::
+ ds $fc
+wStack::
wStackTop::
+ ds 1
INCLUDE "sram.asm"