Commit graph

9869 commits

Author SHA1 Message Date
german77
390d49c5f1 service: hid: Refractor sixaxis functions 2022-05-27 10:21:10 -05:00
german77
3cf15af31e service: hid: Implement MergeSingleJoyAsDualJoy according to RE 2022-05-27 10:21:09 -05:00
german77
7aa1d10655 service: hid: Add error handling to setNpadAssignment and variants 2022-05-27 10:21:09 -05:00
german77
74d1b9a254 service: hid: Quick RE fixes and comments 2022-05-27 10:21:08 -05:00
Narr the Reg
bf948b5790 input_common: Make vibration request async 2022-05-23 12:25:02 -05:00
german77
c82806f9cb input_common: touch: Rewrite touch driver to support multiple touch points 2022-05-23 11:01:14 -05:00
Lioncash
f981e90af3 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
36d44bf52f 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
cc6a4bedfc 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
babd580c64 service: hid: Fix motion refresh rate 2022-05-06 11:13:49 -05:00
german77
7eb0992d2c service: hid: Disable correctly motion input 2022-05-06 11:13:48 -05:00
Morph
4559112651 hle/result: Update std::expected replacement message
std::expected is included in C++23
2022-05-03 17:44:30 -04:00
Morph
f3f3f1b7d9 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
b06f9f2606
Merge pull request #8272 from german77/stick_range
yuzu: config: Improve analog stick mapping
2022-05-03 14:36:39 -07:00
Morph
08bddd7d79 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
b50e1596cc
Merge pull request #8274 from german77/firmware
service: hid: Stub IsFirmwareUpdateNeededForNotification
2022-04-29 04:08:34 -04:00
Andrea Pappacoda
01cf05bc75
chore: add missing SPDX tags
Follow-up to 99ceb03a1c
2022-04-28 18:24:11 +02:00
bunnei
9ed0b5c5f9
Merge pull request #8229 from german77/reinterpret2
service: hid: Access shared memory directly
2022-04-27 12:31:27 -07:00
german77
173d849b8f service: hid: Stub IsFirmwareUpdateNeededForNotification
Used in Fitness Boxing 2: Rhythm & Exercise (0100073011382000)
2022-04-27 00:06:30 -05:00
Narr the Reg
17ce54d7f2 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
8304b14a90
Merge pull request #8261 from liamwhite/jit-cleanup
service: jit: document and clean up
2022-04-24 22:03:39 -04:00
Liam
64e93dc959 service: jit: document and clean up 2022-04-24 20:25:42 -04:00
Mai M
a7f7279d9d
Merge pull request #8260 from Morph1984/c4146
kernel: svc: Replace -1ULL with 0xFFFFFFFFFFFFFFFF
2022-04-24 18:25:00 -04:00
Morph
8eabdc058b kernel: svc: Replace -1ULL with 0xFFFFFFFFFFFFFFFF
Resolves the C4146 compiler warning on MSVC.
2022-04-24 17:40:47 -04:00
Merry
91a6df0361 Remove unused PrepareReschedule function 2022-04-24 12:10:16 +01:00
Narr the Reg
0f3ad939a8 service: hid: Ensure all structs are initialized 2022-04-23 17:11:43 -05:00
Narr the Reg
61582efeb9 service: hid: Access shared memory directly 2022-04-23 15:41:42 -05:00
Morph
99ceb03a1c 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
04afcfe115
Merge pull request #7976 from BytesGalore/master
loader: log the type of mismatching file-extension
2022-04-22 23:55:07 -07:00
bunnei
a1ee9799bc
Merge pull request #8222 from german77/sixaxis_test
service: hid: Improve accuracy of sixaxis functions
2022-04-21 21:25:47 -07:00
Liam
0ca4dff62c core/arm: separate backtrace collection 2022-04-20 21:39:42 -04:00
Narr the Reg
1d26fabaa7 service: hid: Improve accuracy of sixaxis functions 2022-04-18 15:02:47 -05:00
Fernando S
fd49b186fa
Merge pull request #6558 from german77/ringcon2
hidbus: Implement hidbus and ringcon
2022-04-16 15:51:14 +02:00
bunnei
a29a8c6f78
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
d2f9412cf1 yuzu: Add custom ringcon configuration 2022-04-16 00:49:26 -05:00
german77
b2359f1527 hidbus: Implement hidbus and ringcon 2022-04-16 00:49:21 -05:00
Fernando S
34710065e8
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
072b3e6e26
Merge pull request #8202 from merryhime/fix-single-core
dynarmic: Fix single core mode
2022-04-13 23:21:11 +02:00
merry
ba08f63ec4 dynarmic: Fix single core mode
Regression introduced in a5d040df3d. Closes #8201.
2022-04-13 20:40:12 +01:00
Liam
f17aaeccf9 service: jit: Implement the JIT service 2022-04-13 08:41:27 -04:00
bunnei
ca2accfb25
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
dc2dd5d5a6
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
3f0b93925f core: hle: kernel: k_thread: Rework dummy thread waiting. 2022-04-11 21:15:38 -07:00
bunnei
965c05b43d core: hle: service: Allocate a service thread. 2022-04-11 21:13:40 -07:00
bunnei
ae38b8bf5e hle: kernel: k_spin_lock: Remove unused ThreadPause. 2022-04-11 21:13:40 -07:00
bunnei
8deaac8bd1 hle: kernel: Use std::mutex instead of spin locks for most kernel locking. 2022-04-11 21:13:40 -07:00
bunnei
fd5e1e80da
Merge pull request #8157 from lat9nq/kernel-races
kernel: Fix some data races
2022-04-11 21:13:01 -07:00
Jan Beich
d13e48e002 service: sfdnsres: add missing includes for some BSDs after 82d46a974a
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
b86cfe159f
Merge pull request #8180 from liamwhite/symbols
core: extract symbol reading
2022-04-11 18:40:34 +02:00
Fernando S
4ad6bca31c
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
59cbeb3e1b dynarmic: Fix race when switching page tables 2022-04-10 15:46:29 +01:00
tech-ticks
3b91d213b1 hle: kernel: Invalidate entire icache in UnmapProcessMemory and UnmapCodeMemory (fixes #8174) 2022-04-09 13:29:19 +02:00
Liam
b29242862b core: extract symbol reading 2022-04-09 02:16:34 -04:00
bunnei
32e2fb5d33
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
a7f73d606f 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
b44a564792 hle: kernel: k_server_port: Release ref-counted host emulation members on Destroy. 2022-04-08 14:11:40 -07:00
bunnei
788bebb160 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
d737652d08 hle: service: sm: Remove manual tracking of KServerPorts. 2022-04-08 14:11:39 -07:00
bunnei
f55fc850a2 hle: kernel: hle_ipc: HasSessionRequestHandler: Check if domain handler is expired rather than locking. 2022-04-08 14:11:39 -07:00
bunnei
04efd729d6
Merge pull request #8169 from merryhime/scoped_lock
Replace lock_guard with scoped_lock
2022-04-08 14:01:42 -07:00
tech-ticks
82d46a974a service: sfdnsres: Implement DNS address resolution 2022-04-08 21:28:03 +02:00
Narr the Reg
bbaa08d7f0 core: hid: Fix double lock on softlock and forced updates 2022-04-07 17:08:01 -05:00
merry
50b10c4bac
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
1c3983c12e service: bsd: Add keepalive socket option 2022-04-07 23:30:23 +02:00
tech-ticks
f05e87402a patch_manager: Apply layered exefs patches from 'atmosphere' SD directory 2022-04-07 23:02:44 +02:00
Narr the Reg
9c85cb354a core: hid: Replace lock_guard with scoped_lock 2022-04-07 13:52:51 -05:00
Merry
d79274a5d9 core/hle: Standardize scoped_lock initializers 2022-04-07 19:44:07 +01:00
Merry
6a071c42d2 core: Replace lock_guard with scoped_lock 2022-04-07 19:44:07 +01:00
Merry
1f275eb077 core/hle: Replace lock_guard with scoped_lock 2022-04-07 19:44:07 +01:00
german77
fa5277ecdb core: hid: Reduce the amount of dataraces 2022-04-07 13:18:03 -05:00
Fernando S
50192eb4ad
Merge pull request #8148 from merryhime/interrupts
dynarmic: Better interrupts
2022-04-07 16:21:41 +02:00
Andrea Pappacoda
5ca67332ee
fix: remove #pragma once in .cpp file 2022-04-07 12:03:47 +02:00
bunnei
172137f1a0
Merge pull request #8164 from liamwhite/jit-stub
service: jit: stub JIT service
2022-04-06 18:34:45 -07:00
Liam
0cfcee95c7 service: jit: stub JIT service 2022-04-06 20:07:01 -04:00
bunnei
eb8c8db899
Merge pull request #8122 from bunnei/improve-thread-usage
Improve usage of service host threads
2022-04-06 12:25:25 -07:00
german77
8c089f4e2a service: hid: Partially revert #8123 2022-04-05 22:35:38 -05:00
bunnei
12dc4d0527
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
0c1b954e07
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
b976cac49d 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
7f11710e0a dynarmic: Print stack trace on unrecognised instruction or other exception 2022-04-05 20:40:20 +01:00
bunnei
f114436120
Merge pull request #8089 from merryhime/paranoia
configuration: Add Paranoid CPU accuracy level
2022-04-04 11:07:38 -07:00
lat9nq
983916e919 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
6bcbbb29e7 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
d6a0666268 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
5b5a1b7fa7 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
83b86d915a 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
a5d040df3d arm_dynarmic: Use HaltReason for svc calls and reschedules 2022-04-03 18:20:11 +01:00
merry
f8b8af47ad dynarmic: Better interrupts 2022-04-03 16:39:48 +01:00
bunnei
2d1af6beee
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
b5910ad0ba
Merge pull request #8123 from german77/bombslinger
service: hid: Remove inaccurate behavior on initialization
2022-04-02 20:12:45 -07:00
german77
3e5469a974 service: npad: Default initialize shared memory 2022-04-02 19:43:49 -06:00
Andrea Pappacoda
0c214cb5b9
fix: typos 2022-04-02 16:34:07 +02:00
bunnei
fdf4909f97 hle: service: nvflinger: buffer_queue_producer: Cleanup & fixes. 2022-04-01 22:59:35 -07:00
bunnei
4036e37bbe hle: service: nvflinger: consumer_base: Cleanup & fixes. 2022-04-01 22:58:40 -07:00
bunnei
30b07878ba hle: service: nvflinger: buffer_queue_producer: Cleanup & add GetReleasedBuffers. 2022-04-01 22:58:02 -07:00
bunnei
7610554b1e hle: service: nvflinger: buffer_queue_core: Cleanup & fixes. 2022-04-01 22:56:32 -07:00
bunnei
f9371f36a4 hle: service: nvflinger: Use correct logger namespace. 2022-04-01 22:55:44 -07:00
Morph
93f010c988 hle: service: nvdrv: Create a service thread where appropriate. 2022-04-02 01:24:30 -04:00
bunnei
d02bf6dab1 hle: service: vi: Create a service thread where appropriate. 2022-04-02 01:24:30 -04:00
bunnei
99770653bb hle: service: bsd: Create a service thread where appropriate. 2022-04-02 01:24:30 -04:00
bunnei
2afef2b609 hle: service: filesystem: Create a service thread where appropriate. 2022-04-02 01:24:30 -04:00
bunnei
11120b5b1e hle: service: audio: Create a service thread where appropriate. 2022-04-02 01:24:30 -04:00
bunnei
bf1750664c hle: service: Add option for service interfaces to create or use the default thread. 2022-04-02 01:24:30 -04:00
bunnei
864523327f 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
1166c3910d 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
078a6cb0cb
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
9346f0b33d service: hid: Remove inaccurate behavior on initialization 2022-03-31 12:35:57 -06:00
bunnei
c6aa4ec687
Merge pull request #8120 from german77/signal
service: hid: Signal event on AcquireNpadStyleSetUpdateEventHandle
2022-03-30 22:45:40 -07:00
bunnei
365c6ad753
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
c04e65c254 service: hid: Signal event on AcquireNpadStyleSetUpdateEventHandle 2022-03-30 17:09:28 -06:00
ameerj
69807dd208 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
ea7a0d4652 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
1383441b15 arm_dynarmic_64: Invalidate on all cores 2022-03-27 15:37:19 +01:00
Fernando S
99654721eb
Merge pull request #8088 from bunnei/fixup-nvflinger
Follow-up fixes for NVFlinger rewrite
2022-03-27 13:09:59 +02:00
bunnei
af04f8b8e9
Revert "Memory GPU <-> CPU: reduce infighting in the texture cache by adding CPU Cached memory." 2022-03-26 12:38:30 -07:00
bunnei
9408100a80 hle: kernel: k_page_table: Fix implementations of LockForCodeMemory & UnlockForCodeMemory. 2022-03-26 01:49:34 -07:00
bunnei
0c75913bf2 hle: kernel: k_page_table: Implement LockMemoryAndOpen & UnlockMemory. 2022-03-26 01:46:41 -07:00
merry
3c8547160d configuration: Add Paranoid CPU accuracy level
Disables most optimizations for the paranoid.
2022-03-26 08:46:25 +00:00
bunnei
1b3dba329a hle: kernel: svc: MapProcessMemory: Fix usage of KPageLinkedList to use physical address space. 2022-03-26 01:35:37 -07:00
bunnei
3bc0c2a625 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
94543f129e hle: kernel: k_code_memory: Fix usage of KPageLinkedList to use physical address space. 2022-03-26 01:33:16 -07:00
bunnei
5b667f5e52 hle: kernel: k_page_table: Implement MakeAndOpenPageGroup & MakePageGroup. 2022-03-26 01:25:52 -07:00
bunnei
c975a51ae7 hle: kernel: k_page_table: Add IsHeapPhysicalAddress method. 2022-03-26 01:23:43 -07:00
bunnei
f29410d821 hle: kernel: k_page_linked_list: Add Empty method. 2022-03-26 01:02:42 -07:00
bunnei
4e2401c11a hle: kernel: svc: UnmapProcessCodeMemory: Fix inverted alignment check. 2022-03-26 01:01:55 -07:00
bunnei
664d8c8732
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
25faca8ea7 hle: service: nvflinger: buffer_queue: Remove AutoLock and fix free buffer tracking. 2022-03-25 23:01:03 -07:00
bunnei
07c7f96fb2 hle: service: nvflinger: buffer_queue_consumer: Use scoped_lock instead of unique_lock. 2022-03-25 22:59:06 -07:00
bunnei
13aa0a1f24 hle: service: nvflinger: consumer_base: Use scoped_lock instead of unique_lock. 2022-03-25 22:58:52 -07:00
bunnei
741a8c3034 hle: service: nvflinger: Remove unused BufferQueue. 2022-03-25 22:58:23 -07:00
Fernando Sahmkow
a2d7b2f905 Memory: Don't protect reads on Normal accuracy. 2022-03-25 04:24:25 +01:00
bunnei
c64e1ae104 hle: nvflinger: ConsumerBase: Mark ctor as explicit. 2022-03-24 18:13:34 -07:00
bunnei
02dbb2ed54 hle: vi: NativeWindow: Fix trivially copyable issues. 2022-03-24 18:13:34 -07:00
bunnei
c9d28c30f0 hle: nvdrv: nvdata: buffer_queue_producer: Minor cleanup. 2022-03-24 18:13:34 -07:00
bunnei
241ecae867 hle: nvdrv: nvdata: Cleanup NvFence static assert. 2022-03-24 18:13:34 -07:00
bunnei
81eefcaa76 hle: nvflinger: Remove unused unordered_map include. 2022-03-24 18:13:34 -07:00
bunnei
3b13f5e43b hle: nvflinger: buffer_queue_consumer: AcquireBuffer: Fix typo. 2022-03-24 18:13:34 -07:00
bunnei
4d9488033f hle: nvflinger: Merge Rect with Common::Rectangle. 2022-03-24 18:13:33 -07:00
bunnei
e524def8c0 hle: nvflinger: buffer_queue_core: Declare default dtor. 2022-03-24 18:13:33 -07:00
bunnei
8e35eedf22 hle: nvflinger: buffer_queue_producer: DequeueBuffer: Remove unnecessary lock. 2022-03-24 18:13:33 -07:00
bunnei
0ce308047e hle: nvflinger: consumer_base: StillTracking: Should be const. 2022-03-24 18:13:33 -07:00
bunnei
480c79edba hle: nvflinger: graphic_buffer_producer: Remove unnecessary pragma pack. 2022-03-24 18:13:33 -07:00
bunnei
7db60fe7da hle: nvflinger: parcel: Reserve token size. 2022-03-24 18:13:33 -07:00
bunnei
ddd5a2b1c6 hle: nvflinger: buffer_queue_core: StillTracking: Take const reference. 2022-03-24 18:13:33 -07:00
bunnei
53058ae73f hle: nvflinger: buffer_queue_core: Cleanup locking. 2022-03-24 18:13:33 -07:00
bunnei
650c9d0d62 hle: nvflinger: Use std::chrono for present_ns. 2022-03-24 18:13:33 -07:00
bunnei
ca12a77670 hle: nvflinger: Migrate android namespace -> Service::android. 2022-03-24 18:13:33 -07:00
bunnei
5849c9a4cd hle: nvflinger: BufferQueueProducer: Handle SetPreallocatedBuffer with empty buffer.
- Used by Naruto Ultimate Ninja Storm.
2022-03-24 18:13:33 -07:00
bunnei
7f4165fc05 hle: vi: Integrate new NVFlinger and HosBinderDriverServer service. 2022-03-24 18:13:33 -07:00
bunnei
a87812c6a1 hle: nvflinger: Add implementation for HosBinderDriverServer service. 2022-03-24 18:13:33 -07:00
bunnei
56284bff6c hle: nvflinger: Add implementation for BufferQueueProducer class. 2022-03-24 18:13:33 -07:00
bunnei
bfff7b58fd hle: nvflinger: Add implementation for BufferQueueCore class. 2022-03-24 18:13:33 -07:00
bunnei
6e7f687df4 hle: nvflinger: Add implementation for BufferQueueConsumer class. 2022-03-24 18:13:32 -07:00
bunnei
41983bc0ca hle: nvflinger: Add implementation for QueueBufferInput and QueueBufferOutput structs. 2022-03-24 18:13:32 -07:00
bunnei
0057159066 hle: nvflinger: Add implementation for BufferItemConsumer class. 2022-03-24 18:13:32 -07:00
bunnei
79e8cdf595 hle: nvflinger: Add implementation for ConsumerBase class. 2022-03-24 18:13:32 -07:00
bunnei
d25cb12bff hle: nvflinger: Add implementation for BufferSlot class. 2022-03-24 18:13:32 -07:00
bunnei
c723db39c7 hle: nvflinger: Add implementation for BufferItem class. 2022-03-24 18:13:32 -07:00
bunnei
d13e18a8ed hle: nvflinger: Move implementation for Parcel to its own header. 2022-03-24 18:13:32 -07:00
bunnei
a454670de5 hle: nvflinger: Add android buffer queue definitions to its own header. 2022-03-24 18:13:32 -07:00
bunnei
fe9945ad6c hle: nvflinger: Add IBinder interface. 2022-03-24 18:13:32 -07:00
bunnei
b9cbc708e8 hle: nvflinger: Add IConsumerListener interface. 2022-03-24 18:13:32 -07:00
bunnei
81e143a3d2 hle: nvflinger: Add ProducerListener interface. 2022-03-24 18:13:32 -07:00
bunnei
fd24d5a0a2 hle: nvflinger: Add android window enumerations to its own header. 2022-03-24 18:13:32 -07:00
bunnei
05ff9e8d4e hle: nvflinger: Add android Status flags to its own header. 2022-03-24 18:13:32 -07:00
bunnei
05d80fba38 hle: nvflinger: Move BufferTransformFlags to its own header. 2022-03-24 18:13:32 -07:00
bunnei
402273d91b hle: nvdrv: Rename Fence to NvFence to avoid naming conflicts. 2022-03-24 18:13:32 -07:00
bunnei
d456b9d554 hle: nvflinger: Move PixelFormat to its own header. 2022-03-24 18:13:32 -07:00
bunnei
5a8b9a9706 hle: nvflinger: Add implementation for GraphicBuffer class. 2022-03-24 18:13:32 -07:00
bunnei
8c27465325 hle: nvflinger: Add implementation for Fence class. 2022-03-24 18:13:32 -07:00
bunnei
d47575f2c5 hle: nvflinger: Add implementation for Rect class. 2022-03-24 18:13:32 -07:00
bunnei
749efbb84b
Merge pull request #8031 from Morph1984/cleanup-mii-please
applets: Cleanup MiiEdit applet implementation
2022-03-22 21:56:42 -07:00
bunnei
e439c31c9e
Revert "dynarmic: Reduce size of code caches" 2022-03-22 18:32:54 -07:00
Morph
e6f200b960 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
e7c1e6fc27 applets/swkbd: Add new inline software keyboard types
These were added in newer firmware versions.
2022-03-21 23:58:50 -04:00
Morph
6e232b9efe applets/mii: Remove unused include 2022-03-21 23:57:31 -04:00
Morph
bcca849d0c 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
c50401903f 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
1d5f6b173d applets/mii: Cleanup MiiEdit applet types 2022-03-21 23:57:31 -04:00
Morph
7c44a4ede3 applets/mii: Move MiiEdit applet types into its own file 2022-03-21 23:57:31 -04:00
Morph
aa44ef7b64 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
e05e6853fa applets: Rename Mii to MiiEdit 2022-03-21 23:57:31 -04:00
bunnei
82ac66f8a4
Merge pull request #8048 from ameerj/include-purge
general: Reduce unused includes across the project
2022-03-21 18:03:54 -07:00
ameerj
866b7c20a8 general: Fix clang/gcc build errors 2022-03-20 02:25:09 -04:00
bunnei
5960d54722
Merge pull request #8040 from Morph1984/handle-table
KHandleTable: Optimize table entry layout
2022-03-19 23:17:37 -07:00
ameerj
923decae5a common: Reduce unused includes 2022-03-19 15:01:31 -04:00
ameerj
ade596121b core: Reduce unused includes 2022-03-19 02:23:32 -04:00
bunnei
8c8b5359f2
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
d618bba8a6 general: Reduce core.h includes 2022-03-18 02:13:02 -04:00
Morph
8b7d571b66 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
f55af65e82
Merge pull request #7964 from german77/miiii
applet: mii: Simple implementation of mii applet
2022-03-16 21:37:53 -07:00
Valeri
9e633999d6
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
e95bb782f0 core: hle: kernel: init_slab_setup: Move CalculateSlabHeapGapSize to global namespace. 2022-03-14 18:14:54 -07:00
bunnei
5f3e77d93e 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
82a2463062 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
f7d1929816 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
51589c5e21 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
0defac2f2a core: hle: kernel: k_process: Remove handle table finalize, reset page table. 2022-03-14 18:14:54 -07:00
bunnei
813b2ef253 core: hle: kernel: k_process: Implement thread local storage accurately. 2022-03-14 18:14:54 -07:00
bunnei
3210bc2767 core: hle: kernel: k_page_table: Add implementations of MapPages, UnmapPages, and FindFreeArea for TLS. 2022-03-14 18:14:54 -07:00
bunnei
15d9b0418f core: hle: kernel: k_slab_heap: Refresh to use guest allocations. 2022-03-14 18:14:54 -07:00
bunnei
a25cd4bb4b 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
91819726b1 core: hle: kernel: k_page_buffer: Add KThreadLocalPage primitive. 2022-03-14 18:14:53 -07:00
bunnei
08434842b3 core: hle: kernel: k_page_buffer: Add KPageBuffer primitive. 2022-03-14 18:14:53 -07:00
bunnei
4a28d8cebb core: hle: kernel: k_thread: Ensure host Fiber is freed. 2022-03-14 18:14:53 -07:00
bunnei
ed67e1dd10 core: hle: kernel: k_server_session: Ensure SessionRequestManager is freed. 2022-03-14 18:14:53 -07:00
bunnei
bfc4823e36 core: hle: service: kernel_helpers: Use system resource limit. 2022-03-14 18:14:53 -07:00
bunnei
8873c0c3db core: hle: service: sm: Fix KPort reference count. 2022-03-14 18:14:53 -07:00
bunnei
25c0acc388 core: hle: kernel: k_thread: Update to reflect tree changes. 2022-03-14 18:14:53 -07:00
bunnei
07c9d9bdbd core: hle: kernel: Use weak_ptr where possible for SessionRequestHandler and SessionRequestManager. 2022-03-14 18:14:53 -07:00
bunnei
ce33503adf core: hle: kernel: k_memory_layout: Update kernel slab memory sizes. 2022-03-14 18:14:53 -07:00
bunnei
0f0e1c25bc core: hle: kernel: svc_types: Add ThreadLocalRegionSize. 2022-03-14 18:14:53 -07:00
bunnei
944d9186ca core: hle: kernel: k_condition_variable: Update to reflect tree changes. 2022-03-14 18:14:53 -07:00
bunnei
158c5845ab core: hle: kernel: k_address_arbiter: Update to reflect tree changes. 2022-03-14 18:14:53 -07:00
Merry
220674d0d6 dynarmic: Reduce size of code caches 2022-03-13 22:17:14 +00:00
bunnei
853e58e593 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
f2743b41b0
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
749f76e6fe 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
1f24a4e520 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
381f1dd2c9 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
e4e92cb75c
loader: log the type of mismatching file-extension 2022-03-03 06:45:13 +01:00
bunnei
3ab82e7582
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
03d671fabc applet: mii: Simple implementation of mii applet 2022-02-28 18:53:41 -06:00
bunnei
14d28a043d hle: kernel: Re-create memory layout at initialization.
- As this can only be derived once.
2022-02-27 18:00:09 -08:00
bunnei
16e5954fcb hle: kernel: Remove unused pool locals. 2022-02-27 18:00:09 -08:00
bunnei
f87f076162 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
16784e5bb3 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
adbb9c2b00 hle: kernel: k_page_heap: GetPhysicalAddr can be const. 2022-02-27 10:34:02 -08:00
bunnei
f7e65eb971 hle: kernel: k_page_heap: Remove superfluous consexpr. 2022-02-27 10:34:02 -08:00
bunnei
06e2b76c75 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
5d1a81520c hle: kernel: Add initial_process.h header. 2022-02-27 10:34:02 -08:00
bunnei
a6496deeed hle: kernel: board: nx: Add k_memory_layout.h header. 2022-02-27 10:34:02 -08:00
bunnei
9b5e7971dc hle: kernel: k_system_control: Add GetRealMemorySize and update GetKernelPhysicalBaseAddress. 2022-02-27 10:34:02 -08:00
bunnei
18e77a54c3 hle: kernel: k_memory_layout: Add GetPhysicalLinearRegion. 2022-02-27 10:34:02 -08:00
bunnei
06a21ac229 hle: kernel: k_memory_region_types: Update for new regions. 2022-02-27 10:34:02 -08:00
bunnei
20e9501b0d
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
d44464829b service: am: Update enum names to match documentation 2022-02-21 18:00:50 -06:00
bunnei
71f62a346d 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
c0e45a3c78 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
ca5e843bf6 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
a74fddc98f 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
57ebcbf2c4 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
c7019db6f4 core: hle: kernel: KResourceLimit: Add a helper function for creating a KResourceLimit for a process. 2022-02-21 12:40:09 -08:00
bunnei
21f5912ec9
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
8d46c3cc66
Merge pull request #7920 from bunnei/fix-unmap-pages
core: hle: kernel: KPageTable: Fix UnmapPages.
2022-02-21 13:38:52 -07:00
bunnei
92b2e92620 fixup! core: hle: kernel: KPageTable: Improve Un/MapPhysicalMemory. 2022-02-19 00:14:27 -08:00
bunnei
2984695265
Merge pull request #7867 from german77/amiibo
nfp: Improve amiibo support
2022-02-19 00:57:47 -07:00
bunnei
c9260a75f6 core: hle: kernel: KPageTable: Fix UnmapPages.
- Fixes a logic bug in KPageTable::UnmapPages.
2022-02-18 23:48:16 -08:00
bunnei
1a16d055df 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
c48b9668f0
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
027ff7847c
Merge pull request #7878 from german77/mnpp
service/mnpp: Stub mnpp_app
2022-02-16 18:42:49 -07:00
Morph
4514325b9c
Merge pull request #7899 from Kelebek1/test
file_sys: Dump patched exefs rather than base
2022-02-16 16:37:09 -05:00
Kelebek1
e1201abc1e Dump patched exefs rather than base 2022-02-15 04:52:28 +00:00
Sergi Granell
c3242abe95 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
d81cdd9114
Merge pull request #7871 from german77/svc2
svc: Set unique names for function tables
2022-02-14 16:32:54 -07:00
german77
b57d61010f nfp: Allow files without password data 2022-02-13 13:52:34 -06:00
lat9nq
bfb7cbc292 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
c5d22952bf 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
ca9da569ce
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
6705439cf3 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
6a1ad03153 nfp: Separate nfc tag from amiibo data 2022-02-10 10:58:37 -06:00
Narr the Reg
d0c7c3f64f svc: Set unique names for function tables 2022-02-08 21:03:31 -06:00
bunnei
862dddf8c9
hle: kernel: KCodeMemory: Remove unused QueryMemory. 2022-02-08 18:49:41 -08:00
bunnei
d134ca68c6
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
e35c2fd5d0 nfp: Address compiler issues 2022-02-08 18:52:44 -06:00
Narr the Reg
29f9a454eb nfp: Validate amiibo files 2022-02-08 14:09:30 -06:00
german77
fc9abd3c62 nfp: Improve implementation 2022-02-08 10:08:04 -06:00
german77
c001a2af25 nfp: Move IUser class to header and add missing enum and structs 2022-02-07 09:18:22 -06:00
german77
3d24eb54ec nfp: Sort functions by command number 2022-02-07 09:18:22 -06:00
Morph
b720009dc0
Merge pull request #7847 from tech-ticks/master
service: pm: Implement AtmosphereGetProcessInfo
2022-02-05 19:22:45 -05:00
Morph
25db62ce15 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
dfe11d72e3 profile: Migrate to the new UUID implementation 2022-02-05 13:56:21 -05:00
Morph
f0340b8d22 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
ee0547e4c4 service: Migrate to the new UUID implementation 2022-02-05 13:18:46 -05:00
Morph
cb30fe50cd input/hid: Migrate to the new UUID implementation 2022-02-05 13:18:41 -05:00
bunnei
0ec5b9bff2
Merge pull request #7839 from german77/battery
yuzu: ui: Improve battery symbols
2022-02-04 18:23:35 -07:00
tech-ticks
16bf50e610 service: pm: Implement AtmosphereGetProcessInfo 2022-02-04 01:41:36 +01:00
bunnei
03186af6a1
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
064aa3de11 yuzu: ui: Improve battery symbols 2022-02-02 13:18:06 -06:00
Lioncash
f785f73e92 general: Replace NonCopyable struct with equivalents 2022-02-02 13:17:12 -05:00
Lioncash
76d83ffbec 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
995e27e9b7 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
1ed22b4613 svc: Add 32 bit SynchronizePreemptionState
Used by Espgaluda II
2022-01-31 19:02:41 -06:00
Morph
60b5670577
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
0dec42431f
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
3a1a3dd0db 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
adcac857f8
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
8dbad556ec
Merge pull request #7771 from lioncash/assert
kernel/k_affinity_mask: Remove duplicated assert
2022-01-25 16:15:18 -05:00
Lioncash
2f12caccf9 kernel/k_affinity_mask: Remove duplicated assert
This is already checked inside GetCoreBit()
2022-01-24 10:35:22 -05:00
german77
ebf19616f4 input_common: Add option to configure gyro threshold 2022-01-23 21:54:33 -06:00
bunnei
59add00d4a hle: kernel: KThread: Improve Increment/Decrement RunningThreadCount.
- Previously implementation was incorrect, and would occasionally underflow.
2022-01-22 21:09:45 -08:00
bunnei
e791da9791 core: hle: kernel: KPageTable: Various improvements to MapPages and UnmapPages. 2022-01-22 20:51:34 -08:00
bunnei
07add23251 core: hle: kernel: KPageTable: MapProcessCode: Various cleanup. 2022-01-22 20:51:34 -08:00
bunnei
ee25e0a40b core: hle: kernel: KPageTable: ReserveTransferMemory: Various cleanup. 2022-01-22 20:51:34 -08:00
bunnei
0cee5e1af8 core: hle: kernel: KPageTable: ResetTransferMemory: Various cleanup. 2022-01-22 20:51:34 -08:00
bunnei
ffcaf5af90 core: hle: kernel: KPageTable: SetMemoryAttribute: Various cleanup. 2022-01-22 20:51:34 -08:00
bunnei
2935c9d8de core: hle: kernel: KPageTable: Assert valid address on GetPhysicalAddr. 2022-01-22 01:33:26 -08:00
bunnei
264bb5abf7 core: hle: kernel: KPageTable: Operate: Assert lock ownership. 2022-01-22 01:33:26 -08:00
bunnei
0137f2e6e1 core: hle: kernel: KPageTable: SetHeapSize: Cleanup & take physical memory lock. 2022-01-22 01:33:26 -08:00
bunnei
6d8e498f76 core: hle: kernel: Refactor Un/MapPhysicalMemory to remove unnecessary methods. 2022-01-22 01:33:26 -08:00
bunnei
b8b1b58f36 core: hle: kernel: Rename Un/Map to Un/MapMeory. 2022-01-22 01:33:26 -08:00
bunnei
68c8a1b170
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
cef7649bed
Merge pull request #7752 from Morph1984/SetCpuOverclockEnabled
service: apm: Stub ISession SetCpuOverclockEnabled
2022-01-21 17:13:52 -08:00
bunnei
615fb40416 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
12bf8ca929 service/wlan: Update function tables 2022-01-21 16:35:51 -05:00
Lioncash
8dd6dc9a29 service/usb: Update function tables 2022-01-21 16:31:57 -05:00
Lioncash
43039d95ac service/set: Update function tables 2022-01-21 16:26:12 -05:00
Lioncash
7ba6f68a8d service/ns: Update function tables 2022-01-21 16:21:35 -05:00
Lioncash
19c11e2fd2 service/nim: Update unknown function table entries 2022-01-21 16:17:40 -05:00
Lioncash
888bc10c17 service/friend: Update unknown function table entries 2022-01-21 16:08:46 -05:00
Lioncash
54150f5afa service/filsystem: Update fsp-srv function table 2022-01-21 16:07:01 -05:00
Lioncash
3da43ad2a9 service/btm: Update function tables 2022-01-21 15:59:41 -05:00
Lioncash
0f7337c522 service/audio: Update audctl unknown function names 2022-01-21 15:50:38 -05:00
Lioncash
29e3636e0a service/am: Update omm function tables 2022-01-21 15:40:08 -05:00
Lioncash
a271cf89cf service/acc: Update unknown function names
Switchbrew has the function names now.
2022-01-21 15:33:22 -05:00
Morph
a396473201 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
f6815086a1 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
91ff6d4cb3 hle: kernel: KThread: DummyThread can be waited, ensure wait_queue is not nullptr. 2022-01-20 17:08:00 -08:00
bunnei
46a620f9d7 hle: kernel: KThread: Decrease DummyThread priority to ensure it is never scheduled. 2022-01-20 17:08:00 -08:00
bunnei
0b37e7cb39 hle: kernel: service_thread: Ensure dummy thread is closed & destroyed on thread exit. 2022-01-20 17:08:00 -08:00
bunnei
384e24d3e9 hle: kernel: KServerSession: Remove hack for CompleteSyncRequest.
- This does not appear to be necessary anymore.
2022-01-20 17:08:00 -08:00
bunnei
ad53dc22fd 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
5ffec69dc7 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
11a380c3da 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
f6cbb14dce 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
e781f6e767
Merge pull request #7710 from german77/just-shake-it
core/hid: Increment shake force
2022-01-20 16:53:22 -08:00
Morph
dc471700ca
Merge pull request #7726 from german77/clamp
service/hid: Initialize applet_resource on SetNpadAnalogStickUseCenterClamp
2022-01-19 14:31:15 -08:00
german77
8fa0416fee service/hid: Initialize applet_resource on SetNpadAnalogStickUseCenterClamp 2022-01-19 14:20:31 -06:00
bunnei
b5e83bcc7b
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
101d86897b
Merge pull request #7712 from bunnei/fix-thread-exit
Accurately implement thread exit
2022-01-17 18:08:24 -08:00
bunnei
5eb0b65590
Merge pull request #7732 from v1993/patch-7
kernel: remove no-op code
2022-01-17 15:37:16 -08:00
Mai M
cf4893410b
Merge pull request #7728 from v1993/patch-4
hid: fix std::transform call
2022-01-17 13:43:11 -05:00
Valeri
84786dde00
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
8eddafd9d0
hid: fix std::transform call
Found by static analysis with PVS-Studio.
2022-01-17 10:47:38 +03:00
Valeri
c624edceba
Correct assignment source for rotations
Found by static analysis with PVS-Studio
2022-01-17 10:40:41 +03:00
bunnei
5eda606952
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
b54cbc985e 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
4064e03568
Merge pull request #7707 from german77/slow-update
service/hid: Decrease motion update rate
2022-01-14 17:13:30 -08:00
bunnei
f499c8177e 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
d8b3f665db core: hle: kernel: KProcess: Integrate with KWorkerTask and add unimplemented DoWorkerTaskImpl. 2022-01-14 16:44:14 -08:00
bunnei
03884b7ea6 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
c905044e1b core: hle: kernel: Instantiate a kernel instance of KWorkerTaskManager. 2022-01-14 16:44:14 -08:00
bunnei
bf32fcc817 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
cc112f971e 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
5ce5432830
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
b2d45a4072
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
07e477f891
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
2147240e47 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
b3bcf0fa88
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
8185509683
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
d348070226
core/hid: Reduce gyro threshold even more 2022-01-11 23:15:39 -06:00
bunnei
49a0e4330e hle: kernel: k_page_table: Update SetProcessMemoryPermission. 2022-01-11 16:28:11 -08:00
bunnei
6ac44f3bdc hle: service: ldr: UnmapCodeMemory BSS only when set. 2022-01-11 16:28:11 -08:00
bunnei
6123b6ea45 hle: kernel: k_page_table: ReadAndWrite -> UserReadWrite. 2022-01-11 16:28:11 -08:00
bunnei
081669c334 hle: kernel: k_page_table: Rename *ProcessCodeMemory -> *CodeMemory. 2022-01-11 16:28:11 -08:00
bunnei
599c0763e5
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
c65c651b6f
Merge pull request #7633 from german77/hotkeys
yuzu: Add controller hotkeys
2022-01-11 10:49:23 -08:00
bunnei
acbfb0083a
Merge pull request #7682 from german77/udp_fix
input_common: Fix UDP controller mappings
2022-01-08 13:41:39 -08:00
bunnei
af4696657c core: hle: kernel: svc: Updates to SetMemoryAttribute and SetMemoryPermission. 2022-01-08 12:18:14 -08:00
bunnei
b9a313057e core: hle: kernel: k_page_table: Update CheckMemoryState. 2022-01-08 03:20:57 -08:00
german77
873d26b335 yuzu: Use pad parameter to choose the correct controller 2022-01-07 16:56:36 -06:00
german77
72c8a94a6c yuzu: Add controller hotkeys 2022-01-06 21:26:05 -06:00
german77
b94e947793 core/hid: Add home and screenshot button support 2022-01-06 21:11:27 -06:00
german77
50a7152941 core/hid: Set minimum gyro threshold 2022-01-06 20:05:59 -06:00
bunnei
afb06b1495
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
c17938f96b gpu: Add shut down method to synchronize threads before destruction 2022-01-03 20:47:26 -05:00
ameerj
7652543231 Revert "Merge pull request #7668 from ameerj/fence-stop-token"
This reverts commit e773354477, reversing
changes made to abbbdc2bc0.
2022-01-03 20:28:54 -05:00
bunnei
e773354477
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
abbbdc2bc0
Merge pull request #7664 from german77/fallback
core/hid: Add fallback to fullkey controllers
2022-01-03 15:04:37 -08:00
ameerj
d866916f42 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
da8e0f6571
Merge pull request #7648 from bunnei/thread-pinning
core: hle: kernel: Implement thread pinning.
2022-01-03 02:01:26 +01:00
german77
7a13a515d9 core/hid: Add fallback to fullkey controllers 2022-01-01 22:01:13 -06:00
bunnei
667a8ae163
Merge pull request #7647 from german77/toad
core/hid: Fix controller type validation
2021-12-30 16:54:35 -08:00
bunnei
3a89723d97 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
9ee5c4ec56 core/hid: Fix controller type validation 2021-12-29 22:51:53 -06:00
Feng Chen
1eec9590c3 Remove invalid assertion statement 2021-12-28 18:51:11 +08:00
Feng Chen
88e1e7f14b Implement few type in bufferqueue query method 2021-12-28 18:51:03 +08:00
bunnei
091463a429 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
9a0648ff0a
Merge pull request #7621 from bunnei/set-mem-perm
core: hle: kernel: Implement SetMemoryPermission.
2021-12-27 23:33:11 -08:00
bunnei
4e7a6639d2 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
a0c7d93b84 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
49e3c073a5 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
5e24f7ed31
Merge pull request #7481 from german77/gyro-bias
service/hid: Improve console motion accuracy
2021-12-21 00:13:54 -08:00
bunnei
ee6d40d414
Merge pull request #7597 from bunnei/remove-global-lock
core: hle: Remove global HLE lock.
2021-12-20 14:24:50 -08:00
ameerj
55650c5b75 kernel: Manually destroy the current process during shut down
Avoids a memory leak.
2021-12-19 01:38:25 -05:00
Morph
8e33cf1c2b
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
7feac8ba46 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
c73841500a 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
c82e6dc810 core/hid: Cancel any vibration after the test 2021-12-16 13:35:15 -06:00
Narr the Reg
6aac5d4c27 core/hid: Fix faulty analog triggers 2021-12-14 19:49:44 -06:00
Lioncash
e05d2a70b2 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
04301e1a8a
Remove erroneous #pragma once 2021-12-13 16:49:01 +03:00
bunnei
280c779898
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
316f80af87 service/hid: Improve console motion accuracy 2021-12-12 23:26:04 -06:00
bunnei
46366c6dca
Merge pull request #7519 from itsmeft24/master
kernel: svc: Implement ProcessMemory and CodeMemory SVCs
2021-12-09 00:29:09 -08:00
bunnei
5f7e73c74a
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
f6e8e61e3e
Merge pull request #7521 from german77/dual_single_joycons
service/hid: Implement SetNpadJoyAssignmentMode
2021-12-07 21:03:42 -08:00
bunnei
815189eaf3
Merge pull request #7488 from vonchenplus/support_multiple_videos_playing
Support multiple videos playing
2021-12-07 18:38:14 -08:00
itsmeft24
e05c86aa3c
Update k_code_memory.h 2021-12-07 16:58:23 -05:00
itsmeft24
d197246880
make KCodeMemory::GetSourceAddress const
Co-authored-by: Mai M. <mathew1800@gmail.com>
2021-12-07 07:58:33 -05:00
bunnei
257d3c9ecf hle: kernel k_scheduler: EnableScheduling: Remove redundant GetCurrentThreadPointer calls. 2021-12-06 16:39:18 -08:00
bunnei
9a9e7dd78b hle: kernel k_process: Remove unnecessary .at usage with thread pinning methods. 2021-12-06 16:39:18 -08:00
bunnei
834c25f4d9 hle: kernel: Remove unnecessary virtual specifier on NotifyAvailable. 2021-12-06 16:39:18 -08:00
bunnei
a63af9860b hle: kernel: Remove unnecessary virtual specifier on EndWait. 2021-12-06 16:39:18 -08:00
bunnei
3f8eb44e7d hle: kernel: k_light_condition_variable: Revert unnecessary license comment changes. 2021-12-06 16:39:18 -08:00
bunnei
2e8d737a96 hle: kernel: k_condition_variable: Revert unnecessary style changes. 2021-12-06 16:39:18 -08:00
bunnei
0d1bdfc1d4 hle: kernel: Remove unnecessary virtual specifier on CancelWait. 2021-12-06 16:39:18 -08:00
bunnei
d7f6d516ce hle: kernel: service_thread: Force stop threads on destruction. 2021-12-06 16:39:18 -08:00
bunnei
e596fac6ee hle: kernel: k_light_lock: Implement CancelWait.
- Fixes a crash in Megadimension Neptunia VII.
2021-12-06 16:39:18 -08:00
bunnei
efb5de1c5f hle: kernel: service_thread: Use std::jthread.
- Fixes a potential deadlock on service thread shutdown.
2021-12-06 16:39:18 -08:00
bunnei
a2384a18fa hle: kernel: k_thread: Skip reschedule on DisableDispatch with SC. 2021-12-06 16:39:18 -08:00
bunnei
42697527ba hle: kernel: k_thread: Rename sleeping_queue -> wait_queue. 2021-12-06 16:39:18 -08:00
bunnei
e3d156ab0e hle: kernel: svc: Fix deadlock that can occur with single core. 2021-12-06 16:39:18 -08:00
bunnei
0d9afdedc4 hle: kernel: k_thread: Treat dummy threads as a special type. 2021-12-06 16:39:18 -08:00
FernandoS27
894ed14ebc hle: kernel: fix timing on thread preemption 2021-12-06 16:39:18 -08:00
FernandoS27
3c2a451f47 hle: kernel: fix scheduling ops from HLE host thread. 2021-12-06 16:39:17 -08:00
bunnei
abbea575cf hle: kernel: Add a flag for indicating that the kernel is currently shutting down. 2021-12-06 16:39:17 -08:00
bunnei
2c49a65d2b hle: kernel: KSynchronizationObject: Fix variable shadowing. 2021-12-06 16:39:17 -08:00
bunnei
8f4ff06c4c hle: kernel: Cleanup to match coding style. 2021-12-06 16:39:17 -08:00
bunnei
316a2dd22a hle: kernel: KProcess: Improvements for thread pinning. 2021-12-06 16:39:17 -08:00
bunnei
4c74761155 hle: kernel: KThreadQueue: Remove deprecated code. 2021-12-06 16:39:17 -08:00
bunnei
f3d6e31e78 hle: kernel: KConditionVariable: Various updates & simplifications. 2021-12-06 16:39:17 -08:00
bunnei
f62c7091a2 hle: kernel: KThread: Migrate to updated KThreadQueue (part 2). 2021-12-06 16:39:17 -08:00
bunnei
b0671c7cfa hle: kernel: KThread: Migrate to updated KThreadQueue (part 1). 2021-12-06 16:39:17 -08:00
bunnei
beb55cb90e hle: kernel: KConditionVariable: Migrate to updated KThreadQueue. 2021-12-06 16:39:17 -08:00
bunnei
e942d97540 hle: kernel: KServerSession: Migrate to updated KThreadQueue. 2021-12-06 16:39:17 -08:00
bunnei
5dff28290f hle: kernel: KLightConditionVariable: Migrate to updated KThreadQueue. 2021-12-06 16:39:17 -08:00
bunnei
423acf53b7 hle: kernel: KLightLock: Migrate to updated KThreadQueue. 2021-12-06 16:39:17 -08:00
bunnei
15c721b909 hle: kernel: KAddressArbiter: Migrate to updated KThreadQueue. 2021-12-06 16:39:17 -08:00
bunnei
2f89456041 hle: kernel: KThread: Remove tracking of sync object from threads. 2021-12-06 16:39:17 -08:00
bunnei
bc1399204b hle: kernel: Update KThreadQueue and migrate KSynchronizationObject. 2021-12-06 16:39:17 -08:00
bunnei
3dc803a430 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
d14b8fc747 core: hle: kernel: k_thread: Mark KScopedDisableDispatch as nodiscard. 2021-12-06 16:39:17 -08:00
bunnei
08c63d5c75 core: cpu_manager: Use invalid core_id on init and simplify shutdown. 2021-12-06 16:39:17 -08:00
bunnei
07690572f7 core: hle: kernel: k_auto_object: Add GetName method.
- Useful purely for debugging.
2021-12-06 16:39:16 -08:00
bunnei
3239442de6 core: hle: kernel: DisableDispatch on suspend threads. 2021-12-06 16:39:16 -08:00
bunnei
284015dfd7 core: hle: kernel: k_scheduler: Improve DisableScheduling and EnableScheduling. 2021-12-06 16:39:16 -08:00
bunnei
d604edfedf core: cpu_manager: Use KScopedDisableDispatch. 2021-12-06 16:39:16 -08:00
bunnei
178584e56f core: hle: kernel: Use CurrentPhysicalCoreIndex as appropriate. 2021-12-06 16:39:16 -08:00
bunnei
629f9274ac core: hle: kernel: k_scheduler: Remove unnecessary MakeCurrentProcess. 2021-12-06 16:39:16 -08:00
bunnei
13c82d042f core: hle: kernel: k_scheduler: Improve ScheduleImpl. 2021-12-06 16:39:16 -08:00
bunnei
f412d2027a core: hle: kernel: k_scheduler: Improve Unload. 2021-12-06 16:39:16 -08:00
bunnei
f13fce3953 core: hle: kernel: k_process: DisableDispatch on main thread. 2021-12-06 16:39:16 -08:00
bunnei
4c18a207a4 core: hle: kernel: k_handle_table: Use KScopedDisableDispatch as necessary. 2021-12-06 16:39:16 -08:00
bunnei
04daefa488 core: hle: kernel: k_thread: Add KScopedDisableDispatch. 2021-12-06 16:39:16 -08:00
bunnei
3bd5d4b6f8 core: hle: kernel: Ensure idle threads are closed before destroying scheduler. 2021-12-06 16:39:16 -08:00
bunnei
669a2d2c67 core: hle: kernel: Reflect non-emulated threads as core 3. 2021-12-06 16:39:16 -08:00
bunnei
bafee97589
Merge pull request #7524 from german77/hid_stub
service/hid: Stub SetNpadCaptureButtonAssignment and ClearNpadCaptureButtonAssignment
2021-12-06 13:06:18 -08:00
german77
ac1bfe228f 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
8ed2748820
fix formatting 2021-12-06 11:02:33 -05:00
itsmeft24
e10903cab9
move private members below public members 2021-12-06 10:37:13 -05:00
itsmeft24
4bdacdedc1
fix formatting 2021-12-06 10:37:09 -05:00
itsmeft24
32854a2992
fix formatting
Co-authored-by: Mai M. <mathew1800@gmail.com>
2021-12-06 07:58:28 -05:00
german77
189741b521 service/hid: Stub SetNpadCaptureButtonAssignment and ClearNpadCaptureButtonAssignment
Used by ring fit adventure 1.2.0
2021-12-05 22:44:31 -06:00
jam1garner
29559930e9 loader: Support loading subsdk{8,9} 2021-12-05 23:07:50 -05:00
itsmeft24
14c03b9748 fix formatting 2021-12-05 19:00:29 -05:00
itsmeft24
8254f238b9 Remove unnecessary includes 2021-12-05 18:49:40 -05:00
german77
d6ae9c68f8 service/hid: Implement SetNpadJoyAssignmentMode 2021-12-05 16:18:23 -06:00
itsmeft24
b7d80c127f Add copyright notice 2021-12-05 16:49:52 -05:00
ameerj
41aec2773f general: Add missing copyright notices 2021-12-05 16:18:53 -05:00
itsmeft24
36350d3f78
Add KCodeMemory to CMakeLists.txt 2021-12-05 15:56:44 -05:00
itsmeft24
8aef8f39d8 kernel: svc: Implement Map/UnmapProcessMemory and Create/ControlCodeMemory
Used by Skyline modding framework
2021-12-05 15:04:08 -05:00
german77
7347cdb651 core/hid: Add missing controller type 2021-12-05 13:57:59 -06:00
german77
7fe455e42e core/hid: Ensure only valid npad are connected 2021-12-04 23:20:18 -06:00
Feng Chen
5462485cc3 Address feedback 2021-12-05 00:06:14 +08:00
bunnei
a2fb5a13b2
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
f138731e2f service: am: ISelfController: Stub SaveCurrentScreenshot
- Used by Disney Magical World 2: Enchanted Edition
2021-12-02 20:12:24 -05:00
Morph
762b8ad448 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
2c47f8aa18 Support multiple videos playing 2021-12-02 12:48:42 +08:00
Morph
505ae5ea1b service: friend: Implement GetCompletionEvent
- Used by Super Bomberman R Online
2021-11-30 12:19:21 -05:00
Morph
5deecd714b 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
322339a5fd 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
bfac21fca1 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
940375dfbb core: hid: hid_core: Add (Enable/DIsable)AllControllerConfiguration 2021-11-29 17:59:58 -05:00
Morph
410df5446e general: Fix handheld typo 2021-11-29 17:22:59 -05:00
Morph
04f48f0120 core: hid: Mark constructors as explicit 2021-11-29 17:20:15 -05:00
Morph
b9b28c0457 core: hid: Cleanup and amend documentation 2021-11-29 17:20:14 -05:00
bunnei
11a9bff36d
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
54f007efc6 core/ns: Implement GetReadOnlyApplicationControlDataInterface
Used in checkpoint homebrew
2021-11-27 20:30:16 -06:00
Narr the Reg
50d8e753c5 core/pdm: Stub QueryPlayStatisticsByApplicationIdAndUserAccountId
Used in checkpoint homebrew
2021-11-27 20:30:16 -06:00
german77
51df96b7c0 settings: Add debug setting to enable all controllers 2021-11-27 20:24:37 -06:00
Narr the Reg
f966c05a74 core/hid: Stub GetUniquePadsFromNpad
Used in checkpoint homebrew
2021-11-27 09:03:10 -06:00
german77
182cd9004f config: Remove vibration configuration 2021-11-26 19:31:04 -06:00
Narr the Reg
639402850a input_common: Fully implement UDP controllers 2021-11-26 15:46:36 -06:00
Narr the Reg
23bf2e3bb6 service/hid: Finish converting LIFO objects and address some nits 2021-11-24 20:30:29 -06:00
german77
922aa9410a bootmanager: Use cross-platform keyboard input 2021-11-24 20:30:28 -06:00
german77
42949738f2 kraken: Address comments from review
Fix compiler bug
2021-11-24 20:30:28 -06:00
german77
f4e5f89e6f core/hid: Improve accuary of mouse implementation 2021-11-24 20:30:28 -06:00
german77
654d76e79e core/hid: Fully implement native mouse 2021-11-24 20:30:28 -06:00
german77
bca299e8e0 input_common: Allow keyboard to be backwards compatible 2021-11-24 20:30:28 -06:00
german77
b673857d7d core/hid: Improve accuracy of the keyboard implementation 2021-11-24 20:30:28 -06:00
german77
7fcfe24a3e core/hid: Fix keyboard alignment 2021-11-24 20:30:28 -06:00
german77
71f9b90dd9 core/hid: Remove usage of native types, fix a couple of errors with motion 2021-11-24 20:30:28 -06:00
german77
e7eee36d52 service/hid: Remove includes of core.h and settings.h 2021-11-24 20:30:27 -06:00
german77
b21fcd9527 service/hid: Add support for new controllers 2021-11-24 20:30:27 -06:00
german77
d14e74132c settings: Fix controller preview not displaying the correct controller 2021-11-24 20:30:27 -06:00
german77
5d0f3540c4 core/hid: Rename NpadType to NpadStyleIndex 2021-11-24 20:30:27 -06:00
german77
84c58666a4 config: Cleanup and documentation 2021-11-24 20:30:27 -06:00
german77
157e0b85fd core/hid: Prevent Emulated controller from flapping with multiple inputs devices 2021-11-24 20:30:27 -06:00
german77
136eb9c4c2 core/hid: Fully emulate motion from button 2021-11-24 20:30:27 -06:00
german77
77fa4d4bf6 second commit lion review 2021-11-24 20:30:26 -06:00
german77
730f078302 settings: Fix Debug controller type options 2021-11-24 20:30:26 -06:00
german77
2b1b0c2a30 kraken: Address comments from review
start lion review
2021-11-24 20:30:26 -06:00
german77
61d9eb9f69 input_common: Revert deleted TAS functions 2021-11-24 20:30:26 -06:00
german77
5f69fdbfcc core/hid: Explain better what a temporary value does 2021-11-24 20:30:26 -06:00
german77
2d3a63b289 core/hid: Update structs to 13.1.0 2021-11-24 20:30:26 -06:00
german77
c085e54316 core/hid: Add TAS input 2021-11-24 20:30:26 -06:00
german77
7348e205d9 input_common: Add multiple vibration curves 2021-11-24 20:30:26 -06:00
german77
064ddacf49 core/hid: Rework battery mappings 2021-11-24 20:30:26 -06:00
german77
c6c32daf40 input_common: Add manual update options to input devices 2021-11-24 20:30:26 -06:00
german77
f01dac3bf9 service/hid: Fix memory allocated incorrectly 2021-11-24 20:30:25 -06:00
german77
464c4d26ac settings: Fix mouse and keyboard mappings 2021-11-24 20:30:25 -06:00
german77
b564f024f0 Morph review first wave 2021-11-24 20:30:25 -06:00
german77
e2e5f1beaf service/hid: Match shared memory closer to HW 2021-11-24 20:30:25 -06:00
german77
21819da8cd yuzu: Fix loading input profiles 2021-11-24 20:30:25 -06:00
german77
b5e72de753 kraken: Address comments from review
review fixes
2021-11-24 20:30:25 -06:00
german77
95cf66b655 service/hid: Use ring buffer for gestures 2021-11-24 20:30:25 -06:00
german77
85052b8662 service/hid: Fix gesture input 2021-11-24 20:30:25 -06:00
german77
af55dd1935 configuration: Migrate controller settings to emulated controller 2021-11-24 20:30:25 -06:00
german77
c3ff0a8ac0 core/hid: Fix rumble too strong at 1% 2021-11-24 20:30:24 -06:00
german77
601ac43495 core/hid: Only signal when needed 2021-11-24 20:30:24 -06:00
german77
4d308fd0b4 hid: Fix controller connection/disconnection 2021-11-24 20:30:24 -06:00
german77
72e5920240 core/hid: Documment some files 2021-11-24 20:30:24 -06:00
german77
e0da5c1bbc kraken: Fix errors from rebase and format files 2021-11-24 20:30:24 -06:00
german77
06a5ef5874 core/hid: Add output devices 2021-11-24 20:30:24 -06:00
german77
e14ae06391 core: Update input interpreter 2021-11-24 20:30:24 -06:00
german77
510c7d2953 core/frontend: Update applets 2021-11-24 20:30:24 -06:00
german77
dd62a0187d core: Remove frontend/input 2021-11-24 20:30:24 -06:00
german77
c87ad2d0d6 service/hid: Rewrite npad to use ring lifo and the emulated controller 2021-11-24 20:30:24 -06:00
german77
a2ad5762e6 service/hid: Update console sixaxis to the emulated console 2021-11-24 20:30:24 -06:00
german77
800a66d25a service/hid: Update mouse and keyboard to use ring lifo and the emulated device 2021-11-24 20:30:24 -06:00
german77
afe2d667d9 service/hid: Update touch and gestures to use ring lifo and the emulated console 2021-11-24 20:30:24 -06:00
german77
072559dede 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
dbe0301102 service/hid: Use remove duplicated code, update names 2021-11-24 20:30:23 -06:00
german77
db08721dcc service/hid: Create ring LIFO 2021-11-24 20:30:23 -06:00
german77
6e2c84042d settings: Cleanup settings 2021-11-24 20:30:23 -06:00
german77
173a6b1e57 core/emu_window: Remove touch input 2021-11-24 20:30:23 -06:00
german77
967cca10ff core: Register HID 2021-11-24 20:30:23 -06:00
german77
c3f54ff232 core/hid: Add emulated controllers 2021-11-24 20:30:23 -06:00
german77
449576df93 core/hid: Move motion_input, create input converter and hid_types 2021-11-24 20:30:22 -06:00
german77
bf71d18af9 core/hid: Move input_interpreter to hid 2021-11-24 20:30:22 -06:00
bunnei
daecbd3a7f
Merge pull request #7394 from Morph1984/svc-SetMemoryPermission
kernel: svc: Implement SetProcessMemoryPermission
2021-11-22 14:06:09 -08:00
jam1garner
4d9c9e567e arm: dynarmic: Cleanup icache op handling 2021-11-21 22:44:13 -05:00
jam1garner
c8a67a725d arm: dynarmic: Implement icache op handling for 'ic iallu' instruction 2021-11-21 21:18:56 -05:00
jam1garner
84eb3e7d02 arm: dynarmic: Implement icache op handling for 'ic ivau' instruction 2021-11-21 21:10:14 -05:00
bunnei
5082712b4e
Merge pull request #7389 from ameerj/screenshot-1x
Fix screenshot dimensions when at 1x scale
2021-11-21 02:31:32 -08:00
bunnei
ba5210675a
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
5cf93c1346 kernel: svc: Move all IsValid functions to an anonymous namespace 2021-11-20 22:49:13 -05:00
Morph
2726d705f8 kernel: svc: Implement SetProcessMemoryPermission
- Used by Skyline modding framework
2021-11-20 22:18:56 -05:00
Morph
281437c811 kernel: KPageTable: Rename SetCodeMemoryPermission to SetProcessMemoryPermission 2021-11-20 22:18:56 -05:00
Morph
9173f07a51 service: pm: Implement AtmosphereGetProcessId
- Used by Skyline modding framework
2021-11-20 20:56:29 -05:00
Morph
3dc38d185b service: pm: Add all relevant result codes 2021-11-20 20:56:28 -05:00
Morph
40cd0bb97b service: pm: Rename title id to program id 2021-11-20 19:39:26 -05:00
ameerj
fe1f06c856 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
d8a783a368 Fix crash on exit due to static scoped dummy threads 2021-11-17 15:29:25 -08:00
ameerj
80f8d4989e bootmanager: Fix screenshot resolution factor usage
Fixes screenshots at non integer scaling
2021-11-16 22:11:30 +01:00
Fernando Sahmkow
71ca84d829 Settings: eliminate rescaling_factor. 2021-11-16 22:11:27 +01:00
OatmealDome
50acc0da20 program_metadata: Add default ThreadInfo kernel capability 2021-11-10 22:01:05 -05:00
Morph
3af2117c88 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
1af499c15b 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
ced1302975
service/pctl: Stub EndFreeCommunication
- Used by Just Dance 2022
2021-11-05 12:16:19 -04:00
Morph
3a71ff44f8
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
2ceb514a39
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
0cf78a34ba 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
3ceefc64f1
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
a6e6a5ac38 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
64275dfbf4 general: Rename GetTitleID to GetProgramID 2021-11-04 16:57:16 -04:00
bunnei
f178a8ef0c
Merge pull request #7282 from ameerj/core-includes
core: Reduce unused header includes
2021-11-04 13:56:10 -07:00
Morph
21c1316503 service: aoc: Stub NotifyUnmountAddOnContent
Used by Animal Crossing: New Horizons v2.0.0 DLC
2021-11-04 16:50:08 -04:00
Morph
ef427e4cb0 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
bee6b71553 service/acc: Rename Unknown160 to InitializeApplicationInfoV2 2021-11-04 10:10:58 -06:00
Morph
f2988ecabc 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
b275f2e475 core: Fix transitive include build errors 2021-11-03 21:42:58 -04:00
ameerj
7c4b6aab2e core: Remove unused includes 2021-11-03 21:42:57 -04:00
Morph
b871388a31 svc: Correct WaitSynchronization num_handles param type
num_handles is a s32
2021-11-02 22:31:04 -04:00
Morph
cb09ea0f01 general: Remove MakeResult helpers
This is made obsolete by the presence of implicit constructors.
2021-11-02 17:23:19 -04:00
Morph
98b351758c hle/result: Amend ResultVal documentation
This amends the documentation slightly to reflect the updated interface.
2021-11-02 15:20:36 -04:00
Morph
52e52924bb 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
b118fa8698
Merge pull request #7227 from vonchenplus/fix_memory_leak_v2
Fix memory leak v2
2021-11-01 20:11:30 -07:00
bunnei
7c2c72a6d6
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
92159b210e
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
baf599c1d3 file_sys: control_metadata: Add BrazilianPortuguese 2021-10-28 20:05:26 -04:00
Morph
e4052a1dab 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
1b5c37fa29 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
189927c237 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
1ff9ad4e7c 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
dd29285e35 Fix dangling kernel objects when exiting 2021-10-27 09:06:30 +08:00
Feng Chen
052017e189 Revert PR7009 2021-10-27 09:06:30 +08:00
Feng Chen
a8b0104923 Fix memory leak 2021-10-27 09:06:22 +08:00
Morph
63ed7d9af7
Merge pull request #7193 from FernandoS27/idle
SVC: Implement svcInfo:IdleTickCount
2021-10-25 09:17:49 -04:00
Ameer J
3c8c17be4d
Merge pull request #7218 from bylaws/aswdqdsam
Fixup channel submit IOCTL syncpoint parameters
2021-10-24 19:35:00 -04:00
Andrew Strelsky
31b9797296
Fixed ARM_Dynamic_64 Step 2021-10-24 11:16:32 -04:00
Billy Laws
2dbef58eeb 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
c871320760
Merge pull request #7198 from ameerj/settings-chrono
settings: Remove std::chrono usage
2021-10-19 09:55:50 -07:00
bunnei
4e81b799f1
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
ef811c6425 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
da6673e79a SVC: Implement svcInfo:IdleTickCount
Used by the Witcher 3
2021-10-16 20:33:44 +02:00
bunnei
aef3ae1cb9
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
de81571289
service/vi: Stub IHOSBinderDriver::TransactParcel GetBufferHistory (#7184) 2021-10-15 18:50:45 -04:00
Fernando Sahmkow
53cf91d151 NvHost/Core: Address Feedback. 2021-10-16 00:23:27 +02:00
FernandoS27
198c6ad0d7 Suspend temporally 2021-10-16 00:23:23 +02:00
FernandoS27
7dca0bc11d NVHost_Ctrl: Force wait if the gpu falls behind too long. 2021-10-16 00:22:01 +02:00
Morph
17763a44d5 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
b6719094e6 core: Remove static system instance 2021-10-15 17:34:48 -04:00
Morph
50384e2619 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
97452b9558
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
0ee2185c59 applets/web: Fallback to loader to get the manual romfs if none is found 2021-10-11 13:12:51 +08:00
Morph
bea7824bd1 kernel: hle_ipc: Foward declare KAutoObject 2021-10-07 13:32:36 -04:00
Morph
7bb2dd75cd service: Reduce header include overhead 2021-10-07 13:32:21 -04:00
Fernando S
f84328934f
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
5b2fa8dd41
Merge pull request #7115 from ameerj/log-compile
common/logging: Reduce dependent header include overhead
2021-10-05 10:05:46 -07:00
bunnei
b869439969
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
1d829150ee
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
01f79d638f
Merge pull request #7091 from vonchenplus/fix_memroy_leak
core: Fix memory leak
2021-10-04 00:09:08 -04:00
bunnei
4a77ceb151
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
71e19153ef 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
6c0d902373 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
427bf76e62 gpu: Migrate implementation to the cpp file 2021-10-03 00:35:57 -04:00
Morph
2f5808b7ff 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
d8467ca6c0 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
fadcee14f8 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
219d0ba978 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
3a33519598
Merge pull request #7102 from Morph1984/remove-boxcat
Remove Boxcat BCAT backend
2021-10-01 18:41:41 -07:00
ameerj
579f4ea4bd common/logging: Reduce scope of fmt include 2021-10-01 20:48:49 -04:00
ameerj
5daf3abe65 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
4ce0a650d1
prevent access violation from iob in Memory::IsValidVirtualAddress 2021-09-29 19:26:44 -04:00
Morph
e29f3b87f1 style: Remove extra space preceding the :: operator 2021-09-29 01:26:01 -04:00
Morph
4acec5283e 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
5f6cd32c9e externals: Remove libzip 2021-09-28 23:18:39 -04:00
Morph
616d0236f5 file_sys: Remove vfs_libzip 2021-09-28 23:18:39 -04:00
Morph
781c1d8df8
Merge pull request #7018 from lat9nq/splat-stubs
audin_u: stub Start, RegisterBufferEvent, AppendAudioInBufferAuto
2021-09-28 22:06:11 -04:00
Feng Chen
5fbfc4c19e Fix KShareMemory object leak 2021-09-29 09:51:20 +08:00
german77
bc4b4e3f56 service/es: Update to 13.0.0 2021-09-26 20:17:07 -05:00
german77
d780eab357 service/npns: Update to 13.0.0 2021-09-26 20:13:09 -05:00
german77
b0e83f949e service/vi: Update to 13.0.0 2021-09-26 20:12:02 -05:00
german77
321c64a122 service/am: Update to 13.0.0 2021-09-26 20:00:12 -05:00
german77
d103e2daf9 service/audio: Update to 13.0.0 2021-09-26 19:49:09 -05:00
german77
e401c77351 service/hid: Update to 13.0.0 2021-09-26 19:45:47 -05:00
german77
4b5f0af3fd service/btdrv: Update to 13.0.0 2021-09-26 19:32:45 -05:00
german77
f5b41068e6 service/usb: Update to 13.0.0 2021-09-26 19:26:52 -05:00
Morph
5114819b6b
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
7cd43b139a Fix KScopedAutoObject object leak when SendSyncRequest 2021-09-25 22:16:21 +08:00
Morph
7dd7c54add service: bsd: Stub Read
- Used by Diablo II: Resurrected
2021-09-25 08:04:33 -04:00
Morph
06f22c3d28 service: bsd: Implement Read
- Used by Diablo II: Resurrected
2021-09-24 16:46:52 -04:00
ameerj
73666fb262 general: Update style to clang-format-12 2021-09-24 15:52:05 -04:00
ameerj
ab63a193d7 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
091e141142 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
40314cc586 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
a9c3619d26
Merge pull request #7019 from ameerj/videocore-jthread
videocore: Use std::jthread for worker threads
2021-09-18 20:37:40 -07:00
bunnei
35f46fc079
Merge pull request #7020 from Moonlacer/remove_audio_stretching
Remove audio stretching
2021-09-18 11:18:24 -07:00
bunnei
d4ee94165f
Merge pull request #7015 from german77/NotGoodForTerra
ngct: Stub Match
2021-09-17 10:58:55 -07:00
Moonlacer
44135b011f remove-audio-stretching-setting 2021-09-15 19:52:43 -05:00
ameerj
877cd60b00 gpu: Use std::jthread for async gpu thread 2021-09-15 20:49:07 -04:00
lat9nq
7bc07195c5 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
17b0955f9a 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
b34b3efbb2
ngct: Stub Match
Needed for  Cruis'n Blast
2021-09-15 00:17:31 -05:00
Morph
8d63ebcb64 vfs: Partially implement GetFileTimeStampRaw
Gets rid of homebrew warnings using this func
2021-09-14 08:48:01 -04:00
bunnei
081ccc6441
Merge pull request #7009 from ameerj/main_process_cleanup
core: Destroy main_process during shutdown
2021-09-13 23:32:43 -07:00
ameerj
67f7a6c398 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
727f607e00 FS: Mark recursive CreateDirectory as inaccurate and temporary 2021-09-12 14:06:01 -04:00
Morph
4ab549e62a
Merge pull request #6975 from ogniK5377/acc-async-ctx
account: EnsureTokenIdCacheAsync
2021-09-12 12:03:10 -04:00
Morph
f0f416e85c
Merge pull request #6974 from ogniK5377/fs-recursive-createdir
FS: Recursively create directories for CreateDirectory
2021-09-12 12:02:39 -04:00
Morph
3428232bca
Merge pull request #6992 from german77/brains
hid/am: Stub SetTouchScreenConfiguration and implement GetNotificationStorageChannelEvent
2021-09-12 12:01:43 -04:00
Morph
74030eb427
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
47b6f522bd
Merge pull request #6986 from Morph1984/version-update
api_version: Update and add AtmosphereTargetFirmware
2021-09-12 12:01:11 -04:00
Morph
6f307f1521 kernel: Add missing <functional> include 2021-09-11 17:19:15 -04:00
Morph
4a6a73e887 file_sys/kernel_executable: Add missing <string> include 2021-09-11 17:19:14 -04:00
Morph
290afc00d3 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
be4e192903
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
55854c807d
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
9bddcdac69 am: Implement GetNotificationStorageChannelEvent 2021-09-10 12:24:50 -05:00
german77
a7bbd37f81 hid: Stub SetTouchScreenConfiguration 2021-09-10 12:24:28 -05:00
Morph
c9710f6c78 api_version: Update and add AtmosphereTargetFirmware 2021-09-10 01:10:47 -04:00
Chloe
005b0e68db
Addressed issues
Co-authored-by: Mai M. <mathew1800@gmail.com>
2021-09-09 03:00:08 +10:00
Chloe Marcec
543081e4a1 Mark is_complete as atomic 2021-09-09 00:10:52 +10:00
Chloe Marcec
89958e27aa Addressed issues 2021-09-09 00:09:04 +10:00
Ameer J
eb1ba45c39
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
9e2bf49677 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
9141816b10 address name shadowing with system 2021-09-06 22:13:51 +10:00
Chloe Marcec
4e2aa50cef account: EnsureTokenIdCacheAsync
Closes #2547, #6946
2021-09-06 21:16:21 +10:00
bunnei
51ccc29cdd
Merge pull request #6965 from bunnei/cpu_manager_jthread
core: cpu_manager: Use jthread.
2021-09-06 03:49:14 -07:00
Chloe Marcec
0b891c9245 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
e05bfd2f54 core: hle: service: buffer_queue: Improve management of KEvent. 2021-09-04 22:25:46 -07:00
bunnei
fb3e9314b9 core: hle: service: nvflinger/vi: Improve management of KEvent. 2021-09-03 21:53:00 -07:00
bunnei
25a97e0139 core: cpu_manager: Use jthread. 2021-09-03 19:05:41 -07:00
bunnei
5f19b66189
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
f134a5e56c ngct: Stub NGCT:U service 2021-08-27 14:15:34 -05:00
Morph
c1e2063c0d 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
878d0225c5 service: nifm: Cleanup GetCurrentIpConfigInfo 2021-08-27 02:10:58 -04:00
Morph
871e1c6315 network_interface: Cleanup code 2021-08-27 02:10:58 -04:00
Morph
a32a7dacf4 network_interface: Replace default return value with std::nullopt 2021-08-27 02:10:58 -04:00
bunnei
0c8594b225
Revert "kernel: Various improvements to scheduler" 2021-08-25 20:59:28 -07:00
ameerj
84b4ac5729 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
bed0c3c92a
Merge pull request #6878 from BreadFish64/optimize-GetHostThreadID
kernel: Optimize GetHostThreadID
2021-08-24 00:01:13 -04:00
bunnei
f65f8b9097
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
9cb376f8c2 applet_error: Fix 64-bit error code conversion 2021-08-19 13:16:48 -04:00
Valeri
ab02addde3
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
0b3d12be40
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
aa40084c24
Merge pull request #6832 from bunnei/scheduler-improvements
kernel: Various improvements to scheduler
2021-08-18 15:42:46 -07:00
ameerj
cd016d3cb5 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
14e93f133a kernel: Optimize GetHostThreadID 2021-08-16 07:30:23 -05:00
Sönke Holz
356dbf4d1d network_interface: correct formatting 2021-08-16 12:18:19 +02:00
spholz
dc47b5a5bf network_interface: fix mingw-w64 build 2021-08-16 12:06:35 +02:00
Sönke Holz
70419f7a17 network: retrieve subnet mask and gateway info 2021-08-16 10:32:25 +02:00
bunnei
aef0ca6f0d 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
001675dced
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
deb65a5717 network: don't use reinterpret_cast in GetAvailableNetworkInterfaces 2021-08-13 11:58:34 +02:00
Sönke Holz
e660334a21 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
b18e1d031f network: don't use assert to check if no network interfaces are returned 2021-08-13 11:21:34 +02:00
Sönke Holz
a0c4c1a23a network: use Common::BitCast instead of std::bit_cast 2021-08-13 01:28:14 +02:00
Sönke Holz
8513e59431 network: narrow down scope of "result" in win32 code for
GetAvailableNetworkInterfaces
2021-08-13 00:37:03 +02:00
Sönke Holz
771de32af1 network: use explicit bool conversions in GetAvailableNetworkInterfaces 2021-08-13 00:31:33 +02:00
Sönke Holz
765e97c347 network: initialize ip_addr in GetHostIPv4Address() 2021-08-13 00:28:44 +02:00
Sönke Holz
acca8aca8c nifm: use operator*() instead of .value() to get value of std::optional 2021-08-13 00:24:33 +02:00
Sönke Holz
970d81abfc nifm: treat a missing host IP address as a non-critical error 2021-08-13 00:21:54 +02:00
spholz
78a8249593
Merge branch 'yuzu-emu:master' into fix-lan-play 2021-08-12 22:27:17 +02:00
Sönke Holz
21743daf38 network: correct formatting in network.cpp and network_interface.cpp 2021-08-12 22:15:48 +02:00
spholz
1e98e73828 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
7df790f1ae
Merge pull request #6823 from yzct12345/memory-cleanup
memory: Clean up code
2021-08-09 17:09:56 -07:00
bunnei
5060a97210 core: hle: kernel: k_thread: Mark KScopedDisableDispatch as nodiscard. 2021-08-07 12:33:31 -07:00
bunnei
9e3d1d865c core: cpu_manager: Use invalid core_id on init and simplify shutdown. 2021-08-07 12:33:07 -07:00
bunnei
99bc49e76e core: hle: service: buffer_queue: Improve management of KEvent. 2021-08-07 12:18:48 -07:00
bunnei
48a3496b93 core: hle: kernel: k_auto_object: Add GetName method.
- Useful purely for debugging.
2021-08-07 12:18:48 -07:00
bunnei
36cf96857e core: hle: service: nvflinger/vi: Improve management of KEvent. 2021-08-07 12:18:47 -07:00
bunnei
5051d3c415 core: hle: kernel: DisableDispatch on suspend threads. 2021-08-07 12:18:47 -07:00
bunnei
1798c3b6b0 core: hle: kernel: k_scheduler: Improve DisableScheduling and EnableScheduling. 2021-08-07 12:18:47 -07:00
bunnei
cbe4e32d38 core: cpu_manager: Use KScopedDisableDispatch. 2021-08-07 12:18:47 -07:00
bunnei
2dfb07388a core: hle: kernel: Use CurrentPhysicalCoreIndex as appropriate. 2021-08-07 12:18:47 -07:00
bunnei
d1c502720d core: hle: kernel: k_scheduler: Remove unnecessary MakeCurrentProcess. 2021-08-07 12:18:47 -07:00
bunnei
77ad64b97d core: hle: kernel: k_scheduler: Improve ScheduleImpl. 2021-08-07 12:18:47 -07:00
bunnei
bedcf19710 core: hle: kernel: k_scheduler: Improve Unload. 2021-08-07 12:18:47 -07:00
bunnei
7569d6774d core: hle: kernel: k_process: DisableDispatch on main thread. 2021-08-07 12:18:47 -07:00
bunnei
f2b0d28983 core: hle: kernel: k_handle_table: Use KScopedDisableDispatch as necessary. 2021-08-07 12:18:47 -07:00
bunnei
01af2f4162 core: hle: kernel: k_thread: Add KScopedDisableDispatch. 2021-08-07 12:18:47 -07:00
bunnei
2b9560428b core: hle: kernel: Ensure idle threads are closed before destroying scheduler. 2021-08-07 12:18:47 -07:00
bunnei
68eee94875 core: hle: kernel: Reflect non-emulated threads as core 3. 2021-08-07 12:18:47 -07:00
bunnei
5ea0d3629a core: cpu_manager: Use jthread. 2021-08-07 12:18:47 -07:00
yzct12345
5f97f74a9a
memory: Address lioncash's review 2021-08-07 03:03:21 +00:00
yzct12345
70cc4c0f46
memory: Dedup Read and Write and fix logging bugs 2021-08-07 01:32:06 +00:00
spholz
33ebe471e8
Merge branch 'yuzu-emu:master' into fix-lan-play 2021-08-07 02:55:19 +02:00
Sönke Holz
ddeb8d854e 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
f183668a87
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
dd5c41b5a6 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
156ea746a3 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
cc8ac112fc 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
652e5e3df0 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
e611f522c2
memory: Clean up CopyBlock too 2021-08-05 21:09:08 +00:00
yzct12345
4edfa6ad8f
memory: Address lioncash's review 2021-08-05 20:29:43 +00:00
yzct12345
6df9611059
memory: Clean up code 2021-08-05 20:11:14 +00:00
Morph
f10dc35dd0 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
e71f78d04c
network: fix ternary operator in Socket::SendTo 2021-08-02 20:12:12 +02:00
Morph
3b4d427993 service: set: Correct copy amount in GetAvailableLanguageCodes 2021-08-01 11:59:52 -04:00
Morph
9143fe5d3a 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
47f13a9df4
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
ba3d230421 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
6ca8ed9e58 service: set: Correct 4.0.0 max_entries to 0x40 (64) instead of 17 2021-07-30 02:15:53 -04:00
Morph
21ff0a3d6e service: ns, set: Add PT_BR (Brazilian Portuguese) 2021-07-30 02:15:53 -04:00
Ameer J
23b3333f72
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
5acf020389
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
a6359fe9ae service: ns: Remove unused ns_language header 2021-07-27 08:59:26 -04:00
Morph
d7cd316a6c service: ns: Map ZH_TW and ZH_CN to Traditional/Simplified Chinese 2021-07-27 08:54:41 -04:00
Morph
b9b48aee7d common: uuid: Return a lower-case hex string in Format 2021-07-26 23:54:59 -04:00
bunnei
d6c799494c
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
c09557acd8
Merge pull request #6697 from ameerj/fps-cap
config, nvflinger: Add FPS cap setting
2021-07-25 16:23:44 -07:00
bunnei
98b26b6e12
Merge pull request #6585 from ameerj/hades
Shader Decompiler Rewrite
2021-07-25 11:39:04 -07:00
ameerj
9dfbc9bdce 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
2c6e274b39 config, nvflinger: Add FPS cap setting
Allows finer tuning of the FPS limit.
2021-07-23 22:04:36 -04:00
bunnei
2656020608
Merge pull request #6551 from bunnei/improve-kernel-obj
Improve management of kernel objects
2021-07-23 21:23:56 -04:00
ReinUsesLisp
4a82450c81 cmake: Remove shader cache version 2021-07-22 21:51:40 -04:00
lat9nq
1152d66ddd 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
346bfb6c47 hle: service: kernel_helpers: Remove unnecessary pragma once. 2021-07-20 18:54:56 -07:00
bunnei
f3db3dcc8d 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
185b19fd5b hle: service: nvdrv: Remove unused kernel reference. 2021-07-20 18:54:56 -07:00
bunnei
6c6e730e9a hle: service: hid: npad: Remove unused kernel reference. 2021-07-20 18:54:56 -07:00
bunnei
52caa52cc2 hle: kernel: Track and release server sessions, and protect methods with locks. 2021-07-20 18:54:56 -07:00
bunnei
8d755147d8 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
854c7a3c28 hle: kernel: Ensure current running process is closed. 2021-07-20 18:54:56 -07:00
bunnei
ecf3653444 hle: kernel: Ensure global handle table is finalized before closing. 2021-07-20 18:54:56 -07:00
bunnei
24540e0ad9 kernel: svc: ConnectToNamedPort: Close extra reference to port. 2021-07-20 18:54:56 -07:00
bunnei
7bd020e030 hle: service: sm: Refactor to better manage ports. 2021-07-20 18:54:55 -07:00
bunnei
b119363fc2 hle: kernel: k_process: Close the handle table on shutdown. 2021-07-20 18:54:55 -07:00
bunnei
6020723e77 hle: kernel: k_process: Close main thread reference after it is inserted into handle table. 2021-07-20 18:54:55 -07:00
bunnei
fe402d3506 hle: kernel: Ensure global handle table is initialized. 2021-07-20 18:54:55 -07:00
bunnei
015058fadf hle: service: Add a helper module for managing kernel objects. 2021-07-20 18:54:55 -07:00
bunnei
929994132a hle: kernel: Provide methods for tracking dangling kernel objects. 2021-07-20 18:54:55 -07:00
Morph
9b7e57f3f4 applet_controller: Add preliminary support for version 8
Version 8 adds support for key remapping introduced in FW 11.0, we will not be implementing this for now.
2021-07-20 01:45:19 -04:00
Feng Chen
07073734ed
file_sys: Support load game collection (#6582)
Adds support for loading games with multiple programs embedded within such as the Dragon Quest 1+2+3 Collection
2021-07-20 01:10:05 -04:00
Fernando S
da4ca4f2f9
Merge pull request #6525 from ameerj/nvdec-fixes
nvdec: Fix Submit Ioctl data source, vic frame dimension computations
2021-07-15 15:17:50 +02:00
Morph
0d88a2bc05 applets/web: Resolve Nintendo CDN URLs
This fixes the hint videos in New Super Mario Bros. U Deluxe
2021-07-15 00:31:46 -04:00
ameerj
8943f2158d nvhost_nvdec_common: Read Submit ioctl data from object addr
Fixes Mario Golf intro video decoding.
2021-07-14 23:56:24 -04:00
ameerj
3f601ed8bc nvhost_nvdec_common: Fix {Slice/Write}Vectors return
Plus some minor cleanup for consistency.
2021-07-14 22:30:58 -04:00
Morph
c6d7da88c7 service: Append service name prefix to common filenames 2021-07-14 02:09:14 -04:00
Morph
79824d7d1b applets: Append applet_ prefix to backend applets 2021-07-14 01:07:09 -04:00
Ameer J
f2599534f8
Merge pull request #6599 from german77/disable_rumble
npad: Disable vibration check if disabled
2021-07-13 16:11:59 -04:00
bunnei
b8becb0608
Merge pull request #6615 from ReinUsesLisp/httplib-debug-warnings
boxcat,web_service: Silence -Wmaybe-uninitialized when including httplib.h
2021-07-12 22:11:19 -07:00
ReinUsesLisp
1ef64112b3 content_archive: Remove unnecessary include to <ranges>
Fixes build issues on clang.
2021-07-12 03:37:56 -03:00
ReinUsesLisp
69214ef678 boxcat: Silence -Wmaybe-uninitialized in httplib.h 2021-07-12 03:30:45 -03:00
german77
ed5f1a45b7 npad: Disable vibration check if disabled 2021-07-10 20:06:07 -05:00
lat9nq
dc06e11a7b settings, arm_dynarmic, yuzu qt: Move CPU debugging option
Decouples the CPU debugging mode from the enumeration to its own
boolean. After this, it moves the CPU Debugging tab over to a sub tab
underneath the Debug tab in the configuration UI.
2021-07-08 16:56:44 -04:00
lat9nq
eebf39b3c0 arm_dynarmic_64: Re-add fastmem_address_space_bits to Auto setting 2021-07-08 15:14:45 -04:00
lat9nq
87b6e14d7c arm_dynarmic{32,64}: Fixes from test build
Now sets optimizations regardless of the Settings. Drops unsafe fastmem
optimization.
2021-07-08 14:56:09 -04:00
lat9nq
7ab5767157 core,common,yuzu qt: Add CPU accuracy option 'Auto'
The current CPU accuracy settings in yuzu are fairly polarized and
require more than common knowledge to know what the optimal settings for
yuzu would be. This adds a curated option called 'Auto' that applies a
few at the moment known-good unsafe optimizations to Dynarmic.
2021-07-08 14:56:09 -04:00
Ameer J
5edc96f4a4
Merge pull request #6539 from lat9nq/default-setting
general: Move most settings' defaults and labels into their definition
2021-07-08 14:46:31 -04:00
lat9nq
a949ee0410 general: Code formatting improvements
Slight improvements to readability.

Dropped suggestions for string_view (settings.h:101), pass by value
(settings.h:82), reverting double to a float (config.cpp:316), and other
smaller ones, some out of scope.

Addresses review feedback.

Co-authored-by: Ameer J <52414509+ameerj@users.noreply.github.com>
2021-07-08 14:07:10 -04:00
bunnei
8542f2f3fc
Merge pull request #6567 from Kelebek1/Audio2
[audren] Report 2 channels active rather than 1
2021-07-07 14:52:08 -07:00
Kelebek1
b9f915e07a Report 2 channels active. Fixes Tales of Vesperia's mono channel audio. 2021-07-06 18:52:49 +01:00
Morph
ebb82b0b83 CMakeLists: Treat -Wsign-compare as an error on GCC/Clang
Treats (un)signed comparison mismatches as errors to be consistent with MSVC
2021-07-06 12:50:09 -04:00
bunnei
bf50345d4c
Merge pull request #6537 from Morph1984/warnings
general: Enforce multiple warnings in MSVC
2021-07-05 17:09:23 -07:00
Morph
5dfa313d2c service: mii: Retrieve the correct default miis.
We were including the first 2 default miis which are not meant to be shown in games. With this change, we properly retrieve the 6 default miis shown in games, with 3 of each gender.
2021-07-04 05:38:34 -04:00
bunnei
2fc0a760f0
Merge pull request #6498 from Kelebek1/Audio
[audio_core] Decouple audio update and processing, and process at variable rate
2021-07-03 00:24:33 -07:00
Kelebek1
b455043e45 Fix XC2/VOEZ crashing, add audio looping and a few misc fixes 2021-07-01 06:01:01 +01:00
lat9nq
0e5c74bc9e core, input_common: Miscellaneous fixes
bcat: Fix settings access

telemetry_session: Fix settings accesses

So this is what I get for testing with the web service disabled.

touch_from_button: Fix settings access for clang
2021-06-28 20:56:17 -04:00
lat9nq
b91b76df4f general: Make most settings a BasicSetting
Creates a new BasicSettings class in common/settings, and forces setting
a default and label for each setting that uses it in common/settings.
Moves defaults and labels from both frontends into common settings.
Creates a helper function in each frontend to facillitate reading the
settings now with the new default and label properties.

Settings::Setting is also now a subclass of Settings::BasicSetting. Also
adds documentation for both Setting and BasicSetting.
2021-06-28 17:32:17 -04:00
Morph
e828c5a559 core: Enforce C4242 2021-06-28 14:20:25 -04:00
Morph
511ee03a21 patch_manager: Do not apply LayeredFS mods when dumping
We should not apply any mods when dumping a game's RomFS.
2021-06-28 10:14:36 -04:00
Morph
6ac978426c filesystem: Open a read-only directory for SDMC mods
This prevents mod files from being locked due to the read-only share flag in Windows.
2021-06-28 10:08:08 -04:00
lat9nq
844e0114b0 core: Simplify SDMC mod loading
If someone else wants to support other mod formats in the SDMC
directory, that can be added later. For now, just allow RomFS modding
here and force people to do other types of mods the old way.

Addresses review comments.

Co-authored-by: LC <mathew1800@gmail.com>
2021-06-28 10:08:08 -04:00
lat9nq
1664c74a6c core: Support LayeredFS mod from SDMC directory
Enables loading a mod directly from `[yuzu data
directory]/sdmc/atmosphere/contents/[title_id]`. For use with some
homebrew mod managers.
2021-06-28 10:08:07 -04:00
Kelebek1
0857d6a3db Decouple audio processing and run at variable rate
Currently, processing of audio samples is called from AudioRenderer's Update method, using a fixed 4 buffers to process the given samples. Games call Update at variable rates, depending on framerate and/or sample count, which causes inconsistency in audio processing. From what I've seen, 60 FPS games update every ~0.004s, but 30 FPS/160 sample games update somewhere between 0.02 and 0.04, 5-10x slower. Not enough samples get fed to the backend, leading to a lot of audio skipping.

This PR seeks to address this by de-coupling the audio consumption and the audio update. Update remains the same without calling for buffer queuing, and the consume now schedules itself to run based on the sample rate and count.
2021-06-27 15:58:07 +01:00
bunnei
432fab7c4f
Merge pull request #6526 from bunnei/doom-update
services: Misc. minor changes for latest SDK update.
2021-06-26 01:21:55 -07:00
bunnei
36d581ec73 hle: service: hwopus: OpenHardwareOpusDecoderEx: Remove unused buffer size. 2021-06-26 00:38:08 -07:00
bunnei
b9c2732121
Merge pull request #6519 from Wunkolo/mem-size-literal
common: Replace common_sizes into user-literals
2021-06-24 19:09:12 -07:00
bunnei
982be246ab hle: hle_helpers: Skip data payload offset checks on TIPC requests.
- TIPC does not use this.
2021-06-24 18:39:43 -07:00
bunnei
3565e32f4d hle: service: hwopus: Implement GetWorkBufferSizeEx and OpenHardwareOpusDecoderEx.
- This is used by the latest update of Doom Eternal.
2021-06-24 18:25:37 -07:00
bunnei
d1ba4a2db2 hle: service: aoc: Stub GetAddOnContentListChangedEventWithProcessId.
- This is used by the latest update of Doom Eternal.
2021-06-24 18:22:53 -07:00
Wunkolo
4569f39c7c common: Replace common_sizes into user-literals
Removes common_sizes.h in favor of having `_KiB`, `_MiB`, `_GiB`, etc
user-literals within literals.h.

To keep the global namespace clean, users will have to use:

```
using namespace Common::Literals;
```

to access these literals.
2021-06-24 09:27:40 -07:00
bunnei
4dc2f5a341
Merge pull request #6522 from Morph1984/pragma
general: Add missing #pragma once directives
2021-06-24 08:53:27 -07:00
Morph
eed0d1f33b general: Add missing #pragma once directives 2021-06-24 07:20:57 -04:00
Chloe
f216a9432b
Add missing includes (#6521)
* Add missing includes

* Add array
2021-06-24 03:24:17 -04:00
bunnei
1b09d6628b
Merge pull request #6517 from lioncash/fmtlib
externals: Update fmt to 8.0.0
2021-06-23 15:31:04 -07:00
bunnei
809e5fd523
Merge pull request #6504 from Kelebek1/samples-played
[audout] Implement GetAudioOutPlayedSampleCount
2021-06-23 11:31:12 -07:00
Lioncash
d0b1f2bd05 General: Resolve fmt specifiers to adhere to 8.0.0 API where applicable
Also removes some deprecated API usages.
2021-06-23 13:48:21 -04:00
Mai M
4ec7d79174
Merge pull request #6510 from ReinUsesLisp/npad-data-race
npad: Fix data race when updating devices
2021-06-22 22:17:57 -04:00
bunnei
0308a2679e
Merge pull request #6493 from Morph1984/fs-nodiscard
common: fs: Miscellaneous changes
2021-06-22 17:21:59 -07:00
bunnei
255f8d22d7
Merge pull request #6472 from Morph1984/spl
service: spl: Implement general SPL service
2021-06-22 15:43:10 -07:00
bunnei
791d3d1bea
Merge pull request #6483 from Morph1984/get-tz-file
service: time: Use GetFileRelative to get files within subdirectories
2021-06-22 14:25:41 -07:00
Morph
0394893354 vfs_real: Fix Mode to FileAccessMode conversion
These enforce requiring the file to exist prior to opening.
2021-06-22 15:07:51 -04:00
Morph
81b1b71993 common: fs: Remove [[nodiscard]] attribute on Remove* functions
There are a lot of scenarios where we don't particularly care whether or not the removal operation and just simply attempt a removal.

As such, removing the [[nodiscard]] attribute is best for these functions.
2021-06-22 13:36:24 -04:00
Mai M
698add8541
Merge pull request #6511 from ReinUsesLisp/core-is-powered-data-race
core: Make is_powered_on atomic
2021-06-22 04:28:38 -04:00
Rodrigo Locatti
c9c8537643 core: Make is_powered_on atomic
Fixes potential data races when shutting down.
2021-06-22 04:33:07 -03:00
Rodrigo Locatti
15cc561d12 npad: Fix data race when updating devices
Add a lock to avoid data races.
This reduces the number of -fsanitize=thread errors significantly.
2021-06-22 03:16:21 -03:00
bunnei
2a7a65c944
Merge pull request #6481 from Morph1984/missing-peak-set
kernel: Fix missing peak set in KResourceLimit::SetLimitValue
2021-06-21 22:16:48 -07:00
Kelebek1
ba3af04da1 Implement audout GetAudioOutPlayedSampleCount
Used in Ninja Gaiden games.
2021-06-22 04:39:17 +01:00
bunnei
0485b8e84b
Merge pull request #6499 from FernandoS27/we-were-on-a-break
Update dynarmic and add new unsafe CPU option.
2021-06-21 14:56:08 -07:00
Fernando Sahmkow
2298508465 Update dynarmic and add new unsafe CPU option. 2021-06-20 20:40:02 +02:00
Morph
fd5ef1970c service: time: Use GetFileRelative to get files within subdirectories
The timezone info file can be within subdirectories (such as Asia/Tokyo), use GetFileRelative instead of GetFile to get files within subdirectories.
2021-06-18 11:25:26 -04:00
Morph
1a5eceeb9c kernel: Fix missing peak set in KResourceLimit::SetLimitValue 2021-06-18 07:27:48 -04:00
ameerj
3522fc019c nvflinger: Add toggle to disable buffer swap interval limits
Enabling this setting will allow some titles to present more frames to
the screen as they become available in the nvflinger buffer queue.
2021-06-17 01:41:56 -04:00
bunnei
973bf306ed
Merge pull request #6464 from ameerj/disable-astc
textures: Add a toggle for GPU Accelerated ASTC decoder
2021-06-16 11:29:10 -07:00
Morph
4a4e304319 spl: Mark the other functions as unimplemented 2021-06-16 01:46:45 -04:00
Morph
8ba83c4c2a spl: Implement spl::GetConfig 2021-06-16 01:46:45 -04:00
Morph
e4318a1914 hle: api_version: Add HLE API version constants 2021-06-16 01:46:45 -04:00
Morph
ded36b8688 spl: Add the general SPL interface 2021-06-16 01:46:45 -04:00
Morph
faf11fe46d spl: Add SPL types 2021-06-16 01:46:45 -04:00
Morph
95f203b7c7 spl: Add SPL result codes 2021-06-16 01:07:58 -04:00
Morph
0f48292de1 fsp_srv: Fix filesystem access logging
This introduces a new setting Enable FS Access Log which saves the filesystem access log to sdmc:/FsAccessLog.txt

If this setting is not enabled, this will indicate to FS to not call OutputAccessLogToSdCard.

Fixes softlocks during loading in Xenoblade Chronicles 2 when certain DLC is enabled.
2021-06-16 00:06:02 -04:00
ameerj
b2955479e5 configure_graphics: Add Accelerate ASTC decoding setting 2021-06-15 20:19:00 -04:00
ameerj
422a15ee75 lm: Demote guest logs to LOG_DEBUG
Guest logs are not very useful, as they are intended for use by the game developers during development. As such, they provide little meaning to be logged by yuzu and tend to overwhelm the log output at times.
2021-06-14 22:23:27 -04:00
Morph
a4454329c1 general: Remove extraneous includes 2021-06-13 11:32:43 -04:00
Morph
56afd4ab4b
Merge pull request #6452 from german77/sixaxis_firmware_stub
hid: Stub IsFirmwareUpdateAvailableForSixAxisSensor
2021-06-13 05:28:32 -04:00
german77
827483409b hid: Stub IsFirmwareUpdateAvailableForSixAxisSensor 2021-06-11 14:44:46 -05:00
Mai M
9951322e5a
Merge pull request #6422 from FernandoS27/i-am-the-senate
Implement/Port Fastmem from Citra to Yuzu
2021-06-11 14:26:54 -04:00
bunnei
0c0c1a039e
Merge pull request #6443 from Morph1984/k-light-condition-variable
kernel: KLightConditionVariable: Update implementation to 12.x
2021-06-11 11:03:55 -07:00
FernandoS27
5ba28325b2 General: Add settings for fastmem and disabling adress space check. 2021-06-11 17:27:17 +02:00
Markus Wick
621f3f5f47 core: Make use of fastmem 2021-06-11 17:27:06 +02:00
bunnei
46ec0ee55b
Merge pull request #6445 from degasus/fix_ubsn
Fix GCC undefined behavior sanitizer.
2021-06-10 22:17:33 -07:00
Morph
ebd38d66db kernel: Unconditionally set thread state when appropriate 2021-06-11 00:58:04 -04:00
Morph
aa79ca7a7a kernel: KLightConditionVariable: Update implementation to 12.x
Updates the implementation of KLightConditionVariable to FW 12.x
2021-06-11 00:58:04 -04:00
Markus Wick
6755025310 Fix GCC undefined behavior sanitizer.
* Wrong alignment in u64 LOG_DEBUG -> memcpy.
* Huge shift exponent in stride calculation for linear buffer, unused result -> skipped.
* Large shift in buffer cache if word = 0, skip checking for set bits.

Non of those were critical, so this should not change any behavior.
At least with the assumption, that the last one used masking behavior, which always yield continuous_bits = 0.
2021-06-10 21:07:27 +02:00
bunnei
781c85b951 hle: service: sm: Remove redundant session reservation, etc.
- We were double-reserving, causing us to run out of sessions in Pokemon Sword & Shield.
2021-06-10 11:34:41 -07:00
bunnei
fa8a0065ca
hle: service: Increase arbitrary max sessions limit.
- Pokemon Sword/Shield are still hitting this for some reason, causing an svcBreak.
2021-06-10 00:08:09 -07:00
bunnei
b259e95c09 hle: kernel: KClientPort: Add an assert for session count.
- Prevents us from over decrementing num_sessions.
2021-06-09 22:36:42 -07:00
bunnei
ec5674a6ad hle: service: sm: Fix GetService setup of session & port. 2021-06-09 22:29:18 -07:00
bunnei
2aa6a8d889 hle: service: Use correct size for ServerSessionCountMax. 2021-06-09 22:04:36 -07:00
bunnei
b2971b48ed hle: kernel: KServerSession: Fix client disconnected.
- Prevents a cloned session's handler from being overwritten by another disconnected session.
- Fixes session handler nullptr asserts with Pokemon Sword & Shield.
2021-06-09 21:37:11 -07:00
bunnei
c63ea608aa kernel: svc: Add missing error check to CancelSynchronization.
- Avoids a potential crash if the handle is invalid, and also makes this code accurate to real kernel behavior.
2021-06-09 15:24:46 -07:00
bunnei
2d32fc2318
hle: service: Increase arbitrary max sessions limit.
- Pokemon Sword/Shield are still hitting this for some reason, causing an svcBreak.
2021-06-09 11:59:34 -07:00
bunnei
b8fb9b3f11 hle: kernel: KServerSession: Work-around scenario where session is closed too early. 2021-06-08 13:39:20 -07:00
bunnei
08d798b6fe hle: kernel: hle_ipc: Ensure SessionRequestHandler is valid. 2021-06-07 21:55:37 -07:00
bunnei
a493ab2678 hle: kernel: Remove service thread manager and use weak_ptr.
- We no longer need to queue up service threads to be destroyed.
- Fixes a race condition where a thread could be destroyed too early, which caused a crash in Pokemon Sword/Shield.
2021-06-07 21:10:51 -07:00
bunnei
28eb8c83d4
Merge pull request #6414 from bunnei/fix-service-threads
hle: kernel: Refactor to allocate a ServiceThread per service handler.
2021-06-06 22:52:07 -07:00
bunnei
9db569b2d9 hle: kernel: KServerSession: Use ASSERT_MSG where appropriate. 2021-06-06 22:09:25 -07:00
bunnei
ada4242c01 hle: kernel: k_server_session: Return service thread by strong pointer. 2021-06-06 17:54:06 -07:00
bunnei
93f93cb8bc hle: kernel: k_server_session: Ensure service thread is valid before dereference. 2021-06-06 17:03:36 -07:00
bunnei
384cbe3829 hle: kernel: hle_ipc: Use default destructor for SessionRequestManager. 2021-06-06 15:41:16 -07:00
bunnei
6119836795 hle: kernel: KAutoObjectWithListContainer: Use boost::instrusive::rbtree.
- Fixes some crashes introduced by our common intrusive red/black tree impl.
2021-06-06 15:39:11 -07:00
Lioncash
25b73e135f result: Add [[nodiscard]] specifiers where applicable
The result code classes are used quite extensively throughout both the
kernel and service HLE code. We can mark these member functions as
[[nodiscard]] to prevent a few logic bugs from slipping through.
2021-06-05 06:09:07 -04:00
bunnei
27ce97fd42 hle: kernel: Refactor to allocate a ServiceThread per service handler.
- Previously, we would allocate a thread per session, which adds new threads on CloneCurrentObject.
- This results in race conditions with N sessions queuing requests to the same service interface.
- Fixes Pokken Tournament DX crashes/softlocks, which were regressed by #6347.
2021-06-04 19:26:48 -07:00
bunnei
1d1f616063
Merge pull request #6389 from german77/Analog_button_fix
input_common: Analog button, use time based position
2021-06-03 21:06:38 -07:00
Morph
b840dd9af8 fsp-srv: Replace one last instance of RESULT_SUCCESS 2021-06-02 21:40:14 -04:00
Chloe
c4c256f56a
fspsrv: Implement DisableAutoSaveDataCreation (#6355)
- Used by Mii Edit
2021-06-02 17:46:29 -07:00
Morph
a0e4c2e1fc general: Replace RESULT_UNKNOWN with ResultUnknown
Transition to PascalCase for result names.
2021-06-02 00:39:27 -04:00
Morph
12c1766997 general: Replace RESULT_SUCCESS with ResultSuccess
Transition to PascalCase for result names.
2021-06-02 00:39:27 -04:00
Lioncash
3aed797466 common_funcs: Move R_ macros to result.h
These macros all interact with the result code type, so they should
ideally be within this file as well, so all the common_funcs machinery
doesn't need to be pulled in just to use them.
2021-05-31 16:41:00 -04:00
bunnei
f34176996e
Merge pull request #6385 from degasus/save_memory_access
core/memory: Check our memory fallbacks for out-of-bound behavior.
2021-05-30 23:21:39 -07:00
bunnei
a5ebba7e36
Merge pull request #6377 from lioncash/point
common: Extract Point struct into common
2021-05-30 01:35:26 -07:00
bunnei
a6cfc73cb2
Merge pull request #6387 from lioncash/class-token
k_class_token: Use variable templates where applicable
2021-05-29 23:55:17 -07:00
german77
a323bc5af8 input_common: Analog button, use time based position instead of frequent updates 2021-05-30 00:13:51 -05:00
Mai M
2069430baa
Merge pull request #6374 from Morph1984/swkbd-textcheck-encoding
applets/swkbd: Only read the text check message on Failure/Confirm
2021-05-29 23:34:40 -04:00
Mai M
fc708b396b
Merge pull request #6364 from german77/stub-lp2p
ldn: Add and stub lp2p:sys lp2p:app INetworkServiceMonitor INetworkService

Mario Kart Live: Home Circuit needs lp2p:sys lp2p:app INetworkServiceMonitor INetworkService to be able to progress.

Note: The game still fails to boot from unimplemented LDN and BSD services.
2021-05-29 23:33:57 -04:00
bunnei
e41c8b6780
Merge pull request #6379 from degasus/update_dynarmic
externals: Update dynarmic.
2021-05-29 03:15:13 -07:00
Lioncash
646622ccd4 k_class_token: Use variable templates where applicable
Same behavior, less code.
2021-05-29 05:25:34 -04:00
bunnei
c7c4ef9d43
Merge pull request #6384 from lioncash/virtual
kernel: Add missing override specifiers
2021-05-29 02:11:40 -07:00
bunnei
cdabc9064b
Merge pull request #6382 from lioncash/null
k_thread: Move dereference after null check in Initialize()
2021-05-29 01:17:28 -07:00
Markus Wick
42a7c5d017 core/memory: Check our memory fallbacks for out-of-bound behavior.
This makes it by far harder to crash yuzu.

Also implement the 48bit masking of AARCH64 while touching this code.
2021-05-29 09:28:26 +02:00
bunnei
5388e6db84
Merge pull request #6373 from bunnei/use-slabheap-tls
hle: kernel: KSlabHeap: Allow host or guest allocations.
2021-05-29 00:17:24 -07:00
Markus Wick
ddb186e61d core/arm_interface: Improve the performance of memory fallbacks.
We just create one memory subsystem. This is a constant all the time.
So there is no need to call the non-inlined parent.Memory() helper on every callback.
2021-05-29 09:02:19 +02:00
Lioncash
7b2917b4e1 kernel: Add missing override specifiers
Over the course of the kernel refactoring a tiny bit of missing
overrides slipped through review, so we can add these.

While we're at it, we can remove redundant virtual keywords where
applicable as well.
2021-05-29 02:58:32 -04:00
Markus Wick
5a8cd1b118 Fix two GCC 11 warnings: Unneeded copies.
std::move created an unneeded copy.
iterating without reference also created copies.
2021-05-29 08:57:44 +02:00
Markus Wick
d2d7a5060f externals: Update dynarmic.
The new version supports fastmem on a64.
2021-05-29 08:53:01 +02:00
Lioncash
16ff0161b3 k_thread: Move dereference after null check in Initialize()
Prevents a -Wnonnull warning on GCC.
2021-05-29 00:31:38 -04:00
bunnei
420b1f89d3
Merge pull request #6371 from degasus/drop_ExceptionalExit
core/arm_interface: Call SVC after end of dynarmic block.
2021-05-28 17:45:05 -07:00
bunnei
ee099b2697 hle: kernel: KSlabHeap: Allow host or guest allocations.
- Use host allocations for kernel memory, as this is not properly emulated yet.
- Use guest allocations for TLS, as this needs to be backed by DeviceMemory.
2021-05-28 17:42:41 -07:00
bunnei
945effcc75
Merge pull request #6356 from ogniK5377/ApplyNpadSystemCommonPolicy
hid: ApplyNpadSystemCommonPolicy
2021-05-28 10:05:20 -07:00
Lioncash
5554de3933 touchscreen: Make use of common point struct 2021-05-28 08:15:22 -04:00
Lioncash
8171ad65cd common: Extract point into a common struct
This is generic enough that it can be moved into the Common class for
reuse.
2021-05-28 08:12:49 -04:00
Morph
c68255f70f applets/swkbd: Make use of std::move where applicable
Avoids redundant string copies
2021-05-27 23:45:56 -04:00
Morph
247cd92216 applets/swkbd: Only read the text check message on Failure/Confirm
Applications may leave this region of memory uninitialized when the text check result is not either Failure or Confirm.
Attempting to read uninitialized memory may cause an exception within the UTF16 to UTF8 string converter.
Fix this by only reading the text check message on Failure or Confirm.
2021-05-27 23:45:56 -04:00
Markus Wick
3d2e80daed core/arm_interface: Call SVC after end of dynarmic block.
So we can modify all of dynarmic states within SVC without ExceptionalExit.

Especially as the ExceptionalExit hack is dropped on upstream dynarmic.
2021-05-27 23:23:23 +02:00
Markus Wick
993dbe49fc core/arm: Drop ChangeProcessorID.
This code was used to switch the CPU ID on thread switches.
However since "hle: kernel: multicore: Replace n-JITs impl. with 4 JITs.", the CPU ID is not a constant.
This has been dead code since this rewrite, and dropped in dynarmic as well. So there is no need to keep it.
2021-05-26 19:48:24 +02:00
german77
65e20f424a ldn: Add and stub lp2p:sys lp2p:app INetworkServiceMonitor INetworkService 2021-05-26 10:06:00 -05:00
Morph
02169406be
Merge pull request #6331 from lioncash/gesture
hid/gesture: Simplify point related code
2021-05-26 09:19:00 -04:00
Morph
065867e2c2
common: fs: Rework the Common Filesystem interface to make use of std::filesystem (#6270)
* common: fs: fs_types: Create filesystem types

Contains various filesystem types used by the Common::FS library

* common: fs: fs_util: Add std::string to std::u8string conversion utility

* common: fs: path_util: Add utlity functions for paths

Contains various utility functions for getting or manipulating filesystem paths used by the Common::FS library

* common: fs: file: Rewrite the IOFile implementation

* common: fs: Reimplement Common::FS library using std::filesystem

* common: fs: fs_paths: Add fs_paths to replace common_paths

* common: fs: path_util: Add the rest of the path functions

* common: Remove the previous Common::FS implementation

* general: Remove unused fs includes

* string_util: Remove unused function and include

* nvidia_flags: Migrate to the new Common::FS library

* settings: Migrate to the new Common::FS library

* logging: backend: Migrate to the new Common::FS library

* core: Migrate to the new Common::FS library

* perf_stats: Migrate to the new Common::FS library

* reporter: Migrate to the new Common::FS library

* telemetry_session: Migrate to the new Common::FS library

* key_manager: Migrate to the new Common::FS library

* bis_factory: Migrate to the new Common::FS library

* registered_cache: Migrate to the new Common::FS library

* xts_archive: Migrate to the new Common::FS library

* service: acc: Migrate to the new Common::FS library

* applets/profile: Migrate to the new Common::FS library

* applets/web: Migrate to the new Common::FS library

* service: filesystem: Migrate to the new Common::FS library

* loader: Migrate to the new Common::FS library

* gl_shader_disk_cache: Migrate to the new Common::FS library

* nsight_aftermath_tracker: Migrate to the new Common::FS library

* vulkan_library: Migrate to the new Common::FS library

* configure_debug: Migrate to the new Common::FS library

* game_list_worker: Migrate to the new Common::FS library

* config: Migrate to the new Common::FS library

* configure_filesystem: Migrate to the new Common::FS library

* configure_per_game_addons: Migrate to the new Common::FS library

* configure_profile_manager: Migrate to the new Common::FS library

* configure_ui: Migrate to the new Common::FS library

* input_profiles: Migrate to the new Common::FS library

* yuzu_cmd: config: Migrate to the new Common::FS library

* yuzu_cmd: Migrate to the new Common::FS library

* vfs_real: Migrate to the new Common::FS library

* vfs: Migrate to the new Common::FS library

* vfs_libzip: Migrate to the new Common::FS library

* service: bcat: Migrate to the new Common::FS library

* yuzu: main: Migrate to the new Common::FS library

* vfs_real: Delete the contents of an existing file in CreateFile

Current usages of CreateFile expect to delete the contents of an existing file, retain this behavior for now.

* input_profiles: Don't iterate the input profile dir if it does not exist

Silences an error produced in the log if the directory does not exist.

* game_list_worker: Skip parsing file if the returned VfsFile is nullptr

Prevents crashes in GetLoader when the virtual file is nullptr

* common: fs: Validate paths for path length

* service: filesystem: Open the mod load directory as read only
2021-05-25 19:32:56 -04:00
Morph
ec28d3c439 kernel: process_capability: Add MapRegion capability
- Used by nx-hbloader
2021-05-25 01:44:46 -04:00
Chloe Marcec
db7abfecdd hid: ApplyNpadSystemCommonPolicy
We already do this specifically for homebrew, so we can keep it stubbed out for the time being
2021-05-24 15:07:47 +10:00
bunnei
6418a42884 hle: kernel: service_thread: Take reference to KServerSession on service request. 2021-05-20 22:39:44 -07:00
bunnei
e33ffdc555 hle: kernel: k_port: Use AcceptSession to ensure SessionList state is correct.
- Fixes a use-after-free, work-around until we fixup session/port management.
2021-05-20 21:41:52 -07:00
bunnei
b4fc2e52a2 hle: kernel: Use host memory allocations for KSlabMemory.
- There are some issues with the current workaround, we will just use host memory until we have a complete kernel memory implementation.
2021-05-20 21:41:52 -07:00
bunnei
7331bb9d8d Revert "WORKAROUND: Do not use slab heap while we track down issues with resource management."
This reverts commit f2c26443f8.
2021-05-20 21:41:52 -07:00
bunnei
f4fe71c1c9 hle: kernel: hle_ipc: Simplify incoming/outgoing move/copy/domain objects. 2021-05-20 21:41:52 -07:00
bunnei
7361eac10f hle: kernel: Implement CloneCurrentObject and improve session management. 2021-05-20 21:41:49 -07:00
bunnei
c40e7593f5 Revert "WORKAROUND: temp. disable session resource limits while we work out issues"
This reverts commit fc086f93b2.
2021-05-20 21:40:30 -07:00
bunnei
ea4e4b05e4
Merge pull request #6320 from Morph1984/get-pid
hle_ipc: Add a getter for PID
2021-05-20 21:40:03 -07:00
bunnei
7626ca3343
Merge pull request #6321 from lat9nq/per-game-cpu
configuration: Add CPU tab to game properties and slight per-game settings rework
2021-05-20 20:10:56 -07:00
bunnei
7d86a6ff02
Merge pull request #6317 from ameerj/fps-fix
perf_stats: Rework FPS counter to be more accurate
2021-05-18 19:56:29 -07:00
Morph
7f78b17e20 KTransferMemory: Return size instead of size * PageSize in GetSize()
size is already the size in bytes. We do not need to multiply it by the page size
2021-05-18 13:14:28 -04:00
Lioncash
44556dc21a hid/gesture: Factor out last gesture retrieval into its own function
Deduplicates a commonly repeated expression.
2021-05-18 03:59:44 -04:00
Lioncash
a9d8e24e47 hid/gesture: Ensure all ID arrays are initialized
Makes for deterministic initial state.
2021-05-18 03:39:21 -04:00
Lioncash
74f30c0223 hid/gesture: Make Point a template
We can now use this in a generic context to reuse it with the finger
position.
2021-05-18 03:39:18 -04:00
Lioncash
20699e90fa hid/gesture: Replace x,y members of GestureState with a Point
Simplifies assignments.
2021-05-18 03:32:42 -04:00
Lioncash
2f1ef3910b hid/gesture: Add default comparators to Point
Simplifies some comparisons.
2021-05-18 03:32:42 -04:00
Lioncash
60831eabd9 hid/gesture: Rename Points to Point
This only represents a single point
2021-05-18 03:32:38 -04:00
lat9nq
339dc4f806 general: Demote custom_rtc to regular setting 2021-05-17 15:54:30 -04:00
bunnei
440eb840ea
Merge pull request #6319 from Morph1984/no-install-base
main: Prevent installing base titles into NAND
2021-05-16 16:33:33 -07:00
bunnei
d5131805ce
Merge pull request #6284 from ameerj/shantae-fix
nvflinger: Create layers when they are queried but not found
2021-05-16 01:45:14 -07:00
bunnei
ad6e20cfde
Merge pull request #6296 from lioncash/shadow-error
core: Make variable shadowing a compile-time error
2021-05-16 01:35:46 -07:00
bunnei
e8d2de1f99
Merge pull request #6307 from Morph1984/fix-response-push-size
nifm, ssl: Fix incorrect response sizes
2021-05-16 01:32:04 -07:00
Morph
a170aa16b6 main: Prevent installing base titles into NAND
Many users have been installing their base titles into NAND instead of adding them into the games list. This prevents users from installing any base titles and warns the user about the action.
2021-05-16 04:13:57 -04:00
Morph
049769a0c9 hle_ipc: unsigned -> u32
This is more concise and consistent with the rest of the codebase.
2021-05-16 04:11:00 -04:00
Morph
81a5ecdb18 hle_ipc: Add a getter for PID 2021-05-16 04:10:42 -04:00
Lioncash
9a07ed53eb core: Make variable shadowing a compile-time error
Now that we have most of core free of shadowing, we can enable the
warning as an error to catch anything that may be remaining and also
eliminate this class of logic bug entirely.
2021-05-16 03:43:16 -04:00
bunnei
5a2b15bf75
Merge pull request #6299 from bunnei/ipc-improvements
Various improvements to IPC and session management
2021-05-15 22:30:21 -07:00
Morph
faaea00069 nifm, ssl: Fix incorrect response sizes 2021-05-16 00:20:48 -04:00
lat9nq
e169fdad4f general: Make CPU accuracy and related a Settings::Setting
Required to make CPU accuracy and unsafe settings available to use as a
per-game setting.
2021-05-15 20:46:48 -04:00
ameerj
5bef54618a perf_stats: Rework FPS counter to be more accurate
The FPS counter was based on metrics in the nvdisp swapbuffers call. This metric would be accurate if the gpu thread/renderer were synchronous with the nvdisp service, but that's no longer the case.

This commit moves the frame counting responsibility onto the concrete renderers after their frame draw calls. Resulting in more meaningful metrics.
The displayed FPS is now made up of the average framerate between the previous and most recent update, in order to avoid distracting FPS counter updates when framerate is oscillating between close values.

The status bar update frequency was also changed from 2 seconds to 500ms.
2021-05-15 20:34:20 -04:00
Morph
271f2e2d78 ssl: Stub Import(Client/Server)Pki
- Used in JUMP FORCE Deluxe Edition
2021-05-12 21:04:13 -04:00
Morph
5a042bdaa1
Merge pull request #6267 from german77/gestureRewrite
hid: Improve hardware accuracy of gestures
2021-05-12 09:17:23 -04:00
bunnei
12d569e483 hle: kernel: hle_ipc: Fix outgoing IPC response size calculation. 2021-05-11 12:27:43 -07:00
bunnei
fc086f93b2 WORKAROUND: temp. disable session resource limits while we work out issues 2021-05-11 10:51:39 -07:00
bunnei
f2c26443f8 WORKAROUND: Do not use slab heap while we track down issues with resource management. 2021-05-11 10:27:18 -07:00
bunnei
b9f543b29f audren 2021-05-11 10:24:53 -07:00
bunnei
343d92a092 core: hle: ipc_helpers: Fix cast on raw_data_size calculation. 2021-05-10 20:34:38 -07:00
bunnei
2c1e119c4a hle: service: sm: Add TIPC support.
- Fixes our error checking of names as well.
2021-05-10 20:34:38 -07:00
bunnei
913971417e hle: kernel: hle_ipc: Improve IPC code and add initial support for TIPC.
- Fixes our move handles implementation to actually move objects.
- Simplifies the traditional IPC path.
2021-05-10 20:34:38 -07:00
bunnei
49c4c329f6 hle: service: sm: GetService: Reserve session resource when we create a KSession. 2021-05-10 20:34:38 -07:00
bunnei
21671d05a3 hle: service: Add support for dispatching TIPC requests. 2021-05-10 20:34:38 -07:00
bunnei
da25a59866 hle: service: Implement IPC::CommandType::Close.
- This was not actually closing sessions before.
2021-05-10 20:34:38 -07:00
bunnei
41928dfdda hle: service: sm: Use RegisterNamedService to register the service. 2021-05-10 20:34:38 -07:00
bunnei
934b2d8842 hle: service: sm: Improve Initialize implementation. 2021-05-10 20:34:38 -07:00
bunnei
f54ea749a4 hle: kernel: svc: Update ConnectToNamedPort to use new CreateNamedServicePort interface. 2021-05-10 20:34:38 -07:00
bunnei
c6de9657be hle: kernel: Implement named service ports using service interface factory.
- This allows us to create a new interface each time ConnectToNamedPort is called, removing the assumption that these are static.
2021-05-10 20:34:38 -07:00
bunnei
44c763f9c6 hle: kernel: KSession: Improve implementation of CloneCurrentObject. 2021-05-10 20:33:53 -07:00
bunnei
cfed6936f3 hle: service: sm: Increase point buffer size. 2021-05-10 15:43:42 -07:00
bunnei
9f44a44f2f hle: ipc_helpers: Reserve session resource when we create a KSession. 2021-05-10 15:42:46 -07:00
bunnei
75f23ad494 hle: kernel: KClientPort: Cleanup comment format. 2021-05-10 15:41:46 -07:00
bunnei
7a06037c5f hle: ipc: Add declarations for TIPC. 2021-05-10 15:05:10 -07:00
bunnei
ed25191ee6 hle: kernel: Further cleanup and add TIPC helpers. 2021-05-10 15:05:10 -07:00
bunnei
d08bd3e062 hle: ipc_helpers: Update IPC response generation for TIPC. 2021-05-10 15:05:10 -07:00
bunnei
ec50a9b5b9
Merge pull request #6291 from lioncash/kern-shadow
kernel: Eliminate variable shadowing
2021-05-09 20:15:00 -07:00
german77
0c1bb46f0a kernel: Delete unused files 2021-05-09 11:15:31 -05:00
Lioncash
2f62bae9e3 kernel: Eliminate variable shadowing
Now that the large kernel refactor is merged, we can eliminate the
remaining variable shadowing cases.
2021-05-08 12:33:26 -04:00
bunnei
faa067f175
Merge pull request #6266 from bunnei/kautoobject-refactor
Kernel Rework: Migrate kernel objects to KAutoObject
2021-05-07 23:30:17 -07:00
bunnei
8acf739b3f
Merge pull request #6287 from lioncash/ldr-copy
ldr: Simplify memory copy within LoadNro()
2021-05-07 09:46:31 -07:00
Lioncash
8f638e81e9 ldr: Simplify memory copy within LoadNro()
We can use the dedicated memory function for performing copies instead
of reading into a temporary buffer and then immediately writing it back
out to memory.

Eliminates a bit of heap memory churn.
2021-05-06 19:18:14 -04:00
ameerj
da62e92784 nvflinger: Create layers when they are queried but not found
Fixes Shantae softlock on boot.
2021-05-06 11:20:52 -04:00
bunnei
d57b12193b hle: kernel: KPageTable: CanContain should not be constexpr. 2021-05-05 16:40:55 -07:00
bunnei
b805ee653f hle: kernel: Move slab resource counts to Kernel. 2021-05-05 16:40:54 -07:00
bunnei
d2c4dbde9e fixup! hle: kernel: Migrate KSharedMemory to KAutoObject. 2021-05-05 16:40:54 -07:00
bunnei
2c4615f3a6 fixup! hle: kernel: Migrate more of KThread to KAutoObject. 2021-05-05 16:40:54 -07:00
bunnei
510f71d871 fixup! hle: kernel: Ensure all kernel objects with KAutoObject are properly created. 2021-05-05 16:40:54 -07:00
bunnei
9f81221528 fixup! hle: kernel: Ensure all kernel objects with KAutoObject are properly created. 2021-05-05 16:40:54 -07:00
bunnei
eae107d0e9 kernel: svc: Remove unused RetrieveResourceLimitValue function. 2021-05-05 16:40:54 -07:00
bunnei
da22def511 hle: kernel: Fix un/sign mismatch errors with NUM_CPU_CORES. 2021-05-05 16:40:54 -07:00
bunnei
f23760b1e1 fixup! hle: kernel: Add initial impl. of slab setup. 2021-05-05 16:40:54 -07:00
bunnei
1e983b19df fixup! hle: kernel: Migrate to KHandleTable. 2021-05-05 16:40:54 -07:00
bunnei
ad5a5ef43f fixup! hle: kernel: Migrate more of KThread to KAutoObject. 2021-05-05 16:40:54 -07:00
bunnei
9434603450 fixup! hle: kernel: Migrate KReadableEvent and KWritableEvent to KAutoObject. 2021-05-05 16:40:54 -07:00
bunnei
703d7aaab6 fixup! hle: kernel: Migrate to KHandleTable. 2021-05-05 16:40:54 -07:00
bunnei
9beb239634 fixup! hle: kernel: Add initial impl. of KLinkedList. 2021-05-05 16:40:54 -07:00
bunnei
2cdc7142b0 fixup! hle: kernel: Migrate to KHandleTable. 2021-05-05 16:40:54 -07:00
bunnei
34abe4a905 fixup! hle: kernel: Migrate KPort, KClientPort, and KServerPort to KAutoObject. 2021-05-05 16:40:54 -07:00
bunnei
f6d45b747e fixup! hle: kernel: Migrate KSession, KClientSession, and KServerSession to KAutoObject. 2021-05-05 16:40:53 -07:00
bunnei
1b074b8984 fixup! hle: kernel: Migrate KSession, KClientSession, and KServerSession to KAutoObject. 2021-05-05 16:40:53 -07:00
bunnei
50d2dc3b51 fixup! hle: kernel: Migrate KPort, KClientPort, and KServerPort to KAutoObject. 2021-05-05 16:40:53 -07:00
bunnei
d23f9f75ff fixup! hle: kernel: Migrate to KHandleTable. 2021-05-05 16:40:53 -07:00
bunnei
4356361faf fixup! hle: kernel: Add initial impl. of KAutoObjectWithListContainer. 2021-05-05 16:40:53 -07:00
bunnei
51aa5a5364 fixup! hle: kernel: Add initial impl. of KAutoObjectWithListContainer. 2021-05-05 16:40:53 -07:00
bunnei
25538db150 fixup! hle: kernel: Add initial impl. of KAutoObject. 2021-05-05 16:40:53 -07:00
bunnei
9bae3992e6 fixup! hle: kernel: Add initial impl. of KAutoObject. 2021-05-05 16:40:53 -07:00
bunnei
91d8657959 fixup! hle: kernel: Add initial impl. of slab setup. 2021-05-05 16:40:53 -07:00
bunnei
d3c166d4d5 common: Rename NON_COPYABLE/NON_MOVABLE with YUZU_ prefix. 2021-05-05 16:40:53 -07:00
bunnei
0536004d91 fixup! hle: kernel: Rename Process to KProcess. 2021-05-05 16:40:53 -07:00
bunnei
57f80c74b6 fixup! hle: kernel: Migrate to KHandleTable. 2021-05-05 16:40:53 -07:00
bunnei
caa11748c6 fixup! hle: kernel: Improve MapSharedMemory and implement UnmapSharedMemory. 2021-05-05 16:40:53 -07:00
bunnei
7866eb03bb hle: kernel: svc: ConnectToNamedPort: Use KHandleTable::Reserve. 2021-05-05 16:40:53 -07:00
bunnei
4b03e6e776 hle: kernel: Migrate to KHandleTable. 2021-05-05 16:40:53 -07:00
bunnei
8f5052a514 hle: kernel: KClassToken: Ensure class tokens are correct. 2021-05-05 16:40:53 -07:00
bunnei
0b27c721c9 hle: kernel: Improve MapSharedMemory and implement UnmapSharedMemory. 2021-05-05 16:40:52 -07:00
bunnei
2a7eff57a8 hle: kernel: Rename Process to KProcess. 2021-05-05 16:40:52 -07:00
bunnei
bf380b8584 hle: kernel: Remove deprecated Object class. 2021-05-05 16:40:52 -07:00
bunnei
864841eb9e hle: kernel: Do not shutdown twice on emulator close. 2021-05-05 16:40:52 -07:00
bunnei
39a8dba9a6 hle: kernel: Cleanup shutdown of persistent kernel objects. 2021-05-05 16:40:52 -07:00
bunnei
626f746971 hle: kernel: Migrate KPort, KClientPort, and KServerPort to KAutoObject. 2021-05-05 16:40:52 -07:00
bunnei
7a06864100 hle: kernel: Migrate KServerPort to KAutoObject. 2021-05-05 16:40:52 -07:00
bunnei
0297448fbc hle: kernel: Migrate KClientPort to KAutoObject. 2021-05-05 16:40:52 -07:00
bunnei
aa2844bcf9 hle: kernel: HandleTable: Remove deprecated APIs. 2021-05-05 16:40:52 -07:00
bunnei
b57c5a9b54 hle: kernel: Migrate KResourceLimit to KAutoObject. 2021-05-05 16:40:52 -07:00
bunnei
674122038a hle: kernel: svc: Migrate WaitSynchronization. 2021-05-05 16:40:51 -07:00
bunnei
126aaeb6d3 hle: kernel: svc: Use new handle table API for Process. 2021-05-05 16:40:51 -07:00
bunnei
c7d8b7421c hle: kernel: Migrate KTransferMemory to KAutoObject. 2021-05-05 16:40:51 -07:00
bunnei
7444963bbb hle: kernel: Migrate KSession, KClientSession, and KServerSession to KAutoObject. 2021-05-05 16:40:51 -07:00
bunnei
2cb6106523 hle: kernel: svc: Migrate GetThreadContext, GetThreadCoreMask. 2021-05-05 16:40:51 -07:00
bunnei
76a0814142 hle: kernel: svc: Migrate GetProcessId, CancelSynchronization, SetThreadActivity. 2021-05-05 16:40:51 -07:00
bunnei
84bb772003 hle: kernel: KThread: Remove incorrect resource release. 2021-05-05 16:40:51 -07:00
bunnei
269d233a94 hle: kernel: svc_results: Update naming.. 2021-05-05 16:40:51 -07:00
bunnei
c2f6f2ba7a hle: kernel: KThread: Add missing resource hint release. 2021-05-05 16:40:51 -07:00
bunnei
2e8d6fe9a0 hle: kernel: Migrate KReadableEvent and KWritableEvent to KAutoObject. 2021-05-05 16:40:51 -07:00
bunnei
eba3bb9d21 hle: ipc_helpers: Add methods for copy/move references. 2021-05-05 16:40:51 -07:00
bunnei
cfa7b92563 hle: kernel: Move slab heaps to their own container. 2021-05-05 16:40:51 -07:00
bunnei
89edbe8aa2 hle: kernel: Refactor several threads/events/sharedmemory to use slab heaps. 2021-05-05 16:40:51 -07:00
bunnei
b6156e735c hle: kernel: Move slab heap management to KernelCore. 2021-05-05 16:40:51 -07:00
bunnei
ab704acab8 hle: kernel: Ensure all kernel objects with KAutoObject are properly created. 2021-05-05 16:40:51 -07:00
bunnei
722195cf70 hle: kernel: Use unique_ptr for suspend and dummy threads. 2021-05-05 16:40:50 -07:00
bunnei
addc0bf037 hle: kernel: Migrate KEvent to KAutoObject. 2021-05-05 16:40:50 -07:00
bunnei
086db71e94 hle: kernel: Migrate KSharedMemory to KAutoObject. 2021-05-05 16:40:50 -07:00
bunnei
7ccbdd4d8d hle: kernel: Migrate KProcess to KAutoObject. 2021-05-05 16:40:50 -07:00
bunnei
5e5933256b hle: kernel: Refactor IPC interfaces to not use std::shared_ptr. 2021-05-05 16:40:50 -07:00
bunnei
da7e9553de hle: kernel: Migrate more of KThread to KAutoObject. 2021-05-05 16:40:50 -07:00
bunnei
6fca1c82fd hle: kernel: svc: Migrate GetThreadPriority, StartThread, and ExitThread. 2021-05-05 16:40:50 -07:00
bunnei
de4746ff69 hle: kernel: svc: Migrate CreateThread. 2021-05-05 16:40:50 -07:00
bunnei
0eeecde67c hle: kernel: Migrate idle threads. 2021-05-05 16:40:50 -07:00
bunnei
479bd50b96 hle: kernel: Migrate KThread to KAutoObject. 2021-05-05 16:40:50 -07:00
bunnei
d3d0f2f451 hle: kernel: Add initial impl. of slab setup. 2021-05-05 16:40:50 -07:00
bunnei
34bed1ab41 hle: kernel: Refactor out various KThread std::shared_ptr usage. 2021-05-05 16:40:50 -07:00
bunnei
d9df63583f core: Defer CoreTiming initialization. 2021-05-05 16:40:50 -07:00
bunnei
3401676768 core: memory: Add a work-around to allocate and access kernel memory regions by vaddr. 2021-05-05 16:40:50 -07:00
bunnei
66f2ad716b hle: kernel: Add initial impl. of KLinkedList. 2021-05-05 16:40:49 -07:00
bunnei
f93d939426 hle: kernel: Add initial impl. of KSlabAllocated. 2021-05-05 16:40:49 -07:00
bunnei
34ce1dd7c7 hle: kernel: Add initial impl. of KAutoObjectWithListContainer. 2021-05-05 16:40:49 -07:00
bunnei
b8751630e2 hle: kernel: Add initial impl. of KAutoObject. 2021-05-05 16:40:49 -07:00
bunnei
260b841dc3
Merge pull request #6279 from ogniK5377/nvhost-prof
nvdrv: /dev/nvhost-prof-gpu for production
2021-05-05 16:16:13 -07:00
bunnei
0b7a03bd65
Update src/core/hle/service/nvdrv/interface.cpp
Co-authored-by: Ameer J <52414509+ameerj@users.noreply.github.com>
2021-05-05 16:16:02 -07:00
german77
8c30ed6d09 hid: Improve hardware accuracy of gestures 2021-05-05 10:13:09 -05:00
Lioncash
cc47a6a9c2 service: Remove unused class variables
Prevents some warnings from occurring.
2021-05-05 01:32:28 -04:00
Lioncash
9e726a9250 service: Resolve cases of member field shadowing
Now all that remains is for kernel code to be 'shadow-free' and then
-Wshadow can be turned into an error.
2021-05-04 04:38:38 -04:00
bunnei
df51eb9bde
Merge pull request #6278 from lioncash/misc-shadow
core: Resolve misc straggler cases of variable shadowing
2021-05-03 16:04:28 -07:00
Lioncash
ebb64d5bf4 core: Resolve misc cases of variable shadowing
Resolves shadowing warnings that aren't in a particularly large
subsection of core. Brings us closer to turning -Wshadow into an error.

All that remains now is for cases in the kernel (left untouched for now
since a big change by bunnei is pending), and a few left over in the
service code (will be tackled next).
2021-05-03 01:19:13 -04:00
Chloe Marcec
7d257ce7bd nvdrv: /dev/nvhost-prof-gpu for production
While we're at it, we can fix the is_initialized error code.
This fixes the crashes on Shante
2021-05-03 14:39:03 +10:00
german77
08d5bd36d8 hid: Fix touch not initializing properly if disabled 2021-05-02 21:27:15 -05:00
bunnei
c17a59b58e
Merge pull request #6269 from lioncash/file-shadow
file_sys: Resolve cases of variable shadowing
2021-05-02 15:12:07 -07:00
bunnei
01a57d4c8d
Merge pull request #6265 from Morph1984/snap-save-fix
service: filesystem: Return proper error codes for CreateFile
2021-05-02 00:45:18 -07:00
Lioncash
1da72c7792 file_sys: Resolve cases of variable shadowing
Brings us closer to enabling -Wshadow as an error in the core code.
2021-05-02 02:59:57 -04:00
Morph
72b22fd433 service: filesystem: Return proper error codes for CreateFile
This improves the accuracy of CreateFile by returning the correct error codes on certain conditions (parent directory does not exist, path already exists).

This fixes saving and the loading of existing saves in New Pokemon Snap
2021-05-01 09:33:00 -04:00
german77
1ed1dd3c89 Disable touch if setting is not enabled 2021-04-30 19:28:21 -05:00
bunnei
fa3ffff8de
Merge pull request #6257 from Morph1984/fix-use-after-free-webapplet
applets/web: Fix a use-after-free when passing in the URL string
2021-04-30 14:48:32 -07:00
bunnei
922b0d9933
Merge pull request #6226 from german77/sevensix
hid: Implement SevenSixAxis and ConsoleSixAxisSensor
2021-04-29 22:06:57 -07:00
Morph
0af182baa2 applets/web: Fix a use-after-free when passing in the URL string
The URL string was being deleted before being used, leading to a use-after-free occurring when it is used afterwards.

Fix this by taking the string by const ref to extend its lifetime, ensuring it doesn't get deleted before use.
2021-04-28 12:34:28 -04:00
Lioncash
724c19a307 loader: Resolve instances of variable shadowing
Eliminates variable shadowing cases across all the loaders to bring us
closer to enabling variable shadowing as an error in core.
2021-04-27 12:48:15 -04:00
german77
cfdec68d5a address comments 2021-04-26 22:07:16 -05:00
Lioncash
dcb91ca4a4 service: Eliminate cases of member shadowing
Resolves a few localized instances of member variable shadowing. Brings
us a little closer to turning shadowing warnings into errors.
2021-04-26 09:39:49 -04:00
ameerj
75e0d16caa nvhost_vic: Fix device closure
Implements the OnClose method of the nvhost_vic device, and removes the remnants of an older implementation.

Also cleans up some of the surrounding code.
2021-04-24 19:22:09 -04:00
Mat M
4c8c5ad1b6
Merge pull request #6234 from Morph1984/stub-am
ICommonStateGetter: Stub SetRequestExitToLibraryAppletAtExecuteNextProgramEnabled
2021-04-24 12:37:34 -04:00
Mat M
98fb36cb0a
Merge pull request #6235 from german77/ectx_aw
glue: Add ectx:aw service placeholder
2021-04-24 12:37:12 -04:00
german77
a02c4686c3 glue: Add ectx:aw placeholder 2021-04-24 10:50:25 -05:00
bunnei
1acd807176
Merge pull request #6230 from Morph1984/default-resource-size
program_metadata: Set a default resource size when a NPDM is not present
2021-04-24 02:55:20 -07:00
bunnei
f4610e77e2
Merge pull request #6227 from lioncash/meta
program_metadata: Explicitly specify copy/move operators/functions
2021-04-23 23:12:44 -07:00
german77
c19ad21ae8 hid: Implement SevenSixAxis and ConsoleSixAxisSensor 2021-04-23 22:12:41 -05:00
Morph
04d9c27120 ICommonStateGetter: Stub SetRequestExitToLibraryAppletAtExecuteNextProgramEnabled
- Used by Pixel Game Maker Series Werewolf Princess Kaguya
2021-04-23 23:04:22 -04:00
bunnei
4cc8ab8a86
Merge pull request #6228 from lioncash/semi
lm: Resolve -Wextra-semi warning
2021-04-23 19:59:20 -07:00
bunnei
2e268abe42
Merge pull request #6229 from lioncash/unused-var
acc/lbl: Remove unused variables
2021-04-23 15:48:47 -07:00
bunnei
51c787bfc1
Merge pull request #6231 from lioncash/aes
aes_util: Make use of std::span
2021-04-23 11:37:17 -07:00
Morph
1c65b3ee53 program_metadata: Set a default resource size when a NPDM is not present
Sets a default size of 0x1FE00000 bytes (510 MiB) for the system_resource_size when a NPDM is not present.
2021-04-23 12:47:31 -04:00
bunnei
19bbdedf00
Merge pull request #6232 from lioncash/alias2
emu_window: unsigned -> u32
2021-04-23 09:26:56 -07:00
Lioncash
d363b2c7d2 emu_window: Return pair from ClipToTouchScreen() instead of tuple
This is only a 2-tuple, so it can be converted over to the std::pair
class.
2021-04-23 11:21:02 -04:00
Lioncash
8805233f5e emu_window: unsigned -> u32
This is more concise and consistent with the rest of the codebase.
2021-04-23 11:19:32 -04:00
Lioncash
9c5248d101 aes_util: Make use of std::span
Allows us to simplify the interface quite a bit as it will handle
contiguous sequences for us.
2021-04-23 09:58:41 -04:00
Lioncash
502f3cef87 acc/lbl: Remove unused variables 2021-04-23 09:39:56 -04:00
Lioncash
29cd40bded lm: Make use of insert_or_assign() in Log()
Avoids unnecessary default construction of an entry in cases where no
entry exists before overwriting the created entry.
2021-04-23 09:27:18 -04:00
Lioncash
5ba49f188b lm: Prevent redundant map lookups in Log()
We can perform the lookup and then do the contains check by checking the
end iterator. The benefit of this is that if we *do* find an entry, then
we aren't hashing into the map again to find it.

We can also get rid of an unused std::vector temporary while we're at
it.
2021-04-23 09:24:21 -04:00
Lioncash
6e2040c955 lm: Resolve -Wextra-semi warning
Resolves a trivial warning with clang.
2021-04-23 09:20:54 -04:00
Lioncash
ae93402312 program_metadata: Explicitly specify copy/move functions
The generation of the copy assignment operators are deprecated on being
generated when a user-provided destructor is present.

We can explicitly specify that we desire this behavior to keep the class
forward compatible with future standards.
2021-04-23 09:16:17 -04:00
Morph
86278f5db2 service: hid: Get transfer memory for InitializeSevenSixAxisSensor 2021-04-22 05:50:46 -04:00
bunnei
f0c2190ceb
Merge pull request #6214 from Morph1984/time-fix-kirby-clash
time: Fix GetClockSnapshotFromSystemClockContext
2021-04-21 11:17:58 -07:00
bunnei
17704271f4
Merge pull request #6217 from Morph1984/consistent-writebuffers
general: Write buffers before pushing raw arguments
2021-04-19 20:54:25 -07:00
bunnei
e5e9bee1cc
Merge pull request #6215 from lioncash/duplicate
npad: Remove duplicated class member variable
2021-04-19 18:12:48 -07:00
Morph
27eeb20001 general: Write buffers before pushing raw arguments
For consistency with the rest of the service implementations
2021-04-19 12:45:50 -04:00
Lioncash
9f39f7c041 arp: Use type alias for issue function
Reduces some verbosity and centralizes the function details in one spot.
2021-04-19 12:36:10 -04:00
Lioncash
b7d04d848d arp: Prevent uninitialized read of launch member variable
If anything happened to call arp functions in the wrong order and called
IRegistrar's Issue function before SetApplicationLaunchProperty, we'd
read from an uninitialized ApplicationLaunchProperty instance.

Instead, we can always initialize it so if this does happen, then the
outcome of doing such a thing is at least consistently reproducible.
2021-04-19 12:30:34 -04:00
Lioncash
39497183a6 npad: Remove duplicated class member variable
ControllerBase already has a System reference that can be accessed from
this class, so we can get rid of this to make the class layout a little
more straightforward.
2021-04-19 12:23:28 -04:00
Morph
8285776603 time: Write buffer before pushing RESULT_SUCCESS in GetClockSnapshot 2021-04-19 12:09:28 -04:00
Morph
a223006c50 time: Fix GetClockSnapshotFromSystemClockContext
This removes an incorrect alignment usage and corrects the positions of the popped parameters.

- Fixes Super Kirby Clash crashing on boot
2021-04-19 11:17:47 -04:00
Morph
51ca93981d applets: Send focus state change message on applet state change
Fixes the softlock after the controller applet exits in Mario Kart 8 Deluxe.
2021-04-17 09:26:48 -04:00
Morph
ba2c917842 applets: Make the applet mode a protected property of Applet 2021-04-17 08:50:49 -04:00
bunnei
9ad77ba6d3
Merge pull request #6125 from ogniK5377/nvdec-close-dev
nvdrv: Cleanup CDMA Processor on device closure
2021-04-16 23:14:44 -07:00
Morph
aa3adf6c3f input_interpreter: Fix button hold being interpreted incorrectly on init
We reset all the button states to 0 except the first index (which has all the buttons as pressed) to prevent a button hold being interpreted as a button that was pressed once on the first poll.
2021-04-15 01:53:17 -04:00
Morph
578e6c5a57 applets/swkbd: Implement the Default Software Keyboard frontend 2021-04-15 01:53:17 -04:00
Morph
5bc9f15c6d applets/swkbd: Implement the Normal and Inline Software Keyboard Applet 2021-04-15 01:53:17 -04:00
Morph
a8c09cd5e4 ILibraryAppletCreator: Implement CreateHandleStorage
Used by Monster Hunter Generations Ultimate
2021-04-15 01:53:16 -04:00
Morph
e3e6a11ab8 hle_ipc: Add helper functions to get copy/move handles 2021-04-15 01:53:16 -04:00
Morph
0a40106cf1 ILibraryAppletAccessor: Demote from ERROR to DEBUG for null storage logs
Avoids unnecessary console spam when the inline software keyboard is used.
2021-04-15 01:53:16 -04:00
Morph
d1e40dd244 applets: Pass in the LibraryAppletMode each applet's constructor 2021-04-15 01:53:16 -04:00
Morph
0f40c8c634 applets: Remove the previous software keyboard applet implementation 2021-04-15 01:53:16 -04:00
bunnei
de5bf640b7
Merge pull request #6196 from bunnei/asserts-setting
core: settings: Add setting for debug assertions and disable by default.
2021-04-14 17:47:18 -07:00
bunnei
a4c6712a4b common: Move settings to common from core.
- Removes a dependency on core and input_common from common.
2021-04-14 16:24:03 -07:00
bunnei
c6c0771b12 core: settings: Add setting for debug assertions and disable by default.
- This is a developer-only setting and no longer needs to be enabled by default.
- Also adds "use_auto_stub" setting to SDL frontend while we are here.
- Supersedes #1340.
2021-04-14 16:24:02 -07:00
ameerj
2067115c78 k_resource_limit: Minor cleanup of member variables/headers 2021-04-14 00:40:33 -04:00
bunnei
bb922d6ff6
Merge pull request #6185 from ameerj/process-reslimit
kernel/process: Replace process resource limit instance with the kernel's resource limit
2021-04-13 21:08:59 -07:00
ameerj
5e85bc3d23 kernel/process: Replace process resource limit instance with the kernel's resource limit
This commit addresses the inaccurate behavior of kernel processes creating their own resource limit, rather than utilizing the kernel's system-wide resource limit instance.
2021-04-12 16:14:19 -04:00
Lioncash
0fb3773924 k_thread: Remove [[nodiscard]] attribute from ClearWaitCancelled()
This function has a void return value, so this attribute doesn't apply
to it.
2021-04-12 10:17:38 -04:00
bunnei
26d60014d0
Merge pull request #6135 from Morph1984/borderless-windowed-fullscreen
configure_graphics: Add Borderless Windowed fullscreen mode
2021-04-11 21:23:59 -07:00
bunnei
0c19147e09
Merge pull request #6170 from Morph1984/more-time-fixes
service: time: Setup the network clock with the local clock context
2021-04-11 10:50:08 -07:00
bunnei
4f60818eae
Merge pull request #6167 from Morph1984/time-fix
service: time: Fix CalculateStandardUserSystemClockDifferenceByUser
2021-04-10 22:11:53 -07:00
bunnei
290b452ea1
Merge pull request #6112 from ogniK5377/pctl
pctl: Rework how pctl works to be more accurate
2021-04-10 21:09:54 -07:00
bunnei
1063e0be48
Merge pull request #6172 from degasus/cmake_opus
externals: Search for shared opus installation.
2021-04-10 02:27:02 -07:00
bunnei
b04877dd95
Merge pull request #6099 from bunnei/derive-mem
Kernel Rework: Derive memory regions from board layout.
2021-04-10 00:02:52 -07:00
bunnei
31c80b8c6f
Merge pull request #6171 from german77/services
service: Update service function tables and use proper names
2021-04-09 22:47:34 -07:00
bunnei
c6d2af16b5
Merge pull request #6156 from lioncash/lock-discard
kernel: Mark lock helper classes as [[nodiscard]]
2021-04-09 21:42:26 -07:00
bunnei
9cf8bcc75c
Merge pull request #6113 from german77/playhistory
Friend: Stub GetPlayHistoryRegistrationKey
2021-04-09 20:50:13 -07:00
bunnei
96d07b4949
Merge pull request #6158 from german77/hidServiceTables
hid: Update service function tables
2021-04-09 16:10:06 -07:00
bunnei
d6e5e053a6
Merge pull request #6162 from degasus/no_spin_loops
video_core: Avoid spin loops.
2021-04-09 11:52:18 -07:00
Morph
9c85bcbecc ns: Update to 12.x 2021-04-09 00:49:47 -04:00
Morph
467ef54e2a aoc_u: Update to 12.x 2021-04-09 00:49:47 -04:00
Morph
8a9e834fc2 nim: Update to 12.x 2021-04-09 00:49:47 -04:00
Morph
e0bddf8f07 npns: Update to 12.x 2021-04-09 00:49:47 -04:00
Morph
5ce0e127da bgtc: Update to 12.x and implement OpenTaskService 2021-04-09 00:49:47 -04:00
Morph
6af7bd02b2 vi: Update to 12.x 2021-04-09 00:49:47 -04:00
Morph
7e62452ac8 erpt: Update to 12.x 2021-04-09 00:49:46 -04:00
Morph
5ec2fdceca btm: Update to 12.x 2021-04-09 00:49:46 -04:00
Morph
214ef2dd8a btdrv: Update to 12.x 2021-04-09 00:49:46 -04:00
bunnei
c1017efb4a
Merge pull request #6168 from Morph1984/stub-SetNpadAnalogStickUseCenterClamp
service: hid: Stub SetAnalogStickUseCenterClamp
2021-04-08 21:16:47 -07:00
german77
09a8e08109 wlan: Update to 12.x 2021-04-08 19:40:25 -06:00
german77
ac14ef70b5 usb: Use proper names 2021-04-08 19:40:25 -06:00
german77
35abd560c4 ITimeZoneService: Update to 12.x 2021-04-08 19:40:25 -06:00
german77
e7530b341e spl: Update to 12.x 2021-04-08 19:40:25 -06:00
german77
01928b1d17 sfdnsres: Use proper names 2021-04-08 19:40:25 -06:00
german77
ff1201210c nsd: Update to 12.x 2021-04-08 19:40:25 -06:00
german77
f90041a2d4 ethc: Update to 12.x 2021-04-08 19:40:25 -06:00
german77
6c81332ca7 sm: Use proper names, update to 12.x 2021-04-08 19:40:25 -06:00
german77
7133bfdd2c set_sys: Update to 12.x 2021-04-08 19:40:25 -06:00
german77
556c5df745 pctl_module: Update to 12.x 2021-04-08 19:40:25 -06:00
german77
4530b58eb0 pcie: Use proper names 2021-04-08 19:40:25 -06:00
german77
53f1560a24 olsc: Update to 12.x 2021-04-08 19:40:25 -06:00
german77
c37b8a1028 pl_u: Update to 12.x 2021-04-08 19:40:25 -06:00
german77
278c38aa4a ldr: Use proper names 2021-04-08 19:40:25 -06:00
german77
a4e2821530 arp: Use proper names, update to 12.x 2021-04-08 19:40:25 -06:00
german77
a83f0f7154 caps_u: Update to 12.x 2021-04-08 19:40:25 -06:00
german77
dbc4c8e314 caps_a: Update to 12.x 2021-04-08 19:40:24 -06:00
german77
03790771a6 bpc: Use proper names 2021-04-08 19:40:24 -06:00
german77
0377618288 bcat_module: Update to 12.x 2021-04-08 19:40:24 -06:00
german77
247b1c14d2 codecctl: Use proper names 2021-04-08 19:40:24 -06:00
german77
ec0e644fb0 audren_u: Use proper names 2021-04-08 19:40:24 -06:00
german77
8f1300cd31 audren_a: Use proper names 2021-04-08 19:40:24 -06:00
german77
6219da627b audrec_u: Use proper names, update to 12.x 2021-04-08 19:40:24 -06:00
german77
5ce97bf0a0 audrec_a: Use proper names 2021-04-08 19:40:24 -06:00
german77
b059db74c5 audout_u: Use proper names 2021-04-08 19:40:24 -06:00
german77
c51d9e0b0a audout_a: Use proper names 2021-04-08 19:40:24 -06:00
german77
d7f2078e7b audin_u: Use proper names 2021-04-08 19:40:24 -06:00
german77
b6bbc0d483 audin_a: Use proper names 2021-04-08 19:40:24 -06:00
bunnei
701b6c2fb8
Merge pull request #6155 from ameerj/kernel-12-rescnt
kernel: Increase event and session counts
2021-04-08 18:21:00 -07:00
bunnei
d894818bb3
Merge pull request #6157 from Morph1984/am-update-12.x
service: am: Update service function tables
2021-04-08 16:37:59 -07:00
bunnei
1744fa6ecf
Merge pull request #6062 from ameerj/auto-stub
service: Add a toggle for auto stub fallback
2021-04-08 15:32:41 -07:00
Markus Wick
5096ed5e0a externals: Search for shared opus installation.
We had used conan for opus before, but there was a bug in the AVX detection.
However we still had the Findopus.cmake file within the repository, but not used.

This patch reenables the Findopus helper and prefer the system wide installation of opus.
2021-04-08 23:49:32 +02:00
bunnei
dfac2e2d25
Merge pull request #6145 from lat9nq/nvhost_empty_memcpy
nvhost_nvdec_common: Avoid memcpy with null pointers
2021-04-08 13:23:05 -07:00
Morph
2283fccc1b service: time: Setup the network clock with the local clock context
Setting the network time allows some time based events using the network clock to not reset.
2021-04-08 13:26:38 -04:00
bunnei
415dfb6cd3
Merge pull request #6154 from lioncash/svcrange2
svc: Expand SVC tables
2021-04-08 09:21:55 -07:00
Morph
8e545deab9 service: hid: Stub SetAnalogStickUseCenterClamp
- Used by eBASEBALLパワフルプロ野球2020
2021-04-08 03:41:06 -04:00
bunnei
15a07f0282
Merge pull request #6160 from Morph1984/fs-update-12.x
service: fs: Update service function tables
2021-04-07 20:54:42 -07:00
Morph
28d3661a5c service: time: Fix CalculateStandardUserSystemClockDifferenceByUser
CalculateStandardUserSystemClockDifferenceByUser passes in the ClockSnapshots through 2 input buffers and not as raw arguments. Fix this by reading the 2 input buffers instead of popping raw arguments.
2021-04-07 23:34:14 -04:00
bunnei
262a70223f
Merge pull request #6143 from lat9nq/nvhost_null_memcpy
nvhost_ctrl_gpu: Avoid sending null pointer to memcpy
2021-04-07 16:50:22 -07:00
bunnei
535e50db1c
Merge pull request #6159 from Morph1984/acc-update-12.x
service: acc: Update service function tables
2021-04-07 14:37:59 -07:00
Markus Wick
5145133a60 video_core/gpu_thread: Implement a ShutDown method.
This was implicitly done by `is_powered_on = false`, however the explicit method allows us to block until the GPU is actually gone.

This should fix a race condition while removing the other subsystems while the GPU is still active.
2021-04-07 22:38:52 +02:00
bunnei
d490f6dcf8
Merge pull request #6153 from lioncash/svcrange
process_capability: Handle extended SVC range
2021-04-07 13:01:40 -07:00
Morph
a2d40b8185 hwopus: Update to 12.x 2021-04-07 02:57:39 -04:00
Morph
1ad4c98a5c IFile: Update to 12.x 2021-04-07 02:49:19 -04:00
Morph
c44db90ad1 fsp-srv: Update to 12.x 2021-04-07 02:46:29 -04:00
Morph
531e797795 dauth_o: Update to 11.x 2021-04-07 02:15:55 -04:00
Morph
ded420cfeb acc_u1: Update to 12.x 2021-04-07 02:15:55 -04:00
Morph
63caeca6ba acc_su: Update to 12.x 2021-04-07 02:15:55 -04:00
german77
4fe05d7b42 hid: Update service function tables 2021-04-07 01:15:38 -05:00
Morph
63ebf2a328 ISelfController: Update to 11.x 2021-04-07 02:00:19 -04:00