first commit

This commit is contained in:
Dan Peori
2010-10-18 12:54:49 -03:00
commit 8a3bef9012
612 changed files with 74685 additions and 0 deletions

40
src/utility/Makefile.am Normal file
View File

@@ -0,0 +1,40 @@
libdir = @PSPSDK_LIBDIR@
CC = @PSP_CC@
CCAS = $(CC)
AR = @PSP_AR@
RANLIB = @PSP_RANLIB@
INCLUDES = -I$(top_srcdir)/src/base -I$(top_srcdir)/src/kernel
CFLAGS = @PSPSDK_CFLAGS@
CCASFLAGS = $(CFLAGS) -I$(top_srcdir)/src/base -I$(top_srcdir)/src/kernel
UTILITY_OBJS = sceUtility_0000.o sceUtility_0001.o sceUtility_0002.o sceUtility_0003.o sceUtility_0004.o sceUtility_0005.o sceUtility_0006.o sceUtility_0007.o sceUtility_0008.o sceUtility_0009.o sceUtility_0010.o sceUtility_0011.o sceUtility_0012.o sceUtility_0013.o sceUtility_0014.o sceUtility_0015.o sceUtility_0016.o sceUtility_0017.o sceUtility_0018.o sceUtility_0019.o sceUtility_0020.o sceUtility_0021.o sceUtility_0022.o sceUtility_0023.o sceUtility_0024.o sceUtility_0025.o sceUtility_0026.o sceUtility_0027.o sceUtility_0028.o sceUtility_0029.o sceUtility_0030.o sceUtility_0031.o sceUtility_0032.o sceUtility_0033.o sceUtility_0034.o sceUtility_0035.o sceUtility_0036.o sceUtility_0037.o sceUtility_0038.o sceUtility_0039.o sceUtility_0040.o sceUtility_0041.o sceUtility_0042.o sceUtility_0043.o sceUtility_0044.o sceUtility_0045.o sceUtility_0046.o sceUtility_0047.o
NETPARAM_OBJS = sceUtility_netparam_internal_0000.o sceUtility_netparam_internal_0001.o sceUtility_netparam_internal_0002.o sceUtility_netparam_internal_0003.o sceUtility_netparam_internal_0004.o
libpsputilityincludedir = @PSPSDK_INCLUDEDIR@
libpsputilityinclude_HEADERS = psputility.h \
psputility_msgdialog.h \
psputility_netconf.h \
psputility_netparam.h \
psputility_savedata.h \
psputility_sysparam.h \
psputility_osk.h \
psputility_netmodules.h \
psputility_avmodules.h \
psputility_usbmodules.h \
psputility_gamesharing.h \
psputility_htmlviewer.h \
psputility_modules.h
lib_LIBRARIES = libpsputility.a
libpsputility_a_SOURCES = sceUtility.S sceUtility_netparam_internal.S
libpsputility_a_LIBADD = $(UTILITY_OBJS) $(NETPARAM_OBJS)
$(UTILITY_OBJS): sceUtility.S
$(COMPILE) -DF_$* $< -c -o $@
$(NETPARAM_OBJS): sceUtility_netparam_internal.S
$(COMPILE) -DF_$* $< -c -o $@

58
src/utility/psputility.h Normal file
View File

@@ -0,0 +1,58 @@
/*
* PSP Software Development Kit - http://www.pspdev.org
* -----------------------------------------------------------------------
* Licensed under the BSD license, see LICENSE in PSPSDK root for details.
*
* psputility.h - Master include for the pspUtility library
*
* Copyright (c) 2005 John Kelley <ps2dev@kelley.ca>
*
* $Id: psputility.h 2387 2008-05-04 17:15:32Z iwn $
*/
#ifndef __PSPUTILITY_H__
#define __PSPUTILITY_H__
typedef struct
{
unsigned int size; /** Size of the structure */
int language; /** Language */
int buttonSwap; /** Set to 1 for X/O button swap */
int graphicsThread; /** Graphics thread priority */
int accessThread; /** Access/fileio thread priority (SceJobThread) */
int fontThread; /** Font thread priority (ScePafThread) */
int soundThread; /** Sound thread priority */
int result; /** Result */
int reserved[4]; /** Set to 0 */
} pspUtilityDialogCommon;
#include <psputility_msgdialog.h>
#include <psputility_netconf.h>
#include <psputility_netparam.h>
#include <psputility_savedata.h>
#include <psputility_gamesharing.h>
#include <psputility_htmlviewer.h>
#include <psputility_sysparam.h>
#include <psputility_osk.h>
#include <psputility_netmodules.h>
#include <psputility_avmodules.h>
#include <psputility_usbmodules.h>
#include <psputility_modules.h>
#define PSP_UTILITY_ACCEPT_CIRCLE 0
#define PSP_UTILITY_ACCEPT_CROSS 1
/**
* Return-values for the various sceUtility***GetStatus() functions
**/
typedef enum
{
PSP_UTILITY_DIALOG_NONE = 0, /**< No dialog is currently active */
PSP_UTILITY_DIALOG_INIT, /**< The dialog is currently being initialized */
PSP_UTILITY_DIALOG_VISIBLE, /**< The dialog is visible and ready for use */
PSP_UTILITY_DIALOG_QUIT, /**< The dialog has been canceled and should be shut down */
PSP_UTILITY_DIALOG_FINISHED /**< The dialog has successfully shut down */
} pspUtilityDialogState;
#endif

View File

@@ -0,0 +1,52 @@
/*
* PSP Software Development Kit - http://www.pspdev.org
* -----------------------------------------------------------------------
* Licensed under the BSD license, see LICENSE in PSPSDK root for details.
*
* psputility_avmodules.h - Load audio/video modules from user mode on 2.xx+
*
* Copyright (c) 2007 David Perry <tias_dp@hotmail.com>
*
*/
#ifndef __PSPUTILITY_AVMODULES_H__
#define __PSPUTILITY_AVMODULES_H__
#ifdef __cplusplus
extern "C" {
#endif
#include <psptypes.h>
#define PSP_AV_MODULE_AVCODEC 0
#define PSP_AV_MODULE_SASCORE 1
#define PSP_AV_MODULE_ATRAC3PLUS 2 // Requires PSP_AV_MODULE_AVCODEC loading first
#define PSP_AV_MODULE_MPEGBASE 3 // Requires PSP_AV_MODULE_AVCODEC loading first
#define PSP_AV_MODULE_MP3 4
#define PSP_AV_MODULE_VAUDIO 5
#define PSP_AV_MODULE_AAC 6
#define PSP_AV_MODULE_G729 7
/**
* Load an audio/video module (PRX) from user mode.
*
* Available on firmware 2.00 and higher only.
*
* @param module - module number to load (PSP_AV_MODULE_xxx)
* @return 0 on success, < 0 on error
*/
int sceUtilityLoadAvModule(int module);
/**
* Unload an audio/video module (PRX) from user mode.
* Available on firmware 2.00 and higher only.
*
* @param module - module number to be unloaded
* @return 0 on success, < 0 on error
*/
int sceUtilityUnloadAvModule(int module);
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,86 @@
/*
* PSP Software Development Kit - http://www.pspdev.org
* -----------------------------------------------------------------------
* Licensed under the BSD license, see LICENSE in PSPSDK root for details.
*
* psputility_gamesharing.h - Game Sharing utility library
*
* Copyright (c) 2008 InsertWittyName <tias_dp@hotmail.com>
*
*/
#ifndef __PSPUTILITY_GAMESHARING_H__
#define __PSPUTILITY_GAMESHARING_H__
#ifdef __cplusplus
extern "C" {
#endif
typedef enum
{
PSP_UTILITY_GAMESHARING_MODE_SINGLE = 1, /* Single send */
PSP_UTILITY_GAMESHARING_MODE_MULTIPLE = 2 /* Up to 4 simultaneous sends */
} pspUtilityGameSharingMode;
typedef enum
{
PSP_UTILITY_GAMESHARING_DATA_TYPE_FILE = 1, /* EBOOT is a file */
PSP_UTILITY_GAMESHARING_DATA_TYPE_MEMORY = 2, /* EBOOT is in memory */
} pspUtilityGameSharingDataType;
/**
* Structure to hold the parameters for Game Sharing
**/
typedef struct _pspUtilityGameSharingParams
{
pspUtilityDialogCommon base;
int unknown1; /* Set to 0 */
int unknown2; /* Set to 0 */
char name[8];
int unknown3; /* Set to 0 */
int unknown4; /* Set to 0 */
int unknown5; /* Set to 0 */
int result; /* Return value */
char *filepath; /* File path if PSP_UTILITY_GAMESHARING_DATA_TYPE_FILE specified */
pspUtilityGameSharingMode mode; /* Send mode. One of ::pspUtilityGameSharingMode */
pspUtilityGameSharingDataType datatype; /* Data type. One of ::pspUtilityGameSharingDataType */
void *data; /* Pointer to the EBOOT data in memory */
unsigned int datasize; /* Size of the EBOOT data in memory */
} pspUtilityGameSharingParams;
/**
* Init the game sharing
*
* @param params - game sharing parameters
* @return 0 on success, < 0 on error.
*/
int sceUtilityGameSharingInitStart(pspUtilityGameSharingParams *params);
/**
* Shutdown game sharing.
*/
void sceUtilityGameSharingShutdownStart(void);
/**
* Get the current status of game sharing.
*
* @return 2 if the GUI is visible (you need to call sceUtilityGameSharingGetStatus).
* 3 if the user cancelled the dialog, and you need to call sceUtilityGameSharingShutdownStart.
* 4 if the dialog has been successfully shut down.
*/
int sceUtilityGameSharingGetStatus(void);
/**
* Refresh the GUI for game sharing
*
* @param n - unknown, pass 1
*/
void sceUtilityGameSharingUpdate(int n);
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,192 @@
/*
* PSP Software Development Kit - http://www.pspdev.org
* -----------------------------------------------------------------------
* Licensed under the BSD license, see LICENSE in PSPSDK root for details.
*
* psputility_htmlviewer.h - html viewer utility library.
*
* Copyright (c) 2008 David Perry (InsertWittyName)
* Copyright (c) 2008 moonlight
*
*/
#ifndef __PSPUTILITY_HTMLVIEWER_H__
#define __PSPUTILITY_HTMLVIEWER_H__
#ifdef __cplusplus
extern "C" {
#endif
enum pspUtilityHtmlViewerDisconnectModes
{
/** Enable automatic disconnect */
PSP_UTILITY_HTMLVIEWER_DISCONNECTMODE_ENABLE = 0,
/** Disable automatic disconnect */
PSP_UTILITY_HTMLVIEWER_DISCONNECTMODE_DISABLE,
/** Confirm disconnection */
PSP_UTILITY_HTMLVIEWER_DISCONNECTMODE_CONFIRM
};
enum pspUtilityHtmlViewerInterfaceModes
{
/** Full user interface */
PSP_UTILITY_HTMLVIEWER_INTERFACEMODE_FULL = 0,
/** Limited user interface */
PSP_UTILITY_HTMLVIEWER_INTERFACEMODE_LIMITED,
/** No user interface */
PSP_UTILITY_HTMLVIEWER_INTERFACEMODE_NONE
};
enum pspUtilityHtmlViewerCookieModes
{
/** Disable accepting cookies */
PSP_UTILITY_HTMLVIEWER_COOKIEMODE_DISABLED = 0,
/** Enable accepting cookies */
PSP_UTILITY_HTMLVIEWER_COOKIEMODE_ENABLED,
/** Confirm accepting a cookie every time */
PSP_UTILITY_HTMLVIEWER_COOKIEMODE_CONFIRM,
/** Use the system default for accepting cookies */
PSP_UTILITY_HTMLVIEWER_COOKIEMODE_DEFAULT
};
enum pspUtilityHtmlViewerTextSizes
{
/** Large text size */
PSP_UTILITY_HTMLVIEWER_TEXTSIZE_LARGE = 0,
/** Normal text size */
PSP_UTILITY_HTMLVIEWER_TEXTSIZE_NORMAL,
/** Small text size */
PSP_UTILITY_HTMLVIEWER_TEXTSIZE_SMALL
};
enum pspUtilityHtmlViewerDisplayModes
{
/** Normal display */
PSP_UTILITY_HTMLVIEWER_DISPLAYMODE_NORMAL = 0,
/** Fit display */
PSP_UTILITY_HTMLVIEWER_DISPLAYMODE_FIT,
/** Smart fit display */
PSP_UTILITY_HTMLVIEWER_DISPLAYMODE_SMART_FIT
};
enum pspUtilityHtmlViewerConnectModes
{
/** Auto connect to last used connection */
PSP_UTILITY_HTMLVIEWER_CONNECTMODE_LAST = 0,
/** Manually select the connection (once) */
PSP_UTILITY_HTMLVIEWER_CONNECTMODE_MANUAL_ONCE,
/** Manually select the connection (every time) */
PSP_UTILITY_HTMLVIEWER_CONNECTMODE_MANUAL_ALL
};
enum pspUtilityHtmlViewerOptions
{
/** Open SCE net start page */
PSP_UTILITY_HTMLVIEWER_OPEN_SCE_START_PAGE = 0x000001,
/** Disable startup limitations */
PSP_UTILITY_HTMLVIEWER_DISABLE_STARTUP_LIMITS = 0x000002,
/** Disable exit confirmation dialog */
PSP_UTILITY_HTMLVIEWER_DISABLE_EXIT_DIALOG = 0x000004,
/** Disable cursor */
PSP_UTILITY_HTMLVIEWER_DISABLE_CURSOR = 0x000008,
/** Disable download completion confirmation dialog */
PSP_UTILITY_HTMLVIEWER_DISABLE_DOWNLOAD_COMPLETE_DIALOG = 0x000010,
/** Disable download confirmation dialog */
PSP_UTILITY_HTMLVIEWER_DISABLE_DOWNLOAD_START_DIALOG = 0x000020,
/** Disable save destination confirmation dialog */
PSP_UTILITY_HTMLVIEWER_DISABLE_DOWNLOAD_DESTINATION_DIALOG = 0x000040,
/** Disable modification of the download destination */
PSP_UTILITY_HTMLVIEWER_LOCK_DOWNLOAD_DESTINATION_DIALOG = 0x000080,
/** Disable tab display */
PSP_UTILITY_HTMLVIEWER_DISABLE_TAB_DISPLAY = 0x000100,
/** Hold analog controller when HOLD button is down */
PSP_UTILITY_HTMLVIEWER_ENABLE_ANALOG_HOLD = 0x000200,
/** Enable Flash Player */
PSP_UTILITY_HTMLVIEWER_ENABLE_FLASH = 0x000400,
/** Disable L/R triggers for back/forward */
PSP_UTILITY_HTMLVIEWER_DISABLE_LRTRIGGER = 0x000800
};
typedef struct pspUtilityHtmlViewerParam
{
pspUtilityDialogCommon base;
/** Pointer to the memory pool to be used */
void* memaddr;
/** Size of the memory pool */
unsigned int memsize;
/** Unknown. Pass 0 */
int unknown1;
/** Unknown. Pass 0 */
int unknown2;
/** URL to be opened initially */
char* initialurl;
/** Number of tabs (maximum of 3) */
unsigned int numtabs;
/** One of ::pspUtilityHtmlViewerInterfaceModes */
unsigned int interfacemode;
/** Values from ::pspUtilityHtmlViewerOptions. Bitwise OR together */
unsigned int options;
/** Directory to be used for downloading */
char* dldirname;
/** Filename to be used for downloading */
char* dlfilename;
/** Directory to be used for uploading */
char* uldirname;
/** Filename to be used for uploading */
char* ulfilename;
/** One of ::pspUtilityHtmlViewerCookieModes */
unsigned int cookiemode;
/** Unknown. Pass 0 */
unsigned int unknown3;
/** URL to set the home page to */
char* homeurl;
/** One of ::pspUtilityHtmlViewerTextSizes */
unsigned int textsize;
/** One of ::pspUtilityHtmlViewerDisplayModes */
unsigned int displaymode;
/** One of ::pspUtilityHtmlViewerConnectModes */
unsigned int connectmode;
/** One of ::pspUtilityHtmlViewerDisconnectModes */
unsigned int disconnectmode;
/** The maximum amount of memory the browser used */
unsigned int memused;
/** Unknown. Pass 0 */
int unknown4[10];
} pspUtilityHtmlViewerParam;
/**
* Init the html viewer
*
* @param params - html viewer parameters
*
* @return 0 on success, < 0 on error.
*/
int sceUtilityHtmlViewerInitStart(pspUtilityHtmlViewerParam *params);
/**
* Shutdown html viewer.
*/
int sceUtilityHtmlViewerShutdownStart(void);
/**
* Refresh the GUI for html viewer
*
* @param n - unknown, pass 1
*/
int sceUtilityHtmlViewerUpdate(int n);
/**
* Get the current status of the html viewer.
*
* @return 2 if the GUI is visible (you need to call sceUtilityHtmlViewerGetStatus).
* 3 if the user cancelled the dialog, and you need to call sceUtilityHtmlViewerShutdownStart.
* 4 if the dialog has been successfully shut down.
*/
int sceUtilityHtmlViewerGetStatus(void);
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,78 @@
/*
* PSP Software Development Kit - http://www.pspdev.org
* -----------------------------------------------------------------------
* Licensed under the BSD license, see LICENSE in PSPSDK root for details.
*
* psputility_modules.h - Load modules from user mode
*
* Copyright (c) 2008 David Perry <tias_dp@hotmail.com>
*
*/
#ifndef __PSPUTILITY_MODULES_H__
#define __PSPUTILITY_MODULES_H__
#ifdef __cplusplus
extern "C" {
#endif
#include <psptypes.h>
/* Net Modules */
#define PSP_MODULE_NET_COMMON 0x0100
#define PSP_MODULE_NET_ADHOC 0x0101
#define PSP_MODULE_NET_INET 0x0102
#define PSP_MODULE_NET_PARSEURI 0x0103
#define PSP_MODULE_NET_PARSEHTTP 0x0104
#define PSP_MODULE_NET_HTTP 0x0105
#define PSP_MODULE_NET_SSL 0x0106
/* USB Modules */
#define PSP_MODULE_USB_PSPCM 0x0200
#define PSP_MODULE_USB_MIC 0x0201
#define PSP_MODULE_USB_CAM 0x0202
#define PSP_MODULE_USB_GPS 0x0203
/* Audio/video Modules */
#define PSP_MODULE_AV_AVCODEC 0x0300
#define PSP_MODULE_AV_SASCORE 0x0301
#define PSP_MODULE_AV_ATRAC3PLUS 0x0302
#define PSP_MODULE_AV_MPEGBASE 0x0303
#define PSP_MODULE_AV_MP3 0x0304
#define PSP_MODULE_AV_VAUDIO 0x0305
#define PSP_MODULE_AV_AAC 0x0306
#define PSP_MODULE_AV_G729 0x0307
/* NP */
#define PSP_MODULE_NP_COMMON 0x0400
#define PSP_MODULE_NP_SERVICE 0x0401
#define PSP_MODULE_NP_MATCHING2 0x0402
#define PSP_MODULE_NP_DRM 0x0500
/* IrDA */
#define PSP_MODULE_IRDA 0x0600
/**
* Load a module (PRX) from user mode.
*
* @param module - module to load (PSP_MODULE_xxx)
*
* @return 0 on success, < 0 on error
*/
int sceUtilityLoadModule(int module);
/**
* Unload a module (PRX) from user mode.
*
* @param module - module to unload (PSP_MODULE_xxx)
*
* @return 0 on success, < 0 on error
*/
int sceUtilityUnloadModule(int module);
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,102 @@
/*
* PSP Software Development Kit - http://www.pspdev.org
* -----------------------------------------------------------------------
* Licensed under the BSD license, see LICENSE in PSPSDK root for details.
*
* psputility_msdialog.h - Definitions and Functions for Dialogs
* section of the pspUtility library
*
* Copyright (c) 2005 Marcus Comstedt <marcus@mc.pp.se>
* (c) 2008 InsertWittyName <tias_dp@hotmail.com>
*
* $Id: psputility_msgdialog.h 2433 2008-10-15 10:00:27Z iwn $
*/
#ifndef __PSPUTILITY_DIALOGS_H__
#define __PSPUTILITY_DIALOGS_H__
#ifdef __cplusplus
extern "C" {
#endif
typedef enum
{
PSP_UTILITY_MSGDIALOG_MODE_ERROR = 0, /* Error message */
PSP_UTILITY_MSGDIALOG_MODE_TEXT /* String message */
} pspUtilityMsgDialogMode;
typedef enum
{
PSP_UTILITY_MSGDIALOG_OPTION_ERROR = 0, /* Error message (why two flags?) */
PSP_UTILITY_MSGDIALOG_OPTION_TEXT = 0x00000001, /* Text message (why two flags?) */
PSP_UTILITY_MSGDIALOG_OPTION_YESNO_BUTTONS = 0x00000010, /* Yes/No buttons instead of 'Cancel' */
PSP_UTILITY_MSGDIALOG_OPTION_DEFAULT_NO = 0x00000100 /* Default position 'No', if not set will default to 'Yes' */
} pspUtilityMsgDialogOption;
typedef enum
{
PSP_UTILITY_MSGDIALOG_RESULT_UNKNOWN1 = 0,
PSP_UTILITY_MSGDIALOG_RESULT_YES,
PSP_UTILITY_MSGDIALOG_RESULT_NO,
PSP_UTILITY_MSGDIALOG_RESULT_BACK
} pspUtilityMsgDialogPressed;
/**
* Structure to hold the parameters for a message dialog
**/
typedef struct _pspUtilityMsgDialogParams
{
pspUtilityDialogCommon base;
int unknown;
pspUtilityMsgDialogMode mode;
unsigned int errorValue;
/** The message to display (may contain embedded linefeeds) */
char message[512];
int options; /* OR ::pspUtilityMsgDialogOption together for multiple options */
pspUtilityMsgDialogPressed buttonPressed;
} pspUtilityMsgDialogParams;
/**
* Create a message dialog
*
* @param params - dialog parameters
* @return 0 on success
*/
int sceUtilityMsgDialogInitStart(pspUtilityMsgDialogParams *params);
/**
* Remove a message dialog currently active. After calling this
* function you need to keep calling GetStatus and Update until
* you get a status of 4.
*/
void sceUtilityMsgDialogShutdownStart(void);
/**
* Get the current status of a message dialog currently active.
*
* @return 2 if the GUI is visible (you need to call sceUtilityMsgDialogGetStatus).
* 3 if the user cancelled the dialog, and you need to call sceUtilityMsgDialogShutdownStart.
* 4 if the dialog has been successfully shut down.
*/
int sceUtilityMsgDialogGetStatus(void);
/**
* Refresh the GUI for a message dialog currently active
*
* @param n - unknown, pass 1
*/
void sceUtilityMsgDialogUpdate(int n);
/**
* Abort a message dialog currently active
*/
int sceUtilityMsgDialogAbort(void);
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,80 @@
/*
* PSP Software Development Kit - http://www.pspdev.org
* -----------------------------------------------------------------------
* Licensed under the BSD license, see LICENSE in PSPSDK root for details.
*
* psputility_netconf.h - Definitions and Functions for Network Configuration
* section of the pspUtility library
*
* Copyright (c) 2005 John Kelley <ps2dev@kelley.ca>
*
* $Id: psputility_netconf.h 2363 2008-02-16 19:40:17Z iwn $
*/
#ifndef __PSPUTILITY_NETCONF_H__
#define __PSPUTILITY_NETCONF_H__
#ifdef __cplusplus
extern "C" {
#endif
#include <psptypes.h>
enum pspUtilityNetconfActions
{
PSP_NETCONF_ACTION_CONNECTAP,
PSP_NETCONF_ACTION_DISPLAYSTATUS,
PSP_NETCONF_ACTION_CONNECT_ADHOC
};
struct pspUtilityNetconfAdhoc
{
unsigned char name[8];
unsigned int timeout;
};
typedef struct _pspUtilityNetconfData
{
pspUtilityDialogCommon base;
int action; /** One of pspUtilityNetconfActions */
struct pspUtilityNetconfAdhoc *adhocparam; //* Adhoc connection params */
int hotspot; /** Set to 1 to allow connections with the 'Internet Browser' option set to 'Start' (ie. hotspot connection) */
int hotspot_connected; /** Will be set to 1 when connected to a hotspot style connection */
int wifisp; /** Set to 1 to allow connections to Wifi service providers (WISP) */
} pspUtilityNetconfData;
/**
* Init the Network Configuration Dialog Utility
*
* @param data - pointer to pspUtilityNetconfData to be initialized
* @return 0 on success, < 0 on error
*/
int sceUtilityNetconfInitStart (pspUtilityNetconfData *data);
/**
* Shutdown the Network Configuration Dialog Utility
*
* @return 0 on success, < 0 on error
*/
int sceUtilityNetconfShutdownStart (void);
/**
* Update the Network Configuration Dialog GUI
*
* @param unknown - unknown; set to 1
* @return 0 on success, < 0 on error
*/
int sceUtilityNetconfUpdate (int unknown);
/**
* Get the status of a running Network Configuration Dialog
*
* @return one of pspUtilityDialogState on success, < 0 on error
*/
int sceUtilityNetconfGetStatus (void);
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,53 @@
/*
* PSP Software Development Kit - http://www.pspdev.org
* -----------------------------------------------------------------------
* Licensed under the BSD license, see LICENSE in PSPSDK root for details.
*
* psputility_netmodules.h - Load network modules from user mode on 2.xx+
*
* Copyright (c) 2005 John Kelley <ps2dev@kelley.ca>
*
* $Id: psputility_netmodules.h 2002 2006-09-16 16:49:57Z jim $
*/
#ifndef __PSPUTILITY_NETMODULES_H__
#define __PSPUTILITY_NETMODULES_H__
#ifdef __cplusplus
extern "C" {
#endif
#include <psptypes.h>
#define PSP_NET_MODULE_COMMON 1
#define PSP_NET_MODULE_ADHOC 2
#define PSP_NET_MODULE_INET 3
#define PSP_NET_MODULE_PARSEURI 4
#define PSP_NET_MODULE_PARSEHTTP 5
#define PSP_NET_MODULE_HTTP 6
#define PSP_NET_MODULE_SSL 7
/**
* Load a network module (PRX) from user mode.
* Load PSP_NET_MODULE_COMMON and PSP_NET_MODULE_INET
* to use infrastructure WifI (via an access point).
* Available on firmware 2.00 and higher only.
*
* @param module - module number to load (PSP_NET_MODULE_xxx)
* @return 0 on success, < 0 on error
*/
int sceUtilityLoadNetModule(int module);
/**
* Unload a network module (PRX) from user mode.
* Available on firmware 2.00 and higher only.
*
* @param module - module number be unloaded
* @return 0 on success, < 0 on error
*/
int sceUtilityUnloadNetModule(int module);
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,117 @@
/*
* PSP Software Development Kit - http://www.pspdev.org
* -----------------------------------------------------------------------
* Licensed under the BSD license, see LICENSE in PSPSDK root for details.
*
* psputility_netparam.h - Definitions and Functions to manage Network
* parameters.
*
* Copyright (c) 2005 John Kelley <ps2dev@kelley.ca>
*
* $Id: psputility_netparam.h 2433 2008-10-15 10:00:27Z iwn $
*/
#ifndef __PSPUTILITY_NETPARAM_H__
#define __PSPUTILITY_NETPARAM_H__
#ifdef __cplusplus
extern "C" {
#endif
#include <psptypes.h>
/**
* Datatype for sceUtilityGetNetParam
* since it can return a u32 or a string
* we use a union to avoid ugly casting
*/
typedef union {
u32 asUint;
char asString[128];
} netData;
#define PSP_NETPARAM_NAME 0 // string
#define PSP_NETPARAM_SSID 1 // string
#define PSP_NETPARAM_SECURE 2 // int
#define PSP_NETPARAM_WEPKEY 3 // string
#define PSP_NETPARAM_IS_STATIC_IP 4 // int
#define PSP_NETPARAM_IP 5 // string
#define PSP_NETPARAM_NETMASK 6 // string
#define PSP_NETPARAM_ROUTE 7 // string
#define PSP_NETPARAM_MANUAL_DNS 8 // int
#define PSP_NETPARAM_PRIMARYDNS 9 // string
#define PSP_NETPARAM_SECONDARYDNS 10 // string
#define PSP_NETPARAM_PROXY_USER 11 // string
#define PSP_NETPARAM_PROXY_PASS 12 // string
#define PSP_NETPARAM_USE_PROXY 13 // int
#define PSP_NETPARAM_PROXY_SERVER 14 // string
#define PSP_NETPARAM_PROXY_PORT 15 // int
#define PSP_NETPARAM_UNKNOWN1 16 // int
#define PSP_NETPARAM_UNKNOWN2 17 // int
#define PSP_NETPARAM_ERROR_BAD_NETCONF 0x80110601
#define PSP_NETPARAM_ERROR_BAD_PARAM 0x80110604
/**
* Check existance of a Net Configuration
*
* @param id - id of net Configuration (1 to n)
* @return 0 on success,
*/
int sceUtilityCheckNetParam(int id);
/**
* Get Net Configuration Parameter
*
* @param conf - Net Configuration number (1 to n)
* (0 returns valid but seems to be a copy of the last config requested)
* @param param - which parameter to get
* @param data - parameter data
* @return 0 on success,
*/
int sceUtilityGetNetParam(int conf, int param, netData *data);
/**
* Create a new Network Configuration
* @note This creates a new configuration at conf and clears 0
*
* @param conf - Net Configuration number (1 to n)
*
* @return 0 on success
*/
int sceUtilityCreateNetParam(int conf);
/**
* Sets a network parameter
* @note This sets only to configuration 0
*
* @param param - Which parameter to set
* @param val - Pointer to the the data to set
*
* @return 0 on success
*/
int sceUtilitySetNetParam(int param, const void *val);
/**
* Copies a Network Configuration to another
*
* @param src - Source Net Configuration number (0 to n)
* @param dest - Destination Net Configuration number (0 to n)
*
* @return 0 on success
*/
int sceUtilityCopyNetParam(int src, int dest);
/**
* Deletes a Network Configuration
*
* @param conf - Net Configuration number (1 to n)
*
* @return 0 on success
*/
int sceUtilityDeleteNetParam(int conf);
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,181 @@
/*
* PSP Software Development Kit - http://www.pspdev.org
* -----------------------------------------------------------------------
* Licensed under the BSD license, see LICENSE in PSPSDK root for details.
*
* psputility_osk.h - Definitions and Functions for OSK section of
* the pspUtility library
*
* Copyright (c) 2006 McZonk
* Copyright (c) 2008 InsertWittyName <tias_dp@hotmail.com>
*
* $Id: psputility_osk.h 2433 2008-10-15 10:00:27Z iwn $
*/
#ifndef PSPOSK_H
#define PSPOSK_H
#ifdef __cplusplus
extern "C" {
#endif
#include <psptypes.h>
/**
* Enumeration for input language
*/
enum SceUtilityOskInputLanguage
{
PSP_UTILITY_OSK_LANGUAGE_DEFAULT = 0x00,
PSP_UTILITY_OSK_LANGUAGE_JAPANESE = 0x01,
PSP_UTILITY_OSK_LANGUAGE_ENGLISH = 0x02,
PSP_UTILITY_OSK_LANGUAGE_FRENCH = 0x03,
PSP_UTILITY_OSK_LANGUAGE_SPANISH = 0x04,
PSP_UTILITY_OSK_LANGUAGE_GERMAN = 0x05,
PSP_UTILITY_OSK_LANGUAGE_ITALIAN = 0x06,
PSP_UTILITY_OSK_LANGUAGE_DUTCH = 0x07,
PSP_UTILITY_OSK_LANGUAGE_PORTUGESE = 0x08,
PSP_UTILITY_OSK_LANGUAGE_RUSSIAN = 0x09,
PSP_UTILITY_OSK_LANGUAGE_KOREAN = 0x0a
};
/**
* Enumeration for OSK internal state
*/
enum SceUtilityOskState
{
PSP_UTILITY_OSK_DIALOG_NONE = 0, /**< No OSK is currently active */
PSP_UTILITY_OSK_DIALOG_INITING, /**< The OSK is currently being initialized */
PSP_UTILITY_OSK_DIALOG_INITED, /**< The OSK is initialised */
PSP_UTILITY_OSK_DIALOG_VISIBLE, /**< The OSK is visible and ready for use */
PSP_UTILITY_OSK_DIALOG_QUIT, /**< The OSK has been cancelled and should be shut down */
PSP_UTILITY_OSK_DIALOG_FINISHED /**< The OSK has successfully shut down */
};
/**
* Enumeration for OSK field results
*/
enum SceUtilityOskResult
{
PSP_UTILITY_OSK_RESULT_UNCHANGED = 0,
PSP_UTILITY_OSK_RESULT_CANCELLED,
PSP_UTILITY_OSK_RESULT_CHANGED
};
/**
* Enumeration for input types (these are limited by initial choice of language)
*/
enum SceUtilityOskInputType
{
PSP_UTILITY_OSK_INPUTTYPE_ALL = 0x00000000,
PSP_UTILITY_OSK_INPUTTYPE_LATIN_DIGIT = 0x00000001,
PSP_UTILITY_OSK_INPUTTYPE_LATIN_SYMBOL = 0x00000002,
PSP_UTILITY_OSK_INPUTTYPE_LATIN_LOWERCASE = 0x00000004,
PSP_UTILITY_OSK_INPUTTYPE_LATIN_UPPERCASE = 0x00000008,
PSP_UTILITY_OSK_INPUTTYPE_JAPANESE_DIGIT = 0x00000100,
PSP_UTILITY_OSK_INPUTTYPE_JAPANESE_SYMBOL = 0x00000200,
PSP_UTILITY_OSK_INPUTTYPE_JAPANESE_LOWERCASE = 0x00000400,
PSP_UTILITY_OSK_INPUTTYPE_JAPANESE_UPPERCASE = 0x00000800,
// http://en.wikipedia.org/wiki/Hiragana
PSP_UTILITY_OSK_INPUTTYPE_JAPANESE_HIRAGANA = 0x00001000,
// http://en.wikipedia.org/wiki/Katakana
// Half-width Katakana
PSP_UTILITY_OSK_INPUTTYPE_JAPANESE_HALF_KATAKANA = 0x00002000,
PSP_UTILITY_OSK_INPUTTYPE_JAPANESE_KATAKANA = 0x00004000,
// http://en.wikipedia.org/wiki/Kanji
PSP_UTILITY_OSK_INPUTTYPE_JAPANESE_KANJI = 0x00008000,
PSP_UTILITY_OSK_INPUTTYPE_RUSSIAN_LOWERCASE = 0x00010000,
PSP_UTILITY_OSK_INPUTTYPE_RUSSIAN_UPPERCASE = 0x00020000,
PSP_UTILITY_OSK_INPUTTYPE_KOREAN = 0x00040000,
PSP_UTILITY_OSK_INPUTTYPE_URL = 0x00080000
};
/**
* OSK Field data
*/
typedef struct _SceUtilityOskData
{
/** Unknown. Pass 0. */
int unk_00;
/** Unknown. Pass 0. */
int unk_04;
/** One of ::SceUtilityOskInputLanguage */
int language;
/** Unknown. Pass 0. */
int unk_12;
/** One or more of ::SceUtilityOskInputType (types that are selectable by pressing SELECT) */
int inputtype;
/** Number of lines */
int lines;
/** Unknown. Pass 0. */
int unk_24;
/** Description text */
unsigned short* desc;
/** Initial text */
unsigned short* intext;
/** Length of output text */
int outtextlength;
/** Pointer to the output text */
unsigned short* outtext;
/** Result. One of ::SceUtilityOskResult */
int result;
/** The max text that can be input */
int outtextlimit;
} SceUtilityOskData;
/**
* OSK parameters
*/
typedef struct _SceUtilityOskParams
{
pspUtilityDialogCommon base;
/** Number of input fields */
int datacount;
/** Pointer to the start of the data for the input fields */
SceUtilityOskData* data;
/** The local OSK state, one of ::SceUtilityOskState */
int state;
/** Unknown. Pass 0 */
int unk_60;
} SceUtilityOskParams;
/**
* Create an on-screen keyboard
*
* @param params - OSK parameters.
*
* @return < 0 on error.
*/
int sceUtilityOskInitStart(SceUtilityOskParams* params);
/**
* Remove a currently active keyboard. After calling this function you must
*
* poll sceUtilityOskGetStatus() until it returns PSP_UTILITY_DIALOG_NONE.
*
* @return < 0 on error.
*/
int sceUtilityOskShutdownStart(void);
/**
* Refresh the GUI for a keyboard currently active
*
* @param n - Unknown, pass 1.
*
* @return < 0 on error.
*/
int sceUtilityOskUpdate(int n);
/**
* Get the status of a on-screen keyboard currently active.
*
* @return the current status of the keyboard. See ::pspUtilityDialogState for details.
*/
int sceUtilityOskGetStatus(void);
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,183 @@
/*
* PSP Software Development Kit - http://www.pspdev.org
* -----------------------------------------------------------------------
* Licensed under the BSD license, see LICENSE in PSPSDK root for details.
*
* psputility_savedata.h - Definitions and Functions for savedata part of
* pspUtility library
*
* Copyright (c) 2005 Shine
* weltall <weltall@consoleworld.org>
* Marcus R. Brown <mrbrown@ocgnet.org>
* InsertWittyName <tias_dp@hotmail.com>
*
* $Id: psputility_savedata.h 2433 2008-10-15 10:00:27Z iwn $
*/
#ifndef __PSPUTILITY_SAVEDATA_H__
#define __PSPUTILITY_SAVEDATA_H__
#include <psptypes.h>
#ifdef __cplusplus
extern "C" {
#endif
/** Save data utility modes */
typedef enum
{
PSP_UTILITY_SAVEDATA_AUTOLOAD = 0,
PSP_UTILITY_SAVEDATA_AUTOSAVE,
PSP_UTILITY_SAVEDATA_LOAD,
PSP_UTILITY_SAVEDATA_SAVE,
PSP_UTILITY_SAVEDATA_LISTLOAD,
PSP_UTILITY_SAVEDATA_LISTSAVE,
PSP_UTILITY_SAVEDATA_LISTDELETE,
PSP_UTILITY_SAVEDATADELETE,
} PspUtilitySavedataMode;
/** Initial focus position for list selection types */
typedef enum
{
PSP_UTILITY_SAVEDATA_FOCUS_UNKNOWN = 0,
PSP_UTILITY_SAVEDATA_FOCUS_FIRSTLIST, /* First in list */
PSP_UTILITY_SAVEDATA_FOCUS_LASTLIST, /* Last in list */
PSP_UTILITY_SAVEDATA_FOCUS_LATEST, /* Most recent date */
PSP_UTILITY_SAVEDATA_FOCUS_OLDEST, /* Oldest date */
PSP_UTILITY_SAVEDATA_FOCUS_UNKNOWN2,
PSP_UTILITY_SAVEDATA_FOCUS_UNKNOWN3,
PSP_UTILITY_SAVEDATA_FOCUS_FIRSTEMPTY, /* First empty slot */
PSP_UTILITY_SAVEDATA_FOCUS_LASTEMPTY, /*Last empty slot */
} PspUtilitySavedataFocus;
/** title, savedataTitle, detail: parts of the unencrypted SFO
data, it contains what the VSH and standard load screen shows */
typedef struct PspUtilitySavedataSFOParam
{
char title[0x80];
char savedataTitle[0x80];
char detail[0x400];
unsigned char parentalLevel;
unsigned char unknown[3];
} PspUtilitySavedataSFOParam;
typedef struct PspUtilitySavedataFileData {
void *buf;
SceSize bufSize;
SceSize size; /* ??? - why are there two sizes? */
int unknown;
} PspUtilitySavedataFileData;
typedef struct PspUtilitySavedataListSaveNewData
{
PspUtilitySavedataFileData icon0;
char *title;
} PspUtilitySavedataListSaveNewData;
/** Structure to hold the parameters for the ::sceUtilitySavedataInitStart function. */
typedef struct SceUtilitySavedataParam
{
pspUtilityDialogCommon base;
PspUtilitySavedataMode mode;
int unknown1;
int overwrite;
/** gameName: name used from the game for saves, equal for all saves */
char gameName[13];
char reserved[3];
/** saveName: name of the particular save, normally a number */
char saveName[20];
/** saveNameList: used by multiple modes */
char (*saveNameList)[20];
/** fileName: name of the data file of the game for example DATA.BIN */
char fileName[13];
char reserved1[3];
/** pointer to a buffer that will contain data file unencrypted data */
void *dataBuf;
/** size of allocated space to dataBuf */
SceSize dataBufSize;
SceSize dataSize;
PspUtilitySavedataSFOParam sfoParam;
PspUtilitySavedataFileData icon0FileData;
PspUtilitySavedataFileData icon1FileData;
PspUtilitySavedataFileData pic1FileData;
PspUtilitySavedataFileData snd0FileData;
/** Pointer to an PspUtilitySavedataListSaveNewData structure */
PspUtilitySavedataListSaveNewData *newData;
/** Initial focus for lists */
PspUtilitySavedataFocus focus;
/** unknown2: ? */
int unknown2[4];
#if _PSP_FW_VERSION >= 200
/** key: encrypt/decrypt key for save with firmware >= 2.00 */
char key[16];
/** unknown3: ? */
char unknown3[20];
#endif
} SceUtilitySavedataParam;
/**
* Saves or Load savedata to/from the passed structure
* After having called this continue calling sceUtilitySavedataGetStatus to
* check if the operation is completed
*
* @param params - savedata parameters
* @return 0 on success
*/
int sceUtilitySavedataInitStart(SceUtilitySavedataParam * params);
/**
* Check the current status of the saving/loading/shutdown process
* Continue calling this to check current status of the process
* before calling this call also sceUtilitySavedataUpdate
* @return 2 if the process is still being processed.
* 3 on save/load success, then you can call sceUtilitySavedataShutdownStart.
* 4 on complete shutdown.
*/
int sceUtilitySavedataGetStatus(void);
/**
* Shutdown the savedata utility. after calling this continue calling
* ::sceUtilitySavedataGetStatus to check when it has shutdown
*
* @return 0 on success
*
*/
int sceUtilitySavedataShutdownStart(void);
/**
* Refresh status of the savedata function
*
* @param unknown - unknown, pass 1
*/
void sceUtilitySavedataUpdate(int unknown);
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,141 @@
/*
* PSP Software Development Kit - http://www.pspdev.org
* -----------------------------------------------------------------------
* Licensed under the BSD license, see LICENSE in PSPSDK root for details.
*
* psputility_sysparam.h - Definitions and Functions for System Paramters
* section of the pspUtility library
*
* Copyright (c) 2005 John Kelley <ps2dev@kelley.ca>
*
* $Id: psputility_sysparam.h 2433 2008-10-15 10:00:27Z iwn $
*/
#ifndef __PSPUTILITY_SYSPARAM_H__
#define __PSPUTILITY_SYSPARAM_H__
#ifdef __cplusplus
extern "C" {
#endif
#include <psptypes.h>
/**
* IDs for use inSystemParam functions
* PSP_SYSTEMPARAM_ID_INT are for use with SystemParamInt funcs
* PSP_SYSTEMPARAM_ID_STRING are for use with SystemParamString funcs
*/
#define PSP_SYSTEMPARAM_ID_STRING_NICKNAME 1
#define PSP_SYSTEMPARAM_ID_INT_ADHOC_CHANNEL 2
#define PSP_SYSTEMPARAM_ID_INT_WLAN_POWERSAVE 3
#define PSP_SYSTEMPARAM_ID_INT_DATE_FORMAT 4
#define PSP_SYSTEMPARAM_ID_INT_TIME_FORMAT 5
//Timezone offset from UTC in minutes, (EST = -300 = -5 * 60)
#define PSP_SYSTEMPARAM_ID_INT_TIMEZONE 6
#define PSP_SYSTEMPARAM_ID_INT_DAYLIGHTSAVINGS 7
#define PSP_SYSTEMPARAM_ID_INT_LANGUAGE 8
/**
* #9 seems to be Region or maybe X/O button swap.
* It doesn't exist on JAP v1.0
* is 1 on NA v1.5s
* is 0 on JAP v1.5s
* is read-only
*/
#define PSP_SYSTEMPARAM_ID_INT_UNKNOWN 9
/**
* Return values for the SystemParam functions
*/
#define PSP_SYSTEMPARAM_RETVAL_OK 0
#define PSP_SYSTEMPARAM_RETVAL_FAIL 0x80110103
/**
* Valid values for PSP_SYSTEMPARAM_ID_INT_ADHOC_CHANNEL
*/
#define PSP_SYSTEMPARAM_ADHOC_CHANNEL_AUTOMATIC 0
#define PSP_SYSTEMPARAM_ADHOC_CHANNEL_1 1
#define PSP_SYSTEMPARAM_ADHOC_CHANNEL_6 6
#define PSP_SYSTEMPARAM_ADHOC_CHANNEL_11 11
/**
* Valid values for PSP_SYSTEMPARAM_ID_INT_WLAN_POWERSAVE
*/
#define PSP_SYSTEMPARAM_WLAN_POWERSAVE_OFF 0
#define PSP_SYSTEMPARAM_WLAN_POWERSAVE_ON 1
/**
* Valid values for PSP_SYSTEMPARAM_ID_INT_DATE_FORMAT
*/
#define PSP_SYSTEMPARAM_DATE_FORMAT_YYYYMMDD 0
#define PSP_SYSTEMPARAM_DATE_FORMAT_MMDDYYYY 1
#define PSP_SYSTEMPARAM_DATE_FORMAT_DDMMYYYY 2
/**
* Valid values for PSP_SYSTEMPARAM_ID_INT_TIME_FORMAT
*/
#define PSP_SYSTEMPARAM_TIME_FORMAT_24HR 0
#define PSP_SYSTEMPARAM_TIME_FORMAT_12HR 1
/**
* Valid values for PSP_SYSTEMPARAM_ID_INT_DAYLIGHTSAVINGS
*/
#define PSP_SYSTEMPARAM_DAYLIGHTSAVINGS_STD 0
#define PSP_SYSTEMPARAM_DAYLIGHTSAVINGS_SAVING 1
/**
* Valid values for PSP_SYSTEMPARAM_ID_INT_LANGUAGE
*/
#define PSP_SYSTEMPARAM_LANGUAGE_JAPANESE 0
#define PSP_SYSTEMPARAM_LANGUAGE_ENGLISH 1
#define PSP_SYSTEMPARAM_LANGUAGE_FRENCH 2
#define PSP_SYSTEMPARAM_LANGUAGE_SPANISH 3
#define PSP_SYSTEMPARAM_LANGUAGE_GERMAN 4
#define PSP_SYSTEMPARAM_LANGUAGE_ITALIAN 5
#define PSP_SYSTEMPARAM_LANGUAGE_DUTCH 6
#define PSP_SYSTEMPARAM_LANGUAGE_PORTUGUESE 7
#define PSP_SYSTEMPARAM_LANGUAGE_RUSSIAN 8
#define PSP_SYSTEMPARAM_LANGUAGE_KOREAN 9
#define PSP_SYSTEMPARAM_LANGUAGE_CHINESE_TRADITIONAL 10
#define PSP_SYSTEMPARAM_LANGUAGE_CHINESE_SIMPLIFIED 11
/**
* Set Integer System Parameter
*
* @param id - which parameter to set
* @param value - integer value to set
* @return 0 on success, PSP_SYSTEMPARAM_RETVAL_FAIL on failure
*/
int sceUtilitySetSystemParamInt(int id, int value);
/**
* Set String System Parameter
*
* @param id - which parameter to set
* @param str - char * value to set
* @return 0 on success, PSP_SYSTEMPARAM_RETVAL_FAIL on failure
*/
int sceUtilitySetSystemParamString(int id, const char *str);
/**
* Get Integer System Parameter
*
* @param id - which parameter to get
* @param value - pointer to integer value to place result in
* @return 0 on success, PSP_SYSTEMPARAM_RETVAL_FAIL on failure
*/
int sceUtilityGetSystemParamInt( int id, int *value );
/**
* Get String System Parameter
*
* @param id - which parameter to get
* @param str - char * buffer to place result in
* @param len - length of str buffer
* @return 0 on success, PSP_SYSTEMPARAM_RETVAL_FAIL on failure
*/
int sceUtilityGetSystemParamString(int id, char *str, int len);
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,48 @@
/*
* PSP Software Development Kit - http://www.pspdev.org
* -----------------------------------------------------------------------
* Licensed under the BSD license, see LICENSE in PSPSDK root for details.
*
* psputility_usbmodules.h - Load usb modules from user mode on 2.70 and higher
*
* Copyright (c) 2007 David Perry <tias_dp@hotmail.com>
*
*/
#ifndef __PSPUTILITY_USBMODULES_H__
#define __PSPUTILITY_USBMODULES_H__
#ifdef __cplusplus
extern "C" {
#endif
#include <psptypes.h>
#define PSP_USB_MODULE_PSPCM 1
#define PSP_USB_MODULE_ACC 2
#define PSP_USB_MODULE_MIC 3 // Requires PSP_USB_MODULE_ACC loading first
#define PSP_USB_MODULE_CAM 4 // Requires PSP_USB_MODULE_ACC loading first
#define PSP_USB_MODULE_GPS 5 // Requires PSP_USB_MODULE_ACC loading first
/**
* Load a usb module (PRX) from user mode.
* Available on firmware 2.70 and higher only.
*
* @param module - module number to load (PSP_USB_MODULE_xxx)
* @return 0 on success, < 0 on error
*/
int sceUtilityLoadUsbModule(int module);
/**
* Unload a usb module (PRX) from user mode.
* Available on firmware 2.70 and higher only.
*
* @param module - module number to be unloaded
* @return 0 on success, < 0 on error
*/
int sceUtilityUnloadUsbModule(int module);
#ifdef __cplusplus
}
#endif
#endif

175
src/utility/sceUtility.S Normal file
View File

@@ -0,0 +1,175 @@
.set noreorder
#include "pspimport.s"
#ifdef F_sceUtility_0000
IMPORT_START "sceUtility",0x40010000
#endif
#ifdef F_sceUtility_0001
IMPORT_FUNC "sceUtility",0xC492F751,sceUtilityGameSharingInitStart
#endif
#ifdef F_sceUtility_0002
IMPORT_FUNC "sceUtility",0xEFC6F80F,sceUtilityGameSharingShutdownStart
#endif
#ifdef F_sceUtility_0003
IMPORT_FUNC "sceUtility",0x7853182D,sceUtilityGameSharingUpdate
#endif
#ifdef F_sceUtility_0004
IMPORT_FUNC "sceUtility",0x946963F3,sceUtilityGameSharingGetStatus
#endif
#ifdef F_sceUtility_0005
IMPORT_FUNC "sceUtility",0x3AD50AE7,sceNetplayDialogInitStart
#endif
#ifdef F_sceUtility_0006
IMPORT_FUNC "sceUtility",0xBC6B6296,sceNetplayDialogShutdownStart
#endif
#ifdef F_sceUtility_0007
IMPORT_FUNC "sceUtility",0x417BED54,sceNetplayDialogUpdate
#endif
#ifdef F_sceUtility_0008
IMPORT_FUNC "sceUtility",0xB6CEE597,sceNetplayDialogGetStatus
#endif
#ifdef F_sceUtility_0009
IMPORT_FUNC "sceUtility",0x4DB1E739,sceUtilityNetconfInitStart
#endif
#ifdef F_sceUtility_0010
IMPORT_FUNC "sceUtility",0xF88155F6,sceUtilityNetconfShutdownStart
#endif
#ifdef F_sceUtility_0011
IMPORT_FUNC "sceUtility",0x91E70E35,sceUtilityNetconfUpdate
#endif
#ifdef F_sceUtility_0012
IMPORT_FUNC "sceUtility",0x6332AA39,sceUtilityNetconfGetStatus
#endif
#ifdef F_sceUtility_0013
IMPORT_FUNC "sceUtility",0x50C4CD57,sceUtilitySavedataInitStart
#endif
#ifdef F_sceUtility_0014
IMPORT_FUNC "sceUtility",0x9790B33C,sceUtilitySavedataShutdownStart
#endif
#ifdef F_sceUtility_0015
IMPORT_FUNC "sceUtility",0xD4B95FFB,sceUtilitySavedataUpdate
#endif
#ifdef F_sceUtility_0016
IMPORT_FUNC "sceUtility",0x8874DBE0,sceUtilitySavedataGetStatus
#endif
#ifdef F_sceUtility_0017
IMPORT_FUNC "sceUtility",0x2995D020,sceUtility_2995D020
#endif
#ifdef F_sceUtility_0018
IMPORT_FUNC "sceUtility",0xB62A4061,sceUtility_B62A4061
#endif
#ifdef F_sceUtility_0019
IMPORT_FUNC "sceUtility",0xED0FAD38,sceUtility_ED0FAD38
#endif
#ifdef F_sceUtility_0020
IMPORT_FUNC "sceUtility",0x88BC7406,sceUtility_88BC7406
#endif
#ifdef F_sceUtility_0021
IMPORT_FUNC "sceUtility",0x2AD8E239,sceUtilityMsgDialogInitStart
#endif
#ifdef F_sceUtility_0022
IMPORT_FUNC "sceUtility",0x67AF3428,sceUtilityMsgDialogShutdownStart
#endif
#ifdef F_sceUtility_0023
IMPORT_FUNC "sceUtility",0x95FC253B,sceUtilityMsgDialogUpdate
#endif
#ifdef F_sceUtility_0024
IMPORT_FUNC "sceUtility",0x9A1C91D7,sceUtilityMsgDialogGetStatus
#endif
#ifdef F_sceUtility_0025
IMPORT_FUNC "sceUtility",0xF6269B82,sceUtilityOskInitStart
#endif
#ifdef F_sceUtility_0026
IMPORT_FUNC "sceUtility",0x3DFAEBA9,sceUtilityOskShutdownStart
#endif
#ifdef F_sceUtility_0027
IMPORT_FUNC "sceUtility",0x4B85C861,sceUtilityOskUpdate
#endif
#ifdef F_sceUtility_0028
IMPORT_FUNC "sceUtility",0xF3F76017,sceUtilityOskGetStatus
#endif
#ifdef F_sceUtility_0029
IMPORT_FUNC "sceUtility",0x45C18506,sceUtilitySetSystemParamInt
#endif
#ifdef F_sceUtility_0030
IMPORT_FUNC "sceUtility",0x41E30674,sceUtilitySetSystemParamString
#endif
#ifdef F_sceUtility_0031
IMPORT_FUNC "sceUtility",0xA5DA2406,sceUtilityGetSystemParamInt
#endif
#ifdef F_sceUtility_0032
IMPORT_FUNC "sceUtility",0x34B78343,sceUtilityGetSystemParamString
#endif
#ifdef F_sceUtility_0033
IMPORT_FUNC "sceUtility",0x5EEE6548,sceUtilityCheckNetParam
#endif
#ifdef F_sceUtility_0034
IMPORT_FUNC "sceUtility",0x434D4B3A,sceUtilityGetNetParam
#endif
#ifdef F_sceUtility_0035
IMPORT_FUNC "sceUtility",0x1579a159,sceUtilityLoadNetModule
#endif
#ifdef F_sceUtility_0036
IMPORT_FUNC "sceUtility",0x64d50c56,sceUtilityUnloadNetModule
#endif
#ifdef F_sceUtility_0037
IMPORT_FUNC "sceUtility",0xC629AF26,sceUtilityLoadAvModule
#endif
#ifdef F_sceUtility_0038
IMPORT_FUNC "sceUtility",0xF7D8D092,sceUtilityUnloadAvModule
#endif
#ifdef F_sceUtility_0039
IMPORT_FUNC "sceUtility",0x0D5BC6D2,sceUtilityLoadUsbModule
#endif
#ifdef F_sceUtility_0040
IMPORT_FUNC "sceUtility",0xF64910F0,sceUtilityUnloadUsbModule
#endif
#ifdef F_sceUtility_0041
IMPORT_FUNC "sceUtility",0x4928BD96,sceUtilityMsgDialogAbort
#endif
#ifdef F_sceUtility_0042
IMPORT_FUNC "sceUtility",0x05AFB9E4,sceUtilityHtmlViewerUpdate
#endif
#ifdef F_sceUtility_0043
IMPORT_FUNC "sceUtility",0xBDA7D894,sceUtilityHtmlViewerGetStatus
#endif
#ifdef F_sceUtility_0044
IMPORT_FUNC "sceUtility",0xCDC3AA41,sceUtilityHtmlViewerInitStart
#endif
#ifdef F_sceUtility_0045
IMPORT_FUNC "sceUtility",0xF5CE1134,sceUtilityHtmlViewerShutdownStart
#endif
#ifdef F_sceUtility_0046
IMPORT_FUNC "sceUtility",0x2A2B3DE0,sceUtilityLoadModule
#endif
#ifdef F_sceUtility_0047
IMPORT_FUNC "sceUtility",0xE49BFE92,sceUtilityUnloadModule
#endif
#ifdef F_sceUtility_0048
IMPORT_FUNC "sceUtility",0x0251B134,sceUtilityScreenshotInitStart
#endif
#ifdef F_sceUtility_0049
IMPORT_FUNC "sceUtility",0xF9E0008C,sceUtilityScreenshotShutdownStart
#endif
#ifdef F_sceUtility_0050
IMPORT_FUNC "sceUtility",0xAB083EA9,sceUtilityScreenshotUpdate
#endif
#ifdef F_sceUtility_0051
IMPORT_FUNC "sceUtility",0xD81957B7,sceUtilityScreenshotGetStatus
#endif
#ifdef F_sceUtility_0052
IMPORT_FUNC "sceUtility",0x86A03A27,sceUtilityScreenshotContStart
#endif
#ifdef F_sceUtility_0053
IMPORT_FUNC "sceUtility",0x16D02AF0,sceUtilityNpSigninInitStart
#endif
#ifdef F_sceUtility_0054
IMPORT_FUNC "sceUtility",0xE19C97D6,sceUtilityNpSigninShutdownStart
#endif
#ifdef F_sceUtility_0055
IMPORT_FUNC "sceUtility",0xF3FBC572,sceUtilityNpSigninUpdate
#endif
#ifdef F_sceUtility_0056
IMPORT_FUNC "sceUtility",0x86ABDB1B,sceUtilityNpSigninGetStatus
#endif

View File

@@ -0,0 +1,19 @@
.set noreorder
#include "pspimport.s"
#ifdef F_sceUtility_netparam_internal_0000
IMPORT_START "sceUtility_netparam_internal",0x40010000
#endif
#ifdef F_sceUtility_netparam_internal_0001
IMPORT_FUNC "sceUtility_netparam_internal",0x072DEBF2,sceUtilityCreateNetParam
#endif
#ifdef F_sceUtility_netparam_internal_0002
IMPORT_FUNC "sceUtility_netparam_internal",0x9CE50172,sceUtilityDeleteNetParam
#endif
#ifdef F_sceUtility_netparam_internal_0003
IMPORT_FUNC "sceUtility_netparam_internal",0xFB0C4840,sceUtilityCopyNetParam
#endif
#ifdef F_sceUtility_netparam_internal_0004
IMPORT_FUNC "sceUtility_netparam_internal",0xFC4516F3,sceUtilitySetNetParam
#endif