mirror of
https://github.com/izzy2lost/2ship2harkinian-Android.git
synced 2026-06-19 01:20:08 -07:00
Merge branch 'main' into sys_math3d_bss
This commit is contained in:
@@ -27,15 +27,15 @@ void func_809529AC(EnMs* this, PlayState* play);
|
||||
void func_80952A1C(EnMs* this, PlayState* play);
|
||||
|
||||
ActorInit En_Ms_InitVars = {
|
||||
ACTOR_EN_MS,
|
||||
ACTORCAT_NPC,
|
||||
FLAGS,
|
||||
OBJECT_MS,
|
||||
sizeof(EnMs),
|
||||
(ActorFunc)EnMs_Init,
|
||||
(ActorFunc)EnMs_Destroy,
|
||||
(ActorFunc)EnMs_Update,
|
||||
(ActorFunc)EnMs_Draw,
|
||||
/**/ ACTOR_EN_MS,
|
||||
/**/ ACTORCAT_NPC,
|
||||
/**/ FLAGS,
|
||||
/**/ OBJECT_MS,
|
||||
/**/ sizeof(EnMs),
|
||||
/**/ EnMs_Init,
|
||||
/**/ EnMs_Destroy,
|
||||
/**/ EnMs_Update,
|
||||
/**/ EnMs_Draw,
|
||||
};
|
||||
|
||||
static ColliderCylinderInitType1 D_80952BA0 = {
|
||||
|
||||
@@ -28,15 +28,15 @@ void EnRecepgirl_Draw(Actor* thisx, PlayState* play);
|
||||
// --------------- 4 ---------------
|
||||
#if 0
|
||||
ActorInit En_Recepgirl_InitVars = {
|
||||
ACTOR_EN_RECEPGIRL,
|
||||
ACTORCAT_NPC,
|
||||
FLAGS,
|
||||
OBJECT_BG,
|
||||
sizeof(EnRecepgirl),
|
||||
(ActorFunc)EnRecepgirl_Init,
|
||||
(ActorFunc)EnRecepgirl_Destroy,
|
||||
(ActorFunc)EnRecepgirl_Update,
|
||||
(ActorFunc)EnRecepgirl_Draw,
|
||||
/**/ ACTOR_EN_RECEPGIRL,
|
||||
/**/ ACTORCAT_NPC,
|
||||
/**/ FLAGS,
|
||||
/**/ OBJECT_BG,
|
||||
/**/ sizeof(EnRecepgirl),
|
||||
/**/ EnRecepgirl_Init,
|
||||
/**/ EnRecepgirl_Destroy,
|
||||
/**/ EnRecepgirl_Update,
|
||||
/**/ EnRecepgirl_Draw,
|
||||
};
|
||||
|
||||
// static InitChainEntry sInitChain[] = {
|
||||
@@ -336,15 +336,15 @@ For now, we do not want to consider the data that mips2c has kindly imported for
|
||||
```C
|
||||
#if 0
|
||||
ActorInit En_Recepgirl_InitVars = {
|
||||
ACTOR_EN_RECEPGIRL,
|
||||
ACTORCAT_NPC,
|
||||
FLAGS,
|
||||
OBJECT_BG,
|
||||
sizeof(EnRecepgirl),
|
||||
(ActorFunc)EnRecepgirl_Init,
|
||||
(ActorFunc)EnRecepgirl_Destroy,
|
||||
(ActorFunc)EnRecepgirl_Update,
|
||||
(ActorFunc)EnRecepgirl_Draw,
|
||||
/**/ ACTOR_EN_RECEPGIRL,
|
||||
/**/ ACTORCAT_NPC,
|
||||
/**/ FLAGS,
|
||||
/**/ OBJECT_BG,
|
||||
/**/ sizeof(EnRecepgirl),
|
||||
/**/ EnRecepgirl_Init,
|
||||
/**/ EnRecepgirl_Destroy,
|
||||
/**/ EnRecepgirl_Update,
|
||||
/**/ EnRecepgirl_Draw,
|
||||
};
|
||||
|
||||
static void* D_80C106B0[4] = { (void*)0x600F8F0, (void*)0x600FCF0, (void*)0x60100F0, (void*)0x600FCF0 };
|
||||
|
||||
+22
-22
@@ -44,15 +44,15 @@ Once we have decompiled enough things to know what the data is, we can import it
|
||||
```C
|
||||
#if 0
|
||||
ActorInit En_Recepgirl_InitVars = {
|
||||
ACTOR_EN_RECEPGIRL,
|
||||
ACTORCAT_NPC,
|
||||
FLAGS,
|
||||
OBJECT_BG,
|
||||
sizeof(EnRecepgirl),
|
||||
(ActorFunc)EnRecepgirl_Init,
|
||||
(ActorFunc)EnRecepgirl_Destroy,
|
||||
(ActorFunc)EnRecepgirl_Update,
|
||||
(ActorFunc)EnRecepgirl_Draw,
|
||||
/**/ ACTOR_EN_RECEPGIRL,
|
||||
/**/ ACTORCAT_NPC,
|
||||
/**/ FLAGS,
|
||||
/**/ OBJECT_BG,
|
||||
/**/ sizeof(EnRecepgirl),
|
||||
/**/ EnRecepgirl_Init,
|
||||
/**/ EnRecepgirl_Destroy,
|
||||
/**/ EnRecepgirl_Update,
|
||||
/**/ EnRecepgirl_Draw,
|
||||
};
|
||||
|
||||
static void* D_80C106B0[4] = { (void*)0x600F8F0, (void*)0x600FCF0, (void*)0x60100F0, (void*)0x600FCF0 };
|
||||
@@ -100,15 +100,15 @@ Next remove all the externs, and uncomment their corresponding commented data:
|
||||
|
||||
```C
|
||||
ActorInit En_Recepgirl_InitVars = {
|
||||
ACTOR_EN_RECEPGIRL,
|
||||
ACTORCAT_NPC,
|
||||
FLAGS,
|
||||
OBJECT_BG,
|
||||
sizeof(EnRecepgirl),
|
||||
(ActorFunc)EnRecepgirl_Init,
|
||||
(ActorFunc)EnRecepgirl_Destroy,
|
||||
(ActorFunc)EnRecepgirl_Update,
|
||||
(ActorFunc)EnRecepgirl_Draw,
|
||||
/**/ ACTOR_EN_RECEPGIRL,
|
||||
/**/ ACTORCAT_NPC,
|
||||
/**/ FLAGS,
|
||||
/**/ OBJECT_BG,
|
||||
/**/ sizeof(EnRecepgirl),
|
||||
/**/ EnRecepgirl_Init,
|
||||
/**/ EnRecepgirl_Destroy,
|
||||
/**/ EnRecepgirl_Update,
|
||||
/**/ EnRecepgirl_Draw,
|
||||
};
|
||||
|
||||
static void* D_80C106B0[4] = { (void*)0x600F8F0, (void*)0x600FCF0, (void*)0x60100F0, (void*)0x600FCF0 };
|
||||
@@ -140,10 +140,10 @@ For actors which have yet to be decompiled, this is mitigated by use of the file
|
||||
|
||||
```c
|
||||
ActorInit En_Recepgirl_InitVars = {
|
||||
ACTOR_EN_RECEPGIRL,
|
||||
ACTORCAT_NPC,
|
||||
FLAGS,
|
||||
OBJECT_BG,
|
||||
/**/ ACTOR_EN_RECEPGIRL,
|
||||
/**/ ACTORCAT_NPC,
|
||||
/**/ FLAGS,
|
||||
/**/ OBJECT_BG,
|
||||
};
|
||||
```
|
||||
|
||||
|
||||
@@ -49,15 +49,15 @@ void func_80C10290(EnRecepgirl* this);
|
||||
void func_80C102D4(EnRecepgirl* this, PlayState* play);
|
||||
|
||||
ActorInit En_Recepgirl_InitVars = {
|
||||
ACTOR_EN_RECEPGIRL,
|
||||
ACTORCAT_NPC,
|
||||
FLAGS,
|
||||
OBJECT_BG,
|
||||
sizeof(EnRecepgirl),
|
||||
(ActorFunc)EnRecepgirl_Init,
|
||||
(ActorFunc)EnRecepgirl_Destroy,
|
||||
(ActorFunc)EnRecepgirl_Update,
|
||||
(ActorFunc)EnRecepgirl_Draw,
|
||||
/**/ ACTOR_EN_RECEPGIRL,
|
||||
/**/ ACTORCAT_NPC,
|
||||
/**/ FLAGS,
|
||||
/**/ OBJECT_BG,
|
||||
/**/ sizeof(EnRecepgirl),
|
||||
/**/ EnRecepgirl_Init,
|
||||
/**/ EnRecepgirl_Destroy,
|
||||
/**/ EnRecepgirl_Update,
|
||||
/**/ EnRecepgirl_Draw,
|
||||
};
|
||||
|
||||
static void* D_80C106B0[4] = { object_bg_Tex_00F8F0, object_bg_Tex_00FCF0, object_bg_Tex_0100F0, object_bg_Tex_00FCF0 };
|
||||
@@ -317,10 +317,10 @@ As we discussed last time, `D_80C106B0` is an array of [segmented pointers](data
|
||||
|
||||
```C
|
||||
ActorInit En_Recepgirl_InitVars = {
|
||||
ACTOR_EN_RECEPGIRL,
|
||||
ACTORCAT_NPC,
|
||||
FLAGS,
|
||||
OBJECT_BG,
|
||||
/**/ ACTOR_EN_RECEPGIRL,
|
||||
/**/ ACTORCAT_NPC,
|
||||
/**/ FLAGS,
|
||||
/**/ OBJECT_BG,
|
||||
```
|
||||
|
||||
the fourth element is the object (it is actually an enum, but the file itself has the same name as the object enum). So, we need to look at the object file. We are very lucky that a custom tool has been written for such a thing: Z64Utils.
|
||||
|
||||
@@ -142,8 +142,6 @@ typedef struct {
|
||||
/* 0x7 */ s8 stick_y;
|
||||
} __OSContReadFormat;
|
||||
|
||||
|
||||
// Original name: __OSContRequesFormat
|
||||
typedef struct {
|
||||
/* 0x00 */ u8 align;
|
||||
/* 0x01 */ u8 txsize;
|
||||
@@ -153,7 +151,7 @@ typedef struct {
|
||||
/* 0x05 */ u8 typel;
|
||||
/* 0x06 */ u8 status;
|
||||
/* 0x07 */ u8 align1;
|
||||
} __OSContRequestHeader; // size = 0x8
|
||||
} __OSContRequesFormat; // size = 0x8
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u8 txsize;
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
#ifndef _ULTRA64_HARDWARE_H_
|
||||
#define _ULTRA64_HARDWARE_H_
|
||||
|
||||
// TODO: not real libultra header. Refactor to R4300.h
|
||||
|
||||
// Segment Wrapper
|
||||
// Uncached RDRAM
|
||||
#define KSEG1 0xA0000000 // 0xA0000000 - 0xBFFFFFFF Physical memory, uncached, unmapped
|
||||
#define RDRAM_UNCACHED KSEG1
|
||||
|
||||
// Cached RDRAM
|
||||
#define KSEG0 0x80000000 // 0x80000000 - 0x9FFFFFFF Physical memory, cached, unmapped
|
||||
#define RDRAM_CACHED KSEG0
|
||||
|
||||
// Volatile access wrapper, enforcing uncached memory
|
||||
#define HW_REG(reg, type) *(volatile type*)((reg) | KSEG1)
|
||||
|
||||
#define TMEM_SIZE 0x1000
|
||||
|
||||
#define MI_INIT_MODE_REG 0x04300000
|
||||
#define MI_MODE_REG MI_INIT_MODE_REG
|
||||
#define MI_VERSION_REG 0x04300004
|
||||
#define MI_INTR_REG 0x04300008
|
||||
#define MI_INTR_MASK_REG 0x0430000C
|
||||
|
||||
/* Interrupt pending bits */
|
||||
#define CAUSE_IP8 0x00008000 /* External level 8 pending - COMPARE */
|
||||
#define CAUSE_IP7 0x00004000 /* External level 7 pending - INT4 */
|
||||
#define CAUSE_IP6 0x00002000 /* External level 6 pending - INT3 */
|
||||
#define CAUSE_IP5 0x00001000 /* External level 5 pending - INT2 */
|
||||
#define CAUSE_IP4 0x00000800 /* External level 4 pending - INT1 */
|
||||
#define CAUSE_IP3 0x00000400 /* External level 3 pending - INT0 */
|
||||
#define CAUSE_SW2 0x00000200 /* Software level 2 pending */
|
||||
#define CAUSE_SW1 0x00000100 /* Software level 1 pending */
|
||||
|
||||
#endif
|
||||
@@ -24,4 +24,15 @@
|
||||
#include "os_vi.h"
|
||||
#include "os_voice.h"
|
||||
|
||||
/*
|
||||
* Stack size for I/O device managers: PIM (PI Manager), VIM (VI Manager),
|
||||
* SIM (SI Manager)
|
||||
*
|
||||
*/
|
||||
#define OS_PIM_STACKSIZE 4096
|
||||
#define OS_VIM_STACKSIZE 4096
|
||||
#define OS_SIM_STACKSIZE 4096
|
||||
|
||||
#define OS_MIN_STACKSIZE 72
|
||||
|
||||
#endif
|
||||
|
||||
@@ -7,13 +7,41 @@
|
||||
typedef u32 OSIntMask;
|
||||
typedef u32 OSHWIntr;
|
||||
|
||||
/* Flags for debugging purpose */
|
||||
|
||||
#define OS_FLAG_CPU_BREAK 1 /* Break exception has occurred */
|
||||
#define OS_FLAG_FAULT 2 /* CPU fault has occurred */
|
||||
|
||||
/* Interrupt masks */
|
||||
|
||||
#define OS_IM_NONE 0x00000001
|
||||
#define OS_IM_RCP 0x00000401
|
||||
#define OS_IM_SW1 0x00000501
|
||||
#define OS_IM_SW2 0x00000601
|
||||
#define OS_IM_CART 0x00000c01
|
||||
#define OS_IM_PRENMI 0x00001401
|
||||
#define OS_IM_RDBWRITE 0x00002401
|
||||
#define OS_IM_RDBREAD 0x00004401
|
||||
#define OS_IM_COUNTER 0x00008401
|
||||
#define OS_IM_CPU 0x0000FF01
|
||||
#define OS_IM_SP 0x00010401
|
||||
#define OS_IM_SI 0x00020401
|
||||
#define OS_IM_AI 0x00040401
|
||||
#define OS_IM_VI 0x00080401
|
||||
#define OS_IM_PI 0x00100401
|
||||
#define OS_IM_DP 0x00200401
|
||||
#define OS_IM_ALL 0x003FFF01
|
||||
#define RCP_IMASK 0x003F0000
|
||||
#define RCP_IMASKSHIFT 16
|
||||
|
||||
|
||||
OSIntMask osGetIntMask(void);
|
||||
OSIntMask osSetIntMask(OSIntMask im);
|
||||
|
||||
|
||||
// Internal
|
||||
void __osSetHWIntrRoutine(OSHWIntr idx, OSMesgQueue* queue, OSMesg msg);
|
||||
void __osGetHWIntrRoutine(OSHWIntr idx, OSMesgQueue** outQueue, OSMesg* outMsg);
|
||||
void __osSetHWIntrRoutine(OSHWIntr interrupt, s32 (*handler)(void), void* stackEnd);
|
||||
void __osGetHWIntrRoutine(OSHWIntr interrupt, s32 (**handler)(void), void** stackEnd);
|
||||
void __osSetGlobalIntMask(OSHWIntr mask);
|
||||
void __osResetGlobalIntMask(OSHWIntr mask);
|
||||
|
||||
|
||||
@@ -7,18 +7,8 @@
|
||||
#include "os_internal_rsp.h"
|
||||
|
||||
typedef struct __osHwInt {
|
||||
/* 0x00 */ OSMesgQueue* queue;
|
||||
/* 0x04 */ OSMesg msg;
|
||||
/* 0x00 */ s32 (*handler)(void);
|
||||
/* 0x04 */ void* stackEnd;
|
||||
} __osHwInt; // size = 0x08
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u32 initialized;
|
||||
/* 0x04 */ OSThread* mgrThread;
|
||||
/* 0x08 */ OSMesgQueue* cmdQueue;
|
||||
/* 0x0C */ OSMesgQueue* eventQueue;
|
||||
/* 0x10 */ OSMesgQueue* accessQueue;
|
||||
/* 0x14 */ s32 (*piDmaCallback)(s32, uintptr_t, void*, size_t);
|
||||
/* 0x18 */ s32 (*epiDmaCallback)(OSPiHandle*, s32, uintptr_t, void*, size_t);
|
||||
} OSMgrArgs; // size = 0x1C
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
u32 __osSpGetStatus(void);
|
||||
void __osSpSetStatus(u32 data);
|
||||
s32 __osSpSetPc(void* pc);
|
||||
s32 __osSpRawStartDma(s32 direction, void* devAddr, void* dramAddr, size_t size);
|
||||
s32 __osSpSetPc(u32 pc);
|
||||
s32 __osSpRawStartDma(s32 direction, u32 devAddr, void* dramAddr, size_t size);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -18,7 +18,7 @@ typedef struct OSTimer_s {
|
||||
|
||||
OSTime osGetTime(void);
|
||||
void osSetTime(OSTime ticks);
|
||||
s32 osSetTimer(OSTimer* t, OSTime value, OSTime interval, OSMesgQueue* mq, OSMesg msg);
|
||||
s32 osSetTimer(OSTimer* t, OSTime countdown, OSTime interval, OSMesgQueue* mq, OSMesg msg);
|
||||
s32 osStopTimer(OSTimer* t);
|
||||
|
||||
|
||||
|
||||
+7
-1
@@ -115,6 +115,12 @@ typedef struct {
|
||||
|
||||
#define OS_VI_UNK28 28
|
||||
|
||||
extern OSViMode osViModeNtscHpf1;
|
||||
extern OSViMode osViModePalLan1;
|
||||
extern OSViMode osViModeNtscHpn1;
|
||||
extern OSViMode osViModeNtscLan1;
|
||||
extern OSViMode osViModeMpalLan1;
|
||||
extern OSViMode osViModeFpalLan1;
|
||||
|
||||
extern OSViMode osViModeNtscHpf1;
|
||||
extern OSViMode osViModePalLan1;
|
||||
@@ -127,7 +133,7 @@ void* osViGetCurrentFramebuffer(void);
|
||||
void* osViGetNextFramebuffer(void);
|
||||
void osViSetXScale(f32 value);
|
||||
void osViSetYScale(f32 value);
|
||||
void osViExtendVStart(u32 a0);
|
||||
void osViExtendVStart(u32 value);
|
||||
void osViSetSpecialFeatures(u32 func);
|
||||
void osViSetMode(OSViMode* modep);
|
||||
void osViSetEvent(OSMesgQueue* mq, OSMesg m, u32 retraceCount);
|
||||
|
||||
@@ -5,6 +5,81 @@
|
||||
#include "os_pi.h"
|
||||
#include "libc/stdint.h"
|
||||
|
||||
#define LEO_BASE_REG 0x05000000
|
||||
|
||||
#define LEO_CMD (LEO_BASE_REG + 0x508)
|
||||
#define LEO_STATUS (LEO_BASE_REG + 0x508)
|
||||
|
||||
#define LEO_BM_CTL (LEO_BASE_REG + 0x510)
|
||||
#define LEO_BM_STATUS (LEO_BASE_REG + 0x510)
|
||||
|
||||
#define LEO_SEQ_CTL (LEO_BASE_REG + 0x518)
|
||||
#define LEO_SEQ_STATUS (LEO_BASE_REG + 0x518)
|
||||
|
||||
#define LEO_C2_BUFF (LEO_BASE_REG + 0x000) // C2 Sector Buffer
|
||||
#define LEO_SECTOR_BUFF (LEO_BASE_REG + 0x400) // Data Sector Buffer
|
||||
#define LEO_DATA (LEO_BASE_REG + 0x500) // Data
|
||||
#define LEO_MISC_REG (LEO_BASE_REG + 0x504) // Misc Register
|
||||
#define LEO_CUR_TK (LEO_BASE_REG + 0x50C) // Current Track
|
||||
#define LEO_ERR_SECTOR (LEO_BASE_REG + 0x514) // Sector Error Status
|
||||
#define LEO_CUR_SECTOR (LEO_BASE_REG + 0x51C) // Current Sector
|
||||
#define LEO_HARD_RESET (LEO_BASE_REG + 0x520) // Hard Reset
|
||||
#define LEO_C1_S0 (LEO_BASE_REG + 0x524) // C1
|
||||
#define LEO_HOST_SECBYTE (LEO_BASE_REG + 0x528) // Sector Size (in bytes)
|
||||
#define LEO_C1_S2 (LEO_BASE_REG + 0x52C) // C1
|
||||
#define LEO_SEC_BYTE (LEO_BASE_REG + 0x530) // Sectors per Block, Full Size
|
||||
#define LEO_C1_S4 (LEO_BASE_REG + 0x534) // C1
|
||||
#define LEO_C1_S6 (LEO_BASE_REG + 0x538) // C1
|
||||
#define LEO_CUR_ADDR (LEO_BASE_REG + 0x53C) // Current Address?
|
||||
#define LEO_ID_REG (LEO_BASE_REG + 0x540) // ID
|
||||
#define LEO_TEST_REG (LEO_BASE_REG + 0x544) // Test Read
|
||||
#define LEO_TEST_PIN_SEL (LEO_BASE_REG + 0x548) // Test Write
|
||||
#define LEO_RAM_ADDR (LEO_BASE_REG + 0x580) // Microsequencer RAM
|
||||
|
||||
#define LEO_STATUS_PRESENCE_MASK 0xFFFF
|
||||
|
||||
#define LEO_STATUS_DATA_REQUEST 0x40000000
|
||||
#define LEO_STATUS_C2_TRANSFER 0x10000000
|
||||
#define LEO_STATUS_BUFFER_MANAGER_ERROR 0x08000000
|
||||
#define LEO_STATUS_BUFFER_MANAGER_INTERRUPT 0x04000000
|
||||
#define LEO_STATUS_MECHANIC_INTERRUPT 0x02000000
|
||||
#define LEO_STATUS_DISK_PRESENT 0x01000000
|
||||
#define LEO_STATUS_BUSY_STATE 0x00800000
|
||||
#define LEO_STATUS_RESET_STATE 0x00400000
|
||||
#define LEO_STATUS_MOTOR_NOT_SPINNING 0x00100000
|
||||
#define LEO_STATUS_HEAD_RETRACTED 0x00080000
|
||||
#define LEO_STATUS_WRITE_PROTECT_ERROR 0x00040000
|
||||
#define LEO_STATUS_MECHANIC_ERROR 0x00020000
|
||||
#define LEO_STATUS_DISK_CHANGE 0x00010000
|
||||
|
||||
#define LEO_STATUS_MODE_MASK (LEO_STATUS_MOTOR_NOT_SPINNING | LEO_STATUS_HEAD_RETRACTED)
|
||||
#define LEO_STATUS_MODE_SLEEP (LEO_STATUS_MOTOR_NOT_SPINNING | LEO_STATUS_HEAD_RETRACTED)
|
||||
#define LEO_STATUS_MODE_STANDBY (LEO_STATUS_HEAD_RETRACTED)
|
||||
#define LEO_STATUS_MODE_ACTIVE 0
|
||||
|
||||
#define LEO_CUR_TK_INDEX_LOCK 0x60000000
|
||||
|
||||
#define LEO_BM_STATUS_RUNNING 0x80000000 // Running
|
||||
#define LEO_BM_STATUS_ERROR 0x04000000 // Error
|
||||
#define LEO_BM_STATUS_MICRO 0x02000000 // Micro Status?
|
||||
#define LEO_BM_STATUS_BLOCK 0x01000000 // Block Transfer
|
||||
#define LEO_BM_STATUS_C1CORRECTION 0x00800000 // C1 Correction
|
||||
#define LEO_BM_STATUS_C1DOUBLE 0x00400000 // C1 Double
|
||||
#define LEO_BM_STATUS_C1SINGLE 0x00200000 // C1 Single
|
||||
#define LEO_BM_STATUS_C1ERROR 0x00010000 // C1 Error
|
||||
|
||||
#define LEO_BM_CTL_START 0x80000000 // Start Buffer Manager
|
||||
#define LEO_BM_CTL_MODE 0x40000000 // Buffer Manager Mode
|
||||
#define LEO_BM_CTL_IMASK 0x20000000 // BM Interrupt Mask
|
||||
#define LEO_BM_CTL_RESET 0x10000000 // Buffer Manager Reset
|
||||
#define LEO_BM_CTL_DISABLE_OR 0x08000000 // Disable OR Check?
|
||||
#define LEO_BM_CTL_DISABLE_C1 0x04000000 // Disable C1 Correction
|
||||
#define LEO_BM_CTL_BLOCK 0x02000000 // Block Transfer
|
||||
#define LEO_BM_CTL_CLR_MECHANIC_INTR 0x01000000 // Mechanic Interrupt Reset
|
||||
|
||||
#define LEO_BM_CTL_CONTROL_MASK 0xFF000000
|
||||
#define LEO_BM_CTL_SECTOR_MASK 0x00FF0000
|
||||
#define LEO_BM_CTL_SECTOR_SHIFT 16
|
||||
|
||||
extern OSDevMgr __osPiDevMgr;
|
||||
extern OSPiHandle* __osCurrentHandle[];
|
||||
|
||||
+4
-4
@@ -1,16 +1,16 @@
|
||||
#ifndef ALIGNMENT_H
|
||||
#define ALIGNMENT_H
|
||||
|
||||
#include "attributes.h"
|
||||
|
||||
#define ALIGN8(val) (((val) + 7) & ~7)
|
||||
#define ALIGN16(val) (((val) + 0xF) & ~0xF)
|
||||
#define ALIGN32(val) (((val) + 0x1F) & ~0x1F)
|
||||
#define ALIGN64(val) (((val) + 0x3F) & ~0x3F)
|
||||
#define ALIGN256(val) (((val) + 0xFF) & ~0xFF)
|
||||
|
||||
#ifdef __GNUC__
|
||||
#define ALIGNED8 __attribute__ ((aligned (8)))
|
||||
#else
|
||||
#define ALIGNED8
|
||||
#ifndef ALIGNED
|
||||
#define ALIGNED(x) __attribute__ ((aligned (x)))
|
||||
#endif
|
||||
|
||||
#ifdef __sgi /* IDO compiler */
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
#ifndef ATTRIBUTES_H
|
||||
#define ATTRIBUTES_H
|
||||
|
||||
// If not building with a modern GCC-like compiler then make any use of __attribute__ a no-op
|
||||
#if (!defined(__GNUC__) && !defined(__clang__)) || defined(M2CTX) || defined(__sgi)
|
||||
#ifndef __attribute__
|
||||
#define __attribute__(x)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define UNUSED __attribute__((unused))
|
||||
#define FALLTHROUGH __attribute__((fallthrough))
|
||||
#define NORETURN __attribute__((noreturn))
|
||||
|
||||
#endif
|
||||
+45
-46
@@ -1161,6 +1161,14 @@ void AudioScript_InitSequencePlayers(void);
|
||||
void func_8019AE40(s32 param_1, s32 param_2, u32 param_3, s32 param_4);
|
||||
void func_8019AEC0(UNK_PTR param_1, UNK_PTR param_2);
|
||||
|
||||
void Audio_Init(void);
|
||||
void Audio_InitSound(void);
|
||||
void Audio_Update(void);
|
||||
void Audio_ResetForAudioHeapStep3(void);
|
||||
void Audio_ResetForAudioHeapStep2(void);
|
||||
void Audio_ResetForAudioHeapStep1(s32 specId);
|
||||
void Audio_PreNMI(void);
|
||||
|
||||
void AudioOcarina_SetSongStartingPos(void);
|
||||
void AudioOcarina_StartAtSongStartingPos(u32 ocarinaFlags);
|
||||
void AudioOcarina_StartForSongCheck(u32 ocarinaFlags, u8 ocarinaStaffPlayingPosStart);
|
||||
@@ -1178,68 +1186,59 @@ OcarinaStaff* AudioOcarina_GetPlaybackStaff(void);
|
||||
void AudioOcarina_TerminaWallGenerateNotes(void);
|
||||
void AudioOcarina_PlayLongScarecrowSong(void);
|
||||
|
||||
void Audio_Update(void);
|
||||
void AudioSfx_SetProperties(u8 bankId, u8 entryIndex, u8 channelIndex);
|
||||
void AudioSfx_LowerSfxSettingsReverb(Vec3f* pos, s8 isReverbLowered);
|
||||
void Audio_SetBgmVolumeOff(void);
|
||||
void Audio_SetBgmVolumeOn(void);
|
||||
void func_801A0204(s8 seqId);
|
||||
void Audio_SetMainBgmVolume(u8 targetVolume, u8 volumeFadeTimer);
|
||||
void AudioSfx_SetChannelIO(Vec3f* pos, u16 sfxId, u8 ioData);
|
||||
|
||||
void Audio_PlayObjSoundBgm(Vec3f* pos, s8 seqId);
|
||||
void Audio_PlayObjSoundFanfare(Vec3f* pos, s8 seqId);
|
||||
void Audio_PlaySubBgmAtPos(Vec3f* pos, u8 seqId, f32 maxDist);
|
||||
void Audio_PlaySubBgmAtPosWithFilter(Vec3f* pos, u8 seqId, f32 arg2);
|
||||
void Audio_PlaySubBgmAtPosWithFilter(Vec3f* pos, u8 seqId, f32 maxDist);
|
||||
void Audio_PlaySequenceAtDefaultPos(u8 seqPlayerIndex, u16 seqId);
|
||||
void Audio_StopSequenceAtDefaultPos(void);
|
||||
void Audio_PlaySequenceAtPos(u8 seqPlayerIndex, Vec3f* pos, u16 seqId, f32 maxDist);
|
||||
void func_801A246C(u8 param_1, u8 param_2);
|
||||
void Audio_PlayMorningSceneSequence(u16 seqId, u8 dayMinusOne);
|
||||
void Audio_PlaySceneSequence(u16 seqId, u8 dayMinusOne);
|
||||
void Audio_SetSeqTempoAndFreq(u8 seqPlayerIndex, f32 freqTempoScale, u8 duration);
|
||||
void Audio_PlaySubBgm(u16 seqId);
|
||||
void Audio_StopSubBgm(void);
|
||||
void Audio_PlaySequenceInCutscene(u16 seqId);
|
||||
void Audio_StopSequenceInCutscene(u16 seqId);
|
||||
s32 Audio_IsSequencePlaying(u8 seqId);
|
||||
void Audio_PlayBgm_StorePrevBgm(u16 seqId);
|
||||
void Audio_RestorePrevBgm(void);
|
||||
void func_801A3000(u16 seqId, u8 ioData);
|
||||
// void func_801A3038(void);
|
||||
void Audio_PlayFanfareWithPlayerIOPort7(u16 seqId, u8 ioData);
|
||||
void Audio_PlayFanfare(u16 seqId);
|
||||
// void func_801A312C(void);
|
||||
void func_801A31EC(u16 seqId, s8 arg1, u8 arg2);
|
||||
void Audio_PlayFanfareWithPlayerIOCustomPort(u16 seqId, s8 ioPort, u8 ioData);
|
||||
void Audio_PlaySequenceWithSeqPlayerIO(s8 seqPlayerIndex, u16 seqId, u8 fadeInDuration, s8 ioPort, u8 ioData);
|
||||
void Audio_SetSequenceMode(u8 seqMode);
|
||||
void Audio_UpdateEnemyBgmVolume(f32 dist);
|
||||
u8 func_801A3950(s32 playerIndex, s32 isChannelIOSet);
|
||||
u8 func_801A39F8(void);
|
||||
void func_801A3A7C(s32 arg0);
|
||||
// void func_801A3AC0(void);
|
||||
void func_801A3B48(UNK_TYPE arg0);
|
||||
// void func_801A3B90(void);
|
||||
void func_801A3CD8(s8 param_1);
|
||||
void func_801A3CF4(s8 arg0);
|
||||
void func_801A3D98(s8 audioSetting);
|
||||
void func_801A3E38(u8 arg0);
|
||||
void func_801A3EC0(u8 arg0);
|
||||
void Audio_SetCutsceneFlag(s8 flag);
|
||||
void Audio_SetSpec(u32 specId);
|
||||
void func_801A4058(UNK_TYPE arg0);
|
||||
void func_801A41C8(s32 arg0);
|
||||
void func_801A41F8(UNK_TYPE arg0);
|
||||
// void func_801A42C8(void);
|
||||
// void func_801A4324(void);
|
||||
// void func_801A4348(void);
|
||||
void Audio_PreNMI(void);
|
||||
s32 func_801A46F8(void);
|
||||
void Audio_SetAmbienceChannelIO(u8 channelIndexRange, u8 ioPort, u8 ioData);
|
||||
void Audio_PlayAmbience(u8 ambienceId);
|
||||
void Audio_Init(void);
|
||||
void Audio_InitSound(void);
|
||||
void Audio_ResetForAudioHeapStep3(void);
|
||||
void Audio_ResetForAudioHeapStep2(void);
|
||||
void Audio_ResetForAudioHeapStep1(s32 specId);
|
||||
|
||||
void Audio_StopSequenceAtDefaultPos(void);
|
||||
void Audio_StopSubBgm(void);
|
||||
void Audio_StopSequenceInCutscene(u16 seqId);
|
||||
void Audio_StopFanfare(u16 duration);
|
||||
|
||||
void Audio_SetBgmVolumeOff(void);
|
||||
void Audio_SetBgmVolumeOn(void);
|
||||
void Audio_SetMainBgmVolume(u8 targetVolume, u8 volumeFadeTimer);
|
||||
void Audio_SetSequenceMode(u8 seqMode);
|
||||
void Audio_SetPauseState(u8 isPauseMenuOpen);
|
||||
void Audio_SetEnvReverb(s8 reverb);
|
||||
void Audio_SetCodeReverb(s8 reverb);
|
||||
void Audio_SetFileSelectSettings(s8 audioSetting);
|
||||
void Audio_SetBaseFilter(u8 filter);
|
||||
void Audio_SetExtraFilter(u8 filter);
|
||||
void Audio_SetCutsceneFlag(s8 flag);
|
||||
void Audio_SetSpec(u8 specId);
|
||||
void Audio_SetAmbienceChannelIO(u8 channelIndexRange, u8 ioPort, u8 ioData);
|
||||
void Audio_SetSeqTempoAndFreq(u8 seqPlayerIndex, f32 freqTempoScale, u8 duration);
|
||||
|
||||
void Audio_MuteSeqPlayerBgmSub(u8 isMuted);
|
||||
void Audio_MuteAllSeqExceptSystemAndOcarina(u16 duration);
|
||||
void Audio_MuteSfxAndAmbienceSeqExceptSysAndOca(u16 duration);
|
||||
|
||||
void func_801A0204(s8 seqId);
|
||||
void func_801A246C(u8 seqPlayerIndex, u8 type);
|
||||
s32 Audio_IsSequencePlaying(u8 seqId);
|
||||
void Audio_RestorePrevBgm(void);
|
||||
void Audio_UpdateEnemyBgmVolume(f32 dist);
|
||||
u8 func_801A3950(u8 seqPlayerIndex, u8 resetChannelIO);
|
||||
u8 func_801A39F8(void);
|
||||
s32 func_801A46F8(void);
|
||||
|
||||
void func_801A4EB0(void);
|
||||
// void func_801A4EB8(void);
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
|
||||
struct GameState;
|
||||
|
||||
#define TMEM_SIZE 0x1000
|
||||
|
||||
typedef enum SetupDL {
|
||||
/* 0x00 */ SETUPDL_0,
|
||||
/* 0x01 */ SETUPDL_1,
|
||||
|
||||
+1
-4
@@ -21,10 +21,7 @@
|
||||
|
||||
#define ARRAY_COUNT_2D(arr) (ARRAY_COUNT(arr) * ARRAY_COUNT(arr[0]))
|
||||
|
||||
// TODO: After uintptr_t cast change should have an AVOID_UB target that just toggles the KSEG0 bit in the address rather than add/sub 0x80000000
|
||||
#define PHYSICAL_TO_VIRTUAL(addr) ((uintptr_t)(addr) + RDRAM_CACHED)
|
||||
#define VIRTUAL_TO_PHYSICAL(addr) (uintptr_t)((u8*)(addr) - RDRAM_CACHED)
|
||||
#define SEGMENTED_TO_VIRTUAL(addr) (void*)(PHYSICAL_TO_VIRTUAL(gSegments[SEGMENT_NUMBER(addr)]) + SEGMENT_OFFSET(addr))
|
||||
#define SEGMENTED_TO_K0(addr) (void*)((gSegments[SEGMENT_NUMBER(addr)] + K0BASE) + SEGMENT_OFFSET(addr))
|
||||
|
||||
#define GET_ACTIVE_CAM(play) ((play)->cameraPtrs[(play)->activeCamId])
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user