diff --git a/engine/battle/checkbattlescene.asm b/engine/battle/checkbattlescene.asm index 5253c3c47..24d06b8c9 100644 --- a/engine/battle/checkbattlescene.asm +++ b/engine/battle/checkbattlescene.asm @@ -19,7 +19,7 @@ CheckBattleScene: ; 4ea44 and a jr nz, .from_wram - ld a, $4 + ld a, 4 ; MBC30 bank used by JP Crystal; inaccessible by MBC3 call GetSRAMBank ld a, [$a60c] ld c, a diff --git a/engine/battle/core.asm b/engine/battle/core.asm index bac39e76f..7649eba84 100644 --- a/engine/battle/core.asm +++ b/engine/battle/core.asm @@ -232,7 +232,7 @@ BattleTurn: ; 3c12f ; 3c1bf MobileFn_3c1bf: mobile - ld a, $5 + ld a, 5 ; MBC30 bank used by JP Crystal; inaccessible by MBC3 call GetSRAMBank ld hl, $a89b ; s5_a89b inc [hl] diff --git a/engine/billspc.asm b/engine/billspc.asm index f94f495c6..3d1177f83 100755 --- a/engine/billspc.asm +++ b/engine/billspc.asm @@ -2104,7 +2104,7 @@ MovePKMNWitoutMail_InsertMon: ; e31e7 ld hl, wBillsPC_BackupScrollPosition add [hl] ld [CurPartyMon], a - ld a, $1 + ld a, BANK(sBox) call GetSRAMBank ld hl, sBoxSpecies call CopySpeciesToTemp diff --git a/engine/mail_2.asm b/engine/mail_2.asm index d66bbbbd7..886ee6e6e 100755 --- a/engine/mail_2.asm +++ b/engine/mail_2.asm @@ -69,7 +69,7 @@ ReadAnyMail: ; b9237 ld h, d ld l, e push hl - ld a, $0 + ld a, BANK(sPartyMail) call GetSRAMBank ld de, sPartyMon1MailAuthorID - sPartyMon1Mail add hl, de diff --git a/engine/menu.asm b/engine/menu.asm index e5a5ed6c9..83ee69373 100755 --- a/engine/menu.asm +++ b/engine/menu.asm @@ -730,7 +730,7 @@ Function24423: ; 24423 ld a, [VramState] bit 0, a ret z - xor a + xor a ; effectively ld a, BANK(sScratch) call GetSRAMBank hlcoord 0, 0 ld de, sScratch @@ -738,7 +738,7 @@ Function24423: ; 24423 call CopyBytes call CloseSRAM call OverworldTextModeSwitch - xor a + xor a ; effectively ld a, BANK(sScratch) call GetSRAMBank ld hl, sScratch decoord 0, 0 diff --git a/engine/mon_stats.asm b/engine/mon_stats.asm index a3039eefd..dbaf635bb 100644 --- a/engine/mon_stats.asm +++ b/engine/mon_stats.asm @@ -174,7 +174,7 @@ GetGender: ; 50bdd ; sBoxMon data is read directly from SRAM. ld a, [MonType] cp BOXMON - ld a, 1 + ld a, BANK(sBox) call z, GetSRAMBank ; Attack DV diff --git a/engine/mystery_gift.asm b/engine/mystery_gift.asm index 67ce10168..9a8c41f91 100755 --- a/engine/mystery_gift.asm +++ b/engine/mystery_gift.asm @@ -1561,7 +1561,7 @@ Function10578c: ; 10578c (41:578c) ld a, [sCrystalData + 0] ld [de], a inc de - ld a, $4 + ld a, 4 ; MBC30 bank used by JP Crystal; inaccessible by MBC3 call GetSRAMBank ld hl, $a603 ld bc, $8 diff --git a/engine/routines/emptyallsrambanks.asm b/engine/routines/emptyallsrambanks.asm index aa4b28e0d..8b060f3ef 100644 --- a/engine/routines/emptyallsrambanks.asm +++ b/engine/routines/emptyallsrambanks.asm @@ -1,11 +1,11 @@ EmptyAllSRAMBanks: ; 4cf1f - ld a, $0 + ld a, 0 call .EmptyBank - ld a, $1 + ld a, 1 call .EmptyBank - ld a, $2 + ld a, 2 call .EmptyBank - ld a, $3 + ld a, 3 call .EmptyBank ret diff --git a/engine/rtc.asm b/engine/rtc.asm index dc49a9630..bed0fcda4 100755 --- a/engine/rtc.asm +++ b/engine/rtc.asm @@ -146,7 +146,7 @@ Function140ae: ; 140ae farcall ClearDailyTimers farcall Function170923 ; mobile - ld a, $5 + ld a, 5 ; MBC30 bank used by JP Crystal; inaccessible by MBC3 call GetSRAMBank ld a, [$aa8c] inc a diff --git a/engine/save.asm b/engine/save.asm index af24b4d2f..a869d903e 100644 --- a/engine/save.asm +++ b/engine/save.asm @@ -418,7 +418,7 @@ EraseHallOfFame: ; 14d06 Function14d18: ; 14d18 ; XXX ; copy .Data to SRA4:a007 - ld a, $4 + ld a, 4 ; MBC30 bank used by JP Crystal; inaccessible by MBC3 call GetSRAMBank ld hl, .Data ld de, $a007 @@ -454,7 +454,7 @@ SaveData: ; 14d68 Function14d6c: ; 14d6c ; XXX - ld a, $4 + ld a, 4 ; MBC30 bank used by JP Crystal; inaccessible by MBC3 call GetSRAMBank ld a, [$a60b] ld b, $0 @@ -471,7 +471,7 @@ Function14d6c: ; 14d6c Function14d83: ; 14d83 ; XXX - ld a, $4 + ld a, 4 ; MBC30 bank used by JP Crystal; inaccessible by MBC3 call GetSRAMBank xor a ld [$a60c], a @@ -482,7 +482,7 @@ Function14d83: ; 14d83 Function14d93: ; 14d93 ; XXX - ld a, $7 + ld a, 7 ; MBC30 bank used by JP Crystal; inaccessible by MBC3 call GetSRAMBank xor a ld [$a000], a