Commit Graph

10791 Commits

Author SHA1 Message Date
liamwhite ac484666fc Merge pull request #9857 from german77/fwupdate
core: Update service function tables to 16.0.0+
2023-02-25 12:44:06 -05:00
Narr the Reg 4b240b6393 core: hidbus: Fix BusType size 2023-02-24 21:22:27 -06:00
Narr the Reg 932cf55052 core: Update service function tables to 16.0.0+ 2023-02-24 18:17:36 -06:00
Liam b88b27fdf5 am: avoid direct pointer access of transfer memory objects 2023-02-24 12:50:54 -05:00
Liam 434d182020 hid: avoid direct pointer access of transfer memory objects 2023-02-24 12:48:07 -05:00
Narr the Reg 86a9ed6ef1 core: hid: Restore motion state on refresh and clamp motion values 2023-02-21 21:55:23 -06:00
Narr the Reg a146b27325 core: hid: Fix native mouse mappings 2023-02-21 19:48:38 -06:00
liamwhite 9fc17e8fdb Merge pull request #9846 from merryhime/type-const
svc: Fix type consistency (exposed on macOS)
2023-02-21 18:58:04 -05:00
Merry 38f528134f svc: Fix type consistency (exposed on macOS) 2023-02-21 21:39:17 +00:00
MonsterDruide1 fe662086c0 net: translate ECONNRESET network error 2023-02-21 20:47:59 +01:00
Liam 91c597e869 sm:: fix lingering session initialization issues 2023-02-21 12:19:25 -05:00
Liam 165ba6a98b cheat_engine: add check for hid initialization 2023-02-21 12:19:25 -05:00
Liam 893a54f2bd sm:: support service registration deferral 2023-02-21 12:19:25 -05:00
Liam 1c3a93e7c4 service: refactor server architecture
Converts services to have their own processes
2023-02-21 12:19:25 -05:00
Liam 5175ea2ae1 core: defer cpu shutdown 2023-02-21 12:19:25 -05:00
liamwhite 0af0887f01 Merge pull request #9771 from ameerj/host-thread-id
kernel: Refactor thread_local variable usage
2023-02-19 13:12:43 -05:00
liamwhite d5a2a03687 Merge pull request #9815 from german77/qt-mouse
Qt: Fix mouse scalling
2023-02-18 16:25:48 -05:00
Liam edda4ad9ae kernel: add KObjectName 2023-02-17 09:16:05 -05:00
Narr the Reg 8a7dfb2439 input_common: Split mouse input into individual devices 2023-02-16 14:22:13 -06:00
liamwhite 207fdfe57d Merge pull request #9796 from liamwhite/current
general: rename CurrentProcess to ApplicationProcess
2023-02-15 17:42:45 -05:00
liamwhite 9b97895d3c Merge pull request #9782 from arades79/fix-consexpr-value-declaration-usage
Fix consexpr value declaration usage
2023-02-15 17:42:38 -05:00
arades79 b4b47c9f4a remove constexpr from virtual function
Signed-off-by: arades79 <scravers@protonmail.com>
2023-02-14 19:14:29 -05:00
Liam c415339beb service: remove deleted services 2023-02-14 12:38:21 -05:00
arades79 b34e09b574 use a string view to skip allocation
Signed-off-by: arades79 <scravers@protonmail.com>
2023-02-14 12:35:40 -05:00
arades79 60a68839ee remove static from pointer sized or smaller types for aesthetics, change constexpr static to static constexpr for consistency
Signed-off-by: arades79 <scravers@protonmail.com>
2023-02-14 12:35:39 -05:00
arades79 3e078dbb07 apply clang-format
Signed-off-by: arades79 <scravers@protonmail.com>
2023-02-14 12:35:39 -05:00
arades79 adcef452e0 add static lifetime to constexpr values to force compile time evaluation where possible
Signed-off-by: arades79 <scravers@protonmail.com>
2023-02-14 12:33:11 -05:00
Liam c68577384a general: rename CurrentProcess to ApplicationProcess 2023-02-13 19:03:12 -05:00
Liam 832e1e2ca4 kernel: use GetCurrentProcess 2023-02-13 11:05:14 -05:00
bunnei ccd667ae40 Merge pull request #9757 from german77/gyro
core: hid: Use gyro thresholds modes set by the game
2023-02-12 00:19:22 -08:00
Colin Kinloch d0ca9973a7 kernel/svc: Fix undefined info_id 2023-02-11 18:00:34 +00:00
liamwhite 3434c23625 Merge pull request #9773 from bunnei/fix-process-resource
core: kernel: k_process: Use application system resource.
2023-02-11 10:28:50 -05:00
bunnei 37faa1acc8 Merge pull request #9742 from liamwhite/svc-wrap-only
kernel/svc: switch to generated wrappers
2023-02-10 21:41:22 -08:00
bunnei 86a1aa0fcc core: kernel: k_process: Use application system resource. 2023-02-10 21:03:39 -08:00
ameerj 8467bf5224 kernel: Refactor thread_local variable usage
On MSVC at least, there seems to be a non-trivial overhead to calling GetHostThreadId().

This slightly reworks the host_thread_id variable to reduce some of the complexity around its usage, along with some small refactors around current_thread and dummy thread
2023-02-10 20:43:06 -05:00
Liam f68b3dcb29 kernel: avoid usage of bit_cast 2023-02-10 09:13:58 -05:00
Narr the Reg 420560f4d3 core: hid: Use gyro thresholds modes set by the game 2023-02-09 19:07:50 -06:00
liamwhite 8fd7978bd7 Merge pull request #9747 from german77/SetSupportedNpadIdTypes
service: hid: Return error if arguments of SetSupportedNpadIdType is invalid
2023-02-08 10:09:26 -05:00
Narr the Reg 3d2f7c4170 service: hid: Return error if arguments of SetSupportedNpadIdType is invalid 2023-02-07 21:11:39 -06:00
Liam b91913334e kernel/svc: switch to generated wrappers 2023-02-06 23:57:44 -05:00
Liam 43131451c3 kernel: fix compilation with older gcc 2023-02-06 13:14:27 -05:00
Liam 2d0892da7f kernel/svc: Split implementations into separate files 2023-02-04 22:37:43 -05:00
ameerj 0b2e3ecc19 fsp_srv: Copy HLE Read Buffer for OutputAccessLogToSdCard 2023-02-03 00:12:16 -05:00
ameerj 7cc5da4a9f Revert "Merge pull request #9718 from yuzu-emu/revert-9508-hle-ipc-buffer-span"
This reverts commit 153fa289d2, reversing
changes made to 20676b3b5a.
2023-02-03 00:08:45 -05:00
bunnei 153fa289d2 Merge pull request #9718 from yuzu-emu/revert-9508-hle-ipc-buffer-span
Revert "hle_ipc: Use std::span to avoid heap allocations/copies when calling ReadBuffer"
2023-02-02 19:04:50 -08:00
liamwhite f74a95b6fb Revert "hle_ipc: Use std::span to avoid heap allocations/copies when calling ReadBuffer" 2023-02-02 15:53:28 -05:00
Liam 1f14d5ebce kernel: add KDeviceAddressSpace 2023-02-01 17:18:21 -05:00
bunnei b781b8621f Merge pull request #9696 from german77/please_forgive_me_for_this_sin
input_common: Implement turbo buttons
2023-02-01 12:08:34 -08:00
german77 db99ab5431 input_common: Implement turbo buttons 2023-02-01 12:42:05 -06:00
bunnei b383cea866 Merge pull request #9697 from liamwhite/kcap
kernel: add KCapabilities
2023-01-31 10:51:10 -08:00
bunnei 8d052680ee Merge pull request #9508 from ameerj/hle-ipc-buffer-span
hle_ipc: Use std::span to avoid heap allocations/copies when calling ReadBuffer
2023-01-30 12:17:09 -08:00
Liam 943f0bf0c3 kernel: add KCapabilities 2023-01-29 22:08:28 -05:00
Levi Behunin 2ff6c44168 Move to Clang Format 15
Depends on https://github.com/yuzu-emu/build-environments/pull/69

clang-15 primary run
2023-01-29 17:49:42 -07:00
bunnei ea38bd85e1 Merge pull request #9666 from liamwhite/wait-for-me
kernel: fix incorrect locking order in suspension
2023-01-27 15:06:09 -08:00
Liam 86c6735bd0 kernel: unbreak min/max template deduction on Apple Clang 2023-01-26 17:43:37 -05:00
bunnei 7c607953e5 Merge pull request #9670 from merryhime/revert-7f18e3bb898911343e3909f676dc96f3a34b1e95
Revert "MemoryManager: use fastmem directly."
2023-01-25 22:28:55 -08:00
bunnei 284ce233dc Merge pull request #9604 from liamwhite/pt
kernel: KPageTable: update
2023-01-25 22:27:48 -08:00
Narr the Reg a8579f0b26 Revert 9617 and fix it on input_common 2023-01-25 13:52:50 -06:00
Merry 6b50650633 Revert "MemoryManager: use fastmem directly."
This reverts commit 7f18e3bb89.
2023-01-25 10:12:04 +00:00
liamwhite 6c7db928fd Merge pull request #9492 from german77/joycon_release
Input_common: Implement custom joycon driver v2
2023-01-24 09:29:37 -05:00
Liam b85a155abd kernel: split SetAddressKey into user and kernel variants 2023-01-23 20:31:03 -05:00
Liam 31945a6e8b kernel: fix incorrect locking order in suspension 2023-01-23 17:14:41 -05:00
Liam 3b4c6e5425 kernel: KPageTable: update 2023-01-22 13:17:29 -05:00
liamwhite c909a9e2ba Merge pull request #9617 from german77/off_by_one
core: hid: Fix stick minimum range
2023-01-22 13:14:10 -05:00
liamwhite 87eef91dab Merge pull request #9613 from Kelebek1/demangle
Add stacktrace symbol demangling
2023-01-22 13:13:58 -05:00
bunnei 35099396c4 Merge pull request #9611 from liamwhite/patch-1
debugger: add host fastmem pointer fetch command
2023-01-20 10:00:33 -08:00
Narr the Reg 9f9cf5732b core: hid: Make use of SCOPE_EXIT and SCOPE_GUARD where applicable 2023-01-20 00:51:46 -06:00
Narr the Reg 000a5852ee core: hid: Only set the polling mode to the correct side 2023-01-19 18:05:23 -06:00
german77 4b7ad51ce3 input_common: Fix issue where ring and irs are enabled at the same time 2023-01-19 18:05:22 -06:00
Narr the Reg 91f98f57b3 input_common: Implement joycon ir camera 2023-01-19 18:05:22 -06:00
german77 22eb8ce395 yuzu: Add ring controller test button 2023-01-19 18:05:22 -06:00
german77 5cbeb6f1c4 input_common: Use DriverResult on all engines 2023-01-19 18:05:22 -06:00
german77 82774f546a Address review comments 2023-01-19 18:05:22 -06:00
Narr the Reg 8dbef30cb7 core: hid: Fix input regressions 2023-01-19 18:05:22 -06:00
german77 b40c5ba2c3 input_common: Implement joycon nfc 2023-01-19 18:05:21 -06:00
Narr the Reg a1b72e62dc service: hid: Set led pattern and fix color detection 2023-01-19 18:05:20 -06:00
Narr the Reg 59e89afde4 core: hid: Enable pulling color data from controllers 2023-01-19 18:05:20 -06:00
Narr the Reg 3672362ce1 core: hid: Migrate ring from emulated devices to emulated controller 2023-01-19 18:05:20 -06:00
bunnei cb88483660 Merge pull request #9623 from liamwhite/wp-oops
memory: fix watchpoint use when fastmem is enabled
2023-01-19 10:50:21 -08:00
bunnei 1c11050ce6 Merge pull request #9619 from liamwhite/timing-spaghetti
timing: wait for completion on unregister
2023-01-18 15:13:38 -08:00
Liam 0279b94a9e memory: fix watchpoint use when fastmem is enabled 2023-01-15 10:24:31 -05:00
Liam e1b0b3d0db timing: wait for completion on unregister 2023-01-14 15:48:01 -05:00
Kelebek1 8fea4c21b2 Be careful of mangled out of bounds read 2023-01-14 19:53:55 +00:00
german77 c76721182c core: hid: Fix stick minimum range 2023-01-14 11:53:43 -06:00
Kelebek1 90f546cba4 Add stacktrace symbol demangling 2023-01-14 04:43:21 +00:00
Liam f28fbaa41e debugger: add host fastmem pointer fetch command 2023-01-12 18:35:14 -05:00
Liam 0c15ac5084 nvnflinger: correct swap interval handling 2023-01-11 22:05:08 -05:00
bunnei 1bd2034592 Revert "Revert "k_page_group: synchronize"" 2023-01-07 15:32:10 -08:00
bunnei dfbfc1b89b Merge pull request #9563 from german77/crash_not_allowed
input_common: Create an update engine
2023-01-07 13:41:27 -08:00
liamwhite bd9882cd7d Merge pull request #9561 from liamwhite/update-dynarmic
externals: update dynarmic, xbyak
2023-01-06 10:00:18 -05:00
liamwhite be16c84eca Merge pull request #9558 from MonsterDruide1/network-timeout-noerror
net: Silently translate ETIMEDOUT network error
2023-01-06 10:00:09 -05:00
Narr the Reg 243f2931b5 input_common: Create an update engine 2023-01-05 19:24:29 -06:00
Liam 7429e31f30 externals: update dynarmic, xbyak 2023-01-05 18:06:06 -05:00
Fernando Sahmkow 7f18e3bb89 MemoryManager: use fastmem directly. 2023-01-05 06:06:33 -05:00
MonsterDruide1 3eb787dcef net: Silently translate ETIMEDOUT network error 2023-01-05 11:54:36 +01:00
liamwhite 25b5675997 Merge pull request #9518 from gidoly/revert-9504-pg2
Revert "k_page_group: synchronize"
2023-01-03 21:40:57 -05:00
MonsterDruide1 ffc89d8b84 TAS: Immediately switch stick to TAS on input
Co-Authored-By: Narr the Reg <5944268+german77@users.noreply.github.com>
2023-01-03 20:08:25 +01:00
german77 011f49a00b service: nifm: Initialize request state 2023-01-01 20:58:08 -06:00
german77 991ea9ab41 service: nifm: Match documentation names 2023-01-01 20:58:01 -06:00
Merry 68008d9b80 vfs: Replace cstr concat with char concat 2023-01-01 18:52:02 +00:00
bunnei d466f5e2b8 core: hid: emulated_console: Avoid a crash if frontend does not configure touch_from_button_maps. 2022-12-30 00:14:53 -08:00
gidoly 118d57a8f0 Revert "k_page_group: synchronize" 2022-12-29 17:39:42 +09:00
ameerj ddbee432b2 hle_ipc: Use thread_local ReadBuffer 2022-12-28 18:46:54 -05:00
ameerj 713394d526 hle_ipc: Rename ReadBufferSpan to ReadBuffer 2022-12-28 18:46:54 -05:00
ameerj 571d469697 hle_ipc: Rename ReadBuffer to ReadBufferCopy
Indicates explicitly that a copy is occurring
2022-12-28 18:46:54 -05:00
ameerj 53650d2701 bsd: Use std::span for read payloads
Allows the use of HLERequestContext::ReadBufferSpan
2022-12-28 18:46:54 -05:00
ameerj 8a59719bd2 nvdrv: Use std::span for inputs
Allows the use of HLERequestContext::ReadBufferSpan
2022-12-28 18:46:53 -05:00
ameerj de252703bd hidbus: Use ReadBufferSpan 2022-12-28 18:46:53 -05:00
bunnei 14e92fe752 Merge pull request #9504 from liamwhite/pg2
k_page_group: synchronize
2022-12-28 17:28:31 -05:00
ameerj 4531881bfd nvflinger: Split Parcel class into InputParcel and OutputParcel
The usages of the Parcel class were already unique to either Read or Write operations.
Avoids needing a vector of the input payload for the InputParcel use-case, instead it can remain as a span.
2022-12-25 17:19:10 -05:00
ameerj db9a523aae service: Use ReadBufferSpan where it is trivial to do so 2022-12-25 17:04:02 -05:00
MonsterDruide1 f33599d41c TAS: Increase accuracy of Stick inputs 2022-12-25 21:49:09 +01:00
Liam b4504fdd19 k_page_table: remove HACK_OpenPages/ClosePages 2022-12-25 13:43:49 -05:00
ameerj 399b6d3a0c fsp_srv: Use ReadBufferSpan 2022-12-25 13:21:15 -05:00
ameerj e17c343915 hle_ipc: Add ReadBufferSpan function
Returns a std::span to the buffer address, rather than create a copy of the memory into a std::vector
2022-12-25 13:20:59 -05:00
Liam 4b9df26091 k_page_group: synchronize 2022-12-25 12:55:21 -05:00
liamwhite 3dfb9c8549 Merge pull request #9496 from liamwhite/shm3
kernel: workaround static shared memory initialization
2022-12-25 12:51:16 -05:00
Liam 71ec5c9519 kernel: workaround static shared memory initialization 2022-12-23 13:40:30 -05:00
Liam f1528eb549 time: add LockFreeAtomicType 2022-12-21 22:36:55 -05:00
liamwhite f631825247 Merge pull request #9463 from liamwhite/manager-events
EmuThread: refactor
2022-12-20 09:10:41 -05:00
Liam 8df44232e8 kernel: remove TimeManager 2022-12-18 20:21:24 -05:00
Liam 49d1cf6477 kernel: add KHardwareTimer 2022-12-18 16:37:19 -05:00
german77 8a90856b25 service: nfc: Silence ListDevices 2022-12-18 11:57:33 -06:00
bunnei 771e450bcc Merge pull request #9456 from german77/virtual_gamepad
input_common: Add virtual gamepad
2022-12-17 17:16:13 -08:00
Liam c11dff8639 EmuThread: refactor 2022-12-17 16:26:24 -05:00
liamwhite 895500911a Merge pull request #9452 from ameerj/hle-read-buffer-resreve
hle_ipc: Refactor ReadBuffer to set buffer size upon initialization
2022-12-17 10:21:30 -05:00
german77 3cc666b845 input_common: Add virtual gamepad 2022-12-16 18:26:11 -06:00
liamwhite 8cdadf8ac9 Merge pull request #6354 from ogniK5377/device-name
Set: Allow setting device nickname
2022-12-16 14:05:00 -05:00
liamwhite 178074d062 Merge pull request #9450 from ameerj/hle-ipc-vector-reserve
hle_ipc: Reserve vectors before populating
2022-12-16 11:57:48 -05:00
ameerj c57883f1bc hle_ipc: Refactor ReadBuffer to set buffer size upon initialization
Initializing the vector size during initialization is more efficient than a later call to resize()
2022-12-15 23:22:11 -05:00
ameerj 333fd1165a hle_ipc: Reserve vectors before populating 2022-12-15 22:30:42 -05:00
Narr the Reg dfe49436c8 kernel: svc: Fix duplicated InfoType enum 2022-12-15 14:18:30 -06:00
Narr the Reg 464b7a9ee2 kernel: process: Implement GetFreeThreadCount
Used by Just Dance® 2023 Edition
2022-12-15 13:44:21 -06:00
liamwhite f868fa8883 Merge pull request #7410 from Nefsen402/wayland-fixes
Wayland fixes
2022-12-15 12:05:01 -05:00
bunnei 572d81508b Revert "hle: service: audio: Use default service thread." 2022-12-14 14:57:33 -08:00
Chloe Marcec 27a7d5a11a Set: Allow setting device nickname 2022-12-13 19:54:17 -05:00
Alexander Orzechowski 9e0510f77d gl_device: Use a more robust way to use strict context mode
Instead of checking a environment variable which may not actually
exist or is just wrong, ask QT if it's running on the wayland
platform.
2022-12-13 15:01:51 -05:00
bunnei a0fa54b016 Merge pull request #9398 from liamwhite/fail
general: improve handling of system startup failure
2022-12-12 14:37:42 -08:00
Mai f23e20a630 Merge pull request #9415 from liamwhite/dc
memory: correct semantics of data cache management operations
2022-12-11 21:09:31 +00:00
Liam 47a89280bf memory: correct semantics of data cache management operations 2022-12-11 12:46:34 -05:00
Liam 8a5667aa70 memory: remove DEBUG_ASSERT pointer test 2022-12-10 13:02:38 -05:00
Salvage a4369e6175 Remove the lock entirely as per PR discussion
Correctly unlock mutex before its destruction

As per https://en.cppreference.com/w/cpp/thread/mutex/~mutex destroying a locked mutex is undefined behavior and MSVC++ decides to throw in this case

Swap out unique for scoped lock and readd comment
2022-12-09 16:39:59 +01:00
Liam 08d81c9726 general: improve handling of system startup failure 2022-12-06 16:13:42 -05:00
merry 32b13dbca1 Merge pull request #9370 from liamwhite/break-unmapped
core: add option to break on unmapped access
2022-12-06 20:20:20 +00:00
liamwhite c2e1d9378b Merge pull request #9392 from lioncash/reporter
reporter: Eliminate undefined behavior in SaveErrorReport
2022-12-06 11:27:00 -05:00
liamwhite a8a01d0723 Merge pull request #9390 from lioncash/keyboard
applets: Extract callback types into aliases
2022-12-06 11:26:53 -05:00
liamwhite 600df8e96e Merge pull request #9389 from lioncash/emumove
emulated_console/emulated_controller: std::move ParamPackage instances where applicable
2022-12-06 11:26:46 -05:00
liamwhite c02faff8d4 Merge pull request #9386 from lioncash/init
kernel: Ensure relevant class members are always initialized on construction
2022-12-06 11:26:38 -05:00
liamwhite 6a546be6b2 Merge pull request #9369 from german77/mifare
service: nfc: Implement mifare service
2022-12-05 22:17:32 -05:00
Lioncash 6922ed4fad reporter: Pass by const reference where applicable
Same behavior, but without memory churn.
2022-12-05 21:48:42 -05:00
Lioncash 97fd619312 reporter: Eliminate undefined behavior in SaveErrorReport
The optionals are unconditionally dereferenced when setting the custom
error text, and in a few cases this function is called using the default
value of the optionals.

This means we'd be dereferencing uninitialized storage.

Since they're used unconditionally, we can use value_or to set a default
when storage is uninitialized.
2022-12-05 21:31:34 -05:00
Lioncash a3e4ad2cf5 applets/controller: Use aliases for callbacks 2022-12-05 19:06:04 -05:00
Lioncash 038b746678 applets/error: Use aliases for callbacks 2022-12-05 19:06:04 -05:00
Lioncash a346b1270a applets/mii_edit: Use aliases for callbacks 2022-12-05 19:06:04 -05:00
Lioncash 259307a152 applets/profile_select: Use aliases for callbacks
Deduplicates callback definitions and situates it in one place.
2022-12-05 19:06:04 -05:00
Lioncash 5012cd2057 applets/web_browser: Use aliases for callbacks
Deduplicates a lot of long callback declarations
2022-12-05 19:06:04 -05:00
Lioncash 047c256fe4 applets/software_keyboard: Use aliases for callbacks
Deduplicates really long std::function declarations to make the
interface nicer to read.
2022-12-05 19:06:01 -05:00
Lioncash 7a349e99ee emulated_controller: Remove unused parameter in GetMappedDevices()
This isn't used, so it can be removed to make the function a little
nicer.
2022-12-05 18:27:18 -05:00
Lioncash 68d9621a8b emulated_controller: Use std::move() in GetMappedDevices()
Avoids churning allocations in a loop.
2022-12-05 18:27:15 -05:00
Lioncash 1c9f02790c emulated_console: Amend cast in SetTouch()
id is an int value, not a u32.
2022-12-05 18:15:23 -05:00
Lioncash 53eb9406f0 emulated_console: std::move() ParamPackages and callbacks where applicable 2022-12-05 18:15:19 -05:00
Lioncash 7ed6f9d6fd kernel/k_shared_memory: Ensure device_memory is always initialized 2022-12-05 15:27:57 -05:00
Lioncash 0435142f58 kernel/k_memory_block: Ensure members are always initialized 2022-12-05 15:27:47 -05:00
Lioncash 4c5de31093 kernel/physical_core: Ensure is_interrupted is always initialized 2022-12-05 15:19:37 -05:00
Lioncash 6fea145402 kernel/thread: Ensure stack_top and argument are always initialized 2022-12-05 15:19:36 -05:00
Lioncash 8b8320be4a kernel/kernel: Ensure shutdown threads are always initialized 2022-12-05 15:19:36 -05:00
liamwhite b4ef55753e Merge pull request #6833 from abouvier/unbundle
cmake: prefer system libraries
2022-12-05 12:26:09 -05:00
Mai 0dd3742763 Merge pull request #9381 from liamwhite/uninit
service_thread: fix uninitialized memory usage
2022-12-04 22:30:16 +00:00
Liam 4a65ee47d3 service_thread: fix uninitialized memory usage 2022-12-04 16:02:24 -05:00
liamwhite fb8dad2eef Merge pull request #9232 from bunnei/audio-default-thread
hle: service: audio: Use default service thread.
2022-12-04 15:31:40 -05:00
liamwhite caa1555bc2 Merge pull request #9273 from ameerj/per-game-profile
Configuration: Add per-game input profiles
2022-12-04 13:38:01 -05:00
Alexandre Bouvier 325a016cd2 cmake: prefer system libraries 2022-12-04 17:09:25 +01:00
liamwhite 550f214e76 Merge pull request #9374 from liamwhite/externals
externals: update dynarmic, SDL2
2022-12-04 10:44:12 -05:00
Liam 8fbec5d298 externals: update dynarmic, SDL2 2022-12-04 10:12:26 -05:00
bunnei d3e229ee9d Merge pull request #9344 from liamwhite/null
video_core: add null backend
2022-12-03 11:23:25 -08:00
liamwhite c53a3d3f37 Merge pull request #9300 from ameerj/pch
CMake: Use precompiled headers to improve compile times
2022-12-03 14:10:06 -05:00
liamwhite e20c5a0b7f Merge pull request #9289 from liamwhite/fruit-company
general: fix compile for Apple Clang
2022-12-03 12:09:21 -05:00
Matías Locatti 39df80ff00 Merge pull request #9303 from liamwhite/new-vulkan-init
Vulkan: update initialization
2022-12-02 18:32:54 -03:00
Liam dfc09df118 core: add option to break on unmapped access 2022-12-02 08:25:45 -05:00
liamwhite e81abf0744 Merge pull request #9348 from Morph1984/when-the-network-is-down
service: nifm: Update stubs for Submit/GetRequestState/GetResult
2022-12-01 22:14:43 -05:00
Narr the Reg dbfc2f7ee2 service: nfc: Implement mifare service 2022-12-01 20:43:59 -06:00
ameerj fb155dbffc CMake: Consolidate common PCH headers 2022-11-30 18:30:30 -05:00
Fernando S c04a159cd9 Merge pull request #9320 from yuzu-emu/fix-audio-suspend
AudioCore: Take suspend lock when stalling the running process.
2022-11-30 16:41:32 +01:00
ameerj bbf3e7f313 CMake: Use precompiled headers 2022-11-29 18:50:49 -05:00
liamwhite fa8bf5fb43 Merge pull request #9340 from lioncash/nvdrv
nvdrv: Simplify builder declarations
2022-11-29 08:27:13 -05:00
liamwhite 049c6ca248 Merge pull request #9346 from lioncash/vtable
producer_listener: Add virtual destructor to IProducerListener
2022-11-29 08:26:32 -05:00
liamwhite 6197033d88 Merge pull request #9345 from lioncash/fence
consumer_base: Pass std::shared_ptr by const reference
2022-11-29 08:26:25 -05:00
liamwhite 9e9e28c281 Merge pull request #9343 from lioncash/bounds
syncpoint_manager: Reduce redundant bounds checks
2022-11-29 08:26:16 -05:00
Morph 7ba644dc5d service: nifm: Update stubs for Submit/GetRequestState/GetResult 2022-11-28 22:58:10 -05:00
Liam acc4a150ef video_core: add null backend 2022-11-28 19:49:09 -05:00
Lioncash ccec899cd8 producer_listener: Add virtual destructor to IProducerListener
Several member variables are shared_ptr's to this base class. Even
though producer listeners are still unimplemented, this ensures we
always have consistent deletion behavior once this ends up being used
polymorphically.
2022-11-28 19:39:13 -05:00
Lioncash 93f287c79b buffer_item_consumer: Pass fence by const-ref in ReleaseBuffer()
This isn't directly modified.

Also allows rvalues to be used with it.
2022-11-28 19:16:20 -05:00
Lioncash 7d9d432ff4 buffer_queue_consumer: std::move std::shared_ptr in Connect()
Avoids an unnecessary reference count increment and decrement
2022-11-28 19:12:26 -05:00
Lioncash f5def4b9c5 consumer_base: Pass shared_ptr by const reference
Avoids churning atomic reference count increments and decrements.
2022-11-28 19:09:44 -05:00
Lioncash bde42f6767 consumer_base: Remove redundant virtual
override already serves this purpose
2022-11-28 19:06:34 -05:00
Lioncash eb1bdc5ed4 syncpoint_manager: Mark IsSyncpointAllocated() as const
This doesn't modify class state at all.
2022-11-28 16:08:21 -05:00
Lioncash 8409b91f2e syncpoint_manager: Reduce number of bounds checks
The only time we need to check bounds is on the first access.
2022-11-28 16:06:01 -05:00
Lioncash e621ee9ec6 nvdrv: Simplify builder declarations
We can just use auto here. If one of these ever happens to not be
derived from nvdevice, then this will cause a compilation error.

We can also move the devices into the collection to get rid of an
unnecessary atomic reference count increment and decrement.
2022-11-28 10:43:48 -05:00
Lioncash a9892677ed core/hid/emulated_controller: Use ranges version of transform
Makes the transform calls much nicer to read.
2022-11-28 10:00:42 -05:00
Lioncash 0862aabdc6 common/input: Add helpers functions for creating input and output devices
Avoids the redundancy of needing to explictly specify the common
namespace and the type.
2022-11-28 10:00:37 -05:00
Liam 0a077cb467 Vulkan: update initialization
Co-authored-by: bylaws <bylaws@users.noreply.github.com>
2022-11-27 14:58:28 -05:00
german77 23d7d8b9df yuzu-cmd: Fix input callback crash on close 2022-11-27 10:53:22 -06:00
Valeri e9fb4a65b9 crypto: use user-provided keys whenever possible
Solves an issue where autogenerated title keys would take precedence over those provided by user.
2022-11-27 05:08:25 +03:00
bunnei 94ee753735 core: Use atomic instead of a lock to protect is_paused.
- This allows us to call IsPaused() elsewhere if we are holding the suspend lock.
2022-11-26 13:46:38 -08:00
Lioncash 8c35c8c4a6 service: Make use of buffer element count helpers 2022-11-23 13:43:20 -05:00
Lioncash ff19204dc6 hle_ipc: Add helper functions for getting number of buffer elements 2022-11-23 13:15:19 -05:00
Lioncash ce329764a2 hle_ipc: Mark relevant member functions as [[nodiscard]]
Will allow the compiler to complain about cases where ignoring the
return value would be a bug.
2022-11-23 13:08:52 -05:00
Liam 5a712bb51a general: fix compile for Apple Clang 2022-11-22 22:22:28 -05:00
liamwhite 1cc95c4d53 Merge pull request #9299 from lioncash/cast
k_handle_table: Remove cast to void* in GetObjectForIpc
2022-11-22 17:47:53 -05:00
Lioncash 71d5db9354 k_handle_table: Remove cast to void* in GetObjectForIpc
This was used to get around the KProcess class being incomplete. We can
just move this to the cpp file and eliminate the cast entirely, letting
the compiler do its work.
2022-11-22 13:58:42 -05:00
bunnei 8484ed0cf6 Merge pull request #9219 from german77/nfc_impl
service: nfc: Implement NFC IUser service
2022-11-22 10:28:38 -08:00
ameerj 19ca666e9f Configuration: Add per-game input profiles 2022-11-20 14:06:31 -05:00
Narr the Reg 06d54056d6 Merge branch 'master' into nfc_impl 2022-11-20 09:31:20 -06:00
Liam 9c69743686 dmnt:cht: fix copy-paste error 2022-11-20 10:14:22 -05:00
bunnei 914f824b1f Merge pull request #9238 from german77/cabinet_applet
service: am: Implement cabinet applet
2022-11-20 00:48:39 -08:00
bunnei 66235689d2 Merge pull request #9254 from FernandoS27/auto-cpu-fix
Dynarmic: Remove inaccurate NaN from Auto CPU settings.
2022-11-19 12:52:41 -08:00
liamwhite e118cc09bd Merge pull request #9191 from german77/touching_souls
core: hid: Implement true multitouch support
2022-11-19 13:21:01 -05:00
Narr the Reg 5c134b62bd service: nfc: Implement nfc user 2022-11-19 08:51:59 -06:00
german77 1cf625b6c6 service: hid: Only overclock npad controllers 2022-11-19 08:44:42 -06:00
Narr the Reg 8e0e45dcb9 core: hid: Implement true multitouch support 2022-11-19 08:44:33 -06:00
bunnei a6b1bc0ded Merge pull request #9234 from liamwhite/data-cash-money
kernel: implement data cache management operations
2022-11-18 13:18:36 -08:00
bunnei ca033e8d94 Merge pull request #9244 from liamwhite/lost-wakeup
nvnflinger: fix lost wakeup
2022-11-17 17:15:47 -08:00
Morph ab4c53a3e6 Merge pull request #9229 from Docteh/achy_breaky_heart
Add break for default cases
2022-11-17 19:20:18 -05:00
Fernando Sahmkow ee4b6380b9 Dynarmic: Remove inaccurate NaN from Auto CPU settings. 2022-11-17 16:59:41 +01:00
bunnei 295ac1cfe9 Merge pull request #9243 from german77/result
core: Update result module
2022-11-14 20:36:38 -08:00
Liam 14292b4067 nvnflinger: fix lost wakeup 2022-11-14 21:18:52 -05:00
Narr the Reg da3b7ba4ed core: Update result module 2022-11-14 20:08:47 -06:00
Kyle Kienapfel d886438754 Add break for default cases
Visual Studio has an option to search all files in a solution, so I
did a search in there for "default:" looking for any missing break
statements.

I've left out default statements that return something, and that throw
something, even if via ThrowInvalidType. UNREACHABLE leads towards throw

R_THROW macro leads towards a return
2022-11-13 16:30:55 -08:00
german77 9639d49ec6 general: Address review comments 2022-11-13 17:13:43 -06:00
german77 7fdca4ffab service: am: Fix cabinet applet result 2022-11-13 14:25:00 -06:00
german77 23cda93390 service: am: Implement cabinet applet backend 2022-11-13 11:07:48 -06:00
german77 de02ec2357 service: nfc: fix tagprotocol and implement GetApplicationAreaId 2022-11-13 10:52:48 -06:00
liamwhite fafa91c354 Merge pull request #9225 from liamwhite/debugger-instance
Debugger improvements
2022-11-12 21:04:00 -05:00
Liam e313e4f1ae kernel: implement FlushProcessDataCache 2022-11-12 11:27:04 -05:00
bunnei d942e886f5 Merge pull request #9224 from liamwhite/services-arent-processes
service_thread: remove explicit KProcess
2022-11-11 22:37:04 -08:00
bunnei 2df2dcd945 hle: service: audio: Use default service thread.
- This was arbitrarily added by me, and does not appear to be helpful.
2022-11-11 17:34:39 -08:00
bunnei 4e4c74cbe7 Merge pull request #9198 from liamwhite/arm64
Initial ARM64 support
2022-11-10 17:11:27 -08:00
Liam 9f12c3e22f gdbstub: add ams monitor commands 2022-11-10 19:20:57 -05:00
Liam a19fabfe0c debugger: allow more than one connection attempt per session 2022-11-10 17:39:04 -05:00
Liam 47ce2e44d9 service_thread: remove explicit KProcess 2022-11-10 16:14:03 -05:00
Liam affd5c32f9 kernel/svc_types: refresh 2022-11-09 19:05:08 -05:00
bunnei 829acd963c Merge pull request #9182 from liamwhite/services-are-processes
kernel: assign KProcess to service threads
2022-11-09 15:52:23 -08:00
Liam 9509fb30a4 Initial ARM64 support 2022-11-09 16:58:49 -05:00
Fernando S 728eca47a1 Merge pull request #9215 from liamwhite/swordfight
Ensure correctness of atomic store ordering
2022-11-09 14:50:49 +01:00
Liam 683a0a1a71 Ensure correctness of atomic store ordering 2022-11-09 08:09:50 -05:00
Liam 0fc08006e5 service_thread: fix deletion 2022-11-06 19:50:51 -05:00
liamwhite c14f27ee5f Merge pull request #9173 from bunnei/kern-update-15
Kernel: Various updates for FW 15.0.x
2022-11-05 13:25:29 -04:00
Liam f31c2e7f79 core: hle: kernel: Address review comments. 2022-11-05 12:23:47 -04:00
Liam c835c254a3 service_thread: register service threads to the logical owner process 2022-11-04 09:18:57 -04:00
Liam ae2bfd082b kernel: avoid racy behavior in global suspension 2022-11-04 09:18:57 -04:00
Jan Beich e05870489a network: add missing header for SO_* on Unix after ce5b9d370d
src/core/internal_network/socket_proxy.cpp: In member function 'virtual Network::Errno Network::ProxySocket::Initialize(Network::Domain, Network::Type, Network::Protocol)':
src/core/internal_network/socket_proxy.cpp:51:20: error: 'SO_TYPE' was not declared in this scope
   51 |     SetSockOpt(fd, SO_TYPE, type);
      |                    ^~~~~~~
src/core/internal_network/socket_proxy.cpp: In member function 'virtual Network::Errno Network::ProxySocket::SetLinger(bool, u32)':
src/core/internal_network/socket_proxy.cpp:253:27: error: 'SO_LINGER' was not declared in this scope
  253 |     return SetSockOpt(fd, SO_LINGER, values);
      |                           ^~~~~~~~~
src/core/internal_network/socket_proxy.cpp: In member function 'virtual Network::Errno Network::ProxySocket::SetReuseAddr(bool)':
src/core/internal_network/socket_proxy.cpp:257:32: error: 'SO_REUSEADDR' was not declared in this scope
  257 |     return SetSockOpt<u32>(fd, SO_REUSEADDR, enable ? 1 : 0);
      |                                ^~~~~~~~~~~~
src/core/internal_network/socket_proxy.cpp: In member function 'virtual Network::Errno Network::ProxySocket::SetBroadcast(bool)':
src/core/internal_network/socket_proxy.cpp:262:32: error: 'SO_BROADCAST' was not declared in this scope
  262 |     return SetSockOpt<u32>(fd, SO_BROADCAST, enable ? 1 : 0);
      |                                ^~~~~~~~~~~~
src/core/internal_network/socket_proxy.cpp: In member function 'virtual Network::Errno Network::ProxySocket::SetSndBuf(u32)':
src/core/internal_network/socket_proxy.cpp:266:27: error: 'SO_SNDBUF' was not declared in this scope
  266 |     return SetSockOpt(fd, SO_SNDBUF, value);
      |                           ^~~~~~~~~
src/core/internal_network/socket_proxy.cpp: In member function 'virtual Network::Errno Network::ProxySocket::SetRcvBuf(u32)':
src/core/internal_network/socket_proxy.cpp:274:27: error: 'SO_RCVBUF' was not declared in this scope
  274 |     return SetSockOpt(fd, SO_RCVBUF, value);
      |                           ^~~~~~~~~
src/core/internal_network/socket_proxy.cpp: In member function 'virtual Network::Errno Network::ProxySocket::SetSndTimeo(u32)':
src/core/internal_network/socket_proxy.cpp:279:27: error: 'SO_SNDTIMEO' was not declared in this scope
  279 |     return SetSockOpt(fd, SO_SNDTIMEO, static_cast<int>(value));
      |                           ^~~~~~~~~~~
src/core/internal_network/socket_proxy.cpp: In member function 'virtual Network::Errno Network::ProxySocket::SetRcvTimeo(u32)':
src/core/internal_network/socket_proxy.cpp:284:27: error: 'SO_RCVTIMEO' was not declared in this scope
  284 |     return SetSockOpt(fd, SO_RCVTIMEO, static_cast<int>(value));
      |                           ^~~~~~~~~~~
2022-11-04 07:28:46 +00:00
bunnei 900d89f2b9 Merge pull request #9135 from liamwhite/service-thread-event
kernel: invert session request handling flow
2022-11-03 21:45:56 -07:00
bunnei 0335904d60 core: hle: kernel: k_page_table: Remove unnecessary casts. 2022-11-03 21:17:08 -07:00
bunnei 0b18b1426a core: hle: kernel: k_page_table: Manually open/close pages for IPC methods. 2022-11-03 21:17:08 -07:00
bunnei 9bde36cb85 core: hle: kernel: k_page_table: Implement IPC memory methods. 2022-11-03 21:17:07 -07:00
bunnei e88395e6cd core: hle: kernel: k_memory_manager: Refresh. 2022-11-03 21:17:07 -07:00
bunnei e81fcf5795 core: hle: kernel: Integrate system KSystemResource. 2022-11-03 21:17:07 -07:00
bunnei d28e5d7e49 core: hle: kernel: k_dynamic_page_manager: Refresh. 2022-11-03 21:17:07 -07:00
bunnei 57796fc36e core: hle: kernel: Add KSystemResource. 2022-11-03 21:17:07 -07:00
bunnei 512ddcd3d4 core: hle: kernel: k_handle_table: Refresh. 2022-11-03 21:17:07 -07:00
bunnei a6e1e61bd6 core: hle: kernel: k_memory_layout: Refresh. 2022-11-03 21:17:07 -07:00
bunnei acb9386c80 core: hle: kernel: k_memory_region_type: Refresh. 2022-11-03 21:17:07 -07:00
bunnei 992e678f4a core: hle: kernel: slab_helpers: Add KAutoObjectWithSlabHeap. 2022-11-03 21:17:06 -07:00
bunnei d3b3eb1d6d core: hle: kernel: k_dynamic_resource_manager: Add KBlockInfoManager, KBlockInfoSlabHeap. 2022-11-03 21:17:06 -07:00
bunnei 3196057319 core: hle: kernel: k_page_bitmap: Refresh. 2022-11-03 21:17:06 -07:00
bunnei 46425afc3e core: hle: kernel: k_memory_block: Refresh. 2022-11-03 21:17:06 -07:00
bunnei 5a46757171 core: hle: kernel: k_page_heap: Refresh. 2022-11-03 21:17:06 -07:00
bunnei ddf0fbd8e9 core: hle: kernel: k_page_group: Add KPageBufferSlabHeap. 2022-11-03 21:17:06 -07:00
bunnei 53e40c01e7 core: hle: kernel: k_system_control: Add SecureAppletMemorySize. 2022-11-03 21:17:06 -07:00
bunnei 8973237f87 core: hle: kernel: k_page_buffer: Add KPageBufferSlabHeap. 2022-11-03 21:17:06 -07:00
bunnei 6e069b7ee5 core: hle: kernel: Add KPageTableManager. 2022-11-03 21:17:06 -07:00
bunnei 315292275e core: hle: kernel: Add KPageTableSlabHeap. 2022-11-03 21:17:06 -07:00
bunnei 019e425377 core: hle: kernel: Add KEventInfo. 2022-11-03 21:17:06 -07:00
bunnei 0146d20e51 core: hle: kernel: Add KDebug. 2022-11-03 21:17:06 -07:00
bunnei a91e38694a core: hle: result: Fix code for compilers. 2022-11-03 21:17:06 -07:00
bunnei 6a447fd764 core: hle: service: acc: Fix ListOpenContextStoredUsers/StoreOpenContext.
- These APIs are used to capture the opened users and allow that state to be persisted across processes.
- They are not intended to just return the system opened users, that is what ListOpenUsers is for.
- Fixes the launch hang with Bayonetta 3.
2022-11-02 16:09:30 -07:00
Liam 710220601f sm:: avoid excessive port recreation 2022-10-31 17:47:39 -04:00
Liam 2a4a371112 kernel: fix single core for service threads 2022-10-31 17:45:46 -04:00
Liam 8f65df7619 kernel: fix port tracking 2022-10-31 17:45:46 -04:00
Liam 57e5211eb6 k_server_session: add SendReplyHLE 2022-10-31 17:45:45 -04:00
Liam b5a9e6f989 service_thread: convert to map for session management 2022-10-31 17:44:07 -04:00
Liam 2e56a382a9 kernel: invert session request handling flow 2022-10-31 17:44:06 -04:00
Liam e86cadc4c4 kernel: more complete fix for KPort reference counting 2022-10-31 08:23:29 -04:00
Liam e9589c859d k_thread: fix single core 2022-10-30 18:44:29 -04:00
Liam a0ed2571c7 kernel: reinitialize after dram layout change 2022-10-30 11:01:22 -04:00
bunnei fb64d41b6f Merge pull request #9149 from german77/volum
service: am: Stub SetRecordVolumeMuted
2022-10-29 23:36:15 -07:00
german77 4d66c180ac service: am: Stub SetRecordVolumeMuted
Used by bayonetta 3
2022-10-30 00:34:33 -05:00
Liam 8988c3dea9 k_server_session: fix crashes 2022-10-29 23:05:56 -04:00
bunnei 8e31038129 Merge pull request #9137 from liamwhite/hbmenu
Improved support for nx-hbmenu
2022-10-29 16:11:26 -07:00
liamwhite b5dc28edea Merge pull request #9138 from liamwhite/hbl-stacktrace
arm_interface: curb infinite recursion in stacktrace generation
2022-10-27 20:07:48 -04:00
Liam 8544af06f5 arm_interface: curb infinite recursion in stacktrace generation 2022-10-27 16:01:05 -04:00
bunnei 9bbb12f37b Merge pull request #9115 from vonchenplus/game_name_by_language
file_sys: Priority display of game titles in the current language
2022-10-27 11:33:02 -07:00
Liam a71c698323 nvnflinger: release queued handles immediately on disconnection 2022-10-27 08:28:02 -04:00
Liam 4351ab1ff1 vi: implement CloseDisplay 2022-10-27 08:27:38 -04:00
liamwhite d342210927 Merge pull request #9134 from lioncash/init
audio_in/out_system: Pass Initialize members by value where applicable
2022-10-27 08:10:24 -04:00
bunnei fadd316c24 Merge pull request #9125 from liamwhite/dummy-scheduler
kernel: refactor dummy thread wakeups
2022-10-26 09:51:44 -07:00
Lioncash a8b7993c88 audio_in/out_system: Pass Initialize members by value where applicable
applet_resource_user_id isn't actually modified and is just assigned to
a member variable, so this doesn't need to be a mutable reference.

Similarly, the device name itself isn't modified and is only moved. We
pass by value here, since we can still perform the move, but eliminate a
sneaky set of calls that can unintentionally destroy the original
string. Given how nested the calls are, it's good to get rid of this
potential vector for a use-after-move bug.
2022-10-26 11:21:48 -04:00
Morph 89ace6c367 concepts: Use the std::contiguous_iterator concept
This also covers std::span, which does not have a const iterator.

Also renames IsSTLContainer to IsContiguousContainer to explicitly convey its semantics.
2022-10-26 00:41:54 -04:00
liamwhite 1910dce4a4 Merge pull request #9113 from german77/peer_pressure
service: nfp: Allow amiibos without keys
2022-10-25 12:13:31 -04:00
liamwhite f25243fd9d Merge pull request #9107 from german77/gidoly_rules
input_common: cache vibration tests
2022-10-25 12:13:18 -04:00
liamwhite 252ae177ff Merge pull request #9119 from liamwhite/shutdown-barrier
core: barrier service thread shutdown
2022-10-25 06:45:51 -04:00
Liam 3980952ab8 kernel: refactor dummy thread wakeups 2022-10-24 19:52:01 -04:00
FengChen f5ee1a756a file_sys: Priority display of game titles in the current language 2022-10-24 21:55:25 +08:00
Fernando S 6e7788c26f Merge pull request #9122 from liamwhite/burnt-chicken
nvdrv: fix container destruction order
2022-10-24 12:41:46 +02:00
Liam e9da7b43d5 nvdrv: fix container destruction order 2022-10-23 19:25:57 -04:00
Liam ee969900ae core: barrier service thread shutdown 2022-10-23 05:45:45 -04:00
german77 06555ad6c0 core: hid: Add handheld to nfc devices 2022-10-22 14:05:00 -05:00
Morph c6c56d3e9c general: Resolve -Wunused-lambda-capture and C5233 2022-10-22 15:02:04 -04:00
Morph 5c4c90385f ipc_helpers: Ignore GCC compiler warnings only on GCC
Clang and ICC for whatever reason also defines __GNUC__. Exclude them from this check.
2022-10-22 15:02:04 -04:00
Morph 9fba74d245 general: Enforce C4800 everywhere except in video_core 2022-10-22 15:02:04 -04:00
Morph 4bad20dc5f CMakeLists: Remove all redundant warnings
These are already explicitly or implicitly set in src/CMakeLists.txt
2022-10-22 15:02:04 -04:00
Narr the Reg d444a2ffab service: nfp: Allow amiibos without keys 2022-10-21 23:08:07 -05:00
Narr the Reg ea7f4aed98 service: nfp: remove unnecessary include 2022-10-21 21:54:31 -05:00
liamwhite 2ca7effbfd Merge pull request #9106 from lioncash/copy-err
hid/npad: Fix copy size in GetSupportedNpadIdTypes
2022-10-21 03:47:02 -04:00
Lioncash 47160b51fb k_session_request: Add missing override specifier 2022-10-21 01:56:14 -04:00
Lioncash 4432989177 k_session_request: Turn C-style array into std::array
Makes for stronger typing and allows tooling bounds checks provided by
the standard library for debugging purposes.
2022-10-21 01:54:34 -04:00
Lioncash 6057b801cf k_session_request: Simplify constructor initialization 2022-10-21 01:53:10 -04:00
german77 96881efdc3 input_common: cache vibration tests 2022-10-21 00:24:08 -05:00
Lioncash 32ce4a4821 hid/npad: Fix copy size in GetSupportedNpadIdTypes
Previously this was passing the size of the vector into memcpy rather
than the size in bytes to copy, which would result in a partial read.

Thankfully, this function isn't used yet, so this gets rid of a bug
before it's able to do anything.
2022-10-21 00:09:22 -04:00
liamwhite 69832aa1f6 Merge pull request #9078 from liamwhite/session-request
kernel: Session request cleanup
2022-10-20 18:07:30 -04:00
bunnei 12ed547269 Merge pull request #9096 from Kelebek1/audio_15
[audio_core] Update for firmware 15.0.0
2022-10-20 13:17:26 -07:00
Liam c0ae56548e kernel: remove most SessionRequestManager handling from KServerSession 2022-10-19 16:31:12 -04:00
Liam 7103b8dde3 kernel: add KSessionRequest 2022-10-19 16:31:12 -04:00
liamwhite 6b065e8d73 Merge pull request #9082 from Morph1984/future
savedata_factory: Detect future save data paths
2022-10-19 16:28:42 -04:00
liamwhite 4dce02aa8f Merge pull request #9083 from liamwhite/take-a-chance-on-me
kernel: fix slab heap ABA
2022-10-19 16:27:59 -04:00
liamwhite 6291423f8b Merge pull request #9071 from bunnei/mp-mm
Kernel Multiprocess (Part 1) - Persist memory & core timing
2022-10-19 16:27:43 -04:00
bunnei 8b2cadd4e2 core: hle: kernel: Migrate ProcessState to enum class. 2022-10-19 14:03:50 -04:00
Kelebek1 2da6a39c19 Update audio_core for firmware 15.0.0 2022-10-19 06:16:15 +01:00
Fernando S 8698e12596 Merge pull request #9084 from vonchenplus/dma_copy
video_core: implement 1D copies based on VMM 'kind'
2022-10-19 06:56:00 +02:00
bunnei e3cb70d8df core: Initialize: Add missing braces. 2022-10-18 19:13:35 -07:00
bunnei 438c1b5c18 core: core_timing: Re-initialize if single/multicore state changes. 2022-10-18 19:13:35 -07:00
bunnei f357ddf644 core: core_timing: Remove unused IsHostTiming. 2022-10-18 19:13:35 -07:00
bunnei 4c2274b2c1 core: hle: kernel: Use result macros for new/changed code. 2022-10-18 19:13:35 -07:00
bunnei a35c884097 core: Partially persist emulation state across game boots. 2022-10-18 19:13:35 -07:00
bunnei 3785e8d1c7 core: hle: kernel: Fix InitializePreemption order. 2022-10-18 19:13:35 -07:00
bunnei 55ed04af34 core: hle: kernel: k_process: Improve management of page table & cleanup. 2022-10-18 19:13:35 -07:00
bunnei 7dd7b440cc core: hle: kernel: k_interrupt_manager: HandleInterrupt should not depend on current process. 2022-10-18 19:13:35 -07:00
bunnei c164affbcb core: hle: kernel: Remove junk. 2022-10-18 19:13:35 -07:00
bunnei 15eebff127 core: hle: kernel: k_page_table: Impl. LockForUn/MapDeviceAddressSpace, cleanup. 2022-10-18 19:13:35 -07:00
bunnei 0eeef46015 core: hle: kernel: Integration application memory block slab manager. 2022-10-18 19:13:34 -07:00
bunnei 98a3854393 core: hle: kernel: k_page_table: Update, and integrate with new KMemoryBlockManager/SlabManager. 2022-10-18 19:13:34 -07:00
bunnei ddd0ca5f83 core: hle: kernel: k_memory_block: Update. 2022-10-18 19:13:34 -07:00
bunnei 3b1a2fd7db core: hle: kernel: k_memory_block_manager: Update. 2022-10-18 19:13:34 -07:00
bunnei 97e4cd1c8f core: hle: kernel: k_thread: Implement thread termination DPC. 2022-10-18 19:13:34 -07:00
bunnei 0592bf30c1 core: hle: kernel: Add KDynamicResourceManager. 2022-10-18 19:13:34 -07:00
bunnei f6fd69d0d4 core: hle: kernel: Add KDynamicSlabHeap. 2022-10-18 19:13:34 -07:00
bunnei 1089e3cb1e core: hle: kernel: Add KDynamicPageManager. 2022-10-18 19:13:34 -07:00
bunnei 5a37569052 core: hle: kernel: k_process: Change Status -> State. 2022-10-18 19:13:34 -07:00
bunnei acc0a8f63a core: hle: kernel: svc_types: Add SystemThreadPriorityHighest and ProcessState. 2022-10-18 19:13:34 -07:00
bunnei d9871bab0b core: device_memory: Templatize GetPointer(..). 2022-10-18 19:13:34 -07:00
bunnei 59dfd7ec29 core: hle: result: Add GetInnerValue and Includes methods. 2022-10-18 19:13:34 -07:00
bunnei 444f94e8f7 core: hle: kernel: svc_common: Add WaitInfinite & cleanup. 2022-10-18 19:13:34 -07:00
bunnei ec4c221e1f Merge pull request #9087 from Morph1984/once
general: Add missing pragma once
2022-10-17 22:50:02 -07:00
Liam 53625f087b kernel: fix slab heap ABA 2022-10-17 17:53:32 -04:00
FengChen 2d53a37461 video_core: Implement memory manager page kind 2022-10-17 15:33:29 +08:00
Morph 6a22ed905b general: Add missing pragma once 2022-10-17 03:14:31 -04:00
Morph e3c23433fa savedata_factory: Detect future save data paths
Enable compatibility for new account/device save paths planned on a future implementation.
2022-10-16 23:49:55 -04:00
Morph 6becbfbaa3 general: Fix spelling of "unknown" 2022-10-16 00:46:22 -04:00
liamwhite f57b352e93 Merge pull request #9061 from liamwhite/writable-event
kernel: remove KWritableEvent
2022-10-14 17:30:38 -04:00
liamwhite 979676ef89 Merge pull request #9055 from liamwhite/hbl
Preliminary support for nx-hbloader
2022-10-14 17:30:11 -04:00
liamwhite 873b8c58c7 Merge pull request #9032 from liamwhite/stub-friends
IFriendService: stub CheckFriendListAvailability
2022-10-13 20:12:08 -04:00
Liam e11c862ae6 result: enforce reference check specialization 2022-10-13 12:10:39 -04:00
Liam 09777eea76 kernel: remove KWritableEvent 2022-10-12 20:29:29 -04:00
bunnei e9f423326f Merge pull request #9034 from liamwhite/result-macros
kernel: add expanded result macros
2022-10-12 17:11:07 -07:00
bunnei 676abcf2f3 Merge pull request #9040 from liamwhite/woe-thirty-two
core_timing: use high-precision sleeps on non-Windows targets
2022-10-12 15:35:06 -07:00
bunnei e4db64c22b Merge pull request #9047 from german77/steam-aspect
yuzu: Add 16:10 aspect ratio
2022-10-12 12:54:23 -07:00
Liam 545875eaa1 k_server_session: preliminary support for userspace server sessions 2022-10-11 18:40:40 -04:00
Liam a048c5ca0f Add implementation of svcCreateSession 2022-10-11 18:15:45 -04:00
Liam fb88548cb1 general: preliminary support for hbl 2022-10-11 18:15:30 -04:00
Narr the Reg 70825554ec yuzu: Add 16:10 aspect ratio 2022-10-10 13:32:33 -05:00
liamwhite baacbcb930 Merge pull request #9043 from german77/vector_data
input_common: have an unique vector in callback status
2022-10-09 17:46:45 -04:00
german77 36d02d1fc3 input_common: have an unique vector in callback status 2022-10-09 12:49:18 -05:00
Liam d10787b40b core_timing: use high-precision sleeps on non-Windows targets 2022-10-08 18:27:40 -04:00
Liam 20e5a02da1 kernel: add expanded result macros 2022-10-08 12:41:27 -04:00
Liam 7d3c9d928d fsp_srv: stub GetCacheStorageSize 2022-10-08 12:24:00 -04:00
Liam b999db4a0f IFriendService: stub CheckFriendListAvailability 2022-10-07 22:19:41 -04:00
Liam 82a159f2c4 nfp_types: silence -Wtype-limits 2022-10-07 06:52:28 -04:00
bunnei 3733e23f07 Merge pull request #6142 from lat9nq/prog_meta_ref_bind_address
program_metadata: Avoid reference binding to misaligned address
2022-10-06 20:42:15 -07:00
Fernando Sahmkow 1595e77913 General: address feedback 2022-10-06 21:00:54 +02:00
Liam d8009fb2d1 general: rework usages of UNREACHABLE macro 2022-10-06 21:00:54 +02:00
Morph 5790abef59 nvdisp: End system frame after requesting to swap buffers
Fixes frametime reporting
2022-10-06 21:00:54 +02:00
Morph f8733d9da6 address_space: Address feedback 2022-10-06 21:00:54 +02:00
Morph 5ee9e5e84b general: Format licenses as per SPDX guidelines 2022-10-06 21:00:54 +02:00
Fernando Sahmkow 340398daf5 NvHostChannels: improve hack for supporting multiple channels. 2022-10-06 21:00:54 +02:00
Fernando Sahmkow 5cbe6e1739 Address Feedback from bylaws. 2022-10-06 21:00:53 +02:00
Fernando Sahmkow 40a5c7d398 Nvflinger: correct duplication. 2022-10-06 21:00:53 +02:00
VonChenPlus 9623b1dc5a Core: Fix get nvmap object random crash 2022-10-06 21:00:53 +02:00
Fernando Sahmkow 710c83e10a NvDec: Fix regressions. 2022-10-06 21:00:53 +02:00
Liam White 6df0663a57 General: Fix compilation for GCC 2022-10-06 21:00:53 +02:00
Fernando Sahmkow 4124fa18e3 NVDRV: Further improvements. 2022-10-06 21:00:53 +02:00
Fernando Sahmkow 6a3eca65ea MemoryManager: Fix errors popping out. 2022-10-06 21:00:53 +02:00
Fernando Sahmkow 42ef10060a VideoCore: Refactor fencing system. 2022-10-06 21:00:52 +02:00
Fernando Sahmkow 67bb131e37 MemoryManager: initial multi paging system implementation. 2022-10-06 21:00:52 +02:00
Fernando Sahmkow 43d8a8fb77 NVDRV: Further refactors and eliminate old code. 2022-10-06 21:00:52 +02:00
Fernando Sahmkow 383f95a063 NVDRV: Refactor Host1x 2022-10-06 21:00:52 +02:00
Fernando Sahmkow a6425c97e4 VideoCore: Refactor syncing. 2022-10-06 21:00:52 +02:00
Fernando Sahmkow bc66debfdc Texture cache: Fix the remaining issues with memory mnagement and unmapping. 2022-10-06 21:00:52 +02:00
Fernando Sahmkow a933bd94d6 VideoCore: Extra Fixes. 2022-10-06 21:00:52 +02:00
Fernando Sahmkow 19d8ea6bd6 NVDRV: Remake ASGPU 2022-10-06 21:00:52 +02:00
Fernando Sahmkow 1d95a124a7 NVDRV: Update copyright notices. 2022-10-06 21:00:52 +02:00
Fernando Sahmkow 448ec77acb NvHostCtrl: Fix merge of nvflinger. 2022-10-06 21:00:52 +02:00
Fernando Sahmkow 199642590c NVHOST_CTRl: Implement missing method and fix some stuffs. 2022-10-06 21:00:51 +02:00
Fernando Sahmkow 8847b6645c VideoCore: implement channels on gpu caches. 2022-10-06 21:00:51 +02:00
Fernando Sahmkow 5ca7d7118f NVASGPU: Fix Remap. 2022-10-06 21:00:51 +02:00
Fernando Sahmkow f43a322d65 NVDRV: Fix clearing when destroying. 2022-10-06 21:00:51 +02:00
Fernando Sahmkow 461c659d48 NVMAP: Fix the Free return parameters. 2022-10-06 21:00:51 +02:00
Fernando Sahmkow 5ed054796f NVDRV: Fix Open/Close and make sure each device is correctly created. 2022-10-06 21:00:51 +02:00
Fernando Sahmkow 21138043da NVDRV: Implement new NvMap 2022-10-06 21:00:51 +02:00
Fernando Sahmkow 3991518f74 NVDRV: Refactor and add new NvMap. 2022-10-06 21:00:51 +02:00
Fernando Sahmkow 2821dbf166 NVDRV: Cleanup. 2022-10-06 21:00:51 +02:00
Fernando Sahmkow 69e08ad83b NVDRV: Implement QueryEvent. 2022-10-06 21:00:51 +02:00
Fernando Sahmkow 4165ead1f1 NvHost: Remake Ctrl Implementation. 2022-10-06 21:00:51 +02:00
Fernando Sahmkow 987ef2824c NvHost: Try a different approach to blocking. 2022-10-06 21:00:51 +02:00
Fernando Sahmkow ea941e1d76 NvHost: Fix some regressions and correct signaling on timeout. 2022-10-06 21:00:51 +02:00
bunnei 29d949a485 Merge pull request #9013 from liamwhite/spinning-a-yarn
common: remove "yuzu:" prefix from thread names
2022-10-05 18:53:42 -07:00
Narr the Reg 280a232e27 service: nfp: Fix errors to pass unit testing 2022-10-03 18:06:55 -05:00
Liam 47fc168030 common: remove "yuzu:" prefix from thread names 2022-10-03 18:43:56 -04:00
bunnei e23adcd481 Merge pull request #8955 from german77/amiibo-rewrite
core: nfp: Rewrite implementation to remove direct access from the frontend
2022-10-02 14:28:43 -07:00
german77 d19a30670f service: mii: Copy only valid name bytes 2022-10-02 12:34:24 -05:00
Narr the Reg 1c5a057252 service: nfp: Implement mount target and open application area errors, minor fixes 2022-10-02 12:34:14 -05:00
german77 d08c8cf877 nfp: Multiple fixes against HW 2022-10-02 12:32:26 -05:00
german77 d389a05005 service: nfp: address comments 2022-10-02 12:32:26 -05:00
german77 28792b26a5 service: nfp: Rewrite and implement applet calls 2022-10-02 12:32:26 -05:00
german77 3be3a16c01 core: hid: Add nfc support to emulated controller 2022-10-02 12:32:26 -05:00
bunnei ed0b7e1666 Merge pull request #8992 from Morph1984/vi-vsync-event
service: vi: Retrieve vsync event once per display
2022-10-02 03:02:59 -07:00
bunnei 836eb41341 Merge pull request #8876 from FearlessTobi/multiplayer-part3
ldn: Implement "local wireless" networked multiplayer
2022-10-01 14:53:36 -07:00
Zwip-Zwap Zapony 2eb08dac0f Fix "controller.colors_state.right" being "left" 2022-10-01 18:18:08 +02:00
bunnei 4df48d6b35 Merge pull request #8934 from german77/palma_release
service: hid: Partially implement palma controller
2022-09-29 12:48:28 -07:00
bunnei 8fa025730a Merge pull request #8940 from german77/silence
yuzu: Silence some clang warnings
2022-09-28 14:37:23 -07:00
Morph 55fef19014 service: vi: Retrieve vsync event once per display
The display vsync event can only be retrieved once per display. Returns VI::ResultPermissionDenied if we attempt to retrieve the vsync event for the same display.

Prevents games such as .hack//G.U. Last Recode from consuming all the handles in the handle table by spamming vsync event retrievals and allows it to go in game.
2022-09-25 21:33:36 -04:00
Morph 23c1bf736f service: vi: Move VI results into its own file 2022-09-25 20:33:25 -04:00
Merry 62b91b0094 core/loader: Return nullptr if file is nullptr 2022-09-25 19:31:35 +01:00
Narr the Reg adb6348255 service: hid: Partially implement palma controller 2022-09-25 00:13:12 -05:00
Morph cf67c58c1a Merge pull request #8945 from Tachi107/typos
chore: fix some typos
2022-09-23 20:28:43 -04:00
Andrea Pappacoda b1585fed5a chore: fix some typos
Fix some typos reported by Lintian
2022-09-23 13:38:23 +02:00
Lioncash a260c09deb sockets: Make fd member variable protected
Other things shouldn't be able to directly mess around with the
descriptor
2022-09-22 08:20:54 -04:00
Narr the Reg ca0d1fd4f1 yuzu: Silence some clang warnings 2022-09-21 11:51:31 -05:00
FearlessTobi 1c14030b31 Address some review comments 2022-09-20 19:36:32 +02:00
bunnei f39b70a21b Merge pull request #8915 from vonchenplus/opus_multi_stream
core: implement HwOpus GetWorkBufferSizeForMultiStreamEx
2022-09-17 16:07:33 -07:00
bunnei c5d72b926d Merge pull request #8827 from german77/amiibo_release
core: nfp: Implement amiibo encryption
2022-09-17 11:11:21 -07:00
bunnei 58975829b7 Merge pull request #8650 from Kelebek1/vsync
[Coretiming/NVNFlinger] Improve multi-core vsync timing, and core timing accuracy
2022-09-17 11:10:54 -07:00
Morph 8298ce7856 Merge pull request #8869 from SachinVin/cmake
core/CMakeLists.txt: Remove duplicate files.
2022-09-16 13:11:33 -04:00
FengChen b85bd1b548 core: implement HwOpus GetWorkBufferSizeForMultiStreamEx 2022-09-17 00:28:56 +08:00
Morph 8eb4dc577c Merge pull request #8911 from lioncash/cexpr-string
audio_device: Make AudioDeviceName constructor constexpr
2022-09-16 10:18:58 -04:00
Lioncash 1747b5ae6c audio_device: Mark member functions as const where applicable
These member functions don't modify any internal state.
2022-09-15 09:06:17 -04:00
Lioncash 0f1024b334 audio_device: Make AudioDeviceName constructor constexpr
These are used as read-only arrays, so we can make the data read-only
and available at compile-time.

Now constructing an AudioDevice no longer needs to initialize some
tables
2022-09-15 09:03:40 -04:00
Kelebek1 c6d4071162 Remove pause callbacks from coretiming 2022-09-13 13:20:35 +01:00
bunnei 543aa077ee Merge pull request #8842 from Kelebek1/AudOut
[audio_core] Rework audio output
2022-09-10 11:01:11 -07:00
german77 dd33c0c473 yuzu: Multiple room UI improvements 2022-09-10 19:39:25 +02:00
bunnei 44ce3eaf4c Merge pull request #8863 from german77/triggers
core: hid: Fix GC triggers overwriting ZL and ZR buttons
2022-09-09 21:53:53 -07:00
bunnei 7dc3d49135 Merge pull request #8864 from german77/toggle_analog
input_common: Add support for analog toggle
2022-09-09 20:54:01 -07:00
FearlessTobi 48d6226115 ldn: Initial implementation 2022-09-09 14:30:22 +02:00
SachinVin 262f5b96b5 core/CMakeLists.txt: Remove duplicate files. 2022-09-08 22:03:53 +05:30
german77 817b96446e core: nfp: Remove magic numbers 2022-09-07 09:49:43 -05:00
german77 c990e2d2f5 core: nfp: Workaround for lack of multiple nfp interfaces 2022-09-07 01:04:00 -05:00
Narr the Reg 8c377e882e core: nfp: Correct date and amiibo name 2022-09-07 01:04:00 -05:00
Narr the Reg 8301e770f9 core: nfp: Implement Convert and RecreateApplicationArea, accuracy fixes 2022-09-07 01:04:00 -05:00
german77 44dff8f633 core: nfp: Implement amiibo encryption 2022-09-07 01:04:00 -05:00
Narr the Reg d4fb46d8f9 input_common: Add support for analog toggle 2022-09-06 11:21:28 -05:00
Narr the Reg 07d2e08272 core: hid: Fix GC triggers overwritting ZL and ZR buttons 2022-09-05 16:09:21 -05:00
Kelebek1 77a30f7286 Don't stall with nvdec 2022-09-04 05:41:06 +01:00
liamwhite 9a73dfdf56 Merge pull request #8855 from german77/pls
core: ns: Implement pl:s service
2022-09-03 18:35:38 -04:00
Narr the Reg 98d62e931a core: ns: Implement pl:s service 2022-09-03 17:32:12 -04:00
bunnei 3210654f5a Merge pull request #8822 from FearlessTobi/multiplayer-fixes
network: Fixes and improvements to the room feature
2022-09-02 10:24:32 -07:00
Kelebek1 c3e3874d8d Rework audio output, connecting AudioOut into coretiming to fix desync during heavy loads. 2022-09-02 04:43:04 +01:00
FearlessTobi f24b74d4c1 Address review comments 2022-09-02 00:50:32 +02:00
Kelebek1 f121da072a Demote services from warning/info to debug to reduce log spam:
GetCurrentFocusState
SetClockSpeed
EnableSixAxisSensorUnalteredPassthrough
IsSixAxisSensorUnalteredPassthroughEnabled
Get, GetOld
SetAndWait, SetAndWaitOld
IocParam
IocFree
2022-09-01 16:54:22 +01:00
FearlessTobi 8a5fed2c9d core/ldn_types: Minor corrections and additions 2022-08-27 04:49:10 +02:00
FearlessTobi f3284250ce core/socket_proxy: Correct broadcast behavior
Broadcasts should only be sent when the broadcast IP is used.
They should also only be received when SO_BROADCAST is enabled.
2022-08-27 03:39:02 +02:00
FearlessTobi 31c4475420 yuzu: Display current game version in multiplayer room
Makes it easier for users to recognize connection errors caused by different game versions.
2022-08-27 03:31:17 +02:00
FearlessTobi 6d3dba4b98 core/bsd: Correctly unbind methods in destructor
Prevents yuzu from crashing when the BSD service is created a second time.
2022-08-27 03:12:12 +02:00
FearlessTobi d841898d4d core/acc: Make CheckAvailability use LOG_DEBUG
Previously it was spamming the logs in certain multiplayer games like Puyo Puyo Tetris.
2022-08-27 03:08:21 +02:00
FearlessTobi 869724c3a5 yuzu_room: Remove dependency on core 2022-08-27 03:02:21 +02:00
bunnei 52dc2cbe57 Merge pull request #8566 from german77/galaxy
core: hid: Add fallback for dualjoycon and pro controllers
2022-08-26 16:23:41 -07:00
bunnei 9ad065b476 Merge pull request #8812 from Kelebek1/auto
[Audio] Implement AudRenU:RequestUpdateAuto
2022-08-24 11:45:56 -07:00
Kelebek1 15c4734b5b Implement AudRenU:RequestUpdateAuto, and use C descriptors when B reports as empty. 2022-08-24 18:14:21 +01:00
bunnei fdc9c4ea0c Merge pull request #8804 from vonchenplus/speed_up_idirectory_services
core:filesystem: speed up IDirectory service
2022-08-23 13:56:05 -07:00
vonchenplus eab51849f7 core:filesystem: speed up IDirectory service 2022-08-23 09:05:59 +08:00
german77 3d8cb61bfd hid: core: Add missing function table names 2022-08-21 23:31:53 -05:00
liamwhite d16ea1c63c Merge pull request #8799 from liamwhite/where-did-the-padding-go
core/file_sys: fix alignment of BuildId
2022-08-21 14:06:06 -04:00
liamwhite a903de9ec8 Merge pull request #8660 from Tachi107/findmodules-pkg-config
build: simplify find modules
2022-08-21 13:42:42 -04:00
liamwhite eaf4777e58 Merge pull request #8784 from Docteh/nosnek
code: dodge PAGE_SIZE #define
2022-08-21 12:59:01 -04:00
Liam 0676dbfea1 core/file_sys: fix alignment of BuildId 2022-08-21 12:28:36 -04:00
bunnei 495b3a7e72 Merge pull request #8790 from liamwhite/too-many-ways-to-name-a-byte-string
core/file_sys: fix BuildId padding in patch loading
2022-08-20 22:26:02 -07:00
vonchenplus 37a5b8aded core: implement clkrst service 2022-08-20 14:08:59 +08:00
Kyle Kienapfel ea00332a67 code: dodge PAGE_SIZE #define
Some header files, specifically for OSX and Musl libc define PAGE_SIZE to be a number
This is great except in yuzu we're using PAGE_SIZE as a variable

Specific example
`static constexpr u64 PAGE_SIZE = u64(1) << PAGE_BITS;`

PAGE_SIZE PAGE_BITS PAGE_MASK are all similar variables.
Simply deleted the underscores, and then added YUZU_ prefix

Might be worth noting that there are multiple uses in different classes/namespaces
This list may not be exhaustive

Core::Memory   12 bits (4096)
QueryCacheBase 12 bits
ShaderCache    14 bits (16384)
TextureCache   20 bits (1048576, or 1MB)

Fixes #8779
2022-08-19 16:08:40 -07:00
Liam 0812bb34ea core/file_sys: fix BuildId padding 2022-08-19 17:16:33 -04:00
FearlessTobi df835dc289 core/socket_proxy: Final nits 2022-08-15 23:50:19 +02:00
german77 e398b2af5c core: network: Address review comments 2022-08-15 20:25:42 +02:00
FearlessTobi 0351eadbdb internal_network: Fix mingw compilation
Apparently, "interface" is a reserved keyword on this compiler.
2022-08-15 20:25:42 +02:00
FearlessTobi 851ec302b1 core, yuzu: Address first part of review comments 2022-08-15 20:25:42 +02:00
FearlessTobi 5776601ca7 core/socket_proxy: Fix compilation 2022-08-15 20:25:42 +02:00
FearlessTobi ce2eefb57c Make copyright headers SPDX-compliant 2022-08-15 20:25:42 +02:00
FearlessTobi ce5b9d370d core, network: Add ability to proxy socket packets 2022-08-15 20:25:42 +02:00
bunnei e8160eb639 Merge pull request #8755 from Morph1984/delimit-ips
ips_layer: Delimit parsed hex value string
2022-08-12 14:12:10 -07:00
liamwhite 530b5032dd Merge pull request #8745 from merryhime/null-fastmem-arena
arm_dynarmic: Fix nullptr fastmem arenas
2022-08-12 14:57:32 -04:00
Morph 8064454628 ips_layer: Delimit parsed hex value string
Delimits the hex value string on spaces, slashes, carriage returns or newlines, allowing for comments to be added in-line.
2022-08-12 10:19:44 -04:00
liamwhite 2dc71dda07 Merge pull request #8731 from FearlessTobi/better-ldn
ldn: Add better stubs and more data types
2022-08-12 08:40:30 -04:00
german77 e1f4130f30 core: ldn: Address review comments part 2 2022-08-11 23:12:32 -05:00
bunnei ada0bbe928 Merge pull request #8722 from german77/ds4_goes_brrr
hid: core: Delay the stop vibration command when testing
2022-08-09 16:22:33 -07:00
bunnei 185d3c9df5 Merge pull request #8724 from german77/no_alpha
hid: core: Properly emulate controller color and battery level
2022-08-09 16:21:23 -07:00
bunnei 448ed1ed01 Merge pull request #8729 from merryhime/cp15-barriers
arm_dynarmic_cp15: Implement CP15DMB/CP15DSB/CP15ISB
2022-08-09 16:12:53 -07:00
Merry c5b77f78f8 arm_dynarmic: Fix nullptr fastmem arenas
Unable to enable fastmem of exclusive access without a valid fastmem arena.
2022-08-09 20:48:19 +01:00
Narr the Reg 67f4daf029 hid: core: Properly emulate controller color and battery level 2022-08-08 13:12:02 -05:00
Narr the Reg f91a28773b core: ldn: Address review comments 2022-08-08 12:49:48 -05:00
Liam a7027fa7c9 core/arm: fix build error 2022-08-07 21:39:54 -04:00
bunnei f5e9f8c9fe Merge pull request #8637 from liamwhite/bad-interrupts
kernel: unlayer CPU interrupt handling
2022-08-07 17:48:55 -07:00
Morph d97c307f4d Merge pull request #8240 from liamwhite/count-cycles
core/arm: re-enable cycle counting
2022-08-07 20:30:57 -04:00
FearlessTobi 9f4d6dd979 ldn: Add better stubs and more data types
Co-Authored-By: Narr the Reg <5944268+german77@users.noreply.github.com>
Co-Authored-By: Morph <39850852+Morph1984@users.noreply.github.com>
2022-08-07 23:54:51 +02:00
Merry abf143229a arm_dynarmic_cp15: Implement CP15DMB/CP15DSB/CP15ISB 2022-08-07 22:16:49 +01:00
Narr the Reg 7cf52e6eb8 hid: core: Delay the stop vibration command when testing 2022-08-05 17:20:05 -05:00
Morph b5847efa10 core_timing: Sleep in discrete intervals, yield during spin 2022-08-02 01:01:54 -04:00
Kelebek1 4a764c5df7 Add missing looping event schedule signal 2022-08-02 01:01:54 -04:00
Kelebek1 992af57f8d Make coretiming waiting more accurate 2022-08-02 01:01:54 -04:00
Kelebek1 ea06b32a00 Rework multi-core vsync 2022-08-01 23:51:53 -04:00
Liam 9080ea9ab1 core/loader: remove ELF loader 2022-08-01 17:19:23 -04:00
Andrea Pappacoda 89750a0ebf build(externals): rename Findopus to FindOpus
This better matches upstream's FindOpus.cmake file, and it will make
using upstream's FindOpus.cmake file easier.
2022-08-01 12:31:31 +02:00
Nikita Strygin 39c3b841d3 Properly write out the command buffer when serving close request 2022-07-31 23:17:45 +03:00
Maide 68dcd946b7 Revert Coretiming PRs 8531 and 7454 (#8591) 2022-07-27 19:47:06 -04:00
liamwhite b7216c249a Merge pull request #8636 from german77/irs_cluster_release
service: irs: Implement clustering processor
2022-07-27 15:54:28 -04:00
liamwhite d24328ae65 Merge pull request #8633 from Morph1984/optional-keys
applet/swkbd: Implement optional symbol keys
2022-07-27 15:53:32 -04:00
Andrea Pappacoda 6a2efdda2f chore: make yuzu REUSE compliant
[REUSE] is a specification that aims at making file copyright
information consistent, so that it can be both human and machine
readable. It basically requires that all files have a header containing
copyright and licensing information. When this isn't possible, like
when dealing with binary assets, generated files or embedded third-party
dependencies, it is permitted to insert copyright information in the
`.reuse/dep5` file.

Oh, and it also requires that all the licenses used in the project are
present in the `LICENSES` folder, that's why the diff is so huge.
This can be done automatically with `reuse download --all`.

The `reuse` tool also contains a handy subcommand that analyzes the
project and tells whether or not the project is (still) compliant,
`reuse lint`.

Following REUSE has a few advantages over the current approach:

- Copyright information is easy to access for users / downstream
- Files like `dist/license.md` do not need to exist anymore, as
  `.reuse/dep5` is used instead
- `reuse lint` makes it easy to ensure that copyright information of
  files like binary assets / images is always accurate and up to date

To add copyright information of files that didn't have it I looked up
who committed what and when, for each file. As yuzu contributors do not
have to sign a CLA or similar I couldn't assume that copyright ownership
was of the "yuzu Emulator Project", so I used the name and/or email of
the commit author instead.

[REUSE]: https://reuse.software

Follow-up to b2eb103829
2022-07-27 12:53:49 +02:00
FearlessTobi d5e6d1b576 network, yuzu: Make copyright headers SPDX-compliant 2022-07-25 21:59:31 +02:00
FearlessTobi 10e2c8ef6a network: Move global state into a seperate class
Co-Authored-By: Narr the Reg <5944268+german77@users.noreply.github.com>
2022-07-25 21:59:31 +02:00
german77 3a91e22e80 common: multiplayer: Use GameInfo type 2022-07-25 21:59:31 +02:00
FearlessTobi 3b203e536a Address second part of review comments 2022-07-25 21:59:30 +02:00
FearlessTobi 846c50dd42 Address first part of review comments 2022-07-25 21:59:30 +02:00
FearlessTobi 5ad67e876b core: Fix -Wunused-variable 2022-07-25 21:59:30 +02:00
FearlessTobi 5db6f87f7b common, core: fix -Wmissing-field-initializers 2022-07-25 21:59:30 +02:00
FearlessTobi 60008b680e yuzu: Add ui files for multiplayer rooms 2022-07-25 21:59:28 +02:00
Narr the Reg fc923fdc18 Address comments 2022-07-25 11:17:48 -05:00
Liam 3edb108f4b kernel: unlayer CPU interrupt handling 2022-07-25 12:14:15 -04:00
Morph b8cff68056 Merge pull request #8549 from liamwhite/kscheduler-sc
kernel: use KScheduler from Mesosphere
2022-07-25 12:00:31 -04:00
german77 ea68c35ad0 fix compiler errors 2022-07-24 16:39:32 -05:00
german77 5e43e84229 service: irs: Implement clustering processor 2022-07-24 15:01:43 -05:00
Morph 9abacc2f86 applet/swkbd: Implement optional symbol keys
These are only used in the numeric keyboard, and correspond to the keys to the left and right of the "0" key on the numeric keyboard.
2022-07-24 07:21:02 -04:00
Narr the Reg a08b8f224b yuzu: Add webcam support and rebase to latest master 2022-07-23 19:40:25 -05:00
german77 cd16f9801a service: irs: Move to IRS namespace and minor fixes 2022-07-23 19:40:25 -05:00
german77 c075ebaeab service: irs: Split processors and implement ImageTransferProcessor 2022-07-23 19:40:25 -05:00
german77 2cb57c0f7f core: hid: Add cammera support 2022-07-23 19:40:25 -05:00
Kelebek1 be1f5f1d9f Project Andio 2022-07-22 01:11:32 +01:00
bunnei e8c9c766ae Merge pull request #8598 from Link4565/recv-dontwait
Enable the use of MSG_DONTWAIT flag on RecvImpl
2022-07-21 15:43:55 -07:00
Gus Caplan 7ad8553346 implement resume message 2022-07-17 22:35:07 -07:00
merry bdf6e32aed Merge pull request #8569 from merryhime/watchpoints
dynarmic: Abort watchpoints ASAP
2022-07-17 22:41:28 +01:00
bunnei 185d1c6135 Merge pull request #8508 from yuzu-emu/mc-speed-limit
hle: service: nvflinger: Factor speed limit into frame time calculation.
2022-07-17 13:59:52 -07:00
bunnei 4400c36037 Merge pull request #8544 from german77/14dot0
service: Update some services to 14.0.0+
2022-07-17 12:30:52 -07:00
bunnei b3f303dd4a hle: service: nvflinger: Fix implicit conversion. 2022-07-16 23:11:42 -07:00
bunnei e42a6ad7d9 yuzu: settings: Remove framerate cap and merge unlocked framerate setting.
- These were all somewhat redundant.
2022-07-16 23:11:39 -07:00
bunnei fbb919c02f hle: service: nvflinger: Factor speed limit into frame time calculation.
- This allows the %-based "Limit Speed Percent" setting to work with MC emulation.
- This is already supported for SC emulation.
2022-07-16 23:10:45 -07:00
bunnei 3607ebe050 Merge pull request #8594 from liamwhite/skip-wp
core/arm: skip watchpoint checks when reading instructions
2022-07-16 13:28:20 -07:00
bunnei a13ed9fa7a Merge pull request #8511 from german77/hbmenu
service: ptm: Add TS, nifm: Stub GetInternetConnectionStatus
2022-07-16 11:30:56 -07:00
Link4565 da2d093e64 Enable the use of MSG_DONTWAIT flag on RecvImpl 2022-07-16 18:30:28 +01:00
Liam 9858c3ce34 core/arm: skip watchpoint checks when reading instructions 2022-07-15 19:47:28 -04:00
Morph 646ea94aac Merge pull request #8588 from merryhime/IBinder-vdestruct
nvflinger: Polymorphic destructor requried for abstract class IBinder
2022-07-15 06:02:31 -04:00
Merry 4267739d06 KCodeMemory: Mark virtual methods as override 2022-07-15 10:39:58 +01:00
Merry 3d89711aa5 nvflinger: Polymorphic destructor requried for abstract class IBinder 2022-07-15 10:28:54 +01:00
Merry f719a0a078 dynarmic: Abort watchpoints ASAP 2022-07-15 10:03:30 +01:00
Liam dbb1312876 kernel: Ensure all uses of disable_count are balanced 2022-07-14 22:47:18 -04:00
Liam e2be660909 kernel: be more careful about initialization path for HLE threads 2022-07-14 22:47:18 -04:00
Liam 21e2063d7d kernel: fix single-core preemption points 2022-07-14 22:47:18 -04:00
Liam 61b26b386d kernel: fix issues with single core mode 2022-07-14 22:47:18 -04:00
Liam e47bced65d kernel: use KScheduler from mesosphere 2022-07-14 22:47:18 -04:00
liamwhite 559370c271 Merge pull request #8510 from german77/vibration
input_common: sdl: lower vibration frequency and use it's own unique thread
2022-07-14 20:41:29 -04:00
german77 d04b9f0f83 service: fatal: Add function table 2022-07-14 16:33:09 -05:00
german77 ab9c495d00 service: btdrv,bcat,btm: Update service tables to 14.0.0 2022-07-14 16:33:09 -05:00
german77 15e95ddbe0 service am: Update service tables to 14.0.0 2022-07-14 16:33:08 -05:00
german77 07090f96d4 service: ac: Replace intances of ProfileData with UserData 2022-07-14 16:33:07 -05:00
bunnei c18bf04dbf Merge pull request #8559 from liamwhite/waiter-list
kernel: fix usage of waiter_list in Finalize
2022-07-11 12:10:01 -07:00
german77 412221d1a1 core: hid: Add fallback for dualjoycon and pro controllers 2022-07-10 20:27:40 -05:00
Kelebek1 f66a68fa1b PR 2022-07-10 08:29:37 +01:00
Kelebek1 03de5e053d Rework CoreTiming 2022-07-10 06:59:40 +01:00
liamwhite 32b64ab7f1 Merge pull request #8531 from FernandoS27/core-timing-fix-reg
Core timing: use only one thread.
2022-07-10 00:47:05 -04:00
Liam 12948cf615 kernel: fix usage of waiter_list in Finalize 2022-07-09 18:54:54 -04:00
Mai 485473f118 Merge pull request #8501 from liamwhite/backtrace-again
core/arm: better support for backtrace generation
2022-07-07 23:49:54 -04:00
liamwhite 79d631b630 Merge pull request #8502 from liamwhite/end-wait
kernel: clean up waiting implementation
2022-07-07 17:31:49 -04:00
Fernando S 6850e6142a Merge pull request #8492 from german77/no_more_errors
service: hid: Correct some mistakes and add more validations
2022-07-07 08:29:34 +02:00
liamwhite 786963fac7 Merge pull request #8532 from liamwhite/fiber-supplements
common/fiber: make fibers easier to use
2022-07-05 18:20:39 -04:00
Morph 7efb17f51a Merge pull request #8521 from lat9nq/gdbstub-in-bounds
gdbstub_arch: Directly access SP register
2022-07-04 21:27:12 -04:00
Fernando Sahmkow 95cb99b186 Core timing: use only one thread. 2022-07-02 23:02:16 +02:00
Liam e551960935 common/fiber: make fibers easier to use 2022-07-02 12:33:49 -04:00
Fernando S e41dd008c8 Merge pull request #8523 from liamwhite/sc-oopsie
cpu_manager: properly check idle on return from preemption
2022-07-01 22:40:02 +02:00
Morph f64cc85d4b Merge pull request #8490 from liamwhite/read-code-stop
dynarmic: Stop ReadCode callbacks to unmapped addresses
2022-06-30 20:57:39 -07:00
Liam 61ef65ab25 cpu_manager: properly check idle on return from preemption 2022-06-30 16:54:05 -04:00
lat9nq f1ca3b7ff3 gdbstub_arch: Directly access SP register
Currently to access the SP register, RegRead and RegWrite rely on a
out-of-bounds array access to reach the next element in a struct. As
of writing only git versions of GCC catch this error.

Specify the SP register when we want to access it in these functions.
2022-06-30 12:47:40 -04:00
Fernando S ee5d112e19 Merge pull request #7454 from FernandoS27/new-core-timing
Core: Remake Core Timing
2022-06-30 12:38:50 +02:00
Fernando Sahmkow 3adeb694b0 Adress Feedback. 2022-06-30 10:18:56 +02:00
german77 e687bfbe7d service: nifm: Stub GetInternetConnectionStatus 2022-06-28 19:22:46 -05:00
german77 2bad788ead service: ptm: Rewrite PSM and add TS 2022-06-28 19:22:46 -05:00
german77 93cbaeb605 input_common: sdl: lower vibration frequency and use it's own unique thread 2022-06-28 19:22:16 -05:00
Narr the Reg 63ae2ffac1 service: hid: Correct some mistakes and add more validations 2022-06-28 19:14:55 -05:00
Morph d3da378c46 Merge pull request #8512 from german77/nnResult
Replace multiple names with a better name
2022-06-28 16:59:33 -07:00
Fernando Sahmkow 2d838d8ec9 Address feedback. 2022-06-28 01:19:30 +02:00
Fernando Sahmkow 0043292951 Core: Protect each event from race conditions within it. 2022-06-28 01:10:55 +02:00
Fernando Sahmkow 396cb575c9 Core: add missing include. 2022-06-28 01:10:55 +02:00
Fernando Sahmkow 1541f198eb Core/Common: Corrections to core timing and add critical priority. 2022-06-28 01:10:55 +02:00
Fernando Sahmkow ca686b6d07 Core: Reimplement Core Timing. 2022-06-28 01:10:50 +02:00
bunnei 74ebab21ce Merge pull request #8504 from comex/mesosphere-current-process
Support `InfoType_MesosphereCurrentProcess`
2022-06-27 13:05:07 -07:00
german77 093680269b core: kernel: Replace instances of KPageLinkedList with KPageGroup 2022-06-26 20:21:45 -05:00
german77 c7890ebccc core: Replace all instances of ResultCode with Result 2022-06-26 20:21:37 -05:00
bunnei 8e9a9b18c6 Merge pull request #8475 from liamwhite/x18
kernel: make current thread pointer thread local
2022-06-26 11:38:48 -07:00
comex 0c3a934b6e Re-add missing `case` and braces, and trim whitespace 2022-06-25 18:01:56 -07:00
comex 593f978ad2 Update src/core/hle/kernel/svc.cpp
Co-authored-by: liamwhite <liamwhite@users.noreply.github.com>
2022-06-25 18:00:29 -07:00
comex 9decdbabab Support InfoType_MesosphereCurrentProcess 2022-06-25 16:23:23 -07:00
Liam f70a3ada00 kernel: clean up waiting implementation 2022-06-25 13:36:14 -04:00
Liam 416a71804b core/arm: better support for backtrace generation 2022-06-25 12:54:24 -04:00
Liam 2e78c2fdb9 gdbstub: fix register pokes 2022-06-25 12:07:20 -04:00
Liam 83f1ecb73b kernel: make current thread pointer thread local 2022-06-23 00:28:00 -04:00
bunnei 4548e74d3f Merge pull request #8491 from Morph1984/extra-assert
KPageTable: Remove extraneous assert
2022-06-22 14:47:07 -07:00
bunnei 3f3f5aa93b Merge pull request #8483 from liamwhite/fire-emblem-three-semaphores
kernel: wait for threads to stop on pause
2022-06-22 14:46:33 -07:00
Morph 72b78f9c32 KPageTable: Remove extraneous assert
Since start is always 0 and VAddr is unsigned, we can safely remove this assert.
2022-06-21 21:28:54 -04:00
Liam 97edc7c0df core/arm: increase minimum_run_cycles 2022-06-21 20:37:16 -04:00
merry 8151f68522 core/arm: re-enable cycle counting 2022-06-21 20:36:24 -04:00
Liam 0d04631c1f dynarmic: Stop ReadCode callbacks to unmapped addresses 2022-06-21 20:01:43 -04:00
bunnei f4201ec44e Merge pull request #8432 from liamwhite/watchpoint
core/debugger: memory breakpoint support
2022-06-21 16:04:57 -07:00
bunnei d1d50f28c8 Merge pull request #8468 from liamwhite/dispatch-tracking
kernel: fix some uses of disable_count
2022-06-21 15:30:27 -07:00
Narr the Reg 341d5b9463 service: am: Stub PerformSystemButtonPressingIfInFocus
Used by Ring Fit Adventure
2022-06-20 12:35:58 -05:00
Liam 808ad9eb9f kernel: wait for threads to stop on pause 2022-06-18 16:54:33 -04:00
Liam 91beb87df0 core: fix initialization in single core, sync GPU mode 2022-06-16 23:43:35 -04:00
Nikita Strygin 5f5739ea2c Implement ExitProcess svc
Currently this just stops all the emulation
This works under assumption that only application will try to use
ExitProcess, with services not touching it
If application exits - it quite makes sense to end the emulation
2022-06-16 21:35:34 +03:00
Liam 8d2abc710c core/debugger: memory breakpoint support 2022-06-16 13:18:07 -04:00
Liam 6d5cc6b2a2 kernel: fix some uses of disable_count 2022-06-15 20:53:49 -04:00
Fernando S 1d8e860c47 Merge pull request #8457 from liamwhite/kprocess-suspend
kernel: implement KProcess suspension
2022-06-16 02:41:12 +02:00
bunnei d2cc6a69a2 Merge pull request #8317 from german77/notifa
service: notifa: Implement most part of this service
2022-06-15 09:53:50 -07:00
Mai 8894ac44d2 Merge pull request #8464 from liamwhite/break-debug
kernel: notify debugger on break SVC
2022-06-15 11:55:54 -04:00
Mai bb0a6faa0a Merge pull request #8383 from Morph1984/shadow-of-the-past
yuzu: Make variable shadowing a compile-time error
2022-06-14 21:08:58 -04:00
Liam 0755b274fa kernel: notify debugger on break SVC 2022-06-14 21:06:23 -04:00
Liam a6c1036ddc core: centralize profile scope for Dynarmic 2022-06-14 18:19:04 -04:00
Liam 59a6d88625 kernel: implement KProcess suspension 2022-06-14 10:04:11 -04:00
Liam f91e2f2742 kernel: fix passthrough of local captures in lambda 2022-06-13 20:09:32 -04:00
Liam 79bf4bc3ff general: fix compilation on MinGW GCC 12 2022-06-13 20:09:32 -04:00
Liam f3fd1038bb general: fix compilation on GCC 12 2022-06-13 20:09:30 -04:00
Liam 72abaf896f kernel: ensure class token lambda exit is unreachable 2022-06-13 20:09:00 -04:00
Liam 32ba68cf0e kernel: fix inconsistency in AutoObjectTraits macro definitions 2022-06-13 20:09:00 -04:00
Liam c1771c98f3 common: Change semantics of UNREACHABLE to unconditionally crash 2022-06-13 20:09:00 -04:00
bunnei 9cd39d1880 Merge pull request #8388 from liamwhite/simpler-pause
CpuManager: simplify pausing
2022-06-13 15:48:03 -07:00
Morph e647661b76 CMakeLists: Make variable shadowing a compile-time error
Now that the entire project is free of variable shadowing, we can enforce this as a compile time error to prevent any further introduction of this logic bug.
2022-06-13 18:19:23 -04:00
Morph 9f2fca7cde Merge pull request #8446 from liamwhite/cmd-gdb
core/debugger: support operation in yuzu-cmd
2022-06-13 14:38:37 -04:00
Morph a9fd06479a Merge pull request #8454 from liamwhite/inaddr-any
core/debugger: allow remote connections
2022-06-13 14:38:20 -04:00
bunnei 0cba34825d Merge pull request #8443 from liamwhite/code-mem
kernel: fix KCodeMemory initialization
2022-06-13 11:32:27 -07:00
Liam 2328945c5a core/debugger: allow remote connections 2022-06-12 11:50:50 -04:00
Lioncash d3d5f85f98 gdbstub_arch: Add missing virtual destructor
The class is used polymorphically, so it's undefined behavior to delete
instances of GDBStubA64 and GDBStubA32 from the base class pointer.
2022-06-11 18:23:22 -04:00
Narr the Reg 1226a99d1f service: hid: Fix gesture regression 2022-06-10 13:14:31 -05:00
Liam c14f683322 core/debugger: fix a number of shutdown deadlocks 2022-06-10 09:17:12 -04:00
Liam 524737d29b kernel: fix KCodeMemory initialization 2022-06-09 12:33:28 -04:00
Liam 5772327b39 CpuManager: simplify pausing 2022-06-08 21:47:29 -04:00
bunnei 3941e5db4d Merge pull request #8428 from bunnei/nvflinger-fix-timing
Follow-up fixes for NVFlinger rewrite (Part 3)
2022-06-08 11:20:05 -07:00
Liam fca1ce699a core/debugger: fix asio write usage 2022-06-06 23:50:56 -04:00
Liam 92f60fbce1 core/debugger: fix crash due to incorrect lambda capture 2022-06-06 23:39:48 -04:00
bunnei d436871e36 Merge pull request #8426 from liamwhite/elf
common: consolidate ELF structure definitions
2022-06-05 16:52:06 -07:00
bunnei 8ecb80f54d hle: service: nvflinger: buffer_queue_consumer: Always free released buffers. 2022-06-05 16:06:06 -07:00
Mai M b931457542 Merge pull request #8419 from liamwhite/library-list
gdbstub: add missing library list query
2022-06-05 18:23:29 -04:00
Liam 8f979d453d common: consolidate ELF structure definitions 2022-06-05 09:42:05 -04:00
bunnei b9a145a459 Merge pull request #8395 from german77/ir_stub
service: hid: Improve stub of IRS
2022-06-04 01:26:08 -07:00
Liam 67d1c62135 gdbstub: add missing library list command 2022-06-03 20:42:13 -04:00
Mai M 19114dbd3a Merge pull request #8410 from liamwhite/thread-names
gdbstub: Support reading guest thread names
2022-06-02 16:34:41 -04:00
Liam b3dce90004 core/debugger: Support reading guest thread names 2022-06-01 21:25:32 -04:00
Mai M c4d0f9d4df Merge pull request #8409 from liamwhite/tdesc-fix
gdbstub: fix target descriptions
2022-06-01 21:16:33 -04:00
Morph a08c0ca9c3 Merge pull request #8402 from liamwhite/better-step
core/debugger: Improved stepping mechanism and misc fixes
2022-06-01 20:46:10 -04:00
Liam 89993f89cf gdbstub: fix target descriptions 2022-06-01 20:31:24 -04:00
liamwhite c4ee8ced98 Merge pull request #8404 from Morph1984/virtual
core/debugger: Define defaulted virtual destructors
2022-06-01 12:30:47 -04:00
Morph e1d7a3b33a core/debugger: Define defaulted virtual destructors
Resolves an MSVC warning where a virtual destructor is not defined in the base class with virtual functions.
2022-06-01 02:28:34 -04:00
Liam da50e98e3a core/debugger: Improved stepping mechanism and misc fixes 2022-06-01 02:15:15 -04:00
Morph 0767bdd486 gdbstub: Explicitly cast return type to u8
Otherwise, the addition promotes the returned value to an int instead of keeping it as a u8.
2022-06-01 01:40:18 -04:00
Liam 2ee161a0bf core/debugger: Implement new GDB stub debugger 2022-06-01 00:01:25 -04:00
Narr the Reg 92efa9ddbb service: hid: Improve stub of IRS 2022-05-31 10:26:13 -05:00
bunnei 7f1bf5c7a7 Merge pull request #8368 from german77/seventimes
Service: hid: Several improvements and implementations
2022-05-30 10:44:36 -07:00
bunnei 9f7b9ffc9f Merge pull request #8332 from Morph1984/reduce_exec_size
general: Use smaller array types where applicable
2022-05-29 02:33:24 -07:00
bunnei e135944c4d Merge pull request #8374 from german77/asnycvibrations
input_common: Make vibration request async
2022-05-28 00:55:53 -07:00
german77 7d3544bf8d service: hid: Implement ResetIsSixAxisSensorDeviceNewlyAssigned
Needed by Nintendo Switch Sports
2022-05-27 10:22:37 -05:00
german77 b644fc33fb service: hid: Implement LoadSixAxisSensorCalibrationParameter and GetSixAxisSensorIcInformation
Needed by Nintendo Switch Sports
2022-05-27 10:22:36 -05:00
german77 0687a3b8c6 service: hid: Implement EnableSixAxisSensorUnalteredPassthrough and IsSixAxisSensorUnalteredPassthroughEnabled
Needed by Nintendo Switch Sports
2022-05-27 10:21:10 -05:00
german77 3909772840 service: hid: Add error handling to sixaxis functions 2022-05-27 10:21:10 -05:00
german77 2f5cb49476 service: hid: Refractor sixaxis functions 2022-05-27 10:21:10 -05:00
german77 7d1d9c8a6b service: hid: Implement MergeSingleJoyAsDualJoy according to RE 2022-05-27 10:21:09 -05:00
german77 2b5c5a3817 service: hid: Add error handling to setNpadAssignment and variants 2022-05-27 10:21:09 -05:00
german77 0741919697 service: hid: Quick RE fixes and comments 2022-05-27 10:21:08 -05:00
Narr the Reg 3cd7b067e0 input_common: Make vibration request async 2022-05-23 12:25:02 -05:00
german77 b6d3a7d8cf input_common: touch: Rewrite touch driver to support multiple touch points 2022-05-23 11:01:14 -05:00
Lioncash 9272114d86 general: Avoid ambiguous format_to compilation errors
Ensures that we're using the fmt version of format_to.

These are also the only three outliers. All of the other formatters we
have are properly qualified.
2022-05-14 16:48:34 -04:00
Morph be2fb77675 time_zone_manager: Use s8 for month length tables
Using this smaller type saves 512 bytes in the compiled executable.
2022-05-13 00:51:11 -04:00
german77 5740fc0f91 service: notifa: Implement most part of this service
Implements partially RegisterAlarmSetting, UpdateAlarmSetting, LoadApplicationParameter, DeleteAlarmSetting.
Needed for Fitness `Boxing 2: Rhythm & Exercise` and `Ring Fit Adventure`.
2022-05-09 10:28:04 -05:00
Narr the Reg f9315745f8 service: hid: Fix motion refresh rate 2022-05-06 11:13:49 -05:00
german77 b229605f32 service: hid: Disable correctly motion input 2022-05-06 11:13:48 -05:00
Morph dfb800c76b hle/result: Update std::expected replacement message
std::expected is included in C++23
2022-05-03 17:44:30 -04:00
Morph 67accc405f hle/result: Add ResultRange overload in ResultVal
Also marks the implicit conversion operator as constexpr instead of consteval as the constructor is not constant evaluated.
2022-05-03 17:44:30 -04:00
bunnei 08fc849458 Merge pull request #8272 from german77/stick_range
yuzu: config: Improve analog stick mapping
2022-05-03 14:36:39 -07:00
Morph 5631c95c10 hle/result: Implement ResultRange
A ResultRange defines an inclusive range of error descriptions within an error module.
This can be used to check whether the description of a given ResultCode falls within the range.
The conversion function returns a ResultCode with its description set to description_start.
2022-05-02 18:17:39 -04:00
Morph e8d4250bb7 Merge pull request #8274 from german77/firmware
service: hid: Stub IsFirmwareUpdateNeededForNotification
2022-04-29 04:08:34 -04:00
Andrea Pappacoda b2eb103829 chore: add missing SPDX tags
Follow-up to 2b87305d31
2022-04-28 18:24:11 +02:00
bunnei 2b77a9fd0c Merge pull request #8229 from german77/reinterpret2
service: hid: Access shared memory directly
2022-04-27 12:31:27 -07:00
german77 bcaf1a7bb2 service: hid: Stub IsFirmwareUpdateNeededForNotification
Used in Fitness Boxing 2: Rhythm & Exercise (0100073011382000)
2022-04-27 00:06:30 -05:00
Narr the Reg ec8fa22768 yuzu: Config allow to delete single axis directions when buttons are mapped to a stick 2022-04-26 19:03:54 -05:00
Mai M d2c22fcc96 Merge pull request #8261 from liamwhite/jit-cleanup
service: jit: document and clean up
2022-04-24 22:03:39 -04:00
Liam 1d0ae7c257 service: jit: document and clean up 2022-04-24 20:25:42 -04:00
Mai M 5e44c82cb7 Merge pull request #8260 from Morph1984/c4146
kernel: svc: Replace -1ULL with 0xFFFFFFFFFFFFFFFF
2022-04-24 18:25:00 -04:00
Morph 88052d8c09 kernel: svc: Replace -1ULL with 0xFFFFFFFFFFFFFFFF
Resolves the C4146 compiler warning on MSVC.
2022-04-24 17:40:47 -04:00
Merry 71b0b6274e Remove unused PrepareReschedule function 2022-04-24 12:10:16 +01:00
Narr the Reg db349d78c3 service: hid: Ensure all structs are initialized 2022-04-23 17:11:43 -05:00
Narr the Reg 879f936920 service: hid: Access shared memory directly 2022-04-23 15:41:42 -05:00
Morph 2b87305d31 general: Convert source file copyright comments over to SPDX
This formats all copyright comments according to SPDX formatting guidelines.
Additionally, this resolves the remaining GPLv2 only licensed files by relicensing them to GPLv2.0-or-later.
2022-04-23 05:55:32 -04:00
bunnei 401095f021 Merge pull request #7976 from BytesGalore/master
loader: log the type of mismatching file-extension
2022-04-22 23:55:07 -07:00
bunnei c0f328e7d4 Merge pull request #8222 from german77/sixaxis_test
service: hid: Improve accuracy of sixaxis functions
2022-04-21 21:25:47 -07:00
Liam 80afee83ba core/arm: separate backtrace collection 2022-04-20 21:39:42 -04:00
Narr the Reg d64fe5a63a service: hid: Improve accuracy of sixaxis functions 2022-04-18 15:02:47 -05:00
Fernando S dbb137d0a0 Merge pull request #6558 from german77/ringcon2
hidbus: Implement hidbus and ringcon
2022-04-16 15:51:14 +02:00
bunnei cc53f4b48d Merge pull request #8188 from merryhime/jit-race-page-table-changed
dynarmic: Fix race when switching page tables
2022-04-16 00:24:53 -07:00
german77 25c46f82c5 yuzu: Add custom ringcon configuration 2022-04-16 00:49:26 -05:00
german77 0a05a333e2 hidbus: Implement hidbus and ringcon 2022-04-16 00:49:21 -05:00
Fernando S 4e0c4e9929 Merge pull request #8172 from bunnei/kernel-mutex
hle: kernel: Use std::mutex instead of spin locks for most kernel locking.
2022-04-16 00:05:04 +02:00
Fernando S 1491acfc53 Merge pull request #8202 from merryhime/fix-single-core
dynarmic: Fix single core mode
2022-04-13 23:21:11 +02:00
merry 0b947e0341 dynarmic: Fix single core mode
Regression introduced in ac87509300. Closes #8201.
2022-04-13 20:40:12 +01:00
Liam 751903c633 service: jit: Implement the JIT service 2022-04-13 08:41:27 -04:00
bunnei cd12d87e5b Merge pull request #8165 from bunnei/ensure-session-port-cleanup
Kernel: Track open references to KServerPort and KServerSession.
2022-04-12 14:01:40 -07:00
bunnei 4d4a17ef6f Merge pull request #8178 from tech-ticks/skyline-icache-fix
hle: kernel: Invalidate entire icache in UnmapProcessMemory and UnmapCodeMemory (fixes #8174)
2022-04-12 11:23:20 -07:00
bunnei 03f8a16869 core: hle: kernel: k_thread: Rework dummy thread waiting. 2022-04-11 21:15:38 -07:00
bunnei 74c36ad85f core: hle: service: Allocate a service thread. 2022-04-11 21:13:40 -07:00
bunnei 13b1ee7679 hle: kernel: k_spin_lock: Remove unused ThreadPause. 2022-04-11 21:13:40 -07:00
bunnei e1b3368c18 hle: kernel: Use std::mutex instead of spin locks for most kernel locking. 2022-04-11 21:13:40 -07:00
bunnei 203b812a83 Merge pull request #8157 from lat9nq/kernel-races
kernel: Fix some data races
2022-04-11 21:13:01 -07:00
Jan Beich a17a828115 service: sfdnsres: add missing includes for some BSDs after 5becdcea0b
src/core/hle/service/sockets/sfdnsres.cpp: In function 'Service::Sockets::NetDbError Service::Sockets::AddrInfoErrorToNetDbError(s32)':
src/core/hle/service/sockets/sfdnsres.cpp:66:10: error: 'EAI_NODATA' was not declared in this scope; did you mean 'EAI_NONAME'?
   66 |     case EAI_NODATA:
      |          ^~~~~~~~~~
      |          EAI_NONAME
src/core/hle/service/sockets/sfdnsres.cpp: In function 'std::vector<unsigned char> Service::Sockets::SerializeAddrInfo(const addrinfo*, s32, std::string_view)':
src/core/hle/service/sockets/sfdnsres.cpp:127:53: error: 'sockaddr_in' does not name a type; did you mean 'SockAddrIn'?
  127 |                 const auto addr = *reinterpret_cast<sockaddr_in*>(current->ai_addr);
      |                                                     ^~~~~~~~~~~
      |                                                     SockAddrIn
src/core/hle/service/sockets/sfdnsres.cpp:127:64: error: expected '>' before '*' token
  127 |                 const auto addr = *reinterpret_cast<sockaddr_in*>(current->ai_addr);
      |                                                                ^
src/core/hle/service/sockets/sfdnsres.cpp:127:64: error: expected '(' before '*' token
  127 |                 const auto addr = *reinterpret_cast<sockaddr_in*>(current->ai_addr);
      |                                                                ^
      |                                                                (
src/core/hle/service/sockets/sfdnsres.cpp:127:65: error: expected primary-expression before '>' token
  127 |                 const auto addr = *reinterpret_cast<sockaddr_in*>(current->ai_addr);
      |                                                                 ^
src/core/hle/service/sockets/sfdnsres.cpp:127:84: error: expected ')' before ';' token
  127 |                 const auto addr = *reinterpret_cast<sockaddr_in*>(current->ai_addr);
      |                                                                                    ^
      |                                                                                    )
src/core/hle/service/sockets/sfdnsres.cpp:148:53: error: 'sockaddr_in6' does not name a type; did you mean 'SockAddrIn6'?
  148 |                 const auto addr = *reinterpret_cast<sockaddr_in6*>(current->ai_addr);
      |                                                     ^~~~~~~~~~~~
      |                                                     SockAddrIn6
src/core/hle/service/sockets/sfdnsres.cpp:148:65: error: expected '>' before '*' token
  148 |                 const auto addr = *reinterpret_cast<sockaddr_in6*>(current->ai_addr);
      |                                                                 ^
src/core/hle/service/sockets/sfdnsres.cpp:148:65: error: expected '(' before '*' token
  148 |                 const auto addr = *reinterpret_cast<sockaddr_in6*>(current->ai_addr);
      |                                                                 ^
      |                                                                 (
src/core/hle/service/sockets/sfdnsres.cpp:148:66: error: expected primary-expression before '>' token
  148 |                 const auto addr = *reinterpret_cast<sockaddr_in6*>(current->ai_addr);
      |                                                                  ^
src/core/hle/service/sockets/sfdnsres.cpp:148:85: error: expected ')' before ';' token
  148 |                 const auto addr = *reinterpret_cast<sockaddr_in6*>(current->ai_addr);
      |                                                                                     ^
      |                                                                                     )
2022-04-11 22:26:37 +00:00
Fernando S e4e9181566 Merge pull request #8180 from liamwhite/symbols
core: extract symbol reading
2022-04-11 18:40:34 +02:00
Fernando S 5c7b2870ce Merge pull request #8171 from tech-ticks/skyline-improvements
Improvements for game modding with Skyline, DNS resolution
2022-04-10 23:40:54 +02:00
merry 396a1dc9b0 dynarmic: Fix race when switching page tables 2022-04-10 15:46:29 +01:00
tech-ticks 53f7a78e9e hle: kernel: Invalidate entire icache in UnmapProcessMemory and UnmapCodeMemory (fixes #8174) 2022-04-09 13:29:19 +02:00
Liam 28fb3e8240 core: extract symbol reading 2022-04-09 02:16:34 -04:00
bunnei 2588188273 Merge pull request #8138 from german77/data-no-race
core: hid: Reduce the amount of data races
2022-04-08 14:14:53 -07:00
bunnei 11febb02d6 hle: kernel: Unify and integrate reference tracking for KServerPort/KServerSession.
- These are not managed elsewhere, and need to be tracked and closed on emulation shutdown.
2022-04-08 14:13:22 -07:00
bunnei 5a3c38e133 hle: kernel: k_server_port: Release ref-counted host emulation members on Destroy. 2022-04-08 14:11:40 -07:00
bunnei 45da07576f hle: kernel: k_auto_object: Move unregister with kernel to after Destroy.
- Destructor is no longer invoked, so our object counting was off.
2022-04-08 14:11:40 -07:00
bunnei 2ffc21449d hle: service: sm: Remove manual tracking of KServerPorts. 2022-04-08 14:11:39 -07:00
bunnei 2878df391c hle: kernel: hle_ipc: HasSessionRequestHandler: Check if domain handler is expired rather than locking. 2022-04-08 14:11:39 -07:00
bunnei 27e7b14429 Merge pull request #8169 from merryhime/scoped_lock
Replace lock_guard with scoped_lock
2022-04-08 14:01:42 -07:00
tech-ticks 5becdcea0b service: sfdnsres: Implement DNS address resolution 2022-04-08 21:28:03 +02:00
Narr the Reg b12a44a5ea core: hid: Fix double lock on softlock and forced updates 2022-04-07 17:08:01 -05:00
merry 7fcb711b4e Merge pull request #8167 from Tachi107/patch-1
fix: remove #pragma once in .cpp file
2022-04-07 22:47:43 +01:00
tech-ticks cdc7fc731d service: bsd: Add keepalive socket option 2022-04-07 23:30:23 +02:00
tech-ticks de955ddc9d patch_manager: Apply layered exefs patches from 'atmosphere' SD directory 2022-04-07 23:02:44 +02:00
Narr the Reg c5b3ff2238 core: hid: Replace lock_guard with scoped_lock 2022-04-07 13:52:51 -05:00
Merry 9144a342ca core/hle: Standardize scoped_lock initializers 2022-04-07 19:44:07 +01:00
Merry 2ee92efb8e core: Replace lock_guard with scoped_lock 2022-04-07 19:44:07 +01:00
Merry de61c0897c core/hle: Replace lock_guard with scoped_lock 2022-04-07 19:44:07 +01:00
german77 48ac3b1b60 core: hid: Reduce the amount of dataraces 2022-04-07 13:18:03 -05:00
Fernando S 0bb26a7794 Merge pull request #8148 from merryhime/interrupts
dynarmic: Better interrupts
2022-04-07 16:21:41 +02:00
Andrea Pappacoda 4d8afbf2eb fix: remove #pragma once in .cpp file 2022-04-07 12:03:47 +02:00
bunnei 2e67caa7ec Merge pull request #8164 from liamwhite/jit-stub
service: jit: stub JIT service
2022-04-06 18:34:45 -07:00
Liam d414904aef service: jit: stub JIT service 2022-04-06 20:07:01 -04:00
bunnei 078e0f7cba Merge pull request #8122 from bunnei/improve-thread-usage
Improve usage of service host threads
2022-04-06 12:25:25 -07:00
german77 d6493d42fd service: hid: Partially revert #8123 2022-04-05 22:35:38 -05:00
bunnei b3e6670709 Merge pull request #8137 from bunnei/improve-nvflinger-2
Follow-up fixes for NVFlinger rewrite (Part 2)
2022-04-05 19:11:28 -07:00
bunnei 4e3136128e Merge pull request #8100 from Morph1984/registered-crash
registered_cache: Prevent nullptr dereference when accumulating files
2022-04-05 18:18:41 -07:00
lat9nq b64f4230b3 k_system_control: Fix data race
`return distribution(gen)` is a data race between a read and a write in
two threads, reported by TSan. Remove static random number generators so
they aren't using the same generator.
2022-04-05 19:55:56 -04:00
merry 8bcfa4046f dynarmic: Print stack trace on unrecognised instruction or other exception 2022-04-05 20:40:20 +01:00
bunnei 18017f7adf Merge pull request #8089 from merryhime/paranoia
configuration: Add Paranoid CPU accuracy level
2022-04-04 11:07:38 -07:00
lat9nq bda62c0837 k_auto_object: Fix data race
Change the memory order to acqure-release when we decrement the
reference count. Prevents a race with line 89 reported by TSan.
2022-04-03 21:47:58 -04:00
lat9nq 831f022536 k_thread: Fix data race
TSan reports a data race between writing at cpp:1162 and reading at
h:262. Make the thread_state atomic to prevent this.
2022-04-03 21:47:58 -04:00
lat9nq 0f347eaf52 k_process: Fix data race
TSan reported a race between thread 36 and thread 34, a read at :225 and
a write at :225 respectively. Make total_proces_running_time_ticks
atomic to avoid this race.
2022-04-03 21:47:57 -04:00
lat9nq 53d3082dd4 kernel: Fix current_process race
TSan reported a race at :258 and :803, so make current_process an atomic
pointer.
2022-04-03 21:47:57 -04:00
lat9nq 039ce14442 k_scheduler_lock: Fix data race
TSan reports a race between the main thread and T37 during
IsLockedByCurrentThread and when it's set at the end of Lock(),
respectively. Set owner_thread to an atomic pointer to fix it.

Co-authored-by: bunnei <bunneidev@gmail.com>
2022-04-03 21:47:57 -04:00
merry ac87509300 arm_dynarmic: Use HaltReason for svc calls and reschedules 2022-04-03 18:20:11 +01:00
merry f54345590b dynarmic: Better interrupts 2022-04-03 16:39:48 +01:00
bunnei f35176e94b Merge pull request #8135 from Morph1984/websession-hack
applets/web: Keep foreground (websession) web applet open
2022-04-02 20:49:51 -07:00
bunnei 3a540a5f8a Merge pull request #8123 from german77/bombslinger
service: hid: Remove inaccurate behavior on initialization
2022-04-02 20:12:45 -07:00
german77 c4bf041235 service: npad: Default initialize shared memory 2022-04-02 19:43:49 -06:00
Andrea Pappacoda d9044f00e1 fix: typos 2022-04-02 16:34:07 +02:00
bunnei a00e1de7ce hle: service: nvflinger: buffer_queue_producer: Cleanup & fixes. 2022-04-01 22:59:35 -07:00
bunnei 7054ba2ed8 hle: service: nvflinger: consumer_base: Cleanup & fixes. 2022-04-01 22:58:40 -07:00
bunnei 2123fc0a50 hle: service: nvflinger: buffer_queue_producer: Cleanup & add GetReleasedBuffers. 2022-04-01 22:58:02 -07:00
bunnei 63094fb176 hle: service: nvflinger: buffer_queue_core: Cleanup & fixes. 2022-04-01 22:56:32 -07:00
bunnei ad78e63274 hle: service: nvflinger: Use correct logger namespace. 2022-04-01 22:55:44 -07:00
Morph d2b4f8f974 hle: service: nvdrv: Create a service thread where appropriate. 2022-04-02 01:24:30 -04:00
bunnei b3f4b41cc1 hle: service: vi: Create a service thread where appropriate. 2022-04-02 01:24:30 -04:00
bunnei f432c730cb hle: service: bsd: Create a service thread where appropriate. 2022-04-02 01:24:30 -04:00
bunnei 4a99bcfb95 hle: service: filesystem: Create a service thread where appropriate. 2022-04-02 01:24:30 -04:00
bunnei c91b912a07 hle: service: audio: Create a service thread where appropriate. 2022-04-02 01:24:30 -04:00
bunnei 75e39568a0 hle: service: Add option for service interfaces to create or use the default thread. 2022-04-02 01:24:30 -04:00
bunnei 60f2fe3b48 hle: kernel: Create a default thread for services that do not need their own host thread. 2022-04-02 01:24:30 -04:00
Morph 4a960b6945 applets/web: Keep foreground (websession) web applet open
This is a hack to keep the foreground (websession) web applet open in games using these such as Super Mario 3D All-Stars.
2022-04-01 22:50:01 -04:00
Fernando S c5beddca49 Merge pull request #8116 from ameerj/nvhost_ctrl_bad_param
nvhost_ctrl: Only mark EventState::Busy as BadParameter
2022-04-01 01:29:46 +02:00
german77 a2cc3b6098 service: hid: Remove inaccurate behavior on initialization 2022-03-31 12:35:57 -06:00
bunnei 245ba64d08 Merge pull request #8120 from german77/signal
service: hid: Signal event on AcquireNpadStyleSetUpdateEventHandle
2022-03-30 22:45:40 -07:00
bunnei 2fb74be647 Merge pull request #8090 from bunnei/fix-skyline
Kernel Memory Updates (Part 7): Various fixes to code memory (Skyline support)
2022-03-30 18:23:37 -07:00
Narr the Reg 0b8c1af0ed service: hid: Signal event on AcquireNpadStyleSetUpdateEventHandle 2022-03-30 17:09:28 -06:00
ameerj 2a58f15111 nvhost_ctrl: Only mark EventState::Busy as BadParameter
Fixes an svc break in Kirby and the Forgotten Land with async GPU enabled.
2022-03-29 15:13:30 -04:00
Morph e144d064af registered_cache: Prevent nullptr dereference when accumulating files
For whatever reason, nca_file/dir can be nullptr in the list of files/dirs. I have not determined the cause of this yet, so add a nullptr check for these prior to dereferencing them.
2022-03-27 17:06:27 -04:00
merry 5a37246da6 arm_dynarmic_64: Invalidate on all cores 2022-03-27 15:37:19 +01:00
Fernando S 64222c5f34 Merge pull request #8088 from bunnei/fixup-nvflinger
Follow-up fixes for NVFlinger rewrite
2022-03-27 13:09:59 +02:00
bunnei b149526098 Revert "Memory GPU <-> CPU: reduce infighting in the texture cache by adding CPU Cached memory." 2022-03-26 12:38:30 -07:00
bunnei 533ff8b1a9 hle: kernel: k_page_table: Fix implementations of LockForCodeMemory & UnlockForCodeMemory. 2022-03-26 01:49:34 -07:00
bunnei 003d5761e1 hle: kernel: k_page_table: Implement LockMemoryAndOpen & UnlockMemory. 2022-03-26 01:46:41 -07:00
merry e752529c4c configuration: Add Paranoid CPU accuracy level
Disables most optimizations for the paranoid.
2022-03-26 08:46:25 +00:00
bunnei 3beb4d4273 hle: kernel: svc: MapProcessMemory: Fix usage of KPageLinkedList to use physical address space. 2022-03-26 01:35:37 -07:00
bunnei f84511eb4f hle: kernel: svc: CreateCodeMemory: Remove log of 'out' host pointer.
- This does not seem terribly useful and is inconsistent with other usage.
2022-03-26 01:34:29 -07:00
bunnei 7e6a6bb505 hle: kernel: k_code_memory: Fix usage of KPageLinkedList to use physical address space. 2022-03-26 01:33:16 -07:00
bunnei 506961d8cc hle: kernel: k_page_table: Implement MakeAndOpenPageGroup & MakePageGroup. 2022-03-26 01:25:52 -07:00
bunnei 416944c501 hle: kernel: k_page_table: Add IsHeapPhysicalAddress method. 2022-03-26 01:23:43 -07:00
bunnei f5415480de hle: kernel: k_page_linked_list: Add Empty method. 2022-03-26 01:02:42 -07:00
bunnei 58a4c17e98 hle: kernel: svc: UnmapProcessCodeMemory: Fix inverted alignment check. 2022-03-26 01:01:55 -07:00
bunnei 94f381d789 Merge pull request #8041 from Morph1984/inline-swkbd
applets/swkbd: Add support for an updated inline software keyboard
2022-03-25 23:19:11 -07:00
bunnei 25e4089d54 hle: service: nvflinger: buffer_queue: Remove AutoLock and fix free buffer tracking. 2022-03-25 23:01:03 -07:00
bunnei 8da842dd90 hle: service: nvflinger: buffer_queue_consumer: Use scoped_lock instead of unique_lock. 2022-03-25 22:59:06 -07:00
bunnei a2ad35b9ec hle: service: nvflinger: consumer_base: Use scoped_lock instead of unique_lock. 2022-03-25 22:58:52 -07:00
bunnei a841fd8034 hle: service: nvflinger: Remove unused BufferQueue. 2022-03-25 22:58:23 -07:00
Fernando Sahmkow 6e2cfc4310 Memory: Don't protect reads on Normal accuracy. 2022-03-25 04:24:25 +01:00
bunnei f6bcf6c7e2 hle: nvflinger: ConsumerBase: Mark ctor as explicit. 2022-03-24 18:13:34 -07:00
bunnei fa9f75819a hle: vi: NativeWindow: Fix trivially copyable issues. 2022-03-24 18:13:34 -07:00
bunnei 4fce11872d hle: nvdrv: nvdata: buffer_queue_producer: Minor cleanup. 2022-03-24 18:13:34 -07:00
bunnei f496aa102d hle: nvdrv: nvdata: Cleanup NvFence static assert. 2022-03-24 18:13:34 -07:00
bunnei 1299876ebe hle: nvflinger: Remove unused unordered_map include. 2022-03-24 18:13:34 -07:00
bunnei 21d554f464 hle: nvflinger: buffer_queue_consumer: AcquireBuffer: Fix typo. 2022-03-24 18:13:34 -07:00
bunnei 0b6b398bd4 hle: nvflinger: Merge Rect with Common::Rectangle. 2022-03-24 18:13:33 -07:00
bunnei ea2045efdf hle: nvflinger: buffer_queue_core: Declare default dtor. 2022-03-24 18:13:33 -07:00
bunnei 2d84848c24 hle: nvflinger: buffer_queue_producer: DequeueBuffer: Remove unnecessary lock. 2022-03-24 18:13:33 -07:00
bunnei 6828db705e hle: nvflinger: consumer_base: StillTracking: Should be const. 2022-03-24 18:13:33 -07:00
bunnei e7304f6bd2 hle: nvflinger: graphic_buffer_producer: Remove unnecessary pragma pack. 2022-03-24 18:13:33 -07:00
bunnei a08c906878 hle: nvflinger: parcel: Reserve token size. 2022-03-24 18:13:33 -07:00
bunnei e941573bb7 hle: nvflinger: buffer_queue_core: StillTracking: Take const reference. 2022-03-24 18:13:33 -07:00
bunnei 411a53eaf3 hle: nvflinger: buffer_queue_core: Cleanup locking. 2022-03-24 18:13:33 -07:00
bunnei d89257ddea hle: nvflinger: Use std::chrono for present_ns. 2022-03-24 18:13:33 -07:00
bunnei 1f6dcd3784 hle: nvflinger: Migrate android namespace -> Service::android. 2022-03-24 18:13:33 -07:00
bunnei a7f407ab22 hle: nvflinger: BufferQueueProducer: Handle SetPreallocatedBuffer with empty buffer.
- Used by Naruto Ultimate Ninja Storm.
2022-03-24 18:13:33 -07:00
bunnei f1a91e0397 hle: vi: Integrate new NVFlinger and HosBinderDriverServer service. 2022-03-24 18:13:33 -07:00
bunnei 13c1932008 hle: nvflinger: Add implementation for HosBinderDriverServer service. 2022-03-24 18:13:33 -07:00
bunnei 072445a74f hle: nvflinger: Add implementation for BufferQueueProducer class. 2022-03-24 18:13:33 -07:00
bunnei 12304ee7b6 hle: nvflinger: Add implementation for BufferQueueCore class. 2022-03-24 18:13:33 -07:00
bunnei 3693b78a28 hle: nvflinger: Add implementation for BufferQueueConsumer class. 2022-03-24 18:13:32 -07:00
bunnei 398f63e321 hle: nvflinger: Add implementation for QueueBufferInput and QueueBufferOutput structs. 2022-03-24 18:13:32 -07:00
bunnei 0de0899357 hle: nvflinger: Add implementation for BufferItemConsumer class. 2022-03-24 18:13:32 -07:00
bunnei 1955deb602 hle: nvflinger: Add implementation for ConsumerBase class. 2022-03-24 18:13:32 -07:00
bunnei e5f998f631 hle: nvflinger: Add implementation for BufferSlot class. 2022-03-24 18:13:32 -07:00
bunnei a5f9fbabfd hle: nvflinger: Add implementation for BufferItem class. 2022-03-24 18:13:32 -07:00
bunnei c1eed4083a hle: nvflinger: Move implementation for Parcel to its own header. 2022-03-24 18:13:32 -07:00
bunnei 466b74b507 hle: nvflinger: Add android buffer queue definitions to its own header. 2022-03-24 18:13:32 -07:00
bunnei 2112b078a2 hle: nvflinger: Add IBinder interface. 2022-03-24 18:13:32 -07:00
bunnei 753377ebe8 hle: nvflinger: Add IConsumerListener interface. 2022-03-24 18:13:32 -07:00
bunnei 3fdb53d4d5 hle: nvflinger: Add ProducerListener interface. 2022-03-24 18:13:32 -07:00
bunnei 36937d8f31 hle: nvflinger: Add android window enumerations to its own header. 2022-03-24 18:13:32 -07:00
bunnei 6ec03eded9 hle: nvflinger: Add android Status flags to its own header. 2022-03-24 18:13:32 -07:00
bunnei 476f456d2f hle: nvflinger: Move BufferTransformFlags to its own header. 2022-03-24 18:13:32 -07:00
bunnei a8ff414423 hle: nvdrv: Rename Fence to NvFence to avoid naming conflicts. 2022-03-24 18:13:32 -07:00
bunnei 3396730b85 hle: nvflinger: Move PixelFormat to its own header. 2022-03-24 18:13:32 -07:00
bunnei 7c04c18560 hle: nvflinger: Add implementation for GraphicBuffer class. 2022-03-24 18:13:32 -07:00
bunnei d5d04d5684 hle: nvflinger: Add implementation for Fence class. 2022-03-24 18:13:32 -07:00
bunnei fbd0e594ba hle: nvflinger: Add implementation for Rect class. 2022-03-24 18:13:32 -07:00
bunnei 853746deb2 Merge pull request #8031 from Morph1984/cleanup-mii-please
applets: Cleanup MiiEdit applet implementation
2022-03-22 21:56:42 -07:00
bunnei 89a97915a8 Revert "dynarmic: Reduce size of code caches" 2022-03-22 18:32:54 -07:00
Morph f7d582a655 applets/swkbd: Split software keyboard initialization
Since the CalcArg struct has been updated with a new size and fields, we have to split the initialization of the keyboard into multiple functions.
This also adds support for parsing the new CalcArg struct used by updated versions of Monster Hunter Rise.
2022-03-21 23:58:50 -04:00
Morph 07954ef117 applets/swkbd: Add new inline software keyboard types
These were added in newer firmware versions.
2022-03-21 23:58:50 -04:00
Morph 3b6c02f774 applets/mii: Remove unused include 2022-03-21 23:57:31 -04:00
Morph 94be8a907d applets/mii: Remove frontend parameters
These are unused for now as we do not support a frontend implementation.
2022-03-21 23:57:31 -04:00
Morph 67bdfcb7ff applets/mii: Cleanup MiiEdit applet implementation
This also enables proper support for MiiEdit applets which are used in games with firmware versions prior to 10.2.0 by handling the 2 different versions of applet inputs and outputs.
2022-03-21 23:57:31 -04:00
Morph d91788fe38 applets/mii: Cleanup MiiEdit applet types 2022-03-21 23:57:31 -04:00
Morph 061eceaf0d applets/mii: Move MiiEdit applet types into its own file 2022-03-21 23:57:31 -04:00
Morph 6e2ff19bc7 service: Move mii enums and structs into its own file
Moves these into types.h, since other files also make use of these types.
2022-03-21 23:57:31 -04:00
Morph a8663c9f5c applets: Rename Mii to MiiEdit 2022-03-21 23:57:31 -04:00
bunnei c9ffc287bf Merge pull request #8048 from ameerj/include-purge
general: Reduce unused includes across the project
2022-03-21 18:03:54 -07:00
ameerj f9709bb9e9 general: Fix clang/gcc build errors 2022-03-20 02:25:09 -04:00
bunnei 15dca3345c Merge pull request #8040 from Morph1984/handle-table
KHandleTable: Optimize table entry layout
2022-03-19 23:17:37 -07:00
ameerj e70b4f3fc5 common: Reduce unused includes 2022-03-19 15:01:31 -04:00
ameerj 22e01068e1 core: Reduce unused includes 2022-03-19 02:23:32 -04:00
bunnei 4fb93cbb3f Merge pull request #8028 from v1993/patch-9
bsd: Allow inexact match for address length in AcceptImpl
2022-03-18 18:06:13 -07:00
ameerj 1967757627 general: Reduce core.h includes 2022-03-18 02:13:02 -04:00
Morph c2a970b67d KHandleTable: Optimize table entry layout
Since the handle type is not being used, we can reduce the amount of space each entry takes up by 4 bytes.
2022-03-18 00:28:25 -04:00
bunnei fdac72a864 Merge pull request #7964 from german77/miiii
applet: mii: Simple implementation of mii applet
2022-03-16 21:37:53 -07:00
Valeri bbf69903e9 bsd: Allow inexact match for address length in AcceptImpl
Minecraft passes in zero for length, but this should account for all possible cases
2022-03-15 14:06:34 +03:00
bunnei 1494a66aa3 core: hle: kernel: init_slab_setup: Move CalculateSlabHeapGapSize to global namespace. 2022-03-14 18:14:54 -07:00
bunnei 8b109f8a69 core: hle: kernel: Allocate dummy threads on host thread storage.
- Fixes a crash where on subsequent boots, long-lived host threads would have their dummy threads freed.
2022-03-14 18:14:54 -07:00
bunnei 18baef2ec9 core: hle: kernel: Downgrade dangling objects warning to debug.
- It is not impossible to leak kernel objects, so this is not really any issue anymore (albeit, still interesting).
2022-03-14 18:14:54 -07:00
bunnei 58b39c8ad8 core: hle: kernel: Make object list container global and ensure it is reset on each emulation session. 2022-03-14 18:14:54 -07:00
bunnei 29924a999e core: hle: kernel: Remove server session tracking.
- These are now allocated/managed by emulated memory, so we do not need to track and free them on shutdown.
2022-03-14 18:14:54 -07:00
bunnei b7535cd853 core: hle: kernel: k_process: Remove handle table finalize, reset page table. 2022-03-14 18:14:54 -07:00
bunnei 2b881f4ccc core: hle: kernel: k_process: Implement thread local storage accurately. 2022-03-14 18:14:54 -07:00
bunnei c8dba7c578 core: hle: kernel: k_page_table: Add implementations of MapPages, UnmapPages, and FindFreeArea for TLS. 2022-03-14 18:14:54 -07:00
bunnei cb294300ea core: hle: kernel: k_slab_heap: Refresh to use guest allocations. 2022-03-14 18:14:54 -07:00
bunnei 4b022badf0 core: hle: kernel: Update init_slab_heap, use device memory, and add KThreadLocalPage and KPageBuffer.
- Refreshes our slab initialization code to latest known behavior.
- Moves all guest kernel slabs into emulated device memory.
- Adds KThreadLocalPage and KPageBuffer, which we will use for accurate TLS management.
2022-03-14 18:14:54 -07:00
bunnei 8e8d8724a2 core: hle: kernel: k_page_buffer: Add KThreadLocalPage primitive. 2022-03-14 18:14:53 -07:00
bunnei f92568936a core: hle: kernel: k_page_buffer: Add KPageBuffer primitive. 2022-03-14 18:14:53 -07:00
bunnei 84ced13966 core: hle: kernel: k_thread: Ensure host Fiber is freed. 2022-03-14 18:14:53 -07:00
bunnei 4aa9e8543d core: hle: kernel: k_server_session: Ensure SessionRequestManager is freed. 2022-03-14 18:14:53 -07:00
bunnei dfbf03438f core: hle: service: kernel_helpers: Use system resource limit. 2022-03-14 18:14:53 -07:00
bunnei c0a2ae3186 core: hle: service: sm: Fix KPort reference count. 2022-03-14 18:14:53 -07:00
bunnei c5516b1800 core: hle: kernel: k_thread: Update to reflect tree changes. 2022-03-14 18:14:53 -07:00
bunnei 8421193857 core: hle: kernel: Use weak_ptr where possible for SessionRequestHandler and SessionRequestManager. 2022-03-14 18:14:53 -07:00
bunnei cbf7c2eb40 core: hle: kernel: k_memory_layout: Update kernel slab memory sizes. 2022-03-14 18:14:53 -07:00
bunnei 33c5eca64c core: hle: kernel: svc_types: Add ThreadLocalRegionSize. 2022-03-14 18:14:53 -07:00
bunnei bb2c956cf9 core: hle: kernel: k_condition_variable: Update to reflect tree changes. 2022-03-14 18:14:53 -07:00
bunnei 075ae485b1 core: hle: kernel: k_address_arbiter: Update to reflect tree changes. 2022-03-14 18:14:53 -07:00
Merry eb30b2382a dynarmic: Reduce size of code caches 2022-03-13 22:17:14 +00:00
bunnei 86eaedbf19 hle: service: ldr: Use deterministic addresses when mapping NROs.
- Instead of randomization, choose in-order addresses for where to map NROs into memory.
- This results in predictable behavior when debugging and consistent behavior when reproducing issues.
2022-03-08 17:38:20 -08:00
bunnei d1aae938a9 Merge pull request #7986 from lat9nq/vk-callback
core, video_core: Fix two crashes when failing to create the emulated GPU instance
2022-03-08 12:36:57 -08:00
bunnei 9dd48f8f89 hle: kernel: KPageTable: Improve implementations of MapCodeMemory and UnmapCodeMemory.
- This makes these functions more accurate to the real HOS implementations.
- Fixes memory access issues in Super Smash Bros. Ultimate that occur when un/mapping NROs.
2022-03-07 17:18:20 -08:00
lat9nq e3f8340bec emu_window: Create a way to Cancel the exit of a Scoped
If a GraphicsContext is destroyed before its Scoped is destroyed, this
causes a crash as the Scoped tries to call a method in the destroyed
context on exit.

Add a way to Cancel the call when we know that calling the
GraphicsContext will not work.
2022-03-07 18:21:56 -05:00
lat9nq 7df809b8b1 core: Don't shutdown a null GPU
When CreateGPU fails, yuzu would try and shutdown the GPU instance
regardless of whether any instance was actually created.

Check for nullptr before calling its methods to prevent a crash.
2022-03-07 15:25:20 -05:00
BytesGalore 8f530cbb09 loader: log the type of mismatching file-extension 2022-03-03 06:45:13 +01:00
bunnei ae301a650e Merge pull request #7956 from bunnei/improve-mem-manager
Kernel Memory Updates (Part 4): Revamp KMemoryManager & other fixes
2022-03-02 17:55:51 -08:00
german77 9188dfafc4 applet: mii: Simple implementation of mii applet 2022-02-28 18:53:41 -06:00
bunnei 82ca8230ad hle: kernel: Re-create memory layout at initialization.
- As this can only be derived once.
2022-02-27 18:00:09 -08:00
bunnei 41c9c93736 hle: kernel: Remove unused pool locals. 2022-02-27 18:00:09 -08:00
bunnei 939707cf75 hle: kernel: k_memory_manager: Rework for latest kernel behavior.
- Updates the KMemoryManager implementation against latest documentation.
- Reworks KMemoryLayout to be accessed throughout the kernel.
- Fixes an issue with pool sizes being incorrectly reported.
2022-02-27 18:00:09 -08:00
merry 3fe2c2d40d dynarmic: Inline exclusive memory accesses
Inlines implementation of exclusive instructions into JITted code,
improving performance of applications relying heavily on these
instructions.

We also fastmem these instructions for additional speed, with
support for appropriate recompilation on fastmem failure.

An unsafe optimization to disable the intercore global_monitor is also
provided, should one wish to rely solely on cmpxchg semantics for
safety.

See also: merryhime/dynarmic#664
2022-02-27 19:40:05 +00:00
bunnei d780096c3c hle: kernel: k_page_heap: GetPhysicalAddr can be const. 2022-02-27 10:34:02 -08:00
bunnei 00d395c330 hle: kernel: k_page_heap: Remove superfluous consexpr. 2022-02-27 10:34:02 -08:00
bunnei 3f129b2700 hle: kernel: k_page_heap: Various updates and improvements.
- KPageHeap tracks physical addresses, not virtual addresses.
- Various updates and improvements to match latest documentation for this type.
2022-02-27 10:34:02 -08:00
bunnei 8ef7b10f92 hle: kernel: Add initial_process.h header. 2022-02-27 10:34:02 -08:00
bunnei 75b111b6de hle: kernel: board: nx: Add k_memory_layout.h header. 2022-02-27 10:34:02 -08:00
bunnei 99acfba11f hle: kernel: k_system_control: Add GetRealMemorySize and update GetKernelPhysicalBaseAddress. 2022-02-27 10:34:02 -08:00
bunnei f562f3780e hle: kernel: k_memory_layout: Add GetPhysicalLinearRegion. 2022-02-27 10:34:02 -08:00
bunnei a48d756692 hle: kernel: k_memory_region_types: Update for new regions. 2022-02-27 10:34:02 -08:00
bunnei 2bbcc3d1c4 Merge pull request #7932 from bunnei/extended-mem-layout
Add extended memory layout (6GB) support and improve KResourceLimit management
2022-02-26 01:41:08 -08:00
Narr the Reg 273b9b5772 service: am: Update enum names to match documentation 2022-02-21 18:00:50 -06:00
bunnei d3198bb960 hle: kernel: KSystemControl: Use 6GB memory layout when "use_extended_memory_layout" setting is enabled.
- This uses a larger 6GB DRAM memory layout, which is useful for some mods that require more memory.
2022-02-21 13:07:19 -08:00
bunnei b928936457 core: device_memory: Use memory size reported by KSystemControl.
- That way, we can consolidate the memory layout to one place.
2022-02-21 13:07:19 -08:00
bunnei f2cc07cc2c core: hle: kernel: Remove resource limit hack for PhysicalMemory.
- With prior changes, we now report the correct amount of physical memory available to the emulated process.
2022-02-21 12:41:31 -08:00
bunnei 09adf10025 core: hle: kernel: KProcess: Pass in KResourceLimit on process creation.
- This allows us to have a resource limit per process, rather than use the global system resource limit.
2022-02-21 12:41:31 -08:00
bunnei 64ae76bff6 core: hle: kernel: KEvent: Pass in owner KProcess on event creation.
- This is necessary to ensure resource limits are freed from the right process.
2022-02-21 12:41:06 -08:00
bunnei fe48c772e9 core: hle: kernel: KResourceLimit: Add a helper function for creating a KResourceLimit for a process. 2022-02-21 12:40:09 -08:00
bunnei 0e50d2914a Merge pull request #7919 from bunnei/phys-mem-updates
core: hle: kernel: KPageTable: Improve Un/MapPhysicalMemory.
2022-02-21 13:39:05 -07:00
bunnei 0b8e6347ee Merge pull request #7920 from bunnei/fix-unmap-pages
core: hle: kernel: KPageTable: Fix UnmapPages.
2022-02-21 13:38:52 -07:00
bunnei e1af26d5b3 fixup! core: hle: kernel: KPageTable: Improve Un/MapPhysicalMemory. 2022-02-19 00:14:27 -08:00
bunnei 5e81f38950 Merge pull request #7867 from german77/amiibo
nfp: Improve amiibo support
2022-02-19 00:57:47 -07:00
bunnei eb65836f69 core: hle: kernel: KPageTable: Fix UnmapPages.
- Fixes a logic bug in KPageTable::UnmapPages.
2022-02-18 23:48:16 -08:00
bunnei 6075031e99 core: hle: kernel: KPageTable: Improve Un/MapPhysicalMemory.
- Improves the implementations of MapPhysicalMemory and UnmapPhysicalMemory to more closely reflect latest HOS.
2022-02-18 23:42:27 -08:00
Mai M 53f6a61ff8 Merge pull request #7866 from xerpi/svc-OutputDebugString32-CreateCodeMemory32-ControlCodeMemory32
kernel: svc: Add OutputDebugString32, CreateCodeMemory32, ControlCodeMemory32
2022-02-16 22:49:56 -05:00
bunnei 3f85da2231 Merge pull request #7878 from german77/mnpp
service/mnpp: Stub mnpp_app
2022-02-16 18:42:49 -07:00
Morph 754fde3c90 Merge pull request #7899 from Kelebek1/test
file_sys: Dump patched exefs rather than base
2022-02-16 16:37:09 -05:00
Kelebek1 9ae0aaed6a Dump patched exefs rather than base 2022-02-15 04:52:28 +00:00
Sergi Granell dbfe017c9f kernel: svc: Add OutputDebugString32, CreateCodeMemory32, ControlCodeMemory32
Very straightforward, they are just wrappers to the 64-bit version of
the SVC.
2022-02-15 00:45:19 +01:00
bunnei 7cecfa8369 Merge pull request #7871 from german77/svc2
svc: Set unique names for function tables
2022-02-14 16:32:54 -07:00
german77 c2942fa5c3 nfp: Allow files without password data 2022-02-13 13:52:34 -06:00
lat9nq 558fef2464 program_metadata: Unpack FileAccessHeader and FileAccessControl
Avoids a reference binding to a misaligned addresses. Unpacking one
requires unpacking the other, otherwise there'll be a misaligned address
on the leftover one.
2022-02-13 02:20:56 -05:00
lat9nq 94dec8e568 hid: Stub IsUsbFullKeyControllerEnabled
Used by Splatoon 2, when opening the inventory from a LAN battle lobby.

Reference: https://switchbrew.org/wiki/HID_services
2022-02-12 15:42:50 -05:00
bunnei fa8505dfbb Merge pull request #7852 from Morph1984/new-uuid
common: Revise and fix the UUID implementation
2022-02-10 21:52:13 -07:00
Narr the Reg 4eef3a0cde service/mnpp: Stub mnpp_app
Used in Super Nintendo Entertainment System™ - Nintendo Switch Online
2022-02-10 21:55:28 -06:00
Narr the Reg 11680706a7 nfp: Separate nfc tag from amiibo data 2022-02-10 10:58:37 -06:00
Narr the Reg d5873beb51 svc: Set unique names for function tables 2022-02-08 21:03:31 -06:00
bunnei c40b56b554 hle: kernel: KCodeMemory: Remove unused QueryMemory. 2022-02-08 18:49:41 -08:00
bunnei 9ab27ece86 hle: kernel: KCodeMemory: Correct m_page_group number of pages.
Credits to @xerpi for finding this issue and pointing it out on #7519.
2022-02-08 18:47:11 -08:00
german77 f2b6837fb7 nfp: Address compiler issues 2022-02-08 18:52:44 -06:00
Narr the Reg bb831fae3a nfp: Validate amiibo files 2022-02-08 14:09:30 -06:00
german77 68ed8e2388 nfp: Improve implementation 2022-02-08 10:08:04 -06:00
german77 78aa2441d8 nfp: Move IUser class to header and add missing enum and structs 2022-02-07 09:18:22 -06:00
german77 2dba88f9fd nfp: Sort functions by command number 2022-02-07 09:18:22 -06:00
Morph 58df24fdde Merge pull request #7847 from tech-ticks/master
service: pm: Implement AtmosphereGetProcessInfo
2022-02-05 19:22:45 -05:00
Morph e47b5e6a26 general: Rename NewUUID to UUID, and remove the previous UUID impl
This completes the removal of the old UUID implementation.
2022-02-05 13:56:21 -05:00
Morph 26f74468c4 profile: Migrate to the new UUID implementation 2022-02-05 13:56:21 -05:00
Morph 4c1b4cc486 hle: ipc_helpers: Ignore -Wclass-memaccess
This warning is triggered by GCC when copying into non-trivially default constructible types, as it uses the more restrictive std::is_trivial (which includes std::is_trivially_default_constructible) to determine whether memcpy is safe instead of std::is_trivially_copyable.
2022-02-05 13:56:20 -05:00
Morph da3c2dc90c service: Migrate to the new UUID implementation 2022-02-05 13:18:46 -05:00
Morph 51c445f7e8 input/hid: Migrate to the new UUID implementation 2022-02-05 13:18:41 -05:00
bunnei 5e4fcf041e Merge pull request #7839 from german77/battery
yuzu: ui: Improve battery symbols
2022-02-04 18:23:35 -07:00
tech-ticks be026c6b6d service: pm: Implement AtmosphereGetProcessInfo 2022-02-04 01:41:36 +01:00
bunnei d1c4e9be9b Merge pull request #7835 from bunnei/page-table-lock
hle: kernel: KPageTable: Migrate locks to KScopedLightLock.
2022-02-02 17:58:55 -07:00
Narr the Reg 2198237e42 yuzu: ui: Improve battery symbols 2022-02-02 13:18:06 -06:00
Lioncash 8a509e5a2c general: Replace NonCopyable struct with equivalents 2022-02-02 13:17:12 -05:00
Lioncash 2c2e08df02 general: Move deleted copy/move constructor/assignment operators to public interface
This allows for better compiler errors, where the compiler will state a
copy or move couldn't occur due to the relevant function being deleted.

Previously a compiler would warn about the relevant function not being
accessible (which, while true, isn't as informative as it could be).
2022-02-02 12:17:08 -05:00
bunnei 1552c524ad hle: kernel: KPageTable: Migrate locks to KScopedLightLock.
- More accurately reflects real kernel behavior by using guest locks.
2022-02-01 19:34:24 -08:00
Narr the Reg 33594225c7 svc: Add 32 bit SynchronizePreemptionState
Used by Espgaluda II
2022-01-31 19:02:41 -06:00
Morph d45b236672 Merge pull request #7787 from bunnei/scheduler-deadlock-fix
hle: kernel: KScheduler: Fix deadlock with core waiting for a thread lock that has migrated.
2022-01-28 18:30:29 -05:00
bunnei 584eb04402 Merge pull request #7770 from german77/motion-threshold
input_common: Add option to configure gyro threshold
2022-01-27 15:44:04 -08:00
bunnei 1b8ed3a76d hle: kernel: KScheduler: Fix deadlock with core waiting for a thread lock that has migrated.
- Previously, it was possible for a thread migration to occur from core A to core B.
- Next, core B waits on a guest lock that must be released by a thread queued for core A.
- Meanwhile, core A is still waiting on the core B's current thread lock - resulting in a deadlock.
- Fix this by try-locking the thread lock.
- Fixes softlocks in FF8 and Pokemon Legends Arceus.
2022-01-27 12:17:14 -08:00
bunnei f73ced739a Merge pull request #7762 from bunnei/un-map-improve
Kernel Memory Updates (Part 4): Improve Un/MapPages, and more.
2022-01-26 17:54:20 -08:00
Morph c2fd2c56e9 Merge pull request #7771 from lioncash/assert
kernel/k_affinity_mask: Remove duplicated assert
2022-01-25 16:15:18 -05:00
Lioncash 1e57fbe71d kernel/k_affinity_mask: Remove duplicated assert
This is already checked inside GetCoreBit()
2022-01-24 10:35:22 -05:00
german77 1fca7203d3 input_common: Add option to configure gyro threshold 2022-01-23 21:54:33 -06:00
bunnei a2731424a6 hle: kernel: KThread: Improve Increment/Decrement RunningThreadCount.
- Previously implementation was incorrect, and would occasionally underflow.
2022-01-22 21:09:45 -08:00
bunnei 912b6b9ef4 core: hle: kernel: KPageTable: Various improvements to MapPages and UnmapPages. 2022-01-22 20:51:34 -08:00
bunnei c46f07a62a core: hle: kernel: KPageTable: MapProcessCode: Various cleanup. 2022-01-22 20:51:34 -08:00
bunnei 4f848b6f68 core: hle: kernel: KPageTable: ReserveTransferMemory: Various cleanup. 2022-01-22 20:51:34 -08:00
bunnei bf904afa0f core: hle: kernel: KPageTable: ResetTransferMemory: Various cleanup. 2022-01-22 20:51:34 -08:00
bunnei 1b3dd42de4 core: hle: kernel: KPageTable: SetMemoryAttribute: Various cleanup. 2022-01-22 20:51:34 -08:00
bunnei 05918a20c3 core: hle: kernel: KPageTable: Assert valid address on GetPhysicalAddr. 2022-01-22 01:33:26 -08:00
bunnei a8476d9db0 core: hle: kernel: KPageTable: Operate: Assert lock ownership. 2022-01-22 01:33:26 -08:00
bunnei 8f3c7cb89b core: hle: kernel: KPageTable: SetHeapSize: Cleanup & take physical memory lock. 2022-01-22 01:33:26 -08:00
bunnei 24efadee60 core: hle: kernel: Refactor Un/MapPhysicalMemory to remove unnecessary methods. 2022-01-22 01:33:26 -08:00
bunnei ebb9ec197e core: hle: kernel: Rename Un/Map to Un/MapMeory. 2022-01-22 01:33:26 -08:00
bunnei 7240568f00 Merge pull request #7737 from bunnei/fix-dummy-thread-leak
Various fixes to HLE service thread management
2022-01-21 22:34:47 -08:00
bunnei 606e643378 Merge pull request #7752 from Morph1984/SetCpuOverclockEnabled
service: apm: Stub ISession SetCpuOverclockEnabled
2022-01-21 17:13:52 -08:00
bunnei b3f8d2491d hle: kernel: KThread: Ensure host (dummy) threads block on locking.
- But do not enter the priority queue, as otherwise they will be scheduled.
- Allows dummy threads to use guest synchronization primitives.
2022-01-21 17:12:06 -08:00
Lioncash 46d9dc557c service/wlan: Update function tables 2022-01-21 16:35:51 -05:00
Lioncash 3599c5f7c8 service/usb: Update function tables 2022-01-21 16:31:57 -05:00
Lioncash 50af00640b service/set: Update function tables 2022-01-21 16:26:12 -05:00
Lioncash 114ce2ae13 service/ns: Update function tables 2022-01-21 16:21:35 -05:00
Lioncash 41f1cceefe service/nim: Update unknown function table entries 2022-01-21 16:17:40 -05:00
Lioncash cc5f02e0a5 service/friend: Update unknown function table entries 2022-01-21 16:08:46 -05:00
Lioncash ee4adcada2 service/filsystem: Update fsp-srv function table 2022-01-21 16:07:01 -05:00
Lioncash 2495e8d6e1 service/btm: Update function tables 2022-01-21 15:59:41 -05:00
Lioncash 74a98a01de service/audio: Update audctl unknown function names 2022-01-21 15:50:38 -05:00
Lioncash aa0d0e91a0 service/am: Update omm function tables 2022-01-21 15:40:08 -05:00
Lioncash 1a50cb9468 service/acc: Update unknown function names
Switchbrew has the function names now.
2022-01-21 15:33:22 -05:00
Morph 00dc684fb0 service: apm: Stub ISession SetCpuOverclockEnabled
Since we don't currently support CPU overclocking within the emulated system, this can be stubbed for now, like APM IsCpuOverclockEnabled.

- Used by Gravity Rider Zero
2022-01-20 21:07:26 -05:00
bunnei 8f2630de0a hle: kernel: Remove redundant tracking of dummy threads.
- These are already tracked by kernel's registered_objects member.
2022-01-20 17:08:00 -08:00
bunnei f2e870d6b6 hle: kernel: KThread: DummyThread can be waited, ensure wait_queue is not nullptr. 2022-01-20 17:08:00 -08:00
bunnei 668af26696 hle: kernel: KThread: Decrease DummyThread priority to ensure it is never scheduled. 2022-01-20 17:08:00 -08:00
bunnei db3c11506b hle: kernel: service_thread: Ensure dummy thread is closed & destroyed on thread exit. 2022-01-20 17:08:00 -08:00
bunnei e885b0ab0d hle: kernel: KServerSession: Remove hack for CompleteSyncRequest.
- This does not appear to be necessary anymore.
2022-01-20 17:08:00 -08:00
bunnei af11abed3f hle: kernel: KServerSession: Simplify CompleteSyncRequest EndWait.
- Considering is_thread_waiting is never set, so we can remove IsThreadWaiting.
- KThread::EndWait will take the scheduler lock, so we can remove the redundant lock.
2022-01-20 17:08:00 -08:00
bunnei 247a7e2205 hle: kernel: KThread: Ensure dummy threads never call EndWait.
- These are only used by host threads for locking and will never have a wait_queue.
2022-01-20 17:08:00 -08:00
bunnei f1e06f984d hle: kernel: KScheduler: Ensure dummy threads are never scheduled.
- These are only used by host threads for locking.
2022-01-20 17:08:00 -08:00
bunnei cc4cbff1ca hle: kernel: KThread: Rename thread_type_for_debugging -> thread_type.
- This will be used to ensure that we do not schedule dummy threads.
2022-01-20 17:08:00 -08:00
bunnei 015c2dbd68 Merge pull request #7710 from german77/just-shake-it
core/hid: Increment shake force
2022-01-20 16:53:22 -08:00
Morph ac59980bd0 Merge pull request #7726 from german77/clamp
service/hid: Initialize applet_resource on SetNpadAnalogStickUseCenterClamp
2022-01-19 14:31:15 -08:00
german77 d678dfda6e service/hid: Initialize applet_resource on SetNpadAnalogStickUseCenterClamp 2022-01-19 14:20:31 -06:00
bunnei 70b2b91f71 Merge pull request #7701 from bunnei/clear-mem-pages
Kernel Memory Updates (Part 3): Clear KMemoryManager pages & other fixes
2022-01-18 21:20:42 -08:00
bunnei 74407b1348 Merge pull request #7712 from bunnei/fix-thread-exit
Accurately implement thread exit
2022-01-17 18:08:24 -08:00
bunnei 4e3c9cdde6 Merge pull request #7732 from v1993/patch-7
kernel: remove no-op code
2022-01-17 15:37:16 -08:00
Mai M 2567283d86 Merge pull request #7728 from v1993/patch-4
hid: fix std::transform call
2022-01-17 13:43:11 -05:00
Valeri 01852ee857 hle: remove no-op code
Found by static analysis with PVS-Studio. Nobody seems to really know what was it doing there.
2022-01-17 13:51:12 +03:00
Valeri 8b3ea1258c hid: fix std::transform call
Found by static analysis with PVS-Studio.
2022-01-17 10:47:38 +03:00
Valeri 347574b398 Correct assignment source for rotations
Found by static analysis with PVS-Studio
2022-01-17 10:40:41 +03:00
bunnei d3702fe297 Merge pull request #7711 from bunnei/fix-service-thread-race-v2
hle: kernel: Fix service_threads access to be thread safe V2.
2022-01-14 22:22:39 -08:00
bunnei 4148fde355 hle: kernel: k_memory_manager: Clear pages on allocation & free.
- Heap pages should be zero'd.
- Also explicitly passed along heap allocation option.
2022-01-14 21:16:33 -08:00
bunnei d87fc832f4 Merge pull request #7707 from german77/slow-update
service/hid: Decrease motion update rate
2022-01-14 17:13:30 -08:00
bunnei b52516263d core: hle: kernel: KThread: Integrate with KWorkerTask and implement DoWorkerTaskImpl.
- This is used to terminate a thread asynchronously after it has been exited.
- This fixes a crash that can occur in Pokemon Sword/Shield because a thread is incorrectly closed on svcExitThread, then, the thread is destroyed on svcCloseHandle while it is still scheduled.
- Instead, we now wait for the thread to no longer be scheduled on all cores before destroying it from KWorkerTaskManager, which is accurate to HOS behavior.
2022-01-14 16:44:14 -08:00
bunnei 18969b5d8e core: hle: kernel: KProcess: Integrate with KWorkerTask and add unimplemented DoWorkerTaskImpl. 2022-01-14 16:44:14 -08:00
bunnei 914431487b core: hle: kernel: KThread: Replace Suspend with UpdateState & various updates.
- This makes our implementations of these more closely match HOS.
2022-01-14 16:44:14 -08:00
bunnei b6bf119a43 core: hle: kernel: Instantiate a kernel instance of KWorkerTaskManager. 2022-01-14 16:44:14 -08:00
bunnei b722faaf7a core: hle: kernel: Add KWorkerTask and KWorkerTaskManager.
- These primitives are used to dispatch asynchronous kernel tasks from KThread and KProcess.
2022-01-14 16:43:59 -08:00
bunnei fbab3dc017 hle: kernel: Fix service_threads access to be thread safe V2.
- PR #7699 attempted to fix CreateServiceThread and ReleaseServiceThread to be thread safe, but inadvertently introduced a possible dead-lock.
- With this PR, we use a worker thread to manage the service thread list, allowing it only to be accessed by a single thread, and guaranteeing threads will not destroy themselves.
- Fixes a rare crash in Pokemon Sword/Shield, I've now run this game for ~12 hours non-stop and am quite confident this is a good solution for this issue.
2022-01-14 16:02:57 -08:00
Narr the Reg f217849d21 core/hid: Increment shake force
With the current settings 2p mode in pokemon let's go wasn't showing up.  By making the shake more violent we can make it appear without any effort using the keyboard
2022-01-14 11:11:20 -06:00
Mai M 8fb335ff3f Merge pull request #7699 from bunnei/fix-service-thread-race
hle: kernel: Fix service_threads access to be thread safe.
2022-01-14 00:46:16 -05:00
Mai M 0872f9ff89 Merge pull request #7698 from bunnei/mem-code-memory-updates
Kernel Memory Updates (Part 2): SetProcessMemoryPermission, update permissions, and other minor changes.
2022-01-14 00:41:17 -05:00
bunnei ef9186172f hle: kernel: Fix service_threads access to be thread safe.
- CreateServiceThread and ReleaseServiceThread can be accessed by different threads, uses a lock to make this thread safe.
- Fixes a rare crash in Pokemon Sword/Shield that can occur when a new service thread is being created while an old one is being destroyed.
2022-01-13 21:26:10 -08:00
bunnei c8933c02cc Merge pull request #7700 from german77/no-gyro
core/hid: Reduce gyro threshold even more
2022-01-13 21:24:41 -08:00
Narr the Reg 01d886a3ba service/hid: Decrease motion update rate
Motion stops working in Mario Tennis in swing mode if the update rate is too fast even when HW it updates at the same speed. 10ms it's the minimum period that the game needs to start working again.
2022-01-12 22:55:33 -06:00
Narr the Reg 56ac40bfc4 core/hid: Reduce gyro threshold even more 2022-01-11 23:15:39 -06:00
bunnei d45b65b4d9 hle: kernel: k_page_table: Update SetProcessMemoryPermission. 2022-01-11 16:28:11 -08:00
bunnei 7526489b8b hle: service: ldr: UnmapCodeMemory BSS only when set. 2022-01-11 16:28:11 -08:00
bunnei 84a61db25b hle: kernel: k_page_table: ReadAndWrite -> UserReadWrite. 2022-01-11 16:28:11 -08:00
bunnei 0942533d2f hle: kernel: k_page_table: Rename *ProcessCodeMemory -> *CodeMemory. 2022-01-11 16:28:11 -08:00
bunnei e2df1ad6a1 Merge pull request #7684 from bunnei/set-mem-perm-attr
Kernel Memory Updates (Part 1): SetMemoryAttribute, and other minor changes.
2022-01-11 16:26:17 -08:00
bunnei 5d1080d2a8 Merge pull request #7633 from german77/hotkeys
yuzu: Add controller hotkeys
2022-01-11 10:49:23 -08:00
bunnei 7f49c22fc4 Merge pull request #7682 from german77/udp_fix
input_common: Fix UDP controller mappings
2022-01-08 13:41:39 -08:00
bunnei b227426ae5 core: hle: kernel: svc: Updates to SetMemoryAttribute and SetMemoryPermission. 2022-01-08 12:18:14 -08:00
bunnei 090f1c400e core: hle: kernel: k_page_table: Update CheckMemoryState. 2022-01-08 03:20:57 -08:00
german77 a52791af6b yuzu: Use pad parameter to choose the correct controller 2022-01-07 16:56:36 -06:00
german77 353317f31e yuzu: Add controller hotkeys 2022-01-06 21:26:05 -06:00
german77 06d840652f core/hid: Add home and screenshot button support 2022-01-06 21:11:27 -06:00
german77 f333340a9c core/hid: Set minimum gyro threshold 2022-01-06 20:05:59 -06:00
bunnei ccfce4da6f Merge pull request #7636 from vonchenplus/buffer_queue_query
core:hle:service:nvflinger Implement few type in bufferqueue query method
2022-01-04 11:28:49 -08:00
ameerj 664fcdc64b gpu: Add shut down method to synchronize threads before destruction 2022-01-03 20:47:26 -05:00
ameerj 8badb6f4a7 Revert "Merge pull request #7668 from ameerj/fence-stop-token"
This reverts commit 5a612e9217, reversing
changes made to 2e61bc3d51.
2022-01-03 20:28:54 -05:00
bunnei 5a612e9217 Merge pull request #7668 from ameerj/fence-stop-token
gpu: Use std::stop_token in WaitFence for VSync thread
2022-01-03 16:40:36 -08:00
bunnei 2e61bc3d51 Merge pull request #7664 from german77/fallback
core/hid: Add fallback to fullkey controllers
2022-01-03 15:04:37 -08:00
ameerj 0585c60227 gpu: Use std::stop_token in WaitFence for VSync thread
Fixes a hang that may occur when stopping emulation and the VSync thread is blocked on the syncpoint condition variable.
2022-01-03 12:31:33 -05:00
Fernando S dd9be795bf Merge pull request #7648 from bunnei/thread-pinning
core: hle: kernel: Implement thread pinning.
2022-01-03 02:01:26 +01:00
german77 0e9f010ed6 core/hid: Add fallback to fullkey controllers 2022-01-01 22:01:13 -06:00
bunnei 1b4fa1cba3 Merge pull request #7647 from german77/toad
core/hid: Fix controller type validation
2021-12-30 16:54:35 -08:00
bunnei b12695ddc4 core: hle: kernel: Implement thread pinning.
- We largely had the mechanics in place for thread pinning, this change hooks these up.
- Validated with tests https://github.com/Atmosphere-NX/Atmosphere/blob/master/tests/TestSvc/source/test_thread_pinning.cpp.
2021-12-30 15:50:45 -08:00
german77 5dab578691 core/hid: Fix controller type validation 2021-12-29 22:51:53 -06:00
Feng Chen 064470286d Remove invalid assertion statement 2021-12-28 18:51:11 +08:00
Feng Chen 669cb21687 Implement few type in bufferqueue query method 2021-12-28 18:51:03 +08:00
bunnei 714dcea191 core: hle: kernel: Updated implementation of svcSetHeapSize.
- Updates our svcSetHeapSize with latest HOS, furthermore allowing heap size to properly be extended/shrunk.
- Validated with tests https://github.com/Atmosphere-NX/Atmosphere/blob/master/tests/TestSvc/source/test_set_heap_size.cpp.
2021-12-28 01:25:20 -08:00
bunnei 5217285536 Merge pull request #7621 from bunnei/set-mem-perm
core: hle: kernel: Implement SetMemoryPermission.
2021-12-27 23:33:11 -08:00
bunnei 555481005d core: hle: kernel: Implement SetMemoryPermission.
- Not seen in any games yet, but validated with kernel tests.
2021-12-23 01:10:36 -08:00
bunnei bc45d0fc1a core: hle: kernel: KThread: X18 should be a cryptographically random number.
- This was added with firmware 11.0.0 (https://switchbrew.org/wiki/11.0.0).
    - X18 is OR'd by kernel with 1, to make sure it is odd.
2021-12-23 00:03:39 -08:00
bunnei a1f637a6d0 hle: kernel: svc: GetInfo: Fix error checking with IdleTickCount.
- Enforce tha the supplied handle is invalid, not valid.
- This gets Witcher 3 booting.
2021-12-21 22:41:23 -08:00
bunnei d7d066e266 Merge pull request #7481 from german77/gyro-bias
service/hid: Improve console motion accuracy
2021-12-21 00:13:54 -08:00
bunnei 3f3eb16bc9 Merge pull request #7597 from bunnei/remove-global-lock
core: hle: Remove global HLE lock.
2021-12-20 14:24:50 -08:00
ameerj 1fff9ea35e kernel: Manually destroy the current process during shut down
Avoids a memory leak.
2021-12-19 01:38:25 -05:00
Morph 5d73d0b0ae Merge pull request #7593 from german77/brrr_test
core/hid: Cancel any vibration after the test
2021-12-18 15:53:15 -05:00
bunnei acd1fff964 core: loader: kip: Minimal changes to fix KIP loading.
- Allows us to boot KIP (kernal apps), useful for testing the kernel.
2021-12-17 23:08:51 -08:00
bunnei 5192e8e092 core: hle: Remove global HLE lock.
- This was added early on as a hack to protect against some concurrency issues.
- It's not clear that this serves any purpose anymore, and if it does, individual components should be fixed rather than using a global recursive mutex.
2021-12-17 16:05:51 -08:00
Narr the Reg 3554c18269 core/hid: Cancel any vibration after the test 2021-12-16 13:35:15 -06:00
Narr the Reg 3e0a577553 core/hid: Fix faulty analog triggers 2021-12-14 19:49:44 -06:00
Lioncash 726de453bb common/input: Avoid numerous large copies of CallbackStatus
CallbackStatus instances aren't the cheapest things to copy around
(relative to everything else), given that they're currently 520 bytes in
size and are currently copied numerous times when callbacks are invoked.

Instead, we can pass the status by const reference to avoid all the
copying.
2021-12-13 21:22:02 -05:00
Valeri 295b676fe6 Remove erroneous #pragma once 2021-12-13 16:49:01 +03:00
bunnei 5273e0665e Merge pull request #7462 from bunnei/kernel-improve-scheduling
Kernel: Improve threading & scheduling V3
2021-12-12 22:43:25 -08:00
Narr the Reg 66a86f54af service/hid: Improve console motion accuracy 2021-12-12 23:26:04 -06:00
bunnei 99f7732667 Merge pull request #7519 from itsmeft24/master
kernel: svc: Implement ProcessMemory and CodeMemory SVCs
2021-12-09 00:29:09 -08:00
bunnei abecd3905d Merge pull request #7525 from german77/notifa
service/notif: Add notif:a and stub ListAlarmSettings, Initialize
2021-12-07 23:31:44 -08:00
bunnei d3b0025bd1 Merge pull request #7521 from german77/dual_single_joycons
service/hid: Implement SetNpadJoyAssignmentMode
2021-12-07 21:03:42 -08:00
bunnei 962a2a65a0 Merge pull request #7488 from vonchenplus/support_multiple_videos_playing
Support multiple videos playing
2021-12-07 18:38:14 -08:00
itsmeft24 9a28199c5a Update k_code_memory.h 2021-12-07 16:58:23 -05:00
itsmeft24 4b0b2d7d1d make KCodeMemory::GetSourceAddress const
Co-authored-by: Mai M. <mathew1800@gmail.com>
2021-12-07 07:58:33 -05:00
bunnei 5788e077cd hle: kernel k_scheduler: EnableScheduling: Remove redundant GetCurrentThreadPointer calls. 2021-12-06 16:39:18 -08:00
bunnei 1b1ed86ec7 hle: kernel k_process: Remove unnecessary .at usage with thread pinning methods. 2021-12-06 16:39:18 -08:00
bunnei 38a6477770 hle: kernel: Remove unnecessary virtual specifier on NotifyAvailable. 2021-12-06 16:39:18 -08:00
bunnei 829c4b6144 hle: kernel: Remove unnecessary virtual specifier on EndWait. 2021-12-06 16:39:18 -08:00
bunnei 1457a75a40 hle: kernel: k_light_condition_variable: Revert unnecessary license comment changes. 2021-12-06 16:39:18 -08:00
bunnei cd4582dc8b hle: kernel: k_condition_variable: Revert unnecessary style changes. 2021-12-06 16:39:18 -08:00
bunnei 4b2aa52da9 hle: kernel: Remove unnecessary virtual specifier on CancelWait. 2021-12-06 16:39:18 -08:00
bunnei 273223d5f1 hle: kernel: service_thread: Force stop threads on destruction. 2021-12-06 16:39:18 -08:00
bunnei 0231cbd79f hle: kernel: k_light_lock: Implement CancelWait.
- Fixes a crash in Megadimension Neptunia VII.
2021-12-06 16:39:18 -08:00
bunnei d17b7268f6 hle: kernel: service_thread: Use std::jthread.
- Fixes a potential deadlock on service thread shutdown.
2021-12-06 16:39:18 -08:00
bunnei b5970145a5 hle: kernel: k_thread: Skip reschedule on DisableDispatch with SC. 2021-12-06 16:39:18 -08:00
bunnei 6d2bf18df9 hle: kernel: k_thread: Rename sleeping_queue -> wait_queue. 2021-12-06 16:39:18 -08:00
bunnei 43d706c7d2 hle: kernel: svc: Fix deadlock that can occur with single core. 2021-12-06 16:39:18 -08:00
bunnei 826b07162a hle: kernel: k_thread: Treat dummy threads as a special type. 2021-12-06 16:39:18 -08:00
FernandoS27 8a38790bd3 hle: kernel: fix timing on thread preemption 2021-12-06 16:39:18 -08:00
FernandoS27 2a7b4489a0 hle: kernel: fix scheduling ops from HLE host thread. 2021-12-06 16:39:17 -08:00
bunnei 58da4d5a6e hle: kernel: Add a flag for indicating that the kernel is currently shutting down. 2021-12-06 16:39:17 -08:00
bunnei 975a4f786b hle: kernel: KSynchronizationObject: Fix variable shadowing. 2021-12-06 16:39:17 -08:00
bunnei eb34276885 hle: kernel: Cleanup to match coding style. 2021-12-06 16:39:17 -08:00
bunnei 8fc7d6e631 hle: kernel: KProcess: Improvements for thread pinning. 2021-12-06 16:39:17 -08:00
bunnei e9231a0b8c hle: kernel: KThreadQueue: Remove deprecated code. 2021-12-06 16:39:17 -08:00
bunnei ecd17bbbe4 hle: kernel: KConditionVariable: Various updates & simplifications. 2021-12-06 16:39:17 -08:00
bunnei 050a4270d6 hle: kernel: KThread: Migrate to updated KThreadQueue (part 2). 2021-12-06 16:39:17 -08:00
bunnei 778f03c57a hle: kernel: KThread: Migrate to updated KThreadQueue (part 1). 2021-12-06 16:39:17 -08:00
bunnei 756fdcbdb1 hle: kernel: KConditionVariable: Migrate to updated KThreadQueue. 2021-12-06 16:39:17 -08:00
bunnei f81a6a07c0 hle: kernel: KServerSession: Migrate to updated KThreadQueue. 2021-12-06 16:39:17 -08:00
bunnei 346f6e54b5 hle: kernel: KLightConditionVariable: Migrate to updated KThreadQueue. 2021-12-06 16:39:17 -08:00
bunnei 5ff19c33fc hle: kernel: KLightLock: Migrate to updated KThreadQueue. 2021-12-06 16:39:17 -08:00
bunnei 2ff578f0ee hle: kernel: KAddressArbiter: Migrate to updated KThreadQueue. 2021-12-06 16:39:17 -08:00
bunnei 0ad0543cde hle: kernel: KThread: Remove tracking of sync object from threads. 2021-12-06 16:39:17 -08:00
bunnei e9cdb3cccb hle: kernel: Update KThreadQueue and migrate KSynchronizationObject. 2021-12-06 16:39:17 -08:00
bunnei 01b0e5b168 core: hle: kernel: Disable dispatch count tracking on single core.
- This would have limited value, and would be a mess to handle properly.
2021-12-06 16:39:17 -08:00
bunnei a3dd417cbf core: hle: kernel: k_thread: Mark KScopedDisableDispatch as nodiscard. 2021-12-06 16:39:17 -08:00
bunnei 6fd0256f77 core: cpu_manager: Use invalid core_id on init and simplify shutdown. 2021-12-06 16:39:17 -08:00
bunnei 5892c23e30 core: hle: kernel: k_auto_object: Add GetName method.
- Useful purely for debugging.
2021-12-06 16:39:16 -08:00
bunnei 51a7f04b81 core: hle: kernel: DisableDispatch on suspend threads. 2021-12-06 16:39:16 -08:00
bunnei d31fc39e05 core: hle: kernel: k_scheduler: Improve DisableScheduling and EnableScheduling. 2021-12-06 16:39:16 -08:00
bunnei 1d5872511c core: cpu_manager: Use KScopedDisableDispatch. 2021-12-06 16:39:16 -08:00
bunnei 3a83c9c027 core: hle: kernel: Use CurrentPhysicalCoreIndex as appropriate. 2021-12-06 16:39:16 -08:00
bunnei 1e03387d98 core: hle: kernel: k_scheduler: Remove unnecessary MakeCurrentProcess. 2021-12-06 16:39:16 -08:00
bunnei 454970983d core: hle: kernel: k_scheduler: Improve ScheduleImpl. 2021-12-06 16:39:16 -08:00
bunnei 90310b9c03 core: hle: kernel: k_scheduler: Improve Unload. 2021-12-06 16:39:16 -08:00
bunnei 3ca8aca719 core: hle: kernel: k_process: DisableDispatch on main thread. 2021-12-06 16:39:16 -08:00
bunnei 67e8861da4 core: hle: kernel: k_handle_table: Use KScopedDisableDispatch as necessary. 2021-12-06 16:39:16 -08:00
bunnei 4bd80abd17 core: hle: kernel: k_thread: Add KScopedDisableDispatch. 2021-12-06 16:39:16 -08:00
bunnei fa26f905c8 core: hle: kernel: Ensure idle threads are closed before destroying scheduler. 2021-12-06 16:39:16 -08:00
bunnei cae0bef7ec core: hle: kernel: Reflect non-emulated threads as core 3. 2021-12-06 16:39:16 -08:00
bunnei 3809ab520b Merge pull request #7524 from german77/hid_stub
service/hid: Stub SetNpadCaptureButtonAssignment and ClearNpadCaptureButtonAssignment
2021-12-06 13:06:18 -08:00
german77 57ceda21b7 service/notif: Add notif:a and stub ListAlarmSettings,Initialize
Used by ring fit adventure 1.2.0
2021-12-06 10:36:37 -06:00
itsmeft24 01d66693ce fix formatting 2021-12-06 11:02:33 -05:00
itsmeft24 329e58ad79 move private members below public members 2021-12-06 10:37:13 -05:00
itsmeft24 1dcb18cf3e fix formatting 2021-12-06 10:37:09 -05:00
itsmeft24 c1a1ffa949 fix formatting
Co-authored-by: Mai M. <mathew1800@gmail.com>
2021-12-06 07:58:28 -05:00
german77 df845d5d6e service/hid: Stub SetNpadCaptureButtonAssignment and ClearNpadCaptureButtonAssignment
Used by ring fit adventure 1.2.0
2021-12-05 22:44:31 -06:00
jam1garner 9ea4d9cb8c loader: Support loading subsdk{8,9} 2021-12-05 23:07:50 -05:00
itsmeft24 3df8201e46 fix formatting 2021-12-05 19:00:29 -05:00
itsmeft24 291a398405 Remove unnecessary includes 2021-12-05 18:49:40 -05:00
german77 2352826bf7 service/hid: Implement SetNpadJoyAssignmentMode 2021-12-05 16:18:23 -06:00
itsmeft24 c27936368a Add copyright notice 2021-12-05 16:49:52 -05:00
ameerj 8969273d2d general: Add missing copyright notices 2021-12-05 16:18:53 -05:00
itsmeft24 e380100026 Add KCodeMemory to CMakeLists.txt 2021-12-05 15:56:44 -05:00
itsmeft24 033c9dff92 kernel: svc: Implement Map/UnmapProcessMemory and Create/ControlCodeMemory
Used by Skyline modding framework
2021-12-05 15:04:08 -05:00
german77 2ba6890141 core/hid: Add missing controller type 2021-12-05 13:57:59 -06:00
german77 5fae083bc3 core/hid: Ensure only valid npad are connected 2021-12-04 23:20:18 -06:00
Feng Chen 4a3c1192b8 Address feedback 2021-12-05 00:06:14 +08:00
bunnei 89d029ff31 Merge pull request #7489 from Morph1984/steady-clock
general: Replace high_resolution_clock with steady_clock
2021-12-03 16:08:20 -08:00
Morph f650d11a53 service: am: ISelfController: Stub SaveCurrentScreenshot
- Used by Disney Magical World 2: Enchanted Edition
2021-12-02 20:12:24 -05:00
Morph 2b9afa4d56 general: Replace high_resolution_clock with steady_clock
On some OSes, high_resolution_clock is an alias to system_clock and is not monotonic in nature. Replace this with steady_clock.
2021-12-02 14:20:43 -05:00
Feng Chen 10cc89bfdf Support multiple videos playing 2021-12-02 12:48:42 +08:00
Morph 2bd51ec9e5 service: friend: Implement GetCompletionEvent
- Used by Super Bomberman R Online
2021-11-30 12:19:21 -05:00
Morph ef31afb71f input_interpreter: Make use of NpadButton instead of a u64
Allows us to be more explicit with the representation of button states and use the provided bit manipulation operators
2021-11-29 19:21:51 -05:00
Morph f34773ee36 npad: Return NpadButton in GetAndResetPressState
We were previously truncating this to a u32 as there were no known buttons that used the full 64 bits of this type. Fix this now that we know they are used.
2021-11-29 19:21:51 -05:00
Morph 978c1c2853 core: hid: hid_types: Add "All" to NpadButton
This represents a bitmask for all pressed buttons
2021-11-29 19:21:51 -05:00
Morph 715d4bdbc6 core: hid: hid_core: Add (Enable/DIsable)AllControllerConfiguration 2021-11-29 17:59:58 -05:00
Morph 726d16f266 general: Fix handheld typo 2021-11-29 17:22:59 -05:00
Morph bc2f114e75 core: hid: Mark constructors as explicit 2021-11-29 17:20:15 -05:00
Morph 24b6822c56 core: hid: Cleanup and amend documentation 2021-11-29 17:20:14 -05:00
bunnei 05cd56b716 Merge pull request #7438 from german77/homebrew2
Core: Stub services and functions needed for checkpoint
2021-11-28 00:54:48 -08:00
Narr the Reg 9139019352 core/ns: Implement GetReadOnlyApplicationControlDataInterface
Used in checkpoint homebrew
2021-11-27 20:30:16 -06:00
Narr the Reg 979bdaeddd core/pdm: Stub QueryPlayStatisticsByApplicationIdAndUserAccountId
Used in checkpoint homebrew
2021-11-27 20:30:16 -06:00
german77 b7357d95a7 settings: Add debug setting to enable all controllers 2021-11-27 20:24:37 -06:00
Narr the Reg 297b5accab core/hid: Stub GetUniquePadsFromNpad
Used in checkpoint homebrew
2021-11-27 09:03:10 -06:00
german77 8df8dd6c5c config: Remove vibration configuration 2021-11-26 19:31:04 -06:00
Narr the Reg 7b56b2cab6 input_common: Fully implement UDP controllers 2021-11-26 15:46:36 -06:00
Narr the Reg d20817d2f1 service/hid: Finish converting LIFO objects and address some nits 2021-11-24 20:30:29 -06:00
german77 af121ded18 bootmanager: Use cross-platform keyboard input 2021-11-24 20:30:28 -06:00
german77 30de38ee7f kraken: Address comments from review
Fix compiler bug
2021-11-24 20:30:28 -06:00
german77 25521cd948 core/hid: Improve accuary of mouse implementation 2021-11-24 20:30:28 -06:00
german77 dfb63175d1 core/hid: Fully implement native mouse 2021-11-24 20:30:28 -06:00
german77 6032358402 input_common: Allow keyboard to be backwards compatible 2021-11-24 20:30:28 -06:00
german77 ebfe40dec8 core/hid: Improve accuracy of the keyboard implementation 2021-11-24 20:30:28 -06:00
german77 41dbb2d3cb core/hid: Fix keyboard alignment 2021-11-24 20:30:28 -06:00
german77 99485a06a7 core/hid: Remove usage of native types, fix a couple of errors with motion 2021-11-24 20:30:28 -06:00
german77 d12525737a service/hid: Remove includes of core.h and settings.h 2021-11-24 20:30:27 -06:00
german77 8d9d6516fd service/hid: Add support for new controllers 2021-11-24 20:30:27 -06:00
german77 0cf8201c5d settings: Fix controller preview not displaying the correct controller 2021-11-24 20:30:27 -06:00
german77 8517d89be0 core/hid: Rename NpadType to NpadStyleIndex 2021-11-24 20:30:27 -06:00
german77 ddcdaac727 config: Cleanup and documentation 2021-11-24 20:30:27 -06:00
german77 a4cdafed54 core/hid: Prevent Emulated controller from flapping with multiple inputs devices 2021-11-24 20:30:27 -06:00
german77 93997b234f core/hid: Fully emulate motion from button 2021-11-24 20:30:27 -06:00
german77 4736326a05 second commit lion review 2021-11-24 20:30:26 -06:00
german77 a8852024b6 settings: Fix Debug controller type options 2021-11-24 20:30:26 -06:00
german77 9f91335a71 kraken: Address comments from review
start lion review
2021-11-24 20:30:26 -06:00
german77 f63c6fce6d input_common: Revert deleted TAS functions 2021-11-24 20:30:26 -06:00
german77 df91c97a36 core/hid: Explain better what a temporary value does 2021-11-24 20:30:26 -06:00
german77 92a9205566 core/hid: Update structs to 13.1.0 2021-11-24 20:30:26 -06:00
german77 d0389d2971 core/hid: Add TAS input 2021-11-24 20:30:26 -06:00
german77 124404e756 input_common: Add multiple vibration curves 2021-11-24 20:30:26 -06:00
german77 012691087a core/hid: Rework battery mappings 2021-11-24 20:30:26 -06:00
german77 ae6ba2c8bd input_common: Add manual update options to input devices 2021-11-24 20:30:26 -06:00
german77 c545dca53b service/hid: Fix memory allocated incorrectly 2021-11-24 20:30:25 -06:00
german77 d1bac9024d settings: Fix mouse and keyboard mappings 2021-11-24 20:30:25 -06:00
german77 d813cbd592 Morph review first wave 2021-11-24 20:30:25 -06:00
german77 ecb9ca0dc2 service/hid: Match shared memory closer to HW 2021-11-24 20:30:25 -06:00
german77 498dd14bc7 yuzu: Fix loading input profiles 2021-11-24 20:30:25 -06:00
german77 b3f59b4407 kraken: Address comments from review
review fixes
2021-11-24 20:30:25 -06:00
german77 1f0a7a8bca service/hid: Use ring buffer for gestures 2021-11-24 20:30:25 -06:00
german77 8ea02d19a1 service/hid: Fix gesture input 2021-11-24 20:30:25 -06:00
german77 6774c7988b configuration: Migrate controller settings to emulated controller 2021-11-24 20:30:25 -06:00
german77 6c7814bc9c core/hid: Fix rumble too strong at 1% 2021-11-24 20:30:24 -06:00
german77 00f654cd22 core/hid: Only signal when needed 2021-11-24 20:30:24 -06:00
german77 88cb39be9f hid: Fix controller connection/disconnection 2021-11-24 20:30:24 -06:00
german77 c39001eaa6 core/hid: Documment some files 2021-11-24 20:30:24 -06:00
german77 0292fe0198 kraken: Fix errors from rebase and format files 2021-11-24 20:30:24 -06:00
german77 66cf94709a core/hid: Add output devices 2021-11-24 20:30:24 -06:00
german77 a197599d08 core: Update input interpreter 2021-11-24 20:30:24 -06:00
german77 d879443146 core/frontend: Update applets 2021-11-24 20:30:24 -06:00
german77 9f38fa7ffe core: Remove frontend/input 2021-11-24 20:30:24 -06:00
german77 0655b8da59 service/hid: Rewrite npad to use ring lifo and the emulated controller 2021-11-24 20:30:24 -06:00
german77 8b1126f80e service/hid: Update console sixaxis to the emulated console 2021-11-24 20:30:24 -06:00
german77 6b6628651f service/hid: Update mouse and keyboard to use ring lifo and the emulated device 2021-11-24 20:30:24 -06:00
german77 9c28d458bd service/hid: Update touch and gestures to use ring lifo and the emulated console 2021-11-24 20:30:24 -06:00
german77 b749bd7498 service/hid: Update debug pad, xpad, stubbed and controller base to use ring lifo and the emulated controller 2021-11-24 20:30:23 -06:00
german77 70a0aba81d service/hid: Use remove duplicated code, update names 2021-11-24 20:30:23 -06:00
german77 461b19a681 service/hid: Create ring LIFO 2021-11-24 20:30:23 -06:00
german77 84bda35f14 settings: Cleanup settings 2021-11-24 20:30:23 -06:00
german77 d2f31e805b core/emu_window: Remove touch input 2021-11-24 20:30:23 -06:00
german77 4f3c5f0101 core: Register HID 2021-11-24 20:30:23 -06:00
german77 5298dba88e core/hid: Add emulated controllers 2021-11-24 20:30:23 -06:00
german77 61e34f0759 core/hid: Move motion_input, create input converter and hid_types 2021-11-24 20:30:22 -06:00
german77 341d3e2f11 core/hid: Move input_interpreter to hid 2021-11-24 20:30:22 -06:00
bunnei 1d8b5271b4 Merge pull request #7394 from Morph1984/svc-SetMemoryPermission
kernel: svc: Implement SetProcessMemoryPermission
2021-11-22 14:06:09 -08:00
jam1garner 4b9926e608 arm: dynarmic: Cleanup icache op handling 2021-11-21 22:44:13 -05:00
jam1garner 068124d506 arm: dynarmic: Implement icache op handling for 'ic iallu' instruction 2021-11-21 21:18:56 -05:00
jam1garner 3f51dd23da arm: dynarmic: Implement icache op handling for 'ic ivau' instruction 2021-11-21 21:10:14 -05:00
bunnei 15212de85a Merge pull request #7389 from ameerj/screenshot-1x
Fix screenshot dimensions when at 1x scale
2021-11-21 02:31:32 -08:00
bunnei bdacff6b39 Merge pull request #7359 from heinermann/kthread_crash
Fix crash on exit due to static scoped dummy threads
2021-11-20 23:59:58 -08:00
Morph 463793ccb5 kernel: svc: Move all IsValid functions to an anonymous namespace 2021-11-20 22:49:13 -05:00
Morph 64079bc2f2 kernel: svc: Implement SetProcessMemoryPermission
- Used by Skyline modding framework
2021-11-20 22:18:56 -05:00
Morph d9bfc2d546 kernel: KPageTable: Rename SetCodeMemoryPermission to SetProcessMemoryPermission 2021-11-20 22:18:56 -05:00
Morph a1da80a1cd service: pm: Implement AtmosphereGetProcessId
- Used by Skyline modding framework
2021-11-20 20:56:29 -05:00
Morph 5ed5db7883 service: pm: Add all relevant result codes 2021-11-20 20:56:28 -05:00
Morph 20ac4fd61b service: pm: Rename title id to program id 2021-11-20 19:39:26 -05:00
ameerj 69759e55ee Fix screenshot dimensions when at 1x scale
This was regressed by ART.
Prior to ART, the screenshots were saved at the title's framebuffer resolution. A misunderstanding of the existing logic led to screenshot dimensions becoming dependent on the host render window size.

This changes the behavior to match how it was prior to ART at 1x, with screenshots now always being the title's framebuffer dimensions scaled by the resolution scaling factor.
2021-11-20 17:50:24 -05:00
Adam Heinermann fc017ead67 Fix crash on exit due to static scoped dummy threads 2021-11-17 15:29:25 -08:00
ameerj 4919d2d00f bootmanager: Fix screenshot resolution factor usage
Fixes screenshots at non integer scaling
2021-11-16 22:11:30 +01:00
Fernando Sahmkow fcae5dab7b Settings: eliminate rescaling_factor. 2021-11-16 22:11:27 +01:00
OatmealDome 3a4b8bac08 program_metadata: Add default ThreadInfo kernel capability 2021-11-10 22:01:05 -05:00
Morph 6e09e0f8ed applets/swkbd: Fix text check message encoding
The text check message can be encoded in UTF-8.
2021-11-08 14:57:53 -05:00
Morph ab736f254f applets/swkbd: Skip text checking if the text has been confirmed
Confirm means that the text has already been checked by the application to be correct, but is asking the user for confirmation.
The confirmation text itself seems to be corrupted though, this needs to be investigated.

Fixes the software keyboard in Famicom Detective Club: The Missing Heir
2021-11-08 13:05:50 -05:00
Narr the Reg 22ab930f36 service/pctl: Stub EndFreeCommunication
- Used by Just Dance 2022
2021-11-05 12:16:19 -04:00
Morph 86d6531083 Merge pull request #7279 from Morph1984/system-get-program-id
general: Get the current process program id directly from the system
2021-11-04 20:34:20 -04:00
Morph d60da025cf Merge pull request #7289 from ameerj/perf-stat-shutdown
core: Reorder perf_stats destruction order on Shutdown
2021-11-04 20:34:09 -04:00
ameerj a09800057a core: Reorder perf_stats destruction order on Shutdown
Avoids the gpu_core using perf_stats after it's been freed.
2021-11-04 20:19:58 -04:00
Fernando S fceef14159 Merge pull request #7287 from Morph1984/stub-aoc
service: aoc: Stub more 13.x functions used by Animal Crossing
2021-11-05 00:26:10 +01:00
Morph 41a0c088ba general: Get the current process program id directly from the system
This allows us to avoid including KProcess' header file in files that only need to get the current process' program id.
2021-11-04 16:59:39 -04:00
Morph 10508e7af2 general: Rename GetTitleID to GetProgramID 2021-11-04 16:57:16 -04:00
bunnei 0a2f5932e2 Merge pull request #7282 from ameerj/core-includes
core: Reduce unused header includes
2021-11-04 13:56:10 -07:00
Morph f6eb11caca service: aoc: Stub NotifyUnmountAddOnContent
Used by Animal Crossing: New Horizons v2.0.0 DLC
2021-11-04 16:50:08 -04:00
Morph 8096484995 service: aoc: Stub NotifyMountAddOnContent and NotifyMountAddOnContent
Used by Animal Crossing: New Horizons v2.0.0 DLC
2021-11-04 16:48:47 -04:00
german77 c3e27a75b1 service/acc: Rename Unknown160 to InitializeApplicationInfoV2 2021-11-04 10:10:58 -06:00
Morph 22584e2ade service: acc: Stub acc:u0 '160'
- Used by Animal Crossing: New Horizons v2.0.0

Since the name is currently unknown, '160' is used as a placeholder.
2021-11-04 02:57:13 -04:00
ameerj a3d1429aa5 core: Fix transitive include build errors 2021-11-03 21:42:58 -04:00
ameerj d27abf5546 core: Remove unused includes 2021-11-03 21:42:57 -04:00
Morph c3c09ca222 svc: Correct WaitSynchronization num_handles param type
num_handles is a s32
2021-11-02 22:31:04 -04:00
Morph fddd57db61 general: Remove MakeResult helpers
This is made obsolete by the presence of implicit constructors.
2021-11-02 17:23:19 -04:00
Morph 13a85dcad5 hle/result: Amend ResultVal documentation
This amends the documentation slightly to reflect the updated interface.
2021-11-02 15:20:36 -04:00
Morph 44dc3bd9a9 hle/result: Reimplement ResultVal using Common::Expected
Common::Expected effectively provides the same functions as ResultVal, so we can implement it with this.
This can be replaced with std::expected with minimal effort should it be standardized in the C++ Standard Template Library.
2021-11-02 15:20:35 -04:00
bunnei 58377818a1 Merge pull request #7227 from vonchenplus/fix_memory_leak_v2
Fix memory leak v2
2021-11-01 20:11:30 -07:00
bunnei 25b17a3ae0 Merge pull request #7244 from Morph1984/application-lang-pt-br
file_sys/ns: Add Brazilian Portuguese to the list of ApplicationLanguage
2021-10-29 22:32:38 -07:00
bunnei b9a3be8125 Merge pull request #7240 from Morph1984/resultval-remove-cv
hle/result: Remove cv-qualifiers from Arg in MakeResult
2021-10-29 21:35:32 -07:00
Morph a901de67c6 file_sys: control_metadata: Add BrazilianPortuguese 2021-10-28 20:05:26 -04:00
Morph 6616cd1b59 ns: language: Add BrazilianPortuguese to ApplicationLanguage
It seems that Nintendo finally filled that last empty spot in ApplicationLanguage for a total of 16 supported languages.
2021-10-28 20:05:05 -04:00
Morph 55362bccd9 hle/result: Declare copy/move constructor/assignment as noexcept
While we're at it, we can also declare these copy/move constructor/assignment as noexcept.
2021-10-28 04:00:21 -04:00
Morph 696c2cec31 hle/result: Add move assignment operator in ResultVal
ResultVal was missing a move assignment operator, add it.
2021-10-28 03:52:21 -04:00
Morph 498f7ed966 hle/result: Remove cv-qualifiers from Arg in MakeResult
This removes the const qualification for types when MakeResult(arg) is used in a const member function, allowing for automatic deduction and removing the need to manually specify the non-const type as the template argument.
2021-10-28 03:07:18 -04:00
Feng Chen 60df1f9030 Fix dangling kernel objects when exiting 2021-10-27 09:06:30 +08:00
Feng Chen 301d0ac5e0 Revert PR7009 2021-10-27 09:06:30 +08:00
Feng Chen c13d1e0b0f Fix memory leak 2021-10-27 09:06:22 +08:00
Morph 875a6f4432 Merge pull request #7193 from FernandoS27/idle
SVC: Implement svcInfo:IdleTickCount
2021-10-25 09:17:49 -04:00
Ameer J 2086226f1c Merge pull request #7218 from bylaws/aswdqdsam
Fixup channel submit IOCTL syncpoint parameters
2021-10-24 19:35:00 -04:00
Andrew Strelsky 5179872db6 Fixed ARM_Dynamic_64 Step 2021-10-24 11:16:32 -04:00
Billy Laws d53ca1dfdf Fixup channel submit IOCTL syncpoint parameters
The current arguments worked by happenstance as games only ever submit
one syncpoint and request one fence back, if a game were to do something
other than this then the arguments would've been parsed entirely wrong.
2021-10-24 00:01:35 +01:00
bunnei 1637f6a578 Merge pull request #7198 from ameerj/settings-chrono
settings: Remove std::chrono usage
2021-10-19 09:55:50 -07:00
bunnei 1b75cdaf19 Merge pull request #7173 from Morph1984/invalidate-unmap
KPageTable: Perform ranged invalidation when unmapping code memory
2021-10-17 03:25:26 -07:00
ameerj 6cfd975469 settings: Remove std::chrono usage
Alleviates the dependency on chrono for all files that include settings.h
2021-10-17 00:37:49 -04:00
Fernando Sahmkow 69b1cad803 SVC: Implement svcInfo:IdleTickCount
Used by the Witcher 3
2021-10-16 20:33:44 +02:00
bunnei fed3ca02b1 Merge pull request #7187 from FernandoS27/boy-i-say-boy
NVHost_Ctrl: Force wait if the gpu falls behind too long.
2021-10-15 16:14:32 -07:00
Feng Chen e0d5680fc2 service/vi: Stub IHOSBinderDriver::TransactParcel GetBufferHistory (#7184) 2021-10-15 18:50:45 -04:00
Fernando Sahmkow 3aaf788385 NvHost/Core: Address Feedback. 2021-10-16 00:23:27 +02:00
FernandoS27 50495de641 Suspend temporally 2021-10-16 00:23:23 +02:00
FernandoS27 d265a37688 NVHost_Ctrl: Force wait if the gpu falls behind too long. 2021-10-16 00:22:01 +02:00
Morph 458ab5a916 core: Move ResultStatus outside of System
Allows it to be a forward declaration in other header files.
2021-10-15 17:34:49 -04:00
Morph 3de2a8ba2c core: Remove static system instance 2021-10-15 17:34:48 -04:00
Morph c7f9f19c64 KPageTable: Perform ranged invalidation when unmapping code memory
Co-Authored-By: Fernando S. <1731197+FernandoS27@users.noreply.github.com>
2021-10-13 14:27:11 -04:00
Morph df32c5e496 Merge pull request #7110 from vonchenplus/fix_extract_offline_romefs_error
applets/web: Fallback to loader to get the manual romfs if none is found
2021-10-11 02:09:42 -04:00
Feng Chen bd64cc420f applets/web: Fallback to loader to get the manual romfs if none is found 2021-10-11 13:12:51 +08:00
Morph 6bc7f27655 kernel: hle_ipc: Foward declare KAutoObject 2021-10-07 13:32:36 -04:00
Morph 52fa30ab7d service: Reduce header include overhead 2021-10-07 13:32:21 -04:00
Fernando S d40819cfb1 Merge pull request #7118 from ameerj/vc-gpu-impl
gpu: Migrate implementation to the cpp file
2021-10-06 20:02:31 +02:00
bunnei 7d40321e67 Merge pull request #7115 from ameerj/log-compile
common/logging: Reduce dependent header include overhead
2021-10-05 10:05:46 -07:00
bunnei 8234e911f2 Merge pull request #7103 from Morph1984/service-ctx-event
service: Replace all service event creation with ServiceContext::CreateEvent
2021-10-04 17:20:46 -07:00
bunnei 04fdf31f0f Merge pull request #7107 from astrelsky/iob_fix
prevent access violation from iob in Memory::IsValidVirtualAddress
2021-10-04 11:08:35 -07:00
Ameer J 170284cf1c Merge pull request #7091 from vonchenplus/fix_memroy_leak
core: Fix memory leak
2021-10-04 00:09:08 -04:00
bunnei 5e9f62b844 Merge pull request #7113 from Morph1984/no-log-ip-addr
network: Do not log IP address
2021-10-02 23:19:34 -07:00
ameerj 7a94851e9b nvflinger: Use jthread and stop_token for VSync thread
Avoids a destruction data race that may occur on the vsync thread
2021-10-03 00:35:57 -04:00
ameerj ae3422e3b7 nvhost_ctrl: Refactor usage of gpu.LockSync()
This seems to only be used to protect a later gpu function call. So we can move the lock into that call instead.
2021-10-03 00:35:57 -04:00
ameerj 20a88d9d62 gpu: Migrate implementation to the cpp file 2021-10-03 00:35:57 -04:00
Morph 13f4f14223 service: am: Make use of Exit to exit the currently running application
This also moves the call to the end to ensure services are properly destructed on exit.
2021-10-01 23:39:55 -04:00
Morph 37e30e80ed core: Add Exit and ExitCallback
This allows ISelfController::Exit to stop the currently running application. This is typically used by homebrew to exit back to the homebrew menu after calling consoleExit with libnx.
2021-10-01 23:39:54 -04:00
Morph 0f5f1ec430 service: Replace service event creation with ServiceContext::CreateEvent
The service context helps to manage all created events and allows us to close them upon destruction.
2021-10-01 23:38:59 -04:00
Morph d929edf269 network: Do not log IP address
Logging this may be a privacy concern for some users.
2021-10-01 23:38:44 -04:00
bunnei 56926a137f Merge pull request #7102 from Morph1984/remove-boxcat
Remove Boxcat BCAT backend
2021-10-01 18:41:41 -07:00
ameerj 98b3b5e0e3 common/logging: Reduce scope of fmt include 2021-10-01 20:48:49 -04:00
ameerj f222d1e4ce common/logging: Move Log::Entry declaration to a separate header
This reduces the load of requiring to include std::chrono in all files which include log.h
2021-10-01 20:48:49 -04:00
Andrew Strelsky 5a02e7aabf prevent access violation from iob in Memory::IsValidVirtualAddress 2021-09-29 19:26:44 -04:00
Morph 203d8f7f60 style: Remove extra space preceding the :: operator 2021-09-29 01:26:01 -04:00
Morph 4be0824b5f service: bcat: Remove BoxCat BCAT implementation
The current implementation of BoxCat as it stands is non-functional due to the reliance on a server providing BCAT files.
This implementation will eventually be replaced with one that allows the use of local BCAT files dumped from a Nintendo Switch.
2021-09-29 01:21:35 -04:00
Morph ca8400ec1d externals: Remove libzip 2021-09-28 23:18:39 -04:00
Morph aa68bcdcae file_sys: Remove vfs_libzip 2021-09-28 23:18:39 -04:00
Morph aee79cc758 Merge pull request #7018 from lat9nq/splat-stubs
audin_u: stub Start, RegisterBufferEvent, AppendAudioInBufferAuto
2021-09-28 22:06:11 -04:00
Feng Chen 38fc397b0f Fix KShareMemory object leak 2021-09-29 09:51:20 +08:00
german77 2a13524331 service/es: Update to 13.0.0 2021-09-26 20:17:07 -05:00
german77 40a0ba8eea service/npns: Update to 13.0.0 2021-09-26 20:13:09 -05:00
german77 108969dc60 service/vi: Update to 13.0.0 2021-09-26 20:12:02 -05:00
german77 e2a4e12057 service/am: Update to 13.0.0 2021-09-26 20:00:12 -05:00
german77 b6af532687 service/audio: Update to 13.0.0 2021-09-26 19:49:09 -05:00
german77 f444f41880 service/hid: Update to 13.0.0 2021-09-26 19:45:47 -05:00
german77 6b95545f8a service/btdrv: Update to 13.0.0 2021-09-26 19:32:45 -05:00
german77 dccf0b7f82 service/usb: Update to 13.0.0 2021-09-26 19:26:52 -05:00
Morph b93255d853 Merge pull request #7078 from ameerj/vc-jthread-fixes
video_core: Fix jthread related hangs when stopping emulation
2021-09-26 16:40:13 -04:00
Feng Chen 974547f98f Fix KScopedAutoObject object leak when SendSyncRequest 2021-09-25 22:16:21 +08:00
Morph f9b3d812b2 service: bsd: Stub Read
- Used by Diablo II: Resurrected
2021-09-25 08:04:33 -04:00
Morph 498cb34b8e service: bsd: Implement Read
- Used by Diablo II: Resurrected
2021-09-24 16:46:52 -04:00
ameerj d7977be416 general: Update style to clang-format-12 2021-09-24 15:52:05 -04:00
ameerj a07f80d672 video_core: Fix jthread related hangs when stopping emulation
jthread on some compilers is more picky when it comes to the order in which objects are destroyed.
2021-09-23 20:34:02 -04:00
Lioncash ebeb5086b1 core/profile_select: Avoid uninitialized read in SelectProfile()
The default constructor of UUID doesn't initialize its data members, so
we need to directly initialize it to be invalid.
2021-09-22 18:10:39 -04:00
Lioncash e37bea609c common/uuid: Add validity checking functions to interface
Given we have a function to invalidate, we should also have ones to
query the validity. Also makes the code more straightforward to read.
2021-09-22 17:59:00 -04:00
bunnei 08e300eb38 Merge pull request #7019 from ameerj/videocore-jthread
videocore: Use std::jthread for worker threads
2021-09-18 20:37:40 -07:00
bunnei 4fde9d058b Merge pull request #7020 from Moonlacer/remove_audio_stretching
Remove audio stretching
2021-09-18 11:18:24 -07:00
bunnei a6f7c06446 Merge pull request #7015 from german77/NotGoodForTerra
ngct: Stub Match
2021-09-17 10:58:55 -07:00
Moonlacer 1c445d1050 remove-audio-stretching-setting 2021-09-15 19:52:43 -05:00
ameerj 2cb4bb689b gpu: Use std::jthread for async gpu thread 2021-09-15 20:49:07 -04:00
lat9nq 7fc8560939 audin_u: Return a buffer event in RegisterBufferEvent
Co-authored-by: Morph <39850852+Morph1984@users.noreply.github.com>
2021-09-15 16:38:12 -04:00
lat9nq 34c6afd6c1 audin_u: stub Start, RegisterBufferEvent, AppendAudioInBufferAuto
This also moves IAudioIn's definition to the header.

Required for Splatoon 2 LAN play.
2021-09-15 15:52:09 -04:00
Narr the Reg 77886a6134 ngct: Stub Match
Needed for  Cruis'n Blast
2021-09-15 00:17:31 -05:00
Morph 65c2d00bd9 vfs: Partially implement GetFileTimeStampRaw
Gets rid of homebrew warnings using this func
2021-09-14 08:48:01 -04:00
bunnei d3cab3095d Merge pull request #7009 from ameerj/main_process_cleanup
core: Destroy main_process during shutdown
2021-09-13 23:32:43 -07:00
ameerj 177affe3ce core: Destroy main_process during shutdown
The main_process was never being cleaned up, causing a noticeable memory leak after subsequent launches. This change cleans up the memory during Core Shutdown, mitigating the leak.
2021-09-13 23:44:52 -04:00
Morph 9191db654d FS: Mark recursive CreateDirectory as inaccurate and temporary 2021-09-12 14:06:01 -04:00
Morph 26734981cf Merge pull request #6975 from ogniK5377/acc-async-ctx
account: EnsureTokenIdCacheAsync
2021-09-12 12:03:10 -04:00
Morph 26b459393d Merge pull request #6974 from ogniK5377/fs-recursive-createdir
FS: Recursively create directories for CreateDirectory
2021-09-12 12:02:39 -04:00
Morph f2f9009a9b Merge pull request #6992 from german77/brains
hid/am: Stub SetTouchScreenConfiguration and implement GetNotificationStorageChannelEvent
2021-09-12 12:01:43 -04:00
Morph 4520ae9eed Merge pull request #6987 from Morph1984/common-error
common: Move error handling functions out of common_funcs
2021-09-12 12:01:23 -04:00
Morph e01b714fd5 Merge pull request #6986 from Morph1984/version-update
api_version: Update and add AtmosphereTargetFirmware
2021-09-12 12:01:11 -04:00
Morph 3e49eac2de kernel: Add missing <functional> include 2021-09-11 17:19:15 -04:00
Morph b529f4b6b7 file_sys/kernel_executable: Add missing <string> include 2021-09-11 17:19:14 -04:00
Morph c0ff1dce0b common: Move error handling to error.cpp/h
This allows us to avoid implicitly including <string> every time common_funcs.h is included.
2021-09-11 17:19:14 -04:00
Fernando S f35f5c5072 Merge pull request #6846 from ameerj/nvdec-gpu-decode
nvdec: Add GPU video decoding for all capable drivers and platforms
2021-09-11 23:11:32 +02:00
Fernando S 67c075d51d Merge pull request #6981 from ameerj/nvflinger-hb-format
nvflinger: Use external surface format for framebuffer creation
2021-09-11 22:35:25 +02:00
german77 a36409ff16 am: Implement GetNotificationStorageChannelEvent 2021-09-10 12:24:50 -05:00
german77 9847b58137 hid: Stub SetTouchScreenConfiguration 2021-09-10 12:24:28 -05:00
Morph e92bc1f091 api_version: Update and add AtmosphereTargetFirmware 2021-09-10 01:10:47 -04:00
Chloe 82fca3ab45 Addressed issues
Co-authored-by: Mai M. <mathew1800@gmail.com>
2021-09-09 03:00:08 +10:00
Chloe Marcec 398b0ce799 Mark is_complete as atomic 2021-09-09 00:10:52 +10:00
Chloe Marcec dd526c8bf5 Addressed issues 2021-09-09 00:09:04 +10:00
Ameer J b9193040cf Merge pull request #6971 from bunnei/buffer-queue-kevent
core: hle: service: buffer_queue: Improve management of KEvent.
2021-09-08 00:34:36 -04:00
ameerj 3e19187560 nvflinger: Use external surface format for framebuffer creation
The format member the IGBPBuffer may not always specify the correct desired format. Using the external format member ensures a valid format is provided when creating the framebuffer.

Fixes homebrew using the wrong framebuffer format.
2021-09-06 23:14:31 -04:00
Chloe Marcec 0b8d28b62a address name shadowing with system 2021-09-06 22:13:51 +10:00
Chloe Marcec e27cb5526b account: EnsureTokenIdCacheAsync
Closes #2547, #6946
2021-09-06 21:16:21 +10:00
bunnei 54d33383e8 Merge pull request #6965 from bunnei/cpu_manager_jthread
core: cpu_manager: Use jthread.
2021-09-06 03:49:14 -07:00
Chloe Marcec 2cf086d244 FS: Recursively create directories for CreateDirectory
Originally we only created the parent directory, this caused issues for creating directories which also contained subdirectories, eg `/Folder1/Folder2`

This allows the ultimate mod manager homebrew to at least boot
2021-09-06 19:35:55 +10:00
bunnei b690071dd5 core: hle: service: buffer_queue: Improve management of KEvent. 2021-09-04 22:25:46 -07:00
bunnei a1a415914d core: hle: service: nvflinger/vi: Improve management of KEvent. 2021-09-03 21:53:00 -07:00
bunnei 14d3f114a5 core: cpu_manager: Use jthread. 2021-09-03 19:05:41 -07:00
bunnei c7662fd962 Merge pull request #6905 from Morph1984/nifm-misc
nifm/network_interface: Cleanup and populate fields in GetCurrentNetworkProfile
2021-08-29 00:04:58 -07:00
german77 b036d9df7d ngct: Stub NGCT:U service 2021-08-27 14:15:34 -05:00
Morph 43f7dc615e service: nifm: Populate fields in GetCurrentNetworkProfile
Populates the current_address, subnet_mask, and gateway fields from the selected network interface.
2021-08-27 02:10:59 -04:00
Morph 40e406f9d1 service: nifm: Cleanup GetCurrentIpConfigInfo 2021-08-27 02:10:58 -04:00
Morph b755cdbd57 network_interface: Cleanup code 2021-08-27 02:10:58 -04:00
Morph 2d685e5a51 network_interface: Replace default return value with std::nullopt 2021-08-27 02:10:58 -04:00
bunnei 5e600cba3a Revert "kernel: Various improvements to scheduler" 2021-08-25 20:59:28 -07:00
ameerj 0debad63cc logging: Fix log filter during initialization
The log filter was being ignored on initialization due to the logging instance being initialized before the config instance, so the log filter was set to its default value.

This fixes that oversight, along with using descriptive exceptions instead of abort() calls.
2021-08-24 01:32:38 -04:00
Ameer J b53a87b6b4 Merge pull request #6878 from BreadFish64/optimize-GetHostThreadID
kernel: Optimize GetHostThreadID
2021-08-24 00:01:13 -04:00
bunnei f3931fe2b5 Merge pull request #6869 from yzct12345/shiny-logs-in-the-fireplace
logging: Simplify and make thread-safe
2021-08-22 20:40:18 -07:00
Morph 1c1292b13c applet_error: Fix 64-bit error code conversion 2021-08-19 13:16:48 -04:00
Valeri 6a1ad26160 Fix crash in logging in CreateStrayLayer
It was trying to log value of layer_id which is specifically known not to exist, potentially leading to segfault. Log display_id instead.
2021-08-19 19:33:07 +03:00
Valeri 190e12a072 Fix check is thread current in GetThreadContext
Misplaced break made it only check for the first core.
2021-08-19 16:46:30 +03:00
bunnei 7a90ad5238 Merge pull request #6832 from bunnei/scheduler-improvements
kernel: Various improvements to scheduler
2021-08-18 15:42:46 -07:00
ameerj 82906e26a5 configure_graphics: Add GPU nvdec decoding as an option
Some system configurations may see visual regressions or lower performance using GPU decoding compared to CPU decoding. This setting provides the option for users to specify their decoding preference.

Co-Authored-By: yzct12345 <87620833+yzct12345@users.noreply.github.com>
2021-08-16 14:40:53 -04:00
BreadFish64 8c4f818e77 kernel: Optimize GetHostThreadID 2021-08-16 07:30:23 -05:00
Sönke Holz 12499a34e6 network_interface: correct formatting 2021-08-16 12:18:19 +02:00
spholz 9701ec5ddf network_interface: fix mingw-w64 build 2021-08-16 12:06:35 +02:00
Sönke Holz 363236e2c6 network: retrieve subnet mask and gateway info 2021-08-16 10:32:25 +02:00
bunnei b2f859f47c core: hle: kernel: Disable dispatch count tracking on single core.
- This would have limited value, and would be a mess to handle properly.
2021-08-14 02:14:19 -07:00
yzct12345 aee8cc20ea logging: Simplify and make thread-safe
This simplifies the logging system.

This also fixes some lost messages on startup.

The simplification is simple. I removed unused functions and moved most things in the .h to the .cpp. I replaced the unnecessary linked list with its contents laid out as three member variables. Anything that went through the linked list now directly accesses the backends. Generic functions are replaced with those for each specific use case and there aren't many. This change increases coupling but we gain back more KISS and encapsulation.

With those changes it was easy to make it thread-safe. I just removed the mutex and turned a boolean atomic. I was planning to use this thread-safety in my next PR about stacktraces. It was actually async-signal-safety at first but I ended up using a different approach. Anyway getting rid of the linked list is important for that because have the list of backends constantly changing complicates things.
2021-08-13 18:39:45 +00:00
spholz 9826ea72b2 network: don't use reinterpret_cast in GetAvailableNetworkInterfaces 2021-08-13 11:58:34 +02:00
Sönke Holz 8c9ce19145 network: fix mingw-w64 build
The header "combaseapi.h" of mingw-w64 defines "interface" as "struct".
2021-08-13 11:23:50 +02:00
Sönke Holz da59702a7d network: don't use assert to check if no network interfaces are returned 2021-08-13 11:21:34 +02:00
Sönke Holz b8b4170dd6 network: use Common::BitCast instead of std::bit_cast 2021-08-13 01:28:14 +02:00
Sönke Holz 8e6aa553c0 network: narrow down scope of "result" in win32 code for
GetAvailableNetworkInterfaces
2021-08-13 00:37:03 +02:00
Sönke Holz a7e514f3db network: use explicit bool conversions in GetAvailableNetworkInterfaces 2021-08-13 00:31:33 +02:00
Sönke Holz 052fb4ec7e network: initialize ip_addr in GetHostIPv4Address() 2021-08-13 00:28:44 +02:00
Sönke Holz 4e840ab505 nifm: use operator*() instead of .value() to get value of std::optional 2021-08-13 00:24:33 +02:00
Sönke Holz 4262dc09d7 nifm: treat a missing host IP address as a non-critical error 2021-08-13 00:21:54 +02:00
spholz 4c093074b9 Merge branch 'yuzu-emu:master' into fix-lan-play 2021-08-12 22:27:17 +02:00
Sönke Holz d5e4ac4b29 network: correct formatting in network.cpp and network_interface.cpp 2021-08-12 22:15:48 +02:00
spholz bef7cbbe41 configuration: add option to select network interface
This commit renames the "Services" tab to "Network" and adds a combobox that allows the user to select the network interface that yuzu should use. This new setting is now used to get the local IP address in Network::GetHostIPv4Address. This prevents yuzu from selecting the wrong network interface and thus using the wrong IP address. The return type of Network::GetHostIPv4Adress has also been changed.
2021-08-12 21:32:53 +02:00
bunnei ea4923218a Merge pull request #6823 from yzct12345/memory-cleanup
memory: Clean up code
2021-08-09 17:09:56 -07:00
bunnei 8d8a230257 core: hle: kernel: k_thread: Mark KScopedDisableDispatch as nodiscard. 2021-08-07 12:33:31 -07:00
bunnei 79c64bf1ee core: cpu_manager: Use invalid core_id on init and simplify shutdown. 2021-08-07 12:33:07 -07:00
bunnei 1b1b33993b core: hle: service: buffer_queue: Improve management of KEvent. 2021-08-07 12:18:48 -07:00
bunnei 1458629fc8 core: hle: kernel: k_auto_object: Add GetName method.
- Useful purely for debugging.
2021-08-07 12:18:48 -07:00
bunnei 8cbb66daf8 core: hle: service: nvflinger/vi: Improve management of KEvent. 2021-08-07 12:18:47 -07:00
bunnei 0cd7bf70a3 core: hle: kernel: DisableDispatch on suspend threads. 2021-08-07 12:18:47 -07:00
bunnei 19457823ea core: hle: kernel: k_scheduler: Improve DisableScheduling and EnableScheduling. 2021-08-07 12:18:47 -07:00
bunnei 62b84a3e96 core: cpu_manager: Use KScopedDisableDispatch. 2021-08-07 12:18:47 -07:00
bunnei 347e4d6ab8 core: hle: kernel: Use CurrentPhysicalCoreIndex as appropriate. 2021-08-07 12:18:47 -07:00
bunnei aedc599224 core: hle: kernel: k_scheduler: Remove unnecessary MakeCurrentProcess. 2021-08-07 12:18:47 -07:00
bunnei edba87b96d core: hle: kernel: k_scheduler: Improve ScheduleImpl. 2021-08-07 12:18:47 -07:00
bunnei 0d22a55e01 core: hle: kernel: k_scheduler: Improve Unload. 2021-08-07 12:18:47 -07:00
bunnei cba49de65b core: hle: kernel: k_process: DisableDispatch on main thread. 2021-08-07 12:18:47 -07:00
bunnei 92ef6e44ee core: hle: kernel: k_handle_table: Use KScopedDisableDispatch as necessary. 2021-08-07 12:18:47 -07:00
bunnei 9951f24bad core: hle: kernel: k_thread: Add KScopedDisableDispatch. 2021-08-07 12:18:47 -07:00
bunnei 43fcb97ef3 core: hle: kernel: Ensure idle threads are closed before destroying scheduler. 2021-08-07 12:18:47 -07:00
bunnei 951143ba57 core: hle: kernel: Reflect non-emulated threads as core 3. 2021-08-07 12:18:47 -07:00
bunnei b0cb5c830c core: cpu_manager: Use jthread. 2021-08-07 12:18:47 -07:00
yzct12345 b61be44dbc memory: Address lioncash's review 2021-08-07 03:03:21 +00:00
yzct12345 a21f46127b memory: Dedup Read and Write and fix logging bugs 2021-08-07 01:32:06 +00:00
spholz b038a6deb4 Merge branch 'yuzu-emu:master' into fix-lan-play 2021-08-07 02:55:19 +02:00
Sönke Holz 47f72f9345 network: GetAndLogLastError: ignore Errno::AGAIN
If non-blocking sockets are used, they generate a lot of Errno::AGAIN errors when they didn't receive any data. These errors shouldn't be logged.
2021-08-07 02:54:25 +02:00
bunnei cb6d198101 Merge pull request #6799 from ameerj/vp9-fixes
nvdec: Fix VP9 reference frame refreshes
2021-08-06 17:46:46 -07:00
Sönke Holz 2c0d0e8af4 network: GetCurrentIpConfigInfo: return host IP address
Service::NIFM::IGeneralService::GetCurrentIpConfigInfo currently hardcodes 192.168.1.100 as the IP address, which prevents LAN play from working correctly.
2021-08-07 02:17:02 +02:00
ameerj 0c28433539 nvhost_nvdec_common: Remove BufferMap
This was mainly used to keep track of mapped buffers for later unmapping.  Since unmap is no longer implemented, this no longer seves a valuable purpose.
2021-08-06 20:11:12 -04:00
ameerj 7acf5d8bfd nvhost_nvdec_common: Stub UnmapBuffer Ioctl
Skip unmapping nvdec buffers to avoid breaking the continuity of the VP9 reference frame addresses, and the risk of invalidating data before the async GPU thread is done with it.
2021-08-06 20:06:30 -04:00
Sönke Holz 35b86fce87 network: fix fcntl cmds
F_SETFL/F_GETFL are the correct commands to set a socket to be non-blocking
2021-08-06 21:08:31 +02:00
yzct12345 7a421e7e33 memory: Clean up CopyBlock too 2021-08-05 21:09:08 +00:00
yzct12345 fa26e226de memory: Address lioncash's review 2021-08-05 20:29:43 +00:00
yzct12345 cbe093e865 memory: Clean up code 2021-08-05 20:11:14 +00:00
Morph 0971b90782 applet_swkbd: Include the null terminator in the buffer size calculation
Some games may interpret the read string as a null-terminated string instead of just reading the string up to buffer_size.
2021-08-04 22:32:09 -04:00
spholz e08a9d00e0 network: fix ternary operator in Socket::SendTo 2021-08-02 20:12:12 +02:00
Morph 11a0033a66 service: set: Correct copy amount in GetAvailableLanguageCodes 2021-08-01 11:59:52 -04:00
Morph 057a4a8a06 hle: api_version: Update HOS version to 12.1.0
Keeps us up to date with reporting the system version.
2021-07-31 14:39:49 -04:00
bunnei 8177751c0e Merge pull request #6752 from Morph1984/pt-br
service: ns, set: Add PT_BR (Brazilian Portuguese)
2021-07-30 14:42:11 -07:00
Morph ac09092898 applet_swkbd: Correct string buffer size calculation
The buffer size here does not include the initial 8 bytes.
2021-07-30 02:19:04 -04:00
Morph 2359f8283a service: set: Correct 4.0.0 max_entries to 0x40 (64) instead of 17 2021-07-30 02:15:53 -04:00
Morph 58a79102ae service: ns, set: Add PT_BR (Brazilian Portuguese) 2021-07-30 02:15:53 -04:00
Ameer J f2b7818cf0 Merge pull request #6751 from Morph1984/languagecode
service: ns: Map ZH_TW and ZH_CN to Traditional/Simplified Chinese
2021-07-29 14:41:03 -04:00
bunnei 56a35a0886 Merge pull request #6742 from Morph1984/uuid
common: uuid: Return a lower-case hex string in Format
2021-07-29 09:37:15 -07:00
Morph 6c7b6b7be0 service: ns: Remove unused ns_language header 2021-07-27 08:59:26 -04:00
Morph ae8a88d10c service: ns: Map ZH_TW and ZH_CN to Traditional/Simplified Chinese 2021-07-27 08:54:41 -04:00
Morph 881199e524 common: uuid: Return a lower-case hex string in Format 2021-07-26 23:54:59 -04:00
bunnei 08350d1744 Merge pull request #6696 from ameerj/speed-limit-rename
general: Rename "Frame Limit" references to "Speed Limit"
2021-07-26 18:51:00 -07:00
bunnei eee75fe604 Merge pull request #6697 from ameerj/fps-cap
config, nvflinger: Add FPS cap setting
2021-07-25 16:23:44 -07:00
bunnei 0a328423e8 Merge pull request #6585 from ameerj/hades
Shader Decompiler Rewrite
2021-07-25 11:39:04 -07:00
ameerj aeff61a0cc general: Rename "Frame Limit" references to "Speed Limit"
This setting is best referred to as a speed limit, as it involves the limits of all timing based aspects of the emulator, not only framerate.
This allows us to differentiate it from the fps unlocker setting.
2021-07-23 22:10:01 -04:00
ameerj 8c0d6af843 config, nvflinger: Add FPS cap setting
Allows finer tuning of the FPS limit.
2021-07-23 22:04:36 -04:00
bunnei 3cc092849c Merge pull request #6551 from bunnei/improve-kernel-obj
Improve management of kernel objects
2021-07-23 21:23:56 -04:00
ReinUsesLisp 2e6acac647 cmake: Remove shader cache version 2021-07-22 21:51:40 -04:00
lat9nq ddd4720fe4 general: Add setting shader_backend
GLASM is getting good enough that we can move it out of advanced
graphics settings. This removes the setting `use_assembly_shaders`,
opting for a enum class `shader_backend`. This comes with the benefits
that it is extensible for additional shader backends besides GLSL and
GLASM, and this will work better with a QComboBox.

Qt removes the related assembly shader setting from the Advanced
Graphics section and places it as a new QComboBox in the API Settings
group. This will replace the Vulkan device selector when OpenGL is
selected.

Additionally, mark all of the custom anisotropic filtering settings as
"WILL BREAK THINGS", as that is the case with a select few games.
2021-07-22 21:51:39 -04:00
bunnei 1bdd05134c hle: service: kernel_helpers: Remove unnecessary pragma once. 2021-07-20 18:54:56 -07:00
bunnei b9bb5338c0 hle: kernel: svc: Remove part of ExitProcess.
- ExitProcess is not actually implemented either way, and this needs more work before we implement.
2021-07-20 18:54:56 -07:00
bunnei 44ad911d6f hle: service: nvdrv: Remove unused kernel reference. 2021-07-20 18:54:56 -07:00
bunnei 1eb56afe47 hle: service: hid: npad: Remove unused kernel reference. 2021-07-20 18:54:56 -07:00
bunnei beeed68944 hle: kernel: Track and release server sessions, and protect methods with locks. 2021-07-20 18:54:56 -07:00
bunnei 179243473b hle: kernel: KProcess: Change process termination assert to a warning.
- Since we do not implement multiprocess right now, this should not be a crashing assert.
2021-07-20 18:54:56 -07:00
bunnei 81d111fd1b hle: kernel: Ensure current running process is closed. 2021-07-20 18:54:56 -07:00
bunnei 88350871df hle: kernel: Ensure global handle table is finalized before closing. 2021-07-20 18:54:56 -07:00