early-access version 3320
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
#include "common/hex_util.h"
|
||||
#include "common/logging/log.h"
|
||||
#include "common/scope_exit.h"
|
||||
#include "common/settings.h"
|
||||
#include "core/arm/arm_interface.h"
|
||||
#include "core/core.h"
|
||||
#include "core/debugger/gdbstub.h"
|
||||
@@ -731,7 +732,25 @@ void GDBStub::HandleRcmd(const std::vector<u8>& command) {
|
||||
auto* process = system.CurrentProcess();
|
||||
auto& page_table = process->PageTable();
|
||||
|
||||
if (command_str == "get info") {
|
||||
const char* commands = "Commands:\n"
|
||||
" get fastmem\n"
|
||||
" get info\n"
|
||||
" get mappings\n";
|
||||
|
||||
if (command_str == "get fastmem") {
|
||||
if (Settings::IsFastmemEnabled()) {
|
||||
const auto& impl = page_table.PageTableImpl();
|
||||
const auto region = reinterpret_cast<uintptr_t>(impl.fastmem_arena);
|
||||
const auto region_bits = impl.current_address_space_width_in_bits;
|
||||
const auto region_size = 1ULL << region_bits;
|
||||
|
||||
reply = fmt::format("Region bits: {}\n"
|
||||
"Host address: {:#x} - {:#x}\n",
|
||||
region_bits, region, region + region_size - 1);
|
||||
} else {
|
||||
reply = "Fastmem is not enabled.\n";
|
||||
}
|
||||
} else if (command_str == "get info") {
|
||||
Loader::AppLoader::Modules modules;
|
||||
system.GetAppLoader().ReadNSOModules(modules);
|
||||
|
||||
@@ -787,9 +806,10 @@ void GDBStub::HandleRcmd(const std::vector<u8>& command) {
|
||||
cur_addr = next_address;
|
||||
}
|
||||
} else if (command_str == "help") {
|
||||
reply = "Commands:\n get info\n get mappings\n";
|
||||
reply = commands;
|
||||
} else {
|
||||
reply = "Unknown command.\nCommands:\n get info\n get mappings\n";
|
||||
reply = "Unknown command.\n";
|
||||
reply += commands;
|
||||
}
|
||||
|
||||
std::span<const u8> reply_span{reinterpret_cast<u8*>(&reply.front()), reply.size()};
|
||||
|
@@ -11,6 +11,7 @@
|
||||
|
||||
namespace Core::HID {
|
||||
constexpr s32 HID_JOYSTICK_MAX = 0x7fff;
|
||||
constexpr s32 HID_JOYSTICK_MIN = 0x7ffe;
|
||||
constexpr s32 HID_TRIGGER_MAX = 0x7fff;
|
||||
// Use a common UUID for TAS and Virtual Gamepad
|
||||
constexpr Common::UUID TAS_UUID =
|
||||
@@ -863,9 +864,16 @@ void EmulatedController::SetStick(const Common::Input::CallbackStatus& callback,
|
||||
return;
|
||||
}
|
||||
|
||||
const auto FloatToShort = [](float a) {
|
||||
if (a > 0) {
|
||||
return static_cast<s32>(a * HID_JOYSTICK_MAX);
|
||||
}
|
||||
return static_cast<s32>(a * HID_JOYSTICK_MIN);
|
||||
};
|
||||
|
||||
const AnalogStickState stick{
|
||||
.x = static_cast<s32>(controller.stick_values[index].x.value * HID_JOYSTICK_MAX),
|
||||
.y = static_cast<s32>(controller.stick_values[index].y.value * HID_JOYSTICK_MAX),
|
||||
.x = FloatToShort(controller.stick_values[index].x.value),
|
||||
.y = FloatToShort(controller.stick_values[index].y.value),
|
||||
};
|
||||
|
||||
switch (index) {
|
||||
|
Reference in New Issue
Block a user