1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-22 02:32:36 +01:00

Merge upstream

This commit is contained in:
S Gopal Rajagopal 2015-02-20 01:57:46 +05:30
commit 1356a17e84
28 changed files with 911 additions and 2443 deletions

View File

@ -33,7 +33,7 @@ extern "C" {
** used to make the header, and the header can be found at
** http://www.opengl.org/registry/
**
** Khronos $Revision: 28798 $ on $Date: 2014-10-30 03:27:48 -0700 (Thu, 30 Oct 2014) $
** Khronos $Revision: 29735 $ on $Date: 2015-02-02 19:00:01 -0800 (Mon, 02 Feb 2015) $
*/
#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
@ -53,7 +53,7 @@ extern "C" {
#define GLAPI extern
#endif
#define GL_GLEXT_VERSION 20141030
#define GL_GLEXT_VERSION 20150202
/* Generated C header for:
* API: gl
@ -2594,7 +2594,6 @@ GLAPI void APIENTRY glBindVertexBuffers (GLuint first, GLsizei count, const GLui
#define GL_MAX_COMBINED_CLIP_AND_CULL_DISTANCES 0x82FA
#define GL_TEXTURE_TARGET 0x1006
#define GL_QUERY_TARGET 0x82EA
#define GL_TEXTURE_BINDING 0x82EB
#define GL_GUILTY_CONTEXT_RESET 0x8253
#define GL_INNOCENT_CONTEXT_RESET 0x8254
#define GL_UNKNOWN_CONTEXT_RESET 0x8255
@ -2607,25 +2606,25 @@ GLAPI void APIENTRY glBindVertexBuffers (GLuint first, GLsizei count, const GLui
typedef void (APIENTRYP PFNGLCLIPCONTROLPROC) (GLenum origin, GLenum depth);
typedef void (APIENTRYP PFNGLCREATETRANSFORMFEEDBACKSPROC) (GLsizei n, GLuint *ids);
typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKBUFFERBASEPROC) (GLuint xfb, GLuint index, GLuint buffer);
typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKBUFFERRANGEPROC) (GLuint xfb, GLuint index, GLuint buffer, GLintptr offset, GLsizei size);
typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKBUFFERRANGEPROC) (GLuint xfb, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKIVPROC) (GLuint xfb, GLenum pname, GLint *param);
typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKI_VPROC) (GLuint xfb, GLenum pname, GLuint index, GLint *param);
typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKI64_VPROC) (GLuint xfb, GLenum pname, GLuint index, GLint64 *param);
typedef void (APIENTRYP PFNGLCREATEBUFFERSPROC) (GLsizei n, GLuint *buffers);
typedef void (APIENTRYP PFNGLNAMEDBUFFERSTORAGEPROC) (GLuint buffer, GLsizei size, const void *data, GLbitfield flags);
typedef void (APIENTRYP PFNGLNAMEDBUFFERDATAPROC) (GLuint buffer, GLsizei size, const void *data, GLenum usage);
typedef void (APIENTRYP PFNGLNAMEDBUFFERSUBDATAPROC) (GLuint buffer, GLintptr offset, GLsizei size, const void *data);
typedef void (APIENTRYP PFNGLCOPYNAMEDBUFFERSUBDATAPROC) (GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizei size);
typedef void (APIENTRYP PFNGLNAMEDBUFFERSTORAGEPROC) (GLuint buffer, GLsizeiptr size, const void *data, GLbitfield flags);
typedef void (APIENTRYP PFNGLNAMEDBUFFERDATAPROC) (GLuint buffer, GLsizeiptr size, const void *data, GLenum usage);
typedef void (APIENTRYP PFNGLNAMEDBUFFERSUBDATAPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, const void *data);
typedef void (APIENTRYP PFNGLCOPYNAMEDBUFFERSUBDATAPROC) (GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
typedef void (APIENTRYP PFNGLCLEARNAMEDBUFFERDATAPROC) (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void *data);
typedef void (APIENTRYP PFNGLCLEARNAMEDBUFFERSUBDATAPROC) (GLuint buffer, GLenum internalformat, GLintptr offset, GLsizei size, GLenum format, GLenum type, const void *data);
typedef void (APIENTRYP PFNGLCLEARNAMEDBUFFERSUBDATAPROC) (GLuint buffer, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data);
typedef void *(APIENTRYP PFNGLMAPNAMEDBUFFERPROC) (GLuint buffer, GLenum access);
typedef void *(APIENTRYP PFNGLMAPNAMEDBUFFERRANGEPROC) (GLuint buffer, GLintptr offset, GLsizei length, GLbitfield access);
typedef void *(APIENTRYP PFNGLMAPNAMEDBUFFERRANGEPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access);
typedef GLboolean (APIENTRYP PFNGLUNMAPNAMEDBUFFERPROC) (GLuint buffer);
typedef void (APIENTRYP PFNGLFLUSHMAPPEDNAMEDBUFFERRANGEPROC) (GLuint buffer, GLintptr offset, GLsizei length);
typedef void (APIENTRYP PFNGLFLUSHMAPPEDNAMEDBUFFERRANGEPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length);
typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPARAMETERIVPROC) (GLuint buffer, GLenum pname, GLint *params);
typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPARAMETERI64VPROC) (GLuint buffer, GLenum pname, GLint64 *params);
typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPOINTERVPROC) (GLuint buffer, GLenum pname, void **params);
typedef void (APIENTRYP PFNGLGETNAMEDBUFFERSUBDATAPROC) (GLuint buffer, GLintptr offset, GLsizei size, void *data);
typedef void (APIENTRYP PFNGLGETNAMEDBUFFERSUBDATAPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, void *data);
typedef void (APIENTRYP PFNGLCREATEFRAMEBUFFERSPROC) (GLsizei n, GLuint *framebuffers);
typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERRENDERBUFFERPROC) (GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERPARAMETERIPROC) (GLuint framebuffer, GLenum pname, GLint param);
@ -2650,7 +2649,7 @@ typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEPROC) (GLuint re
typedef void (APIENTRYP PFNGLGETNAMEDRENDERBUFFERPARAMETERIVPROC) (GLuint renderbuffer, GLenum pname, GLint *params);
typedef void (APIENTRYP PFNGLCREATETEXTURESPROC) (GLenum target, GLsizei n, GLuint *textures);
typedef void (APIENTRYP PFNGLTEXTUREBUFFERPROC) (GLuint texture, GLenum internalformat, GLuint buffer);
typedef void (APIENTRYP PFNGLTEXTUREBUFFERRANGEPROC) (GLuint texture, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizei size);
typedef void (APIENTRYP PFNGLTEXTUREBUFFERRANGEPROC) (GLuint texture, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);
typedef void (APIENTRYP PFNGLTEXTURESTORAGE1DPROC) (GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width);
typedef void (APIENTRYP PFNGLTEXTURESTORAGE2DPROC) (GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
typedef void (APIENTRYP PFNGLTEXTURESTORAGE3DPROC) (GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
@ -2730,25 +2729,25 @@ typedef void (APIENTRYP PFNGLTEXTUREBARRIERPROC) (void);
GLAPI void APIENTRY glClipControl (GLenum origin, GLenum depth);
GLAPI void APIENTRY glCreateTransformFeedbacks (GLsizei n, GLuint *ids);
GLAPI void APIENTRY glTransformFeedbackBufferBase (GLuint xfb, GLuint index, GLuint buffer);
GLAPI void APIENTRY glTransformFeedbackBufferRange (GLuint xfb, GLuint index, GLuint buffer, GLintptr offset, GLsizei size);
GLAPI void APIENTRY glTransformFeedbackBufferRange (GLuint xfb, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
GLAPI void APIENTRY glGetTransformFeedbackiv (GLuint xfb, GLenum pname, GLint *param);
GLAPI void APIENTRY glGetTransformFeedbacki_v (GLuint xfb, GLenum pname, GLuint index, GLint *param);
GLAPI void APIENTRY glGetTransformFeedbacki64_v (GLuint xfb, GLenum pname, GLuint index, GLint64 *param);
GLAPI void APIENTRY glCreateBuffers (GLsizei n, GLuint *buffers);
GLAPI void APIENTRY glNamedBufferStorage (GLuint buffer, GLsizei size, const void *data, GLbitfield flags);
GLAPI void APIENTRY glNamedBufferData (GLuint buffer, GLsizei size, const void *data, GLenum usage);
GLAPI void APIENTRY glNamedBufferSubData (GLuint buffer, GLintptr offset, GLsizei size, const void *data);
GLAPI void APIENTRY glCopyNamedBufferSubData (GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizei size);
GLAPI void APIENTRY glNamedBufferStorage (GLuint buffer, GLsizeiptr size, const void *data, GLbitfield flags);
GLAPI void APIENTRY glNamedBufferData (GLuint buffer, GLsizeiptr size, const void *data, GLenum usage);
GLAPI void APIENTRY glNamedBufferSubData (GLuint buffer, GLintptr offset, GLsizeiptr size, const void *data);
GLAPI void APIENTRY glCopyNamedBufferSubData (GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
GLAPI void APIENTRY glClearNamedBufferData (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void *data);
GLAPI void APIENTRY glClearNamedBufferSubData (GLuint buffer, GLenum internalformat, GLintptr offset, GLsizei size, GLenum format, GLenum type, const void *data);
GLAPI void APIENTRY glClearNamedBufferSubData (GLuint buffer, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data);
GLAPI void *APIENTRY glMapNamedBuffer (GLuint buffer, GLenum access);
GLAPI void *APIENTRY glMapNamedBufferRange (GLuint buffer, GLintptr offset, GLsizei length, GLbitfield access);
GLAPI void *APIENTRY glMapNamedBufferRange (GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access);
GLAPI GLboolean APIENTRY glUnmapNamedBuffer (GLuint buffer);
GLAPI void APIENTRY glFlushMappedNamedBufferRange (GLuint buffer, GLintptr offset, GLsizei length);
GLAPI void APIENTRY glFlushMappedNamedBufferRange (GLuint buffer, GLintptr offset, GLsizeiptr length);
GLAPI void APIENTRY glGetNamedBufferParameteriv (GLuint buffer, GLenum pname, GLint *params);
GLAPI void APIENTRY glGetNamedBufferParameteri64v (GLuint buffer, GLenum pname, GLint64 *params);
GLAPI void APIENTRY glGetNamedBufferPointerv (GLuint buffer, GLenum pname, void **params);
GLAPI void APIENTRY glGetNamedBufferSubData (GLuint buffer, GLintptr offset, GLsizei size, void *data);
GLAPI void APIENTRY glGetNamedBufferSubData (GLuint buffer, GLintptr offset, GLsizeiptr size, void *data);
GLAPI void APIENTRY glCreateFramebuffers (GLsizei n, GLuint *framebuffers);
GLAPI void APIENTRY glNamedFramebufferRenderbuffer (GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
GLAPI void APIENTRY glNamedFramebufferParameteri (GLuint framebuffer, GLenum pname, GLint param);
@ -2773,7 +2772,7 @@ GLAPI void APIENTRY glNamedRenderbufferStorageMultisample (GLuint renderbuffer,
GLAPI void APIENTRY glGetNamedRenderbufferParameteriv (GLuint renderbuffer, GLenum pname, GLint *params);
GLAPI void APIENTRY glCreateTextures (GLenum target, GLsizei n, GLuint *textures);
GLAPI void APIENTRY glTextureBuffer (GLuint texture, GLenum internalformat, GLuint buffer);
GLAPI void APIENTRY glTextureBufferRange (GLuint texture, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizei size);
GLAPI void APIENTRY glTextureBufferRange (GLuint texture, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);
GLAPI void APIENTRY glTextureStorage1D (GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width);
GLAPI void APIENTRY glTextureStorage2D (GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
GLAPI void APIENTRY glTextureStorage3D (GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
@ -9554,13 +9553,11 @@ GLAPI void APIENTRY glProgramBufferParametersIuivNV (GLenum target, GLuint bindi
#define GL_SKIP_MISSING_GLYPH_NV 0x90A9
#define GL_USE_MISSING_GLYPH_NV 0x90AA
#define GL_PATH_ERROR_POSITION_NV 0x90AB
#define GL_PATH_FOG_GEN_MODE_NV 0x90AC
#define GL_ACCUM_ADJACENT_PAIRS_NV 0x90AD
#define GL_ADJACENT_PAIRS_NV 0x90AE
#define GL_FIRST_TO_REST_NV 0x90AF
#define GL_PATH_GEN_MODE_NV 0x90B0
#define GL_PATH_GEN_COEFF_NV 0x90B1
#define GL_PATH_GEN_COLOR_FORMAT_NV 0x90B2
#define GL_PATH_GEN_COMPONENTS_NV 0x90B3
#define GL_PATH_STENCIL_FUNC_NV 0x90B7
#define GL_PATH_STENCIL_REF_NV 0x90B8
@ -9629,8 +9626,6 @@ GLAPI void APIENTRY glProgramBufferParametersIuivNV (GLenum target, GLuint bindi
#define GL_FONT_UNDERLINE_POSITION_BIT_NV 0x04000000
#define GL_FONT_UNDERLINE_THICKNESS_BIT_NV 0x08000000
#define GL_FONT_HAS_KERNING_BIT_NV 0x10000000
#define GL_PRIMARY_COLOR_NV 0x852C
#define GL_SECONDARY_COLOR_NV 0x852D
#define GL_ROUNDED_RECT_NV 0xE8
#define GL_RELATIVE_ROUNDED_RECT_NV 0xE9
#define GL_ROUNDED_RECT2_NV 0xEA
@ -9654,6 +9649,10 @@ GLAPI void APIENTRY glProgramBufferParametersIuivNV (GLenum target, GLuint bindi
#define GL_EYE_LINEAR_NV 0x2400
#define GL_OBJECT_LINEAR_NV 0x2401
#define GL_CONSTANT_NV 0x8576
#define GL_PATH_FOG_GEN_MODE_NV 0x90AC
#define GL_PRIMARY_COLOR_NV 0x852C
#define GL_SECONDARY_COLOR_NV 0x852D
#define GL_PATH_GEN_COLOR_FORMAT_NV 0x90B2
#define GL_PATH_PROJECTION_NV 0x1701
#define GL_PATH_MODELVIEW_NV 0x1700
#define GL_PATH_MODELVIEW_STACK_DEPTH_NV 0x0BA3
@ -9691,9 +9690,6 @@ typedef void (APIENTRYP PFNGLSTENCILSTROKEPATHNVPROC) (GLuint path, GLint refere
typedef void (APIENTRYP PFNGLSTENCILFILLPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum transformType, const GLfloat *transformValues);
typedef void (APIENTRYP PFNGLSTENCILSTROKEPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLint reference, GLuint mask, GLenum transformType, const GLfloat *transformValues);
typedef void (APIENTRYP PFNGLPATHCOVERDEPTHFUNCNVPROC) (GLenum func);
typedef void (APIENTRYP PFNGLPATHCOLORGENNVPROC) (GLenum color, GLenum genMode, GLenum colorFormat, const GLfloat *coeffs);
typedef void (APIENTRYP PFNGLPATHTEXGENNVPROC) (GLenum texCoordSet, GLenum genMode, GLint components, const GLfloat *coeffs);
typedef void (APIENTRYP PFNGLPATHFOGGENNVPROC) (GLenum genMode);
typedef void (APIENTRYP PFNGLCOVERFILLPATHNVPROC) (GLuint path, GLenum coverMode);
typedef void (APIENTRYP PFNGLCOVERSTROKEPATHNVPROC) (GLuint path, GLenum coverMode);
typedef void (APIENTRYP PFNGLCOVERFILLPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues);
@ -9706,10 +9702,6 @@ typedef void (APIENTRYP PFNGLGETPATHDASHARRAYNVPROC) (GLuint path, GLfloat *dash
typedef void (APIENTRYP PFNGLGETPATHMETRICSNVPROC) (GLbitfield metricQueryMask, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLsizei stride, GLfloat *metrics);
typedef void (APIENTRYP PFNGLGETPATHMETRICRANGENVPROC) (GLbitfield metricQueryMask, GLuint firstPathName, GLsizei numPaths, GLsizei stride, GLfloat *metrics);
typedef void (APIENTRYP PFNGLGETPATHSPACINGNVPROC) (GLenum pathListMode, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLfloat advanceScale, GLfloat kerningScale, GLenum transformType, GLfloat *returnedSpacing);
typedef void (APIENTRYP PFNGLGETPATHCOLORGENIVNVPROC) (GLenum color, GLenum pname, GLint *value);
typedef void (APIENTRYP PFNGLGETPATHCOLORGENFVNVPROC) (GLenum color, GLenum pname, GLfloat *value);
typedef void (APIENTRYP PFNGLGETPATHTEXGENIVNVPROC) (GLenum texCoordSet, GLenum pname, GLint *value);
typedef void (APIENTRYP PFNGLGETPATHTEXGENFVNVPROC) (GLenum texCoordSet, GLenum pname, GLfloat *value);
typedef GLboolean (APIENTRYP PFNGLISPOINTINFILLPATHNVPROC) (GLuint path, GLuint mask, GLfloat x, GLfloat y);
typedef GLboolean (APIENTRYP PFNGLISPOINTINSTROKEPATHNVPROC) (GLuint path, GLfloat x, GLfloat y);
typedef GLfloat (APIENTRYP PFNGLGETPATHLENGTHNVPROC) (GLuint path, GLsizei startSegment, GLsizei numSegments);
@ -9729,6 +9721,13 @@ typedef GLenum (APIENTRYP PFNGLPATHGLYPHINDEXARRAYNVPROC) (GLuint firstPathName,
typedef GLenum (APIENTRYP PFNGLPATHMEMORYGLYPHINDEXARRAYNVPROC) (GLuint firstPathName, GLenum fontTarget, GLsizeiptr fontSize, const void *fontData, GLsizei faceIndex, GLuint firstGlyphIndex, GLsizei numGlyphs, GLuint pathParameterTemplate, GLfloat emScale);
typedef void (APIENTRYP PFNGLPROGRAMPATHFRAGMENTINPUTGENNVPROC) (GLuint program, GLint location, GLenum genMode, GLint components, const GLfloat *coeffs);
typedef void (APIENTRYP PFNGLGETPROGRAMRESOURCEFVNVPROC) (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLfloat *params);
typedef void (APIENTRYP PFNGLPATHCOLORGENNVPROC) (GLenum color, GLenum genMode, GLenum colorFormat, const GLfloat *coeffs);
typedef void (APIENTRYP PFNGLPATHTEXGENNVPROC) (GLenum texCoordSet, GLenum genMode, GLint components, const GLfloat *coeffs);
typedef void (APIENTRYP PFNGLPATHFOGGENNVPROC) (GLenum genMode);
typedef void (APIENTRYP PFNGLGETPATHCOLORGENIVNVPROC) (GLenum color, GLenum pname, GLint *value);
typedef void (APIENTRYP PFNGLGETPATHCOLORGENFVNVPROC) (GLenum color, GLenum pname, GLfloat *value);
typedef void (APIENTRYP PFNGLGETPATHTEXGENIVNVPROC) (GLenum texCoordSet, GLenum pname, GLint *value);
typedef void (APIENTRYP PFNGLGETPATHTEXGENFVNVPROC) (GLenum texCoordSet, GLenum pname, GLfloat *value);
#ifdef GL_GLEXT_PROTOTYPES
GLAPI GLuint APIENTRY glGenPathsNV (GLsizei range);
GLAPI void APIENTRY glDeletePathsNV (GLuint path, GLsizei range);
@ -9756,9 +9755,6 @@ GLAPI void APIENTRY glStencilStrokePathNV (GLuint path, GLint reference, GLuint
GLAPI void APIENTRY glStencilFillPathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum transformType, const GLfloat *transformValues);
GLAPI void APIENTRY glStencilStrokePathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLint reference, GLuint mask, GLenum transformType, const GLfloat *transformValues);
GLAPI void APIENTRY glPathCoverDepthFuncNV (GLenum func);
GLAPI void APIENTRY glPathColorGenNV (GLenum color, GLenum genMode, GLenum colorFormat, const GLfloat *coeffs);
GLAPI void APIENTRY glPathTexGenNV (GLenum texCoordSet, GLenum genMode, GLint components, const GLfloat *coeffs);
GLAPI void APIENTRY glPathFogGenNV (GLenum genMode);
GLAPI void APIENTRY glCoverFillPathNV (GLuint path, GLenum coverMode);
GLAPI void APIENTRY glCoverStrokePathNV (GLuint path, GLenum coverMode);
GLAPI void APIENTRY glCoverFillPathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues);
@ -9771,10 +9767,6 @@ GLAPI void APIENTRY glGetPathDashArrayNV (GLuint path, GLfloat *dashArray);
GLAPI void APIENTRY glGetPathMetricsNV (GLbitfield metricQueryMask, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLsizei stride, GLfloat *metrics);
GLAPI void APIENTRY glGetPathMetricRangeNV (GLbitfield metricQueryMask, GLuint firstPathName, GLsizei numPaths, GLsizei stride, GLfloat *metrics);
GLAPI void APIENTRY glGetPathSpacingNV (GLenum pathListMode, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLfloat advanceScale, GLfloat kerningScale, GLenum transformType, GLfloat *returnedSpacing);
GLAPI void APIENTRY glGetPathColorGenivNV (GLenum color, GLenum pname, GLint *value);
GLAPI void APIENTRY glGetPathColorGenfvNV (GLenum color, GLenum pname, GLfloat *value);
GLAPI void APIENTRY glGetPathTexGenivNV (GLenum texCoordSet, GLenum pname, GLint *value);
GLAPI void APIENTRY glGetPathTexGenfvNV (GLenum texCoordSet, GLenum pname, GLfloat *value);
GLAPI GLboolean APIENTRY glIsPointInFillPathNV (GLuint path, GLuint mask, GLfloat x, GLfloat y);
GLAPI GLboolean APIENTRY glIsPointInStrokePathNV (GLuint path, GLfloat x, GLfloat y);
GLAPI GLfloat APIENTRY glGetPathLengthNV (GLuint path, GLsizei startSegment, GLsizei numSegments);
@ -9794,6 +9786,13 @@ GLAPI GLenum APIENTRY glPathGlyphIndexArrayNV (GLuint firstPathName, GLenum font
GLAPI GLenum APIENTRY glPathMemoryGlyphIndexArrayNV (GLuint firstPathName, GLenum fontTarget, GLsizeiptr fontSize, const void *fontData, GLsizei faceIndex, GLuint firstGlyphIndex, GLsizei numGlyphs, GLuint pathParameterTemplate, GLfloat emScale);
GLAPI void APIENTRY glProgramPathFragmentInputGenNV (GLuint program, GLint location, GLenum genMode, GLint components, const GLfloat *coeffs);
GLAPI void APIENTRY glGetProgramResourcefvNV (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLfloat *params);
GLAPI void APIENTRY glPathColorGenNV (GLenum color, GLenum genMode, GLenum colorFormat, const GLfloat *coeffs);
GLAPI void APIENTRY glPathTexGenNV (GLenum texCoordSet, GLenum genMode, GLint components, const GLfloat *coeffs);
GLAPI void APIENTRY glPathFogGenNV (GLenum genMode);
GLAPI void APIENTRY glGetPathColorGenivNV (GLenum color, GLenum pname, GLint *value);
GLAPI void APIENTRY glGetPathColorGenfvNV (GLenum color, GLenum pname, GLfloat *value);
GLAPI void APIENTRY glGetPathTexGenivNV (GLenum texCoordSet, GLenum pname, GLint *value);
GLAPI void APIENTRY glGetPathTexGenfvNV (GLenum texCoordSet, GLenum pname, GLfloat *value);
#endif
#endif /* GL_NV_path_rendering */
@ -10820,6 +10819,10 @@ GLAPI void APIENTRY glVideoCaptureStreamParameterdvNV (GLuint video_capture_slot
#endif
#endif /* GL_NV_video_capture */
#ifndef GL_NV_viewport_array2
#define GL_NV_viewport_array2 1
#endif /* GL_NV_viewport_array2 */
#ifndef GL_OML_interlace
#define GL_OML_interlace 1
#define GL_INTERLACE_OML 0x8980
@ -11398,10 +11401,10 @@ GLAPI void APIENTRY glReferencePlaneSGIX (const GLdouble *equation);
#ifndef GL_SGIX_resample
#define GL_SGIX_resample 1
#define GL_PACK_RESAMPLE_SGIX 0x842C
#define GL_UNPACK_RESAMPLE_SGIX 0x842D
#define GL_RESAMPLE_REPLICATE_SGIX 0x842E
#define GL_RESAMPLE_ZERO_FILL_SGIX 0x842F
#define GL_PACK_RESAMPLE_SGIX 0x842E
#define GL_UNPACK_RESAMPLE_SGIX 0x842F
#define GL_RESAMPLE_REPLICATE_SGIX 0x8433
#define GL_RESAMPLE_ZERO_FILL_SGIX 0x8434
#define GL_RESAMPLE_DECIMATE_SGIX 0x8430
#endif /* GL_SGIX_resample */

View File

@ -270,7 +270,7 @@ void decode_x64_reg_op(const u8* code, x64_op_t& out_op, x64_reg_t& out_reg, siz
{
case 0x7f:
{
if (repe && !oso) // MOVDQU xmm/m, xmm
if ((repe && !oso) || (!repe && oso)) // MOVDQU/MOVDQA xmm/m, xmm
{
out_op = X64OP_STORE;
out_reg = get_modRM_reg_xmm(code, rex);

View File

@ -28,22 +28,22 @@ public:
double GetElapsedTimeInSec() const
{
return GetElapsedTimeInMicroSec() / 1000000.0;
return double(GetElapsedTimeInMicroSec()) / 1000000.0;
}
double GetElapsedTimeInMilliSec() const
{
return GetElapsedTimeInMicroSec() / 1000.0;
return double(GetElapsedTimeInMicroSec()) / 1000.0;
}
double GetElapsedTimeInMicroSec() const
u64 GetElapsedTimeInMicroSec() const
{
std::chrono::high_resolution_clock::time_point now = m_stopped ? m_end : std::chrono::high_resolution_clock::now();
return std::chrono::duration_cast<std::chrono::microseconds>(now - m_start).count();
}
double GetElapsedTimeInNanoSec() const
u64 GetElapsedTimeInNanoSec() const
{
std::chrono::high_resolution_clock::time_point now = m_stopped ? m_end : std::chrono::high_resolution_clock::now();

View File

@ -42,6 +42,17 @@ if (APPLE)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -I/opt/X11/include")
endif()
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
#on some Linux distros shm_unlink and similar functions are in librt only
set(ADDITIONAL_LIBS "rt")
elseif(UNIX)
#it seems like glibc includes the iconv functions we use but other libc
#implementations like the one on OSX don't seem implement them
set(ADDITIONAL_LIBS "iconv")
else()
set(ADDITIONAL_LIBS "")
endif()
If( NOT RPCS3_SRC_DIR)
SET(RPCS3_SRC_DIR ${CMAKE_CURRENT_LIST_DIR})
Message("-- Initializing RPCS3_SRC_DIR=${RPCS3_SRC_DIR}")
@ -120,7 +131,7 @@ set_source_files_properties(${RPCS3_SRC_DIR}/Emu/Cell/PPULLVMRecompiler.cpp PROP
add_executable(rpcs3 ${RPCS3_SRC})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -L${CMAKE_CURRENT_BINARY_DIR}/../asmjit/") #hack because the asmjit cmake file force fno exceptions
target_link_libraries(rpcs3 asmjit.a ${wxWidgets_LIBRARIES} ${OPENAL_LIBRARY} ${GLEW_LIBRARY} ${OPENGL_LIBRARIES} libavformat.a libavcodec.a libavutil.a libswresample.a libswscale.a ${ZLIB_LIBRARIES} ${LLVM_LIBS} rt)
target_link_libraries(rpcs3 asmjit.a ${wxWidgets_LIBRARIES} ${OPENAL_LIBRARY} ${GLEW_LIBRARY} ${OPENGL_LIBRARIES} libavformat.a libavcodec.a libavutil.a libswresample.a libswscale.a ${ZLIB_LIBRARIES} ${LLVM_LIBS} ${ADDITIONAL_LIBS} )
set_target_properties(rpcs3 PROPERTIES COTIRE_CXX_PREFIX_HEADER_INIT "${RPCS3_SRC_DIR}/stdafx.h")
cotire(rpcs3)

View File

@ -1286,17 +1286,10 @@ void armv7_decoder_initialize(u32 addr, u32 end_addr, bool dump)
// possibly a call to imported function:
if (target >= end_addr && ((target - end_addr) % 16) == 0 && (instr & 0xfff000f0) == 0xe0700090)
{
// check if implemented
if (const u32 func = (instr & 0xfff00) >> 4 | (instr & 0xf))
{
// replace BLX with "HACK" instruction directly (in Thumb form), it can help to see where it was called from
vm::psv::write32(addr, 0xf870 | func << 16);
g_opct[0xf8700000 | func] = g_op4t.HACK();
}
else
{
// leave as is if unimplemented
}
// replace BLX with "HACK" instruction directly (in Thumb form), it can help to see where it was called from
const u32 index = (instr & 0xfff00) >> 4 | (instr & 0xf);
vm::psv::write32(addr, 0xf870 | index << 16);
g_opct[0xf8700000 | index] = g_op4t.HACK();
}
else
{

View File

@ -503,20 +503,20 @@ void ARMv7_instrs::UNK(ARMv7Context& context, const ARMv7Code code)
void ARMv7_instrs::HACK(ARMv7Context& context, const ARMv7Code code, const ARMv7_encoding type)
{
u32 cond, func;
u32 cond, index;
switch (type)
{
case T1:
{
cond = context.ITSTATE.advance();
func = code.data & 0xffff;
index = code.data & 0xffff;
break;
}
case A1:
{
cond = code.data >> 28;
func = (code.data & 0xfff00) >> 4 | (code.data & 0xf);
index = (code.data & 0xfff00) >> 4 | (code.data & 0xf);
break;
}
default: throw __FUNCTION__;
@ -524,13 +524,30 @@ void ARMv7_instrs::HACK(ARMv7Context& context, const ARMv7Code code, const ARMv7
if (context.debug)
{
if (context.debug & DF_DISASM) context.debug_str = fmt::format("hack%s %s", fmt_cond(cond), get_psv_func_by_index(func)->name);
if (context.debug & DF_DISASM)
{
if (auto func = get_psv_func_by_index(index))
{
if (func->func)
{
context.debug_str = fmt::format("hack%s %s", fmt_cond(cond), func->name);
}
else
{
context.debug_str = fmt::format("hack%s UNIMPLEMENTED:0x%08X (%s)", fmt_cond(cond), func->nid, func->name);
}
}
else
{
context.debug_str = fmt::format("hack%s %d", fmt_cond(cond), index);
}
}
if (process_debug(context)) return;
}
if (ConditionPassed(context, cond))
{
execute_psv_func_by_index(context, func);
execute_psv_func_by_index(context, index);
}
}

View File

@ -5,30 +5,50 @@
std::vector<psv_func> g_psv_func_list;
std::vector<psv_log_base*> g_psv_modules;
void add_psv_func(psv_func& data)
u32 add_psv_func(psv_func data)
{
for (auto& f : g_psv_func_list)
{
if (f.nid == data.nid && &f - g_psv_func_list.data() >= 2 /* special functions count */)
if (f.nid == data.nid)
{
const u32 index = (u32)(&f - g_psv_func_list.data());
if (index < SFI_MAX)
{
continue;
}
if (data.func)
{
f.func = data.func;
}
return;
return index;
}
}
g_psv_func_list.push_back(data);
return (u32)(g_psv_func_list.size() - 1);
}
const psv_func* get_psv_func_by_nid(u32 nid)
psv_func* get_psv_func_by_nid(u32 nid, u32* out_index)
{
for (auto& f : g_psv_func_list)
{
if (f.nid == nid && &f - g_psv_func_list.data() >= 2 /* special functions count */)
if (f.nid == nid && &f - g_psv_func_list.data())
{
const u32 index = (u32)(&f - g_psv_func_list.data());
if (index < SFI_MAX)
{
continue;
}
if (out_index)
{
*out_index = index;
}
return &f;
}
}
@ -36,19 +56,7 @@ const psv_func* get_psv_func_by_nid(u32 nid)
return nullptr;
}
u32 get_psv_func_index(const psv_func* func)
{
auto res = func - g_psv_func_list.data();
if ((size_t)res >= g_psv_func_list.size())
{
throw __FUNCTION__;
}
return (u32)res;
}
const psv_func* get_psv_func_by_index(u32 index)
psv_func* get_psv_func_by_index(u32 index)
{
if (index >= g_psv_func_list.size())
{
@ -210,24 +218,15 @@ void initialize_psv_modules()
g_psv_modules.push_back(&sceXml);
// setup special functions (without NIDs)
psv_func unimplemented;
unimplemented.nid = 0;
unimplemented.name = "UNIMPLEMENTED";
unimplemented.func.reset(new psv_func_detail::func_binder<void, ARMv7Context&>([](ARMv7Context& context)
{
context.thread.m_last_syscall = vm::psv::read32(context.thread.PC + 4);
throw "Unimplemented function";
}));
g_psv_func_list.push_back(unimplemented);
g_psv_func_list.resize(SFI_MAX);
psv_func hle_return;
hle_return.nid = 1;
psv_func& hle_return = g_psv_func_list[SFI_HLE_RETURN];
hle_return.nid = 0;
hle_return.name = "HLE_RETURN";
hle_return.func.reset(new psv_func_detail::func_binder<void, ARMv7Context&>([](ARMv7Context& context)
{
context.thread.FastStop();
}));
g_psv_func_list.push_back(hle_return);
// load functions
for (auto module : g_psv_modules)

View File

@ -478,8 +478,15 @@ struct psv_func
psv_log_base* module; // Module for information
};
enum psv_special_function_index : u16
{
SFI_HLE_RETURN,
SFI_MAX
};
// Do not call directly
void add_psv_func(psv_func& data);
u32 add_psv_func(psv_func data);
// Do not call directly
template<typename RT, typename... T> void reg_psv_func(u32 nid, psv_log_base* module, const char* name, RT(*func)(T...))
{
@ -491,12 +498,10 @@ template<typename RT, typename... T> void reg_psv_func(u32 nid, psv_log_base* mo
add_psv_func(f);
}
// Find registered HLE function by its ID
const psv_func* get_psv_func_by_nid(u32 nid);
// Get index of registered HLE function
u32 get_psv_func_index(const psv_func* func);
// Find registered HLE function by NID
psv_func* get_psv_func_by_nid(u32 nid, u32* out_index = nullptr);
// Find registered HLE function by its index
const psv_func* get_psv_func_by_index(u32 index);
psv_func* get_psv_func_by_index(u32 index);
// Execute registered HLE function by its index
void execute_psv_func_by_index(ARMv7Context& context, u32 index);
// Register all HLE functions

View File

@ -189,7 +189,7 @@ u64 PPUThread::GetStackArg(s32 i)
return vm::read64(vm::cast(GPR[1] + 0x70 + 0x8 * (i - 9)));
}
u64 PPUThread::FastCall2(u32 addr, u32 rtoc)
void PPUThread::FastCall2(u32 addr, u32 rtoc)
{
auto old_status = m_status;
auto old_PC = PC;
@ -212,8 +212,6 @@ u64 PPUThread::FastCall2(u32 addr, u32 rtoc)
GPR[2] = old_rtoc;
LR = old_LR;
SetCurrentNamedThread(old_thread);
return GPR[3];
}
void PPUThread::FastStop()

View File

@ -793,13 +793,27 @@ public:
return false;
}
u64 get_next_gpr_arg(u32& g_count, u32& f_count, u32& v_count)
{
assert(!f_count && !v_count); // not supported
if (g_count < 8)
{
return GPR[g_count++ + 3];
}
else
{
return GetStackArg(++g_count);
}
}
public:
virtual void InitRegs() override;
virtual void InitStack() override;
virtual void CloseStack() override;
virtual void Task() override;
u64 GetStackArg(s32 i);
u64 FastCall2(u32 addr, u32 rtoc);
void FastCall2(u32 addr, u32 rtoc);
void FastStop();
virtual void DoRun() override;

View File

@ -10,9 +10,9 @@ GLProgram::GLProgram() : id(0)
int GLProgram::GetLocation(const std::string& name)
{
for(u32 i=0; i<m_locations.size(); ++i)
for (u32 i=0; i < m_locations.size(); ++i)
{
if(!m_locations[i].name.compare(name))
if (!m_locations[i].name.compare(name))
{
return m_locations[i].loc;
}
@ -34,7 +34,9 @@ bool GLProgram::IsCreated() const
void GLProgram::Create(const u32 vp, const u32 fp)
{
if(IsCreated()) Delete();
if (IsCreated())
Delete();
id = glCreateProgram();
glAttachShader(id, vp);
@ -44,14 +46,14 @@ void GLProgram::Create(const u32 vp, const u32 fp)
GLint linkStatus = GL_FALSE;
glGetProgramiv(id, GL_LINK_STATUS, &linkStatus);
if(linkStatus != GL_TRUE)
if (linkStatus != GL_TRUE)
{
GLint bufLength = 0;
glGetProgramiv(id, GL_INFO_LOG_LENGTH, &bufLength);
if (bufLength)
{
char* buf = new char[bufLength+1]();
char* buf = new char[bufLength + 1]();
glGetProgramInfoLog(id, bufLength, NULL, buf);
LOG_ERROR(RSX, "Could not link program: %s", buf);
delete[] buf;
@ -59,10 +61,10 @@ void GLProgram::Create(const u32 vp, const u32 fp)
return;
}
}
//else LOG_NOTICE(HLE, "program linked!");
//else LOG_NOTICE(HLE, "Program linked!");
glGetProgramiv(id, GL_VALIDATE_STATUS, &linkStatus);
if(linkStatus != GL_TRUE)
if (linkStatus != GL_TRUE)
{
GLint bufLength = 0;
glGetProgramiv(id, GL_INFO_LOG_LENGTH, &bufLength);
@ -87,7 +89,8 @@ void GLProgram::UnUse()
void GLProgram::Use()
{
glUseProgram(id);
if (id != 0)
glUseProgram(id);
checkForGlError("glUseProgram");
}
@ -107,7 +110,9 @@ void GLProgram::SetVTex(u32 index)
void GLProgram::Delete()
{
if(!IsCreated()) return;
if (!IsCreated())
return;
glDeleteProgram(id);
id = 0;
m_locations.clear();

View File

@ -1,7 +1,9 @@
#include "stdafx.h"
#include "Utilities/Log.h"
#include "Emu/Memory/Memory.h"
#include "Emu/System.h"
#include "Emu/SysCalls/Modules.h"
#include "Emu/SysCalls/SysCalls.h"
#include "Emu/SysCalls/Static.h"
#include "Emu/SysCalls/CB_FUNC.h"
#include "Crypto/sha1.h"
@ -84,7 +86,8 @@ void execute_ps3_func_by_index(PPUThread& CPU, u32 index)
}
else
{
throw "Unimplemented function";
LOG_ERROR(HLE, "Unimplemented function %s", SysCalls::GetHLEFuncName(func->id));
CPU.GPR[3] = 0;
}
CPU.m_last_syscall = old_last_syscall;

View File

@ -179,4 +179,4 @@ void fix_relocs(Module* module, u32 lib, u32 start, u32 end, u32 seg2);
#define REG_FUNC(module, name) module.AddFunc(get_function_id(#name), name)
#define UNIMPLEMENTED_FUNC(module) module.Fatal("%s", __FUNCTION__)
#define UNIMPLEMENTED_FUNC(module) module.Error("%s", __FUNCTION__)

View File

@ -7,65 +7,44 @@ extern Module cellAtrac;
#include "cellAtrac.h"
#ifdef PRX_DEBUG
#include "prx_libatrac3plus.h"
u32 libatrac3plus;
u32 libatrac3plus_rtoc;
#endif
s64 cellAtracSetDataAndGetMemSize(vm::ptr<CellAtracHandle> pHandle, u32 pucBufferAddr, u32 uiReadByte, u32 uiBufferByte, vm::ptr<u32> puiWorkMemByte)
s32 cellAtracSetDataAndGetMemSize(vm::ptr<CellAtracHandle> pHandle, u32 pucBufferAddr, u32 uiReadByte, u32 uiBufferByte, vm::ptr<u32> puiWorkMemByte)
{
cellAtrac.Warning("cellAtracSetDataAndGetMemSize(pHandle=0x%x, pucBufferAddr=0x%x, uiReadByte=0x%x, uiBufferByte=0x%x, puiWorkMemByte_addr=0x%x)",
pHandle.addr(), pucBufferAddr, uiReadByte, uiBufferByte, puiWorkMemByte.addr());
#ifdef PRX_DEBUG
return GetCurrentPPUThread().FastCall2(libatrac3plus + 0x11F4, libatrac3plus_rtoc);
#endif
*puiWorkMemByte = 0x1000; // unproved
return CELL_OK;
}
s64 cellAtracCreateDecoder(vm::ptr<CellAtracHandle> pHandle, u32 pucWorkMem_addr, u32 uiPpuThreadPriority, u32 uiSpuThreadPriority)
s32 cellAtracCreateDecoder(vm::ptr<CellAtracHandle> pHandle, u32 pucWorkMem_addr, u32 uiPpuThreadPriority, u32 uiSpuThreadPriority)
{
cellAtrac.Warning("cellAtracCreateDecoder(pHandle=0x%x, pucWorkMem_addr=0x%x, uiPpuThreadPriority=%d, uiSpuThreadPriority=%d)",
pHandle.addr(), pucWorkMem_addr, uiPpuThreadPriority, uiSpuThreadPriority);
#ifdef PRX_DEBUG
return GetCurrentPPUThread().FastCall2(libatrac3plus + 0x0FF0, libatrac3plus_rtoc);
#endif
pHandle->data.pucWorkMem_addr = pucWorkMem_addr;
return CELL_OK;
}
s64 cellAtracCreateDecoderExt(vm::ptr<CellAtracHandle> pHandle, u32 pucWorkMem_addr, u32 uiPpuThreadPriority, vm::ptr<CellAtracExtRes> pExtRes)
s32 cellAtracCreateDecoderExt(vm::ptr<CellAtracHandle> pHandle, u32 pucWorkMem_addr, u32 uiPpuThreadPriority, vm::ptr<CellAtracExtRes> pExtRes)
{
cellAtrac.Warning("cellAtracCreateDecoderExt(pHandle=0x%x, pucWorkMem_addr=0x%x, uiPpuThreadPriority=%d, pExtRes_addr=0x%x)",
pHandle.addr(), pucWorkMem_addr, uiPpuThreadPriority, pExtRes.addr());
#ifdef PRX_DEBUG
return GetCurrentPPUThread().FastCall2(libatrac3plus + 0x0DB0, libatrac3plus_rtoc);
#endif
pHandle->data.pucWorkMem_addr = pucWorkMem_addr;
return CELL_OK;
}
s64 cellAtracDeleteDecoder(vm::ptr<CellAtracHandle> pHandle)
s32 cellAtracDeleteDecoder(vm::ptr<CellAtracHandle> pHandle)
{
cellAtrac.Warning("cellAtracDeleteDecoder(pHandle=0x%x)", pHandle.addr());
#ifdef PRX_DEBUG
return GetCurrentPPUThread().FastCall2(libatrac3plus + 0x0D08, libatrac3plus_rtoc);
#endif
return CELL_OK;
}
s64 cellAtracDecode(vm::ptr<CellAtracHandle> pHandle, u32 pfOutAddr, vm::ptr<u32> puiSamples, vm::ptr<u32> puiFinishflag, vm::ptr<u32> piRemainFrame)
s32 cellAtracDecode(vm::ptr<CellAtracHandle> pHandle, u32 pfOutAddr, vm::ptr<u32> puiSamples, vm::ptr<u32> puiFinishflag, vm::ptr<u32> piRemainFrame)
{
cellAtrac.Warning("cellAtracDecode(pHandle=0x%x, pfOutAddr=0x%x, puiSamples_addr=0x%x, puiFinishFlag_addr=0x%x, piRemainFrame_addr=0x%x)",
pHandle.addr(), pfOutAddr, puiSamples.addr(), puiFinishflag.addr(), piRemainFrame.addr());
#ifdef PRX_DEBUG
return GetCurrentPPUThread().FastCall2(libatrac3plus + 0x09A8, libatrac3plus_rtoc);
#endif
*puiSamples = 0;
*puiFinishflag = 1;
@ -73,13 +52,10 @@ s64 cellAtracDecode(vm::ptr<CellAtracHandle> pHandle, u32 pfOutAddr, vm::ptr<u32
return CELL_OK;
}
s64 cellAtracGetStreamDataInfo(vm::ptr<CellAtracHandle> pHandle, vm::ptr<u32> ppucWritePointer, vm::ptr<u32> puiWritableByte, vm::ptr<u32> puiReadPosition)
s32 cellAtracGetStreamDataInfo(vm::ptr<CellAtracHandle> pHandle, vm::ptr<u32> ppucWritePointer, vm::ptr<u32> puiWritableByte, vm::ptr<u32> puiReadPosition)
{
cellAtrac.Warning("cellAtracGetStreamDataInfo(pHandle=0x%x, ppucWritePointer_addr=0x%x, puiWritableByte_addr=0x%x, puiReadPosition_addr=0x%x)",
pHandle.addr(), ppucWritePointer.addr(), puiWritableByte.addr(), puiReadPosition.addr());
#ifdef PRX_DEBUG
return GetCurrentPPUThread().FastCall2(libatrac3plus + 0x0BE8, libatrac3plus_rtoc);
#endif
*ppucWritePointer = pHandle->data.pucWorkMem_addr;
*puiWritableByte = 0x1000;
@ -87,112 +63,82 @@ s64 cellAtracGetStreamDataInfo(vm::ptr<CellAtracHandle> pHandle, vm::ptr<u32> pp
return CELL_OK;
}
s64 cellAtracAddStreamData(vm::ptr<CellAtracHandle> pHandle, u32 uiAddByte)
s32 cellAtracAddStreamData(vm::ptr<CellAtracHandle> pHandle, u32 uiAddByte)
{
cellAtrac.Warning("cellAtracAddStreamData(pHandle=0x%x, uiAddByte=0x%x)", pHandle.addr(), uiAddByte);
#ifdef PRX_DEBUG
return GetCurrentPPUThread().FastCall2(libatrac3plus + 0x0AFC, libatrac3plus_rtoc);
#endif
return CELL_OK;
}
s64 cellAtracGetRemainFrame(vm::ptr<CellAtracHandle> pHandle, vm::ptr<u32> piRemainFrame)
s32 cellAtracGetRemainFrame(vm::ptr<CellAtracHandle> pHandle, vm::ptr<u32> piRemainFrame)
{
cellAtrac.Warning("cellAtracGetRemainFrame(pHandle=0x%x, piRemainFrame_addr=0x%x)", pHandle.addr(), piRemainFrame.addr());
#ifdef PRX_DEBUG
return GetCurrentPPUThread().FastCall2(libatrac3plus + 0x092C, libatrac3plus_rtoc);
#endif
*piRemainFrame = CELL_ATRAC_ALLDATA_IS_ON_MEMORY;
return CELL_OK;
}
s64 cellAtracGetVacantSize(vm::ptr<CellAtracHandle> pHandle, vm::ptr<u32> puiVacantSize)
s32 cellAtracGetVacantSize(vm::ptr<CellAtracHandle> pHandle, vm::ptr<u32> puiVacantSize)
{
cellAtrac.Warning("cellAtracGetVacantSize(pHandle=0x%x, puiVacantSize_addr=0x%x)", pHandle.addr(), puiVacantSize.addr());
#ifdef PRX_DEBUG
return GetCurrentPPUThread().FastCall2(libatrac3plus + 0x08B0, libatrac3plus_rtoc);
#endif
*puiVacantSize = 0x1000;
return CELL_OK;
}
s64 cellAtracIsSecondBufferNeeded(vm::ptr<CellAtracHandle> pHandle)
s32 cellAtracIsSecondBufferNeeded(vm::ptr<CellAtracHandle> pHandle)
{
cellAtrac.Warning("cellAtracIsSecondBufferNeeded(pHandle=0x%x)", pHandle.addr());
#ifdef PRX_DEBUG
return GetCurrentPPUThread().FastCall2(libatrac3plus + 0x0010, libatrac3plus_rtoc);
#endif
return CELL_OK;
}
s64 cellAtracGetSecondBufferInfo(vm::ptr<CellAtracHandle> pHandle, vm::ptr<u32> puiReadPosition, vm::ptr<u32> puiDataByte)
s32 cellAtracGetSecondBufferInfo(vm::ptr<CellAtracHandle> pHandle, vm::ptr<u32> puiReadPosition, vm::ptr<u32> puiDataByte)
{
cellAtrac.Warning("cellAtracGetSecondBufferInfo(pHandle=0x%x, puiReadPosition_addr=0x%x, puiDataByte_addr=0x%x)",
pHandle.addr(), puiReadPosition.addr(), puiDataByte.addr());
#ifdef PRX_DEBUG
return GetCurrentPPUThread().FastCall2(libatrac3plus + 0x07E8, libatrac3plus_rtoc);
#endif
*puiReadPosition = 0;
*puiDataByte = 0; // write to null block will occur
return CELL_OK;
}
s64 cellAtracSetSecondBuffer(vm::ptr<CellAtracHandle> pHandle, u32 pucSecondBufferAddr, u32 uiSecondBufferByte)
s32 cellAtracSetSecondBuffer(vm::ptr<CellAtracHandle> pHandle, u32 pucSecondBufferAddr, u32 uiSecondBufferByte)
{
cellAtrac.Warning("cellAtracSetSecondBuffer(pHandle=0x%x, pucSecondBufferAddr=0x%x, uiSecondBufferByte=0x%x)",
pHandle.addr(), pucSecondBufferAddr, uiSecondBufferByte);
#ifdef PRX_DEBUG
return GetCurrentPPUThread().FastCall2(libatrac3plus + 0x0704, libatrac3plus_rtoc);
#endif
return CELL_OK;
}
s64 cellAtracGetChannel(vm::ptr<CellAtracHandle> pHandle, vm::ptr<u32> puiChannel)
s32 cellAtracGetChannel(vm::ptr<CellAtracHandle> pHandle, vm::ptr<u32> puiChannel)
{
cellAtrac.Warning("cellAtracGetChannel(pHandle=0x%x, puiChannel_addr=0x%x)", pHandle.addr(), puiChannel.addr());
#ifdef PRX_DEBUG
return GetCurrentPPUThread().FastCall2(libatrac3plus + 0x0060, libatrac3plus_rtoc);
#endif
*puiChannel = 2;
return CELL_OK;
}
s64 cellAtracGetMaxSample(vm::ptr<CellAtracHandle> pHandle, vm::ptr<u32> puiMaxSample)
s32 cellAtracGetMaxSample(vm::ptr<CellAtracHandle> pHandle, vm::ptr<u32> puiMaxSample)
{
cellAtrac.Warning("cellAtracGetMaxSample(pHandle=0x%x, puiMaxSample_addr=0x%x)", pHandle.addr(), puiMaxSample.addr());
#ifdef PRX_DEBUG
return GetCurrentPPUThread().FastCall2(libatrac3plus + 0x00AC, libatrac3plus_rtoc);
#endif
*puiMaxSample = 512;
return CELL_OK;
}
s64 cellAtracGetNextSample(vm::ptr<CellAtracHandle> pHandle, vm::ptr<u32> puiNextSample)
s32 cellAtracGetNextSample(vm::ptr<CellAtracHandle> pHandle, vm::ptr<u32> puiNextSample)
{
cellAtrac.Warning("cellAtracGetNextSample(pHandle=0x%x, puiNextSample_addr=0x%x)", pHandle.addr(), puiNextSample.addr());
#ifdef PRX_DEBUG
return GetCurrentPPUThread().FastCall2(libatrac3plus + 0x0688, libatrac3plus_rtoc);
#endif
*puiNextSample = 0;
return CELL_OK;
}
s64 cellAtracGetSoundInfo(vm::ptr<CellAtracHandle> pHandle, vm::ptr<u32> piEndSample, vm::ptr<u32> piLoopStartSample, vm::ptr<u32> piLoopEndSample)
s32 cellAtracGetSoundInfo(vm::ptr<CellAtracHandle> pHandle, vm::ptr<u32> piEndSample, vm::ptr<u32> piLoopStartSample, vm::ptr<u32> piLoopEndSample)
{
cellAtrac.Warning("cellAtracGetSoundInfo(pHandle=0x%x, piEndSample_addr=0x%x, piLoopStartSample_addr=0x%x, piLoopEndSample_addr=0x%x)",
pHandle.addr(), piEndSample.addr(), piLoopStartSample.addr(), piLoopEndSample.addr());
#ifdef PRX_DEBUG
return GetCurrentPPUThread().FastCall2(libatrac3plus + 0x0104, libatrac3plus_rtoc);
#endif
*piEndSample = 0;
*piLoopStartSample = 0;
@ -200,60 +146,45 @@ s64 cellAtracGetSoundInfo(vm::ptr<CellAtracHandle> pHandle, vm::ptr<u32> piEndSa
return CELL_OK;
}
s64 cellAtracGetNextDecodePosition(vm::ptr<CellAtracHandle> pHandle, vm::ptr<u32> puiSamplePosition)
s32 cellAtracGetNextDecodePosition(vm::ptr<CellAtracHandle> pHandle, vm::ptr<u32> puiSamplePosition)
{
cellAtrac.Warning("cellAtracGetNextDecodePosition(pHandle=0x%x, puiSamplePosition_addr=0x%x)",
pHandle.addr(), puiSamplePosition.addr());
#ifdef PRX_DEBUG
return GetCurrentPPUThread().FastCall2(libatrac3plus + 0x0190, libatrac3plus_rtoc);
#endif
*puiSamplePosition = 0;
return CELL_ATRAC_ERROR_ALLDATA_WAS_DECODED;
}
s64 cellAtracGetBitrate(vm::ptr<CellAtracHandle> pHandle, vm::ptr<u32> puiBitrate)
s32 cellAtracGetBitrate(vm::ptr<CellAtracHandle> pHandle, vm::ptr<u32> puiBitrate)
{
cellAtrac.Warning("cellAtracGetBitrate(pHandle=0x%x, puiBitrate_addr=0x%x)",
pHandle.addr(), puiBitrate.addr());
#ifdef PRX_DEBUG
return GetCurrentPPUThread().FastCall2(libatrac3plus + 0x0374, libatrac3plus_rtoc);
#endif
*puiBitrate = 128;
return CELL_OK;
}
s64 cellAtracGetLoopInfo(vm::ptr<CellAtracHandle> pHandle, vm::ptr<u32> piLoopNum, vm::ptr<u32> puiLoopStatus)
s32 cellAtracGetLoopInfo(vm::ptr<CellAtracHandle> pHandle, vm::ptr<u32> piLoopNum, vm::ptr<u32> puiLoopStatus)
{
cellAtrac.Warning("cellAtracGetLoopInfo(pHandle=0x%x, piLoopNum_addr=0x%x, puiLoopStatus_addr=0x%x)",
pHandle.addr(), piLoopNum.addr(), puiLoopStatus.addr());
#ifdef PRX_DEBUG
return GetCurrentPPUThread().FastCall2(libatrac3plus + 0x025C, libatrac3plus_rtoc);
#endif
*piLoopNum = 0;
*puiLoopStatus = 0;
return CELL_OK;
}
s64 cellAtracSetLoopNum(vm::ptr<CellAtracHandle> pHandle, int iLoopNum)
s32 cellAtracSetLoopNum(vm::ptr<CellAtracHandle> pHandle, int iLoopNum)
{
cellAtrac.Warning("cellAtracSetLoopNum(pHandle=0x%x, iLoopNum=0x%x)", pHandle.addr(), iLoopNum);
#ifdef PRX_DEBUG
return GetCurrentPPUThread().FastCall2(libatrac3plus + 0x1538, libatrac3plus_rtoc);
#endif
return CELL_OK;
}
s64 cellAtracGetBufferInfoForResetting(vm::ptr<CellAtracHandle> pHandle, u32 uiSample, vm::ptr<CellAtracBufferInfo> pBufferInfo)
s32 cellAtracGetBufferInfoForResetting(vm::ptr<CellAtracHandle> pHandle, u32 uiSample, vm::ptr<CellAtracBufferInfo> pBufferInfo)
{
cellAtrac.Warning("cellAtracGetBufferInfoForResetting(pHandle=0x%x, uiSample=0x%x, pBufferInfo_addr=0x%x)",
pHandle.addr(), uiSample, pBufferInfo.addr());
#ifdef PRX_DEBUG
return GetCurrentPPUThread().FastCall2(libatrac3plus + 0x05BC, libatrac3plus_rtoc);
#endif
pBufferInfo->pucWriteAddr = pHandle->data.pucWorkMem_addr;
pBufferInfo->uiWritableByte = 0x1000;
@ -262,24 +193,18 @@ s64 cellAtracGetBufferInfoForResetting(vm::ptr<CellAtracHandle> pHandle, u32 uiS
return CELL_OK;
}
s64 cellAtracResetPlayPosition(vm::ptr<CellAtracHandle> pHandle, u32 uiSample, u32 uiWriteByte)
s32 cellAtracResetPlayPosition(vm::ptr<CellAtracHandle> pHandle, u32 uiSample, u32 uiWriteByte)
{
cellAtrac.Warning("cellAtracResetPlayPosition(pHandle=0x%x, uiSample=0x%x, uiWriteByte=0x%x)",
pHandle.addr(), uiSample, uiWriteByte);
#ifdef PRX_DEBUG
return GetCurrentPPUThread().FastCall2(libatrac3plus + 0x04E4, libatrac3plus_rtoc);
#endif
return CELL_OK;
}
s64 cellAtracGetInternalErrorInfo(vm::ptr<CellAtracHandle> pHandle, vm::ptr<u32> piResult)
s32 cellAtracGetInternalErrorInfo(vm::ptr<CellAtracHandle> pHandle, vm::ptr<u32> piResult)
{
cellAtrac.Warning("cellAtracGetInternalErrorInfo(pHandle=0x%x, piResult_addr=0x%x)",
pHandle.addr(), piResult.addr());
#ifdef PRX_DEBUG
return GetCurrentPPUThread().FastCall2(libatrac3plus + 0x02E4, libatrac3plus_rtoc);
#endif
*piResult = 0;
return CELL_OK;
@ -317,27 +242,4 @@ Module cellAtrac("cellAtrac", []()
cellAtrac.AddFunc(0x7772eb2b, cellAtracResetPlayPosition);
cellAtrac.AddFunc(0xb5c11938, cellAtracGetInternalErrorInfo);
#ifdef PRX_DEBUG
CallAfter([]()
{
if (!Memory.MainMem.GetStartAddr()) return;
libatrac3plus = (u32)Memory.MainMem.AllocAlign(sizeof(libatrac3plus_data), 0x100000);
memcpy(vm::get_ptr<void>(libatrac3plus), libatrac3plus_data, sizeof(libatrac3plus_data));
libatrac3plus_rtoc = libatrac3plus + 0xBED0;
extern Module* cellAdec;
FIX_IMPORT(cellAdec, cellAdecDecodeAu, libatrac3plus + 0x399C);
FIX_IMPORT(cellAdec, cellAdecStartSeq, libatrac3plus + 0x39BC);
FIX_IMPORT(cellAdec, cellAdecQueryAttr, libatrac3plus + 0x39DC);
FIX_IMPORT(cellAdec, cellAdecClose, libatrac3plus + 0x39FC);
FIX_IMPORT(cellAdec, cellAdecGetPcm, libatrac3plus + 0x3A1C);
FIX_IMPORT(cellAdec, cellAdecOpen, libatrac3plus + 0x3A3C);
fix_import(cellAdec, 0xDF982D2C, libatrac3plus + 0x3A5C);
fix_relocs(cellAtrac, libatrac3plus, 0x3EF0, 0x5048, 0x3CE0);
});
#endif
});

View File

@ -179,109 +179,115 @@ int cellCameraGetAttribute(s32 dev_num, CellCameraAttribute attrib, vm::ptr<u32>
if (!cellCameraInstance.m_bInitialized)
return CELL_CAMERA_ERROR_NOT_INIT;
if (attrib == 0)
*arg1 = cellCameraInstance.m_camera.attributes.GAIN;
else if (attrib == 1)
*arg1 = cellCameraInstance.m_camera.attributes.REDBLUEGAIN;
else if (attrib == 2)
*arg1 = cellCameraInstance.m_camera.attributes.SATURATION;
else if (attrib == 3)
*arg1 = cellCameraInstance.m_camera.attributes.EXPOSURE;
else if (attrib == 4)
*arg1 = cellCameraInstance.m_camera.attributes.BRIGHTNESS;
else if (attrib == 5)
*arg1 = cellCameraInstance.m_camera.attributes.AEC;
else if (attrib == 6)
*arg1 = cellCameraInstance.m_camera.attributes.AGC;
else if (attrib == 7)
*arg1 = cellCameraInstance.m_camera.attributes.AWB;
else if (attrib == 8)
*arg1 = cellCameraInstance.m_camera.attributes.ABC;
else if (attrib == 9)
*arg1 = cellCameraInstance.m_camera.attributes.LED;
else if (attrib == 10)
*arg1 = cellCameraInstance.m_camera.attributes.AUDIOGAIN;
else if (attrib == 11)
*arg1 = cellCameraInstance.m_camera.attributes.QS;
else if (attrib == 12)
switch (attrib)
{
case 0:
*arg1 = cellCameraInstance.m_camera.attributes.GAIN; break;
case 1:
*arg1 = cellCameraInstance.m_camera.attributes.REDBLUEGAIN; break;
case 2:
*arg1 = cellCameraInstance.m_camera.attributes.SATURATION; break;
case 3:
*arg1 = cellCameraInstance.m_camera.attributes.EXPOSURE; break;
case 4:
*arg1 = cellCameraInstance.m_camera.attributes.BRIGHTNESS; break;
case 5:
*arg1 = cellCameraInstance.m_camera.attributes.AEC; break;
case 6:
*arg1 = cellCameraInstance.m_camera.attributes.AGC; break;
case 7:
*arg1 = cellCameraInstance.m_camera.attributes.AWB; break;
case 8:
*arg1 = cellCameraInstance.m_camera.attributes.ABC; break;
case 9:
*arg1 = cellCameraInstance.m_camera.attributes.LED; break;
case 10:
*arg1 = cellCameraInstance.m_camera.attributes.AUDIOGAIN; break;
case 11:
*arg1 = cellCameraInstance.m_camera.attributes.QS; break;
case 12:
{
*arg1 = cellCameraInstance.m_camera.attributes.NONZEROCOEFFS[0];
*arg2 = cellCameraInstance.m_camera.attributes.NONZEROCOEFFS[1];
break;
}
case 13:
*arg1 = cellCameraInstance.m_camera.attributes.YUVFLAG; break;
case 14:
*arg1 = cellCameraInstance.m_camera.attributes.JPEGFLAG; break;
case 15:
*arg1 = cellCameraInstance.m_camera.attributes.BACKLIGHTCOMP; break;
case 16:
*arg1 = cellCameraInstance.m_camera.attributes.MIRRORFLAG; break;
case 17:
*arg1 = cellCameraInstance.m_camera.attributes.MEASUREDQS; break;
case 18:
*arg1 = cellCameraInstance.m_camera.attributes._422FLAG; break;
case 19:
*arg1 = cellCameraInstance.m_camera.attributes.USBLOAD; break;
case 20:
*arg1 = cellCameraInstance.m_camera.attributes.GAMMA; break;
case 21:
*arg1 = cellCameraInstance.m_camera.attributes.GREENGAIN; break;
case 22:
*arg1 = cellCameraInstance.m_camera.attributes.AGCLIMIT; break;
case 23:
*arg1 = cellCameraInstance.m_camera.attributes.DENOISE; break;
case 24:
*arg1 = cellCameraInstance.m_camera.attributes.FRAMERATEADJUST; break;
case 25:
*arg1 = cellCameraInstance.m_camera.attributes.PIXELOUTLIERFILTER; break;
case 26:
*arg1 = cellCameraInstance.m_camera.attributes.AGCLOW; break;
case 27:
*arg1 = cellCameraInstance.m_camera.attributes.AGCHIGH; break;
case 28:
*arg1 = cellCameraInstance.m_camera.attributes.DEVICELOCATION; break;
case 29:
*arg1 = cellCameraInstance.m_camera.attributes.FORMATCAP; break;
case 30:
*arg1 = cellCameraInstance.m_camera.attributes.FORMATINDEX; break;
case 31:
*arg1 = cellCameraInstance.m_camera.attributes.NUMFRAME; break;
case 32:
*arg1 = cellCameraInstance.m_camera.attributes.FRAMEINDEX; break;
case 33:
*arg1 = cellCameraInstance.m_camera.attributes.FRAMESIZE; break;
case 34:
*arg1 = cellCameraInstance.m_camera.attributes.INTERVALTYPE; break;
case 35:
*arg1 = cellCameraInstance.m_camera.attributes.INTERVALINDEX; break;
case 36:
*arg1 = cellCameraInstance.m_camera.attributes.INTERVALVALUE; break;
case 37:
*arg1 = cellCameraInstance.m_camera.attributes.COLORMATCHING; break;
case 38:
*arg1 = cellCameraInstance.m_camera.attributes.PLFREQ; break;
case 39:
*arg1 = cellCameraInstance.m_camera.attributes.DEVICEID; break;
case 40:
*arg1 = cellCameraInstance.m_camera.attributes.DEVICECAP; break;
case 41:
*arg1 = cellCameraInstance.m_camera.attributes.DEVICESPEED; break;
case 42:
*arg1 = cellCameraInstance.m_camera.attributes.UVCREQCODE; break;
case 43:
*arg1 = cellCameraInstance.m_camera.attributes.UVCREQDATA; break;
case 44:
*arg1 = cellCameraInstance.m_camera.attributes.DEVICEID2; break;
case 45:
*arg1 = cellCameraInstance.m_camera.attributes.READMODE; break;
case 46:
*arg1 = cellCameraInstance.m_camera.attributes.GAMEPID; break;
case 47:
*arg1 = cellCameraInstance.m_camera.attributes.PBUFFER; break;
case 48:
*arg1 = cellCameraInstance.m_camera.attributes.READFINISH; break;
case 49:
*arg1 = cellCameraInstance.m_camera.attributes.ATTRIBUTE_UNKNOWN; break;
default:
cellCamera.Error("Unexpected cellCameraGetAttribute attribute: %d", attrib); break;
}
else if (attrib == 13)
*arg1 = cellCameraInstance.m_camera.attributes.YUVFLAG;
else if (attrib == 14)
*arg1 = cellCameraInstance.m_camera.attributes.JPEGFLAG;
else if (attrib == 15)
*arg1 = cellCameraInstance.m_camera.attributes.BACKLIGHTCOMP;
else if (attrib == 16)
*arg1 = cellCameraInstance.m_camera.attributes.MIRRORFLAG;
else if (attrib == 17)
*arg1 = cellCameraInstance.m_camera.attributes.MEASUREDQS;
else if (attrib == 18)
*arg1 = cellCameraInstance.m_camera.attributes._422FLAG;
else if (attrib == 19)
*arg1 = cellCameraInstance.m_camera.attributes.USBLOAD;
else if (attrib == 20)
*arg1 = cellCameraInstance.m_camera.attributes.GAMMA;
else if (attrib == 21)
*arg1 = cellCameraInstance.m_camera.attributes.GREENGAIN;
else if (attrib == 22)
*arg1 = cellCameraInstance.m_camera.attributes.AGCLIMIT;
else if (attrib == 23)
*arg1 = cellCameraInstance.m_camera.attributes.DENOISE;
else if (attrib == 24)
*arg1 = cellCameraInstance.m_camera.attributes.FRAMERATEADJUST;
else if (attrib == 25)
*arg1 = cellCameraInstance.m_camera.attributes.PIXELOUTLIERFILTER;
else if (attrib == 26)
*arg1 = cellCameraInstance.m_camera.attributes.AGCLOW;
else if (attrib == 27)
*arg1 = cellCameraInstance.m_camera.attributes.AGCHIGH;
else if (attrib == 28)
*arg1 = cellCameraInstance.m_camera.attributes.DEVICELOCATION;
else if (attrib == 29)
*arg1 = cellCameraInstance.m_camera.attributes.FORMATCAP;
else if (attrib == 30)
*arg1 = cellCameraInstance.m_camera.attributes.FORMATINDEX;
else if (attrib == 31)
*arg1 = cellCameraInstance.m_camera.attributes.NUMFRAME;
else if (attrib == 32)
*arg1 = cellCameraInstance.m_camera.attributes.FRAMEINDEX;
else if (attrib == 33)
*arg1 = cellCameraInstance.m_camera.attributes.FRAMESIZE;
else if (attrib == 34)
*arg1 = cellCameraInstance.m_camera.attributes.INTERVALTYPE;
else if (attrib == 35)
*arg1 = cellCameraInstance.m_camera.attributes.INTERVALINDEX;
else if (attrib == 36)
*arg1 = cellCameraInstance.m_camera.attributes.INTERVALVALUE;
else if (attrib == 37)
*arg1 = cellCameraInstance.m_camera.attributes.COLORMATCHING;
else if (attrib == 38)
*arg1 = cellCameraInstance.m_camera.attributes.PLFREQ;
else if (attrib == 39)
*arg1 = cellCameraInstance.m_camera.attributes.DEVICEID;
else if (attrib == 40)
*arg1 = cellCameraInstance.m_camera.attributes.DEVICECAP;
else if (attrib == 41)
*arg1 = cellCameraInstance.m_camera.attributes.DEVICESPEED;
else if (attrib == 42)
*arg1 = cellCameraInstance.m_camera.attributes.UVCREQCODE;
else if (attrib == 43)
*arg1 = cellCameraInstance.m_camera.attributes.UVCREQDATA;
else if (attrib == 44)
*arg1 = cellCameraInstance.m_camera.attributes.DEVICEID2;
else if (attrib == 45)
*arg1 = cellCameraInstance.m_camera.attributes.READMODE;
else if (attrib == 46)
*arg1 = cellCameraInstance.m_camera.attributes.GAMEPID;
else if (attrib == 47)
*arg1 = cellCameraInstance.m_camera.attributes.PBUFFER;
else if (attrib == 48)
*arg1 = cellCameraInstance.m_camera.attributes.READFINISH;
else if (attrib == 49)
*arg1 = cellCameraInstance.m_camera.attributes.ATTRIBUTE_UNKNOWN;
return CELL_OK;
}
@ -293,109 +299,115 @@ int cellCameraSetAttribute(s32 dev_num, CellCameraAttribute attrib, u32 arg1, u3
if (!cellCameraInstance.m_bInitialized)
return CELL_CAMERA_ERROR_NOT_INIT;
if (attrib == 0)
cellCameraInstance.m_camera.attributes.GAIN = arg1;
else if (attrib == 1)
cellCameraInstance.m_camera.attributes.REDBLUEGAIN = arg1;
else if (attrib == 2)
cellCameraInstance.m_camera.attributes.SATURATION = arg1;
else if (attrib == 3)
cellCameraInstance.m_camera.attributes.EXPOSURE = arg1;
else if (attrib == 4)
cellCameraInstance.m_camera.attributes.BRIGHTNESS = arg1;
else if (attrib == 5)
cellCameraInstance.m_camera.attributes.AEC = arg1;
else if (attrib == 6)
cellCameraInstance.m_camera.attributes.AGC = arg1;
else if (attrib == 7)
cellCameraInstance.m_camera.attributes.AWB = arg1;
else if (attrib == 8)
cellCameraInstance.m_camera.attributes.ABC = arg1;
else if (attrib == 9)
cellCameraInstance.m_camera.attributes.LED = arg1;
else if (attrib == 10)
cellCameraInstance.m_camera.attributes.AUDIOGAIN = arg1;
else if (attrib == 11)
cellCameraInstance.m_camera.attributes.QS = arg1;
else if (attrib == 12)
switch (attrib)
{
case 0:
cellCameraInstance.m_camera.attributes.GAIN = arg1; break;
case 1:
cellCameraInstance.m_camera.attributes.REDBLUEGAIN = arg1; break;
case 2:
cellCameraInstance.m_camera.attributes.SATURATION = arg1; break;
case 3:
cellCameraInstance.m_camera.attributes.EXPOSURE = arg1; break;
case 4:
cellCameraInstance.m_camera.attributes.BRIGHTNESS = arg1; break;
case 5:
cellCameraInstance.m_camera.attributes.AEC = arg1; break;
case 6:
cellCameraInstance.m_camera.attributes.AGC = arg1; break;
case 7:
cellCameraInstance.m_camera.attributes.AWB = arg1; break;
case 8:
cellCameraInstance.m_camera.attributes.ABC = arg1; break;
case 9:
cellCameraInstance.m_camera.attributes.LED = arg1; break;
case 10:
cellCameraInstance.m_camera.attributes.AUDIOGAIN = arg1; break;
case 11:
cellCameraInstance.m_camera.attributes.QS = arg1; break;
case 12:
{
cellCameraInstance.m_camera.attributes.NONZEROCOEFFS[0] = arg1;
cellCameraInstance.m_camera.attributes.NONZEROCOEFFS[1] = arg2;
break;
}
case 13:
cellCameraInstance.m_camera.attributes.YUVFLAG = arg1; break;
case 14:
cellCameraInstance.m_camera.attributes.JPEGFLAG = arg1; break;
case 15:
cellCameraInstance.m_camera.attributes.BACKLIGHTCOMP = arg1; break;
case 16:
cellCameraInstance.m_camera.attributes.MIRRORFLAG = arg1; break;
case 17:
return CELL_CAMERA_ERROR_PARAM; break;
case 18:
cellCameraInstance.m_camera.attributes._422FLAG = arg1; break;
case 19:
cellCameraInstance.m_camera.attributes.USBLOAD = arg1; break;
case 20:
cellCameraInstance.m_camera.attributes.GAMMA = arg1; break;
case 21:
cellCameraInstance.m_camera.attributes.GREENGAIN = arg1; break;
case 22:
cellCameraInstance.m_camera.attributes.AGCLIMIT = arg1; break;
case 23:
cellCameraInstance.m_camera.attributes.DENOISE = arg1; break;
case 24:
cellCameraInstance.m_camera.attributes.FRAMERATEADJUST = arg1; break;
case 25:
cellCameraInstance.m_camera.attributes.PIXELOUTLIERFILTER = arg1; break;
case 26:
cellCameraInstance.m_camera.attributes.AGCLOW = arg1; break;
case 27:
cellCameraInstance.m_camera.attributes.AGCHIGH = arg1; break;
case 28:
cellCameraInstance.m_camera.attributes.DEVICELOCATION = arg1; break;
case 29:
cellCamera.Error("Tried to write to read-only (?) value: FORMATCAP"); break;
case 30:
cellCameraInstance.m_camera.attributes.FORMATINDEX = arg1; break;
case 31:
cellCameraInstance.m_camera.attributes.NUMFRAME = arg1; break;
case 32:
cellCameraInstance.m_camera.attributes.FRAMEINDEX = arg1; break;
case 33:
cellCameraInstance.m_camera.attributes.FRAMESIZE = arg1; break;
case 34:
cellCameraInstance.m_camera.attributes.INTERVALTYPE = arg1; break;
case 35:
cellCameraInstance.m_camera.attributes.INTERVALINDEX = arg1; break;
case 36:
cellCameraInstance.m_camera.attributes.INTERVALVALUE = arg1; break;
case 37:
cellCameraInstance.m_camera.attributes.COLORMATCHING = arg1; break;
case 38:
cellCameraInstance.m_camera.attributes.PLFREQ = arg1; break;
case 39:
return CELL_CAMERA_ERROR_PARAM; break;
case 40:
cellCameraInstance.m_camera.attributes.DEVICECAP = arg1; break;
case 41:
cellCameraInstance.m_camera.attributes.DEVICESPEED = arg1; break;
case 42:
cellCameraInstance.m_camera.attributes.UVCREQCODE = arg1; break;
case 43:
cellCameraInstance.m_camera.attributes.UVCREQDATA = arg1; break;
case 44:
return CELL_CAMERA_ERROR_PARAM; break;
case 45:
cellCamera.Error("Tried to write to read-only (?) value: READMODE"); break;
case 46:
cellCameraInstance.m_camera.attributes.GAMEPID = arg1; break;
case 47:
cellCameraInstance.m_camera.attributes.PBUFFER = arg1; break;
case 48:
cellCameraInstance.m_camera.attributes.READFINISH = arg1; break;
case 49:
cellCamera.Error("Tried to write to read-only (?) value: ATTRIBUTE_UNKNOWN"); break;
default:
cellCamera.Error("Unexpected cellCameraGetAttribute attribute: %d", attrib); break;
}
else if (attrib == 13)
cellCameraInstance.m_camera.attributes.YUVFLAG = arg1;
else if (attrib == 14)
cellCameraInstance.m_camera.attributes.JPEGFLAG = arg1;
else if (attrib == 15)
cellCameraInstance.m_camera.attributes.BACKLIGHTCOMP = arg1;
else if (attrib == 16)
cellCameraInstance.m_camera.attributes.MIRRORFLAG = arg1;
else if (attrib == 17)
return CELL_CAMERA_ERROR_PARAM;
else if (attrib == 18)
cellCameraInstance.m_camera.attributes._422FLAG = arg1;
else if (attrib == 19)
cellCameraInstance.m_camera.attributes.USBLOAD = arg1;
else if (attrib == 20)
cellCameraInstance.m_camera.attributes.GAMMA = arg1;
else if (attrib == 21)
cellCameraInstance.m_camera.attributes.GREENGAIN = arg1;
else if (attrib == 22)
cellCameraInstance.m_camera.attributes.AGCLIMIT = arg1;
else if (attrib == 23)
cellCameraInstance.m_camera.attributes.DENOISE = arg1;
else if (attrib == 24)
cellCameraInstance.m_camera.attributes.FRAMERATEADJUST = arg1;
else if (attrib == 25)
cellCameraInstance.m_camera.attributes.PIXELOUTLIERFILTER = arg1;
else if (attrib == 26)
cellCameraInstance.m_camera.attributes.AGCLOW = arg1;
else if (attrib == 27)
cellCameraInstance.m_camera.attributes.AGCHIGH = arg1;
else if (attrib == 28)
cellCameraInstance.m_camera.attributes.DEVICELOCATION = arg1;
else if (attrib == 29)
cellCamera.Error("Tried to write to read-only (?) value: FORMATCAP");
else if (attrib == 30)
cellCameraInstance.m_camera.attributes.FORMATINDEX = arg1;
else if (attrib == 31)
cellCameraInstance.m_camera.attributes.NUMFRAME = arg1;
else if (attrib == 32)
cellCameraInstance.m_camera.attributes.FRAMEINDEX = arg1;
else if (attrib == 33)
cellCameraInstance.m_camera.attributes.FRAMESIZE = arg1;
else if (attrib == 34)
cellCameraInstance.m_camera.attributes.INTERVALTYPE = arg1;
else if (attrib == 35)
cellCameraInstance.m_camera.attributes.INTERVALINDEX = arg1;
else if (attrib == 36)
cellCameraInstance.m_camera.attributes.INTERVALVALUE = arg1;
else if (attrib == 37)
cellCameraInstance.m_camera.attributes.COLORMATCHING = arg1;
else if (attrib == 38)
cellCameraInstance.m_camera.attributes.PLFREQ = arg1;
else if (attrib == 39)
return CELL_CAMERA_ERROR_PARAM;
else if (attrib == 40)
cellCameraInstance.m_camera.attributes.DEVICECAP = arg1;
else if (attrib == 41)
cellCameraInstance.m_camera.attributes.DEVICESPEED = arg1;
else if (attrib == 42)
cellCameraInstance.m_camera.attributes.UVCREQCODE = arg1;
else if (attrib == 43)
cellCameraInstance.m_camera.attributes.UVCREQDATA = arg1;
else if (attrib == 44)
return CELL_CAMERA_ERROR_PARAM;
else if (attrib == 45)
cellCamera.Error("Tried to write to read-only (?) value: READMODE");
else if (attrib == 46)
cellCameraInstance.m_camera.attributes.GAMEPID = arg1;
else if (attrib == 47)
cellCameraInstance.m_camera.attributes.PBUFFER = arg1;
else if (attrib == 48)
cellCameraInstance.m_camera.attributes.READFINISH = arg1;
else if (attrib == 49)
cellCamera.Error("Tried to write to read-only (?) value: ATTRIBUTE_UNKNOWN");
return CELL_OK;
}

View File

@ -85,6 +85,7 @@ int cellNetCtlNetStartDialogLoadAsync(vm::ptr<CellNetCtlNetStartDialogParam> par
// TODO: Actually sign into PSN
sysutilSendSystemCommand(CELL_SYSUTIL_NET_CTL_NETSTART_FINISHED, 0);
return CELL_OK;
}
@ -100,6 +101,7 @@ int cellNetCtlNetStartDialogUnloadAsync(vm::ptr<CellNetCtlNetStartDialogResult>
cellNetCtl.Warning("cellNetCtlNetStartDialogUnloadAsync(result_addr=0x%x)", result.addr());
sysutilSendSystemCommand(CELL_SYSUTIL_NET_CTL_NETSTART_UNLOADED, 0);
return CELL_OK;
}

View File

@ -3,79 +3,79 @@
// Error Codes
enum
{
CELL_NET_CTL_ERROR_NOT_INITIALIZED = 0x80130101,
CELL_NET_CTL_ERROR_NOT_TERMINATED = 0x80130102,
CELL_NET_CTL_ERROR_HANDLER_MAX = 0x80130103,
CELL_NET_CTL_ERROR_ID_NOT_FOUND = 0x80130104,
CELL_NET_CTL_ERROR_INVALID_ID = 0x80130105,
CELL_NET_CTL_ERROR_INVALID_CODE = 0x80130106,
CELL_NET_CTL_ERROR_INVALID_ADDR = 0x80130107,
CELL_NET_CTL_ERROR_NOT_CONNECTED = 0x80130108,
CELL_NET_CTL_ERROR_NOT_AVAIL = 0x80130109,
CELL_NET_CTL_ERROR_INVALID_TYPE = 0x8013010a,
CELL_NET_CTL_ERROR_INVALID_SIZE = 0x8013010b,
CELL_NET_CTL_ERROR_NET_DISABLED = 0x80130181,
CELL_NET_CTL_ERROR_NET_NOT_CONNECTED = 0x80130182,
CELL_NET_CTL_ERROR_NP_NO_ACCOUNT = 0x80130183,
CELL_NET_CTL_ERROR_NP_RESERVED1 = 0x80130184,
CELL_NET_CTL_ERROR_NP_RESERVED2 = 0x80130185,
CELL_NET_CTL_ERROR_NOT_INITIALIZED = 0x80130101,
CELL_NET_CTL_ERROR_NOT_TERMINATED = 0x80130102,
CELL_NET_CTL_ERROR_HANDLER_MAX = 0x80130103,
CELL_NET_CTL_ERROR_ID_NOT_FOUND = 0x80130104,
CELL_NET_CTL_ERROR_INVALID_ID = 0x80130105,
CELL_NET_CTL_ERROR_INVALID_CODE = 0x80130106,
CELL_NET_CTL_ERROR_INVALID_ADDR = 0x80130107,
CELL_NET_CTL_ERROR_NOT_CONNECTED = 0x80130108,
CELL_NET_CTL_ERROR_NOT_AVAIL = 0x80130109,
CELL_NET_CTL_ERROR_INVALID_TYPE = 0x8013010a,
CELL_NET_CTL_ERROR_INVALID_SIZE = 0x8013010b,
CELL_NET_CTL_ERROR_NET_DISABLED = 0x80130181,
CELL_NET_CTL_ERROR_NET_NOT_CONNECTED = 0x80130182,
CELL_NET_CTL_ERROR_NP_NO_ACCOUNT = 0x80130183,
CELL_NET_CTL_ERROR_NP_RESERVED1 = 0x80130184,
CELL_NET_CTL_ERROR_NP_RESERVED2 = 0x80130185,
CELL_NET_CTL_ERROR_NET_CABLE_NOT_CONNECTED = 0x80130186,
CELL_NET_CTL_ERROR_DIALOG_CANCELED = 0x80130190,
CELL_NET_CTL_ERROR_DIALOG_ABORTED = 0x80130191,
CELL_NET_CTL_ERROR_DIALOG_CANCELED = 0x80130190,
CELL_NET_CTL_ERROR_DIALOG_ABORTED = 0x80130191,
CELL_NET_CTL_ERROR_WLAN_DEAUTHED = 0x80130137,
CELL_NET_CTL_ERROR_WLAN_DEAUTHED = 0x80130137,
CELL_NET_CTL_ERROR_WLAN_KEYINFO_EXCHNAGE_TIMEOUT = 0x8013013d,
CELL_NET_CTL_ERROR_WLAN_ASSOC_FAILED = 0x8013013e,
CELL_NET_CTL_ERROR_WLAN_AP_DISAPPEARED = 0x8013013f,
CELL_NET_CTL_ERROR_PPPOE_SESSION_INIT = 0x80130409,
CELL_NET_CTL_ERROR_PPPOE_SESSION_NO_PADO = 0x8013040a,
CELL_NET_CTL_ERROR_PPPOE_SESSION_NO_PADS = 0x8013040b,
CELL_NET_CTL_ERROR_PPPOE_SESSION_GET_PADT = 0x8013040d,
CELL_NET_CTL_ERROR_PPPOE_SESSION_SERVICE_NAME = 0x8013040f,
CELL_NET_CTL_ERROR_PPPOE_SESSION_AC_SYSTEM = 0x80130410,
CELL_NET_CTL_ERROR_PPPOE_SESSION_GENERIC = 0x80130411,
CELL_NET_CTL_ERROR_PPPOE_STATUS_AUTH = 0x80130412,
CELL_NET_CTL_ERROR_PPPOE_STATUS_NETWORK = 0x80130413,
CELL_NET_CTL_ERROR_PPPOE_STATUS_TERMINATE = 0x80130414,
CELL_NET_CTL_ERROR_DHCP_LEASE_TIME = 0x80130504,
CELL_NET_CTL_ERROR_WLAN_ASSOC_FAILED = 0x8013013e,
CELL_NET_CTL_ERROR_WLAN_AP_DISAPPEARED = 0x8013013f,
CELL_NET_CTL_ERROR_PPPOE_SESSION_INIT = 0x80130409,
CELL_NET_CTL_ERROR_PPPOE_SESSION_NO_PADO = 0x8013040a,
CELL_NET_CTL_ERROR_PPPOE_SESSION_NO_PADS = 0x8013040b,
CELL_NET_CTL_ERROR_PPPOE_SESSION_GET_PADT = 0x8013040d,
CELL_NET_CTL_ERROR_PPPOE_SESSION_SERVICE_NAME = 0x8013040f,
CELL_NET_CTL_ERROR_PPPOE_SESSION_AC_SYSTEM = 0x80130410,
CELL_NET_CTL_ERROR_PPPOE_SESSION_GENERIC = 0x80130411,
CELL_NET_CTL_ERROR_PPPOE_STATUS_AUTH = 0x80130412,
CELL_NET_CTL_ERROR_PPPOE_STATUS_NETWORK = 0x80130413,
CELL_NET_CTL_ERROR_PPPOE_STATUS_TERMINATE = 0x80130414,
CELL_NET_CTL_ERROR_DHCP_LEASE_TIME = 0x80130504,
};
// Network connection states
enum
{
CELL_NET_CTL_STATE_Disconnected = 0,
CELL_NET_CTL_STATE_Connecting = 1,
CELL_NET_CTL_STATE_IPObtaining = 2,
CELL_NET_CTL_STATE_IPObtained = 3,
CELL_NET_CTL_STATE_Connecting = 1,
CELL_NET_CTL_STATE_IPObtaining = 2,
CELL_NET_CTL_STATE_IPObtained = 3,
};
// Transition connection states
enum
{
CELL_NET_CTL_EVENT_CONNECT_REQ = 0,
CELL_NET_CTL_EVENT_ESTABLISH = 1,
CELL_NET_CTL_EVENT_GET_IP = 2,
CELL_NET_CTL_EVENT_DISCONNECT_REQ = 3,
CELL_NET_CTL_EVENT_ERROR = 4,
CELL_NET_CTL_EVENT_CONNECT_REQ = 0,
CELL_NET_CTL_EVENT_ESTABLISH = 1,
CELL_NET_CTL_EVENT_GET_IP = 2,
CELL_NET_CTL_EVENT_DISCONNECT_REQ = 3,
CELL_NET_CTL_EVENT_ERROR = 4,
CELL_NET_CTL_EVENT_LINK_DISCONNECTED = 5,
CELL_NET_CTL_EVENT_AUTO_RETRY = 6,
CELL_NET_CTL_EVENT_AUTO_RETRY = 6,
};
// Network connection devices
enum
{
CELL_NET_CTL_DEVICE_WIRED = 0,
CELL_NET_CTL_DEVICE_WIRED = 0,
CELL_NET_CTL_DEVICE_WIRELESS = 1,
};
// Cable connection types
enum
{
CELL_NET_CTL_LINK_TYPE_AUTO = 0,
CELL_NET_CTL_LINK_TYPE_10BASE_HALF = 1,
CELL_NET_CTL_LINK_TYPE_10BASE_FULL = 2,
CELL_NET_CTL_LINK_TYPE_100BASE_HALF = 3,
CELL_NET_CTL_LINK_TYPE_100BASE_FULL = 4,
CELL_NET_CTL_LINK_TYPE_AUTO = 0,
CELL_NET_CTL_LINK_TYPE_10BASE_HALF = 1,
CELL_NET_CTL_LINK_TYPE_10BASE_FULL = 2,
CELL_NET_CTL_LINK_TYPE_100BASE_HALF = 3,
CELL_NET_CTL_LINK_TYPE_100BASE_FULL = 4,
CELL_NET_CTL_LINK_TYPE_1000BASE_HALF = 5,
CELL_NET_CTL_LINK_TYPE_1000BASE_FULL = 6,
};
@ -84,88 +84,88 @@ enum
enum
{
CELL_NET_CTL_LINK_DISCONNECTED = 0,
CELL_NET_CTL_LINK_CONNECTED = 1,
CELL_NET_CTL_LINK_CONNECTED = 1,
};
// Wireless connection security measures
enum
{
CELL_NET_CTL_WLAN_SECURITY_NOAUTH = 0,
CELL_NET_CTL_WLAN_SECURITY_WEP = 1,
CELL_NET_CTL_WLAN_SECURITY_NOAUTH = 0,
CELL_NET_CTL_WLAN_SECURITY_WEP = 1,
CELL_NET_CTL_WLAN_SECURITY_WPAPSK_TKIP = 2,
CELL_NET_CTL_WLAN_SECURITY_WPAPSK_AES = 3,
CELL_NET_CTL_WLAN_SECURITY_WPAPSK_AES = 3,
CELL_NET_CTL_WLAN_SECURITY_UNSUPPORTED = 4,
};
// 802.1X settings
enum
{
CELL_NET_CTL_8021X_NONE = 0,
CELL_NET_CTL_8021X_NONE = 0,
CELL_NET_CTL_8021X_EAP_MD5 = 1,
};
// IP settings
enum
{
CELL_NET_CTL_IP_DHCP = 0,
CELL_NET_CTL_IP_DHCP = 0,
CELL_NET_CTL_IP_STATIC = 1,
CELL_NET_CTL_IP_PPPOE = 2,
CELL_NET_CTL_IP_PPPOE = 2,
};
// HTTP proxy settings
enum
{
CELL_NET_CTL_HTTP_PROXY_OFF = 0,
CELL_NET_CTL_HTTP_PROXY_ON = 1,
CELL_NET_CTL_HTTP_PROXY_ON = 1,
};
// UPnP settings
enum
{
CELL_NET_CTL_UPNP_ON = 0,
CELL_NET_CTL_UPNP_ON = 0,
CELL_NET_CTL_UPNP_OFF = 1,
};
// Codes for information
enum
{
CELL_NET_CTL_INFO_DEVICE = 1,
CELL_NET_CTL_INFO_ETHER_ADDR = 2,
CELL_NET_CTL_INFO_MTU = 3,
CELL_NET_CTL_INFO_LINK = 4,
CELL_NET_CTL_INFO_LINK_TYPE = 5,
CELL_NET_CTL_INFO_BSSID = 6,
CELL_NET_CTL_INFO_SSID = 7,
CELL_NET_CTL_INFO_WLAN_SECURITY = 8,
CELL_NET_CTL_INFO_8021X_TYPE = 9,
CELL_NET_CTL_INFO_8021X_AUTH_NAME = 10,
CELL_NET_CTL_INFO_RSSI = 11,
CELL_NET_CTL_INFO_CHANNEL = 12,
CELL_NET_CTL_INFO_IP_CONFIG = 13,
CELL_NET_CTL_INFO_DHCP_HOSTNAME = 14,
CELL_NET_CTL_INFO_PPPOE_AUTH_NAME = 15,
CELL_NET_CTL_INFO_IP_ADDRESS = 16,
CELL_NET_CTL_INFO_NETMASK = 17,
CELL_NET_CTL_INFO_DEFAULT_ROUTE = 18,
CELL_NET_CTL_INFO_PRIMARY_DNS = 19,
CELL_NET_CTL_INFO_SECONDARY_DNS = 20,
CELL_NET_CTL_INFO_DEVICE = 1,
CELL_NET_CTL_INFO_ETHER_ADDR = 2,
CELL_NET_CTL_INFO_MTU = 3,
CELL_NET_CTL_INFO_LINK = 4,
CELL_NET_CTL_INFO_LINK_TYPE = 5,
CELL_NET_CTL_INFO_BSSID = 6,
CELL_NET_CTL_INFO_SSID = 7,
CELL_NET_CTL_INFO_WLAN_SECURITY = 8,
CELL_NET_CTL_INFO_8021X_TYPE = 9,
CELL_NET_CTL_INFO_8021X_AUTH_NAME = 10,
CELL_NET_CTL_INFO_RSSI = 11,
CELL_NET_CTL_INFO_CHANNEL = 12,
CELL_NET_CTL_INFO_IP_CONFIG = 13,
CELL_NET_CTL_INFO_DHCP_HOSTNAME = 14,
CELL_NET_CTL_INFO_PPPOE_AUTH_NAME = 15,
CELL_NET_CTL_INFO_IP_ADDRESS = 16,
CELL_NET_CTL_INFO_NETMASK = 17,
CELL_NET_CTL_INFO_DEFAULT_ROUTE = 18,
CELL_NET_CTL_INFO_PRIMARY_DNS = 19,
CELL_NET_CTL_INFO_SECONDARY_DNS = 20,
CELL_NET_CTL_INFO_HTTP_PROXY_CONFIG = 21,
CELL_NET_CTL_INFO_HTTP_PROXY_SERVER = 22,
CELL_NET_CTL_INFO_HTTP_PROXY_PORT = 23,
CELL_NET_CTL_INFO_UPNP_CONFIG = 24,
CELL_NET_CTL_INFO_HTTP_PROXY_PORT = 23,
CELL_NET_CTL_INFO_UPNP_CONFIG = 24,
};
// Network start dialogs
enum
{
CELL_NET_CTL_NETSTART_TYPE_NET = 0,
CELL_NET_CTL_NETSTART_TYPE_NP = 1,
CELL_NET_CTL_NETSTART_TYPE_NP = 1,
};
// Network start dialog statuses
enum
{
CELL_SYSUTIL_NET_CTL_NETSTART_LOADED = 0x0801,
CELL_SYSUTIL_NET_CTL_NETSTART_LOADED = 0x0801,
CELL_SYSUTIL_NET_CTL_NETSTART_FINISHED = 0x0802,
CELL_SYSUTIL_NET_CTL_NETSTART_UNLOADED = 0x0803,
};
@ -174,16 +174,16 @@ enum
enum
{
CELL_NET_CTL_NATINFO_UPNP_UNCHECKED = 0,
CELL_NET_CTL_NATINFO_UPNP_NO = 1,
CELL_NET_CTL_NATINFO_UPNP_USED = 2,
CELL_NET_CTL_NATINFO_UPNP_NO = 1,
CELL_NET_CTL_NATINFO_UPNP_USED = 2,
};
// STUN NAT statuses
enum
{
CELL_NET_CTL_NATINFO_STUN_UNCHECKED = 0,
CELL_NET_CTL_NATINFO_STUN_FAILED = 1,
CELL_NET_CTL_NATINFO_STUN_OK = 2,
CELL_NET_CTL_NATINFO_STUN_FAILED = 1,
CELL_NET_CTL_NATINFO_STUN_OK = 2,
};
// NAT types

View File

@ -10,15 +10,7 @@
extern Module cellPngDec;
#undef PRX_DEBUG
#ifdef PRX_DEBUG
#include "prx_libpngdec.h"
u32 libpngdec;
u32 libpngdec_rtoc;
#endif
s64 pngDecCreate(
s32 pngDecCreate(
vm::ptr<u32> mainHandle,
vm::ptr<const CellPngDecThreadInParam> param,
vm::ptr<const CellPngDecExtThreadInParam> ext = vm::ptr<const CellPngDecExtThreadInParam>::make(0))
@ -47,7 +39,7 @@ s64 pngDecCreate(
return CELL_OK;
}
s64 pngDecDestroy(CellPngDecMainHandle dec)
s32 pngDecDestroy(CellPngDecMainHandle dec)
{
if (!Memory.Free(dec.addr()))
{
@ -57,7 +49,7 @@ s64 pngDecDestroy(CellPngDecMainHandle dec)
return CELL_OK;
}
s64 pngDecOpen(
s32 pngDecOpen(
CellPngDecMainHandle dec,
vm::ptr<u32> subHandle,
vm::ptr<const CellPngDecSrc> src,
@ -117,7 +109,7 @@ s64 pngDecOpen(
return CELL_OK;
}
s64 pngDecClose(CellPngDecSubHandle stream)
s32 pngDecClose(CellPngDecSubHandle stream)
{
cellFsClose(stream->fd);
if (!Memory.Free(stream.addr()))
@ -128,7 +120,7 @@ s64 pngDecClose(CellPngDecSubHandle stream)
return CELL_OK;
}
s64 pngReadHeader(
s32 pngReadHeader(
CellPngDecSubHandle stream,
vm::ptr<CellPngDecInfo> info,
vm::ptr<CellPngDecExtInfo> extInfo = vm::ptr<CellPngDecExtInfo>::make(0))
@ -191,7 +183,7 @@ s64 pngReadHeader(
return CELL_OK;
}
s64 pngDecSetParameter(
s32 pngDecSetParameter(
CellPngDecSubHandle stream,
vm::ptr<const CellPngDecInParam> inParam,
vm::ptr<CellPngDecOutParam> outParam,
@ -236,7 +228,7 @@ s64 pngDecSetParameter(
return CELL_OK;
}
s64 pngDecodeData(
s32 pngDecodeData(
CellPngDecSubHandle stream,
vm::ptr<u8> data,
vm::ptr<const CellPngDecDataCtrlParam> dataCtrlParam,
@ -365,13 +357,8 @@ s64 pngDecodeData(
return CELL_OK;
}
s64 cellPngDecCreate(vm::ptr<u32> mainHandle, vm::ptr<const CellPngDecThreadInParam> threadInParam, vm::ptr<CellPngDecThreadOutParam> threadOutParam)
s32 cellPngDecCreate(vm::ptr<u32> mainHandle, vm::ptr<const CellPngDecThreadInParam> threadInParam, vm::ptr<CellPngDecThreadOutParam> threadOutParam)
{
#ifdef PRX_DEBUG
cellPngDec.Warning("%s()", __FUNCTION__);
const_cast<CellPngDecThreadInParam&>(*threadInParam).spuThreadEnable = CELL_PNGDEC_SPU_THREAD_DISABLE; // hack
return GetCurrentPPUThread().FastCall2(libpngdec + 0x295C, libpngdec_rtoc);
#else
cellPngDec.Warning("cellPngDecCreate(mainHandle_addr=0x%x, threadInParam_addr=0x%x, threadOutParam_addr=0x%x)",
mainHandle.addr(), threadInParam.addr(), threadOutParam.addr());
@ -382,20 +369,15 @@ s64 cellPngDecCreate(vm::ptr<u32> mainHandle, vm::ptr<const CellPngDecThreadInPa
threadOutParam->pngCodecVersion = PNGDEC_CODEC_VERSION;
return CELL_OK;
#endif
}
s64 cellPngDecExtCreate(
s32 cellPngDecExtCreate(
vm::ptr<u32> mainHandle,
vm::ptr<const CellPngDecThreadInParam> threadInParam,
vm::ptr<CellPngDecThreadOutParam> threadOutParam,
vm::ptr<const CellPngDecExtThreadInParam> extThreadInParam,
vm::ptr<CellPngDecExtThreadOutParam> extThreadOutParam)
{
#ifdef PRX_DEBUG
cellPngDec.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libpngdec + 0x296C, libpngdec_rtoc);
#else
cellPngDec.Warning("cellPngDecCreate(mainHandle_addr=0x%x, threadInParam_addr=0x%x, threadOutParam_addr=0x%x, extThreadInParam_addr=0x%x, extThreadOutParam_addr=0x%x)",
mainHandle.addr(), threadInParam.addr(), threadOutParam.addr(), extThreadInParam.addr(), extThreadOutParam.addr());
@ -408,41 +390,30 @@ s64 cellPngDecExtCreate(
extThreadOutParam->reserved = 0;
return CELL_OK;
#endif
}
s64 cellPngDecDestroy(CellPngDecMainHandle mainHandle)
s32 cellPngDecDestroy(CellPngDecMainHandle mainHandle)
{
#ifdef PRX_DEBUG
cellPngDec.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libpngdec + 0x1E6C, libpngdec_rtoc);
#else
cellPngDec.Warning("cellPngDecDestroy(mainHandle=0x%x)", mainHandle.addr());
// destroy decoder
return pngDecDestroy(mainHandle);
#endif
}
s64 cellPngDecOpen(
s32 cellPngDecOpen(
CellPngDecMainHandle mainHandle,
vm::ptr<u32> subHandle,
vm::ptr<const CellPngDecSrc> src,
vm::ptr<CellPngDecOpnInfo> openInfo)
{
#ifdef PRX_DEBUG
cellPngDec.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libpngdec + 0x3F3C, libpngdec_rtoc);
#else
cellPngDec.Warning("cellPngDecOpen(mainHandle=0x%x, subHandle_addr=0x%x, src_addr=0x%x, openInfo_addr=0x%x)",
mainHandle.addr(), subHandle.addr(), src.addr(), openInfo.addr());
// create stream handle
return pngDecOpen(mainHandle, subHandle, src, openInfo);
#endif
}
s64 cellPngDecExtOpen(
s32 cellPngDecExtOpen(
CellPngDecMainHandle mainHandle,
vm::ptr<u32> subHandle,
vm::ptr<const CellPngDecSrc> src,
@ -450,78 +421,53 @@ s64 cellPngDecExtOpen(
vm::ptr<const CellPngDecCbCtrlStrm> cbCtrlStrm,
vm::ptr<const CellPngDecOpnParam> opnParam)
{
#ifdef PRX_DEBUG
cellPngDec.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libpngdec + 0x3F34, libpngdec_rtoc);
#else
cellPngDec.Warning("cellPngDecExtOpen(mainHandle=0x%x, subHandle_addr=0x%x, src_addr=0x%x, openInfo_addr=0x%x, cbCtrlStrm_addr=0x%x, opnParam_addr=0x%x)",
mainHandle.addr(), subHandle.addr(), src.addr(), openInfo.addr(), cbCtrlStrm.addr(), opnParam.addr());
// create stream handle
return pngDecOpen(mainHandle, subHandle, src, openInfo, cbCtrlStrm, opnParam);
#endif
}
s64 cellPngDecClose(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle)
s32 cellPngDecClose(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle)
{
#ifdef PRX_DEBUG
cellPngDec.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libpngdec + 0x066C, libpngdec_rtoc);
#else
cellPngDec.Warning("cellPngDecClose(mainHandle=0x%x, subHandle=0x%x)", mainHandle.addr(), subHandle.addr());
return pngDecClose(subHandle);
#endif
}
s64 cellPngDecReadHeader(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngDecInfo> info)
s32 cellPngDecReadHeader(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngDecInfo> info)
{
#ifdef PRX_DEBUG
cellPngDec.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libpngdec + 0x3A3C, libpngdec_rtoc);
#else
cellPngDec.Warning("cellPngDecReadHeader(mainHandle=0x%x, subHandle=0x%x, info_addr=0x%x)",
mainHandle.addr(), subHandle.addr(), info.addr());
return pngReadHeader(subHandle, info);
#endif
}
s64 cellPngDecExtReadHeader(
s32 cellPngDecExtReadHeader(
CellPngDecMainHandle mainHandle,
CellPngDecSubHandle subHandle,
vm::ptr<CellPngDecInfo> info,
vm::ptr<CellPngDecExtInfo> extInfo)
{
#ifdef PRX_DEBUG
cellPngDec.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libpngdec + 0x3A34, libpngdec_rtoc);
#else
cellPngDec.Warning("cellPngDecExtReadHeader(mainHandle=0x%x, subHandle=0x%x, info_addr=0x%x, extInfo_addr=0x%x)",
mainHandle.addr(), subHandle.addr(), info.addr(), extInfo.addr());
return pngReadHeader(subHandle, info, extInfo);
#endif
}
s64 cellPngDecSetParameter(
s32 cellPngDecSetParameter(
CellPngDecMainHandle mainHandle,
CellPngDecSubHandle subHandle,
vm::ptr<const CellPngDecInParam> inParam,
vm::ptr<CellPngDecOutParam> outParam)
{
#ifdef PRX_DEBUG
cellPngDec.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libpngdec + 0x33F4, libpngdec_rtoc);
#else
cellPngDec.Warning("cellPngDecSetParameter(mainHandle=0x%x, subHandle=0x%x, inParam_addr=0x%x, outParam_addr=0x%x)",
mainHandle.addr(), subHandle.addr(), inParam.addr(), outParam.addr());
return pngDecSetParameter(subHandle, inParam, outParam);
#endif
}
s64 cellPngDecExtSetParameter(
s32 cellPngDecExtSetParameter(
CellPngDecMainHandle mainHandle,
CellPngDecSubHandle subHandle,
vm::ptr<const CellPngDecInParam> inParam,
@ -529,36 +475,26 @@ s64 cellPngDecExtSetParameter(
vm::ptr<const CellPngDecExtInParam> extInParam,
vm::ptr<CellPngDecExtOutParam> extOutParam)
{
#ifdef PRX_DEBUG
cellPngDec.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libpngdec + 0x33EC, libpngdec_rtoc);
#else
cellPngDec.Warning("cellPngDecExtSetParameter(mainHandle=0x%x, subHandle=0x%x, inParam_addr=0x%x, outParam_addr=0x%x, extInParam=0x%x, extOutParam=0x%x",
mainHandle.addr(), subHandle.addr(), inParam.addr(), outParam.addr(), extInParam.addr(), extOutParam.addr());
return pngDecSetParameter(subHandle, inParam, outParam, extInParam, extOutParam);
#endif
}
s64 cellPngDecDecodeData(
s32 cellPngDecDecodeData(
CellPngDecMainHandle mainHandle,
CellPngDecSubHandle subHandle,
vm::ptr<u8> data,
vm::ptr<const CellPngDecDataCtrlParam> dataCtrlParam,
vm::ptr<CellPngDecDataOutInfo> dataOutInfo)
{
#ifdef PRX_DEBUG
cellPngDec.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libpngdec + 0x5D40, libpngdec_rtoc);
#else
cellPngDec.Warning("cellPngDecDecodeData(mainHandle=0x%x, subHandle=0x%x, data_addr=0x%x, dataCtrlParam_addr=0x%x, dataOutInfo_addr=0x%x)",
mainHandle.addr(), subHandle.addr(), data.addr(), dataCtrlParam.addr(), dataOutInfo.addr());
return pngDecodeData(subHandle, data, dataCtrlParam, dataOutInfo);
#endif
}
s64 cellPngDecExtDecodeData(
s32 cellPngDecExtDecodeData(
CellPngDecMainHandle mainHandle,
CellPngDecSubHandle subHandle,
vm::ptr<u8> data,
@ -567,210 +503,120 @@ s64 cellPngDecExtDecodeData(
vm::ptr<const CellPngDecCbCtrlDisp> cbCtrlDisp,
vm::ptr<CellPngDecDispParam> dispParam)
{
#ifdef PRX_DEBUG
cellPngDec.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libpngdec + 0x5D38, libpngdec_rtoc);
#else
cellPngDec.Warning("cellPngDecExtDecodeData(mainHandle=0x%x, subHandle=0x%x, data_addr=0x%x, dataCtrlParam_addr=0x%x, dataOutInfo_addr=0x%x, cbCtrlDisp_addr=0x%x, dispParam_addr=0x%x)",
mainHandle.addr(), subHandle.addr(), data.addr(), dataCtrlParam.addr(), dataOutInfo.addr(), cbCtrlDisp.addr(), dispParam.addr());
return pngDecodeData(subHandle, data, dataCtrlParam, dataOutInfo, cbCtrlDisp, dispParam);
#endif
}
s64 cellPngDecGetUnknownChunks(
s32 cellPngDecGetUnknownChunks(
CellPngDecMainHandle mainHandle,
CellPngDecSubHandle subHandle,
vm::ptr<vm::bptr<CellPngUnknownChunk>> unknownChunk,
vm::ptr<u32> unknownChunkNumber)
{
#ifdef PRX_DEBUG
cellPngDec.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libpngdec + 0x03EC, libpngdec_rtoc);
#else
UNIMPLEMENTED_FUNC(cellPngDec);
return CELL_OK;
#endif
}
s64 cellPngDecGetpCAL(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngPCAL> pcal)
s32 cellPngDecGetpCAL(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngPCAL> pcal)
{
#ifdef PRX_DEBUG
cellPngDec.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libpngdec + 0x0730, libpngdec_rtoc);
#else
UNIMPLEMENTED_FUNC(cellPngDec);
return CELL_OK;
#endif
}
s64 cellPngDecGetcHRM(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngCHRM> chrm)
s32 cellPngDecGetcHRM(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngCHRM> chrm)
{
#ifdef PRX_DEBUG
cellPngDec.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libpngdec + 0x0894, libpngdec_rtoc);
#else
UNIMPLEMENTED_FUNC(cellPngDec);
return CELL_OK;
#endif
}
s64 cellPngDecGetsCAL(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngSCAL> scal)
s32 cellPngDecGetsCAL(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngSCAL> scal)
{
#ifdef PRX_DEBUG
cellPngDec.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libpngdec + 0x09EC, libpngdec_rtoc);
#else
UNIMPLEMENTED_FUNC(cellPngDec);
return CELL_OK;
#endif
}
s64 cellPngDecGetpHYs(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngPHYS> phys)
s32 cellPngDecGetpHYs(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngPHYS> phys)
{
#ifdef PRX_DEBUG
cellPngDec.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libpngdec + 0x0B14, libpngdec_rtoc);
#else
UNIMPLEMENTED_FUNC(cellPngDec);
return CELL_OK;
#endif
}
s64 cellPngDecGetoFFs(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngOFFS> offs)
s32 cellPngDecGetoFFs(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngOFFS> offs)
{
#ifdef PRX_DEBUG
cellPngDec.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libpngdec + 0x0C58, libpngdec_rtoc);
#else
UNIMPLEMENTED_FUNC(cellPngDec);
return CELL_OK;
#endif
}
s64 cellPngDecGetsPLT(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngSPLT> splt)
s32 cellPngDecGetsPLT(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngSPLT> splt)
{
#ifdef PRX_DEBUG
cellPngDec.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libpngdec + 0x0D9C, libpngdec_rtoc);
#else
UNIMPLEMENTED_FUNC(cellPngDec);
return CELL_OK;
#endif
}
s64 cellPngDecGetbKGD(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngBKGD> bkgd)
s32 cellPngDecGetbKGD(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngBKGD> bkgd)
{
#ifdef PRX_DEBUG
cellPngDec.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libpngdec + 0x0ED0, libpngdec_rtoc);
#else
UNIMPLEMENTED_FUNC(cellPngDec);
return CELL_OK;
#endif
}
s64 cellPngDecGettIME(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngTIME> time)
s32 cellPngDecGettIME(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngTIME> time)
{
#ifdef PRX_DEBUG
cellPngDec.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libpngdec + 0x1024, libpngdec_rtoc);
#else
UNIMPLEMENTED_FUNC(cellPngDec);
return CELL_OK;
#endif
}
s64 cellPngDecGethIST(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngHIST> hist)
s32 cellPngDecGethIST(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngHIST> hist)
{
#ifdef PRX_DEBUG
cellPngDec.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libpngdec + 0x116C, libpngdec_rtoc);
#else
UNIMPLEMENTED_FUNC(cellPngDec);
return CELL_OK;
#endif
}
s64 cellPngDecGettRNS(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngTRNS> trns)
s32 cellPngDecGettRNS(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngTRNS> trns)
{
#ifdef PRX_DEBUG
cellPngDec.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libpngdec + 0x12A4, libpngdec_rtoc);
#else
UNIMPLEMENTED_FUNC(cellPngDec);
return CELL_OK;
#endif
}
s64 cellPngDecGetsBIT(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngSBIT> sbit)
s32 cellPngDecGetsBIT(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngSBIT> sbit)
{
#ifdef PRX_DEBUG
cellPngDec.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libpngdec + 0x1420, libpngdec_rtoc);
#else
UNIMPLEMENTED_FUNC(cellPngDec);
return CELL_OK;
#endif
}
s64 cellPngDecGetiCCP(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngICCP> iccp)
s32 cellPngDecGetiCCP(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngICCP> iccp)
{
#ifdef PRX_DEBUG
cellPngDec.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libpngdec + 0x1574, libpngdec_rtoc);
#else
UNIMPLEMENTED_FUNC(cellPngDec);
return CELL_OK;
#endif
}
s64 cellPngDecGetsRGB(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngSRGB> srgb)
s32 cellPngDecGetsRGB(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngSRGB> srgb)
{
#ifdef PRX_DEBUG
cellPngDec.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libpngdec + 0x16B4, libpngdec_rtoc);
#else
UNIMPLEMENTED_FUNC(cellPngDec);
return CELL_OK;
#endif
}
s64 cellPngDecGetgAMA(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngGAMA> gama)
s32 cellPngDecGetgAMA(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngGAMA> gama)
{
#ifdef PRX_DEBUG
cellPngDec.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libpngdec + 0x17CC, libpngdec_rtoc);
#else
UNIMPLEMENTED_FUNC(cellPngDec);
return CELL_OK;
#endif
}
s64 cellPngDecGetPLTE(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngPLTE> plte)
s32 cellPngDecGetPLTE(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngPLTE> plte)
{
#ifdef PRX_DEBUG
cellPngDec.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libpngdec + 0x18E4, libpngdec_rtoc);
#else
UNIMPLEMENTED_FUNC(cellPngDec);
return CELL_OK;
#endif
}
s64 cellPngDecGetTextChunk(
s32 cellPngDecGetTextChunk(
CellPngDecMainHandle mainHandle,
CellPngDecSubHandle subHandle,
vm::ptr<u32> textInfoNum,
vm::ptr<vm::bptr<CellPngTextInfo>> textInfo)
{
#ifdef PRX_DEBUG
cellPngDec.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libpngdec + 0x19FC, libpngdec_rtoc);
#else
UNIMPLEMENTED_FUNC(cellPngDec);
return CELL_OK;
#endif
}
Module cellPngDec("cellPngDec", []()
@ -804,51 +650,4 @@ Module cellPngDec("cellPngDec", []()
REG_FUNC(cellPngDec, cellPngDecOpen);
REG_FUNC(cellPngDec, cellPngDecExtDecodeData);
REG_FUNC(cellPngDec, cellPngDecDecodeData);
#ifdef PRX_DEBUG
CallAfter([]()
{
if (!Memory.MainMem.GetStartAddr()) return;
libpngdec = (u32)Memory.MainMem.AllocAlign(sizeof(libpngdec_data), 0x100000);
memcpy(vm::get_ptr<void>(libpngdec), libpngdec_data, sizeof(libpngdec_data));
libpngdec_rtoc = libpngdec + 0x49710;
extern Module* sysPrxForUser;
extern Module* cellSpurs;
extern Module* sys_fs;
FIX_IMPORT(sysPrxForUser, _sys_snprintf , libpngdec + 0x1E6D0);
FIX_IMPORT(sysPrxForUser, _sys_strlen , libpngdec + 0x1E6F0);
fix_import(sysPrxForUser, 0x3EF17F8C , libpngdec + 0x1E710);
FIX_IMPORT(sysPrxForUser, _sys_memset , libpngdec + 0x1E730);
FIX_IMPORT(sysPrxForUser, _sys_memcpy , libpngdec + 0x1E750);
FIX_IMPORT(sysPrxForUser, _sys_strcpy , libpngdec + 0x1E770);
FIX_IMPORT(sysPrxForUser, _sys_strncpy , libpngdec + 0x1E790);
FIX_IMPORT(sysPrxForUser, _sys_memcmp , libpngdec + 0x1E7B0);
FIX_IMPORT(cellSpurs, cellSpursQueueDetachLv2EventQueue , libpngdec + 0x1E7D0);
FIX_IMPORT(cellSpurs, cellSpursAttributeSetNamePrefix , libpngdec + 0x1E7F0);
FIX_IMPORT(cellSpurs, _cellSpursQueueInitialize , libpngdec + 0x1E810);
FIX_IMPORT(cellSpurs, _cellSpursTasksetAttributeInitialize, libpngdec + 0x1E830);
FIX_IMPORT(cellSpurs, cellSpursTasksetAttributeSetName , libpngdec + 0x1E850);
FIX_IMPORT(cellSpurs, cellSpursTaskGetReadOnlyAreaPattern , libpngdec + 0x1E870);
FIX_IMPORT(cellSpurs, cellSpursTaskGetContextSaveAreaSize , libpngdec + 0x1E890);
FIX_IMPORT(cellSpurs, cellSpursQueuePopBody , libpngdec + 0x1E8B0);
FIX_IMPORT(cellSpurs, cellSpursQueuePushBody , libpngdec + 0x1E8D0);
FIX_IMPORT(cellSpurs, _cellSpursAttributeInitialize , libpngdec + 0x1E8F0);
FIX_IMPORT(cellSpurs, cellSpursJoinTaskset , libpngdec + 0x1E910);
FIX_IMPORT(cellSpurs, cellSpursShutdownTaskset , libpngdec + 0x1E930);
FIX_IMPORT(cellSpurs, cellSpursInitializeWithAttribute , libpngdec + 0x1E950);
FIX_IMPORT(cellSpurs, cellSpursCreateTask , libpngdec + 0x1E970);
FIX_IMPORT(cellSpurs, cellSpursCreateTasksetWithAttribute , libpngdec + 0x1E990);
FIX_IMPORT(cellSpurs, cellSpursFinalize , libpngdec + 0x1E9B0);
FIX_IMPORT(cellSpurs, cellSpursQueueAttachLv2EventQueue , libpngdec + 0x1E9D0);
FIX_IMPORT(sys_fs, cellFsClose , libpngdec + 0x1E9F0);
FIX_IMPORT(sys_fs, cellFsRead , libpngdec + 0x1EA10);
FIX_IMPORT(sys_fs, cellFsOpen , libpngdec + 0x1EA30);
FIX_IMPORT(sys_fs, cellFsLseek , libpngdec + 0x1EA50);
fix_relocs(cellPngDec, libpngdec, 0x41C30, 0x47AB0, 0x40A00);
});
#endif
});

View File

@ -183,77 +183,77 @@ struct CellPngDecDataOutInfo
};
// Functions
s64 cellPngDecCreate(vm::ptr<u32> mainHandle, vm::ptr<const CellPngDecThreadInParam> threadInParam, vm::ptr<CellPngDecThreadOutParam> threadOutParam);
s32 cellPngDecCreate(vm::ptr<u32> mainHandle, vm::ptr<const CellPngDecThreadInParam> threadInParam, vm::ptr<CellPngDecThreadOutParam> threadOutParam);
s64 cellPngDecExtCreate(
s32 cellPngDecExtCreate(
vm::ptr<u32> mainHandle,
vm::ptr<const CellPngDecThreadInParam> threadInParam,
vm::ptr<CellPngDecThreadOutParam> threadOutParam,
vm::ptr<const CellPngDecExtThreadInParam> extThreadInParam,
vm::ptr<CellPngDecExtThreadOutParam> extThreadOutParam);
s64 cellPngDecOpen(
s32 cellPngDecOpen(
CellPngDecMainHandle mainHandle,
vm::ptr<u32> subHandle,
vm::ptr<const CellPngDecSrc> src,
vm::ptr<CellPngDecOpnInfo> openInfo);
s64 cellPngDecReadHeader(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngDecInfo> info);
s32 cellPngDecReadHeader(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngDecInfo> info);
s64 cellPngDecSetParameter(
s32 cellPngDecSetParameter(
CellPngDecMainHandle mainHandle,
CellPngDecSubHandle subHandle,
vm::ptr<const CellPngDecInParam> inParam,
vm::ptr<CellPngDecOutParam> outParam);
s64 cellPngDecDecodeData(
s32 cellPngDecDecodeData(
CellPngDecMainHandle mainHandle,
CellPngDecSubHandle subHandle,
vm::ptr<u8> data,
vm::ptr<const CellPngDecDataCtrlParam> dataCtrlParam,
vm::ptr<CellPngDecDataOutInfo> dataOutInfo);
s64 cellPngDecClose(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle);
s32 cellPngDecClose(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle);
s64 cellPngDecDestroy(CellPngDecMainHandle mainHandle);
s32 cellPngDecDestroy(CellPngDecMainHandle mainHandle);
s64 cellPngDecGetTextChunk(
s32 cellPngDecGetTextChunk(
CellPngDecMainHandle mainHandle,
CellPngDecSubHandle subHandle,
vm::ptr<u32> textInfoNum,
vm::ptr<vm::bptr<CellPngTextInfo>> textInfo);
s64 cellPngDecGetPLTE(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngPLTE> plte);
s32 cellPngDecGetPLTE(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngPLTE> plte);
s64 cellPngDecGetgAMA(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngGAMA> gama);
s32 cellPngDecGetgAMA(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngGAMA> gama);
s64 cellPngDecGetsRGB(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngSRGB> srgb);
s32 cellPngDecGetsRGB(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngSRGB> srgb);
s64 cellPngDecGetiCCP(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngICCP> iccp);
s32 cellPngDecGetiCCP(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngICCP> iccp);
s64 cellPngDecGetsBIT(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngSBIT> sbit);
s32 cellPngDecGetsBIT(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngSBIT> sbit);
s64 cellPngDecGettRNS(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngTRNS> trns);
s32 cellPngDecGettRNS(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngTRNS> trns);
s64 cellPngDecGethIST(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngHIST> hist);
s32 cellPngDecGethIST(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngHIST> hist);
s64 cellPngDecGettIME(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngTIME> time);
s32 cellPngDecGettIME(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngTIME> time);
s64 cellPngDecGetbKGD(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngBKGD> bkgd);
s32 cellPngDecGetbKGD(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngBKGD> bkgd);
s64 cellPngDecGetsPLT(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngSPLT> splt);
s32 cellPngDecGetsPLT(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngSPLT> splt);
s64 cellPngDecGetoFFs(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngOFFS> offs);
s32 cellPngDecGetoFFs(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngOFFS> offs);
s64 cellPngDecGetpHYs(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngPHYS> phys);
s32 cellPngDecGetpHYs(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngPHYS> phys);
s64 cellPngDecGetsCAL(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngSCAL> scal);
s32 cellPngDecGetsCAL(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngSCAL> scal);
s64 cellPngDecGetcHRM(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngCHRM> chrm);
s32 cellPngDecGetcHRM(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngCHRM> chrm);
s64 cellPngDecGetpCAL(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngPCAL> pcal);
s32 cellPngDecGetpCAL(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngPCAL> pcal);
s64 cellPngDecGetUnknownChunks(
s32 cellPngDecGetUnknownChunks(
CellPngDecMainHandle mainHandle,
CellPngDecSubHandle subHandle,
vm::ptr<vm::bptr<CellPngUnknownChunk>> unknownChunk,
@ -345,7 +345,7 @@ struct CellPngDecCbCtrlDisp
};
// Functions
s64 cellPngDecExtOpen(
s32 cellPngDecExtOpen(
CellPngDecMainHandle mainHandle,
vm::ptr<u32> subHandle,
vm::ptr<const CellPngDecSrc> src,
@ -353,13 +353,13 @@ s64 cellPngDecExtOpen(
vm::ptr<const CellPngDecCbCtrlStrm> cbCtrlStrm,
vm::ptr<const CellPngDecOpnParam> opnParam);
s64 cellPngDecExtReadHeader(
s32 cellPngDecExtReadHeader(
CellPngDecMainHandle mainHandle,
CellPngDecSubHandle subHandle,
vm::ptr<CellPngDecInfo> info,
vm::ptr<CellPngDecExtInfo> extInfo);
s64 cellPngDecExtSetParameter(
s32 cellPngDecExtSetParameter(
CellPngDecMainHandle mainHandle,
CellPngDecSubHandle subHandle,
vm::ptr<const CellPngDecInParam> inParam,
@ -367,7 +367,7 @@ s64 cellPngDecExtSetParameter(
vm::ptr<const CellPngDecExtInParam> extInParam,
vm::ptr<CellPngDecExtOutParam> extOutParam);
s64 cellPngDecExtDecodeData(
s32 cellPngDecExtDecodeData(
CellPngDecMainHandle mainHandle,
CellPngDecSubHandle subHandle,
vm::ptr<u8> data,

File diff suppressed because it is too large Load Diff

View File

@ -959,5 +959,5 @@ struct SpursTasksetContext
static_assert(sizeof(SpursTasksetContext) == 0x900, "Incorrect size for SpursTasksetContext");
s64 spursAttachLv2EventQueue(vm::ptr<CellSpurs> spurs, u32 queue, vm::ptr<u8> port, s32 isDynamic, bool wasCreated);
s64 spursWakeUp(PPUThread& CPU, vm::ptr<CellSpurs> spurs);
s32 spursAttachLv2EventQueue(vm::ptr<CellSpurs> spurs, u32 queue, vm::ptr<u8> port, s32 isDynamic, bool wasCreated);
s32 spursWakeUp(PPUThread& CPU, vm::ptr<CellSpurs> spurs);

View File

@ -13,692 +13,376 @@
extern Module cellSpursJq;
#ifdef PRX_DEBUG
#include "prx_libspurs_jq.h"
u32 libspurs_jq;
u32 libspurs_jq_rtoc;
#endif
s64 cellSpursJobQueueAttributeInitialize()
s32 cellSpursJobQueueAttributeInitialize()
{
#ifdef PRX_DEBUG
cellSpursJq.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x000010, libspurs_jq_rtoc);
#else
UNIMPLEMENTED_FUNC(cellSpursJq);
return CELL_OK;
#endif
}
s64 cellSpursJobQueueAttributeSetMaxGrab()
s32 cellSpursJobQueueAttributeSetMaxGrab()
{
#ifdef PRX_DEBUG
cellSpursJq.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x000058, libspurs_jq_rtoc);
#else
UNIMPLEMENTED_FUNC(cellSpursJq);
return CELL_OK;
#endif
}
s64 cellSpursJobQueueAttributeSetSubmitWithEntryLock()
s32 cellSpursJobQueueAttributeSetSubmitWithEntryLock()
{
#ifdef PRX_DEBUG
cellSpursJq.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x000098, libspurs_jq_rtoc);
#else
UNIMPLEMENTED_FUNC(cellSpursJq);
return CELL_OK;
#endif
}
s64 cellSpursJobQueueAttributeSetDoBusyWaiting()
s32 cellSpursJobQueueAttributeSetDoBusyWaiting()
{
#ifdef PRX_DEBUG
cellSpursJq.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x0000BC, libspurs_jq_rtoc);
#else
UNIMPLEMENTED_FUNC(cellSpursJq);
return CELL_OK;
#endif
}
s64 cellSpursJobQueueAttributeSetIsHaltOnError()
s32 cellSpursJobQueueAttributeSetIsHaltOnError()
{
#ifdef PRX_DEBUG
cellSpursJq.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x0000E0, libspurs_jq_rtoc);
#else
UNIMPLEMENTED_FUNC(cellSpursJq);
return CELL_OK;
#endif
}
s64 cellSpursJobQueueAttributeSetIsJobTypeMemoryCheck()
s32 cellSpursJobQueueAttributeSetIsJobTypeMemoryCheck()
{
#ifdef PRX_DEBUG
cellSpursJq.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x000104, libspurs_jq_rtoc);
#else
UNIMPLEMENTED_FUNC(cellSpursJq);
return CELL_OK;
#endif
}
s64 cellSpursJobQueueAttributeSetMaxSizeJobDescriptor()
s32 cellSpursJobQueueAttributeSetMaxSizeJobDescriptor()
{
#ifdef PRX_DEBUG
cellSpursJq.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x000128, libspurs_jq_rtoc);
#else
UNIMPLEMENTED_FUNC(cellSpursJq);
return CELL_OK;
#endif
}
s64 cellSpursJobQueueAttributeSetGrabParameters()
s32 cellSpursJobQueueAttributeSetGrabParameters()
{
#ifdef PRX_DEBUG
cellSpursJq.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x000178, libspurs_jq_rtoc);
#else
UNIMPLEMENTED_FUNC(cellSpursJq);
return CELL_OK;
#endif
}
s64 cellSpursJobQueueSetWaitingMode()
s32 cellSpursJobQueueSetWaitingMode()
{
#ifdef PRX_DEBUG
cellSpursJq.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x0001C8, libspurs_jq_rtoc);
#else
UNIMPLEMENTED_FUNC(cellSpursJq);
return CELL_OK;
#endif
}
s64 cellSpursShutdownJobQueue()
s32 cellSpursShutdownJobQueue()
{
#ifdef PRX_DEBUG
cellSpursJq.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x0002F0, libspurs_jq_rtoc);
#else
UNIMPLEMENTED_FUNC(cellSpursJq);
return CELL_OK;
#endif
}
s64 _cellSpursCreateJobQueueWithJobDescriptorPool()
s32 _cellSpursCreateJobQueueWithJobDescriptorPool()
{
#ifdef PRX_DEBUG
cellSpursJq.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x0003CC, libspurs_jq_rtoc);
#else
UNIMPLEMENTED_FUNC(cellSpursJq);
return CELL_OK;
#endif
}
s64 _cellSpursCreateJobQueue()
s32 _cellSpursCreateJobQueue()
{
#ifdef PRX_DEBUG
cellSpursJq.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x000CA8, libspurs_jq_rtoc);
#else
UNIMPLEMENTED_FUNC(cellSpursJq);
return CELL_OK;
#endif
}
s64 cellSpursJoinJobQueue()
s32 cellSpursJoinJobQueue()
{
#ifdef PRX_DEBUG
cellSpursJq.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x000CF0, libspurs_jq_rtoc);
#else
UNIMPLEMENTED_FUNC(cellSpursJq);
return CELL_OK;
#endif
}
s64 _cellSpursJobQueuePushJobListBody()
s32 _cellSpursJobQueuePushJobListBody()
{
#ifdef PRX_DEBUG
cellSpursJq.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x001B24, libspurs_jq_rtoc);
#else
UNIMPLEMENTED_FUNC(cellSpursJq);
return CELL_OK;
#endif
}
s64 _cellSpursJobQueuePushJobBody2()
s32 _cellSpursJobQueuePushJobBody2()
{
#ifdef PRX_DEBUG
cellSpursJq.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x001BF0, libspurs_jq_rtoc);
#else
UNIMPLEMENTED_FUNC(cellSpursJq);
return CELL_OK;
#endif
}
s64 _cellSpursJobQueuePushJob2Body()
s32 _cellSpursJobQueuePushJob2Body()
{
#ifdef PRX_DEBUG
cellSpursJq.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x001CD0, libspurs_jq_rtoc);
#else
UNIMPLEMENTED_FUNC(cellSpursJq);
return CELL_OK;
#endif
}
s64 _cellSpursJobQueuePushAndReleaseJobBody()
s32 _cellSpursJobQueuePushAndReleaseJobBody()
{
#ifdef PRX_DEBUG
cellSpursJq.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x001DC8, libspurs_jq_rtoc);
#else
UNIMPLEMENTED_FUNC(cellSpursJq);
return CELL_OK;
#endif
}
s64 _cellSpursJobQueuePushJobBody()
s32 _cellSpursJobQueuePushJobBody()
{
#ifdef PRX_DEBUG
cellSpursJq.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x001EC8, libspurs_jq_rtoc);
#else
UNIMPLEMENTED_FUNC(cellSpursJq);
return CELL_OK;
#endif
}
s64 _cellSpursJobQueuePushBody()
s32 _cellSpursJobQueuePushBody()
{
#ifdef PRX_DEBUG
cellSpursJq.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x001F90, libspurs_jq_rtoc);
#else
UNIMPLEMENTED_FUNC(cellSpursJq);
return CELL_OK;
#endif
}
s64 _cellSpursJobQueueAllocateJobDescriptorBody()
s32 _cellSpursJobQueueAllocateJobDescriptorBody()
{
#ifdef PRX_DEBUG
cellSpursJq.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x002434, libspurs_jq_rtoc);
#else
UNIMPLEMENTED_FUNC(cellSpursJq);
return CELL_OK;
#endif
}
s64 _cellSpursJobQueuePushSync()
s32 _cellSpursJobQueuePushSync()
{
#ifdef PRX_DEBUG
cellSpursJq.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x002498, libspurs_jq_rtoc);
#else
UNIMPLEMENTED_FUNC(cellSpursJq);
return CELL_OK;
#endif
}
s64 _cellSpursJobQueuePushFlush()
s32 _cellSpursJobQueuePushFlush()
{
#ifdef PRX_DEBUG
cellSpursJq.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x002528, libspurs_jq_rtoc);
#else
UNIMPLEMENTED_FUNC(cellSpursJq);
return CELL_OK;
#endif
}
s64 cellSpursJobQueueGetSpurs()
s32 cellSpursJobQueueGetSpurs()
{
#ifdef PRX_DEBUG
cellSpursJq.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x002598, libspurs_jq_rtoc);
#else
UNIMPLEMENTED_FUNC(cellSpursJq);
return CELL_OK;
#endif
}
s64 cellSpursJobQueueGetHandleCount()
s32 cellSpursJobQueueGetHandleCount()
{
#ifdef PRX_DEBUG
cellSpursJq.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x0025C4, libspurs_jq_rtoc);
#else
UNIMPLEMENTED_FUNC(cellSpursJq);
return CELL_OK;
#endif
}
s64 cellSpursJobQueueGetError()
s32 cellSpursJobQueueGetError()
{
#ifdef PRX_DEBUG
cellSpursJq.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x002600, libspurs_jq_rtoc);
#else
UNIMPLEMENTED_FUNC(cellSpursJq);
return CELL_OK;
#endif
}
s64 cellSpursJobQueueGetMaxSizeJobDescriptor()
s32 cellSpursJobQueueGetMaxSizeJobDescriptor()
{
#ifdef PRX_DEBUG
cellSpursJq.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x002668, libspurs_jq_rtoc);
#else
UNIMPLEMENTED_FUNC(cellSpursJq);
return CELL_OK;
#endif
}
s64 cellSpursGetJobQueueId()
s32 cellSpursGetJobQueueId()
{
#ifdef PRX_DEBUG
cellSpursJq.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x0026A4, libspurs_jq_rtoc);
#else
UNIMPLEMENTED_FUNC(cellSpursJq);
return CELL_OK;
#endif
}
s64 cellSpursJobQueueGetSuspendedJobSize()
s32 cellSpursJobQueueGetSuspendedJobSize()
{
#ifdef PRX_DEBUG
cellSpursJq.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x002700, libspurs_jq_rtoc);
#else
UNIMPLEMENTED_FUNC(cellSpursJq);
return CELL_OK;
#endif
}
s64 cellSpursJobQueueClose()
s32 cellSpursJobQueueClose()
{
#ifdef PRX_DEBUG
cellSpursJq.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x002D70, libspurs_jq_rtoc);
#else
UNIMPLEMENTED_FUNC(cellSpursJq);
return CELL_OK;
#endif
}
s64 cellSpursJobQueueOpen()
s32 cellSpursJobQueueOpen()
{
#ifdef PRX_DEBUG
cellSpursJq.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x002E50, libspurs_jq_rtoc);
#else
UNIMPLEMENTED_FUNC(cellSpursJq);
return CELL_OK;
#endif
}
s64 cellSpursJobQueueSemaphoreTryAcquire()
s32 cellSpursJobQueueSemaphoreTryAcquire()
{
#ifdef PRX_DEBUG
cellSpursJq.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x003370, libspurs_jq_rtoc);
#else
UNIMPLEMENTED_FUNC(cellSpursJq);
return CELL_OK;
#endif
}
s64 cellSpursJobQueueSemaphoreAcquire()
s32 cellSpursJobQueueSemaphoreAcquire()
{
#ifdef PRX_DEBUG
cellSpursJq.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x003378, libspurs_jq_rtoc);
#else
UNIMPLEMENTED_FUNC(cellSpursJq);
return CELL_OK;
#endif
}
s64 cellSpursJobQueueSemaphoreInitialize()
s32 cellSpursJobQueueSemaphoreInitialize()
{
#ifdef PRX_DEBUG
cellSpursJq.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x003380, libspurs_jq_rtoc);
#else
UNIMPLEMENTED_FUNC(cellSpursJq);
return CELL_OK;
#endif
}
s64 cellSpursJobQueueSendSignal()
s32 cellSpursJobQueueSendSignal()
{
#ifdef PRX_DEBUG
cellSpursJq.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x0033E0, libspurs_jq_rtoc);
#else
UNIMPLEMENTED_FUNC(cellSpursJq);
return CELL_OK;
#endif
}
s64 cellSpursJobQueuePortGetJobQueue()
s32 cellSpursJobQueuePortGetJobQueue()
{
#ifdef PRX_DEBUG
cellSpursJq.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x00354C, libspurs_jq_rtoc);
#else
UNIMPLEMENTED_FUNC(cellSpursJq);
return CELL_OK;
#endif
}
s64 _cellSpursJobQueuePortPushSync()
s32 _cellSpursJobQueuePortPushSync()
{
#ifdef PRX_DEBUG
cellSpursJq.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x003554, libspurs_jq_rtoc);
#else
UNIMPLEMENTED_FUNC(cellSpursJq);
return CELL_OK;
#endif
}
s64 _cellSpursJobQueuePortPushFlush()
s32 _cellSpursJobQueuePortPushFlush()
{
#ifdef PRX_DEBUG
cellSpursJq.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x0035C0, libspurs_jq_rtoc);
#else
UNIMPLEMENTED_FUNC(cellSpursJq);
return CELL_OK;
#endif
}
s64 _cellSpursJobQueuePortPushJobListBody()
s32 _cellSpursJobQueuePortPushJobListBody()
{
#ifdef PRX_DEBUG
cellSpursJq.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x003624, libspurs_jq_rtoc);
#else
UNIMPLEMENTED_FUNC(cellSpursJq);
return CELL_OK;
#endif
}
s64 _cellSpursJobQueuePortPushJobBody()
s32 _cellSpursJobQueuePortPushJobBody()
{
#ifdef PRX_DEBUG
cellSpursJq.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x003A88, libspurs_jq_rtoc);
#else
UNIMPLEMENTED_FUNC(cellSpursJq);
return CELL_OK;
#endif
}
s64 _cellSpursJobQueuePortPushJobBody2()
s32 _cellSpursJobQueuePortPushJobBody2()
{
#ifdef PRX_DEBUG
cellSpursJq.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x003A94, libspurs_jq_rtoc);
#else
UNIMPLEMENTED_FUNC(cellSpursJq);
return CELL_OK;
#endif
}
s64 _cellSpursJobQueuePortPushBody()
s32 _cellSpursJobQueuePortPushBody()
{
#ifdef PRX_DEBUG
cellSpursJq.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x003A98, libspurs_jq_rtoc);
#else
UNIMPLEMENTED_FUNC(cellSpursJq);
return CELL_OK;
#endif
}
s64 cellSpursJobQueuePortTrySync()
s32 cellSpursJobQueuePortTrySync()
{
#ifdef PRX_DEBUG
cellSpursJq.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x003C38, libspurs_jq_rtoc);
#else
UNIMPLEMENTED_FUNC(cellSpursJq);
return CELL_OK;
#endif
}
s64 cellSpursJobQueuePortSync()
s32 cellSpursJobQueuePortSync()
{
#ifdef PRX_DEBUG
cellSpursJq.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x003C40, libspurs_jq_rtoc);
#else
UNIMPLEMENTED_FUNC(cellSpursJq);
return CELL_OK;
#endif
}
s64 cellSpursJobQueuePortInitialize()
s32 cellSpursJobQueuePortInitialize()
{
#ifdef PRX_DEBUG
cellSpursJq.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x003C48, libspurs_jq_rtoc);
#else
UNIMPLEMENTED_FUNC(cellSpursJq);
return CELL_OK;
#endif
}
s64 cellSpursJobQueuePortInitializeWithDescriptorBuffer()
s32 cellSpursJobQueuePortInitializeWithDescriptorBuffer()
{
#ifdef PRX_DEBUG
cellSpursJq.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x003D78, libspurs_jq_rtoc);
#else
UNIMPLEMENTED_FUNC(cellSpursJq);
return CELL_OK;
#endif
}
s64 cellSpursJobQueuePortFinalize()
s32 cellSpursJobQueuePortFinalize()
{
#ifdef PRX_DEBUG
cellSpursJq.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x003E40, libspurs_jq_rtoc);
#else
UNIMPLEMENTED_FUNC(cellSpursJq);
return CELL_OK;
#endif
}
s64 _cellSpursJobQueuePortCopyPushJobBody()
s32 _cellSpursJobQueuePortCopyPushJobBody()
{
#ifdef PRX_DEBUG
cellSpursJq.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x004280, libspurs_jq_rtoc);
#else
UNIMPLEMENTED_FUNC(cellSpursJq);
return CELL_OK;
#endif
}
s64 _cellSpursJobQueuePortCopyPushJobBody2()
s32 _cellSpursJobQueuePortCopyPushJobBody2()
{
#ifdef PRX_DEBUG
cellSpursJq.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x00428C, libspurs_jq_rtoc);
#else
UNIMPLEMENTED_FUNC(cellSpursJq);
return CELL_OK;
#endif
}
s64 _cellSpursJobQueuePortCopyPushBody()
s32 _cellSpursJobQueuePortCopyPushBody()
{
#ifdef PRX_DEBUG
cellSpursJq.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x004290, libspurs_jq_rtoc);
#else
UNIMPLEMENTED_FUNC(cellSpursJq);
return CELL_OK;
#endif
}
s64 cellSpursJobQueuePort2GetJobQueue()
s32 cellSpursJobQueuePort2GetJobQueue()
{
#ifdef PRX_DEBUG
cellSpursJq.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x0042A4, libspurs_jq_rtoc);
#else
UNIMPLEMENTED_FUNC(cellSpursJq);
return CELL_OK;
#endif
}
s64 cellSpursJobQueuePort2PushSync()
s32 cellSpursJobQueuePort2PushSync()
{
#ifdef PRX_DEBUG
cellSpursJq.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x0042AC, libspurs_jq_rtoc);
#else
UNIMPLEMENTED_FUNC(cellSpursJq);
return CELL_OK;
#endif
}
s64 cellSpursJobQueuePort2PushFlush()
s32 cellSpursJobQueuePort2PushFlush()
{
#ifdef PRX_DEBUG
cellSpursJq.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x004330, libspurs_jq_rtoc);
#else
UNIMPLEMENTED_FUNC(cellSpursJq);
return CELL_OK;
#endif
}
s64 _cellSpursJobQueuePort2PushJobListBody()
s32 _cellSpursJobQueuePort2PushJobListBody()
{
#ifdef PRX_DEBUG
cellSpursJq.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x0043B0, libspurs_jq_rtoc);
#else
UNIMPLEMENTED_FUNC(cellSpursJq);
return CELL_OK;
#endif
}
s64 cellSpursJobQueuePort2Sync()
s32 cellSpursJobQueuePort2Sync()
{
#ifdef PRX_DEBUG
cellSpursJq.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x0045AC, libspurs_jq_rtoc);
#else
UNIMPLEMENTED_FUNC(cellSpursJq);
return CELL_OK;
#endif
}
s64 cellSpursJobQueuePort2Create()
s32 cellSpursJobQueuePort2Create()
{
#ifdef PRX_DEBUG
cellSpursJq.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x0046C4, libspurs_jq_rtoc);
#else
UNIMPLEMENTED_FUNC(cellSpursJq);
return CELL_OK;
#endif
}
s64 cellSpursJobQueuePort2Destroy()
s32 cellSpursJobQueuePort2Destroy()
{
#ifdef PRX_DEBUG
cellSpursJq.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x0047E4, libspurs_jq_rtoc);
#else
UNIMPLEMENTED_FUNC(cellSpursJq);
return CELL_OK;
#endif
}
s64 cellSpursJobQueuePort2AllocateJobDescriptor()
s32 cellSpursJobQueuePort2AllocateJobDescriptor()
{
#ifdef PRX_DEBUG
cellSpursJq.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x004928, libspurs_jq_rtoc);
#else
UNIMPLEMENTED_FUNC(cellSpursJq);
return CELL_OK;
#endif
}
s64 _cellSpursJobQueuePort2PushAndReleaseJobBody()
s32 _cellSpursJobQueuePort2PushAndReleaseJobBody()
{
#ifdef PRX_DEBUG
cellSpursJq.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x004D94, libspurs_jq_rtoc);
#else
UNIMPLEMENTED_FUNC(cellSpursJq);
return CELL_OK;
#endif
}
s64 _cellSpursJobQueuePort2CopyPushJobBody()
s32 _cellSpursJobQueuePort2CopyPushJobBody()
{
#ifdef PRX_DEBUG
cellSpursJq.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x004DD0, libspurs_jq_rtoc);
#else
UNIMPLEMENTED_FUNC(cellSpursJq);
return CELL_OK;
#endif
}
s64 _cellSpursJobQueuePort2PushJobBody()
s32 _cellSpursJobQueuePort2PushJobBody()
{
#ifdef PRX_DEBUG
cellSpursJq.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x004E0C, libspurs_jq_rtoc);
#else
UNIMPLEMENTED_FUNC(cellSpursJq);
return CELL_OK;
#endif
}
s64 cellSpursJobQueueSetExceptionEventHandler()
s32 cellSpursJobQueueSetExceptionEventHandler()
{
#ifdef PRX_DEBUG
cellSpursJq.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x004E48, libspurs_jq_rtoc);
#else
UNIMPLEMENTED_FUNC(cellSpursJq);
return CELL_OK;
#endif
}
s64 cellSpursJobQueueUnsetExceptionEventHandler()
s32 cellSpursJobQueueUnsetExceptionEventHandler()
{
#ifdef PRX_DEBUG
cellSpursJq.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x004EC0, libspurs_jq_rtoc);
#else
UNIMPLEMENTED_FUNC(cellSpursJq);
return CELL_OK;
#endif
}
Module cellSpursJq("cellSpursJq", []()
@ -765,43 +449,4 @@ Module cellSpursJq("cellSpursJq", []()
REG_FUNC(cellSpursJq, _cellSpursJobQueuePort2PushJobBody);
REG_FUNC(cellSpursJq, cellSpursJobQueueSetExceptionEventHandler);
REG_FUNC(cellSpursJq, cellSpursJobQueueUnsetExceptionEventHandler);
#ifdef PRX_DEBUG
CallAfter([]()
{
if (!Memory.MainMem.GetStartAddr()) return;
libspurs_jq = (u32)Memory.MainMem.AllocAlign(sizeof(libspurs_jq_data), 0x100000);
memcpy(vm::get_ptr<void>(libspurs_jq), libspurs_jq_data, sizeof(libspurs_jq_data));
libspurs_jq_rtoc = libspurs_jq + 0x17E80;
extern Module* sysPrxForUser;
extern Module* cellSpurs;
extern Module* cellFiber;
FIX_IMPORT(cellSpurs, cellSpursSendWorkloadSignal , libspurs_jq + 0x6728);
FIX_IMPORT(cellSpurs, cellSpursWorkloadAttributeSetName , libspurs_jq + 0x6748);
FIX_IMPORT(cellSpurs, cellSpursRemoveWorkload , libspurs_jq + 0x6768);
FIX_IMPORT(cellSpurs, cellSpursWaitForWorkloadShutdown , libspurs_jq + 0x6788);
FIX_IMPORT(cellSpurs, cellSpursWakeUp , libspurs_jq + 0x67A8);
FIX_IMPORT(cellSpurs, cellSpursShutdownWorkload , libspurs_jq + 0x67C8);
FIX_IMPORT(cellSpurs, cellSpursAddWorkloadWithAttribute , libspurs_jq + 0x67E8);
FIX_IMPORT(cellSpurs, cellSpursSetExceptionEventHandler , libspurs_jq + 0x6808);
FIX_IMPORT(cellSpurs, _cellSpursWorkloadAttributeInitialize , libspurs_jq + 0x6828);
FIX_IMPORT(cellFiber, cellFiberPpuSelf , libspurs_jq + 0x6848);
FIX_IMPORT(cellFiber, cellFiberPpuWaitSignal , libspurs_jq + 0x6868);
FIX_IMPORT(sysPrxForUser, _sys_strncmp , libspurs_jq + 0x6888);
FIX_IMPORT(sysPrxForUser, _sys_snprintf , libspurs_jq + 0x68A8);
FIX_IMPORT(sysPrxForUser, sys_lwcond_destroy , libspurs_jq + 0x68C8);
FIX_IMPORT(sysPrxForUser, sys_lwmutex_create , libspurs_jq + 0x68E8);
FIX_IMPORT(sysPrxForUser, _sys_memset , libspurs_jq + 0x6908);
FIX_IMPORT(sysPrxForUser, _sys_printf , libspurs_jq + 0x6928);
fix_import(sysPrxForUser, 0x9FB6228E , libspurs_jq + 0x6948);
FIX_IMPORT(sysPrxForUser, sys_lwmutex_destroy , libspurs_jq + 0x6968);
FIX_IMPORT(sysPrxForUser, sys_lwcond_create , libspurs_jq + 0x6988);
fix_import(sysPrxForUser, 0xE75C40F2 , libspurs_jq + 0x69A8);
fix_relocs(cellSpursJq, libspurs_jq, 0xFF70, 0x12370, 0xED00);
});
#endif
});

View File

@ -13,12 +13,6 @@
extern Module cellSync;
#ifdef PRX_DEBUG
#include "prx_libsre.h"
u32 libsre;
u32 libsre_rtoc;
#endif
waiter_map_t g_sync_mutex_wm("sync_mutex_wm");
waiter_map_t g_sync_barrier_wait_wm("sync_barrier_wait_wm");
waiter_map_t g_sync_barrier_notify_wm("sync_barrier_notify_wm");
@ -835,15 +829,6 @@ s32 cellSyncQueueClear(vm::ptr<CellSyncQueue> queue)
// LFQueue functions
void syncLFQueueDump(vm::ptr<CellSyncLFQueue> queue)
{
cellSync.Notice("CellSyncLFQueue dump: addr = 0x%x", queue.addr());
for (u32 i = 0; i < sizeof(CellSyncLFQueue) / 16; i++)
{
cellSync.Notice("*** 0x%.16llx 0x%.16llx", vm::read64(queue.addr() + i * 16), vm::read64(queue.addr() + i * 16 + 8));
}
}
void syncLFQueueInit(vm::ptr<CellSyncLFQueue> queue, vm::ptr<u8> buffer, u32 size, u32 depth, CellSyncQueueDirection direction, vm::ptr<void> eaSignal)
{
queue->m_size = size;
@ -886,11 +871,6 @@ void syncLFQueueInit(vm::ptr<CellSyncLFQueue> queue, vm::ptr<u8> buffer, u32 siz
s32 syncLFQueueInitialize(vm::ptr<CellSyncLFQueue> queue, vm::ptr<u8> buffer, u32 size, u32 depth, CellSyncQueueDirection direction, vm::ptr<void> eaSignal)
{
#ifdef PRX_DEBUG_XXX
return cb_caller<s32, vm::ptr<CellSyncLFQueue>, vm::ptr<u8>, u32, u32, CellSyncQueueDirection, vm::ptr<void>>::call(GetCurrentPPUThread(), libsre + 0x205C, libsre_rtoc,
queue, buffer, size, depth, direction, eaSignal);
#endif
if (!queue)
{
return CELL_SYNC_ERROR_NULL_POINTER;
@ -1112,10 +1092,7 @@ s32 _cellSyncLFQueueGetPushPointer(vm::ptr<CellSyncLFQueue> queue, vm::ptr<u32>
s32 syncLFQueueGetPushPointer2(vm::ptr<CellSyncLFQueue> queue, s32& pointer, u32 isBlocking, u32 useEventQueue)
{
// TODO
//pointer = 0;
assert(!"syncLFQueueGetPushPointer2()");
return CELL_OK;
throw __FUNCTION__;
}
s32 _cellSyncLFQueueGetPushPointer2(vm::ptr<CellSyncLFQueue> queue, vm::ptr<u32> pointer, u32 isBlocking, u32 useEventQueue)
@ -1274,10 +1251,7 @@ s32 _cellSyncLFQueueCompletePushPointer(vm::ptr<CellSyncLFQueue> queue, s32 poin
s32 syncLFQueueCompletePushPointer2(vm::ptr<CellSyncLFQueue> queue, s32 pointer, const std::function<s32(u32 addr, u32 arg)> fpSendSignal)
{
// TODO
//if (fpSendSignal) return fpSendSignal(0, 0);
assert(!"syncLFQueueCompletePushPointer2()");
return CELL_OK;
throw __FUNCTION__;
}
s32 _cellSyncLFQueueCompletePushPointer2(vm::ptr<CellSyncLFQueue> queue, s32 pointer, vm::ptr<s32(u32 addr, u32 arg)> fpSendSignal)
@ -1304,32 +1278,18 @@ s32 _cellSyncLFQueuePushBody(PPUThread& CPU, vm::ptr<CellSyncLFQueue> queue, vm:
}
s32 position;
#ifdef PRX_DEBUG
vm::stackvar<be_t<s32>> position_v(CPU);
#endif
while (true)
{
s32 res;
if (queue->m_direction != CELL_SYNC_QUEUE_ANY2ANY)
{
#ifdef PRX_DEBUG_XXX
res = cb_call<s32, vm::ptr<CellSyncLFQueue>, u32, u32, u64>(CPU, libsre + 0x24B0, libsre_rtoc,
queue, position_v.addr(), isBlocking, 0);
position = position_v.value();
#else
res = syncLFQueueGetPushPointer(queue, position, isBlocking, 0);
#endif
}
else
{
#ifdef PRX_DEBUG
res = cb_call<s32, vm::ptr<CellSyncLFQueue>, u32, u32, u64>(CPU, libsre + 0x3050, libsre_rtoc,
queue, position_v.addr(), isBlocking, 0);
position = position_v.value();
#else
res = syncLFQueueGetPushPointer2(queue, position, isBlocking, 0);
#endif
}
if (!isBlocking || res != CELL_SYNC_ERROR_AGAIN)
@ -1342,6 +1302,7 @@ s32 _cellSyncLFQueuePushBody(PPUThread& CPU, vm::ptr<CellSyncLFQueue> queue, vm:
}
std::this_thread::sleep_for(std::chrono::milliseconds(1)); // hack
if (Emu.IsStopped())
{
cellSync.Warning("_cellSyncLFQueuePushBody(queue_addr=0x%x) aborted", queue.addr());
@ -1355,23 +1316,14 @@ s32 _cellSyncLFQueuePushBody(PPUThread& CPU, vm::ptr<CellSyncLFQueue> queue, vm:
memcpy(vm::get_ptr<void>(addr), buffer.get_ptr(), size);
s32 res;
if (queue->m_direction != CELL_SYNC_QUEUE_ANY2ANY)
{
#ifdef PRX_DEBUG_XXX
res = cb_call<s32, vm::ptr<CellSyncLFQueue>, s32, u64>(CPU, libsre + 0x26C0, libsre_rtoc,
queue, position, 0);
#else
res = syncLFQueueCompletePushPointer(queue, position, nullptr);
#endif
}
else
{
#ifdef PRX_DEBUG
res = cb_call<s32, vm::ptr<CellSyncLFQueue>, s32, u64>(CPU, libsre + 0x355C, libsre_rtoc,
queue, position, 0);
#else
res = syncLFQueueCompletePushPointer2(queue, position, nullptr);
#endif
}
return res;
@ -1491,10 +1443,7 @@ s32 _cellSyncLFQueueGetPopPointer(vm::ptr<CellSyncLFQueue> queue, vm::ptr<u32> p
s32 syncLFQueueGetPopPointer2(vm::ptr<CellSyncLFQueue> queue, s32& pointer, u32 isBlocking, u32 useEventQueue)
{
// TODO
//pointer = 0;
assert(!"syncLFQueueGetPopPointer2()");
return CELL_OK;
throw __FUNCTION__;
}
s32 _cellSyncLFQueueGetPopPointer2(vm::ptr<CellSyncLFQueue> queue, vm::ptr<u32> pointer, u32 isBlocking, u32 useEventQueue)
@ -1653,10 +1602,7 @@ s32 _cellSyncLFQueueCompletePopPointer(vm::ptr<CellSyncLFQueue> queue, s32 point
s32 syncLFQueueCompletePopPointer2(vm::ptr<CellSyncLFQueue> queue, s32 pointer, const std::function<s32(u32 addr, u32 arg)> fpSendSignal, u32 noQueueFull)
{
// TODO
//if (fpSendSignal) fpSendSignal(0, 0);
assert(!"syncLFQueueCompletePopPointer2()");
return CELL_OK;
throw __FUNCTION__;
}
s32 _cellSyncLFQueueCompletePopPointer2(vm::ptr<CellSyncLFQueue> queue, s32 pointer, vm::ptr<s32(u32 addr, u32 arg)> fpSendSignal, u32 noQueueFull)
@ -1683,31 +1629,17 @@ s32 _cellSyncLFQueuePopBody(PPUThread& CPU, vm::ptr<CellSyncLFQueue> queue, vm::
}
s32 position;
#ifdef PRX_DEBUG
vm::stackvar<be_t<s32>> position_v(CPU);
#endif
while (true)
{
s32 res;
if (queue->m_direction != CELL_SYNC_QUEUE_ANY2ANY)
{
#ifdef PRX_DEBUG_XXX
res = cb_call<s32, vm::ptr<CellSyncLFQueue>, u32, u32, u64, u64>(CPU, libsre + 0x2A90, libsre_rtoc,
queue, position_v.addr(), isBlocking, 0, 0);
position = position_v.value();
#else
res = syncLFQueueGetPopPointer(queue, position, isBlocking, 0, 0);
#endif
}
else
{
#ifdef PRX_DEBUG
res = cb_call<s32, vm::ptr<CellSyncLFQueue>, u32, u32, u64>(CPU, libsre + 0x39AC, libsre_rtoc,
queue, position_v.addr(), isBlocking, 0);
position = position_v.value();
#else
res = syncLFQueueGetPopPointer2(queue, position, isBlocking, 0);
#endif
}
if (!isBlocking || res != CELL_SYNC_ERROR_AGAIN)
@ -1720,6 +1652,7 @@ s32 _cellSyncLFQueuePopBody(PPUThread& CPU, vm::ptr<CellSyncLFQueue> queue, vm::
}
std::this_thread::sleep_for(std::chrono::milliseconds(1)); // hack
if (Emu.IsStopped())
{
cellSync.Warning("_cellSyncLFQueuePopBody(queue_addr=0x%x) aborted", queue.addr());
@ -1733,23 +1666,14 @@ s32 _cellSyncLFQueuePopBody(PPUThread& CPU, vm::ptr<CellSyncLFQueue> queue, vm::
memcpy(buffer.get_ptr(), vm::get_ptr<void>(addr), size);
s32 res;
if (queue->m_direction != CELL_SYNC_QUEUE_ANY2ANY)
{
#ifdef PRX_DEBUG_XXX
res = cb_call<s32, vm::ptr<CellSyncLFQueue>, s32, u64, u64>(CPU, libsre + 0x2CA8, libsre_rtoc,
queue, position, 0, 0);
#else
res = syncLFQueueCompletePopPointer(queue, position, nullptr, 0);
#endif
}
else
{
#ifdef PRX_DEBUG
res = cb_call<s32, vm::ptr<CellSyncLFQueue>, s32, u64, u64>(CPU, libsre + 0x3EB8, libsre_rtoc,
queue, position, 0, 0);
#else
res = syncLFQueueCompletePopPointer2(queue, position, nullptr, 0);
#endif
}
return res;
@ -1910,13 +1834,7 @@ s32 cellSyncLFQueueGetEntrySize(vm::ptr<const CellSyncLFQueue> queue, vm::ptr<u3
s32 syncLFQueueAttachLv2EventQueue(vm::ptr<u32> spus, u32 num, vm::ptr<CellSyncLFQueue> queue)
{
#ifdef PRX_DEBUG
return cb_call<s32, vm::ptr<u32>, u32, vm::ptr<CellSyncLFQueue>>(GetCurrentPPUThread(), libsre + 0x19A8, libsre_rtoc,
spus, num, queue);
#endif
assert(!"syncLFQueueAttachLv2EventQueue()");
return CELL_OK;
throw __FUNCTION__;
}
s32 _cellSyncLFQueueAttachLv2EventQueue(vm::ptr<u32> spus, u32 num, vm::ptr<CellSyncLFQueue> queue)
@ -1928,13 +1846,7 @@ s32 _cellSyncLFQueueAttachLv2EventQueue(vm::ptr<u32> spus, u32 num, vm::ptr<Cell
s32 syncLFQueueDetachLv2EventQueue(vm::ptr<u32> spus, u32 num, vm::ptr<CellSyncLFQueue> queue)
{
#ifdef PRX_DEBUG
return cb_call<s32, vm::ptr<u32>, u32, vm::ptr<CellSyncLFQueue>>(GetCurrentPPUThread(), libsre + 0x1DA0, libsre_rtoc,
spus, num, queue);
#endif
assert(!"syncLFQueueDetachLv2EventQueue()");
return CELL_OK;
throw __FUNCTION__;
}
s32 _cellSyncLFQueueDetachLv2EventQueue(vm::ptr<u32> spus, u32 num, vm::ptr<CellSyncLFQueue> queue)
@ -1992,53 +1904,4 @@ Module cellSync("cellSync", []()
cellSync.AddFunc(0xe1bc7add, _cellSyncLFQueuePopBody);
cellSync.AddFunc(0xe9bf2110, _cellSyncLFQueueGetPushPointer);
cellSync.AddFunc(0xfe74e8e7, _cellSyncLFQueueCompletePopPointer);
#ifdef PRX_DEBUG
CallAfter([]()
{
if (!Memory.MainMem.GetStartAddr()) return;
libsre = (u32)Memory.MainMem.AllocAlign(sizeof(libsre_data), 0x100000);
memcpy(vm::get_ptr<void>(libsre), libsre_data, sizeof(libsre_data));
libsre_rtoc = libsre + 0x399B0;
extern Module* sysPrxForUser;
FIX_IMPORT(sysPrxForUser, cellUserTraceRegister , libsre + 0x1D5BC); // ???
FIX_IMPORT(sysPrxForUser, cellUserTraceUnregister , libsre + 0x1D5DC); // ???
FIX_IMPORT(sysPrxForUser, _sys_strncmp , libsre + 0x1D5FC);
FIX_IMPORT(sysPrxForUser, _sys_strcat , libsre + 0x1D61C);
FIX_IMPORT(sysPrxForUser, _sys_vsnprintf , libsre + 0x1D63C);
FIX_IMPORT(sysPrxForUser, _sys_snprintf , libsre + 0x1D65C);
FIX_IMPORT(sysPrxForUser, sys_lwmutex_lock , libsre + 0x1D67C);
FIX_IMPORT(sysPrxForUser, sys_lwmutex_unlock , libsre + 0x1D69C);
FIX_IMPORT(sysPrxForUser, sys_lwcond_destroy , libsre + 0x1D6BC);
FIX_IMPORT(sysPrxForUser, sys_ppu_thread_create , libsre + 0x1D6DC);
FIX_IMPORT(sysPrxForUser, sys_lwcond_wait , libsre + 0x1D6FC);
FIX_IMPORT(sysPrxForUser, _sys_strlen , libsre + 0x1D71C);
FIX_IMPORT(sysPrxForUser, sys_lwmutex_create , libsre + 0x1D73C);
FIX_IMPORT(sysPrxForUser, _sys_spu_printf_detach_group , libsre + 0x1D75C);
FIX_IMPORT(sysPrxForUser, _sys_memset , libsre + 0x1D77C);
FIX_IMPORT(sysPrxForUser, _sys_memcpy , libsre + 0x1D79C);
FIX_IMPORT(sysPrxForUser, _sys_strncat , libsre + 0x1D7BC);
FIX_IMPORT(sysPrxForUser, _sys_strcpy , libsre + 0x1D7DC);
FIX_IMPORT(sysPrxForUser, _sys_printf , libsre + 0x1D7FC);
fix_import(sysPrxForUser, 0x9FB6228E , libsre + 0x1D81C);
FIX_IMPORT(sysPrxForUser, sys_ppu_thread_exit , libsre + 0x1D83C);
FIX_IMPORT(sysPrxForUser, sys_lwmutex_destroy , libsre + 0x1D85C);
FIX_IMPORT(sysPrxForUser, _sys_strncpy , libsre + 0x1D87C);
FIX_IMPORT(sysPrxForUser, sys_lwcond_create , libsre + 0x1D89C);
FIX_IMPORT(sysPrxForUser, _sys_spu_printf_attach_group , libsre + 0x1D8BC);
FIX_IMPORT(sysPrxForUser, sys_prx_get_module_id_by_name , libsre + 0x1D8DC);
FIX_IMPORT(sysPrxForUser, sys_spu_image_close , libsre + 0x1D8FC);
fix_import(sysPrxForUser, 0xE75C40F2 , libsre + 0x1D91C);
FIX_IMPORT(sysPrxForUser, sys_spu_image_import , libsre + 0x1D93C);
FIX_IMPORT(sysPrxForUser, sys_lwcond_signal , libsre + 0x1D95C);
FIX_IMPORT(sysPrxForUser, _sys_vprintf , libsre + 0x1D97C);
FIX_IMPORT(sysPrxForUser, _sys_memcmp , libsre + 0x1D99C);
fix_relocs(cellSync, libsre, 0x31EE0, 0x3A4F0, 0x2DF00);
});
#endif
});

View File

@ -135,16 +135,18 @@ struct CellSyncLFQueue
be_t<u16> m_h6;
};
union
union // 0x0
{
atomic_t<pop1_t> pop1; // 0x0
atomic_t<pop1_t> pop1;
atomic_t<pop3_t> pop3;
};
union
union // 0x8
{
atomic_t<push1_t> push1; // 0x8
atomic_t<push1_t> push1;
atomic_t<push3_t> push3;
};
be_t<u32> m_size; // 0x10
be_t<u32> m_depth; // 0x14
vm::bptr<u8, 1, u64> m_buffer; // 0x18
@ -159,6 +161,23 @@ struct CellSyncLFQueue
vm::bptr<void, 1, u64> m_eaSignal; // 0x70
be_t<u32> m_v2; // 0x78
be_t<u32> m_eq_id; // 0x7C
std::string dump()
{
std::string res = "CellSyncLFQueue dump:";
auto data = (be_t<u64>*)this;
for (u32 i = 0; i < sizeof(CellSyncLFQueue) / sizeof(u64); i += 2)
{
res += "\n*** 0x";
res += fmt::to_hex(data[i + 0], 16);
res += " 0x";
res += fmt::to_hex(data[i + 1], 16);
}
return res;
}
};
static_assert(sizeof(CellSyncLFQueue) == 128, "CellSyncLFQueue: wrong size");

View File

@ -7,18 +7,8 @@
extern Module cellSync2;
#ifdef PRX_DEBUG
#include "prx_libsync2.h"
u32 libsync2;
u32 libsync2_rtoc;
#endif
s64 _cellSync2MutexAttributeInitialize(vm::ptr<CellSync2MutexAttribute> attr, u32 sdkVersion)
s32 _cellSync2MutexAttributeInitialize(vm::ptr<CellSync2MutexAttribute> attr, u32 sdkVersion)
{
#ifdef PRX_DEBUG
cellSync2.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libsync2 + 0x16A0, libsync2_rtoc);
#else
cellSync2.Warning("_cellSync2MutexAttributeInitialize(attr_addr=0x%x, sdkVersion=0x%x)", attr.addr(), sdkVersion);
attr->sdkVersion = sdkVersion;
@ -30,85 +20,50 @@ s64 _cellSync2MutexAttributeInitialize(vm::ptr<CellSync2MutexAttribute> attr, u3
strcpy_trunc(attr->name, "CellSync2Mutex");
return CELL_OK;
#endif
}
s64 cellSync2MutexEstimateBufferSize(vm::ptr<const CellSync2MutexAttribute> attr, vm::ptr<u32> bufferSize)
s32 cellSync2MutexEstimateBufferSize(vm::ptr<const CellSync2MutexAttribute> attr, vm::ptr<u32> bufferSize)
{
#ifdef PRX_DEBUG
cellSync2.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libsync2 + 0xC3C, libsync2_rtoc);
#else
cellSync2.Todo("cellSync2MutexEstimateBufferSize(attr_addr=0x%x, bufferSize_addr=0x%x)", attr.addr(), bufferSize.addr());
if (attr->maxWaiters > 32768)
return CELL_SYNC2_ERROR_INVAL;
return CELL_OK;
#endif
}
s64 cellSync2MutexInitialize()
s32 cellSync2MutexInitialize()
{
#ifdef PRX_DEBUG
cellSync2.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libsync2 + 0x1584, libsync2_rtoc);
#else
UNIMPLEMENTED_FUNC(cellSync2);
return CELL_OK;
#endif
}
s64 cellSync2MutexFinalize()
s32 cellSync2MutexFinalize()
{
#ifdef PRX_DEBUG
cellSync2.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libsync2 + 0x142C, libsync2_rtoc);
#else
UNIMPLEMENTED_FUNC(cellSync2);
return CELL_OK;
#endif
}
s64 cellSync2MutexLock()
s32 cellSync2MutexLock()
{
#ifdef PRX_DEBUG
cellSync2.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libsync2 + 0x1734, libsync2_rtoc);
#else
UNIMPLEMENTED_FUNC(cellSync2);
return CELL_OK;
#endif
}
s64 cellSync2MutexTryLock()
s32 cellSync2MutexTryLock()
{
#ifdef PRX_DEBUG
cellSync2.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libsync2 + 0x1A2C, libsync2_rtoc);
#else
UNIMPLEMENTED_FUNC(cellSync2);
return CELL_OK;
#endif
}
s64 cellSync2MutexUnlock()
s32 cellSync2MutexUnlock()
{
#ifdef PRX_DEBUG
cellSync2.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libsync2 + 0x186C, libsync2_rtoc);
#else
UNIMPLEMENTED_FUNC(cellSync2);
return CELL_OK;
#endif
}
s64 _cellSync2CondAttributeInitialize(vm::ptr<CellSync2CondAttribute> attr, u32 sdkVersion)
s32 _cellSync2CondAttributeInitialize(vm::ptr<CellSync2CondAttribute> attr, u32 sdkVersion)
{
#ifdef PRX_DEBUG
cellSync2.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libsync2 + 0x26DC, libsync2_rtoc);
#else
cellSync2.Warning("_cellSync2CondAttributeInitialize(attr_addr=0x%x, sdkVersion=0x%x)", attr.addr(), sdkVersion);
attr->sdkVersion = sdkVersion;
@ -116,85 +71,50 @@ s64 _cellSync2CondAttributeInitialize(vm::ptr<CellSync2CondAttribute> attr, u32
strcpy_trunc(attr->name, "CellSync2Cond");
return CELL_OK;
#endif
}
s64 cellSync2CondEstimateBufferSize(vm::ptr<const CellSync2CondAttribute> attr, vm::ptr<u32> bufferSize)
s32 cellSync2CondEstimateBufferSize(vm::ptr<const CellSync2CondAttribute> attr, vm::ptr<u32> bufferSize)
{
#ifdef PRX_DEBUG
cellSync2.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libsync2 + 0x1B90, libsync2_rtoc);
#else
cellSync2.Todo("cellSync2CondEstimateBufferSize(attr_addr=0x%x, bufferSize_addr=0x%x)", attr.addr(), bufferSize.addr());
if (attr->maxWaiters == 0 || attr->maxWaiters > 32768)
return CELL_SYNC2_ERROR_INVAL;
return CELL_OK;
#endif
}
s64 cellSync2CondInitialize()
s32 cellSync2CondInitialize()
{
#ifdef PRX_DEBUG
cellSync2.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libsync2 + 0x25DC, libsync2_rtoc);
#else
UNIMPLEMENTED_FUNC(cellSync2);
return CELL_OK;
#endif
}
s64 cellSync2CondFinalize()
s32 cellSync2CondFinalize()
{
#ifdef PRX_DEBUG
cellSync2.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libsync2 + 0x23E0, libsync2_rtoc);
#else
UNIMPLEMENTED_FUNC(cellSync2);
return CELL_OK;
#endif
}
s64 cellSync2CondWait()
s32 cellSync2CondWait()
{
#ifdef PRX_DEBUG
cellSync2.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libsync2 + 0x283C, libsync2_rtoc);
#else
UNIMPLEMENTED_FUNC(cellSync2);
return CELL_OK;
#endif
}
s64 cellSync2CondSignal()
s32 cellSync2CondSignal()
{
#ifdef PRX_DEBUG
cellSync2.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libsync2 + 0x2768, libsync2_rtoc);
#else
UNIMPLEMENTED_FUNC(cellSync2);
return CELL_OK;
#endif
}
s64 cellSync2CondSignalAll()
s32 cellSync2CondSignalAll()
{
#ifdef PRX_DEBUG
cellSync2.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libsync2 + 0x2910, libsync2_rtoc);
#else
UNIMPLEMENTED_FUNC(cellSync2);
return CELL_OK;
#endif
}
s64 _cellSync2SemaphoreAttributeInitialize(vm::ptr<CellSync2SemaphoreAttribute> attr, u32 sdkVersion)
s32 _cellSync2SemaphoreAttributeInitialize(vm::ptr<CellSync2SemaphoreAttribute> attr, u32 sdkVersion)
{
#ifdef PRX_DEBUG
cellSync2.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libsync2 + 0x5644, libsync2_rtoc);
#else
cellSync2.Warning("_cellSync2SemaphoreAttributeInitialize(attr_addr=0x%x, sdkVersion=0x%x)", attr.addr(), sdkVersion);
attr->sdkVersion = sdkVersion;
@ -205,96 +125,56 @@ s64 _cellSync2SemaphoreAttributeInitialize(vm::ptr<CellSync2SemaphoreAttribute>
strcpy_trunc(attr->name, "CellSync2Semaphore");
return CELL_OK;
#endif
}
s64 cellSync2SemaphoreEstimateBufferSize(vm::ptr<const CellSync2SemaphoreAttribute> attr, vm::ptr<u32> bufferSize)
s32 cellSync2SemaphoreEstimateBufferSize(vm::ptr<const CellSync2SemaphoreAttribute> attr, vm::ptr<u32> bufferSize)
{
#ifdef PRX_DEBUG
cellSync2.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libsync2 + 0x4AC4, libsync2_rtoc);
#else
cellSync2.Todo("cellSync2SemaphoreEstimateBufferSize(attr_addr=0x%x, bufferSize_addr=0x%x)", attr.addr(), bufferSize.addr());
if (attr->maxWaiters == 0 || attr->maxWaiters > 32768)
return CELL_SYNC2_ERROR_INVAL;
return CELL_OK;
#endif
}
s64 cellSync2SemaphoreInitialize()
s32 cellSync2SemaphoreInitialize()
{
#ifdef PRX_DEBUG
cellSync2.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libsync2 + 0x54E0, libsync2_rtoc);
#else
UNIMPLEMENTED_FUNC(cellSync2);
return CELL_OK;
#endif
}
s64 cellSync2SemaphoreFinalize()
s32 cellSync2SemaphoreFinalize()
{
#ifdef PRX_DEBUG
cellSync2.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libsync2 + 0x52F0, libsync2_rtoc);
#else
UNIMPLEMENTED_FUNC(cellSync2);
return CELL_OK;
#endif
}
s64 cellSync2SemaphoreAcquire()
s32 cellSync2SemaphoreAcquire()
{
#ifdef PRX_DEBUG
cellSync2.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libsync2 + 0x57A4, libsync2_rtoc);
#else
UNIMPLEMENTED_FUNC(cellSync2);
return CELL_OK;
#endif
}
s64 cellSync2SemaphoreTryAcquire()
s32 cellSync2SemaphoreTryAcquire()
{
#ifdef PRX_DEBUG
cellSync2.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libsync2 + 0x56D8, libsync2_rtoc);
#else
UNIMPLEMENTED_FUNC(cellSync2);
return CELL_OK;
#endif
}
s64 cellSync2SemaphoreRelease()
s32 cellSync2SemaphoreRelease()
{
#ifdef PRX_DEBUG
cellSync2.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libsync2 + 0x5870, libsync2_rtoc);
#else
UNIMPLEMENTED_FUNC(cellSync2);
return CELL_OK;
#endif
}
s64 cellSync2SemaphoreGetCount()
s32 cellSync2SemaphoreGetCount()
{
#ifdef PRX_DEBUG
cellSync2.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libsync2 + 0x4B4C, libsync2_rtoc);
#else
UNIMPLEMENTED_FUNC(cellSync2);
return CELL_OK;
#endif
}
s64 _cellSync2QueueAttributeInitialize(vm::ptr<CellSync2QueueAttribute> attr, u32 sdkVersion)
s32 _cellSync2QueueAttributeInitialize(vm::ptr<CellSync2QueueAttribute> attr, u32 sdkVersion)
{
#ifdef PRX_DEBUG
cellSync2.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libsync2 + 0x3C5C, libsync2_rtoc);
#else
cellSync2.Warning("_cellSync2QueueAttributeInitialize(attr_addr=0x%x, sdkVersion=0x%x)", attr.addr(), sdkVersion);
attr->sdkVersion = sdkVersion;
@ -308,15 +188,10 @@ s64 _cellSync2QueueAttributeInitialize(vm::ptr<CellSync2QueueAttribute> attr, u3
strcpy_trunc(attr->name, "CellSync2Queue");
return CELL_OK;
#endif
}
s64 cellSync2QueueEstimateBufferSize(vm::ptr<const CellSync2QueueAttribute> attr, vm::ptr<u32> bufferSize)
s32 cellSync2QueueEstimateBufferSize(vm::ptr<const CellSync2QueueAttribute> attr, vm::ptr<u32> bufferSize)
{
#ifdef PRX_DEBUG
cellSync2.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libsync2 + 0x2A98, libsync2_rtoc);
#else
cellSync2.Todo("cellSync2QueueEstimateBufferSize(attr_addr=0x%x, bufferSize_addr=0x%x)", attr.addr(), bufferSize.addr());
if (attr->elementSize == 0 || attr->elementSize > 16384 || attr->elementSize % 16 || attr->depth == 0 || attr->depth > 4294967292 ||
@ -324,95 +199,54 @@ s64 cellSync2QueueEstimateBufferSize(vm::ptr<const CellSync2QueueAttribute> attr
return CELL_SYNC2_ERROR_INVAL;
return CELL_OK;
#endif
}
s64 cellSync2QueueInitialize()
s32 cellSync2QueueInitialize()
{
#ifdef PRX_DEBUG
cellSync2.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libsync2 + 0x3F98, libsync2_rtoc);
#else
UNIMPLEMENTED_FUNC(cellSync2);
return CELL_OK;
#endif
}
s64 cellSync2QueueFinalize()
s32 cellSync2QueueFinalize()
{
#ifdef PRX_DEBUG
cellSync2.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libsync2 + 0x3C28, libsync2_rtoc);
#else
UNIMPLEMENTED_FUNC(cellSync2);
return CELL_OK;
#endif
}
s64 cellSync2QueuePush()
s32 cellSync2QueuePush()
{
#ifdef PRX_DEBUG
cellSync2.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libsync2 + 0x478C, libsync2_rtoc);
#else
UNIMPLEMENTED_FUNC(cellSync2);
return CELL_OK;
#endif
}
s64 cellSync2QueueTryPush()
s32 cellSync2QueueTryPush()
{
#ifdef PRX_DEBUG
cellSync2.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libsync2 + 0x4680, libsync2_rtoc);
#else
UNIMPLEMENTED_FUNC(cellSync2);
return CELL_OK;
#endif
}
s64 cellSync2QueuePop()
s32 cellSync2QueuePop()
{
#ifdef PRX_DEBUG
cellSync2.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libsync2 + 0x4974, libsync2_rtoc);
#else
UNIMPLEMENTED_FUNC(cellSync2);
return CELL_OK;
#endif
}
s64 cellSync2QueueTryPop()
s32 cellSync2QueueTryPop()
{
#ifdef PRX_DEBUG
cellSync2.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libsync2 + 0x4880, libsync2_rtoc);
#else
UNIMPLEMENTED_FUNC(cellSync2);
return CELL_OK;
#endif
}
s64 cellSync2QueueGetSize()
s32 cellSync2QueueGetSize()
{
#ifdef PRX_DEBUG
cellSync2.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libsync2 + 0x2C00, libsync2_rtoc);
#else
UNIMPLEMENTED_FUNC(cellSync2);
return CELL_OK;
#endif
}
s64 cellSync2QueueGetDepth()
s32 cellSync2QueueGetDepth()
{
#ifdef PRX_DEBUG
cellSync2.Warning("%s()", __FUNCTION__);
return GetCurrentPPUThread().FastCall2(libsync2 + 0x2B90, libsync2_rtoc);
#else
UNIMPLEMENTED_FUNC(cellSync2);
return CELL_OK;
#endif
}
Module cellSync2("cellSync2", []()
@ -452,37 +286,4 @@ Module cellSync2("cellSync2", []()
cellSync2.AddFunc(0x0c9a0ea9, cellSync2QueueTryPop);
cellSync2.AddFunc(0x12f0a27d, cellSync2QueueGetSize);
cellSync2.AddFunc(0xf0e1471c, cellSync2QueueGetDepth);
#ifdef PRX_DEBUG
CallAfter([]()
{
if (!Memory.MainMem.GetStartAddr()) return;
libsync2 = (u32)Memory.MainMem.AllocAlign(sizeof(libsync2_data), 0x100000);
memcpy(vm::get_ptr<void>(libsync2), libsync2_data, sizeof(libsync2_data));
libsync2_rtoc = libsync2 + 0xF280;
extern Module* sysPrxForUser;
extern Module* cellSpurs;
extern Module* cellSpursJq;
extern Module* cellFiber;
FIX_IMPORT(cellSpurs, _cellSpursSendSignal , libsync2 + 0x61F0);
FIX_IMPORT(cellSpursJq, cellSpursJobQueueSendSignal , libsync2 + 0x6210);
FIX_IMPORT(cellFiber, cellFiberPpuUtilWorkerControlSendSignal , libsync2 + 0x6230);
FIX_IMPORT(cellFiber, cellFiberPpuSelf , libsync2 + 0x6250);
FIX_IMPORT(cellFiber, cellFiberPpuWaitSignal , libsync2 + 0x6270);
FIX_IMPORT(sysPrxForUser, sys_lwmutex_lock , libsync2 + 0x6290);
FIX_IMPORT(sysPrxForUser, sys_lwmutex_unlock , libsync2 + 0x62B0);
FIX_IMPORT(sysPrxForUser, sys_lwmutex_create , libsync2 + 0x62D0);
FIX_IMPORT(sysPrxForUser, sys_ppu_thread_get_id , libsync2 + 0x62F0);
FIX_IMPORT(sysPrxForUser, _sys_memset , libsync2 + 0x6310);
FIX_IMPORT(sysPrxForUser, _sys_printf , libsync2 + 0x6330);
fix_import(sysPrxForUser, 0x9FB6228E , libsync2 + 0x6350);
FIX_IMPORT(sysPrxForUser, sys_lwmutex_destroy , libsync2 + 0x6370);
FIX_IMPORT(sysPrxForUser, _sys_strncpy , libsync2 + 0x6390);
fix_relocs(cellSync2, libsync2, 0x73A0, 0x95A0, 0x6B90);
});
#endif
});

View File

@ -126,7 +126,7 @@ s32 sys_prx_get_module_id_by_address()
s32 sys_prx_get_module_id_by_name()
{
sys_prx.Todo("sys_prx_get_module_id_by_name()");
return CELL_OK;
return CELL_PRX_ERROR_UNKNOWN_MODULE;
}
s32 sys_prx_get_module_info()

View File

@ -134,7 +134,7 @@ namespace loader
auto armv7_thr_stop_data = vm::psv::ptr<u32>::make(Memory.PSV.RAM.AllocAlign(3 * 4));
armv7_thr_stop_data[0] = 0xf870; // HACK instruction (Thumb)
armv7_thr_stop_data[1] = 0x0001; // index 1
armv7_thr_stop_data[1] = SFI_HLE_RETURN;
Emu.SetCPUThreadStop(armv7_thr_stop_data.addr());
u32 entry = 0; // actual entry point (ELFs entry point is ignored)
@ -228,28 +228,34 @@ namespace loader
const u32 nid = fnid[j];
const u32 addr = fstub[j];
if (auto func = get_psv_func_by_nid(nid))
u32 index;
if (auto func = get_psv_func_by_nid(nid, &index))
{
if (func->module)
{
func->module->Notice("Imported function %s (nid=0x%08x, addr=0x%x)", func->name, nid, addr);
LOG_NOTICE(LOADER, "Imported function '%s' in module '%s' (nid=0x%08x, addr=0x%x)", func->name, func->module->GetName(), nid, addr);
}
else
{
LOG_NOTICE(LOADER, "Imported function %s (nid=0x%08x, addr=0x%x)", func->name, nid, addr);
LOG_NOTICE(LOADER, "Imported function '%s' (nid=0x%08x, addr=0x%x)", func->name, nid, addr);
}
const u32 code = get_psv_func_index(func);
vm::psv::write32(addr + 0, 0xe0700090 | (code & 0xfff0) << 4 | (code & 0xf)); // HACK instruction (ARM)
}
else
{
LOG_ERROR(LOADER, "Unknown function 0x%08x (addr=0x%x)", nid, addr);
vm::psv::write32(addr + 0, 0xe0700090); // HACK instruction (ARM), unimplemented stub (code 0)
vm::psv::write32(addr + 4, nid); // nid
psv_func unimplemented;
unimplemented.nid = nid;
unimplemented.module = nullptr;
unimplemented.name = "UNKNOWN"; // TODO: set correct name if possible
unimplemented.func = nullptr;
index = add_psv_func(unimplemented);
}
vm::psv::write32(addr + 0, 0xe0700090 | (index & 0xfff0) << 4 | (index & 0xf)); // HACK instruction (ARM)
code_end = std::min<u32>(addr, code_end);
}
}

View File

@ -303,6 +303,7 @@ namespace loader
std::vector<u32> start_funcs;
std::vector<u32> stop_funcs;
std::vector<u32> exit_funcs;
//load modules
vfsDir lle_dir("/dev_flash/sys/external");
@ -341,12 +342,48 @@ namespace loader
{
for (auto &e : m.second.exports)
{
auto code = vm::ptr<const u32>::make(vm::check_addr(e.second, 8) ? vm::read32(e.second) : 0);
bool is_empty = !code || (code[0] == 0x38600000 && code[1] == BLR());
if (!code)
{
LOG_ERROR(LOADER, "bad OPD of special function 0x%08x in '%s' library (0x%x)", e.first, info.name.c_str(), code);
}
switch (e.first)
{
case 0xbc9a0086: start_funcs.push_back(e.second); break;
case 0xab779874: stop_funcs.push_back(e.second); break;
case 0xbc9a0086:
{
if (!is_empty)
{
LOG_ERROR(LOADER, "start func found in '%s' library (0x%x)", info.name.c_str(), code);
start_funcs.push_back(e.second);
}
break;
}
default: LOG_ERROR(LOADER, "unknown special func 0x%08x in '%s' library", e.first, info.name.c_str()); break;
case 0xab779874:
{
if (!is_empty)
{
LOG_ERROR(LOADER, "stop func found in '%s' library (0x%x)", info.name.c_str(), code);
stop_funcs.push_back(e.second);
}
break;
}
case 0x3ab9a95e:
{
if (!is_empty)
{
LOG_ERROR(LOADER, "exit func found in '%s' library (0x%x)", info.name.c_str(), code);
exit_funcs.push_back(e.second);
}
break;
}
default: LOG_ERROR(LOADER, "unknown special func 0x%08x in '%s' library (0x%x)", e.first, info.name.c_str(), code); break;
}
}
@ -385,8 +422,15 @@ namespace loader
LOG_NOTICE(LOADER, "Imported function '%s' (0x%x)", SysCalls::GetHLEFuncName(nid), addr);
}
vm::write32(addr + 0, HACK(index));
vm::write32(addr + 4, BLR());
if (!vm::check_addr(addr, 8))
{
LOG_ERROR(LOADER, "Failed to inject code for function '%s' (0x%x)", SysCalls::GetHLEFuncName(nid), addr);
}
else
{
vm::write32(addr + 0, HACK(index));
vm::write32(addr + 4, BLR());
}
}
}
}