Commit graph

1207 commits

Author SHA1 Message Date
Thog
51951ded13 surfaceflinger: FreeBufferLocked doesn't reset the graphic buffer
That's the job of the user on Horizon (via SetPreallocatedBuffer).
2024-02-22 19:15:00 -05:00
mageven
e96242e342 Refactor out Application details from Horizon (#1236)
* Initial Application refactor

* Misc typo and access modifier fixes

* Clean unused namespaces

* Address gdkchan's comments

* Move ticket reading to common method

* Change IParentalControlService to use ApplicationLoader.ControlData
2024-02-22 19:15:00 -05:00
Thog
e0356412c8 am: Implement common web applets (#1188)
* am: Implemnet common web applets

This implement parsing of input and output of web applets while making
those close directly.

TODO for the future: Use and hook a web browser.

* Address Ac_K's comments
2024-02-22 19:15:00 -05:00
Thog
d1bc68b1dd Surface Flinger: Implement GetBufferHistory (#1232)
* Surface Flinger: Implement GetBufferHistory

Also fix some bugs on the Surface Flinger implementation

* Address Ac_K's comment
2024-02-22 19:15:00 -05:00
Ac_K
299433badc pctl: refactoring IParentalControlServiceFactory and IParentalControl… (#1219)
* pctl: refactoring IParentalControlServiceFactory and IParentalControlService call

Our previous implementation was totally guessed. Now it's implemented according to RE, even if it's stubbed because we will not support Parental Control for now.

* unknownFlag > permissionFlag
2024-02-22 19:15:00 -05:00
Ficture Seven
4d38a9e820 Fix RET Xn translation (#1242) 2024-02-22 19:15:00 -05:00
gdkchan
e7303344f2 Remove CpuId IR instruction (#1227) 2024-02-22 19:15:00 -05:00
Ac_K
e5e2e2cad5 nvdrv: Partially implementation of GetStatus (#1215)
* nvdrv: Partially implementation of GetStatus

This implement GetStatus call according to RE.
Since we don't handle tranfert memory on the initialize of the service, it's fine sets fields at 0 for now.
Tested on Undertale.

Fix #635

* Fix struct
2024-02-22 19:15:00 -05:00
VolcaEM
5afdd21ebf Add missing error code to Time (#1237)
The error code was taken from Switchbrew (https://switchbrew.org/wiki/Error_codes)

Even if TimeServiceNotInitialized's "description" is 0, the result "value" of "(0 << ErrorCodeShift) | ModuleId" is 0x74 so it is not the same as "Success" (0)
2024-02-22 19:15:00 -05:00
Ac_K
09232557aa am: Implement GetFriendInvitationStorageChannelEvent (#1220)
* am: Implement GetFriendInvitationStorageChannelEvent

This implement GetFriendInvitationStorageChannelEvent according to RE, needed by Streets of Rage 4

* Fix handle name

* add GetNotificationStorageChannelEvent
2024-02-22 19:15:00 -05:00
Ficture Seven
95df9d4ff6 Fix tailcall case in EmitterContext (#1235) 2024-02-22 19:15:00 -05:00
mageven
5970cfefb2 Suppress CS0169 CS0649 warns from HID structs (#1222)
Also fix typo in a pragma restore in Logger
2024-02-22 19:15:00 -05:00
VolcaEM
96c39de164 Add various error codes to Settings (#1229)
The error codes were taken from Switchbrew (https://switchbrew.org/wiki/Error_codes)
2024-02-22 19:15:00 -05:00
VolcaEM
40d6408257 Add two error codes to SDB PDM (#1230)
* Add two error codes to SDB PDM

The error codes were taken from Switchbrew (https://switchbrew.org/wiki/Error_codes)

* Remove empty line
2024-02-22 19:15:00 -05:00
VolcaEM
ac29c181ff Add two error codes to Mii (#1224)
* Add two error codes to Mii

The two errors added are InvalidDatabaseSignatureValue and InvalidDatabaseEntryCount, which were taken from Switchbrew (https://switchbrew.org/wiki/Error_codes)

* Fix typo

* Remove unnecessary empty line
2024-02-22 19:15:00 -05:00
VolcaEM
2591a71162 Add various error codes to NCM LR (#1225)
The error codes were taken from Switchbrew (https://switchbrew.org/wiki/Error_codes)
2024-02-22 19:15:00 -05:00
Ac_K
365e124da7 Fix SystemInfo logging to file (#1217)
We currently logs system informations before we load the configuration file.
Since the logger use the configuration file (to sets if it should store the logs in a file, etc...), if we print something before the configuration init, the log file doesn't contains any system informations.
Now it's fixed.
2024-02-22 19:15:00 -05:00
gdkchan
fe6e7ec417 Fix block iteration on kernel MemoryManager InsertBlock function (#1184) 2024-02-22 19:15:00 -05:00
gdkchan
f71035cd7c Refactor shader GPU state and memory access (#1203)
* Refactor shader GPU state and memory access

* Fix NVDEC project build

* Address PR feedback and add missing XML comments
2024-02-22 19:14:59 -05:00
plutoo
71a37b8898 set: Quick implementation of GetKeyCodeMap/GetKeyCodeMap2 (#1210)
* set: Quick implementation of GetKeyCodeMap/GetKeyCodeMap2

This fixed USB keyboard access in official titles.

* hid: Stub SendKeyboardLockKeyEvent

* Update Ryujinx.HLE/HOS/Services/Settings/ISettingsServer.cs

Co-authored-by: Ac_K <Acoustik666@gmail.com>

* Update Ryujinx.HLE/HOS/Services/Hid/IHidServer.cs

Co-authored-by: Ac_K <Acoustik666@gmail.com>

* set: KeyboardLayout bringup

* set: Small bugfix

* Fix GetKeyCodeMapImpl

* Revert SystemRegion > RegionCode in Configuration

* Fix SendKeyboardLockKeyEvent

Co-authored-by: Ac_K <Acoustik666@gmail.com>
2024-02-22 19:14:59 -05:00
SeraUX
2caa451d3d Logging the current firmware version (#1199)
* Logging the curent firmware version

* fixed an error in cases when firmware is not installed
2024-02-22 19:14:59 -05:00
HorrorTroll
daca61cbda Add Docked/Handheld text on status bar (#1205)
* Add Dock/Handheld on status bar

* Simplified the code & move next to V-Sync

* Nit.
2024-02-22 19:14:59 -05:00
VolcaEM
8eb86541e8 Add error code for denied internet request in Friends (#1207)
* Add error code for denied internet request in Friends

* Fix formatting from previous PR
2024-02-22 19:14:58 -05:00
VolcaEM
c4316eba7c Add various error codes to Loader (#1208)
* Add various result codes to Loader

The error codes were taken from Switchbrew (switchbrew.org/wiki/Error_codes)

For the last 9 errors, Switchbrew says: ACID/ACI0 don't match for descriptor (descriptor)

* Fix typo
2024-02-22 19:14:58 -05:00
gdkchan
b8858a0913 Move kernel state out of the Horizon class (#1107)
* Move kernel state from Horizon to KernelContext

* Merge syscalls partial classes, split 32 and 64-bit variants

* Sort usings
2024-02-22 19:14:58 -05:00
riperiperi
4601349a2f Implement Counter Queue and Partial Host Conditional Rendering (#1167)
* Implementation of query queue and host conditional rendering

* Resolve some comments.

* Use overloads instead of passing object.

* Wake the consumer threads when incrementing syncpoints.

Also, do a busy loop when awaiting the counter for a blocking flush, rather than potentially sleeping the thread.

* Ensure there's a command between begin and end query.
2024-02-22 19:14:58 -05:00
Mary
56acfb81d8 Refactor SystemInfo and implement macOS system info backend (#1177) 2024-02-22 19:14:58 -05:00
Ac_K
90b3d9a3c6 Upgrade projects to C#8 (#1193)
Some parts of our code needs C# 8 who isn't set as default in Visual Studio. To fix this we have to set the C# version correctly in the csproj files and then we are be able to build the project using Visual Studio.
2024-02-22 19:14:58 -05:00
Thog
de02f85a43 Remove travis configuration (#1181) 2024-02-22 19:14:58 -05:00
Ficture Seven
0be04525ea Improve IRDumper (#1135)
* Improve IRDumper

* Make Symbols.Add(ulong, ulong, ulong, string) thread safe

* Use a StringBuilder for MemoryOperand

* Add #if M_DEBUG guards

* Fix JMP_TABLE typo

* Fix using in Symbols

* Use Conditional("M_DEBUG") instead

Address gdkchan's feedback

* Use a struct instead of 4-tuple

Address gdkchan's feedback

* Place symbols in comments instead

Address gdkchan's feedback

* Use StringBuilder throughout

* Handle offsetted symbols

* Fix naming convention of Builder

* Avoid ArgumentException

* Remove unnecessary using

* Use switch expression instead

* Turn into a class

* Clean up

* Remove unnecessary using
2024-02-22 19:14:58 -05:00
mageven
8fc2931884 Implement user-defined clipping on GL state pipeline (#1118) 2024-02-22 19:14:58 -05:00
Thog
42d6ac4ab5 Update GLWidget to 1.0.2 (#1191)
This should fix OpenGL context creation on OSX (using Cocoa).

NOTE: As macOS doesn't support OpenGL 4.3, the emulator will probably not work but this fix the hardcrash when starting any games.
2024-02-22 19:14:58 -05:00
gdkchan
a035a5b132 Implement a new physical memory manager and replace DeviceMemory (#856)
* Implement a new physical memory manager and replace DeviceMemory

* Proper generic constraints

* Fix debug build

* Add memory tests

* New CPU memory manager and general code cleanup

* Remove host memory management from CPU project, use Ryujinx.Memory instead

* Fix tests

* Document exceptions on MemoryBlock

* Fix leak on unix memory allocation

* Proper disposal of some objects on tests

* Fix JitCache not being set as initialized

* GetRef without checks for 8-bits and 16-bits CAS

* Add MemoryBlock destructor

* Throw in separate method to improve codegen

* Address PR feedback

* QueryModified improvements

* Fix memory write tracking not marking all pages as modified in some cases

* Simplify MarkRegionAsModified

* Remove XML doc for ghost param

* Add back optimization to avoid useless buffer updates

* Add Ryujinx.Cpu project, move MemoryManager there and remove MemoryBlockWrapper

* Some nits

* Do not perform address translation when size is 0

* Address PR feedback and format NativeInterface class

* Remove ghost parameter description

* Update Ryujinx.Cpu to .NET Core 3.1

* Address PR feedback

* Fix build

* Return a well defined value for GetPhysicalAddress with invalid VA, and do not return unmapped ranges as modified

* Typo
2024-02-22 19:14:57 -05:00
gdkchan
695f261a00 Use correct swizzle on depth-stencil textures (#1196) 2024-02-22 19:14:57 -05:00
gdkchan
ed97cddc85 Remove buffer invalidation (#1194) 2024-02-22 19:14:57 -05:00
VolcaEM
1a72c55194 Add various error codes to Audio (#1201)
The error codes were taken from Switchbrew (switchbrew.org/wiki/Error_codes)
2024-02-22 19:14:57 -05:00
riperiperi
ef4a12ab3e Fix issues causing keyboard profiles to throw errors on load. (#1206)
* Fix issues causing keyboard profiles to throw errors on load.

* Re-add space before the using aliases
2024-02-22 19:14:57 -05:00
VolcaEM
4324ffcdaf Add various error codes to BCAT (#1202)
* Add various error codes to BCAT

The error codes were taken from Switchbrew (switchbrew.org/wiki/Error_codes)

As for InternetRequestDenied, it seems that this error is common for multiple services like Account for example
I already added this error code in Account in PR #1182

* Add some results codes from Libhac and keep names consistent
2024-02-22 19:14:57 -05:00
Xpl0itR
35dafb7838 Revert package include condition (#1204) 2024-02-22 19:14:57 -05:00
Thog
add6820d02 system: Make index 0 of keyboards in configuration 'all keyboards' 2024-02-22 19:14:57 -05:00
Thog
7cdb57df18 ui: fix major regression on SaveConfig 2024-02-22 19:14:57 -05:00
Xpl0itR
43fa18d2f9 Improvements to input and input configuration in the GUI. (#849)
* Improvements to input and input configuration in the GUI

* Requested changes

* nits

* more nits
2024-02-22 19:14:56 -05:00
Xpl0itR
7168854515 catch key errors (#1157) 2024-02-22 19:14:56 -05:00
Michael Kuklinski
b0039340f0 Adding .editorconfig so code style can be consistent and localized (#1131)
* Updated all NuGet packages to latest, and updated the framework from .NET Core 3.0 to 3.1.

* Updating appveyor settings for 3.1

Updating appveyor to use the netcoreapp3.1 path instead of 3.0.

* Removing unneeded NuGet package System.Runtime.CompilerServices.Unsafe.

* Removing unused NuGet package SharpFontCore.

* Removing unused NuGet package TimeZoneConverter.Posix

* Cleaning up by adding newline to a csproj.

* Simplfying a NuGet conditional include, and adding a warning disable for an annoying NuGet package.

* Adding .editorconfig so users have a consistent style setting regardless of their local settings.

* I'm not sure if .travis.yml is still used, but I'm updating its 'dotnet' version to the correct SDK.

* Making the runtime version into its own environment variable so it's a bit easier to change in the future.

* Removing OpenTK.NetStandard reference from Ryujinx.Common

* Fixing indentation in Common.csproj

* Updating the README to specify .NET Core 3.1.

* Reverting the update of the GTKSharp package so it doesn't block the PR.
2024-02-22 19:14:56 -05:00
Thog
f7535cf8a0 nvservice: add a lock around NvHostEvent and remove release fence on SFv2 (#1197)
* nvservice: add a lock to NvHostEvent

* Disable surface flinger release fence and readd infinite timeout

* FenceAction: Add a timeout of 1 seconds as this shouldn't wait forever anyuway

* surfaceflinger: remove leftovers from the release fence

* Don't allow infinite timeout on syncpoint while printing all timeout for better debugging
2024-02-22 19:14:56 -05:00
VolcaEM
f60e0bc964 Add error code for denied internet request in Account (#1182)
InternetRequestDenied (I can't find a better name) was taken from Switchbrew (switchbrew.org/wiki/Error_codes)
Regarding this error, SwitchBrew notes: "IsAnyInternetRequestAccepted with the output from GetClientId returned false."
2024-02-22 19:14:56 -05:00
VolcaEM
24c666aec7 Add various error codes to AM (#1183)
* Add various error codes to AM

The error codes were taken from Switchbrew (https://switchbrew.org/wiki/Error_codes)

* TitleID -> TitleId
2024-02-22 19:14:56 -05:00
Thog
83ac1f4931 nvservices: mitigate abort with heavy load on the GPU processing thread (#1173)
* nvservices: mitigate abort with heavy load on the GPU processing thread.

This should fix Mario Tennis and LM3 regressions with syncpoints.

NOTE: Mario Tennis seems to have another issue related to the texture
cache that happens randomly when starting a match.

PS: Also add a debug logger for all known ioctl call to facilitate
debugging and add a missing UpdateMin in EventSignal.

* Address LDj3SNuD's comment

* Address gdkchan's comment
2024-02-22 19:14:56 -05:00
Ficture Seven
57a49aa098 Do not compute dominance information when not in SSA (#1176) 2024-02-22 19:14:56 -05:00
Thog
1e9866f058 am: add IsVrModeEnabled (#1189)
* am: stub IsVrMode

Needed by SSBU 7.0.0

* Address Ac_K's comments
2024-02-22 19:14:56 -05:00