5  Hardware Registers

index

5.1  CP - Command Processor

Registerblock BaseSize of Registerblockcommon access size
0xcc0000000x802


0xCC0000002R/WSR - Status Register
 
15870
    
 
bit(s) description
5-15 unused/reserved
4 BP (breakpoint?) interrupt
3 GP is idle for commands (1: idle)
2 GP is idle for reading (1: idle)
1 gx fifo underflow (ptr<lo watermark)
0 gx fifo overflow (ptr>hi watermark)
 


0xCC0000022R/WCR - Control Register
 
15870
  ..bl.mig
 
bit(s) description
6-15 unused/reserved
5bbp enable
4lgp link enable (enable for linking of cp/pe FIFO)
3 FIFO underflow irq enable (?)
2mFIFO overflow irq enable? / cp irq (clear to acknowledge) ?
1icp irq enable (?) (write 1 to clear bp irq?)
0ggp FIFO read enable
 


0xCC0000042WClear Register
 
bit(s) description
2-15 unused/reserved
1 write 1 to clear FIFO underflow
0 write 1 to clear FIFO overflow
 


0xCC00000E2R/Wtoken register
 


0xCC0000102R/Wbounding box - left
 


0xCC0000122R/Wbounding box - right
 


0xCC0000142R/Wbounding box - top
 


0xCC0000162R/Wbounding box - bottom
 


0xCC0000202R/Wcp FIFO base lo
 


0xCC0000222R/Wcp FIFO base hi
 


0xCC0000242R/Wcp FIFO end lo
 


0xCC0000262R/Wcp FIFO end hi
 


0xCC0000282R/Wcp FIFO high watermark lo
 


0xCC00002a2R/Wcp FIFO high watermark hi
 


0xCC00002c2R/Wcp FIFO low watermark lo
 


0xCC00002e2R/Wcp FIFO low watermark hi
 


the low and high watermark control the assertion of the CP interrupt

0xCC0000302R/Wcp FIFO read/write distance lo
 


0xCC0000322R/Wcp FIFO read/write distance hi
 


0xCC0000342R/Wcp FIFO write pointer lo
 


0xCC0000362R/Wcp FIFO write pointer hi
 


0xCC0000382R/Wcp FIFO read pointer lo
 


0xCC00003a2R/Wcp FIFO read pointer hi
 


0xCC00003c2R/Wcp FIFO bp lo
 


0xCC00003e2R/Wcp FIFO bp hi
 


index

5.1.1  Token register

You can insert this dirty marker, at the end of command list, by this way :

*(u32 *)GXFIFO = 0x4800XXXX
*(u32 *)GXFIFO = 0x4700XXXX

Where XXXX is the token value. When command processor reaches this stage, it writes XXXX into PE token register (see above), and then raise "PE TOKEN" interrupt. Thus you can monitor the completion of your drawing tasks.

note: its probably a good idea to send a BP 'drawing complete' command (0x45000002) before the insertion of the token.
index

5.2  PE - Pixel Engine

Registerblock BaseSize of Registerblockcommon access size
0xcc0010000x1002


0xcc0010002R/WZ configuration
 
15870
    
 
bit(s) description
4 Z update enable
1-3 function
0 z-comperator enable
 


0xcc0010022R/WAlpha configuration
 
15870
    
 
bit(s) description
12-15 blend operator (?)
11 substractive / additive toggle (?)
8-10 source
5-7 destination
4 alpha update enable
3 color update enable
2 dither enable (?)
1 arithmetic blending enable (?)
0 boolean blending enable (?)
 


0xcc0010042R/Wdestination alpha
 
15870
    
 
bit(s) description
8 enable
0-7 alpha
 


0xcc0010062R/WAlpha Mode
 
15870
    
 
bit(s) description
8-15 mode
0-7 threshold
 


0xcc0010082R/WAlpha Read (?)
 
15870
    
 
bit(s) description
  mode
2 ?
 


0xcc00100a2R/WInterrupt Status Register
 
15870
    
 
bit(s) description
3 PE Finish (set to acknowledge)
2 PE Token (set to acknowledge)
1 PE Finish enable (?)
0 PE Token enable (?)
 


0xcc00100e2R/WPE Token ?
 
15870
tttttttttttttttt
 
bit(s) description
0-15tPE Token (asserted from last PE Token Interrupt)
 
index

5.3  VI - Video Interface

Registerblock BaseSize of Registerblockcommon access size
0xcc0020000x1004


0xCC0020002R/WVTR - Vertical Timing Register
 
15870
00aaaaaaaaaaeeee
 
bit(s) description
4-13aACV - Active Video (in full Lines) ? other source says halflines
0-3eEQU - Equalization pulse in half lines
 
pal50/pal60/ntsc: 0x11F5, 0x0F06, 0x0F06
 
The value in ACV is double buffered
 


0xCC0020022R/WDCR - Display Configuration Register
 
15870
000000ppllttdire
 
bit(s) description
 pFMT - Current Video Format
  
  
0NTSC
1PAL
2MPAL
3Debug
 lLE1 - Enables Display Latch 1
  
  
0Off
1On for 1 field
2On for 2 fields
3Always On
 tLE0 - Enables Display Latch 0
  
  
0Off
1On for 1 field
2On for 2 fields
3Always On
 dDLR - Selects 3D Display Mode
 iNIN - Interlace Selector
  
  
0Interlaced
1Non-Interlaced, top field drawn at field rate and bottom field is not displayed
 rRST - Reset - Clears all data requests and puts VI into its idle state.
 eENB - Enable - Enables video timing generation and data request.
 
pal50/pal60/ntsc: 0x0101, 0x0001, 0x0001
 


0xCC0020044R/WHTR0 - Horizontal Timing 0
 
3124231615870
0sssssss0eeeeeee0000000wwwwwwwww
 
bit(s) description
 sHCS - Horizontal Sync Start to Color Burst Start
 eHCE - Horizontal Sync Start to Color Burst End
 wHLW - Halfline Width (W*16 = Width (720))
 
pal50/pal60/ntsc: 0x4B6A01B0, 0x476901AD, 0x476901AD
 


0xCC0020084R/WHTR1 - Horizontal Timing 1
 
3124231615870
00000sssssssssseeeeeeeeeewwwwwww
 
bit(s) description
 sHBS - Half line to horizontal blanking start
 eHBE - Horizontal Sync Start to horizontal blank end
 wHSY - Horizontal Sync Width
 
pal50/pal60/ntsc: 0x02F85640, 0x02EA5140, 0x02EA5140
 
Setting bit 0 seems to blackout the screen. (Similar to ViBlack?)
 


0xCC00200C4R/WVTO - Odd Field Vertical Timing Register
 
3124231615870
......ssssssssss......rrrrrrrrrr
 
bit(s) description
16-25sPSB - Post blanking in half lines
0-9rPRB - Pre-blanking in half lines
 
pal50/pal60/ntsc: 0x00010023, 0x00030018, 0x00030018
 
This register sets up the pre-blanking and post-blanking interval of odd fields, PRB and PSB are double-buffered.
 


0xCC0020104R/WVTE - Even Field Vertical Timing Register
 
3124231615870
......ssssssssss......rrrrrrrrrr
 
bit(s) description
16-25sPSB - post-blanking in halflines
0-9rPRB - pre-blanking in halflines
 
pal50/pal60/ntsc: 0x00000024, 0x00020019, 0x00020019
 
This register sets up the pre-blanking and post-blanking intervals of even fields. PRB and PSB are double-buffered.
 


0xCC0020144R/WBBEI - Odd Field Burst Blanking Interval Register
 
3124231615870
        
 
bit(s) description
21-31 BE3 - Field 3 start to burst blanking end in halflines
16-20 BS3 - Field 3 start to burst blanking start in halflines
5-15 BE1 - Field 1 start to burst blanking end in halflines
0-4 BS1 - Field 1 start to burst blanking start in halflines
 
pal50/pal60/ntsc: 0x4D2B4D6D, 0x410C410C, 0x410C410C
 


0xCC0020184R/WBBOI - Even Field Burst Blanking Interval Register
 
3124231615870
        
 
bit(s) description
21-31 BE4 - Field 4 start to burst blanking end in halflines
16-20 BS4 - Field 4 start to burst blanking start in halflines
5-15 BE2 - Field 2 start to burst blanking end in halflines
0-4 BS2 - Field 2 start to burst blanking start in halflines
 
pal50/pal60/ntsc: 0x4D8A4D4C, 0x40ED40ED, 0x40ED40ED
 


0xCC00201c4R/WTFBL - Top Field Base Register (L) (External Framebuffer Half 1)
 
3124231615870
yyy?zzzzaaaaaaaaaaaaaaaxxxxxxxxx
 
bit(s) description
29-31yalways zero (maybe some write only control register stuff?, setting bit 31 clears bits 31-28 (?))
28 page offset bit (*1)
24-27zXOF - Horizontal Offset of the left-most pixel within the first word of the fetched picture.
9-23aFBB - bit 23 - bit 9 of XFB Address (*2)
0-8xunused (?)
 
pal50/pal60/ntsc: 0x00435A4E, 0x00435A4E, 0x00435A4E
 
This register specifies the display origin of the top field of a picture in 2D mode or for the left picture in 3D mode


(*1) when this bit is set, the framebuffer address is calculated as (address> >5)
(*2) if bit 28 is cleared, highest possible Address: 0x80fffe00 (set register to 0x00fffe00) (aligned to 9bit)

0xCC0020204R/WTFBR - Top Field Base Register (R) (Only valid in 3D Mode)
 
3124231615870
00000000fffffffffffffff000000000
 
bit(s) description
 fFBB - External Memory Address of frame buffer
 
pal50/pal60/ntsc: 0x00000000, 0x00000000, 0x00000000
 
This register specifies the base address of the top field for the right picture in 3D mode.
 


0xCC0020244R/WBFBL - Bottom Field Base Register (L) (External Framebuffer Half 2)
 
3124231615870
yyyyyyyyaaaaaaaaaaaaaaaxxxxxxxxx
 
bit(s) description
 yalways zero (maybe some write-only control register stuff?)
28 page offset bit (*1)
 aFBB - bit 23 - bit 9 of XFB Address
 xunused (?)
 
pal50/pal60/ntsc: 0x00435A4E, 0x00435A4E, 0x00435A4E
 
This register specifies the display origin of the bottom field of a picture in 2D mode or for the left picture in 3D mode
 


(*1) when this bit is set, the framebuffer address is calculated as (address> >5)

0xCC0020284R/WBFBR - Bottom Field Base Register (R) (Only valid in 3D Mode)
 
3124231615870
00000000fffffffffffffff000000000
 
bit(s) description
 fFBB - External Memory Address of frame buffer
 
pal50/pal60/ntsc: 0x00000000, 0x00000000, 0x00000000
 
specifies the base address of the bottom field for the right picture in 3D mode.
 


0xCC00202C2RDPV - current vertical Position
 
15870
00000vvvvvvvvvvv
 
bit(s) description
 vVCT - current vertical Position of Raster beam
 
pal50/pal60/ntsc: 0x013C, 0x0005, 0x0000
 


0xCC00202E2RDPH - current horizontal Position (?)
 
15870
00000hhhhhhhhhhh
 
bit(s) description
 hHCT - current horizontal Position of Raster beam (?)
 
pal50/pal60/ntsc: 0x0144, 0x0176, 0x0000
 


The Horizontal Count is in pixels and runs from 1 to # pixels per line. It is reset to 1 at the beginning of every line.
The Vertical Count is in lines (on a frame basis) and runs from 1 to # lines per frame. It is 1 at the beginning of pre-equalization. This is a frame line count. So for example: for NTSC vcount=264 is the first (full) line in the second field and vcount=525 is the last line in the frame (fields being numbered 1-4). For non-interlaced modes vcount is on a field-by-field basis (for NTSC vcount ranges from 1-263).
This counting scheme applies the Display Position, Display Interrupt, and Display Latch registers.

0xCC0020304R/WDI0 - Display Interrupt 0
 
3124231615870
i00e00vvvvvvvvvv000000hhhhhhhhhh
 
bit(s) description
 iINT - Interrupt Status (1=Active) (Write to clear)
 eENB - Interrupt Enable Bit
 vVCT - Vertical Position
 hHCT - Horizontal Position
 
pal50/pal60/ntsc: 0x113901B1, 0x110701AE, 0x110701AE
 


There are a total of four display interrupt registers (0-3). They are used to generate interrupts to the main processor at different positions within a field. Each register has a separate enable bit. The interrupt is cleared by writing a zero to the status flag (INT).

0xCC0020344R/WDI1 - Display Interrupt 1
 
pal50/pal60/ntsc: 0x10010001, 0x10010001, 0x10010001
 
Refer to Display Interrupt 0
 


0xCC0020384R/WDI2 - Display Interrupt 2
 
pal50/pal60/ntsc: 0x00010001, 0x00010001, 0x00010001
 
Refer to Display Interrupt 0
 


0xCC00203C4R/WDI3 - Display Interrupt 3
 
pal50/pal60/ntsc: 0x00010001, 0x00010001, 0x00010001
 
Refer to Display Interrupt 0
 


0xCC0020404R/WDL0 - Display Latch Register 0
 
bit(s) Description
31 TRG - Trigger Flag
16-26 VCT - Vertical Count
0-10 HCT - Horizontal Count
 
pal50/pal60/ntsc: 0x0000, 0x0000, 0x0000
 


The Display Latch Register 0 latches the value of the Display Position Register at the rising edge of the gt0 signal. The trigger flag is set if a gun trigger is detected. Writing a zero to the register clears the trigger flag.

0xCC0020444R/WDL1 - Display Latch Register 1
 
pal50/pal60/ntsc: 0x0000, 0x0000, 0x0000
 


See the description of Display Latch Register 0. This register is latched on the rising edge of the gt1 signal.

0xCC0020482R/WHSW - Scaling Width Register
 
15870
    
 
bit(s) description
0-9 SRCWIDTH - Horizontal Stepping size
 
pal50/pal60/ntsc: 0x2850, 0x2850, 0x2850
 


This register is the number of source pixels to be scaled. This is only used when the Horizontal Scaler is enabled. For example, if the image is to be scaled from 320x240 to 640x240, 320 would be written into this register.

0xCC00204a2R/WHSR - Horizontal Scaling Register
 
15870
000e000vvvvvvvvv
 
bit(s) description
12eHS_EN - Enable Horizontal Scaling
0-8vSTP - Horizontal stepping size (U1.8 Scaler Value) (0x160 Works for 320)
 
pal50/pal60/ntsc: 0x0100, 0x0100, 0x0100
 


This register sets up the step size of the horizontal stepper.

0xCC00204C4R/WFCT0 - Filter Coefficient Table 0 (AA stuff)
 
3124231615870
        
 
bit(s) description
20-29 T2 - Tap2
10-19 T1 - Tap1
0-9 T0 - Tap0
 
pal50/pal60/ntsc: 0x1AE771F0, 0x1AE771F0, 0x1AE771F0
 
sets up part of the low-pass filter. Taps 0 to 9 are in the range (0.0, 2.0)
 


0xcc0020504R/WFCT1 - Filter Coefficient Table 1 (AA stuff)
 
3124231615870
        
 
bit(s) description
20-29 T5 - Tap5
10-19 T4 - Tap4
0-9 T3 - Tap3
 
pal50/pal60/ntsc: 0x0DB4A574, 0x0DB4A574, 0x0DB4A574
 


0xcc0020544R/WFCT2 - Filter Coefficient Table 2 (AA stuff)
 
3124231615870
        
 
bit(s) description
20-29 T8 - Tap8
10-19 T7 - Tap7
0-9 T6 - Tap6
 
pal50/pal60/ntsc: 0x00C1188E, 0x00C1188E, 0x00C1188E
 
sets up part of the low-pass filter
 


0xcc0020584R/WFCT3 - Filter Coefficient Table 3 (AA stuff)
 
3124231615870
        
 
bit(s) description
24-31 T12 - Tap12
16-23 T11 - Tap11
8-15 T10 - Tap10
0-7 T9 - Tap9
 
pal50/pal60/ntsc: 0xC4C0CBE2, 0xC4C0CBE2, 0xC4C0CBE2
 
sets up part of the low-pass filter. Taps 9 to tap 24 are in the Rage (-0.125, 0.125)
 


0xcc00205c4R/WFCT4 - Filter Coefficient Table 4 (AA stuff)
 
3124231615870
        
 
bit(s) description
24-31 T16 - Tap16
16-23 T15 - Tap15
8-15 T14 - Tap14
0-7 T13 - Tap13
 
pal50/pal60/ntsc: 0xFCECDECF, 0xFCECDECF, 0xFCECDECF
 


0xcc0020604R/WFCT5 - Filter Coefficient Table 5 (AA stuff)
 
3124231615870
        
 
bit(s) description
24-31 T20 - Tap20
16-23 T19 - Tap19
8-15 T18 - Tap18
0-7 T17 - Tap17
 
pal50/pal60/ntsc: 0x13130F08, 0x13130F08, 0x13130F08
 


0xcc0020644R/WFCT6 - Filter Coefficient Table 6 (AA stuff)
 
3124231615870
        
 
bit(s) description
24-31 T24 - Hardwired to zero
16-23 T23 - Tap23
8-15 T22 - Tap22
0-7 T21 - Tap21
 
pal50/pal60/ntsc: 0x00080C0F, 0x00080C0F, 0x00080C0F
 
sets up part of the low-pass filter
 


0xcc0020684R/W? (AA stuff)
 
pal50/pal60/ntsc: 0x00FF0000, 0x00FF0000, 0x00FF0000
 


0xCC00206C2R/WVICLK - VI Clock Select Register
 
15870
000000000000000s
 
bit(s) description
 s
027 MHz video CLK
154 MHz video CLK (used in Progressive Mode)
 
pal50/pal60/ntsc: 0x0000, 0x0000, 0x0000
 


0xCC00206e2R/WVISEL - VI DTV Status Register
 
15870
    
 
bit(s) description
2 VISEL - don't care
 
pal50/pal60/ntsc: 0x0000, 0x0000, 0x0000
 
this register allows software to read the status of two i/o pins
 


0xCC0020702R/W?
 
Holds 0x280, but has no effect on change (maybe for Progressive ?)
 
pal50/pal60/ntsc: 0x0280, 0x0280, 0x0280
 


0xCC0020722r/wHBE - Border HBE
 
15870
    
 
bit(s) description
15 BRDR_EN - Border Enable
0-9 HBE656 - Border Horizontal Blank End
 
pal50/pal60/ntsc: 0x0000, 0x0000, 0x0000
 


This register (in conjunction with the border HBS) sets up a black border around the actual active pixels in debug mode. This was done in order to accommodate certain encoders that only support 720 active pixels. The border HBE and HBS can be programmed for 720 active pixels while the regular HBE and HBS can be programmed to the actual active width. This allows the frame buffer to be of any width without having to manually set up a border in memory. These registers will only take effect if enabled and in debug mode.

0xcc002074 2r/wHBS - Border HBS
 
15870
    
 
bit(s) description
0-9 HBS656 - Border Horizontal Blank start
 
pal50/pal60/ntsc: 0x0000, 0x0000, 0x0000
 


0xcc002076 2?/?? (unused?)
 
pal50/pal60/ntsc: 0x00FF, 0x00FF, 0x00FF
 


0xcc0020784?/?? (unused?)
 
pal50/pal60/ntsc: 0x00FF00FF, 0x00FF00FF, 0x00FF00FF
 


0xcc00207c4?/?? (unused?)
 
pal50/pal60/ntsc: 0x00FF00FF 0x00FF00FF, 0x00FF00FF
 

index

5.3.1  Video Modes

ModeTV Norm / RegionFramerateColumnsLines
NTSCntsc (usa, japan)60Hz640480
PALpal (europe)50Hz640574
DEBUG    
DEBUG PAL    
MPALpal (brazil)60Hz640480
PAL60pal60Hz640480


note: other modes may be possible using VGA output, although its unlikely.
index

5.4  PI - Processor Interface

Registerblock BaseSize of Registerblockcommon access size
0xcc0030000x1004


0xCC0030004rINTSR - interrupt cause
 
3124231615870
...............r................
 
bit  Description
17-31  unused/reserved
16rRSWSTReset Switch State (1 when pressed)
14-15  unused/reserved
13 HSPHigh Speed Port
12 DEBUGExternal Debugger
11 CPCommand FIFO
10 PE FINISHFrame is Ready
9 PE TOKENToken Assertion in Command List
8 VI Video Interface
7 MEMMemory Interface
6 DSPDSP
5 AIStreaming
4 EXIEXI
3 SISerial
2 DIDVD
1 RSWReset Switch
0 ERRORGP runtime error
 
 
 
0xCC0030044r/wINTMR - interrupt mask
 
3124231615870
................................
 
bit  Description
13 HSPHigh Speed Port
12 DEBUGExternal Debugger
11 CPCommand FIFO
10 PE FINISHFrame is Ready
9 PE TOKENToken Assertion in Command List
8 VI Video Interface
7 MEMMemory Interface
6 DSPDSP
5 AIStreaming
4 EXIEXI
3 SISerial
2 DIDVD
1 RSWReset Switch
0 ERRORGP runtime error
 


0xCC00300c4r/wFIFO Base Start
 

 
0xCC0030104?/?FIFO Base End?
 
 
 
0xCC0030144?/?PI (cpu) FIFO current Write Pointer?
 
 
 
0xCC0030184?/??
 
 
 
0xCC00301c4?/??
 
 
 
0xCC0030204?/??
 


0xCC0030244?/?Reset?
 
Writing anything here seems to cause a complete reset.
 
 
 
0xCC00302c4?/??
 
3124231615870
................................
 
bit(s) Description
28-31 console type (2: hw2)
 
 
index

5.4.1  Operation

5.4.1.1   FIFO/Write Gather Pipe  
when CPU writes a byte to 0xcc008000, it is written to mem[writeptr], and writeptr is increased automatically.

0xcc008000 is the write gather pipe, a way for the CPU to blast sequences of things of various sizes to memory without having to keep track of the write pointer and wrapping manually. the gp then reads what the CPU has written to memory. It is used for Display Lists. it will disconnect the GP from the writegatherpipe (cc000002 & 0x10 = 0), and change the write ptr to where it wants to write a display list.. then use ordinary GX commands to build it. there's a Call Displaylist GX command.. so it will store render commands for rendering a certain object (for example) in a display list in memory, then send the CallDL with the address to the list instead of sending all the vertices over the FIFO.
5.4.1.2   Interrupts  
Each interrupt has one or more "source" devices. It means that some kind of device may generate a couple of different interrupts, represented by a single bit in interrupt registers. To "enable" interrupt, set bit in mask register. To ignore all interrupts write 0 to interrupt mask register. Raising of any interrupt will set corresponding bit in interrupt cause register. Interrupt cause register resets to 0, when read (i.e. you must read it to clear pending interrupts).

Interrupt mask register isn't controlled by hardware logic. Note that masking of interrupt in INTMR doesn't disable it at all. It is only causing masked interrupt to be ignored in the software interrupt handler. You must clear corresponding "source" device registers, to completely disable interrupt.

5.4.1.3   hotreset  
this code snippet will reset the machine almost as if powered off/on

        lis r3,0 
        lis r9,0xCC00 
        sth r3, 0x2000(r9) 
        li r4, 3 
        stw r4, 0x3024(r9) 
        stw r3, 0x3024(r9) 
        nop 
loop__: 
        b loop__ 
index

5.5  MI - Memory Interface

Protection can be enabled only for pages (page size is 1024 bytes), and you can specify only 4 protected regions of memory. External interrupt will be raised, if CPU try to wrong access in protected region. Because of its allowed to enable protection only for 4 regions, here is total 4 possible interrupts. They are called : MEM_0, MEM_1, MEM_2 and MEM_3.

Registerblock BaseSize of Registerblockcommon access size
0xcc0040000x804
 
 
0xCC0040004r/wProtected Region No1
0xCC0040044r/wProtected Region No2
0xCC0040084r/wProtected Region No3
0xCC00400c4r/wProtected Region No4
 
3124231615870
llllllllllllllllhhhhhhhhhhhhhhhh
 
bit(s) Description
16-31lPage Address Lo
0-15hPage Address Hi
 
 
 
note: the page address can be calculated as (physical_address> >10) 
 
0xCC0040102r/wtype of the protection, 4*2 bits
 
15870
........33221100
 
bit(s) Description
  unused/reserved
63Channel 3
  
0access denied
1read only (break on write)
2write only (break on read)
3read / write (no protection, full access)
42Channel 2 (see Channel 3)
21Channel 1 (see Channel 3)
00Channel 0 (see Channel 3)
 
 
 
0xCC00401c2?/wMI interrupt mask
 
15870
...........m3210
 
bit(s) Description
4mmask all MI interrupts (1 - enable)
33mask MEM3 interrupt (1 - enable)
22mask MEM2 interrupt (1 - enable)
11mask MEM1 interrupt (1 - enable)
00mask MEM0 interrupt (1 - enable)
 
 

0xCC00401e2r/winterrupt cause
 
15870
...........m3210
 
bit(s) Description
4mall MI interrupts
33MEM3 interrupt
  
read0irq has not been requested
 1irq has been requested
write0no effect
 1clear pending irq assertion
22MEM2 interrupt
  
read0irq has not been requested
 1irq has been requested
write0no effect
 1clear pending irq assertion
11MEM1 interrupt
  
read0irq has not been requested
 1irq has been requested
write0no effect
 1clear pending irq assertion
00MEM0 interrupt
  
read0irq has not been requested
 1irq has been requested
write0no effect
 1clear pending irq assertion
 


0xCC0040202?/??
 
15870
..............m.
 
bit(s) Description
11? (set when MI interrupt has been asserted)
00?
 


note: assume to be zero, after init, and should be cleared by interrupt handler. 
 
0xCC0040222r/?ADDRLO - address which failed protection rules
 
15870
................
 
bit(s) Description
5-15 bit 5-bit 15 of address
0-4 zero
 
 

0xCC0040242r/?ADDRHI - address, which failed protection rules
 
15870
................
 
bit(s) Description
14-15 zero
0-13 bit 16-bit 29 of address
 


0xCC0040322r/?TIMERHI
0xCC0040342r/?TIMERLO


0xCC0040362r/?TIMERHI
0xCC0040382r/?TIMERLO


0xCC00403a2r/?TIMERHI
0xCC00403c2r/?TIMERLO


0xCC00403e2r/?TIMERHI
0xCC0040402r/?TIMERLO


0xCC0040422r/?TIMERHI
0xCC0040442r/?TIMERLO


0xCC0040462r/?TIMERHI
0xCC0040482r/?TIMERLO


0xCC00404a2r/?TIMERHI
0xCC00404c2r/?TIMERLO


0xCC00404e2r/?TIMERHI
0xCC0040502r/?TIMERLO


0xCC0040522r/?TIMERHI
0xCC0040542r/?TIMERLO


0xCC0040562r/?TIMERHI
0xCC0040582r/?TIMERLO


note: writing anything to the timer register resets it to zero

0xCC00405a2r/??
 
15870
.....xxxxxxxxxxx
 
bit(s) Description
11-15 unused ?
   
 

index

5.6  DSP - Digital Signal Processor Interface

At the heart of the GCN audio hardware is a custom digital signal processor (DSP) which is largely dedicated to pitch modulation and the mixing of voices and effects data. The DSP is augmented by a large quantity of auxiliary RAM (ARAM) which may be used to store audio samples.The GCN audio hardware features a custom digital signal processor (DSP) which has the following characteristics:
Register block BaseSize of Register blockcommon access size
0xCC0050000x200 bytes16bit words
 
 
0xCC0050002r/wDSP Mailbox High (to DSP)
0xCC0050022r/wDSP Mailbox Low (to DSP)
 
bit31 of DSP Mailbox shows mail delivery status. (it will be cleared when the transfer is done)
to send mail just write data, high word first, with bit31 set.
 
 
0xCC0050042rCPU Mailbox High (from DSP)
0xCC0050062rCPU Mailbox Low (from DSP)
 
bit31 of CPU Mailbox shows mail delivery status.
 
 
 
0xCC00500a2?/wAI DSP CSR - Control Status Register (DSP Status)
 
15870
................
 
bit(s) Description
11 Reset DSP (?)
10  
9 DSP DMA Int Status
8 DSPINTMSK - DSP interrupt mask (*1)
7 DSPINT
  
read0no interrupts
 1interrupt is active
write0no effect
 1clear interrupt
6 ARINTMSK - ARAM interupt mask (*2)
5 ARINT -
  
read0no interrupts
 1interrupt is active
write0no effect
 1clear interupt
4 AIDINTMASK - AI interrupt mask (*3)
3 AIDINT
  
read0no interrupts
 1interrupt is active
write0no effect
 1clear interrupt
2 HALT - Halt DSP (?)
  
read0 
 1 
write0unhalt DSP
 1halt DSP (stop task execution)
1 PIINT - DSP Interrupt Assertion (?)
  
read0 
 1 
write0 
 1assert PI DSP interrupt
0 RES - Reset DSP (?)
  
read0 
 1 
write0 
 1reset DSP
 
 

(*1) disables only PI interrupt, doesnt effect assertion of DSPINT.
(*2) disables only PI interrupt, doesnt effect assertion of ARINT.
(*3) disables only PI interrupt, doesnt effect assertion of AIDINT.

0xCC0050122?/?AR_SIZE
 
 
 


0xCC0050162?/?AR_MODE
 
 
 


0xCC00501a2?/?AR_REFRESH
 
 
 


0xCC0050202?/?AR_DMA_MMADDR_H
 
 
 


0xCC0050222?/?AR_DMA_MMADDR_L
 
 
 
 
 
0xCC0050242?/?AR_DMA_ARADDR_H
 
 
 
 
 
0xCC0050262?/?AR_DMA_ARADDR_L
 
 
 
 
 
0xCC0050282?/?AR_DMA_CNT_H
 
bit(s) description
15 type of transfer (0: write to aram 1: read from aram)
0-14 high bits of transfer length
 
 
 
0xCC00502a2?/?AR_DMA_CNT_L
 
 
 
 
 
0xCC0050302?/wDMA Start address (High)
 
Start of Audio Data
 
 
 
0xCC0050322?/wDMA Start address (Low)
 
Start of Audio Data
 
 
 
0xCC0050362?/wDMA Control/DMA length (Length of Audio Data)
 
15870
axxxxxxxxxxxxxxx
 
bit(s) Description
 a0=stop sample 1=play sample
 xlength/32 (max len is 0x000fffe0)
 
 
 
0xCC00503a2r/?DMA Bytes left
 
Counts down to zero showing how any bytes are left
 

index

5.6.1  internal DSP Registers

Registerblock BaseSize of Registerblockcommon access size
0xffc9 2


0xFFC92r/wDSCR - DSP dma Control Register
 
15870
    
 
bit(s) description
3-15 unused/reserved
2 DSP DMA busy
  
read0 
 1Block length counter not yet zero, DMA is still busy
write0no effect ?
 1no effect ?
1 DSP source/destination (DMA involved DSP memory)
  
0DSP data memory
1DSP instruction memory
0 transfer direction
  
0from main memory to DSP memory
1from DSP memory to main memory
 


0xFFCB2r/wDSBL - DSp dma Block Length
 
15870
    
 
bit(s) description
2-15 block length - This register is used to specify DSP DMA transfer length from bit 15 to bit 2
0-1 r: 2 bit of its LSBs - The transfer length is a multiple of 4 bytes
 


0xFFCD2r/wDSPA - DSp dma dsP memory Address High
 
15870
    
 
bit(s) description
1-15 DSP memory address - This register is used to specify DSP memory starting/current address from bit 15 to bit 1
0 r: 1 bit of its LSBs - The DSP memory address should be located at 2 word boundary
 


0xFFCE2r/wDSMAH - DSp dma Main memory Address High
 
15870
    
 
bit(s) description
10-15 r: 6 bits of its MSBs - This register is used to specify DSP DMA main memory starting/current address from bit 31 to bit 26, and always 0
0-9 main memory address high word - This register is used to specify DSP DMA main memory starting/current address from bit 25 to bit 16
 


0xFFCF2r/wDSMAL - DSp dma Main memory Address Low
 
15870
    
 
bit(s) description
2-15 main memory address - This register is used to specify DSP DMA main memory starting/current address from bit 15 to bit 2
0-1 r: 2 bits of its LSBs - The main memory address of this DMA should be located at 4 byte boundary
 


0xFFD42r/wACSAH - Accelerator aram Starting Address High
 
15870
    
 
bit(s) description
11-15 unused/reserved
0-10 wtarting address high-word - Bit 26 to bit 16 of ARAM starting address
 


0xFFD52r/wACSAL - Accelerator aram Starting Address Low
 
15870
    
 
bit(s) description
0-15 Starting address low-word - Bit 15 to bit 0 of ARAM starting address
 


0xFFD62wACEAH - Accelerator aram Ending Address High
 
15870
    
 
bit(s) description
15-11 unused/reserved
0-10 ending address high-word - Bit 26 to bit 16 of ARAM ending address
 


0xFFD72wACEAL - Accelerator aram Ending Address Low
 
15870
    
 
bit(s) description
0-15 ending address low-word - Bit 15 to bit 0 of ARAM ending address
 


0xFFD82r/wACCAH - Accelerator aram Current Address High
 
15870
    
 
bit(s) description
15 direction
  
0accelerator read ARAM
1accelerator write ARAM
11-14 unused/reserved
0-10 current address high-word - Bit 26 to bit 16 of ARAM current address
 


0xFFD92r/wACCAL - Accelerator aram Current Address Low
 
15870
    
 
bit(s) description
0-15 Bit 15 to Bit 0 of ARAM current address
 


0xFFEF2r/wAMDM - ARAM-Dma request Mask
 
15870
    
 
bit(s) description
1-15 unused/reserved
0 
0DMA request ARAM is unmasked
1DMA request ARAM is masked
 


index

5.6.2  Operation

5.6.2.1   play raw audio sample  
5.6.2.2   transfer from/to ARAM  
5.6.2.3   reset DSP  
5.6.2.4   Boot DSP Task  
index

5.7  DI - DVD Interface

Register block BaseSize of Register blockcommon access size
0xCC0060000x404


0xCC0060004r/wDISR - DI Status Register
 
3124231615870
        
 
bit(s) description
7-31 reserved
6 BRKINT - Break Complete Interrupt Status (*1)
  
read0Interrupt has not been requested
 1Interrupt has been requested
write0no effect
 1clear Interrupt
5 BRKINTMASK - Break Complete Interrupt Mask. 0:masked, 1:enabled (*2)
4 TCINT - Transfer Complete Interrupt Status (*3)
  
read0Interrupt has not been requested
 1Interrupt has been requested
write0no effect
 1clear Interrupt
3 TCINTMASK - Transfer Complete Interrupt Mask. 0:masked, 1:enabled (*4)
2 DEINT - Device Error Interrupt Status (*5)
  
read0Interrupt has not been requested
 1Interrupt has been requested
write0no effect
 1clear Interrupt
1 DEINTMASK - Device Error Interrupt Mask. 0:masked, 1:enabled (*6)
0 BRK - DI Break (*7)
  
read0break not requested or break complete
 1break requested and pending
write0no effect
 1request break
 


(*1) On read this bit indicates the current status of the break complete interrupt. This interrupt is asserted when a Break cycle has completed (break acknowledge received from mass storage access device). When a `1` is written to this register, the interrupt is cleared.
(*2) Interrupt masking prevents the interrupt from being sent to the main processor, but does not affect the assertion of DISR[BRKINT]
(*3) On read this bit indicates the current status of the transfer complete interrupt. The Transfer Complete interrupt is asserted under the following conditions: a DMA mode transfer has completed (DMA finished) or an Immediate mode transfer has completed (transfer to/from DIIMMBUF has completed). When a `1` is written to this register, the interrupt is cleared. The assertion of TCIT is delayed until the DIDSTRBb (low) in order to guarantee the error interrupt occurs before transfer complete interrupt. If DIERRb is asserted during the current transaction, the transaction will be halted and TCINT will not be asserted.
(*4) Interrupt masking prevents the interrupt from being sent to the main processor, but does not affect the assertion of DISR[TCINT]
(*5) On read this bit indicates the current status of the mass storage access device error interrupt. To clear this interrupt, two actions must occur. When a `1` is written to this register, the internal interrupt is cleared. To reset the DIERRb signal, a command must be issued to the external DI device. If error occurs during the command packet, the drive has to delay the error assertion until the completion of the 12 bytes command transfer. In immediate mode, if error occurs during the data packet, the error assertion has to be delayed until the completion of the 4 bytes data transfer. In DMA mode, it has to be delayed until the completion of any 32 bytes data transfer.
(*6) Interrupt masking prevents the interrupt from being sent to the main processor, but does not affect the assertion of DISR[DEINT]
(*7) When a `1` is written to this bit, the DI controller interrupts the current command and sends a break signal to the mass storage access device. The break signal interrupts the current command on the mass storage access device. After the break sequence is complete (see TCINT), a new command may be sent to the mass storage access device. This bit is cleared after the break command is complete. Note that DI controller will delay the break signal assertion if it is in the middle of the command transfer. Hence break can only occur during the data transfer or when it is idle.

0xCC0060044r/wDICVR - DI Cover Register (status2)
 
3124231615870
.............................smc
 
bit(s) Description
2sCVRINT - Cover Interrupt Status (*1)
  
read0cover interrupt has not been requested
 1cover interrupt has been requested
write0no effect
 1clear cover interrupt
1mCVRINTMASK - Cover Interrupt Mask. 0: masked, 1: enabled (*2)
0cCVR - State of the DICOVER signal. 0: cover closed, 1: cover opened
 
 
 
(*1) On read this bit indicates the current status of the Mass Storage Device Cover interrupt. When a `1` is written to this register, the internal interrupt is cleared. The Mass Storage Device Cover Interrupt is asserted when the status of the DICOVER signal changes (e.g., when the cover is opened or closed).
(*2) Interrupt masking prevents the interrupt from being sent to the main processor, but does not affect the assertion of DISR[DEINT]. 
 
0xCC0060084r/wDICMDBUF0 - DI Command Buffer 0
 
3124231615870
cccccccc111111112222222222222222
 
bit(s) Description
24-31ccommand
16-231subcommand 1
0-152subcommand 2
 

 
0xCC00600c4r/wDICMDBUF1 - DI Command Buffer 1 (offset in 32 bit words)
 
 
 
0xCC0060104r/wDICMDBUF2 - DI Command Buffer 2 (source length)
 
 
 
0xCC0060144r/wDIMAR - DMA Memory Address Register
 
3124231615870
        
 
bit(s) description
26-31 reserved/unused
5-25 DIMAR - Address of source/destination buffer in main Memory
0-4 always zero (Address must be 32 byte aligned)
 
 
 
0xCC0060184r/wDILENGTH - DI DMA Transfer Length Register
 
3124231615870
        
 
bit(s) description
26-31 reserved/unused
5-25 DILENGTH - length of DMA data transfer in bytes (*1)
0-4 always zero (transfer length must be 32 byte aligned)
 
 
 
(*1) If a DMA command is interrupted by a break cycle, this register indicates the amount of data that was left to transfer before the DMA command was interrupted. If the length equals zero, it is a special case with command transfer only. 
 
0xCC00601c4r/wDICR - DI Control Register
 
3124231615870
.............................mbe
 
bit(s) Description
2mRW - access mode, 0:read, 1:write
1bDMA - 0: immediate mode, 1: DMA mode (*1)
0eTSTART - transfer start. write 1: start transfer, read 1: transfer pending (*2)
 
 
 
(*1) The only mass storage device packet command which can use immediate mode is the `Register Access` command. When in immediate mode, the DIMAR and DILENGTH registers are ignored. 
 
(*2) When read this bit represents the current command status. This bit is also cleared after the break completion and after DIERRb is asserted. 
 
0xCC0060204r/wDIIMMBUF - DI immediate data buffer (error code ?)
 
3124231615870
        
 
bit(s) description
24-31 REGVAL0 - data of register address+0
16-23 REGVAL1 - data of register address+1
8-15 REGVAL2 - data of register address+2
0-7 REGVAL3 - data of register address+3
 
 
 
0xCC0060244rDICFG - DI Configuration Register
 
3124231615870
        
 
bit(s) description
8-31 reserved/unused
0-7 CONFIG - during reset this register latches DIDD bus (only bit 0 used)
 
index

5.7.1  Operation

5.7.1.1   Drive Info (Inquiry)  

    5.7.1.1.1  Structure of the Drive Info Data  
startendsizeDescription
0x00000x00010x02revision level
0x00020x00030x02device code
0x00040x00070x04release date
0x00080x001F0x18padding zeros

5.7.1.2   Read Disc ID / Init Disc  
5.7.1.3   Read Sector  
5.7.1.4   Seek  
5.7.1.5   Request Error  
5.7.1.6   Play Audio Stream (?)  
5.7.1.7   Request Audio Status  
5.7.1.8   Stop Motor  
5.7.1.9   DVD Audio Disable  
5.7.1.10   DVD Audio Enable  
index

5.8  SI - Serial Interface

Register block BaseSize of Register blockcommon access size
0xCC0064000x1004


0xCC0064004r/wSIC0OUTBUF - SI Channel 0 Output Buffer (Joy-channel 1 Command)
0xCC00640c4r/wSIC1OUTBUF - SI Channel 1 Output Buffer (Joy-channel 2 Command)
0xCC0064184r/wSIC2OUTBUF - SI Channel 2 Output Buffer (Joy-channel 3 Command)
0xCC0064244r/wSIC3OUTBUF - SI Channel 3 Output Buffer (Joy-channel 4 Command)
 
3124231615870
        
 
bit(s) description
24-31 unused/reserved
16-23 CMD - (*1)
8-15 OUTPUT0 - (*2)
0-7 OUTPUT1 - (*3)
 

 
This register is double buffered, so main processor writes to the SIC0OUTBUF will not interfere with the serial interface output transfer. Internally, a second buffer is used to hold the output data to be transferred across the serial interface. To check if SIC0OUTBUF has been transferred to the second buffer, main processor polls the SISR[WRST0] register. When SICOOUTBUF is transferred, SISR[WRST0] is cleared.

(*1) This byte is the opcode for the command sent to the controller during each command/response packet. This is the first data byte sent from the SI I/F to the game controller in the command/response packet.
(*2) This is the first data byte of the command packet. It is the second data byte sent from the SI I/F to the game controller in the command/response packet.
(*3) This is the second data byte of the command packet. It is the third data byte sent from the SI I/F to the game controller in the command/response packet. 
 
0xCC0064044rJoy-channel 1 Buttons 1
0xCC0064104rSIC1INBUFH - SI Channel 1 Input Buffer High (Joy-channel 2 Buttons 1)
0xCC00641c4rJoy-channel 3 Buttons 1
0xCC0064284rJoy-channel 4 Buttons 1
 
3124231615870
...syxba..LRudrlxxxxxxxxyyyyyyyy
 
bit(s) Description
31 ERRSTAT - Error Status (*1)
  
0no error on last transfer
1error on last transfer
30 ERRLATCH - Error Latch (*2)
  
0no error latched
1error latched (check SISR)
24-29 bit 0-5 of input byte 0 (bit 6 and 7 are assumed to be 0)
16-23 input byte 1
8-15 input byte 2
0-7 input byte 3
 
 

(*1) This bit represents the current error status for the last SI polling transfer on this channel. This register is updated after each polling transfer on this channel.
(*2) This bit is an error status summary of the SISR error bits for this channel. If an error has occurred on a past SI transfer (polling or Com transfer), this bit will be set. To determine the exact error, read the SISR register. This bit is actually an `or` of the latched error status bits for this channel in the SISR. The bit is cleared by clearing the appropriate error status bits latched in the SISR. The no response error indicates that a controller is not present on thischannel.

0xCC0064084r/wJoy-channel 1 Buttons 2
0xCC0064144r/wJoy-channel 2 Buttons 2
0xCC0064204r/wJoy-channel 3 Buttons 2
0xCC00642c4rSIC3INBUFL - SI Channel 3 Input Buffer Low (Joy-channel 4 Buttons 2)
 
3124231615870
xxxxxxxxyyyyyyyyllllllllrrrrrrrr
 
bit(s) Description
24-31xinput byte 4
16-23yinput byte 5
8-15linput byte 6
0-7rinput byte 7
 
 
 
SIC0INBUFH and SIC0INBUFL are double buffered to prevent inconsistent data reads due to main processor conflicting with incoming serial interface data. To insure data read from SIC0INBUFH and SIC0INFUBL are consistent, a locking mechanism prevents the double buffer from copying new data to these registers. Once SIC0INBUFH is read, both SIC0INBUFH and SIC0INBUFL are `locked` until SIC0INBUFL is read. While the buffers are `locked`, new data is not copied into the buffers. When SIC0INBUFL is read, the buffers become unlocked again. 

0xCC0064304r/wSIPOLL - SI Poll Register (Joy-channel Control (?) (Calibration gun ?))
 
3124231615870
........????.???......?.eeee....
 
bit(s) description
26-31 unused/reserved
16-25 X - 7 X lines register (*1)
8-15 Y - y times register (*2)
4-7eEN - controller port enable (1 bit per port, 1: enabled) (*3)
0-3 VBCPY - Vblank copy output channel (1 bit per port) (*4)
  
0copy SICOUTBUF to output buffer after writing
1copy SICOUTBUF to output buffer only on vblank
 
 

(*1) 7 X lines register: determines the number of horizontal video lines between polling (the polling interval). The polling begins at vsync. 7 is the minimum setting (determined by the time required to complete a single polling of the controller). The maximum setting depends on the current video mode (number of lines per vsync) and the SIPOLL[Y] register. This register takes affect after vsync.
(*2) This register determines the number of times the SI controllers are polled in a single frame. This register takes affect after vsync.
(*3) Enable polling of channel. When the channel is enabled, polling begins at the next vblank. When the channel is disabled, polling is stopped immediately after the current transaction. The status of this bit does not affect communication RAM transfers on this channel.
(*4) Normally main processor writes to the SIC0OUTBUF register are copied immediately to the channel 0 output buffer if a transfer is not currently in progress. When this bit is asserted, main processor writes to channel 0's SIC0OUTBUF will only be copied to the outbuffer on vblank. This is used to control the timing of commands to 3D LCD shutter glasses connected to the VI.

0xCC0064344r/wSICOMCSR - SI Communication Control Status Register (command)
 
3124231615870
r?..?ccs.mmmmmmm.nnnnnnneb.....?
 
bit(s) description
31rTCINT - Transfer Complete Interrupt Status
  
read0transfer complete interrupt not requested
 1transfer complete interrupt has been requested
write0no effect
 1clear transfer complete interrupt
30 TCINTMSK - Transfer Complete Interrupt Mask (*1)
  
0interrupt masked
1interrupt enabled
29 COMERR - Communication Error
  
0ok
1error (see SiSr for the cause)
28 RDSTINT - Read Status Interrupt Status (*2)
  
read0Transfer Complete Interrupt not requested
 1Transfer Complete Interrupt has been requested
write0 
 1 
27 RDSTINTMSK - Read Status interrupt Mask (*3)
  
0masked
1enabled
25-26cChannel Number (?)
24sChannel Enable (?)
23 unused/reserved
16-22mOUTLNGTH - Communication Channel Output Length (*4)
15 unused/reserved
8-14nINLNGTH - Communication Channel Input Length (*4)
7eCommand Enable (?)
6bcallback enable
  
bitDescription
0no callback
1callback enabled
1-2 CHANNEL - (*5)
  
00Channel 1
01Channel 2
10Channel 3
11Channel 4
0 TSTART - Transfer Start (*6)
  
read0Command Complete
 1Command Pending
write0Do not start command
 1Start command
 
 
 
(*1) Interrupt masking prevents the interrupt from being sent to the main processor, but does not affect the assertion of SICOMCSR[TCINT] 
(*2) On read this bit indicates the current status of the Read Status interrupt. The interrupt is set whenever SISR[RDSTn] bits are set. The interrupt is cleared when all of the RdSt bits in the SISR are cleared by reading from the Si Channel Input Buffers. This interrupt can be used to indicate that a polling transfer has completed and new data is captured in the input registers
(*3) Interrupt masking prevents the interrupt from being sent to the main processor, but does not affect the assertion of SICOMCSR[RDSTINT]
(*4) Minimum transfer is 1 byte. A value of 0 will transfer 128 bytes. These bits should not be modified while SICOM transfer is in progress.
(*5) These bits should not be modified while SICOM transfer is in progress.
(*6) When a `1` is written to this register, the current communication transfer is executed. The transfer begins immediately after the current transaction on this channel has completed. When read this bit represents the current transfer status. Once a communication transfer has been executed, polling will resume at the next vblank if the channel's SIPOLL[ENn] bit is set. 
 
When programming the SICOMCSR after a SICOM transfers has already started (e.g., SICOMCSR[TSTART] is set), the software should read the current value first, then and/or in the proper data and then write the new data back. The software should not modify any of the transfer parameters (OUTLNGTH, INLNGTH, CHANNEL) until the current transfer is complete. This is done to prevent a SICOM transfer already in progress from being disturbed. When writing the data back, the software should not set the TSTART bit again unless the current transfer is complete and another transfer is required. 
 
0xCC0064384r/wSISR - SI Status Register (channel select & status2)
 
3124231615870
r???aaaa????bbbb????cccc????dddd
 
bit(s) description
31rWR - Write SICnOUTBUF Register (*1)
  
read0buffer copied
 1buffer not copied
write0no effect
 1copy all buffers
30 reserved/unused
29 RDST0 - Read Status SIC0OINBUF Register (*2)
  
0New data available, not read by main processor
1No new data available, already read by main processor
28 WRST0 - Write Status SIC0OUTBUF Register (*3)
  
0Buffer copied
1Buffer not copied
27 NOREP0 - No Response Error Channel 0 (*4)
  
read0No Response Error not asserted
 1No Response Error asserted
write0No effect
 1Clear No Response Error
26 COLL0 - Collision Error Channel 0 (*5)
  
read0Collision Error not asserted
 1Collision Error asserted
write0No effect
 1Clear Collision Error
25 OVRUN0 - Over Run Error Channel 0 (*6)
  
read0Over Run Error not asserted
 1Over Run Error asserted
write0No effect
 1Clear Over Run Error
24 UNRUN - Under Run Error Channel 0 (*7)
  
read0Under Run not asserted
 1Under Run asserted
write0No effect
 1Clear Under Run Error
22-23 reserved/unused
16-21bJoy-channel 1 bits
14-15 reserved/unused
8-13cJoy-channel 2 bits
6-7 reserved/unused
0-5dJoy-channel 3 bits
 
 
 
(*1) Write SICnOUTBUF Register: This register controls and indicates whether the SICnOUTBUFs have been copied to the double buffered output buffers. This bit is cleared after the buffers have been copied.
(*2) This register indicates whether the SIC0INBUFs have been captured new data and whether the data has already been read by the main processor (read indicated by main processor read of SIC01NBUF[ERRSTAT, ERRLATCH, INPUT0, INPUT1)]
(*3) This register indicates whether the SIC0OUTBUFs have been copied to the double buffered output buffers. This bit is cleared after the buffers have been copied.
(*4) This register indicates that a previous transfer resulted in no response from the controller. This can also be used to detect whether a controller is connected. If no controller is connected, this bit will be set. Once set this bit remains set until it is cleared by the main processor. To clear this bit write `1` to this register.
(*5) This register indicates data collision between controller and main unit. Once set this bit remains set until it is cleared by the main processor. To clear this bit write `1` to this register.
(*6) This register indicates that the main unit has received more data than expected. Once set this bit remains set until it is cleared by the main processor. To clear this bit write `1' to this register.
(*7) This register indicates that the main unit has received less data than expected. Once set this bit remain set until it is cleared by the main processor. To clear this bit write `1` to this register.
 
0xcc00643c4R/WSIEXILK - SI EXI Clock Lock
 
3124231615870
        
 
bit(s) description
31 LOCK - prevents CPU from setting EXI clock to 32MHz
  
032MHz EXI clock setting permitted
132MHz EXI clock setting not permitted
0-30 unused/reserved (always zero)
 
 
 
0xCC0064800x80r/wSI i/o buffer (access by word)
 

index

5.8.1  Operation

5.8.1.1   Serial Send Buffer  
5.8.1.2   Serial Get Result  
index

5.9  EXI - External Interface

Upper memory (0xCC000000 and above) can't keep enough data for extra-large arrays, its limited up to 0xFFFF bytes (suppose to be). EXI was designed to take off this limitation. EXI using for access to big, unmapped areas of HW memory (such as bootrom or SRAM). This is the main task of EXI. By the other way, EXI can be used for providing access to slow, serial devices, such as memory cards. EXI is the complex of different devices, mapped to single bus. EXI bus is divided on 3 channels. Each channel have 3 unique devices. Each device is defined by its ID, and have its own address space.

EXI can be accessed in immediate mode, or via DMA channel. Each EXI device can generate up to 3 interrupts. They are called EXI, TC and EXT :

  
EXIDevice Attached
TCTransfer Completed (any mode)
EXTDevice Detached


Each EXI channel have its own register set, 5 32bit Registers each.

Register block BaseSize of Register blockcommon access size
0xCC0068000x404


0xCC0068004 EXI0CSR - EXI Channel 0 Parameter Register (Status?)
0xCC0068144 EXI1CSR - EXI Channel 1 Parameter Register
0xCC0068284 EXI2CSR - EXI Channel 2 Parameter Register
 
3124231615870
        
 
bit(s) Description
14-31 unused
13 ROMDIS - (EXI0 only) 1: rom de-scramble logic disabled (*1)
12dEXT - Device Connected Bit (R) 1 if a device is connected on the specific channel
11xEXTINT - External Insertion Interrupt Status (R) : check to poll EXT interrupt (or to detect device detach) (*4)
  
read0External Insertion Interrupt has not been requested
 1External Insertion Interrupt has been requested
write0No effect
 1Clear External Insertion Interrupt
10mEXTINTMASK - EXT Interrupt Mask (1 - enable, 0 - disable) (*5)
7-9210CS - devices selected on this channel, each bit selecting one device. (*)
4-6fCLK - used frequency (0-5)
  
0001MHz
0012MHz
0104MHz
0118MHz
10016MHz
10132MHz
110reserved
111reserved
3tTCINT - Transfer Complete Interrupt Status
  
read0Transfer Complete Interrupt has not been requested
 1Transfer Complete Interrupt has been requested
write0No effect
 1Clear Transfer Complete Interrupt
2mTCINTMASK - Transfer complete interrupt mask (1 - enable, 0 - disable) (*2)
1eEXTINT - Interrupt Status (*6)
  
read0EXI Interrupt has not been requested
 1EXI Interrupt has been requested
write0No effect
 1Clear EXI Interrupt
0mEXTINTMASK - EXI interrupt mask (1 - enable, 0 - disable)
 
(*)Only one of these three bits can be set to signify which device number has been selected on a specific channel.
 


(*6) This bit indicates the current status of the EXI0 interrupt. The interrupt is cleared by accessing the expansion device and clearing the interrupt on the device itself and cleared locally when a `1` is written to this register. This interrupt input is edge triggered.
(*1) This bit disables access to the IPL Mask ROM attached to CS1. Once this bit is enabled, it can only be disabled again by global reset. The ROM de-scramble logic will become disabled and any reads to the memory mapped ROM area will return all 0.When de-scrambler is enabled all EXI0 data will be de-scrambled, so only the IPL ROM may be accessed through EXI0 until ROMDIS is set to `1'. (this is usually done by the Bootstrap, see Boot process details)
(*2) Interrupt masking prevents the interrupt from being sent to the main processor, but does not affect the assertion of TCINT
(*3) Interrupt masking prevents the interrupt from being sent to the main processor, but does not affect the assertion of EXIINT
(*5) Interrupt masking prevents the interrupt from being sent to the main processor, but does not affect the assertion of EXICPR[EXTINT]
(*4) This interrupt indicates than an external EXI device has been removed from channel 1. To check whether the device has been inserted or removed, check the EXICPR[EXT] bit. When this bit is set, the channel's expansion EXI interface outputs go to high.

0xCC0068044r/wEXI0MAR - EXI Channel 0 DMA Start Address
0xCC0068184r/wEXI1MAR - EXI Channel 1 DMA Start Address
0xCC00682c4r/wEXI2MAR - EXI Channel 2 DMA Start Address
 
3124231615870
......ddddddddddddddddddddd.....
 
Physical Startaddress for DMA transfer. Must be aligned to 32 byte boundary .
 


(*) The memory address is the destination address when EXICR[RW] is set to `read` and is the source address when set to `write`.

0xCC0068084r/wEXI0LENGTH - EXI Channel 0 DMA Transfer Length
0xCC00681c4 EXI Channel 1 DMA Transfer Length
0xCC0068304 EXI Channel 2 DMA Transfer Length
 
3124231615870
......ddddddddddddddddddddd.....
 
Size of DMA transfer data in bytes. bits 0-4 are always zero (which means the size is 32 byte aligned)
 


0xCC00680c4r/wEXI0CR - EXI Channel 0 Control Register
0xCC0068204r/wEXI1CR - EXI Channel 1 Control Register
0xCC0068344r/wEXI2CR - EXI Channel 2 Control Register
 
3124231615870
..........................llttme
 
bit(s) Description
6-31.unused
4-5lTLEN - (data length-1) for immediate mode
  
001 byte
012 bytes
103 bytes
114 bytes
2-3tRW - transfer type
  
00read
01write
10read and write, invalid for DMA
11undefined
1mDMA - transfer mode (0 - immediate, 1 - DMA)
0eTSTART - set, to start transfer. will be cleared after transfer completed.
 


0xCC0068104r/wEXI0DATA - EXI Channel 0 Immediate Data
0xCC0068244r/wEXI1DATA - EXI Channel 1 Immediate Data
0xCC0068384r/wEXI2DATA - EXI Channel 2 Immediate Data
 
3124231615870
dddddddddddddddddddddddddddddddd
 
Data for read / write immediate operations (up to 4 bytes long).
 


The EXICPR must be configured to assert one of the devices CS, before the read or write operation can be performed. The actual read/write operation is triggered by the EXI0CR[TSTART] register and EXI0CR[DMA] set to `0`. Data is sent with MSB (bit 31) first.

index

5.9.1  Operation

5.9.1.1   Initializing the EXI Bus  
If you want to use DMA with EXI, you need your own properly installed EXI interrupt handlers. There is no need in callbacks and interrupts, if you are using EXI in immediate mode (just mask all TCs, to prevent unhandled interrupts).
5.9.1.2   Selecting a Specific EXI Device on an EXI Channel  
5.9.1.3   Deselecting EXI Devices on an EXI Channel  
5.9.1.4   Performing an IMM Operation on a EXI Device  

    5.9.1.4.1  IMM Read  

    5.9.1.4.2  IMM Write  
5.9.1.5   Performing a DMA Operation on a EXI Device  

    5.9.1.5.1  DMA Read  

    5.9.1.5.2  DMA Write  
5.9.1.6   Wait for EXI transfer completed  
To detect the end of a transfer on a specific channel either setup a 'transfer completed' callback (only works with DMA transfer) or periodically check bit 0 of the EXI Control Register (until cleared).
index

5.10  AI - Audio Streaming Interface

Registerblock BaseSize of Registerblockcommon access size
0xcc006c000x204


0xCC006C00r/w4AICR - Audio Interface Control Register
 
3124231615870
................................
 
bit(s) Description
7-31 reserved/unused
6 DSP Sample Rate
  
048 kHz sample rate
132 kHz sample rate
5 SCRESET Sample Counter Reset: When a `1` is written to this bit the AISLRCNT register is reset to 0
4 AIINTVLD Audio Interface Interrupt Valid.
  This bit controls whether AIINT is affected by the AIIT register matching AISLRCNT. Once set, AIINT will hold its last value.
  
0Match affects AIINT
1AIINT hold last value.
3 AIINT Audio Interface Interrupt Status and clear. (*3)
  
r0Audio Interface Interrupt has not been requested
 1Audio Interface Interrupt has been requested.
w0No effect
 1Clear Audio Interface interrupt
2 AIINTMSK Audio interface Interrupt Mask
  
0interrupt masked
1Interrupt enabled
1 AFR: Auxiliary Frequency Register (*1)
  
048 kHz sample rate
132 kHz sample rate
0 PSTAT: Playing Status
  
0Stop or Pause streaming audio (AISLR clock disabled)
1Play streaming audio (AISLR clock enabled)
 


(*3 )
On read this bit indicates the current status of the audio interface interrupt. When a `1` is written to this register, the interrupt is cleared. This interrupt indicates that the AIIT register matches the AISLRCNT. This bit asserts regardless of the setting of AICR[AIMSK].
(*1 )
Controls the sample rate of the streaming audio data. When set to 32 kHz sample rate, the SRC will convert the streaming audio data to 48 kHz. This bit should only be changed when Streaming Audio is stopped (AICR[PSTAT] set to 0).
(*0)
This bit enables the AISLR clock which controls the playing/stopping of audio streaming. When this bit is 1 AISLRCNT register will increment for every stereo pair of samples output.

0xCC006C04r/w4AIVR - Audio Interface Volume Register
 
3124231615870
................rrrrrrrrllllllll
 
bit(s) description
16-31 unused/reserved
8-15rAVRR - Volume Right Channel (0x00 is muted,0xff is max)
0-7lAVRL - Volume Right Channel (0x00 is muted,0xff is max)
 


0xCC006C08r4AISCNT - Audio Interface Sample Counter
 


Audio interface Sample Counter: This register counts the number of AIS stereo samples that have been output. It is enabled by AICR[PSTAT]. It can be cleared by the AICR[SCRESET] register.

0xCC006C0Cr/w4AIIT - Audio Interface Interrupt Timing
 


This register indicates the stereo sample count to issue an audio interface interrupt to the main processor. The interrupt is issued when the value of the AISLRCNT register matches the content of this register.
index

5.11  GX FIFO (Graphic display lists)

GP have mapped 32-byte FIFO buffer, at 0xCC008000, which is controlled by write gather pipe (WPAR). when FIFO is filled (or overloaded by 32-bytes), WPAR performs burst transaction of primitive data to GP command FIFO. WPAR API also keeps watching for wrapping it on 32-buffer. You can think, that data is always looped and flows like in circle.

Registerblock BaseSize of Registerblockcommon access size
0xcc0080004any


To access FIFO, you should just write data of any size to 0xCC008000, WPAR will control circularity and gathering automatically. By "data of any size" are assumed command types, vertexes, vertex attributes etc stuff. All commands and primitive data are sending through mapped GP FIFO. GP task is only to draw primitives in embedded frame buffer, and then send it to XFB, for VI rendering. All render rules are stored in VI. GP can only change some copy rules, using pixel engine setup.

GP primitives also can be drawn, using Display List. In that case, GP FIFO takes only "CALL_DL" command with pointer to list data, and then GP command FIFO sequentially parsing primitive data from the main memory. Primitives can contains both direct and indexed vertexes as well. In first case, vertex attributes are sent directly using GP FIFO, in the other case the CPU sends only the pointer to vertex attribute data which is located in main memory.
index

5.11.1  internal BP registers

Registerblock BaseSize of Registerblockcommon access size
0x000x1004 (1+3)


RegisterDescription
0x00GEN_MODE
0x01display copy filter
0x02display copy filter
0x03display copy filter
0x04display copy filter
0x05?
0x06IND_MTXA0
0x07IND_MTXB0
0x08IND_MTXC0
0x09IND_MTXA1
0x0aIND_MTXB1
0x0bIND_MTXC1
0x0cIND_MTXA2
0x0dIND_MTXB2
0x0eIND_MTXC2
0x0fIND_IMASK
0x10IND_CMD0 - tev indirect 0
0x11IND_CMD1 - tev indirect 1
0x12IND_CMD2 - tev indirect 2
0x13IND_CMD3 - tev indirect 3
0x14IND_CMD4 - tev indirect 4
0x15IND_CMD5 - tev indirect 5
0x16IND_CMD6 - tev indirect 6
0x17IND_CMD7 - tev indirect 7
0x18IND_CMD8 - tev indirect 8
0x19IND_CMD9 - tev indirect 9
0x1aIND_CMDA - tev indirect 10
0x1bIND_CMDB - tev indirect 11
0x1cIND_CMDC - tev indirect 12
0x1dIND_CMDD - tev indirect 13
0x1eIND_CMDE - tev indirect 14
0x1fIND_CMDF - tev indirect 15
0x20scissor x0,y0 (0x20156156)
0x21scissor x1,y1 (0x213d5335)
0x22SU_LPSIZE - field mode .. line width - point width
0x23SU Counter (?) (0x23000000)
0x24RAS Counter (?) (0x24000000)
0x25RAS1_SS0 - ind tex coord scale 0
0x26RAS1_SS1 - ind tex coord scale 1
0x27RAS1_IREF
0x28RAS1_TREF0 - tev order 0
0x29RAS1_TREF1 - tev order 1
0x2aRAS1_TREF2 - tev order 2
0x2bRAS1_TREF3 - tev order 3
0x2cRAS1_TREF4 - tev order 4
0x2dRAS1_TREF5 - tev order 5
0x2eRAS1_TREF6 - tev order 6
0x2fRAS1_TREF7 - tev order 7
0x30SU_SSIZE0 - texture offset 0 (Texture Size X, Y ?)
0x31SU_TSIZE0 -
0x32SU_SSIZE1 - texture offset 1
0x33SU_TSIZE1 -
0x34SU_SSIZE2 - texture offset 2
0x35SU_TSIZE2 -
0x36SU_SSIZE3 - texture offset 3
0x37SU_TSIZE3 -
0x38SU_SSIZE4 - texture offset 4
0x39SU_TSIZE4 -
0x3aSU_SSIZE5 - texture offset 5
0x3bSU_TSIZE5 -
0x3cSU_SSIZE6 - texture offset 6
0x3dSU_TSIZE6 -
0x3eSU_SSIZE7 - texture offset 7
0x3fSU_TSIZE7 -
0x40PE_ZMODE set z mode
0x41PE_CMODE0 dithering / blend mode/color_update/alpha_update/set_dither
0x42PE_CMODE1 destination alpha
0x43PE_CONTROL comp z location z_comp_loc(0x43000040)pixel_fmt(0x43000041)
0x44field mask (0x44000003)
0x45PE_DONE - draw done (end of list marker) ?
0x46some clock ? (0x46000000 - (((162000000/500)/4224) - 0x0200))
0x47PE_TOKEN token B (16 bit)
0x48PE_TOKEN_INT token A (16 bit)
0x49EFB source rectangle top left
0x4aEFB source rectangle bottom right
0x4bXFB target address
0x4c?
0x4dstride ?
0x4eDispCopyYScale
0x4fPE copy clear AR - set clear alpha and red components
0x50PE copy clear GB - green and blue
0x51PE copy clear Z - 24-bit Z value
0x52pe copy execute?
0x53copy filter
0x54copy filter
0x55bounding box (0x550003ff)
0x56bounding box (0x560003ff)
0x57?
0x58? (0x5800000f)
0x59scissor-box offset (0x5902acab)
0x5a?
0x5b?
0x5c?
0x5d?
0x5e?
0x5f?
0x60?
0x61?
0x62?
0x63?
0x64TX_LOADTLUT0
0x65TX_LOADTLUT1
0x66?
0x67metric ? (0x67000000)
0x68field mode
0x69some clock ? (0x69000000 - ((((162000000/500)> >11)&0x00ffffff)) - 0x0400)
0x6a?
0x6b?
0x6c?
0x6d?
0x6e?
0x6f?
0x70?
0x71?
0x72?
0x73?
0x74?
0x75?
0x76?
0x77?
0x78?
0x79?
0x7a?
0x7b?
0x7c?
0x7d?
0x7e?
0x7f?
0x80TX_SETMODE0_I0 - 0x90 for linear
0x81TX_SETMODE0_I1
0x82TX_SETMODE0_I2
0x83TX_SETMODE0_I3
0x84TX_SETMODE1_I0
0x85TX_SETMODE1_I1
0x86TX_SETMODE1_I2
0x87TX_SETMODE1_I3
0x88TX_SETIMAGE0_I0 - texture size ?
0x89TX_SETIMAGE0_I1
0x8aTX_SETIMAGE0_I2
0x8bTX_SETIMAGE0_I3
0x8cTX_SETIMAGE1_I0
0x8dTX_SETIMAGE1_I1
0x8eTX_SETIMAGE1_I2
0x8fTX_SETIMAGE1_I3
0x90TX_SETIMAGE2_I0
0x91TX_SETIMAGE2_I1
0x92TX_SETIMAGE2_I2
0x93TX_SETIMAGE2_I3
0x94TX_SETIMAGE3_I0 - Texture Pointer
0x95TX_SETIMAGE3_I1
0x96TX_SETIMAGE3_I2
0x97TX_SETIMAGE3_I3
0x98TX_LOADTLUT0
0x99TX_LOADTLUT1
0x9aTX_LOADTLUT2
0x9bTX_LOADTLUT3
0x9c?
0x9d?
0x9e?
0x9f?
0xa0TX_SETMODE0_I4
0xa1TX_SETMODE0_I5
0xa2TX_SETMODE0_I6
0xa3TX_SETMODE0_I7
0xa4TX_SETMODE1_I4
0xa5TX_SETMODE1_I5
0xa6TX_SETMODE1_I6
0xa7TX_SETMODE1_I7
0xa8TX_SETIMAGE0_I4
0xa9TX_SETIMAGE0_I5
0xaaTX_SETIMAGE0_I6
0xabTX_SETIMAGE0_I7
0xacTX_SETIMAGE1_I4
0xadTX_SETIMAGE1_I5
0xaeTX_SETIMAGE1_I6
0xafTX_SETIMAGE1_I7
0xb0TX_SETIMAGE2_I4
0xb1TX_SETIMAGE2_I5
0xb2TX_SETIMAGE2_I6
0xb3TX_SETIMAGE2_I7
0xb4TX_SETIMAGE3_I4
0xb5TX_SETIMAGE3_I5
0xb6TX_SETIMAGE3_I6
0xb7TX_SETIMAGE3_I7
0xb8TX_SETTLUT_I4
0xb9TX_SETTLUT_I5
0xbaTX_SETTLUT_I6
0xbbTX_SETTLUT_I7
0xbc?
0xbd?
0xbe?
0xbf?
0xc0TEV_COLOR_ENV_0 - tev op 0
0xc1TEV_ALPHA_ENV_0 - tev op 1
0xc2TEV_COLOR_ENV_1 -
0xc3TEV_ALPHA_ENV_1
0xc4TEV_COLOR_ENV_2 -
0xc5TEV_ALPHA_ENV_2
0xc6TEV_COLOR_ENV_3 -
0xc7TEV_ALPHA_ENV_3
0xc8TEV_COLOR_ENV_4 -
0xc9TEV_ALPHA_ENV_4
0xcaTEV_COLOR_ENV_5 -
0xcbTEV_ALPHA_ENV_5
0xccTEV_COLOR_ENV_6 -
0xcdTEV_ALPHA_ENV_6
0xceTEV_COLOR_ENV_7 -
0xcfTEV_ALPHA_ENV_7
0xd0TEV_COLOR_ENV_8 -
0xd1TEV_ALPHA_ENV_8
0xd2TEV_COLOR_ENV_9 -
0xd3TEV_ALPHA_ENV_9
0xd4TEV_COLOR_ENV_A -
0xd5TEV_ALPHA_ENV_A
0xd6TEV_COLOR_ENV_B -
0xd7TEV_ALPHA_ENV_B
0xd8TEV_COLOR_ENV_C -
0xd9TEV_ALPHA_ENV_C
0xdaTEV_COLOR_ENV_D -
0xdbTEV_ALPHA_ENV_D
0xdcTEV_COLOR_ENV_E -
0xddTEV_ALPHA_ENV_E
0xdeTEV_COLOR_ENV_F -
0xdfTEV_ALPHA_ENV_F
0xe0TEV_REGISTERL_0
0xe1TEV_REGISTERH_0
0xe2TEV_REGISTERL_1
0xe3TEV_REGISTERH_1
0xe4TEV_REGISTERL_2
0xe5TEV_REGISTERH_2
0xe6TEV_REGISTERL_3
0xe7TEV_REGISTERH_3
0xe8Fog Range (0xe8000156)
0xe9?
0xea?
0xeb?
0xec? (guessed: tev_range_adj_c)
0xed? (guessed: tev_range_adj_k)
0xeeTEV_FOG_PARAM_0 (0xee03ce38)
0xefTEV_FOG_PARAM_1 (0xef471c82)
0xf0TEV_FOG_PARAM_2 (0xf0000002)
0xf1TEV_FOG_PARAM_3 (0xf1000000)
0xf2TEV_FOG_COLOR (0xf2000000)
0xf3TEV_ALPHAFUNC - alpha compare (0xf33f0000)
0xf4TEV_Z_ENV_0 - z texture 0
0xf5TEV_Z_ENV_1 - z texture 1
0xf6TEV_KSEL_0 - Tev Swap Mode Table 0 (0xf6018064)
0xf7TEV_KSEL_1 - Tev Swap Mode Table 1 (0xf701806e)
0xf8TEV_KSEL_2 - Tev Swap Mode Table 2 (0xf8018060)
0xf9TEV_KSEL_3 - Tev Swap Mode Table 3 (0xf901806c)
0xfaTEV_KSEL_4 - Tev Swap Mode Table 4 (0xfa018065)
0xfbTEV_KSEL_5 - Tev Swap Mode Table 5 (0xfb01806d)
0xfcTEV_KSEL_6 - Tev Swap Mode Table 6 (0xfc01806a)
0xfdTEV_KSEL_7 - Tev Swap Mode Table 7 (0xfd01806e)
0xfeSS_MASK - BP Mask Register
0xff?
 
0x004wGEN_MODE
 
3124231615870
        
 
bit(s) description
24 RID
19 ZFREEZE
16 NBMP - Number of Bumpmaps
14-15 REJECT_EN - Culling Mode
  
0none
1negative
2positive
3all
10 NTEV
9 MS_EN
4 NCOL - Number of Colors
0 NTEX - Number of Texture Coords
 


0x014wdisplay copy filter
 


0x024wdisplay copy filter
 


0x034wdisplay copy filter
 


0x044wdisplay copy filter
 


0x054w?
 


0x064wIND_MTXA0
0x094wIND_MTXA1
0x0c4wIND_MTXA2
 
3124231615870
        
 
bit(s) description
24 RID
22 S
11 MB
0 MA
 


0x074wIND_MTXB0
0x0a4wIND_MTXB1
0x0d4wIND_MTXB2
 
3124231615870
        
 
bit(s) description
24 RID
22 S
11 MD
0 MC
 


0x084wIND_MTXC0
0x0b4wIND_MTXC1
0x0e4wIND_MTXC2
 
3124231615870
        
 
bit(s) description
24 RID
22 S
11 MF
0 ME
 


0x0f4wIND_IMASK
 
3124231615870
        
 
bit(s) description
24 RID
0 IMASK
 


0x104wIND_CMD0
0x114wIND_CMD1
0x124wIND_CMD2
0x134wIND_CMD3
0x144wIND_CMD4
0x154wIND_CMD5
0x164wIND_CMD6
0x174wIND_CMD7
0x184wIND_CMD8
0x194wIND_CMD9
0x1a4wIND_CMDA
0x1b4wIND_CMDB
0x1c4wIND_CMDC
0x1d4wIND_CMDD
0x1e4wIND_CMDE
0x1f4wIND_CMDF
 
3124231615870
        
 
bit(s) description
24 RID
21-23 PAD0 - padding zeros
20 FB - addprev
19 LB - utclod
16-18 TW - Wrap T
  
0ITW_OFF
1ITW_256
2ITW_128
3ITW_64
4ITW_32
5ITW_16
6ITW_0
7 
13-15 SW - Wrap S
  
0ITW_OFF
1ITW_256
2ITW_128
3ITW_64
4ITW_32
5ITW_16
6ITW_0
7 
9-12 M - Matrix ID
  
0ITM_OFF
1ITM_0
2ITM_1
3ITM_2
5ITM_S0
6ITM_S1
7ITM_S2
9ITM_T0
10ITM_T1
11ITM_T2
7-8 BS - Alpha Selection
  
0ITBA_OFF
1ITBA_S
2ITBA_T
3ITBA_U
4-6 BIAS
  
0ITB_NONE
1ITB_S
2ITB_T
3ITB_ST
4ITB_U
5ITB_SU
6ITB_TU
7ITB_STU
2-3 FMT - Format
  
0ITF_8
1ITF_5
2ITF_4
3ITF_3
0-1 BT - Indirect Tex Stage ID (0-3)
 
 
0x204wSU_SCIS0 - Scissorbox Top Left Corner
 
3124231615870
        
 
bit(s) description
24 RID
12 X0 - Scissorbox X0 offset + 342
0 Y0 - Scissorbox Y0 offset + 342
 


0x214wSU_SCIS1 - Scissorbox Bottom Right Corner
 
3124231615870
        
 
bit(s) description
24 RID
12 X1 - Scissorbox X1 offset + 342
0 Y1 - Scissorbox Y1 offset + 342
 


0x224wSU_LPSIZE
 
3124231615870
        
 
bit(s) description
24 RID
23 PAD0
22 LINEASPECT
19 PTOFF
  
0to 0
1to 16th
2to 8th
3to 4th
4to half
5to 1
16 LTOFF
  
0to 0
1to 16th
2to 8th
3to 4th
4to half
5to 1
8 PSIZE
0 LSIZE
 


0x234wSU Counter ?
 


0x244wRAS Counter ?
 


0x254wRAS1_SS - ind tex coord scale 0
 
3124231615870
        
 
bit(s) description
24 RID
12 TS1 - Ind. Tex Stage 1
8 SS1 - Ind. Tex Stage 1
4 TS0 - Ind. Tex Stage 0
0 SS0 - Ind. Tex Stage 0
 


0x264wRAS1_SS - ind tex coord scale 1
 
3124231615870
        
 
bit(s) description
24 RID
12 TS1 - Ind. Tex Stage 3
8 SS1 - Ind. Tex Stage 3
4 TS0 - Ind. Tex Stage 2
0 SS0 - Ind. Tex Stage 2
 


0x274wRAS1_IREF
 
3124231615870
        
 
bit(s) description
24 RID
21 BC3 - Ind. Tex Stage 3 NTexCoord
18 BI3 - Ind. Tex Stage 3 NTexMap
15 BC2 - Ind. Tex Stage 2 NTexCoord
12 BI2 - Ind. Tex Stage 2 NTexMap
9 BC1 - Ind. Tex Stage 1 NTexCoord
6 BI1 - Ind. Tex Stage 1 NTexMap
3 BC0 - Ind. Tex Stage 0 NTexCoord
0 BI0 - Ind. Tex Stage 0 NTexMap
 


0x284wRAS1_TREF0
0x294wRAS1_TREF1
0x2a4wRAS1_TREF2
0x2b4wRAS1_TREF3
0x2c4wRAS1_TREF4
0x2d4wRAS1_TREF5
0x2e4wRAS1_TREF6
0x2f4wRAS1_TREF7
 
3124231615870
        
 
bit(s) description
24 RID
22 PAD1
19-21 CC1 - Ind. Tex Stage 1 Channel ID
  
0Color0
1Color1
2Alpha0
3Alpha1
4Color0A0
5Color1A1
6ColorZero
7Bump
18 TE1 - Ind. Tex Stage 1 TexMap enable
15 TC1 - Ind. Tex Stage 1 TexCoord
12 TI1 - Ind. Tex Stage 1 TexMap
10 PAD0
7 CC0 - Ind. Tex Stage 0 Color ID
6 TE0 - Ind. Tex Stage 0 TexMap enable
3 TC0 - Ind. Tex Stage 0 TexCoord
0 TI0 - Ind. Tex Stage 0 TexMap
 


0x304wSU_SSIZE0
0x324wSU_SSIZE1
0x344wSU_SSIZE2
0x364wSU_SSIZE3
0x384wSU_SSIZE4
0x3a4wSU_SSIZE5
0x3c4wSU_SSIZE6
0x3e4wSU_SSIZE7
 
3124231615870
        
 
bit(s) description
24 RID
19 PF - texcoord offset for points enable
18 LF - texcoord offset for lines enable
17 WS - s-cylindrical texcoord wrapping enable
16 BS - s-range bias enable
0 SSIZE - s-scale value -1 (U16)
 


0x314wSU_TSIZE0
0x334wSU_TSIZE1
0x354wSU_TSIZE2
0x374wSU_TSIZE3
0x394wSU_TSIZE4
0x3b4wSU_TSIZE5
0x3d4wSU_TSIZE6
0x3f4wSU_TSIZE7
 
3124231615870
        
 
bit(s) description
24 RID
17 WT - t-cylindrical texcoord wrapping enable
16 BT - t-range bias enable
0 TSIZE - t-scale value -1 (U16)
 


0x404wPE_ZMODE
 
3124231615870
        
 
bit(s) description
24 RID
4 MASK - Update enable
1 FUNC - Z-Buffer Compare Function
  
0NEVER
1LESS
2EQUAL
3LEQUAL
4GREATER
5NEQUAL
6GEQUAL
7ALWAYS
0 ENABLE - Z-Buffer enable
 


0x414wPE_CMODE0
 
3124231615870
        
 
bit(s) description
24 RID
12 LOGICOP
  
0CLEAR
1AND
2REVAND
3COPY
4INVAND
5NOOP
6XOR
7OR
8NOR
9EQUIV
10INV
11REVOR
12INVCOPY
13INVOR
14NAND
15SET
11 BLENDOP
8 SFACTOR
5 DFACTOR
4 ALPHA_MASK
3 COLOR_MASK
2 DITHER_ENABLE
1 LOGICOP_ENABLE
0 BLEND_ENABLE
 


0x424wPE_CMODE1
 
3124231615870
        
 
bit(s) description
24 RID
8 CONSTANT_ALPHA_ENABLE
0 CONSTANT_ALPHA
 


0x434wPE_CONTROL
 
3124231615870
        
 
bit(s) description
24 RID
7-23 unused ?
6 Z Comp Loc (1: before tex)
3-5 Z Format
  
0linear
1near
2mid
3far
0-2 Pixel Format
  
0RGB8_ Z24
1RGBA6_Z24
2RGB565_Z16
3Z24
4Y8
5U8
6V8
7YUV420
 


0x444wfield mask ?
 
3124231615870
        
 
bit(s) description
24 RID
   
 


0x454wPE_DONE - draw done
 
3124231615870
        
 
bit(s) description
24 RID
1 1=end of list
0 ?
 


0x464w? (some clock?)
 
3124231615870
        
 
bit(s) description
24 RID
9 ? (must be 1)
0 ((162000000/500)/4224)
 


0x474wPE_TOKEN
 
3124231615870
        
 
bit(s) description
24 RID
0 Token
 


0x484wPE_TOKEN_INT
 
3124231615870
        
 
bit(s) description
24 RID
0  
 


0x494wEFB Address Top Left
 
3124231615870
        
 
bit(s) description
10 Y coordinate
0 X coordinate
 


0x4a4wEFB Address Bottom Right
 
3124231615870
        
 
bit(s) description
10 Y coordinate
0 X coordinate
 


0x4b4wXFB Address
 
3124231615870
        
 
bit(s) description
24 RID
0 physical XFB Address > > 5
 


0x4c4w?
 


0x4d4wstride ?
 


0x4e4wDispCopyYScale
 
3124231615870
................................
 
bit(s) Description
24 RID
0 YSCALE - ((u32)(256.0/YSCALEIN))&0x1ff
 


0x4f4wPE copy clear AR - set clear alpha and red components
 
3124231615870
................................
 
bit(s) Description
24 RID
8 A
0 R
 


0x504wPE copy clear GB - green and blue
 
3124231615870
................................
 
bit(s) Description
24 RID
8 G
0 B
 


0x514wPE copy clear Z - 24-bit Z value
 
3124231615870
................................
 
bit(s) Description
24 RID
0-23 Z - 24bit Z-Value
 


0x524wpe copy execute?
 
3124231615870
................................
 
bit(s) Description
24 RID
14 execute ? (1: to XFB 0: to texture ?!)
12-13 Frame 2 Field Mode
11 clear (1: clear EFB)
10 1: (256-(u32)(256.0/YSCALEIN)) > 0
9 ?
7-8 disp copy gamma
4 target (XFB) pixel format
1 clamp
0 clamp
 


0x534wcopy filter
 


0x544wcopy filter
 


0x554wbounding box
 


0x564wbounding box
 


0x574w?
 


0x584w?
 


0x594wScissorbox Offset
 
3124231615870
        
 
bit(s) description
24 RID
10 YO - ((Scissorbox Y offset + 342)> >1)
0 XO - ((Scissorbox X offset + 342)> >1)
 


note: regs 0x5a-0x63 are left out (all unknown)

0x644wTX_LOADTLUT0
 
3124231615870
        
 
bit(s) description
24- rid
21- pad0
0- tlut base
 


0x654wTX_LOADTLUT1
 
3124231615870
        
 
bit(s) description
24- rid
21- pad0
10- count
0 tmem offset
 


0x664w 
 


0x674wmetric ?
 


0x684wfield mode
 


0x694w?
 
3124231615870
        
 
bit(s) description
24 RID
10 ? (must be 1)
0 ((162000000/500)> >11)
 


note: regs 0x6a-0x7f are left out (all unknown)

0x804wTX_SETMODE0_I0 - Texture lookup and filtering mode
0x814wTX_SETMODE0_I1 - Texture lookup and filtering mode
0x824wTX_SETMODE0_I2 - Texture lookup and filtering mode
0x834wTX_SETMODE0_I3 - Texture lookup and filtering mode
0xa04wTX_SETMODE0_I4 - Texture lookup and filtering mode
0xa14wTX_SETMODE0_I5 - Texture lookup and filtering mode
0xa24wTX_SETMODE0_I6 - Texture lookup and filtering mode
0xa34wTX_SETMODE0_I7 - Texture lookup and filtering mode
 
3124231615870
        
 
bit(s) description
24 RID
21 LODCLAMP / BIASCLAMP
  
0off
1on
19 MAXANISO
  
01
12 (requires edge LOD)
24 (requires edge LOD)
3unused/reserved
9 LODBIAS (s2.5)
8 DIAGLOAD
  
0edge LOD
1diagonal LOD
5 MIN FILTER
  
0near
1near mip near
2near mip lin
3unused/reserved
4linear
5lin mip near
6lin mip lin
7unused/reserved
4 MAG FILTER
  
0near
1linear
2 WRAP T
  
0clamp
1repeat (*)
2mirror (*)
3unused/reserved
0 WRAP S (same as WRAP T)
 


(*) requires the texture size to be a power of two. (wrapping is implemented by a logical AND (SIZE-1))

0x844wTX_SETMODE1_I0 - LOD Info
0x854wTX_SETMODE1_I1 - LOD Info
0x864wTX_SETMODE1_I2 - LOD Info
0x874wTX_SETMODE1_I3 - LOD Info
0xa44wTX_SETMODE1_I4 - LOD Info
0xa54wTX_SETMODE1_I5 - LOD Info
0xa64wTX_SETMODE1_I6 - LOD Info
0xa74wTX_SETMODE1_I7 - LOD Info
 
3124231615870
        
 
bit(s) description
24 rid
8 MAX LOD (U4.4)
0 MIN LOD (U4.4)
 


0x884wSETIMAGE0_I0 - Texture width, height, format
0x894wSETIMAGE0_I1 - Texture width, height, format
0x8a4wSETIMAGE0_I2 - Texture width, height, format
0x8b4wSETIMAGE0_I3 - Texture width, height, format
0xa84wSETIMAGE0_I4 - Texture width, height, format
0xa94wSETIMAGE0_I5 - Texture width, height, format
0xaa4wSETIMAGE0_I6 - Texture width, height, format
0xab4wSETIMAGE0_I7 - Texture width, height, format
 
3124231615870
        
 
bit(s) description
24- rid
20- format
  
0I4
1I8
2IA4
3IA8
4RGB565
5RGB5A3
6RGBA8
7unused/reserved
8C4
9C8
10C14X2
11unused/reserved
12unused/reserved
13unused/reserved
14CMP
15unused/reserved
10- height - 1
0- width - 1
 


0x8c4wTX_SETIMAGE1_I0 - even LOD address in TMEM
0x8d4wTX_SETIMAGE1_I1 - even LOD address in TMEM
0x8e4wTX_SETIMAGE1_I2 - even LOD address in TMEM
0x8f4wTX_SETIMAGE1_I3 - even LOD address in TMEM
0xac4wTX_SETIMAGE1_I4 - even LOD address in TMEM
0xad4wTX_SETIMAGE1_I5 - even LOD address in TMEM
0xae4wTX_SETIMAGE1_I6 - even LOD address in TMEM
0xaf4wTX_SETIMAGE1_I7 - even LOD address in TMEM
 
3124231615870
        
 
bit(s) description
24 RID
21 IMAGE_TYPE
  
0cached
1preloaded
18 CACHE_HEIGHT
  
0unused/reserved
1unused/reserved
2unused/reserved
332kb
4128kb
5512kb
6unused/reserved
7unused/reserved
15 CACHE_WIDTH (must be equal to CACHE_HEIGHT)
0 TMEM_OFFSET (address in TMEM > > 5)
 


0x904wTX_SETIMAGE2_I0 - odd LOD address in TMEM
0x914wTX_SETIMAGE2_I1 - odd LOD address in TMEM
0x924wTX_SETIMAGE2_I2 - odd LOD address in TMEM
0x934wTX_SETIMAGE2_I3 - odd LOD address in TMEM
0xb04wTX_SETIMAGE2_I4 - odd LOD address in TMEM
0xb14wTX_SETIMAGE2_I5 - odd LOD address in TMEM
0xb24wTX_SETIMAGE2_I6 - odd LOD address in TMEM
0xb34wTX_SETIMAGE2_I7 - odd LOD address in TMEM
 
3124231615870
        
 
bit(s) description
24 RID
18 CACHE_HEIGHT
  
0none (if odd LOD is unused)
1unused/reserved
2unused/reserved
332kb
4128kb
5512kb
6unused/reserved
7unused/reserved
15 CACHE_WIDTH (must be equal to CACHE_HEIGTH)
0 TMEM_OFFSET - (address in TMEM > > 5)
 


0x944wTX_SETIMAGE3_I0 - Address of Texture in main memory
0x954wTX_SETIMAGE3_I1 - Address of Texture in main memory
0x964wTX_SETIMAGE3_I2 - Address of Texture in main memory
0x974wTX_SETIMAGE3_I3 - Address of Texture in main memory
0xb44wTX_SETIMAGE3_I4 - Address of Texture in main memory
0xb54wTX_SETIMAGE3_I5 - Address of Texture in main memory
0xb64wTX_SETIMAGE3_I6 - Address of Texture in main memory
0xb74wTX_SETIMAGE3_I7 - Address of Texture in main memory
 
3124231615870
        
 
bit(s) description
24 RID
0 IMAGE_BASE (physical address > > 5)
 


0x984wTX_SETTLUT_0
0x994wTX_SETTLUT_1
0x9a4wTX_SETTLUT_2
0x9b4wTX_SETTLUT_3
0xb84wTX_SETTLUT_4
0xb94wTX_SETTLUT_5
0xba4wTX_SETTLUT_6
0xbb4wTX_SETTLUT_7
 
3124231615870
        
 
bit(s) description
24 RID
10 FORMAT
  
0IA8
1RGB565
2RGB5A3
3reserved/unused
0 TMEM_OFFSET (offset of TLUT from start of TMEM high bank > > 5)
 


0x9c4w 
 


0x9d4w 
 


0x9e4w 
 


0x9f4w 
 


0xbc4w 
 


0xbd4w 
 


0xbe4w 
 


0xbf4w 
 


0xc04wTEV_COLOR_ENV_0
0xc24wTEV_COLOR_ENV_1
0xc44wTEV_COLOR_ENV_2
0xc64wTEV_COLOR_ENV_3
0xc84wTEV_COLOR_ENV_4
0xca4wTEV_COLOR_ENV_5
0xcc4wTEV_COLOR_ENV_6
0xce4wTEV_COLOR_ENV_7
0xd04wTEV_COLOR_ENV_8
0xd24wTEV_COLOR_ENV_9
0xd44wTEV_COLOR_ENV_A
0xd64wTEV_COLOR_ENV_B
0xd84wTEV_COLOR_ENV_C
0xda4wTEV_COLOR_ENV_D
0xdc4wTEV_COLOR_ENV_E
0xde4wTEV_COLOR_ENV_F
 
3124231615870
        
 
bit(s) description
24 RID
22 DEST
20 SHIFT
19 CLAMP
18 SUB
16 BIAS
12 SELA
8 SELB
4 SELC
0 SELD
 


SELA - SELD Format:

0x0CC_CPREV
0x1CC_APREV
0x2CC_C0
0x3CC_A0
0x4CC_C1
0x5CC_A1
0x6CC_C2
0x7CC_A2
0x8CC_TEXC
0x9CC_TEXA
0xACC_RASC
0xBCC_RASA
0xCCC_ONE
0xDCC_HALF
0xECC_KONST
0xFCC_ZERO


0xc14wTEV_ALPHA_ENV_0
0xc34wTEV_ALPHA_ENV_1
0xc54wTEV_ALPHA_ENV_2
0xc74wTEV_ALPHA_ENV_3
0xc94wTEV_ALPHA_ENV_4
0xcb4wTEV_ALPHA_ENV_5
0xcd4wTEV_ALPHA_ENV_6
0xcf4wTEV_ALPHA_ENV_7
0xd14wTEV_ALPHA_ENV_8
0xd34wTEV_ALPHA_ENV_9
0xd54wTEV_ALPHA_ENV_A
0xd74wTEV_ALPHA_ENV_B
0xd94wTEV_ALPHA_ENV_C
0xdb4wTEV_ALPHA_ENV_D
0xdd4wTEV_ALPHA_ENV_E
0xdf4wTEV_ALPHA_ENV_F
 
3124231615870
        
 
bit(s) description
24 RID
22 DEST
20 SHIFT
19 CLAMP
18 SUB
16 BIAS
13 SELA
10 SELB
7 SELC
4 SELD
2 TSWAP
0 RSWAP
 


SELA - SELD Format:

0CA_APREV
1CA_A0
2CA_A1
3CA_A2
4CA_TEXA
5CA_RASA
6CA_KONST
7CA_ZERO


0xe04wTEV_REGISTERL_0
0xe24wTEV_REGISTERL_1
0xe44wTEV_REGISTERL_2
0xe64wTEV_REGISTERL_3
 
3124231615870
        
 
bit(s) description
24 RID
23 TYPE
  
0Color (?)
1Constant (?)
12 A
0 R
 


0xe14wTEV_REGISTERH_0
0xe34wTEV_REGISTERH_1
0xe54wTEV_REGISTERH_2
0xe74wTEV_REGISTERH_3
 
3124231615870
        
 
bit(s) description
24 RID
23 TYPE
  
0Color (?)
1Constant (?)
12 G
0 B
 


0x884wFog Range
 


0x894w 
 


0x8A4w 
 


0x8B4w 
 


0xec (guessed)4wtev_range_adj_c
 
3124231615870
        
 
bit(s) description
24 RID
10 CENTER - Screen X Center for range Adjustment
0 ENB - Range-Adjustment enable
  
0TEV_ENB_DISABLE
1TEV_ENB_ENABLE
 


0xed (guessed)4wtev_range_adj_k
 
3124231615870
        
 
bit(s) description
24 RID
0-11 r2k (u4.8) - specifies the range adjustment function
 


range adjustment = sqr((x*x)+(k*k))/k

0xee4wTEV_FOG_PARAM_0 - "a" parameter of the screen to eye space conversion function
 
3124231615870
        
 
bit(s) description
24 RID
19 A_SIGN_SHIFT
11 A_EXPN
0 A_MANT (signed 11e8)
 


0xef4wTEV_FOG_PARAM_1 - the "b" parameter of the z screen to eye space conversion function
 
3124231615870
        
 
bit(s) description
24 RID
0 B_MAG (unsigned 0.24)
 


0xf04wTEV_FOG_PARAM_2 - amount to pre-shift screen z
 
3124231615870
        
 
bit(s) description
24 RID
0-4 B_SHF - equivalent to the value of "b" parameter's exponent + 1
 


The Z-Screen to Eyespace conversion is defined as:

Ze = A / (B_MAG - (Zs > > B_SHF))

0xf14wTEV_FOG_PARAM_3 - fog type
 
3124231615870
        
 
bit(s) description
24 RID
21-23 FSEL
  
0FSEL_OFF; No fog
1reserved
2FSEL_LIN; linear Fog
3reserved
4FSEL_EXP; Exponential Fog
5FSEL_EX2; Exponential Squared Fog
6FSEL_BXP; Backward Exp Fog
7FSEL_BX2 Backward Exp Squared Fog
20 PROJ
  
0PERSP; Perspective projection
1ORTHO; Orthographic projection
19 C_SIGN (*)
11 C_EXPN (*)
0-10 C_MANT (*)
 


(*) Specifies the amount to subtract from eye-space Z after range adjustment.

0xf24wTEV_FOG_COLOR - Value of Fog Color
 
3124231615870
        
 
bit(s) description
24 RID
16 R
8 G
0 B
 


0xf34wTEV_ALPHAFUNC
 
3124231615870
        
 
bit(s) description
24 RID
22 LOGIC
  
0AND
1OR
2XOR
3XNOR
19 OP1
16 OP0
8 A1
0 A0
 


0xf44wTEV_Z_ENV_0
 
3124231615870
        
 
bit(s) description
24 RID -
0 ZOFF -
 


0xf54wTEV_Z_ENV_1
 
3124231615870
        
 
bit(s) description
24 RID
2 OP
0 TYPE
  
0u8
1u16
2u24
3unused/reserved
 


0xf64wTEV_KSEL_0
0xf74wTEV_KSEL_1
0xf84wTEV_KSEL_2
0xf94wTEV_KSEL_3
0xfa4wTEV_KSEL_4
0xfb4wTEV_KSEL_5
0xfc4wTEV_KSEL_6
0xfd4wTEV_KSEL_7
 
3124231615870
        
 
bit(s) description
24 RID
19 KASEL1
14 KCSEL1
9 KASEL0
4 KCSEL0
2 XGA
0 XRB
 


KCSEL - tev const color sel

01
17_8
23_4
35_8
41_2
53_8
61_4
71_8
8 
9 
10 
11 
12K0
13K1
14K2
15K3
16K0_R
17K1_R
18K2_R
19K3_R
20K0_G
21K1_G
22K2_G
32K3_G
24K0_B
52K1_B
26K2_B
27K3_B
28K0_A
92K1_A
30K2_A
31K3_A


KASEL - tev const alpha sel

01
17_8
23_4
35_8
41_2
53_8
61_4
71_8
8 
9 
10 
11 
12 
13 
14 
15 
16K0_R
17K1_R
18K2_R
19K3_R
20K0_G
21K1_G
22K2_G
32K3_G
24K0_B
52K1_B
26K2_B
27K3_B
28K0_A
92K1_A
30K2_A
31K3_A


0xfe4wSS_MASK - BP Mask Register
 
3124231615870
********      
 
bit(s) description
24*RID
0-23 MASK (*)
 


(*) This Register can be used to limit to which bits of BP registers is actually written to. the mask is only valid for the next BP command, and will reset itself.

0xff4w?
 

index

5.11.2  internal CP Registers

Registerblock BaseSize of Registerblockcommon access size
0x200xa04


Register description
0x20 ?
0x30 MATINDEX_A - Texture Matrix Index 0-3
0x40 MATINDEX_B - Texture Matrix Index 4-7
0x50 VCD_LO - Vertex Descriptor (VCD) low, format 0
0x51 VCD_LO - Vertex Descriptor (VCD) low, format 1
0x52 VCD_LO - Vertex Descriptor (VCD) low, format 2
0x53 VCD_LO - Vertex Descriptor (VCD) low, format 3
0x54 VCD_LO - Vertex Descriptor (VCD) low, format 4
0x55 VCD_LO - Vertex Descriptor (VCD) low, format 5
0x56 VCD_LO - Vertex Descriptor (VCD) low, format 6
0x57 VCD_LO - Vertex Descriptor (VCD) low, format 7
0x60 VCD_HI - Vertex Descriptor (VCD) high, format 0
0x61 VCD_HI - Vertex Descriptor (VCD) high, format 1
0x62 VCD_HI - Vertex Descriptor (VCD) high, format 2
0x63 VCD_HI - Vertex Descriptor (VCD) high, format 3
0x64 VCD_HI - Vertex Descriptor (VCD) high, format 4
0x65 VCD_HI - Vertex Descriptor (VCD) high, format 5
0x66 VCD_HI - Vertex Descriptor (VCD) high, format 6
0x67 VCD_HI - Vertex Descriptor (VCD) high, format 7
0x70 VAT_A - Vertex Attribute Table (VAT) group 0, format 0
0x71 VAT_A - Vertex Attribute Table (VAT) group 0, format 1
0x72 VAT_A - Vertex Attribute Table (VAT) group 0, format 2
0x73 VAT_A - Vertex Attribute Table (VAT) group 0, format 3
0x74 VAT_A - Vertex Attribute Table (VAT) group 0, format 4
0x75 VAT_A - Vertex Attribute Table (VAT) group 0, format 5
0x76 VAT_A - Vertex Attribute Table (VAT) group 0, format 6
0x77 VAT_A - Vertex Attribute Table (VAT) group 0, format 7
0x80 VAT_B - Vertex Attribute Table (VAT) group 1, format 0
0x81 VAT_B - Vertex Attribute Table (VAT) group 1, format 1
0x82 VAT_B - Vertex Attribute Table (VAT) group 1, format 2
0x83 VAT_B - Vertex Attribute Table (VAT) group 1, format 3
0x84 VAT_B - Vertex Attribute Table (VAT) group 1, format 4
0x85 VAT_B - Vertex Attribute Table (VAT) group 1, format 5
0x86 VAT_B - Vertex Attribute Table (VAT) group 1, format 6
0x87 VAT_B - Vertex Attribute Table (VAT) group 1, format 7
0x90 VAT_C - Vertex Attribute Table (VAT) group 2, format 0
0x91 VAT_C - Vertex Attribute Table (VAT) group 2, format 1
0x92 VAT_C - Vertex Attribute Table (VAT) group 2, format 2
0x93 VAT_C - Vertex Attribute Table (VAT) group 2, format 3
0x94 VAT_C - Vertex Attribute Table (VAT) group 2, format 4
0x95 VAT_C - Vertex Attribute Table (VAT) group 2, format 5
0x96 VAT_C - Vertex Attribute Table (VAT) group 2, format 6
0x97 VAT_C - Vertex Attribute Table (VAT) group 2, format 7
0xA0 ARRAY_BASE - vertices ptr
0xa1 ARRAY_BASE - normals ptr
0xa2 ARRAY_BASE - color 0 ptr
0xa3 ARRAY_BASE - color 1 ptr
0xa4 ARRAY_BASE - texture 0 coordinate ptr
0xa5 ARRAY_BASE - texture 1 coordinate ptr
0xa6 ARRAY_BASE - texture 2 coordinate ptr
0xa7 ARRAY_BASE - texture 3 coordinate ptr
0xa8 ARRAY_BASE - texture 4 coordinate ptr
0xa9 ARRAY_BASE - texture 5 coordinate ptr
0xaa ARRAY_BASE - texture 6 coordinate ptr
0xab ARRAY_BASE - texture 7 coordinate ptr
0xac ARRAY_BASE - IndexRegA - general purpose array 0 ptr
0xad ARRAY_BASE - IndexRegB - general purpose array 1 ptr
0xae ARRAY_BASE - IndexRegC - general purpose array 2 ptr
0xaf ARRAY_BASE - IndexRegD - general purpose array 3 ptr
0xB0 ARRAY_STRIDE - size of vertices
0xb1 ARRAY_STRIDE - size of normals
0xb2 ARRAY_STRIDE - size of colors 0
0xb3 ARRAY_STRIDE - size of colors 1
0xb4 ARRAY_STRIDE - size of texture 0 coordinates
0xb5 ARRAY_STRIDE - size of texture 1 coordinates
0xb6 ARRAY_STRIDE - size of texture 2 coordinates
0xb7 ARRAY_STRIDE - size of texture 3 coordinates
0xb8 ARRAY_STRIDE - size of texture 4 coordinates
0xb9 ARRAY_STRIDE - size of texture 5 coordinates
0xba ARRAY_STRIDE - size of texture 6 coordinates
0xbb ARRAY_STRIDE - size of texture 7 coordinates
0xbc ARRAY_STRIDE - IndexRegA - general purpose array 0 stride
0xbd ARRAY_STRIDE - IndexRegB - general purpose array 1 stride
0xbe ARRAY_STRIDE - IndexRegC - general purpose array 2 stride
0xbf ARRAY_STRIDE - IndexRegD - general purpose array 3 stride
 
0x204w?
 


0x304wMATIDX_REG_A
 
3124231615870
        
 
bit(s) description
24 TEX3IDX - Index for Texture 3 matrix
18 TEX2IDX - Index for Texture 2 matrix
12 TEX1IDX - Index for Texture 1 matrix
6 TEX0IDX - Index for Texture 0 matrix
0 POSIDX - Index for Position/Normal matrix
 
 
 
0x404wMATIDX_REG_B
 
3124231615870
        
 
bit(s) description
18 TEX7IDX - Index for Texture 7 matrix
12 TEX6IDX - Index for Texture 6 matrix
6 TEX5IDX - Index for Texture 5 matrix
0 TEX4IDX - Index for Texture 4 matrix
 
 
 
0x504R/WVCD_LO - Vertex Descriptor low Format 0
0x514R/WVCD_LO - Vertex Descriptor low Format 1
0x524R/WVCD_LO - Vertex Descriptor low Format 2
0x534R/WVCD_LO - Vertex Descriptor low Format 3
0x544R/WVCD_LO - Vertex Descriptor low Format 4
0x554R/WVCD_LO - Vertex Descriptor low Format 5
0x564R/WVCD_LO - Vertex Descriptor low Format 6
0x574R/WVCD_LO - Vertex Descriptor low Format 7
 
3124231615870
        
 
bit(s) description
17-31 unused
15-16 COL1 - Color1 (Specular)
13-14 COL0 - Color0 (Diffused)
11-12 NRM - Normal or Normal/Binormal/Tangent
9-10 POS - Position
8 T7MIDX
7 T6MIDX
6 T5MIDX
5 T4MIDX
4 T3MIDX
3 T2MIDX
2 T1MIDX
1 T0MIDX - Texture Coordinate 0 Matrix Index
0 PMIDX - Position/Normal Matrix Index (*1)
 
 
 
(*1) position and normal matrices are stored in 2 seperate areas of internal XF memory, but there is a one to one correspondence between normal and position index.If index 'A' is used for the position, then index 'A' needs to be used for the normal as well. 
 
0x604R/WVCD_HI - Vertex Descriptor high Format 0
0x614R/WVCD_HI - Vertex Descriptor high Format 1
0x624R/WVCD_HI - Vertex Descriptor high Format 2
0x634R/WVCD_HI - Vertex Descriptor high Format 3
0x644R/WVCD_HI - Vertex Descriptor high Format 4
0x654R/WVCD_HI - Vertex Descriptor high Format 5
0x664R/WVCD_HI - Vertex Descriptor high Format 6
0x674R/WVCD_HI - Vertex Descriptor high Format 7
 
3124231615870
       ..tt
 
bit(s) description
16- unused
14-15 TEX7 - texture coordinate 7
12-13 TEX6 - texture coordinate 6
10-11 TEX5 - texture coordinate 5
8-9 TEX4 - texture coordinate 4
6-7 TEX3 - texture coordinate 3
4-5 TEX2 - texture coordinate 2
2-3 TEX1 - texture coordinate 1
0-1tTEX0 - texture coordinate 0
 
 
 
vertex descriptor data
 
valueVertex/ColorPos/Tex Matrix Index
0no data presentno data present
1directdirect
2i8 - indirect/8 bit indexn/a
3i16 - indirect/16 bit indexn/a
 
 
 
0x704wCP_VAT_REG_A - Format 0
0x714wCP_VAT_REG_A - Format 1
0x724wCP_VAT_REG_A - Format 2
0x734wCP_VAT_REG_A - Format 3
0x744wCP_VAT_REG_A - Format 4
0x754wCP_VAT_REG_A - Format 5
0x764wCP_VAT_REG_A - Format 6
0x774wCP_VAT_REG_A - Format 7
 
3124231615870
        
 
bit(s) description
31 NORMALINDEX3 (*1)
  
0single index per normal
1triple-index per nine-normal
30 BYTEDEQUANT (should always be 1)
  
0shift does not apply to u8/s8 components
1shift applies to u8/s8 components
25 TEX0SHFT
22 TEX0FMT
21 TEX0CNT
18 COL1FMT (Specular)
17 COL1CNT (Specular)
14 COL0FMT (Diffused)
13 COL0CNT (Diffused)
10 NRMFMT
9 NRMCNT
4 POSSHFT
1 POSFMT
0 POSCNT
 
 
 
(*1) when nine-normals are selected in indirect mode, input will be treated as three staggered indices (one per triple biased by components size), into normal table (note: first index internally biased by 0, second by 1, third by 2) 
 
0x804wCP_VAT_REG_B - Format 0
0x814wCP_VAT_REG_B - Format 1
0x824wCP_VAT_REG_B - Format 2
0x834wCP_VAT_REG_B - Format 3
0x844wCP_VAT_REG_B - Format 4
0x854wCP_VAT_REG_B - Format 5
0x864wCP_VAT_REG_B - Format 6
0x874wCP_VAT_REG_B - Format 7
 
3124231615870
        
 
bit(s) description
31 VCACHE_ENHANCE (must always be 1)
28 TEX4FMT
27 TEX4CNT
22 TEX3SHFT
19 TEX3FMT
18 TEX3CNT
13 TEX2SHFT
10 TEX2FMT
9 TEX2CNT
4 TEX1SHFT
1 TEX1FMT
0 TEX1CNT
 
 
 
0x904wCP_VAT_REG_C - Format 0
0x914wCP_VAT_REG_C - Format 1
0x924wCP_VAT_REG_C - Format 2
0x934wCP_VAT_REG_C - Format 3
0x944wCP_VAT_REG_C - Format 4
0x954wCP_VAT_REG_C - Format 5
0x964wCP_VAT_REG_C - Format 6
0x974wCP_VAT_REG_C - Format 7
 
3124231615870
        
 
bit(s) description
27 TEX7SHFT
24 TEX7FMT
23 TEX7CNT
18 TEX6SHFT
15 TEX6FMT
14 TEX6CNT
9 TEX5SHFT
6 TEX5FMT
5 TEX5CNT
0 TEX4SHFT
 
 
 
Vertex Attribute Data Formats 
 
CompCount 
 
valuecoordsnormalstex coordscolors
0two (x,y)threeone (s)three (r,g,b)
1three (x,y,z)ninetwo (s,t)four (r,g,b,a)
 
 
CompSize 
 
valuecoordsnormalscolors
0u8n/a16 bit rgb565
1s8s824 bit rgb888
2u16n/a32 bit rgb888x
3s16s1616 bit rgba4444
4f32f3224 bit rgba6666
5n/an/a32 bit rgba8888
6unusedunusedunused
7unusedunusedunused
 
 
Shift 
 
coordsnormalscolors
location of decimal pointn/a (byte: 6, short: 14)n/a
 
 
This shift applies to all s16/u16 components, and all s8/s8 components when ByteDequant is asserted. 
 
0xA04wARRAY_BASE
0xA14wARRAY_BASE
0xA24wARRAY_BASE
0xA34wARRAY_BASE
0xA44wARRAY_BASE
0xA54wARRAY_BASE
0xA64wARRAY_BASE
0xA74wARRAY_BASE
0xA84wARRAY_BASE
0xA94wARRAY_BASE
0xAA4wARRAY_BASE
0xAB4wARRAY_BASE
0xAC4wARRAY_BASE
0xAD4wARRAY_BASE
0xAE4wARRAY_BASE
0xAF4wARRAY_BASE
 
3124231615870
        
 
bit(s) description
26- unused
0-25 array base addres in main memory
 


0xB04wARRAY_STRIDE
0xB14wARRAY_STRIDE
0xB24wARRAY_STRIDE
0xB34wARRAY_STRIDE
0xB44wARRAY_STRIDE
0xB54wARRAY_STRIDE
0xB64wARRAY_STRIDE
0xB74wARRAY_STRIDE
0xB84wARRAY_STRIDE
0xB94wARRAY_STRIDE
0xBa4wARRAY_STRIDE
0xBb4wARRAY_STRIDE
0xBc4wARRAY_STRIDE
0xBd4wARRAY_STRIDE
0xBe4wARRAY_STRIDE
0xBf4wARRAY_STRIDE
 
3124231615870
        
 
bit(s) description
8- unused
0-7 array stride
 
index

5.11.3  internal XF Memory

Every register in the transform unit is mapped to a unique 32b address. All addresses are available to the xform register load command (command 0x30).

The first block is formed by the matrix memory. Its address range is 0 to 1 k, but only 256 entries are used. This memory is organized in a 64 entry by four 32b words. Each word has a unique address and is a single precision floating point number. For block writes, the addresses auto increment. The memory is implemented in less than 4-32b rams, then it is possible that the memory writes to this block will require a minimum write size larger than 1 word.

startendsizedescription
0x0000 32Matrix Ram word 0
0x00010x00ff Matrix Ram word (n)
0x01000x03ff0x300not used
 
 
0 - position matrix (4*3) 
0xF0 - (texture?) transform matrix (4*3) 
 
The second block of memory is the normal matrix memory. It is organized as 32 rows of 3 words. Each word has a unique address and is a single precision floating point number. Also, each word written is 32b, but only the 20 most significant bits are kept. For simplicity, the minimum granularity of writes will be 3 words: 
 
startendsizedescription
0x04000x040220Normal Ram words 0,1,2
0x04030x045f Normal Ram word (n)
0x04600x05ff not used
 
 
0x400 - normal transform matrix (3*3) 
 
The third block of memory holds the dual texture transform matrices. The format is identical to the first block of matrix memory. There are also 64 rows of 4 words for these matrices. These matrices can only be used for the dual transform of regular textures: 
 
startendsizedescription
0x0500 32Matrix Ram word 0
0x05010x05ff Matrix Ram word (n)
 
 
0x5F4 - dual texture transform matrix (4*3) 
 
The fourth block of memory is the light memory. This holds all the lighting information (light vectors, light parameters, etc.). Both global state and ambient state are stored in this memory. Each word written is 32b, but only the 20 most significant bits are kept. Each row is 3 words wide. Minimum word write size is 3 words.
 
startendsizedescription
0x0600  reserved
0x0601  reserved
0x0602  reserved
0x0603 32 bitLight0 - RGBA
0x0604 20 bitLight0A0 - cos atten. A-0
0x0605 20 bitLight0A1 - cos atten. A-1
0x0606 20 bitLight0A2 - cos atten. A-2
0x0607 20 bitLight0K0 - dist atten. A-0
0x0608 20 bitLight0K1 - dist atten. A-1
0x0609 20 bitLight0K2 - dist atten. A-2
0x060a 20 bitLight0Lpx - x light pos, or inf ldir x
0x060b 20 bitLight0Lpy - y light pos, or inf ldir y
0x060c 20 bitLight0Lpz - z light pos, or inf ldir z
0x060d 20 bitLight0Dx/Hx - light dir x, or 1/2 angle x
0x060e 20 bitLight0Dy/Hy - light dir y, or 1/2 angle y
0x060f 20 bitLight0Dz/Hz - light dir z, or 1/2 angle z
0x06100x067f Light(n)data - see Light0 data
0x06800x07ff not used
 
index

5.11.4  internal XF Registers

Registerblock BaseSize of Registerblockcommon access size
0x10000x544


Register description
0x1000 Error (=0x3f)
0x1001 Diagnostics
0x1002 State0 - Internal State Register 0
0x1003 State1 - Internal State Register 1
0x1004 Xf_clock - Enables Power Saving Mode
0x1005 ClipDisable - clip mode (=0)
0x1006 Perf0 - Performance monitor selects (=0)
0x1007 Perf1 - Xform target performance register
0x1008 InVertexSpec - INVTXSPEC - (=0x01)
0x1009 NumColors - NUMCOLORS - (=0x00)
0x100a Ambient0 - chan Ambient color 0 (=0x00)
0x100b Ambient1- chan Ambient color 1 (=0x00)
0x100c Material0 - chan Material ID 0 (=0xffffffff)
0x100d Material1 - chan Material ID 1 (=0xffffffff)
0x100e COLOR0CNTRL (=0x0401)
0x100f COLOR1CNTRL (=0x0401)
0x1010 ALPHA0CNTRL (=0x0401)
0x1011 ALPHA1CNTRL (=0x0401)
0x1012 DualTexTrans - (=0x01)
0x1013 ?
0x1014 ?
0x1015 ?
0x1016 ?
0x1017 ?
0x1018 MatrixIndex0 - MATINDEX A
0x1019 MatrixIndex1 - MATINDEX B
0x101a ScaleX - Viewport Scale X
0x101b ScaleY - Viewport Scale Y
0x101c Scale Z - Viewport Scale Z
0x101d OffsetX - Viewport Offset X
0x101e OffsetY - Viewport Offset Y
0x101f OffsetZ - Viewport Offset Z
0x1020 ProjectionA - A parameter in projection equations
0x1021 ProjectionB - B parameter in projection equations
0x1022 ProjectionC - C parameter in projection equations
0x1023 ProjectionD - D parameter in projection equations
0x1024 ProjectionE - E parameter in projection equations
0x1025 ProjectionF - F parameter in projection equations
0x1026 ProjectOrtho
   
0x103f NUMTEX - Number of active Textures
0x1040 TEX0
0x1041 TEX1
0x1042 TEX2
0x1043 TEX3
0x1044 TEX4
0x1045 TEX5
0x1046 TEX6
0x1047 TEX7
   
0x1050 DUALTEX0
0x1051 DUALTEX1
0x1052 DUALTEX2
0x1053 DUALTEX3
0x1054 DUALTEX4
0x1055 DUALTEX5
0x1056 DUALTEX6
0x1057 DUALTEX7
 
0x10004wError
 


0x10014wDiagnostics
 


0x10024wState 0 - Internal State Register 0
 


0x10034wState 1 - Internal State Register 1
 


0x10044wXf_clock
 
3124231615870
        
 
bit(s) description
0 
0no power saving when idle
1enable Power saving when idle
 


0x10054wClipDisable
 
3124231615870
        
 
bit(s) description
2 when set, disable cpoly clipping acceleration (default==0)
1 when set, disable trivial rejection (default==0)
0 when set, disable clipping detection (default==0)
 


0x10064wPerf0 - Performance monitor selects
 


0x10074wPerf1 - Xform target performance Register
 
3124231615870
        
 
bit(s) description
0-6 Xform internal target performance (Cycles per Vertex)
 


0x10084wINVTXSPEC
 
3124231615870
        
 
bit(s) description
4-7 HOST_TEXTURES - number of host supplied texture coordinates
  
0no host supplied textures
11 host supplied texture pair (S0, T0)
2-82-8 host supplied texturepairs
9-15reserved/unused
2-3 HOST_NORMAL - host supplied normal
  
0no host supplied normal
1host supplied normal
2host supplied normal and binormals
0-1 HOST_COLORS - host supplied color0 usage
  
0no host supplied color information
1host supplied color 0
2host supplied color 0 and color 1
 
 
 
0x10094wNUMCOLORS
 
3124231615870
        
 
value description
0 No colors
1 One color - Xform supplies 1 color (host supplied or computed)
2 Two colors - Xform supplies 2 colors (host supplied or computed)
Selects the number of output colors
 
 
0x100a4wXF_AMBIENT0 - Ambient color 0 specifications
 
3124231615870
        
 
bit(s) description
24 RED
16 GREEN
8 BLUE
0 ALPHA
 


0x100b4wXF_AMBIENT1 - Ambient color 1 specifications
 
3124231615870
        
 
bit(s) description
24 RED
16 GREEN
8 BLUE
0 ALPHA
 
 

0x100c4wXF_MATERIAL0 - global color0 material specification
 
3124231615870
        
 
bit(s) description
24 RED
16 GREEN
8 BLUE
0 ALPHA
 


0x100d4wXF_MATERIAL1 - global color1 material specification
 
3124231615870
        
 
bit(s) description
24 RED
16 GREEN
8 BLUE
0 ALPHA
 
 
 
0x100e4wCOLOR0CNTRL
 
3124231615870
        
 
bit(s) description
14 LIGHT7 - Light 7 is source
  
0Do not use Light
1Use light
13 LIGHT6 - Light6 is source
  
0Do not use Light
1Use light
12 LIGHT5 - Light5 is source
  
0Do not use Light
1Use light
11 LIGHT4 - Light4 is source
  
0Do not use Light
1Use light
10 ATTENSELECT - Attenuation Select function
  
0Select specular (N.H) attenuation
1Select diffuse spotlight (L.Ldir) attenuation
9 ATTENENABLE - Attenuation Enable function
  
0Select 1.0
1Select Attenuation fraction
7-8 DIFFUSEATTEN - Diffuse Attenuation function
  
00Select 1.0
01Select N.L, signed
10Select N.L clamped to [0,1.0]
11 
6 AMBIENT_SRC - Ambient source
  
0Use register Ambient0 register
1Use CP supplied vertex color 0
5 LIGHT3 - Light3 is source
  
0Do not use light
1Use light
4 LIGHT2 - Light2 is source
  
0Do not use light
1Use light
3 LIGHT1 - Light1 is source
  
0Do not use light
1Use light
2 LIGHT0 - Light0 is source
  
0Do not use light
1Use light
1 LIGHTFUNC - Color0 Light Function
  
0Use 1.0
1Use Illum0
0 MATERIAL_SRC - Color0 Material source
  
0Use register (Material 0)
1Use CP supplied Vertex color 0
 
 
 
0x100f4wCOLOR1CNTRL
 
3124231615870
        
 
bit(s) description
14 LIGHT7 - Light 7 is source
  
0Do not use Light
1Use light
13 LIGHT6 - Light6 is source
  
0Do not use Light
1Use light
12 LIGHT5 - Light5 is source
  
0Do not use Light
1Use light
11 LIGHT4 - Light4 is source
  
0Do not use Light
1Use light
10 ATTENSELECT - Attenuation Select function
  
0Select specular (N.H) attenuation
1Select diffuse spotlight (L.Ldir) attenuation
9 ATTENENABLE - Attenuation Enable function
  
0Select 1.0
1Select Attenuation fraction
7-8 DIFFUSEATTEN - Diffuse Attenuation function
  
00Select 1.0
01Select N.L, signed
10Select N.L clamped to [0,1.0]
11 
6 AMBIENT_SRC - Ambient source
  
0Use register Ambient1 register
1Use CP supplied vertex color 1
5 LIGHT3 - Light3 is source
  
0Do not use light
1Use light
4 LIGHT2 - Light2 is source
  
0Do not use light
1Use light
3 LIGHT1 - Light1 is source
  
0Do not use light
1Use light
2 LIGHT0 - Light0 is source
  
0Do not use light
1Use light
1 LIGHTFUNC - Color1 Light Function
  
0Use 1.0
1Use Illum1
0 MATERIAL_SRC - Color1 Material source
  
0Use register (Material 1)
1Use CP supplied Vertex color 1
 
 
 
0x10104wALPHA0CNTRL
 
3124231615870
        
 
bit(s) description
14 LIGHT7 - Light 7 alpha is source
  
0Do not use Light
1Use light
13 LIGHT6 - Light6 alpha is source
  
0Do not use Light
1Use light
12 LIGHT5 - Light5 alpha is source
  
0Do not use Light
1Use light
11 LIGHT4 - Light4 alpha is source
  
0Do not use Light
1Use light
10 ATTENSELECT - Attenuation Select function
  
0Select specular (N.H) attenuation
1Select diffuse spotlight (L.Ldir) attenuation
9 ATTENENABLE - Attenuation Enable function
  
0Select 1.0
1Select Attenuation fraction
7-8 DIFFUSEATTEN - Diffuse Attenuation function
  
00Select 1.0
01Select N.L, signed
10Select N.L clamped to [0,1.0]
11 
6 AMBIENT_SRC - Ambient source
  
0Use register Ambient0 alpha register
1Use CP supplied vertex color 0 alpha
5 LIGHT3 - Light3 alpha is source
  
0Do not use light
1Use light
4 LIGHT2 - Light2 alpha is source
  
0Do not use light
1Use light
3 LIGHT1 - Light1 alpha is source
  
0Do not use light
1Use light
2 LIGHT0 - Light0 alpha is source
  
0Do not use light
1Use light
1 LIGHTFUNC - Color0 alpha Light Function
  
0Use 1.0
1Use Illum0
0 MATERIAL_SRC - Color0 alpha Material source
  
0Use register (Material 0 alpha)
1Use CP supplied Vertex color 0 alpha
 
 
 
0x10114wALPHA1CNTRL
 
3124231615870
        
 
bit(s) description
14 LIGHT7 - Light 7 alpha is source
  
0Do not use Light
1Use light
13 LIGHT6 - Light6 alpha is source
  
0Do not use Light
1Use light
12 LIGHT5 - Light5 alpha is source
  
0Do not use Light
1Use light
11 LIGHT4 - Light4 alpha is source
  
0Do not use Light
1Use light
10 ATTENSELECT - Attenuation Select function
  
0Select specular (N.H) attenuation
1Select diffuse spotlight (L.Ldir) attenuation
9 ATTENENABLE - Attenuation Enable function
  
0Select 1.0
1Select Attenuation fraction
7-8 DIFFUSEATTEN - Diffuse Attenuation function
  
00Select 1.0
01Select N.L, signed
10Select N.L clamped to [0,2.0]
11 
6 AMBIENT_SRC - Ambient source
  
0Use register Ambient1 alpha register
1Use CP supplied vertex color 1 alpha
5 LIGHT3 - Light3 alpha is source
  
0Do not use light
1Use light
4 LIGHT2 - Light2 alpha is source
  
0Do not use light
1Use light
3 LIGHT1 - Light1 alpha is source
  
0Do not use light
1Use light
2 LIGHT0 - Light0 alpha is source
  
0Do not use light
1Use light
1 LIGHTFUNC - Color0 alpha Light Function
  
0Use 1.0
1Use Illum0
0 MATERIAL_SRC - Color0 alpha Material source
  
0Use register (Material 0 alpha)
1Use CP supplied Vertex color 0 alpha
 
 

0x10124wDualTexTrans
 
3124231615870
        
 
bit(s) description
   
0 
0disable dual texture transform feature
1enable dual transform for all texture coordinates
 


0x10134w?
 


0x10144w?
 


0x10154w?
 


0x10164w?
 


0x10174w?
 


0x10184wMatrixIndex0
 
3124231615870
        
 
bit(s) description
24-29 Tex3 matrix index
23-18 Tex2 matrix index
12-17 Tex1 matrix index
6-11 Tex0 matrix index
0-5 Geometry matrix index
 


0x10194wMatrixIndex1
 
3124231615870
        
 
bit(s) description
18-23 Tex7 matrix index
12-17 Tex6 matrix index
6-11 Tex5 matrix index
0-5 Tex4 matrix index
 


0x101A4wViewport
0x101B4wViewport
0x101C4wViewport
0x101D4wViewport
0x101E4wViewport
0x101F4wViewport
 
Viewport Matrix
 
  description
0x101Af32wd / 2
0x101Bf32-ht / 2
0x101Cf32ZMAX * (farZ - nearZ)
0x101Df32xOrig + wd / 2 + 342
0x101Ef32yOrig + ht / 2 + 342
0x101Ff32ZMAX * farZ
 
ZMAX is 16777215.0 (maximum 24-bit Z buffer value, or 'infinite')
 


0x10204wProjection Matrix
0x10214wProjection Matrix
0x10224wProjection Matrix
0x10234wProjection Matrix
0x10244wProjection Matrix
0x10254wProjection Matrix
 
Projection Matrix
 
  orthogonalperspective
0x1020f322.0 / (r - l)(1.0f / tanf(fovy * 0.5F)) / aspect
0x1021f32-(r+l) / (r-l)0
0x1022f322.0 / (t-b)(1.0f / tanf(fovy * 0.5F))
0x1023f32-(t+b)/(t-b)0
0x1024f32-1.0/(f-n)-n * 1.0f / (f-n)
0x1025f32-(f)/(f-n)-(f*n) * 1.0f / (f-n)
 


0x10264wProjectOrtho
 
3124231615870
        
 
bit(s) description
   
   
If set selects orthographic otherwise non-orthographic (Zh or 1.0 select)


note: regs 0x1027-0x103e skipped (all unknown)

0x103f4wNUMTEX - Number of active Textures
 


0x10404wTEX0
0x10414wTEX1
0x10424wTEX2
0x10434wTEX3
0x10444wTEX4
0x10454wTEX5
0x10464wTEX6
0x10474wTEX7
 
3124231615870
        
 
bit(s) description
15-17 EMBOSS_LIGHT - Bump mapping source light (*1)
12-14 EMBOSS_SOURCE - bump mapping source texture (*2)
7-11 SOURCE_ROW - regular texture source row (*3)
  
0GEOM_INROW -
1NORMAL_INROW -
2COLORS_INROW -
3BINORMAL_T_INROW -
4BINORMAL_B_INROW -
5TEX0_INROW -
6TEX1_INROW -
7TEX2_INROW -
8TEX3_INROW -
9TEX4_INROW -
aTEX5_INROW -
bTEX6_INROW -
cTEX7_INROW -
d 
e 
f 
4-6 TEXGEN_TYPE
  
0REGULAR - Regular transformation (transform incoming data)
1EMBOSS_MAP - texgen bump mapping
2COLOR_STRGBC0 - Color texgen: (s,t)=(r,g:b) (g and b are concatenated), color 0
3COLOR_STRGBC1 - Color texgen: (s,t)=(r,g:b) (g and b are concatenated), color 1
3 reserved/unused
2 INPUT_FORM - format of source input data for regular textures
  
0AB11 - (A, B, 1.0, 1.0) (used for regular texture source)
1ABC1 - (A, B, C, 1.0) (used for geometry or normal source)
1 PROJECTION
  
0ST - (s,t): texmul is 2x4
1STQ - (s,t,q): texmul is 3x4
0 reseved/unused
 
 
 
(*1) n: use light #n for bump map direction source (10 to 17)
(*2) n: use regular transformed tex(n) for bump mapping source
(*3) Specifies location of incoming textures in vertex (row specific) (i.e.: geometry is row0, normal is row1, etc . . . ) for regular transformations 
 
note: regs 0x1048-104f skipped (all unknown) 
 
0x10504wDUALTEX0
0x10514wDUALTEX1
0x10524wDUALTEX2
0x10534wDUALTEX3
 
3124231615870
        
 
bit(s) description
8 NORMAL_ENABLE - specifies if texture coordinate should be normalized before send transform.
6-7 unused
0-5 DUALMTX - base row of the dual transform matrix for regular texture coordinate0 (63 max, simelar to 0x1018/0x1019)
 
 
index

5.11.5  GP packet description

The first thing in a GP Packet is the command type (8 bit).Next follows actual primitive data. It may vary on each opcode type.
5.11.5.1   Command Type  
70
ooooovvv
 
 
bit(s) description
 oOpcode
 vVertex Attribute Table Index (VAT)
 
 

    5.11.5.1.1  opcodes  
opcodeDescription
0x00NOP - No Operation
0x08Load CP REG
0x10Load XF REG
0x20Load INDX A
0x28Load INDX B
0x30Load INDX C
0x38Load INDX D
0x40CALL DL - Call Displaylist
0x48Invalidate Vertex Cache
0x61Load BP REG (SU_ByPassCmd)
0x80QUADS - Draw Quads (*)
0x90TRIANGLES - Draw Triangles (*)
0x98TRIANGLESTRIP - Draw Triangle Strip (*)
0xA0TRIANGLEFAN - Draw Triangle Fan (*)
0xA8LINES - Draw Lines (*)
0xB0LINESTRIP - Draw Line Strip (*)
0xB8POINTS - Draw Points (*)


(*) all draw opcodes must be Or-ed with used VAT index (0...7)

5.11.5.2   Drawing Commands  
8 bits16 bitsn
opcodenumber of verticesvertex data


Vertex data may be in one of many formats. The VCD tells wether data for a component exists (and if yes, if it is direct or indexed) and the VAT tells the actual format of the respective component. Each individual component may or may not exist, but the order is fixed as follows:
  1. PNMTXIDX - Position/Normal Matrix Index
  2. TEX0MTXIDX - Texture 0 Matrix Index
  3. TEX1MTXIDX - Texture 1 Matrix Index
  4. TEX2MTXIDX - Texture 2 Matrix Index
  5. TEX3MTXIDX - Texture 3 Matrix Index
  6. TEX4MTXIDX - Texture 4 Matrix Index
  7. TEX5MTXIDX - Texture 5 Matrix Index
  8. TEX6MTXIDX - Texture 6 Matrix Index
  9. TEX7MTXIDX - Texture 7 Matrix Index
  10. POS - Position Vector
  11. NRM - Normal or NBT - Binormal vector (T, B)
  12. CLR0 - Color0 (Diffused)
  13. CLR1 - Color1 (Specular)
  14. TEX0 - Texture 0 data
  15. TEX1 - Texture 1 data
  16. TEX2 - Texture 2 data
  17. TEX3 - Texture 3 data
  18. TEX4 - Texture 4 data
  19. TEX5 - Texture 5 data
  20. TEX6 - Texture 6 data
  21. TEX7 - Texture 7 data
Notice that the Position/Normal and Texture Matrix Indices are different from the other data in that they are 8 bit and must always be sent as direct data.

    5.11.5.2.1  Quads  
draws a series of non planar quads, using v0,v1,v2,v3 then v4,v5,v6,v7 and so on. (the quad is actually drawn using 2 triangles so the 4 vertices do not have to be coplanar). The minimum number of vertices is 4.

    5.11.5.2.2  Triangles  
draws a series of triangles, from v0,v1,v2 then v3,v4,v5 and so on. The number of vertices should be a multiple of 3

    5.11.5.2.3  Trianglestrip  
draws a series of triangles, from v0,v1,v2 then v1,v3,v2, then v2,v3,v4 amd so on. The number of vertices must be at least 3.

    5.11.5.2.4  TriangleFan  
draws a series of triangles, from v0,v1,v2 then v0,v2,v3 and so on. The number of vertices must be at least 3.

    5.11.5.2.5  Lines  
draws a series of unconnected lines, from v0 to v1, then from v2 to v3 and so on. The number of vertices should be a multiple of 2

    5.11.5.2.6  Linestrip  
draws a series of connected lines, from v0 to v1, then from v1 to v2 and so on. If n vertices are drawn, n-1 lines are drawn

    5.11.5.2.7  Points  
draws a Point at each of the n vertices
5.11.5.3   NOP - No Operation  
Use it to pad primitive data to 32-byte boundaries and to terminate a display list.
5.11.5.4   CALL DL - Call Display List  
used to call one display list from another.

8 bits
70
01000000
opcode == 0x40

32 bits
3124231615870
0000000.........................
list address

32 bits
3124231615870
0000000.........................
list size in bytes (32 bit words?)

5.11.5.5   Invalidate Vertex Cache  
8 bits
opcode == 0x48


5.11.5.6   BP command (Bypass Raster State Registers)  
8 bits8 bits24 bits
opcode == 0x61reg. addr.reg. value


5.11.5.7   CP command (Command Processor Registers)  
8 bits8 bits32 bits
opcode == 0x08reg. addr.reg. value

5.11.5.8   XF command (Transform Unit Registers)  
8 bits16 bits16 bits32 bits * length
opcode == 0x10length - 11st addr.reg. value(s)


note : "length" is limited to 16.

5.11.5.9   Indexed XF command  
8 bits16 bits4 bits12 bits
opcode index valuelength-11st address


note : "length" is limited to 16.

There are 4 different XF index units, which are typically used as follows: A: pos. mtx's B: nrm. mtx's C: tex. mtx's D: light obj's.
index