Commit graph

120 commits

Author SHA1 Message Date
GPUCode
59df319f48
kernel: Improve accuracy of KResourceLimit emulation (#7221)
* core: Refactor resource limits

* svc: Implement SetResourceLimitLimitValues

* Also correct existing name and add missing error codes
2023-12-04 13:31:06 +02:00
Steveice10
c0ecdb689d
cfg: Update preferred region data on-demand. (#7206) 2023-11-24 23:10:58 -08:00
PabloMK7
597a2e8ead
Add missing FS:USER functions (#7051) 2023-10-31 14:01:25 -07:00
GPUCode
f8b8b6e53c
core: De-globalize movie (#6659) 2023-08-01 02:57:38 +02:00
Steveice10
bb364d9bc0
service/apt: Add and implement more service commands. (#6721)
* service/apt: Add and implement more service commands.

* service/apt: Implement power button.

* Address review comments and fix GetApplicationRunningMode bug.
2023-07-29 00:26:16 -07:00
GPUCode
cf9bb90ae3
code: Use std::span where appropriate (#6658)
* code: Use std::span when possible

* code: Prefix memcpy and memcmp with std::
2023-07-07 01:52:40 +03:00
GPUCode
7edc86a9bc
code: Remove outdated comment style (#6640) 2023-06-25 15:22:41 +05:30
Vitor K
34de77d429
Various miscelaneous changes (#6496) 2023-05-03 17:24:10 +02:00
SachinVin
41f13456c0
Chore: Enable warnings as errors on MSVC (#6456)
* tests: add Sanity test for SplitFilename83

fix test

fix test

* disable `C4715:not all control paths return a value` for nihstro includes

nihstro: no warn

* Chore: Enable warnings as errors on msvc + fix warnings

fixes

some more warnings

clang-format

* more fixes

* Externals: Add target_compile_options `/W0` nihstro-headers and ...

Revert "disable `C4715:not all control paths return a value` for nihstro includes"
This reverts commit 606d79b55d.

* src\citra\config.cpp: ReadSetting: simplify type casting

* settings.cpp: Get*Name: remove superflous logs
2023-05-01 22:38:58 +03:00
SachinVin
000a616bd9
core\loader\ncch.cpp: skip parsing Region info, if user has already... (#6463) 2023-04-26 00:13:21 +02:00
Steveice10
5346ca27b5
Rework system title handling with up-to-date title list and region detection support. (#6356) 2023-03-29 13:55:29 +02:00
Steveice10
84e54a52a6
core: Detect and return error if GBA virtual console is loaded. (#6257) 2023-01-23 15:21:57 +05:30
Tobias
1ddea27ac8
code: Cleanup and warning fixes from the Vulkan PR (#6163)
Co-authored-by: emufan4568 <geoster3d@gmail.com>
Co-authored-by: Kyle Kienapfel <Docteh@users.noreply.github.com>
2022-11-04 23:32:57 +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
Ben
1722701c07
[WIP] NCCHContainer: support for partitions if container is NCSD (#5345)
* GetProgramLaunchInfo: improve to for 3ds files

* NCSD: allow to load other partitions

* fix typo

* Update src/core/hle/service/fs/fs_user.cpp

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

* Update src/core/hle/service/fs/fs_user.cpp

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

Co-authored-by: Marshall Mohror <mohror64@gmail.com>
Co-authored-by: Valentin Vanelslande <vvanelslandedev@gmail.com>
2020-07-14 09:14:30 -05:00
LC
8ce81b19be
General: Remove usages of ARRAY_SIZE where applicable. (#5392)
Same behavior, but without our own boilerplate function.
2020-06-19 09:10:45 -05: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
b81c9bd738
fix clang format 2020-02-10 07:41:31 +08:00
zhupengfei
13e2d534e9
core: Add dump RomFS support
This is added to LayeredFS, then the NCCH container and then the loader interface.
2020-02-09 20:59:31 +08:00
Léo Lam
3140086c60 file_sys: Handle patch applying failures
This changes ApplyCodePatch to return a ResultStatus, which makes it
possible to determine whether patch applying has failed. Previously,
only a boolean was returned, and false was returned when no patch
was found OR when a patch was found but applying it failed.

This also changes AppLoader_NCCH to return an error if patching fails
because the executable is likely to be left in an inconsistent state
and we should not proceed booting in that case.
2019-12-22 10:46:47 +01:00
Léo Lam
1377be9902 file_sys: Move IPS patching code into separate source file
In anticipation of a new BPS patcher.
2019-12-22 10:46:47 +01:00
Steveice10
5cf684c951 Filter non-executable files out of the game list. 2019-09-08 14:19:11 -07:00
Léo Lam
43d1ee6fb7 ncch_container: Apply IPS patch after allocating .bss
This allows an IPS patch to edit .bss. This is useful for game patches
that need to add code, as putting things in .bss allows adding new code
*without* editing .code and thus without having to relocate everything.
2019-07-10 12:57:30 +02:00
Tobias
623b0621ab
Port various minor changes from yuzu PRs (#4725)
* common/thread: Remove unused functions

Many of these functions are carried over from Dolphin (where they aren't
used anymore). Given these have no use (and we really shouldn't be
screwing around with OS-specific thread scheduler handling from the
emulator, these can be removed.

The function for setting the thread name is left, however, since it can
have debugging utility usages.

* input_common/sdl: Use a type alias to shorten declaration of GetPollers

Just makes the definitions a little bit more tidy.

* input_common/sdl: Correct return values within implementations of GetPollers()

In both cases, we weren't actually returning anything, which is
undefined behavior.

* yuzu/debugger/graphics_surface: Fill in missing surface format listings

Fills in the missing surface types that were marked as unknown. The
order corresponds with the TextureFormat enum within
video_core/texture.h.

We also don't need to all of these strings as translatable (only the
first string, as it's an English word).

* yuzu/debugger/graphics_surface: Clean up connection overload deduction

We can utilize qOverload with the signal connections to make the
function deducing a little less ugly.

* yuzu/debugger/graphics_surface: Tidy up SaveSurface

- Use QStringLiteral where applicable.

- Use const where applicable

- Remove unnecessary precondition check (we already assert the pixbuf
  being non null)

* yuzu/debugger/graphics_surface: Display error messages for file I/O errors

* core: Add missing override specifiers where applicable

Applies the override specifier where applicable. In the case of
destructors that are  defaulted in their definition, they can
simply be removed.

This also removes the unnecessary inclusions being done in audin_u and
audrec_u, given their close proximity.

* kernel/thread: Make parameter of GetWaitObjectIndex() const qualified

The pointed to member is never actually modified, so it can be made
const.

* kernel/thread: Avoid sign conversion within GetCommandBufferAddress()

Previously this was performing a u64 + int sign conversion. When dealing
with addresses, we should generally be keeping the arithmetic in the
same signedness type.

This also gets rid of the static lifetime of the constant, as there's no
need to make a trivial type like this potentially live for the entire
duration of the program.

* kernel/codeset: Make CodeSet's memory data member a regular std::vector

The use of a shared_ptr is an implementation detail of the VMManager
itself when mapping memory. Because of that, we shouldn't require all
users of the CodeSet to have to allocate the shared_ptr ahead of time.
It's intended that CodeSet simply pass in the required direct data, and
that the memory manager takes care of it from that point on.

This means we just do the shared pointer allocation in a single place,
when loading modules, as opposed to in each loader.

* kernel/wait_object: Make ShouldWait() take thread members by pointer-to-const

Given this is intended as a querying function, it doesn't make sense to
allow the implementer to modify the state of the given thread.
2019-05-01 14:28:49 +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
Weiyi Wang
05058863b5 cleanup includes 2019-03-26 10:50:41 -04:00
Weiyi Wang
5f11c5f733 Kernel: replace boost::intrusive_ptr with std::shared_ptr 2019-03-24 14:32:11 -04:00
fearlessTobi
d755a15891 fix compilation problems 2019-03-23 12:43:03 +01:00
Weiyi Wang
2a411bb501 Kernel: wrap resource limit state into kernel state; pass ref to resource limit 2018-10-18 21:41:36 -04:00
Weiyi Wang
9565091fc2 kernel: pass ref in Process 2018-10-18 21:41:36 -04:00
Weiyi Wang
213b259cf1 kernel: pass ref in CodeSet 2018-10-18 21:41:36 -04:00
Weiyi Wang
1de63f9b16
Merge pull request #4328 from B3n30/remove_current_module
remove GetCurrentModule() functions in HLE Services
2018-10-18 21:39:24 -04:00
B3n30
eb3af0f16a Add GetModule() helper functions, for HID, CAM, and CFG 2018-10-12 11:50:50 +02:00
B3n30
9d53136f20 remove GetCurrentModule() functions in HLE Services 2018-10-11 19:23:14 +02: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
389d3d630e fs/archive: wrap states into archive manager 2018-10-06 01:23:03 -04:00
B3n30
d37a2270d6 Replace boost::optional with std::optional where possible 2018-10-05 13:51:09 +02:00
zhupengfei
bbf391abb9
citra_qt, core: game list "Open XXX Location" improvements 2018-10-01 08:42:22 +08:00
Weiyi Wang
697bc1a9c7 loader, cfg: choose region based on language if multiple regions available 2018-09-18 10:26:31 -04:00
Lioncash
3284bef360 string_util: Remove StringFromFormat() and related functions
Given we utilize fmt, we don't need to provide our own functions for formatting anymore
2018-09-06 00:00:21 +02:00
fearlessTobi
2abe11ee1e Fix compile errors 2018-08-23 18:23:21 +02:00
wwylele
d4a808c885 ncch_container: support encrypted games 2018-08-07 18:53:06 +03:00
wwylele
7c5a76e58b log: replace all NGLOG with LOG 2018-06-29 14:18:07 +03:00
Daniel Lim Wee Soong
fbfc1103fd core/loader: Migrate logging macros
Replace logging to use NGLOG instead of LOG.
2018-03-29 00:08:26 +08:00
wwylele
b179b86f14
Service/CFG: convert to ServiceFramework 2018-03-10 13:37:03 +02:00
Lioncash
eb58dbda32 ncch: Add missing return statement in ReadUpdateRomFs 2017-12-11 01:33:08 -05:00
shinyquagsire23
a4af750759 loader/ncch: Use AM to get update title path 2017-10-18 21:19:40 -06:00
shinyquagsire23
4887d18591 file_sys, loader: add support for reading TMDs to determine app paths 2017-10-01 10:54:02 -06:00
Subv
7f48aa8d25 Loaders: Don't automatically set the current process every time we load an application.
The loaders will now just create a Kernel::Process, construct it and return it to the caller, which is responsible for setting it as the current process and configuring the global page table.
2017-09-26 18:17:47 -05:00
Subv
774e7deae8 HLE/Archives: Allow multiple loaded applications to access their SelfNCCH archive independently.
The loaders now register each loaded ROM with the SelfNCCH factory, which keeps the data around for the duration of the emulation session.

When opening the SelfNCCH archive, the factory queries the current program's programid and uses that as a key to the map that contains the NCCHData structure (RomFS, Icon, Banner, etc).

3dsx files do not have a programid and will use a default of 0 for this value, thus, only 1 3dsx file with RomFS is loadable at the same time.
2017-09-25 09:45:02 -05:00