Commit graph

245 commits

Author SHA1 Message Date
Marshall Mohror
9c7da35382
Merge pull request #5083 from zhaowenlan1779/video-dumping-update
video_core, citra_qt: Video dumping updates
2020-04-03 21:15:32 -05:00
Hamish Milne
714a85119d Don't crash when getting perf stats 2020-04-01 22:50:19 +01:00
Hamish Milne
5b6ee9a6ab Clear out state before deserialization - fixes many crashes. 2020-04-01 22:06:22 +01:00
Hamish Milne
92640fc29c Code review actions (plus hopefully fix the linux CI) 2020-03-31 17:54:28 +01:00
Hamish Milne
6760ea18b6 Serialize ArchiveManager and other code review actions 2020-03-29 18:56:25 +01:00
Hamish Milne
8f164a16ce Review changes 2020-03-28 17:08:27 +00:00
Hamish Milne
4aab38f133 Refactored out the horrible static var in CoreTiming 2020-03-28 15:47:36 +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
1ff8d002a9
Merge pull request #5025 from jroweboy/tomoscrewme
Add CPU Clock Frequency slider
2020-03-28 12:31:41 +00:00
Hamish Milne
232b52a27d Minor cleanup 2020-03-28 09:59:45 +00:00
Hamish Milne
3d1180ee21 DSP now works... committing this!! 2020-03-27 22:19:29 +00:00
Hamish Milne
5604613642 More merge fixes 2020-03-27 21:48:58 +00:00
Hamish Milne
da3ab3d56e Merge branch 'master' into feature/savestates-2 2020-03-07 21:23:08 +00:00
Pengfei Zhu
7afcc0d658
Merge pull request #5106 from GovanifY/master
gdbstub: Ensure gdbstub doesn't drop packets crucial to initialization
2020-03-03 23:53:28 +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
zhupengfei
06a0d86e9c
video_core, core: Move pixel download to its own thread
This uses the mailbox model to move pixel downloading to its own thread, eliminating Nvidia's warnings and (possibly) making use of GPU copy engine.

To achieve this, we created a new mailbox type that is different from the presentation mailbox in that it never discards a rendered frame.

Also, I tweaked the projection matrix thing so that it can just draw the frame upside down instead of having the CPU flip it.
2020-02-27 16:55:08 +08:00
Pengfei Zhu
5b54a99f96
Merge pull request #5088 from zhaowenlan1779/layered-fs
core/file_sys: LayeredFS support
2020-02-25 07:48:10 +08:00
Gauvain "GovanifY" Roussel-Tarbouriech
d8bb37fc2f gdbstub: Ensure gdbstub doesn't drop packets crucial to initialization 2020-02-23 21:37:40 +01:00
James Rowe
276d56ca9b Add CPU Clock Frequency slider
This slider affects the number of cycles that the guest cpu emulation
reports that have passed since the last time slice. This option scales
the result returned by a percentage that the user selects. In some games
underclocking the CPU can give a major speedup. Exposing this as an
option will give users something to toy with for performance, while also
potentially enhancing games that experience lag on the real console
2020-02-21 16:03:07 -07: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
zhupengfei
a487016cb4
core, citra_qt: Implement a save states file format and slot UI
10 slots are offered along with 'Save to Oldest Slot' and 'Load from Newest Slot'.

The savestate format is similar to the movie file format. It is called CST (Citra SavesTate), and is basically a 0x100 byte header (consisting of magic, revision, creation time and title ID) followed by Zstd compressed raw savestate data.

The savestate files are saved to the `states` folder in Citra's user folder. The files are named like `<Title ID>.<Slot ID>.cst`.
2020-02-18 13:19:52 +08:00
zhupengfei
7d880f94db
Add simple zstd compression
Just a simple default compression is able to shrink savestate file size from ~160MB to ~20MB.
2020-02-16 23:25:30 +08:00
Hamish Milne
246ae84a52 Pretty sure ARM/Thread serialization works now 2020-02-13 17:42:12 +08:00
Hamish Milne
c983528862 Reworked DSP serialization 2020-02-13 17:42:12 +08:00
James Rowe
55c75b5e3e Add ClearAll to rasterizer cache for fully wiping the cache on save/load 2020-02-13 17:42:11 +08:00
Hamish Milne
b2370ea353 Fixed setting the right DSP service on deserialization 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
f2de70c3fb Fix crash bugs 2020-02-13 17:42:06 +08:00
Hamish Milne
e4afa8e512 Make the tests pass 2020-02-13 17:42:04 +08:00
Hamish Milne
cf985631e0 Minor tidying up 2020-02-13 17:41:27 +08:00
Hamish Milne
d6862c2fca Some CI fixes 2020-02-13 17:40:52 +08:00
Hamish Milne
7b846ffa98 clang-format fixes 2020-02-13 17:39:15 +08:00
Hamish Milne
6917eaf53b Use load_construct_data for kernel objects 2020-02-13 17:38:25 +08:00
Hamish Milne
3e752002c4 Replace g_kernel with Core::Global etc. 2020-02-13 17:38:21 +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
f79c9668a3 Added shader state; WIP kernel objects 2020-02-13 17:38:10 +08:00
Hamish Milne
6f00976ab5 video_core serialization 2020-02-13 17:34:16 +08:00
Hamish Milne
ee2cae2093 Added core serialization 2020-02-13 17:34:13 +08:00
zhupengfei
2ec99b83aa
core: Reset archive_manager on shutdown.
This holds the archives which include the SelfNCCH archive which holds the RomFS files. If we don't reset it the LayeredFS class can't get destructed and mods files won't be released.
2020-02-07 23:45:02 +08:00
James Rowe
45bc5b465e Add a error log for unsupported configurations for disk cache 2020-01-15 19:58:34 -07:00
James Rowe
d03d201482 Add GetRenderer to core 2020-01-15 19:58:34 -07:00
Khangaroo
5450d4980d crash hotfix (no clang-format because on phone)
hotfix 2: check if the texture is custom before dumping

hotfix 4: fix custom texture conflict detection
2019-11-09 12:56:28 -07:00
Khangaroo
ae4aaf2fc1 nested folder support + refuse to load incompatibly sized textures + general cleanups 2019-11-09 12:56:27 -07:00
Khangaroo
c2a32e942b address more comments 2019-11-09 12:56:27 -07:00
Khangaroo
f09489475a fix texture dumping on opengl es, create load folder if none exists if custom textures is enabled 2019-11-09 12:56:27 -07:00
Khangaroo
b81c15941e add image interface, remove lodepng from video_core/core, address more comments, fix comments
remove unnecessary conversion
2019-11-09 12:56:21 -07:00
Khangaroo
5940361b81 new-line that clang-format didn't fix
address some comments
2019-11-09 12:56:17 -07:00
Khangaroo
59b475a4b9 implement custom texture preload 2019-11-09 12:56:17 -07:00
Khangaroo
6d90c42a79 fix crashes, add custom texture cache, load textures from load directory 2019-11-09 12:54:40 -07:00
zhupengfei
f8b3950829
CMake: separate options for FFmpeg decoder/dumper
Separate options are now provided for FFmpeg AAC audio decoder and FFmpeg video dumper. This allows users to configure Citra with greater freedom.

Also, previously for Linux builds, AAC decoder is accidentally enabled along with the dumper, which could potentially cause patent issues (?). This commit fixes it by only enabling video dumper.
2019-08-20 14:45:39 +08:00
James Rowe
0cffab04b5 Fixup! Prevent issue deleting PerfStats 2019-08-16 21:54:33 -06:00
James Rowe
23e969dfdc Address review comments 2019-08-14 21:17:32 -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
zhupengfei
399a660faa
core/dumping: Add FFmpeg implementation
Sorry for the large diff, the implementation is quite long, and I can't really find a good way to split it into commits.
2019-08-14 09:27:04 +08:00
zhupengfei
f2880b08d1
core: Add VideoDumper to System 2019-08-13 19:28:02 +08: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
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
Lioncash
0a82b00e35 core/telemetry_session: Remove usages of the global system accessor
Makes the dependency explicit in the TelemetrySession's interface
instead of making it a hidden dependency.

This also revealed a hidden issue with the way the telemetry session was
being initialized. It was attempting to retrieve the app loader and log
out title-specific information. However, this isn't always guaranteed to
be possible.

During the initialization phase, everything is being constructed. It
doesn't mean an actual title has been selected. This is what the Load()
function is for. This potentially results in dead code paths involving
the app loader. Instead, we explicitly add this information when we know
the app loader instance is available.
2019-06-09 16:34:46 +02:00
Lioncash
6e22891761 core: Namespace EmuWindow
Gets the class out of the global namespace.
2019-04-21 14:16:16 +02:00
Tobias
e9c2b27c68
Merge pull request #4681 from FearlessTobi/port-2188-2190
Port yuzu-emu/yuzu#2188 and yuzu-emu/yuzu#2190: various minor code refactoring changes
2019-04-09 21:18:34 +02:00
fearlessTobi
041638ea4d applets: implement HLE mii selector applet 2019-04-07 15:35:29 +02:00
Weiyi Wang
5f11c5f733 Kernel: replace boost::intrusive_ptr with std::shared_ptr 2019-03-24 14:32:11 -04:00
Weiyi Wang
c1de8acfe5
Merge pull request #4689 from wwylele/server-leak
ServiceFrameworkBase: remove ownership to ServerPort
2019-03-24 14:29:41 -04:00
Lioncash
6f251a6db2 core/core: Replace direct usage of the global system telemetry accessor from Shutdown()
The telemetry instance is actually a member of the class itself, so we
can access it directly instead of going through the global accessor.
2019-03-17 23:17:57 +01:00
Weiyi Wang
ea496507d5 DSP_DSP: use member system instead of global instance 2019-03-13 10:23:58 -04:00
Weiyi Wang
54d2f16c22 core: reset kernel after service manager in Shutdown
Services can hold kernel objects and do cleanup upon destruction, so we need to keep the kernel alive longer. The new order approximnately resembles the reverse construction order. I will revisit the ordering issue and make it less error-prone after global state cleanup
2019-03-12 19:06:20 -04:00
Weiyi Wang
64f6e5e597 ARM: pass MemorySystem separately in the constructor and make System optional
So that unit test can test CPU without constructing the entire system. Also remove hacks in the System class
2019-02-14 14:04:46 -05:00
Weiyi Wang
9573ee46bd Memory: replace Core::CPU 2019-02-14 14:04:46 -05:00
Weiyi Wang
20f47583f6 Kernel: replace usage of Core::System::GetInstance().PrepareReschedule() with callback 2019-02-14 14:04:46 -05:00
Weiyi Wang
eb050b8403 Kernel: replace usage of Core::System::GetInstance()::Timing() 2019-02-14 14:04:46 -05:00
Weiyi Wang
276ca88c9e kernel/thread: replace usage of Core::CPU() 2019-02-14 14:04:46 -05:00
Weiyi Wang
008197a569 Remove scripting switch in cmake 2019-02-02 15:25:23 -05:00
Weiyi Wang
443f4b964d DSP/LLE: add multithread mode 2018-12-21 20:49:24 -05:00
Weiyi Wang
67213ca855 audio_core/lle: link ahbm and audio callback 2018-12-21 20:49:22 -05:00
Weiyi Wang
21da135cc6 Configuration: add option to use DSP LLE 2018-12-21 20:49:22 -05:00
Weiyi Wang
643b7d4dcb Memory: move memory setup into MemorySystem 2018-12-10 22:01:09 -05:00
Weiyi Wang
e87dc17da2 Pass system into arm interpreter; fix tests 2018-12-05 20:21:14 -05:00
Weiyi Wang
cfee59c6db hw/gpu: pass in memory reference 2018-12-05 20:16:42 -05:00
Weiyi Wang
8bb404c82a VideoCore: pass in memory system
currently set as global. Will change when videocore itself is wrapped as a class
2018-12-05 20:16:42 -05:00
Weiyi Wang
8c618c3fc3 Memory: move PageTable functions into class 2018-12-05 20:16:42 -05:00
Weiyi Wang
8118be6615 Kernel: pass in MemorySystem 2018-12-05 20:16:42 -05:00
Weiyi Wang
6992f76acf Memory: create MemorySystem class 2018-12-05 20:16:42 -05:00
Ben
b90ff739a0 Add CheatEngine and support for Gateway cheats (#4406)
* Add CheatEngine; Add support for Gateway cheats; Add Cheat UI

* fix a potential crash on some systems

* fix substr with negative length

* Add Joker to the NonOp comp handling

* Fixup JokerOp

* minor fixup in patchop; add todo for nested loops

* Add comment for PadState member variable in HID

* fix: stol to stoul in parsing cheat file

* fix misplaced parsing of values; fix patchop code

* add missing break

* Make read_func and write_func a template parameter
2018-11-16 18:01:10 -07:00
Weiyi Wang
aec8b1e375 SVC: use context and generic templates 2018-11-12 13:59:34 -05:00
Weiyi Wang
9458e4d8ec CoreTiming: wrap into class 2018-11-04 10:26:38 -05:00
Weiyi Wang
fc84091d88 Service, Kernel: move named port list to kernel 2018-11-01 12:56:40 -04:00
Weiyi Wang
263290d48c HLE: move SharedPage into Kernel
similar to config_mem, kernel is responsible for setting up this
2018-11-01 12:56:40 -04:00
Weiyi Wang
2183d0d6be core: use internal kernel pointer directly 2018-10-30 00:35:37 -04:00
Weiyi Wang
0478bc3dee Kernel/Thread: move thread queue, current thread, and scheduling related function into the manager
As we touched it, remove IPC::GetCommandBuffer
2018-10-26 16:07:11 -04:00
Weiyi Wang
8fb3d8ff38 kernel/process: move current process to kernel instance
Two functional change:
QueryProcessMemory uses the process passed from handle instead current_process
Thread::Stop() uses TLS from owner_process instead of current_process
2018-10-22 21:32:34 -04:00
Weiyi Wang
13c26b4371 Kernel: pass ref to session pair 2018-10-18 21:41:36 -04:00
Weiyi Wang
1213a298df Kernel: pass ref to port 2018-10-18 21:41:36 -04:00
Weiyi Wang
181646679c ServiceManager: pass down core reference 2018-10-18 21:41:36 -04:00
Weiyi Wang
f446fd1fe5 Kernel: add KernelSystem class 2018-10-18 21:41:00 -04:00
Weiyi Wang
0962ab8da9
Merge pull request #4305 from wwylele/fs-global
FS/archive: wrap states into ArchiveManager class
2018-10-11 13:04:02 -04:00
Weiyi Wang
9adc407112
Merge pull request #4304 from B3n30/std_optional
Replace boost::optional with std::optional where possible
2018-10-11 12:40:00 -04:00
Weiyi Wang
389d3d630e fs/archive: wrap states into archive manager 2018-10-06 01:23:03 -04:00