Commit Graph

22190 Commits

Author SHA1 Message Date
Lioncash c52d1e735a DiscScrubber: Use an unsigned loop index in ParseDisc
Prevents an implicit signed to unsigned conversion when assigning a
partition's group number.
2017-01-04 20:03:12 -05:00
Lioncash 6ff21c48cb DiscScrubber: Correct printf specifiers 2017-01-04 19:56:39 -05:00
Lioncash b1a2dec78a DiscScrubber: Convert a #define into a typed constant 2017-01-04 19:53:31 -05:00
Léo Lam a15be890e1 WII_IPC_HLE: Update the "IOS basics" comment
The codebase has changed since it was written, so it needed
a small update.
2017-01-05 01:11:52 +01:00
Léo Lam 00268443ca WII_IPC_HLE: Replace #defines with constexpr 2017-01-05 01:04:20 +01:00
Léo Lam 9abfa54c9d IOS HLE: Remove s_es_inuse
We don't really have to keep track of device opens/closes manually,
since we can already check that by calling IsOpened() on the device.

This also replaces some loops with for range loops.
2017-01-05 01:04:19 +01:00
Lioncash 045a8400e6 IOFile: Make the move constructor and move assignment operator noexcept
Certain parts of the standard library try to determine whether or not a
transfer operation should either be a copy or a move. The prevalent notion
of move constructors/assignment operators is that they should not throw,
they simply move an already existing resource somewhere else.

This is typically done with 'std::move_if_noexcept'. Like the name says,
if a type's move constructor is noexcept, then the functions retrieves an
r-value reference (for move semantics), or an l-value (for copy semantics)
if it is not noexcept.

As IOFile deletes the copy constructor and copy assignment operators,
using IOFile with certain parts of the standard library can fail in
unexcepted ways (especially when used with various container
implementations). This prevents that.
2017-01-04 18:37:48 -05:00
Lioncash 9b8f5bce22 IOFile: Change 'operator void*' into 'explicit operator bool'
'operator void*' is basically a pre-C++11-ism that was used, as C++03
only had the notion of implicit type-conversion operators, but not explicit type
conversion operators (allowing implicit conversion of a file handle to
bool can go downhill pretty quickly).
2017-01-04 18:10:21 -05:00
JosJuice 0eaeca9d6d Merge pull request #3352 from lioncash/scrub
DiscScrubber: Turn into a class
2017-01-04 23:57:52 +01:00
Lioncash c541e1099e IOFile: Make class variables private
Internals shouldn't be directly exposed.
2017-01-04 17:48:46 -05:00
Lioncash c21dad9e83 IOFile: Get rid of unnecessary unimplemented copy constructor/assignment operator.
IOFile already inherits NonCopyable.
2017-01-04 17:47:40 -05:00
Lioncash 5b1aae0cbf DiscScrubber: Make struct and variable names conformant to the coding style 2017-01-04 17:04:41 -05:00
Lioncash 4a9bc2340b DiscScrubber: Convert into a class
Allows potential multiple scrubbers to run at once. Also gets rid of the
need to explicitly clean up resources.
2017-01-04 16:06:21 -05:00
Markus Wick 389f8297c3 Merge pull request #4577 from degasus/videocommon
OGL/Vulkan: Drop destination alpha pass.
2017-01-04 20:05:26 +01:00
degasus 41b0c74e30 VideoCommon: Make dst_alpha state implicit. 2017-01-04 20:02:31 +01:00
degasus b7d8bd13a6 OGL/Vulkan: Drop dual pass alpha. 2017-01-04 19:59:41 +01:00
JosJuice f46f779f70 Merge pull request #4609 from lioncash/dspdisasm
DSPDisassembler: directly initialize AssemblerSettings struct members
2017-01-04 19:52:52 +01:00
Léo Lam b65ad538ba IOS HLE: Refactor ExecuteCommand
ExecuteCommand was becoming pretty confusing with unused variables
for some commands, confusing names (device ID != IOS file descriptor),
duplicated checks, not keeping the indentation level low, and having
tons of things into a single function.

This commit gives more correct names to variables, deduplicates the
device checking code, and splits ExecuteCommand so that it's
easier to read.

It's worth noting that some device checks have been forgotten in the
past, which has caused a bug (which was recently fixed in 288e75f6).
2017-01-04 19:33:50 +01:00
Lioncash 2cfc0dc8b6 DSPDisassembler: directly initialize AssemblerSettings struct members
Same thing, less code.
2017-01-04 12:53:22 -05:00
Chris Burgener afdcddc0c5 Add missing new lines for OSD 2017-01-04 10:49:52 -05:00
Markus Wick 9f164d7c33 Merge pull request #4593 from lioncash/enum
JitRegCache: Move FlushMode enum into RegCache
2017-01-04 16:21:21 +01:00
Stenzek 176177af49 GeometryShaderGen: Use lower-left origin for point texture coordinates
From what I can tell, the emulated GPU places (0,0) at the lower left of
the image, and we were generating texture coordinates so that (0,0) was
at the upper-left in the expansion geometry shader, causing textures
used by point sprites to be flipped vertically.

Fixes the upside-down A button in Mario Golf.
2017-01-04 20:23:07 +10:00
PEmu1 2dae72f817 Clarify GameCube Controller in TAS Input 2017-01-03 18:03:17 -08:00
Markus Wick 36ced29a51 Merge pull request #4604 from lioncash/global
PatchEngine: Get rid of a global variable
2017-01-04 03:02:55 +01:00
Lioncash 5518c6625b PatchEngine: Get rid of a global variable 2017-01-03 18:59:33 -05:00
Markus Wick 0e279b6312 Merge pull request #4598 from stenzek/fifoplayer
FifoPlayer: Loop playback consistency, save texture memory to file
2017-01-03 12:57:22 +01:00
Stenzek 18792b2328 FifoPlayer: Don't set BPMEM_PRELOAD_MODE on load
Since in this case we're setting it based on the state at record start
time, not when a register is loaded, UseMemory would not be called, so
this could potentially wipe out texture memory that was valid.
2017-01-03 21:16:05 +10:00
Stenzek 5f3c878ba2 FifoPlayer: Save/restore texture memory state for fifo logs 2017-01-03 21:16:05 +10:00
Stenzek 438989668e FifoDataFile: Add support for storing texture memory state
This bumps the file version to 4.
2017-01-03 21:16:04 +10:00
Stenzek 5b315b7bb4 FifoPlayer: Reload initial state when looping back to first frame
This should ensure that when playing with loop enabled, the first frame is
in the same state each time. There is potentially still issues when the
start frame is set to something other than zero, but I'm not sure how we
could work around this without capturing the entire state on each frame.
2017-01-03 17:32:45 +10:00
aldelaro5 cc7c410cf1 Add debugging hotkeys
They are separated into 3 groups and will only be shown in the input config dialog if the emulator was in debug mode.
2017-01-02 18:16:52 -05:00
aldelaro5 00e03f1436 Update the breakpoint list after an add from the parent
Doing it from the add dialogs instead would prevent the call to these dialogs outside of a breakpointWindow which would be necessary for hotkeys binding.
2017-01-02 15:39:21 -05:00
Lioncash 342b76a594 DSPJitRegCache: Make single argument constructor explicit
Prevents implicit conversions.
2017-01-02 15:03:31 -05:00
Lioncash f8c6b3b5f1 JitRegCache: Move FlushMode enum into RegCache
This also makes it a strongly-typed enum.

Considering that the flushing mode is a trait/behavior for the register
cache, it doesn't really make sense to have the enum separate from it.

This also has the benefit of removing constants from global scope.
2017-01-02 13:43:37 -05:00
Anthony cbb0f78dd1 Merge pull request #4591 from lioncash/vnames
DSPJitRegCache: Make class variables conform to the coding style
2017-01-02 09:20:18 -08:00
Lioncash 3b4290b5b7 DSPJitRegCache: Make class variables conform to the coding style 2017-01-02 12:16:29 -05:00
Markus Wick 6aef0630f7 Merge pull request #4588 from JosJuice/isoproperties-title-encoding
ISOProperties: Fix encoding errors in window title
2017-01-02 12:33:58 +01:00
Markus Wick 96314a0ec1 Merge pull request #4574 from stenzek/vulkan-alpha-clear
Vulkan: Clear alpha channel to 0 when pixel format has no alpha channel
2017-01-02 12:29:36 +01:00
Anthony b46dcc7768 Merge pull request #4495 from slashiee/dump-textures-hotkey
Add a hotkey for toggling texture dumps
2017-01-01 17:28:56 -08:00
Mat M 3f5f7fc564 Merge pull request #4590 from hthh/macos-no-pch-fix
macOS: Add missing includes to fix no-PCH build
2017-01-01 20:27:30 -05:00
Anthony a7f7ccc9d2 Merge pull request #4523 from RisingFog/overwrite_audio_warning
Display warning when dumping audio if file exists
2017-01-01 17:20:39 -08:00
hthh 387164a999 macOS: Add missing includes to fix no-PCH build 2017-01-02 11:45:24 +11:00
Mat M b10a0de769 Merge pull request #4535 from lioncash/regcache
Jit64: Make register caches not rely on the global jit variable
2017-01-01 18:01:29 -05:00
Mat M 6c5063c76b Merge pull request #4585 from lioncash/dspnamespace
DSP: Namespace remaining un-namespaced DSP code
2017-01-01 17:54:39 -05:00
Anthony 4c90ad7514 Merge pull request #4490 from leoetlino/wii-dsy
Add common Wii SDK function signatures to the signature DB
2016-12-31 16:31:50 -08:00
Anthony e8052fbf78 Merge pull request #4587 from aldelaro5/fix-hidpi-mic
Add an empty spacer in the Mic Input config dialog
2016-12-31 16:24:46 -08:00
Michael Maltese 35fe8f762a InputConfigDiag: move function bodies out of header 2016-12-31 15:47:56 -08:00
JosJuice 65d88776db ISOProperties: Fix encoding errors in window title
It seems to be a regression, but I haven't bisected it.
2017-01-01 00:34:29 +01:00
aldelaro5 d6674223db Fix some margin discrepancies 2016-12-31 17:58:39 -05:00
Lioncash 3eb25cea6f DSP: Namespace remaining un-namespaced DSP code 2016-12-31 17:20:14 -05:00