Merge remote-tracking branch 'citra/master' into fmtlib-macros
This commit is contained in:
commit
b5532babab
175 changed files with 22962 additions and 2105 deletions
|
@ -17,3 +17,4 @@ endif()
|
|||
if (ENABLE_WEB_SERVICE)
|
||||
add_subdirectory(web_service)
|
||||
endif()
|
||||
add_subdirectory(dedicated_room)
|
||||
|
|
|
@ -115,8 +115,8 @@ void Mixers::DownmixAndMixIntoCurrentFrame(float gain, const QuadFrame32& sample
|
|||
return;
|
||||
|
||||
case OutputFormat::Surround:
|
||||
// TODO(merry): Implement surround sound.
|
||||
// fallthrough
|
||||
// TODO(merry): Implement surround sound.
|
||||
// fallthrough
|
||||
|
||||
case OutputFormat::Stereo:
|
||||
std::transform(
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
#pragma once
|
||||
|
||||
#include <array>
|
||||
#include <queue>
|
||||
#include <vector>
|
||||
#include <queue>
|
||||
#include "audio_core/audio_types.h"
|
||||
#include "audio_core/codec.h"
|
||||
#include "audio_core/hle/common.h"
|
||||
|
|
|
@ -42,4 +42,4 @@ public:
|
|||
virtual std::vector<std::string> GetDeviceList() const = 0;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
} // namespace AudioCore
|
||||
|
|
|
@ -128,13 +128,14 @@ void GRenderWindow::moveContext() {
|
|||
}
|
||||
|
||||
void GRenderWindow::SwapBuffers() {
|
||||
#if !defined(QT_NO_DEBUG)
|
||||
// Qt debug runtime prints a bogus warning on the console if you haven't called makeCurrent
|
||||
// since the last time you called swapBuffers. This presumably means something if you're using
|
||||
// QGLWidget the "regular" way, but in our multi-threaded use case is harmless since we never
|
||||
// call doneCurrent in this thread.
|
||||
// In our multi-threaded QGLWidget use case we shouldn't need to call `makeCurrent`,
|
||||
// since we never call `doneCurrent` in this thread.
|
||||
// However:
|
||||
// - The Qt debug runtime prints a bogus warning on the console if `makeCurrent` wasn't called
|
||||
// since the last time `swapBuffers` was executed;
|
||||
// - On macOS, if `makeCurrent` isn't called explicitely, resizing the buffer breaks.
|
||||
child->makeCurrent();
|
||||
#endif
|
||||
|
||||
child->swapBuffers();
|
||||
}
|
||||
|
||||
|
|
|
@ -13,7 +13,11 @@
|
|||
|
||||
const std::array<std::string, ConfigureInput::ANALOG_SUB_BUTTONS_NUM>
|
||||
ConfigureInput::analog_sub_buttons{{
|
||||
"up", "down", "left", "right", "modifier",
|
||||
"up",
|
||||
"down",
|
||||
"left",
|
||||
"right",
|
||||
"modifier",
|
||||
}};
|
||||
|
||||
static QString getKeyName(int key_code) {
|
||||
|
@ -35,7 +39,8 @@ static void SetAnalogButton(const Common::ParamPackage& input_param,
|
|||
Common::ParamPackage& analog_param, const std::string& button_name) {
|
||||
if (analog_param.Get("engine", "") != "analog_from_button") {
|
||||
analog_param = {
|
||||
{"engine", "analog_from_button"}, {"modifier_scale", "0.5"},
|
||||
{"engine", "analog_from_button"},
|
||||
{"modifier_scale", "0.5"},
|
||||
};
|
||||
}
|
||||
analog_param.Set(button_name, input_param.Serialize());
|
||||
|
@ -102,11 +107,17 @@ ConfigureInput::ConfigureInput(QWidget* parent)
|
|||
|
||||
analog_map_buttons = {{
|
||||
{
|
||||
ui->buttonCircleUp, ui->buttonCircleDown, ui->buttonCircleLeft, ui->buttonCircleRight,
|
||||
ui->buttonCircleUp,
|
||||
ui->buttonCircleDown,
|
||||
ui->buttonCircleLeft,
|
||||
ui->buttonCircleRight,
|
||||
ui->buttonCircleMod,
|
||||
},
|
||||
{
|
||||
ui->buttonCStickUp, ui->buttonCStickDown, ui->buttonCStickLeft, ui->buttonCStickRight,
|
||||
ui->buttonCStickUp,
|
||||
ui->buttonCStickDown,
|
||||
ui->buttonCStickLeft,
|
||||
ui->buttonCStickRight,
|
||||
nullptr,
|
||||
},
|
||||
}};
|
||||
|
|
|
@ -11,7 +11,18 @@
|
|||
#include "ui_configure_system.h"
|
||||
|
||||
static const std::array<int, 12> days_in_month = {{
|
||||
31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31,
|
||||
31,
|
||||
29,
|
||||
31,
|
||||
30,
|
||||
31,
|
||||
30,
|
||||
31,
|
||||
31,
|
||||
30,
|
||||
31,
|
||||
30,
|
||||
31,
|
||||
}};
|
||||
|
||||
ConfigureSystem::ConfigureSystem(QWidget* parent) : QWidget(parent), ui(new Ui::ConfigureSystem) {
|
||||
|
|
|
@ -129,8 +129,8 @@ void BreakPointModel::OnResumed() {
|
|||
|
||||
GraphicsBreakPointsWidget::GraphicsBreakPointsWidget(
|
||||
std::shared_ptr<Pica::DebugContext> debug_context, QWidget* parent)
|
||||
: QDockWidget(tr("Pica Breakpoints"), parent),
|
||||
Pica::DebugContext::BreakPointObserver(debug_context) {
|
||||
: QDockWidget(tr("Pica Breakpoints"), parent), Pica::DebugContext::BreakPointObserver(
|
||||
debug_context) {
|
||||
setObjectName("PicaBreakPointsWidget");
|
||||
|
||||
status_text = new QLabel(tr("Emulation running"));
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
#include "video_core/shader/shader.h"
|
||||
#include "video_core/shader/shader_interpreter.h"
|
||||
|
||||
using nihstro::OpCode;
|
||||
using nihstro::Instruction;
|
||||
using nihstro::OpCode;
|
||||
using nihstro::SourceRegister;
|
||||
using nihstro::SwizzlePattern;
|
||||
|
||||
|
@ -331,7 +331,7 @@ QVariant GraphicsVertexShaderModel::data(const QModelIndex& index, int role) con
|
|||
return QBrush(QColor(192, 192, 192));
|
||||
}
|
||||
|
||||
// TODO: Draw arrows for each "reachable" instruction to visualize control flow
|
||||
// TODO: Draw arrows for each "reachable" instruction to visualize control flow
|
||||
|
||||
default:
|
||||
break;
|
||||
|
|
|
@ -20,7 +20,7 @@ class Mutex;
|
|||
class Semaphore;
|
||||
class Thread;
|
||||
class Timer;
|
||||
}
|
||||
} // namespace Kernel
|
||||
|
||||
class WaitTreeThread;
|
||||
|
||||
|
|
|
@ -1011,6 +1011,7 @@ void GMainWindow::ToggleScreenLayout() {
|
|||
}
|
||||
|
||||
Settings::values.layout_option = new_layout;
|
||||
SyncMenuUISettings();
|
||||
Settings::Apply();
|
||||
}
|
||||
|
||||
|
|
|
@ -221,7 +221,7 @@ public:
|
|||
IntTy m_val;
|
||||
};
|
||||
|
||||
} // Common
|
||||
} // namespace Common
|
||||
|
||||
typedef Common::BitSet<u8> BitSet8;
|
||||
typedef Common::BitSet<u16> BitSet16;
|
||||
|
|
|
@ -607,8 +607,9 @@ public:
|
|||
u32 cookie = arbitraryNumber;
|
||||
Do(cookie);
|
||||
if (mode == PointerWrap::MODE_READ && cookie != arbitraryNumber) {
|
||||
LOG_ERROR(Common, "After \"%s\", found %d (0x%X) instead of save marker %d (0x%X). "
|
||||
"Aborting savestate load...",
|
||||
LOG_ERROR(Common,
|
||||
"After \"%s\", found %d (0x%X) instead of save marker %d (0x%X). "
|
||||
"Aborting savestate load...",
|
||||
prevName, cookie, cookie, arbitraryNumber, arbitraryNumber);
|
||||
SetError(ERROR_FAILURE);
|
||||
}
|
||||
|
|
|
@ -256,4 +256,4 @@ inline void EncodeX24S8(u8 stencil, u8* bytes) {
|
|||
bytes[3] = stencil;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
} // namespace Color
|
||||
|
|
|
@ -94,4 +94,4 @@ bool Filter::ParseFilterRule(const std::string::const_iterator begin,
|
|||
bool Filter::CheckMessage(Class log_class, Level level) const {
|
||||
return static_cast<u8>(level) >= static_cast<u8>(class_levels[static_cast<size_t>(log_class)]);
|
||||
}
|
||||
}
|
||||
} // namespace Log
|
||||
|
|
|
@ -40,11 +40,12 @@ void* AllocateExecutableMemory(size_t size, bool low) {
|
|||
if (low && (!map_hint))
|
||||
map_hint = (char*)round_page(512 * 1024 * 1024); /* 0.5 GB rounded up to the next page */
|
||||
#endif
|
||||
void* ptr = mmap(map_hint, size, PROT_READ | PROT_WRITE | PROT_EXEC, MAP_ANON | MAP_PRIVATE
|
||||
void* ptr = mmap(map_hint, size, PROT_READ | PROT_WRITE | PROT_EXEC,
|
||||
MAP_ANON | MAP_PRIVATE
|
||||
#if defined(ARCHITECTURE_X64) && defined(MAP_32BIT)
|
||||
| (low ? MAP_32BIT : 0)
|
||||
| (low ? MAP_32BIT : 0)
|
||||
#endif
|
||||
,
|
||||
,
|
||||
-1, 0);
|
||||
#endif /* defined(_WIN32) */
|
||||
|
||||
|
|
|
@ -46,4 +46,4 @@ inline Quaternion<float> MakeQuaternion(const Math::Vec3<float>& axis, float ang
|
|||
return {axis * std::sin(angle / 2), std::cos(angle / 2)};
|
||||
}
|
||||
|
||||
} // namspace Math
|
||||
} // namespace Math
|
||||
|
|
|
@ -12,4 +12,4 @@ extern const char g_scm_desc[];
|
|||
extern const char g_build_name[];
|
||||
extern const char g_build_date[];
|
||||
|
||||
} // namespace
|
||||
} // namespace Common
|
||||
|
|
|
@ -22,7 +22,7 @@ template <typename Func>
|
|||
ScopeExitHelper<Func> ScopeExit(Func&& func) {
|
||||
return ScopeExitHelper<Func>(std::move(func));
|
||||
}
|
||||
}
|
||||
} // namespace detail
|
||||
|
||||
/**
|
||||
* This macro allows you to conveniently specify a block of code that will run on scope exit. Handy
|
||||
|
|
|
@ -158,4 +158,4 @@ private:
|
|||
std::array<Queue, NUM_QUEUES> queues;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
} // namespace Common
|
||||
|
|
|
@ -60,20 +60,41 @@ const Xbyak::Reg ABI_PARAM4 = Xbyak::util::r9;
|
|||
|
||||
const BitSet32 ABI_ALL_CALLER_SAVED = BuildRegSet({
|
||||
// GPRs
|
||||
Xbyak::util::rcx, Xbyak::util::rdx, Xbyak::util::r8, Xbyak::util::r9, Xbyak::util::r10,
|
||||
Xbyak::util::rcx,
|
||||
Xbyak::util::rdx,
|
||||
Xbyak::util::r8,
|
||||
Xbyak::util::r9,
|
||||
Xbyak::util::r10,
|
||||
Xbyak::util::r11,
|
||||
// XMMs
|
||||
Xbyak::util::xmm0, Xbyak::util::xmm1, Xbyak::util::xmm2, Xbyak::util::xmm3, Xbyak::util::xmm4,
|
||||
Xbyak::util::xmm0,
|
||||
Xbyak::util::xmm1,
|
||||
Xbyak::util::xmm2,
|
||||
Xbyak::util::xmm3,
|
||||
Xbyak::util::xmm4,
|
||||
Xbyak::util::xmm5,
|
||||
});
|
||||
|
||||
const BitSet32 ABI_ALL_CALLEE_SAVED = BuildRegSet({
|
||||
// GPRs
|
||||
Xbyak::util::rbx, Xbyak::util::rsi, Xbyak::util::rdi, Xbyak::util::rbp, Xbyak::util::r12,
|
||||
Xbyak::util::r13, Xbyak::util::r14, Xbyak::util::r15,
|
||||
Xbyak::util::rbx,
|
||||
Xbyak::util::rsi,
|
||||
Xbyak::util::rdi,
|
||||
Xbyak::util::rbp,
|
||||
Xbyak::util::r12,
|
||||
Xbyak::util::r13,
|
||||
Xbyak::util::r14,
|
||||
Xbyak::util::r15,
|
||||
// XMMs
|
||||
Xbyak::util::xmm6, Xbyak::util::xmm7, Xbyak::util::xmm8, Xbyak::util::xmm9, Xbyak::util::xmm10,
|
||||
Xbyak::util::xmm11, Xbyak::util::xmm12, Xbyak::util::xmm13, Xbyak::util::xmm14,
|
||||
Xbyak::util::xmm6,
|
||||
Xbyak::util::xmm7,
|
||||
Xbyak::util::xmm8,
|
||||
Xbyak::util::xmm9,
|
||||
Xbyak::util::xmm10,
|
||||
Xbyak::util::xmm11,
|
||||
Xbyak::util::xmm12,
|
||||
Xbyak::util::xmm13,
|
||||
Xbyak::util::xmm14,
|
||||
Xbyak::util::xmm15,
|
||||
});
|
||||
|
||||
|
@ -90,18 +111,40 @@ const Xbyak::Reg ABI_PARAM4 = Xbyak::util::rcx;
|
|||
|
||||
const BitSet32 ABI_ALL_CALLER_SAVED = BuildRegSet({
|
||||
// GPRs
|
||||
Xbyak::util::rcx, Xbyak::util::rdx, Xbyak::util::rdi, Xbyak::util::rsi, Xbyak::util::r8,
|
||||
Xbyak::util::r9, Xbyak::util::r10, Xbyak::util::r11,
|
||||
Xbyak::util::rcx,
|
||||
Xbyak::util::rdx,
|
||||
Xbyak::util::rdi,
|
||||
Xbyak::util::rsi,
|
||||
Xbyak::util::r8,
|
||||
Xbyak::util::r9,
|
||||
Xbyak::util::r10,
|
||||
Xbyak::util::r11,
|
||||
// XMMs
|
||||
Xbyak::util::xmm0, Xbyak::util::xmm1, Xbyak::util::xmm2, Xbyak::util::xmm3, Xbyak::util::xmm4,
|
||||
Xbyak::util::xmm5, Xbyak::util::xmm6, Xbyak::util::xmm7, Xbyak::util::xmm8, Xbyak::util::xmm9,
|
||||
Xbyak::util::xmm10, Xbyak::util::xmm11, Xbyak::util::xmm12, Xbyak::util::xmm13,
|
||||
Xbyak::util::xmm14, Xbyak::util::xmm15,
|
||||
Xbyak::util::xmm0,
|
||||
Xbyak::util::xmm1,
|
||||
Xbyak::util::xmm2,
|
||||
Xbyak::util::xmm3,
|
||||
Xbyak::util::xmm4,
|
||||
Xbyak::util::xmm5,
|
||||
Xbyak::util::xmm6,
|
||||
Xbyak::util::xmm7,
|
||||
Xbyak::util::xmm8,
|
||||
Xbyak::util::xmm9,
|
||||
Xbyak::util::xmm10,
|
||||
Xbyak::util::xmm11,
|
||||
Xbyak::util::xmm12,
|
||||
Xbyak::util::xmm13,
|
||||
Xbyak::util::xmm14,
|
||||
Xbyak::util::xmm15,
|
||||
});
|
||||
|
||||
const BitSet32 ABI_ALL_CALLEE_SAVED = BuildRegSet({
|
||||
// GPRs
|
||||
Xbyak::util::rbx, Xbyak::util::rbp, Xbyak::util::r12, Xbyak::util::r13, Xbyak::util::r14,
|
||||
Xbyak::util::rbx,
|
||||
Xbyak::util::rbp,
|
||||
Xbyak::util::r12,
|
||||
Xbyak::util::r13,
|
||||
Xbyak::util::r14,
|
||||
Xbyak::util::r15,
|
||||
});
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ enum {
|
|||
ARMVFP3,
|
||||
ARMV6K,
|
||||
};
|
||||
}
|
||||
} // namespace
|
||||
|
||||
// clang-format off
|
||||
const InstructionSetEncodingItem arm_instruction[] = {
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
/* Copyright (C)
|
||||
* 2011 - Michael.Kang blackfin.kang@gmail.com
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
*/
|
||||
* 2011 - Michael.Kang blackfin.kang@gmail.com
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
|
|
|
@ -1,28 +1,28 @@
|
|||
/* Copyright (C)
|
||||
* 2011 - Michael.Kang blackfin.kang@gmail.com
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
*/
|
||||
* 2011 - Michael.Kang blackfin.kang@gmail.com
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file arm_dyncom_thumb.h
|
||||
* @brief The thumb dyncom
|
||||
* @author Michael.Kang blackfin.kang@gmail.com
|
||||
* @version 78.77
|
||||
* @date 2011-11-07
|
||||
*/
|
||||
* @file arm_dyncom_thumb.h
|
||||
* @brief The thumb dyncom
|
||||
* @author Michael.Kang blackfin.kang@gmail.com
|
||||
* @version 78.77
|
||||
* @date 2011-11-07
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
|
|
|
@ -1808,78 +1808,210 @@ static ARM_INST_PTR INTERPRETER_TRANSLATE(yield)(unsigned int inst, int index) {
|
|||
#undef VFP_INTERPRETER_TRANS
|
||||
|
||||
const transop_fp_t arm_instruction_trans[] = {
|
||||
INTERPRETER_TRANSLATE(vmla), INTERPRETER_TRANSLATE(vmls), INTERPRETER_TRANSLATE(vnmla),
|
||||
INTERPRETER_TRANSLATE(vnmls), INTERPRETER_TRANSLATE(vnmul), INTERPRETER_TRANSLATE(vmul),
|
||||
INTERPRETER_TRANSLATE(vadd), INTERPRETER_TRANSLATE(vsub), INTERPRETER_TRANSLATE(vdiv),
|
||||
INTERPRETER_TRANSLATE(vmovi), INTERPRETER_TRANSLATE(vmovr), INTERPRETER_TRANSLATE(vabs),
|
||||
INTERPRETER_TRANSLATE(vneg), INTERPRETER_TRANSLATE(vsqrt), INTERPRETER_TRANSLATE(vcmp),
|
||||
INTERPRETER_TRANSLATE(vcmp2), INTERPRETER_TRANSLATE(vcvtbds), INTERPRETER_TRANSLATE(vcvtbff),
|
||||
INTERPRETER_TRANSLATE(vcvtbfi), INTERPRETER_TRANSLATE(vmovbrs), INTERPRETER_TRANSLATE(vmsr),
|
||||
INTERPRETER_TRANSLATE(vmovbrc), INTERPRETER_TRANSLATE(vmrs), INTERPRETER_TRANSLATE(vmovbcr),
|
||||
INTERPRETER_TRANSLATE(vmovbrrss), INTERPRETER_TRANSLATE(vmovbrrd), INTERPRETER_TRANSLATE(vstr),
|
||||
INTERPRETER_TRANSLATE(vpush), INTERPRETER_TRANSLATE(vstm), INTERPRETER_TRANSLATE(vpop),
|
||||
INTERPRETER_TRANSLATE(vldr), INTERPRETER_TRANSLATE(vldm),
|
||||
INTERPRETER_TRANSLATE(vmla),
|
||||
INTERPRETER_TRANSLATE(vmls),
|
||||
INTERPRETER_TRANSLATE(vnmla),
|
||||
INTERPRETER_TRANSLATE(vnmls),
|
||||
INTERPRETER_TRANSLATE(vnmul),
|
||||
INTERPRETER_TRANSLATE(vmul),
|
||||
INTERPRETER_TRANSLATE(vadd),
|
||||
INTERPRETER_TRANSLATE(vsub),
|
||||
INTERPRETER_TRANSLATE(vdiv),
|
||||
INTERPRETER_TRANSLATE(vmovi),
|
||||
INTERPRETER_TRANSLATE(vmovr),
|
||||
INTERPRETER_TRANSLATE(vabs),
|
||||
INTERPRETER_TRANSLATE(vneg),
|
||||
INTERPRETER_TRANSLATE(vsqrt),
|
||||
INTERPRETER_TRANSLATE(vcmp),
|
||||
INTERPRETER_TRANSLATE(vcmp2),
|
||||
INTERPRETER_TRANSLATE(vcvtbds),
|
||||
INTERPRETER_TRANSLATE(vcvtbff),
|
||||
INTERPRETER_TRANSLATE(vcvtbfi),
|
||||
INTERPRETER_TRANSLATE(vmovbrs),
|
||||
INTERPRETER_TRANSLATE(vmsr),
|
||||
INTERPRETER_TRANSLATE(vmovbrc),
|
||||
INTERPRETER_TRANSLATE(vmrs),
|
||||
INTERPRETER_TRANSLATE(vmovbcr),
|
||||
INTERPRETER_TRANSLATE(vmovbrrss),
|
||||
INTERPRETER_TRANSLATE(vmovbrrd),
|
||||
INTERPRETER_TRANSLATE(vstr),
|
||||
INTERPRETER_TRANSLATE(vpush),
|
||||
INTERPRETER_TRANSLATE(vstm),
|
||||
INTERPRETER_TRANSLATE(vpop),
|
||||
INTERPRETER_TRANSLATE(vldr),
|
||||
INTERPRETER_TRANSLATE(vldm),
|
||||
|
||||
INTERPRETER_TRANSLATE(srs), INTERPRETER_TRANSLATE(rfe), INTERPRETER_TRANSLATE(bkpt),
|
||||
INTERPRETER_TRANSLATE(blx), INTERPRETER_TRANSLATE(cps), INTERPRETER_TRANSLATE(pld),
|
||||
INTERPRETER_TRANSLATE(setend), INTERPRETER_TRANSLATE(clrex), INTERPRETER_TRANSLATE(rev16),
|
||||
INTERPRETER_TRANSLATE(usad8), INTERPRETER_TRANSLATE(sxtb), INTERPRETER_TRANSLATE(uxtb),
|
||||
INTERPRETER_TRANSLATE(sxth), INTERPRETER_TRANSLATE(sxtb16), INTERPRETER_TRANSLATE(uxth),
|
||||
INTERPRETER_TRANSLATE(uxtb16), INTERPRETER_TRANSLATE(cpy), INTERPRETER_TRANSLATE(uxtab),
|
||||
INTERPRETER_TRANSLATE(ssub8), INTERPRETER_TRANSLATE(shsub8), INTERPRETER_TRANSLATE(ssubaddx),
|
||||
INTERPRETER_TRANSLATE(strex), INTERPRETER_TRANSLATE(strexb), INTERPRETER_TRANSLATE(swp),
|
||||
INTERPRETER_TRANSLATE(swpb), INTERPRETER_TRANSLATE(ssub16), INTERPRETER_TRANSLATE(ssat16),
|
||||
INTERPRETER_TRANSLATE(shsubaddx), INTERPRETER_TRANSLATE(qsubaddx),
|
||||
INTERPRETER_TRANSLATE(shaddsubx), INTERPRETER_TRANSLATE(shadd8), INTERPRETER_TRANSLATE(shadd16),
|
||||
INTERPRETER_TRANSLATE(sel), INTERPRETER_TRANSLATE(saddsubx), INTERPRETER_TRANSLATE(sadd8),
|
||||
INTERPRETER_TRANSLATE(sadd16), INTERPRETER_TRANSLATE(shsub16), INTERPRETER_TRANSLATE(umaal),
|
||||
INTERPRETER_TRANSLATE(uxtab16), INTERPRETER_TRANSLATE(usubaddx), INTERPRETER_TRANSLATE(usub8),
|
||||
INTERPRETER_TRANSLATE(usub16), INTERPRETER_TRANSLATE(usat16), INTERPRETER_TRANSLATE(usada8),
|
||||
INTERPRETER_TRANSLATE(uqsubaddx), INTERPRETER_TRANSLATE(uqsub8), INTERPRETER_TRANSLATE(uqsub16),
|
||||
INTERPRETER_TRANSLATE(uqaddsubx), INTERPRETER_TRANSLATE(uqadd8), INTERPRETER_TRANSLATE(uqadd16),
|
||||
INTERPRETER_TRANSLATE(sxtab), INTERPRETER_TRANSLATE(uhsubaddx), INTERPRETER_TRANSLATE(uhsub8),
|
||||
INTERPRETER_TRANSLATE(uhsub16), INTERPRETER_TRANSLATE(uhaddsubx), INTERPRETER_TRANSLATE(uhadd8),
|
||||
INTERPRETER_TRANSLATE(uhadd16), INTERPRETER_TRANSLATE(uaddsubx), INTERPRETER_TRANSLATE(uadd8),
|
||||
INTERPRETER_TRANSLATE(uadd16), INTERPRETER_TRANSLATE(sxtah), INTERPRETER_TRANSLATE(sxtab16),
|
||||
INTERPRETER_TRANSLATE(qadd8), INTERPRETER_TRANSLATE(bxj), INTERPRETER_TRANSLATE(clz),
|
||||
INTERPRETER_TRANSLATE(uxtah), INTERPRETER_TRANSLATE(bx), INTERPRETER_TRANSLATE(rev),
|
||||
INTERPRETER_TRANSLATE(blx), INTERPRETER_TRANSLATE(revsh), INTERPRETER_TRANSLATE(qadd),
|
||||
INTERPRETER_TRANSLATE(qadd16), INTERPRETER_TRANSLATE(qaddsubx), INTERPRETER_TRANSLATE(ldrex),
|
||||
INTERPRETER_TRANSLATE(qdadd), INTERPRETER_TRANSLATE(qdsub), INTERPRETER_TRANSLATE(qsub),
|
||||
INTERPRETER_TRANSLATE(ldrexb), INTERPRETER_TRANSLATE(qsub8), INTERPRETER_TRANSLATE(qsub16),
|
||||
INTERPRETER_TRANSLATE(smuad), INTERPRETER_TRANSLATE(smmul), INTERPRETER_TRANSLATE(smusd),
|
||||
INTERPRETER_TRANSLATE(smlsd), INTERPRETER_TRANSLATE(smlsld), INTERPRETER_TRANSLATE(smmla),
|
||||
INTERPRETER_TRANSLATE(smmls), INTERPRETER_TRANSLATE(smlald), INTERPRETER_TRANSLATE(smlad),
|
||||
INTERPRETER_TRANSLATE(smlaw), INTERPRETER_TRANSLATE(smulw), INTERPRETER_TRANSLATE(pkhtb),
|
||||
INTERPRETER_TRANSLATE(pkhbt), INTERPRETER_TRANSLATE(smul), INTERPRETER_TRANSLATE(smlalxy),
|
||||
INTERPRETER_TRANSLATE(smla), INTERPRETER_TRANSLATE(mcrr), INTERPRETER_TRANSLATE(mrrc),
|
||||
INTERPRETER_TRANSLATE(cmp), INTERPRETER_TRANSLATE(tst), INTERPRETER_TRANSLATE(teq),
|
||||
INTERPRETER_TRANSLATE(cmn), INTERPRETER_TRANSLATE(smull), INTERPRETER_TRANSLATE(umull),
|
||||
INTERPRETER_TRANSLATE(umlal), INTERPRETER_TRANSLATE(smlal), INTERPRETER_TRANSLATE(mul),
|
||||
INTERPRETER_TRANSLATE(mla), INTERPRETER_TRANSLATE(ssat), INTERPRETER_TRANSLATE(usat),
|
||||
INTERPRETER_TRANSLATE(mrs), INTERPRETER_TRANSLATE(msr), INTERPRETER_TRANSLATE(and),
|
||||
INTERPRETER_TRANSLATE(bic), INTERPRETER_TRANSLATE(ldm), INTERPRETER_TRANSLATE(eor),
|
||||
INTERPRETER_TRANSLATE(add), INTERPRETER_TRANSLATE(rsb), INTERPRETER_TRANSLATE(rsc),
|
||||
INTERPRETER_TRANSLATE(sbc), INTERPRETER_TRANSLATE(adc), INTERPRETER_TRANSLATE(sub),
|
||||
INTERPRETER_TRANSLATE(orr), INTERPRETER_TRANSLATE(mvn), INTERPRETER_TRANSLATE(mov),
|
||||
INTERPRETER_TRANSLATE(stm), INTERPRETER_TRANSLATE(ldm), INTERPRETER_TRANSLATE(ldrsh),
|
||||
INTERPRETER_TRANSLATE(stm), INTERPRETER_TRANSLATE(ldm), INTERPRETER_TRANSLATE(ldrsb),
|
||||
INTERPRETER_TRANSLATE(strd), INTERPRETER_TRANSLATE(ldrh), INTERPRETER_TRANSLATE(strh),
|
||||
INTERPRETER_TRANSLATE(ldrd), INTERPRETER_TRANSLATE(strt), INTERPRETER_TRANSLATE(strbt),
|
||||
INTERPRETER_TRANSLATE(ldrbt), INTERPRETER_TRANSLATE(ldrt), INTERPRETER_TRANSLATE(mrc),
|
||||
INTERPRETER_TRANSLATE(mcr), INTERPRETER_TRANSLATE(msr), INTERPRETER_TRANSLATE(msr),
|
||||
INTERPRETER_TRANSLATE(msr), INTERPRETER_TRANSLATE(msr), INTERPRETER_TRANSLATE(msr),
|
||||
INTERPRETER_TRANSLATE(ldrb), INTERPRETER_TRANSLATE(strb), INTERPRETER_TRANSLATE(ldr),
|
||||
INTERPRETER_TRANSLATE(ldrcond), INTERPRETER_TRANSLATE(str), INTERPRETER_TRANSLATE(cdp),
|
||||
INTERPRETER_TRANSLATE(stc), INTERPRETER_TRANSLATE(ldc), INTERPRETER_TRANSLATE(ldrexd),
|
||||
INTERPRETER_TRANSLATE(strexd), INTERPRETER_TRANSLATE(ldrexh), INTERPRETER_TRANSLATE(strexh),
|
||||
INTERPRETER_TRANSLATE(nop), INTERPRETER_TRANSLATE(yield), INTERPRETER_TRANSLATE(wfe),
|
||||
INTERPRETER_TRANSLATE(wfi), INTERPRETER_TRANSLATE(sev), INTERPRETER_TRANSLATE(swi),
|
||||
INTERPRETER_TRANSLATE(srs),
|
||||
INTERPRETER_TRANSLATE(rfe),
|
||||
INTERPRETER_TRANSLATE(bkpt),
|
||||
INTERPRETER_TRANSLATE(blx),
|
||||
INTERPRETER_TRANSLATE(cps),
|
||||
INTERPRETER_TRANSLATE(pld),
|
||||
INTERPRETER_TRANSLATE(setend),
|
||||
INTERPRETER_TRANSLATE(clrex),
|
||||
INTERPRETER_TRANSLATE(rev16),
|
||||
INTERPRETER_TRANSLATE(usad8),
|
||||
INTERPRETER_TRANSLATE(sxtb),
|
||||
INTERPRETER_TRANSLATE(uxtb),
|
||||
INTERPRETER_TRANSLATE(sxth),
|
||||
INTERPRETER_TRANSLATE(sxtb16),
|
||||
INTERPRETER_TRANSLATE(uxth),
|
||||
INTERPRETER_TRANSLATE(uxtb16),
|
||||
INTERPRETER_TRANSLATE(cpy),
|
||||
INTERPRETER_TRANSLATE(uxtab),
|
||||
INTERPRETER_TRANSLATE(ssub8),
|
||||
INTERPRETER_TRANSLATE(shsub8),
|
||||
INTERPRETER_TRANSLATE(ssubaddx),
|
||||
INTERPRETER_TRANSLATE(strex),
|
||||
INTERPRETER_TRANSLATE(strexb),
|
||||
INTERPRETER_TRANSLATE(swp),
|
||||
INTERPRETER_TRANSLATE(swpb),
|
||||
INTERPRETER_TRANSLATE(ssub16),
|
||||
INTERPRETER_TRANSLATE(ssat16),
|
||||
INTERPRETER_TRANSLATE(shsubaddx),
|
||||
INTERPRETER_TRANSLATE(qsubaddx),
|
||||
INTERPRETER_TRANSLATE(shaddsubx),
|
||||
INTERPRETER_TRANSLATE(shadd8),
|
||||
INTERPRETER_TRANSLATE(shadd16),
|
||||
INTERPRETER_TRANSLATE(sel),
|
||||
INTERPRETER_TRANSLATE(saddsubx),
|
||||
INTERPRETER_TRANSLATE(sadd8),
|
||||
INTERPRETER_TRANSLATE(sadd16),
|
||||
INTERPRETER_TRANSLATE(shsub16),
|
||||
INTERPRETER_TRANSLATE(umaal),
|
||||
INTERPRETER_TRANSLATE(uxtab16),
|
||||
INTERPRETER_TRANSLATE(usubaddx),
|
||||
INTERPRETER_TRANSLATE(usub8),
|
||||
INTERPRETER_TRANSLATE(usub16),
|
||||
INTERPRETER_TRANSLATE(usat16),
|
||||
INTERPRETER_TRANSLATE(usada8),
|
||||
INTERPRETER_TRANSLATE(uqsubaddx),
|
||||
INTERPRETER_TRANSLATE(uqsub8),
|
||||
INTERPRETER_TRANSLATE(uqsub16),
|
||||
INTERPRETER_TRANSLATE(uqaddsubx),
|
||||
INTERPRETER_TRANSLATE(uqadd8),
|
||||
INTERPRETER_TRANSLATE(uqadd16),
|
||||
INTERPRETER_TRANSLATE(sxtab),
|
||||
INTERPRETER_TRANSLATE(uhsubaddx),
|
||||
INTERPRETER_TRANSLATE(uhsub8),
|
||||
INTERPRETER_TRANSLATE(uhsub16),
|
||||
INTERPRETER_TRANSLATE(uhaddsubx),
|
||||
INTERPRETER_TRANSLATE(uhadd8),
|
||||
INTERPRETER_TRANSLATE(uhadd16),
|
||||
INTERPRETER_TRANSLATE(uaddsubx),
|
||||
INTERPRETER_TRANSLATE(uadd8),
|
||||
INTERPRETER_TRANSLATE(uadd16),
|
||||
INTERPRETER_TRANSLATE(sxtah),
|
||||
INTERPRETER_TRANSLATE(sxtab16),
|
||||
INTERPRETER_TRANSLATE(qadd8),
|
||||
INTERPRETER_TRANSLATE(bxj),
|
||||
INTERPRETER_TRANSLATE(clz),
|
||||
INTERPRETER_TRANSLATE(uxtah),
|
||||
INTERPRETER_TRANSLATE(bx),
|
||||
INTERPRETER_TRANSLATE(rev),
|
||||
INTERPRETER_TRANSLATE(blx),
|
||||
INTERPRETER_TRANSLATE(revsh),
|
||||
INTERPRETER_TRANSLATE(qadd),
|
||||
INTERPRETER_TRANSLATE(qadd16),
|
||||
INTERPRETER_TRANSLATE(qaddsubx),
|
||||
INTERPRETER_TRANSLATE(ldrex),
|
||||
INTERPRETER_TRANSLATE(qdadd),
|
||||
INTERPRETER_TRANSLATE(qdsub),
|
||||
INTERPRETER_TRANSLATE(qsub),
|
||||
INTERPRETER_TRANSLATE(ldrexb),
|
||||
INTERPRETER_TRANSLATE(qsub8),
|
||||
INTERPRETER_TRANSLATE(qsub16),
|
||||
INTERPRETER_TRANSLATE(smuad),
|
||||
INTERPRETER_TRANSLATE(smmul),
|
||||
INTERPRETER_TRANSLATE(smusd),
|
||||
INTERPRETER_TRANSLATE(smlsd),
|
||||
INTERPRETER_TRANSLATE(smlsld),
|
||||
INTERPRETER_TRANSLATE(smmla),
|
||||
INTERPRETER_TRANSLATE(smmls),
|
||||
INTERPRETER_TRANSLATE(smlald),
|
||||
INTERPRETER_TRANSLATE(smlad),
|
||||
INTERPRETER_TRANSLATE(smlaw),
|
||||
INTERPRETER_TRANSLATE(smulw),
|
||||
INTERPRETER_TRANSLATE(pkhtb),
|
||||
INTERPRETER_TRANSLATE(pkhbt),
|
||||
INTERPRETER_TRANSLATE(smul),
|
||||
INTERPRETER_TRANSLATE(smlalxy),
|
||||
INTERPRETER_TRANSLATE(smla),
|
||||
INTERPRETER_TRANSLATE(mcrr),
|
||||
INTERPRETER_TRANSLATE(mrrc),
|
||||
INTERPRETER_TRANSLATE(cmp),
|
||||
INTERPRETER_TRANSLATE(tst),
|
||||
INTERPRETER_TRANSLATE(teq),
|
||||
INTERPRETER_TRANSLATE(cmn),
|
||||
INTERPRETER_TRANSLATE(smull),
|
||||
INTERPRETER_TRANSLATE(umull),
|
||||
INTERPRETER_TRANSLATE(umlal),
|
||||
INTERPRETER_TRANSLATE(smlal),
|
||||
INTERPRETER_TRANSLATE(mul),
|
||||
INTERPRETER_TRANSLATE(mla),
|
||||
INTERPRETER_TRANSLATE(ssat),
|
||||
INTERPRETER_TRANSLATE(usat),
|
||||
INTERPRETER_TRANSLATE(mrs),
|
||||
INTERPRETER_TRANSLATE(msr),
|
||||
INTERPRETER_TRANSLATE(and),
|
||||
INTERPRETER_TRANSLATE(bic),
|
||||
INTERPRETER_TRANSLATE(ldm),
|
||||
INTERPRETER_TRANSLATE(eor),
|
||||
INTERPRETER_TRANSLATE(add),
|
||||
INTERPRETER_TRANSLATE(rsb),
|
||||
INTERPRETER_TRANSLATE(rsc),
|
||||
INTERPRETER_TRANSLATE(sbc),
|
||||
INTERPRETER_TRANSLATE(adc),
|
||||
INTERPRETER_TRANSLATE(sub),
|
||||
INTERPRETER_TRANSLATE(orr),
|
||||
INTERPRETER_TRANSLATE(mvn),
|
||||
INTERPRETER_TRANSLATE(mov),
|
||||
INTERPRETER_TRANSLATE(stm),
|
||||
INTERPRETER_TRANSLATE(ldm),
|
||||
INTERPRETER_TRANSLATE(ldrsh),
|
||||
INTERPRETER_TRANSLATE(stm),
|
||||
INTERPRETER_TRANSLATE(ldm),
|
||||
INTERPRETER_TRANSLATE(ldrsb),
|
||||
INTERPRETER_TRANSLATE(strd),
|
||||
INTERPRETER_TRANSLATE(ldrh),
|
||||
INTERPRETER_TRANSLATE(strh),
|
||||
INTERPRETER_TRANSLATE(ldrd),
|
||||
INTERPRETER_TRANSLATE(strt),
|
||||
INTERPRETER_TRANSLATE(strbt),
|
||||
INTERPRETER_TRANSLATE(ldrbt),
|
||||
INTERPRETER_TRANSLATE(ldrt),
|
||||
INTERPRETER_TRANSLATE(mrc),
|
||||
INTERPRETER_TRANSLATE(mcr),
|
||||
INTERPRETER_TRANSLATE(msr),
|
||||
INTERPRETER_TRANSLATE(msr),
|
||||
INTERPRETER_TRANSLATE(msr),
|
||||
INTERPRETER_TRANSLATE(msr),
|
||||
INTERPRETER_TRANSLATE(msr),
|
||||
INTERPRETER_TRANSLATE(ldrb),
|
||||
INTERPRETER_TRANSLATE(strb),
|
||||
INTERPRETER_TRANSLATE(ldr),
|
||||
INTERPRETER_TRANSLATE(ldrcond),
|
||||
INTERPRETER_TRANSLATE(str),
|
||||
INTERPRETER_TRANSLATE(cdp),
|
||||
INTERPRETER_TRANSLATE(stc),
|
||||
INTERPRETER_TRANSLATE(ldc),
|
||||
INTERPRETER_TRANSLATE(ldrexd),
|
||||
INTERPRETER_TRANSLATE(strexd),
|
||||
INTERPRETER_TRANSLATE(ldrexh),
|
||||
INTERPRETER_TRANSLATE(strexh),
|
||||
INTERPRETER_TRANSLATE(nop),
|
||||
INTERPRETER_TRANSLATE(yield),
|
||||
INTERPRETER_TRANSLATE(wfe),
|
||||
INTERPRETER_TRANSLATE(wfi),
|
||||
INTERPRETER_TRANSLATE(sev),
|
||||
INTERPRETER_TRANSLATE(swi),
|
||||
INTERPRETER_TRANSLATE(bbl),
|
||||
|
||||
// All the thumb instructions should be placed the end of table
|
||||
INTERPRETER_TRANSLATE(b_2_thumb), INTERPRETER_TRANSLATE(b_cond_thumb),
|
||||
INTERPRETER_TRANSLATE(bl_1_thumb), INTERPRETER_TRANSLATE(bl_2_thumb),
|
||||
INTERPRETER_TRANSLATE(b_2_thumb),
|
||||
INTERPRETER_TRANSLATE(b_cond_thumb),
|
||||
INTERPRETER_TRANSLATE(bl_1_thumb),
|
||||
INTERPRETER_TRANSLATE(bl_2_thumb),
|
||||
INTERPRETER_TRANSLATE(blx_1_thumb),
|
||||
};
|
||||
|
||||
|
|
|
@ -58,7 +58,9 @@
|
|||
#include "core/arm/skyeye_common/vfp/vfp_helper.h"
|
||||
|
||||
static struct vfp_double vfp_double_default_qnan = {
|
||||
2047, 0, VFP_DOUBLE_SIGNIFICAND_QNAN,
|
||||
2047,
|
||||
0,
|
||||
VFP_DOUBLE_SIGNIFICAND_QNAN,
|
||||
};
|
||||
|
||||
static void vfp_double_dump(const char* str, struct vfp_double* d) {
|
||||
|
|
|
@ -61,7 +61,9 @@
|
|||
#include "core/arm/skyeye_common/vfp/vfp_helper.h"
|
||||
|
||||
static struct vfp_single vfp_single_default_qnan = {
|
||||
255, 0, VFP_SINGLE_SIGNIFICAND_QNAN,
|
||||
255,
|
||||
0,
|
||||
VFP_SINGLE_SIGNIFICAND_QNAN,
|
||||
};
|
||||
|
||||
static void vfp_single_dump(const char* str, struct vfp_single* s) {
|
||||
|
|
|
@ -118,4 +118,4 @@ std::vector<u8> Path::AsBinary() const {
|
|||
return {};
|
||||
}
|
||||
}
|
||||
}
|
||||
} // namespace FileSys
|
||||
|
|
|
@ -245,8 +245,9 @@ void ArchiveFactory_SelfNCCH::Register(Loader::AppLoader& app_loader) {
|
|||
program_id);
|
||||
|
||||
if (ncch_data.find(program_id) != ncch_data.end()) {
|
||||
LOG_WARNING(Service_FS, "Registering program %016" PRIX64
|
||||
" with SelfNCCH will override existing mapping",
|
||||
LOG_WARNING(Service_FS,
|
||||
"Registering program %016" PRIX64
|
||||
" with SelfNCCH will override existing mapping",
|
||||
program_id);
|
||||
}
|
||||
|
||||
|
@ -260,9 +261,9 @@ void ArchiveFactory_SelfNCCH::Register(Loader::AppLoader& app_loader) {
|
|||
}
|
||||
|
||||
std::shared_ptr<FileUtil::IOFile> update_romfs_file;
|
||||
if (Loader::ResultStatus::Success ==
|
||||
app_loader.ReadUpdateRomFS(update_romfs_file, data.update_romfs_offset,
|
||||
data.update_romfs_size)) {
|
||||
if (Loader::ResultStatus::Success == app_loader.ReadUpdateRomFS(update_romfs_file,
|
||||
data.update_romfs_offset,
|
||||
data.update_romfs_size)) {
|
||||
|
||||
data.update_romfs_file = std::move(update_romfs_file);
|
||||
}
|
||||
|
|
|
@ -225,4 +225,4 @@ void CIAContainer::Print() const {
|
|||
LOG_DEBUG(Service_FS, "Content %x Offset: 0x%08" PRIx64 " bytes", i, GetContentOffset(i));
|
||||
}
|
||||
}
|
||||
}
|
||||
} // namespace FileSys
|
||||
|
|
|
@ -215,13 +215,13 @@ public:
|
|||
u64& size);
|
||||
|
||||
/**
|
||||
* Get the override RomFS of the NCCH container
|
||||
* Since the RomFS can be huge, we return a file reference instead of copying to a buffer
|
||||
* @param romfs_file The file containing the RomFS
|
||||
* @param offset The offset the romfs begins on
|
||||
* @param size The size of the romfs
|
||||
* @return ResultStatus result of function
|
||||
*/
|
||||
* Get the override RomFS of the NCCH container
|
||||
* Since the RomFS can be huge, we return a file reference instead of copying to a buffer
|
||||
* @param romfs_file The file containing the RomFS
|
||||
* @param offset The offset the romfs begins on
|
||||
* @param size The size of the romfs
|
||||
* @return ResultStatus result of function
|
||||
*/
|
||||
Loader::ResultStatus ReadOverrideRomFS(std::shared_ptr<FileUtil::IOFile>& romfs_file,
|
||||
u64& offset, u64& size);
|
||||
|
||||
|
|
|
@ -87,9 +87,9 @@ public:
|
|||
}
|
||||
|
||||
/**
|
||||
* Gets the framebuffer layout (width, height, and screen regions)
|
||||
* @note This method is thread-safe
|
||||
*/
|
||||
* Gets the framebuffer layout (width, height, and screen regions)
|
||||
* @note This method is thread-safe
|
||||
*/
|
||||
const Layout::FramebufferLayout& GetFramebufferLayout() const {
|
||||
return framebuffer_layout;
|
||||
}
|
||||
|
|
|
@ -109,11 +109,10 @@ FramebufferLayout LargeFrameLayout(unsigned width, unsigned height, bool swapped
|
|||
// To do that, find the total emulation box and maximize that based on window size
|
||||
float window_aspect_ratio = static_cast<float>(height) / width;
|
||||
float emulation_aspect_ratio =
|
||||
swapped
|
||||
? Core::kScreenBottomHeight * 4 /
|
||||
(Core::kScreenBottomWidth * 4.0f + Core::kScreenTopWidth)
|
||||
: Core::kScreenTopHeight * 4 /
|
||||
(Core::kScreenTopWidth * 4.0f + Core::kScreenBottomWidth);
|
||||
swapped ? Core::kScreenBottomHeight * 4 /
|
||||
(Core::kScreenBottomWidth * 4.0f + Core::kScreenTopWidth)
|
||||
: Core::kScreenTopHeight * 4 /
|
||||
(Core::kScreenTopWidth * 4.0f + Core::kScreenBottomWidth);
|
||||
float large_screen_aspect_ratio = swapped ? BOT_SCREEN_ASPECT_RATIO : TOP_SCREEN_ASPECT_RATIO;
|
||||
float small_screen_aspect_ratio = swapped ? TOP_SCREEN_ASPECT_RATIO : BOT_SCREEN_ASPECT_RATIO;
|
||||
|
||||
|
|
|
@ -54,14 +54,14 @@ FramebufferLayout SingleFrameLayout(unsigned width, unsigned height, bool is_swa
|
|||
FramebufferLayout LargeFrameLayout(unsigned width, unsigned height, bool is_swapped);
|
||||
|
||||
/**
|
||||
* Factory method for constructing a Frame with the Top screen and bottom
|
||||
* screen side by side
|
||||
* This is useful for devices with small screens, like the GPDWin
|
||||
* @param width Window framebuffer width in pixels
|
||||
* @param height Window framebuffer height in pixels
|
||||
* @param is_swapped if true, the bottom screen will be the left display
|
||||
* @return Newly created FramebufferLayout object with default screen regions initialized
|
||||
*/
|
||||
* Factory method for constructing a Frame with the Top screen and bottom
|
||||
* screen side by side
|
||||
* This is useful for devices with small screens, like the GPDWin
|
||||
* @param width Window framebuffer width in pixels
|
||||
* @param height Window framebuffer height in pixels
|
||||
* @param is_swapped if true, the bottom screen will be the left display
|
||||
* @return Newly created FramebufferLayout object with default screen regions initialized
|
||||
*/
|
||||
FramebufferLayout SideFrameLayout(unsigned width, unsigned height, bool is_swapped);
|
||||
|
||||
/**
|
||||
|
|
|
@ -183,11 +183,11 @@ static u8 NibbleToHex(u8 n) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Converts input hex string characters into an array of equivalent of u8 bytes.
|
||||
*
|
||||
* @param src Pointer to array of output hex string characters.
|
||||
* @param len Length of src array.
|
||||
*/
|
||||
* Converts input hex string characters into an array of equivalent of u8 bytes.
|
||||
*
|
||||
* @param src Pointer to array of output hex string characters.
|
||||
* @param len Length of src array.
|
||||
*/
|
||||
static u32 HexToInt(const u8* src, size_t len) {
|
||||
u32 output = 0;
|
||||
while (len-- > 0) {
|
||||
|
@ -1037,4 +1037,4 @@ bool GetCpuStepFlag() {
|
|||
void SetCpuStepFlag(bool is_step) {
|
||||
step_loop = is_step;
|
||||
}
|
||||
};
|
||||
}; // namespace GDBStub
|
||||
|
|
|
@ -91,4 +91,4 @@ bool GetCpuStepFlag();
|
|||
* @param is_step
|
||||
*/
|
||||
void SetCpuStepFlag(bool is_step);
|
||||
}
|
||||
} // namespace GDBStub
|
||||
|
|
|
@ -31,7 +31,7 @@ struct hash<Service::APT::AppletId> {
|
|||
return std::hash<Type>()(static_cast<Type>(id_code));
|
||||
}
|
||||
};
|
||||
}
|
||||
} // namespace std
|
||||
|
||||
namespace HLE {
|
||||
namespace Applets {
|
||||
|
@ -134,5 +134,5 @@ void Init() {
|
|||
void Shutdown() {
|
||||
CoreTiming::RemoveEvent(applet_update_event);
|
||||
}
|
||||
}
|
||||
} // namespace
|
||||
} // namespace Applets
|
||||
} // namespace HLE
|
||||
|
|
|
@ -86,5 +86,5 @@ void Init();
|
|||
|
||||
/// Shuts down the HLE applets
|
||||
void Shutdown();
|
||||
}
|
||||
} // namespace
|
||||
} // namespace Applets
|
||||
} // namespace HLE
|
||||
|
|
|
@ -114,5 +114,5 @@ void SoftwareKeyboard::Finalize() {
|
|||
|
||||
is_running = false;
|
||||
}
|
||||
}
|
||||
} // namespace
|
||||
} // namespace Applets
|
||||
} // namespace HLE
|
||||
|
|
|
@ -82,5 +82,5 @@ private:
|
|||
/// Configuration of this instance of the SoftwareKeyboard, as received from the application
|
||||
SoftwareKeyboardConfig config;
|
||||
};
|
||||
}
|
||||
} // namespace
|
||||
} // namespace Applets
|
||||
} // namespace HLE
|
||||
|
|
|
@ -28,4 +28,4 @@ void Init() {
|
|||
config_mem.firm_ctr_sdk_ver = 0x0000F297;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
} // namespace ConfigMem
|
||||
|
|
|
@ -53,4 +53,4 @@ extern ConfigMemDef config_mem;
|
|||
|
||||
void Init();
|
||||
|
||||
} // namespace
|
||||
} // namespace ConfigMem
|
||||
|
|
|
@ -398,7 +398,7 @@ std::array<u32, N> RequestParser::PopHLEHandles() {
|
|||
}
|
||||
|
||||
inline Kernel::SharedPtr<Kernel::Object> RequestParser::PopGenericObject() {
|
||||
auto[handle] = PopHLEHandles<1>();
|
||||
auto [handle] = PopHLEHandles<1>();
|
||||
return context->GetIncomingHandle(handle);
|
||||
}
|
||||
|
||||
|
|
|
@ -39,4 +39,4 @@ ResultVal<SharedPtr<ClientSession>> ClientPort::Connect() {
|
|||
return MakeResult(std::get<SharedPtr<ClientSession>>(sessions));
|
||||
}
|
||||
|
||||
} // namespace
|
||||
} // namespace Kernel
|
||||
|
|
|
@ -47,4 +47,4 @@ private:
|
|||
~ClientPort() override;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
} // namespace Kernel
|
||||
|
|
|
@ -52,4 +52,4 @@ ResultCode ClientSession::SendSyncRequest(SharedPtr<Thread> thread) {
|
|||
return server->HandleSyncRequest(std::move(thread));
|
||||
}
|
||||
|
||||
} // namespace
|
||||
} // namespace Kernel
|
||||
|
|
|
@ -50,4 +50,4 @@ private:
|
|||
~ClientSession() override;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
} // namespace Kernel
|
||||
|
|
|
@ -52,4 +52,4 @@ void Event::WakeupAllWaitingThreads() {
|
|||
signaled = false;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
} // namespace Kernel
|
||||
|
|
|
@ -49,4 +49,4 @@ private:
|
|||
~Event() override;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
} // namespace Kernel
|
||||
|
|
|
@ -94,4 +94,4 @@ void HandleTable::Clear() {
|
|||
next_free_slot = 0;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
} // namespace Kernel
|
||||
|
|
|
@ -123,4 +123,4 @@ private:
|
|||
|
||||
extern HandleTable g_handle_table;
|
||||
|
||||
} // namespace
|
||||
} // namespace Kernel
|
||||
|
|
|
@ -36,8 +36,9 @@ SharedPtr<Event> HLERequestContext::SleepClientThread(SharedPtr<Thread> thread,
|
|||
std::chrono::nanoseconds timeout,
|
||||
WakeupCallback&& callback) {
|
||||
// Put the client thread to sleep until the wait event is signaled or the timeout expires.
|
||||
thread->wakeup_callback = [ context = *this, callback ](
|
||||
ThreadWakeupReason reason, SharedPtr<Thread> thread, SharedPtr<WaitObject> object) mutable {
|
||||
thread->wakeup_callback = [context = *this, callback](ThreadWakeupReason reason,
|
||||
SharedPtr<Thread> thread,
|
||||
SharedPtr<WaitObject> object) mutable {
|
||||
ASSERT(thread->status == THREADSTATUS_WAIT_HLE_EVENT);
|
||||
callback(thread, context, reason);
|
||||
|
||||
|
|
|
@ -45,4 +45,4 @@ void Shutdown() {
|
|||
Kernel::MemoryShutdown();
|
||||
}
|
||||
|
||||
} // namespace
|
||||
} // namespace Kernel
|
||||
|
|
|
@ -126,8 +126,9 @@ void HandleSpecialMapping(VMManager& address_space, const AddressMapping& mappin
|
|||
mapping_limit <= area.vaddr_base + area.size;
|
||||
});
|
||||
if (area == std::end(memory_areas)) {
|
||||
LOG_ERROR(Loader, "Unhandled special mapping: address=0x%08" PRIX32 " size=0x%" PRIX32
|
||||
" read_only=%d unk_flag=%d",
|
||||
LOG_ERROR(Loader,
|
||||
"Unhandled special mapping: address=0x%08" PRIX32 " size=0x%" PRIX32
|
||||
" read_only=%d unk_flag=%d",
|
||||
mapping.address, mapping.size, mapping.read_only, mapping.unk_flag);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -151,4 +151,4 @@ void ResourceLimitsInit() {
|
|||
|
||||
void ResourceLimitsShutdown() {}
|
||||
|
||||
} // namespace
|
||||
} // namespace Kernel
|
||||
|
|
|
@ -123,4 +123,4 @@ void ResourceLimitsInit();
|
|||
// Destroys the resource limits
|
||||
void ResourceLimitsShutdown();
|
||||
|
||||
} // namespace
|
||||
} // namespace Kernel
|
||||
|
|
|
@ -52,4 +52,4 @@ ResultVal<s32> Semaphore::Release(s32 release_count) {
|
|||
return MakeResult<s32>(previous_count);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
} // namespace Kernel
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <queue>
|
||||
#include <string>
|
||||
#include <queue>
|
||||
#include "common/common_types.h"
|
||||
#include "core/hle/kernel/kernel.h"
|
||||
#include "core/hle/kernel/wait_object.h"
|
||||
|
@ -56,4 +56,4 @@ private:
|
|||
~Semaphore() override;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
} // namespace Kernel
|
||||
|
|
|
@ -50,4 +50,4 @@ std::tuple<SharedPtr<ServerPort>, SharedPtr<ClientPort>> ServerPort::CreatePortP
|
|||
return std::make_tuple(std::move(server_port), std::move(client_port));
|
||||
}
|
||||
|
||||
} // namespace
|
||||
} // namespace Kernel
|
||||
|
|
|
@ -72,4 +72,4 @@ private:
|
|||
~ServerPort() override;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
} // namespace Kernel
|
||||
|
|
|
@ -9,4 +9,4 @@ namespace Kernel {
|
|||
|
||||
Session::Session() {}
|
||||
Session::~Session() {}
|
||||
}
|
||||
} // namespace Kernel
|
||||
|
|
|
@ -24,4 +24,4 @@ public:
|
|||
ServerSession* server = nullptr; ///< The server endpoint of the session.
|
||||
SharedPtr<ClientPort> port; ///< The port that this session is associated with (optional).
|
||||
};
|
||||
}
|
||||
} // namespace Kernel
|
||||
|
|
|
@ -98,10 +98,10 @@ public:
|
|||
ResultCode Unmap(Process* target_process, VAddr address);
|
||||
|
||||
/**
|
||||
* Gets a pointer to the shared memory block
|
||||
* @param offset Offset from the start of the shared memory block to get pointer
|
||||
* @return Pointer to the shared memory block from the specified offset
|
||||
*/
|
||||
* Gets a pointer to the shared memory block
|
||||
* @param offset Offset from the start of the shared memory block to get pointer
|
||||
* @return Pointer to the shared memory block from the specified offset
|
||||
*/
|
||||
u8* GetPointer(u32 offset = 0);
|
||||
|
||||
/// Process that created this shared memory block.
|
||||
|
@ -129,4 +129,4 @@ private:
|
|||
~SharedMemory() override;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
} // namespace Kernel
|
||||
|
|
|
@ -288,7 +288,6 @@ static ResultCode WaitSynchronization1(Handle handle, s64 nano_seconds) {
|
|||
|
||||
thread->wakeup_callback = [](ThreadWakeupReason reason, SharedPtr<Thread> thread,
|
||||
SharedPtr<WaitObject> object) {
|
||||
|
||||
ASSERT(thread->status == THREADSTATUS_WAIT_SYNCH_ANY);
|
||||
|
||||
if (reason == ThreadWakeupReason::Timeout) {
|
||||
|
@ -378,7 +377,6 @@ static ResultCode WaitSynchronizationN(s32* out, VAddr handles_address, s32 hand
|
|||
|
||||
thread->wakeup_callback = [](ThreadWakeupReason reason, SharedPtr<Thread> thread,
|
||||
SharedPtr<WaitObject> object) {
|
||||
|
||||
ASSERT(thread->status == THREADSTATUS_WAIT_SYNCH_ALL);
|
||||
|
||||
if (reason == ThreadWakeupReason::Timeout) {
|
||||
|
@ -439,7 +437,6 @@ static ResultCode WaitSynchronizationN(s32* out, VAddr handles_address, s32 hand
|
|||
|
||||
thread->wakeup_callback = [](ThreadWakeupReason reason, SharedPtr<Thread> thread,
|
||||
SharedPtr<WaitObject> object) {
|
||||
|
||||
ASSERT(thread->status == THREADSTATUS_WAIT_SYNCH_ANY);
|
||||
|
||||
if (reason == ThreadWakeupReason::Timeout) {
|
||||
|
@ -591,7 +588,6 @@ static ResultCode ReplyAndReceive(s32* index, VAddr handles_address, s32 handle_
|
|||
|
||||
thread->wakeup_callback = [](ThreadWakeupReason reason, SharedPtr<Thread> thread,
|
||||
SharedPtr<WaitObject> object) {
|
||||
|
||||
ASSERT(thread->status == THREADSTATUS_WAIT_SYNCH_ANY);
|
||||
ASSERT(reason == ThreadWakeupReason::Signal);
|
||||
|
||||
|
@ -770,8 +766,9 @@ static ResultCode CreateThread(Handle* out_handle, u32 priority, u32 entry_point
|
|||
|
||||
Core::System::GetInstance().PrepareReschedule();
|
||||
|
||||
LOG_TRACE(Kernel_SVC, "called entrypoint=0x%08X (%s), arg=0x%08X, stacktop=0x%08X, "
|
||||
"threadpriority=0x%08X, processorid=0x%08X : created handle=0x%08X",
|
||||
LOG_TRACE(Kernel_SVC,
|
||||
"called entrypoint=0x%08X (%s), arg=0x%08X, stacktop=0x%08X, "
|
||||
"threadpriority=0x%08X, processorid=0x%08X : created handle=0x%08X",
|
||||
entry_point, name.c_str(), arg, stack_top, priority, processor_id, *out_handle);
|
||||
|
||||
return RESULT_SUCCESS;
|
||||
|
|
|
@ -111,4 +111,4 @@ void TimersInit() {
|
|||
|
||||
void TimersShutdown() {}
|
||||
|
||||
} // namespace
|
||||
} // namespace Kernel
|
||||
|
|
|
@ -76,4 +76,4 @@ void TimersInit();
|
|||
/// Tears down the timer variables
|
||||
void TimersShutdown();
|
||||
|
||||
} // namespace
|
||||
} // namespace Kernel
|
||||
|
|
|
@ -9,9 +9,15 @@
|
|||
namespace Service {
|
||||
namespace ACT {
|
||||
|
||||
void Init() {
|
||||
AddService(new ACT_A);
|
||||
AddService(new ACT_U);
|
||||
Module::Interface::Interface(std::shared_ptr<Module> act, const char* name)
|
||||
: ServiceFramework(name, 1 /* Placeholder */), act(std::move(act)) {}
|
||||
|
||||
Module::Interface::~Interface() = default;
|
||||
|
||||
void InstallInterfaces(SM::ServiceManager& service_manager) {
|
||||
auto act = std::make_shared<Module>();
|
||||
std::make_shared<ACT_A>(act)->InstallAsService(service_manager);
|
||||
std::make_shared<ACT_U>(act)->InstallAsService(service_manager);
|
||||
}
|
||||
|
||||
} // namespace ACT
|
||||
|
|
|
@ -4,11 +4,25 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "core/hle/service/service.h"
|
||||
|
||||
namespace Service {
|
||||
namespace ACT {
|
||||
|
||||
/// Initializes all ACT services
|
||||
void Init();
|
||||
class Module final {
|
||||
public:
|
||||
class Interface : public ServiceFramework<Interface> {
|
||||
public:
|
||||
Interface(std::shared_ptr<Module> act, const char* name);
|
||||
~Interface();
|
||||
|
||||
private:
|
||||
std::shared_ptr<Module> act;
|
||||
};
|
||||
};
|
||||
|
||||
void InstallInterfaces(SM::ServiceManager& service_manager);
|
||||
|
||||
} // namespace ACT
|
||||
} // namespace Service
|
||||
|
|
|
@ -2,28 +2,26 @@
|
|||
// 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"
|
||||
|
||||
namespace Service {
|
||||
namespace ACT {
|
||||
|
||||
const Interface::FunctionInfo FunctionTable[] = {
|
||||
// act:u shared commands
|
||||
{0x00010084, nullptr, "Initialize"},
|
||||
{0x00020040, nullptr, "GetErrorCode"},
|
||||
{0x000600C2, nullptr, "GetAccountDataBlock"},
|
||||
{0x000B0042, nullptr, "AcquireEulaList"},
|
||||
{0x000D0040, nullptr, "GenerateUuid"},
|
||||
// act:a
|
||||
{0x041300C2, nullptr, "UpdateMiiImage"},
|
||||
{0x041B0142, nullptr, "AgreeEula"},
|
||||
{0x04210042, nullptr, "UploadMii"},
|
||||
{0x04230082, nullptr, "ValidateMailAddress"},
|
||||
};
|
||||
|
||||
ACT_A::ACT_A() {
|
||||
Register(FunctionTable);
|
||||
ACT_A::ACT_A(std::shared_ptr<Module> act) : Module::Interface(std::move(act), "act:a") {
|
||||
const FunctionInfo functions[] = {
|
||||
// act:u shared commands
|
||||
{0x00010084, nullptr, "Initialize"},
|
||||
{0x00020040, nullptr, "GetErrorCode"},
|
||||
{0x000600C2, nullptr, "GetAccountDataBlock"},
|
||||
{0x000B0042, nullptr, "AcquireEulaList"},
|
||||
{0x000D0040, nullptr, "GenerateUuid"},
|
||||
// act:a
|
||||
{0x041300C2, nullptr, "UpdateMiiImage"},
|
||||
{0x041B0142, nullptr, "AgreeEula"},
|
||||
{0x04210042, nullptr, "UploadMii"},
|
||||
{0x04230082, nullptr, "ValidateMailAddress"},
|
||||
};
|
||||
RegisterHandlers(functions);
|
||||
}
|
||||
|
||||
} // namespace ACT
|
||||
|
|
|
@ -4,18 +4,14 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "core/hle/service/service.h"
|
||||
#include "core/hle/service/act/act.h"
|
||||
|
||||
namespace Service {
|
||||
namespace ACT {
|
||||
|
||||
class ACT_A final : public Service::Interface {
|
||||
class ACT_A final : public Module::Interface {
|
||||
public:
|
||||
ACT_A();
|
||||
|
||||
std::string GetPortName() const override {
|
||||
return "act:a";
|
||||
}
|
||||
explicit ACT_A(std::shared_ptr<Module> act);
|
||||
};
|
||||
|
||||
} // namespace ACT
|
||||
|
|
|
@ -2,24 +2,22 @@
|
|||
// 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_u.h"
|
||||
|
||||
namespace Service {
|
||||
namespace ACT {
|
||||
|
||||
const Interface::FunctionInfo FunctionTable[] = {
|
||||
// clang-format off
|
||||
{0x00010084, nullptr, "Initialize"},
|
||||
{0x00020040, nullptr, "GetErrorCode"},
|
||||
{0x000600C2, nullptr, "GetAccountDataBlock"},
|
||||
{0x000B0042, nullptr, "AcquireEulaList"},
|
||||
{0x000D0040, nullptr, "GenerateUuid"},
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
ACT_U::ACT_U() {
|
||||
Register(FunctionTable);
|
||||
ACT_U::ACT_U(std::shared_ptr<Module> act) : Module::Interface(std::move(act), "act:u") {
|
||||
static const FunctionInfo functions[] = {
|
||||
// clang-format off
|
||||
{0x00010084, nullptr, "Initialize"},
|
||||
{0x00020040, nullptr, "GetErrorCode"},
|
||||
{0x000600C2, nullptr, "GetAccountDataBlock"},
|
||||
{0x000B0042, nullptr, "AcquireEulaList"},
|
||||
{0x000D0040, nullptr, "GenerateUuid"},
|
||||
// clang-format on
|
||||
};
|
||||
RegisterHandlers(functions);
|
||||
}
|
||||
|
||||
} // namespace ACT
|
||||
|
|
|
@ -4,18 +4,14 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "core/hle/service/service.h"
|
||||
#include "core/hle/service/act/act.h"
|
||||
|
||||
namespace Service {
|
||||
namespace ACT {
|
||||
|
||||
class ACT_U final : public Interface {
|
||||
class ACT_U final : public Module::Interface {
|
||||
public:
|
||||
ACT_U();
|
||||
|
||||
std::string GetPortName() const override {
|
||||
return "act:u";
|
||||
}
|
||||
explicit ACT_U(std::shared_ptr<Module> act);
|
||||
};
|
||||
|
||||
} // namespace ACT
|
||||
|
|
|
@ -18,7 +18,7 @@ namespace Service {
|
|||
namespace FS {
|
||||
enum class MediaType : u32;
|
||||
}
|
||||
}
|
||||
} // namespace Service
|
||||
|
||||
namespace Service {
|
||||
namespace AM {
|
||||
|
|
|
@ -306,8 +306,9 @@ void Module::Interface::SendParameter(Kernel::HLERequestContext& ctx) {
|
|||
Kernel::SharedPtr<Kernel::Object> object = rp.PopGenericObject();
|
||||
std::vector<u8> buffer = rp.PopStaticBuffer();
|
||||
|
||||
LOG_DEBUG(Service_APT, "called src_app_id=0x%08X, dst_app_id=0x%08X, signal_type=0x%08X,"
|
||||
"buffer_size=0x%08X",
|
||||
LOG_DEBUG(Service_APT,
|
||||
"called src_app_id=0x%08X, dst_app_id=0x%08X, signal_type=0x%08X,"
|
||||
"buffer_size=0x%08X",
|
||||
static_cast<u32>(src_app_id), static_cast<u32>(dst_app_id),
|
||||
static_cast<u32>(signal_type), buffer_size);
|
||||
|
||||
|
@ -392,8 +393,9 @@ void Module::Interface::CancelParameter(Kernel::HLERequestContext& ctx) {
|
|||
rb.Push(apt->applet_manager->CancelParameter(check_sender, sender_appid, check_receiver,
|
||||
receiver_appid));
|
||||
|
||||
LOG_DEBUG(Service_APT, "called check_sender=%u, sender_appid=0x%08X, "
|
||||
"check_receiver=%u, receiver_appid=0x%08X",
|
||||
LOG_DEBUG(Service_APT,
|
||||
"called check_sender=%u, sender_appid=0x%08X, "
|
||||
"check_receiver=%u, receiver_appid=0x%08X",
|
||||
check_sender, static_cast<u32>(sender_appid), check_receiver,
|
||||
static_cast<u32>(receiver_appid));
|
||||
}
|
||||
|
|
|
@ -111,9 +111,10 @@ void RegisterPrivateClientCert(Service::Interface* self) {
|
|||
cmd_buff[2] = (buff2_size << 4 | 0xA);
|
||||
cmd_buff[3] = buff2_addr;
|
||||
|
||||
LOG_WARNING(Service_BOSS, "(STUBBED) unk_param1=0x%08X, unk_param2=0x%08X, "
|
||||
"translation1=0x%08X, buff1_addr=0x%08X, buff1_size=0x%08X, "
|
||||
"translation2=0x%08X, buff2_addr=0x%08X, buff2_size=0x%08X",
|
||||
LOG_WARNING(Service_BOSS,
|
||||
"(STUBBED) unk_param1=0x%08X, unk_param2=0x%08X, "
|
||||
"translation1=0x%08X, buff1_addr=0x%08X, buff1_size=0x%08X, "
|
||||
"translation2=0x%08X, buff2_addr=0x%08X, buff2_size=0x%08X",
|
||||
unk_param1, unk_param2, translation1, buff1_addr, buff1_size, translation2,
|
||||
buff2_addr, buff2_size);
|
||||
}
|
||||
|
@ -177,8 +178,9 @@ void RegisterTask(Service::Interface* self) {
|
|||
cmd_buff[2] = (buff_size << 4 | 0xA);
|
||||
cmd_buff[3] = buff_addr;
|
||||
|
||||
LOG_WARNING(Service_BOSS, "(STUBBED) unk_param1=0x%08X, unk_param2=0x%08X, unk_param3=0x%08X, "
|
||||
"translation=0x%08X, buff_addr=0x%08X, buff_size=0x%08X",
|
||||
LOG_WARNING(Service_BOSS,
|
||||
"(STUBBED) unk_param1=0x%08X, unk_param2=0x%08X, unk_param3=0x%08X, "
|
||||
"translation=0x%08X, buff_addr=0x%08X, buff_size=0x%08X",
|
||||
unk_param1, unk_param2, unk_param3, translation, buff_addr, buff_size);
|
||||
}
|
||||
|
||||
|
@ -196,8 +198,9 @@ void UnregisterTask(Service::Interface* self) {
|
|||
cmd_buff[2] = (buff_size << 4 | 0xA);
|
||||
cmd_buff[3] = buff_addr;
|
||||
|
||||
LOG_WARNING(Service_BOSS, "(STUBBED) unk_param1=0x%08X, unk_param2=0x%08X, translation=0x%08X, "
|
||||
"buff_addr=0x%08X, buff_size=0x%08X",
|
||||
LOG_WARNING(Service_BOSS,
|
||||
"(STUBBED) unk_param1=0x%08X, unk_param2=0x%08X, translation=0x%08X, "
|
||||
"buff_addr=0x%08X, buff_size=0x%08X",
|
||||
unk_param1, unk_param2, translation, buff_addr, buff_size);
|
||||
}
|
||||
|
||||
|
@ -215,8 +218,9 @@ void ReconfigureTask(Service::Interface* self) {
|
|||
cmd_buff[2] = (buff_size << 4 | 0xA);
|
||||
cmd_buff[3] = buff_addr;
|
||||
|
||||
LOG_WARNING(Service_BOSS, "(STUBBED) unk_param1=0x%08X, unk_param2=0x%08X, translation=0x%08X, "
|
||||
"buff_addr=0x%08X, buff_size=0x%08X",
|
||||
LOG_WARNING(Service_BOSS,
|
||||
"(STUBBED) unk_param1=0x%08X, unk_param2=0x%08X, translation=0x%08X, "
|
||||
"buff_addr=0x%08X, buff_size=0x%08X",
|
||||
unk_param1, unk_param2, translation, buff_addr, buff_size);
|
||||
}
|
||||
|
||||
|
@ -263,9 +267,10 @@ void GetNsDataIdList(Service::Interface* self) {
|
|||
cmd_buff[4] = (buff_size << 4 | 0xC);
|
||||
cmd_buff[5] = buff_addr;
|
||||
|
||||
LOG_WARNING(Service_BOSS, "(STUBBED) unk_param1=0x%08X, unk_param2=0x%08X, unk_param3=0x%08X, "
|
||||
"unk_param4=0x%08X, translation=0x%08X, "
|
||||
"buff_addr=0x%08X, buff_size=0x%08X",
|
||||
LOG_WARNING(Service_BOSS,
|
||||
"(STUBBED) unk_param1=0x%08X, unk_param2=0x%08X, unk_param3=0x%08X, "
|
||||
"unk_param4=0x%08X, translation=0x%08X, "
|
||||
"buff_addr=0x%08X, buff_size=0x%08X",
|
||||
unk_param1, unk_param2, unk_param3, unk_param4, translation, buff_addr, buff_size);
|
||||
}
|
||||
|
||||
|
@ -287,9 +292,10 @@ void GetOwnNsDataIdList(Service::Interface* self) {
|
|||
cmd_buff[4] = (buff_size << 4 | 0xC);
|
||||
cmd_buff[5] = buff_addr;
|
||||
|
||||
LOG_WARNING(Service_BOSS, "(STUBBED) unk_param1=0x%08X, unk_param2=0x%08X, unk_param3=0x%08X, "
|
||||
"unk_param4=0x%08X, translation=0x%08X, "
|
||||
"buff_addr=0x%08X, buff_size=0x%08X",
|
||||
LOG_WARNING(Service_BOSS,
|
||||
"(STUBBED) unk_param1=0x%08X, unk_param2=0x%08X, unk_param3=0x%08X, "
|
||||
"unk_param4=0x%08X, translation=0x%08X, "
|
||||
"buff_addr=0x%08X, buff_size=0x%08X",
|
||||
unk_param1, unk_param2, unk_param3, unk_param4, translation, buff_addr, buff_size);
|
||||
}
|
||||
|
||||
|
@ -311,9 +317,10 @@ void GetNewDataNsDataIdList(Service::Interface* self) {
|
|||
cmd_buff[4] = (buff_size << 4 | 0xC);
|
||||
cmd_buff[5] = buff_addr;
|
||||
|
||||
LOG_WARNING(Service_BOSS, "(STUBBED) unk_param1=0x%08X, unk_param2=0x%08X, unk_param3=0x%08X, "
|
||||
"unk_param4=0x%08X, translation=0x%08X, "
|
||||
"buff_addr=0x%08X, buff_size=0x%08X",
|
||||
LOG_WARNING(Service_BOSS,
|
||||
"(STUBBED) unk_param1=0x%08X, unk_param2=0x%08X, unk_param3=0x%08X, "
|
||||
"unk_param4=0x%08X, translation=0x%08X, "
|
||||
"buff_addr=0x%08X, buff_size=0x%08X",
|
||||
unk_param1, unk_param2, unk_param3, unk_param4, translation, buff_addr, buff_size);
|
||||
}
|
||||
|
||||
|
@ -335,9 +342,10 @@ void GetOwnNewDataNsDataIdList(Service::Interface* self) {
|
|||
cmd_buff[4] = (buff_size << 4 | 0xC);
|
||||
cmd_buff[5] = buff_addr;
|
||||
|
||||
LOG_WARNING(Service_BOSS, "(STUBBED) unk_param1=0x%08X, unk_param2=0x%08X, unk_param3=0x%08X, "
|
||||
"unk_param4=0x%08X, translation=0x%08X, "
|
||||
"buff_addr=0x%08X, buff_size=0x%08X",
|
||||
LOG_WARNING(Service_BOSS,
|
||||
"(STUBBED) unk_param1=0x%08X, unk_param2=0x%08X, unk_param3=0x%08X, "
|
||||
"unk_param4=0x%08X, translation=0x%08X, "
|
||||
"buff_addr=0x%08X, buff_size=0x%08X",
|
||||
unk_param1, unk_param2, unk_param3, unk_param4, translation, buff_addr, buff_size);
|
||||
}
|
||||
|
||||
|
@ -355,8 +363,9 @@ void SendProperty(Service::Interface* self) {
|
|||
cmd_buff[2] = (buff_size << 4 | 0xA);
|
||||
cmd_buff[3] = buff_addr;
|
||||
|
||||
LOG_WARNING(Service_BOSS, "(STUBBED) unk_param1=0x%08X, unk_param2=0x%08X, translation=0x%08X, "
|
||||
"buff_addr=0x%08X, buff_size=0x%08X",
|
||||
LOG_WARNING(Service_BOSS,
|
||||
"(STUBBED) unk_param1=0x%08X, unk_param2=0x%08X, translation=0x%08X, "
|
||||
"buff_addr=0x%08X, buff_size=0x%08X",
|
||||
unk_param1, unk_param2, translation, buff_addr, buff_size);
|
||||
}
|
||||
|
||||
|
@ -373,8 +382,9 @@ void SendPropertyHandle(Service::Interface* self) {
|
|||
cmd_buff[2] = (buff_size << 4 | 0xA);
|
||||
cmd_buff[3] = buff_addr;
|
||||
|
||||
LOG_WARNING(Service_BOSS, "(STUBBED) unk_param1=0x%08X, translation=0x%08X, "
|
||||
"buff_addr=0x%08X, buff_size=0x%08X",
|
||||
LOG_WARNING(Service_BOSS,
|
||||
"(STUBBED) unk_param1=0x%08X, translation=0x%08X, "
|
||||
"buff_addr=0x%08X, buff_size=0x%08X",
|
||||
unk_param1, translation, buff_addr, buff_size);
|
||||
}
|
||||
|
||||
|
@ -392,8 +402,9 @@ void ReceiveProperty(Service::Interface* self) {
|
|||
cmd_buff[2] = (buff_size << 4 | 0xC);
|
||||
cmd_buff[3] = buff_addr;
|
||||
|
||||
LOG_WARNING(Service_BOSS, "(STUBBED) unk_param1=0x%08X, buff_size=0x%08X, "
|
||||
"translation=0x%08X, buff_addr=0x%08X",
|
||||
LOG_WARNING(Service_BOSS,
|
||||
"(STUBBED) unk_param1=0x%08X, buff_size=0x%08X, "
|
||||
"translation=0x%08X, buff_addr=0x%08X",
|
||||
unk_param1, buff_size, translation, buff_addr);
|
||||
}
|
||||
|
||||
|
@ -411,8 +422,9 @@ void UpdateTaskInterval(Service::Interface* self) {
|
|||
cmd_buff[2] = (buff_size << 4 | 0xA);
|
||||
cmd_buff[3] = buff_addr;
|
||||
|
||||
LOG_WARNING(Service_BOSS, "(STUBBED) unk_param1=0x%08X, unk_param2=0x%08X, "
|
||||
"translation=0x%08X, buff_addr=0x%08X, buff_size=0x%08X",
|
||||
LOG_WARNING(Service_BOSS,
|
||||
"(STUBBED) unk_param1=0x%08X, unk_param2=0x%08X, "
|
||||
"translation=0x%08X, buff_addr=0x%08X, buff_size=0x%08X",
|
||||
unk_param1, unk_param2, translation, buff_addr, buff_size);
|
||||
}
|
||||
|
||||
|
@ -429,8 +441,9 @@ void UpdateTaskCount(Service::Interface* self) {
|
|||
cmd_buff[2] = (buff_size << 4 | 0xA);
|
||||
cmd_buff[3] = buff_addr;
|
||||
|
||||
LOG_WARNING(Service_BOSS, "(STUBBED) buff_size=0x%08X, unk_param2=0x%08X, "
|
||||
"translation=0x%08X, buff_addr=0x%08X",
|
||||
LOG_WARNING(Service_BOSS,
|
||||
"(STUBBED) buff_size=0x%08X, unk_param2=0x%08X, "
|
||||
"translation=0x%08X, buff_addr=0x%08X",
|
||||
buff_size, unk_param2, translation, buff_addr);
|
||||
}
|
||||
|
||||
|
@ -448,8 +461,9 @@ void GetTaskInterval(Service::Interface* self) {
|
|||
cmd_buff[3] = (buff_size << 4 | 0xA);
|
||||
cmd_buff[4] = buff_addr;
|
||||
|
||||
LOG_WARNING(Service_BOSS, "(STUBBED) unk_param1=0x%08X, translation=0x%08X, "
|
||||
"buff_addr=0x%08X, buff_size=0x%08X",
|
||||
LOG_WARNING(Service_BOSS,
|
||||
"(STUBBED) unk_param1=0x%08X, translation=0x%08X, "
|
||||
"buff_addr=0x%08X, buff_size=0x%08X",
|
||||
unk_param1, translation, buff_addr, buff_size);
|
||||
}
|
||||
|
||||
|
@ -467,8 +481,9 @@ void GetTaskCount(Service::Interface* self) {
|
|||
cmd_buff[3] = (buff_size << 4 | 0xA);
|
||||
cmd_buff[4] = buff_addr;
|
||||
|
||||
LOG_WARNING(Service_BOSS, "(STUBBED) unk_param1=0x%08X, translation=0x%08X, "
|
||||
"buff_addr=0x%08X, buff_size=0x%08X",
|
||||
LOG_WARNING(Service_BOSS,
|
||||
"(STUBBED) unk_param1=0x%08X, translation=0x%08X, "
|
||||
"buff_addr=0x%08X, buff_size=0x%08X",
|
||||
unk_param1, translation, buff_addr, buff_size);
|
||||
}
|
||||
|
||||
|
@ -486,8 +501,9 @@ void GetTaskServiceStatus(Service::Interface* self) {
|
|||
cmd_buff[3] = (buff_size << 4 | 0xA);
|
||||
cmd_buff[4] = buff_addr;
|
||||
|
||||
LOG_WARNING(Service_BOSS, "(STUBBED) unk_param1=0x%08X, translation=0x%08X, "
|
||||
"buff_addr=0x%08X, buff_size=0x%08X",
|
||||
LOG_WARNING(Service_BOSS,
|
||||
"(STUBBED) unk_param1=0x%08X, translation=0x%08X, "
|
||||
"buff_addr=0x%08X, buff_size=0x%08X",
|
||||
unk_param1, translation, buff_addr, buff_size);
|
||||
}
|
||||
|
||||
|
@ -504,8 +520,9 @@ void StartTask(Service::Interface* self) {
|
|||
cmd_buff[2] = (buff_size << 4 | 0xA);
|
||||
cmd_buff[3] = buff_addr;
|
||||
|
||||
LOG_WARNING(Service_BOSS, "(STUBBED) unk_param1=0x%08X, translation=0x%08X, "
|
||||
"buff_addr=0x%08X, buff_size=0x%08X",
|
||||
LOG_WARNING(Service_BOSS,
|
||||
"(STUBBED) unk_param1=0x%08X, translation=0x%08X, "
|
||||
"buff_addr=0x%08X, buff_size=0x%08X",
|
||||
unk_param1, translation, buff_addr, buff_size);
|
||||
}
|
||||
|
||||
|
@ -522,8 +539,9 @@ void StartTaskImmediate(Service::Interface* self) {
|
|||
cmd_buff[2] = (buff_size << 4 | 0xA);
|
||||
cmd_buff[3] = buff_addr;
|
||||
|
||||
LOG_WARNING(Service_BOSS, "(STUBBED) unk_param1=0x%08X, translation=0x%08X, "
|
||||
"buff_addr=0x%08X, buff_size=0x%08X",
|
||||
LOG_WARNING(Service_BOSS,
|
||||
"(STUBBED) unk_param1=0x%08X, translation=0x%08X, "
|
||||
"buff_addr=0x%08X, buff_size=0x%08X",
|
||||
unk_param1, translation, buff_addr, buff_size);
|
||||
}
|
||||
|
||||
|
@ -540,8 +558,9 @@ void CancelTask(Service::Interface* self) {
|
|||
cmd_buff[2] = (buff_size << 4 | 0xA);
|
||||
cmd_buff[3] = buff_addr;
|
||||
|
||||
LOG_WARNING(Service_BOSS, "(STUBBED) unk_param1=0x%08X, translation=0x%08X, "
|
||||
"buff_addr=0x%08X, buff_size=0x%08X",
|
||||
LOG_WARNING(Service_BOSS,
|
||||
"(STUBBED) unk_param1=0x%08X, translation=0x%08X, "
|
||||
"buff_addr=0x%08X, buff_size=0x%08X",
|
||||
unk_param1, translation, buff_addr, buff_size);
|
||||
}
|
||||
|
||||
|
@ -572,8 +591,9 @@ void GetTaskState(Service::Interface* self) {
|
|||
cmd_buff[5] = (buff_size << 4 | 0xA);
|
||||
cmd_buff[6] = buff_addr;
|
||||
|
||||
LOG_WARNING(Service_BOSS, "(STUBBED) buff_size=0x%08X, unk_param2=0x%08X, "
|
||||
"translation=0x%08X, buff_addr=0x%08X",
|
||||
LOG_WARNING(Service_BOSS,
|
||||
"(STUBBED) buff_size=0x%08X, unk_param2=0x%08X, "
|
||||
"translation=0x%08X, buff_addr=0x%08X",
|
||||
buff_size, unk_param2, translation, buff_addr);
|
||||
}
|
||||
|
||||
|
@ -593,8 +613,9 @@ void GetTaskResult(Service::Interface* self) {
|
|||
cmd_buff[5] = (buff_size << 4 | 0xA);
|
||||
cmd_buff[6] = buff_addr;
|
||||
|
||||
LOG_WARNING(Service_BOSS, "(STUBBED) unk_param1=0x%08X, translation=0x%08X, "
|
||||
"buff_addr=0x%08X, buff_size=0x%08X",
|
||||
LOG_WARNING(Service_BOSS,
|
||||
"(STUBBED) unk_param1=0x%08X, translation=0x%08X, "
|
||||
"buff_addr=0x%08X, buff_size=0x%08X",
|
||||
unk_param1, translation, buff_addr, buff_size);
|
||||
}
|
||||
|
||||
|
@ -614,8 +635,9 @@ void GetTaskCommErrorCode(Service::Interface* self) {
|
|||
cmd_buff[5] = (buff_size << 4 | 0xA);
|
||||
cmd_buff[6] = buff_addr;
|
||||
|
||||
LOG_WARNING(Service_BOSS, "(STUBBED) unk_param1=0x%08X, translation=0x%08X, "
|
||||
"buff_addr=0x%08X, buff_size=0x%08X",
|
||||
LOG_WARNING(Service_BOSS,
|
||||
"(STUBBED) unk_param1=0x%08X, translation=0x%08X, "
|
||||
"buff_addr=0x%08X, buff_size=0x%08X",
|
||||
unk_param1, translation, buff_addr, buff_size);
|
||||
}
|
||||
|
||||
|
@ -635,8 +657,9 @@ void GetTaskStatus(Service::Interface* self) {
|
|||
cmd_buff[3] = (buff_size << 4 | 0xA);
|
||||
cmd_buff[4] = buff_addr;
|
||||
|
||||
LOG_WARNING(Service_BOSS, "(STUBBED) unk_param1=0x%08X, unk_param2=0x%08X, unk_param3=0x%08X, "
|
||||
"translation=0x%08X, buff_addr=0x%08X, buff_size=0x%08X",
|
||||
LOG_WARNING(Service_BOSS,
|
||||
"(STUBBED) unk_param1=0x%08X, unk_param2=0x%08X, unk_param3=0x%08X, "
|
||||
"translation=0x%08X, buff_addr=0x%08X, buff_size=0x%08X",
|
||||
unk_param1, unk_param2, unk_param3, translation, buff_addr, buff_size);
|
||||
}
|
||||
|
||||
|
@ -655,8 +678,9 @@ void GetTaskError(Service::Interface* self) {
|
|||
cmd_buff[3] = (buff_size << 4 | 0xA);
|
||||
cmd_buff[4] = buff_addr;
|
||||
|
||||
LOG_WARNING(Service_BOSS, "(STUBBED) unk_param1=0x%08X, unk_param2=0x%08X, translation=0x%08X, "
|
||||
"buff_addr=0x%08X, buff_size=0x%08X",
|
||||
LOG_WARNING(Service_BOSS,
|
||||
"(STUBBED) unk_param1=0x%08X, unk_param2=0x%08X, translation=0x%08X, "
|
||||
"buff_addr=0x%08X, buff_size=0x%08X",
|
||||
unk_param1, unk_param2, translation, buff_addr, buff_size);
|
||||
}
|
||||
|
||||
|
@ -674,8 +698,9 @@ void GetTaskInfo(Service::Interface* self) {
|
|||
cmd_buff[2] = (buff_size << 4 | 0xA);
|
||||
cmd_buff[3] = buff_addr;
|
||||
|
||||
LOG_WARNING(Service_BOSS, "(STUBBED) unk_param1=0x%08X, unk_param2=0x%08X, translation=0x%08X, "
|
||||
"buff_addr=0x%08X, buff_size=0x%08X",
|
||||
LOG_WARNING(Service_BOSS,
|
||||
"(STUBBED) unk_param1=0x%08X, unk_param2=0x%08X, translation=0x%08X, "
|
||||
"buff_addr=0x%08X, buff_size=0x%08X",
|
||||
unk_param1, unk_param2, translation, buff_addr, buff_size);
|
||||
}
|
||||
|
||||
|
@ -705,8 +730,9 @@ void GetNsDataHeaderInfo(Service::Interface* self) {
|
|||
cmd_buff[2] = (buff_size << 4 | 0xC);
|
||||
cmd_buff[3] = buff_addr;
|
||||
|
||||
LOG_WARNING(Service_BOSS, "(STUBBED) unk_param1=0x%08X, unk_param2=0x%08X, unk_param3=0x%08X, "
|
||||
"translation=0x%08X, buff_addr=0x%08X, buff_size=0x%08X",
|
||||
LOG_WARNING(Service_BOSS,
|
||||
"(STUBBED) unk_param1=0x%08X, unk_param2=0x%08X, unk_param3=0x%08X, "
|
||||
"translation=0x%08X, buff_addr=0x%08X, buff_size=0x%08X",
|
||||
unk_param1, unk_param2, unk_param3, translation, buff_addr, buff_size);
|
||||
}
|
||||
|
||||
|
@ -728,9 +754,10 @@ void ReadNsData(Service::Interface* self) {
|
|||
cmd_buff[4] = (buff_size << 4 | 0xC);
|
||||
cmd_buff[5] = buff_addr;
|
||||
|
||||
LOG_WARNING(Service_BOSS, "(STUBBED) unk_param1=0x%08X, unk_param2=0x%08X, unk_param3=0x%08X, "
|
||||
"unk_param4=0x%08X, translation=0x%08X, "
|
||||
"buff_addr=0x%08X, buff_size=0x%08X",
|
||||
LOG_WARNING(Service_BOSS,
|
||||
"(STUBBED) unk_param1=0x%08X, unk_param2=0x%08X, unk_param3=0x%08X, "
|
||||
"unk_param4=0x%08X, translation=0x%08X, "
|
||||
"buff_addr=0x%08X, buff_size=0x%08X",
|
||||
unk_param1, unk_param2, unk_param3, unk_param4, translation, buff_addr, buff_size);
|
||||
}
|
||||
|
||||
|
@ -822,8 +849,9 @@ void RegisterStorageEntry(Service::Interface* self) {
|
|||
cmd_buff[0] = IPC::MakeHeader(0x2F, 0x1, 0);
|
||||
cmd_buff[1] = RESULT_SUCCESS.raw;
|
||||
|
||||
LOG_WARNING(Service_BOSS, "(STUBBED) unk_param1=0x%08X, unk_param2=0x%08X, unk_param3=0x%08X, "
|
||||
"unk_param4=0x%08X, unk_param5=0x%08X",
|
||||
LOG_WARNING(Service_BOSS,
|
||||
"(STUBBED) unk_param1=0x%08X, unk_param2=0x%08X, unk_param3=0x%08X, "
|
||||
"unk_param4=0x%08X, unk_param5=0x%08X",
|
||||
unk_param1, unk_param2, unk_param3, unk_param4, unk_param5);
|
||||
}
|
||||
|
||||
|
@ -849,8 +877,9 @@ void SetStorageOption(Service::Interface* self) {
|
|||
cmd_buff[0] = IPC::MakeHeader(0x31, 0x1, 0);
|
||||
cmd_buff[1] = RESULT_SUCCESS.raw;
|
||||
|
||||
LOG_WARNING(Service_BOSS, "(STUBBED) unk_param1=0x%08X, unk_param2=0x%08X, "
|
||||
"unk_param3=0x%08X, unk_param4=0x%08X",
|
||||
LOG_WARNING(Service_BOSS,
|
||||
"(STUBBED) unk_param1=0x%08X, unk_param2=0x%08X, "
|
||||
"unk_param3=0x%08X, unk_param4=0x%08X",
|
||||
unk_param1, unk_param2, unk_param3, unk_param4);
|
||||
}
|
||||
|
||||
|
@ -880,8 +909,9 @@ void StartBgImmediate(Service::Interface* self) {
|
|||
cmd_buff[2] = (buff_size << 4 | 0xA);
|
||||
cmd_buff[3] = buff_addr;
|
||||
|
||||
LOG_WARNING(Service_BOSS, "(STUBBED) buff_size=0x%08X, unk_param2=0x%08X, "
|
||||
"translation=0x%08X, buff_addr=0x%08X",
|
||||
LOG_WARNING(Service_BOSS,
|
||||
"(STUBBED) buff_size=0x%08X, unk_param2=0x%08X, "
|
||||
"translation=0x%08X, buff_addr=0x%08X",
|
||||
unk_param1, translation, buff_addr, buff_size);
|
||||
}
|
||||
|
||||
|
@ -899,8 +929,9 @@ void GetTaskActivePriority(Service::Interface* self) {
|
|||
cmd_buff[3] = (buff_size << 4 | 0xA);
|
||||
cmd_buff[4] = buff_addr;
|
||||
|
||||
LOG_WARNING(Service_BOSS, "(STUBBED) buff_size=0x%08X, unk_param2=0x%08X, "
|
||||
"translation=0x%08X, buff_addr=0x%08X",
|
||||
LOG_WARNING(Service_BOSS,
|
||||
"(STUBBED) buff_size=0x%08X, unk_param2=0x%08X, "
|
||||
"translation=0x%08X, buff_addr=0x%08X",
|
||||
unk_param1, translation, buff_addr, buff_size);
|
||||
}
|
||||
|
||||
|
@ -919,8 +950,9 @@ void RegisterImmediateTask(Service::Interface* self) {
|
|||
cmd_buff[3] = (buff_size << 4 | 0xA);
|
||||
cmd_buff[4] = buff_addr;
|
||||
|
||||
LOG_WARNING(Service_BOSS, "(STUBBED) unk_param1=0x%08X, unk_param2=0x%08X, unk_param3=0x%08X, "
|
||||
"translation=0x%08X, buff_addr=0x%08X, buff_size=0x%08X",
|
||||
LOG_WARNING(Service_BOSS,
|
||||
"(STUBBED) unk_param1=0x%08X, unk_param2=0x%08X, unk_param3=0x%08X, "
|
||||
"translation=0x%08X, buff_addr=0x%08X, buff_size=0x%08X",
|
||||
unk_param1, unk_param2, unk_param3, translation, buff_addr, buff_size);
|
||||
}
|
||||
|
||||
|
@ -943,9 +975,10 @@ void SetTaskQuery(Service::Interface* self) {
|
|||
cmd_buff[2] = (buff2_size << 4 | 0xA);
|
||||
cmd_buff[3] = buff2_addr;
|
||||
|
||||
LOG_WARNING(Service_BOSS, "(STUBBED) unk_param1=0x%08X, unk_param2=0x%08X, "
|
||||
"translation1=0x%08X, buff1_addr=0x%08X, buff1_size=0x%08X, "
|
||||
"translation2=0x%08X, buff2_addr=0x%08X, buff2_size=0x%08X",
|
||||
LOG_WARNING(Service_BOSS,
|
||||
"(STUBBED) unk_param1=0x%08X, unk_param2=0x%08X, "
|
||||
"translation1=0x%08X, buff1_addr=0x%08X, buff1_size=0x%08X, "
|
||||
"translation2=0x%08X, buff2_addr=0x%08X, buff2_size=0x%08X",
|
||||
unk_param1, unk_param2, translation1, buff1_addr, buff1_size, translation2,
|
||||
buff2_addr, buff2_size);
|
||||
}
|
||||
|
@ -969,9 +1002,10 @@ void GetTaskQuery(Service::Interface* self) {
|
|||
cmd_buff[2] = (buff2_size << 4 | 0xC);
|
||||
cmd_buff[3] = buff2_addr;
|
||||
|
||||
LOG_WARNING(Service_BOSS, "(STUBBED) unk_param1=0x%08X, unk_param2=0x%08X, "
|
||||
"translation1=0x%08X, buff1_addr=0x%08X, buff1_size=0x%08X, "
|
||||
"translation2=0x%08X, buff2_addr=0x%08X, buff2_size=0x%08X",
|
||||
LOG_WARNING(Service_BOSS,
|
||||
"(STUBBED) unk_param1=0x%08X, unk_param2=0x%08X, "
|
||||
"translation1=0x%08X, buff1_addr=0x%08X, buff1_size=0x%08X, "
|
||||
"translation2=0x%08X, buff2_addr=0x%08X, buff2_size=0x%08X",
|
||||
unk_param1, unk_param2, translation1, buff1_addr, buff1_size, translation2,
|
||||
buff2_addr, buff2_size);
|
||||
}
|
||||
|
|
|
@ -728,8 +728,9 @@ void Module::Interface::SetDetailSize(Kernel::HLERequestContext& ctx) {
|
|||
rb.Push(ERROR_INVALID_ENUM_VALUE);
|
||||
}
|
||||
|
||||
LOG_DEBUG(Service_CAM, "called, camera_select=%u, width=%u, height=%u, crop_x0=%u, crop_y0=%u, "
|
||||
"crop_x1=%u, crop_y1=%u, context_select=%u",
|
||||
LOG_DEBUG(Service_CAM,
|
||||
"called, camera_select=%u, width=%u, height=%u, crop_x0=%u, crop_y0=%u, "
|
||||
"crop_x1=%u, crop_y1=%u, context_select=%u",
|
||||
camera_select.m_val, resolution.width, resolution.height, resolution.crop_x0,
|
||||
resolution.crop_y0, resolution.crop_x1, resolution.crop_y1, context_select.m_val);
|
||||
}
|
||||
|
|
|
@ -90,7 +90,7 @@ struct ConsoleCountryInfo {
|
|||
u8 country_code; ///< The country code of the console
|
||||
};
|
||||
static_assert(sizeof(ConsoleCountryInfo) == 4, "ConsoleCountryInfo must be exactly 4 bytes");
|
||||
}
|
||||
} // namespace
|
||||
|
||||
static const ConsoleModelInfo CONSOLE_MODEL = {NINTENDO_3DS_XL, {0, 0, 0}};
|
||||
static const u8 CONSOLE_LANGUAGE = LANGUAGE_EN;
|
||||
|
|
|
@ -236,8 +236,9 @@ static void RegisterInterruptEvents(Service::Interface* self) {
|
|||
}
|
||||
|
||||
if (interrupt_events.HasTooManyEventsRegistered()) {
|
||||
LOG_INFO(Service_DSP, "Ran out of space to register interrupts (Attempted to register "
|
||||
"type=%u, pipe=%u, event_handle=0x%08X)",
|
||||
LOG_INFO(Service_DSP,
|
||||
"Ran out of space to register interrupts (Attempted to register "
|
||||
"type=%u, pipe=%u, event_handle=0x%08X)",
|
||||
type_index, pipe_index, event_handle);
|
||||
cmd_buff[1] = ResultCode(ErrorDescription::InvalidResultValue, ErrorModule::DSP,
|
||||
ErrorSummary::OutOfResource, ErrorLevel::Status)
|
||||
|
@ -294,8 +295,9 @@ static void WriteProcessPipe(Service::Interface* self) {
|
|||
AudioCore::DspPipe pipe = static_cast<AudioCore::DspPipe>(pipe_index);
|
||||
|
||||
if (IPC::StaticBufferDesc(size, 1) != cmd_buff[3]) {
|
||||
LOG_ERROR(Service_DSP, "IPC static buffer descriptor failed validation (0x%X). pipe=%u, "
|
||||
"size=0x%X, buffer=0x%08X",
|
||||
LOG_ERROR(Service_DSP,
|
||||
"IPC static buffer descriptor failed validation (0x%X). pipe=%u, "
|
||||
"size=0x%X, buffer=0x%08X",
|
||||
cmd_buff[3], pipe_index, size, buffer);
|
||||
cmd_buff[0] = IPC::MakeHeader(0, 1, 0);
|
||||
cmd_buff[1] = IPC::ERR_INVALID_BUFFER_DESCRIPTOR.raw;
|
||||
|
|
|
@ -87,8 +87,9 @@ void File::Read(Kernel::HLERequestContext& ctx) {
|
|||
offset += file->offset;
|
||||
|
||||
if (offset + length > backend->GetSize()) {
|
||||
LOG_ERROR(Service_FS, "Reading from out of bounds offset=0x%" PRIx64
|
||||
" length=0x%08X file_size=0x%" PRIx64,
|
||||
LOG_ERROR(Service_FS,
|
||||
"Reading from out of bounds offset=0x%" PRIx64
|
||||
" length=0x%08X file_size=0x%" PRIx64,
|
||||
offset, length, backend->GetSize());
|
||||
}
|
||||
|
||||
|
|
|
@ -438,8 +438,9 @@ void FS_USER::CreateExtSaveData(Kernel::HLERequestContext& ctx) {
|
|||
u32 icon_size = rp.Pop<u32>();
|
||||
auto icon_buffer = rp.PopMappedBuffer();
|
||||
|
||||
LOG_WARNING(Service_FS, "(STUBBED) savedata_high=%08X savedata_low=%08X unknown=%08X "
|
||||
"files=%08X directories=%08X size_limit=%016" PRIx64 " icon_size=%08X",
|
||||
LOG_WARNING(Service_FS,
|
||||
"(STUBBED) savedata_high=%08X savedata_low=%08X unknown=%08X "
|
||||
"files=%08X directories=%08X size_limit=%016" PRIx64 " icon_size=%08X",
|
||||
save_high, save_low, unknown, directories, files, size_limit, icon_size);
|
||||
|
||||
std::vector<u8> icon(icon_size);
|
||||
|
@ -663,8 +664,9 @@ void FS_USER::SetSaveDataSecureValue(Kernel::HLERequestContext& ctx) {
|
|||
|
||||
// TODO: Generate and Save the Secure Value
|
||||
|
||||
LOG_WARNING(Service_FS, "(STUBBED) called, value=0x%016" PRIx64 " secure_value_slot=0x%08X "
|
||||
"unqiue_id=0x%08X title_variation=0x%02X",
|
||||
LOG_WARNING(Service_FS,
|
||||
"(STUBBED) called, value=0x%016" PRIx64 " secure_value_slot=0x%08X "
|
||||
"unqiue_id=0x%08X title_variation=0x%02X",
|
||||
value, secure_value_slot, unique_id, title_variation);
|
||||
|
||||
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
||||
|
|
|
@ -261,31 +261,26 @@ ResultCode SetBufferSwap(u32 screen_id, const FrameBufferInfo& info) {
|
|||
PAddr phys_address_left = Memory::VirtualToPhysicalAddress(info.address_left);
|
||||
PAddr phys_address_right = Memory::VirtualToPhysicalAddress(info.address_right);
|
||||
if (info.active_fb == 0) {
|
||||
WriteSingleHWReg(
|
||||
base_address +
|
||||
4 * static_cast<u32>(GPU_REG_INDEX(framebuffer_config[screen_id].address_left1)),
|
||||
phys_address_left);
|
||||
WriteSingleHWReg(
|
||||
base_address +
|
||||
4 * static_cast<u32>(GPU_REG_INDEX(framebuffer_config[screen_id].address_right1)),
|
||||
phys_address_right);
|
||||
WriteSingleHWReg(base_address + 4 * static_cast<u32>(GPU_REG_INDEX(
|
||||
framebuffer_config[screen_id].address_left1)),
|
||||
phys_address_left);
|
||||
WriteSingleHWReg(base_address + 4 * static_cast<u32>(GPU_REG_INDEX(
|
||||
framebuffer_config[screen_id].address_right1)),
|
||||
phys_address_right);
|
||||
} else {
|
||||
WriteSingleHWReg(
|
||||
base_address +
|
||||
4 * static_cast<u32>(GPU_REG_INDEX(framebuffer_config[screen_id].address_left2)),
|
||||
phys_address_left);
|
||||
WriteSingleHWReg(
|
||||
base_address +
|
||||
4 * static_cast<u32>(GPU_REG_INDEX(framebuffer_config[screen_id].address_right2)),
|
||||
phys_address_right);
|
||||
WriteSingleHWReg(base_address + 4 * static_cast<u32>(GPU_REG_INDEX(
|
||||
framebuffer_config[screen_id].address_left2)),
|
||||
phys_address_left);
|
||||
WriteSingleHWReg(base_address + 4 * static_cast<u32>(GPU_REG_INDEX(
|
||||
framebuffer_config[screen_id].address_right2)),
|
||||
phys_address_right);
|
||||
}
|
||||
WriteSingleHWReg(base_address +
|
||||
4 * static_cast<u32>(GPU_REG_INDEX(framebuffer_config[screen_id].stride)),
|
||||
info.stride);
|
||||
WriteSingleHWReg(
|
||||
base_address +
|
||||
4 * static_cast<u32>(GPU_REG_INDEX(framebuffer_config[screen_id].color_format)),
|
||||
info.format);
|
||||
WriteSingleHWReg(base_address + 4 * static_cast<u32>(GPU_REG_INDEX(
|
||||
framebuffer_config[screen_id].color_format)),
|
||||
info.format);
|
||||
WriteSingleHWReg(
|
||||
base_address + 4 * static_cast<u32>(GPU_REG_INDEX(framebuffer_config[screen_id].active_fb)),
|
||||
info.shown_fb);
|
||||
|
|
|
@ -333,7 +333,9 @@ void Module::Interface::GetGyroscopeLowCalibrateParam(Kernel::HLERequestContext&
|
|||
|
||||
const s16 param_unit = 6700; // an approximate value taken from hw
|
||||
GyroscopeCalibrateParam param = {
|
||||
{0, param_unit, -param_unit}, {0, param_unit, -param_unit}, {0, param_unit, -param_unit},
|
||||
{0, param_unit, -param_unit},
|
||||
{0, param_unit, -param_unit},
|
||||
{0, param_unit, -param_unit},
|
||||
};
|
||||
rb.PushRaw(param);
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
namespace Kernel {
|
||||
class Event;
|
||||
class SharedMemory;
|
||||
}
|
||||
} // namespace Kernel
|
||||
|
||||
namespace CoreTiming {
|
||||
class EventType;
|
||||
|
@ -335,5 +335,5 @@ void InstallInterfaces(SM::ServiceManager& service_manager);
|
|||
|
||||
/// Reload input devices. Used when input configuration changed
|
||||
void ReloadInputDevices();
|
||||
}
|
||||
}
|
||||
} // namespace HID
|
||||
} // namespace Service
|
||||
|
|
|
@ -72,21 +72,77 @@ ExtraHID::ExtraHID(SendFunc send_func) : IRDevice(send_func) {
|
|||
// and loaded from somewhere.
|
||||
calibration_data = std::array<u8, 0x40>{{
|
||||
// 0x00
|
||||
0x00, 0x00, 0x08, 0x80, 0x85, 0xEB, 0x11, 0x3F,
|
||||
0x00,
|
||||
0x00,
|
||||
0x08,
|
||||
0x80,
|
||||
0x85,
|
||||
0xEB,
|
||||
0x11,
|
||||
0x3F,
|
||||
// 0x08
|
||||
0x85, 0xEB, 0x11, 0x3F, 0xFF, 0xFF, 0xFF, 0xF5,
|
||||
0x85,
|
||||
0xEB,
|
||||
0x11,
|
||||
0x3F,
|
||||
0xFF,
|
||||
0xFF,
|
||||
0xFF,
|
||||
0xF5,
|
||||
// 0x10
|
||||
0xFF, 0x00, 0x08, 0x80, 0x85, 0xEB, 0x11, 0x3F,
|
||||
0xFF,
|
||||
0x00,
|
||||
0x08,
|
||||
0x80,
|
||||
0x85,
|
||||
0xEB,
|
||||
0x11,
|
||||
0x3F,
|
||||
// 0x18
|
||||
0x85, 0xEB, 0x11, 0x3F, 0xFF, 0xFF, 0xFF, 0x65,
|
||||
0x85,
|
||||
0xEB,
|
||||
0x11,
|
||||
0x3F,
|
||||
0xFF,
|
||||
0xFF,
|
||||
0xFF,
|
||||
0x65,
|
||||
// 0x20
|
||||
0xFF, 0x00, 0x08, 0x80, 0x85, 0xEB, 0x11, 0x3F,
|
||||
0xFF,
|
||||
0x00,
|
||||
0x08,
|
||||
0x80,
|
||||
0x85,
|
||||
0xEB,
|
||||
0x11,
|
||||
0x3F,
|
||||
// 0x28
|
||||
0x85, 0xEB, 0x11, 0x3F, 0xFF, 0xFF, 0xFF, 0x65,
|
||||
0x85,
|
||||
0xEB,
|
||||
0x11,
|
||||
0x3F,
|
||||
0xFF,
|
||||
0xFF,
|
||||
0xFF,
|
||||
0x65,
|
||||
// 0x30
|
||||
0xFF, 0x00, 0x08, 0x80, 0x85, 0xEB, 0x11, 0x3F,
|
||||
0xFF,
|
||||
0x00,
|
||||
0x08,
|
||||
0x80,
|
||||
0x85,
|
||||
0xEB,
|
||||
0x11,
|
||||
0x3F,
|
||||
// 0x38
|
||||
0x85, 0xEB, 0x11, 0x3F, 0xFF, 0xFF, 0xFF, 0x65,
|
||||
0x85,
|
||||
0xEB,
|
||||
0x11,
|
||||
0x3F,
|
||||
0xFF,
|
||||
0xFF,
|
||||
0xFF,
|
||||
0x65,
|
||||
}};
|
||||
|
||||
hid_polling_callback_id =
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
namespace Kernel {
|
||||
class Event;
|
||||
class SharedMemory;
|
||||
}
|
||||
} // namespace Kernel
|
||||
|
||||
namespace CoreTiming {
|
||||
class EventType;
|
||||
|
|
|
@ -251,9 +251,10 @@ void IR_USER::InitializeIrNopShared(Kernel::HLERequestContext& ctx) {
|
|||
|
||||
rb.Push(RESULT_SUCCESS);
|
||||
|
||||
LOG_INFO(Service_IR, "called, shared_buff_size=%u, recv_buff_size=%u, "
|
||||
"recv_buff_packet_count=%u, send_buff_size=%u, "
|
||||
"send_buff_packet_count=%u, baud_rate=%u",
|
||||
LOG_INFO(Service_IR,
|
||||
"called, shared_buff_size=%u, recv_buff_size=%u, "
|
||||
"recv_buff_packet_count=%u, send_buff_size=%u, "
|
||||
"send_buff_packet_count=%u, baud_rate=%u",
|
||||
shared_buff_size, recv_buff_size, recv_buff_packet_count, send_buff_size,
|
||||
send_buff_packet_count, baud_rate);
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
namespace Kernel {
|
||||
class Event;
|
||||
class SharedMemory;
|
||||
}
|
||||
} // namespace Kernel
|
||||
|
||||
namespace CoreTiming {
|
||||
class EventType;
|
||||
|
|
|
@ -25,18 +25,27 @@ const std::array<int, 17> CROHelper::ENTRY_SIZE{{
|
|||
1, // code
|
||||
1, // data
|
||||
1, // module name
|
||||
sizeof(SegmentEntry), sizeof(ExportNamedSymbolEntry), sizeof(ExportIndexedSymbolEntry),
|
||||
sizeof(SegmentEntry),
|
||||
sizeof(ExportNamedSymbolEntry),
|
||||
sizeof(ExportIndexedSymbolEntry),
|
||||
1, // export strings
|
||||
sizeof(ExportTreeEntry), sizeof(ImportModuleEntry), sizeof(ExternalRelocationEntry),
|
||||
sizeof(ImportNamedSymbolEntry), sizeof(ImportIndexedSymbolEntry),
|
||||
sizeof(ExportTreeEntry),
|
||||
sizeof(ImportModuleEntry),
|
||||
sizeof(ExternalRelocationEntry),
|
||||
sizeof(ImportNamedSymbolEntry),
|
||||
sizeof(ImportIndexedSymbolEntry),
|
||||
sizeof(ImportAnonymousSymbolEntry),
|
||||
1, // import strings
|
||||
sizeof(StaticAnonymousSymbolEntry), sizeof(InternalRelocationEntry),
|
||||
sizeof(StaticAnonymousSymbolEntry),
|
||||
sizeof(InternalRelocationEntry),
|
||||
sizeof(StaticRelocationEntry),
|
||||
}};
|
||||
|
||||
const std::array<CROHelper::HeaderField, 4> CROHelper::FIX_BARRIERS{{
|
||||
Fix0Barrier, Fix1Barrier, Fix2Barrier, Fix3Barrier,
|
||||
Fix0Barrier,
|
||||
Fix1Barrier,
|
||||
Fix2Barrier,
|
||||
Fix3Barrier,
|
||||
}};
|
||||
|
||||
VAddr CROHelper::SegmentTagToAddress(SegmentTag segment_tag) const {
|
||||
|
@ -209,12 +218,24 @@ ResultCode CROHelper::RebaseHeader(u32 cro_size) {
|
|||
|
||||
// verifies that all offsets are in the correct order
|
||||
constexpr std::array<HeaderField, 18> OFFSET_ORDER = {{
|
||||
CodeOffset, ModuleNameOffset, SegmentTableOffset, ExportNamedSymbolTableOffset,
|
||||
ExportTreeTableOffset, ExportIndexedSymbolTableOffset, ExportStringsOffset,
|
||||
ImportModuleTableOffset, ExternalRelocationTableOffset, ImportNamedSymbolTableOffset,
|
||||
ImportIndexedSymbolTableOffset, ImportAnonymousSymbolTableOffset, ImportStringsOffset,
|
||||
StaticAnonymousSymbolTableOffset, InternalRelocationTableOffset,
|
||||
StaticRelocationTableOffset, DataOffset, FileSize,
|
||||
CodeOffset,
|
||||
ModuleNameOffset,
|
||||
SegmentTableOffset,
|
||||
ExportNamedSymbolTableOffset,
|
||||
ExportTreeTableOffset,
|
||||
ExportIndexedSymbolTableOffset,
|
||||
ExportStringsOffset,
|
||||
ImportModuleTableOffset,
|
||||
ExternalRelocationTableOffset,
|
||||
ImportNamedSymbolTableOffset,
|
||||
ImportIndexedSymbolTableOffset,
|
||||
ImportAnonymousSymbolTableOffset,
|
||||
ImportStringsOffset,
|
||||
StaticAnonymousSymbolTableOffset,
|
||||
InternalRelocationTableOffset,
|
||||
StaticRelocationTableOffset,
|
||||
DataOffset,
|
||||
FileSize,
|
||||
}};
|
||||
|
||||
u32 prev_offset = GetField(OFFSET_ORDER[0]);
|
||||
|
|
|
@ -195,10 +195,11 @@ void RO::LoadCRO(Kernel::HLERequestContext& ctx, bool link_on_load_bug_fix) {
|
|||
VAddr crr_address = rp.Pop<u32>();
|
||||
auto process = rp.PopObject<Kernel::Process>();
|
||||
|
||||
LOG_DEBUG(Service_LDR, "called (%s), cro_buffer_ptr=0x%08X, cro_address=0x%08X, cro_size=0x%X, "
|
||||
"data_segment_address=0x%08X, zero=%d, data_segment_size=0x%X, "
|
||||
"bss_segment_address=0x%08X, bss_segment_size=0x%X, auto_link=%s, "
|
||||
"fix_level=%d, crr_address=0x%08X",
|
||||
LOG_DEBUG(Service_LDR,
|
||||
"called (%s), cro_buffer_ptr=0x%08X, cro_address=0x%08X, cro_size=0x%X, "
|
||||
"data_segment_address=0x%08X, zero=%d, data_segment_size=0x%X, "
|
||||
"bss_segment_address=0x%08X, bss_segment_size=0x%X, auto_link=%s, "
|
||||
"fix_level=%d, crr_address=0x%08X",
|
||||
link_on_load_bug_fix ? "new" : "old", cro_buffer_ptr, cro_address, cro_size,
|
||||
data_segment_address, zero, data_segment_size, bss_segment_address, bss_segment_size,
|
||||
auto_link ? "true" : "false", fix_level, crr_address);
|
||||
|
|
|
@ -21,7 +21,10 @@ enum : u32 {
|
|||
static DaemonMask daemon_bit_mask = DaemonMask::Default;
|
||||
static DaemonMask default_daemon_bit_mask = DaemonMask::Default;
|
||||
static std::array<DaemonStatus, 4> daemon_status = {
|
||||
DaemonStatus::Idle, DaemonStatus::Idle, DaemonStatus::Idle, DaemonStatus::Idle,
|
||||
DaemonStatus::Idle,
|
||||
DaemonStatus::Idle,
|
||||
DaemonStatus::Idle,
|
||||
DaemonStatus::Idle,
|
||||
};
|
||||
static ExclusiveState exclusive_state = ExclusiveState::None;
|
||||
static u32 scan_interval = DEFAULT_SCAN_INTERVAL;
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
// Refer to the license.txt file included.
|
||||
|
||||
#include "common/logging/log.h"
|
||||
#include "core/hle/service/news/news.h"
|
||||
#include "core/hle/service/news/news_s.h"
|
||||
#include "core/hle/service/news/news_u.h"
|
||||
#include "core/hle/service/service.h"
|
||||
|
@ -11,15 +10,11 @@
|
|||
namespace Service {
|
||||
namespace NEWS {
|
||||
|
||||
void Init() {
|
||||
using namespace Kernel;
|
||||
|
||||
AddService(new NEWS_S_Interface);
|
||||
AddService(new NEWS_U_Interface);
|
||||
void InstallInterfaces(SM::ServiceManager& service_manager) {
|
||||
std::make_shared<NEWS_S>()->InstallAsService(service_manager);
|
||||
std::make_shared<NEWS_U>()->InstallAsService(service_manager);
|
||||
}
|
||||
|
||||
void Shutdown() {}
|
||||
|
||||
} // namespace NEWS
|
||||
|
||||
} // namespace Service
|
||||
|
|
|
@ -7,11 +7,7 @@
|
|||
namespace Service {
|
||||
namespace NEWS {
|
||||
|
||||
/// Initialize NEWS service(s)
|
||||
void Init();
|
||||
|
||||
/// Shutdown NEWS service(s)
|
||||
void Shutdown();
|
||||
void InstallInterfaces(SM::ServiceManager& service_manager);
|
||||
|
||||
} // namespace NEWS
|
||||
} // namespace Service
|
||||
|
|
|
@ -3,23 +3,13 @@
|
|||
// Refer to the license.txt file included.
|
||||
|
||||
#include "core/hle/ipc_helpers.h"
|
||||
#include "core/hle/service/news/news.h"
|
||||
#include "core/hle/service/news/news_s.h"
|
||||
|
||||
namespace Service {
|
||||
namespace NEWS {
|
||||
|
||||
/**
|
||||
* GetTotalNotifications service function.
|
||||
* Inputs:
|
||||
* 0 : 0x00050000
|
||||
* Outputs:
|
||||
* 0 : 0x00050080
|
||||
* 1 : Result of function, 0 on success, otherwise error code
|
||||
* 2 : Number of notifications
|
||||
*/
|
||||
static void GetTotalNotifications(Service::Interface* self) {
|
||||
IPC::RequestParser rp(Kernel::GetCommandBuffer(), 0x5, 0, 0);
|
||||
void NEWS_S::GetTotalNotifications(Kernel::HLERequestContext& ctx) {
|
||||
IPC::RequestParser rp(ctx, 0x5, 0, 0);
|
||||
|
||||
LOG_WARNING(Service, "(STUBBED) called");
|
||||
|
||||
|
@ -29,24 +19,23 @@ static void GetTotalNotifications(Service::Interface* self) {
|
|||
rb.Push<u32>(0);
|
||||
}
|
||||
|
||||
const Interface::FunctionInfo FunctionTable[] = {
|
||||
{0x000100C6, nullptr, "AddNotification"},
|
||||
{0x00050000, GetTotalNotifications, "GetTotalNotifications"},
|
||||
{0x00060042, nullptr, "SetNewsDBHeader"},
|
||||
{0x00070082, nullptr, "SetNotificationHeader"},
|
||||
{0x00080082, nullptr, "SetNotificationMessage"},
|
||||
{0x00090082, nullptr, "SetNotificationImage"},
|
||||
{0x000A0042, nullptr, "GetNewsDBHeader"},
|
||||
{0x000B0082, nullptr, "GetNotificationHeader"},
|
||||
{0x000C0082, nullptr, "GetNotificationMessage"},
|
||||
{0x000D0082, nullptr, "GetNotificationImage"},
|
||||
{0x000E0040, nullptr, "SetInfoLEDPattern"},
|
||||
{0x00120082, nullptr, "GetNotificationHeaderOther"},
|
||||
{0x00130000, nullptr, "WriteNewsDBSavedata"},
|
||||
};
|
||||
|
||||
NEWS_S_Interface::NEWS_S_Interface() {
|
||||
Register(FunctionTable);
|
||||
NEWS_S::NEWS_S() : ServiceFramework("news:s", 2) {
|
||||
const FunctionInfo functions[] = {
|
||||
{0x000100C6, nullptr, "AddNotification"},
|
||||
{0x00050000, &NEWS_S::GetTotalNotifications, "GetTotalNotifications"},
|
||||
{0x00060042, nullptr, "SetNewsDBHeader"},
|
||||
{0x00070082, nullptr, "SetNotificationHeader"},
|
||||
{0x00080082, nullptr, "SetNotificationMessage"},
|
||||
{0x00090082, nullptr, "SetNotificationImage"},
|
||||
{0x000A0042, nullptr, "GetNewsDBHeader"},
|
||||
{0x000B0082, nullptr, "GetNotificationHeader"},
|
||||
{0x000C0082, nullptr, "GetNotificationMessage"},
|
||||
{0x000D0082, nullptr, "GetNotificationImage"},
|
||||
{0x000E0040, nullptr, "SetInfoLEDPattern"},
|
||||
{0x00120082, nullptr, "GetNotificationHeaderOther"},
|
||||
{0x00130000, nullptr, "WriteNewsDBSavedata"},
|
||||
};
|
||||
RegisterHandlers(functions);
|
||||
}
|
||||
|
||||
} // namespace NEWS
|
||||
|
|
|
@ -4,18 +4,27 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include "core/hle/service/service.h"
|
||||
|
||||
namespace Service {
|
||||
namespace NEWS {
|
||||
|
||||
class NEWS_S_Interface : public Service::Interface {
|
||||
class NEWS_S final : public ServiceFramework<NEWS_S> {
|
||||
public:
|
||||
NEWS_S_Interface();
|
||||
NEWS_S();
|
||||
|
||||
std::string GetPortName() const override {
|
||||
return "news:s";
|
||||
}
|
||||
private:
|
||||
/**
|
||||
* GetTotalNotifications service function.
|
||||
* Inputs:
|
||||
* 0 : 0x00050000
|
||||
* Outputs:
|
||||
* 0 : 0x00050080
|
||||
* 1 : Result of function, 0 on success, otherwise error code
|
||||
* 2 : Number of notifications
|
||||
*/
|
||||
void GetTotalNotifications(Kernel::HLERequestContext& ctx);
|
||||
};
|
||||
|
||||
} // namespace NEWS
|
||||
|
|
|
@ -7,12 +7,11 @@
|
|||
namespace Service {
|
||||
namespace NEWS {
|
||||
|
||||
const Interface::FunctionInfo FunctionTable[] = {
|
||||
{0x000100C6, nullptr, "AddNotification"},
|
||||
};
|
||||
|
||||
NEWS_U_Interface::NEWS_U_Interface() {
|
||||
Register(FunctionTable);
|
||||
NEWS_U::NEWS_U() : ServiceFramework("news:u", 1) {
|
||||
const FunctionInfo functions[] = {
|
||||
{0x000100C8, nullptr, "AddNotification"},
|
||||
};
|
||||
RegisterHandlers(functions);
|
||||
}
|
||||
|
||||
} // namespace NEWS
|
||||
|
|
|
@ -4,18 +4,15 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include "core/hle/service/service.h"
|
||||
|
||||
namespace Service {
|
||||
namespace NEWS {
|
||||
|
||||
class NEWS_U_Interface : public Service::Interface {
|
||||
class NEWS_U final : public ServiceFramework<NEWS_U> {
|
||||
public:
|
||||
NEWS_U_Interface();
|
||||
|
||||
std::string GetPortName() const override {
|
||||
return "news:u";
|
||||
}
|
||||
NEWS_U();
|
||||
};
|
||||
|
||||
} // namespace NEWS
|
||||
|
|
|
@ -2,10 +2,8 @@
|
|||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "core/hle/ipc.h"
|
||||
#include "core/hle/ipc_helpers.h"
|
||||
#include "core/hle/kernel/event.h"
|
||||
#include "core/hle/kernel/handle_table.h"
|
||||
#include "core/hle/service/nfc/nfc.h"
|
||||
#include "core/hle/service/nfc/nfc_m.h"
|
||||
#include "core/hle/service/nfc/nfc_u.h"
|
||||
|
@ -13,48 +11,46 @@
|
|||
namespace Service {
|
||||
namespace NFC {
|
||||
|
||||
static Kernel::SharedPtr<Kernel::Event> tag_in_range_event;
|
||||
static Kernel::SharedPtr<Kernel::Event> tag_out_of_range_event;
|
||||
static TagState nfc_tag_state = TagState::NotInitialized;
|
||||
static CommunicationStatus nfc_status = CommunicationStatus::NfcInitialized;
|
||||
void Module::Interface::Initialize(Kernel::HLERequestContext& ctx) {
|
||||
IPC::RequestParser rp(ctx, 0x01, 1, 0);
|
||||
u8 param = rp.Pop<u8>();
|
||||
|
||||
void Initialize(Interface* self) {
|
||||
u32* cmd_buff = Kernel::GetCommandBuffer();
|
||||
nfc->nfc_tag_state = TagState::NotScanning;
|
||||
|
||||
u8 param = static_cast<u8>(cmd_buff[1] & 0xFF);
|
||||
|
||||
nfc_tag_state = TagState::NotScanning;
|
||||
|
||||
cmd_buff[1] = RESULT_SUCCESS.raw; // No error
|
||||
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
||||
rb.Push(RESULT_SUCCESS);
|
||||
LOG_WARNING(Service_NFC, "(STUBBED) called, param=%u", param);
|
||||
}
|
||||
|
||||
void Shutdown(Interface* self) {
|
||||
u32* cmd_buff = Kernel::GetCommandBuffer();
|
||||
void Module::Interface::Shutdown(Kernel::HLERequestContext& ctx) {
|
||||
IPC::RequestParser rp(ctx, 0x02, 1, 0);
|
||||
u8 param = rp.Pop<u8>();
|
||||
|
||||
u8 param = static_cast<u8>(cmd_buff[1] & 0xFF);
|
||||
nfc_tag_state = TagState::NotInitialized;
|
||||
nfc->nfc_tag_state = TagState::NotInitialized;
|
||||
|
||||
cmd_buff[1] = RESULT_SUCCESS.raw; // No error
|
||||
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
||||
rb.Push(RESULT_SUCCESS);
|
||||
LOG_WARNING(Service_NFC, "(STUBBED) called, param=%u", param);
|
||||
}
|
||||
|
||||
void StartCommunication(Interface* self) {
|
||||
u32* cmd_buff = Kernel::GetCommandBuffer();
|
||||
void Module::Interface::StartCommunication(Kernel::HLERequestContext& ctx) {
|
||||
IPC::RequestParser rp(ctx, 0x03, 0, 0);
|
||||
|
||||
cmd_buff[1] = RESULT_SUCCESS.raw; // No error
|
||||
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
||||
rb.Push(RESULT_SUCCESS);
|
||||
LOG_WARNING(Service_NFC, "(STUBBED) called");
|
||||
}
|
||||
|
||||
void StopCommunication(Interface* self) {
|
||||
u32* cmd_buff = Kernel::GetCommandBuffer();
|
||||
void Module::Interface::StopCommunication(Kernel::HLERequestContext& ctx) {
|
||||
IPC::RequestParser rp(ctx, 0x04, 0, 0);
|
||||
|
||||
cmd_buff[1] = RESULT_SUCCESS.raw; // No error
|
||||
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
||||
rb.Push(RESULT_SUCCESS);
|
||||
LOG_WARNING(Service_NFC, "(STUBBED) called");
|
||||
}
|
||||
|
||||
void StartTagScanning(Interface* self) {
|
||||
IPC::RequestParser rp(Kernel::GetCommandBuffer(), 5, 1, 0); // 0x00050040
|
||||
void Module::Interface::StartTagScanning(Kernel::HLERequestContext& ctx) {
|
||||
IPC::RequestParser rp(ctx, 0x05, 1, 0); // 0x00050040
|
||||
u16 in_val = rp.Pop<u16>();
|
||||
|
||||
ResultCode result = RESULT_SUCCESS;
|
||||
|
@ -64,8 +60,8 @@ void StartTagScanning(Interface* self) {
|
|||
ErrorSummary::InvalidState, ErrorLevel::Status);
|
||||
|
||||
if (result == RESULT_SUCCESS) {
|
||||
nfc_tag_state = TagState::TagInRange;
|
||||
tag_in_range_event->Signal();
|
||||
nfc->nfc_tag_state = TagState::TagInRange;
|
||||
nfc->tag_in_range_event->Signal();
|
||||
}
|
||||
|
||||
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
||||
|
@ -73,83 +69,90 @@ void StartTagScanning(Interface* self) {
|
|||
LOG_WARNING(Service_NFC, "(STUBBED) called, in_val=%04x", in_val);
|
||||
}
|
||||
|
||||
void StopTagScanning(Interface* self) {
|
||||
u32* cmd_buff = Kernel::GetCommandBuffer();
|
||||
void Module::Interface::StopTagScanning(Kernel::HLERequestContext& ctx) {
|
||||
IPC::RequestParser rp(ctx, 0x06, 0, 0);
|
||||
|
||||
nfc_tag_state = TagState::NotScanning;
|
||||
nfc->nfc_tag_state = TagState::NotScanning;
|
||||
|
||||
cmd_buff[1] = RESULT_SUCCESS.raw; // No error
|
||||
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
||||
rb.Push(RESULT_SUCCESS);
|
||||
LOG_WARNING(Service_NFC, "(STUBBED) called");
|
||||
}
|
||||
|
||||
void LoadAmiiboData(Interface* self) {
|
||||
u32* cmd_buff = Kernel::GetCommandBuffer();
|
||||
void Module::Interface::LoadAmiiboData(Kernel::HLERequestContext& ctx) {
|
||||
IPC::RequestParser rp(ctx, 0x07, 0, 0);
|
||||
|
||||
nfc_tag_state = TagState::TagDataLoaded;
|
||||
nfc->nfc_tag_state = TagState::TagDataLoaded;
|
||||
|
||||
cmd_buff[1] = RESULT_SUCCESS.raw; // No error
|
||||
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
||||
rb.Push(RESULT_SUCCESS);
|
||||
LOG_WARNING(Service_NFC, "(STUBBED) called");
|
||||
}
|
||||
|
||||
void ResetTagScanState(Interface* self) {
|
||||
u32* cmd_buff = Kernel::GetCommandBuffer();
|
||||
void Module::Interface::ResetTagScanState(Kernel::HLERequestContext& ctx) {
|
||||
IPC::RequestParser rp(ctx, 0x08, 0, 0);
|
||||
|
||||
nfc_tag_state = TagState::NotScanning;
|
||||
nfc->nfc_tag_state = TagState::NotScanning;
|
||||
|
||||
cmd_buff[1] = RESULT_SUCCESS.raw; // No error
|
||||
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
||||
rb.Push(RESULT_SUCCESS);
|
||||
LOG_WARNING(Service_NFC, "(STUBBED) called");
|
||||
}
|
||||
|
||||
void GetTagInRangeEvent(Interface* self) {
|
||||
u32* cmd_buff = Kernel::GetCommandBuffer();
|
||||
void Module::Interface::GetTagInRangeEvent(Kernel::HLERequestContext& ctx) {
|
||||
IPC::RequestParser rp(ctx, 0x0B, 0, 0);
|
||||
|
||||
cmd_buff[0] = IPC::MakeHeader(0xB, 1, 2);
|
||||
cmd_buff[1] = RESULT_SUCCESS.raw;
|
||||
cmd_buff[2] = IPC::CopyHandleDesc();
|
||||
cmd_buff[3] = Kernel::g_handle_table.Create(tag_in_range_event).Unwrap();
|
||||
IPC::RequestBuilder rb = rp.MakeBuilder(1, 2);
|
||||
rb.Push(RESULT_SUCCESS);
|
||||
rb.PushCopyObjects(nfc->tag_in_range_event);
|
||||
LOG_WARNING(Service_NFC, "(STUBBED) called");
|
||||
}
|
||||
|
||||
void GetTagOutOfRangeEvent(Interface* self) {
|
||||
u32* cmd_buff = Kernel::GetCommandBuffer();
|
||||
void Module::Interface::GetTagOutOfRangeEvent(Kernel::HLERequestContext& ctx) {
|
||||
IPC::RequestParser rp(ctx, 0x0C, 0, 0);
|
||||
|
||||
cmd_buff[0] = IPC::MakeHeader(0xC, 1, 2);
|
||||
cmd_buff[1] = RESULT_SUCCESS.raw;
|
||||
cmd_buff[2] = IPC::CopyHandleDesc();
|
||||
cmd_buff[3] = Kernel::g_handle_table.Create(tag_out_of_range_event).Unwrap();
|
||||
IPC::RequestBuilder rb = rp.MakeBuilder(1, 2);
|
||||
rb.Push(RESULT_SUCCESS);
|
||||
rb.PushCopyObjects(nfc->tag_out_of_range_event);
|
||||
LOG_WARNING(Service_NFC, "(STUBBED) called");
|
||||
}
|
||||
|
||||
void GetTagState(Interface* self) {
|
||||
u32* cmd_buff = Kernel::GetCommandBuffer();
|
||||
void Module::Interface::GetTagState(Kernel::HLERequestContext& ctx) {
|
||||
IPC::RequestParser rp(ctx, 0x0D, 0, 0);
|
||||
|
||||
cmd_buff[1] = RESULT_SUCCESS.raw; // No error
|
||||
cmd_buff[2] = static_cast<u8>(nfc_tag_state);
|
||||
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
|
||||
rb.Push(RESULT_SUCCESS);
|
||||
rb.PushEnum(nfc->nfc_tag_state);
|
||||
LOG_DEBUG(Service_NFC, "(STUBBED) called");
|
||||
}
|
||||
|
||||
void CommunicationGetStatus(Interface* self) {
|
||||
u32* cmd_buff = Kernel::GetCommandBuffer();
|
||||
void Module::Interface::CommunicationGetStatus(Kernel::HLERequestContext& ctx) {
|
||||
IPC::RequestParser rp(ctx, 0x0F, 0, 0);
|
||||
|
||||
cmd_buff[1] = RESULT_SUCCESS.raw; // No error
|
||||
cmd_buff[2] = static_cast<u8>(nfc_status);
|
||||
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
|
||||
rb.Push(RESULT_SUCCESS);
|
||||
rb.PushEnum(nfc->nfc_status);
|
||||
LOG_DEBUG(Service_NFC, "(STUBBED) called");
|
||||
}
|
||||
|
||||
void Init() {
|
||||
AddService(new NFC_M());
|
||||
AddService(new NFC_U());
|
||||
Module::Interface::Interface(std::shared_ptr<Module> nfc, const char* name, u32 max_session)
|
||||
: ServiceFramework(name, max_session), nfc(std::move(nfc)) {}
|
||||
|
||||
Module::Interface::~Interface() = default;
|
||||
|
||||
Module::Module() {
|
||||
tag_in_range_event =
|
||||
Kernel::Event::Create(Kernel::ResetType::OneShot, "NFC::tag_in_range_event");
|
||||
tag_out_of_range_event =
|
||||
Kernel::Event::Create(Kernel::ResetType::OneShot, "NFC::tag_out_range_event");
|
||||
nfc_tag_state = TagState::NotInitialized;
|
||||
}
|
||||
|
||||
void Shutdown() {
|
||||
tag_in_range_event = nullptr;
|
||||
tag_out_of_range_event = nullptr;
|
||||
Module::~Module() = default;
|
||||
|
||||
void InstallInterfaces(SM::ServiceManager& service_manager) {
|
||||
auto nfc = std::make_shared<Module>();
|
||||
std::make_shared<NFC_M>(nfc)->InstallAsService(service_manager);
|
||||
std::make_shared<NFC_U>(nfc)->InstallAsService(service_manager);
|
||||
}
|
||||
|
||||
} // namespace NFC
|
||||
|
|
|
@ -4,12 +4,16 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include "common/common_types.h"
|
||||
#include "core/hle/kernel/kernel.h"
|
||||
#include "core/hle/service/service.h"
|
||||
|
||||
namespace Kernel {
|
||||
class Event;
|
||||
} // namespace Kernel
|
||||
|
||||
namespace Service {
|
||||
|
||||
class Interface;
|
||||
|
||||
namespace NFC {
|
||||
|
||||
namespace ErrCodes {
|
||||
|
@ -32,128 +36,146 @@ enum class CommunicationStatus : u8 {
|
|||
NfcInitialized = 2,
|
||||
};
|
||||
|
||||
/**
|
||||
* NFC::Initialize service function
|
||||
* Inputs:
|
||||
* 0 : Header code [0x00010040]
|
||||
* 1 : (u8) unknown parameter. Can be either value 0x1 or 0x2
|
||||
* Outputs:
|
||||
* 1 : Result of function, 0 on success, otherwise error code
|
||||
*/
|
||||
void Initialize(Interface* self);
|
||||
class Module final {
|
||||
public:
|
||||
Module();
|
||||
~Module();
|
||||
|
||||
/**
|
||||
* NFC::Shutdown service function
|
||||
* Inputs:
|
||||
* 0 : Header code [0x00020040]
|
||||
* 1 : (u8) unknown parameter
|
||||
* Outputs:
|
||||
* 1 : Result of function, 0 on success, otherwise error code
|
||||
*/
|
||||
void Shutdown(Interface* self);
|
||||
class Interface : public ServiceFramework<Interface> {
|
||||
public:
|
||||
Interface(std::shared_ptr<Module> nfc, const char* name, u32 max_session);
|
||||
~Interface();
|
||||
|
||||
/**
|
||||
* NFC::StartCommunication service function
|
||||
* Inputs:
|
||||
* 0 : Header code [0x00030000]
|
||||
* Outputs:
|
||||
* 1 : Result of function, 0 on success, otherwise error code
|
||||
*/
|
||||
void StartCommunication(Interface* self);
|
||||
protected:
|
||||
/**
|
||||
* NFC::Initialize service function
|
||||
* Inputs:
|
||||
* 0 : Header code [0x00010040]
|
||||
* 1 : (u8) unknown parameter. Can be either value 0x1 or 0x2
|
||||
* Outputs:
|
||||
* 1 : Result of function, 0 on success, otherwise error code
|
||||
*/
|
||||
void Initialize(Kernel::HLERequestContext& ctx);
|
||||
|
||||
/**
|
||||
* NFC::StopCommunication service function
|
||||
* Inputs:
|
||||
* 0 : Header code [0x00040000]
|
||||
* Outputs:
|
||||
* 1 : Result of function, 0 on success, otherwise error code
|
||||
*/
|
||||
void StopCommunication(Interface* self);
|
||||
/**
|
||||
* NFC::Shutdown service function
|
||||
* Inputs:
|
||||
* 0 : Header code [0x00020040]
|
||||
* 1 : (u8) unknown parameter
|
||||
* Outputs:
|
||||
* 1 : Result of function, 0 on success, otherwise error code
|
||||
*/
|
||||
void Shutdown(Kernel::HLERequestContext& ctx);
|
||||
|
||||
/**
|
||||
* NFC::StartTagScanning service function
|
||||
* Inputs:
|
||||
* 0 : Header code [0x00050040]
|
||||
* 1 : (u16) unknown. This is normally 0x0
|
||||
* Outputs:
|
||||
* 1 : Result of function, 0 on success, otherwise error code
|
||||
*/
|
||||
void StartTagScanning(Interface* self);
|
||||
/**
|
||||
* NFC::StartCommunication service function
|
||||
* Inputs:
|
||||
* 0 : Header code [0x00030000]
|
||||
* Outputs:
|
||||
* 1 : Result of function, 0 on success, otherwise error code
|
||||
*/
|
||||
void StartCommunication(Kernel::HLERequestContext& ctx);
|
||||
|
||||
/**
|
||||
* NFC::StopTagScanning service function
|
||||
* Inputs:
|
||||
* 0 : Header code [0x00060000]
|
||||
* Outputs:
|
||||
* 1 : Result of function, 0 on success, otherwise error code
|
||||
*/
|
||||
void StopTagScanning(Interface* self);
|
||||
/**
|
||||
* NFC::StopCommunication service function
|
||||
* Inputs:
|
||||
* 0 : Header code [0x00040000]
|
||||
* Outputs:
|
||||
* 1 : Result of function, 0 on success, otherwise error code
|
||||
*/
|
||||
void StopCommunication(Kernel::HLERequestContext& ctx);
|
||||
|
||||
/**
|
||||
* NFC::LoadAmiiboData service function
|
||||
* Inputs:
|
||||
* 0 : Header code [0x00070000]
|
||||
* Outputs:
|
||||
* 1 : Result of function, 0 on success, otherwise error code
|
||||
*/
|
||||
void LoadAmiiboData(Interface* self);
|
||||
/**
|
||||
* NFC::StartTagScanning service function
|
||||
* Inputs:
|
||||
* 0 : Header code [0x00050040]
|
||||
* 1 : (u16) unknown. This is normally 0x0
|
||||
* Outputs:
|
||||
* 1 : Result of function, 0 on success, otherwise error code
|
||||
*/
|
||||
void StartTagScanning(Kernel::HLERequestContext& ctx);
|
||||
|
||||
/**
|
||||
* NFC::ResetTagScanState service function
|
||||
* Inputs:
|
||||
* 0 : Header code [0x00080000]
|
||||
* Outputs:
|
||||
* 1 : Result of function, 0 on success, otherwise error code
|
||||
*/
|
||||
void ResetTagScanState(Interface* self);
|
||||
/**
|
||||
* NFC::StopTagScanning service function
|
||||
* Inputs:
|
||||
* 0 : Header code [0x00060000]
|
||||
* Outputs:
|
||||
* 1 : Result of function, 0 on success, otherwise error code
|
||||
*/
|
||||
void StopTagScanning(Kernel::HLERequestContext& ctx);
|
||||
|
||||
/**
|
||||
* NFC::GetTagInRangeEvent service function
|
||||
* Inputs:
|
||||
* 0 : Header code [0x000B0000]
|
||||
* Outputs:
|
||||
* 1 : Result of function, 0 on success, otherwise error code
|
||||
* 2 : Copy handle descriptor
|
||||
* 3 : Event Handle
|
||||
*/
|
||||
void GetTagInRangeEvent(Interface* self);
|
||||
/**
|
||||
* NFC::LoadAmiiboData service function
|
||||
* Inputs:
|
||||
* 0 : Header code [0x00070000]
|
||||
* Outputs:
|
||||
* 1 : Result of function, 0 on success, otherwise error code
|
||||
*/
|
||||
void LoadAmiiboData(Kernel::HLERequestContext& ctx);
|
||||
|
||||
/**
|
||||
* NFC::GetTagOutOfRangeEvent service function
|
||||
* Inputs:
|
||||
* 0 : Header code [0x000C0000]
|
||||
* Outputs:
|
||||
* 1 : Result of function, 0 on success, otherwise error code
|
||||
* 2 : Copy handle descriptor
|
||||
* 3 : Event Handle
|
||||
*/
|
||||
void GetTagOutOfRangeEvent(Interface* self);
|
||||
/**
|
||||
* NFC::ResetTagScanState service function
|
||||
* Inputs:
|
||||
* 0 : Header code [0x00080000]
|
||||
* Outputs:
|
||||
* 1 : Result of function, 0 on success, otherwise error code
|
||||
*/
|
||||
void ResetTagScanState(Kernel::HLERequestContext& ctx);
|
||||
|
||||
/**
|
||||
* NFC::GetTagState service function
|
||||
* Inputs:
|
||||
* 0 : Header code [0x000D0000]
|
||||
* Outputs:
|
||||
* 1 : Result of function, 0 on success, otherwise error code
|
||||
* 2 : (u8) Tag state
|
||||
*/
|
||||
void GetTagState(Interface* self);
|
||||
/**
|
||||
* NFC::GetTagInRangeEvent service function
|
||||
* Inputs:
|
||||
* 0 : Header code [0x000B0000]
|
||||
* Outputs:
|
||||
* 1 : Result of function, 0 on success, otherwise error code
|
||||
* 2 : Copy handle descriptor
|
||||
* 3 : Event Handle
|
||||
*/
|
||||
void GetTagInRangeEvent(Kernel::HLERequestContext& ctx);
|
||||
|
||||
/**
|
||||
* NFC::CommunicationGetStatus service function
|
||||
* Inputs:
|
||||
* 0 : Header code [0x000F0000]
|
||||
* Outputs:
|
||||
* 1 : Result of function, 0 on success, otherwise error code
|
||||
* 2 : (u8) Communication state
|
||||
*/
|
||||
void CommunicationGetStatus(Interface* self);
|
||||
/**
|
||||
* NFC::GetTagOutOfRangeEvent service function
|
||||
* Inputs:
|
||||
* 0 : Header code [0x000C0000]
|
||||
* Outputs:
|
||||
* 1 : Result of function, 0 on success, otherwise error code
|
||||
* 2 : Copy handle descriptor
|
||||
* 3 : Event Handle
|
||||
*/
|
||||
void GetTagOutOfRangeEvent(Kernel::HLERequestContext& ctx);
|
||||
|
||||
/// Initialize all NFC services.
|
||||
void Init();
|
||||
/**
|
||||
* NFC::GetTagState service function
|
||||
* Inputs:
|
||||
* 0 : Header code [0x000D0000]
|
||||
* Outputs:
|
||||
* 1 : Result of function, 0 on success, otherwise error code
|
||||
* 2 : (u8) Tag state
|
||||
*/
|
||||
void GetTagState(Kernel::HLERequestContext& ctx);
|
||||
|
||||
/// Shutdown all NFC services.
|
||||
void Shutdown();
|
||||
/**
|
||||
* NFC::CommunicationGetStatus service function
|
||||
* Inputs:
|
||||
* 0 : Header code [0x000F0000]
|
||||
* Outputs:
|
||||
* 1 : Result of function, 0 on success, otherwise error code
|
||||
* 2 : (u8) Communication state
|
||||
*/
|
||||
void CommunicationGetStatus(Kernel::HLERequestContext& ctx);
|
||||
|
||||
private:
|
||||
std::shared_ptr<Module> nfc;
|
||||
};
|
||||
|
||||
private:
|
||||
Kernel::SharedPtr<Kernel::Event> tag_in_range_event;
|
||||
Kernel::SharedPtr<Kernel::Event> tag_out_of_range_event;
|
||||
TagState nfc_tag_state = TagState::NotInitialized;
|
||||
CommunicationStatus nfc_status = CommunicationStatus::NfcInitialized;
|
||||
};
|
||||
|
||||
void InstallInterfaces(SM::ServiceManager& service_manager);
|
||||
|
||||
} // namespace NFC
|
||||
} // namespace Service
|
||||
|
|
|
@ -2,45 +2,43 @@
|
|||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "core/hle/service/nfc/nfc.h"
|
||||
#include "core/hle/service/nfc/nfc_m.h"
|
||||
|
||||
namespace Service {
|
||||
namespace NFC {
|
||||
|
||||
const Interface::FunctionInfo FunctionTable[] = {
|
||||
// clang-format off
|
||||
// nfc:u shared commands
|
||||
{0x00010040, Initialize, "Initialize"},
|
||||
{0x00020040, Shutdown, "Shutdown"},
|
||||
{0x00030000, StartCommunication, "StartCommunication"},
|
||||
{0x00040000, StopCommunication, "StopCommunication"},
|
||||
{0x00050040, StartTagScanning, "StartTagScanning"},
|
||||
{0x00060000, StopTagScanning, "StopTagScanning"},
|
||||
{0x00070000, LoadAmiiboData, "LoadAmiiboData"},
|
||||
{0x00080000, ResetTagScanState, "ResetTagScanState"},
|
||||
{0x00090002, nullptr, "UpdateStoredAmiiboData"},
|
||||
{0x000B0000, GetTagInRangeEvent, "GetTagInRangeEvent"},
|
||||
{0x000C0000, GetTagOutOfRangeEvent, "GetTagOutOfRangeEvent"},
|
||||
{0x000D0000, GetTagState, "GetTagState"},
|
||||
{0x000F0000, CommunicationGetStatus, "CommunicationGetStatus"},
|
||||
{0x00100000, nullptr, "GetTagInfo2"},
|
||||
{0x00110000, nullptr, "GetTagInfo"},
|
||||
{0x00120000, nullptr, "CommunicationGetResult"},
|
||||
{0x00130040, nullptr, "OpenAppData"},
|
||||
{0x00140384, nullptr, "InitializeWriteAppData"},
|
||||
{0x00150040, nullptr, "ReadAppData"},
|
||||
{0x00160242, nullptr, "WriteAppData"},
|
||||
{0x00170000, nullptr, "GetAmiiboSettings"},
|
||||
{0x00180000, nullptr, "GetAmiiboConfig"},
|
||||
{0x00190000, nullptr, "GetAppDataInitStruct"},
|
||||
// nfc:m
|
||||
{0x04040A40, nullptr, "SetAmiiboSettings"}
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
NFC_M::NFC_M() {
|
||||
Register(FunctionTable);
|
||||
NFC_M::NFC_M(std::shared_ptr<Module> nfc) : Module::Interface(std::move(nfc), "nfc:m", 1) {
|
||||
static const FunctionInfo functions[] = {
|
||||
// clang-format off
|
||||
// nfc:u shared commands
|
||||
{0x00010040, &NFC_M::Initialize, "Initialize"},
|
||||
{0x00020040, &NFC_M::Shutdown, "Shutdown"},
|
||||
{0x00030000, &NFC_M::StartCommunication, "StartCommunication"},
|
||||
{0x00040000, &NFC_M::StopCommunication, "StopCommunication"},
|
||||
{0x00050040, &NFC_M::StartTagScanning, "StartTagScanning"},
|
||||
{0x00060000, &NFC_M::StopTagScanning, "StopTagScanning"},
|
||||
{0x00070000, &NFC_M::LoadAmiiboData, "LoadAmiiboData"},
|
||||
{0x00080000, &NFC_M::ResetTagScanState, "ResetTagScanState"},
|
||||
{0x00090002, nullptr, "UpdateStoredAmiiboData"},
|
||||
{0x000B0000, &NFC_M::GetTagInRangeEvent, "GetTagInRangeEvent"},
|
||||
{0x000C0000, &NFC_M::GetTagOutOfRangeEvent, "GetTagOutOfRangeEvent"},
|
||||
{0x000D0000, &NFC_M::GetTagState, "GetTagState"},
|
||||
{0x000F0000, &NFC_M::CommunicationGetStatus, "CommunicationGetStatus"},
|
||||
{0x00100000, nullptr, "GetTagInfo2"},
|
||||
{0x00110000, nullptr, "GetTagInfo"},
|
||||
{0x00120000, nullptr, "CommunicationGetResult"},
|
||||
{0x00130040, nullptr, "OpenAppData"},
|
||||
{0x00140384, nullptr, "InitializeWriteAppData"},
|
||||
{0x00150040, nullptr, "ReadAppData"},
|
||||
{0x00160242, nullptr, "WriteAppData"},
|
||||
{0x00170000, nullptr, "GetAmiiboSettings"},
|
||||
{0x00180000, nullptr, "GetAmiiboConfig"},
|
||||
{0x00190000, nullptr, "GetAppDataInitStruct"},
|
||||
// nfc:m
|
||||
{0x04040A40, nullptr, "SetAmiiboSettings"}
|
||||
// clang-format on
|
||||
};
|
||||
RegisterHandlers(functions);
|
||||
}
|
||||
|
||||
} // namespace NFC
|
||||
|
|
|
@ -4,18 +4,14 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "core/hle/service/service.h"
|
||||
#include "core/hle/service/nfc/nfc.h"
|
||||
|
||||
namespace Service {
|
||||
namespace NFC {
|
||||
|
||||
class NFC_M final : public Interface {
|
||||
class NFC_M final : public Module::Interface {
|
||||
public:
|
||||
NFC_M();
|
||||
|
||||
std::string GetPortName() const override {
|
||||
return "nfc:m";
|
||||
}
|
||||
explicit NFC_M(std::shared_ptr<Module> nfc);
|
||||
};
|
||||
|
||||
} // namespace NFC
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue