Replaced more nullptr's with empty functions in gsp.cpp

This commit is contained in:
purpasmart96 2014-09-21 15:01:29 -07:00
parent d5c89d2030
commit 579298862e

View File

@ -86,6 +86,18 @@ void WriteHWRegs(Service::Interface* self) {
WriteHWRegs(reg_addr, size, src);
}
void WriteHWRegsWithMask(Service::Interface* self) {
u32* cmd_buff = Service::GetCommandBuffer();
ERROR_LOG(GSP, "Unimplemented function");
cmd_buff[1] = 0; // No error
}
void WriteHWRegRepeat(Service::Interface* self) {
u32* cmd_buff = Service::GetCommandBuffer();
ERROR_LOG(GSP, "Unimplemented function");
cmd_buff[1] = 0; // No error
}
/// Read a GSP GPU hardware register
void ReadHWRegs(Service::Interface* self) {
u32* cmd_buff = Service::GetCommandBuffer();
@ -115,6 +127,12 @@ void ReadHWRegs(Service::Interface* self) {
}
}
void GetAppletInfo(Service::Interface* self) {
u32* cmd_buff = Service::GetCommandBuffer();
ERROR_LOG(KERNEL, "Unimplemented function");
cmd_buff[1] = 0; // No error
}
void SetBufferSwap(u32 screen_id, const FrameBufferInfo& info) {
u32 base_address = 0x400000;
if (info.active_fb == 0) {
@ -149,6 +167,78 @@ void SetBufferSwap(Service::Interface* self) {
cmd_buff[1] = 0; // No error
}
void SetCommandList(Service::Interface* self) {
u32* cmd_buff = Service::GetCommandBuffer();
ERROR_LOG(GSP, "Unimplemented function");
cmd_buff[1] = 0; // No error
}
void RequestDma(Service::Interface* self) {
u32* cmd_buff = Service::GetCommandBuffer();
ERROR_LOG(GSP, "Unimplemented function");
cmd_buff[1] = 0; // No error
}
void FlushDataCache(Service::Interface* self) {
u32* cmd_buff = Service::GetCommandBuffer();
ERROR_LOG(GSP, "Unimplemented function");
cmd_buff[1] = 0; // No error
}
void InvalidateDataCache(Service::Interface* self) {
u32* cmd_buff = Service::GetCommandBuffer();
ERROR_LOG(GSP, "Unimplemented function");
cmd_buff[1] = 0; // No error
}
void RegisterInterruptEvents(Service::Interface* self) {
u32* cmd_buff = Service::GetCommandBuffer();
ERROR_LOG(GSP, "Unimplemented function");
cmd_buff[1] = 0; // No error
}
void SetLcdForceBlack(Service::Interface* self) {
u32* cmd_buff = Service::GetCommandBuffer();
ERROR_LOG(GSP, "Unimplemented function");
cmd_buff[1] = 0; // No error
}
void SetDisplayTransfer(Service::Interface* self) {
u32* cmd_buff = Service::GetCommandBuffer();
ERROR_LOG(GSP, "Unimplemented function");
cmd_buff[1] = 0; // No error
}
void SetTextureCopy(Service::Interface* self) {
u32* cmd_buff = Service::GetCommandBuffer();
ERROR_LOG(GSP, "Unimplemented function");
cmd_buff[1] = 0; // No error
}
void SetMemoryFill(Service::Interface* self) {
u32* cmd_buff = Service::GetCommandBuffer();
ERROR_LOG(GSP, "Unimplemented function");
cmd_buff[1] = 0; // No error
}
void SetAxiConfigQoSMode(Service::Interface* self) {
u32* cmd_buff = Service::GetCommandBuffer();
ERROR_LOG(GSP, "Unimplemented function");
cmd_buff[1] = 0; // No error
}
void SetPerfLogMode(Service::Interface* self) {
u32* cmd_buff = Service::GetCommandBuffer();
ERROR_LOG(GSP, "Unimplemented function");
cmd_buff[1] = 0; // No error
}
void GetPerfLog(Service::Interface* self) {
u32* cmd_buff = Service::GetCommandBuffer();
ERROR_LOG(GSP, "Unimplemented function");
cmd_buff[1] = 0; // No error
}
/**
* GSP_GPU::RegisterInterruptRelayQueue service function
* Inputs:
@ -173,6 +263,72 @@ void RegisterInterruptRelayQueue(Service::Interface* self) {
Kernel::SignalEvent(g_interrupt_event); // TODO(bunnei): Is this correct?
}
void UnregisterInterruptRelayQueue(Service::Interface* self) {
u32* cmd_buff = Service::GetCommandBuffer();
ERROR_LOG(GSP, "Unimplemented function");
cmd_buff[1] = 0; // No error
}
void TryAcquireRight(Service::Interface* self) {
u32* cmd_buff = Service::GetCommandBuffer();
ERROR_LOG(GSP, "Unimplemented function");
cmd_buff[1] = 0; // No error
}
void AcquireRight(Service::Interface* self) {
u32* cmd_buff = Service::GetCommandBuffer();
ERROR_LOG(GSP, "Unimplemented function");
cmd_buff[1] = 0; // No error
}
void ReleaseRight(Service::Interface* self) {
u32* cmd_buff = Service::GetCommandBuffer();
ERROR_LOG(GSP, "Unimplemented function");
cmd_buff[1] = 0; // No error
}
void ImportDisplayCaptureInfo(Service::Interface* self) {
u32* cmd_buff = Service::GetCommandBuffer();
ERROR_LOG(GSP, "Unimplemented function");
cmd_buff[1] = 0; // No error
}
void SaveVramSysArea(Service::Interface* self) {
u32* cmd_buff = Service::GetCommandBuffer();
ERROR_LOG(GSP, "Unimplemented function");
cmd_buff[1] = 0; // No error
}
void RestoreVramSysArea(Service::Interface* self) {
u32* cmd_buff = Service::GetCommandBuffer();
ERROR_LOG(GSP, "Unimplemented function");
cmd_buff[1] = 0; // No error
}
void ResetGpuCore(Service::Interface* self) {
u32* cmd_buff = Service::GetCommandBuffer();
ERROR_LOG(GSP, "Unimplemented function");
cmd_buff[1] = 0; // No error
}
void SetLedForceOff(Service::Interface* self) {
u32* cmd_buff = Service::GetCommandBuffer();
ERROR_LOG(GSP, "Unimplemented function");
cmd_buff[1] = 0; // No error
}
void SetTestCommand(Service::Interface* self) {
u32* cmd_buff = Service::GetCommandBuffer();
ERROR_LOG(GSP, "Unimplemented function");
cmd_buff[1] = 0; // No error
}
void SetInternalPriorities(Service::Interface* self) {
u32* cmd_buff = Service::GetCommandBuffer();
ERROR_LOG(GSP, "Unimplemented function");
cmd_buff[1] = 0; // No error
}
/**
* Signals that the specified interrupt type has occurred to userland code
* @param interrupt_id ID of interrupt that is being signalled
@ -329,35 +485,35 @@ void TriggerCmdReqQueue(Service::Interface* self) {
const Interface::FunctionInfo FunctionTable[] = {
{0x00010082, WriteHWRegs, "WriteHWRegs"},
{0x00020084, nullptr, "WriteHWRegsWithMask"},
{0x00030082, nullptr, "WriteHWRegRepeat"},
{0x00020084, WriteHWRegsWithMask, "WriteHWRegsWithMask"},
{0x00030082, WriteHWRegRepeat, "WriteHWRegRepeat"},
{0x00040080, ReadHWRegs, "ReadHWRegs"},
{0x00050200, SetBufferSwap, "SetBufferSwap"},
{0x00060082, nullptr, "SetCommandList"},
{0x000700C2, nullptr, "RequestDma"},
{0x00080082, nullptr, "FlushDataCache"},
{0x00090082, nullptr, "InvalidateDataCache"},
{0x000A0044, nullptr, "RegisterInterruptEvents"},
{0x000B0040, nullptr, "SetLcdForceBlack"},
{0x00060082, SetCommandList, "SetCommandList"},
{0x000700C2, RequestDma, "RequestDma"},
{0x00080082, FlushDataCache, "FlushDataCache"},
{0x00090082, InvalidateDataCache, "InvalidateDataCache"},
{0x000A0044, RegisterInterruptEvents, "RegisterInterruptEvents"},
{0x000B0040, SetLcdForceBlack, "SetLcdForceBlack"},
{0x000C0000, TriggerCmdReqQueue, "TriggerCmdReqQueue"},
{0x000D0140, nullptr, "SetDisplayTransfer"},
{0x000E0180, nullptr, "SetTextureCopy"},
{0x000F0200, nullptr, "SetMemoryFill"},
{0x00100040, nullptr, "SetAxiConfigQoSMode"},
{0x00110040, nullptr, "SetPerfLogMode"},
{0x00120000, nullptr, "GetPerfLog"},
{0x000D0140, SetDisplayTransfer, "SetDisplayTransfer"},
{0x000E0180, SetTextureCopy, "SetTextureCopy"},
{0x000F0200, SetMemoryFill, "SetMemoryFill"},
{0x00100040, SetAxiConfigQoSMode, "SetAxiConfigQoSMode"},
{0x00110040, SetPerfLogMode, "SetPerfLogMode"},
{0x00120000, GetPerfLog, "GetPerfLog"},
{0x00130042, RegisterInterruptRelayQueue, "RegisterInterruptRelayQueue"},
{0x00140000, nullptr, "UnregisterInterruptRelayQueue"},
{0x00150002, nullptr, "TryAcquireRight"},
{0x00160042, nullptr, "AcquireRight"},
{0x00170000, nullptr, "ReleaseRight"},
{0x00180000, nullptr, "ImportDisplayCaptureInfo"},
{0x00190000, nullptr, "SaveVramSysArea"},
{0x001A0000, nullptr, "RestoreVramSysArea"},
{0x001B0000, nullptr, "ResetGpuCore"},
{0x001C0040, nullptr, "SetLedForceOff"},
{0x001D0040, nullptr, "SetTestCommand"},
{0x001E0080, nullptr, "SetInternalPriorities"},
{0x00140000, UnregisterInterruptRelayQueue, "UnregisterInterruptRelayQueue"},
{0x00150002, TryAcquireRight, "TryAcquireRight"},
{0x00160042, AcquireRight, "AcquireRight"},
{0x00170000, ReleaseRight, "ReleaseRight"},
{0x00180000, ImportDisplayCaptureInfo, "ImportDisplayCaptureInfo"},
{0x00190000, SaveVramSysArea, "SaveVramSysArea"},
{0x001A0000, RestoreVramSysArea, "RestoreVramSysArea"},
{0x001B0000, ResetGpuCore, "ResetGpuCore"},
{0x001C0040, SetLedForceOff, "SetLedForceOff"},
{0x001D0040, SetTestCommand, "SetTestCommand"},
{0x001E0080, SetInternalPriorities, "SetInternalPriorities"},
};
////////////////////////////////////////////////////////////////////////////////////////////////////