diff options
Diffstat (limited to 'src/core/hle/mrc.cpp')
| -rw-r--r-- | src/core/hle/mrc.cpp | 64 |
1 files changed, 0 insertions, 64 deletions
diff --git a/src/core/hle/mrc.cpp b/src/core/hle/mrc.cpp deleted file mode 100644 index 5223be7c9..000000000 --- a/src/core/hle/mrc.cpp +++ /dev/null | |||
| @@ -1,64 +0,0 @@ | |||
| 1 | // Copyright 2014 Citra Emulator Project | ||
| 2 | // Licensed under GPLv2 | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #include "core/hle/mrc.h" | ||
| 6 | #include "core/hle/hle.h" | ||
| 7 | #include "core/mem_map.h" | ||
| 8 | #include "core/core.h" | ||
| 9 | |||
| 10 | namespace HLE { | ||
| 11 | |||
| 12 | enum { | ||
| 13 | CMD_GX_REQUEST_DMA = 0x00000000, | ||
| 14 | }; | ||
| 15 | |||
| 16 | /// Data synchronization barrier | ||
| 17 | u32 DataSynchronizationBarrier(u32* command_buffer) { | ||
| 18 | u32 command = command_buffer[0]; | ||
| 19 | |||
| 20 | switch (command) { | ||
| 21 | |||
| 22 | case CMD_GX_REQUEST_DMA: | ||
| 23 | { | ||
| 24 | u32* src = (u32*)Memory::GetPointer(command_buffer[1]); | ||
| 25 | u32* dst = (u32*)Memory::GetPointer(command_buffer[2]); | ||
| 26 | u32 size = command_buffer[3]; | ||
| 27 | memcpy(dst, src, size); | ||
| 28 | } | ||
| 29 | break; | ||
| 30 | |||
| 31 | default: | ||
| 32 | ERROR_LOG(OSHLE, "MRC::DataSynchronizationBarrier unknown command 0x%08X", command); | ||
| 33 | return -1; | ||
| 34 | } | ||
| 35 | |||
| 36 | return 0; | ||
| 37 | } | ||
| 38 | |||
| 39 | /// Returns the coprocessor (in this case, syscore) command buffer pointer | ||
| 40 | Addr GetThreadCommandBuffer() { | ||
| 41 | // Called on insruction: mrc p15, 0, r0, c13, c0, 3 | ||
| 42 | // Returns an address in OSHLE memory for the CPU to read/write to | ||
| 43 | RETURN(CMD_BUFFER_ADDR); | ||
| 44 | return CMD_BUFFER_ADDR; | ||
| 45 | } | ||
| 46 | |||
| 47 | /// Call an MRC operation in HLE | ||
| 48 | u32 CallMRC(ARM11_MRC_OPERATION operation) { | ||
| 49 | switch (operation) { | ||
| 50 | |||
| 51 | case DATA_SYNCHRONIZATION_BARRIER: | ||
| 52 | return DataSynchronizationBarrier((u32*)Memory::GetPointer(PARAM(0))); | ||
| 53 | |||
| 54 | case CALL_GET_THREAD_COMMAND_BUFFER: | ||
| 55 | return GetThreadCommandBuffer(); | ||
| 56 | |||
| 57 | default: | ||
| 58 | ERROR_LOG(OSHLE, "unimplemented MRC operation 0x%02X", operation); | ||
| 59 | break; | ||
| 60 | } | ||
| 61 | return -1; | ||
| 62 | } | ||
| 63 | |||
| 64 | } // namespace | ||