Commit graph

4268 commits

Author SHA1 Message Date
PabloMK7
e14b9f7a25 Fix clang-format and unused include 2022-10-27 01:09:18 +02:00
PabloMK7
fd7ada2a9c Fix chainloading for all apps 2022-10-23 22:55:50 +02:00
tywald
a2daef2985
service/nwm_uds: log instead of assert to prevent crashes during multiplayer in Monster Hunter games (#6161) 2022-10-23 23:10:41 +05:30
SachinVin
e74b2575d7 clang format 2022-10-23 13:19:33 +05:30
SachinVin
fbe06234b1 Core: Port Exclusive memory impl from yuzu
core\arm\dynarmic\arm_dynarmic.cpp: fix build

core\arm\dynarmic\arm_dynarmic.cpp: Fixes

CPP 20
2022-10-23 13:19:33 +05:30
Vitor K
9626bdf385
Gate use of custom directories behind a variable (#6157)
previous changes had forced every single user to use custom
directories for NAND and SDMC. Those paths were saved to the
config file and would interact badly with portable builds.
2022-10-22 19:09:47 +05:30
PabloMK7
d396944487 Fix self updating ncch app jump 2022-10-21 01:12:29 +02:00
PabloMK7
c49379442d Fix auto updating ncch files 2022-10-20 23:14:57 +02:00
Sam Kenny
bc6e45ab3b
fix secure1 secondary key calc (#6149) 2022-10-06 09:22:01 +05:30
liushuyu
c6153bb32e
CI: fix recent build issues (#6148)
Co-authored-by: Vitor K <vitor-kiguchi@hotmail.com>
2022-10-05 18:43:07 +02:00
Vitor K
6a9d36608f
Allow GetPhysicalRef to hold a past-the-end offset (#6141)
Games will sometimes use these when representing open right bounds
and so disallowing it caused regressions, with a notable example
being when MemoryFill is called to the end of vram, causing an
"invalid end address" error.
This had been noted on a comment in GetPhysicalRef prior to the
regression.
2022-10-01 16:07:27 +05:30
GPUCode
cbd5d1c15c
Upgrade codebase to C++ 20 + fix warnings + update submodules (#6115) 2022-09-21 18:36:12 +02:00
GPUCode
48d5ec5c00 core: Update GL result enum
Co-authored-by: SachinVin <26602104+SachinVin@users.noreply.github.com>
2022-08-29 21:20:22 +03:00
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
pawelniegowski
ce441237cf
Update src/core/frontend/emu_window.h
clang-format

Co-authored-by: BreadFish64 <mohror64@gmail.com>
2022-08-01 09:07:23 +02:00
pawelniegowski
ff81fb04b4 Fix MakeCurrent and shader issues with AMD 22.7 driver 2022-07-29 12:26:18 +02:00
Diego Arias
357025dfdf
loader: check for overflow of seg_sizes[] in 3dsx loader (#6075) 2022-07-23 21:57:55 +05:30
merry
2d95b9946f
framebuffer_layout: Fix positioning of small screen when centered in landscape on mobile (#6071) 2022-07-17 17:49:55 +05:30
Vitor Kiguchi
28188f13f5 remove dedicated_room dependence on core 2022-06-11 10:21:18 +02:00
Vitor Kiguchi
fa0cb52a5d Move webservice settings to own file 2022-06-11 10:21:17 +02:00
Morph
3a43475149 core: Resolve C4267 warning on MSVC 2022-05-18 00:05:41 -04:00
SachinVin
b6ff58a9d6 FileUtil, Frontends: Fix updating custom NAND/SDMC path 2022-04-30 15:53:45 +05:30
feos
1382035d4d
explicitly set timebase for video stream (#6005)
fixes #5965
2022-04-23 21:53:53 +05:30
PabloMK7
593b0b2d8f
Add svcGetSystemInfo 0x20000 to get citra information (#5955) 2022-04-14 19:58:44 +05:30
benstephens56
c8a7185444
Convert Input Count to Frame Count (#5954)
* Convert Input Count to Frame Count

While recording or playing a movie file, the left side of the status bar currently displays an input counter which shows how many times the emulator has polled for button inputs during the movie. This information is far less easily understandable and less useful for TASing compared to a frame count. The frame count has a linear relationship with input count that can be expressed with Frame Count = 0.255689103308912 * Input Count. Simply put, instead of having a counter that goes up by 3 or 4 every frame, this makes it a counter that goes up by exactly 1 every frame.

* Update movie.cpp

* Update movie.cpp

* Fixing clang-format errors

* Update movie.cpp

Did not realize that the frame rate was defined as a constant somewhere in the source code. This makes this conversion far less sketchy.

* Update movie.cpp
2022-03-05 12:38:35 +05:30
liushuyu
04f201ab34
dumping/ffmpeg_backend: add support for ffmpeg 5.0 2022-02-20 04:07:10 -07:00
Mai M
54a36bc54f
fs_user: Resolve sign conversion warning in GetPriority() (#5396)
Prevents a -Wsign-compare warning from occurring.
2022-02-19 09:49:16 +05:30
bunnei
62753e882e
Merge pull request #5448 from zhaowenlan1779/rerecording
Implement basic rerecording features
2022-02-18 20:29:36 -07:00
bunnei
bae1c31406
Merge pull request #5718 from liushuyu/httpc
externals: update httplib and libressl
2022-02-05 02:59:18 -07:00
SachinVin
2fc7def6f6
Merge pull request #5395 from lioncash/gsp
gsp_gpu: Resolve sign conversion warnings
2022-01-30 21:55:24 +05:30
liushuyu
af24f75c18
externals: update httplib and libressl ...
* In older `httplib`, SSL connections were not handled correctly and
  will have issues with proxy servers. Also, keep alive directives were
  not available back then, which is probably necessary to implement
  HTTP_C service correctly.
* Another reason being `httplib` now requires OpenSSL 1.1+ API while
  LibreSSL 2.x provided OpenSSL 1.0 compatible API.
* The bundled LibreSSL has been updated to 3.2.2 so it now provides
  OpenSSL 1.1 compatible API now.
* Also the path hint has been added so that it will find the correct
  path to the CA certs on *nix systems.
* An option is provided so that *nix system distributions/providers can
  use their own SSL implementations when compiling Yuzu/Citra to
  (hopefully) complies with their maintenance guidelines.
* LURLParse is also removed since `httplib` can handle
  `scheme:host:port` string itself now.
2022-01-13 19:32:50 -07:00
bunnei
67f1e4111d
Merge pull request #5792 from vitor-k/username
service/frd: return cfg username on GetMyScreenName
2022-01-08 02:01:31 -08:00
bunnei
c01dca4920
Merge pull request #5901 from vitor-k/subregion
cfg: use a default subregion based on the country
2022-01-08 02:00:15 -08:00
SachinVin
666787bf4d core/frontend/emu_window: return true when TouchPressed is consumed 2021-12-18 16:52:24 +05:30
SutandoTsukai181
60235827c5 Add Cardboard VR
Based on hrydgard/ppsspp/pull/12449
2021-12-18 16:52:24 +05:30
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
bunnei
b7a156f7c8 android: frontend: Track screen layout separately for orientation.
android framebuffer
2021-12-18 16:52:17 +05:30
bunnei
e8f57d7e3c android: frontend: Add MobileLandscape layout profile for mobile devices. 2021-12-18 00:06:16 +05:30
BreadFish64
5a8c6990bf memory: fix memory leak related to un-freed shared memory 2021-12-18 00:06:15 +05:30
SachinVin
a515df01db
savestate.cpp: log the savestate revision on revision mismatch (#5894) 2021-12-12 20:22:50 +05:30
Vitor Kiguchi
f0fd776fa2 cfg: use a default subregion based on the country 2021-12-10 16:55:20 +01:00
SachinVin
6183b5d76c
Merge pull request #5823 from SachinVin/dyn
Android: Backport easy stuff
2021-10-03 18:58:20 +05:30
bunnei
a2109933f6 (zhaowenlan1779) android/applets: Implement Mii Selector
See merge request CitraInternal/citra-android!33
# Conflicts:
#	src/android/app/src/main/jni/CMakeLists.txt
#	src/android/app/src/main/jni/id_cache.cpp
#	src/android/app/src/main/jni/native.cpp
#	src/android/app/src/main/res/values/strings.xml

gl_shader_gen.cpp: Fix separable shaders when GL_EXT_clip_cull_distance is not supported
2021-10-02 16:38:32 +05:30
bunnei
3e6fce7553 core/CmakeLists.txt: correct mic.h order 2021-09-29 22:50:55 +05:30
SachinVin
a1b4daa9d4
core.h: remove nodiscard for SendSignal (#5837)
We use this in four places and discard the result everywhere
2021-09-06 21:27:11 +05:30
fadillzzz
89410c164a
fix(bps): Fixes BPS patch changing target size (#5829) 2021-08-22 15:24:35 -05:00
James Rowe
9f4501aceb Perf: Remove more breakpoint checking in the interpreter. Move filtering earlier in the logging chain 2021-07-24 23:36:56 +05:30
Pengfei
f85bde3ca3
Replace &vec[0] with vec.data()
When the vector is empty, using `&vec[0]` involves undefined behaviour. While that works fine most of the time, Flatpak builds aborted on a failed `__builtin_expect`.

I searched for such occurences across the codebase with the regex `(?<!&)&\w+\[0\]` and fixed those that would potentially cause issues.
2021-07-14 17:01:14 +08:00
Vitor Kiguchi
3e71d68b94 service/frd: don't use global system
address review comments + clang format
2021-07-07 16:45:13 -03:00
Pengfei Zhu
5241032fc5
Merge pull request #5382 from zhaowenlan1779/uds-2
service/nwm_uds: Various improvements/corrections
2021-06-22 20:40:18 +08:00
Vitor Kiguchi
6d99b5d332 service/frd: return cfg username on GetMyScreenName
as some games apparently use this for the multiplayer display name
2021-06-05 21:53:16 -03:00
Ben
7325f58763
NWM_UDS: implement disconnect_reason and EjectClient (#5331)
* NWM_UDS: Stub disconnect_reason and EjectClient

* addressed review comments

* fix additional semicolon

Co-authored-by: Valentin Vanelslande <vvanelslandedev@gmail.com>

Co-authored-by: Valentin Vanelslande <vvanelslandedev@gmail.com>
2021-05-16 10:41:54 +02:00
Max Fedotov
a2f34ea82b
gcc 11 compatibility fix (suggestion) (#5778)
Fixes missing include and runtime variable in offsetof

* gcc 11 compatibility fix

* Revert "gcc 11 compatibility fix"

This reverts commit bf5711d944.

* gcc 11 compatibility fix (with pointer math)

* Don't require pointers for framebuffer field math

* Code style fix (clang-format)
2021-05-10 22:10:29 -05:00
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
bunnei
24086d05bb
Merge pull request #5471 from vitor-k/misc
Fix some warnings and some small changes
2021-04-23 22:54:00 -07:00
Daniel Méndez
3be52f818a file_util: Add a function to update the user path
Added a default value when sdmc and nand are empty
2021-04-17 23:48:30 +02:00
Daniel Méndez
49c0766b73 settings: Save and load NAND/SD dirs from config 2021-04-08 00:20:52 +02: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
zhupengfei
b2531310b4
Minor improvements to the UX
1. Game will now be paused on movie finish
2. Added 'Save without Closing'
2021-02-08 11:25:38 +08:00
zhupengfei
f8eb9a541d
citra_qt: Fix potential indeterminstism caused by starting record/playback
Previously the movie was started *after* core starts running, causing potential indeterminism.

Some desyncs are still not fixed; they may be caused by core timing. More investigation is required.
2021-02-08 11:25:38 +08:00
zhupengfei
e60e20666e
citra_qt: Allow enabling frame advance before emulation start
Effectively allows starting emulation as paused.
2021-02-08 11:25:37 +08:00
zhupengfei
1780f8b5b8
core/movie: Add MovieFinished mode
Also mentioned in Laws of TAS.
2021-02-08 11:25:35 +08:00
zhupengfei
e188f86582
core/movie: Add future event and timeline check
As specified in TASVideos [Laws of TAS](http://tasvideos.org/LawsOfTAS/OnSavestates.html)
2021-02-08 11:25:34 +08:00
zhupengfei
fb14bd956a
citra_qt: Add indicator in status bar
Since we do not have an overlay yet, it can be confusing whether movie is being recorded or played. This makes it clear.

Status messages (e.g. system archive missing) will be overriden, but that shouldn't be too important when recording movies.

Doubled the status bar updating frequency to provide a better experience. It now updates every second.
2021-02-08 11:25:32 +08:00
zhupengfei
113e0c7331
citra_qt: Rebuilt movie frontend
This is completely rebuilt, in order to allow setting author, displaying movie metadata, and toggling read-only mode.

The UX is changed to more closely match other emulators' behaviour. Now you can only record/play from start/reset (In the future, we might want to introduce 'record from savestate')

Also fixed a critical bug where movie file can be corrupted when ending the recording while game is still running.
2021-02-08 11:25:31 +08:00
zhupengfei
5a42a80f40
core/movie: Allow setting a playback completion callback
Instead of specifying it when starting playback. This is necessary as
you can end up playing the movie even if you started as Recording
(for example, loading a state in R/O mode will switch to Playing mode)
2021-02-08 11:25:30 +08:00
zhupengfei
06bc37a67d
core/movie: Remove program ID checks
Most other emulators handle this automatically in the frontend,
booting/restarting the corresponding game instead of reporting an error.
Therefore, remove these checks and errors from the module.
2021-02-08 11:25:29 +08:00
zhupengfei
bd88667247
core/movie: Add a few fields
These fields are included in most emulators and required by TASVideos.

`input_count` is implemented by counting the number of 'PadAndCircle' states, as this is always polled regularly and can act as a time/length indicator.
TASVideos also require the input count/frame count to be verified by the emulator before playback, which is also implemented in this commit.
2021-02-08 11:25:28 +08:00
zhupengfei
ebaa225bcb
core: Add read-only mode and separate savestate slots for movies
The read-only mode switch affects how movies interact with savestates after you start a movie playback and load a savestate. When you are in read-only mode, the movie will resume playing from the loaded savestate. When you are in read+write mode however, your input will be recorded over the original movie ('rerecording'). If you wish to start rerecording immediately, you should switch to R+W mode, save a state and then load it.

To make this more user-friendly, I also added a unique ID to the movies, which allows each movie to have an individual set of savestate slots (plus another set for when not doing any movies). This is as recommended by staff at TASVideos.
2021-02-08 11:25:27 +08:00
Marshall Mohror
a1d6396a90
Merge pull request #5695 from FearlessTobi/port-4942
Port yuzu-emu/yuzu#4942: "core: Make use of [[nodiscard]] with the System class"
2021-02-04 10:50:00 -06: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
xperia64
8df502a688
Implement APT command 0x0103 (#5478)
* WIP implement apt 0x0103

* Update src/core/hle/service/apt/apt.cpp

Co-authored-by: Pengfei Zhu <zhupf321@gmail.com>

* Names

Co-authored-by: Pengfei Zhu <zhupf321@gmail.com>
2021-01-26 15:27:52 -05:00
FearlessTobi
8d2e28cf76 core: Make use of [[nodiscard]] with the System class
Given this is a central class, we should flag cases where the return
value of some functions not being used is likely a bug.

Co-Authored-By: LC <712067+lioncash@users.noreply.github.com>
2021-01-17 19:05:43 +01:00
Pengfei Zhu
7c6d7905a4
Merge pull request #5670 from FearlessTobi/port-5277
Port yuzu-emu/yuzu#5277: "general: Fix various spelling errors"
2021-01-09 22:10:27 +08:00
xperia64
e33677b021
Add 3D slider value to the HID shared page (#5676)
* Add 3D slider value to the HID shared page; Fixes MSet

* Use f32
2021-01-05 22:01:01 +01: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
Lioncash
52fe6daa53 common/telemetry: Migrate core-independent info gathering to common
Previously core itself was the library containing the code to gather
common information (build info, CPU info, and OS info), however all of
this isn't core-dependent and can be moved to the common code and use
the common interfaces. We can then just call those functions from the
core instead.

This will allow replacing our CPU detection with Xbyak's which has
better detection facilities than ours. It also keeps more
architecture-dependent code in common instead of core.
2021-01-04 04:25:03 +01:00
FearlessTobi
1653ebaa45 general: Fix various spelling errors
Co-Authored-By: Morph <39850852+Morph1984@users.noreply.github.com>
2021-01-03 02:39:41 +01:00
xperia64
5f1eb7146d
Merge generic part of Android microphone changes (#5624) 2020-12-30 19:21:03 -05: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
Vitor Kiguchi
981a4611a4 Mark variables only used on trace logs as maybe_unused
Fixes some -Wunused-variable warnings
2020-12-06 16:03:24 -03:00
Vitor Kiguchi
e331fac004 Resolve unused variable warnings
(C4101 unreferenced local variable)
2020-12-06 15:59:13 -03:00
Vitor Kiguchi
1df939469a Resolve some type conversion warnings 2020-12-06 15:59:13 -03:00
mnml
6f45b402e7
UDS: implement GetApplicationData (#5533) 2020-12-05 22:27:57 +01:00
zhupengfei
8f0aebcd4f
service/apt: Fix deliver arg hmac size 2020-11-28 08:52:35 +08: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
Ben
182ffa4243
APT: implement Set and GetWirelessRebootInfo (#5328)
* APT: implement Set and GetWirelessRebootInfo

* make wireless_reboot_info a member of APT::Module

* Removed stubbed from log message
2020-11-23 15:52:35 +01:00
Marshall Mohror
02d6032afb
Merge pull request #5566 from zhaowenlan1779/layered-fs-fix
layered_fs: Make LoadFile and LoadDirectory less recursive
2020-11-17 09:31:25 -06:00
Marshall Mohror
a89261d397
Merge pull request #5580 from oneup03/master
Implement Reverse Interlaced 3D
2020-11-16 16:53:05 -06:00
Pengfei Zhu
de3d7cf49f
kernel/thread: Change owner_process to std::weak_ptr (#5325)
* kernel/thread: Change owner_process to std::weak_ptr

Previously this leaked almost all kernel objects. In short, Threads own Processes which own HandleTables which own maps of Objects which include Threads.

Changing this to weak_ptr at least got the camera interfaces to destruct properly. Did not really check the other objects though, and I think there are probably more leaks.

* hle/kernel: Lock certain objects while deserializing

When deserializing other kernel objects, these objects (`MemoryRegion`s and `VMManager`s) can possibly get modified. To avoid inconsistent state caused by destructor side-effects, we may as well simply lock them until loading is fully completed.

* Fix silly typo

Somehow this didn't break?!
2020-11-15 12:59:45 +01:00
OneUp03
a4f57e6910 Implement Reverse Interlaced 3D 2020-10-16 11:41:08 -05:00
FearlessTobi
51d348b087 General: Make use of std::nullopt where applicable
Allows some implementations to avoid completely zeroing out the internal
buffer of the optional, and instead only set the validity byte within
the structure.

This also makes it consistent how we return empty optionals.

Co-Authored-By: LC <712067+lioncash@users.noreply.github.com>
2020-10-03 17:25:54 +02:00
Pengfei Zhu
aced133a3d
Merge pull request #5565 from scarabeusiv/patch-1
Fix compilation with boost 1.74.0
2020-09-30 22:03:01 -05:00
Weiyi Wang
1032b60d9b
Bump kernel version for 3DSX (#5446) 2020-10-01 09:54:42 +08:00
Vitor K
ff9c3b0531
Make sure some things are logged (#5515)
* sdl_impl.cpp: actually log the sdl error

* Log cpu slider and vsync
2020-10-01 09:23:37 +08:00
zhupengfei
faf9162dbd
layered_fs: Make LoadFile and LoadDirectory less recursive
The deep recursion has caused issues in certain games with large numbers of files, especially with MSVC builds.

Previously the recursion depth is about equal to the number of files present. With this the depth should be about equal to the maximum depth of the directory structure of the RomFS.
2020-10-01 00:32:40 +08:00
Tomáš Chvátal
860ccf2a41
Fix compilation with boost 1.74.0
The serialization module was heavily changed and it now this header needs to be included as it is relied in many other parts of citra.
2020-09-30 11:29:06 +02:00
xperia64
1128f5f8ee Silence some noisy switch case warning 2020-09-06 16:22:48 -04:00
Pengfei Zhu
6a77547bde
Minor frontend fixes to savestates (#5430) 2020-09-03 00:04:23 +02:00