Commit graph

25677 commits

Author SHA1 Message Date
JosJuice
a9862b5395 NetPlay: Sync more settings 2021-03-07 14:22:53 +01:00
JosJuice
14bfc0be78 DiscIO: Fix reading certain WIA chunks with many exceptions
The loop in WIARVZFileReader::Chunk::Read could terminate
prematurely if the size argument was smaller than the size
of an exception list which had only been partially loaded.
2021-03-07 14:14:45 +01:00
JosJuice
96ebf01ea8 VolumeVerifier: Fix potential crash when cancelling
The async operations may contain references to class members, so
any running async operations must end before destroying the class.
2021-03-07 13:56:06 +01:00
Léo Lam
61198541a0
Merge pull request #9562 from sepalani/dis-icons
Breakpoints: Change icon when disabled
2021-03-07 12:14:12 +01:00
Pokechu22
5b1c632862 Software: Invert backface test when viewport is positive
Fixes Jimmie Johnson's Anything with an Engine.
2021-03-06 22:00:16 -08:00
Pokechu22
058c7db80b Software: Fix out of bounds accesses in CopyRegion
Fixes issue 11393.

The problem is that left and top make no sense for a width by height array; they only make sense in a larger array where from which a smaller part is extracted.  Thus, the overall size of the array is provided to CopyRegion in addition to the sub-region.  EncodeXFB already handles the extraction, so CopyRegion's only use there is to resize the image (and thus no sub-region is provided).
2021-03-06 21:58:28 -08:00
Pokechu22
df81210e96 Use formatters in GetBPRegInfo; add missing commands
BPMEM_TEV_COLOR_ENV + 6 (0xC6) was missing due to a typo.  BPMEM_BP_MASK (0xFE) does not lend itself well to documentation with the current FIFO analyzer implementation (since it requires remembering the values in BP memory) but still shouldn't be treated as unknown.  BPMEM_TX_SETMODE0_4 and BPMEM_TX_SETMODE1_4 (0xA4-0xAB) were missing entirely.
2021-03-06 19:27:20 -08:00
Pokechu22
70f9fc4e75 Convert BPMemory to BitField and enum class
Additional changes:
- For TevStageCombiner's ColorCombiner and AlphaCombiner, op/comparison and scale/compare_mode have been split as there are different meanings and enums if bias is set to compare.  (Shift has also been renamed to scale)
- In TexMode0, min_filter has been split into min_mip and min_filter.
- In TexImage1, image_type is now cache_manually_managed.
- The unused bit in GenMode is now exposed.
- LPSize's lineaspect is now named adjust_for_aspect_ratio.
2021-03-06 19:27:19 -08:00
Pokechu22
db8ced7e4e Add FogParam0::FloatValue and FogParam3::FloatValue
This value will be used in the register description; so expose it in a way that can be re-used instead of calculating it in 2 places later.
2021-03-06 19:27:18 -08:00
Pokechu22
f2bea67709 Fix typo with ztex2 op in UseVertexDepthRange 2021-03-06 19:27:17 -08:00
Pokechu22
762fe33a3d Rename BPMEM_EFB_BR to BPMEM_EFB_WH 2021-03-06 19:27:16 -08:00
Pokechu22
81b84a5ebe Use XFMEM_REGISTERS_START/END in XFRegWritten and LoadXFReg 2021-03-06 19:27:15 -08:00
Pokechu22
8c80369373 Add names and descriptions for regular XF memory 2021-03-06 19:27:15 -08:00
Pokechu22
2d6ec7457d Add names and descriptions for XF registers to the FIFO analyzer 2021-03-06 19:27:14 -08:00
Pokechu22
aab81d5aa0 Convert XFMemory to BitField and enum class
Additionally a new ClipDisable union has been added (though it is not currently used by Dolphin).
2021-03-06 19:27:14 -08:00
Pokechu22
953e09428f Add names and descriptions for CP registers to the FIFO analyzer 2021-03-06 19:27:14 -08:00
Pokechu22
f749fcfa9f Convert CPMemory to BitField and enum class
Additionally, VCacheEnhance has been added to UVAT_group1.  According to YAGCD, this field is always 1.

TVtxDesc also now has separate low and high fields whose hex values correspond with the proper registers, instead of having one 33-bit value.  This change was made in a way that should be backwards-compatible.
2021-03-06 19:27:08 -08:00
Pokechu22
c27efb3f1f Create constants for CP registers and masks 2021-03-06 17:34:05 -08:00
Pokechu22
d702f3b4ad DolphinNoGUI/PlatformX11: Work around X.h's None being undefined 2021-03-06 17:34:04 -08:00
Pokechu22
f697e17dd1 Create BitFieldArray 2021-03-06 17:34:03 -08:00
Pokechu22
1273c5e395 Add fmt support to BitField 2021-03-06 14:58:32 -08:00
Pokechu22
cf95deaf6d Allow specifying StorageType for BitField
This is useful for BitFields that are bools.
2021-03-06 14:57:44 -08:00
Pokechu22
6653bd7199 Create EnumFormatter 2021-03-06 14:57:42 -08:00
iwubcode
dbb0b72cc5 InputCommon: instead of blocking on individual DSU server sockets, block on a selector built up from all server sockets 2021-03-05 12:05:38 -06:00
Sintendo
2454bd5ba6 Jit64: Add optional argument to GenerateOverflow
This allows setting the overflow flag based on any condition code.
Defaults to NO (no overflow).
2021-03-05 17:14:45 +01:00
Léo Lam
5f7d935b0a
Merge pull request #9533 from sepalani/mmu-is-ram
MMU: Fix IsRAMAddress not working
2021-03-05 11:49:55 +01:00
JMC47
fc86e554e0
Merge pull request #9559 from iwubcode/gdb-stub-raii
Common / Core: add raii object that cleans up WSA on destruction in gdb-stub
2021-03-05 05:28:31 -05:00
Léo Lam
adcdeda372
Merge pull request #9565 from sepalani/qt-blocker
BreakpointWidget: Use QSignalBlocker
2021-03-05 10:44:44 +01:00
Léo Lam
a4de2502c5
Merge pull request #9550 from endrift/gba-flush
SI/DeviceGBA: Ensure data socket isn't backed up
2021-03-05 10:38:55 +01:00
Sepalani
1e6dfc6b91 BreakpointWidget: Use QSignalBlocker 2021-03-05 13:35:33 +04:00
Sepalani
fd7eeb7221 BreakpointWidget: Fix delete deleting both MBP and BP at address 2021-03-05 13:01:32 +04:00
Sepalani
359a539f25 Breakpoints: Change icon when disabled 2021-03-05 11:21:37 +04:00
Léo Lam
1e3e5680db
Merge pull request #9561 from sepalani/fix-watches
Watches: Fix Save and Load from strings
2021-03-05 00:57:40 +01:00
iwubcode
7d5052896d IOS: update network/ip/top to use the RAII winsock context 2021-03-04 13:55:20 -06:00
iwubcode
e4f74bea42 Core: Use RAII winsock object to cleanly create and destroy WSA in gdb-stub 2021-03-04 13:47:32 -06:00
iwubcode
00bc7e6b38 Common: Add RAII object that initializes and cleans up winsock 2021-03-04 13:44:12 -06:00
Léo Lam
aef0760efe
IOS/ES: Emulate /sys/launch.sys for more accurate timings
Also gets rid of one static variable
2021-03-04 18:41:13 +01:00
Léo Lam
bdaac718ac
IOS/FS: Expose some more ioctls for internal Dolphin use 2021-03-04 18:41:13 +01:00
Léo Lam
93f0d122c0
IOS: Hang PPC when reloading IOS for a PPC title launch
The PPC is supposed to be held in reset when another version of IOS is
in the process of being launched for a PPC title launch.

Probably doesn't matter in practice, though the inaccuracy was
definitely observable from the PPC.
2021-03-04 18:41:13 +01:00
Léo Lam
19667cb801
Fix symbol map being loaded too early during title changes
We should only try to load a symbol map for the new title *after* it
has been loaded into memory, not before. Likewise for applying HLE
patches and loading new custom textures.

In practice, loading/repatching too early was only a problem for
titles that are launched via ES_Launch. This commit fixes that.
2021-03-04 18:41:13 +01:00
Léo Lam
a658cbce16
IOS: Emulate IOS boot timings 2021-03-04 18:41:13 +01:00
Léo Lam
820c4836d7
IOS: Simplify IPC initialisation
The extra IPC ack is triggered by a syscall that is invoked in ES's
main function; the syscall literally just sets Y2, IX1 and IX2 in
HW_IPC_ARMCTRL -- there is no complicated ack queue or anything.
2021-03-04 18:41:13 +01:00
Léo Lam
0da5ea86a3
IOS: Emulate ES boot timings 2021-03-04 18:41:13 +01:00
Léo Lam
688bd6141a
IOS: Emulate BootstrapPPC syscall delays
Reading the boot content from the NAND takes a non-negligible amount of
time and the PPC should be held in reset while the DOL is being read.
2021-03-04 18:41:12 +01:00
Léo Lam
011f7789e0
IOS: Clear 0-0x3fff when setting up low MEM1 constants
Low MEM1 is cleared by IOS before all the other constants are written.

This will overwrite the Gecko code handler but it should be fine
because HLE::Reload (which will set up the code handler hook again)
will be called after a title change is detected.
2021-03-04 18:41:12 +01:00
Sepalani
ef977123d5 BreakpointWidget: Emit BreakpointsChanged to update views 2021-03-04 21:10:37 +04:00
Sepalani
6786340a7c Watches: Fix Save and Load from strings 2021-03-04 17:55:52 +04:00
Léo Lam
be500a98e2
Merge pull request #8779 from sepalani/open-dump
NetworkWidget: Reorganise SSL options group box
2021-03-04 13:37:10 +01:00
Léo Lam
511e9dcd2f
Merge pull request #9542 from InusualZ/toggle-bp
BreakpointWidget: Allow breakpoints to be toggled between enable/disable
2021-03-04 12:34:03 +01:00
Léo Lam
48a5846aee
Merge pull request #9548 from AdmiralCurtiss/fastmem-active-regions
Core/Memmap: Memory mapping logic fixes.
2021-03-04 12:18:59 +01:00
Léo Lam
9c6c77351f
Merge pull request #9556 from JosJuice/cmake-msvc-latest
CMake: Build with -std:c++latest for MSVC
2021-03-04 12:12:06 +01:00
Léo Lam
00db622d50
Merge pull request #9560 from JosJuice/cmake-msvc-wil
CMake: Include WIL headers
2021-03-04 12:08:05 +01:00
JosJuice
2cb3f663bc CMake: Include WIL headers
MSBuild does this, so CMake should too. Fixes a Windows build error.
2021-03-04 10:26:31 +01:00
JosJuice
0cb71d3f47 CMake: Disable warning C5054 on DolphinQt
Same as 33c0abd.

Also removing -D_SILENCE_CXX17_RESULT_OF_DEPRECATION_WARNING
to match MSBuild. Qt is no longer triggering that warning.
2021-03-04 09:29:30 +01:00
Dentomologist
6e13d35026 DolphinQt: Removed unused this capture in lambda
The Host constructor sets a callback on a lambda that in turn calls
Host_UpdateDisasmDialog. Since that function is not a member function
capturing this is unnecessary.

Fixes -Wunused-lambda-capture warning on freebsd-x64.
2021-03-03 13:18:17 -08:00
JMC47
d2eb846e6a
Merge pull request #9549 from Dentomologist/ppcstate_off_to_s32
JitArm64: Fix unsigned/signed argument/parameter mismatch
2021-03-03 14:56:40 -05:00
JMC47
9843412440
Merge pull request #8996 from AdmiralCurtiss/memcard-save-import-export-refactor
Various improvements for the Memory Card Manager.
2021-03-03 14:51:31 -05:00
JMC47
a0be1c93ea
Merge pull request #9352 from Pokechu22/sw-line-point-width
Software: Implement line-width and point-width
2021-03-03 14:15:28 -05:00
InusualZ
5e1b3514f6 Allow to disable/enable from the BreakpointWidget
Added a context menu, for when a breakpoint is right-clicked
Removed the `itemClicked` behavior, since it would clash with the context menu
2021-03-03 15:55:22 +00:00
Vicki Pfau
f6e9003ddc SI/DeviceGBA: Ensure data socket isn't backed up
When reading a reply from a message sent to the data socket there is
the possibility that the other side gets sent multiple messages
before replying to any of them, which can lead to multiple replies
sent in a row. Though this only happens when things time out, it's
quite possible for these timeouts to happen or build up over time,
especially when initiating the connection.

This change makes sure to flush any pending bytes that have not been
read yet out of the socket after a successful POLL reply is received,
since that is the most common time when backups occur, and as well as
using the exact number of bytes in an expected reply, to ensure
the received data and the message it's replying to do not get out of
sync.
2021-03-02 18:53:44 -08:00
Dentomologist
4807cb77fd JitArm64: Fix unsigned/signed arg/param mismatch
The result of calls to PPCSTATE_OFF_PS0/1 were being cast to u32 and
passed to functions expecting s32 parameters. This changes the casts
to s32 instead.

One location was missing a cast and generated a warning with VS which
is now fixed.
2021-03-02 13:38:54 -08:00
InusualZ
4935e9b560 Allow to disable/enable breakpoints
Added `ToggleBreakPoint` to both interface BreakPoints/MemChecks. this would allow us to toggle the state of the breakpoint.

Also the TMemCheck::is_ranged is not longer serialized to string, since can be deduce by comparing the TMemCheck::start_address  and TMemCheck::end_address
2021-03-02 21:11:53 +00:00
Admiral H. Curtiss
4b784576d9 Core/Memmap: Don't try to map logical memory from inactive physical regions. 2021-03-02 18:41:33 +01:00
Admiral H. Curtiss
8199825c6f Core/Memmap: Store and check which physical regions are actually mapped instead of relying on SConfig staying the same. 2021-03-02 18:41:33 +01:00
Léo Lam
7712f0831f
Merge pull request #9535 from sepalani/threads-freeze
DebugInterface: Check visited addresses in GetThreads
2021-03-02 16:38:02 +01:00
Sepalani
8279613a49 DebugInterface: Check visited addresses in GetThreads 2021-03-02 19:29:47 +04:00
Léo Lam
59f4164411
Merge pull request #9539 from iwubcode/dynamic_input_tex_more_optimizations
InputCommon: dynamic input textures more optimizations
2021-03-02 02:53:22 +01:00
Léo Lam
0c9f11af47
Merge pull request #9537 from AdmiralCurtiss/fastmem-error-messages
Core/Memmap: Give more detailed error messages if memory mapping fails.
2021-03-02 02:47:12 +01:00
Admiral H. Curtiss
918f3d92e0 Core/Memmap: Give more detailed error messages if memory mapping fails. 2021-03-01 19:11:00 +01:00
Léo Lam
010279f4e6
Merge pull request #9513 from leoetlino/info-ios-version-qt
Qt: Re-add IOS version to the game info tab
2021-03-01 11:44:26 +01:00
Léo Lam
858f00b641
Merge pull request #9492 from nolange/fix_norandr_build
Cleanup X11 and XRANDR Macros
2021-03-01 11:36:39 +01:00
Léo Lam
26f0bf8f34
Merge pull request #9538 from JosJuice/qt-sw-gameid
DolphinQt: Fix <game_id> tag in SoftwareRendererWidget.cpp
2021-03-01 11:34:53 +01:00
iwubcode
32d584a0f5 InputCommon: reduce number of image loads and texture cache invalidations by only running dynamic input textures once for all controllers 2021-02-27 17:29:48 -06:00
JosJuice
c98144334f DolphinQt: Fix <game_id> tag in SoftwareRendererWidget.cpp
Same problem and same fix as in e55342a. Also changing <br />
to <br> for consistency with other strings while I'm at it.
2021-02-27 20:17:28 +01:00
iwubcode
158674c274 Common: Move 'GetSection' functions to be public 2021-02-27 12:21:23 -06:00
Léo Lam
9d0983c9c9
Merge pull request #9536 from Filoppi/config_fixes
Don't call OnConfigChanged() unless config actually changed
2021-02-26 01:56:01 +01:00
Filoppi
e020b2e8ea Common: don't call OnConfigChanged() unless it has actually changed
DualShock UDP Client is the only place in the code that assumed OnConfigChanged()
is called at least once on startup or it won't load up the setting, so I took care of that
2021-02-26 01:14:00 +02:00
Sepalani
6982832f82 MMU: Fix IsRAMAddress not working 2021-02-24 22:19:26 +04:00
Admiral H. Curtiss
22b300336a Core/MemoryWatcher: Use appropriate memory read function in ChasePointer(). 2021-02-24 19:02:30 +01:00
Norbert Lange
d4b293e969 Simplify macro guards for HAVE_XRANDR 2021-02-22 14:32:53 +01:00
Norbert Lange
29eaf09be4 Cleanup X11 and XRANDR Macros
This fixes build with X11 enabled and XRANDR disabled.
2021-02-22 14:30:43 +01:00
Léo Lam
1fe0953bd5
Merge pull request #9524 from InusualZ/master
Debugger: Fix issue were loaded memory breakpoints were not being triggered (break)
2021-02-21 15:49:24 +01:00
Léo Lam
c040b0151d
Merge pull request #8759 from sepalani/so-connect
IOS/NET: Add timeout on blocking connect
2021-02-21 15:26:59 +01:00
Sepalani
bf246c36f5 IOS/NET: Add timeout on blocking connect 2021-02-21 18:15:26 +04:00
Sepalani
a8dc1e3f1c NetworkWidget: Reorganise SSL options group box
Create "Dump options" and "Security options" group boxes.
Add "Network dump format" combo box.
Add "Open dump folder" button.
2021-02-20 18:19:37 +04:00
Léo Lam
985ede9ca0
Core: Fix time base unit mixup
And add a strongly typed integer type so that making this kind of
mistake is more difficult
2021-02-20 14:18:21 +01:00
InusualZ
caf140dea9 Fix issue were loaded memory breakpoints were not being triggered
This was caused, because we were saving the `break_on_hit` flag with the letter `p`. Then while loading the breakpoints, we read the flag with the letter `b`, resulting in the `break_on_hit` flag being always false
2021-02-19 16:09:50 +00:00
Léo Lam
93f9d67d2f
Merge pull request #9511 from leoetlino/es-content-timings
IOS: Emulate FS timings for ES content IPC commands
2021-02-19 16:08:24 +01:00
Léo Lam
9957d6c106
Merge pull request #9516 from iwubcode/dynamic_input_textures_improved
InputCommon: move some dynamic input texture logic and add specification option
2021-02-19 16:06:13 +01:00
iwubcode
55ba1c7c9c InputCommon: Move initial dynamic input texture configuration logic to a 'specification 1' function and load in a 'specification' attribute that defaults to 1 if not present (with 1 being the only valid value at the moment) 2021-02-19 00:02:15 -06:00
Léo Lam
34c9e0dece
Merge pull request #9521 from sepalani/watches
Debugger: Fix "Add to watch" not working
2021-02-19 01:30:14 +01:00
Léo Lam
e3bf5fca93
IOS: Deduplicate IPC_OVERHEAD_TICKS timing constant 2021-02-18 21:10:55 +01:00
Léo Lam
f750208aa3
IOS/ES: Emulate FS timings for content wrapper IPC commands
Filesystem accesses aren't magically faster when they are done by ES,
so this commit changes our content wrapper IPC commands to take FS
access times and read operations into account.

This should make content read timings a lot more accurate and closer
to console. Note that the accuracy of the timings are limited to the
accuracy of the emulated FS timings, and currently performance
differences between IOS9-IOS28 and newer IOS versions are not emulated.

Part 1 of fixing https://bugs.dolphin-emu.org/issues/11346
(part 2 will involve emulating those differences)
2021-02-18 18:53:33 +01:00
Léo Lam
5eca82a6f2
IOS/ES: Allow various utility functions to return timing info 2021-02-18 18:53:33 +01:00
Léo Lam
f214df5d2c
IOS/FS: Allow IPC interface to be used internally from IOS HLE
This makes it more convenient to emulate timings for IPC commands that
perform internal IOS <-> IOS IPC, for example ES relying on FS
for filesystem access.
2021-02-18 18:53:32 +01:00
Léo Lam
1073463d35
IOS/ES: Log content reads for debugging
We log FS reads already, might as well log ES content reads.
2021-02-18 18:52:35 +01:00
Léo Lam
41e2fab54c
IOS/ES: Log content ID and index when opening contents for debugging
The content ID/index is what actually matters..
2021-02-18 18:52:35 +01:00
Léo Lam
5e79b6acb7
Merge pull request #9515 from leoetlino/fs-timings-redux
IOS/FS: Implement timings for older IOS versions as well
2021-02-18 18:50:15 +01:00
Sepalani
e3d85ffe35 MemoryWidget: Add "Add to watch" action 2021-02-17 21:32:36 +04:00
Sepalani
bbcaede389 RegisterWidget: Fix add to watch action 2021-02-17 21:25:29 +04:00
iwubcode
10127a0451 InputCommon: Move DynamicInputTextureData to DynamicInputTextures::Data 2021-02-16 22:43:10 -06:00
iwubcode
28a911ae6b InputCommon: Move DynamicInputTextureConfiguration to DynamicInputTextures::Configuration 2021-02-16 22:37:59 -06:00
JosJuice
1e500d96b0 JitArm64: Workaround for GCC ICE 2021-02-15 23:46:08 +01:00
Léo Lam
d0c91380c7
IOS/FS: Implement timings for older IOS versions as well
According to hwtests, older versions of IOS are slower at performing
various filesystem operations:

https://docs.google.com/spreadsheets/d/1OKo9IUuKCrniz4m0kYIaMP_qFtOCmAzHZ_zAmobvBcc/edit

(courtesy of JMC)

A quick glance at IOS9 reveals that older versions of IOS have a
simplistic implementation of memcpy that does not optimize large copies
by copying 16 bytes or 32 bytes per chunk, which makes cached reads
and writes noticeably slower -- the difference was significant enough
that the OoT speedrunning community noticed that IOS9 (the IOS that
is used for the OoT VC title) was slower.
2021-02-15 18:41:22 +01:00
Léo Lam
7097a7b3af
Qt: Re-add IOS version to the game info tab
This was accidentally removed during the Qt migration:
https://github.com/dolphin-emu/dolphin/pull/4734
2021-02-15 18:34:09 +01:00
Léo Lam
f9deb68aee
Merge pull request #9514 from JosJuice/jitarm64-offsetof
JitArm64: Fix improper uses of offsetof
2021-02-15 00:59:11 +01:00
JosJuice
f2f3a59dbf JitArm64: Fix improper uses of offsetof
Using a non-constant array index inside offsetof is not
standards compliant, and is rejected by GCC 11.
https://bugs.dolphin-emu.org/issues/12409#note-5
2021-02-14 20:47:41 +01:00
Léo Lam
f79e629119
Merge pull request #9499 from sepalani/pcap-ssl-raw
PCAP: Add raw SSL packets logging support
2021-02-14 18:39:33 +01:00
Sepalani
d3dd830e8f PCAP: Add raw SSL packets logging support 2021-02-14 20:24:28 +04:00
Léo Lam
efab17c025
Merge pull request #9498 from leoetlino/offsetof-constant
Core/DSP: Fix improper uses of offsetof
2021-02-14 16:34:39 +01:00
Léo Lam
be2cd2272d
Merge pull request #9507 from leoetlino/device-prepareforstate
IOS: Remove unnecessary and unused PrepareForState
2021-02-14 16:30:34 +01:00
Léo Lam
6944eaa003
Merge pull request #9512 from sepalani/func-update
CodeViewWidget: Add WithDetailedUpdate to update CodeWidget
2021-02-14 16:30:05 +01:00
Léo Lam
c33d944961
Merge pull request #9412 from JosJuice/jitarm64-movi2r
Arm64Emitter: Improve MOVI2R
2021-02-14 16:25:52 +01:00
Sepalani
5f629abd8b CodeViewWidget: Add WithDetailedUpdate to update CodeWidget
This used to also update the function calls and callers.
2021-02-14 16:01:32 +04:00
Léo Lam
8f25b0426e
Merge pull request #9509 from sepalani/net-tab
NetworkWidget: Add hostname to SSL table
2021-02-14 02:00:25 +01:00
Léo Lam
effd918837
Merge pull request #9508 from leoetlino/ipc-reply-cleanup
IOS: Clean up the way IPC replies are constructed
2021-02-14 01:59:41 +01:00
Pokechu22
fcd3efa1ae Software: Implement points 2021-02-13 15:59:40 -08:00
Pokechu22
8e348b87e9 Software: Fix line-width effects 2021-02-13 15:59:39 -08:00
JosJuice
9ad4f724e4 Arm64Emitter: Use ORR in MOVI2R 2021-02-13 21:04:13 +01:00
Léo Lam
e62c33c413
Merge pull request #9500 from sepalani/pcap-log-session
PCAP: Improve TCP session logging
2021-02-13 20:50:58 +01:00
Sepalani
aab78b88ab NetworkWidget: Add hostname to SSL table 2021-02-13 23:45:22 +04:00
JosJuice
0d5ed06daf Arm64Emitter: Improve MOVI2R
More or less a complete rewrite of the function which aims
to be equally good or better for each given input, without
relying on special cases like the old implementation did.

In particular, we now have more extensive support for
MOVN, as mentioned in a TODO comment.
2021-02-13 20:23:03 +01:00
Léo Lam
d0136dd7c2
IOS: Clean up the way IPC replies are constructed
Instead of constructing IPCCommandResult with static member functions
in the Device class, we can just add the relevant constructors to the
reply struct itself. Makes more sense than putting it in Device
when the struct is used in the kernel code and doesn't use any Device
specific members...

This commit also changes the IPC command handlers to return an optional
IPCCommandResult rather than an IPCCommandResult. This removes the need
for a separate boolean that indicates whether the "result" is actually
a reply, and also avoids the need to set dummy result values and ticks.

It also makes it really obvious which commands can result in no reply
being generated.

Finally, this commit renames IPCCommandResult to IPCReply since the
struct is now only used for actual replies. This new name is less
verbose in my opinion.

The diff is quite large since this touches every command handler, but
the only functional change is that I fixed EnqueueIPCReply to
take a s64 for cycles_in_future to match IPCReply.
2021-02-13 20:15:30 +01:00
Léo Lam
f52aa3d041
HW: Add a UDL for timebase ticks to cycles conversions 2021-02-13 18:24:23 +01:00
Léo Lam
6e8881a426
IOS: Remove unnecessary and unused PrepareForState
PrepareForState is now unnecessary with the new implementation of
HostFileSystem::DoState, which does what the old implementation
(CWII_IPC_HLE_Device_FileIO::PrepareForState) used to do.
2021-02-13 16:56:29 +01:00
Léo Lam
2f85b80b7b
Merge pull request #9333 from Pokechu22/sw-always-divide-by-q
Software: Always divide the texture coordinates by q.
2021-02-13 13:24:18 +01:00
JosJuice
4e107935ac Arm64Emitter: Allow specifying 21th bit of ADRP imm 2021-02-13 11:33:27 +01:00
JosJuice
d226b8f825 Arm64Emitter: Remove optimize parameter from MOVI2R
I don't really see the use of this. (Maybe in the past it
was used for when we need a constant number of instructions
for backpatching? But we don't use MOVI2R for that now.)
2021-02-13 11:33:27 +01:00
Pokechu22
7d5ae03219 Software: Always divide the texture coordinates by q.
Equivalent to da43f9a15 for the software renderer.
2021-02-12 16:37:47 -08:00
Léo Lam
99fc1c682a
IOS: Simplify unnecessarily qualified names
Now that the ES class (now called ESDevice) and the ES namespace do
not conflict anymore, "IOS::" can be dropped in a lot of cases.

This also removes "IOS::HLE::" for code that is already in that
namespace. Some of those names used to be explicitly qualified
only for historical reasons.

There are no functional changes.
2021-02-13 01:36:09 +01:00
Léo Lam
3e1646adae
Merge pull request #9504 from leoetlino/ios-class-name-cleanup
IOS: Use less ambiguous names for classes
2021-02-13 01:00:16 +01:00
Léo Lam
522cb6b137
IOS: Use less ambiguous names for classes
Some of the device names can be ambiguous and require fully or partly
qualifying the name (e.g. IOS::HLE::FS::) in a somewhat verbose way.

Additionally, insufficiently qualified names are prone to breaking.
Consider the example of IOS::HLE::FS:: (namespace) and
IOS::HLE::Device::FS (class). If we use FS::Foo in a file that doesn't
know about the class, everything will work fine. However, as soon as
Device::FS is declared via a header include or even just forward
declared, that code will cease to compile because FS:: now resolves
to Device::FS if FS::Foo was used in the Device namespace.

It also leads to having to write IOS::ES:: to access ES types and
utilities even for code that is already under the IOS namespace.

The fix for this is simple: rename the device classes and give them
a "device" suffix in their names if the existing ones may be ambiguous.
This makes it clear whether we're referring to the device class or to
something else.

This is not any longer to type, considering it lets us get rid of the
Device namespace, which is now wholly unnecessary.

There are no functional changes in this commit.

A future commit will fix unnecessarily qualified names.
2021-02-12 21:40:31 +01:00
Léo Lam
09c9fdf71c
Merge pull request #9505 from Pokechu22/bitfield-natvis
Restore BitField Natvis
2021-02-12 12:36:59 +01:00
Sepalani
fabf6f51cd PCAP: Improve TCP session logging 2021-02-12 13:42:18 +04:00
Pokechu22
0102914323 Restore BitField Natvis
It was lost in #9092.
2021-02-11 23:31:27 -08:00
iwubcode
ce7db2e32b InputCommon: When using dynamic input textures, only call force reload textures once for packs that have multiple configurations 2021-02-11 19:18:38 -06:00
iwubcode
0a9c764dc4 VideoCommon: Join the prefetch thread before clearing to avoid a potential crash that can occur by multiple threads touching a single resource 2021-02-11 19:18:38 -06:00
Léo Lam
bf758fbe7c
Merge pull request #9490 from Dentomologist/fix_expression_scroll_wheel_spam
Config: Fix expression window scroll wheel spam
2021-02-11 21:42:00 +01:00
Léo Lam
3ce72d4005
Merge pull request #9408 from sepalani/sni
SSL: Workaround to remove SNI from ClientHello
2021-02-11 21:38:41 +01:00
Sepalani
2a15bc6ab2 SSL: Workaround to remove SNI from ClientHello 2021-02-11 23:13:59 +04:00
Léo Lam
a354814240
Merge pull request #9424 from Pokechu22/sw-no-special-case
Software: Remove normalization special case
2021-02-11 19:36:45 +01:00
Léo Lam
1fc6fbc2c0
Merge pull request #6075 from sepalani/pcap-log
PCAP logging with fake TCP/UDP packet
2021-02-11 00:15:37 +01:00
Léo Lam
ddacbf83f6
Merge pull request #9461 from cbartondock/master
Working Game IDs for Elf/Dol files
2021-02-10 22:50:40 +01:00
Léo Lam
1e71904cb9
Merge pull request #9495 from leoetlino/wiki-redirect
Qt: Fix "open wiki" option not using the wiki redirect script
2021-02-10 13:14:47 +01:00
Léo Lam
118b2a3580
Core/DSP: Fix improper uses of offsetof
According to the C standard, an offsetof expression must evaluate to an
address constant, otherwise it's undefined behavior.

Fixes https://bugs.dolphin-emu.org/issues/12409

See also https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95942

There are still improper uses of offsetof (mostly in JitArm64) but
fixing that will take more effort since there's a PPCSTATE_OFF wrapper
macro that is sometimes used with non-array members and sometimes used
with arrays and variable indices... Let's keep that for another PR.
2021-02-10 02:03:16 +01:00
Dentomologist
43b389410a Config: Fix expression window scroll wheel spam
Fixes the expression window being spammed with the first entry in the
Operators or Functions select menus when scrolling the mouse wheel while
hovering over them.

Fixes https://bugs.dolphin-emu.org/issues/12405
2021-02-09 08:55:01 -08:00
JosJuice
3e4bf57c69
Merge pull request #9423 from MerryMage/arm64-movi2r-test
UnitTests: Add MOVI2R test
2021-02-08 10:58:09 +01:00
Markus Wick
9a2d908aba
Merge pull request #9400 from JosJuice/jitarm64-imm
JitArm64: More constant propagation optimizations
2021-02-08 10:53:01 +01:00
Léo Lam
7ef8e53c4a
Qt: Fix "open wiki" option not using the wiki redirect script
The dolphin-redirect.php script seems to have been present since 2012
at least, but we accidentally stopped using it when the "open wiki"
feature was reimplemented in DolphinQt2 in 2016.

    <@delroth> dolphin-redirect.php is slightly smarter and tries to find gameid aliases for e.g. same region
    <@delroth> uh, I mean different region
2021-02-08 02:52:29 +01:00
JosJuice
761d7748b6 JitArm64: Fix mistaken use of LSL imm 2021-02-07 13:55:55 +01:00
JosJuice
efeda3b759 JitArm64: More constant propagation optimizations
PR 9262 added a bunch of Jit64 optimizations, some of
which were already in JitArm64 and some which weren't.
This change ports the latter ones to JitArm64.
2021-02-07 13:55:35 +01:00
Errorcodebin
8a3fe6e24a Fix mapping window title bar becoming unresponsive 2021-02-04 14:32:03 +01:00
Markus Wick
b6e9cca64f
Merge pull request #9485 from JosJuice/jitarm64-pc-stp
JitArm64: Use STP for pc/npc
2021-02-03 12:22:37 +01:00
iwubcode
77c68a3142 DolphinQt: Fix regression that caused the regex expression to be evaluated incorrectly. If an input expression has a non-alpha character in it, we want to quote it with backticks 2021-02-02 20:36:54 -06:00
MerryMage
f65c1df094 Random: Add seeded PRNG 2021-01-31 13:16:45 +00:00
MerryMage
a0b8956f22 JitArm64_Integer: Add optimizations for rlwimix
* Check for case when source field is at LSB
* Use BFXIL if possible
* Avoid ROR where possible
2021-01-31 12:05:43 +00:00
MerryMage
8aa2013a2d Arm64Emitter: Add additional assertions to BFI/UBFIZ 2021-01-31 12:04:57 +00:00
MerryMage
75d92ad628 Arm64Emitter: Prefer BFM/UBFM to EncodeBitfieldMOVInst 2021-01-31 12:04:57 +00:00
MerryMage
be6aec9932 Arm64Emitter: Add BFXIL 2021-01-31 12:04:57 +00:00
Sepalani
82bb5d9915 NetworkCaptureLogger: PCAP support added
Log TCP/UDP read/write with fake packet.
2021-01-30 19:35:09 +04:00
cbartondock
83c127784b Working Game IDs for Elf/Dol files 2021-01-30 09:51:37 -05:00
JosJuice
dd8e504c80 JitArm64: Use STP for pc/npc 2021-01-30 11:56:25 +01:00
Markus Wick
b22073ef59
Merge pull request #9484 from JosJuice/jitarm64-ps-stp
JitArm64: Use STP for (parts of) ppcState.ps
2021-01-30 08:51:56 +01:00
JosJuice
91b55824f9 JitArm64: Use STP for (parts of) ppcState.ps
The savestate incompatibility problem mentioned in a comment
was solved by d266be5.
2021-01-30 01:01:01 +01:00
JosJuice
2d9ea42df2 Arm64Emitter: Add asserts for LDP/STP imm out of range 2021-01-30 00:25:33 +01:00
Admiral H. Curtiss
dc2d234284 GCMemcardUtils: Fix typo in comment. 2021-01-28 22:01:33 +01:00
Admiral H. Curtiss
e47eb16641 GCMemcardManager: Detect attempt to import multiple save files with the same internal name. 2021-01-28 22:01:33 +01:00
Admiral H. Curtiss
74b56a8c7f GCMemcardManager: Add filename column. 2021-01-28 22:01:33 +01:00
Admiral H. Curtiss
9acbe1aced GCMemcardManager: Make columns sortable. 2021-01-28 22:01:33 +01:00
Admiral H. Curtiss
42f4ee629b GCMemcardManager: Make columns resizable by the user. 2021-01-28 22:01:33 +01:00
Admiral H. Curtiss
7cf991bd8a GCMemcardManager: Small cleanups. 2021-01-28 22:01:33 +01:00
Admiral H. Curtiss
e00e6e1a8c GCMemcardManager: Replace remaining panic alert with ModalMessageBox. 2021-01-28 22:01:33 +01:00
Admiral H. Curtiss
daa76183ed GCMemcard: Let ImportFile() take a Savefile instead of a direntry and a vector of blocks. 2021-01-28 22:01:33 +01:00
Admiral H. Curtiss
c95f3cbb61 GCMemcard: Remove obsolete methods. 2021-01-28 22:01:33 +01:00
Admiral H. Curtiss
645cb2f3d1 GCMemcardDirectory: Rewrite migration logic without ExportGci(). 2021-01-28 22:01:33 +01:00
Admiral H. Curtiss
e8b99d3afd GCMemcardManager: Rewrite file deleting logic to provide a better user experience. 2021-01-28 22:01:33 +01:00
Admiral H. Curtiss
6e96f95432 GCMemcardManager: Rewrite file copying logic to provide a better user experience. 2021-01-28 22:01:33 +01:00
Admiral H. Curtiss
08dccb8727 GCMemcardManager: Rewrite file importing logic to provide a better user experience. 2021-01-28 22:01:33 +01:00
Admiral H. Curtiss
3286d2df3d Common/VariantUtil: Add 'overloaded' helper struct for use with std::variant. 2021-01-28 22:01:32 +01:00
Admiral H. Curtiss
87ae7ccd75 GCMemcardManager: Rewrite file exporting logic to provide a better user experience. 2021-01-28 22:01:32 +01:00
Admiral H. Curtiss
7bb7aa16c2 GCMemcardManager: Relayout file table for a more compact design. 2021-01-28 22:01:32 +01:00
Admiral H. Curtiss
ec4fc7171f GCMemcardUtils: Implement GenerateFilename() as a cleaner variant of GCMemcard::GCI_FileName(). 2021-01-28 22:01:30 +01:00
Admiral H. Curtiss
3e7f537a9d GCMemcard: Implement ExportFile() to get a file on a card with a single method call. 2021-01-28 22:00:33 +01:00
Admiral H. Curtiss
9b14cc8ea2 GCMemcard: Implement utility functions to read saves from and write saves to files, without involving a memory card. 2021-01-28 22:00:28 +01:00
Sepalani
b363962757 BreakpointWidget: Remove unnecessary code
PPCDebugInterface.Clear() is called by Core on shutdown instead
2021-01-28 21:23:18 +04:00
Sepalani
289637f92f NetworkCaptureLogger: Move SSL logging 2021-01-28 21:23:18 +04:00
Léo Lam
c386c5acc2
Merge pull request #9366 from iwubcode/freelook_camera_quaternion
VideoCommon: allow Free Look to be manipulated by a quaternion
2021-01-28 01:34:09 +01:00
Léo Lam
9ca24ae8e0
Merge pull request #9092 from shuffle2/vshack
msbuild: Merge "Core" libs into single DolphinLib
2021-01-28 01:33:46 +01:00
iwubcode
586c689d63 VideoCommon: use Quaternion for Free Look orientation 2021-01-27 18:22:10 -06:00
iwubcode
d35287b6e4 Common: update Quaternion to allow rotating pitch, yaw, and roll all at once 2021-01-27 18:22:10 -06:00
iwubcode
544692f96a Common: add convenience function to convert a Quaternion to a Matrix44 2021-01-27 18:22:10 -06:00
SirMangler
9f6d88880e
MemoryWidget: Add 'Offset' and General Improvements 2021-01-28 01:04:09 +01:00
Shawn Hoffman
500a694ca8 msbuild: bundle all dolphin "core" code into single library 2021-01-27 14:29:49 -08:00
Shawn Hoffman
5770ff01f3 rename D3DCommon/Common to D3DCommon/D3DCommon 2021-01-27 14:29:48 -08:00
Shawn Hoffman
527b5a9761 normalize common filenames in VideoBackends/D3D12 2021-01-27 14:29:48 -08:00
Shawn Hoffman
a0aeb5b0b9 normalize common filenames in VideoBackends/D3D 2021-01-27 14:29:48 -08:00
Shawn Hoffman
d7fd892fde normalize common filenames in VideoBackends/Vulkan 2021-01-27 14:29:48 -08:00
Shawn Hoffman
ef70fe05bf normalize common filenames in VideoBackends/Null 2021-01-27 14:29:48 -08:00
Shawn Hoffman
ff4f67492b normalize common filenames in VideoBackends/OGL 2021-01-27 14:29:48 -08:00
Shawn Hoffman
3193f3d5c4 rename Core/IOS/FS/FileSystem.cpp to FileSystemCommon.cpp 2021-01-27 14:29:48 -08:00