Skip to content

Commit

Permalink
Merge pull request pret#133 from Kelebek1/various
Browse files Browse the repository at this point in the history
various
  • Loading branch information
RevoSucks authored Sep 18, 2024
2 parents 0032bf8 + 57f97b1 commit 001630f
Show file tree
Hide file tree
Showing 62 changed files with 5,239 additions and 1,901 deletions.
2 changes: 2 additions & 0 deletions include/functions.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

#include "ultra64.h"

f32 __sinf(f32);

void func_80057FD0(void *, int);
s32 func_8005A990(OSPiHandle *);

Expand Down
2 changes: 2 additions & 0 deletions include/global.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#define _COMMON_H

#include <ultra64.h>
#include <PR/sched.h>

typedef unsigned int uintptr_t;

Expand All @@ -13,6 +14,7 @@ typedef unsigned int uintptr_t;
#include "sections.h"
#include "gfx.h"
#include "color.h"
#include "sound.h"
#include "math.h"

typedef struct unk_D_86002F58_004_000_00C_028 {
Expand Down
17 changes: 17 additions & 0 deletions include/sound.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#ifndef _SOUND_H
#define _SOUND_H

#include <ultra64.h>
#include <PR/libaudio.h>

typedef struct SoundBank {
/* 0x00 */ char header_name[16]; // N64 PtrTablesV2\x0
/* 0x10 */ u32 flags;
/* 0x14 */ char wbk_name[12];
/* 0x20 */ s32 count;
/* 0x24 */ char* basenote;
/* 0x28 */ f32* detune;
/* 0x2C */ ALWaveTable** wave_list;
} SoundBank; // size = 0x30

#endif
11 changes: 4 additions & 7 deletions include/variables.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,9 @@ extern struct Vec3s D_8006F05C;
extern struct Vec3f D_8006F064;

typedef struct unk_D_8006FF00 {
/* 0x00 */ char unk_00[0x10];
/* 0x00 */ char unk_00[0x4];
/* 0x04 */ char* name;
/* 0x08 */ char unk_08[0x8];
/* 0x10 */ s16 unk_10;
/* 0x12 */ s16 unk_12;
/* 0x14 */ char unk_14[0x8];
Expand All @@ -143,11 +145,6 @@ extern unk_D_800AC870* D_800AC870;

extern Gfx D_8006F498[];

extern f32 D_80077DD4;
extern f32 D_80077DD8;
extern f32 D_80077DDC;
extern f32 D_80077DE0;
extern s8 D_80077DE4;
extern s32 D_80078E60;
extern s32 D_80078E64;
extern s32 D_80078E68;
Expand Down Expand Up @@ -191,6 +188,6 @@ extern u8 D_87B000D0;
extern u8 D_87B000D4;

extern s32 D_800FC820;
extern s32 D_800FF9C0;
extern u8* D_800FF9C0;

#endif
19 changes: 19 additions & 0 deletions linker_scripts/us/symbol_addrs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -271,3 +271,22 @@ CHORUS_PARAMS_N = 0x80079488;
FLANGE_PARAMS_N = 0x800794B0;
NULL_PARAMS_N = 0x800794D8;
n_eqpower = 0x80078600;
frameSize = 0x800FCAC8;
curAcmdList = 0x80077DB8;
maxRSPCmds = 0x800FCAD0;
minFrameSize = 0x800FCAC4;
maxFrameSize = 0x800FCACC;
dmaBuffs = 0x800FCAF8;
dmaState = 0x800FCAB8; // size:0xC
__am = 0x800FC830; // size:0x288
lastInfo = 0x80077DBC;
min_only_one = 0x80077DC0;
audFrameCt = 0x80077DB0;
dmaBufferLen = 0x800FCB04;
audDMAIOMesgBuf = 0x800FCAFC;
nextDMA = 0x80077DB4;
audDMAMessageBuf = 0x800FCB00;
rspbootTextStart = 0x80065FC0;
aspMainTextStart = 0x80067420;
aspMainDataStart = 0x8007EA70;
audDMAMessageQ = 0x800FCAE0;
8 changes: 4 additions & 4 deletions linker_scripts/us/symbol_addrs_code.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1257,11 +1257,11 @@ func_8003C2F8 = 0x8003C2F8; // type:func
func_8003C35C = 0x8003C35C; // type:func
func_8003C3A0 = 0x8003C3A0; // type:func
func_8003C408 = 0x8003C408; // type:func
func_8003C540 = 0x8003C540; // type:func
func_8003C8DC = 0x8003C8DC; // type:func
amCreateAudioMgr = 0x8003C540; // type:func
__amDMA = 0x8003C8DC; // type:func
func_8003CADC = 0x8003CADC; // type:func
func_8003D128 = 0x8003D128; // type:func
func_8003D160 = 0x8003D160; // type:func
__amDmaNew = 0x8003D128; // type:func
__clearAudioDMA = 0x8003D160; // type:func
func_8003D264 = 0x8003D264; // type:func
func_8003D2B8 = 0x8003D2B8; // type:func
func_8003D32C = 0x8003D32C; // type:func
Expand Down
8 changes: 7 additions & 1 deletion src/19840.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
#include "global.h"
#include "19840.h"
#include "src/18480.h"
#include "src/1C720.h"
#include "src/3FB0.h"
#include "src/dma.h"
#include "src/memmap.h"
#include "src/memory.h"
#include "src/util.h"

#pragma GLOBAL_ASM("asm/us/nonmatchings/19840/func_80018C40.s")

Expand Down
20 changes: 10 additions & 10 deletions src/1CF30.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
#include "include/string.h"
#include "src/3FB0.h"
#include "src/6A40.h"
#include "src/20470.h"
#include "src/6BC0.h"
#include "src/E890.h"
#include "src/memory.h"
#include "stdarg.h"
#include "lib/ultralib/src/libc/xstdio.h"

extern Gfx D_8006F4C0[];
extern Gfx D_8006F610[];
extern Gfx D_8006F710[];
extern Gfx D_8006F750[];
extern Gfx D_8006F768[];
Expand Down Expand Up @@ -66,48 +66,48 @@ void func_8001C6AC(s16 arg0, s16 arg1, s16 arg2, s16 arg3, u8* arg4, s16 arg5, s
func_8001C330(arg0, arg1, arg2, arg3, 0, 0, 0x400, 0x400, arg6);
}

void func_8001C8C4(s16 arg0, s16 arg1, s16 arg2, s16 arg3, u32* arg4, s16 arg5, s32 arg6) {
void func_8001C8C4(s16 arg0, s16 arg1, s16 arg2, s16 arg3, u8* arg4, s16 arg5, s32 arg6) {
gDPLoadTextureBlock(gDisplayListHead++, arg4, G_IM_FMT_RGBA, G_IM_SIZ_32b, arg5, arg3, 0,
G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD,
G_TX_NOLOD);

func_8001C330(arg0, arg1, arg2, arg3, 0, 0, 0x400, 0x400, arg6);
}

void func_8001CADC(s16 arg0, s16 arg1, s16 arg2, s16 arg3, u32* arg4, s16 arg5, s32 arg6) {
void func_8001CADC(s16 arg0, s16 arg1, s16 arg2, s16 arg3, u8* arg4, s16 arg5, s32 arg6) {
gDPLoadTextureBlock(gDisplayListHead++, arg4, G_IM_FMT_IA, G_IM_SIZ_8b, arg5, arg3, 0, G_TX_NOMIRROR | G_TX_CLAMP,
G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
func_8001C330(arg0, arg1, arg2, arg3, 0, 0, 0x400, 0x400, arg6);
}

void func_8001CCF8(s16 arg0, s16 arg1, s16 arg2, s16 arg3, u32* arg4, s16 arg5, s32 arg6) {
void func_8001CCF8(s16 arg0, s16 arg1, s16 arg2, s16 arg3, u8* arg4, s16 arg5, s32 arg6) {
gDPLoadTextureBlock(gDisplayListHead++, arg4, G_IM_FMT_IA, G_IM_SIZ_16b, arg5, arg3, 0, G_TX_NOMIRROR | G_TX_CLAMP,
G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
func_8001C330(arg0, arg1, arg2, arg3, 0, 0, 0x400, 0x400, arg6);
}

void func_8001CF10(s16 arg0, s16 arg1, s16 arg2, s16 arg3, u32* arg4, s16 arg5, s32 arg6) {
void func_8001CF10(s16 arg0, s16 arg1, s16 arg2, s16 arg3, u8* arg4, s16 arg5, s32 arg6) {
gDPLoadTextureBlock_4b(gDisplayListHead++, arg4, G_IM_FMT_I, arg5, arg3, 0, G_TX_NOMIRROR | G_TX_CLAMP,
G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);

func_8001C330(arg0, arg1, arg2, arg3, 0, 0, 0x400, 0x400, arg6);
}

void func_8001D12C(s16 arg0, s16 arg1, s16 arg2, s16 arg3, u32* arg4, s16 arg5, s32 arg6) {
void func_8001D12C(s16 arg0, s16 arg1, s16 arg2, s16 arg3, u8* arg4, s16 arg5, s32 arg6) {
gDPLoadTextureBlock(gDisplayListHead++, arg4, G_IM_FMT_I, G_IM_SIZ_8b, arg5, arg3, 0, G_TX_NOMIRROR | G_TX_CLAMP,
G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);

func_8001C330(arg0, arg1, arg2, arg3, 0, 0, 0x400, 0x400, arg6);
}

void func_8001D348(s16 arg0, s16 arg1, s16 arg2, s16 arg3, u32* arg4, s16 arg5, s32 arg6) {
void func_8001D348(s16 arg0, s16 arg1, s16 arg2, s16 arg3, u8* arg4, s16 arg5, s32 arg6) {
gDPLoadTextureBlock(gDisplayListHead++, arg4, G_IM_FMT_I, G_IM_SIZ_16b, arg5, arg3, 0, G_TX_NOMIRROR | G_TX_CLAMP,
G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);

func_8001C330(arg0, arg1, arg2, arg3, 0, 0, 0x400, 0x400, arg6);
}

void func_8001D560(s16 arg0, s16 arg1, s16 arg2, s16 arg3, u32* arg4, u32* arg5, s16 arg6, s32 arg7) {
void func_8001D560(s16 arg0, s16 arg1, s16 arg2, s16 arg3, u8* arg4, u8* arg5, s16 arg6, s32 arg7) {
gDPLoadTextureBlock(gDisplayListHead++, arg4, G_IM_FMT_RGBA, G_IM_SIZ_16b, arg6, arg3, 0,
G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD,
G_TX_NOLOD);
Expand Down Expand Up @@ -315,9 +315,9 @@ u8 func_8001E730(u16 arg0) {
u8 var_v1 = 0;

if ((arg0 >= 0x20) && (arg0 < 0x80)) {
var_v1 = ((u8*)D_8006F630)[arg0 + 0];
var_v1 = ((u8*)D_8006F630)[arg0];
} else if ((arg0 >= 0xA0) && (arg0 < 0x100)) {
var_v1 = ((u8*)D_8006F610)[arg0 + 0];
var_v1 = ((u8*)D_8006F608)[sizeof(Gfx) + arg0];
}

return var_v1;
Expand Down
14 changes: 7 additions & 7 deletions src/1CF30.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ void func_8001C4E4(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5, s
void func_8001C560(s16 arg0, s16 arg1, s16 arg2, s16 arg3, u8 arg4, u8 arg5, u8 arg6);
void func_8001C604(s16 arg0, s16 arg1, s16 arg2, s16 arg3, u8 arg4, u8 arg5, u8 arg6, u8 arg7);
void func_8001C6AC(s16 arg0, s16 arg1, s16 arg2, s16 arg3, u8* arg4, s16 arg5, s32 arg6);
void func_8001C8C4(s16 arg0, s16 arg1, s16 arg2, s16 arg3, u32* arg4, s16 arg5, s32 arg6);
void func_8001CADC(s16 arg0, s16 arg1, s16 arg2, s16 arg3, u32* arg4, s16 arg5, s32 arg6);
void func_8001CCF8(s16 arg0, s16 arg1, s16 arg2, s16 arg3, u32* arg4, s16 arg5, s32 arg6);
void func_8001CF10(s16 arg0, s16 arg1, s16 arg2, s16 arg3, u32* arg4, s16 arg5, s32 arg6);
void func_8001D12C(s16 arg0, s16 arg1, s16 arg2, s16 arg3, u32* arg4, s16 arg5, s32 arg6);
void func_8001D348(s16 arg0, s16 arg1, s16 arg2, s16 arg3, u32* arg4, s16 arg5, s32 arg6);
void func_8001D560(s16 arg0, s16 arg1, s16 arg2, s16 arg3, u32* arg4, u32* arg5, s16 arg6, s32 arg7);
void func_8001C8C4(s16 arg0, s16 arg1, s16 arg2, s16 arg3, u8* arg4, s16 arg5, s32 arg6);
void func_8001CADC(s16 arg0, s16 arg1, s16 arg2, s16 arg3, u8* arg4, s16 arg5, s32 arg6);
void func_8001CCF8(s16 arg0, s16 arg1, s16 arg2, s16 arg3, u8* arg4, s16 arg5, s32 arg6);
void func_8001CF10(s16 arg0, s16 arg1, s16 arg2, s16 arg3, u8* arg4, s16 arg5, s32 arg6);
void func_8001D12C(s16 arg0, s16 arg1, s16 arg2, s16 arg3, u8* arg4, s16 arg5, s32 arg6);
void func_8001D348(s16 arg0, s16 arg1, s16 arg2, s16 arg3, u8* arg4, s16 arg5, s32 arg6);
void func_8001D560(s16 arg0, s16 arg1, s16 arg2, s16 arg3, u8* arg4, u8* arg5, s16 arg6, s32 arg7);
void func_8001D924(u8* arg0);
void func_8001DBDC(u32 arg0, s16 arg1, s16 arg2, s16 arg3, s16 arg4);
void func_8001E000(s16 arg0, s16 arg1, s16 arg2, f32 arg3, Vtx* arg4, u32 arg5);
Expand Down
Loading

0 comments on commit 001630f

Please sign in to comment.