Move around some hex?
authorCafe <cafe@not.applicable>
Wed, 26 Jul 2017 00:00:00 +0000 (00:00 +0000)
committerCafe <cafe@not.applicable>
Wed, 26 Jul 2017 20:07:16 +0000 (20:07 +0000)
re.c

diff --git a/re.c b/re.c
index 89ca3a2946dd744465247b61e7b68d3efee22e46..d96903b98d004bcdde303b74fefae61c935fde5b 100644 (file)
--- a/re.c
+++ b/re.c
@@ -68,7 +68,7 @@ uint64_t make_mfbd(bool tiler)
        mfbd->heap_free_address = HEAP_FREE_ADDRESS;
        mfbd->blah = 0x1F00000000;
        mfbd->unknown3 = tiler ? 0 : 0xFFFFF8C0;
-       mfbd->unknown1 = 0x200;
+       mfbd->unknown1 = 0x1600;
 
        mfbd->block1[4] = 0x02D801C2;
        mfbd->block1[6] = 0x02D801C2;
@@ -213,7 +213,7 @@ void* vertex_tiler_helper(int fd, bool tiler)
                .nullForVertex = tiler ? (uint32_t) galloc(64) : 0,
                .null4 = 0,
                .fbd = (uint32_t) make_mfbd(true),
-               .unknown7 = tiler ? 0 : (uint32_t) galloc(64)
+               .unknown7 = tiler ? 0 : ((uint32_t) galloc(64) | 1) /* TODO */
        };
 
        struct shader_meta *shader = (struct shader_meta*) payload.shader;
@@ -239,6 +239,8 @@ void* vertex_tiler_helper(int fd, bool tiler)
                payload.unknown7 = (uint32_t) shader->shader;
        }
 
+       payload.unknown7 = tiler ? 0xDEADBA00 : 0xDEADFA00;
+
        /* TODO: Decode me! */
 
        if(tiler) {
@@ -251,19 +253,19 @@ void* vertex_tiler_helper(int fd, bool tiler)
 
        /* I have *no* idea */
 
-       if(tiler) {
-               uint32_t *p = (uint32_t*) payload.unknown4;
-               p[0] = 0x2DEA2200;
-
-               uint64_t pi[] = {
-                       0x0000000017E49000, 0x0000000017E49000, 
-                       0x0000000017E49000, 0x0000000017E49000, 
-                       0x00000000179A2200, 0x0000000017E49000, 
-                       0x0000000017E49000
-               };
+       uint32_t *p = (uint32_t*) payload.unknown4;
+       *p = 0x2DEA2200;
 
-               memcpy((void*) payload.unknown6, pi, sizeof(pi));
+       uint64_t pi[] = {
+               0x0000000017E49000, 0x0000000017E49000, 
+               0x0000000017E49000, 0x0000000017E49000, 
+               0x00000000179A2200, 0x0000000017E49000, 
+               0x0000000017E49000
+       };
+
+       memcpy((void*) payload.unknown6, pi, sizeof(pi));
 
+       if(tiler) {
                uint32_t ni[] = {
                        0xFF800000, 0xFF800000,
                        0x7F800000, 0x7F800000,