mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-20 22:05:12 +00:00
Remove PSP2
This commit is contained in:
parent
13aa88c3c4
commit
76be7d40ac
154 changed files with 63 additions and 33854 deletions
|
|
@ -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>
|
||||
{
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue