nkeynes@103 | 1 | /**
|
nkeynes@191 | 2 | * $Id: pvr2mmio.h,v 1.5 2006-08-02 06:24:08 nkeynes Exp $
|
nkeynes@103 | 3 | *
|
nkeynes@103 | 4 | * PVR2 (video chip) MMIO register definitions.
|
nkeynes@103 | 5 | *
|
nkeynes@103 | 6 | * Copyright (c) 2005 Nathan Keynes.
|
nkeynes@103 | 7 | *
|
nkeynes@103 | 8 | * This program is free software; you can redistribute it and/or modify
|
nkeynes@103 | 9 | * it under the terms of the GNU General Public License as published by
|
nkeynes@103 | 10 | * the Free Software Foundation; either version 2 of the License, or
|
nkeynes@103 | 11 | * (at your option) any later version.
|
nkeynes@103 | 12 | *
|
nkeynes@103 | 13 | * This program is distributed in the hope that it will be useful,
|
nkeynes@103 | 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
nkeynes@103 | 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
nkeynes@103 | 16 | * GNU General Public License for more details.
|
nkeynes@103 | 17 | */
|
nkeynes@103 | 18 |
|
nkeynes@103 | 19 | #include "mmio.h"
|
nkeynes@103 | 20 |
|
nkeynes@103 | 21 | MMIO_REGION_BEGIN( 0x005F8000, PVR2, "Power VR/2" )
|
nkeynes@189 | 22 | LONG_PORT( 0x000, PVRID, PORT_R, 0x17FD11DB, "PVR2 Core ID" )
|
nkeynes@189 | 23 | LONG_PORT( 0x004, PVRVER, PORT_R, 0x00000011, "PVR2 Core Version" )
|
nkeynes@189 | 24 | LONG_PORT( 0x008, PVRRST, PORT_MRW, 0, "PVR2 Reset" )
|
nkeynes@191 | 25 | LONG_PORT( 0x014, RENDER_START, PORT_W, 0, "Start render" )
|
nkeynes@191 | 26 | LONG_PORT( 0x018, PVRUNK1, PORT_MRW, 0, "PVR2 unknown register 1" )
|
nkeynes@191 | 27 | LONG_PORT( 0x020, RENDER_POLYBASE, PORT_MRW, 0, "Object buffer base offset" )
|
nkeynes@191 | 28 | LONG_PORT( 0x02C, RENDER_TILEBASE, PORT_MRW, 0, "Tile buffer base offset" )
|
nkeynes@191 | 29 | LONG_PORT( 0x030, RENDER_TSPCFG, PORT_MRW, 0, "TSP config?" )
|
nkeynes@103 | 30 | LONG_PORT( 0x040, DISPBORDER, PORT_MRW, 0, "Border Colour (RGB)" )
|
nkeynes@103 | 31 | LONG_PORT( 0x044, DISPMODE, PORT_MRW, 0, "Display Mode" )
|
nkeynes@191 | 32 | LONG_PORT( 0x048, RENDER_MODE, PORT_MRW, 0, "Rendering Mode" )
|
nkeynes@191 | 33 | LONG_PORT( 0x04C, RENDER_SIZE, PORT_MRW, 0, "Rendering width (bytes/2)" )
|
nkeynes@103 | 34 | LONG_PORT( 0x050, DISPADDR1, PORT_MRW, 0, "Video memory base 1" )
|
nkeynes@103 | 35 | LONG_PORT( 0x054, DISPADDR2, PORT_MRW, 0, "Video memory base 2" )
|
nkeynes@103 | 36 | LONG_PORT( 0x05C, DISPSIZE, PORT_MRW, 0, "Display size" )
|
nkeynes@191 | 37 | LONG_PORT( 0x060, RENDER_ADDR1, PORT_MRW, 0, "Rendering memory base 1" )
|
nkeynes@191 | 38 | LONG_PORT( 0x064, RENDER_ADDR2, PORT_MRW, 0, "Rendering memory base 2" )
|
nkeynes@191 | 39 | LONG_PORT( 0x068, RENDER_HCLIP, PORT_MRW, 0, "Horizontal clipping area" )
|
nkeynes@191 | 40 | LONG_PORT( 0x06C, RENDER_VCLIP, PORT_MRW, 0, "Vertical clipping area" )
|
nkeynes@191 | 41 | LONG_PORT( 0x074, RENDER_SHADOW, PORT_MRW, 0, "Shadowing" )
|
nkeynes@191 | 42 | LONG_PORT( 0x078, RENDER_NEARCLIP, PORT_MRW, 0, "Object clip distance (float32)" )
|
nkeynes@191 | 43 | LONG_PORT( 0x07C, RENDER_OBJCFG, PORT_MRW, 0, "Object config" )
|
nkeynes@191 | 44 | LONG_PORT( 0x084, RENDER_TSPCLIP, PORT_MRW, 0, "Texture clip distance (float32)" )
|
nkeynes@191 | 45 | LONG_PORT( 0x088, RENDER_FARCLIP, PORT_MRW, 0, "Background plane depth (float32)" )
|
nkeynes@191 | 46 | LONG_PORT( 0x08C, RENDER_BGPLANE, PORT_MRW, 0, "Background plane config" )
|
nkeynes@191 | 47 | LONG_PORT( 0x098, RENDER_ISPCFG, PORT_MRW, 0, "ISP config" )
|
nkeynes@191 | 48 | LONG_PORT( 0x0B0, RENDER_FOGTBLCOL, PORT_MRW, 0, "Fog table colour" )
|
nkeynes@191 | 49 | LONG_PORT( 0x0B4, RENDER_FOGVRTCOL, PORT_MRW, 0, "Fog vertex colour" )
|
nkeynes@191 | 50 | LONG_PORT( 0x0B8, RENDER_FOGCOEFF, PORT_MRW, 0, "Fog density coefficient (float16)" )
|
nkeynes@191 | 51 | LONG_PORT( 0x0BC, RENDER_CLAMPHI, PORT_MRW, 0, "Clamp high colour" )
|
nkeynes@191 | 52 | LONG_PORT( 0x0C0, RENDER_CLAMPLO, PORT_MRW, 0, "Clamp low colour" )
|
nkeynes@103 | 53 | LONG_PORT( 0x0C4, GUNPOS, PORT_MRW, 0, "Lightgun position" )
|
nkeynes@189 | 54 | LONG_PORT( 0x0C8, HPOS_IRQ, PORT_MRW, 0, "Raster horizontal event position" )
|
nkeynes@103 | 55 | LONG_PORT( 0x0CC, VPOS_IRQ, PORT_MRW, 0, "Raster event position" )
|
nkeynes@103 | 56 | LONG_PORT( 0x0D0, DISPCFG, PORT_MRW, 0, "Sync configuration & enable" )
|
nkeynes@103 | 57 | LONG_PORT( 0x0D4, HBORDER, PORT_MRW, 0, "Horizontal border area" )
|
nkeynes@103 | 58 | LONG_PORT( 0x0D8, REFRESH, PORT_MRW, 0, "Refresh rates?" )
|
nkeynes@103 | 59 | LONG_PORT( 0x0DC, VBORDER, PORT_MRW, 0, "Vertical border area" )
|
nkeynes@103 | 60 | LONG_PORT( 0x0E0, SYNCPOS, PORT_MRW, 0, "Sync pulse timing" )
|
nkeynes@191 | 61 | LONG_PORT( 0x0E4, RENDER_TEXSIZE, PORT_MRW, 0, "Texture modulo width" )
|
nkeynes@103 | 62 | LONG_PORT( 0x0E8, DISPCFG2, PORT_MRW, 0, "Video configuration 2" )
|
nkeynes@103 | 63 | LONG_PORT( 0x0F0, VPOS, PORT_MRW, 0, "Vertical display position" )
|
nkeynes@103 | 64 | LONG_PORT( 0x0F4, SCALERCFG, PORT_MRW, 0, "Scaler configuration (?)" )
|
nkeynes@191 | 65 | LONG_PORT( 0x108, RENDER_PALETTE, PORT_MRW, 0, "Palette configuration" )
|
nkeynes@103 | 66 | LONG_PORT( 0x10C, BEAMPOS, PORT_R, 0, "Raster beam position" )
|
nkeynes@189 | 67 | LONG_PORT( 0x124, TA_TILEBASE, PORT_MRW, 0, "TA Tile matrix start" )
|
nkeynes@189 | 68 | LONG_PORT( 0x128, TA_POLYBASE, PORT_MRW, 0, "TA Polygon buffer start" )
|
nkeynes@189 | 69 | LONG_PORT( 0x12C, TA_TILEEND, PORT_MRW, 0, "TA Tile matrix end" )
|
nkeynes@189 | 70 | LONG_PORT( 0x130, TA_POLYEND, PORT_MRW, 0, "TA Polygon buffer end" )
|
nkeynes@189 | 71 | LONG_PORT( 0x134, TA_LISTPOS, PORT_R, 0, "TA Tile list position" )
|
nkeynes@189 | 72 | LONG_PORT( 0x138, TA_POLYPOS, PORT_R, 0, "TA Polygon buffer position" )
|
nkeynes@189 | 73 | LONG_PORT( 0x13C, TA_TILESIZE, PORT_MRW, 0, "TA Tile matrix size" )
|
nkeynes@189 | 74 | LONG_PORT( 0x140, TA_TILECFG, PORT_MRW, 0, "TA Tile matrix config" )
|
nkeynes@189 | 75 | LONG_PORT( 0x144, TA_INIT, PORT_W, 0, "TA Initialize" )
|
nkeynes@189 | 76 | LONG_PORT( 0x164, TA_LISTBASE, PORT_MRW, 0, "TA Tile list start" )
|
nkeynes@103 | 77 | MMIO_REGION_END
|
nkeynes@103 | 78 |
|
nkeynes@103 | 79 | MMIO_REGION_BEGIN( 0x005F9000, PVR2PAL, "Power VR/2 CLUT Palettes" )
|
nkeynes@103 | 80 | LONG_PORT( 0x000, PAL0_0, PORT_MRW, 0, "Pal0 colour 0" )
|
nkeynes@103 | 81 | MMIO_REGION_END
|
nkeynes@103 | 82 |
|
nkeynes@103 | 83 | MMIO_REGION_BEGIN( 0x10000000, PVR2TA, "Power VR/2 TA Command port" )
|
nkeynes@103 | 84 | LONG_PORT( 0x000, TACMD, PORT_MRW, 0, "TA Command port" )
|
nkeynes@103 | 85 | MMIO_REGION_END
|