From 2556284293e7564e49c70e14f01c22067f626801 Mon Sep 17 00:00:00 2001 From: Tyler Wilding Date: Wed, 30 Jun 2021 21:57:13 -0400 Subject: [PATCH] decomp: decompile `shrub-work` | `tie-work` (#657) * decomp: finish `shrub-work` * decomp: update reference tests * decomp: update `goal_src` entries * decomp: finish `tie-work` * decomp: add to `goal_src` --- decompiler/config/all-types.gc | 57 +- .../jak1_ntsc_black_label/label_types.jsonc | 27 +- .../jak1_ntsc_black_label/type_casts.jsonc | 16 +- goal_src/engine/gfx/shrub/shrub-work.gc | 790 +++++++++++++++++ goal_src/engine/gfx/shrub/shrubbery-h.gc | 140 ++-- goal_src/engine/gfx/tie/tie-h.gc | 2 +- goal_src/engine/gfx/tie/tie-work.gc | 198 +++++ .../engine/gfx/shrub/shrub-work_REF.gc | 793 ++++++++++++++++++ .../engine/gfx/shrub/shrubbery-h_REF.gc | 140 ++-- .../reference/engine/gfx/tie/tie-h_REF.gc | 4 +- .../reference/engine/gfx/tie/tie-work_REF.gc | 201 +++++ 11 files changed, 2187 insertions(+), 181 deletions(-) create mode 100644 test/decompiler/reference/engine/gfx/shrub/shrub-work_REF.gc create mode 100644 test/decompiler/reference/engine/gfx/tie/tie-work_REF.gc diff --git a/decompiler/config/all-types.gc b/decompiler/config/all-types.gc index d3ab7e2d48..16de455265 100644 --- a/decompiler/config/all-types.gc +++ b/decompiler/config/all-types.gc @@ -11551,10 +11551,10 @@ (vtx-qwc uint8 :offset 13) (col-qwc uint8 :offset 14) (stq-qwc uint8 :offset 15) - (obj uint32 :offset 16) - (vtx uint32 :offset 20) - (col uint32 :offset 24) - (stq uint32 :offset 28) + (obj uint32 :score 999 :offset 16) + (vtx uint32 :score 999 :offset 20) + (col uint32 :score 999 :offset 24) + (stq uint32 :score 999 :offset 28) ) :method-count-assert 18 :size-assert #x20 @@ -11588,16 +11588,16 @@ ) (deftype generic-shrub-fragment (drawable) - ((textures (inline-array adgif-shader) :offset 4) - (vtx-cnt uint32 :offset 8) - (cnt-qwc uint8 :offset 12) - (vtx-qwc uint8 :offset 13) - (col-qwc uint8 :offset 14) - (stq-qwc uint8 :offset 15) - (cnt uint32 :offset 16) - (vtx uint32 :offset 20) - (col uint32 :offset 24) - (stq uint32 :offset 28) + ((textures (inline-array adgif-shader) :score 999 :offset 4) + (vtx-cnt uint32 :score 999 :offset 8) + (cnt-qwc uint8 :score 999 :offset 12) + (vtx-qwc uint8 :score 999 :offset 13) + (col-qwc uint8 :score 999 :offset 14) + (stq-qwc uint8 :score 999 :offset 15) + (cnt uint32 :score 999 :offset 16) + (vtx uint32 :score 999 :offset 20) + (col uint32 :score 999 :offset 24) + (stq uint32 :score 999 :offset 28) ) :method-count-assert 18 :size-assert #x20 @@ -11652,12 +11652,12 @@ ) (deftype instance-shrub-work (structure) - ((dummy uint128 3 :offset-assert 0) - (chaina uint128 8 :offset-assert 48) - (chainb uint128 8 :offset-assert 176) + ((dummy qword 3 :inline :offset-assert 0) + (chaina qword 8 :inline :offset-assert 48) + (chainb qword 8 :inline :offset-assert 176) (colors rgba 1024 :offset-assert 304) - (matrix-tmpl uint128 20 :offset-assert 4400) - (count-tmpl uint128 20 :offset-assert 4720) + (matrix-tmpl qword 20 :inline :offset-assert 4400) + (count-tmpl qword 20 :inline :offset-assert 4720) (mscalf-tmpl dma-packet :inline :offset-assert 5040) (mscalf-ret-tmpl dma-packet :inline :offset-assert 5056) (adgif-tmpl dma-gif-packet :inline :offset-assert 5072) @@ -11926,7 +11926,7 @@ ;; - Symbols -(define-extern *instance-tie-work-copy* basic) +(define-extern *instance-tie-work-copy* instance-tie-work) ;; ---------------------- @@ -15382,11 +15382,14 @@ (define-extern init-background function) (define-extern finish-background function) +;; - Symbols + +(define-extern *instance-shrub-work* instance-shrub-work) +(define-extern *background-work* background-work) +(define-extern *instance-tie-work* instance-tie-work) + ;; - Unknowns -;;(define-extern *instance-shrub-work* object) ;; unknown type -;;(define-extern *background-work* object) ;; unknown type -;;(define-extern *instance-tie-work* object) ;; unknown type ;;(define-extern background-vu0-block object) ;; unknown type @@ -15412,7 +15415,7 @@ ;; - Functions -(define-extern upload-generic-shrub function) +(define-extern upload-generic-shrub (function dma-buffer generic-shrub-fragment int int dma-buffer)) (define-extern shrub-num-tris function) (define-extern shrub-init-frame function) (define-extern shrub-upload-model function) @@ -15424,7 +15427,7 @@ (define-extern shrub-time function) (define-extern draw-inline-array-instance-shrub function) (define-extern draw-prototype-inline-array-shrub function) -(define-extern shrub-upload-test function) +(define-extern shrub-upload-test (function generic-shrub-fragment none)) (define-extern test-func function) ;; - Unknowns @@ -15595,9 +15598,9 @@ ;; Containing DGOs - ['GAME', 'ENGINE'] ;; Version - 3 -;; - Unknowns +;; - Symbols -;;(define-extern *prototype-tie-work* object) ;; unknown type +(define-extern *prototype-tie-work* prototype-tie-work) ;; ---------------------- diff --git a/decompiler/config/jak1_ntsc_black_label/label_types.jsonc b/decompiler/config/jak1_ntsc_black_label/label_types.jsonc index ae9d56878f..20ec4ab5cf 100644 --- a/decompiler/config/jak1_ntsc_black_label/label_types.jsonc +++ b/decompiler/config/jak1_ntsc_black_label/label_types.jsonc @@ -538,11 +538,11 @@ ["L275", "uint64", true], ["L133", "_auto_", true] ], - + "vol-h": [ ["L13", "float", true] ], - + "joint": [ ["L330", "float", true], ["L329", "float", true] @@ -555,7 +555,7 @@ "navigate-h": [ ["L20", "float", true] ], - + "debug": [ ["L221", "float", true], ["L217", "float", true], @@ -586,7 +586,7 @@ "entity-table": [ ["L8", "(array entity-info)", true] ], - + "main": [ ["L230", "_lambda_", true] ], @@ -594,7 +594,7 @@ "geometry": [ ["L125", "float", true] ], - + "level": [ ["L452", "_auto_", true], ["L482", "float", true], @@ -602,24 +602,33 @@ ["L484", "uint64", true], ["L485", "uint64", true] ], - + "process-drawable": [ ["L257", "float", true], ["L262", "float", true], ["L260", "float", true], ["L259", "float", true] ], - + "logic-target": [ ["L264", "float", true], ["L253", "float", true], ["L255", "float", true] ], - + "load-boundary": [ ["L327", "(inline-array lbvtx)", true, 3] ], - + + "shrub-work": [ + ["L3", "instance-shrub-work", true] + ], + + "tie-work": [ + ["L1", "prototype-tie-work", true], + ["L2", "instance-tie-work", true] + ], + // please do not add things after this entry! git is dumb. "object-file-that-doesnt-actually-exist-and-i-just-put-this-here-to-prevent-merge-conflicts-with-this-file":[] } diff --git a/decompiler/config/jak1_ntsc_black_label/type_casts.jsonc b/decompiler/config/jak1_ntsc_black_label/type_casts.jsonc index e98a35d0a8..469ffdcf3d 100644 --- a/decompiler/config/jak1_ntsc_black_label/type_casts.jsonc +++ b/decompiler/config/jak1_ntsc_black_label/type_casts.jsonc @@ -807,6 +807,18 @@ "rider-post": [[[0, 99999], "s6", "process-drawable"]], "pusher-post": [[[0, 99999], "s6", "process-drawable"]], "process-drawable-delay-player": [[[0, 99999], "s6", "process-drawable"]], - - "init-target": [[[0, 99999], "s6", "target"]] + "init-target": [[[0, 99999], "s6", "target"]], + + "upload-generic-shrub": [ + [[3, 13], "t0", "dma-packet"], + [[15, 26], "v1", "matrix"], + [[31, 44], "t0", "vector4w-2"], + [[47, 71], "t0", "dma-packet"], + [[74, 98], "a2", "dma-packet"], + [[101, 125], "a2", "dma-packet"], + [[128, 152], "a2", "dma-packet"], + [[157, 162], "a1", "dma-packet"] + ], + + "placeholder-do-not-add-below": [] } diff --git a/goal_src/engine/gfx/shrub/shrub-work.gc b/goal_src/engine/gfx/shrub/shrub-work.gc index d184f16952..0a6b333f02 100644 --- a/goal_src/engine/gfx/shrub/shrub-work.gc +++ b/goal_src/engine/gfx/shrub/shrub-work.gc @@ -5,3 +5,793 @@ ;; name in dgo: shrub-work ;; dgos: GAME, ENGINE +;; definition for symbol *instance-shrub-work*, type instance-shrub-work +(define + *instance-shrub-work* + (new 'static 'instance-shrub-work + :matrix-tmpl + (new 'static 'inline-array qword 20 + (new 'static 'qword + :data + (new 'static 'array uint32 4 #x10000005 #x0 #x0 #x6c050143) + ) + (new 'static 'qword + :data + (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c050148) + ) + (new 'static 'qword + :data + (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c05014d) + ) + (new 'static 'qword + :data + (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c050152) + ) + (new 'static 'qword + :data + (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c050157) + ) + (new 'static 'qword + :data + (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c05015c) + ) + (new 'static 'qword + :data + (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c050161) + ) + (new 'static 'qword + :data + (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c050166) + ) + (new 'static 'qword + :data + (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c05016b) + ) + (new 'static 'qword + :data + (new 'static 'array uint32 4 #x10000005 #x0 #x0 #x6c050170) + ) + (new 'static 'qword + :data + (new 'static 'array uint32 4 #x10000005 #x0 #x0 #x6c050176) + ) + (new 'static 'qword + :data + (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c05017b) + ) + (new 'static 'qword + :data + (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c050180) + ) + (new 'static 'qword + :data + (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c050185) + ) + (new 'static 'qword + :data + (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c05018a) + ) + (new 'static 'qword + :data + (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c05018f) + ) + (new 'static 'qword + :data + (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c050194) + ) + (new 'static 'qword + :data + (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c050199) + ) + (new 'static 'qword + :data + (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c05019e) + ) + (new 'static 'qword + :data + (new 'static 'array uint32 4 #x10000005 #x0 #x0 #x6c0501a3) + ) + ) + :count-tmpl + (new 'static 'inline-array qword 20 + (new 'static 'qword + :data + (new 'static 'array uint32 4 #x20000000 #x0 #x60010175 #xa) + ) + (new 'static 'qword + :data + (new 'static 'array uint32 4 #x20000000 #x0 #x60010142 #x1) + ) + (new 'static 'qword + :data + (new 'static 'array uint32 4 #x20000000 #x0 #x60010142 #x2) + ) + (new 'static 'qword + :data + (new 'static 'array uint32 4 #x20000000 #x0 #x60010142 #x3) + ) + (new 'static 'qword + :data + (new 'static 'array uint32 4 #x20000000 #x0 #x60010142 #x4) + ) + (new 'static 'qword + :data + (new 'static 'array uint32 4 #x20000000 #x0 #x60010142 #x5) + ) + (new 'static 'qword + :data + (new 'static 'array uint32 4 #x20000000 #x0 #x60010142 #x6) + ) + (new 'static 'qword + :data + (new 'static 'array uint32 4 #x20000000 #x0 #x60010142 #x7) + ) + (new 'static 'qword + :data + (new 'static 'array uint32 4 #x20000000 #x0 #x60010142 #x8) + ) + (new 'static 'qword + :data + (new 'static 'array uint32 4 #x20000000 #x0 #x60010142 #x9) + ) + (new 'static 'qword + :data + (new 'static 'array uint32 4 #x20000000 #x0 #x60010142 #xa) + ) + (new 'static 'qword + :data + (new 'static 'array uint32 4 #x20000000 #x0 #x60010175 #x1) + ) + (new 'static 'qword + :data + (new 'static 'array uint32 4 #x20000000 #x0 #x60010175 #x2) + ) + (new 'static 'qword + :data + (new 'static 'array uint32 4 #x20000000 #x0 #x60010175 #x3) + ) + (new 'static 'qword + :data + (new 'static 'array uint32 4 #x20000000 #x0 #x60010175 #x4) + ) + (new 'static 'qword + :data + (new 'static 'array uint32 4 #x20000000 #x0 #x60010175 #x5) + ) + (new 'static 'qword + :data + (new 'static 'array uint32 4 #x20000000 #x0 #x60010175 #x6) + ) + (new 'static 'qword + :data + (new 'static 'array uint32 4 #x20000000 #x0 #x60010175 #x7) + ) + (new 'static 'qword + :data + (new 'static 'array uint32 4 #x20000000 #x0 #x60010175 #x8) + ) + (new 'static 'qword + :data + (new 'static 'array uint32 4 #x20000000 #x0 #x60010175 #x9) + ) + ) + :mscalf-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id next)) + :vif0 + (new 'static 'vif-tag :cmd (vif-cmd mscalf) :msk #x1) + ) + :mscalf-ret-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id ret)) + :vif0 + (new 'static 'vif-tag :cmd (vif-cmd mscalf) :msk #x1) + ) + :adgif-tmpl + (new 'static 'dma-gif-packet + :dma-vif + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id next)) + :vif1 + (new 'static 'vif-tag :imm #x6 :cmd (vif-cmd direct) :msk #x1) + ) + :gif + (new 'static 'array uint64 2 #x1000000000008005 #xe) + ) + :billboard-tmpl + (new 'static 'dma-gif-packet + :dma-vif + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :qwc #xd :id (dma-tag-id next)) + :vif1 + (new 'static 'vif-tag :imm #xd :cmd (vif-cmd direct) :msk #x1) + ) + :gif + (new 'static 'array uint64 2 #x303e400000008004 #x412) + ) + :shrub-near-packets + (new 'static 'inline-array shrub-near-packet 6 + (new 'static 'shrub-near-packet + :matrix-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt)) + :vif0 + (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) + :vif1 + (new 'static 'vif-tag :imm #x345 :num #x6 :cmd (vif-cmd unpack-v4-32)) + ) + :header-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 + (new 'static 'vif-tag :imm #x34c :cmd (vif-cmd unpack-v4-32)) + ) + :stq-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif0 + (new 'static 'vif-tag :imm #x103 :cmd (vif-cmd stcycl)) + :vif1 + (new 'static 'vif-tag :imm #x9 :cmd (vif-cmd unpack-v2-16)) + ) + :color-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 + (new 'static 'vif-tag :imm #x400a :cmd (vif-cmd unpack-v3-8)) + ) + :vertex-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 + (new 'static 'vif-tag :imm #xb :cmd (vif-cmd unpack-v3-16)) + ) + :mscal-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id next)) + :vif0 + (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) + :vif1 + (new 'static 'vif-tag :imm #xa :cmd (vif-cmd mscal) :msk #x1) + ) + :init-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :qwc #x2 :id (dma-tag-id next)) + :vif0 + (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) + :vif1 + (new 'static 'vif-tag :imm #x38a :num #x1 :cmd (vif-cmd unpack-v4-32)) + ) + :init-data + (new 'static 'array uint32 8 #x0 #x0 #x345 #x117 #x0 #x0 #x0 #x1500000c) + ) + (new 'static 'shrub-near-packet + :matrix-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt)) + :vif0 + (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) + :vif1 + (new 'static 'vif-tag :imm #x363 :num #x6 :cmd (vif-cmd unpack-v4-32)) + ) + :header-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 + (new 'static 'vif-tag :imm #x36a :cmd (vif-cmd unpack-v4-32)) + ) + :stq-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif0 + (new 'static 'vif-tag :imm #x103 :cmd (vif-cmd stcycl)) + :vif1 + (new 'static 'vif-tag :imm #x120 :cmd (vif-cmd unpack-v2-16)) + ) + :color-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 + (new 'static 'vif-tag :imm #x4121 :cmd (vif-cmd unpack-v3-8)) + ) + :vertex-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 + (new 'static 'vif-tag :imm #x122 :cmd (vif-cmd unpack-v3-16)) + ) + :mscal-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id next)) + :vif0 + (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) + :vif1 + (new 'static 'vif-tag :imm #xa :cmd (vif-cmd mscal) :msk #x1) + ) + :init-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :qwc #x2 :id (dma-tag-id next)) + :vif0 + (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) + :vif1 + (new 'static 'vif-tag :imm #x38a :num #x1 :cmd (vif-cmd unpack-v4-32)) + ) + :init-data + (new 'static 'array uint32 8 #x0 #x0 #x363 #x22e #x0 #x0 #x0 #x1500000c) + ) + (new 'static 'shrub-near-packet + :matrix-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt)) + :vif0 + (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) + :vif1 + (new 'static 'vif-tag :imm #x345 :num #x6 :cmd (vif-cmd unpack-v4-32)) + ) + :header-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 + (new 'static 'vif-tag :imm #x34c :cmd (vif-cmd unpack-v4-32)) + ) + :stq-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif0 + (new 'static 'vif-tag :imm #x103 :cmd (vif-cmd stcycl)) + :vif1 + (new 'static 'vif-tag :imm #x237 :cmd (vif-cmd unpack-v2-16)) + ) + :color-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 + (new 'static 'vif-tag :imm #x4238 :cmd (vif-cmd unpack-v3-8)) + ) + :vertex-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 + (new 'static 'vif-tag :imm #x239 :cmd (vif-cmd unpack-v3-16)) + ) + :mscal-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id next)) + :vif0 + (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) + :vif1 + (new 'static 'vif-tag :imm #xa :cmd (vif-cmd mscal) :msk #x1) + ) + :init-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :qwc #x2 :id (dma-tag-id next)) + :vif0 + (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) + :vif1 + (new 'static 'vif-tag :imm #x38a :num #x1 :cmd (vif-cmd unpack-v4-32)) + ) + :init-data + (new 'static 'array uint32 8 #x0 #x0 #x345 #x0 #x0 #x0 #x0 #x1500000c) + ) + (new 'static 'shrub-near-packet + :matrix-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt)) + :vif0 + (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) + :vif1 + (new 'static 'vif-tag :imm #x363 :num #x6 :cmd (vif-cmd unpack-v4-32)) + ) + :header-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 + (new 'static 'vif-tag :imm #x36a :cmd (vif-cmd unpack-v4-32)) + ) + :stq-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif0 + (new 'static 'vif-tag :imm #x103 :cmd (vif-cmd stcycl)) + :vif1 + (new 'static 'vif-tag :imm #x9 :cmd (vif-cmd unpack-v2-16)) + ) + :color-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 + (new 'static 'vif-tag :imm #x400a :cmd (vif-cmd unpack-v3-8)) + ) + :vertex-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 + (new 'static 'vif-tag :imm #xb :cmd (vif-cmd unpack-v3-16)) + ) + :mscal-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id next)) + :vif0 + (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) + :vif1 + (new 'static 'vif-tag :imm #xa :cmd (vif-cmd mscal) :msk #x1) + ) + :init-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :qwc #x2 :id (dma-tag-id next)) + :vif0 + (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) + :vif1 + (new 'static 'vif-tag :imm #x38a :num #x1 :cmd (vif-cmd unpack-v4-32)) + ) + :init-data + (new 'static 'array uint32 8 #x0 #x0 #x363 #x117 #x0 #x0 #x0 #x1500000c) + ) + (new 'static 'shrub-near-packet + :matrix-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt)) + :vif0 + (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) + :vif1 + (new 'static 'vif-tag :imm #x345 :num #x6 :cmd (vif-cmd unpack-v4-32)) + ) + :header-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 + (new 'static 'vif-tag :imm #x34c :cmd (vif-cmd unpack-v4-32)) + ) + :stq-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif0 + (new 'static 'vif-tag :imm #x103 :cmd (vif-cmd stcycl)) + :vif1 + (new 'static 'vif-tag :imm #x120 :cmd (vif-cmd unpack-v2-16)) + ) + :color-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 + (new 'static 'vif-tag :imm #x4121 :cmd (vif-cmd unpack-v3-8)) + ) + :vertex-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 + (new 'static 'vif-tag :imm #x122 :cmd (vif-cmd unpack-v3-16)) + ) + :mscal-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id next)) + :vif0 + (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) + :vif1 + (new 'static 'vif-tag :imm #xa :cmd (vif-cmd mscal) :msk #x1) + ) + :init-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :qwc #x2 :id (dma-tag-id next)) + :vif0 + (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) + :vif1 + (new 'static 'vif-tag :imm #x38a :num #x1 :cmd (vif-cmd unpack-v4-32)) + ) + :init-data + (new 'static 'array uint32 8 #x0 #x0 #x345 #x22e #x0 #x0 #x0 #x1500000c) + ) + (new 'static 'shrub-near-packet + :matrix-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt)) + :vif0 + (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) + :vif1 + (new 'static 'vif-tag :imm #x363 :num #x6 :cmd (vif-cmd unpack-v4-32)) + ) + :header-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 + (new 'static 'vif-tag :imm #x36a :cmd (vif-cmd unpack-v4-32)) + ) + :stq-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif0 + (new 'static 'vif-tag :imm #x103 :cmd (vif-cmd stcycl)) + :vif1 + (new 'static 'vif-tag :imm #x237 :cmd (vif-cmd unpack-v2-16)) + ) + :color-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 + (new 'static 'vif-tag :imm #x4238 :cmd (vif-cmd unpack-v3-8)) + ) + :vertex-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 + (new 'static 'vif-tag :imm #x239 :cmd (vif-cmd unpack-v3-16)) + ) + :mscal-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id next)) + :vif0 + (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) + :vif1 + (new 'static 'vif-tag :imm #xa :cmd (vif-cmd mscal) :msk #x1) + ) + :init-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :qwc #x2 :id (dma-tag-id next)) + :vif0 + (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) + :vif1 + (new 'static 'vif-tag :imm #x38a :num #x1 :cmd (vif-cmd unpack-v4-32)) + ) + :init-data + (new 'static 'array uint32 8 #x0 #x0 #x363 #x0 #x0 #x0 #x0 #x1500000c) + ) + ) + :dma-ref + (new 'static 'dma-packet :dma (new 'static 'dma-tag :id (dma-tag-id ref))) + :dma-end + (new 'static 'dma-packet :dma (new 'static 'dma-tag :id (dma-tag-id end))) + :wind-const + (new 'static 'vector :x 0.5 :y 100.0 :z 0.0166 :w -1.0) + :constants (new 'static 'vector :x 128.0 :y 1.0) + :color-constant + (new 'static 'vector4w + :data + (new 'static 'array int32 4 #x47000000 #x47000000 #x47000000 0) + ) + :start-bank + (new 'static 'array uint8 20 + #x0 + #x1 + #x1 + #x1 + #x1 + #x1 + #x1 + #x1 + #x1 + #x1 + #x1 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + ) + ) + ) + +;; failed to figure out what this is: +(set! (-> *instance-shrub-work* mscalf-tmpl vif0 imm) 103) + +;; failed to figure out what this is: +(set! (-> *instance-shrub-work* mscalf-ret-tmpl vif0 imm) 103) + +;; definition for function upload-generic-shrub +;; Used lq/sq +(defun + upload-generic-shrub + ((arg0 dma-buffer) (arg1 generic-shrub-fragment) (arg2 int) (arg3 int)) + (let* ((v1-0 arg0) + (t0-0 (the-as object (-> v1-0 base))) + ) + (set! + (-> (the-as dma-packet t0-0) dma) + (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt)) + ) + (set! + (-> (the-as dma-packet t0-0) vif0) + (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) + ) + (set! + (-> (the-as dma-packet t0-0) vif1) + (new 'static 'vif-tag + :num #x6 + :cmd (vif-cmd unpack-v4-32) + :imm (shr (shl arg2 54) 54) + ) + ) + (set! (-> v1-0 base) (&+ (the-as pointer t0-0) 16)) + ) + (let* ((v1-1 (the-as matrix (-> arg0 base))) + (t3-0 (-> *math-camera* camera-temp)) + (t0-3 (-> t3-0 vector 0 quad)) + (t1-4 (-> t3-0 vector 1 quad)) + (t2-4 (-> t3-0 vector 2 quad)) + (t3-1 (-> t3-0 vector 3 quad)) + ) + (set! (-> v1-1 vector 0 quad) t0-3) + (set! (-> v1-1 vector 1 quad) t1-4) + (set! (-> v1-1 vector 2 quad) t2-4) + (set! (-> v1-1 vector 3 quad) t3-1) + ) + (set! (-> arg0 base) (&+ (-> arg0 base) 64)) + (let* ((v1-4 arg0) + (t0-4 (the-as object (-> v1-4 base))) + ) + (set! (-> (the-as vector4w-2 t0-4) vector 0 x) #x3f800000) + (set! (-> (the-as vector4w-2 t0-4) vector 0 y) #x3f800000) + (set! (-> (the-as vector4w-2 t0-4) vector 0 z) #x3f800000) + (set! (-> (the-as vector4w-2 t0-4) vector 0 w) 128) + (set! + (-> (the-as vector4w-2 t0-4) vector 1 x) + (the-as int (-> arg1 vtx-cnt)) + ) + (set! (-> (the-as vector4w-2 t0-4) vector 1 y) 0) + (set! (-> (the-as vector4w-2 t0-4) vector 1 z) 0) + (set! (-> (the-as vector4w-2 t0-4) vector 1 w) 0) + (set! (-> v1-4 base) (&+ (the-as pointer t0-4) 32)) + ) + (let* ((v1-5 arg0) + (t0-6 (the-as object (-> v1-5 base))) + ) + (set! + (-> (the-as dma-packet t0-6) dma) + (new 'static 'dma-tag + :id (dma-tag-id ref) + :addr (-> arg1 cnt) + :qwc (-> arg1 cnt-qwc) + ) + ) + (set! (-> (the-as dma-packet t0-6) vif0) (new 'static 'vif-tag)) + (set! + (-> (the-as dma-packet t0-6) vif1) + (new 'static 'vif-tag + :cmd (vif-cmd unpack-v4-32) + :imm (shr (shl (+ arg2 6) 54) 54) + :num (-> arg1 cnt-qwc) + ) + ) + (set! (-> v1-5 base) (&+ (the-as pointer t0-6) 16)) + ) + (let* ((v1-6 arg0) + (a2-8 (the-as object (-> v1-6 base))) + ) + (set! + (-> (the-as dma-packet a2-8) dma) + (new 'static 'dma-tag + :id (dma-tag-id ref) + :addr (-> arg1 stq) + :qwc (-> arg1 stq-qwc) + ) + ) + (set! + (-> (the-as dma-packet a2-8) vif0) + (new 'static 'vif-tag :imm #x103 :cmd (vif-cmd stcycl)) + ) + (set! + (-> (the-as dma-packet a2-8) vif1) + (new 'static 'vif-tag + :cmd (vif-cmd unpack-v2-16) + :imm (shr (shl arg3 54) 54) + :num (-> arg1 vtx-cnt) + ) + ) + (set! (-> v1-6 base) (&+ (the-as pointer a2-8) 16)) + ) + (let* ((v1-7 arg0) + (a2-10 (the-as object (-> v1-7 base))) + ) + (set! + (-> (the-as dma-packet a2-10) dma) + (new 'static 'dma-tag + :id (dma-tag-id ref) + :addr (-> arg1 col) + :qwc (-> arg1 col-qwc) + ) + ) + (set! (-> (the-as dma-packet a2-10) vif0) (new 'static 'vif-tag)) + (set! + (-> (the-as dma-packet a2-10) vif1) + (new 'static 'vif-tag + :cmd (vif-cmd unpack-v3-8) + :imm (shr (shl (+ arg3 1) 54) 54) + :num (-> arg1 vtx-cnt) + ) + ) + (set! (-> v1-7 base) (&+ (the-as pointer a2-10) 16)) + ) + (let* ((v1-8 arg0) + (a2-12 (the-as object (-> v1-8 base))) + ) + (set! + (-> (the-as dma-packet a2-12) dma) + (new 'static 'dma-tag + :id (dma-tag-id ref) + :addr (-> arg1 vtx) + :qwc (-> arg1 vtx-qwc) + ) + ) + (set! (-> (the-as dma-packet a2-12) vif0) (new 'static 'vif-tag)) + (set! + (-> (the-as dma-packet a2-12) vif1) + (new 'static 'vif-tag + :cmd (vif-cmd unpack-v3-16) + :imm (shr (shl (+ arg3 2) 54) 54) + :num (-> arg1 vtx-cnt) + ) + ) + (set! (-> v1-8 base) (&+ (the-as pointer a2-12) 16)) + ) + (let* ((v1-9 arg0) + (a1-7 (the-as object (-> v1-9 base))) + ) + (set! + (-> (the-as dma-packet a1-7) dma) + (new 'static 'dma-tag :id (dma-tag-id cnt)) + ) + (set! + (-> (the-as dma-packet a1-7) vif0) + (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) + ) + (set! + (-> (the-as dma-packet a1-7) vif1) + (new 'static 'vif-tag :imm #xa :cmd (vif-cmd mscal) :msk #x1) + ) + (set! (-> v1-9 base) (&+ (the-as pointer a1-7) 16)) + ) + arg0 + ) + + + + diff --git a/goal_src/engine/gfx/shrub/shrubbery-h.gc b/goal_src/engine/gfx/shrub/shrubbery-h.gc index 62e711c8b3..4bb97ff205 100644 --- a/goal_src/engine/gfx/shrub/shrubbery-h.gc +++ b/goal_src/engine/gfx/shrub/shrubbery-h.gc @@ -33,16 +33,16 @@ ) (deftype shrubbery (drawable) - ((textures (inline-array adgif-shader) :offset 4) - (header qword :offset 8) - (obj-qwc uint8 :offset 12) - (vtx-qwc uint8 :offset 13) - (col-qwc uint8 :offset 14) - (stq-qwc uint8 :offset 15) - (obj uint32 :offset 16) - (vtx uint32 :offset 20) - (col uint32 :offset 24) - (stq uint32 :offset 28) + ((textures (inline-array adgif-shader) :offset 4) + (header qword :offset 8) + (obj-qwc uint8 :offset 12) + (vtx-qwc uint8 :offset 13) + (col-qwc uint8 :offset 14) + (stq-qwc uint8 :offset 15) + (obj uint32 :offset 16) + (vtx uint32 :offset 20) + (col uint32 :offset 24) + (stq uint32 :offset 28) ) :method-count-assert 18 :size-assert #x20 @@ -192,66 +192,66 @@ ) (deftype instance-shrub-work (structure) - ((dummy uint128 3 :offset-assert 0) - (chaina uint128 8 :offset-assert 48) - (chainb uint128 8 :offset-assert 176) - (colors rgba 1024 :offset-assert 304) - (matrix-tmpl uint128 20 :offset-assert 4400) - (count-tmpl uint128 20 :offset-assert 4720) - (mscalf-tmpl dma-packet :inline :offset-assert 5040) - (mscalf-ret-tmpl dma-packet :inline :offset-assert 5056) - (adgif-tmpl dma-gif-packet :inline :offset-assert 5072) - (billboard-tmpl dma-gif-packet :inline :offset-assert 5104) - (billboard-const vector :inline :offset-assert 5136) - (shrub-near-packets shrub-near-packet 6 :inline :offset-assert 5152) - (dma-ref dma-packet :inline :offset-assert 6016) - (dma-end dma-packet :inline :offset-assert 6032) - (wind-const vector :inline :offset-assert 6048) - (constants vector :inline :offset-assert 6064) - (color-constant vector4w :inline :offset-assert 6080) - (hmge-d vector :inline :offset-assert 6096) - (hvdf-offset vector :inline :offset-assert 6112) - (wind-force vector :inline :offset-assert 6128) - (color vector :inline :offset-assert 6144) - (bb-color vector :inline :offset-assert 6160) - (min-dist vector :inline :offset-assert 6176) - (temp-vec vector :inline :offset-assert 6192) - (guard-plane plane 4 :inline :offset-assert 6208) - (plane plane 4 :inline :offset-assert 6272) - (last uint32 4 :offset-assert 6336) - (next uint32 4 :offset-assert 6352) - (count uint16 4 :offset-assert 6368) - (mod-count uint16 4 :offset-assert 6376) - (wind-vectors uint32 :offset-assert 6384) - (instance-ptr uint32 :offset-assert 6388) - (chain-ptr uint32 :offset-assert 6392) - (chain-ptr-next uint32 :offset-assert 6396) - (stack-ptr uint32 :offset-assert 6400) - (bucket-ptr uint32 :offset-assert 6404) - (src-ptr uint32 :offset-assert 6408) - (to-spr uint32 :offset-assert 6412) - (from-spr uint32 :offset-assert 6416) - (shrub-count uint32 :offset-assert 6420) - (node uint32 6 :offset 6428) - (length uint32 6 :offset-assert 6452) - (prototypes uint32 :offset-assert 6476) - (start-bank uint8 20 :offset 6484) - (buffer-index uint32 :offset-assert 6504) - (current-spr uint32 :offset-assert 6508) - (current-mem uint32 :offset-assert 6512) - (current-shrub-near-packet uint32 :offset-assert 6516) - (dma-buffer basic :offset 6524) - (near-last uint32 :offset-assert 6528) - (near-next uint32 :offset-assert 6532) - (near-count uint32 :offset-assert 6536) - (last-shrubs uint32 :offset-assert 6540) - (chains uint32 :offset-assert 6544) - (flags uint32 :offset-assert 6548) - (paused basic :offset-assert 6552) - (node-count uint32 :offset-assert 6556) - (inst-count uint32 :offset-assert 6560) - (wait-from-spr uint32 :offset-assert 6564) - (wait-to-spr uint32 :offset-assert 6568) + ((dummy qword 3 :inline :offset-assert 0) + (chaina qword 8 :inline :offset-assert 48) + (chainb qword 8 :inline :offset-assert 176) + (colors rgba 1024 :offset-assert 304) + (matrix-tmpl qword 20 :inline :offset-assert 4400) + (count-tmpl qword 20 :inline :offset-assert 4720) + (mscalf-tmpl dma-packet :inline :offset-assert 5040) + (mscalf-ret-tmpl dma-packet :inline :offset-assert 5056) + (adgif-tmpl dma-gif-packet :inline :offset-assert 5072) + (billboard-tmpl dma-gif-packet :inline :offset-assert 5104) + (billboard-const vector :inline :offset-assert 5136) + (shrub-near-packets shrub-near-packet 6 :inline :offset-assert 5152) + (dma-ref dma-packet :inline :offset-assert 6016) + (dma-end dma-packet :inline :offset-assert 6032) + (wind-const vector :inline :offset-assert 6048) + (constants vector :inline :offset-assert 6064) + (color-constant vector4w :inline :offset-assert 6080) + (hmge-d vector :inline :offset-assert 6096) + (hvdf-offset vector :inline :offset-assert 6112) + (wind-force vector :inline :offset-assert 6128) + (color vector :inline :offset-assert 6144) + (bb-color vector :inline :offset-assert 6160) + (min-dist vector :inline :offset-assert 6176) + (temp-vec vector :inline :offset-assert 6192) + (guard-plane plane 4 :inline :offset-assert 6208) + (plane plane 4 :inline :offset-assert 6272) + (last uint32 4 :offset-assert 6336) + (next uint32 4 :offset-assert 6352) + (count uint16 4 :offset-assert 6368) + (mod-count uint16 4 :offset-assert 6376) + (wind-vectors uint32 :offset-assert 6384) + (instance-ptr uint32 :offset-assert 6388) + (chain-ptr uint32 :offset-assert 6392) + (chain-ptr-next uint32 :offset-assert 6396) + (stack-ptr uint32 :offset-assert 6400) + (bucket-ptr uint32 :offset-assert 6404) + (src-ptr uint32 :offset-assert 6408) + (to-spr uint32 :offset-assert 6412) + (from-spr uint32 :offset-assert 6416) + (shrub-count uint32 :offset-assert 6420) + (node uint32 6 :offset 6428) + (length uint32 6 :offset-assert 6452) + (prototypes uint32 :offset-assert 6476) + (start-bank uint8 20 :offset 6484) + (buffer-index uint32 :offset-assert 6504) + (current-spr uint32 :offset-assert 6508) + (current-mem uint32 :offset-assert 6512) + (current-shrub-near-packet uint32 :offset-assert 6516) + (dma-buffer basic :offset 6524) + (near-last uint32 :offset-assert 6528) + (near-next uint32 :offset-assert 6532) + (near-count uint32 :offset-assert 6536) + (last-shrubs uint32 :offset-assert 6540) + (chains uint32 :offset-assert 6544) + (flags uint32 :offset-assert 6548) + (paused basic :offset-assert 6552) + (node-count uint32 :offset-assert 6556) + (inst-count uint32 :offset-assert 6560) + (wait-from-spr uint32 :offset-assert 6564) + (wait-to-spr uint32 :offset-assert 6568) ) :method-count-assert 9 :size-assert #x19ac diff --git a/goal_src/engine/gfx/tie/tie-h.gc b/goal_src/engine/gfx/tie/tie-h.gc index 3097177464..f6bc08b7a3 100644 --- a/goal_src/engine/gfx/tie/tie-h.gc +++ b/goal_src/engine/gfx/tie/tie-h.gc @@ -177,4 +177,4 @@ ) ;; probably a more specific type. -(define *instance-tie-work-copy* (the-as basic #f)) +(define *instance-tie-work-copy* (the-as instance-tie-work #f)) diff --git a/goal_src/engine/gfx/tie/tie-work.gc b/goal_src/engine/gfx/tie/tie-work.gc index 2ea8c8fc00..e6da0f5056 100644 --- a/goal_src/engine/gfx/tie/tie-work.gc +++ b/goal_src/engine/gfx/tie/tie-work.gc @@ -5,3 +5,201 @@ ;; name in dgo: tie-work ;; dgos: GAME, ENGINE +;; definition for symbol *instance-tie-work*, type instance-tie-work +(define + *instance-tie-work* + (new 'static 'instance-tie-work + :wind-const + (new 'static 'vector :x 0.5 :y 100.0 :z 0.0166 :w -1.0) + :constant + (new 'static 'vector :x 4096.0 :y 128.0) + :far-morph (new 'static 'vector :x 1.0 :w 256.0) + :upload-color-0 + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id ref)) + :vif1 + (new 'static 'vif-tag :imm #x80c6 :num #x6 :cmd (vif-cmd unpack-v4-32)) + ) + :upload-color-1 + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif0 + (new 'static 'vif-tag :cmd (vif-cmd stmod)) + :vif1 + (new 'static 'vif-tag :imm #xc0cc :cmd (vif-cmd unpack-v4-8)) + ) + :upload-color-2 + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id next)) + :vif0 + (new 'static 'vif-tag :cmd (vif-cmd stmod)) + ) + :upload-color-ret + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id ret)) + :vif0 + (new 'static 'vif-tag :cmd (vif-cmd stmod)) + ) + :generic-color-0 + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id ref)) + :vif0 (new 'static 'vif-tag :imm #x3) + ) + :generic-color-1 + (new 'static 'dma-packet :dma (new 'static 'dma-tag :id (dma-tag-id ref))) + :generic-color-end + (new 'static 'dma-packet :dma (new 'static 'dma-tag :id (dma-tag-id end))) + :refl-fade-fac -0.000625 + :refl-fade-end 409600.0 + ) + ) + +;; failed to figure out what this is: +(set! + (-> *instance-tie-work* upload-color-2 vif1) + (new 'static 'vif-tag :cmd (vif-cmd mscal) :msk #x1) + ) + +;; failed to figure out what this is: +(set! + (-> *instance-tie-work* upload-color-ret vif1) + (new 'static 'vif-tag :cmd (vif-cmd mscal) :msk #x1) + ) + +;; definition for symbol *prototype-tie-work*, type prototype-tie-work +(define + *prototype-tie-work* + (new 'static 'prototype-tie-work + :upload-palette-0 + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id cnt)) + :vif0 + (new 'static 'vif-tag :cmd (vif-cmd flusha) :msk #x1) + ) + :upload-palette-1 + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :qwc #x20 :id (dma-tag-id cnt)) + :vif0 + (new 'static 'vif-tag :imm #x1 :cmd (vif-cmd stmod)) + :vif1 + (new 'static 'vif-tag :imm #x4346 :num #x80 :cmd (vif-cmd unpack-v4-8)) + ) + :upload-model-0 + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif0 + (new 'static 'vif-tag :cmd (vif-cmd stmod)) + :vif1 + (new 'static 'vif-tag :cmd (vif-cmd unpack-v4-32)) + ) + :upload-model-1 + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 + (new 'static 'vif-tag :imm #x4000 :cmd (vif-cmd unpack-v4-8)) + ) + :upload-model-2 + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 + (new 'static 'vif-tag :imm #x32 :cmd (vif-cmd unpack-v4-16)) + ) + :upload-model-3 + (new 'static 'dma-packet :dma (new 'static 'dma-tag :id (dma-tag-id call))) + :upload-model-near-0 + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif0 + (new 'static 'vif-tag :cmd (vif-cmd stmod)) + :vif1 + (new 'static 'vif-tag :cmd (vif-cmd unpack-v4-32)) + ) + :upload-model-near-1 + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 + (new 'static 'vif-tag :imm #x4000 :cmd (vif-cmd unpack-v4-8)) + ) + :upload-model-near-2 + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 + (new 'static 'vif-tag :imm #x1e :cmd (vif-cmd unpack-v4-8)) + ) + :upload-model-near-3 + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 + (new 'static 'vif-tag :imm #x32 :cmd (vif-cmd unpack-v4-16)) + ) + :upload-model-near-4 + (new 'static 'dma-packet :dma (new 'static 'dma-tag :id (dma-tag-id call))) + :generic-envmap-shader + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :qwc #x5 :id (dma-tag-id ref)) + :vif0 (new 'static 'vif-tag :imm #x1) + ) + :generic-palette + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :qwc #x20 :id (dma-tag-id cnt)) + :vif0 (new 'static 'vif-tag :imm #x1) + ) + :generic-model-0 + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif0 (new 'static 'vif-tag :imm #x2) + ) + :generic-model-1 + (new 'static 'dma-packet :dma (new 'static 'dma-tag :id (dma-tag-id ref))) + :generic-model-2 + (new 'static 'dma-packet :dma (new 'static 'dma-tag :id (dma-tag-id ref))) + :generic-model-next + (new 'static 'dma-packet :dma (new 'static 'dma-tag :id (dma-tag-id next))) + :clamp #x8000ff00ff00ff + ) + ) + +;; failed to figure out what this is: +(set! + (-> *prototype-tie-work* upload-model-1 vif0) + (new 'static 'vif-tag :imm #x4 :cmd (vif-cmd mscal) :msk #x1) + ) + +;; failed to figure out what this is: +(set! + (-> *prototype-tie-work* upload-model-3 vif0) + (new 'static 'vif-tag :imm #x6 :cmd (vif-cmd mscal) :msk #x1) + ) + +;; failed to figure out what this is: +(set! + (-> *prototype-tie-work* upload-model-near-1 vif0) + (new 'static 'vif-tag :imm #x4 :cmd (vif-cmd mscal) :msk #x1) + ) + +;; failed to figure out what this is: +(set! + (-> *prototype-tie-work* upload-model-near-4 vif0) + (new 'static 'vif-tag :imm #x6 :cmd (vif-cmd mscal) :msk #x1) + ) + + + + diff --git a/test/decompiler/reference/engine/gfx/shrub/shrub-work_REF.gc b/test/decompiler/reference/engine/gfx/shrub/shrub-work_REF.gc new file mode 100644 index 0000000000..18926272f7 --- /dev/null +++ b/test/decompiler/reference/engine/gfx/shrub/shrub-work_REF.gc @@ -0,0 +1,793 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *instance-shrub-work*, type instance-shrub-work +(define + *instance-shrub-work* + (new 'static 'instance-shrub-work + :matrix-tmpl + (new 'static 'inline-array qword 20 + (new 'static 'qword + :data + (new 'static 'array uint32 4 #x10000005 #x0 #x0 #x6c050143) + ) + (new 'static 'qword + :data + (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c050148) + ) + (new 'static 'qword + :data + (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c05014d) + ) + (new 'static 'qword + :data + (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c050152) + ) + (new 'static 'qword + :data + (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c050157) + ) + (new 'static 'qword + :data + (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c05015c) + ) + (new 'static 'qword + :data + (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c050161) + ) + (new 'static 'qword + :data + (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c050166) + ) + (new 'static 'qword + :data + (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c05016b) + ) + (new 'static 'qword + :data + (new 'static 'array uint32 4 #x10000005 #x0 #x0 #x6c050170) + ) + (new 'static 'qword + :data + (new 'static 'array uint32 4 #x10000005 #x0 #x0 #x6c050176) + ) + (new 'static 'qword + :data + (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c05017b) + ) + (new 'static 'qword + :data + (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c050180) + ) + (new 'static 'qword + :data + (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c050185) + ) + (new 'static 'qword + :data + (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c05018a) + ) + (new 'static 'qword + :data + (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c05018f) + ) + (new 'static 'qword + :data + (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c050194) + ) + (new 'static 'qword + :data + (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c050199) + ) + (new 'static 'qword + :data + (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c05019e) + ) + (new 'static 'qword + :data + (new 'static 'array uint32 4 #x10000005 #x0 #x0 #x6c0501a3) + ) + ) + :count-tmpl + (new 'static 'inline-array qword 20 + (new 'static 'qword + :data + (new 'static 'array uint32 4 #x20000000 #x0 #x60010175 #xa) + ) + (new 'static 'qword + :data + (new 'static 'array uint32 4 #x20000000 #x0 #x60010142 #x1) + ) + (new 'static 'qword + :data + (new 'static 'array uint32 4 #x20000000 #x0 #x60010142 #x2) + ) + (new 'static 'qword + :data + (new 'static 'array uint32 4 #x20000000 #x0 #x60010142 #x3) + ) + (new 'static 'qword + :data + (new 'static 'array uint32 4 #x20000000 #x0 #x60010142 #x4) + ) + (new 'static 'qword + :data + (new 'static 'array uint32 4 #x20000000 #x0 #x60010142 #x5) + ) + (new 'static 'qword + :data + (new 'static 'array uint32 4 #x20000000 #x0 #x60010142 #x6) + ) + (new 'static 'qword + :data + (new 'static 'array uint32 4 #x20000000 #x0 #x60010142 #x7) + ) + (new 'static 'qword + :data + (new 'static 'array uint32 4 #x20000000 #x0 #x60010142 #x8) + ) + (new 'static 'qword + :data + (new 'static 'array uint32 4 #x20000000 #x0 #x60010142 #x9) + ) + (new 'static 'qword + :data + (new 'static 'array uint32 4 #x20000000 #x0 #x60010142 #xa) + ) + (new 'static 'qword + :data + (new 'static 'array uint32 4 #x20000000 #x0 #x60010175 #x1) + ) + (new 'static 'qword + :data + (new 'static 'array uint32 4 #x20000000 #x0 #x60010175 #x2) + ) + (new 'static 'qword + :data + (new 'static 'array uint32 4 #x20000000 #x0 #x60010175 #x3) + ) + (new 'static 'qword + :data + (new 'static 'array uint32 4 #x20000000 #x0 #x60010175 #x4) + ) + (new 'static 'qword + :data + (new 'static 'array uint32 4 #x20000000 #x0 #x60010175 #x5) + ) + (new 'static 'qword + :data + (new 'static 'array uint32 4 #x20000000 #x0 #x60010175 #x6) + ) + (new 'static 'qword + :data + (new 'static 'array uint32 4 #x20000000 #x0 #x60010175 #x7) + ) + (new 'static 'qword + :data + (new 'static 'array uint32 4 #x20000000 #x0 #x60010175 #x8) + ) + (new 'static 'qword + :data + (new 'static 'array uint32 4 #x20000000 #x0 #x60010175 #x9) + ) + ) + :mscalf-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id next)) + :vif0 + (new 'static 'vif-tag :cmd (vif-cmd mscalf) :msk #x1) + ) + :mscalf-ret-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id ret)) + :vif0 + (new 'static 'vif-tag :cmd (vif-cmd mscalf) :msk #x1) + ) + :adgif-tmpl + (new 'static 'dma-gif-packet + :dma-vif + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id next)) + :vif1 + (new 'static 'vif-tag :imm #x6 :cmd (vif-cmd direct) :msk #x1) + ) + :gif + (new 'static 'array uint64 2 #x1000000000008005 #xe) + ) + :billboard-tmpl + (new 'static 'dma-gif-packet + :dma-vif + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :qwc #xd :id (dma-tag-id next)) + :vif1 + (new 'static 'vif-tag :imm #xd :cmd (vif-cmd direct) :msk #x1) + ) + :gif + (new 'static 'array uint64 2 #x303e400000008004 #x412) + ) + :shrub-near-packets + (new 'static 'inline-array shrub-near-packet 6 + (new 'static 'shrub-near-packet + :matrix-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt)) + :vif0 + (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) + :vif1 + (new 'static 'vif-tag :imm #x345 :num #x6 :cmd (vif-cmd unpack-v4-32)) + ) + :header-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 + (new 'static 'vif-tag :imm #x34c :cmd (vif-cmd unpack-v4-32)) + ) + :stq-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif0 + (new 'static 'vif-tag :imm #x103 :cmd (vif-cmd stcycl)) + :vif1 + (new 'static 'vif-tag :imm #x9 :cmd (vif-cmd unpack-v2-16)) + ) + :color-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 + (new 'static 'vif-tag :imm #x400a :cmd (vif-cmd unpack-v3-8)) + ) + :vertex-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 + (new 'static 'vif-tag :imm #xb :cmd (vif-cmd unpack-v3-16)) + ) + :mscal-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id next)) + :vif0 + (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) + :vif1 + (new 'static 'vif-tag :imm #xa :cmd (vif-cmd mscal) :msk #x1) + ) + :init-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :qwc #x2 :id (dma-tag-id next)) + :vif0 + (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) + :vif1 + (new 'static 'vif-tag :imm #x38a :num #x1 :cmd (vif-cmd unpack-v4-32)) + ) + :init-data + (new 'static 'array uint32 8 #x0 #x0 #x345 #x117 #x0 #x0 #x0 #x1500000c) + ) + (new 'static 'shrub-near-packet + :matrix-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt)) + :vif0 + (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) + :vif1 + (new 'static 'vif-tag :imm #x363 :num #x6 :cmd (vif-cmd unpack-v4-32)) + ) + :header-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 + (new 'static 'vif-tag :imm #x36a :cmd (vif-cmd unpack-v4-32)) + ) + :stq-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif0 + (new 'static 'vif-tag :imm #x103 :cmd (vif-cmd stcycl)) + :vif1 + (new 'static 'vif-tag :imm #x120 :cmd (vif-cmd unpack-v2-16)) + ) + :color-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 + (new 'static 'vif-tag :imm #x4121 :cmd (vif-cmd unpack-v3-8)) + ) + :vertex-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 + (new 'static 'vif-tag :imm #x122 :cmd (vif-cmd unpack-v3-16)) + ) + :mscal-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id next)) + :vif0 + (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) + :vif1 + (new 'static 'vif-tag :imm #xa :cmd (vif-cmd mscal) :msk #x1) + ) + :init-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :qwc #x2 :id (dma-tag-id next)) + :vif0 + (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) + :vif1 + (new 'static 'vif-tag :imm #x38a :num #x1 :cmd (vif-cmd unpack-v4-32)) + ) + :init-data + (new 'static 'array uint32 8 #x0 #x0 #x363 #x22e #x0 #x0 #x0 #x1500000c) + ) + (new 'static 'shrub-near-packet + :matrix-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt)) + :vif0 + (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) + :vif1 + (new 'static 'vif-tag :imm #x345 :num #x6 :cmd (vif-cmd unpack-v4-32)) + ) + :header-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 + (new 'static 'vif-tag :imm #x34c :cmd (vif-cmd unpack-v4-32)) + ) + :stq-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif0 + (new 'static 'vif-tag :imm #x103 :cmd (vif-cmd stcycl)) + :vif1 + (new 'static 'vif-tag :imm #x237 :cmd (vif-cmd unpack-v2-16)) + ) + :color-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 + (new 'static 'vif-tag :imm #x4238 :cmd (vif-cmd unpack-v3-8)) + ) + :vertex-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 + (new 'static 'vif-tag :imm #x239 :cmd (vif-cmd unpack-v3-16)) + ) + :mscal-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id next)) + :vif0 + (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) + :vif1 + (new 'static 'vif-tag :imm #xa :cmd (vif-cmd mscal) :msk #x1) + ) + :init-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :qwc #x2 :id (dma-tag-id next)) + :vif0 + (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) + :vif1 + (new 'static 'vif-tag :imm #x38a :num #x1 :cmd (vif-cmd unpack-v4-32)) + ) + :init-data + (new 'static 'array uint32 8 #x0 #x0 #x345 #x0 #x0 #x0 #x0 #x1500000c) + ) + (new 'static 'shrub-near-packet + :matrix-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt)) + :vif0 + (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) + :vif1 + (new 'static 'vif-tag :imm #x363 :num #x6 :cmd (vif-cmd unpack-v4-32)) + ) + :header-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 + (new 'static 'vif-tag :imm #x36a :cmd (vif-cmd unpack-v4-32)) + ) + :stq-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif0 + (new 'static 'vif-tag :imm #x103 :cmd (vif-cmd stcycl)) + :vif1 + (new 'static 'vif-tag :imm #x9 :cmd (vif-cmd unpack-v2-16)) + ) + :color-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 + (new 'static 'vif-tag :imm #x400a :cmd (vif-cmd unpack-v3-8)) + ) + :vertex-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 + (new 'static 'vif-tag :imm #xb :cmd (vif-cmd unpack-v3-16)) + ) + :mscal-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id next)) + :vif0 + (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) + :vif1 + (new 'static 'vif-tag :imm #xa :cmd (vif-cmd mscal) :msk #x1) + ) + :init-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :qwc #x2 :id (dma-tag-id next)) + :vif0 + (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) + :vif1 + (new 'static 'vif-tag :imm #x38a :num #x1 :cmd (vif-cmd unpack-v4-32)) + ) + :init-data + (new 'static 'array uint32 8 #x0 #x0 #x363 #x117 #x0 #x0 #x0 #x1500000c) + ) + (new 'static 'shrub-near-packet + :matrix-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt)) + :vif0 + (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) + :vif1 + (new 'static 'vif-tag :imm #x345 :num #x6 :cmd (vif-cmd unpack-v4-32)) + ) + :header-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 + (new 'static 'vif-tag :imm #x34c :cmd (vif-cmd unpack-v4-32)) + ) + :stq-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif0 + (new 'static 'vif-tag :imm #x103 :cmd (vif-cmd stcycl)) + :vif1 + (new 'static 'vif-tag :imm #x120 :cmd (vif-cmd unpack-v2-16)) + ) + :color-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 + (new 'static 'vif-tag :imm #x4121 :cmd (vif-cmd unpack-v3-8)) + ) + :vertex-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 + (new 'static 'vif-tag :imm #x122 :cmd (vif-cmd unpack-v3-16)) + ) + :mscal-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id next)) + :vif0 + (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) + :vif1 + (new 'static 'vif-tag :imm #xa :cmd (vif-cmd mscal) :msk #x1) + ) + :init-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :qwc #x2 :id (dma-tag-id next)) + :vif0 + (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) + :vif1 + (new 'static 'vif-tag :imm #x38a :num #x1 :cmd (vif-cmd unpack-v4-32)) + ) + :init-data + (new 'static 'array uint32 8 #x0 #x0 #x345 #x22e #x0 #x0 #x0 #x1500000c) + ) + (new 'static 'shrub-near-packet + :matrix-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt)) + :vif0 + (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) + :vif1 + (new 'static 'vif-tag :imm #x363 :num #x6 :cmd (vif-cmd unpack-v4-32)) + ) + :header-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 + (new 'static 'vif-tag :imm #x36a :cmd (vif-cmd unpack-v4-32)) + ) + :stq-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif0 + (new 'static 'vif-tag :imm #x103 :cmd (vif-cmd stcycl)) + :vif1 + (new 'static 'vif-tag :imm #x237 :cmd (vif-cmd unpack-v2-16)) + ) + :color-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 + (new 'static 'vif-tag :imm #x4238 :cmd (vif-cmd unpack-v3-8)) + ) + :vertex-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 + (new 'static 'vif-tag :imm #x239 :cmd (vif-cmd unpack-v3-16)) + ) + :mscal-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id next)) + :vif0 + (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) + :vif1 + (new 'static 'vif-tag :imm #xa :cmd (vif-cmd mscal) :msk #x1) + ) + :init-tmpl + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :qwc #x2 :id (dma-tag-id next)) + :vif0 + (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) + :vif1 + (new 'static 'vif-tag :imm #x38a :num #x1 :cmd (vif-cmd unpack-v4-32)) + ) + :init-data + (new 'static 'array uint32 8 #x0 #x0 #x363 #x0 #x0 #x0 #x0 #x1500000c) + ) + ) + :dma-ref + (new 'static 'dma-packet :dma (new 'static 'dma-tag :id (dma-tag-id ref))) + :dma-end + (new 'static 'dma-packet :dma (new 'static 'dma-tag :id (dma-tag-id end))) + :wind-const + (new 'static 'vector :x 0.5 :y 100.0 :z 0.0166 :w -1.0) + :constants (new 'static 'vector :x 128.0 :y 1.0) + :color-constant + (new 'static 'vector4w + :data + (new 'static 'array int32 4 #x47000000 #x47000000 #x47000000 0) + ) + :start-bank + (new 'static 'array uint8 20 + #x0 + #x1 + #x1 + #x1 + #x1 + #x1 + #x1 + #x1 + #x1 + #x1 + #x1 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + ) + ) + ) + +;; failed to figure out what this is: +(set! (-> *instance-shrub-work* mscalf-tmpl vif0 imm) 103) + +;; failed to figure out what this is: +(set! (-> *instance-shrub-work* mscalf-ret-tmpl vif0 imm) 103) + +;; definition for function upload-generic-shrub +;; Used lq/sq +(defun + upload-generic-shrub + ((arg0 dma-buffer) (arg1 generic-shrub-fragment) (arg2 int) (arg3 int)) + (let* ((v1-0 arg0) + (t0-0 (the-as object (-> v1-0 base))) + ) + (set! + (-> (the-as dma-packet t0-0) dma) + (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt)) + ) + (set! + (-> (the-as dma-packet t0-0) vif0) + (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) + ) + (set! + (-> (the-as dma-packet t0-0) vif1) + (new 'static 'vif-tag + :num #x6 + :cmd (vif-cmd unpack-v4-32) + :imm (shr (shl arg2 54) 54) + ) + ) + (set! (-> v1-0 base) (&+ (the-as pointer t0-0) 16)) + ) + (let* ((v1-1 (the-as matrix (-> arg0 base))) + (t3-0 (-> *math-camera* camera-temp)) + (t0-3 (-> t3-0 vector 0 quad)) + (t1-4 (-> t3-0 vector 1 quad)) + (t2-4 (-> t3-0 vector 2 quad)) + (t3-1 (-> t3-0 vector 3 quad)) + ) + (set! (-> v1-1 vector 0 quad) t0-3) + (set! (-> v1-1 vector 1 quad) t1-4) + (set! (-> v1-1 vector 2 quad) t2-4) + (set! (-> v1-1 vector 3 quad) t3-1) + ) + (set! (-> arg0 base) (&+ (-> arg0 base) 64)) + (let* ((v1-4 arg0) + (t0-4 (the-as object (-> v1-4 base))) + ) + (set! (-> (the-as vector4w-2 t0-4) vector 0 x) #x3f800000) + (set! (-> (the-as vector4w-2 t0-4) vector 0 y) #x3f800000) + (set! (-> (the-as vector4w-2 t0-4) vector 0 z) #x3f800000) + (set! (-> (the-as vector4w-2 t0-4) vector 0 w) 128) + (set! + (-> (the-as vector4w-2 t0-4) vector 1 x) + (the-as int (-> arg1 vtx-cnt)) + ) + (set! (-> (the-as vector4w-2 t0-4) vector 1 y) 0) + (set! (-> (the-as vector4w-2 t0-4) vector 1 z) 0) + (set! (-> (the-as vector4w-2 t0-4) vector 1 w) 0) + (set! (-> v1-4 base) (&+ (the-as pointer t0-4) 32)) + ) + (let* ((v1-5 arg0) + (t0-6 (the-as object (-> v1-5 base))) + ) + (set! + (-> (the-as dma-packet t0-6) dma) + (new 'static 'dma-tag + :id (dma-tag-id ref) + :addr (-> arg1 cnt) + :qwc (-> arg1 cnt-qwc) + ) + ) + (set! (-> (the-as dma-packet t0-6) vif0) (new 'static 'vif-tag)) + (set! + (-> (the-as dma-packet t0-6) vif1) + (new 'static 'vif-tag + :cmd (vif-cmd unpack-v4-32) + :imm (shr (shl (+ arg2 6) 54) 54) + :num (-> arg1 cnt-qwc) + ) + ) + (set! (-> v1-5 base) (&+ (the-as pointer t0-6) 16)) + ) + (let* ((v1-6 arg0) + (a2-8 (the-as object (-> v1-6 base))) + ) + (set! + (-> (the-as dma-packet a2-8) dma) + (new 'static 'dma-tag + :id (dma-tag-id ref) + :addr (-> arg1 stq) + :qwc (-> arg1 stq-qwc) + ) + ) + (set! + (-> (the-as dma-packet a2-8) vif0) + (new 'static 'vif-tag :imm #x103 :cmd (vif-cmd stcycl)) + ) + (set! + (-> (the-as dma-packet a2-8) vif1) + (new 'static 'vif-tag + :cmd (vif-cmd unpack-v2-16) + :imm (shr (shl arg3 54) 54) + :num (-> arg1 vtx-cnt) + ) + ) + (set! (-> v1-6 base) (&+ (the-as pointer a2-8) 16)) + ) + (let* ((v1-7 arg0) + (a2-10 (the-as object (-> v1-7 base))) + ) + (set! + (-> (the-as dma-packet a2-10) dma) + (new 'static 'dma-tag + :id (dma-tag-id ref) + :addr (-> arg1 col) + :qwc (-> arg1 col-qwc) + ) + ) + (set! (-> (the-as dma-packet a2-10) vif0) (new 'static 'vif-tag)) + (set! + (-> (the-as dma-packet a2-10) vif1) + (new 'static 'vif-tag + :cmd (vif-cmd unpack-v3-8) + :imm (shr (shl (+ arg3 1) 54) 54) + :num (-> arg1 vtx-cnt) + ) + ) + (set! (-> v1-7 base) (&+ (the-as pointer a2-10) 16)) + ) + (let* ((v1-8 arg0) + (a2-12 (the-as object (-> v1-8 base))) + ) + (set! + (-> (the-as dma-packet a2-12) dma) + (new 'static 'dma-tag + :id (dma-tag-id ref) + :addr (-> arg1 vtx) + :qwc (-> arg1 vtx-qwc) + ) + ) + (set! (-> (the-as dma-packet a2-12) vif0) (new 'static 'vif-tag)) + (set! + (-> (the-as dma-packet a2-12) vif1) + (new 'static 'vif-tag + :cmd (vif-cmd unpack-v3-16) + :imm (shr (shl (+ arg3 2) 54) 54) + :num (-> arg1 vtx-cnt) + ) + ) + (set! (-> v1-8 base) (&+ (the-as pointer a2-12) 16)) + ) + (let* ((v1-9 arg0) + (a1-7 (the-as object (-> v1-9 base))) + ) + (set! + (-> (the-as dma-packet a1-7) dma) + (new 'static 'dma-tag :id (dma-tag-id cnt)) + ) + (set! + (-> (the-as dma-packet a1-7) vif0) + (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) + ) + (set! + (-> (the-as dma-packet a1-7) vif1) + (new 'static 'vif-tag :imm #xa :cmd (vif-cmd mscal) :msk #x1) + ) + (set! (-> v1-9 base) (&+ (the-as pointer a1-7) 16)) + ) + arg0 + ) + + + + diff --git a/test/decompiler/reference/engine/gfx/shrub/shrubbery-h_REF.gc b/test/decompiler/reference/engine/gfx/shrub/shrubbery-h_REF.gc index cad57b7dfc..bef1f48a54 100644 --- a/test/decompiler/reference/engine/gfx/shrub/shrubbery-h_REF.gc +++ b/test/decompiler/reference/engine/gfx/shrub/shrubbery-h_REF.gc @@ -79,17 +79,17 @@ (defmethod inspect shrubbery ((obj shrubbery)) (format #t "[~8x] ~A~%" obj (-> obj type)) (format #t "~Tid: ~D~%" (-> obj id)) - (format #t "~Tbsphere: ~`vector`P~%" (-> obj bsphere)) + (format #t "~Tbsphere: ~`vector`P~%" (&-> obj obj)) (format #t "~Ttextures: #x~X~%" (-> obj textures)) (format #t "~Theader: #~%" (-> obj header)) (format #t "~Tobj-qwc: ~D~%" (-> obj obj-qwc)) (format #t "~Tvtx-qwc: ~D~%" (-> obj vtx-qwc)) (format #t "~Tcol-qwc: ~D~%" (-> obj col-qwc)) (format #t "~Tstq-qwc: ~D~%" (-> obj stq-qwc)) - (format #t "~Tobj: #x~X~%" (-> obj bsphere x)) - (format #t "~Tvtx: #x~X~%" (-> obj bsphere y)) - (format #t "~Tcol: #x~X~%" (-> obj bsphere z)) - (format #t "~Tstq: #x~X~%" (-> obj bsphere w)) + (format #t "~Tobj: #x~X~%" (-> obj obj)) + (format #t "~Tvtx: #x~X~%" (-> obj vtx)) + (format #t "~Tcol: #x~X~%" (-> obj col)) + (format #t "~Tstq: #x~X~%" (-> obj stq)) obj ) @@ -158,17 +158,17 @@ (defmethod inspect generic-shrub-fragment ((obj generic-shrub-fragment)) (format #t "[~8x] ~A~%" obj (-> obj type)) (format #t "~Tid: ~D~%" (-> obj id)) - (format #t "~Tbsphere: ~`vector`P~%" (-> obj bsphere)) + (format #t "~Tbsphere: ~`vector`P~%" (&-> obj cnt)) (format #t "~Ttextures: #x~X~%" (-> obj textures)) (format #t "~Tvtx-cnt: ~D~%" (-> obj vtx-cnt)) (format #t "~Tcnt-qwc: ~D~%" (-> obj cnt-qwc)) (format #t "~Tvtx-qwc: ~D~%" (-> obj vtx-qwc)) (format #t "~Tcol-qwc: ~D~%" (-> obj col-qwc)) (format #t "~Tstq-qwc: ~D~%" (-> obj stq-qwc)) - (format #t "~Tcnt: #x~X~%" (-> obj bsphere x)) - (format #t "~Tvtx: #x~X~%" (-> obj bsphere y)) - (format #t "~Tcol: #x~X~%" (-> obj bsphere z)) - (format #t "~Tstq: #x~X~%" (-> obj bsphere w)) + (format #t "~Tcnt: #x~X~%" (-> obj cnt)) + (format #t "~Tvtx: #x~X~%" (-> obj vtx)) + (format #t "~Tcol: #x~X~%" (-> obj col)) + (format #t "~Tstq: #x~X~%" (-> obj stq)) obj ) @@ -295,66 +295,66 @@ ;; definition of type instance-shrub-work (deftype instance-shrub-work (structure) - ((dummy uint128 3 :offset-assert 0) - (chaina uint128 8 :offset-assert 48) - (chainb uint128 8 :offset-assert 176) - (colors rgba 1024 :offset-assert 304) - (matrix-tmpl uint128 20 :offset-assert 4400) - (count-tmpl uint128 20 :offset-assert 4720) - (mscalf-tmpl dma-packet :inline :offset-assert 5040) - (mscalf-ret-tmpl dma-packet :inline :offset-assert 5056) - (adgif-tmpl dma-gif-packet :inline :offset-assert 5072) - (billboard-tmpl dma-gif-packet :inline :offset-assert 5104) - (billboard-const vector :inline :offset-assert 5136) - (shrub-near-packets shrub-near-packet 6 :inline :offset-assert 5152) - (dma-ref dma-packet :inline :offset-assert 6016) - (dma-end dma-packet :inline :offset-assert 6032) - (wind-const vector :inline :offset-assert 6048) - (constants vector :inline :offset-assert 6064) - (color-constant vector4w :inline :offset-assert 6080) - (hmge-d vector :inline :offset-assert 6096) - (hvdf-offset vector :inline :offset-assert 6112) - (wind-force vector :inline :offset-assert 6128) - (color vector :inline :offset-assert 6144) - (bb-color vector :inline :offset-assert 6160) - (min-dist vector :inline :offset-assert 6176) - (temp-vec vector :inline :offset-assert 6192) - (guard-plane plane 4 :inline :offset-assert 6208) - (plane plane 4 :inline :offset-assert 6272) - (last uint32 4 :offset-assert 6336) - (next uint32 4 :offset-assert 6352) - (count uint16 4 :offset-assert 6368) - (mod-count uint16 4 :offset-assert 6376) - (wind-vectors uint32 :offset-assert 6384) - (instance-ptr uint32 :offset-assert 6388) - (chain-ptr uint32 :offset-assert 6392) - (chain-ptr-next uint32 :offset-assert 6396) - (stack-ptr uint32 :offset-assert 6400) - (bucket-ptr uint32 :offset-assert 6404) - (src-ptr uint32 :offset-assert 6408) - (to-spr uint32 :offset-assert 6412) - (from-spr uint32 :offset-assert 6416) - (shrub-count uint32 :offset-assert 6420) - (node uint32 6 :offset 6428) - (length uint32 6 :offset-assert 6452) - (prototypes uint32 :offset-assert 6476) - (start-bank uint8 20 :offset 6484) - (buffer-index uint32 :offset-assert 6504) - (current-spr uint32 :offset-assert 6508) - (current-mem uint32 :offset-assert 6512) - (current-shrub-near-packet uint32 :offset-assert 6516) - (dma-buffer basic :offset 6524) - (near-last uint32 :offset-assert 6528) - (near-next uint32 :offset-assert 6532) - (near-count uint32 :offset-assert 6536) - (last-shrubs uint32 :offset-assert 6540) - (chains uint32 :offset-assert 6544) - (flags uint32 :offset-assert 6548) - (paused basic :offset-assert 6552) - (node-count uint32 :offset-assert 6556) - (inst-count uint32 :offset-assert 6560) - (wait-from-spr uint32 :offset-assert 6564) - (wait-to-spr uint32 :offset-assert 6568) + ((dummy qword 3 :inline :offset-assert 0) + (chaina qword 8 :inline :offset-assert 48) + (chainb qword 8 :inline :offset-assert 176) + (colors rgba 1024 :offset-assert 304) + (matrix-tmpl qword 20 :inline :offset-assert 4400) + (count-tmpl qword 20 :inline :offset-assert 4720) + (mscalf-tmpl dma-packet :inline :offset-assert 5040) + (mscalf-ret-tmpl dma-packet :inline :offset-assert 5056) + (adgif-tmpl dma-gif-packet :inline :offset-assert 5072) + (billboard-tmpl dma-gif-packet :inline :offset-assert 5104) + (billboard-const vector :inline :offset-assert 5136) + (shrub-near-packets shrub-near-packet 6 :inline :offset-assert 5152) + (dma-ref dma-packet :inline :offset-assert 6016) + (dma-end dma-packet :inline :offset-assert 6032) + (wind-const vector :inline :offset-assert 6048) + (constants vector :inline :offset-assert 6064) + (color-constant vector4w :inline :offset-assert 6080) + (hmge-d vector :inline :offset-assert 6096) + (hvdf-offset vector :inline :offset-assert 6112) + (wind-force vector :inline :offset-assert 6128) + (color vector :inline :offset-assert 6144) + (bb-color vector :inline :offset-assert 6160) + (min-dist vector :inline :offset-assert 6176) + (temp-vec vector :inline :offset-assert 6192) + (guard-plane plane 4 :inline :offset-assert 6208) + (plane plane 4 :inline :offset-assert 6272) + (last uint32 4 :offset-assert 6336) + (next uint32 4 :offset-assert 6352) + (count uint16 4 :offset-assert 6368) + (mod-count uint16 4 :offset-assert 6376) + (wind-vectors uint32 :offset-assert 6384) + (instance-ptr uint32 :offset-assert 6388) + (chain-ptr uint32 :offset-assert 6392) + (chain-ptr-next uint32 :offset-assert 6396) + (stack-ptr uint32 :offset-assert 6400) + (bucket-ptr uint32 :offset-assert 6404) + (src-ptr uint32 :offset-assert 6408) + (to-spr uint32 :offset-assert 6412) + (from-spr uint32 :offset-assert 6416) + (shrub-count uint32 :offset-assert 6420) + (node uint32 6 :offset 6428) + (length uint32 6 :offset-assert 6452) + (prototypes uint32 :offset-assert 6476) + (start-bank uint8 20 :offset 6484) + (buffer-index uint32 :offset-assert 6504) + (current-spr uint32 :offset-assert 6508) + (current-mem uint32 :offset-assert 6512) + (current-shrub-near-packet uint32 :offset-assert 6516) + (dma-buffer basic :offset 6524) + (near-last uint32 :offset-assert 6528) + (near-next uint32 :offset-assert 6532) + (near-count uint32 :offset-assert 6536) + (last-shrubs uint32 :offset-assert 6540) + (chains uint32 :offset-assert 6544) + (flags uint32 :offset-assert 6548) + (paused basic :offset-assert 6552) + (node-count uint32 :offset-assert 6556) + (inst-count uint32 :offset-assert 6560) + (wait-from-spr uint32 :offset-assert 6564) + (wait-to-spr uint32 :offset-assert 6568) ) :method-count-assert 9 :size-assert #x19ac diff --git a/test/decompiler/reference/engine/gfx/tie/tie-h_REF.gc b/test/decompiler/reference/engine/gfx/tie/tie-h_REF.gc index 05765425be..2470680d9f 100644 --- a/test/decompiler/reference/engine/gfx/tie/tie-h_REF.gc +++ b/test/decompiler/reference/engine/gfx/tie/tie-h_REF.gc @@ -418,8 +418,8 @@ obj ) -;; definition for symbol *instance-tie-work-copy*, type basic -(define *instance-tie-work-copy* (the-as basic #f)) +;; definition for symbol *instance-tie-work-copy*, type instance-tie-work +(define *instance-tie-work-copy* (the-as instance-tie-work #f)) ;; failed to figure out what this is: 0 diff --git a/test/decompiler/reference/engine/gfx/tie/tie-work_REF.gc b/test/decompiler/reference/engine/gfx/tie/tie-work_REF.gc new file mode 100644 index 0000000000..eb27108362 --- /dev/null +++ b/test/decompiler/reference/engine/gfx/tie/tie-work_REF.gc @@ -0,0 +1,201 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *instance-tie-work*, type instance-tie-work +(define + *instance-tie-work* + (new 'static 'instance-tie-work + :wind-const + (new 'static 'vector :x 0.5 :y 100.0 :z 0.0166 :w -1.0) + :constant + (new 'static 'vector :x 4096.0 :y 128.0) + :far-morph (new 'static 'vector :x 1.0 :w 256.0) + :upload-color-0 + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id ref)) + :vif1 + (new 'static 'vif-tag :imm #x80c6 :num #x6 :cmd (vif-cmd unpack-v4-32)) + ) + :upload-color-1 + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif0 + (new 'static 'vif-tag :cmd (vif-cmd stmod)) + :vif1 + (new 'static 'vif-tag :imm #xc0cc :cmd (vif-cmd unpack-v4-8)) + ) + :upload-color-2 + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id next)) + :vif0 + (new 'static 'vif-tag :cmd (vif-cmd stmod)) + ) + :upload-color-ret + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id ret)) + :vif0 + (new 'static 'vif-tag :cmd (vif-cmd stmod)) + ) + :generic-color-0 + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id ref)) + :vif0 (new 'static 'vif-tag :imm #x3) + ) + :generic-color-1 + (new 'static 'dma-packet :dma (new 'static 'dma-tag :id (dma-tag-id ref))) + :generic-color-end + (new 'static 'dma-packet :dma (new 'static 'dma-tag :id (dma-tag-id end))) + :refl-fade-fac -0.000625 + :refl-fade-end 409600.0 + ) + ) + +;; failed to figure out what this is: +(set! + (-> *instance-tie-work* upload-color-2 vif1) + (new 'static 'vif-tag :cmd (vif-cmd mscal) :msk #x1) + ) + +;; failed to figure out what this is: +(set! + (-> *instance-tie-work* upload-color-ret vif1) + (new 'static 'vif-tag :cmd (vif-cmd mscal) :msk #x1) + ) + +;; definition for symbol *prototype-tie-work*, type prototype-tie-work +(define + *prototype-tie-work* + (new 'static 'prototype-tie-work + :upload-palette-0 + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id cnt)) + :vif0 + (new 'static 'vif-tag :cmd (vif-cmd flusha) :msk #x1) + ) + :upload-palette-1 + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :qwc #x20 :id (dma-tag-id cnt)) + :vif0 + (new 'static 'vif-tag :imm #x1 :cmd (vif-cmd stmod)) + :vif1 + (new 'static 'vif-tag :imm #x4346 :num #x80 :cmd (vif-cmd unpack-v4-8)) + ) + :upload-model-0 + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif0 + (new 'static 'vif-tag :cmd (vif-cmd stmod)) + :vif1 + (new 'static 'vif-tag :cmd (vif-cmd unpack-v4-32)) + ) + :upload-model-1 + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 + (new 'static 'vif-tag :imm #x4000 :cmd (vif-cmd unpack-v4-8)) + ) + :upload-model-2 + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 + (new 'static 'vif-tag :imm #x32 :cmd (vif-cmd unpack-v4-16)) + ) + :upload-model-3 + (new 'static 'dma-packet :dma (new 'static 'dma-tag :id (dma-tag-id call))) + :upload-model-near-0 + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif0 + (new 'static 'vif-tag :cmd (vif-cmd stmod)) + :vif1 + (new 'static 'vif-tag :cmd (vif-cmd unpack-v4-32)) + ) + :upload-model-near-1 + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 + (new 'static 'vif-tag :imm #x4000 :cmd (vif-cmd unpack-v4-8)) + ) + :upload-model-near-2 + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 + (new 'static 'vif-tag :imm #x1e :cmd (vif-cmd unpack-v4-8)) + ) + :upload-model-near-3 + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 + (new 'static 'vif-tag :imm #x32 :cmd (vif-cmd unpack-v4-16)) + ) + :upload-model-near-4 + (new 'static 'dma-packet :dma (new 'static 'dma-tag :id (dma-tag-id call))) + :generic-envmap-shader + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :qwc #x5 :id (dma-tag-id ref)) + :vif0 (new 'static 'vif-tag :imm #x1) + ) + :generic-palette + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :qwc #x20 :id (dma-tag-id cnt)) + :vif0 (new 'static 'vif-tag :imm #x1) + ) + :generic-model-0 + (new 'static 'dma-packet + :dma + (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif0 (new 'static 'vif-tag :imm #x2) + ) + :generic-model-1 + (new 'static 'dma-packet :dma (new 'static 'dma-tag :id (dma-tag-id ref))) + :generic-model-2 + (new 'static 'dma-packet :dma (new 'static 'dma-tag :id (dma-tag-id ref))) + :generic-model-next + (new 'static 'dma-packet :dma (new 'static 'dma-tag :id (dma-tag-id next))) + :clamp #x8000ff00ff00ff + ) + ) + +;; failed to figure out what this is: +(set! + (-> *prototype-tie-work* upload-model-1 vif0) + (new 'static 'vif-tag :imm #x4 :cmd (vif-cmd mscal) :msk #x1) + ) + +;; failed to figure out what this is: +(set! + (-> *prototype-tie-work* upload-model-3 vif0) + (new 'static 'vif-tag :imm #x6 :cmd (vif-cmd mscal) :msk #x1) + ) + +;; failed to figure out what this is: +(set! + (-> *prototype-tie-work* upload-model-near-1 vif0) + (new 'static 'vif-tag :imm #x4 :cmd (vif-cmd mscal) :msk #x1) + ) + +;; failed to figure out what this is: +(set! + (-> *prototype-tie-work* upload-model-near-4 vif0) + (new 'static 'vif-tag :imm #x6 :cmd (vif-cmd mscal) :msk #x1) + ) + + + +