cellOskDialog, cellPhoto(Decode|Export|Import)

This commit is contained in:
Nekotekina 2015-07-30 04:43:03 +03:00
commit 2eaf5cdc01
9 changed files with 284 additions and 53 deletions

View file

@ -35,8 +35,12 @@ extern Module cellMusic;
extern Module cellMusicDecode; extern Module cellMusicDecode;
extern Module cellMusicExport; extern Module cellMusicExport;
extern Module cellNetCtl; extern Module cellNetCtl;
extern Module cellOskDialog;
extern Module cellOvis; extern Module cellOvis;
extern Module cellPamf; extern Module cellPamf;
extern Module cellPhotoDecode;
extern Module cellPhotoExport;
extern Module cellPhotoImportUtil;
extern Module cellPngDec; extern Module cellPngDec;
extern Module cellPngEnc; extern Module cellPngEnc;
extern Module cellResc; extern Module cellResc;
@ -160,7 +164,7 @@ const g_module_list[] =
{ 0x0038, "sceNp2", &sceNp2 }, { 0x0038, "sceNp2", &sceNp2 },
{ 0x0039, "cellSysutilAp", &cellSysutilAp }, { 0x0039, "cellSysutilAp", &cellSysutilAp },
{ 0x003a, "sceNpClans", &sceNpClans }, { 0x003a, "sceNpClans", &sceNpClans },
{ 0x003b, "cellSysutilOskExt", nullptr }, { 0x003b, "cellOskExtUtility", &cellOskDialog },
{ 0x003c, "cellVdecDivx", nullptr }, { 0x003c, "cellVdecDivx", nullptr },
{ 0x003d, "cellJpgEnc", &cellJpgEnc }, { 0x003d, "cellJpgEnc", &cellJpgEnc },
{ 0x003e, "cellGame", &cellGame }, { 0x003e, "cellGame", &cellGame },
@ -194,11 +198,11 @@ const g_module_list[] =
{ 0xf01e, "cellAdecMp3", nullptr }, { 0xf01e, "cellAdecMp3", nullptr },
{ 0xf023, "cellImeJpUtility", &cellImeJp }, { 0xf023, "cellImeJpUtility", &cellImeJp },
{ 0xf028, "cellMusicUtility", &cellMusic }, { 0xf028, "cellMusicUtility", &cellMusic },
{ 0xf029, "cellPhotoExport", nullptr }, { 0xf029, "cellPhotoUtility", &cellPhotoExport },
{ 0xf02a, "cellPrint", nullptr }, { 0xf02a, "cellPrint", nullptr },
{ 0xf02b, "cellPhotoImport", nullptr }, { 0xf02b, "cellPhotoImportUtil", &cellPhotoImportUtil },
{ 0xf02c, "cellMusicExportUtility", &cellMusicExport }, { 0xf02c, "cellMusicExportUtility", &cellMusicExport },
{ 0xf02e, "cellPhotoDecode", nullptr }, { 0xf02e, "cellPhotoDecodeUtil", &cellPhotoDecode },
{ 0xf02f, "cellSearch", &cellSearch }, { 0xf02f, "cellSearch", &cellSearch },
{ 0xf030, "cellSysutilAvc2", &cellSysutilAvc2 }, { 0xf030, "cellSysutilAvc2", &cellSysutilAvc2 },
{ 0xf034, "cellSailRec", &cellSailRec }, { 0xf034, "cellSailRec", &cellSailRec },
@ -223,9 +227,11 @@ void ModuleManager::Init()
clear_ppu_functions(); clear_ppu_functions();
std::unordered_set<Module*> processed;
for (auto& module : g_module_list) for (auto& module : g_module_list)
{ {
if (module) if (module && processed.emplace(module).second)
{ {
module->Init(); module->Init();
} }
@ -250,9 +256,11 @@ void ModuleManager::Close()
return; return;
} }
std::unordered_set<Module*> processed;
for (auto& module : g_module_list) for (auto& module : g_module_list)
{ {
if (module && module->on_stop) if (module && module->on_stop && processed.emplace(module).second)
{ {
module->on_stop(); module->on_stop();
} }

View file

@ -88,11 +88,11 @@ class Module : public LogBase
public: public:
Module(const char* name, void(*init)()); Module(const char* name, void(*init)());
Module(Module &other) = delete; Module(Module& other) = delete;
Module(Module &&other) = delete; Module(Module&& other) = delete;
Module &operator =(Module &other) = delete; Module& operator =(Module& other) = delete;
Module &operator =(Module &&other) = delete; Module& operator =(Module&& other) = delete;
~Module(); ~Module();

View file

@ -0,0 +1,193 @@
#include "stdafx.h"
#include "Emu/Memory/Memory.h"
#include "Emu/SysCalls/Modules.h"
extern Module cellOskDialog;
s32 cellOskDialogLoadAsync()
{
throw EXCEPTION("");
}
s32 cellOskDialogUnloadAsync()
{
throw EXCEPTION("");
}
s32 cellOskDialogGetSize()
{
throw EXCEPTION("");
}
s32 cellOskDialogAbort()
{
throw EXCEPTION("");
}
s32 cellOskDialogSetDeviceMask()
{
throw EXCEPTION("");
}
s32 cellOskDialogSetSeparateWindowOption()
{
throw EXCEPTION("");
}
s32 cellOskDialogSetInitialInputDevice()
{
throw EXCEPTION("");
}
s32 cellOskDialogSetInitialKeyLayout()
{
throw EXCEPTION("");
}
s32 cellOskDialogDisableDimmer()
{
throw EXCEPTION("");
}
s32 cellOskDialogSetKeyLayoutOption()
{
throw EXCEPTION("");
}
s32 cellOskDialogAddSupportLanguage()
{
throw EXCEPTION("");
}
s32 cellOskDialogSetLayoutMode()
{
throw EXCEPTION("");
}
s32 cellOskDialogGetInputText()
{
throw EXCEPTION("");
}
s32 cellOskDialogExtInputDeviceUnlock()
{
throw EXCEPTION("");
}
s32 cellOskDialogExtRegisterKeyboardEventHookCallback()
{
throw EXCEPTION("");
}
s32 cellOskDialogExtAddJapaneseOptionDictionary()
{
throw EXCEPTION("");
}
s32 cellOskDialogExtEnableClipboard()
{
throw EXCEPTION("");
}
s32 cellOskDialogExtSendFinishMessage()
{
throw EXCEPTION("");
}
s32 cellOskDialogExtAddOptionDictionary()
{
throw EXCEPTION("");
}
s32 cellOskDialogExtSetInitialScale()
{
throw EXCEPTION("");
}
s32 cellOskDialogExtInputDeviceLock()
{
throw EXCEPTION("");
}
s32 cellOskDialogExtSetBaseColor()
{
throw EXCEPTION("");
}
s32 cellOskDialogExtRegisterConfirmWordFilterCallback()
{
throw EXCEPTION("");
}
s32 cellOskDialogExtUpdateInputText()
{
throw EXCEPTION("");
}
s32 cellOskDialogExtDisableHalfByteKana()
{
throw EXCEPTION("");
}
s32 cellOskDialogExtSetPointerEnable()
{
throw EXCEPTION("");
}
s32 cellOskDialogExtUpdatePointerDisplayPos()
{
throw EXCEPTION("");
}
s32 cellOskDialogExtEnableHalfByteKana()
{
throw EXCEPTION("");
}
s32 cellOskDialogExtRegisterForceFinishCallback()
{
throw EXCEPTION("");
}
void cellSysutil_OskDialog_init()
{
extern Module cellSysutil;
// cellOskDialog functions:
REG_FUNC(cellSysutil, cellOskDialogLoadAsync);
REG_FUNC(cellSysutil, cellOskDialogUnloadAsync);
REG_FUNC(cellSysutil, cellOskDialogGetSize);
REG_FUNC(cellSysutil, cellOskDialogAbort);
REG_FUNC(cellSysutil, cellOskDialogSetDeviceMask);
REG_FUNC(cellSysutil, cellOskDialogSetSeparateWindowOption);
REG_FUNC(cellSysutil, cellOskDialogSetInitialInputDevice);
REG_FUNC(cellSysutil, cellOskDialogSetInitialKeyLayout);
REG_FUNC(cellSysutil, cellOskDialogDisableDimmer);
REG_FUNC(cellSysutil, cellOskDialogSetKeyLayoutOption);
REG_FUNC(cellSysutil, cellOskDialogAddSupportLanguage);
REG_FUNC(cellSysutil, cellOskDialogSetLayoutMode);
REG_FUNC(cellSysutil, cellOskDialogGetInputText);
}
Module cellOskDialog("cellOskDialog", []()
{
// cellOskDialogExt functions:
REG_FUNC(cellOskDialog, cellOskDialogExtInputDeviceUnlock);
REG_FUNC(cellOskDialog, cellOskDialogExtRegisterKeyboardEventHookCallback);
REG_FUNC(cellOskDialog, cellOskDialogExtAddJapaneseOptionDictionary);
REG_FUNC(cellOskDialog, cellOskDialogExtEnableClipboard);
REG_FUNC(cellOskDialog, cellOskDialogExtSendFinishMessage);
REG_FUNC(cellOskDialog, cellOskDialogExtAddOptionDictionary);
REG_FUNC(cellOskDialog, cellOskDialogExtSetInitialScale);
REG_FUNC(cellOskDialog, cellOskDialogExtInputDeviceLock);
REG_FUNC(cellOskDialog, cellOskDialogExtSetBaseColor);
REG_FUNC(cellOskDialog, cellOskDialogExtRegisterConfirmWordFilterCallback);
REG_FUNC(cellOskDialog, cellOskDialogExtUpdateInputText);
REG_FUNC(cellOskDialog, cellOskDialogExtDisableHalfByteKana);
REG_FUNC(cellOskDialog, cellOskDialogExtSetPointerEnable);
REG_FUNC(cellOskDialog, cellOskDialogExtUpdatePointerDisplayPos);
REG_FUNC(cellOskDialog, cellOskDialogExtEnableHalfByteKana);
REG_FUNC(cellOskDialog, cellOskDialogExtRegisterForceFinishCallback);
});

View file

@ -1,8 +1,8 @@
#include "stdafx.h" #include "stdafx.h"
#if 0 #include "Emu/Memory/Memory.h"
#include "Emu/SysCalls/Modules.h"
void cellPhotoDecode_init(); extern Module cellPhotoDecode;
Module cellPhotoDecode(0xf02e, cellPhotoDecode_init);
// Return Codes // Return Codes
enum enum
@ -32,35 +32,34 @@ struct CellPhotoDecodeReturnParam
}; };
// Functions // Functions
int cellPhotoDecodeInitialize() s32 cellPhotoDecodeInitialize()
{ {
UNIMPLEMENTED_FUNC(cellPhotoDecode); UNIMPLEMENTED_FUNC(cellPhotoDecode);
return CELL_OK; return CELL_OK;
} }
int cellPhotoDecodeInitialize2() s32 cellPhotoDecodeInitialize2()
{ {
UNIMPLEMENTED_FUNC(cellPhotoDecode); UNIMPLEMENTED_FUNC(cellPhotoDecode);
return CELL_OK; return CELL_OK;
} }
int cellPhotoDecodeFinalize() s32 cellPhotoDecodeFinalize()
{ {
UNIMPLEMENTED_FUNC(cellPhotoDecode); UNIMPLEMENTED_FUNC(cellPhotoDecode);
return CELL_OK; return CELL_OK;
} }
int cellPhotoDecodeFromFile() s32 cellPhotoDecodeFromFile()
{ {
UNIMPLEMENTED_FUNC(cellPhotoDecode); UNIMPLEMENTED_FUNC(cellPhotoDecode);
return CELL_OK; return CELL_OK;
} }
void cellPhotoDecode_init() Module cellPhotoDecode("cellPhotoDecode", []()
{ {
REG_FUNC(cellPhotoDecode, cellPhotoDecodeInitialize); REG_FUNC(cellPhotoDecode, cellPhotoDecodeInitialize);
REG_FUNC(cellPhotoDecode, cellPhotoDecodeInitialize2); REG_FUNC(cellPhotoDecode, cellPhotoDecodeInitialize2);
REG_FUNC(cellPhotoDecode, cellPhotoDecodeFinalize); REG_FUNC(cellPhotoDecode, cellPhotoDecodeFinalize);
REG_FUNC(cellPhotoDecode, cellPhotoDecodeFromFile); REG_FUNC(cellPhotoDecode, cellPhotoDecodeFromFile);
} });
#endif

View file

@ -1,8 +1,8 @@
#include "stdafx.h" #include "stdafx.h"
#if 0 #include "Emu/Memory/Memory.h"
#include "Emu/SysCalls/Modules.h"
void cellPhotoExport_init(); extern Module cellPhotoExport;
Module cellPhotoExport(0xf029, cellPhotoExport_init);
// Return Codes // Return Codes
enum enum
@ -21,43 +21,69 @@ enum
CELL_PHOTO_EXPORT_UTIL_ERROR_INITIALIZE = 0x8002c20a, CELL_PHOTO_EXPORT_UTIL_ERROR_INITIALIZE = 0x8002c20a,
}; };
int cellPhotoExportInitialize() s32 cellPhotoInitialize()
{ {
UNIMPLEMENTED_FUNC(cellPhotoExport); UNIMPLEMENTED_FUNC(cellPhotoExport);
return CELL_OK; return CELL_OK;
} }
int cellPhotoExportInitialize2() s32 cellPhotoFinalize()
{ {
UNIMPLEMENTED_FUNC(cellPhotoExport); UNIMPLEMENTED_FUNC(cellPhotoExport);
return CELL_OK; return CELL_OK;
} }
int cellPhotoExportFinalize() s32 cellPhotoRegistFromFile()
{ {
UNIMPLEMENTED_FUNC(cellPhotoExport); UNIMPLEMENTED_FUNC(cellPhotoExport);
return CELL_OK; return CELL_OK;
} }
int cellPhotoExportFromFile() s32 cellPhotoExportInitialize()
{ {
UNIMPLEMENTED_FUNC(cellPhotoExport); UNIMPLEMENTED_FUNC(cellPhotoExport);
return CELL_OK; return CELL_OK;
} }
int cellPhotoExportProgress() s32 cellPhotoExportInitialize2()
{ {
UNIMPLEMENTED_FUNC(cellPhotoExport); UNIMPLEMENTED_FUNC(cellPhotoExport);
return CELL_OK; return CELL_OK;
} }
void cellPhotoExport_init() s32 cellPhotoExportFinalize()
{ {
UNIMPLEMENTED_FUNC(cellPhotoExport);
return CELL_OK;
}
s32 cellPhotoExportFromFile()
{
UNIMPLEMENTED_FUNC(cellPhotoExport);
return CELL_OK;
}
s32 cellPhotoExportFromFileWithCopy()
{
UNIMPLEMENTED_FUNC(cellPhotoExport);
return CELL_OK;
}
s32 cellPhotoExportProgress()
{
UNIMPLEMENTED_FUNC(cellPhotoExport);
return CELL_OK;
}
Module cellPhotoExport("cellPhotoExport", []()
{
REG_FUNC(cellPhotoExport, cellPhotoInitialize);
REG_FUNC(cellPhotoExport, cellPhotoFinalize);
REG_FUNC(cellPhotoExport, cellPhotoRegistFromFile);
REG_FUNC(cellPhotoExport, cellPhotoExportInitialize); REG_FUNC(cellPhotoExport, cellPhotoExportInitialize);
REG_FUNC(cellPhotoExport, cellPhotoExportInitialize2); REG_FUNC(cellPhotoExport, cellPhotoExportInitialize2);
REG_FUNC(cellPhotoExport, cellPhotoExportFinalize); REG_FUNC(cellPhotoExport, cellPhotoExportFinalize);
REG_FUNC(cellPhotoExport, cellPhotoExportFromFile); REG_FUNC(cellPhotoExport, cellPhotoExportFromFile);
//cellPhotoExport.AddFunc(, cellPhotoExportFromFileWithCopy); REG_FUNC(cellPhotoExport, cellPhotoExportFromFileWithCopy);
REG_FUNC(cellPhotoExport, cellPhotoExportProgress); REG_FUNC(cellPhotoExport, cellPhotoExportProgress);
} });
#endif

View file

@ -1,8 +1,8 @@
#include "stdafx.h" #include "stdafx.h"
#if 0 #include "Emu/Memory/Memory.h"
#include "Emu/SysCalls/Modules.h"
void cellPhotoImport_init(); extern Module cellPhotoImportUtil;
Module cellPhotoImport(0xf02b, cellPhotoImport_init);
// Return Codes // Return Codes
enum enum
@ -41,21 +41,20 @@ struct CellPhotoImportSetParam
}; };
// Functions // Functions
int _cellPhotoImport() s32 cellPhotoImport()
{ {
UNIMPLEMENTED_FUNC(cellPhotoImport); UNIMPLEMENTED_FUNC(cellPhotoImportUtil);
return CELL_OK; return CELL_OK;
} }
int _cellPhotoImport2() s32 cellPhotoImport2()
{ {
UNIMPLEMENTED_FUNC(cellPhotoImport); UNIMPLEMENTED_FUNC(cellPhotoImportUtil);
return CELL_OK; return CELL_OK;
} }
void cellPhotoImport_init() Module cellPhotoImportUtil("cellPhotoImport", []()
{ {
REG_FUNC(cellPhotoImport, _cellPhotoImport); REG_FUNC(cellPhotoImportUtil, cellPhotoImport);
REG_FUNC(cellPhotoImport, _cellPhotoImport2); REG_FUNC(cellPhotoImportUtil, cellPhotoImport2);
} });
#endif

View file

@ -710,6 +710,7 @@ s32 cellWebBrowserEstimate2(vm::cptr<CellWebBrowserConfig2> config, vm::ptr<u32>
extern void cellSysutil_SaveData_init(); extern void cellSysutil_SaveData_init();
extern void cellSysutil_GameData_init(); extern void cellSysutil_GameData_init();
extern void cellSysutil_MsgDialog_init(); extern void cellSysutil_MsgDialog_init();
extern void cellSysutil_OskDialog_init();
Module cellSysutil("cellSysutil", []() Module cellSysutil("cellSysutil", []()
{ {
@ -722,6 +723,7 @@ Module cellSysutil("cellSysutil", []()
cellSysutil_SaveData_init(); // cellSaveData functions cellSysutil_SaveData_init(); // cellSaveData functions
cellSysutil_GameData_init(); // cellGameData, cellHddGame functions cellSysutil_GameData_init(); // cellGameData, cellHddGame functions
cellSysutil_MsgDialog_init(); // cellMsgDialog functions cellSysutil_MsgDialog_init(); // cellMsgDialog functions
cellSysutil_OskDialog_init(); // cellOskDialog functions
REG_FUNC(cellSysutil, cellSysutilGetSystemParamInt); REG_FUNC(cellSysutil, cellSysutilGetSystemParamInt);
REG_FUNC(cellSysutil, cellSysutilGetSystemParamString); REG_FUNC(cellSysutil, cellSysutilGetSystemParamString);

View file

@ -49,6 +49,7 @@
<ClCompile Include="Emu\SysCalls\Modules\cellFs.cpp" /> <ClCompile Include="Emu\SysCalls\Modules\cellFs.cpp" />
<ClCompile Include="Emu\SysCalls\Modules\cellGameExec.cpp" /> <ClCompile Include="Emu\SysCalls\Modules\cellGameExec.cpp" />
<ClCompile Include="Emu\SysCalls\Modules\cellMusic.cpp" /> <ClCompile Include="Emu\SysCalls\Modules\cellMusic.cpp" />
<ClCompile Include="Emu\SysCalls\Modules\cellOskDialog.cpp" />
<ClCompile Include="Emu\SysCalls\Modules\cellSpudll.cpp" /> <ClCompile Include="Emu\SysCalls\Modules\cellSpudll.cpp" />
<ClCompile Include="Emu\SysCalls\Modules\cellSpursSpu.cpp" /> <ClCompile Include="Emu\SysCalls\Modules\cellSpursSpu.cpp" />
<ClCompile Include="Crypto\aes.cpp" /> <ClCompile Include="Crypto\aes.cpp" />

View file

@ -413,15 +413,6 @@
<ClCompile Include="Emu\SysCalls\ModuleManager.cpp"> <ClCompile Include="Emu\SysCalls\ModuleManager.cpp">
<Filter>Emu\SysCalls</Filter> <Filter>Emu\SysCalls</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="Emu\SysCalls\Modules\cellPhotoDecode.cpp">
<Filter>Emu\SysCalls\currently_unused</Filter>
</ClCompile>
<ClCompile Include="Emu\SysCalls\Modules\cellPhotoExport.cpp">
<Filter>Emu\SysCalls\currently_unused</Filter>
</ClCompile>
<ClCompile Include="Emu\SysCalls\Modules\cellPhotoImport.cpp">
<Filter>Emu\SysCalls\currently_unused</Filter>
</ClCompile>
<ClCompile Include="Emu\SysCalls\Modules\cellPrint.cpp"> <ClCompile Include="Emu\SysCalls\Modules\cellPrint.cpp">
<Filter>Emu\SysCalls\currently_unused</Filter> <Filter>Emu\SysCalls\currently_unused</Filter>
</ClCompile> </ClCompile>
@ -905,6 +896,18 @@
<ClCompile Include="Emu\SysCalls\Modules\cellMusic.cpp"> <ClCompile Include="Emu\SysCalls\Modules\cellMusic.cpp">
<Filter>Emu\SysCalls\Modules</Filter> <Filter>Emu\SysCalls\Modules</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="Emu\SysCalls\Modules\cellOskDialog.cpp">
<Filter>Emu\SysCalls\Modules</Filter>
</ClCompile>
<ClCompile Include="Emu\SysCalls\Modules\cellPhotoDecode.cpp">
<Filter>Emu\SysCalls\Modules</Filter>
</ClCompile>
<ClCompile Include="Emu\SysCalls\Modules\cellPhotoExport.cpp">
<Filter>Emu\SysCalls\Modules</Filter>
</ClCompile>
<ClCompile Include="Emu\SysCalls\Modules\cellPhotoImport.cpp">
<Filter>Emu\SysCalls\Modules</Filter>
</ClCompile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="Crypto\aes.h"> <ClInclude Include="Crypto\aes.h">