From c70d44e9bd490984d504470fe56635c14fec8e6e Mon Sep 17 00:00:00 2001 From: kipcode66 Date: Mon, 26 Jan 2026 23:07:55 -0500 Subject: [PATCH] Adding gx stubs --- src/dusk/stubs.c | 105 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) diff --git a/src/dusk/stubs.c b/src/dusk/stubs.c index 4dac8685b4..9d91748813 100644 --- a/src/dusk/stubs.c +++ b/src/dusk/stubs.c @@ -11,6 +11,15 @@ #include #include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -758,3 +767,99 @@ void GDSetArrayRaw(GXAttr attr, u32 base_ptr_raw, u8 stride) { void GDSetVtxDescv(const GXVtxDescList* attrPtr) { puts("GDSetVtxDescv is a stub"); } + +void GXAbortFrame(void) { + puts("GXAbortFrame is a stub"); +} + +void GXEnableTexOffsets(GXTexCoordID coord, GXBool line_enable, GXBool point_enable) { + puts("GXEnableTexOffsets is a stub"); +} + +OSThread* GXGetCurrentGXThread(void) { + puts("GXGetCurrentGXThread is a stub"); + return NULL; +} + +void* GXGetFifoBase(const GXFifoObj* fifo) { + puts("GXGetFifoBase is a stub"); + return NULL; +} + +u32 GXGetFifoSize(const GXFifoObj* fifo) { + puts("GXGetFifoSize is a stub"); + return 0; +} + +u16 GXGetNumXfbLines(u16 efbHeight, f32 yScale) { + puts("GXGetNumXfbLines is a stub"); + return 0; +} + +void GXGetScissor(u32* left, u32* top, u32* wd, u32* ht) { + puts("GXGetScissor is a stub"); +} + +u32 GXGetTexObjTlut(const GXTexObj* tex_obj) { + puts("GXGetTexObjTlut is a stub"); + return 0; +} + +f32 GXGetYScaleFactor(u16 efbHeight, u16 xfbHeight) { + puts("GXGetYScaleFactor is a stub"); + return 0.f; +} + +void GXInitTexCacheRegion(GXTexRegion* region, GXBool is_32b_mipmap, u32 tmem_even, GXTexCacheSize size_even, + u32 tmem_odd, GXTexCacheSize size_odd) { + puts("GXInitTexCacheRegion is a stub"); +} + +GXRenderModeObj GXNtsc480Int = { + 0, 640, 480, 480, 40, 0, 640, 480, 1, 0, 0, { 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6 }, { 0, 0, 21, 22, 21, 0, 0 } +}; + +void GXPeekZ(u16 x, u16 y, u32* z) { + puts("GXPeekZ is a stub"); +} + +void GXReadXfRasMetric(u32* xf_wait_in, u32* xf_wait_out, u32* ras_busy, u32* clocks) { + puts("GXReadXfRasMetric is a stub"); +} + +void GXSetClipMode(GXClipMode mode) { + puts("GXSetClipMode is a stub"); +} + +void GXSetCoPlanar(GXBool enable) { + puts("GXSetCoPlanar is a stub"); +} + +void GXSetCopyClamp(GXFBClamp clamp) { + puts("GXSetCopyClamp is a stub"); +} + +OSThread* GXSetCurrentGXThread(void) { + puts("GXSetCurrentGXThread is a stub"); + return NULL; +} + +void GXSetFogRangeAdj(GXBool enable, u16 center, const GXFogAdjTable* table) { + puts("GXSetFogRangeAdj is a stub"); +} + +void GXSetMisc(GXMiscToken token, u32 val) { + puts("GXSetMisc is a stub"); +} + +void GXSetPointSize(u8 pointSize, GXTexOffset texOffsets) { + puts("GXSetPointSize is a stub"); +} + +void GXSetProjectionv(const f32* ptr) { + puts("GXSetProjectionv is a stub"); +} + +void GXSetVtxAttrFmtv(GXVtxFmt vtxfmt, const GXVtxAttrFmtList* list) { + puts("GXSetVtxAttrFmtv is a stub"); +}