mirror of
https://github.com/joel16/uofw.git
synced 2024-11-27 05:20:23 +00:00
Cleaned loadexec (only decodeKL4E has to be done now)
This commit is contained in:
parent
41d619e4c6
commit
221e6a79c1
7
global.h
7
global.h
@ -129,6 +129,9 @@ GET_REG(_oldK1, K1); \
|
||||
int _k1 = _oldK1 << 11; \
|
||||
SET_REG(K1, _k1)
|
||||
#define K1_RESET() SET_REG(K1, _oldK1)
|
||||
#define K1_GET() \
|
||||
int _k1; \
|
||||
GET_REG(_k1, K1);
|
||||
#define K1_USER_PTR(ptr) (((u32)(void*)(ptr) & _k1) >= 0)
|
||||
#define K1_USER_BUF_DYN_SZ(ptr, size) (((((s32)(void*)(ptr) + size) | (s32)(void*)(ptr) | size) & _k1) >= 0)
|
||||
#define K1_USER_BUF_STA_SZ(ptr, size) (((((s32)(void*)(ptr) + size) | (s32)(void*)(ptr) ) & _k1) >= 0)
|
||||
@ -175,7 +178,7 @@ SET_REG(K1, _k1)
|
||||
#define UUNCACHED(ptr) (void*)(0x40000000 | ((u32)(void*)(ptr) & 0x1FFFFFFF))
|
||||
|
||||
#define RESET_VECTOR(info, outAddr, func) \
|
||||
{
|
||||
{ \
|
||||
if (*(int*)(info + 4) > 0x2000000) \
|
||||
AT_SW((*(int*)(0xBC100040) & 0xFFFFFFFC) | 2, 0xBC100040); \
|
||||
else \
|
||||
@ -187,5 +190,7 @@ SET_REG(K1, _k1)
|
||||
_resetVector(*(int*)(info + 0), *(int*)(info + 4)); \
|
||||
}
|
||||
|
||||
#define UPALIGN256(v) ((v + 0xFF) & 0xFFFFFF00)
|
||||
|
||||
#endif
|
||||
|
||||
|
1143
loadexec/loadexec.c
1143
loadexec/loadexec.c
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user