Commit graph

945 commits

Author SHA1 Message Date
gdkchan 5a9dba0756
Sign-extend shader memory instruction offsets (#934) 2020-02-14 01:48:07 +01:00
Thog 416ddd0f6e
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
2020-02-13 14:43:29 -03:00
Thog 8d83878f67
Improve build identification (#927)
* Improve build identification

Add versioning on CI build

Fix #887

* Fix appveyor

* Fix appveyor for real now
2020-02-12 14:35:39 +01:00
BaronKiko 505f95848b
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>
2020-02-12 12:18:33 +11:00
emmauss 3aa3c4261a
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>
2020-02-12 01:56:19 +01:00
Thog c464e1ec52
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>
2020-02-12 00:07:13 +01:00
Alex Barney e7a4e0a328
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
2020-02-11 23:43:24 +01:00
gdkchan 7e4d986a73
Support compute uniform buffers emulated with global memory (#924) 2020-02-11 01:10:05 +01:00
Xpl0itR 2e6080ccbb
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
2020-02-08 15:22:45 -03:00
riperiperi 6db16b4110
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
2020-02-07 08:49:26 +11:00
Thog a906f2071c
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
2020-02-06 12:38:24 +01:00
emmauss f2b9a9c2b0
Render Profiler in GUI (#854)
* move profiler output to gui

* addressed commits, rebased

* removed whitespaces
2020-02-06 11:25:47 +00:00
Thog db9f8f999f
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
2020-02-06 05:09:59 +01:00
riperiperi a0e6647860
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
2020-02-03 20:11:22 +01:00
gdkchan 796e5d14b4
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
2020-02-02 14:25:52 +11:00
Thog ea14a95524
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
2020-02-02 14:24:17 +11:00
gdkchan f373f870f7
Support configurable point size (#916) 2020-02-02 10:19:46 +11:00
gdkchan a1a5341baf
Support flat interpolation qualifier on shaders (#915) 2020-02-02 10:18:58 +11:00
Xpl0itR 7b0576db71
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
2020-01-31 19:21:46 +01:00
gdkchan 0202f150d4
Enable stencil texturing (fixes #866) (#910) 2020-01-31 14:42:03 +11:00
gdkchan 793f38b9aa
Discard higher 32-bits of IPC message magic and command number (#911) 2020-01-30 21:43:47 +01:00
Ac_K d218c2eead
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
2020-01-30 17:39:05 +01:00
Thog 5bd75477eb
Fix OpenBisFileSystem wrong buffer type (#909)
As the title say.
2020-01-27 21:09:04 +01:00
bunnei ad2424171a SoftwareKeyboard: Interactive data size should include size field. (#907) 2020-01-26 16:14:21 +11:00
Thog 1d8da18334 Make VirtualFileSystem only instanciable once (#901)
This fix a regression caused by #888 on temporary saves for SNES Online.
(and probably other games)
2020-01-24 17:01:21 +01:00
MelonSpeedruns 4232a15187 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
2020-01-24 16:14:51 +01:00
gdkchan 532ccf929a Ignore exit flag on branch delay slot (#899) 2020-01-22 02:11:43 +01:00
Thog d6b9babe1d 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
2020-01-21 23:23:11 +01:00
Jonathan Goyvaerts b4b2b8b162 Update DiscordRichPresence package reference to 1.0.147 which is now built for .NET core (#898) 2020-01-20 17:55:15 +01:00
Thog d0f15cb0b1 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
2020-01-19 19:21:53 -03:00
gdkchan 81cca88bcd Fix shader output color buffer index when non-sequential render targets are used (#895) 2020-01-19 00:09:46 +01:00
bylaws 90b4759085 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'
2020-01-18 23:29:52 +01:00
gdkchan 595e7716d8 Support audio effect output status (#890)
* Support audio effect output status

* Remove extra line
2020-01-17 10:07:27 +01:00
gdkchan a5e20a8fd1 Add sampler border color support on the GPU (#893) 2020-01-17 09:55:38 +01:00
Alex Barney c5f872c70a 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
2020-01-16 19:08:39 -03:00
Thog 892df335e6 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
2020-01-13 13:04:28 +11:00
Ac_K 5facc0c07f Name all threads (#886)
* Name all threads

Close #874

* use ThreadName instead of ThreadId in Logging
2020-01-13 01:21:54 +01:00
Thog f0055482fd 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
2020-01-13 01:17:44 +01:00
gdkchan b8e3909d80 Add a GetSpan method to the memory manager and use it on GPU (#877) 2020-01-13 10:27:50 +11:00
gdkchan 8b90924c1e Support instanced draw of quads" (#881) 2020-01-13 09:14:50 +11:00
gdkchan 2bb39ff03e Replace glFinish with barrier for WaitForIdle (#878) 2020-01-13 09:12:40 +11:00
Jonathan Goyvaerts 88f78ae6c8 Get rid of unused class AboutInfo (#882) 2020-01-12 14:11:45 -03:00
Alex Barney e348f95495 Call EnsureApplicationSaveData when launching a game (#871)
* Workaround for the lack of a program registry

* Call EnsureApplicationSaveData when launching a game
2020-01-12 12:15:17 +01:00
Thog 9c8d48edff
Add 32 bits support to HleProcessDebugger (#859)
Co-authored-by: riperiperi <rhy3756547@hotmail.com>
2020-01-12 12:06:26 +01:00
Jonathan Goyvaerts 78f6b1d396 Create method to LoadAndSave ApplicationMetaData and get rid of code duplication (#872) 2020-01-12 04:01:04 +01:00
Thog 29e8576b0d MapBufferEx: take page size into account (#873)
Fix #744
2020-01-12 03:14:27 +01:00
emmauss e485ee049d 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>
2020-01-12 03:10:55 +01:00
Xpl0itR 1661ce99ca Update path for system archives in README (#870) 2020-01-10 23:04:52 +01:00
Ac_K 021ed3f44e InitializeCounters to Initialize 2020-01-10 02:17:34 +01:00
Ac_K d8eab24b8b PrintGpuInformation 2020-01-10 02:17:34 +01:00