Now About Social Code
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLucas Fryzek <lucas.fryzek@fryzekconcepts.com>2024-08-08 08:37:39 +0100
committerLucas Fryzek <lucas.fryzek@fryzekconcepts.com>2024-08-08 09:28:10 +0100
commit6f3ffefef60bae19408a01fbf8182afe137b4921 (patch)
tree7cc0144eb987e866c3f8b8b9f62d4d0b0109fc93 /src
parentcf215cd04dd11357a1e1c70157a394eecf10c3da (diff)
drv: Document PixelShader address encoding in PDS
Diffstat (limited to 'src')
-rw-r--r--src/drv.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/drv.c b/src/drv.c
index e3252af..8a446ee 100644
--- a/src/drv.c
+++ b/src/drv.c
@@ -474,6 +474,15 @@ static void register_hw_render_ctx(struct driver_state *state) {
void patch_memory(struct driver_state *state) {
/* Patch PDS Pixel Code Data 0 buffer */
+ /* I think Pixel Shader address is encoded like so
+ * ((num & 0xf0) << 4) |
+ * ((num & 0xf00) << 4) |
+ * ((num & 0x7000) << 4) |
+ * ((num & 0x78000) >> 11) |
+ * ((num & 0x80000) >> 19)
+ * This was determined by experimentation to see where each bit ends up
+ * in the PDS buffer after modifying the address returned by the driver
+ */
//pds_pcd[0] = ;
uint32_t modified_pds_addr =