Commit graph

2316 commits

Author SHA1 Message Date
MerryMage
065d3ce063 memory: Reorder parameters of CopyBlock to a more sensible order
* Also implement CopyBlock variants in terms of each other
2019-04-19 19:46:09 +01:00
zhupengfei
0f65dac964
service/ps: Address review 2019-04-16 22:17:07 +08:00
Lioncash
42535468c3 kernel/server_session: Return a std::pair from CreateSessionPair()
Keeps the return type consistent with the function name. While we're at
it, we can also reduce the amount of boilerplate involved with handling
these by using structured bindings.
2019-04-15 21:46:57 +02:00
Lioncash
1afc2c72d6 kernel/server_port: Return a std::pair from CreatePortPair()
Returns the same type that the function name describes.
2019-04-15 18:42:17 +02:00
Lioncash
c4c644b285 kernel: Make handle type declarations constexpr
Some objects declare their handle type as const, while others declare it
as constexpr. This makes the const ones constexpr for consistency, and
prevent unexpected compilation errors if these happen to be attempted to be
used within a constexpr context.
2019-04-15 18:10:11 +02:00
zhupengfei
b34847d59e
service/ps: Implement PS:EncryptDecryptAES 2019-04-15 22:56:55 +08:00
Weiyi Wang
11754778bb
Merge pull request #4716 from wwylele/client-is-known
HLE/IPC: HLEContext can memorize the client thread and use it for SleepClientThread
2019-04-15 09:08:07 -04:00
Weiyi Wang
4a206237be
Merge pull request #4726 from FearlessTobi/port-2312
Port yuzu-emu/yuzu#2312: "general: Use deducation guides for std::lock_guard and std::unique_lock"
2019-04-13 18:00:09 -04:00
zhupengfei
d7fbc1ca2c
common/string_util: Move TextFromBuffer to string_util 2019-04-08 22:34:21 +08:00
zhupengfei
25be09c7a3
applets/swkbd: Address comments 2019-04-08 21:45:32 +08:00
zhupengfei
8078256a88 applets/swkbd: Add callback support 2019-04-08 21:45:29 +08:00
Lioncash
aba5dae557 service/service: Remove unncessary calls to c_str()
These can just be passed regularly, now that we use fmt instead of our
old logging system.

While we're at it, make the parameters to MakeFunctionString
std::string_views.
2019-04-07 18:27:14 +02:00
fearlessTobi
e9bd34f7da Address remaining review comments 2019-04-07 17:00:28 +02:00
fearlessTobi
1517d2fef7 Address more reviews 2019-04-07 15:35:32 +02:00
fearlessTobi
781d4b787a Address first batch of review comments 2019-04-07 15:35:32 +02:00
fearlessTobi
041638ea4d applets: implement HLE mii selector applet 2019-04-07 15:35:29 +02:00
fearlessTobi
f903d3161d ptm: move ptm_shared_extdata_id to header 2019-04-07 15:35:29 +02:00
Lioncash
21c71d21ae general: Use deducation guides for std::lock_guard and std::unique_lock
Since C++17, the introduction of deduction guides for locking facilities
means that we no longer need to hardcode the mutex type into the locks
themselves, making it easier to switch mutex types, should it ever be
necessary in the future.
2019-04-07 15:14:29 +02:00
Weiyi Wang
f565ea80f0 HLE/IPC: HLEContext can memorize the client thread and use it for SleepClientThread
This reduces the boilerplate that services have to write out the current thread explicitly. Using current thread instead of client thread is also semantically incorrect, and will be a problem when we implement multicore (at which time there will be multiple current threads)
2019-04-02 13:23:39 -04:00
Weiyi Wang
daeba65fb4
Merge pull request #4710 from wwylele/why-instrusive-ptr
Kernel: replace boost::intrusive_ptr with std::shared_ptr
2019-04-02 11:06:13 -04:00
Weiyi Wang
8d2718a18f CAM: initialize states 2019-03-30 11:07:11 -04:00
Weiyi Wang
05058863b5 cleanup includes 2019-03-26 10:50:41 -04:00
Weiyi Wang
5f11c5f733 Kernel: replace boost::intrusive_ptr with std::shared_ptr 2019-03-24 14:32:11 -04:00
Weiyi Wang
c1de8acfe5
Merge pull request #4689 from wwylele/server-leak
ServiceFrameworkBase: remove ownership to ServerPort
2019-03-24 14:29:41 -04:00
Weiyi Wang
21bda754b3
Merge pull request #4396 from FearlessTobi/open-delays
fs_user: Add a delay for each file open
2019-03-23 12:21:12 -04:00
Weiyi Wang
9b07ff9681
Merge pull request #4683 from wwylele/misc-global-clean
Misc global instance reference cleaup
2019-03-22 22:28:50 -04:00
Weiyi Wang
2138db3d7d
Merge pull request #4690 from wwylele/uds-deprecated
UDS: implement deprecated functions
2019-03-21 09:52:01 -04:00
Vamsi Krishna
aedf5a84b0
Merge pull request #4671 from jroweboy/mic4
Microphone support
2019-03-20 23:12:38 +05:30
James Rowe
9739e2b6fd Support signed 8bit pcm in cubeb input. Address review 2019-03-17 22:52:03 -06:00
Weiyi Wang
4696b13170
UDS: I was drunk 2019-03-15 00:35:39 -04:00
Weiyi Wang
a986e35795 UDS: Change reply command ID for two versions of ConnectToNetwork 2019-03-14 10:10:18 -04:00
Weiyi Wang
9c016ff3a3 Y2R: pass in MemorySystem from service 2019-03-13 10:23:58 -04:00
Weiyi Wang
d6f3ac1f4e IR: pass in Core::Timing for ExtraHID 2019-03-13 10:23:58 -04:00
Weiyi Wang
ea496507d5 DSP_DSP: use member system instead of global instance 2019-03-13 10:23:58 -04:00
Weiyi Wang
aaa599a849 UDS: duplicate DecryptBeaconData implementation for deprecated version
They are really identical in the NWM module code
2019-03-13 00:21:10 -04:00
Weiyi Wang
16fb6a2c8d UDS: implement ConnectToNetworkDeprecated and forward params to ConnectToNetwork 2019-03-13 00:03:51 -04:00
Weiyi Wang
fc0fe5c3c0 UDS: devide IPC and impl for ConnectToNetwork 2019-03-13 00:03:51 -04:00
Weiyi Wang
e121c59583 UDS: implement BeginHostingNetworkDeprecated and forward params to BeginHostingNetwork 2019-03-13 00:03:51 -04:00
Weiyi Wang
5353d539ce UDS: divide IPC and impl for BeginHostingNetwork 2019-03-12 23:00:18 -04:00
Weiyi Wang
1076864935 UDS: implement InitializeDeprecated and forward params to Initialize 2019-03-12 21:53:07 -04:00
Weiyi Wang
021c77bc9f UDS: divide IPC and impl for InitializeWithVersion 2019-03-12 21:50:14 -04:00
Weiyi Wang
8750b81ce0 ServiceFrameworkBase: remove ownership to ServerPort
This causes a reference cycle because ServerPort also holds a shared pointer to SessionRequestHandler (inherited by ServiceFrameworkBase). Given that the member port is never used in ServiceFrameworkBase, we can simply remove it. The port object is kept alive by ServiceManager|KernelSystem::named_ports -> ClientPort -> ServerPort
2019-03-12 19:11:50 -04:00
fearlessTobi
ff3d7532c9 nfc: Improve implementation of GetAmiiboConfig
When making the initial implementation, I forgot to add the series variable to the AmiiboConfig struct.
With this PR it is added and many of the AmiiboConfig fields get their proper values now.
The loading of the Amiibo data that is added here has been hwtested.

This fixes Amiibos in Yoshis Woolly World, Smash (partially) and probably other games too.
2019-03-12 19:08:01 +01:00
Weiyi Wang
6ce58248b0 APT: use member system instead of global instance 2019-03-10 11:10:24 -04:00
bunnei
9560060f04
Merge pull request #4666 from FearlessTobi/port-2167
Port yuzu-emu/yuzu#2167: "common: Move Quaternion, Rectangle, Vec2, Vec3, and Vec4 into the Common namespace"
2019-03-07 23:52:42 -05:00
James Rowe
f5df13eb24 Remove global state and add mic hot swapping 2019-03-06 20:59:58 -07:00
James Rowe
182d672c15 Add ifdef around cubeb for android. Address a few review comments 2019-03-06 20:03:22 -07:00
James Rowe
5f532c2560 Address review comments 2019-03-06 11:16:43 -07:00
fearlessTobi
5055a6c262 Address review comments 2019-03-06 18:53:34 +01:00
fearlessTobi
fc7e6c9cc9 fs_user: Add a delay for each file open 2019-03-06 16:09:24 +01:00
James Rowe
c669aa8d55 Rest of the owl 2019-03-04 23:07:05 -07:00
James Rowe
7fccc995ce Initial Mic setup 2019-03-04 23:06:42 -07:00
Weiyi Wang
9c57b74907
Merge pull request #4618 from wwylele/fs-clean
FS: pass down program ID for archive operation (cleanup System::GetInstance part 3)
2019-03-04 12:34:54 -05:00
Lioncash
643472e24a common/vector_math: Move Vec[x] types into the Common namespace
These types are within the common library, so they should be using the
Common namespace.
2019-03-02 15:04:13 +01:00
Weiyi Wang
ad1cfc8d50
Merge pull request #4608 from wwylele/sharedmem-circular
Kernel/SharedMemory: make owner_process a raw pointer
2019-02-25 10:32:45 -05:00
Weiyi Wang
5f10cc412f
Merge pull request #4632 from zhaowenlan1779/socu
service/soc_u: Implement getaddrinfo and getnameinfo
2019-02-25 10:23:13 -05:00
Weiyi Wang
42c777b0e5
Merge pull request #4617 from wwylele/hle-service-clean
HLE/IPC: clean up System::GetInstance
2019-02-25 10:22:13 -05:00
Weiyi Wang
c265f3f507
Merge pull request #4616 from wwylele/core-global-clean
Cleanup System::GetInstance reference - Part 1
2019-02-25 10:22:02 -05:00
Weiyi Wang
8f2bd97277
Merge pull request #4655 from tgsm/gcc-version
Remove GCC version checks
2019-02-22 16:21:21 -05:00
tgsm
433ab35e7e Remove GCC version checks
Citra can't be compiled using GCC <7 because of required C++17 support, so these version checks don't need to exist anymore.
2019-02-19 16:39:34 -05:00
tgsm
39e163b7ce core: use nested namespaces 2019-02-18 20:34:18 -05:00
Weiyi Wang
e6feef96c1 Service: clear IPC header for unimplemented function stub 2019-02-14 22:16:50 -05:00
Weiyi Wang
3f86be88f0 HLE/IPC: pass in kernel & memory reference from parent to avoid global state reference 2019-02-14 22:09:25 -05:00
Weiyi Wang
0a424b86d2 ServerSession: replace GetPointer with block copy for HLE translation
Do it in the same way as HLERequestContext::SleepClientThread callback and avoid unsafe GetPointer
2019-02-14 22:09:25 -05:00
Weiyi Wang
36c8e1d7a9 HLE/IPC: move command buffer translation into kernel as TODO says 2019-02-14 22:09:25 -05:00
Weiyi Wang
5f6d9f1915 Kernel/IPC: use MemorySystem from parameter 2019-02-14 14:04:46 -05:00
Weiyi Wang
20f47583f6 Kernel: replace usage of Core::System::GetInstance().PrepareReschedule() with callback 2019-02-14 14:04:46 -05:00
Weiyi Wang
eb050b8403 Kernel: replace usage of Core::System::GetInstance()::Timing() 2019-02-14 14:04:46 -05:00
Weiyi Wang
276ca88c9e kernel/thread: replace usage of Core::CPU() 2019-02-14 14:04:46 -05:00
Weiyi Wang
b9f6bd9278 ldr_ro: replace usage of Core::CPU() 2019-02-14 14:04:46 -05:00
Weiyi Wang
8f2c35d7b6
Merge pull request #4614 from wwylele/nwm-uds-global
NWM_UDS: move states into the class
2019-02-14 11:44:28 -05:00
zhupengfei
1995e8ff32
service/soc_u: address review comments 2019-02-10 18:49:18 +08:00
zhupengfei
08bf899d70
service/soc_u: Implement getaddrinfo and getnameinfo 2019-02-09 20:12:09 +08:00
Weiyi Wang
a6d9baa05a FS: pass down program ID for archive operation
To eliminate System::GetInstance usage. Archive type like SelfNCCH and SaveData changes the actual reference path for different client, so archive backend interface should accept client information from the service interface. Currently we only pass the program ID as the client information.
2019-02-02 20:44:13 -05:00
Weiyi Wang
6382d9bfc3 NWM_UDS: move states into the class 2019-01-31 15:42:45 -05:00
Weiyi Wang
3a7a686fa9 Kernel/SharedMemory: make owner_process a raw pointer
To break a circular reference formed by process->handle_table->shared_memory->process. Since SharedMemory uses its owner process in the destructor, which is not kept alive by SharedMemory any more, we need to make sure that the lifetime of process is longer than the shared memory. To partially resolve this, Process now explicitly releases shared memory first in its destructor. This is with the assumtion that there is no inter-process reference to shared memory on exit, which is not true when we introduce more multi-process emulation. A TODO is left there for this, as more RE needs to be done on how 3DS handles this situation
2019-01-29 11:18:51 -05:00
Weiyi Wang
104829ae58 remove all occurance of specifying endianness inside BitField
This commit it automatically generated by command in zsh:
sed -i -- 's/BitField<\(.*\)_le>/BitField<\1>/g' **/*(D.)

BitField is now aware to endianness and default to little endian. It expects a value representation type without storage specification for its template parameter.
2019-01-28 22:09:43 -05:00
Weiyi Wang
054a97c08b
Merge pull request #4579 from xperia64/3d_slider
Change 3D Slider in-game
2019-01-23 20:23:55 -05:00
xperia64
c1ac39f058 Actually fix the race condition 2019-01-18 16:32:16 -05:00
xperia64
5f5646c850 Fix types 2019-01-18 15:24:39 -05:00
xperia64
6f2eb2a418 Do 3D slider updating in the HID module 2019-01-17 23:48:50 -05:00
xperia64
81f4cef201 Revert "Change 3D slider in-game"
This reverts commit bb9a972e35.

Needs to be completely redone in the HID HLE service module.
2019-01-17 23:33:24 -05:00
Weiyi Wang
95a57a2fe3
Merge pull request #4538 from valentinvanelslande/profiles
Add multiple input profile support
2019-01-17 22:32:24 -05:00
xperia64
bb9a972e35 Change 3D slider in-game 2019-01-17 22:18:15 -05:00
Ben
4f23d5d69e
Merge pull request #4490 from wwylele/teakra-new
audio: implement DSP LLE
2019-01-11 16:45:00 +01:00
Valentin Vanelslande
62b40e9155
Merge branch 'master' into profiles 2019-01-07 10:39:44 -05:00
Valentin Vanelslande
8e614c3eb0 clang-format; address one comment 2018-12-28 23:31:55 -05:00
RicBent
6ad609a539 Added GPIO14 button and UI config buttons 2018-12-28 17:13:37 -06:00
RicBent
446b614409 Removed unnecessary debug key abbreviations 2018-12-28 13:33:54 -06:00
RicBent
403d2f0058 Added Debug Button 2018-12-28 12:47:50 -06:00
Weiyi Wang
05c372bf6c Update teakra to fix macos issue; address comment feedbacks 2018-12-21 20:49:23 -05:00
Weiyi Wang
92e5c51adb Service/DSP: implement semaphore event 2018-12-21 20:49:22 -05:00
Weiyi Wang
6f6ffceec4 audio_core/hle,lle: implement UnloadComponent 2018-12-21 20:49:21 -05:00
Weiyi Wang
4add509b20 audio_core/hle: move implementation of LoadComponent 2018-12-21 20:49:21 -05:00
Weiyi Wang
df8aaee965 DSP_DSP: avoid global in ReadPipe 2018-12-21 20:49:20 -05:00
Weiyi Wang
daf23eca2e DSP_DSP: avoid global in WriteProcessPipe 2018-12-21 20:49:20 -05:00
Weiyi Wang
c9736b3300 audio_core/hle,lle: implement SetSemaphore 2018-12-21 20:49:20 -05:00
Weiyi Wang
14eb3561de audio_core/hle: move implementation of RecvDataIsReady 2018-12-21 20:49:19 -05:00
Weiyi Wang
7f568a3c19 DSP/HLE: move implementation of RecvData to audio_core, behind common interface 2018-12-21 20:49:19 -05:00
Pengfei Zhu
eabc9727d8
Merge pull request #4468 from citra-emu/multiplayer-v4/main
Multiplayer version 4
2018-12-22 09:45:28 +08:00