This implement the rendering information output informations of
RequestUpdate.
This is needed by some games to keep track of the count of update on the
DSP.
* Add support for dynamic docking/undocking
As SurfaceFlinger is now working more accurately, we can now support
dynamic configuration of docking mode :)
* Simplify a bt the code
* Fix import ordering
* Remove unused argument
This invalidate the GraphicBuffer on the consumer side when
SetPreallocatedBuffer is called on a buffer slot.
This fix rendering issues on games with a dynamic resolution like Yoshi
Crafted World.
* Rewrite SurfaceFlinger
Reimplement accurately SurfaceFlinger (based on my 8.1.0 reversing of it)
TODO: support swap interval properly and reintroduce disabled "game vsync" support.
* Some fixes for SetBufferCount
* uncomment a test from last commit
* SurfaceFlinger: don't free the graphic buffer in SetBufferCount
* SurfaceFlinger: Implement swap interval correctly
* SurfaceFlinger: Reintegrate Game VSync toggle
* SurfaceFlinger: do not push a fence on buffer release on the consumer side
* Revert "SurfaceFlinger: do not push a fence on buffer release on the consumer side"
This reverts commit 586b52b0bfab2d11f361f4b59ab7b7141020bbad.
* Make the game vsync toggle work dynamically again
* Unregister producer's Binder object when closing layer
* Address ripinperi's comments
* Add a timeout on syncpoint wait operation
Syncpoint aren't supposed to be waited on for more than a second.
This effectively workaround issues caused by not having a channel
scheduling in place yet.
PS: Also introduce Android WaitForever warning about fence being not
signaled for 3s
* Fix a print of previous commit
* Address Ac_K's comments
* Address gdkchan's comments
* Address final comments
* Implement GPU syncpoints
This adds support for GPU syncpoints on the GPU backend & nvservices.
Everything that was implemented here is based on my researches,
hardware testing of the GM20B and reversing of nvservices (8.1.0).
Thanks to @fincs for the informations about some behaviours of the pusher
and for the initial informations about syncpoints.
* syncpoint: address gdkchan's comments
* Add some missing logic to handle SubmitGpfifo correctly
* Handle the NV event API correctly
* evnt => hostEvent
* Finish addressing gdkchan's comments
* nvservices: write the output buffer even when an error is returned
* dma pusher: Implemnet prefetch barrier
lso fix when the commands should be prefetch.
* Partially fix prefetch barrier
* Add a missing syncpoint check in QueryEvent of NvHostSyncPt
* Address Ac_K's comments and fix GetSyncpoint for ChannelResourcePolicy == Channel
* fix SyncptWait & SyncptWaitEx cmds logic
* Address ripinperi's comments
* Address gdkchan's comments
* Move user event management to the control channel
* Fix mm implementation, nvdec works again
* Address ripinperi's comments
* Address gdkchan's comments
* Implement nvhost-ctrl close accurately + make nvservices dispose channels when stopping the emulator
* Fix typo in MultiMediaOperationType
* Use libhac for loading NSOs and KIPs
* Fix formatting
* Refactor KIP and NSO executables for libhac
* Fix up formatting
* Remove Ryujinx.HLE.Loaders.Compression
* Remove reference to Ryujinx.HLE.Loaders.Compression in NxStaticObject.cs
* Remove reference to Ryujinx.HLE.Loaders.Compression in KernelInitialProcess.cs
* Rename classes in Ryujinx.HLE.Loaders.Executables
* Fix space alignment
* Fix up formatting
* 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
* 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
* 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
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.
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.
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.
* Implement Jump Table for Native Calls
NOTE: this slows down rejit considerably! Not recommended to be used
without codegen optimisation or AOT.
- Does not work on Linux
- A32 needs an additional commit.
* A32 Support
(WIP)
* Actually write Direct Call pointers to the table
That would help.
* Direct Calls: Rather than returning to the translator, attempt to keep within the native stack frame.
A return to the translator can still happen, but only by exceptionally
bubbling up to it.
Also:
- Always translate lowCq as a function. Faster interop with the direct
jumps, and this will be useful in future if we want to do speculative
translation.
- Tail Call Detection: after the decoding stage, detect if we do a tail
call, and avoid translating into it. Detected if a jump is made to an
address outwith the contiguous sequence of blocks surrounding the entry
point. The goal is to reduce code touched by jit and rejit.
* A32 Support
* Use smaller max function size for lowCq, fix exceptional returns
When a return has an unexpected value and there is no code block
following this one, we now return the value rather than continuing.
* CompareAndSwap (buggy)
* Ensure CompareAndSwap does not get optimized away.
* Use CompareAndSwap to make the dynamic table thread safe.
* Tail call for linux, throw on too many arguments.
* Combine CompareAndSwap 128 and 32/64.
They emit different IR instructions since their PreAllocator behaviour
is different, but now they just have one function on EmitterContext.
* Fix issues separating from optimisations.
* Use a stub to find and execute missing functions.
This allows us to skip doing many runtime comparisons and branches, and reduces the amount of code we need to emit significantly.
For the indirect call table, this stub also does the work of moving in the highCq address to the table when one is found.
* Make Jump Tables and Jit Cache dynmically resize
Reserve virtual memory, commit as needed.
* Move TailCallRemover to its own class.
* Multithreaded Translation (based on heuristic)
A poor one, at that. Need to get core count for a better one, which
means a lot of OS specific garbage.
* Better priority management for background threads.
* Bound core limit a bit more
Past a certain point the load is not paralellizable and starts stealing from the main thread. Likely due to GC, memory, heap allocation thread contention. Reduce by one core til optimisations come to improve the situation.
* Fix memory management on linux.
* Temporary solution to some sync problems.
This will make sure threads exit correctly, most of the time. There is a potential race where setting the sync counter to 0 does nothing (counter stays at what it was before, thread could take too long to exit), but we need to find a better way to do this anyways. Synchronization frequency has been tightened as we never enter blockwise segments of code. Essentially this means, check every x functions or loop iterations, before lowcq blocks existed and were worth just as much. Ideally it should be done in a better way, since functions can be anywhere from 1 to 5000 instructions. (maybe based on host timer, or an interrupt flag from a scheduler thread)
* Address feedback minus CompareAndSwap change.
* Use default ReservedRegion granularity.
* Merge CompareAndSwap with its V128 variant.
* We already got the source, no need to do it again.
* Make sure all background translation threads exit.
* Fix CompareAndSwap128
Detection criteria was a bit scuffed.
* Address Comments.
* 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
* 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>
* Implement GetCurrentIpConfigInfo
This is needed by Rocket League.
Also fix GetCurrentIpConfigInfo to not return ipv6 addresses
* Address Ac_K comment
* 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>
* 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
* 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
* 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
* 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
* 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
* 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
* 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'
* 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
* 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>
* 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>
* Make HLE disposable safely
This fix the oldest issue with the HLE code: the kernel side
disposability.
Changelog:
- Implement KProcess::UnpauseAndTerminateAllThreadsExcept, KThread::Terminate, KThread::TerminateCurrentProcess, KThread::PrepareForTermiation and the svc post handler accurately.
- Implement svcTerminateProcess and svcExitProcess. (both untested)
- Fix KHandleTable::Destroy not decrementing refcount of all objects stored in the table.
- Spawn a custom KProcess with the maximum priority to terminate every guest KProcess. (terminating kernel emulation safely)
- General system stability improvements to enhance the user's experience.
* Fix a typo in a comment in KProcess.cs
* Address gdk's comments
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.
* 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
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.
* 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
* 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
This PR remove the `EndianSwap` class who isn't needed anymore since .NET Core 3.0 got a buildin method `BinaryPrimitives.ReverseEndianness` who did the same thing.
* ldn: Implement calls of UserLocalCommunicationService
- Implement `IUserServiceCreator: CreateUserLocalCommunicationService` according to RE.
- Implement `IUserLocalCommunicationService` calls:
- Every calls in this interface are layered to `NetworkInterface`.
- `GetState` according to RE.
- `InitializeOld`, `Initialize` and `Finalize` stubbed with the appropriate result code and some TODO according to RE.
- `AttachStateChangeEvent` according to RE.
* Fix var name and TODO comments
* Fix review
* am: Initial swkbd implementation
Currently only implements the full screen keyboard, inline keyboard will come later.
* Remove unnecessary logging
* Miscellaneous tidy up
* am: Always pop incoming interactive session data
* am: Add a reminder to implement the full config struct
* am: Check for a max length of zero
We should only limit/truncate text when the max length is set to a non-zero value.
* Add documentation
* am: Return IStorage not available when queue is empty
We should be returning the appropriate error code when the FIFO is empty, rather than just throwing an exception and killing the emulator.
* Fix typo
* Code style changes
* Implement IApplicationFunctions & IQueryService commands
- Fix some nits in `IApplicationFunctions`
- Implement `QueryApplicationPlayStatistics` and `QueryApplicationPlayStatisticsByUid` checked by RE.
- Implement `QueryApplicationPlayStatisticsForSystem` and `QueryApplicationPlayStatisticsByUserAccountIdForSystem` checked by RE.
- Implement `QueryPlayStatisticsManager` to get/set played games statistics. We currently don't store any statistics because it's handled by qlaunch (or maybe am service?) on Switch.
We can add support later if games use returned statistics for something.
* Fix reviews
* hle: Improve IRoInterface logic
This commit contains a little rewrite of IRoInterface to fix some issues
that we were facing on some recent games (AC3 Remastered & Final Fantasy
VIII Remastered)
Related issues:
- https://github.com/Ryujinx/Ryujinx-Games-List/issues/196
* Address comments
* Add detail of ZbcSetTableArguments
This is a missing part of the #800 PR that cause an assert to be
triggered in debug mode.
Also, remove Fence in SurfaceFlinger as it's a duplicate of NvFence.
* Fix critical issue in size checking of ioctl
oops
* Start rewriting nvservices internals
TODO:
- nvgpu device interface
- nvhost generic device interface
* Some clean up and fixes
- Make sure to remove the fd of a closed channel.
- NvFileDevice now doesn't implement Disposable as it was never used.
- Rename NvHostCtrlGetConfigurationArgument to GetConfigurationArguments
to follow calling convention.
- Make sure to check every ioctls magic.
* Finalize migration for ioctl standard variant
TODO: ioctl2 migration
* Implement SubmitGpfifoEx and fix nvdec
* Implement Ioctl3
* Implement some ioctl3 required by recent games
* Remove unused code and outdated comments
* Return valid event handles with QueryEvent
Also add an exception for unimplemented event ids.
This commit doesn't implement accurately the events, this only define
different events for different event ids.
* Rename all occurance of FileDevice to DeviceFile
* Restub SetClientPid to not cause regressions
* Address comments
* Remove GlobalStateTable
* Address comments
* Align variables in ioctl3
* Some missing alignments
* GetVaRegionsArguments realign
* Make Owner public in NvDeviceFile
* Address LDj3SNuD's comments
This is a hack, but it works for now. We should really determine a way to automatically calculate the required buffer size to avoid situations where specific IPC calls "overflow" the maximum size.
Allows passing data into and out of the same registers when calling via the Kernel ABI. This allows implementing specific supervisor calls like "CallSecureMonitor", that expect their args and results in the same registers.
* Fix latest version of hbl/hb-menu
This implement GetSettingsItemValueSize (required by hbl) and
GetInternetConnectionStatus (required by hb-menu).
* Address comments
* Update to LibHac 0.6.0
* Create an IFileSystemProxy object from LibHac
* Rename rc -> result
* Alignment and spacing
* Result formatting
* Spacing
* Sort usings
* Move InvalidSystemResourceException with the other
`InvalidSystemResourceException.cs` was in `Ryujinx.HLE/Resource` who didn't make sense since it's the only file in the folder, and other exceptions class are in `Ryujinx.HLE/Exceptions`.
* Fix empty lines
* Fix TimeZoneBinary dispose issues
THis fix a regression on Pokémon Let's Go Eevee! (and
probably other games) caused by #783.
* Address Moosehunter's comment
* audout:u: Implement SetAudioOutVolume and GetAudioOutVolume
- Implementation of `audout:u` SetAudioOutVolume and GetAudioOutVolume (checked with RE).
- Add Get and Set for Volume into audio backends.
- Cleanup of all audio backends to follow the `IAalOutput` structure and .NET standard.
- Split OpenAL backend into 2 files for consistency.
* Address comments
* Fix the volume calculation
* Fix hwopus DecodeInterleaved implementation
Also implement new variants of this api.
This should fix#763
* Sample rate shouldn't be hardcoded
This fix issues while opening Pokémon Let's Go pause menu.
* Apply Ac_K's suggestion about EndianSwap
* Address gdkchan's comment
* Address Ac_k's comment
* Fix 9.0.0 related services bindings
This was wrong because of a mistake on switchbrew.
* Fix wronog cmdid for ISteadyClock::GetTestOffset/SetTestOffset
* Update ClockCore logics to 9.0.0
Also apply 9.0.0 permissions and comment time:u, and time:a (as those
are going to be moved)
* Move every clocks instances + timezone to a global manager
* Start implementing time:m
Also prepare the skeleton of the shared memory
* Implement SystemClockContextUpdateCallback and co
* Update StaticService to 9.0.0
* Update ISystemClock to 9.0.0
* Rename IStaticService and add glue's IStaticService
* Implement psc's ITimeZoneService
* Integrate psc layer into glue for TimeZoneService
* Rename TimeZoneManagerForPsc => TimeZoneManager
* Use correct TimeZoneService interface for both StaticService implementations
* Accurately implement time shared memory operations
* Fix two critical flaws in TimeZone logic
The first one was the month range being different fron Nintendo one
(0-11 instead of 1-12)
The other flaw was a bad incrementation order during days & months
computation.
* Follow Nintendo's abort logic for TimeManager
* Avoid crashing when timezone sysarchive isn't present
* Update Readme
* Address comments
* Correctly align fields in ISystemClock
* Fix code style and some typos
* Improve timezone system archive warning/error messages
* Rearrange using definitions in Horizon.cs
* Address comments
* Fix AudioRenderer implementation
According to RE:
- `GetAudioRendererWorkBufferSize` is updated and improved to support `REV7`
- `RequestUpdateAudioRenderer` is updated to `REV7` too
Should improve results on recent game and close#718 and #707
* Fix NodeStates.GetWorkBufferSize
* Use BitUtils instead of IntUtils
* Nits
* Refactoring HOS folder structure
Refactoring HOS folder structure:
- Added some subfolders when needed (Following structure decided in private).
- Added some `Types` folders when needed.
- Little cleanup here and there.
- Add services placeholders for every HOS services (close#766 and #753).
* Remove Types namespaces
* bcat:u: Implement EnumerateDeliveryCacheDirectory
Basic implementation `EnumerateDeliveryCacheDirectory` call to `IDeliveryCacheStorageService` according to RE. (close#622)
I've added some comments in the whole service for when we'll implement a real bcat implementation.
For now, all games who use it isn't playable because of GPU.
* Use Array instead of List
* Add ApplicationLaunchPropertyHelper
* Fix helper
* Fix helper 2
* Fix ApplicationLaunchProperty Default
* Fix ApplicationLaunchProperty 2
* Fix folder
* Implement basic support of SystemSaveData and Cleanup IFileSystemProxy
- Implement `OpenSystemSaveData` as a `IFileSystem` in `SaveHelper`:
On real device, system saves data are stored encrypted, and we can't create an empty system save data for now. That's why if a user put his own dump of system save in `RyuFs\nand\system\save\`, we extract content in associated folder and open it as a `IFileSystem`. If the system save data don't exist, a folder is created.
- Cleanup `IFileSystemProxy` by adding a Helper class.
- Implement `GetSavePath` in `VirtualFileSystem` and remove `GetGameSavePath` in `SaveHelper`.
* remove the forgotten I
* Fix align
- Implement `btdrv` service (IBluetoothDriver).
Implement call `InitializeBluetoothLe` for initialize events of `bt` service according to RE.
- Implement `bt` service (IBluetoothUser).
Implement call `RegisterBleEvent` according to RE.
- Add a placeholder for the `btm` service (close#750).
- Implement `btm:u` service (IBtmUser) (close#751).
Implement call `GetCore` according to RE (close#752).
- Implement `IBtmUserCore` and calls `AcquireBleScanEvent`, `AcquireBleConnectionEvent`, `AcquireBleServiceDiscoveryEvent` and `AcquireBleMtuConfigEvent` according to RE.
- Implement `SetPalmaBoostMode` in `IHidServer` according to RE.
- Add stub for `SetIsPalmaAllConnectable` in `IHidServer` because we will not support Palma devices soon.
- Implement `nsd:a` and `nsd:u` service (IManager) (close#755).
Implement call `ResolveEx` according to RE (close#756).
Implement calls `GetSettingName`, `GetEnvironmentIdentifier`, `GetDeviceId`, `DeleteSettings`, `Resolve`, `ReadSaveDataFromFsForTest`, `WriteSaveDataToFsForTest` and `DeleteSaveDataOfFsForTest` according to RE.
* IGeneralService Implement GetClientId and IsAnyInternetRequestAccepted
- Add nifm:a and nifm:u with a max sessions as comment since sm don't take care of sessions for now.
- Implement IGeneralService GetClientId based on RE (close#623).
- Implement IGeneralService IsAnyInternetRequestAccepted based on RE (close#624).
- Add some informations in IGeneralService CreateRequest.
- Fix a comment in IAccountService.
* Fix requested changes
* Added GUI to Ryujinx
* Updated to use Glade
Also added scrollbar and default dark theme
* Added support for loading icon from .nro files and cleaned up the code a bit
* Added General Settings Menu (read-only for now) and moved some functionality from MainMenu.cs to ApplicationLibrary.cs
* Added custom GUI theme support and changed the defualt theme to one I just wrote
* Added GTK to process path, fixed a bug and minor edits
* some more edits and a bug fix
* general settings menu is now fully functional. also fixed the bug where ryujinx crashes when it trys to load an invalid gamedir
* big rewrite
* aesthetic changes to General Settings menu
* Added Control Settings
one day done feature :P
* minor changes
* 1st wave of changes
* 2nd wave of changes
* 3rd wave of changes
* Cleanup settings ui
* minor edits
* new about window added, still needs styling
* added spin button for new option and tooltips to settings
* Game icons and names are now shown in the games list
* add nuget package which contains gtk dependencies
* requested changes have been changed
* put CreateGameWindow on a new thread and stopped destroying the main menu when a game loads
* fixed bug that allowed a user to attempt to load multiple games at a time which causes a crash
* Added LastPlayed and TimePlayed columns to the game list
* Did some testing and fixed some bugs
Im not happy with one of the fixes so i will do it properly an upcoming commit
* did some more bug testing and fixed another 2 bugs
* caught an exception when ryujinx tries to load non-homebrew as homebrew
* Large changes
Rewrote ApplicationLibrary.cs (added comments too) so any devs reading it wont get eye cancer, also its probably more efficient now. Added 2 new columns (Developer name and application version) to the game list and wrote the logic for it. Ryujinx now loads NRO's TitleName and TitleID from the NACP file instead of the default NPDM. I also killed a lot of bugs
* Moved Files
moved ApplicationLibrary.cs to Ryujinx.HLE as that is a better place for it. Moved contents of GUI folder to Ui folder and changed the namespaces of the gui files from Ryujinx to Ryujinx.Ui
* Added 'Open Ryujinx Folder' button to the file menu and did some small fixes
* New features
* updated nuget package with missing dlls and changed emmauss' requested changes
* fixed some minor issues
* all requested changes marked as resolved have been changed
* gdkchan's requested changes
* fixed an issue with settings window getting chopped on small res
* fixed 2 problems caused by rebase
* changed the default theme
* applied Thog's patch to fix issue on linux
* fixed issue caused by rebase
* added update check button that runs ryujinx-updater
* reads version info from installer and displays it in about menu
* changes completed
* requested changes changed
* fixed issue with default theme
* fixed a bug and completed requested changes
* added more tooltips and changed some text
- Implement accurate setter for SetPriority.
- Implement accurate setter for SetTimeslice (close#666).
- Implement basic setter for SetSubmitTimeout (close#678).
(plus some comments and a missing `PrintStub` call)
* Start of the ARMeilleure project
* Refactoring around the old IRAdapter, now renamed to PreAllocator
* Optimize the LowestBitSet method
* Add CLZ support and fix CLS implementation
* Add missing Equals and GetHashCode overrides on some structs, misc small tweaks
* Implement the ByteSwap IR instruction, and some refactoring on the assembler
* Implement the DivideUI IR instruction and fix 64-bits IDIV
* Correct constant operand type on CSINC
* Move division instructions implementation to InstEmitDiv
* Fix destination type for the ConditionalSelect IR instruction
* Implement UMULH and SMULH, with new IR instructions
* Fix some issues with shift instructions
* Fix constant types for BFM instructions
* Fix up new tests using the new V128 struct
* Update tests
* Move DIV tests to a separate file
* Add support for calls, and some instructions that depends on them
* Start adding support for SIMD & FP types, along with some of the related ARM instructions
* Fix some typos and the divide instruction with FP operands
* Fix wrong method call on Clz_V
* Implement ARM FP & SIMD move instructions, Saddlv_V, and misc. fixes
* Implement SIMD logical instructions and more misc. fixes
* Fix PSRAD x86 instruction encoding, TRN, UABD and UABDL implementations
* Implement float conversion instruction, merge in LDj3SNuD fixes, and some other misc. fixes
* Implement SIMD shift instruction and fix Dup_V
* Add SCVTF and UCVTF (vector, fixed-point) variants to the opcode table
* Fix check with tolerance on tester
* Implement FP & SIMD comparison instructions, and some fixes
* Update FCVT (Scalar) encoding on the table to support the Half-float variants
* Support passing V128 structs, some cleanup on the register allocator, merge LDj3SNuD fixes
* Use old memory access methods, made a start on SIMD memory insts support, some fixes
* Fix float constant passed to functions, save and restore non-volatile XMM registers, other fixes
* Fix arguments count with struct return values, other fixes
* More instructions
* Misc. fixes and integrate LDj3SNuD fixes
* Update tests
* Add a faster linear scan allocator, unwinding support on windows, and other changes
* Update Ryujinx.HLE
* Update Ryujinx.Graphics
* Fix V128 return pointer passing, RCX is clobbered
* Update Ryujinx.Tests
* Update ITimeZoneService
* Stop using GetFunctionPointer as that can't be called from native code, misc. fixes and tweaks
* Use generic GetFunctionPointerForDelegate method and other tweaks
* Some refactoring on the code generator, assert on invalid operations and use a separate enum for intrinsics
* Remove some unused code on the assembler
* Fix REX.W prefix regression on float conversion instructions, add some sort of profiler
* Add hardware capability detection
* Fix regression on Sha1h and revert Fcm** changes
* Add SSE2-only paths on vector extract and insert, some refactoring on the pre-allocator
* Fix silly mistake introduced on last commit on CpuId
* Generate inline stack probes when the stack allocation is too large
* Initial support for the System-V ABI
* Support multiple destination operands
* Fix SSE2 VectorInsert8 path, and other fixes
* Change placement of XMM callee save and restore code to match other compilers
* Rename Dest to Destination and Inst to Instruction
* Fix a regression related to calls and the V128 type
* Add an extra space on comments to match code style
* Some refactoring
* Fix vector insert FP32 SSE2 path
* Port over the ARM32 instructions
* Avoid memory protection races on JIT Cache
* Another fix on VectorInsert FP32 (thanks to LDj3SNuD
* Float operands don't need to use the same register when VEX is supported
* Add a new register allocator, higher quality code for hot code (tier up), and other tweaks
* Some nits, small improvements on the pre allocator
* CpuThreadState is gone
* Allow changing CPU emulators with a config entry
* Add runtime identifiers on the ARMeilleure project
* Allow switching between CPUs through a config entry (pt. 2)
* Change win10-x64 to win-x64 on projects
* Update the Ryujinx project to use ARMeilleure
* Ensure that the selected register is valid on the hybrid allocator
* Allow exiting on returns to 0 (should fix test regression)
* Remove register assignments for most used variables on the hybrid allocator
* Do not use fixed registers as spill temp
* Add missing namespace and remove unneeded using
* Address PR feedback
* Fix types, etc
* Enable AssumeStrictAbiCompliance by default
* Ensure that Spill and Fill don't load or store any more than necessary
* Abstract SteadyClockCore to follow Nintendo changes in 4.x
This is the ground work for 4.0.0 support
* Implement TickBasedSteadyClockCore
Preparation for the ephemeral clock.
* Refactor SystemClockCore to follow 4.0.0 changes
* Implement EphemeralNetworkSystemClock
* Implement GetSnapshotClock & GetSnapshotClockFromSystemClockContext
* Implement CalculateStandardUserSystemClockDifferenceByUser & CalculateSpanBetween
* Remove an outdated comment & unused import
* Fix a nit and GetClockSnapshot
* Address comment
* Finish ISteadyClock implementation
* Implement IsStandardNetworkSystemClockAccuracySufficient
Also use signed values for offsets and TimeSpanType
* Address comments
* Fix one missing nit and improve one comment
Since the reflection code didn't take care about `private`, this cause regression, so I have added the flag just in case and fix calls who are declared with `private` to `public`.
* refactoring result codes
- Add a main enum who can handle some orphalin result codes and the default `ResultCode.Success` one.
- Add sub-enum by services when it's needed.
- Remove some empty line.
- Recast all service calls to ResultCode.
- Remove some unneeded static declaration.
- Delete unused `NvHelper` class.
* NvResult is back
* Fix
* Refactoring commands handling
- Use Reflection to handle commands ID.
- Add all symbols (from SwIPC so not all time accurate).
- Re-sort some services commands methods.
- Some cleanup.
- Keep some empty constructor for consistency.
* Fix order in IProfile
* IPC services refactoring
- Use custom Attributes to handle services.
- Add a way to set the permissions and fix the bsd service to use it.
- Little cleanup.
- C#7.1 is required.
* fix var name
* fix syntax
* Change Permission to Parameter
* Delete BsdServicePermissionLevel.cs
* Fix Linq
* Clean up ITimeZoneService
Add error codes and simplify parsing
* Add accurate timezone logic
TOOD: LoadTimeZoneRule and location name cmds.
* Integrate the new TimeZone logic
* SCREAMING_UNIX_CASE => PascalCase
* Address comments
* Reduce use of pointer in the LoadTimeZoneRule logic
* Address comments
* Realign tzIfStream logic in LoadTimeZoneRule
* Address gdk's comments
* Refactor the friend namespace and UInt128
This commit also:
- Fix GetFriendsList arguments ordering.
- Add GetFriendListIds.
- Expose the permission level of the port instance.
- InvalidUUID => InvalidArgument
* friend: add all cmds as commments
* add Friend structure layout
* Rename FriendErr to FriendError
* Accurately implement INotificationService
* Fix singleton lock of NotificationEventHandler
* Address comments
* Add comments for IDaemonSuspendSessionService cmds
* Explicitly define the Charset when needed
Also make "Nickname" a string
* Address gdk's comments
* Fix typos
* Remove unneeded using statements
* Enforce var style more
* Remove redundant qualifiers
* Fix some indentation
* Disable naming warnings on files with external enum names
* Fix build
* Mass find & replace for comments with no spacing
* Standardize todo capitalization and for/if spacing
* friends: INotificationService Implementation of GetEvent
According to the RE, the event isn't signaled when handle is returned.
```C
long nn::friends::detail::service::NotificationService::GetEvent(long this, uint *output_handle)
{
long inner_struct_event;
int result;
if (this->event_created)
{
inner_struct_event = &this->event_object;
}
else
{
inner_struct_event = &this->event_object;
result = CreateEvent(&this->event_object, 0, 1);
if ( result )
{
Assert();
}
this->event_created = true;
}
uint event_handle = nn::os::detail::DetachReadableHandleOfInterProcessEvent(inner_struct_event);
*output_handle = event_handle;
int unknown = *((char *)output_handle + 4);
*((char *)output_handle + 4) = 1;
if (unknown)
{
CloseHandle(*output_handle);
}
return 0LL;
}
```
Co-Authored-By: Thomas Guillemard <me@thog.eu>
* settings: Fix GetAvailableLanguageCodes* implementations
Make the implementation match settings. Also add GetAvailableLanguageCodesCount2
* set: define all missing commands in ISettingsServer for a better workflow
* set: Implement MakeLanguageCode
* set: stub GetQuestFlag
* Address comments
* Refactoring of acc:u0
- Move all account things to the account service
- More accurate IAccountServiceForApplication
- Add helper to UInt128
* FIx my engrish
* FIx my engrish #2
* It compiles
* Print correct name when loading an exefs
* Use DirectorySaveDataFileSystem for savedata
* Handle more errors in IFileSystem
* Remove structs replaced by LibHac structs
* Fix alignment
* Fix alignment again
* Fix IFile and IFileSystem IPC
* Alignment
* Use released libhac version
* Profiler initial setup
* Capture actual timing data
* Profiling data dumped to file on close
* Support for multiple sessions under the same name
* Service profiling
* Sort output for easier read
* csv output
* Split session into 2 seperate values
* Refactor name to category
* Basic profiling window dummy. Toggle with F1 or set key with config
No actual data displayed yet, just a pretty triangle
* Simple font rendering
* Display some actual timing data
* Fix font bearing being ignored
* x bearing and advance. Fixed y bearing calc
* Different coloured lines to make reading easier
* Scrolling
* Multiple columns for name
* Column titles
* display in ms rather than ticks
* Bars to display times
* Sortable columns
* Regex filtering
* Better instant timing calculation
Fixed minor regex bug
* Better filtering
Better max value calculation
Skip some rendering to reduce profiler weight
* Variable update rate
* Show/hide inactive button
Some other touchups
* Add missing project reference
* Hide inactive and pause
* Fix viewport errors
* Update initial window position
* Variable name cleanup
* Disable timing dump by default
* Internal Profile refactor and cleanup
* Timing info cleanup
* Profile config cleanup
* Settings cleanup
* Button refactor
* Profile refactor
* Profile window cleanup
* Window manager refactor
* Font service cleanup
* Fixed bug in profiling method where method was called twice without profiling enabled
* Allow update rates of less than 1hz
* Stop using window.run because it's apparently not great for performance.
Some other performance things, should only draw a new frame when something has changed
* Improved time tracking to keep history
* Profile window was getting too long so I added regions and split bar rendering out into partial class
* Dummy graph view with button to toggle
* Realtime graphing initial commit
* Display totals on new bar
* Simple zooming support with arrow keys
* Limit graph zoom and label start and stop
* Added support for timing flags
* Stop data running away when paused and frame updated
* Manual step button
* Update at when flag issued (ie every frame)
* Removed useless finish profiling call
* Enable and disable profiling at compile time.
* Better plage for frame swap flag, also kept enough flags to cover larger time spans
* No more stopwatches created, uses PerformanceCounter now
* public and internal fields to props
* Move visible update to update rather than draw as it causes a lockup if called from draw
Also added profile window disposal so closing main window closes profiler too
* Fixed optimization settings for profiled builds
* Appveyer script guess to add profiling builds
* Quotes
* 1 less quote
* Maybe escape space?
* Specify config
* Different approach
* Fix file paths
* Fix another path
* Better artifact naming
* Missing -
* test string
* Removed for, to test
* readd for
* moved dashes around so artifacts can begin with letters
* quote env vars
* martix
* Removed configs
* Much more efficient capture, ConcurrentDictionary was causing too much overhead
* Skip repeating pixels during draw
* Stop ram usage getting too high. Compensating for cleanup doing more now
* Profile CPU, execute skipped because it's just too much work
* Fixed bug with skipping draws. Furthest needed to be reset every loop
* Less distracting colour for timing flags
* Removed profile method function. It just doesn't play nice with conditional compilation so best to remove it now before it's used a lot
* Null check for category, group and item
* Forgot to reset instant count/time
* Increment line when blank
* Fix threading conflict
Fixed instant count and time. Now accuratly represents the total time and count in the buffer
* Fixed bug in time rendering where times were being trimmed to an int.
Also added microsecond/millisecond formatting to reduce the number of decimal places needed
* Support for multiple profiling levels
* Sometimes it would have to wait a long time for lock to clear so moved it to a tryenter and skip if already locked
* Dumb bug regarding clearing of timestamps. Start is already removed so no need to add it to the start
* Optimisations in drawing routine:
Only calculate bar top and bottom once per bar rather than once per timestamp
Pre-calculate the right side of the graph as it was being calculated multiple times per bar
Skip rendering timestamps that occupy the same pixel space now uses the raw timestamp to decide. While technically not as accurate it's much easier as the right side of the bar doesn't have to be calculated for a skipped timestamp
* Couple alignment changes
* Custom equals overload for profile config. The default implpmentation was just too slow
* Bump cleanup thread priority. It clears the timer queue so it need to be run frequently
* Fixed bug with scrolling caused by recent rendering optimisations. Simply forgot to increment the line index on a skipped line
* Stopped blocking memory disposal so much. Also parralised(?) cleanup call
* Uses Arial for font.
* Enable AA
* Inital seperated config support
* Fix profile input from keyboard
* Check toggle visible key from profiler
* Can't use conditional here as _profileWindow doesn't exist it non-profiling build
* Removed junk from merge in sln
* Fromatting cleanup for review
* Fiked small bug caused by race condition
* Added multiple flags with colours
Added way to set max flags
* Fixed flag times
Dispays time flags in window
* Colors for text frame times
* enable and disable flags button added
better fix for race crash
* Re factored npad out
* Explicitly specified type in foreach
* Removed extra line
* Added s to fix nit
* Comment to clarify default time
* Another s nit
* Ordering nit
* Uses Interlocked.Increment over lock
* Unindented #if's and #regions
* Comment to clarify these are indexes in the list
* Uses iequatable over override equals to avoid conversion and checks at runtime
* Removed no longer used variable
* Fix GetAudioRendererWorkBufferSize for REV5
This should be close#669.
Based of my own RE.
* Fix nit
Co-Authored-By: AcK77 <Acoustik666@gmail.com>
* Fix RE mistake
* Fix nit 2
* Implement IIrSensorServer GetNpadIrCameraHandle
Resolves#618
* Throw ArgumentOutOfRange instead of IOE
* Revise for changes in later firmware
Based on RE work from 6.1.0
* Nits
* Print Guest Stack Trace in ServiceNotImplemented Exception
* Remove PrintGuestStackTrace
* Print Process Name and PID at the start of guest stack trace
* Renaming part 1
* Renaming part 2
* Renaming part 3
* Renaming part 4
* Renaming part 5
* Renaming part 6
* Renaming part 7
* Renaming part 8
* Renaming part 9
* Renaming part 10
* General cleanup
* Thought I got all of these
* Apply #595
* Additional renaming
* Tweaks from feedback
* Rename files
* Initial non 2D textures support
- Shaders still need to be changed
- Some types aren't yet implemented
* Start implementing texture instructions suffixes
Fix wrong texture type with cube and TEXS
Also support array textures in TEX and TEX.B
Clean up TEX and TEXS coords managment
Fix TEXS.LL with non-2d textures
Implement TEX.AOFFI
Get the right arguments for TEX, TEXS and TLDS
Also, store suffix operands in appropriate values to support multiple
suffix combinaisons
* Support depth in read/writeTexture
Also support WrapR and detect mipmap
* Proper cube map textures support + fix TEXS.LZ
* Implement depth compare
* some code clean up
* Implement CubeMap textures in OGLTexture.Create
* Implement TLD4 and TLD4S
* Add Texture 1D support
* updates comments
* fix some code style issues
* Fix some nits + rename some things to be less confusing
* Remove GetSuffix local functions
* AOFFI => AOffI
* TextureType => GalTextureTarget
* finish renaming TextureType to TextureTarget
* Disable LL, LZ and LB support in the decompiler
This needs more work at the GL level (GLSL implementation should be
right)
* Revert "Disable LL, LZ and LB support in the decompiler"
This reverts commit 64536c3d9f673645faff3152838d1413c3203395.
* Fix TEXS ARRAY_2D index
* ImageFormat depth should be 1 for all image format
* Fix shader build issues with sampler1DShadow and texture
* Fix DC & AOFFI combinaison with TEX/TEXS
* Support AOFFI with TLD4 and TLD4S
* Fix shader compilation error for TLD4.AOFFI with no DC
* Fix binding isuses on the 2d copy engine
TODO: support 2d array copy
* Support 2D array copy operation in the 2D engine
This make every copy right in the GPU side.
Thie CPU copy probably needs to be updated
* Implement GetGpuSize + fix somes issues with 2d engine copies
TODO: mipmap level in it
* Don't throw an exception in the layer handling
* Fix because of rebase
* Reject 2d layers of non textures in 2d copy engine
* Add 3D textures and mipmap support on BlockLinearSwizzle
* Fix naming on new BitUtils methods
* gpu cache: Make sure to invalidate textures that doesn't have the same target
* Add the concept of layer count for array instead of using depth
Also cleanup GetGpuSize as Swizzle can compute the size with mipmap
* Support multi layer with mip map in ReadTexture
* Add more check for cache invalidation & remove cubemap and cubemap array code for now
Also fix compressed 2d array
* Fix texelFetchOffset shader build error
* Start looking into cube map again
Also add some way to log write in register in engines
* fix write register log levles
* Remove debug logs in WriteRegister
* Disable AOFFI support on non NVIDIA drivers
* Fix code align
* Implement faster address translation and write tracking on the MMU
* Rename MemoryAlloc to MemoryManagement, and other nits
* Support multi-level page tables
* Fix typo
* Reword comment a bit
* Support scalar vector loads/stores on the memory fast path, and minor fixes
* Add missing cast
* Alignment
* Fix VirtualFree function signature
* Change MemoryProtection enum to uint aswell for consistency
* Implement ConvertScalingMode properly
* Fix up the naming
* Only values 2 and 4 are allowed
* Return a nullable enum from ConvetScalingMode
* Fix typo on method name
* Use convertedScalingMode
* Implement ARM exclusive load/store with compare exchange insts, and enable multicore by default
* Fix comment typo
* Support Linux and OSX on MemoryAlloc and CompareExchange128, some cleanup
* Use intel syntax on assembly code
* Adjust identation
* Add CPUID check and fix exclusive reservation granule size
* Update schema multicore scheduling default value
* Make the cpu id check code lower case aswell
* Make it possibles to load hb-loader and hb-menu
One issue remains with hb-menu homebrew icons because of SIMD issues
(libjpeg-turbo related) and netloader doesn't work.
* Implement GetApplicationControlData
* Fix shared fonts for NSO/NRO
* Add homebrew NRO romfs support
This readd the NRO support by parsing the ASET header
* Address comments about HomebrewRomFs
* override Dispose in homebrew romfs stream
* Use a struct for file timestamp
* Simplify positional increments in GetApplicationControlData
* Address comments
* improve readability of the memory permission check in SetProcessMemoryPermission
* Fix previous broken check
* Add address space checks in SetProcessMemoryPermission
* Implement speculative translation on the cpu, and change the way how branches to unknown or untranslated addresses works
* Port t0opt changes and other cleanups
* Change namespace from translation related classes to ChocolArm64.Translation, other minor tweaks
* Fix typo
* Translate higher quality code for indirect jumps aswell, and on some cases that were missed when lower quality (tier 0) code was available
* Remove debug print
* Remove direct argument passing optimization, and enable tail calls for BR instructions
* Call delegates directly with Callvirt rather than calling Execute, do not emit calls for tier 0 code
* Remove unused property
* Rename argument on ArmSubroutine delegate
* Implement ARM32 memory instructions: LDM, LDR, LDRB, LDRD, LDRH, LDRSB, LDRSH, STM, STR, STRB, STRD, STRH (immediate and register + immediate variants), implement CMP (immediate and register shifted by immediate variants)
* Rename some opcode classes and flag masks for consistency
* Fix a few suboptimal ARM32 codegen issues, only loads should be considered on decoder when checking if Rt == PC, and only NZCV flags should be considered for comparison optimizations
* Take into account Rt2 for LDRD instructions aswell when checking if the instruction changes PC
* Re-align arm32 instructions on the opcode table
* Remove ARM32 interpreter and add ARM32 support on the translator
* Nits.
* Rename Cond -> Condition
* Align code again
* Rename Data to Alu
* Enable ARM32 support and handle undefined instructions
* Use the IsThumb method to check if its a thumb opcode
* Remove another 32-bits check
* Implement some IPC related kernel SVCs properly
* Fix BLZ decompression when the segment also has a uncompressed chunck
* Set default cpu core on process start from ProgramLoader, remove debug message
* Load process capabilities properly on KIPs
* Fix a copy/paste error in UnmapPhysicalMemory64
* Implement smarter switching between old and new IPC system to support the old HLE services implementation without the manual switch
* Implement RegisterService on sm and AcceptSession (partial)
* Misc fixes and improvements on new IPC methods
* Move IPC related SVCs into a separate file, and logging on RegisterService (sm)
* Some small fixes related to receive list buffers and error cases
* Load NSOs using the correct pool partition
* Fix corner case on GetMaskFromMinMax where range is 64, doesn't happen in pratice however
* Fix send static buffer copy
* Session release, implement closing requests on client disconnect
* Implement ConnectToPort SVC
* KLightSession init
* Refactor Ryujinx.Common and HLE Stub Logging
* Resolve review comments
* Rename missed loop variable
* Optimize PrintStub logging function
* Pass the call-sites Thread ID through to the logger
* Remove superfluous lock from ConsoleLog
* Process logged data objects in the logger target
Pass the data object all the way to the output logger targets, to allow them to "serialize" this in whatever appropriate format they're logging in.
* Use existing StringBuilder to build the properties string
* Add a ServiceNotImplemented Exception
Useful for printing debug information about unimplemented service calls
* Resolve Style Nits
* Resolve Merge Issues
* Fix typo and align declarations
* Initial fixes for last release of libnx
For now, the framebuffer aren't okay but it will not crash/
* Improve code reaadability in NvFlinger parsing
* Make surfaces access more userfriendly
* Add ColorFormat
* Fix code style in ColorFormat.cs
* Add multiple framebuffer support in nvnflinger
This fix libnx console rendering
* Move ReadStruct/WriteStruct to Ryujinx.Common
* fix the last nit
* Fix inverted color for R5G6B5
Also add some other format that libnx might uses.
* Remove hardcoded BlockHeight in nvflinger
* Optimized memory modified check
This was initially in some cases more expensive than plainly sending the data. Now it should have way better performance.
* Small refactoring
* renamed InvalidAccessEventArgs
* Renamed PtPageBits
* Removed ValueRange(set)
They are currently unused and won't be likely to be used in the near future
* Initial nvdec implementation using FFmpeg
* Fix swapped channels on the video decoder and the G8R8 texture format
* Fix texture samplers not being set properly (regression)
* Rebased
* Remove unused code introduced on the rebase
* Add support for RGBA8 output format on the video image composer
* Correct spacing
* Some fixes for rebase and other tweaks
* Allow size mismatch on frame copy
* Get rid of GetHostAddress calls on VDec
* Initial implementation of KProcess
* Some improvements to the memory manager, implement back guest stack trace printing
* Better GetInfo implementation, improve checking in some places with information from process capabilities
* Allow the cpu to read/write from the correct memory locations for accesses crossing a page boundary
* Change long -> ulong for address/size on memory related methods to avoid unnecessary casts
* Attempt at implementing ldr:ro with new KProcess
* Allow BSS with size 0 on ldr:ro
* Add checking for memory block slab heap usage, return errors if full, exit gracefully
* Use KMemoryBlockSize const from KMemoryManager
* Allow all methods to read from non-contiguous locations
* Fix for TransactParcelAuto
* Address PR feedback, additionally fix some small issues related to the KIP loader and implement SVCs GetProcessId, GetProcessList, GetSystemInfo, CreatePort and ManageNamedPort
* Fix wrong check for source pages count from page list on MapPhysicalMemory
* Fix some issues with UnloadNro on ldr:ro
* Implement contentmanager and related services
* small changes
* read system firmware version from nand
* add pfs support, write directoryentry info for romfs files
* add file check in fsp-srv:8
* add support for open fs of internal files
* fix filename when accessing pfs
* use switch style paths for contentpath
* close nca after verifying type
* removed publishing profiles, align directory entry
* fix style
* lots of style fixes
* yasf(yet another style fix)
* yasf(yet another style fix) plus symbols
* enforce path check on every fs access
* change enum type to default
* fix typo
* Better implementation of the DMA pusher, misc fixes
* Remove some debug code
* Correct RGBX8 format
* Add support for linked Texture Sampler Control
* Attempt to fix upside down screen issue
* Started to implement the hwopus service
* Write outputs on decode method, some basic error handling
* Fix buffer size read from header and check
* Fix order of values
* Audio: Implement libsoundio as an alternative audio backend
libsoundio will be preferred over OpenAL if it is available on the machine. If neither are available, it will fallback to a dummy audio renderer that outputs no sound.
* Audio: Fix SoundIoRingBuffer documentation
* Audio: Unroll and optimize the audio write callback
Copying one sample at a time is slow, this unrolls the most common audio channel layouts and manually copies the bytes between source and destination. This is over 2x faster than calling CopyBlockUnaligned every sample.
* Audio: Optimize the write callback further
This dramatically reduces the audio buffer copy time. When the sample size is one of handled sample sizes the buffer copy operation is almost 10x faster than CopyBlockAligned.
This works by copying full samples at a time, rather than the individual bytes that make up the sample. This allows for 2x or 4x faster copy operations depending on sample size.
* Audio: Fix typo in Stereo write callback
* Audio: Fix Surround (5.1) audio write callback
* Audio: Update Documentation
* Audio: Use built-in Unsafe.SizeOf<T>()
Built-in `SizeOf<T>()` is 10x faster than our `TypeSize<T>` helper. This also helps reduce code surface area.
* Audio: Keep fixed buffer style consistent
* Audio: Address styling nits
* Audio: More style nits
* Audio: Add additional documentation
* Audio: Move libsoundio bindings internal
As per discussion, moving the libsoundio native bindings into Ryujinx.Audio
* Audio: Bump Target Framework back up to .NET Core 2.1
* Audio: Remove voice mixing optimizations.
Leaves Saturation optimizations in place.
* Change naming convention for Ryujinx project
* Change naming convention for ChocolArm64 project
* Fix NaN
* Remove unneeded this. from Ryujinx project
* Adjust naming from new PRs
* Name changes based on feedback
* How did this get removed?
* Rebasing fix
* Change FP enum case
* Remove prefix from ChocolArm64 classes - Part 1
* Remove prefix from ChocolArm64 classes - Part 2
* Fix alignment from last commit's renaming
* Rename namespaces
* Rename stragglers
* Fix alignment
* Rename OpCode class
* Missed a few
* Adjust alignment
* Timing: Optimize Timestamp Aquisition
Currently, we make use of Environment.TickCount in a number of places. This has some downsides, mainly being that the TickCount is a signed 32-bit integer, and has an effective limit of ~25 days before overflowing and wrapping around. Due to the signed-ness of the value, this also caused issues with negative numbers. This resolves these issues by using a 64-bit tick count obtained from Performance Counters (via the Stopwatch class). This has a beneficial side effect of being significantly more accurate than the TickCount.
* Timing: Rename ElapsedTicks to ElapsedMilliseconds and expose TicksPerX
* Timing: Some style changes
* Timing: Align static variable initialization
This should provide accurate behaviours.
This implementation has been tested with ftpd and libtransistor bsd tests.
This implementation lacks OOB support.
* Print stack trace on invalid memory accesses
* Rebased, change code region base address for 39-bits address space, print stack trace on break and undefined instructions too