summaryrefslogtreecommitdiff
path: root/home/sram.asm
diff options
context:
space:
mode:
authorRangi <remy.oukaour+rangi42@gmail.com>2020-07-13 13:05:05 -0400
committerRangi <remy.oukaour+rangi42@gmail.com>2020-07-13 15:18:28 -0400
commite239aa4aba89156ac52b2af26d1bbf084ee88e75 (patch)
tree28e1dd069acc5c1a88662ce275f7102da68f3c4e /home/sram.asm
parent4fb008844030283ad34cb0802b088b4dd7c9891c (diff)
Disassemble the final English debug ROM
Diffstat (limited to 'home/sram.asm')
-rw-r--r--home/sram.asm16
1 files changed, 16 insertions, 0 deletions
diff --git a/home/sram.asm b/home/sram.asm
index baf21bb32..6999f7ed8 100644
--- a/home/sram.asm
+++ b/home/sram.asm
@@ -2,6 +2,22 @@ OpenSRAM::
; if invalid bank, sram is disabled
cp NUM_SRAM_BANKS
jr c, .valid
+if DEF(_DEBUG)
+ push af
+ push bc
+ ld b, 1
+.loop
+ sla b
+ dec a
+ jr nz, .loop
+ ld a, BANK(sOpenedInvalidSRAM)
+ call OpenSRAM
+ ld a, [sOpenedInvalidSRAM]
+ or b
+ ld [sOpenedInvalidSRAM], a
+ pop bc
+ pop af
+endc
jr CloseSRAM
.valid: