mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-07-31 07:45:48 -04:00
9649319ec4
* Reorganize files into libs/{dolphin,JSystem,PowerPC_EABI_Support,revolution,TRK_MINNOW_DOLPHIN}
* Update configure.py and project.py for new libs structure
* Refactor `#include <dolphin/x.h>` -> `<x.h>`
* Remove `__REVOLUTION_SDK__` forwards from dolphin
* Fix dolphin/ references in revolution
* Wrap `#include <dolphin.h>` in `!__REVOLUTION_SDK__`
* Always build TRK against dolphin headers
* Resolve revolution SDK header resolution issues
131 lines
3.6 KiB
C
131 lines
3.6 KiB
C
#ifndef _DOLPHIN_OS_INTERNAL_H_
|
|
#define _DOLPHIN_OS_INTERNAL_H_
|
|
|
|
#include <dolphin/os.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
// OS
|
|
extern char* __OSExceptionNames[17]; // D ONLY
|
|
|
|
u32 __OSIsDebuggerPresent(void);
|
|
void __OSPSInit(void);
|
|
|
|
// OSAlloc
|
|
extern volatile int __OSCurrHeap;
|
|
|
|
// OSAudioSystem
|
|
void __OSInitAudioSystem(void);
|
|
void __OSStopAudioSystem(void);
|
|
|
|
// OSCache
|
|
void __OSCacheInit(void);
|
|
|
|
// OSContext
|
|
void __OSContextInit(void);
|
|
|
|
// OSError
|
|
void __OSUnhandledException(__OSException exception, OSContext* context, u32 dsisr, u32 dar);
|
|
|
|
// OSExec
|
|
void __OSGetExecParams(OSExecParams* params);
|
|
void __OSSetExecParams(const OSExecParams* params, OSExecParams* addr);
|
|
void __OSBootDolSimple(u32 doloffset, u32 restartCode, void* regionStart, void* regionEnd, BOOL argsUseDefault, s32 argc, char** argv);
|
|
void __OSBootDol(u32 doloffset, u32 restartCode, const char** argv);
|
|
|
|
// OSInterrupt
|
|
extern void __RAS_OSDisableInterrupts_begin(void);
|
|
extern void __RAS_OSDisableInterrupts_end(void);
|
|
|
|
extern u64 __OSSpuriousInterrupts; // D ONLY
|
|
extern char* __OSInterruptNames[33]; // D ONLY
|
|
extern char* __OSPIErrors[8]; // D ONLY
|
|
|
|
__OSInterruptHandler __OSSetInterruptHandler(__OSInterrupt interrupt, __OSInterruptHandler handler);
|
|
__OSInterruptHandler __OSGetInterruptHandler(__OSInterrupt interrupt);
|
|
void __OSInterruptInit(void);
|
|
OSInterruptMask __OSMaskInterrupts(OSInterruptMask global);
|
|
OSInterruptMask __OSUnmaskInterrupts(OSInterruptMask global);
|
|
void __OSDispatchInterrupt(__OSException exception, OSContext* context);
|
|
void __OSModuleInit(void);
|
|
|
|
// OSMemory
|
|
void __OSInitMemoryProtection(void);
|
|
|
|
// OSMutex
|
|
void __OSUnlockAllMutex(OSThread* thread);
|
|
int __OSCheckDeadLock(OSThread* thread);
|
|
int __OSCheckMutexes(OSThread* thread);
|
|
|
|
// OSReset
|
|
void __OSDoHotReset(u32 resetCode);
|
|
void __OSShutdownDevices(BOOL doRecal);
|
|
int __OSCallResetFunctions(BOOL final);
|
|
|
|
// OSResetSW
|
|
void __OSResetSWInterruptHandler(s16 exception, OSContext* context);
|
|
void __OSSetResetButtonTimer(u8 min);
|
|
|
|
// OSRtc
|
|
int __OSGetRTC(u32* rtc);
|
|
int __OSSetRTC(u32 rtc);
|
|
void __OSInitSram(void);
|
|
OSSram* __OSLockSram(void);
|
|
OSSramEx* __OSLockSramEx(void);
|
|
int __OSUnlockSram(BOOL commit);
|
|
int __OSUnlockSramEx(BOOL commit);
|
|
int __OSSyncSram(void);
|
|
int __OSCheckSram(void);
|
|
int __OSReadROM(void* buffer, s32 length, s32 offset);
|
|
int __OSReadROMAsync(void* buffer, s32 length, s32 offset, void (*callback)());
|
|
u8 __OSGetBootMode(void);
|
|
void __OSSetBootMode(u8 ntd);
|
|
|
|
// OSSync
|
|
extern void __OSSystemCallVectorStart();
|
|
extern void __OSSystemCallVectorEnd();
|
|
|
|
void __OSInitSystemCall(void);
|
|
|
|
// OSThread
|
|
void __OSThreadInit(void);
|
|
s32 __OSGetEffectivePriority(OSThread* thread);
|
|
void __OSPromoteThread(OSThread* thread, s32 priority);
|
|
void __OSReschedule(void);
|
|
|
|
// OSTime
|
|
void __OSSetTime(OSTime time);
|
|
OSTime __OSGetSystemTime();
|
|
void __OSSetTick(__REGISTER OSTick newTicks);
|
|
OSTime __OSTimeToSystemTime(OSTime time);
|
|
|
|
// ppc_eabi_init
|
|
__declspec(section ".init") asm void __init_hardware(void);
|
|
__declspec(section ".init") asm void __flush_cache(void* address, unsigned int size);
|
|
void __init_user(void);
|
|
void _ExitProcess(void);
|
|
|
|
// start
|
|
DECL_WEAK void InitMetroTRK_BBA();
|
|
|
|
__declspec(section ".init") void __start(void);
|
|
|
|
__declspec(section ".init") extern void __start(void);
|
|
__declspec(section ".init") void __copy_rom_section(void* dst, const void* src, u32 size);
|
|
__declspec(section ".init") void __init_bss_section(void* dst, u32 size);
|
|
__declspec(section ".init") extern void __init_registers(void);
|
|
__declspec(section ".init") extern void __init_data(void);
|
|
|
|
// time.dolphin
|
|
OSTime __get_clock(void);
|
|
u32 __get_time(void);
|
|
int __to_gm_time(void);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif // _DOLPHIN_OS_INTERNAL_H_
|