func_8031FC40 match
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
# banjo (99.3598%)
|
# banjo (99.3923%)
|
||||||
|
|
||||||
<img src="./progress/progress_total.svg">
|
<img src="./progress/progress_total.svg">
|
||||||
|
|
||||||
@@ -28,7 +28,6 @@ Be sure to check scratch "family" for any progress that may not be reflected her
|
|||||||
| core2/code_12F30.c | func_80299EC0 | [Ar62G](https://decomp.me/scratch/Ar62G) | 77.65% |
|
| core2/code_12F30.c | func_80299EC0 | [Ar62G](https://decomp.me/scratch/Ar62G) | 77.65% |
|
||||||
| core2/code_7AF80.c | func_80307948 | [zd8KD](https://decomp.me/scratch/zd8KD) | 85.40% |
|
| core2/code_7AF80.c | func_80307948 | [zd8KD](https://decomp.me/scratch/zd8KD) | 85.40% |
|
||||||
| core2/code_87E30.c | gcdialog_update | [cPns0](https://decomp.me/scratch/cPns0) | 92.23% |
|
| core2/code_87E30.c | gcdialog_update | [cPns0](https://decomp.me/scratch/cPns0) | 92.23% |
|
||||||
| core2/code_98CB0.c | func_8031FC40 | [m2Bd9](https://decomp.me/scratch/m2Bd9) | 99.57% | address scrambling and unscrambling |
|
|
||||||
| core2/code_B9770.c | func_80340BE4 | [FXyYS](https://decomp.me/scratch/FXyYS) | 65.91% | spline function
|
| core2/code_B9770.c | func_80340BE4 | [FXyYS](https://decomp.me/scratch/FXyYS) | 65.91% | spline function
|
||||||
| core2/code_B9770.c | func_803411B0 | [rHkDu](https://decomp.me/scratch/rHkDu) | 87.70% | spline function
|
| core2/code_B9770.c | func_803411B0 | [rHkDu](https://decomp.me/scratch/rHkDu) | 87.70% | spline function
|
||||||
|
|
||||||
|
@@ -17,7 +17,7 @@
|
|||||||
<text x="22.0" y="14">core2</text>
|
<text x="22.0" y="14">core2</text>
|
||||||
</g>
|
</g>
|
||||||
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
|
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
|
||||||
<text x="78.5" y="15" fill="#010101" fill-opacity=".3">98.8842%</text>
|
<text x="78.5" y="15" fill="#010101" fill-opacity=".3">98.9409%</text>
|
||||||
<text x="77.5" y="14">98.8842%</text>
|
<text x="77.5" y="14">98.9409%</text>
|
||||||
</g>
|
</g>
|
||||||
</svg>
|
</svg>
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
@@ -17,7 +17,7 @@
|
|||||||
<text x="75.0" y="14">Banjo-Kazooie (us.v10)</text>
|
<text x="75.0" y="14">Banjo-Kazooie (us.v10)</text>
|
||||||
</g>
|
</g>
|
||||||
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
|
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
|
||||||
<text x="184.5" y="15" fill="#010101" fill-opacity=".3">99.3598%</text>
|
<text x="184.5" y="15" fill="#010101" fill-opacity=".3">99.3923%</text>
|
||||||
<text x="183.5" y="14">99.3598%</text>
|
<text x="183.5" y="14">99.3923%</text>
|
||||||
</g>
|
</g>
|
||||||
</svg>
|
</svg>
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
@@ -41,26 +41,19 @@ u8 D_803831F8[0x21]; //copy of D_803831D0
|
|||||||
|
|
||||||
|
|
||||||
/* .code */
|
/* .code */
|
||||||
#ifndef NONMATCHING
|
|
||||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_98CB0/func_8031FC40.s")
|
|
||||||
#else
|
|
||||||
void func_8031FC40(void) {
|
void func_8031FC40(void) {
|
||||||
s32 scrambled_ptr;
|
s32 *scrambled_ptr;
|
||||||
s32 *unscrambled_ptr;
|
s32 *unscrambled_ptr;
|
||||||
s32 temp_a1;
|
u32 a1;
|
||||||
s32 temp_lo;
|
s32 t0;
|
||||||
s32 temp_t0;
|
s32 t1;
|
||||||
s32 temp_t1;
|
u32 a0;
|
||||||
s32 temp_a2;
|
u8 *ptr;
|
||||||
s32 temp_t9;
|
u32 v0 = 0x17536C34;
|
||||||
s32 var_a0;
|
u32 v1;
|
||||||
u8* b_ptr;
|
|
||||||
s32 var_t3;
|
|
||||||
u32 var_v0 = 0x17536C34;
|
|
||||||
u32 var_v1 = 0;
|
|
||||||
|
|
||||||
//obsucre address
|
//obsucre address
|
||||||
temp_t0 = (((s32)&D_803831A0.unk8 & 0xE0000000) >> 15) +
|
t0 = (((s32)&D_803831A0.unk8 & 0xE0000000) >> 15) +
|
||||||
(((s32)&D_803831A0.unk8 & 0x1FC00000) >> 22) +
|
(((s32)&D_803831A0.unk8 & 0x1FC00000) >> 22) +
|
||||||
(((s32)&D_803831A0.unk8 & 0x00300000) << 10) +
|
(((s32)&D_803831A0.unk8 & 0x00300000) << 10) +
|
||||||
(((s32)&D_803831A0.unk8 & 0x000F0000) << 7) +
|
(((s32)&D_803831A0.unk8 & 0x000F0000) << 7) +
|
||||||
@@ -70,30 +63,26 @@ void func_8031FC40(void) {
|
|||||||
(((s32)&D_803831A0.unk8 & 0x00000060) << 4) +
|
(((s32)&D_803831A0.unk8 & 0x00000060) << 4) +
|
||||||
(((s32)&D_803831A0.unk8 & 0x00000018) << 18) +
|
(((s32)&D_803831A0.unk8 & 0x00000018) << 18) +
|
||||||
(((s32)&D_803831A0.unk8 & 0x00000007) << 11);
|
(((s32)&D_803831A0.unk8 & 0x00000007) << 11);
|
||||||
|
|
||||||
//unobscure address
|
//unobscure address
|
||||||
temp_t9 = (temp_t0 & 0x38000000) / (1 << 24);
|
t1 = ((t0 & 0x1E0600) << 0xB) | ((s32) (t0 & 0x603800) / 8);
|
||||||
temp_t1 = ((temp_t0 & 0x1E0600) << 0xB) | ((s32) (temp_t0 & 0x603800) / 8);
|
a0 = (((t0 & 0x1C07F) << 0xF) + ((u32) (t0 & 0xC7800000) >> 0x11)) | (((t0 & 0x38000000) / (1 << 24)) + ((s32) (t0 & 0x180) >> 6)); \
|
||||||
temp_a1 = (((temp_t0 & 0x1C07F) << 0xF) + ((u32) (temp_t0 & 0xC7800000) >> 0x11)) | (temp_t9 + ((s32) (temp_t0 & 0x180) >> 6)); \
|
a1 = a0; \
|
||||||
var_a0 = ((temp_a1 & 0x3FE000) << 7)
|
a0 = (((a1 & 0x3FE000) << 7)
|
||||||
| (((temp_t1 >> 8) & 7) + ((temp_a1 << 0xA) & 0xFF800))
|
| (((t1 >> 8) & 7) + ((a1 << 0xA) & 0xFF800))
|
||||||
| ((((u32) (temp_t1 & 0xF0000000) >> 0x15) + (temp_a1 & 0xE0000000)) ^ ((s32) ((temp_t1 /0x40) & 0xF000) >> 9));
|
| ((((u32) (t1 & 0xF0000000) >> 0x15) + (a1 & 0xE0000000)) ^ ((s32) ((t1 /0x40) & 0xF000) >> 9)));
|
||||||
|
|
||||||
//calculate checksum
|
//calculate checksum
|
||||||
temp_a1 = 0x25;
|
ptr = (u8*)(a0);
|
||||||
for(var_v1 = 0; var_v1 < temp_a1; var_v1++){
|
a1 = 0x25;
|
||||||
b_ptr = (u8*)(var_a0 + var_v1);
|
for(v1 = 0; v1 < a1; v1++){
|
||||||
var_v0 = (((var_v0 - *b_ptr) & 0x1F) << 0xF) ^ ((*b_ptr* 0x1B) + (var_v0 >> 0xB));
|
v0 = (((v0 - ptr[v1]) & 0x1F) << 0xF) ^ ((ptr[v1]* 0x1B) + (v0 >> 0xB));
|
||||||
}
|
}
|
||||||
|
|
||||||
scrambled_ptr = (((s32) &D_803831A0 & 0x55555555) * 2) + ((u32) ((s32) &D_803831A0 & 0xAAAAAAAA) >> 1);
|
scrambled_ptr = (s32 *) ((((s32) &D_803831A0 & 0x55555555) << 1) + (((s32) &D_803831A0 & 0xAAAAAAAA) >> 1));
|
||||||
unscrambled_ptr = (((scrambled_ptr & 0x55555555) * 2) | ((u32) (scrambled_ptr & 0xAAAAAAAA) >> 1));
|
unscrambled_ptr = (s32 *) ((((s32) scrambled_ptr & 0x55555555) << 1) | (((s32) scrambled_ptr & 0xAAAAAAAA) >> 1));
|
||||||
*unscrambled_ptr = var_v0;
|
*unscrambled_ptr = v0;
|
||||||
if(!var_a0);
|
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
u32 func_8031FE40(void) {
|
u32 func_8031FE40(void) {
|
||||||
u8 *obscured_addr;
|
u8 *obscured_addr;
|
||||||
|
Reference in New Issue
Block a user