mirror of
https://github.com/SMGCommunity/Petari.git
synced 2024-11-23 05:29:50 +00:00
some GX fixes and match some of DVD
Some checks failed
Build / build (RMGK01) (push) Has been cancelled
Some checks failed
Build / build (RMGK01) (push) Has been cancelled
This commit is contained in:
parent
64b582f9fc
commit
6918e29174
@ -10562,23 +10562,24 @@ RVL_SDK/gx/GXTransform.c:
|
|||||||
|
|
||||||
RVL_SDK/gx/GXPerf.c:
|
RVL_SDK/gx/GXPerf.c:
|
||||||
.text start:0x804C0AD4 end:0x804C13B4
|
.text start:0x804C0AD4 end:0x804C13B4
|
||||||
.data start:0x805FE540 end:0x805FE6F8
|
.data start:0x805FE540 end:0x805FE630
|
||||||
|
|
||||||
RVL_SDK/dvd/dvdfs.c:
|
RVL_SDK/dvd/dvdfs.c:
|
||||||
.text start:0x804C13B4 end:0x804C2128
|
.text start:0x804C13B4 end:0x804C2128
|
||||||
.data start:0x805FE6F8 end:0x805FE818
|
.data start:0x805FE630 end:0x805FE7D0
|
||||||
.sdata start:0x806B2B60 end:0x806B2B70
|
.sdata start:0x806B2B60 end:0x806B2B70
|
||||||
.sbss start:0x806B78D0 end:0x806B7900
|
.sbss start:0x806B78D0 end:0x806B7900
|
||||||
|
|
||||||
RVL_SDK/dvd/dvd.c:
|
RVL_SDK/dvd/dvd.c:
|
||||||
.text start:0x804C2128 end:0x804C6E38
|
.text start:0x804C2128 end:0x804C6E38
|
||||||
.data start:0x805FE818 end:0x805FEB78
|
.data start:0x805FE7D0 end:0x805FEB78
|
||||||
.bss start:0x80667180 end:0x8066BE60
|
.bss start:0x80667180 end:0x8066BE30
|
||||||
.sdata start:0x806B2B70 end:0x806B2B90
|
.sdata start:0x806B2B70 end:0x806B2B90
|
||||||
.sbss start:0x806B7900 end:0x806B7998
|
.sbss start:0x806B7900 end:0x806B7998
|
||||||
|
|
||||||
RVL_SDK/dvd/dvdqueue.c:
|
RVL_SDK/dvd/dvdqueue.c:
|
||||||
.text start:0x804C6E38 end:0x804C7090
|
.text start:0x804C6E38 end:0x804C7090
|
||||||
|
.bss start:0x8066BE30 end:0x8066BE60
|
||||||
|
|
||||||
RVL_SDK/dvd/dvderror.c:
|
RVL_SDK/dvd/dvderror.c:
|
||||||
.text start:0x804C7090 end:0x804C7994
|
.text start:0x804C7090 end:0x804C7994
|
||||||
|
@ -2401,11 +2401,11 @@ config.libs = [
|
|||||||
SDKLib(
|
SDKLib(
|
||||||
"dvd",
|
"dvd",
|
||||||
[
|
[
|
||||||
Object(NonMatching, "RVL_SDK/dvd/dvdfs.c"),
|
Object(Matching, "RVL_SDK/dvd/dvdfs.c"),
|
||||||
Object(NonMatching, "RVL_SDK/dvd/dvd.c"),
|
Object(NonMatching, "RVL_SDK/dvd/dvd.c"),
|
||||||
Object(NonMatching, "RVL_SDK/dvd/dvdqueue.c"),
|
Object(Matching, "RVL_SDK/dvd/dvdqueue.c"),
|
||||||
Object(NonMatching, "RVL_SDK/dvd/dvderror.c"),
|
Object(NonMatching, "RVL_SDK/dvd/dvderror.c"),
|
||||||
Object(NonMatching, "RVL_SDK/dvd/dvdidutils.c"),
|
Object(Matching, "RVL_SDK/dvd/dvdidutils.c"),
|
||||||
Object(NonMatching, "RVL_SDK/dvd/dvdFatal.c"),
|
Object(NonMatching, "RVL_SDK/dvd/dvdFatal.c"),
|
||||||
Object(NonMatching, "RVL_SDK/dvd/dvdDeviceError.c"),
|
Object(NonMatching, "RVL_SDK/dvd/dvdDeviceError.c"),
|
||||||
Object(NonMatching, "RVL_SDK/dvd/dvd_broadway.c")
|
Object(NonMatching, "RVL_SDK/dvd/dvd_broadway.c")
|
||||||
|
@ -26,15 +26,15 @@ void GDWrite_f32(f32);
|
|||||||
|
|
||||||
void GDOverflowed(void);
|
void GDOverflowed(void);
|
||||||
|
|
||||||
static inline void GDOverflowCheck(u32 size) {
|
static void GDOverflowCheck(u32 size) {
|
||||||
if (__GDCurrentDL->ptr + size > __GDCurrentDL->top) {
|
if (__GDCurrentDL->ptr + size > __GDCurrentDL->top) {
|
||||||
GDOverflowed();
|
GDOverflowed();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void __GDWrite(u8 data) { *__GDCurrentDL->ptr++ = data; }
|
static void __GDWrite(u8 data) { *__GDCurrentDL->ptr++ = data; }
|
||||||
|
|
||||||
static inline void GDPosition3f32(f32 x, f32 y, f32 z) {
|
static void GDPosition3f32(f32 x, f32 y, f32 z) {
|
||||||
GDWrite_f32(x);
|
GDWrite_f32(x);
|
||||||
GDWrite_f32(y);
|
GDWrite_f32(y);
|
||||||
GDWrite_f32(z);
|
GDWrite_f32(z);
|
||||||
|
@ -22,7 +22,7 @@ void GXSetTexCoordGen2(GXTexCoordID, GXTexGenType, GXTexGenSrc, u32, GXBool, u32
|
|||||||
void GXSetNumTexGens(u8);
|
void GXSetNumTexGens(u8);
|
||||||
|
|
||||||
|
|
||||||
static inline void GXEnd(void) {
|
static void GXEnd(void) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,7 +7,11 @@ extern "C" {
|
|||||||
|
|
||||||
#include <revolution/base/PPCWGPipe.h>
|
#include <revolution/base/PPCWGPipe.h>
|
||||||
|
|
||||||
|
#ifdef __MWERKS__
|
||||||
extern volatile PPCWGPipe gxfifo : 0xCC008000;
|
extern volatile PPCWGPipe gxfifo : 0xCC008000;
|
||||||
|
#else
|
||||||
|
extern volatile PPCWGPipe gxfifo;
|
||||||
|
#endif
|
||||||
extern volatile void *__piReg;
|
extern volatile void *__piReg;
|
||||||
extern volatile void *__cpReg;
|
extern volatile void *__cpReg;
|
||||||
extern volatile void *__peReg;
|
extern volatile void *__peReg;
|
||||||
@ -101,8 +105,9 @@ extern volatile void *__memReg;
|
|||||||
GX_WRITE_U32((reg));\
|
GX_WRITE_U32((reg));\
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef __MWERKS__
|
||||||
#define GX_DEFINE_GX_READ_COUNTER(unit) \
|
#define GX_DEFINE_GX_READ_COUNTER(unit) \
|
||||||
inline u32 __GXRead##unit##CounterU32( u32 regAddrL, u32 regAddrH ) \
|
u32 __GXRead##unit##CounterU32( u32 regAddrL, u32 regAddrH ) \
|
||||||
{ \
|
{ \
|
||||||
u32 ctrH0, ctrH1, ctrL; \
|
u32 ctrH0, ctrH1, ctrL; \
|
||||||
ctrH0 = GX_##unit##_REG_READ_U16(regAddrH); \
|
ctrH0 = GX_##unit##_REG_READ_U16(regAddrH); \
|
||||||
@ -114,6 +119,9 @@ extern volatile void *__memReg;
|
|||||||
} while ( ctrH0 != ctrH1 ); \
|
} while ( ctrH0 != ctrH1 ); \
|
||||||
return ((ctrH0 << 16) | ctrL); \
|
return ((ctrH0 << 16) | ctrL); \
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
#define GX_DEFINE_GX_READ_COUNTER(unit)
|
||||||
|
#endif
|
||||||
|
|
||||||
GX_DEFINE_GX_READ_COUNTER(CP)
|
GX_DEFINE_GX_READ_COUNTER(CP)
|
||||||
GX_DEFINE_GX_READ_COUNTER(PE)
|
GX_DEFINE_GX_READ_COUNTER(PE)
|
||||||
|
@ -17,14 +17,14 @@ volatile PPCWGPipe GXWGFifo;
|
|||||||
#define __GXCDEFX(func,n,t) __GXCDEF##n(func,t,t)
|
#define __GXCDEFX(func,n,t) __GXCDEF##n(func,t,t)
|
||||||
|
|
||||||
#define __GXCDEF1(func,ts,td) \
|
#define __GXCDEF1(func,ts,td) \
|
||||||
static inline void func(const ts x) \
|
static void func(const ts x) \
|
||||||
{ \
|
{ \
|
||||||
GXWGFifo.td = (td) x; \
|
GXWGFifo.td = (td) x; \
|
||||||
return; \
|
return; \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define __GXCDEF2(func,ts,td) \
|
#define __GXCDEF2(func,ts,td) \
|
||||||
static inline void func(const ts x, const ts y) \
|
static void func(const ts x, const ts y) \
|
||||||
{ \
|
{ \
|
||||||
GXWGFifo.td = (td) x; \
|
GXWGFifo.td = (td) x; \
|
||||||
GXWGFifo.td = (td) y; \
|
GXWGFifo.td = (td) y; \
|
||||||
@ -32,7 +32,7 @@ volatile PPCWGPipe GXWGFifo;
|
|||||||
}
|
}
|
||||||
|
|
||||||
#define __GXCDEF3(func,ts,td) \
|
#define __GXCDEF3(func,ts,td) \
|
||||||
static inline void func(const ts x, const ts y, const ts z) \
|
static void func(const ts x, const ts y, const ts z) \
|
||||||
{ \
|
{ \
|
||||||
GXWGFifo.td = (td) x; \
|
GXWGFifo.td = (td) x; \
|
||||||
GXWGFifo.td = (td) y; \
|
GXWGFifo.td = (td) y; \
|
||||||
|
@ -251,7 +251,7 @@ static BOOL DVDConvertEntrynumToPath(s32 entrynum, char* path, u32 maxlen) {
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL DVDGetCurrentDir(char* path, u32 maxlen) {
|
static BOOL DVDGetCurrentDir(char* path, u32 maxlen) {
|
||||||
return DVDConvertEntrynumToPath((s32)currentDirectory, path, maxlen);
|
return DVDConvertEntrynumToPath((s32)currentDirectory, path, maxlen);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user