Line 1: |
Line 1: |
− | This page describes the GX commands which can be written to GSP [[GSPGPU:RegisterInterruptRelayQueue|shared]] memory. After writing the command data to GSP shared memory, [[GSPGPU:TriggerCmdReqQueue|TriggerCmdReqQueue]] must be used to trigger GSP processing for the command. | + | This page describes the structure of the GSP [[GSPGPU:RegisterInterruptRelayQueue|shared]] memory. GX commands and framebuffer info is stored here, and other unknown data. After writing the command data to GSP shared memory, [[GSPGPU:TriggerCmdReqQueue|TriggerCmdReqQueue]] must be used to trigger GSP processing for the command. |
| + | |
| + | =Framebuffer info= |
| + | The framebuffer info structure for the main LCD is located at sharedmemvadr + 0x200 + threadindex*0x80. The framebuffer info structure for the sub LCD is located at sharedmemvadr + 0x240 + threadindex*0x80. |
| + | |
| + | ==Framebuffer info header== |
| + | {| class="wikitable" border="1" |
| + | |- |
| + | ! Index Byte |
| + | ! Description |
| + | |- |
| + | | 0 |
| + | | Framebuffer info [[GSPGPU:SetBufferSwap|entry]] index |
| + | |- |
| + | | 1 |
| + | | Flag |
| + | |- |
| + | | 3-2 |
| + | | Padding |
| + | |} |
| + | |
| + | When a process sets this framebuffer info, it sets index to <nowiki>(index+1) & 1</nowiki>. Then it writes the framebuffer info entry, and sets flag to value 1. The GSP module seems to load this framebuffer info entry data into GSP state once the [[GPU]] finishes processing GX commands 3 or 4. Once the GSP module finishes loading this framebuffer info, it sets flag to value 0, then it will not load the framebuffer info again until flag is value 1. After loading this entry data into GSP state, the GSP module then writes this framebuffer state to the [[LCD]] registers. |
| + | |
| + | The two 0x1C-byte framebuffer info entries are located at framebufferinfo+4. |
| | | |
| =Command Buffer Header= | | =Command Buffer Header= |