Commit graph

1143 commits

Author SHA1 Message Date
mageven ce983f360b
Change console log to discard on overflow () 2020-06-09 20:22:54 -03:00
Shrek5InTheatres2019 4ef689c67d
Stubbing ImportServerPki ()
* Stubbed ImportServerPki

* thought it might be nice to name this variable properly

* i really need to name variables better

* Change Var

Co-authored-by: Thog <thog@protonmail.com>

* Change .ReadBytes(5) to IPC send buffer

Co-authored-by: Thog <thog@protonmail.com>

* Add description comment

Co-authored-by: Thog <thog@protonmail.com>

* fix build issue

* Resolve final suggestion

Co-authored-by: Thog <thog@protonmail.com>

* uhh

* it should work now shut up

* aligned variables just look so much nicer :)

* better variable alignment

* aligned

Co-authored-by: Thog <thog@protonmail.com>
2020-06-06 13:04:30 +02:00
merry f8cd072b62
Faster crc32 implementation ()
* Add Pclmulqdq intrinsic

* Implement crc32 in terms of pclmulqdq

* Address PR comments
2020-06-05 20:58:27 +10:00
Thog bcb7761eac
SurfaceFlinger: fix some bugs ()
* 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
2020-06-02 17:58:19 +02:00
gdkchan 44d7fcff39
Implement FIFO semaphore ()
* Implement FIFO semaphore

* New enum for FIFO semaphore operation
2020-05-29 10:51:10 +02:00
gdkchan 12cfaf56f0
Add new depth-stencil formats () 2020-05-29 09:01:18 +10:00
gdkchan a15b951721
Fix wrong face culling once and for all ()
* Viewport swizzle support on NV and clip origin

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

* Address PR feedback
2020-05-28 09:03:07 +10:00
LDj3SNuD 83d94b21d0
Add FMaxNmV & FMinNmV Inst.s with Test. ()
Successful unit testing on Windows (debug and release mode).
2020-05-27 18:51:59 +02:00
gdkchan 5795bb1528
Support separate textures and samplers ()
* Support separate textures and samplers

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

* Add missing separation

* Add comments about the new handles
2020-05-27 16:07:10 +02:00
gdkchan 0b6d206daa
Omit image format if possible, and fix BA bit ()
* Omit image format if possible, and fix BA bit

* Match extension name
2020-05-27 11:00:21 +02:00
mageven b663cd22c8
Fix GetDesiredLanguage ()
* Fix GetDesiredLanguage

* Correct tzcnt slip-up

* Address gdkchan's comments
2020-05-27 10:40:23 +02:00
mageven 6b55cedd73
Fix GetDisplayVersion () 2020-05-27 18:22:50 +10:00
riperiperi 5dab515c7a
Flush GL commands before inevitably waiting for a query result. () 2020-05-27 17:51:03 +10:00
riperiperi d941f4c070
Remember bound framebuffer to avoid glGetInteger use. ()
glGetInteger seems to sync with GPU which is less than ideal, and slowing down texture copies.
2020-05-24 15:44:12 +02:00
mageven 6416bc1938
Implement CNTVCT_EL0 ()
* Implement CNTVCT_EL0

* Fix comment
2020-05-23 12:15:59 +02:00
Thog ff7a933ec0
Implement TMML and TMML.B ()
* Implement TMML and TMML.B

This implement TMML and TMML.B instructions

* Fix TmmlB declaration alignment

* Address gdkchan's comments

* Fix inverted encoding definitions
2020-05-23 12:04:35 +02:00
gdkchan 5011640b30
Spanify Graphics Abstraction Layer ()
* Spanify Graphics Abstraction Layer

* Be explicit about BufferHandle size
2020-05-23 11:46:09 +02:00
Thog cc8dbdd3fb
time: Make sure to initialize the network system clock with a valid system clock ()
This should fix AC:NH events and probably other games.
2020-05-20 11:35:30 +02:00
Alex Barney 9544ed98b6
Update to LibHac 0.11.2 () 2020-05-16 12:12:13 +02:00
LDj3SNuD 3b70a28087
Unwinding Follow-up. Fix a bug in JitUnwindWindows where ... ()
... in case of "Vector" unwind codes the remaining unwind codes could be corrupted.
Nits.
2020-05-15 13:46:35 +02:00
Thog da3fd3f71b surfaceflinger: FreeBufferLocked doesn't reset the graphic buffer
That's the job of the user on Horizon (via SetPreallocatedBuffer).
2020-05-15 12:20:24 +02:00
mageven ba4830293e
Refactor out Application details from Horizon ()
* 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
2020-05-15 03:16:46 -03:00
Thog 0ff00bd6d3
am: Implement common web applets ()
* 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
2020-05-15 03:56:14 +02:00
Thog 378259a40a
Surface Flinger: Implement GetBufferHistory ()
* Surface Flinger: Implement GetBufferHistory

Also fix some bugs on the Surface Flinger implementation

* Address Ac_K's comment
2020-05-15 03:30:08 +02:00
Ac_K b2e5855928
pctl: refactoring IParentalControlServiceFactory and IParentalControl… ()
* 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
2020-05-15 03:14:38 +02:00
Ficture Seven 430a48338b
Fix RET Xn translation () 2020-05-14 14:50:35 +10:00
gdkchan 96c7988671
Remove CpuId IR instruction () 2020-05-13 15:30:21 +10:00
Ac_K 1f8e45c2ba
nvdrv: Partially implementation of GetStatus ()
* 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 

* Fix struct
2020-05-13 15:29:16 +10:00
VolcaEM b96aa7574f
Add missing error code to Time ()
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)
2020-05-13 15:28:53 +10:00
Ac_K 76e1a162dd
am: Implement GetFriendInvitationStorageChannelEvent ()
* am: Implement GetFriendInvitationStorageChannelEvent

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

* Fix handle name

* add GetNotificationStorageChannelEvent
2020-05-12 16:52:27 +02:00
Ficture Seven 4b79b78b8c
Fix tailcall case in EmitterContext () 2020-05-11 10:04:52 +10:00
mageven 492bb6ee5f
Suppress CS0169 CS0649 warns from HID structs ()
Also fix typo in a pragma restore in Logger
2020-05-10 16:02:41 +02:00
VolcaEM be98a7a649
Add various error codes to Settings ()
The error codes were taken from Switchbrew (https://switchbrew.org/wiki/Error_codes)
2020-05-10 13:33:15 +02:00
VolcaEM 1dd78142fa
Add two error codes to SDB PDM ()
* Add two error codes to SDB PDM

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

* Remove empty line
2020-05-09 10:57:19 +02:00
VolcaEM 8b81819716
Add two error codes to Mii ()
* 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
2020-05-08 16:23:26 +02:00
VolcaEM fe72bc9274
Add various error codes to NCM LR ()
The error codes were taken from Switchbrew (https://switchbrew.org/wiki/Error_codes)
2020-05-08 16:06:32 +02:00
Ac_K 0711ffd52b
Fix SystemInfo logging to file ()
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.
2020-05-07 23:24:33 +10:00
gdkchan 1e687c4eea
Fix block iteration on kernel MemoryManager InsertBlock function () 2020-05-06 22:48:57 +10:00
gdkchan b8eb6abecc
Refactor shader GPU state and memory access ()
* Refactor shader GPU state and memory access

* Fix NVDEC project build

* Address PR feedback and add missing XML comments
2020-05-06 11:02:28 +10:00
plutoo 7f500e7cae
set: Quick implementation of GetKeyCodeMap/GetKeyCodeMap2 ()
* 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>
2020-05-05 20:50:53 +02:00
SeraUX 8be7335176
Logging the current firmware version ()
* Logging the curent firmware version

* fixed an error in cases when firmware is not installed
2020-05-05 21:51:04 +10:00
HorrorTroll 371b9999f2
Add Docked/Handheld text on status bar ()
* Add Dock/Handheld on status bar

* Simplified the code & move next to V-Sync

* Nit.
2020-05-05 08:10:01 +10:00
VolcaEM f84fb20959
Add error code for denied internet request in Friends ()
* Add error code for denied internet request in Friends

* Fix formatting from previous PR
2020-05-04 23:10:15 +10:00
VolcaEM 232d53a1ff
Add various error codes to Loader ()
* 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
2020-05-04 13:22:28 +02:00
gdkchan 15d1cc806b
Move kernel state out of the Horizon class ()
* Move kernel state from Horizon to KernelContext

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

* Sort usings
2020-05-04 13:41:29 +10:00
riperiperi cd48576f58
Implement Counter Queue and Partial Host Conditional Rendering ()
* 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.
2020-05-04 12:24:59 +10:00
Mary 651a07c6c2
Refactor SystemInfo and implement macOS system info backend () 2020-05-04 12:15:27 +10:00
Ac_K 4c54f36c38
Upgrade projects to C#8 ()
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.
2020-05-04 12:14:48 +10:00
Thog 2285a1792f
Remove travis configuration () 2020-05-04 12:12:42 +10:00
Ficture Seven 180ad8605d
Improve IRDumper ()
* 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
2020-05-04 12:06:22 +10:00