Search
lxdream.org :: lxdream/src/pvr2/pvr2.h :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/pvr2/pvr2.h
changeset 284:808617ee7135
prev282:01e53698ff38
next292:3b78f6d301b7
author nkeynes
date Mon Jan 15 08:32:09 2007 +0000 (13 years ago)
permissions -rw-r--r--
last change Break vram routines out into pvr2mem.c
Initial (untested) implementation of stride textures
Hookup YUV converter code in pvr2.c
file annotate diff log raw
1.1 --- a/src/pvr2/pvr2.h Sun Jan 14 11:43:00 2007 +0000
1.2 +++ b/src/pvr2/pvr2.h Mon Jan 15 08:32:09 2007 +0000
1.3 @@ -1,5 +1,5 @@
1.4 /**
1.5 - * $Id: pvr2.h,v 1.19 2007-01-14 11:43:00 nkeynes Exp $
1.6 + * $Id: pvr2.h,v 1.20 2007-01-15 08:32:09 nkeynes Exp $
1.7 *
1.8 * PVR2 (video chip) functions and macros.
1.9 *
1.10 @@ -100,11 +100,13 @@
1.11 #define PVR2_TEX_COMPRESSED 0x40000000
1.12 #define PVR2_TEX_FORMAT_MASK 0x38000000
1.13 #define PVR2_TEX_UNTWIDDLED 0x04000000
1.14 +#define PVR2_TEX_STRIDE 0x02000000
1.15
1.16 #define PVR2_TEX_ADDR(x) ( ((x)&0x01FFFFF)<<3 );
1.17 #define PVR2_TEX_IS_MIPMAPPED(x) ( (x) & PVR2_TEX_MIPMAP )
1.18 #define PVR2_TEX_IS_COMPRESSED(x) ( (x) & PVR2_TEX_COMPRESSED )
1.19 #define PVR2_TEX_IS_TWIDDLED(x) (((x) & PVR2_TEX_UNTWIDDLED) == 0)
1.20 +#define PVR2_TEX_IS_STRIDE(x) (((x) & 0x06000000) == 0x06000000)
1.21
1.22 /****************************** Frame Buffer *****************************/
1.23
1.24 @@ -126,6 +128,15 @@
1.25 void pvr2_vram64_read( char *dest, sh4addr_t src, uint32_t length );
1.26
1.27 /**
1.28 + * Read an image from the interleaved memory address space (aka 64-bit address space)
1.29 + * where the source and destination line sizes may differ. Note that both byte
1.30 + * counts must be a multiple of 4, and the src address must be 32-bit aligned.
1.31 + */
1.32 +void pvr2_vram64_read_stride( char *dest, sh4addr_t src, uint32_t src_line_bytes,
1.33 + uint32_t dest_line_bytes, uint32_t line_count );
1.34 +
1.35 +
1.36 +/**
1.37 * Dump a portion of vram to a stream from the interleaved memory address
1.38 * space.
1.39 */
1.40 @@ -156,7 +167,9 @@
1.41 /**
1.42 * Initialize the YUV converter.
1.43 */
1.44 -void pvr2_yuv_init( uint32_t target_addr, uint32_t config );
1.45 +void pvr2_yuv_init( uint32_t target_addr );
1.46 +
1.47 +void pvr2_yuv_set_config( uint32_t config );
1.48
1.49 /********************************* Renderer ******************************/
1.50
.