Difference between revisions of "SceDisplay"

From Vita Development Wiki
Jump to navigation Jump to search
Line 513: Line 513:
 
<source lang="C">
 
<source lang="C">
 
// scale must be between 0.80000001 and 1.20000005
 
// scale must be between 0.80000001 and 1.20000005
// scaling arg has yet to be studied. scaling seams to be coded on 6 bits. Maybe it is a bitfield config.
+
// scaling arg has yet to be studied. scaling seems to be coded on 6 bits. Maybe it is a bitfield config.
 
// scaling seen values: 1, 0x40, 0x80
 
// scaling seen values: 1, 0x40, 0x80
 
int sceDisplaySetScaleConfForDriver(float scale, SceDisplayHead head, SceDisplayFrameBufType fb_idx, int scaling);
 
int sceDisplaySetScaleConfForDriver(float scale, SceDisplayHead head, SceDisplayFrameBufType fb_idx, int scaling);

Revision as of 00:36, 24 May 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;

typedef struct SceDisplayViewportConf { // size is 0x14 on FW 3.60
	SceSize size;                       // Size of this structure
	unsigned int x;
	unsigned int y;
	unsigned int width;
	unsigned int height;
} SceDisplayViewportConf;

/* Update frame buffer base address and pixel format */
#define SCE_DISPLAY_UPDATETIMING_NEXTHSYNC	0
#define SCE_DISPLAY_UPDATETIMING_NEXTVSYNC	1

typedef struct SceDisplayFrameBuf { // size is 0x1C on FW 3.60
    SceSize size;                          // Size of this structure
    void *base;
    SceUInt32 pitch;
    SceDisplayPixelFormat pixelformat;
    SceUInt32 width;
    SceUInt32 height;
    SceUInt32 resolution;
} SceDisplayFrameBuf;

typedef struct SceDisplayProcFrameBuf { // size is 0x2C on FW 3.60
	SceSize size;               //!< sizeof(SceDisplayProcFrameBuf)
	SceUID pid;
	unsigned int vblankcount;
	uintptr_t paddr;
	SceDisplayFrameBuf frameBuf;
} SceDisplayProcFrameBuf;

typedef struct SceDisplayCaptureFrameBuf { // size is 0x18 on FW 3.60
	SceSize size;               //!< sizeof(SceDisplayCaptureFrameBuf)
	void *base;                 //!< Pointer to frame buffer
	unsigned int pitch;         //!< pitch pixels
	SceDisplayPixelFormat pixelformat;   //!< pixel format (one of ::SceDisplayPixelFormat)
	unsigned int width;         //!< frame buffer width
	unsigned int height;        //!< frame buffer height
} SceDisplayCaptureFrameBuf;

typedef enum SceDisplayScreenModeFlag {
	SCE_DISPLAY_SCREENMODE_FLAG_60_HTZ = 0x0000,
	SCE_DISPLAY_SCREENMODE_FLAG_UNK_10 = 0x0010,
	SCE_DISPLAY_SCREENMODE_FLAG_24_HTZ = 0x0020,
	SCE_DISPLAY_SCREENMODE_FLAG_UNK_40 = 0x0040,
	SCE_DISPLAY_SCREENMODE_FLAG_50_HTZ = 0x0080,
	SCE_DISPLAY_SCREENMODE_FLAG_480P = 0x0300,
	SCE_DISPLAY_SCREENMODE_FLAG_576P = 0x0400,
	SCE_DISPLAY_SCREENMODE_FLAG_1080I = 0x0500,
	SCE_DISPLAY_SCREENMODE_FLAG_720P = 0x0600,
	SCE_DISPLAY_SCREENMODE_FLAG_1080P = 0x0700,
	SCE_DISPLAY_SCREENMODE_FLAG_UNK_8000 = 0x8000 // Maybe standard mode. Custom PSVita oled sizes don't have this flag.
} SceDisplayScreenModeFlag;

typedef SceUInt32 SceDisplayScreenMode;

typedef enum SceDisplayScanMode {
	SCE_DISPLAY_SCANMODE_PROGRESSIVE = 0,
	SCE_DISPLAY_SCANMODE_INTERLACED = 1
} SceDisplayScanMode;

typedef struct SceDisplayResolutionInfo { // size is 0x1C on FW 3.60
    SceSize size;
    SceDisplayScreenMode screenMode;
    SceUInt32 width;
    SceUInt32 height;
    SceDisplayPixelFormat pixelformat;
    SceDisplayScanMode scanMode;
    float fps;
} SceDisplayResolutionInfo;

typedef enum SceDisplayFrameBufType {
	SCE_DISPLAY_FRAMEBUF_GAME_APP = 0,
	SCE_DISPLAY_FRAMEBUF_LIVEAREA = 1 // including HOME and PS overlays
} SceDisplayFrameBufType;

/* SceDisplay internal structures */

typedef struct SceDisplayPlsFbInfo { // size is 0x44 on FW 3.60
	SceDisplayFrameBuf fb_info;
	unsigned int resolution;
	uintptr_t paddr;
	unsigned int pixelformat;
	unsigned int resolution2;
	unsigned int vblankcount;
	unsigned int fb_set_vblankcount;
	unsigned int unk30;
	unsigned short src_w; // 0x34, counter
	unsigned short src_h; // 0x36, counter
	unsigned short dst_x; // 0x38
	unsigned short dst_y; // 0x3A
	unsigned int unk3C;
	unsigned int unk40;
} SceDisplayPlsFbInfo;

typedef struct SceDisplayPls { // size is 0x1D8 on FW 3.60
	SceDisplayPlsFbInfo fbs[2][2];
	unsigned int unk110;
	unsigned int unk114;
	unsigned int unk118;
	unsigned int unk11C;
	unsigned int unk120;
	unsigned int unk124;
	unsigned int unk128;
	unsigned int unk12C;
	unsigned int unk130;
	unsigned int unk134;
	unsigned int unk138;
	unsigned int unk13C;
	unsigned int unk140;
	unsigned int unk144;
	unsigned int unk148;
	unsigned int unk14C;
	unsigned int unk150;
	unsigned int unk154;
	unsigned int unk158;
	unsigned int unk15C;
	unsigned int unk160;
	unsigned int unk164;
	unsigned int unk168;
	unsigned int unk16C;
	unsigned int unk170;
	unsigned int unk174;
	unsigned int unk178;
	unsigned int unk17C;
	unsigned int unk180;
	unsigned int unk184;
	unsigned int unk188;
	unsigned int unk18C;
	unsigned int unk190;
	unsigned int unk194;
	unsigned int vblankcount[2];
	unsigned int unk1A0;
	unsigned int unk1A4;
	unsigned int unk1A8;
	unsigned int unk1AC;
	SceUID event; // 0x1B0
	unsigned int fb_dimensions_value;
	unsigned int unk1B8;
	unsigned int unk1BC;
	unsigned int unk1C0;
	unsigned int unk1C4;
	unsigned int unk1C8;
	unsigned int unk1CC;
	unsigned int unk1D0;
	unsigned int unk1D4;
} SceDisplayPls;

typedef struct SceDisplayFbUnk { // size is 0x20 on FW 3.60
	unsigned int idx; // ?
	unsigned int pixelsize;
	unsigned int unk08;
	unsigned int width;
	unsigned int height;
	unsigned int unk14;
	unsigned int height2;
	unsigned int width2;
} SceDisplayFbUnk;

typedef struct SceDisplayFbUnk2 {
	unsigned int height;
	unsigned int width;
} SceDisplayFbUnk2;

typedef struct SceDisplayFbDataCurFbInfo { // size is 0x20 on FW 3.60
	SceUID pid;		// +0x50, +0x70
	void *paddr;		// +0x54, +0x74
	unsigned int scaling;	// +0x58, +0x78
	float scale;		// +0x5C, +0x7C
	unsigned int vp_x;	// +0x60, +0x80  16.16
	unsigned int vp_y;	// +0x64, +0x84  16.16
	unsigned int vp_width;	// +0x68, +0x88  16.16
	unsigned int vp_height;	// +0x6C, +0x8C  16.16
} SceDisplayFbDataCurFbInfo;

typedef struct SceDisplayFbData { // size is 0x98 on FW 3.60
	int lock;
	unsigned int enabled;
	int initialized;
	unsigned int vblankcount;
	unsigned int cb_event_uid;
	unsigned int unk14;
	unsigned int pulse_event_value;
	unsigned int dsi_bus;
	unsigned int plane_idx0;
	unsigned int plane_idx1;
	unsigned int vic; // VIC or screenMode?
	unsigned int dst_width;
	unsigned int dst_height;
	unsigned int conv_flags; // enable conv?
	unsigned int dst_pixelformat; // ex: 0x00002000 (see IFTU Registers)
	unsigned int pixelsize;
	float refresh_rate;
	unsigned int unk44;
	unsigned int brightness; // 0x10000 = max
	unsigned int invert_colors;
	SceDisplayFbDataCurFbInfo fb_set_info[2]; // +0x50
	unsigned int cb_uid;
	unsigned int brightness_control_value;
} SceDisplayFbData;

/*
v2 == 0
LOAD:00C01724 ; SceIftuCscParams stru_C01724
LOAD:00C01724 stru_C01724     DCD 0                   ; unk00
LOAD:00C01724                 DCD 0                   ; unk04
LOAD:00C01724                 DCD 0x3FF               ; unk08
LOAD:00C01724                 DCD 0                   ; unk0C
LOAD:00C01724                 DCD 0x3FF               ; unk10
LOAD:00C01724                 DCD 0                   ; unk14

LOAD:00C01724                 DCD 0x200               ; csc_rr
LOAD:00C01724                 DCD 0                   ; csc_rg
LOAD:00C01724                 DCD 0                   ; csc_rb
LOAD:00C01724                 DCD 0                   ; csc_gr
LOAD:00C01724                 DCD 0x200               ; csc_gg
LOAD:00C01724                 DCD 0                   ; csc_gb
LOAD:00C01724                 DCD 0                   ; csc_br
LOAD:00C01724                 DCD 0                   ; csc_bg
LOAD:00C01724                 DCD 0x200               ; csc_bb

v2 & 1
LOAD:00C0180C YCbCr_to_RGB_HDTV_C0180C
LOAD:00C0180C                 DCD 0x40                ; unk00
LOAD:00C0180C                 DCD 0x202               ; unk04

LOAD:00C0180C                 DCD 0x3FF               ; unk08
LOAD:00C0180C                 DCD 0                   ; unk0C
LOAD:00C0180C                 DCD 0                   ; unk10
LOAD:00C0180C                 DCD 0                   ; unk14

LOAD:00C0180C                 DCD 0x254               ; csc_rr
LOAD:00C0180C                 DCD 0                   ; csc_rg
LOAD:00C0180C                 DCD 0x395               ; csc_rb
LOAD:00C0180C                 DCD 0x254               ; csc_gr
LOAD:00C0180C                 DCD 0xF93               ; csc_gg
LOAD:00C0180C                 DCD 0xEF0               ; csc_gb
LOAD:00C0180C                 DCD 0x254               ; csc_br
LOAD:00C0180C                 DCD 0x439               ; csc_bg
LOAD:00C0180C                 DCD 0                   ; csc_bb
*/

SceDisplayForDriver

NIDs in this library are calculated as SHA1 so they can be bruteforced.

sceDisplayGetPrimaryHeadForDriver

Version NID
0.940 not present
3.60 0xC8E554C5
SceDisplayHead sceDisplayGetPrimaryHeadForDriver(void);

sceDisplayEnableHeadForDriver

Version NID
0.940-3.60 0x496032D6
int sceDisplayEnableHeadForDriver(SceDisplayHead head);

sceDisplayDisableHeadForDriver

Version NID
0.940-3.60 0x43347565
int sceDisplayDisableHeadForDriver(SceDisplayHead head);

sceDisplayGetFrameBufForDriver

Version NID
3.60 0xEEDA2E54
/**
 * Get current framebuffer parameters
 *
 * @param[inout] pFrameBuf - Pointer of the frame buffer
 *
 * @param[in] fb_idx - Index of frame buffer
 *
 * @param[in] iUpdateTimingMode - Specification of frame buffer start address update timing
 *
 * @return 0 on success, < 0 on error.
*/
int sceDisplayGetFrameBufForDriver(SceDisplayFrameBuf *pFrameBuf, SceDisplayFrameBufType fb_idx, SceInt32 iUpdateTimingMode);

sceDisplayGetFrameBufInternalForDriver

Version NID
3.60 0x19F94C63
int sceDisplayGetFrameBufInternalForDriver(SceDisplayHead head, SceDisplayFrameBufType fb_idx, SceDisplayFrameBuf *pFrameBuf, SceInt32 iUpdateTimingMode);

sceDisplayGetProcFrameBufInternalForDriver

Version NID
3.60 0x3BC165EF

Temp 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 valid PID, -1 to use the current configured
 *                  framebuffer for the head and fb_idx, or 0 to use the PID of the caller.
 * @param[in] head - One of SceDisplayHead values
 * @param[in] fb_idx - Can be 0 or 1
 * @param[inout] pProcFrameBuf - Pointer to a ::SceDisplayProcFrameBuf structure
 * which will receive the framebuffer information.
 *
 * @return 0 on success, < 0 on error.
*/
int sceDisplayGetProcFrameBufInternalForDriver(SceUID pid, SceDisplayHead head, SceDisplayFrameBufType fb_idx, SceDisplayProcFrameBuf *pProcFrameBuf);

sceDisplaySetFrameBufForDriver

Version NID
3.60 0x289D82FE
int sceDisplaySetFrameBufForDriver(const SceDisplayFrameBuf *pFrameBuf, SceInt32 iUpdateTimingMode);

sceDisplaySetFrameBufInternalForDriver

Version NID
3.60 0x16466675
int sceDisplaySetFrameBufInternalForDriver(SceDisplayHead head, SceDisplayFrameBufType fb_idx, const SceDisplayFrameBuf *pFrameBuf, SceInt32 iUpdateTimingMode);

sceDisplayGetMaximumFrameBufResolutionForDriver

Version NID
3.60 0x5AFE6CD3
int sceDisplayGetMaximumFrameBufResolutionForDriver(SceUInt32 *pWidth, SceUInt32 *pHeight);

sceDisplayGetRefreshRateInternalForDriver

Version NID
3.60 0x7911958E
/*
Get number of frames per second and scanMode.
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 sceDisplayGetRefreshRateInternalForDriver() function returns a theoretical value, and that some error
may be present relative to the actual time.
head The target head
pFps Pointer of type float * to obtain the number of frames per second
pScanMode Pointer of type SceDisplayScanMode * to obtain the scan mode
If an error occurs, a negative value is returned.
*/
SceInt32 sceDisplayGetRefreshRateInternalForDriver(SceDisplayHead head, float *pFps, SceDisplayScanMode *pScanMode);

sceDisplayGetResolutionInfoInternalForDriver

Version NID
3.60 0xB3C6D647
int sceDisplayGetResolutionInfoInternalForDriver(SceDisplayHead head, SceDisplayResolutionInfo *pInfo);

sceDisplayGetVcountInternalForDriver

Version NID
3.60 0x8B5DA27B
/*
Get number of VSYNCs for a head.
This function returns the value in which each VSYNC during free running is counted.
It increases by 1 at every frame. A wrap-around occurs at 16 bits.
*/
SceUInt32 sceDisplayGetVcountInternalForDriver(SceDisplayHead head);

sceDisplaySetOwnerForDriver

Version NID
3.60 0xB54962A1

used in SceAppMgr

int sceDisplaySetOwnerForDriver(SceDisplayHead head, SceDisplayFrameBufType fb_idx, SceUID pid);

sceDisplaySetInvertColorsForDriver

Version NID
3.60 0x19140ACD
int sceDisplaySetInvertColorsForDriver(SceDisplayHead head, SceBool enable);

sceDisplayGetOutputModeForDriver

Version NID
0.940-3.60 0xD2CED235
int sceDisplayGetOutputModeForDriver(SceDisplayHead head, SceDisplayScreenMode *pScreenMode, SceDisplayPixelFormat *pPixelformat);

sceDisplaySetOutputModeForDriver

Version NID
0.940-3.60 0xAF5EE5BE
int sceDisplaySetOutputModeForDriver(SceDisplayHead head, SceDisplayScreenMode screenMode, SceDisplayPixelFormat pixelformat);

sceDisplaySetScaleConfForDriver

Version NID
3.60 0xEB390A76
// scale must be between 0.80000001 and 1.20000005
// scaling arg has yet to be studied. scaling seems to be coded on 6 bits. Maybe it is a bitfield config.
// scaling seen values: 1, 0x40, 0x80
int sceDisplaySetScaleConfForDriver(float scale, SceDisplayHead head, SceDisplayFrameBufType fb_idx, int scaling);

sceDisplaySetMergeConfForDriver

Version NID
3.60 0x6B198052
int sceDisplaySetMergeConfForDriver(SceDisplayHead head, int control, SceUInt32 alpha);

sceDisplayGetActualViewportConfForDriver

Version NID
3.60 0x40ACFE51
int sceDisplayGetActualViewportConfForDriver(SceDisplayHead head, SceDisplayFrameBufType fb_idx, SceDisplayViewportConf *pViewportConf);

sceDisplaySetViewportConfForDriver

Version NID
3.60 0xEE5EB52D
int sceDisplaySetViewportConfForDriver(SceDisplayHead head, SceDisplayFrameBufType fb_idx, SceDisplayViewportConf *pViewportConf);

sceDisplayGetDeviceTypeForDriver

Version NID
3.60 0x8D9A1CCE
// pDeviceType values: 0x101 or 0x103
int sceDisplayGetDeviceTypeForDriver(SceDisplayHead head, SceUInt32 *pDeviceType);

sceDisplaySetBrightnessForDriver

Version NID
3.60 0x9E3C6DC6
// Max value for brightness seems to be 0x10000 (untested).
int sceDisplaySetBrightnessForDriver(SceDisplayHead head, SceUInt32 brightness);

sceDisplaySetColorSpaceModeForDriver

Version NID
3.60 0x8D79D187
// mode can be 0, 1 or 2
int sceDisplaySetColorSpaceModeForDriver(SceDisplayHead head, SceUInt32 mode);

sceDisplayRegisterFrameBufCallbackForDriver

Version NID
3.60 0x6E22990E
int sceDisplayRegisterFrameBufCallbackForDriver(SceUID uid);

sceDisplayRegisterFrameBufCallbackInternalForDriver

Version NID
3.60 0xFA7CE579
int sceDisplayRegisterFrameBufCallbackInternalForDriver(SceDisplayHead head, SceUID uid);

sceDisplayRegisterVblankStartCallbackForDriver

Version NID
3.60 0x7FB0BD28
int sceDisplayRegisterVblankStartCallbackForDriver(SceUID uid);

sceDisplayRegisterVblankStartCallbackInternalForDriver

Version NID
3.60 0x4AE2A2B1
int sceDisplayRegisterVblankStartCallbackInternalForDriver(SceDisplayHead head, SceUID uid);

sceDisplayUnregisterVblankStartCallbackForDriver

Version NID
3.60 0x4B27191F
int sceDisplayUnregisterVblankStartCallbackForDriver(SceUID uid);

sceDisplayUnregisterVblankStartCallbackInternalForDriver

Version NID
3.60 0xB027433E
int sceDisplayUnregisterVblankStartCallbackInternalForDriver(SceDisplayHead head, SceUID uid);

sceDisplayWaitSetFrameBufForDriver

Version NID
3.60 0x1C0C9C4A
SceInt32 sceDisplayWaitSetFrameBufForDriver(void);

sceDisplayWaitSetFrameBufInternalForDriver

Version NID
0.940-3.60 0x12A77662
SceInt32 sceDisplayWaitSetFrameBufInternalForDriver(SceDisplayHead head, int a2);

sceDisplayWaitSetFrameBufCBForDriver

Version NID
3.60 0x9D7F203C
SceInt32 sceDisplayWaitSetFrameBufCBForDriver(void);

sceDisplayWaitSetFrameBufCBInternalForDriver

Version NID
3.60 0x35466D63
SceInt32 sceDisplayWaitSetFrameBufCBInternalForDriver(SceDisplayHead head, int a2);

sceDisplayWaitSetFrameBufMultiForDriver

Version NID
3.60 0xE6D27E0A
SceInt32 sceDisplayWaitSetFrameBufMultiForDriver(SceUInt32 uiVcount);

sceDisplayWaitSetFrameBufMultiInternalForDriver

Version NID
3.60 0xF83C95B1
SceInt32 sceDisplayWaitSetFrameBufMultiInternalForDriver(SceDisplayHead head, int a2, SceUInt32 uiVcount);

sceDisplayWaitSetFrameBufMultiCBForDriver

Version NID
3.60 0x863EACBE
SceInt32 sceDisplayWaitSetFrameBufMultiCBForDriver(SceUInt32 uiVcount);

sceDisplayWaitSetFrameBufMultiCBInternalForDriver

Version NID
3.60 0x6DC8F0F5
SceInt32 sceDisplayWaitSetFrameBufMultiCBInternalForDriver(SceDisplayHead head, int a2, SceUInt32 uiVcount);

sceDisplayWaitVblankStartForDriver

Version NID
3.60 0x984C27E7
SceInt32 sceDisplayWaitVblankStartForDriver(void);

sceDisplayWaitVblankStartInternalForDriver

Version NID
3.60 0xB80CA224
SceInt32 sceDisplayWaitVblankStartInternalForDriver(SceDisplayHead head);

sceDisplayWaitVblankStartCBForDriver

Version NID
3.60 0x46F186C3
SceInt32 sceDisplayWaitVblankStartCBForDriver(void);

sceDisplayWaitVblankStartCBInternalForDriver

Version NID
3.60 0x8F3C0E19
SceInt32 sceDisplayWaitVblankStartCBInternalForDriver(SceDisplayHead head);

sceDisplayWaitVblankStartMultiForDriver

Version NID
3.60 0x40F1469C
SceInt32 sceDisplayWaitVblankStartMultiForDriver(SceUInt32 uiVcount);

sceDisplayWaitVblankStartMultiInternalForDriver

Version NID
3.60 0x32287576
SceInt32 sceDisplayWaitVblankStartMultiInternalForDriver(SceDisplayHead head, SceUInt32 uiVcount);

sceDisplayWaitVblankStartMultiCBForDriver

Version NID
3.60 0x77ED8B3A
SceInt32 sceDisplayWaitVblankStartMultiCBForDriver(SceUInt32 uiVcount);

sceDisplayWaitVblankStartMultiCBInternalForDriver

Version NID
3.60 0x61421AAF
SceInt32 sceDisplayWaitVblankStartMultiCBInternalForDriver(SceDisplayHead head, SceUInt32 uiVcount);

sceDisplayCaptureFrameBufDMACForDriver

Version NID
3.60 0xF116D0B4
SceInt32 sceDisplayCaptureFrameBufDMACForDriver(SceUID pid, SceDisplayCaptureFrameBuf *pCaptureFrameBuf);

sceDisplayCaptureFrameBufDMACInternalForDriver

Version NID
3.60 0x707EEE2E

used in sceAppMgrCaptureFrameBufDMACByAppId together with sceDisplayGetPrimaryHeadForDriver

SceInt32 sceDisplayCaptureFrameBufDMACInternalForDriver(SceUID pid, SceDisplayHead head, SceDisplayFrameBufType fb_idx, SceDisplayCaptureFrameBuf *pCaptureFrameBuf);

sceDisplayCaptureFrameBufIFTUForDriver

Version NID
3.60 0xB0CED8BC
SceInt32 sceDisplayCaptureFrameBufIFTUForDriver(SceUID pid, SceDisplayCaptureFrameBuf *pCaptureFrameBuf);

sceDisplayCaptureFrameBufIFTUInternalForDriver

Version NID
3.60 0xD4C812E5

used in sceAppMgrCaptureFrameBufIFTUByAppId together with sceDisplayGetPrimaryHeadForDriver

SceInt32 sceDisplayCaptureFrameBufIFTUInternalForDriver(SceUID pid, SceDisplayHead head, SceDisplayFrameBufType fb_idx, SceDisplayCaptureFrameBuf *pCaptureFrameBuf);

SceDisplayForDriver_086DEFB6

Version NID
3.60 0x086DEFB6

used in SceGpuEs4

int SceDisplayForDriver_086DEFB6(SceUInt32 vcount_flags, SceUID pid);

SceDisplayForDriver_332C5410

Version NID
1.03-3.60 0x332C5410

Used in SceCompat in SceCompatLcdc interrupt handler and SceCompat#sceCompatLCDCSync.

Calls SceLowio#sceIftuConvertForDriver.

int SceDisplayForDriver_332C5410(SceDisplayHead head);

SceDisplayForDriver_3D95D478

Version NID
3.60 0x3D95D478

Calls SceLcd#SceLcdForDriver_1D73D7F3.

// head must be 0
int SceDisplayForDriver_3D95D478(SceDisplayHead head, SceUInt32 value);

SceDisplayForDriver_BC76296A

Version NID
3.60 0xBC76296A

used in SceAppMgr

int SceDisplayForDriver_BC76296A(SceBool a1);

SceDisplayForDriver_311BF561

Version NID
0.940 0x311BF561
3.60 not present

Wrapper for SceLowio#SceIftuForDriver_0FCBF457.

int SceDisplayForDriver_311BF561(SceDisplayHead head, SceUInt32 maybe_fb_idx, SceIftuCscParams *pParams);

SceDisplayForDriver_7595D44F

Version NID
0.940 0x7595D44F
3.60 not present

Wrapper for SceLowio#SceIftuForDriver_D64F4C6B.

int SceDisplayForDriver_7595D44F(SceDisplayHead head, SceUInt32 maybe_fb_idx, SceIftuCscParams *pParams);

SceDisplay

sceDisplayGetPrimaryHead

Version NID
0.940 not present
3.60 0x7178FADA
SceDisplayHead sceDisplayGetPrimaryHead(void);

_sceDisplayGetFrameBuf

Version NID
1.69-3.60 0xA753B0CA
// Structure to check
typedef struct SceDisplayGetFrameBufOpt {
    SceInt32 iUpdateTimingMode;
    SceSize frameBufSize;
} SceDisplayGetFrameBufOpt;

int _sceDisplayGetFrameBuf(SceDisplayFrameBuf *pFrameBuf, SceDisplayFrameBufType fb_idx, SceDisplayGetFrameBufOpt *pOpt);

_sceDisplayGetFrameBufInternal

Version NID
1.69-3.60 0x86A8E436
typedef struct SceDisplayGetFrameBufInternalOpt {
    SceInt32 iUpdateTimingMode;
    SceSize frameBufSize;
} SceDisplayGetFrameBufInternalOpt;

int _sceDisplayGetFrameBuf(SceDisplayHead head, SceDisplayFrameBufType fb_idx, SceDisplayFrameBuf *pFrameBuf, SceDisplayGetFrameBufInternalOpt *pOpt);

_sceDisplaySetFrameBuf

Version NID
1.69-3.60 0xF51523CB
typedef struct SceDisplaySetFrameBufOpt {
    SceSize frameBufSize;
} SceDisplaySetFrameBufOpt;

int _sceDisplaySetFrameBuf(const SceDisplayFrameBuf *pFrameBuf, SceInt32 iUpdateTimingMode, SceDisplaySetFrameBufInternalOpt *pOpt);

_sceDisplaySetFrameBufInternal

Version NID
1.69-3.60 0x7A8CB78E
typedef struct SceDisplaySetFrameBufInternalOpt {
    SceInt32 iUpdateTimingMode;
    SceSize frameBufSize;
} SceDisplaySetFrameBufInternalOpt;

int _sceDisplaySetFrameBufInternal(SceDisplayHead head, SceDisplayFrameBufType fb_idx, const SceDisplayFrameBuf *pFrameBuf, SceDisplaySetFrameBufInternalOpt *pOpt);

_sceDisplaySetFrameBufForCompat

Version NID
3.60 0x45BCB941
typedef struct SceDisplaySetFrameBufForCompatOpt { // size is 0x18 on FW 3.60
    SceSize size;
    SceDisplayFrameBuf *pFrameBuf;                 // Optional: zero to skip
    SceDisplayCaptureFrameBuf *pCaptureFrameBuf;   // Optional: zero to skip
    SceSize frameBufSize;
    SceSize captureFrameBufSize;
    int unk_14;                                    // Seems unused
} SceDisplaySetFrameBufForCompatOpt;

int _sceDisplaySetFrameBufForCompat(int a1, int a2, int a3, SceDisplaySetFrameBufForCompatOpt *pOpt);

_sceDisplayGetMaximumFrameBufResolution

Version NID
3.60 0x2EBFC7CB
int _sceDisplayGetMaximumFrameBufResolution(SceUInt32 *width, SceUInt32 *height);

_sceDisplayGetResolutionInfoInternal

Version NID
3.60 0xFEFEB240
int _sceDisplayGetResolutionInfoInternal(SceDisplayHead head, SceDisplayResolutionInfo *pInfo, SceSize infoSize);

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
/*
Get number of VSYNCs for a head.
This function returns the value in which each VSYNC during free running is counted.
It increases by 1 at every frame. A wrap-around occurs at 16 bits.
*/
SceUInt32 sceDisplayGetVcountInternal(SceDisplayHead head);

sceDisplayGetVcount

Version NID
1.69-3.60 0xB6FDE0BA
/*
Get number of VSYNCs.
This function returns the value in which each VSYNC during free running is counted.
It increases by 1 at every frame. A wrap-around occurs at 16 bits.
*/
SceUInt32 sceDisplayGetVcount(void);

sceDisplayRegisterVblankStartCallback

Version NID
1.69-3.60 0x6BDF4C4D
SceInt32 vblankcallback(SceUID notifyId, SceInt32 notifyCount, SceInt32 notifyArg, void *pCommon);

/*
Register VBLANK callback function.
This function sets the callback function to be called at the each start of VBLANK.
By registering with the sceDisplayRegisterVblankStartCallback() function the SceUID of the callback created with the
sceKernelCreateCallback() function, the callback is notified at each VBLANK start. The callback function is actually
called when the thread that has created the callback is placed in WAIT state by a wait function with "CB" at the end
of the function name.
uid Callback SceUID
*/
SceInt32 sceDisplayRegisterVblankStartCallback(SceUID uid);

sceDisplayUnregisterVblankStartCallback

Version NID
1.69-3.60 0x98436A80
/*
Unregister VBLANK callback.
This function unregisters the callback notified at each start of VBLANK.
Please unregister the callback function first if you wish to delete the callback function with sceKernelDeleteCallback().
uid Callback SceUID
*/
SceInt32 sceDisplayUnregisterVblankStartCallback(SceUID uid);

sceDisplayWaitSetFrameBuf

Version NID
1.69-3.60 0x9423560C
/*
Wait for start of VBLANK interval from the last update of frame buffer.
This function places the thread in WAIT state until the start of the next VBLANK interval taking the last update of the display frame buffer performed with sceDisplaySetFrameBuf() function as the starting point.
Regardless of whether a VBLANK interval was in progress when the sceDisplayWaitSetFrameBuf() or sceDisplayWaitSetFrameBufCB() function was called, the thread enters WAIT state until the start of the next VBLANK interval taking the thread on which the display frame buffer was updated with the sceDisplaySetFrameBuf() function as the starting point.
In the state in which the frame buffer update has been registered with the sceDisplaySetFrameBuf() function, if sceDisplayWaitSetFrameBuf() or sceDisplayWaitSetFrameBufCB() is called after the start timing of the next VBLANK has elapsed, the thread will not enter WAIT state and will return because the frame buffer has been already updated. In this case, the phase in which the thread returns from this function is undefined in the VSYNC cycles.
The sceDisplayWaitSetFrameBuf() function does not execute a thread manager callback during a WAIT state. If you also want to perform callback processing during the WAIT state, use the sceDisplayWaitSetFrameBufCB() function.
*/
SceInt32 sceDisplayWaitSetFrameBuf(void);

sceDisplayWaitSetFrameBufCB

Version NID
1.69-3.60 0x814C90AF
/*
Wait for start of VBLANK interval from the last update of frame buffer.
This function places the thread in WAIT state until the start of the next VBLANK interval taking the last update of the display frame buffer performed with sceDisplaySetFrameBuf() function as the starting point.
Regardless of whether a VBLANK interval was in progress when the sceDisplayWaitSetFrameBuf() or sceDisplayWaitSetFrameBufCB() function was called, the thread enters WAIT state until the start of the next VBLANK interval taking the thread on which the display frame buffer was updated with the sceDisplaySetFrameBuf() function as the starting point.
In the state in which the frame buffer update has been registered with the sceDisplaySetFrameBuf() function, if sceDisplayWaitSetFrameBuf() or sceDisplayWaitSetFrameBufCB() is called after the start timing of the next VBLANK has elapsed, the thread will not enter WAIT state and will return because the frame buffer has been already updated. In this case, the phase in which the thread returns from this function is undefined in the VSYNC cycles.
The sceDisplayWaitSetFrameBuf() function does not execute a thread manager callback during a WAIT state. If you also want to perform callback processing during the WAIT state, use the sceDisplayWaitSetFrameBufCB() function.
*/
SceInt32 sceDisplayWaitSetFrameBufCB(void);

sceDisplayWaitSetFrameBufMulti

Version NID
1.69-3.60 0x7D9864A8
/*
Wait for start of multiple VBLANK intervals from the last update of frame buffer.
This function places the thread in WAIT state until the start of the next VBLANK, after the specified number of
VSYNCs has elapsed, taking the last update of the display frame buffer performed with the sceDisplaySetFrameBuf()
function as the starting point.
The sceDisplayWaitSetFrameBufMulti() and sceDisplayWaitSetFrameBufMultiCB() functions make the thread wait until
the next VBLANK after the specified number of VSYNCs have elapsed as determined from the VSYNC count that the last
frame buffer update was performed.
For example, if the sceDisplayWaitSetFrameBufMulti() function is called with 2 specified for uiVcount, and no
VSYNCs have elapsed since the last update of the frame buffer, the thread will wait until the start of the second
VBLANK. If one VSYNC has elapsed since the last update of the frame buffer, the thread will wait until the start
of the next VBLANK. If two or more VSYNCs have elapsed since the last update of the frame buffer, the thread will
not perform any wait operations. If the function is called with 1 specified for uiVcount, the same operations as
sceDisplayWaitSetFrameBuf() and sceDisplayWaitSetFrameBufCB() will be performed.
The sceDisplayWaitSetFrameBufMulti() function does not execute a thread manager callback during a WAIT state. If
you also want to perform callback processing during the WAIT state, use the sceDisplayWaitSetFrameBufMultiCB() function.
uiVcount Number of VSYNC cycles to wait for (1 to 65535)
*/
SceInt32 sceDisplayWaitSetFrameBufMulti(SceUInt32 uiVcount);

sceDisplayWaitSetFrameBufMultiCB

Version NID
1.69-3.60 0x3E796EF5
/*
Wait for start of multiple VBLANK intervals from the last update of frame buffer.
This function places the thread in WAIT state until the start of the next VBLANK, after the specified number of
VSYNCs has elapsed, taking the last update of the display frame buffer performed with the sceDisplaySetFrameBuf()
function as the starting point.
The sceDisplayWaitSetFrameBufMulti() and sceDisplayWaitSetFrameBufMultiCB() functions make the thread wait until
the next VBLANK after the specified number of VSYNCs have elapsed as determined from the VSYNC count that the last
frame buffer update was performed.
For example, if the sceDisplayWaitSetFrameBufMulti() function is called with 2 specified for uiVcount, and no
VSYNCs have elapsed since the last update of the frame buffer, the thread will wait until the start of the second
VBLANK. If one VSYNC has elapsed since the last update of the frame buffer, the thread will wait until the start
of the next VBLANK. If two or more VSYNCs have elapsed since the last update of the frame buffer, the thread will
not perform any wait operations. If the function is called with 1 specified for uiVcount, the same operations as
sceDisplayWaitSetFrameBuf() and sceDisplayWaitSetFrameBufCB() will be performed.
The sceDisplayWaitSetFrameBufMulti() function does not execute a thread manager callback during a WAIT state. If
you also want to perform callback processing during the WAIT state, use the sceDisplayWaitSetFrameBufMultiCB() function.
uiVcount Number of VSYNC cycles to wait for (1 to 65535)
*/
SceInt32 sceDisplayWaitSetFrameBufMultiCB(SceUInt32 uiVcount);

sceDisplayWaitVblankStartMulti

Version NID
1.69-3.60 0xDD0A13B8
/*
Wait for start of multiple VBLANK intervals for each thread.
This function places the thread in WAIT state until the start of the next VBLANK, after the
specified number of VSYNCs has elapsed since the last time a VBLANK wait function was called.
The sceDisplayWaitVblankStartMulti() and sceDisplayWaitVblankStartMultiCB() functions make the
respective thread wait until the next VBLANK after the specified number of VSYNCs have elapsed
as determined from the VSYNC count that was returned from the last VBLANK wait state, that was
recorded for each thread.
For example, if the sceDisplayWaitVblankStartMulti() function is called with 2 specified for
uiVcount, and no VSYNCs have elapsed since the last call, the thread will wait until the start
of the second VBLANK. If one VSYNC has elapsed since the last call, the thread will wait until
the start of the next VBLANK. If two or more VSYNCs have elapsed since the last call, the thread
will start at the next VBLANK. This enables the system to run at a fixed FPS as long as no
processing drop occurs. If the function is called with 1 specified for uiVcount, the same
operations as sceDisplayWaitVblankStart() and sceDisplayWaitVblankStartCB() will be performed.
The sceDisplayWaitVblankStartMulti() function does not execute a thread manager callback during
a WAIT state. If you also want to perform callback processing during the WAIT state, use the
sceDisplayWaitVblankStartMultiCB() function.
Use of the sceDisplayWaitVblankStartMulti() or sceDisplayWaitVblankStartMultiCB() function is
not recommended while a callback function is executing.
uiVcount Number of VSYNC cycles to wait for (1 to 65535)
*/
SceInt32 sceDisplayWaitVblankStartMulti(SceUInt32 uiVcount);

sceDisplayWaitVblankStartMultiCB

Version NID
1.69-3.60 0x05F27764
/*
Wait for start of multiple VBLANK intervals for each thread.
This function places the thread in WAIT state until the start of the next VBLANK, after the
specified number of VSYNCs has elapsed since the last time a VBLANK wait function was called.
The sceDisplayWaitVblankStartMulti() and sceDisplayWaitVblankStartMultiCB() functions make the
respective thread wait until the next VBLANK after the specified number of VSYNCs have elapsed
as determined from the VSYNC count that was returned from the last VBLANK wait state, that was
recorded for each thread.
For example, if the sceDisplayWaitVblankStartMulti() function is called with 2 specified for
uiVcount, and no VSYNCs have elapsed since the last call, the thread will wait until the start
of the second VBLANK. If one VSYNC has elapsed since the last call, the thread will wait until
the start of the next VBLANK. If two or more VSYNCs have elapsed since the last call, the thread
will start at the next VBLANK. This enables the system to run at a fixed FPS as long as no
processing drop occurs. If the function is called with 1 specified for uiVcount, the same
operations as sceDisplayWaitVblankStart() and sceDisplayWaitVblankStartCB() will be performed.
The sceDisplayWaitVblankStartMulti() function does not execute a thread manager callback during
a WAIT state. If you also want to perform callback processing during the WAIT state, use the
sceDisplayWaitVblankStartMultiCB() function.
Use of the sceDisplayWaitVblankStartMulti() or sceDisplayWaitVblankStartMultiCB() function is
not recommended while a callback function is executing.
uiVcount Number of VSYNC cycles to wait for (1 to 65535)
*/
SceInt32 sceDisplayWaitVblankStartMultiCB(SceUInt32 uiVcount);

sceDisplayWaitVblankStart

Version NID
1.69-3.60 0x5795E898
/*
Thread wait for start of VBLANK interval.
This function places the thread in WAIT state until the start of the next VBLANK interval.
Regardless of whether a VBLANK interval was in progress when the sceDisplayWaitVblankStart() or sceDisplayWaitVblankStartCB() function was called, the thread enters WAIT state until the start of the next VBLANK interval.
The sceDisplayWaitVblankStart() function does not execute a thread manager callback during a WAIT state. If you also want to perform callback processing during the WAIT state, use the sceDisplayWaitVblankStartCB() function.
*/
SceInt32 sceDisplayWaitVblankStart(void);

sceDisplayWaitVblankStartCB

Version NID
1.69-3.60 0x78B41B92
/*
Thread wait for start of VBLANK interval.
This function places the thread in WAIT state until the start of the next VBLANK interval.
Regardless of whether a VBLANK interval was in progress when the sceDisplayWaitVblankStart() or sceDisplayWaitVblankStartCB() function was called, the thread enters WAIT state until the start of the next VBLANK interval.
The sceDisplayWaitVblankStart() function does not execute a thread manager callback during a WAIT state. If you also want to perform callback processing during the WAIT state, use the sceDisplayWaitVblankStartCB() function.
*/
SceInt32 sceDisplayWaitVblankStartCB(void);