mirror of
https://github.com/open-goal/jak-project
synced 2026-05-25 23:35:33 -04:00
4f537d4a71
This sets up the C Kernel for Jak 3, and makes it possible to build and load code built with `goalc --jak3`. There's not too much interesting here, other than they switched to a system where symbol IDs (unique numbers less than 2^14) are generated at compile time, and those get included in the object file itself. This is kind of annoying, since it means all tools that produce a GOAL object file need to work together to assign unique symbol IDs. And since the symbol IDs can't conflict, and are only a number between 0 and 2^14, you can't just hash and hope for no collisions. We work around this by ignoring the IDs and re-assigning our own. I think this is very similar to what the C Kernel did on early builds of Jak 3 which supported loading old format level files, which didn't have the IDs included. As far as I can tell, this shouldn't cause any problems. It defeats all of their fancy tricks to save memory by not storing the symbol string, but we don't care.
25 lines
517 B
C
25 lines
517 B
C
#pragma once
|
|
|
|
#include "common/common_types.h"
|
|
|
|
#include "game/common/dgo_rpc_types.h"
|
|
#include "game/kernel/common/Ptr.h"
|
|
|
|
extern u32 sMsgNum;
|
|
s32 RpcCall(s32 rpcChannel,
|
|
u32 fno,
|
|
bool async,
|
|
void* sendBuff,
|
|
s32 sendSize,
|
|
void* recvBuff,
|
|
s32 recvSize);
|
|
u64 RpcCall_wrapper(void* _args);
|
|
u32 RpcBusy(s32 channel);
|
|
void RpcSync(s32 channel);
|
|
void LoadDGOTest();
|
|
void kdgo_init_globals();
|
|
u32 InitRPC();
|
|
void StopIOP();
|
|
|
|
extern u32 sShowStallMsg;
|