diff options
| author | 2014-05-16 23:21:03 -0700 | |
|---|---|---|
| committer | 2014-05-16 23:21:03 -0700 | |
| commit | b8c8d0903ec9be4c7d580464480a0136277be803 (patch) | |
| tree | 9280a9f01e1312d0d8aed493282ae65d2384963c /src/core/hle/coprocessor.cpp | |
| parent | Added FindGLEW to cmake-modules (diff) | |
| parent | Merge pull request #17 from bunnei/arm-vfp (diff) | |
| download | yuzu-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.cpp | 34 |
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 | |||
| 10 | namespace HLE { | ||
| 11 | |||
| 12 | /// Returns the coprocessor (in this case, syscore) command buffer pointer | ||
| 13 | Addr 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 | ||
| 19 | s32 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 | ||