Search
lxdream.org :: lxdream/src/pvr2/pvr2.h :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/pvr2/pvr2.h
changeset 1:eea311cfd33e
next19:9da7a8e38f9d
author nkeynes
date Sat Mar 13 00:03:32 2004 +0000 (20 years ago)
permissions -rw-r--r--
last change This commit was generated by cvs2svn to compensate for changes in r2,
which included commits to RCS files with non-trunk default branches.
file annotate diff log raw
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/src/pvr2/pvr2.h Sat Mar 13 00:03:32 2004 +0000
1.3 @@ -0,0 +1,81 @@
1.4 +#include "mmio.h"
1.5 +
1.6 +MMIO_REGION_BEGIN( 0x005F8000, PVR2, "Power VR/2" )
1.7 + LONG_PORT( 0x000, PVRID, PORT_MR, 0x17FD11DB, "PVR2 Core ID" )
1.8 + LONG_PORT( 0x004, PVRVER, PORT_MR, 0x00000011, "PVR2 Core Version" )
1.9 + LONG_PORT( 0x008, PVRRST, PORT_MR, 0, "PVR2 Reset" )
1.10 + LONG_PORT( 0x014, RENDST, PORT_W, 0, "Start render" )
1.11 + LONG_PORT( 0x020, OBJBASE, PORT_MRW, 0, "Object buffer base offset" )
1.12 + LONG_PORT( 0x02C, TILEBASE, PORT_MRW, 0, "Tile buffer base offset" )
1.13 + LONG_PORT( 0x040, PVRBCOL, PORT_MRW, 0, "Border Colour (RGB)" )
1.14 + LONG_PORT( 0x044, DISPMODE, PORT_MRW, 0, "Display Mode" )
1.15 + LONG_PORT( 0x048, RENDMODE, PORT_MRW, 0, "Rendering Mode" )
1.16 + LONG_PORT( 0x04C, RENDSIZE, PORT_MRW, 0, "Rendering width (bytes/2)" )
1.17 + LONG_PORT( 0x050, DISPADDR1, PORT_MRW, 0, "Video memory base 1" )
1.18 + LONG_PORT( 0x054, DISPADDR2, PORT_MRW, 0, "Video memory base 2" )
1.19 + LONG_PORT( 0x05C, DISPSIZE, PORT_MRW, 0, "Display size" )
1.20 + LONG_PORT( 0x060, RENDADDR1, PORT_MRW, 0, "Rendering memory base 1" )
1.21 + LONG_PORT( 0x064, RENDADDR2, PORT_MRW, 0, "Rendering memory base 2" )
1.22 + LONG_PORT( 0x068, HCLIP, PORT_MRW, 0, "Horizontal clipping area" )
1.23 + LONG_PORT( 0x06C, VCLIP, PORT_MRW, 0, "Vertical clipping area" )
1.24 +LONG_PORT( 0x074, SHADOW, PORT_MRW, 0, "Shadowing" )
1.25 + LONG_PORT( 0x078, OBJCLIP, PORT_MRW, 0, "Object clip distance (float32)" )
1.26 + LONG_PORT( 0x084, TSPCLIP, PORT_MRW, 0, "Texture clip distance (float32)" )
1.27 + LONG_PORT( 0x088, BGPLANEZ, PORT_MRW, 0, "Background plane depth (float32)" )
1.28 + LONG_PORT( 0x08C, BGPLANECFG, PORT_MRW, 0, "Background plane config" )
1.29 + LONG_PORT( 0x0B0, FGTBLCOL, PORT_MRW, 0, "Fog table colour" )
1.30 + LONG_PORT( 0x0B4, FGVRTCOL, PORT_MRW, 0, "Fog vertex colour" )
1.31 + LONG_PORT( 0x0B8, FGCOEFF, PORT_MRW, 0, "Fog density coefficient (float16)" )
1.32 + LONG_PORT( 0x0BC, CLAMPHI, PORT_MRW, 0, "Clamp high colour" )
1.33 + LONG_PORT( 0x0C0, CLAMPLO, PORT_MRW, 0, "Clamp low colour" )
1.34 + LONG_PORT( 0x0C4, GUNPOS, PORT_MRW, 0, "Lightgun position" )
1.35 + LONG_PORT( 0x0CC, EVTPOS, PORT_MRW, 0, "Raster event position" )
1.36 + LONG_PORT( 0x0D0, VIDCFG, PORT_MRW, 0, "Sync configuration & enable" )
1.37 + LONG_PORT( 0x0D4, HBORDER, PORT_MRW, 0, "Horizontal border area" )
1.38 + LONG_PORT( 0x0D8, REFRESH, PORT_MRW, 0, "Refresh rates?" )
1.39 + LONG_PORT( 0x0DC, VBORDER, PORT_MRW, 0, "Vertical border area" )
1.40 + LONG_PORT( 0x0E0, SYNCPOS, PORT_MRW, 0, "Sync pulse timing" )
1.41 + LONG_PORT( 0x0E4, TSPCFG, PORT_MRW, 0, "Texture modulo width" )
1.42 + LONG_PORT( 0x0E8, VIDCFG2, PORT_MRW, 0, "Video configuration 2" )
1.43 + LONG_PORT( 0x0F0, VPOS, PORT_MRW, 0, "Vertical display position" )
1.44 + LONG_PORT( 0x0F4, SCALERCFG, PORT_MRW, 0, "Scaler configuration (?)" )
1.45 + LONG_PORT( 0x10C, BEAMPOS, PORT_R, 0, "Raster beam position" )
1.46 + LONG_PORT( 0x124, TAOPBST, PORT_MRW, 0, "TA Object Pointer Buffer start" )
1.47 + LONG_PORT( 0x128, TAOBST, PORT_MRW, 0, "TA Object Buffer start" )
1.48 + LONG_PORT( 0x12C, TAOPBEN, PORT_MRW, 0, "TA Object Pointer Buffer end" )
1.49 + LONG_PORT( 0x130, TAOBEN, PORT_MRW, 0, "TA Object Buffer end" )
1.50 + LONG_PORT( 0x134, TAOPBPOS, PORT_MRW, 0, "TA Object Pointer Buffer position" )
1.51 + LONG_PORT( 0x138, TAOBPOS, PORT_MRW, 0, "TA Object Buffer position" )
1.52 + LONG_PORT( 0x13C, TATBSZ, PORT_MRW, 0, "TA Tile Buffer size" )
1.53 + LONG_PORT( 0x140, TAOPBCFG, PORT_MRW, 0, "TA Object Pointer Buffer config" )
1.54 + LONG_PORT( 0x144, TAINIT, PORT_MRW, 0, "TA Initialize" )
1.55 + LONG_PORT( 0x164, TAOPLST, PORT_MRW, 0, "TA Object Pointer List start" )
1.56 +MMIO_REGION_END
1.57 +
1.58 +
1.59 +#define DISPMODE_DE 0x00000001 /* Display enable */
1.60 +#define DISPMODE_SD 0x00000002 /* Scan double */
1.61 +#define DISPMODE_COL 0x0000000C /* Colour mode */
1.62 +#define DISPMODE_CD 0x08000000 /* Clock double */
1.63 +
1.64 +#define MODE_RGB15 0x00000000
1.65 +#define MODE_RGB16 0x00000040
1.66 +#define MODE_RGB24 0x00000080
1.67 +#define MODE_RGB32 0x000000C0
1.68 +
1.69 +#define DISPSIZE_MODULO 0x3FF00000 /* line skip +1 (32-bit words)*/
1.70 +#define DISPSIZE_LPF 0x000FFC00 /* lines per field */
1.71 +#define DISPSIZE_PPL 0x000003FF /* pixel words (32 bit) per line */
1.72 +
1.73 +#define VIDCFG_VP 0x00000001 /* V-sync polarity */
1.74 +#define VIDCFG_HP 0x00000002 /* H-sync polarity */
1.75 +#define VIDCFG_I 0x00000010 /* Interlace enable */
1.76 +#define VIDCFG_BS 0x000000C0 /* Broadcast standard */
1.77 +#define VIDCFG_VO 0x00000100 /* Video output enable */
1.78 +
1.79 +#define BS_NTSC 0x00000000
1.80 +#define BS_PAL 0x00000040
1.81 +#define BS_PALM 0x00000080 /* ? */
1.82 +#define BS_PALN 0x000000C0 /* ? */
1.83 +
1.84 +void pvr2_next_frame( void );
.