SceDisplay: Difference between revisions
CelesteBlue (talk | contribs) |
CelesteBlue (talk | contribs) No edit summary |
||
Line 29: | Line 29: | ||
<source lang="C"> | <source lang="C"> | ||
typedef enum SceDisplayHead { | |||
SCE_DISPLAY_HEAD_MAIN_LCD_OLED = 0, | |||
SCE_DISPLAY_HEAD_HDMI = 1, | |||
SCE_DISPLAY_HEAD_SUB_LCD = 2 | |||
} SceDisplayHead; | |||
typedef enum SceDisplayPixelFormat { | |||
SCE_DISPLAY_PIXELFORMAT_A8B8G8R8 = 0x00000000, | |||
SCE_DISPLAY_PIXELFORMAT_UNK0 = 0x00008000, | |||
SCE_DISPLAY_PIXELFORMAT_UNK1 = 0x00100000, | |||
SCE_DISPLAY_PIXELFORMAT_UNK2 = 0x00800000, | |||
SCE_DISPLAY_PIXELFORMAT_UNK3 = 0x60000000 | |||
} SceDisplayPixelFormat; | |||
</source> | </source> | ||
Line 56: | Line 69: | ||
! Version !! NID | ! Version !! NID | ||
|- | |- | ||
| 3.60 || 0x43347565 | | 0.940-3.60 || 0x43347565 | ||
|} | |} | ||
<source lang="C">int sceDisplayDisableHeadForDriver(SceDisplayHead head);</source> | |||
=== sceDisplayEnableHeadForDriver === | === sceDisplayEnableHeadForDriver === | ||
{| class="wikitable" | {| class="wikitable" | ||
Line 67: | Line 82: | ||
|} | |} | ||
<source lang="C"> | <source lang="C">int sceDisplayEnableHeadForDriver(SceDisplayHead head);</source> | ||
int sceDisplayEnableHeadForDriver( | |||
</source> | |||
=== sceDisplayGetActualViewportConfForDriver === | === sceDisplayGetActualViewportConfForDriver === | ||
Line 127: | Line 139: | ||
* It can either be a vallid PID, -1 to use the current configured | * It can either be a vallid PID, -1 to use the current configured | ||
* framebuffer for the head and index, or 0 to use the PID of the caller. | * framebuffer for the head and index, or 0 to use the PID of the caller. | ||
* @param[in] head - | * @param[in] head - One of SceDisplayHead value | ||
* @param[in] index - Can be 0 or 1 | * @param[in] index - Can be 0 or 1 | ||
* @param[out] info - Pointer to a ::SceDisplayFrameBufInfo structure | * @param[out] info - Pointer to a ::SceDisplayFrameBufInfo structure | ||
Line 134: | Line 146: | ||
* @return 0 on success, < 0 on error. | * @return 0 on success, < 0 on error. | ||
*/ | */ | ||
int sceDisplayGetProcFrameBufInternalForDriver(SceUID pid, | int sceDisplayGetProcFrameBufInternalForDriver(SceUID pid, SceDisplayHead head, int index, SceDisplayFrameBufInfo *info); | ||
</source> | </source> | ||
Line 169: | Line 181: | ||
|- | |- | ||
! Version !! NID | ! Version !! NID | ||
|- | |||
| 0.940 || not present | |||
|- | |- | ||
| 3.60 || 0xC8E554C5 | | 3.60 || 0xC8E554C5 | ||
|} | |} | ||
<source lang="C">SceDisplayHead sceDisplayGetPrimaryHeadForDriver(void);</source | |||
=== sceDisplayGetRefreshRateInternalForDriver === | === sceDisplayGetRefreshRateInternalForDriver === | ||
Line 263: | Line 279: | ||
|} | |} | ||
<source lang="C">int sceDisplaySetFrameBufInternalForDriver( | <source lang="C">int sceDisplaySetFrameBufInternalForDriver(SceDisplayHead head, SceUInt32 fb_idx, const SceDisplayFrameBuf *pFrameBuf, SceInt32 iUpdateTimingMode);</source> | ||
=== sceDisplaySetInvertColorsForDriver === | === sceDisplaySetInvertColorsForDriver === | ||
Line 289: | Line 305: | ||
|} | |} | ||
<source lang="C"> | <source lang="C">int sceDisplaySetOutputModeForDriver(SceDisplayHead head, SceSize *pResSize, SceDisplayPixelFormat pixelformat);</source> | ||
int sceDisplaySetOutputModeForDriver( | |||
</source> | |||
=== sceDisplaySetScaleConfForDriver === | === sceDisplaySetScaleConfForDriver === | ||
Line 304: | Line 317: | ||
<source lang="C"> | <source lang="C"> | ||
// scale must be between 0.80000001 and 1.20000005 | // scale must be between 0.80000001 and 1.20000005 | ||
int sceDisplaySetScaleConfForDriver(float scale, | int sceDisplaySetScaleConfForDriver(float scale, SceDisplayHead head, SceUInt32 fb_idx, int a4); | ||
</source> | </source> | ||
Line 596: | Line 609: | ||
<source lang="C"> | <source lang="C"> | ||
// | // fb_idx: 0 for game/apps and 1 for LiveArea (including HOME and PS overlays) | ||
int _sceDisplaySetFrameBufInternal(SceDisplayHead head, unsigned int fb_idx, const SceDisplayFrameBuf *pFrameBuf, int sync); | |||
int _sceDisplaySetFrameBufInternal( | |||
</source> | </source> | ||
Line 624: | Line 636: | ||
! Version !! NID | ! Version !! NID | ||
|- | |- | ||
| | | 0.940-3.60 || 0xA08CA60D | ||
|} | |} | ||
Old SDK name was sceDisplayGetFramePerSec. | |||
<source lang="C"> | |||
/* | |||
Get number of frames per second. | |||
This function obtains the theoretical number of frames per second in the current screen mode. | |||
The number of frames per second on the screen (touchscreen) is NTSC-compatible 59.94005994... Hz. | |||
Note that sceDisplayGetRefreshRate() function returns a theoretical value, and that some error | |||
may be present relative to the actual time. | |||
pFps Pointer of type float * to obtain the number of frames per second | |||
If an error occurs, a negative value is returned. | |||
*/ | |||
SceInt32 sceDisplayGetRefreshRate(float *pFps); | |||
</source> | |||
=== sceDisplayGetVcountInternal === | === sceDisplayGetVcountInternal === |
Revision as of 03:11, 7 April 2020
This module handles management of the framebuffers. It uses various display drivers (OLED, HDMI, LCD) as well as drivers to control DMA and other low level details. Embedded in this module is also the boot logo (the PS Logo seen on boot) which is gzipped. On module_start, after setting up the drivers, it gunzips the logo into the SceCamera SRAM (which is unused at this time since camera is not enabled yet). Then it sets the framebuffer to the camera SRAM and turns the brightness up in incremental levels.
Module
Known NIDs
Version | Name | World | Privilege | NID |
---|---|---|---|---|
1.69 | SceDisplay | Non-secure | Kernel | 0xA7D4F77A |
3.60 | SceDisplay | Non-secure | Kernel | 0x3F05296F |
Libraries
Known NIDs
Version | Name | World | Visibility | NID |
---|---|---|---|---|
1.69-3.60 | SceDisplayForDriver | Non-secure | Kernel | 0x9FED47AC |
1.69-3.60 | SceDisplay | Non-secure | User | 0x5ED8F994 |
Types
typedef enum SceDisplayHead { SCE_DISPLAY_HEAD_MAIN_LCD_OLED = 0, SCE_DISPLAY_HEAD_HDMI = 1, SCE_DISPLAY_HEAD_SUB_LCD = 2 } SceDisplayHead; typedef enum SceDisplayPixelFormat { SCE_DISPLAY_PIXELFORMAT_A8B8G8R8 = 0x00000000, SCE_DISPLAY_PIXELFORMAT_UNK0 = 0x00008000, SCE_DISPLAY_PIXELFORMAT_UNK1 = 0x00100000, SCE_DISPLAY_PIXELFORMAT_UNK2 = 0x00800000, SCE_DISPLAY_PIXELFORMAT_UNK3 = 0x60000000 } SceDisplayPixelFormat;
SceDisplayForDriver
NIDs in this library are calculated as SHA1 so they can be bruteforced.
sceDisplayCaptureFrameBufDMACForDriver
Version | NID |
---|---|
3.60 | 0xF116D0B4 |
sceDisplayCaptureFrameBufIFTUForDriver
Version | NID |
---|---|
3.60 | 0xB0CED8BC |
sceDisplayDisableHeadForDriver
Version | NID |
---|---|
0.940-3.60 | 0x43347565 |
int sceDisplayDisableHeadForDriver(SceDisplayHead head);
sceDisplayEnableHeadForDriver
Version | NID |
---|---|
0.940-3.60 | 0x496032D6 |
int sceDisplayEnableHeadForDriver(SceDisplayHead head);
sceDisplayGetActualViewportConfForDriver
Version | NID |
---|---|
3.60 | 0x40ACFE51 |
sceDisplayGetDeviceTypeForDriver
Version | NID |
---|---|
3.60 | 0x8D9A1CCE |
sceDisplayGetFrameBufForDriver
Version | NID |
---|---|
3.60 | 0xEEDA2E54 |
/** * Get current framebuffer parameters * * @param[out] pParam - Pointer to a ::SceDisplayFrameBuf structure * which will receive framebuffer parameters. * * @param[in] sync - One of ::DisplaySetBufSync * * @return 0 on success, < 0 on error. */ int sceDisplayGetFrameBufForDriver(SceDisplayFrameBuf *pParam, int sync);
sceDisplayGetProcFrameBufInternalForDriver
Version | NID |
---|---|
3.60 | 0x3BC165EF |
Wrong name was sceDisplayGetFrameBufInfoForPidForDriver.
/** * Get the configured framebuffer information of a head and its framebuffer index for a PID * * @param[in] pid - PID of the process to get the framebuffer information from. * It can either be a vallid PID, -1 to use the current configured * framebuffer for the head and index, or 0 to use the PID of the caller. * @param[in] head - One of SceDisplayHead value * @param[in] index - Can be 0 or 1 * @param[out] info - Pointer to a ::SceDisplayFrameBufInfo structure * which will receive the framebuffer information. * * @return 0 on success, < 0 on error. */ int sceDisplayGetProcFrameBufInternalForDriver(SceUID pid, SceDisplayHead head, int index, SceDisplayFrameBufInfo *info);
sceDisplayGetFrameBufInternalForDriver
Version | NID |
---|---|
3.60 | 0x19F94C63 |
int sceDisplayGetFrameBufInternalForDriver(SceDisplayFrameBuf *pParam, int sync);
sceDisplayGetMaximumFrameBufResolutionForDriver
Version | NID |
---|---|
3.60 | 0x5AFE6CD3 |
int sceDisplayGetMaximumFrameBufResolutionForDriver(int *width, int *height);
sceDisplayGetOutputModeForDriver
Version | NID |
---|---|
3.60 | 0xD2CED235 |
sceDisplayGetPrimaryHeadForDriver
Version | NID |
---|---|
0.940 | not present |
3.60 | 0xC8E554C5 |
SceDisplayHead sceDisplayGetPrimaryHeadForDriver(void);</source === sceDisplayGetRefreshRateInternalForDriver === {| class="wikitable" |- ! Version !! NID |- | 3.60 || 0x7911958E |} === sceDisplayGetResolutionInfoInternalForDriver === {| class="wikitable" |- ! Version !! NID |- | 3.60 || 0xB3C6D647 |} === sceDisplayGetVcountInternalForDriver === {| class="wikitable" |- ! Version !! NID |- | 3.60 || 0x8B5DA27B |} === sceDisplayRegisterFrameBufCallbackForDriver === {| class="wikitable" |- ! Version !! NID |- | 3.60 || 0x6E22990E |} === sceDisplayRegisterFrameBufCallbackInternalForDriver === {| class="wikitable" |- ! Version !! NID |- | 3.60 || 0xFA7CE579 |} === sceDisplayRegisterVblankStartCallbackForDriver === {| class="wikitable" |- ! Version !! NID |- | 3.60 || 0x7FB0BD28 |} === sceDisplayRegisterVblankStartCallbackInternalForDriver === {| class="wikitable" |- ! Version !! NID |- | 3.60 || 0x4AE2A2B1 |} === sceDisplaySetBrightnessForDriver === {| class="wikitable" |- ! Version !! NID |- | 3.60 || 0x9E3C6DC6 |} === sceDisplaySetColorSpaceModeForDriver === {| class="wikitable" |- ! Version !! NID |- | 3.60 || 0x8D79D187 |} === sceDisplaySetFrameBufForDriver === {| class="wikitable" |- ! Version !! NID |- | 3.60 || 0x289D82FE |} <source lang="C">int sceDisplaySetFrameBufForDriver(const SceDisplayFrameBuf *pParam, int sync);
sceDisplaySetFrameBufInternalForDriver
Version | NID |
---|---|
3.60 | 0x16466675 |
int sceDisplaySetFrameBufInternalForDriver(SceDisplayHead head, SceUInt32 fb_idx, const SceDisplayFrameBuf *pFrameBuf, SceInt32 iUpdateTimingMode);
sceDisplaySetInvertColorsForDriver
Version | NID |
---|---|
3.60 | 0x19140ACD |
sceDisplaySetMergeConfForDriver
Version | NID |
---|---|
3.60 | 0x6B198052 |
sceDisplaySetOutputModeForDriver
Version | NID |
---|---|
0.940-3.60 | 0xAF5EE5BE |
int sceDisplaySetOutputModeForDriver(SceDisplayHead head, SceSize *pResSize, SceDisplayPixelFormat pixelformat);
sceDisplaySetScaleConfForDriver
Version | NID |
---|---|
3.60 | 0xEB390A76 |
// scale must be between 0.80000001 and 1.20000005 int sceDisplaySetScaleConfForDriver(float scale, SceDisplayHead head, SceUInt32 fb_idx, int a4);
sceDisplaySetViewportConfForDriver
Version | NID |
---|---|
3.60 | 0xEE5EB52D |
sceDisplayUnregisterVblankStartCallbackForDriver
Version | NID |
---|---|
3.60 | 0x4B27191F |
sceDisplayUnregisterVblankStartCallbackInternalForDriver
Version | NID |
---|---|
3.60 | 0xB027433E |
sceDisplayWaitSetFrameBufCBForDriver
Version | NID |
---|---|
3.60 | 0x9D7F203C |
sceDisplayWaitSetFrameBufCBInternalForDriver
Version | NID |
---|---|
3.60 | 0x35466D63 |
sceDisplayWaitSetFrameBufForDriver
Version | NID |
---|---|
3.60 | 0x1C0C9C4A |
sceDisplayWaitSetFrameBufInternalForDriver
Version | NID |
---|---|
0.940-3.60 | 0x12A77662 |
sceDisplayWaitSetFrameBufMultiCBForDriver
Version | NID |
---|---|
3.60 | 0x863EACBE |
sceDisplayWaitSetFrameBufMultiCBInternalForDriver
Version | NID |
---|---|
3.60 | 0x6DC8F0F5 |
sceDisplayWaitSetFrameBufMultiForDriver
Version | NID |
---|---|
3.60 | 0xE6D27E0A |
sceDisplayWaitSetFrameBufMultiInternalForDriver
Version | NID |
---|---|
3.60 | 0xF83C95B1 |
sceDisplayWaitVblankStartCBForDriver
Version | NID |
---|---|
3.60 | 0x46F186C3 |
sceDisplayWaitVblankStartCBInternalForDriver
Version | NID |
---|---|
3.60 | 0x8F3C0E19 |
sceDisplayWaitVblankStartForDriver
Version | NID |
---|---|
3.60 | 0x984C27E7 |
sceDisplayWaitVblankStartInternalForDriver
Version | NID |
---|---|
3.60 | 0xB80CA224 |
sceDisplayWaitVblankStartMultiCBForDriver
Version | NID |
---|---|
3.60 | 0x77ED8B3A |
sceDisplayWaitVblankStartMultiCBInternalForDriver
Version | NID |
---|---|
3.60 | 0x61421AAF |
sceDisplayWaitVblankStartMultiForDriver
Version | NID |
---|---|
3.60 | 0x40F1469C |
sceDisplayWaitVblankStartMultiInternalForDriver
Version | NID |
---|---|
3.60 | 0x32287576 |
SceDisplayForDriver_unk_086DEFB6
Version | NID |
---|---|
3.60 | 0x086DEFB6 |
used in SceGpuEs4
SceDisplayForDriver_unk_332C5410
Version | NID |
---|---|
3.60 | 0x332C5410 |
used in SceCompat
in SceCompatLcdc
interrupt handler
SceDisplayForDriver_unk_3D95D478
Version | NID |
---|---|
3.60 | 0x3D95D478 |
sceDisplayCaptureFrameBufDMACInternalForDriver
Version | NID |
---|---|
3.60 | 0x707EEE2E |
used in SceAppMgr
used in sceAppMgrCaptureFrameBufDMACByAppId
together with sceDisplayGetPrimaryHeadForDriver
sceDisplaySetOwnerForDriver
Version | NID |
---|---|
3.60 | 0xB54962A1 |
used in SceAppMgr
SceDisplayForDriver_unk_BC76296A
Version | NID |
---|---|
3.60 | 0xBC76296A |
used in SceAppMgr
sceDisplayCaptureFrameBufIFTUInternalForDriver
Version | NID |
---|---|
3.60 | 0xD4C812E5 |
used in SceAppMgr
used in sceAppMgrCaptureFrameBufIFTUByAppId
together with sceDisplayGetPrimaryHeadForDriver
SceDisplayForDriver_311BF561
Version | NID |
---|---|
0.940 | 0x311BF561 |
3.60 | not present |
Wrapper for SceIftuForDriver_0FCBF457.
SceDisplay
_sceDisplayGetFrameBufInternal
Version | NID |
---|---|
1.69-3.60 | 0x86A8E436 |
_sceDisplayGetFrameBuf
Version | NID |
---|---|
1.69-3.60 | 0xA753B0CA |
int _sceDisplayGetFrameBuf(SceDisplayFrameBuf *pParam, int sync, SceSize *size);
_sceDisplayGetMaximumFrameBufResolution
Version | NID |
---|---|
3.60 | 0x2EBFC7CB |
_sceDisplayGetResolutionInfoInternal
Version | NID |
---|---|
3.60 | 0xFEFEB240 |
_sceDisplaySetFrameBufForCompat
Version | NID |
---|---|
3.60 | 0x45BCB941 |
_sceDisplaySetFrameBufInternal
Version | NID |
---|---|
1.69-3.60 | 0x7A8CB78E |
// fb_idx: 0 for game/apps and 1 for LiveArea (including HOME and PS overlays) int _sceDisplaySetFrameBufInternal(SceDisplayHead head, unsigned int fb_idx, const SceDisplayFrameBuf *pFrameBuf, int sync);
_sceDisplaySetFrameBuf
Version | NID |
---|---|
1.69-3.60 | 0xF51523CB |
int _sceDisplaySetFrameBuf(const SceDisplayFrameBuf *pParam, int sync, SceSize *size);
sceDisplayGetPrimaryHead
Version | NID |
---|---|
3.60 | 0x7178FADA |
sceDisplayGetRefreshRate
Version | NID |
---|---|
0.940-3.60 | 0xA08CA60D |
Old SDK name was sceDisplayGetFramePerSec.
/* Get number of frames per second. This function obtains the theoretical number of frames per second in the current screen mode. The number of frames per second on the screen (touchscreen) is NTSC-compatible 59.94005994... Hz. Note that sceDisplayGetRefreshRate() function returns a theoretical value, and that some error may be present relative to the actual time. pFps Pointer of type float * to obtain the number of frames per second If an error occurs, a negative value is returned. */ SceInt32 sceDisplayGetRefreshRate(float *pFps);
sceDisplayGetVcountInternal
Version | NID |
---|---|
1.69-3.60 | 0x9686859E |
sceDisplayGetVcount
Version | NID |
---|---|
1.69-3.60 | 0xB6FDE0BA |
sceDisplayRegisterVblankStartCallback
Version | NID |
---|---|
1.69-3.60 | 0x6BDF4C4D |
sceDisplayUnregisterVblankStartCallback
Version | NID |
---|---|
1.69-3.60 | 0x98436A80 |
sceDisplayWaitSetFrameBufCB
Version | NID |
---|---|
1.69-3.60 | 0x814C90AF |
sceDisplayWaitSetFrameBufMultiCB
Version | NID |
---|---|
1.69-3.60 | 0x3E796EF5 |
sceDisplayWaitSetFrameBufMulti
Version | NID |
---|---|
1.69-3.60 | 0x7D9864A8 |
sceDisplayWaitSetFrameBuf
Version | NID |
---|---|
1.69-3.60 | 0x9423560C |
sceDisplayWaitVblankStartCB
Version | NID |
---|---|
1.69-3.60 | 0x78B41B92 |
sceDisplayWaitVblankStartMultiCB
Version | NID |
---|---|
1.69-3.60 | 0x05F27764 |
sceDisplayWaitVblankStartMulti
Version | NID |
---|---|
1.69-3.60 | 0xDD0A13B8 |
sceDisplayWaitVblankStart
Version | NID |
---|---|
1.69-3.60 | 0x5795E898 |