Search
lxdream.org :: lxdream :: r98:7b59bca968e9
lxdream 0.9.1
released Jun 29
Download Now
changeset98:7b59bca968e9
parent97:437d00238f74
child99:78cbd52afb8d
authornkeynes
dateWed Feb 15 12:40:20 2006 +0000 (14 years ago)
Add quick-and-dirty hack to print vertex data
src/pvr2/pvr2.c
1.1 --- a/src/pvr2/pvr2.c Wed Feb 15 12:39:34 2006 +0000
1.2 +++ b/src/pvr2/pvr2.c Wed Feb 15 12:40:20 2006 +0000
1.3 @@ -1,5 +1,5 @@
1.4 /**
1.5 - * $Id: pvr2.c,v 1.14 2006-02-05 04:05:27 nkeynes Exp $
1.6 + * $Id: pvr2.c,v 1.15 2006-02-15 12:40:20 nkeynes Exp $
1.7 *
1.8 * PVR2 (Video) MMIO and supporting functions.
1.9 *
1.10 @@ -47,6 +47,7 @@
1.11 register_io_region( &mmio_region_PVR2TA );
1.12 video_base = mem_get_region_by_name( MEM_REGION_VIDEO );
1.13 video_driver = &video_gtk_driver;
1.14 + video_driver->set_output_format( 640, 480, COLFMT_RGB32 );
1.15 }
1.16
1.17 uint32_t pvr2_time_counter = 0;
1.18 @@ -180,6 +181,14 @@
1.19 float blue;
1.20 };
1.21
1.22 +struct vertex_type1 {
1.23 + uint32_t command;
1.24 + float x, y, z;
1.25 + uint32_t blank, blank2;
1.26 + uint32_t col;
1.27 + float f;
1.28 +};
1.29 +
1.30 int32_t mmio_region_PVR2TA_read( uint32_t reg )
1.31 {
1.32 return 0xFFFFFFFF;
1.33 @@ -201,7 +210,12 @@
1.34 int count = length >> 5;
1.35 for( i=0; i<count; i++ ){
1.36 unsigned int type = (cmd_list[i].command >> 24) & 0xFF;
1.37 - DEBUG( "PVR2 cmd: %08X %08X %08X %08X %08X %08X %08X %08X", cmd_list[i].command, cmd_list[i].param1, cmd_list[i].param2, cmd_list[i].texture, cmd_list[i].alpha, cmd_list[i].red, cmd_list[i].green, cmd_list[i].blue );
1.38 + if( type == 0xE0 || type == 0xF0 ) {
1.39 + struct vertex_type1 *vert = (struct vertex_type1 *)&cmd_list[i];
1.40 + DEBUG( "PVR2 vrt: %f %f %f %08X %08X %08X %f", vert->x, vert->y, vert->z, vert->blank, vert->blank2, vert->col, vert->f );
1.41 + } else {
1.42 + DEBUG( "PVR2 cmd: %08X %08X %08X %08X %08X %08X %08X %08X", cmd_list[i].command, cmd_list[i].param1, cmd_list[i].param2, cmd_list[i].texture, cmd_list[i].alpha, cmd_list[i].red, cmd_list[i].green, cmd_list[i].blue );
1.43 + }
1.44 if( type == 0 ) {
1.45 /* End of list */
1.46 switch( pvr2_last_poly_type ) {
.