From 563866f074d31b2be412907cea45dba0082ef31d Mon Sep 17 00:00:00 2001 From: rozlette Date: Mon, 29 Oct 2018 23:52:02 -0500 Subject: [PATCH] Fix misnamed function --- Makefile | 2 +- codescript.txt | 2 +- functions.py | 2 +- include/functions.h | 2 +- objects.py | 2 +- src/libultra/io/{sirawread.c => sirawwrite.c} | 6 +++--- 6 files changed, 8 insertions(+), 8 deletions(-) rename src/libultra/io/{sirawread.c => sirawwrite.c} (74%) diff --git a/Makefile b/Makefile index a7d0e25885..9e31059533 100644 --- a/Makefile +++ b/Makefile @@ -18,7 +18,7 @@ build/src/libultra/os/%: OPTIMIZATION := -O1 build/src/libultra/io/%: OPTIMIZATION := -O2 build/src/libultra/libc/%: OPTIMIZATION := -O2 build/src/boot_O2_g3/%: OPTIMIZATION := -O2 -g3 -test.txt: OPTIMIZATION := -O1 -g3 +test.txt: OPTIMIZATION := -O2 -g3 test.txt: MIPS_VERSION := -mips2 BASEROM_FILES := $(wildcard baserom/*) diff --git a/codescript.txt b/codescript.txt index 74aa0ac1c8..f289e9d2cf 100644 --- a/codescript.txt +++ b/codescript.txt @@ -161,7 +161,7 @@ SECTIONS build/asm/xldtob.o(.text) build/asm/ldiv.o(.text) build/asm/xlitob.o(.text) - build/src/libultra/io/sirawread.o(.text) + build/src/libultra/io/sirawwrite.o(.text) build/src/libultra/io/spgetstat.o(.text) build/src/libultra/io/spsetstat.o(.text) . = ALIGN(0x20); /* XXX insert NOPs to pad the file */ diff --git a/functions.py b/functions.py index ccfd206046..fff97b332c 100644 --- a/functions.py +++ b/functions.py @@ -164,7 +164,7 @@ known_funcs = { 0x80094DF0:("ldiv","ldiv_t","long numer, long denom"), 0x80094E74:("lldiv","lldiv_t","long long numer, long long denom"), 0x80094F80:("_Litob","void","_Pft* px, unsigned char code"), - 0x80095220:("__osSiRawReadIo","s32","u32 devAddr, u32* data"), + 0x80095220:("__osSiRawWriteIo","s32","u32 devAddr, u32* data"), 0x80095270:("__osSpGetStatus","u32","void"), 0x80095280:("__osSpSetStatus","void","u32 data"), 0x800952A0:("osCreateViManager","void","OSPri pri"), diff --git a/include/functions.h b/include/functions.h index 9539e467c9..8bac62abfd 100644 --- a/include/functions.h +++ b/include/functions.h @@ -419,7 +419,7 @@ UNK_RET func_80094828(UNK_ARGS); // func_80094828 ldiv_t ldiv(long numer, long denom); // func_80094DF0 lldiv_t lldiv(long long numer, long long denom); // func_80094E74 void _Litob(_Pft* px, unsigned char code); // func_80094F80 -s32 __osSiRawReadIo(u32 devAddr, u32* data); // func_80095220 +s32 __osSiRawWriteIo(u32 devAddr, u32* data); // func_80095220 u32 __osSpGetStatus(void); // func_80095270 void __osSpSetStatus(u32 data); // func_80095280 void osCreateViManager(OSPri pri); // func_800952A0 diff --git a/objects.py b/objects.py index 7e57b812de..3e8861b9f8 100644 --- a/objects.py +++ b/objects.py @@ -82,7 +82,7 @@ known_objects = { 0x80094f80:"xlitob", 0x80095270:"spgetstat", 0x80095280:"spsetstat", - 0x80095220:"sirawread", + 0x80095220:"sirawwrite", 0x800952A0:"vimgr", 0x800955B0:"vigetcurrcontext", 0x800955C0:"writebackdcacheall", diff --git a/src/libultra/io/sirawread.c b/src/libultra/io/sirawwrite.c similarity index 74% rename from src/libultra/io/sirawread.c rename to src/libultra/io/sirawwrite.c index e30b55f81c..f3ff81b7c3 100644 --- a/src/libultra/io/sirawread.c +++ b/src/libultra/io/sirawwrite.c @@ -1,12 +1,12 @@ #include #include -s32 __osSiRawReadIo(u32 devAddr, u32* data) { +s32 __osSiRawWriteIo(u32 devAddr, u32* data) { if (__osSiDeviceBusy() != 0) { return -1; } - + *(u32*)(devAddr | 0xA0000000) = (u32)data; - + return 0; }