Difference between revisions of "OPEN.BIN Main Routine"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
m (Links)
m
 
(One intermediate revision by one other user not shown)
Line 18: Line 18:
 
  80067128: 3c048005 lui r4,0x8005
 
  80067128: 3c048005 lui r4,0x8005
 
  8006712c: 2484eaf4 addiu r4,r4,-0x150c              #          0x8004eaf4
 
  8006712c: 2484eaf4 addiu r4,r4,-0x150c              #          0x8004eaf4
  80067130: 0c00478e jal 0x80011e38                  #          [[00011e38 - 0001201c|? 0x11e38]] (0x8004eaf4);         // Name menu crashes game if removed.  Can't advance past first Alazlam text either without hitting Start (then it crashes)
+
  80067130: 0c00478e jal 0x80011e38                  #          [[00011e38 - 0001201c|? 0x11e38]] (0x8004eaf4); // Name menu crashes game if removed.  Can't advance past first Alazlam text either without hitting Start (then it crashes)
  80067134: 00000000 nop                              #                                               // Something to do with loading files?  Also called elsewhere...
+
  80067134: 00000000 nop                              #                                   // Something to do with loading files?  Also called elsewhere...
  80067138: 0c01a2dd jal 0x80068b74                  #          [[? 0x68b74]] ();                   // No graphical updates if removed, softlocks instead of playing video.  Picking menu options also softlocks.
+
  80067138: 0c01a2dd jal 0x80068b74                  #          [[? 0x68b74]] ();           // No graphical updates if removed, softlocks instead of playing video.  Picking menu options also softlocks.
  8006713c: 00000000 nop                              #                                               // Birthday menu: Softlock, menu graphics messed up
+
  8006713c: 00000000 nop                              #                                       // Birthday menu: Softlock, menu graphics messed up
  80067140: 0c019d21 jal 0x80067484                  #          [[? 0x67484]] ();                   // No video for FMV if removed (audio still plays, Start button still skips)             
+
  80067140: 0c019d21 jal 0x80067484                  #          [[? 0x67484]] ();           // No video for FMV if removed (audio still plays, Start button still skips)             
  80067144: 00000000 nop                              #                                               // Birthday menu: No discernable effect
+
  80067144: 00000000 nop                              #                                       // Birthday menu: No discernable effect
  80067148: 0c01a153 jal 0x8006854c                  #          [[? 0x6854c]] ();                   // No discernable effect if removed
+
  80067148: 0c01a153 jal 0x8006854c                  #          [[? 0x6854c]] ();           // No discernable effect if removed
 
  8006714c: 00000000 nop
 
  8006714c: 00000000 nop
  80067150: 0c01a7ad jal 0x80069eb4                  #          [[? 0x69eb4]] ();                   // If removed, no graphical updates at all (stuck on titlescreen) and button input doesn't work whatsoever.
+
  80067150: 0c01a7ad jal 0x80069eb4                  #          [[? 0x69eb4]] ();           // If removed, no graphical updates at all (stuck on titlescreen) and button input doesn't work whatsoever.
  80067154: 00000000 nop                              #                                               // Birthday menu: Button input doesn't work whatsoever.
+
  80067154: 00000000 nop                              #                                       // Birthday menu: Button input doesn't work whatsoever.
 
  80067158: 3c058008 lui r5,0x8008
 
  80067158: 3c058008 lui r5,0x8008
 
  8006715c: 24a55f44 addiu r5,r5,0x5f44              #          0x80085f44
 
  8006715c: 24a55f44 addiu r5,r5,0x5f44              #          0x80085f44
Line 35: Line 35:
 
  8006716c: 8cc65fc4 lw r6,0x5fc4(r6)                #          *0x80085fc4
 
  8006716c: 8cc65fc4 lw r6,0x5fc4(r6)                #          *0x80085fc4
 
  80067170: 00042180 sll r4,r4,0x06                  #          *0x8004e5bc * 64
 
  80067170: 00042180 sll r4,r4,0x06                  #          *0x8004e5bc * 64
  80067174: 0c01a334 jal 0x80068cd0                  #          [[? 0x68cd0]] ((*0x8004e5bc * 64) + 0x80086018, 0x80085f44, *0x80085fc4);   // If removed, birthday menu won't load (softlock).  Also, no titlescreen menu graphics.
+
                                                    #          // If below routine removed, birthday menu won't load (softlock), and no titlescreen menu graphics.
 +
  80067174: 0c01a334 jal 0x80068cd0                  #          [[? 0x68cd0]] ((*0x8004e5bc * 64) + 0x80086018, 0x80085f44, *0x80085fc4);  
 
  80067178: 00902021 addu r4,r4,r16                  #          (*0x8004e5bc * 64) + 0x80086018
 
  80067178: 00902021 addu r4,r4,r16                  #          (*0x8004e5bc * 64) + 0x80086018
 
  8006717c: 3c048005 lui r4,0x8005
 
  8006717c: 3c048005 lui r4,0x8005
Line 42: Line 43:
 
  80067188: 00042180 sll r4,r4,0x06                  #          *0x8004e5bc * 64
 
  80067188: 00042180 sll r4,r4,0x06                  #          *0x8004e5bc * 64
 
  8006718c: 00912021 addu r4,r4,r17                  #          (*0x8004e5bc * 64) + 0x80086058
 
  8006718c: 00912021 addu r4,r4,r17                  #          (*0x8004e5bc * 64) + 0x80086058
  80067190: 0c00930e jal 0x80024c38                  #          [[00024c38 - 00024ca8|? 0x24c38]] ((*0x8004e5bc * 64) + 0x80086054);        // Can't see menus if removed
+
  80067190: 0c00930e jal 0x80024c38                  #          [[SYS DrawOtag]] ((*0x8004e5bc * 64) + 0x80086054);        // Can't see menus if removed
 
  80067194: 2484fffc addiu r4,r4,-0x0004              #          (*0x8004e5bc * 64) + 0x80086054               
 
  80067194: 2484fffc addiu r4,r4,-0x0004              #          (*0x8004e5bc * 64) + 0x80086054               
  80067198: 0c0091b5 jal 0x800246d4                  #          [[000246d4 - 0002473c|? 0x246d4]] (0);                                      // No discernable effect if removed       
+
  80067198: 0c0091b5 jal 0x800246d4                  #          [[SYS DrawSync]] (0);                                      // wait until drawing is done.
 
  8006719c: 00002021 addu r4,r0,r0
 
  8006719c: 00002021 addu r4,r0,r0
 
  800671a0: 0c019f61 jal 0x80067d84                  #          [[Button Input Related? (0x67d84)|Button Input Related (0x67d84)]] ();
 
  800671a0: 0c019f61 jal 0x80067d84                  #          [[Button Input Related? (0x67d84)|Button Input Related (0x67d84)]] ();
 
  800671a4: 00000000 nop
 
  800671a4: 00000000 nop
  800671a8: 0c0076ea jal 0x8001dba8                  #          [[0001dba8 - 0001dcec|? 0x1dba8]] (0);                     // Button input extremely fast if removed, no screen transitions, music plays at wrong speed
+
  800671a8: 0c0076ea jal 0x8001dba8                  #          [[VSync call]] (0); // Button input extremely fast if removed, no screen transitions, music plays at wrong speed
 
  800671ac: 00002021 addu r4,r0,r0
 
  800671ac: 00002021 addu r4,r0,r0
 
  800671b0: 0c019f07 jal 0x80067c1c                  #          [[? 0x67c1c]] ();                      // No graphical updates if removed
 
  800671b0: 0c019f07 jal 0x80067c1c                  #          [[? 0x67c1c]] ();                      // No graphical updates if removed
 
  800671b4: 00000000 nop
 
  800671b4: 00000000 nop
  800671b8: 0c01127b jal 0x800449ec                  #          [[Blank Routine (0x449ec)]] ();        // Blank routine; does nothing.
+
  800671b8: 0c01127b jal 0x800449ec                  #          [[000449ec - 000449f4]] ();        // jr r31
 
  800671bc: 00000000 nop
 
  800671bc: 00000000 nop
 
  800671c0: 3c028009 lui r2,0x8009
 
  800671c0: 3c028009 lui r2,0x8009
Line 60: Line 61:
 
  800671d0: 1440ffd5 bne r2,r0,0x80067128            #      } while (*0x8008e53c & 1);
 
  800671d0: 1440ffd5 bne r2,r0,0x80067128            #      } while (*0x8008e53c & 1);
 
  800671d4: 00000000 nop                              #  }
 
  800671d4: 00000000 nop                              #  }
  800671d8: 0c00918e jal 0x80024638                  #  [[00024638 - 000246d0|? 0x24638]] (0);
+
  800671d8: 0c00918e jal 0x80024638                  #  [[SYS SetDispMask]] (0);
 
  800671dc: 00002021 addu r4,r0,r0                     
 
  800671dc: 00002021 addu r4,r0,r0                     
 
  800671e0: 340400c0 ori r4,r0,0x00c0
 
  800671e0: 340400c0 ori r4,r0,0x00c0

Latest revision as of 09:07, 15 June 2024

#   ROUTINE: OPEN.BIN MAIN ROUTINE

800670f0: 27bdffe0 addiu r29,r29,-0x0020
800670f4: afbf0018 sw r31,0x0018(r29)
800670f8: afb10014 sw r17,0x0014(r29)
800670fc: 0c01a1a1 jal 0x80068684                   #   ? 0x68684 ();
80067100: afb00010 sw r16,0x0010(r29)
80067104: 3c028009 lui r2,0x8009
80067108: 8c42e53c lw r2,-0x1ac4(r2)                #   *0x8008e53c
8006710c: 00000000 nop
80067110: 30420001 andi r2,r2,0x0001                #   *0x8008e53c & 1
80067114: 10400030 beq r2,r0,0x800671d8             #   if (*0x8008e53c & 1) {
80067118: 00000000 nop
8006711c: 3c108008 lui r16,0x8008
80067120: 26106018 addiu r16,r16,0x6018             #       0x80086018
80067124: 26110040 addiu r17,r16,0x0040             #       0x80086058
                                                    #       do {
80067128: 3c048005 lui r4,0x8005
8006712c: 2484eaf4 addiu r4,r4,-0x150c              #           0x8004eaf4
80067130: 0c00478e jal 0x80011e38                   #           ? 0x11e38 (0x8004eaf4); // Name menu crashes game if removed.  Can't advance past first Alazlam text either without hitting Start (then it crashes)
80067134: 00000000 nop                              #                                   // Something to do with loading files?  Also called elsewhere...
80067138: 0c01a2dd jal 0x80068b74                   #           ? 0x68b74 ();           // No graphical updates if removed, softlocks instead of playing video.  Picking menu options also softlocks.
8006713c: 00000000 nop                              #                                       // Birthday menu: Softlock, menu graphics messed up
80067140: 0c019d21 jal 0x80067484                   #           ? 0x67484 ();           // No video for FMV if removed (audio still plays, Start button still skips)             
80067144: 00000000 nop                              #                                       // Birthday menu: No discernable effect
80067148: 0c01a153 jal 0x8006854c                   #           ? 0x6854c ();           // No discernable effect if removed
8006714c: 00000000 nop
80067150: 0c01a7ad jal 0x80069eb4                   #           ? 0x69eb4 ();           // If removed, no graphical updates at all (stuck on titlescreen) and button input doesn't work whatsoever.
80067154: 00000000 nop                              #                                       // Birthday menu: Button input doesn't work whatsoever.
80067158: 3c058008 lui r5,0x8008
8006715c: 24a55f44 addiu r5,r5,0x5f44               #           0x80085f44
80067160: 3c048005 lui r4,0x8005
80067164: 8c84e5bc lw r4,-0x1a44(r4)                #           *0x8004e5bc     
80067168: 3c068008 lui r6,0x8008
8006716c: 8cc65fc4 lw r6,0x5fc4(r6)                 #           *0x80085fc4
80067170: 00042180 sll r4,r4,0x06                   #           *0x8004e5bc * 64
                                                    #           // If below routine removed, birthday menu won't load (softlock), and no titlescreen menu graphics.
80067174: 0c01a334 jal 0x80068cd0                   #           ? 0x68cd0 ((*0x8004e5bc * 64) + 0x80086018, 0x80085f44, *0x80085fc4); 
80067178: 00902021 addu r4,r4,r16                   #           (*0x8004e5bc * 64) + 0x80086018
8006717c: 3c048005 lui r4,0x8005
80067180: 8c84e5bc lw r4,-0x1a44(r4)                #           *0x8004e5bc
80067184: 00000000 nop
80067188: 00042180 sll r4,r4,0x06                   #           *0x8004e5bc * 64
8006718c: 00912021 addu r4,r4,r17                   #           (*0x8004e5bc * 64) + 0x80086058
80067190: 0c00930e jal 0x80024c38                   #           SYS DrawOtag ((*0x8004e5bc * 64) + 0x80086054);        // Can't see menus if removed
80067194: 2484fffc addiu r4,r4,-0x0004              #           (*0x8004e5bc * 64) + 0x80086054              
80067198: 0c0091b5 jal 0x800246d4                   #           SYS DrawSync (0);                                      // wait until drawing is done.
8006719c: 00002021 addu r4,r0,r0
800671a0: 0c019f61 jal 0x80067d84                   #           Button Input Related (0x67d84) ();
800671a4: 00000000 nop
800671a8: 0c0076ea jal 0x8001dba8                   #           VSync call (0);  // Button input extremely fast if removed, no screen transitions, music plays at wrong speed
800671ac: 00002021 addu r4,r0,r0
800671b0: 0c019f07 jal 0x80067c1c                   #           ? 0x67c1c ();                       // No graphical updates if removed
800671b4: 00000000 nop
800671b8: 0c01127b jal 0x800449ec                   #           000449ec - 000449f4 ();         // jr r31
800671bc: 00000000 nop
800671c0: 3c028009 lui r2,0x8009
800671c4: 8c42e53c lw r2,-0x1ac4(r2)                #           *0x8008e53c
800671c8: 00000000 nop
800671cc: 30420001 andi r2,r2,0x0001                #           *0x8008e53c & 1
800671d0: 1440ffd5 bne r2,r0,0x80067128             #       } while (*0x8008e53c & 1);
800671d4: 00000000 nop                              #   }
800671d8: 0c00918e jal 0x80024638                   #   SYS SetDispMask (0);
800671dc: 00002021 addu r4,r0,r0                    
800671e0: 340400c0 ori r4,r0,0x00c0
800671e4: 0c01a18e jal 0x80068638                   #   ? 0x68638 (0xc0, 0x78);
800671e8: 34050078 ori r5,r0,0x0078
800671ec: 3c028008 lui r2,0x8008
800671f0: 8c4256f4 lw r2,0x56f4(r2)                 #   return *0x800856f4;
800671f4: 8fbf0018 lw r31,0x0018(r29)
800671f8: 8fb10014 lw r17,0x0014(r29)
800671fc: 8fb00010 lw r16,0x0010(r29)
80067200: 27bd0020 addiu r29,r29,0x0020
80067204: 03e00008 jr r31
80067208: 00000000 nop