Support for "addu" in place of move pseudoinstruction (#206)

* addu support

* some libultra decomp

* reorganization

* reorg

* comments
This commit is contained in:
Ethan Roseman 2021-03-11 03:08:22 -05:00 committed by GitHub
parent c0b67ce0d4
commit 0552ce26d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
187 changed files with 611 additions and 938 deletions

View File

@ -11,6 +11,9 @@
TYPE __attribute__((naked)) NAME(ARGS) { __asm__( ".include \"ver/"STRINGIFY(VERSION)"/asm/nonmatchings/"FOLDER"/"#NAME".s\"\n.set reorder\n.set at"); } TYPE __attribute__((naked)) NAME(ARGS) { __asm__( ".include \"ver/"STRINGIFY(VERSION)"/asm/nonmatchings/"FOLDER"/"#NAME".s\"\n.set reorder\n.set at"); }
#endif #endif
__asm__( ".include \"include/macro.inc\"\n"); __asm__( ".include \"include/macro.inc\"\n");
#ifdef MOVE_ADDU
__asm__( ".include \"include/move_addu.inc\"\n");
#endif
#else #else
#define INCLUDE_ASM(TYPE, FOLDER, NAME, ARGS...) #define INCLUDE_ASM(TYPE, FOLDER, NAME, ARGS...)
#endif #endif

3
include/move_addu.inc Normal file
View File

@ -0,0 +1,3 @@
.macro move a, b
addu \a, \b, $zero
.endm

View File

@ -294,6 +294,7 @@ extern s32 D_800B8590;
extern OSThread* __osActiveQueue; extern OSThread* __osActiveQueue;
extern OSThread* __osRunningThread; extern OSThread* __osRunningThread;
extern OSThread* __osRunQueue; extern OSThread* __osRunQueue;
extern OSDevMgr __osPiDevMgr;
// gfx // gfx
extern DisplayContext* gDisplayContext; extern DisplayContext* gDisplayContext;

301
src/code_4ac90_len_3910.c Normal file
View File

@ -0,0 +1,301 @@
#include "common.h"
extern EffectTableEntry D_8007F210[135];
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_8006F890);
INCLUDE_ASM(void, "code_4ac90_len_3910", func_8006F8F0, f32 arg0, f32 arg1, f32 arg2);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_8006F950);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_8006F9B0);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_8006FA10);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_8006FA70);
INCLUDE_ASM(s32, "code_4ac90_len_3910", fx_walk_large);
INCLUDE_ASM(void, "code_4ac90_len_3910", fx_walk_normal, s32 arg0, f32 arg1, f32 arg2, f32 arg3, s32 arg4, s32 arg5);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_8006FB90);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_8006FBF0);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_8006FC50);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_8006FCB0);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_8006FD10);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_8006FD70);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_8006FDD0);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_8006FE30);
INCLUDE_ASM(void, "code_4ac90_len_3910", fx_emote, s32 arg0, Npc* arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5,
f32 arg6, s32 arg7, s32* arg8);
INCLUDE_ASM(void, "code_4ac90_len_3910", func_8006FEF0, s32 a0, f32 a1, f32 a2, f32 a3, f32 a4);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_8006FF50);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_8006FFB0);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_80070010);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_80070070);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_800700D0);
INCLUDE_ASM(void, "code_4ac90_len_3910", func_80070130, s32 arg0, f32 arg1, f32 arg2, f32 arg3);
INCLUDE_ASM(void, "code_4ac90_len_3910", func_80070190, s32 arg0, f32 arg1, f32 arg2, f32 arg3, s32 arg4, f32 arg5,
s32 arg6, s32 arg7);
INCLUDE_ASM(void, "code_4ac90_len_3910", func_800701F0, s32 arg0, f32 arg1, f32 arg2, f32 arg3);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_80070250);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_800702B0);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_80070310);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_80070370);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_800703D0);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_80070430);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_80070490);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_800704F0);
INCLUDE_ASM(void, "code_4ac90_len_3910", func_80070550, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5,
s32 arg6, s32 arg7);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_800705B0);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_80070610);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_80070670);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_800706D0);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_80070730);
INCLUDE_ASM(s32, "code_4ac90_len_3910", fx_sweat);
INCLUDE_ASM(s32, "code_4ac90_len_3910", fx_sleep_bubble);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_80070850);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_800708B0);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_80070910);
INCLUDE_ASM(void, "code_4ac90_len_3910", func_80070970, s32 arg0, f32 arg1, f32 arg2, f32 arg3, s32 arg4, s32 arg5);
INCLUDE_ASM(void, "code_4ac90_len_3910", func_800709D0, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_80070A30);
INCLUDE_ASM(void, "code_4ac90_len_3910", func_80070A90, s32 arg0, f32 arg1, f32 arg2, f32 arg3);
INCLUDE_ASM(void, "code_4ac90_len_3910", func_80070AF0, s32 arg0, f32 arg1, f32 arg2, f32 arg3);
INCLUDE_ASM(void, "code_4ac90_len_3910", func_80070B50, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4);
INCLUDE_ASM(void, "code_4ac90_len_3910", func_80070BB0, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_80070C10);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_80070C70);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_80070CD0);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_80070D30);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_80070D90);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_80070DF0);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_80070E50);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_80070EB0);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_80070F10);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_80070F70);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_80070FD0);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_80071030);
INCLUDE_ASM(void, "code_4ac90_len_3910", func_80071090, s32 a0, f32 a1, f32 a2, f32 a3, s32 a4);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_800710F0);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_80071150);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_800711B0);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_80071210);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_80071270);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_800712D0);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_80071330);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_80071390);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_800713F0);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_80071450);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_800714B0);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_80071510);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_80071570);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_800715D0);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_80071630);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_80071690);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_800716F0);
INCLUDE_ASM(void, "code_4ac90_len_3910", func_80071750, s32 a0, f32 a1, f32 a2, f32 a3, f32 a4, s32 a5);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_800717B0);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_80071810);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_80071870);
INCLUDE_ASM(void, "code_4ac90_len_3910", func_800718D0, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_80071930);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_80071990);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_800719F0);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_80071A50);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_80071AB0);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_80071B10);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_80071B70);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_80071BD0);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_80071C30);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_80071C90);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_80071CF0);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_80071D50);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_80071DB0);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_80071E10);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_80071E70);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_80071ED0);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_80071F30);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_80071F90);
INCLUDE_ASM(void, "code_4ac90_len_3910", func_80071FF0, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_80072050);
INCLUDE_ASM(void, "code_4ac90_len_3910", func_800720B0, s32 a0, f32 a1, f32 a2, f32 a3, f32 a4, s32 a5);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_80072110);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_80072170);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_800721D0);
INCLUDE_ASM(UNK_TYPE, "code_4ac90_len_3910", func_80072230, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4,
s32 arg5);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_80072290);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_800722F0);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_80072350);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_800723B0);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_80072410);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_80072470);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_800724D0);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_80072530);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_80072590);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_800725F0);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_80072650);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_800726B0);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_80072710);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_80072770);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_800727D0);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_80072830);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_80072890);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_800728F0);
INCLUDE_ASM(void, "code_4ac90_len_3910", func_80072950, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 time);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_800729B0);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_80072A10);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_80072A70);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_80072AD0);
// FILE SPLIT
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_80072B30);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_80072BB0);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_80072BCC);
INCLUDE_ASM(s32, "code_4ac90_len_3910", load_battle_section);
INCLUDE_ASM(s32, "code_4ac90_len_3910", load_battle);
INCLUDE_ASM(s32, "code_4ac90_len_3910", set_battle_stage);
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_80072CDC);
void func_80072CEC(){
}
INCLUDE_ASM(s32, "code_4ac90_len_3910", func_80072CF4);
INCLUDE_ASM(s32, "code_4ac90_len_3910", setup_demo_player);
INCLUDE_ASM(s32, "code_4ac90_len_3910", load_demo_battle);

View File

@ -1,4 +1,9 @@
#define MOVE_ADDU
#include "common.h" #include "common.h"
#include "stdlib/stdarg.h"
s32 proutSprintf();
char spaces[] = " "; char spaces[] = " ";
char zeroes[] = "00000000000000000000000000000000"; char zeroes[] = "00000000000000000000000000000000";
@ -7,6 +12,20 @@ INCLUDE_ASM(s32, "os/code_3FEA0", _Printf);
INCLUDE_ASM(s32, "os/code_3FEA0", _Putfld); INCLUDE_ASM(s32, "os/code_3FEA0", _Putfld);
INCLUDE_ASM(int, "os/code_3FEA0", sprintf, char* s, const char* fmt, ...); int sprintf(char* s, const char* fmt, ...) {
s32 ret;
va_list argp;
va_start(argp, fmt);
ret = _Printf(&proutSprintf, s, fmt, argp);
if (ret < 0) {
return ret;
}
s[ret] = 0;
return ret;
}
INCLUDE_ASM(s32, "os/code_3FEA0", proutSprintf); INCLUDE_ASM(s32, "os/code_3FEA0", proutSprintf);

View File

@ -1,3 +0,0 @@
#include "common.h"
INCLUDE_ASM(s32, "os/code_3c220_len_a0", osEPiStartDma, OSPiHandle* handle, OSIoMesg* mesg, s32 unk);

View File

@ -1,3 +0,0 @@
#include "common.h"
INCLUDE_ASM(s32, "os/code_3c2c0_len_50", osEPiLinkHandle, OSPiHandle* handle);

View File

@ -1,5 +0,0 @@
#include "common.h"
INCLUDE_ASM(void, "os/code_3cb20_len_130", osInvalDCache, void* buf, s32 size);
INCLUDE_ASM(void, "os/code_3cb20_len_130", osInvalICache, void* buf, s32 size);

View File

@ -1,3 +0,0 @@
#include "common.h"
INCLUDE_ASM(void, "os/code_3cc50_len_80", osWritebackDCache, void* buf, s32 size);

View File

@ -1,6 +1,25 @@
#define MOVE_ADDU
#include "common.h" #include "common.h"
INCLUDE_ASM(s32, "os/code_3cd00_len_5f0", osContStartQuery, OSMesgQueue* queue); extern u8 D_8009A61C;
extern s32 D_800B0ED0;
s32 osContStartQuery(OSMesgQueue* mq) {
s32 ret;
__osSiGetAccess();
if (D_8009A61C != 0) {
osPackRequestData(0);
osSiRawStartDma(1, &D_800B0ED0);
osRecvMesg(mq, NULL, 1);
}
ret = osSiRawStartDma(0, &D_800B0ED0);
D_8009A61C = 0;
__osSiRelAccess();
return ret;
}
INCLUDE_ASM(void, "os/code_3cd00_len_5f0", osContGetQuery, OSContStatus* status); INCLUDE_ASM(void, "os/code_3cd00_len_5f0", osContGetQuery, OSContStatus* status);

View File

@ -1,3 +0,0 @@
#include "common.h"
INCLUDE_ASM(s32, "os/code_409b0_len_140", osJamMesg, OSMesgQueue* queue, OSMesg mesg, s32 unk);

View File

@ -1,3 +0,0 @@
#include "common.h"
INCLUDE_ASM(s32, "os/code_40af0_len_130", osRecvMesg, OSMesgQueue* queue, OSMesg* mesg, s32 unk);

View File

@ -1,8 +1,9 @@
#define MOVE_ADDU
#include "common.h" #include "common.h"
INCLUDE_ASM(s32, "os/code_47c60_len_f0", osContAddressCrc); INCLUDE_ASM(s32, "os/code_47c60_len_f0", osContAddressCrc);
#ifdef MOVE_ISSUE
u8 osContDataCrc(u8* data) { u8 osContDataCrc(u8* data) {
s32 ret; s32 ret;
u32 bit; u32 bit;
@ -34,6 +35,3 @@ u8 osContDataCrc(u8* data) {
} while (byte < 8U); } while (byte < 8U);
return ret; return ret;
} }
#else
INCLUDE_ASM(s32, "os/code_47c60_len_f0", osContDataCrc);
#endif

View File

@ -1,301 +0,0 @@
#include "common.h"
extern EffectTableEntry D_8007F210[135];
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_8006F890);
INCLUDE_ASM(void, "os/code_4ac90_len_3910", func_8006F8F0, f32 arg0, f32 arg1, f32 arg2);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_8006F950);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_8006F9B0);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_8006FA10);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_8006FA70);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", fx_walk_large);
INCLUDE_ASM(void, "os/code_4ac90_len_3910", fx_walk_normal, s32 arg0, f32 arg1, f32 arg2, f32 arg3, s32 arg4, s32 arg5);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_8006FB90);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_8006FBF0);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_8006FC50);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_8006FCB0);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_8006FD10);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_8006FD70);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_8006FDD0);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_8006FE30);
INCLUDE_ASM(void, "os/code_4ac90_len_3910", fx_emote, s32 arg0, Npc* arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5,
f32 arg6, s32 arg7, s32* arg8);
INCLUDE_ASM(void, "os/code_4ac90_len_3910", func_8006FEF0, s32 a0, f32 a1, f32 a2, f32 a3, f32 a4);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_8006FF50);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_8006FFB0);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80070010);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80070070);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_800700D0);
INCLUDE_ASM(void, "os/code_4ac90_len_3910", func_80070130, s32 arg0, f32 arg1, f32 arg2, f32 arg3);
INCLUDE_ASM(void, "os/code_4ac90_len_3910", func_80070190, s32 arg0, f32 arg1, f32 arg2, f32 arg3, s32 arg4, f32 arg5,
s32 arg6, s32 arg7);
INCLUDE_ASM(void, "os/code_4ac90_len_3910", func_800701F0, s32 arg0, f32 arg1, f32 arg2, f32 arg3);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80070250);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_800702B0);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80070310);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80070370);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_800703D0);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80070430);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80070490);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_800704F0);
INCLUDE_ASM(void, "os/code_4ac90_len_3910", func_80070550, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5,
s32 arg6, s32 arg7);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_800705B0);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80070610);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80070670);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_800706D0);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80070730);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", fx_sweat);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", fx_sleep_bubble);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80070850);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_800708B0);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80070910);
INCLUDE_ASM(void, "os/code_4ac90_len_3910", func_80070970, s32 arg0, f32 arg1, f32 arg2, f32 arg3, s32 arg4, s32 arg5);
INCLUDE_ASM(void, "os/code_4ac90_len_3910", func_800709D0, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80070A30);
INCLUDE_ASM(void, "os/code_4ac90_len_3910", func_80070A90, s32 arg0, f32 arg1, f32 arg2, f32 arg3);
INCLUDE_ASM(void, "os/code_4ac90_len_3910", func_80070AF0, s32 arg0, f32 arg1, f32 arg2, f32 arg3);
INCLUDE_ASM(void, "os/code_4ac90_len_3910", func_80070B50, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4);
INCLUDE_ASM(void, "os/code_4ac90_len_3910", func_80070BB0, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80070C10);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80070C70);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80070CD0);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80070D30);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80070D90);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80070DF0);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80070E50);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80070EB0);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80070F10);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80070F70);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80070FD0);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80071030);
INCLUDE_ASM(void, "os/code_4ac90_len_3910", func_80071090, s32 a0, f32 a1, f32 a2, f32 a3, s32 a4);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_800710F0);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80071150);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_800711B0);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80071210);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80071270);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_800712D0);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80071330);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80071390);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_800713F0);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80071450);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_800714B0);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80071510);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80071570);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_800715D0);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80071630);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80071690);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_800716F0);
INCLUDE_ASM(void, "os/code_4ac90_len_3910", func_80071750, s32 a0, f32 a1, f32 a2, f32 a3, f32 a4, s32 a5);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_800717B0);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80071810);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80071870);
INCLUDE_ASM(void, "os/code_4ac90_len_3910", func_800718D0, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80071930);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80071990);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_800719F0);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80071A50);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80071AB0);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80071B10);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80071B70);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80071BD0);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80071C30);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80071C90);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80071CF0);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80071D50);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80071DB0);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80071E10);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80071E70);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80071ED0);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80071F30);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80071F90);
INCLUDE_ASM(void, "os/code_4ac90_len_3910", func_80071FF0, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80072050);
INCLUDE_ASM(void, "os/code_4ac90_len_3910", func_800720B0, s32 a0, f32 a1, f32 a2, f32 a3, f32 a4, s32 a5);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80072110);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80072170);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_800721D0);
INCLUDE_ASM(UNK_TYPE, "os/code_4ac90_len_3910", func_80072230, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4,
s32 arg5);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80072290);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_800722F0);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80072350);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_800723B0);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80072410);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80072470);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_800724D0);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80072530);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80072590);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_800725F0);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80072650);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_800726B0);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80072710);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80072770);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_800727D0);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80072830);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80072890);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_800728F0);
INCLUDE_ASM(void, "os/code_4ac90_len_3910", func_80072950, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 time);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_800729B0);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80072A10);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80072A70);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80072AD0);
// FILE SPLIT
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80072B30);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80072BB0);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80072BCC);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", load_battle_section);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", load_battle);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", set_battle_stage);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80072CDC);
void func_80072CEC(){
}
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80072CF4);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", setup_demo_player);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", load_demo_battle);

3
src/os/osEPiLinkHandle.c Normal file
View File

@ -0,0 +1,3 @@
#include "common.h"
INCLUDE_ASM(s32, "os/osEPiLinkHandle", osEPiLinkHandle, OSPiHandle* handle);

View File

@ -1,3 +1,12 @@
#define MOVE_ADDU
#include "common.h" #include "common.h"
INCLUDE_ASM(s32, "os/osEPiReadIo", osEPiReadIo, OSPiHandle* handle, u32 size, u32* out); s32 osEPiReadIo(OSPiHandle* pihandle, u32 devAddr, u32* data) {
s32 ret;
__osPiGetAccess();
ret = osEPiRawReadIo(pihandle, devAddr, data);
__osPiRelAccess();
return ret;
}

23
src/os/osEPiStartDma.c Normal file
View File

@ -0,0 +1,23 @@
#define MOVE_ADDU
#include "common.h"
s32 osEPiStartDma(OSPiHandle* pihandle, OSIoMesg* mb, s32 direction) {
if (!__osPiDevMgr.active) {
return -1;
}
mb->piHandle = pihandle;
if (direction == OS_READ) {
mb->hdr.type = OS_MESG_TYPE_EDMAREAD;
} else {
mb->hdr.type = OS_MESG_TYPE_EDMAWRITE;
}
if (mb->hdr.pri != OS_MESG_PRI_HIGH) {
return osSendMesg(osPiGetCmdQueue(), mb, 0);
} else {
return osJamMesg(osPiGetCmdQueue(), mb, 0);
}
}

View File

@ -1,6 +1,7 @@
#define MOVE_ADDU
#include "common.h" #include "common.h"
#ifdef MOVE_ISSUE
s32 osEPiWriteIo(OSPiHandle* handle, u32 devAddr, u32 data) { s32 osEPiWriteIo(OSPiHandle* handle, u32 devAddr, u32 data) {
register s32 ret; register s32 ret;
@ -10,6 +11,3 @@ s32 osEPiWriteIo(OSPiHandle* handle, u32 devAddr, u32 data) {
return ret; return ret;
} }
#else
INCLUDE_ASM(s32, "os/osEPiWriteIo", osEPiWriteIo, OSPiHandle* handle, u32 devAddr, u32 data);
#endif

3
src/os/osJamMesg.c Normal file
View File

@ -0,0 +1,3 @@
#include "common.h"
INCLUDE_ASM(s32, "os/osJamMesg", osJamMesg, OSMesgQueue* queue, OSMesg mesg, s32 unk);

3
src/os/osRecvMesg.c Normal file
View File

@ -0,0 +1,3 @@
#include "common.h"
INCLUDE_ASM(s32, "os/osRecvMesg", osRecvMesg, OSMesgQueue* queue, OSMesg* mesg, s32 unk);

View File

@ -1,3 +1,5 @@
#define MOVE_ADDU
#include "common.h" #include "common.h"
struct __osThreadTail { struct __osThreadTail {
@ -11,7 +13,6 @@ OSThread* __osActiveQueue = (OSThread*)&__osThreadTail;
OSThread* __osRunningThread = NULL; OSThread* __osRunningThread = NULL;
OSThread* __osFaultedThread = NULL; OSThread* __osFaultedThread = NULL;
#ifdef MOVE_ISSUE
void osSetThreadPri(OSThread* thread, OSPri pri) { void osSetThreadPri(OSThread* thread, OSPri pri) {
register u32 prevInt = __osDisableInt(); register u32 prevInt = __osDisableInt();
@ -33,6 +34,3 @@ void osSetThreadPri(OSThread* thread, OSPri pri) {
__osRestoreInt(prevInt); __osRestoreInt(prevInt);
} }
#else
INCLUDE_ASM(void, "os/osSetThreadPri", osSetThreadPri, OSThread* thread, OSPri pri);
#endif

File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show More