Compare commits
58 Commits
6dde5925bc
...
b136e35f4a
| Author | SHA1 | Date |
|---|---|---|
|
|
b136e35f4a | |
|
|
1243f13789 | |
|
|
10c83abcbf | |
|
|
f52d20844a | |
|
|
5dd734bf29 | |
|
|
8db75358f7 | |
|
|
ff290348c5 | |
|
|
a8f58de733 | |
|
|
ca62a08c7c | |
|
|
9e68866aae | |
|
|
ad71a118fe | |
|
|
3896f82bbc | |
|
|
6eb644c5cf | |
|
|
12496030a6 | |
|
|
15d4b20eba | |
|
|
f16e493d79 | |
|
|
02e99d32be | |
|
|
56ba9040f4 | |
|
|
094f68127e | |
|
|
73120a55ab | |
|
|
031744cb02 | |
|
|
f4de78e2da | |
|
|
9d669a11af | |
|
|
42c160f7b9 | |
|
|
f0b15433cb | |
|
|
5c2961c461 | |
|
|
2c7212d9b0 | |
|
|
753eb5a7dc | |
|
|
d3f8360be2 | |
|
|
25048fc641 | |
|
|
281135d82e | |
|
|
38563897a2 | |
|
|
8c7ba403cb | |
|
|
32951b17af | |
|
|
bf6619caf3 | |
|
|
d781c0572c | |
|
|
7987a3fc72 | |
|
|
a330ca4ecb | |
|
|
abe6017825 | |
|
|
eb57aa31f3 | |
|
|
33d37c4963 | |
|
|
050d7e737d | |
|
|
6327ab0fda | |
|
|
cb11271360 | |
|
|
efdfc38a41 | |
|
|
9349cf282c | |
|
|
e0f5679536 | |
|
|
7df2c30851 | |
|
|
7b0cc70821 | |
|
|
ae6fa1fd91 | |
|
|
e5dc3321ea | |
|
|
319b8ff320 | |
|
|
a0962ddc83 | |
|
|
8a2ea4b2ca | |
|
|
fa955ceb38 | |
|
|
d9165a5c5b | |
|
|
1c01e29331 | |
|
|
b8247208a5 |
|
|
@ -129,35 +129,18 @@ extern void* musCurrentPtrBank;
|
|||
extern void* D_800B1828;
|
||||
|
||||
extern s32 D_800E8B14;
|
||||
extern s32 __SCREEN_IS_NOT_BLACK;
|
||||
extern s32 D_800A9EB0;
|
||||
extern s32 __SOMETHING_FRAMEBUFFERS;
|
||||
extern s32 D_800C4B20;
|
||||
extern void* D_800C4CE0;
|
||||
extern s32 D_A9EF0;
|
||||
extern s32 D_800C4B30;
|
||||
|
||||
extern OSPiHandle* CART_HANDLE;
|
||||
extern OSMesgQueue MQ_800BE030;
|
||||
extern OSMesg OSMESG_800BE048[0x32];
|
||||
extern OSThread THREAD_CONTROLLER;
|
||||
|
||||
extern s32 __SCREEN_IS_NOT_BLACK;
|
||||
extern OSMesg D_800BBE60[8];
|
||||
|
||||
extern OSMesgQueue MQ_CONTROLLER;
|
||||
extern OSMesgQueue MQ_800E7988;
|
||||
extern OSThread THREAD_CONTROLLER;
|
||||
|
||||
extern OSPiHandle* PTR_CART_ROM_HANDLE;
|
||||
|
||||
extern s32 D_800C4B30;
|
||||
extern OSMesgQueue MQ_CONTROLLER;
|
||||
extern OSMesgQueue MQ_800E9BF0;
|
||||
extern u8 D_800A9FF8;
|
||||
|
||||
extern OSContStatus __GLOBAL_CONT_STATUS[MAXCONTROLLERS];
|
||||
extern OSMesgQueue MQ_CONTROLLER;
|
||||
extern void (*D_800A9FE0)(s16);
|
||||
extern OSMesgQueue MQ_800C4A00;
|
||||
|
||||
|
|
@ -167,18 +150,10 @@ extern OSContPad __GLOBAL_CONTROLLER_DATA_COPY[MAXCONTROLLERS];
|
|||
extern u8 D_800AA040;
|
||||
extern void (*SWAP_BUFFER_FUNC_800A9E8C)(void** buffers);
|
||||
|
||||
extern void (*D_800AA090)(s32);
|
||||
extern void (*D_800AA094)();
|
||||
extern s32 D_800E79A4;
|
||||
extern OSMesgQueue MQ_800C4C28;
|
||||
extern OSMesg OSMESG_800BE1A0[8];
|
||||
extern u8 SP_THREAD_800BE1C0[1];
|
||||
extern OSThread THREAD_800BE1C0;
|
||||
extern void* D_800AA41C;
|
||||
extern u8 D_594284;
|
||||
|
||||
extern void (*SWAP_BUFFER_FUNC)(void** buffers);
|
||||
|
||||
extern Stack__dma_load_loop *D_800E9178[0];
|
||||
extern u8 nuScPreNMIFlag;
|
||||
extern OSMesgQueue MQ_800B9C40;
|
||||
|
|
@ -186,25 +161,11 @@ extern s8 D_800E918D;
|
|||
|
||||
|
||||
extern void romCopy(u32 devAddr, void* dramAddr, u32 size, s32 direction);
|
||||
extern void romCopy_512(void* src, void* dst, u32 len);
|
||||
extern void __calls_romCopy_8009DA50(void* src, void* dst, u32 len);
|
||||
|
||||
extern void nuPiInit();
|
||||
|
||||
extern void __set_black();
|
||||
extern void __calls_osViBlack(bool black);
|
||||
|
||||
extern void __start_thread_800B9C88();
|
||||
extern void __start_thread_800BE1C0();
|
||||
|
||||
extern void __something_display_list(Gfx*, s32, s32, s32);
|
||||
extern void func_80089A10();
|
||||
|
||||
extern void __osViSwapBuffer_3(void** buffers);
|
||||
extern void set_swap_buffer_func(void (*arg0)(void**));
|
||||
|
||||
extern s32 func_80089CF8(s16 arg0, s32 arg1);
|
||||
extern void __controller_thread_80089D9C(void*);
|
||||
|
||||
extern void __start_copy_global_controller_data(void);
|
||||
extern void __end_copy_global_controller_data(void);
|
||||
|
|
@ -219,9 +180,6 @@ extern void func_8008A37C();
|
|||
extern void func_8008B130(u8*);
|
||||
extern void func_8008B1D0(u8*);
|
||||
|
||||
extern void __start_thread_800BE1C0(void);
|
||||
extern void __thread_8008AFE0(void*);
|
||||
|
||||
extern void func_8008350C();
|
||||
extern void func_8008B1D0(u8*);
|
||||
|
||||
|
|
@ -350,17 +308,11 @@ extern void AddHeap(void* start, u32 length);
|
|||
extern void __some_logging(const char* format, ...);
|
||||
|
||||
extern void nuBoot(void);
|
||||
extern void nuScCreateScheduler(u8 videoMode, u8 numFields);
|
||||
extern void (*nuIdleFunc)();
|
||||
|
||||
extern void obIdle(void*);
|
||||
extern void obMain(void*);
|
||||
|
||||
extern OSThread obThreadMain;
|
||||
// extern u8 obStackMain[];
|
||||
|
||||
extern OSThread obThreadIdle;
|
||||
extern u8 obStackIdle[];
|
||||
|
||||
extern OverlaySomething __OVERLAY_INFO_resets_menu_timer;
|
||||
extern void* D_8018FB0C[];
|
||||
|
|
@ -637,6 +589,4 @@ extern void obSetCurrentTime(u32 time);
|
|||
extern u32 obGetCurrentTime();
|
||||
extern f32 obGetCurrentTimeF();
|
||||
|
||||
extern Gfx DISPLAY_LIST_800A9EF0[];
|
||||
|
||||
#endif
|
||||
|
|
@ -467,7 +467,7 @@ typedef void (*NUScPreNMIFunc)(void); /* Pointer to PRENMI callback function */
|
|||
typedef void (*NUGfxFunc)(u32); /* Pointer to the GFX retrace callback function */
|
||||
typedef void (*NUGfxPreNMIFunc)(void); /* Pointer to the GFX PRENMI callback function */
|
||||
|
||||
typedef void (*NUGfxSwapCfbFunc)(void*);/* Pointer to the SWAPBUF callback function */
|
||||
typedef void (*NUGfxSwapCfbFunc)(NUScTask*);/* Pointer to the SWAPBUF callback function */
|
||||
typedef void (*NUGfxTaskEndFunc)(void*);/* Pointer to the TASKEND callback function */
|
||||
typedef void (*NUContReadFunc)(u32); /* Pointer to the Controller end-read */
|
||||
/* callback function */
|
||||
|
|
@ -663,6 +663,7 @@ extern u8 nuDramStack[];
|
|||
extern u8 nuYieldBuf[];
|
||||
extern NUSched nusched; /* Scheduler structure */
|
||||
extern OSMesgQueue nuGfxMesgQ; /* Graphics thread queue */
|
||||
extern OSMesg nuGfxMesgBuf[NU_GFX_MESGS];
|
||||
extern u32 nuScRetraceCounter; /* Retrace counter */
|
||||
extern u8 nuScPreNMIFlag;
|
||||
/*--------------------------------------*/
|
||||
|
|
@ -676,7 +677,6 @@ extern u16* nuGfxZBuffer; /* Pointer to the Z buffer */
|
|||
extern volatile u32 nuGfxTaskSpool; /* Number of tasks in queue */
|
||||
extern u32 nuGfxDisplay; /* Display on/off flag */
|
||||
extern u32 nuGfxCfbCounter; /* For frame buffer swapping */
|
||||
//extern OSMesgQueue nuGfxMesgQ;
|
||||
extern OSThread nuGfxThread; /* graphic thread */
|
||||
|
||||
/*--------------------------------------*/
|
||||
|
|
@ -720,12 +720,16 @@ extern NUCallBackList nuVrsCallBack;
|
|||
/* si variables */
|
||||
/*--------------------------------------*/
|
||||
extern OSMesgQueue nuSiMesgQ; /* SI event message queue */
|
||||
extern OSMesg nuSiMesgBuf[NU_SC_MAX_MESGS];
|
||||
extern OSThread siMgrThread;
|
||||
extern OSMesgQueue nuSiMgrMesgQ; /* SI Manager queue */
|
||||
extern NUCallBackList* nuSiCallBackList;/* Callback function list */
|
||||
|
||||
/*--------------------------------------*/
|
||||
/* pi variables */
|
||||
/*--------------------------------------*/
|
||||
extern OSMesgQueue nuPiMgrMesgQ; /* PI Manager queue */
|
||||
extern OSMesg nuPiMesgBuf[NU_PI_MESG_NUM];
|
||||
extern OSPiHandle* nuPiCartHandle;
|
||||
extern OSPiHandle* nuPiSramHandle;
|
||||
extern OSPiHandle* nuPiDDRomHandle;
|
||||
|
|
@ -787,7 +791,7 @@ extern void nuGfxFuncSet(NUGfxFunc func);
|
|||
extern void nuGfxPreNMIFuncSet(NUGfxPreNMIFunc func);
|
||||
extern void nuGfxSwapCfbFuncSet(NUGfxSwapCfbFunc func);
|
||||
extern void nuGfxSetCfb(u16** framebuf, u32 framebufnum);
|
||||
extern void nuGfxSwapCfb(void* framebuffer);
|
||||
extern void nuGfxSwapCfb(NUScTask* task);
|
||||
|
||||
extern void nuGfxTaskEndFuncSet(NUGfxTaskEndFunc func);
|
||||
extern void nuGfxTaskAllEndWait(void);
|
||||
|
|
@ -890,10 +894,10 @@ extern s32 nuEepromWrite(u8 address, u8* buffer,u16 len);
|
|||
/* pi functions */
|
||||
/*--------------------------------------*/
|
||||
extern void nuPiInit(void);
|
||||
extern void nuPiReadRom(u32 rom_addr, void* buf_ptr, u32 size);
|
||||
extern void nuPiReadRom(void* src, void* dst, u32 size);
|
||||
extern void nuPiInitSram(void);
|
||||
extern void nuPiInitDDrom(void);
|
||||
extern void nuPiReadWriteSram(u32 addr, void* buf_ptr, u32 size, s32 flag);
|
||||
extern void nuPiReadWriteSram(u32 src, void* dst, u32 size, s32 flag);
|
||||
extern void nuPiReadRomOverlay(NUPiOverlaySegment* segment);
|
||||
|
||||
/*--------------------------------------*/
|
||||
|
|
@ -988,7 +992,7 @@ extern void nuDebConPrintf(u32 wndNo, const char* fmt, ...);
|
|||
/*----------------------------------------------------------------------*/
|
||||
#define nuGfxSetZBuffer(ZBuf_p) \
|
||||
{ \
|
||||
nuGfxZBuffer = ZBuf_p; \
|
||||
nuGfxZBuffer = (u16*)ZBuf_p; \
|
||||
}
|
||||
/*----------------------------------------------------------------------*/
|
||||
/* Remove callback functions */
|
||||
|
|
|
|||
|
|
@ -6,6 +6,31 @@ nuGfxCfb = 0x800E8290;
|
|||
nuGfxCfbNum = 0x800A9E80;
|
||||
nuGfxCfbCounter = 0x800C4BC4;
|
||||
nuGfxCfb_ptr = 0x800E8210;
|
||||
nuGfxMesgQ = 0x800C4C28;
|
||||
nuGfxMesgBuf = 0x800BE1A0;
|
||||
nuGfxFunc = 0x800AA090;
|
||||
nuGfxPreNMIFunc = 0x800AA094;
|
||||
nuGfxTaskSpool = 0x800E79A4;
|
||||
nuGfxThread = 0x800BE1C0;
|
||||
nuGfxSwapCfbFunc = 0x800A9E84;
|
||||
nuGfxSwapCfb = 0x8008B110;
|
||||
nuGfxZBuffer = 0x800C4B20;
|
||||
nuGfxUcode = 0x800C4CE0;
|
||||
nugfx_ucode = 0x800A9EB0;
|
||||
FrameBuf = 0x800A9EE0; // rom:0x3A2E0 size:0xC
|
||||
gFrameBuf0 = 0x8038F800;
|
||||
gFrameBuf1 = 0x803B5000;
|
||||
gFrameBuf2 = 0x803DA800;
|
||||
rdpstateinit_dl = 0x800A9EF0; // rom:0x3A2F0
|
||||
nuGfxDisplay = 0x800C4BD8;
|
||||
nuSiMesgQ = 0x800E9B88;
|
||||
nuSiMesgBuf = 0x800BBE60;
|
||||
siMgrThread = 0x800BBE80;
|
||||
nuThreadIdle = 0x800AF440;
|
||||
nuStackIdle = 0x800B17A0;
|
||||
nuPiCartHandle = 0x800E7A20;
|
||||
nuPiMgrMesgQ = 0x800BE030;
|
||||
nuPiMesgBuf = 0x800BE048;
|
||||
|
||||
nuBoot = 0x8007F880;
|
||||
nuScCreateScheduler = 0x80088C50; // rom:0x19050
|
||||
|
|
@ -20,10 +45,30 @@ nuScGetGfxMQ = 0x80088EFC;
|
|||
nuScAddClient = 0x80089054;
|
||||
nuScRemoveClient = 0x80089124;
|
||||
nuScSetFrameBufferNum = 0x80089528;
|
||||
nuScGetFrameRate = 0x80089534;
|
||||
nuGfxRetraceWait = 0x80089A30;
|
||||
nuScResetClientMesgType = 0x800890E4;
|
||||
nuScWaitTaskReady = 0x8008949C;
|
||||
nuGfxSetCfb = 0x80089AB0;
|
||||
nuGfxInitEX2 = 0x8008A1B0;
|
||||
nuGfxThreadStart = 0x8008B0B0;
|
||||
nuGfxTaskMgrInit = 0x80089660;
|
||||
gfxThread = 0x8008AFE0;
|
||||
nuGfxSwapCfbFuncSet = 0x800899D0;
|
||||
nuGfxTaskStart = 0x80089804; // rom:0x19C04
|
||||
nuGfxTaskAllEndWait = 0x80089A10;
|
||||
nuGfxTaskMgr = 0x80089540;
|
||||
nuGfxFuncSet = 0x80089990;
|
||||
nuGfxDisplayOff = 0x80089BC0;
|
||||
nuGfxDisplayOn = 0x80089C50;
|
||||
nuSiMgrInit = 0x80089C60;
|
||||
nuSiMgrThread = 0x80089D9C;
|
||||
nuSiSendMesg = 0x80089CF8;
|
||||
nuSiMgrStop = 0x80089D5C;
|
||||
nuSiMgrRestart = 0x80089D7C;
|
||||
nuIdle = 0x8007F8E4;
|
||||
nuPiReadRom = 0x80089F80;
|
||||
|
||||
|
||||
obCurrentTime = 0x800C47D0;
|
||||
obSetCurrentTime = 0x8009C7C0; // rom:0x2CBC0
|
||||
|
|
@ -133,7 +178,6 @@ DISPLAY_LIST_80186BD0 = 0x80186BD0; // rom:0x5CAD0
|
|||
DISPLAY_LIST_80186D90 = 0x80186D90; // rom:0x5CC90
|
||||
DISPLAY_LIST_80186E70 = 0x80186E70; // rom:0x5CD70
|
||||
|
||||
DISPLAY_LIST_800A9EF0 = 0x800A9EF0; // rom:0x3A2F0
|
||||
DISPLAY_LIST_80186C60 = 0x80186C60; // rom:0x5CB60
|
||||
DISPLAY_LIST_80186D00 = 0x80186D00; // rom:0x5CC00
|
||||
DISPLAY_LIST_80186DD0 = 0x80186DD0; // rom:0x5CCD0
|
||||
|
|
@ -227,9 +271,7 @@ DISPLAY_LIST_801B3618 = 0x801B3618; // rom:0x100658
|
|||
|
||||
LIGHTS_801869A0 = 0x801869A0; // rom:0x5C8A0 size:40
|
||||
|
||||
__SOMETHING_FRAMEBUFFERS = 0x800A9EE0; // rom:0x3A2E0 size:0xC
|
||||
|
||||
__something_display_list = 0x80089804; // rom:0x19C04
|
||||
__SOMETHING_WITH_GFX = 0x800E9BE0; // size:0x18
|
||||
|
||||
__MAYBE_DISPLAY_LIST = 0x801B8430; // rom:0x1EE930
|
||||
|
|
@ -645,7 +687,6 @@ __osPiTable = 0x800AA41C; // rom:0x3A81C
|
|||
osEPiLinkHandle = 0x8008BCE0l // rom:0x1C0E0
|
||||
CartRomHandle = 0x800C4C50; // size:0x2A
|
||||
osCartRomInit = 0x8008BD30;
|
||||
PTR_CART_ROM_HANDLE = 0x800E7A20;
|
||||
|
||||
D_800A81C0 = 0x800A81C0; // size:0x30
|
||||
D_800C4BBC = 0x800C4BBC; // size:0x8
|
||||
|
|
@ -674,7 +715,6 @@ __log_fatal_error_desc = 0x8007BBC0;
|
|||
|
||||
__set_vi_mode = 0x80072738;
|
||||
__calls_osViSwapBuffer_8007307C = 0x8007307C;
|
||||
__osViSwapBuffer_3 = 0x8008B110;
|
||||
|
||||
osAiSetFrequency = 0x8008C430;
|
||||
osAiGetLength = 0x8008C410;
|
||||
|
|
@ -702,9 +742,7 @@ osClockRate = 0x800ABAC0; // type:u64
|
|||
osPiRawStartDma = 0x800997F0;
|
||||
osEPiRawStartDma = 0x8008BA50;
|
||||
|
||||
__SCREEN_IS_NOT_BLACK = 0x800C4BD8;
|
||||
__calls_osViBlack = 0x80089BE4;
|
||||
__set_black = 0x80089BC0;
|
||||
|
||||
__MAIN_START_BUT_CHECK = 0x800E79B0; // size:0x14
|
||||
__MAIN_START_BUT_STATE = 0x800E8214;
|
||||
|
|
@ -850,7 +888,6 @@ osViModePalLan1 = 0x800ABBE0;
|
|||
osViModeMpalLan1 = 0x800ABA00;
|
||||
osViModeNtscLan1 = 0x800AB960;
|
||||
|
||||
obControllerInit = 0x80089C60;
|
||||
|
||||
osUnmapTLBAll = 0x8009AB00;
|
||||
osMapTLBRdb = 0x8009AAA0;
|
||||
|
|
@ -864,8 +901,6 @@ __calls_romCopy_8009DE40 = 0x8009DE40;
|
|||
__load_and_unpack = 0x8009DF48;
|
||||
//__calls_romCopy_800EA488 = 0x800EA488;
|
||||
|
||||
__start_thread_800BE1C0 = 0x8008B0B0;
|
||||
__start_thread_800B9C88 = 0x80089660;
|
||||
|
||||
magnitude = 0x8009C780;
|
||||
|
||||
|
|
@ -874,36 +909,28 @@ __MUS_MEM_800B186C = 0x800B186C;
|
|||
__MUS_MEM_800B1870 = 0x800B1870;
|
||||
__MUS_MEM_800B1868 = 0x800B1868;
|
||||
|
||||
MQ_CONTROLLER = 0x800E9B88;
|
||||
MQ_SWAP_BUFFER = 0x800E9BA8;
|
||||
MQ_800E7988 = 0x800E7988;
|
||||
MQ_800C4A00 = 0x800C4A00;
|
||||
MQ_800E9BF0 = 0x800E9BF0;
|
||||
MQ_800C4C28 = 0x800C4C28;
|
||||
MQ_800C35A0 = 0x800C35A0;
|
||||
MQ_800AF320 = 0x800AF320;
|
||||
MQ_800B1880 = 0x800B1880;
|
||||
MQ_800E79C8 = 0x800E79C8;
|
||||
MQ_800C49E8 = 0x800C49E8;
|
||||
MQ_800BE030 = 0x800BE030;
|
||||
MQ_800B9C40 = 0x800B9C40;
|
||||
|
||||
OSMESG_800BE190 = 0x800BE190;
|
||||
OSMESG_800BE194 = 0x800BE194;
|
||||
OSMESG_800BE1A0 = 0x800BE1A0;
|
||||
OSMESG_800B1870 = 0x800B1870;
|
||||
OSMESG_800B17D0 = 0x800B17D0;
|
||||
OSMESG_800B17E0 = 0x800B17E0;
|
||||
OSMESG_800BE048 = 0x800BE048;
|
||||
OSMESG_800B9C58 = 0x800B9C58;
|
||||
OSMESG_800B9C80 = 0x800B9C80;
|
||||
|
||||
SP_THREAD_800BE1C0 = 0x800C2370;
|
||||
SP_THREAD_800B9C88 = 0x800BBE40;
|
||||
|
||||
THREAD_CONTROLLER = 0x800BBE80;
|
||||
THREAD_800B7A90 = 0x800B7A90;
|
||||
THREAD_800BE1C0 = 0x800BE1C0;
|
||||
THREAD_800B9C88 = 0x800B9C88;
|
||||
|
||||
// Name taken from error message.
|
||||
|
|
@ -929,13 +956,9 @@ __MAYBE_SONG_800EB290 = 0x800EB290; // size:0x50
|
|||
__MAYBE_SONG_ARRAY_800A8218 = 0x800A8218; // size:0x1C
|
||||
__initialize_song_mem = 0x80073FD4;
|
||||
|
||||
__thread_8008AFE0 = 0x8008AFE0;
|
||||
__thread_80089540 = 0x80089540;
|
||||
|
||||
STR_INVALID_HEADER_LHA_FILE = 0x800AE108;
|
||||
|
||||
SWAP_BUFFER_FUNC = 0x800A9E84;
|
||||
set_swap_buffer_func = 0x800899D0;
|
||||
SWAP_BUFFER_FUNC_800A9E88 = 0x800A9E88;
|
||||
|
||||
SWAP_BUFFER_FUNC_800A9E8C = 0x800A9E8C;
|
||||
|
|
@ -953,12 +976,10 @@ carthandle = 0x800E79AC;
|
|||
__ROM_0_to_8000 = 0x800A83B8; // rom:0x387B8
|
||||
|
||||
romCopy_256 = 0x80074CF0; // rom:0x50F0
|
||||
romCopy_512 = 0x80089F80;
|
||||
|
||||
__GLOBAL_CONTROLLER_DATA = 0x0800C4BF0; // size:0x18
|
||||
__GLOBAL_CONTROLLER_DATA_COPY = 0x0800AEE78; // size:0x18
|
||||
|
||||
__start_controller_thread = 0x80089D7C;
|
||||
__calls_copy_controller_data = 0x8007297C;
|
||||
__copy_global_controller_data = 0x8008A600;
|
||||
__start_copy_global_controller_data = 0x8008A354;
|
||||
|
|
@ -980,13 +1001,9 @@ __ERROR_BAD_TABLE = 0x800AE338;
|
|||
__VIRTUAL_MEMORY_EXHAUSTED = 0x800AE35C;
|
||||
__virtual_mem_alloc = 0x80070F30;
|
||||
|
||||
__controller_thread_80089D9C = 0x80089D9C;
|
||||
|
||||
|
||||
|
||||
obIdle = 0x8007F8E4;
|
||||
obThreadIdle = 0x800AF440;
|
||||
obStackIdle = 0x800B17A0;
|
||||
|
||||
obMain = 0x80071EB0;
|
||||
obThreadMain = 0x800AF5F0;
|
||||
|
|
|
|||
15
splat.yaml
15
splat.yaml
|
|
@ -112,15 +112,18 @@ segments:
|
|||
- [0x189D0, c, "_ob_exciting_offer"]
|
||||
- [0x18F30, asm]
|
||||
- [0x18F80, asm]
|
||||
- [0x19050, c, "_ob_past_brick"]
|
||||
- [0x19DD0, c, "_ob_questionable_glass"]
|
||||
- [0x19E10, asm]
|
||||
- [0x19050, c, "nu/nusched"]
|
||||
- [0x19940, c, "nu/nugfxtaskmgr"]
|
||||
- [0x19D90, c, "nu/nugfxfuncset"]
|
||||
- [0x19DD0, c, "nu/nugfxswapcfbfuncset"]
|
||||
- [0x19E10, c, "nu/nugfxtaskallendwait"]
|
||||
- [0x19E30, c, "nu/nugfxretracewait"]
|
||||
- [0x19EB0, c, "nu/nugfxsetcfb"]
|
||||
- [0x19FC0, c, "black"]
|
||||
- [0x1A050, c, "_ob_icy_coast"]
|
||||
- [0x19FC0, c, "nu/nugfxdisplayoff"]
|
||||
- [0x1A050, c, "nu/nugfxdisplayon"]
|
||||
- [0x1A060, c, "_ob_icy_coast"]
|
||||
- [0x1A4F0, c, "rom_copy"]
|
||||
- [0x1A5B0, c, "_ob_unusual_spiders"]
|
||||
- [0x1A5B0, c, "nu/nugfxinit"]
|
||||
- [0x1A660, c, "_ob_prized_reading"]
|
||||
- [0x1A9A0, c, "_ob_silly_cactus"]
|
||||
- [0x1AA00, c, "_ob_classy_fold"]
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
#include "common.h"
|
||||
|
||||
#include "nu/nusys.h"
|
||||
|
||||
void __copy_global_controller_data(OSContPad* arg0) {
|
||||
__start_copy_global_controller_data();
|
||||
bcopy(&__GLOBAL_CONTROLLER_DATA, arg0, 0x18);
|
||||
|
|
@ -7,7 +9,7 @@ void __copy_global_controller_data(OSContPad* arg0) {
|
|||
}
|
||||
|
||||
void func_8008A640(void) {
|
||||
func_80089CF8(0x103, 0);
|
||||
nuSiSendMesg(0x103, 0);
|
||||
}
|
||||
|
||||
void __set_fp_8008A660(void(*arg0)(s16)) {
|
||||
|
|
|
|||
|
|
@ -3,35 +3,35 @@
|
|||
#include "nu/nusys.h"
|
||||
|
||||
/* 1B3E0 8008AFE0 */
|
||||
void __thread_8008AFE0(void* arg0) {
|
||||
NUScClient sp10;
|
||||
u16* sp20;
|
||||
void gfxThread(void* arg0) {
|
||||
NUScClient gfxClient;
|
||||
NUScMsg* mesgType;
|
||||
s16 temp_v0;
|
||||
|
||||
osCreateMesgQueue(&MQ_800C4C28, OSMESG_800BE1A0, 8);
|
||||
nuScAddClient(&sp10, &MQ_800C4C28, 3);
|
||||
osCreateMesgQueue(&nuGfxMesgQ, nuGfxMesgBuf, NU_GFX_MESGS);
|
||||
nuScAddClient(&gfxClient, &nuGfxMesgQ, NU_SC_RETRACE_MSG | NU_SC_PRENMI_MSG);
|
||||
|
||||
while(1) {
|
||||
osRecvMesg(&MQ_800C4C28, &sp20, OS_MESG_BLOCK);
|
||||
temp_v0 = *sp20;
|
||||
osRecvMesg(&nuGfxMesgQ, (OSMesg)&mesgType, OS_MESG_BLOCK);
|
||||
temp_v0 = *mesgType;
|
||||
|
||||
switch(temp_v0) {
|
||||
case 1:
|
||||
if (D_800AA090 != NULL) {
|
||||
D_800AA090(D_800E79A4);
|
||||
case NU_SC_RETRACE_MSG:
|
||||
if (nuGfxFunc != NULL) {
|
||||
nuGfxFunc(nuGfxTaskSpool);
|
||||
}
|
||||
break;
|
||||
|
||||
case 2:
|
||||
if(D_800AA094 != NULL) {
|
||||
D_800AA094();
|
||||
case NU_SC_PRENMI_MSG:
|
||||
if(nuGfxPreNMIFunc != NULL) {
|
||||
nuGfxPreNMIFunc();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void __start_thread_800BE1C0(void) {
|
||||
osCreateThread(&THREAD_800BE1C0, 4, __thread_8008AFE0, NULL, SP_THREAD_800BE1C0, 0x32);
|
||||
osStartThread(&THREAD_800BE1C0);
|
||||
void nuGfxThreadStart(void) {
|
||||
osCreateThread(&nuGfxThread, 4, gfxThread, NULL, SP_THREAD_800BE1C0, 0x32);
|
||||
osStartThread(&nuGfxThread);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,93 +1,86 @@
|
|||
#include "common.h"
|
||||
|
||||
#include "nu/nusys.h"
|
||||
#include "os_pi.h"
|
||||
|
||||
void func_80089C50(void) {
|
||||
__SCREEN_IS_NOT_BLACK = 0x80;
|
||||
}
|
||||
void nuSiMgrThread(void* arg);
|
||||
|
||||
/* 1A060 80089C60 */
|
||||
u8 obControllerInit(void) {
|
||||
u8 nuSiMgrInit(void) {
|
||||
u8 pattern;
|
||||
OSContStatus data[3];
|
||||
OSContStatus status[NU_CONT_MAXCONTROLLERS];
|
||||
|
||||
osCreateMesgQueue(&MQ_CONTROLLER, D_800BBE60, 8);
|
||||
osSetEventMesg(OS_EVENT_SI, &MQ_CONTROLLER, NULL);
|
||||
osCreateMesgQueue(&nuSiMesgQ, nuSiMesgBuf, NU_SC_MAX_MESGS);
|
||||
osSetEventMesg(OS_EVENT_SI, &nuSiMesgQ, NULL);
|
||||
|
||||
osContInit(&MQ_CONTROLLER, &pattern, data);
|
||||
osContInit(&nuSiMesgQ, &pattern, status);
|
||||
|
||||
osCreateThread(&THREAD_CONTROLLER, 5, __controller_thread_80089D9C, NULL, &MQ_800BE030, 0x73);
|
||||
osStartThread(&THREAD_CONTROLLER);
|
||||
osCreateThread(&siMgrThread, 5, nuSiMgrThread, NULL, &nuPiMgrMesgQ, NU_SI_THREAD_PRI);
|
||||
osStartThread(&siMgrThread);
|
||||
|
||||
return pattern;
|
||||
}
|
||||
|
||||
s32 func_80089CF8(s16 arg0, s32 arg1) {
|
||||
typedef struct {
|
||||
/* 0x0 */ s16 unk0;
|
||||
/* 0x4 */ OSMesgQueue* msgQueue;
|
||||
/* 0x8 */ s32 unk8;
|
||||
/* 0xC */ s32 unkC;
|
||||
} Message; // size 0x10
|
||||
|
||||
OSMesgQueue sp10;
|
||||
Message msg;
|
||||
s32 nuSiSendMesg(NUScMsg mesg, void* dataPtr) {
|
||||
OSMesgQueue rtnMesgQ;
|
||||
NUSiCommonMesg siCommonMesg;
|
||||
OSMesg sp38; // maybe this is part of the struct?
|
||||
|
||||
msg.unk0 = arg0;
|
||||
msg.unkC = arg1;
|
||||
msg.msgQueue = &sp10;
|
||||
siCommonMesg.mesg = mesg;
|
||||
siCommonMesg.dataPtr = dataPtr;
|
||||
siCommonMesg.rtnMesgQ = &rtnMesgQ;
|
||||
|
||||
osCreateMesgQueue(&sp10, &sp38, 1);
|
||||
osSendMesg(&MQ_800E7988, &msg, OS_MESG_BLOCK);
|
||||
osRecvMesg(&sp10, NULL, OS_MESG_BLOCK);
|
||||
osCreateMesgQueue(&rtnMesgQ, &sp38, 1);
|
||||
osSendMesg(&MQ_800E7988, &siCommonMesg, OS_MESG_BLOCK);
|
||||
osRecvMesg(&rtnMesgQ, NULL, OS_MESG_BLOCK);
|
||||
|
||||
return msg.unk8;
|
||||
return siCommonMesg.error;
|
||||
}
|
||||
|
||||
void func_80089D5C(void) {
|
||||
func_80089CF8(0x7F00, 0);
|
||||
void nuSiMgrStop(void) {
|
||||
nuSiSendMesg(NU_SI_STOP_MGR_MSG, NULL);
|
||||
}
|
||||
|
||||
|
||||
void __start_controller_thread(void) {
|
||||
osStartThread(&THREAD_CONTROLLER);
|
||||
void nuSiMgrRestart(void) {
|
||||
osStartThread(&siMgrThread);
|
||||
}
|
||||
|
||||
INCLUDE_ASM(const s32, "_ob_icy_coast", __controller_thread_80089D9C);
|
||||
INCLUDE_ASM(const s32, "_ob_icy_coast", nuSiMgrThread);
|
||||
|
||||
void nuPiInit(void) {
|
||||
osCreatePiManager(OS_PRIORITY_PIMGR, &MQ_800BE030, OSMESG_800BE048, sizeof(OSMESG_800BE048) / sizeof(OSMesg));
|
||||
PTR_CART_ROM_HANDLE = osCartRomInit();
|
||||
osCreatePiManager(OS_PRIORITY_PIMGR, &nuPiMgrMesgQ, nuPiMesgBuf, NU_PI_MESG_NUM);
|
||||
nuPiCartHandle = osCartRomInit();
|
||||
}
|
||||
|
||||
/* 1A380 80089F80 */
|
||||
void romCopy_512(void *src, void *dst, u32 len) {
|
||||
OSIoMesg dmaIoMesgBuf;
|
||||
void nuPiReadRom(void *src, void *dst, u32 size) {
|
||||
OSIoMesg ioMesg;
|
||||
OSMesg mesg;
|
||||
OSMesgQueue queue;
|
||||
u32 mesgSize;
|
||||
|
||||
OSMesgQueue dmaMessageQ;
|
||||
OSMesg dummyMesg;
|
||||
u32 readlength;
|
||||
|
||||
osCreateMesgQueue(&dmaMessageQ, &dummyMesg, 1);
|
||||
dmaIoMesgBuf.hdr.pri = 0;
|
||||
dmaIoMesgBuf.hdr.retQueue = &dmaMessageQ;
|
||||
osInvalDCache(dst, len);
|
||||
while (len != 0) {
|
||||
readlength = len;
|
||||
if (readlength > MAX_BYTES_TO_READ) {
|
||||
readlength = MAX_BYTES_TO_READ;
|
||||
osCreateMesgQueue(&queue, &mesg, 1);
|
||||
|
||||
ioMesg.hdr.pri = 0;
|
||||
ioMesg.hdr.retQueue = &queue;
|
||||
osInvalDCache(dst, size);
|
||||
while (size != 0) {
|
||||
mesgSize = size;
|
||||
if (mesgSize > MAX_BYTES_TO_READ) {
|
||||
mesgSize = MAX_BYTES_TO_READ;
|
||||
}
|
||||
|
||||
dmaIoMesgBuf.devAddr = (u32)src;
|
||||
dmaIoMesgBuf.dramAddr = dst;
|
||||
dmaIoMesgBuf.size = readlength;
|
||||
ioMesg.devAddr = (u32)src;
|
||||
ioMesg.dramAddr = dst;
|
||||
ioMesg.size = mesgSize;
|
||||
// Start the DMA transfer
|
||||
osEPiStartDma(PTR_CART_ROM_HANDLE, &dmaIoMesgBuf, 0);
|
||||
osEPiStartDma(nuPiCartHandle, &ioMesg, OS_READ);
|
||||
// Wait for the DMA transfer to complete
|
||||
osRecvMesg(&dmaMessageQ, &dummyMesg, 1);
|
||||
src += readlength;
|
||||
dst += readlength;
|
||||
len -= readlength;
|
||||
osRecvMesg(&queue, &mesg, OS_MESG_BLOCK);
|
||||
|
||||
src += mesgSize;
|
||||
dst += mesgSize;
|
||||
size -= mesgSize;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,9 @@
|
|||
#include "common.h"
|
||||
|
||||
#include "nu/nusys.h"
|
||||
|
||||
/* 1B510 8008B110 */
|
||||
void __osViSwapBuffer_3(void** buffers) {
|
||||
osViSwapBuffer(buffers[3]);
|
||||
void nuGfxSwapCfb(NUScTask* task) {
|
||||
osViSwapBuffer(task->framebuffer);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
#include "common.h"
|
||||
|
||||
#include "nu/nusys.h"
|
||||
|
||||
void func_8008A5D0();
|
||||
void func_8008A640();
|
||||
|
||||
|
|
@ -54,11 +56,11 @@ void __end_copy_global_controller_data(void) {
|
|||
s32 __read_controller(OSContPad* data, u32 flags) {
|
||||
s32 res;
|
||||
|
||||
res = osContStartReadData(&MQ_CONTROLLER);
|
||||
res = osContStartReadData(&nuSiMesgQ);
|
||||
if(res != 0)
|
||||
return res;
|
||||
|
||||
osRecvMesg(&MQ_CONTROLLER, NULL, OS_MESG_BLOCK);
|
||||
osRecvMesg(&nuSiMesgQ, NULL, OS_MESG_BLOCK);
|
||||
if (!(flags & D_800C4B30)) {
|
||||
func_8008A354();
|
||||
osContGetReadData(data);
|
||||
|
|
@ -72,9 +74,9 @@ s32 __read_controller(OSContPad* data, u32 flags) {
|
|||
s32 __real_read_controller(void) {
|
||||
s32 var_v0;
|
||||
|
||||
var_v0 = osContStartQuery(&MQ_CONTROLLER);
|
||||
var_v0 = osContStartQuery(&nuSiMesgQ);
|
||||
if (var_v0 == 0) {
|
||||
osRecvMesg(&MQ_CONTROLLER, NULL, OS_MESG_BLOCK);
|
||||
osRecvMesg(&nuSiMesgQ, NULL, OS_MESG_BLOCK);
|
||||
osContGetQuery(__GLOBAL_CONT_STATUS);
|
||||
return 0;
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
#include "common.h"
|
||||
|
||||
#include "nu/nusys.h"
|
||||
|
||||
INCLUDE_ASM(const s32, "_ob_prized_room", func_8009DA10);
|
||||
|
||||
/* 2DE50 8009DA50 */
|
||||
|
|
@ -15,13 +17,13 @@ void __calls_romCopy_8009DA50(void* src, void* dst, u32 len) {
|
|||
if (len < 16) {
|
||||
_dst = dst;
|
||||
// Copy into stack, length aligned to 2 bytes...
|
||||
romCopy_512(src, _src, (len + 1) & ~1);
|
||||
nuPiReadRom(src, _src, (len + 1) & ~1);
|
||||
// ...then copy from stack into destination
|
||||
for(len--; len != -1; len--)
|
||||
*_dst++ = *_src++;
|
||||
} else {
|
||||
// Too big to fit in our stack, so just do a regular copy
|
||||
romCopy_512(src, dst, (len + 1) & ~1);
|
||||
nuPiReadRom(src, dst, (len + 1) & ~1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,24 +0,0 @@
|
|||
#include "common.h"
|
||||
|
||||
#include "nu/nusys.h"
|
||||
|
||||
/* 1A5B0 8008A1B0 */
|
||||
void func_8008A1B0(void) {
|
||||
Gfx list[257];
|
||||
Gfx* ptr = list;
|
||||
|
||||
__start_thread_800BE1C0();
|
||||
nuGfxSetCfb(&__SOMETHING_FRAMEBUFFERS, 3);
|
||||
D_800C4B20 = BOOT_ADDRESS_ULTRA;
|
||||
set_swap_buffer_func(__osViSwapBuffer_3);
|
||||
D_800C4CE0 = &D_800A9EB0;
|
||||
__start_thread_800B9C88();
|
||||
|
||||
gSPDisplayList(ptr++, &D_A9EF0);
|
||||
gDPFullSync(ptr++);
|
||||
gSPEndDisplayList(ptr++);
|
||||
|
||||
__something_display_list(list, sizeof(Gfx) * 3, 0, 0);
|
||||
func_80089A10();
|
||||
}
|
||||
|
||||
17
src/boot.c
17
src/boot.c
|
|
@ -1,14 +1,21 @@
|
|||
#include "common.h"
|
||||
|
||||
#include "nu/nusys.h"
|
||||
|
||||
extern OSThread nuThreadIdle;
|
||||
extern u64 nuStackIdle[];
|
||||
|
||||
extern u8 obStackMain[];
|
||||
|
||||
void nuIdle(void* arg);
|
||||
|
||||
void nuBoot(void) {
|
||||
osInitialize();
|
||||
osCreateThread(&obThreadIdle, 1, obIdle, NULL, obStackIdle, 0xA);
|
||||
osStartThread(&obThreadIdle);
|
||||
osCreateThread(&nuThreadIdle, NU_IDLE_THREAD_ID, nuIdle, NULL, nuStackIdle, NU_MAIN_THREAD_PRI);
|
||||
osStartThread(&nuThreadIdle);
|
||||
}
|
||||
|
||||
void obIdle(void* arg) {
|
||||
void nuIdle(void* arg) {
|
||||
nuIdleFunc = NULL;
|
||||
|
||||
nuPiInit();
|
||||
|
|
@ -16,10 +23,10 @@ void obIdle(void* arg) {
|
|||
|
||||
osViSetSpecialFeatures(OS_VI_DIVOT_ON | OS_VI_DITHER_FILTER_ON | OS_VI_GAMMA_OFF | OS_VI_GAMMA_DITHER_OFF);
|
||||
|
||||
osCreateThread(&obThreadMain, 3, obMain, NULL, obStackMain, 0xA);
|
||||
osCreateThread(&obThreadMain, NU_MAIN_THREAD_ID, obMain, NULL, obStackMain, NU_MAIN_THREAD_PRI);
|
||||
osStartThread(&obThreadMain);
|
||||
|
||||
osSetThreadPri(&obThreadIdle, OS_PRIORITY_IDLE);
|
||||
osSetThreadPri(&nuThreadIdle, NU_IDLE_THREAD_PRI);
|
||||
|
||||
while(1) {
|
||||
if (nuIdleFunc != NULL)
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
#include "common.h"
|
||||
|
||||
/* 3A2F0 800A9EF0 */
|
||||
Gfx DISPLAY_LIST_800A9EF0[] = {
|
||||
Gfx rdpstateinit_dl[] = {
|
||||
gsDPSetEnvColor(0x00, 0x00, 0x00, 0x00),
|
||||
gsDPSetPrimColor(0, 0, 0x00, 0x00, 0x00, 0x00),
|
||||
gsDPSetBlendColor(0x00, 0x00, 0x00, 0x00),
|
||||
|
|
|
|||
15
src/main.c
15
src/main.c
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
#include "libmus.h"
|
||||
#include "nu/nusys.h"
|
||||
#include "os_convert.h"
|
||||
|
||||
extern u16 D_800AEDE2;
|
||||
typedef struct {
|
||||
|
|
@ -31,7 +32,6 @@ void func_800749C0(s32); /* extern */
|
|||
void func_800764E0(); /* extern */
|
||||
void func_80079380(); /* extern */
|
||||
void func_8008A040(); /* extern */
|
||||
void func_8008A1B0(); /* extern */
|
||||
s8 func_8008A260(); /* extern */
|
||||
void func_8009DAEC(); /* extern */
|
||||
void func_800E9CEC(); /* extern */
|
||||
|
|
@ -41,7 +41,6 @@ void func_8016C900(); /* extern */
|
|||
void func_80179060(); /* extern */
|
||||
void func_8017BDC0(); /* extern */
|
||||
void func_80184D70(); /* extern */
|
||||
void obControllerInit(); /* extern */
|
||||
|
||||
extern s32 D_800A81F4;
|
||||
extern s32 D_800A8204;
|
||||
|
|
@ -378,14 +377,14 @@ u8 func_8007338C(void) {
|
|||
}
|
||||
|
||||
void func_80073398(void) {
|
||||
func_80089A10();
|
||||
nuGfxTaskAllEndWait();
|
||||
func_8007328C();
|
||||
D_800A8213 = 0;
|
||||
D_800A8212 = 0;
|
||||
D_800A8211 = 0;
|
||||
D_800A8210 = 0;
|
||||
D_800AEF9C = func_800712C4(D_800AEF9C);
|
||||
D_800C4B20 = 0;
|
||||
nuGfxZBuffer = 0;
|
||||
}
|
||||
|
||||
INCLUDE_ASM(const s32, "main", func_800733F8);
|
||||
|
|
@ -401,15 +400,11 @@ void func_800737A0(void) {
|
|||
|
||||
/* 3C2C 8007382C */
|
||||
void func_8007382C(void) {
|
||||
u32 temp_a1;
|
||||
|
||||
if (__get_compared_osTvType() != 0)
|
||||
return;
|
||||
|
||||
if (D_800A8213 != 0) {
|
||||
temp_a1 = D_800C4B20 - 0x80000000;
|
||||
|
||||
gDPSetDepthImage(obPtrDisplayList++, temp_a1);
|
||||
gDPSetDepthImage(obPtrDisplayList++, OS_K0_TO_PHYSICAL(nuGfxZBuffer));
|
||||
|
||||
gDPPipeSync(obPtrDisplayList++);
|
||||
|
||||
|
|
@ -418,7 +413,7 @@ void func_8007382C(void) {
|
|||
|
||||
gDPPipeSync(obPtrDisplayList++);
|
||||
gDPSetRenderMode(obPtrDisplayList++, G_RM_NOOP, G_RM_NOOP2);
|
||||
gDPSetColorImage(obPtrDisplayList++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, temp_a1);
|
||||
gDPSetColorImage(obPtrDisplayList++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, OS_K0_TO_PHYSICAL(nuGfxZBuffer));
|
||||
gDPSetFillColor(obPtrDisplayList++, 0xFFFCFFFC);
|
||||
|
||||
gDPPipeSync(obPtrDisplayList++);
|
||||
|
|
|
|||
|
|
@ -1,8 +1,10 @@
|
|||
#include "common.h"
|
||||
|
||||
#include "nu/nusys.h"
|
||||
|
||||
/* 19FC0 80089BC0 */
|
||||
void __set_black() {
|
||||
__SCREEN_IS_NOT_BLACK = 0;
|
||||
void nuGfxDisplayOff() {
|
||||
nuGfxDisplay = NU_GFX_DISPLAY_OFF;
|
||||
__calls_osViBlack(true);
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
#include "common.h"
|
||||
|
||||
#include "nu/nusys.h"
|
||||
|
||||
void nuGfxDisplayOn(void) {
|
||||
nuGfxDisplay = NU_GFX_DISPLAY_ON_TRIGGER;
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
#include "common.h"
|
||||
|
||||
#include "nu/nusys.h"
|
||||
|
||||
/* 19D90 80089990 */
|
||||
void nuGfxFuncSet(NUGfxFunc func) {
|
||||
s32 mask;
|
||||
|
||||
nuGfxTaskAllEndWait();
|
||||
mask = osSetIntMask(OS_IM_NONE);
|
||||
nuGfxFunc = func;
|
||||
osSetIntMask(mask);
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
#include "common.h"
|
||||
|
||||
#include "nu/nusys.h"
|
||||
|
||||
extern u16* FrameBuf[3];
|
||||
extern NUUcode nugfx_ucode;
|
||||
extern Gfx rdpstateinit_dl[];
|
||||
|
||||
/* 1A5B0 8008A1B0 */
|
||||
void nuGfxInitEX2(void) {
|
||||
Gfx gfx[257];
|
||||
Gfx* ptr = gfx;
|
||||
|
||||
nuGfxThreadStart();
|
||||
nuGfxSetCfb(FrameBuf, NU_GFX_FRAMEBUFFER_NUM);
|
||||
nuGfxSetZBuffer(NU_GFX_ZBUFFER_ADDR);
|
||||
nuGfxSwapCfbFuncSet(nuGfxSwapCfb);
|
||||
nuGfxSetUcode(&nugfx_ucode);
|
||||
nuGfxTaskMgrInit();
|
||||
|
||||
gSPDisplayList(ptr++, OS_K0_TO_PHYSICAL(&rdpstateinit_dl));
|
||||
gDPFullSync(ptr++);
|
||||
gSPEndDisplayList(ptr++);
|
||||
|
||||
nuGfxTaskStart(gfx, sizeof(Gfx) * 3, NU_GFX_UCODE_F3DEX, NU_SC_NOSWAPBUFFER);
|
||||
nuGfxTaskAllEndWait();
|
||||
}
|
||||
|
||||
|
|
@ -1,10 +1,12 @@
|
|||
#include "common.h"
|
||||
|
||||
#include "nu/nusys.h"
|
||||
|
||||
/* 19DD0 800899D0 */
|
||||
void set_swap_buffer_func(void (*arg0)(void**)) {
|
||||
void nuGfxSwapCfbFuncSet(NUGfxSwapCfbFunc func) {
|
||||
s32 mask;
|
||||
|
||||
mask = osSetIntMask(OS_IM_NONE);
|
||||
SWAP_BUFFER_FUNC = arg0;
|
||||
nuGfxSwapCfbFunc = func;
|
||||
osSetIntMask(mask);
|
||||
}
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
#include "common.h"
|
||||
|
||||
INCLUDE_ASM(const s32, "nu/nugfxtaskallendwait", nuGfxTaskAllEndWait);
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
#include "common.h"
|
||||
|
||||
INCLUDE_ASM(const s32, "nu/nugfxtaskmgr", nuGfxTaskMgr);
|
||||
|
||||
INCLUDE_ASM(const s32, "nu/nugfxtaskmgr", nuGfxTaskMgrInit);
|
||||
|
||||
INCLUDE_ASM(const s32, "nu/nugfxtaskmgr", nuGfxTaskStart);
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
void nuScEventBroadcast(NUScMsg* msg);
|
||||
|
||||
INCLUDE_ASM(const s32, "_ob_past_brick", nuScCreateScheduler);
|
||||
INCLUDE_ASM(const s32, "nu/nusched", nuScCreateScheduler);
|
||||
|
||||
OSMesgQueue* nuScGetAudioMQ() {
|
||||
return &nusched.audioRequestMQ;
|
||||
|
|
@ -15,22 +15,22 @@ OSMesgQueue* nuScGetGfxMQ() {
|
|||
}
|
||||
|
||||
void nuScEventHandler(void) {
|
||||
OSMesg msg;
|
||||
s32 beforeResetFrame;
|
||||
s32 msg;
|
||||
s32 beforeResetFrame;
|
||||
|
||||
nuScRetraceCounter = 0;
|
||||
|
||||
while (TRUE) {
|
||||
osRecvMesg(&nusched.retraceMQ, &msg, OS_MESG_BLOCK);
|
||||
osRecvMesg(&nusched.retraceMQ, (OSMesg)&msg, OS_MESG_BLOCK);
|
||||
|
||||
switch ((s32) msg) {
|
||||
switch (msg) {
|
||||
case 666:
|
||||
nuScRetraceCounter++;
|
||||
|
||||
nuScEventBroadcast(&nusched.retraceMsg);
|
||||
|
||||
if (nuScPreNMIFlag){
|
||||
if (beforeResetFrame){
|
||||
if (nuScPreNMIFlag) {
|
||||
if (beforeResetFrame) {
|
||||
beforeResetFrame--;
|
||||
} else {
|
||||
nuScPreNMIFlag |= NU_SC_BEFORE_RESET;
|
||||
|
|
@ -45,13 +45,12 @@ void nuScEventHandler(void) {
|
|||
nuScPreNMIFlag = NU_SC_PRENMI_GET;
|
||||
nuScEventBroadcast(&nusched.prenmiMsg);
|
||||
|
||||
if (nuScPreNMIFunc != NULL){
|
||||
(*nuScPreNMIFunc)();
|
||||
}
|
||||
if (nuScPreNMIFunc != NULL)
|
||||
nuScPreNMIFunc();
|
||||
|
||||
beforeResetFrame = (nusched.frameRate / 2) / nusched.retraceCount - 3;
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
@ -116,11 +115,11 @@ void nuScEventBroadcast(NUScMsg* msg) {
|
|||
}
|
||||
}
|
||||
|
||||
INCLUDE_ASM(const s32, "_ob_past_brick", nuScExecuteAudio);
|
||||
INCLUDE_ASM(const s32, "nu/nusched", nuScExecuteAudio);
|
||||
|
||||
INCLUDE_ASM(const s32, "_ob_past_brick", __thread_80089358);
|
||||
INCLUDE_ASM(const s32, "nu/nusched", __thread_80089358);
|
||||
|
||||
INCLUDE_ASM(const s32, "_ob_past_brick", nuScExecuteGraphics);
|
||||
INCLUDE_ASM(const s32, "nu/nusched", nuScExecuteGraphics);
|
||||
|
||||
// void nuScExecuteGraphics(void) {
|
||||
// typedef struct {
|
||||
|
|
@ -166,36 +165,10 @@ void nuScWaitTaskReady(NUScTask* task) {
|
|||
}
|
||||
}
|
||||
|
||||
INCLUDE_ASM(const s32, "_ob_past_brick", nuScSetFrameBufferNum);
|
||||
|
||||
// void func_80089528(s8 arg0) {
|
||||
// D_800E918D = arg0;
|
||||
// }
|
||||
|
||||
|
||||
// extern u8 D_800E918C;
|
||||
|
||||
INCLUDE_ASM(const s32, "_ob_past_brick", func_80089534);
|
||||
/* 19934 80089534 */
|
||||
// u8 func_80089534(void) {
|
||||
// return D_800E918C;
|
||||
// }
|
||||
|
||||
INCLUDE_ASM(const s32, "_ob_past_brick", __thread_80089540);
|
||||
|
||||
INCLUDE_ASM(const s32, "_ob_past_brick", __start_thread_800B9C88);
|
||||
|
||||
INCLUDE_ASM(const s32, "_ob_past_brick", __something_display_list);
|
||||
|
||||
INCLUDE_ASM(const s32, "_ob_past_brick", func_80089990);
|
||||
|
||||
/* 19D90 80089990 */
|
||||
// void func_80089990(void (*arg0)(s32)) {
|
||||
// s32 mask;
|
||||
|
||||
// func_80089A10();
|
||||
// mask = osSetIntMask(OS_IM_NONE);
|
||||
// D_800AA090 = arg0;
|
||||
// osSetIntMask(mask);
|
||||
// }
|
||||
void nuScSetFrameBufferNum(u8 frameBufferNum) {
|
||||
nusched.frameBufferNum = frameBufferNum;
|
||||
}
|
||||
|
||||
s32 nuScGetFrameRate() {
|
||||
return nusched.frameRate;
|
||||
}
|
||||
|
|
@ -1,5 +1,7 @@
|
|||
#include "common.h"
|
||||
|
||||
#include "nu/nusys.h"
|
||||
|
||||
void __load_song(void*);
|
||||
|
||||
extern u8 D_8010A760[];
|
||||
|
|
@ -11,9 +13,9 @@ extern s32 D_800EB0E8;
|
|||
/* 3F1B0 800E9C20 */
|
||||
void func_800E9C20(void)
|
||||
{
|
||||
romCopy_512(SEGMENT_ROM_START(n64_ptr_tables_v2_00), D_80164770, SEGMENT_ROM_SIZE(n64_ptr_tables_v2_00));
|
||||
romCopy_512(SEGMENT_ROM_START(n64_ptr_tables_v2_01), D_80104710, SEGMENT_ROM_SIZE(n64_ptr_tables_v2_01));
|
||||
romCopy_512(SEGMENT_ROM_START(n64_wave_data), &D_8010A760, SEGMENT_ROM_SIZE(n64_wave_data));
|
||||
nuPiReadRom(SEGMENT_ROM_START(n64_ptr_tables_v2_00), D_80164770, SEGMENT_ROM_SIZE(n64_ptr_tables_v2_00));
|
||||
nuPiReadRom(SEGMENT_ROM_START(n64_ptr_tables_v2_01), D_80104710, SEGMENT_ROM_SIZE(n64_ptr_tables_v2_01));
|
||||
nuPiReadRom(SEGMENT_ROM_START(n64_wave_data), &D_8010A760, SEGMENT_ROM_SIZE(n64_wave_data));
|
||||
|
||||
MusPtrBankInitialize(D_80164770, SEGMENT_ROM_START(n64_wave_table_00));
|
||||
MusPtrBankInitialize(D_80104710, SEGMENT_ROM_START(n64_wave_table_01));
|
||||
|
|
|
|||
Loading…
Reference in New Issue