ref: 10909e6b437f6c137c794337e94f32cdc7fe9eb4
parent: 1ec60810b8226943125c656ff8f0c3f947be7aaa
author: Rangi <[email protected]>
date: Mon Apr 6 09:02:23 EDT 2020
hStackBank -> hTempBank
--- a/home/copy.asm
+++ b/home/copy.asm
@@ -54,10 +54,10 @@
GetFarByte::
; retrieve a single byte from a:hl, and return it in a.
; bankswitch to new bank
- ldh [hStackBank], a
+ ldh [hTempBank], a
ldh a, [hROMBank]
push af
- ldh a, [hStackBank]
+ ldh a, [hTempBank]
rst Bankswitch
; get byte from new bank
@@ -75,10 +75,10 @@
GetFarHalfword::
; retrieve a halfword from a:hl, and return it in hl.
; bankswitch to new bank
- ldh [hStackBank], a
+ ldh [hTempBank], a
ldh a, [hROMBank]
push af
- ldh a, [hStackBank]
+ ldh a, [hTempBank]
rst Bankswitch
; get halfword from new bank, put it in hl
@@ -92,10 +92,10 @@
ret
FarCopyWRAM::
- ldh [hStackBank], a
+ ldh [hTempBank], a
ldh a, [rSVBK]
push af
- ldh a, [hStackBank]
+ ldh a, [hTempBank]
ldh [rSVBK], a
call CopyBytes
@@ -105,10 +105,10 @@
ret
GetFarWRAMByte::
- ldh [hStackBank], a
+ ldh [hTempBank], a
ldh a, [rSVBK]
push af
- ldh a, [hStackBank]
+ ldh a, [hTempBank]
ldh [rSVBK], a
ld a, [hl]
ldh [hFarByte], a
@@ -118,10 +118,10 @@
ret
GetFarWRAMWord::
- ldh [hStackBank], a
+ ldh [hTempBank], a
ldh a, [rSVBK]
push af
- ldh a, [hStackBank]
+ ldh a, [hTempBank]
ldh [rSVBK], a
ld a, [hli]
ld h, [hl]
--- a/home/farcall.asm
+++ b/home/farcall.asm
@@ -2,10 +2,10 @@
; Call a:de.
; Preserves other registers.
- ldh [hStackBank], a
+ ldh [hTempBank], a
ldh a, [hROMBank]
push af
- ldh a, [hStackBank]
+ ldh a, [hTempBank]
rst Bankswitch
call .de
jr ReturnFarCall
@@ -18,10 +18,10 @@
; Call a:hl.
; Preserves other registers.
- ldh [hStackBank], a
+ ldh [hTempBank], a
ldh a, [hROMBank]
push af
- ldh a, [hStackBank]
+ ldh a, [hTempBank]
rst Bankswitch
call FarCall_JumpToHL
--- a/home/gfx.asm
+++ b/home/gfx.asm
@@ -19,10 +19,10 @@
ret
FarCopyBytesDouble_DoubleBankSwitch::
- ldh [hStackBank], a
+ ldh [hTempBank], a
ldh a, [hROMBank]
push af
- ldh a, [hStackBank]
+ ldh a, [hTempBank]
rst Bankswitch
call FarCopyBytesDouble
@@ -135,10 +135,10 @@
FarCopyBytes::
; copy bc bytes from a:hl to de
- ldh [hStackBank], a
+ ldh [hTempBank], a
ldh a, [hROMBank]
push af
- ldh a, [hStackBank]
+ ldh a, [hTempBank]
rst Bankswitch
call CopyBytes
@@ -151,10 +151,10 @@
; Copy bc bytes from a:hl to bc*2 bytes at de,
; doubling each byte in the process.
- ldh [hStackBank], a
+ ldh [hTempBank], a
ldh a, [hROMBank]
push af
- ldh a, [hStackBank]
+ ldh a, [hTempBank]
rst Bankswitch
; switcheroo, de <> hl
--- a/home/map.asm
+++ b/home/map.asm
@@ -1043,10 +1043,10 @@
Call_a_de::
; Call a:de.
- ldh [hStackBank], a
+ ldh [hTempBank], a
ldh a, [hROMBank]
push af
- ldh a, [hStackBank]
+ ldh a, [hTempBank]
rst Bankswitch
call .de
--- a/home/menu.asm
+++ b/home/menu.asm
@@ -809,10 +809,10 @@
ret
Place2DMenuItemName::
- ldh [hStackBank], a
+ ldh [hTempBank], a
ldh a, [hROMBank]
push af
- ldh a, [hStackBank]
+ ldh a, [hTempBank]
rst Bankswitch
call PlaceString
--- a/home/print_text.asm
+++ b/home/print_text.asm
@@ -107,10 +107,10 @@
ret
FarPrintText::
- ldh [hStackBank], a
+ ldh [hTempBank], a
ldh a, [hROMBank]
push af
- ldh a, [hStackBank]
+ ldh a, [hTempBank]
rst Bankswitch
call PrintText
--- a/hram.asm
+++ b/hram.asm
@@ -4,7 +4,7 @@
hROMBankBackup:: db ; ff8a
hFarByte::
-hStackBank:: db ; ff8b
+hTempBank:: db ; ff8b
hSRAMBank:: db ; ff8c
hRTCDayHi:: db ; ff8d