summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTakaRikka <38417346+TakaRikka@users.noreply.github.com>2022-01-10 06:10:00 -0800
committerTakaRikka <38417346+TakaRikka@users.noreply.github.com>2022-01-10 06:10:00 -0800
commita08f84abd508ddf6cbdddcd994a300a16be0e46f (patch)
tree12d8f1fa732b7c7910088442ff91e3250faaaa52 /include
parent32fc4e2944b053485b03845d387bd28ffe267cbb (diff)
JUTGraphFifo
Diffstat (limited to 'include')
-rw-r--r--include/JSystem/JUtility/JUTGraphFifo.h29
-rw-r--r--include/dolphin/gx/GX.h3
2 files changed, 32 insertions, 0 deletions
diff --git a/include/JSystem/JUtility/JUTGraphFifo.h b/include/JSystem/JUtility/JUTGraphFifo.h
index 393b232adb..8dae2c7b90 100644
--- a/include/JSystem/JUtility/JUTGraphFifo.h
+++ b/include/JSystem/JUtility/JUTGraphFifo.h
@@ -1,6 +1,35 @@
#ifndef JUTGRAPHFIFO_H
#define JUTGRAPHFIFO_H
+#include "dolphin/gx/GX.h"
#include "dolphin/types.h"
+class JUTGraphFifo {
+public:
+ /* 802DEB58 */ JUTGraphFifo(u32);
+
+ /* 802DEC34 */ virtual ~JUTGraphFifo();
+
+ void getGpStatus() {
+ GXGetGPStatus((GXBool*)&mGpStatus[0], (GXBool*)&mGpStatus[1], (GXBool*)&mGpStatus[2],
+ (GXBool*)&mGpStatus[3], (GXBool*)&mGpStatus[4]);
+ }
+
+ bool isGPActive() {
+ getGpStatus();
+ return mGpStatus[2] == false;
+ }
+
+ void save() { GXSaveCPUFifo(this->mFifo); }
+
+ static JUTGraphFifo* sCurrentFifo;
+ static bool mGpStatus[5];
+
+private:
+ /* 0x04 */ GXFifoObj* mFifo;
+ /* 0x08 */ void* mBase;
+ /* 0x0C */ u32 mSize;
+ /* 0x10 */ u8 field_0x10[0xC];
+};
+
#endif /* JUTGRAPHFIFO_H */
diff --git a/include/dolphin/gx/GX.h b/include/dolphin/gx/GX.h
index f1eca18856..d7aeb521c6 100644
--- a/include/dolphin/gx/GX.h
+++ b/include/dolphin/gx/GX.h
@@ -959,6 +959,9 @@ GXFifoObj* GXInit(void*, u32);
GXFifoObj* GXGetCPUFifo(void);
void GXGetGPStatus(GXBool*, GXBool*, GXBool*, GXBool*, GXBool*);
void GXReadXfRasMetric(u32*, u32*, u32*, u32*);
+void GXInitFifoBase(GXFifoObj*, void*, u32);
+void GXInitFifoPtrs(GXFifoObj*, void*, void*);
+void GXSaveCPUFifo(GXFifoObj*);
#define GFX_FIFO(T) (*(volatile T*)0xCC008000)