mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-21 18:22:33 +01:00
Remove PSP2
This commit is contained in:
parent
13aa88c3c4
commit
76be7d40ac
@ -13,7 +13,7 @@
|
||||
#include "Emu/Cell/SPUThread.h"
|
||||
|
||||
#ifndef _WIN32
|
||||
#include"fcntl.h"
|
||||
#include "fcntl.h"
|
||||
#endif
|
||||
|
||||
extern void ppu_set_breakpoint(u32 addr);
|
||||
@ -365,7 +365,7 @@ std::string GDBDebugServer::get_reg(std::shared_ptr<ppu_thread> thread, u32 rid)
|
||||
return std::string(8, 'x');
|
||||
default:
|
||||
if (rid > 70) return "";
|
||||
return (rid > 31)
|
||||
return (rid > 31)
|
||||
? u64_to_padded_hex(reinterpret_cast<u64&>(thread->fpr[rid - 32])) //fpr
|
||||
: u64_to_padded_hex(thread->gpr[rid]); //gpr
|
||||
}
|
||||
@ -453,13 +453,12 @@ bool GDBDebugServer::cmd_thread_info(gdb_cmd & cmd)
|
||||
result += u64_to_padded_hex(static_cast<u64>(cpu.id));
|
||||
};
|
||||
idm::select<ppu_thread>(on_select);
|
||||
idm::select<ARMv7Thread>(on_select);
|
||||
idm::select<RawSPUThread>(on_select);
|
||||
idm::select<SPUThread>(on_select);
|
||||
|
||||
//todo: this may exceed max command length
|
||||
result = "m" + result + "l";
|
||||
|
||||
|
||||
return send_cmd_ack(result);;
|
||||
}
|
||||
|
||||
@ -768,7 +767,7 @@ void GDBDebugServer::on_task()
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (std::runtime_error& e)
|
||||
catch (std::runtime_error& e)
|
||||
{
|
||||
if (client_socket) {
|
||||
closesocket(client_socket);
|
||||
|
@ -177,7 +177,6 @@ namespace logs
|
||||
channel HLE("HLE");
|
||||
channel PPU("PPU");
|
||||
channel SPU("SPU");
|
||||
channel ARMv7("ARMv7");
|
||||
|
||||
// Channel registry mutex
|
||||
semaphore<> g_mutex;
|
||||
|
@ -104,7 +104,6 @@ namespace logs
|
||||
extern channel HLE;
|
||||
extern channel PPU;
|
||||
extern channel SPU;
|
||||
extern channel ARMv7;
|
||||
|
||||
// Log level control: set all channels to level::notice
|
||||
void reset();
|
||||
|
@ -90,7 +90,7 @@ enum x64_reg_t : u32
|
||||
X64R_XMM13,
|
||||
X64R_XMM14,
|
||||
X64R_XMM15,
|
||||
|
||||
|
||||
X64R_AL,
|
||||
X64R_CL,
|
||||
X64R_DL,
|
||||
@ -99,7 +99,7 @@ enum x64_reg_t : u32
|
||||
X64R_CH,
|
||||
X64R_DH,
|
||||
X64R_BH,
|
||||
|
||||
|
||||
X64_NOT_SET,
|
||||
X64_IMM8,
|
||||
X64_IMM16,
|
||||
@ -176,7 +176,7 @@ void decode_x64_reg_op(const u8* code, x64_op_t& out_op, x64_reg_t& out_reg, siz
|
||||
{
|
||||
LOG_ERROR(MEMORY, "decode_x64_reg_op(%016llxh): LOCK prefix found twice", (size_t)code - out_length);
|
||||
}
|
||||
|
||||
|
||||
lock = true;
|
||||
continue;
|
||||
}
|
||||
@ -186,7 +186,7 @@ void decode_x64_reg_op(const u8* code, x64_op_t& out_op, x64_reg_t& out_reg, siz
|
||||
{
|
||||
LOG_ERROR(MEMORY, "decode_x64_reg_op(%016llxh): REPNE/REPNZ prefix found twice", (size_t)code - out_length);
|
||||
}
|
||||
|
||||
|
||||
repne = true;
|
||||
continue;
|
||||
}
|
||||
@ -196,7 +196,7 @@ void decode_x64_reg_op(const u8* code, x64_op_t& out_op, x64_reg_t& out_reg, siz
|
||||
{
|
||||
LOG_ERROR(MEMORY, "decode_x64_reg_op(%016llxh): REP/REPE/REPZ prefix found twice", (size_t)code - out_length);
|
||||
}
|
||||
|
||||
|
||||
repe = true;
|
||||
continue;
|
||||
}
|
||||
@ -225,7 +225,7 @@ void decode_x64_reg_op(const u8* code, x64_op_t& out_op, x64_reg_t& out_reg, siz
|
||||
{
|
||||
LOG_ERROR(MEMORY, "decode_x64_reg_op(%016llxh): operand-size override prefix found twice", (size_t)code - out_length);
|
||||
}
|
||||
|
||||
|
||||
oso = true;
|
||||
continue;
|
||||
}
|
||||
@ -917,7 +917,7 @@ bool get_x64_reg_value(x64_context* context, x64_reg_t reg, size_t d_size, size_
|
||||
else if (reg == X64_IMM32)
|
||||
{
|
||||
const s32 imm_value = *(s32*)(RIP(context) + i_size - 4);
|
||||
|
||||
|
||||
switch (d_size)
|
||||
{
|
||||
case 4: out_value = (u32)imm_value; return true;
|
||||
@ -1254,7 +1254,7 @@ bool handle_access_violation(u32 addr, bool is_writing, x64_context* context)
|
||||
}
|
||||
if (entry.start_addr <= addr && addr <= addr + mem->size - 1)
|
||||
{
|
||||
// Place the page fault event onto table so that other functions [sys_mmapper_free_address and ppu pagefault funcs]
|
||||
// Place the page fault event onto table so that other functions [sys_mmapper_free_address and ppu pagefault funcs]
|
||||
// know that this thread is page faulted and where.
|
||||
|
||||
auto pf_entries = fxm::get_always<page_fault_event_entries>();
|
||||
@ -1274,7 +1274,7 @@ bool handle_access_violation(u32 addr, bool is_writing, x64_context* context)
|
||||
addr, data3 == SYS_MEMORY_PAGE_FAULT_CAUSE_READ_ONLY ? "writing read-only" : "using unmapped");
|
||||
|
||||
error_code sending_error = sys_event_port_send(entry.port_id, data1, data2, data3);
|
||||
|
||||
|
||||
// If we fail due to being busy, wait a bit and try again.
|
||||
while (sending_error == CELL_EBUSY)
|
||||
{
|
||||
@ -1282,7 +1282,7 @@ bool handle_access_violation(u32 addr, bool is_writing, x64_context* context)
|
||||
thread_ctrl::wait_for(1000);
|
||||
sending_error = sys_event_port_send(entry.port_id, data1, data2, data3);
|
||||
}
|
||||
|
||||
|
||||
if (sending_error)
|
||||
{
|
||||
fmt::throw_exception("Unknown error %x while trying to pass page fault.", sending_error.value);
|
||||
@ -1707,7 +1707,7 @@ bool thread_ctrl::_wait_for(u64 usec)
|
||||
}
|
||||
}
|
||||
_lock{_this->m_mutex};
|
||||
|
||||
|
||||
do
|
||||
{
|
||||
// Mutex is unlocked at the start and after the waiting
|
||||
|
@ -450,7 +450,7 @@ public:
|
||||
{
|
||||
case 0:
|
||||
return this->_u32[3] >> 8 & 0x3;
|
||||
|
||||
|
||||
case 1:
|
||||
return this->_u32[3] >> 10 & 0x3;
|
||||
|
||||
@ -576,7 +576,7 @@ public:
|
||||
std::array<std::pair<u32, std::weak_ptr<lv2_event_queue>>, 32> spuq; // Event Queue Keys for SPU Thread
|
||||
std::weak_ptr<lv2_event_queue> spup[64]; // SPU Ports
|
||||
|
||||
u32 pc = 0; //
|
||||
u32 pc = 0; //
|
||||
const u32 index; // SPU index
|
||||
const u32 offset; // SPU LS offset
|
||||
lv2_spu_group* const group; // SPU Thread Group
|
||||
|
@ -222,7 +222,7 @@ error_code sys_spu_thread_initialize(vm::ptr<u32> thread, u32 group_id, u32 spu_
|
||||
{
|
||||
return CELL_EINVAL;
|
||||
}
|
||||
|
||||
|
||||
if (group->threads[spu_num] || group->run_state != SPU_THREAD_GROUP_STATUS_NOT_INITIALIZED)
|
||||
{
|
||||
return CELL_EBUSY;
|
||||
@ -660,7 +660,7 @@ error_code sys_spu_thread_group_join(ppu_thread& ppu, u32 id, vm::ptr<u32> cause
|
||||
group->join_state &= ~SPU_TGJSF_IS_JOINING;
|
||||
group->run_state = SPU_THREAD_GROUP_STATUS_INITIALIZED; // hack
|
||||
}
|
||||
|
||||
|
||||
ppu.test_state();
|
||||
|
||||
switch (join_state & ~SPU_TGJSF_IS_JOINING)
|
||||
@ -690,7 +690,7 @@ error_code sys_spu_thread_group_join(ppu_thread& ppu, u32 id, vm::ptr<u32> cause
|
||||
{
|
||||
*status = group->exit_status;
|
||||
}
|
||||
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
@ -927,7 +927,7 @@ error_code sys_spu_thread_group_connect_event(u32 id, u32 eq, u32 et)
|
||||
{
|
||||
return CELL_EBUSY;
|
||||
}
|
||||
|
||||
|
||||
group->ep_run = queue;
|
||||
break;
|
||||
}
|
||||
@ -1376,7 +1376,7 @@ error_code sys_raw_spu_create_interrupt_tag(u32 id, u32 class_id, u32 hwthread,
|
||||
*intrtag = tag;
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
|
@ -130,7 +130,7 @@ namespace vm
|
||||
{
|
||||
cpu = nullptr;
|
||||
}
|
||||
|
||||
|
||||
g_mutex.lock_shared();
|
||||
|
||||
if (cpu)
|
||||
@ -344,7 +344,7 @@ namespace vm
|
||||
utils::memory_commit(g_exec_addr + addr, size);
|
||||
}
|
||||
|
||||
if (g_cfg.core.ppu_debug && g_system == system_type::ps3)
|
||||
if (g_cfg.core.ppu_debug)
|
||||
{
|
||||
utils::memory_commit(g_stat_addr + addr, size);
|
||||
}
|
||||
@ -442,7 +442,7 @@ namespace vm
|
||||
utils::memory_decommit(g_base_addr + addr, size);
|
||||
utils::memory_decommit(g_exec_addr + addr, size);
|
||||
|
||||
if (g_cfg.core.ppu_debug && g_system == system_type::ps3)
|
||||
if (g_cfg.core.ppu_debug)
|
||||
{
|
||||
utils::memory_decommit(g_stat_addr + addr, size);
|
||||
}
|
||||
@ -457,7 +457,7 @@ namespace vm
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -768,7 +768,7 @@ namespace vm
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
// search location by address
|
||||
for (auto& block : g_locations)
|
||||
{
|
||||
@ -781,7 +781,7 @@ namespace vm
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
namespace ps3
|
||||
inline namespace ps3
|
||||
{
|
||||
void init()
|
||||
{
|
||||
@ -798,37 +798,6 @@ namespace vm
|
||||
}
|
||||
}
|
||||
|
||||
namespace psv
|
||||
{
|
||||
void init()
|
||||
{
|
||||
g_locations =
|
||||
{
|
||||
std::make_shared<block_t>(0x81000000, 0x10000000), // RAM
|
||||
std::make_shared<block_t>(0x91000000, 0x2F000000), // user
|
||||
std::make_shared<block_t>(0xC0000000, 0x10000000), // video (arbitrarily)
|
||||
std::make_shared<block_t>(0xD0000000, 0x10000000), // stack (arbitrarily)
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
namespace psp
|
||||
{
|
||||
void init()
|
||||
{
|
||||
g_locations =
|
||||
{
|
||||
std::make_shared<block_t>(0x08000000, 0x02000000), // RAM
|
||||
std::make_shared<block_t>(0x08800000, 0x01800000), // user
|
||||
std::make_shared<block_t>(0x04000000, 0x00200000), // VRAM
|
||||
nullptr, // stack
|
||||
|
||||
std::make_shared<block_t>(0x00010000, 0x00004000), // scratchpad
|
||||
std::make_shared<block_t>(0x88000000, 0x00800000), // kernel
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
void close()
|
||||
{
|
||||
g_locations.clear();
|
||||
|
@ -19,7 +19,7 @@ namespace vm
|
||||
user_space,
|
||||
video,
|
||||
stack,
|
||||
|
||||
|
||||
memory_location_max,
|
||||
any = 0xffffffff,
|
||||
};
|
||||
@ -268,7 +268,7 @@ namespace vm
|
||||
g_base_addr[addr] = value;
|
||||
}
|
||||
|
||||
namespace ps3
|
||||
inline namespace ps3
|
||||
{
|
||||
// Convert specified PS3 address to a pointer of specified (possibly converted to BE) type
|
||||
template<typename T> inline to_be_t<T>* _ptr(u32 addr)
|
||||
@ -314,58 +314,6 @@ namespace vm
|
||||
|
||||
void init();
|
||||
}
|
||||
|
||||
namespace psv
|
||||
{
|
||||
template<typename T> inline to_le_t<T>* _ptr(u32 addr)
|
||||
{
|
||||
return static_cast<to_le_t<T>*>(base(addr));
|
||||
}
|
||||
|
||||
template<typename T> inline to_le_t<T>& _ref(u32 addr)
|
||||
{
|
||||
return *_ptr<T>(addr);
|
||||
}
|
||||
|
||||
inline const le_t<u16>& read16(u32 addr)
|
||||
{
|
||||
return _ref<u16>(addr);
|
||||
}
|
||||
|
||||
inline void write16(u32 addr, le_t<u16> value)
|
||||
{
|
||||
_ref<u16>(addr) = value;
|
||||
}
|
||||
|
||||
inline const le_t<u32>& read32(u32 addr)
|
||||
{
|
||||
return _ref<u32>(addr);
|
||||
}
|
||||
|
||||
inline void write32(u32 addr, le_t<u32> value)
|
||||
{
|
||||
_ref<u32>(addr) = value;
|
||||
}
|
||||
|
||||
inline const le_t<u64>& read64(u32 addr)
|
||||
{
|
||||
return _ref<u64>(addr);
|
||||
}
|
||||
|
||||
inline void write64(u32 addr, le_t<u64> value)
|
||||
{
|
||||
_ref<u64>(addr) = value;
|
||||
}
|
||||
|
||||
void init();
|
||||
}
|
||||
|
||||
namespace psp
|
||||
{
|
||||
using namespace psv;
|
||||
|
||||
void init();
|
||||
}
|
||||
|
||||
void close();
|
||||
}
|
||||
|
@ -3,7 +3,6 @@
|
||||
#include "vm_ref.h"
|
||||
|
||||
class ppu_thread;
|
||||
class ARMv7Thread;
|
||||
|
||||
namespace vm
|
||||
{
|
||||
@ -260,9 +259,6 @@ namespace vm
|
||||
|
||||
// Callback; defined in PPUCallback.h, passing context is mandatory
|
||||
RT operator()(ppu_thread& ppu, T... args) const;
|
||||
|
||||
// Callback; defined in ARMv7Callback.h, passing context is mandatory
|
||||
RT operator()(ARMv7Thread& cpu, T... args) const;
|
||||
};
|
||||
|
||||
template<typename AT, typename RT, typename... T>
|
||||
@ -291,7 +287,7 @@ namespace vm
|
||||
// LE pointer to BE data
|
||||
template<typename T, typename AT = u32> using lptrb = _ptr_base<to_be_t<T>, to_le_t<AT>>;
|
||||
|
||||
namespace ps3
|
||||
inline namespace ps3
|
||||
{
|
||||
// Default pointer type for PS3 HLE functions (Native endianness pointer to BE data)
|
||||
template<typename T, typename AT = u32> using ptr = ptrb<T, AT>;
|
||||
@ -324,39 +320,6 @@ namespace vm
|
||||
}
|
||||
}
|
||||
|
||||
namespace psv
|
||||
{
|
||||
// Default pointer type for PSV HLE functions (Native endianness pointer to LE data)
|
||||
template<typename T> using ptr = ptrl<T>;
|
||||
template<typename T> using cptr = ptr<const T>;
|
||||
|
||||
// Default pointer to pointer type for PSV HLE functions (Native endianness pointer to LE pointer to LE data)
|
||||
template<typename T> using pptr = ptr<ptr<T>>;
|
||||
template<typename T> using cpptr = pptr<const T>;
|
||||
|
||||
// Default pointer type for PSV HLE structures (LE pointer to LE data)
|
||||
template<typename T> using lptr = lptrl<T>;
|
||||
template<typename T> using lcptr = lptr<const T>;
|
||||
|
||||
// Default pointer to pointer type for PSV HLE structures (LE pointer to LE pointer to LE data)
|
||||
template<typename T> using lpptr = lptr<ptr<T>>;
|
||||
template<typename T> using lcpptr = lpptr<const T>;
|
||||
|
||||
// Perform static_cast (for example, vm::ptr<void> to vm::ptr<char>)
|
||||
template<typename CT, typename T, typename AT, typename = decltype(static_cast<to_le_t<CT>*>(std::declval<T*>()))>
|
||||
inline _ptr_base<to_le_t<CT>> static_ptr_cast(const _ptr_base<T, AT>& other)
|
||||
{
|
||||
return vm::cast(other.addr(), HERE);
|
||||
}
|
||||
|
||||
// Perform const_cast (for example, vm::cptr<char> to vm::ptr<char>)
|
||||
template<typename CT, typename T, typename AT, typename = decltype(const_cast<to_le_t<CT>*>(std::declval<T*>()))>
|
||||
inline _ptr_base<to_le_t<CT>> const_ptr_cast(const _ptr_base<T, AT>& other)
|
||||
{
|
||||
return vm::cast(other.addr(), HERE);
|
||||
}
|
||||
}
|
||||
|
||||
struct null_t
|
||||
{
|
||||
template<typename T, typename AT>
|
||||
@ -400,7 +363,7 @@ namespace vm
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
template<typename T, typename AT>
|
||||
friend bool operator <=(const null_t&, const _ptr_base<T, AT>&)
|
||||
{
|
||||
|
@ -163,7 +163,7 @@ namespace vm
|
||||
// LE reference to BE data
|
||||
template<typename T, typename AT = u32> using lrefb = _ref_base<to_be_t<T>, to_le_t<AT>>;
|
||||
|
||||
namespace ps3
|
||||
inline namespace ps3
|
||||
{
|
||||
// default reference for PS3 HLE functions (Native endianness reference to BE data)
|
||||
template<typename T, typename AT = u32> using ref = refb<T, AT>;
|
||||
@ -171,15 +171,6 @@ namespace vm
|
||||
// default reference for PS3 HLE structures (BE reference to BE data)
|
||||
template<typename T, typename AT = u32> using bref = brefb<T, AT>;
|
||||
}
|
||||
|
||||
namespace psv
|
||||
{
|
||||
// default reference for PSV HLE functions (Native endianness reference to LE data)
|
||||
template<typename T> using ref = refl<T>;
|
||||
|
||||
// default reference for PSV HLE structures (LE reference to LE data)
|
||||
template<typename T> using lref = lrefl<T>;
|
||||
}
|
||||
}
|
||||
|
||||
// Change AT endianness to BE/LE
|
||||
|
@ -114,7 +114,7 @@ namespace vm
|
||||
// BE variable
|
||||
template<typename T, typename A> using varb = _var_base<to_be_t<T>, A>;
|
||||
|
||||
namespace ps3
|
||||
inline namespace ps3
|
||||
{
|
||||
// BE variable
|
||||
template<typename T, typename A = stack_allocator<ppu_thread>> using var = varb<T, A>;
|
||||
@ -141,32 +141,4 @@ namespace vm
|
||||
{
|
||||
};
|
||||
}
|
||||
|
||||
namespace psv
|
||||
{
|
||||
// LE variable
|
||||
template<typename T, typename A = stack_allocator<ARMv7Thread>> using var = varl<T, A>;
|
||||
|
||||
// Make LE variable initialized from value
|
||||
template<typename T, typename A = stack_allocator<ARMv7Thread>>
|
||||
inline auto make_var(const T& value)
|
||||
{
|
||||
return var<T, A>(value);
|
||||
}
|
||||
|
||||
// Make char[] variable initialized from std::string
|
||||
template<typename A = stack_allocator<ARMv7Thread>>
|
||||
static auto make_str(const std::string& str)
|
||||
{
|
||||
var<char[], A> var_(size32(str) + 1);
|
||||
std::memcpy(var_.get_ptr(), str.c_str(), str.size() + 1);
|
||||
return var_;
|
||||
}
|
||||
|
||||
// Global HLE variable
|
||||
template<typename T>
|
||||
struct gvar : ptr<T>
|
||||
{
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -1,17 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include "ARMv7Function.h"
|
||||
|
||||
namespace vm
|
||||
{
|
||||
template<typename AT, typename RT, typename... T>
|
||||
FORCE_INLINE RT _ptr_base<RT(T...), AT>::operator()(ARMv7Thread& cpu, T... args) const
|
||||
{
|
||||
return arm_func_detail::func_caller<RT, T...>::call(cpu, vm::cast(this->addr(), HERE), args...);
|
||||
}
|
||||
}
|
||||
|
||||
template<typename RT, typename... T> inline RT cb_call(ARMv7Thread& cpu, u32 addr, T... args)
|
||||
{
|
||||
return arm_func_detail::func_caller<RT, T...>::call(cpu, addr, args...);
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -1,459 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include "Emu/CPU/CPUDisAsm.h"
|
||||
|
||||
enum class arm_encoding;
|
||||
|
||||
class ARMv7DisAsm final : public CPUDisAsm
|
||||
{
|
||||
public:
|
||||
ARMv7DisAsm(CPUDisAsmMode mode) : CPUDisAsm(mode)
|
||||
{
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual u32 DisAsmBranchTarget(const s32 imm) override
|
||||
{
|
||||
// TODO: ARM
|
||||
return dump_pc + (true ? 4 : 8) + imm;
|
||||
}
|
||||
|
||||
virtual void Write(const std::string& value) override;
|
||||
|
||||
private:
|
||||
template<typename... Args>
|
||||
void write(const char* fmt, const Args&... args)
|
||||
{
|
||||
Write(fmt::format(fmt, args...));
|
||||
}
|
||||
|
||||
public:
|
||||
void UNK(const u32 op, const u32 cond);
|
||||
|
||||
template<arm_encoding type> void HACK(const u32, const u32);
|
||||
template<arm_encoding type> void MRC_(const u32, const u32);
|
||||
|
||||
template<arm_encoding type> void ADC_IMM(const u32, const u32);
|
||||
template<arm_encoding type> void ADC_REG(const u32, const u32);
|
||||
template<arm_encoding type> void ADC_RSR(const u32, const u32);
|
||||
|
||||
template<arm_encoding type> void ADD_IMM(const u32, const u32);
|
||||
template<arm_encoding type> void ADD_REG(const u32, const u32);
|
||||
template<arm_encoding type> void ADD_RSR(const u32, const u32);
|
||||
template<arm_encoding type> void ADD_SPI(const u32, const u32);
|
||||
template<arm_encoding type> void ADD_SPR(const u32, const u32);
|
||||
|
||||
template<arm_encoding type> void ADR(const u32, const u32);
|
||||
|
||||
template<arm_encoding type> void AND_IMM(const u32, const u32);
|
||||
template<arm_encoding type> void AND_REG(const u32, const u32);
|
||||
template<arm_encoding type> void AND_RSR(const u32, const u32);
|
||||
|
||||
template<arm_encoding type> void ASR_IMM(const u32, const u32);
|
||||
template<arm_encoding type> void ASR_REG(const u32, const u32);
|
||||
|
||||
template<arm_encoding type> void B(const u32, const u32);
|
||||
|
||||
template<arm_encoding type> void BFC(const u32, const u32);
|
||||
template<arm_encoding type> void BFI(const u32, const u32);
|
||||
|
||||
template<arm_encoding type> void BIC_IMM(const u32, const u32);
|
||||
template<arm_encoding type> void BIC_REG(const u32, const u32);
|
||||
template<arm_encoding type> void BIC_RSR(const u32, const u32);
|
||||
|
||||
template<arm_encoding type> void BKPT(const u32, const u32);
|
||||
|
||||
template<arm_encoding type> void BL(const u32, const u32);
|
||||
template<arm_encoding type> void BLX(const u32, const u32);
|
||||
template<arm_encoding type> void BX(const u32, const u32);
|
||||
|
||||
template<arm_encoding type> void CB_Z(const u32, const u32);
|
||||
|
||||
template<arm_encoding type> void CLZ(const u32, const u32);
|
||||
|
||||
template<arm_encoding type> void CMN_IMM(const u32, const u32);
|
||||
template<arm_encoding type> void CMN_REG(const u32, const u32);
|
||||
template<arm_encoding type> void CMN_RSR(const u32, const u32);
|
||||
|
||||
template<arm_encoding type> void CMP_IMM(const u32, const u32);
|
||||
template<arm_encoding type> void CMP_REG(const u32, const u32);
|
||||
template<arm_encoding type> void CMP_RSR(const u32, const u32);
|
||||
|
||||
template<arm_encoding type> void DBG(const u32, const u32);
|
||||
template<arm_encoding type> void DMB(const u32, const u32);
|
||||
template<arm_encoding type> void DSB(const u32, const u32);
|
||||
|
||||
template<arm_encoding type> void EOR_IMM(const u32, const u32);
|
||||
template<arm_encoding type> void EOR_REG(const u32, const u32);
|
||||
template<arm_encoding type> void EOR_RSR(const u32, const u32);
|
||||
|
||||
template<arm_encoding type> void IT(const u32, const u32);
|
||||
|
||||
template<arm_encoding type> void LDM(const u32, const u32);
|
||||
template<arm_encoding type> void LDMDA(const u32, const u32);
|
||||
template<arm_encoding type> void LDMDB(const u32, const u32);
|
||||
template<arm_encoding type> void LDMIB(const u32, const u32);
|
||||
|
||||
template<arm_encoding type> void LDR_IMM(const u32, const u32);
|
||||
template<arm_encoding type> void LDR_LIT(const u32, const u32);
|
||||
template<arm_encoding type> void LDR_REG(const u32, const u32);
|
||||
|
||||
template<arm_encoding type> void LDRB_IMM(const u32, const u32);
|
||||
template<arm_encoding type> void LDRB_LIT(const u32, const u32);
|
||||
template<arm_encoding type> void LDRB_REG(const u32, const u32);
|
||||
|
||||
template<arm_encoding type> void LDRD_IMM(const u32, const u32);
|
||||
template<arm_encoding type> void LDRD_LIT(const u32, const u32);
|
||||
template<arm_encoding type> void LDRD_REG(const u32, const u32);
|
||||
|
||||
template<arm_encoding type> void LDRH_IMM(const u32, const u32);
|
||||
template<arm_encoding type> void LDRH_LIT(const u32, const u32);
|
||||
template<arm_encoding type> void LDRH_REG(const u32, const u32);
|
||||
|
||||
template<arm_encoding type> void LDRSB_IMM(const u32, const u32);
|
||||
template<arm_encoding type> void LDRSB_LIT(const u32, const u32);
|
||||
template<arm_encoding type> void LDRSB_REG(const u32, const u32);
|
||||
|
||||
template<arm_encoding type> void LDRSH_IMM(const u32, const u32);
|
||||
template<arm_encoding type> void LDRSH_LIT(const u32, const u32);
|
||||
template<arm_encoding type> void LDRSH_REG(const u32, const u32);
|
||||
|
||||
template<arm_encoding type> void LDREX(const u32, const u32);
|
||||
template<arm_encoding type> void LDREXB(const u32, const u32);
|
||||
template<arm_encoding type> void LDREXD(const u32, const u32);
|
||||
template<arm_encoding type> void LDREXH(const u32, const u32);
|
||||
|
||||
template<arm_encoding type> void LSL_IMM(const u32, const u32);
|
||||
template<arm_encoding type> void LSL_REG(const u32, const u32);
|
||||
|
||||
template<arm_encoding type> void LSR_IMM(const u32, const u32);
|
||||
template<arm_encoding type> void LSR_REG(const u32, const u32);
|
||||
|
||||
template<arm_encoding type> void MLA(const u32, const u32);
|
||||
template<arm_encoding type> void MLS(const u32, const u32);
|
||||
|
||||
template<arm_encoding type> void MOV_IMM(const u32, const u32);
|
||||
template<arm_encoding type> void MOV_REG(const u32, const u32);
|
||||
template<arm_encoding type> void MOVT(const u32, const u32);
|
||||
|
||||
template<arm_encoding type> void MRS(const u32, const u32);
|
||||
template<arm_encoding type> void MSR_IMM(const u32, const u32);
|
||||
template<arm_encoding type> void MSR_REG(const u32, const u32);
|
||||
|
||||
template<arm_encoding type> void MUL(const u32, const u32);
|
||||
|
||||
template<arm_encoding type> void MVN_IMM(const u32, const u32);
|
||||
template<arm_encoding type> void MVN_REG(const u32, const u32);
|
||||
template<arm_encoding type> void MVN_RSR(const u32, const u32);
|
||||
|
||||
template<arm_encoding type> void NOP(const u32, const u32);
|
||||
|
||||
template<arm_encoding type> void ORN_IMM(const u32, const u32);
|
||||
template<arm_encoding type> void ORN_REG(const u32, const u32);
|
||||
|
||||
template<arm_encoding type> void ORR_IMM(const u32, const u32);
|
||||
template<arm_encoding type> void ORR_REG(const u32, const u32);
|
||||
template<arm_encoding type> void ORR_RSR(const u32, const u32);
|
||||
|
||||
template<arm_encoding type> void PKH(const u32, const u32);
|
||||
|
||||
template<arm_encoding type> void POP(const u32, const u32);
|
||||
template<arm_encoding type> void PUSH(const u32, const u32);
|
||||
|
||||
template<arm_encoding type> void QADD(const u32, const u32);
|
||||
template<arm_encoding type> void QADD16(const u32, const u32);
|
||||
template<arm_encoding type> void QADD8(const u32, const u32);
|
||||
template<arm_encoding type> void QASX(const u32, const u32);
|
||||
template<arm_encoding type> void QDADD(const u32, const u32);
|
||||
template<arm_encoding type> void QDSUB(const u32, const u32);
|
||||
template<arm_encoding type> void QSAX(const u32, const u32);
|
||||
template<arm_encoding type> void QSUB(const u32, const u32);
|
||||
template<arm_encoding type> void QSUB16(const u32, const u32);
|
||||
template<arm_encoding type> void QSUB8(const u32, const u32);
|
||||
|
||||
template<arm_encoding type> void RBIT(const u32, const u32);
|
||||
template<arm_encoding type> void REV(const u32, const u32);
|
||||
template<arm_encoding type> void REV16(const u32, const u32);
|
||||
template<arm_encoding type> void REVSH(const u32, const u32);
|
||||
|
||||
template<arm_encoding type> void ROR_IMM(const u32, const u32);
|
||||
template<arm_encoding type> void ROR_REG(const u32, const u32);
|
||||
|
||||
template<arm_encoding type> void RRX(const u32, const u32);
|
||||
|
||||
template<arm_encoding type> void RSB_IMM(const u32, const u32);
|
||||
template<arm_encoding type> void RSB_REG(const u32, const u32);
|
||||
template<arm_encoding type> void RSB_RSR(const u32, const u32);
|
||||
|
||||
template<arm_encoding type> void RSC_IMM(const u32, const u32);
|
||||
template<arm_encoding type> void RSC_REG(const u32, const u32);
|
||||
template<arm_encoding type> void RSC_RSR(const u32, const u32);
|
||||
|
||||
template<arm_encoding type> void SADD16(const u32, const u32);
|
||||
template<arm_encoding type> void SADD8(const u32, const u32);
|
||||
template<arm_encoding type> void SASX(const u32, const u32);
|
||||
|
||||
template<arm_encoding type> void SBC_IMM(const u32, const u32);
|
||||
template<arm_encoding type> void SBC_REG(const u32, const u32);
|
||||
template<arm_encoding type> void SBC_RSR(const u32, const u32);
|
||||
|
||||
template<arm_encoding type> void SBFX(const u32, const u32);
|
||||
|
||||
template<arm_encoding type> void SDIV(const u32, const u32);
|
||||
|
||||
template<arm_encoding type> void SEL(const u32, const u32);
|
||||
|
||||
template<arm_encoding type> void SHADD16(const u32, const u32);
|
||||
template<arm_encoding type> void SHADD8(const u32, const u32);
|
||||
template<arm_encoding type> void SHASX(const u32, const u32);
|
||||
template<arm_encoding type> void SHSAX(const u32, const u32);
|
||||
template<arm_encoding type> void SHSUB16(const u32, const u32);
|
||||
template<arm_encoding type> void SHSUB8(const u32, const u32);
|
||||
|
||||
template<arm_encoding type> void SMLA__(const u32, const u32);
|
||||
template<arm_encoding type> void SMLAD(const u32, const u32);
|
||||
template<arm_encoding type> void SMLAL(const u32, const u32);
|
||||
template<arm_encoding type> void SMLAL__(const u32, const u32);
|
||||
template<arm_encoding type> void SMLALD(const u32, const u32);
|
||||
template<arm_encoding type> void SMLAW_(const u32, const u32);
|
||||
template<arm_encoding type> void SMLSD(const u32, const u32);
|
||||
template<arm_encoding type> void SMLSLD(const u32, const u32);
|
||||
template<arm_encoding type> void SMMLA(const u32, const u32);
|
||||
template<arm_encoding type> void SMMLS(const u32, const u32);
|
||||
template<arm_encoding type> void SMMUL(const u32, const u32);
|
||||
template<arm_encoding type> void SMUAD(const u32, const u32);
|
||||
template<arm_encoding type> void SMUL__(const u32, const u32);
|
||||
template<arm_encoding type> void SMULL(const u32, const u32);
|
||||
template<arm_encoding type> void SMULW_(const u32, const u32);
|
||||
template<arm_encoding type> void SMUSD(const u32, const u32);
|
||||
|
||||
template<arm_encoding type> void SSAT(const u32, const u32);
|
||||
template<arm_encoding type> void SSAT16(const u32, const u32);
|
||||
template<arm_encoding type> void SSAX(const u32, const u32);
|
||||
template<arm_encoding type> void SSUB16(const u32, const u32);
|
||||
template<arm_encoding type> void SSUB8(const u32, const u32);
|
||||
|
||||
template<arm_encoding type> void STM(const u32, const u32);
|
||||
template<arm_encoding type> void STMDA(const u32, const u32);
|
||||
template<arm_encoding type> void STMDB(const u32, const u32);
|
||||
template<arm_encoding type> void STMIB(const u32, const u32);
|
||||
|
||||
template<arm_encoding type> void STR_IMM(const u32, const u32);
|
||||
template<arm_encoding type> void STR_REG(const u32, const u32);
|
||||
|
||||
template<arm_encoding type> void STRB_IMM(const u32, const u32);
|
||||
template<arm_encoding type> void STRB_REG(const u32, const u32);
|
||||
|
||||
template<arm_encoding type> void STRD_IMM(const u32, const u32);
|
||||
template<arm_encoding type> void STRD_REG(const u32, const u32);
|
||||
|
||||
template<arm_encoding type> void STRH_IMM(const u32, const u32);
|
||||
template<arm_encoding type> void STRH_REG(const u32, const u32);
|
||||
|
||||
template<arm_encoding type> void STREX(const u32, const u32);
|
||||
template<arm_encoding type> void STREXB(const u32, const u32);
|
||||
template<arm_encoding type> void STREXD(const u32, const u32);
|
||||
template<arm_encoding type> void STREXH(const u32, const u32);
|
||||
|
||||
template<arm_encoding type> void SUB_IMM(const u32, const u32);
|
||||
template<arm_encoding type> void SUB_REG(const u32, const u32);
|
||||
template<arm_encoding type> void SUB_RSR(const u32, const u32);
|
||||
template<arm_encoding type> void SUB_SPI(const u32, const u32);
|
||||
template<arm_encoding type> void SUB_SPR(const u32, const u32);
|
||||
|
||||
template<arm_encoding type> void SVC(const u32, const u32);
|
||||
|
||||
template<arm_encoding type> void SXTAB(const u32, const u32);
|
||||
template<arm_encoding type> void SXTAB16(const u32, const u32);
|
||||
template<arm_encoding type> void SXTAH(const u32, const u32);
|
||||
template<arm_encoding type> void SXTB(const u32, const u32);
|
||||
template<arm_encoding type> void SXTB16(const u32, const u32);
|
||||
template<arm_encoding type> void SXTH(const u32, const u32);
|
||||
|
||||
template<arm_encoding type> void TB_(const u32, const u32);
|
||||
|
||||
template<arm_encoding type> void TEQ_IMM(const u32, const u32);
|
||||
template<arm_encoding type> void TEQ_REG(const u32, const u32);
|
||||
template<arm_encoding type> void TEQ_RSR(const u32, const u32);
|
||||
|
||||
template<arm_encoding type> void TST_IMM(const u32, const u32);
|
||||
template<arm_encoding type> void TST_REG(const u32, const u32);
|
||||
template<arm_encoding type> void TST_RSR(const u32, const u32);
|
||||
|
||||
template<arm_encoding type> void UADD16(const u32, const u32);
|
||||
template<arm_encoding type> void UADD8(const u32, const u32);
|
||||
template<arm_encoding type> void UASX(const u32, const u32);
|
||||
template<arm_encoding type> void UBFX(const u32, const u32);
|
||||
template<arm_encoding type> void UDIV(const u32, const u32);
|
||||
template<arm_encoding type> void UHADD16(const u32, const u32);
|
||||
template<arm_encoding type> void UHADD8(const u32, const u32);
|
||||
template<arm_encoding type> void UHASX(const u32, const u32);
|
||||
template<arm_encoding type> void UHSAX(const u32, const u32);
|
||||
template<arm_encoding type> void UHSUB16(const u32, const u32);
|
||||
template<arm_encoding type> void UHSUB8(const u32, const u32);
|
||||
template<arm_encoding type> void UMAAL(const u32, const u32);
|
||||
template<arm_encoding type> void UMLAL(const u32, const u32);
|
||||
template<arm_encoding type> void UMULL(const u32, const u32);
|
||||
template<arm_encoding type> void UQADD16(const u32, const u32);
|
||||
template<arm_encoding type> void UQADD8(const u32, const u32);
|
||||
template<arm_encoding type> void UQASX(const u32, const u32);
|
||||
template<arm_encoding type> void UQSAX(const u32, const u32);
|
||||
template<arm_encoding type> void UQSUB16(const u32, const u32);
|
||||
template<arm_encoding type> void UQSUB8(const u32, const u32);
|
||||
template<arm_encoding type> void USAD8(const u32, const u32);
|
||||
template<arm_encoding type> void USADA8(const u32, const u32);
|
||||
template<arm_encoding type> void USAT(const u32, const u32);
|
||||
template<arm_encoding type> void USAT16(const u32, const u32);
|
||||
template<arm_encoding type> void USAX(const u32, const u32);
|
||||
template<arm_encoding type> void USUB16(const u32, const u32);
|
||||
template<arm_encoding type> void USUB8(const u32, const u32);
|
||||
template<arm_encoding type> void UXTAB(const u32, const u32);
|
||||
template<arm_encoding type> void UXTAB16(const u32, const u32);
|
||||
template<arm_encoding type> void UXTAH(const u32, const u32);
|
||||
template<arm_encoding type> void UXTB(const u32, const u32);
|
||||
template<arm_encoding type> void UXTB16(const u32, const u32);
|
||||
template<arm_encoding type> void UXTH(const u32, const u32);
|
||||
|
||||
template<arm_encoding type> void VABA_(const u32, const u32);
|
||||
template<arm_encoding type> void VABD_(const u32, const u32);
|
||||
template<arm_encoding type> void VABD_FP(const u32, const u32);
|
||||
template<arm_encoding type> void VABS(const u32, const u32);
|
||||
template<arm_encoding type> void VAC__(const u32, const u32);
|
||||
template<arm_encoding type> void VADD(const u32, const u32);
|
||||
template<arm_encoding type> void VADD_FP(const u32, const u32);
|
||||
template<arm_encoding type> void VADDHN(const u32, const u32);
|
||||
template<arm_encoding type> void VADD_(const u32, const u32);
|
||||
template<arm_encoding type> void VAND(const u32, const u32);
|
||||
template<arm_encoding type> void VBIC_IMM(const u32, const u32);
|
||||
template<arm_encoding type> void VBIC_REG(const u32, const u32);
|
||||
template<arm_encoding type> void VB__(const u32, const u32);
|
||||
template<arm_encoding type> void VCEQ_REG(const u32, const u32);
|
||||
template<arm_encoding type> void VCEQ_ZERO(const u32, const u32);
|
||||
template<arm_encoding type> void VCGE_REG(const u32, const u32);
|
||||
template<arm_encoding type> void VCGE_ZERO(const u32, const u32);
|
||||
template<arm_encoding type> void VCGT_REG(const u32, const u32);
|
||||
template<arm_encoding type> void VCGT_ZERO(const u32, const u32);
|
||||
template<arm_encoding type> void VCLE_ZERO(const u32, const u32);
|
||||
template<arm_encoding type> void VCLS(const u32, const u32);
|
||||
template<arm_encoding type> void VCLT_ZERO(const u32, const u32);
|
||||
template<arm_encoding type> void VCLZ(const u32, const u32);
|
||||
template<arm_encoding type> void VCMP_(const u32, const u32);
|
||||
template<arm_encoding type> void VCNT(const u32, const u32);
|
||||
template<arm_encoding type> void VCVT_FIA(const u32, const u32);
|
||||
template<arm_encoding type> void VCVT_FIF(const u32, const u32);
|
||||
template<arm_encoding type> void VCVT_FFA(const u32, const u32);
|
||||
template<arm_encoding type> void VCVT_FFF(const u32, const u32);
|
||||
template<arm_encoding type> void VCVT_DF(const u32, const u32);
|
||||
template<arm_encoding type> void VCVT_HFA(const u32, const u32);
|
||||
template<arm_encoding type> void VCVT_HFF(const u32, const u32);
|
||||
template<arm_encoding type> void VDIV(const u32, const u32);
|
||||
template<arm_encoding type> void VDUP_S(const u32, const u32);
|
||||
template<arm_encoding type> void VDUP_R(const u32, const u32);
|
||||
template<arm_encoding type> void VEOR(const u32, const u32);
|
||||
template<arm_encoding type> void VEXT(const u32, const u32);
|
||||
template<arm_encoding type> void VHADDSUB(const u32, const u32);
|
||||
template<arm_encoding type> void VLD__MS(const u32, const u32);
|
||||
template<arm_encoding type> void VLD1_SL(const u32, const u32);
|
||||
template<arm_encoding type> void VLD1_SAL(const u32, const u32);
|
||||
template<arm_encoding type> void VLD2_SL(const u32, const u32);
|
||||
template<arm_encoding type> void VLD2_SAL(const u32, const u32);
|
||||
template<arm_encoding type> void VLD3_SL(const u32, const u32);
|
||||
template<arm_encoding type> void VLD3_SAL(const u32, const u32);
|
||||
template<arm_encoding type> void VLD4_SL(const u32, const u32);
|
||||
template<arm_encoding type> void VLD4_SAL(const u32, const u32);
|
||||
template<arm_encoding type> void VLDM(const u32, const u32);
|
||||
template<arm_encoding type> void VLDR(const u32, const u32);
|
||||
template<arm_encoding type> void VMAXMIN(const u32, const u32);
|
||||
template<arm_encoding type> void VMAXMIN_FP(const u32, const u32);
|
||||
template<arm_encoding type> void VML__(const u32, const u32);
|
||||
template<arm_encoding type> void VML__FP(const u32, const u32);
|
||||
template<arm_encoding type> void VML__S(const u32, const u32);
|
||||
template<arm_encoding type> void VMOV_IMM(const u32, const u32);
|
||||
template<arm_encoding type> void VMOV_REG(const u32, const u32);
|
||||
template<arm_encoding type> void VMOV_RS(const u32, const u32);
|
||||
template<arm_encoding type> void VMOV_SR(const u32, const u32);
|
||||
template<arm_encoding type> void VMOV_RF(const u32, const u32);
|
||||
template<arm_encoding type> void VMOV_2RF(const u32, const u32);
|
||||
template<arm_encoding type> void VMOV_2RD(const u32, const u32);
|
||||
template<arm_encoding type> void VMOVL(const u32, const u32);
|
||||
template<arm_encoding type> void VMOVN(const u32, const u32);
|
||||
template<arm_encoding type> void VMRS(const u32, const u32);
|
||||
template<arm_encoding type> void VMSR(const u32, const u32);
|
||||
template<arm_encoding type> void VMUL_(const u32, const u32);
|
||||
template<arm_encoding type> void VMUL_FP(const u32, const u32);
|
||||
template<arm_encoding type> void VMUL_S(const u32, const u32);
|
||||
template<arm_encoding type> void VMVN_IMM(const u32, const u32);
|
||||
template<arm_encoding type> void VMVN_REG(const u32, const u32);
|
||||
template<arm_encoding type> void VNEG(const u32, const u32);
|
||||
template<arm_encoding type> void VNM__(const u32, const u32);
|
||||
template<arm_encoding type> void VORN_REG(const u32, const u32);
|
||||
template<arm_encoding type> void VORR_IMM(const u32, const u32);
|
||||
template<arm_encoding type> void VORR_REG(const u32, const u32);
|
||||
template<arm_encoding type> void VPADAL(const u32, const u32);
|
||||
template<arm_encoding type> void VPADD(const u32, const u32);
|
||||
template<arm_encoding type> void VPADD_FP(const u32, const u32);
|
||||
template<arm_encoding type> void VPADDL(const u32, const u32);
|
||||
template<arm_encoding type> void VPMAXMIN(const u32, const u32);
|
||||
template<arm_encoding type> void VPMAXMIN_FP(const u32, const u32);
|
||||
template<arm_encoding type> void VPOP(const u32, const u32);
|
||||
template<arm_encoding type> void VPUSH(const u32, const u32);
|
||||
template<arm_encoding type> void VQABS(const u32, const u32);
|
||||
template<arm_encoding type> void VQADD(const u32, const u32);
|
||||
template<arm_encoding type> void VQDML_L(const u32, const u32);
|
||||
template<arm_encoding type> void VQDMULH(const u32, const u32);
|
||||
template<arm_encoding type> void VQDMULL(const u32, const u32);
|
||||
template<arm_encoding type> void VQMOV_N(const u32, const u32);
|
||||
template<arm_encoding type> void VQNEG(const u32, const u32);
|
||||
template<arm_encoding type> void VQRDMULH(const u32, const u32);
|
||||
template<arm_encoding type> void VQRSHL(const u32, const u32);
|
||||
template<arm_encoding type> void VQRSHR_N(const u32, const u32);
|
||||
template<arm_encoding type> void VQSHL_REG(const u32, const u32);
|
||||
template<arm_encoding type> void VQSHL_IMM(const u32, const u32);
|
||||
template<arm_encoding type> void VQSHR_N(const u32, const u32);
|
||||
template<arm_encoding type> void VQSUB(const u32, const u32);
|
||||
template<arm_encoding type> void VRADDHN(const u32, const u32);
|
||||
template<arm_encoding type> void VRECPE(const u32, const u32);
|
||||
template<arm_encoding type> void VRECPS(const u32, const u32);
|
||||
template<arm_encoding type> void VREV__(const u32, const u32);
|
||||
template<arm_encoding type> void VRHADD(const u32, const u32);
|
||||
template<arm_encoding type> void VRSHL(const u32, const u32);
|
||||
template<arm_encoding type> void VRSHR(const u32, const u32);
|
||||
template<arm_encoding type> void VRSHRN(const u32, const u32);
|
||||
template<arm_encoding type> void VRSQRTE(const u32, const u32);
|
||||
template<arm_encoding type> void VRSQRTS(const u32, const u32);
|
||||
template<arm_encoding type> void VRSRA(const u32, const u32);
|
||||
template<arm_encoding type> void VRSUBHN(const u32, const u32);
|
||||
template<arm_encoding type> void VSHL_IMM(const u32, const u32);
|
||||
template<arm_encoding type> void VSHL_REG(const u32, const u32);
|
||||
template<arm_encoding type> void VSHLL(const u32, const u32);
|
||||
template<arm_encoding type> void VSHR(const u32, const u32);
|
||||
template<arm_encoding type> void VSHRN(const u32, const u32);
|
||||
template<arm_encoding type> void VSLI(const u32, const u32);
|
||||
template<arm_encoding type> void VSQRT(const u32, const u32);
|
||||
template<arm_encoding type> void VSRA(const u32, const u32);
|
||||
template<arm_encoding type> void VSRI(const u32, const u32);
|
||||
template<arm_encoding type> void VST__MS(const u32, const u32);
|
||||
template<arm_encoding type> void VST1_SL(const u32, const u32);
|
||||
template<arm_encoding type> void VST2_SL(const u32, const u32);
|
||||
template<arm_encoding type> void VST3_SL(const u32, const u32);
|
||||
template<arm_encoding type> void VST4_SL(const u32, const u32);
|
||||
template<arm_encoding type> void VSTM(const u32, const u32);
|
||||
template<arm_encoding type> void VSTR(const u32, const u32);
|
||||
template<arm_encoding type> void VSUB(const u32, const u32);
|
||||
template<arm_encoding type> void VSUB_FP(const u32, const u32);
|
||||
template<arm_encoding type> void VSUBHN(const u32, const u32);
|
||||
template<arm_encoding type> void VSUB_(const u32, const u32);
|
||||
template<arm_encoding type> void VSWP(const u32, const u32);
|
||||
template<arm_encoding type> void VTB_(const u32, const u32);
|
||||
template<arm_encoding type> void VTRN(const u32, const u32);
|
||||
template<arm_encoding type> void VTST(const u32, const u32);
|
||||
template<arm_encoding type> void VUZP(const u32, const u32);
|
||||
template<arm_encoding type> void VZIP(const u32, const u32);
|
||||
|
||||
template<arm_encoding type> void WFE(const u32, const u32);
|
||||
template<arm_encoding type> void WFI(const u32, const u32);
|
||||
template<arm_encoding type> void YIELD(const u32, const u32);
|
||||
|
||||
public:
|
||||
u32 disasm(u32 pc) override;
|
||||
};
|
@ -1,58 +0,0 @@
|
||||
#include "stdafx.h"
|
||||
#include "ARMv7Module.h"
|
||||
|
||||
// Get function name by FNID
|
||||
extern std::string arm_get_function_name(const std::string& module, u32 fnid)
|
||||
{
|
||||
// Check registered functions
|
||||
if (const auto sm = arm_module_manager::get_module(module))
|
||||
{
|
||||
const auto found = sm->functions.find(fnid);
|
||||
|
||||
if (found != sm->functions.end())
|
||||
{
|
||||
return found->second.name;
|
||||
}
|
||||
}
|
||||
|
||||
return fmt::format("0x%08X", fnid);
|
||||
}
|
||||
|
||||
// Get variable name by VNID
|
||||
extern std::string arm_get_variable_name(const std::string& module, u32 vnid)
|
||||
{
|
||||
// Check registered variables
|
||||
if (const auto sm = arm_module_manager::get_module(module))
|
||||
{
|
||||
const auto found = sm->variables.find(vnid);
|
||||
|
||||
if (found != sm->variables.end())
|
||||
{
|
||||
return found->second.name;
|
||||
}
|
||||
}
|
||||
|
||||
return fmt::format("0x%08X", vnid);
|
||||
}
|
||||
|
||||
std::vector<arm_function_t>& arm_function_manager::access()
|
||||
{
|
||||
static std::vector<arm_function_t> list
|
||||
{
|
||||
nullptr,
|
||||
[](ARMv7Thread& cpu) { cpu.state += cpu_flag::ret; },
|
||||
};
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
u32 arm_function_manager::add_function(arm_function_t function)
|
||||
{
|
||||
auto& list = access();
|
||||
|
||||
list.push_back(function);
|
||||
|
||||
return ::size32(list) - 1;
|
||||
}
|
||||
|
||||
DECLARE(arm_function_manager::addr);
|
@ -1,479 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include "ARMv7Thread.h"
|
||||
|
||||
using arm_function_t = void(*)(ARMv7Thread&);
|
||||
|
||||
#define BIND_FUNC(func) static_cast<arm_function_t>([](ARMv7Thread& cpu){\
|
||||
const auto old_f = cpu.last_function;\
|
||||
cpu.last_function = #func;\
|
||||
arm_func_detail::do_call(cpu, func);\
|
||||
cpu.last_function = old_f;\
|
||||
})
|
||||
|
||||
struct arm_va_args_t
|
||||
{
|
||||
u32 count; // Number of 32-bit args passed
|
||||
};
|
||||
|
||||
namespace arm_func_detail
|
||||
{
|
||||
enum arg_class : u32
|
||||
{
|
||||
ARG_GENERAL,
|
||||
ARG_FLOAT,
|
||||
ARG_VECTOR,
|
||||
ARG_STACK,
|
||||
ARG_CONTEXT,
|
||||
ARG_VARIADIC,
|
||||
ARG_UNKNOWN,
|
||||
};
|
||||
|
||||
static const auto FIXED_STACK_FRAME_SIZE = 0x80;
|
||||
|
||||
template<typename T, arg_class type, u32 g_count, u32 f_count, u32 v_count>
|
||||
struct bind_arg
|
||||
{
|
||||
static_assert(type == ARG_GENERAL, "Unknown function argument type");
|
||||
static_assert(!std::is_pointer<T>::value, "Invalid function argument type (pointer)");
|
||||
static_assert(!std::is_reference<T>::value, "Invalid function argument type (reference)");
|
||||
static_assert(sizeof(T) <= 4, "Invalid function argument type for ARG_GENERAL");
|
||||
|
||||
FORCE_INLINE static T get_arg(ARMv7Thread& cpu)
|
||||
{
|
||||
return arm_gpr_cast<T>(cpu.GPR[g_count - 1]);
|
||||
}
|
||||
|
||||
FORCE_INLINE static void put_arg(ARMv7Thread& cpu, const T& arg)
|
||||
{
|
||||
cpu.GPR[g_count - 1] = arm_gpr_cast(arg);
|
||||
}
|
||||
};
|
||||
|
||||
template<u32 g_count, u32 f_count, u32 v_count>
|
||||
struct bind_arg<u64, ARG_GENERAL, g_count, f_count, v_count>
|
||||
{
|
||||
// first u64 argument is passed in r0-r1, second one is passed in r2-r3 (if g_count = 3)
|
||||
static_assert(g_count == 2 || g_count == 4, "Wrong u64 argument position");
|
||||
|
||||
FORCE_INLINE static u64 get_arg(ARMv7Thread& cpu)
|
||||
{
|
||||
return cpu.GPR_D[(g_count - 1) >> 1];
|
||||
}
|
||||
|
||||
FORCE_INLINE static void put_arg(ARMv7Thread& cpu, u64 arg)
|
||||
{
|
||||
cpu.GPR_D[(g_count - 1) >> 1] = arg;
|
||||
}
|
||||
};
|
||||
|
||||
template<u32 g_count, u32 f_count, u32 v_count>
|
||||
struct bind_arg<s64, ARG_GENERAL, g_count, f_count, v_count>
|
||||
{
|
||||
static_assert(g_count == 2 || g_count == 4, "Wrong s64 argument position");
|
||||
|
||||
FORCE_INLINE static s64 get_arg(ARMv7Thread& cpu)
|
||||
{
|
||||
return cpu.GPR_D[(g_count - 1) >> 1];
|
||||
}
|
||||
|
||||
FORCE_INLINE static void put_arg(ARMv7Thread& cpu, s64 arg)
|
||||
{
|
||||
cpu.GPR_D[(g_count - 1) >> 1] = arg;
|
||||
}
|
||||
};
|
||||
|
||||
template<typename T, u32 g_count, u32 f_count, u32 v_count>
|
||||
struct bind_arg<T, ARG_FLOAT, g_count, f_count, v_count>
|
||||
{
|
||||
static_assert(f_count <= 0, "TODO: Unsupported argument type (float)");
|
||||
static_assert(sizeof(T) <= 8, "Invalid function argument type for ARG_FLOAT");
|
||||
|
||||
FORCE_INLINE static T get_arg(ARMv7Thread& cpu)
|
||||
{
|
||||
}
|
||||
|
||||
FORCE_INLINE static void put_arg(ARMv7Thread& cpu, const T& arg)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
template<typename T, u32 g_count, u32 f_count, u32 v_count>
|
||||
struct bind_arg<T, ARG_VECTOR, g_count, f_count, v_count>
|
||||
{
|
||||
static_assert(v_count <= 0, "TODO: Unsupported argument type (vector)");
|
||||
static_assert(std::is_same<std::decay_t<T>, v128>::value, "Invalid function argument type for ARG_VECTOR");
|
||||
|
||||
FORCE_INLINE static T get_arg(ARMv7Thread& cpu)
|
||||
{
|
||||
}
|
||||
|
||||
FORCE_INLINE static void put_arg(ARMv7Thread& cpu, const T& arg)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
template<typename T, u32 g_count, u32 f_count, u32 v_count>
|
||||
struct bind_arg<T, ARG_STACK, g_count, f_count, v_count>
|
||||
{
|
||||
static_assert(f_count <= 0, "TODO: Unsupported stack argument type (float)");
|
||||
static_assert(v_count <= 0, "TODO: Unsupported stack argument type (vector)");
|
||||
static_assert(sizeof(T) <= 4, "Invalid function argument type for ARG_STACK");
|
||||
|
||||
FORCE_INLINE static T get_arg(ARMv7Thread& cpu)
|
||||
{
|
||||
// TODO: check
|
||||
return arm_gpr_cast<T, u32>(vm::psv::read32(cpu.SP + sizeof(u32) * (g_count - 5)));
|
||||
}
|
||||
|
||||
FORCE_INLINE static void put_arg(ARMv7Thread& cpu, const T& arg)
|
||||
{
|
||||
// TODO: check
|
||||
const int stack_pos = (g_count - 5) * 4 - FIXED_STACK_FRAME_SIZE;
|
||||
static_assert(stack_pos < 0, "TODO: Increase fixed stack frame size (arg count limit broken)");
|
||||
|
||||
vm::psv::write32(cpu.SP + stack_pos, arm_gpr_cast(arg));
|
||||
}
|
||||
};
|
||||
|
||||
template<u32 g_count, u32 f_count, u32 v_count>
|
||||
struct bind_arg<u64, ARG_STACK, g_count, f_count, v_count>
|
||||
{
|
||||
FORCE_INLINE static u64 get_arg(ARMv7Thread& cpu)
|
||||
{
|
||||
// TODO: check
|
||||
return vm::psv::read64(cpu.SP + sizeof(u32) * (g_count - 6));
|
||||
}
|
||||
|
||||
FORCE_INLINE static void put_arg(ARMv7Thread& cpu, u64 arg)
|
||||
{
|
||||
// TODO: check
|
||||
const int stack_pos = (g_count - 6) * 4 - FIXED_STACK_FRAME_SIZE;
|
||||
static_assert(stack_pos < -4, "TODO: Increase fixed stack frame size (arg count limit broken)");
|
||||
|
||||
vm::psv::write64(cpu.SP + stack_pos, arg);
|
||||
}
|
||||
};
|
||||
|
||||
template<u32 g_count, u32 f_count, u32 v_count>
|
||||
struct bind_arg<s64, ARG_STACK, g_count, f_count, v_count>
|
||||
{
|
||||
FORCE_INLINE static s64 get_arg(ARMv7Thread& cpu)
|
||||
{
|
||||
// TODO: check
|
||||
return vm::psv::read64(cpu.SP + sizeof(u32) * (g_count - 6));
|
||||
}
|
||||
|
||||
FORCE_INLINE static void put_arg(ARMv7Thread& cpu, s64 arg)
|
||||
{
|
||||
// TODO: check
|
||||
const int stack_pos = (g_count - 6) * 4 - FIXED_STACK_FRAME_SIZE;
|
||||
static_assert(stack_pos < -4, "TODO: Increase fixed stack frame size (arg count limit broken)");
|
||||
|
||||
vm::psv::write64(cpu.SP + stack_pos, arg);
|
||||
}
|
||||
};
|
||||
|
||||
template<typename T, u32 g_count, u32 f_count, u32 v_count>
|
||||
struct bind_arg<T, ARG_CONTEXT, g_count, f_count, v_count>
|
||||
{
|
||||
static_assert(std::is_same<std::decay_t<T>, ARMv7Thread>::value, "Invalid function argument type for ARG_CONTEXT");
|
||||
|
||||
FORCE_INLINE static ARMv7Thread& get_arg(ARMv7Thread& cpu)
|
||||
{
|
||||
return cpu;
|
||||
}
|
||||
|
||||
FORCE_INLINE static void put_arg(ARMv7Thread& cpu, ARMv7Thread& arg)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
template<typename T, u32 g_count, u32 f_count, u32 v_count>
|
||||
struct bind_arg<T, ARG_VARIADIC, g_count, f_count, v_count>
|
||||
{
|
||||
static_assert(std::is_same<std::decay_t<T>, arm_va_args_t>::value, "Invalid function argument type for ARG_VARIADIC");
|
||||
|
||||
FORCE_INLINE static arm_va_args_t get_arg(ARMv7Thread& cpu)
|
||||
{
|
||||
return{ g_count };
|
||||
}
|
||||
};
|
||||
|
||||
template<typename T, arg_class type>
|
||||
struct bind_result
|
||||
{
|
||||
static_assert(type != ARG_FLOAT, "TODO: Unsupported funcion result type (float)");
|
||||
static_assert(type != ARG_VECTOR, "TODO: Unsupported funcion result type (vector)");
|
||||
static_assert(type == ARG_GENERAL, "Wrong use of bind_result template");
|
||||
static_assert(sizeof(T) <= 4, "Invalid function result type for ARG_GENERAL");
|
||||
|
||||
FORCE_INLINE static T get_result(ARMv7Thread& cpu)
|
||||
{
|
||||
return arm_gpr_cast<T>(cpu.GPR[0]);
|
||||
}
|
||||
|
||||
FORCE_INLINE static void put_result(ARMv7Thread& cpu, const T& result)
|
||||
{
|
||||
cpu.GPR[0] = arm_gpr_cast(result);
|
||||
}
|
||||
};
|
||||
|
||||
template<>
|
||||
struct bind_result<u64, ARG_GENERAL>
|
||||
{
|
||||
FORCE_INLINE static u64 get_result(ARMv7Thread& cpu)
|
||||
{
|
||||
return cpu.GPR_D[0];
|
||||
}
|
||||
|
||||
FORCE_INLINE static void put_result(ARMv7Thread& cpu, u64 result)
|
||||
{
|
||||
cpu.GPR_D[0] = result;
|
||||
}
|
||||
};
|
||||
|
||||
template<>
|
||||
struct bind_result<s64, ARG_GENERAL>
|
||||
{
|
||||
FORCE_INLINE static s64 get_result(ARMv7Thread& cpu)
|
||||
{
|
||||
return cpu.GPR_D[0];
|
||||
}
|
||||
|
||||
FORCE_INLINE static void put_result(ARMv7Thread& cpu, s64 result)
|
||||
{
|
||||
cpu.GPR_D[0] = result;
|
||||
}
|
||||
};
|
||||
|
||||
//template<typename T>
|
||||
//struct bind_result<T, ARG_FLOAT>
|
||||
//{
|
||||
// static_assert(sizeof(T) <= 8, "Invalid function result type for ARG_FLOAT");
|
||||
|
||||
// static FORCE_INLINE void put_result(ARMv7Thread& cpu, const T& result)
|
||||
// {
|
||||
// }
|
||||
//};
|
||||
|
||||
//template<typename T>
|
||||
//struct bind_result<T, ARG_VECTOR>
|
||||
//{
|
||||
// static_assert(std::is_same<std::remove_cv_t<T>, v128>::value, "Invalid function result type for ARG_VECTOR");
|
||||
|
||||
// static FORCE_INLINE void put_result(ARMv7Thread& cpu, const T& result)
|
||||
// {
|
||||
// }
|
||||
//};
|
||||
|
||||
template<typename RT>
|
||||
struct result_type
|
||||
{
|
||||
static_assert(!std::is_pointer<RT>::value, "Invalid function result type (pointer)");
|
||||
static_assert(!std::is_reference<RT>::value, "Invalid function result type (reference)");
|
||||
static const bool is_float = std::is_floating_point<RT>::value;
|
||||
static const bool is_vector = std::is_same<std::decay_t<RT>, v128>::value;
|
||||
static const arg_class value = is_float ? ARG_FLOAT : (is_vector ? ARG_VECTOR : ARG_GENERAL);
|
||||
};
|
||||
|
||||
template<typename T, u32 g_count, u32 f_count, u32 v_count>
|
||||
struct arg_type
|
||||
{
|
||||
// TODO: check calculations
|
||||
static const bool is_float = std::is_floating_point<T>::value;
|
||||
static const bool is_vector = std::is_same<std::decay_t<T>, v128>::value;
|
||||
static const bool is_context = std::is_same<std::decay_t<T>, ARMv7Thread>::value;
|
||||
static const bool is_variadic = std::is_same<std::decay_t<T>, arm_va_args_t>::value;
|
||||
static const bool is_general = !is_float && !is_vector && !is_context && !is_variadic;
|
||||
|
||||
static const u32 g_align = ALIGN_32(T) > 4 ? ALIGN_32(T) >> 2 : 1;
|
||||
static const u32 g_value = is_general ? ((g_count + (g_align - 1)) & ~(g_align - 1)) + (g_align) : g_count;
|
||||
static const u32 f_value = f_count + is_float;
|
||||
static const u32 v_value = v_count + is_vector;
|
||||
|
||||
static const arg_class value =
|
||||
is_general ? (g_value > 4 ? ARG_STACK : ARG_GENERAL) :
|
||||
is_float ? (f_value > 9000 ? ARG_STACK : ARG_FLOAT) :
|
||||
is_vector ? (v_value > 9000 ? ARG_STACK : ARG_VECTOR) :
|
||||
is_context ? ARG_CONTEXT :
|
||||
is_variadic ? ARG_VARIADIC :
|
||||
ARG_UNKNOWN;
|
||||
};
|
||||
|
||||
// wrapper for variadic argument info list, each value contains packed argument type and counts of GENERAL, FLOAT and VECTOR arguments
|
||||
template<u32... Values> struct arg_info_pack_t;
|
||||
|
||||
template<u32 First, u32... Values> struct arg_info_pack_t<First, Values...>
|
||||
{
|
||||
static const u32 last_value = arg_info_pack_t<Values...>::last_value;
|
||||
};
|
||||
|
||||
template<u32 First> struct arg_info_pack_t<First>
|
||||
{
|
||||
static const u32 last_value = First;
|
||||
};
|
||||
|
||||
template<> struct arg_info_pack_t<>
|
||||
{
|
||||
static const u32 last_value = 0;
|
||||
};
|
||||
|
||||
// argument type + g/f/v_count unpacker
|
||||
template<typename T, u32 type_pack> struct bind_arg_packed
|
||||
{
|
||||
FORCE_INLINE static T get_arg(ARMv7Thread& cpu)
|
||||
{
|
||||
return bind_arg<T, static_cast<arg_class>(type_pack & 0xff), (type_pack >> 8) & 0xff, (type_pack >> 16) & 0xff, (type_pack >> 24)>::get_arg(cpu);
|
||||
}
|
||||
};
|
||||
|
||||
template<u32... Info, typename RT, typename... Args>
|
||||
FORCE_INLINE RT call(ARMv7Thread& cpu, RT(*func)(Args...), arg_info_pack_t<Info...> info)
|
||||
{
|
||||
// do the actual function call when all arguments are prepared (simultaneous unpacking of Args... and Info...)
|
||||
return func(bind_arg_packed<Args, Info>::get_arg(cpu)...);
|
||||
}
|
||||
|
||||
template<typename T, typename... Types, u32... Info, typename RT, typename... Args>
|
||||
FORCE_INLINE RT call(ARMv7Thread& cpu, RT(*func)(Args...), arg_info_pack_t<Info...> info)
|
||||
{
|
||||
// unpack previous type counts (0/0/0 for the first time)
|
||||
const u32 g_count = (info.last_value >> 8) & 0xff;
|
||||
const u32 f_count = (info.last_value >> 16) & 0xff;
|
||||
const u32 v_count = (info.last_value >> 24);
|
||||
|
||||
using type = arg_type<T, g_count, f_count, v_count>;
|
||||
const arg_class t = type::value;
|
||||
const u32 g = type::g_value;
|
||||
const u32 f = type::f_value;
|
||||
const u32 v = type::v_value;
|
||||
|
||||
return call<Types...>(cpu, func, arg_info_pack_t<Info..., t | (g << 8) | (f << 16) | (v << 24)>{});
|
||||
}
|
||||
|
||||
template<u32 g_count, u32 f_count, u32 v_count>
|
||||
FORCE_INLINE static bool put_func_args(ARMv7Thread& cpu)
|
||||
{
|
||||
// terminator
|
||||
return false;
|
||||
}
|
||||
|
||||
template<u32 g_count, u32 f_count, u32 v_count, typename T1, typename... T>
|
||||
FORCE_INLINE static bool put_func_args(ARMv7Thread& cpu, T1 arg, T... args)
|
||||
{
|
||||
using type = arg_type<T1, g_count, f_count, v_count>;
|
||||
const arg_class t = type::value;
|
||||
const u32 g = type::g_value;
|
||||
const u32 f = type::f_value;
|
||||
const u32 v = type::v_value;
|
||||
|
||||
bind_arg<T1, t, g, f, v>::put_arg(cpu, arg);
|
||||
|
||||
// return true if stack was used
|
||||
return put_func_args<g, f, v>(cpu, args...) || (t == ARG_STACK);
|
||||
}
|
||||
|
||||
template<typename RT, typename... T>
|
||||
struct func_binder;
|
||||
|
||||
template<typename... T>
|
||||
struct func_binder<void, T...>
|
||||
{
|
||||
using func_t = void(*)(T...);
|
||||
|
||||
static void do_call(ARMv7Thread& cpu, func_t func)
|
||||
{
|
||||
call<T...>(cpu, func, arg_info_pack_t<>{});
|
||||
}
|
||||
};
|
||||
|
||||
template<typename RT, typename... T>
|
||||
struct func_binder
|
||||
{
|
||||
using func_t = RT(*)(T...);
|
||||
|
||||
static void do_call(ARMv7Thread& cpu, func_t func)
|
||||
{
|
||||
bind_result<RT, result_type<RT>::value>::put_result(cpu, call<T...>(cpu, func, arg_info_pack_t<>{}));
|
||||
}
|
||||
};
|
||||
|
||||
template<typename RT, typename... T>
|
||||
struct func_caller
|
||||
{
|
||||
FORCE_INLINE static RT call(ARMv7Thread& cpu, u32 addr, T... args)
|
||||
{
|
||||
func_caller<void, T...>::call(cpu, addr, args...);
|
||||
|
||||
return bind_result<RT, result_type<RT>::value>::get_result(cpu);
|
||||
}
|
||||
};
|
||||
|
||||
template<typename... T>
|
||||
struct func_caller<void, T...>
|
||||
{
|
||||
FORCE_INLINE static void call(ARMv7Thread& cpu, u32 addr, T... args)
|
||||
{
|
||||
if (put_func_args<0, 0, 0, T...>(cpu, args...))
|
||||
{
|
||||
cpu.SP -= FIXED_STACK_FRAME_SIZE;
|
||||
cpu.fast_call(addr);
|
||||
cpu.SP += FIXED_STACK_FRAME_SIZE;
|
||||
}
|
||||
else
|
||||
{
|
||||
cpu.fast_call(addr);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
template<typename RT, typename... T> FORCE_INLINE void do_call(ARMv7Thread& cpu, RT(*func)(T...))
|
||||
{
|
||||
func_binder<RT, T...>::do_call(cpu, func);
|
||||
}
|
||||
}
|
||||
|
||||
class arm_function_manager
|
||||
{
|
||||
// Global variable for each registered function
|
||||
template<typename T, T Func>
|
||||
struct registered
|
||||
{
|
||||
static u32 index;
|
||||
};
|
||||
|
||||
// Access global function list
|
||||
static std::vector<arm_function_t>& access();
|
||||
|
||||
static u32 add_function(arm_function_t function);
|
||||
|
||||
public:
|
||||
// Register function (shall only be called during global initialization)
|
||||
template<typename T, T Func>
|
||||
static inline u32 register_function(arm_function_t func)
|
||||
{
|
||||
return registered<T, Func>::index = add_function(func);
|
||||
}
|
||||
|
||||
// Get function index
|
||||
template<typename T, T Func>
|
||||
static inline u32 get_index()
|
||||
{
|
||||
return registered<T, Func>::index;
|
||||
}
|
||||
|
||||
// Read all registered functions
|
||||
static inline const auto& get()
|
||||
{
|
||||
return access();
|
||||
}
|
||||
|
||||
// Allocation address
|
||||
static u32 addr;
|
||||
};
|
||||
|
||||
template<typename T, T Func>
|
||||
u32 arm_function_manager::registered<T, Func>::index = 0;
|
||||
|
||||
#define FIND_FUNC(func) arm_function_manager::get_index<decltype(&func), &func>()
|
File diff suppressed because it is too large
Load Diff
@ -1,604 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include "ARMv7Thread.h"
|
||||
#include "ARMv7Opcodes.h"
|
||||
|
||||
struct arm_interpreter
|
||||
{
|
||||
template<typename T>
|
||||
static u32 BitCount(T x, size_t len)
|
||||
{
|
||||
u32 result = 0;
|
||||
|
||||
for (T mask = static_cast<T>(1) << (len - 1); mask; mask >>= 1)
|
||||
{
|
||||
if (x & mask) result++;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
static u32 DecodeImmShift(u32 type, u32 imm5, u32* shift_n)
|
||||
{
|
||||
using namespace arm_code;
|
||||
|
||||
SRType shift_t;
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case 0: shift_t = SRType_LSL; if (shift_n) *shift_n = imm5; break;
|
||||
case 1: shift_t = SRType_LSR; if (shift_n) *shift_n = imm5 == 0 ? 32 : imm5; break;
|
||||
case 2: shift_t = SRType_ASR; if (shift_n) *shift_n = imm5 == 0 ? 32 : imm5; break;
|
||||
case 3:
|
||||
if (imm5 == 0)
|
||||
{
|
||||
shift_t = SRType_RRX; if (shift_n) *shift_n = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
shift_t = SRType_ROR; if (shift_n) *shift_n = imm5;
|
||||
}
|
||||
break;
|
||||
|
||||
default: fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
return shift_t;
|
||||
}
|
||||
|
||||
static u32 LSL_C(u32 x, s32 shift, bool& carry_out)
|
||||
{
|
||||
verify(HERE), (shift > 0);
|
||||
carry_out = shift <= 32 ? (x & (1 << (32 - shift))) != 0 : false;
|
||||
return shift < 32 ? x << shift : 0;
|
||||
}
|
||||
|
||||
static u32 LSL_(u32 x, s32 shift)
|
||||
{
|
||||
verify(HERE), (shift >= 0);
|
||||
return shift < 32 ? x << shift : 0;
|
||||
}
|
||||
|
||||
static u32 LSR_C(u32 x, s32 shift, bool& carry_out)
|
||||
{
|
||||
verify(HERE), (shift > 0);
|
||||
carry_out = shift <= 32 ? (x & (1 << (shift - 1))) != 0 : false;
|
||||
return shift < 32 ? x >> shift : 0;
|
||||
}
|
||||
|
||||
static u32 LSR_(u32 x, s32 shift)
|
||||
{
|
||||
verify(HERE), (shift >= 0);
|
||||
return shift < 32 ? x >> shift : 0;
|
||||
}
|
||||
|
||||
static s32 ASR_C(s32 x, s32 shift, bool& carry_out)
|
||||
{
|
||||
verify(HERE), (shift > 0);
|
||||
carry_out = shift <= 32 ? (x & (1 << (shift - 1))) != 0 : x < 0;
|
||||
return shift < 32 ? x >> shift : x >> 31;
|
||||
}
|
||||
|
||||
static s32 ASR_(s32 x, s32 shift)
|
||||
{
|
||||
verify(HERE), (shift >= 0);
|
||||
return shift < 32 ? x >> shift : x >> 31;
|
||||
}
|
||||
|
||||
static u32 ROR_C(u32 x, s32 shift, bool& carry_out)
|
||||
{
|
||||
verify(HERE), (shift);
|
||||
const u32 result = x >> shift | x << (32 - shift);
|
||||
carry_out = (result >> 31) != 0;
|
||||
return result;
|
||||
}
|
||||
|
||||
static u32 ROR_(u32 x, s32 shift)
|
||||
{
|
||||
return x >> shift | x << (32 - shift);
|
||||
}
|
||||
|
||||
static u32 RRX_C(u32 x, bool carry_in, bool& carry_out)
|
||||
{
|
||||
carry_out = x & 0x1;
|
||||
return ((u32)carry_in << 31) | (x >> 1);
|
||||
}
|
||||
|
||||
static u32 RRX_(u32 x, bool carry_in)
|
||||
{
|
||||
return ((u32)carry_in << 31) | (x >> 1);
|
||||
}
|
||||
|
||||
static u32 Shift_C(u32 value, u32 type, s32 amount, bool carry_in, bool& carry_out)
|
||||
{
|
||||
verify(HERE), (type != arm_code::SRType_RRX || amount == 1);
|
||||
|
||||
if (amount)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case arm_code::SRType_LSL: return LSL_C(value, amount, carry_out);
|
||||
case arm_code::SRType_LSR: return LSR_C(value, amount, carry_out);
|
||||
case arm_code::SRType_ASR: return ASR_C(value, amount, carry_out);
|
||||
case arm_code::SRType_ROR: return ROR_C(value, amount, carry_out);
|
||||
case arm_code::SRType_RRX: return RRX_C(value, carry_in, carry_out);
|
||||
default: fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
}
|
||||
|
||||
carry_out = carry_in;
|
||||
return value;
|
||||
}
|
||||
|
||||
static u32 Shift(u32 value, u32 type, s32 amount, bool carry_in)
|
||||
{
|
||||
bool carry_out;
|
||||
return Shift_C(value, type, amount, carry_in, carry_out);
|
||||
}
|
||||
|
||||
template<typename T> static T AddWithCarry(T x, T y, bool carry_in, bool& carry_out, bool& overflow)
|
||||
{
|
||||
const T sign_mask = (T)1 << (sizeof(T) * 8 - 1);
|
||||
|
||||
T result = x + y;
|
||||
carry_out = (((x & y) | ((x ^ y) & ~result)) & sign_mask) != 0;
|
||||
overflow = ((x ^ result) & (y ^ result) & sign_mask) != 0;
|
||||
if (carry_in)
|
||||
{
|
||||
result += 1;
|
||||
carry_out ^= (result == 0);
|
||||
overflow ^= (result == sign_mask);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
static bool ConditionPassed(ARMv7Thread& cpu, u32 cond)
|
||||
{
|
||||
bool result = false;
|
||||
|
||||
switch (cond >> 1)
|
||||
{
|
||||
case 0: result = (cpu.APSR.Z == 1); break;
|
||||
case 1: result = (cpu.APSR.C == 1); break;
|
||||
case 2: result = (cpu.APSR.N == 1); break;
|
||||
case 3: result = (cpu.APSR.V == 1); break;
|
||||
case 4: result = (cpu.APSR.C == 1) && (cpu.APSR.Z == 0); break;
|
||||
case 5: result = (cpu.APSR.N == cpu.APSR.V); break;
|
||||
case 6: result = (cpu.APSR.N == cpu.APSR.V) && (cpu.APSR.Z == 0); break;
|
||||
case 7: return true;
|
||||
}
|
||||
|
||||
if (cond & 0x1)
|
||||
{
|
||||
return !result;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
static void UNK(ARMv7Thread&, const u32 op, const u32 cond);
|
||||
|
||||
template<arm_encoding type> static void HACK(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void MRC_(ARMv7Thread&, const u32, const u32);
|
||||
|
||||
template<arm_encoding type> static void ADC_IMM(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void ADC_REG(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void ADC_RSR(ARMv7Thread&, const u32, const u32);
|
||||
|
||||
template<arm_encoding type> static void ADD_IMM(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void ADD_REG(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void ADD_RSR(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void ADD_SPI(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void ADD_SPR(ARMv7Thread&, const u32, const u32);
|
||||
|
||||
template<arm_encoding type> static void ADR(ARMv7Thread&, const u32, const u32);
|
||||
|
||||
template<arm_encoding type> static void AND_IMM(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void AND_REG(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void AND_RSR(ARMv7Thread&, const u32, const u32);
|
||||
|
||||
template<arm_encoding type> static void ASR_IMM(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void ASR_REG(ARMv7Thread&, const u32, const u32);
|
||||
|
||||
template<arm_encoding type> static void B(ARMv7Thread&, const u32, const u32);
|
||||
|
||||
template<arm_encoding type> static void BFC(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void BFI(ARMv7Thread&, const u32, const u32);
|
||||
|
||||
template<arm_encoding type> static void BIC_IMM(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void BIC_REG(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void BIC_RSR(ARMv7Thread&, const u32, const u32);
|
||||
|
||||
template<arm_encoding type> static void BKPT(ARMv7Thread&, const u32, const u32);
|
||||
|
||||
template<arm_encoding type> static void BL(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void BLX(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void BX(ARMv7Thread&, const u32, const u32);
|
||||
|
||||
template<arm_encoding type> static void CB_Z(ARMv7Thread&, const u32, const u32);
|
||||
|
||||
template<arm_encoding type> static void CLZ(ARMv7Thread&, const u32, const u32);
|
||||
|
||||
template<arm_encoding type> static void CMN_IMM(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void CMN_REG(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void CMN_RSR(ARMv7Thread&, const u32, const u32);
|
||||
|
||||
template<arm_encoding type> static void CMP_IMM(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void CMP_REG(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void CMP_RSR(ARMv7Thread&, const u32, const u32);
|
||||
|
||||
template<arm_encoding type> static void DBG(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void DMB(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void DSB(ARMv7Thread&, const u32, const u32);
|
||||
|
||||
template<arm_encoding type> static void EOR_IMM(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void EOR_REG(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void EOR_RSR(ARMv7Thread&, const u32, const u32);
|
||||
|
||||
template<arm_encoding type> static void IT(ARMv7Thread&, const u32, const u32);
|
||||
|
||||
template<arm_encoding type> static void LDM(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void LDMDA(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void LDMDB(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void LDMIB(ARMv7Thread&, const u32, const u32);
|
||||
|
||||
template<arm_encoding type> static void LDR_IMM(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void LDR_LIT(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void LDR_REG(ARMv7Thread&, const u32, const u32);
|
||||
|
||||
template<arm_encoding type> static void LDRB_IMM(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void LDRB_LIT(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void LDRB_REG(ARMv7Thread&, const u32, const u32);
|
||||
|
||||
template<arm_encoding type> static void LDRD_IMM(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void LDRD_LIT(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void LDRD_REG(ARMv7Thread&, const u32, const u32);
|
||||
|
||||
template<arm_encoding type> static void LDRH_IMM(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void LDRH_LIT(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void LDRH_REG(ARMv7Thread&, const u32, const u32);
|
||||
|
||||
template<arm_encoding type> static void LDRSB_IMM(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void LDRSB_LIT(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void LDRSB_REG(ARMv7Thread&, const u32, const u32);
|
||||
|
||||
template<arm_encoding type> static void LDRSH_IMM(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void LDRSH_LIT(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void LDRSH_REG(ARMv7Thread&, const u32, const u32);
|
||||
|
||||
template<arm_encoding type> static void LDREX(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void LDREXB(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void LDREXD(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void LDREXH(ARMv7Thread&, const u32, const u32);
|
||||
|
||||
template<arm_encoding type> static void LSL_IMM(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void LSL_REG(ARMv7Thread&, const u32, const u32);
|
||||
|
||||
template<arm_encoding type> static void LSR_IMM(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void LSR_REG(ARMv7Thread&, const u32, const u32);
|
||||
|
||||
template<arm_encoding type> static void MLA(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void MLS(ARMv7Thread&, const u32, const u32);
|
||||
|
||||
template<arm_encoding type> static void MOV_IMM(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void MOV_REG(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void MOVT(ARMv7Thread&, const u32, const u32);
|
||||
|
||||
template<arm_encoding type> static void MRS(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void MSR_IMM(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void MSR_REG(ARMv7Thread&, const u32, const u32);
|
||||
|
||||
template<arm_encoding type> static void MUL(ARMv7Thread&, const u32, const u32);
|
||||
|
||||
template<arm_encoding type> static void MVN_IMM(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void MVN_REG(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void MVN_RSR(ARMv7Thread&, const u32, const u32);
|
||||
|
||||
template<arm_encoding type> static void NOP(ARMv7Thread&, const u32, const u32);
|
||||
|
||||
template<arm_encoding type> static void ORN_IMM(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void ORN_REG(ARMv7Thread&, const u32, const u32);
|
||||
|
||||
template<arm_encoding type> static void ORR_IMM(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void ORR_REG(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void ORR_RSR(ARMv7Thread&, const u32, const u32);
|
||||
|
||||
template<arm_encoding type> static void PKH(ARMv7Thread&, const u32, const u32);
|
||||
|
||||
template<arm_encoding type> static void POP(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void PUSH(ARMv7Thread&, const u32, const u32);
|
||||
|
||||
template<arm_encoding type> static void QADD(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void QADD16(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void QADD8(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void QASX(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void QDADD(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void QDSUB(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void QSAX(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void QSUB(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void QSUB16(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void QSUB8(ARMv7Thread&, const u32, const u32);
|
||||
|
||||
template<arm_encoding type> static void RBIT(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void REV(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void REV16(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void REVSH(ARMv7Thread&, const u32, const u32);
|
||||
|
||||
template<arm_encoding type> static void ROR_IMM(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void ROR_REG(ARMv7Thread&, const u32, const u32);
|
||||
|
||||
template<arm_encoding type> static void RRX(ARMv7Thread&, const u32, const u32);
|
||||
|
||||
template<arm_encoding type> static void RSB_IMM(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void RSB_REG(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void RSB_RSR(ARMv7Thread&, const u32, const u32);
|
||||
|
||||
template<arm_encoding type> static void RSC_IMM(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void RSC_REG(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void RSC_RSR(ARMv7Thread&, const u32, const u32);
|
||||
|
||||
template<arm_encoding type> static void SADD16(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void SADD8(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void SASX(ARMv7Thread&, const u32, const u32);
|
||||
|
||||
template<arm_encoding type> static void SBC_IMM(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void SBC_REG(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void SBC_RSR(ARMv7Thread&, const u32, const u32);
|
||||
|
||||
template<arm_encoding type> static void SBFX(ARMv7Thread&, const u32, const u32);
|
||||
|
||||
template<arm_encoding type> static void SDIV(ARMv7Thread&, const u32, const u32);
|
||||
|
||||
template<arm_encoding type> static void SEL(ARMv7Thread&, const u32, const u32);
|
||||
|
||||
template<arm_encoding type> static void SHADD16(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void SHADD8(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void SHASX(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void SHSAX(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void SHSUB16(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void SHSUB8(ARMv7Thread&, const u32, const u32);
|
||||
|
||||
template<arm_encoding type> static void SMLA__(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void SMLAD(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void SMLAL(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void SMLAL__(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void SMLALD(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void SMLAW_(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void SMLSD(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void SMLSLD(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void SMMLA(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void SMMLS(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void SMMUL(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void SMUAD(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void SMUL__(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void SMULL(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void SMULW_(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void SMUSD(ARMv7Thread&, const u32, const u32);
|
||||
|
||||
template<arm_encoding type> static void SSAT(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void SSAT16(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void SSAX(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void SSUB16(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void SSUB8(ARMv7Thread&, const u32, const u32);
|
||||
|
||||
template<arm_encoding type> static void STM(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void STMDA(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void STMDB(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void STMIB(ARMv7Thread&, const u32, const u32);
|
||||
|
||||
template<arm_encoding type> static void STR_IMM(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void STR_REG(ARMv7Thread&, const u32, const u32);
|
||||
|
||||
template<arm_encoding type> static void STRB_IMM(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void STRB_REG(ARMv7Thread&, const u32, const u32);
|
||||
|
||||
template<arm_encoding type> static void STRD_IMM(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void STRD_REG(ARMv7Thread&, const u32, const u32);
|
||||
|
||||
template<arm_encoding type> static void STRH_IMM(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void STRH_REG(ARMv7Thread&, const u32, const u32);
|
||||
|
||||
template<arm_encoding type> static void STREX(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void STREXB(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void STREXD(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void STREXH(ARMv7Thread&, const u32, const u32);
|
||||
|
||||
template<arm_encoding type> static void SUB_IMM(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void SUB_REG(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void SUB_RSR(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void SUB_SPI(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void SUB_SPR(ARMv7Thread&, const u32, const u32);
|
||||
|
||||
template<arm_encoding type> static void SVC(ARMv7Thread&, const u32, const u32);
|
||||
|
||||
template<arm_encoding type> static void SXTAB(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void SXTAB16(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void SXTAH(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void SXTB(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void SXTB16(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void SXTH(ARMv7Thread&, const u32, const u32);
|
||||
|
||||
template<arm_encoding type> static void TB_(ARMv7Thread&, const u32, const u32);
|
||||
|
||||
template<arm_encoding type> static void TEQ_IMM(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void TEQ_REG(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void TEQ_RSR(ARMv7Thread&, const u32, const u32);
|
||||
|
||||
template<arm_encoding type> static void TST_IMM(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void TST_REG(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void TST_RSR(ARMv7Thread&, const u32, const u32);
|
||||
|
||||
template<arm_encoding type> static void UADD16(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void UADD8(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void UASX(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void UBFX(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void UDIV(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void UHADD16(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void UHADD8(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void UHASX(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void UHSAX(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void UHSUB16(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void UHSUB8(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void UMAAL(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void UMLAL(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void UMULL(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void UQADD16(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void UQADD8(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void UQASX(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void UQSAX(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void UQSUB16(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void UQSUB8(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void USAD8(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void USADA8(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void USAT(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void USAT16(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void USAX(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void USUB16(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void USUB8(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void UXTAB(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void UXTAB16(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void UXTAH(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void UXTB(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void UXTB16(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void UXTH(ARMv7Thread&, const u32, const u32);
|
||||
|
||||
template<arm_encoding type> static void VABA_(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VABD_(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VABD_FP(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VABS(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VAC__(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VADD(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VADD_FP(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VADDHN(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VADD_(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VAND(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VBIC_IMM(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VBIC_REG(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VB__(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VCEQ_REG(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VCEQ_ZERO(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VCGE_REG(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VCGE_ZERO(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VCGT_REG(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VCGT_ZERO(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VCLE_ZERO(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VCLS(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VCLT_ZERO(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VCLZ(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VCMP_(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VCNT(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VCVT_FIA(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VCVT_FIF(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VCVT_FFA(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VCVT_FFF(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VCVT_DF(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VCVT_HFA(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VCVT_HFF(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VDIV(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VDUP_S(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VDUP_R(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VEOR(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VEXT(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VHADDSUB(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VLD__MS(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VLD1_SL(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VLD1_SAL(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VLD2_SL(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VLD2_SAL(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VLD3_SL(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VLD3_SAL(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VLD4_SL(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VLD4_SAL(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VLDM(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VLDR(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VMAXMIN(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VMAXMIN_FP(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VML__(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VML__FP(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VML__S(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VMOV_IMM(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VMOV_REG(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VMOV_RS(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VMOV_SR(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VMOV_RF(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VMOV_2RF(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VMOV_2RD(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VMOVL(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VMOVN(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VMRS(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VMSR(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VMUL_(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VMUL_FP(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VMUL_S(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VMVN_IMM(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VMVN_REG(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VNEG(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VNM__(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VORN_REG(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VORR_IMM(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VORR_REG(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VPADAL(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VPADD(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VPADD_FP(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VPADDL(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VPMAXMIN(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VPMAXMIN_FP(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VPOP(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VPUSH(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VQABS(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VQADD(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VQDML_L(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VQDMULH(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VQDMULL(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VQMOV_N(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VQNEG(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VQRDMULH(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VQRSHL(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VQRSHR_N(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VQSHL_REG(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VQSHL_IMM(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VQSHR_N(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VQSUB(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VRADDHN(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VRECPE(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VRECPS(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VREV__(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VRHADD(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VRSHL(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VRSHR(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VRSHRN(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VRSQRTE(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VRSQRTS(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VRSRA(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VRSUBHN(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VSHL_IMM(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VSHL_REG(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VSHLL(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VSHR(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VSHRN(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VSLI(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VSQRT(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VSRA(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VSRI(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VST__MS(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VST1_SL(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VST2_SL(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VST3_SL(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VST4_SL(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VSTM(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VSTR(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VSUB(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VSUB_FP(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VSUBHN(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VSUB_(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VSWP(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VTB_(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VTRN(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VTST(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VUZP(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void VZIP(ARMv7Thread&, const u32, const u32);
|
||||
|
||||
template<arm_encoding type> static void WFE(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void WFI(ARMv7Thread&, const u32, const u32);
|
||||
template<arm_encoding type> static void YIELD(ARMv7Thread&, const u32, const u32);
|
||||
};
|
@ -1,601 +0,0 @@
|
||||
#include "stdafx.h"
|
||||
#include "Loader/ELF.h"
|
||||
#include "Emu/Memory/Memory.h"
|
||||
#include "Emu/System.h"
|
||||
#include "Emu/IdManager.h"
|
||||
|
||||
#include "ARMv7Thread.h"
|
||||
#include "ARMv7Opcodes.h"
|
||||
#include "ARMv7Function.h"
|
||||
#include "ARMv7Module.h"
|
||||
#include "Modules/sceLibKernel.h"
|
||||
|
||||
extern std::string arm_get_function_name(const std::string& module, u32 fnid);
|
||||
extern std::string arm_get_variable_name(const std::string& module, u32 vnid);
|
||||
|
||||
// Function lookup table. Not supposed to grow after emulation start.
|
||||
std::vector<arm_function_t> g_arm_function_cache;
|
||||
|
||||
std::vector<std::string> g_arm_function_names;
|
||||
|
||||
extern std::string arm_get_module_function_name(u32 index)
|
||||
{
|
||||
if (index < g_arm_function_names.size())
|
||||
{
|
||||
return g_arm_function_names[index];
|
||||
}
|
||||
|
||||
return fmt::format(".%u", index);
|
||||
}
|
||||
|
||||
extern void arm_execute_function(ARMv7Thread& cpu, u32 index)
|
||||
{
|
||||
if (index < g_arm_function_cache.size())
|
||||
{
|
||||
if (const auto func = g_arm_function_cache[index])
|
||||
{
|
||||
func(cpu);
|
||||
LOG_TRACE(ARMv7, "Function '%s' finished, r0=0x%x", arm_get_module_function_name(index), cpu.GPR[0]);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
fmt::throw_exception("Function not registered (%u)" HERE, index);
|
||||
}
|
||||
|
||||
arm_static_module::arm_static_module(const char* name)
|
||||
: name(name)
|
||||
{
|
||||
arm_module_manager::register_module(this);
|
||||
}
|
||||
|
||||
std::unordered_map<std::string, arm_static_module*>& arm_module_manager::access()
|
||||
{
|
||||
static std::unordered_map<std::string, arm_static_module*> map;
|
||||
|
||||
return map;
|
||||
}
|
||||
|
||||
void arm_module_manager::register_module(arm_static_module* module)
|
||||
{
|
||||
access().emplace(module->name, module);
|
||||
}
|
||||
|
||||
arm_static_function& arm_module_manager::access_static_function(const char* module, u32 fnid)
|
||||
{
|
||||
return access().at(module)->functions[fnid];
|
||||
}
|
||||
|
||||
arm_static_variable& arm_module_manager::access_static_variable(const char* module, u32 vnid)
|
||||
{
|
||||
return access().at(module)->variables[vnid];
|
||||
}
|
||||
|
||||
const arm_static_module* arm_module_manager::get_module(const std::string& name)
|
||||
{
|
||||
const auto& map = access();
|
||||
const auto found = map.find(name);
|
||||
return found != map.end() ? found->second : nullptr;
|
||||
}
|
||||
|
||||
static void arm_initialize_modules()
|
||||
{
|
||||
const std::initializer_list<const arm_static_module*> registered
|
||||
{
|
||||
&arm_module_manager::SceAppMgr,
|
||||
&arm_module_manager::SceAppUtil,
|
||||
&arm_module_manager::SceAudio,
|
||||
&arm_module_manager::SceAudiodec,
|
||||
&arm_module_manager::SceAudioenc,
|
||||
&arm_module_manager::SceAudioIn,
|
||||
&arm_module_manager::SceCamera,
|
||||
&arm_module_manager::SceCodecEngine,
|
||||
&arm_module_manager::SceCommonDialog,
|
||||
&arm_module_manager::SceCpu,
|
||||
&arm_module_manager::SceCtrl,
|
||||
&arm_module_manager::SceDbg,
|
||||
&arm_module_manager::SceDebugLed,
|
||||
&arm_module_manager::SceDeci4p,
|
||||
&arm_module_manager::SceDeflt,
|
||||
&arm_module_manager::SceDipsw,
|
||||
&arm_module_manager::SceDisplay,
|
||||
&arm_module_manager::SceDisplayUser,
|
||||
&arm_module_manager::SceFiber,
|
||||
&arm_module_manager::SceFios,
|
||||
&arm_module_manager::SceFpu,
|
||||
&arm_module_manager::SceGxm,
|
||||
&arm_module_manager::SceHttp,
|
||||
&arm_module_manager::SceIme,
|
||||
&arm_module_manager::SceIofilemgr,
|
||||
&arm_module_manager::SceJpeg,
|
||||
&arm_module_manager::SceJpegEnc,
|
||||
&arm_module_manager::SceLibc,
|
||||
&arm_module_manager::SceLibKernel,
|
||||
&arm_module_manager::SceLibm,
|
||||
&arm_module_manager::SceLibstdcxx,
|
||||
&arm_module_manager::SceLibXml,
|
||||
&arm_module_manager::SceLiveArea,
|
||||
&arm_module_manager::SceLocation,
|
||||
&arm_module_manager::SceMd5,
|
||||
&arm_module_manager::SceModulemgr,
|
||||
&arm_module_manager::SceMotion,
|
||||
&arm_module_manager::SceMt19937,
|
||||
&arm_module_manager::SceNet,
|
||||
&arm_module_manager::SceNetCtl,
|
||||
&arm_module_manager::SceNgs,
|
||||
&arm_module_manager::SceNpBasic,
|
||||
&arm_module_manager::SceNpCommon,
|
||||
&arm_module_manager::SceNpManager,
|
||||
&arm_module_manager::SceNpMatching,
|
||||
&arm_module_manager::SceNpScore,
|
||||
&arm_module_manager::SceNpUtility,
|
||||
&arm_module_manager::ScePerf,
|
||||
&arm_module_manager::ScePgf,
|
||||
&arm_module_manager::ScePhotoExport,
|
||||
&arm_module_manager::SceProcessmgr,
|
||||
&arm_module_manager::SceRazorCapture,
|
||||
&arm_module_manager::SceRtc,
|
||||
&arm_module_manager::SceSas,
|
||||
&arm_module_manager::SceScreenShot,
|
||||
&arm_module_manager::SceSfmt,
|
||||
&arm_module_manager::SceSha,
|
||||
&arm_module_manager::SceSqlite,
|
||||
&arm_module_manager::SceSsl,
|
||||
&arm_module_manager::SceStdio,
|
||||
&arm_module_manager::SceSulpha,
|
||||
&arm_module_manager::SceSysmem,
|
||||
&arm_module_manager::SceSysmodule,
|
||||
&arm_module_manager::SceSystemGesture,
|
||||
&arm_module_manager::SceThreadmgr,
|
||||
&arm_module_manager::SceTouch,
|
||||
&arm_module_manager::SceUlt,
|
||||
&arm_module_manager::SceVideodec,
|
||||
&arm_module_manager::SceVoice,
|
||||
&arm_module_manager::SceVoiceQoS,
|
||||
};
|
||||
|
||||
// Reinitialize function cache
|
||||
g_arm_function_cache = arm_function_manager::get();
|
||||
g_arm_function_names.clear();
|
||||
g_arm_function_names.resize(g_arm_function_cache.size());
|
||||
|
||||
// "Use" all the modules for correct linkage
|
||||
for (auto& module : registered)
|
||||
{
|
||||
LOG_TRACE(LOADER, "Registered static module: %s", module->name);
|
||||
}
|
||||
|
||||
for (auto& pair : arm_module_manager::get())
|
||||
{
|
||||
const auto module = pair.second;
|
||||
|
||||
for (auto& function : module->functions)
|
||||
{
|
||||
LOG_TRACE(LOADER, "** 0x%08X: %s", function.first, function.second.name);
|
||||
g_arm_function_names.at(function.second.index) = fmt::format("%s.%s", module->name, function.second.name);
|
||||
}
|
||||
|
||||
for (auto& variable : module->variables)
|
||||
{
|
||||
LOG_TRACE(LOADER, "** &0x%08X: %s (size=0x%x, align=0x%x)", variable.first, variable.second.name, variable.second.size, variable.second.align);
|
||||
variable.second.var->set(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct psv_moduleinfo_t
|
||||
{
|
||||
le_t<u16> attr; // ???
|
||||
u8 major; // ???
|
||||
u8 minor; // ???
|
||||
char name[24]; // ???
|
||||
le_t<u32> unk0;
|
||||
le_t<u32> unk1;
|
||||
le_t<u32> libent_top;
|
||||
le_t<u32> libent_end;
|
||||
le_t<u32> libstub_top;
|
||||
le_t<u32> libstub_end;
|
||||
le_t<u32> data[1]; // ...
|
||||
};
|
||||
|
||||
struct psv_libent_t
|
||||
{
|
||||
le_t<u16> size; // ???
|
||||
le_t<u16> unk0;
|
||||
le_t<u16> unk1;
|
||||
le_t<u16> fcount;
|
||||
le_t<u16> vcount;
|
||||
le_t<u16> unk2;
|
||||
le_t<u32> unk3;
|
||||
le_t<u32> data[1]; // ...
|
||||
};
|
||||
|
||||
struct psv_libstub_t
|
||||
{
|
||||
le_t<u16> size; // 0x2C, 0x34
|
||||
le_t<u16> unk0; // (usually 1, 5 for sceLibKernel)
|
||||
le_t<u16> unk1; // (usually 0)
|
||||
le_t<u16> fcount;
|
||||
le_t<u16> vcount;
|
||||
le_t<u16> unk2;
|
||||
le_t<u32> unk3;
|
||||
le_t<u32> data[1]; // ...
|
||||
};
|
||||
|
||||
struct psv_libcparam_t
|
||||
{
|
||||
le_t<u32> size;
|
||||
le_t<u32> unk0;
|
||||
|
||||
vm::lcptr<u32> sceLibcHeapSize;
|
||||
vm::lcptr<u32> sceLibcHeapSizeDefault;
|
||||
vm::lcptr<u32> sceLibcHeapExtendedAlloc;
|
||||
vm::lcptr<u32> sceLibcHeapDelayedAlloc;
|
||||
|
||||
le_t<u32> unk1;
|
||||
le_t<u32> unk2;
|
||||
|
||||
vm::lptr<u32> __sce_libcmallocreplace;
|
||||
vm::lptr<u32> __sce_libcnewreplace;
|
||||
};
|
||||
|
||||
struct psv_process_param_t
|
||||
{
|
||||
le_t<u32> size; // 0x00000030
|
||||
nse_t<u32> ver; // 'PSP2'
|
||||
le_t<u32> unk0; // 0x00000005
|
||||
le_t<u32> unk1;
|
||||
|
||||
vm::lcptr<char> sceUserMainThreadName;
|
||||
vm::lcptr<s32> sceUserMainThreadPriority;
|
||||
vm::lcptr<u32> sceUserMainThreadStackSize;
|
||||
vm::lcptr<u32> sceUserMainThreadAttribute;
|
||||
vm::lcptr<char> sceProcessName;
|
||||
vm::lcptr<u32> sce_process_preload_disabled;
|
||||
vm::lcptr<u32> sceUserMainThreadCpuAffinityMask;
|
||||
|
||||
vm::lcptr<psv_libcparam_t> sce_libcparam;
|
||||
};
|
||||
|
||||
static void arm_patch_refs(u32 refs, u32 addr)
|
||||
{
|
||||
auto ptr = vm::cptr<u32>::make(refs);
|
||||
LOG_NOTICE(LOADER, "**** Processing refs at 0x%x:", ptr);
|
||||
|
||||
if (ptr[0] != 0xff || ptr[1] != addr)
|
||||
{
|
||||
LOG_ERROR(LOADER, "**** Unexpected ref format ([0]=0x%x, [1]=0x%x)", ptr[0], ptr[1]);
|
||||
}
|
||||
else for (ptr += 2; *ptr; ptr++)
|
||||
{
|
||||
switch (u32 code = *ptr)
|
||||
{
|
||||
case 0x0000002f: // movw r*,# instruction
|
||||
{
|
||||
const u32 raddr = *++ptr;
|
||||
vm::write16(raddr + 0, vm::read16(raddr + 0) | (addr & 0x800) >> 1 | (addr & 0xf000) >> 12);
|
||||
vm::write16(raddr + 2, vm::read16(raddr + 2) | (addr & 0x700) << 4 | (addr & 0xff));
|
||||
|
||||
LOG_NOTICE(LOADER, "**** MOVW written at *0x%x", raddr);
|
||||
break;
|
||||
}
|
||||
case 0x00000030: // movt r*,# instruction
|
||||
{
|
||||
const u32 raddr = *++ptr;
|
||||
vm::write16(raddr + 0, vm::read16(raddr + 0) | (addr & 0x8000000) >> 17 | (addr & 0xf0000000) >> 28);
|
||||
vm::write16(raddr + 2, vm::read16(raddr + 2) | (addr & 0x7000000) >> 12 | (addr & 0xff0000) >> 16);
|
||||
|
||||
LOG_NOTICE(LOADER, "**** MOVT written at *0x%x", raddr);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
LOG_ERROR(LOADER, "**** Unknown ref code found (0x%08x)", code);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void arm_load_exec(const arm_exec_object& elf)
|
||||
{
|
||||
arm_initialize_modules();
|
||||
|
||||
vm::cptr<psv_moduleinfo_t> module_info{};
|
||||
vm::cptr<psv_libent_t> libent{};
|
||||
vm::cptr<psv_libstub_t> libstub{};
|
||||
vm::cptr<psv_process_param_t> proc_param{};
|
||||
|
||||
u32 entry_point{};
|
||||
u32 start_addr{};
|
||||
u32 arm_exidx{};
|
||||
u32 arm_extab{};
|
||||
u32 tls_faddr{};
|
||||
u32 tls_fsize{};
|
||||
u32 tls_vsize{};
|
||||
|
||||
for (const auto& prog : elf.progs)
|
||||
{
|
||||
if (prog.p_type == 0x1 /* LOAD */ && prog.p_memsz)
|
||||
{
|
||||
if (!vm::falloc(prog.p_vaddr & ~0xfff, prog.p_memsz + (prog.p_vaddr & 0xfff), vm::main))
|
||||
{
|
||||
fmt::throw_exception("vm::falloc() failed (addr=0x%x, size=0x%x)", prog.p_vaddr, prog.p_memsz);
|
||||
}
|
||||
|
||||
if (prog.p_paddr)
|
||||
{
|
||||
module_info.set(prog.p_vaddr + (prog.p_paddr - prog.p_offset));
|
||||
LOG_NOTICE(LOADER, "Found program with p_paddr=0x%x", prog.p_paddr);
|
||||
}
|
||||
|
||||
if (!start_addr)
|
||||
{
|
||||
start_addr = prog.p_vaddr;
|
||||
}
|
||||
|
||||
std::memcpy(vm::base(prog.p_vaddr), prog.bin.data(), prog.p_filesz);
|
||||
}
|
||||
}
|
||||
|
||||
if (!module_info) module_info.set(start_addr + elf.header.e_entry);
|
||||
if (!libent) libent.set(start_addr + module_info->libent_top);
|
||||
if (!libstub) libstub.set(start_addr + module_info->libstub_top);
|
||||
|
||||
LOG_NOTICE(LOADER, "__sce_moduleinfo(*0x%x) analysis...", module_info);
|
||||
|
||||
if (module_info->data[2] == 0xffffffff)
|
||||
{
|
||||
arm_exidx = module_info->data[3];
|
||||
arm_extab = module_info->data[4];
|
||||
tls_faddr = module_info->data[5];
|
||||
tls_fsize = module_info->data[6];
|
||||
tls_vsize = module_info->data[7];
|
||||
}
|
||||
else if (module_info->data[5] == 0xffffffff)
|
||||
{
|
||||
tls_faddr = module_info->data[1]; // Guess
|
||||
tls_fsize = module_info->data[2];
|
||||
tls_vsize = module_info->data[3];
|
||||
arm_exidx = module_info->data[6];
|
||||
arm_extab = module_info->data[8];
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG_ERROR(LOADER, "Failed to recognize __sce_moduleinfo format");
|
||||
}
|
||||
|
||||
LOG_NOTICE(LOADER, "** arm_exidx=0x%x", arm_exidx);
|
||||
LOG_NOTICE(LOADER, "** arm_extab=0x%x", arm_extab);
|
||||
LOG_NOTICE(LOADER, "** tls_faddr=0x%x", tls_faddr);
|
||||
LOG_NOTICE(LOADER, "** tls_fsize=0x%x", tls_fsize);
|
||||
LOG_NOTICE(LOADER, "** tls_vsize=0x%x", tls_vsize);
|
||||
|
||||
// Process exports
|
||||
while (libent.addr() < start_addr + module_info->libent_end)
|
||||
{
|
||||
const u32 size = libent->size;
|
||||
|
||||
// TODO: check addresses
|
||||
if (size != 0x1c && size != 0x20)
|
||||
{
|
||||
LOG_ERROR(LOADER, "Unknown libent size (0x%x) at *0x%x", libent->size, libent);
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG_NOTICE(LOADER, "Loading libent at *0x%x", libent);
|
||||
LOG_NOTICE(LOADER, "** 0x%x, 0x%x", libent->unk0, libent->unk1);
|
||||
LOG_NOTICE(LOADER, "** Functions: %u", libent->fcount);
|
||||
LOG_NOTICE(LOADER, "** Variables: %u", libent->vcount);
|
||||
LOG_NOTICE(LOADER, "** 0x%x, 0x%08x", libent->unk2, libent->unk3);
|
||||
|
||||
const auto export_nids = vm::cptr<u32>::make(libent->data[size == 0x20 ? 2 : 1]);
|
||||
const auto export_data = vm::cptr<u32>::make(libent->data[size == 0x20 ? 3 : 2]);
|
||||
|
||||
for (u32 i = 0, count = export_data - export_nids; i < count; i++)
|
||||
{
|
||||
const u32 nid = export_nids[i];
|
||||
const u32 addr = export_data[i];
|
||||
|
||||
// Known exports
|
||||
switch (nid)
|
||||
{
|
||||
case 0x935cd196: // set entry point
|
||||
{
|
||||
entry_point = addr;
|
||||
break;
|
||||
}
|
||||
|
||||
case 0x6c2224ba: // __sce_moduleinfo
|
||||
{
|
||||
verify(HERE), addr == module_info.addr();
|
||||
break;
|
||||
}
|
||||
|
||||
case 0x70fba1e7: // __sce_process_param
|
||||
{
|
||||
proc_param.set(addr);
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
{
|
||||
LOG_ERROR(LOADER, "** Unknown export '0x%08X' (*0x%x)", nid, addr);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Next entry
|
||||
libent.set(libent.addr() + libent->size);
|
||||
}
|
||||
|
||||
// Process imports
|
||||
while (libstub.addr() < start_addr + module_info->libstub_end)
|
||||
{
|
||||
const u32 size = libstub->size;
|
||||
|
||||
// TODO: check addresses
|
||||
if (size != 0x2c && size != 0x34)
|
||||
{
|
||||
LOG_ERROR(LOADER, "Unknown libstub size (0x%x) at *0x%x)", libstub->size, libstub);
|
||||
}
|
||||
else
|
||||
{
|
||||
const std::string module_name(vm::_ptr<char>(libstub->data[size == 0x34 ? 1 : 0]));
|
||||
|
||||
LOG_NOTICE(LOADER, "Loading libstub at 0x%x: %s", libstub, module_name);
|
||||
|
||||
const auto _sm = arm_module_manager::get_module(module_name);
|
||||
|
||||
if (!_sm)
|
||||
{
|
||||
LOG_ERROR(LOADER, "** Unknown module '%s'", module_name);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Allocate HLE variables (TODO)
|
||||
for (auto& var : _sm->variables)
|
||||
{
|
||||
var.second.var->set(vm::alloc(var.second.size, vm::main, std::max<u32>(var.second.align, 4096)));
|
||||
LOG_WARNING(LOADER, "** Allocated variable '%s' in module '%s' at *0x%x", var.second.name, module_name, var.second.var->addr());
|
||||
}
|
||||
|
||||
// Initialize HLE variables (TODO)
|
||||
for (auto& var : _sm->variables)
|
||||
{
|
||||
var.second.init();
|
||||
}
|
||||
}
|
||||
|
||||
LOG_NOTICE(LOADER, "** 0x%x, 0x%x", libstub->unk0, libstub->unk1);
|
||||
LOG_NOTICE(LOADER, "** Functions: %u", libstub->fcount);
|
||||
LOG_NOTICE(LOADER, "** Variables: %u", libstub->vcount);
|
||||
LOG_NOTICE(LOADER, "** 0x%x, 0x%08x", libstub->unk2, libstub->unk3);
|
||||
|
||||
const auto fnids = vm::cptr<u32>::make(libstub->data[size == 0x34 ? 3 : 1]);
|
||||
const auto fstubs = vm::cptr<u32>::make(libstub->data[size == 0x34 ? 4 : 2]);
|
||||
|
||||
for (u32 j = 0; j < libstub->fcount; j++)
|
||||
{
|
||||
const u32 fnid = fnids[j];
|
||||
const u32 faddr = fstubs[j];
|
||||
|
||||
u32 index = 0;
|
||||
|
||||
const auto fstub = vm::ptr<u32>::make(faddr);
|
||||
const auto fname = arm_get_function_name(module_name, fnid);
|
||||
|
||||
if (_sm && _sm->functions.count(fnid))
|
||||
{
|
||||
index = _sm->functions.at(fnid).index;
|
||||
LOG_NOTICE(LOADER, "** Imported function '%s' in module '%s' (*0x%x)", fname, module_name, faddr);
|
||||
}
|
||||
else
|
||||
{
|
||||
// TODO
|
||||
index = ::size32(g_arm_function_cache);
|
||||
g_arm_function_cache.emplace_back();
|
||||
g_arm_function_names.emplace_back(fmt::format("%s.%s", module_name, fname));
|
||||
|
||||
LOG_ERROR(LOADER, "** Unknown function '%s' in module '%s' (*0x%x) -> index %u", fname, module_name, faddr, index);
|
||||
}
|
||||
|
||||
// Check import stub
|
||||
if (fstub[2] != 0xE1A00000)
|
||||
{
|
||||
LOG_ERROR(LOADER, "**** Unexpected import function stub (*0x%x, [2]=0x%08x)", faddr, fstub[2]);
|
||||
}
|
||||
|
||||
// Process refs
|
||||
if (const u32 refs = fstub[3])
|
||||
{
|
||||
arm_patch_refs(refs, faddr);
|
||||
}
|
||||
|
||||
// Install HACK instruction (ARM)
|
||||
fstub[0] = 0xe0700090 | arm_code::hack<arm_encoding::A1>::index::insert(index);
|
||||
}
|
||||
|
||||
const auto vnids = vm::cptr<u32>::make(libstub->data[size == 0x34 ? 5 : 3]);
|
||||
const auto vstub = vm::cptr<u32>::make(libstub->data[size == 0x34 ? 6 : 4]);
|
||||
|
||||
for (u32 j = 0; j < libstub->vcount; j++)
|
||||
{
|
||||
const u32 vnid = vnids[j];
|
||||
const u32 refs = vstub[j];
|
||||
|
||||
// Static variable
|
||||
if (const auto _sv = _sm && _sm->variables.count(vnid) ? &_sm->variables.at(vnid) : nullptr)
|
||||
{
|
||||
LOG_NOTICE(LOADER, "** Imported variable '%s' in module '%s' (refs=*0x%x)", arm_get_variable_name(module_name, vnid), module_name, refs);
|
||||
arm_patch_refs(refs, _sv->var->addr());
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG_FATAL(LOADER, "** Unknown variable '%s' in module '%s' (refs=*0x%x)", arm_get_variable_name(module_name, vnid), module_name, refs);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Next lib
|
||||
libstub.set(libstub.addr() + size);
|
||||
}
|
||||
|
||||
LOG_NOTICE(LOADER, "__sce_process_param(*0x%x) analysis...", proc_param);
|
||||
|
||||
verify(HERE), proc_param->size >= sizeof(psv_process_param_t);
|
||||
verify(HERE), proc_param->ver == "PSP2"_u32;
|
||||
|
||||
LOG_NOTICE(LOADER, "*** size=0x%x; 0x%x, 0x%x, 0x%x", proc_param->size, proc_param->ver, proc_param->unk0, proc_param->unk1);
|
||||
|
||||
LOG_NOTICE(LOADER, "*** &sceUserMainThreadName = 0x%x", proc_param->sceUserMainThreadName);
|
||||
LOG_NOTICE(LOADER, "*** &sceUserMainThreadPriority = 0x%x", proc_param->sceUserMainThreadPriority);
|
||||
LOG_NOTICE(LOADER, "*** &sceUserMainThreadStackSize = 0x%x", proc_param->sceUserMainThreadStackSize);
|
||||
LOG_NOTICE(LOADER, "*** &sceUserMainThreadAttribute = 0x%x", proc_param->sceUserMainThreadAttribute);
|
||||
LOG_NOTICE(LOADER, "*** &sceProcessName = 0x%x", proc_param->sceProcessName);
|
||||
LOG_NOTICE(LOADER, "*** &sce_process_preload_disabled = 0x%x", proc_param->sce_process_preload_disabled);
|
||||
LOG_NOTICE(LOADER, "*** &sceUserMainThreadCpuAffinityMask = 0x%x", proc_param->sceUserMainThreadCpuAffinityMask);
|
||||
|
||||
const auto libc_param = proc_param->sce_libcparam;
|
||||
|
||||
LOG_NOTICE(LOADER, "__sce_libcparam(*0x%x) analysis...", libc_param);
|
||||
|
||||
verify(HERE), libc_param->size >= 0x1c;
|
||||
|
||||
LOG_NOTICE(LOADER, "*** size=0x%x; 0x%x, 0x%x, 0x%x", libc_param->size, libc_param->unk0, libc_param->unk1, libc_param->unk2);
|
||||
|
||||
LOG_NOTICE(LOADER, "*** &sceLibcHeapSize = 0x%x", libc_param->sceLibcHeapSize);
|
||||
LOG_NOTICE(LOADER, "*** &sceLibcHeapSizeDefault = 0x%x", libc_param->sceLibcHeapSizeDefault);
|
||||
LOG_NOTICE(LOADER, "*** &sceLibcHeapExtendedAlloc = 0x%x", libc_param->sceLibcHeapExtendedAlloc);
|
||||
LOG_NOTICE(LOADER, "*** &sceLibcHeapDelayedAlloc = 0x%x", libc_param->sceLibcHeapDelayedAlloc);
|
||||
|
||||
const auto stop_code = vm::ptr<u32>::make(vm::alloc(3 * 4, vm::main));
|
||||
stop_code[0] = 0xf870; // HACK instruction (Thumb)
|
||||
stop_code[1] = 1; // Predefined function index (HLE return)
|
||||
arm_function_manager::addr = stop_code.addr();
|
||||
|
||||
const std::string& thread_name = proc_param->sceUserMainThreadName ? proc_param->sceUserMainThreadName.get_ptr() : "main_thread";
|
||||
const u32 stack_size = proc_param->sceUserMainThreadStackSize ? proc_param->sceUserMainThreadStackSize->value() : 256 * 1024;
|
||||
const u32 priority = proc_param->sceUserMainThreadPriority ? proc_param->sceUserMainThreadPriority->value() : 160;
|
||||
|
||||
auto thread = idm::make_ptr<ARMv7Thread>(thread_name, priority, stack_size);
|
||||
|
||||
thread->write_pc(entry_point, 0);
|
||||
thread->TLS = fxm::make_always<arm_tls_manager>(tls_faddr + start_addr, tls_fsize, tls_vsize)->alloc();
|
||||
|
||||
// Initialize args
|
||||
std::vector<char> argv_data;
|
||||
|
||||
for (const auto& arg : Emu.argv)
|
||||
{
|
||||
argv_data.insert(argv_data.end(), arg.begin(), arg.end());
|
||||
argv_data.insert(argv_data.end(), '\0');
|
||||
|
||||
thread->GPR[0]++; // argc
|
||||
}
|
||||
|
||||
const u32 argv = vm::alloc(::size32(argv_data), vm::main);
|
||||
std::memcpy(vm::base(argv), argv_data.data(), argv_data.size()); // copy arg list
|
||||
thread->GPR[1] = argv;
|
||||
}
|
@ -1,177 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include "ARMv7Function.h"
|
||||
#include "ARMv7Callback.h"
|
||||
#include "ErrorCodes.h"
|
||||
|
||||
namespace vm { using namespace psv; }
|
||||
|
||||
// HLE function information
|
||||
struct arm_static_function
|
||||
{
|
||||
const char* name;
|
||||
u32 index; // Index for arm_function_manager
|
||||
u32 flags;
|
||||
};
|
||||
|
||||
// HLE variable information
|
||||
struct arm_static_variable
|
||||
{
|
||||
const char* name;
|
||||
vm::gvar<void>* var; // Pointer to variable address storage
|
||||
void(*init)(); // Variable initialization function
|
||||
u32 size;
|
||||
u32 align;
|
||||
};
|
||||
|
||||
// HLE module information
|
||||
class arm_static_module final
|
||||
{
|
||||
public:
|
||||
const std::string name;
|
||||
|
||||
task_stack on_load;
|
||||
task_stack on_unload;
|
||||
|
||||
std::unordered_map<u32, arm_static_function> functions;
|
||||
std::unordered_map<u32, arm_static_variable> variables;
|
||||
|
||||
public:
|
||||
arm_static_module(const char* name);
|
||||
|
||||
arm_static_module(const char* name, void(*init)())
|
||||
: arm_static_module(name)
|
||||
{
|
||||
init();
|
||||
}
|
||||
|
||||
arm_static_module(const char* name, void(*init)(arm_static_module* _this))
|
||||
: arm_static_module(name)
|
||||
{
|
||||
init(this);
|
||||
}
|
||||
};
|
||||
|
||||
class arm_module_manager final
|
||||
{
|
||||
friend class arm_static_module;
|
||||
|
||||
static std::unordered_map<std::string, arm_static_module*>& access();
|
||||
|
||||
static void register_module(arm_static_module* module);
|
||||
|
||||
static arm_static_function& access_static_function(const char* module, u32 fnid);
|
||||
|
||||
static arm_static_variable& access_static_variable(const char* module, u32 vnid);
|
||||
|
||||
public:
|
||||
static const arm_static_module* get_module(const std::string& name);
|
||||
|
||||
template<typename T, T Func>
|
||||
static auto& register_static_function(const char* module, const char* name, arm_function_t func, u32 fnid)
|
||||
{
|
||||
auto& info = access_static_function(module, fnid);
|
||||
|
||||
info.name = name;
|
||||
info.index = arm_function_manager::register_function<T, Func>(func);
|
||||
info.flags = 0;
|
||||
|
||||
return info;
|
||||
}
|
||||
|
||||
template<typename T, T* Var>
|
||||
static auto& register_static_variable(const char* module, const char* name, u32 vnid)
|
||||
{
|
||||
static_assert(std::is_same<u32, typename T::addr_type>::value, "Static variable registration: vm::gvar<T> expected");
|
||||
|
||||
auto& info = access_static_variable(module, vnid);
|
||||
|
||||
info.name = name;
|
||||
info.var = reinterpret_cast<vm::gvar<void>*>(Var);
|
||||
info.init = [] {};
|
||||
info.size = SIZE_32(typename T::type);
|
||||
info.align = ALIGN_32(typename T::type);
|
||||
|
||||
return info;
|
||||
}
|
||||
|
||||
static const auto& get()
|
||||
{
|
||||
return access();
|
||||
}
|
||||
|
||||
static const arm_static_module SceAppMgr;
|
||||
static const arm_static_module SceAppUtil;
|
||||
static const arm_static_module SceAudio;
|
||||
static const arm_static_module SceAudiodec;
|
||||
static const arm_static_module SceAudioenc;
|
||||
static const arm_static_module SceAudioIn;
|
||||
static const arm_static_module SceCamera;
|
||||
static const arm_static_module SceCodecEngine;
|
||||
static const arm_static_module SceCommonDialog;
|
||||
static const arm_static_module SceCpu;
|
||||
static const arm_static_module SceCtrl;
|
||||
static const arm_static_module SceDbg;
|
||||
static const arm_static_module SceDebugLed;
|
||||
static const arm_static_module SceDeci4p;
|
||||
static const arm_static_module SceDeflt;
|
||||
static const arm_static_module SceDipsw;
|
||||
static const arm_static_module SceDisplay;
|
||||
static const arm_static_module SceDisplayUser;
|
||||
static const arm_static_module SceFiber;
|
||||
static const arm_static_module SceFios;
|
||||
static const arm_static_module SceFpu;
|
||||
static const arm_static_module SceGxm;
|
||||
static const arm_static_module SceHttp;
|
||||
static const arm_static_module SceIme;
|
||||
static const arm_static_module SceIofilemgr;
|
||||
static const arm_static_module SceJpeg;
|
||||
static const arm_static_module SceJpegEnc;
|
||||
static const arm_static_module SceLibc;
|
||||
static const arm_static_module SceLibKernel;
|
||||
static const arm_static_module SceLibm;
|
||||
static const arm_static_module SceLibstdcxx;
|
||||
static const arm_static_module SceLibXml;
|
||||
static const arm_static_module SceLiveArea;
|
||||
static const arm_static_module SceLocation;
|
||||
static const arm_static_module SceMd5;
|
||||
static const arm_static_module SceModulemgr;
|
||||
static const arm_static_module SceMotion;
|
||||
static const arm_static_module SceMt19937;
|
||||
static const arm_static_module SceNet;
|
||||
static const arm_static_module SceNetCtl;
|
||||
static const arm_static_module SceNgs;
|
||||
static const arm_static_module SceNpBasic;
|
||||
static const arm_static_module SceNpCommon;
|
||||
static const arm_static_module SceNpManager;
|
||||
static const arm_static_module SceNpMatching;
|
||||
static const arm_static_module SceNpScore;
|
||||
static const arm_static_module SceNpUtility;
|
||||
static const arm_static_module ScePerf;
|
||||
static const arm_static_module ScePgf;
|
||||
static const arm_static_module ScePhotoExport;
|
||||
static const arm_static_module SceProcessmgr;
|
||||
static const arm_static_module SceRazorCapture;
|
||||
static const arm_static_module SceRtc;
|
||||
static const arm_static_module SceSas;
|
||||
static const arm_static_module SceScreenShot;
|
||||
static const arm_static_module SceSfmt;
|
||||
static const arm_static_module SceSha;
|
||||
static const arm_static_module SceSqlite;
|
||||
static const arm_static_module SceSsl;
|
||||
static const arm_static_module SceStdio;
|
||||
static const arm_static_module SceSulpha;
|
||||
static const arm_static_module SceSysmem;
|
||||
static const arm_static_module SceSysmodule;
|
||||
static const arm_static_module SceSystemGesture;
|
||||
static const arm_static_module SceThreadmgr;
|
||||
static const arm_static_module SceTouch;
|
||||
static const arm_static_module SceUlt;
|
||||
static const arm_static_module SceVideodec;
|
||||
static const arm_static_module SceVoice;
|
||||
static const arm_static_module SceVoiceQoS;
|
||||
};
|
||||
|
||||
#define REG_FNID(module, nid, func) arm_module_manager::register_static_function<decltype(&func), &func>(#module, #func, BIND_FUNC(func), nid)
|
||||
|
||||
#define REG_VNID(module, nid, var) arm_module_manager::register_static_variable<decltype(var), &var>(#module, #var, nid)
|
File diff suppressed because it is too large
Load Diff
@ -1,205 +0,0 @@
|
||||
#include "stdafx.h"
|
||||
#include "Emu/Memory/Memory.h"
|
||||
#include "Emu/IdManager.h"
|
||||
#include "Emu/System.h"
|
||||
|
||||
#include "ARMv7Thread.h"
|
||||
#include "ARMv7Opcodes.h"
|
||||
#include "ARMv7Interpreter.h"
|
||||
#include "ARMv7Function.h"
|
||||
|
||||
#include "Utilities/GSL.h"
|
||||
|
||||
namespace vm { using namespace psv; }
|
||||
|
||||
const arm_decoder<arm_interpreter> s_arm_interpreter;
|
||||
|
||||
std::string ARMv7Thread::get_name() const
|
||||
{
|
||||
return fmt::format("ARMv7[0x%x] Thread (%s)", id, m_name);
|
||||
}
|
||||
|
||||
std::string ARMv7Thread::dump() const
|
||||
{
|
||||
std::string result = cpu_thread::dump();
|
||||
result += "Last function: ";
|
||||
result += last_function ? last_function : "";
|
||||
result += "\n\n";
|
||||
result += "Registers:\n=========\n";
|
||||
for(int i=0; i<15; ++i)
|
||||
{
|
||||
result += fmt::format("r%u\t= 0x%08x\n", i, GPR[i]);
|
||||
}
|
||||
|
||||
result += fmt::format("APSR\t= 0x%08x [N: %d, Z: %d, C: %d, V: %d, Q: %d]\n",
|
||||
APSR.APSR,
|
||||
u32{ APSR.N },
|
||||
u32{ APSR.Z },
|
||||
u32{ APSR.C },
|
||||
u32{ APSR.V },
|
||||
u32{ APSR.Q });
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
extern thread_local std::string(*g_tls_log_prefix)();
|
||||
|
||||
void ARMv7Thread::cpu_task()
|
||||
{
|
||||
return fast_call(PC);
|
||||
}
|
||||
|
||||
void ARMv7Thread::cpu_task_main()
|
||||
{
|
||||
g_tls_log_prefix = []
|
||||
{
|
||||
const auto cpu = static_cast<ARMv7Thread*>(get_current_cpu_thread());
|
||||
|
||||
return fmt::format("%s [0x%08x]", cpu->get_name(), cpu->PC);
|
||||
};
|
||||
|
||||
while (!test(state) || !check_state())
|
||||
{
|
||||
if (ISET == Thumb)
|
||||
{
|
||||
const u16 op16 = vm::read16(PC);
|
||||
const u32 cond = ITSTATE.advance();
|
||||
|
||||
if (const auto func16 = s_arm_interpreter.decode_thumb(op16))
|
||||
{
|
||||
func16(*this, op16, cond);
|
||||
PC += 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
const u32 op32 = (op16 << 16) | vm::read16(PC + 2);
|
||||
|
||||
s_arm_interpreter.decode_thumb(op32)(*this, op32, cond);
|
||||
PC += 4;
|
||||
}
|
||||
}
|
||||
else if (ISET == ARM)
|
||||
{
|
||||
const u32 op = vm::read32(PC);
|
||||
|
||||
s_arm_interpreter.decode_arm(op)(*this, op, op >> 28);
|
||||
PC += 4;
|
||||
}
|
||||
else
|
||||
{
|
||||
fmt::throw_exception("Invalid instruction set" HERE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ARMv7Thread::~ARMv7Thread()
|
||||
{
|
||||
if (stack_addr)
|
||||
{
|
||||
vm::dealloc_verbose_nothrow(stack_addr, vm::main);
|
||||
}
|
||||
}
|
||||
|
||||
ARMv7Thread::ARMv7Thread(const std::string& name, u32 prio, u32 stack)
|
||||
: cpu_thread(idm::last_id())
|
||||
, m_name(name)
|
||||
, prio(prio)
|
||||
, stack_addr(vm::alloc(stack, vm::main))
|
||||
, stack_size(stack)
|
||||
{
|
||||
verify(HERE), stack_size, stack_addr;
|
||||
|
||||
std::memset(GPR, 0, sizeof(GPR));
|
||||
APSR.APSR = 0;
|
||||
IPSR.IPSR = 0;
|
||||
ITSTATE.IT = 0;
|
||||
SP = stack_addr + stack_size;
|
||||
}
|
||||
|
||||
void ARMv7Thread::fast_call(u32 addr)
|
||||
{
|
||||
const auto old_PC = PC;
|
||||
const auto old_LR = LR;
|
||||
const auto old_func = last_function;
|
||||
|
||||
PC = addr;
|
||||
LR = arm_function_manager::addr; // TODO
|
||||
last_function = nullptr;
|
||||
|
||||
auto at_ret = gsl::finally([&]()
|
||||
{
|
||||
if (std::uncaught_exception())
|
||||
{
|
||||
if (last_function)
|
||||
{
|
||||
LOG_ERROR(ARMv7, "'%s' aborted", last_function);
|
||||
}
|
||||
|
||||
last_function = old_func;
|
||||
}
|
||||
else
|
||||
{
|
||||
state -= cpu_flag::ret;
|
||||
PC = old_PC;
|
||||
LR = old_LR;
|
||||
last_function = old_func;
|
||||
}
|
||||
});
|
||||
|
||||
try
|
||||
{
|
||||
cpu_task_main();
|
||||
}
|
||||
catch (cpu_flag _s)
|
||||
{
|
||||
state += _s;
|
||||
|
||||
if (_s != cpu_flag::ret)
|
||||
{
|
||||
throw;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
u32 ARMv7Thread::stack_push(u32 size, u32 align_v)
|
||||
{
|
||||
if (auto cpu = get_current_cpu_thread())
|
||||
{
|
||||
ARMv7Thread& context = static_cast<ARMv7Thread&>(*cpu);
|
||||
|
||||
const u32 old_pos = context.SP;
|
||||
context.SP -= align(size + 4, 4); // room minimal possible size
|
||||
context.SP &= ~(align_v - 1); // fix stack alignment
|
||||
|
||||
if (old_pos >= context.stack_addr && old_pos < context.stack_addr + context.stack_size && context.SP < context.stack_addr)
|
||||
{
|
||||
fmt::throw_exception("Stack overflow (size=0x%x, align=0x%x, SP=0x%x, stack=*0x%x)" HERE, size, align_v, context.SP, context.stack_addr);
|
||||
}
|
||||
else
|
||||
{
|
||||
vm::psv::_ref<nse_t<u32>>(context.SP + size) = old_pos;
|
||||
return context.SP;
|
||||
}
|
||||
}
|
||||
|
||||
fmt::throw_exception("Invalid thread" HERE);
|
||||
}
|
||||
|
||||
void ARMv7Thread::stack_pop_verbose(u32 addr, u32 size) noexcept
|
||||
{
|
||||
if (auto cpu = get_current_cpu_thread())
|
||||
{
|
||||
ARMv7Thread& context = static_cast<ARMv7Thread&>(*cpu);
|
||||
|
||||
if (context.SP != addr)
|
||||
{
|
||||
LOG_ERROR(ARMv7, "Stack inconsistency (addr=0x%x, SP=0x%x, size=0x%x)", addr, context.SP, size);
|
||||
return;
|
||||
}
|
||||
|
||||
context.SP = vm::psv::_ref<nse_t<u32>>(context.SP + size);
|
||||
return;
|
||||
}
|
||||
|
||||
LOG_ERROR(ARMv7, "Invalid thread" HERE);
|
||||
}
|
@ -1,293 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include "Emu/CPU/CPUThread.h"
|
||||
#include "Emu/Memory/vm.h"
|
||||
|
||||
enum ARMv7InstructionSet
|
||||
{
|
||||
ARM,
|
||||
Thumb,
|
||||
Jazelle,
|
||||
ThumbEE
|
||||
};
|
||||
|
||||
class ARMv7Thread final : public cpu_thread
|
||||
{
|
||||
public:
|
||||
static const u32 id_base = 1;
|
||||
static const u32 id_step = 2;
|
||||
static const u32 id_count = 4096;
|
||||
|
||||
virtual std::string get_name() const override;
|
||||
virtual std::string dump() const override;
|
||||
virtual void cpu_task() override;
|
||||
virtual void cpu_task_main();
|
||||
virtual ~ARMv7Thread() override;
|
||||
|
||||
ARMv7Thread(const std::string& name, u32 prio = 160, u32 stack = 256 * 1024);
|
||||
|
||||
union
|
||||
{
|
||||
u32 GPR[15];
|
||||
|
||||
struct
|
||||
{
|
||||
u32 pad[13];
|
||||
|
||||
union
|
||||
{
|
||||
u32 SP;
|
||||
|
||||
struct { u16 SP_main, SP_process; };
|
||||
};
|
||||
|
||||
u32 LR;
|
||||
|
||||
union
|
||||
{
|
||||
struct
|
||||
{
|
||||
u32 reserved0 : 16;
|
||||
u32 GE : 4;
|
||||
u32 reserved1 : 4;
|
||||
u32 dummy : 3;
|
||||
u32 Q : 1; // Set to 1 if an SSAT or USAT instruction changes (saturates) the input value for the signed or unsigned range of the result
|
||||
u32 V : 1; // Overflow condition code flag
|
||||
u32 C : 1; // Carry condition code flag
|
||||
u32 Z : 1; // Zero condition code flag
|
||||
u32 N : 1; // Negative condition code flag
|
||||
};
|
||||
|
||||
u32 APSR;
|
||||
|
||||
} APSR;
|
||||
};
|
||||
|
||||
struct
|
||||
{
|
||||
u64 GPR_D[8];
|
||||
};
|
||||
};
|
||||
|
||||
union
|
||||
{
|
||||
struct
|
||||
{
|
||||
u32 dummy : 24;
|
||||
u32 exception : 8;
|
||||
};
|
||||
|
||||
u32 IPSR;
|
||||
|
||||
} IPSR;
|
||||
|
||||
ARMv7InstructionSet ISET;
|
||||
|
||||
union
|
||||
{
|
||||
struct
|
||||
{
|
||||
u8 shift_state : 5;
|
||||
u8 cond_base : 3;
|
||||
};
|
||||
|
||||
struct
|
||||
{
|
||||
u8 check_state : 4;
|
||||
u8 condition : 4;
|
||||
};
|
||||
|
||||
u8 IT;
|
||||
|
||||
u32 advance()
|
||||
{
|
||||
// 0xf is "always true" and indicates that this instruction was not in IT block.
|
||||
// 0xe is "always true" too and represents the AL condition of IT block.
|
||||
// This makes a significant difference in some instructions.
|
||||
const u32 res = check_state ? condition : 0xf;
|
||||
|
||||
shift_state <<= 1;
|
||||
if (!check_state)
|
||||
{
|
||||
IT = 0; // clear
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
operator bool() const
|
||||
{
|
||||
return check_state != 0;
|
||||
}
|
||||
|
||||
} ITSTATE;
|
||||
|
||||
u32 TLS = 0;
|
||||
u64 rtime = 0;
|
||||
u32 raddr = 0;
|
||||
u32 rdata = 0;
|
||||
|
||||
struct perf_counter
|
||||
{
|
||||
u32 event;
|
||||
u32 value;
|
||||
};
|
||||
|
||||
std::array<perf_counter, 6> counters{};
|
||||
|
||||
u32 PC = 0;
|
||||
u32 prio = -1;
|
||||
u32 stack_addr = 0;
|
||||
u32 stack_size = 0;
|
||||
|
||||
const std::string m_name;
|
||||
|
||||
atomic_t<void*> owner{};
|
||||
|
||||
const char* last_function = nullptr;
|
||||
|
||||
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_gpr(u32 n, u32 value, u32 size)
|
||||
{
|
||||
verify(HERE), n <= 15;
|
||||
|
||||
if (n < 15)
|
||||
{
|
||||
GPR[n] = value;
|
||||
}
|
||||
else
|
||||
{
|
||||
write_pc(value, size);
|
||||
}
|
||||
}
|
||||
|
||||
u32 read_gpr(u32 n)
|
||||
{
|
||||
verify(HERE), n <= 15;
|
||||
|
||||
if (n < 15)
|
||||
{
|
||||
return GPR[n];
|
||||
}
|
||||
|
||||
return read_pc();
|
||||
}
|
||||
|
||||
// function for processing va_args in printf-like functions
|
||||
u32 get_next_gpr_arg(u32& g_count)
|
||||
{
|
||||
if (g_count < 4)
|
||||
{
|
||||
return GPR[g_count++];
|
||||
}
|
||||
else
|
||||
{
|
||||
return get_stack_arg(g_count++);
|
||||
}
|
||||
}
|
||||
|
||||
void fast_call(u32 addr);
|
||||
|
||||
static u32 stack_push(u32 size, u32 align_v);
|
||||
static void stack_pop_verbose(u32 addr, u32 size) noexcept;
|
||||
};
|
||||
|
||||
template<typename T, typename = void>
|
||||
struct arm_gpr_cast_impl
|
||||
{
|
||||
static_assert(!sizeof(T), "Invalid type for arm_gpr_cast<>");
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
struct arm_gpr_cast_impl<T, std::enable_if_t<std::is_integral<T>::value || std::is_enum<T>::value>>
|
||||
{
|
||||
static_assert(sizeof(T) <= 4, "Too big integral type for arm_gpr_cast<>()");
|
||||
static_assert(std::is_same<std::decay_t<T>, bool>::value == false, "bool type is deprecated in arm_gpr_cast<>(), use b8 instead");
|
||||
|
||||
static inline u32 to(const T& value)
|
||||
{
|
||||
return static_cast<u32>(value);
|
||||
}
|
||||
|
||||
static inline T from(const u32 reg)
|
||||
{
|
||||
return static_cast<T>(reg);
|
||||
}
|
||||
};
|
||||
|
||||
template<>
|
||||
struct arm_gpr_cast_impl<b8, void>
|
||||
{
|
||||
static inline u32 to(const b8& value)
|
||||
{
|
||||
return value;
|
||||
}
|
||||
|
||||
static inline b8 from(const u32 reg)
|
||||
{
|
||||
return reg != 0;
|
||||
}
|
||||
};
|
||||
|
||||
template<>
|
||||
struct arm_gpr_cast_impl<error_code, void>
|
||||
{
|
||||
static inline u32 to(const error_code& code)
|
||||
{
|
||||
return code;
|
||||
}
|
||||
|
||||
static inline error_code from(const u32 reg)
|
||||
{
|
||||
return not_an_error(reg);
|
||||
}
|
||||
};
|
||||
|
||||
template<typename T, typename AT>
|
||||
struct arm_gpr_cast_impl<vm::_ptr_base<T, AT>, void>
|
||||
{
|
||||
static inline u32 to(const vm::_ptr_base<T, AT>& value)
|
||||
{
|
||||
return arm_gpr_cast_impl<AT>::to(value.addr());
|
||||
}
|
||||
|
||||
static inline vm::_ptr_base<T, AT> from(const u32 reg)
|
||||
{
|
||||
return vm::cast(arm_gpr_cast_impl<AT>::from(reg));
|
||||
}
|
||||
};
|
||||
|
||||
template<typename T, typename AT>
|
||||
struct arm_gpr_cast_impl<vm::_ref_base<T, AT>, void>
|
||||
{
|
||||
static inline u32 to(const vm::_ref_base<T, AT>& value)
|
||||
{
|
||||
return arm_gpr_cast_impl<AT>::to(value.addr());
|
||||
}
|
||||
|
||||
static inline vm::_ref_base<T, AT> from(const u32 reg)
|
||||
{
|
||||
return vm::cast(arm_gpr_cast_impl<AT>::from(reg));
|
||||
}
|
||||
};
|
||||
|
||||
template<typename To = u32, typename From>
|
||||
inline To arm_gpr_cast(const From& value)
|
||||
{
|
||||
return arm_gpr_cast_impl<To>::from(arm_gpr_cast_impl<From>::to(value));
|
||||
}
|
@ -1,139 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
enum SceNotAnError : s32
|
||||
{
|
||||
SCE_OK = 0,
|
||||
|
||||
__not_an_error
|
||||
};
|
||||
|
||||
enum SceError : u32
|
||||
{
|
||||
SCE_ERROR_ERRNO_EPERM = 0x80010001,
|
||||
SCE_ERROR_ERRNO_ENOENT = 0x80010002,
|
||||
SCE_ERROR_ERRNO_ESRCH = 0x80010003,
|
||||
SCE_ERROR_ERRNO_EINTR = 0x80010004,
|
||||
SCE_ERROR_ERRNO_EIO = 0x80010005,
|
||||
SCE_ERROR_ERRNO_ENXIO = 0x80010006,
|
||||
SCE_ERROR_ERRNO_E2BIG = 0x80010007,
|
||||
SCE_ERROR_ERRNO_ENOEXEC = 0x80010008,
|
||||
SCE_ERROR_ERRNO_EBADF = 0x80010009,
|
||||
SCE_ERROR_ERRNO_ECHILD = 0x8001000A,
|
||||
SCE_ERROR_ERRNO_EAGAIN = 0x8001000B,
|
||||
SCE_ERROR_ERRNO_ENOMEM = 0x8001000C,
|
||||
SCE_ERROR_ERRNO_EACCES = 0x8001000D,
|
||||
SCE_ERROR_ERRNO_EFAULT = 0x8001000E,
|
||||
SCE_ERROR_ERRNO_ENOTBLK = 0x8001000F,
|
||||
SCE_ERROR_ERRNO_EBUSY = 0x80010010,
|
||||
SCE_ERROR_ERRNO_EEXIST = 0x80010011,
|
||||
SCE_ERROR_ERRNO_EXDEV = 0x80010012,
|
||||
SCE_ERROR_ERRNO_ENODEV = 0x80010013,
|
||||
SCE_ERROR_ERRNO_ENOTDIR = 0x80010014,
|
||||
SCE_ERROR_ERRNO_EISDIR = 0x80010015,
|
||||
SCE_ERROR_ERRNO_EINVAL = 0x80010016,
|
||||
SCE_ERROR_ERRNO_ENFILE = 0x80010017,
|
||||
SCE_ERROR_ERRNO_EMFILE = 0x80010018,
|
||||
SCE_ERROR_ERRNO_ENOTTY = 0x80010019,
|
||||
SCE_ERROR_ERRNO_ETXTBSY = 0x8001001A,
|
||||
SCE_ERROR_ERRNO_EFBIG = 0x8001001B,
|
||||
SCE_ERROR_ERRNO_ENOSPC = 0x8001001C,
|
||||
SCE_ERROR_ERRNO_ESPIPE = 0x8001001D,
|
||||
SCE_ERROR_ERRNO_EROFS = 0x8001001E,
|
||||
SCE_ERROR_ERRNO_EMLINK = 0x8001001F,
|
||||
SCE_ERROR_ERRNO_EPIPE = 0x80010020,
|
||||
SCE_ERROR_ERRNO_EDOM = 0x80010021,
|
||||
SCE_ERROR_ERRNO_ERANGE = 0x80010022,
|
||||
SCE_ERROR_ERRNO_ENOMSG = 0x80010023,
|
||||
SCE_ERROR_ERRNO_EIDRM = 0x80010024,
|
||||
SCE_ERROR_ERRNO_ECHRNG = 0x80010025,
|
||||
SCE_ERROR_ERRNO_EL2NSYNC = 0x80010026,
|
||||
SCE_ERROR_ERRNO_EL3HLT = 0x80010027,
|
||||
SCE_ERROR_ERRNO_EL3RST = 0x80010028,
|
||||
SCE_ERROR_ERRNO_ELNRNG = 0x80010029,
|
||||
SCE_ERROR_ERRNO_EUNATCH = 0x8001002A,
|
||||
SCE_ERROR_ERRNO_ENOCSI = 0x8001002B,
|
||||
SCE_ERROR_ERRNO_EL2HLT = 0x8001002C,
|
||||
SCE_ERROR_ERRNO_EDEADLK = 0x8001002D,
|
||||
SCE_ERROR_ERRNO_ENOLCK = 0x8001002E,
|
||||
SCE_ERROR_ERRNO_EFORMAT = 0x8001002F,
|
||||
SCE_ERROR_ERRNO_EUNSUP = 0x80010030,
|
||||
SCE_ERROR_ERRNO_EBADE = 0x80010032,
|
||||
SCE_ERROR_ERRNO_EBADR = 0x80010033,
|
||||
SCE_ERROR_ERRNO_EXFULL = 0x80010034,
|
||||
SCE_ERROR_ERRNO_ENOANO = 0x80010035,
|
||||
SCE_ERROR_ERRNO_EBADRQC = 0x80010036,
|
||||
SCE_ERROR_ERRNO_EBADSLT = 0x80010037,
|
||||
SCE_ERROR_ERRNO_EDEADLOCK = 0x80010038,
|
||||
SCE_ERROR_ERRNO_EBFONT = 0x80010039,
|
||||
SCE_ERROR_ERRNO_ENOSTR = 0x8001003C,
|
||||
SCE_ERROR_ERRNO_ENODATA = 0x8001003D,
|
||||
SCE_ERROR_ERRNO_ETIME = 0x8001003E,
|
||||
SCE_ERROR_ERRNO_ENOSR = 0x8001003F,
|
||||
SCE_ERROR_ERRNO_ENONET = 0x80010040,
|
||||
SCE_ERROR_ERRNO_ENOPKG = 0x80010041,
|
||||
SCE_ERROR_ERRNO_EREMOTE = 0x80010042,
|
||||
SCE_ERROR_ERRNO_ENOLINK = 0x80010043,
|
||||
SCE_ERROR_ERRNO_EADV = 0x80010044,
|
||||
SCE_ERROR_ERRNO_ESRMNT = 0x80010045,
|
||||
SCE_ERROR_ERRNO_ECOMM = 0x80010046,
|
||||
SCE_ERROR_ERRNO_EPROTO = 0x80010047,
|
||||
SCE_ERROR_ERRNO_EMULTIHOP = 0x8001004A,
|
||||
SCE_ERROR_ERRNO_ELBIN = 0x8001004B,
|
||||
SCE_ERROR_ERRNO_EDOTDOT = 0x8001004C,
|
||||
SCE_ERROR_ERRNO_EBADMSG = 0x8001004D,
|
||||
SCE_ERROR_ERRNO_EFTYPE = 0x8001004F,
|
||||
SCE_ERROR_ERRNO_ENOTUNIQ = 0x80010050,
|
||||
SCE_ERROR_ERRNO_EBADFD = 0x80010051,
|
||||
SCE_ERROR_ERRNO_EREMCHG = 0x80010052,
|
||||
SCE_ERROR_ERRNO_ELIBACC = 0x80010053,
|
||||
SCE_ERROR_ERRNO_ELIBBAD = 0x80010054,
|
||||
SCE_ERROR_ERRNO_ELIBSCN = 0x80010055,
|
||||
SCE_ERROR_ERRNO_ELIBMAX = 0x80010056,
|
||||
SCE_ERROR_ERRNO_ELIBEXEC = 0x80010057,
|
||||
SCE_ERROR_ERRNO_ENOSYS = 0x80010058,
|
||||
SCE_ERROR_ERRNO_ENMFILE = 0x80010059,
|
||||
SCE_ERROR_ERRNO_ENOTEMPTY = 0x8001005A,
|
||||
SCE_ERROR_ERRNO_ENAMETOOLONG = 0x8001005B,
|
||||
SCE_ERROR_ERRNO_ELOOP = 0x8001005C,
|
||||
SCE_ERROR_ERRNO_EOPNOTSUPP = 0x8001005F,
|
||||
SCE_ERROR_ERRNO_EPFNOSUPPORT = 0x80010060,
|
||||
SCE_ERROR_ERRNO_ECONNRESET = 0x80010068,
|
||||
SCE_ERROR_ERRNO_ENOBUFS = 0x80010069,
|
||||
SCE_ERROR_ERRNO_EAFNOSUPPORT = 0x8001006A,
|
||||
SCE_ERROR_ERRNO_EPROTOTYPE = 0x8001006B,
|
||||
SCE_ERROR_ERRNO_ENOTSOCK = 0x8001006C,
|
||||
SCE_ERROR_ERRNO_ENOPROTOOPT = 0x8001006D,
|
||||
SCE_ERROR_ERRNO_ESHUTDOWN = 0x8001006E,
|
||||
SCE_ERROR_ERRNO_ECONNREFUSED = 0x8001006F,
|
||||
SCE_ERROR_ERRNO_EADDRINUSE = 0x80010070,
|
||||
SCE_ERROR_ERRNO_ECONNABORTED = 0x80010071,
|
||||
SCE_ERROR_ERRNO_ENETUNREACH = 0x80010072,
|
||||
SCE_ERROR_ERRNO_ENETDOWN = 0x80010073,
|
||||
SCE_ERROR_ERRNO_ETIMEDOUT = 0x80010074,
|
||||
SCE_ERROR_ERRNO_EHOSTDOWN = 0x80010075,
|
||||
SCE_ERROR_ERRNO_EHOSTUNREACH = 0x80010076,
|
||||
SCE_ERROR_ERRNO_EINPROGRESS = 0x80010077,
|
||||
SCE_ERROR_ERRNO_EALREADY = 0x80010078,
|
||||
SCE_ERROR_ERRNO_EDESTADDRREQ = 0x80010079,
|
||||
SCE_ERROR_ERRNO_EMSGSIZE = 0x8001007A,
|
||||
SCE_ERROR_ERRNO_EPROTONOSUPPORT = 0x8001007B,
|
||||
SCE_ERROR_ERRNO_ESOCKTNOSUPPORT = 0x8001007C,
|
||||
SCE_ERROR_ERRNO_EADDRNOTAVAIL = 0x8001007D,
|
||||
SCE_ERROR_ERRNO_ENETRESET = 0x8001007E,
|
||||
SCE_ERROR_ERRNO_EISCONN = 0x8001007F,
|
||||
SCE_ERROR_ERRNO_ENOTCONN = 0x80010080,
|
||||
SCE_ERROR_ERRNO_ETOOMANYREFS = 0x80010081,
|
||||
SCE_ERROR_ERRNO_EPROCLIM = 0x80010082,
|
||||
SCE_ERROR_ERRNO_EUSERS = 0x80010083,
|
||||
SCE_ERROR_ERRNO_EDQUOT = 0x80010084,
|
||||
SCE_ERROR_ERRNO_ESTALE = 0x80010085,
|
||||
SCE_ERROR_ERRNO_ENOTSUP = 0x80010086,
|
||||
SCE_ERROR_ERRNO_ENOMEDIUM = 0x80010087,
|
||||
SCE_ERROR_ERRNO_ENOSHARE = 0x80010088,
|
||||
SCE_ERROR_ERRNO_ECASECLASH = 0x80010089,
|
||||
SCE_ERROR_ERRNO_EILSEQ = 0x8001008A,
|
||||
SCE_ERROR_ERRNO_EOVERFLOW = 0x8001008B,
|
||||
SCE_ERROR_ERRNO_ECANCELED = 0x8001008C,
|
||||
SCE_ERROR_ERRNO_ENOTRECOVERABLE = 0x8001008D,
|
||||
SCE_ERROR_ERRNO_EOWNERDEAD = 0x8001008E,
|
||||
};
|
@ -1,38 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include "Utilities/types.h"
|
||||
#include "Utilities/BEType.h"
|
||||
|
||||
struct SceDateTime
|
||||
{
|
||||
le_t<u16> year;
|
||||
le_t<u16> month;
|
||||
le_t<u16> day;
|
||||
le_t<u16> hour;
|
||||
le_t<u16> minute;
|
||||
le_t<u16> second;
|
||||
le_t<u32> microsecond;
|
||||
};
|
||||
|
||||
struct SceFVector3
|
||||
{
|
||||
le_t<f32> x, y, z;
|
||||
};
|
||||
|
||||
struct SceFQuaternion
|
||||
{
|
||||
le_t<f32> x, y, z, w;
|
||||
};
|
||||
|
||||
union SceUMatrix4
|
||||
{
|
||||
struct
|
||||
{
|
||||
le_t<f32> f[4][4];
|
||||
};
|
||||
|
||||
struct
|
||||
{
|
||||
le_t<s32> i[4][4];
|
||||
};
|
||||
};
|
@ -1,39 +0,0 @@
|
||||
#include "stdafx.h"
|
||||
#include "Emu/System.h"
|
||||
#include "Emu/PSP2/ARMv7Module.h"
|
||||
|
||||
#include "sceAppMgr.h"
|
||||
|
||||
logs::channel sceAppMgr("sceAppMgr");
|
||||
|
||||
s32 sceAppMgrReceiveEventNum(vm::ptr<s32> eventNum)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceAppMgrReceiveEvent(vm::ptr<SceAppMgrEvent> appEvent)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceAppMgrAcquireBgmPort()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceAppMgrReleaseBgmPort()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
|
||||
#define REG_FUNC(nid, name) REG_FNID(SceAppMgrUser, nid, name)
|
||||
|
||||
DECLARE(arm_module_manager::SceAppMgr)("SceAppMgrUser", []()
|
||||
{
|
||||
REG_FUNC(0x47E5DD7D, sceAppMgrReceiveEventNum);
|
||||
REG_FUNC(0xCFAD5A3A, sceAppMgrReceiveEvent);
|
||||
REG_FUNC(0xF3D65520, sceAppMgrAcquireBgmPort);
|
||||
REG_FUNC(0x96CBE713, sceAppMgrReleaseBgmPort);
|
||||
//REG_FUNC(0x49255C91, sceAppMgrGetRunStatus);
|
||||
});
|
@ -1,8 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
struct SceAppMgrEvent
|
||||
{
|
||||
le_t<s32> event;
|
||||
le_t<s32> appId;
|
||||
char param[56];
|
||||
};
|
@ -1,92 +0,0 @@
|
||||
#include "stdafx.h"
|
||||
#include "Emu/System.h"
|
||||
#include "Emu/PSP2/ARMv7Module.h"
|
||||
|
||||
#include "sceAppUtil.h"
|
||||
|
||||
logs::channel sceAppUtil("sceAppUtil");
|
||||
|
||||
s32 sceAppUtilInit(vm::cptr<SceAppUtilInitParam> initParam, vm::ptr<SceAppUtilBootParam> bootParam)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceAppUtilShutdown()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceAppUtilSaveDataSlotCreate(u32 slotId, vm::cptr<SceAppUtilSaveDataSlotParam> param, vm::cptr<SceAppUtilSaveDataMountPoint> mountPoint)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceAppUtilSaveDataSlotDelete(u32 slotId, vm::cptr<SceAppUtilSaveDataMountPoint> mountPoint)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceAppUtilSaveDataSlotSetParam(u32 slotId, vm::cptr<SceAppUtilSaveDataSlotParam> param, vm::cptr<SceAppUtilSaveDataMountPoint> mountPoint)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceAppUtilSaveDataSlotGetParam(u32 slotId, vm::ptr<SceAppUtilSaveDataSlotParam> param, vm::cptr<SceAppUtilSaveDataMountPoint> mountPoint)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceAppUtilSaveDataFileSave(vm::cptr<SceAppUtilSaveDataFileSlot> slot, vm::cptr<SceAppUtilSaveDataFile> files, u32 fileNum, vm::cptr<SceAppUtilSaveDataMountPoint> mountPoint, vm::ptr<u32> requiredSizeKB)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceAppUtilPhotoMount()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceAppUtilPhotoUmount()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceAppUtilSystemParamGetInt(u32 paramId, vm::ptr<s32> value)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceAppUtilSystemParamGetString(u32 paramId, vm::ptr<char> buf, u32 bufSize)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceAppUtilSaveSafeMemory(vm::cptr<void> buf, u32 bufSize, s64 offset)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceAppUtilLoadSafeMemory(vm::ptr<void> buf, u32 bufSize, s64 offset)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
|
||||
#define REG_FUNC(nid, name) REG_FNID(SceAppUtil, nid, name)
|
||||
|
||||
DECLARE(arm_module_manager::SceAppUtil)("SceAppUtil", []()
|
||||
{
|
||||
REG_FUNC(0xDAFFE671, sceAppUtilInit);
|
||||
REG_FUNC(0xB220B00B, sceAppUtilShutdown);
|
||||
REG_FUNC(0x7E8FE96A, sceAppUtilSaveDataSlotCreate);
|
||||
REG_FUNC(0x266A7646, sceAppUtilSaveDataSlotDelete);
|
||||
REG_FUNC(0x98630136, sceAppUtilSaveDataSlotSetParam);
|
||||
REG_FUNC(0x93F0D89F, sceAppUtilSaveDataSlotGetParam);
|
||||
REG_FUNC(0x1E2A6158, sceAppUtilSaveDataFileSave);
|
||||
REG_FUNC(0xEE85804D, sceAppUtilPhotoMount);
|
||||
REG_FUNC(0x9651B941, sceAppUtilPhotoUmount);
|
||||
REG_FUNC(0x5DFB9CA0, sceAppUtilSystemParamGetInt);
|
||||
REG_FUNC(0x6E6AA267, sceAppUtilSystemParamGetString);
|
||||
REG_FUNC(0x9D8AC677, sceAppUtilSaveSafeMemory);
|
||||
REG_FUNC(0x3424D772, sceAppUtilLoadSafeMemory);
|
||||
});
|
@ -1,69 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include "Common.h"
|
||||
|
||||
struct SceAppUtilInitParam
|
||||
{
|
||||
le_t<u32> workBufSize;
|
||||
char reserved[60];
|
||||
};
|
||||
|
||||
struct SceAppUtilBootParam
|
||||
{
|
||||
le_t<u32> attr;
|
||||
le_t<u32> appVersion;
|
||||
char reserved[32];
|
||||
};
|
||||
|
||||
struct SceAppUtilSaveDataMountPoint
|
||||
{
|
||||
char data[16];
|
||||
};
|
||||
|
||||
struct SceAppUtilSaveDataSlotParam
|
||||
{
|
||||
le_t<u32> status;
|
||||
char title[64];
|
||||
char subTitle[128];
|
||||
char detail[512];
|
||||
char iconPath[64];
|
||||
le_t<s32> userParam;
|
||||
le_t<u32> sizeKB;
|
||||
SceDateTime modifiedTime;
|
||||
char reserved[48];
|
||||
};
|
||||
|
||||
struct SceAppUtilSaveDataSlotEmptyParam
|
||||
{
|
||||
vm::lptr<char> title;
|
||||
vm::lptr<char> iconPath;
|
||||
vm::lptr<void> iconBuf;
|
||||
le_t<u32> iconBufSize;
|
||||
char reserved[32];
|
||||
};
|
||||
|
||||
struct SceAppUtilSaveDataSlot
|
||||
{
|
||||
le_t<u32> id;
|
||||
le_t<u32> status;
|
||||
le_t<s32> userParam;
|
||||
vm::lptr<SceAppUtilSaveDataSlotEmptyParam> emptyParam;
|
||||
};
|
||||
|
||||
struct SceAppUtilSaveDataFile
|
||||
{
|
||||
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
|
||||
{
|
||||
le_t<u32> id;
|
||||
vm::lptr<SceAppUtilSaveDataSlotParam> slotParam;
|
||||
char reserved[32];
|
||||
};
|
@ -1,63 +0,0 @@
|
||||
#include "stdafx.h"
|
||||
#include "Emu/System.h"
|
||||
#include "Emu/PSP2/ARMv7Module.h"
|
||||
|
||||
#include "sceAudio.h"
|
||||
|
||||
logs::channel sceAudio("sceAudio");
|
||||
|
||||
s32 sceAudioOutOpenPort(s32 portType, s32 len, s32 freq, s32 param)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceAudioOutReleasePort(s32 port)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceAudioOutOutput(s32 port, vm::ptr<void> ptr)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceAudioOutSetVolume(s32 port, s32 flag, vm::ptr<s32> vol)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceAudioOutSetConfig(s32 port, s32 len, s32 freq, s32 param)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceAudioOutGetConfig(s32 port, s32 configType)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceAudioOutGetRestSample(s32 port)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceAudioOutGetAdopt(s32 portType)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
|
||||
#define REG_FUNC(nid, name) REG_FNID(SceAudio, nid, name)
|
||||
|
||||
DECLARE(arm_module_manager::SceAudio)("SceAudio", []()
|
||||
{
|
||||
REG_FUNC(0x5BC341E4, sceAudioOutOpenPort);
|
||||
REG_FUNC(0x69E2E6B5, sceAudioOutReleasePort);
|
||||
REG_FUNC(0x02DB3F5F, sceAudioOutOutput);
|
||||
REG_FUNC(0x64167F11, sceAudioOutSetVolume);
|
||||
REG_FUNC(0xB8BA0D07, sceAudioOutSetConfig);
|
||||
REG_FUNC(0x9C8EDAEA, sceAudioOutGetConfig);
|
||||
REG_FUNC(0x9A5370C4, sceAudioOutGetRestSample);
|
||||
REG_FUNC(0x12FB1767, sceAudioOutGetAdopt);
|
||||
//REG_FUNC(0xC6D8D775, sceAudioInRaw);
|
||||
});
|
@ -1 +0,0 @@
|
||||
#pragma once
|
@ -1,33 +0,0 @@
|
||||
#include "stdafx.h"
|
||||
#include "Emu/System.h"
|
||||
#include "Emu/PSP2/ARMv7Module.h"
|
||||
|
||||
#include "sceAudioIn.h"
|
||||
|
||||
logs::channel sceAudioIn("sceAudioIn");
|
||||
|
||||
s32 sceAudioInOpenPort(s32 portType, s32 grain, s32 freq, s32 param)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceAudioInReleasePort(s32 port)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceAudioInInput(s32 port, vm::ptr<void> destPtr)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
|
||||
#define REG_FUNC(nid, name) REG_FNID(SceAudioIn, nid, name)
|
||||
|
||||
DECLARE(arm_module_manager::SceAudioIn)("SceAudioIn", []()
|
||||
{
|
||||
REG_FUNC(0x638ADD2D, sceAudioInInput);
|
||||
REG_FUNC(0x39B50DC1, sceAudioInOpenPort);
|
||||
REG_FUNC(0x3A61B8C4, sceAudioInReleasePort);
|
||||
//REG_FUNC(0x566AC433, sceAudioInGetAdopt);
|
||||
});
|
@ -1 +0,0 @@
|
||||
#pragma once
|
@ -1,56 +0,0 @@
|
||||
#include "stdafx.h"
|
||||
#include "Emu/System.h"
|
||||
#include "Emu/PSP2/ARMv7Module.h"
|
||||
|
||||
#include "sceAudiodec.h"
|
||||
|
||||
logs::channel sceAudiodec("sceAudiodec");
|
||||
|
||||
s32 sceAudiodecInitLibrary(u32 codecType, vm::ptr<SceAudiodecInitParam> pInitParam)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceAudiodecTermLibrary(u32 codecType)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceAudiodecCreateDecoder(vm::ptr<SceAudiodecCtrl> pCtrl, u32 codecType)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceAudiodecDeleteDecoder(vm::ptr<SceAudiodecCtrl> pCtrl)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceAudiodecDecode(vm::ptr<SceAudiodecCtrl> pCtrl)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceAudiodecClearContext(vm::ptr<SceAudiodecCtrl> pCtrl)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceAudiodecGetInternalError(vm::ptr<SceAudiodecCtrl> pCtrl, vm::ptr<s32> pInternalError)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
|
||||
#define REG_FUNC(nid, name) REG_FNID(SceAudiodecUser, nid, name)
|
||||
|
||||
DECLARE(arm_module_manager::SceAudiodec)("SceAudiodecUser", []()
|
||||
{
|
||||
REG_FUNC(0x445C2CEF, sceAudiodecInitLibrary);
|
||||
REG_FUNC(0x45719B9D, sceAudiodecTermLibrary);
|
||||
REG_FUNC(0x4DFD3AAA, sceAudiodecCreateDecoder);
|
||||
REG_FUNC(0xE7A24E16, sceAudiodecDeleteDecoder);
|
||||
REG_FUNC(0xCCDABA04, sceAudiodecDecode);
|
||||
REG_FUNC(0xF72F9B64, sceAudiodecClearContext);
|
||||
REG_FUNC(0x883B0CF5, sceAudiodecGetInternalError);
|
||||
});
|
@ -1,81 +0,0 @@
|
||||
#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;
|
||||
};
|
@ -1,62 +0,0 @@
|
||||
#include "stdafx.h"
|
||||
#include "Emu/System.h"
|
||||
#include "Emu/PSP2/ARMv7Module.h"
|
||||
|
||||
#include "sceAudioenc.h"
|
||||
|
||||
logs::channel sceAudioenc("sceAudioenc");
|
||||
|
||||
s32 sceAudioencInitLibrary(u32 codecType, vm::ptr<SceAudioencInitParam> pInitParam)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceAudioencTermLibrary(u32 codecType)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceAudioencCreateEncoder(vm::ptr<SceAudioencCtrl> pCtrl, u32 codecType)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceAudioencDeleteEncoder(vm::ptr<SceAudioencCtrl> pCtrl)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceAudioencEncode(vm::ptr<SceAudioencCtrl> pCtrl)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceAudioencClearContext(vm::ptr<SceAudioencCtrl> pCtrl)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceAudioencGetOptInfo(vm::ptr<SceAudioencCtrl> pCtrl)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceAudioencGetInternalError(vm::ptr<SceAudioencCtrl> pCtrl, vm::ptr<s32> pInternalError)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
|
||||
#define REG_FUNC(nid, name) REG_FNID(SceAudioencUser, nid, name)
|
||||
|
||||
DECLARE(arm_module_manager::SceAudioenc)("SceAudioencUser", []()
|
||||
{
|
||||
REG_FUNC(0x76EE4DC6, sceAudioencInitLibrary);
|
||||
REG_FUNC(0xAB32D022, sceAudioencTermLibrary);
|
||||
REG_FUNC(0x64C04AE8, sceAudioencCreateEncoder);
|
||||
REG_FUNC(0xC6BA5EE6, sceAudioencDeleteEncoder);
|
||||
REG_FUNC(0xD85DB29C, sceAudioencEncode);
|
||||
REG_FUNC(0x9386F42D, sceAudioencClearContext);
|
||||
REG_FUNC(0xD01C63A3, sceAudioencGetOptInfo);
|
||||
REG_FUNC(0x452246D0, sceAudioencGetInternalError);
|
||||
});
|
@ -1,57 +0,0 @@
|
||||
#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;
|
||||
};
|
@ -1,260 +0,0 @@
|
||||
#include "stdafx.h"
|
||||
#include "Emu/System.h"
|
||||
#include "Emu/PSP2/ARMv7Module.h"
|
||||
|
||||
#include "sceCamera.h"
|
||||
|
||||
logs::channel sceCamera("sceCamera");
|
||||
|
||||
s32 sceCameraOpen(s32 devnum, vm::ptr<SceCameraInfo> pInfo)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceCameraClose(s32 devnum)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceCameraStart(s32 devnum)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceCameraStop(s32 devnum)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceCameraRead(s32 devnum, vm::ptr<SceCameraRead> pRead)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceCameraIsActive(s32 devnum)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceCameraGetSaturation(s32 devnum, vm::ptr<s32> pLevel)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceCameraSetSaturation(s32 devnum, s32 level)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceCameraGetBrightness(s32 devnum, vm::ptr<s32> pLevel)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceCameraSetBrightness(s32 devnum, s32 level)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceCameraGetContrast(s32 devnum, vm::ptr<s32> pLevel)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceCameraSetContrast(s32 devnum, s32 level)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceCameraGetSharpness(s32 devnum, vm::ptr<s32> pLevel)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceCameraSetSharpness(s32 devnum, s32 level)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceCameraGetReverse(s32 devnum, vm::ptr<s32> pMode)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceCameraSetReverse(s32 devnum, s32 mode)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceCameraGetEffect(s32 devnum, vm::ptr<s32> pMode)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceCameraSetEffect(s32 devnum, s32 mode)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceCameraGetEV(s32 devnum, vm::ptr<s32> pLevel)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceCameraSetEV(s32 devnum, s32 level)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceCameraGetZoom(s32 devnum, vm::ptr<s32> pLevel)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceCameraSetZoom(s32 devnum, s32 level)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceCameraGetAntiFlicker(s32 devnum, vm::ptr<s32> pMode)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceCameraSetAntiFlicker(s32 devnum, s32 mode)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceCameraGetISO(s32 devnum, vm::ptr<s32> pMode)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceCameraSetISO(s32 devnum, s32 mode)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceCameraGetGain(s32 devnum, vm::ptr<s32> pMode)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceCameraSetGain(s32 devnum, s32 mode)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceCameraGetWhiteBalance(s32 devnum, vm::ptr<s32> pMode)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceCameraSetWhiteBalance(s32 devnum, s32 mode)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceCameraGetBacklight(s32 devnum, vm::ptr<s32> pMode)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceCameraSetBacklight(s32 devnum, s32 mode)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceCameraGetNightmode(s32 devnum, vm::ptr<s32> pMode)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceCameraSetNightmode(s32 devnum, s32 mode)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceCameraLedSwitch(s32 devnum, s32 iSwitch)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceCameraLedBlink(s32 devnum, s32 iOnCount, s32 iOffCount, s32 iBlinkCount)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceCameraGetNoiseReductionForDebug(s32 devnum, vm::ptr<s32> pLevel)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceCameraSetNoiseReductionForDebug(s32 devnum, s32 level)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceCameraGetSharpnessOffForDebug(s32 devnum, vm::ptr<s32> pLevel)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceCameraSetSharpnessOffForDebug(s32 devnum, s32 level)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
void sceCameraUseCacheMemoryForTrial(s32 isCache)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
|
||||
#define REG_FUNC(nid, name) REG_FNID(SceCamera, nid, name)
|
||||
|
||||
DECLARE(arm_module_manager::SceCamera)("SceCamera", []()
|
||||
{
|
||||
REG_FUNC(0xA462F801, sceCameraOpen);
|
||||
REG_FUNC(0xCD6E1CFC, sceCameraClose);
|
||||
REG_FUNC(0xA8FEAE35, sceCameraStart);
|
||||
REG_FUNC(0x1DD9C9CE, sceCameraStop);
|
||||
REG_FUNC(0x79B5C2DE, sceCameraRead);
|
||||
REG_FUNC(0x103A75B8, sceCameraIsActive);
|
||||
REG_FUNC(0x624F7653, sceCameraGetSaturation);
|
||||
REG_FUNC(0xF9F7CA3D, sceCameraSetSaturation);
|
||||
REG_FUNC(0x85D5951D, sceCameraGetBrightness);
|
||||
REG_FUNC(0x98D71588, sceCameraSetBrightness);
|
||||
REG_FUNC(0x8FBE84BE, sceCameraGetContrast);
|
||||
REG_FUNC(0x06FB2900, sceCameraSetContrast);
|
||||
REG_FUNC(0xAA72C3DC, sceCameraGetSharpness);
|
||||
REG_FUNC(0xD1A5BB0B, sceCameraSetSharpness);
|
||||
REG_FUNC(0x44F6043F, sceCameraGetReverse);
|
||||
REG_FUNC(0x1175F477, sceCameraSetReverse);
|
||||
REG_FUNC(0x7E8EF3B2, sceCameraGetEffect);
|
||||
REG_FUNC(0xE9D2CFB1, sceCameraSetEffect);
|
||||
REG_FUNC(0x8B5E6147, sceCameraGetEV);
|
||||
REG_FUNC(0x62AFF0B8, sceCameraSetEV);
|
||||
REG_FUNC(0x06D3816C, sceCameraGetZoom);
|
||||
REG_FUNC(0xF7464216, sceCameraSetZoom);
|
||||
REG_FUNC(0x9FDACB99, sceCameraGetAntiFlicker);
|
||||
REG_FUNC(0xE312958A, sceCameraSetAntiFlicker);
|
||||
REG_FUNC(0x4EBD5C68, sceCameraGetISO);
|
||||
REG_FUNC(0x3CF630A1, sceCameraSetISO);
|
||||
REG_FUNC(0x2C36D6F3, sceCameraGetGain);
|
||||
REG_FUNC(0xE65CFE86, sceCameraSetGain);
|
||||
REG_FUNC(0xDBFFA1DA, sceCameraGetWhiteBalance);
|
||||
REG_FUNC(0x4D4514AC, sceCameraSetWhiteBalance);
|
||||
REG_FUNC(0x8DD1292B, sceCameraGetBacklight);
|
||||
REG_FUNC(0xAE071044, sceCameraSetBacklight);
|
||||
REG_FUNC(0x12B6FF26, sceCameraGetNightmode);
|
||||
REG_FUNC(0x3F26233E, sceCameraSetNightmode);
|
||||
REG_FUNC(0xD02CFA5C, sceCameraLedSwitch);
|
||||
REG_FUNC(0x89B16030, sceCameraLedBlink);
|
||||
REG_FUNC(0x7670474C, sceCameraUseCacheMemoryForTrial);
|
||||
REG_FUNC(0x27BB0528, sceCameraGetNoiseReductionForDebug);
|
||||
REG_FUNC(0x233C9E27, sceCameraSetNoiseReductionForDebug);
|
||||
REG_FUNC(0xC387F4DC, sceCameraGetSharpnessOffForDebug);
|
||||
REG_FUNC(0xE22C2375, sceCameraSetSharpnessOffForDebug);
|
||||
});
|
@ -1,38 +0,0 @@
|
||||
#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;
|
||||
};
|
@ -1,38 +0,0 @@
|
||||
#include "stdafx.h"
|
||||
#include "Emu/System.h"
|
||||
#include "Emu/PSP2/ARMv7Module.h"
|
||||
|
||||
#include "sceCodecEngine.h"
|
||||
|
||||
logs::channel sceCodecEngine("sceCodecEngine");
|
||||
|
||||
s32 sceCodecEnginePmonStart()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceCodecEnginePmonStop()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceCodecEnginePmonGetProcessorLoad(vm::ptr<SceCodecEnginePmonProcessorLoad> pProcessorLoad)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceCodecEnginePmonReset()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
|
||||
#define REG_FUNC(nid, name) REG_FNID(SceCodecEngine, nid, name)
|
||||
|
||||
DECLARE(arm_module_manager::SceCodecEngine)("SceCodecEngine", []()
|
||||
{
|
||||
REG_FUNC(0x3E718890, sceCodecEnginePmonStart);
|
||||
REG_FUNC(0x268B1EF5, sceCodecEnginePmonStop);
|
||||
REG_FUNC(0x859E4A68, sceCodecEnginePmonGetProcessorLoad);
|
||||
REG_FUNC(0xA097E4C8, sceCodecEnginePmonReset);
|
||||
});
|
@ -1,7 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
struct SceCodecEnginePmonProcessorLoad
|
||||
{
|
||||
le_t<u32> size;
|
||||
le_t<u32> average;
|
||||
};
|
@ -1,254 +0,0 @@
|
||||
#include "stdafx.h"
|
||||
#include "Emu/System.h"
|
||||
#include "Emu/PSP2/ARMv7Module.h"
|
||||
|
||||
#include "sceCommonDialog.h"
|
||||
|
||||
logs::channel sceCommonDialog("sceCommonDialog");
|
||||
|
||||
s32 sceCommonDialogUpdate(vm::cptr<SceCommonDialogUpdateParam> updateParam)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceMsgDialogInit(vm::cptr<SceMsgDialogParam> param)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
SceCommonDialogStatus sceMsgDialogGetStatus()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceMsgDialogAbort()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceMsgDialogGetResult(vm::ptr<SceMsgDialogResult> result)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceMsgDialogTerm()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceMsgDialogClose()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceMsgDialogProgressBarInc(s32 target, u32 delta)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceMsgDialogProgressBarSetValue(s32 target, u32 rate)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNetCheckDialogInit(vm::ptr<SceNetCheckDialogParam> param)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
SceCommonDialogStatus sceNetCheckDialogGetStatus()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNetCheckDialogAbort()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNetCheckDialogGetResult(vm::ptr<SceNetCheckDialogResult> result)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNetCheckDialogTerm()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceSaveDataDialogInit(vm::cptr<SceSaveDataDialogParam> param)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
SceCommonDialogStatus sceSaveDataDialogGetStatus()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceSaveDataDialogAbort()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceSaveDataDialogGetResult(vm::ptr<SceSaveDataDialogResult> result)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceSaveDataDialogTerm()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
SceCommonDialogStatus sceSaveDataDialogGetSubStatus()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceSaveDataDialogSubClose()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceSaveDataDialogContinue(vm::cptr<SceSaveDataDialogParam> param)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceSaveDataDialogFinish(vm::cptr<SceSaveDataDialogFinishParam> param)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceSaveDataDialogProgressBarInc(s32 target, u32 delta)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceSaveDataDialogProgressBarSetValue(s32 target, u32 rate)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceImeDialogInit(vm::cptr<SceImeDialogParam> param)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
SceCommonDialogStatus sceImeDialogGetStatus()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceImeDialogAbort()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceImeDialogGetResult(vm::ptr<SceImeDialogResult> result)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceImeDialogTerm()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 scePhotoImportDialogInit(vm::cptr<ScePhotoImportDialogParam> param)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
SceCommonDialogStatus scePhotoImportDialogGetStatus()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 scePhotoImportDialogGetResult(vm::ptr<ScePhotoImportDialogResult> result)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 scePhotoImportDialogTerm()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 scePhotoImportDialogAbort()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 scePhotoReviewDialogInit(vm::cptr<ScePhotoReviewDialogParam> param)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
SceCommonDialogStatus scePhotoReviewDialogGetStatus()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 scePhotoReviewDialogGetResult(vm::ptr<ScePhotoReviewDialogResult> result)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 scePhotoReviewDialogTerm()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 scePhotoReviewDialogAbort()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
|
||||
#define REG_FUNC(nid, name) REG_FNID(SceCommonDialog, nid, name)
|
||||
|
||||
DECLARE(arm_module_manager::SceCommonDialog)("SceCommonDialog", []()
|
||||
{
|
||||
REG_FUNC(0x90530F2F, sceCommonDialogUpdate);
|
||||
REG_FUNC(0x755FF270, sceMsgDialogInit);
|
||||
REG_FUNC(0x4107019E, sceMsgDialogGetStatus);
|
||||
REG_FUNC(0xC296D396, sceMsgDialogClose);
|
||||
REG_FUNC(0x0CC66115, sceMsgDialogAbort);
|
||||
REG_FUNC(0xBB3BFC89, sceMsgDialogGetResult);
|
||||
REG_FUNC(0x81ACF695, sceMsgDialogTerm);
|
||||
REG_FUNC(0x7BE0E08B, sceMsgDialogProgressBarInc);
|
||||
REG_FUNC(0x9CDA5E0D, sceMsgDialogProgressBarSetValue);
|
||||
REG_FUNC(0xA38A4A0D, sceNetCheckDialogInit);
|
||||
REG_FUNC(0x8027292A, sceNetCheckDialogGetStatus);
|
||||
REG_FUNC(0x2D8EDF09, sceNetCheckDialogAbort);
|
||||
REG_FUNC(0xB05FCE9E, sceNetCheckDialogGetResult);
|
||||
REG_FUNC(0x8BE51C15, sceNetCheckDialogTerm);
|
||||
REG_FUNC(0xBF5248FA, sceSaveDataDialogInit);
|
||||
REG_FUNC(0x6E258046, sceSaveDataDialogGetStatus);
|
||||
REG_FUNC(0x013E7F74, sceSaveDataDialogAbort);
|
||||
REG_FUNC(0xB2FF576E, sceSaveDataDialogGetResult);
|
||||
REG_FUNC(0x2192A10A, sceSaveDataDialogTerm);
|
||||
REG_FUNC(0x19192C8B, sceSaveDataDialogContinue);
|
||||
REG_FUNC(0xBA0542CA, sceSaveDataDialogGetSubStatus);
|
||||
REG_FUNC(0x415D6068, sceSaveDataDialogSubClose);
|
||||
REG_FUNC(0x6C49924B, sceSaveDataDialogFinish);
|
||||
REG_FUNC(0xBDE00A83, sceSaveDataDialogProgressBarInc);
|
||||
REG_FUNC(0x5C322D1E, sceSaveDataDialogProgressBarSetValue);
|
||||
REG_FUNC(0x1E7043BF, sceImeDialogInit);
|
||||
REG_FUNC(0xCF0431FD, sceImeDialogGetStatus);
|
||||
REG_FUNC(0x594A220E, sceImeDialogAbort);
|
||||
REG_FUNC(0x2EB3D046, sceImeDialogGetResult);
|
||||
REG_FUNC(0x838A3AF4, sceImeDialogTerm);
|
||||
REG_FUNC(0x73EE7C9C, scePhotoImportDialogInit);
|
||||
REG_FUNC(0x032206D8, scePhotoImportDialogGetStatus);
|
||||
REG_FUNC(0xD855414C, scePhotoImportDialogGetResult);
|
||||
REG_FUNC(0x7FE5BD77, scePhotoImportDialogTerm);
|
||||
REG_FUNC(0x4B125581, scePhotoImportDialogAbort);
|
||||
REG_FUNC(0xCD990375, scePhotoReviewDialogInit);
|
||||
REG_FUNC(0xF4F600CA, scePhotoReviewDialogGetStatus);
|
||||
REG_FUNC(0xFFA35858, scePhotoReviewDialogGetResult);
|
||||
REG_FUNC(0xC700B2DF, scePhotoReviewDialogTerm);
|
||||
REG_FUNC(0x74FF2A8B, scePhotoReviewDialogAbort);
|
||||
});
|
@ -1,300 +0,0 @@
|
||||
#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];
|
||||
};
|
@ -1,62 +0,0 @@
|
||||
#include "stdafx.h"
|
||||
#include "Emu/System.h"
|
||||
#include "Emu/PSP2/ARMv7Module.h"
|
||||
|
||||
#include "sceCtrl.h"
|
||||
|
||||
logs::channel sceCtrl("sceCtrl");
|
||||
|
||||
s32 sceCtrlSetSamplingMode(u32 uiMode)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceCtrlGetSamplingMode(vm::ptr<u32> puiMode)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceCtrlPeekBufferPositive(s32 port, vm::ptr<SceCtrlData> pData, s32 nBufs)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceCtrlPeekBufferNegative(s32 port, vm::ptr<SceCtrlData> pData, s32 nBufs)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceCtrlReadBufferPositive(s32 port, vm::ptr<SceCtrlData> pData, s32 nBufs)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceCtrlReadBufferNegative(s32 port, vm::ptr<SceCtrlData> pData, s32 nBufs)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceCtrlSetRapidFire(s32 port, s32 idx, vm::cptr<SceCtrlRapidFireRule> pRule)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceCtrlClearRapidFire(s32 port, s32 idx)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
|
||||
#define REG_FUNC(nid, name) REG_FNID(SceCtrl, nid, name)
|
||||
|
||||
DECLARE(arm_module_manager::SceCtrl)("SceCtrl", []()
|
||||
{
|
||||
REG_FUNC(0xA497B150, sceCtrlSetSamplingMode);
|
||||
REG_FUNC(0xEC752AAF, sceCtrlGetSamplingMode);
|
||||
REG_FUNC(0xA9C3CED6, sceCtrlPeekBufferPositive);
|
||||
REG_FUNC(0x104ED1A7, sceCtrlPeekBufferNegative);
|
||||
REG_FUNC(0x67E7AB83, sceCtrlReadBufferPositive);
|
||||
REG_FUNC(0x15F96FB0, sceCtrlReadBufferNegative);
|
||||
REG_FUNC(0xE9CB69C8, sceCtrlSetRapidFire);
|
||||
REG_FUNC(0xD8294C9C, sceCtrlClearRapidFire);
|
||||
});
|
@ -1,22 +0,0 @@
|
||||
#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;
|
||||
};
|
@ -1,38 +0,0 @@
|
||||
#include "stdafx.h"
|
||||
#include "Emu/System.h"
|
||||
#include "Emu/PSP2/ARMv7Module.h"
|
||||
|
||||
#include "sceDbg.h"
|
||||
|
||||
logs::channel sceDbg("sceDbg");
|
||||
|
||||
s32 sceDbgSetMinimumLogLevel(s32 minimumLogLevel)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceDbgSetBreakOnErrorState(SceDbgBreakOnErrorState state)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceDbgAssertionHandler(vm::cptr<char> pFile, s32 line, b8 stop, vm::cptr<char> pComponent, vm::cptr<char> pMessage, arm_va_args_t va_args)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceDbgLoggingHandler(vm::cptr<char> pFile, s32 line, s32 severity, vm::cptr<char> pComponent, vm::cptr<char> pMessage, arm_va_args_t va_args)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
|
||||
#define REG_FUNC(nid, name) REG_FNID(SceDbg, nid, name)
|
||||
|
||||
DECLARE(arm_module_manager::SceDbg)("SceDbg", []()
|
||||
{
|
||||
REG_FUNC(0x941622FA, sceDbgSetMinimumLogLevel);
|
||||
REG_FUNC(0x1AF3678B, sceDbgAssertionHandler);
|
||||
REG_FUNC(0x6605AB19, sceDbgLoggingHandler);
|
||||
REG_FUNC(0xED4A00BA, sceDbgSetBreakOnErrorState);
|
||||
});
|
@ -1,7 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
enum SceDbgBreakOnErrorState : s32
|
||||
{
|
||||
SCE_DBG_DISABLE_BREAK_ON_ERROR = 0,
|
||||
SCE_DBG_ENABLE_BREAK_ON_ERROR
|
||||
};
|
@ -1,44 +0,0 @@
|
||||
#include "stdafx.h"
|
||||
#include "Emu/System.h"
|
||||
#include "Emu/PSP2/ARMv7Module.h"
|
||||
|
||||
#include "sceDeci4p.h"
|
||||
|
||||
logs::channel sceDeci4p("sceDeci4p");
|
||||
|
||||
s32 sceKernelDeci4pOpen(vm::cptr<char> protoname, u32 protonum, u32 bufsize)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceKernelDeci4pClose(s32 socketid)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceKernelDeci4pRead(s32 socketid, vm::ptr<void> buffer, u32 size, u32 reserved)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceKernelDeci4pWrite(s32 socketid, vm::cptr<void> buffer, u32 size, u32 reserved)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceKernelDeci4pRegisterCallback(s32 socketid, s32 cbid)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
|
||||
#define REG_FUNC(nid, name) REG_FNID(SceDeci4pUserp, nid, name)
|
||||
|
||||
DECLARE(arm_module_manager::SceDeci4p)("SceDeci4pUserp", []()
|
||||
{
|
||||
REG_FUNC(0x28578FE8, sceKernelDeci4pOpen);
|
||||
REG_FUNC(0x63B0C50F, sceKernelDeci4pClose);
|
||||
REG_FUNC(0x971E1C66, sceKernelDeci4pRead);
|
||||
REG_FUNC(0xCDA3AAAC, sceKernelDeci4pWrite);
|
||||
REG_FUNC(0x73371F35, sceKernelDeci4pRegisterCallback);
|
||||
});
|
@ -1,3 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
using SceKernelDeci4pCallback = s32(s32 notifyId, s32 notifyCount, s32 notifyArg, vm::ptr<void> pCommon);
|
@ -1,91 +0,0 @@
|
||||
#include "stdafx.h"
|
||||
#include "Emu/System.h"
|
||||
#include "Emu/PSP2/ARMv7Module.h"
|
||||
|
||||
#include "sceDeflt.h"
|
||||
|
||||
logs::channel sceDeflt("sceDeflt");
|
||||
|
||||
s32 sceGzipIsValid(vm::cptr<void> pSrcGzip)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
vm::cptr<char> sceGzipGetName(vm::cptr<void> pSrcGzip)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
vm::cptr<char> sceGzipGetComment(vm::cptr<void> pSrcGzip)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
vm::cptr<void> sceGzipGetCompressedData(vm::cptr<void> pSrcGzip)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceGzipDecompress(vm::ptr<void> pDst, u32 uiBufSize, vm::cptr<void> pSrcGzip, vm::ptr<u32> puiCrc32)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceZlibIsValid(vm::cptr<void> pSrcZlib)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceZlibGetInfo(vm::cptr<void> pSrcZlib, vm::ptr<u8> pbCmf, vm::ptr<u8> pbFlg, vm::ptr<u32> puiDictId, vm::cpptr<void> ppvData)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
vm::cptr<void> sceZlibGetCompressedData(vm::cptr<void> pSrcZlib)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceZlibDecompress(vm::ptr<void> pDst, u32 uiBufSize, vm::cptr<void> pSrcZlib, vm::ptr<u32> puiAdler32)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
u32 sceZlibAdler32(u32 uiAdler, vm::cptr<u8> pSrc, u32 uiSize)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceDeflateDecompress(vm::ptr<void> pDst, u32 uiBufSize, vm::cptr<void> pSrcDeflate, vm::cpptr<void> ppNext)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceZipGetInfo(vm::cptr<void> pSrc, vm::cpptr<void> ppvExtra, vm::ptr<u32> puiCrc, vm::cpptr<void> ppvData)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
|
||||
#define REG_FUNC(nid, name) REG_FNID(SceDeflt, nid, name)
|
||||
|
||||
DECLARE(arm_module_manager::SceDeflt)("SceDeflt", []()
|
||||
{
|
||||
REG_FUNC(0xCD83A464, sceZlibAdler32);
|
||||
REG_FUNC(0x110D5050, sceDeflateDecompress);
|
||||
REG_FUNC(0xE3CB51A3, sceGzipDecompress);
|
||||
REG_FUNC(0xBABCF5CF, sceGzipGetComment);
|
||||
REG_FUNC(0xE1844802, sceGzipGetCompressedData);
|
||||
REG_FUNC(0x1B8E5862, sceGzipGetInfo);
|
||||
REG_FUNC(0xAEBAABE6, sceGzipGetName);
|
||||
REG_FUNC(0xDEDADC31, sceGzipIsValid);
|
||||
REG_FUNC(0xE38F754D, sceZlibDecompress);
|
||||
REG_FUNC(0xE680A65A, sceZlibGetCompressedData);
|
||||
REG_FUNC(0x4C0A685D, sceZlibGetInfo);
|
||||
REG_FUNC(0x14A0698D, sceZlibIsValid);
|
||||
});
|
@ -1 +0,0 @@
|
||||
#pragma once
|
@ -1,102 +0,0 @@
|
||||
#include "stdafx.h"
|
||||
#include "Emu/System.h"
|
||||
#include "Emu/PSP2/ARMv7Module.h"
|
||||
|
||||
#include "sceDisplay.h"
|
||||
|
||||
logs::channel sceDisplay("sceDisplay");
|
||||
|
||||
s32 sceDisplayGetRefreshRate(vm::ptr<float> pFps)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceDisplaySetFrameBuf(vm::cptr<SceDisplayFrameBuf> pFrameBuf, s32 iUpdateTimingMode)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceDisplayGetFrameBuf(vm::ptr<SceDisplayFrameBuf> pFrameBuf, s32 iUpdateTimingMode)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceDisplayGetVcount()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceDisplayWaitVblankStart()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceDisplayWaitVblankStartCB()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceDisplayWaitVblankStartMulti(u32 vcount)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceDisplayWaitVblankStartMultiCB(u32 vcount)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceDisplayWaitSetFrameBuf()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceDisplayWaitSetFrameBufCB()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceDisplayWaitSetFrameBufMulti(u32 vcount)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceDisplayWaitSetFrameBufMultiCB(u32 vcount)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceDisplayRegisterVblankStartCallback(s32 uid)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceDisplayUnregisterVblankStartCallback(s32 uid)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
|
||||
#define REG_FUNC(nid, name) REG_FNID(SceDisplay, nid, name)
|
||||
|
||||
DECLARE(arm_module_manager::SceDisplayUser)("SceDisplayUser", []()
|
||||
{
|
||||
REG_FNID(SceDisplayUser, 0x7A410B64, sceDisplaySetFrameBuf);
|
||||
REG_FNID(SceDisplayUser, 0x42AE6BBC, sceDisplayGetFrameBuf);
|
||||
});
|
||||
|
||||
DECLARE(arm_module_manager::SceDisplay)("SceDisplay", []()
|
||||
{
|
||||
REG_FUNC(0xA08CA60D, sceDisplayGetRefreshRate);
|
||||
REG_FUNC(0xB6FDE0BA, sceDisplayGetVcount);
|
||||
REG_FUNC(0x5795E898, sceDisplayWaitVblankStart);
|
||||
REG_FUNC(0x78B41B92, sceDisplayWaitVblankStartCB);
|
||||
REG_FUNC(0xDD0A13B8, sceDisplayWaitVblankStartMulti);
|
||||
REG_FUNC(0x05F27764, sceDisplayWaitVblankStartMultiCB);
|
||||
REG_FUNC(0x9423560C, sceDisplayWaitSetFrameBuf);
|
||||
REG_FUNC(0x814C90AF, sceDisplayWaitSetFrameBufCB);
|
||||
REG_FUNC(0x7D9864A8, sceDisplayWaitSetFrameBufMulti);
|
||||
REG_FUNC(0x3E796EF5, sceDisplayWaitSetFrameBufMultiCB);
|
||||
REG_FUNC(0x6BDF4C4D, sceDisplayRegisterVblankStartCallback);
|
||||
REG_FUNC(0x98436A80, sceDisplayUnregisterVblankStartCallback);
|
||||
});
|
@ -1,11 +0,0 @@
|
||||
#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;
|
||||
};
|
@ -1,65 +0,0 @@
|
||||
#include "stdafx.h"
|
||||
#include "Emu/System.h"
|
||||
#include "Emu/PSP2/ARMv7Module.h"
|
||||
|
||||
#include "sceFiber.h"
|
||||
|
||||
logs::channel sceFiber("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)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceFiberOptParamInitialize(vm::ptr<SceFiberOptParam> optParam)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceFiberFinalize(vm::ptr<SceFiber> fiber)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceFiberRun(vm::ptr<SceFiber> fiber, u32 argOnRunTo, vm::ptr<u32> argOnReturn)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceFiberSwitch(vm::ptr<SceFiber> fiber, u32 argOnRunTo, vm::ptr<u32> argOnRun)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceFiberGetSelf(vm::pptr<SceFiber> fiber)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceFiberReturnToThread(u32 argOnReturn, vm::ptr<u32> argOnRun)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceFiberGetInfo(vm::ptr<SceFiber> fiber, vm::ptr<SceFiberInfo> fiberInfo)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
|
||||
#define REG_FUNC(nid, name) REG_FNID(SceFiber, nid, name)
|
||||
|
||||
DECLARE(arm_module_manager::SceFiber)("SceFiber", []()
|
||||
{
|
||||
REG_FUNC(0xF24A298C, _sceFiberInitializeImpl);
|
||||
//REG_FUNC(0xC6A3F9BB, _sceFiberInitializeWithInternalOptionImpl);
|
||||
//REG_FUNC(0x7D0C7DDB, _sceFiberAttachContextAndRun);
|
||||
//REG_FUNC(0xE00B9AFE, _sceFiberAttachContextAndSwitch);
|
||||
REG_FUNC(0x801AB334, sceFiberOptParamInitialize);
|
||||
REG_FUNC(0xE160F844, sceFiberFinalize);
|
||||
REG_FUNC(0x7DF23243, sceFiberRun);
|
||||
REG_FUNC(0xE4283144, sceFiberSwitch);
|
||||
REG_FUNC(0x414D8CA5, sceFiberGetSelf);
|
||||
REG_FUNC(0x3B42921F, sceFiberReturnToThread);
|
||||
REG_FUNC(0x189599B4, sceFiberGetInfo);
|
||||
});
|
@ -1,29 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
using SceFiberEntry = void(u32 argOnInitialize, u32 argOnRun);
|
||||
|
||||
struct alignas(8) SceFiber
|
||||
{
|
||||
le_t<u64> padding[16];
|
||||
};
|
||||
|
||||
CHECK_SIZE_ALIGN(SceFiber, 128, 8);
|
||||
|
||||
struct alignas(8) SceFiberOptParam
|
||||
{
|
||||
le_t<u64> padding[16];
|
||||
};
|
||||
|
||||
CHECK_SIZE_ALIGN(SceFiberOptParam, 128, 8);
|
||||
|
||||
struct alignas(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);
|
@ -1,825 +0,0 @@
|
||||
#include "stdafx.h"
|
||||
#include "Emu/System.h"
|
||||
#include "Emu/PSP2/ARMv7Module.h"
|
||||
|
||||
#include "sceFios.h"
|
||||
|
||||
logs::channel sceFios("sceFios");
|
||||
|
||||
s32 sceFiosInitialize(vm::cptr<SceFiosParams> pParameters)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
void sceFiosTerminate()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
b8 sceFiosIsInitialized(vm::ptr<SceFiosParams> pOutParameters)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
void sceFiosUpdateParameters(vm::cptr<SceFiosParams> pParameters)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
void sceFiosSetGlobalDefaultOpAttr(vm::cptr<SceFiosOpAttr> pAttr)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
b8 sceFiosGetGlobalDefaultOpAttr(vm::ptr<SceFiosOpAttr> pOutAttr)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
void sceFiosSetThreadDefaultOpAttr(vm::cptr<SceFiosOpAttr> pAttr)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
b8 sceFiosGetThreadDefaultOpAttr(vm::ptr<SceFiosOpAttr> pOutAttr)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
void sceFiosGetDefaultOpAttr(vm::ptr<SceFiosOpAttr> pOutAttr)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
void sceFiosSuspend()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
u32 sceFiosGetSuspendCount()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
b8 sceFiosIsSuspended()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
void sceFiosResume()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
void sceFiosShutdownAndCancelOps()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
void sceFiosCancelAllOps()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
void sceFiosCloseAllFiles()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
b8 sceFiosIsIdle()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
u32 sceFiosGetAllFHs(vm::ptr<s32> pOutArray, u32 arraySize)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
u32 sceFiosGetAllDHs(vm::ptr<s32> pOutArray, u32 arraySize)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
u32 sceFiosGetAllOps(vm::ptr<s32> pOutArray, u32 arraySize)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
b8 sceFiosIsValidHandle(s32 h)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceFiosPathcmp(vm::cptr<char> pA, vm::cptr<char> pB)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceFiosPathncmp(vm::cptr<char> pA, vm::cptr<char> pB, u32 n)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceFiosPrintf(vm::cptr<char> pFormat, arm_va_args_t va_args)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceFiosVprintf(vm::cptr<char> pFormat) // va_list
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceFiosFileExists(vm::cptr<SceFiosOpAttr> pAttr, vm::cptr<char> pPath, vm::ptr<b8> pOutExists)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
b8 sceFiosFileExistsSync(vm::cptr<SceFiosOpAttr> pAttr, vm::cptr<char> pPath)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceFiosFileGetSize(vm::cptr<SceFiosOpAttr> pAttr, vm::cptr<char> pPath, vm::ptr<s64> pOutSize)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s64 sceFiosFileGetSizeSync(vm::cptr<SceFiosOpAttr> pAttr, vm::cptr<char> pPath)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceFiosFileDelete(vm::cptr<SceFiosOpAttr> pAttr, vm::cptr<char> pPath)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceFiosFileDeleteSync(vm::cptr<SceFiosOpAttr> pAttr, vm::cptr<char> pPath)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceFiosDirectoryExists(vm::cptr<SceFiosOpAttr> pAttr, vm::cptr<char> pPath, vm::ptr<b8> pOutExists)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
b8 sceFiosDirectoryExistsSync(vm::cptr<SceFiosOpAttr> pAttr, vm::cptr<char> pPath)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceFiosDirectoryCreate(vm::cptr<SceFiosOpAttr> pAttr, vm::cptr<char> pPath)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceFiosDirectoryCreateSync(vm::cptr<SceFiosOpAttr> pAttr, vm::cptr<char> pPath)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceFiosDirectoryDelete(vm::cptr<SceFiosOpAttr> pAttr, vm::cptr<char> pPath)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceFiosDirectoryDeleteSync(vm::cptr<SceFiosOpAttr> pAttr, vm::cptr<char> pPath)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceFiosExists(vm::cptr<SceFiosOpAttr> pAttr, vm::cptr<char> pPath, vm::ptr<b8> pOutExists)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
b8 sceFiosExistsSync(vm::cptr<SceFiosOpAttr> pAttr, vm::cptr<char> pPath)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceFiosStat(vm::cptr<SceFiosOpAttr> pAttr, vm::cptr<char> pPath, vm::ptr<SceFiosStat> pOutStatus)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceFiosStatSync(vm::cptr<SceFiosOpAttr> pAttr, vm::cptr<char> pPath, vm::ptr<SceFiosStat> pOutStatus)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceFiosDelete(vm::cptr<SceFiosOpAttr> pAttr, vm::cptr<char> pPath)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceFiosDeleteSync(vm::cptr<SceFiosOpAttr> pAttr, vm::cptr<char> pPath)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceFiosResolve(vm::cptr<SceFiosOpAttr> pAttr, vm::cptr<SceFiosTuple> pInTuple, vm::ptr<SceFiosTuple> pOutTuple)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceFiosResolveSync(vm::cptr<SceFiosOpAttr> pAttr, vm::cptr<SceFiosTuple> pInTuple, vm::ptr<SceFiosTuple> pOutTuple)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceFiosRename(vm::cptr<SceFiosOpAttr> pAttr, vm::cptr<char> pOldPath, vm::cptr<char> pNewPath)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceFiosRenameSync(vm::cptr<SceFiosOpAttr> pAttr, vm::cptr<char> pOldPath, vm::cptr<char> pNewPath)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceFiosFileRead(vm::cptr<SceFiosOpAttr> pAttr, vm::cptr<char> pPath, vm::ptr<void> pBuf, s64 length, s64 offset)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s64 sceFiosFileReadSync(vm::cptr<SceFiosOpAttr> pAttr, vm::cptr<char> pPath, vm::ptr<void> pBuf, s64 length, s64 offset)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceFiosFileWrite(vm::cptr<SceFiosOpAttr> pAttr, vm::cptr<char> pPath, vm::cptr<void> pBuf, s64 length, s64 offset)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s64 sceFiosFileWriteSync(vm::cptr<SceFiosOpAttr> pAttr, vm::cptr<char> pPath, vm::cptr<void> pBuf, s64 length, s64 offset)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceFiosFileTruncate(vm::cptr<SceFiosOpAttr> pAttr, vm::cptr<char> pPath, s64 length)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceFiosFileTruncateSync(vm::cptr<SceFiosOpAttr> pAttr, vm::cptr<char> pPath, s64 length)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceFiosFHOpen(vm::cptr<SceFiosOpAttr> pAttr, vm::ptr<s32> pOutFH, vm::cptr<char> pPath, vm::cptr<SceFiosOpenParams> pOpenParams)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceFiosFHOpenSync(vm::cptr<SceFiosOpAttr> pAttr, vm::ptr<s32> pOutFH, vm::cptr<char> pPath, vm::cptr<SceFiosOpenParams> pOpenParams)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceFiosFHStat(vm::cptr<SceFiosOpAttr> pAttr, s32 fh, vm::ptr<SceFiosStat> pOutStatus)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceFiosFHStatSync(vm::cptr<SceFiosOpAttr> pAttr, s32 fh, vm::ptr<SceFiosStat> pOutStatus)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceFiosFHTruncate(vm::cptr<SceFiosOpAttr> pAttr, s32 fh, s64 length)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceFiosFHTruncateSync(vm::cptr<SceFiosOpAttr> pAttr, s32 fh, s64 length)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceFiosFHSync(vm::cptr<SceFiosOpAttr> pAttr, s32 fh)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceFiosFHSyncSync(vm::cptr<SceFiosOpAttr> pAttr, s32 fh)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceFiosFHRead(vm::cptr<SceFiosOpAttr> pAttr, s32 fh, vm::ptr<void> pBuf, s64 length)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s64 sceFiosFHReadSync(vm::cptr<SceFiosOpAttr> pAttr, s32 fh, vm::ptr<void> pBuf, s64 length)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceFiosFHWrite(vm::cptr<SceFiosOpAttr> pAttr, s32 fh, vm::cptr<void> pBuf, s64 length)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s64 sceFiosFHWriteSync(vm::cptr<SceFiosOpAttr> pAttr, s32 fh, vm::cptr<void> pBuf, s64 length)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceFiosFHReadv(vm::cptr<SceFiosOpAttr> pAttr, s32 fh, vm::cptr<SceFiosBuffer> iov, s32 iovcnt)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s64 sceFiosFHReadvSync(vm::cptr<SceFiosOpAttr> pAttr, s32 fh, vm::cptr<SceFiosBuffer> iov, s32 iovcnt)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceFiosFHWritev(vm::cptr<SceFiosOpAttr> pAttr, s32 fh, vm::cptr<SceFiosBuffer> iov, s32 iovcnt)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s64 sceFiosFHWritevSync(vm::cptr<SceFiosOpAttr> pAttr, s32 fh, vm::cptr<SceFiosBuffer> iov, s32 iovcnt)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceFiosFHPread(vm::cptr<SceFiosOpAttr> pAttr, s32 fh, vm::ptr<void> pBuf, s64 length, s64 offset)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s64 sceFiosFHPreadSync(vm::cptr<SceFiosOpAttr> pAttr, s32 fh, vm::ptr<void> pBuf, s64 length, s64 offset)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceFiosFHPwrite(vm::cptr<SceFiosOpAttr> pAttr, s32 fh, vm::cptr<void> pBuf, s64 length, s64 offset)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s64 sceFiosFHPwriteSync(vm::cptr<SceFiosOpAttr> pAttr, s32 fh, vm::cptr<void> pBuf, s64 length, s64 offset)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceFiosFHPreadv(vm::cptr<SceFiosOpAttr> pAttr, s32 fh, vm::cptr<SceFiosBuffer> iov, s32 iovcnt, s64 offset)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s64 sceFiosFHPreadvSync(vm::cptr<SceFiosOpAttr> pAttr, s32 fh, vm::cptr<SceFiosBuffer> iov, s32 iovcnt, s64 offset)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceFiosFHPwritev(vm::cptr<SceFiosOpAttr> pAttr, s32 fh, vm::cptr<SceFiosBuffer> iov, s32 iovcnt, s64 offset)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s64 sceFiosFHPwritevSync(vm::cptr<SceFiosOpAttr> pAttr, s32 fh, vm::cptr<SceFiosBuffer> iov, s32 iovcnt, s64 offset)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceFiosFHClose(vm::cptr<SceFiosOpAttr> pAttr, s32 fh)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceFiosFHCloseSync(vm::cptr<SceFiosOpAttr> pAttr, s32 fh)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s64 sceFiosFHSeek(s32 fh, s64 offset, SceFiosWhence whence)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s64 sceFiosFHTell(s32 fh)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
vm::cptr<char> sceFiosFHGetPath(s32 fh)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s64 sceFiosFHGetSize(s32 fh)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
vm::ptr<SceFiosOpenParams> sceFiosFHGetOpenParams(s32 fh)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceFiosDHOpen(vm::cptr<SceFiosOpAttr> pAttr, vm::ptr<s32> pOutDH, vm::cptr<char> pPath, SceFiosBuffer buf)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceFiosDHOpenSync(vm::cptr<SceFiosOpAttr> pAttr, vm::ptr<s32> pOutDH, vm::cptr<char> pPath, SceFiosBuffer buf)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceFiosDHRead(vm::cptr<SceFiosOpAttr> pAttr, s32 dh, vm::ptr<SceFiosDirEntry> pOutEntry)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceFiosDHReadSync(vm::cptr<SceFiosOpAttr> pAttr, s32 dh, vm::ptr<SceFiosDirEntry> pOutEntry)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceFiosDHClose(vm::cptr<SceFiosOpAttr> pAttr, s32 dh)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceFiosDHCloseSync(vm::cptr<SceFiosOpAttr> pAttr, s32 dh)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
vm::cptr<char> sceFiosDHGetPath(s32 dh)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
b8 sceFiosOpIsDone(s32 op)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceFiosOpWait(s32 op)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceFiosOpWaitUntil(s32 op, s64 deadline)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
void sceFiosOpDelete(s32 op)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceFiosOpSyncWait(s32 op)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s64 sceFiosOpSyncWaitForIO(s32 op)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceFiosOpGetError(s32 op)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
void sceFiosOpCancel(s32 op)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
b8 sceFiosOpIsCancelled(s32 op)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
vm::cptr<SceFiosOpAttr> sceFiosOpGetAttr(s32 op)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
vm::cptr<char> sceFiosOpGetPath(s32 op)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
vm::ptr<void> sceFiosOpGetBuffer(s32 op)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s64 sceFiosOpGetOffset(s32 op)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s64 sceFiosOpGetRequestCount(s32 op)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s64 sceFiosOpGetActualCount(s32 op)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
void sceFiosOpReschedule(s32 op, s64 newDeadline)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s64 sceFiosTimeGetCurrent()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s64 sceFiosTimeIntervalToNanoseconds(s64 interval)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s64 sceFiosTimeIntervalFromNanoseconds(s64 ns)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
u64 sceFiosDateGetCurrent()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
u64 sceFiosDateFromComponents(vm::cptr<tm> pComponents)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
vm::ptr<tm> sceFiosDateToComponents(u64 date, vm::ptr<tm> pOutComponents)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
u64 sceFiosDateFromSceDateTime(vm::cptr<SceDateTime> pSceDateTime)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
vm::ptr<SceDateTime> sceFiosDateToSceDateTime(u64 date, vm::ptr<SceDateTime> pSceDateTime)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceFiosOverlayAdd(vm::cptr<SceFiosOverlay> pOverlay, vm::ptr<s32> pOutID)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceFiosOverlayRemove(s32 id)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceFiosOverlayGetInfo(s32 id, vm::ptr<SceFiosOverlay> pOutOverlay)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceFiosOverlayModify(s32 id, vm::cptr<SceFiosOverlay> pNewValue)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceFiosOverlayGetList(vm::ptr<s32> pOutIDs, u32 maxIDs, vm::ptr<u32> pActualIDs)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceFiosOverlayResolveSync(s32 resolveFlag, vm::cptr<char> pInPath, vm::ptr<char> pOutPath, u32 maxPath)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceFiosArchiveGetMountBufferSize(vm::cptr<SceFiosOpAttr> pAttr, vm::cptr<char> pArchivePath, vm::cptr<SceFiosOpenParams> pOpenParams)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s64 sceFiosArchiveGetMountBufferSizeSync(vm::cptr<SceFiosOpAttr> pAttr, vm::cptr<char> pArchivePath, vm::cptr<SceFiosOpenParams> pOpenParams)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceFiosArchiveMount(vm::cptr<SceFiosOpAttr> pAttr, vm::ptr<s32> pOutFH, vm::cptr<char> pArchivePath, vm::cptr<char> pMountPoint, SceFiosBuffer mountBuffer, vm::cptr<SceFiosOpenParams> pOpenParams)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceFiosArchiveMountSync(vm::cptr<SceFiosOpAttr> pAttr, vm::ptr<s32> pOutFH, vm::cptr<char> pArchivePath, vm::cptr<char> pMountPoint, SceFiosBuffer mountBuffer, vm::cptr<SceFiosOpenParams> pOpenParams)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceFiosArchiveUnmount(vm::cptr<SceFiosOpAttr> pAttr, s32 fh)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceFiosArchiveUnmountSync(vm::cptr<SceFiosOpAttr> pAttr, s32 fh)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
vm::ptr<char> sceFiosDebugDumpError(s32 err, vm::ptr<char> pBuffer, u32 bufferSize)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
vm::ptr<char> sceFiosDebugDumpOp(s32 op, vm::ptr<char> pBuffer, u32 bufferSize)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
vm::ptr<char> sceFiosDebugDumpFH(s32 fh, vm::ptr<char> pBuffer, u32 bufferSize)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
vm::ptr<char> sceFiosDebugDumpDH(s32 dh, vm::ptr<char> pBuffer, u32 bufferSize)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
vm::ptr<char> sceFiosDebugDumpDate(u64 date, vm::ptr<char> pBuffer, u32 bufferSize)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceFiosIOFilterAdd(s32 index, vm::ptr<SceFiosIOFilterCallback> pFilterCallback, vm::ptr<void> pFilterContext)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceFiosIOFilterGetInfo(s32 index, vm::pptr<SceFiosIOFilterCallback> pOutFilterCallback, vm::pptr<void> pOutFilterContext)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceFiosIOFilterRemove(s32 index)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
void sceFiosIOFilterPsarcDearchiver()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
#define REG_FUNC(nid, name) REG_FNID(SceFios2, nid, name)
|
||||
|
||||
DECLARE(arm_module_manager::SceFios)("SceFios2", []()
|
||||
{
|
||||
REG_FUNC(0x15857180, sceFiosArchiveGetMountBufferSize);
|
||||
REG_FUNC(0xDF3352FC, sceFiosArchiveGetMountBufferSizeSync);
|
||||
//REG_FUNC(0x92E76BBD, sceFiosArchiveMount);
|
||||
//REG_FUNC(0xC4822276, sceFiosArchiveMountSync);
|
||||
REG_FUNC(0xFE1E1D28, sceFiosArchiveUnmount);
|
||||
REG_FUNC(0xB26DC24D, sceFiosArchiveUnmountSync);
|
||||
REG_FUNC(0x1E920B1D, sceFiosCancelAllOps);
|
||||
REG_FUNC(0xF85C208B, sceFiosCloseAllFiles);
|
||||
REG_FUNC(0xF6CACFC7, sceFiosDHClose);
|
||||
REG_FUNC(0x1F3CC428, sceFiosDHCloseSync);
|
||||
REG_FUNC(0x2B406DEB, sceFiosDHGetPath);
|
||||
//REG_FUNC(0xEA9855BA, sceFiosDHOpen);
|
||||
//REG_FUNC(0x34BC3713, sceFiosDHOpenSync);
|
||||
REG_FUNC(0x72A0A851, sceFiosDHRead);
|
||||
REG_FUNC(0xB7E79CAD, sceFiosDHReadSync);
|
||||
REG_FUNC(0x280D284A, sceFiosDateFromComponents);
|
||||
REG_FUNC(0x5C593C1E, sceFiosDateGetCurrent);
|
||||
REG_FUNC(0x5CFF6EA0, sceFiosDateToComponents);
|
||||
REG_FUNC(0x44B9F8EB, sceFiosDebugDumpDH);
|
||||
REG_FUNC(0x159B1FA8, sceFiosDebugDumpDate);
|
||||
REG_FUNC(0x51E677DF, sceFiosDebugDumpError);
|
||||
REG_FUNC(0x5506ACAB, sceFiosDebugDumpFH);
|
||||
REG_FUNC(0xE438D4F0, sceFiosDebugDumpOp);
|
||||
REG_FUNC(0x764DFA7A, sceFiosDelete);
|
||||
REG_FUNC(0xAAC54B44, sceFiosDeleteSync);
|
||||
REG_FUNC(0x9198ED8B, sceFiosDirectoryCreate);
|
||||
REG_FUNC(0xE037B076, sceFiosDirectoryCreateSync);
|
||||
REG_FUNC(0xDA93677C, sceFiosDirectoryDelete);
|
||||
REG_FUNC(0xB9573146, sceFiosDirectoryDeleteSync);
|
||||
REG_FUNC(0x48D50D97, sceFiosDirectoryExists);
|
||||
REG_FUNC(0x726E01BE, sceFiosDirectoryExistsSync);
|
||||
REG_FUNC(0x6F12D8A5, sceFiosExists);
|
||||
REG_FUNC(0x125EFD34, sceFiosExistsSync);
|
||||
REG_FUNC(0xA88EDCA8, sceFiosFHClose);
|
||||
REG_FUNC(0x45182328, sceFiosFHCloseSync);
|
||||
REG_FUNC(0xC55DB73B, sceFiosFHGetOpenParams);
|
||||
REG_FUNC(0x37143AE3, sceFiosFHGetPath);
|
||||
REG_FUNC(0xC5C26581, sceFiosFHGetSize);
|
||||
REG_FUNC(0xBF699BD4, sceFiosFHOpen);
|
||||
REG_FUNC(0xC3E7C3DB, sceFiosFHOpenSync);
|
||||
REG_FUNC(0x6A51E688, sceFiosFHPread);
|
||||
REG_FUNC(0xE2805059, sceFiosFHPreadSync);
|
||||
REG_FUNC(0x7C4E0C42, sceFiosFHPreadv);
|
||||
REG_FUNC(0x4D42F95C, sceFiosFHPreadvSync);
|
||||
REG_FUNC(0xCF1FAA6F, sceFiosFHPwrite);
|
||||
REG_FUNC(0x1E962F57, sceFiosFHPwriteSync);
|
||||
REG_FUNC(0xBBC9AFD5, sceFiosFHPwritev);
|
||||
REG_FUNC(0x742ADDC4, sceFiosFHPwritevSync);
|
||||
REG_FUNC(0xB09AFBDF, sceFiosFHRead);
|
||||
REG_FUNC(0x76945919, sceFiosFHReadSync);
|
||||
REG_FUNC(0x7DB0AFAF, sceFiosFHReadv);
|
||||
REG_FUNC(0x1BC977FA, sceFiosFHReadvSync);
|
||||
REG_FUNC(0xA75F3C4A, sceFiosFHSeek);
|
||||
REG_FUNC(0xD97C4DF7, sceFiosFHStat);
|
||||
REG_FUNC(0xF8BEAC88, sceFiosFHStatSync);
|
||||
REG_FUNC(0xE485F35E, sceFiosFHSync);
|
||||
REG_FUNC(0xA909CCE3, sceFiosFHSyncSync);
|
||||
REG_FUNC(0xD7F33130, sceFiosFHTell);
|
||||
REG_FUNC(0x2B39453B, sceFiosFHTruncate);
|
||||
REG_FUNC(0xFEF940B7, sceFiosFHTruncateSync);
|
||||
REG_FUNC(0xE663138E, sceFiosFHWrite);
|
||||
REG_FUNC(0x984024E5, sceFiosFHWriteSync);
|
||||
REG_FUNC(0x988DD7FF, sceFiosFHWritev);
|
||||
REG_FUNC(0x267E6CE3, sceFiosFHWritevSync);
|
||||
REG_FUNC(0xB647278B, sceFiosFileDelete);
|
||||
REG_FUNC(0xB5302E30, sceFiosFileDeleteSync);
|
||||
REG_FUNC(0x8758E62F, sceFiosFileExists);
|
||||
REG_FUNC(0x233B070C, sceFiosFileExistsSync);
|
||||
REG_FUNC(0x79D9BB50, sceFiosFileGetSize);
|
||||
REG_FUNC(0x789215C3, sceFiosFileGetSizeSync);
|
||||
REG_FUNC(0x84080161, sceFiosFileRead);
|
||||
REG_FUNC(0x1C488B32, sceFiosFileReadSync);
|
||||
REG_FUNC(0xC5513E13, sceFiosFileTruncate);
|
||||
REG_FUNC(0x6E1252B8, sceFiosFileTruncateSync);
|
||||
REG_FUNC(0x42C278E5, sceFiosFileWrite);
|
||||
REG_FUNC(0x132B6DE6, sceFiosFileWriteSync);
|
||||
REG_FUNC(0x681184A2, sceFiosGetAllDHs);
|
||||
REG_FUNC(0x90AB9195, sceFiosGetAllFHs);
|
||||
REG_FUNC(0x8F62832C, sceFiosGetAllOps);
|
||||
REG_FUNC(0xC897F6A7, sceFiosGetDefaultOpAttr);
|
||||
REG_FUNC(0x30583FCB, sceFiosGetGlobalDefaultOpAttr);
|
||||
REG_FUNC(0x156EAFDC, sceFiosGetSuspendCount);
|
||||
REG_FUNC(0xD55B8555, sceFiosIOFilterAdd);
|
||||
REG_FUNC(0x7C9B14EB, sceFiosIOFilterGetInfo);
|
||||
REG_FUNC(0x057252F2, sceFiosIOFilterPsarcDearchiver);
|
||||
REG_FUNC(0x22E35018, sceFiosIOFilterRemove);
|
||||
REG_FUNC(0x774C2C05, sceFiosInitialize);
|
||||
REG_FUNC(0x29104BF3, sceFiosIsIdle);
|
||||
REG_FUNC(0xF4F54E09, sceFiosIsInitialized);
|
||||
REG_FUNC(0xD2466EA5, sceFiosIsSuspended);
|
||||
REG_FUNC(0xB309E327, sceFiosIsValidHandle);
|
||||
REG_FUNC(0x3904F205, sceFiosOpCancel);
|
||||
REG_FUNC(0xE4EA92FA, sceFiosOpDelete);
|
||||
REG_FUNC(0x218A43EE, sceFiosOpGetActualCount);
|
||||
REG_FUNC(0xABFEE706, sceFiosOpGetAttr);
|
||||
REG_FUNC(0x68C436E4, sceFiosOpGetBuffer);
|
||||
REG_FUNC(0xBF099E16, sceFiosOpGetError);
|
||||
REG_FUNC(0xF21213B9, sceFiosOpGetOffset);
|
||||
REG_FUNC(0x157515CB, sceFiosOpGetPath);
|
||||
REG_FUNC(0x9C1084C5, sceFiosOpGetRequestCount);
|
||||
REG_FUNC(0x0C81D80E, sceFiosOpIsCancelled);
|
||||
REG_FUNC(0x1B9A575E, sceFiosOpIsDone);
|
||||
REG_FUNC(0x968CADBD, sceFiosOpReschedule);
|
||||
REG_FUNC(0xE6A66C70, sceFiosOpSyncWait);
|
||||
REG_FUNC(0x202079F9, sceFiosOpSyncWaitForIO);
|
||||
REG_FUNC(0x2AC79DFC, sceFiosOpWait);
|
||||
REG_FUNC(0xCC823B47, sceFiosOpWaitUntil);
|
||||
REG_FUNC(0x27AE468B, sceFiosOverlayAdd);
|
||||
REG_FUNC(0xF4C6B72A, sceFiosOverlayGetInfo);
|
||||
REG_FUNC(0x1C0BCAD5, sceFiosOverlayGetList);
|
||||
REG_FUNC(0x30F56704, sceFiosOverlayModify);
|
||||
REG_FUNC(0xF3C84D0F, sceFiosOverlayRemove);
|
||||
REG_FUNC(0x8A243E74, sceFiosOverlayResolveSync);
|
||||
REG_FUNC(0x5E75937A, sceFiosPathcmp);
|
||||
REG_FUNC(0xCC21C849, sceFiosPathncmp);
|
||||
REG_FUNC(0xAF7FAADF, sceFiosPrintf);
|
||||
REG_FUNC(0x25E399E5, sceFiosRename);
|
||||
REG_FUNC(0x030306F4, sceFiosRenameSync);
|
||||
REG_FUNC(0xD0B19C9F, sceFiosResolve);
|
||||
REG_FUNC(0x7FF33797, sceFiosResolveSync);
|
||||
REG_FUNC(0xBF2D3CC1, sceFiosResume);
|
||||
REG_FUNC(0x4E2FD311, sceFiosSetGlobalDefaultOpAttr);
|
||||
REG_FUNC(0x5B8D48C4, sceFiosShutdownAndCancelOps);
|
||||
REG_FUNC(0xFF04AF72, sceFiosStat);
|
||||
REG_FUNC(0xACBAF3E0, sceFiosStatSync);
|
||||
REG_FUNC(0x510953DC, sceFiosSuspend);
|
||||
REG_FUNC(0x2904B539, sceFiosTerminate);
|
||||
REG_FUNC(0xE76C8EC3, sceFiosTimeGetCurrent);
|
||||
REG_FUNC(0x35A82737, sceFiosTimeIntervalFromNanoseconds);
|
||||
REG_FUNC(0x397BF626, sceFiosTimeIntervalToNanoseconds);
|
||||
REG_FUNC(0x1915052A, sceFiosUpdateParameters);
|
||||
REG_FUNC(0x5BA4BD6D, sceFiosVprintf);
|
||||
});
|
@ -1,113 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include "Common.h"
|
||||
|
||||
using SceFiosOpCallback = s32(vm::ptr<void> pContext, s32 op, u8 event, s32 err);
|
||||
using SceFiosVprintfCallback = s32(vm::cptr<char> fmt, arm_va_args_t ap /* va_list */);
|
||||
using SceFiosMemcpyCallback = 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 = void();
|
||||
|
||||
struct SceFiosPsarcDearchiverContext
|
||||
{
|
||||
le_t<u32> sizeOfContext;
|
||||
le_t<u32> workBufferSize;
|
||||
vm::lptr<void> pWorkBuffer;
|
||||
le_t<s32> reserved[4];
|
||||
};
|
@ -1,99 +0,0 @@
|
||||
#include "stdafx.h"
|
||||
#include "Emu/System.h"
|
||||
#include "Emu/PSP2/ARMv7Module.h"
|
||||
|
||||
#include "sceFpu.h"
|
||||
|
||||
logs::channel sceFpu("sceFpu");
|
||||
|
||||
float sceFpuSinf(float x)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
float sceFpuCosf(float x)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
float sceFpuTanf(float x)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
float sceFpuAtanf(float x)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
float sceFpuAtan2f(float y, float x)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
float sceFpuAsinf(float x)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
float sceFpuAcosf(float x)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
|
||||
float sceFpuLogf(float x)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
float sceFpuLog2f(float fs)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
float sceFpuLog10f(float fs)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
float sceFpuExpf(float x)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
float sceFpuExp2f(float x)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
float sceFpuExp10f(float x)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
float sceFpuPowf(float x, float y)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
|
||||
#define REG_FUNC(nid, name) REG_FNID(SceFpu, nid, name)
|
||||
|
||||
DECLARE(arm_module_manager::SceFpu)("SceFpu", []()
|
||||
{
|
||||
//REG_FUNC(0x33E1AC14, sceFpuSinf);
|
||||
//REG_FUNC(0xDB66BA89, sceFpuCosf);
|
||||
//REG_FUNC(0x6FBDA1C9, sceFpuTanf);
|
||||
//REG_FUNC(0x53FF26AF, sceFpuAtanf);
|
||||
//REG_FUNC(0xC8A4989B, sceFpuAtan2f);
|
||||
//REG_FUNC(0x4D1AE0F1, sceFpuAsinf);
|
||||
//REG_FUNC(0x64A8F9FE, sceFpuAcosf);
|
||||
//REG_FUNC(0x936F0D27, sceFpuLogf);
|
||||
//REG_FUNC(0x19881EC8, sceFpuLog2f);
|
||||
//REG_FUNC(0xABBB6168, sceFpuLog10f);
|
||||
//REG_FUNC(0xEFA16C6E, sceFpuExpf);
|
||||
//REG_FUNC(0xA3A88AD0, sceFpuExp2f);
|
||||
//REG_FUNC(0x35652326, sceFpuExp10f);
|
||||
//REG_FUNC(0xDF622E56, sceFpuPowf);
|
||||
});
|
@ -1 +0,0 @@
|
||||
#pragma once
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,356 +0,0 @@
|
||||
#include "stdafx.h"
|
||||
#include "Emu/System.h"
|
||||
#include "Emu/PSP2/ARMv7Module.h"
|
||||
|
||||
#include "sceHttp.h"
|
||||
|
||||
logs::channel sceHttp("sceHttp");
|
||||
|
||||
s32 sceHttpInit(u32 poolSize)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceHttpTerm()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceHttpGetMemoryPoolStats(vm::ptr<SceHttpMemoryPoolStats> currentStat)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceHttpCreateTemplate(vm::cptr<char> userAgent, s32 httpVer, s32 autoProxyConf)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceHttpDeleteTemplate(s32 tmplId)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceHttpCreateConnection(s32 tmplId, vm::cptr<char> serverName, vm::cptr<char> scheme, u16 port, s32 enableKeepalive)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceHttpCreateConnectionWithURL(s32 tmplId, vm::cptr<char> url, s32 enableKeepalive)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceHttpDeleteConnection(s32 connId)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceHttpCreateRequest(s32 connId, s32 method, vm::cptr<char> path, u64 contentLength)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceHttpCreateRequestWithURL(s32 connId, s32 method, vm::cptr<char> url, u64 contentLength)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceHttpDeleteRequest(s32 reqId)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceHttpSetResponseHeaderMaxSize(s32 id, u32 headerSize)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceHttpSetRecvBlockSize(s32 id, u32 blockSize)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceHttpSetRequestContentLength(s32 id, u64 contentLength)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceHttpSendRequest(s32 reqId, vm::cptr<void> postData, u32 size)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceHttpAbortRequest(s32 reqId)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceHttpGetResponseContentLength(s32 reqId, vm::ptr<u64> contentLength)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceHttpGetStatusCode(s32 reqId, vm::ptr<s32> statusCode)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceHttpGetAllResponseHeaders(s32 reqId, vm::pptr<char> header, vm::ptr<u32> headerSize)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceHttpReadData(s32 reqId, vm::ptr<void> data, u32 size)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceHttpAddRequestHeader(s32 id, vm::cptr<char> name, vm::cptr<char> value, u32 mode)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceHttpRemoveRequestHeader(s32 id, vm::cptr<char> name)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceHttpParseResponseHeader(vm::cptr<char> header, u32 headerLen, vm::cptr<char> fieldStr, vm::cpptr<char> fieldValue, vm::ptr<u32> valueLen)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceHttpSetAuthInfoCallback(s32 id, vm::ptr<SceHttpAuthInfoCallback> cbfunc, vm::ptr<void> userArg)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceHttpSetAuthEnabled(s32 id, s32 enable)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceHttpGetAuthEnabled(s32 id, vm::ptr<s32> enable)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceHttpSetRedirectCallback(s32 id, vm::ptr<SceHttpRedirectCallback> cbfunc, vm::ptr<void> userArg)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceHttpSetAutoRedirect(s32 id, s32 enable)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceHttpGetAutoRedirect(s32 id, vm::ptr<s32> enable)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceHttpSetResolveTimeOut(s32 id, u32 usec)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceHttpSetResolveRetry(s32 id, s32 retry)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceHttpSetConnectTimeOut(s32 id, u32 usec)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceHttpSetSendTimeOut(s32 id, u32 usec)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceHttpSetRecvTimeOut(s32 id, u32 usec)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceHttpUriEscape(vm::ptr<char> out, vm::ptr<u32> require, u32 prepare, vm::cptr<char> in)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceHttpUriUnescape(vm::ptr<char> out, vm::ptr<u32> require, u32 prepare, vm::cptr<char> in)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceHttpUriParse(vm::ptr<SceHttpUriElement> out, vm::cptr<char> srcUrl, vm::ptr<void> pool, vm::ptr<u32> require, u32 prepare)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceHttpUriBuild(vm::ptr<char> out, vm::ptr<u32> require, u32 prepare, vm::cptr<SceHttpUriElement> srcElement, u32 option)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceHttpUriMerge(vm::ptr<char> mergedUrl, vm::cptr<char> url, vm::cptr<char> relativeUrl, vm::ptr<u32> require, u32 prepare, u32 option)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceHttpUriSweepPath(vm::ptr<char> dst, vm::cptr<char> src, u32 srcSize)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceHttpSetCookieEnabled(s32 id, s32 enable)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceHttpGetCookieEnabled(s32 id, vm::ptr<s32> enable)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceHttpGetCookie(vm::cptr<char> url, vm::ptr<char> cookie, vm::ptr<u32> cookieLength, u32 prepare, s32 secure)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceHttpAddCookie(vm::cptr<char> url, vm::cptr<char> cookie, u32 cookieLength)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceHttpSetCookieRecvCallback(s32 id, vm::ptr<SceHttpCookieRecvCallback> cbfunc, vm::ptr<void> userArg)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceHttpSetCookieSendCallback(s32 id, vm::ptr<SceHttpCookieSendCallback> cbfunc, vm::ptr<void> userArg)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceHttpsLoadCert(s32 caCertNum, vm::cpptr<SceHttpsData> caList, vm::cptr<SceHttpsData> cert, vm::cptr<SceHttpsData> privKey)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceHttpsUnloadCert()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceHttpsEnableOption(u32 sslFlags)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceHttpsDisableOption(u32 sslFlags)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceHttpsGetSslError(s32 id, vm::ptr<s32> errNum, vm::ptr<u32> detail)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceHttpsSetSslCallback(s32 id, vm::ptr<SceHttpsCallback> cbfunc, vm::ptr<void> userArg)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceHttpsGetCaList(vm::ptr<SceHttpsCaList> caList)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceHttpsFreeCaList(vm::ptr<SceHttpsCaList> caList)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
|
||||
#define REG_FUNC(nid, name) REG_FNID(SceHttp, nid, name)
|
||||
|
||||
DECLARE(arm_module_manager::SceHttp)("SceHttp", []()
|
||||
{
|
||||
REG_FUNC(0x214926D9, sceHttpInit);
|
||||
REG_FUNC(0xC9076666, sceHttpTerm);
|
||||
REG_FUNC(0xF98CDFA9, sceHttpGetMemoryPoolStats);
|
||||
REG_FUNC(0x62241DAB, sceHttpCreateTemplate);
|
||||
REG_FUNC(0xEC85ECFB, sceHttpDeleteTemplate);
|
||||
REG_FUNC(0xC616C200, sceHttpCreateConnectionWithURL);
|
||||
REG_FUNC(0xAEB3307E, sceHttpCreateConnection);
|
||||
REG_FUNC(0xF0F65C15, sceHttpDeleteConnection);
|
||||
REG_FUNC(0xBD5DA1D0, sceHttpCreateRequestWithURL);
|
||||
REG_FUNC(0xB0284270, sceHttpCreateRequest);
|
||||
REG_FUNC(0x3D3D29AD, sceHttpDeleteRequest);
|
||||
REG_FUNC(0x9CA58B99, sceHttpSendRequest);
|
||||
REG_FUNC(0x7EDE3979, sceHttpReadData);
|
||||
REG_FUNC(0xF580D304, sceHttpGetResponseContentLength);
|
||||
REG_FUNC(0x27071691, sceHttpGetStatusCode);
|
||||
REG_FUNC(0xEA61662F, sceHttpAbortRequest);
|
||||
REG_FUNC(0x7B51B122, sceHttpAddRequestHeader);
|
||||
REG_FUNC(0x5EB5F548, sceHttpRemoveRequestHeader);
|
||||
REG_FUNC(0x11F6C27F, sceHttpGetAllResponseHeaders);
|
||||
REG_FUNC(0x03A6C89E, sceHttpParseResponseHeader);
|
||||
REG_FUNC(0x179C56DB, sceHttpParseStatusLine);
|
||||
REG_FUNC(0x1DA2A673, sceHttpUriEscape);
|
||||
REG_FUNC(0x1274D318, sceHttpUriUnescape);
|
||||
REG_FUNC(0x1D45F24E, sceHttpUriParse);
|
||||
REG_FUNC(0x47664424, sceHttpUriBuild);
|
||||
REG_FUNC(0x75027D1D, sceHttpUriMerge);
|
||||
REG_FUNC(0x50737A3F, sceHttpUriSweepPath);
|
||||
REG_FUNC(0x37C30C90, sceHttpSetRequestContentLength);
|
||||
REG_FUNC(0x11EC42D0, sceHttpSetAuthEnabled);
|
||||
REG_FUNC(0x6727874C, sceHttpGetAuthEnabled);
|
||||
REG_FUNC(0x34891C3F, sceHttpSetAutoRedirect);
|
||||
REG_FUNC(0x6EAD73EB, sceHttpGetAutoRedirect);
|
||||
REG_FUNC(0xE0A3A88D, sceHttpSetAuthInfoCallback);
|
||||
REG_FUNC(0x4E08167D, sceHttpSetRedirectCallback);
|
||||
REG_FUNC(0x8455B5B3, sceHttpSetResolveTimeOut);
|
||||
REG_FUNC(0x9AB56EA7, sceHttpSetResolveRetry);
|
||||
REG_FUNC(0x237CA86E, sceHttpSetConnectTimeOut);
|
||||
REG_FUNC(0x8AE3F008, sceHttpSetSendTimeOut);
|
||||
REG_FUNC(0x94BF196E, sceHttpSetRecvTimeOut);
|
||||
//REG_FUNC(0x27A98BDA, sceHttpSetNonblock);
|
||||
//REG_FUNC(0xD65746BC, sceHttpGetNonblock);
|
||||
//REG_FUNC(0x5CEB6554, sceHttpSetEpollId);
|
||||
//REG_FUNC(0x9E031D7C, sceHttpGetEpollId);
|
||||
//REG_FUNC(0x94F7256A, sceHttpWaitRequest);
|
||||
//REG_FUNC(0x7C99AF67, sceHttpCreateEpoll);
|
||||
//REG_FUNC(0x0F1FD1B3, sceHttpSetEpoll);
|
||||
//REG_FUNC(0xCFB1DA4B, sceHttpUnsetEpoll);
|
||||
//REG_FUNC(0x65FE983F, sceHttpGetEpoll);
|
||||
//REG_FUNC(0x07D9F8BB, sceHttpDestroyEpoll);
|
||||
REG_FUNC(0xAEE573A3, sceHttpSetCookieEnabled);
|
||||
REG_FUNC(0x1B6EF66E, sceHttpGetCookieEnabled);
|
||||
REG_FUNC(0x70220BFA, sceHttpGetCookie);
|
||||
REG_FUNC(0xBEDB988D, sceHttpAddCookie);
|
||||
//REG_FUNC(0x4259FB9E, sceHttpCookieExport);
|
||||
//REG_FUNC(0x9DF48282, sceHttpCookieImport);
|
||||
REG_FUNC(0xD4F32A23, sceHttpSetCookieRecvCallback);
|
||||
REG_FUNC(0x11C03867, sceHttpSetCookieSendCallback);
|
||||
REG_FUNC(0xAE8D7C33, sceHttpsLoadCert);
|
||||
REG_FUNC(0x8577833F, sceHttpsUnloadCert);
|
||||
REG_FUNC(0x9FBE2869, sceHttpsEnableOption);
|
||||
REG_FUNC(0xC6D60403, sceHttpsDisableOption);
|
||||
//REG_FUNC(0x72CB0741, sceHttpsEnableOptionPrivate);
|
||||
//REG_FUNC(0x00659635, sceHttpsDisableOptionPrivate);
|
||||
REG_FUNC(0x2B79BDE0, sceHttpsGetSslError);
|
||||
REG_FUNC(0xA0926037, sceHttpsSetSslCallback);
|
||||
REG_FUNC(0xF71AA58D, sceHttpsGetCaList);
|
||||
REG_FUNC(0x56C95D94, sceHttpsFreeCaList);
|
||||
});
|
@ -1,72 +0,0 @@
|
||||
#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 = 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 = 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 = s32(s32 request, vm::cptr<char> url, vm::cptr<char> cookieHeader, u32 headerLen, vm::ptr<void> userArg);
|
||||
using SceHttpCookieSendCallback = 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 = s32(u32 verifyEsrr, vm::cptr<vm::ptr<SceSslCert>> sslCert, s32 certNum, vm::ptr<void> userArg);
|
@ -1,44 +0,0 @@
|
||||
#include "stdafx.h"
|
||||
#include "Emu/System.h"
|
||||
#include "Emu/PSP2/ARMv7Module.h"
|
||||
|
||||
#include "sceIme.h"
|
||||
|
||||
logs::channel sceIme("sceIme");
|
||||
|
||||
s32 sceImeOpen(vm::ptr<SceImeParam> param)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceImeUpdate()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceImeSetCaret(vm::cptr<SceImeCaret> caret)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceImeSetPreeditGeometry(vm::cptr<SceImePreeditGeometry> preedit)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceImeClose()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
|
||||
#define REG_FUNC(nid, name) REG_FNID(SceIme, nid, name)
|
||||
|
||||
DECLARE(arm_module_manager::SceIme)("SceIme", []()
|
||||
{
|
||||
REG_FUNC(0x0E050613, sceImeOpen);
|
||||
REG_FUNC(0x71D6898A, sceImeUpdate);
|
||||
REG_FUNC(0x889A8421, sceImeClose);
|
||||
REG_FUNC(0xD8342D2A, sceImeSetCaret);
|
||||
REG_FUNC(0x7B1EFAA5, sceImeSetPreeditGeometry);
|
||||
});
|
@ -1,68 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
using SceImeCharFilter = s32(u16 ch);
|
||||
|
||||
struct SceImeRect
|
||||
{
|
||||
le_t<u32> x;
|
||||
le_t<u32> y;
|
||||
le_t<u32> width;
|
||||
le_t<u32> height;
|
||||
};
|
||||
|
||||
struct SceImeEditText
|
||||
{
|
||||
le_t<u32> preeditIndex;
|
||||
le_t<u32> preeditLength;
|
||||
le_t<u32> caretIndex;
|
||||
vm::lptr<u16> str;
|
||||
};
|
||||
|
||||
union SceImeEventParam
|
||||
{
|
||||
SceImeRect rect;
|
||||
SceImeEditText text;
|
||||
le_t<u32> caretIndex;
|
||||
};
|
||||
|
||||
struct SceImeEvent
|
||||
{
|
||||
le_t<u32> id;
|
||||
SceImeEventParam param;
|
||||
};
|
||||
|
||||
struct SceImeCaret
|
||||
{
|
||||
le_t<u32> x;
|
||||
le_t<u32> y;
|
||||
le_t<u32> height;
|
||||
le_t<u32> index;
|
||||
};
|
||||
|
||||
struct SceImePreeditGeometry
|
||||
{
|
||||
le_t<u32> x;
|
||||
le_t<u32> y;
|
||||
le_t<u32> height;
|
||||
};
|
||||
|
||||
using SceImeEventHandler = void(vm::ptr<void> arg, vm::cptr<SceImeEvent> e);
|
||||
|
||||
struct SceImeParam
|
||||
{
|
||||
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;
|
||||
};
|
@ -1,95 +0,0 @@
|
||||
#include "stdafx.h"
|
||||
#include "Emu/System.h"
|
||||
#include "Emu/PSP2/ARMv7Module.h"
|
||||
|
||||
#include "sceJpeg.h"
|
||||
|
||||
logs::channel sceJpeg("sceJpeg");
|
||||
|
||||
s32 sceJpegInitMJpeg(s32 maxSplitDecoder)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceJpegFinishMJpeg()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceJpegDecodeMJpeg(
|
||||
vm::cptr<u8> pJpeg,
|
||||
u32 isize,
|
||||
vm::ptr<void> pRGBA,
|
||||
u32 osize,
|
||||
s32 decodeMode,
|
||||
vm::ptr<void> pTempBuffer,
|
||||
u32 tempBufferSize,
|
||||
vm::ptr<void> pCoefBuffer,
|
||||
u32 coefBufferSize)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceJpegDecodeMJpegYCbCr(
|
||||
vm::cptr<u8> pJpeg,
|
||||
u32 isize,
|
||||
vm::ptr<u8> pYCbCr,
|
||||
u32 osize,
|
||||
s32 decodeMode,
|
||||
vm::ptr<void> pCoefBuffer,
|
||||
u32 coefBufferSize)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceJpegMJpegCsc(
|
||||
vm::ptr<void> pRGBA,
|
||||
vm::cptr<u8> pYCbCr,
|
||||
s32 xysize,
|
||||
s32 iFrameWidth,
|
||||
s32 colorOption,
|
||||
s32 sampling)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceJpegGetOutputInfo(
|
||||
vm::cptr<u8> pJpeg,
|
||||
u32 isize,
|
||||
s32 outputFormat,
|
||||
s32 decodeMode,
|
||||
vm::ptr<SceJpegOutputInfo> pOutputInfo)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceJpegCreateSplitDecoder(vm::ptr<SceJpegSplitDecodeCtrl> pCtrl)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceJpegDeleteSplitDecoder(vm::ptr<SceJpegSplitDecodeCtrl> pCtrl)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceJpegSplitDecodeMJpeg(vm::ptr<SceJpegSplitDecodeCtrl> pCtrl)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
|
||||
#define REG_FUNC(nid, name) REG_FNID(SceJpegUser, nid, name)
|
||||
|
||||
DECLARE(arm_module_manager::SceJpeg)("SceJpegUser", []()
|
||||
{
|
||||
REG_FUNC(0xB030773B, sceJpegInitMJpeg);
|
||||
REG_FUNC(0x62842598, sceJpegFinishMJpeg);
|
||||
REG_FUNC(0x6215B095, sceJpegDecodeMJpeg);
|
||||
REG_FUNC(0x2A769BD8, sceJpegDecodeMJpegYCbCr);
|
||||
REG_FUNC(0xC2380E3A, sceJpegMJpegCsc);
|
||||
REG_FUNC(0x353BA9B0, sceJpegGetOutputInfo);
|
||||
REG_FUNC(0x123B4734, sceJpegCreateSplitDecoder);
|
||||
REG_FUNC(0xDE8D5FA1, sceJpegDeleteSplitDecoder);
|
||||
REG_FUNC(0x4598EC9C, sceJpegSplitDecodeMJpeg);
|
||||
});
|
@ -1,36 +0,0 @@
|
||||
#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];
|
||||
};
|
@ -1,91 +0,0 @@
|
||||
#include "stdafx.h"
|
||||
#include "Emu/System.h"
|
||||
#include "Emu/PSP2/ARMv7Module.h"
|
||||
|
||||
#include "sceJpegEnc.h"
|
||||
|
||||
logs::channel sceJpegEnc("sceJpegEnc");
|
||||
|
||||
s32 sceJpegEncoderGetContextSize()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceJpegEncoderInit(
|
||||
SceJpegEncoderContext context,
|
||||
s32 iFrameWidth,
|
||||
s32 iFrameHeight,
|
||||
s32 pixelFormat,
|
||||
vm::ptr<void> pJpeg,
|
||||
u32 oJpegbufSize)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceJpegEncoderEncode(
|
||||
SceJpegEncoderContext context,
|
||||
vm::cptr<void> pYCbCr)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceJpegEncoderEnd(SceJpegEncoderContext context)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceJpegEncoderSetValidRegion(
|
||||
SceJpegEncoderContext context,
|
||||
s32 iFrameWidth,
|
||||
s32 iFrameHeight)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceJpegEncoderSetCompressionRatio(
|
||||
SceJpegEncoderContext context,
|
||||
s32 compratio)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceJpegEncoderSetHeaderMode(
|
||||
SceJpegEncoderContext context,
|
||||
s32 headerMode)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceJpegEncoderSetOutputAddr(
|
||||
SceJpegEncoderContext context,
|
||||
vm::ptr<void> pJpeg,
|
||||
u32 oJpegbufSize)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceJpegEncoderCsc(
|
||||
SceJpegEncoderContext context,
|
||||
vm::ptr<void> pYCbCr,
|
||||
vm::cptr<void> pRGBA,
|
||||
s32 iFrameWidth,
|
||||
s32 inputPixelFormat)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
|
||||
#define REG_FUNC(nid, name) REG_FNID(SceJpegEncUser, nid, name)
|
||||
|
||||
DECLARE(arm_module_manager::SceJpegEnc)("SceJpegEncUser", []()
|
||||
{
|
||||
REG_FUNC(0x2B55844D, sceJpegEncoderGetContextSize);
|
||||
REG_FUNC(0x88DA92B4, sceJpegEncoderInit);
|
||||
REG_FUNC(0xC60DE94C, sceJpegEncoderEncode);
|
||||
REG_FUNC(0xC87AA849, sceJpegEncoderEnd);
|
||||
REG_FUNC(0x9511F3BC, sceJpegEncoderSetValidRegion);
|
||||
REG_FUNC(0xB2B828EC, sceJpegEncoderSetCompressionRatio);
|
||||
REG_FUNC(0x2F58B12C, sceJpegEncoderSetHeaderMode);
|
||||
REG_FUNC(0x25D52D97, sceJpegEncoderSetOutputAddr);
|
||||
REG_FUNC(0x824A7D4F, sceJpegEncoderCsc);
|
||||
});
|
@ -1,3 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
using SceJpegEncoderContext = vm::ptr<void>;
|
File diff suppressed because it is too large
Load Diff
@ -1,712 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include "Emu/PSP2/ErrorCodes.h"
|
||||
#include "Emu/PSP2/Modules/Common.h"
|
||||
|
||||
// Kernel internal TLS manager (TODO)
|
||||
class arm_tls_manager
|
||||
{
|
||||
std::array<atomic_t<bool>, 128> m_map{};
|
||||
|
||||
public:
|
||||
const u32 vaddr;
|
||||
const u32 fsize;
|
||||
const u32 vsize;
|
||||
const u32 start;
|
||||
|
||||
// Initialize from ELF process parameters
|
||||
arm_tls_manager(u32 vaddr, u32 fsize, u32 vsize);
|
||||
|
||||
// Allocate and initialize TLS
|
||||
u32 alloc();
|
||||
|
||||
// Deallocate by address
|
||||
void dealloc(u32 addr);
|
||||
};
|
||||
|
||||
// Error Codes
|
||||
enum SceLibKernelError : u32
|
||||
{
|
||||
SCE_KERNEL_ERROR_ERROR = 0x80020001,
|
||||
SCE_KERNEL_ERROR_NOT_IMPLEMENTED = 0x80020002,
|
||||
SCE_KERNEL_ERROR_INVALID_ARGUMENT = 0x80020003,
|
||||
SCE_KERNEL_ERROR_INVALID_ARGUMENT_SIZE = 0x80020004,
|
||||
SCE_KERNEL_ERROR_INVALID_FLAGS = 0x80020005,
|
||||
SCE_KERNEL_ERROR_ILLEGAL_SIZE = 0x80020006,
|
||||
SCE_KERNEL_ERROR_ILLEGAL_ADDR = 0x80020007,
|
||||
SCE_KERNEL_ERROR_UNSUP = 0x80020008,
|
||||
SCE_KERNEL_ERROR_ILLEGAL_MODE = 0x80020009,
|
||||
SCE_KERNEL_ERROR_ILLEGAL_ALIGNMENT = 0x8002000A,
|
||||
SCE_KERNEL_ERROR_NOSYS = 0x8002000B,
|
||||
SCE_KERNEL_ERROR_DEBUG_ERROR = 0x80021000,
|
||||
SCE_KERNEL_ERROR_ILLEGAL_DIPSW_NUMBER = 0x80021001,
|
||||
SCE_KERNEL_ERROR_CPU_ERROR = 0x80022000,
|
||||
SCE_KERNEL_ERROR_MMU_ILLEGAL_L1_TYPE = 0x80022001,
|
||||
SCE_KERNEL_ERROR_MMU_L2_INDEX_OVERFLOW = 0x80022002,
|
||||
SCE_KERNEL_ERROR_MMU_L2_SIZE_OVERFLOW = 0x80022003,
|
||||
SCE_KERNEL_ERROR_INVALID_CPU_AFFINITY = 0x80022004,
|
||||
SCE_KERNEL_ERROR_INVALID_MEMORY_ACCESS = 0x80022005,
|
||||
SCE_KERNEL_ERROR_INVALID_MEMORY_ACCESS_PERMISSION = 0x80022006,
|
||||
SCE_KERNEL_ERROR_VA2PA_FAULT = 0x80022007,
|
||||
SCE_KERNEL_ERROR_VA2PA_MAPPED = 0x80022008,
|
||||
SCE_KERNEL_ERROR_VALIDATION_CHECK_FAILED = 0x80022009,
|
||||
SCE_KERNEL_ERROR_SYSMEM_ERROR = 0x80024000,
|
||||
SCE_KERNEL_ERROR_INVALID_PROCESS_CONTEXT = 0x80024001,
|
||||
SCE_KERNEL_ERROR_UID_NAME_TOO_LONG = 0x80024002,
|
||||
SCE_KERNEL_ERROR_VARANGE_IS_NOT_PHYSICAL_CONTINUOUS = 0x80024003,
|
||||
SCE_KERNEL_ERROR_PHYADDR_ERROR = 0x80024100,
|
||||
SCE_KERNEL_ERROR_NO_PHYADDR = 0x80024101,
|
||||
SCE_KERNEL_ERROR_PHYADDR_USED = 0x80024102,
|
||||
SCE_KERNEL_ERROR_PHYADDR_NOT_USED = 0x80024103,
|
||||
SCE_KERNEL_ERROR_NO_IOADDR = 0x80024104,
|
||||
SCE_KERNEL_ERROR_PHYMEM_ERROR = 0x80024300,
|
||||
SCE_KERNEL_ERROR_ILLEGAL_PHYPAGE_STATUS = 0x80024301,
|
||||
SCE_KERNEL_ERROR_NO_FREE_PHYSICAL_PAGE = 0x80024302,
|
||||
SCE_KERNEL_ERROR_NO_FREE_PHYSICAL_PAGE_UNIT = 0x80024303,
|
||||
SCE_KERNEL_ERROR_PHYMEMPART_NOT_EMPTY = 0x80024304,
|
||||
SCE_KERNEL_ERROR_NO_PHYMEMPART_LPDDR2 = 0x80024305,
|
||||
SCE_KERNEL_ERROR_NO_PHYMEMPART_CDRAM = 0x80024306,
|
||||
SCE_KERNEL_ERROR_FIXEDHEAP_ERROR = 0x80024400,
|
||||
SCE_KERNEL_ERROR_FIXEDHEAP_ILLEGAL_SIZE = 0x80024401,
|
||||
SCE_KERNEL_ERROR_FIXEDHEAP_ILLEGAL_INDEX = 0x80024402,
|
||||
SCE_KERNEL_ERROR_FIXEDHEAP_INDEX_OVERFLOW = 0x80024403,
|
||||
SCE_KERNEL_ERROR_FIXEDHEAP_NO_CHUNK = 0x80024404,
|
||||
SCE_KERNEL_ERROR_UID_ERROR = 0x80024500,
|
||||
SCE_KERNEL_ERROR_INVALID_UID = 0x80024501,
|
||||
SCE_KERNEL_ERROR_SYSMEM_UID_INVALID_ARGUMENT = 0x80024502,
|
||||
SCE_KERNEL_ERROR_SYSMEM_INVALID_UID_RANGE = 0x80024503,
|
||||
SCE_KERNEL_ERROR_SYSMEM_NO_VALID_UID = 0x80024504,
|
||||
SCE_KERNEL_ERROR_SYSMEM_CANNOT_ALLOCATE_UIDENTRY = 0x80024505,
|
||||
SCE_KERNEL_ERROR_NOT_PROCESS_UID = 0x80024506,
|
||||
SCE_KERNEL_ERROR_NOT_KERNEL_UID = 0x80024507,
|
||||
SCE_KERNEL_ERROR_INVALID_UID_CLASS = 0x80024508,
|
||||
SCE_KERNEL_ERROR_INVALID_UID_SUBCLASS = 0x80024509,
|
||||
SCE_KERNEL_ERROR_UID_CANNOT_FIND_BY_NAME = 0x8002450A,
|
||||
SCE_KERNEL_ERROR_VIRPAGE_ERROR = 0x80024600,
|
||||
SCE_KERNEL_ERROR_ILLEGAL_VIRPAGE_TYPE = 0x80024601,
|
||||
SCE_KERNEL_ERROR_BLOCK_ERROR = 0x80024700,
|
||||
SCE_KERNEL_ERROR_ILLEGAL_BLOCK_ID = 0x80024701,
|
||||
SCE_KERNEL_ERROR_ILLEGAL_BLOCK_TYPE = 0x80024702,
|
||||
SCE_KERNEL_ERROR_BLOCK_IN_USE = 0x80024703,
|
||||
SCE_KERNEL_ERROR_PARTITION_ERROR = 0x80024800,
|
||||
SCE_KERNEL_ERROR_ILLEGAL_PARTITION_ID = 0x80024801,
|
||||
SCE_KERNEL_ERROR_ILLEGAL_PARTITION_INDEX = 0x80024802,
|
||||
SCE_KERNEL_ERROR_NO_L2PAGETABLE = 0x80024803,
|
||||
SCE_KERNEL_ERROR_HEAPLIB_ERROR = 0x80024900,
|
||||
SCE_KERNEL_ERROR_ILLEGAL_HEAP_ID = 0x80024901,
|
||||
SCE_KERNEL_ERROR_OUT_OF_RANG = 0x80024902,
|
||||
SCE_KERNEL_ERROR_HEAPLIB_NOMEM = 0x80024903,
|
||||
SCE_KERNEL_ERROR_SYSMEM_ADDRESS_SPACE_ERROR = 0x80024A00,
|
||||
SCE_KERNEL_ERROR_INVALID_ADDRESS_SPACE_ID = 0x80024A01,
|
||||
SCE_KERNEL_ERROR_INVALID_PARTITION_INDEX = 0x80024A02,
|
||||
SCE_KERNEL_ERROR_ADDRESS_SPACE_CANNOT_FIND_PARTITION_BY_ADDR = 0x80024A03,
|
||||
SCE_KERNEL_ERROR_SYSMEM_MEMBLOCK_ERROR = 0x80024B00,
|
||||
SCE_KERNEL_ERROR_ILLEGAL_MEMBLOCK_TYPE = 0x80024B01,
|
||||
SCE_KERNEL_ERROR_ILLEGAL_MEMBLOCK_REMAP_TYPE = 0x80024B02,
|
||||
SCE_KERNEL_ERROR_NOT_PHY_CONT_MEMBLOCK = 0x80024B03,
|
||||
SCE_KERNEL_ERROR_ILLEGAL_MEMBLOCK_CODE = 0x80024B04,
|
||||
SCE_KERNEL_ERROR_ILLEGAL_MEMBLOCK_SIZE = 0x80024B05,
|
||||
SCE_KERNEL_ERROR_ILLEGAL_USERMAP_SIZE = 0x80024B06,
|
||||
SCE_KERNEL_ERROR_MEMBLOCK_TYPE_FOR_KERNEL_PROCESS = 0x80024B07,
|
||||
SCE_KERNEL_ERROR_PROCESS_CANNOT_REMAP_MEMBLOCK = 0x80024B08,
|
||||
SCE_KERNEL_ERROR_SYSMEM_PHYMEMLOW_ERROR = 0x80024C00,
|
||||
SCE_KERNEL_ERROR_CANNOT_ALLOC_PHYMEMLOW = 0x80024C01,
|
||||
SCE_KERNEL_ERROR_UNKNOWN_PHYMEMLOW_TYPE = 0x80024C02,
|
||||
SCE_KERNEL_ERROR_SYSMEM_BITHEAP_ERROR = 0x80024D00,
|
||||
SCE_KERNEL_ERROR_CANNOT_ALLOC_BITHEAP = 0x80024D01,
|
||||
SCE_KERNEL_ERROR_LOADCORE_ERROR = 0x80025000,
|
||||
SCE_KERNEL_ERROR_ILLEGAL_ELF_HEADER = 0x80025001,
|
||||
SCE_KERNEL_ERROR_ILLEGAL_SELF_HEADER = 0x80025002,
|
||||
SCE_KERNEL_ERROR_EXCPMGR_ERROR = 0x80027000,
|
||||
SCE_KERNEL_ERROR_ILLEGAL_EXCPCODE = 0x80027001,
|
||||
SCE_KERNEL_ERROR_ILLEGAL_EXCPHANDLER = 0x80027002,
|
||||
SCE_KERNEL_ERROR_NOTFOUND_EXCPHANDLER = 0x80027003,
|
||||
SCE_KERNEL_ERROR_CANNOT_RELEASE_EXCPHANDLER = 0x80027004,
|
||||
SCE_KERNEL_ERROR_INTRMGR_ERROR = 0x80027100,
|
||||
SCE_KERNEL_ERROR_ILLEGAL_CONTEXT = 0x80027101,
|
||||
SCE_KERNEL_ERROR_ILLEGAL_INTRCODE = 0x80027102,
|
||||
SCE_KERNEL_ERROR_ILLEGAL_INTRPARAM = 0x80027103,
|
||||
SCE_KERNEL_ERROR_ILLEGAL_INTRPRIORITY = 0x80027104,
|
||||
SCE_KERNEL_ERROR_ILLEGAL_TARGET_CPU = 0x80027105,
|
||||
SCE_KERNEL_ERROR_ILLEGAL_INTRFILTER = 0x80027106,
|
||||
SCE_KERNEL_ERROR_ILLEGAL_INTRTYPE = 0x80027107,
|
||||
SCE_KERNEL_ERROR_ILLEGAL_HANDLER = 0x80027108,
|
||||
SCE_KERNEL_ERROR_FOUND_HANDLER = 0x80027109,
|
||||
SCE_KERNEL_ERROR_NOTFOUND_HANDLER = 0x8002710A,
|
||||
SCE_KERNEL_ERROR_NO_MEMORY = 0x8002710B,
|
||||
SCE_KERNEL_ERROR_DMACMGR_ERROR = 0x80027200,
|
||||
SCE_KERNEL_ERROR_ALREADY_QUEUED = 0x80027201,
|
||||
SCE_KERNEL_ERROR_NOT_QUEUED = 0x80027202,
|
||||
SCE_KERNEL_ERROR_NOT_SETUP = 0x80027203,
|
||||
SCE_KERNEL_ERROR_ON_TRANSFERRING = 0x80027204,
|
||||
SCE_KERNEL_ERROR_NOT_INITIALIZED = 0x80027205,
|
||||
SCE_KERNEL_ERROR_TRANSFERRED = 0x80027206,
|
||||
SCE_KERNEL_ERROR_NOT_UNDER_CONTROL = 0x80027207,
|
||||
SCE_KERNEL_ERROR_SYSTIMER_ERROR = 0x80027300,
|
||||
SCE_KERNEL_ERROR_NO_FREE_TIMER = 0x80027301,
|
||||
SCE_KERNEL_ERROR_TIMER_NOT_ALLOCATED = 0x80027302,
|
||||
SCE_KERNEL_ERROR_TIMER_COUNTING = 0x80027303,
|
||||
SCE_KERNEL_ERROR_TIMER_STOPPED = 0x80027304,
|
||||
SCE_KERNEL_ERROR_THREADMGR_ERROR = 0x80028000,
|
||||
SCE_KERNEL_ERROR_DORMANT = 0x80028001,
|
||||
SCE_KERNEL_ERROR_NOT_DORMANT = 0x80028002,
|
||||
SCE_KERNEL_ERROR_UNKNOWN_THID = 0x80028003,
|
||||
SCE_KERNEL_ERROR_CAN_NOT_WAIT = 0x80028004,
|
||||
SCE_KERNEL_ERROR_ILLEGAL_THID = 0x80028005,
|
||||
SCE_KERNEL_ERROR_THREAD_TERMINATED = 0x80028006,
|
||||
SCE_KERNEL_ERROR_DELETED = 0x80028007,
|
||||
SCE_KERNEL_ERROR_WAIT_TIMEOUT = 0x80028008,
|
||||
SCE_KERNEL_ERROR_NOTIFY_CALLBACK = 0x80028009,
|
||||
SCE_KERNEL_ERROR_WAIT_DELETE = 0x8002800A,
|
||||
SCE_KERNEL_ERROR_ILLEGAL_ATTR = 0x8002800B,
|
||||
SCE_KERNEL_ERROR_EVF_MULTI = 0x8002800C,
|
||||
SCE_KERNEL_ERROR_WAIT_CANCEL = 0x8002800D,
|
||||
SCE_KERNEL_ERROR_EVF_COND = 0x8002800E,
|
||||
SCE_KERNEL_ERROR_ILLEGAL_COUNT = 0x8002800F,
|
||||
SCE_KERNEL_ERROR_ILLEGAL_PRIORITY = 0x80028010,
|
||||
SCE_KERNEL_ERROR_MUTEX_RECURSIVE = 0x80028011,
|
||||
SCE_KERNEL_ERROR_MUTEX_LOCK_OVF = 0x80028012,
|
||||
SCE_KERNEL_ERROR_MUTEX_NOT_OWNED = 0x80028013,
|
||||
SCE_KERNEL_ERROR_MUTEX_UNLOCK_UDF = 0x80028014,
|
||||
SCE_KERNEL_ERROR_MUTEX_FAILED_TO_OWN = 0x80028015,
|
||||
SCE_KERNEL_ERROR_FAST_MUTEX_RECURSIVE = 0x80028016,
|
||||
SCE_KERNEL_ERROR_FAST_MUTEX_LOCK_OVF = 0x80028017,
|
||||
SCE_KERNEL_ERROR_FAST_MUTEX_FAILED_TO_OWN = 0x80028018,
|
||||
SCE_KERNEL_ERROR_FAST_MUTEX_NOT_OWNED = 0x80028019,
|
||||
SCE_KERNEL_ERROR_FAST_MUTEX_OWNED = 0x8002801A,
|
||||
SCE_KERNEL_ERROR_ALARM_CAN_NOT_CANCEL = 0x8002801B,
|
||||
SCE_KERNEL_ERROR_INVALID_OBJECT_TYPE = 0x8002801C,
|
||||
SCE_KERNEL_ERROR_KERNEL_TLS_FULL = 0x8002801D,
|
||||
SCE_KERNEL_ERROR_ILLEGAL_KERNEL_TLS_INDEX = 0x8002801E,
|
||||
SCE_KERNEL_ERROR_KERNEL_TLS_BUSY = 0x8002801F,
|
||||
SCE_KERNEL_ERROR_DIFFERENT_UID_CLASS = 0x80028020,
|
||||
SCE_KERNEL_ERROR_UNKNOWN_UID = 0x80028021,
|
||||
SCE_KERNEL_ERROR_SEMA_ZERO = 0x80028022,
|
||||
SCE_KERNEL_ERROR_SEMA_OVF = 0x80028023,
|
||||
SCE_KERNEL_ERROR_PMON_NOT_THREAD_MODE = 0x80028024,
|
||||
SCE_KERNEL_ERROR_PMON_NOT_CPU_MODE = 0x80028025,
|
||||
SCE_KERNEL_ERROR_ALREADY_REGISTERED = 0x80028026,
|
||||
SCE_KERNEL_ERROR_INVALID_THREAD_ID = 0x80028027,
|
||||
SCE_KERNEL_ERROR_ALREADY_DEBUG_SUSPENDED = 0x80028028,
|
||||
SCE_KERNEL_ERROR_NOT_DEBUG_SUSPENDED = 0x80028029,
|
||||
SCE_KERNEL_ERROR_CAN_NOT_USE_VFP = 0x8002802A,
|
||||
SCE_KERNEL_ERROR_RUNNING = 0x8002802B,
|
||||
SCE_KERNEL_ERROR_EVENT_COND = 0x8002802C,
|
||||
SCE_KERNEL_ERROR_MSG_PIPE_FULL = 0x8002802D,
|
||||
SCE_KERNEL_ERROR_MSG_PIPE_EMPTY = 0x8002802E,
|
||||
SCE_KERNEL_ERROR_ALREADY_SENT = 0x8002802F,
|
||||
SCE_KERNEL_ERROR_CAN_NOT_SUSPEND = 0x80028030,
|
||||
SCE_KERNEL_ERROR_FAST_MUTEX_ALREADY_INITIALIZED = 0x80028031,
|
||||
SCE_KERNEL_ERROR_FAST_MUTEX_NOT_INITIALIZED = 0x80028032,
|
||||
SCE_KERNEL_ERROR_THREAD_STOPPED = 0x80028033,
|
||||
SCE_KERNEL_ERROR_THREAD_SUSPENDED = 0x80028034,
|
||||
SCE_KERNEL_ERROR_NOT_SUSPENDED = 0x80028035,
|
||||
SCE_KERNEL_ERROR_WAIT_DELETE_MUTEX = 0x80028036,
|
||||
SCE_KERNEL_ERROR_WAIT_CANCEL_MUTEX = 0x80028037,
|
||||
SCE_KERNEL_ERROR_WAIT_DELETE_COND = 0x80028038,
|
||||
SCE_KERNEL_ERROR_WAIT_CANCEL_COND = 0x80028039,
|
||||
SCE_KERNEL_ERROR_LW_MUTEX_NOT_OWNED = 0x8002803A,
|
||||
SCE_KERNEL_ERROR_LW_MUTEX_LOCK_OVF = 0x8002803B,
|
||||
SCE_KERNEL_ERROR_LW_MUTEX_UNLOCK_UDF = 0x8002803C,
|
||||
SCE_KERNEL_ERROR_LW_MUTEX_RECURSIVE = 0x8002803D,
|
||||
SCE_KERNEL_ERROR_LW_MUTEX_FAILED_TO_OWN = 0x8002803E,
|
||||
SCE_KERNEL_ERROR_WAIT_DELETE_LW_MUTEX = 0x8002803F,
|
||||
SCE_KERNEL_ERROR_ILLEGAL_STACK_SIZE = 0x80028040,
|
||||
SCE_KERNEL_ERROR_RW_LOCK_RECURSIVE = 0x80028041,
|
||||
SCE_KERNEL_ERROR_RW_LOCK_LOCK_OVF = 0x80028042,
|
||||
SCE_KERNEL_ERROR_RW_LOCK_NOT_OWNED = 0x80028043,
|
||||
SCE_KERNEL_ERROR_RW_LOCK_UNLOCK_UDF = 0x80028044,
|
||||
SCE_KERNEL_ERROR_RW_LOCK_FAILED_TO_LOCK = 0x80028045,
|
||||
SCE_KERNEL_ERROR_RW_LOCK_FAILED_TO_UNLOCK = 0x80028046,
|
||||
SCE_KERNEL_ERROR_PROCESSMGR_ERROR = 0x80029000,
|
||||
SCE_KERNEL_ERROR_INVALID_PID = 0x80029001,
|
||||
SCE_KERNEL_ERROR_INVALID_PROCESS_TYPE = 0x80029002,
|
||||
SCE_KERNEL_ERROR_PLS_FULL = 0x80029003,
|
||||
SCE_KERNEL_ERROR_INVALID_PROCESS_STATUS = 0x80029004,
|
||||
SCE_KERNEL_ERROR_INVALID_BUDGET_ID = 0x80029005,
|
||||
SCE_KERNEL_ERROR_INVALID_BUDGET_SIZE = 0x80029006,
|
||||
SCE_KERNEL_ERROR_CP14_DISABLED = 0x80029007,
|
||||
SCE_KERNEL_ERROR_EXCEEDED_MAX_PROCESSES = 0x80029008,
|
||||
SCE_KERNEL_ERROR_PROCESS_REMAINING = 0x80029009,
|
||||
SCE_KERNEL_ERROR_IOFILEMGR_ERROR = 0x8002A000,
|
||||
SCE_KERNEL_ERROR_IO_NAME_TOO_LONG = 0x8002A001,
|
||||
SCE_KERNEL_ERROR_IO_REG_DEV = 0x8002A002,
|
||||
SCE_KERNEL_ERROR_IO_ALIAS_USED = 0x8002A003,
|
||||
SCE_KERNEL_ERROR_IO_DEL_DEV = 0x8002A004,
|
||||
SCE_KERNEL_ERROR_IO_WOULD_BLOCK = 0x8002A005,
|
||||
SCE_KERNEL_ERROR_MODULEMGR_START_FAILED = 0x8002D000,
|
||||
SCE_KERNEL_ERROR_MODULEMGR_STOP_FAIL = 0x8002D001,
|
||||
SCE_KERNEL_ERROR_MODULEMGR_IN_USE = 0x8002D002,
|
||||
SCE_KERNEL_ERROR_MODULEMGR_NO_LIB = 0x8002D003,
|
||||
SCE_KERNEL_ERROR_MODULEMGR_SYSCALL_REG = 0x8002D004,
|
||||
SCE_KERNEL_ERROR_MODULEMGR_NOMEM_LIB = 0x8002D005,
|
||||
SCE_KERNEL_ERROR_MODULEMGR_NOMEM_STUB = 0x8002D006,
|
||||
SCE_KERNEL_ERROR_MODULEMGR_NOMEM_SELF = 0x8002D007,
|
||||
SCE_KERNEL_ERROR_MODULEMGR_NOMEM = 0x8002D008,
|
||||
SCE_KERNEL_ERROR_MODULEMGR_INVALID_LIB = 0x8002D009,
|
||||
SCE_KERNEL_ERROR_MODULEMGR_INVALID_STUB = 0x8002D00A,
|
||||
SCE_KERNEL_ERROR_MODULEMGR_NO_FUNC_NID = 0x8002D00B,
|
||||
SCE_KERNEL_ERROR_MODULEMGR_NO_VAR_NID = 0x8002D00C,
|
||||
SCE_KERNEL_ERROR_MODULEMGR_INVALID_TYPE = 0x8002D00D,
|
||||
SCE_KERNEL_ERROR_MODULEMGR_NO_MOD_ENTRY = 0x8002D00E,
|
||||
SCE_KERNEL_ERROR_MODULEMGR_INVALID_PROC_PARAM = 0x8002D00F,
|
||||
SCE_KERNEL_ERROR_MODULEMGR_NO_MODOBJ = 0x8002D010,
|
||||
SCE_KERNEL_ERROR_MODULEMGR_NO_MOD = 0x8002D011,
|
||||
SCE_KERNEL_ERROR_MODULEMGR_NO_PROCESS = 0x8002D012,
|
||||
SCE_KERNEL_ERROR_MODULEMGR_OLD_LIB = 0x8002D013,
|
||||
SCE_KERNEL_ERROR_MODULEMGR_STARTED = 0x8002D014,
|
||||
SCE_KERNEL_ERROR_MODULEMGR_NOT_STARTED = 0x8002D015,
|
||||
SCE_KERNEL_ERROR_MODULEMGR_NOT_STOPPED = 0x8002D016,
|
||||
SCE_KERNEL_ERROR_MODULEMGR_INVALID_PROCESS_UID = 0x8002D017,
|
||||
SCE_KERNEL_ERROR_MODULEMGR_CANNOT_EXPORT_LIB_TO_SHARED = 0x8002D018,
|
||||
SCE_KERNEL_ERROR_MODULEMGR_INVALID_REL_INFO = 0x8002D019,
|
||||
SCE_KERNEL_ERROR_MODULEMGR_INVALID_REF_INFO = 0x8002D01A,
|
||||
SCE_KERNEL_ERROR_MODULEMGR_ELINK = 0x8002D01B,
|
||||
SCE_KERNEL_ERROR_MODULEMGR_NOENT = 0x8002D01C,
|
||||
SCE_KERNEL_ERROR_MODULEMGR_BUSY = 0x8002D01D,
|
||||
SCE_KERNEL_ERROR_MODULEMGR_NOEXEC = 0x8002D01E,
|
||||
SCE_KERNEL_ERROR_MODULEMGR_NAMETOOLONG = 0x8002D01F,
|
||||
SCE_KERNEL_ERROR_LIBRARYDB_NOENT = 0x8002D080,
|
||||
SCE_KERNEL_ERROR_LIBRARYDB_NO_LIB = 0x8002D081,
|
||||
SCE_KERNEL_ERROR_LIBRARYDB_NO_MOD = 0x8002D082,
|
||||
SCE_KERNEL_ERROR_AUTHFAIL = 0x8002F000,
|
||||
SCE_KERNEL_ERROR_NO_AUTH = 0x8002F001,
|
||||
};
|
||||
|
||||
// PSP2 UID Class
|
||||
enum : u32
|
||||
{
|
||||
SCE_KERNEL_UID_CLASS_PROCESS = 0,
|
||||
SCE_KERNEL_THREADMGR_UID_CLASS_THREAD = 1,
|
||||
SCE_KERNEL_THREADMGR_UID_CLASS_SEMA = 2,
|
||||
SCE_KERNEL_THREADMGR_UID_CLASS_EVENT_FLAG = 3,
|
||||
SCE_KERNEL_THREADMGR_UID_CLASS_MUTEX = 4,
|
||||
SCE_KERNEL_THREADMGR_UID_CLASS_COND = 5,
|
||||
SCE_KERNEL_THREADMGR_UID_CLASS_TIMER = 6,
|
||||
SCE_KERNEL_THREADMGR_UID_CLASS_MSG_PIPE = 7,
|
||||
SCE_KERNEL_THREADMGR_UID_CLASS_CALLBACK = 8,
|
||||
SCE_KERNEL_THREADMGR_UID_CLASS_THREAD_EVENT = 9,
|
||||
};
|
||||
|
||||
union SceKernelSysClock
|
||||
{
|
||||
struct
|
||||
{
|
||||
le_t<u32> low;
|
||||
le_t<u32> hi;
|
||||
}
|
||||
u;
|
||||
|
||||
le_t<u64> quad;
|
||||
};
|
||||
|
||||
struct SceKernelCallFrame
|
||||
{
|
||||
le_t<u32> sp;
|
||||
le_t<u32> pc;
|
||||
};
|
||||
|
||||
// Memory Manager definitions
|
||||
|
||||
struct SceKernelMemBlockInfo
|
||||
{
|
||||
le_t<u32> size;
|
||||
vm::lptr<void> mappedBase;
|
||||
le_t<u32> mappedSize;
|
||||
le_t<s32> memoryType; // SceKernelMemoryType
|
||||
le_t<u32> access;
|
||||
};
|
||||
|
||||
struct SceKernelAllocMemBlockOpt
|
||||
{
|
||||
le_t<u32> size;
|
||||
le_t<u32> attr;
|
||||
le_t<u32> alignment;
|
||||
le_t<s32> uidBaseBlock;
|
||||
vm::lcptr<char> strBaseBlockName;
|
||||
};
|
||||
|
||||
// Thread Manager definitions (threads)
|
||||
|
||||
enum
|
||||
{
|
||||
SCE_KERNEL_ATTR_TH_FIFO = 0,
|
||||
SCE_KERNEL_ATTR_TH_PRIO = 0x2000,
|
||||
|
||||
SCE_KERNEL_ATTR_SINGLE = 0, // Event Flag only
|
||||
SCE_KERNEL_ATTR_MULTI = 0x1000, // Event Flag only
|
||||
};
|
||||
|
||||
using SceKernelThreadEntry = s32(u32 argSize, vm::ptr<void> pArgBlock);
|
||||
|
||||
struct SceKernelThreadOptParam
|
||||
{
|
||||
le_t<u32> size;
|
||||
le_t<u32> attr;
|
||||
};
|
||||
|
||||
struct SceKernelThreadInfo
|
||||
{
|
||||
le_t<u32> size;
|
||||
le_t<s32> processId;
|
||||
char name[32];
|
||||
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;
|
||||
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
|
||||
{
|
||||
le_t<u32> size;
|
||||
|
||||
struct
|
||||
{
|
||||
le_t<s32> processId;
|
||||
le_t<s32> threadId;
|
||||
le_t<s32> priority;
|
||||
|
||||
} cpuInfo[4];
|
||||
};
|
||||
|
||||
struct SceKernelSystemInfo
|
||||
{
|
||||
le_t<u32> size;
|
||||
le_t<u32> activeCpuMask;
|
||||
|
||||
struct
|
||||
{
|
||||
SceKernelSysClock idleClock;
|
||||
le_t<u32> comesOutOfIdleCount;
|
||||
le_t<u32> threadSwitchCount;
|
||||
|
||||
} cpuInfo[4];
|
||||
};
|
||||
|
||||
// Thread Manager definitions (callbacks)
|
||||
|
||||
using SceKernelCallbackFunction = s32(s32 notifyId, s32 notifyCount, s32 notifyArg, vm::ptr<void> pCommon);
|
||||
|
||||
struct SceKernelCallbackInfo
|
||||
{
|
||||
le_t<u32> size;
|
||||
le_t<s32> callbackId;
|
||||
char name[32];
|
||||
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)
|
||||
|
||||
using SceKernelThreadEventHandler = s32(s32 type, s32 threadId, s32 arg, vm::ptr<void> pCommon);
|
||||
|
||||
struct SceKernelEventInfo
|
||||
{
|
||||
le_t<u32> size;
|
||||
le_t<s32> eventId;
|
||||
char name[32];
|
||||
le_t<u32> attr;
|
||||
le_t<u32> eventPattern;
|
||||
le_t<u64> userData;
|
||||
le_t<u32> numWaitThreads;
|
||||
le_t<s32> reserved[1];
|
||||
};
|
||||
|
||||
struct SceKernelWaitEvent
|
||||
{
|
||||
le_t<s32> eventId;
|
||||
le_t<u32> eventPattern;
|
||||
};
|
||||
|
||||
struct SceKernelResultEvent
|
||||
{
|
||||
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)
|
||||
|
||||
enum : u32
|
||||
{
|
||||
SCE_KERNEL_EVF_WAITMODE_AND = 0x00000000,
|
||||
SCE_KERNEL_EVF_WAITMODE_OR = 0x00000001,
|
||||
SCE_KERNEL_EVF_WAITMODE_CLEAR_ALL = 0x00000002,
|
||||
SCE_KERNEL_EVF_WAITMODE_CLEAR_PAT = 0x00000004,
|
||||
};
|
||||
|
||||
struct SceKernelEventFlagOptParam
|
||||
{
|
||||
le_t<u32> size;
|
||||
};
|
||||
|
||||
struct SceKernelEventFlagInfo
|
||||
{
|
||||
le_t<u32> size;
|
||||
le_t<s32> evfId;
|
||||
char name[32];
|
||||
le_t<u32> attr;
|
||||
le_t<u32> initPattern;
|
||||
le_t<u32> currentPattern;
|
||||
le_t<s32> numWaitThreads;
|
||||
};
|
||||
|
||||
// Thread Manager definitions (semaphores)
|
||||
|
||||
struct SceKernelSemaOptParam
|
||||
{
|
||||
le_t<u32> size;
|
||||
};
|
||||
|
||||
struct SceKernelSemaInfo
|
||||
{
|
||||
le_t<u32> size;
|
||||
le_t<s32> semaId;
|
||||
char name[32];
|
||||
le_t<u32> attr;
|
||||
le_t<s32> initCount;
|
||||
le_t<s32> currentCount;
|
||||
le_t<s32> maxCount;
|
||||
le_t<s32> numWaitThreads;
|
||||
};
|
||||
|
||||
struct psp2_semaphore
|
||||
{
|
||||
static const u32 id_base = 1;
|
||||
static const u32 id_step = 2;
|
||||
static const u32 id_count = 8192;
|
||||
|
||||
const std::string name; // IPC Name
|
||||
|
||||
atomic_t<u32> ref{}; // IPC Ref Counter
|
||||
|
||||
const u32 attr;
|
||||
const s32 max;
|
||||
|
||||
atomic_t<s32> count;
|
||||
|
||||
psp2_semaphore(const char* name, u32 attr, s32 count, s32 max)
|
||||
: name(name)
|
||||
, attr(attr)
|
||||
, max(max)
|
||||
, count(count)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
// Thread Manager definitions (mutexes)
|
||||
|
||||
struct SceKernelMutexOptParam
|
||||
{
|
||||
le_t<u32> size;
|
||||
le_t<s32> ceilingPriority;
|
||||
};
|
||||
|
||||
struct SceKernelMutexInfo
|
||||
{
|
||||
le_t<u32> size;
|
||||
le_t<s32> mutexId;
|
||||
char name[32];
|
||||
le_t<u32> attr;
|
||||
le_t<s32> initCount;
|
||||
le_t<s32> currentCount;
|
||||
le_t<s32> currentOwnerId;
|
||||
le_t<s32> numWaitThreads;
|
||||
};
|
||||
|
||||
struct psp2_mutex
|
||||
{
|
||||
static const u32 id_base = 1;
|
||||
static const u32 id_step = 2;
|
||||
static const u32 id_count = 8192;
|
||||
|
||||
const std::string name; // IPC Name
|
||||
|
||||
atomic_t<u32> ref{}; // IPC Ref Counter
|
||||
|
||||
const u32 attr;
|
||||
|
||||
atomic_t<s32> count;
|
||||
|
||||
psp2_mutex(const char* name, u32 attr, s32 count)
|
||||
: name(name)
|
||||
, attr(attr)
|
||||
, count(count)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
// Thread Manager definitions (lightweight mutexes)
|
||||
|
||||
struct SceKernelLwMutexWork
|
||||
{
|
||||
le_t<s32> data[4];
|
||||
};
|
||||
|
||||
struct SceKernelLwMutexOptParam
|
||||
{
|
||||
le_t<u32> size;
|
||||
};
|
||||
|
||||
struct SceKernelLwMutexInfo
|
||||
{
|
||||
le_t<u32> size;
|
||||
le_t<s32> uid;
|
||||
char name[32];
|
||||
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
|
||||
{
|
||||
le_t<u32> size;
|
||||
};
|
||||
|
||||
struct SceKernelCondInfo
|
||||
{
|
||||
le_t<u32> size;
|
||||
le_t<s32> condId;
|
||||
char name[32];
|
||||
le_t<u32> attr;
|
||||
le_t<s32> mutexId;
|
||||
le_t<u32> numWaitThreads;
|
||||
};
|
||||
|
||||
struct psp2_cond
|
||||
{
|
||||
static const u32 id_base = 1;
|
||||
static const u32 id_step = 2;
|
||||
static const u32 id_count = 8192;
|
||||
|
||||
const std::string name; // IPC Name
|
||||
|
||||
atomic_t<u32> ref{}; // IPC Ref Counter
|
||||
|
||||
const u32 attr;
|
||||
|
||||
const std::shared_ptr<psp2_mutex> mutex;
|
||||
|
||||
psp2_cond(const char* name, u32 attr, const std::shared_ptr<psp2_mutex>& mutex)
|
||||
: name(name)
|
||||
, attr(attr)
|
||||
, mutex(mutex)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
// Thread Manager definitions (lightweight condition variables)
|
||||
|
||||
struct SceKernelLwCondWork
|
||||
{
|
||||
le_t<s32> data[4];
|
||||
};
|
||||
|
||||
struct SceKernelLwCondOptParam
|
||||
{
|
||||
le_t<u32> size;
|
||||
};
|
||||
|
||||
struct SceKernelLwCondInfo
|
||||
{
|
||||
le_t<u32> size;
|
||||
le_t<s32> uid;
|
||||
char name[32];
|
||||
le_t<u32> attr;
|
||||
vm::lptr<SceKernelLwCondWork> pWork;
|
||||
vm::lptr<SceKernelLwMutexWork> pLwMutex;
|
||||
le_t<u32> numWaitThreads;
|
||||
};
|
||||
|
||||
// Thread Manager definitions (timers)
|
||||
|
||||
struct SceKernelTimerOptParam
|
||||
{
|
||||
le_t<u32> size;
|
||||
};
|
||||
|
||||
struct SceKernelTimerInfo
|
||||
{
|
||||
le_t<u32> size;
|
||||
le_t<s32> timerId;
|
||||
char name[32];
|
||||
le_t<u32> attr;
|
||||
le_t<s32> fActive;
|
||||
SceKernelSysClock baseTime;
|
||||
SceKernelSysClock currentTime;
|
||||
SceKernelSysClock schedule;
|
||||
SceKernelSysClock interval;
|
||||
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
|
||||
{
|
||||
le_t<u32> size;
|
||||
};
|
||||
|
||||
struct SceKernelRWLockInfo
|
||||
{
|
||||
le_t<u32> size;
|
||||
le_t<s32> rwLockId;
|
||||
char name[32];
|
||||
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
|
||||
{
|
||||
le_t<s32> mode;
|
||||
le_t<u32> attr;
|
||||
le_t<s64> size;
|
||||
SceDateTime ctime;
|
||||
SceDateTime atime;
|
||||
SceDateTime mtime;
|
||||
le_t<u64> _private[6];
|
||||
};
|
||||
|
||||
struct SceIoDirent
|
||||
{
|
||||
SceIoStat d_stat;
|
||||
char d_name[256];
|
||||
vm::lptr<void> d_private;
|
||||
le_t<s32> dummy;
|
||||
};
|
@ -1,199 +0,0 @@
|
||||
#include "stdafx.h"
|
||||
#include "Emu/System.h"
|
||||
#include "Emu/PSP2/ARMv7Module.h"
|
||||
|
||||
#include "sceLibXml.h"
|
||||
|
||||
logs::channel sceLibXml("sceLibXml");
|
||||
|
||||
#define REG_FUNC(nid, name) REG_FNID(SceLibXml, nid, name)
|
||||
|
||||
DECLARE(arm_module_manager::SceLibXml)("SceLibXml", []()
|
||||
{
|
||||
//REG_FUNC(0x57400A1A, _ZN3sce3Xml10SimpleDataC1EPKcj);
|
||||
//REG_FUNC(0x7E582075, _ZN3sce3Xml10SimpleDataC1Ev);
|
||||
//REG_FUNC(0x4CF0656B, _ZN3sce3Xml10SimpleDataC2EPKcj);
|
||||
//REG_FUNC(0x95077028, _ZN3sce3Xml10SimpleDataC2Ev);
|
||||
//REG_FUNC(0xECFA6A2A, _ZN3sce3Xml11Initializer10initializeEPKNS0_13InitParameterE);
|
||||
//REG_FUNC(0x29824CD5, _ZN3sce3Xml11Initializer9terminateEv);
|
||||
//REG_FUNC(0xBF13FDE6, _ZN3sce3Xml11InitializerC1Ev);
|
||||
//REG_FUNC(0x94AAA71D, _ZN3sce3Xml11InitializerC2Ev);
|
||||
//REG_FUNC(0xB4547C88, _ZN3sce3Xml11InitializerD1Ev);
|
||||
//REG_FUNC(0xAAA08FA8, _ZN3sce3Xml11InitializerD2Ev);
|
||||
//REG_FUNC(0x8D387E01, _ZN3sce3Xml12MemAllocatorC1Ev);
|
||||
//REG_FUNC(0xE982E681, _ZN3sce3Xml12MemAllocatorC2Ev);
|
||||
//REG_FUNC(0x90B82579, _ZN3sce3Xml12MemAllocatorD0Ev);
|
||||
//REG_FUNC(0x56002B9D, _ZN3sce3Xml12MemAllocatorD1Ev);
|
||||
//REG_FUNC(0x1BE022EA, _ZN3sce3Xml12MemAllocatorD2Ev);
|
||||
//REG_FUNC(0x89AA847E, _ZN3sce3Xml13AttributeList10initializeEPKNS0_11InitializerE);
|
||||
//REG_FUNC(0xD08EE434, _ZN3sce3Xml13AttributeList12addAttributeEPKNS0_6StringES4_);
|
||||
//REG_FUNC(0xCCEE4E7C, _ZN3sce3Xml13AttributeList5clearEv);
|
||||
//REG_FUNC(0x11FE5A65, _ZN3sce3Xml13AttributeList9terminateEv);
|
||||
//REG_FUNC(0x9CBD82D4, _ZN3sce3Xml13AttributeListC1ERKS1_);
|
||||
//REG_FUNC(0x542076D8, _ZN3sce3Xml13AttributeListC1Ev);
|
||||
//REG_FUNC(0x87C89447, _ZN3sce3Xml13AttributeListC2ERKS1_);
|
||||
//REG_FUNC(0x5D49542A, _ZN3sce3Xml13AttributeListC2Ev);
|
||||
//REG_FUNC(0x38861841, _ZN3sce3Xml13AttributeListD1Ev);
|
||||
//REG_FUNC(0x1B0B3976, _ZN3sce3Xml13AttributeListD2Ev);
|
||||
//REG_FUNC(0x30520B78, _ZN3sce3Xml14VarAllocBuffer4copyEPKhjb);
|
||||
//REG_FUNC(0x7D5A0041, _ZN3sce3Xml14VarAllocBuffer5clearEv);
|
||||
//REG_FUNC(0xD95D3824, _ZN3sce3Xml14VarAllocBuffer7copyStrEPKcj);
|
||||
//REG_FUNC(0xFE99676E, _ZN3sce3Xml14VarAllocBuffer7copyStrERKNS0_6StringE);
|
||||
//REG_FUNC(0x82747F92, _ZN3sce3Xml14VarAllocBuffer7reserveEj);
|
||||
//REG_FUNC(0xE93EACFC, _ZN3sce3Xml14VarAllocBuffer9terminateEv);
|
||||
//REG_FUNC(0x8045D9C2, _ZN3sce3Xml14VarAllocBufferC1EPKNS0_11InitializerE);
|
||||
//REG_FUNC(0xEF4FA027, _ZN3sce3Xml14VarAllocBufferC2EPKNS0_11InitializerE);
|
||||
//REG_FUNC(0xD61CAAFC, _ZN3sce3Xml14VarAllocBufferD0Ev);
|
||||
//REG_FUNC(0xD9217FC8, _ZN3sce3Xml14VarAllocBufferD1Ev);
|
||||
//REG_FUNC(0x8A4B9379, _ZN3sce3Xml14VarAllocBufferD2Ev);
|
||||
//REG_FUNC(0xB7770E5E, _ZN3sce3Xml18SerializeParameterC1Ev);
|
||||
//REG_FUNC(0xF65270FC, _ZN3sce3Xml18SerializeParameterC2Ev);
|
||||
//REG_FUNC(0x2CB61A7C, _ZN3sce3Xml20bXResultToResultTypeEi);
|
||||
//REG_FUNC(0x59C5E9B2, _ZN3sce3Xml23getMemManagerDebugLevelEv);
|
||||
//REG_FUNC(0xBA8B7374, _ZN3sce3Xml23setMemManagerDebugLevelEi);
|
||||
//REG_FUNC(0xBBACFE87, _ZN3sce3Xml3Dom15DocumentBuilder10initializeEPKNS0_11InitializerE);
|
||||
//REG_FUNC(0x1A29526B, _ZN3sce3Xml3Dom15DocumentBuilder11getDocumentEv);
|
||||
//REG_FUNC(0xA2431C2B, _ZN3sce3Xml3Dom15DocumentBuilder16setResolveEntityEb);
|
||||
//REG_FUNC(0xB8C4D13C, _ZN3sce3Xml3Dom15DocumentBuilder20setSkipIgnorableTextEb);
|
||||
//REG_FUNC(0xF351D753, _ZN3sce3Xml3Dom15DocumentBuilder26setSkipIgnorableWhiteSpaceEb);
|
||||
//REG_FUNC(0x7744DD14, _ZN3sce3Xml3Dom15DocumentBuilder5parseEPKNS0_6StringEb);
|
||||
//REG_FUNC(0x42D59053, _ZN3sce3Xml3Dom15DocumentBuilder9terminateEv);
|
||||
//REG_FUNC(0x702492EA, _ZN3sce3Xml3Dom15DocumentBuilderC1Ev);
|
||||
//REG_FUNC(0x36F6BDF2, _ZN3sce3Xml3Dom15DocumentBuilderC2Ev);
|
||||
//REG_FUNC(0x79C9322E, _ZN3sce3Xml3Dom15DocumentBuilderD0Ev);
|
||||
//REG_FUNC(0x19D0E024, _ZN3sce3Xml3Dom15DocumentBuilderD1Ev);
|
||||
//REG_FUNC(0x99C58389, _ZN3sce3Xml3Dom15DocumentBuilderD2Ev);
|
||||
//REG_FUNC(0x3CA958D3, _ZN3sce3Xml3Dom4Node11removeChildEy);
|
||||
//REG_FUNC(0x1B98BDBE, _ZN3sce3Xml3Dom4Node12insertBeforeEyy);
|
||||
//REG_FUNC(0x26BA1E6E, _ZNK3sce3Xml3Dom4Node13hasAttributesEv);
|
||||
//REG_FUNC(0xC6F4F6A8, _ZN3sce3Xml3Dom4Node13hasChildNodesEv);
|
||||
//REG_FUNC(0x088C100E, _ZN3sce3Xml3Dom4NodeC1Ey);
|
||||
//REG_FUNC(0x44CAF9E1, _ZN3sce3Xml3Dom4NodeC2Ey);
|
||||
//REG_FUNC(0x8F2EB967, _ZN3sce3Xml3Dom4NodeD1Ev);
|
||||
//REG_FUNC(0x241EFC0E, _ZN3sce3Xml3Dom4NodeD2Ev);
|
||||
//REG_FUNC(0x6A16C2FF, _ZN3sce3Xml3Dom8Document10importNodeEyyPKS2_y);
|
||||
//REG_FUNC(0xB4A33B78, _ZN3sce3Xml3Dom8Document10initializeEPKNS0_11InitializerE);
|
||||
//REG_FUNC(0x18686B94, _ZN3sce3Xml3Dom8Document10insertNodeEyyy);
|
||||
//REG_FUNC(0x49263CE5, _ZN3sce3Xml3Dom8Document11removeChildEyy);
|
||||
//REG_FUNC(0xD945184A, _ZN3sce3Xml3Dom8Document11resetStatusEv);
|
||||
//REG_FUNC(0x7B0A8F6C, _ZN3sce3Xml3Dom8Document11setWritableEv);
|
||||
//REG_FUNC(0x0CBC1C3F, _ZN3sce3Xml3Dom8Document12importParentEPKS2_y);
|
||||
//REG_FUNC(0x016A9ADB, _ZN3sce3Xml3Dom8Document12setAttrValueEyPKNS0_6StringES5_);
|
||||
//REG_FUNC(0xEA19C7CF, _ZN3sce3Xml3Dom8Document12setAttributeEyPKNS0_6StringES5_);
|
||||
//REG_FUNC(0x35C50B8B, _ZN3sce3Xml3Dom8Document13createElementEPKNS0_6StringEPKNS0_13AttributeListES5_);
|
||||
//REG_FUNC(0xBCA5E62A, _ZN3sce3Xml3Dom8Document13recurseDeleteEy);
|
||||
//REG_FUNC(0x8D19723F, _ZN3sce3Xml3Dom8Document14createTextNodeEPKNS0_6StringE);
|
||||
//REG_FUNC(0x6220E98B, _ZN3sce3Xml3Dom8Document15addElementChildEyPKNS0_6StringEPKNS0_13AttributeListES5_);
|
||||
//REG_FUNC(0xF1DB18B1, _ZN3sce3Xml3Dom8Document15removeAttributeEyPKNS0_6StringE);
|
||||
//REG_FUNC(0x779036AB, _ZN3sce3Xml3Dom8Document16removeAttributesEy);
|
||||
//REG_FUNC(0x0667B08D, _ZN3sce3Xml3Dom8Document16setAttributeListEyPKNS0_13AttributeListE);
|
||||
//REG_FUNC(0xD2BFBC47, _ZNK3sce3Xml3Dom8Document20getElementsByTagNameEyPKNS0_6StringEPNS1_8NodeListE);
|
||||
//REG_FUNC(0xDEFEAFD2, _ZN3sce3Xml3Dom8Document7setTextEyPKNS0_6StringE);
|
||||
//REG_FUNC(0x87F8B4DA, _ZN3sce3Xml3Dom8Document9serializeEPKNS0_18SerializeParameterEPNS0_6StringE);
|
||||
//REG_FUNC(0x4B7321FB, _ZN3sce3Xml3Dom8Document9terminateEv);
|
||||
//REG_FUNC(0x1DD41C7A, _ZN3sce3Xml3Dom8DocumentC1ERKS2_);
|
||||
//REG_FUNC(0x7B7107AD, _ZN3sce3Xml3Dom8DocumentC1Ev);
|
||||
//REG_FUNC(0xF399F763, _ZN3sce3Xml3Dom8DocumentC2ERKS2_);
|
||||
//REG_FUNC(0xE6BA9C73, _ZN3sce3Xml3Dom8DocumentC2Ev);
|
||||
//REG_FUNC(0xFB207925, _ZN3sce3Xml3Dom8DocumentD1Ev);
|
||||
//REG_FUNC(0x11A5F0A3, _ZN3sce3Xml3Dom8DocumentD2Ev);
|
||||
//REG_FUNC(0xD622A7FE, _ZN3sce3Xml3Dom8DocumentaSERKS2_);
|
||||
//REG_FUNC(0x860CC706, _ZN3sce3Xml3Dom8NodeList10initializeEPKNS0_11InitializerE);
|
||||
//REG_FUNC(0x7A889374, _ZN3sce3Xml3Dom8NodeList10insertLastEy);
|
||||
//REG_FUNC(0xE9995F58, _ZN3sce3Xml3Dom8NodeList10removeItemEy);
|
||||
//REG_FUNC(0xFA921C6E, _ZN3sce3Xml3Dom8NodeList11insertFirstEy);
|
||||
//REG_FUNC(0xCDD1D418, _ZNK3sce3Xml3Dom8NodeList4itemEj);
|
||||
//REG_FUNC(0x508E9150, _ZN3sce3Xml3Dom8NodeList5clearEv);
|
||||
//REG_FUNC(0xA41ED241, _ZNK3sce3Xml3Dom8NodeList8findItemEPKNS0_6StringE);
|
||||
//REG_FUNC(0xE1AB441D, _ZNK3sce3Xml3Dom8NodeList8findItemEy);
|
||||
//REG_FUNC(0xFB9EDBF9, _ZNK3sce3Xml3Dom8NodeList9getLengthEv);
|
||||
//REG_FUNC(0x32B396AD, _ZN3sce3Xml3Dom8NodeList9terminateEv);
|
||||
//REG_FUNC(0xB1CA0E34, _ZN3sce3Xml3Dom8NodeListC1ERKS2_);
|
||||
//REG_FUNC(0x0580C02E, _ZN3sce3Xml3Dom8NodeListC1Ev);
|
||||
//REG_FUNC(0xB97BF737, _ZN3sce3Xml3Dom8NodeListC2ERKS2_);
|
||||
//REG_FUNC(0x684E57B9, _ZN3sce3Xml3Dom8NodeListC2Ev);
|
||||
//REG_FUNC(0x92EBC9F8, _ZN3sce3Xml3Dom8NodeListD1Ev);
|
||||
//REG_FUNC(0x2DF80037, _ZN3sce3Xml3Dom8NodeListD2Ev);
|
||||
//REG_FUNC(0xBAD4AAFA, _ZNK3sce3Xml3Dom8NodeListixEj);
|
||||
//REG_FUNC(0x874C8331, _ZN3sce3Xml3Sax6Parser10initializeEPKNS0_11InitializerE);
|
||||
//REG_FUNC(0x4DB998E6, _ZN3sce3Xml3Sax6Parser11setUserDataEPv);
|
||||
//REG_FUNC(0xB77BF8A0, _ZN3sce3Xml3Sax6Parser16setResolveEntityEb);
|
||||
//REG_FUNC(0x1B2442A0, _ZN3sce3Xml3Sax6Parser18setDocumentHandlerEPNS1_15DocumentHandlerE);
|
||||
//REG_FUNC(0xCE1DAE23, _ZN3sce3Xml3Sax6Parser26setSkipIgnorableWhiteSpaceEb);
|
||||
//REG_FUNC(0x70D9FC8E, _ZN3sce3Xml3Sax6Parser5parseEPKNS0_6StringEb);
|
||||
//REG_FUNC(0xA2B40FA7, _ZN3sce3Xml3Sax6Parser5resetEv);
|
||||
//REG_FUNC(0xF2C8950D, _ZN3sce3Xml3Sax6Parser9terminateEv);
|
||||
//REG_FUNC(0x60BF9988, _ZN3sce3Xml3Sax6ParserC1Ev);
|
||||
//REG_FUNC(0x56390CA0, _ZN3sce3Xml3Sax6ParserC2Ev);
|
||||
//REG_FUNC(0xA11C2AED, _ZN3sce3Xml3Sax6ParserD1Ev);
|
||||
//REG_FUNC(0x02E8F7FA, _ZN3sce3Xml3Sax6ParserD2Ev);
|
||||
//REG_FUNC(0xE5314387, _ZN3sce3Xml4Attr10initializeEPKNS0_11InitializerE);
|
||||
//REG_FUNC(0x66D1B605, _ZN3sce3Xml4Attr7setNameEPKNS0_6StringE);
|
||||
//REG_FUNC(0x7DD3059D, _ZN3sce3Xml4Attr8setValueEPKNS0_6StringE);
|
||||
//REG_FUNC(0x67E0DF2B, _ZN3sce3Xml4Attr9terminateEv);
|
||||
//REG_FUNC(0xC09ABF87, _ZN3sce3Xml4AttrC1ERKS1_);
|
||||
//REG_FUNC(0xD016F1BC, _ZN3sce3Xml4AttrC1Ev);
|
||||
//REG_FUNC(0xB4851BEC, _ZN3sce3Xml4AttrC2ERKS1_);
|
||||
//REG_FUNC(0x0B3AE81B, _ZN3sce3Xml4AttrC2Ev);
|
||||
//REG_FUNC(0x58E349A5, _ZN3sce3Xml4AttrD1Ev);
|
||||
//REG_FUNC(0xB9E6F81A, _ZN3sce3Xml4AttrD2Ev);
|
||||
//REG_FUNC(0xA5B902D4, _ZN3sce3Xml4AttraSERKS1_);
|
||||
//REG_FUNC(0xA7E983E2, _ZN3sce3Xml4Util9strResultEi);
|
||||
//REG_FUNC(0x035F013B, _ZN3sce3Xml6StringC1EPKc);
|
||||
//REG_FUNC(0x0B5461E0, _ZN3sce3Xml6StringC1EPKcj);
|
||||
//REG_FUNC(0x67191CC6, _ZN3sce3Xml6StringC1ERKS1_);
|
||||
//REG_FUNC(0xA17502C1, _ZN3sce3Xml6StringC1Ev);
|
||||
//REG_FUNC(0xECC1F1A4, _ZN3sce3Xml6StringC2EPKc);
|
||||
//REG_FUNC(0x457CCE55, _ZN3sce3Xml6StringC2EPKcj);
|
||||
//REG_FUNC(0xD785BA85, _ZN3sce3Xml6StringC2ERKS1_);
|
||||
//REG_FUNC(0x8816F7EF, _ZN3sce3Xml6StringC2Ev);
|
||||
//REG_FUNC(0x18758863, _ZN3sce3Xml6StringaSERKS1_);
|
||||
//REG_FUNC(0x4F30F0CC, _ZNK3sce3Xml13AttributeList12getAttributeEPKNS0_6StringE);
|
||||
//REG_FUNC(0x5ED0B2F9, _ZNK3sce3Xml13AttributeList12getAttributeEj);
|
||||
//REG_FUNC(0x38AEB52E, _ZNK3sce3Xml13AttributeList9getLengthEv);
|
||||
//REG_FUNC(0xEC96BFC6, _ZNK3sce3Xml3Dom13DocumentDebug13getStructSizeEv);
|
||||
//REG_FUNC(0xE1100FC0, _ZNK3sce3Xml3Dom13DocumentDebug16getAttrTableSizeEv);
|
||||
//REG_FUNC(0x6E1F1FFB, _ZNK3sce3Xml3Dom13DocumentDebug16getCharTableSizeEv);
|
||||
//REG_FUNC(0x8F9CEE10, _ZNK3sce3Xml3Dom13DocumentDebug19getElementTableSizeEv);
|
||||
//REG_FUNC(0xE1269956, _ZNK3sce3Xml3Dom4Node11getNodeNameEv);
|
||||
//REG_FUNC(0xCED5E0FF, _ZNK3sce3Xml3Dom4Node11getNodeTypeEv);
|
||||
//REG_FUNC(0x4F2D5541, _ZNK3sce3Xml3Dom4Node12getNodeValueEv);
|
||||
//REG_FUNC(0xB405A149, _ZNK3sce3Xml3Dom4Node13getAttributesEv);
|
||||
//REG_FUNC(0x117BEA8A, _ZNK3sce3Xml3Dom4Node13getChildNodesEv);
|
||||
//REG_FUNC(0x639D219C, _ZNK3sce3Xml3Dom4Node13getFirstChildEv);
|
||||
//REG_FUNC(0x3FD63FB8, _ZNK3sce3Xml3Dom4Node12getLastChildEv);
|
||||
//REG_FUNC(0x1A46C0E1, _ZNK3sce3Xml3Dom4Node14getNextSiblingEv);
|
||||
//REG_FUNC(0xD9757BC8, _ZNK3sce3Xml3Dom4Node14getParenetNodeEv);
|
||||
//REG_FUNC(0x3E8122AB, _ZNK3sce3Xml3Dom4Node16getOwnerDocumentEv);
|
||||
//REG_FUNC(0x22DBB221, _ZNK3sce3Xml3Dom8Document10getDocRootEv);
|
||||
//REG_FUNC(0xE3D0A78A, _ZNK3sce3Xml3Dom8Document10getSiblingEy);
|
||||
//REG_FUNC(0x2D370226, _ZNK3sce3Xml3Dom8Document10getXmlMetaEv);
|
||||
//REG_FUNC(0xA4D99D40, _ZNK3sce3Xml3Dom8Document10isReadOnlyEv);
|
||||
//REG_FUNC(0xCD65B91F, _ZNK3sce3Xml3Dom8Document11getAttrNameEy);
|
||||
//REG_FUNC(0x883E1BFC, _ZNK3sce3Xml3Dom8Document11getNextAttrEy);
|
||||
//REG_FUNC(0x471A22E8, _ZNK3sce3Xml3Dom8Document11getNodeNameEy);
|
||||
//REG_FUNC(0x62D3CB44, _ZNK3sce3Xml3Dom8Document11getNodeTypeEy);
|
||||
//REG_FUNC(0x28FD79E3, _ZNK3sce3Xml3Dom8Document11isAvailableEv);
|
||||
//REG_FUNC(0x7C6A03FD, _ZNK3sce3Xml3Dom8Document12getAttrValueEy);
|
||||
//REG_FUNC(0x9531C3CD, _ZNK3sce3Xml3Dom8Document12getAttributeEyPKNS0_6StringE);
|
||||
//REG_FUNC(0xEC856072, _ZNK3sce3Xml3Dom8Document12getFirstAttrEy);
|
||||
//REG_FUNC(0xFBCF0D3E, _ZNK3sce3Xml3Dom8Document12getLastChildEy);
|
||||
//REG_FUNC(0xCDEC3F43, _ZNK3sce3Xml3Dom8Document13getAttributesEyPNS1_8NodeListE);
|
||||
//REG_FUNC(0xFC61FDF1, _ZNK3sce3Xml3Dom8Document13getChildNodesEyPNS1_8NodeListE);
|
||||
//REG_FUNC(0xDAC75E49, _ZNK3sce3Xml3Dom8Document13getEntityTypeEy);
|
||||
//REG_FUNC(0xEA805296, _ZNK3sce3Xml3Dom8Document13hasAttributesEy);
|
||||
//REG_FUNC(0xC5E7431A, _ZNK3sce3Xml3Dom8Document13hasChildNodesEy);
|
||||
//REG_FUNC(0x0C1DDEC5, _ZNK3sce3Xml3Dom8Document14getSkippedTextEy);
|
||||
//REG_FUNC(0xB34D9672, _ZNK3sce3Xml3Dom8Document7getRootEv);
|
||||
//REG_FUNC(0x36ACFF5E, _ZNK3sce3Xml3Dom8Document7getTextEy);
|
||||
//REG_FUNC(0x3028E05D, _ZNK3sce3Xml3Dom8Document13getFirstChildEy);
|
||||
//REG_FUNC(0x161BA85E, _ZNK3sce3Xml3Dom8Document9getEntityEy);
|
||||
//REG_FUNC(0xA98B5758, _ZNK3sce3Xml3Dom8Document9getParentEy);
|
||||
//REG_FUNC(0xD428753A, _ZNK3sce3Xml3Dom8Document9getStatusEv);
|
||||
//REG_FUNC(0x10530611, _ZNK3sce3Xml3Dom8NodeList11isAvailableEv);
|
||||
//REG_FUNC(0x35134B85, _ZNK3sce3Xml4Attr7getNameEv);
|
||||
//REG_FUNC(0x7834A2F7, _ZNK3sce3Xml4Attr8getValueEv);
|
||||
//REG_FUNC(0x0D119AB3, _ZNK3sce3Xml3Dom4Node11isAvailableEv);
|
||||
//REG_FUNC(0x1633846D, _ZNK3sce3Xml4Attr11isAvailableEv);
|
||||
//REG_FUNC(0x58854322, _ZNK3sce3Xml13AttributeList11isAvailableEv);
|
||||
});
|
@ -1 +0,0 @@
|
||||
#pragma once
|
@ -1,542 +0,0 @@
|
||||
#include "stdafx.h"
|
||||
#include "Emu/System.h"
|
||||
#include "Emu/PSP2/ARMv7Module.h"
|
||||
#include "Emu/PSP2/ARMv7Thread.h"
|
||||
#include "Emu/PSP2/ARMv7Callback.h"
|
||||
|
||||
#include "sceLibc.h"
|
||||
|
||||
#include <thread>
|
||||
|
||||
logs::channel sceLibc("sceLibc");
|
||||
|
||||
extern fs::file g_tty;
|
||||
|
||||
// TODO
|
||||
vm::ptr<void> g_dso;
|
||||
|
||||
std::vector<std::function<void(ARMv7Thread&)>> g_atexit;
|
||||
|
||||
std::string arm_fmt(ARMv7Thread& cpu, vm::cptr<char> fmt, u32 g_count)
|
||||
{
|
||||
std::string result;
|
||||
|
||||
for (char c = *fmt++; c; c = *fmt++)
|
||||
{
|
||||
switch (c)
|
||||
{
|
||||
case '%':
|
||||
{
|
||||
const auto start = fmt - 1;
|
||||
|
||||
// read flags
|
||||
// TODO:: Syphurith: Sorry i can not classify/understand these lines exactly..
|
||||
const bool plus_sign = *fmt == '+' ? fmt++, true : false;
|
||||
const bool minus_sign = *fmt == '-' ? fmt++, true : false;
|
||||
const bool space_sign = *fmt == ' ' ? fmt++, true : false;
|
||||
const bool number_sign = *fmt == '#' ? fmt++, true : false;
|
||||
const bool zero_padding = *fmt == '0' ? fmt++, true : false;
|
||||
|
||||
// read width
|
||||
const u32 width = [&]() -> u32
|
||||
{
|
||||
u32 width = 0;
|
||||
|
||||
if (*fmt == '*')
|
||||
{
|
||||
fmt++;
|
||||
return cpu.get_next_gpr_arg(g_count);
|
||||
}
|
||||
|
||||
while (*fmt - '0' < 10)
|
||||
{
|
||||
width = width * 10 + (*fmt++ - '0');
|
||||
}
|
||||
|
||||
return width;
|
||||
}();
|
||||
|
||||
// read precision
|
||||
const u32 prec = [&]() -> u32
|
||||
{
|
||||
u32 prec = 0;
|
||||
|
||||
if (*fmt != '.')
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (*++fmt == '*')
|
||||
{
|
||||
fmt++;
|
||||
return cpu.get_next_gpr_arg(g_count);
|
||||
}
|
||||
|
||||
while (*fmt - '0' < 10)
|
||||
{
|
||||
prec = prec * 10 + (*fmt++ - '0');
|
||||
}
|
||||
|
||||
return prec;
|
||||
}();
|
||||
|
||||
switch (char cf = *fmt++)
|
||||
{
|
||||
case '%':
|
||||
{
|
||||
if (plus_sign || minus_sign || space_sign || number_sign || zero_padding || width || prec) break;
|
||||
|
||||
result += '%';
|
||||
continue;
|
||||
}
|
||||
case 'd':
|
||||
case 'i':
|
||||
{
|
||||
// signed decimal
|
||||
const s64 value = cpu.get_next_gpr_arg(g_count);
|
||||
|
||||
if (plus_sign || minus_sign || space_sign || number_sign || zero_padding || width || prec) break;
|
||||
|
||||
result += fmt::format("%lld", value);
|
||||
continue;
|
||||
}
|
||||
case 'x':
|
||||
case 'X':
|
||||
{
|
||||
// hexadecimal
|
||||
const u64 value = cpu.get_next_gpr_arg(g_count);
|
||||
|
||||
if (plus_sign || minus_sign || space_sign || prec) break;
|
||||
|
||||
if (number_sign && value)
|
||||
{
|
||||
result += cf == 'x' ? "0x" : "0X";
|
||||
}
|
||||
|
||||
const std::string& hex = fmt::format(cf == 'x' ? "%llx" : "%llX", value);
|
||||
|
||||
if (hex.length() >= width)
|
||||
{
|
||||
result += hex;
|
||||
}
|
||||
else if (zero_padding)
|
||||
{
|
||||
result += std::string(width - hex.length(), '0') + hex;
|
||||
}
|
||||
else
|
||||
{
|
||||
result += hex + std::string(width - hex.length(), ' ');
|
||||
}
|
||||
continue;
|
||||
}
|
||||
case 's':
|
||||
{
|
||||
// string
|
||||
const vm::cptr<char> string = vm::cast(cpu.get_next_gpr_arg(g_count));
|
||||
|
||||
if (plus_sign || minus_sign || space_sign || number_sign || zero_padding || width || prec) break;
|
||||
|
||||
result += string.get_ptr();
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
fmt::throw_exception("Unknown formatting '%s'" HERE, start.get_ptr());
|
||||
}
|
||||
}
|
||||
|
||||
result += c;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
namespace sce_libc_func
|
||||
{
|
||||
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);
|
||||
|
||||
g_atexit.insert(g_atexit.begin(), [func, arg, dso](ARMv7Thread& cpu)
|
||||
{
|
||||
func(cpu, arg);
|
||||
});
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
g_atexit.insert(g_atexit.begin(), [func, arg, dso](ARMv7Thread& cpu)
|
||||
{
|
||||
func(cpu, arg);
|
||||
});
|
||||
}
|
||||
|
||||
void exit(ARMv7Thread& cpu)
|
||||
{
|
||||
sceLibc.warning("exit()");
|
||||
|
||||
for (auto& func : decltype(g_atexit)(std::move(g_atexit)))
|
||||
{
|
||||
func(cpu);
|
||||
}
|
||||
|
||||
sceLibc.success("Process finished");
|
||||
|
||||
Emu.CallAfter([]()
|
||||
{
|
||||
Emu.Stop();
|
||||
});
|
||||
|
||||
thread_ctrl::eternalize();
|
||||
}
|
||||
|
||||
void printf(ARMv7Thread& cpu, vm::cptr<char> fmt, arm_va_args_t va_args)
|
||||
{
|
||||
sceLibc.warning("printf(fmt=%s, ...)", fmt);
|
||||
|
||||
if (g_tty)
|
||||
{
|
||||
g_tty.write(arm_fmt(cpu, fmt, va_args.count));
|
||||
}
|
||||
}
|
||||
|
||||
void sprintf(ARMv7Thread& cpu, vm::ptr<char> str, vm::cptr<char> fmt, arm_va_args_t va_args)
|
||||
{
|
||||
sceLibc.warning("sprintf(str=*0x%x, fmt=%s, ...)", str, fmt);
|
||||
|
||||
const std::string& result = arm_fmt(cpu, fmt, va_args.count);
|
||||
sceLibc.trace("sprintf() -> '%s'", result);
|
||||
|
||||
::memcpy(str.get_ptr(), result.c_str(), result.size() + 1);
|
||||
}
|
||||
|
||||
void __cxa_set_dso_handle_main(vm::ptr<void> dso)
|
||||
{
|
||||
sceLibc.warning("__cxa_set_dso_handle_main(dso=*0x%x)", dso);
|
||||
|
||||
g_dso = dso;
|
||||
g_atexit.clear();
|
||||
}
|
||||
|
||||
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::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(vm::cptr<char> text, vm::cptr<char> func)
|
||||
{
|
||||
sceLibc.error("_Assert(text=*0x%x, func=*0x%x)", text, func);
|
||||
|
||||
LOG_FATAL(HLE, "%s : %s\n", func.get_ptr(), text.get_ptr());
|
||||
Emu.Pause();
|
||||
}
|
||||
}
|
||||
|
||||
#define REG_FUNC(nid, name) REG_FNID(SceLibc, nid, sce_libc_func::name)
|
||||
|
||||
DECLARE(arm_module_manager::SceLibc)("SceLibc", []()
|
||||
{
|
||||
REG_FUNC(0xE4531F85, _Assert);
|
||||
//REG_FUNC(0xE71C5CDE, _Stoul);
|
||||
//REG_FUNC(0x7A5CA6A3, _Stoulx);
|
||||
//REG_FUNC(0x6794B3C6, _Stoull);
|
||||
//REG_FUNC(0xD00F68FD, _Stoullx);
|
||||
//REG_FUNC(0xBF94193B, _Stod);
|
||||
//REG_FUNC(0x6798AA28, _Stodx);
|
||||
//REG_FUNC(0x784D8D95, _Stof);
|
||||
//REG_FUNC(0x99A49A62, _Stofx);
|
||||
//REG_FUNC(0x5AE9FFD8, _Stold);
|
||||
//REG_FUNC(0x448A3CBE, _Stoldx);
|
||||
//REG_FUNC(0x6B9E23FE, _Stoll);
|
||||
//REG_FUNC(0x0D9E3B1C, _Stollx);
|
||||
//REG_FUNC(0x52DDCDAF, _Stolx);
|
||||
//REG_FUNC(0x76904D60, _Wctomb);
|
||||
//REG_FUNC(0x5E56EA4E, _Mbtowc);
|
||||
//REG_FUNC(0xDEC462AB, _FCbuild);
|
||||
//REG_FUNC(0x9E248B76, _sceLibcErrnoLoc);
|
||||
//REG_FUNC(0xA2F50E9E, _Fltrounds);
|
||||
//REG_FUNC(0x7CC1B964, isalnum);
|
||||
//REG_FUNC(0x94A89A00, isalpha);
|
||||
//REG_FUNC(0xF894ECCB, isblank);
|
||||
//REG_FUNC(0x13F4A8C8, iscntrl);
|
||||
//REG_FUNC(0xEB93BC93, isdigit);
|
||||
//REG_FUNC(0xDFEEFB1A, isgraph);
|
||||
//REG_FUNC(0x465B93F1, islower);
|
||||
//REG_FUNC(0xB7F87C4D, isprint);
|
||||
//REG_FUNC(0x82C1E3FD, ispunct);
|
||||
//REG_FUNC(0x18F2A715, isspace);
|
||||
//REG_FUNC(0xF2012814, isupper);
|
||||
//REG_FUNC(0x3B561695, isxdigit);
|
||||
//REG_FUNC(0x83F73C88, tolower);
|
||||
//REG_FUNC(0x1218642B, toupper);
|
||||
//REG_FUNC(0x1118B49F, imaxabs);
|
||||
//REG_FUNC(0x5766B4A8, imaxdiv);
|
||||
//REG_FUNC(0xB45FD61E, strtoimax);
|
||||
//REG_FUNC(0xB318952F, strtoumax);
|
||||
//REG_FUNC(0x3F2D104F, wcstoimax);
|
||||
//REG_FUNC(0xB9E511B4, wcstoumax);
|
||||
//REG_FUNC(0xCEF7C575, mspace_create);
|
||||
//REG_FUNC(0x30CBBC66, mspace_destroy);
|
||||
//REG_FUNC(0xE080B96E, mspace_malloc);
|
||||
//REG_FUNC(0x3CDFD2A3, mspace_free);
|
||||
//REG_FUNC(0x30470BBA, mspace_calloc);
|
||||
//REG_FUNC(0x52F780DD, mspace_memalign);
|
||||
//REG_FUNC(0x4633134A, mspace_realloc);
|
||||
//REG_FUNC(0x915DA59E, mspace_reallocalign);
|
||||
//REG_FUNC(0x7AD7A737, mspace_malloc_usable_size);
|
||||
//REG_FUNC(0x8D2A14C4, mspace_malloc_stats);
|
||||
//REG_FUNC(0x2FF5D5BB, mspace_malloc_stats_fast);
|
||||
//REG_FUNC(0xF355F381, mspace_is_heap_empty);
|
||||
//REG_FUNC(0x50B326CE, setjmp);
|
||||
//REG_FUNC(0x2D81C8C8, longjmp);
|
||||
//REG_FUNC(0x72BA4468, clearerr);
|
||||
//REG_FUNC(0xEC97321C, fclose);
|
||||
//REG_FUNC(0xB2F318FE, fdopen);
|
||||
//REG_FUNC(0xBF96AD71, feof);
|
||||
//REG_FUNC(0xB724BFC1, ferror);
|
||||
//REG_FUNC(0x5AAD2996, fflush);
|
||||
//REG_FUNC(0x672C58E0, fgetc);
|
||||
//REG_FUNC(0x3CDA3118, fgetpos);
|
||||
//REG_FUNC(0xBA14322F, fgets);
|
||||
//REG_FUNC(0xFEC1502E, fileno);
|
||||
//REG_FUNC(0xFFFBE239, fopen);
|
||||
//REG_FUNC(0xE0C79764, fprintf);
|
||||
//REG_FUNC(0x7E6A6108, fputc);
|
||||
//REG_FUNC(0xC8FF13E5, fputs);
|
||||
//REG_FUNC(0xB31C73A9, fread);
|
||||
//REG_FUNC(0x715C4395, freopen);
|
||||
//REG_FUNC(0x505601C6, fscanf);
|
||||
//REG_FUNC(0xC3A7CDE1, fseek);
|
||||
//REG_FUNC(0xDC1BDBD7, fsetpos);
|
||||
//REG_FUNC(0x41C2AF95, ftell);
|
||||
//REG_FUNC(0x8BCDCC4E, fwrite);
|
||||
//REG_FUNC(0x4BD5212E, getc);
|
||||
//REG_FUNC(0x4790BF1E, getchar);
|
||||
//REG_FUNC(0xF97B8CA3, gets);
|
||||
//REG_FUNC(0x4696E7BE, perror);
|
||||
REG_FUNC(0x9a004680, printf);
|
||||
//REG_FUNC(0x995708A6, putc);
|
||||
//REG_FUNC(0x7CDAC89C, putchar);
|
||||
//REG_FUNC(0x59C3E171, puts);
|
||||
//REG_FUNC(0x40293B75, remove);
|
||||
//REG_FUNC(0x6FE983A3, rename);
|
||||
//REG_FUNC(0x6CA5BAB9, rewind);
|
||||
//REG_FUNC(0x9CB9D899, scanf);
|
||||
//REG_FUNC(0x395490DA, setbuf);
|
||||
//REG_FUNC(0x2CA980A0, setvbuf);
|
||||
//REG_FUNC(0xA1BFF606, snprintf);
|
||||
REG_FUNC(0x7449B359, sprintf);
|
||||
//REG_FUNC(0xEC585241, sscanf);
|
||||
//REG_FUNC(0x2BCB3F01, ungetc);
|
||||
//REG_FUNC(0xF7915685, vfprintf);
|
||||
//REG_FUNC(0xF137771A, vfscanf);
|
||||
//REG_FUNC(0xE7B5E23E, vprintf);
|
||||
//REG_FUNC(0x0E9BD318, vscanf);
|
||||
//REG_FUNC(0xFE83F2E4, vsnprintf);
|
||||
//REG_FUNC(0x802FDDF9, vsprintf);
|
||||
//REG_FUNC(0xA9889307, vsscanf);
|
||||
//REG_FUNC(0x20FE0FFF, abort);
|
||||
//REG_FUNC(0x8E5A06C5, abs);
|
||||
//REG_FUNC(0xD500DE27, atof);
|
||||
//REG_FUNC(0x21493BE7, atoi);
|
||||
//REG_FUNC(0xA1DBEE9F, atol);
|
||||
//REG_FUNC(0x875994F3, atoll);
|
||||
//REG_FUNC(0xD1BC28E7, bsearch);
|
||||
//REG_FUNC(0xE9F823C0, div);
|
||||
REG_FUNC(0x826bbbaf, exit);
|
||||
//REG_FUNC(0xB53B345B, _Exit);
|
||||
//REG_FUNC(0xBCEA304B, labs);
|
||||
//REG_FUNC(0x9D2D17CD, llabs);
|
||||
//REG_FUNC(0xD63330DA, ldiv);
|
||||
//REG_FUNC(0x3F887699, lldiv);
|
||||
//REG_FUNC(0x3E347849, mblen);
|
||||
//REG_FUNC(0x2F75CF9B, mbstowcs);
|
||||
//REG_FUNC(0xD791A952, mbtowc);
|
||||
//REG_FUNC(0xA7CBE4A6, qsort);
|
||||
//REG_FUNC(0x6CA88B08, strtod);
|
||||
//REG_FUNC(0x6CB8540E, strtof);
|
||||
//REG_FUNC(0x181827ED, strtol);
|
||||
//REG_FUNC(0x48C684B2, strtold);
|
||||
//REG_FUNC(0x39B7E681, strtoll);
|
||||
//REG_FUNC(0xF34AE312, strtoul);
|
||||
//REG_FUNC(0xE0E12333, strtoull);
|
||||
//REG_FUNC(0x9A8F7FC0, wcstombs);
|
||||
//REG_FUNC(0x6489B5E4, wctomb);
|
||||
//REG_FUNC(0xC0883865, rand);
|
||||
//REG_FUNC(0x3AAD41B0, srand);
|
||||
//REG_FUNC(0x962097AA, rand_r);
|
||||
//REG_FUNC(0x775A0CB2, malloc);
|
||||
//REG_FUNC(0xE7EC3D0B, calloc);
|
||||
//REG_FUNC(0x006B54BA, realloc);
|
||||
//REG_FUNC(0x5B9BB802, free);
|
||||
//REG_FUNC(0xA9363E6B, memalign);
|
||||
//REG_FUNC(0x608AC135, reallocalign);
|
||||
//REG_FUNC(0x57A729DB, malloc_stats);
|
||||
//REG_FUNC(0xB3D29DE1, malloc_stats_fast);
|
||||
//REG_FUNC(0x54A54EB1, malloc_usable_size);
|
||||
//REG_FUNC(0x2F3E5B16, memchr);
|
||||
//REG_FUNC(0x7747F6D7, memcmp);
|
||||
REG_FUNC(0x7205BFDB, memcpy);
|
||||
//REG_FUNC(0xAF5C218D, memmove);
|
||||
REG_FUNC(0x6DC1F0D8, memset);
|
||||
//REG_FUNC(0x1434FA46, strcat);
|
||||
//REG_FUNC(0xB9336E16, strchr);
|
||||
//REG_FUNC(0x1B58FA3B, strcmp);
|
||||
//REG_FUNC(0x46AE2311, strcoll);
|
||||
//REG_FUNC(0x85B924B7, strcpy);
|
||||
//REG_FUNC(0x0E29D27A, strcspn);
|
||||
//REG_FUNC(0x1E9D6335, strerror);
|
||||
//REG_FUNC(0x8AECC873, strlen);
|
||||
//REG_FUNC(0xFBA69BC2, strncat);
|
||||
//REG_FUNC(0xE4299DCB, strncmp);
|
||||
//REG_FUNC(0x9F87712D, strncpy);
|
||||
//REG_FUNC(0x68C307B6, strpbrk);
|
||||
//REG_FUNC(0xCEFDD143, strrchr);
|
||||
//REG_FUNC(0x4203B663, strspn);
|
||||
//REG_FUNC(0x0D5200CB, strstr);
|
||||
//REG_FUNC(0x0289B8B3, strtok);
|
||||
//REG_FUNC(0x4D023DE9, strxfrm);
|
||||
//REG_FUNC(0xEB31926D, strtok_r);
|
||||
//REG_FUNC(0xFF6F77C7, strdup);
|
||||
//REG_FUNC(0x184C4B07, strcasecmp);
|
||||
//REG_FUNC(0xAF1CA2F1, strncasecmp);
|
||||
//REG_FUNC(0xC94AE948, asctime);
|
||||
//REG_FUNC(0xC082CA03, clock);
|
||||
//REG_FUNC(0x1EA1CA8D, ctime);
|
||||
//REG_FUNC(0x33AD70A0, difftime);
|
||||
//REG_FUNC(0xF283CFE3, gmtime);
|
||||
//REG_FUNC(0xF4A2E0BF, localtime);
|
||||
//REG_FUNC(0xD1A2DFC3, mktime);
|
||||
//REG_FUNC(0xEEB76FED, strftime);
|
||||
//REG_FUNC(0xDAE8D60F, time);
|
||||
//REG_FUNC(0xEFB3BC61, btowc);
|
||||
//REG_FUNC(0x1D1DA5AD, _Btowc);
|
||||
//REG_FUNC(0x89541CA5, fgetwc);
|
||||
//REG_FUNC(0x982AFA4D, fgetws);
|
||||
//REG_FUNC(0xA597CDC8, fputwc);
|
||||
//REG_FUNC(0xB755927C, fputws);
|
||||
//REG_FUNC(0xA77327D2, fwide);
|
||||
//REG_FUNC(0xE52278E8, fwprintf);
|
||||
//REG_FUNC(0x7BFC75C6, fwscanf);
|
||||
//REG_FUNC(0x23E0F442, getwc);
|
||||
//REG_FUNC(0x55DB4E32, getwchar);
|
||||
//REG_FUNC(0x1927CAE8, mbrlen);
|
||||
//REG_FUNC(0x910664C3, mbrtowc);
|
||||
//REG_FUNC(0x961D12F8, mbsinit);
|
||||
//REG_FUNC(0x9C14D58E, mbsrtowcs);
|
||||
//REG_FUNC(0x247C71A6, putwc);
|
||||
//REG_FUNC(0x3E04AB1C, putwchar);
|
||||
//REG_FUNC(0x1B581BEB, swprintf);
|
||||
//REG_FUNC(0xE1D2AE42, swscanf);
|
||||
//REG_FUNC(0x39334D9C, ungetwc);
|
||||
//REG_FUNC(0x36BF1E06, vfwprintf);
|
||||
//REG_FUNC(0x37A563BE, vfwscanf);
|
||||
//REG_FUNC(0x572DAB57, vswprintf);
|
||||
//REG_FUNC(0x9451EE20, vswscanf);
|
||||
//REG_FUNC(0x0A451B11, vwprintf);
|
||||
//REG_FUNC(0xAD0C43DC, vwscanf);
|
||||
//REG_FUNC(0xD9FF289D, wcrtomb);
|
||||
//REG_FUNC(0x2F990FF9, wcscat);
|
||||
//REG_FUNC(0xC1587971, wcschr);
|
||||
//REG_FUNC(0xF42128B9, wcscmp);
|
||||
//REG_FUNC(0x8EC70609, wcscoll);
|
||||
//REG_FUNC(0x8AAADD56, wcscpy);
|
||||
//REG_FUNC(0x25F7E46A, wcscspn);
|
||||
//REG_FUNC(0x74136BC1, wcsftime);
|
||||
//REG_FUNC(0xA778A14B, wcslen);
|
||||
//REG_FUNC(0x196AB9F2, wcsncat);
|
||||
//REG_FUNC(0xAAA6AAA2, wcsncmp);
|
||||
//REG_FUNC(0x62E9B2D5, wcsncpy);
|
||||
//REG_FUNC(0x07F229DB, wcspbrk);
|
||||
//REG_FUNC(0xDF806521, wcsrchr);
|
||||
//REG_FUNC(0xD8889FC8, wcsrtombs);
|
||||
//REG_FUNC(0x5F5AA692, wcsspn);
|
||||
//REG_FUNC(0x5BE328EE, wcsstr);
|
||||
//REG_FUNC(0x35D7F1B1, wcstod);
|
||||
//REG_FUNC(0x322243A8, _WStod);
|
||||
//REG_FUNC(0x64123137, wcstof);
|
||||
//REG_FUNC(0x340AF0F7, _WStof);
|
||||
//REG_FUNC(0xA17C24A3, wcstok);
|
||||
//REG_FUNC(0xFBEB657E, wcstol);
|
||||
//REG_FUNC(0x2D7C3A7A, wcstold);
|
||||
//REG_FUNC(0x1EDA8F09, _WStold);
|
||||
//REG_FUNC(0x6EEFB7D7, wcstoll);
|
||||
//REG_FUNC(0xACF13D54, wcstoul);
|
||||
//REG_FUNC(0x87C94271, _WStoul);
|
||||
//REG_FUNC(0xCBFF8200, wcstoull);
|
||||
//REG_FUNC(0xF6069AFD, wcsxfrm);
|
||||
//REG_FUNC(0x704321CC, wctob);
|
||||
//REG_FUNC(0x2F0C81A6, _Wctob);
|
||||
//REG_FUNC(0x7A08BE70, wmemchr);
|
||||
//REG_FUNC(0x9864C99F, wmemcmp);
|
||||
//REG_FUNC(0xD9F9DDCD, wmemcpy);
|
||||
//REG_FUNC(0x53F7EB4B, wmemmove);
|
||||
//REG_FUNC(0x4D04A480, wmemset);
|
||||
//REG_FUNC(0xBF2F5FCE, wprintf);
|
||||
//REG_FUNC(0xADC32204, wscanf);
|
||||
//REG_FUNC(0x7E811AF2, iswalnum);
|
||||
//REG_FUNC(0xC5ECB7B6, iswalpha);
|
||||
//REG_FUNC(0xC8FC4BBE, iswblank);
|
||||
//REG_FUNC(0xC30AE3C7, iswcntrl);
|
||||
//REG_FUNC(0x9E348712, iswctype);
|
||||
//REG_FUNC(0xC37DB2C2, iswdigit);
|
||||
//REG_FUNC(0x70632234, iswgraph);
|
||||
//REG_FUNC(0x40F84B7D, iswlower);
|
||||
//REG_FUNC(0xF52F9241, iswprint);
|
||||
//REG_FUNC(0x3922B91A, iswpunct);
|
||||
//REG_FUNC(0x2BDA4905, iswspace);
|
||||
//REG_FUNC(0x9939E1AD, iswupper);
|
||||
//REG_FUNC(0x82FCEFA4, iswxdigit);
|
||||
//REG_FUNC(0x09C38DE4, towlower);
|
||||
//REG_FUNC(0xCF77D465, towctrans);
|
||||
//REG_FUNC(0xCACE34B9, towupper);
|
||||
//REG_FUNC(0xE8270951, wctrans);
|
||||
//REG_FUNC(0xA967B88D, wctype);
|
||||
//REG_FUNC(0x9D885076, _Towctrans);
|
||||
//REG_FUNC(0xE980110A, _Iswctype);
|
||||
REG_FUNC(0x33b83b70, __cxa_atexit);
|
||||
REG_FUNC(0xEDC939E1, __aeabi_atexit);
|
||||
//REG_FUNC(0xB538BF48, __cxa_finalize);
|
||||
//REG_FUNC(0xD0310E31, __cxa_guard_acquire);
|
||||
//REG_FUNC(0x4ED1056F, __cxa_guard_release);
|
||||
//REG_FUNC(0xD18E461D, __cxa_guard_abort);
|
||||
REG_FUNC(0xbfe02b3a, __cxa_set_dso_handle_main);
|
||||
//REG_FUNC(0x64DA2C47, _Unlocksyslock);
|
||||
//REG_FUNC(0x7DBC0575, _Locksyslock);
|
||||
//REG_FUNC(0x5044FC32, _Lockfilelock);
|
||||
//REG_FUNC(0xFD5DD98C, _Unlockfilelock);
|
||||
//REG_FUNC(0x1EFFBAC2, __set_exidx_main);
|
||||
//REG_FUNC(0x855FC605, _Files);
|
||||
//REG_FUNC(0x66B7406C, _Stdin);
|
||||
//REG_FUNC(0x5D8C1282, _Stdout);
|
||||
//REG_FUNC(0xDDF9BB09, _Stderr);
|
||||
//REG_FUNC(0x3CE6109D, _Ctype);
|
||||
//REG_FUNC(0x36878958, _Touptab);
|
||||
//REG_FUNC(0xD662E07C, _Tolotab);
|
||||
//REG_FUNC(0xE5620A03, _Flt);
|
||||
//REG_FUNC(0x338FE545, _Dbl);
|
||||
//REG_FUNC(0x94CE931C, _Ldbl);
|
||||
//REG_FUNC(0xF708906E, _Denorm);
|
||||
//REG_FUNC(0x01B05132, _FDenorm);
|
||||
//REG_FUNC(0x2C8DBEB7, _LDenorm);
|
||||
//REG_FUNC(0x710B5F33, _Inf);
|
||||
//REG_FUNC(0x8A0F308C, _FInf);
|
||||
//REG_FUNC(0x5289BBC0, _LInf);
|
||||
//REG_FUNC(0x116F3DA9, _Nan);
|
||||
//REG_FUNC(0x415162DD, _FNan);
|
||||
//REG_FUNC(0x036D0F07, _LNan);
|
||||
//REG_FUNC(0x677CDE35, _Snan);
|
||||
//REG_FUNC(0x7D35108B, _FSnan);
|
||||
//REG_FUNC(0x48AEEF2A, _LSnan);
|
||||
});
|
@ -1,3 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
using atexit_func_t = void(vm::ptr<void>);
|
@ -1,216 +0,0 @@
|
||||
#include "stdafx.h"
|
||||
#include "Emu/System.h"
|
||||
#include "Emu/PSP2/ARMv7Module.h"
|
||||
|
||||
#include "sceLibm.h"
|
||||
|
||||
logs::channel sceLibm("sceLibm");
|
||||
|
||||
namespace sce_libm_func
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
#define REG_FUNC(nid, name) REG_FNID(SceLibm, nid, sce_libm_func::name)
|
||||
|
||||
DECLARE(arm_module_manager::SceLibm)("SceLibm", []()
|
||||
{
|
||||
//REG_FUNC(0xC73FE76D, _Exp);
|
||||
//REG_FUNC(0xFF4EAE04, _FExp);
|
||||
//REG_FUNC(0xB363D7D4, _LExp);
|
||||
//REG_FUNC(0xD72B5ACB, acos);
|
||||
//REG_FUNC(0x27EAB8C1, acosf);
|
||||
//REG_FUNC(0x1C053D0F, acosh);
|
||||
//REG_FUNC(0x568ECFB0, acoshf);
|
||||
//REG_FUNC(0xD3D6D36E, acoshl);
|
||||
//REG_FUNC(0x3210F395, acosl);
|
||||
//REG_FUNC(0x4016B2E6, asin);
|
||||
//REG_FUNC(0x3A3E5424, asinf);
|
||||
//REG_FUNC(0x7C93F1DD, asinh);
|
||||
//REG_FUNC(0x285AEDEA, asinhf);
|
||||
//REG_FUNC(0x9496E15E, asinhl);
|
||||
//REG_FUNC(0x1724A81D, asinl);
|
||||
//REG_FUNC(0x516D9970, atan);
|
||||
//REG_FUNC(0xC9BE3F05, atan2);
|
||||
//REG_FUNC(0x4E09DD53, atan2f);
|
||||
//REG_FUNC(0xCE325597, atan2l);
|
||||
//REG_FUNC(0xD78FC94E, atanf);
|
||||
//REG_FUNC(0x434BCE01, atanh);
|
||||
//REG_FUNC(0xC7B0AFBA, atanhf);
|
||||
//REG_FUNC(0x6A6881A6, atanhl);
|
||||
//REG_FUNC(0xD423A4AB, atanl);
|
||||
//REG_FUNC(0xACC0DC5A, cbrt);
|
||||
//REG_FUNC(0xD1699F4D, cbrtf);
|
||||
//REG_FUNC(0x342F9501, cbrtl);
|
||||
//REG_FUNC(0x63F05BD6, ceil);
|
||||
//REG_FUNC(0x6BBFEC89, ceilf);
|
||||
//REG_FUNC(0x48082D81, ceill);
|
||||
//REG_FUNC(0x0B918D13, copysign);
|
||||
//REG_FUNC(0x16EB9E63, copysignf);
|
||||
//REG_FUNC(0x19DFC0AA, copysignl);
|
||||
//REG_FUNC(0x061D0244, cos);
|
||||
//REG_FUNC(0x127F8302, cosf);
|
||||
//REG_FUNC(0x89B9BE1F, cosl);
|
||||
//REG_FUNC(0x110195E7, cosh);
|
||||
//REG_FUNC(0x61DE0770, coshf);
|
||||
//REG_FUNC(0x7EADDC5E, coshl);
|
||||
//REG_FUNC(0x4B84C012, _Cosh);
|
||||
//REG_FUNC(0x15993458, erf);
|
||||
//REG_FUNC(0x524AEBFE, erfc);
|
||||
//REG_FUNC(0x0301F113, erfcf);
|
||||
//REG_FUNC(0xD4C92471, erfcl);
|
||||
//REG_FUNC(0x41DD1AB8, erff);
|
||||
//REG_FUNC(0xFD431619, erfl);
|
||||
//REG_FUNC(0xEB027358, exp);
|
||||
//REG_FUNC(0x9B18F38F, exp2);
|
||||
//REG_FUNC(0x79415BD3, exp2f);
|
||||
//REG_FUNC(0x40053307, exp2l);
|
||||
//REG_FUNC(0x56473BC7, expf);
|
||||
//REG_FUNC(0xA71A81AA, expl);
|
||||
//REG_FUNC(0x2A97A75F, expm1);
|
||||
//REG_FUNC(0x64131D7B, expm1f);
|
||||
//REG_FUNC(0x8BF1866C, expm1l);
|
||||
//REG_FUNC(0x3E672BE3, fabs);
|
||||
//REG_FUNC(0x75348906, fabsf);
|
||||
//REG_FUNC(0x03ECA514, fabsl);
|
||||
//REG_FUNC(0xA278B20D, _FCosh);
|
||||
//REG_FUNC(0xD6FD5A2E, fdim);
|
||||
//REG_FUNC(0x8B6CC137, fdimf);
|
||||
//REG_FUNC(0xE6988B7B, fdiml);
|
||||
//REG_FUNC(0xD5BD8D5C, _FLog);
|
||||
//REG_FUNC(0x22BB8237, floor);
|
||||
//REG_FUNC(0xCD7C05BD, floorf);
|
||||
//REG_FUNC(0xFDFA4558, floorl);
|
||||
//REG_FUNC(0x1EACA585, fma);
|
||||
//REG_FUNC(0xB61672A7, fmaf);
|
||||
//REG_FUNC(0xBCF6EA7C, fmal);
|
||||
//REG_FUNC(0xBE30CC1E, fmax);
|
||||
//REG_FUNC(0x7004FA75, fmaxf);
|
||||
//REG_FUNC(0xBF5AF69E, fmaxl);
|
||||
//REG_FUNC(0x2ABBDFF7, fmin);
|
||||
//REG_FUNC(0x7673CC1E, fminf);
|
||||
//REG_FUNC(0xE2F5A0F0, fminl);
|
||||
//REG_FUNC(0x798587E4, fmod);
|
||||
//REG_FUNC(0x1CD8F88E, fmodf);
|
||||
//REG_FUNC(0x986011B4, fmodl);
|
||||
//REG_FUNC(0x59197427, frexp);
|
||||
//REG_FUNC(0x0A6879AC, frexpf);
|
||||
//REG_FUNC(0x6DC8D877, frexpl);
|
||||
//REG_FUNC(0x4A496BC0, _FSin);
|
||||
//REG_FUNC(0x7FBB4C55, _FSinh);
|
||||
//REG_FUNC(0x2D2CD795, hypot);
|
||||
//REG_FUNC(0xA397B929, hypotf);
|
||||
//REG_FUNC(0x05BFBEE8, hypotl);
|
||||
//REG_FUNC(0x667EE864, ilogb);
|
||||
//REG_FUNC(0x80050A43, ilogbf);
|
||||
//REG_FUNC(0x91298DCA, ilogbl);
|
||||
//REG_FUNC(0x0197C9D5, _LCosh);
|
||||
//REG_FUNC(0x0056061B, ldexp);
|
||||
//REG_FUNC(0x0E61E016, ldexpf);
|
||||
//REG_FUNC(0x8280A7B1, ldexpl);
|
||||
//REG_FUNC(0x2480AA54, lgamma);
|
||||
//REG_FUNC(0x2D9556D5, lgammaf);
|
||||
//REG_FUNC(0xADEBD201, lgammal);
|
||||
//REG_FUNC(0x5B05329D, _LLog);
|
||||
//REG_FUNC(0x7B41AC38, llrint);
|
||||
//REG_FUNC(0xC1F6135B, llrintf);
|
||||
//REG_FUNC(0x80558247, llrintl);
|
||||
//REG_FUNC(0xD1251A18, llround);
|
||||
//REG_FUNC(0x04595A04, llroundf);
|
||||
//REG_FUNC(0x9AB5C7AF, llroundl);
|
||||
//REG_FUNC(0x6037C48F, log);
|
||||
//REG_FUNC(0x811ED68B, logf);
|
||||
//REG_FUNC(0xC6FFBCD6, logl);
|
||||
//REG_FUNC(0x67E99979, _Log);
|
||||
//REG_FUNC(0x2CBE04D7, log1p);
|
||||
//REG_FUNC(0xF1D7C851, log1pf);
|
||||
//REG_FUNC(0x3359152C, log1pl);
|
||||
//REG_FUNC(0xCF65F098, log10);
|
||||
//REG_FUNC(0xFD2A3464, log10f);
|
||||
//REG_FUNC(0x3D7E7201, log10l);
|
||||
//REG_FUNC(0x73AFEE5F, log2);
|
||||
//REG_FUNC(0x4095DBDB, log2f);
|
||||
//REG_FUNC(0x720021A9, log2l);
|
||||
//REG_FUNC(0x5EAE8AD4, logb);
|
||||
//REG_FUNC(0x025F51CE, logbf);
|
||||
//REG_FUNC(0x86C4B75F, logbl);
|
||||
//REG_FUNC(0x207307D0, lrint);
|
||||
//REG_FUNC(0xDA903135, lrintf);
|
||||
//REG_FUNC(0xE8C1F6F8, lrintl);
|
||||
//REG_FUNC(0xD35AFD56, lround);
|
||||
//REG_FUNC(0xA24C6453, lroundf);
|
||||
//REG_FUNC(0x8B3ACA4E, lroundl);
|
||||
//REG_FUNC(0xB397FE83, _LSin);
|
||||
//REG_FUNC(0xF247EE99, _LSinh);
|
||||
//REG_FUNC(0x1167B5D2, modf);
|
||||
//REG_FUNC(0x5D7A7EB2, modff);
|
||||
//REG_FUNC(0xD41D68F2, modfl);
|
||||
//REG_FUNC(0xC3FCA1FA, nan);
|
||||
//REG_FUNC(0xB4761D24, nanf);
|
||||
//REG_FUNC(0xBFA96D93, nanl);
|
||||
//REG_FUNC(0x877187C4, nearbyint);
|
||||
//REG_FUNC(0xD56E78F6, nearbyintf);
|
||||
//REG_FUNC(0x8DD794DC, nearbyintl);
|
||||
//REG_FUNC(0xE1A3D449, nextafter);
|
||||
//REG_FUNC(0xC8A94A33, nextafterf);
|
||||
//REG_FUNC(0xEAAB2055, nextafterl);
|
||||
//REG_FUNC(0x39E605E6, nexttoward);
|
||||
//REG_FUNC(0xDD652D4E, nexttowardf);
|
||||
//REG_FUNC(0x41E6AEA4, nexttowardl);
|
||||
//REG_FUNC(0x640DB443, pow);
|
||||
//REG_FUNC(0x6DEA815A, powf);
|
||||
//REG_FUNC(0x96328F3D, powl);
|
||||
//REG_FUNC(0xE4D6117F, remainder);
|
||||
//REG_FUNC(0xE6BB3DCF, remainderf);
|
||||
//REG_FUNC(0x354E568E, remainderl);
|
||||
//REG_FUNC(0x52337926, remquo);
|
||||
//REG_FUNC(0xD8F6B5D3, remquof);
|
||||
//REG_FUNC(0xBB353F24, remquol);
|
||||
//REG_FUNC(0x943F218F, rint);
|
||||
//REG_FUNC(0xCACE5A19, rintf);
|
||||
//REG_FUNC(0xE3C097E0, rintl);
|
||||
//REG_FUNC(0x64D37996, round);
|
||||
//REG_FUNC(0xAAF31896, roundf);
|
||||
//REG_FUNC(0x9AB1B1B1, roundl);
|
||||
//REG_FUNC(0x8F8CF628, scalbln);
|
||||
//REG_FUNC(0xDEB0A2D0, scalblnf);
|
||||
//REG_FUNC(0x2113921E, scalblnl);
|
||||
//REG_FUNC(0x569758D0, scalbn);
|
||||
//REG_FUNC(0x78F70588, scalbnf);
|
||||
//REG_FUNC(0x777C7463, scalbnl);
|
||||
//REG_FUNC(0xB5519FF0, sin);
|
||||
//REG_FUNC(0x7F00B590, sinf);
|
||||
//REG_FUNC(0x3294447C, sinl);
|
||||
//REG_FUNC(0xD92A7F85, _Sin);
|
||||
//REG_FUNC(0xF2C0AF49, sinh);
|
||||
//REG_FUNC(0xB5838E7D, sinhf);
|
||||
//REG_FUNC(0x4B91F2E6, sinhl);
|
||||
//REG_FUNC(0x40E42E8E, _Sinh);
|
||||
//REG_FUNC(0xDA227FCC, sqrt);
|
||||
//REG_FUNC(0xBA3F6937, sqrtf);
|
||||
//REG_FUNC(0xC1343477, sqrtl);
|
||||
//REG_FUNC(0x5BAE40B0, tan);
|
||||
//REG_FUNC(0xA98E941B, tanf);
|
||||
//REG_FUNC(0x26CD78CA, tanh);
|
||||
//REG_FUNC(0xC4847578, tanhf);
|
||||
//REG_FUNC(0x14F2BEA1, tanhl);
|
||||
//REG_FUNC(0xDC742A5E, tanl);
|
||||
//REG_FUNC(0x3A7FE686, tgamma);
|
||||
//REG_FUNC(0xE6067AC0, tgammaf);
|
||||
//REG_FUNC(0x2949109F, tgammal);
|
||||
//REG_FUNC(0x0212323E, trunc);
|
||||
//REG_FUNC(0x090B899F, truncf);
|
||||
//REG_FUNC(0xBC0F1B1A, truncl);
|
||||
//REG_FUNC(0x98BBDAE0, _Dclass);
|
||||
//REG_FUNC(0xBD8EF217, _FDclass);
|
||||
//REG_FUNC(0x314CCE54, _LDclass);
|
||||
//REG_FUNC(0xC5B9C8D8, _FDtest);
|
||||
//REG_FUNC(0x27A55170, _Dtest);
|
||||
//REG_FUNC(0x8DAE8767, _LDtest);
|
||||
//REG_FUNC(0x622CBFEE, _Fpcomp);
|
||||
//REG_FUNC(0x9CD4CEFE, _FFpcomp);
|
||||
//REG_FUNC(0x18F43CD0, _LFpcomp);
|
||||
//REG_FUNC(0x5BD0F71C, _Dsign);
|
||||
//REG_FUNC(0xC4F7E42C, _FDsign);
|
||||
//REG_FUNC(0x1DF73D2B, _LDsign);
|
||||
});
|
@ -1 +0,0 @@
|
||||
#pragma once
|
File diff suppressed because it is too large
Load Diff
@ -1 +0,0 @@
|
||||
#pragma once
|
@ -1,25 +0,0 @@
|
||||
#include "stdafx.h"
|
||||
#include "Emu/System.h"
|
||||
#include "Emu/PSP2/ARMv7Module.h"
|
||||
|
||||
#include "sceLiveArea.h"
|
||||
|
||||
logs::channel sceLiveArea("sceLiveArea");
|
||||
|
||||
s32 sceLiveAreaResourceReplaceAll(vm::cptr<char> dirpath)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceLiveAreaResourceGetStatus()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
#define REG_FUNC(nid, name) REG_FNID(SceLiveArea, nid, name)
|
||||
|
||||
DECLARE(arm_module_manager::SceLiveArea)("SceLiveArea", []()
|
||||
{
|
||||
REG_FUNC(0xA4B506F9, sceLiveAreaResourceReplaceAll);
|
||||
REG_FUNC(0x54A395FB, sceLiveAreaResourceGetStatus);
|
||||
});
|
@ -1 +0,0 @@
|
||||
#pragma once
|
@ -1,118 +0,0 @@
|
||||
#include "stdafx.h"
|
||||
#include "Emu/System.h"
|
||||
#include "Emu/PSP2/ARMv7Module.h"
|
||||
|
||||
#include "sceLocation.h"
|
||||
|
||||
logs::channel sceLocation("sceLocation");
|
||||
|
||||
s32 sceLocationOpen(vm::ptr<u8> handle, SceLocationLocationMethod lmethod, SceLocationHeadingMethod hmethod)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceLocationClose(u8 handle)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceLocationReopen(u8 handle, SceLocationLocationMethod lmethod, SceLocationHeadingMethod hmethod)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceLocationGetMethod(u8 handle, vm::ptr<s32> lmethod, vm::ptr<s32> hmethod)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceLocationGetLocation(u8 handle, vm::ptr<SceLocationLocationInfo> linfo)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceLocationCancelGetLocation(u8 handle)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceLocationStartLocationCallback(u8 handle, u32 distance, vm::ptr<SceLocationLocationInfoCallback> callback, vm::ptr<void> userdata)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceLocationStopLocationCallback(u8 handle)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceLocationGetHeading(u8 handle, vm::ptr<SceLocationHeadingInfo> hinfo)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceLocationStartHeadingCallback(u8 handle, u32 difference, vm::ptr<SceLocationHeadingInfoCallback> callback, vm::ptr<void> userdata)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceLocationStopHeadingCallback(u8 handle)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceLocationConfirm(u8 handle)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceLocationConfirmGetStatus(u8 handle, vm::ptr<s32> status)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceLocationConfirmGetResult(u8 handle, vm::ptr<s32> result)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceLocationConfirmAbort(u8 handle)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceLocationGetPermission(u8 handle, vm::ptr<SceLocationPermissionInfo> info)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceLocationSetGpsEmulationFile(vm::ptr<char> filename)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
|
||||
#define REG_FUNC(nid, name) REG_FNID(SceLibLocation, nid, name)
|
||||
|
||||
DECLARE(arm_module_manager::SceLocation)("SceLibLocation", []()
|
||||
{
|
||||
REG_FUNC(0xDD271661, sceLocationOpen);
|
||||
REG_FUNC(0x14FE76E8, sceLocationClose);
|
||||
REG_FUNC(0xB1F55065, sceLocationReopen);
|
||||
REG_FUNC(0x188CE004, sceLocationGetMethod);
|
||||
REG_FUNC(0x15BC27C8, sceLocationGetLocation);
|
||||
REG_FUNC(0x71503251, sceLocationCancelGetLocation);
|
||||
REG_FUNC(0x12D1F0EA, sceLocationStartLocationCallback);
|
||||
REG_FUNC(0xED378700, sceLocationStopLocationCallback);
|
||||
REG_FUNC(0x4E9E5ED9, sceLocationGetHeading);
|
||||
REG_FUNC(0x07D4DFE0, sceLocationStartHeadingCallback);
|
||||
REG_FUNC(0x92E53F94, sceLocationStopHeadingCallback);
|
||||
//REG_FUNC(0xE055BCF5, sceLocationSetHeapAllocator);
|
||||
REG_FUNC(0xC895E567, sceLocationConfirm);
|
||||
REG_FUNC(0x730FF842, sceLocationConfirmGetStatus);
|
||||
REG_FUNC(0xFF016C13, sceLocationConfirmGetResult);
|
||||
REG_FUNC(0xE3CBF875, sceLocationConfirmAbort);
|
||||
REG_FUNC(0x482622C6, sceLocationGetPermission);
|
||||
REG_FUNC(0xDE0A9EA4, sceLocationSetGpsEmulationFile);
|
||||
//REG_FUNC(0x760D08FF, sceLocationConfirmSetMessage);
|
||||
});
|
@ -1,81 +0,0 @@
|
||||
#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 = void(s32 result, u8 handle, vm::cptr<SceLocationLocationInfo> location, vm::ptr<void> userdata);
|
||||
using SceLocationHeadingInfoCallback = void(s32 result, u8 handle, vm::cptr<SceLocationHeadingInfo> heading, vm::ptr<void> userdata);
|
||||
|
||||
struct SceLocationPermissionInfo
|
||||
{
|
||||
SceLocationPermissionStatus parentalstatus;
|
||||
SceLocationPermissionStatus mainstatus;
|
||||
SceLocationPermissionApplicationStatus applicationstatus;
|
||||
};
|
@ -1,37 +0,0 @@
|
||||
#include "stdafx.h"
|
||||
#include "Emu/System.h"
|
||||
#include "Emu/PSP2/ARMv7Module.h"
|
||||
|
||||
#include "sceMd5.h"
|
||||
|
||||
logs::channel sceMd5("sceMd5");
|
||||
|
||||
s32 sceMd5Digest(vm::cptr<void> plain, u32 len, vm::ptr<u8> digest)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceMd5BlockInit(vm::ptr<SceMd5Context> pContext)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceMd5BlockUpdate(vm::ptr<SceMd5Context> pContext, vm::cptr<void> plain, u32 len)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceMd5BlockResult(vm::ptr<SceMd5Context> pContext, vm::ptr<u8> digest)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
#define REG_FUNC(nid, name) REG_FNID(SceMd5, nid, name)
|
||||
|
||||
DECLARE(arm_module_manager::SceMd5)("SceMd5", []()
|
||||
{
|
||||
REG_FUNC(0xB845BCCB, sceMd5Digest);
|
||||
REG_FUNC(0x4D6436F9, sceMd5BlockInit);
|
||||
REG_FUNC(0x094A4902, sceMd5BlockUpdate);
|
||||
REG_FUNC(0xB94ABF83, sceMd5BlockResult);
|
||||
});
|
@ -1,12 +0,0 @@
|
||||
#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];
|
||||
};
|
@ -1,109 +0,0 @@
|
||||
#include "stdafx.h"
|
||||
#include "Emu/System.h"
|
||||
#include "Emu/PSP2/ARMv7Module.h"
|
||||
|
||||
#include "sceMotion.h"
|
||||
|
||||
logs::channel sceMotion("sceMotion");
|
||||
|
||||
s32 sceMotionGetState(vm::ptr<SceMotionState> motionState)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceMotionGetSensorState(vm::ptr<SceMotionSensorState> sensorState, s32 numRecords)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceMotionGetBasicOrientation(vm::ptr<SceFVector3> basicOrientation)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceMotionRotateYaw(const float radians)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceMotionGetTiltCorrection()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceMotionSetTiltCorrection(s32 setValue)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceMotionGetDeadband()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceMotionSetDeadband(s32 setValue)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceMotionSetAngleThreshold(const float angle)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
float sceMotionGetAngleThreshold()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceMotionReset()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceMotionMagnetometerOn()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceMotionMagnetometerOff()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceMotionGetMagnetometerState()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceMotionStartSampling()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceMotionStopSampling()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
#define REG_FUNC(nid, name) REG_FNID(SceMotion, nid, name)
|
||||
|
||||
DECLARE(arm_module_manager::SceMotion)("SceMotion", []()
|
||||
{
|
||||
REG_FUNC(0xBDB32767, sceMotionGetState);
|
||||
REG_FUNC(0x47D679EA, sceMotionGetSensorState);
|
||||
REG_FUNC(0xC1652201, sceMotionGetTiltCorrection);
|
||||
REG_FUNC(0xAF09FCDB, sceMotionSetTiltCorrection);
|
||||
REG_FUNC(0x112E0EAE, sceMotionGetDeadband);
|
||||
REG_FUNC(0x917EA390, sceMotionSetDeadband);
|
||||
//REG_FUNC(0x20F00078, sceMotionRotateYaw);
|
||||
REG_FUNC(0x0FD2CDA2, sceMotionReset);
|
||||
REG_FUNC(0x28034AC9, sceMotionStartSampling);
|
||||
REG_FUNC(0xAF32CB1D, sceMotionStopSampling);
|
||||
//REG_FUNC(0xDACB2A41, sceMotionSetAngleThreshold);
|
||||
//REG_FUNC(0x499B6C87, sceMotionGetAngleThreshold);
|
||||
REG_FUNC(0x4F28BFE0, sceMotionGetBasicOrientation);
|
||||
REG_FUNC(0x122A79F8, sceMotionMagnetometerOn);
|
||||
REG_FUNC(0xC1A7395A, sceMotionMagnetometerOff);
|
||||
REG_FUNC(0x3D4813AE, sceMotionGetMagnetometerState);
|
||||
});
|
@ -1,30 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include "Common.h"
|
||||
|
||||
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];
|
||||
};
|
@ -1,26 +0,0 @@
|
||||
#include "stdafx.h"
|
||||
#include "Emu/System.h"
|
||||
#include "Emu/PSP2/ARMv7Module.h"
|
||||
|
||||
#include "sceMt19937.h"
|
||||
|
||||
logs::channel sceMt19937("sceMt19937");
|
||||
|
||||
s32 sceMt19937Init(vm::ptr<SceMt19937Context> pCtx, u32 seed)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
u32 sceMt19937UInt(vm::ptr<SceMt19937Context> pCtx)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
|
||||
#define REG_FUNC(nid, name) REG_FNID(SceMt19937, nid, name)
|
||||
|
||||
DECLARE(arm_module_manager::SceMt19937)("SceMt19937", []()
|
||||
{
|
||||
REG_FUNC(0xEE5BA27C, sceMt19937Init);
|
||||
REG_FUNC(0x29E43BB5, sceMt19937UInt);
|
||||
});
|
@ -1,7 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
struct SceMt19937Context
|
||||
{
|
||||
le_t<u32> count;
|
||||
le_t<u32> state[624];
|
||||
};
|
@ -1,362 +0,0 @@
|
||||
#include "stdafx.h"
|
||||
#include "Emu/System.h"
|
||||
#include "Emu/PSP2/ARMv7Module.h"
|
||||
|
||||
#include "sceNet.h"
|
||||
|
||||
logs::channel sceNet("sceNet");
|
||||
|
||||
s32 sceNetSetDnsInfo(vm::ptr<SceNetDnsInfo> info, s32 flags)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNetClearDnsCache(s32 flags)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNetDumpCreate(vm::cptr<char> name, s32 len, s32 flags)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNetDumpRead(s32 id, vm::ptr<void> buf, s32 len, vm::ptr<s32> pflags)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNetDumpDestroy(s32 id)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNetDumpAbort(s32 id, s32 flags)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNetEpollCreate(vm::cptr<char> name, s32 flags)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNetEpollControl(s32 eid, s32 op, s32 id, vm::ptr<SceNetEpollEvent> event)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNetEpollWait(s32 eid, vm::ptr<SceNetEpollEvent> events, s32 maxevents, s32 timeout)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNetEpollWaitCB(s32 eid, vm::ptr<SceNetEpollEvent> events, s32 maxevents, s32 timeout)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNetEpollDestroy(s32 eid)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNetEpollAbort(s32 eid, s32 flags)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
vm::ptr<s32> sceNetErrnoLoc()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNetEtherStrton(vm::cptr<char> str, vm::ptr<SceNetEtherAddr> n)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNetEtherNtostr(vm::cptr<SceNetEtherAddr> n, vm::ptr<char> str, u32 len)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNetGetMacAddress(vm::ptr<SceNetEtherAddr> addr, s32 flags)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
vm::cptr<char> sceNetInetNtop(s32 af, vm::cptr<void> src, vm::ptr<char> dst, SceNetSocklen_t size)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNetInetPton(s32 af, vm::cptr<char> src, vm::ptr<void> dst)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
u64 sceNetHtonll(u64 host64)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
u32 sceNetHtonl(u32 host32)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
u16 sceNetHtons(u16 host16)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
u64 sceNetNtohll(u64 net64)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
u32 sceNetNtohl(u32 net32)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
u16 sceNetNtohs(u16 net16)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNetInit(vm::ptr<SceNetInitParam> param)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNetTerm()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNetShowIfconfig()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNetShowRoute()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNetShowNetstat()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNetEmulationSet(vm::ptr<SceNetEmulationParam> param, s32 flags)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNetEmulationGet(vm::ptr<SceNetEmulationParam> param, s32 flags)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNetResolverCreate(vm::cptr<char> name, vm::ptr<SceNetResolverParam> param, s32 flags)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNetResolverStartNtoa(s32 rid, vm::cptr<char> hostname, vm::ptr<SceNetInAddr> addr, s32 timeout, s32 retry, s32 flags)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNetResolverStartAton(s32 rid, vm::cptr<SceNetInAddr> addr, vm::ptr<char> hostname, s32 len, s32 timeout, s32 retry, s32 flags)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNetResolverGetError(s32 rid, vm::ptr<s32> result)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNetResolverDestroy(s32 rid)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNetResolverAbort(s32 rid, s32 flags)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNetSocket(vm::cptr<char> name, s32 domain, s32 type, s32 protocol)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNetAccept(s32 s, vm::ptr<SceNetSockaddr> addr, vm::ptr<SceNetSocklen_t> addrlen)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNetBind(s32 s, vm::cptr<SceNetSockaddr> addr, SceNetSocklen_t addrlen)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNetConnect(s32 s, vm::cptr<SceNetSockaddr> name, SceNetSocklen_t namelen)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNetGetpeername(s32 s, vm::ptr<SceNetSockaddr> name, vm::ptr<SceNetSocklen_t> namelen)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNetGetsockname(s32 s, vm::ptr<SceNetSockaddr> name, vm::ptr<SceNetSocklen_t> namelen)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNetGetsockopt(s32 s, s32 level, s32 optname, vm::ptr<void> optval, vm::ptr<SceNetSocklen_t> optlen)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNetListen(s32 s, s32 backlog)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNetRecv(s32 s, vm::ptr<void> buf, u32 len, s32 flags)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNetRecvfrom(s32 s, vm::ptr<void> buf, u32 len, s32 flags, vm::ptr<SceNetSockaddr> from, vm::ptr<SceNetSocklen_t> fromlen)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNetRecvmsg(s32 s, vm::ptr<SceNetMsghdr> msg, s32 flags)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNetSend(s32 s, vm::cptr<void> msg, u32 len, s32 flags)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNetSendto(s32 s, vm::cptr<void> msg, u32 len, s32 flags, vm::cptr<SceNetSockaddr> to, SceNetSocklen_t tolen)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNetSendmsg(s32 s, vm::cptr<SceNetMsghdr> msg, s32 flags)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNetSetsockopt(s32 s, s32 level, s32 optname, vm::cptr<void> optval, SceNetSocklen_t optlen)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNetShutdown(s32 s, s32 how)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNetSocketClose(s32 s)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNetSocketAbort(s32 s, s32 flags)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNetGetSockInfo(s32 s, vm::ptr<SceNetSockInfo> info, s32 n, s32 flags)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNetGetSockIdInfo(vm::ptr<SceNetFdSet> fds, s32 sockinfoflags, s32 flags)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNetGetStatisticsInfo(vm::ptr<SceNetStatisticsInfo> info, s32 flags)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
|
||||
#define REG_FUNC(nid, name) REG_FNID(SceNet, nid, name)
|
||||
|
||||
DECLARE(arm_module_manager::SceNet)("SceNet", []()
|
||||
{
|
||||
REG_FUNC(0xD62EF218, sceNetSetDnsInfo);
|
||||
REG_FUNC(0xFEC1166D, sceNetClearDnsCache);
|
||||
REG_FUNC(0xAFF9FA4D, sceNetDumpCreate);
|
||||
REG_FUNC(0x04042925, sceNetDumpRead);
|
||||
REG_FUNC(0x82DDCF63, sceNetDumpDestroy);
|
||||
REG_FUNC(0x3B24E75F, sceNetDumpAbort);
|
||||
REG_FUNC(0xF9D102AE, sceNetEpollCreate);
|
||||
REG_FUNC(0x4C8764AC, sceNetEpollControl);
|
||||
REG_FUNC(0x45CE337D, sceNetEpollWait);
|
||||
REG_FUNC(0x92D3E767, sceNetEpollWaitCB);
|
||||
REG_FUNC(0x7915CAF3, sceNetEpollDestroy);
|
||||
REG_FUNC(0x93FCC4E8, sceNetEpollAbort);
|
||||
REG_FUNC(0xE37F34AA, sceNetErrnoLoc);
|
||||
REG_FUNC(0xEEC6D75F, sceNetEtherStrton);
|
||||
REG_FUNC(0x84334EB2, sceNetEtherNtostr);
|
||||
REG_FUNC(0x06C05518, sceNetGetMacAddress);
|
||||
REG_FUNC(0x98839B74, sceNetInetNtop);
|
||||
REG_FUNC(0xD5EEB048, sceNetInetPton);
|
||||
REG_FUNC(0x12C19209, sceNetHtonll);
|
||||
REG_FUNC(0x4C30B03C, sceNetHtonl);
|
||||
REG_FUNC(0x9FA3207B, sceNetHtons);
|
||||
REG_FUNC(0xFB3336A6, sceNetNtohll);
|
||||
REG_FUNC(0xD2EAA645, sceNetNtohl);
|
||||
REG_FUNC(0x07845128, sceNetNtohs);
|
||||
REG_FUNC(0xEB03E265, sceNetInit);
|
||||
REG_FUNC(0xEA3CC286, sceNetTerm);
|
||||
REG_FUNC(0x658B903B, sceNetShowIfconfig);
|
||||
REG_FUNC(0x6AB3B74B, sceNetShowRoute);
|
||||
REG_FUNC(0x338EDC2E, sceNetShowNetstat);
|
||||
REG_FUNC(0x561DFD03, sceNetEmulationSet);
|
||||
REG_FUNC(0xAE3F4AC6, sceNetEmulationGet);
|
||||
REG_FUNC(0x6DA29319, sceNetResolverCreate);
|
||||
REG_FUNC(0x1EB11857, sceNetResolverStartNtoa);
|
||||
REG_FUNC(0x0424AE26, sceNetResolverStartAton);
|
||||
REG_FUNC(0x874EF500, sceNetResolverGetError);
|
||||
REG_FUNC(0x3559F098, sceNetResolverDestroy);
|
||||
REG_FUNC(0x38EBBD57, sceNetResolverAbort);
|
||||
REG_FUNC(0xF084FCE3, sceNetSocket);
|
||||
REG_FUNC(0x1ADF9BB1, sceNetAccept);
|
||||
REG_FUNC(0x1296A94B, sceNetBind);
|
||||
REG_FUNC(0x11E5B6F6, sceNetConnect);
|
||||
REG_FUNC(0x2348D353, sceNetGetpeername);
|
||||
REG_FUNC(0x1C66A6DB, sceNetGetsockname);
|
||||
REG_FUNC(0xBA652062, sceNetGetsockopt);
|
||||
REG_FUNC(0x7A8DA094, sceNetListen);
|
||||
REG_FUNC(0x023643B7, sceNetRecv);
|
||||
REG_FUNC(0xB226138B, sceNetRecvfrom);
|
||||
REG_FUNC(0xDE94C6FE, sceNetRecvmsg);
|
||||
REG_FUNC(0xE3DD8CD9, sceNetSend);
|
||||
REG_FUNC(0x52DB31D5, sceNetSendto);
|
||||
REG_FUNC(0x99C579AE, sceNetSendmsg);
|
||||
REG_FUNC(0x065505CA, sceNetSetsockopt);
|
||||
REG_FUNC(0x69E50BB5, sceNetShutdown);
|
||||
REG_FUNC(0x29822B4D, sceNetSocketClose);
|
||||
REG_FUNC(0x891C1B9B, sceNetSocketAbort);
|
||||
REG_FUNC(0xB1AF6840, sceNetGetSockInfo);
|
||||
REG_FUNC(0x138CF1D6, sceNetGetSockIdInfo);
|
||||
REG_FUNC(0xA86F8FE5, sceNetGetStatisticsInfo);
|
||||
});
|
@ -1,180 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
typedef u32 SceNetSocklen_t;
|
||||
|
||||
struct SceNetInAddr
|
||||
{
|
||||
le_t<u32> s_addr;
|
||||
};
|
||||
|
||||
struct SceNetSockaddrIn
|
||||
{
|
||||
u8 sin_len;
|
||||
u8 sin_family;
|
||||
le_t<u16> sin_port;
|
||||
SceNetInAddr sin_addr;
|
||||
le_t<u16> sin_vport;
|
||||
char sin_zero[6];
|
||||
};
|
||||
|
||||
struct SceNetDnsInfo
|
||||
{
|
||||
SceNetInAddr dns_addr[2];
|
||||
};
|
||||
|
||||
struct SceNetSockaddr
|
||||
{
|
||||
u8 sa_len;
|
||||
u8 sa_family;
|
||||
char sa_data[14];
|
||||
};
|
||||
|
||||
struct SceNetEpollDataExt
|
||||
{
|
||||
le_t<s32> id;
|
||||
le_t<u32> data;
|
||||
};
|
||||
|
||||
union SceNetEpollData
|
||||
{
|
||||
vm::lptr<void> ptr;
|
||||
le_t<s32> fd;
|
||||
le_t<u32> _u32;
|
||||
le_t<u64> _u64;
|
||||
SceNetEpollDataExt ext;
|
||||
};
|
||||
|
||||
struct SceNetEpollSystemData
|
||||
{
|
||||
le_t<u32> system[4];
|
||||
};
|
||||
|
||||
struct SceNetEpollEvent
|
||||
{
|
||||
le_t<u32> events;
|
||||
le_t<u32> reserved;
|
||||
SceNetEpollSystemData system;
|
||||
SceNetEpollData data;
|
||||
};
|
||||
|
||||
struct SceNetEtherAddr
|
||||
{
|
||||
u8 data[6];
|
||||
};
|
||||
|
||||
typedef u32 SceNetIdMask;
|
||||
|
||||
struct SceNetFdSet
|
||||
{
|
||||
SceNetIdMask bits[32];
|
||||
};
|
||||
|
||||
struct SceNetIpMreq
|
||||
{
|
||||
SceNetInAddr imr_multiaddr;
|
||||
SceNetInAddr imr_interface;
|
||||
};
|
||||
|
||||
struct SceNetInitParam
|
||||
{
|
||||
vm::lptr<void> memory;
|
||||
le_t<s32> size;
|
||||
le_t<s32> flags;
|
||||
};
|
||||
|
||||
struct SceNetEmulationData
|
||||
{
|
||||
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
|
||||
{
|
||||
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;
|
||||
le_t<u32> seed;
|
||||
u8 reserved[44];
|
||||
};
|
||||
|
||||
using SceNetResolverFunctionAllocate = vm::ptr<void>(u32 size, s32 rid, vm::cptr<char> name, vm::ptr<void> user);
|
||||
using SceNetResolverFunctionFree = void(vm::ptr<void> ptr, s32 rid, vm::cptr<char> name, vm::ptr<void> user);
|
||||
|
||||
struct SceNetResolverParam
|
||||
{
|
||||
vm::lptr<SceNetResolverFunctionAllocate> allocate;
|
||||
vm::lptr<SceNetResolverFunctionFree> free;
|
||||
vm::lptr<void> user;
|
||||
};
|
||||
|
||||
struct SceNetLinger
|
||||
{
|
||||
le_t<s32> l_onoff;
|
||||
le_t<s32> l_linger;
|
||||
};
|
||||
|
||||
struct SceNetIovec
|
||||
{
|
||||
vm::lptr<void> iov_base;
|
||||
le_t<u32> iov_len;
|
||||
};
|
||||
|
||||
struct SceNetMsghdr
|
||||
{
|
||||
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];
|
||||
le_t<s32> pid;
|
||||
le_t<s32> s;
|
||||
s8 socket_type;
|
||||
s8 policy;
|
||||
le_t<s16> reserved16;
|
||||
le_t<s32> recv_queue_length;
|
||||
le_t<s32> send_queue_length;
|
||||
SceNetInAddr local_adr;
|
||||
SceNetInAddr remote_adr;
|
||||
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
|
||||
{
|
||||
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;
|
||||
};
|
@ -1,109 +0,0 @@
|
||||
#include "stdafx.h"
|
||||
#include "Emu/System.h"
|
||||
#include "Emu/PSP2/ARMv7Module.h"
|
||||
|
||||
#include "sceNetCtl.h"
|
||||
|
||||
logs::channel sceNetCtl("sceNetCtl");
|
||||
|
||||
s32 sceNetCtlInit()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
void sceNetCtlTerm()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNetCtlCheckCallback()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNetCtlInetGetResult(s32 eventType, vm::ptr<s32> errorCode)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNetCtlAdhocGetResult(s32 eventType, vm::ptr<s32> errorCode)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNetCtlInetGetInfo(s32 code, vm::ptr<SceNetCtlInfo> info)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNetCtlInetGetState(vm::ptr<s32> state)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNetCtlGetNatInfo(vm::ptr<SceNetCtlNatInfo> natinfo)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNetCtlInetRegisterCallback(vm::ptr<SceNetCtlCallback> func, vm::ptr<void> arg, vm::ptr<s32> cid)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNetCtlInetUnregisterCallback(s32 cid)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNetCtlAdhocRegisterCallback(vm::ptr<SceNetCtlCallback> func, vm::ptr<void> arg, vm::ptr<s32> cid)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNetCtlAdhocUnregisterCallback(s32 cid)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNetCtlAdhocGetState(vm::ptr<s32> state)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNetCtlAdhocDisconnect()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNetCtlAdhocGetPeerList(vm::ptr<u32> buflen, vm::ptr<void> buf)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNetCtlAdhocGetInAddr(vm::ptr<SceNetInAddr> inaddr)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
#define REG_FUNC(nid, name) REG_FNID(SceNetCtl, nid, name)
|
||||
|
||||
DECLARE(arm_module_manager::SceNetCtl)("SceNetCtl", []()
|
||||
{
|
||||
REG_FUNC(0x495CA1DB, sceNetCtlInit);
|
||||
REG_FUNC(0xCD188648, sceNetCtlTerm);
|
||||
REG_FUNC(0xDFFC3ED4, sceNetCtlCheckCallback);
|
||||
REG_FUNC(0x6B20EC02, sceNetCtlInetGetResult);
|
||||
REG_FUNC(0x7AE0ED19, sceNetCtlAdhocGetResult);
|
||||
REG_FUNC(0xB26D07F3, sceNetCtlInetGetInfo);
|
||||
REG_FUNC(0x6D26AC68, sceNetCtlInetGetState);
|
||||
REG_FUNC(0xEAEE6185, sceNetCtlInetRegisterCallback);
|
||||
REG_FUNC(0xD0C3BF3F, sceNetCtlInetUnregisterCallback);
|
||||
REG_FUNC(0x4DDD6149, sceNetCtlGetNatInfo);
|
||||
REG_FUNC(0x0961A561, sceNetCtlAdhocGetState);
|
||||
REG_FUNC(0xFFA9D594, sceNetCtlAdhocRegisterCallback);
|
||||
REG_FUNC(0xA4471E10, sceNetCtlAdhocUnregisterCallback);
|
||||
REG_FUNC(0xED43B79A, sceNetCtlAdhocDisconnect);
|
||||
REG_FUNC(0x77586C59, sceNetCtlAdhocGetPeerList);
|
||||
REG_FUNC(0x7118C99D, sceNetCtlAdhocGetInAddr);
|
||||
});
|
@ -1,45 +0,0 @@
|
||||
#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 = void(s32 event_type, vm::ptr<void> arg);
|
@ -1,392 +0,0 @@
|
||||
#include "stdafx.h"
|
||||
#include "Emu/System.h"
|
||||
#include "Emu/PSP2/ARMv7Module.h"
|
||||
|
||||
#include "sceNgs.h"
|
||||
|
||||
logs::channel sceNgs("sceNgs");
|
||||
|
||||
s32 sceNgsSystemGetRequiredMemorySize(vm::cptr<SceNgsSystemInitParams> pSynthParams, vm::ptr<u32> pnSize)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNgsSystemInit(vm::ptr<void> pSynthSysMemory, const u32 uMemSize, vm::cptr<SceNgsSystemInitParams> pSynthParams, vm::ptr<SceNgsHSynSystem> pSystemHandle)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNgsSystemUpdate(SceNgsHSynSystem hSystemHandle)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNgsSystemRelease(SceNgsHSynSystem hSystemHandle)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNgsSystemLock(SceNgsHSynSystem hSystemHandle)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNgsSystemUnlock(SceNgsHSynSystem hSystemHandle)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNgsSystemSetParamErrorCallback(SceNgsHSynSystem hSystemHandle, vm::ptr<SceNgsCallbackFunc> callbackFuncPtr)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNgsSystemSetFlags(SceNgsHSynSystem hSystemHandle, const u32 uSystemFlags)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNgsRackGetRequiredMemorySize(SceNgsHSynSystem hSystemHandle, vm::cptr<SceNgsRackDescription> pRackDesc, vm::ptr<u32> pnSize)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNgsRackInit(SceNgsHSynSystem hSystemHandle, vm::ptr<SceNgsBufferInfo> pRackBuffer, vm::cptr<SceNgsRackDescription> pRackDesc, vm::ptr<SceNgsHRack> pRackHandle)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNgsRackGetVoiceHandle(SceNgsHRack hRackHandle, const u32 uIndex, vm::ptr<SceNgsHVoice> pVoiceHandle)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNgsRackRelease(SceNgsHRack hRackHandle, vm::ptr<SceNgsCallbackFunc> callbackFuncPtr)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNgsRackSetParamErrorCallback(SceNgsHRack hRackHandle, vm::ptr<SceNgsCallbackFunc> callbackFuncPtr)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNgsVoiceInit(SceNgsHVoice hVoiceHandle, vm::cptr<SceNgsVoicePreset> pPreset, const u32 uInitFlags)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNgsVoicePlay(SceNgsHVoice hVoiceHandle)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNgsVoiceKeyOff(SceNgsHVoice hVoiceHandle)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNgsVoiceKill(SceNgsHVoice hVoiceHandle)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNgsVoicePause(SceNgsHVoice hVoiceHandle)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNgsVoiceResume(SceNgsHVoice hVoiceHandle)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNgsVoiceSetPreset(SceNgsHVoice hVoiceHandle, vm::cptr<SceNgsVoicePreset> pVoicePreset)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNgsVoiceLockParams(SceNgsHVoice hVoiceHandle, const u32 uModule, const u32 uParamsInterfaceId, vm::ptr<SceNgsBufferInfo> pParamsBuffer)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNgsVoiceUnlockParams(SceNgsHVoice hVoiceHandle, const u32 uModule)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNgsVoiceSetParamsBlock(SceNgsHVoice hVoiceHandle, vm::cptr<SceNgsModuleParamHeader> pParamData, const u32 uSize, vm::ptr<s32> pnErrorCount)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNgsVoiceBypassModule(SceNgsHVoice hVoiceHandle, const u32 uModule, const u32 uBypassFlag)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNgsVoiceSetModuleCallback(SceNgsHVoice hVoiceHandle, const u32 uModule, vm::ptr<SceNgsCallbackFunc> callbackFuncPtr, vm::ptr<void> pUserData)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNgsVoiceSetFinishedCallback(SceNgsHVoice hVoiceHandle, vm::ptr<SceNgsCallbackFunc> callbackFuncPtr, vm::ptr<void> pUserData)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNgsVoiceGetStateData(SceNgsHVoice hVoiceHandle, const u32 uModule, vm::ptr<void> pMem, const u32 uMemSize)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNgsVoiceGetInfo(SceNgsHVoice hVoiceHandle, vm::ptr<SceNgsVoiceInfo> pInfo)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNgsVoiceGetModuleType(SceNgsHVoice hVoiceHandle, const u32 uModule, vm::ptr<u32> pModuleType)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNgsVoiceGetModuleBypass(SceNgsHVoice hVoiceHandle, const u32 uModule, vm::ptr<u32> puBypassFlag)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNgsVoiceGetParamsOutOfRange(SceNgsHVoice hVoiceHandle, const u32 uModule, vm::ptr<char> pszMessageBuffer)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNgsPatchCreateRouting(vm::cptr<SceNgsPatchSetupInfo> pPatchInfo, vm::ptr<SceNgsHPatch> pPatchHandle)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNgsPatchGetInfo(SceNgsHPatch hPatchHandle, vm::ptr<SceNgsPatchRouteInfo> pRouteInfo, vm::ptr<SceNgsPatchSetupInfo> pSetup)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNgsVoiceGetOutputPatch(SceNgsHVoice hVoiceHandle, const s32 nOutputIndex, const s32 nSubIndex, vm::ptr<SceNgsHPatch> pPatchHandle)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNgsPatchRemoveRouting(SceNgsHPatch hPatchHandle)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNgsVoicePatchSetVolume(SceNgsHPatch hPatchHandle, const s32 nOutputChannel, const s32 nInputChannel, const float fVol)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNgsVoicePatchSetVolumes(SceNgsHPatch hPatchHandle, const s32 nOutputChannel, vm::cptr<float> pVolumes, const s32 nVols)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNgsVoicePatchSetVolumesMatrix(SceNgsHPatch hPatchHandle, vm::cptr<SceNgsVolumeMatrix> pMatrix)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNgsModuleGetNumPresets(SceNgsHSynSystem hSystemHandle, const u32 uModuleID, vm::ptr<u32> puNumPresets)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNgsModuleGetPreset(SceNgsHSynSystem hSystemHandle, const u32 uModuleID, const u32 uPresetIndex, vm::ptr<SceNgsBufferInfo> pParamsBuffer)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
vm::cptr<SceNgsVoiceDefinition> sceNgsVoiceDefGetCompressorBuss()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
vm::cptr<SceNgsVoiceDefinition> sceNgsVoiceDefGetCompressorSideChainBuss()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
vm::cptr<SceNgsVoiceDefinition> sceNgsVoiceDefGetDelayBuss()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
vm::cptr<SceNgsVoiceDefinition> sceNgsVoiceDefGetDistortionBuss()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
vm::cptr<SceNgsVoiceDefinition> sceNgsVoiceDefGetEnvelopeBuss()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
vm::cptr<SceNgsVoiceDefinition> sceNgsVoiceDefGetEqBuss()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
vm::cptr<SceNgsVoiceDefinition> sceNgsVoiceDefGetMasterBuss()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
vm::cptr<SceNgsVoiceDefinition> sceNgsVoiceDefGetMixerBuss()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
vm::cptr<SceNgsVoiceDefinition> sceNgsVoiceDefGetPauserBuss()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
vm::cptr<SceNgsVoiceDefinition> sceNgsVoiceDefGetReverbBuss()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
vm::cptr<SceNgsVoiceDefinition> sceNgsVoiceDefGetSasEmuVoice()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
vm::cptr<SceNgsVoiceDefinition> sceNgsVoiceDefGetSimpleVoice()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
vm::cptr<SceNgsVoiceDefinition> sceNgsVoiceDefGetTemplate1()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
vm::cptr<SceNgsVoiceDefinition> sceNgsVoiceDefGetAtrac9Voice()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceSulphaNgsGetDefaultConfig(vm::ptr<SceSulphaNgsConfig> config)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceSulphaNgsGetNeededMemory(vm::cptr<SceSulphaNgsConfig> config, vm::ptr<u32> sizeInBytes)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceSulphaNgsInit(vm::cptr<SceSulphaNgsConfig> config, vm::ptr<void> buffer, u32 sizeInBytes)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceSulphaNgsShutdown()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceSulphaNgsSetSynthName(SceNgsHSynSystem synthHandle, vm::cptr<char> name)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceSulphaNgsSetRackName(SceNgsHRack rackHandle, vm::cptr<char> name)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceSulphaNgsSetVoiceName(SceNgsHVoice voiceHandle, vm::cptr<char> name)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceSulphaNgsSetSampleName(vm::cptr<void> location, u32 length, vm::cptr<char> name)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceSulphaNgsTrace(vm::cptr<char> message)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
|
||||
#define REG_FUNC(nid, name) REG_FNID(SceNgs, nid, name)
|
||||
|
||||
DECLARE(arm_module_manager::SceNgs)("SceNgs", []()
|
||||
{
|
||||
REG_FUNC(0x6CE8B36F, sceNgsSystemGetRequiredMemorySize);
|
||||
REG_FUNC(0xED14CF4A, sceNgsSystemInit);
|
||||
REG_FUNC(0x684F080C, sceNgsSystemUpdate);
|
||||
REG_FUNC(0x4A25BEBC, sceNgsSystemRelease);
|
||||
REG_FUNC(0xB9D971F2, sceNgsSystemLock);
|
||||
REG_FUNC(0x0A93EA96, sceNgsSystemUnlock);
|
||||
REG_FUNC(0x5ADD22DC, sceNgsSystemSetParamErrorCallback);
|
||||
REG_FUNC(0x64D80013, sceNgsSystemSetFlags);
|
||||
REG_FUNC(0x477318C0, sceNgsRackGetRequiredMemorySize);
|
||||
REG_FUNC(0x0A92E4EC, sceNgsRackInit);
|
||||
REG_FUNC(0xFE1A98E9, sceNgsRackGetVoiceHandle);
|
||||
REG_FUNC(0xDD5CA10B, sceNgsRackRelease);
|
||||
REG_FUNC(0x534B6E3F, sceNgsRackSetParamErrorCallback);
|
||||
REG_FUNC(0x1DDBEBEB, sceNgsVoiceInit);
|
||||
REG_FUNC(0xFA0A0F34, sceNgsVoicePlay);
|
||||
REG_FUNC(0xBB13373D, sceNgsVoiceKeyOff);
|
||||
REG_FUNC(0x0E291AAD, sceNgsVoiceKill);
|
||||
REG_FUNC(0xD7786E99, sceNgsVoicePause);
|
||||
REG_FUNC(0x54CFB981, sceNgsVoiceResume);
|
||||
REG_FUNC(0x8A88E665, sceNgsVoiceSetPreset);
|
||||
REG_FUNC(0xAB6BEF8F, sceNgsVoiceLockParams);
|
||||
REG_FUNC(0x3D46D8A7, sceNgsVoiceUnlockParams);
|
||||
REG_FUNC(0xFB8174B1, sceNgsVoiceSetParamsBlock);
|
||||
REG_FUNC(0x9AB87E71, sceNgsVoiceBypassModule);
|
||||
REG_FUNC(0x24E909A8, sceNgsVoiceSetModuleCallback);
|
||||
REG_FUNC(0x17A6F564, sceNgsVoiceSetFinishedCallback);
|
||||
REG_FUNC(0xC9B8C0B4, sceNgsVoiceGetStateData);
|
||||
REG_FUNC(0x5551410D, sceNgsVoiceGetInfo);
|
||||
REG_FUNC(0xB307185E, sceNgsVoiceGetModuleType);
|
||||
REG_FUNC(0x431BF3AB, sceNgsVoiceGetModuleBypass);
|
||||
REG_FUNC(0xD668B49C, sceNgsPatchCreateRouting);
|
||||
REG_FUNC(0x98703DBC, sceNgsPatchGetInfo);
|
||||
REG_FUNC(0x01A52E3A, sceNgsVoiceGetOutputPatch);
|
||||
REG_FUNC(0xD0C9AE5A, sceNgsPatchRemoveRouting);
|
||||
//REG_FUNC(0xA3C807BC, sceNgsVoicePatchSetVolume);
|
||||
REG_FUNC(0xBD6F57F0, sceNgsVoicePatchSetVolumes);
|
||||
REG_FUNC(0xA0F5402D, sceNgsVoicePatchSetVolumesMatrix);
|
||||
REG_FUNC(0xF6B68C31, sceNgsVoiceDefGetEnvelopeBuss);
|
||||
REG_FUNC(0x9DCF50F5, sceNgsVoiceDefGetReverbBuss);
|
||||
REG_FUNC(0x214485D6, sceNgsVoiceDefGetPauserBuss);
|
||||
REG_FUNC(0xE0AC8776, sceNgsVoiceDefGetMixerBuss);
|
||||
REG_FUNC(0x79A121D1, sceNgsVoiceDefGetMasterBuss);
|
||||
REG_FUNC(0x0E0ACB68, sceNgsVoiceDefGetCompressorBuss);
|
||||
REG_FUNC(0x1AF83512, sceNgsVoiceDefGetCompressorSideChainBuss);
|
||||
REG_FUNC(0xAAD90DEB, sceNgsVoiceDefGetDistortionBuss);
|
||||
REG_FUNC(0xF964120E, sceNgsVoiceDefGetEqBuss);
|
||||
REG_FUNC(0xE9B572B7, sceNgsVoiceDefGetTemplate1);
|
||||
REG_FUNC(0x0D5399CF, sceNgsVoiceDefGetSimpleVoice);
|
||||
REG_FUNC(0x1F51C2BA, sceNgsVoiceDefGetSasEmuVoice);
|
||||
REG_FUNC(0x4CBE08F3, sceNgsVoiceGetParamsOutOfRange);
|
||||
REG_FUNC(0x14EF65A0, sceNgsVoiceDefGetAtrac9Voice);
|
||||
REG_FUNC(0x4D705E3E, sceNgsVoiceDefGetDelayBuss);
|
||||
REG_FUNC(0x5FD8AEDB, sceSulphaNgsGetDefaultConfig);
|
||||
REG_FUNC(0x793E3E8C, sceSulphaNgsGetNeededMemory);
|
||||
REG_FUNC(0xAFCD824F, sceSulphaNgsInit);
|
||||
REG_FUNC(0xD124BFB1, sceSulphaNgsShutdown);
|
||||
REG_FUNC(0x2F3F7515, sceSulphaNgsSetSynthName);
|
||||
REG_FUNC(0x251AF6A9, sceSulphaNgsSetRackName);
|
||||
REG_FUNC(0x508975BD, sceSulphaNgsSetVoiceName);
|
||||
REG_FUNC(0x54EC5B8D, sceSulphaNgsSetSampleName);
|
||||
REG_FUNC(0xDC7C0F05, sceSulphaNgsTrace);
|
||||
REG_FUNC(0x5C71FE09, sceNgsModuleGetNumPresets);
|
||||
REG_FUNC(0xC58298A7, sceNgsModuleGetPreset);
|
||||
});
|
@ -1,104 +0,0 @@
|
||||
#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 = void(vm::cptr<SceNgsCallbackInfo> pCallbackInfo);
|
||||
|
||||
struct SceSulphaNgsConfig
|
||||
{
|
||||
le_t<u32> maxNamedObjects;
|
||||
le_t<u32> maxTraceBufferBytes;
|
||||
};
|
@ -1,121 +0,0 @@
|
||||
#include "stdafx.h"
|
||||
#include "Emu/System.h"
|
||||
#include "Emu/PSP2/ARMv7Module.h"
|
||||
|
||||
#include "sceNpBasic.h"
|
||||
|
||||
logs::channel sceNpBasic("sceNpBasic");
|
||||
|
||||
s32 sceNpBasicInit(vm::ptr<void> opt)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNpBasicTerm(ARMv7Thread&)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNpBasicRegisterHandler(vm::cptr<SceNpBasicEventHandlers> handlers, vm::cptr<SceNpCommunicationId> context, vm::ptr<void> userdata)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNpBasicUnregisterHandler(ARMv7Thread&)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNpBasicCheckCallback()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNpBasicGetFriendOnlineStatus(vm::cptr<SceNpId> friendId, vm::ptr<s32> status)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNpBasicGetGamePresenceOfFriend(vm::cptr<SceNpId> friendId, vm::ptr<SceNpBasicGamePresence> presence)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNpBasicGetFriendListEntryCount(vm::ptr<u32> count)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNpBasicGetFriendListEntries(u32 startIndex, vm::ptr<SceNpId> entries, u32 numEntries, vm::ptr<u32> retrieved)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNpBasicGetBlockListEntryCount(vm::ptr<u32> count)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNpBasicGetBlockListEntries(u32 startIndex, vm::ptr<SceNpId> entries, u32 numEntries, vm::ptr<u32> retrieved)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNpBasicCheckIfPlayerIsBlocked(vm::cptr<SceNpId> player, vm::ptr<u8> playerIsBlocked)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNpBasicSetInGamePresence(vm::cptr<SceNpBasicInGamePresence> presence)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNpBasicUnsetInGamePresence()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNpBasicSendInGameDataMessage(vm::cptr<SceNpId> to, vm::cptr<SceNpBasicInGameDataMessage> message)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNpBasicRecordPlaySessionLog(vm::cptr<SceNpId> withWhom, vm::cptr<SceNpBasicPlaySessionLogDescription> description)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNpBasicGetPlaySessionLogSize(SceNpBasicPlaySessionLogType type, vm::ptr<u32> size)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNpBasicGetPlaySessionLog(SceNpBasicPlaySessionLogType type, u32 index, vm::ptr<SceNpBasicPlaySessionLog> log)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
#define REG_FUNC(nid, name) REG_FNID(SceNpBasic, nid, name)
|
||||
|
||||
DECLARE(arm_module_manager::SceNpBasic)("SceNpBasic", []()
|
||||
{
|
||||
REG_FUNC(0xEFB91A99, sceNpBasicInit);
|
||||
REG_FUNC(0x389BCB3B, sceNpBasicTerm);
|
||||
REG_FUNC(0x26E6E048, sceNpBasicRegisterHandler);
|
||||
REG_FUNC(0x050AE072, sceNpBasicUnregisterHandler);
|
||||
REG_FUNC(0x20146AEC, sceNpBasicCheckCallback);
|
||||
REG_FUNC(0x5183A4B5, sceNpBasicGetFriendOnlineStatus);
|
||||
REG_FUNC(0xEF8A91BC, sceNpBasicGetGamePresenceOfFriend);
|
||||
REG_FUNC(0xDF41F308, sceNpBasicGetFriendListEntryCount);
|
||||
REG_FUNC(0xFF07E787, sceNpBasicGetFriendListEntries);
|
||||
REG_FUNC(0x407E1E6F, sceNpBasicGetBlockListEntryCount);
|
||||
REG_FUNC(0x1211AE8E, sceNpBasicGetBlockListEntries);
|
||||
REG_FUNC(0xF51545D8, sceNpBasicCheckIfPlayerIsBlocked);
|
||||
REG_FUNC(0x51D75562, sceNpBasicSetInGamePresence);
|
||||
REG_FUNC(0xD20C2370, sceNpBasicUnsetInGamePresence);
|
||||
REG_FUNC(0x7A5020A5, sceNpBasicSendInGameDataMessage);
|
||||
REG_FUNC(0x3B0A7F47, sceNpBasicRecordPlaySessionLog);
|
||||
REG_FUNC(0xFB0F7FDF, sceNpBasicGetPlaySessionLogSize);
|
||||
REG_FUNC(0x364531A8, sceNpBasicGetPlaySessionLog);
|
||||
});
|
@ -1,115 +0,0 @@
|
||||
#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 = 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 = 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 = 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 = 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 = 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
|
||||
};
|
@ -1,79 +0,0 @@
|
||||
#include "stdafx.h"
|
||||
#include "Emu/System.h"
|
||||
#include "Emu/PSP2/ARMv7Module.h"
|
||||
|
||||
#include "sceNpCommon.h"
|
||||
|
||||
logs::channel sceNpCommon("sceNpCommon");
|
||||
|
||||
s32 sceNpAuthInit()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNpAuthTerm()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNpAuthCreateStartRequest(vm::cptr<SceNpAuthRequestParameter> param)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNpAuthDestroyRequest(s32 id)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNpAuthAbortRequest(s32 id)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNpAuthGetTicket(s32 id, vm::ptr<void> buf, u32 len)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNpAuthGetTicketParam(vm::cptr<u8> ticket, u32 ticketSize, s32 paramId, vm::ptr<SceNpTicketParam> param)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNpAuthGetEntitlementIdList(vm::cptr<u8> ticket, u32 ticketSize, vm::ptr<SceNpEntitlementId> entIdList, u32 entIdListNum)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNpAuthGetEntitlementById(vm::cptr<u8> ticket, u32 ticketSize, vm::cptr<char> entId, vm::ptr<SceNpEntitlement> ent)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNpCmpNpId(vm::cptr<SceNpId> npid1, vm::cptr<SceNpId> npid2)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNpCmpNpIdInOrder(vm::cptr<SceNpId> npid1, vm::cptr<SceNpId> npid2, vm::ptr<s32> order)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
#define REG_FUNC(nid, name) REG_FNID(SceNpCommon, nid, name)
|
||||
|
||||
DECLARE(arm_module_manager::SceNpCommon)("SceNpCommon", []()
|
||||
{
|
||||
REG_FUNC(0x441D8B4E, sceNpAuthInit);
|
||||
REG_FUNC(0x6093B689, sceNpAuthTerm);
|
||||
REG_FUNC(0xED42079F, sceNpAuthCreateStartRequest);
|
||||
REG_FUNC(0x14FC18AF, sceNpAuthDestroyRequest);
|
||||
REG_FUNC(0xE2582575, sceNpAuthAbortRequest);
|
||||
REG_FUNC(0x59608D1C, sceNpAuthGetTicket);
|
||||
REG_FUNC(0xC1E23E01, sceNpAuthGetTicketParam);
|
||||
REG_FUNC(0x3377CD37, sceNpAuthGetEntitlementIdList);
|
||||
REG_FUNC(0xF93842F0, sceNpAuthGetEntitlementById);
|
||||
REG_FUNC(0xFB8D82E5, sceNpCmpNpId);
|
||||
REG_FUNC(0x6BC8150A, sceNpCmpNpIdInOrder);
|
||||
});
|
@ -1,149 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
enum SceNpServiceState : s32
|
||||
{
|
||||
SCE_NP_SERVICE_STATE_UNKNOWN = 0,
|
||||
SCE_NP_SERVICE_STATE_SIGNED_OUT,
|
||||
SCE_NP_SERVICE_STATE_SIGNED_IN,
|
||||
SCE_NP_SERVICE_STATE_ONLINE
|
||||
};
|
||||
|
||||
struct SceNpCommunicationId
|
||||
{
|
||||
char data[9];
|
||||
char term;
|
||||
u8 num;
|
||||
char dummy;
|
||||
};
|
||||
|
||||
struct SceNpCommunicationPassphrase
|
||||
{
|
||||
u8 data[128];
|
||||
};
|
||||
|
||||
struct SceNpCommunicationSignature
|
||||
{
|
||||
u8 data[160];
|
||||
};
|
||||
|
||||
struct SceNpCommunicationConfig
|
||||
{
|
||||
vm::lcptr<SceNpCommunicationId> commId;
|
||||
vm::lcptr<SceNpCommunicationPassphrase> commPassphrase;
|
||||
vm::lcptr<SceNpCommunicationSignature> commSignature;
|
||||
};
|
||||
|
||||
struct SceNpCountryCode
|
||||
{
|
||||
char data[2];
|
||||
char term;
|
||||
char padding[1];
|
||||
};
|
||||
|
||||
struct SceNpOnlineId
|
||||
{
|
||||
char data[16];
|
||||
char term;
|
||||
char dummy[3];
|
||||
};
|
||||
|
||||
struct SceNpId
|
||||
{
|
||||
SceNpOnlineId handle;
|
||||
u8 opt[8];
|
||||
u8 reserved[8];
|
||||
};
|
||||
|
||||
struct SceNpAvatarUrl
|
||||
{
|
||||
char data[127];
|
||||
char term;
|
||||
};
|
||||
|
||||
struct SceNpUserInformation
|
||||
{
|
||||
SceNpId userId;
|
||||
SceNpAvatarUrl icon;
|
||||
u8 reserved[52];
|
||||
};
|
||||
|
||||
struct SceNpMyLanguages
|
||||
{
|
||||
le_t<s32> language1;
|
||||
le_t<s32> language2;
|
||||
le_t<s32> language3;
|
||||
u8 padding[4];
|
||||
};
|
||||
|
||||
struct SceNpAvatarImage
|
||||
{
|
||||
u8 data[200 * 1024];
|
||||
le_t<u32> size;
|
||||
u8 reserved[12];
|
||||
};
|
||||
|
||||
enum SceNpAvatarSizeType : s32
|
||||
{
|
||||
SCE_NP_AVATAR_SIZE_LARGE,
|
||||
SCE_NP_AVATAR_SIZE_MIDDLE,
|
||||
SCE_NP_AVATAR_SIZE_SMALL
|
||||
};
|
||||
|
||||
struct SceNpAboutMe
|
||||
{
|
||||
char data[64];
|
||||
};
|
||||
|
||||
struct SceNpDate
|
||||
{
|
||||
le_t<u16> year;
|
||||
u8 month;
|
||||
u8 day;
|
||||
};
|
||||
|
||||
union SceNpTicketParam
|
||||
{
|
||||
le_t<s32> _s32;
|
||||
le_t<s64> _s64;
|
||||
le_t<u32> _u32;
|
||||
le_t<u64> _u64;
|
||||
SceNpDate date;
|
||||
u8 data[256];
|
||||
};
|
||||
|
||||
struct SceNpTicketVersion
|
||||
{
|
||||
le_t<u16> major;
|
||||
le_t<u16> minor;
|
||||
};
|
||||
|
||||
using SceNpAuthCallback = s32(s32 id, s32 result, vm::ptr<void> arg);
|
||||
|
||||
struct SceNpAuthRequestParameter
|
||||
{
|
||||
le_t<u32> size;
|
||||
SceNpTicketVersion version;
|
||||
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
|
||||
{
|
||||
u8 data[32];
|
||||
};
|
||||
|
||||
struct SceNpEntitlement
|
||||
{
|
||||
SceNpEntitlementId id;
|
||||
le_t<u64> createdDate;
|
||||
le_t<u64> expireDate;
|
||||
le_t<u32> type;
|
||||
le_t<s32> remainingCount;
|
||||
le_t<u32> consumedCount;
|
||||
char padding[4];
|
||||
};
|
@ -1,73 +0,0 @@
|
||||
#include "stdafx.h"
|
||||
#include "Emu/System.h"
|
||||
#include "Emu/PSP2/ARMv7Module.h"
|
||||
|
||||
#include "sceNpManager.h"
|
||||
|
||||
logs::channel sceNpManager("sceNpManager");
|
||||
|
||||
s32 sceNpInit(vm::cptr<SceNpCommunicationConfig> commConf, vm::ptr<SceNpOptParam> opt)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNpTerm(ARMv7Thread&)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNpCheckCallback()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNpGetServiceState(vm::ptr<s32> state)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNpRegisterServiceStateCallback(vm::ptr<SceNpServiceStateCallback> callback, vm::ptr<void> userdata)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNpUnregisterServiceStateCallback()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNpManagerGetNpId(vm::ptr<SceNpId> npId)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNpManagerGetAccountRegion(vm::ptr<SceNpCountryCode> countryCode, vm::ptr<s32> languageCode)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNpManagerGetContentRatingFlag(vm::ptr<s32> isRestricted, vm::ptr<s32> age)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 sceNpManagerGetChatRestrictionFlag(vm::ptr<s32> isRestricted)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
#define REG_FUNC(nid, name) REG_FNID(SceNpManager, nid, name)
|
||||
|
||||
DECLARE(arm_module_manager::SceNpManager)("SceNpManager", []()
|
||||
{
|
||||
REG_FUNC(0x04D9F484, sceNpInit);
|
||||
REG_FUNC(0x19E40AE1, sceNpTerm);
|
||||
REG_FUNC(0x3C94B4B4, sceNpManagerGetNpId);
|
||||
REG_FUNC(0x54060DF6, sceNpGetServiceState);
|
||||
REG_FUNC(0x44239C35, sceNpRegisterServiceStateCallback);
|
||||
REG_FUNC(0xD9E6E56C, sceNpUnregisterServiceStateCallback);
|
||||
REG_FUNC(0x3B0AE9A9, sceNpCheckCallback);
|
||||
REG_FUNC(0xFE835967, sceNpManagerGetAccountRegion);
|
||||
REG_FUNC(0xAF0073B2, sceNpManagerGetContentRatingFlag);
|
||||
REG_FUNC(0x60C575B1, sceNpManagerGetChatRestrictionFlag);
|
||||
});
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user