|
| | CESTER_TEST (dpcs_basic, gte_tests, gte_set_far_color(0x1000, 0x1000, 0x1000);cop2_put(6, 0x00808080);cop2_put(8, 0x0800);gte_clear_flag();cop2_cmd(COP2_DPCS(1, 0));int32_t mac1, mac2, mac3;uint32_t rgb2;cop2_get(25, mac1);cop2_get(26, mac2);cop2_get(27, mac3);cop2_get(22, rgb2);ramsyscall_printf("DPCS: MAC=(%d,%d,%d) RGB2=0x%08x\n", mac1, mac2, mac3, rgb2);cester_assert_int_eq(3072, mac1);cester_assert_int_eq(3072, mac2);cester_assert_int_eq(3072, mac3);cester_assert_uint_eq(0x00c0c0c0, rgb2);) CESTER_TEST(dpcs_ir0_zero |
| |
| | gte_set_far_color (0xff00, 0xff00, 0xff00) |
| |
| | cop2_put (6, 0x00406080) |
| |
| | cop2_put (8, 0) |
| |
| | gte_clear_flag () |
| |
| | cop2_cmd (COP2_DPCS(1, 0)) |
| |
| | cop2_get (22, rgb2) |
| |
| | cester_assert_uint_eq (0x80, r) |
| |
| | cester_assert_uint_eq (0x60, g) |
| |
| | cester_assert_uint_eq (0x40, b) |
| |
| | CESTER_TEST (dpcs_ir0_max, gte_tests, gte_set_far_color(0x1000, 0x800, 0x400);cop2_put(6, 0x00000000);cop2_put(8, 0x1000);gte_clear_flag();cop2_cmd(COP2_DPCS(1, 0));int32_t mac1, mac2, mac3;cop2_get(25, mac1);cop2_get(26, mac2);cop2_get(27, mac3);ramsyscall_printf("DPCS max: MAC=(%d,%d,%d)\n", mac1, mac2, mac3);cester_assert_int_eq(4096, mac1);cester_assert_int_eq(2048, mac2);cester_assert_int_eq(1024, mac3);) CESTER_TEST(dpcs_code_preserved |
| |
| | gte_set_far_color (0, 0, 0) |
| |
| | cop2_put (6, 0xab102030) |
| |
| | cester_assert_uint_eq (0xab,(rgb2 > > 24) &0xff) |
| |
| | CESTER_TEST (dpct_reads_fifo, gte_tests, gte_set_far_color(0, 0, 0);cop2_put(20, 0x00102030);cop2_put(21, 0x00405060);cop2_put(22, 0x00708090);cop2_put(6, 0xff000000);cop2_put(8, 0);gte_clear_flag();cop2_cmd(COP2_DPCT(1, 0));uint32_t rgb0, rgb1, rgb2;cop2_get(20, rgb0);cop2_get(21, rgb1);cop2_get(22, rgb2);ramsyscall_printf("DPCT: RGB0=0x%08x RGB1=0x%08x RGB2=0x%08x\n", rgb0, rgb1, rgb2);cester_assert_uint_eq(0xff102030, rgb0);cester_assert_uint_eq(0xff405060, rgb1);cester_assert_uint_eq(0xff708090, rgb2);) CESTER_TEST(dcpl_basic |
| |
| | gte_set_far_color (0x1000, 0x1000, 0x1000) |
| |
| | cop2_put (6, 0x00808080) |
| |
| | cop2_put (9, 0x1000) |
| |
| | cop2_put (10, 0x0800) |
| |
| | cop2_put (11, 0x0400) |
| |
| | cop2_cmd (COP2_DCPL(1, 0)) |
| |
| | cop2_get (25, mac1) |
| |
| | cop2_get (26, mac2) |
| |
| | cop2_get (27, mac3) |
| |
| | ramsyscall_printf ("DCPL: MAC=(%d,%d,%d) RGB2=0x%08x\n", mac1, mac2, mac3, rgb2) |
| |
| | cester_assert_int_eq (2048, mac1) |
| |
| | cester_assert_int_eq (1024, mac2) |
| |
| | cester_assert_int_eq (512, mac3) |
| |
| | cester_assert_uint_eq (0x00204080, rgb2) |
| |
| | CESTER_TEST (dcpl_with_depth, gte_tests, gte_set_far_color(0x1000, 0x1000, 0x1000);cop2_put(6, 0x00808080);cop2_put(9, 0x1000);cop2_put(10, 0x1000);cop2_put(11, 0x1000);cop2_put(8, 0x0800);gte_clear_flag();cop2_cmd(COP2_DCPL(1, 0));int32_t mac1, mac2, mac3;uint32_t flag;cop2_get(25, mac1);cop2_get(26, mac2);cop2_get(27, mac3);flag=gte_read_flag();ramsyscall_printf("DCPL depth: MAC=(%d,%d,%d) FLAG=0x%08x\n", mac1, mac2, mac3, flag);cester_assert_int_eq(3072, mac1);cester_assert_int_eq(3072, mac2);cester_assert_int_eq(3072, mac3);cester_assert_uint_eq(0x00000000, flag);) CESTER_TEST(intpl_basic |
| |
| | gte_set_far_color (0x1000, 0x2000, 0x3000) |
| |
| | cop2_put (9, 0x100) |
| |
| | cop2_put (10, 0x200) |
| |
| | cop2_put (11, 0x300) |
| |
| | cop2_cmd (COP2_INTPL(1, 0)) |
| |
| | cester_assert_int_eq (0x100, mac1) |
| |
| | cester_assert_int_eq (0x200, mac2) |
| |
| | cester_assert_int_eq (0x300, mac3) |
| |
| | CESTER_TEST (intpl_half, gte_tests, gte_set_far_color(0x1000, 0x1000, 0x1000);cop2_put(9, 0);cop2_put(10, 0);cop2_put(11, 0);cop2_put(8, 0x0800);gte_clear_flag();cop2_cmd(COP2_INTPL(1, 0));int32_t mac1, mac2, mac3;cop2_get(25, mac1);cop2_get(26, mac2);cop2_get(27, mac3);ramsyscall_printf("INTPL half: MAC=(%d,%d,%d)\n", mac1, mac2, mac3);cester_assert_int_eq(2048, mac1);cester_assert_int_eq(2048, mac2);cester_assert_int_eq(2048, mac3);) CESTER_TEST(intpl_color_push |
| |
| | cop2_put (9, 0x0ff0) |
| |
| | cop2_put (11, 0x0010) |
| |
| | cop2_put (6, 0xcc000000) |
| |
| | cester_assert_uint_eq (255, r) |
| |
| | cester_assert_uint_eq (128, g) |
| |
| | cester_assert_uint_eq (1, b) |
| |
| | cester_assert_uint_eq (0xcc, cd) |
| |