From f0434249150f27d7921a57f70d6af11c12c4e08f Mon Sep 17 00:00:00 2001
From: bunnei
Date: Thu, 1 May 2014 19:20:44 -0400
Subject: renamed hle "mrc" module to "coprocessor"
---
src/core/CMakeLists.txt | 2 +-
src/core/arm/interpreter/armsupp.cpp | 16 ++++-----
src/core/core.vcxproj | 4 +--
src/core/core.vcxproj.filters | 12 +++----
src/core/hle/coprocessor.cpp | 64 ++++++++++++++++++++++++++++++++++++
src/core/hle/coprocessor.h | 20 +++++++++++
src/core/hle/mrc.cpp | 64 ------------------------------------
src/core/hle/mrc.h | 20 -----------
8 files changed, 101 insertions(+), 101 deletions(-)
create mode 100644 src/core/hle/coprocessor.cpp
create mode 100644 src/core/hle/coprocessor.h
delete mode 100644 src/core/hle/mrc.cpp
delete mode 100644 src/core/hle/mrc.h
(limited to 'src')
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
index 3308f3c25..88cbabade 100644
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -19,7 +19,7 @@ set(SRCS core.cpp
file_sys/directory_file_system.cpp
file_sys/meta_file_system.cpp
hle/hle.cpp
- hle/mrc.cpp
+ hle/coprocessor.cpp
hle/syscall.cpp
hle/service/apt.cpp
hle/service/gsp.cpp
diff --git a/src/core/arm/interpreter/armsupp.cpp b/src/core/arm/interpreter/armsupp.cpp
index b2bbedc18..d913c179c 100644
--- a/src/core/arm/interpreter/armsupp.cpp
+++ b/src/core/arm/interpreter/armsupp.cpp
@@ -20,7 +20,7 @@
//#include "ansidecl.h"
#include "skyeye_defs.h"
-#include "core/hle/mrc.h"
+#include "core/hle/coprocessor.h"
#include "core/arm/disassembler/arm_disasm.h"
unsigned xscale_cp15_cp_access_allowed (ARMul_State * state, unsigned reg,
@@ -663,13 +663,13 @@ ARMul_MCR (ARMul_State * state, ARMword instr, ARMword source)
{
unsigned cpab;
- //printf("SKYEYE ARMul_MCR, CPnum is %x, source %x\n",CPNum, source);
- if (!CP_ACCESS_ALLOWED (state, CPNum)) {
- //chy 2004-07-19 should fix in the future ????!!!!
- //printf("SKYEYE ARMul_MCR, ACCESS_not ALLOWed, UndefinedInstr CPnum is %x, source %x\n",CPNum, source);
- ARMul_UndefInstr (state, instr);
- return;
- }
+ ////printf("SKYEYE ARMul_MCR, CPnum is %x, source %x\n",CPNum, source);
+ //if (!CP_ACCESS_ALLOWED (state, CPNum)) {
+ // //chy 2004-07-19 should fix in the future ????!!!!
+ // //printf("SKYEYE ARMul_MCR, ACCESS_not ALLOWed, UndefinedInstr CPnum is %x, source %x\n",CPNum, source);
+ // ARMul_UndefInstr (state, instr);
+ // return;
+ //}
cpab = (state->MCR[CPNum]) (state, ARMul_FIRST, instr, source);
diff --git a/src/core/core.vcxproj b/src/core/core.vcxproj
index a5043ea4b..7b8953327 100644
--- a/src/core/core.vcxproj
+++ b/src/core/core.vcxproj
@@ -153,8 +153,8 @@
+
-
@@ -193,9 +193,9 @@
+
-
diff --git a/src/core/core.vcxproj.filters b/src/core/core.vcxproj.filters
index 9c53f9eff..fabe253ed 100644
--- a/src/core/core.vcxproj.filters
+++ b/src/core/core.vcxproj.filters
@@ -105,12 +105,12 @@
hw
-
- hle
-
arm\disassembler
+
+ hle
+
@@ -211,12 +211,12 @@
hw
-
- hle
-
arm\disassembler
+
+ hle
+
diff --git a/src/core/hle/coprocessor.cpp b/src/core/hle/coprocessor.cpp
new file mode 100644
index 000000000..5223be7c9
--- /dev/null
+++ b/src/core/hle/coprocessor.cpp
@@ -0,0 +1,64 @@
+// Copyright 2014 Citra Emulator Project
+// Licensed under GPLv2
+// Refer to the license.txt file included.
+
+#include "core/hle/mrc.h"
+#include "core/hle/hle.h"
+#include "core/mem_map.h"
+#include "core/core.h"
+
+namespace HLE {
+
+enum {
+ CMD_GX_REQUEST_DMA = 0x00000000,
+};
+
+/// Data synchronization barrier
+u32 DataSynchronizationBarrier(u32* command_buffer) {
+ u32 command = command_buffer[0];
+
+ switch (command) {
+
+ case CMD_GX_REQUEST_DMA:
+ {
+ u32* src = (u32*)Memory::GetPointer(command_buffer[1]);
+ u32* dst = (u32*)Memory::GetPointer(command_buffer[2]);
+ u32 size = command_buffer[3];
+ memcpy(dst, src, size);
+ }
+ break;
+
+ default:
+ ERROR_LOG(OSHLE, "MRC::DataSynchronizationBarrier unknown command 0x%08X", command);
+ return -1;
+ }
+
+ return 0;
+}
+
+/// Returns the coprocessor (in this case, syscore) command buffer pointer
+Addr GetThreadCommandBuffer() {
+ // Called on insruction: mrc p15, 0, r0, c13, c0, 3
+ // Returns an address in OSHLE memory for the CPU to read/write to
+ RETURN(CMD_BUFFER_ADDR);
+ return CMD_BUFFER_ADDR;
+}
+
+/// Call an MRC operation in HLE
+u32 CallMRC(ARM11_MRC_OPERATION operation) {
+ switch (operation) {
+
+ case DATA_SYNCHRONIZATION_BARRIER:
+ return DataSynchronizationBarrier((u32*)Memory::GetPointer(PARAM(0)));
+
+ case CALL_GET_THREAD_COMMAND_BUFFER:
+ return GetThreadCommandBuffer();
+
+ default:
+ ERROR_LOG(OSHLE, "unimplemented MRC operation 0x%02X", operation);
+ break;
+ }
+ return -1;
+}
+
+} // namespace
diff --git a/src/core/hle/coprocessor.h b/src/core/hle/coprocessor.h
new file mode 100644
index 000000000..d6b9f162f
--- /dev/null
+++ b/src/core/hle/coprocessor.h
@@ -0,0 +1,20 @@
+// Copyright 2014 Citra Emulator Project
+// Licensed under GPLv2
+// Refer to the license.txt file included.
+
+#pragma once
+
+#include "common/common_types.h"
+
+namespace HLE {
+
+/// MRC operations (ARM register from coprocessor), decoded as instr[20:27]
+enum ARM11_MRC_OPERATION {
+ DATA_SYNCHRONIZATION_BARRIER = 0xE0,
+ CALL_GET_THREAD_COMMAND_BUFFER = 0xE1,
+};
+
+/// Call an MRC operation in HLE
+u32 CallMRC(ARM11_MRC_OPERATION operation);
+
+} // namespace
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 @@
-// Copyright 2014 Citra Emulator Project
-// Licensed under GPLv2
-// Refer to the license.txt file included.
-
-#include "core/hle/mrc.h"
-#include "core/hle/hle.h"
-#include "core/mem_map.h"
-#include "core/core.h"
-
-namespace HLE {
-
-enum {
- CMD_GX_REQUEST_DMA = 0x00000000,
-};
-
-/// Data synchronization barrier
-u32 DataSynchronizationBarrier(u32* command_buffer) {
- u32 command = command_buffer[0];
-
- switch (command) {
-
- case CMD_GX_REQUEST_DMA:
- {
- u32* src = (u32*)Memory::GetPointer(command_buffer[1]);
- u32* dst = (u32*)Memory::GetPointer(command_buffer[2]);
- u32 size = command_buffer[3];
- memcpy(dst, src, size);
- }
- break;
-
- default:
- ERROR_LOG(OSHLE, "MRC::DataSynchronizationBarrier unknown command 0x%08X", command);
- return -1;
- }
-
- return 0;
-}
-
-/// Returns the coprocessor (in this case, syscore) command buffer pointer
-Addr GetThreadCommandBuffer() {
- // Called on insruction: mrc p15, 0, r0, c13, c0, 3
- // Returns an address in OSHLE memory for the CPU to read/write to
- RETURN(CMD_BUFFER_ADDR);
- return CMD_BUFFER_ADDR;
-}
-
-/// Call an MRC operation in HLE
-u32 CallMRC(ARM11_MRC_OPERATION operation) {
- switch (operation) {
-
- case DATA_SYNCHRONIZATION_BARRIER:
- return DataSynchronizationBarrier((u32*)Memory::GetPointer(PARAM(0)));
-
- case CALL_GET_THREAD_COMMAND_BUFFER:
- return GetThreadCommandBuffer();
-
- default:
- ERROR_LOG(OSHLE, "unimplemented MRC operation 0x%02X", operation);
- break;
- }
- return -1;
-}
-
-} // namespace
diff --git a/src/core/hle/mrc.h b/src/core/hle/mrc.h
deleted file mode 100644
index d6b9f162f..000000000
--- a/src/core/hle/mrc.h
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2014 Citra Emulator Project
-// Licensed under GPLv2
-// Refer to the license.txt file included.
-
-#pragma once
-
-#include "common/common_types.h"
-
-namespace HLE {
-
-/// MRC operations (ARM register from coprocessor), decoded as instr[20:27]
-enum ARM11_MRC_OPERATION {
- DATA_SYNCHRONIZATION_BARRIER = 0xE0,
- CALL_GET_THREAD_COMMAND_BUFFER = 0xE1,
-};
-
-/// Call an MRC operation in HLE
-u32 CallMRC(ARM11_MRC_OPERATION operation);
-
-} // namespace
--
cgit v1.2.3