summaryrefslogtreecommitdiff
path: root/src/core/hle/coprocessor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle/coprocessor.cpp')
-rw-r--r--src/core/hle/coprocessor.cpp34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/core/hle/coprocessor.cpp b/src/core/hle/coprocessor.cpp
new file mode 100644
index 000000000..39674ee64
--- /dev/null
+++ b/src/core/hle/coprocessor.cpp
@@ -0,0 +1,34 @@
1// Copyright 2014 Citra Emulator Project
2// Licensed under GPLv2
3// Refer to the license.txt file included.
4
5#include "core/hle/coprocessor.h"
6#include "core/hle/hle.h"
7#include "core/mem_map.h"
8#include "core/core.h"
9
10namespace HLE {
11
12/// Returns the coprocessor (in this case, syscore) command buffer pointer
13Addr GetThreadCommandBuffer() {
14 // Called on insruction: mrc p15, 0, r0, c13, c0, 3
15 return Memory::KERNEL_MEMORY_VADDR;
16}
17
18/// Call an MRC (move to ARM register from coprocessor) instruction in HLE
19s32 CallMRC(u32 instruction) {
20 CoprocessorOperation operation = (CoprocessorOperation)((instruction >> 20) & 0xFF);
21
22 switch (operation) {
23
24 case CALL_GET_THREAD_COMMAND_BUFFER:
25 return GetThreadCommandBuffer();
26
27 default:
28 //DEBUG_LOG(OSHLE, "unknown MRC call 0x%08X", instruction);
29 break;
30 }
31 return -1;
32}
33
34} // namespace