include/errors.h: Began to separate specific error codes from commonly used error codes.

This commit is contained in:
Felix-Dev 2016-08-05 00:51:56 +02:00
parent 684347b231
commit 339041f8dd
14 changed files with 484 additions and 169 deletions

View File

@ -16,6 +16,21 @@
* @{
*/
/* Specific error codes for the Audio Driver. */
#define SCE_AUDIO_ERROR_NOT_INITIALIZED (0x80260001)
#define SCE_AUDIO_ERROR_OUTPUT_BUSY (0x80260002)
#define SCE_AUDIO_ERROR_INVALID_CH (0x80260003)
#define SCE_AUDIO_ERROR_PRIV_REQUIRED (0x80260004)
#define SCE_AUDIO_ERROR_NOT_FOUND (0x80260005)
#define SCE_AUDIO_ERROR_INVALID_SIZE (0x80260006)
#define SCE_AUDIO_ERROR_INVALID_FORMAT (0x80260007)
#define SCE_AUDIO_ERROR_NOT_RESERVED (0x80260008)
#define SCE_AUDIO_ERROR_NOT_OUTPUT (0x80260009)
#define SCE_AUDIO_ERROR_INVALID_FREQUENCY (0x8026000A)
#define SCE_AUDIO_ERROR_INVALID_VOLUME (0x8026000B)
#define SCE_AUDIO_ERROR_INPUT_BUSY (0x80260010)
/** The input parameters structure, used by sceAudioInputInitEx() */
typedef struct
{

View File

@ -245,94 +245,14 @@
#define SCE_ERROR_KERNEL_NOT_CACHE_ALIGNED 0x8002044C
#define SCE_ERROR_KERNEL_MAX_ERROR 0x8002044D
#define SCE_ERROR_UTILITY_INVALID_STATUS 0x80110001
#define SCE_ERROR_UTILITY_INVALID_PARAM_ADDR 0x80110002
#define SCE_ERROR_UTILITY_IS_UNKNOWN 0x80110003
#define SCE_ERROR_UTILITY_INVALID_PARAM_SIZE 0x80110004
#define SCE_ERROR_UTILITY_WRONG_TYPE 0x80110005
#define SCE_ERROR_UTILITY_MODULE_NOT_FOUND 0x80110006
#define SCE_ERROR_SAVEDATA_LOAD_NO_MEMSTICK 0x80110301
#define SCE_ERROR_SAVEDATA_LOAD_MEMSTICK_REMOVED 0x80110302
#define SCE_ERROR_SAVEDATA_LOAD_ACCESS_ERROR 0x80110305
#define SCE_ERROR_SAVEDATA_LOAD_DATA_BROKEN 0x80110306
#define SCE_ERROR_SAVEDATA_LOAD_NO_DATA 0x80110307
#define SCE_ERROR_SAVEDATA_LOAD_BAD_PARAMS 0x80110308
#define SCE_ERROR_SAVEDATA_LOAD_NO_UMD 0x80110309
#define SCE_ERROR_SAVEDATA_LOAD_INTERNAL_ERROR 0x80110309
#define SCE_ERROR_SAVEDATA_RW_NO_MEMSTICK 0x80110321
#define SCE_ERROR_SAVEDATA_RW_MEMSTICK_REMOVED 0x80110322
#define SCE_ERROR_SAVEDATA_RW_MEMSTICK_FULL 0x80110323
#define SCE_ERROR_SAVEDATA_RW_MEMSTICK_PROTECTED 0x80110324
#define SCE_ERROR_SAVEDATA_RW_ACCESS_ERROR 0x80110325
#define SCE_ERROR_SAVEDATA_RW_DATA_BROKEN 0x80110326
#define SCE_ERROR_SAVEDATA_RW_NO_DATA 0x80110327
#define SCE_ERROR_SAVEDATA_RW_BAD_PARAMS 0x80110328
#define SCE_ERROR_SAVEDATA_RW_FILE_NOT_FOUND 0x80110329
#define SCE_ERROR_SAVEDATA_RW_CAN_NOT_SUSPEND 0x8011032A
#define SCE_ERROR_SAVEDATA_RW_INTERNAL_ERROR 0x8011032B
#define SCE_ERROR_SAVEDATA_RW_BAD_STATUS 0x8011032C
#define SCE_ERROR_SAVEDATA_RW_SECURE_FILE_FULL 0x8011032D
#define SCE_ERROR_SAVEDATA_DELETE_NO_MEMSTICK 0x80110341
#define SCE_ERROR_SAVEDATA_DELETE_MEMSTICK_REMOVED 0x80110342
#define SCE_ERROR_SAVEDATA_DELETE_MEMSTICK_PROTECTED 0x80110344
#define SCE_ERROR_SAVEDATA_DELETE_ACCESS_ERROR 0x80110345
#define SCE_ERROR_SAVEDATA_DELETE_DATA_BROKEN 0x80110346
#define SCE_ERROR_SAVEDATA_DELETE_NO_DATA 0x80110347
#define SCE_ERROR_SAVEDATA_DELETE_BAD_PARAMS 0x80110348
#define SCE_ERROR_SAVEDATA_DELETE_INTERNAL_ERROR 0x8011034B
#define SCE_ERROR_SAVEDATA_SAVE_NO_MEMSTICK 0x80110381
#define SCE_ERROR_SAVEDATA_SAVE_MEMSTICK_REMOVED 0x80110382
#define SCE_ERROR_SAVEDATA_SAVE_NO_SPACE 0x80110383
#define SCE_ERROR_SAVEDATA_SAVE_MEMSTICK_PROTECTED 0x80110384
#define SCE_ERROR_SAVEDATA_SAVE_ACCESS_ERROR 0x80110385
#define SCE_ERROR_SAVEDATA_SAVE_BAD_PARAMS 0x80110388
#define SCE_ERROR_SAVEDATA_SAVE_NO_UMD 0x80110389
#define SCE_ERROR_SAVEDATA_SAVE_WRONG_UMD 0x8011038A
#define SCE_ERROR_SAVEDATA_SAVE_INTERNAL_ERROR 0x8011038B
#define SCE_ERROR_SAVEDATA_SIZES_NO_MEMSTICK 0x801103C1
#define SCE_ERROR_SAVEDATA_SIZES_MEMSTICK_REMOVED 0x801103C2
#define SCE_ERROR_SAVEDATA_SIZES_ACCESS_ERROR 0x801103C5
#define SCE_ERROR_SAVEDATA_SIZES_DATA_BROKEN 0x801103C6
#define SCE_ERROR_SAVEDATA_SIZES_NO_DATA 0x801103C7
#define SCE_ERROR_SAVEDATA_SIZES_BAD_PARAMS 0x801103C8
#define SCE_ERROR_SAVEDATA_SIZES_INTERNAL_ERROR 0x801103CB
#define SCE_ERROR_NETPARAM_BAD_NETCONF 0x80110601
#define SCE_ERROR_NETPARAM_BAD_PARAM 0x80110604
#define SCE_ERROR_NET_MODULE_BAD_ID 0x80110801
#define SCE_ERROR_NET_MODULE_ALREADY_LOADED 0x80110802
#define SCE_ERROR_NET_MODULE_NOT_LOADED 0x80110803
#define SCE_ERROR_AV_MODULE_BAD_ID 0x80110901
#define SCE_ERROR_AV_MODULE_ALREADY_LOADED 0x80110902
#define SCE_ERROR_AV_MODULE_NOT_LOADED 0x80110903
#define SCE_ERROR_MODULE_BAD_ID 0x80111101
#define SCE_ERROR_MODULE_ALREADY_LOADED 0x80111102
#define SCE_ERROR_MODULE_NOT_LOADED 0x80111103
#define SCE_ERROR_SCREENSHOT_CONT_MODE_NOT_INIT 0x80111229
#define SCE_ERROR_MEMSTICK_DEVCTL_BAD_PARAMS 0x80220081
#define SCE_ERROR_MEMSTICK_DEVCTL_TOO_MANY_CALLBACKS 0x80220082
#define SCE_ERROR_AUDIO_NOT_INITIALIZED 0x80260001
#define SCE_ERROR_AUDIO_OUTPUT_BUSY 0x80260002
#define SCE_ERROR_AUDIO_INVALID_CH 0x80260003
#define SCE_ERROR_AUDIO_PRIV_REQUIRED 0x80260004
#define SCE_ERROR_AUDIO_NOT_FOUND 0x80260005
#define SCE_ERROR_AUDIO_INVALID_SIZE 0x80260006
#define SCE_ERROR_AUDIO_INVALID_FORMAT 0x80260007
#define SCE_ERROR_AUDIO_NOT_RESERVED 0x80260008
#define SCE_ERROR_AUDIO_NOT_OUTPUT 0x80260009
#define SCE_ERROR_AUDIO_INVALID_FREQUENCY 0x8026000A
#define SCE_ERROR_AUDIO_INVALID_VOLUME 0x8026000B
#define SCE_ERROR_AUDIO_INPUT_BUSY 0x80260010
#define SCE_ERROR_POWER_VMEM_IN_USE 0x802B0200
#define SCE_ERROR_NET_RESOLVER_BAD_ID 0x80410408
#define SCE_ERROR_NET_RESOLVER_ALREADY_STOPPED 0x8041040A
#define SCE_ERROR_NET_RESOLVER_INVALID_HOST 0x80410414
#define SCE_NET_ERROR_RESOLVER_BAD_ID 0x80410408
#define SCE_NET_ERROR_RESOLVER_ALREADY_STOPPED 0x8041040A
#define SCE_NET_ERROR_RESOLVER_INVALID_HOST 0x80410414
#define SCE_ERROR_WLAN_BAD_PARAMS 0x80410D13
#define SCE_ERROR_SAS_INVALID_VOICE 0x80420010
#define SCE_ERROR_SAS_INVALID_ADSR_CURVE_MODE 0x80420013
#define SCE_ERROR_SAS_INVALID_PARAMETER 0x80420014
#define SCE_ERROR_SAS_VOICE_PAUSED 0x80420016
#define SCE_ERROR_SAS_BUSY 0x80420030
#define SCE_ERROR_SAS_NOT_INIT 0x80420100
#define SCE_ERROR_HTTP_NOT_INIT 0x80431001
#define SCE_ERROR_HTTP_ALREADY_INIT 0x80431020
#define SCE_ERROR_HTTP_NO_MEMORY 0x80431077
@ -347,18 +267,11 @@
#define SCE_ERROR_HTTPS_INTERNAL_ERROR 0x80435063
#define SCE_ERROR_HTTPS_PROXY_ERROR 0x80435064
#define SCE_ERROR_SSL_INVALID_PARAMETER 0x804351FE
#define SCE_ERROR_WAVE_NOT_INIT 0x80440001
#define SCE_ERROR_WAVE_FAILED_EXIT 0x80440002
#define SCE_ERROR_WAVE_BAD_VOL 0x8044000A
#define SCE_ERROR_WAVE_INVALID_CHANNEL 0x80440010
#define SCE_ERROR_WAVE_INVALID_SAMPLE_COUNT 0x80440011
#define SCE_ERROR_FONT_INVALID_LIBID 0x80460002
#define SCE_ERROR_FONT_INVALID_PARAMETER 0x80460003
#define SCE_ERROR_FONT_TOO_MANY_OPEN_FONTS 0x80460009
#define SCE_ERROR_MPEG_BAD_VERSION 0x80610002
#define SCE_ERROR_MPEG_NO_MEMORY 0x80610022
#define SCE_ERROR_MPEG_INVALID_ADDR 0x80610103
#define SCE_ERROR_MPEG_INVALID_VALUE 0x806101FE
#define SCE_ERROR_PSMF_NOT_INITIALIZED 0x80615001
#define SCE_ERROR_PSMF_BAD_VERSION 0x80615002
#define SCE_ERROR_PSMF_NOT_FOUND 0x80615025
@ -368,16 +281,9 @@
#define SCE_ERROR_PSMF_INVALID_PSMF 0x80615501
#define SCE_ERROR_PSMFPLAYER_NOT_INITIALIZED 0x80616001
#define SCE_ERROR_PSMFPLAYER_NO_MORE_DATA 0x8061600C
#define SCE_ERROR_MPEG_NO_DATA 0x80618001
#define SCE_ERROR_AVC_VIDEO_FATAL 0x80628002
#define SCE_ERROR_ATRAC_NO_ID 0x80630003
#define SCE_ERROR_ATRAC_INVALID_CODEC 0x80630004
#define SCE_ERROR_ATRAC_BAD_ID 0x80630005
#define SCE_ERROR_ATRAC_ALL_DATA_LOADED 0x80630009
#define SCE_ERROR_ATRAC_NO_DATA 0x80630010
#define SCE_ERROR_ATRAC_SECOND_BUFFER_NEEDED 0x80630012
#define SCE_ERROR_ATRAC_SECOND_BUFFER_NOT_NEEDED 0x80630022
#define SCE_ERROR_ATRAC_BUFFER_IS_EMPTY 0x80630023
#define SCE_ERROR_ATRAC_ALL_DATA_DECODED 0x80630024
#define SCE_ERROR_CODEC_AUDIO_FATAL 0x807F00FC

View File

@ -2,8 +2,9 @@
See the file COPYING for copying permission.
*/
/** @defgroup Crypto Crypto
* PSP Cryptography modules.
/**
* @defgroup Crypto Crypto
* PSP Cryptography modules.
*/
/**
@ -37,7 +38,7 @@
#define KIRK_CMD_SIG_VER_ECDSA (0x11)
#define KIRK_CMD_CERT_VER (0x12)
/* Specific values for algorithms used by KIRK. */
/* Specific values for algorithms used by KIRK. */
#define KIRK_SHA1_DIGEST_LEN (20) /*!< The length (160 bit) of a SHA-1 hash value. */

57
include/lib_atrac3plus.h Normal file
View File

@ -0,0 +1,57 @@
/* Copyright (C) 2011 - 2016 The uOFW team
See the file COPYING for copying permission.
*/
/**
* uofw/include/lib_atrac3plus.h
*
* library for the ATRAC3/ATRAC3PLUS audio file format.
*/
#ifndef LIB_ATRAC3PLUS_H
#define LIB_ATRAC3PLUS_H
#include "common\errors.h"
/* ATRAC3 driver specific error codes. */
#define SCE_ATRAC_SUCCESS SCE_ERROR_OK
#define SCE_ATRAC_ERROR_PARAM_FAIL (0x80630001)
#define SCE_ATRAC_ERROR_API_FAIL (0x80630002)
#define SCE_ATRAC_ERROR_NO_ATRACID (0x80630003)
#define SCE_ATRAC_ERROR_BAD_CODECTYPE (0x80630004)
#define SCE_ATRAC_ERROR_BAD_ATRACID (0x80630005)
#define SCE_ATRAC_ERROR_UNKNOWN_FORMAT (0x80630006)
#define SCE_ATRAC_ERROR_UNMATCH_FORMAT (0x80630007)
#define SCE_ATRAC_ERROR_BAD_DATA (0x80630008)
#define SCE_ATRAC_ERROR_ALLDATA_IS_ONMEMORY (0x80630009)
#define SCE_ATRAC_ERROR_UNSET_DATA (0x80630010)
#define SCE_ATRAC_ERROR_READSIZE_IS_TOO_SMALL (0x80630011)
#define SCE_ATRAC_ERROR_NEED_SECOND_BUFFER (0x80630012)
#define SCE_ATRAC_ERROR_READSIZE_OVER_BUFFER (0x80630013)
#define SCE_ATRAC_ERROR_NOT_ALIGNED_ADDRESS (0x80630014)
#define SCE_ATRAC_ERROR_BAD_SAMPLE (0x80630015)
#define SCE_ATRAC_ERROR_WRITEBYTE_FIRST_BUFFER (0x80630016)
#define SCE_ATRAC_ERROR_WRITEBYTE_SECOND_BUFFER (0x80630017)
#define SCE_ATRAC_ERROR_ADD_DATA_IS_TOO_BIG (0x80630018)
#define SCE_ATRAC_ERROR_NOT_MONO_DATA (0x80630019)
#define SCE_ATRAC_ERROR_UNSET_PARAM (0x80630021)
#define SCE_ATRAC_ERROR_NONEED_SECOND_BUFFER (0x80630022)
#define SCE_ATRAC_ERROR_NODATA_IN_BUFFER (0x80630023)
#define SCE_ATRAC_ERROR_ALLDATA_WAS_DECODED (0x80630024)
#define SCE_ATRAC_ERROR_LOWLEVEL_INIT_ID (0x80630031)
#define SCE_ATRAC_ERROR_NOT_LOWLEVEL_INIT_ID (0x80630032)
#define SCE_ATRAC_ERROR_USED_BY_SAS (0x80630040)
/* Audio Codec IDs */
#define SCE_ATRAC_AT3PLUS (0x00001000)
#define SCE_ATRAC_AT3 (0x00001001)
#endif /* LIB_ATRAC3PLUS_H */

52
include/lib_mpeg.h Normal file
View File

@ -0,0 +1,52 @@
/* Copyright (C) 2011 - 2016 The uOFW team
See the file COPYING for copying permission.
*/
/**
* uofw/include/lib_mpeg.h
*
* lib_mpeg is a library that can be used for demultiplexing a PSP Movie Format \n
* (for game) stream (PSMF), and decoding the demultiplexed video and audio streams.
*
* PSMF is based on the MPEG2 program stream, and multiplexes together multiple \n
* video, audio, and user data streams into a single stream.
*/
#ifndef LIB_MPEG_H
#define LIB_MPEG_H
#include "common\errors.h"
/* lib_mpeg specific error codes. */
/* for general libmpeg & Demux */
#define SCE_MPEG_ERROR_OK SCE_ERROR_OK
#define SCE_MPEG_ERROR_NOT_COMPLETED 0x80618001
#define SCE_MPEG_ERROR_INVALID_VALUE 0x806101FE
#define SCE_MPEG_ERROR_UNMATCHED_VERSION 0x80610002
#define SCE_MPEG_ERROR_INVALID_POINTER 0x80610103
#define SCE_MPEG_ERROR_OUT_OF_MEMORY 0x80610022
#define SCE_MPEG_ERROR_NO_RAPI 0x80618004
#define SCE_MPEG_ERROR_ALREADY_USED 0x80618005
#define SCE_MPEG_ERROR_INTERNAL 0x80618006
#define SCE_MPEG_ERROR_ILLEGAL_STREAM 0x80618007
#define SCE_MPEG_ERROR_INSUFFICIENT_STACKSIZE 0x80618008
#define SCE_MPEG_ERROR_NOT_INITIALIZE 0x80618009
/* for VIDEO Decoder */
#define SCE_MPEG_ERROR_VIDEO_INVALID_VALUE 0x806201FE
#define SCE_MPEG_ERROR_VIDEO_UNMATCHED_VERSION 0x80620002
#define SCE_MPEG_ERROR_VIDEO_ERROR 0x80628001
#define SCE_MPEG_ERROR_VIDEO_FATAL 0x80628002
/* for AUDIO Decoder */
#define SCE_MPEG_ERROR_AUDIO_UNKNOWN_ERROR 0x807F0001
#define SCE_MPEG_ERROR_AUDIO_FATAL 0x807F00FC
#define SCE_MPEG_ERROR_AUDIO_ERROR 0x807F00FD
#define SCE_MPEG_ERROR_AUDIO_INVALID_VALUE 0x807F00FF
#endif /* LIB_MPEG_H */

48
include/lib_sas.h Normal file
View File

@ -0,0 +1,48 @@
/* Copyright (C) 2011 - 2016 The uOFW team
See the file COPYING for copying permission.
*/
/**
* uofw/include/lib_sas.h
*
* Low-level sound library for the PSPs Software Audio Synthesizer (SAS).
*/
#ifndef LIB_SAS_H
#define LIB_SAS_H
/* SAS driver specific error codes. */
#define SCE_SAS_ERROR_ADDRESS (0x80420005)
#define SCE_SAS_ERROR_VOICE_INDEX (0x80420010)
#define SCE_SAS_ERROR_NOISE_CLOCK (0x80420011)
#define SCE_SAS_ERROR_PITCH_VAL (0x80420012)
#define SCE_SAS_ERROR_ADSR_MODE (0x80420013)
#define SCE_SAS_ERROR_ADPCM_SIZE (0x80420014)
#define SCE_SAS_ERROR_LOOP_MODE (0x80420015)
#define SCE_SAS_ERROR_INVALID_STATE (0x80420016)
#define SCE_SAS_ERROR_VOLUME_VAL (0x80420018)
#define SCE_SAS_ERROR_ADSR_VAL (0x80420019)
#define SCE_SAS_ERROR_PCM_SIZE (0x8042001a)
#define SCE_SAS_ERROR_ATRAC3_SIZE (0x8042001b)
#define SCE_SAS_ERROR_FX_TYPE (0x80420020)
#define SCE_SAS_ERROR_FX_FEEDBACK (0x80420021)
#define SCE_SAS_ERROR_FX_DELAY (0x80420022)
#define SCE_SAS_ERROR_FX_VOLUME_VAL (0x80420023)
#define SCE_SAS_ERROR_FX_UNAVAILABLE (0x80420024)
#define SCE_SAS_ERROR_BUSY (0x80420030)
#define SCE_SAS_ERROR_CHANGE_AT3_VOICE (0x80420040)
#define SCE_SAS_ERROR_NOT_AT3_VOICE (0x80420041)
#define SCE_SAS_ERROR_NO_CONCATENATE_SPACE (0x80420042)
#define SCE_SAS_ERROR_NOTINIT (0x80420100)
#define SCE_SAS_ERROR_ALRDYINIT (0x80420101)
#define SCE_SAS_ERROR_INVALID_ATRAC3 (0x80420102)
#define SCE_SAS_ERROR_SMALL_ATRAC3_SIZE (0x80420103)
#endif /* LIB_SAS_H */

36
include/lib_wave.h Normal file
View File

@ -0,0 +1,36 @@
/* Copyright (C) 2011 - 2016 The uOFW team
See the file COPYING for copying permission.
*/
/**
* uofw/include/lib_wave.h
*
* lib_wave is a sound library that provides ADPCM (.vag) format fixed-pitch playback \n
* and 44.1 kHz 16-bit linear PCM format sound output functions.
*/
#ifndef LIB_WAVE_H
#define LIB_WAVE_H
/* lib_wave specific error codes (0x80440000 - 0x8044ffff). */
#define SCE_WAVE_ERROR_INITFAIL (0x80440001)
#define SCE_WAVE_ERROR_EXITFAIL (0x80440002)
#define SCE_WAVE_ERROR_STARTFAIL (0x80440003)
#define SCE_WAVE_ERROR_ENDFAIL (0x80440004)
#define SCE_WAVE_ERROR_VOICENUM (0x80440005)
#define SCE_WAVE_ERROR_BUFFPTR (0x80440006)
#define SCE_WAVE_ERROR_SIZE (0x80440007)
#define SCE_WAVE_ERROR_MODE (0x80440008)
#define SCE_WAVE_ERROR_VOICEPLAY (0x80440009)
#define SCE_WAVE_ERROR_VOL (0x8044000A)
#define SCE_WAVE_ERROR_VOLPTR (0x8044000B)
#define SCE_WAVE_ERROR_RESTPTR (0x8044000C)
#define SCE_WAVE_ERROR_LOOPMODE (0x8044000D)
#define SCE_WAVE_ERROR_AUDIOCH (0x80440010)
#define SCE_WAVE_ERROR_SAMPLE (0x80440011)
#define SCE_WAVE_ERROR_THPRIORITY (0x80440012)
#endif /* LIB_WAVE_H */

20
include/power_error.h Normal file
View File

@ -0,0 +1,20 @@
/* Copyright (C) 2011 - 2016 The uOFW team
See the file COPYING for copying permission.
*/
/**
* uofw/include/power_error.h
*
* Specific error codes for the Power Service.
*/
#ifndef POWER_ERROR_H
#define POWER_ERROR_H
#define SCE_POWER_ERROR_NO_BATTERY (0x802B0100) /*!< No battery is present. */
#define SCE_POWER_ERROR_DETECTING (0x802B0101) /*!< Failed to obtain battery information. */
#define SCE_POWER_ERROR_CANNOT_LOCK_VMEM (0x802B0200) /*!< Failed to lock volatile memory. */
#define SCE_POWER_ERROR_BAD_PRECONDITION (0x802B0300) /*!< Invalid pre-conditions for an operation. */
#endif /* POWER_ERROR_H */

View File

@ -0,0 +1,22 @@
/* Copyright (C) 2011 - 2016 The uOFW team
See the file COPYING for copying permission.
*/
/**
* uofw/include/utility/utility_common.h
*
*/
#ifndef UTILITY_COMMON_H
#define UTILITY_COMMON_H
#define SCE_UTILITY_COMMON_ERROR_INVALID_STATUS 0x80110001
#define SCE_UTILITY_COMMON_ERROR_INVALID_ADDRESS 0x80110002
#define SCE_UTILITY_COMMON_ERROR_UNKNOWN_UTILITY_TYPE 0x80110003
#define SCE_UTILITY_COMMON_ERROR_INVALID_PARAM_SIZE 0x80110004
#define SCE_UTILITY_COMMON_ERROR_DIALOG_TYPE_MISMATCH 0x80110005
#define SCE_UTILITY_COMMON_ERROR_CANT_OPEN_MODULE 0x80110006
#define SCE_UTILITY_COMMON_ERROR_STATUS_WAITING 0x80110007
#endif /* UTILITY_COMMON_H */

View File

@ -0,0 +1,19 @@
/* Copyright (C) 2011 - 2016 The uOFW team
See the file COPYING for copying permission.
*/
/**
* uofw/include/utility/utility_module.h
*
*/
#ifndef UTILITY_MODULE_H
#define UTILITY_MODULE_H
#define SCE_UTILITY_MODULE_ERROR_INVALID_ID 0x80111101
#define SCE_UTILITY_MODULE_ERROR_ALREADY_LOADED 0x80111102
#define SCE_UTILITY_MODULE_ERROR_NOT_LOADED 0x80111103
#define SCE_UTILITY_MODULE_ERROR_CANNOT_START 0x80111104
#define SCE_UTILITY_MODULE_ERROR_CANNOT_STOP 0x80111105
#endif /* UTILITY_MODULE_H */

View File

@ -0,0 +1,22 @@
/* Copyright (C) 2011 - 2016 The uOFW team
See the file COPYING for copying permission.
*/
/**
* uofw/include/utility/utility_netparam.h
*
*/
#ifndef UTILITY_NETPARAM_H
#define UTILITY_NETPARAM_H
/* Net_Param utility specific error codes (0x80110600 - 0x801106ff). */
#define SCE_UTILITY_NET_PARAM_ERROR_NO_SUCH_CNF 0x80110601
#define SCE_UTILITY_NET_PARAM_ERROR_INVALID_ID 0x80110602
#define SCE_UTILITY_NET_PARAM_ERROR_INVALID_POINTER 0x80110603
#define SCE_UTILITY_NET_PARAM_ERROR_INVALID_CODE 0x80110604
#define SCE_UTILITY_NET_PARAM_ERROR_INVALID_VALUE 0x80110605
#define SCE_UTILITY_NET_PARAM_ERROR_UNEXPECTED_PARAMTYPE 0x80110606
#endif /* UTILITY_NETPARAM_H */

View File

@ -0,0 +1,62 @@
/* Copyright (C) 2011 - 2016 The uOFW team
See the file COPYING for copying permission.
*/
/**
* uofw/include/utility/utility_savedata.h
*
*/
#ifndef UTILITY_SAVEDATA_H
#define UTILITY_SAVEDATA_H
/* Savedata utility specific error codes (0x80110300 - 0x801103ff). */
#define SCE_UTILITY_SAVEDATA_ERROR_LOAD_NO_MEMSTICK 0x80110301
#define SCE_UTILITY_SAVEDATA_ERROR_LOAD_MEMSTICK_REMOVED 0x80110302
#define SCE_UTILITY_SAVEDATA_ERROR_LOAD_ACCESS_ERROR 0x80110305
#define SCE_UTILITY_SAVEDATA_ERROR_LOAD_DATA_BROKEN 0x80110306
#define SCE_UTILITY_SAVEDATA_ERROR_LOAD_NO_DATA 0x80110307
#define SCE_UTILITY_SAVEDATA_ERROR_LOAD_BAD_PARAMS 0x80110308
#define SCE_UTILITY_SAVEDATA_ERROR_LOAD_NO_UMD 0x80110309
#define SCE_UTILITY_SAVEDATA_ERROR_LOAD_INTERNAL_ERROR 0x80110309
#define SCE_UTILITY_SAVEDATA_ERROR_RW_NO_MEMSTICK 0x80110321
#define SCE_UTILITY_SAVEDATA_ERROR_RW_MEMSTICK_REMOVED 0x80110322
#define SCE_UTILITY_SAVEDATA_ERROR_RW_MEMSTICK_FULL 0x80110323
#define SCE_UTILITY_SAVEDATA_ERROR_RW_MEMSTICK_PROTECTED 0x80110324
#define SCE_UTILITY_SAVEDATA_ERROR_RW_ACCESS_ERROR 0x80110325
#define SCE_UTILITY_SAVEDATA_ERROR_RW_DATA_BROKEN 0x80110326
#define SCE_UTILITY_SAVEDATA_ERROR_RW_NO_DATA 0x80110327
#define SCE_UTILITY_SAVEDATA_ERROR_RW_BAD_PARAMS 0x80110328
#define SCE_UTILITY_SAVEDATA_ERROR_RW_FILE_NOT_FOUND 0x80110329
#define SCE_UTILITY_SAVEDATA_ERROR_RW_CAN_NOT_SUSPEND 0x8011032A
#define SCE_UTILITY_SAVEDATA_ERROR_RW_INTERNAL_ERROR 0x8011032B
#define SCE_UTILITY_SAVEDATA_ERROR_RW_BAD_STATUS 0x8011032C
#define SCE_UTILITY_SAVEDATA_ERROR_RW_SECURE_FILE_FULL 0x8011032D
#define SCE_UTILITY_SAVEDATA_ERROR_DELETE_NO_MEMSTICK 0x80110341
#define SCE_UTILITY_SAVEDATA_ERROR_DELETE_MEMSTICK_REMOVED 0x80110342
#define SCE_UTILITY_SAVEDATA_ERROR_DELETE_MEMSTICK_PROTECTED 0x80110344
#define SCE_UTILITY_SAVEDATA_ERROR_DELETE_ACCESS_ERROR 0x80110345
#define SCE_UTILITY_SAVEDATA_ERROR_DELETE_DATA_BROKEN 0x80110346
#define SCE_UTILITY_SAVEDATA_ERROR_DELETE_NO_DATA 0x80110347
#define SCE_UTILITY_SAVEDATA_ERROR_DELETE_BAD_PARAMS 0x80110348
#define SCE_UTILITY_SAVEDATA_ERROR_DELETE_INTERNAL_ERROR 0x8011034B
#define SCE_UTILITY_SAVEDATA_ERROR_SAVE_NO_MEMSTICK 0x80110381
#define SCE_UTILITY_SAVEDATA_ERROR_SAVE_MEMSTICK_REMOVED 0x80110382
#define SCE_UTILITY_SAVEDATA_ERROR_SAVE_NO_SPACE 0x80110383
#define SCE_UTILITY_SAVEDATA_ERROR_SAVE_MEMSTICK_PROTECTED 0x80110384
#define SCE_UTILITY_SAVEDATA_ERROR_SAVE_ACCESS_ERROR 0x80110385
#define SCE_UTILITY_SAVEDATA_ERROR_SAVE_BAD_PARAMS 0x80110388
#define SCE_UTILITY_SAVEDATA_ERROR_SAVE_NO_UMD 0x80110389
#define SCE_UTILITY_SAVEDATA_ERROR_SAVE_WRONG_UMD 0x8011038A
#define SCE_UTILITY_SAVEDATA_ERROR_SAVE_INTERNAL_ERROR 0x8011038B
#define SCE_UTILITY_SAVEDATA_ERROR_SIZES_NO_MEMSTICK 0x801103C1
#define SCE_UTILITY_SAVEDATA_ERROR_SIZES_MEMSTICK_REMOVED 0x801103C2
#define SCE_UTILITY_SAVEDATA_ERROR_SIZES_ACCESS_ERROR 0x801103C5
#define SCE_UTILITY_SAVEDATA_ERROR_SIZES_DATA_BROKEN 0x801103C6
#define SCE_UTILITY_SAVEDATA_ERROR_SIZES_NO_DATA 0x801103C7
#define SCE_UTILITY_SAVEDATA_ERROR_SIZES_BAD_PARAMS 0x801103C8
#define SCE_UTILITY_SAVEDATA_ERROR_SIZES_INTERNAL_ERROR 0x801103CB
#endif /* UTILITY_SAVEDATA_H */

View File

@ -0,0 +1,55 @@
/* Copyright (C) 2011 - 2016 The uOFW team
See the file COPYING for copying permission.
*/
/**
* uofw/include/utility/utility_screenshot.h
*
*/
#ifndef UTILITY_SCREENSHOT_H
#define UTILITY_SCREENSHOT_H
/* Screenshot utility specific error codes (0x80111200 - 0x801112ff). */
#define SCE_UTILITY_SCREENSHOT_ERROR_INVALID_DISPLAY_PIXEL_FORMAT (0x80111206) /*!< The specified display pixel format is invalid. */
#define SCE_UTILITY_SCREENSHOT_ERROR_INVALID_SCREENSHOT_EXTENT (0x80111207) /*!< The specified rectangular screenshot area is invalid. */
#define SCE_UTILITY_SCREENSHOT_ERROR_POINTER_IS_NULL (0x80111208) /*!< Detected NULL pointer error. */
#define SCE_UTILITY_SCREENSHOT_ERROR_INVALID_IMAGE_TYPE (0x80111209) /*!< The specified image type is invalid. */
#define SCE_UTILITY_SCREENSHOT_ERROR_OPEN_FILE (0x8011120b)
#define SCE_UTILITY_SCREENSHOT_ERROR_CANT_WRITE_SCREENSHOT_IMAGE (0x8011120c)
#define SCE_UTILITY_SCREENSHOT_ERROR_LOAD_NO_MS (0x8011120d)
#define SCE_UTILITY_SCREENSHOT_ERROR_SAVE_MS_PROTECTED (0x8011120e)
#define SCE_UTILITY_SCREENSHOT_ERROR_FAILED_MAKE_SCREENSHOT_ROOT_DIR (0x8011120f)
#define SCE_UTILITY_SCREENSHOT_ERROR_FAILED_MAKE_SAVE_DIR (0x80111210)
#define SCE_UTILITY_SCREENSHOT_ERROR_FAILED_OPEN_SAVE_DIR (0x80111211)
#define SCE_UTILITY_SCREENSHOT_ERROR_FAILED_READ_SAVE_DIR_INFO (0x80111212)
#define SCE_UTILITY_SCREENSHOT_ERROR_INVALID_FILE_NAME (0x80111213)
#define SCE_UTILITY_SCREENSHOT_ERROR_LOAD_EJECT_MS (0x80111214)
#define SCE_UTILITY_SCREENSHOT_ERROR_SAVE_MS_NOSPACE (0x80111215)
#define SCE_UTILITY_SCREENSHOT_ERROR_SAVE_ACCESS_ERROR (0x80111216)
#define SCE_UTILITY_SCREENSHOT_ERROR_INVALID_FRAMEBUFFER (0x80111219)
#define SCE_UTILITY_SCREENSHOT_ERROR_INVALID_TITLE_ID (0x8011121b)
#define SCE_UTILITY_SCREENSHOT_ERROR_INVALID_BOOT_PARAM (0x8011121c)
#define SCE_UTILITY_SCREENSHOT_ERROR_NOT_FOUND_PSCMDAT_IMAGE_FILE (0x8011121d)
#define SCE_UTILITY_SCREENSHOT_ERROR_INVALID_FILE_SIZE (0x8011121e)
#define SCE_UTILITY_SCREENSHOT_ERROR_INVALID_PATH_SIZE (0x8011121f)
#define SCE_UTILITY_SCREENSHOT_ERROR_FAILED_OPEN_PSCMDAT (0x80111220)
#define SCE_UTILITY_SCREENSHOT_ERROR_FAILED_WRITE_PSCMDAT (0x80111221)
#define SCE_UTILITY_SCREENSHOT_ERROR_FAILED_OPEN_SRCFILE_FOR_PSCMDAT (0x80111222)
#define SCE_UTILITY_SCREENSHOT_ERROR_FAILED_READ_SRCFILE_FOR_PSCMDAT (0x80111223)
#define SCE_UTILITY_SCREENSHOT_ERROR_FAILED_SAVE_SCREENSHOT_WITH_NUMBER (0x80111224)
#define SCE_UTILITY_SCREENSHOT_ERROR_INVALID_COMMENT_PARAMS (0x80111225)
#define SCE_UTILITY_SCREENSHOT_ERROR_DETECTED_INVALID_STRING (0x80111226)
#define SCE_UTILITY_SCREENSHOT_ERROR_INVALID_UTILITY_TYPE (0x80111227)
#define SCE_UTILITY_SCREENSHOT_ERROR_INCOMPLETE_WRITING_IMAGE (0x80111228)
#define SCE_UTILITY_SCREENSHOT_ERROR_HAVE_NOT_CONT_MODE_START_YET (0x80111229)
#define SCE_UTILITY_SCREENSHOT_ERROR_LOAD_EJECT_MS2 (0x80111233)
#define SCE_UTILITY_SCREENSHOT_ERROR_NOT_FOUND_THE_TARGET_DIR_FOR_VIEW (0x8011123c)
#define SCE_UTILITY_SCREENSHOT_ERROR_FOUND_SAME_FILE_NAME (0x8011123d)
#define SCE_UTILITY_SCREENSHOT_ERROR_VAST_THE_MAX_NUMBER_OF_IMAGE_FILE (0x8011123e)
#define SCE_UTILITY_SCREENSHOT_ERROR_VIEW_ACCESS_ERROR (0x80111241)
#endif /* UTILITY_SCREENSHOT_H */

View File

@ -311,14 +311,14 @@ int sceAudioOutput(u32 chanId, int vol, void *buf)
{
dbg_printf("Running %s\n", __FUNCTION__);
if (vol > 0xFFFF)
return SCE_ERROR_AUDIO_INVALID_VOLUME;
return SCE_AUDIO_ERROR_INVALID_VOLUME;
if (chanId >= 8)
return SCE_ERROR_AUDIO_INVALID_CH;
return SCE_AUDIO_ERROR_INVALID_CH;
int oldK1 = pspShiftK1();
if (!pspK1StaBufOk(buf, g_audio.chans[chanId].sampleCount * 4)) {
// 0654
pspSetK1(oldK1);
return SCE_ERROR_AUDIO_PRIV_REQUIRED;
return SCE_AUDIO_ERROR_PRIV_REQUIRED;
}
int oldIntr = sceKernelCpuSuspendIntr();
int ret = audioOutput(&g_audio.chans[chanId], vol, vol, buf);
@ -331,20 +331,20 @@ int sceAudioOutputBlocking(u32 chanId, int vol, void *buf)
{
dbg_printf("Running %s\n", __FUNCTION__);
if (vol >= 0xFFFF)
return SCE_ERROR_AUDIO_INVALID_VOLUME;
return SCE_AUDIO_ERROR_INVALID_VOLUME;
if (chanId >= 8)
return SCE_ERROR_AUDIO_INVALID_CH;
return SCE_AUDIO_ERROR_INVALID_CH;
SceAudioChannel *chan = &g_audio.chans[chanId];
int oldK1 = pspShiftK1();
if (!pspK1StaBufOk(buf, chan->sampleCount * 4))
{
// 07D8
pspSetK1(oldK1);
return SCE_ERROR_AUDIO_PRIV_REQUIRED;
return SCE_AUDIO_ERROR_PRIV_REQUIRED;
}
int oldIntr = sceKernelCpuSuspendIntr();
int ret = audioOutput(chan, vol, vol, buf);
if ((u32)ret == SCE_ERROR_AUDIO_OUTPUT_BUSY)
if ((u32)ret == SCE_AUDIO_ERROR_OUTPUT_BUSY)
{
// 0758
if (chan->unk10 == 0)
@ -361,7 +361,7 @@ int sceAudioOutputBlocking(u32 chanId, int vol, void *buf)
}
oldIntr = sceKernelCpuSuspendIntr();
ret = audioOutput(chan, vol, vol, buf);
} while ((u32)ret == SCE_ERROR_AUDIO_OUTPUT_BUSY);
} while ((u32)ret == SCE_AUDIO_ERROR_OUTPUT_BUSY);
chan->unk10 = 0;
}
}
@ -374,16 +374,16 @@ int sceAudioOutputPanned(u32 chanId, int leftVol, int rightVol, void *buf)
{
dbg_printf("Running %s\n", __FUNCTION__);
if (rightVol > 0xFFFF || leftVol > 0xFFFF)
return SCE_ERROR_AUDIO_INVALID_VOLUME;
return SCE_AUDIO_ERROR_INVALID_VOLUME;
if (chanId >= 8)
return SCE_ERROR_AUDIO_INVALID_CH;
return SCE_AUDIO_ERROR_INVALID_CH;
SceAudioChannel *chan = &g_audio.chans[chanId];
int oldK1 = pspShiftK1();
if (!pspK1StaBufOk(buf, chan->sampleCount * 4))
{
// 08D4
pspSetK1(oldK1);
return SCE_ERROR_AUDIO_PRIV_REQUIRED;
return SCE_AUDIO_ERROR_PRIV_REQUIRED;
}
int oldIntr = sceKernelCpuSuspendIntr();
int ret = audioOutput(chan, leftVol, rightVol, buf);
@ -396,20 +396,20 @@ int sceAudioOutputPannedBlocking(u32 chanId, int leftVol, int rightVol, void *bu
{
dbg_printf("Running %s\n", __FUNCTION__);
if ((leftVol | rightVol) > 0xFFFF)
return SCE_ERROR_AUDIO_INVALID_VOLUME;
return SCE_AUDIO_ERROR_INVALID_VOLUME;
if (chanId >= 8)
return SCE_ERROR_AUDIO_INVALID_CH;
return SCE_AUDIO_ERROR_INVALID_CH;
SceAudioChannel *chan = &g_audio.chans[chanId];
int oldK1 = pspShiftK1();
if (!pspK1StaBufOk(buf, chan->sampleCount * 4))
{
// 0A9C
pspSetK1(oldK1);
return SCE_ERROR_AUDIO_PRIV_REQUIRED;
return SCE_AUDIO_ERROR_PRIV_REQUIRED;
}
int oldIntr = sceKernelCpuSuspendIntr();
int ret = audioOutput(chan, leftVol, rightVol, buf);
if ((u32)ret == SCE_ERROR_AUDIO_OUTPUT_BUSY)
if ((u32)ret == SCE_AUDIO_ERROR_OUTPUT_BUSY)
{
// 0A08
if (chan->unk10 == 0)
@ -426,7 +426,7 @@ int sceAudioOutputPannedBlocking(u32 chanId, int leftVol, int rightVol, void *bu
}
oldIntr = sceKernelCpuSuspendIntr();
ret = audioOutput(chan, leftVol, rightVol, buf);
} while ((u32)ret == SCE_ERROR_AUDIO_OUTPUT_BUSY);
} while ((u32)ret == SCE_AUDIO_ERROR_OUTPUT_BUSY);
chan->unk10 = 0;
}
}
@ -459,7 +459,7 @@ int sceAudioChReserve(int channel, int sampleCount, int format)
{
sceKernelCpuResumeIntr(oldIntr);
pspSetK1(oldK1);
return SCE_ERROR_AUDIO_NOT_FOUND;
return SCE_AUDIO_ERROR_NOT_FOUND;
}
}
else if (channel >= 8 || g_audio.chans[channel].sampleCount != 0)
@ -467,7 +467,7 @@ int sceAudioChReserve(int channel, int sampleCount, int format)
// 0B08
sceKernelCpuResumeIntr(oldIntr);
pspSetK1(oldK1);
return SCE_ERROR_AUDIO_INVALID_CH;
return SCE_AUDIO_ERROR_INVALID_CH;
}
// 0B38
if (sampleCount <= 0 || (sampleCount & 0x3F) != 0 || (u32)sampleCount > 0xFFC00000)
@ -475,7 +475,7 @@ int sceAudioChReserve(int channel, int sampleCount, int format)
// 0B58
sceKernelCpuResumeIntr(oldIntr);
pspSetK1(oldK1);
return SCE_ERROR_AUDIO_INVALID_SIZE;
return SCE_AUDIO_ERROR_INVALID_SIZE;
}
// 0B6C
char bytesPerSample = 4;
@ -487,7 +487,7 @@ int sceAudioChReserve(int channel, int sampleCount, int format)
// 0BAC
sceKernelCpuResumeIntr(oldIntr);
pspSetK1(oldK1);
return SCE_ERROR_AUDIO_INVALID_FORMAT;
return SCE_AUDIO_ERROR_INVALID_FORMAT;
}
}
// 0B8C
@ -510,7 +510,7 @@ int sceAudioOneshotOutput(int chanId, int sampleCount, int fmt, int leftVol, int
// 0E30
sceKernelCpuResumeIntr(oldIntr);
pspSetK1(oldK1);
return SCE_ERROR_AUDIO_INVALID_VOLUME;
return SCE_AUDIO_ERROR_INVALID_VOLUME;
}
if (chanId < 0)
{
@ -524,7 +524,7 @@ int sceAudioOneshotOutput(int chanId, int sampleCount, int fmt, int leftVol, int
{
sceKernelCpuResumeIntr(oldIntr);
pspSetK1(oldK1);
return SCE_ERROR_AUDIO_NOT_FOUND;
return SCE_AUDIO_ERROR_NOT_FOUND;
}
}
else if (chanId >= 8 || g_audio.chans[chanId].sampleCount != 0)
@ -532,7 +532,7 @@ int sceAudioOneshotOutput(int chanId, int sampleCount, int fmt, int leftVol, int
// 0CA4
sceKernelCpuResumeIntr(oldIntr);
pspSetK1(oldK1);
return SCE_ERROR_AUDIO_INVALID_CH;
return SCE_AUDIO_ERROR_INVALID_CH;
}
SceAudioChannel *chan = &g_audio.chans[chanId];
// 0CE4
@ -541,14 +541,14 @@ int sceAudioOneshotOutput(int chanId, int sampleCount, int fmt, int leftVol, int
// 0DC8
sceKernelCpuResumeIntr(oldIntr);
pspSetK1(oldK1);
return SCE_ERROR_AUDIO_INVALID_SIZE;
return SCE_AUDIO_ERROR_INVALID_SIZE;
}
if (!pspK1StaBufOk(buf, chan->sampleCount * 4))
{
// 0DB0
sceKernelCpuResumeIntr(oldIntr);
pspSetK1(oldK1);
return SCE_ERROR_AUDIO_PRIV_REQUIRED;
return SCE_AUDIO_ERROR_PRIV_REQUIRED;
}
char bytesPerSample = 4;
if (fmt != 0)
@ -559,7 +559,7 @@ int sceAudioOneshotOutput(int chanId, int sampleCount, int fmt, int leftVol, int
// 0D98
sceKernelCpuResumeIntr(oldIntr);
pspSetK1(oldK1);
return SCE_ERROR_AUDIO_INVALID_FORMAT;
return SCE_AUDIO_ERROR_INVALID_FORMAT;
}
}
// 0D28
@ -586,7 +586,7 @@ int sceAudioChRelease(u32 channel)
{
dbg_printf("Running %s\n", __FUNCTION__);
if (channel >= 8)
return SCE_ERROR_AUDIO_INVALID_CH;
return SCE_AUDIO_ERROR_INVALID_CH;
int oldK1 = pspShiftK1();
int oldIntr = sceKernelCpuSuspendIntr();
SceAudioChannel *chan = &g_audio.chans[channel];
@ -595,14 +595,14 @@ int sceAudioChRelease(u32 channel)
// 0EE4
sceKernelCpuResumeIntr(oldIntr);
pspSetK1(oldK1);
return SCE_ERROR_AUDIO_NOT_RESERVED;
return SCE_AUDIO_ERROR_NOT_RESERVED;
}
if (chan->unk10 != 0)
{
// 0ECC
sceKernelCpuResumeIntr(oldIntr);
pspSetK1(oldK1);
return SCE_ERROR_AUDIO_OUTPUT_BUSY;
return SCE_AUDIO_ERROR_OUTPUT_BUSY;
}
chan->sampleCount = 0;
sceKernelCpuResumeIntr(oldIntr);
@ -614,7 +614,7 @@ int sceAudioGetChannelRestLength(u32 chanId)
{
dbg_printf("Running %s\n", __FUNCTION__);
if (chanId >= 8)
return SCE_ERROR_AUDIO_INVALID_CH;
return SCE_AUDIO_ERROR_INVALID_CH;
SceAudioChannel *chan = &g_audio.chans[chanId];
// 0F30
return ((chan->buf != NULL) ? chan->curSampleCnt : 0) + ((chan->unk10 != 0) ? 0 : chan->sampleCount);
@ -624,9 +624,9 @@ int sceAudioSetChannelDataLen(u32 chanId, int sampleCount)
{
dbg_printf("Running %s\n", __FUNCTION__);
if (chanId >= 8)
return SCE_ERROR_AUDIO_INVALID_CH;
return SCE_AUDIO_ERROR_INVALID_CH;
if (sampleCount <= 0 || (sampleCount & 0x3F) != 0 || sampleCount > 0xFFC0)
return SCE_ERROR_AUDIO_INVALID_SIZE;
return SCE_AUDIO_ERROR_INVALID_SIZE;
// 0FB8
int oldK1 = pspShiftK1();
int oldIntr = sceKernelCpuSuspendIntr();
@ -636,14 +636,14 @@ int sceAudioSetChannelDataLen(u32 chanId, int sampleCount)
// 1018
sceKernelCpuResumeIntr(oldIntr);
pspSetK1(oldK1);
return SCE_ERROR_AUDIO_OUTPUT_BUSY;
return SCE_AUDIO_ERROR_OUTPUT_BUSY;
}
if (chan->sampleCount == 0)
{
// 1000
sceKernelCpuResumeIntr(oldIntr);
pspSetK1(oldK1);
return SCE_ERROR_AUDIO_NOT_INITIALIZED;
return SCE_AUDIO_ERROR_NOT_INITIALIZED;
}
chan->sampleCount = sampleCount & 0xFFFF;
pspSetK1(oldK1);
@ -654,9 +654,9 @@ int sceAudioChangeChannelVolume(u32 chanId, int leftVol, int rightVol)
{
dbg_printf("Running %s\n", __FUNCTION__);
if ((rightVol > 0xFFFF) || (leftVol > 0xFFFF))
return SCE_ERROR_AUDIO_INVALID_VOLUME;
return SCE_AUDIO_ERROR_INVALID_VOLUME;
if (chanId >= 8)
return SCE_ERROR_AUDIO_INVALID_CH;
return SCE_AUDIO_ERROR_INVALID_CH;
int oldK1 = pspShiftK1();
int oldIntr = sceKernelCpuSuspendIntr();
SceAudioChannel *chan = &g_audio.chans[chanId];
@ -675,7 +675,7 @@ int sceAudioChangeChannelConfig(u32 chanId, int format)
{
dbg_printf("Running %s\n", __FUNCTION__);
if (chanId >= 8)
return SCE_ERROR_AUDIO_INVALID_CH;
return SCE_AUDIO_ERROR_INVALID_CH;
int oldK1 = pspShiftK1();
int oldIntr = sceKernelCpuSuspendIntr();
SceAudioChannel *chan = &g_audio.chans[chanId];
@ -684,7 +684,7 @@ int sceAudioChangeChannelConfig(u32 chanId, int format)
// 116C
sceKernelCpuResumeIntr(oldIntr);
pspSetK1(oldK1);
return SCE_ERROR_AUDIO_OUTPUT_BUSY;
return SCE_AUDIO_ERROR_OUTPUT_BUSY;
}
// 1164
if ((sceKernelGetCompiledSdkVersion() > 0x01FFFFFF && (chan->curSampleCnt == 0 || chan->buf == NULL)) || chan->curSampleCnt == 0) // 1214
@ -692,7 +692,7 @@ int sceAudioChangeChannelConfig(u32 chanId, int format)
// 116C
sceKernelCpuResumeIntr(oldIntr);
pspSetK1(oldK1);
return SCE_ERROR_AUDIO_OUTPUT_BUSY;
return SCE_AUDIO_ERROR_OUTPUT_BUSY;
}
// 11A4
if (chan->sampleCount == 0)
@ -700,7 +700,7 @@ int sceAudioChangeChannelConfig(u32 chanId, int format)
// 11FC
sceKernelCpuResumeIntr(oldIntr);
pspSetK1(oldK1);
return SCE_ERROR_AUDIO_NOT_RESERVED;
return SCE_AUDIO_ERROR_NOT_RESERVED;
}
char bytesPerSample = 4;
if (format != 0)
@ -711,7 +711,7 @@ int sceAudioChangeChannelConfig(u32 chanId, int format)
// 11E4
sceKernelCpuResumeIntr(oldIntr);
pspSetK1(oldK1);
return SCE_ERROR_AUDIO_INVALID_FORMAT;
return SCE_AUDIO_ERROR_INVALID_FORMAT;
}
}
// 11CC
@ -725,13 +725,13 @@ int sceAudioOutput2ChangeLength(int sampleCount)
{
dbg_printf("Running %s\n", __FUNCTION__);
if (sampleCount < 17 || sampleCount > 4111)
return SCE_ERROR_AUDIO_INVALID_SIZE;
return SCE_AUDIO_ERROR_INVALID_SIZE;
int oldIntr = sceKernelCpuSuspendIntr();
if (g_audio.srcChFreq == 0)
{
// 1280
sceKernelCpuResumeIntr(oldIntr);
return SCE_ERROR_AUDIO_NOT_RESERVED;
return SCE_AUDIO_ERROR_NOT_RESERVED;
}
g_audio.srcChSampleCnt = sampleCount;
sceKernelCpuResumeIntr(oldIntr);
@ -743,7 +743,7 @@ int sceAudioOutput2GetRestSample(void)
dbg_printf("Running %s\n", __FUNCTION__);
int *ptr = KUNCACHED(&g_audio.hwBuf[16]);
if (g_audio.srcChFreq == 0)
return SCE_ERROR_AUDIO_NOT_RESERVED;
return SCE_AUDIO_ERROR_NOT_RESERVED;
// 12C8
return (ptr[ 2] != 0 ? g_audio.srcChSampleCnt : 0)
+ (ptr[10] != 0 ? g_audio.srcChSampleCnt : 0);
@ -753,7 +753,7 @@ int sceAudioGetChannelRestLen(u32 chanId)
{
dbg_printf("Running %s\n", __FUNCTION__);
if (chanId >= 8)
return SCE_ERROR_AUDIO_INVALID_CH;
return SCE_AUDIO_ERROR_INVALID_CH;
SceAudioChannel *chan = &g_audio.chans[chanId];
if (chan->unk10 == 0)
return chan->curSampleCnt;
@ -793,9 +793,9 @@ int audioOutput(SceAudioChannel *channel, short leftVol, short rightVol, void *b
{
dbg_printf("Running %s\n", __FUNCTION__);
if (channel->sampleCount == 0)
return SCE_ERROR_AUDIO_NOT_INITIALIZED;
return SCE_AUDIO_ERROR_NOT_INITIALIZED;
if (channel->buf != NULL)
return SCE_ERROR_AUDIO_OUTPUT_BUSY;
return SCE_AUDIO_ERROR_OUTPUT_BUSY;
channel->curSampleCnt = channel->sampleCount;
if (leftVol >= 0)
channel->leftVol = leftVol;
@ -828,7 +828,7 @@ int sceAudioSetFrequency(int freq)
hwFreq = 256;
else {
// 1504
return SCE_ERROR_AUDIO_INVALID_FREQUENCY;
return SCE_AUDIO_ERROR_INVALID_FREQUENCY;
}
// 1470
int oldIntr = sceKernelCpuSuspendIntr();
@ -1226,7 +1226,7 @@ int sceAudioSRCChReserve(int sampleCount, int freq, int numChans)
break;
default:
// 1EB4
return SCE_ERROR_AUDIO_INVALID_FREQUENCY;
return SCE_AUDIO_ERROR_INVALID_FREQUENCY;
}
}
// 1EDC
@ -1283,7 +1283,7 @@ int sceAudioSRCChRelease(void)
int *ptr = KUNCACHED(&g_audio.hwBuf[16]);
if (g_audio.srcChFreq == 0) {
sceKernelCpuResumeIntr(oldIntr);
return SCE_ERROR_AUDIO_NOT_RESERVED;
return SCE_AUDIO_ERROR_NOT_RESERVED;
}
// 20C0
if ((ptr[2] | ptr[10]) != 0) {
@ -1301,13 +1301,13 @@ int sceAudioSRCOutputBlocking(int vol, void *buf)
{
dbg_printf("Running %s\n", __FUNCTION__);
if (vol > 0xFFFFF)
return SCE_ERROR_AUDIO_INVALID_VOLUME;
return SCE_AUDIO_ERROR_INVALID_VOLUME;
int oldK1 = pspShiftK1();
if (!pspK1StaBufOk(buf, g_audio.srcChSampleCnt * g_audio.numChans))
{
// 224C
pspSetK1(oldK1);
return SCE_ERROR_AUDIO_PRIV_REQUIRED;
return SCE_AUDIO_ERROR_PRIV_REQUIRED;
}
int oldIntr = sceKernelCpuSuspendIntr();
int ret = audioSRCOutput(vol, buf);
@ -1351,11 +1351,11 @@ int audioSRCOutput(int vol, void *buf)
dbg_printf("Running %s\n", __FUNCTION__);
int *ptr = KUNCACHED(&g_audio.hwBuf[16]);
if (g_audio.srcChFreq == 0)
return SCE_ERROR_AUDIO_NOT_RESERVED;
return SCE_AUDIO_ERROR_NOT_RESERVED;
if (ptr[2] != 0)
{
if (ptr[10] != 0)
return SCE_ERROR_AUDIO_OUTPUT_BUSY;
return SCE_AUDIO_ERROR_OUTPUT_BUSY;
ptr += 8;
}
// 22C4
@ -1526,13 +1526,13 @@ int sceAudioWaitInputEnd()
dbg_printf("Running %s\n", __FUNCTION__);
int ret = 0;
if (g_audio.inputOrigSampleCnt == 0)
return SCE_ERROR_AUDIO_NOT_INITIALIZED;
return SCE_AUDIO_ERROR_NOT_INITIALIZED;
int oldIntr = sceKernelCpuSuspendIntr();
if (g_audio.inputIsWaiting != 0)
{
// 27AC
sceKernelCpuResumeIntr(oldIntr);
return SCE_ERROR_AUDIO_INPUT_BUSY;
return SCE_AUDIO_ERROR_INPUT_BUSY;
}
g_audio.inputIsWaiting = 1;
sceKernelCpuResumeIntr(oldIntr);
@ -1552,7 +1552,7 @@ int sceAudioInputInitEx(SceAudioInputParams *param)
int oldK1 = pspShiftK1();
if (!pspK1StaBufOk(param, 24)) {
pspSetK1(oldK1);
return SCE_ERROR_AUDIO_PRIV_REQUIRED;
return SCE_AUDIO_ERROR_PRIV_REQUIRED;
}
int ret = audioInputInit(param->unk0, param->gain, param->unk2, param->unk3, param->unk4, param->unk5);
pspSetK1(oldK1);
@ -1586,7 +1586,7 @@ int sceAudioGetInputLength()
dbg_printf("Running %s\n", __FUNCTION__);
int origSampleCount = g_audio.inputOrigSampleCnt;
if (origSampleCount == 0)
return SCE_ERROR_AUDIO_NOT_INITIALIZED;
return SCE_AUDIO_ERROR_NOT_INITIALIZED;
return origSampleCount - g_audio.inputCurSampleCnt;
}
@ -1675,7 +1675,7 @@ int audioInput(int sampleCount, int freq, void *buf)
return 0x80000001;
if (sampleCount <= 0 || (sampleCount & 0x3F) != 0) {
// 2AD8
return SCE_ERROR_AUDIO_INVALID_SIZE;
return SCE_AUDIO_ERROR_INVALID_SIZE;
}
int hwFreq;
// 2B08
@ -1694,7 +1694,7 @@ int audioInput(int sampleCount, int freq, void *buf)
break;
default:
// 2B24
return SCE_ERROR_AUDIO_INVALID_FREQUENCY;
return SCE_AUDIO_ERROR_INVALID_FREQUENCY;
}
// 2B30
if (buf == NULL)
@ -1709,7 +1709,7 @@ int audioInput(int sampleCount, int freq, void *buf)
{
// 2C5C
pspSetK1(oldK1);
return SCE_ERROR_AUDIO_PRIV_REQUIRED;
return SCE_AUDIO_ERROR_PRIV_REQUIRED;
}
int oldIntr = sceKernelCpuSuspendIntr();
if (g_audio.inputCurSampleCnt != 0)
@ -1717,7 +1717,7 @@ int audioInput(int sampleCount, int freq, void *buf)
// 2C44
sceKernelCpuResumeIntr(oldIntr);
pspSetK1(oldK1);
return SCE_ERROR_AUDIO_INPUT_BUSY;
return SCE_AUDIO_ERROR_INPUT_BUSY;
}
g_audio.inputBuf = buf;
g_audio.inputHwFreq = hwFreq;