Commit graph

2882 commits

Author SHA1 Message Date
Thog
5df1c93241 Remove ScopedGlContext (#933)
As MakeCurrent can be slow to execute, this PR changes GLRenderer to not
have to reexecute MakeCurrent when processing frames.
2024-02-22 19:14:46 -05:00
Ac_K
e9db138b76 Add version in all window titles (#935)
This add the AppVeyor build version (added in #927) in the console window title and in the GUI title (when you are on the games list or when an emulated game is closed).
2024-02-22 19:14:46 -05:00
gdkchan
0e8a8bee11 Update bindless to indexed conversion code pattern match (#938)
* Update bindless to indexed conversion code pattern match

* Correct index shift
2024-02-22 19:14:46 -05:00
gdkchan
ce23ffe0a8 Sign-extend shader memory instruction offsets (#934) 2024-02-22 19:14:46 -05:00
Thog
c25434a692 Some fixes for the new GLRenderer (#930)
* Some fixes for the new GLRenderer

Changelog:
- Fix transparency of the window on some games on Windows.
- Fix escape key not being able to exit emulation.
- Fix inverted logic in fullscreen event handling.
- Fix a race condition when stoping emulation causing a hang.
- Fix a memory leak of the OpenGL context when stoping emulation (saving ~200MB of RAM when stoping emulation).
- Simplify and document behaviours when exiting the emulator while the
emulation is running.

* Make sure to clear alpha channel when presenting Texture

This fix once and for all the transparency issue on Windows.

* Enforce footer bar size to avoid gl widget to get resized to 1280x724

* Fix full screen inversion in MainWindow and make sure _listStatusBox don't come back when not needed

* Remove previous transparency clear attempt that is useless now

* Remove an extra line return
2024-02-22 19:14:46 -05:00
Thog
4ccd085295 Improve build identification (#927)
* Improve build identification

Add versioning on CI build

Fix #887

* Fix appveyor

* Fix appveyor for real now
2024-02-22 19:14:46 -05:00
BaronKiko
785b47df26 Reducing log sizes (#724)
* Separated out log's into a separate file for each run. It will keep up to 3

* Rebase part 2

Co-authored-by: Andy Adshead <andy.075109@hotmail.co.uk>
2024-02-22 19:14:46 -05:00
emmauss
4b466e05d0 Add inbuilt Opengl renderer to window (#922)
* add gl rendering widget

* embed renderer into main window

* add input

* fix mouse input

* fix mouse coords

* refresh game list after closing game, remove profiler method

* rebase, hide game list progress bar while game is running

* Some bug fixes

Changelog:

- Reapply some changes that got lost while rebasing from #904
- Make sure to guarantee exclusivity on the GL context (fixing multiple
possible race conditions on Windows)
- Avoid making GLRenderer disposed multiple time

* add fullscreen,  enable input on focus, disable aplha

* addressed comments

* Disable transparency in the window

* fix fullscreen state, fix focus, addressed comments

* nit

* addressed nit

Co-authored-by: Thog <thog@protonmail.com>
2024-02-22 19:14:46 -05:00
Thog
fac66acb24 Stub the application copyright framebuffer api (#921)
* Stub the application copyright framebuffer api

As we currently don't support multi layers on vi/nvnflinger, this PR
implement a stub of this API.

* Address Cyuubi's comments

* Add IPC checks and comments for future reversing

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

Co-authored-by: Ac_K <Acoustik666@gmail.com>
2024-02-22 19:14:46 -05:00
Alex Barney
d832321f88 Get program IDs for the game list from NCA headers (#928)
Previously it would try various fields from the NACP and didn't always work
2024-02-22 19:14:46 -05:00
gdkchan
1a5f0cb59a Support compute uniform buffers emulated with global memory (#924) 2024-02-22 19:14:45 -05:00
Xpl0itR
8793ddf2ec Implement NCA section extractors in the GUI (#896)
* Implement NCA section extractors in the GUI

* AcK's requested changes

* Put extractor on a new thread and added dialogs

* bug fix

* make extraction cancelable

* nits

* changes

* gdkchan's requested change
2024-02-22 19:14:45 -05:00
riperiperi
1f311ed596 Only enumerate cached textures that are modified when flushing. (#918)
* Only enumarate cached textures that are modified when flushing, rather than all of them.

* Remove locking.

* Add missing clear.

* Remove texture from modified list when data is disposed.

In case the game does not call either flush method at any point.

* Add ReferenceEqualityComparer from jD for the HashSet
2024-02-22 19:14:45 -05:00
Thog
7ed658c69e Fix a crash when closing the main UI (#904)
* Fix a crash when closing the main Ui

Also make sure to dispose the OpenAL context to not leak memory when
unloading the emulation context.

* Improve keys and 'game already running' dialogs

* Make sure to dispose the page table and ThreadContext

Less memory leaks!

* Fix tests

* Address gdk's comments
2024-02-22 19:14:45 -05:00
emmauss
0cfd35630c Render Profiler in GUI (#854)
* move profiler output to gui

* addressed commits, rebased

* removed whitespaces
2024-02-22 19:14:45 -05:00
Thog
a29dfe1434 Implement IDeliveryCacheProgressService in bcat (#908)
* Implement IDeliveryCacheProgressService in bcat

This stub IDeliveryCacheProgressService IPC interface as we don't plan
to support cache delivery.

* Address jd's comments

* Address jd's comment correctly

* Address gdk's comments
2024-02-22 19:14:45 -05:00
riperiperi
310bdf38ea Compare shader code using a span instead of individual reads. (#917)
* Compare shader code using a span instead of individual reads.

* Add comment for new parameter.

* Remove unnecessary Math.Min
2024-02-22 19:14:45 -05:00
gdkchan
9b520fc777 Use correct shader local memory size instead of a hardcoded size (#914)
* Use correct shader local size instead of a hardcoded size

* Remove unused uniform block

* Update XML doc

* Local memory size has 23 bits on maxwell

* Generate compute QMD struct from nv open doc header

* Remove dummy arrays when shared or local memory is not used, other improvements
2024-02-22 19:14:45 -05:00
Thog
a849f5a3aa Fix inconsistencies with UserId (#906)
* Fix inconsistencies with UserId

The account user id isn't an UUID. This PR adds a new UserId type with
the correct value ordering to avoid mismatch with LibHac's Uid. This also fix
an hardcoded value of the UserId.

As the userid has been invalid for quite some time (and to avoid forcing
users to their recreate saves), the userid has been changed to "00000000000000010000000000000000".

Also implement a stub for IApplicationFunctions::GetSaveDataSize. (see
the sources for the reason)

Fix #626

* Address jd's & Ac_k's comments
2024-02-22 19:14:45 -05:00
gdkchan
2370411fdb Support configurable point size (#916) 2024-02-22 19:14:45 -05:00
gdkchan
9b0f3d826a Support flat interpolation qualifier on shaders (#915) 2024-02-22 19:14:45 -05:00
Xpl0itR
5b9b736475 Fix application list (#891)
* Fix application list

* Convert file extensions to lowercase before comparing

* AcK's requested changes

* fixed bug found by gdkchan's requested changes

* Account for mismatch between LibHac.TitleLanguage and ...System.Language
2024-02-22 19:14:45 -05:00
gdkchan
fb09da3835 Enable stencil texturing (fixes #866) (#910) 2024-02-22 19:14:44 -05:00
gdkchan
fd0c104edc Discard higher 32-bits of IPC message magic and command number (#911) 2024-02-22 19:14:44 -05:00
Ac_K
a16b37eee5 prepo IPrepoService accurate parsing for report (#905)
* prepo IPrepoService accurate parsing for report

I've found they use msgpack for the report, so I've added a nuget package and deserialize the report in the right way.

Close #838

* jD requested changes

* Change nuget to MsgPack.Cli

* Use var instead of explicit cast
2024-02-22 19:14:44 -05:00
Thog
baa5a10471 Fix OpenBisFileSystem wrong buffer type (#909)
As the title say.
2024-02-22 19:14:44 -05:00
bunnei
9623877ffe SoftwareKeyboard: Interactive data size should include size field. (#907) 2024-02-22 19:14:44 -05:00
Thog
f10b696da7 Make VirtualFileSystem only instanciable once (#901)
This fix a regression caused by #888 on temporary saves for SNES Online.
(and probably other games)
2024-02-22 19:14:44 -05:00
MelonSpeedruns
ee3f6c95b7 Added Program Icon (#900)
* Added Program Icon

Added an icon that displays in the Windows File Explorer and on the console window itself when launched.

* Renamed ryu.ico to Ryujinx.ico
2024-02-22 19:14:44 -05:00
gdkchan
61eca2953b Ignore exit flag on branch delay slot (#899) 2024-02-22 19:14:44 -05:00
Thog
eca7f3ec95 Keep the GUI alive when closing a game (#888)
* Keep the GUI alive when closing a game

Make HLE.Switch init when starting a game and dispose it when closing
the GlScreen.

This also make HLE in charge of disposing the audio and gpu backend.

* Address Ac_k's comments

* Make sure to dispose the Discord module and use GTK quit method

Also update Discord Precense when closing a game.

* Make sure to dispose MainWindow

* Address gdk's comments
2024-02-22 19:14:43 -05:00
Jonathan Goyvaerts
01439e82ab Update DiscordRichPresence package reference to 1.0.147 which is now built for .NET core (#898) 2024-02-22 19:14:43 -05:00
Thog
86b687d5c2 Update 32 bits syscalls to match 64 bits implementation (#892)
* Implement 32 bits syscalls

Co-authored-by: riperiperi <rhy3756547@hotmail.com>

Implement all 32 bits counterparts of the 64 bits syscalls we currently
have.

* Add FlushProcessDataCache32

* Address jd's comments
2024-02-22 19:14:43 -05:00
gdkchan
654637f9a9 Fix shader output color buffer index when non-sequential render targets are used (#895) 2024-02-22 19:14:43 -05:00
bylaws
c5718906a6 Various small audren fixes (#894)
* Remove redundant modulo on wave buffer index

This is already performed by SetBufferIndex

* Correct typo in UpdateDataHeader

MixeSize -> MixSize

* Remove unused variable in audren

'volume' was unused and 'voice.Volume' was used instead so remove 'volume'
2024-02-22 19:14:43 -05:00
gdkchan
ffbc3141ad Support audio effect output status (#890)
* Support audio effect output status

* Remove extra line
2024-02-22 19:14:43 -05:00
gdkchan
3add501f58 Add sampler border color support on the GPU (#893) 2024-02-22 19:14:43 -05:00
Alex Barney
6e18e1df1e Update to LibHac 0.8.2 (#889)
* Update to LibHac 0.8.2

This brings support for temporary savedata, ignores case in key names when loading from a file, and prints the rights ID correctly when missing a title key.

* Auto-format IFileSystemProxy
2024-02-22 19:14:43 -05:00
Thog
f9c6bedca9 Rework SVC handling (#883)
* Rework SVC handling

Prepare for 32 bits support.

* QueryMemory64 x1 is an output

* Pregenerate all SVC handler

Also clean up + 32 bits code path

* Address gdk's comments

* Simplify local setter loop

* Address jd's comments
2024-02-22 19:14:43 -05:00
Ac_K
cafafa41a1 Name all threads (#886)
* Name all threads

Close #874

* use ThreadName instead of ThreadId in Logging
2024-02-22 19:14:43 -05:00
Thog
acb9c9037a Fix race condition in ContentManager (#884)
* Fix race condition in ContentManager

This fix a race condition happening since #791 when trying to load a
game via command line.

* Address gdk's comments

* Ensure to dispose the FileStream and not the IStorage
2024-02-22 19:14:43 -05:00
gdkchan
b2b5371db2 Add a GetSpan method to the memory manager and use it on GPU (#877) 2024-02-22 19:14:43 -05:00
gdkchan
12094e461a Support instanced draw of quads" (#881) 2024-02-22 19:14:42 -05:00
gdkchan
236e8027ee Replace glFinish with barrier for WaitForIdle (#878) 2024-02-22 19:14:42 -05:00
Jonathan Goyvaerts
8b031ee33b Get rid of unused class AboutInfo (#882) 2024-02-22 19:14:42 -05:00
Alex Barney
5b14e1424c Call EnsureApplicationSaveData when launching a game (#871)
* Workaround for the lack of a program registry

* Call EnsureApplicationSaveData when launching a game
2024-02-22 19:14:42 -05:00
Thog
13af50f0cd Add 32 bits support to HleProcessDebugger (#859)
Co-authored-by: riperiperi <rhy3756547@hotmail.com>
2024-02-22 19:14:42 -05:00
Jonathan Goyvaerts
a4745d957f Create method to LoadAndSave ApplicationMetaData and get rid of code duplication (#872) 2024-02-22 19:14:42 -05:00
Thog
2208467991 MapBufferEx: take page size into account (#873)
Fix #744
2024-02-22 19:14:42 -05:00
emmauss
4e2dc9e6e5 System firmware installer (#791)
* firmware installer

* Add directory installation option and fix 9.x support for directory

* Fix missing system font error while installing for the first time

* Address code style comments

* Create and use InvalidFirmwarePackageException

* Fix LDj3SNuD's comments

* addressed alex's comments

* add label to status bar to show current firmware version

Co-authored-by: Thog <thog@protonmail.com>
2024-02-22 19:14:42 -05:00