mirror of
https://github.com/pmret/papermario.git
synced 2024-09-08 02:29:49 +02:00
SHIFT_BSS
be gone (#1173)
* merge asm in src all versions * main: refactor and eliminate SHIFT_BSS * engine1 static BSS * engine2 * folder move * fix shift build * cleanup msg & msg_draw * wtf? * un-static-ized * . * remove unnecess. rodata pad * populate dangling common syms
This commit is contained in:
parent
e303e2a04b
commit
8d5b066b7d
@ -218,6 +218,8 @@ u8 __osContAddressCrc(u16 addr);
|
||||
u8 __osContDataCrc(u8 *data);
|
||||
s32 __osPfsGetStatus(OSMesgQueue *queue, int channel);
|
||||
|
||||
#ifndef NO_EXTERN_VARIABLES
|
||||
|
||||
extern u8 __osContLastCmd;
|
||||
extern OSTimer __osEepromTimer;
|
||||
extern OSMesg __osEepromTimerMsg;
|
||||
@ -227,6 +229,8 @@ extern OSPifRam __osContPifRam;
|
||||
extern OSPifRam __osPfsPifRam;
|
||||
extern u8 __osMaxControllers;
|
||||
|
||||
#endif
|
||||
|
||||
//some version of this almost certainly existed since there's plenty of times where it's used right before a return 0
|
||||
#define ERRCK(fn) \
|
||||
ret = fn; \
|
||||
|
@ -76,7 +76,11 @@ typedef struct OSMesgQueue_s {
|
||||
|
||||
/* Events */
|
||||
#ifdef _FINALROM
|
||||
#define OS_NUM_EVENTS 15
|
||||
# ifndef BBPLAYER
|
||||
# define OS_NUM_EVENTS 15
|
||||
# else
|
||||
# define OS_NUM_EVENTS 32
|
||||
# endif
|
||||
#else
|
||||
#define OS_NUM_EVENTS 23
|
||||
#endif
|
||||
|
@ -26,6 +26,8 @@ extern void __osTimerInterrupt(void);
|
||||
extern u32 __osProbeTLB(void *);
|
||||
extern int __osSpDeviceBusy(void);
|
||||
|
||||
#ifndef NO_EXTERN_VARIABLES
|
||||
|
||||
extern OSThread *__osRunningThread;
|
||||
extern OSThread *__osActiveQueue;
|
||||
extern OSThread *__osFaultedThread;
|
||||
@ -41,6 +43,7 @@ extern u32 __osShutdown;
|
||||
|
||||
extern __OSEventState __osEventStateTab[OS_NUM_EVENTS];
|
||||
|
||||
#endif
|
||||
|
||||
//not sure if this should be here
|
||||
extern s32 osViClock;
|
||||
|
@ -6,7 +6,9 @@
|
||||
#include "types.h"
|
||||
#include "common_structs.h"
|
||||
#include "functions.h"
|
||||
#ifndef NO_EXTERN_VARIABLES
|
||||
#include "variables.h"
|
||||
#endif
|
||||
#include "macros.h"
|
||||
#include "enums.h"
|
||||
#include "evt.h"
|
||||
|
@ -2514,6 +2514,13 @@ typedef struct PartnerDMAData {
|
||||
/* 0x10 */ s32 y;
|
||||
} PartnerDMAData; // size = 0x14
|
||||
|
||||
typedef struct UseItemStruct {
|
||||
/* 0x00 */ u8* dmaStart;
|
||||
/* 0x04 */ u8* dmaEnd;
|
||||
/* 0x08 */ EvtScript* main;
|
||||
/* 0x0C */ s32 unk_0C;
|
||||
} UseItemStruct;
|
||||
|
||||
typedef struct MsgVoice {
|
||||
/* 0x00 */ s32 voiceA;
|
||||
/* 0x04 */ s32 voiceB;
|
||||
|
@ -18,7 +18,7 @@
|
||||
#define MATCHING_BSS(size) static BSS u8 padding_bss[size];
|
||||
#endif
|
||||
|
||||
#define BSS __attribute__ ((section (".bss")))
|
||||
#define BSS __attribute__ ((nocommon, section (".bss")))
|
||||
#define TRANSPARENT_UNION __attribute__ ((__transparent_union__))
|
||||
#else
|
||||
#define SHIFT_BSS static
|
||||
@ -26,13 +26,15 @@
|
||||
#define TRANSPARENT_UNION
|
||||
#endif
|
||||
|
||||
#define ALIGNED(x) __attribute__((aligned(x)))
|
||||
|
||||
#ifndef BBPLAYER
|
||||
# define ALIGNED(x) __attribute__((aligned(x)))
|
||||
# define OSALIGNED(x) ALIGNED(x)
|
||||
#else
|
||||
# define ALIGNED(x)
|
||||
# define OSALIGNED(x)
|
||||
#endif
|
||||
|
||||
#define BBALIGNED(x) __attribute__((aligned(x)))
|
||||
# define BBALIGNED(x) ALIGNED(x)
|
||||
|
||||
#define ALIGN16(val) (((val) + 0xF) & ~0xF)
|
||||
#define ALIGN8(val) (((val) + 0x7) & ~0x7)
|
||||
|
@ -185,9 +185,14 @@ typedef struct ShapeFile {
|
||||
} ShapeFile; // size = variable
|
||||
|
||||
typedef ModelTreeInfo ModelTreeInfoList[0x200];
|
||||
|
||||
#ifndef NO_EXTERN_VARIABLES
|
||||
|
||||
extern ModelTreeInfoList* gCurrentModelTreeNodeInfo;
|
||||
extern ModelList* gCurrentModels;
|
||||
|
||||
#endif
|
||||
|
||||
void mdl_set_depth_tint_params(u8 primR, u8 primG, u8 primB, u8 primA, u8 fogR, u8 fogG, u8 fogB, s32 fogStart, s32 fogEnd);
|
||||
void mdl_set_remap_tint_params(u8 primR, u8 primG, u8 primB, u8 envR, u8 envG, u8 envB);
|
||||
void mdl_get_remap_tint_params(u8* primR, u8* primG, u8* primB, u8* envR, u8* envG, u8* envB);
|
||||
|
@ -416,12 +416,15 @@ typedef struct EncounterStatus {
|
||||
/* 0x0A8 */ FieldStatus unusedAttack2;
|
||||
/* 0x0AC */ FieldStatus unusedAttack3;
|
||||
/* 0x0B0 */ s32 defeatFlags[60][12];
|
||||
/* 0xFB0 */ s16 recentMaps[2];
|
||||
/* 0xFB4 */ char unk_FB4[4];
|
||||
} EncounterStatus; // size = 0xFB8
|
||||
/* 0xBF0 */ s16 recentMaps[2];
|
||||
} EncounterStatus; // size = 0xBF4
|
||||
|
||||
#ifndef NO_EXTERN_VARIABLES
|
||||
|
||||
extern EncounterStatus gCurrentEncounter;
|
||||
|
||||
#endif
|
||||
|
||||
s32 basic_ai_check_player_dist(EnemyDetectVolume* arg0, Enemy* arg1, f32 arg2, f32 arg3, s8 arg4);
|
||||
|
||||
/// The default Npc::onUpdate and Npc::onRender callback.
|
||||
|
@ -186,6 +186,8 @@ typedef struct st_SndState {
|
||||
typedef void (*NUAuPreNMIFunc)(NUScMsg,u32); /* PRENMI callback function */
|
||||
typedef void (*NUAuMgrFunc)(void); /* Acmd callback function */
|
||||
|
||||
#ifndef NO_EXTERN_VARIABLES
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
/*----------------------------------------------------------------------*/
|
||||
/* extern variables */
|
||||
@ -194,11 +196,15 @@ typedef void (*NUAuMgrFunc)(void); /* Acmd callback function */
|
||||
/*--------------------------------------*/
|
||||
/* audio variables */
|
||||
/*--------------------------------------*/
|
||||
|
||||
// NOTE: some variables have been commented out due to
|
||||
// being declared static which affects bss reordering
|
||||
|
||||
extern u64* nuAuMgrStack;
|
||||
extern NUScTask nuAuTask; /* Audio task buffer*/
|
||||
extern s16* nuAuBuffer_ptr[]; /* Audio buffer */
|
||||
extern NUScClient nuAuClient;
|
||||
extern OSThread nuAuMgrThread;
|
||||
//extern OSThread nuAuMgrThread;
|
||||
extern u32 nuAuFrameCounter; /* Frame counter */
|
||||
extern ALHeap nuAuHeap; /* Heap structure */
|
||||
extern NUAuSeqPlayer nuAuSeqPlayer[];
|
||||
@ -219,7 +225,7 @@ extern OSMesgQueue nuAuMesgQ; /* Audio Manager queue */
|
||||
extern ALGlobals nuAuGlobal;
|
||||
extern s16 nuAuDmaBufNum;
|
||||
extern s16 nuAuDmaBufSize;
|
||||
extern NUDMAState nuAuDmaState;
|
||||
//extern NUDMAState nuAuDmaState;
|
||||
extern NUDMABuffer* nuAuDmaBuf;
|
||||
extern Acmd* nuAuCmdListBuf; /* pointer of command list */
|
||||
extern u32 nuAuAcmdLen;
|
||||
@ -240,6 +246,8 @@ extern u32 nuAuDebAcmdLenMax; /* Maximum length of the audio command list */
|
||||
extern s16 nuAuFrameSampleSize; /* Number of samples created at one time */
|
||||
extern s16 nuAuExtraSampleSize; /* Number of extra samples */
|
||||
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
/*----------------------------------------------------------------------*/
|
||||
/* Global Function */
|
||||
|
@ -652,6 +652,8 @@ typedef struct st_DebConWindow {
|
||||
u16 text[NU_DEB_CON_TEXT_SIZE]; /* Character buffer*/
|
||||
} NUDebConWindow;
|
||||
|
||||
#ifndef NO_EXTERN_VARIABLES
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
/*----------------------------------------------------------------------*/
|
||||
/* extern variables */
|
||||
@ -752,6 +754,7 @@ extern u32 nuDebTaskPerfInterval;
|
||||
extern volatile u32 nuDebTaskPerfCnt;
|
||||
extern volatile u32 nuDebTaskPerfEnd;
|
||||
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
@ -2,11 +2,11 @@
|
||||
#include "nu/nusys.h"
|
||||
#include "game_modes.h"
|
||||
|
||||
SHIFT_BSS s16 gMapTransitionAlpha;
|
||||
SHIFT_BSS s16 gMapTransitionFadeRate;
|
||||
SHIFT_BSS s16 gMapTransitionState;
|
||||
SHIFT_BSS s16 gMapTransitionStateTime;
|
||||
SHIFT_BSS s16 gLoadedFromFileSelect;
|
||||
BSS s16 gMapTransitionAlpha;
|
||||
BSS s16 gMapTransitionFadeRate;
|
||||
BSS s16 gMapTransitionState;
|
||||
BSS s16 gMapTransitionStateTime;
|
||||
BSS s16 gLoadedFromFileSelect;
|
||||
|
||||
void set_map_change_fade_rate(s16 fadeRate) {
|
||||
gMapTransitionFadeRate = fadeRate;
|
||||
|
13
src/77480.c
13
src/77480.c
@ -28,11 +28,14 @@ extern Addr inspect_icon_ROM_START;
|
||||
extern Addr inspect_icon_ROM_END;
|
||||
#endif
|
||||
|
||||
SHIFT_BSS UNK_FUN_PTR(ISpyNotificationCallback);
|
||||
SHIFT_BSS UNK_FUN_PTR(PulseStoneNotificationCallback);
|
||||
SHIFT_BSS UNK_FUN_PTR(TalkNotificationCallback);
|
||||
SHIFT_BSS UNK_FUN_PTR(InteractNotificationCallback);
|
||||
SHIFT_BSS s32 D_8010C950;
|
||||
UNK_FUN_PTR(ISpyNotificationCallback);
|
||||
UNK_FUN_PTR(PulseStoneNotificationCallback);
|
||||
UNK_FUN_PTR(TalkNotificationCallback);
|
||||
UNK_FUN_PTR(InteractNotificationCallback);
|
||||
s32 D_8010C950;
|
||||
|
||||
PlayerStatus gPlayerStatus;
|
||||
PlayerData gPlayerData;
|
||||
|
||||
extern f32 D_800F7B48;
|
||||
extern s32 D_800F7B4C;
|
||||
|
19
src/7B440.c
19
src/7B440.c
@ -1,14 +1,15 @@
|
||||
#include "common.h"
|
||||
|
||||
SHIFT_BSS s32 PeachDisguiseNpcIndex;
|
||||
SHIFT_BSS Entity* TweesterTouchingPartner;
|
||||
SHIFT_BSS Entity* TweesterTouchingPlayer;
|
||||
SHIFT_BSS s32 PrevPlayerDirection;
|
||||
SHIFT_BSS s32 PlayerRunStateTime;
|
||||
SHIFT_BSS f32 PlayerNormalYaw;
|
||||
SHIFT_BSS f32 PlayerNormalPitch;
|
||||
SHIFT_BSS PlayerSpinState gPlayerSpinState;
|
||||
SHIFT_BSS s32 PlayerYInterpUpdateDelay;
|
||||
s32 PeachDisguiseNpcIndex;
|
||||
Entity* TweesterTouchingPartner;
|
||||
Entity* TweesterTouchingPlayer;
|
||||
s32 PrevPlayerDirection;
|
||||
s32 PlayerRunStateTime;
|
||||
f32 PlayerNormalYaw;
|
||||
f32 PlayerNormalPitch;
|
||||
PlayerSpinState gPlayerSpinState;
|
||||
|
||||
BSS s32 PlayerYInterpUpdateDelay;
|
||||
|
||||
void update_player_input(void) {
|
||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||
|
10
src/7BB60.c
10
src/7BB60.c
@ -2,11 +2,11 @@
|
||||
#include "world/partners.h"
|
||||
#include "sprite/player.h"
|
||||
|
||||
SHIFT_BSS CollisionStatus gCollisionStatus;
|
||||
SHIFT_BSS f32 D_8010C928;
|
||||
SHIFT_BSS f32 JumpedOnSwitchX;
|
||||
SHIFT_BSS f32 JumpedOnSwitchZ;
|
||||
SHIFT_BSS f32 D_8010C984;
|
||||
CollisionStatus gCollisionStatus;
|
||||
f32 D_8010C928;
|
||||
f32 JumpedOnSwitchX;
|
||||
f32 JumpedOnSwitchZ;
|
||||
f32 D_8010C984;
|
||||
|
||||
extern f32 GravityParamsStartJump[];
|
||||
|
||||
|
19
src/7E9D0.c
19
src/7E9D0.c
@ -13,15 +13,16 @@
|
||||
#define PLAYER_ACTION_VRAM_DEF (void*) 0x802B6000
|
||||
#endif
|
||||
|
||||
SHIFT_BSS void* D_8010C924;
|
||||
SHIFT_BSS s32 D_8010C92C;
|
||||
SHIFT_BSS s32 D_8010C964;
|
||||
SHIFT_BSS s32 gSpinHistoryBufferPos;
|
||||
SHIFT_BSS s16 D_8010C9B0;
|
||||
SHIFT_BSS s32 gSpinHistoryPosY[5];
|
||||
SHIFT_BSS s32 gSpinHistoryPosX[5];
|
||||
SHIFT_BSS s32 gSpinHistoryPosZ[5];
|
||||
SHIFT_BSS s16 gSpinHistoryPosAngle[5];
|
||||
void* D_8010C924;
|
||||
s32 D_8010C92C;
|
||||
s32 D_8010C964;
|
||||
s32 gSpinHistoryBufferPos;
|
||||
s32 gSpinHistoryPosY[5];
|
||||
s32 gSpinHistoryPosX[5];
|
||||
s32 gSpinHistoryPosZ[5];
|
||||
s16 gSpinHistoryPosAngle[5];
|
||||
|
||||
BSS s16 D_8010C9B0;
|
||||
|
||||
void func_800E5520(void) {
|
||||
D_8010C9B0 = 0;
|
||||
|
@ -26,8 +26,8 @@ s32 D_801094A8 = 0;
|
||||
s16 D_801094AC = 4;
|
||||
s16 D_801094AE = 4;
|
||||
|
||||
SHIFT_BSS s32 D_8010CFF0;
|
||||
SHIFT_BSS s32 D_8010CFF4;
|
||||
BSS s32 D_8010CFF0;
|
||||
BSS s32 D_8010CFF4;
|
||||
|
||||
void func_800EFD00(void) {
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ typedef struct Unk8a160Outer {
|
||||
/* 0x00 */ Unk8a160 subs[57]; // one base + 56 others?
|
||||
} Unk8a160Outer;
|
||||
|
||||
SHIFT_BSS Unk8a160Outer D_8010D000[1];
|
||||
BSS Unk8a160Outer D_8010D000[1];
|
||||
|
||||
void func_800F0CB0(s32 arg0, f32 x, f32 y, f32 scale) {
|
||||
Unk8a160Outer* outer = &D_8010D000[arg0];
|
||||
|
@ -79,46 +79,46 @@ s16 PopupContentScissorWidths[] = {
|
||||
};
|
||||
#endif
|
||||
|
||||
SHIFT_BSS s32 gPopupState;
|
||||
SHIFT_BSS s32 D_8010D644;
|
||||
SHIFT_BSS s32 PopupMenu_SelectedIndex;
|
||||
SHIFT_BSS s32 PopupMenu_PrevSelectedIndex;
|
||||
SHIFT_BSS s32 PopupMenu_Alpha;
|
||||
SHIFT_BSS s8 PopupMenu_FirstDisplayIndex;
|
||||
SHIFT_BSS s8 PopupMenu_LastDisplayIndex;
|
||||
SHIFT_BSS s8 PopupMenu_DisplayedEntryCount;
|
||||
SHIFT_BSS s16 D_8010D658;
|
||||
SHIFT_BSS s16 D_8010D65A;
|
||||
SHIFT_BSS s32 PopupMenu_EmptybarHEID;
|
||||
SHIFT_BSS s32 PopupMenu_TitleIconHEID;
|
||||
SHIFT_BSS s32 PopupMenu_TimesHEID;
|
||||
SHIFT_BSS s32 PopupMenu_PartnerLevelHEID;
|
||||
SHIFT_BSS s32 PopupMenu_CursorHEID;
|
||||
SHIFT_BSS s32 PopupMenu_UpArrowHEID;
|
||||
SHIFT_BSS s32 PopupMenu_DownArrowHEID;
|
||||
SHIFT_BSS s32 PopupMenu_EntryIconHEID;
|
||||
SHIFT_BSS s16 D_8010D67C;
|
||||
SHIFT_BSS s16 D_8010D67E;
|
||||
SHIFT_BSS s16 D_8010D680;
|
||||
SHIFT_BSS s16 D_8010D682;
|
||||
SHIFT_BSS s16 D_8010D684;
|
||||
SHIFT_BSS s16 D_8010D686;
|
||||
SHIFT_BSS s16 PopupMenu_StarPieceCounterPosX;
|
||||
SHIFT_BSS s16 PopupMenu_StarPieceCounterPosY;
|
||||
SHIFT_BSS s16 D_8010D68C;
|
||||
SHIFT_BSS s8 PopupNotBattle;
|
||||
SHIFT_BSS s8 PopupMenu_MaxDisplayableEntryCount;
|
||||
SHIFT_BSS s8 D_8010D690;
|
||||
SHIFT_BSS s8 D_8010D691;
|
||||
SHIFT_BSS s8 D_8010D692;
|
||||
SHIFT_BSS s8 D_8010D693;
|
||||
SHIFT_BSS s32 gPopupWorker;
|
||||
SHIFT_BSS s8 PopupNotDipping;
|
||||
SHIFT_BSS s8 PopupDipMode;
|
||||
SHIFT_BSS s8 PopupMenu_WasStatusBarIgnoringChanges;
|
||||
SHIFT_BSS PopupMenu* gPopupMenu;
|
||||
SHIFT_BSS MessagePrintState* D_8010D6A0;
|
||||
SHIFT_BSS s32 D_8010D6A4;
|
||||
BSS s32 gPopupState;
|
||||
BSS s32 D_8010D644;
|
||||
BSS s32 PopupMenu_SelectedIndex;
|
||||
BSS s32 PopupMenu_PrevSelectedIndex;
|
||||
BSS s32 PopupMenu_Alpha;
|
||||
BSS s8 PopupMenu_FirstDisplayIndex;
|
||||
BSS s8 PopupMenu_LastDisplayIndex;
|
||||
BSS s8 PopupMenu_DisplayedEntryCount;
|
||||
BSS s16 D_8010D658;
|
||||
BSS s16 D_8010D65A;
|
||||
BSS s32 PopupMenu_EmptybarHEID;
|
||||
BSS s32 PopupMenu_TitleIconHEID;
|
||||
BSS s32 PopupMenu_TimesHEID;
|
||||
BSS s32 PopupMenu_PartnerLevelHEID;
|
||||
BSS s32 PopupMenu_CursorHEID;
|
||||
BSS s32 PopupMenu_UpArrowHEID;
|
||||
BSS s32 PopupMenu_DownArrowHEID;
|
||||
BSS s32 PopupMenu_EntryIconHEID;
|
||||
BSS s16 D_8010D67C;
|
||||
BSS s16 D_8010D67E;
|
||||
BSS s16 D_8010D680;
|
||||
BSS s16 D_8010D682;
|
||||
BSS s16 D_8010D684;
|
||||
BSS s16 D_8010D686;
|
||||
BSS s16 PopupMenu_StarPieceCounterPosX;
|
||||
BSS s16 PopupMenu_StarPieceCounterPosY;
|
||||
BSS s16 D_8010D68C;
|
||||
BSS s8 PopupNotBattle;
|
||||
BSS s8 PopupMenu_MaxDisplayableEntryCount;
|
||||
BSS s8 D_8010D690;
|
||||
BSS s8 D_8010D691;
|
||||
BSS s8 D_8010D692;
|
||||
BSS s8 D_8010D693;
|
||||
BSS s32 gPopupWorker;
|
||||
BSS s8 PopupNotDipping;
|
||||
BSS s8 PopupDipMode;
|
||||
BSS s8 PopupMenu_WasStatusBarIgnoringChanges;
|
||||
BSS PopupMenu* gPopupMenu;
|
||||
BSS MessagePrintState* D_8010D6A0;
|
||||
BSS s32 D_8010D6A4;
|
||||
|
||||
s8 status_bar_is_ignoring_changes(void);
|
||||
|
||||
|
@ -9,25 +9,27 @@ typedef struct DisplayListBufferHandle {
|
||||
|
||||
typedef DisplayListBufferHandle AnimatedMeshVertexCopyList[0x60];
|
||||
|
||||
SHIFT_BSS AnimatedMeshList* gCurrentAnimMeshListPtr;
|
||||
SHIFT_BSS s32 gAnimCount;
|
||||
SHIFT_BSS AnimatedMeshVertexCopyList D_801533C0;
|
||||
SHIFT_BSS AnimatedMeshVertexCopyList D_801536C0;
|
||||
SHIFT_BSS AnimatedMeshList D_801539C0;
|
||||
SHIFT_BSS AnimatedMeshList D_80153A00;
|
||||
SHIFT_BSS s32 gAnimModelFogEnabled;
|
||||
SHIFT_BSS s32 gAnimModelFogR;
|
||||
SHIFT_BSS s32 gAnimModelFogG;
|
||||
SHIFT_BSS s32 gAnimModelFogB;
|
||||
SHIFT_BSS s32 gAnimModelFogA;
|
||||
SHIFT_BSS s32 gAnimModelFogStart;
|
||||
SHIFT_BSS s32 gAnimModelFogEnd;
|
||||
SHIFT_BSS s32 gAnimVtxSegment;
|
||||
SHIFT_BSS Matrix4f gAnimRotMtx;
|
||||
SHIFT_BSS Matrix4f gAnimScaleMtx;
|
||||
SHIFT_BSS Matrix4f gAnimTranslateMtx;
|
||||
SHIFT_BSS Matrix4f gAnimRotScaleMtx;
|
||||
SHIFT_BSS StaticAnimatorNode** gAnimTreeRoot;
|
||||
s32 gAnimCount;
|
||||
|
||||
BSS AnimatedMeshVertexCopyList D_801533C0;
|
||||
BSS AnimatedMeshVertexCopyList D_801536C0;
|
||||
BSS AnimatedMeshList D_801539C0;
|
||||
BSS AnimatedMeshList D_80153A00;
|
||||
BSS AnimatedMeshList* gCurrentAnimMeshListPtr;
|
||||
BSS s32 gAnimModelFogEnabled;
|
||||
BSS s32 gAnimModelFogR;
|
||||
BSS s32 gAnimModelFogG;
|
||||
BSS s32 gAnimModelFogB;
|
||||
BSS s32 gAnimModelFogA;
|
||||
BSS s32 gAnimModelFogStart;
|
||||
BSS s32 gAnimModelFogEnd;
|
||||
BSS s32 gAnimVtxSegment;
|
||||
BSS s32 D_80153A64;
|
||||
BSS Matrix4f gAnimRotMtx;
|
||||
BSS Matrix4f gAnimScaleMtx;
|
||||
BSS Matrix4f gAnimTranslateMtx;
|
||||
BSS Matrix4f gAnimRotScaleMtx;
|
||||
BSS StaticAnimatorNode** gAnimTreeRoot;
|
||||
|
||||
extern Gfx Gfx_RM1_SURFACE_OPA[];
|
||||
extern Gfx Gfx_RM1_DECAL_OPA[];
|
||||
|
@ -1186,6 +1186,8 @@ typedef struct ALConfig {
|
||||
/* 0x14 */ ALHeap* heap;
|
||||
} ALConfig; // size = 0x18;
|
||||
|
||||
#ifndef NO_EXTERN_VARIABLES
|
||||
|
||||
extern volatile u8 AuSynUseStereo;
|
||||
extern u16 DummyInstrumentPredictor[32];
|
||||
extern u8 DummyInstrumentBase[190];
|
||||
@ -1212,6 +1214,8 @@ extern AmbienceManager* gAuAmbienceManager;
|
||||
extern SoundManager* gSoundManager;
|
||||
extern BGMPlayer* gBGMPlayerA;
|
||||
|
||||
#endif
|
||||
|
||||
#include "audio/private.h"
|
||||
|
||||
#endif
|
||||
|
@ -12,22 +12,28 @@ u32 nuAuFrameCounter = 0;
|
||||
u8 nuAuTaskStop = NU_AU_TASK_RUN;
|
||||
u8 volatile AuSynUseStereo = TRUE;
|
||||
|
||||
SHIFT_BSS NUDMAState nuAuDmaState;
|
||||
SHIFT_BSS Acmd* AlCmdListBuffers[3];
|
||||
SHIFT_BSS NUScTask nuAuTasks[3];
|
||||
SHIFT_BSS u8* D_800A3628[3];
|
||||
SHIFT_BSS s32 AlFrameSize;
|
||||
SHIFT_BSS s32 AlMinFrameSize;
|
||||
SHIFT_BSS OSMesgQueue nuAuDmaMesgQ;
|
||||
SHIFT_BSS OSMesg nuAuDmaMesgBuf[50];
|
||||
SHIFT_BSS OSIoMesg nuAuDmaIOMesgBuf[50];
|
||||
SHIFT_BSS NUDMABuffer nuAuDmaBufList[50];
|
||||
SHIFT_BSS AuSynDriver auSynDriver;
|
||||
SHIFT_BSS u8 rspbootUcodeBuffer[0x100] ALIGNED(16);
|
||||
SHIFT_BSS u64 AuStack[NU_AU_STACK_SIZE / sizeof(u64)];
|
||||
SHIFT_BSS u16 AuInitialGlobalVolume;
|
||||
SHIFT_BSS OSThread nuAuMgrThread;
|
||||
SHIFT_BSS ALHeap nuAuHeap;
|
||||
BSS u16 AuInitialGlobalVolume;
|
||||
BSS OSThread nuAuMgrThread;
|
||||
BSS char D_800A1108[0x408];
|
||||
BSS u64 AuStack[NU_AU_STACK_SIZE / sizeof(u64)];
|
||||
BSS Acmd* AlCmdListBuffers[3];
|
||||
BSS NUScTask nuAuTasks[3];
|
||||
BSS u8* D_800A3628[3];
|
||||
BSS s32 AlFrameSize;
|
||||
BSS s32 AlMinFrameSize;
|
||||
BSS s32 D_800A363C;
|
||||
BSS OSMesgQueue nuAuDmaMesgQ;
|
||||
BSS OSMesg nuAuDmaMesgBuf[50];
|
||||
BSS OSIoMesg nuAuDmaIOMesgBuf[50];
|
||||
BSS NUDMAState nuAuDmaState;
|
||||
BSS s32 D_800A3BDC;
|
||||
BSS NUDMABuffer nuAuDmaBufList[50];
|
||||
|
||||
ALHeap nuAuHeap;
|
||||
AuSynDriver auSynDriver;
|
||||
#if !VERSION_IQUE
|
||||
u8 rspbootUcodeBuffer[0x100] ALIGNED(16);
|
||||
#endif
|
||||
|
||||
extern u64 n_aspMain_text_bin[];
|
||||
extern u64 n_aspMain_data_bin[];
|
||||
|
@ -1,10 +1,11 @@
|
||||
#include "audio.h"
|
||||
|
||||
BSS void (*CurrentSeqCmdHandler)(BGMPlayer*, BGMPlayerTrack*);
|
||||
|
||||
extern u8 EnvelopeReleaseDefaultFast[];
|
||||
extern u8 BgmDivisors[8];
|
||||
extern u8 D_80078558[40];
|
||||
|
||||
extern void (*CurrentSeqCmdHandler)(BGMPlayer*, BGMPlayerTrack*);
|
||||
extern void (*SefCmdHandlers[])(SoundManager*, SoundPlayer*);
|
||||
extern void (*SeqCmdHandlers[])(BGMPlayer*, BGMPlayerTrack*);
|
||||
extern u8 SeqCmdArgCounts[];
|
||||
|
@ -1,13 +1,13 @@
|
||||
#include "audio.h"
|
||||
#include "ld_addrs.h"
|
||||
|
||||
SHIFT_BSS AuCallback BeginSoundUpdateCallback;
|
||||
SHIFT_BSS BGMPlayer* gBGMPlayerA;
|
||||
SHIFT_BSS BGMPlayer* gBGMPlayerB;
|
||||
SHIFT_BSS BGMPlayer* gBGMPlayerC;
|
||||
SHIFT_BSS SoundManager* gSoundManager;
|
||||
SHIFT_BSS AuGlobals* gSoundGlobals;
|
||||
SHIFT_BSS AmbienceManager* gAuAmbienceManager;
|
||||
AuCallback BeginSoundUpdateCallback;
|
||||
BGMPlayer* gBGMPlayerA;
|
||||
BGMPlayer* gBGMPlayerB;
|
||||
BGMPlayer* gBGMPlayerC;
|
||||
SoundManager* gSoundManager;
|
||||
AuGlobals* gSoundGlobals;
|
||||
AmbienceManager* gAuAmbienceManager;
|
||||
|
||||
// data
|
||||
extern u16 D_80078530[9];
|
||||
|
@ -4,12 +4,12 @@
|
||||
|
||||
static s16 _getVol(s16 arg0, s32 arg1, s16 arg2, u16 arg3);
|
||||
|
||||
SHIFT_BSS s16* AuDelayBufferMain;
|
||||
SHIFT_BSS s16* AuDelayBufferAux;
|
||||
SHIFT_BSS s32 AuDelayCounter;
|
||||
SHIFT_BSS u8 AuDelayedVoiceGroup;
|
||||
SHIFT_BSS s16 AuDelayedChannel;
|
||||
SHIFT_BSS s32 AuDelayCount;
|
||||
BSS s16* AuDelayBufferMain;
|
||||
BSS s16* AuDelayBufferAux;
|
||||
BSS s32 AuDelayCounter;
|
||||
BSS u8 AuDelayedVoiceGroup;
|
||||
BSS s16 AuDelayedChannel;
|
||||
BSS s32 AuDelayCount;
|
||||
|
||||
AuSynDriver* gActiveSynDriverPtr = NULL;
|
||||
AuSynDriver* gSynDriverPtr = NULL;
|
||||
|
@ -23,7 +23,7 @@ AmbientSoundSettings DefaultAmbientSoundData = {
|
||||
.unkC = -1
|
||||
};
|
||||
|
||||
SHIFT_BSS AmbientSoundSettings AmbientSoundData;
|
||||
AmbientSoundSettings AmbientSoundData;
|
||||
|
||||
void reset_ambient_sounds(void) {
|
||||
AmbientSoundData = DefaultAmbientSoundData;
|
||||
|
@ -4,11 +4,12 @@
|
||||
void bgm_update_volume(void);
|
||||
void bgm_set_target_volume(s16 volume);
|
||||
|
||||
SHIFT_BSS s16 MusicDefaultVolume;
|
||||
SHIFT_BSS s16 MusicMaxVolume;
|
||||
SHIFT_BSS s16 MusicCurrentVolume;
|
||||
SHIFT_BSS s16 MusicTargetVolume;
|
||||
SHIFT_BSS MusicSettings gMusicSettings[2];
|
||||
BSS s16 MusicDefaultVolume;
|
||||
BSS s16 MusicTargetVolume;
|
||||
BSS s16 MusicMaxVolume;
|
||||
BSS s16 MusicCurrentVolume;
|
||||
|
||||
MusicSettings gMusicSettings[2];
|
||||
|
||||
MusicSettings BlankMusicSettings = {
|
||||
.flags = 0,
|
||||
|
@ -3,8 +3,8 @@
|
||||
|
||||
#define MAX_SOUND_INSTANCES 10
|
||||
|
||||
SHIFT_BSS u16 gCurrentDoorSounds;
|
||||
SHIFT_BSS u16 gCurrentRoomDoorSounds;
|
||||
u16 gCurrentDoorSounds;
|
||||
u16 gCurrentRoomDoorSounds;
|
||||
|
||||
#define SOUND_LOOP_IDX(soundID) (soundID & 0xFFFF)
|
||||
|
||||
@ -209,10 +209,10 @@ s32 OpenCloseSounds[][2] = {
|
||||
{ SOUND_CREAKY_WINDOW_OPEN, SOUND_CREAKY_WINDOW_CLOSE },
|
||||
};
|
||||
|
||||
SHIFT_BSS SoundInstance wEnvSounds[MAX_SOUND_INSTANCES];
|
||||
SHIFT_BSS SoundInstance bEnvSounds[MAX_SOUND_INSTANCES];
|
||||
SHIFT_BSS SoundInstance* gCurrentEnvSounds;
|
||||
SHIFT_BSS s32 SfxReverbMode;
|
||||
BSS SoundInstance wEnvSounds[MAX_SOUND_INSTANCES];
|
||||
BSS SoundInstance bEnvSounds[MAX_SOUND_INSTANCES];
|
||||
BSS SoundInstance* gCurrentEnvSounds;
|
||||
BSS s32 SfxReverbMode;
|
||||
|
||||
void sfx_compute_spatialized_sound_params_full(f32 x, f32 y, f32 z, s16* volume, s16* pan, s32 flags) {
|
||||
s32 screenX, screenY, screenZ;
|
||||
|
@ -418,8 +418,7 @@ f32 AlTuneScaling[] = {
|
||||
|
||||
extern s32* AU_FX_CUSTOM_PARAMS[0]; // points to 80078290
|
||||
|
||||
SHIFT_BSS void (*CurrentSeqCmdHandler)(BGMPlayer*, BGMPlayerTrack*);
|
||||
SHIFT_BSS void (*CurrentSefCmdHandler)(SoundManager*, SoundPlayer*);
|
||||
void (*CurrentSefCmdHandler)(SoundManager*, SoundPlayer*);
|
||||
|
||||
void au_sfx_init(SoundManager* manager, u8 priority, u8 busId, AuGlobals* globals, u8 minVoiceIdx) {
|
||||
u32 i;
|
||||
|
@ -8,8 +8,12 @@ s8 gBackroundWaveEnabled = FALSE;
|
||||
s16 gBackroundTextureYOffset = 0;
|
||||
f32 gBackroundWavePhase = 0.0f;
|
||||
|
||||
SHIFT_BSS PAL_BIN gBackgroundPalette[256];
|
||||
SHIFT_BSS f32 gBackroundLastScrollValue;
|
||||
BSS PAL_BIN gBackgroundPalette[256];
|
||||
BSS f32 gBackroundLastScrollValue;
|
||||
BSS s32 D_801595A4[3];
|
||||
#if !VERSION_PAL
|
||||
BSS s32 D_801595AC;
|
||||
#endif
|
||||
|
||||
void load_map_bg(char* optAssetName) {
|
||||
if (optAssetName != NULL) {
|
||||
|
@ -30,8 +30,6 @@ Gfx D_80074230[] = {
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
//extern s32 timeFreezeMode; // TODO bss
|
||||
|
||||
void gfx_init_state(void) {
|
||||
gSPSegment(gMainGfxPos++, 0x00, 0x0);
|
||||
gSPDisplayList(gMainGfxPos++, OS_K0_TO_PHYSICAL(D_80074230));
|
||||
|
@ -6,22 +6,22 @@
|
||||
#include "sprite.h"
|
||||
#include "game_modes.h"
|
||||
|
||||
SHIFT_BSS s32 D_800DC060;
|
||||
SHIFT_BSS StageListRow* gCurrentStagePtr;
|
||||
SHIFT_BSS s32 gBattleState;
|
||||
SHIFT_BSS BattleStatus gBattleStatus;
|
||||
SHIFT_BSS s32 gLastDrawBattleState;
|
||||
SHIFT_BSS s32 D_800DC4D4;
|
||||
SHIFT_BSS s32 gDefeatedBattleSubstate;
|
||||
SHIFT_BSS s32 gBattleSubState;
|
||||
SHIFT_BSS s32 D_800DC4E0;
|
||||
SHIFT_BSS s32 gDefeatedBattleState;
|
||||
SHIFT_BSS s32 gCurrentBattleID;
|
||||
SHIFT_BSS s32 gCurrentStageID;
|
||||
SHIFT_BSS s32 D_800DC4F0;
|
||||
SHIFT_BSS Battle* gOverrideBattlePtr;
|
||||
SHIFT_BSS s32 D_800DC4F8;
|
||||
SHIFT_BSS Battle* gCurrentBattlePtr;
|
||||
extern s32 D_800DC060;
|
||||
extern StageListRow* gCurrentStagePtr;
|
||||
extern s32 gBattleState;
|
||||
extern BattleStatus gBattleStatus;
|
||||
extern s32 gLastDrawBattleState;
|
||||
extern s32 D_800DC4D4;
|
||||
extern s32 gDefeatedBattleSubstate;
|
||||
extern s32 gBattleSubState;
|
||||
extern s32 D_800DC4E0;
|
||||
extern s32 gDefeatedBattleState;
|
||||
extern s32 gCurrentBattleID;
|
||||
extern s32 gCurrentStageID;
|
||||
extern s32 D_800DC4F0;
|
||||
extern Battle* gOverrideBattlePtr;
|
||||
extern s32 D_800DC4F8;
|
||||
extern Battle* gCurrentBattlePtr;
|
||||
|
||||
// standard battle area table entry
|
||||
#define BTL_AREA(id, jpName) { \
|
||||
|
@ -254,10 +254,14 @@ typedef struct PlayerCelebrationAnimOptions {
|
||||
/* 0x04 */ s32 options[80];
|
||||
} PlayerCelebrationAnimOptions; // size = 0x8
|
||||
|
||||
#ifndef NO_EXTERN_VARIABLES
|
||||
|
||||
extern Battle* gCurrentBattlePtr;
|
||||
|
||||
extern ActorOffsets bActorOffsets[];
|
||||
|
||||
#endif
|
||||
|
||||
void func_80072BCC(s32 arg0);
|
||||
void load_demo_battle(u32 index);
|
||||
Actor* create_actor(Formation formation);
|
||||
|
25
src/battle/battle_bss.c
Normal file
25
src/battle/battle_bss.c
Normal file
@ -0,0 +1,25 @@
|
||||
#define NO_EXTERN_VARIABLES
|
||||
#include "common.h"
|
||||
#include "battle/battle.h"
|
||||
|
||||
//
|
||||
// battle.c bss symbols
|
||||
//
|
||||
|
||||
BSS s32 D_800DC060;
|
||||
BSS StageListRow* gCurrentStagePtr;
|
||||
BSS s32 gBattleState;
|
||||
BSS s32 D_800DC06C;
|
||||
BSS BattleStatus gBattleStatus;
|
||||
BSS s32 gLastDrawBattleState;
|
||||
BSS s32 D_800DC4D4;
|
||||
BSS s32 gDefeatedBattleSubstate;
|
||||
BSS s32 gBattleSubState;
|
||||
BSS s32 D_800DC4E0;
|
||||
BSS s32 gDefeatedBattleState;
|
||||
BSS s32 gCurrentBattleID;
|
||||
BSS s32 gCurrentStageID;
|
||||
BSS s32 D_800DC4F0;
|
||||
BSS Battle* gOverrideBattlePtr;
|
||||
BSS s32 D_800DC4F8;
|
||||
BSS Battle* gCurrentBattlePtr;
|
19
src/bss/engine1_post_bss.c
Normal file
19
src/bss/engine1_post_bss.c
Normal file
@ -0,0 +1,19 @@
|
||||
#define NO_EXTERN_VARIABLES
|
||||
#include "common.h"
|
||||
// DON'T DARE to put include headers here containing extern declarations...
|
||||
// This will ruin the ordering of bss symbols below if you care about matching.
|
||||
|
||||
#ifndef SHIFT
|
||||
|
||||
BSS PartnerStatus gPartnerStatus;
|
||||
BSS s32 gSpinHistoryPosY[6];
|
||||
BSS s32 gSpinHistoryPosX[6];
|
||||
BSS s32 gSpinHistoryPosZ[6];
|
||||
BSS StatusBar gStatusBar;
|
||||
BSS PlayerStatus gPlayerStatus;
|
||||
BSS PlayerSpinState gPlayerSpinState;
|
||||
BSS s32 D_8010F284[3];
|
||||
BSS PlayerData gPlayerData;
|
||||
BSS s16 gSpinHistoryPosAngle[5];
|
||||
|
||||
#endif
|
38
src/bss/engine1_pre_bss.c
Normal file
38
src/bss/engine1_pre_bss.c
Normal file
@ -0,0 +1,38 @@
|
||||
#define NO_EXTERN_VARIABLES
|
||||
#include "common.h"
|
||||
// DON'T DARE to put include headers here containing extern declarations...
|
||||
// This will ruin the ordering of bss symbols below if you care about matching.
|
||||
|
||||
#ifndef SHIFT
|
||||
|
||||
BSS UNK_FUN_PTR(PulseStoneNotificationCallback);
|
||||
BSS void* D_8010C924;
|
||||
BSS f32 D_8010C928;
|
||||
BSS s32 D_8010C92C;
|
||||
BSS Npc* wPartnerNpc;
|
||||
BSS Entity* TweesterTouchingPlayer;
|
||||
BSS f32 PlayerNormalYaw;
|
||||
BSS UNK_FUN_PTR(ISpyNotificationCallback);
|
||||
BSS UNK_FUN_PTR(TalkNotificationCallback);
|
||||
BSS s32 gSpinHistoryBufferPos;
|
||||
BSS s32 D_8010C948;
|
||||
BSS s32 NpcHitQueryBehindRightY;
|
||||
BSS s32 D_8010C950;
|
||||
BSS Entity* TweesterTouchingPartner;
|
||||
BSS UNK_FUN_PTR(InteractNotificationCallback);
|
||||
BSS s32 PrevPlayerDirection;
|
||||
BSS f32 JumpedOnSwitchX;
|
||||
BSS s32 D_8010C964;
|
||||
BSS s32 NpcHitQueryBehindCollider;
|
||||
BSS s32 PeachDisguiseNpcIndex;
|
||||
BSS s32 NpcHitQueryAheadY;
|
||||
BSS s32 NpcHitQueryBehindLeftY;
|
||||
BSS s32 NpcHitQueryColliderID;
|
||||
BSS f32 JumpedOnSwitchZ;
|
||||
BSS s32 PlayerRunStateTime;
|
||||
BSS f32 D_8010C984;
|
||||
BSS s32 D_8010C988;
|
||||
BSS s32 NpcHitQueryAheadCollider;
|
||||
BSS f32 PlayerNormalPitch;
|
||||
|
||||
#endif
|
39
src/bss/engine2_post_bss.c
Normal file
39
src/bss/engine2_post_bss.c
Normal file
@ -0,0 +1,39 @@
|
||||
#define NO_EXTERN_VARIABLES
|
||||
#include "common.h"
|
||||
#include "model.h"
|
||||
#include "overlay.h"
|
||||
// DON'T DARE to put include headers here containing extern declarations...
|
||||
// This will ruin the ordering of bss symbols below if you care about matching.
|
||||
|
||||
#ifndef SHIFT
|
||||
|
||||
// from audio/ambience.c
|
||||
typedef struct {
|
||||
/* 0x0 */ s16 flags;
|
||||
/* 0x2 */ s16 fadeState;
|
||||
/* 0x4 */ s32 fadeTime;
|
||||
/* 0x8 */ s32 soundID;
|
||||
/* 0xC */ s32 unkC;
|
||||
} AmbientSoundSettings;
|
||||
|
||||
BSS MusicSettings gMusicSettings[2];
|
||||
BSS IMG_BIN D_80159B50[0x200];
|
||||
BSS Window gWindows[64];
|
||||
BSS CollisionStatus gCollisionStatus;
|
||||
BSS HiddenPanelsData gCurrentHiddenPanels;
|
||||
BSS s32 _PLS_NAME_ME[2];
|
||||
BSS TextureHandle TextureHandles[128];
|
||||
BSS ScreenOverlay ScreenOverlays[2];
|
||||
BSS AmbientSoundSettings AmbientSoundData;
|
||||
BSS s32 CreateEntityVarArgBuffer[4];
|
||||
BSS PAL_BIN D_8015C7E0[0x10];
|
||||
#if VERSION_IQUE
|
||||
BSS char D_8015C800[0x3C80];
|
||||
#elif VERSION_JP
|
||||
BSS char D_8015C800[0x2880];
|
||||
#else
|
||||
BSS char D_8015C800[0x7800];
|
||||
#endif
|
||||
BSS DisplayContext D_80164000[2];
|
||||
|
||||
#endif
|
56
src/bss/engine2_pre_bss.c
Normal file
56
src/bss/engine2_pre_bss.c
Normal file
@ -0,0 +1,56 @@
|
||||
#define NO_EXTERN_VARIABLES
|
||||
#include "common.h"
|
||||
#include "model.h"
|
||||
#include "hud_element.h"
|
||||
// DON'T DARE to put include headers here containing extern declarations...
|
||||
// This will ruin the ordering of bss symbols below if you care about matching.
|
||||
|
||||
#ifndef SHIFT
|
||||
|
||||
BSS SpriteShadingProfile* gAuxSpriteShadingProfile;
|
||||
BSS s32 gHudElementsNumber;
|
||||
BSS ModelCustomGfxBuilderList* gCurrentCustomModelGfxBuildersPtr;
|
||||
BSS s32 D_801512BC;
|
||||
BSS s32 entity_numEntities;
|
||||
BSS s32 gEntityHeapBase;
|
||||
BSS HudCacheEntry* gHudElementCacheTableRaster;
|
||||
BSS ModelList* gCurrentModels;
|
||||
BSS HudCacheEntry* gHudElementCacheTablePalette;
|
||||
BSS s32 gAnimCount;
|
||||
BSS s32 gMsgBGScrollAmtX;
|
||||
BSS s32 D_801512DC;
|
||||
BSS ModelTransformGroupList* gCurrentTransformGroups;
|
||||
BSS u16 gMsgGlobalWaveCounter;
|
||||
BSS ModelCustomGfxList* gCurrentCustomModelGfxPtr;
|
||||
BSS s32 gLastCreatedEntityIndex;
|
||||
BSS u8* gBackgroundTintModePtr;
|
||||
BSS MessageImageData* gMsgVarImages[1];
|
||||
BSS s32 ItemEntitiesCreated;
|
||||
BSS ModelNode** gCurrentModelTreeRoot;
|
||||
BSS s32 gEntityHeapBottom;
|
||||
BSS s32 D_80151304;
|
||||
BSS u16 gCurrentRoomDoorSounds;
|
||||
BSS s32 gMsgBGScrollAmtY;
|
||||
BSS s32 gEntityHideMode;
|
||||
BSS u8* gHudElementCacheBuffer;
|
||||
BSS s32 gEntityModelCount;
|
||||
BSS u8* D_8015131C;
|
||||
BSS s32 D_80151320;
|
||||
BSS s32 entity_numShadows;
|
||||
BSS SpriteShadingProfile* gSpriteShadingProfile;
|
||||
BSS s32 isAreaSpecificEntityDataLoaded;
|
||||
BSS s32 entity_updateCounter;
|
||||
BSS s16 gTriggerCount;
|
||||
BSS Gfx* D_80151338;
|
||||
BSS s32* gHudElementCacheSize;
|
||||
BSS u16 gCurrentDoorSounds;
|
||||
BSS s32 D_80151344;
|
||||
#if VERSION_JP
|
||||
BSS s32 D_80151348[4];
|
||||
#elif VERSION_PAL || VERSION_IQUE
|
||||
BSS s32 D_80151348[8];
|
||||
#else
|
||||
BSS s32 D_80151348[12];
|
||||
#endif
|
||||
|
||||
#endif
|
88
src/bss/main_post_bss.c
Normal file
88
src/bss/main_post_bss.c
Normal file
@ -0,0 +1,88 @@
|
||||
#define NO_EXTERN_VARIABLES
|
||||
#include "common.h"
|
||||
#include "PR/osint.h"
|
||||
#include "PR/controller.h"
|
||||
#include "nu/nusys.h"
|
||||
#include "npc.h"
|
||||
#include "effects.h"
|
||||
#include "audio.h"
|
||||
// DON'T DARE to put include headers here containing extern declarations...
|
||||
// This will ruin the ordering of bss symbols below if you care about matching.
|
||||
|
||||
#ifndef SHIFT
|
||||
|
||||
//
|
||||
// main segment COMMON/.scommon symbols
|
||||
//
|
||||
|
||||
#if VERSION_IQUE
|
||||
BSS OSIoMesg __osFlashMsg OSALIGNED(8);
|
||||
#endif
|
||||
BSS char wMapTexName[0x18];
|
||||
BSS OSThread __osThreadSave;
|
||||
BSS OSMesgQueue nuContWaitMesgQ;
|
||||
BSS OSPifRam __osContPifRam BBALIGNED(16);
|
||||
BSS EncounterStatus gCurrentEncounter;
|
||||
BSS OSPiHandle __Dom2SpeedParam OSALIGNED(8);
|
||||
BSS OSContStatus nuContStatus[NU_CONT_MAXCONTROLLERS];
|
||||
BSS OSThread D_800B1B90;
|
||||
BSS NUContRmbCtl nuContRmbCtl[NU_CONT_MAXCONTROLLERS];
|
||||
#if VERSION_IQUE
|
||||
BSS u32 __osFlashID[4] OSALIGNED(8);
|
||||
#endif
|
||||
BSS OSContPad nuContData[NU_CONT_MAXCONTROLLERS];
|
||||
BSS Camera gCameras[4] ALIGNED(16);
|
||||
BSS unsigned char D_800B32E0[0x800] ALIGNED(16);
|
||||
BSS unsigned char D_800B3AE0[0x800] ALIGNED(16);
|
||||
BSS CollisionData gCollisionData;
|
||||
BSS OSMesgQueue nuGfxMesgQ;
|
||||
BSS OSPiHandle __CartRomHandle OSALIGNED(8);
|
||||
BSS OSMesgQueue __osPiAccessQueue OSALIGNED(8);
|
||||
BSS EffectInstance* gEffectInstances[96] ALIGNED(8);
|
||||
BSS OSPiHandle __Dom1SpeedParam OSALIGNED(8);
|
||||
BSS u8 nuBootStack[0x2000] ALIGNED(8);
|
||||
BSS u64 nuMainStack[NU_SC_STACK_SIZE / sizeof(u64)];
|
||||
BSS u8 nuYieldBuf[NU_GFX_YIELD_BUF_SIZE];
|
||||
BSS AuSynDriver auSynDriver;
|
||||
BSS s32 D_800B91D0[NU_GFX_RDP_OUTPUTBUFF_SIZE / sizeof(u32)] ALIGNED(16);
|
||||
#if VERSION_IQUE
|
||||
BSS OSPiHandle __osFlashHandler OSALIGNED(8);
|
||||
#endif
|
||||
BSS CollisionData gZoneCollisionData ALIGNED(8);
|
||||
#if VERSION_JP || VERSION_IQUE
|
||||
BSS char wMapHitName[0x14];
|
||||
#else
|
||||
BSS char wMapHitName[0x18];
|
||||
#endif
|
||||
BSS OSMesgQueue nuSiMgrMesgQ;
|
||||
BSS OSTimer __osBaseTimer;
|
||||
BSS char wMapShapeName[0x18];
|
||||
BSS ALHeap nuAuHeap;
|
||||
#if VERSION_IQUE
|
||||
BSS OSMesgQueue __osFlashMessageQ OSALIGNED(8);
|
||||
#endif
|
||||
BSS OSTimer __osEepromTimer;
|
||||
BSS NUScTask nuGfxTask[NU_GFX_TASK_NUM];
|
||||
BSS SaveGlobals gSaveGlobals;
|
||||
BSS char wMapBgName[0x14];
|
||||
BSS __OSInode __osPfsInodeCache OSALIGNED(8);
|
||||
#if !VERSION_IQUE
|
||||
BSS u8 rspbootUcodeBuffer[0x100] ALIGNED(16);
|
||||
BSS char D_800D9880[0x700];
|
||||
#endif
|
||||
BSS __OSEventState __osEventStateTab[OS_NUM_EVENTS];
|
||||
BSS OSPifRam __osPfsPifRam BBALIGNED(16);
|
||||
BSS u64 D_800DA040[0x400 / sizeof(u64)];
|
||||
BSS NUSched nusched;
|
||||
BSS OSMesgQueue __osEepromTimerQ OSALIGNED(8);
|
||||
BSS OSPfs nuContPfs[NU_CONT_MAXCONTROLLERS];
|
||||
BSS OSMesgQueue nuSiMesgQ;
|
||||
BSS OSMesgQueue D_800DAC90;
|
||||
BSS OSMesgQueue __osSiAccessQueue OSALIGNED(8);
|
||||
#ifdef BBPLAYER
|
||||
BSS u8 __osBbFlashBuffer[0x80];
|
||||
#endif
|
||||
BSS SaveData gCurrentSaveFile;
|
||||
BSS OSMesgQueue nuContDataMutexQ;
|
||||
|
||||
#endif
|
89
src/bss/main_pre_bss.c
Normal file
89
src/bss/main_pre_bss.c
Normal file
@ -0,0 +1,89 @@
|
||||
#define NO_EXTERN_VARIABLES
|
||||
#include "common.h"
|
||||
#include "audio.h"
|
||||
#include "model.h"
|
||||
// DON'T DARE to put include headers here containing extern declarations...
|
||||
// This will ruin the ordering of bss symbols below if you care about matching.
|
||||
|
||||
#ifndef SHIFT
|
||||
|
||||
//
|
||||
// Main segment COMMON/.scommon symbols
|
||||
//
|
||||
|
||||
BSS u8 nuScPreNMIFlag;
|
||||
BSS s32 D_8009A5B4;
|
||||
BSS s32 D_8009A5B8;
|
||||
BSS s32 D_8009A5BC;
|
||||
#if VERSION_IQUE
|
||||
BSS s32 __osFlashVersion;
|
||||
#endif
|
||||
BSS AuGlobals* gSoundGlobals;
|
||||
BSS s32 D_8009A5C4;
|
||||
BSS u32 __osBaseCounter;
|
||||
BSS BGMPlayer* gBGMPlayerC;
|
||||
BSS s32 gEncounterSubState;
|
||||
#ifdef BBPLAYER
|
||||
BSS u32 __osBbRCountWraps;
|
||||
#endif
|
||||
BSS void *CurrentSefCmdHandler;
|
||||
BSS s32 timeFreezeMode;
|
||||
#ifdef BBPLAYER
|
||||
BSS u32 __osBbLastRCount;
|
||||
#endif
|
||||
BSS u16* nuGfxZBuffer;
|
||||
BSS u32 nuContDataLockKey;
|
||||
BSS u32 __osViIntrCount;
|
||||
BSS AuCallback BeginSoundUpdateCallback;
|
||||
BSS f32 D_8009A5EC;
|
||||
BSS u32 nuGfxCfbCounter;
|
||||
BSS ModelTreeInfoList* gCurrentModelTreeNodeInfo;
|
||||
BSS u32 nuGfxDisplay;
|
||||
BSS BGMPlayer* gBGMPlayerB;
|
||||
BSS s32 gEncounterState;
|
||||
BSS s16 gNpcCount;
|
||||
BSS u8 __osMaxControllers;
|
||||
#if VERSION_IQUE
|
||||
BSS OSMesg __osFlashMsgBuf;
|
||||
#endif
|
||||
BSS OSTime __osCurrentTime;
|
||||
BSS NUUcode* nuGfxUcode;
|
||||
BSS u32 nuContNum;
|
||||
#ifdef BBPLAYER
|
||||
BSS u32 __osBbLastVCount;
|
||||
#endif
|
||||
BSS volatile u32 nuGfxTaskSpool;
|
||||
BSS u8 __osContLastCmd;
|
||||
BSS OSMesg __osEepromTimerMsg;
|
||||
BSS s32 D_8009A624;
|
||||
BSS AmbienceManager* gAuAmbienceManager;
|
||||
BSS u32 __osTimerCounter;
|
||||
BSS void (*nuIdleFunc)(void);
|
||||
BSS s16 gCurrentCamID;
|
||||
BSS OSPiHandle* nuPiCartHandle;
|
||||
#ifdef BBPLAYER
|
||||
BSS u32 __osBbVCountWraps;
|
||||
#endif
|
||||
BSS s8 D_8009A63C;
|
||||
BSS SoundManager* gSoundManager;
|
||||
BSS s32 D_8009A644;
|
||||
BSS s32 D_8009A648;
|
||||
BSS u16* nuGfxCfb_ptr;
|
||||
BSS s32 gOverrideFlags;
|
||||
BSS s8 HasPreBattleSongPushed;
|
||||
BSS u16** nuGfxCfb;
|
||||
BSS s32 D_8009A65C;
|
||||
BSS u32 __osFinalrom;
|
||||
BSS BGMPlayer* gBGMPlayerA;
|
||||
BSS s16 gFirstStrikeMessagePos;
|
||||
BSS Gfx* gMainGfxPos;
|
||||
BSS s8 D_8009A670;
|
||||
BSS DisplayContext* gDisplayContext;
|
||||
BSS s32 D_8009A678;
|
||||
BSS s32 D_8009A67C;
|
||||
#if VERSION_IQUE
|
||||
BSS s32 D_80099258[2];
|
||||
#endif
|
||||
BSS u16* ResetFrameBufferArray;
|
||||
|
||||
#endif
|
@ -8,12 +8,12 @@ void render_models(void);
|
||||
void execute_render_tasks(void);
|
||||
void render_item_entities(void);
|
||||
|
||||
SHIFT_BSS f32 D_8009A5EC;
|
||||
SHIFT_BSS s16 gCurrentCamID;
|
||||
SHIFT_BSS u16* nuGfxCfb_ptr;
|
||||
SHIFT_BSS Gfx* gMainGfxPos;
|
||||
SHIFT_BSS DisplayContext* gDisplayContext;
|
||||
SHIFT_BSS Camera gCameras[4];
|
||||
f32 D_8009A5EC;
|
||||
s16 gCurrentCamID;
|
||||
u16* nuGfxCfb_ptr;
|
||||
Gfx* gMainGfxPos;
|
||||
DisplayContext* gDisplayContext;
|
||||
Camera gCameras[4];
|
||||
|
||||
void update_cameras(void) {
|
||||
s32 i;
|
||||
|
@ -1,11 +1,11 @@
|
||||
#include "common.h"
|
||||
|
||||
SHIFT_BSS CamConfiguration gCurrentCamConfiguration;
|
||||
SHIFT_BSS f32 D_800A08DC;
|
||||
SHIFT_BSS f32 D_800A08E0;
|
||||
SHIFT_BSS f32 D_800A08E4;
|
||||
SHIFT_BSS f32 D_800A08E8;
|
||||
SHIFT_BSS f32 D_800A08EC;
|
||||
BSS CamConfiguration gCurrentCamConfiguration;
|
||||
BSS f32 D_800A08DC;
|
||||
BSS f32 D_800A08E0;
|
||||
BSS f32 D_800A08E4;
|
||||
BSS f32 D_800A08E8;
|
||||
BSS f32 D_800A08EC;
|
||||
|
||||
void cam_interp_lookat_pos(Camera* camera, f32 arg1, f32 arg2, s16 arg3);
|
||||
void func_8003034C(Camera* camera);
|
||||
|
@ -32,23 +32,24 @@ typedef struct HitAssetCollider {
|
||||
/* 0x08 */ s32 trianglesOffset;
|
||||
} HitAssetCollider; // size = 0x0C
|
||||
|
||||
SHIFT_BSS CollisionData gCollisionData;
|
||||
SHIFT_BSS CollisionData gZoneCollisionData;
|
||||
SHIFT_BSS f32 gCollisionRayStartX;
|
||||
SHIFT_BSS f32 gCollisionRayStartY;
|
||||
SHIFT_BSS f32 gCollisionRayStartZ;
|
||||
SHIFT_BSS f32 gCollisionRayDirX;
|
||||
SHIFT_BSS f32 gCollisionRayDirY;
|
||||
SHIFT_BSS f32 gCollisionRayDirZ;
|
||||
SHIFT_BSS f32 gCollisionPointX;
|
||||
SHIFT_BSS f32 gCollisionPointY;
|
||||
SHIFT_BSS f32 gCollisionPointZ;
|
||||
SHIFT_BSS f32 gCollisionRayLength;
|
||||
SHIFT_BSS f32 gCollisionNormalX;
|
||||
SHIFT_BSS f32 gCollisionNormalY;
|
||||
SHIFT_BSS f32 gCollisionNormalZ;
|
||||
SHIFT_BSS ColliderBackupEntry* gCollisionDataBackup;
|
||||
SHIFT_BSS ColliderBackupEntry* gCollisionDataZoneBackup;
|
||||
CollisionData gCollisionData;
|
||||
CollisionData gZoneCollisionData;
|
||||
|
||||
BSS f32 gCollisionRayStartX;
|
||||
BSS f32 gCollisionRayStartY;
|
||||
BSS f32 gCollisionRayStartZ;
|
||||
BSS f32 gCollisionRayDirX;
|
||||
BSS f32 gCollisionRayDirY;
|
||||
BSS f32 gCollisionRayDirZ;
|
||||
BSS f32 gCollisionPointX;
|
||||
BSS f32 gCollisionPointY;
|
||||
BSS f32 gCollisionPointZ;
|
||||
BSS f32 gCollisionRayLength;
|
||||
BSS f32 gCollisionNormalX;
|
||||
BSS f32 gCollisionNormalY;
|
||||
BSS f32 gCollisionNormalZ;
|
||||
BSS ColliderBackupEntry* gCollisionDataBackup;
|
||||
BSS ColliderBackupEntry* gCollisionDataZoneBackup;
|
||||
|
||||
extern Vec3s gEntityColliderFaces[];
|
||||
extern Vec3f gEntityColliderNormals[];
|
||||
|
@ -15,7 +15,7 @@ typedef struct {
|
||||
/* 0x9D2 */ u16 height;
|
||||
} CrashScreen; // size = 0x9D4
|
||||
|
||||
SHIFT_BSS CrashScreen gCrashScreen;
|
||||
BSS CrashScreen gCrashScreen;
|
||||
|
||||
u8 gCrashScreencharToGlyph[128] = {
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
|
@ -202,12 +202,12 @@ Gfx NoControllerGfx[] = {
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
SHIFT_BSS Mtx D_8009BAA8[2];
|
||||
SHIFT_BSS f32 gCurtainScale;
|
||||
SHIFT_BSS f32 gCurtainScaleGoal;
|
||||
SHIFT_BSS f32 gCurtainFade;
|
||||
SHIFT_BSS f32 gCurtainFadeGoal;
|
||||
SHIFT_BSS UNK_FUN_PTR(gCurtainDrawCallback);
|
||||
BSS f32 gCurtainScale;
|
||||
BSS f32 gCurtainScaleGoal;
|
||||
BSS f32 gCurtainFade;
|
||||
BSS f32 gCurtainFadeGoal;
|
||||
BSS UNK_FUN_PTR(gCurtainDrawCallback);
|
||||
BSS Mtx D_8009BAA8[2];
|
||||
|
||||
void initialize_curtains(void) {
|
||||
gCurtainDrawCallback = NULL;
|
||||
|
@ -13,7 +13,7 @@ typedef struct DefaultWindowStyle {
|
||||
} DefaultWindowStyle; // size = 0x0B
|
||||
|
||||
#define BOX_QUAD_BUFFER_NUM 21
|
||||
SHIFT_BSS Vtx gBoxQuadBuffer[BOX_QUAD_BUFFER_NUM][16];
|
||||
BSS Vtx gBoxQuadBuffer[BOX_QUAD_BUFFER_NUM][16];
|
||||
|
||||
DefaultWindowStyle gBoxDefaultStyles[] = {
|
||||
{
|
||||
|
@ -5,8 +5,8 @@
|
||||
typedef s32 TlbEntry[0x1000 / 4];
|
||||
typedef TlbEntry TlbMappablePage[15];
|
||||
|
||||
SHIFT_BSS EffectGraphics gEffectGraphicsData[15];
|
||||
SHIFT_BSS EffectInstance* gEffectInstances[96];
|
||||
BSS EffectGraphics gEffectGraphicsData[15];
|
||||
EffectInstance* gEffectInstances[96];
|
||||
|
||||
extern TlbMappablePage D_80197000;
|
||||
extern Addr D_801A6000;
|
||||
|
@ -168,21 +168,22 @@ EvtScript EnemyNpcDefeat = {
|
||||
End
|
||||
};
|
||||
|
||||
SHIFT_BSS s32 gEncounterState;
|
||||
SHIFT_BSS s32 gEncounterSubState;
|
||||
SHIFT_BSS EncounterStatus gCurrentEncounter;
|
||||
SHIFT_BSS s8 D_8009A63C;
|
||||
SHIFT_BSS s8 HasPreBattleSongPushed;
|
||||
SHIFT_BSS s16 gFirstStrikeMessagePos;
|
||||
SHIFT_BSS s8 D_8009A670;
|
||||
SHIFT_BSS s32 D_8009A678;
|
||||
SHIFT_BSS s32 D_800A0BA0;
|
||||
SHIFT_BSS f32 D_800A0BA4;
|
||||
SHIFT_BSS Evt* D_800A0BB0;
|
||||
SHIFT_BSS s32 D_800A0BB4;
|
||||
SHIFT_BSS s16 D_800A0BB8;
|
||||
SHIFT_BSS EffectInstance* WorldMerleeOrbEffect;
|
||||
SHIFT_BSS EffectInstance* WorldMerleeWaveEffect;
|
||||
s32 gEncounterState;
|
||||
s32 gEncounterSubState;
|
||||
EncounterStatus gCurrentEncounter;
|
||||
s8 D_8009A63C;
|
||||
s8 HasPreBattleSongPushed;
|
||||
s16 gFirstStrikeMessagePos;
|
||||
s8 D_8009A670;
|
||||
s32 D_8009A678;
|
||||
|
||||
BSS s32 D_800A0BA0;
|
||||
BSS f32 D_800A0BA4;
|
||||
BSS EffectInstance* WorldMerleeOrbEffect;
|
||||
BSS EffectInstance* WorldMerleeWaveEffect;
|
||||
BSS Evt* D_800A0BB0;
|
||||
BSS s32 D_800A0BB4;
|
||||
BSS s16 D_800A0BB8;
|
||||
|
||||
void set_battle_formation(Battle*);
|
||||
void setup_status_bar_for_world(void);
|
||||
|
52
src/entity.c
52
src/entity.c
@ -31,36 +31,38 @@ extern Addr entity_sbk_omo_ROM_START;
|
||||
|
||||
s32 D_8014AFB0 = 255;
|
||||
|
||||
SHIFT_BSS s32 CreateEntityVarArgBuffer[4];
|
||||
SHIFT_BSS HiddenPanelsData gCurrentHiddenPanels;
|
||||
SHIFT_BSS s32 gEntityHideMode;
|
||||
s32 CreateEntityVarArgBuffer[4];
|
||||
HiddenPanelsData gCurrentHiddenPanels;
|
||||
s32 gEntityHideMode;
|
||||
|
||||
SHIFT_BSS s32 D_801516FC;
|
||||
SHIFT_BSS s32 D_801512BC;
|
||||
SHIFT_BSS s32 D_80151304;
|
||||
SHIFT_BSS s32 D_80151344;
|
||||
SHIFT_BSS s32 entity_numEntities;
|
||||
SHIFT_BSS s32 gEntityHeapBase;
|
||||
SHIFT_BSS s32 gLastCreatedEntityIndex;
|
||||
s32 D_801512BC;
|
||||
s32 D_80151304;
|
||||
s32 D_80151344;
|
||||
s32 entity_numEntities;
|
||||
s32 gEntityHeapBase;
|
||||
s32 gLastCreatedEntityIndex;
|
||||
|
||||
SHIFT_BSS s32 gEntityHeapBottom;
|
||||
SHIFT_BSS s32 entity_numShadows;
|
||||
SHIFT_BSS s32 isAreaSpecificEntityDataLoaded;
|
||||
SHIFT_BSS s32 entity_updateCounter;
|
||||
s32 gEntityHeapBottom;
|
||||
s32 entity_numShadows;
|
||||
s32 isAreaSpecificEntityDataLoaded;
|
||||
s32 entity_updateCounter;
|
||||
|
||||
SHIFT_BSS s32 wEntityDataLoadedSize;
|
||||
SHIFT_BSS s32 bEntityDataLoadedSize;
|
||||
BSS EntityList gWorldEntityList;
|
||||
BSS EntityList gBattleEntityList;
|
||||
BSS EntityList* gCurrentEntityListPtr;
|
||||
BSS s32 D_80151474;
|
||||
BSS ShadowList gWorldShadowList;
|
||||
BSS ShadowList gBattleShadowList;
|
||||
BSS ShadowList* gCurrentShadowListPtr;
|
||||
|
||||
SHIFT_BSS EntityBlueprint* wEntityBlueprint[30];
|
||||
SHIFT_BSS EntityBlueprint* bEntityBlueprint[4];
|
||||
BSS s32 wEntityDataLoadedSize;
|
||||
BSS s32 bEntityDataLoadedSize;
|
||||
BSS s32 D_80151664;
|
||||
|
||||
SHIFT_BSS EntityList gWorldEntityList;
|
||||
SHIFT_BSS EntityList gBattleEntityList;
|
||||
SHIFT_BSS EntityList* gCurrentEntityListPtr;
|
||||
|
||||
SHIFT_BSS ShadowList gWorldShadowList;
|
||||
SHIFT_BSS ShadowList gBattleShadowList;
|
||||
SHIFT_BSS ShadowList* gCurrentShadowListPtr;
|
||||
BSS EntityBlueprint* wEntityBlueprint[MAX_ENTITIES + 2];
|
||||
BSS EntityBlueprint* bEntityBlueprint[4];
|
||||
BSS s32 D_801516F8;
|
||||
BSS s32 D_801516FC;
|
||||
|
||||
extern Addr BattleEntityHeapBottom; // todo ???
|
||||
|
||||
|
@ -7,19 +7,20 @@ EntityModelScript D_8014C260 = {
|
||||
};
|
||||
Lights1 D_8014C268 = gdSPDefLights1(255, 255, 255, 0, 0, 0, 0, 0, 0);
|
||||
|
||||
SHIFT_BSS EntityModelList gWorldEntityModelList;
|
||||
SHIFT_BSS EntityModelList gBattleEntityModelList;
|
||||
SHIFT_BSS EntityModelList* gCurrentEntityModelList;
|
||||
SHIFT_BSS s32 gEntityModelCount;
|
||||
s32 gEntityModelCount;
|
||||
|
||||
SHIFT_BSS s32 D_80154374;
|
||||
SHIFT_BSS s32 entity_fog_enabled;
|
||||
SHIFT_BSS s32 entity_fog_red;
|
||||
SHIFT_BSS s32 entity_fog_green;
|
||||
SHIFT_BSS s32 entity_fog_blue;
|
||||
SHIFT_BSS s32 entity_fog_alpha;
|
||||
SHIFT_BSS s32 entity_fog_dist_min;
|
||||
SHIFT_BSS s32 entity_fog_dist_max;
|
||||
BSS EntityModelList gWorldEntityModelList;
|
||||
BSS EntityModelList gBattleEntityModelList;
|
||||
BSS EntityModelList* gCurrentEntityModelList;
|
||||
|
||||
BSS s32 D_80154374;
|
||||
BSS s32 entity_fog_enabled;
|
||||
BSS s32 entity_fog_red;
|
||||
BSS s32 entity_fog_green;
|
||||
BSS s32 entity_fog_blue;
|
||||
BSS s32 entity_fog_alpha;
|
||||
BSS s32 entity_fog_dist_min;
|
||||
BSS s32 entity_fog_dist_max;
|
||||
|
||||
extern Gfx Gfx_RM1_SURFACE_OPA[];
|
||||
extern Gfx Gfx_RM1_DECAL_OPA[];
|
||||
|
@ -4,8 +4,8 @@
|
||||
#include "world/partners.h"
|
||||
#include "sprite/player.h"
|
||||
|
||||
SHIFT_BSS PlayerStatus gPlayerStatus;
|
||||
SHIFT_BSS PlayerData gPlayerData;
|
||||
extern PlayerStatus gPlayerStatus;
|
||||
extern PlayerData gPlayerData;
|
||||
|
||||
extern Npc playerNpcData;
|
||||
extern u16 PlayerImgFXFlags;
|
||||
|
13
src/fio.c
13
src/fio.c
@ -10,12 +10,13 @@ typedef struct SaveInfo {
|
||||
#define GLOBALS_PAGE_1 6
|
||||
#define GLOBALS_PAGE_2 7
|
||||
|
||||
SHIFT_BSS SaveData FetchSaveBuffer;
|
||||
SHIFT_BSS SaveInfo LogicalSaveInfo[4]; // 4 save slots presented to the player
|
||||
SHIFT_BSS SaveInfo PhysicalSaveInfo[6]; // 6 saves as represented on the EEPROM
|
||||
SHIFT_BSS s32 NextAvailablePhysicalSave;
|
||||
SHIFT_BSS SaveGlobals gSaveGlobals;
|
||||
SHIFT_BSS SaveData gCurrentSaveFile;
|
||||
BSS SaveData FetchSaveBuffer;
|
||||
BSS SaveInfo LogicalSaveInfo[4]; // 4 save slots presented to the player
|
||||
BSS SaveInfo PhysicalSaveInfo[6]; // 6 saves as represented on the EEPROM
|
||||
BSS s32 NextAvailablePhysicalSave;
|
||||
|
||||
SaveGlobals gSaveGlobals;
|
||||
SaveData gCurrentSaveFile;
|
||||
|
||||
char MagicSaveString[] = "Mario Story 006";
|
||||
|
||||
|
@ -256,7 +256,7 @@ GameMode* gameModeMap[] = {
|
||||
[GAME_MODE_DEMO] (GameMode*) &GameModeDemo,
|
||||
};
|
||||
|
||||
SHIFT_BSS s16 CurGameMode;
|
||||
BSS s16 CurGameMode;
|
||||
|
||||
void set_game_mode(s16 mode) {
|
||||
CurGameMode = mode;
|
||||
|
@ -1,7 +1,8 @@
|
||||
#include "common.h"
|
||||
#include "game_modes.h"
|
||||
|
||||
SHIFT_BSS GameMode gMainGameMode[2];
|
||||
BSS GameMode gMainGameMode[2];
|
||||
BSS s32 D_80151730[4]; // unused? or probably a part of GameMode?
|
||||
|
||||
void mode_default_nop(void) {
|
||||
}
|
||||
|
@ -100,23 +100,26 @@ Vtx D_8014F0C8[] = {
|
||||
|
||||
Lights1 HudElementLights = gdSPDefLights1(255, 255, 255, 0, 0, 0, 0, 0, 0);
|
||||
|
||||
SHIFT_BSS s32 gHudElementsNumber;
|
||||
SHIFT_BSS s32 D_80159180;
|
||||
SHIFT_BSS HudElementList* gHudElements;
|
||||
SHIFT_BSS HudElementList gHudElementsWorld;
|
||||
SHIFT_BSS HudElementList gHudElementsBattle;
|
||||
SHIFT_BSS s32* gHudElementCacheSize;
|
||||
SHIFT_BSS s32 gHudElementCacheSizeWorld;
|
||||
SHIFT_BSS s32 gHudElementCacheSizeBattle;
|
||||
SHIFT_BSS HudCacheEntry* gHudElementCacheTableRaster;
|
||||
SHIFT_BSS HudCacheEntry* gHudElementCacheTablePalette;
|
||||
SHIFT_BSS HudCacheEntry gHudElementCacheTableRasterWorld[192];
|
||||
SHIFT_BSS HudCacheEntry gHudElementCacheTablePaletteWorld[192];
|
||||
SHIFT_BSS HudCacheEntry gHudElementCacheTableRasterBattle[192];
|
||||
SHIFT_BSS HudCacheEntry gHudElementCacheTablePaletteBattle[192];
|
||||
SHIFT_BSS u8* gHudElementCacheBufferWorld;
|
||||
SHIFT_BSS u8* gHudElementCacheBufferBattle;
|
||||
SHIFT_BSS u8* gHudElementCacheBuffer;
|
||||
s32 gHudElementsNumber;
|
||||
HudCacheEntry* gHudElementCacheTableRaster;
|
||||
HudCacheEntry* gHudElementCacheTablePalette;
|
||||
s32* gHudElementCacheSize;
|
||||
u8* gHudElementCacheBuffer;
|
||||
|
||||
BSS HudElementList gHudElementsWorld;
|
||||
BSS HudElementList gHudElementsBattle;
|
||||
BSS HudElementList* gHudElements;
|
||||
BSS u8* gHudElementCacheBufferWorld;
|
||||
BSS s32 gHudElementCacheSizeWorld;
|
||||
BSS s32 D_8015796C;
|
||||
BSS HudCacheEntry gHudElementCacheTableRasterWorld[192];
|
||||
BSS HudCacheEntry gHudElementCacheTablePaletteWorld[192];
|
||||
BSS u8* gHudElementCacheBufferBattle;
|
||||
BSS s32 gHudElementCacheSizeBattle;
|
||||
BSS s32 D_80158578[2];
|
||||
BSS HudCacheEntry gHudElementCacheTableRasterBattle[192];
|
||||
BSS HudCacheEntry gHudElementCacheTablePaletteBattle[192];
|
||||
BSS s32 D_80159180;
|
||||
|
||||
void func_801413F8(void);
|
||||
|
||||
|
22
src/imgfx.c
22
src/imgfx.c
@ -113,16 +113,18 @@ typedef ImgFXState ImgFXInstanceList[MAX_IMGFX_INSTANCES];
|
||||
|
||||
extern HeapNode heap_spriteHead;
|
||||
|
||||
SHIFT_BSS ImgFXWorkingTexture ImgFXCurrentTexture;
|
||||
SHIFT_BSS Vtx* ImgFXVtxBuffers[2];
|
||||
SHIFT_BSS Vtx* imgfx_vtxBuf;
|
||||
SHIFT_BSS ImgFXInstanceList* ImgFXInstances;
|
||||
SHIFT_BSS s8 D_80156958[2];
|
||||
SHIFT_BSS s32 D_80156960[2];
|
||||
SHIFT_BSS s32 D_80156968[2];
|
||||
SHIFT_BSS s8 D_80156970;
|
||||
SHIFT_BSS ImgFXAnimHeader ImgFXAnimHeaders[MAX_IMGFX_INSTANCES];
|
||||
SHIFT_BSS ImgFXCacheEntry ImgFXDataCache[8];
|
||||
BSS ImgFXWorkingTexture ImgFXCurrentTexture;
|
||||
BSS Vtx* ImgFXVtxBuffers[2];
|
||||
BSS Vtx* imgfx_vtxBuf;
|
||||
BSS ImgFXInstanceList* ImgFXInstances;
|
||||
BSS s8 D_80156958[2];
|
||||
BSS s32 D_8015695C;
|
||||
BSS s32 D_80156960[2];
|
||||
BSS s32 D_80156968[2];
|
||||
BSS s8 D_80156970;
|
||||
BSS s32 D_80156974[3];
|
||||
BSS ImgFXAnimHeader ImgFXAnimHeaders[MAX_IMGFX_INSTANCES];
|
||||
BSS ImgFXCacheEntry ImgFXDataCache[8];
|
||||
|
||||
// Data
|
||||
ImgFXWorkingTexture* ImgFXCurrentTexturePtr = &ImgFXCurrentTexture;
|
||||
|
11
src/input.c
11
src/input.c
@ -1,11 +1,12 @@
|
||||
#include "common.h"
|
||||
#include "nu/nusys.h"
|
||||
|
||||
SHIFT_BSS OSContPad D_8009A5B8;
|
||||
SHIFT_BSS s16 D_8009A6A0;
|
||||
SHIFT_BSS s16 D_8009A6A2;
|
||||
SHIFT_BSS s16 D_8009A6A4;
|
||||
SHIFT_BSS s16 D_8009A6A6;
|
||||
OSContPad D_8009A5B8;
|
||||
BSS s16 D_8009A6A0;
|
||||
BSS s16 D_8009A6A2;
|
||||
BSS s16 D_8009A6A4;
|
||||
BSS s16 D_8009A6A6;
|
||||
BSS s32 D_8009A6A8; // unused
|
||||
|
||||
void func_800287F0(void) {
|
||||
gGameStatusPtr->curButtons[0] = 0;
|
||||
|
@ -11,11 +11,8 @@ enum BlinkModes {
|
||||
|
||||
BSS b16 D_8010CD10;
|
||||
BSS b16 D_8010CD12;
|
||||
BSS char D_8010CD14[0xA];
|
||||
BSS s32 D_8010CD20;
|
||||
BSS char D_8010CD24[0xC];
|
||||
|
||||
SHIFT_BSS StatusBar gStatusBar;
|
||||
StatusBar gStatusBar;
|
||||
|
||||
extern HudScript* TimesHudScript;
|
||||
extern HudScript* SPIncrementHudScripts[];
|
||||
|
@ -25,29 +25,32 @@ extern HudCacheEntry* gHudElementCacheTablePalette;
|
||||
extern u8* gHudElementCacheBuffer;
|
||||
extern s32* gHudElementCacheSize;
|
||||
|
||||
SHIFT_BSS s32 ItemEntitiesCreated;
|
||||
SHIFT_BSS s32 UnusedItemPhysicsScriptID;
|
||||
SHIFT_BSS s32 ItemEntityAlternatingSpawn;
|
||||
SHIFT_BSS s32 ItemEntityRenderGroup;
|
||||
SHIFT_BSS s16 CoinSparkleCenterX;
|
||||
SHIFT_BSS s16 CoinSparkleCenterY;
|
||||
SHIFT_BSS s16 CoinSparkleCenterZ;
|
||||
SHIFT_BSS ItemEntity* WorldItemEntities[MAX_ITEM_ENTITIES];
|
||||
SHIFT_BSS ItemEntity* BattleItemEntities[MAX_ITEM_ENTITIES];
|
||||
SHIFT_BSS ItemEntity** gCurrentItemEntities;
|
||||
SHIFT_BSS s16 isPickingUpItem;
|
||||
SHIFT_BSS s16 ItemSpawnWithinPlayerPickupDelay;
|
||||
s32 ItemEntitiesCreated;
|
||||
|
||||
BSS s32 UnusedItemPhysicsScriptID;
|
||||
BSS s32 ItemEntityAlternatingSpawn;
|
||||
BSS s32 ItemEntityRenderGroup;
|
||||
BSS s16 CoinSparkleCenterX;
|
||||
BSS s16 CoinSparkleCenterY;
|
||||
BSS s16 CoinSparkleCenterZ;
|
||||
BSS s32 pad_ItemEntity[3];
|
||||
BSS ItemEntity* WorldItemEntities[MAX_ITEM_ENTITIES];
|
||||
BSS ItemEntity* BattleItemEntities[MAX_ITEM_ENTITIES];
|
||||
BSS ItemEntity** gCurrentItemEntities;
|
||||
BSS s16 isPickingUpItem;
|
||||
BSS s16 ItemSpawnWithinPlayerPickupDelay;
|
||||
#if !VERSION_JP
|
||||
SHIFT_BSS s16 D_801565A8;
|
||||
BSS s16 D_801565A8;
|
||||
BSS s32 D_801565AC;
|
||||
#endif
|
||||
SHIFT_BSS PopupMenu ItemPickupMenu;
|
||||
SHIFT_BSS s32 ItemPickupIconID;
|
||||
SHIFT_BSS s32 ItemPickupStateDelay;
|
||||
SHIFT_BSS s32 ThrowAwayMenuIdx;
|
||||
SHIFT_BSS s32 ThrowAwayItemID;
|
||||
SHIFT_BSS EffectInstance* ItemPickupGotOutline;
|
||||
SHIFT_BSS MessagePrintState* GotItemTutorialPrinter;
|
||||
SHIFT_BSS b32 GotItemTutorialClosed;
|
||||
BSS PopupMenu ItemPickupMenu;
|
||||
BSS s32 ItemPickupIconID;
|
||||
BSS s32 ItemPickupStateDelay;
|
||||
BSS s32 ThrowAwayMenuIdx;
|
||||
BSS s32 ThrowAwayItemID;
|
||||
BSS EffectInstance* ItemPickupGotOutline;
|
||||
BSS MessagePrintState* GotItemTutorialPrinter;
|
||||
BSS b32 GotItemTutorialClosed;
|
||||
|
||||
void item_entity_update(ItemEntity*);
|
||||
void appendGfx_item_entity(void*);
|
||||
|
96
src/main.c
96
src/main.c
@ -1,94 +1,14 @@
|
||||
#include "common.h"
|
||||
#include "nu/nusys.h"
|
||||
|
||||
//
|
||||
// Start of libultra BSS
|
||||
//
|
||||
|
||||
#include "PR/controller.h"
|
||||
#include "PR/osint.h"
|
||||
SHIFT_BSS OSPifRam __osEepPifRam;
|
||||
SHIFT_BSS __OSEventState __osEventStateTab[OS_NUM_EVENTS];
|
||||
SHIFT_BSS OSPifRam __MotorDataBuf[MAXCONTROLLERS];
|
||||
SHIFT_BSS u16 retrace;
|
||||
SHIFT_BSS OSThread viThread;
|
||||
SHIFT_BSS unsigned char viThreadStack[OS_VIM_STACKSIZE] ALIGNED(16);
|
||||
SHIFT_BSS char piThreadStack[OS_PIM_STACKSIZE] ALIGNED(16);
|
||||
SHIFT_BSS OSMesgQueue viEventQueue;
|
||||
SHIFT_BSS OSMesg viEventBuf[5] ALIGNED(8);
|
||||
SHIFT_BSS OSIoMesg viRetraceMsg ALIGNED(8);
|
||||
SHIFT_BSS OSIoMesg viCounterMsg ALIGNED(8);
|
||||
SHIFT_BSS OSTask tmp_task;
|
||||
SHIFT_BSS OSMesg piAccessBuf[1] ALIGNED(16);
|
||||
SHIFT_BSS OSMesgQueue __osPiAccessQueue;
|
||||
SHIFT_BSS OSThread piThread;
|
||||
SHIFT_BSS OSMesgQueue piEventQueue;
|
||||
SHIFT_BSS OSMesg piEventBuf[1];
|
||||
SHIFT_BSS OSContStatus nuContStatus[5]; // ??? enough space for 5, but it makes no sense
|
||||
SHIFT_BSS OSMesgQueue nuSiMesgQ;
|
||||
SHIFT_BSS u32 nuContDataLockKey;
|
||||
SHIFT_BSS OSMesg nuContWaitMesgBuf;
|
||||
SHIFT_BSS OSMesg nuContDataMutexBuf;
|
||||
SHIFT_BSS OSMesgQueue nuContDataMutexQ ALIGNED(16);
|
||||
SHIFT_BSS OSMesgQueue nuContWaitMesgQ;
|
||||
SHIFT_BSS OSContPad nuContData[4];
|
||||
SHIFT_BSS u32 nuContNum;
|
||||
SHIFT_BSS volatile u32 nuGfxTaskSpool;
|
||||
SHIFT_BSS OSMesgQueue nuGfxMesgQ;
|
||||
SHIFT_BSS char GfxStack[NU_GFX_STACK_SIZE] ALIGNED(16);
|
||||
SHIFT_BSS OSThread D_800B1B90;
|
||||
SHIFT_BSS OSMesg nuGfxMesgBuf[NU_GFX_MESGS];
|
||||
SHIFT_BSS OSPiHandle* nuPiCartHandle;
|
||||
SHIFT_BSS NUContRmbCtl nuContRmbCtl[4];
|
||||
SHIFT_BSS OSPfs nuContPfs[4];
|
||||
SHIFT_BSS NUUcode* nuGfxUcode;
|
||||
SHIFT_BSS OSMesgQueue D_800AC5D0;
|
||||
SHIFT_BSS OSMesg D_800AC5E8[NU_PI_MESG_NUM];
|
||||
SHIFT_BSS u32 nuGfxDisplay;
|
||||
SHIFT_BSS u32 nuGfxCfbCounter;
|
||||
SHIFT_BSS NUSched nusched;
|
||||
SHIFT_BSS u8 nuScPreNMIFlag;
|
||||
SHIFT_BSS u64 nuScStack[NU_SC_STACK_SIZE / sizeof(u64)];
|
||||
SHIFT_BSS u64 nuScAudioStack[NU_SC_STACK_SIZE / sizeof(u64)];
|
||||
SHIFT_BSS u64 nuScGraphicsStack[NU_SC_STACK_SIZE / sizeof(u64)];
|
||||
SHIFT_BSS NUIdleFunc nuIdleFunc;
|
||||
SHIFT_BSS OSMesgQueue nuSiMgrMesgQ;
|
||||
SHIFT_BSS OSMesg nuSiMesgBuf[8];
|
||||
SHIFT_BSS OSThread siMgrThread;
|
||||
SHIFT_BSS u64 siMgrStack[NU_SI_STACK_SIZE/sizeof(u64)];
|
||||
SHIFT_BSS OSMesg D_8009E6D0[NU_GFX_TASKMGR_MESGS];
|
||||
SHIFT_BSS OSMesgQueue D_800DAC90;
|
||||
SHIFT_BSS NUScTask* nuGfxTask_ptr;
|
||||
SHIFT_BSS s16 taskDoneMsg;
|
||||
SHIFT_BSS s16 swapBufMsg;
|
||||
SHIFT_BSS OSThread GfxTaskMgrThread;
|
||||
SHIFT_BSS NUScTask nuGfxTask[NU_GFX_TASK_NUM];
|
||||
SHIFT_BSS u64 D_800DA040[0x400 / sizeof(u64)];
|
||||
SHIFT_BSS s32 D_800B91D0[NU_GFX_RDP_OUTPUTBUFF_SIZE / sizeof(u32)];
|
||||
SHIFT_BSS u64 GfxTaskMgrStack[NU_GFX_TASKMGR_STACK_SIZE / sizeof(u64)];
|
||||
SHIFT_BSS u8 nuYieldBuf[0xC10] ALIGNED(16);
|
||||
SHIFT_BSS OSMesg siAccessBuf[1] ALIGNED(8);
|
||||
SHIFT_BSS OSMesgQueue __osSiAccessQueue;
|
||||
SHIFT_BSS OSThread __osThreadSave;
|
||||
|
||||
// boot.s
|
||||
SHIFT_BSS u8 nuBootStack[0x2000] ALIGNED(8);
|
||||
|
||||
//osFlash.c (IDO)
|
||||
SHIFT_BSS u32 __osFlashID[4];
|
||||
SHIFT_BSS OSIoMesg __osFlashMsg;
|
||||
SHIFT_BSS OSMesgQueue __osFlashMessageQ;
|
||||
SHIFT_BSS OSPiHandle __osFlashHandler;
|
||||
SHIFT_BSS OSMesg __osFlashMsgBuf;
|
||||
SHIFT_BSS s32 __osFlashVersion;
|
||||
|
||||
//
|
||||
// End of libultra BSS
|
||||
//
|
||||
// TODO move these somewhere else...
|
||||
u8 nuYieldBuf[NU_GFX_YIELD_BUF_SIZE];
|
||||
OSThread __osThreadSave;
|
||||
u8 nuBootStack[0x2000] ALIGNED(8);
|
||||
|
||||
// used in effects/gfx/flame.c
|
||||
SHIFT_BSS unsigned char D_800B32E0[0x800] ALIGNED(16);
|
||||
SHIFT_BSS unsigned char D_800B3AE0[0x800] ALIGNED(16);
|
||||
unsigned char D_800B32E0[0x800] ALIGNED(16);
|
||||
unsigned char D_800B3AE0[0x800] ALIGNED(16);
|
||||
|
||||
s16 D_80074010 = 8; // might be an array, could be size 1-8
|
||||
|
||||
@ -120,8 +40,8 @@ extern IMG_BIN ResetTilesImg[];
|
||||
#define shim_load_engine_data_obfuscated load_engine_data
|
||||
#endif
|
||||
|
||||
SHIFT_BSS u16* ResetFrameBufferArray;
|
||||
SHIFT_BSS u16* nuGfxZBuffer;
|
||||
u16* ResetFrameBufferArray;
|
||||
u16* nuGfxZBuffer;
|
||||
|
||||
void boot_main(void* data) {
|
||||
#if VERSION_JP
|
||||
|
@ -6,11 +6,12 @@
|
||||
#include "overlay.h"
|
||||
#include "game_modes.h"
|
||||
|
||||
SHIFT_BSS s32 gOverrideFlags;
|
||||
SHIFT_BSS s32 timeFreezeMode;
|
||||
SHIFT_BSS u16** nuGfxCfb;
|
||||
SHIFT_BSS s16 SoftResetDelay;
|
||||
SHIFT_BSS DisplayContext D_80164000[2];
|
||||
s32 gOverrideFlags;
|
||||
s32 timeFreezeMode;
|
||||
u16** nuGfxCfb;
|
||||
BSS s16 SoftResetDelay;
|
||||
|
||||
DisplayContext D_80164000[2];
|
||||
|
||||
s8 gGameStepDelayAmount = 1;
|
||||
s8 gGameStepDelayCount = 5;
|
||||
|
96
src/model.c
96
src/model.c
@ -94,9 +94,9 @@ enum {
|
||||
#define WORLD_TEXTURE_MEMORY_SIZE 0x20000
|
||||
#define BATTLE_TEXTURE_MEMORY_SIZE 0x8000
|
||||
|
||||
SHIFT_BSS u8* gBackgroundTintModePtr; // NOTE: the type for this u8 is TintMode, as shown in SetModelTintMode
|
||||
SHIFT_BSS ModelList* gCurrentModels;
|
||||
SHIFT_BSS ModelTreeInfoList* gCurrentModelTreeNodeInfo;
|
||||
u8* gBackgroundTintModePtr; // NOTE: the type for this u8 is TintMode, as shown in SetModelTintMode
|
||||
ModelList* gCurrentModels;
|
||||
ModelTreeInfoList* gCurrentModelTreeNodeInfo;
|
||||
|
||||
extern Addr TextureHeap;
|
||||
|
||||
@ -1298,56 +1298,60 @@ s32 RenderTaskBasePriorities[] = {
|
||||
|
||||
b8 D_8014C248 = FALSE; // possibly a 'warm-up done' flag for boot. never read.
|
||||
|
||||
SHIFT_BSS ModelCustomGfxBuilderList* gCurrentCustomModelGfxBuildersPtr;
|
||||
SHIFT_BSS ModelNode** gCurrentModelTreeRoot;
|
||||
SHIFT_BSS ModelTransformGroupList* gCurrentTransformGroups;
|
||||
SHIFT_BSS ModelCustomGfxList* gCurrentCustomModelGfxPtr;
|
||||
ModelCustomGfxBuilderList* gCurrentCustomModelGfxBuildersPtr;
|
||||
ModelNode** gCurrentModelTreeRoot;
|
||||
ModelTransformGroupList* gCurrentTransformGroups;
|
||||
ModelCustomGfxList* gCurrentCustomModelGfxPtr;
|
||||
|
||||
SHIFT_BSS TextureHeader gCurrentTextureHeader ALIGNED(16);
|
||||
BSS TextureHeader gCurrentTextureHeader ALIGNED(16);
|
||||
|
||||
SHIFT_BSS ModelList wModelList;
|
||||
SHIFT_BSS ModelList bModelList;
|
||||
BSS ModelList wModelList;
|
||||
BSS ModelList bModelList;
|
||||
|
||||
SHIFT_BSS ModelTransformGroupList wTransformGroups;
|
||||
SHIFT_BSS ModelTransformGroupList bTransformGroups;
|
||||
BSS ModelTransformGroupList wTransformGroups;
|
||||
BSS ModelTransformGroupList bTransformGroups;
|
||||
|
||||
SHIFT_BSS ModelCustomGfxList wCustomModelGfx;
|
||||
SHIFT_BSS ModelCustomGfxList bCustomModelGfx;
|
||||
BSS ModelCustomGfxList wCustomModelGfx;
|
||||
BSS ModelCustomGfxList bCustomModelGfx;
|
||||
|
||||
SHIFT_BSS ModelCustomGfxBuilderList wCustomModelGfxBuilders;
|
||||
SHIFT_BSS ModelCustomGfxBuilderList bCustomModelGfxBuilders;
|
||||
SHIFT_BSS ModelLocalVertexCopyList wModelLocalVtxBuffers;
|
||||
SHIFT_BSS ModelLocalVertexCopyList bModelLocalVtxBuffers;
|
||||
SHIFT_BSS ModelLocalVertexCopyList* gCurrentModelLocalVtxBuffers;
|
||||
BSS ModelCustomGfxBuilderList wCustomModelGfxBuilders;
|
||||
BSS ModelCustomGfxBuilderList bCustomModelGfxBuilders;
|
||||
BSS ModelLocalVertexCopyList wModelLocalVtxBuffers;
|
||||
BSS ModelLocalVertexCopyList bModelLocalVtxBuffers;
|
||||
BSS ModelLocalVertexCopyList* gCurrentModelLocalVtxBuffers;
|
||||
|
||||
SHIFT_BSS ModelNode* wModelTreeRoot;
|
||||
SHIFT_BSS ModelNode* bModelTreeRoot;
|
||||
SHIFT_BSS ModelTreeInfoList wModelTreeNodeInfo;
|
||||
SHIFT_BSS ModelTreeInfoList bModelTreeNodeInfo;
|
||||
BSS ModelNode* wModelTreeRoot;
|
||||
BSS ModelNode* bModelTreeRoot;
|
||||
BSS s32 D_8015221C;
|
||||
BSS ModelTreeInfoList wModelTreeNodeInfo;
|
||||
BSS ModelTreeInfoList bModelTreeNodeInfo;
|
||||
|
||||
SHIFT_BSS s8 wBackgroundTintMode;
|
||||
SHIFT_BSS s8 bBackgroundTintMode;
|
||||
SHIFT_BSS s32 TreeIterPos;
|
||||
SHIFT_BSS FogSettings wFogSettings;
|
||||
SHIFT_BSS FogSettings bFogSettings;
|
||||
SHIFT_BSS FogSettings* gFogSettings;
|
||||
SHIFT_BSS s32 texPannerMainU[MAX_TEX_PANNERS];
|
||||
SHIFT_BSS s32 texPannerMainV[MAX_TEX_PANNERS];
|
||||
SHIFT_BSS s32 texPannerAuxU[MAX_TEX_PANNERS];
|
||||
SHIFT_BSS s32 texPannerAuxV[MAX_TEX_PANNERS];
|
||||
SHIFT_BSS void* TextureHeapPos;
|
||||
SHIFT_BSS u16 mtg_IterIdx;
|
||||
SHIFT_BSS ModelNode* mtg_FoundModelNode;
|
||||
SHIFT_BSS u16 mtg_MinChild;
|
||||
SHIFT_BSS u16 mtg_MaxChild;
|
||||
SHIFT_BSS u16 mtg_SearchModelID;
|
||||
SHIFT_BSS RenderTask* RenderTaskLists[3];
|
||||
SHIFT_BSS s32 RenderTaskListIdx;
|
||||
SHIFT_BSS s32 RenderTaskCount;
|
||||
BSS s8 wBackgroundTintMode;
|
||||
BSS s8 bBackgroundTintMode;
|
||||
BSS s8 D_80153222;
|
||||
BSS s8 D_80153223;
|
||||
BSS s32 TreeIterPos;
|
||||
BSS FogSettings wFogSettings;
|
||||
BSS s32 D_80153244;
|
||||
BSS FogSettings bFogSettings;
|
||||
BSS FogSettings* gFogSettings;
|
||||
BSS s32 texPannerMainU[MAX_TEX_PANNERS];
|
||||
BSS s32 texPannerMainV[MAX_TEX_PANNERS];
|
||||
BSS s32 texPannerAuxU[MAX_TEX_PANNERS];
|
||||
BSS s32 texPannerAuxV[MAX_TEX_PANNERS];
|
||||
BSS void* TextureHeapPos;
|
||||
BSS u16 mtg_IterIdx;
|
||||
BSS u16 mtg_SearchModelID;
|
||||
BSS ModelNode* mtg_FoundModelNode;
|
||||
BSS u16 mtg_MinChild;
|
||||
BSS u16 mtg_MaxChild;
|
||||
BSS s32 D_80153378[2];
|
||||
BSS u16 DepthCopyBuffer[16];
|
||||
BSS RenderTask* RenderTaskLists[3];
|
||||
BSS s32 RenderTaskListIdx;
|
||||
BSS s32 RenderTaskCount;
|
||||
|
||||
SHIFT_BSS TextureHandle TextureHandles[128];
|
||||
|
||||
SHIFT_BSS u16 DepthCopyBuffer[16];
|
||||
TextureHandle TextureHandles[128];
|
||||
|
||||
extern Addr BattleEntityHeapBottom; // todo ???
|
||||
|
||||
@ -1360,8 +1364,6 @@ void load_model_transforms(ModelNode* model, ModelNode* parent, Matrix4f mdlTxMt
|
||||
s32 is_identity_fixed_mtx(Mtx* mtx);
|
||||
void build_custom_gfx(void);
|
||||
|
||||
MATCHING_BSS(0x3A0);
|
||||
|
||||
void appendGfx_model(void* data) {
|
||||
Model* model = data;
|
||||
s32 mtxPushMode;
|
||||
|
81
src/msg.c
81
src/msg.c
@ -55,12 +55,11 @@ void* D_PAL_8014AE50[] = {
|
||||
|
||||
s16 gNextMessageBuffer = 0;
|
||||
|
||||
//TODO Vtx
|
||||
ALIGNED(8) s32 gRewindArrowQuad[] = {
|
||||
0xFFF00009, 0x00000000, 0x00000000, 0xFFFFFFFF,
|
||||
0x00100009, 0x00000000, 0x04000000, 0xFFFFFFFF,
|
||||
0xFFF0FFF7, 0x00000000, 0x00000240, 0xFFFFFFFF,
|
||||
0x0010FFF7, 0x00000000, 0x04000240, 0xFFFFFFFF,
|
||||
Vtx gRewindArrowQuad[] = {
|
||||
{ .v = { .ob = { 0xFFF0, 0x0009, 0x0000 }, .tc = { 0x0000, 0x0000 }, .cn = { 0xFF, 0xFF, 0xFF, 0xFF }}},
|
||||
{ .v = { .ob = { 0x0010, 0x0009, 0x0000 }, .tc = { 0x0400, 0x0000 }, .cn = { 0xFF, 0xFF, 0xFF, 0xFF }}},
|
||||
{ .v = { .ob = { 0xFFF0, 0xFFF7, 0x0000 }, .tc = { 0x0000, 0x0240 }, .cn = { 0xFF, 0xFF, 0xFF, 0xFF }}},
|
||||
{ .v = { .ob = { 0x0010, 0xFFF7, 0x0000 }, .tc = { 0x0400, 0x0240 }, .cn = { 0xFF, 0xFF, 0xFF, 0xFF }}},
|
||||
};
|
||||
|
||||
Gfx D_8014C2D8[] = {
|
||||
@ -80,58 +79,37 @@ Gfx D_8014C2D8[] = {
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
SHIFT_BSS s32 gMsgBGScrollAmtX;
|
||||
SHIFT_BSS u16 gMsgGlobalWaveCounter;
|
||||
SHIFT_BSS MessageImageDataList gMsgVarImages;
|
||||
SHIFT_BSS s32 gMsgBGScrollAmtY;
|
||||
SHIFT_BSS u8* D_8015131C;
|
||||
SHIFT_BSS Gfx* D_80151338;
|
||||
SHIFT_BSS char gMessageBuffers[2][1024];
|
||||
SHIFT_BSS u8 gMessageMsgVars[3][32];
|
||||
SHIFT_BSS s16 D_80155C98;
|
||||
SHIFT_BSS Mtx gMessageWindowProjMatrix[2];
|
||||
SHIFT_BSS MessageDrawState D_80155D20;
|
||||
SHIFT_BSS MessageDrawState* msg_drawState;
|
||||
SHIFT_BSS IMG_BIN D_80159B50[0x200];
|
||||
SHIFT_BSS PAL_BIN D_8015C7E0[0x10];
|
||||
SHIFT_BSS MessagePrintState gMessagePrinters[3];
|
||||
#if VERSION_IQUE
|
||||
SHIFT_BSS IMG_BIN D_801544A0[120][128];
|
||||
s32 gMsgBGScrollAmtX;
|
||||
u16 gMsgGlobalWaveCounter;
|
||||
MessageImageDataList gMsgVarImages;
|
||||
s32 gMsgBGScrollAmtY;
|
||||
u8* D_8015131C;
|
||||
Gfx* D_80151338;
|
||||
|
||||
static char gMessageBuffers[2][1024];
|
||||
static MessagePrintState gMessagePrinters[3];
|
||||
#if VERSION_JP
|
||||
static s32 D_80155C38;
|
||||
#endif
|
||||
static u8 gMessageMsgVars[3][32];
|
||||
static s16 D_80155C98;
|
||||
static Mtx gMessageWindowProjMatrix[2];
|
||||
|
||||
IMG_BIN D_80159B50[0x200];
|
||||
PAL_BIN D_8015C7E0[0x10];
|
||||
|
||||
extern s16 MsgStyleVerticalLineOffsets[];
|
||||
|
||||
extern IMG_BIN ui_msg_bubble_left_png[];
|
||||
extern IMG_BIN ui_msg_bubble_mid_png[];
|
||||
extern IMG_BIN ui_msg_bubble_right_png[];
|
||||
extern IMG_BIN ui_msg_arrow_png[];
|
||||
extern unsigned char ui_msg_palettes[16][32];
|
||||
extern IMG_BIN ui_msg_sign_corner_topleft_png[];
|
||||
extern IMG_BIN ui_msg_sign_corner_topright_png[];
|
||||
extern IMG_BIN ui_msg_sign_corner_bottomleft_png[];
|
||||
extern IMG_BIN ui_msg_sign_corner_bottomright_png[];
|
||||
extern IMG_BIN ui_msg_lamppost_corner_bottomright_png[];
|
||||
extern IMG_BIN ui_msg_sign_side_top_png[];
|
||||
extern IMG_BIN ui_msg_sign_side_left_png[];
|
||||
extern IMG_BIN ui_msg_sign_side_right_png[];
|
||||
extern IMG_BIN ui_msg_sign_side_bottom_png[];
|
||||
extern IMG_BIN ui_msg_sign_fill_png[];
|
||||
extern PAL_BIN ui_msg_sign_pal[];
|
||||
extern PAL_BIN ui_msg_lamppost_pal[];
|
||||
extern IMG_BIN ui_msg_background_png[];
|
||||
extern IMG_BIN ui_msg_rewind_arrow_png[];
|
||||
extern PAL_BIN ui_msg_rewind_arrow_pal[];
|
||||
extern IMG_BIN ui_msg_star_png[];
|
||||
extern IMG_BIN ui_msg_star_silhouette_png[];
|
||||
|
||||
extern IMG_BIN D_802ED550[];
|
||||
extern PAL_BIN D_802ED670[];
|
||||
extern IMG_BIN MsgCharImgTitle[];
|
||||
extern IMG_BIN MsgCharImgNormal[];
|
||||
extern MessageCharset* MsgCharsets[5];
|
||||
extern IMG_BIN MsgCharImgSubtitle[];
|
||||
extern PAL_BIN D_802F4560[80][8];
|
||||
|
||||
#if VERSION_JP
|
||||
extern IMG_BIN MsgCharImgKana[];
|
||||
extern IMG_BIN MsgCharImgLatin[];
|
||||
@ -139,8 +117,6 @@ extern IMG_BIN MsgCharImgMenuKana[];
|
||||
extern IMG_BIN MsgCharImgMenuLatin[];
|
||||
#endif
|
||||
|
||||
extern s32 gMessageBoxFrameParts[2][16];
|
||||
|
||||
extern IMG_BIN ui_point_right_png[];
|
||||
extern PAL_BIN ui_point_right_pal[];
|
||||
|
||||
@ -206,15 +182,6 @@ void msg_draw_rewind_arrow(s32);
|
||||
void msg_draw_choice_pointer(MessagePrintState* printer);
|
||||
void draw_message_window(MessagePrintState* printer);
|
||||
void appendGfx_message(MessagePrintState*, s16, s16, u16, u16, u16, u8);
|
||||
void appendGfx_msg_prim_rect(u8 r, u8 g, u8 b, u8 a, u16 ulX, u16 ulY, u16 lrX, u16 lrY);
|
||||
void msg_reset_gfx_state(void);
|
||||
void msg_draw_char(MessagePrintState* printer, MessageDrawState* drawState, s32 charIndex, s32 palette, s32 posX,
|
||||
s32 posY);
|
||||
void msg_draw_prim_rect(u8 r, u8 g, u8 b, u8 a, u16 posX, u16 posY, u16 sizeX, u16 sizeY);
|
||||
void msg_draw_speech_arrow(MessagePrintState* printer);
|
||||
void msg_draw_frame(s32 posX, s32 posY, s32 sizeX, s32 sizeY, s32 style, s32 palette, s32 fading, s32 bgAlpha, s32 frameAlpha);
|
||||
void msg_draw_speech_bubble(MessagePrintState* printer, s16 posX, s16 posY, s16 straightWidth, s16 curveWidth,
|
||||
s16 height, f32 scaleX, f32 scaleY, u8 opacity, s32 arg9);
|
||||
|
||||
void clear_character_set(void) {
|
||||
D_80155C98 = -1;
|
||||
@ -2001,10 +1968,6 @@ void get_msg_properties(s32 msgID, s32* height, s32* width, s32* maxLineChars, s
|
||||
}
|
||||
}
|
||||
|
||||
#if !VERSION_JP
|
||||
static const f32 padding = 0.0f;
|
||||
#endif
|
||||
|
||||
s32 get_msg_width(s32 msgID, u16 charset) {
|
||||
s32 width;
|
||||
|
||||
|
@ -24,12 +24,7 @@ extern IMG_BIN ui_msg_sign_fill_png[];
|
||||
extern PAL_BIN ui_msg_sign_pal[];
|
||||
extern PAL_BIN ui_msg_lamppost_pal[];
|
||||
extern IMG_BIN ui_msg_background_png[];
|
||||
extern IMG_BIN ui_msg_rewind_arrow_png[];
|
||||
extern PAL_BIN ui_msg_rewind_arrow_pal[];
|
||||
extern IMG_BIN ui_msg_star_png[];
|
||||
extern IMG_BIN ui_msg_star_silhouette_png[];
|
||||
|
||||
// .bss
|
||||
typedef MessageImageData* MessageImageDataList[1];
|
||||
|
||||
extern s32 gMsgBGScrollAmtX;
|
||||
@ -38,30 +33,23 @@ extern MessageImageDataList gMsgVarImages;
|
||||
extern s32 gMsgBGScrollAmtY;
|
||||
extern u8* D_8015131C;
|
||||
extern Gfx* D_80151338;
|
||||
extern char gMessageBuffers[2][1024];
|
||||
extern u8 gMessageMsgVars[3][32];
|
||||
extern s16 D_80155C98;
|
||||
extern Mtx gMessageWindowProjMatrix[2];
|
||||
extern MessageDrawState D_80155D20;
|
||||
extern MessageDrawState* msg_drawState;
|
||||
extern IMG_BIN D_80159B50[0x200];
|
||||
extern PAL_BIN D_8015C7E0[0x10];
|
||||
extern MessagePrintState gMessagePrinters[3];
|
||||
#if VERSION_IQUE
|
||||
extern IMG_BIN D_801544A0[120][128];
|
||||
|
||||
#if !VERSION_JP
|
||||
extern s16 MsgStyleVerticalLineOffsets[];
|
||||
#endif
|
||||
|
||||
extern s16 MsgStyleVerticalLineOffsets[];
|
||||
|
||||
extern IMG_BIN D_802ED550[];
|
||||
extern PAL_BIN D_802ED670[];
|
||||
extern IMG_BIN MsgCharImgTitle[];
|
||||
extern IMG_BIN MsgCharImgNormal[];
|
||||
extern MessageCharset* MsgCharsets[5];
|
||||
extern IMG_BIN MsgCharImgSubtitle[];
|
||||
extern PAL_BIN D_802F4560[80][8];
|
||||
extern s32 gMessageBoxFrameParts[2][16];
|
||||
|
||||
#if VERSION_IQUE
|
||||
static IMG_BIN D_801544A0[120][128];
|
||||
#endif
|
||||
static MessageDrawState D_80155D20;
|
||||
static MessageDrawState* msg_drawState;
|
||||
|
||||
Vtx gMsgSpeechBoxLQuad[4] = {
|
||||
{ .v = { .ob = {1, 0, 0}, .tc = {0, 0}, .cn = {255, 255, 248, 255} } },
|
||||
{ .v = { .ob = {0x20, 0, 0}, .tc = {0x400, 0}, .cn = {255, 255, 248, 255} } },
|
||||
@ -120,21 +108,8 @@ u8 D_8014C580[] = { 50, 80, 100, 105, 100, 0, 0, 0 };
|
||||
u8 D_8014C588[] = { 105, 100, 77, 57, 40, 27, 16, 8, 3, 0, 0, 0};
|
||||
#if VERSION_IQUE
|
||||
u32 D_8014AD24 = 2;
|
||||
#else
|
||||
u8 D_8014C594[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||
#endif
|
||||
|
||||
s32 draw_image_with_clipping(IMG_PTR raster, s32 width, s32 height, s32 fmt, s32 bitDepth, s16 posX, s16 posY, u16 clipULx,
|
||||
u16 clipULy, u16 clipLRx, u16 clipRLy);
|
||||
|
||||
s32 _update_message(MessagePrintState* printer);
|
||||
void msg_copy_to_print_buffer(MessagePrintState* printer, s32 arg1, s32 arg2);
|
||||
void initialize_printer(MessagePrintState* printer, s32 arg1, s32 arg2);
|
||||
MessagePrintState* _msg_get_printer_for_msg(s32 msgID, s32* donePrintingWriteback, s32 arg2);
|
||||
void msg_update_rewind_arrow(s32);
|
||||
void msg_draw_rewind_arrow(s32);
|
||||
void msg_draw_choice_pointer(MessagePrintState* printer);
|
||||
void draw_message_window(MessagePrintState* printer);
|
||||
void appendGfx_message(MessagePrintState*, s16, s16, u16, u16, u16, u8);
|
||||
void appendGfx_msg_prim_rect(u8 r, u8 g, u8 b, u8 a, u16 ulX, u16 ulY, u16 lrX, u16 lrY);
|
||||
void msg_reset_gfx_state(void);
|
||||
|
10
src/npc.c
10
src/npc.c
@ -6,11 +6,11 @@
|
||||
#include "world/partners.h"
|
||||
#include "sprite/npc/WorldWatt.h"
|
||||
|
||||
SHIFT_BSS s16 gNpcCount;
|
||||
SHIFT_BSS NpcList gWorldNpcList;
|
||||
SHIFT_BSS NpcList gBattleNpcList;
|
||||
SHIFT_BSS NpcList* gCurrentNpcListPtr;
|
||||
SHIFT_BSS b8 gNpcPlayerCollisionsEnabled;
|
||||
s16 gNpcCount;
|
||||
static NpcList gWorldNpcList;
|
||||
static NpcList gBattleNpcList;
|
||||
static NpcList* gCurrentNpcListPtr;
|
||||
static b8 gNpcPlayerCollisionsEnabled;
|
||||
|
||||
#define PAL_ANIM_END 0xFF
|
||||
|
||||
|
@ -1,11 +1,11 @@
|
||||
#include "common.h"
|
||||
|
||||
SHIFT_BSS s32 NpcHitQueryBehindRightY;
|
||||
SHIFT_BSS s32 NpcHitQueryBehindCollider;
|
||||
SHIFT_BSS s32 NpcHitQueryAheadCollider;
|
||||
SHIFT_BSS s32 NpcHitQueryAheadY;
|
||||
SHIFT_BSS s32 NpcHitQueryBehindLeftY;
|
||||
SHIFT_BSS s32 NpcHitQueryColliderID;
|
||||
s32 NpcHitQueryBehindRightY;
|
||||
s32 NpcHitQueryBehindCollider;
|
||||
s32 NpcHitQueryAheadCollider;
|
||||
s32 NpcHitQueryAheadY;
|
||||
s32 NpcHitQueryBehindLeftY;
|
||||
s32 NpcHitQueryColliderID;
|
||||
|
||||
PlayerStatus* gPlayerStatusPtr = &gPlayerStatus; // maybe wPlayerStatus
|
||||
|
||||
|
@ -10,7 +10,12 @@
|
||||
glabel __osProbeTLB
|
||||
/* 41C60 80066860 40085000 */ mfc0 $t0, $10
|
||||
/* 41C64 80066864 310900FF */ andi $t1, $t0, 0xff
|
||||
#ifdef BBPLAYER
|
||||
/* 40228 80064E28 3C01FFFF */ lui $at, (0xFFFFE000 >> 16)
|
||||
/* 4022C 80064E2C 3421E000 */ ori $at, $at, (0xFFFFE000 & 0xFFFF)
|
||||
#else
|
||||
/* 41C68 80066868 2401E000 */ addiu $at, $zero, -0x2000
|
||||
#endif
|
||||
/* 41C6C 8006686C 00815024 */ and $t2, $a0, $at
|
||||
/* 41C70 80066870 012A4825 */ or $t1, $t1, $t2
|
||||
/* 41C74 80066874 40895000 */ mtc0 $t1, $10
|
@ -4,7 +4,7 @@
|
||||
#include "PR/rcp.h"
|
||||
#include "PR/piint.h"
|
||||
|
||||
OSPiHandle __CartRomHandle ALIGNED(8);
|
||||
OSPiHandle __CartRomHandle OSALIGNED(8);
|
||||
OSPiHandle *osCartRomInit(void)
|
||||
{
|
||||
u32 value;
|
||||
|
@ -3,7 +3,7 @@
|
||||
#include "PR/controller.h"
|
||||
#include "PR/rmon.h"
|
||||
|
||||
__OSInode __osPfsInodeCache ALIGNED(8);
|
||||
__OSInode __osPfsInodeCache OSALIGNED(8);
|
||||
s32 __osPfsInodeCacheChannel = -1;
|
||||
u8 __osPfsInodeCacheBank = 250;
|
||||
|
||||
|
@ -12,7 +12,7 @@ u8 __osContLastCmd;
|
||||
u8 __osMaxControllers;
|
||||
|
||||
OSTimer __osEepromTimer;
|
||||
OSMesgQueue __osEepromTimerQ ALIGNED(8);
|
||||
OSMesgQueue __osEepromTimerQ OSALIGNED(8);
|
||||
OSMesg __osEepromTimerMsg;
|
||||
|
||||
s32 __osContinitialized = 0;
|
||||
|
@ -81,13 +81,21 @@ __osPiIntTable:
|
||||
|
||||
glabel __osExceptionPreamble
|
||||
/* 45DF0 8006A9F0 3C1A8007 */ lui $k0, %hi(__osException)
|
||||
#ifdef BBPLAYER
|
||||
/* 41634 80066234 675A6240 */ daddiu $k0, $k0, %lo(__osException) # handwritten instruction
|
||||
#else
|
||||
/* 45DF4 8006A9F4 275AAA00 */ addiu $k0, $k0, %lo(__osException)
|
||||
#endif
|
||||
/* 45DF8 8006A9F8 03400008 */ jr $k0
|
||||
/* 45DFC 8006A9FC 00000000 */ nop
|
||||
|
||||
glabel __osException
|
||||
/* 45E00 8006AA00 3C1A800B */ lui $k0, %hi(__osThreadSave)
|
||||
#ifdef BBPLAYER
|
||||
/* 41644 80066244 675AF740 */ daddiu $k0, $k0, %lo(__osThreadSave) # handwritten instruction
|
||||
#else
|
||||
/* 45E04 8006AA04 275A0D08 */ addiu $k0, $k0, %lo(__osThreadSave)
|
||||
#endif
|
||||
/* 45E08 8006AA08 FF410020 */ sd $at, 0x20($k0)
|
||||
/* 45E0C 8006AA0C 401B6000 */ mfc0 $k1, $12
|
||||
/* 45E10 8006AA10 AF5B0118 */ sw $k1, 0x118($k0)
|
||||
@ -101,7 +109,11 @@ glabel __osException
|
||||
/* 45E30 8006AA30 40086800 */ mfc0 $t0, $13
|
||||
|
||||
glabel func_8006AA34
|
||||
#ifdef BBPLAYER
|
||||
/* 41674 80066274 0340402D */ daddu $t0, $k0, $zero
|
||||
#else
|
||||
/* 45E34 8006AA34 03404021 */ addu $t0, $k0, $zero
|
||||
#endif
|
||||
/* 45E38 8006AA38 3C1A8009 */ lui $k0, %hi(__osRunningThread)
|
||||
/* 45E3C 8006AA3C 8F5A4660 */ lw $k0, %lo(__osRunningThread)($k0)
|
||||
/* 45E40 8006AA40 DD090020 */ ld $t1, 0x20($t0)
|
||||
@ -148,9 +160,16 @@ glabel func_8006AA34
|
||||
/* 45EE4 8006AAE4 11200013 */ beqz $t1, .L8006AB34
|
||||
/* 45EE8 8006AAE8 00000000 */ nop
|
||||
/* 45EEC 8006AAEC 3C088009 */ lui $t0, %hi(__OSGlobalIntMask)
|
||||
#ifdef BBPLAYER
|
||||
/* 41730 80066330 650845B4 */ daddiu $t0, $t0, %lo(__OSGlobalIntMask)
|
||||
/* 41734 80066334 8D080000 */ lw $t0, 0x0($t0)
|
||||
/* 41738 80066338 3C01FFFF */ lui $at, (0xFFFFFFFF >> 16)
|
||||
/* 4173C 8006633C 3421FFFF */ ori $at, $at, (0xFFFFFFFF & 0xFFFF)
|
||||
#else
|
||||
/* 45EF0 8006AAF0 25085900 */ addiu $t0, $t0, %lo(__OSGlobalIntMask)
|
||||
/* 45EF4 8006AAF4 8D080000 */ lw $t0, ($t0)
|
||||
/* 45EF8 8006AAF8 2401FFFF */ addiu $at, $zero, -1
|
||||
#endif
|
||||
/* 45EFC 8006AAFC 01015026 */ xor $t2, $t0, $at
|
||||
/* 45F00 8006AB00 314AFF00 */ andi $t2, $t2, 0xff00
|
||||
/* 45F04 8006AB04 012A6025 */ or $t4, $t1, $t2
|
||||
@ -171,10 +190,18 @@ glabel func_8006AA34
|
||||
/* 45F3C 8006AB3C 1120000B */ beqz $t1, .L8006AB6C
|
||||
/* 45F40 8006AB40 00000000 */ nop
|
||||
/* 45F44 8006AB44 3C088009 */ lui $t0, %hi(__OSGlobalIntMask)
|
||||
#ifdef BBPLAYER
|
||||
/* 4178C 8006638C 650845B4 */ daddiu $t0, $t0, %lo(__OSGlobalIntMask)
|
||||
/* 41790 80066390 8D080000 */ lw $t0, 0x0($t0)
|
||||
/* 41794 80066394 00084402 */ srl $t0, $t0, 16
|
||||
/* 41798 80066398 3C01FFFF */ lui $at, (0xFFFFFFFF >> 16)
|
||||
/* 4179C 8006639C 3421FFFF */ ori $at, $at, (0xFFFFFFFF & 0xFFFF)
|
||||
#else
|
||||
/* 45F48 8006AB48 25085900 */ addiu $t0, $t0, %lo(__OSGlobalIntMask)
|
||||
/* 45F4C 8006AB4C 8D080000 */ lw $t0, ($t0)
|
||||
/* 45F50 8006AB50 00084402 */ srl $t0, $t0, 0x10
|
||||
/* 45F54 8006AB54 2401FFFF */ addiu $at, $zero, -1
|
||||
#endif
|
||||
/* 45F58 8006AB58 01014026 */ xor $t0, $t0, $at
|
||||
/* 45F5C 8006AB5C 3108003F */ andi $t0, $t0, 0x3f
|
||||
/* 45F60 8006AB60 8F4C0128 */ lw $t4, 0x128($k0)
|
||||
@ -221,6 +248,25 @@ glabel func_8006AA34
|
||||
/* 45FFC 8006ABFC 240A0000 */ addiu $t2, $zero, 0
|
||||
/* 46000 8006AC00 152A00D2 */ bne $t1, $t2, .L8006AF4C
|
||||
/* 46004 8006AC04 00000000 */ nop
|
||||
#ifdef BBPLAYER
|
||||
/* 41850 80066450 3C098009 */ lui $t1, %hi(__osShutdown)
|
||||
/* 41854 80066454 652945AC */ daddiu $t1, $t1, %lo(__osShutdown)
|
||||
/* 41858 80066458 8D2A0000 */ lw $t2, 0x0($t1)
|
||||
/* 4185C 8006645C 1140000C */ beqz $t2, .LIQUE_80066490
|
||||
/* 41860 80066460 00000000 */ nop
|
||||
/* 41864 80066464 3C098009 */ lui $t1, %hi(__osShutdownTime)
|
||||
/* 41868 80066468 652945B0 */ daddiu $t1, $t1, %lo(__osShutdownTime)
|
||||
/* 4186C 8006646C 8D290000 */ lw $t1, 0x0($t1)
|
||||
/* 41870 80066470 400A4800 */ mfc0 $t2, $9 # handwritten instruction
|
||||
/* 41874 80066474 01495023 */ subu $t2, $t2, $t1
|
||||
/* 41878 80066478 3C090500 */ lui $t1, (0x5000000 >> 16)
|
||||
/* 4187C 8006647C 012A482B */ sltu $t1, $t1, $t2
|
||||
/* 41880 80066480 11200003 */ beqz $t1, .LIQUE_80066490
|
||||
/* 41884 80066484 00000000 */ nop
|
||||
/* 41888 80066488 0C019FEB */ jal skExit
|
||||
/* 4188C 8006648C 00000000 */ nop
|
||||
.LIQUE_80066490:
|
||||
#endif
|
||||
/* 46008 8006AC08 03688024 */ and $s0, $k1, $t0
|
||||
.L8006AC0C:
|
||||
/* 4600C 8006AC0C 3209FF00 */ andi $t1, $s0, 0xff00
|
||||
@ -231,10 +277,17 @@ glabel func_8006AA34
|
||||
/* 46020 8006AC20 214A0010 */ addi $t2, $t2, 0x10
|
||||
.L8006AC24:
|
||||
/* 46024 8006AC24 3C01800A */ lui $at, %hi(__osIntOffTable)
|
||||
#ifdef BBPLAYER
|
||||
/* 418B0 800664B0 002A082D */ daddu $at, $at, $t2
|
||||
/* 418B4 800664B4 902A88B0 */ lbu $t2, %lo(__osIntOffTable)($at)
|
||||
/* 418B8 800664B8 3C01800A */ lui $at, %hi(__osIntTable)
|
||||
/* 418BC 800664BC 002A082D */ daddu $at, $at, $t2
|
||||
#else
|
||||
/* 46028 8006AC28 002A0821 */ addu $at, $at, $t2
|
||||
/* 4602C 8006AC2C 902A9D80 */ lbu $t2, %lo(__osIntOffTable)($at)
|
||||
/* 46030 8006AC30 3C01800A */ lui $at, %hi(__osIntTable)
|
||||
/* 46034 8006AC34 002A0821 */ addu $at, $at, $t2
|
||||
#endif
|
||||
/* 46038 8006AC38 8C2A9DA0 */ lw $t2, %lo(__osIntTable)($at)
|
||||
/* 4603C 8006AC3C 01400008 */ jr $t2
|
||||
/* 46040 8006AC40 00000000 */ nop
|
||||
@ -260,7 +313,11 @@ glabel func_8006AA34
|
||||
/* 46080 8006AC80 2401F7FF */ addiu $at, $zero, -0x801
|
||||
/* 46084 8006AC84 02018024 */ and $s0, $s0, $at
|
||||
/* 46088 8006AC88 3C098009 */ lui $t1, %hi(__osHwIntTable)
|
||||
#ifdef BBPLAYER
|
||||
/* 41914 80066514 652944F0 */ daddiu $t1, $t1, %lo(__osHwIntTable)
|
||||
#else
|
||||
/* 4608C 8006AC8C 25295910 */ addiu $t1, $t1, %lo(__osHwIntTable)
|
||||
#endif
|
||||
/* 46090 8006AC90 21290008 */ addi $t1, $t1, 8
|
||||
/* 46094 8006AC94 8D2A0000 */ lw $t2, ($t1)
|
||||
/* 46098 8006AC98 11400007 */ beqz $t2, .L8006ACB8
|
||||
@ -272,15 +329,96 @@ glabel func_8006AA34
|
||||
/* 460B0 8006ACB0 10000093 */ b .L8006AF00
|
||||
/* 460B4 8006ACB4 00000000 */ nop
|
||||
.L8006ACB8:
|
||||
#ifdef BBPLAYER
|
||||
/* 41940 80066540 3C11A430 */ lui $s1, %hi(D_A4300038)
|
||||
/* 41944 80066544 8E310038 */ lw $s1, %lo(D_A4300038)($s1)
|
||||
/* 41948 80066548 32290040 */ andi $t1, $s1, 0x40
|
||||
/* 4194C 8006654C 11200007 */ beqz $t1, .LIQUE_8006656C
|
||||
/* 41950 80066550 00000000 */ nop
|
||||
/* 41954 80066554 32313F80 */ andi $s1, $s1, 0x3F80
|
||||
/* 41958 80066558 24090000 */ addiu $t1, $zero, 0x0
|
||||
/* 4195C 8006655C 3C01A460 */ lui $at, %hi(D_A4600048)
|
||||
/* 41960 80066560 AC290048 */ sw $t1, %lo(D_A4600048)($at)
|
||||
/* 41964 80066564 0C019A45 */ jal send_mesg
|
||||
/* 41968 80066568 240400B8 */ addiu $a0, $zero, 0xB8
|
||||
.LIQUE_8006656C:
|
||||
/* 4196C 8006656C 32292000 */ andi $t1, $s1, 0x2000
|
||||
/* 41970 80066570 11200007 */ beqz $t1, .LIQUE_80066590
|
||||
/* 41974 80066574 00000000 */ nop
|
||||
/* 41978 80066578 32311FC0 */ andi $s1, $s1, 0x1FC0
|
||||
/* 4197C 8006657C 24092000 */ addiu $t1, $zero, 0x2000
|
||||
/* 41980 80066580 3C01A430 */ lui $at, %hi(D_A4300038)
|
||||
/* 41984 80066584 AC290038 */ sw $t1, %lo(D_A4300038)($at)
|
||||
/* 41988 80066588 0C019A45 */ jal send_mesg
|
||||
/* 4198C 8006658C 240400F0 */ addiu $a0, $zero, 0xF0
|
||||
.LIQUE_80066590:
|
||||
/* 41990 80066590 32290080 */ andi $t1, $s1, 0x80
|
||||
/* 41994 80066594 11200007 */ beqz $t1, .LIQUE_800665B4
|
||||
/* 41998 80066598 00000000 */ nop
|
||||
/* 4199C 8006659C 32313F40 */ andi $s1, $s1, 0x3F40
|
||||
/* 419A0 800665A0 24094000 */ addiu $t1, $zero, 0x4000
|
||||
/* 419A4 800665A4 3C01A430 */ lui $at, %hi(D_A430003C)
|
||||
/* 419A8 800665A8 AC29003C */ sw $t1, %lo(D_A430003C)($at)
|
||||
/* 419AC 800665AC 0C019A45 */ jal send_mesg
|
||||
/* 419B0 800665B0 240400C0 */ addiu $a0, $zero, 0xC0
|
||||
.LIQUE_800665B4:
|
||||
/* 419B4 800665B4 32290100 */ andi $t1, $s1, 0x100
|
||||
/* 419B8 800665B8 11200007 */ beqz $t1, .LIQUE_800665D8
|
||||
/* 419BC 800665BC 00000000 */ nop
|
||||
/* 419C0 800665C0 32313EC0 */ andi $s1, $s1, 0x3EC0
|
||||
/* 419C4 800665C4 3C090001 */ lui $t1, (0x10000 >> 16)
|
||||
/* 419C8 800665C8 3C01A430 */ lui $at, %hi(D_A430003C)
|
||||
/* 419CC 800665CC AC29003C */ sw $t1, %lo(D_A430003C)($at)
|
||||
/* 419D0 800665D0 0C019A45 */ jal send_mesg
|
||||
/* 419D4 800665D4 240400C8 */ addiu $a0, $zero, 0xC8
|
||||
.LIQUE_800665D8:
|
||||
/* 419D8 800665D8 32290200 */ andi $t1, $s1, 0x200
|
||||
/* 419DC 800665DC 11200007 */ beqz $t1, .LIQUE_800665FC
|
||||
/* 419E0 800665E0 00000000 */ nop
|
||||
/* 419E4 800665E4 32313DC0 */ andi $s1, $s1, 0x3DC0
|
||||
/* 419E8 800665E8 3C090004 */ lui $t1, (0x40000 >> 16)
|
||||
/* 419EC 800665EC 3C01A430 */ lui $at, %hi(D_A430003C)
|
||||
/* 419F0 800665F0 AC29003C */ sw $t1, %lo(D_A430003C)($at)
|
||||
/* 419F4 800665F4 0C019A45 */ jal send_mesg
|
||||
/* 419F8 800665F8 240400D0 */ addiu $a0, $zero, 0xD0
|
||||
.LIQUE_800665FC:
|
||||
/* 419FC 800665FC 32290400 */ andi $t1, $s1, 0x400
|
||||
/* 41A00 80066600 11200007 */ beqz $t1, .LIQUE_80066620
|
||||
/* 41A04 80066604 00000000 */ nop
|
||||
/* 41A08 80066608 32313BC0 */ andi $s1, $s1, 0x3BC0
|
||||
/* 41A0C 8006660C 3C090010 */ lui $t1, (0x100000 >> 16)
|
||||
/* 41A10 80066610 3C01A430 */ lui $at, %hi(D_A430003C)
|
||||
/* 41A14 80066614 AC29003C */ sw $t1, %lo(D_A430003C)($at)
|
||||
/* 41A18 80066618 0C019A45 */ jal send_mesg
|
||||
/* 41A1C 8006661C 240400D8 */ addiu $a0, $zero, 0xD8
|
||||
.LIQUE_80066620:
|
||||
/* 41A20 80066620 32290800 */ andi $t1, $s1, 0x800
|
||||
/* 41A24 80066624 11200007 */ beqz $t1, .LIQUE_80066644
|
||||
/* 41A28 80066628 00000000 */ nop
|
||||
/* 41A2C 8006662C 323137C0 */ andi $s1, $s1, 0x37C0
|
||||
/* 41A30 80066630 3C090040 */ lui $t1, (0x400000 >> 16)
|
||||
/* 41A34 80066634 3C01A430 */ lui $at, %hi(D_A430003C)
|
||||
/* 41A38 80066638 AC29003C */ sw $t1, %lo(D_A430003C)($at)
|
||||
/* 41A3C 8006663C 0C019A45 */ jal send_mesg
|
||||
/* 41A40 80066640 240400E0 */ addiu $a0, $zero, 0xE0
|
||||
.LIQUE_80066644:
|
||||
/* 41A44 80066644 1000FF93 */ b .L8006AC0C
|
||||
/* 41A48 80066648 00000000 */ nop
|
||||
#else
|
||||
/* 460B8 8006ACB8 0C01ABDF */ jal send_mesg
|
||||
/* 460BC 8006ACBC 24040010 */ addiu $a0, $zero, 0x10
|
||||
/* 460C0 8006ACC0 1000FFD2 */ b .L8006AC0C
|
||||
/* 460C4 8006ACC4 00000000 */ nop
|
||||
#endif
|
||||
.L8006ACC8_460C8:
|
||||
/* 460C8 8006ACC8 3C11A430 */ lui $s1, %hi(D_A4300008)
|
||||
/* 460CC 8006ACCC 8E310008 */ lw $s1, %lo(D_A4300008)($s1)
|
||||
/* 460D0 8006ACD0 3C088009 */ lui $t0, %hi(__OSGlobalIntMask)
|
||||
#ifdef BBPLAYER
|
||||
/* 41A58 80066658 650845B4 */ daddiu $t0, $t0, %lo(__OSGlobalIntMask)
|
||||
#else
|
||||
/* 460D4 8006ACD4 25085900 */ addiu $t0, $t0, %lo(__OSGlobalIntMask)
|
||||
#endif
|
||||
/* 460D8 8006ACD8 8D080000 */ lw $t0, ($t0)
|
||||
/* 460DC 8006ACDC 00084402 */ srl $t0, $t0, 0x10
|
||||
/* 460E0 8006ACE0 02288824 */ and $s1, $s1, $t0
|
||||
@ -350,13 +488,21 @@ glabel func_8006AA34
|
||||
/* 461CC 8006ADCC 3C01A460 */ lui $at, %hi(D_A4600010)
|
||||
/* 461D0 8006ADD0 AC290010 */ sw $t1, %lo(D_A4600010)($at)
|
||||
/* 461D4 8006ADD4 3C098009 */ lui $t1, %hi(__osPiIntTable)
|
||||
#ifdef BBPLAYER
|
||||
/* 41B5C 8006675C 65294518 */ daddiu $t1, $t1, %lo(__osPiIntTable)
|
||||
#else
|
||||
/* 461D8 8006ADD8 25295938 */ addiu $t1, $t1, %lo(__osPiIntTable)
|
||||
#endif
|
||||
/* 461DC 8006ADDC 8D2A0000 */ lw $t2, ($t1)
|
||||
/* 461E0 8006ADE0 11400006 */ beqz $t2, .L8006ADFC
|
||||
/* 461E4 8006ADE4 00000000 */ nop
|
||||
/* 461E8 8006ADE8 8D3D0004 */ lw $sp, 4($t1)
|
||||
/* 461EC 8006ADEC 0140F809 */ jalr $t2
|
||||
#ifdef BBPLAYER
|
||||
/* 41B74 80066774 0040202D */ daddu $a0, $v0, $zero
|
||||
#else
|
||||
/* 461F0 8006ADF0 00402021 */ addu $a0, $v0, $zero
|
||||
#endif
|
||||
/* 461F4 8006ADF4 14400003 */ bnez $v0, .L8006AE04
|
||||
/* 461F8 8006ADF8 00000000 */ nop
|
||||
.L8006ADFC:
|
||||
@ -385,7 +531,11 @@ glabel func_8006AA34
|
||||
/* 46244 8006AE44 0361D824 */ and $k1, $k1, $at
|
||||
/* 46248 8006AE48 AF5B0118 */ sw $k1, 0x118($k0)
|
||||
/* 4624C 8006AE4C 3C098009 */ lui $t1, %hi(__osShutdown)
|
||||
#ifdef BBPLAYER
|
||||
/* 41BD4 800667D4 652945AC */ daddiu $t1, $t1, %lo(__osShutdown)
|
||||
#else
|
||||
/* 46250 8006AE50 252958FC */ addiu $t1, $t1, %lo(__osShutdown)
|
||||
#endif
|
||||
/* 46254 8006AE54 8D2A0000 */ lw $t2, ($t1)
|
||||
/* 46258 8006AE58 11400004 */ beqz $t2, .L8006AE6C
|
||||
/* 4625C 8006AE5C 00000000 */ nop
|
||||
@ -395,6 +545,12 @@ glabel func_8006AA34
|
||||
.L8006AE6C:
|
||||
/* 4626C 8006AE6C 240A0001 */ addiu $t2, $zero, 1
|
||||
/* 46270 8006AE70 AD2A0000 */ sw $t2, ($t1)
|
||||
#ifdef BBPLAYER
|
||||
/* 41BF8 800667F8 400A4800 */ mfc0 $t2, $9 # handwritten instruction
|
||||
/* 41BFC 800667FC 3C098009 */ lui $t1, %hi(__osShutdownTime)
|
||||
/* 41C00 80066800 652945B0 */ daddiu $t1, $t1, %lo(__osShutdownTime)
|
||||
/* 41C04 80066804 AD2A0000 */ sw $t2, 0x0($t1)
|
||||
#endif
|
||||
/* 46274 8006AE74 0C01ABDF */ jal send_mesg
|
||||
/* 46278 8006AE78 24040070 */ addiu $a0, $zero, 0x70
|
||||
/* 4627C 8006AE7C 2401EFFF */ addiu $at, $zero, -0x1001
|
||||
@ -442,15 +598,27 @@ glabel func_8006AA34
|
||||
/* 46310 8006AF10 012B082A */ slt $at, $t1, $t3
|
||||
/* 46314 8006AF14 10200007 */ beqz $at, .L8006AF34
|
||||
/* 46318 8006AF18 00000000 */ nop
|
||||
#ifdef BBPLAYER
|
||||
/* 41CB0 800668B0 0340282D */ daddu $a1, $k0, $zero
|
||||
/* 41CB4 800668B4 3C048009 */ lui $a0, %hi(__osRunQueue)
|
||||
/* 41CB8 800668B8 64843278 */ daddiu $a0, $a0, %lo(__osRunQueue)
|
||||
/* 41CBC 800668BC 0C019AC4 */ jal __osEnqueueThread
|
||||
/* 41CC0 800668C0 00000000 */ nop
|
||||
#else
|
||||
/* 4631C 8006AF1C 03402821 */ addu $a1, $k0, $zero
|
||||
/* 46320 8006AF20 3C048009 */ lui $a0, %hi(__osRunQueue)
|
||||
/* 46324 8006AF24 0C01AC5D */ jal __osEnqueueThread
|
||||
/* 46328 8006AF28 24844658 */ addiu $a0, $a0, %lo(__osRunQueue)
|
||||
#endif
|
||||
/* 4632C 8006AF2C 0801AC75 */ j __osDispatchThread
|
||||
/* 46330 8006AF30 00000000 */ nop
|
||||
.L8006AF34:
|
||||
/* 46334 8006AF34 3C098009 */ lui $t1, %hi(__osRunQueue)
|
||||
#ifdef BBPLAYER
|
||||
/* 41CD0 800668D0 65293278 */ daddiu $t1, $t1, %lo(__osRunQueue)
|
||||
#else
|
||||
/* 46338 8006AF38 25294658 */ addiu $t1, $t1, %lo(__osRunQueue)
|
||||
#endif
|
||||
/* 4633C 8006AF3C 8D2A0000 */ lw $t2, ($t1)
|
||||
/* 46340 8006AF40 AF4A0000 */ sw $t2, ($k0)
|
||||
/* 46344 8006AF44 0801AC75 */ j __osDispatchThread
|
||||
@ -470,9 +638,15 @@ glabel func_8006AA34
|
||||
/* 46378 8006AF78 00000000 */ nop
|
||||
|
||||
glabel send_mesg
|
||||
#ifdef BBPLAYER
|
||||
/* 41D14 80066914 03E0902D */ daddu $s2, $ra, $zero
|
||||
/* 41D18 80066918 3C0A800E */ lui $t2, %hi(__osEventStateTab)
|
||||
/* 41D1C 8006691C 654A825C */ daddiu $t2, $t2, %lo(__osEventStateTab)
|
||||
#else
|
||||
/* 4637C 8006AF7C 03E09021 */ addu $s2, $ra, $zero
|
||||
/* 46380 8006AF80 3C0A800E */ lui $t2, %hi(__osEventStateTab)
|
||||
/* 46384 8006AF84 254A9F80 */ addiu $t2, $t2, %lo(__osEventStateTab)
|
||||
#endif
|
||||
/* 46388 8006AF88 01445021 */ addu $t2, $t2, $a0
|
||||
/* 4638C 8006AF8C 8D490000 */ lw $t1, ($t2)
|
||||
/* 46390 8006AF90 11200027 */ beqz $t1, .L8006B030
|
||||
@ -484,9 +658,14 @@ glabel send_mesg
|
||||
/* 463A8 8006AFA8 00000000 */ nop
|
||||
/* 463AC 8006AFAC 8D2D000C */ lw $t5, 0xc($t1)
|
||||
/* 463B0 8006AFB0 01AB6821 */ addu $t5, $t5, $t3
|
||||
#ifdef BBPLAYER
|
||||
/* 41D4C 8006694C 15800002 */ bnez $t4, .L8006AFC4
|
||||
/* 41D50 80066950 01AC001A */ div $zero, $t5, $t4
|
||||
#else
|
||||
/* 463B4 8006AFB4 01AC001A */ div $zero, $t5, $t4
|
||||
/* 463B8 8006AFB8 15800002 */ bnez $t4, .L8006AFC4
|
||||
/* 463BC 8006AFBC 00000000 */ nop
|
||||
#endif
|
||||
/* 463C0 8006AFC0 0007000D */ break 7
|
||||
.L8006AFC4:
|
||||
/* 463C4 8006AFC4 2401FFFF */ addiu $at, $zero, -1
|
||||
@ -511,12 +690,22 @@ glabel send_mesg
|
||||
/* 4640C 8006B00C 11600008 */ beqz $t3, .L8006B030
|
||||
/* 46410 8006B010 00000000 */ nop
|
||||
/* 46414 8006B014 0C01AC6F */ jal __osPopThread
|
||||
#ifdef BBPLAYER
|
||||
/* 41DAC 800669AC 0120202D */ daddu $a0, $t1, $zero
|
||||
/* 41DB0 800669B0 0040502D */ daddu $t2, $v0, $zero
|
||||
/* 41DB4 800669B4 0140282D */ daddu $a1, $t2, $zero
|
||||
/* 41DB8 800669B8 3C048009 */ lui $a0, %hi(__osRunQueue)
|
||||
/* 41DBC 800669BC 64843278 */ daddiu $a0, $a0, %lo(__osRunQueue)
|
||||
/* 41DC0 800669C0 0C019AC4 */ jal __osEnqueueThread
|
||||
/* 41DC4 800669C4 00000000 */ nop
|
||||
#else
|
||||
/* 46418 8006B018 01202021 */ addu $a0, $t1, $zero
|
||||
/* 4641C 8006B01C 00405021 */ addu $t2, $v0, $zero
|
||||
/* 46420 8006B020 01402821 */ addu $a1, $t2, $zero
|
||||
/* 46424 8006B024 3C048009 */ lui $a0, %hi(__osRunQueue)
|
||||
/* 46428 8006B028 0C01AC5D */ jal __osEnqueueThread
|
||||
/* 4642C 8006B02C 24844658 */ addiu $a0, $a0, %lo(__osRunQueue)
|
||||
#endif
|
||||
.L8006B030:
|
||||
/* 46430 8006B030 02400008 */ jr $s2
|
||||
/* 46434 8006B034 00000000 */ nop
|
||||
@ -559,7 +748,9 @@ glabel __osEnqueueAndYield
|
||||
/* 464B8 8006B0B8 1360000A */ beqz $k1, .L8006B0E4
|
||||
/* 464BC 8006B0BC 00000000 */ nop
|
||||
/* 464C0 8006B0C0 445BF800 */ cfc1 $k1, $31
|
||||
#ifndef BBPLAYER
|
||||
/* 464C4 8006B0C4 00000000 */ nop
|
||||
#endif
|
||||
/* 464C8 8006B0C8 ACBB012C */ sw $k1, 0x12c($a1)
|
||||
/* 464CC 8006B0CC F4B40180 */ sdc1 $f20, 0x180($a1)
|
||||
/* 464D0 8006B0D0 F4B60188 */ sdc1 $f22, 0x188($a1)
|
||||
@ -573,9 +764,16 @@ glabel __osEnqueueAndYield
|
||||
/* 464EC 8006B0EC 1120000D */ beqz $t1, .L8006B124
|
||||
/* 464F0 8006B0F0 00000000 */ nop
|
||||
/* 464F4 8006B0F4 3C088009 */ lui $t0, %hi(__OSGlobalIntMask)
|
||||
#ifdef BBPLAYER
|
||||
/* 41E8C 80066A8C 650845B4 */ daddiu $t0, $t0, %lo(__OSGlobalIntMask)
|
||||
/* 41E90 80066A90 8D080000 */ lw $t0, 0x0($t0)
|
||||
/* 41E94 80066A94 3C01FFFF */ lui $at, (0xFFFFFFFF >> 16)
|
||||
/* 41E98 80066A98 3421FFFF */ ori $at, $at, (0xFFFFFFFF & 0xFFFF)
|
||||
#else
|
||||
/* 464F8 8006B0F8 25085900 */ addiu $t0, $t0, %lo(__OSGlobalIntMask)
|
||||
/* 464FC 8006B0FC 8D080000 */ lw $t0, ($t0)
|
||||
/* 46500 8006B100 2401FFFF */ addiu $at, $zero, -1
|
||||
#endif
|
||||
/* 46504 8006B104 01014026 */ xor $t0, $t0, $at
|
||||
/* 46508 8006B108 3108FF00 */ andi $t0, $t0, 0xff00
|
||||
/* 4650C 8006B10C 01284825 */ or $t1, $t1, $t0
|
||||
@ -590,10 +788,18 @@ glabel __osEnqueueAndYield
|
||||
/* 4652C 8006B12C 1360000B */ beqz $k1, .L8006B15C
|
||||
/* 46530 8006B130 00000000 */ nop
|
||||
/* 46534 8006B134 3C1A8009 */ lui $k0, %hi(__OSGlobalIntMask)
|
||||
#ifdef BBPLAYER
|
||||
/* 41ED0 80066AD0 675A45B4 */ daddiu $k0, $k0, %lo(__OSGlobalIntMask) # handwritten instruction
|
||||
/* 41ED4 80066AD4 8F5A0000 */ lw $k0, 0x0($k0) # handwritten instruction
|
||||
/* 41ED8 80066AD8 001AD402 */ srl $k0, $k0, 16
|
||||
/* 41EDC 80066ADC 3C01FFFF */ lui $at, (0xFFFFFFFF >> 16)
|
||||
/* 41EE0 80066AE0 3421FFFF */ ori $at, $at, (0xFFFFFFFF & 0xFFFF)
|
||||
#else
|
||||
/* 46538 8006B138 275A5900 */ addiu $k0, $k0, %lo(__OSGlobalIntMask)
|
||||
/* 4653C 8006B13C 8F5A0000 */ lw $k0, ($k0)
|
||||
/* 46540 8006B140 001AD402 */ srl $k0, $k0, 0x10
|
||||
/* 46544 8006B144 2401FFFF */ addiu $at, $zero, -1
|
||||
#endif
|
||||
/* 46548 8006B148 0341D026 */ xor $k0, $k0, $at
|
||||
/* 4654C 8006B14C 335A003F */ andi $k0, $k0, 0x3f
|
||||
/* 46550 8006B150 8CA80128 */ lw $t0, 0x128($a1)
|
||||
@ -609,7 +815,11 @@ glabel __osEnqueueAndYield
|
||||
/* 46570 8006B170 00000000 */ nop
|
||||
|
||||
glabel __osEnqueueThread
|
||||
#ifdef BBPLAYER
|
||||
/* 41F10 80066B10 0080C82D */ daddu $t9, $a0, $zero
|
||||
#else
|
||||
/* 46574 8006B174 0080C821 */ addu $t9, $a0, $zero
|
||||
#endif
|
||||
/* 46578 8006B178 8C980000 */ lw $t8, ($a0)
|
||||
/* 4657C 8006B17C 8CAF0004 */ lw $t7, 4($a1)
|
||||
/* 46580 8006B180 8F0E0004 */ lw $t6, 4($t8)
|
||||
@ -617,7 +827,11 @@ glabel __osEnqueueThread
|
||||
/* 46588 8006B188 14200007 */ bnez $at, .L8006B1A8
|
||||
/* 4658C 8006B18C 00000000 */ nop
|
||||
.L8006B190:
|
||||
#ifdef BBPLAYER
|
||||
/* 41F2C 80066B2C 0300C82D */ daddu $t9, $t8, $zero
|
||||
#else
|
||||
/* 46590 8006B190 0300C821 */ addu $t9, $t8, $zero
|
||||
#endif
|
||||
/* 46594 8006B194 8F180000 */ lw $t8, ($t8)
|
||||
/* 46598 8006B198 8F0E0004 */ lw $t6, 4($t8)
|
||||
/* 4659C 8006B19C 01CF082A */ slt $at, $t6, $t7
|
||||
@ -640,16 +854,29 @@ glabel __osPopThread
|
||||
|
||||
glabel __osDispatchThread
|
||||
/* 465D4 8006B1D4 3C048009 */ lui $a0, %hi(__osRunQueue)
|
||||
#ifdef BBPLAYER
|
||||
/* 41F74 80066B74 64843278 */ daddiu $a0, $a0, %lo(__osRunQueue)
|
||||
/* 41F78 80066B78 0C019AD6 */ jal __osPopThread
|
||||
/* 41F7C 80066B7C 00000000 */ nop
|
||||
#else
|
||||
/* 465D8 8006B1D8 0C01AC6F */ jal __osPopThread
|
||||
/* 465DC 8006B1DC 24844658 */ addiu $a0, $a0, %lo(__osRunQueue)
|
||||
#endif
|
||||
/* 465E0 8006B1E0 3C018009 */ lui $at, %hi(__osRunningThread)
|
||||
/* 465E4 8006B1E4 AC224660 */ sw $v0, %lo(__osRunningThread)($at)
|
||||
/* 465E8 8006B1E8 24080004 */ addiu $t0, $zero, 4
|
||||
/* 465EC 8006B1EC A4480010 */ sh $t0, 0x10($v0)
|
||||
#ifdef BBPLAYER
|
||||
/* 41F90 80066B90 0040D02D */ daddu $k0, $v0, $zero
|
||||
/* 41F94 80066B94 8F5B0118 */ lw $k1, 0x118($k0) # handwritten instruction
|
||||
/* 41F98 80066B98 3C088009 */ lui $t0, %hi(__OSGlobalIntMask)
|
||||
/* 41F9C 80066B9C 650845B4 */ daddiu $t0, $t0, %lo(__OSGlobalIntMask)
|
||||
#else
|
||||
/* 465F0 8006B1F0 0040D021 */ addu $k0, $v0, $zero
|
||||
/* 465F4 8006B1F4 8F5B0118 */ lw $k1, 0x118($k0)
|
||||
/* 465F8 8006B1F8 3C088009 */ lui $t0, %hi(__OSGlobalIntMask)
|
||||
/* 465FC 8006B1FC 25085900 */ addiu $t0, $t0, %lo(__OSGlobalIntMask)
|
||||
#endif
|
||||
/* 46600 8006B200 8D080000 */ lw $t0, ($t0)
|
||||
/* 46604 8006B204 3108FF00 */ andi $t0, $t0, 0xff00
|
||||
/* 46608 8006B208 3369FF00 */ andi $t1, $k1, 0xff00
|
||||
@ -718,13 +945,23 @@ glabel __osDispatchThread
|
||||
.L8006B304:
|
||||
/* 46704 8006B304 8F5B0128 */ lw $k1, 0x128($k0)
|
||||
/* 46708 8006B308 3C1A8009 */ lui $k0, %hi(__OSGlobalIntMask)
|
||||
#ifdef BBPLAYER
|
||||
/* 420AC 80066CAC 675A45B4 */ daddiu $k0, $k0, %lo(__OSGlobalIntMask) # handwritten instruction
|
||||
/* 420B0 80066CB0 8F5A0000 */ lw $k0, 0x0($k0) # handwritten instruction
|
||||
/* 420B4 80066CB4 001AD402 */ srl $k0, $k0, 16
|
||||
/* 420B8 80066CB8 037AD824 */ and $k1, $k1, $k0
|
||||
/* 420BC 80066CBC 001BD840 */ sll $k1, $k1, 1
|
||||
/* 420C0 80066CC0 3C1A800A */ lui $k0, %hi(__osRcpImTable) # handwritten instruction
|
||||
/* 420C4 80066CC4 675A8900 */ daddiu $k0, $k0, %lo(__osRcpImTable) # handwritten instruction
|
||||
#else
|
||||
/* 4670C 8006B30C 275A5900 */ addiu $k0, $k0, %lo(__OSGlobalIntMask)
|
||||
/* 46710 8006B310 8F5A0000 */ lw $k0, ($k0)
|
||||
/* 46714 8006B314 001AD402 */ srl $k0, $k0, 0x10
|
||||
/* 46718 8006B318 037AD824 */ and $k1, $k1, $k0
|
||||
/* 4671C 8006B31C 001BD840 */ sll $k1, $k1, 1
|
||||
/* 46720 8006B320 3C1A800A */ lui $k0, %hi(D_80099AA0)
|
||||
/* 46724 8006B324 275A9AA0 */ addiu $k0, $k0, %lo(D_80099AA0)
|
||||
/* 46720 8006B320 3C1A800A */ lui $k0, %hi(__osRcpImTable)
|
||||
/* 46724 8006B324 275A9AA0 */ addiu $k0, $k0, %lo(__osRcpImTable)
|
||||
#endif
|
||||
/* 46728 8006B328 037AD821 */ addu $k1, $k1, $k0
|
||||
/* 4672C 8006B32C 977B0000 */ lhu $k1, ($k1)
|
||||
/* 46730 8006B330 3C1AA430 */ lui $k0, 0xa430
|
||||
@ -737,7 +974,12 @@ glabel __osDispatchThread
|
||||
/* 4674C 8006B34C 42000018 */ eret
|
||||
|
||||
glabel __osCleanupThread
|
||||
#ifdef BBPLAYER
|
||||
/* 420F0 80066CF0 0C01AE38 */ jal osDestroyThread
|
||||
/* 420F4 80066CF4 0000202D */ daddu $a0, $zero, $zero
|
||||
#else
|
||||
/* 46750 8006B350 00002021 */ addu $a0, $zero, $zero
|
||||
/* 46754 8006B354 0C01B254 */ jal osDestroyThread
|
||||
#endif
|
||||
/* 46758 8006B358 00000000 */ nop
|
||||
/* 4675C 8006B35C 00000000 */ nop
|
@ -2,10 +2,10 @@
|
||||
#include "PR/os_internal_flash.h"
|
||||
#include "macros.h"
|
||||
|
||||
u32 __osFlashID[4] ALIGNED(8);
|
||||
OSIoMesg __osFlashMsg ALIGNED(8);
|
||||
OSMesgQueue __osFlashMessageQ ALIGNED(8);
|
||||
OSPiHandle __osFlashHandler ALIGNED(8);
|
||||
u32 __osFlashID[4] OSALIGNED(8);
|
||||
OSIoMesg __osFlashMsg OSALIGNED(8);
|
||||
OSMesgQueue __osFlashMessageQ OSALIGNED(8);
|
||||
OSPiHandle __osFlashHandler OSALIGNED(8);
|
||||
OSMesg __osFlashMsgBuf[1];
|
||||
s32 __osFlashVersion;
|
||||
|
||||
|
@ -22,11 +22,15 @@ glabel guMtxL2F
|
||||
/* 429A8 800675A8 312EFFFF */ andi $t6, $t1, 0xffff
|
||||
/* 429AC 800675AC 01AE7825 */ or $t7, $t5, $t6
|
||||
/* 429B0 800675B0 448C2000 */ mtc1 $t4, $f4
|
||||
#ifndef BBPLAYER
|
||||
/* 429B4 800675B4 00000000 */ nop
|
||||
#endif
|
||||
/* 429B8 800675B8 468021A0 */ cvt.s.w $f6, $f4
|
||||
/* 429BC 800675BC 46003202 */ mul.s $f8, $f6, $f0
|
||||
/* 429C0 800675C0 448F5000 */ mtc1 $t7, $f10
|
||||
#ifndef BBPLAYER
|
||||
/* 429C4 800675C4 00000000 */ nop
|
||||
#endif
|
||||
/* 429C8 800675C8 46805420 */ cvt.s.w $f16, $f10
|
||||
/* 429CC 800675CC 46008482 */ mul.s $f18, $f16, $f0
|
||||
/* 429D0 800675D0 E4880000 */ swc1 $f8, ($a0)
|
@ -11,32 +11,44 @@ glabel guScale
|
||||
/* 42B00 80067700 3C014780 */ lui $at, 0x4780
|
||||
/* 42B04 80067704 44812000 */ mtc1 $at, $f4
|
||||
/* 42B08 80067708 44853000 */ mtc1 $a1, $f6
|
||||
#ifndef BBPLAYER
|
||||
/* 42B0C 8006770C 00000000 */ nop
|
||||
#endif
|
||||
/* 42B10 80067710 46043202 */ mul.s $f8, $f6, $f4
|
||||
/* 42B14 80067714 4600428D */ trunc.w.s $f10, $f8
|
||||
/* 42B18 80067718 44095000 */ mfc1 $t1, $f10
|
||||
#ifndef BBPLAYER
|
||||
/* 42B1C 8006771C 00000000 */ nop
|
||||
#endif
|
||||
/* 42B20 80067720 00095402 */ srl $t2, $t1, 0x10
|
||||
/* 42B24 80067724 000A4400 */ sll $t0, $t2, 0x10
|
||||
/* 42B28 80067728 AC880000 */ sw $t0, ($a0)
|
||||
/* 42B2C 8006772C 00095400 */ sll $t2, $t1, 0x10
|
||||
/* 42B30 80067730 AC8A0020 */ sw $t2, 0x20($a0)
|
||||
/* 42B34 80067734 44863000 */ mtc1 $a2, $f6
|
||||
#ifndef BBPLAYER
|
||||
/* 42B38 80067738 00000000 */ nop
|
||||
#endif
|
||||
/* 42B3C 8006773C 46043202 */ mul.s $f8, $f6, $f4
|
||||
/* 42B40 80067740 4600428D */ trunc.w.s $f10, $f8
|
||||
/* 42B44 80067744 44095000 */ mfc1 $t1, $f10
|
||||
#ifndef BBPLAYER
|
||||
/* 42B48 80067748 00000000 */ nop
|
||||
#endif
|
||||
/* 42B4C 8006774C 00094402 */ srl $t0, $t1, 0x10
|
||||
/* 42B50 80067750 AC880008 */ sw $t0, 8($a0)
|
||||
/* 42B54 80067754 312AFFFF */ andi $t2, $t1, 0xffff
|
||||
/* 42B58 80067758 AC8A0028 */ sw $t2, 0x28($a0)
|
||||
/* 42B5C 8006775C 44873000 */ mtc1 $a3, $f6
|
||||
#ifndef BBPLAYER
|
||||
/* 42B60 80067760 00000000 */ nop
|
||||
#endif
|
||||
/* 42B64 80067764 46043202 */ mul.s $f8, $f6, $f4
|
||||
/* 42B68 80067768 4600428D */ trunc.w.s $f10, $f8
|
||||
/* 42B6C 8006776C 44095000 */ mfc1 $t1, $f10
|
||||
#ifndef BBPLAYER
|
||||
/* 42B70 80067770 00000000 */ nop
|
||||
#endif
|
||||
/* 42B74 80067774 00095402 */ srl $t2, $t1, 0x10
|
||||
/* 42B78 80067778 000A4400 */ sll $t0, $t2, 0x10
|
||||
/* 42B7C 8006777C AC880014 */ sw $t0, 0x14($a0)
|
||||
@ -54,5 +66,3 @@ glabel guScale
|
||||
/* 42BAC 800677AC AC800038 */ sw $zero, 0x38($a0)
|
||||
/* 42BB0 800677B0 03E00008 */ jr $ra
|
||||
/* 42BB4 800677B4 AC80003C */ sw $zero, 0x3c($a0)
|
||||
/* 42BB8 800677B8 00000000 */ nop
|
||||
/* 42BBC 800677BC 00000000 */ nop
|
@ -11,12 +11,16 @@ glabel guTranslate
|
||||
/* 42C20 80067820 3C014780 */ lui $at, 0x4780
|
||||
/* 42C24 80067824 44812000 */ mtc1 $at, $f4
|
||||
/* 42C28 80067828 44853000 */ mtc1 $a1, $f6
|
||||
#ifndef BBPLAYER
|
||||
/* 42C2C 8006782C 00000000 */ nop
|
||||
#endif
|
||||
/* 42C30 80067830 46043202 */ mul.s $f8, $f6, $f4
|
||||
/* 42C34 80067834 4600428D */ trunc.w.s $f10, $f8
|
||||
/* 42C38 80067838 44095000 */ mfc1 $t1, $f10
|
||||
/* 42C3C 8006783C 44863000 */ mtc1 $a2, $f6
|
||||
#ifndef BBPLAYER
|
||||
/* 42C40 80067840 00000000 */ nop
|
||||
#endif
|
||||
/* 42C44 80067844 46043202 */ mul.s $f8, $f6, $f4
|
||||
/* 42C48 80067848 4600428D */ trunc.w.s $f10, $f8
|
||||
/* 42C4C 8006784C 440B5000 */ mfc1 $t3, $f10
|
||||
@ -31,11 +35,15 @@ glabel guTranslate
|
||||
/* 42C70 80067870 010A4025 */ or $t0, $t0, $t2
|
||||
/* 42C74 80067874 AC880038 */ sw $t0, 0x38($a0)
|
||||
/* 42C78 80067878 44873000 */ mtc1 $a3, $f6
|
||||
#ifndef BBPLAYER
|
||||
/* 42C7C 8006787C 00000000 */ nop
|
||||
#endif
|
||||
/* 42C80 80067880 46043202 */ mul.s $f8, $f6, $f4
|
||||
/* 42C84 80067884 4600428D */ trunc.w.s $f10, $f8
|
||||
/* 42C88 80067888 44095000 */ mfc1 $t1, $f10
|
||||
#ifndef BBPLAYER
|
||||
/* 42C8C 8006788C 00000000 */ nop
|
||||
#endif
|
||||
/* 42C90 80067890 00095402 */ srl $t2, $t1, 0x10
|
||||
/* 42C94 80067894 000A4400 */ sll $t0, $t2, 0x10
|
||||
/* 42C98 80067898 25080001 */ addiu $t0, $t0, 1
|
||||
@ -64,3 +72,9 @@ glabel guTranslate
|
||||
/* 42CF4 800678F4 AC880008 */ sw $t0, 8($a0)
|
||||
/* 42CF8 800678F8 00000000 */ nop
|
||||
/* 42CFC 800678FC 00000000 */ nop
|
||||
#ifdef BBPLAYER // spontaneous padding??
|
||||
/* 41290 80065E90 00000000 */ nop
|
||||
/* 41294 80065E94 00000000 */ nop
|
||||
/* 41298 80065E98 00000000 */ nop
|
||||
/* 4129C 80065E9C 00000000 */ nop
|
||||
#endif
|
@ -28,7 +28,9 @@ glabel guTranslateF
|
||||
/* 42D44 80067944 AC88003C */ sw $t0, 0x3c($a0)
|
||||
/* 42D48 80067948 00000000 */ nop
|
||||
/* 42D4C 8006794C 00000000 */ nop
|
||||
#ifndef BBPLAYER // spontaneous padding??
|
||||
/* 42D50 80067950 00000000 */ nop
|
||||
/* 42D54 80067954 00000000 */ nop
|
||||
/* 42D58 80067958 00000000 */ nop
|
||||
/* 42D5C 8006795C 00000000 */ nop
|
||||
#endif
|
@ -4,11 +4,7 @@
|
||||
#include "PR/siint.h"
|
||||
|
||||
#ifndef BBPLAYER
|
||||
/*
|
||||
static OSPifRam __MotorDataBuf[MAXCONTROLLERS] ALIGNED(8);
|
||||
*/
|
||||
|
||||
extern OSPifRam __MotorDataBuf[MAXCONTROLLERS];
|
||||
static OSPifRam __MotorDataBuf[MAXCONTROLLERS] OSALIGNED(8);
|
||||
#endif
|
||||
|
||||
#define READFORMAT(ptr) ((__OSContRamReadFormat*)(ptr))
|
||||
|
@ -5,10 +5,12 @@
|
||||
|
||||
NOP_FIX
|
||||
|
||||
SHIFT_BSS u64 nuMainStack[NU_SC_STACK_SIZE / sizeof(u64)];
|
||||
SHIFT_BSS u64 IdleStack[NU_SC_STACK_SIZE / sizeof(u64)];
|
||||
SHIFT_BSS OSThread IdleThread; // idle thread, id 1
|
||||
SHIFT_BSS OSThread MainThread; // id 3
|
||||
u64 nuMainStack[NU_SC_STACK_SIZE / sizeof(u64)];
|
||||
static OSThread IdleThread; // idle thread, id 1
|
||||
static OSThread MainThread; // id 3
|
||||
static u64 IdleStack[NU_SC_STACK_SIZE / sizeof(u64)];
|
||||
|
||||
void (*nuIdleFunc)(void);
|
||||
|
||||
void nuBoot(void) {
|
||||
osInitialize();
|
||||
|
@ -3,6 +3,17 @@
|
||||
|
||||
NOP_FIX
|
||||
|
||||
OSMesgQueue nuContWaitMesgQ;
|
||||
static OSMesg nuContWaitMesgBuf;
|
||||
OSMesgQueue nuContDataMutexQ;
|
||||
static OSMesg nuContDataMutexBuf;
|
||||
OSContStatus nuContStatus[NU_CONT_MAXCONTROLLERS];
|
||||
OSContPad nuContData[NU_CONT_MAXCONTROLLERS];
|
||||
u32 nuContNum;
|
||||
u32 nuContDataLockKey;
|
||||
|
||||
OSPfs nuContPfs[NU_CONT_MAXCONTROLLERS];
|
||||
|
||||
static s32 contRetrace(NUSiCommonMesg* mesg);
|
||||
static s32 contRead(NUSiCommonMesg* mesg);
|
||||
static s32 contReadNW(NUSiCommonMesg* mesg);
|
||||
@ -21,10 +32,6 @@ static s32 (*funcList[])(NUSiCommonMesg*) = {
|
||||
|
||||
NUCallBackList nuContCallBack = { NULL, funcList, NU_SI_MAJOR_NO_CONT };
|
||||
|
||||
extern OSMesg nuContWaitMesgBuf;
|
||||
extern OSMesg nuContDataMutexBuf;
|
||||
extern OSMesgQueue nuContDataMutexQ;
|
||||
|
||||
u8 nuContMgrInit(void) {
|
||||
s32 i;
|
||||
u8 pattern;
|
||||
|
@ -1,6 +1,9 @@
|
||||
#include "common.h"
|
||||
#include "nu/nusys.h"
|
||||
|
||||
NUContRmbCtl nuContRmbCtl[NU_CONT_MAXCONTROLLERS];
|
||||
u32 nuContRmbSearchTime = NU_CONT_RMB_AUTO_SEARCHTIME;
|
||||
|
||||
s32 contRmbRetrace(NUSiCommonMesg* mesg);
|
||||
s32 contRmbCheckMesg(NUSiCommonMesg* mesg);
|
||||
s32 contRmbStartMesg(NUSiCommonMesg* mesg);
|
||||
@ -8,8 +11,6 @@ s32 contRmbStopMesg(NUSiCommonMesg* mesg);
|
||||
s32 contRmbForceStopMesg(NUSiCommonMesg* mesg);
|
||||
s32 contRmbForceStopEndMesg(NUSiCommonMesg* mesg);
|
||||
|
||||
u32 nuContRmbSearchTime = 300;
|
||||
|
||||
s32 (*D_80093CE4[])(NUSiCommonMesg*) = {
|
||||
contRmbRetrace, contRmbCheckMesg, contRmbStartMesg, contRmbStopMesg, contRmbForceStopMesg, contRmbForceStopEndMesg,
|
||||
NULL
|
||||
|
@ -6,18 +6,25 @@ NUGfxSwapCfbFunc nuGfxSwapCfbFunc = NULL;
|
||||
NUGfxTaskEndFunc nuGfxTaskEndFunc = NULL;
|
||||
u16 beforeFlag = 0;
|
||||
|
||||
extern OSMesg D_8009E6D0[NU_GFX_TASKMGR_MESGS];
|
||||
extern OSMesgQueue D_800DAC90;
|
||||
extern NUScTask* nuGfxTask_ptr;
|
||||
extern s16 taskDoneMsg;
|
||||
extern s16 swapBufMsg;
|
||||
extern OSThread GfxTaskMgrThread;
|
||||
extern NUScTask nuGfxTask[NU_GFX_TASK_NUM];
|
||||
extern s32 D_800DA040;
|
||||
extern s32 D_800B91D0[NU_GFX_RDP_OUTPUTBUFF_SIZE / sizeof(u32)];
|
||||
extern u64 GfxTaskMgrStack[NU_GFX_TASKMGR_STACK_SIZE / sizeof(u64)];
|
||||
static NUScTask* nuGfxTask_ptr;
|
||||
static s16 taskDoneMsg;
|
||||
static s16 swapBufMsg;
|
||||
static OSThread GfxTaskMgrThread;
|
||||
static u64 GfxTaskMgrStack[NU_GFX_TASKMGR_STACK_SIZE / sizeof(u64)] ALIGNED(16);
|
||||
static OSMesg D_8009E6D0[NU_GFX_TASKMGR_MESGS];
|
||||
|
||||
NUScTask nuGfxTask[NU_GFX_TASK_NUM];
|
||||
u64 D_800DA040[0x400 / sizeof(u64)];
|
||||
s32 D_800B91D0[NU_GFX_RDP_OUTPUTBUFF_SIZE / sizeof(u32)];
|
||||
|
||||
extern u8 rspbootUcodeBuffer[];
|
||||
|
||||
u32 nuGfxCfbCounter;
|
||||
u32 nuGfxDisplay;
|
||||
NUUcode* nuGfxUcode;
|
||||
volatile u32 nuGfxTaskSpool;
|
||||
OSMesgQueue D_800DAC90;
|
||||
|
||||
void nuGfxTaskMgr(void* data) {
|
||||
NUScTask* task;
|
||||
s16* msg;
|
||||
|
@ -5,10 +5,11 @@ void gfxThread(void*);
|
||||
|
||||
NUGfxFunc nuGfxFunc = NULL;
|
||||
NUGfxPreNMIFunc nuGfxPreNMIFunc = NULL;
|
||||
OSMesgQueue nuGfxMesgQ;
|
||||
static OSMesg nuGfxMesgBuf[NU_GFX_MESGS];
|
||||
static char GfxStack[NU_GFX_STACK_SIZE];
|
||||
|
||||
extern char GfxStack[NU_GFX_STACK_SIZE];
|
||||
extern OSThread D_800B1B90;
|
||||
extern OSMesg nuGfxMesgBuf[NU_GFX_MESGS];
|
||||
OSThread D_800B1B90;
|
||||
|
||||
void nuGfxThreadStart(void) {
|
||||
osCreateThread(&D_800B1B90, 4, gfxThread, NULL, &GfxStack[NU_GFX_STACK_SIZE], NU_GFX_THREAD_PRI);
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user