diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/core/CMakeLists.txt | 10 | ||||
-rw-r--r-- | src/core/arm/dyncom/arm_dyncom_trans.h | 2 | ||||
-rw-r--r-- | src/core/hle/service/act/act.cpp | 18 | ||||
-rw-r--r-- | src/core/hle/service/act/act.h | 14 | ||||
-rw-r--r-- | src/core/hle/service/act/act_a.cpp (renamed from src/core/hle/service/act_a.cpp) | 3 | ||||
-rw-r--r-- | src/core/hle/service/act/act_a.h (renamed from src/core/hle/service/act_a.h) | 0 | ||||
-rw-r--r-- | src/core/hle/service/act/act_u.cpp (renamed from src/core/hle/service/act_u.cpp) | 3 | ||||
-rw-r--r-- | src/core/hle/service/act/act_u.h (renamed from src/core/hle/service/act_u.h) | 0 | ||||
-rw-r--r-- | src/core/hle/service/dlp/dlp.h | 2 | ||||
-rw-r--r-- | src/core/hle/service/hid/hid.cpp | 3 | ||||
-rw-r--r-- | src/core/hle/service/service.cpp | 6 | ||||
-rw-r--r-- | src/core/hle/service/srv.h | 2 | ||||
-rw-r--r-- | src/core/memory.cpp | 10 | ||||
-rw-r--r-- | src/video_core/shader/shader_jit_x64.cpp | 2 |
14 files changed, 63 insertions, 12 deletions
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index e027151fe..af224166a 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -53,8 +53,9 @@ set(SRCS hle/kernel/timer.cpp hle/kernel/vm_manager.cpp hle/service/ac_u.cpp - hle/service/act_a.cpp - hle/service/act_u.cpp + hle/service/act/act.cpp + hle/service/act/act_a.cpp + hle/service/act/act_u.cpp hle/service/am/am.cpp hle/service/am/am_app.cpp hle/service/am/am_net.cpp @@ -219,8 +220,9 @@ set(HEADERS hle/kernel/vm_manager.h hle/result.h hle/service/ac_u.h - hle/service/act_a.h - hle/service/act_u.h + hle/service/act/act.h + hle/service/act/act_a.h + hle/service/act/act_u.h hle/service/am/am.h hle/service/am/am_app.h hle/service/am/am_net.h diff --git a/src/core/arm/dyncom/arm_dyncom_trans.h b/src/core/arm/dyncom/arm_dyncom_trans.h index b1ec90662..632ff2cd6 100644 --- a/src/core/arm/dyncom/arm_dyncom_trans.h +++ b/src/core/arm/dyncom/arm_dyncom_trans.h @@ -1,3 +1,5 @@ +#pragma once + #include <cstddef> #include "common/common_types.h" diff --git a/src/core/hle/service/act/act.cpp b/src/core/hle/service/act/act.cpp new file mode 100644 index 000000000..9600036c0 --- /dev/null +++ b/src/core/hle/service/act/act.cpp @@ -0,0 +1,18 @@ +// Copyright 2016 Citra Emulator Project +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#include "core/hle/service/act/act.h" +#include "core/hle/service/act/act_a.h" +#include "core/hle/service/act/act_u.h" + +namespace Service { +namespace ACT { + +void Init() { + AddService(new ACT_A); + AddService(new ACT_U); +} + +} // namespace ACT +} // namespace Service diff --git a/src/core/hle/service/act/act.h b/src/core/hle/service/act/act.h new file mode 100644 index 000000000..1425291aa --- /dev/null +++ b/src/core/hle/service/act/act.h @@ -0,0 +1,14 @@ +// Copyright 2016 Citra Emulator Project +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#pragma once + +namespace Service { +namespace ACT { + +/// Initializes all ACT services +void Init(); + +} // namespace ACT +} // namespace Service diff --git a/src/core/hle/service/act_a.cpp b/src/core/hle/service/act/act_a.cpp index 9880aafff..5c523368f 100644 --- a/src/core/hle/service/act_a.cpp +++ b/src/core/hle/service/act/act_a.cpp @@ -2,7 +2,8 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. -#include "core/hle/service/act_a.h" +#include "core/hle/service/act/act.h" +#include "core/hle/service/act/act_a.h" namespace Service { namespace ACT { diff --git a/src/core/hle/service/act_a.h b/src/core/hle/service/act/act_a.h index e3adb03e5..e3adb03e5 100644 --- a/src/core/hle/service/act_a.h +++ b/src/core/hle/service/act/act_a.h diff --git a/src/core/hle/service/act_u.cpp b/src/core/hle/service/act/act_u.cpp index b4f69c57d..cf98aa1d6 100644 --- a/src/core/hle/service/act_u.cpp +++ b/src/core/hle/service/act/act_u.cpp @@ -2,7 +2,8 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. -#include "core/hle/service/act_u.h" +#include "core/hle/service/act/act.h" +#include "core/hle/service/act/act_u.h" namespace Service { namespace ACT { diff --git a/src/core/hle/service/act_u.h b/src/core/hle/service/act/act_u.h index 9d8538fbf..9d8538fbf 100644 --- a/src/core/hle/service/act_u.h +++ b/src/core/hle/service/act/act_u.h diff --git a/src/core/hle/service/dlp/dlp.h b/src/core/hle/service/dlp/dlp.h index ec2fe46e8..3185fe322 100644 --- a/src/core/hle/service/dlp/dlp.h +++ b/src/core/hle/service/dlp/dlp.h @@ -2,6 +2,8 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. +#pragma once + namespace Service { namespace DLP { diff --git a/src/core/hle/service/hid/hid.cpp b/src/core/hle/service/hid/hid.cpp index 99baded11..18a1b6a16 100644 --- a/src/core/hle/service/hid/hid.cpp +++ b/src/core/hle/service/hid/hid.cpp @@ -37,7 +37,8 @@ static int enable_gyroscope_count = 0; // positive means enabled static PadState GetCirclePadDirectionState(s16 circle_pad_x, s16 circle_pad_y) { // 30 degree and 60 degree are angular thresholds for directions - constexpr float TAN30 = 0.577350269, TAN60 = 1 / TAN30; + constexpr float TAN30 = 0.577350269f; + constexpr float TAN60 = 1 / TAN30; // a circle pad radius greater than 40 will trigger circle pad direction constexpr int CIRCLE_PAD_THRESHOLD_SQUARE = 40 * 40; PadState state; diff --git a/src/core/hle/service/service.cpp b/src/core/hle/service/service.cpp index 2bc3fdc82..25a7aeea8 100644 --- a/src/core/hle/service/service.cpp +++ b/src/core/hle/service/service.cpp @@ -9,8 +9,7 @@ #include "core/hle/kernel/server_port.h" #include "core/hle/service/ac_u.h" -#include "core/hle/service/act_a.h" -#include "core/hle/service/act_u.h" +#include "core/hle/service/act/act.h" #include "core/hle/service/am/am.h" #include "core/hle/service/apt/apt.h" #include "core/hle/service/boss/boss.h" @@ -139,6 +138,7 @@ void Init() { AddNamedPort(new ERR::ERR_F); FS::ArchiveInit(); + ACT::Init(); AM::Init(); APT::Init(); BOSS::Init(); @@ -158,8 +158,6 @@ void Init() { QTM::Init(); AddService(new AC::AC_U); - AddService(new ACT::ACT_A); - AddService(new ACT::ACT_U); AddService(new CSND::CSND_SND); AddService(new DSP_DSP::Interface); AddService(new GSP::GSP_GPU); diff --git a/src/core/hle/service/srv.h b/src/core/hle/service/srv.h index 6041ca42d..d3a9de879 100644 --- a/src/core/hle/service/srv.h +++ b/src/core/hle/service/srv.h @@ -2,6 +2,8 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. +#pragma once + #include "core/hle/service/service.h" namespace Service { diff --git a/src/core/memory.cpp b/src/core/memory.cpp index 65e4bba85..d058dc844 100644 --- a/src/core/memory.cpp +++ b/src/core/memory.cpp @@ -357,14 +357,24 @@ void RasterizerMarkRegionCached(PAddr start, u32 size, int count_delta) { } } +static void RoundToPages(PAddr& start, u32& size) { + PAddr start_rounded_down = start & ~PAGE_MASK; + PAddr end_rounded_up = ((start + size) + PAGE_MASK) & ~PAGE_MASK; + + start = start_rounded_down; + size = end_rounded_up - start_rounded_down; +} + void RasterizerFlushRegion(PAddr start, u32 size) { if (VideoCore::g_renderer != nullptr) { + RoundToPages(start, size); VideoCore::g_renderer->Rasterizer()->FlushRegion(start, size); } } void RasterizerFlushAndInvalidateRegion(PAddr start, u32 size) { if (VideoCore::g_renderer != nullptr) { + RoundToPages(start, size); VideoCore::g_renderer->Rasterizer()->FlushAndInvalidateRegion(start, size); } } diff --git a/src/video_core/shader/shader_jit_x64.cpp b/src/video_core/shader/shader_jit_x64.cpp index cfdeb8d6a..3ba31d474 100644 --- a/src/video_core/shader/shader_jit_x64.cpp +++ b/src/video_core/shader/shader_jit_x64.cpp @@ -222,7 +222,7 @@ void JitShader::Compile_SwizzleSrc(Instruction instr, unsigned src_num, SourceRe movaps(dest, xword[src_ptr + ADDROFFS_REG_1 + src_offset_disp]); break; case 3: // address offset 3 - movaps(dest, xword[src_ptr + LOOPCOUNT_REG + src_offset_disp]); + movaps(dest, xword[src_ptr + LOOPCOUNT_REG.cvt64() + src_offset_disp]); break; default: UNREACHABLE(); |