1.1 --- a/src/pvr2/pvr2mem.c Wed Jul 30 22:50:44 2008 +0000
1.2 +++ b/src/pvr2/pvr2mem.c Sun Aug 24 02:57:15 2008 +0000
1.4 unsigned char *dest = mem_get_region(destaddr);
1.5 memcpy( dest, src, count );
1.11 void pvr2_vram64_write( sh4addr_t destaddr, unsigned char *src, uint32_t length )
1.14 banks[0] = ((uint32_t *)(video_base + ((destaddr & 0x007FFFF8) >>1)));
1.15 banks[1] = banks[0] + 0x100000;
1.20 /* Handle non-aligned start of source */
1.22 while( length-- > 0 ) {
1.31 * The destaddr must be 32-bit aligned, and both line_bytes and line_stride_bytes
1.32 * must be multiples of 4.
1.34 -void pvr2_vram64_write_stride( sh4addr_t destaddr, unsigned char *src, uint32_t line_bytes,
1.35 +void pvr2_vram64_write_stride( sh4addr_t destaddr, unsigned char *src, uint32_t line_bytes,
1.36 uint32_t line_stride_bytes, uint32_t line_count )
1.38 int bank_flag = (destaddr & 0x04) >> 2;
1.41 banks[0] = (uint32_t *)(video_base + (destaddr >>1));
1.42 banks[1] = banks[0] + 0x100000;
1.47 dwsrc = (uint32_t *)src;
1.50 bank_flag = !bank_flag;
1.59 bank_flag = !bank_flag;
1.70 - * Read an image from 64-bit vram stored as twiddled 4-bit pixels. The
1.71 + * Read an image from 64-bit vram stored as twiddled 4-bit pixels. The
1.72 * image is written out to the destination in detwiddled form.
1.73 * @param dest destination buffer, which must be at least width*height/2 in length
1.74 * @param srcaddr source address in vram
1.75 @@ -335,11 +335,11 @@
1.78 pvr2_vram64_detwiddle_4( wdest, banks, offset_flag, 0, 0, width, stride );
1.84 - * Read an image from 64-bit vram stored as twiddled 8-bit pixels. The
1.85 + * Read an image from 64-bit vram stored as twiddled 8-bit pixels. The
1.86 * image is written out to the destination in detwiddled form.
1.87 * @param dest destination buffer, which must be at least width*height in length
1.88 * @param srcaddr source address in vram
1.89 @@ -377,11 +377,11 @@
1.92 pvr2_vram64_detwiddle_8( wdest, banks, offset_flag, 0, 0, width, width );
1.98 - * Read an image from 64-bit vram stored as twiddled 16-bit pixels. The
1.99 + * Read an image from 64-bit vram stored as twiddled 16-bit pixels. The
1.100 * image is written out to the destination in detwiddled form.
1.101 * @param dest destination buffer, which must be at least width*height*2 in length
1.102 * @param srcaddr source address in vram (must be 16-bit aligned)
1.103 @@ -419,7 +419,7 @@
1.104 *wdest = *banks[0];
1.106 pvr2_vram64_detwiddle_16( wdest, banks, offset_flag, 0, 0, width, width );
1.111 void pvr2_vram_write_invert( sh4addr_t destaddr, unsigned char *src, uint32_t length, uint32_t line_length,
1.112 @@ -500,7 +500,7 @@
1.116 -void pvr2_vram64_dump( sh4addr_t addr, uint32_t length, FILE *f )
1.117 +void pvr2_vram64_dump( sh4addr_t addr, uint32_t length, FILE *f )
1.119 unsigned char tmp[length];
1.120 pvr2_vram64_read( tmp, addr, length );
1.121 @@ -513,9 +513,11 @@
1.122 * Flush the indicated render buffer back to PVR. Caller is responsible for
1.123 * tracking whether there is actually anything in the buffer.
1.125 + * FIXME: Handle horizontal scaler
1.127 * @param buffer A render buffer indicating the address to store to, and the
1.128 * format the data needs to be in.
1.129 - * @param backBuffer TRUE to flush the back buffer, FALSE for
1.130 + * @param backBuffer TRUE to flush the back buffer, FALSE for
1.131 * the front buffer.
1.133 void pvr2_render_buffer_copy_to_sh4( render_buffer_t buffer )