Commit graph

598 commits

Author SHA1 Message Date
svc64
0c57663ea3 Add comments on debug stuff & fix warnings 2024-08-24 17:53:09 +03:00
svc64
65d7a16a87 Debugger refactor 2024-08-24 17:53:09 +03:00
svc64
81c399ec3e Better locking in debug methods 2024-08-24 17:53:09 +03:00
svc64
40584e0e45 HvExecutionContext: fix DebugPc 2024-08-24 17:53:09 +03:00
svc64
ac438d6572 KThread based debug
This commit starts a big refactor to the original debugger PR by merryhime. The debugger now interfaces with KThreads instead of the ExecutionContext.

The corresponding KThread debug functions properly suspend/resume the thread and call the underlying debug related function in the ExecutionContext.

I also added debugging support to the AppleHV ExecutionContext.
2024-08-24 17:53:09 +03:00
svc64
841aa89581 Return the address of the current instruction in EmitSynchronization 2024-08-24 17:53:09 +03:00
svc64
fc361f82a7 Don't recreate the GDB server socket 2024-08-24 17:53:09 +03:00
svc64
917a292256 Initialize the debugger before HOS 2024-08-24 17:53:09 +03:00
merry
5583a60ace stepping is less screwed up now 2024-08-24 17:53:09 +03:00
merry
8bd4417b24 Implement qThreadExtraInfo 2024-08-24 17:53:09 +03:00
svc64
7e4944cc88 Make DebugState public and remove AppleHV's DebugState 2024-08-24 17:53:09 +03:00
merry
5a34d80f98 Restart socket when able 2024-08-24 17:53:09 +03:00
merry
1cef40131a Support vectors in write registers
# Conflicts:
#	src/Ryujinx.HLE/Debugger/Debugger.cs
2024-08-24 17:53:09 +03:00
merry
a9538a54ff cleanup 2024-08-24 17:53:09 +03:00
merry
3bdf9d9805 Implement binary data escaping 2024-08-24 17:53:09 +03:00
merry
09a63ba2b5 Notify debugger on BRK instruction
# Conflicts:
#	src/Ryujinx.HLE/Debugger/Debugger.cs
#	src/Ryujinx.HLE/Debugger/Message/ThreadBreakMessage.cs
#	src/Ryujinx.HLE/HOS/Kernel/Process/KProcess.cs
2024-08-24 17:53:09 +03:00
svc64
9b9137bf0a Log GDB server exceptions 2024-08-24 17:53:09 +03:00
svc64
a366890cb5 Fix spacing 2024-08-24 17:53:09 +03:00
svc64
a6cbb89996 Don't store ThreadUid in the shadow context and/or vcpu 2024-08-24 17:53:09 +03:00
svc64
d0fbcced57 Put ThreadUid in the execution context classes 2024-08-24 17:53:09 +03:00
merry
54bf7507d7 Call InvalidateCacheRegion
# Conflicts:
#	Ryujinx.HLE/HOS/ArmProcessContext.cs
#	src/Ryujinx.HLE/Debugger/Debugger.cs
#	src/Ryujinx.HLE/Debugger/IDebuggableProcess.cs
#	src/Ryujinx.HLE/HOS/Horizon.cs
#	src/Ryujinx.HLE/HOS/Kernel/Process/KProcess.cs
2024-08-24 17:53:09 +03:00
merry
1b9753d42a Debugger: Fixups from testing with GDB
# Conflicts:
#	src/Ryujinx.HLE/Debugger/Debugger.cs
2024-08-24 17:53:09 +03:00
merry
a1de4f1b5b Debugger: Do more stuff
# Conflicts:
#	src/Ryujinx.HLE/Debugger/Debugger.cs
#	src/Ryujinx.HLE/Debugger/GdbXml/aarch64-core.xml
#	src/Ryujinx.HLE/Debugger/GdbXml/aarch64-fpu.xml
#	src/Ryujinx.HLE/Debugger/GdbXml/target.xml
#	src/Ryujinx.HLE/Debugger/RegisterInformation.cs
2024-08-24 17:53:09 +03:00
merry
1bb8f6381c Debugger: Add replies for qGDBServerVersion, qHostInfo, qProcessInfo, qfThreadInfo, qsThreadInfo 2024-08-24 17:53:09 +03:00
merry
deccf05e60 SDL2: Add GDB stub options to SDL2 frontend
# Conflicts:
#	src/Ryujinx.Headless.SDL2/Program.cs
2024-08-24 17:53:09 +03:00
merry
6edc00ec9c Debugger: Initial implementation
# Conflicts:
#	src/Ryujinx.HLE/Debugger/Debugger.cs
#	src/Ryujinx.HLE/Debugger/GdbSignal.cs
#	src/Ryujinx.HLE/Debugger/Message/AbortMessage.cs
#	src/Ryujinx.HLE/Debugger/Message/BreakInMessage.cs
#	src/Ryujinx.HLE/Debugger/Message/CommandMessage.cs
#	src/Ryujinx.HLE/Debugger/Message/IMessage.cs
#	src/Ryujinx.HLE/Debugger/Message/SendNackMessage.cs
#	src/Ryujinx.HLE/Debugger/StringStream.cs
#	src/Ryujinx.HLE/Switch.cs
2024-08-24 17:53:09 +03:00
merry
2a17f1314d Configuration: Add GDB stub related configuration
# Conflicts:
#	Ryujinx/Configuration/ConfigurationState.cs
#	src/Ryujinx.HLE/HLEConfiguration.cs
#	src/Ryujinx.Ui.Common/Configuration/ConfigurationFileFormat.cs
#	src/Ryujinx/Ui/MainWindow.cs
#	src/Ryujinx/Ui/Windows/SettingsWindow.cs
#	src/Ryujinx/Ui/Windows/SettingsWindow.glade
2024-08-24 17:53:09 +03:00
merry
20bdea45fa Logging: Add GdbStub LogClass
# Conflicts:
#	src/Ryujinx.Common/Logging/LogClass.cs
2024-08-24 17:53:09 +03:00
merry
569d01823e ARMeilleure: Add debuggable CPU loop
# Conflicts:
#	src/ARMeilleure/Optimizations.cs
#	src/ARMeilleure/Translation/ArmEmitterContext.cs
2024-08-24 17:53:09 +03:00
merry
39a3ba8329 IDebuggableProcess: Create and expose interface to enable implementation of debugging tools
# Conflicts:
#	src/ARMeilleure/State/DebugState.cs
#	src/ARMeilleure/State/ExecutionContext.cs
TODO: Fix comments. I also tried implementing AppleHV primitives here (it's actually broken).
2024-08-24 17:53:09 +03:00
gdkchan
460f9faf4e
Fix NRE when using buffer image array (#7159) 2024-08-21 00:49:17 +01:00
Tsubasa0504
0137c9e635
nim:eca : Stub CreateServerInterface2 (#7128)
* Add files via upload

* Add files via upload

* Update src/Ryujinx.HLE/HOS/Services/Nim/IShopServiceAccessServerInterface.cs

---------

Co-authored-by: Ac_K <Acoustik666@gmail.com>
2024-08-17 09:57:22 +01:00
Logan Stromberg
23fa5f4c9c
Fix arbitrary game ordering when sorting by Favorites (#7170)
* Fix arbitrary sorting by "Favorite" in the UI by making it the same as sorting alphabetically while giving favorites priority.

* Use a more engineered solution rather than string hacks.

* Address code style warnings. Add null checking. Make title name comparison case insensitive.

* one more style fix

---------

Co-authored-by: Logan Stromberg <lostromb@microsoft.com>
2024-08-13 15:23:11 +02:00
gdkchan
4f75e26ec7
Clamp amount of mipmap levels to max allowed for all backends (#7197)
* Clamp amount of mipmap levels to max allowed for all backends

* XML docs

* Remove using
2024-08-12 17:45:25 -03:00
gdkchan
8d8983049e
Implement UQADD16, UQADD8, UQSUB16, UQSUB8, VQRDMULH, VSLI and VSWP Arm32 instructions (#7174) 2024-08-08 17:07:24 -03:00
jhorv
7969fb6bba
Replace and remove obsolete ByteMemoryPool type (#7155)
* refactor: replace usage of ByteMemoryPool with MemoryOwner<byte>

* refactor: delete unused ByteMemoryPool and ByteMemoryPool.ByteMemoryPoolBuffer types

* refactor: change IMemoryOwner<byte> return types to MemoryOwner<byte>

* fix(perf): get span via `MemoryOwner<T>.Span` directly instead of `MemoryOwner<T>.Memory.Span`

* fix(perf): get span via MemoryOwner<T>.Span directly instead of `MemoryOwner<T>.Memory.Span`

* fix(perf): get span via MemoryOwner<T>.Span directly instead of `MemoryOwner<T>.Memory.Span`
2024-08-05 21:09:08 -03:00
gdkchan
4a4b11871e
Fix same textures with unmapped start being considered different (#7141)
* Fix same textures with unmapped start being considered different

* Consolidate IsInvalid check

* InvalidAddress const

* Fix typo

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

---------

Co-authored-by: riperiperi <rhy3756547@hotmail.com>
2024-08-05 11:00:41 -03:00
Julien Lebosquain
e85ee673b1
Fix LocaleExtension SetRawSource usages + language perf improvement (#7121)
* Avoid Avalonia CompiledBindingPathBuilder.SetRawSource

* Improve UI language change performance
2024-08-04 19:04:12 +01:00
Isaac Marovitz
42f22fe5d7
Infra: Update Microsoft.IdentityModel.JsonWebTokens (#7070)
* Update Microsoft.IdentityModel.JsonWebTokens

* Update
2024-08-04 18:56:27 +01:00
TSRBerry
263eb97f79
Avoid race conditions while launching games directly from the command line (#7116)
* optimization: Load application metadata only for applications with IDs

* Load applications when necessary

This prevents loading applications when launching an application
directly from the command line (or a shortcut).
Instead, applications will be loaded after the emulation was stopped by the user.

* Show the title in the configured language when launching an application

* Rename DesiredTitleLanguage to DesiredLanguage
2024-08-03 22:31:34 +01:00
jhorv
59ddb26628
replace ByteMemoryPool usage in Ryujinx.Graphics (#7129)
* chore: replace `ByteMemoryPool` usage with `MemoryOwner<byte>`

* refactor: `PixelConverter.ConvertR4G4ToR4G4B4A4()` - rename old `outputSpan` to `outputSpanUInt16`, reuse same output `Span<byte>` as newly-freed name `outputSpan`

* eliminate temporary buffer allocations

* chore, perf: use MemoryOwner<byte> instead of IMemoryOwner<byte>
2024-08-03 19:50:53 +01:00
TSRBerry
83fda10f6e
Fix FileNotFoundException in TryGetApplicationsFromFile() and improve loading applications (#7145)
* Don't load files from hidden subdirectories

* Catch FileNotFoundException in TryGetApplicationsFromFile()

* Skip non-existent files and bad symlinks when loading applications
2024-08-03 19:46:59 +02:00
gdkchan
d97e995e59
Fix off-by-one on audio renderer PerformanceManager.GetNextEntry (#7139) 2024-07-31 22:22:11 -03:00
gdkchan
56b2f84702
Fix shader RegisterUsage pass only taking first operation dest into account (#7131)
* Fix shader RegisterUsage pass only taking first operation dest into account

* Shader cache version bump
2024-07-30 21:57:55 -03:00
riperiperi
698e36bbd2
Vulkan: Force topology to PatchList for Tessellation (#7102)
Vulkan spec states that input topology should always be PatchList when a tessellation pipeline is present. The AMD GPU on windows crashes so hard it BSODs the machine if this isn't the case, so it's forced here just in case.

I'm not sure what providing a different topology here would even do, as you'd think it would always be a patch list input.
2024-07-30 21:48:30 -03:00
Isaac Marovitz
6ce49a2dc7
Ava UI: Handle updates containing non numeric characters (#7043)
* Handle updates containing non numeric characters

Smh

Dont be stupid

* Use Berry’s method

* Thanks gdk

* Remove using
2024-07-25 16:44:33 -03:00
riperiperi
ccd330ba0f
Vulkan: Add missing barriers for texture to buffer copy (#7092)
This barrier has always been missing, but it only became apparent when #7012 merged.

I also added some barriers in case the target buffer used here is used by other commands, though right now it isn't.

Fixes a regression where water would turn white on AMD GPUs with the proprietary driver. May fix other issues on this driver.
2024-07-25 16:34:30 -03:00
gdkchan
95d252b7b8
Update kernel GetInfo SVC for firmware 18.0.0 (#7075)
* Implement kernel GetInfo AliasRegionExtraSize

* Implement IsSvcPermitted

* Remove warning supressions that are no longer needed

* Remove useless cast
2024-07-22 12:46:04 -03:00
TSRBerry
add681144b
Fix checking for the wrong metadata files for applications launched with a different program index (#7055)
* Fix checking for the wrong update metadata file

* Apply the same fix for dlc.json

* Use the base application ids for updates and DLCs in the GUI too

This shouldn't actually change anything, since the program index part of the application id
should always be 0 for all applications currently seen by the GUI.

This was just done for completeness.
2024-07-21 14:42:23 -03:00
TSRBerry
c6dc00815a
Make sure TryGetApplicationsFromFile() doesn't throw exceptions anymore (#7046)
* Add docstrings for exceptions to methods near TryGetApplicationsFromFile()

* Make sure TryGetApplicationsFromFile() doesn't throw exceptions anymore

* Add missing filePath to ApplicationData when loading applications from ExeFS

* Fix typo

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

---------

Co-authored-by: riperiperi <rhy3756547@hotmail.com>
2024-07-20 16:35:43 -03:00