summaryrefslogtreecommitdiff
path: root/src/g80_dma.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/g80_dma.h')
-rw-r--r--src/g80_dma.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/g80_dma.h b/src/g80_dma.h
new file mode 100644
index 0000000..52031da
--- /dev/null
+++ b/src/g80_dma.h
@@ -0,0 +1,14 @@
+#define SKIPS 8
+
+#define G80DmaNext(pNv, data) \
+ (pNv)->dmaBase[(pNv)->dmaCurrent++] = (data)
+
+#define G80DmaStart(pNv, tag, size) { \
+ if((pNv)->dmaFree <= (size)) \
+ G80DmaWait(pNv, size); \
+ G80DmaNext(pNv, ((size) << 18) | (tag)); \
+ (pNv)->dmaFree -= ((size) + 1); \
+}
+
+void G80DmaKickoff(G80Ptr pNv);
+void G80DmaWait(G80Ptr pNv, int size);