mirror of
https://github.com/ACreTeam/ac-decomp
synced 2026-08-01 07:57:22 -04:00
header fixing
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
#ifndef OS_ARENA_H
|
||||
#define OS_ARENA_H
|
||||
#include "types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"{
|
||||
#endif
|
||||
|
||||
void* OSGetArenaHi(void);
|
||||
void* OSGetArenaLo(void);
|
||||
|
||||
void OSSetArenaHi(void*);
|
||||
void OSSetArenaLo(void*);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
@@ -0,0 +1,30 @@
|
||||
#ifndef OS_CACHE_H
|
||||
#define OS_CACHE_H
|
||||
#include "types.h"
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
asm void DCEnable(void);
|
||||
asm void DCInvalidateRange(void*, u32);
|
||||
asm void DCFlushRange(void*, u32);
|
||||
asm void DCStoreRange(void*, u32);
|
||||
asm void DCFlushRangeNoSync(void*, u32);
|
||||
asm void DCStoreRangeNoSync(void*, u32);
|
||||
asm void DCZeroRange(void*, u32);
|
||||
asm void DCTouchRange(void*, u32 len);
|
||||
asm void ICInvalidateRange(void*, u32);
|
||||
asm void ICFlashInvalidate(void);
|
||||
asm void ICEnable(void);
|
||||
asm void LCDisable(void);
|
||||
|
||||
//void L2GlobalInvalidate(void);
|
||||
|
||||
//void DMAErrorHandler(u8, struct OSContext*, u32, u32, ...);
|
||||
|
||||
//void __OSCacheInit(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
@@ -0,0 +1,45 @@
|
||||
#ifndef OS_CONTEXT_H
|
||||
#define OS_CONTEXT_H
|
||||
#include "types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct OSContext{
|
||||
u32 gprs[32];
|
||||
u32 cr;
|
||||
u32 lr;
|
||||
u32 ctr;
|
||||
u32 xer;
|
||||
f64 fprs[32];
|
||||
u32 fpscr_tmp;
|
||||
u32 fpscr;
|
||||
u32 srr0;
|
||||
u32 srr1;
|
||||
u16 mode;
|
||||
u16 state;
|
||||
u32 gqrs[8];
|
||||
char UNK_0x1C4;
|
||||
f64 psfs[32];
|
||||
} OSContext;
|
||||
|
||||
OSContext* OS_CURRENT_CONTEXT_PHYS : 0x800000C0;
|
||||
OSContext* OS_CURRENT_CONTEXT : 0x800000D4;
|
||||
OSContext* OS_CURRENT_FPU_CONTEXT : 0x800000D8;
|
||||
|
||||
void OSSaveFPUContext(OSContext*);
|
||||
void OSSetCurrentContext(OSContext*);
|
||||
OSContext* OSGetCurrentContext(void);
|
||||
BOOL OSSaveContext(OSContext*);
|
||||
void OSLoadContext(OSContext*);
|
||||
void* OSGetStackPointer(void);
|
||||
void OSClearContext(OSContext*);
|
||||
void OSInitContext(register OSContext*, register u32 srr, register u32 sp);
|
||||
void OSDumpContext(const OSContext*);
|
||||
|
||||
void __OSContextInit(void);
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif
|
||||
#endif
|
||||
@@ -0,0 +1,32 @@
|
||||
#ifndef OS_ERROR_H
|
||||
#define OS_ERROR_H
|
||||
#include "types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"{
|
||||
#endif
|
||||
|
||||
typedef enum {
|
||||
OS_ERR_SYSTEM_RESET,
|
||||
OS_ERR_MACHINE_CHECK,
|
||||
OS_ERR_DSI,
|
||||
OS_ERR_ISI,
|
||||
OS_ERR_EXT_INTERRUPT,
|
||||
OS_ERR_ALIGMENT,
|
||||
OS_ERR_PROGRAM,
|
||||
OS_ERR_FP_UNAVAIL,
|
||||
OS_ERR_DECREMENTER,
|
||||
OS_ERR_SYSTEM_CALL,
|
||||
OS_ERR_TRACE,
|
||||
OS_ERR_PERF_MONITOR,
|
||||
OS_ERR_IABR,
|
||||
OS_ERR_SMI,
|
||||
OS_ERR_THERMAL_INT,
|
||||
OS_ERR_PROTECTION,
|
||||
OS_ERR_FP_EXCEPTION,
|
||||
OS_ERR_MAX,
|
||||
}
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif
|
||||
#endif
|
||||
@@ -0,0 +1,17 @@
|
||||
#ifndef OS_MEMORY_H
|
||||
#define OS_MEMORY_H
|
||||
#include "types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define SIM_MEM *(u32 *)0x800000f0
|
||||
static asm void Config24MB();
|
||||
static asm void Config48MB();
|
||||
u32 OSGetConsoleSimulatedMemSize(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
@@ -0,0 +1,13 @@
|
||||
#ifndef OS_TIME_H
|
||||
#define OS_TIME_H
|
||||
#include "types.h"
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
asm s32 OSGetTime(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
@@ -0,0 +1,26 @@
|
||||
#ifndef _DOLPHIN_OS
|
||||
#define _DOLPHIN_OS
|
||||
|
||||
#include "types.h"
|
||||
#include "dolphin/OS/OSContext.h"
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void OSReport(const char*, ...);
|
||||
|
||||
asm BOOL OSDisableInterrupts(void);
|
||||
asm BOOL OSEnableInterrupts(void);
|
||||
asm BOOL OSRestoreInterrupts(BOOL level);
|
||||
|
||||
|
||||
void __RAS_OSDisableInterrupts_begin(void);
|
||||
void __RAS_OSDisableInterrupts_end(void);
|
||||
|
||||
typedef void (*OSExceptionHandler)(u8, OSContext*);
|
||||
OSExceptionHandler __OSSetExceptionHandler(u8, OSExceptionHandler);
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif
|
||||
#endif
|
||||
Reference in New Issue
Block a user