mirror of
https://github.com/citra-emu/citra.git
synced 2024-11-26 16:50:06 +00:00
Add stub for ConvertProcessFromDspDram
Should theoretically push retail stuff further along
This commit is contained in:
parent
d5be332d21
commit
a404ad5272
@ -15,6 +15,25 @@ namespace DSP_DSP {
|
|||||||
static Handle semaphore_event;
|
static Handle semaphore_event;
|
||||||
static Handle interrupt_event;
|
static Handle interrupt_event;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* DSP_DSP::ConvertProcessAddressFromDspDram service function
|
||||||
|
* Inputs:
|
||||||
|
* 1 : Address
|
||||||
|
* Outputs:
|
||||||
|
* 1 : Result of function, 0 on success, otherwise error code
|
||||||
|
* 2 : (inaddr << 1) + 0x1FF40000 (where 0x1FF00000 is the DSP RAM address)
|
||||||
|
*/
|
||||||
|
void ConvertProcessAddressFromDspDram(Service::Interface* self) {
|
||||||
|
u32* cmd_buff = Service::GetCommandBuffer();
|
||||||
|
|
||||||
|
u32 addr = cmd_buff[1];
|
||||||
|
|
||||||
|
cmd_buff[1] = 0; // No error
|
||||||
|
cmd_buff[2] = (addr << 1) + (Memory::DSP_MEMORY_VADDR + 0x40000);
|
||||||
|
|
||||||
|
DEBUG_LOG(KERNEL, "(STUBBED) called with address %u", addr);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* DSP_DSP::LoadComponent service function
|
* DSP_DSP::LoadComponent service function
|
||||||
* Inputs:
|
* Inputs:
|
||||||
@ -90,31 +109,31 @@ void WriteReg0x10(Service::Interface* self) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const Interface::FunctionInfo FunctionTable[] = {
|
const Interface::FunctionInfo FunctionTable[] = {
|
||||||
{0x00010040, nullptr, "RecvData"},
|
{0x00010040, nullptr, "RecvData"},
|
||||||
{0x00020040, nullptr, "RecvDataIsReady"},
|
{0x00020040, nullptr, "RecvDataIsReady"},
|
||||||
{0x00030080, nullptr, "SendData"},
|
{0x00030080, nullptr, "SendData"},
|
||||||
{0x00040040, nullptr, "SendDataIsEmpty"},
|
{0x00040040, nullptr, "SendDataIsEmpty"},
|
||||||
{0x00070040, WriteReg0x10, "WriteReg0x10"},
|
{0x00070040, WriteReg0x10, "WriteReg0x10"},
|
||||||
{0x00080000, nullptr, "GetSemaphore"},
|
{0x00080000, nullptr, "GetSemaphore"},
|
||||||
{0x00090040, nullptr, "ClearSemaphore"},
|
{0x00090040, nullptr, "ClearSemaphore"},
|
||||||
{0x000B0000, nullptr, "CheckSemaphoreRequest"},
|
{0x000B0000, nullptr, "CheckSemaphoreRequest"},
|
||||||
{0x000C0040, nullptr, "ConvertProcessAddressFromDspDram"},
|
{0x000C0040, ConvertProcessAddressFromDspDram, "ConvertProcessAddressFromDspDram"},
|
||||||
{0x000D0082, nullptr, "WriteProcessPipe"},
|
{0x000D0082, nullptr, "WriteProcessPipe"},
|
||||||
{0x001000C0, nullptr, "ReadPipeIfPossible"},
|
{0x001000C0, nullptr, "ReadPipeIfPossible"},
|
||||||
{0x001100C2, LoadComponent, "LoadComponent"},
|
{0x001100C2, LoadComponent, "LoadComponent"},
|
||||||
{0x00120000, nullptr, "UnloadComponent"},
|
{0x00120000, nullptr, "UnloadComponent"},
|
||||||
{0x00130082, nullptr, "FlushDataCache"},
|
{0x00130082, nullptr, "FlushDataCache"},
|
||||||
{0x00140082, nullptr, "InvalidateDCache"},
|
{0x00140082, nullptr, "InvalidateDCache"},
|
||||||
{0x00150082, RegisterInterruptEvents, "RegisterInterruptEvents"},
|
{0x00150082, RegisterInterruptEvents, "RegisterInterruptEvents"},
|
||||||
{0x00160000, GetSemaphoreEventHandle, "GetSemaphoreEventHandle"},
|
{0x00160000, GetSemaphoreEventHandle, "GetSemaphoreEventHandle"},
|
||||||
{0x00170040, nullptr, "SetSemaphoreMask"},
|
{0x00170040, nullptr, "SetSemaphoreMask"},
|
||||||
{0x00180040, nullptr, "GetPhysicalAddress"},
|
{0x00180040, nullptr, "GetPhysicalAddress"},
|
||||||
{0x00190040, nullptr, "GetVirtualAddress"},
|
{0x00190040, nullptr, "GetVirtualAddress"},
|
||||||
{0x001A0042, nullptr, "SetIirFilterI2S1_cmd1"},
|
{0x001A0042, nullptr, "SetIirFilterI2S1_cmd1"},
|
||||||
{0x001B0042, nullptr, "SetIirFilterI2S1_cmd2"},
|
{0x001B0042, nullptr, "SetIirFilterI2S1_cmd2"},
|
||||||
{0x001C0082, nullptr, "SetIirFilterEQ"},
|
{0x001C0082, nullptr, "SetIirFilterEQ"},
|
||||||
{0x001F0000, nullptr, "GetHeadphoneStatus"},
|
{0x001F0000, nullptr, "GetHeadphoneStatus"},
|
||||||
{0x00210000, nullptr, "GetIsDspOccupied"},
|
{0x00210000, nullptr, "GetIsDspOccupied"},
|
||||||
};
|
};
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -19,7 +19,6 @@ typedef u32 PAddr; ///< Represents a pointer in the physical address space.
|
|||||||
enum {
|
enum {
|
||||||
BOOTROM_SIZE = 0x00010000, ///< Bootrom (super secret code/data @ 0x8000) size
|
BOOTROM_SIZE = 0x00010000, ///< Bootrom (super secret code/data @ 0x8000) size
|
||||||
MPCORE_PRIV_SIZE = 0x00002000, ///< MPCore private memory region size
|
MPCORE_PRIV_SIZE = 0x00002000, ///< MPCore private memory region size
|
||||||
DSP_SIZE = 0x00080000, ///< DSP memory size
|
|
||||||
AXI_WRAM_SIZE = 0x00080000, ///< AXI WRAM size
|
AXI_WRAM_SIZE = 0x00080000, ///< AXI WRAM size
|
||||||
|
|
||||||
FCRAM_SIZE = 0x08000000, ///< FCRAM size
|
FCRAM_SIZE = 0x08000000, ///< FCRAM size
|
||||||
@ -34,6 +33,9 @@ enum {
|
|||||||
SHARED_MEMORY_VADDR_END = (SHARED_MEMORY_VADDR + SHARED_MEMORY_SIZE),
|
SHARED_MEMORY_VADDR_END = (SHARED_MEMORY_VADDR + SHARED_MEMORY_SIZE),
|
||||||
SHARED_MEMORY_MASK = (SHARED_MEMORY_SIZE - 1),
|
SHARED_MEMORY_MASK = (SHARED_MEMORY_SIZE - 1),
|
||||||
|
|
||||||
|
DSP_MEMORY_SIZE = 0x00080000, ///< DSP memory size
|
||||||
|
DSP_MEMORY_VADDR = 0x1FF00000, ///< DSP memory virtual address
|
||||||
|
|
||||||
CONFIG_MEMORY_SIZE = 0x00001000, ///< Configuration memory size
|
CONFIG_MEMORY_SIZE = 0x00001000, ///< Configuration memory size
|
||||||
CONFIG_MEMORY_VADDR = 0x1FF80000, ///< Configuration memory virtual address
|
CONFIG_MEMORY_VADDR = 0x1FF80000, ///< Configuration memory virtual address
|
||||||
CONFIG_MEMORY_VADDR_END = (CONFIG_MEMORY_VADDR + CONFIG_MEMORY_SIZE),
|
CONFIG_MEMORY_VADDR_END = (CONFIG_MEMORY_VADDR + CONFIG_MEMORY_SIZE),
|
||||||
|
Loading…
Reference in New Issue
Block a user