This document is based on kernel sources, XFree86 sources, open sources
released by nVidia and pure deduction. To make nVidia happy: /***************************************************************************\
|* *|
|* Copyright (c) 1996-1998 NVIDIA, Corp. All rights reserved. *|
|* *|
|* NOTICE TO USER: The source code is copyrighted under U.S. and *|
|* international laws. NVIDIA, Corp. of Sunnyvale, California owns *|
|* the copyright and as design patents pending on the design and *|
|* interface of the NV chips. Users and possessors of this source *|
|* code are hereby granted a nonexclusive, royalty-free copyright *|
|* and design patent license to use this code in individual and *|
|* commercial software. *|
|* *|
|* Any use of this source code must include, in the user documenta- *|
|* tion and internal comments to the code, notices to the end user *|
|* as follows: *|
|* *|
|* Copyright (c) 1996-1998 NVIDIA, Corp. NVIDIA design patents *|
|* pending in the U.S. and foreign countries. *|
|* *|
|* NVIDIA, CORP. MAKES NO REPRESENTATION ABOUT THE SUITABILITY OF *|
|* THIS SOURCE CODE FOR ANY PURPOSE. IT IS PROVIDED "AS IS" WITHOUT *|
|* EXPRESS OR IMPLIED WARRANTY OF ANY KIND. NVIDIA, CORP. DISCLAIMS *|
|* ALL WARRANTIES WITH REGARD TO THIS SOURCE CODE, INCLUDING ALL *|
|* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A *|
|* PARTICULAR PURPOSE. IN NO EVENT SHALL NVIDIA, CORP. BE LIABLE *|
|* FOR ANY SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, *|
|* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR *|
|* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER *|
|* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR *|
|* PERFORMANCE OF THIS SOURCE CODE. *|
|* *|
***************************************************************************/
Rendering
=========
Objects
-------
The Riva rendering engine is an object-oriented hardware. (See the nVidia
docs at https://www.nvidia.com/nv/nvarch.nsf/Home?OpenView -> Documents ->
NV Programmer's Reference Manual) Do not take it serious, it's simplified
for the hardware, it is not like C++.
There are 8 channels for submitting graphical objects to the rendering engine.
Each channel contains 8 subchannels. The rules how channels and subchannels
are working is not clear for me yet.
Each object has a name. The name is 32 bits long and should be unique.
Contexts
--------
Context is a 32 bit record of channel id, object type and pointer to the
object.
Bits 24-30: channel id
Bit 23: rendering
0x0 other object (DMA?)
0x1 renderable object
Bits 16-22: object type
0x41 beta1
0x42 raster operation
0x43 color key
0x44 plane
0x45 clipping rectangle
0x46 pattern
0x47 solid rectangle
0x49 unknown line
0x4A solid line
0x4B solid triangle
0x4C GDI rectangle
0x4E scaled image from memory
0x50 blit
0x51 image from CPU
0x52 bitmap
0x55 streched image from CPU
0x57 DX3 textured triangle
and many more...
Bits 0-15: offset in instance memory (RAMIN)
Each graphic object has a context. Context determines the type (triangle,
raster operation, bitmap, etc) of the object. Don't ask me why this thingy
is called context: I really don't know.
Hash table
----------
The hash table (HT) is located in the instance memory area (RAMIN).
See RAMHT register in section FIFO registers.
The HT contains 8 byte length records of object names and contexts. Each
record is placed in the table by it's hash key. The key is computed as
follows: each byte of the object's name and the channel id are XOR-ed
together, and this value is multiplied by the hash depth. More explanation
on hash tables can be found in database books.
The purpose of HT is to provide connection between object names and contexts
for the graphic hardware. But it may be useful for your software driver too.
FIFO context table
------------------
The FIFO context table (FC) is located in the instance memory area (RAMIN).
See RAMFC register in section FIFO registers.
FC contains the context values for each subchannel. E.g. if FC begins
at 0x1C00:
0x1C00 Context of channel 0, subchannel 0
0x1C04 Context of channel 0, subchannel 1
0x1C08 Context of channel 0, subchannel 2 ...
0x1C1C Context of channel 0, subchannel 7
0x1C20 Context of channel 1, subchannel 0
0x1C24 Context of channel 1, subchannel 1 ...
0x1CFC Context of channel 7, subchannel 7
Memory layout
=============
Three memory regions are accessible via the PCI (or AGP) interface:
- CTRL region (PCI base 0)
- FB region (PCI base 1)
- BIOS ROM (PCI base 2)
CTRL region
-----------
The CTRL region contains memory mapped IO ports. Most of them are 32-bit
registers. The registers are grouped by functionality:
- MC: master control (0x00000000-0x00000FFF)
- BUS: (0x00001000-0x00001FFF)
- FIFO: for DMA and PIO stuff (0x00002000-0x00003FFF)
- TIMER: built-in timer (0x00009000-0x00009FFF)
- VIO: 8 bit SVGA (MISC, GRAPH, SEQ) registers (0x000C0000-0x00C00FFF)
- FB: framebuffer properties (0x00100000-0x00100FFF)
- EXTDEV: external devices (0x00101000-0x00101FFF)
- GRAPH: (0x00400000-0x00401FFF)
- PCIO: 8 bit SVGA (CRTC, ATTR) registers (0x00601000-0x00601FFF)
- RAMDAC: RAMDAC timings (0x00680000-0x00680FFF)
- PDIO: 8 bit registers (0x00681000-0x00681FFF)
(List in not complete.)
FB region
---------
This region contains the video memory and the instance memory.
Video memory begins at offset 0x00000000. Instance memory (RAMIN)
begins at offset 0x00C00000. (Note: Riva TNT (and higher) cards have
their instance memory in the CTRL region.)
Master c
The MC registers begin at 0x00000000 in the CTRL region. They control the
master IRQ.
Interrupt 0 register
--------------------
Name: INTR_0
Offset: 0x00000100
4 bytes, read-write
Bit 0: PAUDIO (-V, read-only)
NOT_PENDING 0x0 (read-only)
PENDING 0x1 (read-only)
Bit 4: PMEDIA (-V, read-only)
NOT_PENDING 0x0 (read-only)
PENDING 0x1 (read-only)
Bit 8: PFIFO (-V, read-only)
NOT_PENDING 0x0 (read-only)
PENDING 0x1 (read-only)
Bit 12: PGRAPH0 (-V, read-only)
NOT_PENDING 0x0 (read-only)
PENDING 0x1 (read-only)
Bit 13: PGRAPH1 (-V, read-only)
NOT_PENDING 0x0 (read-only)
PENDING 0x1 (read-only)
Bit 16: PVIDEO (-V, read-only)
NOT_PENDING 0x0 (read-only)
PENDING 0x1 (read-only)
Bit 20: PTIMER (-V, read-only)
NOT_PENDING 0x0 (read-only)
PENDING 0x1 (read-only)
Bit 24: PFB (-V, read-only)
NOT_PENDING 0x0 (read-only)
PENDING 0x1 (read-only)
Bit 28: PBUS (-V, read-only)
NOT_PENDING 0x0 (read-only)
PENDING 0x1 (read-only)
Bit 31: SOFTWARE (IV, read-write)
NOT_PENDING 0x0 (default, read-write)
PENDING 0x1 (read-write)
Interrupt 0 enable register
---------------------------
Name: INTR_EN_0
Offset: 0x00000140
4 bytes, read-write
Bits 0-1: INTA (IV, read-write)
DISABLED 0x0 (default, read-write)
HARDWARE 0x1 (read-write)
SOFTWARE 0x2 (read-write)
Enable (what?) register
-----------------------
Name: ENABLE
Offset: 0x00000200
4 bytes, read-write
Bus
===
The BUS registers begin at 0x00001000 in the CTRL region. They are
undiscovered.
Debug 0 register
----------------
Name: DEBUG_0
Offset: 0x00001080
4 bytes, read-write
Bit 0: MODE (IV, read-write)
MODE_DISABLED 0x0 (default, read-write)
MODE_ENABLED 0x1 (read-write)
Bit 4: DESKEWER (IV, read-write)
ENABLED 0x0 (default, read-write)
Bits 8-11: FBIO_SCLK_DELAY (IV, read-write)
0x0 (default, read-write)
Bits 12-15: FBIO_FBCLK_DELAY (IV, read-write)
0x3 (default, read-write)
Debug 1 register
----------------
Name: DEBUG_1
Offset: 0x00001084
4 bytes, read-write
Bit 0: PCIM_THROTTLE (IV, read-write)
DISABLED 0x0 (read-write)
ENABLED 0x1 (default, read-write)
Bit 1: PCIM_CMD (IV, read-write)
SIZE_BASED 0x0 (default, read-write)
MRL_ONLY 0x1 (read-write)
Bit 2: PCIM_AGP (IV, read-write)
IS_AGP 0x0 (default, read-write)
IS_PCI 0x1 (read-write)
Bits 3-4: AGPM_CMD (IV, read-write)
HP_ON_1ST 0x0 (read-write)
LP_ONLY 0x1 (default, read-write)
HP_ONLY 0x2 (read-write)
Bit 5: PCIS_WRITE (IV, read-write)
0_CYCLE 0x0 (read-write)
1_CYCLE 0x1 (default, read-write)
Bit 6: PCIS_2_1 (IV, read-write)
DISABLED 0x0 (read-write)
ENABLED 0x1 (default, read-write)
Bit 7: PCIS_RETRY (IV, read-write)
DISABLED 0x0 (read-write)
ENABLED 0x1 (default, read-write)
Bit 8: PCIS_RD_BURST (IV, read-write)
DISABLED 0x0 (default, read-write)
ENABLED 0x1 (read-write)
Bit 9: PCIS_WR_BURST (IV, read-write)
DISABLED 0x0 (default, read-write)
ENABLED 0x1 (read-write)
Bit 10: PCIS_EARLY_RTY (IV, read-write)
DISABLED 0x0 (read-write)
ENABLED 0x1 (default, read-write)
Bit 11: PCIS_RMAIO (IV, read-write)
DISABLED 0x0 (read-write)
ENABLED 0x1 (default, read-write)
Bit 12: PCIS_CPUQ (IV, read-write)
DISABLED 0x0 (read-write)
ENABLED 0x1 (default, read-write)
Bit 13: DPSH_PIPE (IV, read-write)
DISABLED 0x0 (default, read-write)
ENABLED 0x1 (read-write)
Bit 14: SPARE1 (IV, read-write)
ZERO 0x0 (default, read-write)
ONE 0x1 (read-write)
Bit 15: SPARE2 (IV, read-write)
ZERO 0x0 (default, read-write)
ONE 0x1 (read-write)
Bit 16: SPARE3 (IV, read-write)
ZERO 0x0 (default, read-write)
ONE 0x1 (read-write)
FIFO
====
The BUS registers begin at 0x00002000 in the CTRL region.
Interrupt 0 register
--------------------
Name: INTR_0
Offset: 0x00002100
4 bytes, read-write
Bit 0: CACHE_ERROR (XV, read-write)
NOT_PENDING 0x0 (read-only)
PENDING 0x1 (read-only)
RESET 0x1 (write-only)
Bit 4: RUNOUT (XV, read-write)
NOT_PENDING 0x0 (read-only)
PENDING 0x1 (read-only)
RESET 0x1 (write-only)
Bit 8: RUNOUT_OVERFLOW (XV, read-write)
NOT_PENDING 0x0 (read-only)
PENDING 0x1 (read-only)
RESET 0x1 (write-only)
Bit 12: DMA_PUSHER (XV, read-write)
NOT_PENDING 0x0 (read-only)
PENDING 0x1 (read-only)
RESET 0x1 (write-only)
Bit 16: DMA_PTE (XV, read-write)
NOT_PENDING 0x0 (read-only)
PENDING 0x1 (read-only)
RESET 0x1 (write-only)
Interrupt 0 enable register
---------------------------
Name: INTR_EN_0
Offset: 0x00002140
4 bytes, read-write
Bit 0: CACHE_ERROR (IV, read-write)
DISABLED 0x0 (default, read-write)
ENABLED 0x1 (read-write)
Bit 4: RUNOUT (IV, read-write)
DISABLED 0x0 (default, read-write)
ENABLED 0x1 (read-write)
Bit 8: RUNOUT_OVERFLOW (IV, read-write)
DISABLED 0x0 (default, read-write)
ENABLED 0x1 (read-write)
Config 0 register
-----------------
Name: CONFIG_0
Offset: 0x00002200
4 bytes, read-write
Hash table register
-------------------
Hardware hash table offset (in instance memory) and size.
Name: RAMHT
Offset: 0x00002210
4 bytes, read-write
Bits 12-15: BASE_ADDRESS (XV, read-write)
Bits 16-17: SIZE (XV, read-write)
4K 0x0 (default, read-write)
8K 0x1 (read-write)
16K 0x2 (read-write)
32K 0x3 (read-write)
FIFO context table offset
-------------------------
Name: RAMFC
Offset: 0x00002214
4 bytes, read-write
Bits 9-15: BASE_ADDRESS (XV, read-write)
Runout table register
---------------------
FIFO runout table offset and size.
Name: RAMRO
Offset: 0x00002218
4 bytes, read-write
Bits 9-15: BASE_ADDRESS (XV, read-write)
Bit 16: SIZE (XV, read-write)
512 0x0 (default, read-write)
8K 0x1 (read-write)
Runout status register
----------------------
Name: RUNOUT_STATUS
Offset: 0x00002400
4 bytes, read-only
Runout put register
-------------------
Index in runout table.
Name: RUNOUT_PUT
Offset: 0x00002410
4 bytes, read-write
Runout get register
-------------------
Index in runout table.
Name: RUNOUT_GET
Offset: 0x00002420
4 bytes, read-write
Caches register
---------------
Name: CACHES
Offset: 0x00002500
4 bytes, read-write
Bit 0: REASSIGN (IV, read-write)
DISABLED 0x0 (default, read-write)
ENABLED 0x1 (read-write)
Cache 0 push 0 register
-----------------------
Name: CACHE0_PUSH0
Offset: 0x00003000
4 bytes, read-write
Bit 0: ACCESS (IV, read-write)
DISABLED 0x0 (default, read-write)
ENABLED 0x1 (read-write)
Cache 0 push 1 register
-----------------------
Name: CACHE0_PUSH1
Offset: 0x00003004
4 bytes, read-write
Bits 0-6: CHID (XU, read-write)
Cache 0 pull 0 register
-----------------------
Name: CACHE0_PULL0
Offset: 0x00003040
4 bytes, read-write
Bit 0: ACCESS (IV, read-write)
DISABLED 0x0 (default, read-write)
ENABLED 0x1 (read-write)
Cache 1 push 0 register
-----------------------
Name: CACHE1_PUSH0
Offset: 0x00003200
4 bytes, read-write
Bit 0: ACCESS (IV, read-write)
DISABLED 0x0 (default, read-write)
ENABLED 0x1 (read-write)
Cache 1 push 1 register
-----------------------
Name: CACHE1_PUSH1
Offset: 0x00003204
4 bytes, read-write
Bits 0-6: CHID (XU, read-write)
Cache 1 put register
--------------------
Name: CACHE1_PUT
Offset: 0x00003210
4 bytes, read-write
Bits 2-6: ADDRESS (XU, read-write)
Cache 1 DMA 0 register
-----------------------
Name: CACHE1_DMA0
Offset: 0x00003220
4 bytes, read-write
Cache 1 DMA 1 register
-----------------------
Name: CACHE1_DMA1
Offset: 0x00003224
4 bytes, read-write
Cache 1 DMA 2 register
-----------------------
Name: CACHE1_DMA2
Offset: 0x00003228
4 bytes, read-write
Cache 1 pull 0 register
-----------------------
Name: CACHE1_PULL0
Offset: 0x00003240
4 bytes, read-write
Bit 0: ACCESS (IV, read-write)
DISABLED 0x0 (default, read-write)
ENABLED 0x1 (read-write)
Cache 1 pull 1 register
-----------------------
Name: CACHE1_PULL1
Offset: 0x00003250
4 bytes, read-write
Bit 4: CTX (XV, read-write)
CLEAN 0x0 (read-write)
DIRTY 0x1 (read-write)
Cache 1 get register
--------------------
Name: CACHE1_GET
Offset: 0x00003270
4 bytes, read-write
Bits 2-6: ADDRESS (XU, read-write)
Cache 1 context registers
-------------------------
8 context registers for each channel (I guess).
Name: CACHE1_CTX
Offset: 0x00003280+i*16 (0 <= i < 8)
8*16(4?) bytes, read-write
Framebuffer properties
======================
The FB registers begin at 0x00100000 in the CTRL region.
Boot 0 register
---------------
Name: BOOT_0
Offset: 0x00100000
4 bytes, read-write
Bits 0-1: RAM_AMOUNT (IV, read-write)
1MB 0x0 (read-write)
2MB 0x1 (read-write)
4MB 0x2 (read-write)
8MB 0x0 (read-write)
UNDEFINED 0x3 (read-write)
DEFAULT 0x2 (default, read-write)
Bit 2: RAM_WIDTH_128 (-V, read-write)
OFF 0x0 (read-write)
ON 0x1 (read-write)
Bit 3: RAM_BANKS (IV, read-write)
2BANK 0x0 (default, read-write)
4BANK 0x1 (read-write)
Bit 4: RAMDATA_TWIDDLE (IV, read-write)
OFF 0x0 (default, read-write)
ON 0x1 (read-write)
Bit 5: RAM_AMOUNT_EXTENSION (IV, read-write)
OFF 0x0 (default, read-write)
8MB 0x1 (read-write)
Delay 1 register
----------------
Name: DELAY_1
Offset: 0x00100044
4 bytes, read-write
Bits 0-1: WRITE_ENABLE_RISE (IU, read-write)
WRITE_ENABLE_RISE_0 0x0 (default, read-write)
Bits 4-5: WRITE_ENABLE_FALL (IU, read-write)
WRITE_ENABLE_FALL_0 0x0 (default, read-write)
Bits 8-9: CAS_ENABLE_RISE (IU, read-write)
CAS_ENABLE_RISE_0 0x0 (default, read-write)
Bits 12-13: CAS_ENABLE_FALL (IU, read-write)
CAS_ENABLE_FALL_0 0x0 (default, read-write)
Bits 16-17: OUTPUT_DATA (IU, read-write)
OUTPUT_DATA_0 0x0 (default, read-write)
Bits 20-21: RAS_ENABLE (IU, read-write)
RAS_ENABLE_0 0x0 (default, read-write)
Debug 0 register
----------------
Name: DEBUG_0
Offset: 0x00100080
4 bytes, read-write
Bit 4: REFRESH (IV, read-write)
ENABLED 0x0 (default, read-write)
DISABLED 0x1 (read-write)
Green 0 register
----------------
Name: GREEN_0
Offset: 0x001000C0
4 bytes, read-write
Bits 0-1: LEVEL (IV, read-write)
VIDEO_ENABLED 0x0 (read-write)
VIDEO_DISABLED 0x1 (read-write)
TIMING_DISABLED 0x2 (read-write)
MEMORY_DISABLED 0x3 (default, read-write)
Config 0 register
-----------------
Name: CONFIG_0
Offset: 0x00100200
4 bytes, read-write
Bits 0-5: RESOLUTION (IV, read-write)
320_PIXELS 0x0a (read-write)
400_PIXELS 0x0d (read-write)
480_PIXELS 0x0f (read-write)
512_PIXELS 0x10 (read-write)
640_PIXELS 0x14 (read-write)
800_PIXELS 0x19 (read-write)
960_PIXELS 0x1e (read-write)
1024_PIXELS 0x20 (read-write)
1152_PIXELS 0x24 (read-write)
1280_PIXELS 0x28 (read-write)
1600_PIXELS 0x32 (read-write)
DEFAULT 0x14 (default, read-write)
Bits 8-9: PIXEL_DEPTH (IV, read-write)
8_BITS 0x1 (read-write)
16_BITS 0x2 (read-write)
32_BITS 0x3 (read-write)
DEFAULT 0x1 (default, read-write)
Bit 12: TILING (IV, read-write)
ENABLED 0x0 (read-write)
DISABLED 0x1 (default, read-write)
Bits 13-23: TILING_DEBUG (IV, read-write)
DISABLED 0x0 (read-write)
RTL(?) register
---------------
Name: RTL
Offset: 0x00100???
4 bytes, read-write
Bits 0-1: S (IU, read-write)
DEFAULT 0x2 (default, read-write)
Bits 4-5: V (IU, read-write)
DEFAULT 0x2 (default, read-write)
Bits 8-9: M (IU, read-write)
DEFAULT 0x2 (default, read-write)
Bits 12-13: H (IU, read-write)
DEFAULT 0x1 (default, read-write)
Bits 16-17: A (IU, read-write)
DEFAULT 0x1 (default, read-write)
Bits 20-21: G (IU, read-write)
DEFAULT 0x1 (default, read-write)
Bit 24: ARB_GR_HI_PRIOR (IU, read-write)
DEFAULT 0x0 (default, read-write)
Bit 28: ARB_MEDIA_HI_PRIOR (IU, read-write)
DEFAULT 0x0 (default, read-write)
External devices
================
The EXTDEV registers begin at 0x00101000 in the CTRL region.
Boot 0 register
---------------
Name: BOOT_0
Offset: 0x00101000
4 bytes, read-write
Bit 2: STRAP_RAM_TYPE (XV, read-write)
SGRAM_8MBIT 0x1 (read-write)
SGRAM_16MBIT 0x0 (read-write)
Bit 11: STRAP_OVERWRITE (IV, read-write)
ENABLED 0x1 (read-write)
Bit 4: STRAP_RAM_WIDTH (XV, read-write)
64 0x0 (read-write)
128 0x1 (read-write)
GRAPH
=====
The GRAPH registers begin at 0x00400000 in the CTRL region.
Debug 0 register
----------------
Name: DEBUG_0
Offset: 0x00400080
4 bytes, read-write
Bit 0: STATE (-V, clear(check?)-write)
NORMAL 0x0 (clear(check?)-write)
RESET 0x1 (write-only)
Bit 4: BULK_READS (IV, read-write)
DISABLED 0x0 (default, read-write)
ENABLED 0x1 (read-write)
Bit 20: WRITE_ONLY_ROPS_2D (IV, read-write)
DISABLED 0x0 (default, read-write)
ENABLED 0x1 (read-write)
Bit 24: DRAWDIR_AUTO (IV, read-write)
DISABLED 0x0 (default, read-write)
ENABLED 0x1 (read-write)
Debug 1 register
----------------
Name: DEBUG_1
Offset: 0x00400084
4 bytes, read-write
Bit 0: VOLATILE_RESET (IV, read-write)
NOT_LAST 0x0 (default, read-write)
LAST 0x1 (read-write)
Bit 16: INSTANCE (IV, read-write)
DISABLED 0x0 (default, read-write)
ENABLED 0x1 (read-write)
Bit 20: CTX (IV, read-write)
DISABLED 0x0 (default, read-write)
ENABLED 0x1 (read-write)
Debug 2 register
----------------
Name: DEBUG_2
Offset: 0x00400088
4 bytes, read-write
Bit 0: AVOID_RMW_BLEND (IV, read-write)
DISABLED 0x0 (default, read-write)
ENABLED 0x1 (read-write)
Bit 8: DPWR_FIFO (IV, read-write)
DISABLED 0x0 (default, read-write)
ENABLED 0x1 (read-write)
Bit 28: VOLATILE_RESET (IV, read-write)
DISABLED 0x0 (default, read-write)
ENABLED 0x1 (read-write)
Debug 3 register
----------------
Name: DEBUG_3
Offset: 0x0040008C
4 bytes, read-write
Bit 24: HONOR_ALPHA (IV, read-write)
DISABLED 0x0 (default, read-write)
ENABLED 0x1 (read-write)
Interrupt 0 register
--------------------
Name: INTR_0
Offset: 0x00400100
4 bytes, read-write
Bit 0: RESERVED (-V, read-write)
NOT_PENDING 0x0 (read-only)
PENDING 0x1 (read-only)
RESET 0x1 (write-only)
Bit 4: CONTEXT_SWITCH (IV, read-write)
NOT_PENDING 0x0 (default, read-only)
PENDING 0x1 (read-only)
RESET 0x1 (write-only)
Bit 8: VBLANK (IV, read-write)
NOT_PENDING 0x0 (default, read-only)
PENDING 0x1 (read-only)
RESET 0x1 (write-only)
Bit 12: RANGE (IV, read-write)
NOT_PENDING 0x0 (default, read-only)
PENDING 0x1 (read-only)
RESET 0x1 (write-only)
Bit 16: METHOD_COUNT (IV, read-write)
NOT_PENDING 0x0 (default, read-only)
PENDING 0x1 (read-only)
RESET 0x1 (write-only)
Bit 20: FORMAT (IV, read-write)
NOT_PENDING 0x0 (default, read-only)
PENDING 0x1 (read-only)
RESET 0x1 (write-only)
Bit 24: COMPLEX_CLIP (IV, read-write)
NOT_PENDING 0x0 (default, read-only)
PENDING 0x1 (read-only)
RESET 0x1 (write-only)
Bit 28: NOTIFY (IV, read-write)
NOT_PENDING 0x0 (default, read-only)
PENDING 0x1 (read-only)
RESET 0x1 (write-only)
Interrupt 1 register
--------------------
Name: INTR_1
Offset: 0x00400104
4 bytes, read-write
Bit 0: METHOD (IV, read-write)
NOT_PENDING 0x0 (default, read-only)
PENDING 0x1 (read-only)
RESET 0x1 (write-only)
Bit 4: DATA (IV, read-write)
NOT_PENDING 0x0 (default, read-only)
PENDING 0x1 (read-only)
RESET 0x1 (write-only)
Bit 12: DOUBLE_NOTIFY (IV, read-write)
NOT_PENDING 0x0 (default, read-only)
PENDING 0x1 (read-only)
RESET 0x1 (write-only)
Bit 16: CTXSW_NOTIFY (IV, read-write)
NOT_PENDING 0x0 (default, read-only)
PENDING 0x1 (read-only)
RESET 0x1 (write-only)
Interrupt 0 enable register
---------------------------
Name: INTR_EN_0
Offset: 0x00400140
4 bytes, read-write
Interrupt 1 enable register
---------------------------
Name: INTR_EN_1
Offset: 0x00400144
4 bytes, read-write
Context switch register
-----------------------
Name: CTX_SWITCH
Offset: 0x00400180
4 bytes, read-write
Context control register
------------------------
Name: CTX_CONTROL
Offset: 0x00400190
4 bytes, read-write
Bits 0-1: MINIMUM_TIME (IV, read-write)
33US 0x0 (default, read-write)
262US 0x1 (read-write)
2MS 0x2 (read-write)
17MS 0x3 (read-write)
Bit 8: TIME (IV, read-write)
EXPIRED 0x0 (default, read-write)
NOT_EXPIRED 0x1 (read-write)
Bit 16: CHID (IV, read-write)
INVALID 0x0 (default, read-write)
VALID 0x1 (read-write)
Bit 20: SWITCH (-V, read-only)
UNAVAILABLE 0x0 (read-only)
AVAILABLE 0x1 (read-only)
Bit 24: SWITCHING (IV, read-write)
IDLE 0x0 (default, read-write)
BUSY 0x1 (read-write)
Bit 28: DEVICE (IV, read-write)
DISABLED 0x0 (default, read-write)
ENABLED 0x1 (read-write)
Context user register
---------------------
Name: CTX_USER
Offset: 0x00400194
4 bytes, read-write
Context cache registers
-----------------------
8 context registers for each channel (I guess).
Name: CTX_CACHE
Offset: 0x004001a0+i*4 (0 <= i Í8)
8*4 bytes, read-write
Absolute X RAM registers
------------------------
Name: ABS_X_RAM
Offset: 0x00400400+i*4 (0 <= i < 32)
32*4 bytes, read-write
Absolute Y RAM registers
------------------------
Name: ABS_Y_RAM
Offset: 0x00400480+i*4 (0 <= i < 32)
32*4 bytes, read-write
X misc register
---------------
Name: X_MISC
Offset: 0x00400500
4 bytes, read-write
Y misc register
---------------
Name: Y_MISC
Offset: 0x00400504
4 bytes, read-write
Exceptions register
-------------------
Name: EXCEPTIONS
Offset: 0x00400508
4 bytes, read-write
Source color register
---------------------
Name: SOURCE_COLOR
Offset: 0x0040050C
4 bytes, read-write
XY logic misc 0 register
------------------------
Name: XY_LOGIC_MISC0
Offset: 0x00400514
4 bytes, read-write
XY logic misc 1 register
------------------------
Name: XY_LOGIC_MISC1
Offset: 0x00400518
4 bytes, read-write
DVDY_VALUE 0x0 (default, read-write) (???)
XY logic misc 2 register
------------------------
Name: XY_LOGIC_MISC2
Offset: 0x0040051C
4 bytes, read-write
XY logic misc 3 register
------------------------
Name: XY_LOGIC_MISC3
Offset: 0x00400520
4 bytes, read-write
Clip X 0 register
-----------------
Name: CLIPX_0
Offset: 0x00400524
4 bytes, read-write
Clip X 1 register
-----------------
Name: CLIPX_1
Offset: 0x00400528
4 bytes, read-write
Clip Y 0 register
-----------------
Name: CLIPY_0
Offset: 0x0040052c
4 bytes, read-write
Clip Y 1 register
-----------------
Name: CLIPY_1
Offset: 0x00400530
4 bytes, read-write
Absolute iclip X max. register
------------------------------
Name: ABS_ICLIP_XMAX
Offset: 0x00400534
4 bytes, read-write
Absolute iclip Y max. register
------------------------------
Name: ABS_ICLIP_YMAX
Offset: 0x00400538
4 bytes, read-write
Absolute uclip X min. register
------------------------------
Name: ABS_UCLIP_XMIN
Offset: 0x0040053C
4 bytes, read-write
Absolute uclip Y min. register
------------------------------
Name: ABS_UCLIP_YMIN
Offset: 0x00400540
4 bytes, read-write
Absolute uclip X max. register
------------------------------
Name: ABS_UCLIP_XMAX
Offset: 0x00400544
4 bytes, read-write
Absolute uclip Y max. register
------------------------------
Name: ABS_UCLIP_YMAX
Offset: 0x00400548
4 bytes, read-write
Absolute uclipa X min. register
------------------------------
Name: ABS_UCLIPA_XMIN
Offset: 0x00400560
4 bytes, read-write
Absolute uclipa Y min. register
------------------------------
Name: ABS_UCLIPA_YMIN
Offset: 0x00400564
4 bytes, read-write
Absolute uclipa X max. register
------------------------------
Name: ABS_UCLIPA_XMAX
Offset: 0x00400568
4 bytes, read-write
Absolute uclipa Y max. register
------------------------------
Name: ABS_UCLIPA_YMAX
Offset: 0x0040056C
4 bytes, read-write
Source canvas min. register
---------------------------
Name: SRC_CANVAS_MIN
Offset: 0x00400550
4 bytes, read-write
Source canvas max. register
---------------------------
Name: SRC_CANVAS_MAX
Offset: 0x00400554
4 bytes, read-write
Destination canvas min. register
--------------------------------
Name: DST_CANVAS_MIN
Offset: 0x00400558
4 bytes, read-write
Destination canvas max. register
--------------------------------
Name: DST_CANVAS_MAX
Offset: 0x0040055C
4 bytes, read-write
Pattern color 0 0 register
--------------------------
Name: PATT_COLOR0_0
Offset: 0x00400600
4 bytes, read-write
Pattern color 0 1 register
--------------------------
Name: PATT_COLOR0_1
Offset: 0x00400604
4 bytes, read-write
Pattern color 1 0 register
--------------------------
Name: PATT_COLOR1_0
Offset: 0x00400608
4 bytes, read-write
Pattern color 1 1 register
--------------------------
Name: PATT_COLOR1_1
Offset: 0x0040060C
4 bytes, read-write
Pattern registers
-----------------
Name: PATTERN
Offset: 0x00400610+i*4 (0 <=i < 2)
2*4 bytes, read-write
Pattern shape register
----------------------
Name: PATTERN_SHAPE
Offset: 0x00400618
4 bytes, read-write
Bits 0-1: VALUE (XV, read-write)
8X8 0x0 (read-write)
64X1 0x1 (read-write)
1X64 0x2 (read-write)
Monochrome color 0 register
---------------------------
Name: MONO_COLOR0
Offset: 0x0040061C
4 bytes, read-write
Raster operation register
-------------------------
Name: ROP3
Offset: 0x00400624
4 bytes, read-write
Plane mask register
-------------------
Name: PLANE_MASK
Offset: 0x00400628
4 bytes, read-write
Chroma register
---------------
Name: CHROMA
Offset: 0x0040062C
4 bytes, read-write
B(?) offset 0 register
----------------------
Name: BOFFSET0
Offset: 0x00400630
4 bytes, read-write
B(?) offset 1 register
----------------------
Name: BOFFSET1
Offset: 0x00400634
4 bytes, read-write
B(?) offset 2 register
----------------------
Name: BOFFSET2
Offset: 0x00400638
4 bytes, read-write
B(?) offset 3 register
----------------------
Name: BOFFSET3
Offset: 0x0040063C
4 bytes, read-write
Beta register
-------------
Name: BETA
Offset: 0x00400640
4 bytes, read-write
Control out register
--------------------
Name: CONTROL_OUT
Offset: 0x00400644
4 bytes, read-write
B(?) pitch 0 register
---------------------
Name: BPITCH0
Offset: 0x00400650
4 bytes, read-write
B(?) pitch 1 register
---------------------
Name: BPITCH1
Offset: 0x00400654
4 bytes, read-write
B(?) pitch 2 register
---------------------
Name: BPITCH2
Offset: 0x00400658
4 bytes, read-write
B(?) pitch 3 register
---------------------
Name: BPITCH3
Offset: 0x0040065C
4 bytes, read-write
DMA register
------------
Name: DMA
Offset: 0x00400680
4 bytes, read-write
Notify register
---------------
Name: NOTIFY
Offset: 0x00400684
4 bytes, read-write
Bits 0-15: INST_MEM_LOC ???
Instance register
-----------------
Name: INSTANCE
Offset: 0x00400688
4 bytes, read-write
Memory format register
----------------------
Name: MEMFMT
Offset: 0x0040068C
4 bytes, read-write
Clip 0 min. register
--------------------
Name: CLIP0_MIN
Offset: 0x00400690
4 bytes, read-write
Clip 0 max. register
--------------------
Name: CLIP0_MAX
Offset: 0x00400694
4 bytes, read-write
Clip 1 min. register
--------------------
Name: CLIP1_MIN
Offset: 0x00400698
4 bytes, read-write
Clip 1 max. register
--------------------
Name: CLIP1_MAX
Offset: 0x0040069C
4 bytes, read-write
Clip misc register
------------------
Name: CLIP_MISC
Offset: 0x004006A0
4 bytes, read-write
FIFO register
-------------
Name: FIFO
Offset: 0x004006A4
4 bytes, read-write
Bit 0: ACCESS (IV, read-write)
DISABLED 0x0 (read-write)
ENABLED 0x1 (default, read-write)
B(?) pixel register
-------------------
Name: BPIXEL
Offset: 0x004006A8
4 bytes, read-write
Bits 0-1: DEPTH0_FMT (XV, read-write)
Y16_BITS 0x0 (read-write)
BITS_8 0x1 (read-write)
BITS_16 0x2 (read-write)
BITS_32 0x3 (read-write)
Bit 2: DEPTH0 (XV, read-write)
NOT_VALID 0x0 (read-write)
VALID 0x1 (read-write)
Bits 4-5: DEPTH1_FMT (XV, read-write)
Y16_BITS 0x0 (read-write)
BITS_8 0x1 (read-write)
BITS_16 0x2 (read-write)
BITS_32 0x3 (read-write)
Bit 6: DEPTH1 (XV, read-write)
NOT_VALID 0x0 (read-write)
VALID 0x1 (read-write)
Bits 8-9: DEPTH2_FMT (XV, read-write)
Y16_BITS 0x0 (read-write)
BITS_8 0x1 (read-write)
BITS_16 0x2 (read-write)
BITS_32 0x3 (read-write)
Bit 10: DEPTH2 (XV, read-write)
NOT_VALID 0x0 (read-write)
VALID 0x1 (read-write)
Bits 12-13: DEPTH3_FMT (XV, read-write)
Y16_BITS 0x0 (read-write)
BITS_8 0x1 (read-write)
BITS_16 0x2 (read-write)
BITS_32 0x3 (read-write)
Bit 14: DEPTH3 (XV, read-write)
NOT_VALID 0x0 (read-write)
VALID 0x1 (read-write)
Status register
---------------
Name: STATUS
Offset: 0x004006B0
4 bytes, read-only
DMA interrupt 0 register
------------------------
Name: DMA_INTR_0
Offset: 0x00401100
4 bytes, read-write
Bit 0: INSTANCE (XV, read-write)
NOT_PENDING 0x0 (read-only)
PENDING 0x1 (read-only)
RESET 0x1 (write-only)
Bit 4: PRESENT (XV, read-write)
NOT_PENDING 0x0 (read-only)
PENDING 0x1 (read-only)
RESET 0x1 (write-only)
Bit 8: PROTECTION (XV, read-write)
NOT_PENDING 0x0 (read-only)
PENDING 0x1 (read-only)
RESET 0x1 (write-only)
Bit 12: LINEAR (XV, read-write)
NOT_PENDING 0x0 (read-only)
PENDING 0x1 (read-only)
RESET 0x1 (write-only)
Bit 16: NOTIFY (XV, read-write)
NOT_PENDING 0x0 (read-only)
PENDING 0x1 (read-only)
RESET 0x1 (write-only)
DMA interrupt 0 enable register
-------------------------------
Name: DMA_INTR_EN_0
Offset: 0x00401140
4 bytes, read-write
DMA control register
--------------------
Name: DMA_CONTROL
Offset: 0x00401210
4 bytes, read-write
RAMDAC
======
The RAMDAC registers begin at 0x00680000 in the CTRL region.
Graphic cursor starting position register
-----------------------------------------
Name: GRCURSOR_START_POS
Offset: 0x00680300
4 bytes, read-write
Bits 0-11: X (XS, read-write)
Bits 16-27: Y (XS, read-write)
MPLL coeff register
-------------------
Name: MPLL_COEFF
Offset: 0x00680504
4 bytes, read-write
Bits 0-7: MDIV (IU, read-write)
Bits 8-15: NDIV (IU, read-write)
Bits 16-18: PDIV (IV, read-write)
VPLL coeff register
-------------------
Name: VPLL_COEFF
Offset: 0x00680508
4 bytes, read-write
Bits 0-7: MDIV (IU, read-write)
Bits 8-15: NDIV (IU, read-write)
Bits 16-18: PDIV (IV, read-write)
PLL coeff select register
-------------------------
Name: PLL_COEFF_SELECT
Offset: 0x0068050C
4 bytes, read-write
Bit 4: DLL_BYPASS (IV, read-write)
FALSE 0x0 (default, read-write)
TRUE 0x1 (read-write)
Bit 8: MPLL_SOURCE (IV, read-write)
DEFAULT 0x0 (default, read-write)
PROG 0x1 (read-write)
Bit 12: MPLL_BYPASS (IV, read-write)
FALSE 0x0 (default, read-write)
TRUE 0x1 (read-write)
Bit 16: VPLL_SOURCE (IV, read-write)
DEFAULT 0x0 (default, read-write)
PROG 0x1 (read-write)
Bit 20: VPLL_BYPASS (IV, read-write)
FALSE 0x0 (default, read-write)
TRUE 0x1 (read-write)
Bits 24-25: PCLK_SOURCE (IV, read-write)
VPLL 0x0 (default, read-write)
VIP 0x1 (read-write)
XTALOSC 0x2 (read-write)
Bit 28: VCLK_RATIO (IV, read-write)
DB1 0x0 (default, read-write)
DB2 0x1 (read-write)
General control register
------------------------
Various flags for DAC. BPC controls the width of the palette.
Name: GENERAL_CONTROL
Offset: 0x00680600
4 bytes, read-write
Bits 0-1: FF_COEFF (IV, read-write)
DEF 0x0 (default, read-write)
Bit 4: IDC_MODE (IV, read-write)
GAMMA 0x0 (default, read-write)
INDEX 0x1 (read-write)
Bit 8: VGA_STATE (IV, read-write)
NOTSEL 0x0 (default, read-write)
SEL 0x1 (read-write)
Bit 12: 565_MODE (IV, read-write)
NOTSEL 0x0 (default, read-write)
SEL 0x1 (read-write)
Bit 16: BLK_PEDSTL (IV, read-write)
OFF 0x0 (default, read-write)
ON 0x1 (read-write)
Bit 17: TERMINATION (IV, read-write)
37OHM 0x0 (default, read-write)
75OHM 0x1 (read-write)
Bit 20: BPC (IV, read-write)
6BITS 0x0 (default, read-write)
8BITS 0x1 (read-write)
Bit 24: DAC_SLEEP (IV, read-write)
DIS 0x0 (default, read-write)
EN 0x1 (read-write)
Bit 28: PALETTE_CLK (IV, read-write)
EN 0x0 (default, read-write)
DIS 0x1 (read-write)
VSERR width register
--------------------
Name: VSERR_WIDTH
Offset: 0x00680700
4 bytes, read-write
Bits 0-10: VAL (IV, read-write)
VEQU end register
-----------------
Name: VEQU_END
Offset: 0x00680704
4 bytes, read-write
Bits 0-10: VAL (IV, read-write)
Vertical B(?) blank end register
--------------------------------
Name: VBBLANK_END
Offset: 0x00680708
4 bytes, read-write
Bits 0-10: VAL (IV, read-write)
Vertical blank end register
---------------------------
Name: VBLANK_END
Offset: 0x0068070C
4 bytes, read-write
Bits 0-10: VAL (IV, read-write)
Vertical blank start register
-----------------------------
Name: VBLANK_START
Offset: 0x00680710
4 bytes, read-write
Bits 0-10: VAL (IV, read-write)
Vertical (B?) blank start register
----------------------------------
Name: VBBLANK_START
Offset: 0x00680714
4 bytes, read-write
Bits 0-10: VAL (IV, read-write)
VEQU start register
-------------------
Name: VEQU_START
Offset: 0x00680718
4 bytes, read-write
Bits 0-10: VAL (IV, read-write)
Vertical total register
-----------------------
Name: VTOTAL
Offset: 0x0068071C
4 bytes, read-write
Bits 0-10: VAL (IV, read-write)
Horizontal sync width register
------------------------------
Name: HSYNC_WIDTH
Offset: 0x00680720
4 bytes, read-write
Bits 0-10: VAL (IV, read-write)
Horizontal burst start register
-------------------------------
Name: HBURST_START
Offset: 0x00680724
4 bytes, read-write
Bits 0-10: VAL (IV, read-write)
Horizontal burst end register
-----------------------------
Name: HBURST_END
Offset: 0x00680728
4 bytes, read-write
Bits 0-10: VAL (IV, read-write)
Horizontal blank start register
-------------------------------
Name: HBLANK_START
Offset: 0x0068072C
4 bytes, read-write
Bits 0-10: VAL (IV, read-write)
Horizontal blank end register
-----------------------------
Name: HBLANK_END
Offset: 0x00680730
4 bytes, read-write
Bits 0-10: VAL (IV, read-write)
Horizontal total register
-------------------------
Name: HTOTAL
Offset: 0x00680734
4 bytes, read-write
Bits 0-10: VAL (IV, read-write)
HEQU width register
-------------------
Name: HEQU_WIDTH
Offset: 0x00680738
4 bytes, read-write
Bits 0-10: VAL (IV, read-write)
HSERR width register
--------------------
Name: HSERR_WIDTH
Offset: 0x0068073C
4 bytes, read-write
Bits 0-10: VAL (IV, read-write)
'Standard' SVGA registers
=========================
ATTR, CTRC, GRAPH, SEQ and MISC registers are available throught MMIO too.
Name: ATTR_REG_INDEX
Offset: 0x006013c0
1 byte, read-write
Name: ATTR_REG_DATA
Offset: 0x006013c1
1 byte, read-write
Name: CRTC_REG_INDEX
Offset: 0x006013d4
1 byte, read-write
Name: CRTC_REG_DATA
Offset: 0x006013d5
1 byte, read-write
Name: GRA_REG_INDEX
Offset: 0x000C03ce
1 byte, read-write
Name: GRA_REG_DATA
Offset: 0x000C03cf
1 byte, read-write
Name: SEQ_REG_INDEX
Offset: 0x000C03c4
1 byte, read-write
Name: SEQ_REG_DATA
Offset: 0x000C03c5
1 byte, read-write
Name: MISC_REG
Offset: 0x000C03c2
1 byte, read-write
Extra CRTC registers
====================
Repaint 0 register
------------------
Extended offset and start address.
Name: REPAINT0
Index: 0x19
1 byte
Bits 0-4: START_ADDR_20_16
Bits 5-7: OFFSET_10_8
Repaint 1 register
------------------
Various flags.
Name: REPAINT1
Index: 0x1a
1 byte
Bit 1: PALETTE_WIDTH
8BITS 0x0
6BITS 0x1
Bit 2: LARGE_SCREEN
DISABLE 0x1
ENABLE 0x0 ( >= 1280 )
Bit 4: COMPATIBLE_TEXT
ENABLE 0x1
DISABLE 0x0
Bit 6: VSYNC
DISABLE 0x1
ENABLE 0x0
Bit 7: HSYNC
DISABLE 0x1
ENABLE 0x0
FIFO control register
---------------------
Controls how much data the refresh fifo requests.
Name: FIFO_CONTROL
Index: 0x1b
1 byte
Bits 0-2: BURST_LENGTH
BURST_LENGTH_8 0x0
BURST_LENGTH_32 0x1
BURST_LENGTH_64 0x2
BURST_LENGTH_128 0x3
BURST_LENGTH_256 0x4
Bit 7: UNDERFLOW_WARN
FIFO register
-------------
When the fifo occupancy falls below *twice* the watermark,
the refresh fifo will start to be refilled. If this value is
too low, you will get junk on the screen. Too high, and performance
will suffer. Watermark in units of 8 bytes.
Name: FIFO
Index: 0x20
1 byte
Bits 0-5: WATERMARK
Bit 7: RESET
Extra register
--------------
Assorted extra bits.
Name: EXTRA
Index: 0x25
1 byte
Bit 0: VERT_TOTAL_10
Bit 1: VERT_DISPLAY_END_10
Bit 2: VERT_RETRACE_START_10
Bit 3: VERT_BLANK_START_10
Bit 4: HORIZ_BLANK_END_6
Bit 5: OFFSET_11
Pixel register
--------------
Controls what the format of the framebuffer is.
Name: PIXEL
Index: 0x28
1 byte
Bits 0-1: FORMAT
VGA 0x0
8BPP 0x1
16BPP 0x2
32BPP 0x3
Bits 3-5: TV_HORIZ_ADJUST
Bit 6: TV_MODE
NTSC 0x0
PAL 0x1
Bit 7: MODE
TV 0x1
VGA 0x0
Horizontal extra register
-------------------------
Horizonal extended bits.
Name: HORIZ_EXTRA
Index: 0x2d
1 byte
Bit 0: DISPLAY_TOTAL_8
Bit 1: DISPLAY_END_8
Bit 2: HORIZ_BLANK_START_8
Bit 3: HORIZ_RETRACE_START_8
Bit 4: INTER_HALF_START_8
Graphic cursor 0 register
-------------------------
Name: GRCURSOR0
Index: 0x30
1 byte
Bits 0-5: START_ADDR_21_16
Graphic cursor 1 register
-------------------------
Name: GRCURSOR1
Index: 0x31
1 byte
Bit 0: CURSOR
DISABLE 0x0
ENABLE 0x1
Bit 1: SCAN_DBL
DISABLE 0x0
ENABLE 0x1
Bits 3-7: START_ADDR_15_11
EOF