aboutsummaryrefslogtreecommitdiff
path: root/examples/system/dynlink/library/dll_common.h
diff options
context:
space:
mode:
Diffstat (limited to 'examples/system/dynlink/library/dll_common.h')
-rw-r--r--examples/system/dynlink/library/dll_common.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/examples/system/dynlink/library/dll_common.h b/examples/system/dynlink/library/dll_common.h
new file mode 100644
index 0000000..4f9314b
--- /dev/null
+++ b/examples/system/dynlink/library/dll_common.h
@@ -0,0 +1,30 @@
+/*
+ * PSn00bSDK dynamic linker example (shared header)
+ * (C) 2021 spicyjpeg - MPL licensed
+ */
+
+#ifndef __DLL_COMMON_H
+#define __DLL_COMMON_H
+
+#include <psxgpu.h>
+
+/* Common structures shared by the main executable and DLLs */
+
+#define OT_LEN 256
+#define PACKET_LEN 16384
+
+typedef struct {
+ DISPENV disp;
+ DRAWENV draw;
+ uint32_t ot[OT_LEN];
+ uint8_t p[PACKET_LEN];
+} DB;
+
+typedef struct {
+ uint16_t xres, yres;
+ DB db[2];
+ uint32_t db_active;
+ uint8_t *db_nextpri;
+} CONTEXT;
+
+#endif