summaryrefslogtreecommitdiff
path: root/home/sram.asm
diff options
context:
space:
mode:
authorPikalaxALT <PikalaxALT@gmail.com>2016-01-29 18:36:31 -0500
committerPikalaxALT <PikalaxALT@gmail.com>2016-01-29 18:36:31 -0500
commit2bf93c5905319e9181f87b3f83cd3bce7b9feeca (patch)
tree3ebf17c8879e5d6243d81aac8f1c36eb226fac26 /home/sram.asm
parented3f9395f6d45f6554ed9d9c49c41ea86a8e2447 (diff)
Import stuff from pokecrystal; diff gold and silver
Diffstat (limited to 'home/sram.asm')
-rw-r--r--home/sram.asm20
1 files changed, 20 insertions, 0 deletions
diff --git a/home/sram.asm b/home/sram.asm
new file mode 100644
index 00000000..05d4fdb6
--- /dev/null
+++ b/home/sram.asm
@@ -0,0 +1,20 @@
+
+OpenSRAM::
+ push af ; 30e1
+ ld a, $1 ; 30e2
+ ld [MBC3LatchClock], a ; 30e4
+ ld a, $a ; 30e7
+ ld [MBC3SRamEnable], a ; 30e9
+ pop af ; 30ec
+ ld [MBC3SRamBank], a ; 30ed
+ ret ; 30f0
+; 30f1
+
+CloseSRAM::
+ push af ; 30f1
+ ld a, $0 ; 30f2
+ ld [MBC3LatchClock], a ; 30f4
+ ld [MBC3SRamEnable], a ; 30f7
+ pop af ; 30fa
+ ret ; 30fb
+; 30fc