mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-08-23 00:50:42 +02:00
added a GetPointer function for reading from HLE command buffer
This commit is contained in:
parent
f2f63a0f05
commit
67f6e41470
@ -37,6 +37,14 @@ inline void Write(u32 addr, const T data) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
u8 *GetPointer(const u32 addr) {
|
||||||
|
if (addr >= HLE::CMD_BUFFER_ADDR && addr < HLE::CMD_BUFFER_ADDR_END) {
|
||||||
|
return g_command_buffer + (addr & CMD_BUFFER_MASK);
|
||||||
|
} else {
|
||||||
|
ERROR_LOG(HLE, "unknown pointer from address %08X", addr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Explicitly instantiate template functions because we aren't defining this in the header:
|
// Explicitly instantiate template functions because we aren't defining this in the header:
|
||||||
|
|
||||||
template void Read<u64>(u64 &var, const u32 addr);
|
template void Read<u64>(u64 &var, const u32 addr);
|
||||||
|
@ -46,6 +46,12 @@ inline void Read(T &var, const u32 addr);
|
|||||||
template <typename T>
|
template <typename T>
|
||||||
inline void Write(u32 addr, const T data);
|
inline void Write(u32 addr, const T data);
|
||||||
|
|
||||||
|
u8* GetPointer(const u32 Address);
|
||||||
|
|
||||||
|
inline const char* GetCharPointer(const u32 address) {
|
||||||
|
return (const char *)GetPointer(address);
|
||||||
|
}
|
||||||
|
|
||||||
void RegisterModule(std::string name, int num_functions, const FunctionDef *func_table);
|
void RegisterModule(std::string name, int num_functions, const FunctionDef *func_table);
|
||||||
|
|
||||||
void CallSyscall(u32 opcode);
|
void CallSyscall(u32 opcode);
|
||||||
|
Loading…
Reference in New Issue
Block a user