GPU/External Registers: Difference between revisions
→Map: Clarify address mappings |
Documented some registers; removed the length column because it's unnecessary |
||
Line 136: | Line 136: | ||
== LCD Source Framebuffer Setup == | == LCD Source Framebuffer Setup == | ||
All of these registers must be accessed with 32bit operations regardless of the registers' actual bit size. | |||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
! Offset | ! Offset | ||
! Name | ! Name | ||
! Comments | ! Comments | ||
|- | |- | ||
| 0x00 | | 0x00 | ||
| Pixel clock | |||
| Pixel | | Higher values are slower, 12bits. | ||
| Higher values are slower, | |||
Setting this value too low will make the screen not be able to sync any pixels other than a single one from the wrong location. The lowest the screen can handle is 0x1C1, with rare glitching. | |||
|- | |- | ||
| 0x04 | | 0x04 | ||
| | | HBlank timer(?) | ||
| Seems to determine the horizontal blanking interval. | |||
| | |||
Setting this to lower than <code>HTotal - HDisp</code> will make the screen not catch up with the scanlines, some will be skipped, some will be misaligned. | |||
Setting this to higher than <code>HTotal - HDisp</code> will make the displayed image misaligned to the right. | |||
Setting this to higher than <code>HTotal</code> seems to make the horizontal synchronization never happen. | |||
|- | |- | ||
| 0x08 | | 0x08 | ||
| ? | | ? | ||
| must be >= REG#0x00 | | must be >= REG#0x00 | ||
|- | |- | ||
| 0x0C | | 0x0C | ||
| ? | | ? | ||
| must be >= REG#0x08 | | must be >= REG#0x08 | ||
|- | |- | ||
| 0x10 | | 0x10 | ||
| | | ??? | ||
| Some sort of delay in signal, probably in the pixel clock | |||
|- | |- | ||
| 0x14 | | 0x14 | ||
| | | HBlank length(?) | ||
| ??? Seems to offset the screen to the left if this value is high enough, but can glitch out the syncing on the bottom screen | |||
| if this value is | |||
|- | |- | ||
| 0x18 | | 0x18 | ||
| ??? | | ??? | ||
| should be < REG#0x10 | | should be < REG#0x10 | ||
|- | |- | ||
| 0x20 | | 0x20 | ||
| HFrontPorch(?) | | HFrontPorch(?) | ||
| ??? the screen gets vertically offset with wrap-around | | ??? the screen gets vertically offset with wrap-around | ||
Line 200: | Line 187: | ||
|- | |- | ||
| 0x24 | | 0x24 | ||
| HSync timer? | | HSync timer? | ||
| | | | ||
|- | |- | ||
| 0x28 | | 0x28 | ||
| VDispStart(?) or VFrontPorch | | VDispStart(?) or VFrontPorch | ||
| | | | ||
|- | |- | ||
| 0x30 | | 0x30 | ||
| VTotal | | VTotal | ||
| Total amount of vertical scanlines | | Total amount of vertical scanlines | ||
|- | |- | ||
| 0x34 | | 0x34 | ||
| VDisp(?) | | VDisp(?) | ||
| Total amonut of vertical scanlines displayed (only for top screen it seems like) | | Total amonut of vertical scanlines displayed (only for top screen it seems like) | ||
|- | |- | ||
| 0x44 | | 0x44 | ||
| ??? | | ??? | ||
| similar functionality to 0x10 | | similar functionality to 0x10 | ||
|- | |- | ||
| 0x4C | | 0x4C | ||
| Overscan filler color | | Overscan filler color | ||
| | | | ||
|- | |- | ||
| 0x50 | | 0x50 | ||
| Horizontal position counter | | Horizontal position counter | ||
| read-only | | read-only | ||
|- | |- | ||
| 0x54 | | 0x54 | ||
| Horizontal scanline (HBlank) counter | | Horizontal scanline (HBlank) counter | ||
| read-only | | read-only | ||
|- | |- | ||
| 0x5C | | 0x5C | ||
| ??? | | ??? | ||
| low u16: framebuffer width | | low u16: framebuffer width | ||
Line 246: | Line 224: | ||
|- | |- | ||
| 0x60 | | 0x60 | ||
| ??? | | ??? | ||
| low u16: timing data(?) | | low u16: timing data(?) | ||
Line 252: | Line 229: | ||
|- | |- | ||
| 0x64 | | 0x64 | ||
| ??? | | ??? | ||
| low u16: unknown | | low u16: unknown | ||
Line 258: | Line 234: | ||
|- | |- | ||
| 0x68 | | 0x68 | ||
| Framebuffer A first address | | Framebuffer A first address | ||
| For top screen, this is the left eye 3D framebuffer. | | For top screen, this is the left eye 3D framebuffer. | ||
|- | |- | ||
| 0x6C | | 0x6C | ||
| Framebuffer A second address | | Framebuffer A second address | ||
| For top screen, this is the left eye 3D framebuffer. | | For top screen, this is the left eye 3D framebuffer. | ||
|- | |- | ||
| 0x70 | | 0x70 | ||
| Framebuffer format | | Framebuffer format | ||
| Bit0-15: framebuffer format, bit16-31: unknown | | Bit0-15: framebuffer format, bit16-31: unknown | ||
|- | |- | ||
| 0x78 | | 0x78 | ||
| Framebuffer select | | Framebuffer select | ||
| Bit0: which framebuffer to display, bit1-7: unknown | | Bit0: which framebuffer to display, bit1-7: unknown | ||
|- | |- | ||
| 0x80 | | 0x80 | ||
| Color lookup table index select | | Color lookup table index select | ||
| 8bits, write-only | | 8bits, write-only | ||
|- | |- | ||
| 0x84 | | 0x84 | ||
| Color lookup table indexed element | | Color lookup table indexed element | ||
| Contains the value of the color lookup table indexed by the above register, 24bits, RGB8 (0x00BBGGRR) | | Contains the value of the color lookup table indexed by the above register, 24bits, RGB8 (0x00BBGGRR) | ||
Line 289: | Line 259: | ||
|- | |- | ||
| 0x90 | | 0x90 | ||
| Framebuffer stride | | Framebuffer stride | ||
| Distance in bytes between the start of two framebuffer rows (must be a multiple of 8). | | Distance in bytes between the start of two framebuffer rows (must be a multiple of 8). | ||
|- | |- | ||
| 0x94 | | 0x94 | ||
| Framebuffer B first address | | Framebuffer B first address | ||
| For top screen, this is the right eye 3D framebuffer. Unused for bottom screen. | | For top screen, this is the right eye 3D framebuffer. Unused for bottom screen. | ||
|- | |- | ||
| 0x98 | | 0x98 | ||
| Framebuffer B second address | | Framebuffer B second address | ||
| For top screen, this is the right eye 3D framebuffer. Unused for bottom screen. | | For top screen, this is the right eye 3D framebuffer. Unused for bottom screen. |