Commit graph

2485 commits

Author SHA1 Message Date
Lioncash
f7ad004fb0 kernel/shared_page: Silence missing return warning in GetInitTime()
We can use UNREACHABLE_MSG to indicate that this path isn't intended to
be reached, as it would indicate a wrong enum value.
2020-04-18 19:48:54 -04:00
Lioncash
7eabcdf1c3 apt/applet_manager: std::move parameter in GlanceParameter()
Same behavior, minus a redundant copy.
2020-04-18 19:22:03 -04:00
Lioncash
a6e37b48e9 ipc_helpers: Make PushStaticBuffer take std::vector by value
Allows interfaces to move the vector into the calls, avoiding any
reallocations.

Many existing call sites already std::move into the parameter, expecting
a move to occur. Only a few remain where this wasn't already
being done, which we can convert over.
2020-04-18 19:17:11 -04:00
Hamish Milne
397bd1bb73
Fix MIC_U serialization and timing (#5223)
* Fix MIC_U serialization and timing

* Better sample rate conversion

* Actually should be every 15 samples

* Reduce rounding errors
2020-04-18 20:52:56 +02:00
Sebastian Valle
75c9784239
Services/APT: Implemented the GetCaptureInfo function. (#5194)
This one is similar to the ReceiveCaptureBufferInfo function except it doesn't clear the capture buffer, according to 3dbrew.

This function is used by the Home Menu
2020-04-18 20:48:09 +02:00
Hamish Milne
c5a3bf9728 Fix clang format 2020-04-18 15:14:01 +01:00
Hamish Milne
1fb3c9f08c Fix Address Arbiter serialization 2020-04-18 15:10:54 +01:00
Subv
07f49e588e Services/APT: Implemented the IsTitleAllowed function.
The Home Menu uses this to determine whether it is allowed to launch an app (call StartApplication)

This is a no-op for us, we allow any and all titles to be launched. The official APT module holds a list of some forbidden titles like some versions of IronFall and Flipnote Studio 3D.
2020-04-18 00:26:08 -05:00
Pengfei Zhu
8967b403b9
Merge pull request #5196 from Subv/apt_sys_menu_arg
Services/APT: Implemented the Store/LoadSysMenuArg functions.
2020-04-18 13:24:10 +08:00
Pengfei Zhu
47829ee095
Merge pull request #5213 from Subv/fs_resource
Services/FS: Stubbed GetSdmcArchiveResource and GetNandArchiveResource.
2020-04-18 13:22:21 +08:00
Ben
c605bb42db
Merge pull request #4908 from hamish-milne/feature/savestates-2
Save states
2020-04-17 21:52:51 +02:00
Hamish Milne
f5b23eff4b Correctly register AddressArbiter as a type of WakeupCallback 2020-04-17 14:13:22 +01:00
Hamish Milne
026a63bcf7
Merge pull request #5130 from B3n30/warn_if_cia_contend_is_encrypted
Show an error if CIA contend is encrypted
2020-04-17 00:09:36 +01:00
Hamish Milne
d6c84227d8 Fixed NWM not responding 2020-04-16 20:44:25 +01:00
Hamish Milne
9cd669db84 Merge branch 'master' into feature/savestates-2 2020-04-16 19:03:49 +01:00
Subv
0d8c3ee1d3 Services/APT: Implemented the Store/LoadSysMenuArg functions.
They are called by the Home Menu during initialization.

These functions will not see much use until we actually implement application jumping and system rebooting. For now we just need them to prevent some unmapped reads in the Home Menu due to the static buffers not being properly set up.
2020-04-15 22:32:11 -05:00
Subv
783e7af5b2 Services/FS: Stubbed GetSdmcArchiveResource and GetNandArchiveResource.
Also rewritten how GetArchiveResource works so that they all use the same interface.
We should decide what to do with these at some point.

Related to #3131 and #3110
2020-04-15 16:52:55 -05:00
Sebastian Valle
9ae37da292
Kernel/Process: Fixed scheduling multiple processes in the SysCore using Dynarmic (#5193)
* Kernel/Process: Notify the CPUs that a new pagetable has been set every time the process they're executing changes.

Previously the page table would only be changed when the current CPU's page table was changed, this lead to stale JIT states and the PC going to 0 when context-switching a different core inside the ThreadManager::SwitchContext function because the JIT for a new pagetable is only constructed upon receiving the change notification.

* Kernel/Process: Use the relevant CPU's last process to determine when to switch its current process.

Previously it was checking the kernel's current_process variable, which gets overwritten every time a CPU runs its slice. The rescheduling happens after all CPUs have run their slice so the code was effectively only checking the last CPU's process.
2020-04-15 14:35:19 +02:00
Valentin Vanelslande
263e5be78e
Fix Luigi's Mansion can't remove amiibo bug (#5200)
* Fix Luigi's Mansion can't remove amiibo bug
2020-04-14 14:33:49 +02:00
Hamish Milne
828f88d20a Merge branch 'master' into feature/savestates-2 2020-04-12 11:24:06 +01:00
Hamish Milne
19872b599b Fix button state not persisting between loads 2020-04-11 20:47:14 +01:00
Hamish Milne
34af0d3452 Attempt to fix network bug 2020-04-11 20:33:38 +01:00
Hamish Milne
e6b40486c5 Add a couple of useful SVC logs 2020-04-11 19:47:06 +01:00
Hamish Milne
3871d74bc2 Fix mic sharedmemory not being deallocated 2020-04-11 19:33:21 +01:00
Subv
0e88940df1 Warnings/Thread: Added missing case for the Dormant thread status in ResumeFromWait. 2020-04-11 12:24:09 -05:00
Hamish Milne
3278a4d7ef Fix crashes when loading with cameras active 2020-04-10 14:02:18 +01:00
Hamish Milne
d4ccce1365 Add some member initializers in thread 2020-04-02 00:14:00 +01:00
Hamish Milne
f156fdd332 clang format fixes etc. 2020-03-31 18:27:33 +01:00
Hamish Milne
92640fc29c Code review actions (plus hopefully fix the linux CI) 2020-03-31 17:54:28 +01:00
Hamish Milne
9bd189a155 More cleaning up 2020-03-29 19:07:56 +01:00
Hamish Milne
6760ea18b6 Serialize ArchiveManager and other code review actions 2020-03-29 18:56:25 +01:00
Hamish Milne
04aa351c40 Code review - general gardening 2020-03-29 16:14:36 +01:00
Hamish Milne
8f059ae398
Apply suggestions from code review
Co-Authored-By: Mat M. <mathew1800@gmail.com>
2020-03-29 11:39:46 +01:00
Hamish Milne
de9ae14059 Only serialize wchar paths on windows 2020-03-28 19:29:29 +00:00
Hamish Milne
8f164a16ce Review changes 2020-03-28 17:08:27 +00:00
Hamish Milne
d92b3e9754 Code review changes - clarified HTTP serialization 2020-03-28 16:29:15 +00:00
FearlessTobi
b4ac1c0559 citra_qt/system: Add N3DS mode checkbox and enable it by default 2020-03-28 16:49:35 +01:00
Hamish Milne
025960bcdd Attempt to fix flatpak CI 2020-03-28 15:10:35 +00:00
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