Commit graph

545 commits

Author SHA1 Message Date
gdkchan
c17de10661 NvServices refactoring (#120)
* Initial implementation of NvMap/NvHostCtrl

* More work on NvHostCtrl

* Refactoring of nvservices, move GPU Vmm, make Vmm per-process, refactor most gpu devices, move Gpu to Core, fix CbBind

* Implement GetGpuTime, support CancelSynchronization, fix issue on InsertWaitingMutex, proper double buffering support (again, not working properly for commercial games, only hb)

* Try to fix perf regression reading/writing textures, moved syncpts and events to a UserCtx class, delete global state when the process exits, other minor tweaks

* Remove now unused code, add comment about probably wrong result codes
2024-02-22 19:13:35 -05:00
Ac_K
d32b42a6de Update IAudioRendererManager.cs 2024-02-22 19:13:35 -05:00
Ac_K
4fe6c6cbaf A REAL fix for some games. (#116)
* Update IAudioRendererManager.cs

* Update IAudioRendererManager.cs

* Update IAudioRendererManager.cs
2024-02-22 19:13:35 -05:00
gdkchan
12b535becb Ignore ZR target texture color registers on shader 2024-02-22 19:13:35 -05:00
LDj3SNuD
630a38435a Add Sqxtn_S, Sqxtn_V, Uqxtn_S, Uqxtn_V instructions and Tests (6). (#110)
* Update ILGeneratorEx.cs

* Update AOpCodeTable.cs

* Update AInstEmitSimdArithmetic.cs

* Update CpuTestSimd.cs

* Update CpuTestSimdReg.cs

* Update CpuTest.cs

* Update Pseudocode.cs

* Update Instructions.cs

* Update AInstEmitSimdArithmetic.cs

* Update AInstEmitSimdArithmetic.cs

* Update AInstEmitSimdArithmetic.cs
2024-02-22 19:13:35 -05:00
gdkchan
a1b35e5eea Fix GetDesiredLanguage and expose a way to set the desired language, default to english 2024-02-22 19:13:35 -05:00
gdkchan
d9b8c6fb90 Properly support multiple vertex buffers, stub 2 ioctls, fix a shader issue, change the way how the vertex buffer size is calculated for the buffers with limit = 0 2024-02-22 19:13:35 -05:00
gdkchan
f6bc36b6a9 Remove unnecessary casts from NxSettings 2024-02-22 19:13:35 -05:00
gdkchan
b091970fd9 Add null terminator to audio device names when writing to the output buffer 2024-02-22 19:13:35 -05:00
gdkchan
9821a50c96 Remove thread from the threads list when it finishes, remove debug code 2024-02-22 19:13:35 -05:00
LDj3SNuD
a3dffb299b Update AOpCodeTable.cs (#108) 2024-02-22 19:13:35 -05:00
LDj3SNuD
96c0a31109 Add Cls_V, Clz_V, Orn_V instructions. Add 18 Tests: And_V, Bic_V, Bif_V, Bit_V, Bsl_V, Cls_V, Clz_V, Orn_V, Orr_V. (#104)
* Update AOpCodeTable.cs

* Update AInstEmitSimdLogical.cs

* Update AInstEmitSimdArithmetic.cs

* Update ASoftFallback.cs

* Update AInstEmitAlu.cs

* Update Pseudocode.cs

* Update Instructions.cs

* Update CpuTestSimdReg.cs

* Update CpuTestSimd.cs
2024-02-22 19:13:35 -05:00
gdkchan
f1f43b0c4b Some small sync primitive fixes, logging fixes, started to implement the 2D engine on the GPU, fixed DrawArrays, implemented a few more shader instructions, made a start on nvdrv refactor, etc... 2024-02-22 19:13:35 -05:00
Ac_K
2c1ca695e0 Update ISystemSettingsServer.cs (#107)
* Update ISystemSettingsServer.cs

Implement `GetSettingsItemValue`.

* Add NxSettings.cs

Generated automatically from a Switch 3.0 config file (Tid: 0100000000000818).

* Update ISystemSettingsServer.cs

* Update ISystemSettingsServer.cs

* Update ISystemSettingsServer.cs
2024-02-22 19:13:34 -05:00
gdkchan
9eb6ccaede Update README.md 2024-02-22 19:13:34 -05:00
gdkchan
3f66148eca [HLE/Audio] Use correct audio device names 2024-02-22 19:13:34 -05:00
gdkchan
5bb602e8b8 Improved logging (#103) 2024-02-22 19:13:34 -05:00
Ac_K
48f182d5dc Update IAudioController.cs 2024-02-22 19:13:34 -05:00
gdkchan
9068a69fe0 Print guest stack trace on a few points that can throw exceptions 2024-02-22 19:13:34 -05:00
gdkchan
4d0b04d54e Stub a few services, add support for generating call stacks on the CPU 2024-02-22 19:13:34 -05:00
Ac_K
18e9d2605c Some implementations (#99)
* Some implementations

- ICommonStateGetter
* GetBootMode
- ISelfController
* SetHandlesRequestToDisplay
- IServiceGetterInterface
- ISystemUpdateInterface
- IVulnerabilityManagerInterface
- IPrepoService
- ISettingsServer
* GetLanguageCode
- ISystemSettingsServer
* GetFirmwareVersion2
- IHOSBinderDriver
* TransactParcelAuto

* Fix Implementations

* Fix Implementations 2
2024-02-22 19:13:34 -05:00
Ac_K
f5547d19e2 Update am service (#98)
* am services implementations

Implement:
- IAllSystemAppletProxiesService
- IApplicationCreator
- IGlobalStateController
- IHomeMenuFunctions
  * RequestToGetForeground stub.
  * GetPopFromGeneralChannelEvent stub event.
- ISystemAppletProxy
  * GetCommonStateGetter
  * GetSelfController
  * GetWindowController
  * GetAudioController
  * GetDisplayController
  * GetLibraryAppletCreator
  * GetHomeMenuFunctions
  * GetGlobalStateController
  * GetApplicationCreator
  * GetDebugFunctions

* Update ServiceFactory.cs

* Update IHomeMenuFunctions.cs

* Update IHomeMenuFunctions.cs

* Update ServiceFactory.cs
2024-02-22 19:13:34 -05:00
LDj3SNuD
7180131ff4 Fix Addp_S in AOpCodeTable. Add 5 Tests: ADDP (scalar), ADDP (vector), ADDV. (#96)
* Update AOpCodeTable.cs

* Update Pseudocode.cs

* Update Instructions.cs

* Update CpuTestSimd.cs

* Update CpuTestSimdReg.cs

* Update Instructions.cs

* Revert "Started to work in improving the sync primitives"
2024-02-22 19:13:34 -05:00
gdkchan
35e3fbf367 Implement the synchronization primitives like the Horizon kernel does (#97)
* Started to work in improving the sync primitives

* Some fixes

* Check that the mutex address matches before waking a waiting thread

* Add MutexOwner field to keep track of the thread owning the mutex, update wait list when priority changes, other tweaks

* Add new priority information to the log

* SvcSetThreadPriority should update just the WantedPriority
2024-02-22 19:13:34 -05:00
emmauss
100d8bf51f fix typo in log (#93) 2024-02-22 19:13:34 -05:00
LDj3SNuD
b0e59cc55d Add ADDHN{2}, RADDHN{2}, SUBHN{2}, RSUBHN{2} (vector) instructions. Add 8 Tests. (#92)
* Update AOpCodeTable.cs

* Update AInstEmitSimdArithmetic.cs

* Update Pseudocode.cs

* Update Instructions.cs

* Update Bits.cs

* Create CpuTestSimd.cs

* Create CpuTestSimdReg.cs

* Update CpuTestSimd.cs

Provide a better supply of input values for the 20 Simd Tests.

* Update CpuTestSimdReg.cs

Provide a better supply of input values for the 20 Simd Tests.

* Update AOpCodeTable.cs

* Update AInstEmitSimdArithmetic.cs

* Update CpuTestSimd.cs

* Update CpuTestSimdReg.cs
2024-02-22 19:13:33 -05:00
gdkchan
b140bea87b Add SvcSetThreadActivity, tweak SignalProcessWideKey, add fmul32i shader instructions and other small fixes 2024-02-22 19:13:33 -05:00
gdkchan
06f3567f3e [HLE/Kernel] Fix SetThreadPriority, allow nano seconds values > int.MaxValue, fix on WaitProcessWideKeyAtomic (althrough looks like it still doesn't work properly 2024-02-22 19:13:33 -05:00
gdkchan
1efa5d7950 [HLE/Kernel] Dispose the thread wait even on exit 2024-02-22 19:13:33 -05:00
MS-DOS1999
bddd80044f Fix Fmin/max and add vector version, add and modifying fmin/max tests (#89) 2024-02-22 19:13:33 -05:00
gdkchan
4d87f34001 Fix bad merge, and a few other fixes 2024-02-22 19:13:33 -05:00
gdkchan
ae07e2b57b [HLE/Kernel] Yield when cond var is signaled 2024-02-22 19:13:33 -05:00
gdkchan
7ebebc6366 [HLE/Kernel] Somewhat improved sync primitives 2024-02-22 19:13:33 -05:00
LDj3SNuD
65384d5bc8 Add 151 complete tests for 71 base instructions of types: Alu; AluImm; AluRs; AluRx; Bfm; CcmpImm; CcmpReg; Csel; Mov; Mul. (#80)
* Add files via upload

* Update Ryujinx.Tests.csproj
2024-02-22 19:13:33 -05:00
LDj3SNuD
7e3a6bbc90 Add ABS (scalar & vector), ADD (scalar), NEG (scalar) instructions. (#88)
* Update AOpCodeTable.cs

* Update AInstEmitSimdArithmetic.cs

* Update AOpCodeTable.cs
2024-02-22 19:13:33 -05:00
Ac_K
b245fd9d4b Update IAudioDeviceService.cs (#87)
* Update IAudioDeviceService.cs

Stubs:
- QueryAudioDeviceSystemEvent
- GetActiveChannelCount

* Update IAudioDeviceService.cs

* Update IAudioDeviceService.cs
2024-02-22 19:13:33 -05:00
Ac_K
95b70fdfad Update IAudioController.cs (#86)
* Update IAudioController.cs

Stubs:
- SetExpectedMasterVolume
- GetMainAppletExpectedMasterVolume
- GetLibraryAppletExpectedMasterVolume
- ChangeMainAppletMasterVolume
- SetTransparentVolumeRate

* Update IAudioController.cs
2024-02-22 19:13:33 -05:00
Ac_K
02a1cc3161 Update IAccountServiceForApplication.cs (#85)
Stubs:
- GetUserCount (`Write(0);` throw userland error)
2024-02-22 19:13:33 -05:00
Ac_K
96938ce95f Update IHidServer.cs (#84)
* Update IHidServer.cs

Stubs:
- SetGyroscopeZeroDriftMode
- SetNpadHandheldActivationMode
- SendVibrationValue
- GetPlayerLedPattern

* Update IHidServer.cs

updated
2024-02-22 19:13:33 -05:00
emmauss
8b02ec2c9a Add special log for stubs (#81)
* add stub loglevel

* add log for stubbed methods
2024-02-22 19:13:32 -05:00
gdkchan
e0eac28fd4 [GPU] Set frame buffer texture size to window size 2024-02-22 19:13:32 -05:00
gdkchan
c4a231b9d8 [GPU] Send correct window size to the vertex shader 2024-02-22 19:13:32 -05:00
gdkchan
d73a2c0239 [GPU] Fix frame buffer being upside down in some cases 2024-02-22 19:13:32 -05:00
gdkchan
eb7c4b65bf [GPU] Avoid drawing the frame buffer with alpha blend enabled, use correct blend enable register, clear the buffer before drawing 2024-02-22 19:13:32 -05:00
emmauss
f4235d4fc4 Add logclass, made changes to logging calls (#79)
* add logclass, made changes to logging calls

* made enum parsing case insensitive

* enable logclass on partial or complete match
2024-02-22 19:13:32 -05:00
gdkchan
c1fb7ee7ba [HLE] Fix hid issues on some games 2024-02-22 19:13:32 -05:00
gdkchan
bb9936f1bf [GPU] Remove 1f in RCP instruction emitter on glsl decompiler 2024-02-22 19:13:32 -05:00
gdkchan
f6a7e77b1f [GPU] Do not use the f suffix on float contants on the shader glsl code 2024-02-22 19:13:32 -05:00
gdkchan
8989fe1d57 Bump glsl version to support layout qualifier 2024-02-22 19:13:32 -05:00
gdkchan
f401a42891 Fix for current framebuffer issues (#78)
[GPU] Fix some of the current framebuffer issues
2024-02-22 19:13:31 -05:00