regs/gen/ta_parameter_format: incomplete

This commit is contained in:
Zack Buhman 2023-12-30 17:38:15 +08:00
parent 5db6272ceb
commit 7f9469c9a7
4 changed files with 773 additions and 0 deletions

View File

@ -0,0 +1,264 @@
#include <cstdint>
#include "align.hpp"
#include "vga.hpp"
#include "holly/texture_memory_alloc.hpp"
#include "holly.hpp"
#include "holly/core.hpp"
#include "holly/core_bits.hpp"
#include "holly/ta_fifo_polygon_converter.hpp"
#include "holly/ta_parameter.hpp"
#include "holly/ta_bits.hpp"
#include "holly/region_array.hpp"
#include "holly/background.hpp"
#include "memorymap.hpp"
#include "geometry/plane.hpp"
#include "geometry/cube.hpp"
#include "math/vec3.hpp"
#include "math/vec4.hpp"
vec3 _transform(const vec3& point,
const uint32_t scale,
const float theta)
{
float x = point.x;
float y = point.y;
float z = point.z;
float t;
// object transform
t = z * cos(theta) - x * sin(theta);
x = z * sin(theta) + x * cos(theta);
z = t;
x *= scale;
y *= scale;
z *= scale;
// world transform
y += 2.0f;
x *= 0.8;
y *= 0.8;
z *= 0.8;
// camera transform
z += 4;
// perspective
x = x / z;
y = y / z;
// screen space transform
x *= 240.f;
y *= 240.f;
x += 320.f;
y += 240.f;
z = 1 / z;
return {x, y, z};
}
void transform_polygon(ta_parameter_writer& parameter,
const vec3 * vertices,
const face& face,
const float scale,
const vec4& color,
const float theta)
{
const uint32_t parameter_control_word = para_control::para_type::polygon_or_modifier_volume
| para_control::list_type::opaque
| obj_control::col_type::floating_color
| obj_control::shadow;
const uint32_t isp_tsp_instruction_word = isp_tsp_instruction_word::depth_compare_mode::greater
| isp_tsp_instruction_word::culling_mode::no_culling;
const uint32_t tsp_instruction_word = tsp_instruction_word::src_alpha_instr::one
| tsp_instruction_word::dst_alpha_instr::zero
| tsp_instruction_word::fog_control::no_fog;
parameter.append<global_polygon_type_0>() = global_polygon_type_0(parameter_control_word,
isp_tsp_instruction_word,
tsp_instruction_word,
0);
constexpr uint32_t strip_length = 3;
for (uint32_t i = 0; i < strip_length; i++) {
// world transform
uint32_t vertex_ix = face[i].vertex;
auto& vertex = vertices[vertex_ix];
auto point = _transform(vertex, scale, theta);
bool end_of_strip = i == strip_length - 1;
parameter.append<vertex_polygon_type_1>() =
vertex_polygon_type_1(polygon_vertex_parameter_control_word(end_of_strip),
point.x,
point.y,
point.z,
color.a, // alpha
color.r, // red
color.g, // green
color.b // blue
);
}
}
void transform_modifier_volume(ta_parameter_writer& parameter,
const vec3 * vertices,
const face * faces,
const uint32_t num_faces,
const float scale)
{
const uint32_t parameter_control_word = para_control::para_type::polygon_or_modifier_volume
| para_control::list_type::opaque_modifier_volume
// | group_control::group_en
// | group_control::user_clip::inside_enable
;
const uint32_t isp_tsp_instruction_word = isp_tsp_instruction_word::volume_instruction::normal_polygon
| isp_tsp_instruction_word::culling_mode::no_culling;
parameter.append<global_modifier_volume>() =
global_modifier_volume(parameter_control_word,
isp_tsp_instruction_word);
for (uint32_t i = 0; i < num_faces; i++) {
// world transform
uint32_t ix_a = faces[i][0].vertex;
uint32_t ix_b = faces[i][1].vertex;
uint32_t ix_c = faces[i][2].vertex;
auto& _a = vertices[ix_a];
auto& _b = vertices[ix_b];
auto& _c = vertices[ix_c];
auto a = _transform(_a, scale, 0.f);
auto b = _transform(_b, scale, 0.f);
auto c = _transform(_c, scale, 0.f);
if (i == (num_faces - 1)) {
const uint32_t last_parameter_control_word = para_control::para_type::polygon_or_modifier_volume
| para_control::list_type::opaque_modifier_volume
| obj_control::volume::modifier_volume::last_in_volume;
const uint32_t last_isp_tsp_instruction_word = isp_tsp_instruction_word::volume_instruction::inside_last_polygon
| isp_tsp_instruction_word::culling_mode::no_culling;
parameter.append<global_modifier_volume>() =
global_modifier_volume(last_parameter_control_word,
last_isp_tsp_instruction_word);
}
parameter.append<vertex_modifier_volume>() =
vertex_modifier_volume(modifier_volume_vertex_parameter_control_word(),
a.x, a.y, a.z,
b.x, b.y, b.z,
c.x, c.y, c.z);
}
}
void init_texture_memory(const struct opb_size& opb_size)
{
auto mem = reinterpret_cast<volatile texture_memory_alloc *>(texture_memory32);
background_parameter(mem->background, 0xff220000);
region_array2(mem->region_array,
(offsetof (struct texture_memory_alloc, object_list)),
640 / 32, // width
480 / 32, // height
opb_size
);
}
uint32_t _ta_parameter_buf[((32 * 8192) + 32) / 4];
void main()
{
vga();
// The address of `ta_parameter_buf` must be a multiple of 32 bytes.
// This is mandatory for ch2-dma to the ta fifo polygon converter.
uint32_t * ta_parameter_buf = align_32byte(_ta_parameter_buf);
constexpr uint32_t ta_alloc = ta_alloc_ctrl::pt_opb::no_list
| ta_alloc_ctrl::tm_opb::no_list
| ta_alloc_ctrl::t_opb::no_list
| ta_alloc_ctrl::om_opb::_16x4byte
| ta_alloc_ctrl::o_opb::_16x4byte;
constexpr struct opb_size opb_size = { .opaque = 16 * 4
, .opaque_modifier = 16 * 4
, .translucent = 0
, .translucent_modifier = 0
, .punch_through = 0
};
holly.SOFTRESET = softreset::pipeline_soft_reset
| softreset::ta_soft_reset;
holly.SOFTRESET = 0;
core_init();
init_texture_memory(opb_size);
uint32_t frame_ix = 0;
constexpr uint32_t num_frames = 1;
float theta = 0;
while (true) {
ta_polygon_converter_init(opb_size.total(),
ta_alloc,
640 / 32,
480 / 32);
auto parameter = ta_parameter_writer(ta_parameter_buf);
{ // plane
vec4 color = {1.0, 0.9, 0.4, 0.2};
float scale = 2.f;
for (uint32_t i = 0; i < plane::num_faces; i++) {
transform_polygon(parameter,
plane::vertices,
plane::faces[i],
scale,
color,
theta);
}
/*
for (uint32_t i = 0; i < cube::num_faces; i++) {
transform_polygon(parameter,
cube::vertices,
cube::faces[i],
1.f,
{1.0f, 0.0f, 1.0f, 0.0f});
}
*/
}
// end of opaque list
parameter.append<global_end_of_list>() = global_end_of_list();
{ // cube
float scale = 1.f;
transform_modifier_volume(parameter,
cube::vertices,
cube::faces,
cube::num_faces,
scale);
}
// end of opaque modifier list
parameter.append<global_end_of_list>() = global_end_of_list();
ta_polygon_converter_transfer(ta_parameter_buf, parameter.offset);
ta_wait_opaque_modifier_volume_list();
core_start_render(frame_ix, num_frames);
v_sync_in();
core_wait_end_of_render_video(frame_ix, num_frames);
constexpr float half_degree = 0.01745329f / 2;
theta += half_degree;
frame_ix += 1;
}
}

View File

@ -0,0 +1,143 @@
from dataclasses import dataclass
from pprint import pprint
import sys
import csv
from generate import renderer
_field_types = {
"parameter_control_word": "uint32_t",
"user_clip_": "uint32_t",
"object_pointer": "uint32_t",
"bounding_box_": "uint32_t",
"isp_tsp_instruction_word": "uint32_t",
"tsp_instruction_word": "uint32_t",
"texture_control_word": "uint32_t",
"data_size_for_sort_dma": "uint32_t",
"next_address_for_sort_dma": "uint32_t",
"face_color_": "float",
"face_offset_color_": "float",
"x": "float",
"y": "float",
"z": "float",
"base_color_": "float",
"base_intensity_": "float",
"u": "float",
"v": "float",
"u_v": "uint32_t",
"base_color": "uint32_t",
"offset_color": "uint32_t",
"offset_color_": "float",
"base_intensity": "float",
"offset_intensity": "float",
"a_": "float",
"b_": "float",
"c_": "float",
"d_": "float",
"a_u_a_v": "uint32_t",
"b_u_b_v": "uint32_t",
"c_u_c_v": "uint32_t",
}
def get_type(field_name: str):
match = None
match_len = 0
for name, type in _field_types.items():
if field_name.startswith(type) and len(name) >= match_len:
match = type
assert match_len != len(name), (name, match)
match_len = len(name)
assert match != None, field_name
return match
class EndOfInput(Exception):
pass
def next_row(ix, rows, advance):
if ix >= len(rows):
raise EndOfInput
if advance:
while rows[ix][0] == "":
ix += 1
if ix >= len(rows):
raise EndOfInput
row = rows[ix]
ix += 1
return ix, row
@dataclass
class FieldDeclaration:
offset: int
name: str
@dataclass
class StructDeclaration:
name: str
fields: list[FieldDeclaration]
def parse_type_declaration(ix, rows):
ix, row = next_row(ix, rows, advance=True)
assert len(row) == 2, row
struct_name, empty = row
assert empty == "", row
fields = []
last_offset = -4
while True:
ix, row = next_row(ix, rows, advance=False)
if row[0] == "":
assert last_offset + 4 == 32 or last_offset + 4 == 64, last_offset + 4
return ix, StructDeclaration(
struct_name,
fields
)
else:
assert len(row) == 2, row
_offset, name = row
offset = int(_offset, 16)
assert offset == last_offset + 4, (hex(offset), hex(last_offset))
last_offset = offset
fields.append(FieldDeclaration(offset, name))
def parse(rows):
ix = 0
declarations = []
while True:
try:
ix, declaration = parse_type_declaration(ix, rows)
except EndOfInput:
break
declarations.append(declaration)
return declarations
def render_declaration(declaration):
yield f"struct {declaration.name} {{"
for field in declaration.fields:
yield f""
yield "};"
def render_declarations(namespace, declarations):
yield f"namespace {namespace} {{"
for declaration in declarations:
yield from render_declaration(declaration)
yield ""
yield "}"
def read_input(filename):
with open(filename) as f:
reader = csv.reader(f, delimiter=",", quotechar='"')
rows = [
[s.strip() for s in row]
for row in reader
]
return rows
if __name__ == "__main__":
rows = read_input(sys.argv[1])
namespace = sys.argv[2]
declarations = parse(rows)
render, out = renderer()
render(render_declarations(namespace, declarations))
print(out.getvalue())

View File

@ -0,0 +1,115 @@
"end_of_list",
"0x00","parameter_control_word"
"0x04",
"0x08",
"0x0c",
"0x10",
"0x14",
"0x18",
"0x1c",
,
"user_tile_clip",
"0x00","parameter_control_word"
"0x04",
"0x08",
"0x0c",
"0x10","user_clip_x_min"
"0x14","user_clip_y_min"
"0x18","user_clip_x_max"
"0x1c","user_clip_y_max"
,
"object_list_set",
"0x00","parameter_control_word"
"0x04","object_pointer"
"0x08",
"0x0c",
"0x10","bounding_box_x_min"
"0x14","bounding_box_y_min"
"0x18","bounding_box_x_max"
"0x1c","bounding_box_y_max"
,
"polygon_type_0",
"0x00","parameter_control_word"
"0x04","isp_tsp_instruction_word"
"0x08","tsp_instruction_word"
"0x0c","texture_control_word"
"0x10",
"0x14",
"0x18","data_size_for_sort_dma"
"0x1c","next_address_for_sort_dma"
,
"polygon_type_1",
"0x00","parameter_control_word"
"0x04","isp_tsp_instruction_word"
"0x08","tsp_instruction_word"
"0x0c","texture_control_word"
"0x10","face_color_alpha"
"0x14","face_color_r"
"0x18","face_color_g"
"0x1c","face_color_b"
,
"polygon_type_2",
"0x00","parameter_control_word"
"0x04","isp_tsp_instruction_word"
"0x08","tsp_instruction_word"
"0x0c","texture_control_word"
"0x10",
"0x14",
"0x18","data_size_for_sort_dma"
"0x1c","next_address_for_sort_dma"
"0x20","face_color_alpha"
"0x24","face_color_r"
"0x28","face_color_g"
"0x2c","face_color_b"
"0x30","face_offset_color_alpha"
"0x34","face_offset_color_r"
"0x38","face_offset_color_g"
"0x3c","face_offset_color_b"
,
"polygon_type_3",
"0x00","parameter_control_word"
"0x04","isp_tsp_instruction_word"
"0x08","tsp_instruction_word_0"
"0x0c","texture_control_word_0"
"0x10","tsp_instruction_word_1"
"0x14","texture_control_word_1"
"0x18","data_size_for_sort_dma"
"0x1c","next_address_for_sort_dma"
,
"polygon_type_4",
"0x00","parameter_control_word"
"0x04","isp_tsp_instruction_word"
"0x08","tsp_instruction_word_0"
"0x0c","texture_control_word_0"
"0x10","tsp_instruction_word_1"
"0x14","texture_control_word_1"
"0x18","data_size_for_sort_dma"
"0x1c","next_address_for_sort_dma"
"0x20","face_color_alpha_0"
"0x24","face_color_r_0"
"0x28","face_color_g_0"
"0x2c","face_color_b_0"
"0x30","face_color_alpha_1"
"0x34","face_color_r_1"
"0x38","face_color_g_1"
"0x3c","face_color_b_1"
,
"sprite",
"0x00","parameter_control_word"
"0x04","isp_tsp_instruction_word"
"0x08","tsp_instruction_word"
"0x0c","texture_control_word"
"0x10","base_color"
"0x14","offset_color"
"0x18","data_size_for_sort_dma"
"0x1c","next_address_for_sort_dma"
,
"modifier_volume",
"0x00","parameter_control_word"
"0x04","isp_tsp_instruction_word"
"0x08",
"0x0c",
"0x10",
"0x14",
"0x18",
"0x1c",
1 end_of_list
2 0x00 parameter_control_word
3 0x04
4 0x08
5 0x0c
6 0x10
7 0x14
8 0x18
9 0x1c
10
11 user_tile_clip
12 0x00 parameter_control_word
13 0x04
14 0x08
15 0x0c
16 0x10 user_clip_x_min
17 0x14 user_clip_y_min
18 0x18 user_clip_x_max
19 0x1c user_clip_y_max
20
21 object_list_set
22 0x00 parameter_control_word
23 0x04 object_pointer
24 0x08
25 0x0c
26 0x10 bounding_box_x_min
27 0x14 bounding_box_y_min
28 0x18 bounding_box_x_max
29 0x1c bounding_box_y_max
30
31 polygon_type_0
32 0x00 parameter_control_word
33 0x04 isp_tsp_instruction_word
34 0x08 tsp_instruction_word
35 0x0c texture_control_word
36 0x10
37 0x14
38 0x18 data_size_for_sort_dma
39 0x1c next_address_for_sort_dma
40
41 polygon_type_1
42 0x00 parameter_control_word
43 0x04 isp_tsp_instruction_word
44 0x08 tsp_instruction_word
45 0x0c texture_control_word
46 0x10 face_color_alpha
47 0x14 face_color_r
48 0x18 face_color_g
49 0x1c face_color_b
50
51 polygon_type_2
52 0x00 parameter_control_word
53 0x04 isp_tsp_instruction_word
54 0x08 tsp_instruction_word
55 0x0c texture_control_word
56 0x10
57 0x14
58 0x18 data_size_for_sort_dma
59 0x1c next_address_for_sort_dma
60 0x20 face_color_alpha
61 0x24 face_color_r
62 0x28 face_color_g
63 0x2c face_color_b
64 0x30 face_offset_color_alpha
65 0x34 face_offset_color_r
66 0x38 face_offset_color_g
67 0x3c face_offset_color_b
68
69 polygon_type_3
70 0x00 parameter_control_word
71 0x04 isp_tsp_instruction_word
72 0x08 tsp_instruction_word_0
73 0x0c texture_control_word_0
74 0x10 tsp_instruction_word_1
75 0x14 texture_control_word_1
76 0x18 data_size_for_sort_dma
77 0x1c next_address_for_sort_dma
78
79 polygon_type_4
80 0x00 parameter_control_word
81 0x04 isp_tsp_instruction_word
82 0x08 tsp_instruction_word_0
83 0x0c texture_control_word_0
84 0x10 tsp_instruction_word_1
85 0x14 texture_control_word_1
86 0x18 data_size_for_sort_dma
87 0x1c next_address_for_sort_dma
88 0x20 face_color_alpha_0
89 0x24 face_color_r_0
90 0x28 face_color_g_0
91 0x2c face_color_b_0
92 0x30 face_color_alpha_1
93 0x34 face_color_r_1
94 0x38 face_color_g_1
95 0x3c face_color_b_1
96
97 sprite
98 0x00 parameter_control_word
99 0x04 isp_tsp_instruction_word
100 0x08 tsp_instruction_word
101 0x0c texture_control_word
102 0x10 base_color
103 0x14 offset_color
104 0x18 data_size_for_sort_dma
105 0x1c next_address_for_sort_dma
106
107 modifier_volume
108 0x00 parameter_control_word
109 0x04 isp_tsp_instruction_word
110 0x08
111 0x0c
112 0x10
113 0x14
114 0x18
115 0x1c

View File

@ -0,0 +1,251 @@
"polygon_type_0",
"0x00","parameter_control_word"
"0x04","x"
"0x08","y"
"0x0c","z"
"0x10",
"0x14",
"0x18","base_color"
"0x1c",
,
"polygon_type_1",
"0x00","parameter_control_word"
"0x04","x"
"0x08","y"
"0x0c","z"
"0x10","base_color_alpha"
"0x14","base_color_r"
"0x18","base_color_g"
"0x1c","base_color_b"
,
"polygon_type_2",
"0x00","parameter_control_word"
"0x04","x"
"0x08","y"
"0x0c","z"
"0x10",
"0x14",
"0x18","base_intensity"
"0x1c",
,
"polygon_type_3",
"0x00","parameter_control_word"
"0x04","x"
"0x08","y"
"0x0c","z"
"0x10","u"
"0x14","v"
"0x18","base_color"
"0x1c","offset_color"
,
"polygon_type_4",
"0x00","parameter_control_word"
"0x04","x"
"0x08","y"
"0x0c","z"
"0x10","u_v"
"0x14",
"0x18","base_color"
"0x1c","offset_color"
,
"polygon_type_5",
"0x00","parameter_control_word"
"0x04","x"
"0x08","y"
"0x0c","z"
"0x10","u"
"0x14","v"
"0x18",
"0x1c",
"0x20","base_color_alpha"
"0x24","base_color_r"
"0x28","base_color_g"
"0x2c","base_color_b"
"0x30","offset_color_alpha"
"0x34","offset_color_r"
"0x38","offset_color_g"
"0x3c","offset_color_b"
,
"polygon_type_6",
"0x00","parameter_control_word"
"0x04","x"
"0x08","y"
"0x0c","z"
"0x10","u_v"
"0x14",
"0x18",
"0x1c",
"0x20","base_color_alpha"
"0x24","base_color_r"
"0x28","base_color_g"
"0x2c","base_color_b"
"0x30","offset_color_alpha"
"0x34","offset_color_r"
"0x38","offset_color_g"
"0x3c","offset_color_b"
,
"polygon_type_7",
"0x00","parameter_control_word"
"0x04","x"
"0x08","y"
"0x0c","z"
"0x10","u"
"0x14","v"
"0x18","base_intensity"
"0x1c","offset_intensity"
,
"polygon_type_8",
"0x00","parameter_control_word"
"0x04","x"
"0x08","y"
"0x0c","z"
"0x10","u_v"
"0x14",
"0x18","base_intensity"
"0x1c","offset_intensity"
,
"polygon_type_9",
"0x00","parameter_control_word"
"0x04","x"
"0x08","y"
"0x0c","z"
"0x10","base_color_0"
"0x14","base_color_1"
"0x18",
"0x1c",
,
"polygon_type_10",
"0x00","parameter_control_word"
"0x04","x"
"0x08","y"
"0x0c","z"
"0x10","base_intensity_0"
"0x14","base_intensity_1"
"0x18",
"0x1c",
,
"polygon_type_11",
"0x00","parameter_control_word"
"0x04","x"
"0x08","y"
"0x0c","z"
"0x10","u_0"
"0x14","v_0"
"0x18","base_color_0"
"0x1c","offset_color_0"
"0x20","u_1"
"0x24","v_1"
"0x28","base_color_1"
"0x2c","offset_color_1"
"0x30",
"0x34",
"0x38",
"0x3c",
,
"polygon_type_12",
"0x00","parameter_control_word"
"0x04","x"
"0x08","y"
"0x0c","z"
"0x10","u_v_0"
"0x14",
"0x18","base_color_0"
"0x1c","offset_color_0"
"0x20","u_v_1"
"0x24",
"0x28","base_color_1"
"0x2c","offset_color_1"
"0x30",
"0x34",
"0x38",
"0x3c",
,
"polygon_type_13",
"0x00","parameter_control_word"
"0x04","x"
"0x08","y"
"0x0c","z"
"0x10","u_0"
"0x14","v_0"
"0x18","base_intensity_0"
"0x1c","offset_intensity_0"
"0x20","u_1"
"0x24","v_1"
"0x28","base_intensity_1"
"0x2c","offset_intensity_1"
"0x30",
"0x34",
"0x38",
"0x3c",
,
"polygon_type_14",
"0x00","parameter_control_word"
"0x04","x"
"0x08","y"
"0x0c","z"
"0x10","u_v_0"
"0x14",
"0x18","base_intensity_0"
"0x1c","offset_intensity_0"
"0x20","u_v_1"
"0x24",
"0x28","base_intensity_1"
"0x2c","offset_intensity_1"
"0x30",
"0x34",
"0x38",
"0x3c",
,
"sprite_type_0",
"0x00","parameter_control_word"
"0x04","a_x"
"0x08","a_y"
"0x0c","a_z"
"0x10","b_x"
"0x14","b_y"
"0x18","b_z"
"0x1c","c_x"
"0x20","c_y"
"0x24","c_z"
"0x28","d_x"
"0x2c","d_y"
"0x30",
"0x34",
"0x38",
"0x3c",
,
"sprite_type_1",
"0x00","parameter_control_word"
"0x04","a_x"
"0x08","a_y"
"0x0c","a_z"
"0x10","b_x"
"0x14","b_y"
"0x18","b_z"
"0x1c","c_x"
"0x20","c_y"
"0x24","c_z"
"0x28","d_x"
"0x2c","d_y"
"0x30",
"0x34","a_u_a_v"
"0x38","b_u_b_v"
"0x3c","c_u_c_v"
,
"modifier_volume",
"0x00","parameter_control_word"
"0x04","a_x"
"0x08","a_y"
"0x0c","a_z"
"0x10","b_x"
"0x14","b_y"
"0x18","b_z"
"0x1c","c_x"
"0x20","c_y"
"0x24","c_z"
"0x28",
"0x2c",
"0x30",
"0x34",
"0x38",
"0x3c",
1 polygon_type_0
2 0x00 parameter_control_word
3 0x04 x
4 0x08 y
5 0x0c z
6 0x10
7 0x14
8 0x18 base_color
9 0x1c
10
11 polygon_type_1
12 0x00 parameter_control_word
13 0x04 x
14 0x08 y
15 0x0c z
16 0x10 base_color_alpha
17 0x14 base_color_r
18 0x18 base_color_g
19 0x1c base_color_b
20
21 polygon_type_2
22 0x00 parameter_control_word
23 0x04 x
24 0x08 y
25 0x0c z
26 0x10
27 0x14
28 0x18 base_intensity
29 0x1c
30
31 polygon_type_3
32 0x00 parameter_control_word
33 0x04 x
34 0x08 y
35 0x0c z
36 0x10 u
37 0x14 v
38 0x18 base_color
39 0x1c offset_color
40
41 polygon_type_4
42 0x00 parameter_control_word
43 0x04 x
44 0x08 y
45 0x0c z
46 0x10 u_v
47 0x14
48 0x18 base_color
49 0x1c offset_color
50
51 polygon_type_5
52 0x00 parameter_control_word
53 0x04 x
54 0x08 y
55 0x0c z
56 0x10 u
57 0x14 v
58 0x18
59 0x1c
60 0x20 base_color_alpha
61 0x24 base_color_r
62 0x28 base_color_g
63 0x2c base_color_b
64 0x30 offset_color_alpha
65 0x34 offset_color_r
66 0x38 offset_color_g
67 0x3c offset_color_b
68
69 polygon_type_6
70 0x00 parameter_control_word
71 0x04 x
72 0x08 y
73 0x0c z
74 0x10 u_v
75 0x14
76 0x18
77 0x1c
78 0x20 base_color_alpha
79 0x24 base_color_r
80 0x28 base_color_g
81 0x2c base_color_b
82 0x30 offset_color_alpha
83 0x34 offset_color_r
84 0x38 offset_color_g
85 0x3c offset_color_b
86
87 polygon_type_7
88 0x00 parameter_control_word
89 0x04 x
90 0x08 y
91 0x0c z
92 0x10 u
93 0x14 v
94 0x18 base_intensity
95 0x1c offset_intensity
96
97 polygon_type_8
98 0x00 parameter_control_word
99 0x04 x
100 0x08 y
101 0x0c z
102 0x10 u_v
103 0x14
104 0x18 base_intensity
105 0x1c offset_intensity
106
107 polygon_type_9
108 0x00 parameter_control_word
109 0x04 x
110 0x08 y
111 0x0c z
112 0x10 base_color_0
113 0x14 base_color_1
114 0x18
115 0x1c
116
117 polygon_type_10
118 0x00 parameter_control_word
119 0x04 x
120 0x08 y
121 0x0c z
122 0x10 base_intensity_0
123 0x14 base_intensity_1
124 0x18
125 0x1c
126
127 polygon_type_11
128 0x00 parameter_control_word
129 0x04 x
130 0x08 y
131 0x0c z
132 0x10 u_0
133 0x14 v_0
134 0x18 base_color_0
135 0x1c offset_color_0
136 0x20 u_1
137 0x24 v_1
138 0x28 base_color_1
139 0x2c offset_color_1
140 0x30
141 0x34
142 0x38
143 0x3c
144
145 polygon_type_12
146 0x00 parameter_control_word
147 0x04 x
148 0x08 y
149 0x0c z
150 0x10 u_v_0
151 0x14
152 0x18 base_color_0
153 0x1c offset_color_0
154 0x20 u_v_1
155 0x24
156 0x28 base_color_1
157 0x2c offset_color_1
158 0x30
159 0x34
160 0x38
161 0x3c
162
163 polygon_type_13
164 0x00 parameter_control_word
165 0x04 x
166 0x08 y
167 0x0c z
168 0x10 u_0
169 0x14 v_0
170 0x18 base_intensity_0
171 0x1c offset_intensity_0
172 0x20 u_1
173 0x24 v_1
174 0x28 base_intensity_1
175 0x2c offset_intensity_1
176 0x30
177 0x34
178 0x38
179 0x3c
180
181 polygon_type_14
182 0x00 parameter_control_word
183 0x04 x
184 0x08 y
185 0x0c z
186 0x10 u_v_0
187 0x14
188 0x18 base_intensity_0
189 0x1c offset_intensity_0
190 0x20 u_v_1
191 0x24
192 0x28 base_intensity_1
193 0x2c offset_intensity_1
194 0x30
195 0x34
196 0x38
197 0x3c
198
199 sprite_type_0
200 0x00 parameter_control_word
201 0x04 a_x
202 0x08 a_y
203 0x0c a_z
204 0x10 b_x
205 0x14 b_y
206 0x18 b_z
207 0x1c c_x
208 0x20 c_y
209 0x24 c_z
210 0x28 d_x
211 0x2c d_y
212 0x30
213 0x34
214 0x38
215 0x3c
216
217 sprite_type_1
218 0x00 parameter_control_word
219 0x04 a_x
220 0x08 a_y
221 0x0c a_z
222 0x10 b_x
223 0x14 b_y
224 0x18 b_z
225 0x1c c_x
226 0x20 c_y
227 0x24 c_z
228 0x28 d_x
229 0x2c d_y
230 0x30
231 0x34 a_u_a_v
232 0x38 b_u_b_v
233 0x3c c_u_c_v
234
235 modifier_volume
236 0x00 parameter_control_word
237 0x04 a_x
238 0x08 a_y
239 0x0c a_z
240 0x10 b_x
241 0x14 b_y
242 0x18 b_z
243 0x1c c_x
244 0x20 c_y
245 0x24 c_z
246 0x28
247 0x2c
248 0x30
249 0x34
250 0x38
251 0x3c