From e7995159310f059727479a350801ef5fc66b90c8 Mon Sep 17 00:00:00 2001 From: mid-kid Date: Tue, 25 Feb 2020 19:38:24 +0100 Subject: [PATCH] Fix SRAM references in Function140ae --- engine/rtc/rtc.asm | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/engine/rtc/rtc.asm b/engine/rtc/rtc.asm index f79c3f297..00098c0e5 100644 --- a/engine/rtc/rtc.asm +++ b/engine/rtc/rtc.asm @@ -136,15 +136,14 @@ Function140ae: .time_overflow farcall ClearDailyTimers farcall Function170923 -; mobile - ld a, 5 ; MBC30 bank used by JP Crystal; inaccessible by MBC3 + ld a, BANK(s5_aa8c) ; and BANK(s5_b2fa) call GetSRAMBank - ld a, [$aa8c] ; address of MBC30 bank + ld a, [s5_aa8c] inc a - ld [$aa8c], a ; address of MBC30 bank - ld a, [$b2fa] ; address of MBC30 bank + ld [s5_aa8c], a + ld a, [s5_b2fa] inc a - ld [$b2fa], a ; address of MBC30 bank + ld [s5_b2fa], a call CloseSRAM ret