* account: Adds Account Manager
In a way to have Custom User Profiles merged in master faster, this PR adds a `AccountManager` class (based on `AccountUtils` class) and the following changes have been made:
- Adds a "default profile values" which were the old hardcoded ones.
- The image profile is moved to the Account service folder.
- The hardcoded UserId for the savedata is now using the `AccountManager` last opened one.
- The DeviceId in Mii service is changed to the right value (checked by REd sys:set call).
* Fix csproj
* Addresses gdkchan's comments
* Fix UserProfile fields
* Fix mii GetDeviceId()
* Update Ryujinx.HLE.csproj
* Add initial implementation of the Tamper Machine
* Implement Atmosphere opcodes 0, 4 and 9
* Add missing TamperCompilationException class
* Implement Atmosphere conditional and loop opcodes 1, 2 and 3
* Inplement input conditional opcode 8
* Add register store opcode A
* Implement extended pause/resume opcodes FF0 and FF1
* Implement extended log opcode FFF
* Implement extended register conditional opcode C0
* Refactor TamperProgram to an interface
* Moved Atmosphere classes to a separate subdirectory
* Fix OpProcCtrl class not setting process
* Implement extended register save/restore opcodes C1, C2 and C3
* Refactor code emitters to separate classes
* Supress memory access errors from the Tamper Machine
* Add debug information to tamper register and memory writes
* Add block stack check to Atmosphere Cheat compiler
* Add handheld input support to Tamper Machine
* Fix code styling
* Fix build id and cheat case mismatch
* Fix invalid immediate size selection
* Print build ids of the title
* Prevent Tamper Machine from change code regions
* Remove Atmosphere namespace
* Remove empty cheats from the list
* Prevent code modification without disabling the tampering
* Fix missing addressing mode in LoadRegisterWithMemory
* Fix wrong addressing in RegisterConditional
* Add name to the tamper machine thread
* Fix code styling
* Add the ability to layeredfs individual exefs with mod loader
* Address code style issues
* Further adjustments to the mod loading
* Update Ryujinx.HLE/HOS/ModLoader.cs
Co-authored-by: Ac_K <Acoustik666@gmail.com>
* Apply suggestions from code review
Co-authored-by: Ac_K <Acoustik666@gmail.com>
* Address issue with checking for NSO existence (and code style fixes)
Co-authored-by: Ac_K <Acoustik666@gmail.com>
* shader cache: Fix Linux boot issues
This rollback the init logic back to previous state, and replicate the
way PTC handle initialization.
* shader cache: set default state of ready for translation event to false
* Fix cpu unit tests
Here come Salieri, my implementation of a disk shader cache!
"I'm sure you know why I named it that."
"It doesn't really mean anything."
This implementation collects shaders at runtime and cache them to be later compiled when starting a game.
* hos/gui: Add a check of NCA program index in titleid
This add a check to `ApplicationLoader` for the last 2 digits of the game TitleId who seems to be the NCA program index.
We currently return the last index, instead of the lower one.
Same check is added to ApplicationLibrary in the UI.
I've cleaned up both file too.
* hle: implement partial relaunch logic
TODO: make the emulator auto relauch.
* Handle auto relaunch
* hle: Unify update usage system
* hle: Implement support of multi programs in update system
* Add some documentation
* Address rip's comment
Co-authored-by: Ac_K <Acoustik666@gmail.com>
* Allow launching with custom data directories
Don't load alternate keys when using custom directory
* Address gdkchan's comments
* Misc fixes to log levels
Added more enabled log levels by default
Moved successful config updation to Notice as
1. It's not a warning
2. Warnings could've been disabled by the config load and hence message
would be lost
* Logger class changes only
Now compile-time checking is possible with the help of Nullable Value
types.
* Misc formatting
* Manual optimizations
PrintGuestLog
PrintGuestStackTrace
Surfaceflinger DequeueBuffer
* Reduce SendVibrationXX log level to Debug
* Add Notice log level
This level is always enabled and used to print system info, etc...
Also, rewrite LogColor to switch expression as colors are static
* Unify unhandled exception event handlers
* Print enabled LogLevels during init
* Re-add App Exit disposes in proper order
nit: switch case spacing
* Revert PrintGuestStackTrace to Info logs due to #1407
PrintGuestStackTrace is now called in some critical error handlers
so revert to old behavior as KThread isn't part of Guest.
* Batch replace Logger statements
* Implement Modding Support
* Executables: Rewrite to use contiguous mem and Spans
* Reorder ExeFs, Npdm, ControlData and SaveData calls
After discussion with gdkchan, it was decided it's best to call
LoadExeFs after all other loads are done as it starts the guest process.
* Build RomFs manually instead of Layering FS
Layered FS approach has considerable latency when building the final
romfs. So, we manually replace files in a single romfs instance.
* Add RomFs modding via storage file
* Fix and cleanup MemPatch
* Add dynamically loaded NRO patching
* Support exefs file replacement
* Rewrite ModLoader to use mods-search architecture
* Disable PPTC when exefs patches are detected
Disable PPTC on exefs replacements too
* Rewrite ModLoader, again
* Increased maintainability and matches Atmosphere closely
* Creates base mods structure if it doesn't exist
* Add Exefs partition replacement
* IPSwitch: Fix nsobid parsing
* Move mod logs to new LogClass
* Allow custom suffixes to title dirs again
* Address nits
* Add a per-App "Open Mods Directory" context menu item
Creates the path if not present.
* Normalize tooltips verbiage
* Use LocalStorage and remove unused namespaces
* Fix compilation warnings and use new LibHac APIs for executable loading
* Migrate NSO loader to the new reader and fix kip loader
* Fix CS0162 restore
* Remove extra return lines
* Address Moose's comment
* Initial rebased AddOnContent support
* Fix bounds calculation
* Use existing GameCard in VFS per Xpl0itR's suggestion
+ Add dummy IPurchaseEventManager per AcK's suggestion
* Support multiple containers
* Add option to selectively disable addons
* Import tickets from AOC FS
* Load all nsps in base directory automatically
* Revert LoadNsp renaming
Removes conflicts with Mods PR. Not much is lost, old names were fine.
* Address AcK's comments
* Address Thog's comments
Dispose opened nsp files
Fix potential bug by clearing metadata on load
* Delete DelegateTypes.cs
* Delete DelegateCache.cs
* Add files via upload
* Update Horizon.cs
* Update Program.cs
* Update MainWindow.cs
* Update Aot.cs
* Update RelocEntry.cs
* Update Translator.cs
* Update MemoryManager.cs
* Update InstEmitMemoryHelper.cs
* Update Delegates.cs
* Nit.
* Nit.
* Nit.
* 10 fewer MSIL bytes for us
* Add comment. Nits.
* Update Translator.cs
* Update Aot.cs
* Nits.
* Opt..
* Opt..
* Opt..
* Opt..
* Allow to change compression level.
* Update MemoryManager.cs
* Update Translator.cs
* Manage corner cases during the save phase. Nits.
* Update Aot.cs
* Translator response tweak for Aot disabled. Nit.
* Nit.
* Nits.
* Create DelegateHelpers.cs
* Update Delegates.cs
* Nit.
* Nit.
* Nits.
* Fix due to #784.
* Fixes due to #757 & #841.
* Fix due to #846.
* Fix due to #847.
* Use MethodInfo for managed method calls.
Use IR methods instead of managed methods about Max/Min (S/U).
Follow-ups & Nits.
* Add missing exception messages.
Reintroduce slow path for Fmov_Vi.
Implement slow path for Fmov_Si.
* Switch to the new folder structure.
Nits.
* Impl. index-based relocation information. Impl. cache file version field.
* Nit.
* Address gdkchan comments.
Mainly:
- fixed cache file corruption issue on exit; - exposed a way to disable AOT on the GUI.
* Address AcK77 comment.
* Address Thealexbarney, jduncanator & emmauss comments.
Header magic, CpuId (FI) & Aot -> Ptc.
* Adaptation to the new application reloading system.
Improvements to the call system of managed methods.
Follow-ups.
Nits.
* Get the same boot times as on master when PTC is disabled.
* Profiled Aot.
* A32 support (#897).
* #975 support (1 of 2).
* #975 support (2 of 2).
* Rebase fix & nits.
* Some fixes and nits (still one bug left).
* One fix & nits.
* Tests fix (by gdk) & nits.
* Support translations not only in high quality and rejit.
Nits.
* Added possibility to skip translations and continue execution, using `ESC` key.
* Update SettingsWindow.cs
* Update GLRenderer.cs
* Update Ptc.cs
* Disabled Profiled PTC by default as requested in the past by gdk.
* Fix rejit bug. Increased number of parallel translations. Add stack unwinding stuffs support (1 of 2).
Nits.
* Add stack unwinding stuffs support (2 of 2). Tuned number of parallel translations.
* Restored the ability to assemble jumps with 8-bit offset when Profiled PTC is disabled or during profiling.
Modifications due to rebase.
Nits.
* Limited profiling of the functions to be translated to the addresses belonging to the range of static objects only.
* Nits.
* Nits.
* Update Delegates.cs
* Nit.
* Update InstEmitSimdArithmetic.cs
* Address riperiperi comments.
* Fixed the issue of unjustifiably longer boot times at the second boot than at the first boot, measured at the same time or reference point and with the same number of translated functions.
* Implemented a simple redundant load/save mechanism.
Halved the value of Decoder.MaxInstsPerFunction more appropriate for the current performance of the Translator.
Replaced by Logger.PrintError to Logger.PrintDebug in TexturePool.cs about the supposed invalid texture format to avoid the spawn of the log.
Nits.
* Nit.
Improved Logger.PrintError in TexturePool.cs to avoid log spawn.
Added missing code for FZ handling (in output) for fp max/min instructions (slow paths).
* Add configuration migration for PTC
Co-authored-by: Thog <me@thog.eu>