example: update several examples

This commit is contained in:
Zack Buhman 2024-01-03 21:50:07 +08:00
parent dcb9f36120
commit 1f6a29f379
26 changed files with 1610 additions and 1321 deletions

View File

@ -3,17 +3,19 @@
#include "align.hpp"
#include "vga.hpp"
#include "holly.hpp"
#include "holly/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_global_parameter.hpp"
#include "holly/ta_vertex_parameter.hpp"
#include "holly/ta_bits.hpp"
#include "holly/isp_tsp.hpp"
#include "holly/region_array.hpp"
#include "holly/background.hpp"
#include "holly/texture_memory_alloc.hpp"
#include "memorymap.hpp"
#include "serial.hpp"
#include "geometry/cube.hpp"
#include "math/vec4.hpp"
@ -59,10 +61,14 @@ void transform(ta_parameter_writer& parameter,
| 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,
parameter.append<ta_global_parameter::polygon_type_0>() =
ta_global_parameter::polygon_type_0(parameter_control_word,
isp_tsp_instruction_word,
tsp_instruction_word,
0);
0, // texture_control_word
0, // data_size_for_sort_dma
0 // next_address_for_sort_dma
);
auto& face = cube::faces[face_ix];
constexpr uint32_t strip_length = 3;
@ -116,13 +122,14 @@ void transform(ta_parameter_writer& parameter,
y += 240.f;
z = 1 / z;
parameter.append<vertex_polygon_type_1>() =
vertex_polygon_type_1(x, y, z,
parameter.append<ta_vertex_parameter::polygon_type_1>() =
ta_vertex_parameter::polygon_type_1(polygon_vertex_parameter_control_word(end_of_strip),
x, y, z,
color.w, // alpha
color.x, // r
color.y, // g
color.z, // b
end_of_strip);
color.z // b
);
}
}
@ -163,8 +170,6 @@ void main()
, .punch_through = 0
};
constexpr uint32_t tiles = (640 / 32) * (320 / 32);
holly.SOFTRESET = softreset::pipeline_soft_reset
| softreset::ta_soft_reset;
holly.SOFTRESET = 0;
@ -182,8 +187,10 @@ void main()
};
while (1) {
ta_polygon_converter_init(opb_size.total() * tiles, ta_alloc,
640, 480);
ta_polygon_converter_init(opb_size.total(),
ta_alloc,
640 / 32,
480 / 32);
//lights[0].x = cos(theta) * 10;
//lights[0].z = sin(theta) * 10;
@ -195,7 +202,7 @@ void main()
for (uint32_t i = 0; i < cube::num_faces; i++) {
transform(parameter, i, theta, lights);
}
parameter.append<global_end_of_list>() = global_end_of_list();
parameter.append<ta_global_parameter::end_of_list>() = ta_global_parameter::end_of_list(para_control::para_type::end_of_list);
ta_polygon_converter_transfer(ta_parameter_buf, parameter.offset);
ta_wait_opaque_list();
core_start_render(frame_ix, num_frames);

View File

@ -40,7 +40,6 @@ FONT_BITMAP_OBJ = \
holly/region_array.o \
holly/background.o \
holly/ta_fifo_polygon_converter.o \
serial.o \
sperrypc.data.o
example/font_bitmap.elf: LDSCRIPT = $(LIB)/alt.lds
@ -53,7 +52,6 @@ FONT_OUTLINE_OBJ = \
holly/region_array.o \
holly/background.o \
holly/ta_fifo_polygon_converter.o \
serial.o \
dejavusansmono.data.o
example/font_outline.elf: LDSCRIPT = $(LIB)/alt.lds
@ -66,7 +64,6 @@ FONT_OUTLINE_PUNCH_THROUGH_OBJ = \
holly/region_array.o \
holly/background.o \
holly/ta_fifo_polygon_converter.o \
serial.o \
dejavusansmono_mono.data.o
example/font_outline_punch_through.elf: LDSCRIPT = $(LIB)/alt.lds
@ -185,7 +182,6 @@ MACAW_CUBE_RENDER_TO_TEXTURE_OBJ = \
holly/region_array.o \
holly/background.o \
holly/ta_fifo_polygon_converter.o \
serial.o \
macaw.data.o
example/macaw_cube_render_to_texture.elf: LDSCRIPT = $(LIB)/alt.lds
@ -203,7 +199,7 @@ example/maple_device_request.elf: $(START_OBJ) $(MAPLE_DEVICE_REQUEST_OBJ)
MAPLE_CONTROLLER_OBJ = \
example/maple_controller.o \
vga.o \
serial.o \
sh7091/serial.o \
maple/maple.o
example/maple_controller.elf: LDSCRIPT = $(LIB)/alt.lds
@ -237,7 +233,6 @@ MAPLE_ANALOG_OBJ = \
holly/region_array.o \
holly/background.o \
holly/ta_fifo_polygon_converter.o \
serial.o \
maple/maple.o
example/maple_analog.elf: LDSCRIPT = $(LIB)/alt.lds

View File

@ -1,20 +1,22 @@
#include <cstdint>
#include "align.hpp"
#include "vga.hpp"
#include "holly.hpp"
#include "holly/texture_memory_alloc.hpp"
#include "holly/holly.hpp"
#include "holly/core.hpp"
#include "holly/core_bits.hpp"
#include "holly/ta_parameter.hpp"
#include "holly/ta_fifo_polygon_converter.hpp"
#include "holly/texture_memory_alloc.hpp"
#include "holly/ta_parameter.hpp"
#include "holly/ta_global_parameter.hpp"
#include "holly/ta_vertex_parameter.hpp"
#include "holly/ta_bits.hpp"
#include "holly/isp_tsp.hpp"
#include "memorymap.hpp"
#include "holly/background.hpp"
#include "holly/region_array.hpp"
#include "holly/ta_bits.hpp"
#include "twiddle.hpp"
#include "serial.hpp"
#include "sperrypc.hpp"
@ -92,25 +94,35 @@ constexpr uint32_t strip_length = (sizeof (strip_vertices)) / (sizeof (struct ve
uint32_t transform(uint32_t * ta_parameter_buf, const char * s, const uint32_t len)
{
auto parameter = ta_parameter_writer(ta_parameter_buf);
uint32_t texture_address = (offsetof (struct texture_memory_alloc, texture));
for (uint32_t string_ix = 0; string_ix < len; string_ix++) {
auto polygon = global_polygon_type_0(texture_address);
polygon.parameter_control_word = para_control::para_type::polygon_or_modifier_volume
const uint32_t parameter_control_word = para_control::para_type::polygon_or_modifier_volume
| para_control::list_type::opaque
| obj_control::col_type::packed_color
| obj_control::texture;
polygon.tsp_instruction_word = tsp_instruction_word::src_alpha_instr::one
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
| tsp_instruction_word::texture_u_size::_8 // 8px
| tsp_instruction_word::texture_v_size::_8; // 8px
| tsp_instruction_word::texture_u_size::from_int(8)
| tsp_instruction_word::texture_v_size::from_int(8);
polygon.texture_control_word = texture_control_word::pixel_format::_4bpp_palette
const uint32_t texture_address = (offsetof (struct texture_memory_alloc, texture));
const uint32_t texture_control_word = texture_control_word::pixel_format::_4bpp_palette
| texture_control_word::scan_order::twiddled
| texture_control_word::texture_address((texture_address + 8 * 8 * (s[string_ix] - ' ')) / 8);
parameter.append<global_polygon_type_0>() = polygon;
parameter.append<ta_global_parameter::polygon_type_0>() =
ta_global_parameter::polygon_type_0(parameter_control_word,
isp_tsp_instruction_word,
tsp_instruction_word,
texture_control_word,
0, // data_size_for_sort_dma
0 // next_address_for_sort_dma
);
for (uint32_t i = 0; i < strip_length; i++) {
bool end_of_strip = i == strip_length - 1;
@ -125,16 +137,18 @@ uint32_t transform(uint32_t * ta_parameter_buf, const char * s, const uint32_t l
y += 240.f;
z = 1.f / (z + 10.f);
parameter.append<vertex_polygon_type_3>() =
vertex_polygon_type_3(x, y, z,
parameter.append<ta_vertex_parameter::polygon_type_3>() =
ta_vertex_parameter::polygon_type_3(polygon_vertex_parameter_control_word(end_of_strip),
x, y, z,
strip_vertices[i].u,
strip_vertices[i].v,
0x00000000, // base_color
end_of_strip);
0, // base_color
0 // offset_color
);
}
}
parameter.append<global_end_of_list>() = global_end_of_list();
parameter.append<ta_global_parameter::end_of_list>() = ta_global_parameter::end_of_list(para_control::para_type::end_of_list);
return parameter.offset;
}
@ -236,8 +250,6 @@ void main()
, .punch_through = 0
};
constexpr uint32_t tiles = (640 / 32) * (320 / 32);
holly.SOFTRESET = softreset::pipeline_soft_reset
| softreset::ta_soft_reset;
holly.SOFTRESET = 0;
@ -251,8 +263,10 @@ void main()
const char ana[18] = "A from ana i know";
while (true) {
ta_polygon_converter_init(opb_size.total() * tiles, ta_alloc,
640, 480);
ta_polygon_converter_init(opb_size.total(),
ta_alloc,
640 / 32,
480 / 32);
uint32_t ta_parameter_size = transform(ta_parameter_buf, ana, 17);
ta_polygon_converter_transfer(ta_parameter_buf, ta_parameter_size);
ta_wait_opaque_list();

View File

@ -1,27 +1,27 @@
#include <cstdint>
#include "align.hpp"
#include "vga.hpp"
#include "holly.hpp"
#include "holly/texture_memory_alloc.hpp"
#include "holly/holly.hpp"
#include "holly/core.hpp"
#include "holly/core_bits.hpp"
#include "holly/ta_parameter.hpp"
#include "holly/ta_fifo_polygon_converter.hpp"
#include "holly/texture_memory_alloc.hpp"
#include "holly/ta_parameter.hpp"
#include "holly/ta_global_parameter.hpp"
#include "holly/ta_vertex_parameter.hpp"
#include "holly/ta_bits.hpp"
#include "holly/isp_tsp.hpp"
#include "memorymap.hpp"
#include "holly/background.hpp"
#include "holly/region_array.hpp"
#include "holly/ta_bits.hpp"
#include "twiddle.hpp"
#include "serial.hpp"
#include "palette.hpp"
#include "font/font.hpp"
#include "dejavusansmono.hpp"
#include "sperrypc.hpp"
struct vertex {
float x;
float y;
@ -58,27 +58,35 @@ uint32_t transform(ta_parameter_writer& parameter,
continue;
}
auto polygon = global_polygon_type_0(texture_address);
polygon.parameter_control_word = para_control::para_type::polygon_or_modifier_volume
const uint32_t parameter_control_word = para_control::para_type::polygon_or_modifier_volume
| para_control::list_type::translucent
| obj_control::col_type::packed_color
| obj_control::texture;
polygon.tsp_instruction_word = tsp_instruction_word::src_alpha_instr::src_alpha
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::src_alpha
| tsp_instruction_word::dst_alpha_instr::one
| tsp_instruction_word::fog_control::no_fog
| tsp_instruction_word::use_alpha
| tsp_instruction_word::texture_u_size::from_int(texture_width)
| tsp_instruction_word::texture_v_size::from_int(texture_height);
polygon.texture_control_word = texture_control_word::pixel_format::_4bpp_palette
const uint32_t texture_control_word = texture_control_word::pixel_format::_4bpp_palette
| texture_control_word::scan_order::twiddled
| texture_control_word::texture_address(texture_address / 8);
parameter.append<global_polygon_type_0>() = polygon;
parameter.append<ta_global_parameter::polygon_type_0>() =
ta_global_parameter::polygon_type_0(parameter_control_word,
isp_tsp_instruction_word,
tsp_instruction_word,
texture_control_word,
0, // data_size_for_sort_dma
0 // next_address_for_sort_dma
);
for (uint32_t i = 0; i < strip_length; i++) {
bool end_of_strip = i == strip_length - 1;
float x = strip_vertices[i].x;
float y = strip_vertices[i].y;
float z = strip_vertices[i].z;
@ -99,11 +107,14 @@ uint32_t transform(ta_parameter_writer& parameter,
u = u / static_cast<float>(texture_width);
v = v / static_cast<float>(texture_height);
parameter.append<vertex_polygon_type_3>() =
vertex_polygon_type_3(x, y, z,
bool end_of_strip = i == strip_length - 1;
parameter.append<ta_vertex_parameter::polygon_type_3>() =
ta_vertex_parameter::polygon_type_3(polygon_vertex_parameter_control_word(end_of_strip),
x, y, z,
u, v,
0x00000000, // base_color
end_of_strip);
0, // base_color
0 // offset_color
);
}
advance += glyph.metrics.horiAdvance;
@ -117,26 +128,34 @@ uint32_t transform2(ta_parameter_writer& parameter,
{
uint32_t texture_address = (offsetof (struct texture_memory_alloc, texture));
auto polygon = global_polygon_type_0(texture_address);
polygon.parameter_control_word = para_control::para_type::polygon_or_modifier_volume
const uint32_t parameter_control_word = para_control::para_type::polygon_or_modifier_volume
| para_control::list_type::translucent
| obj_control::col_type::packed_color
| obj_control::texture;
polygon.tsp_instruction_word = tsp_instruction_word::src_alpha_instr::src_alpha
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::src_alpha
| tsp_instruction_word::dst_alpha_instr::zero
| tsp_instruction_word::fog_control::no_fog
| tsp_instruction_word::texture_u_size::from_int(texture_width)
| tsp_instruction_word::texture_v_size::from_int(texture_height);
polygon.texture_control_word = texture_control_word::pixel_format::_4bpp_palette
const uint32_t texture_control_word = texture_control_word::pixel_format::_4bpp_palette
| texture_control_word::scan_order::twiddled
| texture_control_word::texture_address(texture_address / 8);
parameter.append<global_polygon_type_0>() = polygon;
parameter.append<ta_global_parameter::polygon_type_0>() =
ta_global_parameter::polygon_type_0(parameter_control_word,
isp_tsp_instruction_word,
tsp_instruction_word,
texture_control_word,
0, // data_size_for_sort_dma
0 // next_address_for_sort_dma
);
for (uint32_t i = 0; i < strip_length; i++) {
bool end_of_strip = i == strip_length - 1;
float x = strip_vertices[i].x;
float y = strip_vertices[i].y;
float z = strip_vertices[i].z;
@ -150,11 +169,14 @@ uint32_t transform2(ta_parameter_writer& parameter,
float u = strip_vertices[i].u;
float v = strip_vertices[i].v;
parameter.append<vertex_polygon_type_3>() =
vertex_polygon_type_3(x, y, z,
bool end_of_strip = i == strip_length - 1;
parameter.append<ta_vertex_parameter::polygon_type_3>() =
ta_vertex_parameter::polygon_type_3(polygon_vertex_parameter_control_word(end_of_strip),
x, y, z,
u, v,
0x00000000, // base_color
end_of_strip);
0, // base_color
0 // offset_color
);
}
return parameter.offset;
@ -230,8 +252,6 @@ void main()
, .punch_through = 0
};
constexpr uint32_t tiles = (640 / 32) * (320 / 32);
holly.SOFTRESET = softreset::pipeline_soft_reset
| softreset::ta_soft_reset;
holly.SOFTRESET = 0;
@ -246,8 +266,10 @@ void main()
const char cabal[27] = "where is this secret cabal";
while (true) {
ta_polygon_converter_init(opb_size.total() * tiles, ta_alloc,
640, 480);
ta_polygon_converter_init(opb_size.total(),
ta_alloc,
640 / 32,
480 / 32);
auto parameter = ta_parameter_writer(ta_parameter_buf);
@ -268,7 +290,7 @@ void main()
cabal, 26,
font->glyph_height * 1);
parameter.append<global_end_of_list>() = global_end_of_list();
parameter.append<ta_global_parameter::end_of_list>() = ta_global_parameter::end_of_list(para_control::para_type::end_of_list);
ta_polygon_converter_transfer(ta_parameter_buf, parameter.offset);
ta_wait_translucent_list();

View File

@ -1,27 +1,27 @@
#include <cstdint>
#include "align.hpp"
#include "vga.hpp"
#include "holly.hpp"
#include "holly/texture_memory_alloc.hpp"
#include "holly/holly.hpp"
#include "holly/core.hpp"
#include "holly/core_bits.hpp"
#include "holly/ta_parameter.hpp"
#include "holly/ta_fifo_polygon_converter.hpp"
#include "holly/texture_memory_alloc.hpp"
#include "holly/ta_parameter.hpp"
#include "holly/ta_global_parameter.hpp"
#include "holly/ta_vertex_parameter.hpp"
#include "holly/ta_bits.hpp"
#include "holly/isp_tsp.hpp"
#include "memorymap.hpp"
#include "holly/background.hpp"
#include "holly/region_array.hpp"
#include "holly/ta_bits.hpp"
#include "twiddle.hpp"
#include "serial.hpp"
#include "palette.hpp"
#include "font/font.hpp"
#include "dejavusansmono_mono.hpp"
#include "sperrypc.hpp"
struct vertex {
float x;
float y;
@ -58,27 +58,34 @@ uint32_t transform(ta_parameter_writer& parameter,
continue;
}
auto polygon = global_polygon_type_0(texture_address);
polygon.parameter_control_word = para_control::para_type::polygon_or_modifier_volume
const uint32_t parameter_control_word = para_control::para_type::polygon_or_modifier_volume
| para_control::list_type::punch_through
| obj_control::col_type::packed_color
| obj_control::texture;
polygon.tsp_instruction_word = tsp_instruction_word::src_alpha_instr::src_alpha
| tsp_instruction_word::dst_alpha_instr::one
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::src_alpha
| tsp_instruction_word::dst_alpha_instr::zero
| tsp_instruction_word::fog_control::no_fog
//| tsp_instruction_word::use_alpha
| tsp_instruction_word::texture_u_size::from_int(texture_width)
| tsp_instruction_word::texture_v_size::from_int(texture_height);
polygon.texture_control_word = texture_control_word::pixel_format::_4bpp_palette
const uint32_t texture_control_word = texture_control_word::pixel_format::_4bpp_palette
| texture_control_word::scan_order::twiddled
| texture_control_word::texture_address(texture_address / 8);
parameter.append<global_polygon_type_0>() = polygon;
parameter.append<ta_global_parameter::polygon_type_0>() =
ta_global_parameter::polygon_type_0(parameter_control_word,
isp_tsp_instruction_word,
tsp_instruction_word,
texture_control_word,
0, // data_size_for_sort_dma
0 // next_address_for_sort_dma
);
for (uint32_t i = 0; i < strip_length; i++) {
bool end_of_strip = i == strip_length - 1;
float x = strip_vertices[i].x;
float y = strip_vertices[i].y;
float z = strip_vertices[i].z;
@ -99,11 +106,14 @@ uint32_t transform(ta_parameter_writer& parameter,
u = u / static_cast<float>(texture_width);
v = v / static_cast<float>(texture_height);
parameter.append<vertex_polygon_type_3>() =
vertex_polygon_type_3(x, y, z,
bool end_of_strip = i == strip_length - 1;
parameter.append<ta_vertex_parameter::polygon_type_3>() =
ta_vertex_parameter::polygon_type_3(polygon_vertex_parameter_control_word(end_of_strip),
x, y, z,
u, v,
0x00000000, // base_color
end_of_strip);
0, // base_color
0 // offset_color
);
}
advance += glyph.metrics.horiAdvance;
@ -117,26 +127,34 @@ uint32_t transform2(ta_parameter_writer& parameter,
{
uint32_t texture_address = (offsetof (struct texture_memory_alloc, texture));
auto polygon = global_polygon_type_0(texture_address);
polygon.parameter_control_word = para_control::para_type::polygon_or_modifier_volume
const uint32_t parameter_control_word = para_control::para_type::polygon_or_modifier_volume
| para_control::list_type::opaque
| obj_control::col_type::packed_color
| obj_control::texture;
polygon.tsp_instruction_word = tsp_instruction_word::src_alpha_instr::src_alpha
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::src_alpha
| tsp_instruction_word::dst_alpha_instr::zero
| tsp_instruction_word::fog_control::no_fog
| tsp_instruction_word::texture_u_size::from_int(texture_width)
| tsp_instruction_word::texture_v_size::from_int(texture_height);
polygon.texture_control_word = texture_control_word::pixel_format::_4bpp_palette
const uint32_t texture_control_word = texture_control_word::pixel_format::_4bpp_palette
| texture_control_word::scan_order::twiddled
| texture_control_word::texture_address(texture_address / 8);
parameter.append<global_polygon_type_0>() = polygon;
parameter.append<ta_global_parameter::polygon_type_0>() =
ta_global_parameter::polygon_type_0(parameter_control_word,
isp_tsp_instruction_word,
tsp_instruction_word,
texture_control_word,
0, // data_size_for_sort_dma
0 // next_address_for_sort_dma
);
for (uint32_t i = 0; i < strip_length; i++) {
bool end_of_strip = i == strip_length - 1;
float x = strip_vertices[i].x;
float y = strip_vertices[i].y;
float z = strip_vertices[i].z;
@ -150,11 +168,14 @@ uint32_t transform2(ta_parameter_writer& parameter,
float u = strip_vertices[i].u;
float v = strip_vertices[i].v;
parameter.append<vertex_polygon_type_3>() =
vertex_polygon_type_3(x, y, z,
bool end_of_strip = i == strip_length - 1;
parameter.append<ta_vertex_parameter::polygon_type_3>() =
ta_vertex_parameter::polygon_type_3(polygon_vertex_parameter_control_word(end_of_strip),
x, y, z,
u, v,
0x00000000, // base_color
end_of_strip);
0, // base_color
0 // offset_color
);
}
return parameter.offset;
@ -234,8 +255,6 @@ void main()
, .punch_through = 16 * 4
};
constexpr uint32_t tiles = (640 / 32) * (320 / 32);
holly.SOFTRESET = softreset::pipeline_soft_reset
| softreset::ta_soft_reset;
holly.SOFTRESET = 0;
@ -251,15 +270,17 @@ void main()
const char cabal[27] = "where is this secret cabal";
while (true) {
ta_polygon_converter_init(opb_size.total() * tiles, ta_alloc,
640, 480);
ta_polygon_converter_init(opb_size.total(),
ta_alloc,
640 / 32,
480 / 32);
auto parameter = ta_parameter_writer(ta_parameter_buf);
transform2(parameter,
font->texture_width, font->texture_height);
parameter.append<global_end_of_list>() = global_end_of_list();
parameter.append<ta_global_parameter::end_of_list>() = ta_global_parameter::end_of_list(para_control::para_type::end_of_list);
transform(parameter,
font->texture_width, font->texture_height,
@ -275,7 +296,7 @@ void main()
cabal, 26,
font->glyph_height * 1);
parameter.append<global_end_of_list>() = global_end_of_list();
parameter.append<ta_global_parameter::end_of_list>() = ta_global_parameter::end_of_list(para_control::para_type::end_of_list);
ta_polygon_converter_transfer(ta_parameter_buf, parameter.offset);
ta_wait_punch_through_list();

View File

@ -1,19 +1,21 @@
#include <cstdint>
#include "align.hpp"
#include "vga.hpp"
#include "holly.hpp"
#include "holly/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_global_parameter.hpp"
#include "holly/ta_vertex_parameter.hpp"
#include "holly/isp_tsp.hpp"
#include "holly/ta_bits.hpp"
#include "holly/region_array.hpp"
#include "holly/background.hpp"
#include "holly/texture_memory_alloc.hpp"
#include "memorymap.hpp"
#include "serial.hpp"
#include "geometry/icosphere.hpp"
#include "geometry/suzanne.hpp"
@ -21,7 +23,7 @@
constexpr float half_degree = 0.01745329f / 2;
#define MODEL suzanne
#define MODEL icosphere
vec3 rotate(const vec3& vertex,
const float theta)
@ -61,16 +63,18 @@ void transform(ta_parameter_writer& parameter,
| 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,
parameter.append<ta_global_parameter::polygon_type_0>() =
ta_global_parameter::polygon_type_0(parameter_control_word,
isp_tsp_instruction_word,
tsp_instruction_word,
0);
0, // texture_control_word
0, // data_size_for_sort_dma
0 // next_address_for_sort_dma
);
auto& face = MODEL::faces[face_ix];
constexpr uint32_t strip_length = 3;
for (uint32_t i = 0; i < strip_length; i++) {
bool end_of_strip = i == strip_length - 1;
// world transform
uint32_t vertex_ix = face[i].vertex;
auto& vertex = MODEL::vertices[vertex_ix];
@ -130,13 +134,15 @@ void transform(ta_parameter_writer& parameter,
y += 240.f;
z = 1 / z;
parameter.append<vertex_polygon_type_1>() =
vertex_polygon_type_1(x, y, z,
bool end_of_strip = i == strip_length - 1;
parameter.append<ta_vertex_parameter::polygon_type_1>() =
ta_vertex_parameter::polygon_type_1(polygon_vertex_parameter_control_word(end_of_strip),
x, y, z,
color.w, // alpha
color.x, // r
color.y, // g
color.z, // b
end_of_strip);
color.z // b
);
}
}
@ -156,10 +162,14 @@ void transform2(ta_parameter_writer& parameter,
| 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,
parameter.append<ta_global_parameter::polygon_type_0>() =
ta_global_parameter::polygon_type_0(parameter_control_word,
isp_tsp_instruction_word,
tsp_instruction_word,
0);
0, // texture_control_word
0, // data_size_for_sort_dma
0 // next_address_for_sort_dma
);
constexpr vec3 triangle[] = {
{ 0.f, -1.f, 0.f},
@ -169,7 +179,6 @@ void transform2(ta_parameter_writer& parameter,
constexpr uint32_t strip_length = 3;
for (uint32_t i = 0; i < strip_length; i++) {
bool end_of_strip = i == strip_length - 1;
float x = triangle[i].x;
float y = triangle[i].y;
float z = triangle[i].z;
@ -196,13 +205,15 @@ void transform2(ta_parameter_writer& parameter,
y += 240.f;
z = 1 / z;
parameter.append<vertex_polygon_type_1>() =
vertex_polygon_type_1(x, y, z,
bool end_of_strip = i == strip_length - 1;
parameter.append<ta_vertex_parameter::polygon_type_1>() =
ta_vertex_parameter::polygon_type_1(polygon_vertex_parameter_control_word(end_of_strip),
x, y, z,
color.w, // alpha
color.x, // r
color.y, // g
color.z, // b
end_of_strip);
color.z // b
);
}
}
@ -285,7 +296,7 @@ void main()
transform2(parameter, lights[1], {0.f, 1.f, 0.f, 1.f});
transform2(parameter, lights[2], {0.f, 0.f, 1.f, 1.f});
parameter.append<global_end_of_list>() = global_end_of_list();
parameter.append<ta_global_parameter::end_of_list>() = ta_global_parameter::end_of_list(para_control::para_type::end_of_list);
ta_polygon_converter_transfer(ta_parameter_buf, parameter.offset);
ta_wait_opaque_list();
core_start_render(frame_ix, num_frames);

View File

@ -4,12 +4,15 @@
#include "vga.hpp"
#include "holly/texture_memory_alloc.hpp"
#include "holly.hpp"
#include "holly/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_global_parameter.hpp"
#include "holly/ta_vertex_parameter.hpp"
#include "holly/ta_bits.hpp"
#include "holly/isp_tsp.hpp"
#include "holly/region_array.hpp"
#include "holly/background.hpp"
#include "memorymap.hpp"
@ -42,12 +45,35 @@ uint32_t transform(uint32_t * ta_parameter_buf,
const uint32_t strip_length)
{
auto parameter = ta_parameter_writer(ta_parameter_buf);
uint32_t texture_address = (offsetof (struct texture_memory_alloc, texture));
parameter.append<global_polygon_type_0>() = global_polygon_type_0(texture_address);
const uint32_t parameter_control_word = para_control::para_type::polygon_or_modifier_volume
| para_control::list_type::opaque
| obj_control::col_type::packed_color
| obj_control::texture;
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
| tsp_instruction_word::texture_u_size::from_int(128)
| tsp_instruction_word::texture_v_size::from_int(128);
const uint32_t texture_address = (offsetof (struct texture_memory_alloc, texture));
const uint32_t texture_control_word = texture_control_word::pixel_format::_565
| texture_control_word::scan_order::non_twiddled
| texture_control_word::texture_address(texture_address / 8);
parameter.append<ta_global_parameter::polygon_type_0>() =
ta_global_parameter::polygon_type_0(parameter_control_word,
isp_tsp_instruction_word,
tsp_instruction_word,
texture_control_word,
0, // data_size_for_sort_dma
0 // next_address_for_sort_dma
);
for (uint32_t i = 0; i < strip_length; i++) {
bool end_of_strip = i == strip_length - 1;
float x = strip_vertices[i].x;
float y = strip_vertices[i].y;
float z = strip_vertices[i].z;
@ -62,15 +88,18 @@ uint32_t transform(uint32_t * ta_parameter_buf,
y += 240.f;
z = 1.f / (z + 10.f);
parameter.append<vertex_polygon_type_3>() =
vertex_polygon_type_3(x, y, z,
bool end_of_strip = i == strip_length - 1;
parameter.append<ta_vertex_parameter::polygon_type_3>() =
ta_vertex_parameter::polygon_type_3(polygon_vertex_parameter_control_word(end_of_strip),
x, y, z,
strip_vertices[i].u,
strip_vertices[i].v,
strip_vertices[i].color,
end_of_strip);
0 // offset_color
);
}
parameter.append<global_end_of_list>() = global_end_of_list();
parameter.append<ta_global_parameter::end_of_list>() = ta_global_parameter::end_of_list(para_control::para_type::end_of_list);
return parameter.offset;
}
@ -79,7 +108,7 @@ void init_texture_memory(const struct opb_size& opb_size)
{
auto mem = reinterpret_cast<volatile texture_memory_alloc *>(texture_memory32);
background_parameter(mem->background);
background_parameter(mem->background, 0xff00ff00);
region_array2(mem->region_array,
(offsetof (struct texture_memory_alloc, object_list)),
@ -128,8 +157,6 @@ void main()
, .punch_through = 0
};
constexpr uint32_t tiles = (640 / 32) * (320 / 32);
holly.SOFTRESET = softreset::pipeline_soft_reset
| softreset::ta_soft_reset;
holly.SOFTRESET = 0;
@ -141,7 +168,10 @@ void main()
constexpr uint32_t num_frames = 1;
while (true) {
ta_polygon_converter_init(opb_size.total() * tiles, ta_alloc);
ta_polygon_converter_init(opb_size.total(),
ta_alloc,
640 / 32,
480 / 32);
uint32_t ta_parameter_size = transform(ta_parameter_buf, strip_vertices, strip_length);
ta_polygon_converter_transfer(ta_parameter_buf, ta_parameter_size);
ta_wait_opaque_list();

View File

@ -1,21 +1,22 @@
#include <cstdint>
#include "align.hpp"
#include "vga.hpp"
#include "holly.hpp"
#include "holly/texture_memory_alloc.hpp"
#include "holly/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_global_parameter.hpp"
#include "holly/ta_vertex_parameter.hpp"
#include "holly/ta_bits.hpp"
#include "holly/isp_tsp.hpp"
#include "holly/region_array.hpp"
#include "holly/background.hpp"
#include "holly/texture_memory_alloc.hpp"
#include "memorymap.hpp"
#include "serial.hpp"
#include "macaw.hpp"
struct vertex {
@ -63,12 +64,35 @@ void transform(ta_parameter_writer& parameter,
const vertex * strip_vertices,
const uint32_t strip_length)
{
uint32_t texture_address = (offsetof (struct texture_memory_alloc, texture));
parameter.append<global_polygon_type_0>() = global_polygon_type_0();
const uint32_t parameter_control_word = para_control::para_type::polygon_or_modifier_volume
| para_control::list_type::opaque
| obj_control::col_type::packed_color
| obj_control::texture;
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
| tsp_instruction_word::texture_u_size::from_int(128)
| tsp_instruction_word::texture_v_size::from_int(128);
const uint32_t texture_address = (offsetof (struct texture_memory_alloc, texture));
const uint32_t texture_control_word = texture_control_word::pixel_format::_565
| texture_control_word::scan_order::non_twiddled
| texture_control_word::texture_address(texture_address / 8);
parameter.append<ta_global_parameter::polygon_type_0>() =
ta_global_parameter::polygon_type_0(parameter_control_word,
isp_tsp_instruction_word,
tsp_instruction_word,
texture_control_word,
0, // data_size_for_sort_dma
0 // next_address_for_sort_dma
);
for (uint32_t i = 0; i < strip_length; i++) {
bool end_of_strip = i == strip_length - 1;
float x = strip_vertices[i].x;
float y = strip_vertices[i].y;
float z = strip_vertices[i].z;
@ -98,12 +122,15 @@ void transform(ta_parameter_writer& parameter,
z = 1 / z;
parameter.append<vertex_polygon_type_0>() =
vertex_polygon_type_0(x, y, z,
//strip_vertices[i].u,
//strip_vertices[i].v,
color,
end_of_strip);
bool end_of_strip = i == strip_length - 1;
parameter.append<ta_vertex_parameter::polygon_type_3>() =
ta_vertex_parameter::polygon_type_3(polygon_vertex_parameter_control_word(end_of_strip),
x, y, z,
strip_vertices[i].u,
strip_vertices[i].v,
0, // base_color
0 // offset_color
);
}
}
@ -160,8 +187,6 @@ void main()
, .punch_through = 0
};
constexpr uint32_t tiles = (640 / 32) * (320 / 32);
holly.SOFTRESET = softreset::pipeline_soft_reset
| softreset::ta_soft_reset;
holly.SOFTRESET = 0;
@ -173,12 +198,16 @@ void main()
constexpr uint32_t num_frames = 1;
while (1) {
ta_polygon_converter_init(opb_size.total() * tiles, ta_alloc, 640, 480);
ta_polygon_converter_init(opb_size.total(),
ta_alloc,
640 / 32,
480 / 32);
auto parameter = ta_parameter_writer(ta_parameter_buf);
for (uint32_t i = 0; i < num_faces; i++) {
transform(parameter, cube_faces[i], 4);
}
parameter.append<global_end_of_list>() = global_end_of_list();
parameter.append<ta_global_parameter::end_of_list>() = ta_global_parameter::end_of_list(para_control::para_type::end_of_list);
ta_polygon_converter_transfer(ta_parameter_buf, parameter.offset);
ta_wait_opaque_list();
core_start_render(frame_ix, num_frames);

View File

@ -1,21 +1,22 @@
#include <cstdint>
#include "align.hpp"
#include "vga.hpp"
#include "holly.hpp"
#include "holly/texture_memory_alloc.hpp"
#include "holly/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_global_parameter.hpp"
#include "holly/ta_vertex_parameter.hpp"
#include "holly/ta_bits.hpp"
#include "holly/isp_tsp.hpp"
#include "holly/region_array.hpp"
#include "holly/background.hpp"
#include "holly/texture_memory_alloc.hpp"
#include "memorymap.hpp"
#include "serial.hpp"
#include "macaw.hpp"
struct vertex {
@ -67,51 +68,71 @@ void transform(ta_parameter_writer& parameter,
const uint32_t texture_address,
const uint32_t texture_width)
{
auto polygon = global_polygon_type_0(texture_address);
const uint32_t parameter_control_word = para_control::para_type::polygon_or_modifier_volume
| para_control::list_type::opaque
| obj_control::col_type::packed_color
| obj_control::texture;
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 texture_control_word = texture_control_word::pixel_format::_565
| texture_control_word::scan_order::non_twiddled
| texture_control_word::texture_address(texture_address / 8);
uint32_t tsp_instruction_word = 0;
switch (texture_width) {
case 32:
polygon.tsp_instruction_word = tsp_instruction_word::src_alpha_instr::one
tsp_instruction_word = tsp_instruction_word::src_alpha_instr::one
| tsp_instruction_word::dst_alpha_instr::zero
| tsp_instruction_word::fog_control::no_fog
| tsp_instruction_word::texture_u_size::_32
| tsp_instruction_word::texture_v_size::_32
| tsp_instruction_word::texture_u_size::from_int(32)
| tsp_instruction_word::texture_v_size::from_int(32)
| tsp_instruction_word::use_alpha;
break;
case 64:
polygon.tsp_instruction_word = tsp_instruction_word::src_alpha_instr::one
tsp_instruction_word = tsp_instruction_word::src_alpha_instr::one
| tsp_instruction_word::dst_alpha_instr::zero
| tsp_instruction_word::fog_control::no_fog
| tsp_instruction_word::texture_u_size::_64
| tsp_instruction_word::texture_v_size::_64
| tsp_instruction_word::texture_u_size::from_int(64)
| tsp_instruction_word::texture_v_size::from_int(64)
| tsp_instruction_word::use_alpha;
break;
case 128:
polygon.tsp_instruction_word = tsp_instruction_word::src_alpha_instr::one
tsp_instruction_word = tsp_instruction_word::src_alpha_instr::one
| tsp_instruction_word::dst_alpha_instr::zero
| tsp_instruction_word::fog_control::no_fog
| tsp_instruction_word::texture_u_size::_128
| tsp_instruction_word::texture_v_size::_128
| tsp_instruction_word::texture_u_size::from_int(128)
| tsp_instruction_word::texture_v_size::from_int(128)
| tsp_instruction_word::use_alpha;
break;
case 256:
polygon.tsp_instruction_word = tsp_instruction_word::src_alpha_instr::one
tsp_instruction_word = tsp_instruction_word::src_alpha_instr::one
| tsp_instruction_word::dst_alpha_instr::zero
| tsp_instruction_word::fog_control::no_fog
| tsp_instruction_word::texture_u_size::_256
| tsp_instruction_word::texture_v_size::_256
| tsp_instruction_word::texture_u_size::from_int(256)
| tsp_instruction_word::texture_v_size::from_int(256)
| tsp_instruction_word::use_alpha;
break;
case 512:
polygon.tsp_instruction_word = tsp_instruction_word::src_alpha_instr::one
tsp_instruction_word = tsp_instruction_word::src_alpha_instr::one
| tsp_instruction_word::dst_alpha_instr::zero
| tsp_instruction_word::fog_control::no_fog
| tsp_instruction_word::texture_u_size::_512
| tsp_instruction_word::texture_v_size::_512
| tsp_instruction_word::texture_u_size::from_int(512)
| tsp_instruction_word::texture_v_size::from_int(512)
| tsp_instruction_word::use_alpha;
break;
default: break;
}
parameter.append<global_polygon_type_0>() = polygon;
parameter.append<ta_global_parameter::polygon_type_0>() =
ta_global_parameter::polygon_type_0(parameter_control_word,
isp_tsp_instruction_word,
tsp_instruction_word,
texture_control_word,
0, // data_size_for_sort_dma
0 // next_address_for_sort_dma
);
for (uint32_t i = 0; i < strip_length; i++) {
bool end_of_strip = i == strip_length - 1;
@ -144,12 +165,14 @@ void transform(ta_parameter_writer& parameter,
z = 1 / z;
parameter.append<vertex_polygon_type_3>() =
vertex_polygon_type_3(x, y, z,
parameter.append<ta_vertex_parameter::polygon_type_3>() =
ta_vertex_parameter::polygon_type_3(polygon_vertex_parameter_control_word(end_of_strip),
x, y, z,
strip_vertices[i].u,
strip_vertices[i].v,
color,
end_of_strip);
0, // base_color
0 // offset_color
);
}
}
@ -186,9 +209,10 @@ void render(const uint32_t width, const uint32_t height,
const uint32_t texture_width,
uint32_t * ta_parameter_buf)
{
const uint32_t tiles = (width / 32) * (height / 32);
ta_polygon_converter_init(opb_size.total() * tiles, ta_alloc,
width, height);
ta_polygon_converter_init(opb_size.total(),
ta_alloc,
width / 32,
height / 32);
auto parameter = ta_parameter_writer(ta_parameter_buf);
for (uint32_t i = 0; i < num_faces; i++) {
@ -197,7 +221,7 @@ void render(const uint32_t width, const uint32_t height,
texture_address,
texture_width);
}
parameter.append<global_end_of_list>() = global_end_of_list();
parameter.append<ta_global_parameter::end_of_list>() = ta_global_parameter::end_of_list(para_control::para_type::end_of_list);
ta_polygon_converter_transfer(ta_parameter_buf, parameter.offset);
ta_wait_opaque_list();
}

View File

@ -4,12 +4,15 @@
#include "vga.hpp"
#include "holly/texture_memory_alloc.hpp"
#include "holly.hpp"
#include "holly/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_global_parameter.hpp"
#include "holly/ta_vertex_parameter.hpp"
#include "holly/ta_bits.hpp"
#include "holly/isp_tsp.hpp"
#include "holly/region_array.hpp"
#include "holly/background.hpp"
#include "memorymap.hpp"
@ -43,16 +46,35 @@ uint32_t transform(uint32_t * ta_parameter_buf,
const uint32_t strip_length)
{
auto parameter = ta_parameter_writer(ta_parameter_buf);
uint32_t texture_address = (offsetof (struct texture_memory_alloc, texture));
auto polygon = global_polygon_type_0(texture_address);
polygon.texture_control_word = texture_control_word::pixel_format::_565
const uint32_t parameter_control_word = para_control::para_type::polygon_or_modifier_volume
| para_control::list_type::opaque
| obj_control::col_type::packed_color
| obj_control::texture;
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
| tsp_instruction_word::texture_u_size::from_int(128)
| tsp_instruction_word::texture_v_size::from_int(128);
const uint32_t texture_address = (offsetof (struct texture_memory_alloc, texture));
const uint32_t texture_control_word = texture_control_word::pixel_format::_565
| texture_control_word::scan_order::twiddled
| texture_control_word::texture_address(texture_address / 8);
parameter.append<global_polygon_type_0>() = polygon;
parameter.append<ta_global_parameter::polygon_type_0>() =
ta_global_parameter::polygon_type_0(parameter_control_word,
isp_tsp_instruction_word,
tsp_instruction_word,
texture_control_word,
0, // data_size_for_sort_dma
0 // next_address_for_sort_dma
);
for (uint32_t i = 0; i < strip_length; i++) {
bool end_of_strip = i == strip_length - 1;
float x = strip_vertices[i].x;
float y = strip_vertices[i].y;
float z = strip_vertices[i].z;
@ -67,15 +89,18 @@ uint32_t transform(uint32_t * ta_parameter_buf,
y += 240.f;
z = 1.f / (z + 10.f);
parameter.append<vertex_polygon_type_3>() =
vertex_polygon_type_3(x, y, z,
bool end_of_strip = i == strip_length - 1;
parameter.append<ta_vertex_parameter::polygon_type_3>() =
ta_vertex_parameter::polygon_type_3(polygon_vertex_parameter_control_word(end_of_strip),
x, y, z,
strip_vertices[i].u,
strip_vertices[i].v,
strip_vertices[i].color,
end_of_strip);
0 // offset_color
);
}
parameter.append<global_end_of_list>() = global_end_of_list();
parameter.append<ta_global_parameter::end_of_list>() = ta_global_parameter::end_of_list(para_control::para_type::end_of_list);
return parameter.offset;
}
@ -84,7 +109,7 @@ void init_texture_memory(const struct opb_size& opb_size)
{
auto mem = reinterpret_cast<volatile texture_memory_alloc *>(texture_memory32);
background_parameter(mem->background);
background_parameter(mem->background, 0xff00ff00);
region_array2(mem->region_array,
(offsetof (struct texture_memory_alloc, object_list)),
@ -132,8 +157,6 @@ void main()
, .punch_through = 0
};
constexpr uint32_t tiles = (640 / 32) * (320 / 32);
holly.SOFTRESET = softreset::pipeline_soft_reset
| softreset::ta_soft_reset;
holly.SOFTRESET = 0;
@ -145,7 +168,10 @@ void main()
constexpr uint32_t num_frames = 1;
while (true) {
ta_polygon_converter_init(opb_size.total() * tiles, ta_alloc);
ta_polygon_converter_init(opb_size.total(),
ta_alloc,
640 / 32,
480 / 32);
uint32_t ta_parameter_size = transform(ta_parameter_buf, strip_vertices, strip_length);
ta_polygon_converter_transfer(ta_parameter_buf, ta_parameter_size);
ta_wait_opaque_list();

View File

@ -4,17 +4,20 @@
#include "align.hpp"
#include "vga.hpp"
#include "holly.hpp"
#include "holly/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_vertex_parameter.hpp"
#include "holly/ta_global_parameter.hpp"
#include "holly/ta_bits.hpp"
#include "holly/isp_tsp.hpp"
#include "holly/region_array.hpp"
#include "holly/background.hpp"
#include "holly/texture_memory_alloc.hpp"
#include "memorymap.hpp"
#include "serial.hpp"
#include "sh7091/serial.hpp"
#include "geometry/border.hpp"
#include "geometry/circle.hpp"
@ -57,15 +60,6 @@ void do_get_condition(uint32_t * command_buf,
return;
}
/*
bool a = ft0::data_transfer::digital_button::a(data_fields.data.digital_button);
if (a == 0) {
serial::string("port ");
serial::integer<uint8_t>(port);
serial::string(" `a` press ");
serial::integer<uint8_t>(a);
}
*/
data[port].analog_axis_3 = data_fields.data.analog_axis_3;
data[port].analog_axis_4 = data_fields.data.analog_axis_4;
}
@ -73,7 +67,7 @@ void do_get_condition(uint32_t * command_buf,
void transform(ta_parameter_writer& parameter,
const vec3 * vertices,
const face& face,
const face_vn& face,
const vec4& color,
const vec3& position,
const float scale
@ -91,14 +85,17 @@ void transform(ta_parameter_writer& parameter,
| 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,
parameter.append<ta_global_parameter::polygon_type_0>() =
ta_global_parameter::polygon_type_0(parameter_control_word,
isp_tsp_instruction_word,
tsp_instruction_word,
0);
0, // texture_control_word
0, // data_size_for_sort_dma
0 // next_address_for_sort_dma
);
constexpr uint32_t strip_length = 3;
for (uint32_t i = 0; i < strip_length; i++) {
bool end_of_strip = i == strip_length - 1;
// world transform
uint32_t vertex_ix = face[i].vertex;
@ -131,13 +128,16 @@ void transform(ta_parameter_writer& parameter,
y += 240.f;
z = 1 / z;
parameter.append<vertex_polygon_type_1>() =
vertex_polygon_type_1(x, y, z,
bool end_of_strip = i == strip_length - 1;
parameter.append<ta_vertex_parameter::polygon_type_1>() =
ta_vertex_parameter::polygon_type_1(polygon_vertex_parameter_control_word(end_of_strip),
x, y, z,
color.w, // alpha
color.x, // r
color.y, // g
color.z, // b
end_of_strip);
color.z // b
);
}
}
@ -223,7 +223,7 @@ void main()
);
}
parameter.append<global_end_of_list>() = global_end_of_list();
parameter.append<ta_global_parameter::end_of_list>() = ta_global_parameter::end_of_list(para_control::para_type::end_of_list);
ta_polygon_converter_transfer(ta_parameter_buf, parameter.offset);
ta_wait_opaque_list();
core_start_render(frame_ix, num_frames);

View File

@ -4,10 +4,11 @@
#include "align.hpp"
#include "maple/maple.hpp"
#include "maple/maple_impl.hpp"
#include "maple/maple_bus_bits.hpp"
#include "maple/maple_bus_commands.hpp"
#include "maple/maple_bus_ft0.hpp"
#include "serial.hpp"
#include "sh7091/serial.hpp"
uint32_t _command_buf[1024 / 4 + 32] = {0};
uint32_t _receive_buf[1024 / 4 + 32] = {0};
@ -47,10 +48,11 @@ void do_get_condition(uint32_t port)
std::byteswap(function_type::controller));
maple::dma_start(command_buf);
using response_type = struct maple::command_response<data_transfer::data_fields<struct ft0::data_transfer::data_format>>;
auto response = reinterpret_cast<response_type *>(receive_buf);
using response_type = data_transfer<ft0::data_transfer::data_format>;
using command_response_type = struct maple::command_response<response_type::data_fields>;
auto response = reinterpret_cast<command_response_type *>(receive_buf);
auto& bus_data = response->bus_data;
if (bus_data.command_code != data_transfer::command_code) {
if (bus_data.command_code != response_type::command_code) {
return;
}
auto& data_fields = bus_data.data_fields;
@ -69,20 +71,17 @@ void do_get_condition(uint32_t port)
void do_device_request()
{
using response_type = struct maple::command_response<device_status::data_fields>;
constexpr uint32_t response_size = align_32byte(sizeof (response_type));
using command_type = device_request;
using response_type = device_status;
maple::init_host_command_all_ports(command_buf, receive_buf,
device_request::command_code,
(sizeof (device_request::data_fields)), // command_data_size
(sizeof (device_status::data_fields))); // response_data_size
maple::init_host_command_all_ports<command_type, response_type>(command_buf, receive_buf);
maple::dma_start(command_buf);
using command_response_type = struct maple::command_response<response_type::data_fields>;
auto response = reinterpret_cast<command_response_type *>(receive_buf);
for (uint8_t port = 0; port < 4; port++) {
auto response = reinterpret_cast<response_type *>(&receive_buf[response_size * port / 4]);
auto& bus_data = response->bus_data;
auto& data_fields = response->bus_data.data_fields;
auto& bus_data = response[port].bus_data;
auto& data_fields = response[port].bus_data.data_fields;
if (bus_data.command_code != device_status::command_code) {
// the controller is disconnected
} else {

View File

@ -3,15 +3,18 @@
#include "align.hpp"
#include "vga.hpp"
#include "holly/texture_memory_alloc.hpp"
#include "holly.hpp"
#include "holly/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_global_parameter.hpp"
#include "holly/ta_vertex_parameter.hpp"
#include "holly/isp_tsp.hpp"
#include "holly/ta_bits.hpp"
#include "holly/region_array.hpp"
#include "holly/background.hpp"
#include "holly/texture_memory_alloc.hpp"
#include "memorymap.hpp"
#include "macaw.hpp"
@ -43,29 +46,60 @@ uint32_t transform(uint32_t * ta_parameter_buf,
bool translucent)
{
auto parameter = ta_parameter_writer(ta_parameter_buf);
uint32_t texture_address = (offsetof (struct texture_memory_alloc, texture));
if (translucent) {
// translucent untextured
auto polygon = global_polygon_type_0();
polygon.parameter_control_word = para_control::para_type::polygon_or_modifier_volume
const uint32_t parameter_control_word = para_control::para_type::polygon_or_modifier_volume
| para_control::list_type::translucent
| obj_control::col_type::packed_color
| obj_control::gouraud;
polygon.tsp_instruction_word = tsp_instruction_word::src_alpha_instr::one
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::src_alpha
| tsp_instruction_word::fog_control::no_fog
| tsp_instruction_word::use_alpha;
parameter.append<global_polygon_type_0>() = polygon;
parameter.append<ta_global_parameter::polygon_type_0>() =
ta_global_parameter::polygon_type_0(parameter_control_word,
isp_tsp_instruction_word,
tsp_instruction_word,
0, // texture_control_word
0, // data_size_for_sort_dma
0 // next_address_for_sort_dma
);
} else {
// opaque textured
parameter.append<global_polygon_type_0>() = global_polygon_type_0(texture_address);
const uint32_t parameter_control_word = para_control::para_type::polygon_or_modifier_volume
| para_control::list_type::opaque
| obj_control::col_type::packed_color
| obj_control::texture;
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
| tsp_instruction_word::texture_u_size::from_int(128)
| tsp_instruction_word::texture_v_size::from_int(128);
const uint32_t texture_address = (offsetof (struct texture_memory_alloc, texture));
const uint32_t texture_control_word = texture_control_word::pixel_format::_565
| texture_control_word::scan_order::non_twiddled
| texture_control_word::texture_address(texture_address / 8);
parameter.append<ta_global_parameter::polygon_type_0>() =
ta_global_parameter::polygon_type_0(parameter_control_word,
isp_tsp_instruction_word,
tsp_instruction_word,
texture_control_word,
0, // data_size_for_sort_dma
0 // next_address_for_sort_dma
);
}
for (uint32_t i = 0; i < strip_length; i++) {
bool end_of_strip = i == strip_length - 1;
float x = strip_vertices[i].x;
float y = strip_vertices[i].y;
float z = strip_vertices[i].z;
@ -80,15 +114,18 @@ uint32_t transform(uint32_t * ta_parameter_buf,
y += 240.f;
z = 1.f / (z + 10.f);
parameter.append<vertex_polygon_type_3>() =
vertex_polygon_type_3(x, y, z,
bool end_of_strip = i == strip_length - 1;
parameter.append<ta_vertex_parameter::polygon_type_3>() =
ta_vertex_parameter::polygon_type_3(polygon_vertex_parameter_control_word(end_of_strip),
x, y, z,
strip_vertices[i].u,
strip_vertices[i].v,
strip_vertices[i].color,
end_of_strip);
0 // offset_color
);
}
parameter.append<global_end_of_list>() = global_end_of_list();
parameter.append<ta_global_parameter::end_of_list>() = ta_global_parameter::end_of_list(para_control::para_type::end_of_list);
return parameter.offset;
}
@ -97,7 +134,7 @@ void init_texture_memory(const struct opb_size& opb_size)
{
auto mem = reinterpret_cast<volatile texture_memory_alloc *>(texture_memory32);
background_parameter(mem->background);
background_parameter(mem->background, 0xffffff00);
region_array2(mem->region_array,
(offsetof (struct texture_memory_alloc, object_list)),
@ -142,8 +179,6 @@ void main()
, .punch_through = 0
};
constexpr uint32_t tiles = (640 / 32) * (320 / 32);
holly.SOFTRESET = softreset::pipeline_soft_reset
| softreset::ta_soft_reset;
holly.SOFTRESET = 0;
@ -155,7 +190,10 @@ void main()
constexpr uint32_t num_frames = 1;
while (true) {
ta_polygon_converter_init(opb_size.total() * tiles, ta_alloc);
ta_polygon_converter_init(opb_size.total(),
ta_alloc,
640 / 32,
480 / 32);
uint32_t ta_parameter_size = 0;
ta_parameter_size += transform(&ta_parameter_buf[ta_parameter_size / 4], strip_vertices, strip_length, 0);
ta_parameter_size += transform(&ta_parameter_buf[ta_parameter_size / 4], strip_vertices, strip_length, 1);

View File

@ -1,19 +1,21 @@
#include <cstdint>
#include "align.hpp"
#include "vga.hpp"
#include "holly.hpp"
#include "holly/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_global_parameter.hpp"
#include "holly/ta_vertex_parameter.hpp"
#include "holly/isp_tsp.hpp"
#include "holly/ta_bits.hpp"
#include "holly/region_array.hpp"
#include "holly/background.hpp"
#include "holly/texture_memory_alloc.hpp"
#include "memorymap.hpp"
#include "serial.hpp"
#include "geometry/wiffle.hpp"
#include "math/vec4.hpp"
@ -59,16 +61,19 @@ void transform(ta_parameter_writer& parameter,
| 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,
parameter.append<ta_global_parameter::polygon_type_0>() =
ta_global_parameter::polygon_type_0(parameter_control_word,
isp_tsp_instruction_word,
tsp_instruction_word,
0);
0, // texture_control_word
0, // data_size_for_sort_dma
0 // next_address_for_sort_dma
);
auto& face = MODEL::faces[face_ix];
constexpr uint32_t strip_length = 3;
for (uint32_t i = 0; i < strip_length; i++) {
bool end_of_strip = i == strip_length - 1;
// world transform
uint32_t vertex_ix = face[i].vertex;
auto& vertex = MODEL::vertices[vertex_ix];
@ -140,13 +145,15 @@ void transform(ta_parameter_writer& parameter,
y += 240.f;
z = 1 / z;
parameter.append<vertex_polygon_type_1>() =
vertex_polygon_type_1(x, y, z,
bool end_of_strip = i == strip_length - 1;
parameter.append<ta_vertex_parameter::polygon_type_1>() =
ta_vertex_parameter::polygon_type_1(polygon_vertex_parameter_control_word(end_of_strip),
x, y, z,
color.w, // alpha
color.x, // r
color.y, // g
color.z, // b
end_of_strip);
color.z // b
);
}
}
@ -166,10 +173,14 @@ void transform2(ta_parameter_writer& parameter,
| 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,
parameter.append<ta_global_parameter::polygon_type_0>() =
ta_global_parameter::polygon_type_0(parameter_control_word,
isp_tsp_instruction_word,
tsp_instruction_word,
0);
0, // texture_control_word
0, // data_size_for_sort_dma
0 // next_address_for_sort_dma
);
constexpr vec3 triangle[] = {
{ 0.f, -1.f, 0.f},
@ -179,7 +190,6 @@ void transform2(ta_parameter_writer& parameter,
constexpr uint32_t strip_length = 3;
for (uint32_t i = 0; i < strip_length; i++) {
bool end_of_strip = i == strip_length - 1;
float x = triangle[i].x;
float y = triangle[i].y;
float z = triangle[i].z;
@ -206,13 +216,15 @@ void transform2(ta_parameter_writer& parameter,
y += 240.f;
z = 1 / z;
parameter.append<vertex_polygon_type_1>() =
vertex_polygon_type_1(x, y, z,
bool end_of_strip = i == strip_length - 1;
parameter.append<ta_vertex_parameter::polygon_type_1>() =
ta_vertex_parameter::polygon_type_1(polygon_vertex_parameter_control_word(end_of_strip),
x, y, z,
color.w, // alpha
color.x, // r
color.y, // g
color.z, // b
end_of_strip);
color.z // b
);
}
}
@ -295,7 +307,7 @@ void main()
transform2(parameter, lights[1], {0.f, 1.f, 0.f, 1.f});
transform2(parameter, lights[2], {0.f, 0.f, 1.f, 1.f});
parameter.append<global_end_of_list>() = global_end_of_list();
parameter.append<ta_global_parameter::end_of_list>() = ta_global_parameter::end_of_list(para_control::para_type::end_of_list);
ta_polygon_converter_transfer(ta_parameter_buf, parameter.offset);
ta_wait_opaque_list();
core_start_render(frame_ix, num_frames);

View File

@ -22,7 +22,7 @@ namespace border {
{ -0.000000f, 1.000000f, -0.000000f },
};
constexpr face faces[] = {
constexpr face_vn faces[] = {
{{ 5, 0}, {11, 0}, { 7, 0}},
{{ 4, 0}, {10, 0}, { 9, 0}},
{{ 5, 0}, { 8, 0}, {11, 0}},
@ -37,6 +37,6 @@ namespace border {
{{ 1, 0}, { 3, 0}, { 6, 0}},
};
constexpr uint32_t num_faces = (sizeof (faces)) / (sizeof (face));
constexpr uint32_t num_faces = (sizeof (faces)) / (sizeof (face_vn));
}

View File

@ -42,7 +42,7 @@ namespace circle {
{ -0.000000f, 1.000000f, -0.000000f },
};
constexpr face faces[] = {
constexpr face_vn faces[] = {
{{31, 0}, { 0, 0}, { 1, 0}},
{{30, 0}, {31, 0}, { 1, 0}},
{{20, 0}, {13, 0}, {18, 0}},
@ -75,6 +75,6 @@ namespace circle {
{{16, 0}, {17, 0}, {15, 0}},
};
constexpr uint32_t num_faces = (sizeof (faces)) / (sizeof (face));
constexpr uint32_t num_faces = (sizeof (faces)) / (sizeof (face_vn));
}

View File

@ -30,7 +30,7 @@ namespace cube {
{ -0.000000f, 1.000000f, -0.000000f },
};
constexpr face faces[] = {
constexpr face_vtn faces[] = {
{{1, 0, 0}, {2, 0, 0}, {0, 1, 0}},
{{3, 1, 1}, {6, 2, 1}, {2, 3, 1}},
{{7, 0, 2}, {4, 3, 2}, {6, 1, 2}},
@ -45,6 +45,6 @@ namespace cube {
{{3, 1, 5}, {1, 0, 5}, {5, 2, 5}},
};
constexpr uint32_t num_faces = (sizeof (faces)) / (sizeof (face));
constexpr uint32_t num_faces = (sizeof (faces)) / (sizeof (face_vtn));
}

View File

@ -131,7 +131,7 @@ namespace icosphere {
{ 0.471300f, -0.661700f, 0.583100f },
};
constexpr face faces[] = {
constexpr face_vn faces[] = {
{{ 0, 0}, {13, 0}, {12, 0}},
{{ 1, 1}, {13, 1}, {15, 1}},
{{ 0, 2}, {12, 2}, {17, 2}},
@ -214,6 +214,6 @@ namespace icosphere {
{{13, 79}, { 1, 79}, {14, 79}},
};
constexpr uint32_t num_faces = (sizeof (faces)) / (sizeof (face));
constexpr uint32_t num_faces = (sizeof (faces)) / (sizeof (face_vn));
}

View File

@ -1457,92 +1457,92 @@ namespace suzanne {
{ 0.360400f, 0.828300f, 0.429000f },
};
constexpr face faces[] = {
{{46, 0}, { 2, 0}, {44, 0}},
{{ 3, 1}, {47, 1}, {45, 1}},
{{44, 2}, { 4, 2}, {42, 2}},
{{ 5, 3}, {45, 3}, {43, 3}},
constexpr face_vn faces[] = {
{{ 46, 0}, { 2, 0}, { 44, 0}},
{{ 3, 1}, { 47, 1}, { 45, 1}},
{{ 44, 2}, { 4, 2}, { 42, 2}},
{{ 5, 3}, { 45, 3}, { 43, 3}},
{{ 2, 4}, { 6, 4}, { 4, 4}},
{{ 7, 5}, { 3, 5}, { 5, 5}},
{{ 0, 6}, { 8, 6}, { 2, 6}},
{{ 9, 7}, { 1, 7}, { 3, 7}},
{{10, 8}, {14, 8}, { 8, 8}},
{{15, 9}, {11, 9}, { 9, 9}},
{{ 8, 10}, {16, 10}, { 6, 10}},
{{17, 11}, { 9, 11}, { 7, 11}},
{{20, 12}, {16, 12}, {14, 12}},
{{21, 13}, {17, 13}, {19, 13}},
{{22, 14}, {14, 14}, {12, 14}},
{{23, 15}, {15, 15}, {21, 15}},
{{22, 16}, {26, 16}, {20, 16}},
{{27, 17}, {23, 17}, {21, 17}},
{{26, 18}, {18, 18}, {20, 18}},
{{27, 19}, {19, 19}, {29, 19}},
{{32, 20}, {28, 20}, {26, 20}},
{{33, 21}, {29, 21}, {31, 21}},
{{34, 22}, {26, 22}, {24, 22}},
{{35, 23}, {27, 23}, {33, 23}},
{{36, 24}, {32, 24}, {34, 24}},
{{37, 25}, {33, 25}, {39, 25}},
{{38, 26}, {30, 26}, {32, 26}},
{{39, 27}, {31, 27}, {41, 27}},
{{44, 28}, {40, 28}, {38, 28}},
{{45, 29}, {41, 29}, {43, 29}},
{{46, 30}, {38, 30}, {36, 30}},
{{47, 31}, {39, 31}, {45, 31}},
{{36, 32}, {48, 32}, {46, 32}},
{{37, 33}, {49, 33}, {51, 33}},
{{34, 34}, {50, 34}, {36, 34}},
{{35, 35}, {51, 35}, {53, 35}},
{{24, 36}, {52, 36}, {34, 36}},
{{25, 37}, {53, 37}, {55, 37}},
{{22, 38}, {54, 38}, {24, 38}},
{{23, 39}, {55, 39}, {57, 39}},
{{22, 40}, {58, 40}, {56, 40}},
{{59, 41}, {23, 41}, {57, 41}},
{{12, 42}, {62, 42}, {58, 42}},
{{63, 43}, {13, 43}, {59, 43}},
{{10, 44}, {64, 44}, {62, 44}},
{{65, 45}, {11, 45}, {63, 45}},
{{ 0, 46}, {48, 46}, {64, 46}},
{{49, 47}, { 1, 47}, {65, 47}},
{{60, 48}, {64, 48}, {48, 48}},
{{49, 49}, {65, 49}, {61, 49}},
{{62, 50}, {64, 50}, {60, 50}},
{{61, 51}, {65, 51}, {63, 51}},
{{60, 52}, {58, 52}, {62, 52}},
{{63, 53}, {59, 53}, {61, 53}},
{{60, 54}, {56, 54}, {58, 54}},
{{59, 55}, {57, 55}, {61, 55}},
{{60, 56}, {54, 56}, {56, 56}},
{{57, 57}, {55, 57}, {61, 57}},
{{60, 58}, {52, 58}, {54, 58}},
{{55, 59}, {53, 59}, {61, 59}},
{{60, 60}, {50, 60}, {52, 60}},
{{53, 61}, {51, 61}, {61, 61}},
{{60, 62}, {48, 62}, {50, 62}},
{{51, 63}, {49, 63}, {61, 63}},
{{173, 64}, {90, 64}, {88, 64}},
{{174, 65}, {90, 65}, {175, 65}},
{{171, 66}, {88, 66}, {86, 66}},
{{172, 67}, {89, 67}, {174, 67}},
{{84, 68}, {171, 68}, {86, 68}},
{{172, 69}, {85, 69}, {87, 69}},
{{82, 70}, {169, 70}, {84, 70}},
{{170, 71}, {83, 71}, {85, 71}},
{{80, 72}, {167, 72}, {82, 72}},
{{168, 73}, {81, 73}, {83, 73}},
{{78, 74}, {145, 74}, {163, 74}},
{{146, 75}, {79, 75}, {164, 75}},
{{93, 76}, {145, 76}, {91, 76}},
{{94, 77}, {146, 77}, {148, 77}},
{{93, 78}, {149, 78}, {147, 78}},
{{150, 79}, {94, 79}, {148, 79}},
{{97, 80}, {149, 80}, {95, 80}},
{{98, 81}, {150, 81}, {152, 81}},
{{99, 82}, {151, 82}, {97, 82}},
{{ 10, 8}, { 14, 8}, { 8, 8}},
{{ 15, 9}, { 11, 9}, { 9, 9}},
{{ 8, 10}, { 16, 10}, { 6, 10}},
{{ 17, 11}, { 9, 11}, { 7, 11}},
{{ 20, 12}, { 16, 12}, { 14, 12}},
{{ 21, 13}, { 17, 13}, { 19, 13}},
{{ 22, 14}, { 14, 14}, { 12, 14}},
{{ 23, 15}, { 15, 15}, { 21, 15}},
{{ 22, 16}, { 26, 16}, { 20, 16}},
{{ 27, 17}, { 23, 17}, { 21, 17}},
{{ 26, 18}, { 18, 18}, { 20, 18}},
{{ 27, 19}, { 19, 19}, { 29, 19}},
{{ 32, 20}, { 28, 20}, { 26, 20}},
{{ 33, 21}, { 29, 21}, { 31, 21}},
{{ 34, 22}, { 26, 22}, { 24, 22}},
{{ 35, 23}, { 27, 23}, { 33, 23}},
{{ 36, 24}, { 32, 24}, { 34, 24}},
{{ 37, 25}, { 33, 25}, { 39, 25}},
{{ 38, 26}, { 30, 26}, { 32, 26}},
{{ 39, 27}, { 31, 27}, { 41, 27}},
{{ 44, 28}, { 40, 28}, { 38, 28}},
{{ 45, 29}, { 41, 29}, { 43, 29}},
{{ 46, 30}, { 38, 30}, { 36, 30}},
{{ 47, 31}, { 39, 31}, { 45, 31}},
{{ 36, 32}, { 48, 32}, { 46, 32}},
{{ 37, 33}, { 49, 33}, { 51, 33}},
{{ 34, 34}, { 50, 34}, { 36, 34}},
{{ 35, 35}, { 51, 35}, { 53, 35}},
{{ 24, 36}, { 52, 36}, { 34, 36}},
{{ 25, 37}, { 53, 37}, { 55, 37}},
{{ 22, 38}, { 54, 38}, { 24, 38}},
{{ 23, 39}, { 55, 39}, { 57, 39}},
{{ 22, 40}, { 58, 40}, { 56, 40}},
{{ 59, 41}, { 23, 41}, { 57, 41}},
{{ 12, 42}, { 62, 42}, { 58, 42}},
{{ 63, 43}, { 13, 43}, { 59, 43}},
{{ 10, 44}, { 64, 44}, { 62, 44}},
{{ 65, 45}, { 11, 45}, { 63, 45}},
{{ 0, 46}, { 48, 46}, { 64, 46}},
{{ 49, 47}, { 1, 47}, { 65, 47}},
{{ 60, 48}, { 64, 48}, { 48, 48}},
{{ 49, 49}, { 65, 49}, { 61, 49}},
{{ 62, 50}, { 64, 50}, { 60, 50}},
{{ 61, 51}, { 65, 51}, { 63, 51}},
{{ 60, 52}, { 58, 52}, { 62, 52}},
{{ 63, 53}, { 59, 53}, { 61, 53}},
{{ 60, 54}, { 56, 54}, { 58, 54}},
{{ 59, 55}, { 57, 55}, { 61, 55}},
{{ 60, 56}, { 54, 56}, { 56, 56}},
{{ 57, 57}, { 55, 57}, { 61, 57}},
{{ 60, 58}, { 52, 58}, { 54, 58}},
{{ 55, 59}, { 53, 59}, { 61, 59}},
{{ 60, 60}, { 50, 60}, { 52, 60}},
{{ 53, 61}, { 51, 61}, { 61, 61}},
{{ 60, 62}, { 48, 62}, { 50, 62}},
{{ 51, 63}, { 49, 63}, { 61, 63}},
{{173, 64}, { 90, 64}, { 88, 64}},
{{174, 65}, { 90, 65}, {175, 65}},
{{171, 66}, { 88, 66}, { 86, 66}},
{{172, 67}, { 89, 67}, {174, 67}},
{{ 84, 68}, {171, 68}, { 86, 68}},
{{172, 69}, { 85, 69}, { 87, 69}},
{{ 82, 70}, {169, 70}, { 84, 70}},
{{170, 71}, { 83, 71}, { 85, 71}},
{{ 80, 72}, {167, 72}, { 82, 72}},
{{168, 73}, { 81, 73}, { 83, 73}},
{{ 78, 74}, {145, 74}, {163, 74}},
{{146, 75}, { 79, 75}, {164, 75}},
{{ 93, 76}, {145, 76}, { 91, 76}},
{{ 94, 77}, {146, 77}, {148, 77}},
{{ 93, 78}, {149, 78}, {147, 78}},
{{150, 79}, { 94, 79}, {148, 79}},
{{ 97, 80}, {149, 80}, { 95, 80}},
{{ 98, 81}, {150, 81}, {152, 81}},
{{ 99, 82}, {151, 82}, { 97, 82}},
{{100, 83}, {152, 83}, {154, 83}},
{{101, 84}, {153, 84}, {99, 84}},
{{101, 84}, {153, 84}, { 99, 84}},
{{102, 85}, {154, 85}, {156, 85}},
{{101, 86}, {157, 86}, {155, 86}},
{{158, 87}, {102, 87}, {156, 87}},
@ -1550,8 +1550,8 @@ namespace suzanne {
{{106, 89}, {158, 89}, {160, 89}},
{{107, 90}, {159, 90}, {105, 90}},
{{108, 91}, {160, 91}, {162, 91}},
{{66, 92}, {161, 92}, {107, 92}},
{{66, 93}, {162, 93}, {67, 93}},
{{ 66, 92}, {161, 92}, {107, 92}},
{{ 66, 93}, {162, 93}, { 67, 93}},
{{127, 94}, {161, 94}, {109, 94}},
{{128, 95}, {162, 95}, {160, 95}},
{{127, 96}, {157, 96}, {159, 96}},
@ -1573,7 +1573,7 @@ namespace suzanne {
{{113, 111}, {176, 111}, {163, 111}},
{{176, 112}, {114, 112}, {164, 112}},
{{161, 113}, {111, 113}, {109, 113}},
{{162, 114}, {112, 114}, {67, 114}},
{{162, 114}, {112, 114}, { 67, 114}},
{{111, 115}, {177, 115}, {182, 115}},
{{177, 116}, {112, 116}, {183, 116}},
{{180, 117}, {177, 117}, {176, 117}},
@ -1590,24 +1590,24 @@ namespace suzanne {
{{168, 128}, {131, 128}, {185, 128}},
{{189, 129}, {186, 129}, {143, 129}},
{{189, 130}, {187, 130}, {188, 130}},
{{186, 131}, {68, 131}, {184, 131}},
{{187, 132}, {68, 132}, {188, 132}},
{{130, 133}, {68, 133}, {129, 133}},
{{131, 133}, {68, 133}, {185, 133}},
{{186, 131}, { 68, 131}, {184, 131}},
{{187, 132}, { 68, 132}, {188, 132}},
{{130, 133}, { 68, 133}, {129, 133}},
{{131, 133}, { 68, 133}, {185, 133}},
{{141, 134}, {190, 134}, {143, 134}},
{{191, 135}, {142, 135}, {144, 135}},
{{194, 136}, {141, 136}, {139, 136}},
{{195, 137}, {142, 137}, {193, 137}},
{{196, 138}, {139, 138}, {138, 138}},
{{197, 139}, {140, 139}, {195, 139}},
{{70, 140}, {138, 140}, {137, 140}},
{{70, 141}, {138, 141}, {197, 141}},
{{143, 142}, {69, 142}, {189, 142}},
{{144, 143}, {69, 143}, {191, 143}},
{{190, 144}, {207, 144}, {69, 144}},
{{ 70, 140}, {138, 140}, {137, 140}},
{{ 70, 141}, {138, 141}, {197, 141}},
{{143, 142}, { 69, 142}, {189, 142}},
{{144, 143}, { 69, 143}, {191, 143}},
{{190, 144}, {207, 144}, { 69, 144}},
{{191, 145}, {207, 145}, {206, 145}},
{{70, 146}, {199, 146}, {196, 146}},
{{200, 147}, {70, 147}, {197, 147}},
{{ 70, 146}, {199, 146}, {196, 146}},
{{200, 147}, { 70, 147}, {197, 147}},
{{196, 148}, {201, 148}, {194, 148}},
{{202, 149}, {197, 149}, {195, 149}},
{{201, 150}, {192, 150}, {194, 150}},
@ -1626,14 +1626,14 @@ namespace suzanne {
{{144, 163}, {211, 163}, {213, 163}},
{{186, 164}, {212, 164}, {143, 164}},
{{187, 165}, {213, 165}, {166, 165}},
{{208, 166}, {165, 166}, {80, 166}},
{{208, 166}, {165, 166}, { 80, 166}},
{{209, 167}, {166, 167}, {213, 167}},
{{214, 168}, {212, 168}, {208, 168}},
{{215, 169}, {213, 169}, {211, 169}},
{{78, 170}, {210, 170}, {214, 170}},
{{211, 171}, {79, 171}, {215, 171}},
{{ 78, 170}, {210, 170}, {214, 170}},
{{211, 171}, { 79, 171}, {215, 171}},
{{129, 172}, {221, 172}, {130, 172}},
{{129, 173}, {222, 173}, {71, 173}},
{{129, 173}, {222, 173}, { 71, 173}},
{{132, 174}, {221, 174}, {219, 174}},
{{222, 175}, {133, 175}, {220, 175}},
{{134, 176}, {219, 176}, {217, 176}},
@ -1646,8 +1646,8 @@ namespace suzanne {
{{227, 181}, {218, 181}, {229, 181}},
{{219, 140}, {224, 140}, {226, 140}},
{{225, 182}, {220, 182}, {227, 182}},
{{71, 183}, {224, 183}, {221, 183}},
{{71, 184}, {225, 184}, {223, 184}},
{{ 71, 183}, {224, 183}, {221, 183}},
{{ 71, 184}, {225, 184}, {223, 184}},
{{223, 185}, {228, 185}, {224, 185}},
{{229, 186}, {223, 186}, {225, 186}},
{{224, 187}, {228, 187}, {226, 187}},
@ -1704,74 +1704,74 @@ namespace suzanne {
{{282, 238}, {254, 238}, {260, 238}},
{{231, 239}, {279, 239}, {281, 239}},
{{280, 240}, {232, 240}, {282, 240}},
{{66, 241}, {283, 241}, {72, 241}},
{{284, 242}, {66, 242}, {72, 242}},
{{ 66, 241}, {283, 241}, { 72, 241}},
{{284, 242}, { 66, 242}, { 72, 242}},
{{107, 243}, {285, 243}, {283, 243}},
{{286, 244}, {108, 244}, {284, 244}},
{{103, 245}, {285, 245}, {105, 245}},
{{104, 246}, {286, 246}, {288, 246}},
{{101, 247}, {287, 247}, {103, 247}},
{{102, 248}, {288, 248}, {290, 248}},
{{99, 249}, {289, 249}, {101, 249}},
{{ 99, 249}, {289, 249}, {101, 249}},
{{100, 250}, {290, 250}, {292, 250}},
{{99, 251}, {293, 251}, {291, 251}},
{{ 99, 251}, {293, 251}, {291, 251}},
{{294, 252}, {100, 252}, {292, 252}},
{{95, 253}, {293, 253}, {97, 253}},
{{96, 254}, {294, 254}, {296, 254}},
{{95, 255}, {297, 255}, {295, 255}},
{{298, 256}, {96, 256}, {296, 256}},
{{93, 257}, {299, 257}, {297, 257}},
{{300, 258}, {94, 258}, {298, 258}},
{{ 95, 253}, {293, 253}, { 97, 253}},
{{ 96, 254}, {294, 254}, {296, 254}},
{{ 95, 255}, {297, 255}, {295, 255}},
{{298, 256}, { 96, 256}, {296, 256}},
{{ 93, 257}, {299, 257}, {297, 257}},
{{300, 258}, { 94, 258}, {298, 258}},
{{308, 259}, {337, 259}, {307, 259}},
{{308, 260}, {338, 260}, {328, 260}},
{{307, 261}, {335, 261}, {306, 261}},
{{307, 262}, {336, 262}, {338, 262}},
{{306, 263}, {339, 263}, {305, 263}},
{{306, 264}, {340, 264}, {336, 264}},
{{88, 265}, {305, 265}, {339, 265}},
{{305, 266}, {89, 266}, {340, 266}},
{{86, 267}, {339, 267}, {333, 267}},
{{340, 268}, {87, 268}, {334, 268}},
{{84, 269}, {333, 269}, {329, 269}},
{{334, 270}, {85, 270}, {330, 270}},
{{82, 271}, {329, 271}, {331, 271}},
{{330, 272}, {83, 272}, {332, 272}},
{{ 88, 265}, {305, 265}, {339, 265}},
{{305, 266}, { 89, 266}, {340, 266}},
{{ 86, 267}, {339, 267}, {333, 267}},
{{340, 268}, { 87, 268}, {334, 268}},
{{ 84, 269}, {333, 269}, {329, 269}},
{{334, 270}, { 85, 270}, {330, 270}},
{{ 82, 271}, {329, 271}, {331, 271}},
{{330, 272}, { 83, 272}, {332, 272}},
{{329, 273}, {337, 273}, {331, 273}},
{{338, 274}, {330, 274}, {332, 274}},
{{333, 275}, {335, 275}, {329, 275}},
{{334, 276}, {336, 276}, {340, 276}},
{{331, 277}, {327, 277}, {325, 277}},
{{332, 278}, {328, 278}, {338, 278}},
{{80, 279}, {331, 279}, {325, 279}},
{{332, 280}, {81, 280}, {326, 280}},
{{ 80, 279}, {331, 279}, {325, 279}},
{{332, 280}, { 81, 280}, {326, 280}},
{{341, 281}, {214, 281}, {208, 281}},
{{342, 282}, {215, 282}, {344, 282}},
{{325, 283}, {208, 283}, {80, 283}},
{{325, 283}, {208, 283}, { 80, 283}},
{{326, 284}, {209, 284}, {342, 284}},
{{214, 285}, {345, 285}, {78, 285}},
{{214, 285}, {345, 285}, { 78, 285}},
{{215, 286}, {346, 286}, {344, 286}},
{{345, 287}, {91, 287}, {78, 287}},
{{346, 288}, {92, 288}, {300, 288}},
{{323, 289}, {303, 289}, {76, 289}},
{{345, 287}, { 91, 287}, { 78, 287}},
{{346, 288}, { 92, 288}, {300, 288}},
{{323, 289}, {303, 289}, { 76, 289}},
{{324, 290}, {303, 290}, {352, 290}},
{{351, 291}, {77, 291}, {303, 291}},
{{352, 292}, {77, 292}, {350, 292}},
{{77, 293}, {347, 293}, {304, 293}},
{{348, 294}, {77, 294}, {304, 294}},
{{351, 291}, { 77, 291}, {303, 291}},
{{352, 292}, { 77, 292}, {350, 292}},
{{ 77, 293}, {347, 293}, {304, 293}},
{{348, 294}, { 77, 294}, {304, 294}},
{{304, 295}, {327, 295}, {308, 295}},
{{328, 296}, {304, 296}, {308, 296}},
{{327, 297}, {341, 297}, {325, 297}},
{{328, 298}, {342, 298}, {348, 298}},
{{295, 299}, {317, 299}, {309, 299}},
{{318, 300}, {296, 300}, {310, 300}},
{{315, 301}, {76, 301}, {75, 301}},
{{316, 302}, {76, 302}, {324, 302}},
{{315, 301}, { 76, 301}, { 75, 301}},
{{316, 302}, { 76, 302}, {324, 302}},
{{357, 303}, {302, 303}, {301, 303}},
{{358, 304}, {302, 304}, {356, 304}},
{{302, 305}, {353, 305}, {74, 305}},
{{354, 306}, {302, 306}, {74, 306}},
{{74, 307}, {315, 307}, {75, 307}},
{{316, 308}, {74, 308}, {75, 308}},
{{302, 305}, {353, 305}, { 74, 305}},
{{354, 306}, {302, 306}, { 74, 306}},
{{ 74, 307}, {315, 307}, { 75, 307}},
{{316, 308}, { 74, 308}, { 75, 308}},
{{291, 309}, {361, 309}, {363, 309}},
{{362, 310}, {292, 310}, {364, 310}},
{{363, 311}, {367, 311}, {365, 311}},
@ -1792,14 +1792,14 @@ namespace suzanne {
{{364, 326}, {358, 326}, {366, 326}},
{{291, 327}, {359, 327}, {289, 327}},
{{292, 328}, {360, 328}, {364, 328}},
{{359, 329}, {301, 329}, {73, 329}},
{{359, 329}, {301, 329}, { 73, 329}},
{{360, 330}, {301, 330}, {358, 330}},
{{285, 331}, {289, 331}, {283, 331}},
{{286, 332}, {290, 332}, {288, 332}},
{{283, 333}, {359, 333}, {73, 333}},
{{360, 334}, {284, 334}, {73, 334}},
{{72, 335}, {283, 335}, {73, 335}},
{{73, 336}, {284, 336}, {72, 336}},
{{283, 333}, {359, 333}, { 73, 333}},
{{360, 334}, {284, 334}, { 73, 334}},
{{ 72, 335}, {283, 335}, { 73, 335}},
{{ 73, 336}, {284, 336}, { 72, 336}},
{{295, 337}, {361, 337}, {293, 337}},
{{296, 338}, {362, 338}, {310, 338}},
{{309, 339}, {367, 339}, {361, 339}},
@ -1958,74 +1958,74 @@ namespace suzanne {
{{504, 487}, {314, 487}, {322, 487}},
{{319, 488}, {503, 488}, {389, 488}},
{{504, 489}, {320, 489}, {390, 489}},
{{46, 490}, { 0, 490}, { 2, 490}},
{{ 3, 491}, { 1, 491}, {47, 491}},
{{44, 492}, { 2, 492}, { 4, 492}},
{{ 5, 493}, { 3, 493}, {45, 493}},
{{ 46, 490}, { 0, 490}, { 2, 490}},
{{ 3, 491}, { 1, 491}, { 47, 491}},
{{ 44, 492}, { 2, 492}, { 4, 492}},
{{ 5, 493}, { 3, 493}, { 45, 493}},
{{ 2, 494}, { 8, 494}, { 6, 494}},
{{ 7, 495}, { 9, 495}, { 3, 495}},
{{ 0, 496}, {10, 496}, { 8, 496}},
{{ 9, 497}, {11, 497}, { 1, 497}},
{{10, 498}, {12, 498}, {14, 498}},
{{15, 499}, {13, 499}, {11, 499}},
{{ 8, 500}, {14, 500}, {16, 500}},
{{17, 501}, {15, 501}, { 9, 501}},
{{20, 502}, {18, 502}, {16, 502}},
{{21, 503}, {15, 503}, {17, 503}},
{{22, 504}, {20, 504}, {14, 504}},
{{23, 505}, {13, 505}, {15, 505}},
{{22, 506}, {24, 506}, {26, 506}},
{{27, 507}, {25, 507}, {23, 507}},
{{26, 508}, {28, 508}, {18, 508}},
{{27, 509}, {21, 509}, {19, 509}},
{{32, 510}, {30, 510}, {28, 510}},
{{33, 511}, {27, 511}, {29, 511}},
{{34, 512}, {32, 512}, {26, 512}},
{{35, 513}, {25, 513}, {27, 513}},
{{36, 514}, {38, 514}, {32, 514}},
{{37, 515}, {35, 515}, {33, 515}},
{{38, 516}, {40, 516}, {30, 516}},
{{39, 517}, {33, 517}, {31, 517}},
{{44, 518}, {42, 518}, {40, 518}},
{{45, 519}, {39, 519}, {41, 519}},
{{46, 520}, {44, 520}, {38, 520}},
{{47, 521}, {37, 521}, {39, 521}},
{{36, 522}, {50, 522}, {48, 522}},
{{37, 523}, {47, 523}, {49, 523}},
{{34, 524}, {52, 524}, {50, 524}},
{{35, 525}, {37, 525}, {51, 525}},
{{24, 526}, {54, 526}, {52, 526}},
{{25, 527}, {35, 527}, {53, 527}},
{{22, 528}, {56, 528}, {54, 528}},
{{23, 529}, {25, 529}, {55, 529}},
{{22, 530}, {12, 530}, {58, 530}},
{{59, 531}, {13, 531}, {23, 531}},
{{12, 532}, {10, 532}, {62, 532}},
{{63, 533}, {11, 533}, {13, 533}},
{{10, 534}, { 0, 534}, {64, 534}},
{{65, 535}, { 1, 535}, {11, 535}},
{{ 0, 536}, {46, 536}, {48, 536}},
{{49, 537}, {47, 537}, { 1, 537}},
{{173, 538}, {175, 538}, {90, 538}},
{{174, 539}, {89, 539}, {90, 539}},
{{171, 540}, {173, 540}, {88, 540}},
{{172, 541}, {87, 541}, {89, 541}},
{{84, 542}, {169, 542}, {171, 542}},
{{172, 543}, {170, 543}, {85, 543}},
{{82, 544}, {167, 544}, {169, 544}},
{{170, 545}, {168, 545}, {83, 545}},
{{80, 546}, {165, 546}, {167, 546}},
{{168, 547}, {166, 547}, {81, 547}},
{{78, 548}, {91, 548}, {145, 548}},
{{146, 549}, {92, 549}, {79, 549}},
{{93, 550}, {147, 550}, {145, 550}},
{{94, 551}, {92, 551}, {146, 551}},
{{93, 552}, {95, 552}, {149, 552}},
{{150, 553}, {96, 553}, {94, 553}},
{{97, 554}, {151, 554}, {149, 554}},
{{98, 555}, {96, 555}, {150, 555}},
{{99, 556}, {153, 556}, {151, 556}},
{{100, 557}, {98, 557}, {152, 557}},
{{ 0, 496}, { 10, 496}, { 8, 496}},
{{ 9, 497}, { 11, 497}, { 1, 497}},
{{ 10, 498}, { 12, 498}, { 14, 498}},
{{ 15, 499}, { 13, 499}, { 11, 499}},
{{ 8, 500}, { 14, 500}, { 16, 500}},
{{ 17, 501}, { 15, 501}, { 9, 501}},
{{ 20, 502}, { 18, 502}, { 16, 502}},
{{ 21, 503}, { 15, 503}, { 17, 503}},
{{ 22, 504}, { 20, 504}, { 14, 504}},
{{ 23, 505}, { 13, 505}, { 15, 505}},
{{ 22, 506}, { 24, 506}, { 26, 506}},
{{ 27, 507}, { 25, 507}, { 23, 507}},
{{ 26, 508}, { 28, 508}, { 18, 508}},
{{ 27, 509}, { 21, 509}, { 19, 509}},
{{ 32, 510}, { 30, 510}, { 28, 510}},
{{ 33, 511}, { 27, 511}, { 29, 511}},
{{ 34, 512}, { 32, 512}, { 26, 512}},
{{ 35, 513}, { 25, 513}, { 27, 513}},
{{ 36, 514}, { 38, 514}, { 32, 514}},
{{ 37, 515}, { 35, 515}, { 33, 515}},
{{ 38, 516}, { 40, 516}, { 30, 516}},
{{ 39, 517}, { 33, 517}, { 31, 517}},
{{ 44, 518}, { 42, 518}, { 40, 518}},
{{ 45, 519}, { 39, 519}, { 41, 519}},
{{ 46, 520}, { 44, 520}, { 38, 520}},
{{ 47, 521}, { 37, 521}, { 39, 521}},
{{ 36, 522}, { 50, 522}, { 48, 522}},
{{ 37, 523}, { 47, 523}, { 49, 523}},
{{ 34, 524}, { 52, 524}, { 50, 524}},
{{ 35, 525}, { 37, 525}, { 51, 525}},
{{ 24, 526}, { 54, 526}, { 52, 526}},
{{ 25, 527}, { 35, 527}, { 53, 527}},
{{ 22, 528}, { 56, 528}, { 54, 528}},
{{ 23, 529}, { 25, 529}, { 55, 529}},
{{ 22, 530}, { 12, 530}, { 58, 530}},
{{ 59, 531}, { 13, 531}, { 23, 531}},
{{ 12, 532}, { 10, 532}, { 62, 532}},
{{ 63, 533}, { 11, 533}, { 13, 533}},
{{ 10, 534}, { 0, 534}, { 64, 534}},
{{ 65, 535}, { 1, 535}, { 11, 535}},
{{ 0, 536}, { 46, 536}, { 48, 536}},
{{ 49, 537}, { 47, 537}, { 1, 537}},
{{173, 538}, {175, 538}, { 90, 538}},
{{174, 539}, { 89, 539}, { 90, 539}},
{{171, 540}, {173, 540}, { 88, 540}},
{{172, 541}, { 87, 541}, { 89, 541}},
{{ 84, 542}, {169, 542}, {171, 542}},
{{172, 543}, {170, 543}, { 85, 543}},
{{ 82, 544}, {167, 544}, {169, 544}},
{{170, 545}, {168, 545}, { 83, 545}},
{{ 80, 546}, {165, 546}, {167, 546}},
{{168, 547}, {166, 547}, { 81, 547}},
{{ 78, 548}, { 91, 548}, {145, 548}},
{{146, 549}, { 92, 549}, { 79, 549}},
{{ 93, 550}, {147, 550}, {145, 550}},
{{ 94, 551}, { 92, 551}, {146, 551}},
{{ 93, 552}, { 95, 552}, {149, 552}},
{{150, 553}, { 96, 553}, { 94, 553}},
{{ 97, 554}, {151, 554}, {149, 554}},
{{ 98, 555}, { 96, 555}, {150, 555}},
{{ 99, 556}, {153, 556}, {151, 556}},
{{100, 557}, { 98, 557}, {152, 557}},
{{101, 558}, {155, 558}, {153, 558}},
{{102, 559}, {100, 559}, {154, 559}},
{{101, 560}, {103, 560}, {157, 560}},
@ -2034,8 +2034,8 @@ namespace suzanne {
{{106, 563}, {104, 563}, {158, 563}},
{{107, 564}, {161, 564}, {159, 564}},
{{108, 565}, {106, 565}, {160, 565}},
{{66, 566}, {67, 566}, {161, 566}},
{{66, 567}, {108, 567}, {162, 567}},
{{ 66, 566}, { 67, 566}, {161, 566}},
{{ 66, 567}, {108, 567}, {162, 567}},
{{127, 568}, {159, 568}, {161, 568}},
{{128, 569}, {110, 569}, {162, 569}},
{{127, 570}, {178, 570}, {157, 570}},
@ -2056,10 +2056,10 @@ namespace suzanne {
{{146, 585}, {164, 585}, {114, 585}},
{{113, 586}, {180, 586}, {176, 586}},
{{176, 587}, {181, 587}, {114, 587}},
{{161, 588}, {67, 588}, {111, 588}},
{{161, 588}, { 67, 588}, {111, 588}},
{{162, 589}, {110, 589}, {112, 589}},
{{111, 590}, {67, 590}, {177, 590}},
{{177, 591}, {67, 591}, {112, 591}},
{{111, 590}, { 67, 590}, {177, 590}},
{{177, 591}, { 67, 591}, {112, 591}},
{{180, 592}, {182, 592}, {177, 592}},
{{181, 593}, {176, 593}, {177, 593}},
{{134, 594}, {136, 594}, {175, 594}},
@ -2074,23 +2074,23 @@ namespace suzanne {
{{168, 603}, {170, 603}, {131, 603}},
{{189, 130}, {188, 130}, {186, 130}},
{{189, 604}, {144, 604}, {187, 604}},
{{186, 132}, {188, 132}, {68, 132}},
{{187, 605}, {185, 605}, {68, 605}},
{{130, 133}, {184, 133}, {68, 133}},
{{131, 133}, {129, 133}, {68, 133}},
{{186, 132}, {188, 132}, { 68, 132}},
{{187, 605}, {185, 605}, { 68, 605}},
{{130, 133}, {184, 133}, { 68, 133}},
{{131, 133}, {129, 133}, { 68, 133}},
{{141, 606}, {192, 606}, {190, 606}},
{{191, 607}, {193, 607}, {142, 607}},
{{194, 608}, {192, 608}, {141, 608}},
{{195, 609}, {140, 609}, {142, 609}},
{{196, 610}, {194, 610}, {139, 610}},
{{197, 611}, {138, 611}, {140, 611}},
{{70, 612}, {196, 612}, {138, 612}},
{{143, 613}, {190, 613}, {69, 613}},
{{144, 614}, {189, 614}, {69, 614}},
{{ 70, 612}, {196, 612}, {138, 612}},
{{143, 613}, {190, 613}, { 69, 613}},
{{144, 614}, {189, 614}, { 69, 614}},
{{190, 144}, {205, 144}, {207, 144}},
{{191, 145}, {69, 145}, {207, 145}},
{{70, 615}, {198, 615}, {199, 615}},
{{200, 616}, {198, 616}, {70, 616}},
{{191, 145}, { 69, 145}, {207, 145}},
{{ 70, 615}, {198, 615}, {199, 615}},
{{200, 616}, {198, 616}, { 70, 616}},
{{196, 617}, {199, 617}, {201, 617}},
{{202, 618}, {200, 618}, {197, 618}},
{{201, 619}, {203, 619}, {192, 619}},
@ -2110,12 +2110,12 @@ namespace suzanne {
{{186, 633}, {165, 633}, {212, 633}},
{{187, 634}, {144, 634}, {213, 634}},
{{208, 635}, {212, 635}, {165, 635}},
{{209, 636}, {81, 636}, {166, 636}},
{{209, 636}, { 81, 636}, {166, 636}},
{{214, 637}, {210, 637}, {212, 637}},
{{215, 638}, {209, 638}, {213, 638}},
{{78, 639}, {163, 639}, {210, 639}},
{{211, 640}, {164, 640}, {79, 640}},
{{129, 641}, {71, 641}, {221, 641}},
{{ 78, 639}, {163, 639}, {210, 639}},
{{211, 640}, {164, 640}, { 79, 640}},
{{129, 641}, { 71, 641}, {221, 641}},
{{129, 642}, {131, 642}, {222, 642}},
{{132, 643}, {130, 643}, {221, 643}},
{{222, 644}, {131, 644}, {133, 644}},
@ -2129,8 +2129,8 @@ namespace suzanne {
{{227, 650}, {220, 650}, {218, 650}},
{{219, 140}, {221, 140}, {224, 140}},
{{225, 182}, {222, 182}, {220, 182}},
{{71, 183}, {223, 183}, {224, 183}},
{{71, 184}, {222, 184}, {225, 184}},
{{ 71, 183}, {223, 183}, {224, 183}},
{{ 71, 184}, {222, 184}, {225, 184}},
{{223, 651}, {230, 651}, {228, 651}},
{{229, 652}, {230, 652}, {223, 652}},
{{182, 653}, {180, 653}, {233, 653}},
@ -2185,74 +2185,74 @@ namespace suzanne {
{{282, 700}, {232, 700}, {254, 700}},
{{231, 701}, {233, 701}, {279, 701}},
{{280, 702}, {234, 702}, {232, 702}},
{{66, 703}, {107, 703}, {283, 703}},
{{284, 704}, {108, 704}, {66, 704}},
{{ 66, 703}, {107, 703}, {283, 703}},
{{284, 704}, {108, 704}, { 66, 704}},
{{107, 705}, {105, 705}, {285, 705}},
{{286, 706}, {106, 706}, {108, 706}},
{{103, 707}, {287, 707}, {285, 707}},
{{104, 708}, {106, 708}, {286, 708}},
{{101, 709}, {289, 709}, {287, 709}},
{{102, 710}, {104, 710}, {288, 710}},
{{99, 711}, {291, 711}, {289, 711}},
{{ 99, 711}, {291, 711}, {289, 711}},
{{100, 712}, {102, 712}, {290, 712}},
{{99, 713}, {97, 713}, {293, 713}},
{{294, 714}, {98, 714}, {100, 714}},
{{95, 715}, {295, 715}, {293, 715}},
{{96, 716}, {98, 716}, {294, 716}},
{{95, 717}, {93, 717}, {297, 717}},
{{298, 718}, {94, 718}, {96, 718}},
{{93, 719}, {91, 719}, {299, 719}},
{{300, 720}, {92, 720}, {94, 720}},
{{ 99, 713}, { 97, 713}, {293, 713}},
{{294, 714}, { 98, 714}, {100, 714}},
{{ 95, 715}, {295, 715}, {293, 715}},
{{ 96, 716}, { 98, 716}, {294, 716}},
{{ 95, 717}, { 93, 717}, {297, 717}},
{{298, 718}, { 94, 718}, { 96, 718}},
{{ 93, 719}, { 91, 719}, {299, 719}},
{{300, 720}, { 92, 720}, { 94, 720}},
{{308, 721}, {327, 721}, {337, 721}},
{{308, 722}, {307, 722}, {338, 722}},
{{307, 723}, {337, 723}, {335, 723}},
{{307, 724}, {306, 724}, {336, 724}},
{{306, 725}, {335, 725}, {339, 725}},
{{306, 726}, {305, 726}, {340, 726}},
{{88, 727}, {90, 727}, {305, 727}},
{{305, 728}, {90, 728}, {89, 728}},
{{86, 729}, {88, 729}, {339, 729}},
{{340, 730}, {89, 730}, {87, 730}},
{{84, 731}, {86, 731}, {333, 731}},
{{334, 732}, {87, 732}, {85, 732}},
{{82, 733}, {84, 733}, {329, 733}},
{{330, 734}, {85, 734}, {83, 734}},
{{ 88, 727}, { 90, 727}, {305, 727}},
{{305, 728}, { 90, 728}, { 89, 728}},
{{ 86, 729}, { 88, 729}, {339, 729}},
{{340, 730}, { 89, 730}, { 87, 730}},
{{ 84, 731}, { 86, 731}, {333, 731}},
{{334, 732}, { 87, 732}, { 85, 732}},
{{ 82, 733}, { 84, 733}, {329, 733}},
{{330, 734}, { 85, 734}, { 83, 734}},
{{329, 735}, {335, 735}, {337, 735}},
{{338, 736}, {336, 736}, {330, 736}},
{{333, 737}, {339, 737}, {335, 737}},
{{334, 738}, {330, 738}, {336, 738}},
{{331, 739}, {337, 739}, {327, 739}},
{{332, 740}, {326, 740}, {328, 740}},
{{80, 741}, {82, 741}, {331, 741}},
{{332, 742}, {83, 742}, {81, 742}},
{{ 80, 741}, { 82, 741}, {331, 741}},
{{332, 742}, { 83, 742}, { 81, 742}},
{{341, 743}, {343, 743}, {214, 743}},
{{342, 744}, {209, 744}, {215, 744}},
{{325, 745}, {341, 745}, {208, 745}},
{{326, 746}, {81, 746}, {209, 746}},
{{326, 746}, { 81, 746}, {209, 746}},
{{214, 747}, {343, 747}, {345, 747}},
{{215, 748}, {79, 748}, {346, 748}},
{{345, 749}, {299, 749}, {91, 749}},
{{346, 750}, {79, 750}, {92, 750}},
{{215, 748}, { 79, 748}, {346, 748}},
{{345, 749}, {299, 749}, { 91, 749}},
{{346, 750}, { 79, 750}, { 92, 750}},
{{323, 751}, {351, 751}, {303, 751}},
{{324, 752}, {76, 752}, {303, 752}},
{{351, 753}, {349, 753}, {77, 753}},
{{352, 754}, {303, 754}, {77, 754}},
{{77, 755}, {349, 755}, {347, 755}},
{{348, 756}, {350, 756}, {77, 756}},
{{324, 752}, { 76, 752}, {303, 752}},
{{351, 753}, {349, 753}, { 77, 753}},
{{352, 754}, {303, 754}, { 77, 754}},
{{ 77, 755}, {349, 755}, {347, 755}},
{{348, 756}, {350, 756}, { 77, 756}},
{{304, 757}, {347, 757}, {327, 757}},
{{328, 758}, {348, 758}, {304, 758}},
{{327, 759}, {347, 759}, {341, 759}},
{{328, 760}, {326, 760}, {342, 760}},
{{295, 761}, {297, 761}, {317, 761}},
{{318, 762}, {298, 762}, {296, 762}},
{{315, 763}, {323, 763}, {76, 763}},
{{316, 764}, {75, 764}, {76, 764}},
{{315, 763}, {323, 763}, { 76, 763}},
{{316, 764}, { 75, 764}, { 76, 764}},
{{357, 765}, {355, 765}, {302, 765}},
{{358, 766}, {301, 766}, {302, 766}},
{{302, 767}, {355, 767}, {353, 767}},
{{354, 768}, {356, 768}, {302, 768}},
{{74, 769}, {353, 769}, {315, 769}},
{{316, 770}, {354, 770}, {74, 770}},
{{ 74, 769}, {353, 769}, {315, 769}},
{{316, 770}, {354, 770}, { 74, 770}},
{{291, 771}, {293, 771}, {361, 771}},
{{362, 772}, {294, 772}, {292, 772}},
{{363, 773}, {361, 773}, {367, 773}},
@ -2274,7 +2274,7 @@ namespace suzanne {
{{291, 789}, {363, 789}, {359, 789}},
{{292, 790}, {290, 790}, {360, 790}},
{{359, 791}, {357, 791}, {301, 791}},
{{360, 792}, {73, 792}, {301, 792}},
{{360, 792}, { 73, 792}, {301, 792}},
{{285, 793}, {287, 793}, {289, 793}},
{{286, 794}, {284, 794}, {290, 794}},
{{283, 795}, {289, 795}, {359, 795}},
@ -2427,6 +2427,6 @@ namespace suzanne {
{{504, 940}, {322, 940}, {320, 940}},
};
constexpr uint32_t num_faces = (sizeof (faces)) / (sizeof (face));
constexpr uint32_t num_faces = (sizeof (faces)) / (sizeof (face_vn));
}

View File

@ -335,7 +335,7 @@ namespace wiffle {
{ 0.500000f, -0.500000f, -0.707100f },
};
constexpr face faces[] = {
constexpr face_vn faces[] = {
{{ 0, 0}, { 1, 0}, { 2, 0}},
{{ 1, 0}, { 3, 0}, { 2, 0}},
{{ 0, 0}, { 4, 0}, { 1, 0}},
@ -344,152 +344,152 @@ namespace wiffle {
{{ 0, 0}, { 7, 0}, { 4, 0}},
{{ 2, 0}, { 8, 0}, { 9, 0}},
{{ 5, 0}, { 8, 0}, { 2, 0}},
{{ 6, 0}, {10, 0}, { 7, 0}},
{{ 8, 0}, {11, 0}, { 9, 0}},
{{ 6, 0}, {12, 0}, {10, 0}},
{{11, 0}, {13, 0}, { 9, 0}},
{{12, 0}, {14, 0}, {15, 0}},
{{15, 0}, {14, 0}, {16, 0}},
{{ 6, 0}, {14, 0}, {12, 0}},
{{17, 0}, {18, 0}, {19, 0}},
{{19, 0}, {18, 0}, {13, 0}},
{{13, 0}, {18, 0}, { 9, 0}},
{{20, 0}, {21, 0}, {22, 0}},
{{22, 0}, {21, 0}, {17, 0}},
{{17, 0}, {21, 0}, {18, 0}},
{{16, 0}, {23, 0}, {24, 0}},
{{24, 0}, {23, 0}, {25, 0}},
{{25, 0}, {23, 0}, {20, 0}},
{{14, 0}, {23, 0}, {16, 0}},
{{20, 0}, {23, 0}, {21, 0}},
{{26, 1}, {21, 1}, {27, 1}},
{{28, 1}, {26, 1}, {27, 1}},
{{29, 1}, {21, 1}, {26, 1}},
{{30, 1}, {28, 1}, {27, 1}},
{{31, 1}, {18, 1}, {21, 1}},
{{31, 1}, {21, 1}, {29, 1}},
{{32, 1}, {27, 1}, {33, 1}},
{{32, 1}, {30, 1}, {27, 1}},
{{34, 1}, {18, 1}, {31, 1}},
{{35, 1}, {32, 1}, {33, 1}},
{{36, 1}, {18, 1}, {34, 1}},
{{37, 1}, {35, 1}, {33, 1}},
{{38, 1}, {39, 1}, {40, 1}},
{{38, 1}, {40, 1}, {37, 1}},
{{38, 1}, {37, 1}, {33, 1}},
{{41, 1}, {36, 1}, {42, 1}},
{{41, 1}, {42, 1}, {43, 1}},
{{41, 1}, {18, 1}, {36, 1}},
{{44, 1}, {45, 1}, {46, 1}},
{{44, 1}, {46, 1}, {39, 1}},
{{44, 1}, {39, 1}, {38, 1}},
{{47, 1}, {43, 1}, {48, 1}},
{{47, 1}, {48, 1}, {49, 1}},
{{47, 1}, {49, 1}, {45, 1}},
{{47, 1}, {41, 1}, {43, 1}},
{{47, 1}, {45, 1}, {44, 1}},
{{50, 2}, { 9, 2}, {18, 2}},
{{50, 2}, {51, 2}, { 9, 2}},
{{52, 2}, { 9, 2}, {51, 2}},
{{52, 2}, {50, 2}, {18, 2}},
{{41, 2}, { 9, 2}, {52, 2}},
{{41, 2}, {52, 2}, {18, 2}},
{{53, 3}, {54, 3}, { 2, 3}},
{{53, 3}, { 2, 3}, {55, 3}},
{{56, 3}, {55, 3}, { 2, 3}},
{{57, 3}, {54, 3}, {53, 3}},
{{58, 3}, { 2, 3}, { 9, 3}},
{{58, 3}, {56, 3}, { 2, 3}},
{{59, 3}, {60, 3}, {54, 3}},
{{59, 3}, {54, 3}, {57, 3}},
{{61, 3}, {58, 3}, { 9, 3}},
{{62, 3}, {60, 3}, {59, 3}},
{{63, 3}, {61, 3}, { 9, 3}},
{{64, 3}, {63, 3}, { 9, 3}},
{{65, 3}, {66, 3}, {67, 3}},
{{65, 3}, {68, 3}, {66, 3}},
{{65, 3}, {62, 3}, {68, 3}},
{{65, 3}, {60, 3}, {62, 3}},
{{41, 3}, {69, 3}, {64, 3}},
{{41, 3}, {70, 3}, {69, 3}},
{{41, 3}, {64, 3}, { 9, 3}},
{{47, 3}, {71, 3}, {70, 3}},
{{47, 3}, {70, 3}, {41, 3}},
{{72, 3}, {73, 3}, {71, 3}},
{{72, 3}, {74, 3}, {73, 3}},
{{72, 3}, {67, 3}, {74, 3}},
{{72, 3}, {65, 3}, {67, 3}},
{{72, 3}, {71, 3}, {47, 3}},
{{75, 4}, {54, 4}, {76, 4}},
{{76, 4}, {54, 4}, { 0, 4}},
{{76, 4}, { 2, 4}, {77, 4}},
{{77, 4}, { 2, 4}, {75, 4}},
{{ 0, 4}, { 2, 4}, {76, 4}},
{{75, 4}, { 2, 4}, {54, 4}},
{{ 6, 5}, {78, 5}, {79, 5}},
{{78, 5}, {80, 5}, {79, 5}},
{{ 6, 5}, {81, 5}, {78, 5}},
{{79, 5}, {82, 5}, {83, 5}},
{{80, 5}, {82, 5}, {79, 5}},
{{ 0, 5}, {84, 5}, { 6, 5}},
{{ 6, 5}, {84, 5}, {81, 5}},
{{82, 5}, {85, 5}, {83, 5}},
{{ 0, 5}, {86, 5}, {84, 5}},
{{85, 5}, {87, 5}, {83, 5}},
{{ 0, 5}, {88, 5}, {86, 5}},
{{87, 5}, {89, 5}, {83, 5}},
{{90, 5}, {91, 5}, {92, 5}},
{{92, 5}, {91, 5}, {89, 5}},
{{89, 5}, {91, 5}, {83, 5}},
{{88, 5}, {54, 5}, {93, 5}},
{{93, 5}, {54, 5}, {94, 5}},
{{ 0, 5}, {54, 5}, {88, 5}},
{{95, 5}, {96, 5}, {97, 5}},
{{97, 5}, {96, 5}, {90, 5}},
{{90, 5}, {96, 5}, {91, 5}},
{{94, 5}, {60, 5}, {98, 5}},
{{98, 5}, {60, 5}, {99, 5}},
{{99, 5}, {60, 5}, {95, 5}},
{{54, 5}, {60, 5}, {94, 5}},
{{95, 5}, {60, 5}, {96, 5}},
{{ 6, 0}, { 10, 0}, { 7, 0}},
{{ 8, 0}, { 11, 0}, { 9, 0}},
{{ 6, 0}, { 12, 0}, { 10, 0}},
{{ 11, 0}, { 13, 0}, { 9, 0}},
{{ 12, 0}, { 14, 0}, { 15, 0}},
{{ 15, 0}, { 14, 0}, { 16, 0}},
{{ 6, 0}, { 14, 0}, { 12, 0}},
{{ 17, 0}, { 18, 0}, { 19, 0}},
{{ 19, 0}, { 18, 0}, { 13, 0}},
{{ 13, 0}, { 18, 0}, { 9, 0}},
{{ 20, 0}, { 21, 0}, { 22, 0}},
{{ 22, 0}, { 21, 0}, { 17, 0}},
{{ 17, 0}, { 21, 0}, { 18, 0}},
{{ 16, 0}, { 23, 0}, { 24, 0}},
{{ 24, 0}, { 23, 0}, { 25, 0}},
{{ 25, 0}, { 23, 0}, { 20, 0}},
{{ 14, 0}, { 23, 0}, { 16, 0}},
{{ 20, 0}, { 23, 0}, { 21, 0}},
{{ 26, 1}, { 21, 1}, { 27, 1}},
{{ 28, 1}, { 26, 1}, { 27, 1}},
{{ 29, 1}, { 21, 1}, { 26, 1}},
{{ 30, 1}, { 28, 1}, { 27, 1}},
{{ 31, 1}, { 18, 1}, { 21, 1}},
{{ 31, 1}, { 21, 1}, { 29, 1}},
{{ 32, 1}, { 27, 1}, { 33, 1}},
{{ 32, 1}, { 30, 1}, { 27, 1}},
{{ 34, 1}, { 18, 1}, { 31, 1}},
{{ 35, 1}, { 32, 1}, { 33, 1}},
{{ 36, 1}, { 18, 1}, { 34, 1}},
{{ 37, 1}, { 35, 1}, { 33, 1}},
{{ 38, 1}, { 39, 1}, { 40, 1}},
{{ 38, 1}, { 40, 1}, { 37, 1}},
{{ 38, 1}, { 37, 1}, { 33, 1}},
{{ 41, 1}, { 36, 1}, { 42, 1}},
{{ 41, 1}, { 42, 1}, { 43, 1}},
{{ 41, 1}, { 18, 1}, { 36, 1}},
{{ 44, 1}, { 45, 1}, { 46, 1}},
{{ 44, 1}, { 46, 1}, { 39, 1}},
{{ 44, 1}, { 39, 1}, { 38, 1}},
{{ 47, 1}, { 43, 1}, { 48, 1}},
{{ 47, 1}, { 48, 1}, { 49, 1}},
{{ 47, 1}, { 49, 1}, { 45, 1}},
{{ 47, 1}, { 41, 1}, { 43, 1}},
{{ 47, 1}, { 45, 1}, { 44, 1}},
{{ 50, 2}, { 9, 2}, { 18, 2}},
{{ 50, 2}, { 51, 2}, { 9, 2}},
{{ 52, 2}, { 9, 2}, { 51, 2}},
{{ 52, 2}, { 50, 2}, { 18, 2}},
{{ 41, 2}, { 9, 2}, { 52, 2}},
{{ 41, 2}, { 52, 2}, { 18, 2}},
{{ 53, 3}, { 54, 3}, { 2, 3}},
{{ 53, 3}, { 2, 3}, { 55, 3}},
{{ 56, 3}, { 55, 3}, { 2, 3}},
{{ 57, 3}, { 54, 3}, { 53, 3}},
{{ 58, 3}, { 2, 3}, { 9, 3}},
{{ 58, 3}, { 56, 3}, { 2, 3}},
{{ 59, 3}, { 60, 3}, { 54, 3}},
{{ 59, 3}, { 54, 3}, { 57, 3}},
{{ 61, 3}, { 58, 3}, { 9, 3}},
{{ 62, 3}, { 60, 3}, { 59, 3}},
{{ 63, 3}, { 61, 3}, { 9, 3}},
{{ 64, 3}, { 63, 3}, { 9, 3}},
{{ 65, 3}, { 66, 3}, { 67, 3}},
{{ 65, 3}, { 68, 3}, { 66, 3}},
{{ 65, 3}, { 62, 3}, { 68, 3}},
{{ 65, 3}, { 60, 3}, { 62, 3}},
{{ 41, 3}, { 69, 3}, { 64, 3}},
{{ 41, 3}, { 70, 3}, { 69, 3}},
{{ 41, 3}, { 64, 3}, { 9, 3}},
{{ 47, 3}, { 71, 3}, { 70, 3}},
{{ 47, 3}, { 70, 3}, { 41, 3}},
{{ 72, 3}, { 73, 3}, { 71, 3}},
{{ 72, 3}, { 74, 3}, { 73, 3}},
{{ 72, 3}, { 67, 3}, { 74, 3}},
{{ 72, 3}, { 65, 3}, { 67, 3}},
{{ 72, 3}, { 71, 3}, { 47, 3}},
{{ 75, 4}, { 54, 4}, { 76, 4}},
{{ 76, 4}, { 54, 4}, { 0, 4}},
{{ 76, 4}, { 2, 4}, { 77, 4}},
{{ 77, 4}, { 2, 4}, { 75, 4}},
{{ 0, 4}, { 2, 4}, { 76, 4}},
{{ 75, 4}, { 2, 4}, { 54, 4}},
{{ 6, 5}, { 78, 5}, { 79, 5}},
{{ 78, 5}, { 80, 5}, { 79, 5}},
{{ 6, 5}, { 81, 5}, { 78, 5}},
{{ 79, 5}, { 82, 5}, { 83, 5}},
{{ 80, 5}, { 82, 5}, { 79, 5}},
{{ 0, 5}, { 84, 5}, { 6, 5}},
{{ 6, 5}, { 84, 5}, { 81, 5}},
{{ 82, 5}, { 85, 5}, { 83, 5}},
{{ 0, 5}, { 86, 5}, { 84, 5}},
{{ 85, 5}, { 87, 5}, { 83, 5}},
{{ 0, 5}, { 88, 5}, { 86, 5}},
{{ 87, 5}, { 89, 5}, { 83, 5}},
{{ 90, 5}, { 91, 5}, { 92, 5}},
{{ 92, 5}, { 91, 5}, { 89, 5}},
{{ 89, 5}, { 91, 5}, { 83, 5}},
{{ 88, 5}, { 54, 5}, { 93, 5}},
{{ 93, 5}, { 54, 5}, { 94, 5}},
{{ 0, 5}, { 54, 5}, { 88, 5}},
{{ 95, 5}, { 96, 5}, { 97, 5}},
{{ 97, 5}, { 96, 5}, { 90, 5}},
{{ 90, 5}, { 96, 5}, { 91, 5}},
{{ 94, 5}, { 60, 5}, { 98, 5}},
{{ 98, 5}, { 60, 5}, { 99, 5}},
{{ 99, 5}, { 60, 5}, { 95, 5}},
{{ 54, 5}, { 60, 5}, { 94, 5}},
{{ 95, 5}, { 60, 5}, { 96, 5}},
{{ 6, 6}, {100, 6}, {101, 6}},
{{ 6, 6}, {79, 6}, {100, 6}},
{{102, 6}, {14, 6}, {101, 6}},
{{100, 6}, {14, 6}, {102, 6}},
{{101, 6}, {14, 6}, { 6, 6}},
{{79, 6}, {14, 6}, {100, 6}},
{{79, 7}, {103, 7}, {14, 7}},
{{14, 7}, {103, 7}, {104, 7}},
{{104, 7}, {105, 7}, {14, 7}},
{{83, 7}, {106, 7}, {79, 7}},
{{79, 7}, {106, 7}, {103, 7}},
{{14, 7}, {107, 7}, {23, 7}},
{{105, 7}, {107, 7}, {14, 7}},
{{83, 7}, {108, 7}, {106, 7}},
{{107, 7}, {109, 7}, {23, 7}},
{{83, 7}, {110, 7}, {108, 7}},
{{109, 7}, {111, 7}, {23, 7}},
{{111, 7}, {112, 7}, {23, 7}},
{{ 6, 6}, { 79, 6}, {100, 6}},
{{102, 6}, { 14, 6}, {101, 6}},
{{100, 6}, { 14, 6}, {102, 6}},
{{101, 6}, { 14, 6}, { 6, 6}},
{{ 79, 6}, { 14, 6}, {100, 6}},
{{ 79, 7}, {103, 7}, { 14, 7}},
{{ 14, 7}, {103, 7}, {104, 7}},
{{104, 7}, {105, 7}, { 14, 7}},
{{ 83, 7}, {106, 7}, { 79, 7}},
{{ 79, 7}, {106, 7}, {103, 7}},
{{ 14, 7}, {107, 7}, { 23, 7}},
{{105, 7}, {107, 7}, { 14, 7}},
{{ 83, 7}, {108, 7}, {106, 7}},
{{107, 7}, {109, 7}, { 23, 7}},
{{ 83, 7}, {110, 7}, {108, 7}},
{{109, 7}, {111, 7}, { 23, 7}},
{{111, 7}, {112, 7}, { 23, 7}},
{{113, 7}, {114, 7}, {115, 7}},
{{116, 7}, {114, 7}, {113, 7}},
{{110, 7}, {114, 7}, {116, 7}},
{{83, 7}, {114, 7}, {110, 7}},
{{117, 7}, {27, 7}, {112, 7}},
{{112, 7}, {27, 7}, {23, 7}},
{{118, 7}, {33, 7}, {117, 7}},
{{119, 7}, {33, 7}, {118, 7}},
{{117, 7}, {33, 7}, {27, 7}},
{{ 83, 7}, {114, 7}, {110, 7}},
{{117, 7}, { 27, 7}, {112, 7}},
{{112, 7}, { 27, 7}, { 23, 7}},
{{118, 7}, { 33, 7}, {117, 7}},
{{119, 7}, { 33, 7}, {118, 7}},
{{117, 7}, { 33, 7}, { 27, 7}},
{{120, 7}, {121, 7}, {119, 7}},
{{122, 7}, {121, 7}, {120, 7}},
{{115, 7}, {121, 7}, {122, 7}},
{{119, 7}, {121, 7}, {33, 7}},
{{119, 7}, {121, 7}, { 33, 7}},
{{114, 7}, {121, 7}, {115, 7}},
{{123, 8}, {21, 8}, {23, 8}},
{{123, 8}, {23, 8}, {124, 8}},
{{125, 8}, {124, 8}, {23, 8}},
{{27, 8}, {125, 8}, {23, 8}},
{{27, 8}, {21, 8}, {123, 8}},
{{27, 8}, {123, 8}, {125, 8}},
{{123, 8}, { 21, 8}, { 23, 8}},
{{123, 8}, { 23, 8}, {124, 8}},
{{125, 8}, {124, 8}, { 23, 8}},
{{ 27, 8}, {125, 8}, { 23, 8}},
{{ 27, 8}, { 21, 8}, {123, 8}},
{{ 27, 8}, {123, 8}, {125, 8}},
{{ 4, 9}, { 7, 9}, {126, 9}},
{{ 4, 9}, {126, 9}, {127, 9}},
{{ 1, 10}, {127, 10}, {128, 10}},
@ -500,128 +500,128 @@ namespace wiffle {
{{ 5, 12}, { 3, 12}, {129, 12}},
{{ 8, 7}, {130, 7}, {131, 7}},
{{ 8, 7}, { 5, 7}, {130, 7}},
{{11, 13}, {132, 13}, {133, 13}},
{{11, 14}, {131, 14}, {132, 14}},
{{11, 14}, { 8, 14}, {131, 14}},
{{13, 15}, {133, 15}, {134, 15}},
{{13, 13}, {11, 13}, {133, 13}},
{{19, 16}, {134, 16}, {135, 16}},
{{19, 15}, {13, 15}, {134, 15}},
{{17, 17}, {135, 17}, {136, 17}},
{{17, 16}, {19, 16}, {135, 16}},
{{22, 17}, {17, 17}, {136, 17}},
{{20, 18}, {136, 18}, {137, 18}},
{{20, 18}, {22, 18}, {136, 18}},
{{25, 19}, {137, 19}, {138, 19}},
{{25, 19}, {20, 19}, {137, 19}},
{{24, 3}, {139, 3}, {140, 3}},
{{24, 20}, {138, 20}, {139, 20}},
{{24, 20}, {25, 20}, {138, 20}},
{{16, 3}, {24, 3}, {140, 3}},
{{15, 21}, {16, 21}, {140, 21}},
{{15, 21}, {140, 21}, {141, 21}},
{{12, 22}, {15, 22}, {141, 22}},
{{12, 23}, {142, 23}, {143, 23}},
{{12, 22}, {141, 22}, {142, 22}},
{{10, 23}, {12, 23}, {143, 23}},
{{ 7, 24}, {10, 24}, {143, 24}},
{{ 11, 13}, {132, 13}, {133, 13}},
{{ 11, 14}, {131, 14}, {132, 14}},
{{ 11, 14}, { 8, 14}, {131, 14}},
{{ 13, 15}, {133, 15}, {134, 15}},
{{ 13, 13}, { 11, 13}, {133, 13}},
{{ 19, 16}, {134, 16}, {135, 16}},
{{ 19, 15}, { 13, 15}, {134, 15}},
{{ 17, 17}, {135, 17}, {136, 17}},
{{ 17, 16}, { 19, 16}, {135, 16}},
{{ 22, 17}, { 17, 17}, {136, 17}},
{{ 20, 18}, {136, 18}, {137, 18}},
{{ 20, 18}, { 22, 18}, {136, 18}},
{{ 25, 19}, {137, 19}, {138, 19}},
{{ 25, 19}, { 20, 19}, {137, 19}},
{{ 24, 3}, {139, 3}, {140, 3}},
{{ 24, 20}, {138, 20}, {139, 20}},
{{ 24, 20}, { 25, 20}, {138, 20}},
{{ 16, 3}, { 24, 3}, {140, 3}},
{{ 15, 21}, { 16, 21}, {140, 21}},
{{ 15, 21}, {140, 21}, {141, 21}},
{{ 12, 22}, { 15, 22}, {141, 22}},
{{ 12, 23}, {142, 23}, {143, 23}},
{{ 12, 22}, {141, 22}, {142, 22}},
{{ 10, 23}, { 12, 23}, {143, 23}},
{{ 7, 24}, { 10, 24}, {143, 24}},
{{ 7, 24}, {143, 24}, {126, 24}},
{{144, 25}, {72, 25}, {47, 25}},
{{144, 25}, {145, 25}, {72, 25}},
{{146, 25}, {72, 25}, {145, 25}},
{{44, 25}, {146, 25}, {144, 25}},
{{44, 25}, {72, 25}, {146, 25}},
{{44, 25}, {144, 25}, {47, 25}},
{{147, 26}, {96, 26}, {65, 26}},
{{148, 26}, {147, 26}, {65, 26}},
{{149, 26}, {96, 26}, {147, 26}},
{{150, 26}, {148, 26}, {65, 26}},
{{72, 26}, {150, 26}, {65, 26}},
{{151, 26}, {91, 26}, {96, 26}},
{{151, 26}, {96, 26}, {149, 26}},
{{152, 26}, {150, 26}, {72, 26}},
{{153, 26}, {91, 26}, {151, 26}},
{{154, 26}, {152, 26}, {72, 26}},
{{155, 26}, {91, 26}, {153, 26}},
{{156, 26}, {154, 26}, {72, 26}},
{{144, 25}, { 72, 25}, { 47, 25}},
{{144, 25}, {145, 25}, { 72, 25}},
{{146, 25}, { 72, 25}, {145, 25}},
{{ 44, 25}, {146, 25}, {144, 25}},
{{ 44, 25}, { 72, 25}, {146, 25}},
{{ 44, 25}, {144, 25}, { 47, 25}},
{{147, 26}, { 96, 26}, { 65, 26}},
{{148, 26}, {147, 26}, { 65, 26}},
{{149, 26}, { 96, 26}, {147, 26}},
{{150, 26}, {148, 26}, { 65, 26}},
{{ 72, 26}, {150, 26}, { 65, 26}},
{{151, 26}, { 91, 26}, { 96, 26}},
{{151, 26}, { 96, 26}, {149, 26}},
{{152, 26}, {150, 26}, { 72, 26}},
{{153, 26}, { 91, 26}, {151, 26}},
{{154, 26}, {152, 26}, { 72, 26}},
{{155, 26}, { 91, 26}, {153, 26}},
{{156, 26}, {154, 26}, { 72, 26}},
{{114, 26}, {155, 26}, {157, 26}},
{{114, 26}, {157, 26}, {158, 26}},
{{114, 26}, {91, 26}, {155, 26}},
{{44, 26}, {159, 26}, {160, 26}},
{{44, 26}, {160, 26}, {156, 26}},
{{44, 26}, {156, 26}, {72, 26}},
{{38, 26}, {161, 26}, {162, 26}},
{{38, 26}, {162, 26}, {159, 26}},
{{38, 26}, {159, 26}, {44, 26}},
{{114, 26}, { 91, 26}, {155, 26}},
{{ 44, 26}, {159, 26}, {160, 26}},
{{ 44, 26}, {160, 26}, {156, 26}},
{{ 44, 26}, {156, 26}, { 72, 26}},
{{ 38, 26}, {161, 26}, {162, 26}},
{{ 38, 26}, {162, 26}, {159, 26}},
{{ 38, 26}, {159, 26}, { 44, 26}},
{{121, 26}, {158, 26}, {163, 26}},
{{121, 26}, {163, 26}, {164, 26}},
{{121, 26}, {164, 26}, {161, 26}},
{{121, 26}, {114, 26}, {158, 26}},
{{121, 26}, {161, 26}, {38, 26}},
{{165, 27}, {33, 27}, {121, 27}},
{{121, 26}, {161, 26}, { 38, 26}},
{{165, 27}, { 33, 27}, {121, 27}},
{{165, 27}, {121, 27}, {166, 27}},
{{167, 27}, {166, 27}, {121, 27}},
{{38, 27}, {167, 27}, {121, 27}},
{{38, 27}, {33, 27}, {165, 27}},
{{38, 27}, {165, 27}, {167, 27}},
{{168, 28}, {169, 28}, {39, 28}},
{{168, 28}, {39, 28}, {46, 28}},
{{170, 29}, {45, 29}, {49, 29}},
{{170, 30}, {46, 30}, {45, 30}},
{{170, 30}, {168, 30}, {46, 30}},
{{171, 29}, {170, 29}, {49, 29}},
{{172, 31}, {49, 31}, {48, 31}},
{{172, 31}, {171, 31}, {49, 31}},
{{173, 7}, {48, 7}, {43, 7}},
{{173, 7}, {172, 7}, {48, 7}},
{{174, 32}, {43, 32}, {42, 32}},
{{174, 32}, {173, 32}, {43, 32}},
{{175, 33}, {36, 33}, {34, 33}},
{{175, 34}, {42, 34}, {36, 34}},
{{175, 34}, {174, 34}, {42, 34}},
{{176, 35}, {34, 35}, {31, 35}},
{{176, 33}, {175, 33}, {34, 33}},
{{177, 35}, {176, 35}, {31, 35}},
{{178, 36}, {29, 36}, {26, 36}},
{{178, 37}, {31, 37}, {29, 37}},
{{178, 37}, {177, 37}, {31, 37}},
{{179, 36}, {178, 36}, {26, 36}},
{{180, 38}, {26, 38}, {28, 38}},
{{180, 38}, {179, 38}, {26, 38}},
{{181, 39}, {28, 39}, {30, 39}},
{{181, 39}, {180, 39}, {28, 39}},
{{182, 40}, {32, 40}, {35, 40}},
{{182, 3}, {30, 3}, {32, 3}},
{{182, 3}, {181, 3}, {30, 3}},
{{183, 40}, {182, 40}, {35, 40}},
{{184, 41}, {183, 41}, {35, 41}},
{{184, 42}, {37, 42}, {40, 42}},
{{184, 41}, {35, 41}, {37, 41}},
{{185, 42}, {184, 42}, {40, 42}},
{{169, 43}, {185, 43}, {40, 43}},
{{169, 43}, {40, 43}, {39, 43}},
{{128, 26}, {76, 26}, {77, 26}},
{{129, 26}, {128, 26}, {77, 26}},
{{127, 26}, {76, 26}, {128, 26}},
{{130, 26}, {129, 26}, {77, 26}},
{{126, 26}, {76, 26}, {127, 26}},
{{101, 26}, {76, 26}, {126, 26}},
{{51, 26}, {131, 26}, {130, 26}},
{{51, 26}, {130, 26}, {77, 26}},
{{ 38, 27}, {167, 27}, {121, 27}},
{{ 38, 27}, { 33, 27}, {165, 27}},
{{ 38, 27}, {165, 27}, {167, 27}},
{{168, 28}, {169, 28}, { 39, 28}},
{{168, 28}, { 39, 28}, { 46, 28}},
{{170, 29}, { 45, 29}, { 49, 29}},
{{170, 30}, { 46, 30}, { 45, 30}},
{{170, 30}, {168, 30}, { 46, 30}},
{{171, 29}, {170, 29}, { 49, 29}},
{{172, 31}, { 49, 31}, { 48, 31}},
{{172, 31}, {171, 31}, { 49, 31}},
{{173, 7}, { 48, 7}, { 43, 7}},
{{173, 7}, {172, 7}, { 48, 7}},
{{174, 32}, { 43, 32}, { 42, 32}},
{{174, 32}, {173, 32}, { 43, 32}},
{{175, 33}, { 36, 33}, { 34, 33}},
{{175, 34}, { 42, 34}, { 36, 34}},
{{175, 34}, {174, 34}, { 42, 34}},
{{176, 35}, { 34, 35}, { 31, 35}},
{{176, 33}, {175, 33}, { 34, 33}},
{{177, 35}, {176, 35}, { 31, 35}},
{{178, 36}, { 29, 36}, { 26, 36}},
{{178, 37}, { 31, 37}, { 29, 37}},
{{178, 37}, {177, 37}, { 31, 37}},
{{179, 36}, {178, 36}, { 26, 36}},
{{180, 38}, { 26, 38}, { 28, 38}},
{{180, 38}, {179, 38}, { 26, 38}},
{{181, 39}, { 28, 39}, { 30, 39}},
{{181, 39}, {180, 39}, { 28, 39}},
{{182, 40}, { 32, 40}, { 35, 40}},
{{182, 3}, { 30, 3}, { 32, 3}},
{{182, 3}, {181, 3}, { 30, 3}},
{{183, 40}, {182, 40}, { 35, 40}},
{{184, 41}, {183, 41}, { 35, 41}},
{{184, 42}, { 37, 42}, { 40, 42}},
{{184, 41}, { 35, 41}, { 37, 41}},
{{185, 42}, {184, 42}, { 40, 42}},
{{169, 43}, {185, 43}, { 40, 43}},
{{169, 43}, { 40, 43}, { 39, 43}},
{{128, 26}, { 76, 26}, { 77, 26}},
{{129, 26}, {128, 26}, { 77, 26}},
{{127, 26}, { 76, 26}, {128, 26}},
{{130, 26}, {129, 26}, { 77, 26}},
{{126, 26}, { 76, 26}, {127, 26}},
{{101, 26}, { 76, 26}, {126, 26}},
{{ 51, 26}, {131, 26}, {130, 26}},
{{ 51, 26}, {130, 26}, { 77, 26}},
{{143, 26}, {101, 26}, {126, 26}},
{{132, 26}, {131, 26}, {51, 26}},
{{132, 26}, {131, 26}, { 51, 26}},
{{142, 26}, {101, 26}, {143, 26}},
{{133, 26}, {132, 26}, {51, 26}},
{{133, 26}, {132, 26}, { 51, 26}},
{{102, 26}, {142, 26}, {141, 26}},
{{102, 26}, {101, 26}, {142, 26}},
{{140, 26}, {102, 26}, {141, 26}},
{{50, 26}, {134, 26}, {133, 26}},
{{50, 26}, {133, 26}, {51, 26}},
{{135, 26}, {134, 26}, {50, 26}},
{{ 50, 26}, {134, 26}, {133, 26}},
{{ 50, 26}, {133, 26}, { 51, 26}},
{{135, 26}, {134, 26}, { 50, 26}},
{{139, 26}, {102, 26}, {140, 26}},
{{123, 26}, {137, 26}, {136, 26}},
{{123, 26}, {136, 26}, {135, 26}},
{{123, 26}, {135, 26}, {50, 26}},
{{123, 26}, {135, 26}, { 50, 26}},
{{124, 26}, {139, 26}, {138, 26}},
{{124, 26}, {138, 26}, {137, 26}},
{{124, 26}, {102, 26}, {139, 26}},
@ -631,163 +631,163 @@ namespace wiffle {
{{123, 5}, {178, 5}, {179, 5}},
{{180, 5}, {181, 5}, {125, 5}},
{{123, 5}, {177, 5}, {178, 5}},
{{123, 5}, {50, 5}, {177, 5}},
{{123, 5}, { 50, 5}, {177, 5}},
{{125, 5}, {182, 5}, {165, 5}},
{{181, 5}, {182, 5}, {125, 5}},
{{50, 5}, {176, 5}, {177, 5}},
{{ 50, 5}, {176, 5}, {177, 5}},
{{182, 5}, {183, 5}, {165, 5}},
{{50, 5}, {175, 5}, {176, 5}},
{{ 50, 5}, {175, 5}, {176, 5}},
{{183, 5}, {184, 5}, {165, 5}},
{{185, 5}, {167, 5}, {184, 5}},
{{184, 5}, {167, 5}, {165, 5}},
{{175, 5}, {52, 5}, {174, 5}},
{{174, 5}, {52, 5}, {173, 5}},
{{50, 5}, {52, 5}, {175, 5}},
{{175, 5}, { 52, 5}, {174, 5}},
{{174, 5}, { 52, 5}, {173, 5}},
{{ 50, 5}, { 52, 5}, {175, 5}},
{{185, 5}, {169, 5}, {167, 5}},
{{52, 5}, {172, 5}, {173, 5}},
{{ 52, 5}, {172, 5}, {173, 5}},
{{170, 5}, {146, 5}, {168, 5}},
{{168, 5}, {146, 5}, {169, 5}},
{{169, 5}, {146, 5}, {167, 5}},
{{172, 5}, {144, 5}, {171, 5}},
{{171, 5}, {144, 5}, {170, 5}},
{{52, 5}, {144, 5}, {172, 5}},
{{ 52, 5}, {144, 5}, {172, 5}},
{{170, 5}, {144, 5}, {146, 5}},
{{75, 7}, {186, 7}, {77, 7}},
{{75, 7}, {187, 7}, {186, 7}},
{{186, 7}, {188, 7}, {77, 7}},
{{75, 7}, {189, 7}, {187, 7}},
{{188, 7}, {190, 7}, {77, 7}},
{{191, 7}, {192, 7}, {75, 7}},
{{75, 7}, {192, 7}, {189, 7}},
{{190, 7}, {51, 7}, {77, 7}},
{{190, 7}, {193, 7}, {51, 7}},
{{ 75, 7}, {186, 7}, { 77, 7}},
{{ 75, 7}, {187, 7}, {186, 7}},
{{186, 7}, {188, 7}, { 77, 7}},
{{ 75, 7}, {189, 7}, {187, 7}},
{{188, 7}, {190, 7}, { 77, 7}},
{{191, 7}, {192, 7}, { 75, 7}},
{{ 75, 7}, {192, 7}, {189, 7}},
{{190, 7}, { 51, 7}, { 77, 7}},
{{190, 7}, {193, 7}, { 51, 7}},
{{191, 7}, {194, 7}, {192, 7}},
{{193, 7}, {195, 7}, {51, 7}},
{{193, 7}, {195, 7}, { 51, 7}},
{{191, 7}, {196, 7}, {194, 7}},
{{196, 7}, {197, 7}, {198, 7}},
{{191, 7}, {197, 7}, {196, 7}},
{{199, 7}, {52, 7}, {195, 7}},
{{200, 7}, {52, 7}, {199, 7}},
{{195, 7}, {52, 7}, {51, 7}},
{{199, 7}, { 52, 7}, {195, 7}},
{{200, 7}, { 52, 7}, {199, 7}},
{{195, 7}, { 52, 7}, { 51, 7}},
{{197, 7}, {201, 7}, {198, 7}},
{{200, 7}, {202, 7}, {52, 7}},
{{200, 7}, {202, 7}, { 52, 7}},
{{203, 7}, {144, 7}, {202, 7}},
{{204, 7}, {144, 7}, {203, 7}},
{{202, 7}, {144, 7}, {52, 7}},
{{202, 7}, {144, 7}, { 52, 7}},
{{205, 7}, {145, 7}, {204, 7}},
{{201, 7}, {145, 7}, {205, 7}},
{{204, 7}, {145, 7}, {144, 7}},
{{197, 7}, {145, 7}, {201, 7}},
{{206, 44}, {96, 44}, {191, 44}},
{{191, 44}, {96, 44}, {60, 44}},
{{191, 44}, {65, 44}, {197, 44}},
{{197, 44}, {65, 44}, {206, 44}},
{{60, 44}, {65, 44}, {191, 44}},
{{206, 44}, {65, 44}, {96, 44}},
{{74, 45}, {67, 45}, {201, 45}},
{{74, 45}, {201, 45}, {205, 45}},
{{73, 46}, {204, 46}, {203, 46}},
{{73, 47}, {205, 47}, {204, 47}},
{{73, 47}, {74, 47}, {205, 47}},
{{71, 46}, {73, 46}, {203, 46}},
{{70, 48}, {203, 48}, {202, 48}},
{{70, 48}, {71, 48}, {203, 48}},
{{69, 5}, {202, 5}, {200, 5}},
{{69, 5}, {70, 5}, {202, 5}},
{{64, 49}, {200, 49}, {199, 49}},
{{64, 49}, {69, 49}, {200, 49}},
{{63, 50}, {195, 50}, {193, 50}},
{{63, 51}, {199, 51}, {195, 51}},
{{63, 51}, {64, 51}, {199, 51}},
{{61, 52}, {193, 52}, {190, 52}},
{{61, 50}, {63, 50}, {193, 50}},
{{58, 52}, {61, 52}, {190, 52}},
{{56, 53}, {188, 53}, {186, 53}},
{{56, 54}, {190, 54}, {188, 54}},
{{56, 54}, {58, 54}, {190, 54}},
{{55, 53}, {56, 53}, {186, 53}},
{{53, 55}, {186, 55}, {187, 55}},
{{53, 55}, {55, 55}, {186, 55}},
{{57, 56}, {187, 56}, {189, 56}},
{{57, 56}, {53, 56}, {187, 56}},
{{59, 57}, {192, 57}, {194, 57}},
{{59, 1}, {189, 1}, {192, 1}},
{{59, 1}, {57, 1}, {189, 1}},
{{62, 57}, {59, 57}, {194, 57}},
{{68, 58}, {62, 58}, {194, 58}},
{{68, 59}, {196, 59}, {198, 59}},
{{68, 58}, {194, 58}, {196, 58}},
{{66, 59}, {68, 59}, {198, 59}},
{{67, 60}, {66, 60}, {198, 60}},
{{67, 60}, {198, 60}, {201, 60}},
{{206, 44}, { 96, 44}, {191, 44}},
{{191, 44}, { 96, 44}, { 60, 44}},
{{191, 44}, { 65, 44}, {197, 44}},
{{197, 44}, { 65, 44}, {206, 44}},
{{ 60, 44}, { 65, 44}, {191, 44}},
{{206, 44}, { 65, 44}, { 96, 44}},
{{ 74, 45}, { 67, 45}, {201, 45}},
{{ 74, 45}, {201, 45}, {205, 45}},
{{ 73, 46}, {204, 46}, {203, 46}},
{{ 73, 47}, {205, 47}, {204, 47}},
{{ 73, 47}, { 74, 47}, {205, 47}},
{{ 71, 46}, { 73, 46}, {203, 46}},
{{ 70, 48}, {203, 48}, {202, 48}},
{{ 70, 48}, { 71, 48}, {203, 48}},
{{ 69, 5}, {202, 5}, {200, 5}},
{{ 69, 5}, { 70, 5}, {202, 5}},
{{ 64, 49}, {200, 49}, {199, 49}},
{{ 64, 49}, { 69, 49}, {200, 49}},
{{ 63, 50}, {195, 50}, {193, 50}},
{{ 63, 51}, {199, 51}, {195, 51}},
{{ 63, 51}, { 64, 51}, {199, 51}},
{{ 61, 52}, {193, 52}, {190, 52}},
{{ 61, 50}, { 63, 50}, {193, 50}},
{{ 58, 52}, { 61, 52}, {190, 52}},
{{ 56, 53}, {188, 53}, {186, 53}},
{{ 56, 54}, {190, 54}, {188, 54}},
{{ 56, 54}, { 58, 54}, {190, 54}},
{{ 55, 53}, { 56, 53}, {186, 53}},
{{ 53, 55}, {186, 55}, {187, 55}},
{{ 53, 55}, { 55, 55}, {186, 55}},
{{ 57, 56}, {187, 56}, {189, 56}},
{{ 57, 56}, { 53, 56}, {187, 56}},
{{ 59, 57}, {192, 57}, {194, 57}},
{{ 59, 1}, {189, 1}, {192, 1}},
{{ 59, 1}, { 57, 1}, {189, 1}},
{{ 62, 57}, { 59, 57}, {194, 57}},
{{ 68, 58}, { 62, 58}, {194, 58}},
{{ 68, 59}, {196, 59}, {198, 59}},
{{ 68, 58}, {194, 58}, {196, 58}},
{{ 66, 59}, { 68, 59}, {198, 59}},
{{ 67, 60}, { 66, 60}, {198, 60}},
{{ 67, 60}, {198, 60}, {201, 60}},
{{207, 1}, {101, 1}, {100, 1}},
{{208, 1}, {207, 1}, {100, 1}},
{{209, 1}, {101, 1}, {207, 1}},
{{210, 1}, {208, 1}, {100, 1}},
{{211, 1}, {101, 1}, {209, 1}},
{{76, 1}, {101, 1}, {211, 1}},
{{ 76, 1}, {101, 1}, {211, 1}},
{{212, 1}, {100, 1}, {213, 1}},
{{212, 1}, {210, 1}, {100, 1}},
{{214, 1}, {76, 1}, {211, 1}},
{{214, 1}, { 76, 1}, {211, 1}},
{{215, 1}, {212, 1}, {213, 1}},
{{216, 1}, {76, 1}, {214, 1}},
{{216, 1}, { 76, 1}, {214, 1}},
{{217, 1}, {215, 1}, {213, 1}},
{{218, 1}, {219, 1}, {217, 1}},
{{218, 1}, {217, 1}, {213, 1}},
{{75, 1}, {216, 1}, {220, 1}},
{{75, 1}, {220, 1}, {221, 1}},
{{75, 1}, {76, 1}, {216, 1}},
{{ 75, 1}, {216, 1}, {220, 1}},
{{ 75, 1}, {220, 1}, {221, 1}},
{{ 75, 1}, { 76, 1}, {216, 1}},
{{222, 1}, {219, 1}, {218, 1}},
{{223, 1}, {75, 1}, {221, 1}},
{{223, 1}, { 75, 1}, {221, 1}},
{{206, 1}, {224, 1}, {225, 1}},
{{206, 1}, {225, 1}, {222, 1}},
{{206, 1}, {222, 1}, {218, 1}},
{{191, 1}, {223, 1}, {226, 1}},
{{191, 1}, {226, 1}, {224, 1}},
{{191, 1}, {75, 1}, {223, 1}},
{{191, 1}, { 75, 1}, {223, 1}},
{{191, 1}, {224, 1}, {206, 1}},
{{213, 61}, {91, 61}, {218, 61}},
{{83, 61}, {91, 61}, {213, 61}},
{{213, 61}, { 91, 61}, {218, 61}},
{{ 83, 61}, { 91, 61}, {213, 61}},
{{227, 61}, {114, 61}, {213, 61}},
{{218, 61}, {114, 61}, {227, 61}},
{{213, 61}, {114, 61}, {83, 61}},
{{91, 61}, {114, 61}, {218, 61}},
{{97, 28}, {90, 28}, {222, 28}},
{{97, 28}, {222, 28}, {225, 28}},
{{95, 29}, {224, 29}, {226, 29}},
{{95, 30}, {225, 30}, {224, 30}},
{{95, 30}, {97, 30}, {225, 30}},
{{99, 29}, {95, 29}, {226, 29}},
{{98, 31}, {226, 31}, {223, 31}},
{{98, 31}, {99, 31}, {226, 31}},
{{94, 7}, {223, 7}, {221, 7}},
{{94, 7}, {98, 7}, {223, 7}},
{{93, 32}, {221, 32}, {220, 32}},
{{93, 32}, {94, 32}, {221, 32}},
{{88, 33}, {216, 33}, {214, 33}},
{{88, 34}, {220, 34}, {216, 34}},
{{88, 34}, {93, 34}, {220, 34}},
{{86, 35}, {214, 35}, {211, 35}},
{{86, 33}, {88, 33}, {214, 33}},
{{84, 35}, {86, 35}, {211, 35}},
{{81, 36}, {209, 36}, {207, 36}},
{{81, 37}, {211, 37}, {209, 37}},
{{81, 37}, {84, 37}, {211, 37}},
{{78, 36}, {81, 36}, {207, 36}},
{{80, 38}, {207, 38}, {208, 38}},
{{80, 38}, {78, 38}, {207, 38}},
{{82, 39}, {208, 39}, {210, 39}},
{{82, 39}, {80, 39}, {208, 39}},
{{85, 40}, {212, 40}, {215, 40}},
{{85, 3}, {210, 3}, {212, 3}},
{{85, 3}, {82, 3}, {210, 3}},
{{87, 40}, {85, 40}, {215, 40}},
{{89, 41}, {87, 41}, {215, 41}},
{{89, 42}, {217, 42}, {219, 42}},
{{89, 41}, {215, 41}, {217, 41}},
{{92, 42}, {89, 42}, {219, 42}},
{{90, 43}, {92, 43}, {219, 43}},
{{90, 43}, {219, 43}, {222, 43}},
{{213, 61}, {114, 61}, { 83, 61}},
{{ 91, 61}, {114, 61}, {218, 61}},
{{ 97, 28}, { 90, 28}, {222, 28}},
{{ 97, 28}, {222, 28}, {225, 28}},
{{ 95, 29}, {224, 29}, {226, 29}},
{{ 95, 30}, {225, 30}, {224, 30}},
{{ 95, 30}, { 97, 30}, {225, 30}},
{{ 99, 29}, { 95, 29}, {226, 29}},
{{ 98, 31}, {226, 31}, {223, 31}},
{{ 98, 31}, { 99, 31}, {226, 31}},
{{ 94, 7}, {223, 7}, {221, 7}},
{{ 94, 7}, { 98, 7}, {223, 7}},
{{ 93, 32}, {221, 32}, {220, 32}},
{{ 93, 32}, { 94, 32}, {221, 32}},
{{ 88, 33}, {216, 33}, {214, 33}},
{{ 88, 34}, {220, 34}, {216, 34}},
{{ 88, 34}, { 93, 34}, {220, 34}},
{{ 86, 35}, {214, 35}, {211, 35}},
{{ 86, 33}, { 88, 33}, {214, 33}},
{{ 84, 35}, { 86, 35}, {211, 35}},
{{ 81, 36}, {209, 36}, {207, 36}},
{{ 81, 37}, {211, 37}, {209, 37}},
{{ 81, 37}, { 84, 37}, {211, 37}},
{{ 78, 36}, { 81, 36}, {207, 36}},
{{ 80, 38}, {207, 38}, {208, 38}},
{{ 80, 38}, { 78, 38}, {207, 38}},
{{ 82, 39}, {208, 39}, {210, 39}},
{{ 82, 39}, { 80, 39}, {208, 39}},
{{ 85, 40}, {212, 40}, {215, 40}},
{{ 85, 3}, {210, 3}, {212, 3}},
{{ 85, 3}, { 82, 3}, {210, 3}},
{{ 87, 40}, { 85, 40}, {215, 40}},
{{ 89, 41}, { 87, 41}, {215, 41}},
{{ 89, 42}, {217, 42}, {219, 42}},
{{ 89, 41}, {215, 41}, {217, 41}},
{{ 92, 42}, { 89, 42}, {219, 42}},
{{ 90, 43}, { 92, 43}, {219, 43}},
{{ 90, 43}, {219, 43}, {222, 43}},
{{228, 3}, {100, 3}, {102, 3}},
{{229, 3}, {100, 3}, {228, 3}},
{{230, 3}, {228, 3}, {102, 3}},
@ -914,6 +914,6 @@ namespace wiffle {
{{250, 24}, {153, 24}, {151, 24}},
};
constexpr uint32_t num_faces = (sizeof (faces)) / (sizeof (face));
constexpr uint32_t num_faces = (sizeof (faces)) / (sizeof (face_vn));
}

View File

@ -1,3 +1,5 @@
#pragma once
#include <cstdint>
#include "../float_uint32.hpp"
@ -35,6 +37,8 @@ namespace ta_alloc_ctrl {
namespace opb_mode {
constexpr uint32_t increasing_addresses = 0 << 20;
constexpr uint32_t decreasing_addresses = 1 << 20;
constexpr uint32_t bit_mask = 0x1 << 20;
}
namespace pt_opb {
@ -42,6 +46,8 @@ namespace ta_alloc_ctrl {
constexpr uint32_t _8x4byte = 1 << 16;
constexpr uint32_t _16x4byte = 2 << 16;
constexpr uint32_t _32x4byte = 3 << 16;
constexpr uint32_t bit_mask = 0x3 << 16;
}
namespace tm_opb {
@ -49,6 +55,8 @@ namespace ta_alloc_ctrl {
constexpr uint32_t _8x4byte = 1 << 12;
constexpr uint32_t _16x4byte = 2 << 12;
constexpr uint32_t _32x4byte = 3 << 12;
constexpr uint32_t bit_mask = 0x3 << 12;
}
namespace t_opb {
@ -56,6 +64,8 @@ namespace ta_alloc_ctrl {
constexpr uint32_t _8x4byte = 1 << 8;
constexpr uint32_t _16x4byte = 2 << 8;
constexpr uint32_t _32x4byte = 3 << 8;
constexpr uint32_t bit_mask = 0x3 << 8;
}
namespace om_opb {
@ -63,6 +73,8 @@ namespace ta_alloc_ctrl {
constexpr uint32_t _8x4byte = 1 << 4;
constexpr uint32_t _16x4byte = 2 << 4;
constexpr uint32_t _32x4byte = 3 << 4;
constexpr uint32_t bit_mask = 0x3 << 4;
}
namespace o_opb {
@ -70,6 +82,8 @@ namespace ta_alloc_ctrl {
constexpr uint32_t _8x4byte = 1 << 0;
constexpr uint32_t _16x4byte = 2 << 0;
constexpr uint32_t _32x4byte = 3 << 0;
constexpr uint32_t bit_mask = 0x3 << 0;
}
}
@ -85,11 +99,15 @@ namespace ta_yuv_tex_ctrl {
namespace yuv_form {
constexpr uint32_t yuv420 = 0 << 24;
constexpr uint32_t yuv422 = 1 << 24;
constexpr uint32_t bit_mask = 0x1 << 24;
}
namespace yuv_tex {
constexpr uint32_t one_texture = 0 << 16;
constexpr uint32_t multiple_textures = 1 << 16;
constexpr uint32_t bit_mask = 0x1 << 16;
}
constexpr uint32_t yuv_v_size(uint32_t num) { return (num & 0x3f) << 8; }

View File

@ -3,8 +3,8 @@
#include "align.hpp"
#include "sh7091.hpp"
#include "sh7091_bits.hpp"
#include "sh7091/sh7091.hpp"
#include "sh7091/sh7091_bits.hpp"
#include "systembus.hpp"
#include "systembus_bits.hpp"
@ -97,9 +97,11 @@ void init_block_write(uint32_t * command_buf, uint32_t * receive_buf,
void dma_start(uint32_t * command_buf)
{
sh7091.DMAC.DMAOR = DMAOR__DDT // on-demand data transfer mode
| DMAOR__PR__CH2_CH0_CH1_CH3 // priority mode; CH2 > CH0 > CH1 > CH3
| DMAOR__DME; // DMAC master enable
using namespace dmac;
sh7091.DMAC.DMAOR = dmaor::ddt::on_demand_data_transfer_mode /* on-demand data transfer mode */
| dmaor::pr::ch2_ch0_ch1_ch3 /* priority mode; CH2 > CH0 > CH1 > CH3 */
| dmaor::dme::operation_enabled_on_all_channels; /* DMAC master enable */
// clear maple-DMA end status
system.ISTNRM = ISTNRM__END_OF_DMA_MAPLE_DMA;

View File

@ -43,4 +43,34 @@ void init_host_command_all_ports(uint32_t * command_buf, uint32_t * receive_buf,
host_command[3].bus_data.data_fields = data_fields;
}
template <typename C, typename R>
void init_host_command_all_ports(uint32_t * command_buf, uint32_t * receive_buf)
{
using command_type = maple::host_command<typename C::data_fields>;
using response_type = maple::command_response<typename R::data_fields>;
auto host_command = reinterpret_cast<command_type *>(command_buf);
auto response_command = reinterpret_cast<response_type *>(receive_buf);
init_host_command((uint32_t*)&host_command[0], (uint32_t*)&response_command[0],
host_instruction::port_select::a, // destination_port
ap::de::device | ap::port_select::a, C::command_code, (sizeof (typename C::data_fields)),
false); // end_flag
init_host_command((uint32_t*)&host_command[1], (uint32_t*)&response_command[1],
host_instruction::port_select::b, // destination_port
ap::de::device | ap::port_select::b, C::command_code, (sizeof (typename C::data_fields)),
false); // end_flag
init_host_command((uint32_t*)&host_command[2], (uint32_t*)&response_command[2],
host_instruction::port_select::c, // destination_port
ap::de::device | ap::port_select::c, C::command_code, (sizeof (typename C::data_fields)),
false); // end_flag
init_host_command((uint32_t*)&host_command[3], (uint32_t*)&response_command[3],
host_instruction::port_select::d, // destination_port
ap::de::device | ap::port_select::d, C::command_code, (sizeof (typename C::data_fields)),
true); // end_flag
}
}

View File

@ -107,6 +107,12 @@ inline constexpr vec<2, T> operator*(vec<2, T> const& v1, T const& scalar)
return v1 * vec<2, T>(scalar);
}
template <typename T>
inline constexpr vec<2, T> operator*(T const& scalar, vec<2, T> const& v1)
{
return vec<2, T>(scalar) * v1;
}
template <typename T>
inline constexpr vec<2, T> operator/(vec<2, T> const& v1, vec<2, T> const& v2)
{

View File

@ -9,24 +9,29 @@ namespace serial {
void init()
{
using namespace scif;
sh7091.SCIF.SCSCR2 = 0;
sh7091.SCIF.SCSMR2 = 0;
sh7091.SCIF.SCBRR2 = 1; // 520833.3
sh7091.SCIF.SCFCR2 = SCFCR2__TFRST | SCFCR2__RFRST;
sh7091.SCIF.SCFCR2 = scfcr2::tfrst::reset_operation_enabled
| scfcr2::rfrst::reset_operation_enabled;
// tx/rx trigger on 1 byte
sh7091.SCIF.SCFCR2 = 0;
sh7091.SCIF.SCSPTR2 = 0;
sh7091.SCIF.SCLSR2 = 0;
sh7091.SCIF.SCSCR2 = SCSCR2__TE | SCSCR2__RE;
sh7091.SCIF.SCSCR2 = scscr2::te::transmission_enabled
| scscr2::re::reception_enabled;
}
void character(const char c)
{
using namespace scif;
// wait for transmit fifo to become empty
while ((sh7091.SCIF.SCFSR2 & SCFSR2__TDFE) == 0);
while ((sh7091.SCIF.SCFSR2 & scfsr2::tdfe::bit_mask) == 0);
for (int i = 0; i < 100000; i++) {
asm volatile ("nop;");

View File

@ -111,7 +111,7 @@ def generate_vertices(vertices):
else:
assert type(p_c) is Vertex
p = p_c
yield f"{{ {v.x:9f}f, {v.y:9f}f, {v.z:9f}f }},"
yield f"{{ {p.x:9f}f, {p.y:9f}f, {p.z:9f}f }},"
yield "};"
yield ""