Commit graph

545 commits

Author SHA1 Message Date
Ac_K
5066d3732d Fix IHidServer code style 2024-02-22 19:13:57 -05:00
Ac_K
71e0c3b292 Full 5.X stubbed IHidServer (#428)
* Full 5.X stubbed IHidServer

Since we can't support all those Hid calls in the right way, we can stub them with more information as possible in the logs.
I have added all symbols in it to be more revelant as possible.
It's remove some Hid spam in few games too, because we assign some var as the game want.

* Fix issues

* Fix code according to review
2024-02-22 19:13:56 -05:00
ReinUsesLisp
b62d1e30e3 Implement DepthWriteMask and add R16G16 (#425) 2024-02-22 19:13:56 -05:00
ReinUsesLisp
33595377de General improvements for GpuResourceManager (#421)
* General improvements to GpuResourceManager

* Address feedback

* Address feedback
2024-02-22 19:13:56 -05:00
ReinUsesLisp
c2b606489f Fixup SSY (#424) 2024-02-22 19:13:56 -05:00
gdkchan
1eea13c1b1 Remove cold methods from the CPU cache (#224)
* Remove unused tracing functionality from the CPU

* GetNsoExecutable -> GetExecutable

* Unsigned comparison

* Re-add cpu tracing

* Config change

* Remove cold methods from the translation cache on the cpu

* Replace lock with try lock, pass new ATranslatorCache instead of ATranslator

* Rebase fixups
2024-02-22 19:13:56 -05:00
gdkchan
6e5aae682d Fix performance regression caused by the new scheduler changes (#422)
* Call interrupt less often, remove some leftovers from the old scheduler code

* Remove unneeded attribute
2024-02-22 19:13:56 -05:00
emmauss
16e09b858e Show Game Title on Titlebar (#408)
* support reading control data

* show game info on titlebar

* use first language is default is not available

* use seperate language enums for titles

* fix hex display
2024-02-22 19:13:56 -05:00
gdkchan
fc74a876f2 Thread scheduler rewrite (#393)
* Started to rewrite the thread scheduler

* Add a single core-like scheduling mode, enabled by default

* Clear exclusive monitor on context switch

* Add SetThreadActivity, misc fixes

* Implement WaitForAddress and SignalToAddress svcs, misc fixes

* Misc fixes (on SetActivity and Arbiter), other tweaks

* Rebased

* Add missing null check

* Rename multicore key on config, fix UpdatePriorityInheritance

* Make scheduling data MLQs private

* nit: Ordering
2024-02-22 19:13:56 -05:00
gdkchan
cbac9962ee Fix d32s8 format on OGLEnumConverter (#420) 2024-02-22 19:13:56 -05:00
gdkchan
3e27799e3a Misc fixes on the arena allocator (#364) 2024-02-22 19:13:56 -05:00
gdkchan
b56f29c854 Allow "reinterpretation" of framebuffer/zeta formats (#418)
* (Re)Implement format reinterpretation, other changes

* Implement writeback to guest memory, some refactoring

* More refactoring, implement reinterpretation the old way again

* Clean up

* Some fixes on M2MF (old Dma engine), added partial support for P2MF, fix conditional ssy, add Z24S8 zeta format, other fixes

* nit: Formatting

* Address PR feedback
2024-02-22 19:13:56 -05:00
gdkchan
ed988fdab9 Ensure that buffers are available after a signal when GetReleasedBuffers is called (#369) 2024-02-22 19:13:55 -05:00
LDj3SNuD
b0a4d5bfe2 Fix/Add 1+12 [Saturating] [Rounded] Shift Right Narrow (imm.) Instructions; add 14 Tests. Add 6 Tests for PR#405. Add 2 Tests for PR#412. (#409)
* Update AOpCodeTable.cs

* Update AInstEmitSimdShift.cs

* Update CpuTestSimdShImm.cs

* Update AInstEmitSimdArithmetic.cs

* Update AInstEmitSimdHelper.cs

* Create CpuTestSimdIns.cs

* Update CpuTest.cs

* Update CpuTestSimd.cs

* Update CpuTestSimdReg.cs

* Update CpuTest.cs

* Update CpuTestSimd.cs

* Update CpuTestSimdReg.cs

* Update CpuTestSimd.cs

* Update CpuTestSimdReg.cs

* Update CpuTest.cs

* Update CpuTestSimdReg.cs

* Update CpuTestSimd.cs
2024-02-22 19:13:55 -05:00
HorrorTroll
078e701b34 Implement B5G6R5Unorm, BGR5A1Unorm, RGBA32Uint, R16Unorm and Z16 texture format. Fix BC6H_UF16 from Unorm to Sfloat (#417)
* Implement B5G6R5Unorm & BGR5A1Unorm

* Implement RGBA32Uint

* Implement R16Unorm & Z16 texture format

* Fix BC6H_UF16 from Unorm to Sfloat
2024-02-22 19:13:55 -05:00
Thomas Guillemard
6ac3a6908b Rewrite the C++ Demangler (#416)
* Rewrite the C++ Demangler

This new Demangler provides support to almost every possible mangled
symbols and should behaves like GNU c++filt.

It works on 98.9% of the sdk's symbols and 99.5%
of Puyo Puyo Tetris's symbols.

* Fix code style

* Fix noexcept enclosed expression parsing issues

* fix code style issues
2024-02-22 19:13:55 -05:00
Ac_K
74865e3933 Add Ryujinx.Tests.Unicorn project to Ryujinx.sln 2024-02-22 19:13:55 -05:00
Ac_K
609934c0be Update IStorage.cs (#415)
Lock the stream fix a multithreading error when a XCI game try to access to the RomFs.
2024-02-22 19:13:55 -05:00
ReinUsesLisp
57a50a194c Fixup image error message and add G8R8 to size query (#410) 2024-02-22 19:13:55 -05:00
emmauss
ffe734eebf Lock GbpQueueBuffer till Vsync is signalled (#367)
* Initial Framerate limit implementation

* use seperate event for limiter

* check for vsync signal after queue up framebuffer

* removed ingame toggle

* fix nits
2024-02-22 19:13:55 -05:00
emmauss
6f5d657904 Implements proper save path (#386)
* initial save path implementation

* fix savedatatype offset, remove incomplete createsavedata implimentation

* address nits

* fix crash if npdm is not found

* made saveinfo readonly, other stuff

* remove context param from saveinfo contructor

* fix style

* remove whitespace
2024-02-22 19:13:55 -05:00
Alex Barney
f3a56246f0 Add XCI, NSP and NCA loading support (#404)
* Add XCI and NCA loading support

* Code style changes

* Add NSP loading

* Changes from code review

* Read XCIs with patches. Code style

* Add KEYS.md file

* Make file extension matching case-insensitive
2024-02-22 19:13:54 -05:00
ReinUsesLisp
cc30be4516 Move GPU emulation from Ryujinx.HLE to Ryujinx.Graphics and misc changes (#402)
* Move GPU LLE emulation from HLE to Graphics

* Graphics: Move Gal/Texture to Texture

* Remove Engines/ directory and namespace

* Use tables for image formats

* Abstract OpCode decoding

* Simplify image table

* Do not leak Read* symbols in TextureReader

* Fixups

* Rename IGalFrameBuffer -> IGalRenderTarget

* Remove MaxBpp hardcoded value

* Change yet again texture data and add G8R8 flipping

* Rename GalFrameBufferFormat to GalSurfaceFormat

* Unident EnsureSetup in ImageHandler

* Add IsCompressed

* Address some feedback
2024-02-22 19:13:54 -05:00
LDj3SNuD
b343f1deab Fix/Add 10 Shift Right and Mls_Ve Instructions; add 14 Tests. (#407)
* Update AOpCodeTable.cs

* Update AInstEmitSimdShift.cs

* Update ASoftFallback.cs

* Update AOpCodeSimdShImm.cs

* Update ABitUtils.cs

* Update AInstEmitSimdArithmetic.cs

* Update AInstEmitSimdHelper.cs

* Create CpuTestSimdShImm.cs

* Create CpuTestSimdRegElem.cs

* Address PR feedback.

* Nit.

* Nit.
2024-02-22 19:13:54 -05:00
LDj3SNuD
b986e7f326 Remove old Tester, update Tests (some reworks). (#400)
* Delete Bits.cs

* Delete Integer.cs

* Delete Instructions.cs

* Delete Pseudocode.cs

* Add files via upload

* Add mnemonic.

* Literals all uppercase.

* Nit.

* Allow FPSR control.

* Allow FPSR control.

* Allow FPSR control.
2024-02-22 19:13:54 -05:00
jduncanator
e30388b230 Asynchronously log messages to the Console window (#395)
* Logging: Asynchronously log messages to the Console window

Writing to the Console blocks until the write completes. This has the potential to block any code path that logs to the application logger.

By queuing up log messages in an asynchronous queue and returning without blocking, we can speed up code paths that heavily log to the console (for example stubbed services like ServiceHid).

From testing this results in a roughly 8% time decrease between Ryujinx startup and the splash screen in Super Mario Odyssey on my system - 00:03:19.591 down to
00:03:04.354. Depending on your system, YMMV.

* Logging: Resolve code styling issues
2024-02-22 19:13:54 -05:00
emmauss
451fa73b3b Implement loading of profile image (#391)
* implement loading of profile image

* rename icon to profilepicture

* rename icon file
2024-02-22 19:13:54 -05:00
gdkchan
b3c6177f7b Fix exception throw message for unimpl texture formats (#398) 2024-02-22 19:13:53 -05:00
ReinUsesLisp
a53611dcd8 Shaders: Handle Ipa PASS argument as needed in Fragment Shaders (#392) 2024-02-22 19:13:53 -05:00
HorrorTroll
4c247f04a5 Add BGRA8Unorm, BGRA8Srgb, ZF32_X24S8 texture format (#377)
* Add BGRA8Unorm, BGRA8Srgb, ZF32_X24S8 texture format

* Add BGRA8Unorm, BGRA8Srgb, ZF32_X24S8 texture format

* Revert "Add BGRA8Unorm, BGRA8Srgb, ZF32_X24S8 texture format"

This reverts commit aea5c9db3a.

* Conflicts fix

* Wrong fix

* E

* e
2024-02-22 19:13:53 -05:00
gdkchan
6a357d693e Improve handling on QueryGet on the gpu (#397) 2024-02-22 19:13:53 -05:00
LDj3SNuD
b0fdc50e8e Add Fcvtns_S, Fcvtns_V, Fcvtnu_S, Fcvtnu_V (AOpCodeSimd) FP & Umlal_V, Umlsl_V, Saddl_V, Ssubl_V, Usubl_V instructions; add 8 FP & 16 S/Umlal_V, S/Umlsl_V, S/Uaddl_V, S/Usubl_V Tests. (#390)
* Update AOpCodeTable.cs

* Update AInstEmitSimdCvt.cs

* Update Pseudocode.cs

* Update Instructions.cs

* Update CpuTestSimd.cs

* Update AOpCodeTable.cs

* Update AInstEmitSimdArithmetic.cs

* Update Instructions.cs

* Update CpuTestSimdReg.cs

* Update CpuTestSimd.cs

* Update AOpCodeTable.cs

* Update AInstEmitSimdArithmetic.cs

* Update Instructions.cs

* Update CpuTestSimdReg.cs

* Add QCFlagBit.

* Add QCFlagBit.
2024-02-22 19:13:53 -05:00
Merry
81b68e076b Ryujinx.Tests: Add unicorn to test framework (#389)
* Ryujinx.Tests: Add unicorn to test framework

* CpuTestSimdArithmetic: Comment out inaccurate results
2024-02-22 19:13:53 -05:00
ReinUsesLisp
3953fe522b Implement SSY/SYNC shader instructions (#382)
* Use a program counter to control shaders' flow

* Cleanup

* Implement SSY/SYNC

* Address feedback

* Fixup commentary

* Fixup Ssy instruction
2024-02-22 19:13:53 -05:00
ReinUsesLisp
1dc5d67162 Fixup HasColor for depth/stencil values (#379) 2024-02-22 19:13:53 -05:00
HorrorTroll
2a1a94a197 Add R32_G32 texture format (#383) 2024-02-22 19:13:53 -05:00
LDj3SNuD
d6f80069fe Add SHADD, SHSUB, UHSUB, SRHADD, URHADD, instructions; add 12 Tests. (#380)
* Update AOpCodeTable.cs

* Update AInstEmitSimdArithmetic.cs

* Update Instructions.cs

* Update CpuTestSimdReg.cs

* Update CpuTest.cs

* Update CpuTestSimd.cs

* Update CpuTestSimdCrypto.cs
2024-02-22 19:13:53 -05:00
ReinUsesLisp
be06f80f57 Use mirrored texture wraps when available (#361) 2024-02-22 19:13:53 -05:00
ReinUsesLisp
3fbe50f3db Implement vertex instancing (#381) 2024-02-22 19:13:53 -05:00
emmauss
ba57d37112 Update BSD service implementation (#363)
* Update BSD service to handle libnx's 'smart IPC buffers' for address info

* Use existing "GetBufferType0x21" for certain BSD socket methods

* Parse address port as unsigned short

* Fix bounds check on reading the IPC buffer

* Implement Read, Write methods

* rebased and cleaned

* addressed nits

* remove unused swap method

* fixed alignments
2024-02-22 19:13:53 -05:00
ReinUsesLisp
1e263d84fb Implement multiple rendertarget attachments and depth writting (#375)
* Add depth writting

* Implement multiple attachments

* Address feedback
2024-02-22 19:13:52 -05:00
gdkchan
773c315c9d Fix BinarySearchLt to return less than rather than less than or equal value (#372) 2024-02-22 19:13:52 -05:00
ReinUsesLisp
f19d9a3aaa Avoid querying and setting texture bindings in hot code (#376) 2024-02-22 19:13:52 -05:00
Thomas Guillemard
d64d56a3b3 Improve LM implementation (#373)
- Manage end of the log packet correctly.
- Add drop count, time, and program name parsing.
- Use the correct buffer type. (0x21 not 0x9)
- Prefix unknown fields with "Field"
2024-02-22 19:13:52 -05:00
Thomas Guillemard
1ad79b3032 SvcSetHeapSize: match kernel check for invalid size (#374)
This fix games like DK Country
2024-02-22 19:13:52 -05:00
ReinUsesLisp
8aac21ac9a Avoid gpr overwritting on Ld_C instruction (#371)
* Avoid gpr overwritting on LD_C instruction

* Address feedback

* Ignore invalid registers
2024-02-22 19:13:52 -05:00
ReinUsesLisp
cd0b375682 Use signed and unsigned vertex types (#370) 2024-02-22 19:13:52 -05:00
LDj3SNuD
3abd56876c Add AESD, AESE, AESIMC, AESMC instructions; add 4 simple Tests (closed box). (#365)
* Create CpuTestSimdCrypto.cs

* Update AOpCodeTable.cs

* Create AInstEmitSimdCrypto.cs

* Update ASoftFallback.cs

* Create ACryptoHelper.cs
2024-02-22 19:13:52 -05:00
ReinUsesLisp
0cf9510db3 Rendertarget attachments, texture and image changes (#358)
* Add multiple color outputs for fragment shaders

* Add registers and gal enums

* Use textures for framebuffers and split color and zeta framebuffers

* Abstract texture and framebuffer targets as an image

* Share images between framebuffers and textures

* Unstub formats

* Add some formats

* Disable multiple attachments

* Cache framebuffer attachments

* Handle format types

* Add some rendertarget formats

* Code cleanup

* Fixup half float types

* Address feedback

* Disable multiple attachments in shaders

* Add A4B4G4R4 image format

* Add reversed section for image enums
2024-02-22 19:13:52 -05:00
gdkchan
d297c815c6 Fix MapPhysicalMemory when block position is less than map position (#359)
* Fix MapPhysicalMemory when block position is less than map position

* Only try to free pages that are actually mapped

* Only unmap after freeing the memory
2024-02-22 19:13:52 -05:00