summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar archshift2014-12-01 00:31:37 -0800
committerGravatar archshift2014-12-03 20:03:57 -0800
commita404ad527282e37fcd368d29c3b47abe0d3edba1 (patch)
tree4b8ec785d19e84866387c89066b1d59a21b94289 /src
parentMerge pull request #237 from vaguilar/fix-viewport (diff)
downloadyuzu-a404ad527282e37fcd368d29c3b47abe0d3edba1.tar.gz
yuzu-a404ad527282e37fcd368d29c3b47abe0d3edba1.tar.xz
yuzu-a404ad527282e37fcd368d29c3b47abe0d3edba1.zip
Add stub for ConvertProcessFromDspDram
Should theoretically push retail stuff further along
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/service/dsp_dsp.cpp69
-rw-r--r--src/core/mem_map.h4
2 files changed, 47 insertions, 26 deletions
diff --git a/src/core/hle/service/dsp_dsp.cpp b/src/core/hle/service/dsp_dsp.cpp
index a2b68cac8..72be4c817 100644
--- a/src/core/hle/service/dsp_dsp.cpp
+++ b/src/core/hle/service/dsp_dsp.cpp
@@ -16,6 +16,25 @@ static Handle semaphore_event;
16static Handle interrupt_event; 16static Handle interrupt_event;
17 17
18/** 18/**
19 * DSP_DSP::ConvertProcessAddressFromDspDram service function
20 * Inputs:
21 * 1 : Address
22 * Outputs:
23 * 1 : Result of function, 0 on success, otherwise error code
24 * 2 : (inaddr << 1) + 0x1FF40000 (where 0x1FF00000 is the DSP RAM address)
25 */
26void ConvertProcessAddressFromDspDram(Service::Interface* self) {
27 u32* cmd_buff = Service::GetCommandBuffer();
28
29 u32 addr = cmd_buff[1];
30
31 cmd_buff[1] = 0; // No error
32 cmd_buff[2] = (addr << 1) + (Memory::DSP_MEMORY_VADDR + 0x40000);
33
34 DEBUG_LOG(KERNEL, "(STUBBED) called with address %u", addr);
35}
36
37/**
19 * DSP_DSP::LoadComponent service function 38 * DSP_DSP::LoadComponent service function
20 * Inputs: 39 * Inputs:
21 * 1 : Size 40 * 1 : Size
@@ -90,31 +109,31 @@ void WriteReg0x10(Service::Interface* self) {
90} 109}
91 110
92const Interface::FunctionInfo FunctionTable[] = { 111const Interface::FunctionInfo FunctionTable[] = {
93 {0x00010040, nullptr, "RecvData"}, 112 {0x00010040, nullptr, "RecvData"},
94 {0x00020040, nullptr, "RecvDataIsReady"}, 113 {0x00020040, nullptr, "RecvDataIsReady"},
95 {0x00030080, nullptr, "SendData"}, 114 {0x00030080, nullptr, "SendData"},
96 {0x00040040, nullptr, "SendDataIsEmpty"}, 115 {0x00040040, nullptr, "SendDataIsEmpty"},
97 {0x00070040, WriteReg0x10, "WriteReg0x10"}, 116 {0x00070040, WriteReg0x10, "WriteReg0x10"},
98 {0x00080000, nullptr, "GetSemaphore"}, 117 {0x00080000, nullptr, "GetSemaphore"},
99 {0x00090040, nullptr, "ClearSemaphore"}, 118 {0x00090040, nullptr, "ClearSemaphore"},
100 {0x000B0000, nullptr, "CheckSemaphoreRequest"}, 119 {0x000B0000, nullptr, "CheckSemaphoreRequest"},
101 {0x000C0040, nullptr, "ConvertProcessAddressFromDspDram"}, 120 {0x000C0040, ConvertProcessAddressFromDspDram, "ConvertProcessAddressFromDspDram"},
102 {0x000D0082, nullptr, "WriteProcessPipe"}, 121 {0x000D0082, nullptr, "WriteProcessPipe"},
103 {0x001000C0, nullptr, "ReadPipeIfPossible"}, 122 {0x001000C0, nullptr, "ReadPipeIfPossible"},
104 {0x001100C2, LoadComponent, "LoadComponent"}, 123 {0x001100C2, LoadComponent, "LoadComponent"},
105 {0x00120000, nullptr, "UnloadComponent"}, 124 {0x00120000, nullptr, "UnloadComponent"},
106 {0x00130082, nullptr, "FlushDataCache"}, 125 {0x00130082, nullptr, "FlushDataCache"},
107 {0x00140082, nullptr, "InvalidateDCache"}, 126 {0x00140082, nullptr, "InvalidateDCache"},
108 {0x00150082, RegisterInterruptEvents, "RegisterInterruptEvents"}, 127 {0x00150082, RegisterInterruptEvents, "RegisterInterruptEvents"},
109 {0x00160000, GetSemaphoreEventHandle, "GetSemaphoreEventHandle"}, 128 {0x00160000, GetSemaphoreEventHandle, "GetSemaphoreEventHandle"},
110 {0x00170040, nullptr, "SetSemaphoreMask"}, 129 {0x00170040, nullptr, "SetSemaphoreMask"},
111 {0x00180040, nullptr, "GetPhysicalAddress"}, 130 {0x00180040, nullptr, "GetPhysicalAddress"},
112 {0x00190040, nullptr, "GetVirtualAddress"}, 131 {0x00190040, nullptr, "GetVirtualAddress"},
113 {0x001A0042, nullptr, "SetIirFilterI2S1_cmd1"}, 132 {0x001A0042, nullptr, "SetIirFilterI2S1_cmd1"},
114 {0x001B0042, nullptr, "SetIirFilterI2S1_cmd2"}, 133 {0x001B0042, nullptr, "SetIirFilterI2S1_cmd2"},
115 {0x001C0082, nullptr, "SetIirFilterEQ"}, 134 {0x001C0082, nullptr, "SetIirFilterEQ"},
116 {0x001F0000, nullptr, "GetHeadphoneStatus"}, 135 {0x001F0000, nullptr, "GetHeadphoneStatus"},
117 {0x00210000, nullptr, "GetIsDspOccupied"}, 136 {0x00210000, nullptr, "GetIsDspOccupied"},
118}; 137};
119 138
120//////////////////////////////////////////////////////////////////////////////////////////////////// 139////////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/core/mem_map.h b/src/core/mem_map.h
index a58c59244..da440325f 100644
--- a/src/core/mem_map.h
+++ b/src/core/mem_map.h
@@ -19,7 +19,6 @@ typedef u32 PAddr; ///< Represents a pointer in the physical address space.
19enum { 19enum {
20 BOOTROM_SIZE = 0x00010000, ///< Bootrom (super secret code/data @ 0x8000) size 20 BOOTROM_SIZE = 0x00010000, ///< Bootrom (super secret code/data @ 0x8000) size
21 MPCORE_PRIV_SIZE = 0x00002000, ///< MPCore private memory region size 21 MPCORE_PRIV_SIZE = 0x00002000, ///< MPCore private memory region size
22 DSP_SIZE = 0x00080000, ///< DSP memory size
23 AXI_WRAM_SIZE = 0x00080000, ///< AXI WRAM size 22 AXI_WRAM_SIZE = 0x00080000, ///< AXI WRAM size
24 23
25 FCRAM_SIZE = 0x08000000, ///< FCRAM size 24 FCRAM_SIZE = 0x08000000, ///< FCRAM size
@@ -34,6 +33,9 @@ enum {
34 SHARED_MEMORY_VADDR_END = (SHARED_MEMORY_VADDR + SHARED_MEMORY_SIZE), 33 SHARED_MEMORY_VADDR_END = (SHARED_MEMORY_VADDR + SHARED_MEMORY_SIZE),
35 SHARED_MEMORY_MASK = (SHARED_MEMORY_SIZE - 1), 34 SHARED_MEMORY_MASK = (SHARED_MEMORY_SIZE - 1),
36 35
36 DSP_MEMORY_SIZE = 0x00080000, ///< DSP memory size
37 DSP_MEMORY_VADDR = 0x1FF00000, ///< DSP memory virtual address
38
37 CONFIG_MEMORY_SIZE = 0x00001000, ///< Configuration memory size 39 CONFIG_MEMORY_SIZE = 0x00001000, ///< Configuration memory size
38 CONFIG_MEMORY_VADDR = 0x1FF80000, ///< Configuration memory virtual address 40 CONFIG_MEMORY_VADDR = 0x1FF80000, ///< Configuration memory virtual address
39 CONFIG_MEMORY_VADDR_END = (CONFIG_MEMORY_VADDR + CONFIG_MEMORY_SIZE), 41 CONFIG_MEMORY_VADDR_END = (CONFIG_MEMORY_VADDR + CONFIG_MEMORY_SIZE),