Commit graph

2275 commits

Author SHA1 Message Date
merry
9a846f739d Faster crc32 implementation (#1294)
* Add Pclmulqdq intrinsic

* Implement crc32 in terms of pclmulqdq

* Address PR comments
2024-02-22 19:15:02 -05:00
Thog
61a8e0d285 SurfaceFlinger: fix some bugs (#1262)
* SurfaceFlinger: fix some bugs

This fixes some bugs in the current implementation and make it closer to
the real implementation.

* Fix align of some variables
2024-02-22 19:15:02 -05:00
gdkchan
1e0b2226b7 Implement FIFO semaphore (#1286)
* Implement FIFO semaphore

* New enum for FIFO semaphore operation
2024-02-22 19:15:01 -05:00
gdkchan
99da86d638 Add new depth-stencil formats (#1284) 2024-02-22 19:15:01 -05:00
gdkchan
73c08482db Fix wrong face culling once and for all (#1277)
* Viewport swizzle support on NV and clip origin

* Initialize default viewport swizzle state, emulate viewport swizzle on shaders when not supported

* Address PR feedback
2024-02-22 19:15:01 -05:00
LDj3SNuD
55765f6866 Add FMaxNmV & FMinNmV Inst.s with Test. (#1279)
Successful unit testing on Windows (debug and release mode).
2024-02-22 19:15:01 -05:00
gdkchan
3da08dbf76 Support separate textures and samplers (#1216)
* Support separate textures and samplers

* Add missing bindless flag, fix SNORM format on buffer textures

* Add missing separation

* Add comments about the new handles
2024-02-22 19:15:01 -05:00
gdkchan
deb1c7b8af Omit image format if possible, and fix BA bit (#1280)
* Omit image format if possible, and fix BA bit

* Match extension name
2024-02-22 19:15:01 -05:00
mageven
e10fb6c592 Fix GetDesiredLanguage (#1275)
* Fix GetDesiredLanguage

* Correct tzcnt slip-up

* Address gdkchan's comments
2024-02-22 19:15:01 -05:00
mageven
29217448a6 Fix GetDisplayVersion (#1276) 2024-02-22 19:15:01 -05:00
riperiperi
8507600a5e Flush GL commands before inevitably waiting for a query result. (#1278) 2024-02-22 19:15:01 -05:00
riperiperi
1898e64ae3 Remember bound framebuffer to avoid glGetInteger use. (#1273)
glGetInteger seems to sync with GPU which is less than ideal, and slowing down texture copies.
2024-02-22 19:15:01 -05:00
mageven
6dd3202470 Implement CNTVCT_EL0 (#1268)
* Implement CNTVCT_EL0

* Fix comment
2024-02-22 19:15:01 -05:00
Thog
c2292223d4 Implement TMML and TMML.B (#1270)
* Implement TMML and TMML.B

This implement TMML and TMML.B instructions

* Fix TmmlB declaration alignment

* Address gdkchan's comments

* Fix inverted encoding definitions
2024-02-22 19:15:01 -05:00
gdkchan
61363b833c Spanify Graphics Abstraction Layer (#1226)
* Spanify Graphics Abstraction Layer

* Be explicit about BufferHandle size
2024-02-22 19:15:01 -05:00
Thog
1c3b6ea58c time: Make sure to initialize the network system clock with a valid system clock (#1259)
This should fix AC:NH events and probably other games.
2024-02-22 19:15:01 -05:00
Alex Barney
a7a574acea Update to LibHac 0.11.2 (#1240) 2024-02-22 19:15:01 -05:00
LDj3SNuD
791cff51ab Unwinding Follow-up. Fix a bug in JitUnwindWindows where ... (#1238)
... in case of "Vector" unwind codes the remaining unwind codes could be corrupted.
Nits.
2024-02-22 19:15:01 -05:00
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