From 67f6e414702cbb83a53392e1cca229875a186cea Mon Sep 17 00:00:00 2001 From: bunnei Date: Sun, 13 Apr 2014 00:37:10 -0400 Subject: added a GetPointer function for reading from HLE command buffer --- src/core/hle/hle.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/core/hle/hle.cpp') diff --git a/src/core/hle/hle.cpp b/src/core/hle/hle.cpp index 51432dc87..a4ab61c0c 100644 --- a/src/core/hle/hle.cpp +++ b/src/core/hle/hle.cpp @@ -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: template void Read(u64 &var, const u32 addr); -- cgit v1.2.3