mirror of https://github.com/zeldaret/mm.git
more cleanup
This commit is contained in:
parent
749c2674d4
commit
3bd7a84c1c
|
|
@ -202,7 +202,7 @@ extern OSPifRam __osContPifRam;
|
|||
extern u8 __osContLastPoll;
|
||||
extern u8 __osMaxControllers;
|
||||
extern OSMesgQueue __osEepromTimerQ;
|
||||
extern OSMesg __osEepromTimerMsg;
|
||||
extern OSMesg __osEepromTimerMsg[];
|
||||
extern OSPifRam __osPfsPifRam;
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -6,19 +6,9 @@
|
|||
#include "os_pi.h"
|
||||
|
||||
|
||||
typedef struct {
|
||||
typedef struct __osHwInt {
|
||||
/* 0x00 */ OSMesgQueue* queue;
|
||||
/* 0x04 */ OSMesg msg;
|
||||
} __osHwInt; // size = 0x08
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u32 initialized;
|
||||
/* 0x04 */ OSThread* mgrThread;
|
||||
/* 0x08 */ OSMesgQueue* cmdQueue;
|
||||
/* 0x0C */ OSMesgQueue* eventQueue;
|
||||
/* 0x10 */ OSMesgQueue* accessQueue;
|
||||
/* 0x14 */ s32 (*piDmaCallback)(s32, uintptr_t, void*, size_t);
|
||||
/* 0x18 */ s32 (*epiDmaCallback)(OSPiHandle*, s32, uintptr_t, void*, size_t);
|
||||
} OSMgrArgs; // size = 0x1C
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -60,8 +60,8 @@ typedef struct {
|
|||
/* 0x14 */ OSPiHandle* piHandle;
|
||||
} OSIoMesg; // size = 0x88
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ s32 active; // u32 maybe? need to check
|
||||
typedef struct OSDevMgr {
|
||||
/* 0x00 */ s32 active;
|
||||
/* 0x04 */ OSThread* thread;
|
||||
/* 0x08 */ OSMesgQueue* cmdQueue;
|
||||
/* 0x0C */ OSMesgQueue* evtQueue;
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ void __osTimerServicesInit(void);
|
|||
extern __osHwInt __osHwIntTable[];
|
||||
extern __OSEventState __osEventStateTab[OS_NUM_EVENTS];
|
||||
|
||||
extern OSThread* __osThreadTail;
|
||||
extern __OSThreadTail __osThreadTail;
|
||||
extern OSThread* __osRunQueue;
|
||||
extern OSThread* __osActiveQueue;
|
||||
extern OSThread* __osRunningThread;
|
||||
|
|
|
|||
|
|
@ -23,9 +23,4 @@ extern u64 gspF3DZEX2_NoN_PosLight_fifoTextEnd[];
|
|||
extern u64 gspF3DZEX2_NoN_PosLight_fifoDataStart[];
|
||||
extern u64 gspF3DZEX2_NoN_PosLight_fifoDataEnd[];
|
||||
|
||||
extern u64 gspS2DEX2_fifoTextStart[];
|
||||
extern u64 gspS2DEX2_fifoTextEnd[];
|
||||
extern u64 gspS2DEX2_fifoDataStart[];
|
||||
extern u64 gspS2DEX2_fifoDataEnd[];
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -76,7 +76,6 @@ extern u32 sRandFloat;
|
|||
|
||||
extern DmaEntry dmadata[1568];
|
||||
// extern UNK_TYPE1 D_80186028;
|
||||
extern u64 aspMainTextStart[];
|
||||
|
||||
extern u8 sDropTable[DROP_TABLE_SIZE * DROP_TABLE_NUMBER];
|
||||
extern u8 sDropTableAmounts[DROP_TABLE_SIZE * DROP_TABLE_NUMBER];
|
||||
|
|
|
|||
|
|
@ -42,15 +42,20 @@
|
|||
|
||||
#include "fault_internal.h"
|
||||
#include "fault.h"
|
||||
#include "global.h"
|
||||
#include "prevent_bss_reordering.h"
|
||||
#include "prevent_bss_reordering2.h"
|
||||
#include "vt.h"
|
||||
#include "PR/osint.h"
|
||||
#include "stackcheck.h"
|
||||
#include "z64thread.h"
|
||||
#include "main.h"
|
||||
#include "macros.h"
|
||||
#include "global.h"
|
||||
|
||||
FaultMgr* sFaultInstance;
|
||||
f32 sFaultTimeTotal; // read but not set anywhere
|
||||
|
||||
|
||||
// data
|
||||
const char* sCpuExceptions[] = {
|
||||
"Interrupt",
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
#include "prevent_bss_reordering.h"
|
||||
#include "global.h"
|
||||
#include "z64collision_check.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#include "PR/ultratypes.h"
|
||||
#include "prevent_bss_reordering.h"
|
||||
#include "PR/ultratypes.h"
|
||||
#include "prevent_bss_reordering2.h"
|
||||
|
||||
// Variables are put before most headers as a hacky way to bypass bss reordering
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
#include "global.h"
|
||||
#include "PR/gs2dex.h"
|
||||
#include "sys_cfb.h"
|
||||
#include "z64snap.h"
|
||||
#include "z64view.h"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
#include "global.h"
|
||||
#include "PR/gs2dex.h"
|
||||
#include "debug.h"
|
||||
|
||||
void Room_Noop(PlayState* play, Room* room, Input* input, s32 arg3) {
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ s32 __osPiRawStartDma(s32 direction, uintptr_t devAddr, void* dramAddr, size_t s
|
|||
|
||||
HW_REG(PI_DRAM_ADDR_REG, u32) = osVirtualToPhysical(dramAddr);
|
||||
|
||||
HW_REG(PI_CART_ADDR_REG, u32) = ((osRomBase | devAddr) & 0x1FFFFFFF);
|
||||
HW_REG(PI_CART_ADDR_REG, u32) = K1_TO_PHYS((uintptr_t)osRomBase | devAddr);
|
||||
|
||||
switch (direction) {
|
||||
case OS_READ:
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ OSMesgQueue viEventQueue;
|
|||
OSMesg viEventBuf[6];
|
||||
OSIoMesg viRetraceMsg;
|
||||
OSIoMesg viCounterMsg;
|
||||
OSMgrArgs __osViDevMgr = { 0 };
|
||||
OSDevMgr __osViDevMgr = { 0 };
|
||||
u32 __additional_scanline = 0;
|
||||
|
||||
void viMgrMain(void*);
|
||||
|
|
@ -19,7 +19,7 @@ void osCreateViManager(OSPri pri) {
|
|||
OSPri newPri;
|
||||
OSPri currentPri;
|
||||
|
||||
if (!__osViDevMgr.initialized) {
|
||||
if (!__osViDevMgr.active) {
|
||||
__osTimerServicesInit();
|
||||
__additional_scanline = 0;
|
||||
osCreateMesgQueue(&viEventQueue, viEventBuf, ARRAY_COUNT(viEventBuf) - 1);
|
||||
|
|
@ -39,11 +39,11 @@ void osCreateViManager(OSPri pri) {
|
|||
}
|
||||
|
||||
prevInt = __osDisableInt();
|
||||
__osViDevMgr.initialized = true;
|
||||
__osViDevMgr.mgrThread = &viThread;
|
||||
__osViDevMgr.active = true;
|
||||
__osViDevMgr.thread = &viThread;
|
||||
__osViDevMgr.cmdQueue = &viEventQueue;
|
||||
__osViDevMgr.eventQueue = &viEventQueue;
|
||||
__osViDevMgr.accessQueue = NULL;
|
||||
__osViDevMgr.evtQueue = &viEventQueue;
|
||||
__osViDevMgr.acsQueue = NULL;
|
||||
__osViDevMgr.piDmaCallback = NULL;
|
||||
__osViDevMgr.epiDmaCallback = NULL;
|
||||
|
||||
|
|
@ -58,7 +58,7 @@ void osCreateViManager(OSPri pri) {
|
|||
}
|
||||
|
||||
void viMgrMain(void* vargs) {
|
||||
OSMgrArgs* args;
|
||||
OSDevMgr* args;
|
||||
static u16 viRetrace;
|
||||
u32 addTime;
|
||||
OSIoMesg* mesg;
|
||||
|
|
@ -70,10 +70,10 @@ void viMgrMain(void* vargs) {
|
|||
viRetrace = 1;
|
||||
}
|
||||
|
||||
args = (OSMgrArgs*)vargs;
|
||||
args = (OSDevMgr*)vargs;
|
||||
|
||||
while (true) {
|
||||
osRecvMesg(args->eventQueue, (OSMesg*)&mesg, OS_MESG_BLOCK);
|
||||
osRecvMesg(args->evtQueue, (OSMesg*)&mesg, OS_MESG_BLOCK);
|
||||
switch (mesg->hdr.type) {
|
||||
case OS_MESG_TYPE_VRETRACE:
|
||||
__osViSwapContext();
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ char udigs[] = "0123456789ABCDEF";
|
|||
|
||||
void _Litob(_Pft* args, u8 type) {
|
||||
u8 buff[BUFF_LEN];
|
||||
const u8* numMap;
|
||||
const char* numMap;
|
||||
s32 base;
|
||||
s32 idx;
|
||||
u64 num;
|
||||
|
|
|
|||
|
|
@ -49,7 +49,6 @@
|
|||
* - Seaweed
|
||||
*/
|
||||
|
||||
#include "prevent_bss_reordering.h"
|
||||
#include "z_boss_03.h"
|
||||
#include "overlays/actors/ovl_Door_Warp1/z_door_warp1.h"
|
||||
#include "overlays/actors/ovl_En_Water_Effect/z_en_water_effect.h"
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
* Description: Fishing Pond Elements (Owner, Fish, Props, Effects...)
|
||||
*/
|
||||
|
||||
#include "prevent_bss_reordering.h"
|
||||
#include "z_en_fishing.h"
|
||||
#include "z64rumble.h"
|
||||
#include "z64shrink_window.h"
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
* Description: Pause Menu
|
||||
*/
|
||||
|
||||
#include "prevent_bss_reordering.h"
|
||||
#include "z_kaleido_scope.h"
|
||||
#include "z64view.h"
|
||||
#include "overlays/gamestates/ovl_opening/z_opening.h"
|
||||
|
|
|
|||
Loading…
Reference in New Issue