summaryrefslogtreecommitdiff
path: root/engine/empty_sram.asm
diff options
context:
space:
mode:
authoryenatch <yenatch@gmail.com>2017-12-23 17:14:09 -0500
committeryenatch <yenatch@gmail.com>2017-12-23 17:14:09 -0500
commitc51968f0de6b8420c141dde27339e82a42837c5b (patch)
tree782f2b25f21adacb48fd516694b8a82864fe0b99 /engine/empty_sram.asm
parentc883ab4d34ecb4890010e808d6b6d533f5d8ad56 (diff)
parent878092004956418bfd77bfdb9fc9dd7f640f80d2 (diff)
Merge remote-tracking branch 'origin/master' into master
Diffstat (limited to 'engine/empty_sram.asm')
-rw-r--r--engine/empty_sram.asm19
1 files changed, 19 insertions, 0 deletions
diff --git a/engine/empty_sram.asm b/engine/empty_sram.asm
new file mode 100644
index 000000000..aa4b28e0d
--- /dev/null
+++ b/engine/empty_sram.asm
@@ -0,0 +1,19 @@
+EmptyAllSRAMBanks: ; 4cf1f
+ ld a, $0
+ call .EmptyBank
+ ld a, $1
+ call .EmptyBank
+ ld a, $2
+ call .EmptyBank
+ ld a, $3
+ call .EmptyBank
+ ret
+
+.EmptyBank: ; 4cf34
+ call GetSRAMBank
+ ld hl, SRAM_Begin
+ ld bc, SRAM_End - SRAM_Begin
+ xor a
+ call ByteFill
+ call CloseSRAM
+ ret