Fully split and name libultra, and also decomp 3404 (#16)

* libultra sorted out

* missed some things

* forgot some things

* one more thing

* not actually libultra

* also split out the data into three sections

* finer split

* parameter is a thing, apparently

* named everything in libultra

* make
This commit is contained in:
petrie911 2023-11-04 17:45:03 -05:00 committed by GitHub
parent f2af4867e4
commit 931f589177
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
38 changed files with 1075 additions and 160 deletions

View File

@ -29,6 +29,7 @@
"stdint.h": "c",
"xstdio.h": "c",
"controller.h": "c",
"os_version.h": "c"
"os_version.h": "c",
"stdbool.h": "c"
},
}

View File

@ -216,6 +216,7 @@ build/src/libultra/os/stopthread.o: OPTFLAGS := -O1 -g0
build/src/libultra/rmon/rmonmem.o: OPTFLAGS := -O1 -g0
build/src/libultra/rmon/rmontask.o: OPTFLAGS := -O1 -g0
build/src/libultra/rmon/rmonregs.o: OPTFLAGS := -O1 -g0
build/src/libultra/rmon/rmonmisc.o: OPTFLAGS := -O1 -g0
# cc & asm-processor
CC := $(ASM_PROC) $(ASM_PROC_FLAGS) $(IDO) -- $(AS) $(ASFLAGS) --

8
include/dbgdefs.h Normal file
View File

@ -0,0 +1,8 @@
#ifndef _DBGDEFS_H__
#define _DBGDEFS_H__
typedef int TVid;
typedef unsigned short TVushort;
typedef char TVuchar;
#endif

402
include/dbgproto.h Normal file
View File

@ -0,0 +1,402 @@
#ifndef _DBGPROTO_H__
#define _DBGPROTO_H__
#include "dbgdefs.h"
#define KK_REV 2
#define KK_CODE_THREAD_STATUS 4
#define KK_TYPE_REQUEST 0
#define KK_TYPE_REPLY 1
#define KK_TYPE_EXCEPTION 2
#define KK_TYPE_THREAD_EXIT 3
#define KK_TYPE_PROCESS_EXIT 4
#define KK_TYPE_CONSOLE 5
#define TV_ERROR_NO_ERROR 0
#define TV_ERROR_ILLEGAL_CALL -1
#define TV_ERROR_INVALID_ID -2
#define TV_ERROR_INVALID_TYPE -3
#define TV_ERROR_OPERATIONS_PROTECTED -4
#define TV_ERROR_INVALID_ADDRESS -5
#define TV_ERROR_INVALID_PRIORITY -6
#define TV_ERROR_INVALID_FLAGS -7
#define TV_ERROR_INVALID_CAPABILITY -8
#define TV_ERROR_NO_HANDLER -9
#define TV_ERROR_NO_MORE_IDS -10
#define TV_ERROR_NO_MORE_MESSAGES -11
#define TV_ERROR_NO_MORE_PROCESSES -12
#define TV_ERROR_NO_MORE_THREADS -13
#define TV_ERROR_NO_MORE_REGIONS -14
#define TV_ERROR_NO_MORE_TIMERS -15
#define TV_ERROR_NO_MORE_LOCKS -16
#define TV_ERROR_NO_MORE_QUEUES -17
#define TV_ERROR_NO_MORE_SETS -18
#define TV_ERROR_NO_MORE_MEMORY -19
#define TV_ERROR_NOT_LOCKED -20
typedef struct __KKTimeStruct {
long seconds;
long nanoseconds;
} KKTimeStruct;
typedef struct __KKObjsStruct {
TVushort number;
TVid objects[1];
} KKObjs;
typedef struct __KKFaultInfoStruct {
unsigned int addr;
short major;
short minor;
} KKFaultInfo;
typedef struct __KKThreadStatusStruct {
int flags;
short why;
short what;
TVid tid;
TVid pid;
unsigned int instr;
KKFaultInfo info;
int priority;
int start;
int rv;
unsigned int args[6];
} KKThreadStatus;
#define KK_RUN_SSTEP (1 << 0)
#define KK_RUN_SETPC (1 << 1)
typedef struct __KKRunStruct {
int flags;
unsigned int vaddr;
} KKRun;
typedef struct __KKFaultStruct {
short majorMask;
short minorMask;
} KKFault;
typedef struct __KKRegionStruct {
unsigned int vaddr;
unsigned int size;
short flags;
unsigned int paddr;
} KKRegion;
typedef struct __KKGregSetStruct {
unsigned int gregs[37];
} KKGregSet;
typedef struct __KKFPregSetStruct {
union {
double dregs[16];
float fregs[32];
unsigned int regs[32];
} fpregs;
unsigned int fpcsr;
unsigned int fppad;
} KKFPregSet;
typedef struct __KKRegisterContextStruct {
KKGregSet gregs;
KKFPregSet fpregs;
} KKRegisterContext;
typedef struct __KKCpScalarSetStruct {
unsigned int sregs[40];
} KKCpScalarRegSet;
typedef struct __KKCpVectorSetStruct {
unsigned int vregs[128];
} KKCpVectorRegSet;
typedef struct __KKCpRegisterContextStruct {
KKCpScalarRegSet sregs;
KKCpVectorRegSet vregs;
} KKCpRegisterContext;
typedef struct __KKUsageStruct {
KKTimeStruct tstamp;
KKTimeStruct created;
KKTimeStruct states[10];
} KKUsage;
typedef struct __KKLogEventSetStruct {
int from;
int to;
} KKLogEventSet;
typedef struct __KKLogStatusStruct {
int bufferType;
int bufferSize;
int dataSize;
int logState;
int flushLimit;
} KKLogStatus;
typedef struct __KKProcUsageStruct {
TVid pid;
KKTimeStruct states[10];
} KKProcUsage;
typedef struct __KKHeaderStruct {
int length;
char code;
char type;
short error;
char rev;
char method;
short notused2;
} KKHeader;
typedef struct __KKGetFrameRequestStruct {
KKHeader header;
int height;
int width;
int which;
} KKGetFrameRequest;
typedef struct __KKLoadExecutableRequestStruct {
KKHeader header;
char str[1];
} KKLoadExecutableRequest;
typedef struct __KKObjectRequestStruct {
KKHeader header;
TVid object;
} KKObjectRequest;
typedef struct __KKRunThreadRequestStruct {
KKHeader header;
TVid tid;
KKRun actions;
} KKRunThreadRequest;
typedef struct __KKFaultRequestStruct {
KKHeader header;
TVid tid;
KKFault fault;
TVuchar stopAllThreads;
} KKFaultRequest;
typedef struct __KKGRegsetRequestStruct {
KKHeader header;
TVid tid;
KKGregSet registers;
} KKGRegsetRequest;
typedef struct __KKFPRegsetRequestStruct {
KKHeader header;
TVid tid;
KKFPregSet registers;
} KKFPRegsetRequest;
typedef struct __KKCpScalarRegsetRequestStruct {
KKHeader header;
TVid tid;
KKCpScalarRegSet registers;
} KKCpScalarRegsetRequest;
typedef struct __KKCpVectorRegsetRequestStruct {
KKHeader header;
TVid tid;
KKCpVectorRegSet registers;
} KKCpVectorRegsetRequest;
typedef struct __KKReadRequestStruct {
KKHeader header;
TVid object;
unsigned int addr;
unsigned int nbytes;
} KKReadRequest;
typedef struct __KKWriteHeaderStruct {
KKHeader header;
TVid object;
unsigned int addr;
unsigned int nbytes;
} KKWriteHeader;
typedef struct __KKWriteRequestStruct {
KKWriteHeader writeHeader;
char buffer[1];
} KKWriteRequest;
typedef struct __KKSetBkptRequestStruct {
KKHeader header;
TVid object;
unsigned int addr;
} KKSetBkptRequest;
typedef struct __KKClrBkptRequestStruct {
KKHeader header;
TVid object;
TVid bp;
} KKClrBkptRequest;
typedef struct __KKWatchRequestStruct {
KKHeader header;
TVid object;
unsigned int number;
KKRegion wp[1];
} KKWatchRequest;
typedef struct __KKSetCommRequestStruct {
KKHeader header;
unsigned int how;
unsigned int addr;
} KKSetCommRequest;
typedef struct __KKSysCallSetStruct {
unsigned int word[8];
} KKSysCallSet;
typedef struct __KKSysCallRequestStruct {
KKHeader header;
TVid pid;
KKSysCallSet syscallset;
} KKSysCallRequest;
typedef struct __KKLogEventRequestStruct {
KKHeader header;
unsigned int numSet;
KKLogEventSet set[1];
} KKLogEventRequest;
typedef struct __KKNewLogRequestStruct {
KKHeader header;
char str[1];
} KKNewLogRequest;
typedef struct __KKRemoteRequestStruct {
KKHeader header;
int len;
char buf[16];
} KKRemoteRequest;
typedef struct __KKFlushLogRequestStruct {
KKHeader header;
int no_block;
} KKFlushLogRequest;
typedef struct __KKLogControlRequestStruct {
KKHeader header;
int command;
int arg;
} KKLogControlRequest;
typedef struct __KKSetTrptRequestStruct {
KKSetBkptRequest bpRequest;
unsigned short code;
} KKSetTrptRequest;
typedef KKClrBkptRequest KKClrTrptRequest;
typedef struct __KKObjectEventStruct {
KKHeader header;
TVid object;
} KKObjectEvent;
typedef struct __KKObjsEventStruct {
KKHeader header;
TVid object;
KKObjs objs;
} KKObjsEvent;
typedef struct __KKBufferEventStruct {
KKHeader header;
TVid object;
char buffer[1];
} KKBufferEvent;
typedef struct __KKStatusEventStruct {
KKHeader header;
KKThreadStatus status;
} KKStatusEvent;
typedef struct __KKFaultEventStruct {
KKHeader header;
TVid tid;
KKFault fault;
TVuchar stopAllThreads;
} KKFaultEvent;
typedef struct __KKNumberEventStruct {
KKHeader header;
TVid object;
unsigned int number;
} KKNumberEvent;
typedef struct __KKRegionEventStruct {
KKHeader header;
TVid object;
unsigned int number;
KKRegion regions[1];
} KKRegionEvent;
typedef struct __KKGregEventStruct {
KKHeader header;
TVid tid;
KKGregSet registers;
} KKGregEvent;
typedef struct __KKFPregEventStruct {
KKHeader header;
TVid tid;
KKFPregSet registers;
} KKFPregEvent;
typedef struct __KKCpSregEventStruct {
KKHeader header;
TVid tid;
KKCpScalarRegSet registers;
} KKCpSregEvent;
typedef struct __KKCpVregEventStruct {
KKHeader header;
TVid tid;
KKCpVectorRegSet registers;
} KKCpVregEvent;
typedef struct __KKBkptEventStruct {
KKHeader header;
TVid object;
TVid bp;
unsigned int instruction;
} KKBkptEvent;
typedef struct __KKUsageEventStruct {
KKHeader header;
TVid tid;
KKUsage usage;
} KKUsageEvent;
typedef struct __KKFlushEventStruct {
KKHeader header;
int bufferType;
char buffer[1];
} KKFlushEvent;
typedef struct __KKLogStatusEventStruct {
KKHeader header;
KKLogStatus status;
} KKLogStatusEvent;
typedef struct __KKSysUsageEventStruct {
KKHeader header;
KKTimeStruct tstamp;
int numProc;
KKProcUsage usage[1];
} KKSysUsageEvent;
typedef struct __KKStringEventStruct {
KKHeader header;
char str[1];
} KKStringEvent;
typedef KKSysCallRequest KKSysCallEvent;
#endif

169
include/rmonint.h Normal file
View File

@ -0,0 +1,169 @@
#ifndef _RMONINT_H
#define _RMONINT_H
#include "dbgproto.h"
#include "PR/os_internal.h"
/* mips */
#define MIPS_LWC2_OPCODE 50
#define MIPS_SWC2_OPCODE 58
#define MIPS_LW_OPCODE 35
#define MIPS_SW_OPCODE 43
#define MIPS_BREAK_OPCODE 0xD
#define MIPS_BREAK_MASK 0xFC00003F
#define MIPS_BREAK(code) \
((((code) & 0xFFFFF) << 6) | MIPS_BREAK_OPCODE)
/* R4300 General Purpose Register Indices */
#define GREG_IDX_ZERO 0
#define GREG_IDX_AT 1
#define GREG_IDX_T9 25
#define GREG_IDX_K0 26
#define GREG_IDX_GP 28
#define GREG_IDX_RA 31
#define GREG_IDX_LO 32
#define GREG_IDX_HI 33
#define GREG_IDX_CAUSE 34
#define GREG_IDX_PC 35
#define GREG_IDX_SR 36
/* RSP Scalar Register Indices */
#define SREG_IDX_ZERO 0
#define SREG_IDX_RA 31
#define SREG_IDX_DRAM_ADDR (32 + 0)
#define SREG_IDX_MEM_ADDR (32 + 1)
#define SREG_IDX_RD_LEN (32 + 2)
#define SREG_IDX_PC (32 + 3)
#define SREG_IDX_WR_LEN (32 + 4)
#define SREG_IDX_STATUS (32 + 5)
#define SREG_IDX_DMA_FULL (32 + 6)
#define SREG_IDX_DMA_BUSY (32 + 7)
/* RSP Vector Register Properties */
#define VREG_NUM 32
#define VREG_SIZE 0x10
/* rmon */
#define RMON_MESG_CPU_BREAK 2
#define RMON_MESG_SP_BREAK 4
#define RMON_MESG_FAULT 8
#define RMON_CPU 0
#define RMON_RSP 1
/* "thread id" for rsp */
#define RMON_TID_RSP 1000
/* "thread priority" for rsp */
#define RMON_PRI_RSP 42
/* "thread id" for no thread running */
#define RMON_TID_NOTHREAD 1003
#define RMON_PID_CPU 1002
#define RMON_PID_RSP 1001
/* Largest serviceable read/write memory request */
#define RMON_MAX_XFER_SIZE 1024
/* rmonmain */
void __rmonSendHeader(KKHeader* const block, u32 blockSize, u32 type);
void __rmonSendReply(KKHeader* const block, u32 blockSize, u32 replyType);
void __rmonSendData(char* const block, unsigned int blockSize);
extern int __rmonActive;
/* rmonmisc */
void __rmonInit(void);
void __rmonPanic(void);
extern OSMesgQueue __rmonMQ;
/* rmonmem */
void __rmonWriteWordTo(u32* addr, u32 val);
u32 __rmonReadWordAt(u32* addr);
void __rmonMemcpy(u8* dest, u8* srce, u32 count);
void __rmonCopyWords(u32* dest, u32* srce, u32 count);
extern u8 __rmonUtilityBuffer[];
/* rmonsio */
void __rmonSendFault(OSThread* thread);
void __rmonIOflush(void);
void __rmonIOputw(u32 word);
void __rmonIOhandler(void);
extern void* __osRdb_DbgRead_Buf;
extern u8 rmonRdbReadBuf[];
/* rmonrcp */
int __rmonRCPrunning(void);
void __rmonIdleRCP(void);
void __rmonStepRCP(void);
void __rmonRunRCP(void);
/* rmonbrk */
u32 __rmonGetBranchTarget(int method, int thread, char* addr);
int __rmonSetSingleStep(int thread, u32* instptr);
void __rmonGetExceptionStatus(KKStatusEvent* reply);
void __rmonHitBreak(void);
void __rmonHitSpBreak(void);
void __rmonHitCpuFault(void);
extern u8 __rmonRcpAtBreak;
/* rmonregs */
u32 __rmonGetRegisterContents(int method, int threadNumber, int regNumber);
/* rmontask */
void __rmonMaskIdleThreadInts(void);
OSThread* __rmonGetTCB(int threadNumber);
int __rmonStopUserThreads(int whichThread);
int __rmonGetThreadStatus(int method, int id, KKStatusEvent* reply);
/* rmoncmds */
int __rmonExecute(KKHeader* request);
/* commands */
typedef int (*FUNPTR)();
int __rmonLoadProgram(KKHeader* req);
int __rmonListProcesses(KKHeader* req);
int __rmonGetExeName(KKHeader* req);
int __rmonListThreads(KKHeader* req);
int __rmonThreadStatus(KKHeader* req);
int __rmonStopThread(KKHeader* req);
int __rmonRunThread(KKHeader* req);
int __rmonSetFault(KKHeader* req);
int __rmonGetRegionCount(KKHeader* req);
int __rmonGetRegions(KKHeader* req);
int __rmonGetGRegisters(KKHeader* req);
int __rmonSetGRegisters(KKHeader* req);
int __rmonGetFRegisters(KKHeader* req);
int __rmonSetFRegisters(KKHeader* req);
int __rmonReadMem(KKHeader* req);
int __rmonWriteMem(KKHeader* req);
int __rmonSetBreak(KKHeader* req);
int __rmonClearBreak(KKHeader* req);
int __rmonListBreak(KKHeader* req);
int __rmonSetComm(KKHeader* req);
int __rmonGetSRegs(KKHeader* req);
int __rmonSetSRegs(KKHeader* req);
int __rmonGetVRegs(KKHeader* req);
int __rmonSetVRegs(KKHeader* req);
#endif

View File

@ -28,8 +28,18 @@ extern s32 D_800D2190[];
extern f32 D_800D21A0;
extern f32 D_800D21A4;
extern s32 D_800D2870;
extern u8 D_800DD8B0[];
extern u16 D_800D99F8[];
extern OSContPad D_800DD880[4];
extern OSContPad D_800DD898[4];
extern u8 D_800DD8B0[4];
extern s32 D_800DD8B4;
extern u8 D_800DD8B8[4];
extern u8 D_800DD8BC[4]; // Fake symbol. Only exists as loop terminator for D_800DD8B8
// extern OSContPad D_800DD8C0[4];
// extern OSContPad D_800DD8D8[4];
// extern OSContStatus D_800DD8F0[4];
// extern OSPfs D_800DD900[4];
extern Gfx* D_80137E64;
extern u8 D_80137E78;
@ -254,10 +264,10 @@ extern Gfx D_6004570[];
extern Gfx D_D0098B0[];
extern Gfx D_F014180[];
extern u16 D_800D99F8[];
extern u8 D_800DD8B8[];
extern OSContStatus D_800DD8F0;
extern u8 D_80137E84[];
extern OSMesgQueue D_800E2128;
extern OSMesgQueue D_800E22F8;
extern OSMesgQueue D_800E2318;
extern u8 D_80137E80;
extern s32 D_80144F60;

View File

@ -21,6 +21,9 @@ Math_FAtan2F = 0x8001FD0C;
Math_FAsinF = 0x8001FE00;
Math_FAcosF = 0x8001FE30;
D_800E23B0 = 0x800E23B0; // size:0x55AA0
D_8013C3D0 = 0x8013C3D0; // size:0x8800
D_800D934C = 0x800D934C; // force_migration:True
D_800D503C = 0x800D503C; // force_migration:True
D_800D5248 = 0x800D5248; // force_migration:True
@ -29,7 +32,6 @@ D_800D8560 = 0x800D8560; // force_migration:True
D_800D55E4_fake = 0x800D55E4; // force_migration:True
D_800D8570 = 0x800D8570; // force_migration:True
D_800D8594 = 0x800D8594; // force_migration:True
D_800C9524 = 0x800C9524; // force_migration:True
D_800C93EC = 0x800C93EC; // force_migration:True
D_8019B1EC_E07F2C = 0x8019B1EC; // force_migration:True segment:segment_DF4260

View File

@ -1,9 +1,12 @@
osContInit = 0x8001FFC0;
__osContGetInitData = 0x800201B8;
__osPackRequestData = 0x80020288;
osContStartReadData = 0x80020380;
osContGetReadData = 0x80020444;
__osPackReadData = 0x800204EC;
osMotorStop = 0x80020920;
osMotorStart = 0x80020A88;
osMotorInit= 0x80020D70;
osMotorInit = 0x80020D70;
osRecvMesg = 0x800205E0;
osSendMesg = 0x80020720;
osContStartQuery = 0x80020870;
@ -21,6 +24,7 @@ osViBlack = 0x80021900;
osWritebackDCacheAll = 0x80021970;
osViSwapBuffer = 0x800219A0;
osViRepeatLine = 0x800219F0;
osParameterPad = 0x80021A60;
osViSetMode = 0x80021AC0;
osViSetSpecialFeatures = 0x80021B30;
osCreateMesgQueue = 0x80021CF0;
@ -34,6 +38,32 @@ osDpSetStatus = 0x80022190;
osCreateThread = 0x800221A0;
osStartThread = 0x800222F0;
osCreateViManager = 0x80022440;
_MakeMotorData = 0x80020BF4;
__osSiRawWriteIo = 0x80028C30;
__osSiRawReadIo = 0x80028BE0;
osReadHost = 0x80029EB0;
_VirtualToPhysicalTask = 0x80021EA0;
viMgrMain = 0x800225C8;
__osPackEepReadData = 0x800236A0;
__osPackEepWriteData = 0x80023960;
__osExceptionPreamble = 0x80025350;
__ptExceptionPreamble = 0x80025360;
__ptException = 0x80025384;
__osException = 0x80025428;
send_mesg = 0x80025D08;
__osPackRamWriteData = 0x800267C4;
__osPackRamReadData = 0x80026B5C;
osLeoDiskInit = 0x80027F90;
string_to_u32 = 0x80029BA0;
send_packet = 0x80029BF8;
clear_IP6 = 0x80029C6C;
send = 0x80029CD8;
kdebugserver = 0x80029DA8;
__osLeoAbnormalResume = 0x8002A8B4;
__osLeoResume = 0x8002A99C;
__osPfsGetStatus = 0x8002AC30;
__osSpRawWriteIo = 0x8002E1E0;
__osSpRawReadIo = 0x8002E230;
osCreatePiMgr = 0x800227A0;
ramromMain = 0x8002296C;
osSetThreadPri = 0x80022A80;
@ -125,9 +155,15 @@ osMapTLBRdb = 0x80028C80;
osPiRawReadIo = 0x80028CE0;
bzero = 0x80028D40;
_Litob = 0x80028DE0;
_Genld = 0x80029080;
_Ldtob = 0x800295F0;
__osAiDeviceBusy = 0x80029B40;
__osSiDeviceBusy = 0x80029B70;
__rmonSendFault = 0x80029F80;
__rmonIOflush = 0x80029FF4;
__rmonIOputw = 0x8002A044;
__rmonIOhandler = 0x8002A0B0;
osInitRdb = 0x8002A180;
__osLeoInterrupt = 0x8002A210;
osSetIntMask = 0x8002AA90;
osDestroyThread = 0x8002AB30;
@ -141,52 +177,194 @@ osYieldThread = 0x8002AF60;
lldiv = 0x8002AFB0;
ldiv = 0x8002B0B0;
__osGetCause = 0x8002B140;
__rmoncmd_NotImplemented = 0x8002B150;
__rmonExecute = 0x8002B15C;
__rmonWriteWordTo = 0x8002B1F0;
__rmonReadWordAt = 0x8002B238;
__rmonMemcpy = 0x8002B28C;
__rmonCopyWords = 0x8002B2C0;
__rmonmem_strcopy = 0x8002B2F4;
__rmonReadMem = 0x8002B330;
__rmonWriteMem = 0x8002B52C;
__rmonListProcesses = 0x8002B778;
__rmonLoadProgram = 0x8002B7F8;
__rmonGetExeName = 0x8002B804;
__rmonGetRegionCount = 0x8002B8AC;
__rmonGetRegions = 0x8002B91C;
__rmonMaskIdleThreadInts = 0x8002BB00;
__rmonGetTCB = 0x8002BB7C;
__rmonStopUserThreads = 0x8002BBFC;
__rmonListThreads = 0x8002BD04;
__rmonGetThreadStatus = 0x8002BE38;
__rmonThreadStatus = 0x8002C12C;
__rmonStopThread = 0x8002C194;
__rmonRunThread = 0x8002C2DC;
__rmonSetFault = 0x8002C570;
__rmonInit = 0x8002C5BC;
__rmonPanic = 0x8002C698;
__rmonSetComm = 0x8002C6B8;
__rmonregs_LoadStoreSU = 0x8002C700;
LoadStoreVU = 0x8002C784;
SetUpForRCPop = 0x8002C818;
CleanupFromRCPop = 0x8002C8C0;
__rmonGetGRegisters = 0x8002C968;
__rmonSetGRegisters = 0x8002CAC4;
__rmonGetFRegisters = 0x8002CC14;
__rmonSetFRegisters = 0x8002CCCC;
rmonGetRcpRegister = 0x8002CD80;
__rmonGetSRegs = 0x8002CDE4;
__rmonSetSRegs = 0x8002CF44;
__rmonGetVRegs = 0x8002D054;
__rmonSetVRegs = 0x8002D16C;
__rmonGetRegisterContents = 0x8002D230;
SetTempBreakpoint = 0x8002D300;
ClearTempBreakpoint = 0x8002D3AC;
__rmonSetBreak = 0x8002D494;
__rmonListBreak = 0x8002D654;
__rmonClearBreak = 0x8002D660;
__rmonGetBranchTarget = 0x8002D7BC;
__rmonbrk_IsJump = 0x8002D9E4;
__rmonSetSingleStep = 0x8002DA78;
__rmonGetExceptionStatus = 0x8002DB3C;
rmonSendBreakMessage = 0x8002DB7C;
__rmonHitBreak = 0x8002DC38;
__rmonHitSpBreak = 0x8002DC68;
__rmonHitCpuFault = 0x8002DCD0;
rmonFindFaultedThreads = 0x8002DD00;
__rmonSendHeader = 0x8002DDE0;
__rmonSendReply = 0x8002DE78;
__rmonSendData = 0x8002DF20;
rmonMain = 0x8002E040;
osStopThread = 0x8002E280;
__rmonRCPrunning = 0x8002E340;
__rmonIdleRCP = 0x8002E364;
__rmonStepRCP = 0x8002E3A8;
__rmonRunRCP = 0x8002E3BC;
__osContinitialized = 0x800C7CC0;
osViModeNtscLan1 = 0x800C7CD0;
osViModePalLan1 = 0x800C7D20;
osViModeMpalLan1 = 0x800C7D70;
__osViDevMgr = 0x800C7DC0;
__osPiDevMgr = 0x800C7DE0;
__osViDevMgr = 0x800C7DC0; //size:0x1C
__osPiDevMgr = 0x800C7DE0; //size:0x1C
__osPiTable = 0x800C7DFC;
__osCurrentHandle = 0x800C7E00;
osClockRate = 0x800C7E10;
osClockRate = 0x800C7E10; //type:u64
osViClock = 0x800C7E18;
__osShutdown = 0x800C7E1C;
__OSGlobalIntMask = 0x800C7E20;
__xprintf_spaces = 0x800C7E30;
__xprintf_zeroes = 0x800C7E54;
__ai_hdwrBugFlag = 0x800C7E80;
__osSiAccessQueueEnabled = 0x800C7E90;
__osThreadTail = 0x800C7EA0;
__osRunQueue = 0x800C7EA8;
__osActiveQueue = 0x800C7EAC;
__osRunningThread = 0x800C7EB0;
__osFaultedThread = 0x800C7EB4;
__osHwIntTable = 0x800C7EC0;
__osRdb_DbgRead_Ct = 0x800C7ED4;
__osRdb_Mesg = 0x800C7ED8;
__os_Kdebug_Pkt = 0x800C7EDC;
__osvi_vi_1 = 0x800C7EE0;
__osvi_vi_2 = 0x800C7F10;
__osViCurr = 0x800C7F40;
__osViNext = 0x800C7F44;
__osTimerList = 0x800C7F50;
__osPiAccessQueueEnabled = 0x800C7F60;
__osRdb_IP6_Empty = 0x800C7F70;
ldigs = 0x800C7F80;
udigs = 0x800C7F94;
__osRcpImTable = 0x800E95E0;
__osContPifRam = 0x80156620;
__kdebug_numChars = 0x800C7FB0;
readHostInitialized = 0x800C7FC0;
__rmon_dispatchTable = 0x800C7FD0;
__rmonActive = 0x800C80B0;
__osIntOffTable = 0x800C94E0;
__osIntTable = 0x800C9500;
__osCauseTable_pt = 0x800C9524;
__osRcpImTable = 0x800C95E0;
__osContPifRam = 0x80156620; // size:0x40
__osContLastCmd = 0x80156660;
__osMaxControllers = 0x80156661;
__osEepromTimerQ = 0x80156688;
__osEepromTimerMsg = 0x801566A0;
__osEventStateTab = 0x801568F0;
__osPfsPifRam = 0x801594C0;
__sptask_tmp_task = 0x801569B0;
viThread = 0x801569F0;
viThreadStack = 0x80156BA0;
viEventQueue = 0x80157BA0;
viEventBuf = 0x80157BB8;
viRetraceMsg = 0x80157BD0; // size:0x18
viCounterMsg = 0x80157BE8; // size:0x18
__vimgr_retrace = 0x80157C00;
_MotorStopData = 0x801566B0;
_MotorStartData = 0x801567B0;
_motorstopbuf= 0x801568B0;
_motorstopbuf = 0x801568B0;
_motorstartbuf = 0x801568D0;
piThread = 0x80157C10;
piThreadStack = 0x80157DC0;
ramromThread = 0x80158DC0;
ramromThreadStack = 0x80158F70;
getRamromQ = 0x80159370;
getRamromBuf= 0x80159388;
getRamromBuf = 0x80159388;
freeRamromQ = 0x80159390;
freeRamromBuf = 0x801593A8;
piEventQueue = 0x801593B0;
piEventBuf = 0x801593C8;
__kmc_pt_mode = 0x801593D0;
__osEepPifRam = 0x801593E0; // size:0x40
CartRomHandle = 0x80159420; // size:0x74
siAccessBuf = 0x801594A0;
__osSiAccessQueue = 0x801594A8;
__osPfsPifRam = 0x801594C0; // size:0x40
__osBaseTimer = 0x80159500;
__osCurrentTime = 0x80159520; // type:u64
__osBaseCounter = 0x80159528;
__osViIntrCount = 0x8015952C;
__osTimerCounter = 0x80159530;
__osProfTimerQ = 0x80159538;
__osProfileList = 0x80159550;
__osProfileListEnd = 0x80159554;
__osProfileOverflowBin = 0x80159558;
LeoDiskHandle = 0x80159560; // size:0x74
__osDiskHandle = 0x801595D4;
piAccessBuf = 0x801595E0;
__osPiAccessQueue = 0x801595E8;
__osEepPifRam = 0x801793E0;
__osCurrentTime = 0x80179520;
__osBaseCounter = 0x80179528;
__osViIntrCount = 0x8017952C;
__osDiskHandle = 0x801795D4;
__osThreadSave = 0x80159600;
__kdebug_buffer = 0x801597B0;
readHostMesgQueue = 0x801597C0;
readHostMesgBuf = 0x801597D8;
__osRdb_Read_Data_Buf = 0x801597DC;
__osRdb_Read_Data_Ct = 0x801597E0;
IOmq = 0x801597F0;
IOmsgs = 0x80159808;
__osRdb_DbgRead_Buf = 0x8015980C;
rmonRdbReadBuf = 0x80159810;
__osRdb_IP6_Data = 0x8015A010;
__osRdb_IP6_Size = 0x8015A014;
__osRdb_IP6_Ct = 0x8015A018;
__osRdb_IP6_CurWrite = 0x8015A01C;
__osRdb_IP6_CurSend = 0x8015A020;
leoDiskStack = 0x8015A030;
__rmonUtilityBuffer = 0x8015B030;
__rmonMQ = 0x8015B130;
rmonIOThread = 0x8015B148;
rmonMsgs = 0x8015B2F8;
rmonIOStack = 0x8015B318;
rmonPiMsgs = 0x8015F318;
rmonPiMQ = 0x8015F338;
RCPpc = 0x8015F350;
oldIMEMvalue = 0x8015F354;
DMEMbuffer = 0x8015F358;
__rmonbrk_breakpoints = 0x8015F370;
__rmonbrk_altBreak = 0x8015F3F0; //size:8
__rmonbrk_RCPbreakpoints = 0x8015F3F8;
__rmonRcpAtBreak = 0x8015F478;
__rmonmain_somethingToDo = 0x8015F480;
__rmonmain_inbuffer = 0x8015F488;
__rmonmain_cmdinptr = 0x8015F8E8;
__rmonmain_cmdoutptr = 0x8015F8E9;
__rmonmain_state = 0x8015F8EC;
__rmonmain_inPointer = 0x8015F8F0;

View File

@ -1,11 +1,11 @@
#include "common.h"
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/debug/kdebugserver/func_80029BA0.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/debug/kdebugserver/string_to_u32.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/debug/kdebugserver/func_80029BF8.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/debug/kdebugserver/send_packet.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/debug/kdebugserver/func_80029C6C.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/debug/kdebugserver/clear_IP6.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/debug/kdebugserver/func_80029CD8.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/debug/kdebugserver/send.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/debug/kdebugserver/func_80029DA8.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/debug/kdebugserver/kdebugserver.s")

View File

@ -1,3 +1,3 @@
#include "common.h"
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/host/readhost/func_80029EB0.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/host/readhost/osReadHost.s")

View File

@ -2,4 +2,4 @@
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/io/conteepread/osEepromRead.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/io/conteepread/func_800236A0.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/io/conteepread/__osPackEepReadData.s")

View File

@ -2,6 +2,6 @@
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/io/conteepwrite/osEepromWrite.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/io/conteepwrite/func_80023960.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/io/conteepwrite/__osPackEepWriteData.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/io/conteepwrite/__osEepStatus.s")

View File

@ -0,0 +1,5 @@
#include "common.h"
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/io/contramread/__osContRamRead.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/io/contramread/__osPackRamReadData.s")

View File

@ -2,8 +2,4 @@
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/io/contramwrite/__osContRamWrite.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/io/contramwrite/func_800267C4.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/io/contramwrite/__osContRamRead.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/io/contramwrite/func_80026B5C.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/io/contramwrite/__osPackRamWriteData.s")

View File

@ -1,7 +1,7 @@
#include "common.h"
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/io/contreaddata/func_80020380.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/io/contreaddata/osContStartReadData.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/io/contreaddata/func_80020444.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/io/contreaddata/osContGetReadData.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/io/contreaddata/func_800204EC.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/io/contreaddata/__osPackReadData.s")

View File

@ -1,3 +1,3 @@
#include "common.h"
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/io/leodiskinit/func_80027F90.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/io/leodiskinit/osLeoDiskInit.s")

View File

@ -2,6 +2,6 @@
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/io/leointerrupt/__osLeoInterrupt.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/io/leointerrupt/func_8002A8B4.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/io/leointerrupt/__osLeoAbnormalResume.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/io/leointerrupt/func_8002A99C.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/io/leointerrupt/__osLeoResume.s")

View File

@ -62,7 +62,7 @@ s32 osMotorStart(OSPfs* pfs) {
return ret;
}
void func_80020BF4(s32 channel, u16 address, u8* buffer, OSPifRam* mdata) {
void _MakeMotorData(s32 channel, u16 address, u8* buffer, OSPifRam* mdata) {
u8* ptr = mdata->ramarray;
__OSContRamReadFormat ramreadformat;
s32 i;
@ -128,7 +128,7 @@ s32 osMotorInit(OSMesgQueue* mq, OSPfs* pfs, int channel) {
_motorstopbuf[i] = 0;
}
func_80020BF4(channel, CONT_BLOCK_RUMBLE, _motorstartbuf, &_MotorStartData[channel]);
func_80020BF4(channel, CONT_BLOCK_RUMBLE, _motorstopbuf, &_MotorStopData[channel]);
_MakeMotorData(channel, CONT_BLOCK_RUMBLE, _motorstartbuf, &_MotorStartData[channel]);
_MakeMotorData(channel, CONT_BLOCK_RUMBLE, _motorstopbuf, &_MotorStopData[channel]);
return 0;
}

View File

@ -1,3 +1,3 @@
#include "common.h"
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/io/pfsgetstatus/func_8002AC30.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/io/pfsgetstatus/__osPfsGetStatus.s")

View File

@ -3,7 +3,6 @@
#include "PR/rdb.h"
void ramromMain(void* /*arg*/);
extern OSMesgQueue* D_800C7DF0;
extern char piEventBuf[];
extern OSMesgQueue piEventQueue;
extern OSThread piThread;

View File

@ -1,3 +1,3 @@
#include "common.h"
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/io/sirawread/func_80028BE0.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/io/sirawread/__osSiRawReadIo.s")

View File

@ -1,3 +1,3 @@
#include "common.h"
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/io/sirawwrite/func_80028C30.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/io/sirawwrite/__osSiRawWriteIo.s")

View File

@ -1,3 +1,3 @@
#include "common.h"
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/io/sprawread/func_8002E230.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/io/sprawread/__osSpRawReadIo.s")

View File

@ -1,3 +1,3 @@
#include "common.h"
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/io/sprawwrite/func_8002E1E0.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/io/sprawwrite/__osSpRawWriteIo.s")

View File

@ -1,6 +1,6 @@
#include "common.h"
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/io/sptask/func_80021EA0.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/io/sptask/_VirtualToPhysicalTask.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/io/sptask/osSpTaskLoad.s")

View File

@ -2,4 +2,4 @@
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/io/vimgr/osCreateViManager.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/io/vimgr/func_800225C8.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/io/vimgr/viMgrMain.s")

View File

@ -1,6 +1,6 @@
#include "common.h"
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/libc/xldtob/func_80029080.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/libc/xldtob/_Genld.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/libc/xldtob/D_800C9580.s")

View File

@ -1,3 +1,3 @@
#include "common.h"
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/os/initrdb/func_8002A180.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/os/initrdb/osInitRdb.s")

View File

@ -1,29 +1,29 @@
#include "common.h"
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonbrk/func_8002D300.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonbrk/SetTempBreakpoint.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonbrk/func_8002D3AC.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonbrk/ClearTempBreakpoint.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonbrk/func_8002D494.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonbrk/__rmonSetBreak.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonbrk/func_8002D654.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonbrk/__rmonListBreak.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonbrk/func_8002D660.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonbrk/__rmonClearBreak.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonbrk/func_8002D7BC.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonbrk/__rmonGetBranchTarget.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonbrk/func_8002D9E4.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonbrk/__rmonbrk_IsJump.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonbrk/func_8002DA78.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonbrk/__rmonSetSingleStep.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonbrk/func_8002DB3C.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonbrk/__rmonGetExceptionStatus.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonbrk/func_8002DB7C.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonbrk/rmonSendBreakMessage.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonbrk/func_8002DC38.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonbrk/__rmonHitBreak.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonbrk/func_8002DC68.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonbrk/__rmonHitSpBreak.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonbrk/func_8002DCD0.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonbrk/__rmonHitCpuFault.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonbrk/func_8002DD00.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonbrk/rmonFindFaultedThreads.s")

View File

@ -1,5 +1,5 @@
#include "common.h"
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmoncmds/func_8002B150.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmoncmds/__rmoncmd_NotImplemented.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmoncmds/func_8002B15C.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmoncmds/__rmonExecute.s")

View File

@ -1,9 +1,9 @@
#include "common.h"
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonmain/func_8002DDE0.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonmain/__rmonSendHeader.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonmain/func_8002DE78.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonmain/__rmonSendReply.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonmain/func_8002DF20.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonmain/__rmonSendData.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonmain/func_8002E040.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonmain/rmonMain.s")

View File

@ -1,31 +1,31 @@
#include "global.h"
#include "common.h"
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonmem/func_8002B1F0.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonmem/__rmonWriteWordTo.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonmem/func_8002B238.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonmem/__rmonReadWordAt.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonmem/func_8002B28C.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonmem/__rmonMemcpy.s")
void func_8002B2C0(s32* arg0, s32* arg1, s32 arg2) {
void __rmonCopyWords(s32* arg0, s32* arg1, s32 arg2) {
while (arg2--) {
*arg0++ = *arg1++;
}
}
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonmem/func_8002B2F4.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonmem/__rmonmem_strcopy.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonmem/func_8002B330.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonmem/__rmonReadMem.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonmem/func_8002B52C.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonmem/__rmonWriteMem.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonmem/func_8002B778.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonmem/__rmonListProcesses.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonmem/func_8002B7F8.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonmem/__rmonLoadProgram.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonmem/D_800C9660.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonmem/func_8002B804.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonmem/__rmonGetExeName.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonmem/func_8002B8AC.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonmem/__rmonGetRegionCount.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonmem/func_8002B91C.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonmem/__rmonGetRegions.s")

View File

@ -0,0 +1,20 @@
#include "global.h"
#include "rmonint.h"
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonmisc/__rmonSetFault.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonmisc/__rmonInit.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonmisc/__rmonPanic.s")
int __rmonSetComm(KKHeader* req) {
KKObjectEvent reply;
reply.header.code = req->code;
reply.object = 0;
reply.header.error = TV_ERROR_NO_ERROR;
__rmonSendReply(&reply.header, sizeof(reply), KK_TYPE_REPLY);
return TV_ERROR_NO_ERROR;
}

View File

@ -1,49 +1,43 @@
#include "global.h"
#include "rmonint.h"
s32 func_8002B238(s32);
void func_8002C700(s32, s32);
void func_8002C818(s32);
void func_8002C8C0(s32);
s32 func_8002E340(void);
void func_8002E3A8(void);
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonregs/__rmonregs_LoadStoreSU.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonregs/func_8002C700.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonregs/LoadStoreVU.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonregs/func_8002C784.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonregs/SetUpForRCPop.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonregs/func_8002C818.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonregs/CleanupFromRCPop.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonregs/func_8002C8C0.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonregs/__rmonGetGRegisters.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonregs/func_8002C968.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonregs/__rmonSetGRegisters.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonregs/func_8002CAC4.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonregs/__rmonGetFRegisters.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonregs/func_8002CC14.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonregs/__rmonSetFRegisters.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonregs/func_8002CCCC.s")
s32 func_8002CD80(s32 arg0) {
s32 rmonGetRcpRegister(s32 arg0) {
s32 ret;
if (func_8002E340() != 0) {
if (__rmonRCPrunning() != 0) {
return 0;
} else {
func_8002C818(0);
func_8002C700(0x2B, arg0);
func_8002E3A8();
ret = func_8002B238(0x04000000);
func_8002C8C0(0);
SetUpForRCPop(0);
__rmonregs_LoadStoreSU(0x2B, arg0);
__rmonStepRCP();
ret = __rmonReadWordAt(0x04000000);
CleanupFromRCPop(0);
return ret;
}
}
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonregs/func_8002CDE4.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonregs/__rmonGetSRegs.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonregs/func_8002CF44.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonregs/__rmonSetSRegs.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonregs/func_8002D054.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonregs/__rmonGetVRegs.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonregs/func_8002D16C.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonregs/__rmonSetVRegs.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonregs/func_8002D230.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonregs/__rmonGetRegisterContents.s")

View File

@ -1,9 +1,9 @@
#include "common.h"
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonsio/func_80029F80.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonsio/__rmonSendFault.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonsio/func_80029FF4.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonsio/__rmonIOflush.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonsio/func_8002A044.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonsio/__rmonIOputw.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonsio/func_8002A0B0.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmonsio/__rmonIOhandler.s")

View File

@ -1,47 +1,17 @@
#include "global.h"
#include "common.h"
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmontask/func_8002BB00.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmontask/__rmonMaskIdleThreadInts.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmontask/func_8002BB7C.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmontask/__rmonGetTCB.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmontask/func_8002BBFC.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmontask/__rmonStopUserThreads.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmontask/func_8002BD04.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmontask/__rmonListThreads.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmontask/func_8002BE38.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmontask/__rmonGetThreadStatus.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmontask/func_8002C12C.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmontask/__rmonThreadStatus.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmontask/func_8002C194.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmontask/__rmonStopThread.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmontask/func_8002C2DC.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmontask/func_8002C570.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmontask/func_8002C5BC.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmontask/func_8002C698.s")
typedef struct {
/* 0x00 */ char pad_0[0x4];
/* 0x04 */ u8 unk4;
} Unkstruct_func_8002C6B8_1;
typedef struct {
/* 0x00 */ char pad_0[0x4];
/* 0x04 */ s8 unk4;
/* 0x05 */ char pad_5;
/* 0x06 */ s16 unk6;
/* 0x08 */ char pad_[0x4];
/* 0x12 */ s32 unk12;
} Unkstruct_func_8002C6B8_2;
s32 func_8002C6B8(Unkstruct_func_8002C6B8_1* arg0) {
Unkstruct_func_8002C6B8_2 temp;
temp.unk4 = arg0->unk4;
temp.unk12 = 0;
temp.unk6 = 0;
func_8002DE78(&temp, 16, 1);
return 0;
}
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/rmon/rmontask/__rmonRunThread.s")

View File

@ -1,6 +1,47 @@
#include "global.h"
#pragma GLOBAL_ASM("asm/us/nonmatchings/main/3440/func_80002840.s")
extern OSContPad D_800DD8C0[4];
extern OSContPad D_800DD8D8[4];
extern OSContStatus D_800DD8F0[4];
extern OSPfs D_800DD900[4];
void func_80002840(s32 contrNum) {
s32 temp_v0 = D_800DD880[contrNum].stick_x;
s32 temp_a2 = D_800DD880[contrNum].stick_y;
s32 var_a0;
s32 var_v0;
if ((temp_v0 >= -16) && (temp_v0 <= 16)) {
var_a0 = 0;
} else if (temp_v0 > 16) {
var_a0 = temp_v0 - 16;
} else {
var_a0 = temp_v0 + 16;
}
if ((temp_a2 >= -16) && (temp_a2 <= 16)) {
var_v0 = 0;
} else if (temp_a2 > 16) {
var_v0 = temp_a2 - 16;
} else {
var_v0 = temp_a2 + 16;
}
if (var_a0 > 60) {
var_a0 = 60;
}
if (var_a0 < -60) {
var_a0 = -60;
}
if (var_v0 > 60) {
var_v0 = 60;
}
if (var_v0 < -60) {
var_v0 = -60;
}
D_800DD898[contrNum].stick_x = var_a0;
D_800DD898[contrNum].stick_y = var_v0;
}
void func_8000291C(void) {
u8 sp1F;
@ -13,9 +54,41 @@ void func_8000291C(void) {
}
}
#pragma GLOBAL_ASM("asm/us/nonmatchings/main/3440/func_800029A8.s")
void func_800029A8(void) {
s32 i;
for (i = 0; i < 4; i++) {
if (D_800DD8B0[i] == 1 && D_800DD8C0[i].errno == 0) {
D_800DD8D8[i] = D_800DD880[i];
D_800DD880[i] = D_800DD8C0[i];
D_800DD898[i].button = (D_800DD880[i].button ^ D_800DD8D8[i].button) & D_800DD880[i].button;
func_80002840(i);
} else {
D_800DD880[i].button = D_800DD880[i].stick_x = D_800DD880[i].stick_y = D_800DD880[i].errno =
D_800DD898[i].button = D_800DD898[i].stick_x = D_800DD898[i].stick_y = D_800DD898[i].errno = 0;
}
}
}
#ifdef NON_MATCHING // requires data import on D_800DD8C0
void func_80002AF4(void) {
s32 i;
if (D_800DD8B4 != 0) {
D_800DD8B4--;
for (i = 0; i < 4; i++) {
D_800DD8C0[i].button = D_800DD8C0[i].stick_x = D_800DD8C0[i].stick_y = D_800DD8C0[i].errno = 0;
}
} else {
osContStartReadData(&D_800E2128);
osRecvMesg(&D_800E2128, NULL, 1);
osContGetReadData(D_800DD8C0);
}
osSendMesg(&D_800E22F8, 16, 0);
}
#else
#pragma GLOBAL_ASM("asm/us/nonmatchings/main/3440/func_80002AF4.s")
#endif
void func_80002BE8(void) {
if ((D_80137E80 == 0) && (func_800072E0(&D_80144F60) == 0)) {
@ -33,4 +106,40 @@ void func_80002C50(void) {
osSendMesg(&D_800E2318, 14, 0);
}
#pragma GLOBAL_ASM("asm/us/nonmatchings/main/3440/func_80002CB8.s")
void func_80002CB8(void) {
s32 i;
osContStartQuery(&D_800E2128);
osRecvMesg(&D_800E2128, NULL, 1);
osContGetQuery(D_800DD8F0);
for (i = 0; i < 4; i++) {
if ((D_800DD8B0[i] != 0) && (D_800DD8F0[i].errno == 0)) {
if (D_800DD8F0[i].status & 1) {
if (D_800DD8B8[i] == 0) {
if (osMotorInit(&D_800E2128, &D_800DD900[i], i)) {
D_800DD8B8[i] = 0;
} else {
D_800DD8B8[i] = 1;
}
}
if (D_800DD8B8[i] == 1) {
if (D_80137E84[i] != 0) {
if (osMotorStart(&D_800DD900[i])) {
D_800DD8B8[i] = 0;
}
} else {
if (osMotorStop(&D_800DD900[i])) {
D_800DD8B8[i] = 0;
}
}
}
} else {
D_800DD8B8[i] = 0;
}
}
}
for (i = 0; i < 4; i++) {
D_80137E84[i] = 0;
}
}

View File

@ -94,6 +94,7 @@
- [0x26CD0, c, ../libultra/io/pfsisplug]
- [0x27040, c, ../libultra/io/crc]
- [0x271C0, c, ../libultra/io/contramwrite]
- [0x27540, c, ../libultra/io/contramread]
- [0x278D0, c, ../libultra/gu/mtxutil]
- [0x27B40, c, ../libultra/os/jammesg]
- [0x27C90, c, ../libultra/io/pigetcmdq]
@ -148,6 +149,7 @@
- [0x2BD50, c, ../libultra/rmon/rmoncmds]
- [0x2BDF0, c, ../libultra/rmon/rmonmem]
- [0x2C700, c, ../libultra/rmon/rmontask]
- [0x2D170, c, ../libultra/rmon/rmonmisc]
- [0x2D300, c, ../libultra/rmon/rmonregs]
- [0x2DF00, c, ../libultra/rmon/rmonbrk]
- [0x2E9E0, c, ../libultra/rmon/rmonmain]
@ -191,7 +193,25 @@
- [0xC51D0, data, nlib]
# DATA - Libultra
- [0xC88C0, data, ../libultra/libultra]
- [0xC88C0, data, ../libultra/io/controller]
- [0xC88D0, data, ../libultra/io/vimgr]
- [0xC89E0, data, ../libultra/io/pimgr]
- [0xC8A10, data, ../libultra/os/initialize]
- [0xC8A30, data, ../libultra/libc/xprintf]
- [0xC8A80, data, ../libultra/io/aisetnextbuf]
- [0xC8A90, data, ../libultra/io/siacs]
- [0xC8AA0, data, ../libultra/os/thread]
- [0xC8AC0, data, ../libultra/os/exceptasm]
- [0xC8AE0, data, ../libultra/io/vi]
- [0xC8B50, data, ../libultra/os/timerintr]
- [0xC8B60, data, ../libultra/io/piacs]
- [0xC8B70, data, ../libultra/os/rdbsend]
- [0xC8B80, data, ../libultra/libc/xlitob]
- [0xC8BB0, data, ../libultra/debug/kdebugserver]
- [0xC8BC0, data, ../libultra/host/readhost]
- [0xC8BD0, data, ../libultra/rmon/rmoncmds]
- [0xC8CB0, data, ../libultra/rmon/rmonmain]
# RODATA - Nintendo Libraries
- [0xC8CC0, .rodata, 5A20]
@ -250,4 +270,35 @@
# Common assets
- [0xDA030, bin, assets]
- { start: 0xDE480, type: bss, vram: 0x800DD880 }
# Nintendo Library bss
- { start: 0xDE480, type: bss, vram: 0x800DD880, name: nlib }
# Libultra bss
- { start: 0xDE480, type: bss, vram: 0x80156620, name: ../libultra/io/controller }
- { start: 0xDE480, type: bss, vram: 0x801566B0, name: ../libultra/io/motor }
- { start: 0xDE480, type: bss, vram: 0x801568F0, name: ../libultra/os/seteventmesg }
- { start: 0xDE480, type: bss, vram: 0x801569B0, name: ../libultra/io/sptask }
- { start: 0xDE480, type: bss, vram: 0x801569F0, name: ../libultra/io/vimgr }
- { start: 0xDE480, type: bss, vram: 0x80157C10, name: ../libultra/io/pimgr }
- { start: 0xDE480, type: bss, vram: 0x801593D0, name: ../libultra/os/initialize }
- { start: 0xDE480, type: bss, vram: 0x801593E0, name: ../libultra/io/conteepread }
- { start: 0xDE480, type: bss, vram: 0x80159420, name: ../libultra/io/cartrominit }
- { start: 0xDE480, type: bss, vram: 0x801594A0, name: ../libultra/io/siacs }
- { start: 0xDE480, type: bss, vram: 0x801594C0, name: ../libultra/io/pfsisplug }
- { start: 0xDE480, type: bss, vram: 0x80159500, name: ../libultra/os/timerintr }
- { start: 0xDE480, type: bss, vram: 0x80159560, name: ../libultra/io/leodiskinit }
- { start: 0xDE480, type: bss, vram: 0x801595E0, name: ../libultra/io/piacs }
- { start: 0xDE480, type: bss, vram: 0x80159600, name: ../libultra/debug/kdebugserver }
- { start: 0xDE480, type: bss, vram: 0x801597C0, name: ../libultra/host/readhost }
- { start: 0xDE480, type: bss, vram: 0x801597F0, name: ../libultra/rmon/rmonsio }
- { start: 0xDE480, type: bss, vram: 0x8015A010, name: ../libultra/os/initrdb }
- { start: 0xDE480, type: bss, vram: 0x8015A030, name: ../libultra/io/leointerrupt }
- { start: 0xDE480, type: bss, vram: 0x8015B030, name: ../libultra/rmon/rmonmem }
- { start: 0xDE480, type: bss, vram: 0x8015B130, name: ../libultra/rmon/rmonmisc }
- { start: 0xDE480, type: bss, vram: 0x8015F350, name: ../libultra/rmon/rmonregs }
- { start: 0xDE480, type: bss, vram: 0x8015F370, name: ../libultra/rmon/rmonbrk }
- { start: 0xDE480, type: bss, vram: 0x8015F480, name: ../libultra/rmon/rmonmain }
# Game engine bss
- { start: 0xDE480, type: bss, vram: 0x8015F900, name: engine }