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

Improved image dec. modules & New dummy modules

* Improved image decoding modules:
- Fixed error that appeared after last commit (eebe859f83).
- Changed some functions to use the mem*_t classes.
- Implemented cell*DecSetParameter.

* Created new dummy modules for sys_net (0x0000), sys_http (0x0001),
cellHttpUtil (0x0002) and cellSsl (0x0003).
This commit is contained in:
Alexandro Sánchez Bach 2013-09-25 15:43:55 +02:00
parent eebe859f83
commit 1a85ccbbf4
9 changed files with 1589 additions and 124 deletions

View File

@ -74,12 +74,10 @@ struct CellGifDecSubHandle //Custom struct
{ {
u32 fd; u32 fd;
u64 fileSize; u64 fileSize;
CellGifDecInParam inParam; CellGifDecInfo info;
CellGifDecOutParam outParam;
}; };
CellGifDecInfo current_info;
CellGifDecSrc current_src;
int cellGifDecCreate(u32 mainHandle, u32 threadInParam, u32 threadOutParam) int cellGifDecCreate(u32 mainHandle, u32 threadInParam, u32 threadOutParam)
{ {
@ -93,47 +91,50 @@ int cellGifDecExtCreate(u32 mainHandle, u32 threadInParam, u32 threadOutParam, u
return CELL_OK; return CELL_OK;
} }
int cellGifDecOpen(u32 mainHandle, u32 subHandle_addr, u32 src_addr, u32 openInfo) int cellGifDecOpen(u32 mainHandle, mem32_t subHandle, u32 src_addr, u32 openInfo)
{ {
//current_src.srcSelect = Memory.Read32(src_addr); //u32 srcSelect = Memory.Read32(src_addr);
current_src.fileName = Memory.Read32(src_addr+4); u32 fileName = Memory.Read32(src_addr+4);
//current_src.fileOffset = Memory.Read32(src_addr+8); //u64 fileOffset = Memory.Read32(src_addr+8);
//current_src.fileSize = Memory.Read32(src_addr+12); //u32 fileSize = Memory.Read32(src_addr+12);
//current_src.streamPtr = Memory.Read32(src_addr+16); //u32 streamPtr = Memory.Read32(src_addr+16);
//current_src.streamSize = Memory.Read32(src_addr+20); //u32 streamSize = Memory.Read32(src_addr+20);
//current_src.spuThreadEnable = Memory.Read32(src_addr+24); //u32 spuThreadEnable = Memory.Read32(src_addr+24);
CellGifDecSubHandle *subHandle = new CellGifDecSubHandle; CellGifDecSubHandle *current_subHandle = new CellGifDecSubHandle;
// Get file descriptor // Get file descriptor
u32 fd_addr = Memory.Alloc(sizeof(u32), 1); u32 fd_addr = Memory.Alloc(sizeof(u32), 1);
int ret = cellFsOpen(current_src.fileName, 0, fd_addr, NULL, 0); int ret = cellFsOpen(fileName, 0, fd_addr, NULL, 0);
subHandle->fd = Memory.Read32(fd_addr); current_subHandle->fd = Memory.Read32(fd_addr);
Memory.Free(fd_addr); Memory.Free(fd_addr);
if(ret != 0) return CELL_GIFDEC_ERROR_OPEN_FILE; if(ret != 0) return CELL_GIFDEC_ERROR_OPEN_FILE;
// Get size of file // Get size of file
u32 sb_addr = Memory.Alloc(52,1); // Alloc a CellFsStat struct u32 sb_addr = Memory.Alloc(52,1); // Alloc a CellFsStat struct
cellFsFstat(subHandle->fd, sb_addr); cellFsFstat(current_subHandle->fd, sb_addr);
subHandle->fileSize = Memory.Read64(sb_addr+36); // Get CellFsStat.st_size current_subHandle->fileSize = Memory.Read64(sb_addr+36); // Get CellFsStat.st_size
Memory.Free(sb_addr); Memory.Free(sb_addr);
// From now, every u32 subHandle argument is a pointer to a CellPngDecSubHandle struct. // From now, every u32 subHandle argument is a pointer to a CellPngDecSubHandle struct.
Memory.Write32(subHandle_addr, (u32)subHandle); subHandle += (u32)current_subHandle;
return CELL_OK; return CELL_OK;
} }
int cellGifDecReadHeader(u32 mainHandle, u32 subHandle, u32 info_addr) int cellGifDecReadHeader(u32 mainHandle, u32 subHandle, mem_class_t info)
{ {
const u32& fd = ((CellGifDecSubHandle*)subHandle)->fd; const u32& fd = ((CellGifDecSubHandle*)subHandle)->fd;
const u64& fileSize = ((CellGifDecSubHandle*)subHandle)->fileSize; const u64& fileSize = ((CellGifDecSubHandle*)subHandle)->fileSize;
CellGifDecInfo& current_info = ((CellGifDecSubHandle*)subHandle)->info;
//Write the header to buffer //Write the header to buffer
u32 buffer = Memory.Alloc(13,1); // Alloc buffer for GIF header u32 buffer = Memory.Alloc(13,1); // Alloc buffer for GIF header
u32 nread = Memory.Alloc(8,1);
u32 pos_addr = Memory.Alloc(8,1); u32 pos_addr = Memory.Alloc(8,1);
cellFsLseek(fd, 0, 0, pos_addr); cellFsLseek(fd, 0, 0, pos_addr);
cellFsRead(fd, buffer, 13, NULL); cellFsRead(fd, buffer, 13, nread);
Memory.Free(nread);
Memory.Free(pos_addr); Memory.Free(pos_addr);
if (Memory.Read32(buffer) != 0x47494638 || if (Memory.Read32(buffer) != 0x47494638 ||
@ -154,7 +155,6 @@ int cellGifDecReadHeader(u32 mainHandle, u32 subHandle, u32 info_addr)
current_info.SBackGroundColor = Memory.Read8(buffer+11); current_info.SBackGroundColor = Memory.Read8(buffer+11);
current_info.SPixelAspectRatio = Memory.Read8(buffer+12); current_info.SPixelAspectRatio = Memory.Read8(buffer+12);
mem_class_t info(info_addr);
info += current_info.SWidth; info += current_info.SWidth;
info += current_info.SHeight; info += current_info.SHeight;
info += current_info.SGlobalColorTableFlag; info += current_info.SGlobalColorTableFlag;
@ -168,27 +168,48 @@ int cellGifDecReadHeader(u32 mainHandle, u32 subHandle, u32 info_addr)
return CELL_OK; return CELL_OK;
} }
int cellGifDecSetParameter(u32 mainHandle, u32 subHandle, u32 inParam_addr, u32 outParam_addr) int cellGifDecSetParameter(u32 mainHandle, u32 subHandle, u32 inParam_addr, mem_class_t outParam)
{ {
CellGifDecInParam& inParam = ((CellGifDecSubHandle*)subHandle)->inParam; CellGifDecInfo& current_info = ((CellGifDecSubHandle*)subHandle)->info;
inParam.colorSpace = Memory.Read32(inParam_addr+4); CellGifDecOutParam& current_outParam = ((CellGifDecSubHandle*)subHandle)->outParam;
current_outParam.outputWidthByte = (current_info.SWidth * current_info.SColorResolution * 3)/8;
current_outParam.outputWidth = current_info.SWidth;
current_outParam.outputHeight = current_info.SHeight;
current_outParam.outputColorSpace = Memory.Read32(inParam_addr+4);
switch (current_outParam.outputColorSpace)
{
case CELL_GIFDEC_RGBA: current_outParam.outputComponents = 4; break;
case CELL_GIFDEC_ARGB: current_outParam.outputComponents = 4; break;
default: return CELL_GIFDEC_ERROR_ARG; // Not supported color space
}
current_outParam.outputBitDepth = 0; // Unimplemented
current_outParam.useMemorySpace = 0; // Unimplemented
// (TODO) outParam += current_outParam.outputWidthByte;
outParam += current_outParam.outputWidth;
outParam += current_outParam.outputHeight;
outParam += current_outParam.outputComponents;
outParam += current_outParam.outputBitDepth;
outParam += current_outParam.outputColorSpace;
outParam += current_outParam.useMemorySpace;
return CELL_OK; return CELL_OK;
} }
int cellGifDecDecodeData(u32 mainHandle, u32 subHandle, u32 data_addr, u32 dataCtrlParam_addr, u32 dataOutInfo_addr) int cellGifDecDecodeData(u32 mainHandle, u32 subHandle, mem8_ptr_t data, u32 dataCtrlParam_addr, mem_class_t dataOutInfo)
{ {
const u32& fd = ((CellGifDecSubHandle*)subHandle)->fd; const u32& fd = ((CellGifDecSubHandle*)subHandle)->fd;
const u64& fileSize = ((CellGifDecSubHandle*)subHandle)->fileSize; const u64& fileSize = ((CellGifDecSubHandle*)subHandle)->fileSize;
const CellGifDecInParam& inParam = ((CellGifDecSubHandle*)subHandle)->inParam; // (TODO: We should use the outParam) const CellGifDecOutParam& current_outParam = ((CellGifDecSubHandle*)subHandle)->outParam; // (TODO: We should use the outParam)
//Copy the GIF file to a buffer //Copy the GIF file to a buffer
u32 buffer = Memory.Alloc(fileSize,1); u32 buffer = Memory.Alloc(fileSize,1);
u32 nread = Memory.Alloc(8,1);
u32 pos_addr = Memory.Alloc(8,1); u32 pos_addr = Memory.Alloc(8,1);
cellFsLseek(fd, 0, 0, pos_addr); cellFsLseek(fd, 0, 0, pos_addr);
cellFsRead(fd, buffer, fileSize, NULL); cellFsRead(fd, buffer, fileSize, nread);
Memory.Free(nread);
Memory.Free(pos_addr); Memory.Free(pos_addr);
//Decode GIF file. (TODO: Is there any faster alternative? Can we do it without external libraries?) //Decode GIF file. (TODO: Is there any faster alternative? Can we do it without external libraries?)
@ -199,29 +220,27 @@ int cellGifDecDecodeData(u32 mainHandle, u32 subHandle, u32 data_addr, u32 dataC
if (!image) return CELL_GIFDEC_ERROR_STREAM_FORMAT; if (!image) return CELL_GIFDEC_ERROR_STREAM_FORMAT;
u32 image_size = width * height * 4; u32 image_size = width * height * 4;
if (inParam.colorSpace == CELL_GIFDEC_RGBA){ if (current_outParam.outputColorSpace == CELL_GIFDEC_RGBA){
for(u32 i = 0; i < image_size; i+=4){ for(u32 i = 0; i < image_size; i+=4){
Memory.Write8(data_addr+i+0, image[i+0]); data += image[i+0];
Memory.Write8(data_addr+i+1, image[i+1]); data += image[i+1];
Memory.Write8(data_addr+i+2, image[i+2]); data += image[i+2];
Memory.Write8(data_addr+i+3, image[i+3]); data += image[i+3];
} }
} }
if (inParam.colorSpace == CELL_GIFDEC_ARGB){ if (current_outParam.outputColorSpace == CELL_GIFDEC_ARGB){
for(u32 i = 0; i < image_size; i+=4){ for(u32 i = 0; i < image_size; i+=4){
Memory.Write8(data_addr+i+0, image[i+3]); data += image[i+3];
Memory.Write8(data_addr+i+1, image[i+0]); data += image[i+0];
Memory.Write8(data_addr+i+2, image[i+1]); data += image[i+1];
Memory.Write8(data_addr+i+3, image[i+2]); data += image[i+2];
} }
} }
delete[] image; delete[] image;
//The output data is an image (dataOutInfo.recordType = 1) dataOutInfo += (u32)1; // The output data is an image (dataOutInfo.recordType = 1)
Memory.Write32(dataOutInfo_addr, 1); dataOutInfo += (u32)0; // outExtension.label = 0
dataOutInfo += Memory.Alloc(20,1); // outExtension.data allocated (TODO: Is this the best way to avoid exceptions when trying to access this data? Will this produce a memory leak?)
u32 outExtensionData_addr = Memory.Alloc(20,1); // (TODO: Is this the best way to avoid exceptions when trying to access this data? Will this produce a memory leak?)
Memory.Write32(dataOutInfo_addr+8, outExtensionData_addr);
return CELL_OK; return CELL_OK;
} }

View File

@ -0,0 +1,153 @@
#include "stdafx.h"
#include "Emu/SysCalls/SysCalls.h"
#include "Emu/SysCalls/SC_FUNC.h"
void cellHttpUtil_init();
Module cellHttpUtil(0x0002, cellHttpUtil_init);
int cellHttpUtilParseUri()
{
UNIMPLEMENTED_FUNC(cellHttpUtil);
return CELL_OK;
}
int cellHttpUtilParseUriPath()
{
UNIMPLEMENTED_FUNC(cellHttpUtil);
return CELL_OK;
}
int cellHttpUtilParseProxy()
{
UNIMPLEMENTED_FUNC(cellHttpUtil);
return CELL_OK;
}
int cellHttpUtilParseStatusLine()
{
UNIMPLEMENTED_FUNC(cellHttpUtil);
return CELL_OK;
}
int cellHttpUtilParseHeader()
{
UNIMPLEMENTED_FUNC(cellHttpUtil);
return CELL_OK;
}
int cellHttpUtilBuildRequestLine()
{
UNIMPLEMENTED_FUNC(cellHttpUtil);
return CELL_OK;
}
int cellHttpUtilBuildHeader()
{
UNIMPLEMENTED_FUNC(cellHttpUtil);
return CELL_OK;
}
int cellHttpUtilBuildUri()
{
UNIMPLEMENTED_FUNC(cellHttpUtil);
return CELL_OK;
}
int cellHttpUtilCopyUri()
{
UNIMPLEMENTED_FUNC(cellHttpUtil);
return CELL_OK;
}
int cellHttpUtilMergeUriPath()
{
UNIMPLEMENTED_FUNC(cellHttpUtil);
return CELL_OK;
}
int cellHttpUtilSweepPath()
{
UNIMPLEMENTED_FUNC(cellHttpUtil);
return CELL_OK;
}
int cellHttpUtilCopyStatusLine()
{
UNIMPLEMENTED_FUNC(cellHttpUtil);
return CELL_OK;
}
int cellHttpUtilCopyHeader()
{
UNIMPLEMENTED_FUNC(cellHttpUtil);
return CELL_OK;
}
int cellHttpUtilAppendHeaderValue()
{
UNIMPLEMENTED_FUNC(cellHttpUtil);
return CELL_OK;
}
int cellHttpUtilEscapeUri()
{
UNIMPLEMENTED_FUNC(cellHttpUtil);
return CELL_OK;
}
int cellHttpUtilUnescapeUri()
{
UNIMPLEMENTED_FUNC(cellHttpUtil);
return CELL_OK;
}
int cellHttpUtilFormUrlEncode()
{
UNIMPLEMENTED_FUNC(cellHttpUtil);
return CELL_OK;
}
int cellHttpUtilFormUrlDecode()
{
UNIMPLEMENTED_FUNC(cellHttpUtil);
return CELL_OK;
}
int cellHttpUtilBase64Encoder()
{
UNIMPLEMENTED_FUNC(cellHttpUtil);
return CELL_OK;
}
int cellHttpUtilBase64Decoder()
{
UNIMPLEMENTED_FUNC(cellHttpUtil);
return CELL_OK;
}
void cellHttpUtil_init()
{
cellHttpUtil.AddFunc(0x32faaf58, cellHttpUtilParseUri);
cellHttpUtil.AddFunc(0x8bb608e4, cellHttpUtilParseUriPath);
cellHttpUtil.AddFunc(0xa3457869, cellHttpUtilParseProxy);
cellHttpUtil.AddFunc(0x2bcbced4, cellHttpUtilParseStatusLine);
cellHttpUtil.AddFunc(0xe1fb0ebd, cellHttpUtilParseHeader);
cellHttpUtil.AddFunc(0x1c6e4dbb, cellHttpUtilBuildRequestLine);
cellHttpUtil.AddFunc(0x04accebf, cellHttpUtilBuildHeader);
cellHttpUtil.AddFunc(0x6f0f7667, cellHttpUtilBuildUri);
cellHttpUtil.AddFunc(0xf05df789, cellHttpUtilCopyUri);
cellHttpUtil.AddFunc(0x8ea23deb, cellHttpUtilMergeUriPath);
cellHttpUtil.AddFunc(0xaabeb869, cellHttpUtilSweepPath);
cellHttpUtil.AddFunc(0x50ea75bc, cellHttpUtilCopyStatusLine);
cellHttpUtil.AddFunc(0x97f9fbe5, cellHttpUtilCopyHeader);
cellHttpUtil.AddFunc(0x37bb53a2, cellHttpUtilAppendHeaderValue);
cellHttpUtil.AddFunc(0x9003b1f2, cellHttpUtilEscapeUri);
cellHttpUtil.AddFunc(0x2763fd66, cellHttpUtilUnescapeUri);
cellHttpUtil.AddFunc(0x44d756d6, cellHttpUtilFormUrlEncode);
cellHttpUtil.AddFunc(0x8e6c5bb9, cellHttpUtilFormUrlDecode);
cellHttpUtil.AddFunc(0x83faa354, cellHttpUtilBase64Encoder);
cellHttpUtil.AddFunc(0x8e52ee08, cellHttpUtilBase64Decoder);
}

View File

@ -80,12 +80,10 @@ struct CellJpgDecSubHandle //Custom struct
{ {
u32 fd; u32 fd;
u64 fileSize; u64 fileSize;
CellJpgDecInParam inParam; CellJpgDecInfo info;
CellJpgDecOutParam outParam;
}; };
CellJpgDecInfo current_info;
CellJpgDecSrc current_src;
int cellJpgDecCreate(u32 mainHandle, u32 threadInParam, u32 threadOutParam) int cellJpgDecCreate(u32 mainHandle, u32 threadInParam, u32 threadOutParam)
{ {
@ -105,33 +103,33 @@ int cellJpgDecDestroy(u32 mainHandle)
return CELL_OK; return CELL_OK;
} }
int cellJpgDecOpen(u32 mainHandle, u32 subHandle_addr, u32 src_addr, u32 openInfo) int cellJpgDecOpen(u32 mainHandle, mem32_t subHandle, u32 src_addr, u32 openInfo)
{ {
//current_src.srcSelect = Memory.Read32(src_addr); //u32 srcSelect = Memory.Read32(src_addr);
current_src.fileName = Memory.Read32(src_addr+4); u32 fileName = Memory.Read32(src_addr+4);
//current_src.fileOffset = Memory.Read32(src_addr+8); //u64 fileOffset = Memory.Read32(src_addr+8);
//current_src.fileSize = Memory.Read32(src_addr+12); //u32 fileSize = Memory.Read32(src_addr+12);
//current_src.streamPtr = Memory.Read32(src_addr+16); //u32 streamPtr = Memory.Read32(src_addr+16);
//current_src.streamSize = Memory.Read32(src_addr+20); //u32 streamSize = Memory.Read32(src_addr+20);
//current_src.spuThreadEnable = Memory.Read32(src_addr+24); //u32 spuThreadEnable = Memory.Read32(src_addr+24);
CellJpgDecSubHandle *subHandle = new CellJpgDecSubHandle; CellJpgDecSubHandle *current_subHandle = new CellJpgDecSubHandle;
// Get file descriptor // Get file descriptor
u32 fd_addr = Memory.Alloc(sizeof(u32), 1); u32 fd_addr = Memory.Alloc(sizeof(u32), 1);
int ret = cellFsOpen(current_src.fileName, 0, fd_addr, NULL, 0); int ret = cellFsOpen(fileName, 0, fd_addr, NULL, 0);
subHandle->fd = Memory.Read32(fd_addr); current_subHandle->fd = Memory.Read32(fd_addr);
Memory.Free(fd_addr); Memory.Free(fd_addr);
if(ret != 0) return CELL_JPGDEC_ERROR_OPEN_FILE; if(ret != 0) return CELL_JPGDEC_ERROR_OPEN_FILE;
// Get size of file // Get size of file
u32 sb_addr = Memory.Alloc(52,1); // Alloc a CellFsStat struct u32 sb_addr = Memory.Alloc(52,1); // Alloc a CellFsStat struct
cellFsFstat(subHandle->fd, sb_addr); cellFsFstat(current_subHandle->fd, sb_addr);
subHandle->fileSize = Memory.Read64(sb_addr+36); // Get CellFsStat.st_size current_subHandle->fileSize = Memory.Read64(sb_addr+36); // Get CellFsStat.st_size
Memory.Free(sb_addr); Memory.Free(sb_addr);
// From now, every u32 subHandle argument is a pointer to a CellPngDecSubHandle struct. // From now, every u32 subHandle argument is a pointer to a CellPngDecSubHandle struct.
Memory.Write32(subHandle_addr, (u32)subHandle); subHandle += (u32)current_subHandle;
return CELL_OK; return CELL_OK;
} }
@ -144,16 +142,19 @@ int cellJpgDecClose(u32 mainHandle, u32 subHandle)
return CELL_OK; return CELL_OK;
} }
int cellJpgDecReadHeader(u32 mainHandle, u32 subHandle, u32 info_addr) int cellJpgDecReadHeader(u32 mainHandle, u32 subHandle, mem_class_t info)
{ {
const u32& fd = ((CellJpgDecSubHandle*)subHandle)->fd; const u32& fd = ((CellJpgDecSubHandle*)subHandle)->fd;
const u64& fileSize = ((CellJpgDecSubHandle*)subHandle)->fileSize; const u64& fileSize = ((CellJpgDecSubHandle*)subHandle)->fileSize;
CellJpgDecInfo& current_info = ((CellJpgDecSubHandle*)subHandle)->info;
//Copy the JPG file to a buffer //Copy the JPG file to a buffer
u32 buffer = Memory.Alloc(fileSize,1); u32 buffer = Memory.Alloc(fileSize,1);
u32 nread = Memory.Alloc(8,1);
u32 pos_addr = Memory.Alloc(8,1); u32 pos_addr = Memory.Alloc(8,1);
cellFsLseek(fd, 0, 0, pos_addr); cellFsLseek(fd, 0, 0, pos_addr);
cellFsRead(fd, buffer, fileSize, NULL); cellFsRead(fd, buffer, fileSize, nread);
Memory.Free(nread);
Memory.Free(pos_addr); Memory.Free(pos_addr);
if (Memory.Read32(buffer) != 0xFFD8FFE0 || // Error: Not a valid SOI header if (Memory.Read32(buffer) != 0xFFD8FFE0 || // Error: Not a valid SOI header
@ -185,10 +186,9 @@ int cellJpgDecReadHeader(u32 mainHandle, u32 subHandle, u32 info_addr)
current_info.imageWidth = Memory.Read8(buffer+i+7)*256 + Memory.Read8(buffer+i+8); current_info.imageWidth = Memory.Read8(buffer+i+7)*256 + Memory.Read8(buffer+i+8);
current_info.imageHeight = Memory.Read8(buffer+i+5)*256 + Memory.Read8(buffer+i+6); current_info.imageHeight = Memory.Read8(buffer+i+5)*256 + Memory.Read8(buffer+i+6);
current_info.numComponents = 0; // Unimplemented current_info.numComponents = 3; // Unimplemented
current_info.colorSpace = 3; // Unimplemented current_info.colorSpace = CELL_JPG_RGB; // Unimplemented
mem_class_t info(info_addr);
info += current_info.imageWidth; info += current_info.imageWidth;
info += current_info.imageHeight; info += current_info.imageHeight;
info += current_info.numComponents; info += current_info.numComponents;
@ -198,17 +198,19 @@ int cellJpgDecReadHeader(u32 mainHandle, u32 subHandle, u32 info_addr)
return CELL_OK; return CELL_OK;
} }
int cellJpgDecDecodeData(u32 mainHandle, u32 subHandle, u32 data_addr, u32 dataCtrlParam_addr, u32 dataOutInfo_addr) int cellJpgDecDecodeData(u32 mainHandle, u32 subHandle, mem8_ptr_t data, u32 dataCtrlParam_addr, u32 dataOutInfo_addr)
{ {
const u32& fd = ((CellJpgDecSubHandle*)subHandle)->fd; const u32& fd = ((CellJpgDecSubHandle*)subHandle)->fd;
const u64& fileSize = ((CellJpgDecSubHandle*)subHandle)->fileSize; const u64& fileSize = ((CellJpgDecSubHandle*)subHandle)->fileSize;
const CellJpgDecInParam& inParam = ((CellJpgDecSubHandle*)subHandle)->inParam; // (TODO: We should use the outParam) const CellJpgDecOutParam& current_outParam = ((CellJpgDecSubHandle*)subHandle)->outParam; // (TODO: We should use the outParam)
//Copy the JPG file to a buffer //Copy the JPG file to a buffer
u32 buffer = Memory.Alloc(fileSize,1); u32 buffer = Memory.Alloc(fileSize,1);
u32 nread = Memory.Alloc(8,1);
u32 pos_addr = Memory.Alloc(8,1); u32 pos_addr = Memory.Alloc(8,1);
cellFsLseek(fd, 0, 0, pos_addr); cellFsLseek(fd, 0, 0, pos_addr);
cellFsRead(fd, buffer, fileSize, NULL); cellFsRead(fd, buffer, fileSize, nread);
Memory.Free(nread);
Memory.Free(pos_addr); Memory.Free(pos_addr);
//Decode JPG file. (TODO: Is there any faster alternative? Can we do it without external libraries?) //Decode JPG file. (TODO: Is there any faster alternative? Can we do it without external libraries?)
@ -219,20 +221,20 @@ int cellJpgDecDecodeData(u32 mainHandle, u32 subHandle, u32 data_addr, u32 dataC
if (!image) return CELL_JPGDEC_ERROR_STREAM_FORMAT; if (!image) return CELL_JPGDEC_ERROR_STREAM_FORMAT;
u32 image_size = width * height * 4; u32 image_size = width * height * 4;
if (inParam.outputColorSpace == CELL_JPG_RGBA){ if (current_outParam.outputColorSpace == CELL_JPG_RGBA){
for(u32 i = 0; i < image_size; i+=4){ for(u32 i = 0; i < image_size; i+=4){
Memory.Write8(data_addr+i+0, image[i+0]); data += image[i+0];
Memory.Write8(data_addr+i+1, image[i+1]); data += image[i+1];
Memory.Write8(data_addr+i+2, image[i+2]); data += image[i+2];
Memory.Write8(data_addr+i+3, image[i+3]); data += image[i+3];
} }
} }
else if (inParam.outputColorSpace == CELL_JPG_ARGB){ else if (current_outParam.outputColorSpace == CELL_JPG_ARGB){
for(u32 i = 0; i < image_size; i+=4){ for(u32 i = 0; i < image_size; i+=4){
Memory.Write8(data_addr+i+0, image[i+3]); data += image[i+3];
Memory.Write8(data_addr+i+1, image[i+0]); data += image[i+0];
Memory.Write8(data_addr+i+2, image[i+1]); data += image[i+1];
Memory.Write8(data_addr+i+3, image[i+2]); data += image[i+2];
} }
} }
delete[] image; delete[] image;
@ -240,12 +242,39 @@ int cellJpgDecDecodeData(u32 mainHandle, u32 subHandle, u32 data_addr, u32 dataC
return CELL_OK; return CELL_OK;
} }
int cellJpgDecSetParameter(u32 mainHandle, u32 subHandle, u32 inParam_addr, u32 outParam_addr) int cellJpgDecSetParameter(u32 mainHandle, u32 subHandle, u32 inParam_addr, mem_class_t outParam)
{ {
CellJpgDecInParam& inParam = ((CellJpgDecSubHandle*)subHandle)->inParam; CellJpgDecInfo& current_info = ((CellJpgDecSubHandle*)subHandle)->info;
inParam.outputColorSpace = Memory.Read32(inParam_addr+16); CellJpgDecOutParam& current_outParam = ((CellJpgDecSubHandle*)subHandle)->outParam;
// (TODO) current_outParam.outputWidthByte = (current_info.imageWidth * current_info.numComponents);
current_outParam.outputWidth = current_info.imageWidth;
current_outParam.outputHeight = current_info.imageHeight;
current_outParam.outputColorSpace = Memory.Read32(inParam_addr+16);
switch (current_outParam.outputColorSpace)
{
case CELL_JPG_GRAYSCALE: current_outParam.outputComponents = 1; break;
case CELL_JPG_RGB: current_outParam.outputComponents = 3; break;
case CELL_JPG_YCbCr: current_outParam.outputComponents = 3; break;
case CELL_JPG_RGBA: current_outParam.outputComponents = 4; break;
case CELL_JPG_UPSAMPLE_ONLY: current_outParam.outputComponents = current_info.numComponents; break;
case CELL_JPG_ARGB: current_outParam.outputComponents = 4; break;
case CELL_JPG_GRAYSCALE_TO_ALPHA_RGBA: current_outParam.outputComponents = 4; break;
case CELL_JPG_GRAYSCALE_TO_ALPHA_ARGB: current_outParam.outputComponents = 4; break;
default: return CELL_JPGDEC_ERROR_ARG; // Not supported color space
}
current_outParam.outputMode = Memory.Read32(inParam_addr+12);
current_outParam.downScale = Memory.Read32(inParam_addr+4);
current_outParam.useMemorySpace = 0; // Unimplemented
outParam += current_outParam.outputWidthByte;
outParam += current_outParam.outputWidth;
outParam += current_outParam.outputHeight;
outParam += current_outParam.outputComponents;
outParam += current_outParam.outputMode;
outParam += current_outParam.outputColorSpace;
outParam += current_outParam.downScale;
outParam += current_outParam.useMemorySpace;
return CELL_OK; return CELL_OK;
} }

View File

@ -81,12 +81,10 @@ struct CellPngDecSubHandle //Custom struct
{ {
u32 fd; u32 fd;
u64 fileSize; u64 fileSize;
CellPngDecInParam inParam; CellPngDecInfo info;
CellPngDecOutParam outParam;
}; };
CellPngDecInfo current_info;
CellPngDecSrc current_src;
int cellPngDecCreate(u32 mainHandle, u32 threadInParam, u32 threadOutParam) int cellPngDecCreate(u32 mainHandle, u32 threadInParam, u32 threadOutParam)
{ {
@ -100,33 +98,33 @@ int cellPngDecDestroy(u32 mainHandle)
return CELL_OK; return CELL_OK;
} }
int cellPngDecOpen(u32 mainHandle, u32 subHandle_addr, u32 src_addr, u32 openInfo) int cellPngDecOpen(u32 mainHandle, mem32_t subHandle, u32 src_addr, u32 openInfo)
{ {
//current_src.srcSelect = Memory.Read32(src_addr); //u32 srcSelect = Memory.Read32(src_addr);
current_src.fileName = Memory.Read32(src_addr+4); u32 fileName = Memory.Read32(src_addr+4);
//current_src.fileOffset = Memory.Read32(src_addr+8); //u64 fileOffset = Memory.Read32(src_addr+8);
//current_src.fileSize = Memory.Read32(src_addr+12); //u32 fileSize = Memory.Read32(src_addr+12);
//current_src.streamPtr = Memory.Read32(src_addr+16); //u32 streamPtr = Memory.Read32(src_addr+16);
//current_src.streamSize = Memory.Read32(src_addr+20); //u32 streamSize = Memory.Read32(src_addr+20);
//current_src.spuThreadEnable = Memory.Read32(src_addr+24); //u32 spuThreadEnable = Memory.Read32(src_addr+24);
CellPngDecSubHandle *subHandle = new CellPngDecSubHandle; CellPngDecSubHandle *current_subHandle = new CellPngDecSubHandle;
// Get file descriptor // Get file descriptor
u32 fd_addr = Memory.Alloc(sizeof(u32), 1); u32 fd_addr = Memory.Alloc(sizeof(u32), 1);
int ret = cellFsOpen(current_src.fileName, 0, fd_addr, NULL, 0); int ret = cellFsOpen(fileName, 0, fd_addr, NULL, 0);
subHandle->fd = Memory.Read32(fd_addr); current_subHandle->fd = Memory.Read32(fd_addr);
Memory.Free(fd_addr); Memory.Free(fd_addr);
if(ret != 0) return CELL_PNGDEC_ERROR_OPEN_FILE; if(ret != 0) return CELL_PNGDEC_ERROR_OPEN_FILE;
// Get size of file // Get size of file
u32 sb_addr = Memory.Alloc(52,1); // Alloc a CellFsStat struct u32 sb_addr = Memory.Alloc(52,1); // Alloc a CellFsStat struct
cellFsFstat(subHandle->fd, sb_addr); cellFsFstat(current_subHandle->fd, sb_addr);
subHandle->fileSize = Memory.Read64(sb_addr+36); // Get CellFsStat.st_size current_subHandle->fileSize = Memory.Read64(sb_addr+36); // Get CellFsStat.st_size
Memory.Free(sb_addr); Memory.Free(sb_addr);
// From now, every u32 subHandle argument is a pointer to a CellPngDecSubHandle struct. // From now, every u32 subHandle argument is a pointer to a CellPngDecSubHandle struct.
Memory.Write32(subHandle_addr, (u32)subHandle); subHandle += (u32)current_subHandle;
return CELL_OK; return CELL_OK;
} }
@ -139,19 +137,22 @@ int cellPngDecClose(u32 mainHandle, u32 subHandle)
return CELL_OK; return CELL_OK;
} }
int cellPngDecReadHeader(u32 mainHandle, u32 subHandle, u32 info_addr) int cellPngDecReadHeader(u32 mainHandle, u32 subHandle, mem_class_t info)
{ {
const u32& fd = ((CellPngDecSubHandle*)subHandle)->fd; const u32& fd = ((CellPngDecSubHandle*)subHandle)->fd;
const u64& fileSize = ((CellPngDecSubHandle*)subHandle)->fileSize; const u64& fileSize = ((CellPngDecSubHandle*)subHandle)->fileSize;
CellPngDecInfo& current_info = ((CellPngDecSubHandle*)subHandle)->info;
//Check size of file //Check size of file
if(fileSize < 29) return CELL_PNGDEC_ERROR_HEADER; // Error: The file is smaller than the length of a PNG header if(fileSize < 29) return CELL_PNGDEC_ERROR_HEADER; // Error: The file is smaller than the length of a PNG header
//Write the header to buffer //Write the header to buffer
u32 buffer = Memory.Alloc(34,1); // Alloc buffer for PNG header u32 buffer = Memory.Alloc(34,1); // Alloc buffer for PNG header
u32 nread = Memory.Alloc(8,1);
u32 pos_addr = Memory.Alloc(8,1); u32 pos_addr = Memory.Alloc(8,1);
cellFsLseek(fd, 0, 0, pos_addr); cellFsLseek(fd, 0, 0, pos_addr);
cellFsRead(fd, buffer, 34, NULL); cellFsRead(fd, buffer, 34, nread);
Memory.Free(nread);
Memory.Free(pos_addr); Memory.Free(pos_addr);
if (Memory.Read32(buffer) != 0x89504E47 || if (Memory.Read32(buffer) != 0x89504E47 ||
@ -163,14 +164,20 @@ int cellPngDecReadHeader(u32 mainHandle, u32 subHandle, u32 info_addr)
} }
current_info.imageWidth = Memory.Read32(buffer+16); current_info.imageWidth = Memory.Read32(buffer+16);
current_info.imageHeight = Memory.Read32(buffer+20); current_info.imageHeight = Memory.Read32(buffer+20);
current_info.numComponents = 0; // Unimplemented switch (Memory.Read8(buffer+25))
current_info.colorSpace = Memory.Read8(buffer+25); {
case 0: current_info.colorSpace = CELL_PNGDEC_GRAYSCALE; current_info.numComponents = 1; break;
case 2: current_info.colorSpace = CELL_PNGDEC_RGB; current_info.numComponents = 3; break;
case 3: current_info.colorSpace = CELL_PNGDEC_PALETTE; current_info.numComponents = 1; break;
case 4: current_info.colorSpace = CELL_PNGDEC_GRAYSCALE_ALPHA; current_info.numComponents = 2; break;
case 6: current_info.colorSpace = CELL_PNGDEC_RGBA; current_info.numComponents = 4; break;
default: return CELL_PNGDEC_ERROR_HEADER; // Not supported color type
}
current_info.bitDepth = Memory.Read8(buffer+24); current_info.bitDepth = Memory.Read8(buffer+24);
current_info.interlaceMethod = Memory.Read8(buffer+28); current_info.interlaceMethod = Memory.Read8(buffer+28);
current_info.chunkInformation = 0; // Unimplemented current_info.chunkInformation = 0; // Unimplemented
mem_class_t info(info_addr);
info += current_info.imageWidth; info += current_info.imageWidth;
info += current_info.imageHeight; info += current_info.imageHeight;
info += current_info.numComponents; info += current_info.numComponents;
@ -183,17 +190,19 @@ int cellPngDecReadHeader(u32 mainHandle, u32 subHandle, u32 info_addr)
return CELL_OK; return CELL_OK;
} }
int cellPngDecDecodeData(u32 mainHandle, u32 subHandle, u32 data_addr, u32 dataCtrlParam_addr, u32 dataOutInfo_addr) int cellPngDecDecodeData(u32 mainHandle, u32 subHandle, mem8_ptr_t data, u32 dataCtrlParam_addr, mem_class_t dataOutInfo)
{ {
const u32& fd = ((CellPngDecSubHandle*)subHandle)->fd; const u32& fd = ((CellPngDecSubHandle*)subHandle)->fd;
const u64& fileSize = ((CellPngDecSubHandle*)subHandle)->fileSize; const u64& fileSize = ((CellPngDecSubHandle*)subHandle)->fileSize;
const CellPngDecInParam& inParam = ((CellPngDecSubHandle*)subHandle)->inParam; // (TODO: We should use the outParam) const CellPngDecOutParam& current_outParam = ((CellPngDecSubHandle*)subHandle)->outParam;
//Copy the PNG file to a buffer //Copy the PNG file to a buffer
u32 buffer = Memory.Alloc(fileSize,1); u32 buffer = Memory.Alloc(fileSize,1);
u32 nread = Memory.Alloc(8,1);
u32 pos_addr = Memory.Alloc(sizeof(u64),1); u32 pos_addr = Memory.Alloc(sizeof(u64),1);
cellFsLseek(fd, 0, 0, pos_addr); cellFsLseek(fd, 0, 0, pos_addr);
cellFsRead(fd, buffer, fileSize, NULL); cellFsRead(fd, buffer, fileSize, nread);
Memory.Free(nread);
Memory.Free(pos_addr); Memory.Free(pos_addr);
//Decode PNG file. (TODO: Is there any faster alternative? Can we do it without external libraries?) //Decode PNG file. (TODO: Is there any faster alternative? Can we do it without external libraries?)
@ -204,20 +213,20 @@ int cellPngDecDecodeData(u32 mainHandle, u32 subHandle, u32 data_addr, u32 dataC
if (!image) return CELL_PNGDEC_ERROR_STREAM_FORMAT; if (!image) return CELL_PNGDEC_ERROR_STREAM_FORMAT;
u32 image_size = width * height * 4; u32 image_size = width * height * 4;
if (inParam.outputColorSpace == CELL_PNGDEC_RGBA){ if (current_outParam.outputColorSpace == CELL_PNGDEC_RGBA){
for(u32 i = 0; i < image_size; i+=4){ for(u32 i = 0; i < image_size; i+=4){
Memory.Write8(data_addr+i+0, image[i+0]); data += image[i+0];
Memory.Write8(data_addr+i+1, image[i+1]); data += image[i+1];
Memory.Write8(data_addr+i+2, image[i+2]); data += image[i+2];
Memory.Write8(data_addr+i+3, image[i+3]); data += image[i+3];
} }
} }
else if (inParam.outputColorSpace == CELL_PNGDEC_ARGB){ else if (current_outParam.outputColorSpace == CELL_PNGDEC_ARGB){
for(u32 i = 0; i < image_size; i+=4){ for(u32 i = 0; i < image_size; i+=4){
Memory.Write8(data_addr+i+0, image[i+3]); data += image[i+3];
Memory.Write8(data_addr+i+1, image[i+0]); data += image[i+0];
Memory.Write8(data_addr+i+2, image[i+1]); data += image[i+1];
Memory.Write8(data_addr+i+3, image[i+2]); data += image[i+2];
} }
} }
delete[] image; delete[] image;
@ -225,12 +234,37 @@ int cellPngDecDecodeData(u32 mainHandle, u32 subHandle, u32 data_addr, u32 dataC
return CELL_OK; return CELL_OK;
} }
int cellPngDecSetParameter(u32 mainHandle, u32 subHandle, u32 inParam_addr, u32 outParam_addr) int cellPngDecSetParameter(u32 mainHandle, u32 subHandle, u32 inParam_addr, mem_class_t outParam)
{ {
CellPngDecInParam& inParam = ((CellPngDecSubHandle*)subHandle)->inParam; CellPngDecInfo& current_info = ((CellPngDecSubHandle*)subHandle)->info;
inParam.outputColorSpace = Memory.Read32(inParam_addr+8); CellPngDecOutParam& current_outParam = ((CellPngDecSubHandle*)subHandle)->outParam;
// (TODO) current_outParam.outputWidthByte = (current_info.imageWidth * current_info.numComponents * current_info.bitDepth)/8;
current_outParam.outputWidth = current_info.imageWidth;
current_outParam.outputHeight = current_info.imageHeight;
current_outParam.outputColorSpace = Memory.Read32(inParam_addr+8);
switch (current_outParam.outputColorSpace)
{
case CELL_PNGDEC_GRAYSCALE: current_outParam.outputComponents = 1; break;
case CELL_PNGDEC_GRAYSCALE_ALPHA: current_outParam.outputComponents = 2; break;
case CELL_PNGDEC_PALETTE: current_outParam.outputComponents = 1; break;
case CELL_PNGDEC_RGB: current_outParam.outputComponents = 3; break;
case CELL_PNGDEC_RGBA: current_outParam.outputComponents = 4; break;
case CELL_PNGDEC_ARGB: current_outParam.outputComponents = 4; break;
default: return CELL_PNGDEC_ERROR_ARG; // Not supported color space
}
current_outParam.outputBitDepth = Memory.Read32(inParam_addr+12);
current_outParam.outputMode = Memory.Read32(inParam_addr+4);
current_outParam.useMemorySpace = 0; // Unimplemented
outParam += current_outParam.outputWidthByte;
outParam += current_outParam.outputWidth;
outParam += current_outParam.outputHeight;
outParam += current_outParam.outputComponents;
outParam += current_outParam.outputBitDepth;
outParam += current_outParam.outputMode;
outParam += current_outParam.outputColorSpace;
outParam += current_outParam.useMemorySpace;
return CELL_OK; return CELL_OK;
} }

View File

@ -0,0 +1,110 @@
#include "stdafx.h"
#include "Emu/SysCalls/SysCalls.h"
#include "Emu/SysCalls/SC_FUNC.h"
void cellSsl_init();
Module cellSsl(0x0003, cellSsl_init);
int cellSslInit()
{
UNIMPLEMENTED_FUNC(cellSsl);
return CELL_OK;
}
int cellSslEnd()
{
UNIMPLEMENTED_FUNC(cellSsl);
return CELL_OK;
}
int cellSslCertificateLoader()
{
UNIMPLEMENTED_FUNC(cellSsl);
return CELL_OK;
}
int cellSslCertGetSerialNumber()
{
UNIMPLEMENTED_FUNC(cellSsl);
return CELL_OK;
}
int cellSslCertGetPublicKey()
{
UNIMPLEMENTED_FUNC(cellSsl);
return CELL_OK;
}
int cellSslCertGetRsaPublicKeyModulus()
{
UNIMPLEMENTED_FUNC(cellSsl);
return CELL_OK;
}
int cellSslCertGetRsaPublicKeyExponent()
{
UNIMPLEMENTED_FUNC(cellSsl);
return CELL_OK;
}
int cellSslCertGetNotBefore()
{
UNIMPLEMENTED_FUNC(cellSsl);
return CELL_OK;
}
int cellSslCertGetNotAfter()
{
UNIMPLEMENTED_FUNC(cellSsl);
return CELL_OK;
}
int cellSslCertGetSubjectName()
{
UNIMPLEMENTED_FUNC(cellSsl);
return CELL_OK;
}
int cellSslCertGetIssuerName()
{
UNIMPLEMENTED_FUNC(cellSsl);
return CELL_OK;
}
int cellSslCertGetNameEntryCount()
{
UNIMPLEMENTED_FUNC(cellSsl);
return CELL_OK;
}
int cellSslCertGetNameEntryInfo()
{
UNIMPLEMENTED_FUNC(cellSsl);
return CELL_OK;
}
int cellSslCertGetMd5Fingerprint()
{
UNIMPLEMENTED_FUNC(cellSsl);
return CELL_OK;
}
void cellSsl_init()
{
cellSsl.AddFunc(0xfb02c9d2, cellSslInit);
cellSsl.AddFunc(0x1650aea4, cellSslEnd);
cellSsl.AddFunc(0x571afaca, cellSslCertificateLoader);
cellSsl.AddFunc(0x7b689ebc, cellSslCertGetSerialNumber);
cellSsl.AddFunc(0xf8206492, cellSslCertGetPublicKey);
cellSsl.AddFunc(0x8e505175, cellSslCertGetRsaPublicKeyModulus);
cellSsl.AddFunc(0x033c4905, cellSslCertGetRsaPublicKeyExponent);
cellSsl.AddFunc(0x31d9ba8d, cellSslCertGetNotBefore);
cellSsl.AddFunc(0x218b64da, cellSslCertGetNotAfter);
cellSsl.AddFunc(0x32c61bdf, cellSslCertGetSubjectName);
cellSsl.AddFunc(0xae6eb491, cellSslCertGetIssuerName);
cellSsl.AddFunc(0x766d3ca1, cellSslCertGetNameEntryCount);
cellSsl.AddFunc(0x006c4900, cellSslCertGetNameEntryInfo);
cellSsl.AddFunc(0x5e9253ca, cellSslCertGetMd5Fingerprint);
}

View File

@ -0,0 +1,704 @@
#include "stdafx.h"
#include "Emu/SysCalls/SysCalls.h"
#include "Emu/SysCalls/SC_FUNC.h"
void sys_http_init();
Module sys_http(0x0001, sys_http_init);
int cellHttpInit()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpEnd()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpsInit()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpsEnd()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpSetProxy()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpGetProxy()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpInitCookie()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpEndCookie()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpAddCookieWithClientId()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpSessionCookieFlush()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpCookieExportWithClientId()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpCookieImportWithClientId()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpClientSetCookieSendCallback()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpClientSetCookieRecvCallback()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpCreateClient()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpDestroyClient()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpClientSetAuthenticationCallback()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpClientSetTransactionStateCallback()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpClientSetRedirectCallback()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpClientSetProxy()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpClientGetProxy()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpClientSetVersion()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpClientGetVersion()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpClientSetPipeline()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpClientGetPipeline()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpClientSetKeepAlive()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpClientGetKeepAlive()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpClientSetAutoRedirect()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpClientGetAutoRedirect()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpClientSetAutoAuthentication()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpClientGetAutoAuthentication()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpClientSetAuthenticationCacheStatus()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpClientGetAuthenticationCacheStatus()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpClientSetCookieStatus()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpClientGetCookieStatus()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpClientSetUserAgent()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpClientGetUserAgent()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpClientSetResponseBufferMax()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpClientGetResponseBufferMax()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpClientCloseAllConnections()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpClientCloseConnections()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpClientPollConnections()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpClientSetRecvTimeout()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpClientGetRecvTimeout()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpClientSetSendTimeout()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpClientGetSendTimeout()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpClientSetConnTimeout()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpClientGetConnTimeout()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpClientSetTotalPoolSize()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpClientGetTotalPoolSize()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpClientSetPerHostPoolSize()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpClientGetPerHostPoolSize()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpClientSetPerHostKeepAliveMax()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpClientGetPerHostKeepAliveMax()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpClientSetPerPipelineMax()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpClientGetPerPipelineMax()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpClientSetRecvBufferSize()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpClientGetRecvBufferSize()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpClientGetAllHeaders()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpClientSetHeader()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpClientGetHeader()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpClientAddHeader()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpClientDeleteHeader()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpClientSetSslCallback()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpClientSetSslClientCertificate()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpCreateTransaction()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpDestroyTransaction()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpTransactionGetUri()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpTransactionCloseConnection()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpTransactionReleaseConnection()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpTransactionAbortConnection()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpSendRequest()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpRequestSetContentLength()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpRequestGetContentLength()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpRequestSetChunkedTransferStatus()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpRequestGetChunkedTransferStatus()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpRequestGetAllHeaders()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpRequestSetHeader()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpRequestGetHeader()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpRequestAddHeader()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpRequestDeleteHeader()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpRecvResponse()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpResponseGetAllHeaders()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpResponseGetHeader()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpResponseGetContentLength()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpResponseGetStatusCode()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpResponseGetStatusLine()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpTransactionGetSslCipherName()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpTransactionGetSslCipherId()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpTransactionGetSslCipherVersion()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpTransactionGetSslCipherBits()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpTransactionGetSslCipherString()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpTransactionGetSslVersion()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpTransactionGetSslId()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpClientSetSslVersion()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpClientGetSslVersion()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
int cellHttpClientSetSslIdDestroyCallback()
{
UNIMPLEMENTED_FUNC(sys_http);
return CELL_OK;
}
void sys_http_init()
{
// (TODO: Find addresses for cellHttpClientSetSendBufferSize and cellHttpClientGetSendBufferSize)
sys_http.AddFunc(0x250c386c, cellHttpInit);
sys_http.AddFunc(0xd276ff1f, cellHttpEnd);
sys_http.AddFunc(0x522180bc, cellHttpsInit);
sys_http.AddFunc(0xe6d4202f, cellHttpsEnd);
sys_http.AddFunc(0x0d896b97, cellHttpSetProxy);
sys_http.AddFunc(0x2a87603a, cellHttpGetProxy);
sys_http.AddFunc(0x9638f766, cellHttpInitCookie);
sys_http.AddFunc(0x61b2bade, cellHttpEndCookie);
sys_http.AddFunc(0x1b5bdcc6, cellHttpAddCookieWithClientId);
sys_http.AddFunc(0xad6a2e5b, cellHttpSessionCookieFlush);
sys_http.AddFunc(0xf972c733, cellHttpCookieExportWithClientId);
sys_http.AddFunc(0x0d846d63, cellHttpCookieImportWithClientId);
sys_http.AddFunc(0x4d915204, cellHttpClientSetCookieSendCallback);
sys_http.AddFunc(0x13fe767b, cellHttpClientSetCookieRecvCallback);
sys_http.AddFunc(0x4e4ee53a, cellHttpCreateClient);
sys_http.AddFunc(0x980855ac, cellHttpDestroyClient);
sys_http.AddFunc(0x660d42a9, cellHttpClientSetAuthenticationCallback);
sys_http.AddFunc(0xb6feb84b, cellHttpClientSetTransactionStateCallback);
sys_http.AddFunc(0x473cd9f1, cellHttpClientSetRedirectCallback);
sys_http.AddFunc(0xd7d3cd5d, cellHttpClientSetProxy);
sys_http.AddFunc(0x4d40cf98, cellHttpClientGetProxy);
sys_http.AddFunc(0x40547d8b, cellHttpClientSetVersion);
sys_http.AddFunc(0xdc405507, cellHttpClientGetVersion);
sys_http.AddFunc(0x296a46cf, cellHttpClientSetPipeline);
sys_http.AddFunc(0x2a1f28f6, cellHttpClientGetPipeline);
sys_http.AddFunc(0x5d473170, cellHttpClientSetKeepAlive);
sys_http.AddFunc(0x591c21a8, cellHttpClientGetKeepAlive);
sys_http.AddFunc(0x211d8ba3, cellHttpClientSetAutoRedirect);
sys_http.AddFunc(0x2960e309, cellHttpClientGetAutoRedirect);
sys_http.AddFunc(0x8eaf47a3, cellHttpClientSetAutoAuthentication);
sys_http.AddFunc(0x5980a293, cellHttpClientGetAutoAuthentication);
sys_http.AddFunc(0x6eed4999, cellHttpClientSetAuthenticationCacheStatus);
sys_http.AddFunc(0xfce39343, cellHttpClientGetAuthenticationCacheStatus);
sys_http.AddFunc(0x434419c8, cellHttpClientSetCookieStatus);
sys_http.AddFunc(0xeb9c1e5e, cellHttpClientGetCookieStatus);
sys_http.AddFunc(0xcac9fc34, cellHttpClientSetUserAgent);
sys_http.AddFunc(0xee05b0c1, cellHttpClientGetUserAgent);
sys_http.AddFunc(0xadd66b5c, cellHttpClientSetResponseBufferMax);
sys_http.AddFunc(0x6884cdb7, cellHttpClientGetResponseBufferMax);
sys_http.AddFunc(0x2033b878, cellHttpClientCloseAllConnections);
sys_http.AddFunc(0x27f86d70, cellHttpClientCloseConnections);
sys_http.AddFunc(0xadc0a4b2, cellHttpClientPollConnections);
sys_http.AddFunc(0x224e1610, cellHttpClientSetRecvTimeout);
sys_http.AddFunc(0xba78e51f, cellHttpClientGetRecvTimeout);
sys_http.AddFunc(0x71714cdc, cellHttpClientSetSendTimeout);
sys_http.AddFunc(0x271a0b06, cellHttpClientGetSendTimeout);
sys_http.AddFunc(0xd7471088, cellHttpClientSetConnTimeout);
sys_http.AddFunc(0x14bfc765, cellHttpClientGetConnTimeout);
sys_http.AddFunc(0x8aa5fcd3, cellHttpClientSetTotalPoolSize);
sys_http.AddFunc(0x070f1020, cellHttpClientGetTotalPoolSize);
sys_http.AddFunc(0xab1c55ab, cellHttpClientSetPerHostPoolSize);
sys_http.AddFunc(0xffc74003, cellHttpClientGetPerHostPoolSize);
sys_http.AddFunc(0x595adee9, cellHttpClientSetPerHostKeepAliveMax);
sys_http.AddFunc(0x46bcc9ff, cellHttpClientGetPerHostKeepAliveMax);
sys_http.AddFunc(0xdc7ed599, cellHttpClientSetPerPipelineMax);
sys_http.AddFunc(0xd06c90a4, cellHttpClientGetPerPipelineMax);
sys_http.AddFunc(0xbf6e3659, cellHttpClientSetRecvBufferSize);
sys_http.AddFunc(0x130150ea, cellHttpClientGetRecvBufferSize);
//sys_http.AddFunc(, cellHttpClientSetSendBufferSize);
//sys_http.AddFunc(, cellHttpClientGetSendBufferSize);
sys_http.AddFunc(0x0d9c65be, cellHttpClientGetAllHeaders);
sys_http.AddFunc(0xa34c4b6f, cellHttpClientSetHeader);
sys_http.AddFunc(0xd1ec0b25, cellHttpClientGetHeader);
sys_http.AddFunc(0x4b33942a, cellHttpClientAddHeader);
sys_http.AddFunc(0x617eec02, cellHttpClientDeleteHeader);
sys_http.AddFunc(0x1395d8d1, cellHttpClientSetSslCallback);
sys_http.AddFunc(0xd8352a40, cellHttpClientSetSslClientCertificate);
sys_http.AddFunc(0x052a80d9, cellHttpCreateTransaction);
sys_http.AddFunc(0x32f5cae2, cellHttpDestroyTransaction);
sys_http.AddFunc(0x0ef17399, cellHttpTransactionGetUri);
sys_http.AddFunc(0xa0d9223c, cellHttpTransactionCloseConnection);
sys_http.AddFunc(0xd47cc666, cellHttpTransactionReleaseConnection);
sys_http.AddFunc(0x2d52848b, cellHttpTransactionAbortConnection);
sys_http.AddFunc(0xa755b005, cellHttpSendRequest);
sys_http.AddFunc(0xaf73a64e, cellHttpRequestSetContentLength);
sys_http.AddFunc(0x958323cf, cellHttpRequestGetContentLength);
sys_http.AddFunc(0x8e3f7ee1, cellHttpRequestSetChunkedTransferStatus);
sys_http.AddFunc(0x4137a1f6, cellHttpRequestGetChunkedTransferStatus);
sys_http.AddFunc(0x42205fe0, cellHttpRequestGetAllHeaders);
sys_http.AddFunc(0x54f2a4de, cellHttpRequestSetHeader);
sys_http.AddFunc(0x0b9fea5f, cellHttpRequestGetHeader);
sys_http.AddFunc(0xed993147, cellHttpRequestAddHeader);
sys_http.AddFunc(0x16214411, cellHttpRequestDeleteHeader);
sys_http.AddFunc(0x61c90691, cellHttpRecvResponse);
sys_http.AddFunc(0xbea17389, cellHttpResponseGetAllHeaders);
sys_http.AddFunc(0x4f5d8d20, cellHttpResponseGetHeader);
sys_http.AddFunc(0x464ff889, cellHttpResponseGetContentLength);
sys_http.AddFunc(0x10d0d7fc, cellHttpResponseGetStatusCode);
sys_http.AddFunc(0x6a81b5e4, cellHttpResponseGetStatusLine);
sys_http.AddFunc(0x895c604c, cellHttpTransactionGetSslCipherName);
sys_http.AddFunc(0x34061e49, cellHttpTransactionGetSslCipherId);
sys_http.AddFunc(0x93e938e5, cellHttpTransactionGetSslCipherVersion);
sys_http.AddFunc(0x38954133, cellHttpTransactionGetSslCipherBits);
sys_http.AddFunc(0xe3c424b3, cellHttpTransactionGetSslCipherString);
sys_http.AddFunc(0xad1c6f02, cellHttpTransactionGetSslVersion);
sys_http.AddFunc(0x2a78ff04, cellHttpTransactionGetSslId);
sys_http.AddFunc(0x65691795, cellHttpClientSetSslVersion);
sys_http.AddFunc(0xccf57336, cellHttpClientGetSslVersion);
sys_http.AddFunc(0x7313c78d, cellHttpClientSetSslIdDestroyCallback);
}

View File

@ -0,0 +1,400 @@
#include "stdafx.h"
#include "Emu/SysCalls/SysCalls.h"
#include "Emu/SysCalls/SC_FUNC.h"
void sys_net_init();
Module sys_net((u16)0x0000, sys_net_init);
int accept()
{
UNIMPLEMENTED_FUNC(sys_net);
return CELL_OK;
}
int bind()
{
UNIMPLEMENTED_FUNC(sys_net);
return CELL_OK;
}
int connect()
{
UNIMPLEMENTED_FUNC(sys_net);
return CELL_OK;
}
int gethostbyaddr()
{
UNIMPLEMENTED_FUNC(sys_net);
return CELL_OK;
}
int gethostbyname()
{
UNIMPLEMENTED_FUNC(sys_net);
return CELL_OK;
}
int getpeername()
{
UNIMPLEMENTED_FUNC(sys_net);
return CELL_OK;
}
int getsockname()
{
UNIMPLEMENTED_FUNC(sys_net);
return CELL_OK;
}
int getsockopt()
{
UNIMPLEMENTED_FUNC(sys_net);
return CELL_OK;
}
int inet_addr()
{
UNIMPLEMENTED_FUNC(sys_net);
return CELL_OK;
}
int inet_aton()
{
UNIMPLEMENTED_FUNC(sys_net);
return CELL_OK;
}
int inet_lnaof()
{
UNIMPLEMENTED_FUNC(sys_net);
return CELL_OK;
}
int inet_makeaddr()
{
UNIMPLEMENTED_FUNC(sys_net);
return CELL_OK;
}
int inet_netof()
{
UNIMPLEMENTED_FUNC(sys_net);
return CELL_OK;
}
int inet_network()
{
UNIMPLEMENTED_FUNC(sys_net);
return CELL_OK;
}
int inet_ntoa()
{
UNIMPLEMENTED_FUNC(sys_net);
return CELL_OK;
}
int inet_ntop()
{
UNIMPLEMENTED_FUNC(sys_net);
return CELL_OK;
}
int inet_pton()
{
UNIMPLEMENTED_FUNC(sys_net);
return CELL_OK;
}
int listen()
{
UNIMPLEMENTED_FUNC(sys_net);
return CELL_OK;
}
int recv()
{
UNIMPLEMENTED_FUNC(sys_net);
return CELL_OK;
}
int recvfrom()
{
UNIMPLEMENTED_FUNC(sys_net);
return CELL_OK;
}
int recvmsg()
{
UNIMPLEMENTED_FUNC(sys_net);
return CELL_OK;
}
int send()
{
UNIMPLEMENTED_FUNC(sys_net);
return CELL_OK;
}
int sendmsg()
{
UNIMPLEMENTED_FUNC(sys_net);
return CELL_OK;
}
int sendto()
{
UNIMPLEMENTED_FUNC(sys_net);
return CELL_OK;
}
int setsockopt()
{
UNIMPLEMENTED_FUNC(sys_net);
return CELL_OK;
}
int shutdown()
{
UNIMPLEMENTED_FUNC(sys_net);
return CELL_OK;
}
int socket()
{
UNIMPLEMENTED_FUNC(sys_net);
return CELL_OK;
}
int socketclose()
{
UNIMPLEMENTED_FUNC(sys_net);
return CELL_OK;
}
int socketpoll()
{
UNIMPLEMENTED_FUNC(sys_net);
return CELL_OK;
}
int socketselect()
{
UNIMPLEMENTED_FUNC(sys_net);
return CELL_OK;
}
int sys_net_initialize_network_ex()
{
UNIMPLEMENTED_FUNC(sys_net);
return CELL_OK;
}
int sys_net_get_udpp2p_test_param()
{
UNIMPLEMENTED_FUNC(sys_net);
return CELL_OK;
}
int sys_net_set_udpp2p_test_param()
{
UNIMPLEMENTED_FUNC(sys_net);
return CELL_OK;
}
int sys_net_get_lib_name_server()
{
UNIMPLEMENTED_FUNC(sys_net);
return CELL_OK;
}
int sys_net_if_ctl()
{
UNIMPLEMENTED_FUNC(sys_net);
return CELL_OK;
}
int sys_net_get_netemu_test_param()
{
UNIMPLEMENTED_FUNC(sys_net);
return CELL_OK;
}
int sys_net_get_sockinfo()
{
UNIMPLEMENTED_FUNC(sys_net);
return CELL_OK;
}
int sys_net_close_dump()
{
UNIMPLEMENTED_FUNC(sys_net);
return CELL_OK;
}
int sys_net_set_test_param()
{
UNIMPLEMENTED_FUNC(sys_net);
return CELL_OK;
}
int sys_net_show_nameserver()
{
UNIMPLEMENTED_FUNC(sys_net);
return CELL_OK;
}
int _sys_net_errno_loc()
{
UNIMPLEMENTED_FUNC(sys_net);
return CELL_OK;
}
int sys_net_set_resolver_configurations()
{
UNIMPLEMENTED_FUNC(sys_net);
return CELL_OK;
}
int sys_net_show_route()
{
UNIMPLEMENTED_FUNC(sys_net);
return CELL_OK;
}
int sys_net_read_dump()
{
UNIMPLEMENTED_FUNC(sys_net);
return CELL_OK;
}
int sys_net_abort_resolver()
{
UNIMPLEMENTED_FUNC(sys_net);
return CELL_OK;
}
int sys_net_abort_socket()
{
UNIMPLEMENTED_FUNC(sys_net);
return CELL_OK;
}
int sys_net_set_lib_name_server()
{
UNIMPLEMENTED_FUNC(sys_net);
return CELL_OK;
}
int sys_net_get_test_param()
{
UNIMPLEMENTED_FUNC(sys_net);
return CELL_OK;
}
int sys_net_get_sockinfo_ex()
{
UNIMPLEMENTED_FUNC(sys_net);
return CELL_OK;
}
int sys_net_open_dump()
{
UNIMPLEMENTED_FUNC(sys_net);
return CELL_OK;
}
int sys_net_show_ifconfig()
{
UNIMPLEMENTED_FUNC(sys_net);
return CELL_OK;
}
int sys_net_finalize_network()
{
UNIMPLEMENTED_FUNC(sys_net);
return CELL_OK;
}
int _sys_net_h_errno_loc()
{
UNIMPLEMENTED_FUNC(sys_net);
return CELL_OK;
}
int sys_net_set_netemu_test_param()
{
UNIMPLEMENTED_FUNC(sys_net);
return CELL_OK;
}
int sys_net_free_thread_context()
{
UNIMPLEMENTED_FUNC(sys_net);
return CELL_OK;
}
void sys_net_init()
{
// (TODO: Fix function overloading problem due to winsock.h and find addresses for ntohl and ntohs)
//sys_net.AddFunc(0xc94f6939, accept);
//sys_net.AddFunc(0xb0a59804, bind);
//sys_net.AddFunc(0x64f66d35, connect);
//sys_net.AddFunc(0xf7ac8941, gethostbyaddr);
//sys_net.AddFunc(0x71f4c717, gethostbyname);
//sys_net.AddFunc(0xf9ec2db6, getpeername);
//sys_net.AddFunc(0x13efe7f5, getsockname);
//sys_net.AddFunc(0x5a045bd1, getsockopt);
//sys_net.AddFunc(0xdabbc2c0, inet_addr);
sys_net.AddFunc(0xa9a079e0, inet_aton);
sys_net.AddFunc(0x566893ce, inet_lnaof);
sys_net.AddFunc(0xb4152c74, inet_makeaddr);
sys_net.AddFunc(0xe39a62a7, inet_netof);
sys_net.AddFunc(0x506ad863, inet_network);
//sys_net.AddFunc(0x858a930b, inet_ntoa);
sys_net.AddFunc(0xc98a3146, inet_ntop);
sys_net.AddFunc(0x8af3825e, inet_pton);
//sys_net.AddFunc(0x28e208bb, listen);
//sys_net.AddFunc(, ntohl);
//sys_net.AddFunc(, ntohs);
//sys_net.AddFunc(0xfba04f37, recv);
//sys_net.AddFunc(0x1f953b9f, recvfrom);
sys_net.AddFunc(0xc9d09c34, recvmsg);
//sys_net.AddFunc(0xdc751b40, send);
sys_net.AddFunc(0xad09481b, sendmsg);
//sys_net.AddFunc(0x9647570b, sendto);
//sys_net.AddFunc(0x88f03575, setsockopt);
//sys_net.AddFunc(0xa50777c6, shutdown);
//sys_net.AddFunc(0x9c056962, socket);
sys_net.AddFunc(0x6db6e8cd, socketclose);
sys_net.AddFunc(0x051ee3ee, socketpoll);
sys_net.AddFunc(0x3f09e20a, socketselect);
sys_net.AddFunc(0x139a9e9b, sys_net_initialize_network_ex);
sys_net.AddFunc(0x05bd4438, sys_net_get_udpp2p_test_param);
sys_net.AddFunc(0x10b81ed6, sys_net_set_udpp2p_test_param);
sys_net.AddFunc(0x1d14d6e4, sys_net_get_lib_name_server);
sys_net.AddFunc(0x27fb339d, sys_net_if_ctl);
sys_net.AddFunc(0x368823c0, sys_net_get_netemu_test_param);
sys_net.AddFunc(0x3b27c780, sys_net_get_sockinfo);
sys_net.AddFunc(0x44328aa2, sys_net_close_dump);
sys_net.AddFunc(0x4ab0b9b9, sys_net_set_test_param);
sys_net.AddFunc(0x5420e419, sys_net_show_nameserver);
sys_net.AddFunc(0x6005cde1, _sys_net_errno_loc);
sys_net.AddFunc(0x7687d48c, sys_net_set_resolver_configurations);
sys_net.AddFunc(0x79b61646, sys_net_show_route);
sys_net.AddFunc(0x89c9917c, sys_net_read_dump);
sys_net.AddFunc(0x8ccf05ed, sys_net_abort_resolver);
sys_net.AddFunc(0x8d1b77fb, sys_net_abort_socket);
sys_net.AddFunc(0x9a318259, sys_net_set_lib_name_server);
sys_net.AddFunc(0xa5a86557, sys_net_get_test_param);
sys_net.AddFunc(0xa765d029, sys_net_get_sockinfo_ex);
sys_net.AddFunc(0xab447704, sys_net_open_dump);
sys_net.AddFunc(0xb48636c4, sys_net_show_ifconfig);
sys_net.AddFunc(0xb68d5625, sys_net_finalize_network);
sys_net.AddFunc(0xc9157d30, _sys_net_h_errno_loc);
sys_net.AddFunc(0xe2434507, sys_net_set_netemu_test_param);
sys_net.AddFunc(0xfdb8f926, sys_net_free_thread_context);
}

View File

@ -250,14 +250,18 @@
<ClCompile Include="Emu\SysCalls\Modules.cpp" /> <ClCompile Include="Emu\SysCalls\Modules.cpp" />
<ClCompile Include="Emu\SysCalls\Modules\cellGcmSys.cpp" /> <ClCompile Include="Emu\SysCalls\Modules\cellGcmSys.cpp" />
<ClCompile Include="Emu\SysCalls\Modules\cellGifDec.cpp" /> <ClCompile Include="Emu\SysCalls\Modules\cellGifDec.cpp" />
<ClCompile Include="Emu\SysCalls\Modules\cellHttpUtil.cpp" />
<ClCompile Include="Emu\SysCalls\Modules\cellJpgDec.cpp" /> <ClCompile Include="Emu\SysCalls\Modules\cellJpgDec.cpp" />
<ClCompile Include="Emu\SysCalls\Modules\cellPngDec.cpp" /> <ClCompile Include="Emu\SysCalls\Modules\cellPngDec.cpp" />
<ClCompile Include="Emu\SysCalls\Modules\cellResc.cpp" /> <ClCompile Include="Emu\SysCalls\Modules\cellResc.cpp" />
<ClCompile Include="Emu\SysCalls\Modules\cellSsl.cpp" />
<ClCompile Include="Emu\SysCalls\Modules\cellSysmodule.cpp" /> <ClCompile Include="Emu\SysCalls\Modules\cellSysmodule.cpp" />
<ClCompile Include="Emu\SysCalls\Modules\cellSysutil.cpp" /> <ClCompile Include="Emu\SysCalls\Modules\cellSysutil.cpp" />
<ClCompile Include="Emu\SysCalls\Modules\sysPrxForUser.cpp" /> <ClCompile Include="Emu\SysCalls\Modules\sysPrxForUser.cpp" />
<ClCompile Include="Emu\SysCalls\Modules\sys_fs.cpp" /> <ClCompile Include="Emu\SysCalls\Modules\sys_fs.cpp" />
<ClCompile Include="Emu\SysCalls\Modules\sys_http.cpp" />
<ClCompile Include="Emu\SysCalls\Modules\sys_io.cpp" /> <ClCompile Include="Emu\SysCalls\Modules\sys_io.cpp" />
<ClCompile Include="Emu\SysCalls\Modules\sys_net.cpp" />
<ClCompile Include="Emu\SysCalls\SysCalls.cpp" /> <ClCompile Include="Emu\SysCalls\SysCalls.cpp" />
<ClCompile Include="Emu\System.cpp" /> <ClCompile Include="Emu\System.cpp" />
<ClCompile Include="Gui\CompilerELF.cpp" /> <ClCompile Include="Gui\CompilerELF.cpp" />

View File

@ -307,6 +307,18 @@
<ClCompile Include="Emu\SysCalls\lv2\SC_Mouse.cpp"> <ClCompile Include="Emu\SysCalls\lv2\SC_Mouse.cpp">
<Filter>Emu\SysCalls\lv2</Filter> <Filter>Emu\SysCalls\lv2</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="Emu\SysCalls\Modules\cellHttpUtil.cpp">
<Filter>Emu\SysCalls\Modules</Filter>
</ClCompile>
<ClCompile Include="Emu\SysCalls\Modules\cellSsl.cpp">
<Filter>Emu\SysCalls\Modules</Filter>
</ClCompile>
<ClCompile Include="Emu\SysCalls\Modules\sys_http.cpp">
<Filter>Emu\SysCalls\Modules</Filter>
</ClCompile>
<ClCompile Include="Emu\SysCalls\Modules\sys_net.cpp">
<Filter>Emu\SysCalls\Modules</Filter>
</ClCompile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ResourceCompile Include="rpcs3.rc" /> <ResourceCompile Include="rpcs3.rc" />