[patch] pspdisplay.h and pspdisplay_kernel.h

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
User avatar
Raphael
Posts: 646
Joined: Tue Jan 17, 2006 4:54 pm
Location: Germany
Contact:

[patch] pspdisplay.h and pspdisplay_kernel.h

Post by Raphael »

Some findings from the thread here:
http://forums.ps2dev.org/viewtopic.php?p=55961#55961

Code: Select all

Index: pspdisplay.h
===================================================================
--- pspdisplay.h	(revision 2268)
+++ pspdisplay.h	(working copy)
@@ -37,6 +37,15 @@
 	PSP_DISPLAY_SETBUF_NEXTFRAME = 1
 };
 
+
+enum PspDisplayErrorCodes
+{
+	SCE_DISPLAY_ERROR_OK	 = 0,	
+	SCE_DISPLAY_ERROR_POINTER	 = 0x80000103,	
+	SCE_DISPLAY_ERROR_ARGUMENT	= 0x80000107	
+};
+
+
 /**
  * Set display mode
  *
@@ -68,10 +77,12 @@
  *
  * @param topaddr - address of start of framebuffer
  * @param bufferwidth - buffer width (must be power of 2)
- * @param pixelformat - One of ::PspDisplayPixelFormats.
+ * @param pixelformat - One of ::PspDisplayPixelFormats. (only succeeds with PSP_DISPLAY_PIXEL_FORMAT_8888)
  * @param sync - One of ::PspDisplaySetBufSync
+ *
+ * @return 0 on success
  */
-void sceDisplaySetFrameBuf(void *topaddr, int bufferwidth, int pixelformat, int sync);
+int sceDisplaySetFrameBuf(void *topaddr, int bufferwidth, int pixelformat, int sync);
 
 /**
  * Get Display Framebuffer information
@@ -79,9 +90,11 @@
  * @param topaddr - pointer to void* to receive address of start of framebuffer
  * @param bufferwidth - pointer to int to receive buffer width (must be power of 2)
  * @param pixelformat - pointer to int to receive one of ::PspDisplayPixelFormats.
- * @param unk1 - pointer to int, receives unknown, always 1? (vblank sync?)
+ * @param sync - One of ::PspDisplaySetBufSync
+ *
+ * @return 0 on success
  */
-int sceDisplayGetFrameBuf(void **topaddr, int *bufferwidth, int *pixelformat, int *unk1);
+int sceDisplayGetFrameBuf(void **topaddr, int *bufferwidth, int *pixelformat, int sync);
 
 /**
  * Number of vertical blank pulses up to now
Index: pspdisplay_kernel.h
===================================================================
--- pspdisplay_kernel.h	(revision 2268)
+++ pspdisplay_kernel.h	(working copy)
@@ -26,8 +26,10 @@
  * @param bufferwidth - buffer width (must be power of 2)
  * @param pixelformat - One of ::PspDisplayPixelFormats.
  * @param sync - One of ::PspDisplaySetBufSync
+ *
+ * @return 0 on success
  */
-void sceDisplay_driver_63E22A26(int pri, void *topaddr, int bufferwidth, int pixelformat, int sync);
+int sceDisplay_driver_63E22A26(int pri, void *topaddr, int bufferwidth, int pixelformat, int sync);
 
 /**
  * Get Display Framebuffer information
@@ -36,9 +38,11 @@
  * @param topaddr - pointer to void* to receive address of start of framebuffer
  * @param bufferwidth - pointer to int to receive buffer width (must be power of 2)
  * @param pixelformat - pointer to int to receive one of ::PspDisplayPixelFormats.
- * @param unk1 - pointer to int, receives unknown, always 1? (vblank sync?)
+ * @param sync - One of ::PspDisplaySetBufSync
+ *
+ * @return 0 on success
  */
-int sceDisplay_driver_5B5AEFAD(int pri, void **topaddr, int *bufferwidth, int *pixelformat, int *unk1);
+int sceDisplay_driver_5B5AEFAD(int pri, void **topaddr, int *bufferwidth, int *pixelformat, int sync);
 
 /* Define some names to make it nicer */
 #define sceDisplaySetFrameBufferInternal sceDisplay_driver_63E22A26
<Don't push the river, it flows.>
http://wordpress.fx-world.org - my devblog
http://wiki.fx-world.org - VFPU documentation wiki

Alexander Berl
jimparis
Posts: 1145
Joined: Fri Jun 10, 2005 4:21 am
Location: Boston

Post by jimparis »

committed in rev 2270, thanks
Post Reply