mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08:00
Use BANK for hardcoded SRAM banks (except for vestigial refs to JP's banks 4-7)
This commit is contained in:
parent
ce985a09a7
commit
d6f20ae746
@ -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
|
||||
|
@ -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]
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user