software_ta: gouraud shading experiment
This commit is contained in:
parent
59708cc3cf
commit
38b4dda6ab
@ -166,7 +166,7 @@ clean:
|
||||
-regextype posix-egrep \
|
||||
-regex '.*\.(iso|o|d|bin|elf|cue|gch)$$' \
|
||||
-exec rm {} \;
|
||||
rm 1ST_READ.BIN
|
||||
rm -f 1ST_READ.BIN
|
||||
|
||||
.SUFFIXES:
|
||||
.INTERMEDIATE:
|
||||
|
@ -329,7 +329,7 @@ DUMP_OBJECT_LIST_OBJ = \
|
||||
sh7091/serial.o \
|
||||
libm.o
|
||||
|
||||
example/dump_object_list.elf: LDSCRIPT = $(LIB)/main.lds
|
||||
example/dump_object_list.elf: LDSCRIPT = $(LIB)/alt.lds
|
||||
example/dump_object_list.elf: $(START_OBJ) $(DUMP_OBJECT_LIST_OBJ)
|
||||
|
||||
SOFTWARE_TA_OBJ = \
|
||||
@ -342,5 +342,5 @@ SOFTWARE_TA_OBJ = \
|
||||
sh7091/serial.o \
|
||||
libm.o
|
||||
|
||||
example/software_ta.elf: LDSCRIPT = $(LIB)/main.lds
|
||||
example/software_ta.elf: LDSCRIPT = $(LIB)/alt.lds
|
||||
example/software_ta.elf: $(START_OBJ) $(SOFTWARE_TA_OBJ)
|
||||
|
@ -137,7 +137,8 @@ void isp_tsp_parameters(volatile uint32_t * mem, const quad& quad)
|
||||
{
|
||||
auto params = reinterpret_cast<volatile __untextured_quad *>(mem);
|
||||
params->isp_tsp_instruction_word = isp_tsp_instruction_word::depth_compare_mode::greater
|
||||
| isp_tsp_instruction_word::culling_mode::no_culling;
|
||||
| isp_tsp_instruction_word::culling_mode::no_culling
|
||||
| isp_tsp_instruction_word::gouraud_shading;
|
||||
|
||||
params->tsp_instruction_word = tsp_instruction_word::src_alpha_instr::one
|
||||
| tsp_instruction_word::dst_alpha_instr::zero
|
||||
@ -148,12 +149,12 @@ void isp_tsp_parameters(volatile uint32_t * mem, const quad& quad)
|
||||
params->a.x = quad.a.x;
|
||||
params->a.y = quad.a.y;
|
||||
params->a.z = 0.1f;
|
||||
params->b.color = 0; // invalid
|
||||
params->b.color = 0xff0000ff; // invalid
|
||||
|
||||
params->b.x = quad.b.x;
|
||||
params->b.y = quad.b.y;
|
||||
params->b.z = 0.1f;
|
||||
params->b.color = 0; // invalid
|
||||
params->b.color = 0xff00ff00; // invalid
|
||||
|
||||
params->c.x = quad.c.x;
|
||||
params->c.y = quad.c.y;
|
||||
@ -163,7 +164,7 @@ void isp_tsp_parameters(volatile uint32_t * mem, const quad& quad)
|
||||
params->d.x = quad.d.x;
|
||||
params->d.y = quad.d.y;
|
||||
params->d.z = 0.f; // invalid
|
||||
params->b.color = 0; // invalid
|
||||
params->b.color = 0xff00ff00; // invalid
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -7,13 +7,13 @@
|
||||
|
||||
namespace serial {
|
||||
|
||||
void init()
|
||||
void init(uint8_t bit_rate)
|
||||
{
|
||||
using namespace scif;
|
||||
|
||||
sh7091.SCIF.SCSCR2 = 0;
|
||||
sh7091.SCIF.SCSMR2 = 0;
|
||||
sh7091.SCIF.SCBRR2 = 1; // 520833.3
|
||||
sh7091.SCIF.SCBRR2 = bit_rate; // bps = 1562500 / (SCBRR2 + 1)
|
||||
|
||||
sh7091.SCIF.SCFCR2 = scfcr2::tfrst::reset_operation_enabled
|
||||
| scfcr2::rfrst::reset_operation_enabled;
|
||||
|
@ -1,6 +1,6 @@
|
||||
namespace serial {
|
||||
|
||||
void init();
|
||||
void init(uint8_t bit_rate);
|
||||
|
||||
void character(const char c);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user