Commit Graph

17702 Commits

Author SHA1 Message Date
Léo Lam 6c62cfb1aa IOS/BTReal: Properly check for libusb failures 2017-03-26 12:22:29 +02:00
Léo Lam 7b17163a7a IOS/ES: Move shared content map, uid.sys code
These are all specific to ES and belong there.

The SharedContentMap and UIDSys classes were also modernised.
2017-03-26 12:16:28 +02:00
Léo Lam 3cfd9ea9b2 IOS/BTReal: Always use config descriptor 0
This may fix LIBUSB_ERROR_NOT_FOUND whenever devices end up being in
an unconfigured state. We don't need anything more than the first
config descriptor anyway.
2017-03-26 12:08:53 +02:00
Markus Wick 0b6170cc33 Merge pull request #5167 from stenzek/jit64-crash
Jit64: Fix crash at startup
2017-03-26 09:17:21 +02:00
Anthony fbfb94ec79 Merge pull request #5157 from sepalani/sym-name
Fix wrong address in zz_ symbol name
2017-03-25 19:38:16 -07:00
Matthew Parlane 5d40daa507 Merge pull request #5123 from ligfx/fixwiimoteemu
WiimoteEmu: refer to settings by name, not index
2017-03-26 14:56:44 +13:00
Matthew Parlane 28916997a5 Merge pull request #5130 from ligfx/inputconfigdiagbitmapsswitchdefault
InputConfigDiagBitmaps: add switch empty cases (fixes warning)
2017-03-26 14:54:50 +13:00
Matthew Parlane 9dd9573ec0 Merge pull request #5148 from ligfx/iptopwarning
IP/Top: rename private methods à la HandleXRequest
2017-03-26 14:54:31 +13:00
Matthew Parlane 89de08d649 Merge pull request #5166 from ligfx/eglwarning
EGL: Fix missing-braces warning
2017-03-26 14:52:09 +13:00
Stenzek 724a8437eb Jit64: Fix crash at startup
This was a regression introduced by 4d8d045. stored_stack_pointer within
PPCSTATE was being accessed before the PPCSTATE (RBP) register was
initialized.
2017-03-26 11:37:55 +10:00
Matthew Parlane 4f160b2547 Merge pull request #5163 from lioncash/array
TextureCacheBase: Convert bound_textures from a C array to a std::array
2017-03-26 14:35:12 +13:00
Michael Maltese 3f8a471d64 EGL: Fix missing-braces warning
Fixes warning:

```
../Source/Core/Common/GL/GLInterface/EGL.cpp:57:7: warning: suggest braces around initialization of subobject [-Wmissing-braces]
      EGL_OPENGL_BIT, (1 << 6), /* EGL_OPENGL_ES3_BIT_KHR */
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
2017-03-25 17:09:50 -07:00
Léo Lam c1cd7d9c0e WX: Redirect stdout to console output
Thank Windows for its default console handling.

This fixes std::cout not working on Windows.
2017-03-25 23:28:45 +01:00
Léo Lam 77b389bf99 WX: Move init mutex lock to after command line
Calling std::exit while having a mutex locked leads to an assertion.

Moving the lock is fine, since all it protects against is really just
UICommon.
2017-03-25 23:24:02 +01:00
Markus Wick 86e6b44271 Merge pull request #5146 from ligfx/mmuwarning
MMU: rewrite loop to avoid warning
2017-03-25 23:18:56 +01:00
Michael Maltese 9afe3946d1 JitArm64_Integer: fix signedness comparison warning
Fixes warning:

```
dolphin/Source/Core/Core/PowerPC/JitArm64/JitArm64_Integer.cpp:1139:64: warning: comparison of integers of different signs: 'u32' (aka 'unsigned int') and 'int' [-Wsign-compare]
  else if (gpr.IsImm(b) && gpr.GetImm(b) != 0 && gpr.GetImm(b) != -1)
                                                 ~~~~~~~~~~~~~ ^  ~~
```
2017-03-25 14:51:10 -07:00
Michael Maltese 428bac6e32 JitArm64_Integer: remove unused imm_neg 2017-03-25 14:51:10 -07:00
Michael Maltese 5892ef1792 JitArm64_Integer: extract bit operation lambdas
Fixes warnings like:

```
dolphin/Source/Core/Core/PowerPC/JitArm64/JitArm64_Integer.cpp:132:37: warning: declaration shadows a local variable [-Wshadow]
    reg_imm(a, s, inst.UIMM, [](u32 a, u32 b) { return a | b; }, &ARM64XEmitter::ORRI2R);
                                    ^
/Users/michaelmaltese/Downloads/dolphin/Source/Core/Core/PowerPC/JitArm64/JitArm64_Integer.cpp:122:7: note: previous declaration is here
  u32 a = inst.RA, s = inst.RS;
      ^
```
2017-03-25 14:51:09 -07:00
Michael Maltese 3d7bace9da Arm64Emitter: extract lambda to AddImmediate()
Fixes warning:

```
Source/Core/Common/Arm64Emitter.cpp:4108:31: error: declaration shadows a local variable [-Werror,-Wshadow]
    auto addi = [this](ARM64Reg Rd, ARM64Reg Rn, u64 imm, bool shift, bool negative, bool flags) {
                                ^
  /var/lib/buildbot/slave/pr-android/build/Source/Core/Common/Arm64Emitter.cpp:4105:46: note: previous declaration is here
  void ARM64XEmitter::ADDI2R_internal(ARM64Reg Rd, ARM64Reg Rn, u64 imm, bool negative, bool flags,
                                               ^
```
2017-03-25 14:21:19 -07:00
Michael Maltese c58ba93503 Arm64: Use PRIi64/PRIx64 for printf 2017-03-25 14:20:44 -07:00
Michael Maltese 4cd9a2ef1e DiscIO: make sure to initialize out args to ReadSwapped
Fixes warnings:

```
../Source/Core/DiscIO/VolumeGC.cpp: In member function 'virtual u8 DiscIO::CVolumeGC::GetDiscNumber() const':
../Source/Core/DiscIO/VolumeGC.cpp:178:10: error: 'disc_number' may be used uninitialized in this function [-Werror=maybe-uninitialized]
   return disc_number;
          ^
../Source/Core/DiscIO/VolumeWiiCrypted.cpp: In member function 'virtual u8 DiscIO::CVolumeWiiCrypted::GetDiscNumber() const':
../Source/Core/DiscIO/VolumeWiiCrypted.cpp:258:10: error: 'disc_number' may be used uninitialized in this function [-Werror=maybe-uninitialized]
   return disc_number;
          ^
../Source/Core/DiscIO/VolumeWiiCrypted.cpp: In member function 'virtual IOS::ES::TMDReader DiscIO::CVolumeWiiCrypted::GetTMD() const':
../Source/Core/DiscIO/VolumeWiiCrypted.cpp:123:20: error: 'tmd_address' may be used uninitialized in this function [-Werror=maybe-uninitialized]
   tmd_address <<= 2;
                    ^
```
2017-03-25 13:50:23 -07:00
Lioncash 57c21b9576 TextureCacheBase: Convert bound_textures from a C array to a std::array
Prevents array-to-pointer decay and simplifies some code.
2017-03-25 14:53:25 -04:00
Markus Wick 4d8d0451e3 Merge pull request #5142 from MerryMage/stored_stack_pointer
JitAsm: Use stored_stack_pointer instead of s_saved_rsp
2017-03-25 17:37:48 +01:00
Markus Wick 3898707ef9 Merge pull request #5141 from MerryMage/ConvertDoubleToSingle
EmuCodeBlock: Place ConvertDoubleToSingle temporaries on the stack
2017-03-25 17:37:29 +01:00
Anthony b099a1c02a Merge pull request #5135 from lioncash/ini
IniFile: Minor changes
2017-03-24 19:33:09 -07:00
Anthony e2a7e8a40d Merge pull request #5143 from JosJuice/wii-menu-region-log
Clarify the log message for unknown Wii Menu regions
2017-03-24 19:31:52 -07:00
Sepalani 6eca605284 Fix wrong address in zz_ symbol name 2017-03-25 01:21:13 +00:00
JosJuice f5469878ba DVDInterface: Update comment about buffer speed
The actual code was changed based on mmastrac's hardware
tests, but it seems like we forgot to edit this comment.
2017-03-24 20:04:26 +01:00
Michael Maltese a098fe57c5 IP/Top: rename private methods à la HandleXRequest
Fixes this warning everytime Top.h is included:

```
../Source/Core/Core/IOS/Network/IP/Top.h:76:20: warning: 'IOS::HLE::Device::NetIPTop::Close' hides overloaded virtual function [-Woverloaded-virtual]
  IPCCommandResult Close(const IOCtlRequest& request);
                   ^
../Source/Core/Core/IOS/Device.h:158:16: note: hidden overloaded virtual function 'IOS::HLE::Device::Device::Close' declared here: different number of parameters (0 vs 1)
  virtual void Close();
               ^
```
2017-03-24 11:52:39 -07:00
Michael Maltese 8387b00f42 MMU: rewrite loop to avoid warning
Fixes warning:

```
dolphin/Source/Core/Core/PowerPC/MMU.cpp:278:43: warning: shift count >= width of type [-Wshift-count-overflow]
           addr++, addr_translated++, val >>= 8)
```
2017-03-24 11:45:21 -07:00
JosJuice a31bb7a27c Clarify the log message for unknown Wii Menu regions
Saying just "title" made it seem like we are showing the title
ID, but what we actually are showing is the title version.
2017-03-24 16:44:38 +01:00
MerryMage 61198199cd JitAsm: Use stored_stack_pointer instead of s_saved_rsp 2017-03-24 11:31:40 +00:00
MerryMage 918d7fa3d1 EmuCodeBlock: Place ConvertDoubleToSingle temporaries on the stack 2017-03-24 10:59:55 +00:00
Michael Maltese 0767c3d94d DiscIO: add empty UNKNOWN_REGION case (fixes warning)
Fixes warning:

```
dolphin/Source/Core/DiscIO/Enums.cpp:171:11: warning: enumeration value 'UNKNOWN_REGION' not handled in switch [-Wswitch]
  switch (GetSysMenuRegion(title_version))
          ^
```
2017-03-23 20:14:11 -07:00
Lioncash b711daee5f BitField: Get rid of a C-style cast
This can simply be the max value of the unsigned type.
2017-03-23 15:28:58 -04:00
Lioncash e43c495ce5 BitField: Convert typedefs to using aliases 2017-03-23 15:28:50 -04:00
Lioncash caef08988e BitField: Make mostly constexpr capable
Makes the constructor and retrieval functions constexpr.
2017-03-23 11:45:45 -04:00
Markus Wick 6e2e48e9ea Merge pull request #5137 from lioncash/arm
Arm64Emitter: Get rid of pointer casts in PoisonMemory
2017-03-23 15:52:58 +01:00
Markus Wick 4b5995a6e0 Merge pull request #5138 from lioncash/init
VertexLoaderBase: In-class initialize class members where applicable
2017-03-23 15:15:32 +01:00
Lioncash da2e34f69b VertexLoaderBase: In-class initialize class members where applicable
Same thing, less code.
2017-03-23 08:37:18 -04:00
Lioncash a7ec2d3831 Arm64Emitter: Get rid of pointer casts in PoisonMemory
The previous code invokes undefined behavior.
2017-03-23 07:10:21 -04:00
Markus Wick 6d065a02b5 Merge pull request #5134 from degasus/texture_cache
TextureCache: Don't lock freed rendertargets for one frame.
2017-03-23 09:48:32 +01:00
Lioncash 1d6d85963f ARDecrypt: const correctness 2017-03-22 20:35:00 -04:00
Lioncash 29ca22905b IniFile: Replace a character erase with pop_back()
Same thing, more straightforward.
2017-03-22 19:32:10 -04:00
Lioncash 35959bdaf9 IniFile: Replace string joining code with JoinString 2017-03-22 19:30:15 -04:00
Lioncash b92871111a IniFile: std::move a std::string in GetLines
Also gets rid of an unnecessary string copy.
2017-03-22 19:09:25 -04:00
Lioncash dbdf693c81 IniFile: Use character literals instead of string literals where applicable
Character overloads are generally better overall (range checks aren't
necessary, etc).
2017-03-22 19:03:17 -04:00
Lioncash d8998b6392 IniFile: Provide an rvalue reference overload for SetLines
Allows moving in vectors instead of performing an unnecessary copy.
2017-03-22 18:49:13 -04:00
Lioncash 46d74a7760 IniFile: Make Section's string constructor instances take strings by value
As the name is immediately stored into a class member, a move here is a
better choice.

This also moves the constructor implementations into the cpp file to
avoid an otherwise unnecessary inclusion in the header. This is also
likely a better choice as Section contains several non-trivial members,
so this would avoid potentially inlining a bunch of setup and teardown
code related to them as a side-benefit.
2017-03-22 18:47:19 -04:00
degasus ca8d9e2215 TextureCache: Don't lock freed rendertargets for one frame.
New Super Mario Bros on PAL still renders at 60 fps, but skips every 5th XFB copy.
So our detection of "per frame" fails, and we require twice the amound of texture objects.
But our pool frees unused textures after 3 frames, so half of them needs to be reallocated
every few frames.

This commit removes the lock for render targets. It was introduced to not update a texture
while it is still in use. But render targets aren't updated while rendering, so this
lock isn't needed. Non-rendertarget textures however aren't as dynamic, so the lock should
have no performance update.
2017-03-22 23:28:42 +01:00
Lioncash 99adc73383 IniFile: Make Section constructor explicit 2017-03-22 18:07:23 -04:00
Markus Wick 9ea59133b3 Merge pull request #5121 from MerryMage/children-happen
Jit64: Merge memory allocations into a single allocation
2017-03-22 22:42:46 +01:00
Michael Maltese c4bb452f2b InputConfigDiagBitmaps: add switch empty cases (fixes warning)
Fixes warning:

```
dolphin/Source/Core/DolphinWX/Input/InputConfigDiagBitmaps.cpp:170:13: warning: 7 enumeration values not handled in switch: 'Other', 'MixedTriggers', 'Buttons'... [-Wswitch]
    switch (g->control_group->type)
            ^
```
2017-03-22 13:00:54 -07:00
Matthew Parlane 8804f759b9 Merge pull request #5127 from lioncash/gcode
GeckoCodeConfig: Minor changes
2017-03-23 07:13:45 +13:00
Markus Wick 09f4d494ef Merge pull request #5132 from ligfx/commentoutpagetagshift
MMU: comment-out unused var HW_PAGE_TAG_SHIFT
2017-03-22 09:43:45 +01:00
Michael Maltese da6a1daef6 MMU: remove unused var HW_PAGE_TAG_SHIFT
It's not used, so produces a warning during compilation.
2017-03-21 23:47:10 -07:00
Michael Maltese 9e430cbdd6 Breakpoints.cpp: fix format string warnings
Fixes warnings:

```
dolphin/Source/Core/Core/PowerPC/BreakPoints.cpp:246:89: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                 debug_interface->GetDescription(pc).c_str(), write ? "Write" : "Read", size * 8,
                                                                                        ^~~~~~~~
dolphin/Source/Core/Core/PowerPC/BreakPoints.cpp:245:50: warning: field width should have type 'int', but argument has type 'unsigned long' [-Wformat]
      NOTICE_LOG(MEMMAP, "MBP %08x (%s) %s%zu %0*x at %08x (%s)", pc,
                                              ~~~^
```
2017-03-21 23:25:17 -07:00
Lioncash 2f52d04e30 GeckoCodeConfig: Use compare instead of substr for comparing substrings
Gets rid of an unnecessary string construction.
2017-03-21 18:12:40 -04:00
Matthew Parlane a32a2d1a02 Merge pull request #5126 from leoetlino/version
UICommon: Don't print --version option twice
2017-03-22 11:10:36 +13:00
Lioncash 0d0e9f626d GeckoCodeConfig: Amend unnecessary string literals to char literals
Also gets rid of an unnecessary std::string construction in a loop.
std::string already has an operator+ overload to prepend characters.
2017-03-21 18:03:06 -04:00
Lioncash 28235b5cb6 GeckoCodeConfig: Remove unused commented out code 2017-03-21 18:03:06 -04:00
Lioncash f0fa692457 GeckoCodeConfig: Move gecko code title building to its own function
Keeps it separate from the rest of the saving code and also allows for
easy rvalue-reference moving into the lines vector as a side-benefit.
2017-03-21 18:03:02 -04:00
Léo Lam 3028158873 UICommon: Don't print --version option twice
cpp-optparse already has the --version option built-in, so having our
own version option results in --version being shown twice.
2017-03-21 22:29:01 +01:00
Lioncash f91292eff2 GeckoCodeConfig: Return vector by value for LoadCodes()
Using an out-param is a leftover from C++03. Action Replay codes already
return the vector of codes by value as well.
2017-03-21 16:58:13 -04:00
Michael Maltese 7c52b8f838 WiimoteEmu: refer to settings by name, not index
Fixes https://bugs.dolphin-emu.org/issues/10159 "Emulated Wii remote
options not working correctly," which was introduced by PR #4856: "Move
'Background Input' out of individual controller configurations."
2017-03-21 13:31:42 -07:00
MerryMage cb7d9556bf Jit64: Merge memory allocations into a single allocation
Instead of each component allocating their own memory, we instead allocate
the memory once and divvy that up among the components as required. This
ensures that relative memory offsets remain within architecture limits.
2017-03-21 20:16:12 +00:00
MerryMage da434e1a1c ConstantPool: Externalize memory allocation 2017-03-21 20:16:12 +00:00
MerryMage 615fcc621d CodeBlock: Add support for multiple children 2017-03-21 20:16:12 +00:00
Lioncash 780dffcb13 FifoDataFile: In-class initialize member variables where applicable 2017-03-21 15:41:05 -04:00
Lioncash 4e5e7cff0a FifoRecorder: In-class initialize member variables where applicable 2017-03-21 15:41:05 -04:00
Lioncash eda27ee397 FifoPlayer: In-class initialize member variables where applicable 2017-03-21 15:40:56 -04:00
Lioncash 0d1bc53e55 JitBase: Rename MergeAllowedNextInstructions to CanMergeNextInstructions
This is more indicative that it's checking for something
2017-03-21 13:50:03 -04:00
Lioncash f98211bfcf JitBase: Make MergeAllowedNextInstructions a const member function 2017-03-21 13:45:18 -04:00
Markus Wick f03fa54bcb Merge pull request #5116 from degasus/ArmRegCache
JitArm64: Fix usages in conditional code.
2017-03-21 18:14:16 +01:00
MerryMage 8a788ebdd9 JitAsm: Add missing forward declaration of X64CodeBlock 2017-03-21 16:56:43 +00:00
Anthony d2690568f9 Merge pull request #5110 from MerryMage/const-pool
Jit64: Implement a constant pool
2017-03-20 13:29:57 -07:00
MerryMage 4491e9b829 Jit_SystemRegisters: Add missing sizes to constant arrays 2017-03-20 20:21:43 +00:00
MerryMage 9058ccea3f IR_X86: Use MConst for constants 2017-03-20 20:21:43 +00:00
MerryMage 3dccc369d3 Jit64AsmCommon: Use MConst for constants 2017-03-20 20:21:43 +00:00
MerryMage 4814c4ac5a EmuCodeBlock: Use MConst for constants 2017-03-20 20:21:43 +00:00
MerryMage 8b93baefb7 Jit_SystemRegisters: Use MConst for constants 2017-03-20 20:21:43 +00:00
MerryMage 0fe234ec9b Jit_FloatingPoint: Use MConst for constants 2017-03-20 20:21:42 +00:00
MerryMage ff441efc26 EmuCodeBlock: Use ConstantPool 2017-03-20 20:21:42 +00:00
MerryMage 9951961338 ConstantPool: Implement a constant pool
Constants are copied into this pool so that they live at a memory
location that is close to the code that references it. The pool allocates
memory from a provided X64CodeBlock to use.

The purpose of the pool is to overcome the 32-bit offset limitation that
RIP-relative addressing has.`
2017-03-20 20:21:42 +00:00
MerryMage b0d6c29073 JitAsmCommon: Add missing sizes to constant arrays
This allows generic code to determine the size of these arrays.
2017-03-20 20:21:41 +00:00
degasus c5b9c740c9 JitArm64: Fix gpr.R() usages in conditional code. 2017-03-20 21:18:13 +01:00
degasus f7a52c0c35 JitArm64: Fix gpr.GetReg usages in conditional code. 2017-03-20 21:18:13 +01:00
Anthony 26bb26fe54 Merge pull request #4901 from JosJuice/filemonitor-redesign
FileMonitor redesign
2017-03-20 12:46:19 -07:00
Anthony 50faffc9c2 Merge pull request #5009 from aldelaro5/memcheck-fix
Fix memory breakpoint when checking the middle of the data
2017-03-20 12:41:02 -07:00
Markus Wick 5cc55f0fe3 Merge pull request #5096 from Armada651/anything-with-a-viewport
VertexShaderGen: Correct for negative viewport dimensions.
2017-03-20 10:55:56 +01:00
Anthony b35bbdfb58 Merge pull request #4856 from ligfx/backgroundinput
Move "Background Input" out of individual controller configurations
2017-03-19 22:31:30 -07:00
Matthew Parlane 8eb26d298e Merge pull request #5099 from JosJuice/wii-menu-strings
Display nicer version strings for the Wii Menu
2017-03-20 14:03:04 +13:00
Matthew Parlane 9da35edd15 Merge pull request #5093 from JosJuice/six-char-game-ids
Use 6-char game IDs for NAND tiles (if they are printable)
2017-03-20 13:38:35 +13:00
Matthew Parlane 910360f7e7 Merge pull request #5085 from leoetlino/es-nandutils
IOS: Add NandUtils
2017-03-20 13:27:17 +13:00
Matthew Parlane a20b73cfb4 Merge pull request #5112 from MerryMage/quantize
Jit64AsmCommon: Use correct quantization table
2017-03-20 13:26:38 +13:00
MerryMage 5f59755d15 Jit64AsmCommon: Use correct quantization table
Stores quantize, loads dequantize.
2017-03-19 14:49:24 +00:00
Lioncash 35c230a418 NetPlayServer: const correctness 2017-03-19 09:36:40 -04:00
Lioncash 025eac9062 NetPlayClient: const correctness 2017-03-19 09:32:58 -04:00
Léo Lam 98e27ad9cb IOS/ES: Use FindInstalledTMD instead of content loader
Proper semantics.

IOS only cares about the TMD and nothing else, so we should use
FindInstalledTMD, instead of reading/parsing/decrypting a bunch of
useless stuff, which is slow *and* causes issues because of the cache.
2017-03-19 11:27:34 +01:00
Léo Lam 8984112501 IOS/ES: Move GetStoredContentsFromTMD to NandUtils 2017-03-19 11:10:45 +01:00
Léo Lam 0ed8d68192 IOS/ES: Add functions to get TMDs 2017-03-19 11:10:45 +01:00
Léo Lam 194b0ae36d IOS: Add NandUtils
This keeps the ES specific NAND code in a single place and makes it
reusable. Eventually, other ES specific code will be moved to it.
2017-03-19 11:10:45 +01:00
Anthony 9604a06921 Merge pull request #5102 from leoetlino/channel-title-type
Check whether WAD is a channel before reading names
2017-03-18 23:30:27 -07:00
Matthew Parlane cb87b25ac6 Merge pull request #5106 from lioncash/constant
Memmap: Replace '0' constant with nullptr
2017-03-19 16:42:36 +13:00
Matthew Parlane 036d676230 Merge pull request #5107 from lioncash/unused
ES: Remove unused string format argument in LaunchPPCTitle
2017-03-19 16:41:28 +13:00
Lioncash 8e999b209a NetPlayClient: Eliminate variable shadowing
Gets rid of two -Wshadow warnings
2017-03-18 22:58:07 -04:00
aldelaro5 8bf27cf42f Fix memory breakpoint when checking the middle of the data
If the delimiters of a memory aren't exactly the same as an address, but their size includes the memory breakpoint delimiter, the break will not go through.  This makes it so that you can specify a search for a memory breakpoint with a data size and will check if the data fits with that size on all memory breakpoints so the breaks go through.
2017-03-18 22:48:57 -04:00
Lioncash 3404057732 ES: Remove unused string format argument in LaunchPPCTitle
Gets rid of a -Wformat-extra-args warning.
2017-03-18 22:44:46 -04:00
Lioncash 2b8abddadf Memmap: Replace '0' constant with nullptr 2017-03-18 22:35:35 -04:00
Lioncash 44fb429e7e EXI: Namespace device classes 2017-03-18 21:13:12 -04:00
Léo Lam c987f58319 Check whether WAD is a channel before reading names
Dolphin assumes that content 0 is opening.bnr, without checking
whether content 0 exists or if it is even supposed to be there (it's
only there for channels). This results in sometimes reading garbage.

This adds a check to only try to read names from content 0's header
if the title is a channel (channel, system channel or game channel).
2017-03-18 19:07:11 +01:00
Matthew Parlane ce034a8186 Merge pull request #5101 from JosJuice/es-launch-wii-menu
Display a different error message when failing to ES_Launch the Wii Menu
2017-03-19 01:00:59 +13:00
JosJuice 998a215a0d Display a different error message when failing to ES_Launch the Wii Menu
Trying to return to the Wii Menu from a game is the easiest
way to trigger this error. Just saying 0000000100000002
when that happens doesn't mean much to most users.
2017-03-18 12:13:17 +01:00
JosJuice 9d54e4a9de Return a more meaningful type from GetSysMenuRegion 2017-03-18 10:13:36 +01:00
JosJuice 04c49aa395 Fix GetSysMenuRegion's handling of Wii Menu 1.0
This was a regression in 58bd129.
2017-03-18 10:13:31 +01:00
JosJuice 19d6092847 Display nicer version strings for the Wii Menu
The Tools > Load System Menu option displays the version of the
installed Wii Menu. This commit changes the way we display that
version, like so: "Load System Menu 514P" -> "Load System Menu 4.3E"

The numbers are from http://wiibrew.org/wiki/System_Menu
2017-03-18 10:08:13 +01:00
Markus Wick 08351aa334 Merge pull request #5005 from aldelaro5/remove-save-load-debug
Don't save watches and breakpoints on stop and load on boot
2017-03-18 08:45:01 +01:00
Markus Wick 609d195822 Merge pull request #5100 from VinDuv/fix-texture-type-checks
OGL: Fix texture_type checks in FrameBufferManager::CreateTexture
2017-03-18 08:35:44 +01:00
Matthew Parlane 8669426b0b Merge pull request #5092 from lioncash/namespace
SI: Namespace device classes
2017-03-18 19:30:38 +13:00
Vincent Duvert bbb5945375 OGL: Fix texture_type checks in CreateTexture
The FrameBufferManager::CreateTexture (from the OpenGL backend) method introduced by commit 69cedf41 incorrectly compares the texture variable (which contains a name provided by glGenTextures) against GL_TEXTURE_2D_MULTISAMPLE_ARRAY and GL_TEXTURE_2D_MULTISAMPLE.
It should instead use the texture_type variable for this (as done in the first branch of the if).
2017-03-17 23:53:56 +01:00
Markus Wick b7f605e88e Merge pull request #5097 from MerryMage/pic
PIE support for the DSP JIT
2017-03-17 22:24:03 +01:00
MerryMage 5e7d01dea4 DSPJitRegCache: Remove ebp_store
Restoring RBP before function calls is a no-op.
2017-03-17 17:10:25 +00:00
MerryMage 14739c55c3 DSP/Jit: PIE support 2017-03-17 17:10:24 +00:00
Markus Wick b7ba391041 Merge pull request #5084 from MerryMage/Update_SR_Register
DSP/Jit: Explicitly specify scratch register for Update_SR_Register
2017-03-17 17:21:21 +01:00
Matthew Parlane 47fe78a76a Merge pull request #5094 from lioncash/magic
SI: Convert SI buffer from a C array to std::array
2017-03-17 20:49:26 +13:00
Matthew Parlane 9b883d999e Merge pull request #5095 from JosJuice/simplify-getsysmenuregion
Simplify GetSysMenuRegion
2017-03-17 20:47:36 +13:00
Markus Wick a0acdfc070 Merge pull request #5029 from ligfx/bboximagemask
OGL: implement Bounding Box on systems w/o SSBO
2017-03-16 21:39:17 +01:00
aldelaro5 4738e3195c Fix memory breakpoints not triggering on Windows
For some reasons, they worked on Linux even though it was incorrect, this commit does it correctly and so it fixes that on Windows.
2017-03-16 16:31:20 -04:00
BhaaL 1470c346b6 change parameter names to match our coding style while we're at it 2017-03-16 18:22:51 +01:00
BhaaL d0d91f2530 add the hash for the PAL v1.1 BIOS
reported on the forums by user hackintoshftw1
2017-03-16 18:22:51 +01:00
BhaaL 70a25bef4c put the source reference onto its own line to avoid the awkward formatting
also, make them constexpr, because i guess it makes sense...
2017-03-16 18:22:51 +01:00
Markus Wick 907e73a1fc Merge pull request #5012 from degasus/BAT
MMU: Create constants for our BAT flags.
2017-03-16 16:02:16 +01:00
Jules Blok cbfb07152f VertexShaderGen: Correct for negative viewport dimensions. 2017-03-16 12:34:19 +01:00
JosJuice ff7425214a Use 6-char game IDs for NAND tiles (if they are printable)
5.0-2712 made ES's code for setting the game ID use the
title ID converted to hex (except for disc titles) instead
of using a 6-char game ID like before. Then, 5.0-2830 made
us use that code even when loading game INIs. This breaks the
expectations of both users and the game INIs we ship with.

This commit makes Dolphin use 6-char game IDs for all
titles (unless the 6-char ID would contain unprintable
characters, which is the case with e.g. the Wii Menu).

I'm also putting unprintability checks in VolumeWad
for consistency.
2017-03-16 11:21:31 +01:00
JosJuice 58bd129987 Simplify GetSysMenuRegion 2017-03-16 10:45:57 +01:00
Lioncash 6cf3c2262c SI: Convert SI buffer from a C array to std::array
Stronger typing (no implicit pointer decay), nicer aggregate
initialization.

Also gets rid of magic constants where applicable.
2017-03-16 05:37:03 -04:00
Markus Wick bb708397db Merge pull request #5090 from lioncash/si
SI: Minor cleanup
2017-03-16 09:57:04 +01:00
Lioncash f0eeb3c63a SI: Namespace device classes
Places all of the SI code under the SerialInterface namespace instead of
only the main source file. This keeps all SI code under a common name,
as well as out of the global namespace
2017-03-16 04:41:39 -04:00
Lioncash 9c3b35fccb EXI: Move enum constants into the ExpansionInterface namespace
Given these are related to EXI itself, these should be within the
namespace itself.
2017-03-16 02:06:29 -04:00
Lioncash a728d858b3 SI: Move MAX_SI_CHANNELS into the SerialInterface namespace
Given this constant is related to the serial interface, it shouldn't be
outside of the namespace.
2017-03-16 01:57:57 -04:00
Lioncash 46991e2bdd SI: Amend variable naming 2017-03-16 01:37:50 -04:00
Michael Maltese 134317e07f videoconfig: add BBoxPreferStencilImplementation
@JMC47 requested this to be able to do performance comparisons.
2017-03-15 17:41:33 -07:00
Michael Maltese 53224d41d0 OGL: only create stencil buffer when needed 2017-03-15 17:41:33 -07:00
Michael Maltese ba6e917b49 OGL: implement Bounding Box on systems w/o SSBO
This commit should have zero performance effect if SSBOs are supported.

If they aren't (e.g. on all Macs), this commit alters FramebufferManager
to attach a new stencil buffer and VertexManager to draw to it when
bounding box is active. `BBoxRead` gets the pixel data from the buffer
and dumbly loops through it to find the bounding box.

This patch can run Paper Mario: The Thousand-Year Door at almost full
speed (50–60 FPS) without Dual-Core enabled for all common bounding
box-using actions I tested (going through pipes, Plane Mode, Paper
Mode, Prof. Frankly's gate, combat, walking around the overworld, etc.)
on my computer (macOS 10.12.3, 2.8 GHz Intel Core i7, 16 GB 1600 MHz
DDR3, and Intel Iris 1536 MB).

A few more demanding scenes (e.g. the self-building bridge on the way
to Petalburg) slow to ~15% of their speed without this patch (though
they don't run quite at full speed even on master). The slowdown is
caused almost solely by `glReadPixels` in `OGL::BoundingBox::Get`.

Other implementation ideas:

- Use a stencil buffer that's separate from the depth buffer. This would
  require ARB_texture_stencil8 / OpenGL 4.4, which isn't available on
  macOS.

- Use `glGetTexImage` instead of `glReadPixels`. This is ~5 FPS slower
  on my computer, presumably because it has to transfer the entire
  combined depth-stencil buffer instead of only the stencil data.
  Getting only stencil data from `glGetTexImage` requires
  ARB_texture_stencil8 / OpenGL 4.4, which (again) is not available on
  macOS.

- Don't use a PBO, and use `glReadPixels` synchronously. This has no
  visible performance effect on my computer, and is theoretically
  slower.
2017-03-15 17:41:32 -07:00
Michael Maltese 56fe938366 extract OGL::FramebufferManager::BindLayeredTexture 2017-03-15 17:20:47 -07:00
Michael Maltese 69cedf4144 extract OGL::FramebufferManager::CreateTexture 2017-03-15 17:20:47 -07:00
Michael Maltese de940a5fd6 VideoConfig: add bSupportsFragmentStoresAndAtomics 2017-03-15 17:20:47 -07:00
Anthony 8e6d256722 Merge pull request #5080 from leoetlino/ssl-verify
Default to SSL verify on
2017-03-15 13:56:56 -07:00
Markus Wick 1e7dd1ed2d Merge pull request #5086 from lioncash/si
SI_Devices: Minor cleanup
2017-03-15 10:07:27 +01:00
degasus 5152c997a4 MMU: Create constants for our BAT flags.
This avoids a few hard-coded constants in several files.
2017-03-15 09:20:40 +01:00
Lioncash 4df8ac7820 GCMemcardRaw: Amend variable naming 2017-03-15 00:16:45 -04:00
Lioncash 79246d9642 GCMemcardDirectory: Amend variable naming 2017-03-14 23:58:31 -04:00
Lioncash 647bec4c17 GCMemcard: Amend variable naming for MemoryCardBase 2017-03-14 23:58:27 -04:00
Lioncash 09d4871067 GCMemcard: Move memcard source files to their own directory
GCMemcard.h has quite a bit of different classes implemented within it
that could likely be split up into other files to make it a little
easier to read. However, they should be moved into their own folder
first so that they don't clutter up the base HW directory.
2017-03-14 21:55:25 -04:00
Lioncash 8b8a1f3b35 SI_DeviceKeyboard: Amend variable naming 2017-03-14 18:15:25 -04:00
Lioncash 4478b9bc9a SI_DeviceKeyboard: In-class initialize variables 2017-03-14 18:03:36 -04:00
Lioncash c45f8e2e3c SI_DeviceGCSteeringWheel: Amend variable naming 2017-03-14 17:54:18 -04:00
Lioncash 89f5b3b5d9 SI_DeviceGCAdapter: Amend variable naming 2017-03-14 17:47:56 -04:00
Lioncash e68e99ef71 SI_DeviceDanceMat: Amend variable naming 2017-03-14 17:46:09 -04:00
Léo Lam 834a3bf857 Default to SSL verify on
Defaulting to SSL verification off, *and* forcing it to be off even
when the emulated software asks us to enable it is very bad behaviour,
inaccurate and insecure.

Because the old option defaulted to off, we have to change the INI
option name to force the new default to be used. Unfortunate,
but without this we cannot ensure our users' security.
2017-03-14 20:57:49 +01:00
MerryMage 1020a3cb8e DSP/Jit: Explicitly specify scratch register for Update_SR_Register
There were cases when the value register was RDX and thus was being
clobbered as RDX was implictly used as a scratch register.
2017-03-14 19:18:56 +00:00
Anthony a3557ed199 Merge pull request #4964 from DisorderIy/arcode-removal-fix
Fix remove and add buttons not disabling after removing Action Replay code
2017-03-14 11:21:39 -07:00
Markus Wick 3aa5b8fbf6 Merge pull request #5079 from JosJuice/move-loadpatches
Move LoadPatches calls
2017-03-14 10:44:38 +01:00
Markus Wick 884d3973e4 Merge pull request #5083 from lioncash/si
SI_DeviceGCController: Minor cleanup
2017-03-14 10:37:28 +01:00
Markus Wick c30db8eddc Merge pull request #4932 from PEmu1/toggle-fullscreen
Change "Fullscreen" Menu Option to "Toggle Fullscreen"
2017-03-14 10:30:34 +01:00
Markus Wick d05f59e31d Merge pull request #4876 from ligfx/netplay_move_semantics
NetPlay: use move semantics instead of unique_ptrs
2017-03-14 10:20:47 +01:00
Lioncash 46fd06b956 SI_DeviceGCController: Amend variable names 2017-03-14 05:15:48 -04:00
Markus Wick 31bb41c532 Merge pull request #4973 from z0z0z/master
Disable pinned memory for AMD mesa drivers
2017-03-14 10:02:05 +01:00
Lioncash 890f799fdd SI_DeviceGCController: In-class initialize variables 2017-03-14 03:34:52 -04:00
Jules Blok 0a2b58c896 OGL: Remove support for NV_depth_buffer_float.
We can't clamp the depth values to the 24-bit range while this extension is active.
2017-03-14 01:02:13 +01:00
Lioncash 225ac37f21 SDIOSlot0: Separate IOCtl/IOCtlV behavior into individual functions
Keeps the individual behaviors separate from one another.
2017-03-13 18:43:04 -04:00
JosJuice 09682cfaa4 Move LoadPatches calls
LoadPatches was apparently never being called when booting
Wii discs. Maybe this will fix the recent regression with
cheat codes not getting loaded? I don't know how this
managed to work to begin with, though...

(The call was also moved for WADs, just for consistency.)
2017-03-13 22:29:55 +01:00
Michael Maltese 1b0701e988 Make ControllerEmu::BooleanSetting non-virtual 2017-03-13 13:47:06 -07:00
Michael Maltese c4ba046aa3 Remove unused ControllerEmu::BackgroundInputSetting 2017-03-13 13:47:01 -07:00
Michael Maltese 24a5411af5 Move 'Background Input' to controller config dialog 2017-03-13 13:43:20 -07:00
Michael Maltese 8adad0729e Implement hotkey options group in HotkeyInputConfigDiag 2017-03-13 13:39:52 -07:00
Michael Maltese a6bc56b626 InputConfigDiag: make m_iterate protected, not private 2017-03-13 13:22:09 -07:00
Michael Maltese a1978c28f9 HotkeyInputConfigDiag: set DeviceRelatedSizer to wxEXPAND
Somehow it acts as though it has wxEXPAND, but that stops working if the
code is edited (as in the next commit).
2017-03-13 13:22:09 -07:00
Markus Wick f0c2bae778 Merge pull request #5078 from lioncash/si
SI_DeviceGBA: Minor cleanup
2017-03-13 21:00:36 +01:00
Markus Wick 13d23c21b7 Merge pull request #5071 from leoetlino/reorganise-es
IOS/ES: Split the ES code
2017-03-13 20:51:22 +01:00
Markus Wick 3df19c6643 Merge pull request #5075 from lioncash/cruft
DSPLLE: Remove commented out code
2017-03-13 20:47:27 +01:00
Lioncash deda29d7ff SI_DeviceGBA: Amend printf formatting specifier for size_t
%zu is the correct specifier for printing size_t.
2017-03-13 15:28:07 -04:00
Lioncash 8d2078de2d SI_DeviceGBA: Amend variable naming 2017-03-13 15:27:36 -04:00
Léo Lam 204703ae0d IOS/ES: Split the ES code
ES.cpp was becoming pretty huge. This commit splits the ES code into
several files:

* Main ES (launch, UID, current title directory and title ID, etc.)
* Device identity and encryption (ID and cert, keys, encrypt/decrypt)
* Title management (imports, exports, deletions)
* Title contents (open/close/read/seek)
* Title information (titles, stored contents, TMDs)
* Views (for tickets and TMDs)
2017-03-13 20:01:08 +01:00
Lioncash 9f40596de5 SI_DeviceGBA: Make GBASockServer's constructor explicit
Prevents potential implicit construction scenarios involving ints.
2017-03-13 14:53:50 -04:00
Lioncash 14f261079f SI_DeviceGBA: Place implementations within the cpp file
Prevents potential recompilation of other files if these ever need to
change.
2017-03-13 14:51:18 -04:00
Lioncash 64aa7f3b8f SI_DeviceGBA: Use std::array class members instead of C arrays 2017-03-13 14:46:35 -04:00
Lioncash ea59d30e9f SI_DeviceGBA: In-class initialize variables 2017-03-13 13:52:45 -04:00
Lioncash 70b1933661 SI_DeviceGBA: Store the device number as an int
This prevents truncation when assigning to this member in the
constructor. This isn't size-critical code, so opting for the more
straightforward assignment is fine here.
2017-03-13 13:30:02 -04:00
Lioncash 31644eaf93 DSPLLE: Remove commented out code
Just throwing out the trash
2017-03-13 12:36:53 -04:00
Lioncash f183d6759a HW/DSP: Remove prefixed underscores from parameter names
Avoids stepping on potentially reserved names and is more consistent
with the rest of the surrounding code.
2017-03-13 12:27:38 -04:00
JosJuice 98b4ff12f4 FileMonitor: Move file system parsing to DVD thread 2017-03-13 17:13:20 +01:00
JosJuice b470fa5454 FileMonitor redesign
Advantages:

* Simpler code in general
* No extra volume objects created
* Now actually notices if the disc or partition gets
  changed while the core is running
* No longer picks up on disc access done by the GUI
  (it used to do so as long as the core was running)
* Gets rid of a Core dependency in DiscIO

There are two performance disadvantages:

* FileMonitor is now a bit slower when used with VolumeDirectory
  because FileMonitor now always uses the FileSystemGCWii code
  for finding filenames instead of VolumeDirectory finding the
  filename on its own and directly hooking into FileMonitor.
  But this isn't such a big deal, because it's happening on the
  DVD thread, and my currently unmerged file system PR will make
  FileSystemGCWii's file finding code about as fast as
  VolumeDirectory's.
* FileMonitor's creation of the file system object is now
  done on the CPU thread instead of the DVD thread, and
  it will be done even if FileMonitor logging is disabled.
  This will be fixed in the next commit.
2017-03-13 17:13:20 +01:00
Markus Wick 8035270aa8 Merge pull request #4411 from JosJuice/blob-nullptr
Remove Blob nullptr checks from Volume code
2017-03-13 16:35:40 +01:00
JosJuice 652b323715 Fix VolumeIsValid being referenced even though it was deleted
PR #3582 removed VolumeIsValid, then PR #3582 added a call
to VolumeIsValid, then both PRs were merged without either
of them being rebased on top of the other.
2017-03-13 15:37:08 +01:00
Markus Wick 7b19475911 Merge pull request #4548 from stenzek/gcc-sse
Support SSSE3 texture decoders and CRC32 hashing on non-native builds (gcc)
2017-03-13 14:28:01 +01:00
JosJuice c48ee87f0a Merge pull request #3582 from JosJuice/disc-inside-cleanup
DVDInterface: Cleanup for setting/getting whether a disc is inside
2017-03-13 14:26:15 +01:00
JosJuice acec02ffc6 Remove Blob nullptr checks from Volume code
There's no point in creating a volume without a blob,
since essentially all the functionality of a volume
requires a blob to be used.

Also, VolumeCreator doesn't support creating volumes
without blobs (it can't even figure out the volume type
unless it gets a blob), so it's currently impossible
for a volume to be created without a blob.
2017-03-13 14:13:55 +01:00
Markus Wick f63d40270d Merge pull request #5056 from JosJuice/use-readswapped
Volume: Use ReadSwapped more
2017-03-13 10:30:55 +01:00
Matthew Parlane 1eba936749 Merge pull request #5072 from lioncash/const
DSPEmitter/DSPInterpreter: Remove unnecessary const specifiers from function declaration parameters
2017-03-13 14:13:53 +13:00
Lioncash ade7718636 DSPInterpreter: Remove unnecessary const specifiers from function declaration parameters 2017-03-12 17:38:04 -04:00
Lioncash a33cd805f9 DSPEmitter: Remove unnecessary const specifiers from function declaration parameters
These only matter for types being passed by value within the definition,
not the declaration.
2017-03-12 17:37:07 -04:00
Léo Lam 2111e4dd92 IOS/ES: Fix GetStoredContentsFromTMD
We were checking for the wrong files (title content directory instead
of checking whether the content files themselves exist)... Whoops!
2017-03-12 14:32:01 +01:00
Starsam80 0f44d22db5
Fix `ReadCertFile` by opening as binary file 2017-03-11 23:44:30 -07:00
Matthew Parlane b1bd231421 Merge pull request #5020 from leoetlino/es-safer-import
IOS/ES: Implement ES_AddTitleCancel (and slightly safer import process)
2017-03-12 16:14:17 +13:00
Matthew Parlane c62fc192ef Merge pull request #5027 from leoetlino/ssl-check
IOS/SSL: Make sure we are using a correct cert/key
2017-03-12 16:13:37 +13:00
Matthew Parlane d042121ebd Merge pull request #5043 from lioncash/net
IOS/Network/IP/Top: Separate behaviors into their own functions
2017-03-12 16:12:43 +13:00
Matthew Parlane 29cf19f3d0 Merge pull request #5066 from leoetlino/personalised-tickets
IOS/ES: Handle personalised tickets properly
2017-03-12 16:12:21 +13:00
Lioncash 26e9c54886 DSPEmitter: Make helper functions private
Given none of these are used outside of the DSPEmitter class (nor does
it really make sense to allow them to be used outside of the class),
these should all be made private.
2017-03-11 20:33:07 -05:00
MerryMage dc1a8c46e9 DSP/Jit: Load address of m_cycles_left into register
On some platforms, the address of m_cycles_left exceeds the maximal 32-bit
offset from RIP.
2017-03-11 22:51:41 +00:00
Léo Lam 9c31d6f5c5 IOS/ES: Handle personalised tickets properly
IOS unpersonalises device-specific ("personalised") tickets prior to
storing them on the NAND.
2017-03-11 21:14:26 +01:00
Mat M 71273c05a9 Merge pull request #5054 from leoetlino/es-get-contents
IOS/ES: Implement ES_GetStoredContents ioctlvs properly
2017-03-11 10:52:53 -05:00
Mat M 3d041fa4ea Merge pull request #5055 from leoetlino/es-ticket-view-fix
IOS/ES: Fix GetViews to not check for the TMD
2017-03-11 10:50:50 -05:00
Stenzek 27d7a1646c Merge pull request #5065 from JosJuice/character
Fix issue 10146 (compilation issue because of colliding defines)
2017-03-11 18:26:26 +10:00
JosJuice 40e707348c Fix issue 10146 (compilation issue because of colliding defines) 2017-03-11 08:59:14 +01:00
Léo Lam 3cbf47d51d IOS/ES: Fix GetViews to not check for the TMD
Using DiscIO's NAND content loader is the wrong way to get the ticket
for a title, because it checks whether the TMD is present and the
validity check fails if it isn't. This is not the correct behaviour:
we should just read the ticket from /ticket without caring about TMDs.
2017-03-10 22:59:34 +01:00
Léo Lam 28519328d2 IOS/ES: Implement ES_GetStoredContents ioctlvs properly
* IOS doesn't rely on the number of contents indicated in the TMD.
  Instead, it checks whether the contents *do* exist on the NAND.

* Implement ES_GetTMDStoredContents (and the count ioctlv).

* Drop a hack in ES_GetStoredContents, which is unnecessary now that
  we do it properly.
2017-03-10 22:45:08 +01:00
Léo Lam 62ea76e04c IOS/ES: Clear /import on ES initialization
Something IOS does and we didn't do.
2017-03-10 22:44:26 +01:00
Léo Lam d6499aba50 IOS/ES: Implement ES_AddTitleCancel 2017-03-10 22:44:26 +01:00
Léo Lam e656258949 IOS/ES: Write import files to /import first
This is slightly safer than writing contents to /title directly.
We still cannot rename everything in one go atomically, but this allows
implementing AddTitleCancel very easily.

Also, this ensures that when a title import fails, no incomplete files
will be left in the title directory, which can mess up the system menu.
2017-03-10 22:44:26 +01:00
Michael Maltese 418a7723c8 GLExtensions: remove NV_depth_buffer_float from OpenGL 3.0
Regression introduced in e99cd57 / 4935: VideoBackends: Set the maximum
range when the depth range is oversized[1]. The NV_depth_buffer_float
extension is not part of OpenGL 3.0, and requiring it causes a hard
crash when it's not supported (e.g. macOS).

[1]: https://github.com/dolphin-emu/dolphin/pull/4935
2017-03-10 12:54:46 -08:00
Markus Wick e99cd57eb3 Merge pull request #4935 from Armada651/depth-range-fix
VideoBackends: Set the maximum range when the depth range is oversized.
2017-03-10 18:05:52 +01:00
Jules Blok 3f41e6d4cf RenderBase: Check if early ztest is enabled before falling back to vertex depth range. 2017-03-10 15:43:32 +01:00
Stenzek 42993eeabc D3D11: Fix error on startup with >2.5xIR selected 2017-03-10 23:41:20 +10:00
Markus Wick ae0f9c200d Merge pull request #5038 from vladfi1/separate-nogui
Separate nogui
2017-03-10 10:50:08 +01:00
Lioncash b61ce51d3b IOS/Network/IP/Top: Separate behaviors into their own functions
Localizes behavior and separates the code out from the IOCtl/IOCtlV
switch blocks.
2017-03-09 20:58:45 -05:00
Markus Wick ef74c5eabd Merge pull request #5051 from stenzek/renderer-fixes
VideoBackends: Fix crashes introduced by #4999
2017-03-09 21:06:50 +01:00
JosJuice 135733e285 Volume: Use ReadSwapped more
Most of the Volume code was written before this
convenience function was added. Let's use it more.

Also deleting m_pReader nullptr checks that are
unnecessary because of Read (which ReadSwapped calls)
already having a nullptr check.
2017-03-09 21:03:28 +01:00
Anthony cf848b7c42 Merge pull request #5045 from JosJuice/unify-setting-game-metadata
Unify the way of setting game ID, title ID, revision
2017-03-09 18:13:02 +00:00
JosJuice ab616145c2 Get the right game ID for SSBB's Masterpiece partitions 2017-03-09 18:47:40 +01:00
JosJuice e04245a10e ConfigManager: Hack for getting the right revision on ES_Launch 2017-03-09 18:07:20 +01:00
Anthony dc42f7fb28 Merge pull request #4991 from leoetlino/config-loaders
New config loaders
2017-03-09 16:56:14 +00:00
JosJuice ced1614cac Unify the way of setting game ID, title ID, revision
The existing code from ConfigManager, ES and MIOS is merged
into a new set of functions called SetRunningGameMetadata.
2017-03-09 15:34:14 +01:00
Stenzek 2cd240af0d VideoBackends: Move max texture size to VideoConfig
This stops the virtual method call from within the Renderer constructor.

The initialization here for GL had to be moved to VideoBackend, as the
Renderer constructor will not have been executed before the value is
required.
2017-03-10 00:04:13 +10:00
Stenzek 4012166085 VideoCommon: Fix crash at startup with virtual XFB enabled 2017-03-09 23:39:48 +10:00
Léo Lam 2f02cc2996 IOS/SSL: Make sure we are using a correct cert/key
This adds a check to the SSL code to make sure we are using the correct
client certificate and key (and root CA).

Now, instead of silently failing, the user will be notified whenever a
file is missing or when it is invalid, i.e. when the hash does not
match; this is likely to happen for existing users as the program
linked in the network guide extracted the wrong certs :(
2017-03-09 13:57:23 +01:00
Lioncash 40cdd32760 GCMemcard: Mark class constructors explicit where applicable
Prevents potential implicit instantation.
2017-03-08 19:11:16 -05:00
Anthony 883bec873f Merge pull request #4939 from sjnewbury/gamelist-text
Always use visible text in GameList
2017-03-08 22:38:23 +00:00
Léo Lam dc224cba3c IOS/ES: Partially restore hack to fake IOS titles
This partially restores a hack which causes ES to fake ticket views for
IOS titles.

This is necessary because we still allow users to boot games from the
game list, so, with no way of making sure the required IOSes are
installed beforehand, games may OSPanic() when they try to reload to
some IOS version and just find out that the IOS is not installed
(something which *never* happens on the real console, of course).

A warning is printed in the logs to make sure technical users know the
IOS titles are being faked. To try and keep things accurate in all
other cases, this hack is only active when it is needed (when the
current title is a disc title which was launched from the game list).
2017-03-08 23:09:10 +01:00
Matthew Parlane cd826cee34 Merge pull request #5039 from leoetlino/es-import-hash-check
IOS/ES: Check the content hash during imports
2017-03-09 10:58:06 +13:00
Vlad Firoiu 68adcbd209 Don't special-case nogui exe name on Apple. 2017-03-08 13:17:49 -08:00
Markus Wick be8de62b88 Merge pull request #5041 from JosJuice/hi-2007
PatchEngine: Remove an unneeded comment
2017-03-08 21:23:40 +01:00
JosJuice 08954e99f5 PatchEngine: Remove an unneeded comment 2017-03-08 21:03:10 +01:00
JosJuice a1f874a66b ConfigManager: Remove m_strName
m_strName has limited usefulness, because GetInternalName()
can be inaccurate or even completely wrong. It was almost
completely unused anyway.
2017-03-08 21:01:57 +01:00
JosJuice ac3bf7ad0b DVDInterface: Assert IsDiscInside() in GetVolume() 2017-03-08 19:27:04 +01:00
JosJuice a176bf0229 DVDInterface: Remove VolumeIsValid
It's the same as IsDiscInside.
2017-03-08 19:27:00 +01:00
JosJuice 3b632f5990 DVDInterface: Remove SetDiscInside
It's only a call to SetLidOpen now.
2017-03-08 19:26:56 +01:00
JosJuice 167d16ded6 DVDInterface: Remove the SetLidOpen parameter
The lid must always be consistent with whether a disc is inserted.
Callers shouldn't be able to set inconsistent states.
2017-03-08 19:26:50 +01:00
JosJuice 900793ef1d DVDInterface: Remove s_disc_inside
There's no point in having a variable for whether there is a disc
when it's simpler to just directly check whether there is a disc.
2017-03-08 19:26:31 +01:00
Steven Newbury 28f4793785 Always use visible text in GameList
Depending upon the desktop colour scheme, the light/dark
GameList backgrounds can cause the always white text
to become unreadble.

Use the common luminance approximation algorithm to
determine whether black text should be used instead.
2017-03-08 18:03:51 +00:00
JosJuice 740e4d0992 DVDInterface: Move a check from SetDiscInside to SetLidOpen 2017-03-08 18:35:40 +01:00
JosJuice 0abf875a3f DVDInterface: Call SetDiscInside when setting volume
SetDiscInside is an implementation detail that callers shouldn't
have to call on their own.
2017-03-08 18:35:40 +01:00
Léo Lam daa5ff9a81 IOS/ES: Check the content hash during imports
This adds a hash check for imported contents. IOS does it for security;
we do it for a somewhat different reason, to catch content decryption
bugs before incorrectly decrypted contents get written to the NAND,
which can cause titles to be corrupted.

Either way, we should have been doing this check in all cases.
2017-03-08 16:32:38 +01:00
Markus Wick 489d90b6f3 Merge pull request #4999 from stenzek/renderer-statics
VideoCommon: Eliminate static state in Renderer
2017-03-08 11:02:20 +01:00
Markus Wick 9c1eac1f4f Merge pull request #4944 from vladfi1/framedump
Framedump extensions
2017-03-08 11:01:53 +01:00
Markus Wick a911d256a7 Merge pull request #5018 from Tilka/trunc
VideoCommon: remove unnecessary trunc()
2017-03-08 11:01:17 +01:00
Vlad Firoiu 096f58b172 Save new framedump options. 2017-03-08 01:38:40 -08:00
Vlad Firoiu bc9db6de56 Moved NoGUI out of DolphinWx. 2017-03-08 01:24:18 -08:00
Vlad Firoiu 6a89cf0201 Moved X11Utils into UICommon. 2017-03-08 01:24:10 -08:00
Markus Wick 7cc5604a2c Merge pull request #5033 from vladfi1/nogui-user
Parse user directory on nogui CLI.
2017-03-08 10:04:12 +01:00
Markus Wick ac914e939b Merge pull request #5035 from lioncash/out-of-bounds
GCAdapter_Android: Fix an array bounds overrun in Read()
2017-03-08 10:01:34 +01:00
Florent Castelli b69d3f13cb common: Don't include intrin.h in a namespace
Fixes compilation with VS2017
2017-03-08 06:55:06 +01:00
Florent Castelli cf68ecf066 core: Add missing include 2017-03-08 06:55:05 +01:00
Matthew Parlane 028da93d35 Merge pull request #5030 from sepalani/fix_pr_5002
Fix a vector assertion introduced by PR #5002
2017-03-07 23:23:11 +13:00
Matthew Parlane cfc909f422 Merge pull request #4867 from lioncash/simplify
Boot_WiiWAD: Simplify state_checksum()
2017-03-07 18:27:50 +13:00
Matthew Parlane 52f22e240b Merge pull request #5031 from lioncash/cast
CachedInterpreter: Get rid of an unnecessary cast
2017-03-07 18:11:00 +13:00
Matthew Parlane 4d02d38bf0 Merge pull request #5032 from lioncash/const
Memmap/PowerPC: Remove unnecessary const on function declaration parameters
2017-03-07 18:10:31 +13:00
Lioncash b914edd441 GCAdapter_Android: Fix an array bounds overrun in Read()
s_controller_payload is 37 bytes long, but Read() would copy 0x37 (a.k.a
55) bytes, overrunning the array.
2017-03-06 23:05:17 -05:00
Lioncash 26f7f55a66 GeneralConfigPane: Fix analytics sizer's right side being misaligned by 5 units 2017-03-06 22:19:54 -05:00
Vlad Firoiu ac3586f46c Parse user directory on nogui CLI. 2017-03-06 12:24:38 -08:00
Lioncash 4d1a4ba759 PowerPC: Remove unnecessary const on function declaration parameters 2017-03-06 14:10:33 -05:00
Lioncash 248a04f68f Memmap: Remove unnecessary const on function declaration parameters
const, when used on value type parameters in the declaration,
is superfluous. This doesn't really convey any information to take note
of when using the function. This only matters in the definition when you
want to prevent accidental modification.

e.g.

// Header
void CalculateSomething(int lhs, int rhs);

// Definition
void CalculateSomething(const int lhs, const int rhs)
{
  // lhs and rhs can't accidentally be modified
}
2017-03-06 14:08:07 -05:00
Lioncash a9c570a9f8 CachedInterpreter: Get rid of an unnecessary cast
This is only ever used to read a value and not modify data, so this can
just be constructed by value.
2017-03-06 13:18:46 -05:00
Matthew Parlane 7d681f9c93 Merge pull request #5016 from leoetlino/es-di-gettmd
IOS/ES: Implement ES_DIGetTMDView (and GetTMDViewSize)
2017-03-07 00:05:47 +13:00
Sepalani bc1990ce5d Fix a vector assertion introduced by PR#5002 2017-03-06 01:41:42 +00:00
Vlad Firoiu 71c0e30655 Appease linter. 2017-03-05 17:29:46 -08:00
Vlad Firoiu fbff74c1eb Warn on invalid video codec. 2017-03-05 17:08:59 -08:00
Vlad Firoiu 9155af5103 GetDumpPath function. 2017-03-05 17:08:59 -08:00
Vlad Firoiu 8c24387509 Use ffv1 if user requests it. 2017-03-05 17:08:59 -08:00
Matthew Parlane f9f4381461 Merge pull request #4525 from RisingFog/gci_dtm
GCI Folder support for TAS Recording/Playback
2017-03-06 13:26:16 +13:00
Chris Burgener 5193813b50 GCI Folder support for TAS Recording/Playback 2017-03-05 19:12:09 -05:00
Mat M 029ff4d9e5 Merge pull request #5022 from lioncash/header
BTStub: Get rid of an unnecessary forward declaration in the cpp file
2017-03-05 19:03:56 -05:00
Léo Lam dd8b0e3c3f IOS/ES: Fix logging type for dumping unknown ioctlvs 2017-03-06 00:38:13 +01:00
Léo Lam 5049451a85 IOS/ES: Implement ES_DIGetTMDView (and GetTMDViewSize)
This is required for online updates to work in the system menu.
2017-03-05 22:44:58 +01:00
Lioncash f80f875e27 BTStub: Get rid of an unnecessary forward declaration in the cpp file
This should be using the header file in order to find the function name.
2017-03-05 09:51:47 -05:00
Ryan Houdek 9373c7eca9 Update Visual Studio build files 2017-03-05 15:47:25 +01:00
Ryan Houdek 711f1cb7a3 Add core loaders to cmake 2017-03-05 15:47:25 +01:00
Ryan Houdek b93609e1ff Movie configuration loader 2017-03-05 15:47:25 +01:00
Ryan Houdek 1902f9f35a NetPlay configuration loader 2017-03-05 15:47:25 +01:00
Léo Lam b0d54a67cc GameConfigLoader: Fix issues mentioned in code review 2017-03-05 15:47:25 +01:00
Léo Lam fa98d07f7a GameConfigLoader: Implement missing Save function 2017-03-05 15:47:24 +01:00
Léo Lam 4761afe179 GameConfigLoader: Ignore unknown entries
It's not necessarily an issue. For example, memory breakpoints are
handled in a different location.
2017-03-05 15:47:24 +01:00
Ryan Houdek 9dbb6f9022 Game configuration loader 2017-03-05 15:47:24 +01:00
Ryan Houdek 1eb11b55a0 Base configuration loader 2017-03-05 15:47:24 +01:00
Ryan Houdek 94d35ab7cb Implement command line option setting 2017-03-05 15:47:23 +01:00
Ryan Houdek ead8be9d19 Move IniFile section chunk handling to IniFile::Section 2017-03-05 15:47:23 +01:00
Léo Lam b7a1c6f504 Logging: Add CORE type 2017-03-05 15:47:23 +01:00
Mat M 7fa14169e9 Merge pull request #5007 from lioncash/swap
Common: Move byte swapping utilities into their own header
2017-03-05 09:45:29 -05:00
Tillmann Karras 8a72e84ece VideoCommon: remove unnecessary trunc() 2017-03-05 01:53:54 +00:00
Matthew Parlane c2594695b8 Merge pull request #5001 from leoetlino/es-titles
IOS/ES: Fix ES_GetTitles and implement ES_GetOwnedTitles
2017-03-05 14:28:28 +13:00
Lioncash 0e5a367ca3 SysConf: const-correctness 2017-03-04 19:19:42 -05:00
Lioncash 1ebd2cd7c3 SysConf: Get rid of pointer casts 2017-03-04 19:06:22 -05:00
Léo Lam 52e8486b7c IOS/ES: Refactor GetTitles into a utility function 2017-03-04 20:33:35 +01:00
Léo Lam 1525396ecf IOS/ES: Properly handle missing TMD in GetStoredTMD
When the TMD doesn't exist on the NAND, IOS returns -106.

This commit also changes IsValid() to not check for the TMD validity,
since this is not always something we want. (IOS can have different
error codes when the TMD is missing, or even worse, simply assume
that the TMD is valid.)
2017-03-04 20:33:35 +01:00
Léo Lam b1ffbef5ce IOS/ES: Implement ES_GetOwnedTitles 2017-03-04 20:33:35 +01:00
Léo Lam 35995e98d7 IOS/ES: Fix GetTitles implementation
IOS determines installed titles by looking at /title, not uid.sys,
which is more like a history of installed titles. And it does not care
at all about the installed TMD (or even if it is present at all).
2017-03-04 20:33:34 +01:00
Markus Wick 7304cb0f8e Merge pull request #5011 from stenzek/d3d-texture-corruption
D3D11: Use default usage for TextureCache entries
2017-03-04 15:55:58 +01:00
Stenzek 725d5bc3a1 D3D11: Drop unused method ReplaceRGBATexture2D 2017-03-04 22:37:10 +10:00
Stenzek 526fa9bc85 D3D11: Use D3D11_USAGE_DEFAULT for all TextureCache textures 2017-03-04 22:36:33 +10:00
Markus Wick 3c511f2a94 Merge pull request #5003 from lioncash/memory
UICommon: Make GetNewDisassembler() return a unique_ptr
2017-03-04 12:14:35 +01:00
Markus Wick 01143d761e Merge pull request #5006 from lioncash/settings
ControllerEmu: Initialize settings class' values to default values on construction
2017-03-04 12:13:24 +01:00
Stenzek 4cea9a2f99 Vulkan: Fix underflow in StreamBuffer::WaitForClearSpace
This could cause the assertion on line 212 to fail when uploading large
amounts of data in between command buffer executions.
2017-03-04 18:07:04 +10:00
Stenzek 459a5ab554 Android: Move screenshot waiting logic to Renderer 2017-03-04 16:53:16 +10:00
Stenzek 811eafda57 VideoCommon: Store last window request width/height
This avoids the need to send a window resize event every frame.
2017-03-04 16:53:12 +10:00
Stenzek 00a0a91513 VideoCommon: Move last EFB scale handling to CalculateTargetSize 2017-03-04 16:53:07 +10:00
Stenzek afc25fdca0 VideoCommon: Rename Renderer s_ prefixes to m_ 2017-03-04 16:42:21 +10:00
Stenzek 238a70b006 VideoCommon: Move some common initialization logic to RenderBase 2017-03-04 16:42:16 +10:00
Stenzek 277829d842 VideoCommon: Eliminate static state in Renderer 2017-03-04 16:39:50 +10:00
Anthony de230f3ebe Merge pull request #4998 from stenzek/vulkan-aspect-changes
Vulkan: Fix issue where target rectangle changes weren't detected
2017-03-03 21:47:29 -08:00
Lioncash 552c0d8404 Common: Move byte swapping utilities into their own header
This moves all the byte swapping utilities into a header named Swap.h.

A dedicated header is much more preferable here due to the size of the
code itself. In general usage throughout the codebase, CommonFuncs.h was
generally only included for these functions anyway. These being in their
own header avoids dumping the lesser used utilities into scope. As well
as providing a localized area for more utilities related to byte
swapping in the future (should they be needed). This also makes it nicer
to identify which files depend on the byte swapping utilities in
particular.

Since this is a completely new header, moving the code uncovered a few
indirect includes, as well as making some other inclusions unnecessary.
2017-03-03 17:18:18 -05:00
Lioncash b592e4887e BooleanSetting: Initialize m_value to default_value in the constructor
Ensures all class state is initialized to valid values on construction.
2017-03-03 14:09:48 -05:00
Lioncash 25e70570b5 NumericSettings: Initialize m_value to default_value in the constructor
Ensures that all class state is initialized to valid values.
2017-03-03 14:06:16 -05:00
aldelaro5 654f582446 Don't save watches and breakpoints on stop and load on boot
Not only this is pretty pointless because there is a load and save button on the appropriate panels, but for the breakpoints one, it caused an error while mapping the memory since adding memory breakpoint requires to update the DBAT and this is done too early (right after boot).  This also only worked if you had the right panel on making it even more useless because it would fail to laod if you didn't have the right panel on.  It's better to just let the user click load and save.
2017-03-03 05:18:33 -05:00
Lioncash 13757b7d35 UICommon: Make GetNewDisassembler() return a unique_ptr
Much better than just returning raw memory.
2017-03-02 21:26:17 -05:00
Matthew Parlane 51e932b4ec Merge pull request #4975 from ligfx/controlsetting
InputCommon: move Setting classes out of ControlGroup
2017-03-03 15:17:25 +13:00
Michael Maltese 1539ff6691 InputCommon: move Setting classes out of ControlGroup 2017-03-02 18:08:37 -08:00
Anthony 1392b88879 Merge pull request #5002 from leoetlino/es-di-ioctlvs
IOS/ES: Implement ES_DIGetTicketView
2017-03-02 17:54:54 -08:00
Matthew Parlane dffb14cfc7 Merge pull request #5000 from lioncash/fwd
JitInterface: Convert includes into forward declarations where applicable
2017-03-03 14:54:24 +13:00
Léo Lam 34adc72d1c IOS/ES: Implement ES_DIGetTicketView
One of the remaining ioctlvs that were not implemented, and which were
used by games (even though they did not really depend on the view).
2017-03-02 22:13:45 +01:00
Léo Lam d97ae1054f Remove useless ES wrappers from the main IOS file
This removes wrappers for ES_DIVerify and ES::LoadWAD. They are not
really useful as we can simply call the ES function directly, and
it is actually somewhat confusing because both functions are static
and are not tied to a particular ES instance.
2017-03-02 20:29:01 +01:00
Léo Lam 5a74343d06 IOS/ES: Add logging for title context changes 2017-03-02 20:29:01 +01:00
Léo Lam c191fe5348 IOS/ES: Update running game info on title change
This allows Dolphin to stay up-to-date about what title is currently
running, which fixes savestates, screenshots, etc. after an ES_Launch.

Same limitation as with MIOS: currently, GameINIs are not reloaded,
because it's a pain with the current config system. It'll happen
when the new config system is done, and this commit makes it much
easier to do!
2017-03-02 20:29:00 +01:00
Léo Lam 9c18eea812 IOS/ES: Mark members shared between instances as static
Some members are shared between ES instances, and they are just global
variables in IOS.

This is more efficient than getting the installed titles or setting the
current active title tons of times for no reason.
2017-03-02 20:29:00 +01:00
Léo Lam 4d776ffa8f IOS/ES: Keep track of the active title properly
This changes ES to keep track of the active title properly,
just like IOS:

* It is NOT changed on resource manager open/close.
* It is reset on IOS reload.
* It is changed by ES_DIVerify and ES_Launch.

IOS stores the active title in a structure like this:

    struct ESTitleContext
    {
      Ticket* ticket;
      TMD* tmd;
      u32 active;
    };

With this commit, we also do keep the Ticket and TMD around. This
makes some of the DI ioctlvs (which return data about the current
active title) trivial to implement in the future.

This fixes the System Menu not being able to see update partitions
and also allows us to change Dolphin's active game info in the future.
2017-03-02 20:28:01 +01:00
Mat M 78e7f4aae3 Merge pull request #4984 from leoetlino/content-fixes
IOS/ES: Title import fixes + hack removals (fix for System Menu disc updates)
2017-03-02 14:17:29 -05:00
Lioncash c6200a5b07 JitInterface: Convert includes into forward declarations where applicable 2017-03-02 13:20:29 -05:00
Stenzek 2fd77895a2 Vulkan: Fix issue where target rectangle changes weren't detected
This was causing issues when toggling the crop setting, as well as some
widescreen hacks.
2017-03-02 21:53:42 +10:00
Stenzek 3390e6f258 Merge pull request #4993 from ligfx/fixsonicadventure2
OGL SetBlendMode: always set blend equation and func
2017-03-02 21:30:10 +10:00
Markus Wick 7982ba120f Merge pull request #4995 from lioncash/normalize
CMakeLists: Normalize whitespace
2017-03-02 11:51:06 +01:00
Markus Wick 521a777ade Merge pull request #4961 from aldelaro5/fast-memchecks
Make memory breakpoint faster
2017-03-02 11:13:18 +01:00
aldelaro5 9ad6c8f334 Make memory breakpoint faster
Currently, slowmem is used at any time that memory breakpoints are in use.  This commit makes it so that whenever the DBAT gets updated, if the address is overllaping any memchecks, it forces the use of slowmem.  This allows to keep fastmem for any other cases and noticably increases performance when using memory breakpoints.
2017-03-02 04:46:27 -05:00
Lioncash ee61bd6f2e CMakeLists: Normalize whitespace
Normalizes tabs to spaces to follow our codebase's indentation style.
2017-03-01 14:53:23 -05:00
Léo Lam ac27aff9c8 Add ES::Content::IsShared to avoid hardcoding 0x8000 2017-03-01 17:36:07 +01:00
Léo Lam 3bd34008c9 IOS/ES: Fix GetTMDView when title doesn't exist
This fixes ES_GetTMDView and ES_GetTMDViewSize to return -106
(FS_ENOENT) if the title does not exist (and more specifically when no
TMD exists in the NAND). This allows installed (or not installed) IOSes
to be detected properly.
2017-03-01 17:36:07 +01:00
Léo Lam 90aaefaef7 IOS/ES: Drop 'fake IOS titles' hack
It prevents system updates from working properly, because we always
returned that the latest version of every single IOS was installed.
2017-03-01 17:36:07 +01:00
Léo Lam e5d9bcaf43 IOS/ES: Edit uid.sys on AddTitleStart
This allows channels to be registered and installed properly.
(And it is what IOS does.)
2017-03-01 17:36:07 +01:00
Léo Lam 1e3f8c1a1d IOS/ES: Add sanity checks to AddTitleFinish 2017-03-01 17:36:06 +01:00
Léo Lam 9263cb1996 IOS/ES: Handle adding shared contents properly 2017-03-01 17:34:59 +01:00
Mat M 8364a0002f Merge pull request #4956 from leoetlino/es-checks
ES: Replace useless asserts with proper checks
2017-03-01 11:30:25 -05:00
Anthony 8dc96fce4d Merge pull request #4776 from lioncash/dspemitter
DSPEmitter: Convert a C array to a std::array
2017-03-01 08:11:26 -08:00
Léo Lam 24e35f96fa ES: Replace useless asserts with proper checks
It makes absolutely no sense to have asserts for what is obviously an
error condition. And they should definitely not cause Dolphin to crash
because it assumes that everything is valid, and Dolphin should not
report those to the user either, as it is very obviously a bug in the
emulated software and there is nothing the user (or we) can do.

This commit replaces all of the request asserts with proper checks
and adds missing checks for some ioctlvs. We still do not check sizes
yet; this will be done later.
2017-03-01 16:05:33 +01:00
Michael Maltese db1d826ac3 OGL SetBlendMode: always set blend equation and func
Before #4581, an invocation of `SetBlendMode` could invoke
`glBlendEquationSeparate` and `glBlendFuncSeparate` even when it was
setting `glDisable(GL_BLEND)`. I couldn't figure out how to map the old
behavior over to the new BlendingState code, so I changed it to always
call the two blend functions.

Fixes https://bugs.dolphin-emu.org/issues/10120 : "Sonic Adventure 2
Battle: graphics crash when loading first Dark level".
2017-03-01 00:49:14 -08:00
Jules Blok 83bd74aef0 Merge pull request #4974 from gamemasterplc/master
Widescreen Hack improvement
2017-03-01 02:17:33 +01:00
Michael Maltese c277c91b29 NetPlayClient: rename variables: spac -> packet 2017-02-28 14:37:45 -08:00
Michael Maltese 1834833edd NetPlay: use move semantics instead of unique_ptrs 2017-02-28 14:29:27 -08:00
aldelaro5 52fe05af6b Make memory breakpoint faster
Currently, slowmem is used at any time that memory breakpoints are in use.  This commit makes it so that whenever the DBAT gets updated, if the address is overllaping any memchecks, it forces the use of slowmem.  This allows to keep fastmem for any other cases and noticably increases performance when using memory breakpoints.
2017-02-28 13:02:04 -05:00
Anthony f4ccc11b73 Merge pull request #4988 from leoetlino/tikview
ESFormats: Fix calculation of the ticket start offset
2017-02-28 09:57:04 -08:00
Markus Wick 0a8b5b79ef Merge pull request #4985 from lioncash/enum-class
ExpressionParser: Convert parse state enum into an enum class
2017-02-28 18:48:45 +01:00
Markus Wick bd89c7b2c4 Merge pull request #4986 from lioncash/namespace
PixelEngine: Move enum constants into the PixelEngine namespace
2017-02-28 18:46:45 +01:00
Léo Lam e9f23fbc92 ESFormats: Fix calculation of the ticket start offset
The signature part doesn't seem to appear more than once in a signed
ticket, so we should always add that offset regardless of the
ticket number.
2017-02-28 18:42:06 +01:00
Anthony fcc05c0b0e Merge pull request #4983 from degasus/jitcache
JitCache: Fix two block invalidation issues.
2017-02-28 09:20:24 -08:00
Lioncash 5ed55ffb34 PixelEngine: Move enum constants into the PixelEngine namespace
Gets some identifier names out of the global namespace.
2017-02-28 07:01:50 -05:00
Lioncash d104e5e916 ExpressionParser: Convert parse state enum into an enum class 2017-02-28 05:07:21 -05:00
Vlad Firoiu a3af5b09d3 error logs 2017-02-27 23:45:35 -08:00
Vlad Firoiu 6b1910a078 Appease global header warning. 2017-02-27 23:45:35 -08:00
Vlad Firoiu f82e3de763 Dump to arbitrary URLs. 2017-02-27 23:45:34 -08:00
Vlad Firoiu 21e66e60e3 Configable dump codec. 2017-02-27 23:45:12 -08:00
Vlad Firoiu a1a9e488a5 XVID FourCC for MPEG-4 codecs. 2017-02-27 23:44:33 -08:00
Vlad Firoiu d4686aa1a7 More warnings for AVIDump. 2017-02-27 23:44:33 -08:00
Vlad Firoiu 86a8382376 Arbitrary dump formats. 2017-02-27 23:44:29 -08:00
Vlad Firoiu 1723645c99 guess format before allocating context 2017-02-27 23:43:15 -08:00
Vlad Firoiu 8fb2eb889d Handle delayed frames at the end of the movie. 2017-02-27 23:43:15 -08:00
Anthony e375c96693 Merge pull request #4982 from leoetlino/copy
ESFormats: Fix GetRawTicketView
2017-02-27 17:08:27 -08:00
Markus Wick deb228f134 Merge pull request #4774 from degasus/speedhack
PatchEngine: Apply speedhack per PC, not only per block entry.
2017-02-27 23:51:12 +01:00
degasus ffa61fcf57 JitCache: Also unlink exits of the current block.
We might still be in the current block. This is fine, but the next one might also be invalidated later on. But we may never also call the next one.
2017-02-27 23:50:16 +01:00
degasus c1ddc2678e JitCache: Fix removing of blocks. 2017-02-27 23:50:16 +01:00
Léo Lam 6edcba4af8 Bump the savestate version (for ES changes) 2017-02-27 21:26:30 +01:00
Léo Lam 6f79f741d5 IOS/ES: Check that m_addtitle_tmd is valid before use 2017-02-27 21:26:29 +01:00
Léo Lam 95aa48d086 IOS/ES: Implement AddTMD 2017-02-27 21:26:29 +01:00
Léo Lam 6327a29847 IOS/ES: Implement ES_Export* ioctlvs
This should allow channels to be copied to the SD properly.
2017-02-27 21:26:28 +01:00
Léo Lam 345d252ef3 IOS/ES: Deduplicate fields for opened content entries
Now that we have a proper Content structure for contents,
let's just use it instead of duplicating the fields.
2017-02-27 21:25:47 +01:00
Léo Lam 4e462d44f9 ESFormats: Fix GetRawTicketView
The vector was not constructed with the proper size, which results in a
buffer overflow as we were using memcpy.

This commit fixes that mistake and also uses a safer way of copying the
ticket view data (std::vector::insert instead of memcpy).
2017-02-27 21:19:05 +01:00
Anthony c4137c2880 Merge pull request #4965 from leoetlino/delete-everything
IOS/ES: Implement DeleteTitle
2017-02-27 12:18:47 -08:00
Anthony 7ac95c2673 Merge pull request #4906 from leoetlino/es-launch
IOS: Handle ES_Launch more accurately
2017-02-27 11:51:43 -08:00
Léo Lam fff4634a1c IOS: Handle ES_Launch more accurately
This commit fixes ES_Launch to work mostly the same as the real IOS
(except temporary, internal files such as /sys/launch.sys and title
handling; the latter will be handled in a future PR).

First of all, this adds two IOS functions, which correspond to two
IOS syscalls: 0x41 (boot_ppc) and 0x42 (boot_ios).

boot_ios() writes the new version to 0x3140, loads the new kernel,
which then proceeds to reinit IPC and load modules as part of its
boot process. Note that this doesn't include writing to any of the
other constants in the 0x3100 region.
In Dolphin, this is implemented by changing the active IOS
version variable, writing to 0x3140 and resetting all devices. This
has exactly the same effect as the real syscall.

The other syscall, boot_ppc(), writes code to the EXI boot buffer,
pokes all constants to memory before bootstrapping the PPC with a
binary from the NAND.
We skip the low level stuff and just load the DOL to memory (and set
the PPC's PC to 0x3400), which is essentially what IOS does.

The other change is mostly related to how ES_Launch is handled.

With a real IOS, if the launched title type is 00000001 (system) and
the title is not 1-2 (System Menu), ES calls boot_ios().

Otherwise, ES handles the launch as a PPC title. It reads the TMD
to determine the required IOS version. If it is the same, boot_ppc()
is called directly. If not, ES saves the title to launch to the NAND
before launching the new IOS. After the new IOS has finished booting,
it will notice the flag and then launch the requested title.

What this commit does is really just implement this logic into IOS HLE.
The result is a fix for a regression introduced by SetupMemory,
where reloading an IOS would have overwritten some OS constants.
This fixes booting games from the disc channel.
2017-02-27 20:44:30 +01:00
Anthony ed6a46a193 Merge pull request #4958 from RisingFog/avidump_bitrate
Add configurable video dump bitrate to INI
2017-02-27 10:15:19 -08:00
Anthony 63c5230d9b Merge pull request #4959 from lioncash/ini
IniFile: Handle s64/u64 values
2017-02-27 10:02:53 -08:00
Anthony 0cac00a39c Merge pull request #4977 from ligfx/fixwxmainmenubar
DolphinWX: don't refresh MainMenuBar on construction
2017-02-27 09:42:01 -08:00
Anthony b16cebc297 Merge pull request #4978 from ligfx/avidumpclosefiles
AVIDump[regression]: close avio handles
2017-02-27 09:39:40 -08:00
Jules Blok f5d14e3691 Merge pull request #4933 from Armada651/disable-cache
VideoBackends: Add a developer option to disable the shader cache.
2017-02-27 17:35:01 +01:00
Léo Lam ac43836714 IOS/ES: Implement DeleteTitle
No idea why this wasn't implemented whereas ES_DeleteTicket and
ES_DeleteTitleContent were.

This probably fixes title deletion in old System Menus, and maybe
the new ones as well in some cases; I've seen 4.3 use this ioctlv.
2017-02-27 15:32:31 +01:00
Michael Maltese 621472336c AVIDump[regression]: close avio handles 2017-02-26 23:26:31 -08:00
Matthew Parlane d666363ac4 Merge pull request #4966 from RisingFog/remove_traversal_server_debug_mode
Turn Off Debug Mode for Traversal Server
2017-02-27 16:18:13 +13:00
Matthew Parlane ca9504d0fa Merge pull request #4969 from leoetlino/clear-tmp
IOS: Clear the /tmp directory on IOS boot
2017-02-27 16:17:49 +13:00
Matthew Parlane 48aeb5bf4b Merge pull request #4896 from leoetlino/esformats
Use ESFormats for tickets, TMDs and views
2017-02-27 16:15:05 +13:00
Michael Maltese 720f0ab93f DolphinWX: don't refresh MainMenuBar on construction
On startup, wxWidgets pops up an assertion error:

> ./src/osx/menu_osx.cpp(648): assert ""IsAttached()"" failed in
> Refresh(): can't refresh unatteched menubar
2017-02-26 17:50:36 -08:00
Michael Maltese a3e3986906 DolphinWX: provide empty OnCmdLineParsed
Starting in #4916, upon startup wxWidgets pops up an assertion error:

> ./src/common/cmdline.cpp(527): assert ""Assert failure"" failed in
> FindOptionByAnyName(): Unknown option verbose

Fix this by overriding wxApp::OnCmdLineParsed to disable the default
handling (since we also disable the default options in
DolphinApp::OnInitCmdLine).
2017-02-26 17:38:18 -08:00
Anthony 7bcff99d89 Merge pull request #4963 from leoetlino/sysconf
SysConf: Use vectors instead of raw pointers
2017-02-26 16:09:17 -08:00
Anthony 832e0501db Merge pull request #4960 from lioncash/type
ControlGroup: Convert group type enum into an enum class
2017-02-26 15:56:34 -08:00
Anthony 0dde642b7d Merge pull request #4917 from leoetlino/config
New configuration namespace
2017-02-26 15:54:25 -08:00