Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 15 additions & 4 deletions config/us/pilotwings64.us.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -345,17 +345,28 @@ segments:
- { type: .bss, vram: 0x80250ED0, name: kernel/emitter }
- { type: .bss, vram: 0x8025BF00, name: kernel/event }
- { type: .bss, vram: 0x8025C5B0, name: kernel/audio }
- { type: bss, vram: 0x80261230, name: kernel_bss2 }
- { type: .bss, vram: 0x80261230, name: kernel/seq }
- { type: .bss, vram: 0x80261730, name: kernel/code_58E0 }
- { type: .bss, vram: 0x80263470, name: kernel/clocks }
- { type: .bss, vram: 0x802634C0, name: kernel/code_8170 }
- { type: bss, vram: 0x80263780, name: 80263780 }
- { type: .bss, vram: 0x80263780, name: kernel/dobj }
- { type: .bss, vram: 0x80269F10, name: kernel/env }
- { type: .bss, vram: 0x80269F50, name: kernel/code_19B50 }
- { type: .bss, vram: 0x8026A040, name: kernel/font }
- { type: .bss, vram: 0x8028A0A0, name: kernel/fx }
- { type: .bss, vram: 0x80290680, name: kernel/geometry }
- { type: .bss, vram: 0x80296AA0, name: kernel/graphics }
- { type: bss, vram: 0x802B5300, name: kernel_bss3 }
- { type: .bss, vram: 0x802B5300, name: kernel/filesystem }
- { type: .bss, vram: 0x802B5310, name: kernel/controller }
- { type: .bss, vram: 0x802B53C0, name: kernel/texture }
- { type: .bss, vram: 0x802B7DE0, name: kernel/matrix }
- { type: .bss, vram: 0x802B8820, name: kernel/memory }
- { type: .bss, vram: 0x802B8940, name: kernel/sched }
- { type: .bss, vram: 0x802B9C90, name: kernel/main }
- { type: .bss, vram: 0x802C5BC0, name: kernel/code_2FE40 }
- { type: .bss, vram: 0x802C5FD0, name: kernel/sprite }
- { type: bss, vram: 0x802C8020, name: kernel_bss4 }
- { type: .bss, vram: 0x802C8020, name: kernel/debug }
- { type: bss, vram: 0x802C8040, name: kernel_bss4 } # libultra bss

- name: app
type: code
Expand Down
8 changes: 4 additions & 4 deletions config/us/sym/symbol_addrs_kernel.txt
Original file line number Diff line number Diff line change
Expand Up @@ -404,13 +404,13 @@ gRanluxState1 = 0x8024B2C4;
gRanluxState2 = 0x8024B2C8;

gKernelThread = 0x802C36F8;
gKernelThreadStack = 0x802BDC90;
gKernelThreadStack = 0x802BBC90;

gRenderThread = 0x802C3548;
gRenderThreadStack = 0x802BBC90;
gRenderThreadStack = 0x802B9C90;

gAppThread = 0x802C3398;
gAppThreadStack = 0x802C1C90;
gAppThreadStack = 0x802BDC90;

gNmiAsserted = 0x802B9C80;

Expand All @@ -427,7 +427,7 @@ gSiContStatus = 0x802C3358;
gSiContPattern = 0x802C3394;

gSchedInst = 0x802C38A8;
gSchedStack = 0x802C5BA8;
gSchedStack = 0x802C3BA8;
gSchedRspStatus = 0x802B9C69;
gSchedRdpStatus = 0x802B9C6A;
gSchedRingIdx = 0x802B9C78;
Expand Down
1 change: 0 additions & 1 deletion config/us/sym/symbol_addrs_libultra.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
// Function Symbols
// -----------------------------------------------------------------------------

__dummy = 0x802070B0;
alSndpSetSound = 0x802344A0;
alSndpGetState = 0x802344C0;
alSndpStop = 0x802344E0;
Expand Down
1 change: 1 addition & 0 deletions include/uv_dobj.h
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ void uvDobjSetState(s32 objId, s32 flags);
void uvDobjClearState(s32 objId, s32 flags);
s32 uvDobjAllocIdx(void);
void uvDobjInit(void);
void _uvDobjsDraw(UnkStruct_80204D94* arg0, s32 arg1);
void uvDobj_8021771C(UnkStruct_80204D94*);
u8 uvDobj_80217AB4(ParsedUVMD*, f32);
s32 uvDobj_80217B34(s32**);
Expand Down
9 changes: 9 additions & 0 deletions include/uv_environment.h
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you also add to this file prototypes for uvEnvProps, uvEnvProps2, uvEnvFunc and func_80218700?

Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#ifndef UV_ENVIRONMENT_H
#define UV_ENVIRONMENT_H

#include <PR/ultratypes.h>
#include <uv_dobj.h>

void _uvEnvDraw(s32 arg0, s32 arg1);

#endif // UV_ENVIRONMENT_H
4 changes: 3 additions & 1 deletion include/uv_fx.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ typedef struct {
s32 unk60;
s32 unk64;
Mtx4F unk68;
void* unkA8;
void* unkA8; // UnkModelTrail* or UnkModelDebrisStructure*
f32 unkAC;
} UnkFxStruct; // size = 0xB0

Expand All @@ -101,6 +101,8 @@ extern UnkFxStruct D_8028B400[120];
void func_8021A038(UnkModelTrail* arg0);
s32 func_8021A334(f32 arg0, f32 arg1, f32 arg2, f32 arg3, u16 arg4);
void func_8021BE28(u16 fxId, Mtx4F* arg1);
void func_8021EA38(UnkStruct_80204D94* arg0);
void _uvFxDraw(u16 fxId, UnkStruct_80204D94* arg1);
s32 func_8021EFF0(s32 type);
void uvFxProps(s32 fxId, ...);

Expand Down
79 changes: 41 additions & 38 deletions include/uv_graphics.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ typedef struct {
s32 state;
s16 unk4;
s16 unk6;
Gfx* unk8;
Gfx* dlist;
} uvGfxState_t;

typedef struct {
Expand All @@ -72,19 +72,16 @@ typedef struct {
} Unk80225FBC_0x28_UnkC; // size = 0x10

typedef struct {
s32 unk0;
u16 unk4;
u16 unk6;
Gfx* dlist;
uvGfxState_t unk0;
Unk80225FBC_0x28_UnkC* unkC;
u16 unk10;
u16 unk12;
u16 unk14;
u16 pad16;
s32 unk18;
s32 unk1C;
s32 unk20;
s32 unk24;
f32 unk18;
f32 unk1C;
f32 unk20;
f32 unk24;
} Unk80225FBC_0x28;

typedef struct {
Expand All @@ -97,31 +94,23 @@ typedef struct {
struct UnkSobjDraw* unk10;
u16 unk14;
u16 pad16;
s32 unk18;
s32 unk1C;
s32 unk20;
s32 unk24;
f32 unk18;
f32 unk1C;
f32 unk20;
f32 unk24;
f32 unk28;
} ParsedUVCT; // size = 0x28

typedef struct uvUnkTileStruct_Unk0 {
u8 pad0[0x30];
f32 unk30;
f32 unk34;
f32 unk38;
u8 pad3C[0x4];
} uvUnkTileStruct_Unk0; // size = 0x40

typedef struct uvUnkTileStruct {
uvUnkTileStruct_Unk0 unk0;
Mtx4F unk0;
ParsedUVCT* unk40;
u8 unk44;
} uvUnkTileStruct; // size = 0x48

typedef struct uvUnkTeraStruct {
f32 unk0;
f32 unk4;
u8 pad8[0x4];
f32 unk8;
f32 unkC;
f32 unk10;
f32 unk14;
Expand Down Expand Up @@ -436,7 +425,7 @@ void uvGfxStatePush(void);
void uvGfxStatePop(void);
void uvGfxSetFlags(s32 flags);
void uvGfxClearFlags(s32 flags);
void uvGfx_80223A28(u32 flags);
void uvGfx_80223A28(s32 flags);
void uvGfx_80223A64(s32 arg0, s32 arg1);
void uvGfxWaitForMesg(void);
void uvGfxEnableGamma(s32 enable);
Expand All @@ -445,6 +434,15 @@ void uvGfx_80223C00(void);
void uvCopyFrameBuf(s32 fb_id);

// TODO from kernel/code_58E0 -- split into uv_???
typedef struct UnkStruct_80204D94_Unk374 {
f32 unk0;
f32 unk4;
f32 unk8;
f32 unkC;
f32 unk10;
f32 unk14;
} UnkStruct_80204D94_Unk374;

typedef struct {
/* 000 */ u8 unk0;
/* 001 */ u8 unk1;
Expand Down Expand Up @@ -472,20 +470,25 @@ typedef struct {
/* 1FC */ f32 unk1FC;
/* 200 */ f32 unk200;
/* 204 */ f32 unk204;
/* 208 */ u8 pad208[0xD8];
/* 2E0 */ u8 unk2E0[0x90];
/* 370 */ s32 unk370;
/* 374 */ s32 unk374;
/* 378 */ s32 unk378;
/* 37C */ s32 unk37C;
/* 380 */ s32 unk380;
/* 384 */ s32 unk384;
/* 388 */ s32 unk388;
/* 38C */ s16 unk38C;
/* 38E */ s16 unk38E;
/* 390 */ s16 unk390;
/* 392 */ s16 unk392;
/* 394 */ u32 pad394;
/* 208 */ Vec3F unk208[4];
/* 238 */ Vec3F unk238;
/* 244 */ Vec3F unk244;
/* 250 */ Vec3F unk250[5];
/* 28C */ u8 pad28C[0xC];
/* 298 */ Vec3F unk298[4];
/* 2C8 */ Vec3F unk2C8;
/* 2D4 */ Vec3F unk2D4;
/* 2E0 */ Vec3F unk2E0[5];
/* 31C */ u8 unk31C[0xC];
/* 328 */ Vec3F unk328[1];
/* 334 */ u8 pad334[0x3C];
/* 370 */ u8 unk370;
/* 374 */ UnkStruct_80204D94_Unk374 unk374;
/* 38C */ u16 unk38C;
/* 38E */ u16 unk38E;
/* 390 */ u16 unk390;
/* 392 */ u16 unk392;
/* 394 */ s32 unk394;
/* 398 */ void (*unk398)(void);
/* 39C */ void (*unk39C)(void);
} UnkStruct_80204D94; // size 3A0
Expand Down
13 changes: 13 additions & 0 deletions include/uv_sched.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,19 @@ typedef struct Unk8022B0A0 {
f32 unkC;
} Unk8022B0A0; // size: 0x10

typedef struct {
f64 unk0;
s32 unk8;
u32 unkC;
} Unk802B92A0_Unk0;

typedef struct {
Unk802B92A0_Unk0 unk0[30];
} Unk802B92A0;

extern Unk802B92A0 D_802B8940[];
extern Unk802B92A0 D_802B92A0[];

extern OSSched gSchedInst;

void uvWaitForMesg(char msg_type);
Expand Down
6 changes: 3 additions & 3 deletions src/kernel/clocks.c
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#include <uv_clocks.h>

extern u32 D_80263470;
extern s32 D_80263474;
extern uvClockState_t D_80263478[];
u32 D_80263470;
s32 D_80263474;
uvClockState_t D_80263478[8];

void uvClkInit(void) {
D_80263470 = osGetCount();
Expand Down
Loading