@@ -274,10 +274,13 @@ class Start3DStruct2(ConstructClass):
274274 "depth_dimensions" / Int64ul ,
275275 "unk_48" / Int64ul ,
276276 "depth_flags" / Int64ul , # 0x40000 - has stencil 0x80000 - has depth
277+ Ver ("G >= G14" , "unk_58_g14_0" / Int64ul ),
278+ Ver ("G >= G14" , "unk_58_g14_8" / Int64ul ),
277279 "depth_buffer_ptr1" / Int64ul ,
278280 "depth_buffer_ptr2" / Int64ul ,
279281 "stencil_buffer_ptr1" / Int64ul ,
280282 "stencil_buffer_ptr2" / Int64ul ,
283+ Ver ("G >= G14" , "unk_68_g14_0" / HexDump (Bytes (0x20 ))),
281284 "unk_78" / Array (4 , Int64ul ),
282285 "depth_aux_buffer_ptr1" / Int64ul ,
283286 "unk_a0" / Int64ul ,
@@ -300,7 +303,8 @@ class Start3DStruct2(ConstructClass):
300303 "unk_150" / Int64ul ,
301304 "unk_158" / Int64ul ,
302305 "unk_160" / Int64ul ,
303- "unk_168_padding" / HexDump (Bytes (0x1d8 )),
306+ Ver ("G < G14" , "unk_168_padding" / HexDump (Bytes (0x1d8 ))),
307+ Ver ("G >= G14" , "unk_198_padding" / HexDump (Bytes (0x1a8 ))),
304308 Ver ("V < V13_0B4" , ZPadding (8 )),
305309 )
306310
@@ -432,6 +436,7 @@ class Finalize3DCmd(ConstructClass):
432436 "unk_7c" / Int64ul , # 0
433437 "unk_84" / Int64ul , # 0
434438 "unk_8c" / Int64ul , # 0
439+ Ver ("G >= G14" , "unk_8c_g14" / Int64ul ),
435440 "restart_branch_offset" / Int32sl ,
436441 "unk_98" / Int32ul , # 1
437442 Ver ("V >= V13_0B4" , "unk_9c" / HexDump (Bytes (0x10 ))),
@@ -459,32 +464,34 @@ class StartTACmdStruct2(ConstructClass):
459464 "unk_8" / Hex (Int32ul ),
460465 "unk_c" / Hex (Int32ul ),
461466 "tvb_tilemap" / Hex (Int64ul ),
462- "unkptr_18" / Hex (Int64ul ),
463- "unkptr_20 " / Hex (Int64ul ),
467+ Ver ( "G < G14" , "tvb_cluster_tilemaps" / Hex (Int64ul ) ),
468+ "tpc " / Hex (Int64ul ),
464469 "tvb_heapmeta_addr" / Hex (Int64ul ), # like Start3DStruct2.tvb_end_addr with bit 63 set?
465470 "iogpu_unk_54" / Int32ul ,
466471 "iogpu_unk_55" / Int32ul ,
467472 "iogpu_unk_56" / Int64ul ,
468- "unk_40" / Int64ul ,
473+ Ver ( "G < G14" , "tvb_cluster_meta1" / Int64ul ) ,
469474 "unk_48" / Int64ul ,
470475 "unk_50" / Int64ul ,
471476 "tvb_heapmeta_addr2" / Int64ul ,
472- " unk_60" / Int64ul ,
473- "unk_68" / Int64ul ,
477+ Ver ( "G < G14" , " unk_60" / Int64ul ) ,
478+ Ver ( "G < G14" , "core_mask" / Int64ul ) ,
474479 "iogpu_deflake_1" / Int64ul ,
475480 "iogpu_deflake_2" / Int64ul ,
476481 "unk_80" / Int64ul ,
477- "iogpu_deflake_3" / Int64ul , # context_id in bits 55:48
482+ "iogpu_deflake_3" / Int64ul , # bit 50 set
478483 "encoder_addr" / Int64ul ,
479- "unk_98" / Array (2 , Hex (Int64ul )),
480- "unk_a8" / Int64ul ,
484+ Ver ("G < G14" , "tvb_cluster_meta2" / Int64ul ),
485+ Ver ("G < G14" , "tvb_cluster_meta3" / Int64ul ),
486+ Ver ("G < G14" , "tiling_control" / Int64ul ),
481487 "unk_b0" / Array (6 , Hex (Int64ul )),
482488 "pipeline_base" / Int64ul ,
483- "unk_e8" / Int64ul ,
484- " unk_f0" / Int64ul ,
489+ Ver ( "G < G14" , "tvb_cluster_meta4" / Int64ul ) ,
490+ Ver ( "G < G14" , " unk_f0" / Int64ul ) ,
485491 "unk_f8" / Int64ul ,
486492 "unk_100" / Array (3 , Hex (Int64ul )),
487493 "unk_118" / Int32ul ,
494+ Ver ("G >= G14" , Padding (8 * 9 )),
488495 )
489496
490497class StartTACmdStruct3 (ConstructClass ):
@@ -593,6 +600,7 @@ class FinalizeTACmd(ConstructClass):
593600 "unk_60" / Int32ul ,
594601 "unk_64" / Int32ul ,
595602 "unk_68" / Int32ul ,
603+ Ver ("G >= G14" , "unk_6c_g14" / Int64ul ),
596604 "restart_branch_offset" / Int32sl ,
597605 "unk_70" / Int32ul ,
598606 Ver ("V >= V13_0B4" , "unk_74" / HexDump (Bytes (0x10 ))),
@@ -675,16 +683,6 @@ class StartComputeCmd(ConstructClass):
675683 "padding" / Bytes (0x154 - 0x4c ),
676684 )
677685
678- def parsed (self , ctx ):
679- try :
680- if self .padding != b"\x00 " * (0x154 - 0x4c ):
681- raise ExplicitError ("padding is not zero" )
682- del self .padding
683- self ._keys = [x for x in self ._keys if x != "padding" ]
684- except AttributeError :
685- pass
686-
687-
688686class FinalizeComputeCmd (ConstructClass ):
689687 subcon = Struct ( # 0x64 bytes''''
690688 "magic" / Const (0x2a , Int32ul ),
@@ -706,6 +704,7 @@ class FinalizeComputeCmd(ConstructClass):
706704 "unk_50" / Int32ul ,
707705 "unk_54" / Int32ul ,
708706 "unk_58" / Int32ul ,
707+ Ver ("G >= G14" , "unk_5c_g14" / Int64ul ),
709708 "restart_branch_offset" / Int32sl , # realative offset from start of Finalize to StartComputeCmd
710709 "unk_60" / Int32ul ,
711710 )
0 commit comments