Difference between revisions of "SYS CDPosToInt"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
(Created page with "<font face='Courier New'> 0001f0c0: 90830000 lbu r3,0x0000(r4) 0001f0c4: 90860001 lbu r6,0x0001(r4) 0001f0c8: 00032902 srl r5,r3,0x04 0001f0cc: 00051080 sll r2,r5,0x02 ...")
 
m (Talcall moved page 0001f0c0 - 0001f13c to SYS CDPosToInt)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 
<font face='Courier New'>
 
<font face='Courier New'>
 +
r4: stack pointer to file header for file to load?
 
   
 
   
  0001f0c0: 90830000 lbu r3,0x0000(r4)
+
  0001f0c0: 90830000 lbu r3,0x0000(r4)               #load minutes?
  0001f0c4: 90860001 lbu r6,0x0001(r4)
+
  0001f0c4: 90860001 lbu r6,0x0001(r4)               #load seconds?
 
  0001f0c8: 00032902 srl r5,r3,0x04
 
  0001f0c8: 00032902 srl r5,r3,0x04
 
  0001f0cc: 00051080 sll r2,r5,0x02
 
  0001f0cc: 00051080 sll r2,r5,0x02
Line 22: Line 23:
 
  0001f10c: 00651821 addu r3,r3,r5
 
  0001f10c: 00651821 addu r3,r3,r5
 
  0001f110: 00031100 sll r2,r3,0x04
 
  0001f110: 00031100 sll r2,r3,0x04
  0001f114: 90850002 lbu r5,0x0002(r4)
+
  0001f114: 90850002 lbu r5,0x0002(r4)               #load sectors
 
  0001f118: 00431023 subu r2,r2,r3
 
  0001f118: 00431023 subu r2,r2,r3
 
  0001f11c: 00052102 srl r4,r5,0x04
 
  0001f11c: 00052102 srl r4,r5,0x04
Line 32: Line 33:
 
  0001f134: 00431021 addu r2,r2,r3
 
  0001f134: 00431021 addu r2,r2,r3
 
  0001f138: 03e00008 jr r31
 
  0001f138: 03e00008 jr r31
  0001f13c: 2442ff6a addiu r2,r2,0xff6a
+
  0001f13c: 2442ff6a addiu r2,r2,0xff6a             # returns LBA of file
 
</font>
 
</font>

Latest revision as of 10:04, 8 July 2023

r4: stack pointer to file header for file to load?

0001f0c0: 90830000 lbu r3,0x0000(r4)               #load minutes?
0001f0c4: 90860001 lbu r6,0x0001(r4)               #load seconds?
0001f0c8: 00032902 srl r5,r3,0x04
0001f0cc: 00051080 sll r2,r5,0x02
0001f0d0: 00451021 addu r2,r2,r5
0001f0d4: 00021040 sll r2,r2,0x01
0001f0d8: 3063000f andi r3,r3,0x000f
0001f0dc: 00431021 addu r2,r2,r3
0001f0e0: 00022900 sll r5,r2,0x04
0001f0e4: 00a22823 subu r5,r5,r2
0001f0e8: 00052880 sll r5,r5,0x02
0001f0ec: 00061902 srl r3,r6,0x04
0001f0f0: 00031080 sll r2,r3,0x02
0001f0f4: 00431021 addu r2,r2,r3
0001f0f8: 00021040 sll r2,r2,0x01
0001f0fc: 30c6000f andi r6,r6,0x000f
0001f100: 00461021 addu r2,r2,r6
0001f104: 00a22821 addu r5,r5,r2
0001f108: 00051880 sll r3,r5,0x02
0001f10c: 00651821 addu r3,r3,r5
0001f110: 00031100 sll r2,r3,0x04
0001f114: 90850002 lbu r5,0x0002(r4)               #load sectors
0001f118: 00431023 subu r2,r2,r3
0001f11c: 00052102 srl r4,r5,0x04
0001f120: 00041880 sll r3,r4,0x02
0001f124: 00641821 addu r3,r3,r4
0001f128: 00031840 sll r3,r3,0x01
0001f12c: 30a5000f andi r5,r5,0x000f
0001f130: 00651821 addu r3,r3,r5
0001f134: 00431021 addu r2,r2,r3
0001f138: 03e00008 jr r31
0001f13c: 2442ff6a addiu r2,r2,0xff6a              # returns LBA of file