Commit graph

20303 commits

Author SHA1 Message Date
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
Matthew Parlane
d108747371 Merge pull request #5108 from lioncash/shadow-vars
NetPlayClient: Eliminate variable shadowing
2017-03-19 16:41:03 +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
Mahdi Hijazi
ecf2eaac99 Remove obselete game menu settings button 2017-03-18 22:08:49 +01:00
Mahdi Hijazi
4c0e5dedb4 Fix loading the saved screen shots for Android version
Apparently the path was changed from using "/thump.png" to using
"/gameId-#.png". We will always use the first screenshot for the game
broswer wich will be "/gameId-1.png"
2017-03-18 22:08:41 +01:00
Mahdi Hijazi
d19f9038da Fix menu actions on Android TV
Saving screenshot was not working due to 2 problems. The first one is that
the view id of the save screenshot in the Android TV fragment doesnt match
the one declared inside the menu_emulation. Second Problem will be fixed
in another commit.

This commit chnage the code to not depend on reusing the ids of the menu
everywhere in the emulator inorder for the onMenuItemClicked to work.
Instead you need to call EmulationActivity.handleMenuAction passing
the action to handle regardless of the ids you are using in the view.
2017-03-18 22:08:32 +01: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
Anthony
3b1dae5642 Merge pull request #4703 from ligfx/cmake_cxx_standard
CMake: Use CMAKE_CXX_STANDARD instead of passing -std=c++14
2017-03-15 18:04:28 -07: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
Michael Maltese
c4640295b1 CMake: add CMAKE_CXX_STANDARD_REQUIRED=ON 2017-03-14 13:52:02 -07:00
Michael Maltese
4c580bc3b7 CMake: Use CMAKE_CXX_STANDARD instead of passing -std=c++14
Available since CMake 3.1
2017-03-14 13:52:02 -07: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
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