mirror of
https://github.com/ACreTeam/ac-decomp
synced 2026-07-07 20:11:51 -04:00
header fixing
This commit is contained in:
@@ -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