forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

[patch] pspdisplay.h and pspdisplay_kernel.h

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
Raphael



Joined: 17 Jan 2006
Posts: 646
Location: Germany

PostPosted: Thu Jul 19, 2007 3:50 am    Post subject: [patch] pspdisplay.h and pspdisplay_kernel.h Reply with quote

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

Code:

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
Back to top
View user's profile Send private message Visit poster's website
jimparis



Joined: 10 Jun 2005
Posts: 1179
Location: Boston

PostPosted: Thu Jul 19, 2007 5:18 am    Post subject: Reply with quote

committed in rev 2270, thanks
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group