Compare commits
4 Commits
a4ae84124a
...
a0d516803b
Author | SHA1 | Date | |
---|---|---|---|
a0d516803b | |||
39e97a3f1b | |||
0510598233 | |||
b874ec56b5 |
@ -16,13 +16,13 @@ SECTIONS
|
||||
*(.text)
|
||||
} > p1ram
|
||||
|
||||
.data ALIGN(4) : SUBALIGN(4)
|
||||
.data ALIGN(4) :
|
||||
{
|
||||
*(.data)
|
||||
*(.data.*)
|
||||
} > p1ram
|
||||
|
||||
.rodata ALIGN(4) : SUBALIGN(4)
|
||||
.rodata ALIGN(4) :
|
||||
{
|
||||
*(.rodata)
|
||||
*(.rodata.*)
|
||||
|
@ -312,7 +312,7 @@ void main()
|
||||
core_flip(frame_ix);
|
||||
while (spg_status::vsync(holly.SPG_STATUS));
|
||||
|
||||
frame_ix = (frame_ix + 1) & 1;;
|
||||
frame_ix = (frame_ix + 1) & 1;
|
||||
theta += (2.f * pi) / 720.f;
|
||||
}
|
||||
}
|
||||
|
@ -288,6 +288,6 @@ void main()
|
||||
core_flip(frame_ix);
|
||||
while (spg_status::vsync(holly.SPG_STATUS));
|
||||
|
||||
frame_ix = (frame_ix + 1) & 1;;
|
||||
frame_ix = (frame_ix + 1) & 1;
|
||||
}
|
||||
}
|
||||
|
@ -329,6 +329,6 @@ void main()
|
||||
core_flip(frame_ix);
|
||||
while (spg_status::vsync(holly.SPG_STATUS));
|
||||
|
||||
frame_ix = (frame_ix + 1) & 1;;
|
||||
frame_ix = (frame_ix + 1) & 1;
|
||||
}
|
||||
}
|
||||
|
@ -206,6 +206,6 @@ void main()
|
||||
while (spg_status::vsync(holly.SPG_STATUS));
|
||||
|
||||
theta += half_degree;
|
||||
frame_ix = (frame_ix + 1) & 1;;
|
||||
frame_ix = (frame_ix + 1) & 1;
|
||||
}
|
||||
}
|
||||
|
@ -229,7 +229,7 @@ void main()
|
||||
core_flip(frame_ix);
|
||||
while (spg_status::vsync(holly.SPG_STATUS));
|
||||
|
||||
frame_ix = (frame_ix + 1) & 1;;
|
||||
frame_ix = (frame_ix + 1) & 1;
|
||||
|
||||
if (frame_ix == 10 && dumped == false) {
|
||||
dump();
|
||||
|
@ -293,6 +293,6 @@ void main()
|
||||
core_flip(frame_ix);
|
||||
while (spg_status::vsync(holly.SPG_STATUS));
|
||||
|
||||
frame_ix++;
|
||||
frame_ix = (frame_ix + 1) & 1;
|
||||
}
|
||||
}
|
||||
|
@ -188,11 +188,6 @@ void init_texture_memory(const struct opb_size& opb_size)
|
||||
background_parameter(0xff0000ff);
|
||||
}
|
||||
|
||||
constexpr inline uint32_t b(uint32_t v, uint32_t n)
|
||||
{
|
||||
return ((v >> n) & 1) << (4 * n);
|
||||
}
|
||||
|
||||
void inflate_font(const uint32_t * src,
|
||||
const uint32_t stride,
|
||||
const uint32_t curve_end_ix)
|
||||
@ -218,6 +213,7 @@ void main()
|
||||
serial::integer<uint32_t>(font->first_char_code);
|
||||
serial::integer<uint32_t>(font->glyph_count);
|
||||
serial::integer<uint32_t>(font->glyph_height);
|
||||
serial::integer<uint32_t>(font->texture_stride);
|
||||
serial::integer<uint32_t>(font->texture_width);
|
||||
serial::integer<uint32_t>(font->texture_height);
|
||||
serial::character('\n');
|
||||
@ -299,6 +295,6 @@ void main()
|
||||
core_flip(frame_ix);
|
||||
while (spg_status::vsync(holly.SPG_STATUS));
|
||||
|
||||
frame_ix++;
|
||||
frame_ix = (frame_ix + 1) & 1;
|
||||
}
|
||||
}
|
||||
|
@ -322,6 +322,6 @@ void main()
|
||||
|
||||
constexpr float half_degree = 0.01745329f / 2;
|
||||
theta += half_degree;
|
||||
frame_ix = (frame_ix + 1) & 1;;
|
||||
frame_ix = (frame_ix + 1) & 1;
|
||||
}
|
||||
}
|
||||
|
@ -301,6 +301,6 @@ void main()
|
||||
while (spg_status::vsync(holly.SPG_STATUS));
|
||||
|
||||
theta += half_degree;
|
||||
frame_ix = (frame_ix + 1) & 1;;
|
||||
frame_ix = (frame_ix + 1) & 1;
|
||||
}
|
||||
}
|
||||
|
@ -212,6 +212,6 @@ void main()
|
||||
while (spg_status::vsync(holly.SPG_STATUS));
|
||||
|
||||
theta += half_degree;
|
||||
frame_ix = (frame_ix + 1) & 1;;
|
||||
frame_ix = (frame_ix + 1) & 1;
|
||||
}
|
||||
}
|
||||
|
@ -286,6 +286,6 @@ void main()
|
||||
while (spg_status::vsync(holly.SPG_STATUS));
|
||||
|
||||
theta += half_degree;
|
||||
frame_ix = (frame_ix + 1) & 1;;
|
||||
frame_ix = (frame_ix + 1) & 1;
|
||||
}
|
||||
}
|
||||
|
@ -182,6 +182,6 @@ void main()
|
||||
while (spg_status::vsync(holly.SPG_STATUS));
|
||||
|
||||
theta += half_degree;
|
||||
frame_ix = (frame_ix + 1) & 1;;
|
||||
frame_ix = (frame_ix + 1) & 1;
|
||||
}
|
||||
}
|
||||
|
@ -229,6 +229,6 @@ void main()
|
||||
core_flip(frame_ix);
|
||||
while (spg_status::vsync(holly.SPG_STATUS));
|
||||
|
||||
frame_ix = (frame_ix + 1) & 1;;
|
||||
frame_ix = (frame_ix + 1) & 1;
|
||||
}
|
||||
}
|
||||
|
@ -263,6 +263,6 @@ void main()
|
||||
|
||||
constexpr float half_degree = 0.01745329f / 2;
|
||||
theta += half_degree;
|
||||
frame_ix = (frame_ix + 1) & 1;;
|
||||
frame_ix = (frame_ix + 1) & 1;
|
||||
}
|
||||
}
|
||||
|
@ -446,6 +446,6 @@ void main()
|
||||
core_flip(frame_ix);
|
||||
while (spg_status::vsync(holly.SPG_STATUS));
|
||||
|
||||
frame_ix = (frame_ix + 1) & 1;;
|
||||
frame_ix = (frame_ix + 1) & 1;
|
||||
}
|
||||
}
|
||||
|
@ -232,7 +232,7 @@ void main()
|
||||
core_flip(frame_ix);
|
||||
while (spg_status::vsync(holly.SPG_STATUS));
|
||||
|
||||
frame_ix = (frame_ix + 1) & 1;;
|
||||
frame_ix = (frame_ix + 1) & 1;
|
||||
theta += half_degree;
|
||||
}
|
||||
}
|
||||
|
@ -134,6 +134,6 @@ void main()
|
||||
core_flip(frame_ix);
|
||||
while (spg_status::vsync(holly.SPG_STATUS));
|
||||
|
||||
frame_ix = (frame_ix + 1) & 1;;
|
||||
frame_ix = (frame_ix + 1) & 1;
|
||||
}
|
||||
}
|
||||
|
@ -251,7 +251,7 @@ void main()
|
||||
core_flip(frame_ix);
|
||||
while (spg_status::vsync(holly.SPG_STATUS));
|
||||
|
||||
frame_ix = (frame_ix + 1) & 1;;
|
||||
frame_ix = (frame_ix + 1) & 1;
|
||||
|
||||
if (frame_ix > 10)
|
||||
break;
|
||||
|
@ -202,6 +202,6 @@ void main()
|
||||
while (spg_status::vsync(holly.SPG_STATUS));
|
||||
|
||||
theta += half_degree;
|
||||
frame_ix = (frame_ix + 1) & 1;;
|
||||
frame_ix = (frame_ix + 1) & 1;
|
||||
}
|
||||
}
|
||||
|
@ -175,6 +175,6 @@ void main()
|
||||
|
||||
constexpr float half_degree = 0.01745329f / 2.f;
|
||||
theta += half_degree;
|
||||
frame_ix = (frame_ix + 1) & 1;;
|
||||
frame_ix = (frame_ix + 1) & 1;
|
||||
}
|
||||
}
|
||||
|
@ -212,7 +212,7 @@ void main()
|
||||
core_flip(frame_ix);
|
||||
while (spg_status::vsync(holly.SPG_STATUS));
|
||||
|
||||
frame_ix = (frame_ix + 1) & 1;;
|
||||
frame_ix = (frame_ix + 1) & 1;
|
||||
delta += pi * 2 / 360;
|
||||
}
|
||||
}
|
||||
|
@ -312,6 +312,6 @@ void main()
|
||||
while (spg_status::vsync(holly.SPG_STATUS));
|
||||
|
||||
theta += half_degree;
|
||||
frame_ix = (frame_ix + 1) & 1;;
|
||||
frame_ix = (frame_ix + 1) & 1;
|
||||
}
|
||||
}
|
||||
|
@ -54,7 +54,7 @@ void ta_polygon_converter_cont(uint32_t ol_base_offset,
|
||||
(void)_dummy_read;
|
||||
}
|
||||
|
||||
void ta_polygon_converter_transfer(volatile uint32_t * buf, uint32_t size)
|
||||
void ta_polygon_converter_transfer(volatile uint32_t const * const buf, uint32_t size)
|
||||
{
|
||||
/* wait for previous transfer to complete (if any) */
|
||||
//while ((system.C2DST & C2DST__STATUS) != 0); /* 1 == transfer is in progress */
|
||||
|
@ -8,7 +8,7 @@ void ta_polygon_converter_init(uint32_t opb_total_size, // for one tile, for all
|
||||
uint32_t tile_height); // in tile units (e.g: (480 / 32))
|
||||
void ta_polygon_converter_cont(uint32_t ol_base_offset,
|
||||
uint32_t ta_alloc);
|
||||
void ta_polygon_converter_transfer(volatile uint32_t * buf, uint32_t size);
|
||||
void ta_polygon_converter_transfer(volatile uint32_t const * const buf, uint32_t size);
|
||||
void ta_wait_opaque_list();
|
||||
void ta_wait_opaque_modifier_volume_list();
|
||||
void ta_wait_translucent_list();
|
||||
|
@ -14,7 +14,7 @@ namespace ta_global_parameter {
|
||||
uint32_t _res5;
|
||||
uint32_t _res6;
|
||||
|
||||
end_of_list(const uint32_t parameter_control_word
|
||||
constexpr end_of_list(const uint32_t parameter_control_word
|
||||
)
|
||||
: parameter_control_word(parameter_control_word)
|
||||
, _res0(0)
|
||||
@ -51,7 +51,7 @@ namespace ta_global_parameter {
|
||||
uint32_t user_clip_x_max;
|
||||
uint32_t user_clip_y_max;
|
||||
|
||||
user_tile_clip(const uint32_t parameter_control_word,
|
||||
constexpr user_tile_clip(const uint32_t parameter_control_word,
|
||||
const uint32_t user_clip_x_min,
|
||||
const uint32_t user_clip_y_min,
|
||||
const uint32_t user_clip_x_max,
|
||||
@ -92,7 +92,7 @@ namespace ta_global_parameter {
|
||||
uint32_t bounding_box_x_max;
|
||||
uint32_t bounding_box_y_max;
|
||||
|
||||
object_list_set(const uint32_t parameter_control_word,
|
||||
constexpr object_list_set(const uint32_t parameter_control_word,
|
||||
const uint32_t object_pointer,
|
||||
const uint32_t bounding_box_x_min,
|
||||
const uint32_t bounding_box_y_min,
|
||||
@ -134,7 +134,7 @@ namespace ta_global_parameter {
|
||||
uint32_t data_size_for_sort_dma;
|
||||
uint32_t next_address_for_sort_dma;
|
||||
|
||||
polygon_type_0(const uint32_t parameter_control_word,
|
||||
constexpr polygon_type_0(const uint32_t parameter_control_word,
|
||||
const uint32_t isp_tsp_instruction_word,
|
||||
const uint32_t tsp_instruction_word,
|
||||
const uint32_t texture_control_word,
|
||||
@ -176,7 +176,7 @@ namespace ta_global_parameter {
|
||||
float face_color_g;
|
||||
float face_color_b;
|
||||
|
||||
polygon_type_1(const uint32_t parameter_control_word,
|
||||
constexpr polygon_type_1(const uint32_t parameter_control_word,
|
||||
const uint32_t isp_tsp_instruction_word,
|
||||
const uint32_t tsp_instruction_word,
|
||||
const uint32_t texture_control_word,
|
||||
@ -228,7 +228,7 @@ namespace ta_global_parameter {
|
||||
float face_offset_color_g;
|
||||
float face_offset_color_b;
|
||||
|
||||
polygon_type_2(const uint32_t parameter_control_word,
|
||||
constexpr polygon_type_2(const uint32_t parameter_control_word,
|
||||
const uint32_t isp_tsp_instruction_word,
|
||||
const uint32_t tsp_instruction_word,
|
||||
const uint32_t texture_control_word,
|
||||
@ -294,7 +294,7 @@ namespace ta_global_parameter {
|
||||
uint32_t data_size_for_sort_dma;
|
||||
uint32_t next_address_for_sort_dma;
|
||||
|
||||
polygon_type_3(const uint32_t parameter_control_word,
|
||||
constexpr polygon_type_3(const uint32_t parameter_control_word,
|
||||
const uint32_t isp_tsp_instruction_word,
|
||||
const uint32_t tsp_instruction_word_0,
|
||||
const uint32_t texture_control_word_0,
|
||||
@ -346,7 +346,7 @@ namespace ta_global_parameter {
|
||||
float face_color_g_1;
|
||||
float face_color_b_1;
|
||||
|
||||
polygon_type_4(const uint32_t parameter_control_word,
|
||||
constexpr polygon_type_4(const uint32_t parameter_control_word,
|
||||
const uint32_t isp_tsp_instruction_word,
|
||||
const uint32_t tsp_instruction_word_0,
|
||||
const uint32_t texture_control_word_0,
|
||||
@ -414,7 +414,7 @@ namespace ta_global_parameter {
|
||||
uint32_t data_size_for_sort_dma;
|
||||
uint32_t next_address_for_sort_dma;
|
||||
|
||||
sprite(const uint32_t parameter_control_word,
|
||||
constexpr sprite(const uint32_t parameter_control_word,
|
||||
const uint32_t isp_tsp_instruction_word,
|
||||
const uint32_t tsp_instruction_word,
|
||||
const uint32_t texture_control_word,
|
||||
@ -458,7 +458,7 @@ namespace ta_global_parameter {
|
||||
uint32_t _res4;
|
||||
uint32_t _res5;
|
||||
|
||||
modifier_volume(const uint32_t parameter_control_word,
|
||||
constexpr modifier_volume(const uint32_t parameter_control_word,
|
||||
const uint32_t isp_tsp_instruction_word
|
||||
)
|
||||
: parameter_control_word(parameter_control_word)
|
||||
|
@ -14,7 +14,7 @@ namespace ta_vertex_parameter {
|
||||
uint32_t base_color;
|
||||
uint32_t _res2;
|
||||
|
||||
polygon_type_0(const uint32_t parameter_control_word,
|
||||
constexpr polygon_type_0(const uint32_t parameter_control_word,
|
||||
const float x,
|
||||
const float y,
|
||||
const float z,
|
||||
@ -55,7 +55,7 @@ namespace ta_vertex_parameter {
|
||||
float base_color_g;
|
||||
float base_color_b;
|
||||
|
||||
polygon_type_1(const uint32_t parameter_control_word,
|
||||
constexpr polygon_type_1(const uint32_t parameter_control_word,
|
||||
const float x,
|
||||
const float y,
|
||||
const float z,
|
||||
@ -99,7 +99,7 @@ namespace ta_vertex_parameter {
|
||||
float base_intensity;
|
||||
uint32_t _res2;
|
||||
|
||||
polygon_type_2(const uint32_t parameter_control_word,
|
||||
constexpr polygon_type_2(const uint32_t parameter_control_word,
|
||||
const float x,
|
||||
const float y,
|
||||
const float z,
|
||||
@ -140,7 +140,7 @@ namespace ta_vertex_parameter {
|
||||
uint32_t base_color;
|
||||
uint32_t offset_color;
|
||||
|
||||
polygon_type_3(const uint32_t parameter_control_word,
|
||||
constexpr polygon_type_3(const uint32_t parameter_control_word,
|
||||
const float x,
|
||||
const float y,
|
||||
const float z,
|
||||
@ -184,7 +184,7 @@ namespace ta_vertex_parameter {
|
||||
uint32_t base_color;
|
||||
uint32_t offset_color;
|
||||
|
||||
polygon_type_4(const uint32_t parameter_control_word,
|
||||
constexpr polygon_type_4(const uint32_t parameter_control_word,
|
||||
const float x,
|
||||
const float y,
|
||||
const float z,
|
||||
@ -235,7 +235,7 @@ namespace ta_vertex_parameter {
|
||||
float offset_color_g;
|
||||
float offset_color_b;
|
||||
|
||||
polygon_type_5(const uint32_t parameter_control_word,
|
||||
constexpr polygon_type_5(const uint32_t parameter_control_word,
|
||||
const float x,
|
||||
const float y,
|
||||
const float z,
|
||||
@ -309,7 +309,7 @@ namespace ta_vertex_parameter {
|
||||
float offset_color_g;
|
||||
float offset_color_b;
|
||||
|
||||
polygon_type_6(const uint32_t parameter_control_word,
|
||||
constexpr polygon_type_6(const uint32_t parameter_control_word,
|
||||
const float x,
|
||||
const float y,
|
||||
const float z,
|
||||
@ -374,7 +374,7 @@ namespace ta_vertex_parameter {
|
||||
float base_intensity;
|
||||
float offset_intensity;
|
||||
|
||||
polygon_type_7(const uint32_t parameter_control_word,
|
||||
constexpr polygon_type_7(const uint32_t parameter_control_word,
|
||||
const float x,
|
||||
const float y,
|
||||
const float z,
|
||||
@ -418,7 +418,7 @@ namespace ta_vertex_parameter {
|
||||
float base_intensity;
|
||||
float offset_intensity;
|
||||
|
||||
polygon_type_8(const uint32_t parameter_control_word,
|
||||
constexpr polygon_type_8(const uint32_t parameter_control_word,
|
||||
const float x,
|
||||
const float y,
|
||||
const float z,
|
||||
@ -461,7 +461,7 @@ namespace ta_vertex_parameter {
|
||||
uint32_t _res0;
|
||||
uint32_t _res1;
|
||||
|
||||
polygon_type_9(const uint32_t parameter_control_word,
|
||||
constexpr polygon_type_9(const uint32_t parameter_control_word,
|
||||
const float x,
|
||||
const float y,
|
||||
const float z,
|
||||
@ -503,7 +503,7 @@ namespace ta_vertex_parameter {
|
||||
uint32_t _res0;
|
||||
uint32_t _res1;
|
||||
|
||||
polygon_type_10(const uint32_t parameter_control_word,
|
||||
constexpr polygon_type_10(const uint32_t parameter_control_word,
|
||||
const float x,
|
||||
const float y,
|
||||
const float z,
|
||||
@ -553,7 +553,7 @@ namespace ta_vertex_parameter {
|
||||
uint32_t _res2;
|
||||
uint32_t _res3;
|
||||
|
||||
polygon_type_11(const uint32_t parameter_control_word,
|
||||
constexpr polygon_type_11(const uint32_t parameter_control_word,
|
||||
const float x,
|
||||
const float y,
|
||||
const float z,
|
||||
@ -625,7 +625,7 @@ namespace ta_vertex_parameter {
|
||||
uint32_t _res4;
|
||||
uint32_t _res5;
|
||||
|
||||
polygon_type_12(const uint32_t parameter_control_word,
|
||||
constexpr polygon_type_12(const uint32_t parameter_control_word,
|
||||
const float x,
|
||||
const float y,
|
||||
const float z,
|
||||
@ -695,7 +695,7 @@ namespace ta_vertex_parameter {
|
||||
uint32_t _res2;
|
||||
uint32_t _res3;
|
||||
|
||||
polygon_type_13(const uint32_t parameter_control_word,
|
||||
constexpr polygon_type_13(const uint32_t parameter_control_word,
|
||||
const float x,
|
||||
const float y,
|
||||
const float z,
|
||||
@ -767,7 +767,7 @@ namespace ta_vertex_parameter {
|
||||
uint32_t _res4;
|
||||
uint32_t _res5;
|
||||
|
||||
polygon_type_14(const uint32_t parameter_control_word,
|
||||
constexpr polygon_type_14(const uint32_t parameter_control_word,
|
||||
const float x,
|
||||
const float y,
|
||||
const float z,
|
||||
@ -837,7 +837,7 @@ namespace ta_vertex_parameter {
|
||||
uint32_t _res2;
|
||||
uint32_t _res3;
|
||||
|
||||
sprite_type_0(const uint32_t parameter_control_word,
|
||||
constexpr sprite_type_0(const uint32_t parameter_control_word,
|
||||
const float a_x,
|
||||
const float a_y,
|
||||
const float a_z,
|
||||
@ -909,7 +909,7 @@ namespace ta_vertex_parameter {
|
||||
uint32_t b_u_b_v;
|
||||
uint32_t c_u_c_v;
|
||||
|
||||
sprite_type_1(const uint32_t parameter_control_word,
|
||||
constexpr sprite_type_1(const uint32_t parameter_control_word,
|
||||
const float a_x,
|
||||
const float a_y,
|
||||
const float a_z,
|
||||
@ -984,7 +984,7 @@ namespace ta_vertex_parameter {
|
||||
uint32_t _res4;
|
||||
uint32_t _res5;
|
||||
|
||||
modifier_volume(const uint32_t parameter_control_word,
|
||||
constexpr modifier_volume(const uint32_t parameter_control_word,
|
||||
const float a_x,
|
||||
const float a_y,
|
||||
const float a_z,
|
||||
|
@ -94,7 +94,7 @@ def parse(rows, expected_offset, expected_sizes):
|
||||
return declarations
|
||||
|
||||
def render_initializer(declaration, get_type):
|
||||
initializer = f"{declaration.name}("
|
||||
initializer = f"constexpr {declaration.name}("
|
||||
padding = " " * len(initializer)
|
||||
def start(i):
|
||||
if i == 0:
|
||||
|
Loading…
x
Reference in New Issue
Block a user