summaryrefslogtreecommitdiff
path: root/src/core/hle/coprocessor.cpp
diff options
context:
space:
mode:
authorGravatar archshift2014-05-16 23:21:03 -0700
committerGravatar archshift2014-05-16 23:21:03 -0700
commitb8c8d0903ec9be4c7d580464480a0136277be803 (patch)
tree9280a9f01e1312d0d8aed493282ae65d2384963c /src/core/hle/coprocessor.cpp
parentAdded FindGLEW to cmake-modules (diff)
parentMerge pull request #17 from bunnei/arm-vfp (diff)
downloadyuzu-b8c8d0903ec9be4c7d580464480a0136277be803.tar.gz
yuzu-b8c8d0903ec9be4c7d580464480a0136277be803.tar.xz
yuzu-b8c8d0903ec9be4c7d580464480a0136277be803.zip
Merge remote-tracking branch 'upstream/master' into issue-7-fix
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