Commit Graph

16616 Commits

Author SHA1 Message Date
Pierre Bourdon 45d27f7fc7 CommonPaths: Add D_WFSROOT_IDX.
Defaults to $USERDIR/WFS. Used to store the contents normally stored on
WFS mass storage devices.
2017-01-14 17:06:40 +01:00
Pierre Bourdon a8f7012cf7 IOS/ES: Implement basic title installation.
There are several things wrong with this implementation. The first being
that since we still don't have a proper ticket/tmd handling library, we
hardcode offsets once again to fetch TMD fields. The second being that
we don't stream data to the disk and we buffer everything in memory. The
third being that we don't properly fetch the content index for
decryption, which is prone to breaking.

But hey, it works well enough to install the DQX channel!
2017-01-14 17:06:40 +01:00
Pierre Bourdon 0a5cfd8946 IOS: Add ESFormats.{cpp,h}.
This library implements basic parsing support for some of the IOS ES
formats we need to extract data from. Currently only implements TMD
functions, but some ticket handling functions from DiscIO should likely
be moved here in the future.
2017-01-14 17:06:40 +01:00
Pierre Bourdon 334ddf754e DiscIO: Export GetKeyFromTicket
This function has more uses than just in DiscIO (e.g. WFS).
2017-01-14 17:06:40 +01:00
Pierre Bourdon 650a1fdb1f DiscIO: Implement functions to lookup tickets
These two functions load either a signed ticket or a raw ticket from the
emulated NAND.

The ticket signature skip is refactored out of the ticket writing in
order to be usable by the raw ticket reading function.
2017-01-14 17:06:40 +01:00
Pierre Bourdon 2ed352698f IOS/ES: Implement ES_AddTicket.
Refactor the existing DiscIO::AddTicket to not require the caller to
pass the requested title ID. We do not have the title ID in the ES case,
and it needs to be extracted from the ticket. Since this is always a
safe operation to do (title ID is always in the ticket), the
implementation is made default.
2017-01-14 15:23:16 +01:00
Pierre Bourdon c30635c70a IOS/ES: Factor out the ES_Decrypt implementation.
WFSI calls into ES to perform this operation, so expose a way for us to
do the same thing.
2017-01-14 15:23:16 +01:00
hthh 5d4e4aa561 TextureDecoder: Fix off-by-one errors in CMPR 2017-01-14 10:52:35 +11:00
Lioncash 45415e1057 ColorUtil: Make decodeCI8image's pal parameter const 2017-01-13 17:07:26 -05:00
Matthew Parlane 30e57cecf7 Merge pull request #4653 from lioncash/dsp-define
DSPInterpreter: Get rid of a #define constant
2017-01-14 10:54:48 +13:00
Jules Blok 271a9fe7a9 VertexShaderManager: Break up the conditions to make it readable. 2017-01-13 14:01:17 +01:00
Jules Blok f866748006 VertexShaderGen: Remove the need for an extra UID. 2017-01-13 14:01:17 +01:00
Matthew Parlane ad84b904e4 Merge pull request #4496 from Mystro256/master
Fix GCC build issue with Fedora (linux)
2017-01-13 23:13:08 +13:00
Matthew Parlane 0d43b0e0e4 Merge pull request #4652 from lioncash/memcard
GCMemcard: Const-correctness changes
2017-01-13 23:09:08 +13:00
Lioncash 35cc4a4202 DSPInterpreter: Get rid of a #define constant
This constant isn't particularly helpful, mainly because it's not
applicable to all DSP instructions. Some instructions don't have encoding
space for registers, and not all instructions that do encode registers
have one at the first five bits.

This change also has the benefit of removing all includes to the
interpreter within the JIT code, which keeps them fully separate from one
another. Changes to the interpreter header won't require some of the JIT
code to be rebuilt.
2017-01-12 20:36:52 -05:00
Lioncash 0035a4ef3d GCMemcard: Const-correctness changes
A few function reference and pointer parameters are only read from.
2017-01-12 20:01:19 -05:00
Léo Lam 5fd486014b DolphinWX: Always keep panic alerts on top
This should prevent silly things like panic alerts opening *behind* the
render window and thus being impossible to see.
2017-01-12 23:40:58 +01:00
Matthew Parlane 5790f15be8 Merge pull request #4299 from sepalani/hle_symbols
SymbolDB: Multiple symbols detection allowed
2017-01-13 10:05:32 +13:00
Matthew Parlane 9838afea41 Merge pull request #4479 from GerbilSoft/feature/RVT-R.dev-key
Support for RVT-R disc images
2017-01-13 09:56:50 +13:00
Matthew Parlane 22546aef37 Merge pull request #4499 from ligfx/msgalertmainthread
DolphinWX: pass wxMsgAlert to main thread on non-GTK too
2017-01-13 09:52:09 +13:00
Matthew Parlane 24f7ebc890 Merge pull request #4420 from JosJuice/memcard-header-time
Don't use GetEmulatedTime in GCMemcard
2017-01-13 09:49:35 +13:00
degasus fe41ed7fa1 JitCache: Use pointers in the ICache and dispatchers. 2017-01-12 21:43:28 +01:00
Léo Lam 64101137cd Remove pre-generated SYSCONF
Dolphin is able to generate one with all correct default settings, so
we don't need to ship with a pre-generated SYSCONF and worry about
syncing default settings.

Additionally, this commit changes SysConf to work with session SYSCONFs
so that Dolphin is able to generate a default one even for Movie/TAS.
Which SYSCONF needs to be touched is explicitly specified to avoid
confusion about which file SysConf is managing.

(Another notable change is that the Wii root functions are moved into
Core to prevent Common from depending on Core.)
2017-01-12 21:30:11 +01:00
Matthew Parlane d346d4ced1 Merge pull request #4544 from JosJuice/region-enum
DiscIO: Add GetRegion function and Region enum
2017-01-13 09:19:27 +13:00
Matthew Parlane 34c6672b97 Merge pull request #4446 from leoetlino/countries
ConfigManager: Don't overwrite the SYSCONF country
2017-01-13 09:09:56 +13:00
Matthew Parlane 356619642b Merge pull request #4647 from degasus/jitcache
JitCache: Clean up block id handling.
2017-01-13 09:00:46 +13:00
degasus d4a529614a Jit64: Use PPCSTATE reg if possible. 2017-01-12 20:55:17 +01:00
degasus a8b26937f3 JitCache: Clean up GetBlockFromStartAddress. 2017-01-12 20:24:43 +01:00
degasus 214f37ecef JitCache: Rename variables. 2017-01-12 20:23:14 +01:00
degasus 3ee178abe7 JitCache: Drop unused functions. 2017-01-12 20:23:14 +01:00
degasus 7e850361fb JitCache: Add a helper function to iterate over all blocks. 2017-01-12 20:23:14 +01:00
degasus ca026b58ab JitCache: Use a pointer in links_to. 2017-01-12 20:23:14 +01:00
degasus 928ccbef53 JitCache: Use a pointer in block_map. 2017-01-12 20:23:14 +01:00
degasus 74a27d9742 JitCache: Use a pointer in start_block_map. 2017-01-12 20:23:14 +01:00
degasus 2d5288dc10 JitCache: Return a pointer in AllocateBlock. 2017-01-12 20:23:14 +01:00
degasus f14cebf079 JitCache: Use a pointer in FinalizeBlock. 2017-01-12 20:23:14 +01:00
degasus d3aa8c8080 JitCache: Return a pointer in GetBlockFromStartAddress. 2017-01-12 20:23:14 +01:00
degasus f6ec96efbd JitCache: Use a pointer in DestroyBlock. 2017-01-12 20:23:14 +01:00
degasus 68c85d32f7 JitCache: Use a pointer in UnlinkBlock. 2017-01-12 20:23:14 +01:00
degasus eb390f3020 JitCache: Use a pointer in LinkBlock. 2017-01-12 20:23:14 +01:00
degasus ccb8c44a5a JitCache: Use a pointer in LinkBlockExits. 2017-01-12 20:23:14 +01:00
Matthew Parlane 119dfbb436 Merge pull request #4648 from lioncash/iofile
IOFile: Get rid of IOFile's ReleaseHandle function
2017-01-13 08:15:23 +13:00
Lioncash 6f08ef9a25 IOFile: Get rid of IOFile's ReleaseHandle function
Transfer of handles should be done via std::move.
2017-01-12 12:34:06 -05:00
Matthew Parlane 0b6e5765dd Merge pull request #4610 from ligfx/fixgamelist
DolphinWX: Fix position of GameListCtrl tooltips on macOS
2017-01-12 14:18:05 +13:00
Michael Maltese fdcf5aeb75 DolphinWX: Fix position of GameListCtrl tooltips on macOS 2017-01-11 16:59:15 -08:00
Matthew Parlane 04a86e1cee Merge pull request #4646 from leoetlino/minor-simplifications
IOS HLE: Minor simplifications
2017-01-12 12:32:05 +13:00
Matthew Parlane ed6e346664 Merge pull request #4617 from lioncash/hotkey
HotkeyInputConfigDialog: Move UI creation into named functions
2017-01-12 11:02:10 +13:00
Matthew Parlane c765087548 Merge pull request #4645 from lioncash/breakpoints
BreakPoints: Minor changes
2017-01-12 11:01:11 +13:00
Lioncash b760479f77 BreakPoints: Use std::any_of where applicable 2017-01-11 16:37:31 -05:00
Léo Lam 13c374b118 IOS HLE: Replace some loops with range-based loops 2017-01-11 21:20:15 +01:00
Léo Lam 36c4dda4ed IOS HLE: Simplify Reset() and SetDefaultContentFile()
Reset():
We only need to close IOS devices which were opened, and we can do that
simply by iterating over s_fdmap and closing any opened device.
With this change, s_device_map can be cleared at once.

SetDefaultContentFile():
We can just use s_es_handles which is guaranteed to contain three valid
ES devices. Gets rid of a downcast.
2017-01-11 17:52:28 +01:00
Lioncash e97953130d BreakPoints: Use character literals for finding single characters
The single character find overload is better suited over the one for
finding character sequences.
2017-01-11 10:08:14 -05:00
Lioncash 4e649c60c0 BreakPoints: Make getters const member functions
Just const-correctness stuff. The returned collection can't be modified,
so this makes sense.
2017-01-11 10:08:14 -05:00
Lioncash 0f8bcf412d BreakPoints: Rename variables
Drops Hungarian notation where applicable.Drops Hungarian notation where
applicable.
2017-01-11 10:08:11 -05:00
Lioncash 274ab8a262 BreakPoints: Make the memchecks class member private
There's no need to make this public.
2017-01-11 10:07:34 -05:00
Markus Wick f82d6c6fe1 Merge pull request #4644 from leoetlino/no-return-value
IOS HLE: Make Device::Update() return void
2017-01-11 15:09:41 +01:00
Mat M 55b82e323c Merge pull request #4537 from JosJuice/blob-open-less-files
Open less files when detecting/opening blobs
2017-01-11 08:30:16 -05:00
Léo Lam 15567ef2bf IOS HLE: Remove useless overrides in bt_stub
Since the Open command won't ever return with the stub, there's no way
we will get a Close/IOCtl/IOCtlV for it, so we don't have to
implement it at all.
2017-01-11 14:06:01 +01:00
Léo Lam f66aab6381 IOS HLE: Make Device::Update() return void
The return value is not used at all, so it's useless to keep it.
And the semantics of the return value were not even well defined.
2017-01-11 14:06:01 +01:00
Lioncash 93c5c0213f BreakPoints: Convert typedefs into using aliases 2017-01-11 07:59:43 -05:00
Lioncash 50ee01754e BreakPoints: Add initializers for TBreakPoint and TWatch
Ensures all members are consistently initialized.
2017-01-11 07:55:43 -05:00
Lioncash 588374349f BreakPoints: In-class initialize TMemCheck members
Same thing, less code.
2017-01-11 07:53:49 -05:00
JosJuice b1873264d7 WbfsBlob: Don't wrap file_entry in std::unique_ptr
There doesn't seem to be any reason for doing it.
2017-01-11 13:39:46 +01:00
JosJuice 0363be4320 WbfsBlob: Remove m_total_files
std::vector already keeps track of this for us.
2017-01-11 13:39:38 +01:00
JosJuice 5c02795af0 WbfsBlob: Only open each file once
The first file used to be opened once by
CreateBlobReader and once inside WbfsFileReader.
2017-01-11 13:33:27 +01:00
JosJuice 8d54bbc528 Don't create new IOFiles when creating a blob
...except for WBFS, which is special because
it has the ability to open multiple files.
2017-01-11 13:23:23 +01:00
JosJuice d1ea00ed88 Only open file once when detecting blob type 2017-01-11 13:23:19 +01:00
Markus Wick d9a37d38b4 Merge pull request #4571 from degasus/DSPHLE
Attempt re-adding the missing AXWii DSP_SYNC
2017-01-10 22:23:35 +01:00
Jack Andersen 3869eec53a DSP: Clean up GBA crypto HLE implementation 2017-01-10 10:34:34 -10:00
Markus Wick 52ec186f0a Merge pull request #4642 from stenzek/split-x64-texture-decoders
TextureDecoder: Seperate each format into its own function
2017-01-10 12:06:47 +01:00
Stenzek 2f223e24dc TextureDecoder: Seperate each format into its own function 2017-01-10 20:41:00 +10:00
Lioncash ea8fc594a5 Common: Move BreakPoints into Core
BreakPoints utilizes the jit global variable, so this was making Core and
Common cyclical dependencies on one another.
2017-01-10 05:24:44 -05:00
Matthew Parlane ab2542ea41 Merge pull request #4630 from PEmu1/refresh-game-list
Change "Refresh List" to "Refresh Game List" in Menu
2017-01-10 14:06:23 +13:00
Markus Wick 440a2f832c Merge pull request #4637 from lioncash/jitcache
JitCache: Get rid of reliance on the JIT global variable
2017-01-10 00:07:17 +01:00
Léo Lam a68aea1ace IOS HLE: Replace is_hardware with a proper device type
is_hardware is an obscure name (what does hardware mean?) and it forces
us to assume that anything that !is_hardware is a FileIO device. This
assumption prevents properly restoring OH0 child devices (which will be
implemented in the USB PR), so this commit replaces the is_hardware
bool with a device type.
2017-01-09 12:27:45 +01:00
Lioncash 37d10064b8 JitCache: Get rid of reliance on the JIT global variable 2017-01-09 04:43:06 -05:00
Lioncash f75aab1a85 CachedInterpreter: Separate the block cache from CachedInterpreter
An interpreter is not a block cache. It may utilize a block cache, it may
contain a block cache but it *is not* A block cache.
2017-01-09 04:43:05 -05:00
Lioncash eddccb3891 CachedInterpreter: Move to its own directory 2017-01-09 04:43:05 -05:00
Lioncash 2b8ede8dc6 JitCache: Move implementation details into the cpp file 2017-01-09 04:43:04 -05:00
Lioncash cf18aeb1eb JitCache: Move private class details below public details
Also organizes cpp file organization to match the function layout.
2017-01-09 04:42:59 -05:00
Lioncash 1dab2c8816 IOFile: Correct explicit operator bool semantics
The operator void* variant was m_good ? m_file : nullptr;
so this was leaving out the file handle check.
2017-01-08 22:52:44 -05:00
Matthew Parlane 0869c63048 Merge pull request #4634 from leoetlino/probably-pointless-ios-fixes
IOS HLE: Minor changes to match IOS behaviour
2017-01-09 13:49:32 +13:00
Lioncash 00baf193ac CodeBlock: Const correctness for IsInSpace 2017-01-08 18:40:09 -05:00
Léo Lam c761ac4f08 IOS HLE: Set return value to EINVAL for unknown commands
This matches IOS behaviour and allows getting rid of command handlers
which merely set the return value to EINVAL.
2017-01-08 21:18:08 +01:00
Léo Lam 45b59f01b8 IOS HLE: Allow up to 3 ES handles
Confirmed by a hardware test and a quick diassembly of /dev/es.

I'm not aware of anything that opens several ES handles, but
technically, this fixes a small inaccuracy in IOS HLE.
2017-01-08 21:16:10 +01:00
Léo Lam 23162ac722 IOS HLE: STM: Check if there is already an event hook
For IOCTL_STM_EVENTHOOK, IOS checks if there is already an event hook
to prevent overriding an existing event hook message with a new one,
without first releasing it.
2017-01-08 21:16:10 +01:00
Matthew Parlane 5135445298 Merge pull request #4627 from leoetlino/naming-cleanup
IOS HLE: Naming cleanup
2017-01-09 09:08:50 +13:00
Chris Burgener 47b3a9c68e Add Silent Audio Dumping INI Option 2017-01-08 13:53:44 -05:00
PEmu1 b25ed121d1 Change "Refresh List" to "Refresh Game List" in Menu
Make refresh list option more clear as to what it does and more consistent with other usage in the UI.
2017-01-08 09:24:17 -08:00
flacs c30216003e Merge pull request #4622 from degasus/videosw
VideoSW: Fix GL ES shader.
2017-01-08 17:03:57 +00:00
Lioncash 27350dbf1c Jit64Base: Use size_t to represent size in LogGeneratedX86 2017-01-07 21:57:19 -05:00
Lioncash 77756b44d5 Jit64Base: Const correctness for LogGeneratedX86 2017-01-07 21:53:06 -05:00
Matthew Parlane 7a4464c3e0 Merge pull request #4599 from stenzek/point-uvs
GeometryShaderGen: Use lower-left origin for point texture coordinates
2017-01-08 13:40:55 +13:00
Léo Lam 1f9269d0ea ConfigManager: Don't overwrite the SYSCONF country
Currently, the country is always overridden depending on the Wii
language setting. This makes it impossible to change the country
independently from the language, unlike on a Wii, since a language
will always be associated to an unique country (which is hardcoded
in Dolphin's codebase).

This behaviour was added in c881262 and changed in PR 4319 to happen
every time emulation is started. It doesn't seem to be needed anymore,
as a quick testing shows that a Japanese system menu is able to load
in Japanese even with the region set to France, or anything other than
Japan in fact. So what this commit changes is drop this code.

Fixes issue 9884.
2017-01-08 01:28:43 +01:00
Léo Lam c28b148783 IOS HLE: Clean up naming and remove unused defines
Removes #defines which have been unused for years and cleans up
naming.

This also changes IPC_REP_ASYNC to simply IPC_REPLY because it turns
out it's actually not specific to async replies, but used for all
command replies.
2017-01-08 01:20:40 +01:00
Léo Lam 7dcb3c5d55 IOS HLE: Clean up return codes
- Use an enum instead of defines.

- Only use the FS_ prefix for return codes which are actually related
  to FS stuff, not for everything.

- Remove duplicated error codes and clean up the names.
2017-01-08 01:20:35 +01:00
Matthew Parlane 7a5fe4b7ed Merge pull request #4624 from leoetlino/jit-warning-fixes
Add the g_ prefix to the jit global
2017-01-08 13:19:16 +13:00
Matthew Parlane c89aa79380 Merge pull request #4626 from lioncash/size
CodeBlock: Get rid of implicit sign-conversion in AllocCodeSpace
2017-01-08 13:14:02 +13:00
Lioncash 9d8e8652fb CodeBlock: Get rid of implicit sign-conversion in AllocCodeSpace
Size is internally stored as a size_t, so having an int parameter
would cause implicit sign-conversion from a signed value to an
unsigned value to occur.
2017-01-07 19:05:06 -05:00
Léo Lam 22fcb735ed IOS HLE: HID: Remove left-over align function
Also remove unneeded AlignUp usages.
2017-01-08 00:36:04 +01:00
Léo Lam 3c50c61606 IOS HLE: Remove copy and pasted Open()/Close()
This removes Open() and Close() functions from devices whenever they
did nothing more than the base class (setting m_Active, returning a
default reply).

Also, since IOS close commands practically always return FS_SUCCESS,
writing the return code is moved to HandleCommand() in WII_IPC_HLE,
which has two benefits: it's not duplicated all over the place
(so people will not forget it) and it gets rid of having to check
the force parameter, since HandleCommand() is always called for
real IOS commands, so command_address is guaranteed to be valid.
2017-01-07 23:31:04 +01:00
Léo Lam 27e6363214 IOS HLE: Remove unneeded GetDeviceID() writes
It looks like at some point Dolphin device IDs coincided with IOS file
descriptors, but this is not the case anymore, so keeping those
WriteReturnCode(GetDeviceID()) in every single IOS HLE device,
as if the device ID was used as IOS fd, is both unnecessary
and confusing.
2017-01-07 23:30:59 +01:00
Matthew Parlane 7847ca41e2 Merge pull request #4607 from leoetlino/execute
IOS HLE: Refactor ExecuteCommand
2017-01-08 11:20:49 +13:00
Léo Lam 8bef7259e3 Add the g_ prefix to the jit global
Jan 04 22:55:01 <leoetlino>   fwiw, it looks like there are new warnings in the RegCache code
Jan 04 22:55:04 <leoetlino>   Source/Core/Core/PowerPC/Jit64/FPURegCache.cpp:13:33: warning: declaration shadows a variable in the global namespace [-Wshadow]
Jan 04 22:56:19 <@Lioncash>   yeah, the jit global should have a g_ prefix.

This fixes shadowing warnings and adds the g_ prefix to a global.
2017-01-07 23:19:49 +01:00
degasus f12460d1f4 VideoSW: Fix GL ES shader. 2017-01-07 12:32:15 +01:00
Matthew Parlane 82e003ebb6 Merge pull request #4620 from JosJuice/android-byteswap
Don't use generic byteswapping on Android
2017-01-07 14:01:33 +13:00
degasus f6c7a258ed BlendState: Use masking as a fastpath for the logic op NO_OP. 2017-01-06 14:01:39 +01:00
degasus 23b0faeba5 OGL: Use VideoCommon blend state for framebuffer configuration. 2017-01-06 14:01:39 +01:00
degasus 3df828463d VideoCommon: Assembly blending state in a shared state object. 2017-01-06 14:01:36 +01:00
JosJuice 5e2b2f059f Don't use generic byteswapping on Android
This seems to work fine nowadays.
2017-01-06 13:56:53 +01:00
Markus Wick c33c9532a7 Merge pull request #4594 from lioncash/regcache
DSPJitRegCache: Make single argument constructor explicit
2017-01-06 13:01:40 +01:00
Markus Wick 878058ce68 Merge pull request #4613 from lioncash/scrubber
DiscScrubber: Minor changes
2017-01-06 13:00:51 +01:00
Markus Wick 82d45435fd Merge pull request #4616 from lioncash/hle
HLE: Align table formatting
2017-01-06 12:57:16 +01:00
Markus Wick c633eeb383 Merge pull request #4619 from PEmu1/configuration
Change "Configure" to "Configuration" in Menu
2017-01-06 12:54:17 +01:00
PEmu1 398d544ebf Change "Configure" to "Configuration" in Menu
Other settings options are nouns rather than verbs so this change makes the configuration option consistent with others. Also makes the menu option label the same as the windows title.
2017-01-05 14:33:24 -08:00
Lioncash 89da37b1c6 HotkeyInputConfigDialog: Move UI creation into named functions
The constructor shouldn't be used as a dumping ground for all UI-related
initialization. Doing so makes it somewhat more difficult to reason about
how certain UI elements get created. It also puts unrelated identifiers in
the same scope.

This separates the UI creation out so code relevant to each component
is self-contained.
2017-01-05 16:26:42 -05:00
Mat M e7359f247b Merge pull request #4595 from aldelaro5/add-debugger-hotkeys
Add debugger hotkeys
2017-01-05 14:33:10 -05:00
Mat M 6fe621f203 Merge pull request #4589 from ligfx/cleaninputconfigdiag
InputConfigDiag: move function bodies out of header
2017-01-05 14:29:35 -05:00
Mat M 0de4ad334f Merge pull request #4605 from PEmu1/tas-gamecube-contro
Clarify GameCube Controller in TAS Input
2017-01-05 14:28:54 -05:00
Mat M 495580637f Merge pull request #4606 from BhaaLseN/clang-format-union
specify custom brace style to fix unions
2017-01-05 14:27:27 -05:00
Mat M 9da6982ac3 Merge pull request #4608 from RisingFog/input_display_newlines
Add missing new lines for OSD
2017-01-05 14:25:24 -05:00
Mat M 189e5f87fb Merge pull request #4612 from PEmu1/memcard-menu
Don't Use Abbreviation for "Memory Card"
2017-01-05 14:22:54 -05:00
Lioncash a10bb15f17 HLE: Add explicit initializers for OSBreakPoints' stub entry
No behavior change, this just makes implicit values explicit.
2017-01-05 14:15:45 -05:00
Lioncash 2941468857 HLE: Align table formatting 2017-01-05 14:13:30 -05:00
PEmu1 6d195f3d65 Don't Use Abbreviation for "Memory Card" 2017-01-05 10:06:46 -08:00
BhaaL 23d99f2f2c specify custom brace style to fix unions
BreakBeforeBraces: Allman apparently includes all styles,
except for AfterUnion (which is false) when using clang-format -dump-config
2017-01-05 12:55:13 +01:00
JosJuice 41101be545 Merge pull request #4611 from lioncash/fileutil
IOFile: Minor changes
2017-01-05 09:17:03 +01:00
Lioncash a93861ab49 DiscScrubber: Don't take SFileInfo instances by value
Avoids unnecessary copies.
2017-01-04 20:12:49 -05:00
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
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
Michael Maltese 443815df16 DolphinWX: pass wxMsgAlert to main thread on non-GTK too
Fixes an issue on macOS where wxMessageBox always returns wxCANCEL when
not called from main thread.
2017-01-04 14:06:31 -08: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
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
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
JosJuice c5e731644c Don't use GetEmulatedTime in GCMemcard
GCMemcard is only used outside of the core and has
no real reason to use the core's RTC. GetEmulatedTime
isn't designed to be called when the core isn't running.
Should fix https://bugs.dolphin-emu.org/issues/9871
2017-01-04 19:17:51 +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
Lioncash 5518c6625b PatchEngine: Get rid of a global variable 2017-01-03 18:59:33 -05: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
JosJuice ec969da6bd EXI_DeviceIPL: Remove m_bNTSC
It's only used in the constructor.
2017-01-02 21:08:24 +01:00
Lioncash 342b76a594 DSPJitRegCache: Make single argument constructor explicit
Prevents implicit conversions.
2017-01-02 15:03:31 -05:00
JosJuice f85266df20 SConfig: Replace bNTSC with m_region
This lets us get rid of VideoInterface::SetRegionReg,
a huge hack in CEXIMemoryCard, and some minor things.
2017-01-02 20:57:48 +01:00
JosJuice 66ea9f5cc1 DiscIO: Add GetRegion function and Region enum
Instead of needing different switch cases for
converting countries to regions in multiple places,
we now only need a single country-to-region switch case
(in DiscIO/Enums.cpp), and we get a nice Region type.
2017-01-02 20:57:11 +01: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
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
aldelaro5 42e4dde960 Add an empty spacer in the Mic Input config dialog
This is done to not have the device combo box be too small in width when making the main sizer fit into the window.  Not fitting the sizer would alternatively break Hidpi so it was best to just add an empty sizer to workaround this problem.
2016-12-31 16:17:47 -05:00
JosJuice 15de7d507f Merge pull request #4519 from sepalani/fix_import_save
Fixes WiiSave import
2016-12-31 12:33:45 +01:00
aldelaro5 a447213420 Remove the menu hotkeys of the debug menu bar
I think it's best to remove these if we are going to be adding new hotkeys since these would work no matter what so I can simply make these the default one instead.
2016-12-30 14:18:10 -05:00
Jules Blok a2e191649d Merge pull request #4471 from Armada651/hybrid-depth
VideoCommon: Don't process the depth range in the vertex shader if it's not oversized.
2016-12-29 18:49:27 +01:00
Lioncash efbf261e97 DSPAnalyzer: Fix two clang warnings about sign mismatched types 2016-12-29 10:10:38 -05:00
Lioncash 2aefa29941 DSP: Add the interpreter to the DSP namespace 2016-12-29 07:05:17 -05:00
Lioncash c79cc3f470 DSP: Namespace the JIT 2016-12-28 20:38:41 -05:00
Lioncash 407f3af8c3 JitRegCache: Get rid of reliance on the jit global variable 2016-12-28 17:52:58 -05:00
Lioncash 8ece485a2f JitRegCache: Make member variables conform to our coding style 2016-12-28 17:47:26 -05:00
Lioncash e291e8f1a7 JitRegCache: Convert #define macro into a typed constant 2016-12-28 17:47:26 -05:00
Lioncash 4ae23fc45c JitRegCache: Remove unused typedefs 2016-12-28 17:47:26 -05:00
Lioncash b629eb300a JitRegCache: Remove unused Flush function
This was kind of a pointless function, considering the parameter wasn't
used at all, so the other Flush() function could have been just directly
used instead.
2016-12-28 17:47:26 -05:00
Lioncash 41d47dda93 JitRegCache: Move implementation details into the cpp file where applicable
Any future changes to these register cache functions won't require everything that includes the register cache header to also be recompiled.
2016-12-28 17:47:26 -05:00
Lioncash d1fc694c02 JitRegCache: Move protected interface below public interface 2016-12-28 17:47:26 -05:00
Lioncash 1a34376f3a JitRegCache: Separate FPURegCache and GPRRegCache into their own files
Keeps them separated from one another and makes it less annoying to find
member functions (which were previously spread out all over the place).
2016-12-28 17:47:25 -05:00
Markus Wick 10b4f6a250 Merge pull request #4568 from degasus/texcache
TextureCache: Add a dirty bit for partial updates on overlapping EFB copies.
2016-12-28 16:38:16 +01:00
Michael Maltese 905750553f ControllerEmu: Fix LoadDefaults to use ciface argument 2016-12-27 17:46:40 -08:00
Lioncash 5c938ed41f DSPTables: Move function type aliases into DSPOPCTemplate
Gets two typedefs out of global scope
2016-12-27 18:31:42 -05:00
Jules Blok ee7a2edf35 Update comments 2016-12-27 21:32:52 +01:00
Jules Blok 65b5765858 VideoBackends: Clamp the range to the maximum depth value supported in the z buffer. 2016-12-27 20:25:40 +01:00
degasus d0a73c1d90 TextureCache: Add a dirty bit for partial updates on overlapping EFB copies. 2016-12-27 17:26:04 +01:00
Jules Blok 2ab6711f43 VideoBackends: Use the full depth range when inverted depth range is unsupported. 2016-12-27 14:31:17 +01:00
Jules Blok ef82aebb97 VideoCommon: Don't process the depth range in the vertex shader if it's not oversized. 2016-12-27 14:31:17 +01:00
Markus Wick 8e506cb974 Merge pull request #4572 from lioncash/flags
DSPAnalyzer: Hide implementation details
2016-12-27 10:36:12 +01:00
Stenzek e6249619a0 Vulkan/GL: Set the alpha channel to 0 when creating the EFB framebuffer 2016-12-27 13:06:08 +10:00
Techjar dd00f9ea34 Should fix being unable to change memory card slot A 2016-12-26 22:03:14 -05:00
Stenzek d1dd910f17 Vulkan: Clear alpha channel to 0 when pixel format has no alpha channel 2016-12-27 12:59:52 +10:00
Lioncash 12e335025d DSPEmitter: Make FlagsNeeded() a const member function
This doesn't modify any class data.
2016-12-26 21:18:24 -05:00
Lioncash a8459fc189 DSPAnalyzer: Hide implementation details
Makes accessing flags a part of the function interface instead of exposing
an internal variable.
2016-12-26 21:18:18 -05:00
Markus Wick cd29d565c4 Merge pull request #4570 from lioncash/dspemit
DSPEmitter: Minor cleanup
2016-12-27 02:05:10 +01:00
Pierre Bourdon 6b65344ccf axwii: re-add the missing sync -- might work better with the new MailHandler implementation 2016-12-27 02:03:58 +01:00
Pierre Bourdon 7c4bbcf22f ax: switch to new style interrupt triggering 2016-12-27 02:03:55 +01:00
Markus Wick fd54d4f767 Merge pull request #4569 from degasus/texcache2
TextureCache: Extract BP enum check to VideoCommon.
2016-12-27 01:43:57 +01:00
Lioncash 50b1fcb1ed DSPEmitter: Initialize compileSR in the initializer list 2016-12-26 19:42:09 -05:00
Lioncash f3d353a85d DSPEmitter: Move typedefs into DSPEmitter
Keeps them associated with the emitter itself, rather than just letting
them sit in global scope.
2016-12-26 19:19:39 -05:00
Lioncash 646d96a216 DSPEmitter: Convert defines into typed constants
Also moves them into more qualified scopes where possible.
2016-12-26 19:16:01 -05:00
Lioncash c37889efcb DSPEmitter: Use std::vector instead of raw allocation 2016-12-26 19:03:35 -05:00
Lioncash 400d5f6940 DSPEmitter: In-class initialize variables 2016-12-26 18:07:15 -05:00
degasus abf9bb170b TextureCache: Drop unused parameter in backend API. 2016-12-26 22:10:32 +01:00
degasus 04f319066d TextureCache: Extract BP enum check to VideoCommon.
We have TOO many video backends.
2016-12-26 22:10:21 +01:00
Mat M 1af9f68240 Merge pull request #4566 from JosJuice/charset-terminology
Remove incorrect usage of "ASCII" and "ANSI"
2016-12-26 15:40:45 -05:00
JosJuice 0f1ce0e1f4 Remove incorrect usage of "ASCII" and "ANSI"
Windows-1252 was sometimes being referred to as ASCII or ANSI
in Dolphin, which is incorrect. ASCII is only a subset of
Windows-1252, and ANSI is (rather improperly) used in Windows
to refer to the current code page (which often is 1252 on
Western systems, but can also be something entirely different).

The commit also replaces "SJIS" with "Shift JIS". "SJIS"
isn't misleading, but "Shift JIS" is more commonly used.
2016-12-26 15:49:39 +01:00
degasus 8f9f2b1f76 DSPHLE: Seperate HLE construction and initialization.
We must be able to construct the HLE without emulating the initialization
on loading a savestate.
2016-12-26 12:25:57 +01:00
Markus Wick 4ebd369218 Merge pull request #4564 from JosJuice/volumedirectory-references
VolumeDirectory: Don't use references inappropriately
2016-12-26 11:48:38 +01:00
JosJuice 8e4a781974 VolumeDirectory: Modernize variable names 2016-12-26 11:45:22 +01:00
JosJuice 00aa2d37e9 VolumeDirectory: Don't use references inappropriately
Integers should be passed as pointers when a function
modifies them (to make it clear that they get modified).
2016-12-26 09:52:18 +01:00
flacs 2d1bdae1f0 Merge pull request #4563 from lioncash/dspemit
DSPEmitter: Get rid of an unused member variable
2016-12-26 04:07:07 +01:00
Lioncash 042045012b DSPEmitter: Get rid of an unused member variable 2016-12-25 21:31:17 -05:00
Tillmann Karras 57a005ff3e evdev: reduce startup time
GetName() creates a new evdev device which calls tons of ioctls. But the
main culprit is close() which for input devices appears to be a slow
path in the kernel.

This commit reduces PopulateDevices() by 50% on my laptop, but ~730 ms
is still ridiculously slow for something that isn't needed right away.
2016-12-26 01:24:35 +01:00
Mat M 9c8e27e3bb Merge pull request #4558 from JosJuice/volumedirectory-fst-sort
VolumeDirectory: Sort the FST
2016-12-25 17:38:58 -05:00
Mat M 81d452ecda Merge pull request #4551 from JosJuice/movie-controller-comment
Movie: Replace incorrect name and comment for numControllers
2016-12-25 17:36:27 -05:00
Mat M 40e36ebd1e Merge pull request #4550 from linkmauve/no-readdir_r
Common: Replace deprecated readdir_r with readdir
2016-12-25 17:34:50 -05:00
Mat M 8ad6c3e911 Merge pull request #4555 from JosJuice/right-click-host-name
Fix player name not being loaded when using "Host with Netplay..."
2016-12-25 17:32:26 -05:00
Mat M 8da0396fc4 Merge pull request #4559 from JosJuice/volumedirectory-totalnamesize-local
VolumeDirectory: Make m_totalNameSize a local variable
2016-12-25 17:30:21 -05:00
Mat M 29ec069ac6 Merge pull request #4552 from JosJuice/pr-4461-translations
Mark strings added by PR #4461 for translation
2016-12-25 17:06:32 -05:00
JosJuice 3196f697bb VolumeDirectory: Use a range-based for loop in ComputeNameSize 2016-12-25 23:01:42 +01:00
JosJuice f3987d13ea VolumeDirectory: Make m_totalNameSize a local variable
After BuildFST finishes executing, it's never needed again.
2016-12-25 22:57:14 +01:00
Mat M d1defd71df Merge pull request #4557 from JosJuice/scandirectorytree-comments
Fix outdated comments in ScanDirectoryTree
2016-12-25 16:48:17 -05:00
JosJuice a502f069e8 VolumeDirectory: Sort the FST
We can't rely on the OS returning files and directories
in a deterministic order, so we should sort them on our own
if we want VolumeDirectory to work for movies and netplay.
2016-12-25 22:35:38 +01:00
JosJuice e56bec9c87 Fix outdated comments in ScanDirectoryTree 2016-12-25 21:57:33 +01:00
Markus Wick 190c6218ab Merge pull request #4493 from Tilka/evdev
Fix evdev threading
2016-12-25 20:55:50 +01:00
Tillmann Karras 44acd9fdb9 VideoCommon: use u32 for texture addresses 2016-12-25 18:48:19 +01:00
JosJuice 70d9440d10 Fix player name not being loaded when using "Host with Netplay..." 2016-12-25 16:36:19 +01:00
JosJuice c0710d3593 Mark strings added by PR #4461 for translation
Also fix the HKGP_FRANE_ADVANCE typo.
2016-12-24 19:26:21 +01:00
JosJuice 55fe77e986 Movie: Replace incorrect name and comment for numControllers
Also add similar comments to the variables memcards and bongos.
2016-12-24 18:27:56 +01:00
Mystro256 1963996dd0 Change RasterFont static const names
Fixes build issue with GCC/CPP 6.2.1 build issues on Fedora 26
2016-12-24 11:58:07 -05:00
Emmanuel Gil Peyrot 495dfdb16c Common: Replace deprecated readdir_r with readdir
Fixes a warning under recent glibc.
2016-12-24 16:18:47 +01:00
Mat M abfa297166 Merge pull request #4545 from leoetlino/stop-recording
Stop Movie/Netplay before triggering STM shutdown
2016-12-24 06:14:51 -05:00
Lioncash c5243d6d12 CommandProcessor: Remove unimplemented prototypes 2016-12-24 01:15:50 -05:00
Léo Lam ec729e2ee3 Stop Movie/Netplay before triggering STM shutdown
This fixes a bug which caused Movie (input recording or playback) or
netplay not to be stopped. DolphinWX previously triggered a STM power
event, and then the STM directly stopped the emulation; the code
which stops Movie/Netplay was completely skipped.

This is fixed by moving it /before/ sending the shutdown event.
2016-12-24 00:44:30 +01:00
Markus Wick 01c2c50f6a Merge pull request #4540 from lioncash/dspemit
DSP: Move DSPEmitter into the Jit subdirectory
2016-12-23 12:13:47 +01:00
Mat M 9160be50db Merge pull request #4224 from lioncash/tcache
TextureCacheBase: Eliminate static state
2016-12-23 04:33:42 -05:00
Dan Beste a309449a7f Silences an error during compilation due to an unused (but set) variable 2016-12-22 19:44:47 -06:00
Lioncash 5852e3961d DSPMemoryMap: Move function implementations into the cpp file
This allows removing DSPCore and DSPTables includes from the header file.
Doing allows resolving quite a bit of indirect includes that were present
throughout the DSP source files.

Another plus with this is that changes to the DSPEmitter don't require an
almost total rebuild of all DSP source files. The underlying reason for
most of the files being rebuilt it because DSPMemoryMap is used quite
extensively, however its header includes DSPTables.h. DSPTables.h includes
DSPEmitter.h as it uses the DSPEmitter type in a typedef. So any change to
the emitter would propagate through the DSPMemoryMap header. This will no
longer happen.
2016-12-22 20:09:52 -05:00
Lioncash af28ce7ecb DSP: Move DSPEmitter into the Jit directory
This is actually used as the DSP JIT, so this should be with the other JIT
source files.

This commit also makes it so changes to the JIT emitter don't require
recompiling all of the DSP core (i.e. changing the JIT won't require the
interpreter to be rebuilt).
2016-12-22 19:50:03 -05:00
Lioncash a4cd11ec87 DSP: Move interpreter source files to their own directory
Keeps code organized similar to the DSP JIT.
2016-12-22 18:18:48 -05:00
Lioncash 9131b994bb DSPTables: Move interpreter specifics to DSPInterpreter 2016-12-21 15:40:45 -05:00
Lioncash a5e555e609 DSPInterpreter: Alphabetically sort opcode function definitions
Makes browsing slightly nicer.
2016-12-21 14:43:38 -05:00
Lioncash 7ecf3d6955 DSPTables: Amend table formatting
Restores them to what they were before the codebase-wide reformatting and
adds annotations to specifically not format them.
2016-12-21 03:51:53 -05:00
Mat M 8192af9b3d Merge pull request #4533 from lioncash/jits
Jit64/JitIL: Get rid of trivial global jit variable usages
2016-12-20 21:09:50 -05:00
Anthony ca91b6df52 Merge pull request #4521 from JosJuice/tgc
Add TGC disc image compatibility
2016-12-20 17:45:39 -06:00
Lioncash a98fd57da7 JitArm64: Add missing override specifiers 2016-12-20 17:30:13 -05:00
Mat M cd4449f881 Merge pull request #4501 from flibitijibibo/disabletooltips
DolphinWX: Add 'DisableTooltips' config option (R2)
2016-12-20 17:20:24 -05:00
Lioncash 513ace1c0c JitIL: Get rid of trivial global jit variable usages 2016-12-20 12:56:06 -05:00
Lioncash 66034de20b Jit64: Get rid of trivial global jit variable usages
Jit64 inherits from Jitx86Base which inherits from JitBase. JitBase
contains jo and js, which are instances of the JitOptions and JitState
structs. Because of the inheritance, there's no actual need to access the
jit global in order to get to these instances. They're already accessible
via the class hierarchy.
2016-12-20 12:55:58 -05:00
Markus Wick b5fe0b5b83 Merge pull request #4528 from stenzek/vulkan-descriptor-crash
Vulkan: Fix crash where a potentially deleted buffer is referenced
2016-12-20 11:11:54 +01:00
Lioncash 05af5b292f EmuCodeBlock: Amend member variable names to conform to coding style 2016-12-19 17:55:44 -05:00
Lioncash e373a48a51 EmuCodeBlock: Make farcode and nearcode protected
This is the only context they're used in.
2016-12-19 17:36:29 -05:00
Mat M 2c8cc0f648 Merge pull request #4527 from leoetlino/fix-dvd-backup
DolphinWX: Fix booting from DVD
2016-12-19 16:22:29 -05:00
Sepalani 8d812db9ad SymbolDB: Use set to map hash with symbols 2016-12-19 21:03:29 +00:00
Sepalani 7e974f1064 SymbolDB: GetSymbolsFromHash added 2016-12-19 21:03:28 +00:00
Sepalani d778b8a820 SymbolDB: GetSymbolsFromName added 2016-12-19 21:02:23 +00:00
Lioncash 0b12c6986a SignatureDB: Add missing license headers 2016-12-19 15:57:21 -05:00
Mat M 10862cd0e8 Merge pull request #4522 from lioncash/jitutil
Jit64Common: Split Jit64Util contents into separate files
2016-12-19 15:49:49 -05:00
Mat M 4e405010a3 Merge pull request #4497 from sepalani/totaldb.csv
Import/Export signature files as CSV
2016-12-19 15:45:21 -05:00
Mat M b9dc73d9cd Merge pull request #4529 from RisingFog/remove_dead_code
Remove leftover SkipIdle function
2016-12-19 15:32:43 -05:00
Chris Burgener 2e2ba37bc1 Remove leftover SkipIdle function 2016-12-19 15:20:56 -05:00
Stenzek 01047319f8 Merge pull request #4517 from stenzek/mp3-blotches
TextureCache: Use same color coefficients for EFB2Tex as EFB2RAM
2016-12-19 22:11:38 +10:00
Stenzek 9290bf5844 Vulkan: Fix crash where a potentially deleted buffer is referenced
This happened when the geometry shader was disabled, and the uniform
buffer was grown to a larger size. The update would be skipped, leaving
the old buffer to be included in the descriptor set.
2016-12-19 22:00:42 +10:00
Stenzek 344f2e57f6 VideoCommon: Use avg(color1, color2) for color3 in CMPR textures 2016-12-19 20:17:44 +10:00
Léo Lam adcfefecde DolphinWX: Fix booting from DVD
OnBootDrive used the "drives" member std::vector for drive paths, but
since PR #4363, this vector is not populated anymore, so we were
accessing it out of bounds.

Actually, drives was not needed in the first place, since we can
get the wxMenu from the event, and from there, get the label directly.
2016-12-19 10:45:33 +01:00
Markus Wick 989cdc0929 Merge pull request #4505 from hthh/macos-likes-pbos
OpenGL: Always use a PBO in EncodeToRamUsingShader
2016-12-19 09:47:40 +01:00
Sepalani b4bc1c9339 WiiSave: Fixes vector assertions 2016-12-18 19:44:00 +00:00
Sepalani 9774b3f640 WiiSave: Fixes directory issues 2016-12-18 19:43:55 +00:00
JosJuice 9bd514ed1c Add TGC disc image compatibility 2016-12-18 18:57:36 +01:00
Lioncash 94237b694b Jit64Common: Split Jit64Util contents into separate files
Much of Jit64Util consists of essentials, not utilities. Breaking these
out into their own files also prevents unrelated includes from being
present near other classes.

This also makes it easier to find and change certain components of the
x86-64 JIT, should it be necessary.
2016-12-18 02:27:58 -05:00
Chris Burgener debc40e85b Display warning when dumping audio if file exists 2016-12-17 22:45:01 -05:00
Sepalani a6114bad34 Import/Export signature files as CSV 2016-12-18 00:27:10 +00:00
Anthony f431b18675 Merge pull request #4491 from leoetlino/debugger-symbol-filter
DolphinWX: Add ability to filter symbols (by name)
2016-12-17 11:13:28 -06:00
Stenzek accce4294a TextureCache: Use same color coefficients for EFB2Tex as EFB2RAM 2016-12-15 02:20:46 +10:00
Stenzek d6cdf49769 VideoSoftware: Don't drop least significant bit of 5-bit blue channels 2016-12-14 23:56:06 +10:00
Lioncash 8b6f8892d6 TrampolineCache: Make constant constexpr 2016-12-14 04:43:32 -05:00
Lioncash d0c54fe15e Jit64Util: Make constants constexpr 2016-12-14 04:43:31 -05:00
Lioncash 9c1ad3dde6 Jit64Base: Replace #defines with concrete constants 2016-12-14 04:43:31 -05:00
Lioncash d010246af2 Jit64Base: Clean up casting
Mostly intended to clean up HandleFault than anything else.
2016-12-14 04:43:31 -05:00
Lioncash 1aff8c4eb1 BlockCache: Use const_cast 2016-12-14 04:43:30 -05:00
Lioncash 36c99df9f5 Jit: Move most x86-64-specific code out of JitCommon 2016-12-14 04:43:25 -05:00
Stenzek 5aaa5141ed PixelShaderGen: Fix incorrect indexing of tevLerpBias
Fixes the white box in the fortune street fifolog.
2016-12-13 00:03:25 +10:00
Markus Wick d64c9dd5c9 Merge pull request #4419 from degasus/master
Jit64: Fix a few trivial PIE issues.
2016-12-12 10:58:16 +01:00
hthh 801d1d1876 OpenGL: Always use a PBO in EncodeToRamUsingShader
This improves performance significantly on macOS, particularly
noticeably in the Super Mario Sunshine transition, which goes
from ~5FPS to ~17FPS.
2016-12-12 20:33:41 +11:00
Stenzek 607ce40f0b OGL: Fix black screen when MSAA is enabled 2016-12-12 17:51:19 +10:00
Markus Wick 863aeb383a Merge pull request #4509 from lioncash/assign
ShaderManagers: Use aggregate initialization for some variables.
2016-12-11 13:53:28 +01:00
Markus Wick 6ed462a059 Merge pull request #4511 from lioncash/ac
AudioCommon: Remove unnecessary headers
2016-12-11 13:52:59 +01:00
Lioncash 87f2a74c08 AudioCommon: Remove unnecessary headers
Now AudioCommon code won't need to be recompiled if the TAS movie header
is ever modified.
2016-12-11 06:11:37 -05:00
Lioncash 8dcb05802b ShaderManagers: Use aggregate initialization for some variables.
These provide the same semantics, however aggregate initialization
doesn't force the structs to be trivially copyable. memset, on the other
hand, does.
2016-12-10 17:33:51 -05:00
Stenzek 993e029f75 Merge pull request #4506 from stenzek/vulkan-no-depth-clamp
Vulkan: Fix viewport depth when depth clamp is unsupported
2016-12-11 01:57:25 +10:00
Mat M a0920afd5b Merge pull request #4500 from leoetlino/fileio-fix
IPC_HLE: Fix incorrect file path for IOCTL_SET_ATTR
2016-12-09 17:48:21 -05:00
Léo Lam 09fdab7fb4 HLE: Add a hook for JUTWarningConsole_f
JUTWarningConsole_f calls vprintf, but in a way we currently don't
handle (which messes up the printed message). However, it is a standard
debug print function, so we can directly hook it instead of waiting for
the vprintf call.

This is necessary to fix debug output in a few games now that vprintf
is properly detected in more games.
2016-12-09 23:40:06 +01:00
Lioncash 58a5395173 TextureCacheBase: Eliminate static state 2016-12-09 16:50:37 -05:00
Anthony 7a5bb46016 Merge pull request #4030 from clinchergt/fix-setfocus-rendertowindow
Fix focus bug when using the "render to main window" feature
2016-12-09 15:39:31 -06:00
Anthony 1fa61af413 Merge pull request #4492 from aldelaro5/gc-mic-ui-reimplement
Move the GameCube mic button configuration to the GameCube config dialog
2016-12-09 14:53:47 -06:00
Mat M b042377393 Merge pull request #4494 from lioncash/isoproperties
ISOProperties: Separate the filesystem tab out into its own class
2016-12-09 07:55:36 -05:00
Stenzek af706efaef Vulkan: Fix viewport depth when depth clamp is unsupported 2016-12-09 22:45:10 +10:00
Ethan Lee 7cfead6429 DolphinWX: Add 'DisableTooltips' config option
(Revision 2: Remove checkbox from WX GUI)
2016-12-07 13:20:37 -05:00
Léo Lam 10c7e56689 IPC_HLE: Fix incorrect file path for IOCTL_SET_ATTR
We were reading the string from the wrong location…
2016-12-07 13:52:44 +01:00
Léo Lam 31ccfffd38 Common: Add alignment header
Gets rid of duplicated alignment code.
2016-12-06 20:33:53 +01:00
aldelaro5 9ff95c58fa Add a special input configuration dialog for the GameCube Mic
This is more logical as the mic is plugged into an EXI slot so it should be configured via the GameCube config dialog.  This also allows to pass the right port number for the new dialog.
2016-12-05 18:09:31 -05:00
aldelaro5 431929fa1d Moved the Mic button of the GCPad to its own group.
This is needed to separate it from the GCPad input configuration dialog as it would be moved to its own dialog.
2016-12-05 18:09:23 -05:00
Michael e31aa70ff8 Add a hotkey for dumping textures 2016-12-05 08:20:45 -08:00
Markus Wick 7192789c11 Merge pull request #4486 from stenzek/gl-minimize-assert
OGL: Fix assertion when minimizing window
2016-12-05 12:46:29 +01:00
Lioncash ddeccf2622 ISOProperties: Separate the filesystem tab out into its own class 2016-12-04 22:35:01 -05:00
Stenzek bff394ec8a Merge pull request #4489 from stenzek/vulkan-minor-fixes
Vulkan: Minor fixes
2016-12-05 12:19:49 +10:00
Tillmann Karras f575902cf3 evdev: set flag in a thread-safe way 2016-12-05 00:47:26 +00:00
Tillmann Karras 3c090a37d4 evdev: fix shutdown hang
Note: This probably means our approach of populating from udev isn't
safe to be called multiple times.
2016-12-05 00:47:26 +00:00
Tillmann Karras 0043bd3547 Remove two unused variables 2016-12-05 00:47:26 +00:00
Léo Lam 59abfee11d DolphinWX: Add ability to filter symbols (by name)
This allows the user to filter symbols by name, instead of having to
scroll through a very, very long listbox…
2016-12-04 18:18:07 +01:00
degasus 5082a664c8 VertexLoaderX64: Avoid unchecked pointer cast. 2016-12-04 13:09:16 +01:00
degasus 21f3e97435 Jit64: Avoid pointer casts if possible. 2016-12-04 13:09:16 +01:00
degasus f325d41def DSPJit: Use tmp register for pointer immediate.
PIE.
2016-12-04 13:09:16 +01:00
degasus d26709f713 Jit64: Use ImmPtr for mtcrf.
Only a small overhead, but PIE compatible.
2016-12-04 13:09:16 +01:00
degasus 8189ef432b Jit64: Use ImmPtr for mcrxr.
Only a small overhead, but PIE compatible.
2016-12-04 13:09:16 +01:00
degasus 23c284c081 Jit64: Use ImmPtr for inst.OE handling.
A bit slower, but PIE compatible and *very* rarely.
2016-12-04 13:09:15 +01:00
Stenzek 8f97a24904 Vulkan: Enable GS instancing 2016-12-04 20:53:49 +10:00
Stenzek 9736198c3b Vulkan: Use explicit barriers instead of dependancies
At least on NV, some of these don't seem to have the intended effect. One
known instance of this is in texture conversion.
2016-12-04 20:10:13 +10:00
Stenzek a475792163 Vulkan: Fix incorrect logic in readback preemption
This could have been causing a large number of command buffer
submissions per frame, depending on when the readbacks occured.
2016-12-04 20:10:13 +10:00
Stenzek 58978c1440 Vulkan: Faster path for decoding XFB data
Using a texel buffer as the copy destination removes the need to copy to
an intermediate texture first.
2016-12-04 20:10:13 +10:00
Stenzek 804cd0ff03 Vulkan: Move XFB encoding/decoding to TextureConverter 2016-12-04 20:10:13 +10:00
Stenzek d67463e0a7 Vulkan: Simplify palette texture conversion 2016-12-04 20:10:13 +10:00
Stenzek add638538b Vulkan: Combine PaletteTextureConverter and TextureEncoder classes 2016-12-04 20:10:13 +10:00
Stenzek 804af42ccc Vulkan: Support binding texel buffers in UtilityShaderDraw 2016-12-04 20:10:13 +10:00
Stenzek e241ec6666 Vulkan: Implement StagingTexture2D on top of StagingBuffer
Greatly simplifies things, and we weren't using the linear texture
implementation anyway.
2016-12-04 20:10:13 +10:00
Stenzek 4bc0e14995 Vulkan: Use an enumeration to index pipeline layouts 2016-12-04 20:10:13 +10:00
Stenzek cd3481fbc7 Vulkan: Differentiate between descriptor set layouts and bind points
This also moves the pipeline and descriptor set layouts used for texture
conversion (texel buffers) to ObjectCache, and shares a binding location
with the SSBO set.
2016-12-04 20:10:13 +10:00
Stenzek 4e9018049d Vulkan: Support logging debug reports without enabling validation layers
There is a caveat, Host GPU must be checked prior to starting the game, as
we can't enable the extension at runtime without recreating the instance.
2016-12-04 19:55:12 +10:00
Stenzek 1cfb0a1185 Vulkan: Fix deadlock in some resize scenarios
Only have experienced this on a few occasions when using the anv driver.
2016-12-04 19:12:33 +10:00
Mat M d1c89db8c8 Merge pull request #4448 from lioncash/isoproperties
DolphinWX: Separate the information panel from ISOProperties
2016-12-03 19:15:25 -05:00
Stenzek 2ef884893a Vulkan: Fix map error when texture dumping is enabled 2016-12-04 00:23:34 +10:00
Stenzek 4c860ddb70 Vulkan: Fix typo in PopulateBackendInfoMultisampleModes 2016-12-04 00:23:30 +10:00
Stenzek 730ec3809a Vulkan: Remove unused variable 2016-12-04 00:23:25 +10:00
Stenzek 107e8c8ee7 OGL: Fix assertion when minimizing window
Also fixes a potential divide by zero in Renderer::RenderText.
2016-12-03 20:35:14 +10:00
Michael Maltese f798bcd5c0 DolphinQt2: InfoWidget: explicit type for std::min
Avoids errors on macOS:

```
Source/Core/DolphinQt2/Config/InfoWidget.cpp:190:21: error: no matching function for call to 'min'
    u64 read_size = std::min(file_data.size(), game_size - read_offset);
                    ^~~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:2589:1: note: candidate template ignored: deduced conflicting types for parameter '_Tp' ('unsigned long' vs. 'unsigned long long')
min(const _Tp& __a, const _Tp& __b)

```
2016-12-02 21:26:18 -08:00
Stenzek 7b1966a680 Vulkan: Fix assertion triggering when geometry shaders are unsupported
Happened when loading the pipeline UID cache.
2016-12-02 17:37:10 +10:00
Lioncash 20fcfd0ed8 DolphinWX: Separate the information panel from ISOProperties
Makes the information panel self-contained.

This was done first, as opposed to isolating the GameConfig panel--the
first panel in the group--as this panel had code all over the place in
ISOProperties, so I figured it'd be best to fix this one up first.
2016-12-01 21:21:46 -05:00