summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/common/logging/backend.cpp1
-rw-r--r--src/common/logging/log.h1
-rw-r--r--src/core/CMakeLists.txt8
-rw-r--r--src/core/hle/service/grc/grc.cpp31
-rw-r--r--src/core/hle/service/grc/grc.h15
-rw-r--r--src/core/hle/service/ldn/ldn.cpp142
-rw-r--r--src/core/hle/service/ldn/ldn.h16
-rw-r--r--src/core/hle/service/nim/nim.cpp124
-rw-r--r--src/core/hle/service/nim/nim.h15
-rw-r--r--src/core/hle/service/service.cpp6
-rw-r--r--src/core/hle/service/sockets/bsd.cpp22
-rw-r--r--src/core/hle/service/sockets/bsd.h5
-rw-r--r--src/core/hle/service/sockets/ethc.cpp38
-rw-r--r--src/core/hle/service/sockets/ethc.h21
-rw-r--r--src/core/hle/service/sockets/sockets.cpp7
-rw-r--r--src/video_core/gpu.h1
-rw-r--r--src/video_core/memory_manager.cpp36
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer_cache.h4
18 files changed, 478 insertions, 15 deletions
diff --git a/src/common/logging/backend.cpp b/src/common/logging/backend.cpp
index 59b999935..ad9edbcdf 100644
--- a/src/common/logging/backend.cpp
+++ b/src/common/logging/backend.cpp
@@ -173,6 +173,7 @@ void FileBackend::Write(const Entry& entry) {
173 SUB(Service, Friend) \ 173 SUB(Service, Friend) \
174 SUB(Service, FS) \ 174 SUB(Service, FS) \
175 SUB(Service, HID) \ 175 SUB(Service, HID) \
176 SUB(Service, LDN) \
176 SUB(Service, LM) \ 177 SUB(Service, LM) \
177 SUB(Service, MM) \ 178 SUB(Service, MM) \
178 SUB(Service, NFP) \ 179 SUB(Service, NFP) \
diff --git a/src/common/logging/log.h b/src/common/logging/log.h
index e7115933f..ad3cbf5d1 100644
--- a/src/common/logging/log.h
+++ b/src/common/logging/log.h
@@ -60,6 +60,7 @@ enum class Class : ClassType {
60 Service_Friend, ///< The friend service 60 Service_Friend, ///< The friend service
61 Service_FS, ///< The FS (Filesystem) service 61 Service_FS, ///< The FS (Filesystem) service
62 Service_HID, ///< The HID (Human interface device) service 62 Service_HID, ///< The HID (Human interface device) service
63 Service_LDN, ///< The LDN (Local domain network) service
63 Service_LM, ///< The LM (Logger) service 64 Service_LM, ///< The LM (Logger) service
64 Service_MM, ///< The MM (Multimedia) service 65 Service_MM, ///< The MM (Multimedia) service
65 Service_NFP, ///< The NFP service 66 Service_NFP, ///< The NFP service
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
index 2e2de59b1..063e18d64 100644
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -156,8 +156,12 @@ add_library(core STATIC
156 hle/service/friend/friend.h 156 hle/service/friend/friend.h
157 hle/service/friend/interface.cpp 157 hle/service/friend/interface.cpp
158 hle/service/friend/interface.h 158 hle/service/friend/interface.h
159 hle/service/grc/grc.cpp
160 hle/service/grc/grc.h
159 hle/service/hid/hid.cpp 161 hle/service/hid/hid.cpp
160 hle/service/hid/hid.h 162 hle/service/hid/hid.h
163 hle/service/ldn/ldn.cpp
164 hle/service/ldn/ldn.h
161 hle/service/ldr/ldr.cpp 165 hle/service/ldr/ldr.cpp
162 hle/service/ldr/ldr.h 166 hle/service/ldr/ldr.h
163 hle/service/lm/lm.cpp 167 hle/service/lm/lm.cpp
@@ -170,6 +174,8 @@ add_library(core STATIC
170 hle/service/nfp/nfp_user.h 174 hle/service/nfp/nfp_user.h
171 hle/service/nifm/nifm.cpp 175 hle/service/nifm/nifm.cpp
172 hle/service/nifm/nifm.h 176 hle/service/nifm/nifm.h
177 hle/service/nim/nim.cpp
178 hle/service/nim/nim.h
173 hle/service/ns/ns.cpp 179 hle/service/ns/ns.cpp
174 hle/service/ns/ns.h 180 hle/service/ns/ns.h
175 hle/service/ns/pl_u.cpp 181 hle/service/ns/pl_u.cpp
@@ -225,6 +231,8 @@ add_library(core STATIC
225 hle/service/sm/sm.h 231 hle/service/sm/sm.h
226 hle/service/sockets/bsd.cpp 232 hle/service/sockets/bsd.cpp
227 hle/service/sockets/bsd.h 233 hle/service/sockets/bsd.h
234 hle/service/sockets/ethc.cpp
235 hle/service/sockets/ethc.h
228 hle/service/sockets/nsd.cpp 236 hle/service/sockets/nsd.cpp
229 hle/service/sockets/nsd.h 237 hle/service/sockets/nsd.h
230 hle/service/sockets/sfdnsres.cpp 238 hle/service/sockets/sfdnsres.cpp
diff --git a/src/core/hle/service/grc/grc.cpp b/src/core/hle/service/grc/grc.cpp
new file mode 100644
index 000000000..24910ac6c
--- /dev/null
+++ b/src/core/hle/service/grc/grc.cpp
@@ -0,0 +1,31 @@
1// Copyright 2018 yuzu emulator team
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#include <memory>
6
7#include "core/hle/service/grc/grc.h"
8#include "core/hle/service/service.h"
9#include "core/hle/service/sm/sm.h"
10
11namespace Service::GRC {
12
13class GRC final : public ServiceFramework<GRC> {
14public:
15 explicit GRC() : ServiceFramework{"grc:c"} {
16 // clang-format off
17 static const FunctionInfo functions[] = {
18 {1, nullptr, "OpenContinuousRecorder"},
19 {2, nullptr, "OpenGameMovieTrimmer"},
20 };
21 // clang-format on
22
23 RegisterHandlers(functions);
24 }
25};
26
27void InstallInterfaces(SM::ServiceManager& sm) {
28 std::make_shared<GRC>()->InstallAsService(sm);
29}
30
31} // namespace Service::GRC
diff --git a/src/core/hle/service/grc/grc.h b/src/core/hle/service/grc/grc.h
new file mode 100644
index 000000000..e0d29e70d
--- /dev/null
+++ b/src/core/hle/service/grc/grc.h
@@ -0,0 +1,15 @@
1// Copyright 2018 yuzu emulator team
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#pragma once
6
7namespace Service::SM {
8class ServiceManager;
9}
10
11namespace Service::GRC {
12
13void InstallInterfaces(SM::ServiceManager& sm);
14
15} // namespace Service::GRC
diff --git a/src/core/hle/service/ldn/ldn.cpp b/src/core/hle/service/ldn/ldn.cpp
new file mode 100644
index 000000000..167f2c66a
--- /dev/null
+++ b/src/core/hle/service/ldn/ldn.cpp
@@ -0,0 +1,142 @@
1// Copyright 2018 yuzu emulator team
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#include <memory>
6
7#include "core/hle/ipc_helpers.h"
8#include "core/hle/result.h"
9#include "core/hle/service/ldn/ldn.h"
10#include "core/hle/service/sm/sm.h"
11
12namespace Service::LDN {
13
14class IMonitorService final : public ServiceFramework<IMonitorService> {
15public:
16 explicit IMonitorService() : ServiceFramework{"IMonitorService"} {
17 // clang-format off
18 static const FunctionInfo functions[] = {
19 {0, nullptr, "GetStateForMonitor"},
20 {1, nullptr, "GetNetworkInfoForMonitor"},
21 {2, nullptr, "GetIpv4AddressForMonitor"},
22 {3, nullptr, "GetDisconnectReasonForMonitor"},
23 {4, nullptr, "GetSecurityParameterForMonitor"},
24 {5, nullptr, "GetNetworkConfigForMonitor"},
25 {100, nullptr, "InitializeMonitor"},
26 {101, nullptr, "FinalizeMonitor"},
27 };
28 // clang-format on
29
30 RegisterHandlers(functions);
31 }
32};
33
34class LDNM final : public ServiceFramework<LDNM> {
35public:
36 explicit LDNM() : ServiceFramework{"ldn:m"} {
37 // clang-format off
38 static const FunctionInfo functions[] = {
39 {0, &LDNM::CreateMonitorService, "CreateMonitorService"}
40 };
41 // clang-format on
42
43 RegisterHandlers(functions);
44 }
45
46 void CreateMonitorService(Kernel::HLERequestContext& ctx) {
47 IPC::ResponseBuilder rb{ctx, 2, 0, 1};
48 rb.Push(RESULT_SUCCESS);
49 rb.PushIpcInterface<IMonitorService>();
50
51 LOG_DEBUG(Service_LDN, "called");
52 }
53};
54
55class ILocalCommunicationService final : public ServiceFramework<ILocalCommunicationService> {
56public:
57 explicit ILocalCommunicationService(const char* name) : ServiceFramework{name} {
58 // clang-format off
59 static const FunctionInfo functions[] = {
60 {0, nullptr, "GetState"},
61 {1, nullptr, "GetNetworkInfo"},
62 {2, nullptr, "GetIpv4Address"},
63 {3, nullptr, "GetDisconnectReason"},
64 {4, nullptr, "GetSecurityParameter"},
65 {5, nullptr, "GetNetworkConfig"},
66 {100, nullptr, "AttachStateChangeEvent"},
67 {101, nullptr, "GetNetworkInfoLatestUpdate"},
68 {102, nullptr, "Scan"},
69 {103, nullptr, "ScanPrivate"},
70 {200, nullptr, "OpenAccessPoint"},
71 {201, nullptr, "CloseAccessPoint"},
72 {202, nullptr, "CreateNetwork"},
73 {203, nullptr, "CreateNetworkPrivate"},
74 {204, nullptr, "DestroyNetwork"},
75 {205, nullptr, "Reject"},
76 {206, nullptr, "SetAdvertiseData"},
77 {207, nullptr, "SetStationAcceptPolicy"},
78 {208, nullptr, "AddAcceptFilterEntry"},
79 {209, nullptr, "ClearAcceptFilter"},
80 {300, nullptr, "OpenStation"},
81 {301, nullptr, "CloseStation"},
82 {302, nullptr, "Connect"},
83 {303, nullptr, "ConnectPrivate"},
84 {304, nullptr, "Disconnect"},
85 {400, nullptr, "InitializeSystem"},
86 {401, nullptr, "FinalizeSystem"},
87 };
88 // clang-format on
89
90 RegisterHandlers(functions);
91 }
92};
93
94class LDNS final : public ServiceFramework<LDNS> {
95public:
96 explicit LDNS() : ServiceFramework{"ldn:s"} {
97 // clang-format off
98 static const FunctionInfo functions[] = {
99 {0, &LDNS::CreateSystemLocalCommunicationService, "CreateSystemLocalCommunicationService"},
100 };
101 // clang-format on
102
103 RegisterHandlers(functions);
104 }
105
106 void CreateSystemLocalCommunicationService(Kernel::HLERequestContext& ctx) {
107 IPC::ResponseBuilder rb{ctx, 2, 0, 1};
108 rb.Push(RESULT_SUCCESS);
109 rb.PushIpcInterface<ILocalCommunicationService>("ISystemLocalCommunicationService");
110
111 LOG_DEBUG(Service_LDN, "called");
112 }
113};
114
115class LDNU final : public ServiceFramework<LDNU> {
116public:
117 explicit LDNU() : ServiceFramework{"ldn:u"} {
118 // clang-format off
119 static const FunctionInfo functions[] = {
120 {0, &LDNU::CreateUserLocalCommunicationService, "CreateUserLocalCommunicationService"},
121 };
122 // clang-format on
123
124 RegisterHandlers(functions);
125 }
126
127 void CreateUserLocalCommunicationService(Kernel::HLERequestContext& ctx) {
128 IPC::ResponseBuilder rb{ctx, 2, 0, 1};
129 rb.Push(RESULT_SUCCESS);
130 rb.PushIpcInterface<ILocalCommunicationService>("IUserLocalCommunicationService");
131
132 LOG_DEBUG(Service_LDN, "called");
133 }
134};
135
136void InstallInterfaces(SM::ServiceManager& sm) {
137 std::make_shared<LDNM>()->InstallAsService(sm);
138 std::make_shared<LDNS>()->InstallAsService(sm);
139 std::make_shared<LDNU>()->InstallAsService(sm);
140}
141
142} // namespace Service::LDN
diff --git a/src/core/hle/service/ldn/ldn.h b/src/core/hle/service/ldn/ldn.h
new file mode 100644
index 000000000..6b2a3c2b2
--- /dev/null
+++ b/src/core/hle/service/ldn/ldn.h
@@ -0,0 +1,16 @@
1// Copyright 2018 yuzu emulator team
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#pragma once
6
7namespace Service::SM {
8class ServiceManager;
9}
10
11namespace Service::LDN {
12
13/// Registers all LDN services with the specified service manager.
14void InstallInterfaces(SM::ServiceManager& sm);
15
16} // namespace Service::LDN
diff --git a/src/core/hle/service/nim/nim.cpp b/src/core/hle/service/nim/nim.cpp
new file mode 100644
index 000000000..bd05b0a70
--- /dev/null
+++ b/src/core/hle/service/nim/nim.cpp
@@ -0,0 +1,124 @@
1// Copyright 2018 yuzu emulator team
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#include "core/hle/service/nim/nim.h"
6#include "core/hle/service/service.h"
7#include "core/hle/service/sm/sm.h"
8
9namespace Service::NIM {
10
11class NIM final : public ServiceFramework<NIM> {
12public:
13 explicit NIM() : ServiceFramework{"nim"} {
14 // clang-format off
15 static const FunctionInfo functions[] = {
16 {0, nullptr, "CreateSystemUpdateTask"},
17 {1, nullptr, "DestroySystemUpdateTask"},
18 {2, nullptr, "ListSystemUpdateTask"},
19 {3, nullptr, "RequestSystemUpdateTaskRun"},
20 {4, nullptr, "GetSystemUpdateTaskInfo"},
21 {5, nullptr, "CommitSystemUpdateTask"},
22 {6, nullptr, "CreateNetworkInstallTask"},
23 {7, nullptr, "DestroyNetworkInstallTask"},
24 {8, nullptr, "ListNetworkInstallTask"},
25 {9, nullptr, "RequestNetworkInstallTaskRun"},
26 {10, nullptr, "GetNetworkInstallTaskInfo"},
27 {11, nullptr, "CommitNetworkInstallTask"},
28 {12, nullptr, "RequestLatestSystemUpdateMeta"},
29 {14, nullptr, "ListApplicationNetworkInstallTask"},
30 {15, nullptr, "ListNetworkInstallTaskContentMeta"},
31 {16, nullptr, "RequestLatestVersion"},
32 {17, nullptr, "SetNetworkInstallTaskAttribute"},
33 {18, nullptr, "AddNetworkInstallTaskContentMeta"},
34 {19, nullptr, "GetDownloadedSystemDataPath"},
35 {20, nullptr, "CalculateNetworkInstallTaskRequiredSize"},
36 {21, nullptr, "IsExFatDriverIncluded"},
37 {22, nullptr, "GetBackgroundDownloadStressTaskInfo"},
38 {23, nullptr, "RequestDeviceAuthenticationToken"},
39 {24, nullptr, "RequestGameCardRegistrationStatus"},
40 {25, nullptr, "RequestRegisterGameCard"},
41 {26, nullptr, "RequestRegisterNotificationToken"},
42 {27, nullptr, "RequestDownloadTaskList"},
43 {28, nullptr, "RequestApplicationControl"},
44 {29, nullptr, "RequestLatestApplicationControl"},
45 {30, nullptr, "RequestVersionList"},
46 {31, nullptr, "CreateApplyDeltaTask"},
47 {32, nullptr, "DestroyApplyDeltaTask"},
48 {33, nullptr, "ListApplicationApplyDeltaTask"},
49 {34, nullptr, "RequestApplyDeltaTaskRun"},
50 {35, nullptr, "GetApplyDeltaTaskInfo"},
51 {36, nullptr, "ListApplyDeltaTask"},
52 {37, nullptr, "CommitApplyDeltaTask"},
53 {38, nullptr, "CalculateApplyDeltaTaskRequiredSize"},
54 {39, nullptr, "PrepareShutdown"},
55 {40, nullptr, "ListApplyDeltaTask"},
56 {41, nullptr, "ClearNotEnoughSpaceStateOfApplyDeltaTask"},
57 {42, nullptr, "Unknown1"},
58 {43, nullptr, "Unknown2"},
59 {44, nullptr, "Unknown3"},
60 {45, nullptr, "Unknown4"},
61 {46, nullptr, "Unknown5"},
62 };
63 // clang-format on
64
65 RegisterHandlers(functions);
66 }
67};
68
69class NIM_SHP final : public ServiceFramework<NIM_SHP> {
70public:
71 explicit NIM_SHP() : ServiceFramework{"nim:shp"} {
72 // clang-format off
73 static const FunctionInfo functions[] = {
74 {0, nullptr, "RequestDeviceAuthenticationToken"},
75 {1, nullptr, "RequestCachedDeviceAuthenticationToken"},
76 {100, nullptr, "RequestRegisterDeviceAccount"},
77 {101, nullptr, "RequestUnregisterDeviceAccount"},
78 {102, nullptr, "RequestDeviceAccountStatus"},
79 {103, nullptr, "GetDeviceAccountInfo"},
80 {104, nullptr, "RequestDeviceRegistrationInfo"},
81 {105, nullptr, "RequestTransferDeviceAccount"},
82 {106, nullptr, "RequestSyncRegistration"},
83 {107, nullptr, "IsOwnDeviceId"},
84 {200, nullptr, "RequestRegisterNotificationToken"},
85 {300, nullptr, "RequestUnlinkDevice"},
86 {301, nullptr, "RequestUnlinkDeviceIntegrated"},
87 {302, nullptr, "RequestLinkDevice"},
88 {303, nullptr, "HasDeviceLink"},
89 {304, nullptr, "RequestUnlinkDeviceAll"},
90 {305, nullptr, "RequestCreateVirtualAccount"},
91 {306, nullptr, "RequestDeviceLinkStatus"},
92 {400, nullptr, "GetAccountByVirtualAccount"},
93 {500, nullptr, "RequestSyncTicket"},
94 {501, nullptr, "RequestDownloadTicket"},
95 {502, nullptr, "RequestDownloadTicketForPrepurchasedContents"},
96 };
97 // clang-format on
98
99 RegisterHandlers(functions);
100 }
101};
102
103class NTC final : public ServiceFramework<NTC> {
104public:
105 explicit NTC() : ServiceFramework{"ntc"} {
106 // clang-format off
107 static const FunctionInfo functions[] = {
108 {0, nullptr, "OpenEnsureNetworkClockAvailabilityService"},
109 {100, nullptr, "SuspendAutonomicTimeCorrection"},
110 {101, nullptr, "ResumeAutonomicTimeCorrection"},
111 };
112 // clang-format on
113
114 RegisterHandlers(functions);
115 }
116};
117
118void InstallInterfaces(SM::ServiceManager& sm) {
119 std::make_shared<NIM>()->InstallAsService(sm);
120 std::make_shared<NIM_SHP>()->InstallAsService(sm);
121 std::make_shared<NTC>()->InstallAsService(sm);
122}
123
124} // namespace Service::NIM
diff --git a/src/core/hle/service/nim/nim.h b/src/core/hle/service/nim/nim.h
new file mode 100644
index 000000000..2a2a92df0
--- /dev/null
+++ b/src/core/hle/service/nim/nim.h
@@ -0,0 +1,15 @@
1// Copyright 2018 yuzu emulator team
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#pragma once
6
7namespace Service::SM {
8class ServiceManager;
9}
10
11namespace Service::NIM {
12
13void InstallInterfaces(SM::ServiceManager& sm);
14
15} // namespace Service::NIM
diff --git a/src/core/hle/service/service.cpp b/src/core/hle/service/service.cpp
index 482989ea7..8b84fd349 100644
--- a/src/core/hle/service/service.cpp
+++ b/src/core/hle/service/service.cpp
@@ -27,12 +27,15 @@
27#include "core/hle/service/fatal/fatal.h" 27#include "core/hle/service/fatal/fatal.h"
28#include "core/hle/service/filesystem/filesystem.h" 28#include "core/hle/service/filesystem/filesystem.h"
29#include "core/hle/service/friend/friend.h" 29#include "core/hle/service/friend/friend.h"
30#include "core/hle/service/grc/grc.h"
30#include "core/hle/service/hid/hid.h" 31#include "core/hle/service/hid/hid.h"
32#include "core/hle/service/ldn/ldn.h"
31#include "core/hle/service/ldr/ldr.h" 33#include "core/hle/service/ldr/ldr.h"
32#include "core/hle/service/lm/lm.h" 34#include "core/hle/service/lm/lm.h"
33#include "core/hle/service/mm/mm_u.h" 35#include "core/hle/service/mm/mm_u.h"
34#include "core/hle/service/nfp/nfp.h" 36#include "core/hle/service/nfp/nfp.h"
35#include "core/hle/service/nifm/nifm.h" 37#include "core/hle/service/nifm/nifm.h"
38#include "core/hle/service/nim/nim.h"
36#include "core/hle/service/ns/ns.h" 39#include "core/hle/service/ns/ns.h"
37#include "core/hle/service/nvdrv/nvdrv.h" 40#include "core/hle/service/nvdrv/nvdrv.h"
38#include "core/hle/service/pctl/pctl.h" 41#include "core/hle/service/pctl/pctl.h"
@@ -198,12 +201,15 @@ void Init(std::shared_ptr<SM::ServiceManager>& sm) {
198 Fatal::InstallInterfaces(*sm); 201 Fatal::InstallInterfaces(*sm);
199 FileSystem::InstallInterfaces(*sm); 202 FileSystem::InstallInterfaces(*sm);
200 Friend::InstallInterfaces(*sm); 203 Friend::InstallInterfaces(*sm);
204 GRC::InstallInterfaces(*sm);
201 HID::InstallInterfaces(*sm); 205 HID::InstallInterfaces(*sm);
206 LDN::InstallInterfaces(*sm);
202 LDR::InstallInterfaces(*sm); 207 LDR::InstallInterfaces(*sm);
203 LM::InstallInterfaces(*sm); 208 LM::InstallInterfaces(*sm);
204 MM::InstallInterfaces(*sm); 209 MM::InstallInterfaces(*sm);
205 NFP::InstallInterfaces(*sm); 210 NFP::InstallInterfaces(*sm);
206 NIFM::InstallInterfaces(*sm); 211 NIFM::InstallInterfaces(*sm);
212 NIM::InstallInterfaces(*sm);
207 NS::InstallInterfaces(*sm); 213 NS::InstallInterfaces(*sm);
208 Nvidia::InstallInterfaces(*sm); 214 Nvidia::InstallInterfaces(*sm);
209 PCTL::InstallInterfaces(*sm); 215 PCTL::InstallInterfaces(*sm);
diff --git a/src/core/hle/service/sockets/bsd.cpp b/src/core/hle/service/sockets/bsd.cpp
index 6aa1e2511..3211a8346 100644
--- a/src/core/hle/service/sockets/bsd.cpp
+++ b/src/core/hle/service/sockets/bsd.cpp
@@ -109,4 +109,26 @@ BSD::BSD(const char* name) : ServiceFramework(name) {
109 RegisterHandlers(functions); 109 RegisterHandlers(functions);
110} 110}
111 111
112BSDCFG::BSDCFG() : ServiceFramework{"bsdcfg"} {
113 // clang-format off
114 static const FunctionInfo functions[] = {
115 {0, nullptr, "SetIfUp"},
116 {1, nullptr, "SetIfUpWithEvent"},
117 {2, nullptr, "CancelIf"},
118 {3, nullptr, "SetIfDown"},
119 {4, nullptr, "GetIfState"},
120 {5, nullptr, "DhcpRenew"},
121 {6, nullptr, "AddStaticArpEntry"},
122 {7, nullptr, "RemoveArpEntry"},
123 {8, nullptr, "LookupArpEntry"},
124 {9, nullptr, "LookupArpEntry2"},
125 {10, nullptr, "ClearArpEntries"},
126 {11, nullptr, "ClearArpEntries2"},
127 {12, nullptr, "PrintArpEntries"},
128 };
129 // clang-format on
130
131 RegisterHandlers(functions);
132}
133
112} // namespace Service::Sockets 134} // namespace Service::Sockets
diff --git a/src/core/hle/service/sockets/bsd.h b/src/core/hle/service/sockets/bsd.h
index a6b1ca7d0..c1da59b24 100644
--- a/src/core/hle/service/sockets/bsd.h
+++ b/src/core/hle/service/sockets/bsd.h
@@ -26,4 +26,9 @@ private:
26 u32 next_fd = 1; 26 u32 next_fd = 1;
27}; 27};
28 28
29class BSDCFG final : public ServiceFramework<BSDCFG> {
30public:
31 explicit BSDCFG();
32};
33
29} // namespace Service::Sockets 34} // namespace Service::Sockets
diff --git a/src/core/hle/service/sockets/ethc.cpp b/src/core/hle/service/sockets/ethc.cpp
new file mode 100644
index 000000000..d53c25eec
--- /dev/null
+++ b/src/core/hle/service/sockets/ethc.cpp
@@ -0,0 +1,38 @@
1// Copyright 2018 yuzu emulator team
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#include "core/hle/service/sockets/ethc.h"
6
7namespace Service::Sockets {
8
9ETHC_C::ETHC_C() : ServiceFramework{"ethc:c"} {
10 // clang-format off
11 static const FunctionInfo functions[] = {
12 {0, nullptr, "Initialize"},
13 {1, nullptr, "Cancel"},
14 {2, nullptr, "GetResult"},
15 {3, nullptr, "GetMediaList"},
16 {4, nullptr, "SetMediaType"},
17 {5, nullptr, "GetMediaType"},
18 };
19 // clang-format on
20
21 RegisterHandlers(functions);
22}
23
24ETHC_I::ETHC_I() : ServiceFramework{"ethc:i"} {
25 // clang-format off
26 static const FunctionInfo functions[] = {
27 {0, nullptr, "GetReadableHandle"},
28 {1, nullptr, "Cancel"},
29 {2, nullptr, "GetResult"},
30 {3, nullptr, "GetInterfaceList"},
31 {4, nullptr, "GetInterfaceCount"},
32 };
33 // clang-format on
34
35 RegisterHandlers(functions);
36}
37
38} // namespace Service::Sockets
diff --git a/src/core/hle/service/sockets/ethc.h b/src/core/hle/service/sockets/ethc.h
new file mode 100644
index 000000000..9a3c88100
--- /dev/null
+++ b/src/core/hle/service/sockets/ethc.h
@@ -0,0 +1,21 @@
1// Copyright 2018 yuzu emulator team
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#pragma once
6
7#include "core/hle/service/service.h"
8
9namespace Service::Sockets {
10
11class ETHC_C final : public ServiceFramework<ETHC_C> {
12public:
13 explicit ETHC_C();
14};
15
16class ETHC_I final : public ServiceFramework<ETHC_I> {
17public:
18 explicit ETHC_I();
19};
20
21} // namespace Service::Sockets
diff --git a/src/core/hle/service/sockets/sockets.cpp b/src/core/hle/service/sockets/sockets.cpp
index 05bd10d35..08d2d306a 100644
--- a/src/core/hle/service/sockets/sockets.cpp
+++ b/src/core/hle/service/sockets/sockets.cpp
@@ -3,6 +3,7 @@
3// Refer to the license.txt file included. 3// Refer to the license.txt file included.
4 4
5#include "core/hle/service/sockets/bsd.h" 5#include "core/hle/service/sockets/bsd.h"
6#include "core/hle/service/sockets/ethc.h"
6#include "core/hle/service/sockets/nsd.h" 7#include "core/hle/service/sockets/nsd.h"
7#include "core/hle/service/sockets/sfdnsres.h" 8#include "core/hle/service/sockets/sfdnsres.h"
8#include "core/hle/service/sockets/sockets.h" 9#include "core/hle/service/sockets/sockets.h"
@@ -12,8 +13,14 @@ namespace Service::Sockets {
12void InstallInterfaces(SM::ServiceManager& service_manager) { 13void InstallInterfaces(SM::ServiceManager& service_manager) {
13 std::make_shared<BSD>("bsd:s")->InstallAsService(service_manager); 14 std::make_shared<BSD>("bsd:s")->InstallAsService(service_manager);
14 std::make_shared<BSD>("bsd:u")->InstallAsService(service_manager); 15 std::make_shared<BSD>("bsd:u")->InstallAsService(service_manager);
16 std::make_shared<BSDCFG>()->InstallAsService(service_manager);
17
18 std::make_shared<ETHC_C>()->InstallAsService(service_manager);
19 std::make_shared<ETHC_I>()->InstallAsService(service_manager);
20
15 std::make_shared<NSD>("nsd:a")->InstallAsService(service_manager); 21 std::make_shared<NSD>("nsd:a")->InstallAsService(service_manager);
16 std::make_shared<NSD>("nsd:u")->InstallAsService(service_manager); 22 std::make_shared<NSD>("nsd:u")->InstallAsService(service_manager);
23
17 std::make_shared<SFDNSRES>()->InstallAsService(service_manager); 24 std::make_shared<SFDNSRES>()->InstallAsService(service_manager);
18} 25}
19 26
diff --git a/src/video_core/gpu.h b/src/video_core/gpu.h
index de276c559..c464fc6d1 100644
--- a/src/video_core/gpu.h
+++ b/src/video_core/gpu.h
@@ -29,6 +29,7 @@ enum class RenderTargetFormat : u32 {
29 RG16_UINT = 0xDD, 29 RG16_UINT = 0xDD,
30 RG16_FLOAT = 0xDE, 30 RG16_FLOAT = 0xDE,
31 R11G11B10_FLOAT = 0xE0, 31 R11G11B10_FLOAT = 0xE0,
32 R16_FLOAT = 0xF2,
32 R8_UNORM = 0xF3, 33 R8_UNORM = 0xF3,
33}; 34};
34 35
diff --git a/src/video_core/memory_manager.cpp b/src/video_core/memory_manager.cpp
index 2f814a184..ca923d17d 100644
--- a/src/video_core/memory_manager.cpp
+++ b/src/video_core/memory_manager.cpp
@@ -13,8 +13,10 @@ GPUVAddr MemoryManager::AllocateSpace(u64 size, u64 align) {
13 ASSERT(gpu_addr); 13 ASSERT(gpu_addr);
14 14
15 for (u64 offset = 0; offset < size; offset += PAGE_SIZE) { 15 for (u64 offset = 0; offset < size; offset += PAGE_SIZE) {
16 ASSERT(PageSlot(*gpu_addr + offset) == static_cast<u64>(PageStatus::Unmapped)); 16 VAddr& slot = PageSlot(*gpu_addr + offset);
17 PageSlot(*gpu_addr + offset) = static_cast<u64>(PageStatus::Allocated); 17
18 ASSERT(slot == static_cast<u64>(PageStatus::Unmapped));
19 slot = static_cast<u64>(PageStatus::Allocated);
18 } 20 }
19 21
20 return *gpu_addr; 22 return *gpu_addr;
@@ -22,8 +24,10 @@ GPUVAddr MemoryManager::AllocateSpace(u64 size, u64 align) {
22 24
23GPUVAddr MemoryManager::AllocateSpace(GPUVAddr gpu_addr, u64 size, u64 align) { 25GPUVAddr MemoryManager::AllocateSpace(GPUVAddr gpu_addr, u64 size, u64 align) {
24 for (u64 offset = 0; offset < size; offset += PAGE_SIZE) { 26 for (u64 offset = 0; offset < size; offset += PAGE_SIZE) {
25 ASSERT(PageSlot(gpu_addr + offset) == static_cast<u64>(PageStatus::Unmapped)); 27 VAddr& slot = PageSlot(gpu_addr + offset);
26 PageSlot(gpu_addr + offset) = static_cast<u64>(PageStatus::Allocated); 28
29 ASSERT(slot == static_cast<u64>(PageStatus::Unmapped));
30 slot = static_cast<u64>(PageStatus::Allocated);
27 } 31 }
28 32
29 return gpu_addr; 33 return gpu_addr;
@@ -34,8 +38,10 @@ GPUVAddr MemoryManager::MapBufferEx(VAddr cpu_addr, u64 size) {
34 ASSERT(gpu_addr); 38 ASSERT(gpu_addr);
35 39
36 for (u64 offset = 0; offset < size; offset += PAGE_SIZE) { 40 for (u64 offset = 0; offset < size; offset += PAGE_SIZE) {
37 ASSERT(PageSlot(*gpu_addr + offset) == static_cast<u64>(PageStatus::Unmapped)); 41 VAddr& slot = PageSlot(*gpu_addr + offset);
38 PageSlot(*gpu_addr + offset) = cpu_addr + offset; 42
43 ASSERT(slot == static_cast<u64>(PageStatus::Unmapped));
44 slot = cpu_addr + offset;
39 } 45 }
40 46
41 MappedRegion region{cpu_addr, *gpu_addr, size}; 47 MappedRegion region{cpu_addr, *gpu_addr, size};
@@ -48,8 +54,10 @@ GPUVAddr MemoryManager::MapBufferEx(VAddr cpu_addr, GPUVAddr gpu_addr, u64 size)
48 ASSERT((gpu_addr & PAGE_MASK) == 0); 54 ASSERT((gpu_addr & PAGE_MASK) == 0);
49 55
50 for (u64 offset = 0; offset < size; offset += PAGE_SIZE) { 56 for (u64 offset = 0; offset < size; offset += PAGE_SIZE) {
51 ASSERT(PageSlot(gpu_addr + offset) == static_cast<u64>(PageStatus::Allocated)); 57 VAddr& slot = PageSlot(gpu_addr + offset);
52 PageSlot(gpu_addr + offset) = cpu_addr + offset; 58
59 ASSERT(slot == static_cast<u64>(PageStatus::Allocated));
60 slot = cpu_addr + offset;
53 } 61 }
54 62
55 MappedRegion region{cpu_addr, gpu_addr, size}; 63 MappedRegion region{cpu_addr, gpu_addr, size};
@@ -62,9 +70,11 @@ GPUVAddr MemoryManager::UnmapBuffer(GPUVAddr gpu_addr, u64 size) {
62 ASSERT((gpu_addr & PAGE_MASK) == 0); 70 ASSERT((gpu_addr & PAGE_MASK) == 0);
63 71
64 for (u64 offset = 0; offset < size; offset += PAGE_SIZE) { 72 for (u64 offset = 0; offset < size; offset += PAGE_SIZE) {
65 ASSERT(PageSlot(gpu_addr + offset) != static_cast<u64>(PageStatus::Allocated) && 73 VAddr& slot = PageSlot(gpu_addr + offset);
66 PageSlot(gpu_addr + offset) != static_cast<u64>(PageStatus::Unmapped)); 74
67 PageSlot(gpu_addr + offset) = static_cast<u64>(PageStatus::Unmapped); 75 ASSERT(slot != static_cast<u64>(PageStatus::Allocated) &&
76 slot != static_cast<u64>(PageStatus::Unmapped));
77 slot = static_cast<u64>(PageStatus::Unmapped);
68 } 78 }
69 79
70 // Delete the region mappings that are contained within the unmapped region 80 // Delete the region mappings that are contained within the unmapped region
@@ -128,9 +138,7 @@ VAddr& MemoryManager::PageSlot(GPUVAddr gpu_addr) {
128 auto& block = page_table[(gpu_addr >> (PAGE_BITS + PAGE_TABLE_BITS)) & PAGE_TABLE_MASK]; 138 auto& block = page_table[(gpu_addr >> (PAGE_BITS + PAGE_TABLE_BITS)) & PAGE_TABLE_MASK];
129 if (!block) { 139 if (!block) {
130 block = std::make_unique<PageBlock>(); 140 block = std::make_unique<PageBlock>();
131 for (unsigned index = 0; index < PAGE_BLOCK_SIZE; index++) { 141 block->fill(static_cast<VAddr>(PageStatus::Unmapped));
132 (*block)[index] = static_cast<u64>(PageStatus::Unmapped);
133 }
134 } 142 }
135 return (*block)[(gpu_addr >> PAGE_BITS) & PAGE_BLOCK_MASK]; 143 return (*block)[(gpu_addr >> PAGE_BITS) & PAGE_BLOCK_MASK];
136} 144}
diff --git a/src/video_core/renderer_opengl/gl_rasterizer_cache.h b/src/video_core/renderer_opengl/gl_rasterizer_cache.h
index bb39c0a6f..bf0458b94 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer_cache.h
+++ b/src/video_core/renderer_opengl/gl_rasterizer_cache.h
@@ -230,7 +230,8 @@ struct SurfaceParams {
230 return PixelFormat::RG16; 230 return PixelFormat::RG16;
231 case Tegra::RenderTargetFormat::RG16_SNORM: 231 case Tegra::RenderTargetFormat::RG16_SNORM:
232 return PixelFormat::RG16S; 232 return PixelFormat::RG16S;
233 233 case Tegra::RenderTargetFormat::R16_FLOAT:
234 return PixelFormat::R16F;
234 default: 235 default:
235 LOG_CRITICAL(HW_GPU, "Unimplemented format={}", static_cast<u32>(format)); 236 LOG_CRITICAL(HW_GPU, "Unimplemented format={}", static_cast<u32>(format));
236 UNREACHABLE(); 237 UNREACHABLE();
@@ -437,6 +438,7 @@ struct SurfaceParams {
437 case Tegra::RenderTargetFormat::RGBA32_FLOAT: 438 case Tegra::RenderTargetFormat::RGBA32_FLOAT:
438 case Tegra::RenderTargetFormat::RG32_FLOAT: 439 case Tegra::RenderTargetFormat::RG32_FLOAT:
439 case Tegra::RenderTargetFormat::RG16_FLOAT: 440 case Tegra::RenderTargetFormat::RG16_FLOAT:
441 case Tegra::RenderTargetFormat::R16_FLOAT:
440 return ComponentType::Float; 442 return ComponentType::Float;
441 case Tegra::RenderTargetFormat::RGBA32_UINT: 443 case Tegra::RenderTargetFormat::RGBA32_UINT:
442 case Tegra::RenderTargetFormat::RG16_UINT: 444 case Tegra::RenderTargetFormat::RG16_UINT: