summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/arm/disassembler/arm_disasm.cpp8
-rw-r--r--src/core/hle/service/ptm_sysm.cpp14
-rw-r--r--src/core/hw/gpu.h2
3 files changed, 18 insertions, 6 deletions
diff --git a/src/core/arm/disassembler/arm_disasm.cpp b/src/core/arm/disassembler/arm_disasm.cpp
index f7c7451e9..913dc1454 100644
--- a/src/core/arm/disassembler/arm_disasm.cpp
+++ b/src/core/arm/disassembler/arm_disasm.cpp
@@ -24,7 +24,7 @@ static const char *cond_names[] = {
"RESERVED"
};
-const char *opcode_names[] = {
+static const char *opcode_names[] = {
"invalid",
"undefined",
"adc",
@@ -131,7 +131,7 @@ static const char *shift_names[] = {
"ROR"
};
-static const char* cond_to_str(int cond) {
+static const char* cond_to_str(uint32_t cond) {
return cond_names[cond];
}
@@ -337,8 +337,9 @@ std::string ARM_Disasm::DisassembleBX(uint32_t insn)
std::string ARM_Disasm::DisassembleBKPT(uint32_t insn)
{
+ uint8_t cond = (insn >> 28) & 0xf;
uint32_t immed = (((insn >> 8) & 0xfff) << 4) | (insn & 0xf);
- return Common::StringFromFormat("bkpt\t#%d", immed);
+ return Common::StringFromFormat("bkpt%s\t#%d", cond_to_str(cond), immed);
}
std::string ARM_Disasm::DisassembleCLZ(uint32_t insn)
@@ -351,7 +352,6 @@ std::string ARM_Disasm::DisassembleCLZ(uint32_t insn)
std::string ARM_Disasm::DisassembleMemblock(Opcode opcode, uint32_t insn)
{
- std::string tmp_reg;
std::string tmp_list;
uint8_t cond = (insn >> 28) & 0xf;
diff --git a/src/core/hle/service/ptm_sysm.cpp b/src/core/hle/service/ptm_sysm.cpp
index 96ef2dce0..dc4a9c569 100644
--- a/src/core/hle/service/ptm_sysm.cpp
+++ b/src/core/hle/service/ptm_sysm.cpp
@@ -12,6 +12,18 @@
namespace PTM_SYSM {
+/**
+ * Returns whether the system is powering off (?)
+ * Outputs:
+ * 1: Result code, 0 on success, otherwise error code
+ * 2: Whether the system is going through a power off
+ */
+void IsLegacyPowerOff(Service::Interface* self) {
+ u32* cmd_buff = Kernel::GetCommandBuffer();
+ cmd_buff[1] = RESULT_SUCCESS.raw;
+ cmd_buff[2] = 0;
+}
+
const Interface::FunctionInfo FunctionTable[] = {
{0x040100C0, nullptr, "SetRtcAlarmEx"},
{0x04020042, nullptr, "ReplySleepQuery"},
@@ -37,7 +49,7 @@ const Interface::FunctionInfo FunctionTable[] = {
{0x080C0080, nullptr, "SetUserTime"},
{0x080D0000, nullptr, "InvalidateSystemTime"},
{0x080E0140, nullptr, "NotifyPlayEvent"},
- {0x080F0000, nullptr, "IsLegacyPowerOff"},
+ {0x080F0000, IsLegacyPowerOff, "IsLegacyPowerOff"},
{0x08100000, nullptr, "ClearLegacyPowerOff"},
{0x08110000, nullptr, "GetShellStatus"},
{0x08120000, nullptr, "IsShutdownByBatteryEmpty"},
diff --git a/src/core/hw/gpu.h b/src/core/hw/gpu.h
index ab1dcf91d..737b1e968 100644
--- a/src/core/hw/gpu.h
+++ b/src/core/hw/gpu.h
@@ -46,7 +46,7 @@ struct Regs {
"Structure size and register block length don't match")
#endif
- // All of those formats are described in reverse byte order, since the 3DS is little-endian.
+ // Components are laid out in reverse byte order, most significant bits first.
enum class PixelFormat : u32 {
RGBA8 = 0,
RGB8 = 1,