mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-01-31 20:41:45 +01:00
vm_ptr: function format changed
This commit is contained in:
parent
1c4db01e19
commit
579a88b7c4
@ -708,7 +708,7 @@ class to_be_t
|
||||
|
||||
public:
|
||||
//true if need swap endianes for be
|
||||
static const bool value = (sizeof(T2) > 1) && (std::is_arithmetic<T>::value || std::is_enum<T>::value);
|
||||
static const bool value = std::is_arithmetic<T>::value || std::is_enum<T>::value;
|
||||
|
||||
//be_t<T, size> if need swap endianes, T otherwise
|
||||
typedef typename _be_type_selector< T, T2, value >::type type;
|
||||
@ -716,26 +716,58 @@ public:
|
||||
typedef typename _be_type_selector< T, T2, !is_be_t<T, T2>::value >::type forced_type;
|
||||
};
|
||||
|
||||
template<typename T, typename T2>
|
||||
class to_be_t<T, const T2>
|
||||
{
|
||||
public:
|
||||
static const bool value = to_be_t<T, T2>::value;
|
||||
typedef const typename to_be_t<T, T2>::type type;
|
||||
typedef const typename to_be_t<T, T2>::forced_type forced_type;
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
class to_be_t<T, void>
|
||||
{
|
||||
public:
|
||||
//true if need swap endianes for be
|
||||
static const bool value = false;
|
||||
|
||||
//be_t<T, size> if need swap endianes, T otherwise
|
||||
typedef void type;
|
||||
typedef void forced_type;
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
class to_be_t<T, const void>
|
||||
class to_be_t<T, u8>
|
||||
{
|
||||
public:
|
||||
//true if need swap endianes for be
|
||||
static const bool value = false;
|
||||
typedef u8 type;
|
||||
typedef u8 forced_type;
|
||||
};
|
||||
|
||||
//be_t<T, size> if need swap endianes, T otherwise
|
||||
typedef const void type;
|
||||
template<typename T>
|
||||
class to_be_t<T, s8>
|
||||
{
|
||||
public:
|
||||
static const bool value = false;
|
||||
typedef s8 type;
|
||||
typedef s8 forced_type;
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
class to_be_t<T, char>
|
||||
{
|
||||
public:
|
||||
static const bool value = false;
|
||||
typedef char type;
|
||||
typedef char forced_type;
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
class to_be_t<T, bool>
|
||||
{
|
||||
public:
|
||||
static const bool value = false;
|
||||
typedef bool type;
|
||||
typedef bool forced_type;
|
||||
};
|
||||
|
||||
template<typename T, typename T2 = T>
|
||||
|
@ -5,7 +5,7 @@
|
||||
namespace vm
|
||||
{
|
||||
template<typename AT, typename RT, typename... T>
|
||||
__forceinline RT _ptr_base<RT(*)(T...), 1, AT>::operator()(ARMv7Context& context, T... args) const
|
||||
__forceinline RT _ptr_base<RT(T...), 1, AT>::operator()(ARMv7Context& context, T... args) const
|
||||
{
|
||||
return psv_func_detail::func_caller<RT, T...>::call(context, vm::cast(this->addr()), args...);
|
||||
}
|
||||
@ -15,4 +15,4 @@ template<typename RT, typename... T>
|
||||
__forceinline RT cb_call(ARMv7Context& context, u32 addr, T... args)
|
||||
{
|
||||
return psv_func_detail::func_caller<RT, T...>::call(context, addr, args...);
|
||||
}
|
||||
}
|
||||
|
@ -266,7 +266,7 @@ struct cast_armv7_gpr<bool, false>
|
||||
return value;
|
||||
}
|
||||
|
||||
__forceinline static bool from_gpr(const u32 reg)
|
||||
__forceinline static bool from_gpr(const u32& reg)
|
||||
{
|
||||
return reinterpret_cast<const bool&>(reg);
|
||||
}
|
||||
|
@ -35,22 +35,22 @@ s32 sceCtrlGetSamplingMode(vm::psv::ptr<u32> puiMode)
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 sceCtrlPeekBufferPositive(s32 port, vm::psv::ptr<SceCtrlData>pData, s32 nBufs)
|
||||
s32 sceCtrlPeekBufferPositive(s32 port, vm::psv::ptr<SceCtrlData> pData, s32 nBufs)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 sceCtrlPeekBufferNegative(s32 port, vm::psv::ptr<SceCtrlData>pData, s32 nBufs)
|
||||
s32 sceCtrlPeekBufferNegative(s32 port, vm::psv::ptr<SceCtrlData> pData, s32 nBufs)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 sceCtrlReadBufferPositive(s32 port, vm::psv::ptr<SceCtrlData>pData, s32 nBufs)
|
||||
s32 sceCtrlReadBufferPositive(s32 port, vm::psv::ptr<SceCtrlData> pData, s32 nBufs)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 sceCtrlReadBufferNegative(s32 port, vm::psv::ptr<SceCtrlData>pData, s32 nBufs)
|
||||
s32 sceCtrlReadBufferNegative(s32 port, vm::psv::ptr<SceCtrlData> pData, s32 nBufs)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
@ -306,7 +306,7 @@ struct SceKernelAllocMemBlockOpt
|
||||
|
||||
// Thread Manager definitions (threads)
|
||||
|
||||
typedef s32(*SceKernelThreadEntry)(u32 argSize, vm::psv::ptr<void> pArgBlock);
|
||||
typedef s32(SceKernelThreadEntry)(u32 argSize, vm::psv::ptr<void> pArgBlock);
|
||||
|
||||
struct SceKernelThreadOptParam
|
||||
{
|
||||
@ -371,7 +371,7 @@ struct SceKernelSystemInfo
|
||||
|
||||
// Thread Manager definitions (callbacks)
|
||||
|
||||
typedef s32(*SceKernelCallbackFunction)(s32 notifyId, s32 notifyCount, s32 notifyArg, vm::psv::ptr<void> pCommon);
|
||||
typedef s32(SceKernelCallbackFunction)(s32 notifyId, s32 notifyCount, s32 notifyArg, vm::psv::ptr<void> pCommon);
|
||||
|
||||
struct SceKernelCallbackInfo
|
||||
{
|
||||
@ -389,7 +389,7 @@ struct SceKernelCallbackInfo
|
||||
|
||||
// Thread Manager definitions (events)
|
||||
|
||||
typedef s32(*SceKernelThreadEventHandler)(s32 type, s32 threadId, s32 arg, vm::psv::ptr<void> pCommon);
|
||||
typedef s32(SceKernelThreadEventHandler)(s32 type, s32 threadId, s32 arg, vm::psv::ptr<void> pCommon);
|
||||
|
||||
struct SceKernelEventInfo
|
||||
{
|
||||
|
@ -8,7 +8,7 @@ extern psv_log_base sceLibc;
|
||||
|
||||
vm::psv::ptr<void> g_dso;
|
||||
|
||||
typedef void(*atexit_func_t)(vm::psv::ptr<void>);
|
||||
typedef void(atexit_func_t)(vm::psv::ptr<void>);
|
||||
|
||||
std::vector<std::function<void(ARMv7Context&)>> g_atexit;
|
||||
|
||||
|
@ -969,7 +969,7 @@ struct cast_ppu_gpr<bool, false>
|
||||
return value;
|
||||
}
|
||||
|
||||
__forceinline static bool from_gpr(const u64 reg)
|
||||
__forceinline static bool from_gpr(const u64& reg)
|
||||
{
|
||||
return reinterpret_cast<const bool&>(reg);
|
||||
}
|
||||
|
@ -109,7 +109,11 @@ namespace vm
|
||||
|
||||
public:
|
||||
typedef typename std::remove_cv<T>::type type;
|
||||
static const u32 data_size = sizeof(T);
|
||||
|
||||
__forceinline static const u32 data_size()
|
||||
{
|
||||
return sizeof(T);
|
||||
}
|
||||
|
||||
__forceinline T* const operator -> () const
|
||||
{
|
||||
@ -119,45 +123,45 @@ namespace vm
|
||||
_ptr_base operator++ (int)
|
||||
{
|
||||
AT result = m_addr;
|
||||
m_addr += data_size;
|
||||
m_addr += data_size();
|
||||
return make(result);
|
||||
}
|
||||
|
||||
_ptr_base& operator++ ()
|
||||
{
|
||||
m_addr += data_size;
|
||||
m_addr += data_size();
|
||||
return *this;
|
||||
}
|
||||
|
||||
_ptr_base operator-- (int)
|
||||
{
|
||||
AT result = m_addr;
|
||||
m_addr -= data_size;
|
||||
m_addr -= data_size();
|
||||
return make(result);
|
||||
}
|
||||
|
||||
_ptr_base& operator-- ()
|
||||
{
|
||||
m_addr -= data_size;
|
||||
m_addr -= data_size();
|
||||
return *this;
|
||||
}
|
||||
|
||||
_ptr_base& operator += (AT count)
|
||||
{
|
||||
m_addr += count * data_size;
|
||||
m_addr += count * data_size();
|
||||
return *this;
|
||||
}
|
||||
|
||||
_ptr_base& operator -= (AT count)
|
||||
{
|
||||
m_addr -= count * data_size;
|
||||
m_addr -= count * data_size();
|
||||
return *this;
|
||||
}
|
||||
|
||||
_ptr_base operator + (typename remove_be_t<AT>::type count) const { return make(m_addr + count * data_size); }
|
||||
_ptr_base operator + (typename to_be_t<AT>::type count) const { return make(m_addr + count * data_size); }
|
||||
_ptr_base operator - (typename remove_be_t<AT>::type count) const { return make(m_addr - count * data_size); }
|
||||
_ptr_base operator - (typename to_be_t<AT>::type count) const { return make(m_addr - count * data_size); }
|
||||
_ptr_base operator + (typename remove_be_t<AT>::type count) const { return make(m_addr + count * data_size()); }
|
||||
_ptr_base operator + (typename to_be_t<AT>::type count) const { return make(m_addr + count * data_size()); }
|
||||
_ptr_base operator - (typename remove_be_t<AT>::type count) const { return make(m_addr - count * data_size()); }
|
||||
_ptr_base operator - (typename to_be_t<AT>::type count) const { return make(m_addr - count * data_size()); }
|
||||
|
||||
__forceinline T& operator *() const
|
||||
{
|
||||
@ -166,12 +170,12 @@ namespace vm
|
||||
|
||||
__forceinline T& operator [](typename remove_be_t<AT>::type index) const
|
||||
{
|
||||
return vm::get_ref<T>(vm::cast(m_addr + data_size * index));
|
||||
return vm::get_ref<T>(vm::cast(m_addr + data_size() * index));
|
||||
}
|
||||
|
||||
__forceinline T& operator [](typename to_be_t<AT>::forced_type index) const
|
||||
{
|
||||
return vm::get_ref<T>(vm::cast(m_addr + data_size * index));
|
||||
return vm::get_ref<T>(vm::cast(m_addr + data_size() * index));
|
||||
}
|
||||
|
||||
__forceinline bool operator <(const _ptr_base& right) const { return m_addr < right.m_addr; }
|
||||
@ -326,12 +330,12 @@ namespace vm
|
||||
};
|
||||
|
||||
template<typename AT, typename RT, typename ...T>
|
||||
class _ptr_base<RT(*)(T...), 1, AT>
|
||||
class _ptr_base<RT(T...), 1, AT>
|
||||
{
|
||||
AT m_addr;
|
||||
|
||||
public:
|
||||
typedef RT(*type)(T...);
|
||||
typedef RT(type)(T...);
|
||||
|
||||
RT operator()(CPUThread& CPU, T... args) const; // defined in CB_FUNC.h, call using specified PPU thread context
|
||||
|
||||
@ -360,10 +364,10 @@ namespace vm
|
||||
explicit operator bool() const { return m_addr != 0; }
|
||||
|
||||
template<typename AT2>
|
||||
operator const _ptr_base<RT(*)(T...), 1, AT2>() const
|
||||
operator const _ptr_base<type, 1, AT2>() const
|
||||
{
|
||||
const AT2 addr = convert_le_be<AT2>(m_addr);
|
||||
return reinterpret_cast<const _ptr_base<RT(*)(T...), 1, AT2>&>(addr);
|
||||
return reinterpret_cast<const _ptr_base<type, 1, AT2>&>(addr);
|
||||
}
|
||||
|
||||
static const _ptr_base make(const AT& addr)
|
||||
@ -371,7 +375,7 @@ namespace vm
|
||||
return reinterpret_cast<const _ptr_base&>(addr);
|
||||
}
|
||||
|
||||
operator const std::function<RT(T...)>() const
|
||||
operator const std::function<type>() const
|
||||
{
|
||||
const AT addr = convert_le_be<AT>(m_addr);
|
||||
return [addr](T... args) -> RT { return make(addr)(args...); };
|
||||
@ -380,6 +384,15 @@ namespace vm
|
||||
_ptr_base& operator = (const _ptr_base& right) = default;
|
||||
};
|
||||
|
||||
template<typename AT, typename RT, typename ...T>
|
||||
class _ptr_base<RT(*)(T...), 1, AT>
|
||||
{
|
||||
AT m_addr;
|
||||
|
||||
public:
|
||||
static_assert(!sizeof(AT), "vm::_ptr_base<> error: use RT(T...) format for functions instead of RT(*)(T...)");
|
||||
};
|
||||
|
||||
//BE pointer to LE data
|
||||
template<typename T, int lvl = 1, typename AT = u32> struct bptrl : public _ptr_base<T, lvl, typename to_be_t<AT>::type>
|
||||
{
|
||||
|
@ -220,7 +220,7 @@ struct CellGcmConfig
|
||||
|
||||
struct CellGcmContextData;
|
||||
|
||||
typedef s32(*CellGcmContextCallback)(vm::ptr<CellGcmContextData>, u32);
|
||||
typedef s32(CellGcmContextCallback)(vm::ptr<CellGcmContextData>, u32);
|
||||
|
||||
struct CellGcmContextData
|
||||
{
|
||||
|
@ -154,10 +154,10 @@ public:
|
||||
SSemaphore m_sem_flush;
|
||||
SSemaphore m_sem_flip;
|
||||
u64 m_last_flip_time;
|
||||
vm::ptr<void(*)(const u32)> m_flip_handler;
|
||||
vm::ptr<void(*)(const u32)> m_user_handler;
|
||||
vm::ptr<void(u32)> m_flip_handler;
|
||||
vm::ptr<void(u32)> m_user_handler;
|
||||
u64 m_vblank_count;
|
||||
vm::ptr<void(*)(const u32)> m_vblank_handler;
|
||||
vm::ptr<void(u32)> m_vblank_handler;
|
||||
|
||||
public:
|
||||
// Dither
|
||||
@ -442,6 +442,7 @@ protected:
|
||||
, m_flip_mode(CELL_GCM_DISPLAY_VSYNC)
|
||||
, m_debug_level(CELL_GCM_DEBUG_LEVEL0)
|
||||
, m_frequency_mode(CELL_GCM_DISPLAY_FREQUENCY_DISABLE)
|
||||
, m_report_main_addr(0)
|
||||
, m_main_mem_addr(0)
|
||||
, m_local_mem_addr(0)
|
||||
, m_draw_mode(0)
|
||||
|
@ -163,7 +163,7 @@ namespace cb_detail
|
||||
namespace vm
|
||||
{
|
||||
template<typename AT, typename RT, typename... T>
|
||||
__forceinline RT _ptr_base<RT(*)(T...), 1, AT>::operator()(CPUThread& CPU, T... args) const
|
||||
__forceinline RT _ptr_base<RT(T...), 1, AT>::operator()(CPUThread& CPU, T... args) const
|
||||
{
|
||||
auto data = vm::get_ptr<be_t<u32>>(vm::cast(m_addr));
|
||||
const u32 pc = data[0];
|
||||
@ -174,7 +174,7 @@ namespace vm
|
||||
}
|
||||
|
||||
template<typename AT, typename RT, typename... T>
|
||||
__forceinline RT _ptr_base<RT(*)(T...), 1, AT>::operator()(T... args) const
|
||||
__forceinline RT _ptr_base<RT(T...), 1, AT>::operator()(T... args) const
|
||||
{
|
||||
return operator()(GetCurrentPPUThread(), args...);
|
||||
}
|
||||
@ -186,6 +186,7 @@ __forceinline RT cb_call(PPUThread& CPU, u32 pc, u32 rtoc, T... args)
|
||||
return cb_detail::_func_caller<RT, T...>::call(CPU, pc, rtoc, args...);
|
||||
}
|
||||
|
||||
// Something is wrong with it (but cb_call<void, ...>() should work anyway)
|
||||
//template<typename... T>
|
||||
//void cb_call(PPUThread& CPU, u32 pc, u32 rtoc, T... args)
|
||||
//{
|
||||
|
@ -9,9 +9,9 @@ struct ModuleFunc
|
||||
{
|
||||
u32 id;
|
||||
func_caller* func;
|
||||
vm::ptr<void(*)()> lle_func;
|
||||
vm::ptr<void()> lle_func;
|
||||
|
||||
ModuleFunc(u32 id, func_caller* func, vm::ptr<void(*)()> lle_func = vm::ptr<void(*)()>::make(0))
|
||||
ModuleFunc(u32 id, func_caller* func, vm::ptr<void()> lle_func = vm::ptr<void()>::make(0))
|
||||
: id(id)
|
||||
, func(func)
|
||||
, lle_func(lle_func)
|
||||
@ -129,7 +129,7 @@ public:
|
||||
|
||||
bool RemoveId(u32 id);
|
||||
|
||||
void RegisterLLEFunc(u32 id, vm::ptr<void(*)()> func)
|
||||
void RegisterLLEFunc(u32 id, vm::ptr<void()> func)
|
||||
{
|
||||
if (auto f = GetFunc(id))
|
||||
{
|
||||
|
@ -366,7 +366,7 @@ enum CellAdecMsgType
|
||||
CELL_ADEC_MSG_TYPE_SEQDONE,
|
||||
};
|
||||
|
||||
typedef s32(*CellAdecCbMsg)(u32 handle, CellAdecMsgType msgType, s32 msgData, u32 cbArg);
|
||||
typedef s32(CellAdecCbMsg)(u32 handle, CellAdecMsgType msgType, s32 msgData, u32 cbArg);
|
||||
|
||||
struct CellAdecCb
|
||||
{
|
||||
|
@ -217,7 +217,7 @@ struct CellDmuxResource2
|
||||
be_t<u32> shit[4];
|
||||
};
|
||||
|
||||
typedef u32(*CellDmuxCbMsg)(u32 demuxerHandle, vm::ptr<CellDmuxMsg> demuxerMsg, u32 cbArg);
|
||||
typedef u32(CellDmuxCbMsg)(u32 demuxerHandle, vm::ptr<CellDmuxMsg> demuxerMsg, u32 cbArg);
|
||||
|
||||
struct CellDmuxCb
|
||||
{
|
||||
@ -225,7 +225,7 @@ struct CellDmuxCb
|
||||
be_t<u32> cbArg;
|
||||
};
|
||||
|
||||
typedef u32(*CellDmuxCbEsMsg)(u32 demuxerHandle, u32 esHandle, vm::ptr<CellDmuxEsMsg> esMsg, u32 cbArg);
|
||||
typedef u32(CellDmuxCbEsMsg)(u32 demuxerHandle, u32 esHandle, vm::ptr<CellDmuxEsMsg> esMsg, u32 cbArg);
|
||||
|
||||
struct CellDmuxEsCb
|
||||
{
|
||||
|
@ -202,7 +202,7 @@ int cellGameContentPermit(vm::ptr<char[CELL_GAME_PATH_MAX]> contentInfoPath, vm:
|
||||
}
|
||||
|
||||
int cellGameDataCheckCreate2(PPUThread& CPU, u32 version, vm::ptr<const char> dirName, u32 errDialog,
|
||||
vm::ptr<void(*)(vm::ptr<CellGameDataCBResult> cbResult, vm::ptr<CellGameDataStatGet> get, vm::ptr<CellGameDataStatSet> set)> funcStat, u32 container)
|
||||
vm::ptr<void(vm::ptr<CellGameDataCBResult> cbResult, vm::ptr<CellGameDataStatGet> get, vm::ptr<CellGameDataStatSet> set)> funcStat, u32 container)
|
||||
{
|
||||
cellGame->Warning("cellGameDataCheckCreate(2)(version=0x%x, dirName_addr=0x%x, errDialog=0x%x, funcStat_addr=0x%x, container=%d)",
|
||||
version, dirName.addr(), errDialog, funcStat.addr(), container);
|
||||
@ -307,7 +307,7 @@ int cellGameDataCheckCreate2(PPUThread& CPU, u32 version, vm::ptr<const char> di
|
||||
}
|
||||
|
||||
int cellGameDataCheckCreate(PPUThread& CPU, u32 version, vm::ptr<const char> dirName, u32 errDialog,
|
||||
vm::ptr<void(*)(vm::ptr<CellGameDataCBResult> cbResult, vm::ptr<CellGameDataStatGet> get, vm::ptr<CellGameDataStatSet> set)> funcStat, u32 container)
|
||||
vm::ptr<void(vm::ptr<CellGameDataCBResult> cbResult, vm::ptr<CellGameDataStatGet> get, vm::ptr<CellGameDataStatSet> set)> funcStat, u32 container)
|
||||
{
|
||||
// TODO: almost identical, the only difference is that this function will always calculate the size of game data
|
||||
return cellGameDataCheckCreate2(CPU, version, dirName, errDialog, funcStat, container);
|
||||
|
@ -125,12 +125,8 @@ u32 cellGcmGetNotifyDataAddress(u32 index)
|
||||
{
|
||||
cellGcmSys->Warning("cellGcmGetNotifyDataAddress(index=%d)", index);
|
||||
|
||||
// Get address of 'IO table' and 'EA table'
|
||||
vm::var<CellGcmOffsetTable> table;
|
||||
cellGcmGetOffsetTable(table);
|
||||
|
||||
// If entry not in use, return NULL
|
||||
u16 entry = table->eaAddress[241];
|
||||
u16 entry = offsetTable.eaAddress[241];
|
||||
if (entry == 0xFFFF) {
|
||||
return 0;
|
||||
}
|
||||
@ -455,7 +451,7 @@ int cellGcmSetFlip(vm::ptr<CellGcmContextData> ctxt, u32 id)
|
||||
return res < 0 ? CELL_GCM_ERROR_FAILURE : CELL_OK;
|
||||
}
|
||||
|
||||
void cellGcmSetFlipHandler(vm::ptr<void(*)(const u32)> handler)
|
||||
void cellGcmSetFlipHandler(vm::ptr<void(u32)> handler)
|
||||
{
|
||||
cellGcmSys->Warning("cellGcmSetFlipHandler(handler_addr=%d)", handler.addr());
|
||||
|
||||
@ -596,14 +592,14 @@ int cellGcmSetTileInfo(u8 index, u8 location, u32 offset, u32 size, u32 pitch, u
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
void cellGcmSetUserHandler(vm::ptr<void(*)(const u32)> handler)
|
||||
void cellGcmSetUserHandler(vm::ptr<void(u32)> handler)
|
||||
{
|
||||
cellGcmSys->Warning("cellGcmSetUserHandler(handler_addr=0x%x)", handler.addr());
|
||||
|
||||
Emu.GetGSManager().GetRender().m_user_handler = handler;
|
||||
}
|
||||
|
||||
void cellGcmSetVBlankHandler(vm::ptr<void(*)(const u32)> handler)
|
||||
void cellGcmSetVBlankHandler(vm::ptr<void(u32)> handler)
|
||||
{
|
||||
cellGcmSys->Warning("cellGcmSetVBlankHandler(handler_addr=0x%x)", handler.addr());
|
||||
|
||||
@ -1191,7 +1187,7 @@ s32 cellGcmCallback(vm::ptr<CellGcmContextData> context, u32 count)
|
||||
//auto& ctrl = vm::get_ref<CellGcmControl>(gcm_info.control_addr);
|
||||
|
||||
// preparations for changing the place (for optimized FIFO mode)
|
||||
//auto cmd = vm::ptr<u32>::make(context->current.ToLE());
|
||||
//auto cmd = vm::ptr<u32>::make(context->current);
|
||||
//cmd[0] = 0x41D6C;
|
||||
//cmd[1] = 0x20;
|
||||
//cmd[2] = 0x41D74;
|
||||
@ -1207,7 +1203,7 @@ s32 cellGcmCallback(vm::ptr<CellGcmContextData> context, u32 count)
|
||||
vm::write32(context->current, CELL_GCM_METHOD_FLAG_JUMP | offset); // set JUMP cmd
|
||||
|
||||
auto& ctrl = vm::get_ref<CellGcmControl>(gcm_info.control_addr);
|
||||
ctrl.put.write_relaxed(be_t<u32>::make(offset));
|
||||
ctrl.put.exchange(be_t<u32>::make(offset));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -79,7 +79,7 @@ enum
|
||||
CELL_MSGDIALOG_BUTTON_ESCAPE = 3,
|
||||
};
|
||||
|
||||
typedef void(*CellMsgDialogCallback)(s32 buttonType, u32 userData);
|
||||
typedef void(CellMsgDialogCallback)(s32 buttonType, u32 userData);
|
||||
|
||||
s32 cellMsgDialogOpen2(u32 type, vm::ptr<const char> msgString, vm::ptr<CellMsgDialogCallback> callback, u32 userData, u32 extParam);
|
||||
s32 cellMsgDialogOpenErrorCode(u32 errorCode, vm::ptr<CellMsgDialogCallback> callback, u32 userData, u32 extParam);
|
||||
|
@ -224,7 +224,7 @@ union CellNetCtlInfo
|
||||
be_t<u32> ip_config;
|
||||
s8 dhcp_hostname[256];
|
||||
s8 pppoe_auth_name[128];
|
||||
s8 ip_address[16];
|
||||
char ip_address[16];
|
||||
s8 netmask[16];
|
||||
s8 default_route[16];
|
||||
s8 primary_dns[16];
|
||||
@ -257,4 +257,4 @@ struct CellNetCtlNatInfo
|
||||
be_t<u32> mapped_addr;
|
||||
};
|
||||
|
||||
typedef void(*cellNetCtlHandler)(s32 prev_state, s32 new_state, s32 event, s32 error_code, vm::ptr<u32> arg);
|
||||
typedef void(cellNetCtlHandler)(s32 prev_state, s32 new_state, s32 event, s32 error_code, vm::ptr<u32> arg);
|
||||
|
@ -87,8 +87,8 @@ enum CellPngDecDecodeStatus : u32
|
||||
};
|
||||
|
||||
// Callbacks
|
||||
typedef vm::ptr<void>(*CellPngDecCbControlMalloc)(u32 size, vm::ptr<void> cbCtrlMallocArg);
|
||||
typedef s32(*CellPngDecCbControlFree)(vm::ptr<void> ptr, vm::ptr<void> cbCtrlFreeArg);
|
||||
typedef vm::ptr<void>(CellPngDecCbControlMalloc)(u32 size, vm::ptr<void> cbCtrlMallocArg);
|
||||
typedef s32(CellPngDecCbControlFree)(vm::ptr<void> ptr, vm::ptr<void> cbCtrlFreeArg);
|
||||
|
||||
// Structs
|
||||
struct CellPngDecThreadInParam
|
||||
@ -283,11 +283,7 @@ struct CellPngDecStrmParam
|
||||
be_t<u32> strmSize;
|
||||
};
|
||||
|
||||
typedef s32(*CellPngDecCbControlStream)(
|
||||
vm::ptr<CellPngDecStrmInfo> strmInfo,
|
||||
vm::ptr<CellPngDecStrmParam> strmParam,
|
||||
vm::ptr<void> cbCtrlStrmArg
|
||||
);
|
||||
typedef s32(CellPngDecCbControlStream)(vm::ptr<CellPngDecStrmInfo> strmInfo, vm::ptr<CellPngDecStrmParam> strmParam, vm::ptr<void> cbCtrlStrmArg);
|
||||
|
||||
struct CellPngDecDispInfo
|
||||
{
|
||||
@ -310,7 +306,7 @@ struct CellPngDecDispParam
|
||||
};
|
||||
|
||||
// Callback
|
||||
typedef s32(*CellPngDecCbControlDisp)(vm::ptr<CellPngDecDispInfo> dispInfo, vm::ptr<CellPngDecDispParam> dispParam, vm::ptr<void> cbCtrlDispArg);
|
||||
typedef s32(CellPngDecCbControlDisp)(vm::ptr<CellPngDecDispInfo> dispInfo, vm::ptr<CellPngDecDispParam> dispParam, vm::ptr<void> cbCtrlDispArg);
|
||||
|
||||
// Structs
|
||||
struct CellPngDecOpnParam
|
||||
|
@ -12,8 +12,8 @@ Module *cellResc = nullptr;
|
||||
|
||||
extern s32 cellVideoOutConfigure(u32 videoOut, vm::ptr<CellVideoOutConfiguration> config, vm::ptr<CellVideoOutOption> option, u32 waitForEvent);
|
||||
extern int cellGcmSetFlipMode(u32 mode);
|
||||
extern void cellGcmSetFlipHandler(vm::ptr<void(*)(const u32)> handler);
|
||||
extern void cellGcmSetVBlankHandler(vm::ptr<void(*)(const u32)> handler);
|
||||
extern void cellGcmSetFlipHandler(vm::ptr<void(u32)> handler);
|
||||
extern void cellGcmSetVBlankHandler(vm::ptr<void(u32)> handler);
|
||||
extern int cellGcmAddressToOffset(u64 address, vm::ptr<be_t<u32>> offset);
|
||||
extern int cellGcmSetDisplayBuffer(u32 id, u32 offset, u32 pitch, u32 width, u32 height);
|
||||
extern int cellGcmSetPrepareFlip(vm::ptr<CellGcmContextData> ctx, u32 id);
|
||||
@ -603,7 +603,7 @@ void cellRescExit()
|
||||
if (IsPalTemporal())
|
||||
{
|
||||
cellGcmSetSecondVFrequency(CELL_GCM_DISPLAY_FREQUENCY_DISABLE);
|
||||
cellGcmSetVBlankHandler(vm::ptr<void(*)(const u32)>::make(0));
|
||||
cellGcmSetVBlankHandler(vm::ptr<void(u32)>::make(0));
|
||||
//GcmSysTypePrefix::cellGcmSetSecondVHandler(NULL);
|
||||
|
||||
if (IsPalInterpolate())
|
||||
@ -667,7 +667,7 @@ int cellRescSetDsts(u32 dstsMode, vm::ptr<CellRescDsts> dsts)
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
void SetVBlankHandler(vm::ptr<void(*)(const u32)> handler)
|
||||
void SetVBlankHandler(vm::ptr<void(u32)> handler)
|
||||
{
|
||||
if (!s_rescInternalInstance->m_bInitialized || s_rescInternalInstance->m_dstMode == 0)
|
||||
{
|
||||
@ -693,7 +693,7 @@ void SetVBlankHandler(vm::ptr<void(*)(const u32)> handler)
|
||||
}
|
||||
|
||||
|
||||
void SetFlipHandler(vm::ptr<void(*)(const u32)> handler)
|
||||
void SetFlipHandler(vm::ptr<void(u32)> handler)
|
||||
{
|
||||
if (!s_rescInternalInstance->m_bInitialized || s_rescInternalInstance->m_dstMode == 0)
|
||||
{
|
||||
@ -780,20 +780,20 @@ int cellRescSetDisplayMode(u32 displayMode)
|
||||
cellGcmSetSecondVFrequency(CELL_GCM_DISPLAY_FREQUENCY_59_94HZ);
|
||||
//cellGcmSetVBlankHandler(IntrHandler50);
|
||||
//cellGcmSetSecondVHandler(IntrHandler60);
|
||||
cellGcmSetFlipHandler(vm::ptr<void(*)(const u32)>::make(0));
|
||||
cellGcmSetFlipHandler(vm::ptr<void(u32)>::make(0));
|
||||
}
|
||||
else if (IsPalDrop())
|
||||
{
|
||||
//InitLabels();
|
||||
cellGcmSetSecondVFrequency(CELL_GCM_DISPLAY_FREQUENCY_59_94HZ);
|
||||
cellGcmSetVBlankHandler(vm::ptr<void(*)(const u32)>::make(0));
|
||||
cellGcmSetVBlankHandler(vm::ptr<void(u32)>::make(0));
|
||||
//cellGcmSetSecondVHandler(IntrHandler60Drop);
|
||||
cellGcmSetFlipHandler(vm::ptr<void(*)(const u32)>::make(0));
|
||||
cellGcmSetFlipHandler(vm::ptr<void(u32)>::make(0));
|
||||
}
|
||||
else if (IsPal60Hsync())
|
||||
{
|
||||
cellGcmSetSecondVFrequency(CELL_GCM_DISPLAY_FREQUENCY_59_94HZ);
|
||||
cellGcmSetVBlankHandler(vm::ptr<void(*)(const u32)>::make(0));
|
||||
cellGcmSetVBlankHandler(vm::ptr<void(u32)>::make(0));
|
||||
}
|
||||
|
||||
if (s_rescInternalInstance->s_applicationVBlankHandler) SetVBlankHandler(s_rescInternalInstance->s_applicationVBlankHandler);
|
||||
@ -1073,7 +1073,7 @@ int cellRescSetBufferAddress(vm::ptr<u32> colorBuffers, vm::ptr<u32> vertexArray
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
void cellRescSetFlipHandler(vm::ptr<void(*)(const u32)> handler)
|
||||
void cellRescSetFlipHandler(vm::ptr<void(u32)> handler)
|
||||
{
|
||||
cellResc->Warning("cellRescSetFlipHandler(handler_addr=0x%x)", handler.addr());
|
||||
|
||||
@ -1113,7 +1113,7 @@ int cellRescSetRegisterCount()
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
void cellRescSetVBlankHandler(vm::ptr<void(*)(const u32)> handler)
|
||||
void cellRescSetVBlankHandler(vm::ptr<void(u32)> handler)
|
||||
{
|
||||
cellResc->Warning("cellRescSetVBlankHandler(handler_addr=0x%x)", handler.addr());
|
||||
|
||||
|
@ -137,8 +137,8 @@ struct CCellRescInternal
|
||||
bool m_isDummyFlipped;
|
||||
u8 m_cgParamIndex[RESC_PARAM_NUM];
|
||||
u64 m_commandIdxCaF, m_rcvdCmdIdx;
|
||||
vm::ptr<void(*)(const u32)> s_applicationFlipHandler;
|
||||
vm::ptr<void(*)(const u32)> s_applicationVBlankHandler;
|
||||
vm::ptr<void(u32)> s_applicationFlipHandler;
|
||||
vm::ptr<void(u32)> s_applicationVBlankHandler;
|
||||
|
||||
CCellRescInternal()
|
||||
: m_bInitialized(false)
|
||||
|
@ -618,64 +618,64 @@ union CellSailEvent
|
||||
};
|
||||
};
|
||||
|
||||
typedef u32(*CellSailMemAllocatorFuncAlloc)(u32 pArg, u32 boundary, u32 size);
|
||||
typedef u32(*CellSailMemAllocatorFuncFree)(u32 pArg, u32 boundary, u32 pMemory);
|
||||
typedef u32(CellSailMemAllocatorFuncAlloc)(u32 pArg, u32 boundary, u32 size);
|
||||
typedef u32(CellSailMemAllocatorFuncFree)(u32 pArg, u32 boundary, u32 pMemory);
|
||||
|
||||
typedef int(*CellSailSoundAdapterFuncMakeup)(u32 pArg);
|
||||
typedef int(*CellSailSoundAdapterFuncCleanup)(u32 pArg);
|
||||
typedef void(*CellSailSoundAdapterFuncFormatChanged)(u32 pArg, vm::ptr<CellSailAudioFormat> pFormat, u32 sessionId);
|
||||
typedef int(CellSailSoundAdapterFuncMakeup)(u32 pArg);
|
||||
typedef int(CellSailSoundAdapterFuncCleanup)(u32 pArg);
|
||||
typedef void(CellSailSoundAdapterFuncFormatChanged)(u32 pArg, vm::ptr<CellSailAudioFormat> pFormat, u32 sessionId);
|
||||
|
||||
typedef int(*CellSailGraphicsAdapterFuncMakeup)(u32 pArg);
|
||||
typedef int(*CellSailGraphicsAdapterFuncCleanup)(u32 pArg);
|
||||
typedef void(*CellSailGraphicsAdapterFuncFormatChanged)(u32 pArg, vm::ptr<CellSailVideoFormat> pFormat, u32 sessionId);
|
||||
typedef int(*CellSailGraphicsAdapterFuncAllocFrame)(u32 pArg, u32 size, s32 num, u8 ppFrame);
|
||||
typedef int(*CellSailGraphicsAdapterFuncFreeFrame)(u32 pArg, s32 num, u8 ppFrame);
|
||||
typedef int(CellSailGraphicsAdapterFuncMakeup)(u32 pArg);
|
||||
typedef int(CellSailGraphicsAdapterFuncCleanup)(u32 pArg);
|
||||
typedef void(CellSailGraphicsAdapterFuncFormatChanged)(u32 pArg, vm::ptr<CellSailVideoFormat> pFormat, u32 sessionId);
|
||||
typedef int(CellSailGraphicsAdapterFuncAllocFrame)(u32 pArg, u32 size, s32 num, u8 ppFrame);
|
||||
typedef int(CellSailGraphicsAdapterFuncFreeFrame)(u32 pArg, s32 num, u8 ppFrame);
|
||||
|
||||
typedef int(*CellSailSourceFuncMakeup)(u32 pArg, s8 pProtocolNames);
|
||||
typedef int(*CellSailSourceFuncCleanup)(u32 pArg);
|
||||
typedef void(*CellSailSourceFuncOpen)(u32 pArg, s32 streamType, u32 pMediaInfo, s8 pUri, vm::ptr<CellSailSourceStreamingProfile> pProfile);
|
||||
typedef void(*CellSailSourceFuncClose)(u32 pArg);
|
||||
typedef void(*CellSailSourceFuncStart)(u32 pArg, vm::ptr<CellSailSourceStartCommand> pCommand, u32 sessionId);
|
||||
typedef void(*CellSailSourceFuncStop)(u32 pArg);
|
||||
typedef void(*CellSailSourceFuncCancel)(u32 pArg);
|
||||
typedef int(*CellSailSourceFuncCheckout)(u32 pArg, vm::ptr<CellSailSourceBufferItem> ppItem);
|
||||
typedef int(*CellSailSourceFuncCheckin)(u32 pArg, vm::ptr<CellSailSourceBufferItem> pItem);
|
||||
typedef int(*CellSailSourceFuncClear)(u32 pArg);
|
||||
typedef int(*CellSailSourceFuncRead)(u32 pArg, s32 streamType, u32 pMediaInfo, s8 pUri, u64 offset, u8 pBuf, u32 size, u64 pTotalSize);
|
||||
typedef int(*CellSailSourceFuncReadSync)(u32 pArg, s32 streamType, u32 pMediaInfo, s8 pUri, u64 offset, u8 pBuf, u32 size, u64 pTotalSize);
|
||||
typedef int(*CellSailSourceFuncGetCapabilities)(u32 pArg, s32 streamType, u32 pMediaInfo, s8 pUri, u64 pCapabilities);
|
||||
typedef int(*CellSailSourceFuncInquireCapability)(u32 pArg, s32 streamType, u32 pMediaInfo, s8 pUri, vm::ptr<CellSailSourceStartCommand> pCommand);
|
||||
typedef void(*CellSailSourceCheckFuncError)(u32 pArg, s8 pMsg, s32 line);
|
||||
typedef int(CellSailSourceFuncMakeup)(u32 pArg, s8 pProtocolNames);
|
||||
typedef int(CellSailSourceFuncCleanup)(u32 pArg);
|
||||
typedef void(CellSailSourceFuncOpen)(u32 pArg, s32 streamType, u32 pMediaInfo, s8 pUri, vm::ptr<CellSailSourceStreamingProfile> pProfile);
|
||||
typedef void(CellSailSourceFuncClose)(u32 pArg);
|
||||
typedef void(CellSailSourceFuncStart)(u32 pArg, vm::ptr<CellSailSourceStartCommand> pCommand, u32 sessionId);
|
||||
typedef void(CellSailSourceFuncStop)(u32 pArg);
|
||||
typedef void(CellSailSourceFuncCancel)(u32 pArg);
|
||||
typedef int(CellSailSourceFuncCheckout)(u32 pArg, vm::ptr<CellSailSourceBufferItem> ppItem);
|
||||
typedef int(CellSailSourceFuncCheckin)(u32 pArg, vm::ptr<CellSailSourceBufferItem> pItem);
|
||||
typedef int(CellSailSourceFuncClear)(u32 pArg);
|
||||
typedef int(CellSailSourceFuncRead)(u32 pArg, s32 streamType, u32 pMediaInfo, s8 pUri, u64 offset, u8 pBuf, u32 size, u64 pTotalSize);
|
||||
typedef int(CellSailSourceFuncReadSync)(u32 pArg, s32 streamType, u32 pMediaInfo, s8 pUri, u64 offset, u8 pBuf, u32 size, u64 pTotalSize);
|
||||
typedef int(CellSailSourceFuncGetCapabilities)(u32 pArg, s32 streamType, u32 pMediaInfo, s8 pUri, u64 pCapabilities);
|
||||
typedef int(CellSailSourceFuncInquireCapability)(u32 pArg, s32 streamType, u32 pMediaInfo, s8 pUri, vm::ptr<CellSailSourceStartCommand> pCommand);
|
||||
typedef void(CellSailSourceCheckFuncError)(u32 pArg, s8 pMsg, s32 line);
|
||||
|
||||
typedef int(*CellSailFsFuncOpen)(s8 pPath, s32 flag, s32 pFd, u32 pArg, u64 size);
|
||||
typedef int(*CellSailFsFuncOpenSecond)(s8 pPath, s32 flag, s32 fd, u32 pArg, u64 size);
|
||||
typedef int(*CellSailFsFuncClose)(s32 fd);
|
||||
typedef int(*CellSailFsFuncFstat)(s32 fd, u32 pStat_addr);
|
||||
typedef int(*CellSailFsFuncRead)(s32 fd, u32 pBuf, u64 numBytes, u64 pNumRead);
|
||||
typedef int(*CellSailFsFuncLseek)(s32 fd, s64 offset, s32 whence, u64 pPosition);
|
||||
typedef int(*CellSailFsFuncCancel)(s32 fd);
|
||||
typedef int(CellSailFsFuncOpen)(s8 pPath, s32 flag, s32 pFd, u32 pArg, u64 size);
|
||||
typedef int(CellSailFsFuncOpenSecond)(s8 pPath, s32 flag, s32 fd, u32 pArg, u64 size);
|
||||
typedef int(CellSailFsFuncClose)(s32 fd);
|
||||
typedef int(CellSailFsFuncFstat)(s32 fd, u32 pStat_addr);
|
||||
typedef int(CellSailFsFuncRead)(s32 fd, u32 pBuf, u64 numBytes, u64 pNumRead);
|
||||
typedef int(CellSailFsFuncLseek)(s32 fd, s64 offset, s32 whence, u64 pPosition);
|
||||
typedef int(CellSailFsFuncCancel)(s32 fd);
|
||||
|
||||
typedef int(*CellSailRendererAudioFuncMakeup)(u32 pArg);
|
||||
typedef int(*CellSailRendererAudioFuncCleanup)(u32 pArg);
|
||||
typedef void(*CellSailRendererAudioFuncOpen)(u32 pArg, vm::ptr<CellSailAudioFormat> pInfo, u32 frameNum);
|
||||
typedef void(*CellSailRendererAudioFuncClose)(u32 pArg);
|
||||
typedef void(*CellSailRendererAudioFuncStart)(u32 pArg, bool buffering);
|
||||
typedef void(*CellSailRendererAudioFuncStop)(u32 pArg, bool flush);
|
||||
typedef void(*CellSailRendererAudioFuncCancel)(u32 pArg);
|
||||
typedef int(*CellSailRendererAudioFuncCheckout)(u32 pArg, vm::ptr<CellSailAudioFrameInfo> ppInfo);
|
||||
typedef int(*CellSailRendererAudioFuncCheckin)(u32 pArg, vm::ptr<CellSailAudioFrameInfo> pInfo);
|
||||
typedef int(CellSailRendererAudioFuncMakeup)(u32 pArg);
|
||||
typedef int(CellSailRendererAudioFuncCleanup)(u32 pArg);
|
||||
typedef void(CellSailRendererAudioFuncOpen)(u32 pArg, vm::ptr<CellSailAudioFormat> pInfo, u32 frameNum);
|
||||
typedef void(CellSailRendererAudioFuncClose)(u32 pArg);
|
||||
typedef void(CellSailRendererAudioFuncStart)(u32 pArg, bool buffering);
|
||||
typedef void(CellSailRendererAudioFuncStop)(u32 pArg, bool flush);
|
||||
typedef void(CellSailRendererAudioFuncCancel)(u32 pArg);
|
||||
typedef int(CellSailRendererAudioFuncCheckout)(u32 pArg, vm::ptr<CellSailAudioFrameInfo> ppInfo);
|
||||
typedef int(CellSailRendererAudioFuncCheckin)(u32 pArg, vm::ptr<CellSailAudioFrameInfo> pInfo);
|
||||
|
||||
typedef int(*CellSailRendererVideoFuncMakeup)(u32 pArg);
|
||||
typedef int(*CellSailRendererVideoFuncCleanup)(u32 pArg);
|
||||
typedef void(*CellSailRendererVideoFuncOpen)(u32 pArg, vm::ptr<CellSailVideoFormat> pInfo, u32 frameNum, u32 minFrameNum);
|
||||
typedef void(*CellSailRendererVideoFuncClose)(u32 pArg);
|
||||
typedef void(*CellSailRendererVideoFuncStart)(u32 pArg, bool buffering);
|
||||
typedef void(*CellSailRendererVideoFuncStop)(u32 pArg, bool flush, bool keepRendering);
|
||||
typedef void(*CellSailRendererVideoFuncCancel)(u32 pArg);
|
||||
typedef int(*CellSailRendererVideoFuncCheckout)(u32 pArg, vm::ptr<CellSailVideoFrameInfo> ppInfo);
|
||||
typedef int(*CellSailRendererVideoFuncCheckin)(u32 pArg, vm::ptr<CellSailVideoFrameInfo> pInfo);
|
||||
typedef int(CellSailRendererVideoFuncMakeup)(u32 pArg);
|
||||
typedef int(CellSailRendererVideoFuncCleanup)(u32 pArg);
|
||||
typedef void(CellSailRendererVideoFuncOpen)(u32 pArg, vm::ptr<CellSailVideoFormat> pInfo, u32 frameNum, u32 minFrameNum);
|
||||
typedef void(CellSailRendererVideoFuncClose)(u32 pArg);
|
||||
typedef void(CellSailRendererVideoFuncStart)(u32 pArg, bool buffering);
|
||||
typedef void(CellSailRendererVideoFuncStop)(u32 pArg, bool flush, bool keepRendering);
|
||||
typedef void(CellSailRendererVideoFuncCancel)(u32 pArg);
|
||||
typedef int(CellSailRendererVideoFuncCheckout)(u32 pArg, vm::ptr<CellSailVideoFrameInfo> ppInfo);
|
||||
typedef int(CellSailRendererVideoFuncCheckin)(u32 pArg, vm::ptr<CellSailVideoFrameInfo> pInfo);
|
||||
|
||||
typedef void(*CellSailPlayerFuncNotified)(u32 pArg, vm::ptr<CellSailEvent> event, u64 arg0, u64 arg1);
|
||||
typedef void(CellSailPlayerFuncNotified)(u32 pArg, vm::ptr<CellSailEvent> event, u64 arg0, u64 arg1);
|
||||
|
||||
struct CellSailMemAllocatorFuncs
|
||||
{
|
||||
|
@ -256,11 +256,11 @@ struct CellSaveDataDoneGet
|
||||
|
||||
|
||||
// Callback Functions
|
||||
typedef void(*CellSaveDataFixedCallback)(vm::ptr<CellSaveDataCBResult> cbResult, vm::ptr<CellSaveDataListGet> get, vm::ptr<CellSaveDataFixedSet> set);
|
||||
typedef void(*CellSaveDataListCallback)(vm::ptr<CellSaveDataCBResult> cbResult, vm::ptr<CellSaveDataListGet> get, vm::ptr<CellSaveDataListSet> set);
|
||||
typedef void(*CellSaveDataStatCallback)(vm::ptr<CellSaveDataCBResult> cbResult, vm::ptr<CellSaveDataStatGet> get, vm::ptr<CellSaveDataStatSet> set);
|
||||
typedef void(*CellSaveDataFileCallback)(vm::ptr<CellSaveDataCBResult> cbResult, vm::ptr<CellSaveDataFileGet> get, vm::ptr<CellSaveDataFileSet> set);
|
||||
typedef void(*CellSaveDataDoneCallback)(vm::ptr<CellSaveDataCBResult> cbResult, vm::ptr<CellSaveDataDoneGet> get);
|
||||
typedef void(CellSaveDataFixedCallback)(vm::ptr<CellSaveDataCBResult> cbResult, vm::ptr<CellSaveDataListGet> get, vm::ptr<CellSaveDataFixedSet> set);
|
||||
typedef void(CellSaveDataListCallback)(vm::ptr<CellSaveDataCBResult> cbResult, vm::ptr<CellSaveDataListGet> get, vm::ptr<CellSaveDataListSet> set);
|
||||
typedef void(CellSaveDataStatCallback)(vm::ptr<CellSaveDataCBResult> cbResult, vm::ptr<CellSaveDataStatGet> get, vm::ptr<CellSaveDataStatSet> set);
|
||||
typedef void(CellSaveDataFileCallback)(vm::ptr<CellSaveDataCBResult> cbResult, vm::ptr<CellSaveDataFileGet> get, vm::ptr<CellSaveDataFileSet> set);
|
||||
typedef void(CellSaveDataDoneCallback)(vm::ptr<CellSaveDataCBResult> cbResult, vm::ptr<CellSaveDataDoneGet> get);
|
||||
|
||||
|
||||
// Auxiliary Structs
|
||||
|
@ -206,7 +206,7 @@ struct CellSpursWorkloadFlag
|
||||
atomic_t<u32> flag;
|
||||
};
|
||||
|
||||
typedef void(*CellSpursShutdownCompletionEventHook)(vm::ptr<CellSpurs>, u32 wid, vm::ptr<void> arg);
|
||||
typedef void(CellSpursShutdownCompletionEventHook)(vm::ptr<CellSpurs>, u32 wid, vm::ptr<void> arg);
|
||||
|
||||
// Core CellSpurs structures
|
||||
struct CellSpurs
|
||||
|
@ -1262,7 +1262,7 @@ s32 syncLFQueueCompletePushPointer(vm::ptr<CellSyncLFQueue> queue, s32 pointer,
|
||||
}
|
||||
}
|
||||
|
||||
s32 _cellSyncLFQueueCompletePushPointer(vm::ptr<CellSyncLFQueue> queue, s32 pointer, vm::ptr<s32(*)(u32 addr, u32 arg)> fpSendSignal)
|
||||
s32 _cellSyncLFQueueCompletePushPointer(vm::ptr<CellSyncLFQueue> queue, s32 pointer, vm::ptr<s32(u32 addr, u32 arg)> fpSendSignal)
|
||||
{
|
||||
cellSync->Todo("_cellSyncLFQueueCompletePushPointer(queue_addr=0x%x, pointer=%d, fpSendSignal_addr=0x%x)",
|
||||
queue.addr(), pointer, fpSendSignal.addr());
|
||||
@ -1278,7 +1278,7 @@ s32 syncLFQueueCompletePushPointer2(vm::ptr<CellSyncLFQueue> queue, s32 pointer,
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 _cellSyncLFQueueCompletePushPointer2(vm::ptr<CellSyncLFQueue> queue, s32 pointer, vm::ptr<s32(*)(u32 addr, u32 arg)> fpSendSignal)
|
||||
s32 _cellSyncLFQueueCompletePushPointer2(vm::ptr<CellSyncLFQueue> queue, s32 pointer, vm::ptr<s32(u32 addr, u32 arg)> fpSendSignal)
|
||||
{
|
||||
// arguments copied from _cellSyncLFQueueCompletePushPointer
|
||||
cellSync->Todo("_cellSyncLFQueueCompletePushPointer2(queue_addr=0x%x, pointer=%d, fpSendSignal_addr=0x%x)",
|
||||
@ -1638,7 +1638,7 @@ s32 syncLFQueueCompletePopPointer(vm::ptr<CellSyncLFQueue> queue, s32 pointer, c
|
||||
}
|
||||
}
|
||||
|
||||
s32 _cellSyncLFQueueCompletePopPointer(vm::ptr<CellSyncLFQueue> queue, s32 pointer, vm::ptr<s32(*)(u32 addr, u32 arg)> fpSendSignal, u32 noQueueFull)
|
||||
s32 _cellSyncLFQueueCompletePopPointer(vm::ptr<CellSyncLFQueue> queue, s32 pointer, vm::ptr<s32(u32 addr, u32 arg)> fpSendSignal, u32 noQueueFull)
|
||||
{
|
||||
// arguments copied from _cellSyncLFQueueCompletePushPointer + unknown argument (noQueueFull taken from LFQueue2CompletePopPointer)
|
||||
cellSync->Todo("_cellSyncLFQueueCompletePopPointer(queue_addr=0x%x, pointer=%d, fpSendSignal_addr=0x%x, noQueueFull=%d)",
|
||||
@ -1655,7 +1655,7 @@ s32 syncLFQueueCompletePopPointer2(vm::ptr<CellSyncLFQueue> queue, s32 pointer,
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 _cellSyncLFQueueCompletePopPointer2(vm::ptr<CellSyncLFQueue> queue, s32 pointer, vm::ptr<s32(*)(u32 addr, u32 arg)> fpSendSignal, u32 noQueueFull)
|
||||
s32 _cellSyncLFQueueCompletePopPointer2(vm::ptr<CellSyncLFQueue> queue, s32 pointer, vm::ptr<s32(u32 addr, u32 arg)> fpSendSignal, u32 noQueueFull)
|
||||
{
|
||||
// arguments copied from _cellSyncLFQueueCompletePopPointer
|
||||
cellSync->Todo("_cellSyncLFQueueCompletePopPointer2(queue_addr=0x%x, pointer=%d, fpSendSignal_addr=0x%x, noQueueFull=%d)",
|
||||
|
@ -19,7 +19,7 @@
|
||||
#include "cellGame.h"
|
||||
#include "cellSysutil.h"
|
||||
|
||||
typedef void (*CellHddGameStatCallback)(vm::ptr<CellHddGameCBResult> cbResult, vm::ptr<CellHddGameStatGet> get, vm::ptr<CellHddGameStatSet> set);
|
||||
typedef void (CellHddGameStatCallback)(vm::ptr<CellHddGameCBResult> cbResult, vm::ptr<CellHddGameStatGet> get, vm::ptr<CellHddGameStatSet> set);
|
||||
|
||||
Module *cellSysutil = nullptr;
|
||||
|
||||
@ -835,10 +835,10 @@ int cellWebBrowserEstimate2(const vm::ptr<const CellWebBrowserConfig2> config, v
|
||||
}
|
||||
|
||||
extern int cellGameDataCheckCreate2(PPUThread& CPU, u32 version, vm::ptr<const char> dirName, u32 errDialog,
|
||||
vm::ptr<void(*)(vm::ptr<CellGameDataCBResult> cbResult, vm::ptr<CellGameDataStatGet> get, vm::ptr<CellGameDataStatSet> set)> funcStat, u32 container);
|
||||
vm::ptr<void(vm::ptr<CellGameDataCBResult> cbResult, vm::ptr<CellGameDataStatGet> get, vm::ptr<CellGameDataStatSet> set)> funcStat, u32 container);
|
||||
|
||||
extern int cellGameDataCheckCreate(PPUThread& CPU, u32 version, vm::ptr<const char> dirName, u32 errDialog,
|
||||
vm::ptr<void(*)(vm::ptr<CellGameDataCBResult> cbResult, vm::ptr<CellGameDataStatGet> get, vm::ptr<CellGameDataStatSet> set)> funcStat, u32 container);
|
||||
vm::ptr<void(vm::ptr<CellGameDataCBResult> cbResult, vm::ptr<CellGameDataStatGet> get, vm::ptr<CellGameDataStatSet> set)> funcStat, u32 container);
|
||||
|
||||
extern void cellSysutil_SaveData_init();
|
||||
|
||||
|
@ -78,7 +78,7 @@ enum
|
||||
CELL_SYSUTIL_SYSCHAT_VOICE_STREAMING_PAUSED = 0x0164,
|
||||
};
|
||||
|
||||
typedef void(*CellSysutilCallback)(u64 status, u64 param, vm::ptr<void> userdata);
|
||||
typedef void(CellSysutilCallback)(u64 status, u64 param, vm::ptr<void> userdata);
|
||||
|
||||
void sysutilSendSystemCommand(u64 status, u64 param);
|
||||
|
||||
@ -238,16 +238,16 @@ struct CellHddGameCBResult
|
||||
};
|
||||
|
||||
typedef s32 CellWebBrowserId;
|
||||
typedef void* CellWebBrowserClientSession;
|
||||
typedef void(*CellWebBrowserCallback)(s32 cb_type, vm::ptr<CellWebBrowserClientSession>, vm::ptr<void> usrdata);
|
||||
typedef void(*CellWebComponentCallback)(CellWebBrowserId, s32 cb_type, vm::ptr<CellWebBrowserClientSession>, vm::ptr<void> usrdata);
|
||||
typedef void(*CellWebBrowserSystemCallback)(s32 cb_type, vm::ptr<void> usrdata);
|
||||
typedef vm::ptr<void> CellWebBrowserClientSession;
|
||||
typedef void(CellWebBrowserCallback)(s32 cb_type, CellWebBrowserClientSession, vm::ptr<void> usrdata);
|
||||
typedef void(CellWebComponentCallback)(CellWebBrowserId, s32 cb_type, CellWebBrowserClientSession, vm::ptr<void> usrdata);
|
||||
typedef void(CellWebBrowserSystemCallback)(s32 cb_type, vm::ptr<void> usrdata);
|
||||
|
||||
typedef void(*CellWebBrowserMIMETypeCallback)(vm::ptr<const char> mimetype, vm::ptr<const char> url, vm::ptr<void> usrdata);
|
||||
typedef void(*CellWebBrowserErrorCallback)(s32 err_type, vm::ptr<void> usrdata);
|
||||
typedef void(*CellWebBrowserStatusCallback)(s32 err_type, vm::ptr<void> usrdata);
|
||||
typedef void(*CellWebBrowserNotify)(vm::ptr<const char> message, vm::ptr<void> usrdata);
|
||||
typedef void(*CellWebBrowserUsrdata)(vm::ptr<void> usrdata);
|
||||
typedef void(CellWebBrowserMIMETypeCallback)(vm::ptr<const char> mimetype, vm::ptr<const char> url, vm::ptr<void> usrdata);
|
||||
typedef void(CellWebBrowserErrorCallback)(s32 err_type, vm::ptr<void> usrdata);
|
||||
typedef void(CellWebBrowserStatusCallback)(s32 err_type, vm::ptr<void> usrdata);
|
||||
typedef void(CellWebBrowserNotify)(vm::ptr<const char> message, vm::ptr<void> usrdata);
|
||||
typedef void(CellWebBrowserUsrdata)(vm::ptr<void> usrdata);
|
||||
|
||||
struct CellWebBrowserMimeSet
|
||||
{
|
||||
|
@ -163,7 +163,7 @@ struct CellVdecPicFormat
|
||||
u8 alpha;
|
||||
};
|
||||
|
||||
typedef u32(*CellVdecCbMsg)(u32 handle, CellVdecMsgType msgType, s32 msgData, u32 cbArg);
|
||||
typedef u32(CellVdecCbMsg)(u32 handle, CellVdecMsgType msgType, s32 msgData, u32 cbArg);
|
||||
|
||||
// Callback Function Information
|
||||
struct CellVdecCb
|
||||
|
@ -110,7 +110,7 @@ enum
|
||||
CELL_SSPLAYER_STATE_ON = 0x20,
|
||||
};
|
||||
|
||||
typedef s32(*CellSurMixerNotifyCallbackFunction)(vm::ptr<void> arg, u32 counter, u32 samples);
|
||||
typedef s32(CellSurMixerNotifyCallbackFunction)(vm::ptr<void> arg, u32 counter, u32 samples);
|
||||
|
||||
struct CellSSPlayerConfig
|
||||
{
|
||||
|
@ -134,4 +134,4 @@ enum
|
||||
SCE_NP_TROPHY_STATUS_CHANGES_DETECTED = 9,
|
||||
};
|
||||
|
||||
typedef s32 (*SceNpTrophyStatusCallback)(u32 context, u32 status, s32 completed, s32 total, u32 arg_addr);
|
||||
typedef s32 (SceNpTrophyStatusCallback)(u32 context, u32 status, s32 completed, s32 total, u32 arg_addr);
|
||||
|
@ -14,7 +14,7 @@ struct HeapInfo
|
||||
}
|
||||
};
|
||||
|
||||
typedef s32(*spu_printf_cb_t)(u32 arg);
|
||||
typedef s32(spu_printf_cb_t)(u32 arg);
|
||||
|
||||
// Aux
|
||||
extern vm::ptr<spu_printf_cb_t> spu_printf_agcb;
|
||||
|
@ -738,7 +738,7 @@ s32 cellFsStReadWait(u32 fd, u64 size)
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellFsStReadWaitCallback(u32 fd, u64 size, vm::ptr<void (*)(int xfd, u64 xsize)> func)
|
||||
s32 cellFsStReadWaitCallback(u32 fd, u64 size, vm::ptr<void(int xfd, u64 xsize)> func)
|
||||
{
|
||||
sys_fs->Todo("cellFsStReadWaitCallback(fd=0x%x, size=0x%llx, func=0x%x)", fd, size, func);
|
||||
|
||||
@ -886,7 +886,7 @@ std::atomic<s32> g_FsAioReadID(0);
|
||||
std::atomic<s32> g_FsAioReadCur(0);
|
||||
bool aio_init = false;
|
||||
|
||||
void fsAioRead(u32 fd, vm::ptr<CellFsAio> aio, int xid, vm::ptr<void(*)(vm::ptr<CellFsAio> xaio, int error, int xid, u64 size)> func)
|
||||
void fsAioRead(u32 fd, vm::ptr<CellFsAio> aio, int xid, vm::ptr<void(vm::ptr<CellFsAio> xaio, int error, int xid, u64 size)> func)
|
||||
{
|
||||
while (g_FsAioReadCur != xid)
|
||||
{
|
||||
@ -941,7 +941,7 @@ void fsAioRead(u32 fd, vm::ptr<CellFsAio> aio, int xid, vm::ptr<void(*)(vm::ptr<
|
||||
g_FsAioReadCur++;
|
||||
}
|
||||
|
||||
s32 cellFsAioRead(vm::ptr<CellFsAio> aio, vm::ptr<s32> id, vm::ptr<void(*)(vm::ptr<CellFsAio> xaio, s32 error, s32 xid, u64 size)> func)
|
||||
s32 cellFsAioRead(vm::ptr<CellFsAio> aio, vm::ptr<s32> id, vm::ptr<void(vm::ptr<CellFsAio> xaio, s32 error, s32 xid, u64 size)> func)
|
||||
{
|
||||
sys_fs->Warning("cellFsAioRead(aio=0x%x, id=0x%x, func=0x%x)", aio, id, func);
|
||||
|
||||
@ -966,7 +966,7 @@ s32 cellFsAioRead(vm::ptr<CellFsAio> aio, vm::ptr<s32> id, vm::ptr<void(*)(vm::p
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellFsAioWrite(vm::ptr<CellFsAio> aio, vm::ptr<s32> id, vm::ptr<void(*)(vm::ptr<CellFsAio> xaio, s32 error, s32 xid, u64 size)> func)
|
||||
s32 cellFsAioWrite(vm::ptr<CellFsAio> aio, vm::ptr<s32> id, vm::ptr<void(vm::ptr<CellFsAio> xaio, s32 error, s32 xid, u64 size)> func)
|
||||
{
|
||||
sys_fs->Todo("cellFsAioWrite(aio=0x%x, id=0x%x, func=0x%x)", aio, id, func);
|
||||
|
||||
|
@ -210,10 +210,12 @@ s32 sys_ppu_thread_create(vm::ptr<u64> thread_id, u32 entry, u64 arg, s32 prio,
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
void sys_ppu_thread_once(PPUThread& CPU, vm::ptr<atomic_t<u32>> once_ctrl, vm::ptr<void(*)()> init)
|
||||
void sys_ppu_thread_once(PPUThread& CPU, vm::ptr<atomic_t<u32>> once_ctrl, vm::ptr<void()> init)
|
||||
{
|
||||
sys_ppu_thread.Warning("sys_ppu_thread_once(once_ctrl_addr=0x%x, init_addr=0x%x)", once_ctrl.addr(), init.addr());
|
||||
|
||||
LV2_LOCK(0);
|
||||
|
||||
if (once_ctrl->compare_and_swap_test(be_t<u32>::make(SYS_PPU_THREAD_ONCE_INIT), be_t<u32>::make(SYS_PPU_THREAD_DONE_INIT)))
|
||||
{
|
||||
init(CPU);
|
||||
|
@ -30,6 +30,6 @@ s32 sys_ppu_thread_get_stack_information(PPUThread& CPU, u32 info_addr);
|
||||
s32 sys_ppu_thread_stop(u64 thread_id);
|
||||
s32 sys_ppu_thread_restart(u64 thread_id);
|
||||
s32 sys_ppu_thread_create(vm::ptr<u64> thread_id, u32 entry, u64 arg, s32 prio, u32 stacksize, u64 flags, vm::ptr<const char> threadname);
|
||||
void sys_ppu_thread_once(PPUThread& CPU, vm::ptr<atomic_t<u32>> once_ctrl, vm::ptr<void(*)()> init);
|
||||
void sys_ppu_thread_once(PPUThread& CPU, vm::ptr<atomic_t<u32>> once_ctrl, vm::ptr<void()> init);
|
||||
s32 sys_ppu_thread_get_id(PPUThread& CPU, vm::ptr<u64> thread_id);
|
||||
s32 sys_ppu_thread_rename(u64 thread_id, vm::ptr<const char> name);
|
||||
|
@ -325,7 +325,7 @@ namespace loader
|
||||
|
||||
for (auto &e : m.second.exports)
|
||||
{
|
||||
module->RegisterLLEFunc(e.first, vm::ptr<void(*)()>::make(e.second));
|
||||
module->RegisterLLEFunc(e.first, vm::ptr<void()>::make(e.second));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -285,6 +285,7 @@
|
||||
<ClInclude Include="Emu\ARMv7\ARMv7Thread.h" />
|
||||
<ClInclude Include="Emu\ARMv7\Modules\psv_event_flag.h" />
|
||||
<ClInclude Include="Emu\ARMv7\Modules\psv_sema.h" />
|
||||
<ClInclude Include="Emu\ARMv7\Modules\sceGxm.h" />
|
||||
<ClInclude Include="Emu\ARMv7\Modules\sceLibKernel.h" />
|
||||
<ClInclude Include="Emu\ARMv7\PSVFuncList.h" />
|
||||
<ClInclude Include="Emu\ARMv7\PSVObjectList.h" />
|
||||
|
@ -1333,5 +1333,8 @@
|
||||
<ClInclude Include="Emu\ARMv7\Modules\psv_sema.h">
|
||||
<Filter>Emu\CPU\ARMv7\Objects</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\ARMv7\Modules\sceGxm.h">
|
||||
<Filter>Emu\CPU\ARMv7\Modules</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
Loading…
x
Reference in New Issue
Block a user