You've already forked pokecrystal-board
mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-04-09 05:44:44 -07:00
Harmonize engine/{movie, pokemon} with pokegold (renames GetSRAMBank to OpenSRAM)
To do: engine/{menus, overworld}
This commit is contained in:
@@ -118,7 +118,7 @@ LoadFontsExtra2:
|
||||
DecompressRequest2bpp::
|
||||
push de
|
||||
ld a, BANK(sScratch)
|
||||
call GetSRAMBank
|
||||
call OpenSRAM
|
||||
push bc
|
||||
|
||||
ld de, sScratch
|
||||
|
@@ -205,7 +205,7 @@ ClearsScratch::
|
||||
; Wipe the first 32 bytes of sScratch
|
||||
|
||||
ld a, BANK(sScratch)
|
||||
call GetSRAMBank
|
||||
call OpenSRAM
|
||||
ld hl, sScratch
|
||||
ld bc, $20
|
||||
xor a
|
||||
|
@@ -1,11 +1,10 @@
|
||||
GetSRAMBank::
|
||||
; load sram bank a
|
||||
OpenSRAM::
|
||||
; if invalid bank, sram is disabled
|
||||
cp NUM_SRAM_BANKS
|
||||
jr c, OpenSRAM
|
||||
jr c, .valid
|
||||
jr CloseSRAM
|
||||
|
||||
OpenSRAM::
|
||||
.valid:
|
||||
; switch to sram bank a
|
||||
push af
|
||||
; latch clock data
|
||||
|
@@ -261,7 +261,7 @@ UnreferencedClearRTCStatus::
|
||||
xor a
|
||||
push af
|
||||
ld a, BANK(sRTCStatusFlags)
|
||||
call GetSRAMBank
|
||||
call OpenSRAM
|
||||
pop af
|
||||
ld [sRTCStatusFlags], a
|
||||
call CloseSRAM
|
||||
@@ -272,7 +272,7 @@ RecordRTCStatus::
|
||||
ld hl, sRTCStatusFlags
|
||||
push af
|
||||
ld a, BANK(sRTCStatusFlags)
|
||||
call GetSRAMBank
|
||||
call OpenSRAM
|
||||
pop af
|
||||
or [hl]
|
||||
ld [hl], a
|
||||
@@ -282,7 +282,7 @@ RecordRTCStatus::
|
||||
CheckRTCStatus::
|
||||
; check sRTCStatusFlags
|
||||
ld a, BANK(sRTCStatusFlags)
|
||||
call GetSRAMBank
|
||||
call OpenSRAM
|
||||
ld a, [sRTCStatusFlags]
|
||||
call CloseSRAM
|
||||
ret
|
||||
|
Reference in New Issue
Block a user