db.o 100%

This commit is contained in:
shibbo 2022-09-01 20:22:32 -04:00
parent 9c15b9d9ab
commit 3ebcf05f22
7 changed files with 68 additions and 18 deletions

View File

@ -1,6 +1,6 @@
Symbol Name, Object File, Library Archive, Matching
DBInit,db.o,db.a,false
__DBExceptionDestinationAux,db.o,db.a,false
__DBExceptionDestination,db.o,db.a,false
__DBIsExceptionMarked,db.o,db.a,false
DBPrintf,db.o,db.a,false
DBInit,db.o,db.a,true
__DBExceptionDestinationAux,db.o,db.a,true
__DBExceptionDestination,db.o,db.a,true
__DBIsExceptionMarked,db.o,db.a,true
DBPrintf,db.o,db.a,true

1 Symbol Name Object File Library Archive Matching
2 DBInit db.o db.a false true
3 __DBExceptionDestinationAux db.o db.a false true
4 __DBExceptionDestination db.o db.a false true
5 __DBIsExceptionMarked db.o db.a false true
6 DBPrintf db.o db.a false true

View File

@ -1,6 +1,6 @@
{
"schemaVersion": 1,
"label": "SDK",
"message": "1.0903174326110265%",
"message": "1.126474328603845%",
"color": "blue"
}

View File

@ -7,7 +7,7 @@
| [axfx](https://github.com/shibbo/Petari/tree/master/libs/RVL_SDK/docs/lib/axfx.md) | 0.0% |
| [base](https://github.com/shibbo/Petari/tree/master/libs/RVL_SDK/docs/lib/base.md) | 0.0% |
| [bte](https://github.com/shibbo/Petari/tree/master/libs/RVL_SDK/docs/lib/bte.md) | 0.0% |
| [db](https://github.com/shibbo/Petari/tree/master/libs/RVL_SDK/docs/lib/db.md) | 0.0% |
| [db](https://github.com/shibbo/Petari/tree/master/libs/RVL_SDK/docs/lib/db.md) | 100.0% |
| [dsp](https://github.com/shibbo/Petari/tree/master/libs/RVL_SDK/docs/lib/dsp.md) | 100.0% |
| [dvd](https://github.com/shibbo/Petari/tree/master/libs/RVL_SDK/docs/lib/dvd.md) | 0.0% |
| [esp](https://github.com/shibbo/Petari/tree/master/libs/RVL_SDK/docs/lib/esp.md) | 0.0% |

View File

@ -8,16 +8,16 @@
| Object | Percentage (of Bytes) | Functions Done / Total Functions | Percentage (Functions) | Status
| ------------- | ------------- | ------------- | ------------- | -------------
| db.o | 0.0% | 0 / 5 | 0.0% | :x:
| db.o | 100.0% | 5 / 5 | 100.0% | :white_check_mark:
# db.o
| Symbol | Decompiled? |
| ------------- | ------------- |
| DBInit | :x: |
| __DBExceptionDestinationAux | :x: |
| __DBExceptionDestination | :x: |
| __DBIsExceptionMarked | :x: |
| DBPrintf | :x: |
| DBInit | :white_check_mark: |
| __DBExceptionDestinationAux | :white_check_mark: |
| __DBExceptionDestination | :white_check_mark: |
| __DBIsExceptionMarked | :white_check_mark: |
| DBPrintf | :white_check_mark: |

View File

@ -5,6 +5,16 @@
extern "C" {
#endif
#include <revolution/types.h>
typedef struct DBInterface {
u32 _0;
u32 mask;
void (*exceptionDestination)(void);
void* exceptionReturn;
} DBInterface;
void DBInit(void);
void DBPrintf(char *, ...);
#ifdef __cplusplus

View File

@ -22,16 +22,19 @@ u32 __OSBusClock : (0x8000 << 16 | 0x00F8);
#define OSNanosecondsToTicks( nsec ) (((nsec) * (OS_TIMER_CLOCK / 125000)) / 8000)
void* OSPhysicalToUncached(u32);
u32 OSCachedToPhysical(const void* caddr);
#define OS_CACHED_REGION_PREFIX 0x8000
#define OS_BASE_CACHED (OS_CACHED_REGION_PREFIX << 16)
#define OSPhysicalToCached(paddr) ((void*)((u32)(paddr) + OS_BASE_CACHED))
#define OSCachedToPhysical(caddr) ((u32)((u8*)(caddr) - OS_BASE_CACHED))
OSTick OSGetTick(void);
OSTime OSGetTime(void);
void OSRegisterVersion(const char *);
inline void* OSPhysicalToCached(u32 addr) {
return (void*)(addr | 0x8000 << 16);
}
void* OSPhysicalToUncached(u32);
void OSReport(const char *, ...);
void OSVReport(const char *, va_list);
void OSPanic(const char *, int, const char *, ...);

View File

@ -0,0 +1,37 @@
#include <revolution/db.h>
#include <revolution/os.h>
DBInterface* __DBInterface = NULL;
BOOL DBVerbose;
void __DBExceptionDestination(void);
void DBInit(void) {
__DBInterface = (DBInterface*)OSPhysicalToCached(0x40);
__DBInterface->exceptionDestination = (void*)OSCachedToPhysical(__DBExceptionDestination);
DBVerbose = 1;
}
void __DBExceptionDestinationAux(void) {
u32* context_addr = (void*)0xC0;
OSContext* context = (OSContext*)(0x80000000 + *context_addr);
OSReport("DBExceptionDestination\n");
OSDumpContext(context);
PPCHalt();
}
asm void __DBExceptionDestination(void) {
nofralloc
mfmsr r3
ori r3, r3, 0x30
mtmsr r3
b __DBExceptionDestinationAux
}
BOOL __DBIsExceptionMarked(__OSException ex) {
return __DBInterface->mask & (1 << ex);
}
void DBPrintf(char *, ...) {
va_list list;
}