Admiral H. Curtiss
616d57e7fc
Common/FileUtil: Add Copy() function as a wrapper around std::filesystem::copy().
2023-02-24 20:32:18 +01:00
Shawn Hoffman
2c2fb869a2
use std-provided randomness for JitArm64 unittests
...
decreases runtime significantly and lessens dependency on mbedtls
2023-02-22 12:55:12 -08:00
Admiral H. Curtiss
e52aa52a66
Common/FileUtil: Rename Copy() to CopyRegularFile().
...
This is to clarify that it can only copy files, not folders.
2023-02-22 11:43:58 +01:00
Markus Wick
b381df700c
Merge pull request #11577 from JosJuice/android-armeabi-v7a
...
Android: Fix armeabi-v7a build
2023-02-17 17:57:38 +01:00
JosJuice
90b676d368
Android: Fix armeabi-v7a build
...
This very much isn't a build configuration that we're going to ship,
but I want to be able to tell people that they can build it on their
own if they really want to see how terribly it performs :)
Just like before, you'll need to edit two lines in app/build.gradle to
define ENABLE_GENERIC=ON and actually enable armeabi-v7a if you want an
armeabi-v7a build. This commit just fixes some compilations errors that
crop up if you do so.
2023-02-17 16:58:24 +01:00
Pokechu22
8802f96b7e
Fix uninitialized variable warnings (C26495)
2023-02-15 19:18:39 -08:00
Admiral H. Curtiss
0758e00cfe
Common/FileUtil: Revert behavior of CreateFullPath().
...
This was accidentally changed in 7e6436db34
.
2023-02-15 02:21:50 +01:00
Admiral H. Curtiss
5f929d00eb
Merge pull request #11560 from phire/EventHook_construct_on_first_use
...
HookableEvent: Switch to construct on first use
2023-02-14 01:01:03 +01:00
Admiral H. Curtiss
8f91cb62e6
Merge pull request #11426 from shuffle2/stdfs
...
fileutil: use std::filesystem
2023-02-14 00:50:34 +01:00
Scott Mansell
05181f6b88
HookableEvent: Switch to construct on first use
...
A registration might happen during static initialization, which opens
us up to issues with ordering of static initialization.
2023-02-13 18:48:43 +13:00
JosJuice
7cecb28bdf
DolphinQt: Properly lock CPU before accessing emulated memory
...
This fixes a problem I was having where using frame advance with the
debugger open would frequently cause panic alerts about invalid addresses
due to the CPU thread changing MSR.DR while the host thread was trying
to access memory.
To aid in tracking down all the places where we weren't properly locking
the CPU, I've created a new type (in Core.h) that you have to pass as a
reference or pointer to functions that require running as the CPU thread.
2023-02-12 11:27:50 +01:00
Admiral H. Curtiss
2f6e7d497d
ENetUtil: Add check for valid socket in SendPacket().
2023-02-10 19:32:40 +01:00
JMC47
258151fe5a
Merge pull request #11523 from degasus/OGL_KHR_subgroup
...
VideoBackend/OGL: Prefer KHR_shader_subgroup over NV_shader_thread.
2023-02-10 04:47:20 -05:00
Pokechu22
49a84cbc4c
Resolve various "no previous declaration" warnings
2023-02-09 16:23:01 -08:00
Markus Wick
17d7b75a9b
Merge pull request #11544 from jmallach/spng
...
Allow building against system libspng
2023-02-09 14:47:58 +01:00
degasus
4b2aa948e6
VideoBackend/OGL: Prefer KHR_subgroup over NV_shader_thread.
...
While the NV extension is totally fine, the KHR extension should be able to support more hardware.
For NVIDIA, the hardware either supports both or neither, it just needs a driver from the last two years.
For AMD, the drivers from late 2022-12 seems to bring support for the KHR extension.
For Intel, the KHR is also supported for some years.
2023-02-09 13:27:02 +01:00
Scott Mansell
aaad0cd39f
Merge pull request #11539 from phire/improve_workqueuethread
...
Various WorkQueueThread improvements
2023-02-09 20:00:04 +13:00
Scott Mansell
ccf92a3e56
Merge pull request #11522 from phire/KillRendererWithFire
...
Kill Renderer (with phire)
2023-02-09 19:59:16 +13:00
Scott Mansell
59a4b026f6
Better documentation for HookableEvent.
2023-02-09 18:36:20 +13:00
Scott Mansell
8c8bd0e7ac
Rename to HookableEvent. Because naming conflict
2023-02-09 18:36:20 +13:00
Scott Mansell
60f2b5af7b
Apply suggestions from code review
...
Co-authored-by: Mai <mathew1800@gmail.com>
Co-authored-by: BhaaL <bhaalsen@gmail.com>
Co-authored-by: iwubcode <iwubcode@users.noreply.github.com>
2023-02-09 18:36:20 +13:00
Scott Mansell
43b6a49012
Apply suggestions from code review
...
Co-authored-by: Mai <mathew1800@gmail.com>
2023-02-09 18:36:20 +13:00
Scott Mansell
31cfe8250d
Lint fixes
2023-02-09 18:36:20 +13:00
Jordi Mallach
4d164fcb77
Allow building against system libspng
2023-02-06 13:30:46 +01:00
Scott Mansell
2ff155f742
Optimise cond_var predicate order
...
m_items.empty() is by far the most likely reason for a notification.
2023-02-05 17:20:00 +13:00
Scott Mansell
271ffde71d
Prevent WaitForCompletion shutdown deadlock.
...
Adjust shutdown order to prevent potential deadlocks
when one thread calls Shutdown, and another calls WaitForCompletion.
2023-02-05 17:17:16 +13:00
Scott Mansell
9c012b09b3
Address review feedback
2023-02-05 16:52:53 +13:00
Scott Mansell
7c4fcc30a3
WorkQueueThread: provide name and function at same time
2023-02-04 15:56:27 +13:00
Scott Mansell
6594532f10
WorkQueueThread: rework Cancel/Shutdown workflow
...
- Cancel doesn't shut down anymore.
Allowing it to be used multiple times thoughout the life of
the WorkQueue
- Remove Clear, so we only have Cancel semantics
- Add IsCancelling so work items can abort early if cancelling
- Replace m_cancelled and m_thread.joinable() guars with m_shutdown.
- Rename Flush to WaitForCompletion (As it's ambiguous if a function
called flush should be blocking or not)
- Add documentation
2023-02-04 14:58:12 +13:00
Scott Mansell
acdb0c5be1
WorkQueueThread: Implement thread name
...
Otherwise we will end up with a dozen threads named "WorkQueueThread"
2023-02-04 14:58:12 +13:00
Robin Kertels
94a0c50bf8
WorkQueueThread: Rework without Flags/Events
2023-02-04 14:31:16 +13:00
Robin Kertels
9affbfe683
WorkQueueThread: Implement proper Flush
...
and rename the existing Flush to FlushOne.
2023-02-04 14:31:16 +13:00
Robin Kertels
9badcc6eb8
WorkQueueThread: Add Push
2023-02-04 14:31:16 +13:00
Scott Mansell
512273a507
WorkQueueThread: Add flush capability
2023-02-04 14:31:16 +13:00
OatmealDome
7240290382
CommonPaths: Add Steam-specific user directory
2023-01-31 17:57:09 -05:00
OatmealDome
59a44bea50
CommonPaths: Split platform-specific definitions for user directories into two blocks
2023-01-31 17:57:09 -05:00
OatmealDome
af33d4f13f
CommonPaths: Split PORTABLE_USER_DIR into "portable" and "embedded" to accomodate macOS
2023-01-31 17:57:09 -05:00
OatmealDome
7f962a4146
UICommon: Use NORMAL_USER_DIR for Windows
2023-01-31 17:57:09 -05:00
OatmealDome
5e3d77adae
CommonPaths: Rename DOLPHIN_DATA_DIR to NORMAL_USER_DIR
2023-01-31 17:57:08 -05:00
OatmealDome
846eef2a05
CommonPaths: Rename USERDATA_DIR to PORTABLE_USER_DIR
2023-01-31 17:57:08 -05:00
Scott Mansell
854a73dee0
CMake/MSVC: Fix PCH disabled build
2023-01-31 23:21:07 +13:00
Scott Mansell
154cb4f722
Introduce an Event system to VideoCommon
...
A lot of the remaining complexity in Renderer is the massive Swap function
which tries to handle a bunch of FrameBegin/FrameEnd events.
Rather than create a new place for it. This event system will try
to distribute it all over the place
2023-01-31 19:41:24 +13:00
Lioncash
cdd3e636e1
Common/Network: Resolve -Wexpansion-to-defined warning
...
Macros that expand to include the standard define macro are undefined.
This is pretty trivial to fix. We can just do the test and then define
the name itself if it's true, rather than making the set of definition
checks the macro itself.
2023-01-30 14:20:56 -05:00
MayImilae
37859ec1da
Cleanup: Remove CDUtils
...
This is a cleaning followup for #11456 .
2023-01-28 03:50:57 -08:00
Admiral H. Curtiss
bbdfb4bc14
CodeTrace: Avoid ppcState global.
2023-01-27 15:22:45 +01:00
Admiral H. Curtiss
be8d0b76ca
PowerPC: Remove PC macro.
2023-01-27 15:22:41 +01:00
Lioncash
0d93a31a38
Common/BitSet: Zero initialize data member
...
Gets rid of the need to remember to initialize them in the constructor,
except when overriding the default initializer.
2023-01-25 04:16:30 -05:00
Lioncash
6446fa7e48
Common/Bitset: Make initializer_list constructor constexpr
...
This was able to be constexpr since C++14.
2023-01-25 04:13:05 -05:00
Lioncash
1d03835c5d
StringUtil: Make StringUTF8CodePointCount take string_view
...
There's nothing really about this that would need to constrain it to
only std::string instances.
2023-01-24 16:55:43 -05:00
Lioncash
e5b91f00b0
Common: Replace StringBeginsWith/StringEndsWith with std equivalents
...
Obsoletes these functions in favor of the standard member functions
added in C++20.
2023-01-24 14:58:20 -05:00
Shawn Hoffman
a184d70193
convert File::ScanDirectoryTree to std::filesystem
2023-01-24 05:15:11 -08:00
Shawn Hoffman
7e6436db34
fileutil: use std::filesystem
2023-01-24 04:51:24 -08:00
Pierre Bourdon
caca662dbf
Merge pull request #10994 from shuffle2/fs
...
get rid of HAS_STD_FILESYSTEM
2023-01-24 12:18:25 +01:00
Pierre Bourdon
8d477c65c9
Merge pull request #11458 from shuffle2/winuver
...
windows: prefer os version from registry
2023-01-23 15:53:41 +01:00
Shawn Hoffman
c338f9e2a1
windows: replace comdef dependency with winrt
2023-01-23 06:09:01 -08:00
Shawn Hoffman
dff7f20f9d
windows: prefer os version from registry
...
this value is not modified by compatibility mode
drop reporting service pack numbers. no longer used
2023-01-17 01:38:00 -08:00
Shawn Hoffman
d51e4e5236
get rid of HAS_STD_FILESYSTEM
...
just use std::filesystem
2023-01-10 05:17:43 -08:00
Admiral H. Curtiss
653e0ccf28
Merge pull request #11365 from iwubcode/cheat_manager_freeze_value
...
DolphinQt: add ability to lock / freeze values in the watches window
2023-01-09 18:41:28 +01:00
Admiral H. Curtiss
7b04a6b958
Merge pull request #11089 from sepalani/pcap-share
...
NetworkCaptureLogger: Allow PCAP shared read access on Windows
2023-01-05 04:06:35 +01:00
JosJuice
e0fba20f1f
Merge pull request #11360 from shuffle2/vs
...
msvc: remove workaround for arm64 sha1 compiler bug
2022-12-24 22:55:47 +01:00
Sam Belliveau
673f81c18a
New FrameTime/VBlank Analyzer + Graph
2022-12-23 19:52:53 -05:00
iwubcode
8f3e8e4ca3
Core: add locked state to watches
2022-12-23 11:59:23 -06:00
iwubcode
2f2f906bf5
Core: add ability to add memory patches to the patch engine that will be executed each frame
2022-12-23 03:13:03 -06:00
iwubcode
4743d74985
Core: add helper function to apply a memory patch and mark the 'PPCPatches' as final
2022-12-23 03:13:03 -06:00
Shawn Hoffman
9dcae0b1c3
msvc: remove workaround for arm64 sha1 compiler bug
2022-12-22 00:44:29 -08:00
Minty-Meeo
05bebee802
Replace BitUtils with C++20: Counting Zeroes
...
With the upgrade to C++20, std::countl_zero and std::countr_zero can replace these home-spun implementations from the BitUtil.h library.
2022-12-21 04:17:00 -06:00
JosJuice
547d956278
Common: Use C++20 <bit> header in BitSet.h
2022-12-18 16:51:32 +01:00
JosJuice
454537d53e
Replace BitUtils with C++20: RotateLeft/RotateRight
...
Now that we've flipped the C++20 switch, let's start making use of
the nice new <bit> header.
I'm planning on handling this move away from BitUtils.h incrementally
in a series of PRs. There may be a few functions remaining in
BitUtils.h by the end that C++20 doesn't have any equivalents for.
2022-12-11 08:59:18 +01:00
JosJuice
b5b8871bce
Arm64Emitter: Fix SHRN/SHRN2
...
The "vector shift by immediate" category encodes the shift amount for
right shifts as `size - amount`, whereas left shifts use `amount`.
We're not actually using SHRN/SHRN2 anywhere, which is why this has gone
undetected.
2022-12-10 11:20:23 +01:00
JosJuice
06e60ac327
JitArm64: Implement accurate NaNs
...
For quite some time now, we've had a setting on x86-64 that makes Dolphin
handle NaNs in a more accurate but slower way. There's only one game that
cares about this, Dragon Ball: Revenge of King Piccolo, and what that game
cares about more specifically is that the default NaN (or "generated NaN"
as I believe it's called in PowerPC documentation) is the same as on
PowerPC. On ARM, the default NaN is the same as on PowerPC, so for the
longest time we didn't need to do anything special to get Dragon Ball:
Revenge of King Piccolo working. However, in 93e636a
I changed how we
handle FMA instructions in a way that resulted in the sign of NaNs
becoming inverted for nmadd/nmsub instructions, breaking the game.
To fix this, let's implement the AccurateNaNs setting, like on x86-64.
2022-12-03 19:41:32 +01:00
Mai
5f22a0054f
Merge pull request #11305 from JosJuice/jitarm64-optimize-ps-merge
...
JitArm64: Optimize ps_mergeXX
2022-11-29 12:57:10 +00:00
JosJuice
f45d3a6a2c
JitArm64: Optimize ps_mergeXX
...
1. In some cases, ps_merge01 can be implemented using one instruction.
2. When we need two instructions for ps_merge01, it's best to start with
a MOV to avoid false dependencies on the destination register.
3. ps_merge10 can be implemented using a single EXT instruction.
2022-11-26 18:14:58 +01:00
Admiral H. Curtiss
0a6fdb9c13
HW: Pass System to MMIO handlers.
2022-11-23 05:52:21 +01:00
Mai
e573a0bbc2
Merge pull request #11294 from JosJuice/jitarm64-movpage2r
...
Arm64Emitter: Add MOVPage2R utility function
2022-11-23 04:41:31 +00:00
Admiral H. Curtiss
86d01c3399
Config: Add option to use JPN as the Japanese region directory in GetDirectoryForRegion().
...
See https://bugs.dolphin-emu.org/issues/13076 for motivation for this.
2022-11-22 17:53:19 +01:00
JosJuice
d64c3dc267
Arm64Emitter: Add MOVPage2R utility function
...
This new function is like MOVP2R, except it masks out the lower 12 bits,
returning them instead of writing them to the register. These lower
12 bits can then be used as an offset for LDR/STR. This lets us turn
ADRP+ADD+LDR sequences with a zero offset into ADRP+LDR sequences with
a non-zero offset, saving one instruction.
2022-11-21 23:24:06 +01:00
Léo Lam
f1c9774159
Merge pull request #11240 from noahpistilli/es_v1_ticket
...
IOS/ES: Add support for V1Ticket
2022-11-18 00:25:47 +01:00
Sketch
2fd9852ca8
IOS/ES: Add support for V1Ticket
2022-11-17 17:54:06 -05:00
Admiral H. Curtiss
09c0321997
Merge pull request #11184 from Lobsterzelda/save-all-nand-files-to-save-state
...
HostFileSystem: Set all NAND folders to be saved in save states
2022-11-15 03:42:26 +01:00
Admiral H. Curtiss
b6503d7585
Merge pull request #11018 from Dentomologist/add_updater_error_messages
...
Add updater error messages
2022-11-15 01:08:55 +01:00
Lobsterzelda
ed54e1905a
HostFileSystem: Set all NAND folders to be saved in save states when a movie is active
2022-11-10 14:02:29 -05:00
Admiral H. Curtiss
431301add3
Merge pull request #10771 from TryTwo/PR_AutoStep
...
Debugger: Implement base code tracing logic. and feature to auto-step through code.
2022-11-04 23:32:54 +01:00
Bram Speeckaert
ae6ce1df48
Arm64Emitter: Add ArithOption with ExtendSpecifier
...
ARM64 can do perform various types of sign and zero extension on a
register value before using it. The Arm64Emitter already had support for
this, but it was kinda hidden away.
This commit exposes the functionality by making the ExtendSpecifier enum
available everywhere and adding a new ArithOption constructor.
2022-11-01 12:15:56 +01:00
Dentomologist
2808db7f2f
FileUtil: Return success bool from CopyDir
2022-10-31 23:33:02 -07:00
JMC47
969309c457
Merge pull request #11220 from shuffle2/macversion
...
MacUpdater: check os version
2022-10-30 15:19:55 -04:00
Shawn Hoffman
089886a6f8
MacUpdater: check os version
2022-10-30 12:04:57 -07:00
Shawn Hoffman
836bc74b2d
windows: Rename: use std::filesystem::rename for posix behavior
2022-10-29 19:57:26 -07:00
JoshuaMK
e2f4400f49
Make SetPatch responsible for overwriting old patches
2022-10-26 22:46:49 -05:00
JoshuaMK
2594447c25
Have UnsetPatch only unset the argument address
2022-10-23 18:42:34 -05:00
JoshuaMK
e10b3308c2
Fix patch corruption using find_if instead of remove_if
2022-10-23 18:41:15 -05:00
JosJuice
4dbf0b8e90
JitArm64: Reimplement Force25BitPrecision
...
The previous implementation of Force25BitPrecision was essentially a
translation of the x86-64 implementation. It worked, but we can make a
more efficient implementation by using an AArch64 instruction I don't
believe x86-64 has an equivalent of: URSHR. The latency is the same as
before, but the instruction count and register count are both reduced.
2022-10-22 10:03:52 +02:00
Markus Wick
bba38a3642
Merge pull request #11182 from JosJuice/aarch64-emit-shift-imm
...
Arm64Emitter: Combine immh and immb for Emit(Scalar)ShiftImm
2022-10-22 09:23:06 +02:00
JMC47
00e23da607
Merge pull request #11051 from shuffle2/update-vcredist
...
WinUpdater: Check OS and VC++ Redist versions
2022-10-21 13:55:51 -04:00
JosJuice
84375a91d9
Arm64Emitter: Combine immh and immb for Emit(Scalar)ShiftImm
...
This simplifies the callers of EmitShiftImm and EmitScalarShiftImm.
2022-10-19 20:20:39 +02:00
Admiral H. Curtiss
b1725dfb33
Zero-initialize structures passed to FatFs functions.
2022-10-16 17:12:04 +02:00
Admiral H. Curtiss
c0476fdac3
Merge pull request #11072 from SketchMaster2001/wiiconnect24
...
Add initial WiiConnect24 support
2022-10-16 04:31:28 +02:00
SketchMaster2001
e413d7f5ec
Add initial WiiConnect24 support
2022-10-16 04:19:36 +02:00
Jordan Woyak
6eb1f8beba
Common/Matrix: Fix Quaternion Norm function.
2022-10-10 21:16:35 -05:00
Admiral H. Curtiss
bfbc04ef5e
ENetUtil: Check return values of ENet functions in SendPacket().
2022-10-09 02:39:38 +02:00
Admiral H. Curtiss
66684a392f
Deduplicate NetPlayServer::Send() and NetPlayClient::Send() into ENetUtil::SendPacket().
2022-10-09 02:25:28 +02:00
TryTwo
fb79c04cf1
MemoryView auto updateDebugger. Implement base codetrace logic. Add register breakpoints. Add CodeViewWidget autostepping to track a value.Debugger
2022-10-06 22:17:22 -07:00
Pokechu22
e8221d7948
Common/PointerWrap: Remove DoPOD
...
This was added in 385d8e2b15
, but became somewhat redundant with Do in 4c7bbd96e4
, and completely redundant now that std::is_trivially_copyable_v is well-supported.
2022-10-06 11:25:36 -07:00
Admiral H. Curtiss
79efd5df1e
Common/WorkQueueThread: Make Shutdown() public, so users can wait for all currently queued tasks to finish when shutting down the thread.
2022-10-01 23:58:52 +02:00
Sepalani
481ddd1308
NetworkCaptureLogger: Allow PCAP shared read access on Windows
2022-09-29 23:08:25 +04:00
Mai
e3e6c3dfa4
Merge pull request #11088 from JosJuice/uicommon-set-enable-alert
...
Move a SetEnableAlert call to UICommon
2022-09-29 09:09:29 -04:00
Mai
6805c9dd0d
Merge pull request #11108 from AdmiralCurtiss/fat-fs-callbacks
...
FatFsUtil: Add ability to provide callbacks for the FatFs code.
2022-09-29 09:08:12 -04:00
Admiral H. Curtiss
3182d9178c
FatFsUtil: Add ability to provide callbacks for the FatFs code.
2022-09-29 05:16:21 +02:00
Pokechu22
67ed4fa92d
Common/Image: Add unit to log message
2022-09-26 15:04:15 -07:00
JosJuice
04072f0ce6
Integrate "Ignore for this session" better with config system
...
Because of the previous commit, this is needed to stop DolphinQt from
forgetting that the user pressed ignore whenever any part of the config
is changed.
This commit also changes the behavior a bit on DolphinQt: "Ignore for
this session" now applies to the current emulation session instead of
the current Dolphin launch. This matches how it already worked on
Android, and is in my opinion better because it means the user won't
lose out on important panic alerts in a game becase they played another
game first that had repeated panic alerts that they wanted to ignore.
For Android, this commit isn't necessary, but it makes the code cleaner.
2022-09-24 13:03:45 +02:00
Admiral H. Curtiss
70485472b1
Common/Matrix: Add equality operators to TVec2/3/4.
2022-09-24 01:38:01 +02:00
Admiral H. Curtiss
9860b68b9c
Common: Add [[nodiscard]] to GetStringT().
2022-09-23 14:58:18 +02:00
Shawn Hoffman
717c36bc43
WinUpdater: Check OS and VC++ Redist versions.
2022-09-20 15:57:50 -07:00
Pokechu22
a34d5e5960
Arm64Emitter: Add additional alignment assertions
...
Before, unaligned values would be silently ignored in most cases.
2022-09-18 23:33:24 -07:00
Pokechu22
ec1ed64832
EnumMap: Fix typo
2022-08-28 22:38:35 -07:00
Sepalani
7202cf2650
BBA/BuiltIn: Add SSDP multicast support
2022-08-24 21:29:57 +04:00
Sepalani
e783a7f409
Common/Network: Add StrNetworkError helper function
2022-08-24 21:05:18 +04:00
Admiral H. Curtiss
e5cfa286bd
Merge pull request #10960 from shuffle2/mz
...
ResourcePack: dont scan for individual files
2022-08-24 17:11:21 +02:00
Admiral H. Curtiss
a7d358a97b
Merge pull request #11003 from sepalani/decode-error
...
Move SocketManager's DecodeError to Common
2022-08-24 17:01:07 +02:00
Pokechu22
0cced44142
Use `__VA_OPT__(, ) __VA_ARGS__` instead of `##__VA_ARGS__`
...
Per https://en.cppreference.com/w/cpp/preprocessor/replace#.23_and_.23.23_operators the `##` behavior is a nonstandard extension; this extension seems to be supported by all compilers we care about, but IntelliSense in visual studio doesn't correctly handle it, resulting in false errors in the IDE (but not when compiling).
Per https://en.cppreference.com/w/cpp/preprocessor/replace#Function-like_macros C++20 introduced a workaround, where `__VA_OPT__(, )` generates a comma if and only if `__VA_ARGS__` is non-empty.
This PR replaces all occurrences, with the exception of Externals, DSPSpy (which is not likely to be edited in MSVC and does not target C++20 currently), and JitArm64_Integer.cpp (which uses `Function(__VA_ARGS__)`, and thus does not ever need a comma).
2022-08-23 12:09:57 -07:00
Sepalani
597fb9ff6d
Move SocketManager's DecodeError to Common
...
Fix thread safety issue
2022-08-22 14:02:26 +04:00
TellowKrinkle
235b67707f
Common:X64ABI: Work around clang-format being dumb
2022-08-11 23:57:28 -05:00
TellowKrinkle
f2a074f4f8
Common:X64ABI: Make proper stack frames
2022-08-10 23:48:56 -05:00
Mai
e9e2c741a2
Merge pull request #10953 from JosJuice/aarch64-add-encoding
...
Arm64Emitter: Fix encoding of size for ADD (vector)
2022-08-09 18:13:50 -04:00
Shawn Hoffman
6e94c20abd
add TODO for chrono in GetLocalTimeSinceJan1970
2022-08-06 22:25:30 -07:00
Shawn Hoffman
292724b228
Revert "msvc: use std::chrono for GetLocalTimeSinceJan1970"
...
This reverts commit 86da6c98fb
.
2022-08-06 22:22:14 -07:00
Shawn Hoffman
9bb8315441
ResourcePack: dont scan for individual files
...
walking the zip prevents minizip from re-reading the same
data repeatedly from the actual backing filesystem.
also improves most usages of minizip to allow for >4GB,
files altho we probably don't need it
2022-08-06 15:38:46 -07:00
Tilka
3595c8b295
Merge pull request #10952 from JosJuice/bitutils-remove-unused
...
Common: Remove unused stuff from BitUtils.h
2022-08-05 21:08:02 +01:00
JosJuice
52661dcc76
Arm64Emitter: Fix encoding of size for ADD (vector)
...
This was causing a bug in the rounding of paired single multiplication
operands. If Force25BitPrecision was called for quad registers, the
element size of its ADD instruction would get treated as if it was 16
instead of the intended 64, which would cause the result of the
calculation to be incorrect if the carry had to pass a 16-bit boundary.
Fixes one of the two bugs reported in
https://bugs.dolphin-emu.org/issues/12998 .
2022-08-05 21:49:28 +02:00
JosJuice
c00008e3cd
Common: Remove unused stuff from BitUtils.h
2022-08-05 17:54:51 +02:00
JosJuice
939fa1ed1c
Merge pull request #10941 from shuffle2/crypto-cleanup
...
Crypto cleanup
2022-08-05 12:12:34 +02:00
Mai
f59f1a2a35
Merge pull request #10740 from Tilka/cxx20
...
Move to C++20 for non-MSVC compilers
2022-08-04 09:31:31 -04:00
Mai
a8b2174ce6
Merge pull request #10872 from shuffle2/timer
...
Timer improvements
2022-08-03 14:30:29 -04:00
Shawn Hoffman
bf5076eb01
crypto/sha1: add real workaround for msvc/arm64 bad codegen
2022-08-02 23:05:45 -07:00
Shawn Hoffman
78142e30cc
crypto/sha1: simplify enablement of sha insns on non-msvc
2022-08-02 23:05:07 -07:00
Shawn Hoffman
4e6aa28da4
crypto/aes: silence warning on godforsaken android gcc
2022-08-02 23:03:51 -07:00
Shawn Hoffman
fec61f89a3
Timer: protect usages of ms timers from rollover
2022-08-02 22:24:06 -07:00
Shawn Hoffman
86da6c98fb
msvc: use std::chrono for GetLocalTimeSinceJan1970
2022-08-02 22:24:06 -07:00
Shawn Hoffman
b473c35873
windows: mark as HighQoS, ensure timer resolution is honored
2022-08-02 22:24:06 -07:00
Shawn Hoffman
3384b1385e
move "double time" code into State from Timer
...
Ideally the statesave format could be changed
to just store a u64 in the future
2022-08-02 22:24:06 -07:00
Shawn Hoffman
09089eeee0
Common::Timer: use chrono::steady_clock internally
2022-08-02 22:24:06 -07:00
Shawn Hoffman
8d16971a6f
LogManager: use own timestamp function
2022-08-02 22:24:05 -07:00
Shawn Hoffman
d71797154a
VolumeVerifier: enable fast hash functions by default
...
sets defaults based on cpu support.
2022-08-02 22:23:49 -07:00
Tilka
7d2d5d914b
Merge pull request #10903 from shuffle2/hash-reorg
...
Common/Hash: use zlib-ng for adler32. small cleanups.
2022-08-02 18:29:04 +01:00
Shawn Hoffman
17c554c165
Common/Hash: use zlib-ng for adler32. small cleanups.
2022-08-01 10:07:27 -07:00
Shawn Hoffman
46ad8b9d68
Implement hw accelerated AES
2022-08-01 10:00:42 -07:00
Tillmann Karras
d033d92b05
Move to C++20 for non-MSVC compilers
2022-07-30 23:35:53 +01:00
Shawn Hoffman
97ff757a74
SHA1/arm64: fix casting warning on certain gcc
2022-07-30 12:06:21 -07:00
Admiral H. Curtiss
a9d9f5c0da
Merge pull request #10899 from shuffle2/sha1
...
add hw-accelerated SHA1
2022-07-30 14:11:37 +02:00
Shawn Hoffman
25462f4a3c
SavePNG: make sure to finalize image file
2022-07-28 10:12:36 -07:00
Shawn Hoffman
8939210d8a
Common/Crypto/SHA1: implement accelerated versions
2022-07-27 01:07:48 -07:00
Shawn Hoffman
dd29a54cf6
introduce wrapper for SHA1 functionality
2022-07-26 22:16:37 -07:00
Josh
7e75bcd36f
Use Dynamic last Log Type
2022-07-27 00:07:53 +02:00
Admiral H. Curtiss
a9edf129e3
Merge pull request #10889 from shuffle2/spng
...
replace libpng with libspng
2022-07-26 12:53:04 +02:00
Admiral H. Curtiss
6b419c7ca3
Merge pull request #10876 from shuffle2/cpudetect
...
CPUDetect: improve win/arm64 support
2022-07-26 12:52:50 +02:00
Shawn Hoffman
76b4318b88
CPUDetect: improve win/arm64 support
...
read brand_string on macos/arm64
remove unused flags
report family/model info instead of vendor name
2022-07-25 21:21:11 -07:00
Shawn Hoffman
f92541fbd9
StripSpaces: only strip spaces
...
StripWhitespace maintains old behavior
2022-07-25 18:40:12 -07:00
Shawn Hoffman
acb10f0006
replace libpng with libspng
2022-07-25 18:32:16 -07:00
Shawn Hoffman
0a15d2fcec
cubeb: fix logged source file paths
2022-07-18 09:52:54 -07:00
Admiral H. Curtiss
2d8d3358c4
FatFsUtil: Skip past entries with invalid filenames.
2022-07-11 23:11:42 +02:00
Admiral H. Curtiss
de9c9f2281
FatFsUtil: Improve error handling and error reporting.
2022-07-11 23:11:42 +02:00
Admiral H. Curtiss
f40eeebcf0
FatFsUtil: Add some path traversal attack protection when unpacking.
2022-07-11 23:11:42 +02:00
Admiral H. Curtiss
a621fdf857
Core: In deterministic mode, build SD cards with a consistent filename order and dummy timestamps.
2022-07-11 23:11:41 +02:00
Admiral H. Curtiss
a5b1bfef68
Common: Change default path for Wii SD cards to not be inside the Wii NAND.
2022-07-11 23:11:41 +02:00
Admiral H. Curtiss
77d4591fb4
Core: If configured, sync SD card image with SD card folder on emulation start and end.
...
Co-authored-by: Pablo Stebler <pablo@stebler.xyz>
2022-07-11 23:11:41 +02:00
Admiral H. Curtiss
b66cc1caf6
Config and UICommon: Add config option and user path for Wii SD card sync folder.
2022-07-11 23:11:40 +02:00
Admiral H. Curtiss
96751c4457
Treewide: Rename references to SD Card image path to clarify they mean the image file, not the folder.
2022-07-11 23:11:40 +02:00
Admiral H. Curtiss
fdc327c252
Externals/FatFs: Build as part of Dolphin.
...
Co-authored-by: Pablo Stebler <pablo@stebler.xyz>
2022-07-11 23:11:37 +02:00
Admiral H. Curtiss
32523f155b
Merge pull request #10825 from Rudolchr/fix_build_with_libfmt-9
...
MsgHandler: Add a check for libfmt version to fix build with libfmt-9
2022-07-11 23:02:08 +02:00
Admiral H. Curtiss
20059776d9
Merge pull request #10831 from sepalani/BBA-cleanup
...
Common/Network+BBA/Builtin: Cleanup
2022-07-11 23:00:21 +02:00
TellowKrinkle
3d34a20105
Common: Fix CountTrailingZeros for weird compilers
2022-07-10 17:35:47 -05:00
JMC47
38cb76dea5
Merge pull request #10807 from merryhime/LogicalImm
...
Arm64Emitter: Simplify LogicalImm logic
2022-07-10 17:27:47 -04:00
Merry
0d947ed6fe
Arm64Emitter: Simplify LogicalImm further
...
h/t @dougallj
2022-07-10 22:17:09 +01:00
Merry
20ccc38f0f
BitUtils: Implement CountTrailingZeros
2022-07-10 22:17:09 +01:00
Sepalani
b950d038b9
Common/Network: Update IP checksum since total_len might have changed
2022-07-10 20:56:07 +04:00
Sepalani
5fdf255a2d
Common/Network: Make Build() methods const
2022-07-10 20:12:07 +04:00
Sepalani
d902b04ae0
Common/Network: Remove unused offset variables
2022-07-10 14:11:50 +04:00
Sepalani
b206f98261
Common/Network: Remove unnecessary size checks
2022-07-10 14:04:03 +04:00
Sepalani
6238834c05
Common/Network: Add InsertObj helper
2022-07-10 13:56:33 +04:00
Sepalani
4efe1e7ca7
Common/Network: Ensure offsetof is valid
2022-07-10 12:48:12 +04:00
Sepalani
b7bd2a4001
Common/Network: Use member initializer list
2022-07-10 12:31:59 +04:00
Sepalani
13957a627c
Common/Network: Remove unused constructors
2022-07-10 11:42:58 +04:00
Admiral H. Curtiss
5a7759e359
Merge pull request #10690 from schthack/BBA-tapless
...
BBA: Added BuiltIn device that allow BBA emulation without the need o…
2022-07-09 23:20:53 +02:00
schthack
087020b23a
Refactoring of the code to match dolphin style
...
Changed access for offsetof + some clean up
2022-07-09 17:01:22 -04:00
Christopher Rudolph
66f330e573
Add a check for libfmt version so that in case libfmt-9 is used the function is_compile_string is called under it's new namespace
2022-07-09 17:02:09 +02:00
Merry
3092f40e9f
Arm64Emitter: Simplify LogicalImm logic
...
Heavily simplify logical immediate encoding.
This is based on the observation that if a valid repeating element
exists, it repeats through `value`. Thus it does not matter which
one you analyse. Thus we skip over the least significent element
if LSB = 1 by masking it out with `inverse_mask_from_trailing_ones`,
to avoid the degenerate case of a stretch of 1 bits going 'round
the end' of the word.
2022-07-07 22:53:36 +01:00
OatmealDome
c6eb5e2623
FileUtil: Only attempt to write to the destination in Copy if there is actually content to write
2022-07-05 15:13:20 -04:00
schthack
01ada3850f
BBA: Added BuiltIn device that allow BBA emulation without the need of a TapDevice Configuration include a dns server setting
2022-07-02 18:02:50 -04:00
JosJuice
07a15a3228
Merge pull request #10624 from Minty-Meeo/resolve-gcc-warnings
...
Resolve Linux GCC Warnings
2022-07-02 09:17:44 +02:00
JMC47
b5f4b0dffe
Merge pull request #10803 from Zopolis4/clangingaround
...
Resolve additional warnings generated by clang
2022-07-02 03:12:34 -04:00
Minty-Meeo
69e32dea52
Resolve GCC Warnings
2022-06-30 15:26:48 -05:00
JMC47
5d04e1e1de
Merge pull request #10518 from iwubcode/draw-mod
...
Introducing a 'GraphicsMod' system for creators
2022-06-28 13:35:39 -04:00
JMC47
e50e45f400
Merge pull request #10700 from sepalani/ssl-handshake
...
Socket: Fix some non-blocking connect edge cases
2022-06-27 21:39:36 -04:00
iwubcode
3857e1fa66
Core: add GraphicsMod directory
2022-06-26 21:53:21 -05:00
Zopolis4
5d2290ba3c
Removed unused variable MAX_MSGLEN in LogManager.cpp
2022-06-24 14:57:03 +10:00
Shawn Hoffman
29ddd0e6f0
windows: detect and warn if running x64 dolphin on arm64
2022-06-22 15:33:12 -07:00
JMC47
9315ac7071
Merge pull request #10587 from AdmiralCurtiss/memcard-path-unify
...
Raw Memory Card Path handling unification and consistency fixes.
2022-06-13 20:18:36 -04:00
Tillmann Karras
59dfc43949
Common: replace std::aligned_storage_t with alignas
...
C++23 deprecates std::aligned_storage_t while alignas works since C++11.
This fixes issue 12925.
2022-06-13 00:06:19 +01:00
Sepalani
cbadc6e81a
NetworkCaptureLogger: Move ErrorState struct to Common/Network
2022-06-08 19:06:42 +04:00
JMC47
daf8e3ddde
Merge pull request #10462 from OatmealDome/steam-runtime
...
DolphinQt: Add support for a Steam Runtime build
2022-06-06 20:18:06 -04:00
Tillmann Karras
79a7bf02eb
CMake: rename minizip to minizip-ng
...
minizip-ng is the new name used by the upstream project as well as all
distros other than Fedora (but it looks like it will be renamed there).
2022-06-06 14:21:43 +02:00
Admiral H. Curtiss
b1d1f2aa06
Common/StringUtil: Add convenience function for converting paths to use forward slashes on Windows.
2022-06-05 21:24:45 +02:00
Mai M
84944625df
Merge pull request #10714 from OatmealDome/macos-mojave-bump
...
BuildMacOSUniversalBinary: Bump minimum macOS to 10.14
2022-06-02 20:20:52 -04:00
OatmealDome
1cb3058abe
MemoryUtil: Remove __builtin_available for macOS 10.14
2022-06-01 22:57:56 -04:00
Dentomologist
e0c9ae16b9
FileUtil: Refactor CreateSysDirectoryPath()
2022-05-31 16:18:08 -07:00
Dentomologist
c2be78079c
FileUtil: Remove GetSysDirectory log spam
...
Create and log path the first time GetSysDirectory is called, then just
return the path on future calls.
2022-05-31 16:18:08 -07:00
Dentomologist
4d563ce4d1
Android: Ensure File::s_android_sys_directory is set only once
2022-05-31 16:18:08 -07:00
OatmealDome
e679502a5d
GLX: Guard against redefinition of PFNGLXSWAPINTERVALEXTPROC
...
This type is already declared in glxext.h in the Steam Runtime.
2022-05-29 13:50:32 -04:00
Dentomologist
c8e20c569b
Convert PointerWrap::Mode to enum class
2022-05-25 13:16:46 -07:00
Dentomologist
f6b9acccfc
Common: Refactor PointerWrap
2022-05-25 13:06:41 -07:00
Admiral H. Curtiss
f68c3b758e
Common/Network: Use std::array in IPv4Header.
2022-05-23 02:01:59 +02:00
JMC47
3a3357444e
Merge pull request #8067 from endrift/hsp
...
Preliminary HSP support
2022-05-22 13:42:27 -04:00
Vicki Pfau
6a26b0ce8a
HW: Initial HSP implementation with ARAM expansion
2022-05-21 17:05:49 -07:00
Admiral H. Curtiss
580c721c82
cmake: Don't use PCH with Qt6.
2022-05-22 01:19:44 +02:00
Scott Mansell
876f6651b4
cmake: fix PCH to work with msvc/ninja
...
Ninja puts way more effort into compiling targets in parallel, and
ignores dependenceis until link time.
So we need to jump though hoops to force ninja to compile
pch.cpp before any targets which depend on the PCH.
2022-05-22 00:29:47 +02:00
Scott Mansell
0909e00117
cmake: fix MSVC PCH support
...
I'm not sure if the previous implementation ever worked.
2022-05-22 00:29:47 +02:00
Scott Mansell
987f270083
cmake: fix buggy target sources on windows
...
I have no idea why cmake supports PUBLIC on target_sources,
but it does. It causes all targets that depend on this target
to try and include the files in their sources.
Except it doesn't take paths into account, so it breaks. Mabye
it would work if you used an abolute source? But I'm not sure
there is a sane usecase.
2022-05-22 00:29:46 +02:00
Pokechu22
5f9212dd84
Common/LogManager: Remove old printf-style logging functions
2022-05-19 12:41:58 -07:00
Shawn Hoffman
fa17153ebc
fmt: use make_format_args instead of make_args_checked
...
make_args_checked is deprecated
see https://github.com/fmtlib/fmt/pull/2760 and the linked comment
2022-05-10 19:25:48 -07:00
Tilka
ac643825ce
Merge pull request #10628 from Minty-Meeo/force_inline-minor-change
...
Change _WIN32 check to a _MSC_VER check in Inline.h
2022-05-03 23:07:40 +01:00
Minty-Meeo
9c22205ab1
Change _WIN32 check to a _MSC_VER check in Inline.h
...
This is compiler dependent, not OS dependent.
2022-05-02 01:57:36 -05:00
Shawn Hoffman
2808909a97
msbuild: simplify lang/scm projects a bit
2022-04-27 15:06:04 -07:00
Admiral H. Curtiss
ef760ee012
Common/PointerWrap: Prevent reads/writes past the end of the buffer.
2022-04-18 23:48:00 +02:00
Admiral H. Curtiss
853cf4f818
Common/PointerWrap: Hide internals.
2022-04-18 03:41:14 +02:00
Admiral H. Curtiss
0a4805c0b9
Merge pull request #10582 from AdmiralCurtiss/fmt-float
...
Common/StringUtil: Use simpler formatting for floats and doubles.
2022-04-16 03:42:55 +02:00
Admiral H. Curtiss
5c687fc2a3
Common/StringUtil: Use simpler formatting for floats and doubles.
2022-04-12 23:35:19 +02:00
Shawn Hoffman
ef8e461ca2
windows: buildfix if pch not used
2022-04-12 12:28:57 -07:00
Admiral H. Curtiss
36134abd0e
Common/LogManager: Add generic printf-style log function that takes a va_list instead of va_args.
2022-04-09 01:41:40 +02:00
Admiral H. Curtiss
23508cafb2
Merge pull request #7675 from TryTwo/Debugger_Code_Features
...
Debugger: Get target memory in load/store instructions
2022-04-08 05:28:22 +02:00
TryTwo
53cf78d413
Gekko constistancy changes. Add context item to codeview to show or copy a load/store target memory address from instructions at or near PC when paused.
2022-03-17 12:53:38 -07:00
Léo Lam
bf261f6144
Merge pull request #10493 from jordan-woyak/netplay-show-traversal-external-port
...
NetPlayDialog: Display external IP/Port as seen by the traversal server.
2022-03-15 16:03:28 +01:00
Léo Lam
da6f86f381
Merge pull request #10496 from JosJuice/mappingcommon-split
...
Move parts of MappingCommon out of DolphinQt
2022-03-15 15:54:04 +01:00
Jordan Woyak
c058c8e1a6
NetPlayDialog: Display external IP/Port as seen by the traversal server when it's used.
2022-03-15 01:56:16 -05:00
Pokechu22
0f3832dec6
Common/FileUtil: Change logging to debug level
...
These messages hid other, more important, ones often. I have left AttemptMaxTimesWithExponentialDelay and GetSysDirectory/SetSysDirectory as info, since those are called infrequently and can be useful to the end-user.
2022-03-08 14:07:37 -08:00
JosJuice
1bc057614e
Move parts of MappingCommon out of DolphinQt
...
Some of the functions in MappingCommon would be useful to use on
mobile in the future.
2022-03-06 14:30:49 +01:00
JosJuice
5446daaef9
Common: Make DynamicLibrary non-copyable
...
The default implementations of DynamicLibrary's copy and move
constructors and assignment operators are unsafe.
2022-03-05 23:40:41 +01:00
Léo Lam
bcc14d32b8
Merge pull request #10482 from Dentomologist/remove_redundant_statement
...
FileUtil: Remove redundant statement
2022-03-02 12:27:21 +01:00
JMC47
ea116fbbdf
Merge pull request #9834 from AdmiralCurtiss/fastmem-reserve-region-linux
...
MemArena: Keep fastmem memory region mapped on Linux to ensure nothing allocates within the fastmem space.
2022-02-28 12:46:34 -05:00
Dentomologist
01bd5e15ba
FileUtil: Remove redundant statement
2022-02-25 21:16:07 -08:00
JosJuice
128fa8aec3
Merge pull request #10388 from Dentomologist/android-fix-unused-variable-warning
...
[Android] Fix unused variable warning
2022-02-20 18:56:50 +01:00
JosJuice
35b436bd6b
Merge pull request #10377 from Pokechu22/warning-fixes-jan-2022
...
Fix several compile warnings on GCC
2022-02-18 21:05:42 +01:00
Merry
be81fe86e1
JitRegister: Use fmt
...
Prefer fmt to printf-style formatting.
2022-02-16 20:09:38 +00:00
Admiral H. Curtiss
ffbe6cb21f
MemArena: Keep fastmem region mapped on Linux.
2022-02-14 22:14:41 +01:00
Admiral H. Curtiss
4a9553bf6d
MemArena: Load UnmapViewOfFileEx dynamically to restore Windows 7 support.
2022-02-14 21:57:18 +01:00
Admiral H. Curtiss
3a4de2b306
MemArena: Use Common::DynamicLibrary for m_api_ms_win_core_memory_l1_1_6_handle.
2022-02-14 21:57:15 +01:00
Pokechu22
15f80f7234
MathUtil: Mark lo in SaturatingCast as [[maybe_unused]]
...
It's unused in the case that T is unsigned and dest is signed (e.g. SaturatingCast<int, size_t> which appears SetIsoPaths in MainSettings.cpp)
2022-02-13 14:38:59 -08:00
JosJuice
989bdb8d6d
Common/CodeBlock: Call ResetCodePtr when decreasing region_size
...
Fixes https://bugs.dolphin-emu.org/issues/12827 .
A description of what was going wrong:
JitArm64::Init first calls CodeBlock::AllocCodeSpace, after which
CodeBlock and Arm64Emitter consider us to have 96 MB of code space
available. JitArm64::Init then calls AddChildCodeSpace, which is
supposed to take 64 MiB of that space and give it to m_far_code.
CodeBlock's view of how much space there is gets updated from 96 MiB
to 32 MiB, but due to the missing call, Arm64Emitter keeps thinking
that it has 96 MiB of space available.
The last thing JitArm64::Init does is to call ResetFreeMemoryRanges.
This function asks Arm64Emitter how much code space is available and
stores a range of that size in m_free_ranges_near, meaning that
m_free_ranges_near ends up being backed by both nearcode and farcode!
This is a ticking time bomb; as soon as we grab memory from
m_free_ranges_near which is backed by farcode, we're in trouble.
The crash I ran into in my testing was caused by fastmem code being
allocated in farcode (our backpatch handler only handles accesses made
from nearcode), but you may as well get errors caused by code intended
for nearcode overwriting code intended for farcode or vice versa.
So why did NBA Live 2005 crash when most games had no problems,
and why was the bug bisected to the commit that increased the size
of far code from 16 MiB to 64 MiB? Well, as long as we're only
using the first 32 MiB of the big 96 MiB range, everything works.
What happens with NBA Live 2005 (I have not investigated exactly
through what mechanism this happens) is that at some point the range
in m_free_ranges_near gets split into two ranges, one which is
backed by nearcode and one which is backed by farcode. Dolphin
prefers to select the biggest range available (we don't want to
pick a tiny 1 KiB range that may not be able to fit the whole block
we're about to emit, after all), and after increasing the size of
farcode to 64 MiB, farcode is bigger than nearcode.
2022-02-12 17:51:32 +01:00
Admiral H. Curtiss
79405de103
MemArena: Use placeholders on Windows.
2022-02-06 18:06:04 +01:00
Admiral H. Curtiss
a336c4386c
IOFile: Rename Clear() to ClearError() for clarity.
2022-01-29 06:49:22 +01:00
Admiral H. Curtiss
36cfcb530f
IOFile: Make origin parameter to Seek() an enum class.
2022-01-29 06:49:21 +01:00
Dentomologist
d3ae1bd415
[Android] Fix unused variable warning
...
Add [[maybe_unused]] attribute to ConsoleListener's m_use_color
2022-01-25 14:15:18 -08:00