mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-21 12:05:23 +00:00
commit
b08c3186be
389 changed files with 21483 additions and 20147 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -70,3 +70,6 @@ rpcs3/x64/*
|
|||
|
||||
.DS_Store
|
||||
rpcs3/Emu/SysCalls/Modules/prx_*.h
|
||||
|
||||
/CMakeFiles/
|
||||
CMakeCache.txt
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#pragma once
|
||||
|
||||
#define IS_LE_MACHINE
|
||||
#define IS_LE_MACHINE // only draft
|
||||
|
||||
union u128
|
||||
{
|
||||
|
@ -165,13 +165,6 @@ union u128
|
|||
|
||||
} _bit;
|
||||
|
||||
//operator u64() const { return _u64[0]; }
|
||||
//operator u32() const { return _u32[0]; }
|
||||
//operator u16() const { return _u16[0]; }
|
||||
//operator u8() const { return _u8[0]; }
|
||||
|
||||
//operator bool() const { return _u64[0] != 0 || _u64[1] != 0; }
|
||||
|
||||
static u128 from64(u64 _0, u64 _1 = 0)
|
||||
{
|
||||
u128 ret;
|
||||
|
@ -334,26 +327,6 @@ union u128
|
|||
return (_u64[0] != right._u64[0]) || (_u64[1] != right._u64[1]);
|
||||
}
|
||||
|
||||
force_inline u128 operator | (const u128& right) const
|
||||
{
|
||||
return fromV(_mm_or_si128(vi, right.vi));
|
||||
}
|
||||
|
||||
force_inline u128 operator & (const u128& right) const
|
||||
{
|
||||
return fromV(_mm_and_si128(vi, right.vi));
|
||||
}
|
||||
|
||||
force_inline u128 operator ^ (const u128& right) const
|
||||
{
|
||||
return fromV(_mm_xor_si128(vi, right.vi));
|
||||
}
|
||||
|
||||
u128 operator ~ () const
|
||||
{
|
||||
return from64(~_u64[0], ~_u64[1]);
|
||||
}
|
||||
|
||||
force_inline bool is_any_1() const // check if any bit is 1
|
||||
{
|
||||
return _u64[0] || _u64[1];
|
||||
|
@ -381,14 +354,31 @@ union u128
|
|||
|
||||
static force_inline u128 byteswap(const u128 val)
|
||||
{
|
||||
u128 ret;
|
||||
ret._u64[0] = _byteswap_uint64(val._u64[1]);
|
||||
ret._u64[1] = _byteswap_uint64(val._u64[0]);
|
||||
return ret;
|
||||
return fromV(_mm_shuffle_epi8(val.vi, _mm_set_epi8(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)));
|
||||
}
|
||||
};
|
||||
|
||||
static_assert(__alignof(u128) == 16 && sizeof(u128) == 16, "Wrong u128 size or alignment");
|
||||
CHECK_SIZE_ALIGN(u128, 16, 16);
|
||||
|
||||
inline u128 operator |(const u128& left, const u128& right)
|
||||
{
|
||||
return u128::fromV(_mm_or_si128(left.vi, right.vi));
|
||||
}
|
||||
|
||||
inline u128 operator &(const u128& left, const u128& right)
|
||||
{
|
||||
return u128::fromV(_mm_and_si128(left.vi, right.vi));
|
||||
}
|
||||
|
||||
inline u128 operator ^(const u128& left, const u128& right)
|
||||
{
|
||||
return u128::fromV(_mm_xor_si128(left.vi, right.vi));
|
||||
}
|
||||
|
||||
inline u128 operator ~(const u128& other)
|
||||
{
|
||||
return u128::from64(~other._u64[0], ~other._u64[1]);
|
||||
}
|
||||
|
||||
static force_inline u128 sync_val_compare_and_swap(volatile u128* dest, u128 comp, u128 exch)
|
||||
{
|
||||
|
@ -446,34 +436,16 @@ static force_inline u128 sync_fetch_and_xor(volatile u128* dest, u128 value)
|
|||
}
|
||||
}
|
||||
|
||||
#define re16(val) _byteswap_ushort(val)
|
||||
#define re32(val) _byteswap_ulong(val)
|
||||
#define re64(val) _byteswap_uint64(val)
|
||||
#define re128(val) u128::byteswap(val)
|
||||
|
||||
template<typename T, int size = sizeof(T)> struct se_t;
|
||||
|
||||
template<typename T> struct se_t<T, 1>
|
||||
{
|
||||
static force_inline u8 to_be(const T& src)
|
||||
{
|
||||
return (u8&)src;
|
||||
}
|
||||
|
||||
static force_inline T from_be(const u8 src)
|
||||
{
|
||||
return (T&)src;
|
||||
}
|
||||
};
|
||||
template<typename T, std::size_t Size = sizeof(T)> struct se_t;
|
||||
|
||||
template<typename T> struct se_t<T, 2>
|
||||
{
|
||||
static force_inline u16 to_be(const T& src)
|
||||
static force_inline u16 to(const T& src)
|
||||
{
|
||||
return _byteswap_ushort((u16&)src);
|
||||
}
|
||||
|
||||
static force_inline T from_be(const u16 src)
|
||||
static force_inline T from(const u16 src)
|
||||
{
|
||||
const u16 res = _byteswap_ushort(src);
|
||||
return (T&)res;
|
||||
|
@ -482,12 +454,12 @@ template<typename T> struct se_t<T, 2>
|
|||
|
||||
template<typename T> struct se_t<T, 4>
|
||||
{
|
||||
static force_inline u32 to_be(const T& src)
|
||||
static force_inline u32 to(const T& src)
|
||||
{
|
||||
return _byteswap_ulong((u32&)src);
|
||||
}
|
||||
|
||||
static force_inline T from_be(const u32 src)
|
||||
static force_inline T from(const u32 src)
|
||||
{
|
||||
const u32 res = _byteswap_ulong(src);
|
||||
return (T&)res;
|
||||
|
@ -496,12 +468,12 @@ template<typename T> struct se_t<T, 4>
|
|||
|
||||
template<typename T> struct se_t<T, 8>
|
||||
{
|
||||
static force_inline u64 to_be(const T& src)
|
||||
static force_inline u64 to(const T& src)
|
||||
{
|
||||
return _byteswap_uint64((u64&)src);
|
||||
}
|
||||
|
||||
static force_inline T from_be(const u64 src)
|
||||
static force_inline T from(const u64 src)
|
||||
{
|
||||
const u64 res = _byteswap_uint64(src);
|
||||
return (T&)res;
|
||||
|
@ -510,28 +482,25 @@ template<typename T> struct se_t<T, 8>
|
|||
|
||||
template<typename T> struct se_t<T, 16>
|
||||
{
|
||||
static force_inline u128 to_be(const T& src)
|
||||
static force_inline u128 to(const T& src)
|
||||
{
|
||||
return u128::byteswap((u128&)src);
|
||||
}
|
||||
|
||||
static force_inline T from_be(const u128& src)
|
||||
static force_inline T from(const u128& src)
|
||||
{
|
||||
const u128 res = u128::byteswap(src);
|
||||
return (T&)res;
|
||||
}
|
||||
};
|
||||
|
||||
template<typename T, T _value, size_t size = sizeof(T)> struct const_se_t;
|
||||
|
||||
template<u8 _value> struct const_se_t<u8, _value, 1>
|
||||
{
|
||||
static const u8 value = _value;
|
||||
};
|
||||
template<typename T, T _value, std::size_t size = sizeof(T)> struct const_se_t;
|
||||
|
||||
template<u16 _value> struct const_se_t<u16, _value, 2>
|
||||
{
|
||||
static const u16 value = ((_value >> 8) & 0xff) | ((_value << 8) & 0xff00);
|
||||
static const u16 value =
|
||||
((_value >> 8) & 0x00ff) |
|
||||
((_value << 8) & 0xff00);
|
||||
};
|
||||
|
||||
template<u32 _value> struct const_se_t<u32, _value, 4>
|
||||
|
@ -583,22 +552,9 @@ template<typename T> struct be_storage<T, 16>
|
|||
|
||||
template<typename T> using be_storage_t = typename be_storage<T>::type;
|
||||
|
||||
template<typename T>
|
||||
struct be_t
|
||||
template<typename T> class be_t
|
||||
{
|
||||
using type = std::remove_cv_t<T>;
|
||||
using stype = be_storage_t<std::remove_cv_t<T>>;
|
||||
|
||||
stype m_data;
|
||||
|
||||
static_assert(!std::is_class<type>::value, "be_t<> error: invalid type (class or structure)");
|
||||
static_assert(!std::is_union<type>::value || std::is_same<type, u128>::value, "be_t<> error: invalid type (union)");
|
||||
static_assert(!std::is_pointer<type>::value, "be_t<> error: invalid type (pointer)");
|
||||
static_assert(!std::is_reference<type>::value, "be_t<> error: invalid type (reference)");
|
||||
static_assert(!std::is_array<type>::value, "be_t<> error: invalid type (array)");
|
||||
static_assert(__alignof(type) == __alignof(stype), "be_t<> error: unexpected alignment");
|
||||
|
||||
private:
|
||||
// TODO (complicated cases like int-float conversions are not handled correctly)
|
||||
template<typename Tto, typename Tfrom, int mode>
|
||||
struct _convert
|
||||
{
|
||||
|
@ -624,78 +580,76 @@ private:
|
|||
{
|
||||
static force_inline be_t<Tto>& func(Tfrom& be_value)
|
||||
{
|
||||
Tto res = be_value >> ((sizeof(Tfrom)-sizeof(Tto)) * 8);
|
||||
Tto res = be_value >> ((sizeof(Tfrom) - sizeof(Tto)) * 8);
|
||||
return (be_t<Tto>&)res;
|
||||
}
|
||||
};
|
||||
|
||||
const stype& ToBE() const
|
||||
{
|
||||
return m_data;
|
||||
}
|
||||
|
||||
type ToLE() const
|
||||
{
|
||||
return se_t<type, sizeof(stype)>::from_be(m_data);
|
||||
}
|
||||
|
||||
void FromBE(const stype& value)
|
||||
{
|
||||
m_data = value;
|
||||
}
|
||||
|
||||
void FromLE(const type& value)
|
||||
{
|
||||
m_data = se_t<type, sizeof(stype)>::to_be(value);
|
||||
}
|
||||
|
||||
static be_t MakeFromLE(const type& value)
|
||||
{
|
||||
stype data = se_t<type, sizeof(stype)>::to_be(value);
|
||||
return (be_t&)data;
|
||||
}
|
||||
|
||||
static be_t MakeFromBE(const stype& value)
|
||||
{
|
||||
return (be_t&)value;
|
||||
}
|
||||
|
||||
public:
|
||||
//make be_t from current machine byte ordering
|
||||
static be_t make(const type& value)
|
||||
{
|
||||
using type = std::remove_cv_t<T>;
|
||||
using stype = be_storage_t<std::remove_cv_t<T>>;
|
||||
|
||||
#ifdef IS_LE_MACHINE
|
||||
return MakeFromLE(value);
|
||||
stype m_data; // don't access directly
|
||||
#else
|
||||
return MakeFromBE(value);
|
||||
type m_data; // don't access directly
|
||||
#endif
|
||||
|
||||
static_assert(!std::is_class<type>::value, "be_t<> error: invalid type (class or structure)");
|
||||
static_assert(!std::is_union<type>::value || std::is_same<type, u128>::value, "be_t<> error: invalid type (union)");
|
||||
static_assert(!std::is_pointer<type>::value, "be_t<> error: invalid type (pointer)");
|
||||
static_assert(!std::is_reference<type>::value, "be_t<> error: invalid type (reference)");
|
||||
static_assert(!std::is_array<type>::value, "be_t<> error: invalid type (array)");
|
||||
static_assert(!std::is_enum<type>::value, "be_t<> error: invalid type (enumeration), use integral type instead");
|
||||
static_assert(__alignof(type) == __alignof(stype), "be_t<> error: unexpected alignment");
|
||||
|
||||
be_t() = default;
|
||||
|
||||
be_t(const be_t&) = default;
|
||||
|
||||
template<typename = std::enable_if_t<std::is_constructible<type, type>::value>> be_t(const type& value)
|
||||
#ifdef IS_LE_MACHINE
|
||||
: m_data(se_t<type, sizeof(stype)>::to(value))
|
||||
#else
|
||||
: m_data(value)
|
||||
#endif
|
||||
{
|
||||
}
|
||||
|
||||
//get value in current machine byte ordering
|
||||
// get value in current machine byte ordering
|
||||
force_inline type value() const
|
||||
{
|
||||
#ifdef IS_LE_MACHINE
|
||||
return ToLE();
|
||||
return se_t<type, sizeof(stype)>::from(m_data);
|
||||
#else
|
||||
return ToBE();
|
||||
return m_data;
|
||||
#endif
|
||||
}
|
||||
|
||||
// get underlying data without any byte order manipulation
|
||||
const stype& data() const
|
||||
{
|
||||
return ToBE();
|
||||
#ifdef IS_LE_MACHINE
|
||||
return m_data;
|
||||
#else
|
||||
return reinterpret_cast<const stype&>(m_data);
|
||||
#endif
|
||||
}
|
||||
|
||||
be_t& operator =(const be_t& value) = default;
|
||||
be_t& operator =(const be_t&) = default;
|
||||
|
||||
template<typename CT> std::enable_if_t<std::is_assignable<type&, CT>::value, be_t&> operator =(const CT& value)
|
||||
{
|
||||
m_data = se_t<type, sizeof(stype)>::to_be(value);
|
||||
#ifdef IS_LE_MACHINE
|
||||
m_data = se_t<type, sizeof(stype)>::to(value);
|
||||
#else
|
||||
m_data = value;
|
||||
#endif
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
//template<typename CT, std::enable_if_t<std::is_convertible<type, CT>::value>> operator CT() const
|
||||
//template<typename CT, typename = std::enable_if_t<std::is_convertible<type, CT>::value>> operator CT() const
|
||||
//{
|
||||
// return value();
|
||||
//}
|
||||
|
@ -706,58 +660,69 @@ public:
|
|||
}
|
||||
|
||||
// conversion to another be_t type
|
||||
template<typename T1> operator be_t<T1>() const
|
||||
{
|
||||
return be_t<T1>::make(value());
|
||||
//template<typename T1> operator be_t<T1>() const
|
||||
//{
|
||||
// return value();
|
||||
// //return _convert<T1, T, ((sizeof(T1) > sizeof(T)) ? 1 : (sizeof(T1) < sizeof(T) ? 2 : 0))>::func(m_data);
|
||||
//}
|
||||
|
||||
// TODO (complicated cases like int-float conversions are not handled correctly)
|
||||
//return _convert<T1, T, ((sizeof(T1) > sizeof(T)) ? 1 : (sizeof(T1) < sizeof(T) ? 2 : 0))>::func(m_data);
|
||||
}
|
||||
template<typename T1> be_t& operator +=(const T1& right) { return *this = value() + right; }
|
||||
template<typename T1> be_t& operator -=(const T1& right) { return *this = value() - right; }
|
||||
template<typename T1> be_t& operator *=(const T1& right) { return *this = value() * right; }
|
||||
template<typename T1> be_t& operator /=(const T1& right) { return *this = value() / right; }
|
||||
template<typename T1> be_t& operator %=(const T1& right) { return *this = value() % right; }
|
||||
|
||||
template<typename T1> be_t& operator += (T1 right) { return *this = value() + right; }
|
||||
template<typename T1> be_t& operator -= (T1 right) { return *this = value() - right; }
|
||||
template<typename T1> be_t& operator *= (T1 right) { return *this = value() * right; }
|
||||
template<typename T1> be_t& operator /= (T1 right) { return *this = value() / right; }
|
||||
template<typename T1> be_t& operator %= (T1 right) { return *this = value() % right; }
|
||||
template<typename T1> be_t& operator &= (T1 right) { return *this = value() & right; }
|
||||
template<typename T1> be_t& operator |= (T1 right) { return *this = value() | right; }
|
||||
template<typename T1> be_t& operator ^= (T1 right) { return *this = value() ^ right; }
|
||||
template<typename T1> be_t& operator <<= (T1 right) { return *this = value() << right; }
|
||||
template<typename T1> be_t& operator >>= (T1 right) { return *this = value() >> right; }
|
||||
template<typename T1> be_t& operator <<=(const T1& right) { return *this = value() << right; }
|
||||
template<typename T1> be_t& operator >>=(const T1& right) { return *this = value() >> right; }
|
||||
|
||||
template<typename T1> be_t& operator += (const be_t<T1>& right) { return *this = ToLE() + right.ToLE(); }
|
||||
template<typename T1> be_t& operator -= (const be_t<T1>& right) { return *this = ToLE() - right.ToLE(); }
|
||||
template<typename T1> be_t& operator *= (const be_t<T1>& right) { return *this = ToLE() * right.ToLE(); }
|
||||
template<typename T1> be_t& operator /= (const be_t<T1>& right) { return *this = ToLE() / right.ToLE(); }
|
||||
template<typename T1> be_t& operator %= (const be_t<T1>& right) { return *this = ToLE() % right.ToLE(); }
|
||||
template<typename T1> be_t& operator &= (const be_t<T1>& right) { return *this = ToBE() & right.ToBE(); }
|
||||
template<typename T1> be_t& operator |= (const be_t<T1>& right) { return *this = ToBE() | right.ToBE(); }
|
||||
template<typename T1> be_t& operator ^= (const be_t<T1>& right) { return *this = ToBE() ^ right.ToBE(); }
|
||||
template<typename T1> be_t& operator &=(const T1& right) { return m_data &= be_t(right).data(), *this; }
|
||||
template<typename T1> be_t& operator |=(const T1& right) { return m_data |= be_t(right).data(), *this; }
|
||||
template<typename T1> be_t& operator ^=(const T1& right) { return m_data ^= be_t(right).data(), *this; }
|
||||
|
||||
template<typename T1> be_t operator & (const be_t<T1>& right) const { be_t res; res.FromBE(ToBE() & right.ToBE()); return res; }
|
||||
template<typename T1> be_t operator | (const be_t<T1>& right) const { be_t res; res.FromBE(ToBE() | right.ToBE()); return res; }
|
||||
template<typename T1> be_t operator ^ (const be_t<T1>& right) const { be_t res; res.FromBE(ToBE() ^ right.ToBE()); return res; }
|
||||
|
||||
template<typename T1> bool operator == (T1 right) const { return (T1)ToLE() == right; }
|
||||
template<typename T1> bool operator != (T1 right) const { return !(*this == right); }
|
||||
template<typename T1> bool operator > (T1 right) const { return (T1)ToLE() > right; }
|
||||
template<typename T1> bool operator < (T1 right) const { return (T1)ToLE() < right; }
|
||||
template<typename T1> bool operator >= (T1 right) const { return (T1)ToLE() >= right; }
|
||||
template<typename T1> bool operator <= (T1 right) const { return (T1)ToLE() <= right; }
|
||||
|
||||
template<typename T1> bool operator == (const be_t<T1>& right) const { return ToBE() == right.ToBE(); }
|
||||
template<typename T1> bool operator != (const be_t<T1>& right) const { return !(*this == right); }
|
||||
template<typename T1> bool operator > (const be_t<T1>& right) const { return (T1)ToLE() > right.ToLE(); }
|
||||
template<typename T1> bool operator < (const be_t<T1>& right) const { return (T1)ToLE() < right.ToLE(); }
|
||||
template<typename T1> bool operator >= (const be_t<T1>& right) const { return (T1)ToLE() >= right.ToLE(); }
|
||||
template<typename T1> bool operator <= (const be_t<T1>& right) const { return (T1)ToLE() <= right.ToLE(); }
|
||||
|
||||
be_t operator++ (int) { be_t res = *this; *this += 1; return res; }
|
||||
be_t operator-- (int) { be_t res = *this; *this -= 1; return res; }
|
||||
be_t& operator++ () { *this += 1; return *this; }
|
||||
be_t& operator-- () { *this -= 1; return *this; }
|
||||
be_t operator ++(int) { be_t res = *this; *this += 1; return res; }
|
||||
be_t operator --(int) { be_t res = *this; *this -= 1; return res; }
|
||||
be_t& operator ++() { *this += 1; return *this; }
|
||||
be_t& operator --() { *this -= 1; return *this; }
|
||||
};
|
||||
|
||||
template<typename T1, typename T2> inline std::enable_if_t<std::is_same<T1, T2>::value && std::is_integral<T1>::value, bool> operator ==(const be_t<T1>& left, const be_t<T2>& right)
|
||||
{
|
||||
return left.data() == right.data();
|
||||
}
|
||||
|
||||
template<typename T1, typename T2> inline std::enable_if_t<std::is_same<T1, T2>::value && std::is_integral<T1>::value, bool> operator !=(const be_t<T1>& left, const be_t<T2>& right)
|
||||
{
|
||||
return left.data() != right.data();
|
||||
}
|
||||
|
||||
template<typename T1, typename T2> inline std::enable_if_t<std::is_same<T1, T2>::value && std::is_integral<T1>::value, be_t<T1>> operator &(const be_t<T1>& left, const be_t<T2>& right)
|
||||
{
|
||||
be_t<T1> result;
|
||||
result.m_data = left.data() & right.data();
|
||||
return result;
|
||||
}
|
||||
|
||||
template<typename T1, typename T2> inline std::enable_if_t<std::is_same<T1, T2>::value && std::is_integral<T1>::value, be_t<T1>> operator |(const be_t<T1>& left, const be_t<T2>& right)
|
||||
{
|
||||
be_t<T1> result;
|
||||
result.m_data = left.data() | right.data();
|
||||
return result;
|
||||
}
|
||||
|
||||
template<typename T1, typename T2> inline std::enable_if_t<std::is_same<T1, T2>::value && std::is_integral<T1>::value, be_t<T1>> operator ^(const be_t<T1>& left, const be_t<T2>& right)
|
||||
{
|
||||
be_t<T1> result;
|
||||
result.m_data = left.data() ^ right.data();
|
||||
return result;
|
||||
}
|
||||
|
||||
template<typename T1> inline std::enable_if_t<std::is_integral<T1>::value, be_t<T1>> operator ~(const be_t<T1>& arg)
|
||||
{
|
||||
be_t<T1> result;
|
||||
result.m_data = ~arg.data();
|
||||
return result;
|
||||
}
|
||||
|
||||
template<typename T> struct is_be_t : public std::integral_constant<bool, false>
|
||||
{
|
||||
};
|
||||
|
@ -801,98 +766,77 @@ template<> struct to_be<char> { using type = char; };
|
|||
template<> struct to_be<u8> { using type = u8; };
|
||||
template<> struct to_be<s8> { using type = s8; };
|
||||
|
||||
template<typename T, typename T1, T1 value> struct _se : public const_se_t<T, value> {};
|
||||
template<typename T, typename T1, T1 value> struct _se<be_t<T>, T1, value> : public const_se_t<T, value> {};
|
||||
|
||||
//#define se(t, x) _se<decltype(t), decltype(x), x>::value
|
||||
#define se16(x) _se<u16, decltype(x), x>::value
|
||||
#define se32(x) _se<u32, decltype(x), x>::value
|
||||
#define se64(x) _se<u64, decltype(x), x>::value
|
||||
|
||||
template<typename Tto, typename Tfrom>
|
||||
struct convert_le_be_t
|
||||
{
|
||||
static Tto func(Tfrom value)
|
||||
{
|
||||
return (Tto)value;
|
||||
}
|
||||
};
|
||||
|
||||
template<typename Tt, typename Tfrom>
|
||||
struct convert_le_be_t<be_t<Tt>, Tfrom>
|
||||
{
|
||||
static be_t<Tt> func(Tfrom value)
|
||||
{
|
||||
return be_t<Tt>::make(value);
|
||||
}
|
||||
};
|
||||
|
||||
template<typename Tt, typename Tf>
|
||||
struct convert_le_be_t<be_t<Tt>, be_t<Tf>>
|
||||
{
|
||||
static be_t<Tt> func(be_t<Tf> value)
|
||||
{
|
||||
return value;
|
||||
}
|
||||
};
|
||||
|
||||
template<typename Tto, typename Tf>
|
||||
struct convert_le_be_t<Tto, be_t<Tf>>
|
||||
{
|
||||
static Tto func(be_t<Tf> value)
|
||||
{
|
||||
return value.value();
|
||||
}
|
||||
};
|
||||
|
||||
template<typename Tto, typename Tfrom>
|
||||
force_inline Tto convert_le_be(Tfrom value)
|
||||
{
|
||||
return convert_le_be_t<Tto, Tfrom>::func(value);
|
||||
}
|
||||
|
||||
template<typename Tto, typename Tfrom>
|
||||
force_inline void convert_le_be(Tto& dst, Tfrom src)
|
||||
{
|
||||
dst = convert_le_be_t<Tto, Tfrom>::func(src);
|
||||
}
|
||||
|
||||
template<typename T> struct le_t
|
||||
template<typename T> class le_t
|
||||
{
|
||||
public:
|
||||
using type = std::remove_cv_t<T>;
|
||||
using stype = be_storage_t<std::remove_cv_t<T>>;
|
||||
|
||||
stype m_data;
|
||||
type m_data; // don't access directly
|
||||
|
||||
static_assert(!std::is_class<type>::value, "le_t<> error: invalid type (class or structure)");
|
||||
static_assert(!std::is_union<type>::value || std::is_same<type, u128>::value, "le_t<> error: invalid type (union)");
|
||||
static_assert(!std::is_pointer<type>::value, "le_t<> error: invalid type (pointer)");
|
||||
static_assert(!std::is_reference<type>::value, "le_t<> error: invalid type (reference)");
|
||||
static_assert(!std::is_array<type>::value, "le_t<> error: invalid type (array)");
|
||||
static_assert(!std::is_enum<type>::value, "le_t<> error: invalid type (enumeration), use integral type instead");
|
||||
static_assert(__alignof(type) == __alignof(stype), "le_t<> error: unexpected alignment");
|
||||
|
||||
le_t() = default;
|
||||
|
||||
le_t(const le_t&) = default;
|
||||
|
||||
template<typename = std::enable_if_t<std::is_constructible<type, type>::value>> le_t(const type& value)
|
||||
: m_data(value)
|
||||
{
|
||||
}
|
||||
|
||||
type value() const
|
||||
{
|
||||
return reinterpret_cast<const type&>(m_data);
|
||||
return m_data;
|
||||
}
|
||||
|
||||
const stype& data() const
|
||||
{
|
||||
return reinterpret_cast<const stype&>(m_data);
|
||||
}
|
||||
|
||||
le_t& operator =(const le_t& value) = default;
|
||||
|
||||
template<typename CT> std::enable_if_t<std::is_assignable<type&, CT>::value, le_t&> operator =(const CT& value)
|
||||
{
|
||||
m_data = reinterpret_cast<const stype&>(value);
|
||||
|
||||
m_data = value;
|
||||
return *this;
|
||||
}
|
||||
|
||||
//template<typename CT> operator std::enable_if_t<std::is_convertible<type, CT>::value, CT>() const
|
||||
//{
|
||||
// return value();
|
||||
//}
|
||||
|
||||
operator type() const
|
||||
{
|
||||
return value();
|
||||
}
|
||||
|
||||
// conversion to another le_t type
|
||||
//template<typename T1> operator const le_t<T1>() const
|
||||
//template<typename T1> operator le_t<T1>() const
|
||||
//{
|
||||
// return le_t<T1>::make(value());
|
||||
// return value();
|
||||
//}
|
||||
|
||||
template<typename T1> le_t& operator +=(const T1& right) { return *this = value() + right; }
|
||||
template<typename T1> le_t& operator -=(const T1& right) { return *this = value() - right; }
|
||||
template<typename T1> le_t& operator *=(const T1& right) { return *this = value() * right; }
|
||||
template<typename T1> le_t& operator /=(const T1& right) { return *this = value() / right; }
|
||||
template<typename T1> le_t& operator %=(const T1& right) { return *this = value() % right; }
|
||||
|
||||
template<typename T1> le_t& operator <<=(const T1& right) { return *this = value() << right; }
|
||||
template<typename T1> le_t& operator >>=(const T1& right) { return *this = value() >> right; }
|
||||
|
||||
template<typename T1> le_t& operator &=(const T1& right) { return m_data &= le_t(right).data(), *this; }
|
||||
template<typename T1> le_t& operator |=(const T1& right) { return m_data |= le_t(right).data(), *this; }
|
||||
template<typename T1> le_t& operator ^=(const T1& right) { return m_data ^= le_t(right).data(), *this; }
|
||||
|
||||
le_t operator ++(int) { le_t res = *this; *this += 1; return res; }
|
||||
le_t operator --(int) { le_t res = *this; *this -= 1; return res; }
|
||||
le_t& operator ++() { *this += 1; return *this; }
|
||||
le_t& operator --() { *this -= 1; return *this; }
|
||||
};
|
||||
|
||||
template<typename T> struct is_le_t : public std::integral_constant<bool, false>
|
||||
|
|
|
@ -9,50 +9,44 @@
|
|||
|
||||
static_assert(fs::file::null == intptr_t(INVALID_HANDLE_VALUE) && fs::dir::null == fs::file::null, "Check fs::file::null definition");
|
||||
|
||||
std::unique_ptr<wchar_t[]> ConvertUTF8ToWChar(const std::string& source)
|
||||
std::unique_ptr<wchar_t[]> to_wchar(const std::string& source)
|
||||
{
|
||||
const size_t length = source.size() + 1; // size + null terminator
|
||||
const auto length = source.size() + 1; // size + null terminator
|
||||
|
||||
const int size = source.size() < INT_MAX ? static_cast<int>(length) : throw std::length_error(__FUNCTION__);
|
||||
const int size = source.size() < INT_MAX ? static_cast<int>(length) : throw EXCEPTION("Invalid source length (0x%llx)", source.size());
|
||||
|
||||
std::unique_ptr<wchar_t[]> buffer(new wchar_t[length]); // allocate buffer assuming that length is the max possible size
|
||||
|
||||
if (!MultiByteToWideChar(CP_UTF8, 0, source.c_str(), size, buffer.get(), size))
|
||||
{
|
||||
LOG_ERROR(GENERAL, "ConvertUTF8ToWChar(source='%s') failed: 0x%llx", source, GET_API_ERROR);
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("System error 0x%x", GetLastError());
|
||||
}
|
||||
|
||||
return buffer;
|
||||
}
|
||||
|
||||
std::string ConvertWCharToUTF8(const wchar_t* source)
|
||||
void to_utf8(std::string& result, const wchar_t* source)
|
||||
{
|
||||
const int length = lstrlenW(source); // source length
|
||||
|
||||
std::string result;
|
||||
|
||||
if (length == 0)
|
||||
{
|
||||
return result;
|
||||
return result.clear();
|
||||
}
|
||||
|
||||
const int size = WideCharToMultiByte(CP_UTF8, 0, source, length, NULL, 0, NULL, NULL); // output size
|
||||
|
||||
if (size <= 0)
|
||||
{
|
||||
LOG_ERROR(GENERAL, "ConvertWCharToUTF8(length=%d) failed: 0x%llx", length, GET_API_ERROR);
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("System error 0x%x", GetLastError());
|
||||
}
|
||||
|
||||
result.resize(size);
|
||||
|
||||
if (!WideCharToMultiByte(CP_UTF8, 0, source, length, &result.front(), size, NULL, NULL))
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("System error 0x%x", GetLastError());
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
time_t to_time_t(const ULARGE_INTEGER& ft)
|
||||
|
@ -81,7 +75,7 @@ time_t to_time_t(const FILETIME& ft)
|
|||
bool truncate_file(const std::string& file, u64 length)
|
||||
{
|
||||
// open the file
|
||||
const auto handle = CreateFileW(ConvertUTF8ToWChar(file).get(), GENERIC_WRITE, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
const auto handle = CreateFileW(to_wchar(file).get(), GENERIC_WRITE, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
|
||||
if (handle == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
|
@ -124,7 +118,7 @@ bool fs::stat(const std::string& path, stat_t& info)
|
|||
{
|
||||
#ifdef _WIN32
|
||||
WIN32_FILE_ATTRIBUTE_DATA attrs;
|
||||
if (!GetFileAttributesExW(ConvertUTF8ToWChar(path).get(), GetFileExInfoStandard, &attrs))
|
||||
if (!GetFileAttributesExW(to_wchar(path).get(), GetFileExInfoStandard, &attrs))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -156,7 +150,7 @@ bool fs::stat(const std::string& path, stat_t& info)
|
|||
bool fs::exists(const std::string& path)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
return GetFileAttributesW(ConvertUTF8ToWChar(path).get()) != 0xFFFFFFFF;
|
||||
return GetFileAttributesW(to_wchar(path).get()) != 0xFFFFFFFF;
|
||||
#else
|
||||
struct stat buffer;
|
||||
return stat(path.c_str(), &buffer) == 0;
|
||||
|
@ -167,7 +161,7 @@ bool fs::is_file(const std::string& file)
|
|||
{
|
||||
#ifdef _WIN32
|
||||
DWORD attrs;
|
||||
if ((attrs = GetFileAttributesW(ConvertUTF8ToWChar(file).get())) == INVALID_FILE_ATTRIBUTES)
|
||||
if ((attrs = GetFileAttributesW(to_wchar(file).get())) == INVALID_FILE_ATTRIBUTES)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -188,7 +182,7 @@ bool fs::is_dir(const std::string& dir)
|
|||
{
|
||||
#ifdef _WIN32
|
||||
DWORD attrs;
|
||||
if ((attrs = GetFileAttributesW(ConvertUTF8ToWChar(dir).get())) == INVALID_FILE_ATTRIBUTES)
|
||||
if ((attrs = GetFileAttributesW(to_wchar(dir).get())) == INVALID_FILE_ATTRIBUTES)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -208,7 +202,7 @@ bool fs::is_dir(const std::string& dir)
|
|||
bool fs::create_dir(const std::string& dir)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
if (!CreateDirectoryW(ConvertUTF8ToWChar(dir).get(), NULL))
|
||||
if (!CreateDirectoryW(to_wchar(dir).get(), NULL))
|
||||
#else
|
||||
if (mkdir(dir.c_str(), 0777))
|
||||
#endif
|
||||
|
@ -265,7 +259,7 @@ bool fs::create_path(const std::string& path)
|
|||
bool fs::remove_dir(const std::string& dir)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
if (!RemoveDirectoryW(ConvertUTF8ToWChar(dir).get()))
|
||||
if (!RemoveDirectoryW(to_wchar(dir).get()))
|
||||
#else
|
||||
if (rmdir(dir.c_str()))
|
||||
#endif
|
||||
|
@ -279,9 +273,8 @@ bool fs::remove_dir(const std::string& dir)
|
|||
|
||||
bool fs::rename(const std::string& from, const std::string& to)
|
||||
{
|
||||
// TODO: Deal with case-sensitivity
|
||||
#ifdef _WIN32
|
||||
if (!MoveFileW(ConvertUTF8ToWChar(from).get(), ConvertUTF8ToWChar(to).get()))
|
||||
if (!MoveFileW(to_wchar(from).get(), to_wchar(to).get()))
|
||||
#else
|
||||
if (rename(from.c_str(), to.c_str()))
|
||||
#endif
|
||||
|
@ -332,7 +325,7 @@ int OSCopyFile(const char* source, const char* destination, bool overwrite)
|
|||
bool fs::copy_file(const std::string& from, const std::string& to, bool overwrite)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
if (!CopyFileW(ConvertUTF8ToWChar(from).get(), ConvertUTF8ToWChar(to).get(), !overwrite))
|
||||
if (!CopyFileW(to_wchar(from).get(), to_wchar(to).get(), !overwrite))
|
||||
#else
|
||||
if (OSCopyFile(from.c_str(), to.c_str(), overwrite))
|
||||
#endif
|
||||
|
@ -347,7 +340,7 @@ bool fs::copy_file(const std::string& from, const std::string& to, bool overwrit
|
|||
bool fs::remove_file(const std::string& file)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
if (!DeleteFileW(ConvertUTF8ToWChar(file).get()))
|
||||
if (!DeleteFileW(to_wchar(file).get()))
|
||||
#else
|
||||
if (unlink(file.c_str()))
|
||||
#endif
|
||||
|
@ -388,7 +381,7 @@ fs::file::~file()
|
|||
|
||||
bool fs::file::open(const std::string& filename, u32 mode)
|
||||
{
|
||||
this->~file();
|
||||
this->close();
|
||||
|
||||
#ifdef _WIN32
|
||||
DWORD access = 0;
|
||||
|
@ -424,7 +417,7 @@ bool fs::file::open(const std::string& filename, u32 mode)
|
|||
return false;
|
||||
}
|
||||
|
||||
m_fd = (intptr_t)CreateFileW(ConvertUTF8ToWChar(filename).get(), access, FILE_SHARE_READ, NULL, disp, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
m_fd = (intptr_t)CreateFileW(to_wchar(filename).get(), access, FILE_SHARE_READ, NULL, disp, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
#else
|
||||
int flags = 0;
|
||||
|
||||
|
@ -537,31 +530,35 @@ bool fs::file::close()
|
|||
|
||||
u64 fs::file::read(void* buffer, u64 count) const
|
||||
{
|
||||
const int size = count <= INT_MAX ? static_cast<int>(count) : throw EXCEPTION("Invalid count (0x%llx)", count);
|
||||
|
||||
#ifdef _WIN32
|
||||
DWORD nread;
|
||||
if (!ReadFile((HANDLE)m_fd, buffer, count, &nread, NULL))
|
||||
if (!ReadFile((HANDLE)m_fd, buffer, size, &nread, NULL))
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
return nread;
|
||||
#else
|
||||
return ::read(m_fd, buffer, count);
|
||||
return ::read(m_fd, buffer, size);
|
||||
#endif
|
||||
}
|
||||
|
||||
u64 fs::file::write(const void* buffer, u64 count) const
|
||||
{
|
||||
const int size = count <= INT_MAX ? static_cast<int>(count) : throw EXCEPTION("Invalid count (0x%llx)", count);
|
||||
|
||||
#ifdef _WIN32
|
||||
DWORD nwritten;
|
||||
if (!WriteFile((HANDLE)m_fd, buffer, count, &nwritten, NULL))
|
||||
if (!WriteFile((HANDLE)m_fd, buffer, size, &nwritten, NULL))
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
return nwritten;
|
||||
#else
|
||||
return ::write(m_fd, buffer, count);
|
||||
return ::write(m_fd, buffer, size);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -631,7 +628,7 @@ void fs::dir::import(handle_type dd, const std::string& path)
|
|||
m_dd = dd;
|
||||
|
||||
#ifdef _WIN32
|
||||
m_path = ConvertUTF8ToWChar(path);
|
||||
m_path = to_wchar(path);
|
||||
#else
|
||||
m_path.reset(new char[path.size() + 1]);
|
||||
memcpy(m_path.get(), path.c_str(), path.size() + 1);
|
||||
|
@ -659,7 +656,7 @@ bool fs::dir::open(const std::string& dirname)
|
|||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
m_path = ConvertUTF8ToWChar(dirname + "/*");
|
||||
m_path = to_wchar(dirname + "/*");
|
||||
#else
|
||||
m_path.reset(new char[dirname.size() + 1]);
|
||||
memcpy(m_path.get(), dirname.c_str(), dirname.size() + 1);
|
||||
|
@ -723,7 +720,7 @@ bool fs::dir::get_first(std::string& name, stat_t& info)
|
|||
return false;
|
||||
}
|
||||
|
||||
name = ConvertWCharToUTF8(found.cFileName);
|
||||
to_utf8(name, found.cFileName);
|
||||
|
||||
info.is_directory = (found.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) != 0;
|
||||
info.is_writable = (found.dwFileAttributes & FILE_ATTRIBUTE_READONLY) == 0;
|
||||
|
@ -755,7 +752,7 @@ bool fs::dir::get_next(std::string& name, stat_t& info)
|
|||
return false;
|
||||
}
|
||||
|
||||
name = ConvertWCharToUTF8(found.cFileName);
|
||||
to_utf8(name, found.cFileName);
|
||||
|
||||
info.is_directory = (found.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) != 0;
|
||||
info.is_writable = (found.dwFileAttributes & FILE_ATTRIBUTE_READONLY) == 0;
|
||||
|
|
115
Utilities/GNU.h
115
Utilities/GNU.h
|
@ -2,6 +2,11 @@
|
|||
|
||||
#include <emmintrin.h>
|
||||
|
||||
// temporarily (until noexcept is available); use `noexcept(true)` instead of `noexcept` if necessary
|
||||
#if defined(_MSC_VER) && _MSC_VER <= 1800
|
||||
#define noexcept _NOEXCEPT_OP
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#define thread_local __declspec(thread)
|
||||
#elif __APPLE__
|
||||
|
@ -26,21 +31,11 @@
|
|||
#define force_inline __attribute__((always_inline))
|
||||
#endif
|
||||
|
||||
template<size_t size>
|
||||
void strcpy_trunc(char(&dst)[size], const std::string& src)
|
||||
{
|
||||
const size_t count = (src.size() >= size) ? size - 1 /* truncation */ : src.size();
|
||||
memcpy(dst, src.c_str(), count);
|
||||
dst[count] = 0;
|
||||
}
|
||||
|
||||
template<size_t size, size_t rsize>
|
||||
void strcpy_trunc(char(&dst)[size], const char(&src)[rsize])
|
||||
{
|
||||
const size_t count = (rsize >= size) ? size - 1 /* truncation */ : rsize;
|
||||
memcpy(dst, src, count);
|
||||
dst[count] = 0;
|
||||
}
|
||||
#if defined(_MSC_VER)
|
||||
#define set_alignment(x) _CRT_ALIGN(x)
|
||||
#else
|
||||
#define set_alignment(x) __attribute__((aligned(x)))
|
||||
#endif
|
||||
|
||||
#if defined(__GNUG__)
|
||||
|
||||
|
@ -82,42 +77,42 @@ int clock_gettime(int foo, struct timespec *ts);
|
|||
|
||||
#endif /* __APPLE__ */
|
||||
|
||||
template<typename T, typename T2> static inline std::enable_if_t<std::is_arithmetic<T>::value, T> sync_val_compare_and_swap(volatile T* dest, T2 comp, T2 exch)
|
||||
template<typename T, typename T2> inline std::enable_if_t<std::is_arithmetic<T>::value, T> sync_val_compare_and_swap(volatile T* dest, T2 comp, T2 exch)
|
||||
{
|
||||
return __sync_val_compare_and_swap(dest, comp, exch);
|
||||
}
|
||||
|
||||
template<typename T, typename T2> static inline std::enable_if_t<std::is_arithmetic<T>::value, bool> sync_bool_compare_and_swap(volatile T* dest, T2 comp, T2 exch)
|
||||
template<typename T, typename T2> inline std::enable_if_t<std::is_arithmetic<T>::value, bool> sync_bool_compare_and_swap(volatile T* dest, T2 comp, T2 exch)
|
||||
{
|
||||
return __sync_bool_compare_and_swap(dest, comp, exch);
|
||||
}
|
||||
|
||||
template<typename T, typename T2> static inline std::enable_if_t<std::is_arithmetic<T>::value, T> sync_lock_test_and_set(volatile T* dest, T2 value)
|
||||
template<typename T, typename T2> inline std::enable_if_t<std::is_arithmetic<T>::value, T> sync_lock_test_and_set(volatile T* dest, T2 value)
|
||||
{
|
||||
return __sync_lock_test_and_set(dest, value);
|
||||
}
|
||||
|
||||
template<typename T, typename T2> static inline std::enable_if_t<std::is_arithmetic<T>::value, T> sync_fetch_and_add(volatile T* dest, T2 value)
|
||||
template<typename T, typename T2> inline std::enable_if_t<std::is_arithmetic<T>::value, T> sync_fetch_and_add(volatile T* dest, T2 value)
|
||||
{
|
||||
return __sync_fetch_and_add(dest, value);
|
||||
}
|
||||
|
||||
template<typename T, typename T2> static inline std::enable_if_t<std::is_arithmetic<T>::value, T> sync_fetch_and_sub(volatile T* dest, T2 value)
|
||||
template<typename T, typename T2> inline std::enable_if_t<std::is_arithmetic<T>::value, T> sync_fetch_and_sub(volatile T* dest, T2 value)
|
||||
{
|
||||
return __sync_fetch_and_sub(dest, value);
|
||||
}
|
||||
|
||||
template<typename T, typename T2> static inline std::enable_if_t<std::is_arithmetic<T>::value, T> sync_fetch_and_or(volatile T* dest, T2 value)
|
||||
template<typename T, typename T2> inline std::enable_if_t<std::is_arithmetic<T>::value, T> sync_fetch_and_or(volatile T* dest, T2 value)
|
||||
{
|
||||
return __sync_fetch_and_or(dest, value);
|
||||
}
|
||||
|
||||
template<typename T, typename T2> static inline std::enable_if_t<std::is_arithmetic<T>::value, T> sync_fetch_and_and(volatile T* dest, T2 value)
|
||||
template<typename T, typename T2> inline std::enable_if_t<std::is_arithmetic<T>::value, T> sync_fetch_and_and(volatile T* dest, T2 value)
|
||||
{
|
||||
return __sync_fetch_and_and(dest, value);
|
||||
}
|
||||
|
||||
template<typename T, typename T2> static inline std::enable_if_t<std::is_arithmetic<T>::value, T> sync_fetch_and_xor(volatile T* dest, T2 value)
|
||||
template<typename T, typename T2> inline std::enable_if_t<std::is_arithmetic<T>::value, T> sync_fetch_and_xor(volatile T* dest, T2 value)
|
||||
{
|
||||
return __sync_fetch_and_xor(dest, value);
|
||||
}
|
||||
|
@ -128,181 +123,181 @@ template<typename T, typename T2> static inline std::enable_if_t<std::is_arithme
|
|||
|
||||
// atomic compare and swap functions
|
||||
|
||||
static force_inline uint8_t sync_val_compare_and_swap(volatile uint8_t* dest, uint8_t comp, uint8_t exch)
|
||||
inline uint8_t sync_val_compare_and_swap(volatile uint8_t* dest, uint8_t comp, uint8_t exch)
|
||||
{
|
||||
return _InterlockedCompareExchange8((volatile char*)dest, exch, comp);
|
||||
}
|
||||
|
||||
static force_inline uint16_t sync_val_compare_and_swap(volatile uint16_t* dest, uint16_t comp, uint16_t exch)
|
||||
inline uint16_t sync_val_compare_and_swap(volatile uint16_t* dest, uint16_t comp, uint16_t exch)
|
||||
{
|
||||
return _InterlockedCompareExchange16((volatile short*)dest, exch, comp);
|
||||
}
|
||||
|
||||
static force_inline uint32_t sync_val_compare_and_swap(volatile uint32_t* dest, uint32_t comp, uint32_t exch)
|
||||
inline uint32_t sync_val_compare_and_swap(volatile uint32_t* dest, uint32_t comp, uint32_t exch)
|
||||
{
|
||||
return _InterlockedCompareExchange((volatile long*)dest, exch, comp);
|
||||
}
|
||||
|
||||
static force_inline uint64_t sync_val_compare_and_swap(volatile uint64_t* dest, uint64_t comp, uint64_t exch)
|
||||
inline uint64_t sync_val_compare_and_swap(volatile uint64_t* dest, uint64_t comp, uint64_t exch)
|
||||
{
|
||||
return _InterlockedCompareExchange64((volatile long long*)dest, exch, comp);
|
||||
}
|
||||
|
||||
static force_inline bool sync_bool_compare_and_swap(volatile uint8_t* dest, uint8_t comp, uint8_t exch)
|
||||
inline bool sync_bool_compare_and_swap(volatile uint8_t* dest, uint8_t comp, uint8_t exch)
|
||||
{
|
||||
return (uint8_t)_InterlockedCompareExchange8((volatile char*)dest, exch, comp) == comp;
|
||||
}
|
||||
|
||||
static force_inline bool sync_bool_compare_and_swap(volatile uint16_t* dest, uint16_t comp, uint16_t exch)
|
||||
inline bool sync_bool_compare_and_swap(volatile uint16_t* dest, uint16_t comp, uint16_t exch)
|
||||
{
|
||||
return (uint16_t)_InterlockedCompareExchange16((volatile short*)dest, exch, comp) == comp;
|
||||
}
|
||||
|
||||
static force_inline bool sync_bool_compare_and_swap(volatile uint32_t* dest, uint32_t comp, uint32_t exch)
|
||||
inline bool sync_bool_compare_and_swap(volatile uint32_t* dest, uint32_t comp, uint32_t exch)
|
||||
{
|
||||
return (uint32_t)_InterlockedCompareExchange((volatile long*)dest, exch, comp) == comp;
|
||||
}
|
||||
|
||||
static force_inline bool sync_bool_compare_and_swap(volatile uint64_t* dest, uint64_t comp, uint64_t exch)
|
||||
inline bool sync_bool_compare_and_swap(volatile uint64_t* dest, uint64_t comp, uint64_t exch)
|
||||
{
|
||||
return (uint64_t)_InterlockedCompareExchange64((volatile long long*)dest, exch, comp) == comp;
|
||||
}
|
||||
|
||||
// atomic exchange functions
|
||||
|
||||
static force_inline uint8_t sync_lock_test_and_set(volatile uint8_t* dest, uint8_t value)
|
||||
inline uint8_t sync_lock_test_and_set(volatile uint8_t* dest, uint8_t value)
|
||||
{
|
||||
return _InterlockedExchange8((volatile char*)dest, value);
|
||||
}
|
||||
|
||||
static force_inline uint16_t sync_lock_test_and_set(volatile uint16_t* dest, uint16_t value)
|
||||
inline uint16_t sync_lock_test_and_set(volatile uint16_t* dest, uint16_t value)
|
||||
{
|
||||
return _InterlockedExchange16((volatile short*)dest, value);
|
||||
}
|
||||
|
||||
static force_inline uint32_t sync_lock_test_and_set(volatile uint32_t* dest, uint32_t value)
|
||||
inline uint32_t sync_lock_test_and_set(volatile uint32_t* dest, uint32_t value)
|
||||
{
|
||||
return _InterlockedExchange((volatile long*)dest, value);
|
||||
}
|
||||
|
||||
static force_inline uint64_t sync_lock_test_and_set(volatile uint64_t* dest, uint64_t value)
|
||||
inline uint64_t sync_lock_test_and_set(volatile uint64_t* dest, uint64_t value)
|
||||
{
|
||||
return _InterlockedExchange64((volatile long long*)dest, value);
|
||||
}
|
||||
|
||||
// atomic add functions
|
||||
|
||||
static force_inline uint8_t sync_fetch_and_add(volatile uint8_t* dest, uint8_t value)
|
||||
inline uint8_t sync_fetch_and_add(volatile uint8_t* dest, uint8_t value)
|
||||
{
|
||||
return _InterlockedExchangeAdd8((volatile char*)dest, value);
|
||||
}
|
||||
|
||||
static force_inline uint16_t sync_fetch_and_add(volatile uint16_t* dest, uint16_t value)
|
||||
inline uint16_t sync_fetch_and_add(volatile uint16_t* dest, uint16_t value)
|
||||
{
|
||||
return _InterlockedExchangeAdd16((volatile short*)dest, value);
|
||||
}
|
||||
|
||||
static force_inline uint32_t sync_fetch_and_add(volatile uint32_t* dest, uint32_t value)
|
||||
inline uint32_t sync_fetch_and_add(volatile uint32_t* dest, uint32_t value)
|
||||
{
|
||||
return _InterlockedExchangeAdd((volatile long*)dest, value);
|
||||
}
|
||||
|
||||
static force_inline uint64_t sync_fetch_and_add(volatile uint64_t* dest, uint64_t value)
|
||||
inline uint64_t sync_fetch_and_add(volatile uint64_t* dest, uint64_t value)
|
||||
{
|
||||
return _InterlockedExchangeAdd64((volatile long long*)dest, value);
|
||||
}
|
||||
|
||||
// atomic sub functions
|
||||
|
||||
static force_inline uint8_t sync_fetch_and_sub(volatile uint8_t* dest, uint8_t value)
|
||||
inline uint8_t sync_fetch_and_sub(volatile uint8_t* dest, uint8_t value)
|
||||
{
|
||||
return _InterlockedExchangeAdd8((volatile char*)dest, -(char)value);
|
||||
}
|
||||
|
||||
static force_inline uint16_t sync_fetch_and_sub(volatile uint16_t* dest, uint16_t value)
|
||||
inline uint16_t sync_fetch_and_sub(volatile uint16_t* dest, uint16_t value)
|
||||
{
|
||||
return _InterlockedExchangeAdd16((volatile short*)dest, -(short)value);
|
||||
}
|
||||
|
||||
static force_inline uint32_t sync_fetch_and_sub(volatile uint32_t* dest, uint32_t value)
|
||||
inline uint32_t sync_fetch_and_sub(volatile uint32_t* dest, uint32_t value)
|
||||
{
|
||||
return _InterlockedExchangeAdd((volatile long*)dest, -(long)value);
|
||||
}
|
||||
|
||||
static force_inline uint64_t sync_fetch_and_sub(volatile uint64_t* dest, uint64_t value)
|
||||
inline uint64_t sync_fetch_and_sub(volatile uint64_t* dest, uint64_t value)
|
||||
{
|
||||
return _InterlockedExchangeAdd64((volatile long long*)dest, -(long long)value);
|
||||
}
|
||||
|
||||
// atomic bitwise or functions
|
||||
// atomic `bitwise or` functions
|
||||
|
||||
static force_inline uint8_t sync_fetch_and_or(volatile uint8_t* dest, uint8_t value)
|
||||
inline uint8_t sync_fetch_and_or(volatile uint8_t* dest, uint8_t value)
|
||||
{
|
||||
return _InterlockedOr8((volatile char*)dest, value);
|
||||
}
|
||||
|
||||
static force_inline uint16_t sync_fetch_and_or(volatile uint16_t* dest, uint16_t value)
|
||||
inline uint16_t sync_fetch_and_or(volatile uint16_t* dest, uint16_t value)
|
||||
{
|
||||
return _InterlockedOr16((volatile short*)dest, value);
|
||||
}
|
||||
|
||||
static force_inline uint32_t sync_fetch_and_or(volatile uint32_t* dest, uint32_t value)
|
||||
inline uint32_t sync_fetch_and_or(volatile uint32_t* dest, uint32_t value)
|
||||
{
|
||||
return _InterlockedOr((volatile long*)dest, value);
|
||||
}
|
||||
|
||||
static force_inline uint64_t sync_fetch_and_or(volatile uint64_t* dest, uint64_t value)
|
||||
inline uint64_t sync_fetch_and_or(volatile uint64_t* dest, uint64_t value)
|
||||
{
|
||||
return _InterlockedOr64((volatile long long*)dest, value);
|
||||
}
|
||||
|
||||
// atomic bitwise and functions
|
||||
// atomic `bitwise and` functions
|
||||
|
||||
static force_inline uint8_t sync_fetch_and_and(volatile uint8_t* dest, uint8_t value)
|
||||
inline uint8_t sync_fetch_and_and(volatile uint8_t* dest, uint8_t value)
|
||||
{
|
||||
return _InterlockedAnd8((volatile char*)dest, value);
|
||||
}
|
||||
|
||||
static force_inline uint16_t sync_fetch_and_and(volatile uint16_t* dest, uint16_t value)
|
||||
inline uint16_t sync_fetch_and_and(volatile uint16_t* dest, uint16_t value)
|
||||
{
|
||||
return _InterlockedAnd16((volatile short*)dest, value);
|
||||
}
|
||||
|
||||
static force_inline uint32_t sync_fetch_and_and(volatile uint32_t* dest, uint32_t value)
|
||||
inline uint32_t sync_fetch_and_and(volatile uint32_t* dest, uint32_t value)
|
||||
{
|
||||
return _InterlockedAnd((volatile long*)dest, value);
|
||||
}
|
||||
|
||||
static force_inline uint64_t sync_fetch_and_and(volatile uint64_t* dest, uint64_t value)
|
||||
inline uint64_t sync_fetch_and_and(volatile uint64_t* dest, uint64_t value)
|
||||
{
|
||||
return _InterlockedAnd64((volatile long long*)dest, value);
|
||||
}
|
||||
|
||||
// atomic bitwise xor functions
|
||||
// atomic `bitwise xor` functions
|
||||
|
||||
static force_inline uint8_t sync_fetch_and_xor(volatile uint8_t* dest, uint8_t value)
|
||||
inline uint8_t sync_fetch_and_xor(volatile uint8_t* dest, uint8_t value)
|
||||
{
|
||||
return _InterlockedXor8((volatile char*)dest, value);
|
||||
}
|
||||
|
||||
static force_inline uint16_t sync_fetch_and_xor(volatile uint16_t* dest, uint16_t value)
|
||||
inline uint16_t sync_fetch_and_xor(volatile uint16_t* dest, uint16_t value)
|
||||
{
|
||||
return _InterlockedXor16((volatile short*)dest, value);
|
||||
}
|
||||
|
||||
static force_inline uint32_t sync_fetch_and_xor(volatile uint32_t* dest, uint32_t value)
|
||||
inline uint32_t sync_fetch_and_xor(volatile uint32_t* dest, uint32_t value)
|
||||
{
|
||||
return _InterlockedXor((volatile long*)dest, value);
|
||||
}
|
||||
|
||||
static force_inline uint64_t sync_fetch_and_xor(volatile uint64_t* dest, uint64_t value)
|
||||
inline uint64_t sync_fetch_and_xor(volatile uint64_t* dest, uint64_t value)
|
||||
{
|
||||
return _InterlockedXor64((volatile long long*)dest, value);
|
||||
}
|
||||
|
||||
#endif /* _MSC_VER */
|
||||
|
||||
static force_inline uint32_t cntlz32(uint32_t arg)
|
||||
inline uint32_t cntlz32(uint32_t arg)
|
||||
{
|
||||
#if defined(_MSC_VER)
|
||||
unsigned long res;
|
||||
|
@ -326,7 +321,7 @@ static force_inline uint32_t cntlz32(uint32_t arg)
|
|||
#endif
|
||||
}
|
||||
|
||||
static force_inline uint64_t cntlz64(uint64_t arg)
|
||||
inline uint64_t cntlz64(uint64_t arg)
|
||||
{
|
||||
#if defined(_MSC_VER)
|
||||
unsigned long res;
|
||||
|
|
|
@ -14,7 +14,7 @@ std::unique_ptr<LogManager> g_log_manager;
|
|||
u32 LogMessage::size() const
|
||||
{
|
||||
//1 byte for NULL terminator
|
||||
return (u32)(sizeof(LogMessage::size_type) + sizeof(LogType) + sizeof(LogSeverity) + sizeof(std::string::value_type) * mText.size() + 1);
|
||||
return (u32)(sizeof(LogMessage::size_type) + sizeof(LogType) + sizeof(Severity) + sizeof(std::string::value_type) * mText.size() + 1);
|
||||
}
|
||||
|
||||
void LogMessage::serialize(char *output) const
|
||||
|
@ -24,8 +24,8 @@ void LogMessage::serialize(char *output) const
|
|||
output += sizeof(LogMessage::size_type);
|
||||
memcpy(output, &mType, sizeof(LogType));
|
||||
output += sizeof(LogType);
|
||||
memcpy(output, &mServerity, sizeof(LogSeverity));
|
||||
output += sizeof(LogSeverity);
|
||||
memcpy(output, &mServerity, sizeof(Severity));
|
||||
output += sizeof(Severity);
|
||||
memcpy(output, mText.c_str(), mText.size() );
|
||||
output += sizeof(std::string::value_type)*mText.size();
|
||||
*output = '\0';
|
||||
|
@ -38,13 +38,13 @@ LogMessage LogMessage::deserialize(char *input, u32* size_out)
|
|||
input += sizeof(LogMessage::size_type);
|
||||
msg.mType = *(reinterpret_cast<LogType*>(input));
|
||||
input += sizeof(LogType);
|
||||
msg.mServerity = *(reinterpret_cast<LogSeverity*>(input));
|
||||
input += sizeof(LogSeverity);
|
||||
msg.mServerity = *(reinterpret_cast<Severity*>(input));
|
||||
input += sizeof(Severity);
|
||||
if (msgSize > 9000)
|
||||
{
|
||||
int wtf = 6;
|
||||
}
|
||||
msg.mText.append(input, msgSize - 1 - sizeof(LogSeverity) - sizeof(LogType));
|
||||
msg.mText.append(input, msgSize - 1 - sizeof(Severity) - sizeof(LogType));
|
||||
if (size_out){(*size_out) = msgSize;}
|
||||
return msg;
|
||||
}
|
||||
|
@ -57,7 +57,7 @@ LogChannel::LogChannel() : LogChannel("unknown")
|
|||
LogChannel::LogChannel(const std::string& name) :
|
||||
name(name)
|
||||
, mEnabled(true)
|
||||
, mLogLevel(LogSeverityWarning)
|
||||
, mLogLevel(Severity::Warning)
|
||||
{}
|
||||
|
||||
void LogChannel::log(const LogMessage &msg)
|
||||
|
@ -186,22 +186,22 @@ void LogManager::log(LogMessage msg)
|
|||
std::string prefix;
|
||||
switch (msg.mServerity)
|
||||
{
|
||||
case LogSeveritySuccess:
|
||||
case Severity::Success:
|
||||
prefix = "S ";
|
||||
break;
|
||||
case LogSeverityNotice:
|
||||
case Severity::Notice:
|
||||
prefix = "! ";
|
||||
break;
|
||||
case LogSeverityWarning:
|
||||
case Severity::Warning:
|
||||
prefix = "W ";
|
||||
break;
|
||||
case LogSeverityError:
|
||||
case Severity::Error:
|
||||
prefix = "E ";
|
||||
break;
|
||||
}
|
||||
if (NamedThreadBase* thr = GetCurrentNamedThread())
|
||||
if (auto thr = get_current_thread_ctrl())
|
||||
{
|
||||
prefix += "{" + thr->GetThreadName() + "} ";
|
||||
prefix += "{" + thr->get_name() + "} ";
|
||||
}
|
||||
msg.mText.insert(0, prefix);
|
||||
msg.mText.append(1,'\n');
|
||||
|
@ -248,12 +248,12 @@ LogChannel &LogManager::getChannel(LogType type)
|
|||
return mChannels[static_cast<u32>(type)];
|
||||
}
|
||||
|
||||
void log_message(Log::LogType type, Log::LogSeverity sev, const char* text)
|
||||
void log_message(Log::LogType type, Log::Severity sev, const char* text)
|
||||
{
|
||||
log_message(type, sev, std::string(text));
|
||||
}
|
||||
|
||||
void log_message(Log::LogType type, Log::LogSeverity sev, std::string text)
|
||||
void log_message(Log::LogType type, Log::Severity sev, std::string text)
|
||||
{
|
||||
if (g_log_manager)
|
||||
{
|
||||
|
@ -265,12 +265,12 @@ void log_message(Log::LogType type, Log::LogSeverity sev, std::string text)
|
|||
else
|
||||
{
|
||||
rMessageBox(text,
|
||||
sev == LogSeverityNotice ? "Notice" :
|
||||
sev == LogSeverityWarning ? "Warning" :
|
||||
sev == LogSeveritySuccess ? "Success" :
|
||||
sev == LogSeverityError ? "Error" : "Unknown",
|
||||
sev == LogSeverityNotice ? rICON_INFORMATION :
|
||||
sev == LogSeverityWarning ? rICON_EXCLAMATION :
|
||||
sev == LogSeverityError ? rICON_ERROR : rICON_INFORMATION);
|
||||
sev == Severity::Notice ? "Notice" :
|
||||
sev == Severity::Warning ? "Warning" :
|
||||
sev == Severity::Success ? "Success" :
|
||||
sev == Severity::Error ? "Error" : "Unknown",
|
||||
sev == Severity::Notice ? rICON_INFORMATION :
|
||||
sev == Severity::Warning ? rICON_EXCLAMATION :
|
||||
sev == Severity::Error ? rICON_ERROR : rICON_INFORMATION);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,10 +5,10 @@
|
|||
|
||||
//first parameter is of type Log::LogType and text is of type std::string
|
||||
|
||||
#define LOG_SUCCESS(logType, text, ...) log_message(logType, Log::LogSeveritySuccess, text, ##__VA_ARGS__)
|
||||
#define LOG_NOTICE(logType, text, ...) log_message(logType, Log::LogSeverityNotice, text, ##__VA_ARGS__)
|
||||
#define LOG_WARNING(logType, text, ...) log_message(logType, Log::LogSeverityWarning, text, ##__VA_ARGS__)
|
||||
#define LOG_ERROR(logType, text, ...) log_message(logType, Log::LogSeverityError, text, ##__VA_ARGS__)
|
||||
#define LOG_SUCCESS(logType, text, ...) log_message(logType, Log::Severity::Success, text, ##__VA_ARGS__)
|
||||
#define LOG_NOTICE(logType, text, ...) log_message(logType, Log::Severity::Notice, text, ##__VA_ARGS__)
|
||||
#define LOG_WARNING(logType, text, ...) log_message(logType, Log::Severity::Warning, text, ##__VA_ARGS__)
|
||||
#define LOG_ERROR(logType, text, ...) log_message(logType, Log::Severity::Error, text, ##__VA_ARGS__)
|
||||
|
||||
namespace Log
|
||||
{
|
||||
|
@ -48,19 +48,19 @@ namespace Log
|
|||
{ TTY, "TTY: " }
|
||||
} };
|
||||
|
||||
enum LogSeverity : u32
|
||||
enum class Severity : u32
|
||||
{
|
||||
LogSeverityNotice = 0,
|
||||
LogSeverityWarning,
|
||||
LogSeveritySuccess,
|
||||
LogSeverityError,
|
||||
Notice = 0,
|
||||
Warning,
|
||||
Success,
|
||||
Error,
|
||||
};
|
||||
|
||||
struct LogMessage
|
||||
{
|
||||
using size_type = u32;
|
||||
LogType mType;
|
||||
LogSeverity mServerity;
|
||||
Severity mServerity;
|
||||
std::string mText;
|
||||
|
||||
u32 size() const;
|
||||
|
@ -86,7 +86,7 @@ namespace Log
|
|||
std::string name;
|
||||
private:
|
||||
bool mEnabled;
|
||||
LogSeverity mLogLevel;
|
||||
Severity mLogLevel;
|
||||
std::mutex mListenerLock;
|
||||
std::set<std::shared_ptr<LogListener>> mListeners;
|
||||
};
|
||||
|
@ -126,10 +126,10 @@ static struct { inline operator Log::LogType() { return Log::LogType::SPU; } } S
|
|||
static struct { inline operator Log::LogType() { return Log::LogType::ARMv7; } } ARMv7;
|
||||
static struct { inline operator Log::LogType() { return Log::LogType::TTY; } } TTY;
|
||||
|
||||
void log_message(Log::LogType type, Log::LogSeverity sev, const char* text);
|
||||
void log_message(Log::LogType type, Log::LogSeverity sev, std::string text);
|
||||
void log_message(Log::LogType type, Log::Severity sev, const char* text);
|
||||
void log_message(Log::LogType type, Log::Severity sev, std::string text);
|
||||
|
||||
template<typename... Args> never_inline void log_message(Log::LogType type, Log::LogSeverity sev, const char* fmt, Args... args)
|
||||
template<typename... Args> never_inline void log_message(Log::LogType type, Log::Severity sev, const char* fmt, Args... args)
|
||||
{
|
||||
log_message(type, sev, fmt::Format(fmt, fmt::do_unveil(args)...));
|
||||
}
|
||||
|
|
|
@ -19,10 +19,7 @@ void SSemaphore::wait()
|
|||
|
||||
while (true)
|
||||
{
|
||||
if (Emu.IsStopped())
|
||||
{
|
||||
return;
|
||||
}
|
||||
CHECK_EMU_STATUS;
|
||||
|
||||
m_cond.wait_for(cv_lock, std::chrono::milliseconds(1));
|
||||
|
||||
|
|
|
@ -242,6 +242,17 @@ namespace fmt
|
|||
}
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
struct unveil<le_t<T>, false>
|
||||
{
|
||||
using result_type = typename unveil<T>::result_type;
|
||||
|
||||
force_inline static result_type get_value(const le_t<T>& arg)
|
||||
{
|
||||
return unveil<T>::get_value(arg.value());
|
||||
}
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
force_inline typename unveil<T>::result_type do_unveil(const T& arg)
|
||||
{
|
||||
|
@ -257,12 +268,8 @@ namespace fmt
|
|||
be_t<> forced to .value() (fmt::unveil reverts byte order automatically)
|
||||
|
||||
External specializations for fmt::unveil (can be found in another headers):
|
||||
vm::ps3::ptr (fmt::unveil) (vm_ptr.h) (with appropriate address type, using .addr() can be avoided)
|
||||
vm::ps3::bptr (fmt::unveil) (vm_ptr.h)
|
||||
vm::psv::ptr (fmt::unveil) (vm_ptr.h)
|
||||
vm::ps3::ref (fmt::unveil) (vm_ref.h)
|
||||
vm::ps3::bref (fmt::unveil) (vm_ref.h)
|
||||
vm::psv::ref (fmt::unveil) (vm_ref.h)
|
||||
vm::ptr, vm::bptr, ... (fmt::unveil) (vm_ptr.h) (with appropriate address type, using .addr() can be avoided)
|
||||
vm::ref, vm::bref, ... (fmt::unveil) (vm_ref.h)
|
||||
|
||||
*/
|
||||
template<typename... Args> force_inline safe_buffers std::string format(const char* fmt, Args... args)
|
||||
|
@ -270,6 +277,39 @@ namespace fmt
|
|||
return Format(fmt, do_unveil(args)...);
|
||||
}
|
||||
|
||||
struct exception
|
||||
{
|
||||
std::unique_ptr<char[]> message;
|
||||
|
||||
template<typename... Args> never_inline safe_buffers exception(const char* file, int line, const char* func, const char* text, Args... args)
|
||||
{
|
||||
const std::string data = format(text, args...) + format("\n(in file %s:%d, in function %s)", file, line, func);
|
||||
|
||||
message = std::make_unique<char[]>(data.size() + 1);
|
||||
|
||||
std::memcpy(message.get(), data.c_str(), data.size() + 1);
|
||||
}
|
||||
|
||||
exception(const exception& other)
|
||||
{
|
||||
const std::size_t size = std::strlen(other);
|
||||
|
||||
message = std::make_unique<char[]>(size + 1);
|
||||
|
||||
std::memcpy(message.get(), other, size + 1);
|
||||
}
|
||||
|
||||
exception(exception&& other)
|
||||
{
|
||||
message = std::move(other.message);
|
||||
}
|
||||
|
||||
operator const char*() const
|
||||
{
|
||||
return message.get();
|
||||
}
|
||||
};
|
||||
|
||||
//convert a wxString to a std::string encoded in utf8
|
||||
//CAUTION, only use this to interface with wxWidgets classes
|
||||
std::string ToUTF8(const wxString& right);
|
||||
|
|
|
@ -109,6 +109,7 @@ enum x64_op_t : u32
|
|||
X64OP_NONE,
|
||||
X64OP_LOAD, // obtain and put the value into x64 register
|
||||
X64OP_STORE, // take the value from x64 register or an immediate and use it
|
||||
|
||||
// example: add eax,[rax] -> X64OP_LOAD_ADD (add the value to x64 register)
|
||||
// example: add [rax],eax -> X64OP_LOAD_ADD_STORE (this will probably never happen for MMIO registers)
|
||||
|
||||
|
@ -116,7 +117,7 @@ enum x64_op_t : u32
|
|||
X64OP_STOS,
|
||||
X64OP_XCHG,
|
||||
X64OP_CMPXCHG,
|
||||
X64OP_LOAD_AND_STORE,
|
||||
X64OP_LOAD_AND_STORE, // lock and [mem],reg
|
||||
};
|
||||
|
||||
void decode_x64_reg_op(const u8* code, x64_op_t& out_op, x64_reg_t& out_reg, size_t& out_size, size_t& out_length)
|
||||
|
@ -748,7 +749,7 @@ size_t get_x64_access_size(x64_context* context, x64_op_t op, x64_reg_t reg, siz
|
|||
if (op == X64OP_CMPXCHG)
|
||||
{
|
||||
// detect whether this instruction can't actually modify memory to avoid breaking reservation;
|
||||
// this may theoretically cause endless loop, but it shouldn't be a problem if only read_sync() generates such instruction
|
||||
// this may theoretically cause endless loop, but it shouldn't be a problem if only load_sync() generates such instruction
|
||||
u64 cmp, exch;
|
||||
if (!get_x64_reg_value(context, reg, d_size, i_size, cmp) || !get_x64_reg_value(context, X64R_RAX, d_size, i_size, exch))
|
||||
{
|
||||
|
@ -806,9 +807,9 @@ bool handle_access_violation(u32 addr, bool is_writing, x64_context* context)
|
|||
// check if address is RawSPU MMIO register
|
||||
if (addr - RAW_SPU_BASE_ADDR < (6 * RAW_SPU_OFFSET) && (addr % RAW_SPU_OFFSET) >= RAW_SPU_PROB_OFFSET)
|
||||
{
|
||||
auto t = Emu.GetCPU().GetRawSPUThread((addr - RAW_SPU_BASE_ADDR) / RAW_SPU_OFFSET);
|
||||
auto thread = Emu.GetCPU().GetRawSPUThread((addr - RAW_SPU_BASE_ADDR) / RAW_SPU_OFFSET);
|
||||
|
||||
if (!t)
|
||||
if (!thread)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -819,14 +820,12 @@ bool handle_access_violation(u32 addr, bool is_writing, x64_context* context)
|
|||
return false;
|
||||
}
|
||||
|
||||
auto& spu = static_cast<RawSPUThread&>(*t);
|
||||
|
||||
switch (op)
|
||||
{
|
||||
case X64OP_LOAD:
|
||||
{
|
||||
u32 value;
|
||||
if (is_writing || !spu.ReadReg(addr, value) || !put_x64_reg_value(context, reg, d_size, re32(value)))
|
||||
if (is_writing || !thread->ReadReg(addr, value) || !put_x64_reg_value(context, reg, d_size, _byteswap_ulong(value)))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -836,7 +835,7 @@ bool handle_access_violation(u32 addr, bool is_writing, x64_context* context)
|
|||
case X64OP_STORE:
|
||||
{
|
||||
u64 reg_value;
|
||||
if (!is_writing || !get_x64_reg_value(context, reg, d_size, i_size, reg_value) || !spu.WriteReg(addr, re32((u32)reg_value)))
|
||||
if (!is_writing || !get_x64_reg_value(context, reg, d_size, i_size, reg_value) || !thread->WriteReg(addr, _byteswap_ulong((u32)reg_value)))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -1013,10 +1012,10 @@ bool handle_access_violation(u32 addr, bool is_writing, x64_context* context)
|
|||
|
||||
switch (d_size)
|
||||
{
|
||||
case 1: reg_value = vm::priv_ref<atomic<u8>>(addr).exchange((u8)reg_value); break;
|
||||
case 2: reg_value = vm::priv_ref<atomic<u16>>(addr).exchange((u16)reg_value); break;
|
||||
case 4: reg_value = vm::priv_ref<atomic<u32>>(addr).exchange((u32)reg_value); break;
|
||||
case 8: reg_value = vm::priv_ref<atomic<u64>>(addr).exchange((u64)reg_value); break;
|
||||
case 1: reg_value = vm::priv_ref<atomic_t<u8>>(addr).exchange((u8)reg_value); break;
|
||||
case 2: reg_value = vm::priv_ref<atomic_t<u16>>(addr).exchange((u16)reg_value); break;
|
||||
case 4: reg_value = vm::priv_ref<atomic_t<u32>>(addr).exchange((u32)reg_value); break;
|
||||
case 8: reg_value = vm::priv_ref<atomic_t<u64>>(addr).exchange((u64)reg_value); break;
|
||||
default: return false;
|
||||
}
|
||||
|
||||
|
@ -1036,10 +1035,10 @@ bool handle_access_violation(u32 addr, bool is_writing, x64_context* context)
|
|||
|
||||
switch (d_size)
|
||||
{
|
||||
case 1: old_value = vm::priv_ref<atomic<u8>>(addr).compare_and_swap((u8)cmp_value, (u8)reg_value); break;
|
||||
case 2: old_value = vm::priv_ref<atomic<u16>>(addr).compare_and_swap((u16)cmp_value, (u16)reg_value); break;
|
||||
case 4: old_value = vm::priv_ref<atomic<u32>>(addr).compare_and_swap((u32)cmp_value, (u32)reg_value); break;
|
||||
case 8: old_value = vm::priv_ref<atomic<u64>>(addr).compare_and_swap((u64)cmp_value, (u64)reg_value); break;
|
||||
case 1: old_value = vm::priv_ref<atomic_t<u8>>(addr).compare_and_swap((u8)cmp_value, (u8)reg_value); break;
|
||||
case 2: old_value = vm::priv_ref<atomic_t<u16>>(addr).compare_and_swap((u16)cmp_value, (u16)reg_value); break;
|
||||
case 4: old_value = vm::priv_ref<atomic_t<u32>>(addr).compare_and_swap((u32)cmp_value, (u32)reg_value); break;
|
||||
case 8: old_value = vm::priv_ref<atomic_t<u64>>(addr).compare_and_swap((u64)cmp_value, (u64)reg_value); break;
|
||||
default: return false;
|
||||
}
|
||||
|
||||
|
@ -1059,10 +1058,10 @@ bool handle_access_violation(u32 addr, bool is_writing, x64_context* context)
|
|||
|
||||
switch (d_size)
|
||||
{
|
||||
case 1: value = vm::priv_ref<atomic<u8>>(addr) &= value; break;
|
||||
case 2: value = vm::priv_ref<atomic<u16>>(addr) &= value; break;
|
||||
case 4: value = vm::priv_ref<atomic<u32>>(addr) &= value; break;
|
||||
case 8: value = vm::priv_ref<atomic<u64>>(addr) &= value; break;
|
||||
case 1: value = vm::priv_ref<atomic_t<u8>>(addr) &= (u8)value; break;
|
||||
case 2: value = vm::priv_ref<atomic_t<u16>>(addr) &= (u16)value; break;
|
||||
case 4: value = vm::priv_ref<atomic_t<u32>>(addr) &= (u32)value; break;
|
||||
case 8: value = vm::priv_ref<atomic_t<u64>>(addr) &= value; break;
|
||||
default: return false;
|
||||
}
|
||||
|
||||
|
@ -1096,7 +1095,7 @@ void _se_translator(unsigned int u, EXCEPTION_POINTERS* pExp)
|
|||
|
||||
if (u == EXCEPTION_ACCESS_VIOLATION && (u32)addr64 == addr64)
|
||||
{
|
||||
throw fmt::format("Access violation %s location 0x%llx", is_writing ? "writing" : "reading", addr64);
|
||||
throw EXCEPTION("Access violation %s location 0x%llx", is_writing ? "writing" : "reading", addr64);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1107,7 +1106,7 @@ const PVOID exception_handler = (atexit([]{ RemoveVectoredExceptionHandler(excep
|
|||
|
||||
if (pExp->ExceptionRecord->ExceptionCode == EXCEPTION_ACCESS_VIOLATION &&
|
||||
(u32)addr64 == addr64 &&
|
||||
GetCurrentNamedThread() &&
|
||||
get_current_thread_ctrl() &&
|
||||
handle_access_violation((u32)addr64, is_writing, pExp->ContextRecord))
|
||||
{
|
||||
return EXCEPTION_CONTINUE_EXECUTION;
|
||||
|
@ -1118,6 +1117,13 @@ const PVOID exception_handler = (atexit([]{ RemoveVectoredExceptionHandler(excep
|
|||
}
|
||||
}));
|
||||
|
||||
const auto exception_filter = SetUnhandledExceptionFilter([](PEXCEPTION_POINTERS pExp) -> LONG
|
||||
{
|
||||
_se_translator(pExp->ExceptionRecord->ExceptionCode, pExp);
|
||||
|
||||
return EXCEPTION_CONTINUE_SEARCH;
|
||||
});
|
||||
|
||||
#else
|
||||
|
||||
void signal_handler(int sig, siginfo_t* info, void* uct)
|
||||
|
@ -1130,7 +1136,7 @@ void signal_handler(int sig, siginfo_t* info, void* uct)
|
|||
const bool is_writing = ((ucontext_t*)uct)->uc_mcontext.gregs[REG_ERR] & 0x2;
|
||||
#endif
|
||||
|
||||
if ((u32)addr64 == addr64 && GetCurrentNamedThread())
|
||||
if ((u32)addr64 == addr64 && get_current_thread_ctrl())
|
||||
{
|
||||
if (handle_access_violation((u32)addr64, is_writing, (ucontext_t*)uct))
|
||||
{
|
||||
|
@ -1138,7 +1144,7 @@ void signal_handler(int sig, siginfo_t* info, void* uct)
|
|||
}
|
||||
|
||||
// TODO: this may be wrong
|
||||
throw fmt::format("Access violation %s location 0x%llx", is_writing ? "writing" : "reading", addr64);
|
||||
throw EXCEPTION("Access violation %s location 0x%llx", is_writing ? "writing" : "reading", addr64);
|
||||
}
|
||||
|
||||
// else some fatal error
|
||||
|
@ -1157,19 +1163,23 @@ const int sigaction_result = []() -> int
|
|||
|
||||
#endif
|
||||
|
||||
thread_local NamedThreadBase* g_tls_this_thread = nullptr;
|
||||
std::atomic<u32> g_thread_count(0);
|
||||
thread_local thread_ctrl_t* g_tls_this_thread = nullptr;
|
||||
|
||||
NamedThreadBase* GetCurrentNamedThread()
|
||||
const thread_ctrl_t* get_current_thread_ctrl()
|
||||
{
|
||||
return g_tls_this_thread;
|
||||
}
|
||||
|
||||
void SetCurrentNamedThread(NamedThreadBase* value)
|
||||
std::string thread_ctrl_t::get_name() const
|
||||
{
|
||||
return name();
|
||||
}
|
||||
|
||||
void thread_ctrl_t::set_current()
|
||||
{
|
||||
const auto old_value = g_tls_this_thread;
|
||||
|
||||
if (old_value == value)
|
||||
if (old_value == this)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -1179,76 +1189,75 @@ void SetCurrentNamedThread(NamedThreadBase* value)
|
|||
vm::reservation_free();
|
||||
}
|
||||
|
||||
if (value && value->m_tls_assigned.exchange(true))
|
||||
if (true && assigned.exchange(true))
|
||||
{
|
||||
LOG_ERROR(GENERAL, "Thread '%s' was already assigned to g_tls_this_thread of another thread", value->GetThreadName());
|
||||
LOG_ERROR(GENERAL, "Thread '%s' was already assigned to g_tls_this_thread of another thread", get_name());
|
||||
g_tls_this_thread = nullptr;
|
||||
}
|
||||
else
|
||||
{
|
||||
g_tls_this_thread = value;
|
||||
g_tls_this_thread = this;
|
||||
}
|
||||
|
||||
if (old_value)
|
||||
{
|
||||
old_value->m_tls_assigned = false;
|
||||
old_value->assigned = false;
|
||||
}
|
||||
}
|
||||
|
||||
std::string NamedThreadBase::GetThreadName() const
|
||||
thread_t::thread_t(std::function<std::string()> name, std::function<void()> func)
|
||||
{
|
||||
return m_name;
|
||||
start(std::move(name), func);
|
||||
}
|
||||
|
||||
void NamedThreadBase::SetThreadName(const std::string& name)
|
||||
thread_t::~thread_t() noexcept(false)
|
||||
{
|
||||
m_name = name;
|
||||
}
|
||||
|
||||
void NamedThreadBase::WaitForAnySignal(u64 time) // wait for Notify() signal or sleep
|
||||
{
|
||||
std::unique_lock<std::mutex> lock(m_signal_mtx);
|
||||
m_signal_cv.wait_for(lock, std::chrono::milliseconds(time));
|
||||
}
|
||||
|
||||
void NamedThreadBase::Notify() // wake up waiting thread or nothing
|
||||
{
|
||||
m_signal_cv.notify_one();
|
||||
}
|
||||
|
||||
ThreadBase::ThreadBase(const std::string& name)
|
||||
: NamedThreadBase(name)
|
||||
, m_executor(nullptr)
|
||||
, m_destroy(false)
|
||||
, m_alive(false)
|
||||
{
|
||||
}
|
||||
|
||||
ThreadBase::~ThreadBase()
|
||||
{
|
||||
if(IsAlive())
|
||||
Stop(false);
|
||||
|
||||
delete m_executor;
|
||||
m_executor = nullptr;
|
||||
}
|
||||
|
||||
void ThreadBase::Start()
|
||||
{
|
||||
if(m_executor) Stop();
|
||||
|
||||
std::lock_guard<std::mutex> lock(m_main_mutex);
|
||||
|
||||
m_destroy = false;
|
||||
m_alive = true;
|
||||
|
||||
m_executor = new std::thread([this]()
|
||||
if (m_thread)
|
||||
{
|
||||
SetCurrentThreadDebugName(GetThreadName().c_str());
|
||||
throw EXCEPTION("Neither joined nor detached");
|
||||
}
|
||||
}
|
||||
|
||||
std::string thread_t::get_name() const
|
||||
{
|
||||
if (!m_thread)
|
||||
{
|
||||
throw EXCEPTION("Invalid thread");
|
||||
}
|
||||
|
||||
if (!m_thread->name)
|
||||
{
|
||||
throw EXCEPTION("Invalid name getter");
|
||||
}
|
||||
|
||||
return m_thread->name();
|
||||
}
|
||||
|
||||
std::atomic<u32> g_thread_count{ 0 };
|
||||
|
||||
void thread_t::start(std::function<std::string()> name, std::function<void()> func)
|
||||
{
|
||||
if (m_thread)
|
||||
{
|
||||
throw EXCEPTION("Thread already exists");
|
||||
}
|
||||
|
||||
// create new thread control variable
|
||||
m_thread = std::make_shared<thread_ctrl_t>(std::move(name));
|
||||
|
||||
// start thread
|
||||
m_thread->m_thread = std::thread([](std::shared_ptr<thread_ctrl_t> ctrl, std::function<void()> func)
|
||||
{
|
||||
g_thread_count++;
|
||||
|
||||
SetCurrentThreadDebugName(ctrl->get_name().c_str());
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
auto old_se_translator = _set_se_translator(_se_translator);
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
auto old_se_translator = _set_se_translator(_se_translator);
|
||||
if (!exception_handler)
|
||||
if (!exception_handler || !exception_filter)
|
||||
{
|
||||
LOG_ERROR(GENERAL, "exception_handler not set");
|
||||
return;
|
||||
|
@ -1261,232 +1270,125 @@ void ThreadBase::Start()
|
|||
}
|
||||
#endif
|
||||
|
||||
SetCurrentNamedThread(this);
|
||||
g_thread_count++;
|
||||
// error handler
|
||||
const auto error = [&](const char* text)
|
||||
{
|
||||
log_message(GENERAL, Emu.IsStopped() ? Log::Severity::Warning : Log::Severity::Error, "Exception: %s", text);
|
||||
Emu.Pause();
|
||||
};
|
||||
|
||||
try
|
||||
{
|
||||
Task();
|
||||
ctrl->set_current();
|
||||
|
||||
if (Ini.HLELogging.GetValue())
|
||||
{
|
||||
LOG_NOTICE(GENERAL, "Thread started");
|
||||
}
|
||||
|
||||
func();
|
||||
}
|
||||
catch (const char* e)
|
||||
catch (const char* e) // obsolete
|
||||
{
|
||||
LOG_ERROR(GENERAL, "Exception: %s", e);
|
||||
DumpInformation();
|
||||
Emu.Pause();
|
||||
LOG_ERROR(GENERAL, "Deprecated exception type (const char*)");
|
||||
error(e);
|
||||
}
|
||||
catch (const std::string& e)
|
||||
catch (const std::string& e) // obsolete
|
||||
{
|
||||
LOG_ERROR(GENERAL, "Exception: %s", e);
|
||||
DumpInformation();
|
||||
Emu.Pause();
|
||||
LOG_ERROR(GENERAL, "Deprecated exception type (std::string)");
|
||||
error(e.c_str());
|
||||
}
|
||||
|
||||
m_alive = false;
|
||||
SetCurrentNamedThread(nullptr);
|
||||
g_thread_count--;
|
||||
|
||||
#ifdef _WIN32
|
||||
_set_se_translator(old_se_translator);
|
||||
#endif
|
||||
});
|
||||
}
|
||||
|
||||
void ThreadBase::Stop(bool wait, bool send_destroy)
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(m_main_mutex);
|
||||
|
||||
if (send_destroy)
|
||||
m_destroy = true;
|
||||
|
||||
if(!m_executor)
|
||||
return;
|
||||
|
||||
if(wait && m_executor->joinable() && m_alive)
|
||||
{
|
||||
m_executor->join();
|
||||
}
|
||||
else
|
||||
{
|
||||
m_executor->detach();
|
||||
}
|
||||
|
||||
delete m_executor;
|
||||
m_executor = nullptr;
|
||||
}
|
||||
|
||||
bool ThreadBase::Join() const
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(m_main_mutex);
|
||||
if(m_executor->joinable() && m_alive && m_executor != nullptr)
|
||||
{
|
||||
m_executor->join();
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool ThreadBase::IsAlive() const
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(m_main_mutex);
|
||||
return m_alive;
|
||||
}
|
||||
|
||||
bool ThreadBase::TestDestroy() const
|
||||
{
|
||||
return m_destroy;
|
||||
}
|
||||
|
||||
thread_t::thread_t(const std::string& name, bool autojoin, std::function<void()> func)
|
||||
: m_name(name)
|
||||
, m_state(TS_NON_EXISTENT)
|
||||
, m_autojoin(autojoin)
|
||||
{
|
||||
start(func);
|
||||
}
|
||||
|
||||
thread_t::thread_t(const std::string& name, std::function<void()> func)
|
||||
: m_name(name)
|
||||
, m_state(TS_NON_EXISTENT)
|
||||
, m_autojoin(false)
|
||||
{
|
||||
start(func);
|
||||
}
|
||||
|
||||
thread_t::thread_t(const std::string& name)
|
||||
: m_name(name)
|
||||
, m_state(TS_NON_EXISTENT)
|
||||
, m_autojoin(false)
|
||||
{
|
||||
}
|
||||
|
||||
thread_t::thread_t()
|
||||
: m_state(TS_NON_EXISTENT)
|
||||
, m_autojoin(false)
|
||||
{
|
||||
}
|
||||
|
||||
void thread_t::set_name(const std::string& name)
|
||||
{
|
||||
m_name = name;
|
||||
}
|
||||
|
||||
thread_t::~thread_t()
|
||||
{
|
||||
if (m_state == TS_JOINABLE)
|
||||
{
|
||||
if (m_autojoin)
|
||||
catch (const fmt::exception& e)
|
||||
{
|
||||
m_thr.join();
|
||||
error(e);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_thr.detach();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void thread_t::start(std::function<void()> func)
|
||||
{
|
||||
if (m_state.exchange(TS_NON_EXISTENT) == TS_JOINABLE)
|
||||
{
|
||||
m_thr.join(); // forcefully join previously created thread
|
||||
}
|
||||
|
||||
std::string name = m_name;
|
||||
m_thr = std::thread([func, name]()
|
||||
{
|
||||
SetCurrentThreadDebugName(name.c_str());
|
||||
|
||||
#ifdef _WIN32
|
||||
auto old_se_translator = _set_se_translator(_se_translator);
|
||||
#endif
|
||||
|
||||
NamedThreadBase info(name);
|
||||
SetCurrentNamedThread(&info);
|
||||
g_thread_count++;
|
||||
|
||||
if (Ini.HLELogging.GetValue())
|
||||
{
|
||||
LOG_NOTICE(HLE, name + " started");
|
||||
LOG_NOTICE(GENERAL, "Thread ended");
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
func();
|
||||
}
|
||||
catch (const char* e)
|
||||
{
|
||||
LOG_ERROR(GENERAL, "Exception: %s", e);
|
||||
Emu.Pause();
|
||||
}
|
||||
catch (const std::string& e)
|
||||
{
|
||||
LOG_ERROR(GENERAL, "Exception: %s", e.c_str());
|
||||
Emu.Pause();
|
||||
}
|
||||
//ctrl->set_current(false);
|
||||
|
||||
if (Emu.IsStopped())
|
||||
{
|
||||
LOG_NOTICE(HLE, name + " aborted");
|
||||
}
|
||||
else if (Ini.HLELogging.GetValue())
|
||||
{
|
||||
LOG_NOTICE(HLE, name + " ended");
|
||||
}
|
||||
vm::reservation_free();
|
||||
|
||||
SetCurrentNamedThread(nullptr);
|
||||
g_thread_count--;
|
||||
|
||||
#ifdef _WIN32
|
||||
#if defined(_MSC_VER)
|
||||
_set_se_translator(old_se_translator);
|
||||
#endif
|
||||
});
|
||||
|
||||
if (m_state.exchange(TS_JOINABLE) == TS_JOINABLE)
|
||||
{
|
||||
assert(!"thread_t::start() failed"); // probably started from another thread
|
||||
}
|
||||
}, m_thread, std::move(func));
|
||||
}
|
||||
|
||||
void thread_t::detach()
|
||||
{
|
||||
if (m_state.exchange(TS_NON_EXISTENT) == TS_JOINABLE)
|
||||
if (!m_thread)
|
||||
{
|
||||
m_thr.detach();
|
||||
throw EXCEPTION("Invalid thread");
|
||||
}
|
||||
else
|
||||
|
||||
// +clear m_thread
|
||||
const auto ctrl = std::move(m_thread);
|
||||
|
||||
// notify if detached by another thread
|
||||
if (g_tls_this_thread != m_thread.get())
|
||||
{
|
||||
assert(!"thread_t::detach() failed"); // probably joined or detached
|
||||
// lock for reliable notification
|
||||
std::lock_guard<std::mutex> lock(mutex);
|
||||
|
||||
cv.notify_one();
|
||||
}
|
||||
|
||||
ctrl->m_thread.detach();
|
||||
}
|
||||
|
||||
void thread_t::join()
|
||||
{
|
||||
if (m_state.exchange(TS_NON_EXISTENT) == TS_JOINABLE)
|
||||
if (!m_thread)
|
||||
{
|
||||
m_thr.join();
|
||||
throw EXCEPTION("Invalid thread");
|
||||
}
|
||||
else
|
||||
|
||||
if (g_tls_this_thread == m_thread.get())
|
||||
{
|
||||
assert(!"thread_t::join() failed"); // probably joined or detached
|
||||
throw EXCEPTION("Deadlock");
|
||||
}
|
||||
|
||||
// +clear m_thread
|
||||
const auto ctrl = std::move(m_thread);
|
||||
|
||||
{
|
||||
// lock for reliable notification
|
||||
std::lock_guard<std::mutex> lock(mutex);
|
||||
|
||||
cv.notify_one();
|
||||
}
|
||||
|
||||
ctrl->m_thread.join();
|
||||
}
|
||||
|
||||
bool thread_t::joinable() const
|
||||
bool thread_t::is_current() const
|
||||
{
|
||||
//return m_thr.joinable();
|
||||
return m_state == TS_JOINABLE;
|
||||
if (!m_thread)
|
||||
{
|
||||
throw EXCEPTION("Invalid thread");
|
||||
}
|
||||
|
||||
return g_tls_this_thread == m_thread.get();
|
||||
}
|
||||
|
||||
bool waiter_map_t::is_stopped(u64 signal_id)
|
||||
void waiter_map_t::check_emu_status(u32 addr)
|
||||
{
|
||||
if (Emu.IsStopped())
|
||||
{
|
||||
LOG_WARNING(Log::HLE, "%s: waiter_op() aborted (signal_id=0x%llx)", name.c_str(), signal_id);
|
||||
return true;
|
||||
throw EXCEPTION("Aborted (emulation stopped) (%s, addr=0x%x)", name, addr);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void waiter_map_t::notify(u32 addr)
|
||||
{
|
||||
// signal an appropriate condition variable
|
||||
cvs[get_hash(addr)].notify_all();
|
||||
}
|
||||
|
||||
const std::function<bool()> SQUEUE_ALWAYS_EXIT = [](){ return true; };
|
||||
|
|
|
@ -1,112 +1,108 @@
|
|||
#pragma once
|
||||
|
||||
class NamedThreadBase
|
||||
const class thread_ctrl_t* get_current_thread_ctrl();
|
||||
|
||||
// named thread control class
|
||||
class thread_ctrl_t final
|
||||
{
|
||||
std::string m_name;
|
||||
std::condition_variable m_signal_cv;
|
||||
std::mutex m_signal_mtx;
|
||||
friend class thread_t;
|
||||
|
||||
// thread handler
|
||||
std::thread m_thread;
|
||||
|
||||
// name getter
|
||||
const std::function<std::string()> name;
|
||||
|
||||
// true if assigned somewhere in TLS
|
||||
std::atomic<bool> assigned{ false };
|
||||
|
||||
// assign TLS (must be assigned only once)
|
||||
void set_current();
|
||||
|
||||
public:
|
||||
std::atomic<bool> m_tls_assigned;
|
||||
|
||||
NamedThreadBase(const std::string& name) : m_name(name), m_tls_assigned(false)
|
||||
thread_ctrl_t(std::function<std::string()> name)
|
||||
: name(std::move(name))
|
||||
{
|
||||
}
|
||||
|
||||
NamedThreadBase() : m_tls_assigned(false)
|
||||
{
|
||||
}
|
||||
|
||||
virtual std::string GetThreadName() const;
|
||||
virtual void SetThreadName(const std::string& name);
|
||||
|
||||
void WaitForAnySignal(u64 time = 1);
|
||||
void Notify();
|
||||
|
||||
virtual void DumpInformation() {}
|
||||
};
|
||||
|
||||
NamedThreadBase* GetCurrentNamedThread();
|
||||
void SetCurrentNamedThread(NamedThreadBase* value);
|
||||
|
||||
class ThreadBase : public NamedThreadBase
|
||||
{
|
||||
protected:
|
||||
std::atomic<bool> m_destroy;
|
||||
std::atomic<bool> m_alive;
|
||||
std::thread* m_executor;
|
||||
|
||||
mutable std::mutex m_main_mutex;
|
||||
|
||||
ThreadBase(const std::string& name);
|
||||
~ThreadBase();
|
||||
|
||||
public:
|
||||
void Start();
|
||||
void Stop(bool wait = true, bool send_destroy = true);
|
||||
|
||||
bool Join() const;
|
||||
bool IsAlive() const;
|
||||
bool TestDestroy() const;
|
||||
|
||||
virtual void Task() = 0;
|
||||
// get thread name
|
||||
std::string get_name() const;
|
||||
};
|
||||
|
||||
class thread_t
|
||||
{
|
||||
enum thread_state_t
|
||||
{
|
||||
TS_NON_EXISTENT,
|
||||
TS_JOINABLE,
|
||||
};
|
||||
|
||||
std::atomic<thread_state_t> m_state;
|
||||
std::string m_name;
|
||||
std::thread m_thr;
|
||||
bool m_autojoin;
|
||||
// pointer to managed resource (shared with actual thread)
|
||||
std::shared_ptr<thread_ctrl_t> m_thread;
|
||||
|
||||
public:
|
||||
thread_t(const std::string& name, bool autojoin, std::function<void()> func);
|
||||
thread_t(const std::string& name, std::function<void()> func);
|
||||
thread_t(const std::string& name);
|
||||
thread_t();
|
||||
~thread_t();
|
||||
// thread mutex for external use
|
||||
std::mutex mutex;
|
||||
|
||||
thread_t(const thread_t& right) = delete;
|
||||
thread_t(thread_t&& right) = delete;
|
||||
|
||||
thread_t& operator =(const thread_t& right) = delete;
|
||||
thread_t& operator =(thread_t&& right) = delete;
|
||||
// thread condition variable for external use
|
||||
std::condition_variable cv;
|
||||
|
||||
public:
|
||||
void set_name(const std::string& name);
|
||||
void start(std::function<void()> func);
|
||||
// initialize in empty state
|
||||
thread_t() = default;
|
||||
|
||||
// create named thread
|
||||
thread_t(std::function<std::string()> name, std::function<void()> func);
|
||||
|
||||
// destructor, joins automatically (questionable, don't rely on this functionality in derived destructors)
|
||||
virtual ~thread_t() noexcept(false);
|
||||
|
||||
thread_t(const thread_t&) = delete;
|
||||
|
||||
thread_t& operator =(const thread_t&) = delete;
|
||||
|
||||
public:
|
||||
// get thread name
|
||||
std::string get_name() const;
|
||||
|
||||
// create named thread (current state must be empty)
|
||||
void start(std::function<std::string()> name, std::function<void()> func);
|
||||
|
||||
// detach thread -> empty state
|
||||
void detach();
|
||||
|
||||
// join thread -> empty state
|
||||
void join();
|
||||
bool joinable() const;
|
||||
|
||||
// check if not empty
|
||||
bool joinable() const { return m_thread.operator bool(); }
|
||||
|
||||
// check whether it is the current running thread
|
||||
bool is_current() const;
|
||||
};
|
||||
|
||||
class slw_mutex_t
|
||||
class autojoin_thread_t final : private thread_t
|
||||
{
|
||||
public:
|
||||
using thread_t::mutex;
|
||||
using thread_t::cv;
|
||||
|
||||
};
|
||||
public:
|
||||
autojoin_thread_t() = delete;
|
||||
|
||||
class slw_recursive_mutex_t
|
||||
{
|
||||
autojoin_thread_t(std::function<std::string()> name, std::function<void()> func)
|
||||
{
|
||||
start(std::move(name), std::move(func));
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
class slw_shared_mutex_t
|
||||
{
|
||||
virtual ~autojoin_thread_t() override
|
||||
{
|
||||
join();
|
||||
}
|
||||
|
||||
using thread_t::is_current;
|
||||
};
|
||||
|
||||
struct waiter_map_t
|
||||
{
|
||||
static const size_t size = 32;
|
||||
static const size_t size = 16;
|
||||
|
||||
std::array<std::mutex, size> mutex;
|
||||
std::array<std::condition_variable, size> cv;
|
||||
std::array<std::mutex, size> mutexes;
|
||||
std::array<std::condition_variable, size> cvs;
|
||||
|
||||
const std::string name;
|
||||
|
||||
|
@ -115,40 +111,45 @@ struct waiter_map_t
|
|||
{
|
||||
}
|
||||
|
||||
bool is_stopped(u64 signal_id);
|
||||
|
||||
// wait until waiter_func() returns true, signal_id is an arbitrary number
|
||||
template<typename S, typename WT> force_inline safe_buffers void wait_op(const S& signal_id, const WT waiter_func)
|
||||
// generate simple "hash" for mutex/cv distribution
|
||||
u32 get_hash(u32 addr)
|
||||
{
|
||||
// generate hash
|
||||
const auto hash = std::hash<S>()(signal_id) % size;
|
||||
addr ^= addr >> 16;
|
||||
addr ^= addr >> 24;
|
||||
addr ^= addr >> 28;
|
||||
return addr % size;
|
||||
}
|
||||
|
||||
void check_emu_status(u32 addr);
|
||||
|
||||
// wait until pred() returns true, `addr` is an arbitrary number
|
||||
template<typename F, typename... Args> safe_buffers auto wait_op(u32 addr, F pred, Args&&... args) -> decltype(static_cast<void>(pred(args...)))
|
||||
{
|
||||
const u32 hash = get_hash(addr);
|
||||
|
||||
// set mutex locker
|
||||
std::unique_lock<std::mutex> locker(mutex[hash], std::defer_lock);
|
||||
std::unique_lock<std::mutex> lock(mutexes[hash], std::defer_lock);
|
||||
|
||||
// check the condition or if the emulator is stopped
|
||||
while (!waiter_func() && !is_stopped(signal_id))
|
||||
while (true)
|
||||
{
|
||||
// lock the mutex and initialize waiter (only once)
|
||||
if (!locker.owns_lock())
|
||||
// check the condition
|
||||
if (pred(args...)) return;
|
||||
|
||||
check_emu_status(addr);
|
||||
|
||||
if (!lock)
|
||||
{
|
||||
locker.lock();
|
||||
lock.lock();
|
||||
continue;
|
||||
}
|
||||
|
||||
// wait on appropriate condition variable for 1 ms or until signal arrived
|
||||
cv[hash].wait_for(locker, std::chrono::milliseconds(1));
|
||||
// wait on an appropriate cond var for 1 ms or until a signal arrived
|
||||
cvs[hash].wait_for(lock, std::chrono::milliseconds(1));
|
||||
}
|
||||
}
|
||||
|
||||
// signal all threads waiting on waiter_op() with the same signal_id (signaling only hints those threads that corresponding conditions are *probably* met)
|
||||
template<typename S> force_inline void notify(const S& signal_id)
|
||||
{
|
||||
// generate hash
|
||||
const auto hash = std::hash<S>()(signal_id) % size;
|
||||
|
||||
// signal appropriate condition variable
|
||||
cv[hash].notify_all();
|
||||
}
|
||||
// signal all threads waiting on wait_op() with the same `addr` (signaling only hints those threads that corresponding conditions are *probably* met)
|
||||
void notify(u32 addr);
|
||||
};
|
||||
|
||||
extern const std::function<bool()> SQUEUE_ALWAYS_EXIT;
|
||||
|
@ -173,7 +174,7 @@ class squeue_t
|
|||
};
|
||||
};
|
||||
|
||||
atomic<squeue_sync_var_t> m_sync;
|
||||
atomic_t<squeue_sync_var_t> m_sync;
|
||||
|
||||
mutable std::mutex m_rcv_mutex;
|
||||
mutable std::mutex m_wcv_mutex;
|
||||
|
@ -209,7 +210,7 @@ public:
|
|||
{
|
||||
u32 pos = 0;
|
||||
|
||||
while (u32 res = m_sync.atomic_op_sync(SQSVR_OK, [&pos](squeue_sync_var_t& sync) -> u32
|
||||
while (u32 res = m_sync.atomic_op([&pos](squeue_sync_var_t& sync) -> u32
|
||||
{
|
||||
assert(sync.count <= sq_size);
|
||||
assert(sync.position < sq_size);
|
||||
|
@ -272,7 +273,7 @@ public:
|
|||
{
|
||||
u32 pos = 0;
|
||||
|
||||
while (u32 res = m_sync.atomic_op_sync(SQSVR_OK, [&pos](squeue_sync_var_t& sync) -> u32
|
||||
while (u32 res = m_sync.atomic_op([&pos](squeue_sync_var_t& sync) -> u32
|
||||
{
|
||||
assert(sync.count <= sq_size);
|
||||
assert(sync.position < sq_size);
|
||||
|
@ -341,7 +342,7 @@ public:
|
|||
assert(start_pos < sq_size);
|
||||
u32 pos = 0;
|
||||
|
||||
while (u32 res = m_sync.atomic_op_sync(SQSVR_OK, [&pos, start_pos](squeue_sync_var_t& sync) -> u32
|
||||
while (u32 res = m_sync.atomic_op([&pos, start_pos](squeue_sync_var_t& sync) -> u32
|
||||
{
|
||||
assert(sync.count <= sq_size);
|
||||
assert(sync.position < sq_size);
|
||||
|
@ -425,7 +426,7 @@ public:
|
|||
{
|
||||
u32 pos, count;
|
||||
|
||||
while (m_sync.atomic_op_sync(SQSVR_OK, [&pos, &count](squeue_sync_var_t& sync) -> u32
|
||||
while (m_sync.atomic_op([&pos, &count](squeue_sync_var_t& sync) -> u32
|
||||
{
|
||||
assert(sync.count <= sq_size);
|
||||
assert(sync.position < sq_size);
|
||||
|
@ -463,7 +464,7 @@ public:
|
|||
|
||||
void clear()
|
||||
{
|
||||
while (m_sync.atomic_op_sync(SQSVR_OK, [](squeue_sync_var_t& sync) -> u32
|
||||
while (m_sync.atomic_op([](squeue_sync_var_t& sync) -> u32
|
||||
{
|
||||
assert(sync.count <= sq_size);
|
||||
assert(sync.position < sq_size);
|
||||
|
|
|
@ -35,7 +35,7 @@ void rImage::SaveFile(const std::string& name, rImageType type)
|
|||
}
|
||||
else
|
||||
{
|
||||
throw std::string("unsupported type");
|
||||
throw EXCEPTION("unsupported type");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -133,7 +133,7 @@ wxDateTime::TimeZone convertTZ(rDateTime::rTimeZone tz)
|
|||
case rDateTime::UTC:
|
||||
return wxDateTime::UTC;
|
||||
default:
|
||||
throw std::string("WRONG DATETIME");
|
||||
throw EXCEPTION("WRONG DATETIME");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -179,7 +179,7 @@ bool UnpackEntry(const fs::file& dec_pkg_f, const PKGEntry& entry, std::string d
|
|||
dec_pkg_f.read(buf, entry.name_size);
|
||||
buf[entry.name_size] = 0;
|
||||
|
||||
switch (entry.type.data() >> 24)
|
||||
switch (entry.type & 0xff)
|
||||
{
|
||||
case PKG_FILE_ENTRY_NPDRM:
|
||||
case PKG_FILE_ENTRY_NPDRMEDAT:
|
||||
|
|
|
@ -102,34 +102,34 @@ force_inline void Write64LE(const fs::file& f, const u64 data)
|
|||
f.write(&data, sizeof(data));
|
||||
}
|
||||
|
||||
force_inline void Write16(vfsStream& f, const u16 data)
|
||||
force_inline void Write16(vfsStream& f, const be_t<u16> data)
|
||||
{
|
||||
Write16LE(f, re16(data));
|
||||
f.Write(&data, sizeof(data));
|
||||
}
|
||||
|
||||
force_inline void Write16(const fs::file& f, const u16 data)
|
||||
force_inline void Write16(const fs::file& f, const be_t<u16> data)
|
||||
{
|
||||
Write16LE(f, re16(data));
|
||||
f.write(&data, sizeof(data));
|
||||
}
|
||||
|
||||
force_inline void Write32(vfsStream& f, const u32 data)
|
||||
force_inline void Write32(vfsStream& f, const be_t<u32> data)
|
||||
{
|
||||
Write32LE(f, re32(data));
|
||||
f.Write(&data, sizeof(data));
|
||||
}
|
||||
|
||||
force_inline void Write32(const fs::file& f, const u32 data)
|
||||
force_inline void Write32(const fs::file& f, const be_t<u32> data)
|
||||
{
|
||||
Write32LE(f, re32(data));
|
||||
f.write(&data, sizeof(data));
|
||||
}
|
||||
|
||||
force_inline void Write64(vfsStream& f, const u64 data)
|
||||
force_inline void Write64(vfsStream& f, const be_t<u64> data)
|
||||
{
|
||||
Write64LE(f, re64(data));
|
||||
f.Write(&data, sizeof(data));
|
||||
}
|
||||
|
||||
force_inline void Write64(const fs::file& f, const u64 data)
|
||||
force_inline void Write64(const fs::file& f, const be_t<u64> data)
|
||||
{
|
||||
Write64LE(f, re64(data));
|
||||
f.write(&data, sizeof(data));
|
||||
}
|
||||
|
||||
void WriteEhdr(const fs::file& f, Elf64_Ehdr& ehdr)
|
||||
|
@ -935,9 +935,9 @@ bool SELFDecrypter::DecryptNPDRM(u8 *metadata, u32 metadata_size)
|
|||
bool SELFDecrypter::LoadMetadata()
|
||||
{
|
||||
aes_context aes;
|
||||
u32 metadata_info_size = sizeof(meta_info);
|
||||
u32 metadata_info_size = sizeof32(meta_info);
|
||||
u8 *metadata_info = (u8 *)malloc(metadata_info_size);
|
||||
u32 metadata_headers_size = sce_hdr.se_hsize - (sizeof(sce_hdr) + sce_hdr.se_meta + sizeof(meta_info));
|
||||
u32 metadata_headers_size = sce_hdr.se_hsize - (sizeof32(sce_hdr) + sce_hdr.se_meta + sizeof32(meta_info));
|
||||
u8 *metadata_headers = (u8 *)malloc(metadata_headers_size);
|
||||
|
||||
// Locate and read the encrypted metadata info.
|
||||
|
|
|
@ -7,12 +7,11 @@ namespace vm
|
|||
template<typename AT, typename RT, typename... T>
|
||||
force_inline RT _ptr_base<RT(T...), AT>::operator()(ARMv7Context& context, T... args) const
|
||||
{
|
||||
return psv_func_detail::func_caller<RT, T...>::call(context, vm::cast(this->addr()), args...);
|
||||
return psv_func_detail::func_caller<RT, T...>::call(context, VM_CAST(this->addr()), args...);
|
||||
}
|
||||
}
|
||||
|
||||
template<typename RT, typename... T>
|
||||
force_inline RT cb_call(ARMv7Context& context, u32 addr, T... args)
|
||||
template<typename RT, typename... T> inline RT cb_call(ARMv7Context& context, u32 addr, T... args)
|
||||
{
|
||||
return psv_func_detail::func_caller<RT, T...>::call(context, addr, args...);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#pragma once
|
||||
|
||||
class ARMv7Thread;
|
||||
#include "Emu/Memory/Memory.h"
|
||||
|
||||
enum ARMv7InstructionSet
|
||||
{
|
||||
|
@ -107,7 +107,7 @@ struct ARMv7Context
|
|||
|
||||
operator bool() const
|
||||
{
|
||||
return check_state;
|
||||
return check_state != 0;
|
||||
}
|
||||
|
||||
} ITSTATE;
|
||||
|
@ -122,19 +122,34 @@ struct ARMv7Context
|
|||
|
||||
std::array<perf_counter, 6> counters;
|
||||
|
||||
ARMv7Thread& thread;
|
||||
u32 PC;
|
||||
s32 prio;
|
||||
u32 stack_addr;
|
||||
u32 stack_size;
|
||||
u32 hle_func; // current function ID
|
||||
|
||||
u32 debug; // debug flags
|
||||
u32 debug;
|
||||
std::string debug_str;
|
||||
|
||||
ARMv7Context(ARMv7Thread& thread) : thread(thread), debug(/*DF_DISASM | DF_PRINT*/ 0) {}
|
||||
void write_pc(u32 value, u32 size)
|
||||
{
|
||||
ISET = value & 1 ? Thumb : ARM;
|
||||
PC = (value & ~1) - size;
|
||||
}
|
||||
|
||||
u32 read_pc()
|
||||
{
|
||||
return ISET == ARM ? PC + 8 : PC + 4;
|
||||
}
|
||||
|
||||
u32 get_stack_arg(u32 pos)
|
||||
{
|
||||
return vm::psv::read32(SP + sizeof(u32) * (pos - 5));
|
||||
}
|
||||
|
||||
void write_pc(u32 value);
|
||||
u32 read_pc();
|
||||
u32 get_stack_arg(u32 pos);
|
||||
void fast_call(u32 addr);
|
||||
|
||||
void write_gpr(u32 n, u32 value)
|
||||
void write_gpr(u32 n, u32 value, u32 size)
|
||||
{
|
||||
assert(n < 16);
|
||||
|
||||
|
@ -144,7 +159,7 @@ struct ARMv7Context
|
|||
}
|
||||
else
|
||||
{
|
||||
write_pc(value);
|
||||
write_pc(value, size);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -307,4 +322,3 @@ force_inline T cast_from_armv7_gpr(const u32 reg)
|
|||
{
|
||||
return cast_armv7_gpr<T>::from_gpr(reg);
|
||||
}
|
||||
|
||||
|
|
|
@ -1183,7 +1183,7 @@ struct ARMv7_op4t_table_t
|
|||
}
|
||||
}
|
||||
|
||||
throw "HACK instruction not found";
|
||||
throw EXCEPTION("HACK instruction not found");
|
||||
}
|
||||
|
||||
} g_op4t;
|
||||
|
@ -1221,6 +1221,8 @@ void armv7_decoder_initialize(u32 addr, u32 end_addr, bool dump)
|
|||
//g_opct.clear();
|
||||
//g_opct.reserve(end_addr - addr);
|
||||
|
||||
const auto hack = g_op4t.HACK();
|
||||
|
||||
while (addr < end_addr)
|
||||
{
|
||||
ARMv7Code code = {};
|
||||
|
@ -1280,7 +1282,7 @@ void armv7_decoder_initialize(u32 addr, u32 end_addr, bool dump)
|
|||
const u32 i2 = (code.data >> 11) & 0x1 ^ s ^ 1;
|
||||
const u32 target = (addr + 4 & ~3) + sign<25, u32>(s << 24 | i2 << 23 | i1 << 22 | (code.data & 0x3ff0000) >> 4 | (code.data & 0x7ff) << 1);
|
||||
|
||||
const u32 instr = vm::check_addr(target, 4) ? vm::psv::read32(target) : 0;
|
||||
const u32 instr = vm::check_addr(target, 4) ? vm::psv::read32(target).value() : 0;
|
||||
|
||||
// possibly a call to imported function:
|
||||
if (target >= end_addr && ((target - end_addr) % 16) == 0 && (instr & 0xfff000f0) == 0xe0700090)
|
||||
|
@ -1288,7 +1290,7 @@ void armv7_decoder_initialize(u32 addr, u32 end_addr, bool dump)
|
|||
// replace BLX with "HACK" instruction directly (in Thumb form), it can help to see where it was called from
|
||||
const u32 index = (instr & 0xfff00) >> 4 | (instr & 0xf);
|
||||
vm::psv::write32(addr, 0xf870 | index << 16);
|
||||
g_opct[0xf8700000 | index] = g_op4t.HACK();
|
||||
g_opct[0xf8700000 | index] = hack;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1355,7 +1357,7 @@ u32 ARMv7Decoder::DecodeMemory(const u32 address)
|
|||
}
|
||||
else
|
||||
{
|
||||
throw "ARMv7Decoder::DecodeMemory() failed (invalid instruction set set)";
|
||||
throw EXCEPTION("Invalid instruction set");
|
||||
}
|
||||
|
||||
ARMv7_instrs::UNK(m_ctx, code);
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -3,32 +3,17 @@
|
|||
#include "Utilities/Log.h"
|
||||
#include "Emu/Memory/Memory.h"
|
||||
#include "Emu/System.h"
|
||||
#include "Emu/CPU/CPUThreadManager.h"
|
||||
#include "Emu/IdManager.h"
|
||||
#include "Emu/ARMv7/PSVFuncList.h"
|
||||
|
||||
#include "ARMv7Thread.h"
|
||||
#include "ARMv7Decoder.h"
|
||||
#include "ARMv7DisAsm.h"
|
||||
#include "ARMv7Interpreter.h"
|
||||
|
||||
void ARMv7Context::write_pc(u32 value)
|
||||
{
|
||||
ISET = value & 1 ? Thumb : ARM;
|
||||
thread.SetBranch(value & ~1);
|
||||
}
|
||||
|
||||
u32 ARMv7Context::read_pc()
|
||||
{
|
||||
return ISET == ARM ? thread.PC + 8 : thread.PC + 4;
|
||||
}
|
||||
|
||||
u32 ARMv7Context::get_stack_arg(u32 pos)
|
||||
{
|
||||
return vm::psv::read32(SP + sizeof(u32) * (pos - 5));
|
||||
}
|
||||
|
||||
void ARMv7Context::fast_call(u32 addr)
|
||||
{
|
||||
return thread.FastCall(addr);
|
||||
return static_cast<ARMv7Thread*>(this)->FastCall(addr);
|
||||
}
|
||||
|
||||
#define TLS_MAX 128
|
||||
|
@ -74,7 +59,7 @@ u32 armv7_get_tls(u32 thread)
|
|||
}
|
||||
}
|
||||
|
||||
throw "Out of TLS memory";
|
||||
throw EXCEPTION("Out of TLS memory");
|
||||
}
|
||||
|
||||
void armv7_free_tls(u32 thread)
|
||||
|
@ -94,71 +79,93 @@ void armv7_free_tls(u32 thread)
|
|||
}
|
||||
}
|
||||
|
||||
ARMv7Thread::ARMv7Thread()
|
||||
: CPUThread(CPU_THREAD_ARMv7)
|
||||
, context(*this)
|
||||
//, m_arg(0)
|
||||
//, m_last_instr_size(0)
|
||||
//, m_last_instr_name("UNK")
|
||||
ARMv7Thread::ARMv7Thread(const std::string& name)
|
||||
: CPUThread(CPU_THREAD_ARMv7, name, WRAP_EXPR(fmt::format("ARMv7[0x%x] Thread (%s)[0x%08x]", GetId(), GetName(), PC)))
|
||||
, ARMv7Context({})
|
||||
{
|
||||
}
|
||||
|
||||
ARMv7Thread::~ARMv7Thread()
|
||||
{
|
||||
cv.notify_one();
|
||||
join();
|
||||
|
||||
CloseStack();
|
||||
armv7_free_tls(GetId());
|
||||
}
|
||||
|
||||
void ARMv7Thread::DumpInformation() const
|
||||
{
|
||||
if (hle_func)
|
||||
{
|
||||
const auto func = get_psv_func_by_nid(hle_func);
|
||||
|
||||
LOG_SUCCESS(HLE, "Information: function 0x%x (%s)", hle_func, func ? func->name : "?????????");
|
||||
}
|
||||
|
||||
CPUThread::DumpInformation();
|
||||
}
|
||||
|
||||
void ARMv7Thread::InitRegs()
|
||||
{
|
||||
memset(context.GPR, 0, sizeof(context.GPR));
|
||||
context.APSR.APSR = 0;
|
||||
context.IPSR.IPSR = 0;
|
||||
context.ISET = PC & 1 ? Thumb : ARM; // select instruction set
|
||||
context.thread.SetPc(PC & ~1); // and fix PC
|
||||
context.ITSTATE.IT = 0;
|
||||
context.SP = m_stack_addr + m_stack_size;
|
||||
context.TLS = armv7_get_tls(GetId());
|
||||
context.debug |= DF_DISASM | DF_PRINT;
|
||||
memset(GPR, 0, sizeof(GPR));
|
||||
APSR.APSR = 0;
|
||||
IPSR.IPSR = 0;
|
||||
ISET = PC & 1 ? Thumb : ARM; // select instruction set
|
||||
PC = PC & ~1; // and fix PC
|
||||
ITSTATE.IT = 0;
|
||||
SP = stack_addr + stack_size;
|
||||
TLS = armv7_get_tls(GetId());
|
||||
debug = DF_DISASM | DF_PRINT;
|
||||
}
|
||||
|
||||
void ARMv7Thread::InitStack()
|
||||
{
|
||||
if (!m_stack_addr)
|
||||
if (!stack_addr)
|
||||
{
|
||||
assert(m_stack_size);
|
||||
m_stack_addr = Memory.Alloc(m_stack_size, 4096);
|
||||
if (!stack_size)
|
||||
{
|
||||
throw EXCEPTION("Invalid stack size");
|
||||
}
|
||||
|
||||
stack_addr = Memory.Alloc(stack_size, 4096);
|
||||
|
||||
if (!stack_addr)
|
||||
{
|
||||
throw EXCEPTION("Out of stack memory");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ARMv7Thread::CloseStack()
|
||||
{
|
||||
if (m_stack_addr)
|
||||
if (stack_addr)
|
||||
{
|
||||
Memory.Free(m_stack_addr);
|
||||
m_stack_addr = 0;
|
||||
Memory.Free(stack_addr);
|
||||
stack_addr = 0;
|
||||
}
|
||||
}
|
||||
|
||||
std::string ARMv7Thread::RegsToString()
|
||||
std::string ARMv7Thread::RegsToString() const
|
||||
{
|
||||
std::string result = "Registers:\n=========\n";
|
||||
for(int i=0; i<15; ++i)
|
||||
{
|
||||
result += fmt::Format("%s\t= 0x%08x\n", g_arm_reg_name[i], context.GPR[i]);
|
||||
result += fmt::Format("%s\t= 0x%08x\n", g_arm_reg_name[i], GPR[i]);
|
||||
}
|
||||
|
||||
result += fmt::Format("APSR\t= 0x%08x [N: %d, Z: %d, C: %d, V: %d, Q: %d]\n",
|
||||
context.APSR.APSR,
|
||||
fmt::by_value(context.APSR.N),
|
||||
fmt::by_value(context.APSR.Z),
|
||||
fmt::by_value(context.APSR.C),
|
||||
fmt::by_value(context.APSR.V),
|
||||
fmt::by_value(context.APSR.Q));
|
||||
APSR.APSR,
|
||||
fmt::by_value(APSR.N),
|
||||
fmt::by_value(APSR.Z),
|
||||
fmt::by_value(APSR.C),
|
||||
fmt::by_value(APSR.V),
|
||||
fmt::by_value(APSR.Q));
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
std::string ARMv7Thread::ReadRegString(const std::string& reg)
|
||||
std::string ARMv7Thread::ReadRegString(const std::string& reg) const
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
@ -168,19 +175,15 @@ bool ARMv7Thread::WriteRegString(const std::string& reg, std::string value)
|
|||
return true;
|
||||
}
|
||||
|
||||
void ARMv7Thread::DoReset()
|
||||
{
|
||||
}
|
||||
|
||||
void ARMv7Thread::DoRun()
|
||||
{
|
||||
m_dec = nullptr;
|
||||
m_dec.reset();
|
||||
|
||||
switch(Ini.CPUDecoderMode.GetValue())
|
||||
{
|
||||
case 0:
|
||||
case 1:
|
||||
m_dec = new ARMv7Decoder(context);
|
||||
m_dec.reset(new ARMv7Decoder(*this));
|
||||
break;
|
||||
default:
|
||||
LOG_ERROR(PPU, "Invalid CPU decoder mode: %d", Ini.CPUDecoderMode.GetValue());
|
||||
|
@ -188,58 +191,75 @@ void ARMv7Thread::DoRun()
|
|||
}
|
||||
}
|
||||
|
||||
void ARMv7Thread::DoPause()
|
||||
void ARMv7Thread::Task()
|
||||
{
|
||||
}
|
||||
if (custom_task)
|
||||
{
|
||||
if (m_state.load() && CheckStatus()) return;
|
||||
|
||||
void ARMv7Thread::DoResume()
|
||||
{
|
||||
}
|
||||
return custom_task(*this);
|
||||
}
|
||||
|
||||
void ARMv7Thread::DoStop()
|
||||
{
|
||||
}
|
||||
while (true)
|
||||
{
|
||||
if (m_state.load() && CheckStatus()) break;
|
||||
|
||||
void ARMv7Thread::DoCode()
|
||||
{
|
||||
// decode instruction using specified decoder
|
||||
PC += m_dec->DecodeMemory(PC);
|
||||
}
|
||||
}
|
||||
|
||||
void ARMv7Thread::FastCall(u32 addr)
|
||||
{
|
||||
auto old_status = m_status;
|
||||
if (!is_current())
|
||||
{
|
||||
throw EXCEPTION("Called from the wrong thread");
|
||||
}
|
||||
|
||||
auto old_PC = PC;
|
||||
auto old_stack = context.SP;
|
||||
auto old_LR = context.LR;
|
||||
auto old_thread = GetCurrentNamedThread();
|
||||
auto old_stack = SP;
|
||||
auto old_LR = LR;
|
||||
auto old_task = decltype(custom_task)();
|
||||
|
||||
m_status = Running;
|
||||
PC = addr;
|
||||
context.LR = Emu.GetCPUThreadStop();
|
||||
SetCurrentNamedThread(this);
|
||||
LR = Emu.GetCPUThreadStop();
|
||||
custom_task.swap(old_task);
|
||||
|
||||
CPUThread::Task();
|
||||
try
|
||||
{
|
||||
Task();
|
||||
}
|
||||
catch (CPUThreadReturn)
|
||||
{
|
||||
}
|
||||
|
||||
m_state &= ~CPU_STATE_RETURN;
|
||||
|
||||
m_status = old_status;
|
||||
PC = old_PC;
|
||||
context.SP = old_stack;
|
||||
context.LR = old_LR;
|
||||
SetCurrentNamedThread(old_thread);
|
||||
|
||||
if (SP != old_stack) // SP shouldn't change
|
||||
{
|
||||
throw EXCEPTION("Stack inconsistency (addr=0x%x, SP=0x%x, old=0x%x)", addr, SP, old_stack);
|
||||
}
|
||||
|
||||
LR = old_LR;
|
||||
custom_task.swap(old_task);
|
||||
}
|
||||
|
||||
void ARMv7Thread::FastStop()
|
||||
{
|
||||
m_status = Stopped;
|
||||
m_events |= CPU_EVENT_STOP;
|
||||
m_state |= CPU_STATE_RETURN;
|
||||
}
|
||||
|
||||
armv7_thread::armv7_thread(u32 entry, const std::string& name, u32 stack_size, s32 prio)
|
||||
{
|
||||
thread = Emu.GetCPU().AddThread(CPU_THREAD_ARMv7);
|
||||
std::shared_ptr<ARMv7Thread> armv7 = Emu.GetIdManager().make_ptr<ARMv7Thread>(name);
|
||||
|
||||
thread->SetName(name);
|
||||
thread->SetEntry(entry);
|
||||
thread->SetStackSize(stack_size);
|
||||
thread->SetPrio(prio);
|
||||
armv7->PC = entry;
|
||||
armv7->stack_size = stack_size;
|
||||
armv7->prio = prio;
|
||||
|
||||
thread = std::move(armv7);
|
||||
|
||||
argc = 0;
|
||||
}
|
||||
|
@ -284,8 +304,8 @@ cpu_thread& armv7_thread::run()
|
|||
armv7.Run();
|
||||
|
||||
// set arguments
|
||||
armv7.context.GPR[0] = argc;
|
||||
armv7.context.GPR[1] = argv;
|
||||
armv7.GPR[0] = argc;
|
||||
armv7.GPR[1] = argv;
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
|
|
@ -2,35 +2,31 @@
|
|||
#include "Emu/CPU/CPUThread.h"
|
||||
#include "ARMv7Context.h"
|
||||
|
||||
class ARMv7Thread : public CPUThread
|
||||
class ARMv7Thread final : public CPUThread, public ARMv7Context
|
||||
{
|
||||
public:
|
||||
ARMv7Context context;
|
||||
|
||||
ARMv7Thread();
|
||||
~ARMv7Thread();
|
||||
std::function<void(ARMv7Thread& CPU)> custom_task;
|
||||
|
||||
public:
|
||||
virtual void InitRegs();
|
||||
virtual void InitStack();
|
||||
virtual void CloseStack();
|
||||
ARMv7Thread(const std::string& name);
|
||||
virtual ~ARMv7Thread() override;
|
||||
|
||||
virtual void DumpInformation() const override;
|
||||
virtual u32 GetPC() const override { return PC; }
|
||||
virtual u32 GetOffset() const override { return 0; }
|
||||
virtual void DoRun() override;
|
||||
virtual void Task() override;
|
||||
|
||||
virtual void InitRegs() override;
|
||||
virtual void InitStack() override;
|
||||
virtual void CloseStack() override;
|
||||
u32 GetStackArg(u32 pos);
|
||||
void FastCall(u32 addr);
|
||||
void FastStop();
|
||||
virtual void DoRun();
|
||||
|
||||
public:
|
||||
virtual std::string RegsToString();
|
||||
virtual std::string ReadRegString(const std::string& reg);
|
||||
virtual bool WriteRegString(const std::string& reg, std::string value);
|
||||
|
||||
protected:
|
||||
virtual void DoReset();
|
||||
virtual void DoPause();
|
||||
virtual void DoResume();
|
||||
virtual void DoStop();
|
||||
|
||||
virtual void DoCode();
|
||||
virtual std::string RegsToString() const override;
|
||||
virtual std::string ReadRegString(const std::string& reg) const override;
|
||||
virtual bool WriteRegString(const std::string& reg, std::string value) override;
|
||||
};
|
||||
|
||||
class armv7_thread : cpu_thread
|
||||
|
|
|
@ -2,33 +2,26 @@
|
|||
#include "Emu/System.h"
|
||||
#include "Emu/ARMv7/PSVFuncList.h"
|
||||
|
||||
extern psv_log_base sceAppMgr;
|
||||
#include "sceAppMgr.h"
|
||||
|
||||
struct SceAppMgrEvent
|
||||
s32 sceAppMgrReceiveEventNum(vm::ptr<s32> eventNum)
|
||||
{
|
||||
s32 event;
|
||||
s32 appId;
|
||||
char param[56];
|
||||
};
|
||||
|
||||
s32 sceAppMgrReceiveEventNum(vm::psv::ptr<s32> eventNum)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceAppMgrReceiveEvent(vm::psv::ptr<SceAppMgrEvent> appEvent)
|
||||
s32 sceAppMgrReceiveEvent(vm::ptr<SceAppMgrEvent> appEvent)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceAppMgrAcquireBgmPort()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceAppMgrReleaseBgmPort()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
|
||||
|
@ -39,6 +32,7 @@ psv_log_base sceAppMgr("SceAppMgr", []()
|
|||
sceAppMgr.on_load = nullptr;
|
||||
sceAppMgr.on_unload = nullptr;
|
||||
sceAppMgr.on_stop = nullptr;
|
||||
sceAppMgr.on_error = nullptr;
|
||||
|
||||
REG_FUNC(0x47E5DD7D, sceAppMgrReceiveEventNum);
|
||||
REG_FUNC(0xCFAD5A3A, sceAppMgrReceiveEvent);
|
||||
|
|
10
rpcs3/Emu/ARMv7/Modules/sceAppMgr.h
Normal file
10
rpcs3/Emu/ARMv7/Modules/sceAppMgr.h
Normal file
|
@ -0,0 +1,10 @@
|
|||
#pragma once
|
||||
|
||||
struct SceAppMgrEvent
|
||||
{
|
||||
le_t<s32> event;
|
||||
le_t<s32> appId;
|
||||
char param[56];
|
||||
};
|
||||
|
||||
extern psv_log_base sceAppMgr;
|
|
@ -4,69 +4,69 @@
|
|||
|
||||
#include "sceAppUtil.h"
|
||||
|
||||
s32 sceAppUtilInit(vm::psv::ptr<const SceAppUtilInitParam> initParam, vm::psv::ptr<SceAppUtilBootParam> bootParam)
|
||||
s32 sceAppUtilInit(vm::cptr<SceAppUtilInitParam> initParam, vm::ptr<SceAppUtilBootParam> bootParam)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceAppUtilShutdown()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceAppUtilSaveDataSlotCreate(u32 slotId, vm::psv::ptr<const SceAppUtilSaveDataSlotParam> param, vm::psv::ptr<const SceAppUtilSaveDataMountPoint> mountPoint)
|
||||
s32 sceAppUtilSaveDataSlotCreate(u32 slotId, vm::cptr<SceAppUtilSaveDataSlotParam> param, vm::cptr<SceAppUtilSaveDataMountPoint> mountPoint)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceAppUtilSaveDataSlotDelete(u32 slotId, vm::psv::ptr<const SceAppUtilSaveDataMountPoint> mountPoint)
|
||||
s32 sceAppUtilSaveDataSlotDelete(u32 slotId, vm::cptr<SceAppUtilSaveDataMountPoint> mountPoint)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceAppUtilSaveDataSlotSetParam(u32 slotId, vm::psv::ptr<const SceAppUtilSaveDataSlotParam> param, vm::psv::ptr<const SceAppUtilSaveDataMountPoint> mountPoint)
|
||||
s32 sceAppUtilSaveDataSlotSetParam(u32 slotId, vm::cptr<SceAppUtilSaveDataSlotParam> param, vm::cptr<SceAppUtilSaveDataMountPoint> mountPoint)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceAppUtilSaveDataSlotGetParam(u32 slotId, vm::psv::ptr<SceAppUtilSaveDataSlotParam> param, vm::psv::ptr<const SceAppUtilSaveDataMountPoint> mountPoint)
|
||||
s32 sceAppUtilSaveDataSlotGetParam(u32 slotId, vm::ptr<SceAppUtilSaveDataSlotParam> param, vm::cptr<SceAppUtilSaveDataMountPoint> mountPoint)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceAppUtilSaveDataFileSave(vm::psv::ptr<const SceAppUtilSaveDataFileSlot> slot, vm::psv::ptr<const SceAppUtilSaveDataFile> files, u32 fileNum, vm::psv::ptr<const SceAppUtilSaveDataMountPoint> mountPoint, vm::psv::ptr<u32> requiredSizeKB)
|
||||
s32 sceAppUtilSaveDataFileSave(vm::cptr<SceAppUtilSaveDataFileSlot> slot, vm::cptr<SceAppUtilSaveDataFile> files, u32 fileNum, vm::cptr<SceAppUtilSaveDataMountPoint> mountPoint, vm::ptr<u32> requiredSizeKB)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceAppUtilPhotoMount()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceAppUtilPhotoUmount()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceAppUtilSystemParamGetInt(u32 paramId, vm::psv::ptr<s32> value)
|
||||
s32 sceAppUtilSystemParamGetInt(u32 paramId, vm::ptr<s32> value)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceAppUtilSystemParamGetString(u32 paramId, vm::psv::ptr<char> buf, u32 bufSize)
|
||||
s32 sceAppUtilSystemParamGetString(u32 paramId, vm::ptr<char> buf, u32 bufSize)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceAppUtilSaveSafeMemory(vm::psv::ptr<const void> buf, u32 bufSize, s64 offset)
|
||||
s32 sceAppUtilSaveSafeMemory(vm::cptr<void> buf, u32 bufSize, s64 offset)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceAppUtilLoadSafeMemory(vm::psv::ptr<void> buf, u32 bufSize, s64 offset)
|
||||
s32 sceAppUtilLoadSafeMemory(vm::ptr<void> buf, u32 bufSize, s64 offset)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
|
||||
|
@ -77,6 +77,7 @@ psv_log_base sceAppUtil("SceAppUtil", []()
|
|||
sceAppUtil.on_load = nullptr;
|
||||
sceAppUtil.on_unload = nullptr;
|
||||
sceAppUtil.on_stop = nullptr;
|
||||
sceAppUtil.on_error = nullptr;
|
||||
|
||||
REG_FUNC(0xDAFFE671, sceAppUtilInit);
|
||||
REG_FUNC(0xB220B00B, sceAppUtilShutdown);
|
||||
|
|
|
@ -2,14 +2,14 @@
|
|||
|
||||
struct SceAppUtilInitParam
|
||||
{
|
||||
u32 workBufSize;
|
||||
le_t<u32> workBufSize;
|
||||
char reserved[60];
|
||||
};
|
||||
|
||||
struct SceAppUtilBootParam
|
||||
{
|
||||
u32 attr;
|
||||
u32 appVersion;
|
||||
le_t<u32> attr;
|
||||
le_t<u32> appVersion;
|
||||
char reserved[32];
|
||||
};
|
||||
|
||||
|
@ -20,49 +20,49 @@ struct SceAppUtilSaveDataMountPoint
|
|||
|
||||
struct SceAppUtilSaveDataSlotParam
|
||||
{
|
||||
u32 status;
|
||||
le_t<u32> status;
|
||||
char title[64];
|
||||
char subTitle[128];
|
||||
char detail[512];
|
||||
char iconPath[64];
|
||||
s32 userParam;
|
||||
u32 sizeKB;
|
||||
le_t<s32> userParam;
|
||||
le_t<u32> sizeKB;
|
||||
SceDateTime modifiedTime;
|
||||
char reserved[48];
|
||||
};
|
||||
|
||||
struct SceAppUtilSaveDataSlotEmptyParam
|
||||
{
|
||||
vm::psv::ptr<char> title;
|
||||
vm::psv::ptr<char> iconPath;
|
||||
vm::psv::ptr<void> iconBuf;
|
||||
u32 iconBufSize;
|
||||
vm::lptr<char> title;
|
||||
vm::lptr<char> iconPath;
|
||||
vm::lptr<void> iconBuf;
|
||||
le_t<u32> iconBufSize;
|
||||
char reserved[32];
|
||||
};
|
||||
|
||||
struct SceAppUtilSaveDataSlot
|
||||
{
|
||||
u32 id;
|
||||
u32 status;
|
||||
s32 userParam;
|
||||
vm::psv::ptr<SceAppUtilSaveDataSlotEmptyParam> emptyParam;
|
||||
le_t<u32> id;
|
||||
le_t<u32> status;
|
||||
le_t<s32> userParam;
|
||||
vm::lptr<SceAppUtilSaveDataSlotEmptyParam> emptyParam;
|
||||
};
|
||||
|
||||
struct SceAppUtilSaveDataFile
|
||||
{
|
||||
vm::psv::ptr<const char> filePath;
|
||||
vm::psv::ptr<void> buf;
|
||||
u32 bufSize;
|
||||
s64 offset;
|
||||
u32 mode;
|
||||
u32 progDelta;
|
||||
vm::lcptr<char> filePath;
|
||||
vm::lptr<void> buf;
|
||||
le_t<u32> bufSize;
|
||||
le_t<s64> offset;
|
||||
le_t<u32> mode;
|
||||
le_t<u32> progDelta;
|
||||
char reserved[32];
|
||||
};
|
||||
|
||||
struct SceAppUtilSaveDataFileSlot
|
||||
{
|
||||
u32 id;
|
||||
vm::psv::ptr<SceAppUtilSaveDataSlotParam> slotParam;
|
||||
le_t<u32> id;
|
||||
vm::lptr<SceAppUtilSaveDataSlotParam> slotParam;
|
||||
char reserved[32];
|
||||
};
|
||||
|
||||
|
|
|
@ -2,46 +2,46 @@
|
|||
#include "Emu/System.h"
|
||||
#include "Emu/ARMv7/PSVFuncList.h"
|
||||
|
||||
extern psv_log_base sceAudio;
|
||||
#include "sceAudio.h"
|
||||
|
||||
s32 sceAudioOutOpenPort(s32 portType, s32 len, s32 freq, s32 param)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceAudioOutReleasePort(s32 port)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceAudioOutOutput(s32 port, vm::psv::ptr<void> ptr)
|
||||
s32 sceAudioOutOutput(s32 port, vm::ptr<void> ptr)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceAudioOutSetVolume(s32 port, s32 flag, vm::psv::ptr<s32> vol)
|
||||
s32 sceAudioOutSetVolume(s32 port, s32 flag, vm::ptr<s32> vol)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceAudioOutSetConfig(s32 port, s32 len, s32 freq, s32 param)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceAudioOutGetConfig(s32 port, s32 configType)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceAudioOutGetRestSample(s32 port)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceAudioOutGetAdopt(s32 portType)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
|
||||
|
@ -52,6 +52,7 @@ psv_log_base sceAudio("SceAudio", []()
|
|||
sceAudio.on_load = nullptr;
|
||||
sceAudio.on_unload = nullptr;
|
||||
sceAudio.on_stop = nullptr;
|
||||
sceAudio.on_error = nullptr;
|
||||
|
||||
REG_FUNC(0x5BC341E4, sceAudioOutOpenPort);
|
||||
REG_FUNC(0x69E2E6B5, sceAudioOutReleasePort);
|
||||
|
|
3
rpcs3/Emu/ARMv7/Modules/sceAudio.h
Normal file
3
rpcs3/Emu/ARMv7/Modules/sceAudio.h
Normal file
|
@ -0,0 +1,3 @@
|
|||
#pragma once
|
||||
|
||||
extern psv_log_base sceAudio;
|
|
@ -2,21 +2,21 @@
|
|||
#include "Emu/System.h"
|
||||
#include "Emu/ARMv7/PSVFuncList.h"
|
||||
|
||||
extern psv_log_base sceAudioIn;
|
||||
#include "sceAudioIn.h"
|
||||
|
||||
s32 sceAudioInOpenPort(s32 portType, s32 grain, s32 freq, s32 param)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceAudioInReleasePort(s32 port)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceAudioInInput(s32 port, vm::psv::ptr<void> destPtr)
|
||||
s32 sceAudioInInput(s32 port, vm::ptr<void> destPtr)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
|
||||
|
@ -27,6 +27,7 @@ psv_log_base sceAudioIn("SceAudioIn", []()
|
|||
sceAudioIn.on_load = nullptr;
|
||||
sceAudioIn.on_unload = nullptr;
|
||||
sceAudioIn.on_stop = nullptr;
|
||||
sceAudioIn.on_error = nullptr;
|
||||
|
||||
REG_FUNC(0x638ADD2D, sceAudioInInput);
|
||||
REG_FUNC(0x39B50DC1, sceAudioInOpenPort);
|
||||
|
|
3
rpcs3/Emu/ARMv7/Modules/sceAudioIn.h
Normal file
3
rpcs3/Emu/ARMv7/Modules/sceAudioIn.h
Normal file
|
@ -0,0 +1,3 @@
|
|||
#pragma once
|
||||
|
||||
extern psv_log_base sceAudioIn;
|
|
@ -2,121 +2,41 @@
|
|||
#include "Emu/System.h"
|
||||
#include "Emu/ARMv7/PSVFuncList.h"
|
||||
|
||||
extern psv_log_base sceAudiodec;
|
||||
#include "sceAudiodec.h"
|
||||
|
||||
struct SceAudiodecInitStreamParam
|
||||
s32 sceAudiodecInitLibrary(u32 codecType, vm::ptr<SceAudiodecInitParam> pInitParam)
|
||||
{
|
||||
u32 size;
|
||||
u32 totalStreams;
|
||||
};
|
||||
|
||||
struct SceAudiodecInitChParam
|
||||
{
|
||||
u32 size;
|
||||
u32 totalCh;
|
||||
};
|
||||
|
||||
union SceAudiodecInitParam
|
||||
{
|
||||
u32 size;
|
||||
SceAudiodecInitChParam at9;
|
||||
SceAudiodecInitStreamParam mp3;
|
||||
SceAudiodecInitStreamParam aac;
|
||||
SceAudiodecInitStreamParam celp;
|
||||
};
|
||||
|
||||
struct SceAudiodecInfoAt9
|
||||
{
|
||||
u32 size;
|
||||
u8 configData[4];
|
||||
u32 ch;
|
||||
u32 bitRate;
|
||||
u32 samplingRate;
|
||||
u32 superFrameSize;
|
||||
u32 framesInSuperFrame;
|
||||
};
|
||||
|
||||
struct SceAudiodecInfoMp3
|
||||
{
|
||||
u32 size;
|
||||
u32 ch;
|
||||
u32 version;
|
||||
};
|
||||
|
||||
struct SceAudiodecInfoAac
|
||||
{
|
||||
u32 size;
|
||||
u32 isAdts;
|
||||
u32 ch;
|
||||
u32 samplingRate;
|
||||
u32 isSbr;
|
||||
};
|
||||
|
||||
struct SceAudiodecInfoCelp
|
||||
{
|
||||
u32 size;
|
||||
u32 excitationMode;
|
||||
u32 samplingRate;
|
||||
u32 bitRate;
|
||||
u32 lostCount;
|
||||
};
|
||||
|
||||
union SceAudiodecInfo
|
||||
{
|
||||
u32 size;
|
||||
SceAudiodecInfoAt9 at9;
|
||||
SceAudiodecInfoMp3 mp3;
|
||||
SceAudiodecInfoAac aac;
|
||||
SceAudiodecInfoCelp celp;
|
||||
};
|
||||
|
||||
struct SceAudiodecCtrl
|
||||
{
|
||||
u32 size;
|
||||
s32 handle;
|
||||
vm::psv::ptr<u8> pEs;
|
||||
u32 inputEsSize;
|
||||
u32 maxEsSize;
|
||||
vm::psv::ptr<void> pPcm;
|
||||
u32 outputPcmSize;
|
||||
u32 maxPcmSize;
|
||||
u32 wordLength;
|
||||
vm::psv::ptr<SceAudiodecInfo> pInfo;
|
||||
};
|
||||
|
||||
s32 sceAudiodecInitLibrary(u32 codecType, vm::psv::ptr<SceAudiodecInitParam> pInitParam)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceAudiodecTermLibrary(u32 codecType)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceAudiodecCreateDecoder(vm::psv::ptr<SceAudiodecCtrl> pCtrl, u32 codecType)
|
||||
s32 sceAudiodecCreateDecoder(vm::ptr<SceAudiodecCtrl> pCtrl, u32 codecType)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceAudiodecDeleteDecoder(vm::psv::ptr<SceAudiodecCtrl> pCtrl)
|
||||
s32 sceAudiodecDeleteDecoder(vm::ptr<SceAudiodecCtrl> pCtrl)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceAudiodecDecode(vm::psv::ptr<SceAudiodecCtrl> pCtrl)
|
||||
s32 sceAudiodecDecode(vm::ptr<SceAudiodecCtrl> pCtrl)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceAudiodecClearContext(vm::psv::ptr<SceAudiodecCtrl> pCtrl)
|
||||
s32 sceAudiodecClearContext(vm::ptr<SceAudiodecCtrl> pCtrl)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceAudiodecGetInternalError(vm::psv::ptr<SceAudiodecCtrl> pCtrl, vm::psv::ptr<s32> pInternalError)
|
||||
s32 sceAudiodecGetInternalError(vm::ptr<SceAudiodecCtrl> pCtrl, vm::ptr<s32> pInternalError)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
|
||||
|
@ -127,6 +47,7 @@ psv_log_base sceAudiodec("SceAudiodec", []()
|
|||
sceAudiodec.on_load = nullptr;
|
||||
sceAudiodec.on_unload = nullptr;
|
||||
sceAudiodec.on_stop = nullptr;
|
||||
sceAudiodec.on_error = nullptr;
|
||||
|
||||
REG_FUNC(0x445C2CEF, sceAudiodecInitLibrary);
|
||||
REG_FUNC(0x45719B9D, sceAudiodecTermLibrary);
|
||||
|
|
83
rpcs3/Emu/ARMv7/Modules/sceAudiodec.h
Normal file
83
rpcs3/Emu/ARMv7/Modules/sceAudiodec.h
Normal file
|
@ -0,0 +1,83 @@
|
|||
#pragma once
|
||||
|
||||
struct SceAudiodecInitStreamParam
|
||||
{
|
||||
le_t<u32> size;
|
||||
le_t<u32> totalStreams;
|
||||
};
|
||||
|
||||
struct SceAudiodecInitChParam
|
||||
{
|
||||
le_t<u32> size;
|
||||
le_t<u32> totalCh;
|
||||
};
|
||||
|
||||
union SceAudiodecInitParam
|
||||
{
|
||||
le_t<u32> size;
|
||||
SceAudiodecInitChParam at9;
|
||||
SceAudiodecInitStreamParam mp3;
|
||||
SceAudiodecInitStreamParam aac;
|
||||
SceAudiodecInitStreamParam celp;
|
||||
};
|
||||
|
||||
struct SceAudiodecInfoAt9
|
||||
{
|
||||
le_t<u32> size;
|
||||
u8 configData[4];
|
||||
le_t<u32> ch;
|
||||
le_t<u32> bitRate;
|
||||
le_t<u32> samplingRate;
|
||||
le_t<u32> superFrameSize;
|
||||
le_t<u32> framesInSuperFrame;
|
||||
};
|
||||
|
||||
struct SceAudiodecInfoMp3
|
||||
{
|
||||
le_t<u32> size;
|
||||
le_t<u32> ch;
|
||||
le_t<u32> version;
|
||||
};
|
||||
|
||||
struct SceAudiodecInfoAac
|
||||
{
|
||||
le_t<u32> size;
|
||||
le_t<u32> isAdts;
|
||||
le_t<u32> ch;
|
||||
le_t<u32> samplingRate;
|
||||
le_t<u32> isSbr;
|
||||
};
|
||||
|
||||
struct SceAudiodecInfoCelp
|
||||
{
|
||||
le_t<u32> size;
|
||||
le_t<u32> excitationMode;
|
||||
le_t<u32> samplingRate;
|
||||
le_t<u32> bitRate;
|
||||
le_t<u32> lostCount;
|
||||
};
|
||||
|
||||
union SceAudiodecInfo
|
||||
{
|
||||
le_t<u32> size;
|
||||
SceAudiodecInfoAt9 at9;
|
||||
SceAudiodecInfoMp3 mp3;
|
||||
SceAudiodecInfoAac aac;
|
||||
SceAudiodecInfoCelp celp;
|
||||
};
|
||||
|
||||
struct SceAudiodecCtrl
|
||||
{
|
||||
le_t<u32> size;
|
||||
le_t<s32> handle;
|
||||
vm::lptr<u8> pEs;
|
||||
le_t<u32> inputEsSize;
|
||||
le_t<u32> maxEsSize;
|
||||
vm::lptr<void> pPcm;
|
||||
le_t<u32> outputPcmSize;
|
||||
le_t<u32> maxPcmSize;
|
||||
le_t<u32> wordLength;
|
||||
vm::lptr<SceAudiodecInfo> pInfo;
|
||||
};
|
||||
|
||||
extern psv_log_base sceAudiodec;
|
|
@ -2,103 +2,46 @@
|
|||
#include "Emu/System.h"
|
||||
#include "Emu/ARMv7/PSVFuncList.h"
|
||||
|
||||
extern psv_log_base sceAudioenc;
|
||||
#include "sceAudioenc.h"
|
||||
|
||||
struct SceAudioencInitStreamParam
|
||||
s32 sceAudioencInitLibrary(u32 codecType, vm::ptr<SceAudioencInitParam> pInitParam)
|
||||
{
|
||||
u32 size;
|
||||
u32 totalStreams;
|
||||
};
|
||||
|
||||
struct SceAudioencInfoCelp
|
||||
{
|
||||
u32 size;
|
||||
u32 excitationMode;
|
||||
u32 samplingRate;
|
||||
u32 bitRate;
|
||||
};
|
||||
|
||||
struct SceAudioencOptInfoCelp
|
||||
{
|
||||
u32 size;
|
||||
u8 header[32];
|
||||
u32 headerSize;
|
||||
u32 encoderVersion;
|
||||
};
|
||||
|
||||
|
||||
union SceAudioencInitParam
|
||||
{
|
||||
u32 size;
|
||||
SceAudioencInitStreamParam celp;
|
||||
};
|
||||
|
||||
union SceAudioencInfo
|
||||
{
|
||||
u32 size;
|
||||
SceAudioencInfoCelp celp;
|
||||
};
|
||||
|
||||
union SceAudioencOptInfo
|
||||
{
|
||||
u32 size;
|
||||
SceAudioencOptInfoCelp celp;
|
||||
};
|
||||
|
||||
struct SceAudioencCtrl
|
||||
{
|
||||
u32 size;
|
||||
s32 handle;
|
||||
vm::psv::ptr<u8> pInputPcm;
|
||||
u32 inputPcmSize;
|
||||
u32 maxPcmSize;
|
||||
vm::psv::ptr<void> pOutputEs;
|
||||
u32 outputEsSize;
|
||||
u32 maxEsSize;
|
||||
u32 wordLength;
|
||||
vm::psv::ptr<SceAudioencInfo> pInfo;
|
||||
vm::psv::ptr<SceAudioencOptInfo> pOptInfo;
|
||||
};
|
||||
|
||||
|
||||
s32 sceAudioencInitLibrary(u32 codecType, vm::psv::ptr<SceAudioencInitParam> pInitParam)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceAudioencTermLibrary(u32 codecType)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceAudioencCreateEncoder(vm::psv::ptr<SceAudioencCtrl> pCtrl, u32 codecType)
|
||||
s32 sceAudioencCreateEncoder(vm::ptr<SceAudioencCtrl> pCtrl, u32 codecType)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceAudioencDeleteEncoder(vm::psv::ptr<SceAudioencCtrl> pCtrl)
|
||||
s32 sceAudioencDeleteEncoder(vm::ptr<SceAudioencCtrl> pCtrl)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceAudioencEncode(vm::psv::ptr<SceAudioencCtrl> pCtrl)
|
||||
s32 sceAudioencEncode(vm::ptr<SceAudioencCtrl> pCtrl)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceAudioencClearContext(vm::psv::ptr<SceAudioencCtrl> pCtrl)
|
||||
s32 sceAudioencClearContext(vm::ptr<SceAudioencCtrl> pCtrl)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceAudioencGetOptInfo(vm::psv::ptr<SceAudioencCtrl> pCtrl)
|
||||
s32 sceAudioencGetOptInfo(vm::ptr<SceAudioencCtrl> pCtrl)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceAudioencGetInternalError(vm::psv::ptr<SceAudioencCtrl> pCtrl, vm::psv::ptr<s32> pInternalError)
|
||||
s32 sceAudioencGetInternalError(vm::ptr<SceAudioencCtrl> pCtrl, vm::ptr<s32> pInternalError)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
|
||||
|
@ -109,6 +52,7 @@ psv_log_base sceAudioenc("SceAudioenc", []()
|
|||
sceAudioenc.on_load = nullptr;
|
||||
sceAudioenc.on_unload = nullptr;
|
||||
sceAudioenc.on_stop = nullptr;
|
||||
sceAudioenc.on_error = nullptr;
|
||||
|
||||
REG_FUNC(0x76EE4DC6, sceAudioencInitLibrary);
|
||||
REG_FUNC(0xAB32D022, sceAudioencTermLibrary);
|
||||
|
|
59
rpcs3/Emu/ARMv7/Modules/sceAudioenc.h
Normal file
59
rpcs3/Emu/ARMv7/Modules/sceAudioenc.h
Normal file
|
@ -0,0 +1,59 @@
|
|||
#pragma once
|
||||
|
||||
struct SceAudioencInitStreamParam
|
||||
{
|
||||
le_t<u32> size;
|
||||
le_t<u32> totalStreams;
|
||||
};
|
||||
|
||||
struct SceAudioencInfoCelp
|
||||
{
|
||||
le_t<u32> size;
|
||||
le_t<u32> excitationMode;
|
||||
le_t<u32> samplingRate;
|
||||
le_t<u32> bitRate;
|
||||
};
|
||||
|
||||
struct SceAudioencOptInfoCelp
|
||||
{
|
||||
le_t<u32> size;
|
||||
u8 header[32];
|
||||
le_t<u32> headerSize;
|
||||
le_t<u32> encoderVersion;
|
||||
};
|
||||
|
||||
|
||||
union SceAudioencInitParam
|
||||
{
|
||||
le_t<u32> size;
|
||||
SceAudioencInitStreamParam celp;
|
||||
};
|
||||
|
||||
union SceAudioencInfo
|
||||
{
|
||||
le_t<u32> size;
|
||||
SceAudioencInfoCelp celp;
|
||||
};
|
||||
|
||||
union SceAudioencOptInfo
|
||||
{
|
||||
le_t<u32> size;
|
||||
SceAudioencOptInfoCelp celp;
|
||||
};
|
||||
|
||||
struct SceAudioencCtrl
|
||||
{
|
||||
le_t<u32> size;
|
||||
le_t<s32> handle;
|
||||
vm::lptr<u8> pInputPcm;
|
||||
le_t<u32> inputPcmSize;
|
||||
le_t<u32> maxPcmSize;
|
||||
vm::lptr<void> pOutputEs;
|
||||
le_t<u32> outputEsSize;
|
||||
le_t<u32> maxEsSize;
|
||||
le_t<u32> wordLength;
|
||||
vm::lptr<SceAudioencInfo> pInfo;
|
||||
vm::lptr<SceAudioencOptInfo> pOptInfo;
|
||||
};
|
||||
|
||||
extern psv_log_base sceAudioenc;
|
|
@ -2,248 +2,211 @@
|
|||
#include "Emu/System.h"
|
||||
#include "Emu/ARMv7/PSVFuncList.h"
|
||||
|
||||
extern psv_log_base sceCamera;
|
||||
#include "sceCamera.h"
|
||||
|
||||
struct SceCameraInfo
|
||||
s32 sceCameraOpen(s32 devnum, vm::ptr<SceCameraInfo> pInfo)
|
||||
{
|
||||
u32 sizeThis;
|
||||
u32 wPriority;
|
||||
u32 wFormat;
|
||||
u32 wResolution;
|
||||
u32 wFramerate;
|
||||
u32 wWidth;
|
||||
u32 wHeight;
|
||||
u32 wRange;
|
||||
u32 _padding_0;
|
||||
u32 sizeIBase;
|
||||
u32 sizeUBase;
|
||||
u32 sizeVBase;
|
||||
vm::psv::ptr<void> pvIBase;
|
||||
vm::psv::ptr<void> pvUBase;
|
||||
vm::psv::ptr<void> pvVBase;
|
||||
u32 wPitch;
|
||||
u32 wBuffer;
|
||||
};
|
||||
|
||||
struct SceCameraRead
|
||||
{
|
||||
u32 sizeThis;
|
||||
s32 dwMode;
|
||||
s32 _padding_0;
|
||||
s32 dwStatus;
|
||||
u32 qwFrame;
|
||||
u32 qwTimestamp;
|
||||
u32 sizeIBase;
|
||||
u32 sizeUBase;
|
||||
u32 sizeVBase;
|
||||
vm::psv::ptr<void> pvIBase;
|
||||
vm::psv::ptr<void> pvUBase;
|
||||
vm::psv::ptr<void> pvVBase;
|
||||
};
|
||||
|
||||
s32 sceCameraOpen(s32 devnum, vm::psv::ptr<SceCameraInfo> pInfo)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceCameraClose(s32 devnum)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceCameraStart(s32 devnum)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceCameraStop(s32 devnum)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceCameraRead(s32 devnum, vm::psv::ptr<SceCameraRead> pRead)
|
||||
s32 sceCameraRead(s32 devnum, vm::ptr<SceCameraRead> pRead)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceCameraIsActive(s32 devnum)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceCameraGetSaturation(s32 devnum, vm::psv::ptr<s32> pLevel)
|
||||
s32 sceCameraGetSaturation(s32 devnum, vm::ptr<s32> pLevel)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceCameraSetSaturation(s32 devnum, s32 level)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceCameraGetBrightness(s32 devnum, vm::psv::ptr<s32> pLevel)
|
||||
s32 sceCameraGetBrightness(s32 devnum, vm::ptr<s32> pLevel)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceCameraSetBrightness(s32 devnum, s32 level)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceCameraGetContrast(s32 devnum, vm::psv::ptr<s32> pLevel)
|
||||
s32 sceCameraGetContrast(s32 devnum, vm::ptr<s32> pLevel)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceCameraSetContrast(s32 devnum, s32 level)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceCameraGetSharpness(s32 devnum, vm::psv::ptr<s32> pLevel)
|
||||
s32 sceCameraGetSharpness(s32 devnum, vm::ptr<s32> pLevel)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceCameraSetSharpness(s32 devnum, s32 level)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceCameraGetReverse(s32 devnum, vm::psv::ptr<s32> pMode)
|
||||
s32 sceCameraGetReverse(s32 devnum, vm::ptr<s32> pMode)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceCameraSetReverse(s32 devnum, s32 mode)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceCameraGetEffect(s32 devnum, vm::psv::ptr<s32> pMode)
|
||||
s32 sceCameraGetEffect(s32 devnum, vm::ptr<s32> pMode)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceCameraSetEffect(s32 devnum, s32 mode)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceCameraGetEV(s32 devnum, vm::psv::ptr<s32> pLevel)
|
||||
s32 sceCameraGetEV(s32 devnum, vm::ptr<s32> pLevel)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceCameraSetEV(s32 devnum, s32 level)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceCameraGetZoom(s32 devnum, vm::psv::ptr<s32> pLevel)
|
||||
s32 sceCameraGetZoom(s32 devnum, vm::ptr<s32> pLevel)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceCameraSetZoom(s32 devnum, s32 level)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceCameraGetAntiFlicker(s32 devnum, vm::psv::ptr<s32> pMode)
|
||||
s32 sceCameraGetAntiFlicker(s32 devnum, vm::ptr<s32> pMode)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceCameraSetAntiFlicker(s32 devnum, s32 mode)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceCameraGetISO(s32 devnum, vm::psv::ptr<s32> pMode)
|
||||
s32 sceCameraGetISO(s32 devnum, vm::ptr<s32> pMode)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceCameraSetISO(s32 devnum, s32 mode)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceCameraGetGain(s32 devnum, vm::psv::ptr<s32> pMode)
|
||||
s32 sceCameraGetGain(s32 devnum, vm::ptr<s32> pMode)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceCameraSetGain(s32 devnum, s32 mode)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceCameraGetWhiteBalance(s32 devnum, vm::psv::ptr<s32> pMode)
|
||||
s32 sceCameraGetWhiteBalance(s32 devnum, vm::ptr<s32> pMode)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceCameraSetWhiteBalance(s32 devnum, s32 mode)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceCameraGetBacklight(s32 devnum, vm::psv::ptr<s32> pMode)
|
||||
s32 sceCameraGetBacklight(s32 devnum, vm::ptr<s32> pMode)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceCameraSetBacklight(s32 devnum, s32 mode)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceCameraGetNightmode(s32 devnum, vm::psv::ptr<s32> pMode)
|
||||
s32 sceCameraGetNightmode(s32 devnum, vm::ptr<s32> pMode)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceCameraSetNightmode(s32 devnum, s32 mode)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceCameraLedSwitch(s32 devnum, s32 iSwitch)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceCameraLedBlink(s32 devnum, s32 iOnCount, s32 iOffCount, s32 iBlinkCount)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceCameraGetNoiseReductionForDebug(s32 devnum, vm::psv::ptr<s32> pLevel)
|
||||
s32 sceCameraGetNoiseReductionForDebug(s32 devnum, vm::ptr<s32> pLevel)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceCameraSetNoiseReductionForDebug(s32 devnum, s32 level)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceCameraGetSharpnessOffForDebug(s32 devnum, vm::psv::ptr<s32> pLevel)
|
||||
s32 sceCameraGetSharpnessOffForDebug(s32 devnum, vm::ptr<s32> pLevel)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceCameraSetSharpnessOffForDebug(s32 devnum, s32 level)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
void sceCameraUseCacheMemoryForTrial(s32 isCache)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
|
||||
|
@ -254,6 +217,7 @@ psv_log_base sceCamera("SceCamera", []()
|
|||
sceCamera.on_load = nullptr;
|
||||
sceCamera.on_unload = nullptr;
|
||||
sceCamera.on_stop = nullptr;
|
||||
sceCamera.on_error = nullptr;
|
||||
|
||||
REG_FUNC(0xA462F801, sceCameraOpen);
|
||||
REG_FUNC(0xCD6E1CFC, sceCameraClose);
|
||||
|
|
40
rpcs3/Emu/ARMv7/Modules/sceCamera.h
Normal file
40
rpcs3/Emu/ARMv7/Modules/sceCamera.h
Normal file
|
@ -0,0 +1,40 @@
|
|||
#pragma once
|
||||
|
||||
struct SceCameraInfo
|
||||
{
|
||||
le_t<u32> sizeThis;
|
||||
le_t<u32> wPriority;
|
||||
le_t<u32> wFormat;
|
||||
le_t<u32> wResolution;
|
||||
le_t<u32> wFramerate;
|
||||
le_t<u32> wWidth;
|
||||
le_t<u32> wHeight;
|
||||
le_t<u32> wRange;
|
||||
le_t<u32> _padding_0;
|
||||
le_t<u32> sizeIBase;
|
||||
le_t<u32> sizeUBase;
|
||||
le_t<u32> sizeVBase;
|
||||
vm::lptr<void> pvIBase;
|
||||
vm::lptr<void> pvUBase;
|
||||
vm::lptr<void> pvVBase;
|
||||
le_t<u32> wPitch;
|
||||
le_t<u32> wBuffer;
|
||||
};
|
||||
|
||||
struct SceCameraRead
|
||||
{
|
||||
le_t<u32> sizeThis;
|
||||
le_t<s32> dwMode;
|
||||
le_t<s32> _padding_0;
|
||||
le_t<s32> dwStatus;
|
||||
le_t<u32> qwFrame;
|
||||
le_t<u32> qwTimestamp;
|
||||
le_t<u32> sizeIBase;
|
||||
le_t<u32> sizeUBase;
|
||||
le_t<u32> sizeVBase;
|
||||
vm::lptr<void> pvIBase;
|
||||
vm::lptr<void> pvUBase;
|
||||
vm::lptr<void> pvVBase;
|
||||
};
|
||||
|
||||
extern psv_log_base sceCamera;
|
|
@ -2,32 +2,26 @@
|
|||
#include "Emu/System.h"
|
||||
#include "Emu/ARMv7/PSVFuncList.h"
|
||||
|
||||
extern psv_log_base sceCodecEngine;
|
||||
|
||||
struct SceCodecEnginePmonProcessorLoad
|
||||
{
|
||||
u32 size;
|
||||
u32 average;
|
||||
};
|
||||
#include "sceCodecEngine.h"
|
||||
|
||||
s32 sceCodecEnginePmonStart()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceCodecEnginePmonStop()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceCodecEnginePmonGetProcessorLoad(vm::psv::ptr<SceCodecEnginePmonProcessorLoad> pProcessorLoad)
|
||||
s32 sceCodecEnginePmonGetProcessorLoad(vm::ptr<SceCodecEnginePmonProcessorLoad> pProcessorLoad)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceCodecEnginePmonReset()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
|
||||
|
@ -38,6 +32,7 @@ psv_log_base sceCodecEngine("SceCodecEngine", []()
|
|||
sceCodecEngine.on_load = nullptr;
|
||||
sceCodecEngine.on_unload = nullptr;
|
||||
sceCodecEngine.on_stop = nullptr;
|
||||
sceCodecEngine.on_error = nullptr;
|
||||
|
||||
REG_FUNC(0x3E718890, sceCodecEnginePmonStart);
|
||||
REG_FUNC(0x268B1EF5, sceCodecEnginePmonStop);
|
||||
|
|
9
rpcs3/Emu/ARMv7/Modules/sceCodecEngine.h
Normal file
9
rpcs3/Emu/ARMv7/Modules/sceCodecEngine.h
Normal file
|
@ -0,0 +1,9 @@
|
|||
#pragma once
|
||||
|
||||
struct SceCodecEnginePmonProcessorLoad
|
||||
{
|
||||
le_t<u32> size;
|
||||
le_t<u32> average;
|
||||
};
|
||||
|
||||
extern psv_log_base sceCodecEngine;
|
|
@ -2,506 +2,206 @@
|
|||
#include "Emu/System.h"
|
||||
#include "Emu/ARMv7/PSVFuncList.h"
|
||||
|
||||
#include "sceGxm.h"
|
||||
#include "sceAppUtil.h"
|
||||
#include "sceIme.h"
|
||||
#include "sceCommonDialog.h"
|
||||
|
||||
extern psv_log_base sceCommonDialog;
|
||||
|
||||
enum SceCommonDialogStatus : s32
|
||||
s32 sceCommonDialogUpdate(vm::cptr<SceCommonDialogUpdateParam> updateParam)
|
||||
{
|
||||
SCE_COMMON_DIALOG_STATUS_NONE = 0,
|
||||
SCE_COMMON_DIALOG_STATUS_RUNNING = 1,
|
||||
SCE_COMMON_DIALOG_STATUS_FINISHED = 2
|
||||
};
|
||||
|
||||
enum SceCommonDialogResult : s32
|
||||
{
|
||||
SCE_COMMON_DIALOG_RESULT_OK,
|
||||
SCE_COMMON_DIALOG_RESULT_USER_CANCELED,
|
||||
SCE_COMMON_DIALOG_RESULT_ABORTED
|
||||
};
|
||||
|
||||
struct SceCommonDialogRenderTargetInfo
|
||||
{
|
||||
vm::psv::ptr<void> depthSurfaceData;
|
||||
vm::psv::ptr<void> colorSurfaceData;
|
||||
SceGxmColorSurfaceType surfaceType;
|
||||
SceGxmColorFormat colorFormat;
|
||||
u32 width;
|
||||
u32 height;
|
||||
u32 strideInPixels;
|
||||
u8 reserved[32];
|
||||
};
|
||||
|
||||
struct SceCommonDialogUpdateParam
|
||||
{
|
||||
SceCommonDialogRenderTargetInfo renderTarget;
|
||||
vm::psv::ptr<SceGxmSyncObject> displaySyncObject;
|
||||
u8 reserved[32];
|
||||
};
|
||||
|
||||
struct SceMsgDialogUserMessageParam
|
||||
{
|
||||
s32 buttonType;
|
||||
vm::psv::ptr<const char> msg;
|
||||
char reserved[32];
|
||||
};
|
||||
|
||||
struct SceMsgDialogSystemMessageParam
|
||||
{
|
||||
s32 sysMsgType;
|
||||
s32 value;
|
||||
char reserved[32];
|
||||
};
|
||||
|
||||
struct SceMsgDialogErrorCodeParam
|
||||
{
|
||||
s32 errorCode;
|
||||
char reserved[32];
|
||||
};
|
||||
|
||||
struct SceMsgDialogProgressBarParam
|
||||
{
|
||||
s32 barType;
|
||||
SceMsgDialogSystemMessageParam sysMsgParam;
|
||||
vm::psv::ptr<const char> msg;
|
||||
char reserved[32];
|
||||
};
|
||||
|
||||
struct SceMsgDialogParam
|
||||
{
|
||||
u32 sdkVersion;
|
||||
s32 mode;
|
||||
vm::psv::ptr<SceMsgDialogUserMessageParam> userMsgParam;
|
||||
vm::psv::ptr<SceMsgDialogSystemMessageParam> sysMsgParam;
|
||||
vm::psv::ptr<SceMsgDialogErrorCodeParam> errorCodeParam;
|
||||
vm::psv::ptr<SceMsgDialogProgressBarParam> progBarParam;
|
||||
u32 flag;
|
||||
char reserved[32];
|
||||
};
|
||||
|
||||
struct SceMsgDialogResult
|
||||
{
|
||||
s32 mode;
|
||||
s32 result;
|
||||
s32 buttonId;
|
||||
u8 reserved[32];
|
||||
};
|
||||
|
||||
|
||||
struct SceNetCheckDialogParam
|
||||
{
|
||||
u32 sdkVersion;
|
||||
s32 mode;
|
||||
u8 reserved[128];
|
||||
};
|
||||
|
||||
struct SceNetCheckDialogResult
|
||||
{
|
||||
s32 result;
|
||||
u8 reserved[128];
|
||||
};
|
||||
|
||||
struct SceSaveDataDialogFixedParam
|
||||
{
|
||||
u32 targetSlot;
|
||||
char reserved[32];
|
||||
};
|
||||
|
||||
struct SceSaveDataDialogListParam
|
||||
{
|
||||
vm::psv::ptr<const u32> slotList;
|
||||
u32 slotListSize;
|
||||
s32 focusPos;
|
||||
u32 focusId;
|
||||
vm::psv::ptr<const char> listTitle;
|
||||
char reserved[32];
|
||||
};
|
||||
|
||||
struct SceSaveDataDialogUserMessageParam
|
||||
{
|
||||
s32 buttonType;
|
||||
vm::psv::ptr<const char> msg;
|
||||
u32 targetSlot;
|
||||
char reserved[32];
|
||||
};
|
||||
|
||||
struct SceSaveDataDialogSystemMessageParam
|
||||
{
|
||||
s32 sysMsgType;
|
||||
s32 value;
|
||||
u32 targetSlot;
|
||||
char reserved[32];
|
||||
};
|
||||
|
||||
struct SceSaveDataDialogErrorCodeParam
|
||||
{
|
||||
s32 errorCode;
|
||||
u32 targetSlot;
|
||||
char reserved[32];
|
||||
};
|
||||
|
||||
struct SceSaveDataDialogProgressBarParam
|
||||
{
|
||||
s32 barType;
|
||||
SceSaveDataDialogSystemMessageParam sysMsgParam;
|
||||
vm::psv::ptr<const char> msg;
|
||||
u32 targetSlot;
|
||||
char reserved[32];
|
||||
};
|
||||
|
||||
struct SceSaveDataDialogSlotConfigParam
|
||||
{
|
||||
vm::psv::ptr<const SceAppUtilSaveDataMountPoint> mountPoint;
|
||||
vm::psv::ptr<const char> appSubDir;
|
||||
char reserved[32];
|
||||
};
|
||||
|
||||
struct SceSaveDataDialogParam
|
||||
{
|
||||
u32 sdkVersion;
|
||||
s32 mode;
|
||||
s32 dispType;
|
||||
vm::psv::ptr<SceSaveDataDialogFixedParam> fixedParam;
|
||||
vm::psv::ptr<SceSaveDataDialogListParam> listParam;
|
||||
vm::psv::ptr<SceSaveDataDialogUserMessageParam> userMsgParam;
|
||||
vm::psv::ptr<SceSaveDataDialogSystemMessageParam> sysMsgParam;
|
||||
vm::psv::ptr<SceSaveDataDialogErrorCodeParam> errorCodeParam;
|
||||
vm::psv::ptr<SceSaveDataDialogProgressBarParam> progBarParam;
|
||||
vm::psv::ptr<SceSaveDataDialogSlotConfigParam> slotConfParam;
|
||||
u32 flag;
|
||||
vm::psv::ptr<void> userdata;
|
||||
char reserved[32];
|
||||
};
|
||||
|
||||
struct SceSaveDataDialogFinishParam
|
||||
{
|
||||
u32 flag;
|
||||
char reserved[32];
|
||||
};
|
||||
|
||||
struct SceSaveDataDialogSlotInfo
|
||||
{
|
||||
u32 isExist;
|
||||
vm::psv::ptr<SceAppUtilSaveDataSlotParam> slotParam;
|
||||
u8 reserved[32];
|
||||
};
|
||||
|
||||
struct SceSaveDataDialogResult
|
||||
{
|
||||
s32 mode;
|
||||
s32 result;
|
||||
s32 buttonId;
|
||||
u32 slotId;
|
||||
vm::psv::ptr<SceSaveDataDialogSlotInfo> slotInfo;
|
||||
vm::psv::ptr<void> userdata;
|
||||
char reserved[32];
|
||||
};
|
||||
|
||||
|
||||
struct SceImeDialogParam
|
||||
{
|
||||
u32 sdkVersion;
|
||||
u32 inputMethod;
|
||||
u64 supportedLanguages;
|
||||
s32 languagesForced;
|
||||
u32 type;
|
||||
u32 option;
|
||||
vm::psv::ptr<SceImeCharFilter> filter;
|
||||
u32 dialogMode;
|
||||
u32 textBoxMode;
|
||||
vm::psv::ptr<const u16> title;
|
||||
u32 maxTextLength;
|
||||
vm::psv::ptr<u16> initialText;
|
||||
vm::psv::ptr<u16> inputTextBuffer;
|
||||
char reserved[32];
|
||||
};
|
||||
|
||||
struct SceImeDialogResult
|
||||
{
|
||||
s32 result;
|
||||
char reserved[32];
|
||||
};
|
||||
|
||||
enum ScePhotoImportDialogFormatType : s32
|
||||
{
|
||||
SCE_PHOTOIMPORT_DIALOG_FORMAT_TYPE_UNKNOWN = 0,
|
||||
SCE_PHOTOIMPORT_DIALOG_FORMAT_TYPE_JPEG,
|
||||
SCE_PHOTOIMPORT_DIALOG_FORMAT_TYPE_PNG,
|
||||
SCE_PHOTOIMPORT_DIALOG_FORMAT_TYPE_GIF,
|
||||
SCE_PHOTOIMPORT_DIALOG_FORMAT_TYPE_BMP,
|
||||
SCE_PHOTOIMPORT_DIALOG_FORMAT_TYPE_TIFF
|
||||
};
|
||||
|
||||
enum ScePhotoImportDialogOrientation : s32
|
||||
{
|
||||
SCE_PHOTOIMPORT_DIALOG_ORIENTATION_UNKNOWN = 0,
|
||||
SCE_PHOTOIMPORT_DIALOG_ORIENTATION_TOP_LEFT,
|
||||
SCE_PHOTOIMPORT_DIALOG_ORIENTATION_TOP_RIGHT,
|
||||
SCE_PHOTOIMPORT_DIALOG_ORIENTATION_BOTTOM_RIGHT,
|
||||
SCE_PHOTOIMPORT_DIALOG_ORIENTATION_BOTTOM_LEFT,
|
||||
SCE_PHOTOIMPORT_DIALOG_ORIENTATION_LEFT_TOP,
|
||||
SCE_PHOTOIMPORT_DIALOG_ORIENTATION_RIGHT_TOP,
|
||||
SCE_PHOTOIMPORT_DIALOG_ORIENTATION_RIGHT_BOTTOM,
|
||||
SCE_PHOTOIMPORT_DIALOG_ORIENTATION_LEFT_BOTTOM
|
||||
};
|
||||
|
||||
struct ScePhotoImportDialogFileDataSub
|
||||
{
|
||||
u32 width;
|
||||
u32 height;
|
||||
ScePhotoImportDialogFormatType format;
|
||||
ScePhotoImportDialogOrientation orientation;
|
||||
char reserved[32];
|
||||
};
|
||||
|
||||
struct ScePhotoImportDialogFileData
|
||||
{
|
||||
char fileName[1024];
|
||||
char photoTitle[256];
|
||||
char reserved[32];
|
||||
};
|
||||
|
||||
struct ScePhotoImportDialogItemData
|
||||
{
|
||||
ScePhotoImportDialogFileData fileData;
|
||||
ScePhotoImportDialogFileDataSub dataSub;
|
||||
char reserved[32];
|
||||
};
|
||||
|
||||
struct ScePhotoImportDialogResult
|
||||
{
|
||||
s32 result;
|
||||
u32 importedItemNum;
|
||||
char reserved[32];
|
||||
};
|
||||
|
||||
struct ScePhotoImportDialogParam
|
||||
{
|
||||
u32 sdkVersion;
|
||||
s32 mode;
|
||||
u32 visibleCategory;
|
||||
u32 itemCount;
|
||||
vm::psv::ptr<ScePhotoImportDialogItemData> itemData;
|
||||
char reserved[32];
|
||||
};
|
||||
|
||||
struct ScePhotoReviewDialogParam
|
||||
{
|
||||
u32 sdkVersion;
|
||||
s32 mode;
|
||||
char fileName[1024];
|
||||
vm::psv::ptr<void> workMemory;
|
||||
u32 workMemorySize;
|
||||
char reserved[32];
|
||||
};
|
||||
|
||||
struct ScePhotoReviewDialogResult
|
||||
{
|
||||
s32 result;
|
||||
char reserved[32];
|
||||
};
|
||||
|
||||
|
||||
s32 sceCommonDialogUpdate(vm::psv::ptr<const SceCommonDialogUpdateParam> updateParam)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceMsgDialogInit(vm::psv::ptr<const SceMsgDialogParam> param)
|
||||
s32 sceMsgDialogInit(vm::cptr<SceMsgDialogParam> param)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
SceCommonDialogStatus sceMsgDialogGetStatus()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceMsgDialogAbort()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceMsgDialogGetResult(vm::psv::ptr<SceMsgDialogResult> result)
|
||||
s32 sceMsgDialogGetResult(vm::ptr<SceMsgDialogResult> result)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceMsgDialogTerm()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceMsgDialogClose()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceMsgDialogProgressBarInc(s32 target, u32 delta)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceMsgDialogProgressBarSetValue(s32 target, u32 rate)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNetCheckDialogInit(vm::psv::ptr<SceNetCheckDialogParam> param)
|
||||
s32 sceNetCheckDialogInit(vm::ptr<SceNetCheckDialogParam> param)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
SceCommonDialogStatus sceNetCheckDialogGetStatus()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNetCheckDialogAbort()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNetCheckDialogGetResult(vm::psv::ptr<SceNetCheckDialogResult> result)
|
||||
s32 sceNetCheckDialogGetResult(vm::ptr<SceNetCheckDialogResult> result)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNetCheckDialogTerm()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceSaveDataDialogInit(vm::psv::ptr<const SceSaveDataDialogParam> param)
|
||||
s32 sceSaveDataDialogInit(vm::cptr<SceSaveDataDialogParam> param)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
SceCommonDialogStatus sceSaveDataDialogGetStatus()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceSaveDataDialogAbort()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceSaveDataDialogGetResult(vm::psv::ptr<SceSaveDataDialogResult> result)
|
||||
s32 sceSaveDataDialogGetResult(vm::ptr<SceSaveDataDialogResult> result)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceSaveDataDialogTerm()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
SceCommonDialogStatus sceSaveDataDialogGetSubStatus()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceSaveDataDialogSubClose()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceSaveDataDialogContinue(vm::psv::ptr<const SceSaveDataDialogParam> param)
|
||||
s32 sceSaveDataDialogContinue(vm::cptr<SceSaveDataDialogParam> param)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceSaveDataDialogFinish(vm::psv::ptr<const SceSaveDataDialogFinishParam> param)
|
||||
s32 sceSaveDataDialogFinish(vm::cptr<SceSaveDataDialogFinishParam> param)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceSaveDataDialogProgressBarInc(s32 target, u32 delta)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceSaveDataDialogProgressBarSetValue(s32 target, u32 rate)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceImeDialogInit(vm::psv::ptr<const SceImeDialogParam> param)
|
||||
s32 sceImeDialogInit(vm::cptr<SceImeDialogParam> param)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
SceCommonDialogStatus sceImeDialogGetStatus()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceImeDialogAbort()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceImeDialogGetResult(vm::psv::ptr<SceImeDialogResult> result)
|
||||
s32 sceImeDialogGetResult(vm::ptr<SceImeDialogResult> result)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceImeDialogTerm()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 scePhotoImportDialogInit(vm::psv::ptr<const ScePhotoImportDialogParam> param)
|
||||
s32 scePhotoImportDialogInit(vm::cptr<ScePhotoImportDialogParam> param)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
SceCommonDialogStatus scePhotoImportDialogGetStatus()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 scePhotoImportDialogGetResult(vm::psv::ptr<ScePhotoImportDialogResult> result)
|
||||
s32 scePhotoImportDialogGetResult(vm::ptr<ScePhotoImportDialogResult> result)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 scePhotoImportDialogTerm()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 scePhotoImportDialogAbort()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 scePhotoReviewDialogInit(vm::psv::ptr<const ScePhotoReviewDialogParam> param)
|
||||
s32 scePhotoReviewDialogInit(vm::cptr<ScePhotoReviewDialogParam> param)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
SceCommonDialogStatus scePhotoReviewDialogGetStatus()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 scePhotoReviewDialogGetResult(vm::psv::ptr<ScePhotoReviewDialogResult> result)
|
||||
s32 scePhotoReviewDialogGetResult(vm::ptr<ScePhotoReviewDialogResult> result)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 scePhotoReviewDialogTerm()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 scePhotoReviewDialogAbort()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
|
||||
|
@ -512,6 +212,7 @@ psv_log_base sceCommonDialog("SceCommonDialog", []()
|
|||
sceCommonDialog.on_load = nullptr;
|
||||
sceCommonDialog.on_unload = nullptr;
|
||||
sceCommonDialog.on_stop = nullptr;
|
||||
sceCommonDialog.on_error = nullptr;
|
||||
|
||||
REG_FUNC(0x90530F2F, sceCommonDialogUpdate);
|
||||
REG_FUNC(0x755FF270, sceMsgDialogInit);
|
||||
|
|
302
rpcs3/Emu/ARMv7/Modules/sceCommonDialog.h
Normal file
302
rpcs3/Emu/ARMv7/Modules/sceCommonDialog.h
Normal file
|
@ -0,0 +1,302 @@
|
|||
#pragma once
|
||||
|
||||
#include "sceGxm.h"
|
||||
#include "sceAppUtil.h"
|
||||
#include "sceIme.h"
|
||||
|
||||
enum SceCommonDialogStatus : s32
|
||||
{
|
||||
SCE_COMMON_DIALOG_STATUS_NONE = 0,
|
||||
SCE_COMMON_DIALOG_STATUS_RUNNING = 1,
|
||||
SCE_COMMON_DIALOG_STATUS_FINISHED = 2,
|
||||
};
|
||||
|
||||
enum SceCommonDialogResult : s32
|
||||
{
|
||||
SCE_COMMON_DIALOG_RESULT_OK,
|
||||
SCE_COMMON_DIALOG_RESULT_USER_CANCELED,
|
||||
SCE_COMMON_DIALOG_RESULT_ABORTED,
|
||||
};
|
||||
|
||||
struct SceCommonDialogRenderTargetInfo
|
||||
{
|
||||
vm::lptr<void> depthSurfaceData;
|
||||
vm::lptr<void> colorSurfaceData;
|
||||
le_t<u32> surfaceType; // SceGxmColorSurfaceType
|
||||
le_t<u32> colorFormat; // SceGxmColorFormat
|
||||
le_t<u32> width;
|
||||
le_t<u32> height;
|
||||
le_t<u32> strideInPixels;
|
||||
u8 reserved[32];
|
||||
};
|
||||
|
||||
struct SceCommonDialogUpdateParam
|
||||
{
|
||||
SceCommonDialogRenderTargetInfo renderTarget;
|
||||
vm::lptr<SceGxmSyncObject> displaySyncObject;
|
||||
u8 reserved[32];
|
||||
};
|
||||
|
||||
struct SceMsgDialogUserMessageParam
|
||||
{
|
||||
le_t<s32> buttonType;
|
||||
vm::lcptr<char> msg;
|
||||
char reserved[32];
|
||||
};
|
||||
|
||||
struct SceMsgDialogSystemMessageParam
|
||||
{
|
||||
le_t<s32> sysMsgType;
|
||||
le_t<s32> value;
|
||||
char reserved[32];
|
||||
};
|
||||
|
||||
struct SceMsgDialogErrorCodeParam
|
||||
{
|
||||
le_t<s32> errorCode;
|
||||
char reserved[32];
|
||||
};
|
||||
|
||||
struct SceMsgDialogProgressBarParam
|
||||
{
|
||||
le_t<s32> barType;
|
||||
SceMsgDialogSystemMessageParam sysMsgParam;
|
||||
vm::lcptr<char> msg;
|
||||
char reserved[32];
|
||||
};
|
||||
|
||||
struct SceMsgDialogParam
|
||||
{
|
||||
le_t<u32> sdkVersion;
|
||||
le_t<s32> mode;
|
||||
vm::lptr<SceMsgDialogUserMessageParam> userMsgParam;
|
||||
vm::lptr<SceMsgDialogSystemMessageParam> sysMsgParam;
|
||||
vm::lptr<SceMsgDialogErrorCodeParam> errorCodeParam;
|
||||
vm::lptr<SceMsgDialogProgressBarParam> progBarParam;
|
||||
le_t<u32> flag;
|
||||
char reserved[32];
|
||||
};
|
||||
|
||||
struct SceMsgDialogResult
|
||||
{
|
||||
le_t<s32> mode;
|
||||
le_t<s32> result;
|
||||
le_t<s32> buttonId;
|
||||
u8 reserved[32];
|
||||
};
|
||||
|
||||
|
||||
struct SceNetCheckDialogParam
|
||||
{
|
||||
le_t<u32> sdkVersion;
|
||||
le_t<s32> mode;
|
||||
u8 reserved[128];
|
||||
};
|
||||
|
||||
struct SceNetCheckDialogResult
|
||||
{
|
||||
le_t<s32> result;
|
||||
u8 reserved[128];
|
||||
};
|
||||
|
||||
struct SceSaveDataDialogFixedParam
|
||||
{
|
||||
le_t<u32> targetSlot;
|
||||
char reserved[32];
|
||||
};
|
||||
|
||||
struct SceSaveDataDialogListParam
|
||||
{
|
||||
vm::lcptr<u32> slotList;
|
||||
le_t<u32> slotListSize;
|
||||
le_t<s32> focusPos;
|
||||
le_t<u32> focusId;
|
||||
vm::lcptr<char> listTitle;
|
||||
char reserved[32];
|
||||
};
|
||||
|
||||
struct SceSaveDataDialogUserMessageParam
|
||||
{
|
||||
le_t<s32> buttonType;
|
||||
vm::lcptr<char> msg;
|
||||
le_t<u32> targetSlot;
|
||||
char reserved[32];
|
||||
};
|
||||
|
||||
struct SceSaveDataDialogSystemMessageParam
|
||||
{
|
||||
le_t<s32> sysMsgType;
|
||||
le_t<s32> value;
|
||||
le_t<u32> targetSlot;
|
||||
char reserved[32];
|
||||
};
|
||||
|
||||
struct SceSaveDataDialogErrorCodeParam
|
||||
{
|
||||
le_t<s32> errorCode;
|
||||
le_t<u32> targetSlot;
|
||||
char reserved[32];
|
||||
};
|
||||
|
||||
struct SceSaveDataDialogProgressBarParam
|
||||
{
|
||||
le_t<s32> barType;
|
||||
SceSaveDataDialogSystemMessageParam sysMsgParam;
|
||||
vm::lcptr<char> msg;
|
||||
le_t<u32> targetSlot;
|
||||
char reserved[32];
|
||||
};
|
||||
|
||||
struct SceSaveDataDialogSlotConfigParam
|
||||
{
|
||||
vm::lcptr<SceAppUtilSaveDataMountPoint> mountPoint;
|
||||
vm::lcptr<char> appSubDir;
|
||||
char reserved[32];
|
||||
};
|
||||
|
||||
struct SceSaveDataDialogParam
|
||||
{
|
||||
le_t<u32> sdkVersion;
|
||||
le_t<s32> mode;
|
||||
le_t<s32> dispType;
|
||||
vm::lptr<SceSaveDataDialogFixedParam> fixedParam;
|
||||
vm::lptr<SceSaveDataDialogListParam> listParam;
|
||||
vm::lptr<SceSaveDataDialogUserMessageParam> userMsgParam;
|
||||
vm::lptr<SceSaveDataDialogSystemMessageParam> sysMsgParam;
|
||||
vm::lptr<SceSaveDataDialogErrorCodeParam> errorCodeParam;
|
||||
vm::lptr<SceSaveDataDialogProgressBarParam> progBarParam;
|
||||
vm::lptr<SceSaveDataDialogSlotConfigParam> slotConfParam;
|
||||
le_t<u32> flag;
|
||||
vm::lptr<void> userdata;
|
||||
char reserved[32];
|
||||
};
|
||||
|
||||
struct SceSaveDataDialogFinishParam
|
||||
{
|
||||
le_t<u32> flag;
|
||||
char reserved[32];
|
||||
};
|
||||
|
||||
struct SceSaveDataDialogSlotInfo
|
||||
{
|
||||
le_t<u32> isExist;
|
||||
vm::lptr<SceAppUtilSaveDataSlotParam> slotParam;
|
||||
u8 reserved[32];
|
||||
};
|
||||
|
||||
struct SceSaveDataDialogResult
|
||||
{
|
||||
le_t<s32> mode;
|
||||
le_t<s32> result;
|
||||
le_t<s32> buttonId;
|
||||
le_t<u32> slotId;
|
||||
vm::lptr<SceSaveDataDialogSlotInfo> slotInfo;
|
||||
vm::lptr<void> userdata;
|
||||
char reserved[32];
|
||||
};
|
||||
|
||||
|
||||
struct SceImeDialogParam
|
||||
{
|
||||
le_t<u32> sdkVersion;
|
||||
le_t<u32> inputMethod;
|
||||
le_t<u64> supportedLanguages;
|
||||
le_t<s32> languagesForced;
|
||||
le_t<u32> type;
|
||||
le_t<u32> option;
|
||||
vm::lptr<SceImeCharFilter> filter;
|
||||
le_t<u32> dialogMode;
|
||||
le_t<u32> textBoxMode;
|
||||
vm::lcptr<u16> title;
|
||||
le_t<u32> maxTextLength;
|
||||
vm::lptr<u16> initialText;
|
||||
vm::lptr<u16> inputTextBuffer;
|
||||
char reserved[32];
|
||||
};
|
||||
|
||||
struct SceImeDialogResult
|
||||
{
|
||||
le_t<s32> result;
|
||||
char reserved[32];
|
||||
};
|
||||
|
||||
enum ScePhotoImportDialogFormatType : s32
|
||||
{
|
||||
SCE_PHOTOIMPORT_DIALOG_FORMAT_TYPE_UNKNOWN = 0,
|
||||
SCE_PHOTOIMPORT_DIALOG_FORMAT_TYPE_JPEG,
|
||||
SCE_PHOTOIMPORT_DIALOG_FORMAT_TYPE_PNG,
|
||||
SCE_PHOTOIMPORT_DIALOG_FORMAT_TYPE_GIF,
|
||||
SCE_PHOTOIMPORT_DIALOG_FORMAT_TYPE_BMP,
|
||||
SCE_PHOTOIMPORT_DIALOG_FORMAT_TYPE_TIFF
|
||||
};
|
||||
|
||||
enum ScePhotoImportDialogOrientation : s32
|
||||
{
|
||||
SCE_PHOTOIMPORT_DIALOG_ORIENTATION_UNKNOWN = 0,
|
||||
SCE_PHOTOIMPORT_DIALOG_ORIENTATION_TOP_LEFT,
|
||||
SCE_PHOTOIMPORT_DIALOG_ORIENTATION_TOP_RIGHT,
|
||||
SCE_PHOTOIMPORT_DIALOG_ORIENTATION_BOTTOM_RIGHT,
|
||||
SCE_PHOTOIMPORT_DIALOG_ORIENTATION_BOTTOM_LEFT,
|
||||
SCE_PHOTOIMPORT_DIALOG_ORIENTATION_LEFT_TOP,
|
||||
SCE_PHOTOIMPORT_DIALOG_ORIENTATION_RIGHT_TOP,
|
||||
SCE_PHOTOIMPORT_DIALOG_ORIENTATION_RIGHT_BOTTOM,
|
||||
SCE_PHOTOIMPORT_DIALOG_ORIENTATION_LEFT_BOTTOM,
|
||||
};
|
||||
|
||||
struct ScePhotoImportDialogFileDataSub
|
||||
{
|
||||
le_t<u32> width;
|
||||
le_t<u32> height;
|
||||
ScePhotoImportDialogFormatType format;
|
||||
ScePhotoImportDialogOrientation orientation;
|
||||
char reserved[32];
|
||||
};
|
||||
|
||||
struct ScePhotoImportDialogFileData
|
||||
{
|
||||
char fileName[1024];
|
||||
char photoTitle[256];
|
||||
char reserved[32];
|
||||
};
|
||||
|
||||
struct ScePhotoImportDialogItemData
|
||||
{
|
||||
ScePhotoImportDialogFileData fileData;
|
||||
ScePhotoImportDialogFileDataSub dataSub;
|
||||
char reserved[32];
|
||||
};
|
||||
|
||||
struct ScePhotoImportDialogResult
|
||||
{
|
||||
le_t<s32> result;
|
||||
le_t<u32> importedItemNum;
|
||||
char reserved[32];
|
||||
};
|
||||
|
||||
struct ScePhotoImportDialogParam
|
||||
{
|
||||
le_t<u32> sdkVersion;
|
||||
le_t<s32> mode;
|
||||
le_t<u32> visibleCategory;
|
||||
le_t<u32> itemCount;
|
||||
vm::lptr<ScePhotoImportDialogItemData> itemData;
|
||||
char reserved[32];
|
||||
};
|
||||
|
||||
struct ScePhotoReviewDialogParam
|
||||
{
|
||||
le_t<u32> sdkVersion;
|
||||
le_t<s32> mode;
|
||||
char fileName[1024];
|
||||
vm::lptr<void> workMemory;
|
||||
le_t<u32> workMemorySize;
|
||||
char reserved[32];
|
||||
};
|
||||
|
||||
struct ScePhotoReviewDialogResult
|
||||
{
|
||||
le_t<s32> result;
|
||||
char reserved[32];
|
||||
};
|
||||
|
||||
extern psv_log_base sceCommonDialog;
|
|
@ -2,67 +2,46 @@
|
|||
#include "Emu/System.h"
|
||||
#include "Emu/ARMv7/PSVFuncList.h"
|
||||
|
||||
extern psv_log_base sceCtrl;
|
||||
|
||||
struct SceCtrlData
|
||||
{
|
||||
u64 timeStamp;
|
||||
u32 buttons;
|
||||
u8 lx;
|
||||
u8 ly;
|
||||
u8 rx;
|
||||
u8 ry;
|
||||
u8 rsrv[16];
|
||||
};
|
||||
|
||||
struct SceCtrlRapidFireRule
|
||||
{
|
||||
u32 uiMask;
|
||||
u32 uiTrigger;
|
||||
u32 uiTarget;
|
||||
u32 uiDelay;
|
||||
u32 uiMake;
|
||||
u32 uiBreak;
|
||||
};
|
||||
#include "sceCtrl.h"
|
||||
|
||||
s32 sceCtrlSetSamplingMode(u32 uiMode)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceCtrlGetSamplingMode(vm::psv::ptr<u32> puiMode)
|
||||
s32 sceCtrlGetSamplingMode(vm::ptr<u32> puiMode)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceCtrlPeekBufferPositive(s32 port, vm::psv::ptr<SceCtrlData> pData, s32 nBufs)
|
||||
s32 sceCtrlPeekBufferPositive(s32 port, vm::ptr<SceCtrlData> pData, s32 nBufs)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceCtrlPeekBufferNegative(s32 port, vm::psv::ptr<SceCtrlData> pData, s32 nBufs)
|
||||
s32 sceCtrlPeekBufferNegative(s32 port, vm::ptr<SceCtrlData> pData, s32 nBufs)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceCtrlReadBufferPositive(s32 port, vm::psv::ptr<SceCtrlData> pData, s32 nBufs)
|
||||
s32 sceCtrlReadBufferPositive(s32 port, vm::ptr<SceCtrlData> pData, s32 nBufs)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceCtrlReadBufferNegative(s32 port, vm::psv::ptr<SceCtrlData> pData, s32 nBufs)
|
||||
s32 sceCtrlReadBufferNegative(s32 port, vm::ptr<SceCtrlData> pData, s32 nBufs)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceCtrlSetRapidFire(s32 port, s32 idx, vm::psv::ptr<const SceCtrlRapidFireRule> pRule)
|
||||
s32 sceCtrlSetRapidFire(s32 port, s32 idx, vm::cptr<SceCtrlRapidFireRule> pRule)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceCtrlClearRapidFire(s32 port, s32 idx)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
|
||||
|
@ -73,6 +52,7 @@ psv_log_base sceCtrl("SceCtrl", []()
|
|||
sceCtrl.on_load = nullptr;
|
||||
sceCtrl.on_unload = nullptr;
|
||||
sceCtrl.on_stop = nullptr;
|
||||
sceCtrl.on_error = nullptr;
|
||||
|
||||
REG_FUNC(0xA497B150, sceCtrlSetSamplingMode);
|
||||
REG_FUNC(0xEC752AAF, sceCtrlGetSamplingMode);
|
||||
|
|
24
rpcs3/Emu/ARMv7/Modules/sceCtrl.h
Normal file
24
rpcs3/Emu/ARMv7/Modules/sceCtrl.h
Normal file
|
@ -0,0 +1,24 @@
|
|||
#pragma once
|
||||
|
||||
struct SceCtrlData
|
||||
{
|
||||
le_t<u64> timeStamp;
|
||||
le_t<u32> buttons;
|
||||
u8 lx;
|
||||
u8 ly;
|
||||
u8 rx;
|
||||
u8 ry;
|
||||
u8 reserved[16];
|
||||
};
|
||||
|
||||
struct SceCtrlRapidFireRule
|
||||
{
|
||||
le_t<u32> uiMask;
|
||||
le_t<u32> uiTrigger;
|
||||
le_t<u32> uiTarget;
|
||||
le_t<u32> uiDelay;
|
||||
le_t<u32> uiMake;
|
||||
le_t<u32> uiBreak;
|
||||
};
|
||||
|
||||
extern psv_log_base sceCtrl;
|
|
@ -2,32 +2,26 @@
|
|||
#include "Emu/System.h"
|
||||
#include "Emu/ARMv7/PSVFuncList.h"
|
||||
|
||||
extern psv_log_base sceDbg;
|
||||
|
||||
enum SceDbgBreakOnErrorState : s32
|
||||
{
|
||||
SCE_DBG_DISABLE_BREAK_ON_ERROR = 0,
|
||||
SCE_DBG_ENABLE_BREAK_ON_ERROR
|
||||
};
|
||||
#include "sceDbg.h"
|
||||
|
||||
s32 sceDbgSetMinimumLogLevel(s32 minimumLogLevel)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceDbgSetBreakOnErrorState(SceDbgBreakOnErrorState state)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceDbgAssertionHandler(vm::psv::ptr<const char> pFile, s32 line, bool stop, vm::psv::ptr<const char> pComponent, vm::psv::ptr<const char> pMessage) // va_args...
|
||||
s32 sceDbgAssertionHandler(vm::cptr<char> pFile, s32 line, bool stop, vm::cptr<char> pComponent, vm::cptr<char> pMessage, armv7_va_args_t va_args)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceDbgLoggingHandler(vm::psv::ptr<const char> pFile, s32 line, s32 severity, vm::psv::ptr<const char> pComponent, vm::psv::ptr<const char> pMessage) // va_args...
|
||||
s32 sceDbgLoggingHandler(vm::cptr<char> pFile, s32 line, s32 severity, vm::cptr<char> pComponent, vm::cptr<char> pMessage, armv7_va_args_t va_args)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
|
||||
|
@ -38,6 +32,7 @@ psv_log_base sceDbg("SceDbg", []()
|
|||
sceDbg.on_load = nullptr;
|
||||
sceDbg.on_unload = nullptr;
|
||||
sceDbg.on_stop = nullptr;
|
||||
sceDbg.on_error = nullptr;
|
||||
|
||||
REG_FUNC(0x941622FA, sceDbgSetMinimumLogLevel);
|
||||
REG_FUNC(0x1AF3678B, sceDbgAssertionHandler);
|
||||
|
|
9
rpcs3/Emu/ARMv7/Modules/sceDbg.h
Normal file
9
rpcs3/Emu/ARMv7/Modules/sceDbg.h
Normal file
|
@ -0,0 +1,9 @@
|
|||
#pragma once
|
||||
|
||||
enum SceDbgBreakOnErrorState : s32
|
||||
{
|
||||
SCE_DBG_DISABLE_BREAK_ON_ERROR = 0,
|
||||
SCE_DBG_ENABLE_BREAK_ON_ERROR
|
||||
};
|
||||
|
||||
extern psv_log_base sceDbg;
|
|
@ -2,33 +2,31 @@
|
|||
#include "Emu/System.h"
|
||||
#include "Emu/ARMv7/PSVFuncList.h"
|
||||
|
||||
extern psv_log_base sceDeci4p;
|
||||
#include "sceDeci4p.h"
|
||||
|
||||
typedef vm::psv::ptr<s32(s32 notifyId, s32 notifyCount, s32 notifyArg, vm::psv::ptr<void> pCommon)> SceKernelDeci4pCallback;
|
||||
|
||||
s32 sceKernelDeci4pOpen(vm::psv::ptr<const char> protoname, u32 protonum, u32 bufsize)
|
||||
s32 sceKernelDeci4pOpen(vm::cptr<char> protoname, u32 protonum, u32 bufsize)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceKernelDeci4pClose(s32 socketid)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceKernelDeci4pRead(s32 socketid, vm::psv::ptr<void> buffer, u32 size, u32 reserved)
|
||||
s32 sceKernelDeci4pRead(s32 socketid, vm::ptr<void> buffer, u32 size, u32 reserved)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceKernelDeci4pWrite(s32 socketid, vm::psv::ptr<const void> buffer, u32 size, u32 reserved)
|
||||
s32 sceKernelDeci4pWrite(s32 socketid, vm::cptr<void> buffer, u32 size, u32 reserved)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceKernelDeci4pRegisterCallback(s32 socketid, s32 cbid)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
|
||||
|
@ -39,6 +37,7 @@ psv_log_base sceDeci4p("SceDeci4pUserp", []()
|
|||
sceDeci4p.on_load = nullptr;
|
||||
sceDeci4p.on_unload = nullptr;
|
||||
sceDeci4p.on_stop = nullptr;
|
||||
sceDeci4p.on_error = nullptr;
|
||||
|
||||
REG_FUNC(0x28578FE8, sceKernelDeci4pOpen);
|
||||
REG_FUNC(0x63B0C50F, sceKernelDeci4pClose);
|
||||
|
|
5
rpcs3/Emu/ARMv7/Modules/sceDeci4p.h
Normal file
5
rpcs3/Emu/ARMv7/Modules/sceDeci4p.h
Normal file
|
@ -0,0 +1,5 @@
|
|||
#pragma once
|
||||
|
||||
using SceKernelDeci4pCallback = func_def<s32(s32 notifyId, s32 notifyCount, s32 notifyArg, vm::ptr<void> pCommon)>;
|
||||
|
||||
extern psv_log_base sceDeci4p;
|
|
@ -2,71 +2,71 @@
|
|||
#include "Emu/System.h"
|
||||
#include "Emu/ARMv7/PSVFuncList.h"
|
||||
|
||||
extern psv_log_base sceDeflt;
|
||||
#include "sceDeflt.h"
|
||||
|
||||
s32 sceGzipIsValid(vm::psv::ptr<const void> pSrcGzip)
|
||||
s32 sceGzipIsValid(vm::cptr<void> pSrcGzip)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceGzipGetInfo(vm::psv::ptr<const void> pSrcGzip, vm::psv::pptr<const void> ppvExtra, vm::psv::pptr<const char> ppszName, vm::psv::pptr<const char> ppszComment, vm::psv::ptr<u16> pusCrc, vm::psv::pptr<const void> ppvData)
|
||||
s32 sceGzipGetInfo(vm::cptr<void> pSrcGzip, vm::cpptr<void> ppvExtra, vm::cpptr<char> ppszName, vm::cpptr<char> ppszComment, vm::ptr<u16> pusCrc, vm::cpptr<void> ppvData)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
vm::psv::ptr<const char> sceGzipGetName(vm::psv::ptr<const void> pSrcGzip)
|
||||
vm::cptr<char> sceGzipGetName(vm::cptr<void> pSrcGzip)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
vm::psv::ptr<const char> sceGzipGetComment(vm::psv::ptr<const void> pSrcGzip)
|
||||
vm::cptr<char> sceGzipGetComment(vm::cptr<void> pSrcGzip)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
vm::psv::ptr<const void> sceGzipGetCompressedData(vm::psv::ptr<const void> pSrcGzip)
|
||||
vm::cptr<void> sceGzipGetCompressedData(vm::cptr<void> pSrcGzip)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceGzipDecompress(vm::psv::ptr<void> pDst, u32 uiBufSize, vm::psv::ptr<const void> pSrcGzip, vm::psv::ptr<u32> puiCrc32)
|
||||
s32 sceGzipDecompress(vm::ptr<void> pDst, u32 uiBufSize, vm::cptr<void> pSrcGzip, vm::ptr<u32> puiCrc32)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceZlibIsValid(vm::psv::ptr<const void> pSrcZlib)
|
||||
s32 sceZlibIsValid(vm::cptr<void> pSrcZlib)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceZlibGetInfo(vm::psv::ptr<const void> pSrcZlib, vm::psv::ptr<u8> pbCmf, vm::psv::ptr<u8> pbFlg, vm::psv::ptr<u32> puiDictId, vm::psv::pptr<const void> ppvData)
|
||||
s32 sceZlibGetInfo(vm::cptr<void> pSrcZlib, vm::ptr<u8> pbCmf, vm::ptr<u8> pbFlg, vm::ptr<u32> puiDictId, vm::cpptr<void> ppvData)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
vm::psv::ptr<const void> sceZlibGetCompressedData(vm::psv::ptr<const void> pSrcZlib)
|
||||
vm::cptr<void> sceZlibGetCompressedData(vm::cptr<void> pSrcZlib)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceZlibDecompress(vm::psv::ptr<void> pDst, u32 uiBufSize, vm::psv::ptr<const void> pSrcZlib, vm::psv::ptr<u32> puiAdler32)
|
||||
s32 sceZlibDecompress(vm::ptr<void> pDst, u32 uiBufSize, vm::cptr<void> pSrcZlib, vm::ptr<u32> puiAdler32)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
u32 sceZlibAdler32(u32 uiAdler, vm::psv::ptr<const u8> pSrc, u32 uiSize)
|
||||
u32 sceZlibAdler32(u32 uiAdler, vm::cptr<u8> pSrc, u32 uiSize)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceDeflateDecompress(vm::psv::ptr<void> pDst, u32 uiBufSize, vm::psv::ptr<const void> pSrcDeflate, vm::psv::pptr<const void> ppNext)
|
||||
s32 sceDeflateDecompress(vm::ptr<void> pDst, u32 uiBufSize, vm::cptr<void> pSrcDeflate, vm::cpptr<void> ppNext)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceZipGetInfo(vm::psv::ptr<const void> pSrc, vm::psv::pptr<const void> ppvExtra, vm::psv::ptr<u32> puiCrc, vm::psv::pptr<const void> ppvData)
|
||||
s32 sceZipGetInfo(vm::cptr<void> pSrc, vm::cpptr<void> ppvExtra, vm::ptr<u32> puiCrc, vm::cpptr<void> ppvData)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
|
||||
|
@ -77,6 +77,7 @@ psv_log_base sceDeflt("SceDeflt", []()
|
|||
sceDeflt.on_load = nullptr;
|
||||
sceDeflt.on_unload = nullptr;
|
||||
sceDeflt.on_stop = nullptr;
|
||||
sceDeflt.on_error = nullptr;
|
||||
|
||||
REG_FUNC(0xCD83A464, sceZlibAdler32);
|
||||
REG_FUNC(0x110D5050, sceDeflateDecompress);
|
||||
|
|
3
rpcs3/Emu/ARMv7/Modules/sceDeflt.h
Normal file
3
rpcs3/Emu/ARMv7/Modules/sceDeflt.h
Normal file
|
@ -0,0 +1,3 @@
|
|||
#pragma once
|
||||
|
||||
extern psv_log_base sceDeflt;
|
|
@ -2,86 +2,76 @@
|
|||
#include "Emu/System.h"
|
||||
#include "Emu/ARMv7/PSVFuncList.h"
|
||||
|
||||
extern psv_log_base sceDisplay;
|
||||
#include "sceDisplay.h"
|
||||
|
||||
struct SceDisplayFrameBuf
|
||||
s32 sceDisplayGetRefreshRate(vm::ptr<float> pFps)
|
||||
{
|
||||
u32 size;
|
||||
vm::psv::ptr<void> base;
|
||||
u32 pitch;
|
||||
u32 pixelformat;
|
||||
u32 width;
|
||||
u32 height;
|
||||
};
|
||||
|
||||
s32 sceDisplayGetRefreshRate(vm::psv::ptr<float> pFps)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceDisplaySetFrameBuf(vm::psv::ptr<const SceDisplayFrameBuf> pFrameBuf, s32 iUpdateTimingMode)
|
||||
s32 sceDisplaySetFrameBuf(vm::cptr<SceDisplayFrameBuf> pFrameBuf, s32 iUpdateTimingMode)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceDisplayGetFrameBuf(vm::psv::ptr<SceDisplayFrameBuf> pFrameBuf, s32 iUpdateTimingMode)
|
||||
s32 sceDisplayGetFrameBuf(vm::ptr<SceDisplayFrameBuf> pFrameBuf, s32 iUpdateTimingMode)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceDisplayGetVcount()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceDisplayWaitVblankStart()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceDisplayWaitVblankStartCB()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceDisplayWaitVblankStartMulti(u32 vcount)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceDisplayWaitVblankStartMultiCB(u32 vcount)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceDisplayWaitSetFrameBuf()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceDisplayWaitSetFrameBufCB()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceDisplayWaitSetFrameBufMulti(u32 vcount)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceDisplayWaitSetFrameBufMultiCB(u32 vcount)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceDisplayRegisterVblankStartCallback(s32 uid)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceDisplayUnregisterVblankStartCallback(s32 uid)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
|
||||
|
@ -92,6 +82,7 @@ psv_log_base sceDisplay("SceDisplay", []()
|
|||
sceDisplay.on_load = nullptr;
|
||||
sceDisplay.on_unload = nullptr;
|
||||
sceDisplay.on_stop = nullptr;
|
||||
sceDisplay.on_error = nullptr;
|
||||
|
||||
// SceDisplayUser
|
||||
REG_FUNC(0x7A410B64, sceDisplaySetFrameBuf);
|
||||
|
|
13
rpcs3/Emu/ARMv7/Modules/sceDisplay.h
Normal file
13
rpcs3/Emu/ARMv7/Modules/sceDisplay.h
Normal file
|
@ -0,0 +1,13 @@
|
|||
#pragma once
|
||||
|
||||
struct SceDisplayFrameBuf
|
||||
{
|
||||
le_t<u32> size;
|
||||
vm::lptr<void> base;
|
||||
le_t<u32> pitch;
|
||||
le_t<u32> pixelformat;
|
||||
le_t<u32> width;
|
||||
le_t<u32> height;
|
||||
};
|
||||
|
||||
extern psv_log_base sceDisplay;
|
|
@ -2,82 +2,46 @@
|
|||
#include "Emu/System.h"
|
||||
#include "Emu/ARMv7/PSVFuncList.h"
|
||||
|
||||
extern psv_log_base sceFiber;
|
||||
#include "sceFiber.h"
|
||||
|
||||
typedef vm::psv::ptr<void(u32 argOnInitialize, u32 argOnRun)> SceFiberEntry;
|
||||
|
||||
struct SceFiber
|
||||
s32 _sceFiberInitializeImpl(vm::ptr<SceFiber> fiber, vm::cptr<char> name, vm::ptr<SceFiberEntry> entry, u32 argOnInitialize, vm::ptr<void> addrContext, u32 sizeContext, vm::cptr<SceFiberOptParam> optParam, u32 buildVersion)
|
||||
{
|
||||
static const uint size = 128;
|
||||
static const uint align = 8;
|
||||
u64 padding[size / sizeof(u64)];
|
||||
};
|
||||
|
||||
struct SceFiberOptParam
|
||||
{
|
||||
static const uint size = 128;
|
||||
static const uint align = 8;
|
||||
u64 padding[size / sizeof(u64)];
|
||||
};
|
||||
|
||||
struct SceFiberInfo
|
||||
{
|
||||
static const uint size = 128;
|
||||
static const uint align = 8;
|
||||
|
||||
union
|
||||
{
|
||||
u64 padding[size / sizeof(u64)];
|
||||
|
||||
struct
|
||||
{
|
||||
SceFiberEntry entry;
|
||||
u32 argOnInitialize;
|
||||
vm::psv::ptr<void> addrContext;
|
||||
s32 sizeContext;
|
||||
char name[32];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
s32 _sceFiberInitializeImpl(vm::psv::ptr<SceFiber> fiber, vm::psv::ptr<const char> name, SceFiberEntry entry, u32 argOnInitialize, vm::psv::ptr<void> addrContext, u32 sizeContext, vm::psv::ptr<const SceFiberOptParam> optParam, u32 buildVersion)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceFiberOptParamInitialize(vm::psv::ptr<SceFiberOptParam> optParam)
|
||||
s32 sceFiberOptParamInitialize(vm::ptr<SceFiberOptParam> optParam)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceFiberFinalize(vm::psv::ptr<SceFiber> fiber)
|
||||
s32 sceFiberFinalize(vm::ptr<SceFiber> fiber)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceFiberRun(vm::psv::ptr<SceFiber> fiber, u32 argOnRunTo, vm::psv::ptr<u32> argOnReturn)
|
||||
s32 sceFiberRun(vm::ptr<SceFiber> fiber, u32 argOnRunTo, vm::ptr<u32> argOnReturn)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceFiberSwitch(vm::psv::ptr<SceFiber> fiber, u32 argOnRunTo, vm::psv::ptr<u32> argOnRun)
|
||||
s32 sceFiberSwitch(vm::ptr<SceFiber> fiber, u32 argOnRunTo, vm::ptr<u32> argOnRun)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceFiberGetSelf(vm::psv::pptr<SceFiber> fiber)
|
||||
s32 sceFiberGetSelf(vm::pptr<SceFiber> fiber)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceFiberReturnToThread(u32 argOnReturn, vm::psv::ptr<u32> argOnRun)
|
||||
s32 sceFiberReturnToThread(u32 argOnReturn, vm::ptr<u32> argOnRun)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceFiberGetInfo(vm::psv::ptr<SceFiber> fiber, vm::psv::ptr<SceFiberInfo> fiberInfo)
|
||||
s32 sceFiberGetInfo(vm::ptr<SceFiber> fiber, vm::ptr<SceFiberInfo> fiberInfo)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
|
||||
|
@ -88,6 +52,7 @@ psv_log_base sceFiber("SceFiber", []()
|
|||
sceFiber.on_load = nullptr;
|
||||
sceFiber.on_unload = nullptr;
|
||||
sceFiber.on_stop = nullptr;
|
||||
sceFiber.on_error = nullptr;
|
||||
|
||||
REG_FUNC(0xF24A298C, _sceFiberInitializeImpl);
|
||||
//REG_FUNC(0xC6A3F9BB, _sceFiberInitializeWithInternalOptionImpl);
|
||||
|
|
31
rpcs3/Emu/ARMv7/Modules/sceFiber.h
Normal file
31
rpcs3/Emu/ARMv7/Modules/sceFiber.h
Normal file
|
@ -0,0 +1,31 @@
|
|||
#pragma once
|
||||
|
||||
using SceFiberEntry = func_def<void(u32 argOnInitialize, u32 argOnRun)>;
|
||||
|
||||
struct set_alignment(8) SceFiber
|
||||
{
|
||||
le_t<u64> padding[16];
|
||||
};
|
||||
|
||||
CHECK_SIZE_ALIGN(SceFiber, 128, 8);
|
||||
|
||||
struct set_alignment(8) SceFiberOptParam
|
||||
{
|
||||
le_t<u64> padding[16];
|
||||
};
|
||||
|
||||
CHECK_SIZE_ALIGN(SceFiberOptParam, 128, 8);
|
||||
|
||||
struct set_alignment(8) SceFiberInfo
|
||||
{
|
||||
vm::lptr<SceFiberEntry> entry;
|
||||
le_t<u32> argOnInitialize;
|
||||
vm::lptr<void> addrContext;
|
||||
le_t<s32> sizeContext;
|
||||
char name[32];
|
||||
u8 padding[80];
|
||||
};
|
||||
|
||||
CHECK_SIZE_ALIGN(SceFiberInfo, 128, 8);
|
||||
|
||||
extern psv_log_base sceFiber;
|
File diff suppressed because it is too large
Load diff
113
rpcs3/Emu/ARMv7/Modules/sceFios.h
Normal file
113
rpcs3/Emu/ARMv7/Modules/sceFios.h
Normal file
|
@ -0,0 +1,113 @@
|
|||
#pragma once
|
||||
|
||||
using SceFiosOpCallback = func_def<s32(vm::ptr<void> pContext, s32 op, u8 event, s32 err)>;
|
||||
using SceFiosVprintfCallback = func_def<s32(vm::cptr<char> fmt, va_list ap)>;
|
||||
using SceFiosMemcpyCallback = func_def<vm::ptr<void>(vm::ptr<void> dst, vm::cptr<void> src, u32 len)>;
|
||||
|
||||
enum SceFiosWhence : s32
|
||||
{
|
||||
SCE_FIOS_SEEK_SET = 0,
|
||||
SCE_FIOS_SEEK_CUR = 1,
|
||||
SCE_FIOS_SEEK_END = 2,
|
||||
};
|
||||
|
||||
struct SceFiosBuffer
|
||||
{
|
||||
vm::lptr<void> pPtr;
|
||||
le_t<u32> length;
|
||||
};
|
||||
|
||||
struct SceFiosOpAttr
|
||||
{
|
||||
le_t<s64> deadline;
|
||||
vm::lptr<SceFiosOpCallback> pCallback;
|
||||
vm::lptr<void> pCallbackContext;
|
||||
|
||||
//le_t<s32> priority : 8;
|
||||
//le_t<u32> opflags : 24;
|
||||
le_t<u32> params; // priority, opflags
|
||||
|
||||
le_t<u32> userTag;
|
||||
vm::lptr<void> userPtr;
|
||||
vm::lptr<void> pReserved;
|
||||
};
|
||||
|
||||
struct SceFiosDirEntry
|
||||
{
|
||||
le_t<s64> fileSize;
|
||||
le_t<u32> statFlags;
|
||||
le_t<u16> nameLength;
|
||||
le_t<u16> fullPathLength;
|
||||
le_t<u16> offsetToName;
|
||||
le_t<u16> reserved[3];
|
||||
char fullPath[1024];
|
||||
};
|
||||
|
||||
struct SceFiosStat
|
||||
{
|
||||
le_t<s64> fileSize;
|
||||
le_t<u64> accessDate;
|
||||
le_t<u64> modificationDate;
|
||||
le_t<u64> creationDate;
|
||||
le_t<u32> statFlags;
|
||||
le_t<u32> reserved;
|
||||
le_t<s64> uid;
|
||||
le_t<s64> gid;
|
||||
le_t<s64> dev;
|
||||
le_t<s64> ino;
|
||||
le_t<s64> mode;
|
||||
};
|
||||
|
||||
struct SceFiosOpenParams
|
||||
{
|
||||
le_t<u32> openFlags;
|
||||
le_t<u32> reserved;
|
||||
SceFiosBuffer buffer;
|
||||
};
|
||||
|
||||
struct SceFiosTuple
|
||||
{
|
||||
le_t<s64> offset;
|
||||
le_t<s64> size;
|
||||
char path[1024];
|
||||
};
|
||||
|
||||
struct SceFiosParams
|
||||
{
|
||||
//le_t<u32> initialized : 1;
|
||||
//le_t<u32> paramsSize : 14;
|
||||
//le_t<u32> pathMax : 16;
|
||||
le_t<u32> params; // initialized, paramsSize, pathMax
|
||||
|
||||
le_t<u32> profiling;
|
||||
SceFiosBuffer opStorage;
|
||||
SceFiosBuffer fhStorage;
|
||||
SceFiosBuffer dhStorage;
|
||||
SceFiosBuffer chunkStorage;
|
||||
vm::lptr<SceFiosVprintfCallback> pVprintf;
|
||||
vm::lptr<SceFiosMemcpyCallback> pMemcpy;
|
||||
le_t<s32> threadPriority[2];
|
||||
le_t<s32> threadAffinity[2];
|
||||
};
|
||||
|
||||
struct SceFiosOverlay
|
||||
{
|
||||
u8 type;
|
||||
u8 order;
|
||||
u8 reserved[10];
|
||||
le_t<s32> id;
|
||||
char dst[292];
|
||||
char src[292];
|
||||
};
|
||||
|
||||
using SceFiosIOFilterCallback = func_def<void()>;
|
||||
|
||||
struct SceFiosPsarcDearchiverContext
|
||||
{
|
||||
le_t<u32> sizeOfContext;
|
||||
le_t<u32> workBufferSize;
|
||||
vm::lptr<void> pWorkBuffer;
|
||||
le_t<s32> reserved[4];
|
||||
};
|
||||
|
||||
extern psv_log_base sceFios;
|
|
@ -2,7 +2,79 @@
|
|||
#include "Emu/System.h"
|
||||
#include "Emu/ARMv7/PSVFuncList.h"
|
||||
|
||||
extern psv_log_base sceFpu;
|
||||
#include "sceFpu.h"
|
||||
|
||||
float sceFpuSinf(float x)
|
||||
{
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
float sceFpuCosf(float x)
|
||||
{
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
float sceFpuTanf(float x)
|
||||
{
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
float sceFpuAtanf(float x)
|
||||
{
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
float sceFpuAtan2f(float y, float x)
|
||||
{
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
float sceFpuAsinf(float x)
|
||||
{
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
float sceFpuAcosf(float x)
|
||||
{
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
|
||||
float sceFpuLogf(float x)
|
||||
{
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
float sceFpuLog2f(float fs)
|
||||
{
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
float sceFpuLog10f(float fs)
|
||||
{
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
float sceFpuExpf(float x)
|
||||
{
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
float sceFpuExp2f(float x)
|
||||
{
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
float sceFpuExp10f(float x)
|
||||
{
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
float sceFpuPowf(float x, float y)
|
||||
{
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
|
||||
#define REG_FUNC(nid, name) reg_psv_func(nid, &sceFpu, #name, name)
|
||||
|
||||
|
@ -11,6 +83,7 @@ psv_log_base sceFpu("SceFpu", []()
|
|||
sceFpu.on_load = nullptr;
|
||||
sceFpu.on_unload = nullptr;
|
||||
sceFpu.on_stop = nullptr;
|
||||
sceFpu.on_error = nullptr;
|
||||
|
||||
//REG_FUNC(0x33E1AC14, sceFpuSinf);
|
||||
//REG_FUNC(0xDB66BA89, sceFpuCosf);
|
||||
|
|
3
rpcs3/Emu/ARMv7/Modules/sceFpu.h
Normal file
3
rpcs3/Emu/ARMv7/Modules/sceFpu.h
Normal file
|
@ -0,0 +1,3 @@
|
|||
#pragma once
|
||||
|
||||
extern psv_log_base sceFpu;
|
File diff suppressed because it is too large
Load diff
|
@ -29,15 +29,15 @@ enum
|
|||
SCE_GXM_ERROR_DRIVER = 0x805B0017,
|
||||
};
|
||||
|
||||
typedef void(SceGxmDisplayQueueCallback)(vm::psv::ptr<const void> callbackData);
|
||||
using SceGxmDisplayQueueCallback = func_def<void(vm::cptr<void> callbackData)>;
|
||||
|
||||
struct SceGxmInitializeParams
|
||||
{
|
||||
u32 flags;
|
||||
u32 displayQueueMaxPendingCount;
|
||||
vm::psv::ptr<SceGxmDisplayQueueCallback> displayQueueCallback;
|
||||
u32 displayQueueCallbackDataSize;
|
||||
s32 parameterBufferSize;
|
||||
le_t<u32> flags;
|
||||
le_t<u32> displayQueueMaxPendingCount;
|
||||
vm::lptr<SceGxmDisplayQueueCallback> displayQueueCallback;
|
||||
le_t<u32> displayQueueCallbackDataSize;
|
||||
le_t<s32> parameterBufferSize;
|
||||
};
|
||||
|
||||
enum SceGxmMemoryAttribFlags : u32
|
||||
|
@ -1002,13 +1002,13 @@ enum SceGxmColorMask : u8
|
|||
|
||||
struct SceGxmBlendInfo
|
||||
{
|
||||
SceGxmColorMask colorMask;
|
||||
SceGxmBlendFunc colorFunc : 4;
|
||||
SceGxmBlendFunc alphaFunc : 4;
|
||||
SceGxmBlendFactor colorSrc : 4;
|
||||
SceGxmBlendFactor colorDst : 4;
|
||||
SceGxmBlendFactor alphaSrc : 4;
|
||||
SceGxmBlendFactor alphaDst : 4;
|
||||
u8 colorMask; // SceGxmColorMask
|
||||
u8 colorFunc : 4; // SceGxmBlendFunc
|
||||
u8 alphaFunc : 4; // SceGxmBlendFunc
|
||||
u8 colorSrc : 4; // SceGxmBlendFactor
|
||||
u8 colorDst : 4; // SceGxmBlendFactor
|
||||
u8 alphaSrc : 4; // SceGxmBlendFactor
|
||||
u8 alphaDst : 4; // SceGxmBlendFactor
|
||||
};
|
||||
|
||||
struct SceGxmRenderTarget;
|
||||
|
@ -1017,63 +1017,63 @@ struct SceGxmSyncObject;
|
|||
|
||||
struct SceGxmVertexAttribute
|
||||
{
|
||||
u16 streamIndex;
|
||||
u16 offset;
|
||||
SceGxmAttributeFormat format;
|
||||
le_t<u16> streamIndex;
|
||||
le_t<u16> offset;
|
||||
u8 format; // SceGxmAttributeFormat
|
||||
u8 componentCount;
|
||||
u16 regIndex;
|
||||
le_t<u16> regIndex;
|
||||
};
|
||||
|
||||
struct SceGxmVertexStream
|
||||
{
|
||||
u16 stride;
|
||||
u16 indexSource;
|
||||
le_t<u16> stride;
|
||||
le_t<u16> indexSource;
|
||||
};
|
||||
|
||||
struct SceGxmTexture
|
||||
{
|
||||
u32 controlWords[4];
|
||||
le_t<u32> controlWords[4];
|
||||
};
|
||||
|
||||
struct SceGxmColorSurface
|
||||
{
|
||||
u32 pbeSidebandWord;
|
||||
u32 pbeEmitWords[6];
|
||||
u32 outputRegisterSize;
|
||||
le_t<u32> pbeSidebandWord;
|
||||
le_t<u32> pbeEmitWords[6];
|
||||
le_t<u32> outputRegisterSize;
|
||||
SceGxmTexture backgroundTex;
|
||||
};
|
||||
|
||||
struct SceGxmDepthStencilSurface
|
||||
{
|
||||
u32 zlsControl;
|
||||
vm::psv::ptr<void> depthData;
|
||||
vm::psv::ptr<void> stencilData;
|
||||
float backgroundDepth;
|
||||
u32 backgroundControl;
|
||||
le_t<u32> zlsControl;
|
||||
vm::lptr<void> depthData;
|
||||
vm::lptr<void> stencilData;
|
||||
le_t<float> backgroundDepth;
|
||||
le_t<u32> backgroundControl;
|
||||
};
|
||||
|
||||
struct SceGxmAuxiliarySurface
|
||||
{
|
||||
SceGxmColorFormat colorFormat;
|
||||
SceGxmColorSurfaceType type;
|
||||
u32 width;
|
||||
u32 height;
|
||||
u32 stride;
|
||||
vm::psv::ptr<void> data;
|
||||
le_t<u32> colorFormat; // SceGxmColorFormat
|
||||
le_t<u32> type; // SceGxmColorSurfaceType
|
||||
le_t<u32> width;
|
||||
le_t<u32> height;
|
||||
le_t<u32> stride;
|
||||
vm::lptr<void> data;
|
||||
};
|
||||
|
||||
struct SceGxmNotification
|
||||
{
|
||||
vm::psv::ptr<volatile u32> address;
|
||||
u32 value;
|
||||
vm::lptr<volatile u32> address;
|
||||
le_t<u32> value;
|
||||
};
|
||||
|
||||
struct SceGxmValidRegion
|
||||
{
|
||||
u32 xMin;
|
||||
u32 yMin;
|
||||
u32 xMax;
|
||||
u32 yMax;
|
||||
le_t<u32> xMin;
|
||||
le_t<u32> yMin;
|
||||
le_t<u32> xMax;
|
||||
le_t<u32> yMax;
|
||||
};
|
||||
|
||||
struct SceGxmContext;
|
||||
|
@ -1089,17 +1089,17 @@ enum
|
|||
|
||||
struct SceGxmContextParams
|
||||
{
|
||||
vm::psv::ptr<void> hostMem;
|
||||
u32 hostMemSize;
|
||||
vm::psv::ptr<void> vdmRingBufferMem;
|
||||
u32 vdmRingBufferMemSize;
|
||||
vm::psv::ptr<void> vertexRingBufferMem;
|
||||
u32 vertexRingBufferMemSize;
|
||||
vm::psv::ptr<void> fragmentRingBufferMem;
|
||||
u32 fragmentRingBufferMemSize;
|
||||
vm::psv::ptr<void> fragmentUsseRingBufferMem;
|
||||
u32 fragmentUsseRingBufferMemSize;
|
||||
u32 fragmentUsseRingBufferOffset;
|
||||
vm::lptr<void> hostMem;
|
||||
le_t<u32> hostMemSize;
|
||||
vm::lptr<void> vdmRingBufferMem;
|
||||
le_t<u32> vdmRingBufferMemSize;
|
||||
vm::lptr<void> vertexRingBufferMem;
|
||||
le_t<u32> vertexRingBufferMemSize;
|
||||
vm::lptr<void> fragmentRingBufferMem;
|
||||
le_t<u32> fragmentRingBufferMemSize;
|
||||
vm::lptr<void> fragmentUsseRingBufferMem;
|
||||
le_t<u32> fragmentUsseRingBufferMemSize;
|
||||
le_t<u32> fragmentUsseRingBufferOffset;
|
||||
};
|
||||
|
||||
struct SceGxmVertexProgram;
|
||||
|
@ -1115,17 +1115,17 @@ enum
|
|||
|
||||
struct SceGxmPrecomputedVertexState
|
||||
{
|
||||
u32 data[SCE_GXM_PRECOMPUTED_VERTEX_STATE_WORD_COUNT];
|
||||
le_t<u32> data[SCE_GXM_PRECOMPUTED_VERTEX_STATE_WORD_COUNT];
|
||||
};
|
||||
|
||||
struct SceGxmPrecomputedFragmentState
|
||||
{
|
||||
u32 data[SCE_GXM_PRECOMPUTED_FRAGMENT_STATE_WORD_COUNT];
|
||||
le_t<u32> data[SCE_GXM_PRECOMPUTED_FRAGMENT_STATE_WORD_COUNT];
|
||||
};
|
||||
|
||||
struct SceGxmPrecomputedDraw
|
||||
{
|
||||
u32 data[SCE_GXM_PRECOMPUTED_DRAW_WORD_COUNT];
|
||||
le_t<u32> data[SCE_GXM_PRECOMPUTED_DRAW_WORD_COUNT];
|
||||
};
|
||||
|
||||
enum : u32
|
||||
|
@ -1193,34 +1193,32 @@ struct SceGxmShaderPatcher;
|
|||
|
||||
struct SceGxmRegisteredProgram;
|
||||
|
||||
typedef vm::psv::ptr<SceGxmRegisteredProgram> SceGxmShaderPatcherId;
|
||||
|
||||
typedef vm::psv::ptr<void>(SceGxmShaderPatcherHostAllocCallback)(vm::psv::ptr<void> userData, u32 size);
|
||||
typedef void(SceGxmShaderPatcherHostFreeCallback)(vm::psv::ptr<void> userData, vm::psv::ptr<void> mem);
|
||||
typedef vm::psv::ptr<void>(SceGxmShaderPatcherBufferAllocCallback)(vm::psv::ptr<void> userData, u32 size);
|
||||
typedef void(SceGxmShaderPatcherBufferFreeCallback)(vm::psv::ptr<void> userData, vm::psv::ptr<void> mem);
|
||||
typedef vm::psv::ptr<void>(SceGxmShaderPatcherUsseAllocCallback)(vm::psv::ptr<void> userData, u32 size, vm::psv::ptr<u32> usseOffset);
|
||||
typedef void(SceGxmShaderPatcherUsseFreeCallback)(vm::psv::ptr<void> userData, vm::psv::ptr<void> mem);
|
||||
using SceGxmShaderPatcherHostAllocCallback = func_def<vm::ptr<void>(vm::ptr<void> userData, u32 size)>;
|
||||
using SceGxmShaderPatcherHostFreeCallback = func_def<void(vm::ptr<void> userData, vm::ptr<void> mem)>;
|
||||
using SceGxmShaderPatcherBufferAllocCallback = func_def<vm::ptr<void>(vm::ptr<void> userData, u32 size)>;
|
||||
using SceGxmShaderPatcherBufferFreeCallback = func_def<void(vm::ptr<void> userData, vm::ptr<void> mem)>;
|
||||
using SceGxmShaderPatcherUsseAllocCallback = func_def<vm::ptr<void>(vm::ptr<void> userData, u32 size, vm::ptr<u32> usseOffset)>;
|
||||
using SceGxmShaderPatcherUsseFreeCallback = func_def<void(vm::ptr<void> userData, vm::ptr<void> mem)>;
|
||||
|
||||
struct SceGxmShaderPatcherParams
|
||||
{
|
||||
vm::psv::ptr<void> userData;
|
||||
vm::psv::ptr<SceGxmShaderPatcherHostAllocCallback> hostAllocCallback;
|
||||
vm::psv::ptr<SceGxmShaderPatcherHostFreeCallback> hostFreeCallback;
|
||||
vm::psv::ptr<SceGxmShaderPatcherBufferAllocCallback> bufferAllocCallback;
|
||||
vm::psv::ptr<SceGxmShaderPatcherBufferFreeCallback> bufferFreeCallback;
|
||||
vm::psv::ptr<void> bufferMem;
|
||||
u32 bufferMemSize;
|
||||
vm::psv::ptr<SceGxmShaderPatcherUsseAllocCallback> vertexUsseAllocCallback;
|
||||
vm::psv::ptr<SceGxmShaderPatcherUsseFreeCallback> vertexUsseFreeCallback;
|
||||
vm::psv::ptr<void> vertexUsseMem;
|
||||
u32 vertexUsseMemSize;
|
||||
u32 vertexUsseOffset;
|
||||
vm::psv::ptr<SceGxmShaderPatcherUsseAllocCallback> fragmentUsseAllocCallback;
|
||||
vm::psv::ptr<SceGxmShaderPatcherUsseFreeCallback> fragmentUsseFreeCallback;
|
||||
vm::psv::ptr<void> fragmentUsseMem;
|
||||
u32 fragmentUsseMemSize;
|
||||
u32 fragmentUsseOffset;
|
||||
vm::lptr<void> userData;
|
||||
vm::lptr<SceGxmShaderPatcherHostAllocCallback> hostAllocCallback;
|
||||
vm::lptr<SceGxmShaderPatcherHostFreeCallback> hostFreeCallback;
|
||||
vm::lptr<SceGxmShaderPatcherBufferAllocCallback> bufferAllocCallback;
|
||||
vm::lptr<SceGxmShaderPatcherBufferFreeCallback> bufferFreeCallback;
|
||||
vm::lptr<void> bufferMem;
|
||||
le_t<u32> bufferMemSize;
|
||||
vm::lptr<SceGxmShaderPatcherUsseAllocCallback> vertexUsseAllocCallback;
|
||||
vm::lptr<SceGxmShaderPatcherUsseFreeCallback> vertexUsseFreeCallback;
|
||||
vm::lptr<void> vertexUsseMem;
|
||||
le_t<u32> vertexUsseMemSize;
|
||||
le_t<u32> vertexUsseOffset;
|
||||
vm::lptr<SceGxmShaderPatcherUsseAllocCallback> fragmentUsseAllocCallback;
|
||||
vm::lptr<SceGxmShaderPatcherUsseFreeCallback> fragmentUsseFreeCallback;
|
||||
vm::lptr<void> fragmentUsseMem;
|
||||
le_t<u32> fragmentUsseMemSize;
|
||||
le_t<u32> fragmentUsseOffset;
|
||||
};
|
||||
|
||||
enum SceGxmRenderTargetFlags : u32
|
||||
|
@ -1230,15 +1228,15 @@ enum SceGxmRenderTargetFlags : u32
|
|||
|
||||
struct SceGxmRenderTargetParams
|
||||
{
|
||||
SceGxmRenderTargetFlags flags;
|
||||
u16 width;
|
||||
u16 height;
|
||||
u16 scenesPerFrame;
|
||||
SceGxmMultisampleMode multisampleMode;
|
||||
u32 multisampleLocations;
|
||||
vm::psv::ptr<void> hostMem;
|
||||
u32 hostMemSize;
|
||||
s32 driverMemBlock;
|
||||
le_t<u32> flags; // SceGxmRenderTargetFlags
|
||||
le_t<u16> width;
|
||||
le_t<u16> height;
|
||||
le_t<u16> scenesPerFrame;
|
||||
le_t<u16> multisampleMode; // SceGxmMultisampleMode
|
||||
le_t<u32> multisampleLocations;
|
||||
vm::lptr<void> hostMem;
|
||||
le_t<u32> hostMemSize;
|
||||
le_t<s32> driverMemBlock;
|
||||
};
|
||||
|
||||
extern psv_log_base sceGxm;
|
||||
|
|
|
@ -2,354 +2,281 @@
|
|||
#include "Emu/System.h"
|
||||
#include "Emu/ARMv7/PSVFuncList.h"
|
||||
|
||||
#include "sceSsl.h"
|
||||
|
||||
extern psv_log_base sceHttp;
|
||||
|
||||
enum SceHttpHttpVersion : s32
|
||||
{
|
||||
SCE_HTTP_VERSION_1_0 = 1,
|
||||
SCE_HTTP_VERSION_1_1
|
||||
};
|
||||
|
||||
enum SceHttpProxyMode : s32
|
||||
{
|
||||
SCE_HTTP_PROXY_AUTO,
|
||||
SCE_HTTP_PROXY_MANUAL
|
||||
};
|
||||
|
||||
enum SceHttpAddHeaderMode : s32
|
||||
{
|
||||
SCE_HTTP_HEADER_OVERWRITE,
|
||||
SCE_HTTP_HEADER_ADD
|
||||
};
|
||||
|
||||
enum SceHttpAuthType : s32
|
||||
{
|
||||
SCE_HTTP_AUTH_BASIC,
|
||||
SCE_HTTP_AUTH_DIGEST,
|
||||
SCE_HTTP_AUTH_RESERVED0,
|
||||
SCE_HTTP_AUTH_RESERVED1,
|
||||
SCE_HTTP_AUTH_RESERVED2
|
||||
};
|
||||
|
||||
typedef vm::psv::ptr<s32(s32 request, SceHttpAuthType authType, vm::psv::ptr<const char> realm, vm::psv::ptr<char> username, vm::psv::ptr<char> password, s32 needEntity, vm::psv::pptr<u8> entityBody, vm::psv::ptr<u32> entitySize, vm::psv::ptr<s32> save, vm::psv::ptr<void> userArg)> SceHttpAuthInfoCallback;
|
||||
|
||||
typedef vm::psv::ptr<s32(s32 request, s32 statusCode, vm::psv::ptr<s32> method, vm::psv::ptr<const char> location, vm::psv::ptr<void> userArg)> SceHttpRedirectCallback;
|
||||
|
||||
struct SceHttpMemoryPoolStats
|
||||
{
|
||||
u32 poolSize;
|
||||
u32 maxInuseSize;
|
||||
u32 currentInuseSize;
|
||||
s32 reserved;
|
||||
};
|
||||
|
||||
struct SceHttpUriElement
|
||||
{
|
||||
s32 opaque;
|
||||
vm::psv::ptr<char> scheme;
|
||||
vm::psv::ptr<char> username;
|
||||
vm::psv::ptr<char> password;
|
||||
vm::psv::ptr<char> hostname;
|
||||
vm::psv::ptr<char> path;
|
||||
vm::psv::ptr<char> query;
|
||||
vm::psv::ptr<char> fragment;
|
||||
u16 port;
|
||||
u8 reserved[10];
|
||||
};
|
||||
|
||||
typedef vm::psv::ptr<s32(s32 request, vm::psv::ptr<const char> url, vm::psv::ptr<const char> cookieHeader, u32 headerLen, vm::psv::ptr<void> userArg)> SceHttpCookieRecvCallback;
|
||||
|
||||
typedef vm::psv::ptr<s32(s32 request, vm::psv::ptr<const char> url, vm::psv::ptr<const char> cookieHeader, vm::psv::ptr<void> userArg)> SceHttpCookieSendCallback;
|
||||
|
||||
struct SceHttpsData
|
||||
{
|
||||
vm::psv::ptr<char> ptr;
|
||||
u32 size;
|
||||
};
|
||||
|
||||
struct SceHttpsCaList
|
||||
{
|
||||
vm::psv::lpptr<SceSslCert> caCerts;
|
||||
s32 caNum;
|
||||
};
|
||||
|
||||
typedef vm::psv::ptr<s32(u32 verifyEsrr, vm::psv::ptr<const vm::psv::ptr<SceSslCert>> sslCert, s32 certNum, vm::psv::ptr<void> userArg)> SceHttpsCallback;
|
||||
#include "sceHttp.h"
|
||||
|
||||
s32 sceHttpInit(u32 poolSize)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceHttpTerm()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceHttpGetMemoryPoolStats(vm::psv::ptr<SceHttpMemoryPoolStats> currentStat)
|
||||
s32 sceHttpGetMemoryPoolStats(vm::ptr<SceHttpMemoryPoolStats> currentStat)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceHttpCreateTemplate(vm::psv::ptr<const char> userAgent, s32 httpVer, s32 autoProxyConf)
|
||||
s32 sceHttpCreateTemplate(vm::cptr<char> userAgent, s32 httpVer, s32 autoProxyConf)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceHttpDeleteTemplate(s32 tmplId)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceHttpCreateConnection(s32 tmplId, vm::psv::ptr<const char> serverName, vm::psv::ptr<const char> scheme, u16 port, s32 enableKeepalive)
|
||||
s32 sceHttpCreateConnection(s32 tmplId, vm::cptr<char> serverName, vm::cptr<char> scheme, u16 port, s32 enableKeepalive)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceHttpCreateConnectionWithURL(s32 tmplId, vm::psv::ptr<const char> url, s32 enableKeepalive)
|
||||
s32 sceHttpCreateConnectionWithURL(s32 tmplId, vm::cptr<char> url, s32 enableKeepalive)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceHttpDeleteConnection(s32 connId)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceHttpCreateRequest(s32 connId, s32 method, vm::psv::ptr<const char> path, u64 contentLength)
|
||||
s32 sceHttpCreateRequest(s32 connId, s32 method, vm::cptr<char> path, u64 contentLength)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceHttpCreateRequestWithURL(s32 connId, s32 method, vm::psv::ptr<const char> url, u64 contentLength)
|
||||
s32 sceHttpCreateRequestWithURL(s32 connId, s32 method, vm::cptr<char> url, u64 contentLength)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceHttpDeleteRequest(s32 reqId)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceHttpSetResponseHeaderMaxSize(s32 id, u32 headerSize)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceHttpSetRecvBlockSize(s32 id, u32 blockSize)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceHttpSetRequestContentLength(s32 id, u64 contentLength)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceHttpSendRequest(s32 reqId, vm::psv::ptr<const void> postData, u32 size)
|
||||
s32 sceHttpSendRequest(s32 reqId, vm::cptr<void> postData, u32 size)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceHttpAbortRequest(s32 reqId)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceHttpGetResponseContentLength(s32 reqId, vm::psv::ptr<u64> contentLength)
|
||||
s32 sceHttpGetResponseContentLength(s32 reqId, vm::ptr<u64> contentLength)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceHttpGetStatusCode(s32 reqId, vm::psv::ptr<s32> statusCode)
|
||||
s32 sceHttpGetStatusCode(s32 reqId, vm::ptr<s32> statusCode)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceHttpGetAllResponseHeaders(s32 reqId, vm::psv::pptr<char> header, vm::psv::ptr<u32> headerSize)
|
||||
s32 sceHttpGetAllResponseHeaders(s32 reqId, vm::pptr<char> header, vm::ptr<u32> headerSize)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceHttpReadData(s32 reqId, vm::psv::ptr<void> data, u32 size)
|
||||
s32 sceHttpReadData(s32 reqId, vm::ptr<void> data, u32 size)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceHttpAddRequestHeader(s32 id, vm::psv::ptr<const char> name, vm::psv::ptr<const char> value, u32 mode)
|
||||
s32 sceHttpAddRequestHeader(s32 id, vm::cptr<char> name, vm::cptr<char> value, u32 mode)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceHttpRemoveRequestHeader(s32 id, vm::psv::ptr<const char> name)
|
||||
s32 sceHttpRemoveRequestHeader(s32 id, vm::cptr<char> name)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceHttpParseResponseHeader(vm::psv::ptr<const char> header, u32 headerLen, vm::psv::ptr<const char> fieldStr, vm::psv::pptr<const char> fieldValue, vm::psv::ptr<u32> valueLen)
|
||||
s32 sceHttpParseResponseHeader(vm::cptr<char> header, u32 headerLen, vm::cptr<char> fieldStr, vm::cpptr<char> fieldValue, vm::ptr<u32> valueLen)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceHttpParseStatusLine(vm::psv::ptr<const char> statusLine, u32 lineLen, vm::psv::ptr<s32> httpMajorVer, vm::psv::ptr<s32> httpMinorVer, vm::psv::ptr<s32> responseCode, vm::psv::pptr<const char> reasonPhrase, vm::psv::ptr<u32> phraseLen)
|
||||
s32 sceHttpParseStatusLine(vm::cptr<char> statusLine, u32 lineLen, vm::ptr<s32> httpMajorVer, vm::ptr<s32> httpMinorVer, vm::ptr<s32> responseCode, vm::cpptr<char> reasonPhrase, vm::ptr<u32> phraseLen)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceHttpSetAuthInfoCallback(s32 id, SceHttpAuthInfoCallback cbfunc, vm::psv::ptr<void> userArg)
|
||||
s32 sceHttpSetAuthInfoCallback(s32 id, vm::ptr<SceHttpAuthInfoCallback> cbfunc, vm::ptr<void> userArg)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceHttpSetAuthEnabled(s32 id, s32 enable)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceHttpGetAuthEnabled(s32 id, vm::psv::ptr<s32> enable)
|
||||
s32 sceHttpGetAuthEnabled(s32 id, vm::ptr<s32> enable)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceHttpSetRedirectCallback(s32 id, SceHttpRedirectCallback cbfunc, vm::psv::ptr<void> userArg)
|
||||
s32 sceHttpSetRedirectCallback(s32 id, vm::ptr<SceHttpRedirectCallback> cbfunc, vm::ptr<void> userArg)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceHttpSetAutoRedirect(s32 id, s32 enable)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceHttpGetAutoRedirect(s32 id, vm::psv::ptr<s32> enable)
|
||||
s32 sceHttpGetAutoRedirect(s32 id, vm::ptr<s32> enable)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceHttpSetResolveTimeOut(s32 id, u32 usec)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceHttpSetResolveRetry(s32 id, s32 retry)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceHttpSetConnectTimeOut(s32 id, u32 usec)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceHttpSetSendTimeOut(s32 id, u32 usec)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceHttpSetRecvTimeOut(s32 id, u32 usec)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceHttpUriEscape(vm::psv::ptr<char> out, vm::psv::ptr<u32> require, u32 prepare, vm::psv::ptr<const char> in)
|
||||
s32 sceHttpUriEscape(vm::ptr<char> out, vm::ptr<u32> require, u32 prepare, vm::cptr<char> in)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceHttpUriUnescape(vm::psv::ptr<char> out, vm::psv::ptr<u32> require, u32 prepare, vm::psv::ptr<const char> in)
|
||||
s32 sceHttpUriUnescape(vm::ptr<char> out, vm::ptr<u32> require, u32 prepare, vm::cptr<char> in)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceHttpUriParse(vm::psv::ptr<SceHttpUriElement> out, vm::psv::ptr<const char> srcUrl, vm::psv::ptr<void> pool, vm::psv::ptr<u32> require, u32 prepare)
|
||||
s32 sceHttpUriParse(vm::ptr<SceHttpUriElement> out, vm::cptr<char> srcUrl, vm::ptr<void> pool, vm::ptr<u32> require, u32 prepare)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceHttpUriBuild(vm::psv::ptr<char> out, vm::psv::ptr<u32> require, u32 prepare, vm::psv::ptr<const SceHttpUriElement> srcElement, u32 option)
|
||||
s32 sceHttpUriBuild(vm::ptr<char> out, vm::ptr<u32> require, u32 prepare, vm::cptr<SceHttpUriElement> srcElement, u32 option)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceHttpUriMerge(vm::psv::ptr<char> mergedUrl, vm::psv::ptr<const char> url, vm::psv::ptr<const char> relativeUrl, vm::psv::ptr<u32> require, u32 prepare, u32 option)
|
||||
s32 sceHttpUriMerge(vm::ptr<char> mergedUrl, vm::cptr<char> url, vm::cptr<char> relativeUrl, vm::ptr<u32> require, u32 prepare, u32 option)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceHttpUriSweepPath(vm::psv::ptr<char> dst, vm::psv::ptr<const char> src, u32 srcSize)
|
||||
s32 sceHttpUriSweepPath(vm::ptr<char> dst, vm::cptr<char> src, u32 srcSize)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceHttpSetCookieEnabled(s32 id, s32 enable)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceHttpGetCookieEnabled(s32 id, vm::psv::ptr<s32> enable)
|
||||
s32 sceHttpGetCookieEnabled(s32 id, vm::ptr<s32> enable)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceHttpGetCookie(vm::psv::ptr<const char> url, vm::psv::ptr<char> cookie, vm::psv::ptr<u32> cookieLength, u32 prepare, s32 secure)
|
||||
s32 sceHttpGetCookie(vm::cptr<char> url, vm::ptr<char> cookie, vm::ptr<u32> cookieLength, u32 prepare, s32 secure)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceHttpAddCookie(vm::psv::ptr<const char> url, vm::psv::ptr<const char> cookie, u32 cookieLength)
|
||||
s32 sceHttpAddCookie(vm::cptr<char> url, vm::cptr<char> cookie, u32 cookieLength)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceHttpSetCookieRecvCallback(s32 id, SceHttpCookieRecvCallback cbfunc, vm::psv::ptr<void> userArg)
|
||||
s32 sceHttpSetCookieRecvCallback(s32 id, vm::ptr<SceHttpCookieRecvCallback> cbfunc, vm::ptr<void> userArg)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceHttpSetCookieSendCallback(s32 id, SceHttpCookieSendCallback cbfunc, vm::psv::ptr<void> userArg)
|
||||
s32 sceHttpSetCookieSendCallback(s32 id, vm::ptr<SceHttpCookieSendCallback> cbfunc, vm::ptr<void> userArg)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceHttpsLoadCert(s32 caCertNum, vm::psv::pptr<const SceHttpsData> caList, vm::psv::ptr<const SceHttpsData> cert, vm::psv::ptr<const SceHttpsData> privKey)
|
||||
s32 sceHttpsLoadCert(s32 caCertNum, vm::cpptr<SceHttpsData> caList, vm::cptr<SceHttpsData> cert, vm::cptr<SceHttpsData> privKey)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceHttpsUnloadCert()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceHttpsEnableOption(u32 sslFlags)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceHttpsDisableOption(u32 sslFlags)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceHttpsGetSslError(s32 id, vm::psv::ptr<s32> errNum, vm::psv::ptr<u32> detail)
|
||||
s32 sceHttpsGetSslError(s32 id, vm::ptr<s32> errNum, vm::ptr<u32> detail)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceHttpsSetSslCallback(s32 id, SceHttpsCallback cbfunc, vm::psv::ptr<void> userArg)
|
||||
s32 sceHttpsSetSslCallback(s32 id, vm::ptr<SceHttpsCallback> cbfunc, vm::ptr<void> userArg)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceHttpsGetCaList(vm::psv::ptr<SceHttpsCaList> caList)
|
||||
s32 sceHttpsGetCaList(vm::ptr<SceHttpsCaList> caList)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceHttpsFreeCaList(vm::psv::ptr<SceHttpsCaList> caList)
|
||||
s32 sceHttpsFreeCaList(vm::ptr<SceHttpsCaList> caList)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
|
||||
|
@ -360,6 +287,7 @@ psv_log_base sceHttp("SceHttp", []()
|
|||
sceHttp.on_load = nullptr;
|
||||
sceHttp.on_unload = nullptr;
|
||||
sceHttp.on_stop = nullptr;
|
||||
sceHttp.on_error = nullptr;
|
||||
|
||||
REG_FUNC(0x214926D9, sceHttpInit);
|
||||
REG_FUNC(0xC9076666, sceHttpTerm);
|
||||
|
|
74
rpcs3/Emu/ARMv7/Modules/sceHttp.h
Normal file
74
rpcs3/Emu/ARMv7/Modules/sceHttp.h
Normal file
|
@ -0,0 +1,74 @@
|
|||
#pragma once
|
||||
|
||||
#include "sceSsl.h"
|
||||
|
||||
enum SceHttpHttpVersion : s32
|
||||
{
|
||||
SCE_HTTP_VERSION_1_0 = 1,
|
||||
SCE_HTTP_VERSION_1_1
|
||||
};
|
||||
|
||||
enum SceHttpProxyMode : s32
|
||||
{
|
||||
SCE_HTTP_PROXY_AUTO,
|
||||
SCE_HTTP_PROXY_MANUAL
|
||||
};
|
||||
|
||||
enum SceHttpAddHeaderMode : s32
|
||||
{
|
||||
SCE_HTTP_HEADER_OVERWRITE,
|
||||
SCE_HTTP_HEADER_ADD
|
||||
};
|
||||
|
||||
enum SceHttpAuthType : s32
|
||||
{
|
||||
SCE_HTTP_AUTH_BASIC,
|
||||
SCE_HTTP_AUTH_DIGEST,
|
||||
SCE_HTTP_AUTH_RESERVED0,
|
||||
SCE_HTTP_AUTH_RESERVED1,
|
||||
SCE_HTTP_AUTH_RESERVED2
|
||||
};
|
||||
|
||||
using SceHttpAuthInfoCallback = func_def<s32(s32 request, SceHttpAuthType authType, vm::cptr<char> realm, vm::ptr<char> username, vm::ptr<char> password, s32 needEntity, vm::pptr<u8> entityBody, vm::ptr<u32> entitySize, vm::ptr<s32> save, vm::ptr<void> userArg)>;
|
||||
using SceHttpRedirectCallback = func_def<s32(s32 request, s32 statusCode, vm::ptr<s32> method, vm::cptr<char> location, vm::ptr<void> userArg)>;
|
||||
|
||||
struct SceHttpMemoryPoolStats
|
||||
{
|
||||
le_t<u32> poolSize;
|
||||
le_t<u32> maxInuseSize;
|
||||
le_t<u32> currentInuseSize;
|
||||
le_t<s32> reserved;
|
||||
};
|
||||
|
||||
struct SceHttpUriElement
|
||||
{
|
||||
le_t<s32> opaque;
|
||||
vm::lptr<char> scheme;
|
||||
vm::lptr<char> username;
|
||||
vm::lptr<char> password;
|
||||
vm::lptr<char> hostname;
|
||||
vm::lptr<char> path;
|
||||
vm::lptr<char> query;
|
||||
vm::lptr<char> fragment;
|
||||
le_t<u16> port;
|
||||
u8 reserved[10];
|
||||
};
|
||||
|
||||
using SceHttpCookieRecvCallback = func_def<s32(s32 request, vm::cptr<char> url, vm::cptr<char> cookieHeader, u32 headerLen, vm::ptr<void> userArg)>;
|
||||
using SceHttpCookieSendCallback = func_def<s32(s32 request, vm::cptr<char> url, vm::cptr<char> cookieHeader, vm::ptr<void> userArg)>;
|
||||
|
||||
struct SceHttpsData
|
||||
{
|
||||
vm::lptr<char> ptr;
|
||||
le_t<u32> size;
|
||||
};
|
||||
|
||||
struct SceHttpsCaList
|
||||
{
|
||||
vm::lpptr<SceSslCert> caCerts;
|
||||
le_t<s32> caNum;
|
||||
};
|
||||
|
||||
using SceHttpsCallback = func_def<s32(u32 verifyEsrr, vm::cptr<vm::ptr<SceSslCert>> sslCert, s32 certNum, vm::ptr<void> userArg)>;
|
||||
|
||||
extern psv_log_base sceHttp;
|
|
@ -4,29 +4,29 @@
|
|||
|
||||
#include "sceIme.h"
|
||||
|
||||
s32 sceImeOpen(vm::psv::ptr<SceImeParam> param)
|
||||
s32 sceImeOpen(vm::ptr<SceImeParam> param)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceImeUpdate()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceImeSetCaret(vm::psv::ptr<const SceImeCaret> caret)
|
||||
s32 sceImeSetCaret(vm::cptr<SceImeCaret> caret)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceImeSetPreeditGeometry(vm::psv::ptr<const SceImePreeditGeometry> preedit)
|
||||
s32 sceImeSetPreeditGeometry(vm::cptr<SceImePreeditGeometry> preedit)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceImeClose()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
|
||||
|
@ -37,6 +37,7 @@ psv_log_base sceIme("SceIme", []()
|
|||
sceIme.on_load = nullptr;
|
||||
sceIme.on_unload = nullptr;
|
||||
sceIme.on_stop = nullptr;
|
||||
sceIme.on_error = nullptr;
|
||||
|
||||
REG_FUNC(0x0E050613, sceImeOpen);
|
||||
REG_FUNC(0x71D6898A, sceImeUpdate);
|
||||
|
|
|
@ -1,70 +1,70 @@
|
|||
#pragma once
|
||||
|
||||
typedef s32(SceImeCharFilter)(u16 ch);
|
||||
using SceImeCharFilter = func_def<s32(u16 ch)>;
|
||||
|
||||
struct SceImeRect
|
||||
{
|
||||
u32 x;
|
||||
u32 y;
|
||||
u32 width;
|
||||
u32 height;
|
||||
le_t<u32> x;
|
||||
le_t<u32> y;
|
||||
le_t<u32> width;
|
||||
le_t<u32> height;
|
||||
};
|
||||
|
||||
struct SceImeEditText
|
||||
{
|
||||
u32 preeditIndex;
|
||||
u32 preeditLength;
|
||||
u32 caretIndex;
|
||||
vm::psv::ptr<u16> str;
|
||||
le_t<u32> preeditIndex;
|
||||
le_t<u32> preeditLength;
|
||||
le_t<u32> caretIndex;
|
||||
vm::lptr<u16> str;
|
||||
};
|
||||
|
||||
union SceImeEventParam
|
||||
{
|
||||
SceImeRect rect;
|
||||
SceImeEditText text;
|
||||
u32 caretIndex;
|
||||
le_t<u32> caretIndex;
|
||||
};
|
||||
|
||||
struct SceImeEvent
|
||||
{
|
||||
u32 id;
|
||||
le_t<u32> id;
|
||||
SceImeEventParam param;
|
||||
};
|
||||
|
||||
struct SceImeCaret
|
||||
{
|
||||
u32 x;
|
||||
u32 y;
|
||||
u32 height;
|
||||
u32 index;
|
||||
le_t<u32> x;
|
||||
le_t<u32> y;
|
||||
le_t<u32> height;
|
||||
le_t<u32> index;
|
||||
};
|
||||
|
||||
struct SceImePreeditGeometry
|
||||
{
|
||||
u32 x;
|
||||
u32 y;
|
||||
u32 height;
|
||||
le_t<u32> x;
|
||||
le_t<u32> y;
|
||||
le_t<u32> height;
|
||||
};
|
||||
|
||||
typedef void(SceImeEventHandler)(vm::psv::ptr<void> arg, vm::psv::ptr<const SceImeEvent> e);
|
||||
using SceImeEventHandler = func_def<void(vm::ptr<void> arg, vm::cptr<SceImeEvent> e)>;
|
||||
|
||||
struct SceImeParam
|
||||
{
|
||||
u32 size;
|
||||
u32 inputMethod;
|
||||
u64 supportedLanguages;
|
||||
s32 languagesForced;
|
||||
u32 type;
|
||||
u32 option;
|
||||
vm::psv::ptr<void> work;
|
||||
vm::psv::ptr<void> arg;
|
||||
vm::psv::ptr<SceImeEventHandler> handler;
|
||||
vm::psv::ptr<SceImeCharFilter> filter;
|
||||
vm::psv::ptr<u32> initialText;
|
||||
u32 maxTextLength;
|
||||
vm::psv::ptr<u32> inputTextBuffer;
|
||||
u32 reserved0;
|
||||
u32 reserved1;
|
||||
le_t<u32> size;
|
||||
le_t<u32> inputMethod;
|
||||
le_t<u64> supportedLanguages;
|
||||
le_t<s32> languagesForced;
|
||||
le_t<u32> type;
|
||||
le_t<u32> option;
|
||||
vm::lptr<void> work;
|
||||
vm::lptr<void> arg;
|
||||
vm::lptr<SceImeEventHandler> handler;
|
||||
vm::lptr<SceImeCharFilter> filter;
|
||||
vm::lptr<u32> initialText;
|
||||
le_t<u32> maxTextLength;
|
||||
vm::lptr<u32> inputTextBuffer;
|
||||
le_t<u32> reserved0;
|
||||
le_t<u32> reserved1;
|
||||
};
|
||||
|
||||
extern psv_log_base sceIme;
|
||||
|
|
|
@ -2,107 +2,78 @@
|
|||
#include "Emu/System.h"
|
||||
#include "Emu/ARMv7/PSVFuncList.h"
|
||||
|
||||
extern psv_log_base sceJpeg;
|
||||
|
||||
struct SceJpegOutputInfo
|
||||
{
|
||||
s32 colorSpace;
|
||||
u16 imageWidth;
|
||||
u16 imageHeight;
|
||||
u32 outputBufferSize;
|
||||
u32 tempBufferSize;
|
||||
u32 coefBufferSize;
|
||||
|
||||
struct { u32 x, y; } pitch[4];
|
||||
};
|
||||
|
||||
struct SceJpegSplitDecodeCtrl
|
||||
{
|
||||
vm::psv::ptr<u8> pStreamBuffer;
|
||||
u32 streamBufferSize;
|
||||
vm::psv::ptr<u8> pWriteBuffer;
|
||||
u32 writeBufferSize;
|
||||
s32 isEndOfStream;
|
||||
s32 decodeMode;
|
||||
|
||||
SceJpegOutputInfo outputInfo;
|
||||
|
||||
vm::psv::ptr<void> pOutputBuffer;
|
||||
vm::psv::ptr<void> pCoefBuffer;
|
||||
|
||||
u32 internalData[3];
|
||||
};
|
||||
#include "sceJpeg.h"
|
||||
|
||||
s32 sceJpegInitMJpeg(s32 maxSplitDecoder)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceJpegFinishMJpeg()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceJpegDecodeMJpeg(
|
||||
vm::psv::ptr<const u8> pJpeg,
|
||||
vm::cptr<u8> pJpeg,
|
||||
u32 isize,
|
||||
vm::psv::ptr<void> pRGBA,
|
||||
vm::ptr<void> pRGBA,
|
||||
u32 osize,
|
||||
s32 decodeMode,
|
||||
vm::psv::ptr<void> pTempBuffer,
|
||||
vm::ptr<void> pTempBuffer,
|
||||
u32 tempBufferSize,
|
||||
vm::psv::ptr<void> pCoefBuffer,
|
||||
vm::ptr<void> pCoefBuffer,
|
||||
u32 coefBufferSize)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceJpegDecodeMJpegYCbCr(
|
||||
vm::psv::ptr<const u8> pJpeg,
|
||||
vm::cptr<u8> pJpeg,
|
||||
u32 isize,
|
||||
vm::psv::ptr<u8> pYCbCr,
|
||||
vm::ptr<u8> pYCbCr,
|
||||
u32 osize,
|
||||
s32 decodeMode,
|
||||
vm::psv::ptr<void> pCoefBuffer,
|
||||
vm::ptr<void> pCoefBuffer,
|
||||
u32 coefBufferSize)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceJpegMJpegCsc(
|
||||
vm::psv::ptr<void> pRGBA,
|
||||
vm::psv::ptr<const u8> pYCbCr,
|
||||
vm::ptr<void> pRGBA,
|
||||
vm::cptr<u8> pYCbCr,
|
||||
s32 xysize,
|
||||
s32 iFrameWidth,
|
||||
s32 colorOption,
|
||||
s32 sampling)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceJpegGetOutputInfo(
|
||||
vm::psv::ptr<const u8> pJpeg,
|
||||
vm::cptr<u8> pJpeg,
|
||||
u32 isize,
|
||||
s32 outputFormat,
|
||||
s32 decodeMode,
|
||||
vm::psv::ptr<SceJpegOutputInfo> pOutputInfo)
|
||||
vm::ptr<SceJpegOutputInfo> pOutputInfo)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceJpegCreateSplitDecoder(vm::psv::ptr<SceJpegSplitDecodeCtrl> pCtrl)
|
||||
s32 sceJpegCreateSplitDecoder(vm::ptr<SceJpegSplitDecodeCtrl> pCtrl)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceJpegDeleteSplitDecoder(vm::psv::ptr<SceJpegSplitDecodeCtrl> pCtrl)
|
||||
s32 sceJpegDeleteSplitDecoder(vm::ptr<SceJpegSplitDecodeCtrl> pCtrl)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceJpegSplitDecodeMJpeg(vm::psv::ptr<SceJpegSplitDecodeCtrl> pCtrl)
|
||||
s32 sceJpegSplitDecodeMJpeg(vm::ptr<SceJpegSplitDecodeCtrl> pCtrl)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
|
||||
|
@ -113,6 +84,7 @@ psv_log_base sceJpeg("SceJpeg", []()
|
|||
sceJpeg.on_load = nullptr;
|
||||
sceJpeg.on_unload = nullptr;
|
||||
sceJpeg.on_stop = nullptr;
|
||||
sceJpeg.on_error = nullptr;
|
||||
|
||||
REG_FUNC(0xB030773B, sceJpegInitMJpeg);
|
||||
REG_FUNC(0x62842598, sceJpegFinishMJpeg);
|
||||
|
|
38
rpcs3/Emu/ARMv7/Modules/sceJpeg.h
Normal file
38
rpcs3/Emu/ARMv7/Modules/sceJpeg.h
Normal file
|
@ -0,0 +1,38 @@
|
|||
#pragma once
|
||||
|
||||
struct SceJpegOutputInfo
|
||||
{
|
||||
le_t<s32> colorSpace;
|
||||
le_t<u16> imageWidth;
|
||||
le_t<u16> imageHeight;
|
||||
le_t<u32> outputBufferSize;
|
||||
le_t<u32> tempBufferSize;
|
||||
le_t<u32> coefBufferSize;
|
||||
|
||||
struct _pitch_t
|
||||
{
|
||||
le_t<u32> x;
|
||||
le_t<u32> y;
|
||||
};
|
||||
|
||||
_pitch_t pitch[4];
|
||||
};
|
||||
|
||||
struct SceJpegSplitDecodeCtrl
|
||||
{
|
||||
vm::lptr<u8> pStreamBuffer;
|
||||
le_t<u32> streamBufferSize;
|
||||
vm::lptr<u8> pWriteBuffer;
|
||||
le_t<u32> writeBufferSize;
|
||||
le_t<s32> isEndOfStream;
|
||||
le_t<s32> decodeMode;
|
||||
|
||||
SceJpegOutputInfo outputInfo;
|
||||
|
||||
vm::lptr<void> pOutputBuffer;
|
||||
vm::lptr<void> pCoefBuffer;
|
||||
|
||||
le_t<u32> internalData[3];
|
||||
};
|
||||
|
||||
extern psv_log_base sceJpeg;
|
|
@ -2,13 +2,11 @@
|
|||
#include "Emu/System.h"
|
||||
#include "Emu/ARMv7/PSVFuncList.h"
|
||||
|
||||
extern psv_log_base sceJpegEnc;
|
||||
|
||||
typedef vm::psv::ptr<void> SceJpegEncoderContext;
|
||||
#include "sceJpegEnc.h"
|
||||
|
||||
s32 sceJpegEncoderGetContextSize()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceJpegEncoderInit(
|
||||
|
@ -16,22 +14,22 @@ s32 sceJpegEncoderInit(
|
|||
s32 iFrameWidth,
|
||||
s32 iFrameHeight,
|
||||
s32 pixelFormat,
|
||||
vm::psv::ptr<void> pJpeg,
|
||||
vm::ptr<void> pJpeg,
|
||||
u32 oJpegbufSize)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceJpegEncoderEncode(
|
||||
SceJpegEncoderContext context,
|
||||
vm::psv::ptr<const void> pYCbCr)
|
||||
vm::cptr<void> pYCbCr)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceJpegEncoderEnd(SceJpegEncoderContext context)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceJpegEncoderSetValidRegion(
|
||||
|
@ -39,39 +37,39 @@ s32 sceJpegEncoderSetValidRegion(
|
|||
s32 iFrameWidth,
|
||||
s32 iFrameHeight)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceJpegEncoderSetCompressionRatio(
|
||||
SceJpegEncoderContext context,
|
||||
s32 compratio)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceJpegEncoderSetHeaderMode(
|
||||
SceJpegEncoderContext context,
|
||||
s32 headerMode)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceJpegEncoderSetOutputAddr(
|
||||
SceJpegEncoderContext context,
|
||||
vm::psv::ptr<void> pJpeg,
|
||||
vm::ptr<void> pJpeg,
|
||||
u32 oJpegbufSize)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceJpegEncoderCsc(
|
||||
SceJpegEncoderContext context,
|
||||
vm::psv::ptr<void> pYCbCr,
|
||||
vm::psv::ptr<const void> pRGBA,
|
||||
vm::ptr<void> pYCbCr,
|
||||
vm::cptr<void> pRGBA,
|
||||
s32 iFrameWidth,
|
||||
s32 inputPixelFormat)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
|
||||
|
@ -82,6 +80,7 @@ psv_log_base sceJpegEnc("SceJpegEnc", []()
|
|||
sceJpegEnc.on_load = nullptr;
|
||||
sceJpegEnc.on_unload = nullptr;
|
||||
sceJpegEnc.on_stop = nullptr;
|
||||
sceJpegEnc.on_error = nullptr;
|
||||
|
||||
REG_FUNC(0x2B55844D, sceJpegEncoderGetContextSize);
|
||||
REG_FUNC(0x88DA92B4, sceJpegEncoderInit);
|
||||
|
|
5
rpcs3/Emu/ARMv7/Modules/sceJpegEnc.h
Normal file
5
rpcs3/Emu/ARMv7/Modules/sceJpegEnc.h
Normal file
|
@ -0,0 +1,5 @@
|
|||
#pragma once
|
||||
|
||||
using SceJpegEncoderContext = vm::ptr<void>;
|
||||
|
||||
extern psv_log_base sceJpegEnc;
|
File diff suppressed because it is too large
Load diff
|
@ -269,339 +269,338 @@ union SceKernelSysClock
|
|||
{
|
||||
struct
|
||||
{
|
||||
u32 low;
|
||||
u32 hi;
|
||||
};
|
||||
le_t<u32> low;
|
||||
le_t<u32> hi;
|
||||
}
|
||||
u;
|
||||
|
||||
u64 quad;
|
||||
le_t<u64> quad;
|
||||
};
|
||||
|
||||
struct SceKernelCallFrame
|
||||
{
|
||||
u32 sp;
|
||||
u32 pc;
|
||||
le_t<u32> sp;
|
||||
le_t<u32> pc;
|
||||
};
|
||||
|
||||
// Memory Manager definitions
|
||||
|
||||
typedef s32 SceKernelMemoryType;
|
||||
|
||||
struct SceKernelMemBlockInfo
|
||||
{
|
||||
u32 size;
|
||||
vm::psv::ptr<void> mappedBase;
|
||||
u32 mappedSize;
|
||||
SceKernelMemoryType memoryType;
|
||||
u32 access;
|
||||
le_t<u32> size;
|
||||
vm::lptr<void> mappedBase;
|
||||
le_t<u32> mappedSize;
|
||||
le_t<s32> memoryType; // SceKernelMemoryType
|
||||
le_t<u32> access;
|
||||
};
|
||||
|
||||
struct SceKernelAllocMemBlockOpt
|
||||
{
|
||||
u32 size;
|
||||
u32 attr;
|
||||
u32 alignment;
|
||||
s32 uidBaseBlock;
|
||||
vm::psv::ptr<const char> strBaseBlockName;
|
||||
le_t<u32> size;
|
||||
le_t<u32> attr;
|
||||
le_t<u32> alignment;
|
||||
le_t<s32> uidBaseBlock;
|
||||
vm::lcptr<char> strBaseBlockName;
|
||||
};
|
||||
|
||||
// Thread Manager definitions (threads)
|
||||
|
||||
typedef s32(SceKernelThreadEntry)(u32 argSize, vm::psv::ptr<void> pArgBlock);
|
||||
using SceKernelThreadEntry = func_def<s32(u32 argSize, vm::ptr<void> pArgBlock)>;
|
||||
|
||||
struct SceKernelThreadOptParam
|
||||
{
|
||||
u32 size;
|
||||
u32 attr;
|
||||
le_t<u32> size;
|
||||
le_t<u32> attr;
|
||||
};
|
||||
|
||||
struct SceKernelThreadInfo
|
||||
{
|
||||
u32 size;
|
||||
s32 processId;
|
||||
le_t<u32> size;
|
||||
le_t<s32> processId;
|
||||
char name[32];
|
||||
u32 attr;
|
||||
u32 status;
|
||||
vm::psv::ptr<SceKernelThreadEntry> entry;
|
||||
vm::psv::ptr<void> pStack;
|
||||
u32 stackSize;
|
||||
s32 initPriority;
|
||||
s32 currentPriority;
|
||||
s32 initCpuAffinityMask;
|
||||
s32 currentCpuAffinityMask;
|
||||
s32 currentCpuId;
|
||||
s32 lastExecutedCpuId;
|
||||
u32 waitType;
|
||||
s32 waitId;
|
||||
s32 exitStatus;
|
||||
le_t<u32> attr;
|
||||
le_t<u32> status;
|
||||
vm::lptr<SceKernelThreadEntry> entry;
|
||||
vm::lptr<void> pStack;
|
||||
le_t<u32> stackSize;
|
||||
le_t<s32> initPriority;
|
||||
le_t<s32> currentPriority;
|
||||
le_t<s32> initCpuAffinityMask;
|
||||
le_t<s32> currentCpuAffinityMask;
|
||||
le_t<s32> currentCpuId;
|
||||
le_t<s32> lastExecutedCpuId;
|
||||
le_t<u32> waitType;
|
||||
le_t<s32> waitId;
|
||||
le_t<s32> exitStatus;
|
||||
SceKernelSysClock runClocks;
|
||||
u32 intrPreemptCount;
|
||||
u32 threadPreemptCount;
|
||||
u32 threadReleaseCount;
|
||||
s32 changeCpuCount;
|
||||
s32 fNotifyCallback;
|
||||
s32 reserved;
|
||||
le_t<u32> intrPreemptCount;
|
||||
le_t<u32> threadPreemptCount;
|
||||
le_t<u32> threadReleaseCount;
|
||||
le_t<s32> changeCpuCount;
|
||||
le_t<s32> fNotifyCallback;
|
||||
le_t<s32> reserved;
|
||||
};
|
||||
|
||||
struct SceKernelThreadRunStatus
|
||||
{
|
||||
u32 size;
|
||||
le_t<u32> size;
|
||||
|
||||
struct
|
||||
{
|
||||
s32 processId;
|
||||
s32 threadId;
|
||||
s32 priority;
|
||||
le_t<s32> processId;
|
||||
le_t<s32> threadId;
|
||||
le_t<s32> priority;
|
||||
|
||||
} cpuInfo[4];
|
||||
};
|
||||
|
||||
struct SceKernelSystemInfo
|
||||
{
|
||||
u32 size;
|
||||
u32 activeCpuMask;
|
||||
le_t<u32> size;
|
||||
le_t<u32> activeCpuMask;
|
||||
|
||||
struct
|
||||
{
|
||||
SceKernelSysClock idleClock;
|
||||
u32 comesOutOfIdleCount;
|
||||
u32 threadSwitchCount;
|
||||
le_t<u32> comesOutOfIdleCount;
|
||||
le_t<u32> threadSwitchCount;
|
||||
|
||||
} cpuInfo[4];
|
||||
};
|
||||
|
||||
// Thread Manager definitions (callbacks)
|
||||
|
||||
typedef s32(SceKernelCallbackFunction)(s32 notifyId, s32 notifyCount, s32 notifyArg, vm::psv::ptr<void> pCommon);
|
||||
using SceKernelCallbackFunction = func_def<s32(s32 notifyId, s32 notifyCount, s32 notifyArg, vm::ptr<void> pCommon)>;
|
||||
|
||||
struct SceKernelCallbackInfo
|
||||
{
|
||||
u32 size;
|
||||
s32 callbackId;
|
||||
le_t<u32> size;
|
||||
le_t<s32> callbackId;
|
||||
char name[32];
|
||||
u32 attr;
|
||||
s32 threadId;
|
||||
vm::psv::ptr<SceKernelCallbackFunction> callbackFunc;
|
||||
s32 notifyId;
|
||||
s32 notifyCount;
|
||||
s32 notifyArg;
|
||||
vm::psv::ptr<void> pCommon;
|
||||
le_t<u32> attr;
|
||||
le_t<s32> threadId;
|
||||
vm::lptr<SceKernelCallbackFunction> callbackFunc;
|
||||
le_t<s32> notifyId;
|
||||
le_t<s32> notifyCount;
|
||||
le_t<s32> notifyArg;
|
||||
vm::lptr<void> pCommon;
|
||||
};
|
||||
|
||||
// Thread Manager definitions (events)
|
||||
|
||||
typedef s32(SceKernelThreadEventHandler)(s32 type, s32 threadId, s32 arg, vm::psv::ptr<void> pCommon);
|
||||
using SceKernelThreadEventHandler = func_def<s32(s32 type, s32 threadId, s32 arg, vm::ptr<void> pCommon)>;
|
||||
|
||||
struct SceKernelEventInfo
|
||||
{
|
||||
u32 size;
|
||||
s32 eventId;
|
||||
le_t<u32> size;
|
||||
le_t<s32> eventId;
|
||||
char name[32];
|
||||
u32 attr;
|
||||
u32 eventPattern;
|
||||
u64 userData;
|
||||
u32 numWaitThreads;
|
||||
s32 reserved[1];
|
||||
le_t<u32> attr;
|
||||
le_t<u32> eventPattern;
|
||||
le_t<u64> userData;
|
||||
le_t<u32> numWaitThreads;
|
||||
le_t<s32> reserved[1];
|
||||
};
|
||||
|
||||
struct SceKernelWaitEvent
|
||||
{
|
||||
s32 eventId;
|
||||
u32 eventPattern;
|
||||
le_t<s32> eventId;
|
||||
le_t<u32> eventPattern;
|
||||
};
|
||||
|
||||
struct SceKernelResultEvent
|
||||
{
|
||||
s32 eventId;
|
||||
s32 result;
|
||||
u32 resultPattern;
|
||||
s32 reserved[1];
|
||||
u64 userData;
|
||||
le_t<s32> eventId;
|
||||
le_t<s32> result;
|
||||
le_t<u32> resultPattern;
|
||||
le_t<s32> reserved[1];
|
||||
le_t<u64> userData;
|
||||
};
|
||||
|
||||
// Thread Manager definitions (event flags)
|
||||
|
||||
struct SceKernelEventFlagOptParam
|
||||
{
|
||||
u32 size;
|
||||
le_t<u32> size;
|
||||
};
|
||||
|
||||
struct SceKernelEventFlagInfo
|
||||
{
|
||||
u32 size;
|
||||
s32 evfId;
|
||||
le_t<u32> size;
|
||||
le_t<s32> evfId;
|
||||
char name[32];
|
||||
u32 attr;
|
||||
u32 initPattern;
|
||||
u32 currentPattern;
|
||||
s32 numWaitThreads;
|
||||
le_t<u32> attr;
|
||||
le_t<u32> initPattern;
|
||||
le_t<u32> currentPattern;
|
||||
le_t<s32> numWaitThreads;
|
||||
};
|
||||
|
||||
// Thread Manager definitions (semaphores)
|
||||
|
||||
struct SceKernelSemaOptParam
|
||||
{
|
||||
u32 size;
|
||||
le_t<u32> size;
|
||||
};
|
||||
|
||||
struct SceKernelSemaInfo
|
||||
{
|
||||
u32 size;
|
||||
s32 semaId;
|
||||
le_t<u32> size;
|
||||
le_t<s32> semaId;
|
||||
char name[32];
|
||||
u32 attr;
|
||||
s32 initCount;
|
||||
s32 currentCount;
|
||||
s32 maxCount;
|
||||
s32 numWaitThreads;
|
||||
le_t<u32> attr;
|
||||
le_t<s32> initCount;
|
||||
le_t<s32> currentCount;
|
||||
le_t<s32> maxCount;
|
||||
le_t<s32> numWaitThreads;
|
||||
};
|
||||
|
||||
// Thread Manager definitions (mutexes)
|
||||
|
||||
struct SceKernelMutexOptParam
|
||||
{
|
||||
u32 size;
|
||||
s32 ceilingPriority;
|
||||
le_t<u32> size;
|
||||
le_t<s32> ceilingPriority;
|
||||
};
|
||||
|
||||
struct SceKernelMutexInfo
|
||||
{
|
||||
u32 size;
|
||||
s32 mutexId;
|
||||
le_t<u32> size;
|
||||
le_t<s32> mutexId;
|
||||
char name[32];
|
||||
u32 attr;
|
||||
s32 initCount;
|
||||
s32 currentCount;
|
||||
s32 currentOwnerId;
|
||||
s32 numWaitThreads;
|
||||
le_t<u32> attr;
|
||||
le_t<s32> initCount;
|
||||
le_t<s32> currentCount;
|
||||
le_t<s32> currentOwnerId;
|
||||
le_t<s32> numWaitThreads;
|
||||
};
|
||||
|
||||
// Thread Manager definitions (lightweight mutexes)
|
||||
|
||||
struct SceKernelLwMutexWork
|
||||
{
|
||||
s32 data[4];
|
||||
le_t<s32> data[4];
|
||||
};
|
||||
|
||||
struct SceKernelLwMutexOptParam
|
||||
{
|
||||
u32 size;
|
||||
le_t<u32> size;
|
||||
};
|
||||
|
||||
struct SceKernelLwMutexInfo
|
||||
{
|
||||
u32 size;
|
||||
s32 uid;
|
||||
le_t<u32> size;
|
||||
le_t<s32> uid;
|
||||
char name[32];
|
||||
u32 attr;
|
||||
vm::psv::ptr<SceKernelLwMutexWork> pWork;
|
||||
s32 initCount;
|
||||
s32 currentCount;
|
||||
s32 currentOwnerId;
|
||||
s32 numWaitThreads;
|
||||
le_t<u32> attr;
|
||||
vm::lptr<SceKernelLwMutexWork> pWork;
|
||||
le_t<s32> initCount;
|
||||
le_t<s32> currentCount;
|
||||
le_t<s32> currentOwnerId;
|
||||
le_t<s32> numWaitThreads;
|
||||
};
|
||||
|
||||
// Thread Manager definitions (condition variables)
|
||||
|
||||
struct SceKernelCondOptParam
|
||||
{
|
||||
u32 size;
|
||||
le_t<u32> size;
|
||||
};
|
||||
|
||||
struct SceKernelCondInfo
|
||||
{
|
||||
u32 size;
|
||||
s32 condId;
|
||||
le_t<u32> size;
|
||||
le_t<s32> condId;
|
||||
char name[32];
|
||||
u32 attr;
|
||||
s32 mutexId;
|
||||
u32 numWaitThreads;
|
||||
le_t<u32> attr;
|
||||
le_t<s32> mutexId;
|
||||
le_t<u32> numWaitThreads;
|
||||
};
|
||||
|
||||
// Thread Manager definitions (lightweight condition variables)
|
||||
|
||||
struct SceKernelLwCondWork
|
||||
{
|
||||
s32 data[4];
|
||||
le_t<s32> data[4];
|
||||
};
|
||||
|
||||
struct SceKernelLwCondOptParam
|
||||
{
|
||||
u32 size;
|
||||
le_t<u32> size;
|
||||
};
|
||||
|
||||
struct SceKernelLwCondInfo
|
||||
{
|
||||
u32 size;
|
||||
s32 uid;
|
||||
le_t<u32> size;
|
||||
le_t<s32> uid;
|
||||
char name[32];
|
||||
u32 attr;
|
||||
vm::psv::ptr<SceKernelLwCondWork> pWork;
|
||||
vm::psv::ptr<SceKernelLwMutexWork> pLwMutex;
|
||||
u32 numWaitThreads;
|
||||
le_t<u32> attr;
|
||||
vm::lptr<SceKernelLwCondWork> pWork;
|
||||
vm::lptr<SceKernelLwMutexWork> pLwMutex;
|
||||
le_t<u32> numWaitThreads;
|
||||
};
|
||||
|
||||
// Thread Manager definitions (timers)
|
||||
|
||||
struct SceKernelTimerOptParam
|
||||
{
|
||||
u32 size;
|
||||
le_t<u32> size;
|
||||
};
|
||||
|
||||
struct SceKernelTimerInfo
|
||||
{
|
||||
u32 size;
|
||||
s32 timerId;
|
||||
le_t<u32> size;
|
||||
le_t<s32> timerId;
|
||||
char name[32];
|
||||
u32 attr;
|
||||
s32 fActive;
|
||||
le_t<u32> attr;
|
||||
le_t<s32> fActive;
|
||||
SceKernelSysClock baseTime;
|
||||
SceKernelSysClock currentTime;
|
||||
SceKernelSysClock schedule;
|
||||
SceKernelSysClock interval;
|
||||
s32 type;
|
||||
s32 fRepeat;
|
||||
s32 numWaitThreads;
|
||||
s32 reserved[1];
|
||||
le_t<s32> type;
|
||||
le_t<s32> fRepeat;
|
||||
le_t<s32> numWaitThreads;
|
||||
le_t<s32> reserved[1];
|
||||
};
|
||||
|
||||
// Thread Manager definitions (reader/writer locks)
|
||||
|
||||
struct SceKernelRWLockOptParam
|
||||
{
|
||||
u32 size;
|
||||
le_t<u32> size;
|
||||
};
|
||||
|
||||
struct SceKernelRWLockInfo
|
||||
{
|
||||
u32 size;
|
||||
s32 rwLockId;
|
||||
le_t<u32> size;
|
||||
le_t<s32> rwLockId;
|
||||
char name[32];
|
||||
u32 attr;
|
||||
s32 lockCount;
|
||||
s32 writeOwnerId;
|
||||
s32 numReadWaitThreads;
|
||||
s32 numWriteWaitThreads;
|
||||
le_t<u32> attr;
|
||||
le_t<s32> lockCount;
|
||||
le_t<s32> writeOwnerId;
|
||||
le_t<s32> numReadWaitThreads;
|
||||
le_t<s32> numWriteWaitThreads;
|
||||
};
|
||||
|
||||
// IO/File Manager definitions
|
||||
|
||||
struct SceIoStat
|
||||
{
|
||||
s32 mode;
|
||||
u32 attr;
|
||||
s64 size;
|
||||
le_t<s32> mode;
|
||||
le_t<u32> attr;
|
||||
le_t<s64> size;
|
||||
SceDateTime ctime;
|
||||
SceDateTime atime;
|
||||
SceDateTime mtime;
|
||||
u64 _private[6];
|
||||
le_t<u64> _private[6];
|
||||
};
|
||||
|
||||
struct SceIoDirent
|
||||
{
|
||||
SceIoStat d_stat;
|
||||
char d_name[256];
|
||||
vm::psv::ptr<void> d_private;
|
||||
s32 dummy;
|
||||
vm::lptr<void> d_private;
|
||||
le_t<s32> dummy;
|
||||
};
|
||||
|
||||
// Module
|
||||
|
|
|
@ -5,17 +5,15 @@
|
|||
#include "Emu/ARMv7/ARMv7Thread.h"
|
||||
#include "Emu/ARMv7/ARMv7Callback.h"
|
||||
|
||||
extern psv_log_base sceLibc;
|
||||
#include "sceLibc.h"
|
||||
|
||||
vm::psv::ptr<void> g_dso;
|
||||
|
||||
typedef void(atexit_func_t)(vm::psv::ptr<void>);
|
||||
vm::ptr<void> g_dso;
|
||||
|
||||
std::vector<std::function<void(ARMv7Context&)>> g_atexit;
|
||||
|
||||
std::mutex g_atexit_mutex;
|
||||
|
||||
std::string armv7_fmt(ARMv7Context& context, vm::psv::ptr<const char> fmt, u32 g_count, u32 f_count, u32 v_count)
|
||||
std::string armv7_fmt(ARMv7Context& context, vm::cptr<char> fmt, u32 g_count, u32 f_count, u32 v_count)
|
||||
{
|
||||
std::string result;
|
||||
|
||||
|
@ -130,7 +128,7 @@ std::string armv7_fmt(ARMv7Context& context, vm::psv::ptr<const char> fmt, u32 g
|
|||
case 's':
|
||||
{
|
||||
// string
|
||||
auto string = vm::psv::ptr<const char>::make(context.get_next_gpr_arg(g_count, f_count, v_count));
|
||||
auto string = vm::cptr<char>::make(context.get_next_gpr_arg(g_count, f_count, v_count));
|
||||
|
||||
if (plus_sign || minus_sign || space_sign || number_sign || zero_padding || width || prec) break;
|
||||
|
||||
|
@ -139,7 +137,7 @@ std::string armv7_fmt(ARMv7Context& context, vm::psv::ptr<const char> fmt, u32 g
|
|||
}
|
||||
}
|
||||
|
||||
throw fmt::format("armv7_fmt(): unknown formatting: '%s'", start.get_ptr());
|
||||
throw EXCEPTION("Unknown formatting '%s'", start.get_ptr());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -151,7 +149,7 @@ std::string armv7_fmt(ARMv7Context& context, vm::psv::ptr<const char> fmt, u32 g
|
|||
|
||||
namespace sce_libc_func
|
||||
{
|
||||
void __cxa_atexit(vm::psv::ptr<atexit_func_t> func, vm::psv::ptr<void> arg, vm::psv::ptr<void> dso)
|
||||
void __cxa_atexit(vm::ptr<atexit_func_t> func, vm::ptr<void> arg, vm::ptr<void> dso)
|
||||
{
|
||||
sceLibc.Warning("__cxa_atexit(func=*0x%x, arg=*0x%x, dso=*0x%x)", func, arg, dso);
|
||||
|
||||
|
@ -163,7 +161,7 @@ namespace sce_libc_func
|
|||
});
|
||||
}
|
||||
|
||||
void __aeabi_atexit(vm::psv::ptr<void> arg, vm::psv::ptr<atexit_func_t> func, vm::psv::ptr<void> dso)
|
||||
void __aeabi_atexit(vm::ptr<void> arg, vm::ptr<atexit_func_t> func, vm::ptr<void> dso)
|
||||
{
|
||||
sceLibc.Warning("__aeabi_atexit(arg=*0x%x, func=*0x%x, dso=*0x%x)", arg, func, dso);
|
||||
|
||||
|
@ -181,76 +179,76 @@ namespace sce_libc_func
|
|||
|
||||
std::lock_guard<std::mutex> lock(g_atexit_mutex);
|
||||
|
||||
if (!Emu.IsStopped())
|
||||
CHECK_EMU_STATUS;
|
||||
|
||||
for (auto& func : decltype(g_atexit)(std::move(g_atexit)))
|
||||
{
|
||||
for (auto func : decltype(g_atexit)(std::move(g_atexit)))
|
||||
{
|
||||
func(context);
|
||||
}
|
||||
func(context);
|
||||
}
|
||||
|
||||
sceLibc.Success("Process finished");
|
||||
sceLibc.Success("Process finished");
|
||||
|
||||
CallAfter([]()
|
||||
{
|
||||
Emu.Stop();
|
||||
});
|
||||
CallAfter([]()
|
||||
{
|
||||
Emu.Stop();
|
||||
});
|
||||
|
||||
while (!Emu.IsStopped())
|
||||
{
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(1));
|
||||
}
|
||||
while (true)
|
||||
{
|
||||
CHECK_EMU_STATUS;
|
||||
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(1));
|
||||
}
|
||||
}
|
||||
|
||||
void printf(ARMv7Context& context, vm::psv::ptr<const char> fmt) // va_args...
|
||||
void printf(ARMv7Context& context, vm::cptr<char> fmt, armv7_va_args_t va_args)
|
||||
{
|
||||
sceLibc.Warning("printf(fmt=*0x%x)", fmt);
|
||||
sceLibc.Log("*** *fmt = '%s'", fmt.get_ptr());
|
||||
|
||||
const std::string& result = armv7_fmt(context, fmt, 1, 0, 0);
|
||||
const std::string& result = armv7_fmt(context, fmt, va_args.g_count, va_args.f_count, va_args.v_count);
|
||||
sceLibc.Log("*** -> '%s'", result);
|
||||
|
||||
LOG_NOTICE(TTY, result);
|
||||
}
|
||||
|
||||
void sprintf(ARMv7Context& context, vm::psv::ptr<char> str, vm::psv::ptr<const char> fmt) // va_args...
|
||||
void sprintf(ARMv7Context& context, vm::ptr<char> str, vm::cptr<char> fmt, armv7_va_args_t va_args)
|
||||
{
|
||||
sceLibc.Warning("sprintf(str=*0x%x, fmt=*0x%x)", str, fmt);
|
||||
sceLibc.Log("*** *fmt = '%s'", fmt.get_ptr());
|
||||
|
||||
const std::string& result = armv7_fmt(context, fmt, 2, 0, 0);
|
||||
const std::string& result = armv7_fmt(context, fmt, va_args.g_count, va_args.f_count, va_args.v_count);
|
||||
sceLibc.Log("*** -> '%s'", result);
|
||||
|
||||
::memcpy(str.get_ptr(), result.c_str(), result.size() + 1);
|
||||
}
|
||||
|
||||
void __cxa_set_dso_handle_main(vm::psv::ptr<void> dso)
|
||||
void __cxa_set_dso_handle_main(vm::ptr<void> dso)
|
||||
{
|
||||
sceLibc.Warning("__cxa_set_dso_handle_main(dso=*0x%x)", dso);
|
||||
|
||||
g_dso = dso;
|
||||
}
|
||||
|
||||
void memcpy(vm::psv::ptr<void> dst, vm::psv::ptr<const void> src, u32 size)
|
||||
void memcpy(vm::ptr<void> dst, vm::cptr<void> src, u32 size)
|
||||
{
|
||||
sceLibc.Warning("memcpy(dst=*0x%x, src=*0x%x, size=0x%x)", dst, src, size);
|
||||
|
||||
::memcpy(dst.get_ptr(), src.get_ptr(), size);
|
||||
}
|
||||
|
||||
void memset(vm::psv::ptr<void> dst, s32 value, u32 size)
|
||||
void memset(vm::ptr<void> dst, s32 value, u32 size)
|
||||
{
|
||||
sceLibc.Warning("memset(dst=*0x%x, value=%d, size=0x%x)", dst, value, size);
|
||||
|
||||
::memset(dst.get_ptr(), value, size);
|
||||
}
|
||||
|
||||
void _Assert(ARMv7Context& context, vm::psv::ptr<const char> text, vm::psv::ptr<const char> func)
|
||||
void _Assert(vm::cptr<char> text, vm::cptr<char> func)
|
||||
{
|
||||
sceLibc.Error("_Assert(text=*0x%x, func=*0x%x)", text, func);
|
||||
|
||||
LOG_ERROR(TTY, "%s : %s\n", func.get_ptr(), text.get_ptr());
|
||||
LOG_NOTICE(ARMv7, context.thread.RegsToString());
|
||||
Emu.Pause();
|
||||
}
|
||||
}
|
||||
|
@ -265,6 +263,7 @@ psv_log_base sceLibc("SceLibc", []()
|
|||
sceLibc.on_load = nullptr;
|
||||
sceLibc.on_unload = nullptr;
|
||||
sceLibc.on_stop = nullptr;
|
||||
sceLibc.on_error = nullptr;
|
||||
|
||||
REG_FUNC(0xE4531F85, _Assert);
|
||||
//REG_FUNC(0xE71C5CDE, _Stoul);
|
||||
|
|
5
rpcs3/Emu/ARMv7/Modules/sceLibc.h
Normal file
5
rpcs3/Emu/ARMv7/Modules/sceLibc.h
Normal file
|
@ -0,0 +1,5 @@
|
|||
#pragma once
|
||||
|
||||
using atexit_func_t = func_def<void(vm::ptr<void>)>;
|
||||
|
||||
extern psv_log_base sceLibc;
|
|
@ -2,7 +2,7 @@
|
|||
#include "Emu/System.h"
|
||||
#include "Emu/ARMv7/PSVFuncList.h"
|
||||
|
||||
extern psv_log_base sceLibm;
|
||||
#include "sceLibm.h"
|
||||
|
||||
namespace sce_libm_func
|
||||
{
|
||||
|
@ -16,6 +16,7 @@ psv_log_base sceLibm("SceLibm", []()
|
|||
sceLibm.on_load = nullptr;
|
||||
sceLibm.on_unload = nullptr;
|
||||
sceLibm.on_stop = nullptr;
|
||||
sceLibm.on_error = nullptr;
|
||||
|
||||
//REG_FUNC(0xC73FE76D, _Exp);
|
||||
//REG_FUNC(0xFF4EAE04, _FExp);
|
||||
|
|
3
rpcs3/Emu/ARMv7/Modules/sceLibm.h
Normal file
3
rpcs3/Emu/ARMv7/Modules/sceLibm.h
Normal file
|
@ -0,0 +1,3 @@
|
|||
#pragma once
|
||||
|
||||
extern psv_log_base sceLibm;
|
|
@ -2,23 +2,23 @@
|
|||
#include "Emu/System.h"
|
||||
#include "Emu/ARMv7/PSVFuncList.h"
|
||||
|
||||
extern psv_log_base sceLibstdcxx;
|
||||
#include "sceLibstdcxx.h"
|
||||
|
||||
namespace sce_libstdcxx_func
|
||||
{
|
||||
void __aeabi_unwind_cpp_pr0()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
void __aeabi_unwind_cpp_pr1()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
void __aeabi_unwind_cpp_pr2()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -30,6 +30,7 @@ psv_log_base sceLibstdcxx("SceLibstdcxx", []()
|
|||
sceLibstdcxx.on_load = nullptr;
|
||||
sceLibstdcxx.on_unload = nullptr;
|
||||
sceLibstdcxx.on_stop = nullptr;
|
||||
sceLibstdcxx.on_error = nullptr;
|
||||
|
||||
//REG_FUNC(0x52B0C625, std::bad_typeid::what() const);
|
||||
//REG_FUNC(0x64D7D074, std::bad_typeid::_Doraise() const);
|
||||
|
|
3
rpcs3/Emu/ARMv7/Modules/sceLibstdcxx.h
Normal file
3
rpcs3/Emu/ARMv7/Modules/sceLibstdcxx.h
Normal file
|
@ -0,0 +1,3 @@
|
|||
#pragma once
|
||||
|
||||
extern psv_log_base sceLibstdcxx;
|
|
@ -2,16 +2,16 @@
|
|||
#include "Emu/System.h"
|
||||
#include "Emu/ARMv7/PSVFuncList.h"
|
||||
|
||||
extern psv_log_base sceLiveArea;
|
||||
#include "sceLiveArea.h"
|
||||
|
||||
s32 sceLiveAreaResourceReplaceAll(vm::psv::ptr<const char> dirpath)
|
||||
s32 sceLiveAreaResourceReplaceAll(vm::cptr<char> dirpath)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceLiveAreaResourceGetStatus()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
#define REG_FUNC(nid, name) reg_psv_func(nid, &sceLiveArea, #name, name)
|
||||
|
@ -21,6 +21,7 @@ psv_log_base sceLiveArea("SceLiveArea", []()
|
|||
sceLiveArea.on_load = nullptr;
|
||||
sceLiveArea.on_unload = nullptr;
|
||||
sceLiveArea.on_stop = nullptr;
|
||||
sceLiveArea.on_error = nullptr;
|
||||
|
||||
REG_FUNC(0xA4B506F9, sceLiveAreaResourceReplaceAll);
|
||||
REG_FUNC(0x54A395FB, sceLiveAreaResourceGetStatus);
|
||||
|
|
3
rpcs3/Emu/ARMv7/Modules/sceLiveArea.h
Normal file
3
rpcs3/Emu/ARMv7/Modules/sceLiveArea.h
Normal file
|
@ -0,0 +1,3 @@
|
|||
#pragma once
|
||||
|
||||
extern psv_log_base sceLiveArea;
|
|
@ -2,173 +2,91 @@
|
|||
#include "Emu/System.h"
|
||||
#include "Emu/ARMv7/PSVFuncList.h"
|
||||
|
||||
extern psv_log_base sceLocation;
|
||||
#include "sceLocation.h"
|
||||
|
||||
typedef u8 SceLocationHandle;
|
||||
|
||||
enum SceLocationLocationMethod : s32
|
||||
s32 sceLocationOpen(vm::ptr<u8> handle, SceLocationLocationMethod lmethod, SceLocationHeadingMethod hmethod)
|
||||
{
|
||||
SCE_LOCATION_LMETHOD_NONE = 0,
|
||||
SCE_LOCATION_LMETHOD_AGPS_AND_3G_AND_WIFI = 1,
|
||||
SCE_LOCATION_LMETHOD_GPS_AND_WIFI = 2,
|
||||
SCE_LOCATION_LMETHOD_WIFI = 3,
|
||||
SCE_LOCATION_LMETHOD_3G = 4,
|
||||
SCE_LOCATION_LMETHOD_GPS = 5
|
||||
};
|
||||
|
||||
enum SceLocationHeadingMethod : s32
|
||||
{
|
||||
SCE_LOCATION_HMETHOD_NONE = 0,
|
||||
SCE_LOCATION_HMETHOD_AUTO = 1,
|
||||
SCE_LOCATION_HMETHOD_VERTICAL = 2,
|
||||
SCE_LOCATION_HMETHOD_HORIZONTAL = 3,
|
||||
SCE_LOCATION_HMETHOD_CAMERA = 4
|
||||
};
|
||||
|
||||
enum SceLocationDialogStatus : s32
|
||||
{
|
||||
SCE_LOCATION_DIALOG_STATUS_IDLE = 0,
|
||||
SCE_LOCATION_DIALOG_STATUS_RUNNING = 1,
|
||||
SCE_LOCATION_DIALOG_STATUS_FINISHED = 2
|
||||
};
|
||||
|
||||
enum SceLocationDialogResult : s32
|
||||
{
|
||||
SCE_LOCATION_DIALOG_RESULT_NONE = 0,
|
||||
SCE_LOCATION_DIALOG_RESULT_DISABLE = 1,
|
||||
SCE_LOCATION_DIALOG_RESULT_ENABLE = 2
|
||||
};
|
||||
|
||||
enum SceLocationPermissionApplicationStatus : s32
|
||||
{
|
||||
SCE_LOCATION_PERMISSION_APPLICATION_NONE = 0,
|
||||
SCE_LOCATION_PERMISSION_APPLICATION_INIT = 1,
|
||||
SCE_LOCATION_PERMISSION_APPLICATION_DENY = 2,
|
||||
SCE_LOCATION_PERMISSION_APPLICATION_ALLOW = 3
|
||||
};
|
||||
|
||||
enum SceLocationPermissionStatus : s32
|
||||
{
|
||||
SCE_LOCATION_PERMISSION_DENY = 0,
|
||||
SCE_LOCATION_PERMISSION_ALLOW = 1
|
||||
};
|
||||
|
||||
struct SceLocationLocationInfo
|
||||
{
|
||||
double latitude;
|
||||
double longitude;
|
||||
double altitude;
|
||||
float accuracy;
|
||||
float reserve;
|
||||
float direction;
|
||||
float speed;
|
||||
u64 timestamp;
|
||||
};
|
||||
|
||||
struct SceLocationHeadingInfo
|
||||
{
|
||||
float trueHeading;
|
||||
float headingVectorX;
|
||||
float headingVectorY;
|
||||
float headingVectorZ;
|
||||
float reserve;
|
||||
float reserve2;
|
||||
u64 timestamp;
|
||||
};
|
||||
|
||||
typedef vm::psv::ptr<void(s32 result, SceLocationHandle handle, vm::psv::ptr<const SceLocationLocationInfo> location, vm::psv::ptr<void> userdata)> SceLocationLocationInfoCallback;
|
||||
typedef vm::psv::ptr<void(s32 result, SceLocationHandle handle, vm::psv::ptr<const SceLocationHeadingInfo> heading, vm::psv::ptr<void> userdata)> SceLocationHeadingInfoCallback;
|
||||
|
||||
struct SceLocationPermissionInfo
|
||||
{
|
||||
SceLocationPermissionStatus parentalstatus;
|
||||
SceLocationPermissionStatus mainstatus;
|
||||
SceLocationPermissionApplicationStatus applicationstatus;
|
||||
};
|
||||
|
||||
s32 sceLocationOpen(vm::psv::ptr<SceLocationHandle> handle, SceLocationLocationMethod lmethod, SceLocationHeadingMethod hmethod)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceLocationClose(SceLocationHandle handle)
|
||||
s32 sceLocationClose(u8 handle)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceLocationReopen(SceLocationHandle handle, SceLocationLocationMethod lmethod, SceLocationHeadingMethod hmethod)
|
||||
s32 sceLocationReopen(u8 handle, SceLocationLocationMethod lmethod, SceLocationHeadingMethod hmethod)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceLocationGetMethod(SceLocationHandle handle, vm::psv::ptr<SceLocationLocationMethod> lmethod, vm::psv::ptr<SceLocationHeadingMethod> hmethod)
|
||||
s32 sceLocationGetMethod(u8 handle, vm::ptr<s32> lmethod, vm::ptr<s32> hmethod)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceLocationGetLocation(SceLocationHandle handle, vm::psv::ptr<SceLocationLocationInfo> linfo)
|
||||
s32 sceLocationGetLocation(u8 handle, vm::ptr<SceLocationLocationInfo> linfo)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceLocationCancelGetLocation(SceLocationHandle handle)
|
||||
s32 sceLocationCancelGetLocation(u8 handle)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceLocationStartLocationCallback(SceLocationHandle handle, u32 distance, SceLocationLocationInfoCallback callback, vm::psv::ptr<void> userdata)
|
||||
s32 sceLocationStartLocationCallback(u8 handle, u32 distance, vm::ptr<SceLocationLocationInfoCallback> callback, vm::ptr<void> userdata)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceLocationStopLocationCallback(SceLocationHandle handle)
|
||||
s32 sceLocationStopLocationCallback(u8 handle)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceLocationGetHeading(SceLocationHandle handle, vm::psv::ptr<SceLocationHeadingInfo> hinfo)
|
||||
s32 sceLocationGetHeading(u8 handle, vm::ptr<SceLocationHeadingInfo> hinfo)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceLocationStartHeadingCallback(SceLocationHandle handle, u32 difference, SceLocationHeadingInfoCallback callback, vm::psv::ptr<void> userdata)
|
||||
s32 sceLocationStartHeadingCallback(u8 handle, u32 difference, vm::ptr<SceLocationHeadingInfoCallback> callback, vm::ptr<void> userdata)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceLocationStopHeadingCallback(SceLocationHandle handle)
|
||||
s32 sceLocationStopHeadingCallback(u8 handle)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceLocationConfirm(SceLocationHandle handle)
|
||||
s32 sceLocationConfirm(u8 handle)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceLocationConfirmGetStatus(SceLocationHandle handle, vm::psv::ptr<SceLocationDialogStatus> status)
|
||||
s32 sceLocationConfirmGetStatus(u8 handle, vm::ptr<s32> status)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceLocationConfirmGetResult(SceLocationHandle handle, vm::psv::ptr<SceLocationDialogResult> result)
|
||||
s32 sceLocationConfirmGetResult(u8 handle, vm::ptr<s32> result)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceLocationConfirmAbort(SceLocationHandle handle)
|
||||
s32 sceLocationConfirmAbort(u8 handle)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceLocationGetPermission(SceLocationHandle handle, vm::psv::ptr<SceLocationPermissionInfo> info)
|
||||
s32 sceLocationGetPermission(u8 handle, vm::ptr<SceLocationPermissionInfo> info)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceLocationSetGpsEmulationFile(vm::psv::ptr<char> filename)
|
||||
s32 sceLocationSetGpsEmulationFile(vm::ptr<char> filename)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
|
||||
|
@ -179,6 +97,7 @@ psv_log_base sceLocation("SceLibLocation", []()
|
|||
sceLocation.on_load = nullptr;
|
||||
sceLocation.on_unload = nullptr;
|
||||
sceLocation.on_stop = nullptr;
|
||||
sceLocation.on_error = nullptr;
|
||||
|
||||
REG_FUNC(0xDD271661, sceLocationOpen);
|
||||
REG_FUNC(0x14FE76E8, sceLocationClose);
|
||||
|
|
83
rpcs3/Emu/ARMv7/Modules/sceLocation.h
Normal file
83
rpcs3/Emu/ARMv7/Modules/sceLocation.h
Normal file
|
@ -0,0 +1,83 @@
|
|||
#pragma once
|
||||
|
||||
enum SceLocationLocationMethod : s32
|
||||
{
|
||||
SCE_LOCATION_LMETHOD_NONE = 0,
|
||||
SCE_LOCATION_LMETHOD_AGPS_AND_3G_AND_WIFI = 1,
|
||||
SCE_LOCATION_LMETHOD_GPS_AND_WIFI = 2,
|
||||
SCE_LOCATION_LMETHOD_WIFI = 3,
|
||||
SCE_LOCATION_LMETHOD_3G = 4,
|
||||
SCE_LOCATION_LMETHOD_GPS = 5
|
||||
};
|
||||
|
||||
enum SceLocationHeadingMethod : s32
|
||||
{
|
||||
SCE_LOCATION_HMETHOD_NONE = 0,
|
||||
SCE_LOCATION_HMETHOD_AUTO = 1,
|
||||
SCE_LOCATION_HMETHOD_VERTICAL = 2,
|
||||
SCE_LOCATION_HMETHOD_HORIZONTAL = 3,
|
||||
SCE_LOCATION_HMETHOD_CAMERA = 4
|
||||
};
|
||||
|
||||
enum SceLocationDialogStatus : s32
|
||||
{
|
||||
SCE_LOCATION_DIALOG_STATUS_IDLE = 0,
|
||||
SCE_LOCATION_DIALOG_STATUS_RUNNING = 1,
|
||||
SCE_LOCATION_DIALOG_STATUS_FINISHED = 2
|
||||
};
|
||||
|
||||
enum SceLocationDialogResult : s32
|
||||
{
|
||||
SCE_LOCATION_DIALOG_RESULT_NONE = 0,
|
||||
SCE_LOCATION_DIALOG_RESULT_DISABLE = 1,
|
||||
SCE_LOCATION_DIALOG_RESULT_ENABLE = 2
|
||||
};
|
||||
|
||||
enum SceLocationPermissionApplicationStatus : s32
|
||||
{
|
||||
SCE_LOCATION_PERMISSION_APPLICATION_NONE = 0,
|
||||
SCE_LOCATION_PERMISSION_APPLICATION_INIT = 1,
|
||||
SCE_LOCATION_PERMISSION_APPLICATION_DENY = 2,
|
||||
SCE_LOCATION_PERMISSION_APPLICATION_ALLOW = 3
|
||||
};
|
||||
|
||||
enum SceLocationPermissionStatus : s32
|
||||
{
|
||||
SCE_LOCATION_PERMISSION_DENY = 0,
|
||||
SCE_LOCATION_PERMISSION_ALLOW = 1
|
||||
};
|
||||
|
||||
struct SceLocationLocationInfo
|
||||
{
|
||||
le_t<double> latitude;
|
||||
le_t<double> longitude;
|
||||
le_t<double> altitude;
|
||||
le_t<float> accuracy;
|
||||
le_t<float> reserve;
|
||||
le_t<float> direction;
|
||||
le_t<float> speed;
|
||||
le_t<u64> timestamp;
|
||||
};
|
||||
|
||||
struct SceLocationHeadingInfo
|
||||
{
|
||||
le_t<float> trueHeading;
|
||||
le_t<float> headingVectorX;
|
||||
le_t<float> headingVectorY;
|
||||
le_t<float> headingVectorZ;
|
||||
le_t<float> reserve;
|
||||
le_t<float> reserve2;
|
||||
le_t<u64> timestamp;
|
||||
};
|
||||
|
||||
using SceLocationLocationInfoCallback = func_def<void(s32 result, u8 handle, vm::cptr<SceLocationLocationInfo> location, vm::ptr<void> userdata)>;
|
||||
using SceLocationHeadingInfoCallback = func_def<void(s32 result, u8 handle, vm::cptr<SceLocationHeadingInfo> heading, vm::ptr<void> userdata)>;
|
||||
|
||||
struct SceLocationPermissionInfo
|
||||
{
|
||||
SceLocationPermissionStatus parentalstatus;
|
||||
SceLocationPermissionStatus mainstatus;
|
||||
SceLocationPermissionApplicationStatus applicationstatus;
|
||||
};
|
||||
|
||||
extern psv_log_base sceLocation;
|
|
@ -2,37 +2,26 @@
|
|||
#include "Emu/System.h"
|
||||
#include "Emu/ARMv7/PSVFuncList.h"
|
||||
|
||||
extern psv_log_base sceMd5;
|
||||
#include "sceMd5.h"
|
||||
|
||||
struct SceMd5Context
|
||||
s32 sceMd5Digest(vm::cptr<void> plain, u32 len, vm::ptr<u8> digest)
|
||||
{
|
||||
u32 h[4];
|
||||
u32 pad;
|
||||
u16 usRemains;
|
||||
u16 usComputed;
|
||||
u64 ullTotalLen;
|
||||
u8 buf[64];
|
||||
u8 result[64];
|
||||
};
|
||||
|
||||
s32 sceMd5Digest(vm::psv::ptr<const void> plain, u32 len, vm::psv::ptr<u8> digest)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceMd5BlockInit(vm::psv::ptr<SceMd5Context> pContext)
|
||||
s32 sceMd5BlockInit(vm::ptr<SceMd5Context> pContext)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceMd5BlockUpdate(vm::psv::ptr<SceMd5Context> pContext, vm::psv::ptr<const void> plain, u32 len)
|
||||
s32 sceMd5BlockUpdate(vm::ptr<SceMd5Context> pContext, vm::cptr<void> plain, u32 len)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceMd5BlockResult(vm::psv::ptr<SceMd5Context> pContext, vm::psv::ptr<u8> digest)
|
||||
s32 sceMd5BlockResult(vm::ptr<SceMd5Context> pContext, vm::ptr<u8> digest)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
#define REG_FUNC(nid, name) reg_psv_func(nid, &sceMd5, #name, name)
|
||||
|
@ -42,6 +31,7 @@ psv_log_base sceMd5("SceMd5", []()
|
|||
sceMd5.on_load = nullptr;
|
||||
sceMd5.on_unload = nullptr;
|
||||
sceMd5.on_stop = nullptr;
|
||||
sceMd5.on_error = nullptr;
|
||||
|
||||
REG_FUNC(0xB845BCCB, sceMd5Digest);
|
||||
REG_FUNC(0x4D6436F9, sceMd5BlockInit);
|
||||
|
|
14
rpcs3/Emu/ARMv7/Modules/sceMd5.h
Normal file
14
rpcs3/Emu/ARMv7/Modules/sceMd5.h
Normal file
|
@ -0,0 +1,14 @@
|
|||
#pragma once
|
||||
|
||||
struct SceMd5Context
|
||||
{
|
||||
le_t<u32> h[4];
|
||||
le_t<u32> pad;
|
||||
le_t<u16> usRemains;
|
||||
le_t<u16> usComputed;
|
||||
le_t<u64> ullTotalLen;
|
||||
u8 buf[64];
|
||||
u8 result[64];
|
||||
};
|
||||
|
||||
extern psv_log_base sceMd5;
|
|
@ -2,113 +2,86 @@
|
|||
#include "Emu/System.h"
|
||||
#include "Emu/ARMv7/PSVFuncList.h"
|
||||
|
||||
extern psv_log_base sceMotion;
|
||||
#include "sceMotion.h"
|
||||
|
||||
struct SceMotionState
|
||||
s32 sceMotionGetState(vm::ptr<SceMotionState> motionState)
|
||||
{
|
||||
u32 timestamp;
|
||||
SceFVector3 acceleration;
|
||||
SceFVector3 angularVelocity;
|
||||
u8 reserve1[12];
|
||||
SceFQuaternion deviceQuat;
|
||||
SceUMatrix4 rotationMatrix;
|
||||
SceUMatrix4 nedMatrix;
|
||||
u8 reserve2[4];
|
||||
SceFVector3 basicOrientation;
|
||||
u64 hostTimestamp;
|
||||
u8 reserve3[40];
|
||||
};
|
||||
|
||||
struct SceMotionSensorState
|
||||
{
|
||||
SceFVector3 accelerometer;
|
||||
SceFVector3 gyro;
|
||||
u8 reserve1[12];
|
||||
u32 timestamp;
|
||||
u32 counter;
|
||||
u8 reserve2[4];
|
||||
u64 hostTimestamp;
|
||||
u8 reserve3[8];
|
||||
};
|
||||
|
||||
s32 sceMotionGetState(vm::psv::ptr<SceMotionState> motionState)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceMotionGetSensorState(vm::psv::ptr<SceMotionSensorState> sensorState, s32 numRecords)
|
||||
s32 sceMotionGetSensorState(vm::ptr<SceMotionSensorState> sensorState, s32 numRecords)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceMotionGetBasicOrientation(vm::psv::ptr<SceFVector3> basicOrientation)
|
||||
s32 sceMotionGetBasicOrientation(vm::ptr<SceFVector3> basicOrientation)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
//s32 sceMotionRotateYaw(const float radians)
|
||||
//{
|
||||
// throw __FUNCTION__;
|
||||
//}
|
||||
s32 sceMotionRotateYaw(const float radians)
|
||||
{
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceMotionGetTiltCorrection()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceMotionSetTiltCorrection(s32 setValue)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceMotionGetDeadband()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceMotionSetDeadband(s32 setValue)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
//s32 sceMotionSetAngleThreshold(const float angle)
|
||||
//{
|
||||
// throw __FUNCTION__;
|
||||
//}
|
||||
s32 sceMotionSetAngleThreshold(const float angle)
|
||||
{
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
//float sceMotionGetAngleThreshold()
|
||||
//{
|
||||
// throw __FUNCTION__;
|
||||
//}
|
||||
float sceMotionGetAngleThreshold()
|
||||
{
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceMotionReset()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceMotionMagnetometerOn()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceMotionMagnetometerOff()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceMotionGetMagnetometerState()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceMotionStartSampling()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceMotionStopSampling()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
#define REG_FUNC(nid, name) reg_psv_func(nid, &sceMotion, #name, name)
|
||||
|
@ -118,6 +91,7 @@ psv_log_base sceMotion("SceMotion", []()
|
|||
sceMotion.on_load = nullptr;
|
||||
sceMotion.on_unload = nullptr;
|
||||
sceMotion.on_stop = nullptr;
|
||||
sceMotion.on_error = nullptr;
|
||||
|
||||
REG_FUNC(0xBDB32767, sceMotionGetState);
|
||||
REG_FUNC(0x47D679EA, sceMotionGetSensorState);
|
||||
|
|
30
rpcs3/Emu/ARMv7/Modules/sceMotion.h
Normal file
30
rpcs3/Emu/ARMv7/Modules/sceMotion.h
Normal file
|
@ -0,0 +1,30 @@
|
|||
#pragma once
|
||||
|
||||
struct SceMotionState
|
||||
{
|
||||
le_t<u32> timestamp;
|
||||
SceFVector3 acceleration;
|
||||
SceFVector3 angularVelocity;
|
||||
u8 reserve1[12];
|
||||
SceFQuaternion deviceQuat;
|
||||
SceUMatrix4 rotationMatrix;
|
||||
SceUMatrix4 nedMatrix;
|
||||
u8 reserve2[4];
|
||||
SceFVector3 basicOrientation;
|
||||
le_t<u64> hostTimestamp;
|
||||
u8 reserve3[40];
|
||||
};
|
||||
|
||||
struct SceMotionSensorState
|
||||
{
|
||||
SceFVector3 accelerometer;
|
||||
SceFVector3 gyro;
|
||||
u8 reserve1[12];
|
||||
le_t<u32> timestamp;
|
||||
le_t<u32> counter;
|
||||
u8 reserve2[4];
|
||||
le_t<u64> hostTimestamp;
|
||||
u8 reserve3[8];
|
||||
};
|
||||
|
||||
extern psv_log_base sceMotion;
|
|
@ -2,22 +2,16 @@
|
|||
#include "Emu/System.h"
|
||||
#include "Emu/ARMv7/PSVFuncList.h"
|
||||
|
||||
extern psv_log_base sceMt19937;
|
||||
#include "sceMt19937.h"
|
||||
|
||||
struct SceMt19937Context
|
||||
s32 sceMt19937Init(vm::ptr<SceMt19937Context> pCtx, u32 seed)
|
||||
{
|
||||
u32 count;
|
||||
u32 state[624];
|
||||
};
|
||||
|
||||
s32 sceMt19937Init(vm::psv::ptr<SceMt19937Context> pCtx, u32 seed)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
u32 sceMt19937UInt(vm::psv::ptr<SceMt19937Context> pCtx)
|
||||
u32 sceMt19937UInt(vm::ptr<SceMt19937Context> pCtx)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
|
||||
|
@ -28,6 +22,7 @@ psv_log_base sceMt19937("SceMt19937", []()
|
|||
sceMt19937.on_load = nullptr;
|
||||
sceMt19937.on_unload = nullptr;
|
||||
sceMt19937.on_stop = nullptr;
|
||||
sceMt19937.on_error = nullptr;
|
||||
|
||||
REG_FUNC(0xEE5BA27C, sceMt19937Init);
|
||||
REG_FUNC(0x29E43BB5, sceMt19937UInt);
|
||||
|
|
9
rpcs3/Emu/ARMv7/Modules/sceMt19937.h
Normal file
9
rpcs3/Emu/ARMv7/Modules/sceMt19937.h
Normal file
|
@ -0,0 +1,9 @@
|
|||
#pragma once
|
||||
|
||||
struct SceMt19937Context
|
||||
{
|
||||
le_t<u32> count;
|
||||
le_t<u32> state[624];
|
||||
};
|
||||
|
||||
extern psv_log_base sceMt19937;
|
|
@ -4,294 +4,294 @@
|
|||
|
||||
#include "sceNet.h"
|
||||
|
||||
s32 sceNetSetDnsInfo(vm::psv::ptr<SceNetDnsInfo> info, s32 flags)
|
||||
s32 sceNetSetDnsInfo(vm::ptr<SceNetDnsInfo> info, s32 flags)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNetClearDnsCache(s32 flags)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNetDumpCreate(vm::psv::ptr<const char> name, s32 len, s32 flags)
|
||||
s32 sceNetDumpCreate(vm::cptr<char> name, s32 len, s32 flags)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNetDumpRead(s32 id, vm::psv::ptr<void> buf, s32 len, vm::psv::ptr<s32> pflags)
|
||||
s32 sceNetDumpRead(s32 id, vm::ptr<void> buf, s32 len, vm::ptr<s32> pflags)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNetDumpDestroy(s32 id)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNetDumpAbort(s32 id, s32 flags)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNetEpollCreate(vm::psv::ptr<const char> name, s32 flags)
|
||||
s32 sceNetEpollCreate(vm::cptr<char> name, s32 flags)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNetEpollControl(s32 eid, s32 op, s32 id, vm::psv::ptr<SceNetEpollEvent> event)
|
||||
s32 sceNetEpollControl(s32 eid, s32 op, s32 id, vm::ptr<SceNetEpollEvent> event)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNetEpollWait(s32 eid, vm::psv::ptr<SceNetEpollEvent> events, s32 maxevents, s32 timeout)
|
||||
s32 sceNetEpollWait(s32 eid, vm::ptr<SceNetEpollEvent> events, s32 maxevents, s32 timeout)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNetEpollWaitCB(s32 eid, vm::psv::ptr<SceNetEpollEvent> events, s32 maxevents, s32 timeout)
|
||||
s32 sceNetEpollWaitCB(s32 eid, vm::ptr<SceNetEpollEvent> events, s32 maxevents, s32 timeout)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNetEpollDestroy(s32 eid)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNetEpollAbort(s32 eid, s32 flags)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
vm::psv::ptr<s32> sceNetErrnoLoc()
|
||||
vm::ptr<s32> sceNetErrnoLoc()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNetEtherStrton(vm::psv::ptr<const char> str, vm::psv::ptr<SceNetEtherAddr> n)
|
||||
s32 sceNetEtherStrton(vm::cptr<char> str, vm::ptr<SceNetEtherAddr> n)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNetEtherNtostr(vm::psv::ptr<const SceNetEtherAddr> n, vm::psv::ptr<char> str, u32 len)
|
||||
s32 sceNetEtherNtostr(vm::cptr<SceNetEtherAddr> n, vm::ptr<char> str, u32 len)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNetGetMacAddress(vm::psv::ptr<SceNetEtherAddr> addr, s32 flags)
|
||||
s32 sceNetGetMacAddress(vm::ptr<SceNetEtherAddr> addr, s32 flags)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
vm::psv::ptr<const char> sceNetInetNtop(s32 af, vm::psv::ptr<const void> src, vm::psv::ptr<char> dst, SceNetSocklen_t size)
|
||||
vm::cptr<char> sceNetInetNtop(s32 af, vm::cptr<void> src, vm::ptr<char> dst, SceNetSocklen_t size)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNetInetPton(s32 af, vm::psv::ptr<const char> src, vm::psv::ptr<void> dst)
|
||||
s32 sceNetInetPton(s32 af, vm::cptr<char> src, vm::ptr<void> dst)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
u64 sceNetHtonll(u64 host64)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
u32 sceNetHtonl(u32 host32)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
u16 sceNetHtons(u16 host16)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
u64 sceNetNtohll(u64 net64)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
u32 sceNetNtohl(u32 net32)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
u16 sceNetNtohs(u16 net16)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNetInit(vm::psv::ptr<SceNetInitParam> param)
|
||||
s32 sceNetInit(vm::ptr<SceNetInitParam> param)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNetTerm()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNetShowIfconfig()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNetShowRoute()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNetShowNetstat()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNetEmulationSet(vm::psv::ptr<SceNetEmulationParam> param, s32 flags)
|
||||
s32 sceNetEmulationSet(vm::ptr<SceNetEmulationParam> param, s32 flags)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNetEmulationGet(vm::psv::ptr<SceNetEmulationParam> param, s32 flags)
|
||||
s32 sceNetEmulationGet(vm::ptr<SceNetEmulationParam> param, s32 flags)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNetResolverCreate(vm::psv::ptr<const char> name, vm::psv::ptr<SceNetResolverParam> param, s32 flags)
|
||||
s32 sceNetResolverCreate(vm::cptr<char> name, vm::ptr<SceNetResolverParam> param, s32 flags)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNetResolverStartNtoa(s32 rid, vm::psv::ptr<const char> hostname, vm::psv::ptr<SceNetInAddr> addr, s32 timeout, s32 retry, s32 flags)
|
||||
s32 sceNetResolverStartNtoa(s32 rid, vm::cptr<char> hostname, vm::ptr<SceNetInAddr> addr, s32 timeout, s32 retry, s32 flags)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNetResolverStartAton(s32 rid, vm::psv::ptr<const SceNetInAddr> addr, vm::psv::ptr<char> hostname, s32 len, s32 timeout, s32 retry, s32 flags)
|
||||
s32 sceNetResolverStartAton(s32 rid, vm::cptr<SceNetInAddr> addr, vm::ptr<char> hostname, s32 len, s32 timeout, s32 retry, s32 flags)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNetResolverGetError(s32 rid, vm::psv::ptr<s32> result)
|
||||
s32 sceNetResolverGetError(s32 rid, vm::ptr<s32> result)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNetResolverDestroy(s32 rid)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNetResolverAbort(s32 rid, s32 flags)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNetSocket(vm::psv::ptr<const char> name, s32 domain, s32 type, s32 protocol)
|
||||
s32 sceNetSocket(vm::cptr<char> name, s32 domain, s32 type, s32 protocol)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNetAccept(s32 s, vm::psv::ptr<SceNetSockaddr> addr, vm::psv::ptr<SceNetSocklen_t> addrlen)
|
||||
s32 sceNetAccept(s32 s, vm::ptr<SceNetSockaddr> addr, vm::ptr<SceNetSocklen_t> addrlen)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNetBind(s32 s, vm::psv::ptr<const SceNetSockaddr> addr, SceNetSocklen_t addrlen)
|
||||
s32 sceNetBind(s32 s, vm::cptr<SceNetSockaddr> addr, SceNetSocklen_t addrlen)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNetConnect(s32 s, vm::psv::ptr<const SceNetSockaddr> name, SceNetSocklen_t namelen)
|
||||
s32 sceNetConnect(s32 s, vm::cptr<SceNetSockaddr> name, SceNetSocklen_t namelen)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNetGetpeername(s32 s, vm::psv::ptr<SceNetSockaddr> name, vm::psv::ptr<SceNetSocklen_t> namelen)
|
||||
s32 sceNetGetpeername(s32 s, vm::ptr<SceNetSockaddr> name, vm::ptr<SceNetSocklen_t> namelen)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNetGetsockname(s32 s, vm::psv::ptr<SceNetSockaddr> name, vm::psv::ptr<SceNetSocklen_t> namelen)
|
||||
s32 sceNetGetsockname(s32 s, vm::ptr<SceNetSockaddr> name, vm::ptr<SceNetSocklen_t> namelen)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNetGetsockopt(s32 s, s32 level, s32 optname, vm::psv::ptr<void> optval, vm::psv::ptr<SceNetSocklen_t> optlen)
|
||||
s32 sceNetGetsockopt(s32 s, s32 level, s32 optname, vm::ptr<void> optval, vm::ptr<SceNetSocklen_t> optlen)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNetListen(s32 s, s32 backlog)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNetRecv(s32 s, vm::psv::ptr<void> buf, u32 len, s32 flags)
|
||||
s32 sceNetRecv(s32 s, vm::ptr<void> buf, u32 len, s32 flags)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNetRecvfrom(s32 s, vm::psv::ptr<void> buf, u32 len, s32 flags, vm::psv::ptr<SceNetSockaddr> from, vm::psv::ptr<SceNetSocklen_t> fromlen)
|
||||
s32 sceNetRecvfrom(s32 s, vm::ptr<void> buf, u32 len, s32 flags, vm::ptr<SceNetSockaddr> from, vm::ptr<SceNetSocklen_t> fromlen)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNetRecvmsg(s32 s, vm::psv::ptr<SceNetMsghdr> msg, s32 flags)
|
||||
s32 sceNetRecvmsg(s32 s, vm::ptr<SceNetMsghdr> msg, s32 flags)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNetSend(s32 s, vm::psv::ptr<const void> msg, u32 len, s32 flags)
|
||||
s32 sceNetSend(s32 s, vm::cptr<void> msg, u32 len, s32 flags)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNetSendto(s32 s, vm::psv::ptr<const void> msg, u32 len, s32 flags, vm::psv::ptr<const SceNetSockaddr> to, SceNetSocklen_t tolen)
|
||||
s32 sceNetSendto(s32 s, vm::cptr<void> msg, u32 len, s32 flags, vm::cptr<SceNetSockaddr> to, SceNetSocklen_t tolen)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNetSendmsg(s32 s, vm::psv::ptr<const SceNetMsghdr> msg, s32 flags)
|
||||
s32 sceNetSendmsg(s32 s, vm::cptr<SceNetMsghdr> msg, s32 flags)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNetSetsockopt(s32 s, s32 level, s32 optname, vm::psv::ptr<const void> optval, SceNetSocklen_t optlen)
|
||||
s32 sceNetSetsockopt(s32 s, s32 level, s32 optname, vm::cptr<void> optval, SceNetSocklen_t optlen)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNetShutdown(s32 s, s32 how)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNetSocketClose(s32 s)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNetSocketAbort(s32 s, s32 flags)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNetGetSockInfo(s32 s, vm::psv::ptr<SceNetSockInfo> info, s32 n, s32 flags)
|
||||
s32 sceNetGetSockInfo(s32 s, vm::ptr<SceNetSockInfo> info, s32 n, s32 flags)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNetGetSockIdInfo(vm::psv::ptr<SceNetFdSet> fds, s32 sockinfoflags, s32 flags)
|
||||
s32 sceNetGetSockIdInfo(vm::ptr<SceNetFdSet> fds, s32 sockinfoflags, s32 flags)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNetGetStatisticsInfo(vm::psv::ptr<SceNetStatisticsInfo> info, s32 flags)
|
||||
s32 sceNetGetStatisticsInfo(vm::ptr<SceNetStatisticsInfo> info, s32 flags)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
|
||||
|
@ -302,6 +302,7 @@ psv_log_base sceNet("SceNet", []()
|
|||
sceNet.on_load = nullptr;
|
||||
sceNet.on_unload = nullptr;
|
||||
sceNet.on_stop = nullptr;
|
||||
sceNet.on_error = nullptr;
|
||||
|
||||
REG_FUNC(0xD62EF218, sceNetSetDnsInfo);
|
||||
REG_FUNC(0xFEC1166D, sceNetClearDnsCache);
|
||||
|
|
|
@ -1,22 +1,19 @@
|
|||
#pragma once
|
||||
|
||||
typedef u32 SceNetInAddr_t;
|
||||
typedef u16 SceNetInPort_t;
|
||||
typedef u8 SceNetSaFamily_t;
|
||||
typedef u32 SceNetSocklen_t;
|
||||
|
||||
struct SceNetInAddr
|
||||
{
|
||||
SceNetInAddr_t s_addr;
|
||||
le_t<u32> s_addr;
|
||||
};
|
||||
|
||||
struct SceNetSockaddrIn
|
||||
{
|
||||
u8 sin_len;
|
||||
SceNetSaFamily_t sin_family;
|
||||
SceNetInPort_t sin_port;
|
||||
u8 sin_family;
|
||||
le_t<u16> sin_port;
|
||||
SceNetInAddr sin_addr;
|
||||
SceNetInPort_t sin_vport;
|
||||
le_t<u16> sin_vport;
|
||||
char sin_zero[6];
|
||||
};
|
||||
|
||||
|
@ -28,34 +25,34 @@ struct SceNetDnsInfo
|
|||
struct SceNetSockaddr
|
||||
{
|
||||
u8 sa_len;
|
||||
SceNetSaFamily_t sa_family;
|
||||
u8 sa_family;
|
||||
char sa_data[14];
|
||||
};
|
||||
|
||||
struct SceNetEpollDataExt
|
||||
{
|
||||
s32 id;
|
||||
u32 data;
|
||||
le_t<s32> id;
|
||||
le_t<u32> data;
|
||||
};
|
||||
|
||||
union SceNetEpollData
|
||||
{
|
||||
vm::psv::ptr<void> ptr;
|
||||
s32 fd;
|
||||
u32 _u32;
|
||||
u64 _u64;
|
||||
vm::lptr<void> ptr;
|
||||
le_t<s32> fd;
|
||||
le_t<u32> _u32;
|
||||
le_t<u64> _u64;
|
||||
SceNetEpollDataExt ext;
|
||||
};
|
||||
|
||||
struct SceNetEpollSystemData
|
||||
{
|
||||
u32 system[4];
|
||||
le_t<u32> system[4];
|
||||
};
|
||||
|
||||
struct SceNetEpollEvent
|
||||
{
|
||||
u32 events;
|
||||
u32 reserved;
|
||||
le_t<u32> events;
|
||||
le_t<u32> reserved;
|
||||
SceNetEpollSystemData system;
|
||||
SceNetEpollData data;
|
||||
};
|
||||
|
@ -80,108 +77,106 @@ struct SceNetIpMreq
|
|||
|
||||
struct SceNetInitParam
|
||||
{
|
||||
vm::psv::ptr<void> memory;
|
||||
s32 size;
|
||||
s32 flags;
|
||||
vm::lptr<void> memory;
|
||||
le_t<s32> size;
|
||||
le_t<s32> flags;
|
||||
};
|
||||
|
||||
struct SceNetEmulationData
|
||||
{
|
||||
u16 drop_rate;
|
||||
u16 drop_duration;
|
||||
u16 pass_duration;
|
||||
u16 delay_time;
|
||||
u16 delay_jitter;
|
||||
u16 order_rate;
|
||||
u16 order_delay_time;
|
||||
u16 duplication_rate;
|
||||
u32 bps_limit;
|
||||
u16 lower_size_limit;
|
||||
u16 upper_size_limit;
|
||||
u32 system_policy_pattern;
|
||||
u32 game_policy_pattern;
|
||||
u16 policy_flags[64];
|
||||
le_t<u16> drop_rate;
|
||||
le_t<u16> drop_duration;
|
||||
le_t<u16> pass_duration;
|
||||
le_t<u16> delay_time;
|
||||
le_t<u16> delay_jitter;
|
||||
le_t<u16> order_rate;
|
||||
le_t<u16> order_delay_time;
|
||||
le_t<u16> duplication_rate;
|
||||
le_t<u32> bps_limit;
|
||||
le_t<u16> lower_size_limit;
|
||||
le_t<u16> upper_size_limit;
|
||||
le_t<u32> system_policy_pattern;
|
||||
le_t<u32> game_policy_pattern;
|
||||
le_t<u16> policy_flags[64];
|
||||
u8 reserved[64];
|
||||
};
|
||||
|
||||
struct SceNetEmulationParam
|
||||
{
|
||||
u16 version;
|
||||
u16 option_number;
|
||||
u16 current_version;
|
||||
u16 result;
|
||||
u32 flags;
|
||||
u32 reserved1;
|
||||
le_t<u16> version;
|
||||
le_t<u16> option_number;
|
||||
le_t<u16> current_version;
|
||||
le_t<u16> result;
|
||||
le_t<u32> flags;
|
||||
le_t<u32> reserved1;
|
||||
SceNetEmulationData send;
|
||||
SceNetEmulationData recv;
|
||||
u32 seed;
|
||||
le_t<u32> seed;
|
||||
u8 reserved[44];
|
||||
};
|
||||
|
||||
typedef vm::psv::ptr<vm::psv::ptr<void>(u32 size, s32 rid, vm::psv::ptr<const char> name, vm::psv::ptr<void> user)> SceNetResolverFunctionAllocate;
|
||||
|
||||
typedef vm::psv::ptr<void(vm::psv::ptr<void> ptr, s32 rid, vm::psv::ptr<const char> name, vm::psv::ptr<void> user)> SceNetResolverFunctionFree;
|
||||
using SceNetResolverFunctionAllocate = func_def<vm::ptr<void>(u32 size, s32 rid, vm::cptr<char> name, vm::ptr<void> user)>;
|
||||
using SceNetResolverFunctionFree = func_def<void(vm::ptr<void> ptr, s32 rid, vm::cptr<char> name, vm::ptr<void> user)>;
|
||||
|
||||
struct SceNetResolverParam
|
||||
{
|
||||
SceNetResolverFunctionAllocate allocate;
|
||||
SceNetResolverFunctionFree free;
|
||||
vm::psv::ptr<void> user;
|
||||
vm::lptr<SceNetResolverFunctionAllocate> allocate;
|
||||
vm::lptr<SceNetResolverFunctionFree> free;
|
||||
vm::lptr<void> user;
|
||||
};
|
||||
|
||||
struct SceNetLinger
|
||||
{
|
||||
s32 l_onoff;
|
||||
s32 l_linger;
|
||||
le_t<s32> l_onoff;
|
||||
le_t<s32> l_linger;
|
||||
};
|
||||
|
||||
struct SceNetIovec
|
||||
{
|
||||
vm::psv::ptr<void> iov_base;
|
||||
u32 iov_len;
|
||||
vm::lptr<void> iov_base;
|
||||
le_t<u32> iov_len;
|
||||
};
|
||||
|
||||
struct SceNetMsghdr
|
||||
{
|
||||
vm::psv::ptr<void> msg_name;
|
||||
SceNetSocklen_t msg_namelen;
|
||||
vm::psv::ptr<SceNetIovec> msg_iov;
|
||||
s32 msg_iovlen;
|
||||
vm::psv::ptr<void> msg_control;
|
||||
SceNetSocklen_t msg_controllen;
|
||||
s32 msg_flags;
|
||||
vm::lptr<void> msg_name;
|
||||
le_t<u32> msg_namelen;
|
||||
vm::lptr<SceNetIovec> msg_iov;
|
||||
le_t<s32> msg_iovlen;
|
||||
vm::lptr<void> msg_control;
|
||||
le_t<u32> msg_controllen;
|
||||
le_t<s32> msg_flags;
|
||||
};
|
||||
|
||||
struct SceNetSockInfo
|
||||
{
|
||||
char name[32];
|
||||
s32 pid;
|
||||
s32 s;
|
||||
le_t<s32> pid;
|
||||
le_t<s32> s;
|
||||
s8 socket_type;
|
||||
s8 policy;
|
||||
s16 reserved16;
|
||||
s32 recv_queue_length;
|
||||
s32 send_queue_length;
|
||||
le_t<s16> reserved16;
|
||||
le_t<s32> recv_queue_length;
|
||||
le_t<s32> send_queue_length;
|
||||
SceNetInAddr local_adr;
|
||||
SceNetInAddr remote_adr;
|
||||
SceNetInPort_t local_port;
|
||||
SceNetInPort_t remote_port;
|
||||
SceNetInPort_t local_vport;
|
||||
SceNetInPort_t remote_vport;
|
||||
s32 state;
|
||||
s32 flags;
|
||||
s32 reserved[8];
|
||||
le_t<u16> local_port;
|
||||
le_t<u16> remote_port;
|
||||
le_t<u16> local_vport;
|
||||
le_t<u16> remote_vport;
|
||||
le_t<s32> state;
|
||||
le_t<s32> flags;
|
||||
le_t<s32> reserved[8];
|
||||
};
|
||||
|
||||
struct SceNetStatisticsInfo
|
||||
{
|
||||
s32 kernel_mem_free_size;
|
||||
s32 kernel_mem_free_min;
|
||||
s32 packet_count;
|
||||
s32 packet_qos_count;
|
||||
s32 libnet_mem_free_size;
|
||||
s32 libnet_mem_free_min;
|
||||
le_t<s32> kernel_mem_free_size;
|
||||
le_t<s32> kernel_mem_free_min;
|
||||
le_t<s32> packet_count;
|
||||
le_t<s32> packet_qos_count;
|
||||
le_t<s32> libnet_mem_free_size;
|
||||
le_t<s32> libnet_mem_free_min;
|
||||
};
|
||||
|
||||
|
||||
extern psv_log_base sceNet;
|
||||
|
|
|
@ -2,130 +2,86 @@
|
|||
#include "Emu/System.h"
|
||||
#include "Emu/ARMv7/PSVFuncList.h"
|
||||
|
||||
#include "sceNet.h"
|
||||
|
||||
extern psv_log_base sceNetCtl;
|
||||
|
||||
union SceNetCtlInfo
|
||||
{
|
||||
char cnf_name[65];
|
||||
u32 device;
|
||||
SceNetEtherAddr ether_addr;
|
||||
u32 mtu;
|
||||
u32 link;
|
||||
SceNetEtherAddr bssid;
|
||||
char ssid[33];
|
||||
u32 wifi_security;
|
||||
u32 rssi_dbm;
|
||||
u32 rssi_percentage;
|
||||
u32 channel;
|
||||
u32 ip_config;
|
||||
char dhcp_hostname[256];
|
||||
char pppoe_auth_name[128];
|
||||
char ip_address[16];
|
||||
char netmask[16];
|
||||
char default_route[16];
|
||||
char primary_dns[16];
|
||||
char secondary_dns[16];
|
||||
u32 http_proxy_config;
|
||||
char http_proxy_server[256];
|
||||
u32 http_proxy_port;
|
||||
};
|
||||
|
||||
struct SceNetCtlNatInfo
|
||||
{
|
||||
u32 size;
|
||||
s32 stun_status;
|
||||
s32 nat_type;
|
||||
SceNetInAddr mapped_addr;
|
||||
};
|
||||
|
||||
struct SceNetCtlAdhocPeerInfo
|
||||
{
|
||||
vm::psv::ptr<SceNetCtlAdhocPeerInfo> next;
|
||||
SceNetInAddr inet_addr;
|
||||
};
|
||||
|
||||
typedef vm::psv::ptr<void(s32 event_type, vm::psv::ptr<void> arg)> SceNetCtlCallback;
|
||||
#include "sceNetCtl.h"
|
||||
|
||||
s32 sceNetCtlInit()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
void sceNetCtlTerm()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNetCtlCheckCallback()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNetCtlInetGetResult(s32 eventType, vm::psv::ptr<s32> errorCode)
|
||||
s32 sceNetCtlInetGetResult(s32 eventType, vm::ptr<s32> errorCode)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNetCtlAdhocGetResult(s32 eventType, vm::psv::ptr<s32> errorCode)
|
||||
s32 sceNetCtlAdhocGetResult(s32 eventType, vm::ptr<s32> errorCode)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNetCtlInetGetInfo(s32 code, vm::psv::ptr<SceNetCtlInfo> info)
|
||||
s32 sceNetCtlInetGetInfo(s32 code, vm::ptr<SceNetCtlInfo> info)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNetCtlInetGetState(vm::psv::ptr<s32> state)
|
||||
s32 sceNetCtlInetGetState(vm::ptr<s32> state)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNetCtlGetNatInfo(vm::psv::ptr<SceNetCtlNatInfo> natinfo)
|
||||
s32 sceNetCtlGetNatInfo(vm::ptr<SceNetCtlNatInfo> natinfo)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNetCtlInetRegisterCallback(SceNetCtlCallback func, vm::psv::ptr<void> arg, vm::psv::ptr<s32> cid)
|
||||
s32 sceNetCtlInetRegisterCallback(vm::ptr<SceNetCtlCallback> func, vm::ptr<void> arg, vm::ptr<s32> cid)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNetCtlInetUnregisterCallback(s32 cid)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNetCtlAdhocRegisterCallback(SceNetCtlCallback func, vm::psv::ptr<void> arg, vm::psv::ptr<s32> cid)
|
||||
s32 sceNetCtlAdhocRegisterCallback(vm::ptr<SceNetCtlCallback> func, vm::ptr<void> arg, vm::ptr<s32> cid)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNetCtlAdhocUnregisterCallback(s32 cid)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNetCtlAdhocGetState(vm::psv::ptr<s32> state)
|
||||
s32 sceNetCtlAdhocGetState(vm::ptr<s32> state)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNetCtlAdhocDisconnect()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNetCtlAdhocGetPeerList(vm::psv::ptr<u32> buflen, vm::psv::ptr<void> buf)
|
||||
s32 sceNetCtlAdhocGetPeerList(vm::ptr<u32> buflen, vm::ptr<void> buf)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNetCtlAdhocGetInAddr(vm::psv::ptr<SceNetInAddr> inaddr)
|
||||
s32 sceNetCtlAdhocGetInAddr(vm::ptr<SceNetInAddr> inaddr)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
#define REG_FUNC(nid, name) reg_psv_func(nid, &sceNetCtl, #name, name)
|
||||
|
@ -135,6 +91,7 @@ psv_log_base sceNetCtl("SceNetCtl", []()
|
|||
sceNetCtl.on_load = nullptr;
|
||||
sceNetCtl.on_unload = nullptr;
|
||||
sceNetCtl.on_stop = nullptr;
|
||||
sceNetCtl.on_error = nullptr;
|
||||
|
||||
REG_FUNC(0x495CA1DB, sceNetCtlInit);
|
||||
REG_FUNC(0xCD188648, sceNetCtlTerm);
|
||||
|
|
47
rpcs3/Emu/ARMv7/Modules/sceNetCtl.h
Normal file
47
rpcs3/Emu/ARMv7/Modules/sceNetCtl.h
Normal file
|
@ -0,0 +1,47 @@
|
|||
#pragma once
|
||||
|
||||
#include "sceNet.h"
|
||||
|
||||
union SceNetCtlInfo
|
||||
{
|
||||
char cnf_name[65];
|
||||
le_t<u32> device;
|
||||
SceNetEtherAddr ether_addr;
|
||||
le_t<u32> mtu;
|
||||
le_t<u32> link;
|
||||
SceNetEtherAddr bssid;
|
||||
char ssid[33];
|
||||
le_t<u32> wifi_security;
|
||||
le_t<u32> rssi_dbm;
|
||||
le_t<u32> rssi_percentage;
|
||||
le_t<u32> channel;
|
||||
le_t<u32> ip_config;
|
||||
char dhcp_hostname[256];
|
||||
char pppoe_auth_name[128];
|
||||
char ip_address[16];
|
||||
char netmask[16];
|
||||
char default_route[16];
|
||||
char primary_dns[16];
|
||||
char secondary_dns[16];
|
||||
le_t<u32> http_proxy_config;
|
||||
char http_proxy_server[256];
|
||||
le_t<u32> http_proxy_port;
|
||||
};
|
||||
|
||||
struct SceNetCtlNatInfo
|
||||
{
|
||||
le_t<u32> size;
|
||||
le_t<s32> stun_status;
|
||||
le_t<s32> nat_type;
|
||||
SceNetInAddr mapped_addr;
|
||||
};
|
||||
|
||||
struct SceNetCtlAdhocPeerInfo
|
||||
{
|
||||
vm::lptr<SceNetCtlAdhocPeerInfo> next;
|
||||
SceNetInAddr inet_addr;
|
||||
};
|
||||
|
||||
using SceNetCtlCallback = func_def<void(s32 event_type, vm::ptr<void> arg)>;
|
||||
|
||||
extern psv_log_base sceNetCtl;
|
|
@ -2,430 +2,321 @@
|
|||
#include "Emu/System.h"
|
||||
#include "Emu/ARMv7/PSVFuncList.h"
|
||||
|
||||
extern psv_log_base sceNgs;
|
||||
#include "sceNgs.h"
|
||||
|
||||
struct SceNgsVoiceDefinition;
|
||||
|
||||
typedef u32 SceNgsModuleID;
|
||||
typedef u32 SceNgsParamsID;
|
||||
typedef vm::psv::ptr<void> SceNgsHVoice;
|
||||
typedef vm::psv::ptr<void> SceNgsHPatch;
|
||||
typedef vm::psv::ptr<void> SceNgsHSynSystem;
|
||||
typedef vm::psv::ptr<void> SceNgsHRack;
|
||||
|
||||
struct SceNgsModuleParamHeader
|
||||
s32 sceNgsSystemGetRequiredMemorySize(vm::cptr<SceNgsSystemInitParams> pSynthParams, vm::ptr<u32> pnSize)
|
||||
{
|
||||
s32 moduleId;
|
||||
s32 chan;
|
||||
};
|
||||
|
||||
struct SceNgsParamsDescriptor
|
||||
{
|
||||
SceNgsParamsID id;
|
||||
u32 size;
|
||||
};
|
||||
|
||||
struct SceNgsBufferInfo
|
||||
{
|
||||
vm::psv::ptr<void> data;
|
||||
u32 size;
|
||||
};
|
||||
|
||||
struct SceNgsVoicePreset
|
||||
{
|
||||
s32 nNameOffset;
|
||||
u32 uNameLength;
|
||||
s32 nPresetDataOffset;
|
||||
u32 uSizePresetData;
|
||||
s32 nBypassFlagsOffset;
|
||||
u32 uNumBypassFlags;
|
||||
};
|
||||
|
||||
struct SceNgsSystemInitParams
|
||||
{
|
||||
s32 nMaxRacks;
|
||||
s32 nMaxVoices;
|
||||
s32 nGranularity;
|
||||
s32 nSampleRate;
|
||||
s32 nMaxModules;
|
||||
};
|
||||
|
||||
struct SceNgsRackDescription
|
||||
{
|
||||
vm::psv::ptr<const SceNgsVoiceDefinition> pVoiceDefn;
|
||||
s32 nVoices;
|
||||
s32 nChannelsPerVoice;
|
||||
s32 nMaxPatchesPerInput;
|
||||
s32 nPatchesPerOutput;
|
||||
vm::psv::ptr<void> pUserReleaseData;
|
||||
};
|
||||
|
||||
struct SceNgsPatchSetupInfo
|
||||
{
|
||||
SceNgsHVoice hVoiceSource;
|
||||
s32 nSourceOutputIndex;
|
||||
s32 nSourceOutputSubIndex;
|
||||
SceNgsHVoice hVoiceDestination;
|
||||
s32 nTargetInputIndex;
|
||||
};
|
||||
|
||||
struct SceNgsVolumeMatrix
|
||||
{
|
||||
float m[2][2];
|
||||
};
|
||||
|
||||
struct SceNgsPatchRouteInfo
|
||||
{
|
||||
s32 nOutputChannels;
|
||||
s32 nInputChannels;
|
||||
SceNgsVolumeMatrix vols;
|
||||
};
|
||||
|
||||
struct SceNgsVoiceInfo
|
||||
{
|
||||
u32 uVoiceState;
|
||||
u32 uNumModules;
|
||||
u32 uNumInputs;
|
||||
u32 uNumOutputs;
|
||||
u32 uNumPatchesPerOutput;
|
||||
};
|
||||
|
||||
struct SceNgsCallbackInfo
|
||||
{
|
||||
SceNgsHVoice hVoiceHandle;
|
||||
SceNgsHRack hRackHandle;
|
||||
SceNgsModuleID uModuleID;
|
||||
s32 nCallbackData;
|
||||
s32 nCallbackData2;
|
||||
vm::psv::ptr<void> pCallbackPtr;
|
||||
vm::psv::ptr<void> pUserData;
|
||||
};
|
||||
|
||||
typedef vm::psv::ptr<void(vm::psv::ptr<const SceNgsCallbackInfo> pCallbackInfo)> SceNgsCallbackFunc;
|
||||
|
||||
typedef SceNgsCallbackFunc SceNgsRackReleaseCallbackFunc;
|
||||
typedef SceNgsCallbackFunc SceNgsModuleCallbackFunc;
|
||||
typedef SceNgsCallbackFunc SceNgsParamsErrorCallbackFunc;
|
||||
|
||||
struct SceSulphaNgsConfig
|
||||
{
|
||||
u32 maxNamedObjects;
|
||||
u32 maxTraceBufferBytes;
|
||||
};
|
||||
|
||||
s32 sceNgsSystemGetRequiredMemorySize(vm::psv::ptr<const SceNgsSystemInitParams> pSynthParams, vm::psv::ptr<u32> pnSize)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNgsSystemInit(vm::psv::ptr<void> pSynthSysMemory, const u32 uMemSize, vm::psv::ptr<const SceNgsSystemInitParams> pSynthParams, vm::psv::ptr<SceNgsHSynSystem> pSystemHandle)
|
||||
s32 sceNgsSystemInit(vm::ptr<void> pSynthSysMemory, const u32 uMemSize, vm::cptr<SceNgsSystemInitParams> pSynthParams, vm::ptr<SceNgsHSynSystem> pSystemHandle)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNgsSystemUpdate(SceNgsHSynSystem hSystemHandle)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNgsSystemRelease(SceNgsHSynSystem hSystemHandle)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNgsSystemLock(SceNgsHSynSystem hSystemHandle)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNgsSystemUnlock(SceNgsHSynSystem hSystemHandle)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNgsSystemSetParamErrorCallback(SceNgsHSynSystem hSystemHandle, const SceNgsParamsErrorCallbackFunc callbackFuncPtr)
|
||||
s32 sceNgsSystemSetParamErrorCallback(SceNgsHSynSystem hSystemHandle, vm::ptr<SceNgsCallbackFunc> callbackFuncPtr)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNgsSystemSetFlags(SceNgsHSynSystem hSystemHandle, const u32 uSystemFlags)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNgsRackGetRequiredMemorySize(SceNgsHSynSystem hSystemHandle, vm::psv::ptr<const SceNgsRackDescription> pRackDesc, vm::psv::ptr<u32> pnSize)
|
||||
s32 sceNgsRackGetRequiredMemorySize(SceNgsHSynSystem hSystemHandle, vm::cptr<SceNgsRackDescription> pRackDesc, vm::ptr<u32> pnSize)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNgsRackInit(SceNgsHSynSystem hSystemHandle, vm::psv::ptr<SceNgsBufferInfo> pRackBuffer, vm::psv::ptr<const SceNgsRackDescription> pRackDesc, vm::psv::ptr<SceNgsHRack> pRackHandle)
|
||||
s32 sceNgsRackInit(SceNgsHSynSystem hSystemHandle, vm::ptr<SceNgsBufferInfo> pRackBuffer, vm::cptr<SceNgsRackDescription> pRackDesc, vm::ptr<SceNgsHRack> pRackHandle)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNgsRackGetVoiceHandle(SceNgsHRack hRackHandle, const u32 uIndex, vm::psv::ptr<SceNgsHVoice> pVoiceHandle)
|
||||
s32 sceNgsRackGetVoiceHandle(SceNgsHRack hRackHandle, const u32 uIndex, vm::ptr<SceNgsHVoice> pVoiceHandle)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNgsRackRelease(SceNgsHRack hRackHandle, const SceNgsRackReleaseCallbackFunc callbackFuncPtr)
|
||||
s32 sceNgsRackRelease(SceNgsHRack hRackHandle, vm::ptr<SceNgsCallbackFunc> callbackFuncPtr)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNgsRackSetParamErrorCallback(SceNgsHRack hRackHandle, const SceNgsParamsErrorCallbackFunc callbackFuncPtr)
|
||||
s32 sceNgsRackSetParamErrorCallback(SceNgsHRack hRackHandle, vm::ptr<SceNgsCallbackFunc> callbackFuncPtr)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNgsVoiceInit(SceNgsHVoice hVoiceHandle, vm::psv::ptr<const SceNgsVoicePreset> pPreset, const u32 uInitFlags)
|
||||
s32 sceNgsVoiceInit(SceNgsHVoice hVoiceHandle, vm::cptr<SceNgsVoicePreset> pPreset, const u32 uInitFlags)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNgsVoicePlay(SceNgsHVoice hVoiceHandle)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNgsVoiceKeyOff(SceNgsHVoice hVoiceHandle)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNgsVoiceKill(SceNgsHVoice hVoiceHandle)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNgsVoicePause(SceNgsHVoice hVoiceHandle)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNgsVoiceResume(SceNgsHVoice hVoiceHandle)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNgsVoiceSetPreset(SceNgsHVoice hVoiceHandle, vm::psv::ptr<const SceNgsVoicePreset> pVoicePreset)
|
||||
s32 sceNgsVoiceSetPreset(SceNgsHVoice hVoiceHandle, vm::cptr<SceNgsVoicePreset> pVoicePreset)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNgsVoiceLockParams(SceNgsHVoice hVoiceHandle, const u32 uModule, const SceNgsParamsID uParamsInterfaceId, vm::psv::ptr<SceNgsBufferInfo> pParamsBuffer)
|
||||
s32 sceNgsVoiceLockParams(SceNgsHVoice hVoiceHandle, const u32 uModule, const u32 uParamsInterfaceId, vm::ptr<SceNgsBufferInfo> pParamsBuffer)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNgsVoiceUnlockParams(SceNgsHVoice hVoiceHandle, const u32 uModule)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNgsVoiceSetParamsBlock(SceNgsHVoice hVoiceHandle, vm::psv::ptr<const SceNgsModuleParamHeader> pParamData, const u32 uSize, vm::psv::ptr<s32> pnErrorCount)
|
||||
s32 sceNgsVoiceSetParamsBlock(SceNgsHVoice hVoiceHandle, vm::cptr<SceNgsModuleParamHeader> pParamData, const u32 uSize, vm::ptr<s32> pnErrorCount)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNgsVoiceBypassModule(SceNgsHVoice hVoiceHandle, const u32 uModule, const u32 uBypassFlag)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNgsVoiceSetModuleCallback(SceNgsHVoice hVoiceHandle, const u32 uModule, const SceNgsModuleCallbackFunc callbackFuncPtr, vm::psv::ptr<void> pUserData)
|
||||
s32 sceNgsVoiceSetModuleCallback(SceNgsHVoice hVoiceHandle, const u32 uModule, vm::ptr<SceNgsCallbackFunc> callbackFuncPtr, vm::ptr<void> pUserData)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNgsVoiceSetFinishedCallback(SceNgsHVoice hVoiceHandle, const SceNgsCallbackFunc callbackFuncPtr, vm::psv::ptr<void> pUserData)
|
||||
s32 sceNgsVoiceSetFinishedCallback(SceNgsHVoice hVoiceHandle, vm::ptr<SceNgsCallbackFunc> callbackFuncPtr, vm::ptr<void> pUserData)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNgsVoiceGetStateData(SceNgsHVoice hVoiceHandle, const u32 uModule, vm::psv::ptr<void> pMem, const u32 uMemSize)
|
||||
s32 sceNgsVoiceGetStateData(SceNgsHVoice hVoiceHandle, const u32 uModule, vm::ptr<void> pMem, const u32 uMemSize)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNgsVoiceGetInfo(SceNgsHVoice hVoiceHandle, vm::psv::ptr<SceNgsVoiceInfo> pInfo)
|
||||
s32 sceNgsVoiceGetInfo(SceNgsHVoice hVoiceHandle, vm::ptr<SceNgsVoiceInfo> pInfo)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNgsVoiceGetModuleType(SceNgsHVoice hVoiceHandle, const u32 uModule, vm::psv::ptr<SceNgsModuleID> pModuleType)
|
||||
s32 sceNgsVoiceGetModuleType(SceNgsHVoice hVoiceHandle, const u32 uModule, vm::ptr<u32> pModuleType)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNgsVoiceGetModuleBypass(SceNgsHVoice hVoiceHandle, const u32 uModule, vm::psv::ptr<u32> puBypassFlag)
|
||||
s32 sceNgsVoiceGetModuleBypass(SceNgsHVoice hVoiceHandle, const u32 uModule, vm::ptr<u32> puBypassFlag)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNgsVoiceGetParamsOutOfRange(SceNgsHVoice hVoiceHandle, const u32 uModule, vm::psv::ptr<char> pszMessageBuffer)
|
||||
s32 sceNgsVoiceGetParamsOutOfRange(SceNgsHVoice hVoiceHandle, const u32 uModule, vm::ptr<char> pszMessageBuffer)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNgsPatchCreateRouting(vm::psv::ptr<const SceNgsPatchSetupInfo> pPatchInfo, vm::psv::ptr<SceNgsHPatch> pPatchHandle)
|
||||
s32 sceNgsPatchCreateRouting(vm::cptr<SceNgsPatchSetupInfo> pPatchInfo, vm::ptr<SceNgsHPatch> pPatchHandle)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNgsPatchGetInfo(SceNgsHPatch hPatchHandle, vm::psv::ptr<SceNgsPatchRouteInfo> pRouteInfo, vm::psv::ptr<SceNgsPatchSetupInfo> pSetup)
|
||||
s32 sceNgsPatchGetInfo(SceNgsHPatch hPatchHandle, vm::ptr<SceNgsPatchRouteInfo> pRouteInfo, vm::ptr<SceNgsPatchSetupInfo> pSetup)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNgsVoiceGetOutputPatch(SceNgsHVoice hVoiceHandle, const s32 nOutputIndex, const s32 nSubIndex, vm::psv::ptr<SceNgsHPatch> pPatchHandle)
|
||||
s32 sceNgsVoiceGetOutputPatch(SceNgsHVoice hVoiceHandle, const s32 nOutputIndex, const s32 nSubIndex, vm::ptr<SceNgsHPatch> pPatchHandle)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNgsPatchRemoveRouting(SceNgsHPatch hPatchHandle)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
//s32 sceNgsVoicePatchSetVolume(SceNgsHPatch hPatchHandle, const s32 nOutputChannel, const s32 nInputChannel, const float fVol)
|
||||
//{
|
||||
// throw __FUNCTION__;
|
||||
//}
|
||||
|
||||
s32 sceNgsVoicePatchSetVolumes(SceNgsHPatch hPatchHandle, const s32 nOutputChannel, vm::psv::ptr<const float> pVolumes, const s32 nVols)
|
||||
s32 sceNgsVoicePatchSetVolume(SceNgsHPatch hPatchHandle, const s32 nOutputChannel, const s32 nInputChannel, const float fVol)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNgsVoicePatchSetVolumesMatrix(SceNgsHPatch hPatchHandle, vm::psv::ptr<const SceNgsVolumeMatrix> pMatrix)
|
||||
s32 sceNgsVoicePatchSetVolumes(SceNgsHPatch hPatchHandle, const s32 nOutputChannel, vm::cptr<float> pVolumes, const s32 nVols)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNgsModuleGetNumPresets(SceNgsHSynSystem hSystemHandle, const SceNgsModuleID uModuleID, vm::psv::ptr<u32> puNumPresets)
|
||||
s32 sceNgsVoicePatchSetVolumesMatrix(SceNgsHPatch hPatchHandle, vm::cptr<SceNgsVolumeMatrix> pMatrix)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNgsModuleGetPreset(SceNgsHSynSystem hSystemHandle, const SceNgsModuleID uModuleID, const u32 uPresetIndex, vm::psv::ptr<SceNgsBufferInfo> pParamsBuffer)
|
||||
s32 sceNgsModuleGetNumPresets(SceNgsHSynSystem hSystemHandle, const u32 uModuleID, vm::ptr<u32> puNumPresets)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
vm::psv::ptr<const SceNgsVoiceDefinition> sceNgsVoiceDefGetCompressorBuss()
|
||||
s32 sceNgsModuleGetPreset(SceNgsHSynSystem hSystemHandle, const u32 uModuleID, const u32 uPresetIndex, vm::ptr<SceNgsBufferInfo> pParamsBuffer)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
vm::psv::ptr<const SceNgsVoiceDefinition> sceNgsVoiceDefGetCompressorSideChainBuss()
|
||||
vm::cptr<SceNgsVoiceDefinition> sceNgsVoiceDefGetCompressorBuss()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
vm::psv::ptr<const SceNgsVoiceDefinition> sceNgsVoiceDefGetDelayBuss()
|
||||
vm::cptr<SceNgsVoiceDefinition> sceNgsVoiceDefGetCompressorSideChainBuss()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
vm::psv::ptr<const SceNgsVoiceDefinition> sceNgsVoiceDefGetDistortionBuss()
|
||||
vm::cptr<SceNgsVoiceDefinition> sceNgsVoiceDefGetDelayBuss()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
vm::psv::ptr<const SceNgsVoiceDefinition> sceNgsVoiceDefGetEnvelopeBuss()
|
||||
vm::cptr<SceNgsVoiceDefinition> sceNgsVoiceDefGetDistortionBuss()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
vm::psv::ptr<const SceNgsVoiceDefinition> sceNgsVoiceDefGetEqBuss()
|
||||
vm::cptr<SceNgsVoiceDefinition> sceNgsVoiceDefGetEnvelopeBuss()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
vm::psv::ptr<const SceNgsVoiceDefinition> sceNgsVoiceDefGetMasterBuss()
|
||||
vm::cptr<SceNgsVoiceDefinition> sceNgsVoiceDefGetEqBuss()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
vm::psv::ptr<const SceNgsVoiceDefinition> sceNgsVoiceDefGetMixerBuss()
|
||||
vm::cptr<SceNgsVoiceDefinition> sceNgsVoiceDefGetMasterBuss()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
vm::psv::ptr<const SceNgsVoiceDefinition> sceNgsVoiceDefGetPauserBuss()
|
||||
vm::cptr<SceNgsVoiceDefinition> sceNgsVoiceDefGetMixerBuss()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
vm::psv::ptr<const SceNgsVoiceDefinition> sceNgsVoiceDefGetReverbBuss()
|
||||
vm::cptr<SceNgsVoiceDefinition> sceNgsVoiceDefGetPauserBuss()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
vm::psv::ptr<const SceNgsVoiceDefinition> sceNgsVoiceDefGetSasEmuVoice()
|
||||
vm::cptr<SceNgsVoiceDefinition> sceNgsVoiceDefGetReverbBuss()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
vm::psv::ptr<const SceNgsVoiceDefinition> sceNgsVoiceDefGetSimpleVoice()
|
||||
vm::cptr<SceNgsVoiceDefinition> sceNgsVoiceDefGetSasEmuVoice()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
vm::psv::ptr<const SceNgsVoiceDefinition> sceNgsVoiceDefGetTemplate1()
|
||||
vm::cptr<SceNgsVoiceDefinition> sceNgsVoiceDefGetSimpleVoice()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
vm::psv::ptr<const SceNgsVoiceDefinition> sceNgsVoiceDefGetAtrac9Voice()
|
||||
vm::cptr<SceNgsVoiceDefinition> sceNgsVoiceDefGetTemplate1()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceSulphaNgsGetDefaultConfig(vm::psv::ptr<SceSulphaNgsConfig> config)
|
||||
vm::cptr<SceNgsVoiceDefinition> sceNgsVoiceDefGetAtrac9Voice()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceSulphaNgsGetNeededMemory(vm::psv::ptr<const SceSulphaNgsConfig> config, vm::psv::ptr<u32> sizeInBytes)
|
||||
s32 sceSulphaNgsGetDefaultConfig(vm::ptr<SceSulphaNgsConfig> config)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceSulphaNgsInit(vm::psv::ptr<const SceSulphaNgsConfig> config, vm::psv::ptr<void> buffer, u32 sizeInBytes)
|
||||
s32 sceSulphaNgsGetNeededMemory(vm::cptr<SceSulphaNgsConfig> config, vm::ptr<u32> sizeInBytes)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceSulphaNgsInit(vm::cptr<SceSulphaNgsConfig> config, vm::ptr<void> buffer, u32 sizeInBytes)
|
||||
{
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceSulphaNgsShutdown()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceSulphaNgsSetSynthName(SceNgsHSynSystem synthHandle, vm::psv::ptr<const char> name)
|
||||
s32 sceSulphaNgsSetSynthName(SceNgsHSynSystem synthHandle, vm::cptr<char> name)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceSulphaNgsSetRackName(SceNgsHRack rackHandle, vm::psv::ptr<const char> name)
|
||||
s32 sceSulphaNgsSetRackName(SceNgsHRack rackHandle, vm::cptr<char> name)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceSulphaNgsSetVoiceName(SceNgsHVoice voiceHandle, vm::psv::ptr<const char> name)
|
||||
s32 sceSulphaNgsSetVoiceName(SceNgsHVoice voiceHandle, vm::cptr<char> name)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceSulphaNgsSetSampleName(vm::psv::ptr<const void> location, u32 length, vm::psv::ptr<const char> name)
|
||||
s32 sceSulphaNgsSetSampleName(vm::cptr<void> location, u32 length, vm::cptr<char> name)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceSulphaNgsTrace(vm::psv::ptr<const char> message)
|
||||
s32 sceSulphaNgsTrace(vm::cptr<char> message)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
|
||||
|
@ -436,6 +327,7 @@ psv_log_base sceNgs("SceNgs", []()
|
|||
sceNgs.on_load = nullptr;
|
||||
sceNgs.on_unload = nullptr;
|
||||
sceNgs.on_stop = nullptr;
|
||||
sceNgs.on_error = nullptr;
|
||||
|
||||
REG_FUNC(0x6CE8B36F, sceNgsSystemGetRequiredMemorySize);
|
||||
REG_FUNC(0xED14CF4A, sceNgsSystemInit);
|
||||
|
|
106
rpcs3/Emu/ARMv7/Modules/sceNgs.h
Normal file
106
rpcs3/Emu/ARMv7/Modules/sceNgs.h
Normal file
|
@ -0,0 +1,106 @@
|
|||
#pragma once
|
||||
|
||||
struct SceNgsVoiceDefinition;
|
||||
|
||||
using SceNgsHVoice = vm::ptr<void>;
|
||||
using SceNgsHPatch = vm::ptr<void>;
|
||||
using SceNgsHSynSystem = vm::ptr<void>;
|
||||
using SceNgsHRack = vm::ptr<void>;
|
||||
|
||||
struct SceNgsModuleParamHeader
|
||||
{
|
||||
le_t<s32> moduleId;
|
||||
le_t<s32> chan;
|
||||
};
|
||||
|
||||
struct SceNgsParamsDescriptor
|
||||
{
|
||||
le_t<u32> id;
|
||||
le_t<u32> size;
|
||||
};
|
||||
|
||||
struct SceNgsBufferInfo
|
||||
{
|
||||
vm::lptr<void> data;
|
||||
le_t<u32> size;
|
||||
};
|
||||
|
||||
struct SceNgsVoicePreset
|
||||
{
|
||||
le_t<s32> nNameOffset;
|
||||
le_t<u32> uNameLength;
|
||||
le_t<s32> nPresetDataOffset;
|
||||
le_t<u32> uSizePresetData;
|
||||
le_t<s32> nBypassFlagsOffset;
|
||||
le_t<u32> uNumBypassFlags;
|
||||
};
|
||||
|
||||
struct SceNgsSystemInitParams
|
||||
{
|
||||
le_t<s32> nMaxRacks;
|
||||
le_t<s32> nMaxVoices;
|
||||
le_t<s32> nGranularity;
|
||||
le_t<s32> nSampleRate;
|
||||
le_t<s32> nMaxModules;
|
||||
};
|
||||
|
||||
struct SceNgsRackDescription
|
||||
{
|
||||
vm::lcptr<SceNgsVoiceDefinition> pVoiceDefn;
|
||||
le_t<s32> nVoices;
|
||||
le_t<s32> nChannelsPerVoice;
|
||||
le_t<s32> nMaxPatchesPerInput;
|
||||
le_t<s32> nPatchesPerOutput;
|
||||
vm::lptr<void> pUserReleaseData;
|
||||
};
|
||||
|
||||
struct SceNgsPatchSetupInfo
|
||||
{
|
||||
SceNgsHVoice hVoiceSource;
|
||||
le_t<s32> nSourceOutputIndex;
|
||||
le_t<s32> nSourceOutputSubIndex;
|
||||
SceNgsHVoice hVoiceDestination;
|
||||
le_t<s32> nTargetInputIndex;
|
||||
};
|
||||
|
||||
struct SceNgsVolumeMatrix
|
||||
{
|
||||
le_t<float> m[2][2];
|
||||
};
|
||||
|
||||
struct SceNgsPatchRouteInfo
|
||||
{
|
||||
le_t<s32> nOutputChannels;
|
||||
le_t<s32> nInputChannels;
|
||||
SceNgsVolumeMatrix vols;
|
||||
};
|
||||
|
||||
struct SceNgsVoiceInfo
|
||||
{
|
||||
le_t<u32> uVoiceState;
|
||||
le_t<u32> uNumModules;
|
||||
le_t<u32> uNumInputs;
|
||||
le_t<u32> uNumOutputs;
|
||||
le_t<u32> uNumPatchesPerOutput;
|
||||
};
|
||||
|
||||
struct SceNgsCallbackInfo
|
||||
{
|
||||
SceNgsHVoice hVoiceHandle;
|
||||
SceNgsHRack hRackHandle;
|
||||
le_t<u32> uModuleID;
|
||||
le_t<s32> nCallbackData;
|
||||
le_t<s32> nCallbackData2;
|
||||
vm::lptr<void> pCallbackPtr;
|
||||
vm::lptr<void> pUserData;
|
||||
};
|
||||
|
||||
using SceNgsCallbackFunc = func_def<void(vm::cptr<SceNgsCallbackInfo> pCallbackInfo)>;
|
||||
|
||||
struct SceSulphaNgsConfig
|
||||
{
|
||||
le_t<u32> maxNamedObjects;
|
||||
le_t<u32> maxTraceBufferBytes;
|
||||
};
|
||||
|
||||
extern psv_log_base sceNgs;
|
|
@ -2,210 +2,96 @@
|
|||
#include "Emu/System.h"
|
||||
#include "Emu/ARMv7/PSVFuncList.h"
|
||||
|
||||
#include "sceNpCommon.h"
|
||||
#include "sceNpBasic.h"
|
||||
|
||||
extern psv_log_base sceNpBasic;
|
||||
|
||||
enum SceNpBasicFriendListEventType : s32
|
||||
s32 sceNpBasicInit(vm::ptr<void> opt)
|
||||
{
|
||||
SCE_NP_BASIC_FRIEND_LIST_EVENT_TYPE_SYNC = 1,
|
||||
SCE_NP_BASIC_FRIEND_LIST_EVENT_TYPE_SYNC_DONE = 2,
|
||||
SCE_NP_BASIC_FRIEND_LIST_EVENT_TYPE_ADDED = 3,
|
||||
SCE_NP_BASIC_FRIEND_LIST_EVENT_TYPE_DELETED = 4
|
||||
};
|
||||
|
||||
typedef vm::psv::ptr<void(SceNpBasicFriendListEventType eventType, vm::psv::ptr<const SceNpId> friendId, vm::psv::ptr<void> userdata)> SceNpBasicFriendListEventHandler;
|
||||
|
||||
enum SceNpBasicFriendOnlineStatusEventType : s32
|
||||
{
|
||||
SCE_NP_BASIC_FRIEND_ONLINE_STATUS_EVENT_TYPE_SYNC = 1,
|
||||
SCE_NP_BASIC_FRIEND_ONLINE_STATUS_EVENT_TYPE_SYNC_DONE = 2,
|
||||
SCE_NP_BASIC_FRIEND_ONLINE_STATUS_EVENT_TYPE_UPDATED = 3
|
||||
};
|
||||
|
||||
enum SceNpBasicFriendOnlineStatus : s32
|
||||
{
|
||||
SCE_NP_BASIC_FRIEND_ONLINE_STATUS_UNKNOWN = 0,
|
||||
SCE_NP_BASIC_FRIEND_ONLINE_STATUS_OFFLINE = 1,
|
||||
SCE_NP_BASIC_FRIEND_ONLINE_STATUS_STANDBY = 2,
|
||||
SCE_NP_BASIC_FRIEND_ONLINE_STATUS_ONLINE_OUT_OF_CONTEXT = 3,
|
||||
SCE_NP_BASIC_FRIEND_ONLINE_STATUS_ONLINE_IN_CONTEXT = 4
|
||||
};
|
||||
|
||||
typedef vm::psv::ptr<void(SceNpBasicFriendOnlineStatusEventType eventType, vm::psv::ptr<const SceNpId> friendId, SceNpBasicFriendOnlineStatus status, vm::psv::ptr<void> userdata)> SceNpBasicFriendOnlineStatusEventHandler;
|
||||
|
||||
enum SceNpBasicBlockListEventType : s32
|
||||
{
|
||||
SCE_NP_BASIC_BLOCK_LIST_EVENT_TYPE_SYNC = 1,
|
||||
SCE_NP_BASIC_BLOCK_LIST_EVENT_TYPE_SYNC_DONE = 2,
|
||||
SCE_NP_BASIC_BLOCK_LIST_EVENT_TYPE_ADDED = 3,
|
||||
SCE_NP_BASIC_BLOCK_LIST_EVENT_TYPE_DELETED = 4
|
||||
};
|
||||
|
||||
typedef vm::psv::ptr<void(SceNpBasicBlockListEventType eventType, vm::psv::ptr<const SceNpId> playerId, vm::psv::ptr<void> userdata)> SceNpBasicBlockListEventHandler;
|
||||
|
||||
enum SceNpBasicFriendGamePresenceEventType : s32
|
||||
{
|
||||
SCE_NP_BASIC_FRIEND_GAME_PRESENCE_EVENT_TYPE_SYNC = 1,
|
||||
SCE_NP_BASIC_FRIEND_GAME_PRESENCE_EVENT_TYPE_SYNC_DONE = 2,
|
||||
SCE_NP_BASIC_FRIEND_GAME_PRESENCE_EVENT_TYPE_UPDATED = 3
|
||||
};
|
||||
|
||||
enum SceNpBasicInGamePresenceType
|
||||
{
|
||||
SCE_NP_BASIC_IN_GAME_PRESENCE_TYPE_UNKNOWN = -1,
|
||||
SCE_NP_BASIC_IN_GAME_PRESENCE_TYPE_NONE = 0,
|
||||
SCE_NP_BASIC_IN_GAME_PRESENCE_TYPE_DEFAULT = 1,
|
||||
SCE_NP_BASIC_IN_GAME_PRESENCE_TYPE_JOINABLE = 2,
|
||||
SCE_NP_BASIC_IN_GAME_PRESENCE_TYPE_MAX = 3
|
||||
};
|
||||
|
||||
struct SceNpBasicInGamePresence
|
||||
{
|
||||
u32 sdkVersion;
|
||||
SceNpBasicInGamePresenceType type;
|
||||
char status[192];
|
||||
u8 data[128];
|
||||
u32 dataSize;
|
||||
};
|
||||
|
||||
struct SceNpBasicGamePresence
|
||||
{
|
||||
u32 size;
|
||||
char title[128];
|
||||
SceNpBasicInGamePresence inGamePresence;
|
||||
};
|
||||
|
||||
typedef vm::psv::ptr<void(SceNpBasicFriendGamePresenceEventType eventtype, vm::psv::ptr<const SceNpId> friendId, vm::psv::ptr<const SceNpBasicGamePresence> presence, vm::psv::ptr<void> userdata)> SceNpBasicFriendGamePresenceEventHandler;
|
||||
|
||||
struct SceNpBasicInGameDataMessage
|
||||
{
|
||||
u8 data[128];
|
||||
u32 dataSize;
|
||||
};
|
||||
|
||||
typedef vm::psv::ptr<void(vm::psv::ptr<const SceNpId> from, vm::psv::ptr<const SceNpBasicInGameDataMessage> message, vm::psv::ptr<void> userdata)> SceNpBasicInGameDataMessageEventHandler;
|
||||
|
||||
struct SceNpBasicEventHandlers
|
||||
{
|
||||
u32 sdkVersion;
|
||||
SceNpBasicFriendListEventHandler friendListEventHandler;
|
||||
SceNpBasicFriendOnlineStatusEventHandler friendOnlineStatusEventHandler;
|
||||
SceNpBasicBlockListEventHandler blockListEventHandler;
|
||||
SceNpBasicFriendGamePresenceEventHandler friendGamePresenceEventHandler;
|
||||
SceNpBasicInGameDataMessageEventHandler inGameDataMessageEventHandler;
|
||||
};
|
||||
|
||||
struct SceNpBasicPlaySessionLogDescription
|
||||
{
|
||||
char text[512];
|
||||
};
|
||||
|
||||
struct SceNpBasicPlaySessionLog
|
||||
{
|
||||
u64 date;
|
||||
SceNpId withWhom;
|
||||
SceNpCommunicationId commId;
|
||||
char title[128];
|
||||
SceNpBasicPlaySessionLogDescription description;
|
||||
};
|
||||
|
||||
enum SceNpBasicPlaySessionLogType : s32
|
||||
{
|
||||
SCE_NP_BASIC_PLAY_SESSION_LOG_TYPE_INVALID = -1,
|
||||
SCE_NP_BASIC_PLAY_SESSION_LOG_TYPE_ALL = 0,
|
||||
SCE_NP_BASIC_PLAY_SESSION_LOG_TYPE_BY_NP_COMM_ID = 1,
|
||||
SCE_NP_BASIC_PLAY_SESSION_LOG_TYPE_MAX = 2
|
||||
};
|
||||
|
||||
s32 sceNpBasicInit(vm::psv::ptr<void> opt)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNpBasicTerm(ARMv7Context&)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNpBasicRegisterHandler(vm::psv::ptr<const SceNpBasicEventHandlers> handlers, vm::psv::ptr<const SceNpCommunicationId> context, vm::psv::ptr<void> userdata)
|
||||
s32 sceNpBasicRegisterHandler(vm::cptr<SceNpBasicEventHandlers> handlers, vm::cptr<SceNpCommunicationId> context, vm::ptr<void> userdata)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNpBasicUnregisterHandler(ARMv7Context&)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNpBasicCheckCallback()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNpBasicGetFriendOnlineStatus(vm::psv::ptr<const SceNpId> friendId, vm::psv::ptr<SceNpBasicFriendOnlineStatus> status)
|
||||
s32 sceNpBasicGetFriendOnlineStatus(vm::cptr<SceNpId> friendId, vm::ptr<s32> status)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNpBasicGetGamePresenceOfFriend(vm::psv::ptr<const SceNpId> friendId, vm::psv::ptr<SceNpBasicGamePresence> presence)
|
||||
s32 sceNpBasicGetGamePresenceOfFriend(vm::cptr<SceNpId> friendId, vm::ptr<SceNpBasicGamePresence> presence)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNpBasicGetFriendListEntryCount(vm::psv::ptr<u32> count)
|
||||
s32 sceNpBasicGetFriendListEntryCount(vm::ptr<u32> count)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNpBasicGetFriendListEntries(u32 startIndex, vm::psv::ptr<SceNpId> entries, u32 numEntries, vm::psv::ptr<u32> retrieved)
|
||||
s32 sceNpBasicGetFriendListEntries(u32 startIndex, vm::ptr<SceNpId> entries, u32 numEntries, vm::ptr<u32> retrieved)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNpBasicGetBlockListEntryCount(vm::psv::ptr<u32> count)
|
||||
s32 sceNpBasicGetBlockListEntryCount(vm::ptr<u32> count)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNpBasicGetBlockListEntries(u32 startIndex, vm::psv::ptr<SceNpId> entries, u32 numEntries, vm::psv::ptr<u32> retrieved)
|
||||
s32 sceNpBasicGetBlockListEntries(u32 startIndex, vm::ptr<SceNpId> entries, u32 numEntries, vm::ptr<u32> retrieved)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNpBasicCheckIfPlayerIsBlocked(vm::psv::ptr<const SceNpId> player, vm::psv::ptr<u8> playerIsBlocked)
|
||||
s32 sceNpBasicCheckIfPlayerIsBlocked(vm::cptr<SceNpId> player, vm::ptr<u8> playerIsBlocked)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNpBasicSetInGamePresence(vm::psv::ptr<const SceNpBasicInGamePresence> presence)
|
||||
s32 sceNpBasicSetInGamePresence(vm::cptr<SceNpBasicInGamePresence> presence)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNpBasicUnsetInGamePresence()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNpBasicSendInGameDataMessage(vm::psv::ptr<const SceNpId> to, vm::psv::ptr<const SceNpBasicInGameDataMessage> message)
|
||||
s32 sceNpBasicSendInGameDataMessage(vm::cptr<SceNpId> to, vm::cptr<SceNpBasicInGameDataMessage> message)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNpBasicRecordPlaySessionLog(vm::psv::ptr<const SceNpId> withWhom, vm::psv::ptr<const SceNpBasicPlaySessionLogDescription> description)
|
||||
s32 sceNpBasicRecordPlaySessionLog(vm::cptr<SceNpId> withWhom, vm::cptr<SceNpBasicPlaySessionLogDescription> description)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNpBasicGetPlaySessionLogSize(SceNpBasicPlaySessionLogType type, vm::psv::ptr<u32> size)
|
||||
s32 sceNpBasicGetPlaySessionLogSize(SceNpBasicPlaySessionLogType type, vm::ptr<u32> size)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNpBasicGetPlaySessionLog(SceNpBasicPlaySessionLogType type, u32 index, vm::psv::ptr<SceNpBasicPlaySessionLog> log)
|
||||
s32 sceNpBasicGetPlaySessionLog(SceNpBasicPlaySessionLogType type, u32 index, vm::ptr<SceNpBasicPlaySessionLog> log)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
#define REG_FUNC(nid, name) reg_psv_func(nid, &sceNpBasic, #name, name)
|
||||
|
@ -215,6 +101,7 @@ psv_log_base sceNpBasic("SceNpBasic", []()
|
|||
sceNpBasic.on_load = nullptr;
|
||||
sceNpBasic.on_unload = nullptr;
|
||||
sceNpBasic.on_stop = nullptr;
|
||||
sceNpBasic.on_error = nullptr;
|
||||
|
||||
REG_FUNC(0xEFB91A99, sceNpBasicInit);
|
||||
REG_FUNC(0x389BCB3B, sceNpBasicTerm);
|
||||
|
|
117
rpcs3/Emu/ARMv7/Modules/sceNpBasic.h
Normal file
117
rpcs3/Emu/ARMv7/Modules/sceNpBasic.h
Normal file
|
@ -0,0 +1,117 @@
|
|||
#pragma once
|
||||
|
||||
#include "sceNpCommon.h"
|
||||
|
||||
enum SceNpBasicFriendListEventType : s32
|
||||
{
|
||||
SCE_NP_BASIC_FRIEND_LIST_EVENT_TYPE_SYNC = 1,
|
||||
SCE_NP_BASIC_FRIEND_LIST_EVENT_TYPE_SYNC_DONE = 2,
|
||||
SCE_NP_BASIC_FRIEND_LIST_EVENT_TYPE_ADDED = 3,
|
||||
SCE_NP_BASIC_FRIEND_LIST_EVENT_TYPE_DELETED = 4
|
||||
};
|
||||
|
||||
using SceNpBasicFriendListEventHandler = func_def<void(SceNpBasicFriendListEventType eventType, vm::cptr<SceNpId> friendId, vm::ptr<void> userdata)>;
|
||||
|
||||
enum SceNpBasicFriendOnlineStatusEventType : s32
|
||||
{
|
||||
SCE_NP_BASIC_FRIEND_ONLINE_STATUS_EVENT_TYPE_SYNC = 1,
|
||||
SCE_NP_BASIC_FRIEND_ONLINE_STATUS_EVENT_TYPE_SYNC_DONE = 2,
|
||||
SCE_NP_BASIC_FRIEND_ONLINE_STATUS_EVENT_TYPE_UPDATED = 3
|
||||
};
|
||||
|
||||
enum SceNpBasicFriendOnlineStatus : s32
|
||||
{
|
||||
SCE_NP_BASIC_FRIEND_ONLINE_STATUS_UNKNOWN = 0,
|
||||
SCE_NP_BASIC_FRIEND_ONLINE_STATUS_OFFLINE = 1,
|
||||
SCE_NP_BASIC_FRIEND_ONLINE_STATUS_STANDBY = 2,
|
||||
SCE_NP_BASIC_FRIEND_ONLINE_STATUS_ONLINE_OUT_OF_CONTEXT = 3,
|
||||
SCE_NP_BASIC_FRIEND_ONLINE_STATUS_ONLINE_IN_CONTEXT = 4
|
||||
};
|
||||
|
||||
using SceNpBasicFriendOnlineStatusEventHandler = func_def<void(SceNpBasicFriendOnlineStatusEventType eventType, vm::cptr<SceNpId> friendId, SceNpBasicFriendOnlineStatus status, vm::ptr<void> userdata)>;
|
||||
|
||||
enum SceNpBasicBlockListEventType : s32
|
||||
{
|
||||
SCE_NP_BASIC_BLOCK_LIST_EVENT_TYPE_SYNC = 1,
|
||||
SCE_NP_BASIC_BLOCK_LIST_EVENT_TYPE_SYNC_DONE = 2,
|
||||
SCE_NP_BASIC_BLOCK_LIST_EVENT_TYPE_ADDED = 3,
|
||||
SCE_NP_BASIC_BLOCK_LIST_EVENT_TYPE_DELETED = 4
|
||||
};
|
||||
|
||||
using SceNpBasicBlockListEventHandler = func_def<void(SceNpBasicBlockListEventType eventType, vm::cptr<SceNpId> playerId, vm::ptr<void> userdata)>;
|
||||
|
||||
enum SceNpBasicFriendGamePresenceEventType : s32
|
||||
{
|
||||
SCE_NP_BASIC_FRIEND_GAME_PRESENCE_EVENT_TYPE_SYNC = 1,
|
||||
SCE_NP_BASIC_FRIEND_GAME_PRESENCE_EVENT_TYPE_SYNC_DONE = 2,
|
||||
SCE_NP_BASIC_FRIEND_GAME_PRESENCE_EVENT_TYPE_UPDATED = 3
|
||||
};
|
||||
|
||||
enum SceNpBasicInGamePresenceType : s32
|
||||
{
|
||||
SCE_NP_BASIC_IN_GAME_PRESENCE_TYPE_UNKNOWN = -1,
|
||||
SCE_NP_BASIC_IN_GAME_PRESENCE_TYPE_NONE = 0,
|
||||
SCE_NP_BASIC_IN_GAME_PRESENCE_TYPE_DEFAULT = 1,
|
||||
SCE_NP_BASIC_IN_GAME_PRESENCE_TYPE_JOINABLE = 2,
|
||||
SCE_NP_BASIC_IN_GAME_PRESENCE_TYPE_MAX = 3
|
||||
};
|
||||
|
||||
struct SceNpBasicInGamePresence
|
||||
{
|
||||
le_t<u32> sdkVersion;
|
||||
le_t<s32> type; // SceNpBasicInGamePresenceType
|
||||
char status[192];
|
||||
u8 data[128];
|
||||
le_t<u32> dataSize;
|
||||
};
|
||||
|
||||
struct SceNpBasicGamePresence
|
||||
{
|
||||
le_t<u32> size;
|
||||
char title[128];
|
||||
SceNpBasicInGamePresence inGamePresence;
|
||||
};
|
||||
|
||||
using SceNpBasicFriendGamePresenceEventHandler = func_def<void(SceNpBasicFriendGamePresenceEventType eventtype, vm::cptr<SceNpId> friendId, vm::cptr<SceNpBasicGamePresence> presence, vm::ptr<void> userdata)>;
|
||||
|
||||
struct SceNpBasicInGameDataMessage
|
||||
{
|
||||
u8 data[128];
|
||||
le_t<u32> dataSize;
|
||||
};
|
||||
|
||||
using SceNpBasicInGameDataMessageEventHandler = func_def<void(vm::cptr<SceNpId> from, vm::cptr<SceNpBasicInGameDataMessage> message, vm::ptr<void> userdata)>;
|
||||
|
||||
struct SceNpBasicEventHandlers
|
||||
{
|
||||
le_t<u32> sdkVersion;
|
||||
vm::lptr<SceNpBasicFriendListEventHandler> friendListEventHandler;
|
||||
vm::lptr<SceNpBasicFriendOnlineStatusEventHandler> friendOnlineStatusEventHandler;
|
||||
vm::lptr<SceNpBasicBlockListEventHandler> blockListEventHandler;
|
||||
vm::lptr<SceNpBasicFriendGamePresenceEventHandler> friendGamePresenceEventHandler;
|
||||
vm::lptr<SceNpBasicInGameDataMessageEventHandler> inGameDataMessageEventHandler;
|
||||
};
|
||||
|
||||
struct SceNpBasicPlaySessionLogDescription
|
||||
{
|
||||
char text[512];
|
||||
};
|
||||
|
||||
struct SceNpBasicPlaySessionLog
|
||||
{
|
||||
le_t<u64> date;
|
||||
SceNpId withWhom;
|
||||
SceNpCommunicationId commId;
|
||||
char title[128];
|
||||
SceNpBasicPlaySessionLogDescription description;
|
||||
};
|
||||
|
||||
enum SceNpBasicPlaySessionLogType : s32
|
||||
{
|
||||
SCE_NP_BASIC_PLAY_SESSION_LOG_TYPE_INVALID = -1,
|
||||
SCE_NP_BASIC_PLAY_SESSION_LOG_TYPE_ALL = 0,
|
||||
SCE_NP_BASIC_PLAY_SESSION_LOG_TYPE_BY_NP_COMM_ID = 1,
|
||||
SCE_NP_BASIC_PLAY_SESSION_LOG_TYPE_MAX = 2
|
||||
};
|
||||
|
||||
extern psv_log_base sceNpBasic;
|
|
@ -6,57 +6,57 @@
|
|||
|
||||
s32 sceNpAuthInit()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNpAuthTerm()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNpAuthCreateStartRequest(vm::psv::ptr<const SceNpAuthRequestParameter> param)
|
||||
s32 sceNpAuthCreateStartRequest(vm::cptr<SceNpAuthRequestParameter> param)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNpAuthDestroyRequest(SceNpAuthRequestId id)
|
||||
s32 sceNpAuthDestroyRequest(s32 id)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNpAuthAbortRequest(SceNpAuthRequestId id)
|
||||
s32 sceNpAuthAbortRequest(s32 id)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNpAuthGetTicket(SceNpAuthRequestId id, vm::psv::ptr<void> buf, u32 len)
|
||||
s32 sceNpAuthGetTicket(s32 id, vm::ptr<void> buf, u32 len)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNpAuthGetTicketParam(vm::psv::ptr<const u8> ticket, u32 ticketSize, s32 paramId, vm::psv::ptr<SceNpTicketParam> param)
|
||||
s32 sceNpAuthGetTicketParam(vm::cptr<u8> ticket, u32 ticketSize, s32 paramId, vm::ptr<SceNpTicketParam> param)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNpAuthGetEntitlementIdList(vm::psv::ptr<const u8> ticket, u32 ticketSize, vm::psv::ptr<SceNpEntitlementId> entIdList, u32 entIdListNum)
|
||||
s32 sceNpAuthGetEntitlementIdList(vm::cptr<u8> ticket, u32 ticketSize, vm::ptr<SceNpEntitlementId> entIdList, u32 entIdListNum)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNpAuthGetEntitlementById(vm::psv::ptr<const u8> ticket, u32 ticketSize, vm::psv::ptr<const char> entId, vm::psv::ptr<SceNpEntitlement> ent)
|
||||
s32 sceNpAuthGetEntitlementById(vm::cptr<u8> ticket, u32 ticketSize, vm::cptr<char> entId, vm::ptr<SceNpEntitlement> ent)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNpCmpNpId(vm::psv::ptr<const SceNpId> npid1, vm::psv::ptr<const SceNpId> npid2)
|
||||
s32 sceNpCmpNpId(vm::cptr<SceNpId> npid1, vm::cptr<SceNpId> npid2)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNpCmpNpIdInOrder(vm::psv::ptr<const SceNpId> npid1, vm::psv::ptr<const SceNpId> npid2, vm::psv::ptr<s32> order)
|
||||
s32 sceNpCmpNpIdInOrder(vm::cptr<SceNpId> npid1, vm::cptr<SceNpId> npid2, vm::ptr<s32> order)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
#define REG_FUNC(nid, name) reg_psv_func(nid, &sceNpCommon, #name, name)
|
||||
|
@ -66,6 +66,7 @@ psv_log_base sceNpCommon("SceNpCommon", []()
|
|||
sceNpCommon.on_load = nullptr;
|
||||
sceNpCommon.on_unload = nullptr;
|
||||
sceNpCommon.on_stop = nullptr;
|
||||
sceNpCommon.on_error = nullptr;
|
||||
|
||||
REG_FUNC(0x441D8B4E, sceNpAuthInit);
|
||||
REG_FUNC(0x6093B689, sceNpAuthTerm);
|
||||
|
|
|
@ -28,9 +28,9 @@ struct SceNpCommunicationSignature
|
|||
|
||||
struct SceNpCommunicationConfig
|
||||
{
|
||||
vm::psv::ptr<const SceNpCommunicationId> commId;
|
||||
vm::psv::ptr<const SceNpCommunicationPassphrase> commPassphrase;
|
||||
vm::psv::ptr<const SceNpCommunicationSignature> commSignature;
|
||||
vm::lcptr<SceNpCommunicationId> commId;
|
||||
vm::lcptr<SceNpCommunicationPassphrase> commPassphrase;
|
||||
vm::lcptr<SceNpCommunicationSignature> commSignature;
|
||||
};
|
||||
|
||||
struct SceNpCountryCode
|
||||
|
@ -69,16 +69,16 @@ struct SceNpUserInformation
|
|||
|
||||
struct SceNpMyLanguages
|
||||
{
|
||||
s32 language1;
|
||||
s32 language2;
|
||||
s32 language3;
|
||||
le_t<s32> language1;
|
||||
le_t<s32> language2;
|
||||
le_t<s32> language3;
|
||||
u8 padding[4];
|
||||
};
|
||||
|
||||
struct SceNpAvatarImage
|
||||
{
|
||||
u8 data[200 * 1024];
|
||||
u32 size;
|
||||
le_t<u32> size;
|
||||
u8 reserved[12];
|
||||
};
|
||||
|
||||
|
@ -94,45 +94,42 @@ struct SceNpAboutMe
|
|||
char data[64];
|
||||
};
|
||||
|
||||
typedef s32 SceNpAuthRequestId;
|
||||
typedef u64 SceNpTime;
|
||||
|
||||
struct SceNpDate
|
||||
{
|
||||
u16 year;
|
||||
le_t<u16> year;
|
||||
u8 month;
|
||||
u8 day;
|
||||
};
|
||||
|
||||
union SceNpTicketParam
|
||||
{
|
||||
s32 _s32;
|
||||
s64 _s64;
|
||||
u32 _u32;
|
||||
u64 _u64;
|
||||
le_t<s32> _s32;
|
||||
le_t<s64> _s64;
|
||||
le_t<u32> _u32;
|
||||
le_t<u64> _u64;
|
||||
SceNpDate date;
|
||||
u8 data[256];
|
||||
};
|
||||
|
||||
struct SceNpTicketVersion
|
||||
{
|
||||
u16 major;
|
||||
u16 minor;
|
||||
le_t<u16> major;
|
||||
le_t<u16> minor;
|
||||
};
|
||||
|
||||
typedef vm::psv::ptr<s32(SceNpAuthRequestId id, s32 result, vm::psv::ptr<void> arg)> SceNpAuthCallback;
|
||||
using SceNpAuthCallback = func_def<s32(s32 id, s32 result, vm::ptr<void> arg)>;
|
||||
|
||||
struct SceNpAuthRequestParameter
|
||||
{
|
||||
u32 size;
|
||||
le_t<u32> size;
|
||||
SceNpTicketVersion version;
|
||||
vm::psv::ptr<const char> serviceId;
|
||||
vm::psv::ptr<const void> cookie;
|
||||
u32 cookieSize;
|
||||
vm::psv::ptr<const char> entitlementId;
|
||||
u32 consumedCount;
|
||||
SceNpAuthCallback ticketCb;
|
||||
vm::psv::ptr<void> cbArg;
|
||||
vm::lcptr<char> serviceId;
|
||||
vm::lcptr<void> cookie;
|
||||
le_t<u32> cookieSize;
|
||||
vm::lcptr<char> entitlementId;
|
||||
le_t<u32> consumedCount;
|
||||
vm::lptr<SceNpAuthCallback> ticketCb;
|
||||
vm::lptr<void> cbArg;
|
||||
};
|
||||
|
||||
struct SceNpEntitlementId
|
||||
|
@ -143,11 +140,11 @@ struct SceNpEntitlementId
|
|||
struct SceNpEntitlement
|
||||
{
|
||||
SceNpEntitlementId id;
|
||||
SceNpTime createdDate;
|
||||
SceNpTime expireDate;
|
||||
u32 type;
|
||||
s32 remainingCount;
|
||||
u32 consumedCount;
|
||||
le_t<u64> createdDate;
|
||||
le_t<u64> expireDate;
|
||||
le_t<u32> type;
|
||||
le_t<s32> remainingCount;
|
||||
le_t<u32> consumedCount;
|
||||
char padding[4];
|
||||
};
|
||||
|
||||
|
|
|
@ -2,65 +2,56 @@
|
|||
#include "Emu/System.h"
|
||||
#include "Emu/ARMv7/PSVFuncList.h"
|
||||
|
||||
#include "sceNpCommon.h"
|
||||
#include "sceNpManager.h"
|
||||
|
||||
extern psv_log_base sceNpManager;
|
||||
|
||||
struct SceNpOptParam
|
||||
s32 sceNpInit(vm::cptr<SceNpCommunicationConfig> commConf, vm::ptr<SceNpOptParam> opt)
|
||||
{
|
||||
u32 optParamSize;
|
||||
};
|
||||
|
||||
typedef vm::psv::ptr<void(SceNpServiceState state, vm::psv::ptr<void> userdata)> SceNpServiceStateCallback;
|
||||
|
||||
s32 sceNpInit(vm::psv::ptr<const SceNpCommunicationConfig> commConf, vm::psv::ptr<SceNpOptParam> opt)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNpTerm(ARMv7Context&)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNpCheckCallback()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNpGetServiceState(vm::psv::ptr<SceNpServiceState> state)
|
||||
s32 sceNpGetServiceState(vm::ptr<s32> state)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNpRegisterServiceStateCallback(SceNpServiceStateCallback callback, vm::psv::ptr<void> userdata)
|
||||
s32 sceNpRegisterServiceStateCallback(vm::ptr<SceNpServiceStateCallback> callback, vm::ptr<void> userdata)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNpUnregisterServiceStateCallback()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNpManagerGetNpId(vm::psv::ptr<SceNpId> npId)
|
||||
s32 sceNpManagerGetNpId(vm::ptr<SceNpId> npId)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNpManagerGetAccountRegion(vm::psv::ptr<SceNpCountryCode> countryCode, vm::psv::ptr<s32> languageCode)
|
||||
s32 sceNpManagerGetAccountRegion(vm::ptr<SceNpCountryCode> countryCode, vm::ptr<s32> languageCode)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNpManagerGetContentRatingFlag(vm::psv::ptr<s32> isRestricted, vm::psv::ptr<s32> age)
|
||||
s32 sceNpManagerGetContentRatingFlag(vm::ptr<s32> isRestricted, vm::ptr<s32> age)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNpManagerGetChatRestrictionFlag(vm::psv::ptr<s32> isRestricted)
|
||||
s32 sceNpManagerGetChatRestrictionFlag(vm::ptr<s32> isRestricted)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
#define REG_FUNC(nid, name) reg_psv_func(nid, &sceNpManager, #name, name)
|
||||
|
@ -70,6 +61,7 @@ psv_log_base sceNpManager("SceNpManager", []()
|
|||
sceNpManager.on_load = nullptr;
|
||||
sceNpManager.on_unload = nullptr;
|
||||
sceNpManager.on_stop = nullptr;
|
||||
sceNpManager.on_error = nullptr;
|
||||
|
||||
REG_FUNC(0x04D9F484, sceNpInit);
|
||||
REG_FUNC(0x19E40AE1, sceNpTerm);
|
||||
|
|
12
rpcs3/Emu/ARMv7/Modules/sceNpManager.h
Normal file
12
rpcs3/Emu/ARMv7/Modules/sceNpManager.h
Normal file
|
@ -0,0 +1,12 @@
|
|||
#pragma once
|
||||
|
||||
#include "sceNpCommon.h"
|
||||
|
||||
struct SceNpOptParam
|
||||
{
|
||||
le_t<u32> optParamSize;
|
||||
};
|
||||
|
||||
using SceNpServiceStateCallback = func_def<void(SceNpServiceState state, vm::ptr<void> userdata)>;
|
||||
|
||||
extern psv_log_base sceNpManager;
|
File diff suppressed because it is too large
Load diff
989
rpcs3/Emu/ARMv7/Modules/sceNpMatching.h
Normal file
989
rpcs3/Emu/ARMv7/Modules/sceNpMatching.h
Normal file
|
@ -0,0 +1,989 @@
|
|||
#pragma once
|
||||
|
||||
#include "sceNet.h"
|
||||
#include "sceNpCommon.h"
|
||||
|
||||
struct SceNpMatching2MemoryInfo
|
||||
{
|
||||
le_t<u32> totalMemSize;
|
||||
le_t<u32> curMemUsage;
|
||||
le_t<u32> maxMemUsage;
|
||||
u8 reserved[12];
|
||||
};
|
||||
|
||||
struct SceNpMatching2SessionPassword
|
||||
{
|
||||
u8 data[8];
|
||||
};
|
||||
|
||||
struct SceNpMatching2PresenceOptionData
|
||||
{
|
||||
u8 data[16];
|
||||
le_t<u32> len;
|
||||
};
|
||||
|
||||
struct SceNpMatching2IntAttr
|
||||
{
|
||||
le_t<u16> id;
|
||||
u8 padding[2];
|
||||
le_t<u32> num;
|
||||
};
|
||||
|
||||
|
||||
struct SceNpMatching2BinAttr
|
||||
{
|
||||
le_t<u16> id;
|
||||
u8 padding[2];
|
||||
vm::lptr<void> ptr;
|
||||
le_t<u32> size;
|
||||
};
|
||||
|
||||
|
||||
struct SceNpMatching2RangeFilter
|
||||
{
|
||||
le_t<u32> startIndex;
|
||||
le_t<u32> max;
|
||||
};
|
||||
|
||||
|
||||
struct SceNpMatching2IntSearchFilter
|
||||
{
|
||||
u8 searchOperator;
|
||||
u8 padding[3];
|
||||
SceNpMatching2IntAttr attr;
|
||||
};
|
||||
|
||||
|
||||
struct SceNpMatching2BinSearchFilter
|
||||
{
|
||||
u8 searchOperator;
|
||||
u8 padding[3];
|
||||
SceNpMatching2BinAttr attr;
|
||||
};
|
||||
|
||||
|
||||
struct SceNpMatching2Range
|
||||
{
|
||||
le_t<u32> startIndex;
|
||||
le_t<u32> total;
|
||||
le_t<u32> resultCount;
|
||||
};
|
||||
|
||||
|
||||
struct SceNpMatching2JoinedSessionInfo
|
||||
{
|
||||
u8 sessionType;
|
||||
u8 padding1[1];
|
||||
le_t<u16> serverId;
|
||||
le_t<u32> worldId;
|
||||
le_t<u64> lobbyId;
|
||||
le_t<u64> roomId;
|
||||
le_t<u64> joinDate;
|
||||
};
|
||||
|
||||
|
||||
struct SceNpMatching2UserInfo
|
||||
{
|
||||
vm::lptr<SceNpMatching2UserInfo> next;
|
||||
SceNpId npId;
|
||||
vm::lptr<SceNpMatching2BinAttr> userBinAttr;
|
||||
le_t<u32> userBinAttrNum;
|
||||
vm::lptr<SceNpMatching2JoinedSessionInfo> joinedSessionInfo;
|
||||
le_t<u32> joinedSessionInfoNum;
|
||||
};
|
||||
|
||||
struct SceNpMatching2Server
|
||||
{
|
||||
le_t<u16> serverId;
|
||||
u8 status;
|
||||
u8 padding[1];
|
||||
};
|
||||
|
||||
|
||||
struct SceNpMatching2World
|
||||
{
|
||||
vm::lptr<SceNpMatching2World> next;
|
||||
le_t<u32> worldId;
|
||||
le_t<u32> numOfLobby;
|
||||
le_t<u32> maxNumOfTotalLobbyMember;
|
||||
le_t<u32> curNumOfTotalLobbyMember;
|
||||
le_t<u32> curNumOfRoom;
|
||||
le_t<u32> curNumOfTotalRoomMember;
|
||||
bool withEntitlementId;
|
||||
SceNpEntitlementId entitlementId;
|
||||
u8 padding[3];
|
||||
};
|
||||
|
||||
struct SceNpMatching2LobbyMemberBinAttrInternal
|
||||
{
|
||||
le_t<u64> updateDate;
|
||||
SceNpMatching2BinAttr data;
|
||||
u8 padding[4];
|
||||
};
|
||||
|
||||
|
||||
struct SceNpMatching2LobbyMemberDataInternal
|
||||
{
|
||||
vm::lptr<SceNpMatching2LobbyMemberDataInternal> next;
|
||||
SceNpId npId;
|
||||
|
||||
le_t<u64> joinDate;
|
||||
le_t<u16> memberId;
|
||||
u8 padding[2];
|
||||
|
||||
le_t<u32> flagAttr;
|
||||
|
||||
vm::lptr<SceNpMatching2JoinedSessionInfo> joinedSessionInfo;
|
||||
le_t<u32> joinedSessionInfoNum;
|
||||
vm::lptr<SceNpMatching2LobbyMemberBinAttrInternal> lobbyMemberBinAttrInternal;
|
||||
le_t<u32> lobbyMemberBinAttrInternalNum;
|
||||
};
|
||||
|
||||
|
||||
struct SceNpMatching2LobbyMemberIdList
|
||||
{
|
||||
vm::lptr<u16> memberId;
|
||||
le_t<u32> memberIdNum;
|
||||
le_t<u16> me;
|
||||
u8 padding[6];
|
||||
};
|
||||
|
||||
|
||||
struct SceNpMatching2LobbyBinAttrInternal
|
||||
{
|
||||
le_t<u64> updateDate;
|
||||
le_t<u16> updateMemberId;
|
||||
u8 padding[2];
|
||||
SceNpMatching2BinAttr data;
|
||||
};
|
||||
|
||||
|
||||
struct SceNpMatching2LobbyDataExternal
|
||||
{
|
||||
vm::lptr<SceNpMatching2LobbyDataExternal> next;
|
||||
le_t<u16> serverId;
|
||||
u8 padding1[2];
|
||||
le_t<u32> worldId;
|
||||
u8 padding2[4];
|
||||
le_t<u64> lobbyId;
|
||||
le_t<u32> maxSlot;
|
||||
le_t<u32> curMemberNum;
|
||||
le_t<u32> flagAttr;
|
||||
vm::lptr<SceNpMatching2IntAttr> lobbySearchableIntAttrExternal;
|
||||
le_t<u32> lobbySearchableIntAttrExternalNum;
|
||||
vm::lptr<SceNpMatching2BinAttr> lobbySearchableBinAttrExternal;
|
||||
le_t<u32> lobbySearchableBinAttrExternalNum;
|
||||
vm::lptr<SceNpMatching2BinAttr> lobbyBinAttrExternal;
|
||||
le_t<u32> lobbyBinAttrExternalNum;
|
||||
u8 padding3[4];
|
||||
};
|
||||
|
||||
|
||||
struct SceNpMatching2LobbyDataInternal
|
||||
{
|
||||
le_t<u16> serverId;
|
||||
u8 padding1[2];
|
||||
le_t<u32> worldId;
|
||||
le_t<u64> lobbyId;
|
||||
|
||||
le_t<u32> maxSlot;
|
||||
SceNpMatching2LobbyMemberIdList memberIdList;
|
||||
le_t<u32> flagAttr;
|
||||
vm::lptr<SceNpMatching2LobbyBinAttrInternal> lobbyBinAttrInternal;
|
||||
le_t<u32> lobbyBinAttrInternalNum;
|
||||
};
|
||||
|
||||
|
||||
union SceNpMatching2LobbyMessageDestination
|
||||
{
|
||||
le_t<u16> unicastTarget;
|
||||
|
||||
struct
|
||||
{
|
||||
vm::lptr<u16> memberId;
|
||||
le_t<u32> memberIdNum;
|
||||
}
|
||||
multicastTarget;
|
||||
};
|
||||
|
||||
struct SceNpMatching2GroupLabel
|
||||
{
|
||||
u8 data[8];
|
||||
};
|
||||
|
||||
struct SceNpMatching2RoomGroupConfig
|
||||
{
|
||||
le_t<u32> slotNum;
|
||||
bool withLabel;
|
||||
SceNpMatching2GroupLabel label;
|
||||
bool withPassword;
|
||||
u8 padding[2];
|
||||
};
|
||||
|
||||
|
||||
struct SceNpMatching2RoomGroupPasswordConfig
|
||||
{
|
||||
u8 groupId;
|
||||
bool withPassword;
|
||||
u8 padding[1];
|
||||
};
|
||||
|
||||
|
||||
struct SceNpMatching2RoomMemberBinAttrInternal
|
||||
{
|
||||
le_t<u64> updateDate;
|
||||
SceNpMatching2BinAttr data;
|
||||
u8 padding[4];
|
||||
};
|
||||
|
||||
|
||||
struct SceNpMatching2RoomGroup
|
||||
{
|
||||
u8 groupId;
|
||||
bool withPassword;
|
||||
bool withLabel;
|
||||
u8 padding[1];
|
||||
SceNpMatching2GroupLabel label;
|
||||
le_t<u32> slotNum;
|
||||
le_t<u32> curGroupMemberNum;
|
||||
};
|
||||
|
||||
|
||||
struct SceNpMatching2RoomMemberDataExternal
|
||||
{
|
||||
vm::lptr<SceNpMatching2RoomMemberDataExternal> next;
|
||||
SceNpId npId;
|
||||
le_t<u64> joinDate;
|
||||
u8 role;
|
||||
u8 padding[7];
|
||||
};
|
||||
|
||||
|
||||
struct SceNpMatching2RoomMemberDataInternal
|
||||
{
|
||||
vm::lptr<SceNpMatching2RoomMemberDataInternal> next;
|
||||
SceNpId npId;
|
||||
|
||||
le_t<u64> joinDate;
|
||||
le_t<u16> memberId;
|
||||
u8 teamId;
|
||||
u8 padding1[1];
|
||||
|
||||
vm::lptr<SceNpMatching2RoomGroup> roomGroup;
|
||||
|
||||
u8 natType;
|
||||
u8 padding2[3];
|
||||
le_t<u32> flagAttr;
|
||||
vm::lptr<SceNpMatching2RoomMemberBinAttrInternal> roomMemberBinAttrInternal;
|
||||
le_t<u32> roomMemberBinAttrInternalNum;
|
||||
};
|
||||
|
||||
|
||||
struct SceNpMatching2RoomMemberDataInternalList
|
||||
{
|
||||
vm::lptr<SceNpMatching2RoomMemberDataInternal> members;
|
||||
le_t<u32> membersNum;
|
||||
vm::lptr<SceNpMatching2RoomMemberDataInternal> me;
|
||||
vm::lptr<SceNpMatching2RoomMemberDataInternal> owner;
|
||||
};
|
||||
|
||||
|
||||
struct SceNpMatching2RoomBinAttrInternal
|
||||
{
|
||||
le_t<u64> updateDate;
|
||||
le_t<u16> updateMemberId;
|
||||
u8 padding[2];
|
||||
SceNpMatching2BinAttr data;
|
||||
};
|
||||
|
||||
|
||||
struct SceNpMatching2RoomDataExternal
|
||||
{
|
||||
vm::lptr<SceNpMatching2RoomDataExternal> next;
|
||||
|
||||
le_t<u16> maxSlot;
|
||||
le_t<u16> curMemberNum;
|
||||
|
||||
le_t<u16> serverId;
|
||||
u8 padding[2];
|
||||
le_t<u32> worldId;
|
||||
le_t<u64> lobbyId;
|
||||
le_t<u64> roomId;
|
||||
|
||||
le_t<u64> passwordSlotMask;
|
||||
le_t<u64> joinedSlotMask;
|
||||
le_t<u16> publicSlotNum;
|
||||
le_t<u16> privateSlotNum;
|
||||
le_t<u16> openPublicSlotNum;
|
||||
le_t<u16> openPrivateSlotNum;
|
||||
|
||||
vm::lptr<SceNpId> owner;
|
||||
le_t<u32> flagAttr;
|
||||
|
||||
vm::lptr<SceNpMatching2RoomGroup> roomGroup;
|
||||
le_t<u32> roomGroupNum;
|
||||
vm::lptr<SceNpMatching2IntAttr> roomSearchableIntAttrExternal;
|
||||
le_t<u32> roomSearchableIntAttrExternalNum;
|
||||
vm::lptr<SceNpMatching2BinAttr> roomSearchableBinAttrExternal;
|
||||
le_t<u32> roomSearchableBinAttrExternalNum;
|
||||
vm::lptr<SceNpMatching2BinAttr> roomBinAttrExternal;
|
||||
le_t<u32> roomBinAttrExternalNum;
|
||||
};
|
||||
|
||||
|
||||
struct SceNpMatching2RoomDataInternal
|
||||
{
|
||||
le_t<u16> maxSlot;
|
||||
|
||||
le_t<u16> serverId;
|
||||
le_t<u32> worldId;
|
||||
le_t<u64> lobbyId;
|
||||
le_t<u64> roomId;
|
||||
|
||||
le_t<u64> passwordSlotMask;
|
||||
le_t<u64> joinedSlotMask;
|
||||
le_t<u16> publicSlotNum;
|
||||
le_t<u16> privateSlotNum;
|
||||
le_t<u16> openPublicSlotNum;
|
||||
le_t<u16> openPrivateSlotNum;
|
||||
|
||||
SceNpMatching2RoomMemberDataInternalList memberList;
|
||||
|
||||
vm::lptr<SceNpMatching2RoomGroup> roomGroup;
|
||||
le_t<u32> roomGroupNum;
|
||||
|
||||
le_t<u32> flagAttr;
|
||||
u8 padding[4];
|
||||
vm::lptr<SceNpMatching2RoomBinAttrInternal> roomBinAttrInternal;
|
||||
le_t<u32> roomBinAttrInternalNum;
|
||||
};
|
||||
|
||||
|
||||
union SceNpMatching2RoomMessageDestination
|
||||
{
|
||||
le_t<u16> unicastTarget;
|
||||
|
||||
struct
|
||||
{
|
||||
vm::lptr<u16> memberId;
|
||||
le_t<u32> memberIdNum;
|
||||
}
|
||||
multicastTarget;
|
||||
|
||||
u8 multicastTargetTeamId;
|
||||
};
|
||||
|
||||
|
||||
struct SceNpMatching2InvitationData
|
||||
{
|
||||
vm::lptr<SceNpMatching2JoinedSessionInfo> targetSession;
|
||||
le_t<u32> targetSessionNum;
|
||||
vm::lptr<void> optData;
|
||||
le_t<u32> optDataLen;
|
||||
};
|
||||
|
||||
using SceNpMatching2RequestCallback = func_def<void(u16 ctxId, u32 reqId, u16 event, s32 errorCode, vm::cptr<void> data, vm::ptr<void> arg)>;
|
||||
using SceNpMatching2LobbyEventCallback = func_def<void(u16 ctxId, u64 lobbyId, u16 event, s32 errorCode, vm::cptr<void> data, vm::ptr<void> arg)>;
|
||||
using SceNpMatching2RoomEventCallback = func_def<void(u16 ctxId, u64 roomId, u16 event, s32 errorCode, vm::cptr<void> data, vm::ptr<void> arg)>;
|
||||
using SceNpMatching2LobbyMessageCallback = func_def<void(u16 ctxId, u64 lobbyId, u16 srcMemberId, u16 event, s32 errorCode, vm::cptr<void> data, vm::ptr<void> arg)>;
|
||||
using SceNpMatching2RoomMessageCallback = func_def<void(u16 ctxId, u64 roomId, u16 srcMemberId, u16 event, s32 errorCode, vm::cptr<void> data, vm::ptr<void> arg)>;
|
||||
using SceNpMatching2SignalingCallback = func_def<void(u16 ctxId, u64 roomId, u16 peerMemberId, u16 event, s32 errorCode, vm::ptr<void> arg)>;
|
||||
using SceNpMatching2ContextCallback = func_def<void(u16 ctxId, u16 event, u8 eventCause, s32 errorCode, vm::ptr<void> arg)>;
|
||||
|
||||
struct SceNpMatching2RequestOptParam
|
||||
{
|
||||
vm::lptr<SceNpMatching2RequestCallback> cbFunc;
|
||||
vm::lptr<void> cbFuncArg;
|
||||
le_t<u32> timeout;
|
||||
le_t<u16> appReqId;
|
||||
u8 padding[2];
|
||||
};
|
||||
|
||||
|
||||
struct SceNpMatching2GetWorldInfoListRequest
|
||||
{
|
||||
le_t<u16> serverId;
|
||||
};
|
||||
|
||||
|
||||
|
||||
struct SceNpMatching2GetWorldInfoListResponse
|
||||
{
|
||||
vm::lptr<SceNpMatching2World> world;
|
||||
le_t<u32> worldNum;
|
||||
};
|
||||
|
||||
struct SceNpMatching2SetUserInfoRequest
|
||||
{
|
||||
le_t<u16> serverId;
|
||||
u8 padding[2];
|
||||
vm::lptr<SceNpMatching2BinAttr> userBinAttr;
|
||||
le_t<u32> userBinAttrNum;
|
||||
};
|
||||
|
||||
|
||||
struct SceNpMatching2GetUserInfoListRequest
|
||||
{
|
||||
le_t<u16> serverId;
|
||||
u8 padding[2];
|
||||
vm::lptr<SceNpId> npId;
|
||||
le_t<u32> npIdNum;
|
||||
vm::lptr<u16> attrId;
|
||||
le_t<u32> attrIdNum;
|
||||
le_t<s32> option;
|
||||
};
|
||||
|
||||
|
||||
|
||||
struct SceNpMatching2GetUserInfoListResponse
|
||||
{
|
||||
vm::lptr<SceNpMatching2UserInfo> userInfo;
|
||||
le_t<u32> userInfoNum;
|
||||
};
|
||||
|
||||
|
||||
struct SceNpMatching2GetRoomMemberDataExternalListRequest
|
||||
{
|
||||
le_t<u64> roomId;
|
||||
};
|
||||
|
||||
|
||||
|
||||
struct SceNpMatching2GetRoomMemberDataExternalListResponse
|
||||
{
|
||||
vm::lptr<SceNpMatching2RoomMemberDataExternal> roomMemberDataExternal;
|
||||
le_t<u32> roomMemberDataExternalNum;
|
||||
};
|
||||
|
||||
|
||||
struct SceNpMatching2SetRoomDataExternalRequest
|
||||
{
|
||||
le_t<u64> roomId;
|
||||
vm::lptr<SceNpMatching2IntAttr> roomSearchableIntAttrExternal;
|
||||
le_t<u32> roomSearchableIntAttrExternalNum;
|
||||
vm::lptr<SceNpMatching2BinAttr> roomSearchableBinAttrExternal;
|
||||
le_t<u32> roomSearchableBinAttrExternalNum;
|
||||
vm::lptr<SceNpMatching2BinAttr> roomBinAttrExternal;
|
||||
le_t<u32> roomBinAttrExternalNum;
|
||||
};
|
||||
|
||||
|
||||
struct SceNpMatching2GetRoomDataExternalListRequest
|
||||
{
|
||||
vm::lptr<u64> roomId;
|
||||
le_t<u32> roomIdNum;
|
||||
vm::lcptr<u16> attrId;
|
||||
le_t<u32> attrIdNum;
|
||||
};
|
||||
|
||||
|
||||
|
||||
struct SceNpMatching2GetRoomDataExternalListResponse
|
||||
{
|
||||
vm::lptr<SceNpMatching2RoomDataExternal> roomDataExternal;
|
||||
le_t<u32> roomDataExternalNum;
|
||||
};
|
||||
|
||||
struct SceNpMatching2SignalingOptParam
|
||||
{
|
||||
u8 type;
|
||||
u8 flag;
|
||||
le_t<u16> hubMemberId;
|
||||
u8 reserved2[4];
|
||||
};
|
||||
|
||||
|
||||
|
||||
struct SceNpMatching2CreateJoinRoomRequest
|
||||
{
|
||||
le_t<u32> worldId;
|
||||
u8 padding1[4];
|
||||
le_t<u64> lobbyId;
|
||||
|
||||
le_t<u32> maxSlot;
|
||||
le_t<u32> flagAttr;
|
||||
vm::lptr<SceNpMatching2BinAttr> roomBinAttrInternal;
|
||||
le_t<u32> roomBinAttrInternalNum;
|
||||
vm::lptr<SceNpMatching2IntAttr> roomSearchableIntAttrExternal;
|
||||
le_t<u32> roomSearchableIntAttrExternalNum;
|
||||
vm::lptr<SceNpMatching2BinAttr> roomSearchableBinAttrExternal;
|
||||
le_t<u32> roomSearchableBinAttrExternalNum;
|
||||
vm::lptr<SceNpMatching2BinAttr> roomBinAttrExternal;
|
||||
le_t<u32> roomBinAttrExternalNum;
|
||||
vm::lptr<SceNpMatching2SessionPassword> roomPassword;
|
||||
vm::lptr<SceNpMatching2RoomGroupConfig> groupConfig;
|
||||
le_t<u32> groupConfigNum;
|
||||
vm::lptr<u64> passwordSlotMask;
|
||||
vm::lptr<SceNpId> allowedUser;
|
||||
le_t<u32> allowedUserNum;
|
||||
vm::lptr<SceNpId> blockedUser;
|
||||
le_t<u32> blockedUserNum;
|
||||
|
||||
vm::lptr<SceNpMatching2GroupLabel> joinRoomGroupLabel;
|
||||
vm::lptr<SceNpMatching2BinAttr> roomMemberBinAttrInternal;
|
||||
le_t<u32> roomMemberBinAttrInternalNum;
|
||||
u8 teamId;
|
||||
u8 padding2[3];
|
||||
|
||||
vm::lptr<SceNpMatching2SignalingOptParam> sigOptParam;
|
||||
u8 padding3[4];
|
||||
};
|
||||
|
||||
|
||||
|
||||
struct SceNpMatching2CreateJoinRoomResponse
|
||||
{
|
||||
vm::lptr<SceNpMatching2RoomDataInternal> roomDataInternal;
|
||||
};
|
||||
|
||||
|
||||
struct SceNpMatching2JoinRoomRequest
|
||||
{
|
||||
le_t<u64> roomId;
|
||||
vm::lptr<SceNpMatching2SessionPassword> roomPassword;
|
||||
vm::lptr<SceNpMatching2GroupLabel> joinRoomGroupLabel;
|
||||
vm::lptr<SceNpMatching2BinAttr> roomMemberBinAttrInternal;
|
||||
le_t<u32> roomMemberBinAttrInternalNum;
|
||||
SceNpMatching2PresenceOptionData optData;
|
||||
u8 teamId;
|
||||
u8 padding[3];
|
||||
vm::lptr<SceNpId> blockedUser;
|
||||
le_t<u32> blockedUserNum;
|
||||
};
|
||||
|
||||
|
||||
|
||||
struct SceNpMatching2JoinRoomResponse
|
||||
{
|
||||
vm::lptr<SceNpMatching2RoomDataInternal> roomDataInternal;
|
||||
};
|
||||
|
||||
|
||||
struct SceNpMatching2LeaveRoomRequest
|
||||
{
|
||||
le_t<u64> roomId;
|
||||
SceNpMatching2PresenceOptionData optData;
|
||||
u8 padding[4];
|
||||
};
|
||||
|
||||
|
||||
struct SceNpMatching2GrantRoomOwnerRequest
|
||||
{
|
||||
le_t<u64> roomId;
|
||||
le_t<u16> newOwner;
|
||||
u8 padding[2];
|
||||
SceNpMatching2PresenceOptionData optData;
|
||||
};
|
||||
|
||||
|
||||
struct SceNpMatching2KickoutRoomMemberRequest
|
||||
{
|
||||
le_t<u64> roomId;
|
||||
le_t<u16> target;
|
||||
u8 blockKickFlag;
|
||||
u8 padding[1];
|
||||
SceNpMatching2PresenceOptionData optData;
|
||||
};
|
||||
|
||||
|
||||
struct SceNpMatching2SearchRoomRequest
|
||||
{
|
||||
le_t<s32> option;
|
||||
le_t<u32> worldId;
|
||||
le_t<u64> lobbyId;
|
||||
SceNpMatching2RangeFilter rangeFilter;
|
||||
le_t<u32> flagFilter;
|
||||
le_t<u32> flagAttr;
|
||||
vm::lptr<SceNpMatching2IntSearchFilter> intFilter;
|
||||
le_t<u32> intFilterNum;
|
||||
vm::lptr<SceNpMatching2BinSearchFilter> binFilter;
|
||||
le_t<u32> binFilterNum;
|
||||
vm::lptr<u16> attrId;
|
||||
le_t<u32> attrIdNum;
|
||||
};
|
||||
|
||||
|
||||
|
||||
struct SceNpMatching2SearchRoomResponse
|
||||
{
|
||||
SceNpMatching2Range range;
|
||||
vm::lptr<SceNpMatching2RoomDataExternal> roomDataExternal;
|
||||
};
|
||||
|
||||
|
||||
struct SceNpMatching2SendRoomMessageRequest
|
||||
{
|
||||
le_t<u64> roomId;
|
||||
u8 castType;
|
||||
u8 padding[3];
|
||||
SceNpMatching2RoomMessageDestination dst;
|
||||
vm::lcptr<void> msg;
|
||||
le_t<u32> msgLen;
|
||||
le_t<s32> option;
|
||||
};
|
||||
|
||||
|
||||
struct SceNpMatching2SendRoomChatMessageRequest
|
||||
{
|
||||
le_t<u64> roomId;
|
||||
u8 castType;
|
||||
u8 padding[3];
|
||||
SceNpMatching2RoomMessageDestination dst;
|
||||
vm::lcptr<void> msg;
|
||||
le_t<u32> msgLen;
|
||||
le_t<s32> option;
|
||||
};
|
||||
|
||||
|
||||
|
||||
struct SceNpMatching2SendRoomChatMessageResponse
|
||||
{
|
||||
bool filtered;
|
||||
};
|
||||
|
||||
|
||||
struct SceNpMatching2SetRoomDataInternalRequest
|
||||
{
|
||||
le_t<u64> roomId;
|
||||
le_t<u32> flagFilter;
|
||||
le_t<u32> flagAttr;
|
||||
vm::lptr<SceNpMatching2BinAttr> roomBinAttrInternal;
|
||||
le_t<u32> roomBinAttrInternalNum;
|
||||
vm::lptr<SceNpMatching2RoomGroupPasswordConfig> passwordConfig;
|
||||
le_t<u32> passwordConfigNum;
|
||||
vm::lptr<u64> passwordSlotMask;
|
||||
vm::lptr<u16> ownerPrivilegeRank;
|
||||
le_t<u32> ownerPrivilegeRankNum;
|
||||
u8 padding[4];
|
||||
};
|
||||
|
||||
|
||||
struct SceNpMatching2GetRoomDataInternalRequest
|
||||
{
|
||||
le_t<u64> roomId;
|
||||
vm::lcptr<u16> attrId;
|
||||
le_t<u32> attrIdNum;
|
||||
};
|
||||
|
||||
|
||||
|
||||
struct SceNpMatching2GetRoomDataInternalResponse
|
||||
{
|
||||
vm::lptr<SceNpMatching2RoomDataInternal> roomDataInternal;
|
||||
};
|
||||
|
||||
|
||||
struct SceNpMatching2SetRoomMemberDataInternalRequest
|
||||
{
|
||||
le_t<u64> roomId;
|
||||
le_t<u16> memberId;
|
||||
u8 teamId;
|
||||
u8 padding[5];
|
||||
le_t<u32> flagFilter;
|
||||
le_t<u32> flagAttr;
|
||||
vm::lptr<SceNpMatching2BinAttr> roomMemberBinAttrInternal;
|
||||
le_t<u32> roomMemberBinAttrInternalNum;
|
||||
};
|
||||
|
||||
|
||||
struct SceNpMatching2GetRoomMemberDataInternalRequest
|
||||
{
|
||||
le_t<u64> roomId;
|
||||
le_t<u16> memberId;
|
||||
u8 padding[6];
|
||||
vm::lcptr<u16> attrId;
|
||||
le_t<u32> attrIdNum;
|
||||
};
|
||||
|
||||
|
||||
|
||||
struct SceNpMatching2GetRoomMemberDataInternalResponse
|
||||
{
|
||||
vm::lptr<SceNpMatching2RoomMemberDataInternal> roomMemberDataInternal;
|
||||
};
|
||||
|
||||
|
||||
struct SceNpMatching2SetSignalingOptParamRequest
|
||||
{
|
||||
le_t<u64> roomId;
|
||||
SceNpMatching2SignalingOptParam sigOptParam;
|
||||
};
|
||||
|
||||
|
||||
struct SceNpMatching2GetLobbyInfoListRequest
|
||||
{
|
||||
le_t<u32> worldId;
|
||||
SceNpMatching2RangeFilter rangeFilter;
|
||||
vm::lptr<u16> attrId;
|
||||
le_t<u32> attrIdNum;
|
||||
};
|
||||
|
||||
|
||||
|
||||
struct SceNpMatching2GetLobbyInfoListResponse
|
||||
{
|
||||
SceNpMatching2Range range;
|
||||
vm::lptr<SceNpMatching2LobbyDataExternal> lobbyDataExternal;
|
||||
};
|
||||
|
||||
|
||||
struct SceNpMatching2JoinLobbyRequest
|
||||
{
|
||||
le_t<u64> lobbyId;
|
||||
vm::lptr<SceNpMatching2JoinedSessionInfo> joinedSessionInfo;
|
||||
le_t<u32> joinedSessionInfoNum;
|
||||
vm::lptr<SceNpMatching2BinAttr> lobbyMemberBinAttrInternal;
|
||||
le_t<u32> lobbyMemberBinAttrInternalNum;
|
||||
SceNpMatching2PresenceOptionData optData;
|
||||
u8 padding[4];
|
||||
};
|
||||
|
||||
|
||||
|
||||
struct SceNpMatching2JoinLobbyResponse
|
||||
{
|
||||
vm::lptr<SceNpMatching2LobbyDataInternal> lobbyDataInternal;
|
||||
};
|
||||
|
||||
|
||||
struct SceNpMatching2LeaveLobbyRequest
|
||||
{
|
||||
le_t<u64> lobbyId;
|
||||
SceNpMatching2PresenceOptionData optData;
|
||||
u8 padding[4];
|
||||
};
|
||||
|
||||
|
||||
struct SceNpMatching2SetLobbyMemberDataInternalRequest
|
||||
{
|
||||
le_t<u64> lobbyId;
|
||||
le_t<u16> memberId;
|
||||
u8 padding1[2];
|
||||
le_t<u32> flagFilter;
|
||||
le_t<u32> flagAttr;
|
||||
vm::lptr<SceNpMatching2JoinedSessionInfo> joinedSessionInfo;
|
||||
le_t<u32> joinedSessionInfoNum;
|
||||
vm::lptr<SceNpMatching2BinAttr> lobbyMemberBinAttrInternal;
|
||||
le_t<u32> lobbyMemberBinAttrInternalNum;
|
||||
u8 padding2[4];
|
||||
};
|
||||
|
||||
|
||||
struct SceNpMatching2GetLobbyMemberDataInternalRequest
|
||||
{
|
||||
le_t<u64> lobbyId;
|
||||
le_t<u16> memberId;
|
||||
u8 padding[6];
|
||||
vm::lcptr<u16> attrId;
|
||||
le_t<u32> attrIdNum;
|
||||
};
|
||||
|
||||
|
||||
|
||||
struct SceNpMatching2GetLobbyMemberDataInternalResponse
|
||||
{
|
||||
vm::lptr<SceNpMatching2LobbyMemberDataInternal> lobbyMemberDataInternal;
|
||||
};
|
||||
|
||||
|
||||
|
||||
struct SceNpMatching2GetLobbyMemberDataInternalListRequest
|
||||
{
|
||||
le_t<u64> lobbyId;
|
||||
vm::lptr<u16> memberId;
|
||||
le_t<u32> memberIdNum;
|
||||
vm::lcptr<u16> attrId;
|
||||
le_t<u32> attrIdNum;
|
||||
bool extendedData;
|
||||
u8 padding[7];
|
||||
};
|
||||
|
||||
|
||||
|
||||
struct SceNpMatching2GetLobbyMemberDataInternalListResponse
|
||||
{
|
||||
vm::lptr<SceNpMatching2LobbyMemberDataInternal> lobbyMemberDataInternal;
|
||||
le_t<u32> lobbyMemberDataInternalNum;
|
||||
};
|
||||
|
||||
|
||||
struct SceNpMatching2SendLobbyChatMessageRequest
|
||||
{
|
||||
le_t<u64> lobbyId;
|
||||
u8 castType;
|
||||
u8 padding[3];
|
||||
SceNpMatching2LobbyMessageDestination dst;
|
||||
vm::lcptr<void> msg;
|
||||
le_t<u32> msgLen;
|
||||
le_t<s32> option;
|
||||
};
|
||||
|
||||
|
||||
|
||||
struct SceNpMatching2SendLobbyChatMessageResponse
|
||||
{
|
||||
bool filtered;
|
||||
};
|
||||
|
||||
|
||||
struct SceNpMatching2SendLobbyInvitationRequest
|
||||
{
|
||||
le_t<u64> lobbyId;
|
||||
u8 castType;
|
||||
u8 padding[3];
|
||||
SceNpMatching2LobbyMessageDestination dst;
|
||||
SceNpMatching2InvitationData invitationData;
|
||||
le_t<s32> option;
|
||||
};
|
||||
|
||||
|
||||
struct SceNpMatching2RoomMemberUpdateInfo
|
||||
{
|
||||
vm::lptr<SceNpMatching2RoomMemberDataInternal> roomMemberDataInternal;
|
||||
u8 eventCause;
|
||||
u8 padding[3];
|
||||
SceNpMatching2PresenceOptionData optData;
|
||||
};
|
||||
|
||||
|
||||
struct SceNpMatching2RoomOwnerUpdateInfo
|
||||
{
|
||||
le_t<u16> prevOwner;
|
||||
le_t<u16> newOwner;
|
||||
u8 eventCause;
|
||||
u8 padding[3];
|
||||
vm::lptr<SceNpMatching2SessionPassword> roomPassword;
|
||||
SceNpMatching2PresenceOptionData optData;
|
||||
};
|
||||
|
||||
|
||||
struct SceNpMatching2RoomUpdateInfo
|
||||
{
|
||||
u8 eventCause;
|
||||
u8 padding[3];
|
||||
le_t<s32> errorCode;
|
||||
SceNpMatching2PresenceOptionData optData;
|
||||
};
|
||||
|
||||
|
||||
struct SceNpMatching2RoomDataInternalUpdateInfo
|
||||
{
|
||||
vm::lptr<SceNpMatching2RoomDataInternal> newRoomDataInternal;
|
||||
vm::lptr<u32> newFlagAttr;
|
||||
vm::lptr<u32> prevFlagAttr;
|
||||
vm::lptr<u64> newRoomPasswordSlotMask;
|
||||
vm::lptr<u64> prevRoomPasswordSlotMask;
|
||||
vm::lptr<SceNpMatching2RoomGroup> *newRoomGroup;
|
||||
le_t<u32> newRoomGroupNum;
|
||||
vm::lptr<SceNpMatching2RoomBinAttrInternal> *newRoomBinAttrInternal;
|
||||
le_t<u32> newRoomBinAttrInternalNum;
|
||||
};
|
||||
|
||||
|
||||
struct SceNpMatching2RoomMemberDataInternalUpdateInfo
|
||||
{
|
||||
vm::lptr<SceNpMatching2RoomMemberDataInternal> newRoomMemberDataInternal;
|
||||
vm::lptr<u32> newFlagAttr;
|
||||
vm::lptr<u32> prevFlagAttr;
|
||||
vm::lptr<u8> newTeamId;
|
||||
vm::lptr<SceNpMatching2RoomMemberBinAttrInternal> *newRoomMemberBinAttrInternal;
|
||||
le_t<u32> newRoomMemberBinAttrInternalNum;
|
||||
};
|
||||
|
||||
|
||||
struct SceNpMatching2SignalingOptParamUpdateInfo
|
||||
{
|
||||
SceNpMatching2SignalingOptParam newSignalingOptParam;
|
||||
};
|
||||
|
||||
|
||||
struct SceNpMatching2RoomMessageInfo
|
||||
{
|
||||
bool filtered;
|
||||
u8 castType;
|
||||
u8 padding[2];
|
||||
vm::lptr<SceNpMatching2RoomMessageDestination> dst;
|
||||
vm::lptr<SceNpId> srcMember;
|
||||
vm::lcptr<void> msg;
|
||||
le_t<u32> msgLen;
|
||||
};
|
||||
|
||||
|
||||
struct SceNpMatching2LobbyMemberUpdateInfo
|
||||
{
|
||||
vm::lptr<SceNpMatching2LobbyMemberDataInternal> lobbyMemberDataInternal;
|
||||
u8 eventCause;
|
||||
u8 padding[3];
|
||||
SceNpMatching2PresenceOptionData optData;
|
||||
};
|
||||
|
||||
|
||||
struct SceNpMatching2LobbyUpdateInfo
|
||||
{
|
||||
u8 eventCause;
|
||||
u8 padding[3];
|
||||
le_t<s32> errorCode;
|
||||
};
|
||||
|
||||
|
||||
struct SceNpMatching2LobbyMemberDataInternalUpdateInfo
|
||||
{
|
||||
le_t<u16> memberId;
|
||||
u8 padding[2];
|
||||
SceNpId npId;
|
||||
le_t<u32> flagFilter;
|
||||
le_t<u32> newFlagAttr;
|
||||
vm::lptr<SceNpMatching2JoinedSessionInfo> newJoinedSessionInfo;
|
||||
le_t<u32> newJoinedSessionInfoNum;
|
||||
vm::lptr<SceNpMatching2LobbyMemberBinAttrInternal> newLobbyMemberBinAttrInternal;
|
||||
le_t<u32> newLobbyMemberBinAttrInternalNum;
|
||||
};
|
||||
|
||||
|
||||
struct SceNpMatching2LobbyMessageInfo
|
||||
{
|
||||
bool filtered;
|
||||
u8 castType;
|
||||
u8 padding[2];
|
||||
vm::lptr<SceNpMatching2LobbyMessageDestination> dst;
|
||||
vm::lptr<SceNpId> srcMember;
|
||||
vm::lcptr<void> msg;
|
||||
le_t<u32> msgLen;
|
||||
};
|
||||
|
||||
|
||||
struct SceNpMatching2LobbyInvitationInfo
|
||||
{
|
||||
u8 castType;
|
||||
u8 padding[3];
|
||||
vm::lptr<SceNpMatching2LobbyMessageDestination> dst;
|
||||
vm::lptr<SceNpId> srcMember;
|
||||
SceNpMatching2InvitationData invitationData;
|
||||
};
|
||||
|
||||
union SceNpMatching2SignalingConnectionInfo
|
||||
{
|
||||
le_t<u32> rtt;
|
||||
le_t<u32> bandwidth;
|
||||
SceNpId npId;
|
||||
|
||||
struct
|
||||
{
|
||||
SceNetInAddr addr;
|
||||
le_t<u16> port;
|
||||
u8 padding[2];
|
||||
}
|
||||
address;
|
||||
|
||||
le_t<u32> packetLoss;
|
||||
};
|
||||
|
||||
struct SceNpMatching2SignalingNetInfo
|
||||
{
|
||||
le_t<u32> size;
|
||||
SceNetInAddr localAddr;
|
||||
SceNetInAddr mappedAddr;
|
||||
le_t<s32> natStatus;
|
||||
};
|
||||
|
||||
extern psv_log_base sceNpMatching;
|
|
@ -2,335 +2,278 @@
|
|||
#include "Emu/System.h"
|
||||
#include "Emu/ARMv7/PSVFuncList.h"
|
||||
|
||||
#include "sceNpCommon.h"
|
||||
#include "sceNpScore.h"
|
||||
|
||||
extern psv_log_base sceNpScore;
|
||||
|
||||
typedef u32 SceNpScoreBoardId;
|
||||
typedef s64 SceNpScoreValue;
|
||||
typedef u32 SceNpScoreRankNumber;
|
||||
typedef s32 SceNpScorePcId;
|
||||
|
||||
struct SceNpScoreGameInfo
|
||||
s32 sceNpScoreInit(s32 threadPriority, s32 cpuAffinityMask, vm::ptr<void> option)
|
||||
{
|
||||
u32 infoSize;
|
||||
u8 pad[4];
|
||||
u8 data[192];
|
||||
};
|
||||
|
||||
struct SceNpScoreComment
|
||||
{
|
||||
char utf8Comment[64];
|
||||
};
|
||||
|
||||
struct SceNpScoreRankData
|
||||
{
|
||||
SceNpId npId;
|
||||
u8 reserved[49];
|
||||
u8 pad0[3];
|
||||
SceNpScorePcId pcId;
|
||||
SceNpScoreRankNumber serialRank;
|
||||
SceNpScoreRankNumber rank;
|
||||
SceNpScoreRankNumber highestRank;
|
||||
s32 hasGameData;
|
||||
u8 pad1[4];
|
||||
SceNpScoreValue scoreValue;
|
||||
u64 recordDate;
|
||||
};
|
||||
|
||||
struct SceNpScorePlayerRankData
|
||||
{
|
||||
s32 hasData;
|
||||
u8 pad0[4];
|
||||
SceNpScoreRankData rankData;
|
||||
};
|
||||
|
||||
struct SceNpScoreBoardInfo
|
||||
{
|
||||
u32 rankLimit;
|
||||
u32 updateMode;
|
||||
u32 sortMode;
|
||||
u32 uploadNumLimit;
|
||||
u32 uploadSizeLimit;
|
||||
};
|
||||
|
||||
struct SceNpScoreNpIdPcId
|
||||
{
|
||||
SceNpId npId;
|
||||
SceNpScorePcId pcId;
|
||||
u8 pad[4];
|
||||
};
|
||||
|
||||
s32 sceNpScoreInit(s32 threadPriority, s32 cpuAffinityMask, vm::psv::ptr<void> option)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNpScoreTerm(ARMv7Context&)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNpScoreCreateTitleCtx(vm::psv::ptr<const SceNpCommunicationId> titleId, vm::psv::ptr<const SceNpCommunicationPassphrase> passphrase, vm::psv::ptr<const SceNpId> selfNpId)
|
||||
s32 sceNpScoreCreateTitleCtx(vm::cptr<SceNpCommunicationId> titleId, vm::cptr<SceNpCommunicationPassphrase> passphrase, vm::cptr<SceNpId> selfNpId)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNpScoreDeleteTitleCtx(s32 titleCtxId)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNpScoreCreateRequest(s32 titleCtxId)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNpScoreDeleteRequest(s32 reqId)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNpScoreAbortRequest(s32 reqId)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNpScoreSetTimeout(s32 id, s32 resolveRetry, s32 resolveTimeout, s32 connTimeout, s32 sendTimeout, s32 recvTimeout)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNpScoreSetPlayerCharacterId(s32 id, SceNpScorePcId pcId)
|
||||
s32 sceNpScoreSetPlayerCharacterId(s32 id, s32 pcId)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNpScoreGetBoardInfo(s32 reqId, SceNpScoreBoardId boardId, vm::psv::ptr<SceNpScoreBoardInfo> boardInfo, vm::psv::ptr<void> option)
|
||||
s32 sceNpScoreGetBoardInfo(s32 reqId, u32 boardId, vm::ptr<SceNpScoreBoardInfo> boardInfo, vm::ptr<void> option)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNpScoreRecordScore(
|
||||
s32 reqId,
|
||||
SceNpScoreBoardId boardId,
|
||||
SceNpScoreValue score,
|
||||
vm::psv::ptr<const SceNpScoreComment> scoreComment,
|
||||
vm::psv::ptr<const SceNpScoreGameInfo> gameInfo,
|
||||
vm::psv::ptr<SceNpScoreRankNumber> tmpRank,
|
||||
vm::psv::ptr<const u64> compareDate,
|
||||
vm::psv::ptr<void> option)
|
||||
u32 boardId,
|
||||
s64 score,
|
||||
vm::cptr<SceNpScoreComment> scoreComment,
|
||||
vm::cptr<SceNpScoreGameInfo> gameInfo,
|
||||
vm::ptr<u32> tmpRank,
|
||||
vm::cptr<u64> compareDate,
|
||||
vm::ptr<void> option)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNpScoreRecordGameData(
|
||||
s32 reqId,
|
||||
SceNpScoreBoardId boardId,
|
||||
SceNpScoreValue score,
|
||||
u32 boardId,
|
||||
s64 score,
|
||||
u32 totalSize,
|
||||
u32 sendSize,
|
||||
vm::psv::ptr<const void> data,
|
||||
vm::psv::ptr<void> option)
|
||||
vm::cptr<void> data,
|
||||
vm::ptr<void> option)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNpScoreGetGameData(
|
||||
s32 reqId,
|
||||
SceNpScoreBoardId boardId,
|
||||
vm::psv::ptr<const SceNpId> npId,
|
||||
vm::psv::ptr<u32> totalSize,
|
||||
u32 boardId,
|
||||
vm::cptr<SceNpId> npId,
|
||||
vm::ptr<u32> totalSize,
|
||||
u32 recvSize,
|
||||
vm::psv::ptr<void> data,
|
||||
vm::psv::ptr<void> option)
|
||||
vm::ptr<void> data,
|
||||
vm::ptr<void> option)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNpScoreGetRankingByNpId(
|
||||
s32 reqId,
|
||||
SceNpScoreBoardId boardId,
|
||||
vm::psv::ptr<const SceNpId> npIdArray,
|
||||
u32 boardId,
|
||||
vm::cptr<SceNpId> npIdArray,
|
||||
u32 npIdArraySize,
|
||||
vm::psv::ptr<SceNpScorePlayerRankData> rankArray,
|
||||
vm::ptr<SceNpScorePlayerRankData> rankArray,
|
||||
u32 rankArraySize,
|
||||
vm::psv::ptr<SceNpScoreComment> commentArray,
|
||||
vm::ptr<SceNpScoreComment> commentArray,
|
||||
u32 commentArraySize,
|
||||
vm::psv::ptr<SceNpScoreGameInfo> infoArray,
|
||||
vm::ptr<SceNpScoreGameInfo> infoArray,
|
||||
u32 infoArraySize,
|
||||
u32 arrayNum,
|
||||
vm::psv::ptr<u64> lastSortDate,
|
||||
vm::psv::ptr<SceNpScoreRankNumber> totalRecord,
|
||||
vm::psv::ptr<void> option)
|
||||
vm::ptr<u64> lastSortDate,
|
||||
vm::ptr<u32> totalRecord,
|
||||
vm::ptr<void> option)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNpScoreGetRankingByRange(
|
||||
s32 reqId,
|
||||
SceNpScoreBoardId boardId,
|
||||
SceNpScoreRankNumber startSerialRank,
|
||||
vm::psv::ptr<SceNpScoreRankData> rankArray,
|
||||
u32 boardId,
|
||||
u32 startSerialRank,
|
||||
vm::ptr<SceNpScoreRankData> rankArray,
|
||||
u32 rankArraySize,
|
||||
vm::psv::ptr<SceNpScoreComment> commentArray,
|
||||
vm::ptr<SceNpScoreComment> commentArray,
|
||||
u32 commentArraySize,
|
||||
vm::psv::ptr<SceNpScoreGameInfo> infoArray,
|
||||
vm::ptr<SceNpScoreGameInfo> infoArray,
|
||||
u32 infoArraySize,
|
||||
u32 arrayNum,
|
||||
vm::psv::ptr<u64> lastSortDate,
|
||||
vm::psv::ptr<SceNpScoreRankNumber> totalRecord,
|
||||
vm::psv::ptr<void> option)
|
||||
vm::ptr<u64> lastSortDate,
|
||||
vm::ptr<u32> totalRecord,
|
||||
vm::ptr<void> option)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
|
||||
s32 sceNpScoreGetRankingByNpIdPcId(
|
||||
s32 reqId,
|
||||
SceNpScoreBoardId boardId,
|
||||
vm::psv::ptr<const SceNpScoreNpIdPcId> idArray,
|
||||
u32 boardId,
|
||||
vm::cptr<SceNpScoreNpIdPcId> idArray,
|
||||
u32 idArraySize,
|
||||
vm::psv::ptr<SceNpScorePlayerRankData> rankArray,
|
||||
vm::ptr<SceNpScorePlayerRankData> rankArray,
|
||||
u32 rankArraySize,
|
||||
vm::psv::ptr<SceNpScoreComment> commentArray,
|
||||
vm::ptr<SceNpScoreComment> commentArray,
|
||||
u32 commentArraySize,
|
||||
vm::psv::ptr<SceNpScoreGameInfo> infoArray,
|
||||
vm::ptr<SceNpScoreGameInfo> infoArray,
|
||||
u32 infoArraySize,
|
||||
u32 arrayNum,
|
||||
vm::psv::ptr<u64> lastSortDate,
|
||||
vm::psv::ptr<SceNpScoreRankNumber> totalRecord,
|
||||
vm::psv::ptr<void> option)
|
||||
vm::ptr<u64> lastSortDate,
|
||||
vm::ptr<u32> totalRecord,
|
||||
vm::ptr<void> option)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNpScoreCensorComment(s32 reqId, vm::psv::ptr<const char> comment, vm::psv::ptr<void> option)
|
||||
s32 sceNpScoreCensorComment(s32 reqId, vm::cptr<char> comment, vm::ptr<void> option)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNpScoreSanitizeComment(s32 reqId, vm::psv::ptr<const char> comment, vm::psv::ptr<char> sanitizedComment, vm::psv::ptr<void> option)
|
||||
s32 sceNpScoreSanitizeComment(s32 reqId, vm::cptr<char> comment, vm::ptr<char> sanitizedComment, vm::ptr<void> option)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNpScoreWaitAsync(s32 id, vm::psv::ptr<s32> result)
|
||||
s32 sceNpScoreWaitAsync(s32 id, vm::ptr<s32> result)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNpScorePollAsync(s32 reqId, vm::psv::ptr<s32> result)
|
||||
s32 sceNpScorePollAsync(s32 reqId, vm::ptr<s32> result)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNpScoreGetBoardInfoAsync(s32 reqId, SceNpScoreBoardId boardId, vm::psv::ptr<SceNpScoreBoardInfo> boardInfo, vm::psv::ptr<void> option)
|
||||
s32 sceNpScoreGetBoardInfoAsync(s32 reqId, u32 boardId, vm::ptr<SceNpScoreBoardInfo> boardInfo, vm::ptr<void> option)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNpScoreRecordScoreAsync(
|
||||
s32 reqId,
|
||||
SceNpScoreBoardId boardId,
|
||||
SceNpScoreValue score,
|
||||
vm::psv::ptr<const SceNpScoreComment> scoreComment,
|
||||
vm::psv::ptr<const SceNpScoreGameInfo> gameInfo,
|
||||
vm::psv::ptr<SceNpScoreRankNumber> tmpRank,
|
||||
vm::psv::ptr<const u64> compareDate,
|
||||
vm::psv::ptr<void> option)
|
||||
u32 boardId,
|
||||
s64 score,
|
||||
vm::cptr<SceNpScoreComment> scoreComment,
|
||||
vm::cptr<SceNpScoreGameInfo> gameInfo,
|
||||
vm::ptr<u32> tmpRank,
|
||||
vm::cptr<u64> compareDate,
|
||||
vm::ptr<void> option)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNpScoreRecordGameDataAsync(
|
||||
s32 reqId,
|
||||
SceNpScoreBoardId boardId,
|
||||
SceNpScoreValue score,
|
||||
u32 boardId,
|
||||
s64 score,
|
||||
u32 totalSize,
|
||||
u32 sendSize,
|
||||
vm::psv::ptr<const void> data,
|
||||
vm::psv::ptr<void> option)
|
||||
vm::cptr<void> data,
|
||||
vm::ptr<void> option)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNpScoreGetGameDataAsync(
|
||||
s32 reqId,
|
||||
SceNpScoreBoardId boardId,
|
||||
vm::psv::ptr<const SceNpId> npId,
|
||||
vm::psv::ptr<u32> totalSize,
|
||||
u32 boardId,
|
||||
vm::cptr<SceNpId> npId,
|
||||
vm::ptr<u32> totalSize,
|
||||
u32 recvSize,
|
||||
vm::psv::ptr<void> data,
|
||||
vm::psv::ptr<void> option)
|
||||
vm::ptr<void> data,
|
||||
vm::ptr<void> option)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNpScoreGetRankingByNpIdAsync(
|
||||
s32 reqId,
|
||||
SceNpScoreBoardId boardId,
|
||||
vm::psv::ptr<const SceNpId> npIdArray,
|
||||
u32 boardId,
|
||||
vm::cptr<SceNpId> npIdArray,
|
||||
u32 npIdArraySize,
|
||||
vm::psv::ptr<SceNpScorePlayerRankData> rankArray,
|
||||
vm::ptr<SceNpScorePlayerRankData> rankArray,
|
||||
u32 rankArraySize,
|
||||
vm::psv::ptr<SceNpScoreComment> commentArray,
|
||||
vm::ptr<SceNpScoreComment> commentArray,
|
||||
u32 commentArraySize,
|
||||
vm::psv::ptr<SceNpScoreGameInfo> infoArray,
|
||||
vm::ptr<SceNpScoreGameInfo> infoArray,
|
||||
u32 infoArraySize,
|
||||
u32 arrayNum,
|
||||
vm::psv::ptr<u64> lastSortDate,
|
||||
vm::psv::ptr<SceNpScoreRankNumber> totalRecord,
|
||||
vm::psv::ptr<void> option)
|
||||
vm::ptr<u64> lastSortDate,
|
||||
vm::ptr<u32> totalRecord,
|
||||
vm::ptr<void> option)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNpScoreGetRankingByRangeAsync(
|
||||
s32 reqId,
|
||||
SceNpScoreBoardId boardId,
|
||||
SceNpScoreRankNumber startSerialRank,
|
||||
vm::psv::ptr<SceNpScoreRankData> rankArray,
|
||||
u32 boardId,
|
||||
u32 startSerialRank,
|
||||
vm::ptr<SceNpScoreRankData> rankArray,
|
||||
u32 rankArraySize,
|
||||
vm::psv::ptr<SceNpScoreComment> commentArray,
|
||||
vm::ptr<SceNpScoreComment> commentArray,
|
||||
u32 commentArraySize,
|
||||
vm::psv::ptr<SceNpScoreGameInfo> infoArray,
|
||||
vm::ptr<SceNpScoreGameInfo> infoArray,
|
||||
u32 infoArraySize,
|
||||
u32 arrayNum,
|
||||
vm::psv::ptr<u64> lastSortDate,
|
||||
vm::psv::ptr<SceNpScoreRankNumber> totalRecord,
|
||||
vm::psv::ptr<void> option)
|
||||
vm::ptr<u64> lastSortDate,
|
||||
vm::ptr<u32> totalRecord,
|
||||
vm::ptr<void> option)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNpScoreGetRankingByNpIdPcIdAsync(
|
||||
s32 reqId,
|
||||
SceNpScoreBoardId boardId,
|
||||
vm::psv::ptr<const SceNpScoreNpIdPcId> idArray,
|
||||
u32 boardId,
|
||||
vm::cptr<SceNpScoreNpIdPcId> idArray,
|
||||
u32 idArraySize,
|
||||
vm::psv::ptr<SceNpScorePlayerRankData> rankArray,
|
||||
vm::ptr<SceNpScorePlayerRankData> rankArray,
|
||||
u32 rankArraySize,
|
||||
vm::psv::ptr<SceNpScoreComment> commentArray,
|
||||
vm::ptr<SceNpScoreComment> commentArray,
|
||||
u32 commentArraySize,
|
||||
vm::psv::ptr<SceNpScoreGameInfo> infoArray,
|
||||
vm::ptr<SceNpScoreGameInfo> infoArray,
|
||||
u32 infoArraySize,
|
||||
u32 arrayNum,
|
||||
vm::psv::ptr<u64> lastSortDate,
|
||||
vm::psv::ptr<SceNpScoreRankNumber> totalRecord,
|
||||
vm::psv::ptr<void> option)
|
||||
vm::ptr<u64> lastSortDate,
|
||||
vm::ptr<u32> totalRecord,
|
||||
vm::ptr<void> option)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNpScoreCensorCommentAsync(s32 reqId, vm::psv::ptr<const char> comment, vm::psv::ptr<void> option)
|
||||
s32 sceNpScoreCensorCommentAsync(s32 reqId, vm::cptr<char> comment, vm::ptr<void> option)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNpScoreSanitizeCommentAsync(s32 reqId, vm::psv::ptr<const char> comment, vm::psv::ptr<char> sanitizedComment, vm::psv::ptr<void> option)
|
||||
s32 sceNpScoreSanitizeCommentAsync(s32 reqId, vm::cptr<char> comment, vm::ptr<char> sanitizedComment, vm::ptr<void> option)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
#define REG_FUNC(nid, name) reg_psv_func(nid, &sceNpScore, #name, name)
|
||||
|
@ -340,6 +283,7 @@ psv_log_base sceNpScore("SceNpScore", []()
|
|||
sceNpScore.on_load = nullptr;
|
||||
sceNpScore.on_unload = nullptr;
|
||||
sceNpScore.on_stop = nullptr;
|
||||
sceNpScore.on_error = nullptr;
|
||||
|
||||
REG_FUNC(0x0433069F, sceNpScoreInit);
|
||||
REG_FUNC(0x2050F98F, sceNpScoreTerm);
|
||||
|
|
55
rpcs3/Emu/ARMv7/Modules/sceNpScore.h
Normal file
55
rpcs3/Emu/ARMv7/Modules/sceNpScore.h
Normal file
|
@ -0,0 +1,55 @@
|
|||
#pragma once
|
||||
|
||||
#include "sceNpCommon.h"
|
||||
|
||||
struct SceNpScoreGameInfo
|
||||
{
|
||||
le_t<u32> infoSize;
|
||||
u8 pad[4];
|
||||
u8 data[192];
|
||||
};
|
||||
|
||||
struct SceNpScoreComment
|
||||
{
|
||||
char utf8Comment[64];
|
||||
};
|
||||
|
||||
struct SceNpScoreRankData
|
||||
{
|
||||
SceNpId npId;
|
||||
u8 reserved[49];
|
||||
u8 pad0[3];
|
||||
le_t<s32> pcId;
|
||||
le_t<u32> serialRank;
|
||||
le_t<u32> rank;
|
||||
le_t<u32> highestRank;
|
||||
le_t<s32> hasGameData;
|
||||
u8 pad1[4];
|
||||
le_t<s64> scoreValue;
|
||||
le_t<u64> recordDate;
|
||||
};
|
||||
|
||||
struct SceNpScorePlayerRankData
|
||||
{
|
||||
le_t<s32> hasData;
|
||||
u8 pad0[4];
|
||||
SceNpScoreRankData rankData;
|
||||
};
|
||||
|
||||
struct SceNpScoreBoardInfo
|
||||
{
|
||||
le_t<u32> rankLimit;
|
||||
le_t<u32> updateMode;
|
||||
le_t<u32> sortMode;
|
||||
le_t<u32> uploadNumLimit;
|
||||
le_t<u32> uploadSizeLimit;
|
||||
};
|
||||
|
||||
struct SceNpScoreNpIdPcId
|
||||
{
|
||||
SceNpId npId;
|
||||
le_t<s32> pcId;
|
||||
u8 pad[4];
|
||||
};
|
||||
|
||||
extern psv_log_base sceNpScore;
|
|
@ -2,138 +2,128 @@
|
|||
#include "Emu/System.h"
|
||||
#include "Emu/ARMv7/PSVFuncList.h"
|
||||
|
||||
#include "sceNpCommon.h"
|
||||
#include "sceNpUtility.h"
|
||||
|
||||
extern psv_log_base sceNpUtility;
|
||||
|
||||
struct SceNpBandwidthTestResult
|
||||
s32 sceNpLookupInit(s32 usesAsync, s32 threadPriority, s32 cpuAffinityMask, vm::ptr<void> option)
|
||||
{
|
||||
double uploadBps;
|
||||
double downloadBps;
|
||||
s32 result;
|
||||
char padding[4];
|
||||
};
|
||||
|
||||
s32 sceNpLookupInit(s32 usesAsync, s32 threadPriority, s32 cpuAffinityMask, vm::psv::ptr<void> option)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNpLookupTerm(ARMv7Context&)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNpLookupCreateTitleCtx(vm::psv::ptr<const SceNpCommunicationId> titleId, vm::psv::ptr<const SceNpId> selfNpId)
|
||||
s32 sceNpLookupCreateTitleCtx(vm::cptr<SceNpCommunicationId> titleId, vm::cptr<SceNpId> selfNpId)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNpLookupDeleteTitleCtx(s32 titleCtxId)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNpLookupCreateRequest(s32 titleCtxId)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNpLookupDeleteRequest(s32 reqId)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNpLookupAbortRequest(s32 reqId)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNpLookupSetTimeout(s32 id, s32 resolveRetry, u32 resolveTimeout, u32 connTimeout, u32 sendTimeout, u32 recvTimeout)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNpLookupWaitAsync(s32 reqId, vm::psv::ptr<s32> result)
|
||||
s32 sceNpLookupWaitAsync(s32 reqId, vm::ptr<s32> result)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNpLookupPollAsync(s32 reqId, vm::psv::ptr<s32> result)
|
||||
s32 sceNpLookupPollAsync(s32 reqId, vm::ptr<s32> result)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNpLookupNpId(s32 reqId, vm::psv::ptr<const SceNpOnlineId> onlineId, vm::psv::ptr<SceNpId> npId, vm::psv::ptr<void> option)
|
||||
s32 sceNpLookupNpId(s32 reqId, vm::cptr<SceNpOnlineId> onlineId, vm::ptr<SceNpId> npId, vm::ptr<void> option)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNpLookupNpIdAsync(s32 reqId, vm::psv::ptr<const SceNpOnlineId> onlineId, vm::psv::ptr<SceNpId> npId, vm::psv::ptr<void> option)
|
||||
s32 sceNpLookupNpIdAsync(s32 reqId, vm::cptr<SceNpOnlineId> onlineId, vm::ptr<SceNpId> npId, vm::ptr<void> option)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNpLookupUserProfile(
|
||||
s32 reqId,
|
||||
s32 avatarSizeType,
|
||||
vm::psv::ptr<const SceNpId> npId,
|
||||
vm::psv::ptr<SceNpUserInformation> userInfo,
|
||||
vm::psv::ptr<SceNpAboutMe> aboutMe,
|
||||
vm::psv::ptr<SceNpMyLanguages> languages,
|
||||
vm::psv::ptr<SceNpCountryCode> countryCode,
|
||||
vm::psv::ptr<void> avatarImageData,
|
||||
vm::cptr<SceNpId> npId,
|
||||
vm::ptr<SceNpUserInformation> userInfo,
|
||||
vm::ptr<SceNpAboutMe> aboutMe,
|
||||
vm::ptr<SceNpMyLanguages> languages,
|
||||
vm::ptr<SceNpCountryCode> countryCode,
|
||||
vm::ptr<void> avatarImageData,
|
||||
u32 avatarImageDataMaxSize,
|
||||
vm::psv::ptr<u32> avatarImageDataSize,
|
||||
vm::psv::ptr<void> option)
|
||||
vm::ptr<u32> avatarImageDataSize,
|
||||
vm::ptr<void> option)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNpLookupUserProfileAsync(
|
||||
s32 reqId,
|
||||
s32 avatarSizeType,
|
||||
vm::psv::ptr<const SceNpId> npId,
|
||||
vm::psv::ptr<SceNpUserInformation> userInfo,
|
||||
vm::psv::ptr<SceNpAboutMe> aboutMe,
|
||||
vm::psv::ptr<SceNpMyLanguages> languages,
|
||||
vm::psv::ptr<SceNpCountryCode> countryCode,
|
||||
vm::psv::ptr<void> avatarImageData,
|
||||
vm::cptr<SceNpId> npId,
|
||||
vm::ptr<SceNpUserInformation> userInfo,
|
||||
vm::ptr<SceNpAboutMe> aboutMe,
|
||||
vm::ptr<SceNpMyLanguages> languages,
|
||||
vm::ptr<SceNpCountryCode> countryCode,
|
||||
vm::ptr<void> avatarImageData,
|
||||
u32 avatarImageDataMaxSize,
|
||||
vm::psv::ptr<u32> avatarImageDataSize,
|
||||
vm::psv::ptr<void> option)
|
||||
vm::ptr<u32> avatarImageDataSize,
|
||||
vm::ptr<void> option)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNpLookupAvatarImage(s32 reqId, vm::psv::ptr<const SceNpAvatarUrl> avatarUrl, vm::psv::ptr<SceNpAvatarImage> avatarImage, vm::psv::ptr<void> option)
|
||||
s32 sceNpLookupAvatarImage(s32 reqId, vm::cptr<SceNpAvatarUrl> avatarUrl, vm::ptr<SceNpAvatarImage> avatarImage, vm::ptr<void> option)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNpLookupAvatarImageAsync(s32 reqId, vm::psv::ptr<const SceNpAvatarUrl> avatarUrl, vm::psv::ptr<SceNpAvatarImage> avatarImage, vm::psv::ptr<void> option)
|
||||
s32 sceNpLookupAvatarImageAsync(s32 reqId, vm::cptr<SceNpAvatarUrl> avatarUrl, vm::ptr<SceNpAvatarImage> avatarImage, vm::ptr<void> option)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNpBandwidthTestInitStart(s32 initPriority, s32 cpuAffinityMask)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNpBandwidthTestGetStatus()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNpBandwidthTestShutdown(vm::psv::ptr<SceNpBandwidthTestResult> result)
|
||||
s32 sceNpBandwidthTestShutdown(vm::ptr<SceNpBandwidthTestResult> result)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 sceNpBandwidthTestAbort()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
throw EXCEPTION("");
|
||||
}
|
||||
|
||||
#define REG_FUNC(nid, name) reg_psv_func(nid, &sceNpUtility, #name, name)
|
||||
|
@ -143,6 +133,7 @@ psv_log_base sceNpUtility("SceNpUtility", []()
|
|||
sceNpUtility.on_load = nullptr;
|
||||
sceNpUtility.on_unload = nullptr;
|
||||
sceNpUtility.on_stop = nullptr;
|
||||
sceNpUtility.on_error = nullptr;
|
||||
|
||||
REG_FUNC(0x9246A673, sceNpLookupInit);
|
||||
REG_FUNC(0x0158B61B, sceNpLookupTerm);
|
||||
|
|
13
rpcs3/Emu/ARMv7/Modules/sceNpUtility.h
Normal file
13
rpcs3/Emu/ARMv7/Modules/sceNpUtility.h
Normal file
|
@ -0,0 +1,13 @@
|
|||
#pragma once
|
||||
|
||||
#include "sceNpCommon.h"
|
||||
|
||||
struct SceNpBandwidthTestResult
|
||||
{
|
||||
le_t<double> uploadBps;
|
||||
le_t<double> downloadBps;
|
||||
le_t<s32> result;
|
||||
char padding[4];
|
||||
};
|
||||
|
||||
extern psv_log_base sceNpUtility;
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue