From 247366392f3962bce1d7e89c9f6d0c391a259b81 Mon Sep 17 00:00:00 2001 From: Ryan Myers Date: Mon, 27 Sep 2021 14:51:42 -0400 Subject: [PATCH] Matched __osAiDeviceBusy --- lib/src/os/__osAiDeviceBusy.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/lib/src/os/__osAiDeviceBusy.c b/lib/src/os/__osAiDeviceBusy.c index ae655ab2..51d953b2 100644 --- a/lib/src/os/__osAiDeviceBusy.c +++ b/lib/src/os/__osAiDeviceBusy.c @@ -1,7 +1,13 @@ /* The comment below is needed for this file to be picked up by generate_ld */ /* RAM_POS: 0x800D3670 */ -#include "types.h" -#include "macros.h" +#include "libultra_internal.h" -GLOBAL_ASM("lib/asm/non_matchings/unknown_0D4270/__osAiDeviceBusy.s") +s32 __osAiDeviceBusy(void) { + register s32 status = IO_READ(AI_STATUS_REG); + if (status & AI_STATUS_FIFO_FULL) + + return 1; + + return 0; +}