Commit graph

175 commits

Author SHA1 Message Date
mageven
2365ddfc36
HID SharedMem Rework (#1003)
* Delete old HLE.Input

* Add new HLE Input.

git shows Hid.cs as modified because of the same name. It is new.

* Change HID Service

* Change Ryujinx UI to reflect new Input

* Add basic ControllerApplet

* Add DebugPad

Should fix Kirby Star Allies

* Address Ac_K's comments

* Moved all of HLE.Input to Services.Hid
* Separated all structs and enums each to a file
* Removed vars
* Made some naming changes to align with switchbrew
* Added official joycon colors

As an aside, fixed a mistake in touchscreen headers and added checks to
important SharedMem structs at init time.

* Further address Ac_K's comments

* Addressed gdkchan's and some more Ac_K's comments

* Address AcK's review comments

* Address AcK's second review comments

* Replace missed Marshal.SizeOf and address gdkchan's comments
2020-04-03 11:10:02 +11:00
Thog
8f21db810d
Reduce requirements for running homebrew (#1053)
* Reduce requirements for running homebrews

This commit change the following behaviours:

- TimeZoneBinary system archive isn't required until guest code call LoadTimeZoneRule.
- Fonts system archives aren't requred until a "pl:u" IPC call is made.
- Custom font support was dropped.
- TimeZoneBinary missing message is now an error and not a warning.

* Address comments
2020-03-30 08:23:05 +11:00
Thog
0dd38028cb
Make Device Location Name configuration (custom TZ) (#1031)
This permit to use arbitrary timezone (instead of UTC).

Useful for games like ACNH.
2020-03-26 09:23:21 +11:00
jduncanator
82c3df83c4
prepo: Add a MessagePack object formatter (#1034) 2020-03-26 08:33:18 +11:00
Ac_K
56374c8633
prepo: Implement RequestImmediateTransmission and GetTransmissionStatus (#1033)
* prepo: Implement RequestImmediateTransmission and GetTransmissionStatus

This implement RequestImmediateTransmission and GetTransmissionStatus of the prepo service accurately to RE.
Since we don't use reports, I've explained what the calls do in the real service.

Close #958

* fix comment
2020-03-25 12:28:15 +01:00
Alex Barney
21c9c04f9f
Add IMultiCommitManager (#1011)
* Update LibHac

* Add IMultiCommitManager

* Updates

* Delete NuGet.Config

* Add command version
2020-03-25 19:14:35 +11:00
jduncanator
daecb1193d
prepo: Resolve JSON parsing issues in prepo report handling (#1022)
It seems MsgPack.Cli incorrectly converts some unicode control characters directly to JSON literal Unicode strings (eg. '\1'). As these are invalid, pretty printing the JSON report fails.

This removes pretty printing, pending a proper implementation, and tidies up MsgPack deserialization.
2020-03-24 23:26:37 +01:00
Thog
e590262531
friends: Stub GetBlockedUserListIds (#1017) 2020-03-23 22:19:45 +01:00
Ac_K
b2d307d34f
Fix Prepo parsing reports (#1016)
This fix the parsing of prepo service reports which could failed in some edge case. I've improved the parsing of the object to a JSON string too.
2020-03-23 21:58:41 +01:00
Ac_K
32d3f3f690
Implement GetRegionCode and add the RegionCode to settings (#999)
This implement `GetRegionCode` accordingly to RE. I've added a setting in the GUI and a field in the Configuration file with a way to update the Configuration file if needed.
2020-03-20 09:37:55 +11:00
Thog
7475e180b4
audren: Accept REV8 (#993)
REV8 only added changes on performance buffer and wavebuffer dsp command
generation.

As we don't support any of those, we can just increment the revision
number for now.
2020-03-18 09:43:47 +11:00
Ac_K
25c3b8b356
Implement some calls of ISelfController (#965)
* Implement some calls of ISelfController

This PR implement some calls of ISelfController:

- EnterFatalSection
- LeaveFatalSection
- GetAccumulatedSuspendedTickValue (close #937)

According to RE of the 8.1.0 am service.

* thread safe increment/decrement

* Fix thread safe

* remove unused using
2020-03-04 00:41:41 -03:00
Alex Barney
cecbd256a5
Add support for cache storage (#936)
* Update LibHac

* Run EnsureApplicationCacheStorage when launching a game

* Add new FS commands
2020-03-03 15:07:06 +01:00
Thog
47f079d23e
stub GetNintendoAccountUserResourceCacheForApplication (#962) 2020-03-03 01:07:27 +11:00
Thog
3b531de670
Implement mii:u and mii:e entirely (#955)
* Implement mii:u and mii:e entirely

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

This commit implement the mii service accurately.

This is based on Ac_k work but was polished and updated to 7.x.

Please note that the following calls are partially implemented:

- Convert: Used to convert from old console format (Wii/Wii U/3ds)
- Import and Export: this is shouldn't be accesible in production mode.

* Remove some debug leftovers

* Make it possible to load an arbitrary mii database from a Switch

* Address gdk's comments

* Reduce visibility of all the Mii code

* Address Ac_K's comments

* Remove the StructLayout of DatabaseSessionMetadata

* Add a missing line return in DatabaseSessionMetadata

* Misc fixes and style changes

* Fix some issues from last commit

* Fix database server metadata UpdateCounter in MarkDirty (Thanks Moose for the catch)

* MountCounter should only be incremented when no error is reported

* Fix FixDatabase

Co-authored-by: Alex Barney <thealexbarney@gmail.com>
2020-03-02 09:56:01 +11:00
Alex Barney
165e658f02
Actually use the dummy NACP for EnsureApplicationSaveData (#939) 2020-02-18 22:35:47 +11:00
Thog
e9a37ca6a8
Implement GetCurrentIpConfigInfo (#943)
* Implement GetCurrentIpConfigInfo

This is needed by Rocket League.

Also fix GetCurrentIpConfigInfo to not return ipv6 addresses

* Address Ac_K comment
2020-02-17 16:28:41 +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
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
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
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
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
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
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
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
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
Thog
ab29521faa Fix R5G6B5 in SurfaceFlinger (#863)
Also fix B5G6R5Unorm wrong definition in Ryujinx.Graphics.OpenGL.
2020-01-09 19:12:47 +01:00
gdkchan
29a825b43b Address PR feedback
Removes a useless null check

Aligns some values to improve readability
2020-01-09 02:13:00 +01:00
gdkchan
18814d44b2 Address PR feedback
Add TODO comment for GL_EXT_polygon_offset_clamp
2020-01-09 02:13:00 +01:00
gdkchan
647d0962df Initialize GPU physical memory accessor from KProcess, to allow homebrew that never maps anything on the GPU to work 2020-01-09 02:13:00 +01:00
gdk
16d88c21fc Improved and simplified window texture presentation 2020-01-09 02:13:00 +01:00
gdk
8cba252b23 Add per-source type memory change tracking, simplified state change tracking, other fixes 2020-01-09 02:13:00 +01:00
gdk
1876b346fe Initial work 2020-01-09 02:13:00 +01:00
Thog
f617fb542a Fix timezone month being reported incorrectly to games (#861)
Nintendo actually uses range from 1 to 12 for months (when original timezone code manage 0-11)
2020-01-09 11:08:57 +11:00
Alex Barney
63b24b4af2 Rename "RyuFs" directory to "Ryujinx" and use the same savedata system the Switch uses (#801)
* Use savedata FS commands from LibHac

* Add EnsureSaveData. Use ApplicationControlProperty struct

* Add a function to migrate to the new directory layout

* LibHac update

* Change backup structure

* Don't create UI files in the save path

* Update RyuFs paths

* Add GetProgramIndexForAccessLog

Ryujinx only runs one program at a time, so always return values reflecting that

* Load control NCA when loading from an NSP

* Skip over UI stats when exiting

* Set TitleName and TitleId in more cases. Fix TitleID naming style

* Completely comment out GUI play stats code

* rebase

* Update LibHac

* Update LibHac

* Revert UI changes

* Do migration automatically at startup

* Rename RyuFs directory to Ryujinx

* Update RyuFs text

* Store savedata paths in the GUI

* Make "Open Save Directory" work

* Use a dummy NACP in EnsureSaveData if one is not loaded

* Remove manual migration button

* Respond to feedback

* Don't read the installer config to get a version string

* Delete nuget.config

* Exclude 'sdcard' and 'bis' during migration

Co-authored-by: Thog <thog@protonmail.com>
2020-01-05 12:49:44 +01:00
Thog
e0e12b1672
Fix EphemeralNetworkSystemClock wrong steady clock (#858)
oops
2020-01-04 18:39:27 +01:00
Thog
1db3a66da3 Fix LibHac.IStorage not being disposed in FileSystem proxy (#851) 2019-12-26 02:58:38 +01:00
gdkchan
87bfe681ef Fix remap ioctl map offset (#852)
* Fix remap ioctl map offset

* Correct offset type
2019-12-25 02:54:26 +01:00
Thog
bce8972e7a Fix an endge case in bsd IClient::Poll implementation (#848)
This add some code to handle usage of poll without any fds.

This is required by Dark Souls Remastered main loop logic as it's
calling it without any fds during initialization.

===
General system stability improvements to enhance the user's experience.
2019-12-23 06:33:59 +11:00
Thog
d925de2d0e
Fix ILogger type and size decoding (#842)
* Fix ILogger type and size decoding

The type and size are custom encoded integer not byte.

This fix issues on games that send messages longer than 127 characters.

* Address gdk's comments
2019-12-08 14:35:25 +01:00
Ac_K
bb7600e215 prepo: Silent error while parsing report (#837)
Due to a guessed parsing implementation of the report, sometime it throw an error, since the data isn't really useful, it's better to silent possible exceptions with a message.
2019-11-29 15:42:44 +11:00
Xpl0itR
da4e0856c9 Add features to GUI (#757)
* controller image changes depending on the selected controller type

the new controller image assets are temporary until i get new ones

* Game list scans subdirs for games

* Key file existence check

* Only shows Program NCAs in Application list

* Change shown GUI columns without restarting

* Sort by column if you click on the column header

Columns are sorted as text so there are inaccuracies on some columns

* Fix sort on Time Played, Last Played and File Size columns

* Add ability to designate favourite games #1

TODO:
- Make fav games persistent
- Fix invisible check marks due to theme

* Add ability to designate favourite games #2

Also removed default theme

* Added a Windows specific build condition and a Linux bug fix

* bugfix

* Load metadata from JSONs

* Temp bug fix for MacOS

* lil clean up

* requested changes

* Misc fixes

* edited schema and config

* Show the TitleID of games on the title bar

* gui column config option have names

* Async loading of game list

* bugfix and cleanup

* thog's requested changes

* requested changes and cleanup

still need to fix the gtk seizure

* Fix issue where an ExeFS as a NSP didn't show up in the application list

* Minor fixes

* catch glib unhandled exceptions

* Make sure to do UI manipulation in the main thread

* Print path of invalid files

* Ac_k's requested changes

* Return of the dark theme

* move AboutInfo struct to another file

* sort usings

* changes

- gdkchan's requested changes that have been marked resolved
- made some structs internal as they aren't used outside of the GUI
- renamed Ryujinx.UI to Ryujinx.Ui to fit naming convention and folder structure
- fixed bug where controller type dropdown box is stretched
2019-11-29 15:32:51 +11:00
Thog
c24e1892ad time: Fix wrong buffer usage in CalculateStandardUserSystemClockDifferenceByUser & CalculateSpanBetween (#836) 2019-11-27 19:27:30 +01:00
Thog
69329dc569 Fix issues on ro implementation (#834)
* ro: Fixes some bugs

* Fix critical overflow in random computation
2019-11-26 19:41:17 +01:00
Ac_K
3f3ae99a0f prepo: Implement calls of IPrepoService (#830)
* prepo: Implement calls of IPrepoService

- Implement `SaveReportOld`, `SaveReportWithUserOld`, `SaveReport`, `SaveReportWithUser` not accurate by RE (except for result codes). It's  here to do something with the data since we will never use the `Play Report` sent by the game. So it's better than just a stub.
- Fix a typo in `ldn` result code.

Close #807

* Add a processing method

* Address some comments

* remove unneeded using

* Resolve requested changes

* Typo

* Update IPrepoService.cs
2019-11-25 10:45:54 +11:00
Thog
a0e0745f2f Remove one extraneous incrementation (#833)
This incrementation is entirely wrong.
2019-11-25 10:32:07 +11:00