Commit graph

2447 commits

Author SHA1 Message Date
Hamish Milne 03379b2072 Merge remote-tracking branch 'upstream/master' into feature/savestates-2 2020-03-28 12:46:24 +00:00
Hamish Milne 7049af744f Merge remote-tracking branch 'upstream/master' into feature/savestates-2 2020-03-28 12:33:21 +00:00
Pengfei Zhu 3edc4a3055
service/ldr_ro: Fix CRO loading when the buffer contained multiple VM areas (#5125)
* vm_manager: Handle multiple areas in ChangeMemoryState

It is possible that a few areas have the same permisson and state, but with different backing pointers. Currently, this function assumes that only one continous area is found, but this is not always the case.

* service/ldr_ro: Handle multiple areas in VerifyBufferState

It is possible that the buffer passed from the game is made up of multiple areas with the same permisson and state but different backing pointers. Change the check to allow that.
2020-03-28 13:26:54 +01:00
Hamish Milne 5604613642 More merge fixes 2020-03-27 21:48:58 +00:00
Pengfei Zhu 25ebf03c35
Merge pull request #5120 from zhaowenlan1779/file-write
service/fs: Update file size on write
2020-03-22 01:00:31 +08:00
B3n30 ed51f06097 fix path usage in InstallCia 2020-03-17 13:40:58 +01:00
Ben 590099a17a
CFG: Let GetSystemModel report model based on Settings:is_new_3ds (#5104)
* CFG: Let GetSystemModel report model based on  Settings:is_new_3ds

* Always write ol3ds console model to cfg savegame
2020-03-16 20:05:06 +01:00
B3n30 1d92343344 fix more review comments 2020-03-15 19:00:26 +01:00
B3n30 2465fd423a fix review comments 2020-03-15 18:57:29 +01:00
B3n30 391580c658 fix clang-format 2020-03-15 18:50:52 +01:00
B3n30 ae4ba287d5 warn if cia contend is encrypted 2020-03-15 18:23:19 +01:00
Pengfei Zhu ad3c464e2d
Merge pull request #5116 from zhaowenlan1779/cam-vsync
service/cam: Implement Vsync interrupt events
2020-03-12 10:42:39 +08:00
Hamish Milne da3ab3d56e Merge branch 'master' into feature/savestates-2 2020-03-07 21:23:08 +00:00
zhupengfei fc251b32b0
service/fs: Update file size on write
The file's size is stored in FileSessionSlot and retrieved when the game calls GetSize. However, it is not updated when the file is written to, which can possibly change the file size. Therefore, this can cause GetSize to return incorrect results.
2020-03-05 14:50:08 +08:00
zhupengfei 28014496c6
Fix incorrect port_id use 2020-03-03 12:13:45 +08:00
zhupengfei eced511382
service/cam: Implement Vsync interrupt callbacks
According to HW tests, this vsync event is signaled for activated cameras at about the same frequency as the frame rate. The last 5 vsync timings are recorded (in microseconds) and can be retrieved with the service function.

Also, corrected the default frame_rate to 15, according to HW test.

This should fix the missing camera images in certain games.
2020-03-01 17:07:43 +08:00
Tobias 6d3d9f7a8a
core: Add support for N3DS memory mappings (#5103)
* core: Add support for N3DS memory mappings

* Address review comments
2020-02-29 19:48:27 +01:00
Ben 55ec7031cc
Core timing 2.0 (#4913)
* Core::Timing: Add multiple timer, one for each core

* revert clang-format; work on tests for CoreTiming

* Kernel:: Add support for multiple cores, asserts in HandleSyncRequest because Thread->status == WaitIPC

* Add some TRACE_LOGs

* fix tests

* make some adjustments to qt-debugger, cheats and gdbstub(probably still broken)

* Make ARM_Interface::id private, rework ARM_Interface ctor

* ReRename TimingManager to Timing for smaler diff

* addressed review comments
2020-02-21 19:31:32 +01:00
Ben e3dbdcbdff
HTTP_C::Implement Context::MakeRequest (#4754)
* HTTP_C::Implement Context::MakeRequest

* httplib: Add add_client_cert_ASN1 and set_verify

* HTTP_C: Fix request methode strings case in MakeRequest

* HTTP_C: clang-format and cleanups

* HTTP_C: Add comment about async in BeginRequest and BeginRequestAsync

* Update httplib to contain all the changes we need; adapt http_c and web_services to the changes in httplib; addressed minor review comments

* Add android-ifaddrs
2020-02-21 19:04:04 +01:00
Marshall Mohror 996f1546b2
core: Remove outdated MSVC workarounds (#5099)
* core/hw/gpu: Remove outdated MSVC workarounds

* core/hle/service/hid: Remove MSVC workaround
2020-02-20 13:40:21 -06:00
zhupengfei 57efc41973
service/cecd: Add missing SessionData serialization 2020-02-14 17:15:08 +08:00
zhupengfei 7e8041df28
kernel/timer: Add missing base object 2020-02-14 17:13:53 +08:00
Hamish Milne 246ae84a52 Pretty sure ARM/Thread serialization works now 2020-02-13 17:42:12 +08:00
James Rowe 3e34ad6890 Hack: Workaround crash when loading state and gyro is used 2020-02-13 17:42:11 +08:00
Hamish Milne 0effb229cd Fix geometry pipeline; attempt to fix motion controls 2020-02-13 17:42:10 +08:00
Hamish Milne 2217b3558d Fixed file services serialization 2020-02-13 17:42:10 +08:00
Hamish Milne c24ea0f0ee Serialize core timing 2020-02-13 17:42:09 +08:00
Hamish Milne 8abc5525be Added Signals; more runtime fixes 2020-02-13 17:42:09 +08:00
Hamish Milne e4f05884c3 Fixed serialization runtime exceptions 2020-02-13 17:42:08 +08:00
Hamish Milne ca971ff31f Serialize file/directory services 2020-02-13 17:42:08 +08:00
Hamish Milne 9525d81344 More base-derived fixes 2020-02-13 17:42:07 +08:00
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