MTX Registers: Difference between revisions

MarcusD (talk | contribs)
MarcusD (talk | contribs)
Update MTX bits and interrupts
 
(2 intermediate revisions by the same user not shown)
Line 25: Line 25:
|-
|-
| 0x1EC1x00C
| 0x1EC1x00C
| ???
| [[#MTX_IE|MTX_IE]]
| 4
| 4
|-
|-
Line 36: Line 36:
==Matrix unit==
==Matrix unit==


There are two matrix units, one at +0x200, and the other one at +0x300, possibly one for each axis (X and Y)
There are two matrix units, one at +0x200 for vertical (Y) scaling, and the other one at +0x300 for horizontal (X) scaling.


{| class="wikitable" border="1"
{| class="wikitable" border="1"
Line 79: Line 79:
|-
|-
| 1
| 1
| ??? set after init sequence
| Enable vertical matrix
|-
|-
| 2
| 2
| ??? set after init sequence
| Enable horizontal matrix
|-
| 4
| ???
|-
| 5
| ???
|-
|-
| 8-9
| 8-9
| Mode? 0 = 4byte color, 1 = 3byte color, 2 = 2byte color, 3 = 2byte color
| Input pixel mode? 0 = 4byte color, 1 = 3byte color, 2 = 2byte color, 3 = 2byte color
|-
|-
| 10-11
| 10-11
| Another mode? Input mode? Initialized to 0
| Output framebuffer rotation: 0 = normal, 1 = 90° CW (right), 2 = 180° CW (upside down, not mirrored), 3 = 270° CW (left)
|-
|-
| 12
| 12
| ??? initialized to 0
| Output tiling for use with the GPU. When set, the output width and height must be a multiple of 8.
|-
|-
| 15
| 15
| ??? set after init sequence
| Start bit (setting this will eventually raise MTX interrupt 0)
|-
|-
| 16
| 16
| ??? not yet inited bit ???
| Data still available flag (?)
|-
|-
|}
|}
Line 108: Line 114:
|-
|-
| 0-8
| 0-8
| Output framebuffer width - 1 is written here
| Output framebuffer width - 1 is written here, 1 <= width <= 512
|-
|-
| 16-25
| 16-25
| Output framebuffer height - 1 is written here
| Output framebuffer height - 1 is written here, 1 <= height <= 512
|-
|-
|}
|}
Line 118: Line 124:


Reading this register will return pending interrupts.
Reading this register will return pending interrupts.
Writing this register will acknowledge the pending interrupt.
Writing this register will acknowledge pending interrupts where the bits are set.


{| class="wikitable" border="1"
{| class="wikitable" border="1"
Line 125: Line 131:
|-
|-
| 0
| 0
| Interrupt 0
| FIFO ready (signal to start DMA)
|-
|-
| 1
| 1
| Interrupt 1
| FIFO overrun(?) (occurs if DMA is too slow)
|-
|-
| 2
| 2
| Interrupt 2
| FIFO underrun(?) (occurs on VBlank)
|-
|-
|}
|}
==MTX_IE==
Interrupt Enable for the above interrupts.