From 45d4d68d23463b9c5b10b3e440490950b0198e6a Mon Sep 17 00:00:00 2001 From: Zack Buhman Date: Mon, 1 Sep 2025 16:02:12 -0500 Subject: [PATCH] vdp2: add vdp2_rotation_parameter_table --- vdp2.h | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/vdp2.h b/vdp2.h index 2d69c16..871498e 100644 --- a/vdp2.h +++ b/vdp2.h @@ -978,3 +978,39 @@ enum clofsl_bit { #define PATTERN_NAME_TABLE_1WORD__PALETTE(n) (((n) & 0b1111) << 12) #define PATTERN_NAME_TABLE_1WORD__CHARACTER(n) (((n) & 0x3ff) << 0) + +// +// rotation screen +// + +struct vdp2_rotation_parameter_table { + int32_t screen_start_coordinate_xst; + int32_t screen_start_coordinate_yst; + int32_t screen_start_coordinate_zst; + int32_t screen_vertical_coordinate_increment_dxst; + int32_t screen_vertical_coordinate_increment_dyst; + int32_t screen_horizontal_coordinate_increment_dx; + int32_t screen_horizontal_coordinate_increment_dy; + int32_t rotation_matrix_parameter_a; + int32_t rotation_matrix_parameter_b; + int32_t rotation_matrix_parameter_c; + int32_t rotation_matrix_parameter_d; + int32_t rotation_matrix_parameter_e; + int32_t rotation_matrix_parameter_f; + int16_t viewpoint_coordinate_px; + int16_t viewpoint_coordinate_py; + int16_t viewpoint_coordinate_pz; + int16_t _pad0; + int16_t center_point_coordinate_px; + int16_t center_point_coordinate_py; + int16_t center_point_coordinate_pz; + int16_t _pad1; + int32_t horizontal_shift_mx; + int32_t horizontal_shift_my; + int32_t scaling_coefficient_kx; + int32_t scaling_coefficient_ky; + int32_t coefficient_table_start_address_kast; + int32_t coefficient_table_vertical_address_increment_dkast; + int32_t coefficient_table_horizontal_address_increment_dkax; +}; +static_assert((sizeof (struct vdp2_rotation_parameter_table)) == 0x60);