Now About Social Code
summaryrefslogtreecommitdiff
path: root/src/ccb.h
diff options
context:
space:
mode:
authorLucas Fryzek <lucas.fryzek@fryzekconcepts.com>2024-08-07 21:45:24 +0100
committerLucas Fryzek <lucas.fryzek@fryzekconcepts.com>2024-08-07 21:45:24 +0100
commitdb2a32154f6ae29477812692a286481e059e92cb (patch)
treed65c01592168761ca5e1b69f97d5ef294fdbf441 /src/ccb.h
parentf560eafc67f5a3824dbb42e50c8cd8ce7481963a (diff)
drv: Add ccb buffer and pds data
Data still needs to be patched at runtime to point to the correct addresses.
Diffstat (limited to 'src/ccb.h')
-rw-r--r--src/ccb.h61
1 files changed, 61 insertions, 0 deletions
diff --git a/src/ccb.h b/src/ccb.h
new file mode 100644
index 0000000..36c69f8
--- /dev/null
+++ b/src/ccb.h
@@ -0,0 +1,61 @@
+#ifndef CCB_H
+#define CCB_H
+
+#include <stdint.h>
+
+typedef struct __attribute__((__packed__)) Register {
+ unsigned int addr;
+ unsigned int val;
+} Register;
+
+//XXX: this is probably wrong
+typedef struct __attribute__((__packed__)) CCBEntry
+{
+ uint32_t length;
+ uint32_t unk0;
+ IMG_DEV_VIRTADDR pds_pixel_code_data_0; // Indirect points to 0x67 PDSPixelCodeData with 0xdcxxxx0
+ uint32_t unk2;
+ IMG_DEV_VIRTADDR pds_pixel_code_data_0_4; // Indirect points to 0x67 PDSPixelCodeData with 0xdcxxxx0 offset by 4
+ uint32_t unk4;
+ uint32_t unk5;
+ uint32_t unk6;
+ uint32_t frame_number;
+ IMG_DEV_VIRTADDR dev_addr_0;
+ uint32_t unk7;
+ uint32_t unk8;
+ uint32_t unk9;
+ uint32_t unk10;
+ uint32_t unk11;
+ uint32_t unk12;
+ uint32_t unk13;
+ IMG_DEV_VIRTADDR dev_addr_1;
+ uint32_t unk14;
+ IMG_DEV_VIRTADDR dev_addr_2;
+ IMG_DEV_VIRTADDR dev_addr_3;
+ IMG_DEV_VIRTADDR dev_addr_4;
+ IMG_DEV_VIRTADDR dev_addr_5;
+ IMG_DEV_VIRTADDR dev_addr_6;
+ uint32_t num_regs;
+ SGXMKIF_CMDTA_SHARED shared_data;
+ uint32_t unk15;
+ uint32_t unk16;
+ uint32_t unk17;
+ uint32_t unk18;
+ uint32_t unk19;
+ uint32_t unk20;
+ uint32_t vdm_command_stream;
+ uint32_t unk21;
+ IMG_DEV_VIRTADDR dev_addr_ta_0; // points to 0x95 TAData buffer, size is 0xc00 and all zeros
+ IMG_DEV_VIRTADDR dev_addr_ta_1; // points to 0x8d TAData buffer, size is 0x400 and not all zeros
+ uint32_t unk24;
+ uint32_t unk25;
+ uint32_t unk26;
+ uint32_t unk27;
+ uint32_t unk28;
+ IMG_DEV_VIRTADDR dev_addr_per3d_0; // points to 0x12 PerContext3DParameters, size is 0x3dd000 and all zeros
+ uint32_t unk30;
+ //this is probably variable length
+ Register r[1];
+} CCBEntry;
+
+#endif