Merge branch 'DavidSM64:master' into glabels

This commit is contained in:
AntonioCastelli
2021-05-27 18:11:07 -07:00
43 changed files with 14267 additions and 9685 deletions
File diff suppressed because one or more lines are too long
+8929 -9295
View File
File diff suppressed because one or more lines are too long
+2 -1
View File
@@ -20,10 +20,11 @@ typedef struct MenuElement {
/* 0x10 */ u8 opacity;
/* 0x11 */ u8 textType;
/* 0x12 */ u8 textAlignFlags;
/* 0x13 */ u8 unk13; // Source type? 0 = ascii text, 7 = texture?
/* 0x13 */ u8 unk13; // Source type? 0 = ascii text, 2 = number, 7 = texture
union {
/* 0x14 */ char* asciiText; // Pointer to ascii text to be displayed on the screen.
/* 0x14 */ u32* texture; // Pointer to texture to be displayed on the screen.
/* 0x14 */ s32* number; // Pointer to a number to be displayed on the screen.
} source;
/* 0x18 */ u16 backgroundRed;
/* 0x1A */ u16 backgroundGreen;
+2 -1
View File
@@ -4,7 +4,8 @@
#include "macros.h"
#include "libultra_internal.h"
extern OSTimer *D_800E4910;
OSTimer *D_800E4910 = (OSTimer *)0x8012D200;
extern OSTime __osCurrentTime;
extern u32 __osBaseCounter;
extern u32 D_8012D22C;
+1 -2
View File
@@ -5,15 +5,14 @@
#include "macros.h"
#include "libultra_internal.h"
#define OS_VIM_STACKSIZE 4096
extern OSTime __osCurrentTime;
extern u32 __osBaseCounter;
extern u32 D_8012D22C; //__osViIntrCount
OSDevMgr __osViDevMgr = {0};
extern OSDevMgr __osViDevMgr;
extern u8 viThreadStack[OS_VIM_STACKSIZE];
extern OSThread viThread;
extern OSMesgQueue viEventQueue;
+2
View File
@@ -5,6 +5,8 @@
#include "types.h"
#include "macros.h"
ALGlobals *alGlobals = NULL;
GLOBAL_ASM("lib/asm/non_matchings/unknown_0C91A0/alCSPPlay.s")
GLOBAL_ASM("lib/asm/non_matchings/unknown_0C91A0/alCSPStop.s")
GLOBAL_ASM("lib/asm/non_matchings/unknown_0C91A0/func_800C8600.s")
+2
View File
@@ -4,4 +4,6 @@
#include "types.h"
#include "macros.h"
u8 D_800E3790 = 0;
GLOBAL_ASM("lib/asm/non_matchings/unknown_0C9970/func_800C8D70.s")
+27
View File
@@ -4,4 +4,31 @@
#include "types.h"
#include "macros.h"
// This probably does not belong here. Please move it to the appropriate place!
#define EQPOWER_LENGTH 128
static s16 eqpower[ EQPOWER_LENGTH ] = {
32767, 32764, 32757, 32744, 32727, 32704,
32677, 32644, 32607, 32564, 32517, 32464,
32407, 32344, 32277, 32205, 32127, 32045,
31958, 31866, 31770, 31668, 31561, 31450,
31334, 31213, 31087, 30957, 30822, 30682,
30537, 30388, 30234, 30075, 29912, 29744,
29572, 29395, 29214, 29028, 28838, 28643,
28444, 28241, 28033, 27821, 27605, 27385,
27160, 26931, 26698, 26461, 26220, 25975,
25726, 25473, 25216, 24956, 24691, 24423,
24151, 23875, 23596, 23313, 23026, 22736,
22442, 22145, 21845, 21541, 21234, 20924,
20610, 20294, 19974, 19651, 19325, 18997,
18665, 18331, 17993, 17653, 17310, 16965,
16617, 16266, 15913, 15558, 15200, 14840,
14477, 14113, 13746, 13377, 13006, 12633,
12258, 11881, 11503, 11122, 10740, 10357,
9971, 9584, 9196, 8806, 8415, 8023,
7630, 7235, 6839, 6442, 6044, 5646,
5246, 4845, 4444, 4042, 3640, 3237,
2833, 2429, 2025, 1620, 1216, 810,
405, 0
};
GLOBAL_ASM("lib/asm/non_matchings/unknown_0C9A20/func_800C8E20.s")
+7
View File
@@ -8,6 +8,13 @@ GLOBAL_ASM("lib/asm/non_matchings/unknown_0CCF90/alMainBusParam.s")
GLOBAL_ASM("lib/asm/non_matchings/unknown_0CCF90/alMainBusPull.s")
GLOBAL_ASM("lib/asm/non_matchings/unknown_0CCF90/alSaveParam.s")
GLOBAL_ASM("lib/asm/non_matchings/unknown_0CCF90/alSavePull.s")
s32 D_800E38A0 = 0; // Not sure what this is.
s32 D_800E38A4 = 62500000; // OSTime osClockRate = OS_CLOCK_RATE;
u32 D_800E38A8 = 0; // u32 __osShutdown = 0;
u32 D_800E38AC = 0x3FFF01; // u32 __OSGlobalIntMask = OS_IM_ALL;
s32 D_800E38B0 = 0; // Not sure what this is.
GLOBAL_ASM("lib/asm/non_matchings/unknown_0CCF90/osInitialize.s")
GLOBAL_ASM("lib/asm/non_matchings/unknown_0CCF90/osSetThreadPri.s")
GLOBAL_ASM("lib/asm/non_matchings/unknown_0CCF90/guPerspectiveF.s")
+2
View File
@@ -4,6 +4,8 @@
#include "types.h"
#include "macros.h"
s32 D_800E38C0 = 0;
GLOBAL_ASM("lib/asm/non_matchings/unknown_0CD820/func_800CCC20.s")
GLOBAL_ASM("lib/asm/non_matchings/unknown_0CD820/func_800CCE18.s")
GLOBAL_ASM("lib/asm/non_matchings/unknown_0CD820/func_800CCEE8.s")
+2
View File
@@ -4,6 +4,8 @@
#include "types.h"
#include "macros.h"
s32 D_800E38D0 = 0;
GLOBAL_ASM("lib/asm/non_matchings/unknown_0CE200/__osSiCreateAccessQueue.s")
GLOBAL_ASM("lib/asm/non_matchings/unknown_0CE200/__osSiGetAccess.s")
GLOBAL_ASM("lib/asm/non_matchings/unknown_0CE200/__osSiRelAccess.s")
+7 -2
View File
@@ -25,8 +25,13 @@ typedef struct
/* 0x24 */ __OSViScale y;
} __OSViContext;
extern __OSViContext *__osViCurr;
extern __OSViContext *__osViNext;
static __OSViContext vi[2] = {0};
__OSViContext *__osViCurr = &vi[0];
__OSViContext *__osViNext = &vi[1];
#define VI_NTSC_CLOCK 48681812
s32 osViClock = VI_NTSC_CLOCK;
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D29F0/func_800D1DF0.s")
+5 -1
View File
@@ -30,4 +30,8 @@ void __osPiGetAccess(void)
void __osPiRelAccess(void)
{
osSendMesg(&piAccessQueue, NULL, OS_MESG_NOBLOCK);
}
}
// Used with _Litob.s. Please move this later!
char D_800E4920[20] = "0123456789abcdef"; // lowercase hex digits
char D_800E4934[20] = "0123456789ABCDEF"; // uppercase hex digits
+8
View File
@@ -4,6 +4,14 @@
#include "types.h"
#include "macros.h"
// Unused? Probably unrelated to this file, but not sure what it could be.
s32 D_800E48A0[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D43F0/alCopy.s")
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D43F0/_Putfld.s")
// Both of these are used in _Printf
char D_800E48C0[36] = " ";
char D_800E48E4[32] = "00000000000000000000000000000000";
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D43F0/_Printf.s")
+12 -2
View File
@@ -5,8 +5,18 @@
#include "libultra_internal.h"
#include "viint.h"
extern OSThread* __osRunningThread;
extern OSThread* __RunQueue;
struct __osThreadTail
{
OSThread *next;
OSPri priority;
} __osThreadTail;
struct __osThreadTail __osThreadTail = {0, -1};
OSThread *__osActiveQueue = &__osThreadTail.next;
OSThread *__RunQueue = &__osThreadTail.next;
extern OSThread *__osRunningThread = NULL;
extern OSThread *D_800E4894 = NULL; // __osFaultedThread
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/__osViSwapContext.s")
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/func_800D63F0.s")
+70
View File
@@ -0,0 +1,70 @@
#ifndef _VIINT_H
#define _VIINT_H
#include "libultra_internal.h"
#define OS_TV_TYPE_PAL 0
#define OS_TV_TYPE_NTSC 1
#define OS_TV_TYPE_MPAL 2
//TODO: figure out what this is
#define VI_STATE_01 0x01
#define VI_STATE_XSCALE_UPDATED 0x02
#define VI_STATE_YSCALE_UPDATED 0x04
#define VI_STATE_08 0x08 //related to control regs changing
#define VI_STATE_10 0x10 //swap buffer
#define VI_STATE_BLACK 0x20 //probably related to a black screen
#define VI_STATE_REPEATLINE 0x40 //repeat line?
#define VI_STATE_FADE 0x80 //fade
#define VI_CTRL_ANTIALIAS_MODE_3 0x00300 /* Bit [9:8] anti-alias mode */
#define VI_CTRL_ANTIALIAS_MODE_2 0x00200 /* Bit [9:8] anti-alias mode */
#define VI_CTRL_ANTIALIAS_MODE_1 0x00100 /* Bit [9:8] anti-alias mode */
#define VI_SCALE_MASK 0xfff //see rcp scale_x/scale_y
#define VI_2_10_FPART_MASK 0x3ff
#define VI_SUBPIXEL_SH 0x10
#define BURST(hsync_width, color_width, vsync_width, color_start) \
(hsync_width | (color_width << 8) | (vsync_width << 16) | (color_start << 20))
#define WIDTH(v) v
#define VSYNC(v) v
#define HSYNC(duration, leap) (duration | (leap << 16))
#define LEAP(upper, lower) ((upper << 16) | lower)
#define START(start, end) ((start << 16) | end)
#define FTOFIX(val, i, f) ((u32)(val * (f32)(1 << f)) & ((1 << (i + f)) - 1))
#define F210(val) FTOFIX(val, 2, 10)
#define SCALE(scaleup, off) (F210((1.0f / (f32)scaleup)) | (F210((f32)off) << 16))
#define VCURRENT(v) v //seemingly unused
#define ORIGIN(v) v
#define VINTR(v) v
#define HSTART START
typedef struct
{
/* 0x0 */ f32 factor;
/* 0x4 */ u16 offset;
/* 0x8 */ u32 scale;
} __OSViScale;
typedef struct
{
/* 0x0 */ u16 state;
/* 0x2 */ u16 retraceCount;
/* 0x4 */ void *framep;
/* 0x8 */ OSViMode *modep;
/* 0xC */ u32 control;
/* 0x10 */ OSMesgQueue *msgq;
/* 0x14 */ OSMesg msg;
/* 0x18 */ __OSViScale x;
/* 0x24 */ __OSViScale y;
} __OSViContext;
void __osViSwapContext(void);
extern __OSViContext *__osViCurr;
extern __OSViContext *__osViNext;
__OSViContext *__osViGetCurrentContext(void);
void __osViInit(void);
#endif
+1602
View File
File diff suppressed because it is too large Load Diff
+28 -17
View File
@@ -14,27 +14,38 @@ typedef struct unk80115D48 {
/* 0x04 */ s32 unk4;
} unk80115D48;
extern ALCSPlayer* gMusicPlayer;
extern ALCSPlayer* gSndFxPlayer;
/************ .data ************/
extern u8 musicRelativeVolume;
extern u8 sfxRelativeVolume;
extern u8 D_800DC640;
extern u8 D_800DC644;
extern s32 D_800DC648;
extern s32 audioPrevCount;
extern f32 D_800DC650;
extern s32 musicVolumeSliderPercentage;
extern s32 D_800DC658;
extern u8 D_800DC65C;
extern u8 D_800DC660;
extern s32 D_800DC66C;
extern u8 D_800DC670;
ALCSPlayer* gMusicPlayer = NULL;
ALCSPlayer* gSndFxPlayer = NULL;
u8 musicRelativeVolume = 0x7F;
u8 sfxRelativeVolume = 0x7F;
u8 D_800DC640 = 1;
u8 D_800DC644 = 0;
s32 D_800DC648 = 0;
s32 audioPrevCount = 0;
f32 D_800DC650 = 1.0;
s32 musicVolumeSliderPercentage = 0x100;
s32 D_800DC658 = 0;
u8 D_800DC65C = 0;
u8 D_800DC660 = 0;
s32 D_800DC664 = 0; // Currently unknown, might be a different type.
s32 D_800DC668 = 0; // Currently unknown, might be a different type.
s32 D_800DC66C = 0x100;
u8 D_800DC670 = 0;
/*******************************/
/************ .rodata ************/
extern f32 D_800E49DC;
extern f32 D_800E49EC;
extern u8 D_800EBF60;
/*********************************/
/************ .bss ************/
extern ALHeap gALHeap;
/* Unknown size */
@@ -90,7 +101,7 @@ extern s32 D_80115F7C;
extern u32 D_80115F84;
extern u32 D_80115F88;
/******************************/
typedef struct audioMgrConfig_s{
u32 unk00;
+27 -6
View File
@@ -65,7 +65,6 @@ typedef struct unk80119240
} unk800DC6B0;
*/
typedef struct audioMgrConfig_s{
u32 unk00;
u32 unk04;
@@ -74,13 +73,33 @@ typedef struct audioMgrConfig_s{
u16 unk10;
} audioMgrConfig;
/************ .data ************/
s32 D_800DC680 = 0; // Currently unknown, might be a different type.
s32 D_800DC684 = 0; // Currently unknown, might be a different type.
s32 D_800DC688 = 0; // Currently unknown, might be a different type.
s32 D_800DC68C = 0; // Currently unknown, might be a different type.
s32 D_800DC690 = 0x35281; // Currently unknown, might be a different type.
s32 D_800DC694 = 0xFD0; // Currently unknown, might be a different type.
s32 D_800DC698 = 0; // Currently unknown, might be a different type.
s32 D_800DC69C = 0; // Currently unknown, might be a different type.
s32 D_800DC6A0 = 1; // Currently unknown, might be a different type.
s32 D_800DC6A4 = 0; // Currently unknown, might be a different type.
s32 D_800DC6A8 = 0; // Currently unknown, might be a different type.
s32 D_800DC6AC = 0; // Currently unknown, might be a different type.
s32 D_800DC6B0 = 0; // Currently unknown, might be a different type.
s32 D_800DC6B4 = 0; // Currently unknown, might be a different type.
unk800DC6BC_40* D_800DC6B8 = NULL;
unk800DC6BC* gAlSndPlayer = (unk800DC6BC*)0x80119BD0; // What variable is 0x80119BD0?
s32 sfxVolumeSlider = 0x100;
s32 D_800DC6C4 = 0; // Currently unknown, might be a different type.
/*******************************/
/************ .bss ************/
extern u32 D_800DC6A0;
//extern unk800DC6B0* D_800DC6B0;
extern unk800DC6BC_40* D_800DC6B8;
extern unk800DC6BC* gAlSndPlayer;
extern s32 sfxVolumeSlider;
extern s32 D_80115F90;
extern ALHeap* D_80115F94;
extern OSThread audioThread;
@@ -97,6 +116,8 @@ extern OSMesg D_80119B08;
extern u16* D_80119C28;
extern f32 D_80126170;
/******************************/
void *alHeapDBAlloc(u8 *, s32, ALHeap *, s32, s32);
#if 1
+14
View File
@@ -4,8 +4,22 @@
#include "types.h"
#include "macros.h"
/************ .data ************/
s8 D_800DC6D0 = 1; // Currently unknown, might be a u8.
s32 D_800DC6D4 = 0; // Currently unknown, might be a different type.
s32 D_800DC6D8 = 1; // Currently unknown, might be a different type.
s32 D_800DC6DC = 0; // Currently unknown, might be a different type.
s32 D_800DC6E0 = 0; // Currently unknown, might be a different type.
/*******************************/
/************ .bss ************/
extern s8 D_8011AC18;
/*******************************/
GLOBAL_ASM("asm/non_matchings/unknown_005740/func_80004B40.s")
GLOBAL_ASM("asm/non_matchings/unknown_005740/func_800050D0.s")
GLOBAL_ASM("asm/non_matchings/unknown_005740/func_80005254.s")

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