diff --git a/home/copy.asm b/home/copy.asm index 8e7d07c12..55951342c 100644 --- a/home/copy.asm +++ b/home/copy.asm @@ -54,10 +54,10 @@ ByteFill:: 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 @@ GetFarByte:: 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 @@ GetFarHalfword:: 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 @@ FarCopyWRAM:: 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 @@ GetFarWRAMByte:: 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] diff --git a/home/farcall.asm b/home/farcall.asm index 3e2d6e549..1c17fb409 100644 --- a/home/farcall.asm +++ b/home/farcall.asm @@ -2,10 +2,10 @@ FarCall_de:: ; 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 @@ FarCall_hl:: ; 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 diff --git a/home/gfx.asm b/home/gfx.asm index fa92c2608..52facb851 100644 --- a/home/gfx.asm +++ b/home/gfx.asm @@ -19,10 +19,10 @@ Get1bpp_2:: 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 @@ DecompressRequest2bpp:: 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 @@ FarCopyBytesDouble: ; 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 diff --git a/home/map.asm b/home/map.asm index d012cbe58..634956471 100644 --- a/home/map.asm +++ b/home/map.asm @@ -1043,10 +1043,10 @@ MapTextbox:: 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 diff --git a/home/menu.asm b/home/menu.asm index 4959c3bb7..fb2db1b91 100644 --- a/home/menu.asm +++ b/home/menu.asm @@ -809,10 +809,10 @@ MenuTextboxWaitButton:: ret Place2DMenuItemName:: - ldh [hStackBank], a + ldh [hTempBank], a ldh a, [hROMBank] push af - ldh a, [hStackBank] + ldh a, [hTempBank] rst Bankswitch call PlaceString diff --git a/home/print_text.asm b/home/print_text.asm index 8ba2ac71f..efca959eb 100644 --- a/home/print_text.asm +++ b/home/print_text.asm @@ -107,10 +107,10 @@ MobilePrintNum:: ret FarPrintText:: - ldh [hStackBank], a + ldh [hTempBank], a ldh a, [hROMBank] push af - ldh a, [hStackBank] + ldh a, [hTempBank] rst Bankswitch call PrintText diff --git a/hram.asm b/hram.asm index 042847d7e..8b730b229 100644 --- a/hram.asm +++ b/hram.asm @@ -4,7 +4,7 @@ hTransferVirtualOAM:: ds 10 ; ff80 hROMBankBackup:: db ; ff8a hFarByte:: -hStackBank:: db ; ff8b +hTempBank:: db ; ff8b hSRAMBank:: db ; ff8c hRTCDayHi:: db ; ff8d