GPU/External Registers: Difference between revisions
No edit summary |
No edit summary |
||
Line 2: | Line 2: | ||
== Map == | == Map == | ||
{| class="wikitable" border="1" | |||
! User VA | |||
! PA | |||
! Length | |||
! Name | |||
! Comments | |||
|- | |||
| 0x1EF00004 | |||
| 0x14000004 | |||
| 4 | |||
| ? | |||
| | |||
|- | |||
| 0x1EF00010 | |||
| 0x14000010 | |||
| 16 | |||
| MemoryFill1 (GX command 2) | |||
| | |||
|- | |||
| 0x1EF00020 | |||
| 0x14000020 | |||
| 16 | |||
| MemoryFill2 (GX command 2) | |||
| | |||
|- | |||
| 0x1EF00030 | |||
| 0x14000030 | |||
| 4 | |||
| | |||
| | |||
|- | |||
| 0x1EF00400 | |||
| 0x14000400 | |||
| 0x100 | |||
| Top Screen Framebuffers | |||
| | |||
|- | |||
| 0x1EF00500 | |||
| 0x14000500 | |||
| 0x100 | |||
| Bottom Screen Framebuffers | |||
| | |||
|} | |||
== | == MemoryFill 0x1EF00010/0x1EF00020 == | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
! | ! User VA | ||
! Description | ! Description | ||
|- | |- | ||
Line 59: | Line 66: | ||
These registers are used by [[GSP_Shared_Memory|GX command]] 2. 0x1EF00010 is used for the GX command buf0 parameters, while 0x1EF00020 is used for the GX command buf1 parameters. | These registers are used by [[GSP_Shared_Memory|GX command]] 2. 0x1EF00010 is used for the GX command buf0 parameters, while 0x1EF00020 is used for the GX command buf1 parameters. | ||
== | == Screen 0x1EF00400/0x1EF00500 == | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
! | ! Offset | ||
! | ! Length | ||
! Name | |||
! Comments | |||
|- | |- | ||
| | | 0x5C | ||
| Framebuffer width | | 4 | ||
| Framebuffer width & height | |||
| Lower 16 bits: width, upper 16 bits: height | |||
|- | |- | ||
| | | 0x68 | ||
| Framebuffer | | 4 | ||
| | | Framebuffer A first address | ||
| For top screen, this is the left eye 3D framebuffer. | |||
|- | |||
| 0x6C | |||
| 4 | |||
| Framebuffer A second address | |||
| For top screen, this is the left eye 3D framebuffer. | |||
|- | |- | ||
| | | 0x70 | ||
| 4 | |||
| Framebuffer format | | Framebuffer format | ||
| Bit0-15: framebuffer format, bit16-31: unknown | |||
|- | |||
| 0x78 | |||
| 4 | |||
| Framebuffer select | |||
| Bit0: which framebuffer to display, bit1-7: unknown | |||
|- | |- | ||
| | | 0x90 | ||
| | | 4 | ||
| Framebuffer size | |||
| Framebuffer width * pixel byte-size. | |||
|- | |||
| 0x94 | |||
| 4 | |||
| Framebuffer B first address | |||
| For top screen, this is the left eye 3D framebuffer. Unused for bottom screen. | |||
|- | |||
| 0x98 | |||
| 4 | |||
| Framebuffer B second address | |||
| For top screen, this is the left eye 3D framebuffer. Unused for bottom screen. | |||
|} | |} | ||
Line 144: | Line 173: | ||
| GL_RGBA4_OES | | GL_RGBA4_OES | ||
| | | | ||
|} | |} | ||
== Framebuffers == | == Framebuffers == | ||
The above framebuffer registers contains the physical address for each framebuffer, normally located in FCRAM in the application's GSP heap. When other processes use GSP as well, the framebuffers for the process is stored in VRAM instead. | The above framebuffer registers contains the physical address for each framebuffer, normally located in FCRAM in the application's GSP heap. When other processes use GSP as well, the framebuffers for the process is stored in VRAM instead. | ||
Line 326: | Line 293: | ||
These 3 registers are used by [[GSP_Shared_Memory|GX command]] 1. This is used for [[GPU_Commands|GPU commands]]. | These 3 registers are used by [[GSP_Shared_Memory|GX command]] 1. This is used for [[GPU_Commands|GPU commands]]. | ||
==== Init Values from nngxInitialize for Top Screen ==== | |||
* 0x1EF00400 = 0x1C2 | |||
* 0x1EF00404 = 0xD1 | |||
* 0x1EF00408 = 0x1C1 | |||
* 0x1EF0040C = 0x1C1 | |||
* 0x1EF00410 = 0 | |||
* 0x1EF00414 = 0xCF | |||
* 0x1EF00418 = 0xD1 | |||
* 0x1EF0041C = 0x1C501C1 | |||
* 0x1EF00420 = 0x10000 | |||
* 0x1EF00424 = 0x19D | |||
* 0x1EF00428 = 2 | |||
* 0x1EF0042C = 0x1C2 | |||
* 0x1EF00430 = 0x1C2 | |||
* 0x1EF00434 = 0x1C2 | |||
* 0x1EF00438 = 1 | |||
* 0x1EF0043C = 2 | |||
* 0x1EF00440 = 0x1960192 | |||
* 0x1EF00444 = 0 | |||
* 0x1EF00448 = 0 | |||
* 0x1EF0045C = 0x19000F0 | |||
* 0x1EF00460 = 0x1c100d1 | |||
* 0x1EF00464 = 0x1920002 | |||
* 0x1EF00470 = 0x80340 | |||
* 0x1EF0049C = 0 | |||
==== More Init Values from nngxInitialize for Top Screen ==== | |||
* 0x1EF00468 = 0x18300000, later changed by GSP module when updating state, framebuffer | |||
* 0x1EF0046C = 0x18300000, later changed by GSP module when updating state, framebuffer | |||
* 0x1EF00494 = 0x18300000 | |||
* 0x1EF00498 = 0x18300000 | |||
* 0x1EF00478 = 1, doesn't stay 1, read as 0 | |||
* 0x1EF00474 = 0x10501 |