diff --git a/src/libultra/io/epirawwrite.c b/src/libultra/io/epirawwrite.c index dc169ecf71..1e0e694a7e 100644 --- a/src/libultra/io/epirawwrite.c +++ b/src/libultra/io/epirawwrite.c @@ -1,12 +1,10 @@ #include "global.h" -s32 __osEPiRawWriteIo(OSPiHandle* handle, u32 devAddr, u32 data) { +s32 __osEPiRawWriteIo(OSPiHandle* handle, uintptr_t devAddr, u32 data) { s32 status; OSPiHandle* curHandle; - while (status = HW_REG(PI_STATUS_REG, u32), status & (PI_STATUS_BUSY | PI_STATUS_IOBUSY)) { - ; - } + while (status = HW_REG(PI_STATUS_REG, u32), status & (PI_STATUS_BUSY | PI_STATUS_IOBUSY)) {} if (__osCurrentHandle[handle->domain]->type != handle->type) { curHandle = __osCurrentHandle[handle->domain]; diff --git a/src/libultra/io/epiwrite.c b/src/libultra/io/epiwrite.c index a44fd169d8..2132507413 100644 --- a/src/libultra/io/epiwrite.c +++ b/src/libultra/io/epiwrite.c @@ -1,3 +1,11 @@ #include "global.h" -#pragma GLOBAL_ASM("asm/non_matchings/boot/epiwrite/osEPiWriteIo.s") +s32 osEPiWriteIo(OSPiHandle* handle, uintptr_t devAddr, u32 data) { + register s32 ret; + + __osPiGetAccess(); + ret = __osEPiRawWriteIo(handle, devAddr, data); + __osPiRelAccess(); + + return ret; +}