Difference between revisions of "S 002 CDIntToPos"
Jump to navigation
Jump to search
(Created page with "<font face='Courier New'> 0001efbc: 3c031b4e lui r3,0x1b4e 0001efc0: 346381b5 ori r3,r3,0x81b5 0001efc4: 24840096 addiu r4,r4,0x0096 0001efc8: 00830018 mult r4,r3 0001e...") |
(I can't finish this...) |
||
Line 1: | Line 1: | ||
<font face='Courier New'> | <font face='Courier New'> | ||
− | + | *note: lazy references to "floor" are in respects to the original LBA. "floor 5A00" means, round the original LBA down to a multiple of 5A00 (or discard all binary less than 1 when LBA/5A00) | |
0001efbc: 3c031b4e lui r3,0x1b4e | 0001efbc: 3c031b4e lui r3,0x1b4e | ||
− | 0001efc0: 346381b5 ori r3,r3,0x81b5 | + | 0001efc0: 346381b5 ori r3,r3,0x81b5 1/15 |
− | 0001efc4: 24840096 addiu r4,r4,0x0096 | + | 0001efc4: 24840096 addiu r4,r4,0x0096 LBA + 0x96 // LBA + 150 |
− | 0001efc8: 00830018 mult r4,r3 | + | 0001efc8: 00830018 mult r4,r3 (LBA + 0x96) / f // (LBA + 150) / 15 |
0001efcc: 00a01021 addu r2,r5,r0 | 0001efcc: 00a01021 addu r2,r5,r0 | ||
0001efd0: 3c076666 lui r7,0x6666 | 0001efd0: 3c076666 lui r7,0x6666 | ||
− | 0001efd4: 34e76667 ori r7,r7,0x6667 | + | 0001efd4: 34e76667 ori r7,r7,0x6667 6/15 |
− | 0001efd8: 00041fc3 sra r3,r4,0x1f | + | 0001efd8: 00041fc3 sra r3,r4,0x1f LBA + 0x96 >> 0x1f // negative sign (rounding) |
− | 0001efdc: 00003010 mfhi r6 | + | 0001efdc: 00003010 mfhi r6 r6 = LBA div'd |
− | 0001efe0: 000630c3 sra r6,r6,0x03 | + | 0001efe0: 000630c3 sra r6,r6,0x03 |
− | 0001efe4: 00c33023 subu r6,r6,r3 | + | 0001efe4: 00c33023 subu r6,r6,r3 r6 = LBA div'd / 8 // LBA / 120 |
0001efe8: 00062880 sll r5,r6,0x02 | 0001efe8: 00062880 sll r5,r6,0x02 | ||
− | 0001efec: 00a62821 addu r5,r5,r6 | + | 0001efec: 00a62821 addu r5,r5,r6 r5 = LBA div'd / 8 x 5 // 1/15th LBA x 5 / 8 |
0001eff0: 00051900 sll r3,r5,0x04 | 0001eff0: 00051900 sll r3,r5,0x04 | ||
− | 0001eff4: 00651823 subu r3,r3,r5 | + | 0001eff4: 00651823 subu r3,r3,r5 r3 = LBA div'd / 8 x 5 x f // 1/15 x LBA x 75 / 8, LBA x 5/8 rounded to multiples of 120 |
− | 0001eff8: 00832023 subu r4,r4,r3 | + | 0001eff8: 00832023 subu r4,r4,r3 r4 = LBA x 3/8 floor 78 // LBA - (5/8 x LBA floored to multiples of 120) |
− | 0001effc: 00870018 mult r4,r7 | + | 0001effc: 00870018 mult r4,r7 |
− | 0001f000: 00004010 mfhi r8 | + | 0001f000: 00004010 mfhi r8 r8 = LBA x 3/8 floor 78 x 2/5 // LBA x 3/8 floor 120 x 2/5 |
0001f004: 3c038888 lui r3,0x8888 | 0001f004: 3c038888 lui r3,0x8888 | ||
− | 0001f008: 34638889 ori r3,r3,0x8889 | + | 0001f008: 34638889 ori r3,r3,0x8889 8/15 |
− | 0001f00c: 00c30018 mult r6,r3 | + | 0001f00c: 00c30018 mult r6,r3 |
− | 0001f010: 00061fc3 sra r3,r6,0x1f | + | 0001f010: 00061fc3 sra r3,r6,0x1f LBA/f (sign) // negative sign (rounding) |
− | 0001f014: 00004810 mfhi r9 | + | 0001f014: 00004810 mfhi r9 r9 = LBA / E1 // LBA / 225 |
− | 0001f018: 01264821 addu r9,r9,r6 | + | 0001f018: 01264821 addu r9,r9,r6 r9 = LBA x 17 / 708 // LBA x 23 / 1,800 |
0001f01c: 00094943 sra r9,r9,0x05 | 0001f01c: 00094943 sra r9,r9,0x05 | ||
− | 0001f020: 01234823 subu r9,r9,r3 | + | 0001f020: 01234823 subu r9,r9,r3 r9 = LBA x 17 / 708 >> 0x5 // LBA x 23 / 1,800 / 32 |
− | 0001f024: 00091900 sll r3,r9,0x04 | + | 0001f024: 00091900 sll r3,r9,0x04 r3 = LBA x 17 / 708 >> 0x1* // LBA x 23 / 1,800 / 32 x 16 |
− | 0001f028: 00691823 subu r3,r3,r9 | + | 0001f028: 00691823 subu r3,r3,r9 // LBA x 368 / 57,600 |
− | 0001f02c: 00031880 sll r3,r3,0x02 | + | 0001f02c: 00031880 sll r3,r3,0x02 LBA x 17 / E10 floor E100 // LBA x 23 / 3,600 floor 57,600 |
− | 0001f030: 00c33023 subu r6,r6,r3 | + | 0001f030: 00c33023 subu r6,r6,r3 r6 = LBA / 78 - LBA x 17 / E10 floor E100 |
− | 0001f034: 00c70018 mult r6,r7 | + | 0001f034: 00c70018 mult r6,r7 |
− | 0001f038: 00084083 sra r8,r8,0x02 | + | 0001f038: 00084083 sra r8,r8,0x02 LBA x 3/8 floor 78 x 1/10 // LBA x 3/8 floor 120 x 1/10 |
0001f03c: 00041fc3 sra r3,r4,0x1f | 0001f03c: 00041fc3 sra r3,r4,0x1f | ||
− | 0001f040: 01034023 subu r8,r8,r3 | + | 0001f040: 01034023 subu r8,r8,r3 r8 = LBA x 3/8 floor 78 x 1/10 |
− | 0001f044: 00081880 sll r3,r8,0x02 | + | 0001f044: 00081880 sll r3,r8,0x02 LBA x 3/8 floor 78 x 1/5 floor 4 // LBA x 3/8 floor 120 x 1/5 floor 4 |
− | 0001f048: 00681821 addu r3,r3,r8 | + | 0001f048: 00681821 addu r3,r3,r8 LBA x 3/8 floor 78 x 3/10 floor 4 // LBA x 3/8 floor 120 x 3/10 floor 4 |
− | 0001f04c: 00031840 sll r3,r3,0x01 | + | 0001f04c: 00031840 sll r3,r3,0x01 r3 = LBA x 3/8 floor 78 x 3/5 floor 8 // LBA x 3/8 floor 120 x 3/5 floor 8 |
− | 0001f050: 00002810 mfhi r5 | + | 0001f050: 00002810 mfhi r5 r5 = LBA / 12c floor 708 - LBA x 17 / 2328 floor 5A00 // LBA / 300 floor 1,800 - LBA x 23 / 9,000 floor 23,040 |
− | 0001f054: 00832023 subu r4,r4,r3 | + | 0001f054: 00832023 subu r4,r4,r3 r4 = LBA x 9/28 floor 3c0 // LBA x 9/40 floor 960 |
0001f058: 00061fc3 sra r3,r6,0x1f | 0001f058: 00061fc3 sra r3,r6,0x1f | ||
− | 0001f05c: 01270018 mult r9,r7 | + | 0001f05c: 01270018 mult r9,r7 |
− | 0001f060: 00083900 sll r7,r8,0x04 | + | 0001f060: 00083900 sll r7,r8,0x04 LBA x 3/8 floor 780 // LBA x 3/8 floor 1,824 |
− | 0001f064: 00e43821 addu r7,r7,r4 | + | 0001f064: 00e43821 addu r7,r7,r4 r7 = LBA x 3/8 floor 780 + LBA x 9/28 floor 3c0 // LBA x 3/8 floor 1,824 + LBA x 9/40 floor 960 (this interpretation may be less helpful moving forward) |
− | 0001f068: 00052883 sra r5,r5,0x02 | + | 0001f068: 00052883 sra r5,r5,0x02 LBA / 4B0 floor 708 - LBA x 17 / 8CA0 // LBA / 1,200 floor 1,800 - LBA x 17 / 36,000 |
− | 0001f06c: 00a32823 subu r5,r5,r3 | + | 0001f06c: 00a32823 subu r5,r5,r3 |
− | 0001f070: 00052100 sll r4,r5,0x04 | + | 0001f070: 00052100 sll r4,r5,0x04 r4 = LBA / 4B floor 708 - LBA x 17 / 8Ca floor 8CA0 // LBA / 75 floor 1,800 - LBA x 23 / 2,250 floor 36,000 |
− | 0001f074: 00051880 sll r3,r5,0x02 | + | 0001f074: 00051880 sll r3,r5,0x02 r3 = LBA / 12c floor 708 - LBA x 17 / 2328 floor 8CA0 // LBA / 300 floor 1,800 - LBA x 23 / 9,000 floor 36,000 |
− | 0001f078: 00651821 addu r3,r3,r5 | + | 0001f078: 00651821 addu r3,r3,r5 r3 = LBA / F0 floor 708 - LBA x 17 / 1C20 floor 8CA0 // LBA / 240 floor 1,800 - LBA x 23 / 7,200 floor 36,000 |
− | 0001f07c: 00031840 sll r3,r3,0x01 | + | 0001f07c: 00031840 sll r3,r3,0x01 r3 = LBA / 78 floor 708 - LBA x 17 / E10 floor 8CA0 // LBA / 120 floor 1,800 - LBA x 23 / 7,200 floor 36,000 |
− | 0001f080: 00c33023 subu r6,r6,r3 | + | 0001f080: 00c33023 subu r6,r6,r3 r6 = Floor(LBA,708) / 78 - LBA x 17 / E10 floor E100 + LBA x 17 / E10 floor 8CA0 // I can't figure out a good way to simplify this down. |
− | 0001f084: 00862021 addu r4,r4,r6 | + | 0001f084: 00862021 addu r4,r4,r6 r4 = LBA / 4B floor 708 - LBA x 17 / 8Ca floor 8CA0 + Floor(LBA,708) / 78 - LBA x 17 / E10 floor E100 - LBA x 17 / E10 floor 8CA0 // something about the 1,800 floors match up here but I can't figure it. |
− | 0001f088: a0440001 sb r4,0x0001(r2) | + | 0001f088: a0440001 sb r4,0x0001(r2) Store result to hardware file-loading-address |
0001f08c: 000927c3 sra r4,r9,0x1f | 0001f08c: 000927c3 sra r4,r9,0x1f | ||
− | 0001f090: a0470002 sb r7,0x0002(r2) | + | 0001f090: a0470002 sb r7,0x0002(r2) Store r7 to hardware file-loading-address |
− | 0001f094: 00001810 mfhi r3 | + | 0001f094: 00001810 mfhi r3 LBA x 17 / 2 3280 // LBA x 23 / 144,000 |
− | 0001f098: 00031883 sra r3,r3,0x02 | + | 0001f098: 00031883 sra r3,r3,0x02 |
0001f09c: 00641823 subu r3,r3,r4 | 0001f09c: 00641823 subu r3,r3,r4 | ||
0001f0a0: 00032900 sll r5,r3,0x04 | 0001f0a0: 00032900 sll r5,r3,0x04 |
Revision as of 13:11, 15 March 2023
- note: lazy references to "floor" are in respects to the original LBA. "floor 5A00" means, round the original LBA down to a multiple of 5A00 (or discard all binary less than 1 when LBA/5A00)
0001efbc: 3c031b4e lui r3,0x1b4e 0001efc0: 346381b5 ori r3,r3,0x81b5 1/15 0001efc4: 24840096 addiu r4,r4,0x0096 LBA + 0x96 // LBA + 150 0001efc8: 00830018 mult r4,r3 (LBA + 0x96) / f // (LBA + 150) / 15 0001efcc: 00a01021 addu r2,r5,r0 0001efd0: 3c076666 lui r7,0x6666 0001efd4: 34e76667 ori r7,r7,0x6667 6/15 0001efd8: 00041fc3 sra r3,r4,0x1f LBA + 0x96 >> 0x1f // negative sign (rounding) 0001efdc: 00003010 mfhi r6 r6 = LBA div'd 0001efe0: 000630c3 sra r6,r6,0x03 0001efe4: 00c33023 subu r6,r6,r3 r6 = LBA div'd / 8 // LBA / 120 0001efe8: 00062880 sll r5,r6,0x02 0001efec: 00a62821 addu r5,r5,r6 r5 = LBA div'd / 8 x 5 // 1/15th LBA x 5 / 8 0001eff0: 00051900 sll r3,r5,0x04 0001eff4: 00651823 subu r3,r3,r5 r3 = LBA div'd / 8 x 5 x f // 1/15 x LBA x 75 / 8, LBA x 5/8 rounded to multiples of 120 0001eff8: 00832023 subu r4,r4,r3 r4 = LBA x 3/8 floor 78 // LBA - (5/8 x LBA floored to multiples of 120) 0001effc: 00870018 mult r4,r7 0001f000: 00004010 mfhi r8 r8 = LBA x 3/8 floor 78 x 2/5 // LBA x 3/8 floor 120 x 2/5 0001f004: 3c038888 lui r3,0x8888 0001f008: 34638889 ori r3,r3,0x8889 8/15 0001f00c: 00c30018 mult r6,r3 0001f010: 00061fc3 sra r3,r6,0x1f LBA/f (sign) // negative sign (rounding) 0001f014: 00004810 mfhi r9 r9 = LBA / E1 // LBA / 225 0001f018: 01264821 addu r9,r9,r6 r9 = LBA x 17 / 708 // LBA x 23 / 1,800 0001f01c: 00094943 sra r9,r9,0x05 0001f020: 01234823 subu r9,r9,r3 r9 = LBA x 17 / 708 >> 0x5 // LBA x 23 / 1,800 / 32 0001f024: 00091900 sll r3,r9,0x04 r3 = LBA x 17 / 708 >> 0x1* // LBA x 23 / 1,800 / 32 x 16 0001f028: 00691823 subu r3,r3,r9 // LBA x 368 / 57,600 0001f02c: 00031880 sll r3,r3,0x02 LBA x 17 / E10 floor E100 // LBA x 23 / 3,600 floor 57,600 0001f030: 00c33023 subu r6,r6,r3 r6 = LBA / 78 - LBA x 17 / E10 floor E100 0001f034: 00c70018 mult r6,r7 0001f038: 00084083 sra r8,r8,0x02 LBA x 3/8 floor 78 x 1/10 // LBA x 3/8 floor 120 x 1/10 0001f03c: 00041fc3 sra r3,r4,0x1f 0001f040: 01034023 subu r8,r8,r3 r8 = LBA x 3/8 floor 78 x 1/10 0001f044: 00081880 sll r3,r8,0x02 LBA x 3/8 floor 78 x 1/5 floor 4 // LBA x 3/8 floor 120 x 1/5 floor 4 0001f048: 00681821 addu r3,r3,r8 LBA x 3/8 floor 78 x 3/10 floor 4 // LBA x 3/8 floor 120 x 3/10 floor 4 0001f04c: 00031840 sll r3,r3,0x01 r3 = LBA x 3/8 floor 78 x 3/5 floor 8 // LBA x 3/8 floor 120 x 3/5 floor 8 0001f050: 00002810 mfhi r5 r5 = LBA / 12c floor 708 - LBA x 17 / 2328 floor 5A00 // LBA / 300 floor 1,800 - LBA x 23 / 9,000 floor 23,040 0001f054: 00832023 subu r4,r4,r3 r4 = LBA x 9/28 floor 3c0 // LBA x 9/40 floor 960 0001f058: 00061fc3 sra r3,r6,0x1f 0001f05c: 01270018 mult r9,r7 0001f060: 00083900 sll r7,r8,0x04 LBA x 3/8 floor 780 // LBA x 3/8 floor 1,824 0001f064: 00e43821 addu r7,r7,r4 r7 = LBA x 3/8 floor 780 + LBA x 9/28 floor 3c0 // LBA x 3/8 floor 1,824 + LBA x 9/40 floor 960 (this interpretation may be less helpful moving forward) 0001f068: 00052883 sra r5,r5,0x02 LBA / 4B0 floor 708 - LBA x 17 / 8CA0 // LBA / 1,200 floor 1,800 - LBA x 17 / 36,000 0001f06c: 00a32823 subu r5,r5,r3 0001f070: 00052100 sll r4,r5,0x04 r4 = LBA / 4B floor 708 - LBA x 17 / 8Ca floor 8CA0 // LBA / 75 floor 1,800 - LBA x 23 / 2,250 floor 36,000 0001f074: 00051880 sll r3,r5,0x02 r3 = LBA / 12c floor 708 - LBA x 17 / 2328 floor 8CA0 // LBA / 300 floor 1,800 - LBA x 23 / 9,000 floor 36,000 0001f078: 00651821 addu r3,r3,r5 r3 = LBA / F0 floor 708 - LBA x 17 / 1C20 floor 8CA0 // LBA / 240 floor 1,800 - LBA x 23 / 7,200 floor 36,000 0001f07c: 00031840 sll r3,r3,0x01 r3 = LBA / 78 floor 708 - LBA x 17 / E10 floor 8CA0 // LBA / 120 floor 1,800 - LBA x 23 / 7,200 floor 36,000 0001f080: 00c33023 subu r6,r6,r3 r6 = Floor(LBA,708) / 78 - LBA x 17 / E10 floor E100 + LBA x 17 / E10 floor 8CA0 // I can't figure out a good way to simplify this down. 0001f084: 00862021 addu r4,r4,r6 r4 = LBA / 4B floor 708 - LBA x 17 / 8Ca floor 8CA0 + Floor(LBA,708) / 78 - LBA x 17 / E10 floor E100 - LBA x 17 / E10 floor 8CA0 // something about the 1,800 floors match up here but I can't figure it. 0001f088: a0440001 sb r4,0x0001(r2) Store result to hardware file-loading-address 0001f08c: 000927c3 sra r4,r9,0x1f 0001f090: a0470002 sb r7,0x0002(r2) Store r7 to hardware file-loading-address 0001f094: 00001810 mfhi r3 LBA x 17 / 2 3280 // LBA x 23 / 144,000 0001f098: 00031883 sra r3,r3,0x02 0001f09c: 00641823 subu r3,r3,r4 0001f0a0: 00032900 sll r5,r3,0x04 0001f0a4: 00032080 sll r4,r3,0x02 0001f0a8: 00832021 addu r4,r4,r3 0001f0ac: 00042040 sll r4,r4,0x01 0001f0b0: 01244823 subu r9,r9,r4 0001f0b4: 00a92821 addu r5,r5,r9 0001f0b8: 03e00008 jr r31 0001f0bc: a0450000 sb r5,0x0000(r2)