shithub: pokered

Download patch

ref: f90b3fece14e1ee60a224ab9bde1771e5d98d47c
parent: 22e331c330cd1a258350ce2d03154c6cb9371735
author: Bryan Bishop <kanzure@gmail.com>
date: Tue Jan 10 12:35:03 EST 2012

RockTunnel1 texts and update gbz80disasm to not handle $8

hg-commit-id: 86d0d495afbc


--- a/extras/gbz80disasm.py
+++ b/extras/gbz80disasm.py
@@ -261,7 +261,7 @@
   [ "LD DE, ?", 0x11, 2 ], 
   [ "LD HL, ?", 0x21, 2 ], 
   [ "LD SP, ?", 0x31, 2 ], 
-  [ "LD [?], SP", 0x8, 2 ], 
+#  [ "LD [?], SP", 0x8, 2 ], 
   [ "LD [?], A", 0xea, 2 ], 
   [ "NOP", 0x0, 0 ], 
   [ "OR A", 0xb7, 0 ], 
@@ -735,10 +735,12 @@
                     keep_reading = False
                     is_data = False #cleanup
                     break
-                
-        if is_data and keep_reading:
-            output += spacing + "db $" + hex(ord(rom[offset+1]))[2:] #+ " ; " + hex(offset)
+        else:                
+#        if is_data and keep_reading:
+            output += spacing + "db $" + hex(ord(rom[offset]))[2:] #+ " ; " + hex(offset)
             output += "\n"
+            offset += 1
+            current_byte_number += 1
         #else the while loop would have spit out the opcode
 
         #these two are done prior
--- a/pokered.asm
+++ b/pokered.asm
@@ -15902,29 +15902,42 @@
     dw $45f6 ; objects
 
 INCBIN "baserom.gbc",$444dc,$4455a - $444dc
+
 RockTunnel1Text1: ; 0x4455a
-    db $08 ; asm
+    db $8
     ld hl, $4505
-    jr .asm_bcf23 ; 0x4455e
-    ld [$1121], sp
-    ld b, l
-    jr .asm_bcf23 ; 0x44564
-    ld [$1d21], sp
-    ld b, l
-    jr .asm_bcf23 ; 0x4456a
-    ld [$2921], sp
-    ld b, l
-    jr .asm_bcf23 ; 0x44570
-    ld [$3521], sp
-    ld b, l
-    jr .asm_bcf23 ; 0x44576
-    ld [$4121], sp
-    ld b, l
-    jr .asm_bcf23 ; 0x4457c
-    ld [$4d21], sp
-    ld b, l
-.asm_bcf23 ; 0x44582
-    call LoadTrainerHeader
+    jr asm_0c916 ; 0x4455e $22
+
+RockTunnel1Text2:
+    db $8
+    ld hl, $4511
+    jr asm_0c916 ; 0x44564 $1c
+
+RockTunnel1Text3:
+    db $8
+    ld hl, $451d
+    jr asm_0c916 ; 0x4456a $16
+
+RockTunnel1Text4:
+    db $8
+    ld hl, $4529
+    jr asm_0c916 ; 0x44570 $10
+
+RockTunnel1Text5:
+    db $8
+    ld hl, $4535
+    jr asm_0c916 ; 0x44576 $a
+
+RockTunnel1Text6:
+    db $8
+    ld hl, $4541
+    jr asm_0c916 ; 0x4457c $4
+
+RockTunnel1Text7:
+    db $8
+    ld hl, $454d
+asm_0c916: ; 0x44582
+    call $31cc
     jp $24d7
 
 INCBIN "baserom.gbc",$44588,$69