2023-10-19 20:53:47 +03:00
|
|
|
|
|
|
|
|
2023-10-06 15:57:30 +03:00
|
|
|
#include "common.h"
|
|
|
|
|
2023-10-14 10:10:34 +03:00
|
|
|
extern s64 osClockRate;
|
2023-10-06 16:39:19 +03:00
|
|
|
extern s32 D_800E2128;
|
|
|
|
|
2023-10-14 10:10:34 +03:00
|
|
|
extern s32 osEepromRead(s32*, u8, s32, s32);
|
|
|
|
extern s32 osEepromWrite(s32*, u8, s32);
|
|
|
|
extern s64 __ull_div(s64, s64);
|
|
|
|
extern s64 __ll_mul(s64, s64);
|
2023-10-07 13:58:32 +03:00
|
|
|
extern void func_800070C8(s64);
|
|
|
|
|
2023-10-06 16:39:19 +03:00
|
|
|
s32 func_80007130(s32 arg0, s32 arg1) {
|
2023-10-14 10:10:34 +03:00
|
|
|
if (osEepromRead(&D_800E2128, arg0, arg1, arg0) != 0) {
|
2023-10-06 16:39:19 +03:00
|
|
|
return -1;
|
|
|
|
} else {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
}
|
2023-10-06 15:57:30 +03:00
|
|
|
|
2023-10-07 13:58:32 +03:00
|
|
|
s32 func_8000716C(s32 arg0, s32 arg1) {
|
|
|
|
s64 temp_ret;
|
|
|
|
s64 temp_ret_2;
|
|
|
|
s64 temp_ret_3;
|
|
|
|
|
2023-10-14 10:10:34 +03:00
|
|
|
if (osEepromWrite(&D_800E2128, arg0, arg1) != 0) {
|
2023-10-07 13:58:32 +03:00
|
|
|
return -1;
|
|
|
|
}
|
2023-10-14 10:10:34 +03:00
|
|
|
temp_ret = __ull_div(osClockRate, 0x3D09);
|
|
|
|
temp_ret_2 = __ll_mul(0x3A98, temp_ret);
|
|
|
|
temp_ret_3 = __ull_div(temp_ret_2, 0x40);
|
2023-10-07 13:58:32 +03:00
|
|
|
func_800070C8(temp_ret_3);
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
2023-10-06 15:57:30 +03:00
|
|
|
|
|
|
|
#pragma GLOBAL_ASM("asm/us/nonmatchings/main/7D30/func_800071FC.s")
|
|
|
|
|
|
|
|
#pragma GLOBAL_ASM("asm/us/nonmatchings/main/7D30/func_800072E0.s")
|
2023-10-19 20:53:47 +03:00
|
|
|
|
|
|
|
#pragma GLOBAL_ASM("asm/us/nonmatchings/main/7D30/D_800C8120.s")
|