aboutsummaryrefslogtreecommitdiff
path: root/examples/system/dynlink/library/dll_common.h
diff options
context:
space:
mode:
authorJohn "Lameguy" Wilbert Villamor <lameguy64@gmail.com>2021-08-31 13:23:20 +0800
committerGitHub <noreply@github.com>2021-08-31 13:23:20 +0800
commitffa679d4d24b891cb59aba10946368f2ec00c391 (patch)
tree0cf6061915ebf48acdedf6d77b0c1b76eec5b8c3 /examples/system/dynlink/library/dll_common.h
parent317dc2b91d3afcdbaddb035f38611d12af161970 (diff)
parentf2fc18f82dd7900465d6ab3ae2080726d5589d39 (diff)
downloadpsn00bsdk-ffa679d4d24b891cb59aba10946368f2ec00c391.tar.gz
Merge pull request #36 from spicyjpeg/dynlink
Dynamic linker, gp-relative addressing, ldscripts and more
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