some GX fixes and match some of DVD
Some checks failed
Build / build (RMGK01) (push) Has been cancelled

This commit is contained in:
shibbo 2024-10-30 23:41:11 -04:00
parent 64b582f9fc
commit 6918e29174
7 changed files with 30 additions and 21 deletions

View File

@ -10562,23 +10562,24 @@ RVL_SDK/gx/GXTransform.c:
RVL_SDK/gx/GXPerf.c:
.text start:0x804C0AD4 end:0x804C13B4
.data start:0x805FE540 end:0x805FE6F8
.data start:0x805FE540 end:0x805FE630
RVL_SDK/dvd/dvdfs.c:
.text start:0x804C13B4 end:0x804C2128
.data start:0x805FE6F8 end:0x805FE818
.data start:0x805FE630 end:0x805FE7D0
.sdata start:0x806B2B60 end:0x806B2B70
.sbss start:0x806B78D0 end:0x806B7900
RVL_SDK/dvd/dvd.c:
.text start:0x804C2128 end:0x804C6E38
.data start:0x805FE818 end:0x805FEB78
.bss start:0x80667180 end:0x8066BE60
.data start:0x805FE7D0 end:0x805FEB78
.bss start:0x80667180 end:0x8066BE30
.sdata start:0x806B2B70 end:0x806B2B90
.sbss start:0x806B7900 end:0x806B7998
RVL_SDK/dvd/dvdqueue.c:
.text start:0x804C6E38 end:0x804C7090
.bss start:0x8066BE30 end:0x8066BE60
RVL_SDK/dvd/dvderror.c:
.text start:0x804C7090 end:0x804C7994

View File

@ -2401,11 +2401,11 @@ config.libs = [
SDKLib(
"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/dvdqueue.c"),
Object(Matching, "RVL_SDK/dvd/dvdqueue.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/dvdDeviceError.c"),
Object(NonMatching, "RVL_SDK/dvd/dvd_broadway.c")

View File

@ -26,15 +26,15 @@ void GDWrite_f32(f32);
void GDOverflowed(void);
static inline void GDOverflowCheck(u32 size) {
static void GDOverflowCheck(u32 size) {
if (__GDCurrentDL->ptr + size > __GDCurrentDL->top) {
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(y);
GDWrite_f32(z);
@ -46,4 +46,4 @@ void GDColor4u8(u8, u8, u8, u8);
}
#endif
#endif // GDBASE_H
#endif // GDBASE_H

View File

@ -22,7 +22,7 @@ void GXSetTexCoordGen2(GXTexCoordID, GXTexGenType, GXTexGenSrc, u32, GXBool, u32
void GXSetNumTexGens(u8);
static inline void GXEnd(void) {
static void GXEnd(void) {
}
@ -39,4 +39,4 @@ void __GXSetViewport(void);
}
#endif
#endif // GXGEOMETRY_H
#endif // GXGEOMETRY_H

View File

@ -7,7 +7,11 @@ extern "C" {
#include <revolution/base/PPCWGPipe.h>
#ifdef __MWERKS__
extern volatile PPCWGPipe gxfifo : 0xCC008000;
#else
extern volatile PPCWGPipe gxfifo;
#endif
extern volatile void *__piReg;
extern volatile void *__cpReg;
extern volatile void *__peReg;
@ -101,8 +105,9 @@ extern volatile void *__memReg;
GX_WRITE_U32((reg));\
}
#ifdef __MWERKS__
#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; \
ctrH0 = GX_##unit##_REG_READ_U16(regAddrH); \
@ -114,6 +119,9 @@ extern volatile void *__memReg;
} while ( ctrH0 != ctrH1 ); \
return ((ctrH0 << 16) | ctrL); \
}
#else
#define GX_DEFINE_GX_READ_COUNTER(unit)
#endif
GX_DEFINE_GX_READ_COUNTER(CP)
GX_DEFINE_GX_READ_COUNTER(PE)
@ -141,4 +149,4 @@ GX_DEFINE_GX_READ_COUNTER(MEM)
}
#endif
#endif // GXREGS_H
#endif // GXREGS_H

View File

@ -17,14 +17,14 @@ volatile PPCWGPipe GXWGFifo;
#define __GXCDEFX(func,n,t) __GXCDEF##n(func,t,t)
#define __GXCDEF1(func,ts,td) \
static inline void func(const ts x) \
static void func(const ts x) \
{ \
GXWGFifo.td = (td) x; \
return; \
}
#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) y; \
@ -32,7 +32,7 @@ volatile PPCWGPipe GXWGFifo;
}
#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) y; \
@ -58,4 +58,4 @@ __GXCDEFX(GXTexCoord1x8, 1, u8)
}
#endif
#endif // GXVERT_H
#endif // GXVERT_H

View File

@ -251,7 +251,7 @@ static BOOL DVDConvertEntrynumToPath(s32 entrynum, char* path, u32 maxlen) {
return TRUE;
}
BOOL DVDGetCurrentDir(char* path, u32 maxlen) {
static BOOL DVDGetCurrentDir(char* path, u32 maxlen) {
return DVDConvertEntrynumToPath((s32)currentDirectory, path, maxlen);
}
@ -370,4 +370,4 @@ BOOL DVDReadDir(DVDDir* dir, DVDDirEntry* dirent) {
BOOL DVDCloseDir(DVDDir* dir) {
return TRUE;
}
}