Dump current status

This commit is contained in:
rozlette
2018-10-25 21:29:41 -05:00
parent d3a5a2f29d
commit cc9baa93a8
75 changed files with 60092 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
#ifndef _ULTRATYPES_H_
#define _ULTRATYPES_H_
typedef unsigned char u8;
typedef unsigned short u16;
typedef unsigned long u32;
typedef unsigned long long u64;
typedef signed char s8;
typedef short s16;
typedef long s32;
typedef long long s64;
typedef volatile unsigned char vu8;
typedef volatile unsigned short vu16;
typedef volatile unsigned long vu32;
typedef volatile unsigned long long vu64;
typedef volatile signed char vs8;
typedef volatile short vs16;
typedef volatile long vs32;
typedef volatile long long vs64;
typedef float f32;
typedef double f64;
#define NULL ((void*)0)
#endif
+4
View File
@@ -0,0 +1,4 @@
#ifndef _ASSERT_H_
#define _ASSERT_H_
#endif
+4
View File
@@ -0,0 +1,4 @@
#ifndef _BSTRING_H_
#define _BSTRING_H_
#endif
+19489
View File
File diff suppressed because it is too large Load Diff
+8
View File
@@ -0,0 +1,8 @@
#ifndef _GLOBAL_H_
#define _GLOBAL_H_
#include "structs.h"
#include "functions.h"
#include "variables.h"
#endif
+227
View File
@@ -0,0 +1,227 @@
#ifndef _OS_H_
#define _OS_H_
#include <PR/ultratypes.h>
typedef s32 OSPri;
typedef s32 OSId;
typedef union {
/* 0 */ struct {
/* 0 */ f32 f_odd;
/* 4 */ f32 f_even;
} f;
/* 0 */ f64 d;
} __OSfp;
typedef struct {
/* 0 */ u64 at;
/* 8 */ u64 v0;
/* 16 */ u64 v1;
/* 24 */ u64 a0;
/* 32 */ u64 a1;
/* 40 */ u64 a2;
/* 48 */ u64 a3;
/* 56 */ u64 t0;
/* 64 */ u64 t1;
/* 72 */ u64 t2;
/* 80 */ u64 t3;
/* 88 */ u64 t4;
/* 96 */ u64 t5;
/* 104 */ u64 t6;
/* 112 */ u64 t7;
/* 120 */ u64 s0;
/* 128 */ u64 s1;
/* 136 */ u64 s2;
/* 144 */ u64 s3;
/* 152 */ u64 s4;
/* 160 */ u64 s5;
/* 168 */ u64 s6;
/* 176 */ u64 s7;
/* 184 */ u64 t8;
/* 192 */ u64 t9;
/* 200 */ u64 gp;
/* 208 */ u64 sp;
/* 216 */ u64 s8;
/* 224 */ u64 ra;
/* 232 */ u64 lo;
/* 240 */ u64 hi;
/* 248 */ u32 sr;
/* 252 */ u32 pc;
/* 256 */ u32 cause;
/* 260 */ u32 badvaddr;
/* 264 */ u32 rcp;
/* 268 */ u32 fpcsr;
/* 272 */ __OSfp fp0;
/* 280 */ __OSfp fp2;
/* 288 */ __OSfp fp4;
/* 296 */ __OSfp fp6;
/* 304 */ __OSfp fp8;
/* 312 */ __OSfp fp10;
/* 320 */ __OSfp fp12;
/* 328 */ __OSfp fp14;
/* 336 */ __OSfp fp16;
/* 344 */ __OSfp fp18;
/* 352 */ __OSfp fp20;
/* 360 */ __OSfp fp22;
/* 368 */ __OSfp fp24;
/* 376 */ __OSfp fp26;
/* 384 */ __OSfp fp28;
/* 392 */ __OSfp fp30;
} __OSThreadContext;
typedef struct OSThread_s {
/* 0 */ struct OSThread_s* next;
/* 4 */ OSPri priority;
/* 8 */ struct OSThread_s** queue;
/* 12 */ struct OSThread_s* tlnext;
/* 16 */ u16 state;
/* 18 */ u16 flags;
/* 20 */ OSId id;
/* 24 */ int fp;
/* 32 */ __OSThreadContext context;
} OSThread;
typedef u32 OSEvent;
typedef u32 OSIntMask;
typedef u32 OSPageMask;
typedef void* OSMesg;
typedef struct {
/* 0 */ OSThread* mtqueue;
/* 4 */ OSThread* fullqueue;
/* 8 */ s32 validCount;
/* 12 */ s32 first;
/* 16 */ s32 msgCount;
/* 20 */ OSMesg* msg;
} OSMesgQueue;
typedef struct {
/* 0 */ u16 type;
/* 2 */ u8 pri;
/* 3 */ u8 status;
/* 4 */ OSMesgQueue* retQueue;
} OSIoMesgHdr;
typedef struct {
/* 0 */ OSIoMesgHdr hdr;
/* 8 */ void* dramAddr;
/* 12 */ u32 devAddr;
/* 16 */ u32 size;
} OSIoMesg;
typedef struct {
/* 0 */ s32 active;
/* 4 */ OSThread* thread;
/* 8 */ OSMesgQueue* cmdQueue;
/* 12 */ OSMesgQueue* evtQueue;
/* 16 */ OSMesgQueue* acsQueue;
/* 20 */ s32 (*dma)(... /* ECOFF does not store param types */);
} OSDevMgr;
typedef struct {
/* 0 */ u32 ctrl;
/* 4 */ u32 width;
/* 8 */ u32 burst;
/* 12 */ u32 vSync;
/* 16 */ u32 hSync;
/* 20 */ u32 leap;
/* 24 */ u32 hStart;
/* 28 */ u32 xScale;
/* 32 */ u32 vCurrent;
} OSViCommonRegs;
typedef struct {
/* 0 */ u32 origin;
/* 4 */ u32 yScale;
/* 8 */ u32 vStart;
/* 12 */ u32 vBurst;
/* 16 */ u32 vIntr;
} OSViFieldRegs;
typedef struct {
/* 0 */ u8 type;
/* 4 */ OSViCommonRegs comRegs;
/* 40 */ OSViFieldRegs fldRegs[2];
} OSViMode;
typedef u64 OSTime;
typedef struct OSTimer_s {
/* 0 */ struct OSTimer_s* next;
/* 4 */ struct OSTimer_s* prev;
/* 8 */ OSTime interval;
/* 16 */ OSTime value;
/* 24 */ OSMesgQueue* mq;
/* 28 */ OSMesg msg;
} OSTimer;
typedef struct {
/* 0 */ u16 type;
/* 2 */ u8 status;
/* 3 */ u8 errno;
} OSContStatus;
typedef struct {
/* 0 */ u16 button;
/* 2 */ s8 stick_x;
/* 3 */ s8 stick_y;
/* 4 */ u8 errno;
} OSContPad;
typedef struct {
/* 0 */ void* address;
/* 4 */ u8 databuffer[32];
/* 36 */ u8 addressCrc;
/* 37 */ u8 dataCrc;
/* 38 */ u8 errno;
} OSContRamIo;
typedef struct {
/* 0 */ int status;
/* 4 */ OSMesgQueue* queue;
/* 8 */ int channel;
/* 12 */ u8 id[32];
/* 44 */ u8 backup_id[32];
/* 76 */ u8 label[32];
/* 108 */ int pack_size;
/* 112 */ int version;
/* 116 */ int dir_size;
/* 120 */ int inode_start_page;
} OSPfs;
typedef struct {
/* 0 */ u32 file_size;
/* 4 */ u16 company_code;
/* 6 */ u16 game_code;
/* 8 */ unsigned char ext_name[4];
/* 12 */ unsigned char game_name[16];
} OSPfsState;
typedef struct {
/* 0 */ u16* histo_base;
/* 4 */ u32 histo_size;
/* 8 */ u32* text_start;
/* 12 */ u32* text_end;
} OSProf;
#endif
+4
View File
@@ -0,0 +1,4 @@
#ifndef _OS_INTERNAL_H_
#define _OS_INTERNAL_H_
#endif
+28
View File
@@ -0,0 +1,28 @@
#ifndef _OSINT_H_
#define _OSINT_H_
// TODO should be in libultra/os
#include <stdarg.h>
#include <os.h>
#include <os_internal.h>
#include <ultraerror.h>
#include <ultralog.h>
#include <sptask.h>
typedef struct {
/* 0 */ OSMesgQueue* messageQueue;
/* 4 */ OSMesg message;
} __OSEventState;
typedef struct {
/* 0 */ OSThread* next;
/* 4 */ OSPri priority;
} __OSThreadTail;
#include <variables.h> // TODO all variables should be moved to the file that logically defines them
// maybe put externs here?
#include <functions.h>
#endif
+4
View File
@@ -0,0 +1,4 @@
#ifndef _RMON_H_
#define _RMON_H_
#endif
+33
View File
@@ -0,0 +1,33 @@
#ifndef _SPTASK_H_
#define _SPTASK_H_
#include <PR/ultratypes.h>
typedef struct {
/* 0 */ u32 type;
/* 4 */ u32 flags;
/* 8 */ u64* ucode_boot;
/* 12 */ u32 ucode_boot_size;
/* 16 */ u64* ucode;
/* 20 */ u32 ucode_size;
/* 24 */ u64* ucode_data;
/* 28 */ u32 ucode_data_size;
/* 32 */ u64* dram_stack;
/* 36 */ u32 dram_stack_size;
/* 40 */ u64* output_buff;
/* 44 */ u64* output_buff_size;
/* 48 */ u64* data_ptr;
/* 52 */ u32 data_size;
/* 56 */ u64* yield_data_ptr;
/* 60 */ u32 yield_data_size;
} OSTask_t;
typedef union {
/* 0 */ OSTask_t t;
/* 0 */ long long force_structure_alignment;
} OSTask;
typedef u32 OSYieldResult;
#endif
+6
View File
@@ -0,0 +1,6 @@
#ifndef _STDARG_H_
#define _STDARG_H_
typedef unsigned char* va_list;
#endif
+7
View File
@@ -0,0 +1,7 @@
#ifndef _STRING_H_
#define _STRING_H_
#define NULL 0
typedef unsigned int size_t;
#endif
+142
View File
@@ -0,0 +1,142 @@
#ifndef _STRUCTS_H_
#define _STRUCTS_H_
#include <PR/ultratypes.h>
#include <unk.h>
struct s80085320 {
/* 00 */ struct s80085320* next;
/* 04 */ struct s80085320* prev;
/* 08 */ UNK_TYPE* unk8;
/* 12 */ UNK_TYPE* unk12;
/* 16 */ UNK_TYPE unk16;
/* 20 */ UNK_TYPE unk20;
/* 24 */ UNK_TYPE* unk24;
};
struct s8008A6FC {
/* 00 */ UNK_TYPE unk0;
/* 04 */ UNK_TYPE unk4;
/* 08 */ UNK_TYPE unk8;
/* 12 */ UNK_TYPE unk12;
};
struct s80092920 {
/* 00 */ struct s80092920* unk0;
/* 04 */ u8 unk4;
/* 05 */ u8 unk5;
/* 06 */ u8 unk6;
/* 07 */ u8 unk7;
/* 08 */ u8 unk8;
/* 09 */ u8 unk9;
/* 10 */ u8 unk10; // pad?
/* 11 */ u8 unk11; // pad?
/* 12 */ UNK_TYPE unk12;
/* 16 */ UNK_TYPE unk16;
};
struct s800A5AC0 {
/* 000 */ u8 pad0[28];
/* 028 */ u16 unk28;
/* 030 */ u8 pad1[116];
/* 146 */ u16 unk146;
/* 148 */ u8 pad2[34];
/* 182 */ u8 unk182;
/* 183 */ u8 pad4[5];
/* 188 */ u16 unk188; // or char
/* 190 */ u16 unk190;
/* 192 */ u8 pad5[86];
/* 278 */ u16 unk278;
/* 280 */ u8 pad6[44];
/* 324 */ void(*unk324)(struct s800A5AC0*, UNK_TYPE);
/* 328 */ UNK_TYPE unk328;
};
typedef struct s800BF9A0_s {
/* 000 */ u8 pad0[8];
/* 008 */ UNK_TYPE unk8;
/* 012 */ UNK_TYPE unk12;
/* 016 */ UNK_TYPE unk16;
/* 020 */ u8 pad1[10];
/* 030 */ s8 unk30;
/* 031 */ u8 pad2[1];
} s800BF9A0_s;
typedef struct s800CAAD0_s {
/* 000 */ UNK_TYPE unk0;
/* 004 */ UNK_TYPE unk4;
/* 008 */ UNK_TYPE unk8;
/* 012 */ u8 pad0[92];
/* 104 */ UNK_TYPE unk104;
/* 108 */ UNK_TYPE unk108;
/* 112 */ UNK_TYPE unk112;
/* 116 */ u16 unk116;
/* 118 */ u16 unk118;
/* 120 */ u16 unk120;
/* 122 */ u8 pad1[2];
/* 124 */ f32 unk124;
/* 128 */ f32 unk128;
/* 132 */ f32 unk132;
/* 136 */ UNK_TYPE unk136;
/* 140 */ UNK_TYPE unk140;
/* 144 */ UNK_TYPE unk144;
/* 148 */ u16 unk148;
/* 150 */ u16 unk150;
/* 152 */ u16 unk152;
/* 154 */ u8 pad2[2];
/* 156 */ f32 unk156;
/* 160 */ f32 unk160;
/* 164 */ f32 unk164;
} s800CAAD0;
// TODO everything past here should be placed in an appropiate libultra header
typedef long Mtx_t[4][4];
typedef union {
/* 0 */ Mtx_t m;
/* 0 */ long long force_structure_alignment;
} Mtx;
typedef struct {
/* 0 */ int quot;
/* 4 */ int rem;
} div_t;
typedef struct {
/* 0 */ long quot;
/* 4 */ long rem;
} ldiv_t;
typedef struct {
/* 0 */ long long quot;
/* 8 */ long long rem;
} lldiv_t;
typedef unsigned int size_t;
typedef double ldouble;
typedef struct {
/* 0 */ union {
/* 0 */ long long ll;
/* 0 */ ldouble ld;
} v;
/* 8 */ unsigned char* s;
/* 12 */ int n0;
/* 16 */ int nz0;
/* 20 */ int n1;
/* 24 */ int nz1;
/* 28 */ int n2;
/* 32 */ int nz2;
/* 36 */ int prec;
/* 40 */ int width;
/* 44 */ size_t nchar;
/* 48 */ unsigned int flags;
/* 52 */ unsigned char qual;
} _Pft;
#endif
+7
View File
@@ -0,0 +1,7 @@
#ifndef _ULTRA64_H_
#define _ULTRA64_H_
#include <PR/ultratypes.h>
#include "unk.h"
#endif
+6
View File
@@ -0,0 +1,6 @@
#ifndef _ULTRAERROR_H_
#define _ULTRAERROR_H_
typedef void (*OSErrorHandler)(... /* ECOFF does not store param types */);
#endif
+28
View File
@@ -0,0 +1,28 @@
#ifndef _ULTRALOG_H_
#define _ULTRALOG_H_
#include <PR/ultratypes.h>
typedef struct {
/* 0 */ u32 magic;
/* 4 */ u32 len;
/* 8 */ u32* base;
/* 12 */ s32 startCount;
/* 16 */ s32 writeOffset;
} OSLog;
typedef struct {
/* 0 */ u32 magic;
/* 4 */ u32 timeStamp;
/* 8 */ u16 argCount;
/* 10 */ u16 eventID;
} OSLogItem;
typedef struct {
/* 0 */ u32 magic;
/* 4 */ u32 version;
} OSLogFileHdr;
#endif
+13
View File
@@ -0,0 +1,13 @@
#ifndef _UNK_H_
#define _UNK_H_
#include <PR/ultratypes.h>
#define UNK_TYPE s32
#define UNK_PTR void*
#define UNK_RET void
#define UNK_FUN_ARG void(*)(void)
#define UNK_FUN_PTR(name) void(*name)(void)
#define UNK_ARGS void
#endif
+14303
View File
File diff suppressed because it is too large Load Diff
+28
View File
@@ -0,0 +1,28 @@
#ifndef _VIINT_H_
#define _VIINT_H_
// TODO should be in libultra/io
#include <PR/ultratypes.h>
#include <os.h>
typedef struct {
/* 0 */ f32 factor;
/* 4 */ u16 offset;
/* 8 */ u32 scale;
} __OSViScale;
typedef struct {
/* 0 */ u16 state;
/* 2 */ u16 retraceCount;
/* 4 */ void* framep;
/* 8 */ OSViMode* modep;
/* 12 */ u32 control;
/* 16 */ OSMesgQueue* msgq;
/* 20 */ OSMesg msg;
/* 24 */ __OSViScale x;
/* 36 */ __OSViScale y;
} __OSViContext;
#endif