Difference between revisions of "0013018c - 00130624"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
(Created page with "<font face='Courier New'> 0013018c: 27bdffd0 addiu r29,r29,0xffd0 00130190: afb40020 sw r20,0x0020(r29) 00130194: 0080a021 addu r20,r4,r0 00130198: afb50024 sw r21,0x002...")
 
 
(2 intermediate revisions by the same user not shown)
Line 56: Line 56:
 
  00130260: 3c011f80 lui r1,0x1f80
 
  00130260: 3c011f80 lui r1,0x1f80
 
  00130264: ac20002c sw r0,0x002c(r1)
 
  00130264: ac20002c sw r0,0x002c(r1)
  00130268: 92230000 lbu r3,0x0000(r17)
+
  00130268: 92230000 lbu r3,0x0000(r17)           # r3 = Load a byte of text data from the text pointer
  0013026c: 340200f8 ori r2,r0,0x00f8
+
  0013026c: 340200f8 ori r2,r0,0x00f8             # r2 = 0xF8: {Newline}
  00130270: 10620005 beq r3,r2,0x00130288
+
  00130270: 10620005 beq r3,r2,0x00130288         # Branch if text data was {Newline}
  00130274: ae030000 sw r3,0x0000(r16)
+
  00130274: ae030000 sw r3,0x0000(r16)             # Save text data to r16
  00130278: 2462ff02 addiu r2,r3,0xff02
+
  00130278: 2462ff02 addiu r2,r3,0xff02           # r2 = text data - 0xFE
  0013027c: 2c420002 sltiu r2,r2,0x0002
+
  0013027c: 2c420002 sltiu r2,r2,0x0002           # r2 = 0x01 if text data byte was 0xFE ({end}) or 0xFF ({close})
  00130280: 10400024 beq r2,r0,0x00130314
+
  00130280: 10400024 beq r2,r0,0x00130314         # Branch if not 0xFE or 0xFF
  00130284: 340200fa ori r2,r0,0x00fa
+
  00130284: 340200fa ori r2,r0,0x00fa             # r2 = 0xFA (space)
  00130288: 8e02000c lw r2,0x000c(r16)
+
  00130288: 8e02000c lw r2,0x000c(r16)             # -- # code for {Newline}, {end} or {close}
 
  0013028c: 8e030004 lw r3,0x0004(r16)
 
  0013028c: 8e030004 lw r3,0x0004(r16)
 
  00130290: 00021080 sll r2,r2,0x02
 
  00130290: 00021080 sll r2,r2,0x02
Line 85: Line 85:
 
  001302d4: 8e02001c lw r2,0x001c(r16)
 
  001302d4: 8e02001c lw r2,0x001c(r16)
 
  001302d8: 00000000 nop
 
  001302d8: 00000000 nop
  001302dc: 14530006 bne r2,r19,0x001302f8
+
  001302dc: 14530006 bne r2,r19,0x001302f8           # -- # Branch if r2 =/= 0xFFFF
 
  001302e0: 00408821 addu r17,r2,r0
 
  001302e0: 00408821 addu r17,r2,r0
 
  001302e4: 8e02000c lw r2,0x000c(r16)
 
  001302e4: 8e02000c lw r2,0x000c(r16)
Line 98: Line 98:
 
  00130308: 24420001 addiu r2,r2,0x0001
 
  00130308: 24420001 addiu r2,r2,0x0001
 
  0013030c: 0804c11e j 0x00130478
 
  0013030c: 0804c11e j 0x00130478
  00130310: ae02000c sw r2,0x000c(r16)
+
  00130310: ae02000c sw r2,0x000c(r16)               # -- # End of code for {Newline}/{end}/{close}
  00130314: 14620006 bne r3,r2,0x00130330
+
  00130314: 14620006 bne r3,r2,0x00130330             # Branch if not {0xFA}: Space
  00130318: 340200e8 ori r2,r0,0x00e8
+
  00130318: 340200e8 ori r2,r0,0x00e8                 # r2 = {0xE8}: Next decimal number will use exactly ?? spaces
 
  0013031c: 8e020004 lw r2,0x0004(r16)
 
  0013031c: 8e020004 lw r2,0x0004(r16)
 
  00130320: 00000000 nop
 
  00130320: 00000000 nop
 
  00130324: 24420004 addiu r2,r2,0x0004
 
  00130324: 24420004 addiu r2,r2,0x0004
 
  00130328: 0804c11e j 0x00130478
 
  00130328: 0804c11e j 0x00130478
  0013032c: ae020004 sw r2,0x0004(r16)
+
  0013032c: ae020004 sw r2,0x0004(r16)               # -- # End of code for Space
  00130330: 14620008 bne r3,r2,0x00130354
+
  00130330: 14620008 bne r3,r2,0x00130354             # Branch if not {0xE8}: Next decimal number will use exactly ?? spaces
  00130334: 340200e4 ori r2,r0,0x00e4
+
  00130334: 340200e4 ori r2,r0,0x00e4                 # r2 = {0xE4}: Print next text variable as a decimal value
 
  00130338: 02002021 addu r4,r16,r0
 
  00130338: 02002021 addu r4,r16,r0
 
  0013033c: 0c04c1c6 jal 0x00130718
 
  0013033c: 0c04c1c6 jal 0x00130718
Line 114: Line 114:
 
  00130348: 92220000 lbu r2,0x0000(r17)
 
  00130348: 92220000 lbu r2,0x0000(r17)
 
  0013034c: 0804c11e j 0x00130478
 
  0013034c: 0804c11e j 0x00130478
  00130350: ae020028 sw r2,0x0028(r16)
+
  00130350: ae020028 sw r2,0x0028(r16)               # -- # End of code for {0xE8}
  00130354: 1462001b bne r3,r2,0x001303c4
+
  00130354: 1462001b bne r3,r2,0x001303c4             # Branch if not {0xE4}: Print next text variable as a decimal value
  00130358: 340200e6 ori r2,r0,0x00e6
+
  00130358: 340200e6 ori r2,r0,0x00e6                 # r2 = {0xE6}: Print a defined text variable as a decimal value
 
  0013035c: 8e020024 lw r2,0x0024(r16)
 
  0013035c: 8e020024 lw r2,0x0024(r16)
 
  00130360: 8e030028 lw r3,0x0028(r16)
 
  00130360: 8e030028 lw r3,0x0028(r16)
Line 142: Line 142:
 
  001303b8: 24420004 addiu r2,r2,0x0004
 
  001303b8: 24420004 addiu r2,r2,0x0004
 
  001303bc: 0804c11e j 0x00130478
 
  001303bc: 0804c11e j 0x00130478
  001303c0: ae020024 sw r2,0x0024(r16)
+
  001303c0: ae020024 sw r2,0x0024(r16)           # -- # End of code for {0xE4}: Print next text variable as a decimal value
  001303c4: 1462001e bne r3,r2,0x00130440
+
  001303c4: 1462001e bne r3,r2,0x00130440         # Branch if not {0xE6}: Print a defined text variable as a decimal value
  001303c8: 2462ff1e addiu r2,r3,0xff1e
+
  001303c8: 2462ff1e addiu r2,r3,0xff1e           # r2 = text data value - 0xE2
 
  001303cc: 02002021 addu r4,r16,r0
 
  001303cc: 02002021 addu r4,r16,r0
 
  001303d0: 0c04c1c6 jal 0x00130718
 
  001303d0: 0c04c1c6 jal 0x00130718
Line 173: Line 173:
 
  00130434: 00431021 addu r2,r2,r3
 
  00130434: 00431021 addu r2,r2,r3
 
  00130438: 0804c11e j 0x00130478
 
  00130438: 0804c11e j 0x00130478
  0013043c: ae020004 sw r2,0x0004(r16)
+
  0013043c: ae020004 sw r2,0x0004(r16)           # -- # End of code for {0xE6}: Print a defined text variable as a decimal value
  00130440: 2c420002 sltiu r2,r2,0x0002
+
  00130440: 2c420002 sltiu r2,r2,0x0002           # r2 = 0x01 if text data value is 0xE3 or 0xE2
  00130444: 14400007 bne r2,r0,0x00130464
+
  00130444: 14400007 bne r2,r0,0x00130464         # Branch if {0xE2} (Delay:) or {0xE3} (Color:)
  00130448: 02002021 addu r4,r16,r0
+
  00130448: 02002021 addu r4,r16,r0               # r4 = r16
  0013044c: 2462ff0b addiu r2,r3,0xff0b
+
  0013044c: 2462ff0b addiu r2,r3,0xff0b           # r2 = Text data value -0xF5
  00130450: 2c420002 sltiu r2,r2,0x0002
+
  00130450: 2c420002 sltiu r2,r2,0x0002           # r2 = 0x01 if {0xF5} or {0xF6} (both unknown)
  00130454: 14400003 bne r2,r0,0x00130464
+
  00130454: 14400003 bne r2,r0,0x00130464         # Branch if {0xF5} or {0xF6}
  00130458: 340200ec ori r2,r0,0x00ec
+
  00130458: 340200ec ori r2,r0,0x00ec             # r2 - 0xEC (displays a portrait?)
  0013045c: 14620006 bne r3,r2,0x00130478
+
  0013045c: 14620006 bne r3,r2,0x00130478         # Branch if not {0xEC}
  00130460: 00000000 nop
+
  00130460: 00000000 nop                         # -- # If {Delay}, {Color}, {0xEC}, {0xF5}, or {0xF6}:
  00130464: 0c04c1c6 jal 0x00130718
+
  00130464: 0c04c1c6 jal 0x00130718               # [[00130718 - 001307d0]]
 
  00130468: 02202821 addu r5,r17,r0
 
  00130468: 02202821 addu r5,r17,r0
 
  0013046c: 02002021 addu r4,r16,r0
 
  0013046c: 02002021 addu r4,r16,r0
 
  00130470: 0804c176 j 0x001305d8
 
  00130470: 0804c176 j 0x001305d8
  00130474: 00402821 addu r5,r2,r0
+
  00130474: 00402821 addu r5,r2,r0                     # -- # End of code for {Delay}, {Color}, {0xEC}, {0xF5}, or {0xF6}
  00130478: 8e020024 lw r2,0x0024(r16)
+
  00130478: 8e020024 lw r2,0x0024(r16)                 # r2 = Pointer to current Text Variable
  0013047c: 8e040000 lw r4,0x0000(r16)
+
  0013047c: 8e040000 lw r4,0x0000(r16)                 # r4 = Value of text character
  00130480: 8c450000 lw r5,0x0000(r2)
+
  00130480: 8c450000 lw r5,0x0000(r2)                 # r5 = Value of Text Variable
  00130484: 0c04bf48 jal 0x0012fd20
+
  00130484: 0c04bf48 jal 0x0012fd20                   # [[Text Format String Fetching]]
 
  00130488: 00000000 nop
 
  00130488: 00000000 nop
  0013048c: 10530014 beq r2,r19,0x001304e0
+
  0013048c: 10530014 beq r2,r19,0x001304e0             # Branch if r2 = 0xFFFF (this was not a String Fetching value)
  00130490: ae020010 sw r2,0x0010(r16)
+
  00130490: ae020010 sw r2,0x0010(r16)                 # Store String Fetching result
  00130494: 8e030000 lw r3,0x0000(r16)
+
  00130494: 8e030000 lw r3,0x0000(r16)                 # r3 = Value of text character
 
  00130498: 26220001 addiu r2,r17,0x0001
 
  00130498: 26220001 addiu r2,r17,0x0001
 
  0013049c: ae02001c sw r2,0x001c(r16)
 
  0013049c: ae02001c sw r2,0x001c(r16)
  001304a0: 340200e0 ori r2,r0,0x00e0
+
  001304a0: 340200e0 ori r2,r0,0x00e0                 # r2 = 0xE0: {Ramza}
  001304a4: 14620005 bne r3,r2,0x001304bc
+
  001304a4: 14620005 bne r3,r2,0x001304bc             # Branch if not {Ramza}
 
  001304a8: 00000000 nop
 
  001304a8: 00000000 nop
 
  001304ac: 3c118017 lui r17,0x8017
 
  001304ac: 3c118017 lui r17,0x8017
  001304b0: 263120bc addiu r17,r17,0x20bc
+
  001304b0: 263120bc addiu r17,r17,0x20bc             # r17 = 0x801720bc: Location where Ramza's name is stored?
 
  001304b4: 0804c133 j 0x001304cc
 
  001304b4: 0804c133 j 0x001304cc
 
  001304b8: 00000000 nop
 
  001304b8: 00000000 nop
  001304bc: 8e040010 lw r4,0x0010(r16)
+
  001304bc: 8e040010 lw r4,0x0010(r16)                 # r4 = String Fetching result
  001304c0: 0c04ca09 jal 0x00132824
+
  001304c0: 0c04ca09 jal 0x00132824                   # [[Prep for Loading Text]]
 
  001304c4: 00000000 nop
 
  001304c4: 00000000 nop
  001304c8: 00408821 addu r17,r2,r0
+
  001304c8: 00408821 addu r17,r2,r0                   # r17 = Text Pointer (location of text to load)
  001304cc: 8e020024 lw r2,0x0024(r16)
+
  001304cc: 8e020024 lw r2,0x0024(r16)                 # r2 = Pointer to current Text Variable
 
  001304d0: 00000000 nop
 
  001304d0: 00000000 nop
  001304d4: 24420004 addiu r2,r2,0x0004
+
  001304d4: 24420004 addiu r2,r2,0x0004               # r2 = point at the next Text Variable
  001304d8: 0804c09a j 0x00130268
+
  001304d8: 0804c09a j 0x00130268                     # Loop back and redo this code with the newly loaded text byte value
  001304dc: ae020024 sw r2,0x0024(r16)
+
  001304dc: ae020024 sw r2,0x0024(r16)                 # Store new Text Variable pointer
  001304e0: 8e040000 lw r4,0x0000(r16)
+
  001304e0: 8e040000 lw r4,0x0000(r16)                 # r4 = Load value of text character
  001304e4: 340200f0 ori r2,r0,0x00f0
+
  001304e4: 340200f0 ori r2,r0,0x00f0                 # r2 = 0xF0
  001304e8: 308300f0 andi r3,r4,0x00f0
+
  001304e8: 308300f0 andi r3,r4,0x00f0                 # r3 = r4 but without the lowest digit
  001304ec: 14620020 bne r3,r2,0x00130570
+
  001304ec: 14620020 bne r3,r2,0x00130570             # Branch if text character isn't 0xF0-0xFF
  001304f0: 286200d0 slti r2,r3,0x00d0
+
  001304f0: 286200d0 slti r2,r3,0x00d0                 # r2 = 0x01 if text character is less than 0xD0
  001304f4: 3082000f andi r2,r4,0x000f
+
  001304f4: 3082000f andi r2,r4,0x000f                 # r2 = r4 but without the highest digit
  001304f8: 28420004 slti r2,r2,0x0004
+
  001304f8: 28420004 slti r2,r2,0x0004                 # r2 = 0x01 if text character is 0xF0-0xF3 (unknown? doesn't open dialogue)
  001304fc: 1040001b beq r2,r0,0x0013056c
+
  001304fc: 1040001b beq r2,r0,0x0013056c             # Branch if not 0xF0-0xF3
 
  00130500: 26220003 addiu r2,r17,0x0003
 
  00130500: 26220003 addiu r2,r17,0x0003
 
  00130504: ae02001c sw r2,0x001c(r16)
 
  00130504: ae02001c sw r2,0x001c(r16)
Line 247: Line 247:
 
  0013055c: 00431021 addu r2,r2,r3
 
  0013055c: 00431021 addu r2,r2,r3
 
  00130560: 02228823 subu r17,r17,r2
 
  00130560: 02228823 subu r17,r17,r2
  00130564: 0804c09a j 0x00130268
+
  00130564: 0804c09a j 0x00130268                 # loop back
 
  00130568: ae020014 sw r2,0x0014(r16)
 
  00130568: ae020014 sw r2,0x0014(r16)
  0013056c: 286200d0 slti r2,r3,0x00d0
+
  0013056c: 286200d0 slti r2,r3,0x00d0           # -- # end of code for 0xF0-0xFF
  00130570: 14400007 bne r2,r0,0x00130590
+
  00130570: 14400007 bne r2,r0,0x00130590         # Branch if less than 0xD0
  00130574: 340200d0 ori r2,r0,0x00d0
+
  00130574: 340200d0 ori r2,r0,0x00d0             # r2 = 0xD0
  00130578: 14620003 bne r3,r2,0x00130588
+
  00130578: 14620003 bne r3,r2,0x00130588         # Branch if not 0xD0-0xDF
 
  0013057c: 00000000 nop
 
  0013057c: 00000000 nop
  00130580: 0804c174 j 0x001305d0
+
  00130580: 0804c174 j 0x001305d0                
  00130584: ae04002c sw r4,0x002c(r16)
+
  00130584: ae04002c sw r4,0x002c(r16)           # if 0xD0-0xDF, save r4 to 0x2C
 
  00130588: 0804c174 j 0x001305d0
 
  00130588: 0804c174 j 0x001305d0
  0013058c: ae00002c sw r0,0x002c(r16)
+
  0013058c: ae00002c sw r0,0x002c(r16)           # if 0xE0-0xEF, save r0, to 0x2C
  00130590: 8e03002c lw r3,0x002c(r16)
+
  00130590: 8e03002c lw r3,0x002c(r16)           # load 0x2C
 
  00130594: 00000000 nop
 
  00130594: 00000000 nop
 
  00130598: 3063000f andi r3,r3,0x000f
 
  00130598: 3063000f andi r3,r3,0x000f
Line 276: Line 276:
 
  001305d0: 02002021 addu r4,r16,r0
 
  001305d0: 02002021 addu r4,r16,r0
 
  001305d4: 02202821 addu r5,r17,r0
 
  001305d4: 02202821 addu r5,r17,r0
  001305d8: 0c04c1c6 jal 0x00130718
+
  001305d8: 0c04c1c6 jal 0x00130718               # [[00130718 - 001307d0]]
 
  001305dc: 00000000 nop
 
  001305dc: 00000000 nop
  001305e0: 0804c09a j 0x00130268
+
  001305e0: 0804c09a j 0x00130268                 # loop back
 
  001305e4: 00408821 addu r17,r2,r0
 
  001305e4: 00408821 addu r17,r2,r0
 
  001305e8: 96020008 lhu r2,0x0008(r16)
 
  001305e8: 96020008 lhu r2,0x0008(r16)

Latest revision as of 06:05, 20 November 2024

0013018c: 27bdffd0 addiu r29,r29,0xffd0
00130190: afb40020 sw r20,0x0020(r29)
00130194: 0080a021 addu r20,r4,r0
00130198: afb50024 sw r21,0x0024(r29)
0013019c: 00a0a821 addu r21,r5,r0
001301a0: afb10014 sw r17,0x0014(r29)
001301a4: 00c08821 addu r17,r6,r0
001301a8: 00002021 addu r4,r0,r0
001301ac: afbf0028 sw r31,0x0028(r29)
001301b0: afb3001c sw r19,0x001c(r29)
001301b4: afb20018 sw r18,0x0018(r29)
001301b8: 0c0166bc jal 0x00059af0
001301bc: afb00010 sw r16,0x0010(r29)
001301c0: 00402821 addu r5,r2,r0
001301c4: 340400fe ori r4,r0,0x00fe
001301c8: 34030013 ori r3,r0,0x0013
001301cc: 3c028017 lui r2,0x8017
001301d0: 244220cf addiu r2,r2,0x20cf
001301d4: a0440000 sb r4,0x0000(r2)
001301d8: 2463ffff addiu r3,r3,0xffff
001301dc: 0461fffd bgez r3,0x001301d4
001301e0: 2442ffff addiu r2,r2,0xffff
001301e4: 00001821 addu r3,r0,r0
001301e8: 00a31021 addu r2,r5,r3
001301ec: 904200be lbu r2,0x00be(r2)
001301f0: 3c018017 lui r1,0x8017
001301f4: 00230821 addu r1,r1,r3
001301f8: a02220bc sb r2,0x20bc(r1)
001301fc: 24630001 addiu r3,r3,0x0001
00130200: 28620010 slti r2,r3,0x0010
00130204: 1440fff9 bne r2,r0,0x001301ec
00130208: 00a31021 addu r2,r5,r3
0013020c: 3c101f80 lui r16,0x1f80
00130210: 2413ffff addiu r19,r0,0xffff
00130214: 3412ffff ori r18,r0,0xffff
00130218: 2402ffff addiu r2,r0,0xffff
0013021c: 3c011f80 lui r1,0x1f80
00130220: ac22001c sw r2,0x001c(r1)
00130224: 3c028016 lui r2,0x8016
00130228: 24425ef4 addiu r2,r2,0x5ef4
0013022c: 3c011f80 lui r1,0x1f80
00130230: ac220024 sw r2,0x0024(r1)
00130234: 3402ffff ori r2,r0,0xffff
00130238: 3c011f80 lui r1,0x1f80
0013023c: ac200018 sw r0,0x0018(r1)
00130240: 3c011f80 lui r1,0x1f80
00130244: ac200004 sw r0,0x0004(r1)
00130248: 3c011f80 lui r1,0x1f80
0013024c: ac200008 sw r0,0x0008(r1)
00130250: 3c011f80 lui r1,0x1f80
00130254: ac20000c sw r0,0x000c(r1)
00130258: 3c011f80 lui r1,0x1f80
0013025c: ac220028 sw r2,0x0028(r1)
00130260: 3c011f80 lui r1,0x1f80
00130264: ac20002c sw r0,0x002c(r1)
00130268: 92230000 lbu r3,0x0000(r17)            # r3 = Load a byte of text data from the text pointer
0013026c: 340200f8 ori r2,r0,0x00f8              # r2 = 0xF8: {Newline}
00130270: 10620005 beq r3,r2,0x00130288          # Branch if text data was {Newline}
00130274: ae030000 sw r3,0x0000(r16)             # Save text data to r16
00130278: 2462ff02 addiu r2,r3,0xff02            # r2 = text data - 0xFE
0013027c: 2c420002 sltiu r2,r2,0x0002            # r2 = 0x01 if text data byte was 0xFE ({end}) or 0xFF ({close})
00130280: 10400024 beq r2,r0,0x00130314          # Branch if not 0xFE or 0xFF
00130284: 340200fa ori r2,r0,0x00fa              # r2 = 0xFA (space)
00130288: 8e02000c lw r2,0x000c(r16)             # -- # code for {Newline}, {end} or {close}
0013028c: 8e030004 lw r3,0x0004(r16)
00130290: 00021080 sll r2,r2,0x02
00130294: 3c018017 lui r1,0x8017
00130298: 00220821 addu r1,r1,r2
0013029c: ac2320d0 sw r3,0x20d0(r1)
001302a0: 8e020008 lw r2,0x0008(r16)
001302a4: 8e030004 lw r3,0x0004(r16)
001302a8: 00000000 nop
001302ac: 0043102a slt r2,r2,r3
001302b0: 10400002 beq r2,r0,0x001302bc
001302b4: 00000000 nop
001302b8: ae030008 sw r3,0x0008(r16)
001302bc: 8e020000 lw r2,0x0000(r16)
001302c0: 00000000 nop
001302c4: 2442ff02 addiu r2,r2,0xff02
001302c8: 2c420002 sltiu r2,r2,0x0002
001302cc: 1040000c beq r2,r0,0x00130300
001302d0: 00000000 nop
001302d4: 8e02001c lw r2,0x001c(r16)
001302d8: 00000000 nop
001302dc: 14530006 bne r2,r19,0x001302f8            # -- # Branch if r2 =/= 0xFFFF
001302e0: 00408821 addu r17,r2,r0
001302e4: 8e02000c lw r2,0x000c(r16)
001302e8: ae000004 sw r0,0x0004(r16)
001302ec: 24420001 addiu r2,r2,0x0001
001302f0: 0804c17a j 0x001305e8
001302f4: ae02000c sw r2,0x000c(r16)
001302f8: 0804c09a j 0x00130268
001302fc: ae13001c sw r19,0x001c(r16)
00130300: 8e02000c lw r2,0x000c(r16)
00130304: ae000004 sw r0,0x0004(r16)
00130308: 24420001 addiu r2,r2,0x0001
0013030c: 0804c11e j 0x00130478
00130310: ae02000c sw r2,0x000c(r16)                # -- # End of code for {Newline}/{end}/{close}
00130314: 14620006 bne r3,r2,0x00130330             # Branch if not {0xFA}: Space
00130318: 340200e8 ori r2,r0,0x00e8                 # r2 = {0xE8}: Next decimal number will use exactly ?? spaces
0013031c: 8e020004 lw r2,0x0004(r16)
00130320: 00000000 nop
00130324: 24420004 addiu r2,r2,0x0004
00130328: 0804c11e j 0x00130478
0013032c: ae020004 sw r2,0x0004(r16)                # -- # End of code for Space
00130330: 14620008 bne r3,r2,0x00130354             # Branch if not {0xE8}: Next decimal number will use exactly ?? spaces
00130334: 340200e4 ori r2,r0,0x00e4                 # r2 = {0xE4}: Print next text variable as a decimal value
00130338: 02002021 addu r4,r16,r0
0013033c: 0c04c1c6 jal 0x00130718
00130340: 02202821 addu r5,r17,r0
00130344: 00408821 addu r17,r2,r0
00130348: 92220000 lbu r2,0x0000(r17)
0013034c: 0804c11e j 0x00130478
00130350: ae020028 sw r2,0x0028(r16)                # -- # End of code for {0xE8}
00130354: 1462001b bne r3,r2,0x001303c4             # Branch if not {0xE4}: Print next text variable as a decimal value
00130358: 340200e6 ori r2,r0,0x00e6                 # r2 = {0xE6}: Print a defined text variable as a decimal value
0013035c: 8e020024 lw r2,0x0024(r16)
00130360: 8e030028 lw r3,0x0028(r16)
00130364: 8c440000 lw r4,0x0000(r2)
00130368: 1472000a bne r3,r18,0x00130394
0013036c: ae040010 sw r4,0x0010(r16)
00130370: 0c04ca17 jal 0x0013285c
00130374: 00000000 nop
00130378: 00021840 sll r3,r2,0x01
0013037c: 00621821 addu r3,r3,r2
00130380: 8e020004 lw r2,0x0004(r16)
00130384: 00031840 sll r3,r3,0x01
00130388: 00621821 addu r3,r3,r2
0013038c: 0804c0ec j 0x001303b0
00130390: ae030004 sw r3,0x0004(r16)
00130394: 00031040 sll r2,r3,0x01
00130398: 00431021 addu r2,r2,r3
0013039c: 8e030004 lw r3,0x0004(r16)
001303a0: 00021040 sll r2,r2,0x01
001303a4: ae120028 sw r18,0x0028(r16)
001303a8: 00431021 addu r2,r2,r3
001303ac: ae020004 sw r2,0x0004(r16)
001303b0: 8e020024 lw r2,0x0024(r16)
001303b4: 00000000 nop
001303b8: 24420004 addiu r2,r2,0x0004
001303bc: 0804c11e j 0x00130478
001303c0: ae020024 sw r2,0x0024(r16)            # -- # End of code for {0xE4}: Print next text variable as a decimal value
001303c4: 1462001e bne r3,r2,0x00130440         # Branch if not {0xE6}: Print a defined text variable as a decimal value
001303c8: 2462ff1e addiu r2,r3,0xff1e           # r2 = text data value - 0xE2
001303cc: 02002021 addu r4,r16,r0
001303d0: 0c04c1c6 jal 0x00130718
001303d4: 02202821 addu r5,r17,r0
001303d8: 00408821 addu r17,r2,r0
001303dc: 92220000 lbu r2,0x0000(r17)
001303e0: 8e030028 lw r3,0x0028(r16)
001303e4: 00021080 sll r2,r2,0x02
001303e8: 3c018016 lui r1,0x8016
001303ec: 00220821 addu r1,r1,r2
001303f0: 8c245ef4 lw r4,0x5ef4(r1)
001303f4: 1472000a bne r3,r18,0x00130420
001303f8: ae040010 sw r4,0x0010(r16)
001303fc: 0c04ca17 jal 0x0013285c
00130400: 00000000 nop
00130404: 00021840 sll r3,r2,0x01
00130408: 00621821 addu r3,r3,r2
0013040c: 8e020004 lw r2,0x0004(r16)
00130410: 00031840 sll r3,r3,0x01
00130414: 00621821 addu r3,r3,r2
00130418: 0804c11e j 0x00130478
0013041c: ae030004 sw r3,0x0004(r16)
00130420: 00031040 sll r2,r3,0x01
00130424: 00431021 addu r2,r2,r3
00130428: 8e030004 lw r3,0x0004(r16)
0013042c: 00021040 sll r2,r2,0x01
00130430: ae120028 sw r18,0x0028(r16)
00130434: 00431021 addu r2,r2,r3
00130438: 0804c11e j 0x00130478
0013043c: ae020004 sw r2,0x0004(r16)            # -- # End of code for {0xE6}: Print a defined text variable as a decimal value
00130440: 2c420002 sltiu r2,r2,0x0002           # r2 = 0x01 if text data value is 0xE3 or 0xE2
00130444: 14400007 bne r2,r0,0x00130464         # Branch if {0xE2} (Delay:) or {0xE3} (Color:)
00130448: 02002021 addu r4,r16,r0               # r4 = r16
0013044c: 2462ff0b addiu r2,r3,0xff0b           # r2 = Text data value -0xF5
00130450: 2c420002 sltiu r2,r2,0x0002           # r2 = 0x01 if {0xF5} or {0xF6} (both unknown)
00130454: 14400003 bne r2,r0,0x00130464         # Branch if {0xF5} or {0xF6}
00130458: 340200ec ori r2,r0,0x00ec             # r2 - 0xEC (displays a portrait?)
0013045c: 14620006 bne r3,r2,0x00130478         # Branch if not {0xEC}
00130460: 00000000 nop                          # -- # If {Delay}, {Color}, {0xEC}, {0xF5}, or {0xF6}:
00130464: 0c04c1c6 jal 0x00130718               # 00130718 - 001307d0
00130468: 02202821 addu r5,r17,r0
0013046c: 02002021 addu r4,r16,r0
00130470: 0804c176 j 0x001305d8
00130474: 00402821 addu r5,r2,r0                     # -- # End of code for {Delay}, {Color}, {0xEC}, {0xF5}, or {0xF6}
00130478: 8e020024 lw r2,0x0024(r16)                 # r2 = Pointer to current Text Variable
0013047c: 8e040000 lw r4,0x0000(r16)                 # r4 = Value of text character
00130480: 8c450000 lw r5,0x0000(r2)                  # r5 = Value of Text Variable
00130484: 0c04bf48 jal 0x0012fd20                    # Text Format String Fetching
00130488: 00000000 nop
0013048c: 10530014 beq r2,r19,0x001304e0             # Branch if r2 = 0xFFFF (this was not a String Fetching value)
00130490: ae020010 sw r2,0x0010(r16)                 # Store String Fetching result
00130494: 8e030000 lw r3,0x0000(r16)                 # r3 = Value of text character
00130498: 26220001 addiu r2,r17,0x0001
0013049c: ae02001c sw r2,0x001c(r16)
001304a0: 340200e0 ori r2,r0,0x00e0                  # r2 = 0xE0: {Ramza}
001304a4: 14620005 bne r3,r2,0x001304bc              # Branch if not {Ramza}
001304a8: 00000000 nop
001304ac: 3c118017 lui r17,0x8017
001304b0: 263120bc addiu r17,r17,0x20bc              # r17 = 0x801720bc: Location where Ramza's name is stored?
001304b4: 0804c133 j 0x001304cc
001304b8: 00000000 nop
001304bc: 8e040010 lw r4,0x0010(r16)                 # r4 = String Fetching result
001304c0: 0c04ca09 jal 0x00132824                    # Prep for Loading Text
001304c4: 00000000 nop
001304c8: 00408821 addu r17,r2,r0                    # r17 = Text Pointer (location of text to load)
001304cc: 8e020024 lw r2,0x0024(r16)                 # r2 = Pointer to current Text Variable
001304d0: 00000000 nop
001304d4: 24420004 addiu r2,r2,0x0004                # r2 = point at the next Text Variable
001304d8: 0804c09a j 0x00130268                      # Loop back and redo this code with the newly loaded text byte value
001304dc: ae020024 sw r2,0x0024(r16)                 # Store new Text Variable pointer
001304e0: 8e040000 lw r4,0x0000(r16)                 # r4 = Load value of text character
001304e4: 340200f0 ori r2,r0,0x00f0                  # r2 = 0xF0
001304e8: 308300f0 andi r3,r4,0x00f0                 # r3 = r4 but without the lowest digit
001304ec: 14620020 bne r3,r2,0x00130570              # Branch if text character isn't 0xF0-0xFF
001304f0: 286200d0 slti r2,r3,0x00d0                 # r2 = 0x01 if text character is less than 0xD0
001304f4: 3082000f andi r2,r4,0x000f                 # r2 = r4 but without the highest digit
001304f8: 28420004 slti r2,r2,0x0004                 # r2 = 0x01 if text character is 0xF0-0xF3 (unknown? doesn't open dialogue)
001304fc: 1040001b beq r2,r0,0x0013056c              # Branch if not 0xF0-0xF3
00130500: 26220003 addiu r2,r17,0x0003
00130504: ae02001c sw r2,0x001c(r16)
00130508: 92220000 lbu r2,0x0000(r17)
0013050c: 00000000 nop
00130510: 30420003 andi r2,r2,0x0003
00130514: 000210c0 sll r2,r2,0x03
00130518: ae020014 sw r2,0x0014(r16)
0013051c: 92220001 lbu r2,0x0001(r17)
00130520: 8e030014 lw r3,0x0014(r16)
00130524: 00021142 srl r2,r2,0x05
00130528: ae020018 sw r2,0x0018(r16)
0013052c: 00431021 addu r2,r2,r3
00130530: 24420004 addiu r2,r2,0x0004
00130534: ae020018 sw r2,0x0018(r16)
00130538: 92220001 lbu r2,0x0001(r17)
0013053c: 00000000 nop
00130540: 3042000f andi r2,r2,0x000f
00130544: 000219c0 sll r3,r2,0x07
00130548: 00621823 subu r3,r3,r2
0013054c: 00031840 sll r3,r3,0x01
00130550: ae030014 sw r3,0x0014(r16)
00130554: 92220002 lbu r2,0x0002(r17)
00130558: 00000000 nop
0013055c: 00431021 addu r2,r2,r3
00130560: 02228823 subu r17,r17,r2
00130564: 0804c09a j 0x00130268                 # loop back
00130568: ae020014 sw r2,0x0014(r16)
0013056c: 286200d0 slti r2,r3,0x00d0            # -- # end of code for 0xF0-0xFF
00130570: 14400007 bne r2,r0,0x00130590         # Branch if less than 0xD0
00130574: 340200d0 ori r2,r0,0x00d0             # r2 = 0xD0
00130578: 14620003 bne r3,r2,0x00130588         # Branch if not 0xD0-0xDF
0013057c: 00000000 nop
00130580: 0804c174 j 0x001305d0                  
00130584: ae04002c sw r4,0x002c(r16)            # if 0xD0-0xDF, save r4 to 0x2C
00130588: 0804c174 j 0x001305d0
0013058c: ae00002c sw r0,0x002c(r16)            # if 0xE0-0xEF, save r0, to 0x2C
00130590: 8e03002c lw r3,0x002c(r16)            # load 0x2C
00130594: 00000000 nop
00130598: 3063000f andi r3,r3,0x000f
0013059c: 00031040 sll r2,r3,0x01
001305a0: 00431021 addu r2,r2,r3
001305a4: 00021080 sll r2,r2,0x02
001305a8: 00431021 addu r2,r2,r3
001305ac: 00021100 sll r2,r2,0x04
001305b0: 00441021 addu r2,r2,r4
001305b4: 3c018016 lui r1,0x8016
001305b8: 00220821 addu r1,r1,r2
001305bc: 902260fc lbu r2,0x60fc(r1)
001305c0: 8e030004 lw r3,0x0004(r16)
001305c4: ae00002c sw r0,0x002c(r16)
001305c8: 00431021 addu r2,r2,r3
001305cc: ae020004 sw r2,0x0004(r16)
001305d0: 02002021 addu r4,r16,r0
001305d4: 02202821 addu r5,r17,r0
001305d8: 0c04c1c6 jal 0x00130718               # 00130718 - 001307d0
001305dc: 00000000 nop
001305e0: 0804c09a j 0x00130268                 # loop back
001305e4: 00408821 addu r17,r2,r0
001305e8: 96020008 lhu r2,0x0008(r16)
001305ec: 00000000 nop
001305f0: a6820000 sh r2,0x0000(r20)
001305f4: 9602000c lhu r2,0x000c(r16)
001305f8: 00000000 nop
001305fc: a6a20000 sh r2,0x0000(r21)
00130600: 8fbf0028 lw r31,0x0028(r29)
00130604: 8fb50024 lw r21,0x0024(r29)
00130608: 8fb40020 lw r20,0x0020(r29)
0013060c: 8fb3001c lw r19,0x001c(r29)
00130610: 8fb20018 lw r18,0x0018(r29)
00130614: 8fb10014 lw r17,0x0014(r29)
00130618: 8fb00010 lw r16,0x0010(r29)
0013061c: 27bd0030 addiu r29,r29,0x0030
00130620: 03e00008 jr r31
00130624: 00000000 nop