Commit graph

273 commits

Author SHA1 Message Date
emufan4568
12f84e18dc externals: Upgrade glad to latest version
* Also change some mentions to OpenGL 3.3 to 4.3
2022-08-22 23:44:03 +03:00
bunnei
62753e882e
Merge pull request #5448 from zhaowenlan1779/rerecording
Implement basic rerecording features
2022-02-18 20:29:36 -07:00
bunnei
da3a9bfc96 core: Reset cpu_core after kernel.
- Fixes a crash on Android.

core.cpp: check if video_dumper is created before trying to shut it down
2021-12-18 16:52:21 +05:30
BreadFish64
5a8c6990bf memory: fix memory leak related to un-freed shared memory 2021-12-18 00:06:15 +05:30
bunnei
9ff97270cf
Merge pull request #5501 from FearlessTobi/port-1064-3948
Port yuzu-emu/yuzu#1064 and yuzu-emu/yuzu#3948: Changes to Telemetry and CPU feature detection
2021-04-23 22:58:08 -07:00
zhupengfei
996ca25a2e
core_timing: Lock CoreTiming event queue while deserializing
To handle those classic asymmetric constructor/destructor side effects
2021-02-08 11:25:39 +08:00
Marshall Mohror
2539215f18
Merge pull request #5660 from FearlessTobi/port-5166
Port yuzu-emu/yuzu#5166: "core: Remove unnecessary enum casts in log calls"
2021-02-03 10:19:38 -06:00
Lioncash
10f440cb59 common/telemetry: Migrate namespace into the Common namespace
Migrates the Telemetry namespace into the Common namespace to make the
code consistent with the rest of our common code.
2021-01-04 05:17:13 +01:00
FearlessTobi
da908a9ed1 core: Remove unnecessary enum casts in log calls
Follows the video core PR. fmt doesn't require casts for enum classes
anymore, so we can remove quite a few casts.

Co-Authored-By: LC <712067+lioncash@users.noreply.github.com>
2020-12-29 06:39:21 +01:00
xperia64
94013c8e00
Merge ARM64 Dynarmic (#5620)
* Point dynarmic to citra fork, update dynarmic to AArch64 merge branch

* Enable dynarmic ARM64 support
2020-12-28 18:39:00 -05:00
Pengfei Zhu
21fb9d63f4
service/apt: Implement Deliver Args (#5611)
* service/apt: Add GetModule and GetAppletManager

These will be used to retrieve and set deliver args across system resets (which are currently implemented as complete restarts)

* applet_manager: Implement DeliverArg

`flags` was added to `ApplicationJumpParameters` as flags 0x2 is handled differently from 0x0.

* service/apt: Add ReceiveDeliverArg, implement GetStartupArgument

Some based on guesses.

* Address review comments
2020-11-24 20:10:31 +01:00
xperia64
7dc472a3a7
Fix "core.cpp" clang-format (#5375) 2020-05-29 01:53:14 +02:00
Ben
57aa18f52e
Improve core timing accuracy (#5257)
* Improve core timing accuracy

* remove wrong global_ticks, use biggest ticks over all cores for GetGlobalTicks

* merge max slice length change
2020-05-12 22:48:30 +02:00
Ben
39463f1f6d
ArmInterface: return ref instead of copy for GetTimer (#5227)
* ArmInterface: return ref instead of copy for GetTimer

* ArmInterface: add const ref GetTimer

* ArmInterface: return raw pointer instead of shared_ptr in GetTimer

* remove more unnecessary shared_ptr usage

* Fix save states

* fix unit tests
2020-04-22 07:44:58 +02:00
Mat M
b82d4315fe
custom_tex_cache: Remove reliance on the global system instance (#5252)
Removes direct usages of Core::System::GetInstance() and instead passes
the direct necessities through the interface.
2020-04-20 21:50:16 -05:00
Hamish Milne
7af4b1a18e Merge branch 'master' into feature/savestates-2 2020-04-17 00:01:43 +01:00
Hamish Milne
9afd58cec2
Merge pull request #5185 from MerryMage/fix-gdbstub
gdbstub: Fix some gdbstub jankiness
2020-04-16 23:52:00 +01:00
Hamish Milne
d53e94db88 Show save/load errors to the user 2020-04-12 23:12:15 +01:00
Hamish Milne
915c426dc9 Merge remote-tracking branch 'upstream/master' into feature/savestates-2 2020-04-12 22:26:24 +01:00
Hamish Milne
828f88d20a Merge branch 'master' into feature/savestates-2 2020-04-12 11:24:06 +01:00
Hamish Milne
77c4b26e6c Attempt to improve save/load during frame advance 2020-04-11 22:25:57 +01:00
Hamish Milne
4be752dd98 Allow GDB debugging through loads 2020-04-11 19:47:31 +01:00
Hamish Milne
a210e7e2bd Sync GPU state after loading (fix FE terrain bug) 2020-04-11 10:28:52 +01:00
MerryMage
8b7b6e9f74 arm_dynarmic: Remove dependence on interpreter 2020-04-07 19:07:59 +01:00
Hamish Milne
e74b44042b Added save + load hotkeys 2020-04-06 23:05:55 +01:00
MerryMage
d17ab5cd91 gdbstub: Fix some gdbstub jankiness
1. Ensure that register information available to gdbstub is most up-to-date.
2. There's no reason to check for current_thread == thread when emitting a trap.
   Doing this results in random hangs whenever a step happens upon a thread switch.
2020-04-06 21:24:54 +01:00
Hamish Milne
7ff985cef9 Fixed TAS movie serialization 2020-04-06 21:23:39 +01:00
Hamish Milne
b5f394dd12 Use placeholders for serialized paths 2020-04-05 00:20:59 +01:00
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