Commit Graph

3977 Commits

Author SHA1 Message Date
mitaclaw 88dadf81d4 FileUtil: Fix BranchWatch User Path
I mistakenly put `D_DUMP_IDX` here instead of `D_DUMPDEBUG_IDX`.
2024-03-29 11:05:45 -07:00
Admiral H. Curtiss b510ac89a3
Merge pull request #12355 from fuzziqersoftware/tapserver-modem-adapter
Implement tapserver-based modem adapter
2024-03-22 02:47:06 +01:00
iwubcode 146504d635 Common: add json utility functions 'ReadStringFromJson' and 'ReadBoolFromJson' to match 'ReadNumericFromJson' functionality for other data types, similarly support other data types for 'ToJsonArray' 2024-03-20 17:34:25 -05:00
iwubcode 69694494ce Common: update 'ReadNumericOrDefault' to 'ReadNumericFromJson' and have it return an optional, this provides the caller with more flexibility 2024-03-20 17:34:25 -05:00
Martin Michelsen 083116a89c rewrite tapserver interface for better error handling 2024-03-17 18:37:55 -07:00
mitaclaw 8134c8a572 BranchWatchDialog: A Total Replacement for CodeDiffDialog
With a purpose-built Branch Watch feature built into the emulated system: BranchWatchDialog, replacing CodeDiffDialog, is now better than ever!
2024-02-27 11:40:58 -08:00
Mai 27415b0ba1
Merge pull request #12587 from AdmiralCurtiss/localtime
Core: Fix crash when inspecting a savestate with a timestamp that causes localtime() to error out
2024-02-18 17:12:29 -05:00
iwubcode edbf8f1772 Common: add json utility functions for Vec3 serialization 2024-02-17 22:06:06 -06:00
Admiral H. Curtiss 52410813f2
Common: Add utility function that wraps localtime_s() or localtime_t(). 2024-02-18 04:40:25 +01:00
Peter Lafreniere 3da2e15e6b IOFile: avoid clearing errors on null file struct
When performing a default compilation with recent GCC & glibc,
the use of -Werror=nonnull causes a build error.

The error is given as IOFile::ClearError() can call std::clearerr()
with a null file, which can trigger a null-pointer dereference in libc.

Change the std::clearerr() call to be conditional on a file being open.
2024-02-11 20:55:31 -05:00
JosJuice b5c5371848 Arm64Emitter: Don't optimize ADD to MOV for SP
Unlike ADD (immediate), MOV (register) treats SP as ZR. Therefore the
ADDI2R optimization that was added in 67791d227c can't optimize ADD to
MOV when exactly one of the registers is SP.

There currently isn't any code in Dolphin that calls ADDI2R with
parameters that would trigger this case.
2024-02-06 21:58:07 +01:00
Lioncash 16d8b6e6b3 Common/HookableEvent: std::move callback instance in Register()
Potentially avoids reallocations if the capture buffer of the callback
is quite large.
2024-01-31 13:16:50 -05:00
iwubcode b37f096f4b Common: add determinant functions to Matrix33 and Matrix44 2024-01-24 23:02:57 -06:00
iwubcode b5a6225e1a VideoCommon: add function to serialize ShaderAsset to json 2024-01-23 11:58:32 -06:00
Admiral H. Curtiss 043d868841
Merge pull request #12473 from Dentomologist/bitset64_fix_iterator_incrementation
BitSet64: Fix iterator incrementation
2024-01-01 22:03:11 +01:00
Dentomologist 7dbf463ddf BitSet64: Fix iterator incrementation
Use 1 of the same type as the stored value when shifting left. This
prevents undefined behavior caused by shifting an int more than 31 bits.

Previously iterator incrementation could either hang or prematurely
report it had reached the end of the bitset.
2024-01-01 00:41:48 -08:00
Dentomologist abb484a101 BitSet: Use direct initialization instead of c-style casts 2024-01-01 00:36:13 -08:00
Admiral H. Curtiss 4f04ac5858
Common/StringUtil: Use internal linkage for codepage conversion functions. 2023-12-29 19:50:55 +01:00
JosJuice 0c7359e150 Common: Fix encoding handling in GetWin32ErrorString
These messages can be localized, so we can't just assume it's all ASCII.
2023-12-29 16:01:13 +01:00
Mai b1438c224f
Merge pull request #12439 from lioncash/sprintf
Core: Use fmt over sprintf in trivial cases
2023-12-21 17:17:21 -05:00
JosJuice d8c78f2a92 JitArm64: Fix the "do nothing" cases of ANDI2R and friends
So somehow I forgot that AArch64 uses three-operand encoding...

Fixes a regression from 6303416201 which manifested in various ways,
such as incorrect rendering of the Wind Waker title screen.
2023-12-21 20:51:32 +01:00
Lioncache affe928987 Common/TraversalServer: Make use of fmt more
We can convert printf and fprintf over to the use of fmt as well,
given that we've converted the sprintf calls over.
2023-12-18 13:08:57 -05:00
Lioncache dc85194fac Common/TraversalServer: Make use of fmt over sprintf where applicable
Resolves some deprecation warnings on macOS. This is better anyway, given fmt
has generic type formatting.
2023-12-18 13:08:57 -05:00
JosJuice dc60bc5f1e JitArm64: Improve codegen in ANDI2R and friends
The codegen for the functions themselves, not for the emitted code.

This seems to save 32 bytes per function. We also get rid of the oddity
we had before where ANDI2R would do masking for 32-bit operations but
the other functions wouldn't.
2023-12-17 18:13:32 +01:00
JosJuice a8e1e1ae48 JitArm64: Optimize additional cases of ANDI2R and friends
Now we'll never need a scratch register for values that are all zeroes
or all ones.
2023-12-17 18:13:32 +01:00
JosJuice 6303416201 JitArm64: Optimize ANDI2R and friends to no-ops when possible
This optimizes rlwnmx with mask == 0xFFFFFFFF.
2023-12-17 18:13:30 +01:00
Tilka 773ffd04b8
Merge pull request #11497 from vyuuui/debugger_assembler_ui
Built-in assembler for debugger interface
2023-12-16 21:15:31 +00:00
Admiral H. Curtiss 190c4e8cda
Merge pull request #12427 from JosJuice/jitarm64-msr-updated-logical-imm
JitArm64: Fix MSRUpdated(ARM64Reg) with FEATURE_FLAG_PERFMON set
2023-12-16 17:22:23 +01:00
JosJuice e0eb4ef5bc JitArm64: Use enum class for LogicalImm size parameter
This should prevent issues like the one fixed in the previous commit
from happening again.
2023-12-16 16:48:26 +01:00
Lioncash dbc792a3ec Common/Crypto/SHA1: Resolve -Wignored-attributes warnings
See commit 417d1310d22b11d5d724625721b5fec09eda099a for an explanation
on why we do this.
2023-12-13 13:04:53 -05:00
Lioncash bced5fac18 Common/Crypto/AES: Resolve -Wignored-attributes warnings
The alias for __m128i is typically something like:

typedef long long __m128i __attribute__((__vector_size__(16), __may_alias__));

and the part that ends up not getting preserved is the __may_alias__
attribute specifier.

So, in order to preserve that, we can just use a wrapper struct, so the
data type itself isn't being passed through the template.
2023-12-13 13:02:51 -05:00
vyuuui 38c15df464 Parser and Assembler implementations 2023-12-13 05:32:20 -08:00
Lioncash 50e4dc5dba Watches: Make use of std::erase_if 2023-12-12 13:24:40 -05:00
Admiral H. Curtiss 2c6bf2d224
Merge pull request #12394 from lioncash/compare
General: Resolve -Wsign-compare warnings
2023-12-12 03:43:12 +01:00
Lioncash f97316a1e6 TraversalClient: Resolve -Wsign-compare warning 2023-12-11 18:01:29 -05:00
Lioncash 88a973131c Common/SettingsHandler: Use std::string_view more
We don't need to enforce the use of std::string instances with
AddSetting(). We can accept views and only construct one string,
rather than three temporaries.
2023-12-11 07:54:43 -05:00
Lioncash 04b9f6c28d Common/SettingsHandler: Use std::erase in Decrypt()
Same behavior, way less verbose code.
2023-12-11 07:49:43 -05:00
Admiral H. Curtiss 3364d571cc
Common/MemArenaWin: Rewrite LazyMemoryRegion to manually map memory blocks into the large memory region as needed.
Internal details: The large region is split into individual same-sized blocks of memory. On creation, we allocate a single block of memory that will always remain zero, and map that into the entire memory region. Then, the first time any of these blocks is written to, we swap the mapped zero block out with a newly allocated block of memory. On clear, we swap back to the zero block and deallocate the data blocks. That way we only actually allocate one zero block as well as a handful of real data blocks where the JitCache actually writes to.
2023-12-09 21:11:31 +01:00
Admiral H. Curtiss eb235d6ee3
Common/MemArenaWin: Move the advanced Windows memory function address initialization into its own struct and function so it can be reused. 2023-12-09 20:58:07 +01:00
Admiral H. Curtiss 85f4a460f9
Merge pull request #12184 from noahpistilli/kd-mail-send
IOS/KD: Implement Send Mail
2023-12-02 17:15:56 +01:00
JosJuice 67791d227c JitArm64: Add special zero case to ADDI2R
This normally doesn't reduce the instruction count, but is nonetheless
useful on CPUs that can do 0-cycle moves.
2023-12-01 21:31:11 +01:00
JosJuice 25ffb0dbfc JitArm64: Mask input to 32-bit ADDI2R
In case the input was a s32 that got sign extended as part of conversion
to u64.
2023-12-01 21:26:37 +01:00
Sketch 0d908a83e7
Common/HTTP: Implement Multiform 2023-12-01 19:52:21 +01:00
Mai d85cb749c0
Merge pull request #11382 from skyfloogle/traversal-fix-2
Traversal: Use low TTL for probe packet
2023-11-30 18:03:50 -05:00
JosJuice 255ee3fdce JitArm64: Use LSL+CLS for classifying floats
This is a little trick I came up with that lets us restructure our float
classification code so we can exit earlier when the float is normal,
which is the case more often than not.

First we shift left by 1 to get rid of the sign bit, and then we count
the number of leading sign bits. If the result is less than 10 (for
doubles) or 7 (for floats), the float is normal. This is because, if the
float isn't normal, the exponent is either all zeroes or all ones.
2023-11-28 18:30:45 +01:00
Zopolis4 481bc76d8e
Remove redundant 32-bit code 2023-11-28 23:03:26 +11:00
Zopolis4 f0d2ce4683
Remove _M_X86 in favour of _M_X86_64 2023-11-28 23:03:20 +11:00
JosJuice be1e103435 Remove references to Debugger.ini
This file was only used by DolphinWX. DolphinQt uses Qt.ini instead.
2023-11-27 21:38:43 +01:00
Admiral H. Curtiss 76d605639b
Merge pull request #11881 from JosJuice/aarch64-function-call
JitArm64: Add utility for calling a function with arguments
2023-11-25 17:30:42 +01:00
Sepalani 91020ac4fa BBA/HLE: Fix random PCAP file corruption
Concurrency between RecvHandlePacket and SendFromDirectFIFO
2023-11-23 22:07:44 +04:00