mirror of
https://github.com/ACreTeam/ac-decomp
synced 2026-05-26 15:24:34 -04:00
header fixing
This commit is contained in:
@@ -10,8 +10,9 @@ dolphin/OS/OSArena.c:
|
||||
.text: [0x8007988c, 0x800798ac]
|
||||
.sdata: [0x80218178, 0x80218180]
|
||||
.sbss: [0x802188f8, 0x80218900]
|
||||
# OS/OSCache.c:
|
||||
# .text: [0x80079b40, 0x80079d30]
|
||||
#dolphin/OS/OSCache.c:
|
||||
# .text: [0x80079b40, 0x8007a01c]
|
||||
# .data: [0x800dfa00, 0x800dfc30]
|
||||
# OS/OSDisableInterrupts.c:
|
||||
# .text: [0x8007ac24, 0x8007ac38]
|
||||
dolphin/OS/OSEnableInterrupts.c:
|
||||
@@ -25,4 +26,4 @@ libultra/ultra.c:
|
||||
.text: [0x8005d01c, 0x8005d090]
|
||||
libultra/gu/sins.c:
|
||||
.text: [0x8005e860, 0x8005e8ac]
|
||||
.data: [0x800dd360, 0x800ddb60]
|
||||
.data: [0x800dd360, 0x800ddb60]
|
||||
|
||||
@@ -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
|
||||
@@ -28,14 +28,14 @@ OSContext* OS_CURRENT_CONTEXT_PHYS : 0x800000C0;
|
||||
OSContext* OS_CURRENT_CONTEXT : 0x800000D4;
|
||||
OSContext* OS_CURRENT_FPU_CONTEXT : 0x800000D8;
|
||||
|
||||
asm void OSSaveFPUContext(OSContext*);
|
||||
asm void OSSetCurrentContext(OSContext*);
|
||||
void OSSaveFPUContext(OSContext*);
|
||||
void OSSetCurrentContext(OSContext*);
|
||||
OSContext* OSGetCurrentContext(void);
|
||||
asm BOOL OSSaveContext(OSContext*);
|
||||
asm void OSLoadContext(OSContext*);
|
||||
asm void* OSGetStackPointer(void);
|
||||
BOOL OSSaveContext(OSContext*);
|
||||
void OSLoadContext(OSContext*);
|
||||
void* OSGetStackPointer(void);
|
||||
void OSClearContext(OSContext*);
|
||||
asm void OSInitContext(register OSContext* ctx, register u32 srr, register sp);
|
||||
void OSInitContext(register OSContext*, register u32 srr, register u32 sp);
|
||||
void OSDumpContext(const OSContext*);
|
||||
|
||||
void __OSContextInit(void);
|
||||
@@ -2,7 +2,7 @@
|
||||
#define _DOLPHIN_OS
|
||||
|
||||
#include "types.h"
|
||||
#include "dolphin/OSContext.h"
|
||||
#include "dolphin/OS/OSContext.h"
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
@@ -1,31 +0,0 @@
|
||||
#ifndef OS_CACHE_H
|
||||
#define OS_CACHE_H
|
||||
#include "types.h"
|
||||
#include "dolphin/OSContext.h"
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
asm void DCEnable(void);
|
||||
asm void DCInvalidateRange(void* buf, u32 len);
|
||||
asm void DCFlushRange(void* buf, u32 len);
|
||||
asm void DCStoreRange(void* buf, u32 len);
|
||||
asm void DCFlushRangeNoSync(void* buf, u32 len);
|
||||
asm void DCStoreRangeNoSync(void* buf, u32 len);
|
||||
asm void DCZeroRange(void* buf, u32 len);
|
||||
asm void DCTouchRange(void* buf, u32 len);
|
||||
asm void ICInvalidateRange(void* buf, u32 len);
|
||||
asm void ICFlashInvalidate(void);
|
||||
asm void ICEnable(void);
|
||||
asm void LCDisable(void);
|
||||
|
||||
void L2GlobalInvalidate(void);
|
||||
|
||||
void DMAErrorHandler(u8, OSContext*, u32, u32, ...);
|
||||
|
||||
void __OSCacheInit(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
@@ -0,0 +1,16 @@
|
||||
#ifndef DSP_H
|
||||
#define DSP_H
|
||||
|
||||
#include "types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"{
|
||||
#endif
|
||||
|
||||
extern volatile u16 __DSPRegs[] : 0XCC005000;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -2,8 +2,8 @@
|
||||
#define BATCONFIG_H
|
||||
|
||||
#include "types.h"
|
||||
#include "dolphin/OSMemory.h"
|
||||
#include "dolphin/os.h"
|
||||
#include "dolphin/OS/OSMemory.h"
|
||||
#include "dolphin/OS/os.h"
|
||||
|
||||
asm void Config24MB();
|
||||
asm void Config48MB();
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef FAULT_H
|
||||
#define FAULT_H
|
||||
#include "types.h"
|
||||
#include "dolphin/os.h"
|
||||
#include "dolphin/OS/os.h"
|
||||
#include "libultra/libultra.h"
|
||||
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#ifndef LIBULTRA_H
|
||||
#define LIBULTRA_H
|
||||
#include "types.h"
|
||||
#include "dolphin/OSTime.h"
|
||||
#include "dolphin/OSCache.h"
|
||||
#include "dolphin/OS/OSTime.h"
|
||||
#include "dolphin/OS/OSCache.h"
|
||||
int bcmp (void *v1, void *v2, u32 size);
|
||||
void bcopy(void *dst, void *src, size_t n);
|
||||
void bzero(void *ptr, size_t size);
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
|
||||
#include "types.h"
|
||||
|
||||
#include "dolphin/os.h"
|
||||
#include "dolphin/OS/os.h"
|
||||
#include "libultra/libultra.h"
|
||||
#include "JSystem/JUT/JUTAssertion.h"
|
||||
#include "JSystem/JUT/JUTDbPrint.h"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "dolphin/ppcarch.h"
|
||||
#include "dolphin/BASE/ppcarch.h"
|
||||
|
||||
asm u32 PPCMfmsr(void){
|
||||
nofralloc
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#include "dolphin/OS/OSAlarm.h"
|
||||
#include "dolphin/OS/OSTime.h"
|
||||
#inlcude "dolphin/OS/OSContext.h"
|
||||
#include "dolphin/OS/OSContext.h"
|
||||
|
||||
static void DecrementerExceptionHandler(u8, OSContext*);
|
||||
|
||||
void OSInitAlarm(void){
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "dolphin/OSArena.h"
|
||||
#include "dolphin/OS/OSArena.h"
|
||||
|
||||
static void* __OSArenaLo = (void*) - 1;
|
||||
static void* __OSArenaHi = NULL;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "dolphin/OSCache.h"
|
||||
#include "dolphin/OS/OSCache.h"
|
||||
//Needs OSError stuff
|
||||
asm void DCEnable(void){
|
||||
nofralloc
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#include "dolphin/OSContext.h"
|
||||
#include "dolphin/OSError.h"
|
||||
#include "dolphin/OS/OSContext.h"
|
||||
#include "dolphin/OS/OSError.h"
|
||||
static asm void __OSLoadFPUContext(int unused, register OSContext* ctx){
|
||||
nofralloc
|
||||
lhz r5, ctx->state
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "dolphin/os.h"
|
||||
#include "dolphin/OS/os.h"
|
||||
|
||||
asm BOOL OSDisableInterrupts(void){
|
||||
nofralloc
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "dolphin/os.h"
|
||||
#include "dolphin/OS/os.h"
|
||||
|
||||
asm BOOL OSEnableInterrupts(void){
|
||||
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
#include "dolphin/OS/OSError.h"
|
||||
#include "dolphin/OS/OSContext.h"
|
||||
#include "dolphin/BASE/ppcarch.h"
|
||||
#include "dolphin/dsp/dsp.h"
|
||||
#include "dolphin/OS/OSTime.h"
|
||||
|
||||
OSErrorHandler __OSErrorTable[16];
|
||||
|
||||
OSErrorHandler OSSetErrorHanlder(OSError error, OSErrorHandler handler){
|
||||
OSErrorHandler prevhandler = __OSErrorTable[error];
|
||||
__OSErrorTable[error] = handler;
|
||||
return(prevhandler);
|
||||
}
|
||||
|
||||
void __OSUnhandledException(u8 error, OSContext* ctx, s32 sdirs, s32 dar){
|
||||
if(!(ctx->srr1) & (1 << 1))){
|
||||
OSReport("Non-recoverable exception %d", error);
|
||||
} else {
|
||||
if(__OSErrorTable[error] != NULL){
|
||||
OSDisableScheduler();
|
||||
OSErrorTable[error](error, ctx, sdirs, dar);
|
||||
OSEnableScheduler();
|
||||
__OSReschedule();
|
||||
OSLoadContext();
|
||||
}
|
||||
if(error = ERROR_OS_DECREMENTER){
|
||||
OSLoadContext(ctx);
|
||||
OSReport("Unhandled Exception %d", error);
|
||||
}
|
||||
OSReport("\n");
|
||||
OSDumpContext(ctx);
|
||||
OSReport("\nDSISR = 0x%08x DAR = 0X%08X\n", sdirs, dar);
|
||||
OSReport("TB = 0x%01611x\n", OSGetTime());
|
||||
switch (error) {
|
||||
case OS_ERROR_DSI:
|
||||
OSReport("\nInstruction at 0x%x (read from SRR0) attempted to access ""Invalid address 0x%x (read from DAR)\n", ctx->srr0, dar);
|
||||
break;
|
||||
case OS_ERROR_ISI:
|
||||
OSReport("Attempted to fetch instruction from invalid adddress 0x%x ""(read from SRR0)\n",ctx->srr0);
|
||||
break;
|
||||
case OS_ERROR_PROGRAM:
|
||||
OSReport("\nProgram exception : Possible illegal instruction/operation ""at or around 0x%x (read from SRR0)\n", ctx->srr0, dar);
|
||||
break;
|
||||
case 15:
|
||||
OSReport("\n");
|
||||
OSREport("AI DMA Address = 0x%04x%04x\n", __DSPRegs[24], __DSPRegs[25]);
|
||||
OSReport(ARAM DMA Address = 0x%04x%04x\n", __DSPRegs[16], __DSPRegs[17]);
|
||||
OSReport("DI DMA Address = 0x%08x\n", __DIRegs[5]);
|
||||
break;
|
||||
}
|
||||
OSReport("\nLast interrupt (%d): SRR0 = 0x08x TB = 0x%01611x\n", __OSLastInterrupt, __OSLastInterruptSrr0, __OSLastInterruptTime);
|
||||
PPCHalt();
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "dolphin/OSMemory.h"
|
||||
#include "dolphin/OS/OSMemory.h"
|
||||
|
||||
u32 OSGetConsoleSimulatedMemSize(void){
|
||||
return(SIM_MEM);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "dolphin/os.h"
|
||||
#include "dolphin/OS/os.h"
|
||||
|
||||
asm BOOL OSRestoreInterrupts(register BOOL level){
|
||||
|
||||
|
||||
@@ -13,11 +13,11 @@ void bzero(void* __s, size_t __n) {
|
||||
memset(__s, 0, __n);
|
||||
}
|
||||
|
||||
void osWritebackDCache(void* buf, u32 len){
|
||||
DCStoreRange(buf, len);
|
||||
}
|
||||
//void osWritebackDCache(void* buf, u32 len){
|
||||
// DCStoreRange(buf, len);
|
||||
//}
|
||||
|
||||
/* s32 osGetCount(void){
|
||||
return OSGetTick();
|
||||
}
|
||||
*/
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user