液晶显示屏

From 3dbrew
Jump to navigation Jump to search

寄存器 - Registers[edit]

名称 物理地址 进程虚拟地址 内核虚拟地址 长度
REG_LCDCOLORFILLMAIN 0x10202204 0x1ED02204 0xFFFD6204 4
REG_LCDCOLORFILLSUB 0x10202A04 0x1ED02A04 0xFFFD6A04 4

REG_*MAIN 寄存器对应上屏,SUB对应下屏。MAIN寄存器锁定在 0x1EF00400,而SUB寄存器锁定在 0x1EF00500。

LCD色彩填充寄存器 - REG_LCDCOLORFILL[edit]

位(Bit) 说明
7-0 红色分量
15-8 绿色分量
23-16 蓝色分量
24 enable可用
31-25 ?

可用位enable被置位时,不进行帧缓冲而直接在LCD上显示纯色。

0x1EF00X5C[edit]

位(Bit) 说明
15-0 帧缓冲宽度
31-16 帧缓冲高度

这个寄存器控制帧缓冲的尺寸。

0x1EF00X70[edit]

位(Bit) 说明
15-0 帧缓冲格式
31-16 ?

帧缓冲格式[edit]

位(Bit) 说明
3-0 色彩格式
4 Unused?
5 是上屏的3D右图帧缓冲地址时,置位
6 1 = 上屏, 0 = 下屏. 第5位置位时此位清零。
7 ?
9-8 Value 1 = unknown, 3 = unknown.
15-10 Unused?

GSP模块只允许液晶立体感启用时,第5位= 1和第6位= 0。 GSP模块更新该寄存器时,GSP模块将自动禁用如果这些位都没有设置启用立体感的立体感。 GSP module only allows the LCD stereoscopy to enabled when bit5=1 and bit6=0 here. When GSP module updates this register, GSP module will automatically disable the stereoscopy if those bits are not set for enabling stereoscopy.

帧缓冲色彩格式[edit]

说明 Actual color components ordering
0 GL_RGBA8_OES
1 GL_RGB8_OES BGR
2 GL_RGB565_OES RGB
3 GL_RGB5_A1_OES
4 GL_RGBA4_OES

0x1EF00X78[edit]

Bit Description
0 LCD framebuffer to display (0=first, 1=second)
7-1 ?
31-8 Unused

0x1EF00X90[edit]

Bit Description
31-0 Framebuffer width * pixel byte-size.

Framebuffers[edit]

Address Description
0x1EF00468 Main LCD, first framebuffer for 3D left
0x1EF0046C Main LCD, second framebuffer for 3D left
0x1EF00494 Main LCD, first framebuffer for 3D right
0x1EF00498 Main LCD, second framebuffer for 3D right
0x1EF00568 Sub LCD, first framebuffer
0x1EF0056C Sub LCD, second framebuffer
0x1EF00594 Sub LCD, unused first framebuffer
0x1EF00598 Sub LCD, unused second framebuffer

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.

These LCD framebuffers normally contain the last rendered frames from the GPU. The color format is BGR8. The framebuffers are drawn from left-to-right, instead of top-to-bottom.(Thus the beginning of the framebuffer is drawn starting at the left side of the screen)

Both of the 3D screen left/right framebuffers are displayed regardless of the 3D slider's state, however when the 3D slider is set to "off" the 3D effect is disabled. Normally when the 3D slider's state is set to "off" the left/right framebuffer addresses are set to the same physical address. When the 3D effect is disabled and the left/right framebuffers are set to separate addresses, the LCD seems to alternate between displaying the left/right framebuffer each frame.