Experimental class template Module<T>

Allocates ps3 memory for specific instance T
This commit is contained in:
Nekotekina 2015-09-08 16:53:28 +03:00
parent 093ecc0a02
commit 12f36cf31f
123 changed files with 494 additions and 379 deletions

View File

@ -1,42 +1,32 @@
#pragma once
template<typename T>
struct BaseInterval
template<typename T1, typename T2> struct range_t
{
static const uint64_t zero = 0ull;
static const uint64_t notz = 0xffffffffffffffffull;
T1 _min; // first value
T2 _max; // second value
};
T m_min, m_max;
template<typename T1, typename T2> constexpr range_t<std::decay_t<T1>, std::decay_t<T2>> make_range(T1&& _min, T2&& _max)
{
return{ std::forward<T1>(_min), std::forward<T2>(_max) };
}
static BaseInterval<T> make(T min_value, T max_value)
{
BaseInterval<T> res = { min_value, max_value };
return res;
}
template<typename T1, typename T2, typename T> constexpr bool operator <(const range_t<T1, T2>& range, const T& value)
{
return range._min < value && range._max < value;
}
static BaseInterval<T> make()
{
return make((T&)zero, (T&)notz);
}
template<typename T1, typename T2, typename T> constexpr bool operator <(const T& value, const range_t<T1, T2>& range)
{
return value < range._min && value < range._max;
}
bool getconst(T& result)
{
if (m_min == m_max)
{
result = m_min;
return true;
}
else
{
return false;
}
}
template<typename T1, typename T2, typename T> constexpr bool operator ==(const range_t<T1, T2>& range, const T& value)
{
return !(value < range._min) && !(range._max < value);
}
bool isindef()
{
if (T == float)
{
}
}
};
template<typename T1, typename T2, typename T> constexpr bool operator ==(const T& value, const range_t<T1, T2>& range)
{
return !(value < range._min) && !(range._max < value);
}

View File

@ -2,116 +2,116 @@
#include "Modules.h"
#include "ModuleManager.h"
extern Module cellAdec;
extern Module cellAtrac;
extern Module cellAtracMulti;
extern Module cellAudio;
extern Module cellAvconfExt;
extern Module cellBGDL;
extern Module cellCamera;
extern Module cellCelp8Enc;
extern Module cellCelpEnc;
extern Module cellDaisy;
extern Module cellDmux;
extern Module cellFiber;
extern Module cellFont;
extern Module cellFontFT;
extern Module cellFs;
extern Module cellGame;
extern Module cellGameExec;
extern Module cellGcmSys;
extern Module cellGem;
extern Module cellGifDec;
extern Module cellHttp;
extern Module cellHttps;
extern Module cellHttpUtil;
extern Module cellImeJp;
extern Module cellJpgDec;
extern Module cellJpgEnc;
extern Module cellKey2char;
extern Module cellL10n;
extern Module cellMic;
extern Module cellMusic;
extern Module cellMusicDecode;
extern Module cellMusicExport;
extern Module cellNetCtl;
extern Module cellOskDialog;
extern Module cellOvis;
extern Module cellPamf;
extern Module cellPhotoDecode;
extern Module cellPhotoExport;
extern Module cellPhotoImportUtil;
extern Module cellPngDec;
extern Module cellPngEnc;
extern Module cellPrint;
extern Module cellRec;
extern Module cellRemotePlay;
extern Module cellResc;
extern Module cellRtc;
extern Module cellRudp;
extern Module cellSail;
extern Module cellSailRec;
extern Module cellSaveData;
extern Module cellMinisSaveData;
extern Module cellScreenshot;
extern Module cellSearch;
extern Module cellSheap;
extern Module cellSpudll;
extern Module cellSpurs;
extern Module cellSpursJq;
extern Module cellSsl;
extern Module cellSubdisplay;
extern Module cellSync;
extern Module cellSync2;
extern Module cellSysconf;
extern Module cellSysmodule;
extern Module cellSysutil;
extern Module cellSysutilAp;
extern Module cellSysutilAvc;
extern Module cellSysutilAvc2;
extern Module cellSysutilMisc;
extern Module cellUsbd;
extern Module cellUsbPspcm;
extern Module cellUserInfo;
extern Module cellVdec;
extern Module cellVideoExport;
extern Module cellVideoUpload;
extern Module cellVoice;
extern Module cellVpost;
extern Module libmixer;
extern Module libsnd3;
extern Module libsynth2;
extern Module sceNp;
extern Module sceNp2;
extern Module sceNpClans;
extern Module sceNpCommerce2;
extern Module sceNpSns;
extern Module sceNpTrophy;
extern Module sceNpTus;
extern Module sceNpUtil;
extern Module sys_io;
extern Module libnet;
extern Module sysPrxForUser;
extern Module sys_libc;
extern Module sys_lv2dbg;
extern Module<> cellAdec;
extern Module<> cellAtrac;
extern Module<> cellAtracMulti;
extern Module<> cellAudio;
extern Module<> cellAvconfExt;
extern Module<> cellBGDL;
extern Module<> cellCamera;
extern Module<> cellCelp8Enc;
extern Module<> cellCelpEnc;
extern Module<> cellDaisy;
extern Module<> cellDmux;
extern Module<> cellFiber;
extern Module<> cellFont;
extern Module<> cellFontFT;
extern Module<> cellFs;
extern Module<> cellGame;
extern Module<> cellGameExec;
extern Module<> cellGcmSys;
extern Module<> cellGem;
extern Module<> cellGifDec;
extern Module<> cellHttp;
extern Module<> cellHttps;
extern Module<> cellHttpUtil;
extern Module<> cellImeJp;
extern Module<> cellJpgDec;
extern Module<> cellJpgEnc;
extern Module<> cellKey2char;
extern Module<> cellL10n;
extern Module<> cellMic;
extern Module<> cellMusic;
extern Module<> cellMusicDecode;
extern Module<> cellMusicExport;
extern Module<> cellNetCtl;
extern Module<> cellOskDialog;
extern Module<> cellOvis;
extern Module<> cellPamf;
extern Module<> cellPhotoDecode;
extern Module<> cellPhotoExport;
extern Module<> cellPhotoImportUtil;
extern Module<> cellPngDec;
extern Module<> cellPngEnc;
extern Module<> cellPrint;
extern Module<> cellRec;
extern Module<> cellRemotePlay;
extern Module<> cellResc;
extern Module<> cellRtc;
extern Module<> cellRudp;
extern Module<> cellSail;
extern Module<> cellSailRec;
extern Module<> cellSaveData;
extern Module<> cellMinisSaveData;
extern Module<> cellScreenshot;
extern Module<> cellSearch;
extern Module<> cellSheap;
extern Module<> cellSpudll;
extern Module<> cellSpurs;
extern Module<> cellSpursJq;
extern Module<> cellSsl;
extern Module<> cellSubdisplay;
extern Module<> cellSync;
extern Module<struct Sync2Instance> cellSync2;
extern Module<> cellSysconf;
extern Module<> cellSysmodule;
extern Module<> cellSysutil;
extern Module<> cellSysutilAp;
extern Module<> cellSysutilAvc;
extern Module<> cellSysutilAvc2;
extern Module<> cellSysutilMisc;
extern Module<> cellUsbd;
extern Module<> cellUsbPspcm;
extern Module<> cellUserInfo;
extern Module<> cellVdec;
extern Module<> cellVideoExport;
extern Module<> cellVideoUpload;
extern Module<> cellVoice;
extern Module<> cellVpost;
extern Module<> libmixer;
extern Module<> libsnd3;
extern Module<> libsynth2;
extern Module<> sceNp;
extern Module<> sceNp2;
extern Module<> sceNpClans;
extern Module<> sceNpCommerce2;
extern Module<> sceNpSns;
extern Module<> sceNpTrophy;
extern Module<> sceNpTus;
extern Module<> sceNpUtil;
extern Module<> sys_io;
extern Module<> libnet;
extern Module<> sysPrxForUser;
extern Module<> sys_libc;
extern Module<> sys_lv2dbg;
struct ModuleInfo
{
const s32 id; // -1 if the module doesn't have corresponding CELL_SYSMODULE_* id
const char* const name;
Module* const module;
Module<>* const module;
explicit operator bool() const
{
return module != nullptr;
}
operator Module*() const
operator Module<>*() const
{
return module;
}
Module* operator ->() const
Module<>* operator ->() const
{
return module;
}
@ -243,7 +243,7 @@ void ModuleManager::Init()
clear_ppu_functions();
std::unordered_set<Module*> processed;
std::unordered_set<Module<>*> processed;
for (auto& module : g_module_list)
{
@ -272,7 +272,7 @@ void ModuleManager::Close()
return;
}
std::unordered_set<Module*> processed;
std::unordered_set<Module<>*> processed;
for (auto& module : g_module_list)
{
@ -285,7 +285,25 @@ void ModuleManager::Close()
m_init = false;
}
Module* ModuleManager::GetModuleByName(const char* name)
void ModuleManager::Alloc()
{
if (!m_init)
{
return;
}
std::unordered_set<Module<>*> processed;
for (auto& module : g_module_list)
{
if (module && module->on_alloc && processed.emplace(module).second)
{
module->on_alloc();
}
}
}
Module<>* ModuleManager::GetModuleByName(const char* name)
{
for (auto& module : g_module_list)
{
@ -298,7 +316,7 @@ Module* ModuleManager::GetModuleByName(const char* name)
return nullptr;
}
Module* ModuleManager::GetModuleById(u16 id)
Module<>* ModuleManager::GetModuleById(u16 id)
{
for (auto& module : g_module_list)
{

View File

@ -1,6 +1,6 @@
#pragma once
class Module;
template<typename T> class Module;
class ModuleManager
{
@ -12,8 +12,9 @@ public:
void Init();
void Close();
void Alloc();
static Module* GetModuleByName(const char* name);
static Module* GetModuleById(u16 id);
static Module<void>* GetModuleByName(const char* name);
static Module<void>* GetModuleById(u16 id);
static bool CheckModuleId(u16 id);
};

View File

@ -11,6 +11,7 @@
std::vector<ModuleFunc> g_ppu_func_list;
std::vector<StaticFunc> g_ppu_func_subs;
std::vector<ModuleVariable> g_ps3_var_list;
u32 add_ppu_func(ModuleFunc func)
{
@ -25,21 +26,52 @@ u32 add_ppu_func(ModuleFunc func)
if (f.id == func.id)
{
// if NIDs overlap or if the same function is added twice
throw EXCEPTION("NID already exists: 0x%08x (%s)", f.id, f.name);
throw EXCEPTION("FNID already exists: 0x%08x (%s)", f.id, f.name);
}
}
g_ppu_func_list.push_back(func);
g_ppu_func_list.emplace_back(std::move(func));
return (u32)g_ppu_func_list.size() - 1;
}
void add_variable(u32 nid, Module<>* module, const char* name, u32(*addr)())
{
if (g_ps3_var_list.empty())
{
g_ps3_var_list.reserve(0x4000); // as g_ppu_func_list
}
for (auto& v : g_ps3_var_list)
{
if (v.id == nid)
{
throw EXCEPTION("VNID already exists: 0x%08x (%s)", nid, name);
}
}
g_ps3_var_list.emplace_back(ModuleVariable{ nid, module, name, addr });
}
ModuleVariable* get_variable_by_nid(u32 nid)
{
for (auto& v : g_ps3_var_list)
{
if (v.id == nid)
{
return &v;
}
}
return nullptr;
}
u32 add_ppu_func_sub(StaticFunc func)
{
g_ppu_func_subs.emplace_back(func);
return func.index;
}
u32 add_ppu_func_sub(const std::initializer_list<SearchPatternEntry>& ops, const char* name, Module* module, ppu_func_caller func)
u32 add_ppu_func_sub(const std::initializer_list<SearchPatternEntry>& ops, const char* name, Module<>* module, ppu_func_caller func)
{
StaticFunc sf;
sf.index = add_ppu_func(ModuleFunc(get_function_id(name), 0, module, name, func));
@ -198,6 +230,7 @@ void clear_ppu_functions()
{
g_ppu_func_list.clear();
g_ppu_func_subs.clear();
g_ps3_var_list.clear();
}
u32 get_function_id(const char* name)
@ -497,18 +530,18 @@ bool patch_ppu_import(u32 addr, u32 index)
return false;
}
Module::Module(const char* name, void(*init)())
Module<>::Module(const char* name, void(*init)())
: m_is_loaded(false)
, m_name(name)
, m_init(init)
{
}
Module::~Module()
Module<>::~Module()
{
}
void Module::Init()
void Module<>::Init()
{
on_load = nullptr;
on_unload = nullptr;
@ -518,7 +551,7 @@ void Module::Init()
m_init();
}
void Module::Load()
void Module<>::Load()
{
if (IsLoaded())
{
@ -533,7 +566,7 @@ void Module::Load()
SetLoaded(true);
}
void Module::Unload()
void Module<>::Unload()
{
if (!IsLoaded())
{
@ -548,22 +581,22 @@ void Module::Unload()
SetLoaded(false);
}
void Module::SetLoaded(bool loaded)
void Module<>::SetLoaded(bool loaded)
{
m_is_loaded = loaded;
}
bool Module::IsLoaded() const
bool Module<>::IsLoaded() const
{
return m_is_loaded;
}
const std::string& Module::GetName() const
const std::string& Module<>::GetName() const
{
return m_name;
}
void Module::SetName(const std::string& name)
void Module<>::SetName(const std::string& name)
{
m_name = name;
}

View File

@ -7,7 +7,7 @@
namespace vm { using namespace ps3; }
class Module;
template<typename T = void> class Module;
// flags set in ModuleFunc
enum : u32
@ -30,7 +30,7 @@ struct ModuleFunc
{
u32 id;
u32 flags;
Module* module;
Module<>* module;
const char* name;
ppu_func_caller func;
vm::ptr<void()> lle_func;
@ -39,7 +39,7 @@ struct ModuleFunc
{
}
ModuleFunc(u32 id, u32 flags, Module* module, const char* name, ppu_func_caller func, vm::ptr<void()> lle_func = vm::null)
ModuleFunc(u32 id, u32 flags, Module<>* module, const char* name, ppu_func_caller func, vm::ptr<void()> lle_func = vm::null)
: id(id)
, flags(flags)
, module(module)
@ -50,6 +50,14 @@ struct ModuleFunc
}
};
struct ModuleVariable
{
u32 id;
Module<>* module;
const char* name;
u32(*retrieve_addr)();
};
enum : u32
{
SPET_MASKED_OPCODE,
@ -76,15 +84,19 @@ struct StaticFunc
std::unordered_map<u32, u32> labels;
};
class Module : public LogBase
template<> class Module<void> : public LogBase
{
friend class ModuleManager;
std::string m_name;
bool m_is_loaded;
void(*m_init)();
Module() = delete;
protected:
std::function<void()> on_alloc;
public:
Module() = delete;
Module(const char* name, void(*init)());
Module(Module& other) = delete;
@ -111,15 +123,42 @@ public:
void SetName(const std::string& name);
};
// Module<> with an instance of specified type in PS3 memory
template<typename T> class Module : public Module<void>
{
u32 m_addr;
public:
Module(const char* name, void(*init)())
: Module<void>(name, init)
{
on_alloc = [this]
{
static_assert(std::is_trivially_destructible<T>::value, "Module<> instance must be trivially destructible");
//static_assert(std::is_trivially_copy_assignable<T>::value, "Module<> instance must be trivially copy-assignable");
// Allocate module instance and call the default constructor
new(vm::get_ptr<T>(m_addr = vm::alloc(sizeof(T), vm::main)))T{};
};
}
T* operator ->() const
{
return vm::get_ptr<T>(m_addr);
}
};
u32 add_ppu_func(ModuleFunc func);
void add_variable(u32 nid, Module<>* module, const char* name, u32(*addr)());
ModuleFunc* get_ppu_func_by_nid(u32 nid, u32* out_index = nullptr);
ModuleFunc* get_ppu_func_by_index(u32 index);
ModuleVariable* get_variable_by_nid(u32 nid);
void execute_ppu_func_by_index(PPUThread& CPU, u32 id);
void clear_ppu_functions();
u32 get_function_id(const char* name);
u32 add_ppu_func_sub(StaticFunc sf);
u32 add_ppu_func_sub(const std::initializer_list<SearchPatternEntry>& ops, const char* name, Module* module, ppu_func_caller func);
u32 add_ppu_func_sub(const std::initializer_list<SearchPatternEntry>& ops, const char* name, Module<>* module, ppu_func_caller func);
void hook_ppu_funcs(vm::ptr<u32> base, u32 size);
@ -147,13 +186,17 @@ template<typename T, T Func, typename... Args, typename RT = std::result_of_t<T(
}
}
// call specified function directly if LLE is not available, call LLE equivalent in callback style otherwise
// Call specified function directly if LLE is not available, call LLE equivalent in callback style otherwise
#define CALL_FUNC(ppu, func, ...) call_ppu_func<decltype(&func), &func>(ppu, __VA_ARGS__)
#define REG_FNID(module, nid, func, ...) (ppu_func_by_func<decltype(&func), &func>::index = add_ppu_func(ModuleFunc(nid, { __VA_ARGS__ }, &module, #func, BIND_FUNC(func))))
#define REG_FUNC(module, func, ...) REG_FNID(module, get_function_id(#func), func, __VA_ARGS__)
#define REG_VNID(module, nid, var) add_variable(nid, &module, #var, []{ return vm::get_addr(&module->var); })
#define REG_VARIABLE(module, var) REG_VNID(module, get_function_id(#var), var)
#define REG_SUB(module, ns, name, ...) add_ppu_func_sub({ __VA_ARGS__ }, #name, &module, BIND_FUNC(ns::name))
#define SP_OP(type, op, sup) []() { s32 XXX = 0; SearchPatternEntry res = { (type), (op), 0, (sup) }; XXX = -1; res.mask = (op) ^ ~res.data; return res; }()

View File

@ -16,7 +16,7 @@ extern "C"
#include "cellPamf.h"
#include "cellAdec.h"
extern Module cellAdec;
extern Module<> cellAdec;
AudioDecoder::AudioDecoder(s32 type, u32 addr, u32 size, vm::ptr<CellAdecCbMsg> func, u32 arg)
: type(type)
@ -863,7 +863,7 @@ s32 cellAdecGetPcmItem(u32 handle, vm::pptr<CellAdecPcmItem> pcmItem)
return CELL_OK;
}
Module cellAdec("cellAdec", []()
Module<> cellAdec("cellAdec", []()
{
REG_FUNC(cellAdec, cellAdecQueryAttr);
REG_FUNC(cellAdec, cellAdecOpen);

View File

@ -194,7 +194,7 @@ s32 cellAtracGetInternalErrorInfo(vm::ptr<CellAtracHandle> pHandle, vm::ptr<s32>
return CELL_OK;
}
Module cellAtrac("cellAtrac", []()
Module<> cellAtrac("cellAtrac", []()
{
REG_FUNC(cellAtrac, cellAtracSetDataAndGetMemSize);

View File

@ -58,4 +58,4 @@ struct CellAtracExtRes
u8 priority[8];
};
extern Module cellAtrac;
extern Module<> cellAtrac;

View File

@ -202,7 +202,7 @@ s32 cellAtracMultiGetInternalErrorInfo(vm::ptr<CellAtracMultiHandle> pHandle, vm
return CELL_OK;
}
Module cellAtracMulti("cellAtrac", []()
Module<> cellAtracMulti("cellAtrac", []()
{
REG_FUNC(cellAtracMulti, cellAtracMultiSetDataAndGetMemSize);

View File

@ -59,4 +59,4 @@ struct CellAtracMultiExtRes
u8 priority[8];
};
extern Module cellAtracMulti;
extern Module<> cellAtracMulti;

View File

@ -14,7 +14,7 @@
#include "cellAudio.h"
extern Module cellAudio;
extern Module<> cellAudio;
extern u64 get_system_time();
@ -1001,7 +1001,7 @@ s32 cellAudioUnsetPersonalDevice(s32 iPersonalStream)
return CELL_OK;
}
Module cellAudio("cellAudio", []()
Module<> cellAudio("cellAudio", []()
{
g_audio.state.store(AUDIO_STATE_NOT_INITIALIZED);
g_audio.buffer = 0;

View File

@ -4,7 +4,7 @@
#include "cellAudioOut.h"
extern Module cellSysutil;
extern Module<> cellSysutil;
s32 cellAudioOutGetSoundAvailability(u32 audioOut, u32 type, u32 fs, u32 option)
{

View File

@ -7,7 +7,7 @@
#include "cellAudioOut.h"
#include "cellVideoOut.h"
extern Module cellAvconfExt;
extern Module<> cellAvconfExt;
f32 g_gamma;
@ -137,7 +137,7 @@ s32 cellVideoOutGetScreenSize(u32 videoOut, vm::ptr<float> screenSize)
}
Module cellAvconfExt("cellAvconfExt", []()
Module<> cellAvconfExt("cellAvconfExt", []()
{
g_gamma = 1.0f;

View File

@ -3,7 +3,7 @@
#include "Emu/System.h"
#include "Emu/SysCalls/Modules.h"
extern Module cellBGDL;
extern Module<> cellBGDL;
// Return Codes
enum
@ -40,7 +40,7 @@ s32 cellBGDLGetMode()
return CELL_OK;
}
Module cellBGDL("cellBGDL", []()
Module<> cellBGDL("cellBGDL", []()
{
REG_FUNC(cellBGDL, cellBGDLGetInfo);
REG_FUNC(cellBGDL, cellBGDLGetInfo2);

View File

@ -7,7 +7,7 @@
#include "cellCamera.h"
extern Module cellCamera;
extern Module<> cellCamera;
static const char* get_camera_attr_name(s32 value)
{
@ -371,7 +371,7 @@ s32 cellCameraRemoveNotifyEventQueue2(u64 key)
return CELL_OK;
}
Module cellCamera("cellCamera", []()
Module<> cellCamera("cellCamera", []()
{
REG_FUNC(cellCamera, cellCameraInit);
REG_FUNC(cellCamera, cellCameraEnd);

View File

@ -3,7 +3,7 @@
#include "Emu/System.h"
#include "Emu/SysCalls/Modules.h"
extern Module cellCelp8Enc;
extern Module<> cellCelp8Enc;
// Return Codes
enum
@ -70,7 +70,7 @@ s32 cellCelp8EncGetAu()
return CELL_OK;
}
Module cellCelp8Enc("cellCelp8Enc", []()
Module<> cellCelp8Enc("cellCelp8Enc", []()
{
REG_FUNC(cellCelp8Enc, cellCelp8EncQueryAttr);
REG_FUNC(cellCelp8Enc, cellCelp8EncOpen);

View File

@ -3,7 +3,7 @@
#include "Emu/System.h"
#include "Emu/SysCalls/Modules.h"
extern Module cellCelpEnc;
extern Module<> cellCelpEnc;
// Return Codes
enum
@ -70,7 +70,7 @@ s32 cellCelpEncGetAu()
return CELL_OK;
}
Module cellCelpEnc("cellCelpEnc", []()
Module<> cellCelpEnc("cellCelpEnc", []()
{
REG_FUNC(cellCelpEnc, cellCelpEncQueryAttr);
REG_FUNC(cellCelpEnc, cellCelpEncOpen);

View File

@ -2,7 +2,7 @@
#include "Emu/Memory/Memory.h"
#include "Emu/SysCalls/Modules.h"
extern Module cellDaisy;
extern Module<> cellDaisy;
s32 _ZN4cell5Daisy17LFQueue2PushCloseEPNS0_8LFQueue2EPFiPvjE()
{
@ -265,7 +265,7 @@ s32 _QN4cell5Daisy22ScatterGatherInterlock7releaseEv()
}
Module cellDaisy("cellDaisy", []()
Module<> cellDaisy("cellDaisy", []()
{
REG_FUNC(cellDaisy, _ZN4cell5Daisy17LFQueue2PushCloseEPNS0_8LFQueue2EPFiPvjE);
REG_FUNC(cellDaisy, _ZN4cell5Daisy21LFQueue2GetPopPointerEPNS0_8LFQueue2EPij);

View File

@ -7,7 +7,7 @@
#include "cellPamf.h"
#include "cellDmux.h"
extern Module cellDmux;
extern Module<> cellDmux;
PesHeader::PesHeader(DemuxerStream& stream)
: pts(CODEC_TS_INVALID)
@ -1178,7 +1178,7 @@ s32 cellDmuxFlushEs(u32 esHandle)
return CELL_OK;
}
Module cellDmux("cellDmux", []()
Module<> cellDmux("cellDmux", []()
{
REG_FUNC(cellDmux, cellDmuxQueryAttr);
REG_FUNC(cellDmux, cellDmuxQueryAttr2);

View File

@ -5,7 +5,7 @@
#include "cellFiber.h"
extern Module cellFiber;
extern Module<> cellFiber;
s32 _cellFiberPpuInitialize()
{
@ -291,7 +291,7 @@ s32 cellFiberPpuUtilWorkerControlInitializeWithAttribute()
return CELL_OK;
}
Module cellFiber("cellFiber", []()
Module<> cellFiber("cellFiber", []()
{
REG_FUNC(cellFiber, _cellFiberPpuInitialize, MFF_NO_RETURN);

View File

@ -6,7 +6,7 @@
#include "Emu/FS/vfsFile.h"
#include "cellFont.h"
extern Module cellFont;
extern Module<> cellFont;
// Functions
s32 cellFontInitializeWithRevision(u64 revisionFlags, vm::ptr<CellFontConfig> config)
@ -741,7 +741,7 @@ s32 cellFontGraphicsGetLineRGBA()
}
Module cellFont("cellFont", []()
Module<> cellFont("cellFont", []()
{
REG_FUNC(cellFont, cellFontSetFontsetOpenMode);
REG_FUNC(cellFont, cellFontSetFontOpenMode);

View File

@ -4,7 +4,7 @@
#include "cellFontFT.h"
extern Module cellFontFT;
extern Module<> cellFontFT;
s32 cellFontInitLibraryFreeTypeWithRevision(u64 revisionFlags, vm::ptr<CellFontLibraryConfigFT> config, vm::pptr<CellFontLibrary> lib)
{
@ -27,7 +27,7 @@ s32 cellFontFTGetInitializedRevisionFlags()
return CELL_OK;
}
Module cellFontFT("cellFontFT", []()
Module<> cellFontFT("cellFontFT", []()
{
REG_FUNC(cellFontFT, cellFontInitLibraryFreeTypeWithRevision);
REG_FUNC(cellFontFT, cellFontFTGetRevisionFlags);

View File

@ -12,7 +12,7 @@
#include "Emu/SysCalls/lv2/sys_fs.h"
#include "cellFs.h"
extern Module cellFs;
extern Module<> cellFs;
s32 cellFsOpen(vm::cptr<char> path, s32 flags, vm::ptr<u32> fd, vm::cptr<void> arg, u64 size)
{
@ -1051,7 +1051,7 @@ s32 cellFsUnregisterL10nCallbacks()
}
Module cellFs("cellFs", []()
Module<> cellFs("cellFs", []()
{
g_fs_aio_id = 1;

View File

@ -11,7 +11,7 @@
#include "cellSysutil.h"
#include "cellGame.h"
extern Module cellGame;
extern Module<> cellGame;
// Specified as second content_permission_t constructor argument to inform temporary directory
static struct temporary_content_dir_tag_t{} const temporary_content_dir_tag{};
@ -706,7 +706,7 @@ s32 cellGameUnregisterDiscChangeCallback()
void cellSysutil_GameData_init()
{
extern Module cellSysutil;
extern Module<> cellSysutil;
REG_FUNC(cellSysutil, cellHddGameCheck);
REG_FUNC(cellSysutil, cellHddGameCheck2);
@ -728,7 +728,7 @@ void cellSysutil_GameData_init()
REG_FUNC(cellSysutil, cellGameUnregisterDiscChangeCallback);
}
Module cellGame("cellGame", []()
Module<> cellGame("cellGame", []()
{
REG_FUNC(cellGame, cellGameBootCheck);
REG_FUNC(cellGame, cellGamePatchCheck);

View File

@ -4,7 +4,7 @@
#include "cellGame.h"
extern Module cellGameExec;
extern Module<> cellGameExec;
s32 cellGameSetExitParam()
{
@ -45,7 +45,7 @@ s32 cellGameGetBootGameInfo(vm::ptr<u32> type, vm::ptr<char> dirName, vm::ptr<u3
return CELL_OK;
}
Module cellGameExec("cellGameExec", []()
Module<> cellGameExec("cellGameExec", []()
{
REG_FUNC(cellGameExec, cellGameSetExitParam);
REG_FUNC(cellGameExec, cellGameGetHomeDataExportPath);

View File

@ -11,7 +11,7 @@
//#include "Emu/SysCalls/lv2/sys_process.h"
#include "cellGcmSys.h"
extern Module cellGcmSys;
extern Module<> cellGcmSys;
const u32 tiled_pitches[] = {
0x00000000, 0x00000200, 0x00000300, 0x00000400,
@ -1297,7 +1297,7 @@ s32 cellGcmCallback(vm::ptr<CellGcmContextData> context, u32 count)
//----------------------------------------------------------------------------
Module cellGcmSys("cellGcmSys", []()
Module<> cellGcmSys("cellGcmSys", []()
{
current_config.ioAddress = 0;
current_config.localAddress = 0;

View File

@ -5,7 +5,7 @@
#include "cellGem.h"
extern Module cellGem;
extern Module<> cellGem;
struct gem_t
{
@ -273,7 +273,7 @@ s32 cellGemWriteExternalPort()
return CELL_OK;
}
Module cellGem("cellGem", []()
Module<> cellGem("cellGem", []()
{
REG_FUNC(cellGem, cellGemCalibrate);
REG_FUNC(cellGem, cellGemClearStatusFlags);

View File

@ -16,7 +16,7 @@ extern "C"
#include "cellGifDec.h"
extern Module cellGifDec;
extern Module<> cellGifDec;
// cellGifDec aliases (only for cellGifDec.cpp)
using PPMainHandle = vm::pptr<GifDecoder>;
@ -303,7 +303,7 @@ s32 cellGifDecDestroy(PMainHandle mainHandle)
return CELL_OK;
}
Module cellGifDec("cellGifDec", []()
Module<> cellGifDec("cellGifDec", []()
{
REG_FUNC(cellGifDec, cellGifDecCreate);
REG_FUNC(cellGifDec, cellGifDecExtCreate);

View File

@ -2,8 +2,8 @@
#include "Emu/Memory/Memory.h"
#include "Emu/SysCalls/Modules.h"
extern Module cellHttp;
extern Module cellHttps;
extern Module<> cellHttp;
extern Module<> cellHttps;
s32 cellHttpInit()
{
@ -599,7 +599,7 @@ s32 cellHttpClientSetSslIdDestroyCallback()
return CELL_OK;
}
Module cellHttp("cellHttp", []()
Module<> cellHttp("cellHttp", []()
{
REG_FUNC(cellHttp, cellHttpInit);
REG_FUNC(cellHttp, cellHttpEnd);
@ -713,7 +713,7 @@ Module cellHttp("cellHttp", []()
REG_FUNC(cellHttp, cellHttpClientSetSslIdDestroyCallback);
});
Module cellHttps("cellHttps", []()
Module<> cellHttps("cellHttps", []()
{
// cellHttps doesn't have functions (cellHttpsInit belongs to cellHttp, for example)
});

View File

@ -2,7 +2,7 @@
#include "Emu/Memory/Memory.h"
#include "Emu/SysCalls/Modules.h"
extern Module cellHttpUtil;
extern Module<> cellHttpUtil;
s32 cellHttpUtilParseUri()
{
@ -124,7 +124,7 @@ s32 cellHttpUtilBase64Decoder()
return CELL_OK;
}
Module cellHttpUtil("cellHttpUtil", []()
Module<> cellHttpUtil("cellHttpUtil", []()
{
REG_FUNC(cellHttpUtil, cellHttpUtilParseUri);
REG_FUNC(cellHttpUtil, cellHttpUtilParseUriPath);

View File

@ -2,7 +2,7 @@
#include "Emu/Memory/Memory.h"
#include "Emu/SysCalls/Modules.h"
extern Module cellImeJp;
extern Module<> cellImeJp;
// Return Codes
enum
@ -262,7 +262,7 @@ s32 cellImeJpConfirmPrediction()
return CELL_OK;
}
Module cellImeJp("cellImeJp", []()
Module<> cellImeJp("cellImeJp", []()
{
REG_FUNC(cellImeJp, cellImeJpOpen);
REG_FUNC(cellImeJp, cellImeJpOpen2);

View File

@ -15,7 +15,7 @@ extern "C"
#include "cellJpgDec.h"
extern Module cellJpgDec;
extern Module<> cellJpgDec;
s32 cellJpgDecCreate(u32 mainHandle, u32 threadInParam, u32 threadOutParam)
{
@ -359,7 +359,7 @@ s32 cellJpgDecExtSetParameter()
}
Module cellJpgDec("cellJpgDec", []()
Module<> cellJpgDec("cellJpgDec", []()
{
REG_FUNC(cellJpgDec, cellJpgDecCreate);
REG_FUNC(cellJpgDec, cellJpgDecExtCreate);

View File

@ -2,7 +2,7 @@
#include "Emu/Memory/Memory.h"
#include "Emu/SysCalls/Modules.h"
extern Module cellJpgEnc;
extern Module<> cellJpgEnc;
// Error Codes
enum
@ -75,7 +75,7 @@ s32 cellJpgEncReset()
return CELL_OK;
}
Module cellJpgEnc("cellJpgEnc", []()
Module<> cellJpgEnc("cellJpgEnc", []()
{
REG_FUNC(cellJpgEnc, cellJpgEncQueryAttr);
REG_FUNC(cellJpgEnc, cellJpgEncOpen);

View File

@ -6,7 +6,7 @@
#include "Emu/Io/Keyboard.h"
#include "cellKb.h"
extern Module sys_io;
extern Module<> sys_io;
s32 cellKbInit(u32 max_connect)
{

View File

@ -2,7 +2,7 @@
#include "Emu/Memory/Memory.h"
#include "Emu/SysCalls/Modules.h"
extern Module cellKey2char;
extern Module<> cellKey2char;
// Return Codes
enum
@ -46,7 +46,7 @@ s32 cellKey2CharSetArrangement()
return CELL_OK;
}
Module cellKey2char("cellKey2char", []()
Module<> cellKey2char("cellKey2char", []()
{
REG_FUNC(cellKey2char, cellKey2CharOpen);
REG_FUNC(cellKey2char, cellKey2CharClose);

View File

@ -10,7 +10,7 @@
#include "cellL10n.h"
extern Module cellL10n;
extern Module<> cellL10n;
// Translate code id to code name. some codepage may has another name.
// If this makes your compilation fail, try replace the string code with one in "iconv -l"
@ -1163,7 +1163,8 @@ s32 UTF8stoUCS2s()
throw EXCEPTION("");
}
Module cellL10n("cellL10n", []()
Module<> cellL10n("cellL10n", []()
{
REG_FUNC(cellL10n, UCS2toEUCJP);
REG_FUNC(cellL10n, l10n_convert);

View File

@ -5,7 +5,7 @@
#include "cellMic.h"
extern Module cellMic;
extern Module<> cellMic;
s32 cellMicInit()
{
@ -260,7 +260,7 @@ s32 cellMicGetDeviceIdentifier()
return CELL_OK;
}
Module cellMic("cellMic", []()
Module<> cellMic("cellMic", []()
{
REG_FUNC(cellMic, cellMicInit);
REG_FUNC(cellMic, cellMicEnd);

View File

@ -6,7 +6,7 @@
#include "Emu/Io/Mouse.h"
#include "cellMouse.h"
extern Module sys_io;
extern Module<> sys_io;
s32 cellMouseInit(u32 max_connect)
{

View File

@ -7,7 +7,7 @@
#include "cellSysutil.h"
#include "cellMsgDialog.h"
extern Module cellSysutil;
extern Module<> cellSysutil;
extern u64 get_system_time();

View File

@ -7,7 +7,7 @@
#include "cellMusic.h"
extern Module cellMusic;
extern Module<> cellMusic;
struct music2_t
{
@ -149,7 +149,7 @@ s32 cellMusicGetVolume2()
}
Module cellMusic("cellMusic", []()
Module<> cellMusic("cellMusic", []()
{
REG_FUNC(cellMusic, cellMusicGetSelectionContext);
REG_FUNC(cellMusic, cellMusicSetSelectionContext2);

View File

@ -2,7 +2,7 @@
#include "Emu/Memory/Memory.h"
#include "Emu/SysCalls/Modules.h"
extern Module cellMusicDecode;
extern Module<> cellMusicDecode;
// Return Codes
enum
@ -145,7 +145,7 @@ s32 cellMusicDecodeGetContentsId2()
}
Module cellMusicDecode("cellMusicDecode", []()
Module<> cellMusicDecode("cellMusicDecode", []()
{
REG_FUNC(cellMusicDecode, cellMusicDecodeInitialize);
REG_FUNC(cellMusicDecode, cellMusicDecodeInitializeSystemWorkload);

View File

@ -2,7 +2,7 @@
#include "Emu/Memory/Memory.h"
#include "Emu/SysCalls/Modules.h"
extern Module cellMusicExport;
extern Module<> cellMusicExport;
// Return Codes
enum
@ -51,7 +51,7 @@ s32 cellMusicExportProgress()
return CELL_OK;
}
Module cellMusicExport("cellMusicExport", []()
Module<> cellMusicExport("cellMusicExport", []()
{
REG_FUNC(cellMusicExport, cellMusicExportInitialize);
REG_FUNC(cellMusicExport, cellMusicExportInitialize2);

View File

@ -28,7 +28,7 @@
#include <fcntl.h>
#endif
extern Module cellNetCtl;
extern Module<> cellNetCtl;
s32 cellNetCtlInit()
{
@ -423,7 +423,7 @@ s32 cellGameUpdateCheckStartWithoutDialogAsyncEx()
}
Module cellNetCtl("cellNetCtl", []()
Module<> cellNetCtl("cellNetCtl", []()
{
REG_FUNC(cellNetCtl, cellNetCtlInit);
REG_FUNC(cellNetCtl, cellNetCtlTerm);

View File

@ -2,7 +2,7 @@
#include "Emu/Memory/Memory.h"
#include "Emu/SysCalls/Modules.h"
extern Module cellOskDialog;
extern Module<> cellOskDialog;
s32 cellOskDialogLoadAsync()
{
@ -153,7 +153,7 @@ s32 cellOskDialogExtRegisterForceFinishCallback()
void cellSysutil_OskDialog_init()
{
extern Module cellSysutil;
extern Module<> cellSysutil;
// cellOskDialog functions:
REG_FUNC(cellSysutil, cellOskDialogLoadAsync);
@ -171,7 +171,7 @@ void cellSysutil_OskDialog_init()
REG_FUNC(cellSysutil, cellOskDialogGetInputText);
}
Module cellOskDialog("cellOskDialog", []()
Module<> cellOskDialog("cellOskDialog", []()
{
// cellOskDialogExt functions:
REG_FUNC(cellOskDialog, cellOskDialogExtInputDeviceUnlock);

View File

@ -4,7 +4,7 @@
namespace vm { using namespace ps3; }
extern Module cellOvis;
extern Module<> cellOvis;
// Return Codes
enum
@ -38,7 +38,7 @@ s32 cellOvisInvalidateOverlappedSegments()
return CELL_OK;
}
Module cellOvis("cellOvis", []()
Module<> cellOvis("cellOvis", []()
{
REG_FUNC(cellOvis, cellOvisGetOverlayTableSize);
REG_FUNC(cellOvis, cellOvisInitializeOverlayTable);

View File

@ -6,7 +6,7 @@
#include "Emu/Io/Pad.h"
#include "cellPad.h"
extern Module sys_io;
extern Module<> sys_io;
s32 cellPadInit(u32 max_connect)
{

View File

@ -5,7 +5,7 @@
#include "cellPamf.h"
extern Module cellPamf;
extern Module<> cellPamf;
s32 pamfStreamTypeToEsFilterId(u8 type, u8 ch, CellCodecEsFilterId& pEsFilterId)
{
@ -733,7 +733,7 @@ s32 cellPamfEpIteratorMove(vm::ptr<CellPamfEpIterator> pIt, s32 steps, vm::ptr<C
return 0;
}
Module cellPamf("cellPamf", []()
Module<> cellPamf("cellPamf", []()
{
REG_FUNC(cellPamf, cellPamfGetHeaderSize);
REG_FUNC(cellPamf, cellPamfGetHeaderSize2);

View File

@ -2,7 +2,7 @@
#include "Emu/Memory/Memory.h"
#include "Emu/SysCalls/Modules.h"
extern Module cellPhotoDecode;
extern Module<> cellPhotoDecode;
// Return Codes
enum
@ -56,7 +56,7 @@ s32 cellPhotoDecodeFromFile()
return CELL_OK;
}
Module cellPhotoDecode("cellPhotoDecode", []()
Module<> cellPhotoDecode("cellPhotoDecode", []()
{
REG_FUNC(cellPhotoDecode, cellPhotoDecodeInitialize);
REG_FUNC(cellPhotoDecode, cellPhotoDecodeInitialize2);

View File

@ -2,7 +2,7 @@
#include "Emu/Memory/Memory.h"
#include "Emu/SysCalls/Modules.h"
extern Module cellPhotoExport;
extern Module<> cellPhotoExport;
// Return Codes
enum
@ -75,7 +75,7 @@ s32 cellPhotoExportProgress()
return CELL_OK;
}
Module cellPhotoExport("cellPhotoExport", []()
Module<> cellPhotoExport("cellPhotoExport", []()
{
REG_FUNC(cellPhotoExport, cellPhotoInitialize);
REG_FUNC(cellPhotoExport, cellPhotoFinalize);

View File

@ -2,7 +2,7 @@
#include "Emu/Memory/Memory.h"
#include "Emu/SysCalls/Modules.h"
extern Module cellPhotoImportUtil;
extern Module<> cellPhotoImportUtil;
// Return Codes
enum
@ -53,7 +53,7 @@ s32 cellPhotoImport2()
return CELL_OK;
}
Module cellPhotoImportUtil("cellPhotoImport", []()
Module<> cellPhotoImportUtil("cellPhotoImport", []()
{
REG_FUNC(cellPhotoImportUtil, cellPhotoImport);
REG_FUNC(cellPhotoImportUtil, cellPhotoImport2);

View File

@ -15,7 +15,7 @@ extern "C"
#include "cellPngDec.h"
extern Module cellPngDec;
extern Module<> cellPngDec;
// cellPngDec aliases (only for cellPngDec.cpp)
using PPMainHandle = vm::pptr<PngDecoder>;
@ -571,7 +571,7 @@ s32 cellPngDecGetTextChunk(PMainHandle mainHandle, PSubHandle subHandle, vm::ptr
return CELL_OK;
}
Module cellPngDec("cellPngDec", []()
Module<> cellPngDec("cellPngDec", []()
{
REG_FUNC(cellPngDec, cellPngDecGetUnknownChunks);
REG_FUNC(cellPngDec, cellPngDecClose);

View File

@ -2,7 +2,7 @@
#include "Emu/Memory/Memory.h"
#include "Emu/SysCalls/Modules.h"
extern Module cellPngEnc;
extern Module<> cellPngEnc;
// Error Codes
enum
@ -69,7 +69,7 @@ s32 cellPngEncReset()
return CELL_OK;
}
Module cellPngEnc("cellPngEnc", []()
Module<> cellPngEnc("cellPngEnc", []()
{
REG_FUNC(cellPngEnc, cellPngEncQueryAttr);
REG_FUNC(cellPngEnc, cellPngEncOpen);

View File

@ -2,7 +2,7 @@
#include "Emu/Memory/Memory.h"
#include "Emu/SysCalls/Modules.h"
extern Module cellPrint;
extern Module<> cellPrint;
// Error Codes
enum
@ -101,7 +101,7 @@ s32 cellPrintSendBand()
return CELL_OK;
}
Module cellPrint("cellPrint", []()
Module<> cellPrint("cellPrint", []()
{
REG_FUNC(cellPrint, cellSysutilPrintInit);
REG_FUNC(cellPrint, cellSysutilPrintShutdown);

View File

@ -2,7 +2,7 @@
#include "Emu/Memory/Memory.h"
#include "Emu/SysCalls/Modules.h"
extern Module cellRec;
extern Module<> cellRec;
s32 cellRecOpen()
{
@ -40,7 +40,7 @@ s32 cellRecSetInfo()
}
Module cellRec("cellRec", []()
Module<> cellRec("cellRec", []()
{
REG_FUNC(cellRec, cellRecOpen);
REG_FUNC(cellRec, cellRecClose);

View File

@ -2,7 +2,7 @@
#include "Emu/Memory/Memory.h"
#include "Emu/SysCalls/Modules.h"
extern Module cellRemotePlay;
extern Module<> cellRemotePlay;
s32 cellRemotePlayGetStatus()
{
@ -45,7 +45,7 @@ s32 cellRemotePlayBreak()
}
Module cellRemotePlay("cellRemotePlay", []()
Module<> cellRemotePlay("cellRemotePlay", []()
{
REG_FUNC(cellRemotePlay, cellRemotePlayGetStatus);
REG_FUNC(cellRemotePlay, cellRemotePlaySetComparativeVolume);

View File

@ -9,7 +9,7 @@
#include "Emu/RSX/GSRender.h"
#include "cellResc.h"
extern Module cellResc;
extern Module<> cellResc;
extern s32 cellVideoOutConfigure(u32 videoOut, vm::ptr<CellVideoOutConfiguration> config, vm::ptr<CellVideoOutOption> option, u32 waitForEvent);
extern s32 cellGcmSetFlipMode(u32 mode);
@ -564,7 +564,7 @@ void SetupSurfaces(vm::ptr<CellGcmContextData>& cntxt)
r.m_surface_clip_y = 0;
}
// Module Functions
// Module<> Functions
s32 cellRescInit(vm::ptr<CellRescInitConfig> initConfig)
{
cellResc.Warning("cellRescInit(initConfig=*0x%x)", initConfig);
@ -1247,7 +1247,7 @@ s32 cellRescCreateInterlaceTable(u32 ea_addr, float srcH, CellRescTableElement d
}
Module cellResc("cellResc", []()
Module<> cellResc("cellResc", []()
{
s_rescInternalInstance = new CCellRescInternal();

View File

@ -5,7 +5,7 @@
#include "Utilities/rTime.h"
#include "cellRtc.h"
extern Module cellRtc;
extern Module<> cellRtc;
s64 convertToUNIXTime(u16 seconds, u16 minutes, u16 hours, u16 days, s32 years)
{
@ -445,7 +445,7 @@ s32 cellRtcCompareTick(vm::ptr<CellRtcTick> pTick0, vm::ptr<CellRtcTick> pTick1)
else return CELL_OK;
}
Module cellRtc("cellRtc", []()
Module<> cellRtc("cellRtc", []()
{
REG_FUNC(cellRtc, cellRtcGetCurrentTick);
REG_FUNC(cellRtc, cellRtcGetCurrentClock);

View File

@ -6,7 +6,7 @@
#include "cellRudp.h"
extern Module cellRudp;
extern Module<> cellRudp;
struct rudp_t
{
@ -239,7 +239,7 @@ s32 cellRudpProcessEvents()
return CELL_OK;
}
Module cellRudp("cellRudp", []()
Module<> cellRudp("cellRudp", []()
{
REG_FUNC(cellRudp, cellRudpInit);
REG_FUNC(cellRudp, cellRudpEnd);

View File

@ -8,7 +8,7 @@
#include "cellSail.h"
#include "cellPamf.h"
extern Module cellSail;
extern Module<> cellSail;
void playerBoot(vm::ptr<CellSailPlayer> pSelf, u64 userParam)
{
@ -1042,7 +1042,7 @@ s32 cellSailPlayerUnregisterSource()
return CELL_OK;
}
Module cellSail("cellSail", []()
Module<> cellSail("cellSail", []()
{
REG_FUNC(cellSail, cellSailMemAllocatorInitialize);

View File

@ -2,7 +2,7 @@
#include "Emu/Memory/Memory.h"
#include "Emu/SysCalls/Modules.h"
extern Module cellSailRec;
extern Module<> cellSailRec;
// Error Codes
enum
@ -255,7 +255,7 @@ s32 cellSailRecorderDumpImage()
return CELL_OK;
}
Module cellSailRec("cellSailRec", []()
Module<> cellSailRec("cellSailRec", []()
{
REG_FUNC(cellSailRec, cellSailProfileSetEsAudioParameter);
REG_FUNC(cellSailRec, cellSailProfileSetEsVideoParameter);

View File

@ -10,7 +10,9 @@
#include "Loader/PSF.h"
#include "cellSaveData.h"
extern Module cellSysutil;
extern Module<> cellSysutil;
extern Module<> cellSaveData;
extern Module<> cellMinisSaveData;
std::unique_ptr<SaveDataDialogInstance> g_savedata_dialog;
@ -958,7 +960,7 @@ void cellSysutil_SaveData_init()
REG_FUNC(cellSysutil, cellSaveDataAutoSave);
}
Module cellSaveData("cellSaveData", []()
Module<> cellSaveData("cellSaveData", []()
{
// libsysutil_savedata functions:
REG_FUNC(cellSaveData, cellSaveDataUserGetListItem);
@ -975,7 +977,7 @@ Module cellSaveData("cellSaveData", []()
REG_FUNC(cellSaveData, cellSaveDataListImport);
});
Module cellMinisSaveData("cellMinisSaveData", []()
Module<> cellMinisSaveData("cellMinisSaveData", []()
{
// libsysutil_savedata_psp functions:
//REG_FUNC(cellMinisSaveData, cellMinisSaveDataDelete); // 0x6eb168b3

View File

@ -298,5 +298,3 @@ struct SaveDataDialogInstance
virtual s32 ShowSaveDataList(std::vector<SaveDataEntry>& save_entries, s32 focused, vm::ptr<CellSaveDataListSet> listSet) = 0;
};
extern class Module cellSaveData;

View File

@ -4,7 +4,7 @@
#include "Emu/SysCalls/Modules.h"
#include "cellScreenshot.h"
extern Module cellScreenshot;
extern Module<> cellScreenshot;
s32 cellScreenShotSetParameter() //const CellScreenShotSetParam *param
{
@ -30,7 +30,7 @@ s32 cellScreenShotDisable()
return CELL_OK;
}
Module cellScreenshot("cellScreenshot", []()
Module<> cellScreenshot("cellScreenshot", []()
{
REG_FUNC(cellScreenshot, cellScreenShotSetParameter);
REG_FUNC(cellScreenshot, cellScreenShotSetOverlayImage);

View File

@ -4,7 +4,7 @@
#include "Emu/SysCalls/Modules.h"
#include "cellSearch.h"
extern Module cellSearch;
extern Module<> cellSearch;
s32 cellSearchInitialize(CellSearchMode mode, u32 container, vm::ptr<CellSearchSystemCallback> func, vm::ptr<u32> userData)
{
@ -130,7 +130,7 @@ s32 cellSearchEnd()
return CELL_OK;
}
Module cellSearch("cellSearch", []()
Module<> cellSearch("cellSearch", []()
{
REG_FUNC(cellSearch, cellSearchInitialize);
REG_FUNC(cellSearch, cellSearchFinalize);

View File

@ -2,7 +2,7 @@
#include "Emu/Memory/Memory.h"
#include "Emu/SysCalls/Modules.h"
extern Module cellSheap;
extern Module<> cellSheap;
// Return Codes
enum
@ -121,7 +121,7 @@ s32 cellKeySheapQueueDelete()
return CELL_OK;
}
Module cellSheap("cellSheap", []()
Module<> cellSheap("cellSheap", []()
{
REG_FUNC(cellSheap, cellSheapInitialize);
REG_FUNC(cellSheap, cellSheapAllocate);

View File

@ -2,7 +2,7 @@
#include "Emu/Memory/Memory.h"
#include "Emu/SysCalls/Modules.h"
extern Module cellSpudll;
extern Module<> cellSpudll;
s32 cellSpudllGetImageSize(vm::ptr<u32> psize, vm::cptr<void> so_elf, vm::cptr<struct CellSpudllHandleConfig> config)
{
@ -14,7 +14,7 @@ s32 cellSpudllHandleConfigSetDefaultValues(vm::ptr<struct CellSpudllHandleConfig
throw EXCEPTION("");
}
Module cellSpudll("cellSpudll", []()
Module<> cellSpudll("cellSpudll", []()
{
REG_FUNC(cellSpudll, cellSpudllGetImageSize);
REG_FUNC(cellSpudll, cellSpudllHandleConfigSetDefaultValues);

View File

@ -22,7 +22,7 @@
// Externs
//----------------------------------------------------------------------------
extern Module cellSpurs;
extern Module<> cellSpurs;
//----------------------------------------------------------------------------
// Function prototypes
@ -4205,7 +4205,7 @@ s32 cellSpursSemaphoreGetTasksetAddress()
return CELL_OK;
}
Module cellSpurs("cellSpurs", []()
Module<> cellSpurs("cellSpurs", []()
{
// Core
REG_FUNC(cellSpurs, cellSpursInitialize);

View File

@ -10,7 +10,7 @@
#include "cellSpurs.h"
#include "cellSpursJq.h"
extern Module cellSpursJq;
extern Module<> cellSpursJq;
s32 cellSpursJobQueueAttributeInitialize()
{
@ -390,7 +390,7 @@ s32 cellSpursJobQueueUnsetExceptionEventHandler()
return CELL_OK;
}
Module cellSpursJq("cellSpursJq", []()
Module<> cellSpursJq("cellSpursJq", []()
{
REG_FUNC(cellSpursJq, cellSpursJobQueueAttributeInitialize);
REG_FUNC(cellSpursJq, cellSpursJobQueueAttributeSetMaxGrab);

View File

@ -15,7 +15,7 @@
// Externs
//----------------------------------------------------------------------------
extern Module cellSpurs;
extern Module<> cellSpurs;
//----------------------------------------------------------------------------
// Function prototypes

View File

@ -2,7 +2,7 @@
#include "Emu/Memory/Memory.h"
#include "Emu/SysCalls/Modules.h"
extern Module cellSsl;
extern Module<> cellSsl;
s32 cellSslInit()
{
@ -88,7 +88,7 @@ s32 cellSslCertGetMd5Fingerprint()
return CELL_OK;
}
Module cellSsl("cellSsl", []()
Module<> cellSsl("cellSsl", []()
{
REG_FUNC(cellSsl, cellSslInit);
REG_FUNC(cellSsl, cellSslEnd);

View File

@ -2,7 +2,7 @@
#include "Emu/Memory/Memory.h"
#include "Emu/SysCalls/Modules.h"
extern Module cellSysutil;
extern Module<> cellSysutil;
s32 cellStorageDataImportMove()
{

View File

@ -4,7 +4,7 @@
#include "cellSubdisplay.h"
extern Module cellSubdisplay;
extern Module<> cellSubdisplay;
s32 cellSubDisplayInit()
{
@ -74,7 +74,7 @@ s32 cellSubDisplayGetPeerList()
return CELL_OK;
}
Module cellSubdisplay("cellSubdisplay", []()
Module<> cellSubdisplay("cellSubdisplay", []()
{
REG_FUNC(cellSubdisplay, cellSubDisplayInit);
REG_FUNC(cellSubdisplay, cellSubDisplayEnd);

View File

@ -9,7 +9,7 @@
#include "Emu/Event.h"
#include "cellSync.h"
extern Module cellSync;
extern Module<> cellSync;
s32 cellSyncMutexInitialize(vm::ptr<CellSyncMutex> mutex)
{
@ -1594,7 +1594,7 @@ s32 _cellSyncLFQueueDetachLv2EventQueue(vm::ptr<u32> spus, u32 num, vm::ptr<Cell
throw EXCEPTION("");
}
Module cellSync("cellSync", []()
Module<> cellSync("cellSync", []()
{
// setup error handler
cellSync.on_error = [](s64 value, ModuleFunc* func)

View File

@ -5,7 +5,17 @@
#include "cellSync2.h"
extern Module cellSync2;
struct Sync2Instance
{
CellSync2CallerThreadType gCellSync2CallerThreadTypePpuThread;
CellSync2Notifier gCellSync2NotifierPpuThread;
CellSync2CallerThreadType gCellSync2CallerThreadTypePpuFiber;
CellSync2Notifier gCellSync2NotifierPpuFiber;
CellSync2Notifier gCellSync2NotifierSpursTask;
CellSync2Notifier gCellSync2NotifierSpursJobQueueJob;
};
extern Module<Sync2Instance> cellSync2;
s32 _cellSync2MutexAttributeInitialize(vm::ptr<CellSync2MutexAttribute> attr, u32 sdkVersion)
{
@ -249,14 +259,14 @@ s32 cellSync2QueueGetDepth()
return CELL_OK;
}
Module cellSync2("cellSync2", []()
Module<Sync2Instance> cellSync2("cellSync2", []()
{
//REG_VARIABLE(cellSync2, gCellSync2CallerThreadTypePpuThread);
//REG_VARIABLE(cellSync2, gCellSync2NotifierPpuThread);
//REG_VARIABLE(cellSync2, gCellSync2CallerThreadTypePpuFiber);
//REG_VARIABLE(cellSync2, gCellSync2NotifierPpuFiber);
//REG_VARIABLE(cellSync2, gCellSync2NotifierSpursTask);
//REG_VARIABLE(cellSync2, gCellSync2NotifierSpursJobQueueJob);
REG_VARIABLE(cellSync2, gCellSync2CallerThreadTypePpuThread);
REG_VARIABLE(cellSync2, gCellSync2NotifierPpuThread);
REG_VARIABLE(cellSync2, gCellSync2CallerThreadTypePpuFiber);
REG_VARIABLE(cellSync2, gCellSync2NotifierPpuFiber);
REG_VARIABLE(cellSync2, gCellSync2NotifierSpursTask);
REG_VARIABLE(cellSync2, gCellSync2NotifierSpursJobQueueJob);
REG_FUNC(cellSync2, _cellSync2MutexAttributeInitialize);
REG_FUNC(cellSync2, cellSync2MutexEstimateBufferSize);

View File

@ -77,3 +77,21 @@ struct CellSync2QueueAttribute
};
CHECK_SIZE(CellSync2QueueAttribute, 128);
struct CellSync2CallerThreadType
{
be_t<u16> threadTypeId;
vm::bptr<u64(u64)> self;
vm::bptr<s32(u64, s32, u64, u64)> waitSignal;
vm::bptr<s32(vm::ptr<u64>, s32, u64, u64)> allocateSignalReceiver;
vm::bptr<s32(u64, u64)> freeSignalReceiver;
be_t<u32> spinWaitNanoSec;
be_t<u64> callbackArg;
};
struct CellSync2Notifier
{
be_t<u16> threadTypeId;
vm::bptr<s32(u64, u64)> sendSignal;
be_t<u64> callbackArg;
};

View File

@ -2,7 +2,7 @@
#include "Emu/Memory/Memory.h"
#include "Emu/SysCalls/Modules.h"
extern Module cellSysconf;
extern Module<> cellSysconf;
s32 cellSysconfAbort()
{
@ -21,13 +21,13 @@ s32 cellSysconfBtGetDeviceList()
void cellSysutil_Sysconf_init()
{
extern Module cellSysutil;
extern Module<> cellSysutil;
REG_FUNC(cellSysutil, cellSysconfAbort);
REG_FUNC(cellSysutil, cellSysconfOpen);
}
Module cellSysconf("cellSysconf", []()
Module<> cellSysconf("cellSysconf", []()
{
REG_FUNC(cellSysconf, cellSysconfBtGetDeviceList);
});

View File

@ -4,7 +4,7 @@
#include "Emu/SysCalls/ModuleManager.h"
#include "Emu/SysCalls/Modules.h"
extern Module cellSysmodule;
extern Module<> cellSysmodule;
enum
{
@ -156,7 +156,7 @@ s32 cellSysmoduleLoadModule(u16 id)
return CELL_SYSMODULE_ERROR_UNKNOWN;
}
if (Module* m = Emu.GetModuleManager().GetModuleById(id))
if (Module<>* m = Emu.GetModuleManager().GetModuleById(id))
{
// CELL_SYSMODULE_ERROR_DUPLICATED shouldn't be returned
m->Load();
@ -174,7 +174,7 @@ s32 cellSysmoduleUnloadModule(u16 id)
return CELL_SYSMODULE_ERROR_UNKNOWN;
}
if (Module* m = Emu.GetModuleManager().GetModuleById(id))
if (Module<>* m = Emu.GetModuleManager().GetModuleById(id))
{
if (!m->IsLoaded())
{
@ -197,7 +197,7 @@ s32 cellSysmoduleIsLoaded(u16 id)
return CELL_SYSMODULE_ERROR_UNKNOWN;
}
if (Module* m = Emu.GetModuleManager().GetModuleById(id))
if (Module<>* m = Emu.GetModuleManager().GetModuleById(id))
{
if (!m->IsLoaded())
{
@ -209,7 +209,7 @@ s32 cellSysmoduleIsLoaded(u16 id)
return CELL_SYSMODULE_LOADED;
}
Module cellSysmodule("cellSysmodule", []()
Module<> cellSysmodule("cellSysmodule", []()
{
REG_FUNC(cellSysmodule, cellSysmoduleInitialize);
REG_FUNC(cellSysmodule, cellSysmoduleFinalize);

View File

@ -9,7 +9,7 @@
#include "Emu/FS/VFS.h"
#include "cellSysutil.h"
extern Module cellSysutil;
extern Module<> cellSysutil;
std::unique_ptr<sysutil_t> g_sysutil;
@ -352,7 +352,7 @@ extern void cellSysutil_WebBrowser_init();
extern void cellSysutil_AudioOut_init();
extern void cellSysutil_VideoOut_init();
Module cellSysutil("cellSysutil", []()
Module<> cellSysutil("cellSysutil", []()
{
g_sysutil = std::make_unique<sysutil_t>();

View File

@ -2,7 +2,7 @@
#include "Emu/Memory/Memory.h"
#include "Emu/SysCalls/Modules.h"
extern Module cellSysutilAp;
extern Module<> cellSysutilAp;
// Return Codes
enum
@ -35,7 +35,7 @@ s32 cellSysutilApOff()
return CELL_OK;
}
Module cellSysutilAp("cellSysutilAp", []()
Module<> cellSysutilAp("cellSysutilAp", []()
{
REG_FUNC(cellSysutilAp, cellSysutilApGetRequiredMemSize);
REG_FUNC(cellSysutilAp, cellSysutilApOn);

View File

@ -2,7 +2,7 @@
#include "Emu/Memory/Memory.h"
#include "Emu/SysCalls/Modules.h"
extern Module cellSysutilAvc;
extern Module<> cellSysutilAvc;
s32 cellSysutilAvcByeRequest()
{
@ -218,7 +218,7 @@ s32 cellSysutilAvcExtGetWindowShowStatus()
void cellSysutil_SysutilAvc_init()
{
extern Module cellSysutil;
extern Module<> cellSysutil;
REG_FUNC(cellSysutil, cellSysutilAvcByeRequest);
REG_FUNC(cellSysutil, cellSysutilAvcCancelByeRequest);
@ -242,7 +242,7 @@ void cellSysutil_SysutilAvc_init()
REG_FUNC(cellSysutil, cellSysutilAvcUnloadAsync);
}
Module cellSysutilAvc("cellSysutilAvc", []()
Module<> cellSysutilAvc("cellSysutilAvc", []()
{
REG_FUNC(cellSysutilAvc, cellSysutilAvcExtInitOptionParam);
REG_FUNC(cellSysutilAvc, cellSysutilAvcExtSetHideNamePlate);

View File

@ -7,7 +7,7 @@
#include "sceNp2.h"
#include "cellSysutilAvc2.h"
extern Module cellSysutilAvc2;
extern Module<> cellSysutilAvc2;
s32 cellSysutilAvc2GetPlayerInfo()
{
@ -334,7 +334,7 @@ s32 cellSysutilAvc2GetWindowPosition()
}
Module cellSysutilAvc2("cellSysutilAvc2", []()
Module<> cellSysutilAvc2("cellSysutilAvc2", []()
{
REG_FUNC(cellSysutilAvc2, cellSysutilAvc2GetPlayerInfo);
REG_FUNC(cellSysutilAvc2, cellSysutilAvc2JoinChat);

View File

@ -3,7 +3,7 @@
#include "Emu/Memory/Memory.h"
#include "Emu/SysCalls/Modules.h"
extern Module cellSysutilMisc;
extern Module<> cellSysutilMisc;
// License areas
enum
@ -33,7 +33,7 @@ s32 cellSysutilGetLicenseArea()
}
}
Module cellSysutilMisc("cellSysutilMisc", []()
Module<> cellSysutilMisc("cellSysutilMisc", []()
{
REG_FUNC(cellSysutilMisc, cellSysutilGetLicenseArea);
});

View File

@ -4,7 +4,7 @@
#include "Emu/SysCalls/Modules.h"
#include "cellUsbd.h"
extern Module cellUsbd;
extern Module<> cellUsbd;
s32 cellUsbdInit()
{
@ -152,7 +152,7 @@ s32 cellUsbdFreeMemory()
return CELL_OK;
}
Module cellUsbd("cellUsbd", []()
Module<> cellUsbd("cellUsbd", []()
{
REG_FUNC(cellUsbd, cellUsbdInit);
REG_FUNC(cellUsbd, cellUsbdEnd);

View File

@ -2,7 +2,7 @@
#include "Emu/Memory/Memory.h"
#include "Emu/SysCalls/Modules.h"
extern Module cellUsbPspcm;
extern Module<> cellUsbPspcm;
// Return Codes
enum
@ -183,7 +183,7 @@ s32 cellUsbPspcmCancelWaitData()
return CELL_OK;
}
Module cellUsbPspcm("cellUsbPspcm", []()
Module<> cellUsbPspcm("cellUsbPspcm", []()
{
REG_FUNC(cellUsbPspcm, cellUsbPspcmInit);
REG_FUNC(cellUsbPspcm, cellUsbPspcmEnd);

View File

@ -7,7 +7,7 @@
#include "Emu/FS/vfsFileBase.h"
#include "cellUserInfo.h"
extern Module cellUserInfo;
extern Module<> cellUserInfo;
s32 cellUserInfoGetStat(u32 id, vm::ptr<CellUserInfoUserStat> stat)
{
@ -73,7 +73,7 @@ s32 cellUserInfoGetList(vm::ptr<u32> listNum, vm::ptr<CellUserInfoUserList> list
return CELL_OK;
}
Module cellUserInfo("cellUserInfo", []()
Module<> cellUserInfo("cellUserInfo", []()
{
REG_FUNC(cellUserInfo, cellUserInfoGetStat);
REG_FUNC(cellUserInfo, cellUserInfoSelectUser_ListType);

View File

@ -17,7 +17,7 @@ extern "C"
#include "cellPamf.h"
#include "cellVdec.h"
extern Module cellVdec;
extern Module<> cellVdec;
VideoDecoder::VideoDecoder(s32 type, u32 profile, u32 addr, u32 size, vm::ptr<CellVdecCbMsg> func, u32 arg)
: type(type)
@ -948,7 +948,7 @@ s32 cellVdecSetFrameRate(u32 handle, CellVdecFrameRate frc)
return CELL_OK;
}
Module cellVdec("cellVdec", []()
Module<> cellVdec("cellVdec", []()
{
//REG_VARIABLE(cellVdec, _cell_vdec_prx_ver); // 0x085a7ecb

View File

@ -2,7 +2,7 @@
#include "Emu/Memory/Memory.h"
#include "Emu/SysCalls/Modules.h"
extern Module cellVideoExport;
extern Module<> cellVideoExport;
s32 cellVideoExportProgress()
{
@ -35,7 +35,7 @@ s32 cellVideoExportFinalize()
}
Module cellVideoExport("cellVideoExport", []()
Module<> cellVideoExport("cellVideoExport", []()
{
REG_FUNC(cellVideoExport, cellVideoExportProgress);
REG_FUNC(cellVideoExport, cellVideoExportInitialize2);

View File

@ -7,7 +7,7 @@
#include "Emu/RSX/GSManager.h"
#include "cellVideoOut.h"
extern Module cellSysutil;
extern Module<> cellSysutil;
s32 cellVideoOutGetState(u32 videoOut, u32 deviceIndex, vm::ptr<CellVideoOutState> state)
{

View File

@ -2,14 +2,14 @@
#include "Emu/Memory/Memory.h"
#include "Emu/SysCalls/Modules.h"
extern Module cellVideoUpload;
extern Module<> cellVideoUpload;
s32 cellVideoUploadInitialize()
{
throw EXCEPTION("");
}
Module cellVideoUpload("cellVideoUpload", []()
Module<> cellVideoUpload("cellVideoUpload", []()
{
REG_FUNC(cellVideoUpload, cellVideoUploadInitialize);
});

View File

@ -3,7 +3,7 @@
#include "Emu/System.h"
#include "Emu/SysCalls/Modules.h"
extern Module cellVoice;
extern Module<> cellVoice;
// Error Codes
enum
@ -237,7 +237,7 @@ s32 cellVoiceDebugTopology()
return CELL_OK;
}
Module cellVoice("cellVoice", []()
Module<> cellVoice("cellVoice", []()
{
REG_FUNC(cellVoice, cellVoiceConnectIPortToOPort);
REG_FUNC(cellVoice, cellVoiceCreateNotifyEventQueue);

View File

@ -11,7 +11,7 @@ extern "C"
#include "cellVpost.h"
extern Module cellVpost;
extern Module<> cellVpost;
s32 cellVpostQueryAttr(vm::cptr<CellVpostCfgParam> cfgParam, vm::ptr<CellVpostAttr> attr)
{
@ -137,7 +137,7 @@ s32 cellVpostExec(u32 handle, vm::cptr<u8> inPicBuff, vm::cptr<CellVpostCtrlPara
return CELL_OK;
}
Module cellVpost("cellVpost", []()
Module<> cellVpost("cellVpost", []()
{
REG_FUNC(cellVpost, cellVpostQueryAttr);
REG_FUNC(cellVpost, cellVpostOpen);

View File

@ -4,7 +4,7 @@
#include "cellWebBrowser.h"
extern Module cellSysutil;
extern Module<> cellSysutil;
s32 cellWebBrowserActivate()
{

View File

@ -9,7 +9,7 @@
#include "cellAudio.h"
#include "libmixer.h"
extern Module libmixer;
extern Module<> libmixer;
SurMixerConfig g_surmx;
@ -614,7 +614,7 @@ float cellSurMixerUtilNoteToRatio(u8 refNote, u8 note)
throw EXCEPTION("");
}
Module libmixer("libmixer", []()
Module<> libmixer("libmixer", []()
{
g_surmx.audio_port = ~0;

View File

@ -290,7 +290,7 @@ s32 cellSnd3SMFGetKeyOnID(u32 smfID, u32 midiChannel, vm::ptr<u32> keyOnID)
}
Module libsnd3("libsnd3", []()
Module<> libsnd3("libsnd3", []()
{
REG_SUB(libsnd3,, cellSnd3Init);
REG_SUB(libsnd3,, cellSnd3Exit);

View File

@ -52,4 +52,4 @@ struct CellSnd3RequestQueueCtx
be_t<u32> rearQueueSize;
};
extern Module libsnd3;
extern Module<> libsnd3;

View File

@ -104,7 +104,7 @@ u16 cellSoundSynth2Pitch2Note(u16 center_note, u16 center_fine, u16 pitch)
}
Module libsynth2("libsynth2", []()
Module<> libsynth2("libsynth2", []()
{
REG_SUB(libsynth2,, cellSoundSynth2Config);
REG_SUB(libsynth2,, cellSoundSynth2Init);

View File

@ -18,4 +18,4 @@ struct CellSoundSynth2EffectAttr
be_t<u16> feedback;
};
extern Module libsynth2;
extern Module<> libsynth2;

View File

@ -11,7 +11,7 @@
#include "Crypto/unedat.h"
#include "sceNp.h"
extern Module sceNp;
extern Module<> sceNp;
s32 sceNpInit(u32 poolsize, vm::ptr<void> poolptr)
{
@ -1521,7 +1521,7 @@ s32 _Z32_sce_np_sysutil_cxml_prepare_docPN16sysutil_cxmlutil11FixedMemoryERN4cxm
}
Module sceNp("sceNp", []()
Module<> sceNp("sceNp", []()
{
REG_FUNC(sceNp, sceNpInit);
REG_FUNC(sceNp, sceNpTerm);

View File

@ -5,7 +5,7 @@
#include "sceNp.h"
#include "sceNp2.h"
extern Module sceNp2;
extern Module<> sceNp2;
s32 sceNp2Init(u32 poolsize, vm::ptr<void> poolptr)
{
@ -384,7 +384,7 @@ s32 sceNpMatching2RegisterRoomMessageCallback()
}
Module sceNp2("sceNp2", []()
Module<> sceNp2("sceNp2", []()
{
REG_FUNC(sceNp2, sceNpMatching2DestroyContext);
REG_FUNC(sceNp2, sceNpMatching2LeaveLobby);

View File

@ -6,7 +6,7 @@
#include "sceNp.h"
#include "sceNpClans.h"
extern Module sceNpClans;
extern Module<> sceNpClans;
s32 sceNpClansInit(vm::ptr<SceNpCommunicationId> commId, vm::ptr<SceNpCommunicationPassphrase> passphrase, vm::ptr<void> pool, vm::ptr<u32> poolSize, u32 flags)
{
@ -255,7 +255,7 @@ s32 sceNpClansRemoveChallenge()
return CELL_OK;
}
Module sceNpClans("sceNpClans", []()
Module<> sceNpClans("sceNpClans", []()
{
REG_FUNC(sceNpClans, sceNpClansInit);
REG_FUNC(sceNpClans, sceNpClansTerm);

Some files were not shown because too many files have changed in this diff Show More