Commit graph

2416 commits

Author SHA1 Message Date
Hamish Milne
996aba39fe Correct exports; add some file serialization; fix service base object serialization 2020-02-13 17:42:07 +08:00
Hamish Milne
f2de70c3fb Fix crash bugs 2020-02-13 17:42:06 +08:00
Hamish Milne
116d22d562 Refactor out the wakeup_callback function pointer 2020-02-13 17:42:05 +08:00
Hamish Milne
7019561fd5 Bind NWM_UDS service in the constructor 2020-02-13 17:42:05 +08:00
Hamish Milne
96432589bd Use shared_ptr for PageTable 2020-02-13 17:42:04 +08:00
Hamish Milne
e4afa8e512 Make the tests pass 2020-02-13 17:42:04 +08:00
Hamish Milne
65d96bf6c1 Changed u8* to MemoryRef 2020-02-13 17:42:00 +08:00
Hamish Milne
cf985631e0 Minor tidying up 2020-02-13 17:41:27 +08:00
Hamish Milne
26e90a99cd Added basic UI; misc memory fixes 2020-02-13 17:41:27 +08:00
Hamish Milne
558e710e17 Finished archives; remove pod.h 2020-02-13 17:41:26 +08:00
Hamish Milne
2d2c7218ef Serialize CECD, CFG services 2020-02-13 17:41:25 +08:00
Hamish Milne
ef2e503281 Serialize QTM, Y2R services 2020-02-13 17:41:24 +08:00
Hamish Milne
92857efca4 Serialize PTM service 2020-02-13 17:41:24 +08:00
Hamish Milne
f5e2f873b0 Serialize NWM service 2020-02-13 17:41:24 +08:00
Hamish Milne
571b1062f0 Serialize NIM, PS, PXI, SOC, SSL services 2020-02-13 17:41:23 +08:00
Hamish Milne
2409ee39cb Serialize IR, MVD, NDM, NEWS, NFC 2020-02-13 17:41:23 +08:00
Hamish Milne
3d6e372f96 More clang format fixes. Really need to standardise the version of this 2020-02-13 17:41:23 +08:00
Hamish Milne
01ec2e8a67 Serialize MIC service 2020-02-13 17:41:22 +08:00
Hamish Milne
e3c0211b74 Fix clang format 2020-02-13 17:41:22 +08:00
Hamish Milne
eb67167b7c Serialize IR service 2020-02-13 17:41:22 +08:00
Hamish Milne
8bd3e8cd27 Serialize HTTP service 2020-02-13 17:41:22 +08:00
Hamish Milne
74361fa3fb Serialize HID service 2020-02-13 17:41:21 +08:00
Hamish Milne
30494c06a4 Serialize GSP service 2020-02-13 17:41:21 +08:00
Hamish Milne
d041901a30 Some more CI fixes 2020-02-13 17:41:20 +08:00
Hamish Milne
c7106e232f Fix a bug on mingw 2020-02-13 17:41:16 +08:00
Hamish Milne
7b846ffa98 clang-format fixes 2020-02-13 17:39:15 +08:00
Hamish Milne
d482fb359c Attempting to fix mingw on windows 2020-02-13 17:38:25 +08:00
Hamish Milne
6917eaf53b Use load_construct_data for kernel objects 2020-02-13 17:38:25 +08:00
Hamish Milne
3ed8d95866 Serialize FS service; some compiler fixes 2020-02-13 17:38:24 +08:00
Hamish Milne
d1096de245 Added FRD service serialization 2020-02-13 17:38:24 +08:00
Hamish Milne
4354179156 Added ERR service serialization 2020-02-13 17:38:23 +08:00
Hamish Milne
452ae2e371 Added DSP service serialization 2020-02-13 17:38:23 +08:00
Hamish Milne
30fe2bfe38 Added DLP service serialization 2020-02-13 17:38:23 +08:00
Hamish Milne
a0c3b91785 Added CSND serialization 2020-02-13 17:38:23 +08:00
Hamish Milne
17b9cbefef CAM service serialization 2020-02-13 17:38:22 +08:00
Hamish Milne
1185d62792 BOSS service serialization 2020-02-13 17:38:22 +08:00
Hamish Milne
5265c79056 APT service serialization 2020-02-13 17:38:21 +08:00
Hamish Milne
3e752002c4 Replace g_kernel with Core::Global etc. 2020-02-13 17:38:21 +08:00
Hamish Milne
e707685c2a Serialize AM services 2020-02-13 17:38:20 +08:00
Hamish Milne
89e4e49a63 Finished AC and ACT service serialization 2020-02-13 17:38:20 +08:00
Hamish Milne
3fd5c431f1 Service serialization framework; done AC 2020-02-13 17:38:20 +08:00
Hamish Milne
ac0337d8df Started IPC services serialization 2020-02-13 17:38:19 +08:00
Hamish Milne
7a5bde0b44 Serialize service manager, server prt 2020-02-13 17:38:19 +08:00
Hamish Milne
4f95575d41 Serialize some more kernel objects 2020-02-13 17:38:18 +08:00
Hamish Milne
8c81500dee Serialize kernel/hle/memory 2020-02-13 17:38:18 +08:00
Hamish Milne
c284192a87 Serialize geometry_pipeline 2020-02-13 17:38:17 +08:00
Hamish Milne
f557d26b40 Added CPU, mutex, process, thread, timer 2020-02-13 17:38:16 +08:00
Hamish Milne
06891d9454 Added client/server objects 2020-02-13 17:38:16 +08:00
Hamish Milne
5035e68dad Added derived kernel objects 2020-02-13 17:38:15 +08:00
Hamish Milne
f79c9668a3 Added shader state; WIP kernel objects 2020-02-13 17:38:10 +08:00
Hamish Milne
dc04774ece Added POD serialization 2020-02-13 17:27:51 +08:00
Hamish Milne
6940c99ed6 Added boost serialization 2020-02-13 17:27:50 +08:00
zhupengfei
17ba846a3f
applets/swkbd: Remove text memory clearing
The text shared memory wasn't supposed to be cleared according to my comparison with the LLE swkbd. This can cause issues in certain games such as Harvest Moon.

A null terminator is added to the text copied to mark the end of the string.
2019-12-01 23:01:07 +08:00
vvanelslande
e1e136d72f service/mic: actually use the specified device 2019-11-11 17:15:10 -05:00
James Rowe
223bfc9a2a
Merge pull request #4847 from zhaowenlan1779/ipc-debugger
core, citra_qt: IPC Recorder
2019-09-21 00:04:07 -06:00
vitor-k
147a7f0dec Remove boost headers not currently used 2019-09-15 15:18:38 -03:00
vitor-k
bb12af1da7 Remove unused boost header 2019-09-15 14:00:55 -03:00
James Rowe
7bfd829c77
Merge pull request #4893 from wwylele/nfc-state
NFC: extract frontend-facing tag state
2019-09-13 08:59:51 -06:00
vitor-k
6e3652d15b Struct vs class declaration and unused variable 2019-09-02 22:45:38 -03:00
Valentin Vanelslande
2959b002cd applet_manager: remove the "we are going to disable loading LLE applets before further fixes are done" comments
LLE Applets are enabled again in #4500, but @wwylele didn't remove these comments.
2019-08-29 20:41:16 -05:00
zhupengfei
f40232adc9
service/sm: Add service name retrival based on client port ID
This is for displaying the service names. This function is only used in the frontend, because Recorder which is in the Kernel cannot and should not have access to SM in the System.
2019-08-20 03:07:30 +08:00
zhupengfei
efd69e1315
kernel, service: Add HLE request/reply recording
Pretty much the same as LLE requests, the 'translate' part is chosen. A function is added to the context class to record requests that involves unimplemented HLE functions.
2019-08-20 03:07:29 +08:00
zhupengfei
a27dfc269a
kernel: Add LLE request/reply recording
The 'translate' function is a great place to put this in IMO as it is possible to get both untranslated and translated cmdbufs. However a kernel reference has to be passed here, but it is not too hard fortunately.
2019-08-20 03:07:29 +08:00
zhupengfei
cb0bd6530c
kernel/svc: Add request registering
All necessary objects are available here, making this a great place for the registering part.
2019-08-20 03:07:27 +08:00
zhupengfei
b093d39a27
kernel: Add IPC Recorder to KernelSystem
Refer to the previous commit message for reasons why this is in kernel.
2019-08-20 03:07:26 +08:00
zhupengfei
a3057c968b
kernel: Add IPC Recorder class
This class resides in Kernel mainly because that, it's hard for kernel objects to get references to the System (and therefore to the Recorder), while much easier for KernelSystem. If this is to be moved to System the code will likely get much more complex with System (or Recorder) references passed everywhere.
2019-08-20 03:07:25 +08:00
zhupengfei
71e0c40310
service: Add service function name lookup based on header code
This is for displaying the function name for HLE requests. Probably it is possible to do the same for LLE ones but it would require having the HLE handlers available even when not using them, which doesn't seem to make sense and is more of a hack than a proper solution in my opinion.
2019-08-20 03:07:25 +08:00
Weiyi Wang
8b8111b425 NFC: extract frontend-facing tag state
Added a new state amiibo_in_range. This state is akin to the real world
physical relationship between a 3DS machine and an amiibo, which is
independent from the service state (or even the machine is powered on or
not). The service state nfc_tag_state is then synchronized with this
physical state on every potential point when the state changes. This
solves the issue where user might load an amiibo before NFC service
initializes, or remove an amiibo after NFC service shutdown, which
previously causes inconsistent state change.

Also removed std::atomic on nfc_tag_state, because
1. It is already protected by g_hle_lock
2. It wasn't properly used in the code anyway. For example, there are
many double loading on this variable, which effectively make it
non-atomic.
2019-08-17 21:56:12 -04:00
James Rowe
00eeaf0e9c
Merge pull request #4882 from jroweboy/frametime-logging
Frametime logging for tracking performance over time
2019-08-16 19:33:53 -06:00
James Rowe
331a9fc12b Change over to std::shared_ptr 2019-08-14 21:30:49 -06:00
James Rowe
61ebeca765 NS: Lowercase NS:S to ns:s like it should be 2019-08-14 21:23:06 -06:00
James Rowe
6c8faaf2c2 HLE: Remove BaseInterface and add ns.cpp back 2019-08-14 21:23:06 -06:00
James Rowe
f2167d76a8 Service: Add BaseInterface and NSInterface 2019-08-14 21:23:03 -06:00
James Rowe
b62ca12e88 HLE: Move NS:S into APT and remove NS 2019-08-14 21:21:33 -06:00
James Rowe
62e6c147ae Add perf stat logging through ini setting
For better tracking of performance regressions on incoming changes, this
change adds a way to dump frametime to file by changing an ini config
option. This is intentionally hidden as its only useful to a small
number of individuals, and not really applicable to the general
userbase.
2019-08-14 21:17:27 -06:00
xperia64
8131bd32e3 renderer_opengl: Add support for custom shaders (#4578)
* Add Anaglyph 3D

Change 3D slider in-game

Change shaders while game is running

Move shader loading into function

Disable 3D slider setting when stereoscopy is off

The rest of the shaders

Address review issues

Documentation and minor fixups

Forgot clang-format

Fix shader release on SDL2-software rendering

Remove unnecessary state changes

Respect 3D factor setting regardless of stereoscopic rendering

Improve shader resolution passing

Minor setting-related improvements

Add option to toggle texture filtering

Rebase fixes

* One final clang-format

* Fix OpenGL problems
2019-08-09 20:00:47 +02:00
Weiyi Wang
909d04ddea Remove unused stuff
Some unused variables are still kept in services, as they are parameters passed from the command buffer and might be used in the future
2019-07-16 20:27:03 -04:00
Pengfei Zhu
fb8adcc08c
Merge pull request #4839 from wwylele/ipc-sign
ipc_helpers: silent signed comparison warning
2019-07-15 12:03:31 +08:00
Weiyi Wang
fd3cfd0ae0 ipc_helpers: silent signed comparison warning
index is only used as positive index in arrays. The warning is in DEBUG_ASSERT_MSG(index == TotalSize() ...)
2019-07-14 14:52:17 -04:00
Weiyi Wang
6ee908dc84 kernel: silence -Wreorder 2019-07-14 14:44:17 -04:00
Weiyi Wang
508fa94e5d
Merge pull request #4799 from bamsbamx/pr-separate-cpu-mem
kernel: handle all page table changes internally when switching processes
2019-07-13 22:25:51 -04:00
Weiyi Wang
cae913d3d5
Merge pull request #4760 from wwylele/csnd
Foundation for CSND
2019-06-30 23:24:27 -04:00
Weiyi Wang
0b4be6e53a
Merge pull request #4803 from FearlessTobi/port-2580
Port yuzu-emu/yuzu#2580: "kernel/vm_manager: Remove redundant Reset call in destructor "
2019-06-29 22:52:36 -04:00
bamsbamx
79b837afa7 kernel: Rename memory page table set function 2019-06-27 16:33:55 +02:00
bamsbamx
ed095f3bff kernel: Nullability check for current_cpu when changing memory page table
This attempts to fix segfault in some tests where page table is set before initializing cpu core (intended behaviour? might be worth a check...)
see: src/tests/core/arm/arm_test_common.cpp
see: src/tests/core/arm/dyncom/arm_dyncom_vfp_tests.cpp
2019-06-26 11:51:42 +02:00
bamsbamx
dbfd830695 kernel: Let the kernel handle all page table changes when switching processes
It will both change the page table in memory and notify the CPU about the change by itself. This way there is no need to call memory.SetCurrentPageTable() when kernel.setCurrentProcess() and the management is kept internally in the kernel
2019-06-26 00:39:11 +02:00
Lioncash
1f2e75ecea kernel/vm_manager: Remove redundant Reset call in destructor
This is performing more work than would otherwise be necessary during
VMManager's destruction. All we actually want to occur in this scenario
is for any allocated memory to be freed, which will happen automatically
as the VMManager instance goes out of scope.

Anything else being done is simply unnecessary work.
2019-06-24 17:21:13 +02:00
Weiyi Wang
d483e556e3 gsp: remove unused GetFramebufferInfo 2019-06-23 14:25:28 -04:00
Weiyi Wang
8251de44cf GSP_GPU: move used_thread_ids into the class 2019-06-23 14:22:38 -04:00
bamsbamx
ac9755306c cpu_core: Separate cpu_core and memory
This makes cpu_core and memory being completely independent components inside the system, having a simpler and more understandable initialization process
The thread which casues page table changes in memory will be responsible to notify the cpu_core too
2019-06-22 18:21:50 +02:00
Tobias
318095f9b9
Port yuzu-emu/yuzu#2249: "ipc_helpers: Allow pushing and popping floating-point values" (#4702)
Certain values that are passed through the IPC buffer are actually
floating point values, not solely integral values.
2019-06-09 16:03:22 +02:00
Weiyi Wang
803e1fd5a0
Merge pull request #4747 from MerryMage/copyblock
memory: Re-order CopyBlock arguments to match other overload
2019-05-07 09:34:02 -04:00
Tobias
623b0621ab
Port various minor changes from yuzu PRs (#4725)
* common/thread: Remove unused functions

Many of these functions are carried over from Dolphin (where they aren't
used anymore). Given these have no use (and we really shouldn't be
screwing around with OS-specific thread scheduler handling from the
emulator, these can be removed.

The function for setting the thread name is left, however, since it can
have debugging utility usages.

* input_common/sdl: Use a type alias to shorten declaration of GetPollers

Just makes the definitions a little bit more tidy.

* input_common/sdl: Correct return values within implementations of GetPollers()

In both cases, we weren't actually returning anything, which is
undefined behavior.

* yuzu/debugger/graphics_surface: Fill in missing surface format listings

Fills in the missing surface types that were marked as unknown. The
order corresponds with the TextureFormat enum within
video_core/texture.h.

We also don't need to all of these strings as translatable (only the
first string, as it's an English word).

* yuzu/debugger/graphics_surface: Clean up connection overload deduction

We can utilize qOverload with the signal connections to make the
function deducing a little less ugly.

* yuzu/debugger/graphics_surface: Tidy up SaveSurface

- Use QStringLiteral where applicable.

- Use const where applicable

- Remove unnecessary precondition check (we already assert the pixbuf
  being non null)

* yuzu/debugger/graphics_surface: Display error messages for file I/O errors

* core: Add missing override specifiers where applicable

Applies the override specifier where applicable. In the case of
destructors that are  defaulted in their definition, they can
simply be removed.

This also removes the unnecessary inclusions being done in audin_u and
audrec_u, given their close proximity.

* kernel/thread: Make parameter of GetWaitObjectIndex() const qualified

The pointed to member is never actually modified, so it can be made
const.

* kernel/thread: Avoid sign conversion within GetCommandBufferAddress()

Previously this was performing a u64 + int sign conversion. When dealing
with addresses, we should generally be keeping the arithmetic in the
same signedness type.

This also gets rid of the static lifetime of the constant, as there's no
need to make a trivial type like this potentially live for the entire
duration of the program.

* kernel/codeset: Make CodeSet's memory data member a regular std::vector

The use of a shared_ptr is an implementation detail of the VMManager
itself when mapping memory. Because of that, we shouldn't require all
users of the CodeSet to have to allocate the shared_ptr ahead of time.
It's intended that CodeSet simply pass in the required direct data, and
that the memory manager takes care of it from that point on.

This means we just do the shared pointer allocation in a single place,
when loading modules, as opposed to in each loader.

* kernel/wait_object: Make ShouldWait() take thread members by pointer-to-const

Given this is intended as a querying function, it doesn't make sense to
allow the implementer to modify the state of the given thread.
2019-05-01 14:28:49 +02:00
Pengfei Zhu
37861526ff
Merge pull request #4733 from zhaowenlan1779/ps
service/ps: Implement PS:EncryptDecryptAes
2019-04-29 21:39:53 +08:00
Weiyi Wang
64641cf958 CSND: handle command processing 2019-04-28 15:25:46 -04:00
Tobias
7ea82e7941
Merge pull request #4736 from FearlessTobi/port-2356
Port yuzu-emu/yuzu#2356: "kernel/{server_port, server_session}: Return pairs instead of tuples from pair creation functions"
2019-04-27 00:07:13 +02:00
Ben
f4da2de99a
Set accepted EULA version to max value (#4728)
* Set accepted EULA version to max value

CFG: write the max value of 0x7F7F to the default cfg savegame and
auto update on init

CECD: Actually read the EULA version from CFG
2019-04-23 23:18:27 +02:00
Ben
624271696e
HTTP_C: Implement SetClientCertContext, GetSSLError, BeginRequest, BeginRequestAsync (#4753)
* HTTP_C: Implement SetClientCertContext and GetSSLError; Stubbed BeginRequest and BeginRequestAsync

* HTTP_C: Move logs to beginning of function calls
2019-04-23 18:35:28 +02:00
Lioncash
882f647760 kernel/wait_object: Make GetHighestPriorityReadyThread() a const member function
This doesn't actually modify internal state of a wait object, so it can
be const qualified.
2019-04-20 20:38:38 +02:00
Pengfei Zhu
536e4de499
Merge pull request #4700 from zhaowenlan1779/swkbd-2
applets/swkbd: Add callback support
2019-04-20 22:18:15 +08:00