summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/citra_qt/debugger/graphics_cmdlists.cpp4
-rw-r--r--src/citra_qt/debugger/graphics_framebuffer.cpp16
-rw-r--r--src/citra_qt/debugger/graphics_framebuffer.hxx4
-rw-r--r--src/core/arm/dyncom/arm_dyncom_interpreter.cpp36
-rw-r--r--src/core/hle/service/apt_a.cpp4
-rw-r--r--src/core/hle/service/cfg/cfg_u.cpp6
-rw-r--r--src/core/hle/service/csnd_snd.cpp13
-rw-r--r--src/core/hle/service/dsp_dsp.cpp22
-rw-r--r--src/core/hle/service/dsp_dsp.h3
-rw-r--r--src/core/hle/service/ir_rst.cpp7
-rw-r--r--src/core/hle/service/ldr_ro.cpp12
-rw-r--r--src/core/hle/service/ndm_u.cpp11
-rw-r--r--src/core/hle/service/soc_u.cpp8
-rw-r--r--src/core/hle/service/srv.cpp16
-rw-r--r--src/core/hw/gpu.cpp8
15 files changed, 107 insertions, 63 deletions
diff --git a/src/citra_qt/debugger/graphics_cmdlists.cpp b/src/citra_qt/debugger/graphics_cmdlists.cpp
index 753cc25da..708b805a7 100644
--- a/src/citra_qt/debugger/graphics_cmdlists.cpp
+++ b/src/citra_qt/debugger/graphics_cmdlists.cpp
@@ -229,7 +229,7 @@ void GPUCommandListModel::OnPicaTraceFinished(const Pica::DebugUtils::PicaTrace&
229 cmd_id < PICA_REG_INDEX(reg_name) + sizeof(decltype(Pica::registers.reg_name)) / 4) 229 cmd_id < PICA_REG_INDEX(reg_name) + sizeof(decltype(Pica::registers.reg_name)) / 4)
230 230
231void GPUCommandListWidget::OnCommandDoubleClicked(const QModelIndex& index) { 231void GPUCommandListWidget::OnCommandDoubleClicked(const QModelIndex& index) {
232 const int command_id = list_widget->model()->data(index, GPUCommandListModel::CommandIdRole).toInt(); 232 const unsigned int command_id = list_widget->model()->data(index, GPUCommandListModel::CommandIdRole).toUInt();
233 if (COMMAND_IN_RANGE(command_id, texture0) || 233 if (COMMAND_IN_RANGE(command_id, texture0) ||
234 COMMAND_IN_RANGE(command_id, texture1) || 234 COMMAND_IN_RANGE(command_id, texture1) ||
235 COMMAND_IN_RANGE(command_id, texture2)) { 235 COMMAND_IN_RANGE(command_id, texture2)) {
@@ -255,7 +255,7 @@ void GPUCommandListWidget::OnCommandDoubleClicked(const QModelIndex& index) {
255void GPUCommandListWidget::SetCommandInfo(const QModelIndex& index) { 255void GPUCommandListWidget::SetCommandInfo(const QModelIndex& index) {
256 QWidget* new_info_widget; 256 QWidget* new_info_widget;
257 257
258 const int command_id = list_widget->model()->data(index, GPUCommandListModel::CommandIdRole).toInt(); 258 const unsigned int command_id = list_widget->model()->data(index, GPUCommandListModel::CommandIdRole).toUInt();
259 if (COMMAND_IN_RANGE(command_id, texture0) || 259 if (COMMAND_IN_RANGE(command_id, texture0) ||
260 COMMAND_IN_RANGE(command_id, texture1) || 260 COMMAND_IN_RANGE(command_id, texture1) ||
261 COMMAND_IN_RANGE(command_id, texture2)) { 261 COMMAND_IN_RANGE(command_id, texture2)) {
diff --git a/src/citra_qt/debugger/graphics_framebuffer.cpp b/src/citra_qt/debugger/graphics_framebuffer.cpp
index a9e9de652..7ef699f37 100644
--- a/src/citra_qt/debugger/graphics_framebuffer.cpp
+++ b/src/citra_qt/debugger/graphics_framebuffer.cpp
@@ -158,7 +158,7 @@ void GraphicsFramebufferWidget::OnFramebufferAddressChanged(qint64 new_value)
158 } 158 }
159} 159}
160 160
161void GraphicsFramebufferWidget::OnFramebufferWidthChanged(int new_value) 161void GraphicsFramebufferWidget::OnFramebufferWidthChanged(unsigned int new_value)
162{ 162{
163 if (framebuffer_width != new_value) { 163 if (framebuffer_width != new_value) {
164 framebuffer_width = new_value; 164 framebuffer_width = new_value;
@@ -168,7 +168,7 @@ void GraphicsFramebufferWidget::OnFramebufferWidthChanged(int new_value)
168 } 168 }
169} 169}
170 170
171void GraphicsFramebufferWidget::OnFramebufferHeightChanged(int new_value) 171void GraphicsFramebufferWidget::OnFramebufferHeightChanged(unsigned int new_value)
172{ 172{
173 if (framebuffer_height != new_value) { 173 if (framebuffer_height != new_value) {
174 framebuffer_height = new_value; 174 framebuffer_height = new_value;
@@ -227,8 +227,8 @@ void GraphicsFramebufferWidget::OnUpdate()
227 { 227 {
228 QImage decoded_image(framebuffer_width, framebuffer_height, QImage::Format_ARGB32); 228 QImage decoded_image(framebuffer_width, framebuffer_height, QImage::Format_ARGB32);
229 u32* color_buffer = (u32*)Memory::GetPointer(Pica::PAddrToVAddr(framebuffer_address)); 229 u32* color_buffer = (u32*)Memory::GetPointer(Pica::PAddrToVAddr(framebuffer_address));
230 for (unsigned y = 0; y < framebuffer_height; ++y) { 230 for (unsigned int y = 0; y < framebuffer_height; ++y) {
231 for (unsigned x = 0; x < framebuffer_width; ++x) { 231 for (unsigned int x = 0; x < framebuffer_width; ++x) {
232 u32 value = *(color_buffer + x + y * framebuffer_width); 232 u32 value = *(color_buffer + x + y * framebuffer_width);
233 233
234 decoded_image.setPixel(x, y, qRgba((value >> 16) & 0xFF, (value >> 8) & 0xFF, value & 0xFF, 255/*value >> 24*/)); 234 decoded_image.setPixel(x, y, qRgba((value >> 16) & 0xFF, (value >> 8) & 0xFF, value & 0xFF, 255/*value >> 24*/));
@@ -242,8 +242,8 @@ void GraphicsFramebufferWidget::OnUpdate()
242 { 242 {
243 QImage decoded_image(framebuffer_width, framebuffer_height, QImage::Format_ARGB32); 243 QImage decoded_image(framebuffer_width, framebuffer_height, QImage::Format_ARGB32);
244 u8* color_buffer = Memory::GetPointer(Pica::PAddrToVAddr(framebuffer_address)); 244 u8* color_buffer = Memory::GetPointer(Pica::PAddrToVAddr(framebuffer_address));
245 for (unsigned y = 0; y < framebuffer_height; ++y) { 245 for (unsigned int y = 0; y < framebuffer_height; ++y) {
246 for (unsigned x = 0; x < framebuffer_width; ++x) { 246 for (unsigned int x = 0; x < framebuffer_width; ++x) {
247 u8* pixel_pointer = color_buffer + x * 3 + y * 3 * framebuffer_width; 247 u8* pixel_pointer = color_buffer + x * 3 + y * 3 * framebuffer_width;
248 248
249 decoded_image.setPixel(x, y, qRgba(pixel_pointer[0], pixel_pointer[1], pixel_pointer[2], 255/*value >> 24*/)); 249 decoded_image.setPixel(x, y, qRgba(pixel_pointer[0], pixel_pointer[1], pixel_pointer[2], 255/*value >> 24*/));
@@ -257,8 +257,8 @@ void GraphicsFramebufferWidget::OnUpdate()
257 { 257 {
258 QImage decoded_image(framebuffer_width, framebuffer_height, QImage::Format_ARGB32); 258 QImage decoded_image(framebuffer_width, framebuffer_height, QImage::Format_ARGB32);
259 u32* color_buffer = (u32*)Memory::GetPointer(Pica::PAddrToVAddr(framebuffer_address)); 259 u32* color_buffer = (u32*)Memory::GetPointer(Pica::PAddrToVAddr(framebuffer_address));
260 for (unsigned y = 0; y < framebuffer_height; ++y) { 260 for (unsigned int y = 0; y < framebuffer_height; ++y) {
261 for (unsigned x = 0; x < framebuffer_width; ++x) { 261 for (unsigned int x = 0; x < framebuffer_width; ++x) {
262 u16 value = *(u16*)(((u8*)color_buffer) + x * 2 + y * framebuffer_width * 2); 262 u16 value = *(u16*)(((u8*)color_buffer) + x * 2 + y * framebuffer_width * 2);
263 u8 r = Color::Convert5To8((value >> 11) & 0x1F); 263 u8 r = Color::Convert5To8((value >> 11) & 0x1F);
264 u8 g = Color::Convert5To8((value >> 6) & 0x1F); 264 u8 g = Color::Convert5To8((value >> 6) & 0x1F);
diff --git a/src/citra_qt/debugger/graphics_framebuffer.hxx b/src/citra_qt/debugger/graphics_framebuffer.hxx
index 56215761e..02813525c 100644
--- a/src/citra_qt/debugger/graphics_framebuffer.hxx
+++ b/src/citra_qt/debugger/graphics_framebuffer.hxx
@@ -62,8 +62,8 @@ public:
62public slots: 62public slots:
63 void OnFramebufferSourceChanged(int new_value); 63 void OnFramebufferSourceChanged(int new_value);
64 void OnFramebufferAddressChanged(qint64 new_value); 64 void OnFramebufferAddressChanged(qint64 new_value);
65 void OnFramebufferWidthChanged(int new_value); 65 void OnFramebufferWidthChanged(unsigned int new_value);
66 void OnFramebufferHeightChanged(int new_value); 66 void OnFramebufferHeightChanged(unsigned int new_value);
67 void OnFramebufferFormatChanged(int new_value); 67 void OnFramebufferFormatChanged(int new_value);
68 void OnUpdate(); 68 void OnUpdate();
69 69
diff --git a/src/core/arm/dyncom/arm_dyncom_interpreter.cpp b/src/core/arm/dyncom/arm_dyncom_interpreter.cpp
index ffe05cdbc..593e0eabd 100644
--- a/src/core/arm/dyncom/arm_dyncom_interpreter.cpp
+++ b/src/core/arm/dyncom/arm_dyncom_interpreter.cpp
@@ -1419,15 +1419,19 @@ ARM_INST_PTR INTERPRETER_TRANSLATE(bx)(unsigned int inst, int index)
1419 arm_inst *inst_base = (arm_inst *)AllocBuffer(sizeof(arm_inst) + sizeof(bx_inst)); 1419 arm_inst *inst_base = (arm_inst *)AllocBuffer(sizeof(arm_inst) + sizeof(bx_inst));
1420 bx_inst *inst_cream = (bx_inst *)inst_base->component; 1420 bx_inst *inst_cream = (bx_inst *)inst_base->component;
1421 1421
1422 inst_base->cond = BITS(inst, 28, 31); 1422 inst_base->cond = BITS(inst, 28, 31);
1423 inst_base->idx = index; 1423 inst_base->idx = index;
1424 inst_base->br = INDIRECT_BRANCH; 1424 inst_base->br = INDIRECT_BRANCH;
1425 1425
1426 inst_cream->Rm = BITS(inst, 0, 3); 1426 inst_cream->Rm = BITS(inst, 0, 3);
1427 1427
1428 return inst_base; 1428 return inst_base;
1429} 1429}
1430ARM_INST_PTR INTERPRETER_TRANSLATE(bxj)(unsigned int inst, int index) { UNIMPLEMENTED_INSTRUCTION("BXJ"); } 1430ARM_INST_PTR INTERPRETER_TRANSLATE(bxj)(unsigned int inst, int index)
1431{
1432 return INTERPRETER_TRANSLATE(bx)(inst, index);
1433}
1434
1431ARM_INST_PTR INTERPRETER_TRANSLATE(cdp)(unsigned int inst, int index){ 1435ARM_INST_PTR INTERPRETER_TRANSLATE(cdp)(unsigned int inst, int index){
1432 arm_inst *inst_base = (arm_inst *)AllocBuffer(sizeof(arm_inst) + sizeof(cdp_inst)); 1436 arm_inst *inst_base = (arm_inst *)AllocBuffer(sizeof(arm_inst) + sizeof(cdp_inst));
1433 cdp_inst *inst_cream = (cdp_inst *)inst_base->component; 1437 cdp_inst *inst_cream = (cdp_inst *)inst_base->component;
@@ -4129,22 +4133,35 @@ unsigned InterpreterMainLoop(ARMul_State* state) {
4129 INC_PC(sizeof(blx_inst)); 4133 INC_PC(sizeof(blx_inst));
4130 goto DISPATCH; 4134 goto DISPATCH;
4131 } 4135 }
4136
4132 BX_INST: 4137 BX_INST:
4138 BXJ_INST:
4133 { 4139 {
4134 bx_inst *inst_cream = (bx_inst *)inst_base->component; 4140 // Note that only the 'fail' case of BXJ is emulated. This is because
4135 if ((inst_base->cond == 0xe) || CondPassed(cpu, inst_base->cond)) { 4141 // the facilities for Jazelle emulation are not implemented.
4142 //
4143 // According to the ARM documentation on BXJ, if setting the J bit in the APSR
4144 // fails, then BXJ functions identically like a regular BX instruction.
4145 //
4146 // This is sufficient for citra, as the CPU for the 3DS does not implement Jazelle.
4147
4148 if (inst_base->cond == 0xE || CondPassed(cpu, inst_base->cond)) {
4149 bx_inst* const inst_cream = (bx_inst*)inst_base->component;
4150
4136 if (inst_cream->Rm == 15) 4151 if (inst_cream->Rm == 15)
4137 LOG_WARNING(Core_ARM11, "BX at pc %x: use of Rm = R15 is discouraged", cpu->Reg[15]); 4152 LOG_WARNING(Core_ARM11, "BX at pc %x: use of Rm = R15 is discouraged", cpu->Reg[15]);
4153
4138 cpu->TFlag = cpu->Reg[inst_cream->Rm] & 0x1; 4154 cpu->TFlag = cpu->Reg[inst_cream->Rm] & 0x1;
4139 cpu->Reg[15] = cpu->Reg[inst_cream->Rm] & 0xfffffffe; 4155 cpu->Reg[15] = cpu->Reg[inst_cream->Rm] & 0xfffffffe;
4140 INC_PC(sizeof(bx_inst)); 4156 INC_PC(sizeof(bx_inst));
4141 goto DISPATCH; 4157 goto DISPATCH;
4142 } 4158 }
4159
4143 cpu->Reg[15] += GET_INST_SIZE(cpu); 4160 cpu->Reg[15] += GET_INST_SIZE(cpu);
4144 INC_PC(sizeof(bx_inst)); 4161 INC_PC(sizeof(bx_inst));
4145 goto DISPATCH; 4162 goto DISPATCH;
4146 } 4163 }
4147 BXJ_INST: 4164
4148 CDP_INST: 4165 CDP_INST:
4149 { 4166 {
4150 cdp_inst *inst_cream = (cdp_inst *)inst_base->component; 4167 cdp_inst *inst_cream = (cdp_inst *)inst_base->component;
@@ -5571,7 +5588,8 @@ unsigned InterpreterMainLoop(ARMul_State* state) {
5571 operand2 = (BIT(RS, 31)) ? (BITS(RS, 16, 31) | 0xffff0000) : BITS(RS, 16, 31); 5588 operand2 = (BIT(RS, 31)) ? (BITS(RS, 16, 31) | 0xffff0000) : BITS(RS, 16, 31);
5572 RD = operand1 * operand2 + RN; 5589 RD = operand1 * operand2 + RN;
5573 5590
5574 // TODO: FIXME: UPDATE Q FLAGS 5591 if (AddOverflow(operand1 * operand2, RN, RD))
5592 cpu->Cpsr |= (1 << 27);
5575 } 5593 }
5576 cpu->Reg[15] += GET_INST_SIZE(cpu); 5594 cpu->Reg[15] += GET_INST_SIZE(cpu);
5577 INC_PC(sizeof(smla_inst)); 5595 INC_PC(sizeof(smla_inst));
diff --git a/src/core/hle/service/apt_a.cpp b/src/core/hle/service/apt_a.cpp
index 4b0f761d9..37be4b027 100644
--- a/src/core/hle/service/apt_a.cpp
+++ b/src/core/hle/service/apt_a.cpp
@@ -25,12 +25,12 @@ const Interface::FunctionInfo FunctionTable[] = {
25 {0x00040040, nullptr, "Finalize?"}, 25 {0x00040040, nullptr, "Finalize?"},
26 {0x00050040, nullptr, "GetAppletManInfo?"}, 26 {0x00050040, nullptr, "GetAppletManInfo?"},
27 {0x00060040, nullptr, "GetAppletInfo?"}, 27 {0x00060040, nullptr, "GetAppletInfo?"},
28 {0x000D0080, APT_U::ReceiveParameter, "ReceiveParameter?"},
29 {0x000E0080, APT_U::GlanceParameter, "GlanceParameter?"},
28 {0x003B0040, nullptr, "CancelLibraryApplet?"}, 30 {0x003B0040, nullptr, "CancelLibraryApplet?"},
29 {0x00430040, nullptr, "NotifyToWait?"}, 31 {0x00430040, nullptr, "NotifyToWait?"},
30 {0x004B00C2, nullptr, "AppletUtility?"}, 32 {0x004B00C2, nullptr, "AppletUtility?"},
31 {0x00550040, nullptr, "WriteInputToNsState?"}, 33 {0x00550040, nullptr, "WriteInputToNsState?"},
32 {0x000D0080, APT_U::ReceiveParameter, "ReceiveParameter" },
33 {0x000E0080, APT_U::GlanceParameter, "GlanceParameter" },
34}; 34};
35 35
36//////////////////////////////////////////////////////////////////////////////////////////////////// 36////////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/core/hle/service/cfg/cfg_u.cpp b/src/core/hle/service/cfg/cfg_u.cpp
index 03c01cf90..835620909 100644
--- a/src/core/hle/service/cfg/cfg_u.cpp
+++ b/src/core/hle/service/cfg/cfg_u.cpp
@@ -172,12 +172,12 @@ static void GetModelNintendo2DS(Service::Interface* self) {
172const Interface::FunctionInfo FunctionTable[] = { 172const Interface::FunctionInfo FunctionTable[] = {
173 {0x00010082, GetConfigInfoBlk2, "GetConfigInfoBlk2"}, 173 {0x00010082, GetConfigInfoBlk2, "GetConfigInfoBlk2"},
174 {0x00020000, nullptr, "SecureInfoGetRegion"}, 174 {0x00020000, nullptr, "SecureInfoGetRegion"},
175 {0x00030000, nullptr, "GenHashConsoleUnique"}, 175 {0x00030040, nullptr, "GenHashConsoleUnique"},
176 {0x00040000, nullptr, "GetRegionCanadaUSA"}, 176 {0x00040000, nullptr, "GetRegionCanadaUSA"},
177 {0x00050000, GetSystemModel, "GetSystemModel"}, 177 {0x00050000, GetSystemModel, "GetSystemModel"},
178 {0x00060000, GetModelNintendo2DS, "GetModelNintendo2DS"}, 178 {0x00060000, GetModelNintendo2DS, "GetModelNintendo2DS"},
179 {0x00070040, nullptr, "unknown"}, 179 {0x00070040, nullptr, "WriteToFirstByteCfgSavegame"},
180 {0x00080080, nullptr, "unknown"}, 180 {0x00080080, nullptr, "GoThroughTable"},
181 {0x00090040, GetCountryCodeString, "GetCountryCodeString"}, 181 {0x00090040, GetCountryCodeString, "GetCountryCodeString"},
182 {0x000A0040, GetCountryCodeID, "GetCountryCodeID"}, 182 {0x000A0040, GetCountryCodeID, "GetCountryCodeID"},
183}; 183};
diff --git a/src/core/hle/service/csnd_snd.cpp b/src/core/hle/service/csnd_snd.cpp
index aef8cfbca..3a557efe1 100644
--- a/src/core/hle/service/csnd_snd.cpp
+++ b/src/core/hle/service/csnd_snd.cpp
@@ -14,16 +14,15 @@ namespace CSND_SND {
14const Interface::FunctionInfo FunctionTable[] = { 14const Interface::FunctionInfo FunctionTable[] = {
15 {0x00010140, nullptr, "Initialize"}, 15 {0x00010140, nullptr, "Initialize"},
16 {0x00020000, nullptr, "Shutdown"}, 16 {0x00020000, nullptr, "Shutdown"},
17 {0x00030040, nullptr, "Unknown"}, 17 {0x00030040, nullptr, "ExecuteType0Commands"},
18 {0x00040080, nullptr, "Unknown"}, 18 {0x00040080, nullptr, "ExecuteType1Commands"},
19 {0x00050000, nullptr, "Unknown"}, 19 {0x00050000, nullptr, "AcquireSoundChannels"},
20 {0x00060000, nullptr, "Unknown"}, 20 {0x00060000, nullptr, "ReleaseSoundChannels"},
21 {0x00070000, nullptr, "Unknown"}, 21 {0x00070000, nullptr, "AcquireCaptureDevice"},
22 {0x00080040, nullptr, "Unknown"}, 22 {0x00080040, nullptr, "ReleaseCaptureDevice"},
23 {0x00090082, nullptr, "FlushDCache"}, 23 {0x00090082, nullptr, "FlushDCache"},
24 {0x000A0082, nullptr, "StoreDCache"}, 24 {0x000A0082, nullptr, "StoreDCache"},
25 {0x000B0082, nullptr, "InvalidateDCache"}, 25 {0x000B0082, nullptr, "InvalidateDCache"},
26 {0x000C0000, nullptr, "Unknown"},
27}; 26};
28 27
29//////////////////////////////////////////////////////////////////////////////////////////////////// 28////////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/core/hle/service/dsp_dsp.cpp b/src/core/hle/service/dsp_dsp.cpp
index 2cf4d118f..d4affdfbf 100644
--- a/src/core/hle/service/dsp_dsp.cpp
+++ b/src/core/hle/service/dsp_dsp.cpp
@@ -12,9 +12,23 @@
12 12
13namespace DSP_DSP { 13namespace DSP_DSP {
14 14
15static u32 read_pipe_count; 15static u32 read_pipe_count = 0;
16static Handle semaphore_event; 16static Handle semaphore_event = 0;
17static Handle interrupt_event; 17static Handle interrupt_event = 0;
18
19void SignalInterrupt() {
20 // TODO(bunnei): This is just a stub, it does not do anything other than signal to the emulated
21 // application that a DSP interrupt occurred, without specifying which one. Since we do not
22 // emulate the DSP yet (and how it works is largely unknown), this is a work around to get games
23 // that check the DSP interrupt signal event to run. We should figure out the different types of
24 // DSP interrupts, and trigger them at the appropriate times.
25
26 if (interrupt_event == 0) {
27 LOG_WARNING(Service_DSP, "cannot signal interrupt until DSP event has been created!");
28 return;
29 }
30 Kernel::SignalEvent(interrupt_event);
31}
18 32
19/** 33/**
20 * DSP_DSP::ConvertProcessAddressFromDspDram service function 34 * DSP_DSP::ConvertProcessAddressFromDspDram service function
@@ -102,7 +116,7 @@ void RegisterInterruptEvents(Service::Interface* self) {
102void WriteReg0x10(Service::Interface* self) { 116void WriteReg0x10(Service::Interface* self) {
103 u32* cmd_buff = Kernel::GetCommandBuffer(); 117 u32* cmd_buff = Kernel::GetCommandBuffer();
104 118
105 Kernel::SignalEvent(interrupt_event); 119 SignalInterrupt();
106 120
107 cmd_buff[1] = 0; // No error 121 cmd_buff[1] = 0; // No error
108 122
diff --git a/src/core/hle/service/dsp_dsp.h b/src/core/hle/service/dsp_dsp.h
index 0b8b64600..fa13bfb7c 100644
--- a/src/core/hle/service/dsp_dsp.h
+++ b/src/core/hle/service/dsp_dsp.h
@@ -20,4 +20,7 @@ public:
20 } 20 }
21}; 21};
22 22
23/// Signals that a DSP interrupt has occurred to userland code
24void SignalInterrupt();
25
23} // namespace 26} // namespace
diff --git a/src/core/hle/service/ir_rst.cpp b/src/core/hle/service/ir_rst.cpp
index b388afb15..d49bd5335 100644
--- a/src/core/hle/service/ir_rst.cpp
+++ b/src/core/hle/service/ir_rst.cpp
@@ -15,12 +15,7 @@ const Interface::FunctionInfo FunctionTable[] = {
15 {0x00010000, nullptr, "GetHandles"}, 15 {0x00010000, nullptr, "GetHandles"},
16 {0x00020080, nullptr, "Initialize"}, 16 {0x00020080, nullptr, "Initialize"},
17 {0x00030000, nullptr, "Shutdown"}, 17 {0x00030000, nullptr, "Shutdown"},
18 {0x00040000, nullptr, "Unknown"}, 18 {0x00090000, nullptr, "WriteToTwoFields"},
19 {0x00050000, nullptr, "Unknown"},
20 {0x00060000, nullptr, "Unknown"},
21 {0x00070080, nullptr, "Unknown"},
22 {0x00080000, nullptr, "Unknown"},
23 {0x00090000, nullptr, "Unknown"},
24}; 19};
25 20
26//////////////////////////////////////////////////////////////////////////////////////////////////// 21////////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/core/hle/service/ldr_ro.cpp b/src/core/hle/service/ldr_ro.cpp
index 9c9e90a40..7d6e2e8e8 100644
--- a/src/core/hle/service/ldr_ro.cpp
+++ b/src/core/hle/service/ldr_ro.cpp
@@ -13,10 +13,14 @@ namespace LDR_RO {
13 13
14const Interface::FunctionInfo FunctionTable[] = { 14const Interface::FunctionInfo FunctionTable[] = {
15 {0x000100C2, nullptr, "Initialize"}, 15 {0x000100C2, nullptr, "Initialize"},
16 {0x00020082, nullptr, "CRR_Load"}, 16 {0x00020082, nullptr, "LoadCRR"},
17 {0x00030042, nullptr, "CRR_Unload"}, 17 {0x00030042, nullptr, "UnloadCCR"},
18 {0x000402C2, nullptr, "CRO_LoadAndFix"}, 18 {0x000402C2, nullptr, "LoadExeCRO"},
19 {0x000500C2, nullptr, "CRO_ApplyRelocationPatchesAndLink"} 19 {0x000500C2, nullptr, "LoadCROSymbols"},
20 {0x00060042, nullptr, "CRO_Load?"},
21 {0x00070042, nullptr, "LoadCROSymbols"},
22 {0x00080042, nullptr, "Shutdown"},
23 {0x000902C2, nullptr, "LoadExeCRO_New?"},
20}; 24};
21 25
22//////////////////////////////////////////////////////////////////////////////////////////////////// 26////////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/core/hle/service/ndm_u.cpp b/src/core/hle/service/ndm_u.cpp
index 233b14f6d..0f03de6ae 100644
--- a/src/core/hle/service/ndm_u.cpp
+++ b/src/core/hle/service/ndm_u.cpp
@@ -11,10 +11,13 @@
11namespace NDM_U { 11namespace NDM_U {
12 12
13const Interface::FunctionInfo FunctionTable[] = { 13const Interface::FunctionInfo FunctionTable[] = {
14 {0x00060040, nullptr, "SuspendDaemons"}, 14 {0x00010042, nullptr, "EnterExclusiveState"},
15 {0x00080040, nullptr, "DisableWifiUsage"}, 15 {0x00020002, nullptr, "LeaveExclusiveState"},
16 {0x00090000, nullptr, "EnableWifiUsage"}, 16 {0x00030000, nullptr, "QueryExclusiveMode"},
17 {0x00140040, nullptr, "OverrideDefaultDaemons"}, 17 {0x00060040, nullptr, "SuspendDaemons"},
18 {0x00080040, nullptr, "DisableWifiUsage"},
19 {0x00090000, nullptr, "EnableWifiUsage"},
20 {0x00140040, nullptr, "OverrideDefaultDaemons"},
18}; 21};
19 22
20//////////////////////////////////////////////////////////////////////////////////////////////////// 23////////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/core/hle/service/soc_u.cpp b/src/core/hle/service/soc_u.cpp
index 8e7abcf9c..f502c6afe 100644
--- a/src/core/hle/service/soc_u.cpp
+++ b/src/core/hle/service/soc_u.cpp
@@ -308,11 +308,11 @@ static void Socket(Service::Interface* self) {
308 308
309 u32 socket_handle = static_cast<u32>(::socket(domain, type, protocol)); 309 u32 socket_handle = static_cast<u32>(::socket(domain, type, protocol));
310 310
311 if (socket_handle != SOCKET_ERROR_VALUE) 311 if ((s32)socket_handle != SOCKET_ERROR_VALUE)
312 open_sockets[socket_handle] = { socket_handle, true }; 312 open_sockets[socket_handle] = { socket_handle, true };
313 313
314 int result = 0; 314 int result = 0;
315 if (socket_handle == SOCKET_ERROR_VALUE) 315 if ((s32)socket_handle == SOCKET_ERROR_VALUE)
316 result = TranslateError(GET_ERRNO); 316 result = TranslateError(GET_ERRNO);
317 317
318 cmd_buffer[1] = result; 318 cmd_buffer[1] = result;
@@ -436,11 +436,11 @@ static void Accept(Service::Interface* self) {
436 socklen_t addr_len = sizeof(addr); 436 socklen_t addr_len = sizeof(addr);
437 u32 ret = static_cast<u32>(::accept(socket_handle, &addr, &addr_len)); 437 u32 ret = static_cast<u32>(::accept(socket_handle, &addr, &addr_len));
438 438
439 if (ret != SOCKET_ERROR_VALUE) 439 if ((s32)ret != SOCKET_ERROR_VALUE)
440 open_sockets[ret] = { ret, true }; 440 open_sockets[ret] = { ret, true };
441 441
442 int result = 0; 442 int result = 0;
443 if (ret == SOCKET_ERROR_VALUE) { 443 if ((s32)ret == SOCKET_ERROR_VALUE) {
444 result = TranslateError(GET_ERRNO); 444 result = TranslateError(GET_ERRNO);
445 } else { 445 } else {
446 CTRSockAddr ctr_addr = CTRSockAddr::FromPlatform(addr); 446 CTRSockAddr ctr_addr = CTRSockAddr::FromPlatform(addr);
diff --git a/src/core/hle/service/srv.cpp b/src/core/hle/service/srv.cpp
index 25fab1a4f..912b52adf 100644
--- a/src/core/hle/service/srv.cpp
+++ b/src/core/hle/service/srv.cpp
@@ -52,13 +52,15 @@ static void GetServiceHandle(Service::Interface* self) {
52} 52}
53 53
54const Interface::FunctionInfo FunctionTable[] = { 54const Interface::FunctionInfo FunctionTable[] = {
55 {0x00010002, Initialize, "Initialize"}, 55 {0x00010002, Initialize, "Initialize"},
56 {0x00020000, GetProcSemaphore, "GetProcSemaphore"}, 56 {0x00020000, GetProcSemaphore, "GetProcSemaphore"},
57 {0x00030100, nullptr, "RegisterService"}, 57 {0x00030100, nullptr, "RegisterService"},
58 {0x000400C0, nullptr, "UnregisterService"}, 58 {0x000400C0, nullptr, "UnregisterService"},
59 {0x00050100, GetServiceHandle, "GetServiceHandle"}, 59 {0x00050100, GetServiceHandle, "GetServiceHandle"},
60 {0x000B0000, nullptr, "ReceiveNotification"}, 60 {0x000600C2, nullptr, "RegisterHandle"},
61 {0x000C0080, nullptr, "PublishToSubscriber"} 61 {0x00090040, nullptr, "Subscribe"},
62 {0x000B0000, nullptr, "ReceiveNotification"},
63 {0x000C0080, nullptr, "PublishToSubscriber"},
62}; 64};
63 65
64//////////////////////////////////////////////////////////////////////////////////////////////////// 66////////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/core/hw/gpu.cpp b/src/core/hw/gpu.cpp
index 0ff6c6cde..e346e0ad6 100644
--- a/src/core/hw/gpu.cpp
+++ b/src/core/hw/gpu.cpp
@@ -10,6 +10,7 @@
10 10
11#include "core/hle/hle.h" 11#include "core/hle/hle.h"
12#include "core/hle/service/gsp_gpu.h" 12#include "core/hle/service/gsp_gpu.h"
13#include "core/hle/service/dsp_dsp.h"
13 14
14#include "core/hw/gpu.h" 15#include "core/hw/gpu.h"
15 16
@@ -214,13 +215,18 @@ void Update() {
214 // - If frameskip == 0 (disabled), always swap buffers 215 // - If frameskip == 0 (disabled), always swap buffers
215 // - If frameskip == 1, swap buffers every other frame (starting from the first frame) 216 // - If frameskip == 1, swap buffers every other frame (starting from the first frame)
216 // - If frameskip > 1, swap buffers every frameskip^n frames (starting from the second frame) 217 // - If frameskip > 1, swap buffers every frameskip^n frames (starting from the second frame)
217
218 if ((((Settings::values.frame_skip != 1) ^ last_skip_frame) && last_skip_frame != g_skip_frame) || 218 if ((((Settings::values.frame_skip != 1) ^ last_skip_frame) && last_skip_frame != g_skip_frame) ||
219 Settings::values.frame_skip == 0) { 219 Settings::values.frame_skip == 0) {
220 VideoCore::g_renderer->SwapBuffers(); 220 VideoCore::g_renderer->SwapBuffers();
221 } 221 }
222 222
223 // Signal to GSP that GPU interrupt has occurred
223 GSP_GPU::SignalInterrupt(GSP_GPU::InterruptId::PDC1); 224 GSP_GPU::SignalInterrupt(GSP_GPU::InterruptId::PDC1);
225
226 // TODO(bunnei): Fake a DSP interrupt on each frame. This does not belong here, but
227 // until we can emulate DSP interrupts, this is probably the only reasonable place to do
228 // this. Certain games expect this to be periodically signaled.
229 DSP_DSP::SignalInterrupt();
224 } 230 }
225 } 231 }
226} 232}