Go to the source code of this file.
|
void | create_thread (OSThread *, OSId, void(*entry)(void *), void *, void *, OSPri) |
|
void | main_func (void) |
|
void | thread1_idle (void *) |
|
void | setup_mesg_queues (void) |
|
void | start_sptask (s32) |
|
void | create_gfx_task_structure (void) |
|
void | init_controllers (void) |
|
void | update_controller (s32) |
|
void | read_controllers (void) |
|
void | func_80000BEC (void) |
|
void | dispatch_audio_sptask (struct SPTask *) |
|
void | exec_display_list (struct SPTask *) |
|
void | init_rcp (void) |
|
void | end_master_display_list (void) |
|
void * | clear_framebuffer (s32) |
|
void | rendering_init (void) |
|
void | config_gfx_pool (void) |
|
void | display_and_vsync (void) |
|
void | init_segment_ending_sequences (void) |
|
void | init_segment_racing (void) |
|
void | dma_copy (u8 *, u8 *, size_t) |
|
void | setup_game_memory (void) |
|
void | game_init_clear_framebuffer (void) |
|
void | race_logic_loop (void) |
|
void | game_state_handler (void) |
|
void | interrupt_gfx_sptask (void) |
|
void | receive_new_tasks (void) |
|
void | set_vblank_handler (s32, struct VblankHandler *, OSMesgQueue *, OSMesg *) |
|
void | start_gfx_sptask (void) |
|
void | handle_vblank (void) |
|
void | handle_dp_complete (void) |
|
void | handle_sp_complete (void) |
|
void | thread3_video (void *) |
|
void | func_800025D4 (void) |
|
void | func_80002600 (void) |
|
void | func_8000262C (void) |
|
void | func_80002658 (void) |
|
void | update_gamestate (void) |
|
void | thread5_game_loop (void *) |
|
void | thread4_audio (void *) |
|
◆ GFX_POOL_SIZE
#define GFX_POOL_SIZE 7500 |
◆ MESG_DP_COMPLETE
#define MESG_DP_COMPLETE 101 |
◆ MESG_NMI_REQUEST
#define MESG_NMI_REQUEST 104 |
◆ MESG_SP_COMPLETE
#define MESG_SP_COMPLETE 100 |
◆ MESG_START_GFX_SPTASK
#define MESG_START_GFX_SPTASK 103 |
◆ MESG_VI_VBLANK
#define MESG_VI_VBLANK 102 |
◆ MTX_EFFECT_POOL_SIZE
#define MTX_EFFECT_POOL_SIZE 660 |
◆ MTX_EFFECT_POOL_SIZE_MAX
◆ MTX_HUD_POOL_SIZE
#define MTX_HUD_POOL_SIZE 800 |
◆ MTX_HUD_POOL_SIZE_MAX
◆ MTX_KART_POOL_SIZE
#define MTX_KART_POOL_SIZE 8 * 4 |
- Todo
- Verify with proper documentation
◆ MTX_OBJECT_POOL_SIZE
#define MTX_OBJECT_POOL_SIZE 128 |
◆ MTX_SHADOW_POOL_SIZE
#define MTX_SHADOW_POOL_SIZE 8 * 4 |
- Todo
- Verify with proper documentation
◆ clear_framebuffer()
void * clear_framebuffer |
( |
s32 | color | ) |
|
- Todo
- Why did void* work for matching
◆ config_gfx_pool()
void config_gfx_pool |
( |
void | | ) |
|
◆ create_gfx_task_structure()
void create_gfx_task_structure |
( |
void | | ) |
|
Initializes the Fast3D OSTask structure. Loads F3DEX or F3DLX based on the number of players
◆ create_thread()
void create_thread |
( |
OSThread * | thread, |
|
|
OSId | id, |
|
|
void(* | entry )(void *), |
|
|
void * | arg, |
|
|
void * | sp, |
|
|
OSPri | pri ) |
◆ dispatch_audio_sptask()
void dispatch_audio_sptask |
( |
struct SPTask * | spTask | ) |
|
◆ display_and_vsync()
void display_and_vsync |
( |
void | | ) |
|
Send current master display list for rendering. Tell the VI which colour framebuffer to display. Yields to the VI framerate twice, locking the game at 30 FPS. Selects the next framebuffer to be rendered and displayed.
◆ dma_copy()
void dma_copy |
( |
u8 * | dest, |
|
|
u8 * | romAddr, |
|
|
size_t | size ) |
◆ end_master_display_list()
void end_master_display_list |
( |
void | | ) |
|
End the master display list and initialize the graphics task structure for the next frame to be rendered.
◆ exec_display_list()
void exec_display_list |
( |
struct SPTask * | spTask | ) |
|
◆ func_80000BEC()
void func_80000BEC |
( |
void | | ) |
|
◆ func_800025D4()
void func_800025D4 |
( |
void | | ) |
|
◆ func_80002600()
void func_80002600 |
( |
void | | ) |
|
◆ func_8000262C()
void func_8000262C |
( |
void | | ) |
|
◆ func_80002658()
void func_80002658 |
( |
void | | ) |
|
◆ game_init_clear_framebuffer()
void game_init_clear_framebuffer |
( |
void | | ) |
|
◆ game_state_handler()
void game_state_handler |
( |
void | | ) |
|
mk64's game loop depends on a series of states. It runs a wide branching series of code based on these states. State 1) Clear framebuffer State 2) Run menus State 3) Process race related logic State 4) Ending sequence State 5) Credits
Note that the state doesn't flip-flop at random but is permanent until the state changes (ie. Exit menus and start a race).
◆ handle_dp_complete()
void handle_dp_complete |
( |
void | | ) |
|
◆ handle_sp_complete()
void handle_sp_complete |
( |
void | | ) |
|
◆ handle_vblank()
void handle_vblank |
( |
void | | ) |
|
◆ init_controllers()
void init_controllers |
( |
void | | ) |
|
◆ init_rcp()
Set default RCP (Reality Co-Processor) settings.
◆ init_segment_ending_sequences()
void init_segment_ending_sequences |
( |
void | | ) |
|
◆ init_segment_racing()
void init_segment_racing |
( |
void | | ) |
|
◆ interrupt_gfx_sptask()
void interrupt_gfx_sptask |
( |
void | | ) |
|
◆ main_func()
◆ race_logic_loop()
void race_logic_loop |
( |
void | | ) |
|
◆ read_controllers()
void read_controllers |
( |
void | | ) |
|
◆ receive_new_tasks()
void receive_new_tasks |
( |
void | | ) |
|
◆ rendering_init()
void rendering_init |
( |
void | | ) |
|
◆ set_vblank_handler()
void set_vblank_handler |
( |
s32 | index, |
|
|
struct VblankHandler * | handler, |
|
|
OSMesgQueue * | queue, |
|
|
OSMesg * | msg ) |
◆ setup_game_memory()
void setup_game_memory |
( |
void | | ) |
|
Setup main segments and framebuffers.
◆ setup_mesg_queues()
void setup_mesg_queues |
( |
void | | ) |
|
◆ start_gfx_sptask()
void start_gfx_sptask |
( |
void | | ) |
|
◆ start_sptask()
void start_sptask |
( |
s32 | taskType | ) |
|
◆ thread1_idle()
void thread1_idle |
( |
void * | arg | ) |
|
Initialize hardware, start main thread, then idle.
◆ thread3_video()
void thread3_video |
( |
void * | | ) |
|
◆ thread4_audio()
void thread4_audio |
( |
void * | | ) |
|
◆ thread5_game_loop()
void thread5_game_loop |
( |
void * | | ) |
|
◆ update_controller()
void update_controller |
( |
s32 | index | ) |
|
◆ update_gamestate()
void update_gamestate |
( |
void | | ) |
|
Sets courseId to NULL if
- Bug
- Reloading this segment makes random_u16() deterministic for player spawn order. In laymens terms, random_u16() outputs the same value every time.
◆ creditsRenderMode
◆ D_800DC510
◆ D_800DC514
◆ D_800DC540
◆ D_800DC544
◆ D_800DC568
◆ D_800DC56C
◆ D_80150118
◆ D_8015011E
◆ D_80150120
◆ D_8015014C
◆ D_80150150
◆ D_801502A0
◆ D_801502A4
◆ D_801502C0
◆ D_80152300
◆ D_80152308
◆ gActiveScreenMode
◆ gActiveSPTask
◆ gAudioThread
◆ gAudioThreadStack
◆ gCameraZoom
◆ gCCSelection
◆ gCollisionGrid
◆ gControllerBits
◆ gControllerEight
◆ gControllerFive
◆ gControllerFour
◆ gControllerOne
◆ gControllerPads
OSContPad gControllerPads[] |
|
extern |
◆ gControllers
◆ gControllerSeven
◆ gControllerSix
◆ gControllerStatuses
OSContStatus gControllerStatuses[] |
|
extern |
◆ gControllerThree
◆ gControllerTwo
◆ gCourseTimer
◆ gD_80150158
◆ gDemoMode
◆ gDisplayListHead
◆ gDmaIoMesg
◆ gDmaMesgBuf
◆ gDmaMesgQueue
OSMesgQueue gDmaMesgQueue |
|
extern |
◆ gEnableDebugMode
◆ gGameLoopThread
◆ gGameLoopThreadStack
u8 gGameLoopThreadStack[] |
|
extern |
◆ gGameMesgBuf
◆ gGamestate
◆ gGamestateNext
◆ gGameVblankHandler
◆ gGameVblankQueue
OSMesgQueue gGameVblankQueue |
◆ gGfxMesgBuf
◆ gGfxPool
◆ gGfxPools
◆ gGfxSPTask
◆ gGfxSPTaskStack
◆ gGfxSPTaskYieldBuffer
u8 gGfxSPTaskYieldBuffer[] |
|
extern |
◆ gGfxVblankQueue
OSMesgQueue gGfxVblankQueue |
◆ gGlobalTimer
◆ gGotoMode
◆ gIdleThread
◆ gIdleThreadStack
◆ gIntrMesgBuf
◆ gIntrMesgQueue
OSMesgQueue gIntrMesgQueue |
◆ gMainReceivedMesg
◆ gMatrixObjectCount
◆ gModeSelection
◆ gNumActors
◆ gPhysicalFramebuffers
u16* gPhysicalFramebuffers[] |
|
extern |
◆ gPhysicalZBuffer
uintptr_t gPhysicalZBuffer |
|
extern |
◆ gPIMesgBuf
◆ gPIMesgQueue
◆ gPlayerCountSelection1
s32 gPlayerCountSelection1 |
|
extern |
◆ gPlayerEight
◆ gPlayerFive
◆ gPlayerFour
◆ gPlayerOne
◆ gPlayerOneCopy
◆ gPlayers
◆ gPlayerSeven
◆ gPlayerSix
◆ gPlayerThree
◆ gPlayerTwo
◆ gPlayerTwoCopy
◆ gScreenAspect
◆ gScreenModeSelection
◆ gSegmentTable
uintptr_t gSegmentTable[] |
|
extern |
◆ gSIEventMesgBuf
OSMesg gSIEventMesgBuf[3] |
|
extern |
◆ gSIEventMesgQueue
OSMesgQueue gSIEventMesgQueue |
|
extern |
◆ gSPTaskMesgBuf
OSMesg gSPTaskMesgBuf[16] |
◆ gSPTaskMesgQueue
OSMesgQueue gSPTaskMesgQueue |
◆ gTickSpeed
◆ gVblankHandler1
◆ gVblankHandler2
◆ gVBlankTimer
◆ gVideoThread
◆ gVideoThreadStack
◆ padding
◆ sCurrentAudioSPTask
struct SPTask* sCurrentAudioSPTask |
|
extern |
◆ sCurrentDisplaySPTask
struct SPTask* sCurrentDisplaySPTask |
|
extern |
◆ sNextAudioSPTask
struct SPTask* sNextAudioSPTask |
|
extern |
◆ sNextDisplaySPTask
struct SPTask* sNextDisplaySPTask |
|
extern |
◆ sNumVBlanks
◆ sRenderedFramebuffer
◆ sRenderingFramebuffer
u16 sRenderingFramebuffer |
|
extern |
◆ sSoundMesgBuf
◆ sSoundMesgQueue
OSMesgQueue sSoundMesgQueue |
|
extern |
◆ sSoundVblankHandler
◆ unused_gMsgQueue
OSMesgQueue unused_gMsgQueue |
◆ wasSoftReset