Match osEepromProbe

This commit is contained in:
Ryan Myers
2021-09-27 15:15:28 -04:00
parent 5e3c5b6d4e
commit 5191fe0c6b
2 changed files with 17 additions and 36 deletions
@@ -1,33 +0,0 @@
glabel osEepromProbe
/* 0CEE10 800CE210 27BDFFE0 */ addiu $sp, $sp, -0x20
/* 0CEE14 800CE214 AFBF0014 */ sw $ra, 0x14($sp)
/* 0CEE18 800CE218 AFA40020 */ sw $a0, 0x20($sp)
/* 0CEE1C 800CE21C 0C033594 */ jal __osSiGetAccess
/* 0CEE20 800CE220 AFA0001C */ sw $zero, 0x1c($sp)
/* 0CEE24 800CE224 8FA40020 */ lw $a0, 0x20($sp)
/* 0CEE28 800CE228 0C033A0F */ jal __osEepStatus
/* 0CEE2C 800CE22C 27A50018 */ addiu $a1, $sp, 0x18
/* 0CEE30 800CE230 AFA2001C */ sw $v0, 0x1c($sp)
/* 0CEE34 800CE234 8FAE001C */ lw $t6, 0x1c($sp)
/* 0CEE38 800CE238 15C00008 */ bnez $t6, .L800CE25C
/* 0CEE3C 800CE23C 00000000 */ nop
/* 0CEE40 800CE240 97AF0018 */ lhu $t7, 0x18($sp)
/* 0CEE44 800CE244 31F88000 */ andi $t8, $t7, 0x8000
/* 0CEE48 800CE248 13000004 */ beqz $t8, .L800CE25C
/* 0CEE4C 800CE24C 00000000 */ nop
/* 0CEE50 800CE250 24190001 */ li $t9, 1
/* 0CEE54 800CE254 10000002 */ b .L800CE260
/* 0CEE58 800CE258 AFB9001C */ sw $t9, 0x1c($sp)
.L800CE25C:
/* 0CEE5C 800CE25C AFA0001C */ sw $zero, 0x1c($sp)
.L800CE260:
/* 0CEE60 800CE260 0C0335A5 */ jal __osSiRelAccess
/* 0CEE64 800CE264 00000000 */ nop
/* 0CEE68 800CE268 8FBF0014 */ lw $ra, 0x14($sp)
/* 0CEE6C 800CE26C 8FA2001C */ lw $v0, 0x1c($sp)
/* 0CEE70 800CE270 27BD0020 */ addiu $sp, $sp, 0x20
/* 0CEE74 800CE274 03E00008 */ jr $ra
/* 0CEE78 800CE278 00000000 */ nop
/* 0CEE7C 800CE27C 00000000 */ nop
+17 -3
View File
@@ -1,7 +1,21 @@
/* The comment below is needed for this file to be picked up by generate_ld */
/* RAM_POS: 0x800CE210 */
#include "types.h"
#include "macros.h"
#include "libultra_internal.h"
GLOBAL_ASM("lib/asm/non_matchings/unknown_0CEE10/osEepromProbe.s")
s32 __osEepStatus(OSMesgQueue *mq, OSContStatus *data);
s32 osEepromProbe(OSMesgQueue *mq) {
s32 ret = 0;
OSContStatus sdata;
__osSiGetAccess();
ret = __osEepStatus(mq, &sdata);
if (ret == 0 && (sdata.type & CONT_EEPROM) != 0) {
ret = 1;
} else {
ret = 0;
}
__osSiRelAccess();
return ret;
}