Commit Graph

13724 Commits

Author SHA1 Message Date
skidau b73130af77 Added Load/Save function for the Watch window.
Made the floating windows toolbars dockable.
Scaled down the breakpoint toolbar icons to 16x16.
2014-10-26 14:56:03 +11:00
skidau b34e220086 Added a "Delete watch" context menu to the Watch window.
Added a "View memory" command to the context menu.
2014-10-26 14:56:03 +11:00
skidau 290e1bed37 Disable block linking while debugger stepping or if there are breakpoints 2014-10-26 14:56:02 +11:00
skidau d0a3bb7650 Added "Add to watch" context menu items to the Memory and Register windows.
Added "View memory" context menu item to the Register window.
2014-10-26 14:56:02 +11:00
skidau 613cae613a Added a RAM Watch window to the debugger
Conflicts:
	Source/Core/Core/HW/Memmap.cpp
	Source/Core/Core/HW/Memmap.h
	Source/Core/DolphinWX/Debugger/CodeWindow.h
2014-10-26 14:56:02 +11:00
skidau df37649b9f Changed the step over routine to a single stepping version that steps until a blr is encountered.
Cleared out all temporary breakpoints on each step to prevent phantom breakpoints from stopping the debugger.
2014-10-26 14:56:02 +11:00
skidau b331ec96a3 Made the "continue", "stepover" and "stepout" functions work when the PC is at a breakpoint 2014-10-26 14:56:02 +11:00
skidau 219a5078e8 Added a "Step Out" (aka "Step return") function to the debugger.
Conflicts:
	Source/Core/DolphinWX/Debugger/CodeWindow.h
2014-10-26 14:56:01 +11:00
skidau f895648eb9 Merge pull request #1396 from comex/star-star-star
Fix 'sizeof' which broke in my reference-to-pointer conversion.
2014-10-26 14:18:02 +11:00
skidau 38acd4d4bf Merge pull request #1382 from Sonicadvance1/LLVM-disasm
Implements LLVM based disassembler for the debugger.
2014-10-26 13:46:01 +11:00
skidau 1078d78a6c Merge pull request #1374 from lioncash/clearctx
AGL: Use NSOpenGLContext's clearCurrentContext in ClearCurrent
2014-10-26 13:44:50 +11:00
skidau 7c58eb344d Merge pull request #1378 from lioncash/gl
GLUtil: Change return type from GLuint to GLenum for OpenGL_ReportGLError.
2014-10-26 13:44:34 +11:00
Lioncash 14c3445ad2 DolphinQt: Make GetOS const 2014-10-25 21:51:58 -04:00
Lioncash adf6ce076c CheatSearchTab: Make cheat list display in monospace font 2014-10-25 21:44:56 -04:00
Ryan Houdek 0fbd5248ca Fixes a potential crash on the ARMv7 JIT if someone disables the entire JIT in the debugger.
We can't disable branches in the JITs. Make sure they don't become disabled if someone tries to disable the full JIT.
2014-10-25 20:38:44 -05:00
Ryan Houdek 17f352e2aa Fixes some overzealous optimizations from ARMv7 BindToRegister.
We can't do it in rlw and friends.
subfx had an inccorect check.
Minor whitespace and reordering.
2014-10-25 20:36:29 -05:00
Ryan Houdek 484fc392d6 Fixes minor bug in the ARMv7 register cache.
Makes sure our register we are binding doesn't get unloaded immediately.
2014-10-25 20:34:11 -05:00
comex 5f21683343 Merge pull request #1388 from waddlesplash/dolphin-qt
DolphinQt: About dialog fixes, SystemInfo dialog
2014-10-25 21:20:02 -04:00
Augustin Cavalier 7cd0a13d35 Fixes from @comex to add the app bundle and icon on Mac. 2014-10-25 21:17:32 -04:00
Augustin Cavalier 69cd8229d8 Fixes to the About dialog & add the SystemInfo dialog.
Also fix the build on Mac OS X.
2014-10-25 20:59:07 -04:00
Rachel Bryk f07d3be502 Fix acceleration emulation for wiimote and nunchuk.
The 1-2 least significant bits were missing.
2014-10-25 19:49:42 -04:00
comex c81e3da22f Add unit test. 2014-10-25 16:57:25 -04:00
comex b29e5146ec Convert some VideoCommon stuff to BitSet.
Now with a minor performance improvement removed for no reason.
2014-10-25 16:57:25 -04:00
comex f51c233a08 Add workaround for OS X symbol clash and AllOnes helper method. 2014-10-25 16:57:25 -04:00
comex eb7f4dac50 Convert registersInUse to BitSet. 2014-10-25 16:57:25 -04:00
comex b6a7438053 Add BitSet and, as a test, convert some JitRegCache stuff to it.
This is a higher level, more concise wrapper for bitsets which supports
efficiently counting and iterating over set bits.  It's similar to
std::bitset, but the latter does not support efficient iteration (and at
least in libc++, the count algorithm is subpar, not that it really
matters).  The converted uses include both bitsets and, notably,
considerably less efficient regular arrays (for in/out registers in
PPCAnalyst).

Unfortunately, this may slightly pessimize unoptimized builds.
2014-10-25 16:56:51 -04:00
Lioncash da528008de CheatsWindow: Remove unnecessary header includes and forward decls 2014-10-25 16:56:16 -04:00
comex 275755aaaf Merge pull request #1381 from skidau/Remove-false-ext-exception-error
Added a check for external exceptions that have been set
2014-10-25 16:48:44 -04:00
comex 4b0c6d8e0f Merge pull request #1385 from lioncash/bitfield
BitField: Fix a typo in the sample usage.
2014-10-25 16:48:31 -04:00
comex b7cb5b69c4 Merge pull request #1387 from RachelBryk/radius
Change default gcpad radius to 100.
2014-10-25 16:46:06 -04:00
Stevoisiak d607903567 VideoConfigDiag: Updated video resolution description
Changed description to recommend selecting "auto"
2014-10-25 16:39:58 -04:00
Lioncash 51a96297e6 CheatSearchTab: Fix signed/unsigned comparison warning 2014-10-25 16:32:33 -04:00
Ryan Houdek 3ac2d8e1f1 Revert "Removes ARMv7 specific byteswap routines from CommonFuncs.h" 2014-10-25 15:28:04 -05:00
comex a9f9e81330 Use double braces for std:array initialization to avoid clang warning.
std::array does not have an initializer list constructor, instead (for
some reason) being defined to contain one public array member, allowing
it to be directly initialized.  Thus the most explicit way to initialize
it is with two braces, one for the struct and one for the array.  C++
allows the second pair of braces to be omitted, but clang complains
about it.
2014-10-25 15:39:24 -04:00
comex 5c2a470b97 Fix 'sizeof' which broke in my reference-to-pointer conversion. 2014-10-25 15:02:12 -04:00
Ryan Houdek c2364a54c1 Fixes packaging OS X binary with spaces in the directory name. 2014-10-25 10:51:54 -05:00
Ryan Houdek b66a7f83c2 Fixes ARM CPU detection routine for the hardware.
We weren't dropping a newline character from the string, we were cutting off the last character of the hardware name.
This fixes my TK1 being called 'lagun' when it's name is 'laguna'
2014-10-25 09:14:14 -05:00
Ryan Houdek e780a49a06 Merge pull request #1375 from Sonicadvance1/ARMv7-optimizations
Minor ARMv7 JIT recompiler optimizations.
2014-10-25 08:28:10 -05:00
skidau bc26cb1b19 Merge pull request #1322 from degasus/ogl-pp
OGL: force enable postprocessing
2014-10-25 13:48:27 +11:00
skidau 8598d6bc2b Merge pull request #1364 from RachelBryk/titles
Read game title from ini file, or titles.txt if it exists.
2014-10-25 13:33:26 +11:00
skidau 726306fa27 Merge pull request #1367 from lioncash/radiobox
CheatSearchTab: Use a wxRadioBox for data sizes
2014-10-25 13:32:24 +11:00
skidau f1e5765b99 Merge pull request #1372 from Sonicadvance1/fix-egl-blackness
Fixes black screen issue on EGL+X11 systems.
2014-10-25 13:31:37 +11:00
Ryan Houdek cb10bef9a4 Implements LLVM based disassembler for the debugger.
This will work for all of our platforms, x86, ARMv7, and AArch64.
Main issue with this is that LLVM's cmake files aren't correctly finding the LLVM install.
Not sure if this is Ubuntu's issue or not, it may just work on other operating systems.

We could potentially improve this, you can pass in a specific CPU in to the LLVM disassembler. This would probably affect latency times that are
reported by LLVM's disassembly? This needs to be further investigated later.
2014-10-24 18:10:21 -05:00
Rachel Bryk f199acc234 Alternate inputs once per frame rather than once per input for turbo.
Fixes turbo for games that do not run at 60 fps.
2014-10-24 17:56:46 -04:00
Ryan Houdek 6483f8d45c Removes ARMv7 specific byteswap routines from CommonFuncs.h
GCC has optimized this using the exact same code since 4.7 or 4.8.
Android building falls back to the __linux__ route.
No need to keep these around anymore since we aren't building on an old GCC version.
2014-10-24 16:21:54 -05:00
Augustin Cavalier 51700a2b68 Fix the brand/cpu_string reversal.
Before this commit, the two were reversed ("cpu_string" had the brand, e.g. "AuthenticAMD"; and "brand_string" had the CPU type, e.g. "AMD Phenom II X4 925").
2014-10-24 16:09:21 -04:00
Rachel Bryk c5fc3dd80f Change default gcpad radius to 100.
Official gc controllers need it to be 100 to work properly, and it is
better to have it set too high than too low.

See issue 7762.
2014-10-24 15:35:44 -04:00
booto 6afdff6023 VideoCommon: loop bug in ShaderGenCommon.h debug 2014-10-25 01:52:31 +08:00
Lioncash c0c835d0b6 BitField: Fix a typo in the sample usage. 2014-10-24 13:33:02 -04:00
Rachel Bryk 0e92a47bc8 Fix description of hide mouse cursor option. 2014-10-24 12:36:14 -04:00
Lioncash b1bdce7d77 TextureCache: Get rid of explicit deletes in SaveTexture 2014-10-24 08:47:06 -04:00
skidau 2c8e77dcc0 Added a check for external exceptions that have been set. Prevents a false positive log message. 2014-10-24 13:23:21 +11:00
skidau 3ab921d5b0 Merge pull request #1363 from lioncash/init-order
CoreParameter: Fix initializer list order
2014-10-24 13:03:38 +11:00
skidau 716fe06289 Merge pull request #1349 from comex/good-job-dereferencing-null-on-purpose
Fix some warnings from Clang trunk in an overly aggressive manner
2014-10-24 13:03:09 +11:00
skidau ace57fb515 Merge pull request #1348 from Sonicadvance1/JitBlockView-cleanup
Cleans up the JIT block viewer in the WX UI.
2014-10-24 13:01:53 +11:00
Sylvain Gadrat 3a12c50dc1 Fix timing of AVI files dumped on Linux
The timing information is set on s_scaled_frame->pts, giving precise
timing information to the encoder. Frames arriving too early (less than
one tick after the previous frame) are droped. The setting of packet's
timestamps and flags is done after the call to avcodec_encode_video2()
as this function resets these fields according to its documentation.
2014-10-23 23:34:38 +02:00
comex 1f5b1001ce Merge pull request #1342 from phire/lessGetPointer
Eliminate getPointers which are memcpyed or memset.
2014-10-23 14:42:37 -04:00
Lioncash 3509a6d03e GLUtil: Change return type from GLuint to GLenum for OpenGL_ReportGLError. 2014-10-23 13:04:19 -04:00
Ryan Houdek 5204acd5ee Fixes OpenSLES's sample rate.
I was statically setting the sample rate to 44.1Khz when we default to run at 48Khz.
This was causing audio to sound much too low.
2014-10-23 11:29:49 -05:00
Ryan Houdek 5bb19426b3 Optimizes instructions in ARMv7's JIT inside of the arith function.
For instructions where the second immediate value fits within an instruction encoding, just encode it directly in to the instruction.
2014-10-23 15:42:57 +00:00
Ryan Houdek 6743d6ef1f Adds support back for non-immediate cmp/cmpi to ARMv7 JIT. 2014-10-23 15:39:09 +00:00
Ryan Houdek 0253c35d3a Adds support to ARMv7's register cache for not loading a destination register prior to overwriting.
This extends the register cache's BindToRegister function with a doLoad argument just like x86's.
The speedup is minor for these implemented integer instructions.
2014-10-23 15:38:56 +00:00
Lioncash 101af72102 AGL: Use NSOpenGLContext's clearCurrentContext in ClearCurrent 2014-10-23 10:56:42 -04:00
Ryan Houdek ec56c3b8d3 Fixes black screen issue on EGL+X11 systems.
We weren't setting the backbuffer dimensions on this platform when the window is created.
This required a resize event to first be fired in order to see anything.

So instead do like GLX + X11 platforms do and query the dimensions and set the backbuffer to them.

Should fix issue 7666.
2014-10-23 08:06:42 -05:00
Ryan Houdek a2c8783417 Enables EarlyZ support in OpenGL ES 3.1. 2014-10-23 07:34:07 -05:00
Lioncash a9f0bd72d2 Merge pull request #1369 from Sonicadvance1/enable-profiling
Enables block profiling in the UI on non x86 targets.
2014-10-23 08:09:39 -04:00
Ryan Houdek 2a1d4a7245 Removes some terrible printf debugging that was left over in the ARMv7 JIT. 2014-10-23 06:08:49 -05:00
Ryan Houdek 50135a988e Enables block profiling in the UI on non x86 targets.
ARMv7 supports block profiling as well. So let's stop artificially limiting here.
2014-10-23 05:59:14 -05:00
Scott Mansell 23832987b5 Revert changes preloading of RGBA8 tiles.
This path should probally be optimised, but it's out of the
scope of this PR.
2014-10-23 18:15:29 +13:00
Lioncash 5bb6f515d8 CoreParameter: Fix initializer list order 2014-10-22 23:38:13 -04:00
Lioncash 40b2737458 CheatSearchTab: Use a wxRadioBox for data sizes 2014-10-22 23:37:35 -04:00
comex 00c6ec97a6 Merge pull request #1347 from comex/header-hygiene
Add missing includes where headers depend on other headers having been included first.
2014-10-22 23:23:58 -04:00
skidau 684cb658e2 Merge pull request #1354 from Sonicadvance1/ARMv7-stepping
Adds support for stepping in the ARMv7 JIT.
2014-10-23 13:31:17 +11:00
skidau 9836ce23e6 Merge pull request #1353 from Sonicadvance1/block-debugging
Don't enable stepping on ARMv7 JIT core if just in the debugger.
2014-10-23 13:30:04 +11:00
Rachel Bryk b1e14a65a2 Read game title from ini file, or titles.txt if it exists. 2014-10-22 22:19:40 -04:00
degasus 7292ea6a04 OGL: force enable postprocessing 2014-10-23 00:21:52 +02:00
Yuriy O'Donnell db497cc55f Added projection matrix epsilon that fixes depth clipping issues in some games 2014-10-23 00:20:47 +02:00
skidau 5d4b4c793a Merge pull request #1340 from Sonicadvance1/EGL-fixes
Remove hard dependencies of GLX and libGL from Dolphin.
2014-10-22 13:15:46 +11:00
comex 6e774f1b64 Add missing includes where headers depend on other headers having been included first.
This is good hygiene, and also happens to be required to build Dolphin
using Clang modules.

(Under this setup, each header file becomes a module, and each #include
is automatically translated to a module import.  Recursive includes
still leak through (by default), but modules are compiled independently,
and can't depend on defines or types having previously been set up.  The
main reason to retrofit it onto Dolphin is compilation performance - no
more textual includes whatsoever, rather than putting a few blessed
common headers into a PCH.  Unfortunately, I found multiple Clang bugs
while trying to build Dolphin this way, so it's not ready yet, but I can
start with this prerequisite.)
2014-10-21 21:22:16 -04:00
comex 06433652be Improve some libcdio CoreFoundation code.
I found it via clang complaining about a useless null check on an array,
but I decided to get rid of the array in favor of dynamic allocation, as
there was no reason to assume a maximum length of 0x32 bytes.  Plus, add
a CFString type check just in case, and switch to UTF-8 in the
off-chance it matters.

The result has not actually been tested, as I have no CD drive.
2014-10-21 21:20:11 -04:00
comex 8492d04dfa Use pointers instead of references in GetUidData to avoid the undefined behavior of *(T *)nullptr (ewwww) 2014-10-21 21:20:05 -04:00
comex 9adf608f38 Merge pull request #1355 from FioraAeterna/fixmmuoff
MMU: allow page-table loads/stores if MMU is off
2014-10-21 14:55:18 -04:00
Ryan Houdek ecf65d6f1f Cleans up the JIT block viewer in the WX UI.
This code was an absolute mess. It had allocated an arbitrarily large string buffer to hold instructions that were disassembled.

Strip out all of the nasty raw C string manipulation and replaces it with ostringstream usage.
Fixes an issue where if you didn't have a JIT recompiler running then Dolphin would instantly crash if you tried comparing PPC to x86 code.
Changed the disassembly of the host side code from being inline to the function to instead being in a class, this will be required when I add support
for ARMv7 and AArch64 to this window.
2014-10-21 12:27:59 -05:00
Lioncash eef9453abe Merge pull request #1358 from Sonicadvance1/ARMv7-NOP
Changes from ARMv6 NOP to ARMv7 NOP.
2014-10-21 13:05:06 -04:00
Ryan Houdek 2e94814441 Changes from ARMv6 NOP to ARMv7 NOP.
Dolphin doesn't support ARMv6. Get this out of here.
2014-10-21 14:17:07 +00:00
Ryan Houdek a22fcf152d Disable the fake vmem hack on 32bit targets.
This hack is incompatible with these targets due to how much memory space we allocate.
2014-10-21 12:56:28 +00:00
Fiora f4fa8d0b83 MMU: allow page-table loads/stores if MMU is off
Fixes regressions in some games that apparently required this to work, but
don't really require full MMU emulation (e.g. with exceptions and all).
2014-10-21 05:55:56 -07:00
Ryan Houdek 77da164fe2 Adds support for stepping in the ARMv7 JIT. 2014-10-21 12:53:59 +00:00
Ryan Houdek 85605389d7 Don't enable stepping on ARMv7 JIT core if just in the debugger.
Also makes sure we aren't profiling CPU run times unless we are actually profiling.
2014-10-21 07:51:25 -05:00
Fiora d7ff482618 Fix FPRF flag setting
Looks like I didn't quite change every place it needed to be renamed.
2014-10-21 04:56:35 -07:00
comex 3d536bbe38 Merge pull request #425 from LPFaint99/clang-format_config
Add .clang-format configuration
2014-10-21 03:50:00 -04:00
comex c048691a57 Merge pull request #1292 from FioraAeterna/enablebats
Make EnableBATs an option instead of disabling it entirely
2014-10-21 02:26:49 -04:00
comex 78deebd732 Merge pull request #1346 from kayru/d3d_clip_enable
D3D: Enabled depth clipping
2014-10-21 01:59:24 -04:00
comex 24e72cd064 Merge pull request #991 from phire/dsi_should_crash
Panic if game does an invalid memory access.
2014-10-21 01:53:08 -04:00
Yuriy O'Donnell 72ba13ca8a D3D: Enabled depth clipping 2014-10-21 06:26:20 +02:00
skidau 305d2e1863 Merge pull request #1337 from skidau/AX-volume-clamp
Clamp the AX Volume to prevent clipping.  Patch by hk.konpie.  Fixes issue 7519.
2014-10-21 13:43:56 +11:00
skidau 833ff4a065 Merge pull request #1334 from lioncash/cheats
Break Cheat Manager components out into their own source files.
2014-10-21 13:43:06 +11:00
skidau 3022da5d9f Merge pull request #1318 from RachelBryk/disable-bios
Disable skip bios option if no bios files exists.
2014-10-21 13:23:23 +11:00
Scott Mansell 3aa979d7d7 Remove another 3 getPointers.
Thanks neobrain for spotting these.
2014-10-21 12:18:54 +13:00
Scott Mansell 4fb6ab40a1 Eliminated getPointers which are memcpyed or memset.
Removes 12 getPointers.
2014-10-21 12:18:54 +13:00
comex ea16b2d065 Merge pull request #1335 from lioncash/indent
Debugger: Fix class indentation
2014-10-20 19:17:24 -04:00
Scott Mansell d77e01e6c4 IPC_HLE: Replace (const char *)GetPointer(x) with GetString(x)
Removes 20 instances of GetPointer.
2014-10-21 11:10:34 +13:00
Stevoisiak 7f66344b64 Updated GCM references to ISO 2014-10-20 17:49:33 -04:00
Rachel Bryk a67b9a4f52 Disable skip bios option if no bios files exists. 2014-10-20 14:17:19 -04:00
skidau f65bb10c93 Merge pull request #1308 from kayru/shader_generator_write_opt
Workaround for MSVC not optimizing away Write() in GeneratePixelShader
2014-10-20 17:15:53 +11:00
skidau e8da34ef25 Merge pull request #1320 from FioraAeterna/hash64bitcrc
Use CRC to output 64 bits instead of 32
2014-10-20 14:50:21 +11:00
skidau a4be65094f Merge pull request #1314 from FioraAeterna/fixprofiler
JIT: fix profiler on non-Windows OSs
2014-10-20 14:37:32 +11:00
skidau 81efd0e87f Merge pull request #1315 from RisingFog/movie-menu-input-display
Moved Input Display to Movie Menu
2014-10-20 14:34:02 +11:00
skidau de2bf4c508 Merge pull request #1317 from lioncash/filter
Remove unused filter in DolphinWX vcproj file.
2014-10-20 13:32:37 +11:00
comex 4af98d63bc Merge pull request #1344 from comex/mem-tools-testing
MemTools testing
2014-10-19 22:20:30 -04:00
comex 6a7cff02b8 Merge pull request #1343 from comex/yet-another-stupid-branch
Rename the poorly named {Read,Write}BigEData to Copy{From,To}Emu -
2014-10-19 22:18:57 -04:00
comex c5c4dd49e6 Add a define to use sigaction on OS X instead of OS-specific page fault handling.
The latter was introduced last year in order to allow debugging without
turning off Fastmem; I wanted to see if the old way was faster.  In
fact, it is not, but may as well keep the define around in case future
testing is necessary.
2014-10-19 20:41:54 -04:00
comex 4d610cc30e Add a test for page fault handling.
This both tests that they work correctly and prints timing information
if you run it manually.
2014-10-19 20:41:52 -04:00
comex f8dfb2ec90 Rename the poorly named {Read,Write}BigEData to Copy{From,To}Emu -
and change argument order to match memcpy.

Oh, and fix a lulzy buffer overflow in IOS emulation while I'm at it.
2014-10-19 19:34:38 -04:00
Lioncash c251cada55 Merge pull request #1326 from waddlesplash/dolphin-qt
DolphinQt: link to Core, resource system
2014-10-19 15:40:23 -04:00
Augustin Cavalier 8d4068527b DolphinQt: Stub Host_* functions & Resource system. 2014-10-19 15:36:37 -04:00
Lioncash 656a2a16a3 TASInputDlg: Pass string by reference for CreateStickLayout
Also handles strings passed to it correctly.
2014-10-19 12:36:39 -04:00
Ryan Houdek b769331f50 Merge pull request #1325 from Sonicadvance1/Android-OpenSLES-race
Fix a race condition in our OpenSL ES audio backend.
2014-10-19 08:53:19 -05:00
Ryan Houdek 939fa492c8 Merge pull request #1323 from Sonicadvance1/Android-crash
Fix a crash on Android when unplugging a controller during emulation.
2014-10-19 08:48:52 -05:00
Ryan Houdek b3cee80faa Merge pull request #1321 from Sonicadvance1/Qualcomm-v95
Change driver details to reflect Qualcomm's changes with their v95 driver
2014-10-19 08:48:42 -05:00
Ryan Houdek e236d28585 Remove a hard dependency from libGL from the software renderer.
I must have missed this when dropping OpenGL library includes. This is annoying when on a system that doesn't have libGL.
2014-10-19 07:48:14 -05:00
Ryan Houdek 821a41e62f Remove hard dependency of GLX from Dolphin with X11.
This is particularly annoying on a EGL only system that doesn't have GLX.
2014-10-19 07:48:11 -05:00
skidau f9d9257c57 Fixed typo in the MEM2 handling. 2014-10-19 21:25:43 +11:00
skidau 990697bcbb Clamp the AX Volume to prevent clipping. Patch by hk.konpie. Fixes issue 7519. 2014-10-19 21:20:33 +11:00
skidau 033a349444 Merge pull request #1299 from comex/blr-opt-infinite-loop
If the stack overflow trap region has already been tripped, don't continue to ignore faults there.
2014-10-19 15:22:42 +11:00
skidau 615ebe7b67 Merge pull request #1298 from RachelBryk/netplay
Get rid of netpad and just send the GCPadStatus in netplay.
2014-10-19 15:20:38 +11:00
Lioncash 635408b686 Debugger: Fix class indentation 2014-10-18 22:55:23 -04:00
Lioncash 3782be15a3 Merge pull request #1309 from Stevoisiak/spellingFix
Minor spelling fix
2014-10-18 22:40:41 -04:00
Lioncash 650192390c CheatsWindow: unfriend CreateCodeDialog.
This is no longer needed.
2014-10-18 21:38:17 -04:00
Lioncash e7939a6b44 DolphinWX: Reimplement cheat listbox updating, but without a global
Just use event handling.
2014-10-18 21:36:39 -04:00
Lioncash 90eaf9519c CheatsWindow: Remove unnecessary wxPanel in the wxDialog
We can simply size the controls within the dialog directly.
2014-10-18 21:32:42 -04:00
Lioncash f0769233e6 DolphinWX: Split cheat window components into their own source files 2014-10-18 21:32:33 -04:00
Yuriy O'Donnell 97423d5ed8 D3D: Fixed anisotropic filtering.
This got broken when d3d state cache was implemented.
2014-10-18 17:47:47 +02:00
Ryan Houdek 73512ad38f Fix a race condition in our OpenSL ES audio backend.
After calling enqueue the callback would fire before we had assigned g_mixer a value.
This would cause a fun crash to happen.
2014-10-18 08:32:14 -05:00
Ryan Houdek ceb08acf23 Fix a crash on Android when unplugging a controller during emulation.
If the action we are getting is a ACTION_CANCEL, it means that the "gesture" is aborted and we shouldn't perform any more actions on it.
2014-10-18 07:33:51 -05:00
Ryan Houdek 9108a11af4 Change driver details to reflect Qualcomm's changes with their v95 driver.
They fixed their issues with dynamic UBO array member access.
There are many other issues though.
2014-10-18 02:50:57 -05:00
Fiora d2e004fa9e Use CRC to output 64 bits instead of 32
A bit hacky, but should dramatically reduce the odds of hash collision.
2014-10-18 00:24:35 -07:00
comex 742f9c6b14 Merge pull request #1319 from lioncash/tas_vars
TASInputDlg: Apply m_ prefix to class member variables.
2014-10-18 01:04:32 -04:00
Lioncash 9df0fff7cc TASInputDlg: Apply m_ prefix to class member variables. 2014-10-18 00:37:13 -04:00
Lioncash 48a27458d1 Remove unused filter in DolphinWX vcproj file. 2014-10-17 23:11:38 -04:00
skidau 0d1f8527c7 Merge pull request #1297 from RisingFog/audio-dump-during-emulation
Start/Stop Audio Dump During Emulation
2014-10-18 13:16:41 +11:00
skidau c80ba8704c Merge pull request #1276 from RisingFog/flipped-audio-dump
Flipped Wave File Channels for Audio Dumping
2014-10-18 13:15:23 +11:00
skidau a5674bbe84 Merge pull request #475 from kayru/d3d_state_cache
D3D: Implemented cache for dynamic render states
2014-10-18 13:11:39 +11:00
Fiora c74b4df13e Add FPRF interface option, change from EnableFPRF to just FPRF 2014-10-17 19:06:18 -07:00
Fiora 719326df65 Make EnableBATs an option instead of disabling it entirely 2014-10-17 19:05:01 -07:00
Fog 467ab1a629 Moved Input Display to Movie Menu 2014-10-17 21:08:34 -04:00
comex 2684c75c6e Merge pull request #1304 from FioraAeterna/fasterhash
Hash: unroll CRC loop, since CRC32 typically has nontrivial latency
2014-10-17 20:24:47 -04:00
Fiora 99169eb620 JIT: fix profiler on non-Windows OSs
Still doesn't support timing code (since that's Windows-only), but run counts
will at least work without crashing.
2014-10-17 16:48:09 -07:00
Fiora 15a4bccb73 Hash: unroll CRC loop, since CRC32 typically has nontrivial latency
Seems to be about 20-30% faster texture cache hashing on my machine.
2014-10-17 15:39:08 -07:00
Stevoisiak e86ff867fe Fixed minor typo 2014-10-17 17:26:56 -04:00
Yuriy O'Donnell b78396847f D3D: Removed SetBlendOp, SetSrcBlend and SetDestBlend as they are now trivial 2014-10-17 22:24:57 +02:00
Stevoisiak ed5e698511 Minor spelling fix 2014-10-17 15:51:19 -04:00
Yuriy O'Donnell d23da7dbef Added __forceinline to AlphaTest::TestResult() to make MSVC inline it 2014-10-17 21:50:41 +02:00
Yuriy O'Donnell 5fdda135d2 Workaround for MSVC not optimizing away Write() in GeneratePixelShader
ShaderConstantProfile and ShaderUid now have an empty implementation
of Write() that uses variadic templates instead of varargs. MSVC is now
able to inline and optimize away this when necessary.
2014-10-17 21:37:42 +02:00
skidau 73590b1323 Merge pull request #1266 from skidau/mmu-exram
Corrected the physical memory access to MEM2 via the MMU. Fixes Toy Story 3.
2014-10-17 17:10:51 +11:00
i418c 5394967e03 Update freelook description. 2014-10-16 19:58:15 -07:00
i418c 0ac3e8c19f Fix Freelook on Linux and add speed reset.
Should fix issue 7692.
Also fixes issue 7147.

I have no idea if these changes will affect Mac or Windows users, so please test.
2014-10-16 19:57:11 -07:00
comex 4c2a542f1e Revert "FastMem: don't let the backpatcher hit the same location twice" 2014-10-16 21:39:15 -04:00
comex 4e8cc952bb Merge pull request #1247 from Stevoisiak/WiimoteSubmenu
Moved "Connect Wiimote" options into submenu
2014-10-16 20:12:35 -04:00
comex 67088a1834 Fix signed/unsigned comparison and unused variable warnings. 2014-10-16 17:03:49 -04:00
comex 4134a0ad54 Make some variables static (should probably adjust for coding style too, but I'm not the one who merged code with bad style...) 2014-10-16 17:03:37 -04:00
comex 1ff86a4716 Merge pull request #1295 from crudelios/remove-bbox-settings
Remove setting to enable or disable Bounding Box calculation.
2014-10-16 17:00:37 -04:00
degasus 8f403696ea DriverDetails: mark intel buffer_storage bug as fixed 2014-10-16 22:51:32 +02:00
Rachel Bryk 0f3194abc3 Get rid of netpad and just send the GCPadStatus in netplay. 2014-10-16 13:20:00 -04:00
Yuriy O'Donnell 9bdfd4a833 D3D: State cache now reduces number of blend state permutations by collapsing some states that have blending disabled 2014-10-16 18:27:43 +02:00
comex c5247673cd If the stack overflow trap region has already been tripped, don't continue to ignore faults there.
In the unlikely case that it tripped and then, due to a bug, some other
fault occurred (e.g. stack misalignment), Dolphin would go into an
infinite loop rather than crashing.
2014-10-16 02:14:02 -04:00
Fog 108087bb68 Flipped Wave File Channels
This change was done because with the previous method of dumping audio, the mixer would handle switching the RL being emitted by the DSP to LR, and thus would provide the proper channel orientation. Because we're now dumping directly from PushSamples() and PushStreamingSamples(), it was writing the right channel to the left channel of the wave file and vice versa.
2014-10-15 23:16:48 -04:00
skidau 3023abc1b5 Merge pull request #1285 from degasus/master
PixelShaderGen: replace multiplication with shift
2014-10-16 14:04:25 +11:00
skidau f27aabd411 Merge pull request #1278 from lioncash/controller
ControllerInterface: Get rid of SetHwnd(), introduce Reinitialize()
2014-10-16 14:02:56 +11:00
skidau 002b9f7acd Merge pull request #1222 from FioraAeterna/backpatchchanges
FastMem: don't let the backpatcher hit the same location twice
2014-10-16 14:00:29 +11:00
skidau fc774f0232 Merge pull request #1062 from zhuowei/master
Parse input as hex instead of decimal to match display values in the register view
2014-10-16 13:58:56 +11:00
Fog f2ed533841 Start/Stop Audio Dump During Emulation 2014-10-15 20:50:38 -04:00
Yuriy O'Donnell bea68c95a4 D3D: Fixed uninitialized members of gx_state 2014-10-15 20:22:41 +02:00
Yuriy O'Donnell 21655dc61a D3D: moved render state cache implementation to D3DState.h/cpp 2014-10-15 20:22:41 +02:00
Yuriy O'Donnell e7f8032d7d D3D: State cache now uses BitField to define packed render states 2014-10-15 20:22:40 +02:00
Yuriy O'Donnell 2e4667caaa D3D: Moved render state cache into separate source files.
Refactored  StateCache::Get() to early out for narrower indentation.
Added comments to clarify ownership of objects returned by  StateCache::Get().
2014-10-15 20:22:39 +02:00
Yuriy O'Donnell f434bd7d3f D3D: Implemented cache for dynamic render states 2014-10-15 20:22:39 +02:00
crudelios d281b4d7e1 Remove setting to enable or disable Bounding Box calculation. 2014-10-15 19:02:54 +01:00
Lioncash b7b2074cc2 ControllerInterface: Get rid of SetHwnd(), introduce Reinitialize()
Initialize now just takes the handle directly. Reinitialize is added because it is much more straightforward in comparison to doing the Shutdown-Initialize manually.
2014-10-15 09:29:25 -04:00
skidau 8912315596 Merge pull request #1290 from lioncash/xfb
Fix XFB scaling in D3D
2014-10-15 14:09:33 +11:00
skidau 8ef21bc5e2 Merge pull request #1272 from RisingFog/sconfig-dump-frames
Move bDumpFrames to SConfig (and it's references)
2014-10-15 13:42:37 +11:00
skidau 9f5ea81ffe Merge pull request #1274 from lioncash/uninit
TASInputDlg: Fix some potential uninitialized variable warnings.
2014-10-15 13:25:52 +11:00
slx7R4GDZM 5a3f19aeaf Fix XFB scaling in D3D 2014-10-14 22:25:31 -04:00
Markus Wick 1227bd2ba6 PixelShaderGen: replace multiplication with shift
iirc both nvidia and i965 doesn't optimize this
2014-10-14 12:34:37 +02:00
comex 8f61c6f239 Merge pull request #1243 from comex/warning-fixes
Misc / warning fixes
2014-10-14 01:14:26 -04:00
comex 6650f8922d Merge pull request #1283 from FioraAeterna/removebats
MMU: disable BAT resolution
2014-10-14 01:14:14 -04:00
comex b93953250a TAS warning fixes: unused vars, shadowing, incorrect (unsigned) 2014-10-14 01:11:31 -04:00
comex 5b8722b6f2 Don't pass u64 (which may be long long) to %lu.
A type-safe StringFromFormat sure would be nice...
2014-10-14 01:10:35 -04:00
comex d4e8e3a6a3 Properly handle the Wiimote speaker data format being unknown. 2014-10-14 01:10:35 -04:00
comex a27f5fe301 Remove another auto .. -> declaration. 2014-10-14 01:10:35 -04:00
comex 47faf7c4fd Merge branch 'Remove-MMU-Speed-Hack-option' of https://github.com/skidau/dolphin into skidau-Remove-MMU-Speed-Hack-option
Conflicts:
	Source/Core/Core/PowerPC/Jit64/JitAsm.cpp
2014-10-14 01:08:20 -04:00
Fiora 6ac2fcca61 MMU: disable BAT resolution
No known games, not even Wii MMU games like Cars 2 and Toy Story 3, use custom
BATs. This makes BAT resolution a waste of time. BAT handling could be
optimized significantly, but as long as nothing uses it, it's easier to just
disable it.

Should significantly improve performance in MMU-heavy games.
2014-10-13 22:04:03 -07:00
skidau fd33ecaecd Merge pull request #1268 from lioncash/append
ControllerEmu: Get rid of redundant string appending
2014-10-14 12:50:18 +11:00
skidau a069183316 Merge pull request #1267 from lioncash/statics
VolumeCreator: Make master key arrays static
2014-10-14 12:49:25 +11:00
skidau 01359a481b Merge pull request #1265 from skidau/debugger-registers-mmu
Added some of the MMU registers into the debugger Register window
2014-10-14 12:47:47 +11:00
skidau e50dad67ce Merge pull request #1252 from FioraAeterna/regallocator
JIT: add basic register allocation heuristics
2014-10-14 12:45:48 +11:00
skidau b4e82a5b9b Merge pull request #1192 from skidau/dsp-acc-loop-adpcm
Fixed the step_size_bytes in the ADPCM Accelerator loop
2014-10-14 12:38:54 +11:00
skidau ce35cd301b Merge pull request #1169 from lioncash/cpu-core
Core: Use an enum for indicating CPU cores
2014-10-14 12:36:02 +11:00
skidau 96a2b74c02 Merge pull request #846 from lioncash/fpscr-enum
Core: Move FPSCR exception flags to a typed enum
2014-10-14 12:33:57 +11:00
Lioncash 9f2b48ab07 Core: Use an enum for indicating CPU cores 2014-10-13 10:35:31 -04:00
skidau 32dbdbe92f Corrected the step size bytes for the start of the DSP accelerator chunk. Patch by hk.konpie 2014-10-13 22:10:37 +11:00
skidau 711a8aa6ad Fixed the step_size_bytes in the ADPCM Accelerator loop taking into account the varying number of bytes that ADPCM steps by. 2014-10-13 22:10:37 +11:00
skidau 7b44e79356 Changed the FAST_TLB_CACHE to update its state only if the TLB cache is accessed by the game (not by Dolphin). The FAST_TLB_CACHE (written by booto) is faster and accurate to the hardware. Enabled the FAST_TLB_CACHE by default. 2014-10-13 18:00:45 +11:00
Lioncash 81e2cf7490 Merge pull request #1271 from Sonicadvance1/AArch64-JIT-UI
Add AArch64 JIT recompiler to wxWidgets UI.
2014-10-13 02:01:14 -04:00
skidau 69a2d0cb96 Corrected the physical memory access to MEM2 via the MMU. Fixes Toy Story 3. 2014-10-13 16:01:02 +11:00
skidau 9551650c42 Merge pull request #1095 from crudelios/sw-bbox
Reimplement Bounding Box calculation using the software renderer.
2014-10-13 15:57:11 +11:00
Lioncash 01f1768c55 Merge pull request #1273 from lioncash/iamanidiot
Software: Remove obsoleted VideoConfigDialog.
2014-10-13 00:46:42 -04:00
Lioncash 6d3487aee9 TASInputDlg: Fix some potential uninitialized variable warnings.
Also guard against null (even if it doesn't happen it stops more warnings if someone compiles with -Wall or runs analysis with clang.
2014-10-13 00:40:17 -04:00
Lioncash b315040c6b Software: Remove obsoleted VideoConfigDialog. 2014-10-13 00:30:08 -04:00
Fog 8d424b114a Move bDumpFrames to SConfig (and it's references) 2014-10-12 23:56:16 -04:00
Ryan Houdek 0a0183ee44 Add AArch64 JIT recompiler to wxWidgets UI.
This also fixes an issue where it would show the ARMv7 JIT recompiler on AArch64, also the issue of showing the now non-existant ARM JITIL.
Also fixes an issue where it would show the x86 JIT recompilers on a non ARM platform.
2014-10-12 22:49:07 -05:00
Fog cd0c784d5a Changed Dump Frames References 2014-10-12 19:51:13 -04:00
Lioncash a1bee05f5f ControllerEmu: Get rid of redundant string appending 2014-10-12 17:47:10 -04:00
Lioncash 00b3cc3b09 VolumeCreator: Make master key arrays static
Only used within this translation unit.
2014-10-12 15:07:39 -04:00
skidau 6d9990585c Added some of the MMU registers into the debugger Register window 2014-10-12 20:03:29 +11:00
skidau 18c81dbc33 Merge pull request #1261 from lioncash/mesa-resonance-cascade
AVIDump: Add missing CoreTiming header
2014-10-12 14:26:23 +11:00
Lioncash e283839b68 AVIDump: Add missing CoreTiming header
Fixes build on the mesa buildbot
2014-10-11 23:12:19 -04:00
skidau 88f885f5a4 Merge pull request #1257 from RisingFog/moviemenudumping
Added Dump Frames/Audio to Movie Menu
2014-10-12 14:06:29 +11:00
skidau a00ad6871c Merge pull request #1220 from RisingFog/avsync
Proper Audio/Video Dumping
2014-10-12 14:04:45 +11:00
skidau 7443a07f6e Merge pull request #1253 from lioncash/jitcache
JitCache: Use std::array to back the arrays within it.
2014-10-12 13:59:37 +11:00
skidau 9ddbdeb39f Merge pull request #995 from FioraAeterna/fma
Add FMA support to emitter and use it in the JIT
2014-10-12 13:56:18 +11:00
Fog 432e89b68d Added Dump Frames/Audio to Movie Menu 2014-10-11 12:31:02 -04:00
skidau a373cc0654 Merge pull request #1231 from Armada651/borderless
Support the borderless fullscreen option in all backends.
2014-10-11 14:27:49 +11:00
skidau 8738b1879c Removed the MMU Speed Hack option. The TLBHack is now enabled if the MMU option is disabled. This will help catch cases where a game requires the TLBHack but the option has not been set in the game ini. It also removes the possibility to mistakenly enable both the MMU and TLBHack. 2014-10-11 11:31:16 +11:00
Lioncash 98d9a38fe0 Merge pull request #1242 from lioncash/sync
Android: Use apply() instead of commit() for SharedPreference changes.
2014-10-10 18:42:54 -04:00
Ryan Houdek f6233cd531 Merge pull request #1254 from RachelBryk/unicode
Replace wxFileExists() with File::Exists().
2014-10-10 17:35:22 -05:00
Henrik Rydgård 877081c7df Be consistent with braces. 2014-10-10 22:34:03 +02:00
Henrik Rydgård 9bca1a00d7 x64 emitter: Add some more missing ops (MOVDQA, MOVDQU, PSHUFHW)
Also constify some pointers.
2014-10-10 18:30:05 +02:00
Henrik Rydgård a2c46665c5 x64 emitter: Add a few missing instructions 2014-10-10 18:30:04 +02:00
Rachel Bryk bf7de71fd0 Replace wxFileExists() with File::Exists().
It did not handle unicode properly.
2014-10-10 11:22:47 -04:00
crudelios 1e3b9ecdc1 Fix compile errors after rebase. 2014-10-10 12:44:44 +01:00
crudelios 9786f54414 Fixed a small bug. 2014-10-10 12:28:17 +01:00
crudelios 987bd8bb8f Several small optimizations. 2014-10-10 12:28:16 +01:00
crudelios 176ea06e82 Get buildbot to compile. 2014-10-10 12:28:15 +01:00
crudelios 47c67f014f Fix linux build and various warnings.
Increase savestate version.
2014-10-10 12:28:13 +01:00
crudelios 2d4b7e3f3f Reimplement Bounding Box calculation using the software renderer. 2014-10-10 12:27:06 +01:00
Lioncash 8b831c9483 JitCache: Use std::array to back the arrays within it.
Cleans up some of the allocation process.
2014-10-10 00:22:09 -04:00
Fiora 7ba9a8537b JIT: add basic register allocation heuristics
Should be at least a bit better than the previous LRU approach. Currently
has two basic components: whether a register is dirty (dirty registers need
to be stored, so clobbering them hurts more) and how many other registers will
be used between now and the next time a register gets used.

Also don't pre-load values that don't need to be in registers.
2014-10-09 20:09:14 -07:00
skidau b7aed97508 Merge pull request #1239 from FioraAeterna/updatetables
CPU: improve instruction table flags for RC bits
2014-10-10 13:04:57 +11:00
Lioncash 560f180ea4 Merge pull request #1251 from lioncash/cast
PPCAnalyst: Remove unnecessary casts
2014-10-09 20:26:32 -04:00
Lioncash bb377d0fc3 PPCAnalyst: Remove unnecessary casts 2014-10-09 20:19:01 -04:00
Steven V. bcf8f8f0b2 Fixed minor capitalization issue 2014-10-09 16:59:58 -04:00
Steven Vascellaro 2ce90f267c Moved "Connect Wiimote" options into submenu
Moved "Connect Wiimote 1-4" and "Connect Wii Balance Board" into their
own submenu.
2014-10-09 15:15:42 -04:00
Fiora 9d45f51459 JIT: fix accidental disabling of block linking by default
Oops.
2014-10-09 12:00:40 -07:00
Jules Blok 03e1bd0995 Limit Borderless Fullscreen to Windows systems. 2014-10-09 11:30:26 +02:00
Lioncash 67e44c0e63 Merge pull request #1235 from lioncash/func
VolumeGC: Use regular return type declaration for GetStringDecoder
2014-10-09 01:20:57 -04:00
Fog fc4125cdd1 Proper Audio/Video Dumping 2014-10-09 00:06:04 -04:00
Lioncash 053f5c1f17 Android: Use apply() instead of commit() for SharedPreference changes.
apply() changes the in-memory instance of SharedPreferences and writes to the disk asynchronously, rather than synchronously, which commit() does. Since these are done on the UI thread, they should be asynchronous.
2014-10-08 23:12:25 -04:00
skidau 86b81c55bf Merge pull request #1226 from skidau/emu-wiimote-speaker-sample-rate
Hooked up the emulated wiimote speaker's sample rate and volume set by the game
2014-10-09 14:11:21 +11:00
Sean Maas 17f0fdb18f [Android] Return to game list instead of exiting app 2014-10-08 22:28:18 -04:00
Lioncash 677d74df88 Merge pull request #1240 from FioraAeterna/fixdebugblocklink
Debug: fix disable block linking option
2014-10-08 22:13:33 -04:00
Fiora 8bf2cf0641 Debug: fix disable block linking option
Previously it did the opposite of what it was supposed to; when checked, it'd
turn block linking on, and when unchecked, it'd turn it off.

Also update JITIL's block linking disabling in debug mode to match the behavior
of the regular JIT.
2014-10-08 19:03:25 -07:00
Fiora 75a1310ba9 CPU: improve instruction table flags for RC bits 2014-10-08 11:44:37 -07:00
Rachel Bryk 2cfc1eac51 Fix another crash in tas input. 2014-10-08 09:46:28 -04:00
Fiora 9734f0c834 JIT64: use FMA instructions 2014-10-07 21:41:01 -07:00
Ryan Houdek 2423b9b2bd Merge pull request #1237 from Sonicadvance1/fix-ARM32-XER
Fix ARMv7 JIT from XER optimization.
2014-10-07 21:56:36 -05:00
Ryan Houdek 5f0011d065 Fix ARMv7 JIT from XER optimization.
This was a subtle bug I introduced since I removed a LDR in one of the ComputeCarry functions.
Basically since I wasn't loading the XER value prior to operations when I did a BIC tmp, tmp, 1 it would clear the first bit in our temp register but
retain the rest of the "random" data from that temp register. This would then save in to xer_ca, which the Interpreter will use later without any
masking to generate the XER value. Our XER generation helper functions don't do any masking since they were only expecting a single bit worth of data
in xer_ca with the rest being zero.
So now we only have one bit of data being stored in xer_ca from the ARMv7 JIT recompiler, and also a slight optimization in the ComputeCarry function
that is used on the immediate path. There wasn't any reason to load xer_ca since it only contains one bit of data now.
2014-10-07 21:43:15 -05:00
Rachel Bryk e09288aec1 Fix crash in tas input. 2014-10-07 22:35:56 -04:00
skidau 38b64fd077 Merge pull request #1213 from RachelBryk/wii-tas-input
Add wiimote tas input.
2014-10-08 13:15:43 +11:00
Fiora 4289221584 X64Emitter: add unit test for FMA 2014-10-07 18:21:07 -07:00
Fiora 019657cd93 X64Emitter: add FMA3 support 2014-10-07 18:21:07 -07:00
Lioncash 6cfa579870 VolumeGC: Use regular return type declaration for GetStringDecoder 2014-10-07 21:15:14 -04:00
Lioncash ab49d80e3f Merge pull request #1234 from Stevoisiak/renameNamesToBannerNames
Rename m_names to m_banner_names
2014-10-07 20:01:29 -04:00
Lioncash fab357552f Merge pull request #1233 from Stevoisiak/getNameRedundancy
Updated Netplay to use GetName()
2014-10-07 19:54:09 -04:00
Steven Vascellaro ebbbe43b8f Rename m_names to m_banner_names 2014-10-07 19:14:11 -04:00
Steven Vascellaro 4b9ee5ee39 Updated Netplay to use GetName() 2014-10-07 19:05:38 -04:00
Jules Blok 39f421d45d Support the borderless fullscreen option in all backends. 2014-10-07 16:48:43 +02:00
Jules Blok 7344f752b7 Replace BorderlessFullscreenEnabled by ExclusiveFullscreenEnabled.
Special handling was associated with this function, which only applies to exclusive fullscreen.
2014-10-07 16:43:32 +02:00
skidau f5b23834b5 Hooked up the emulated wiimote speaker's sample rate and volume set by the game. 2014-10-07 21:43:32 +11:00
comex 85086e1e6c Merge pull request #1224 from FioraAeterna/profile
JIT: re-add profiling support on x86_64
2014-10-07 02:31:04 -04:00
comex 39d01774de Merge pull request #1229 from lioncash/ts
Fifo: Fix tab/space mismatches
2014-10-07 02:27:37 -04:00
Fiora 5919d0962f JIT: re-add profiling support on x86_64
Still gives rather inaccurate results with conditional continue and/or
branch merging on, so those should probably be turned off when using it.
2014-10-06 20:26:58 -07:00
comex 9d059d1d2f Merge pull request #1221 from LPFaint99/memcard
Fix endian error. allows loading of current games save even if the memca...
2014-10-06 23:21:36 -04:00
skidau 1b573c4ca0 Merge pull request #1225 from lioncash/lolwx
DolphinWX: Make WXInputBase part of the WxUtils namespace.
2014-10-07 13:28:25 +11:00
skidau b3b34d16e6 Merge pull request #1218 from hthh/trampolinecaching
JIT: reuse trampolines when possible
2014-10-07 13:26:23 +11:00
skidau 8fdf43109f Merge pull request #1216 from FioraAeterna/movoptimizations
Add more AVX support, refactor emitter, reduce redundant XMM moves
2014-10-07 13:25:28 +11:00
LPFaint99 5dec943762 Fix endian error. allows loading of current games save even if the memcard is mostly full 2014-10-06 18:43:59 -07:00
Lioncash 16a74a9557 Fifo: Fix tab/space mismatches 2014-10-06 20:04:57 -04:00
Lioncash 700a4154dd Merge pull request #1228 from Stevoisiak/fixedSaveBannerFilename
Fix for banner filename from ID
2014-10-06 17:49:24 -04:00
Steven Vascellaro 63c05c15d5 Fix for banner filename from ID
Saving a banner as a .PNG now properly defaults to the gameID.
2014-10-06 17:42:24 -04:00
skidau 215685a6fe Merge pull request #1214 from rohit-n/format-warning
OGL: Silence string format warnings.
2014-10-06 16:12:40 +11:00
skidau a0a64369fc Merge pull request #1211 from skidau/remaining-block-count-zero
Re-added the change to make the dsp remaining block count zero-based.
2014-10-06 13:35:46 +11:00
Lioncash 7c05d029d3 Merge pull request #1085 from waddlesplash/refactoring
Migrate global init stuff into UICommon.
2014-10-05 21:25:44 -04:00
Lioncash af241c9710 Merge pull request #1215 from lioncash/spacing
DolphinWX: Fix double-spacing in some UI strings
2014-10-05 21:22:17 -04:00
Augustin Cavalier 19109e2d01 Migrate global init stuff into UICommon.
This avoids code duplication in a bunch of places .
I also moved the NVIDIA Optimus export into VideoCommon.
2014-10-05 20:47:37 -04:00
Lioncash 41ea4a28b2 DolphinWX: Make WXInputBase part of the WxUtils namespace.
There's no need for the preprocessor checks for wx, since this is used in wx code. Also, this being a part of the InputCommon namespace is kind of wrong.
2014-10-05 05:31:48 -04:00
Fiora 9b29fe8aed WIP: don't let the backpatcher hit the same location twice
If a location is hit by the backpatcher, don't fastmem it when recompiling the
block unless the block has actually been invalidated.
2014-10-04 21:28:21 -07:00
hthh c7208318fb JIT: Reuse trampolines when possible 2014-10-05 15:03:11 +11:00
skidau 871d308b88 Merge pull request #1206 from comex/amperspocalypse
Change a bunch of reference function arguments to pointers.
2014-10-05 12:14:04 +11:00
comex 47bf698b70 Merge pull request #1217 from lioncash/tcast
TrampolineCache: Remove unnecessary cast
2014-10-04 00:19:08 -04:00
comex 7bce3fcdf9 Merge pull request #1174 from FioraAeterna/fifowriteaddrfix
JIT: properly remove FIFO write addresses when code is invalidated
2014-10-04 00:18:58 -04:00
comex 1af4043f14 Merge pull request #1219 from FioraAeterna/fixclearcache
JIT: set clear_cache_asap to false when clearing the cache
2014-10-04 00:14:30 -04:00
skidau 0c4739eead Merge pull request #1202 from FioraAeterna/fixstartupbats
Fix BAT register initial values in bootcode
2014-10-04 13:10:47 +10:00
skidau d0ea2ad6dc Merge pull request #1198 from lioncash/crypt
WiiSaveCrypted: Move some function params over to std::string
2014-10-04 13:10:28 +10:00
skidau 6a3b05a9ea Merge pull request #1197 from RachelBryk/multicompress
Don't allow multi compress to compress wbfs or wad files.
2014-10-04 13:09:43 +10:00
Fiora 17c56b58ab JIT: set clear_cache_asap to false when clearing the cache
Would probably result in continual cache-clearing if the stack overflow code
in the BLR optimizations triggers.
2014-10-03 20:08:27 -07:00
Lioncash eb1ddb886e TrampolineCache: Remove unnecessary cast 2014-10-03 20:46:44 -04:00
Fiora bf014636c8 JIT: add more AVX support, reduce redundant XMM moves
10-20% reduction in typical compiled block size for float-heavy JIT blocks.
2014-10-03 16:17:08 -07:00
Fiora 8fe730194b JIT: load registers if they're going to be used later in the block 2014-10-03 11:58:04 -07:00
Lioncash 7610811f79 DolphinWX: Fix double-spacing in some UI strings 2014-10-03 13:54:18 -04:00
Fiora 6bff99fa75 JitAsmCommon: remove a few redundant moves 2014-10-03 10:05:42 -07:00
Fiora 7a2dd3a3c6 x64Emitter: refactor, add some new AVX instructions 2014-10-03 10:05:10 -07:00
Rohit Nirmal 12c6f97d80 OGL: Silence string format warnings. 2014-10-03 12:07:10 -04:00
Rachel Bryk c41b31d3ff Add wiimote tas input. 2014-10-03 12:02:52 -04:00
Rachel Bryk e0b5d4a86c Fix running dolphin with a single flag. 2014-10-03 07:39:51 -04:00
skidau 30c8de495e Re-added the change to make the dsp remaining block count zero-based. Fixes Dream Mix TV World Fighters. 2014-10-03 21:30:09 +10:00
skidau 16d3604211 Merge pull request #1196 from RachelBryk/framecount
Add on screen frame counter.
2014-10-03 13:31:52 +10:00
skidau 6333f41837 Merge pull request #1194 from RachelBryk/arg
If one argument is given, assume it is a game, and run it.
2014-10-03 13:31:37 +10:00
Blackbird88 981a21a12f Spelling mistake 2014-10-02 09:25:25 +02:00
comex 7f6284c2fc Change a bunch of reference function arguments to pointers.
Per the coding style and sanity.
2014-10-02 03:00:33 -04:00
comex c98a3f62be Merge pull request #1195 from rohit-n/maybe-uninitialized
VideoCommon: Silence -Wmaybe-uninitialized warnings.
2014-10-02 01:56:06 -04:00
Rohit Nirmal 3b25c88736 Change another NULL to nullptr. 2014-10-01 23:38:42 -05:00
Lioncash 54c454fc82 Jit64: Change a NULL to nullptr 2014-10-02 00:05:27 -04:00
skidau 68edddf10e Merge pull request #1193 from RachelBryk/ir-input-display
Fix IR input display.
2014-10-02 13:48:17 +10:00
skidau 50bf30111c Merge pull request #1189 from RachelBryk/nunchuck-input-display
Add support for cc and nunchuck in input display.
2014-10-02 13:47:35 +10:00
skidau 11126f0bfc Merge pull request #1155 from booto/dsp-int-fix
dsp int timing tweak
2014-10-02 13:46:03 +10:00
Fiora 1bce0a847b Fix BAT register initial values in bootcode
Probably won't affect any real things for now, since these BATs are already
hardcoded into the memory handling functions.
2014-10-01 12:54:06 -07:00
Rachel Bryk 4280d9777a Add support for cc and nunchuck in input display. 2014-10-01 03:51:49 -04:00
skidau ffe160ad81 Merge pull request #1187 from lioncash/global
AudioCommon: Prefix soundStream global with g_
2014-10-01 13:23:11 +10:00
skidau 19fbefd9bd Merge pull request #1176 from FioraAeterna/pagecrossings
MMU: support loads/stores that cross page boundaries
2014-10-01 13:22:52 +10:00
Lioncash 0d8b34612e WiiSaveCrypted: Move some function params over to std::string 2014-09-30 20:31:59 -04:00
Rachel Bryk 621d5c5cd8 Don't allow multi compress to compress wbfs or wad files. 2014-09-30 19:28:16 -04:00
Rachel Bryk f6c6f03cce Add on screen frame counter. 2014-09-30 18:49:44 -04:00
Rohit Nirmal ce8a4f5cc5 VideoCommon: Silence -Wmaybe-uninitialized warnings. 2014-09-30 16:14:18 -04:00
Tony Wasserka 13fc8e7df1 Merge pull request #578 from RachelBryk/IR
Cleanup Renderer::CalculateTargetSize(), and allow IRs higher than 4x to be set via INI.
2014-09-30 19:21:21 +02:00
Rachel Bryk c0270f63c5 If one argument is given, assume it is a game, and run it. 2014-09-30 09:21:34 -04:00
Rachel Bryk f7a993a853 Fix IR input display. 2014-09-30 08:24:18 -04:00
Fiora 85547d94be JIT: properly remove FIFO write addresses when code is invalidated
Fixes a bug caused by interaction with carry optimizations; might fix other
issues too.
2014-09-30 01:00:23 -07:00
Lioncash 7f7fb5e70c AudioCommon: Prefix soundStream global with g_ 2014-09-30 03:06:16 -04:00
comex a9b4016cd3 Merge pull request #1166 from FioraAeterna/flaglocking
JIT+Emitter: support locking flags
2014-09-30 02:57:53 -04:00
comex acac5325f5 Merge pull request #1134 from RachelBryk/movie-menu
Create new Movie menu.
2014-09-30 02:51:21 -04:00
comex 58a29ec0cd Merge pull request #1177 from lioncash/array
DSPJitRegCache: Use std::array to represent the register arrays
2014-09-30 02:50:53 -04:00
comex 71b4c2ee9c Merge pull request #1180 from Stevoisiak/Replace-GCM-With-ISO
Replaced GCM functions with ISO functions
2014-09-30 02:47:33 -04:00
comex 4edc7fbf85 Merge pull request #1190 from comex/stackalign
Remove useless STACKALIGN macro.
2014-09-30 01:54:38 -04:00
comex ac1f9f950f Merge pull request #1186 from lioncash/macro
NetPlayClient: Remove unused macro
2014-09-30 01:52:01 -04:00
comex ed2ce8d8d4 Merge pull request #1191 from comex/wxGetActiveWindow
Fix focus detection on OS X by replacing wxGetActiveWindow with wxWindow...
2014-09-30 01:49:39 -04:00
comex 2eebdff01b Remove useless STACKALIGN macro.
It only ever did anything on 32-bit OS X.

Anyway, it wasn't even on the right functions, and these days
ABI_PushRegistersAndAdjustStack should handle maintaining the ABI
correctly.
2014-09-30 01:42:47 -04:00
comex 8fed5aa492 Fix focus detection on OS X by replacing wxGetActiveWindow with wxWindow::FindFocus.
wxGetActiveWindow is implemented as "return NULL" on OS X, while
wxWindow::FindFocus works.  On Windows, the difference is in the use of
GetActiveWindow() vs. GetForegroundWindow().  A MSDN comment says:

> A system has only one active window, which GetForegroundWindow()
> returns. GetActiveWindow() seems to return the same window as
> GetForegroundWindow() if the foreground window belongs to the current
> thread. Otherwise, it always returns null, rather than the topmost
> window of the calling thread.

Since we are on the GUI thread, it shouldn't make any difference.
2014-09-30 01:35:48 -04:00
comex 5d61081f91 Merge pull request #1188 from comex/ReadDataFromFifo
ReadDataFromFifo is always called with len = 32.  Remove the parameter t...
2014-09-30 01:08:36 -04:00
Fiora 22f087275c MMU: support loads/stores that cross page boundaries
Fixes some strange issues with Rogue Squadron 3 in JIT mode.
2014-09-29 21:19:21 -07:00
Rachel Bryk f40e8a5cd0 Create new Movie menu. 2014-09-30 00:10:39 -04:00
skidau 63cee3328f Merge pull request #1167 from FioraAeterna/fixdebugwindow
Debug: fix display of instructions in virtual memory in MMU games
2014-09-30 13:28:41 +10:00
skidau f675b33640 Merge pull request #1164 from FioraAeterna/bpcarry
JIT: fix carry merging across breakpoints
2014-09-30 13:25:24 +10:00
skidau 9d9984e96f Merge pull request #1159 from FioraAeterna/blocklinkdebug
JIT: enable block linking and idle skipping in debug mode
2014-09-30 13:24:16 +10:00
skidau 7828ddd542 Merge pull request #1150 from FioraAeterna/extsmerge
JIT: merge lbz + extsb
2014-09-30 13:19:45 +10:00
skidau da221e3d9c Merge pull request #1018 from zhuowei/elf_map_basename_only
When loading the map file for a DOL/ELF file, extract only the filename from the DOL/ELF's path
2014-09-30 13:17:29 +10:00
comex 87a95727cd ReadDataFromFifo is always called with len = 32. Remove the parameter to enable optimizations.
And rename some variables around it to be less confusing.
2014-09-29 22:07:16 -04:00
Lioncash 05a8d9d54a NetPlayClient: Remove unused macro 2014-09-29 08:42:18 -04:00
Lioncash 843a3f6c15 Core: Move FPSCR exception flags to a typed enum 2014-09-29 00:46:15 -04:00
comex b8e31c1d3e Add OpenGL 4.0-4.5 core extensions.
This noticeably includes GL_ARB_get_program_binary, which was previously
thought unsupported on OS X.  Well, actually, the OS X implementation is
trivial and reports 0 binary formats (as of 10.10; this is hardcoded in
GLEngine, by the way), but at least it'll work if it's fixed someday.
2014-09-29 00:36:45 -04:00
comex 4c031bed4b Merge pull request #1179 from lioncash/casts
Jit_Integer: Get rid of some cast noise in boolX
2014-09-28 23:58:09 -04:00
skidau 8ae2152093 Merge pull request #1168 from lioncash/unique
CoreParameter: Use unique_ptrs over raw pointers.
2014-09-29 13:55:00 +10:00
skidau 007ba13cfa Merge pull request #1144 from skidau/fifo-linked
Moved the linking of the FIFO CPWritePointer near where CPWritePointer gets updated
2014-09-29 13:52:33 +10:00
skidau c7f3858379 Merge pull request #1138 from FioraAeterna/arithetweak
JIT: a small optimization for subfex and friends
2014-09-29 13:51:44 +10:00
Lioncash d13383c4e6 Merge pull request #1181 from FioraAeterna/debuggqr
GekkoDisassembler: show W and I in psq_l/psq_st disassembly
2014-09-28 23:45:49 -04:00
comex 6c0a68d507 Add the override config option.
I hate the config code, but now is not the time to fix it...
2014-09-28 21:34:31 -04:00
comex 3a2048ea57 Add a central variable g_want_determinism which controls whether to try to make things deterministic.
It now affects the GPU determinism mode as well as some miscellaneous
things that were calling IsNetPlayRunning.  Probably incomplete.

Notably, this can change while paused, if the user starts recording a
movie.  The movie code appears to have been missing locking between
setting g_playMode and doing other things, which probably had a small
chance of causing crashes or even desynced movies; fix that with
PauseAndLock.

The next commit will add a hidden config variable to override GPU
determinism mode.
2014-09-28 21:34:31 -04:00
comex 65af90669b Add the 'desynced GPU thread' mode.
It's a relatively big commit (less big with -w), but it's hard to test
any of this separately...

The basic problem is that in netplay or movies, the state of the CPU
must be deterministic, including when the game receives notification
that the GPU has processed FIFO data.  Dual core mode notifies the game
whenever the GPU thread actually gets around to doing the work, so it
isn't deterministic.  Single core mode is because it notifies the game
'instantly' (after processing the data synchronously), but it's too slow
for many systems and games.

My old dc-netplay branch worked as follows: everything worked as normal
except the state of the CP registers was a lie, and the CPU thread only
delivered results when idle detection triggered (waiting for the GPU if
they weren't ready at that point).  Usually, a game is idle iff all the
work for the frame has been done, except for a small amount of work
depending on the GPU result, so neither the CPU or the GPU waiting on
the other affected performance much.  However, it's possible that the
game could be waiting for some earlier interrupt, and any of several
games which, for whatever reason, never went into a detectable idle
(even when I tried to improve the detection) would never receive results
at all.  (The current method should have better compatibility, but it
also has slightly higher overhead and breaks some other things, so I
want to reimplement this, hopefully with less impact on the code, in the
future.)

With this commit, the basic idea is that the CPU thread acts as if the
work has been done instantly, like single core mode, but actually hands
it off asynchronously to the GPU thread (after backing up some data that
the game might change in memory before it's actually done).  Since the
work isn't done, any feedback from the GPU to the CPU, such as real
XFB/EFB copies (virtual are OK), EFB pokes, performance queries, etc. is
broken; but most games work with these options disabled, and there is no
need to try to detect what the CPU thread is doing.

Technically: when the flag g_use_deterministic_gpu_thread (currently
stuck on) is on, the CPU thread calls RunGpu like in single core mode.
This function synchronously copies the data from the FIFO to the
internal video buffer and updates the CP registers, interrupts, etc.
However, instead of the regular ReadDataFromFifo followed by running the
opcode decoder, it runs ReadDataFromFifoOnCPU ->
OpcodeDecoder_Preprocess, which relatively quickly scans through the
FIFO data, detects SetFinish calls etc., which are immediately fired,
and saves certain associated data from memory (e.g. display lists) in
AuxBuffers (a parallel stream to the main FIFO, which is a bit slow at
the moment), before handing the data off to the GPU thread to actually
render.  That makes up the bulk of this commit.

In various circumstances, including the aforementioned EFB pokes and
performance queries as well as swap requests (i.e. the end of a frame -
we don't want the CPU potentially pumping out frames too quickly and the
GPU falling behind*), SyncGPU is called to wait for actual completion.

The overhead mainly comes from OpcodeDecoder_Preprocess (which is,
again, synchronous), as well as the actual copying.

Currently, display lists and such are escrowed from main memory even
though they usually won't change over the course of a frame, and
textures are not even though they might, resulting in a small chance of
graphical glitches.  When the texture locking (i.e. fault on write) code
lands, I can make this all correct and maybe a little faster.

* This suggests an alternate determinism method of just delaying results
until a short time before the end of each frame.  For all I know this
might mostly work - I haven't tried it - but if any significant work
hinges on the competion of render to texture etc., the frame will be
missed.
2014-09-28 21:34:29 -04:00
comex 2d4b7c5900 Make ReadDataFromFifo static. 2014-09-28 21:25:12 -04:00
comex 0ae9e398c8 Rejigger some FIFO buffer variables to be more rational.
videoBuffer -> s_video_buffer
size -> s_video_buffer_write_ptr
g_pVideoData -> g_video_buffer_read_ptr (impl moved to Fifo.cpp)

This eradicates the wonderful use of 'size' as a global name, and makes
it clear that s_video_buffer_write_ptr and g_video_buffer_read_ptr are
the two ends of the FIFO buffer s_video_buffer.

Oh, and remove a useless namespace {}.
2014-09-28 21:25:12 -04:00
comex e86ddacb18 Changes to allow LoadCPReg to work in a preprocess mode which affects a separate state.
This state will be used to calculate sizes for skipping over commands on
a separate thread.  An alternative to having these state variables would
be to have the preprocessor stash "state as we go" somewhere, but I
think that would be much uglier.

GetVertexSize now takes an extra argument to determine which state to
use, as does FifoCommandRunnable, which calls it.  While I'm modifying
FifoCommandRunnable, I also change it to take a buffer and size as
parameters rather than using g_pVideoData, which will also be necessary
later.  I also get rid of an unused overload.
2014-09-28 21:25:06 -04:00
comex f0131c2e09 Mechanical changes to move most CP state to a struct rather than separate globals.
The next commit will add a separate copy of the struct and the ability
for LoadCPReg to work on it.
2014-09-28 21:23:29 -04:00
comex 90638c6806 Switch to an unordered_map as a micro-optimization. 2014-09-28 21:23:29 -04:00
comex f8452ff501 Fix threading issue with vertex loader JIT.
VertexLoader::VertexLoader was setting loop_counter, a *static*
variable, to 0.  This was nonsensical, but harmless until I started to
run it on a separate thread, where it had a chance of interfering with a
running vertex translator.

Switch to just using a register for the loop counter.
2014-09-28 21:23:28 -04:00
comex 63c62b277d Some changes to VertexLoaderManager:
- Lazily create the native vertex format (which involves GL calls) from
RunVertices rather than RefreshLoader itself, freeing the latter to be
run from the CPU thread (hopefully).

- In order to avoid useless allocations while doing so, store the native
format inside the VertexLoader rather than using a cache entry.

- Wrap the s_vertex_loader_map in a lock, for similar reasons.
2014-09-28 21:23:28 -04:00
Fiora c102fed36a GekkoDisassembler: show W and I in psq_l/psq_st disassembly 2014-09-28 17:01:35 -07:00
Steven Vascellaro b956be20e3 Replaced generalized instances of GCM with ISO
Renamed various commands to refer to ISO instead of GCM for consistency,
as the commands are used for both Wii and GameCube files.

CompressGCM --> CompressISO
DeleteGCM --> DeleteISO
MultiCompressGCM --> MultiCompressISO
MultiDecompressGCM --> MultiDecompressISO
SetDefaultGCM --> SetDefaultISO

Fixed COMPRESSISO

Fixed missing "COMPRESSISO"

Fixed more COMPRESSISO

Final fix for COMPRESSISO
2014-09-28 19:53:05 -04:00
Lioncash 7e825fdca5 Jit_Integer: Get rid of some cast noise in boolX 2014-09-28 13:28:16 -04:00
shuffle2 431fb4d82a Merge pull request #1172 from shuffle2/qt-build-spaces
Fix QtCompile.props to work if the repo path contains spaces.
2014-09-28 02:50:22 -07:00
Lioncash ab639b41ab DSPJitRegCache: Use std::array to represent the register arrays 2014-09-28 03:02:29 -04:00
Shawn Hoffman 9fe2d45ad4 Fix QtCompile.props to work if the repo path contains spaces. 2014-09-27 23:08:18 -07:00
Lioncash ee076453ce Merge pull request #1171 from lioncash/loop
DSPJitRegCache: Merge two loops in popRegs.
2014-09-28 02:07:44 -04:00
skidau 6bea53ab11 Clean-up the leftover dspARAMAddresses code that was no longer needed. 2014-09-28 15:38:35 +10:00
skidau baeca3e03b Merge pull request #1170 from lioncash/bounds
SI: Fix bounds check in GetDeviceType
2014-09-28 14:57:38 +10:00
skidau 275226c2b6 Merge pull request #1147 from RachelBryk/unicode-tex
Allow custom textures to load from unicode paths.
2014-09-28 14:54:56 +10:00
skidau afccf2276d Merge pull request #1012 from skidau/aram-dma-exceptions
Compile the ARAM DMA exception checks into the JIT block
2014-09-28 14:48:38 +10:00
Fiora 3878187721 Interpreter: remove debug printf in psq_l 2014-09-27 20:44:45 -07:00
skidau 7184019090 Increased the savestate internal version.
Added a small note for instant dma.
2014-09-28 11:51:14 +10:00
Lioncash 8b578c7ba3 DSPJitRegCache: Merge two loops in popRegs. 2014-09-27 18:33:48 -04:00
Lioncash 1c42fd9928 SI: Fix bounds check in GetDeviceType 2014-09-27 16:44:21 -04:00
Lioncash a8d8c9230b CoreParameter: Kill off an snprintf usage 2014-09-27 14:45:03 -04:00
Lioncash 2f4d3961b3 CoreParameter: Use unique_ptr in place of raw pointers 2014-09-27 14:42:59 -04:00
skidau 86b6dfe4b3 Added a instant ARAM DMA mode which is enabled automatically when required.
Detects a situation where the game is writing to the dcache at the address being DMA'd. As we do not have dcache emulation, invalid data is being DMA'd causing audio glitches. The following code detects this and enables the DMA to complete instantly before the invalid data is written.
Added accurate ARAM DMA transfer timing.
Removed the addition of DSP exception checking.
2014-09-27 20:47:29 +10:00
skidau 4b37fdfa45 Added a CompileExceptionCheck function to the JitInterface and re-routed the existing code to utilise the interface. 2014-09-27 20:16:26 +10:00
skidau 945d431171 Added OPTYPE_LOADPS and OPTYPE_STOREPS instruction types to the PPC table.
Updated ARAM DMA and FIFO write exception checking to uses these types.

Conflicts:
	Source/Core/Core/PowerPC/Interpreter/Interpreter_Tables.cpp
	Source/Core/Core/PowerPC/PPCTables.h
2014-09-27 20:16:26 +10:00
skidau 0f256715e0 Re-added the ARAM DMA exception check. This fixes the audio cutting in and out of Resident Evil 2 and 3. Removed the special case for short transfers as it is no longer required. 2014-09-27 20:16:26 +10:00
skidau d09e2abb0d Compile the ARAM DMA exception checks into the JIT block in a similar style to FIFO writes. This ensures that the ARAM DMA is handled soon after the DMA completes. Fixes issue 7122 and issue 7342. 2014-09-27 20:16:25 +10:00
Fiora fbbe9605a9 Debug: fix display of instructions in virtual memory in MMU games 2014-09-27 01:07:37 -07:00
Fiora ac1fc9ad03 JIT+Emitter: support locking flags
This helps us avoid accidentally clobbering flags between two instructions
when the flags are expected to be maintained. Dolphin will of course crash
immediately, but at least it will crash loudly and alert us of the mistake,
instead of forcing hours of bisecting to find the subtle way in which the JIT
has managed to sneak a flag-modifying instruction where there shouldn't be one.
2014-09-26 20:47:06 -07:00
skidau 23e2301223 Merge pull request #1154 from skidau/undeclared-uv0-fix
Fixed the "Undeclared identifier: uv0" OpenGL shader compile error that appears in NBA2K11.
2014-09-27 13:25:16 +10:00
skidau f5bbfa139d Merge pull request #1146 from RachelBryk/netplay-input-display
Make input display work properly with netplay.
2014-09-27 13:25:01 +10:00
Fiora 39d4306a2e JIT: fix carry merging across breakpoints
More precisely, don't do it.
2014-09-26 13:21:01 -07:00
Fiora ba39c35f24 JIT: fix branch merging, take 2
NOT doesn't set flags.
2014-09-25 22:33:40 -07:00
skidau 30d77b38c5 Merge pull request #1127 from Sonicadvance1/QGR-BitField
Change the QGR union over to a BitField union.
2014-09-26 14:53:24 +10:00
skidau 9d746b89a2 Merge pull request #1162 from FioraAeterna/fixmerges
JIT: fix bugs with ComputeRC in branch merging patch
2014-09-26 14:46:53 +10:00
Fiora f9ab25152c JIT: fix bugs with ComputeRC in branch merging patch
We really, really need to be sure the input to ComputeRC is a register.
2014-09-25 21:45:25 -07:00
skidau 146725f64a Merge pull request #1125 from Sintendo/fresjumps
Change fres/frsqrte jumps
2014-09-26 14:45:19 +10:00
Rachel Bryk 4fe1119e52 Cleanup Renderer::CalculateTargetSize(), and allow IRs higher than 4x to be set via ini. 2014-09-25 19:50:25 -04:00
comex fb3d9c9d58 Fix warning in x64CPUDetect.cpp in generic build by not building it. 2014-09-25 18:48:00 -04:00
comex 9cdd842080 Add a fake SContext definition for _M_GENERIC. 2014-09-25 18:47:34 -04:00
Fiora 23fbcecf13 JIT: enable block linking and idle skipping in debug mode
They can still be turned off, just don't force them off.
Also remove some dated comments.
2014-09-25 07:12:10 -07:00
comex 8dccb0c743 Fix fastmem in JitIL after 755bd2c4.
That commit reorganized fastmem a bit; I wrote it before the patch to
support fastmem in JitIL landed, and forgot to edit it to account for
the fact.  Since JitILBase now derives from Jitx86Base, the HandleFault
override can just be removed.
2014-09-25 01:15:58 -04:00
skidau c41f76e774 Merge pull request #1148 from lioncash/typo
ISOProperties: Fix typo in the tooltip for manual config editing.
2014-09-25 13:49:39 +10:00
skidau 6d064b0406 Merge pull request #1126 from lioncash/delete
DolphinWX: Get rid of an explicit delete in OnExportSave
2014-09-25 13:44:21 +10:00
Sintendo 29cca5c84f Change fres/frsqrte jumps 2014-09-24 21:58:01 +02:00
Fiora bfab5f1e91 JIT: generic branch merging
Why merge just cmps and rlwinm when we can merge ALL the branches?
2014-09-24 12:34:18 -07:00
Ryan Houdek 76697922b4 Implement XER optimization on ARMv7 JIT core
Not completely optimized; there's room for improvement here.
2014-09-24 12:27:54 -07:00
Fiora 5fce109ce1 Reorganize carry to store flags separately instead of part of XER
Also correct behavior with regards to which bits in XER are treated as zero
based on a hwtest (probably doesn't affect any real games, but might as well
be correct).
2014-09-24 12:27:47 -07:00
skidau 788a719718 Merge pull request #1153 from skidau/twx-bindtoreg
Replaced KillImmediate with BindToRegister in the tw instruction.
2014-09-24 13:31:44 +10:00
skidau a83792e914 Merge pull request #1074 from FioraAeterna/earlyflush
JIT: flush a register if it won't be used for the rest of the block
2014-09-24 13:30:02 +10:00
skidau 539f270c67 Added a xf.numtexgen != bp.numtextgen error log if there is a mismatch detected. 2014-09-24 10:46:09 +10:00
booto 7f76ad3edb dsp int timing tweak
this fixes a bug in GE9E5D that caused hangs on boot
2014-09-24 00:50:46 +08:00
skidau b4399dbdf3 Fixed the "Undeclared identifier: uv0" OpenGL shader compile error that appears in NBA2K11. 2014-09-24 00:10:45 +10:00
Lioncash bdd1853586 Merge pull request #1149 from rohit-n/android-warnings
Android: Silence some more warnings.
2014-09-23 07:51:14 -04:00
skidau 65eb0ff2fe Replaced KillImmediate with BindToRegister in the tw instruction. Fixes the error "WriteNormalOp - a1 and a2 cannot both be memory" which appeared on starting Monopoly Streets. 2014-09-23 18:00:41 +10:00
skidau cbf102794e Merge pull request #1130 from Sonicadvance1/AArch64-jit-extXx
[AArch64] Implement instructions.
2014-09-23 13:52:30 +10:00
skidau fb18d5376f Merge pull request #1142 from lioncash/linucks
Fix some warnings on Linux
2014-09-23 13:43:18 +10:00
Fiora 88f2fbe1a4 JIT: fix merged bclr with comex's BLR optimizations 2014-09-22 18:22:31 -07:00
Fiora f103234e2b JIT: flush a register if it won't be used for the rest of the block
This should dramatically reduce code size in the case of blocks with
lots of branches, and certainly doesn't hurt elsewhere either.

This can probably be improved a good bit through smarter tracking of register
usage, e.g. discarding registers that are going to be overwritten, but this
is a good start and should help reduce code size and register pressure.
Unlike that sort of change, this is a "safe" patch; it only flushes registers,
which can't affect correctness, unlike actually discarding data.

As part of this, refactor PPCAnalyst to support distinguishing between
float and integer registers (to properly handle instructions that access
both, like floating-point loads and stores).

Also update every instruction in the interpreter flags table I could find
that didn't have all the correct flags.
2014-09-22 16:00:25 -07:00
Fiora de86d2003a JIT: merge lbz + extsb
PPC has no 8-bit sign-extended load, so this instruction pair is very common.
x86 can do it in one op (movsx), so merge them when possible.
2014-09-22 15:41:54 -07:00
Rohit Nirmal 3168361e32 Android: Silence some more warnings. 2014-09-22 17:45:42 -04:00
Ryan Houdek 7f1185b941 Merge pull request #1140 from lioncash/android
Android: Silence a few warnings
2014-09-22 16:20:53 -05:00
Lioncash 874f5eb1ad ISOProperties: Fix typo in the tooltip for manual config editing. 2014-09-22 13:45:28 -04:00
Rachel Bryk e4d71f36b1 Make input display work properly with netplay. 2014-09-22 12:56:35 -04:00
Rachel Bryk 4ed9b561bd Allow custom textures to load from unicode paths. 2014-09-22 12:51:30 -04:00
Rachel Bryk ad460a21d7 Change netplay buffer SpinCtrl to default to 5. 2014-09-22 08:40:13 -04:00
Lioncash dd6ebd2228 Merge pull request #1141 from lioncash/rasterogl
OGL: Get rid of explicit deletes in RasterFont
2014-09-22 03:20:32 -04:00
shuffle2 c617f324b2 Merge pull request #1143 from lioncash/exi
Core: Fix SIGABRT possibility in EXI_DeviceGecko
2014-09-22 00:16:34 -07:00
skidau 8c5e12cf02 Moved the linking of the FIFO CPWritePointer near where CPWritePointer gets updated. The CPWritePointer was getting updated while it was in-flight causing Pac-man Party to flicker. Fixes issue 5223. 2014-09-22 16:49:09 +10:00
skidau 6379d3983a Merge pull request #1137 from lioncash/debugger-crash
DolphinWX: Fix case where the debugger would crash on hiding a pane.
2014-09-22 14:48:29 +10:00
Lioncash 858d18a67e Core: Fix SIGABRT possibility in EXI_DeviceGecko
Fixes issue 7586
2014-09-21 21:50:30 -04:00
Lioncash 836ff6d506 Fix some warnings on Linux 2014-09-21 20:13:22 -04:00
Lioncash 23b82bbacd OGL: Get rid of explicit deletes in RasterFont 2014-09-21 20:06:13 -04:00
Lioncash ea40fdf21c Merge pull request #1132 from lioncash/osx
Fix building Dolphin on OSX without precompiled headers
2014-09-21 20:02:59 -04:00
Lioncash 3351e3f1c3 Merge pull request #1133 from RachelBryk/state
Remove an unused variable.
2014-09-21 19:52:13 -04:00
Lioncash dc79755303 Android: Silence a few warnings 2014-09-21 19:51:27 -04:00
Rachel Bryk d933247c50 Remove an unused variable. 2014-09-21 19:40:18 -04:00
Lioncash 76ad89ebb6 DolphinWX: Fix the video dialog crashing Dolphin on OSX
When a game was running and someone opened the video dialog, it would crash. This is because the preprocessor macro should have been __APPLE__ not _APPLE_

Fixes issue 7644.
2014-09-21 16:08:16 -04:00
Lioncash 770a9a42a5 Merge pull request #1136 from lioncash/memory-view
DolphinWX: Fix the memory view in the debugger
2014-09-21 15:35:26 -04:00
Ryan Houdek 9206dd016e Merge pull request #1135 from FioraAeterna/twidisasmfix
Disassembler: fix disassembly of some twi instructions
2014-09-21 14:19:05 -05:00
Ryan Houdek 1cb07ffc14 [AArch64] Implement twi and tw. 2014-09-21 14:17:04 -05:00
Fiora 505b1bd562 JIT: a small optimization for subfex and friends 2014-09-21 12:16:26 -07:00
Lioncash 95660a5563 DolphinWX: Fix case where the debugger would crash on hiding a pane.
These ID values would clash with the window parent IDs of all the actual debugger panes (they are in the 350 range as well).

For example, attempting to show and then close the memory window would cause an assertion, because it would attempt to destroy the text control for searching through memory, rather than destroying the actual parent window it's attached to.

These IDs are only used locally, so their value doesn't matter.
2014-09-21 14:06:27 -04:00
Lioncash dc65ef33ba DolphinWX: Fix the memory view in the debugger 2014-09-21 11:47:52 -04:00
Fiora 9c4407fb80 Disassembler: fix disassembly of some twi instructions 2014-09-21 08:17:41 -07:00
Ryan Houdek 078147d424 [AArch64] Implement mfmsr 2014-09-21 07:38:21 -05:00
Ryan Houdek 9530800fd0 [AArch64] Implement mtsprin and mfsprin 2014-09-21 07:38:16 -05:00
Ryan Houdek 2bcea19492 [AArch64] Implement mtsr and mfsr 2014-09-21 07:36:14 -05:00
Tony Wasserka 1d23c2ca8b GPU: Only load the relevant color components upon writes to the tev color registers.
The other two components need not be valid upon write, hence loading them results in glitches.

Fixes issue 6783.
2014-09-21 10:38:22 +02:00
Tony Wasserka 6d4fd54683 ChunkFile: Add a DoArray overload which takes an std::array.
This is inconsistent with how other containers are used (i.e. with Do()), but making std::array be used with Do() seems rather confusing when there's also a DoArray available.
2014-09-21 10:38:22 +02:00
skidau 536582b2eb Merge pull request #1129 from lioncash/casing
VideoCommon: Fix function casing in FrameBufferManagerBase
2014-09-21 15:56:17 +10:00
Lioncash a04a99251f Fix building Dolphin on OSX without precompiled headers 2014-09-21 00:37:47 -04:00
Ryan Houdek 0f8c5bda40 [AArch64] Implement mcrf. 2014-09-20 21:19:25 -05:00
Tony Wasserka a5f4e4ad25 Merge pull request #1128 from lioncash/bits
VideoCommon: Make zfreeze in GenMode 1 bit in size
2014-09-21 00:03:36 +02:00
Ryan Houdek e708e8d5a0 [AArch64] Implement negx. 2014-09-20 16:17:16 -05:00
Ryan Houdek 75590a99cb [AArch64] Implement cntlzwx. 2014-09-20 14:52:56 -05:00
Ryan Houdek 76d2f331f0 [AArch64] Implement extshx and extsbx. 2014-09-20 14:46:53 -05:00
Lioncash a6ffa55215 VideoCommon: Fix function casing in FrameBufferManagerBase 2014-09-20 14:54:59 -04:00
Lioncash 91438fa9e7 VideoCommon: Make zfreeze in GenMode 1 bit in size 2014-09-20 14:30:41 -04:00
Ryan Houdek 9d7598266f Change the QGR union over to a BitField union.
Makes it easier to generate a QGR in my unit test, cleaner overall of course.
2014-09-20 13:15:44 -05:00
Ryan Houdek a829e596c7 Merge pull request #1121 from FioraAeterna/fixfsel
JIT: fix fsel/ps_sel implementations for NaN input
2014-09-20 12:40:55 -05:00
Lioncash b92e0660ab DolphinWX: Get rid of an explicit delete in OnExportSave 2014-09-20 13:00:55 -04:00
Fiora 6043c790b6 JIT: fix indexed paired singles
I didn't realize the I and W fields were in a different place for these
variants.

This should fix Paper Mario and probably lots of other things I accidentally
broke.
2014-09-20 00:20:49 -07:00
skidau ae17d91992 Merge pull request #1096 from RachelBryk/save-slots
Add hotkeys to select save state slots
2014-09-20 15:45:02 +10:00
Ryan Houdek 2db7413a19 Merge pull request #1118 from lioncash/lolwinapi
FrameTools: Set focus on Windows via CFrame::SetFocus
2014-09-19 20:48:27 -05:00
Ryan Houdek eb23882398 Merge pull request #1120 from rohit-n/muh-precompiled-headers
Fix build failing when disabling precompiled headers.
2014-09-19 17:43:42 -05:00
Rohit Nirmal 46057db37d Fix build failing when disabling precompiled headers. 2014-09-19 18:17:51 -04:00
Ryan Houdek d7b40fa94c Merge pull request #1119 from FioraAeterna/bytereverse
JIT: support byte-reversed stores/loads
2014-09-19 15:54:27 -05:00
Ryan Houdek 2e1377ab7e Merge pull request #1107 from FioraAeterna/opcodesearch
Debugger: make opcode search a bit better
2014-09-19 15:50:54 -05:00
Ryan Houdek bdca720e33 Fix some indention on AArch64 JIT. 2014-09-19 15:23:21 -05:00
Ryan Houdek 47e47891d4 [AArch64] Implement a bunch of integer instructions
16 new instructions for AArch64.
2014-09-19 15:23:21 -05:00
Ryan Houdek 5671530026 Merge pull request #1101 from FioraAeterna/fixfallbacks
JIT: simpler fallback conditions for load/store float
2014-09-19 15:23:01 -05:00
Ryan Houdek 5b4aa1d6d4 Merge pull request #1123 from FioraAeterna/eieio
JIT: change eieio and tlbsync to DoNothing
2014-09-19 15:19:41 -05:00
Ryan Houdek 7cc586d615 Merge pull request #1100 from FioraAeterna/psq_insts
JIT: implement remaining psq_l/st instruction variants
2014-09-19 15:16:44 -05:00
Fiora 0f53bba45a JIT: change eieio and tlbsync to DoNothing
The interpreter functions for these are no-ops anyways.
Also add some missing DoNothings to the ARM64 JIT.
2014-09-19 13:14:49 -07:00
Ryan Houdek 522d7eb275 Merge pull request #1109 from FioraAeterna/ps_cmp
JIT: add ps_cmp0/ps_cmp1/ps_res/ps_rsqrte
2014-09-19 14:41:05 -05:00
Ryan Houdek 526e92464b Merge pull request #1103 from FioraAeterna/floatconstnaming
JIT: rename a few constants to be more accurate
2014-09-19 13:21:06 -05:00
Ryan Houdek c5f9301e6e Add a comment to the software renderer that stride should be implemented 2014-09-19 12:33:15 -05:00
magumagu 32e5043b29 WIP XFB scaling.
Still an ugly mess.
2014-09-19 12:33:15 -05:00
Ryan Houdek 0d1c1e9477 Merge pull request #1122 from Sonicadvance1/Android-reduce-confusion
Show OpenGL or OpenGL ES on Android depending on what the device supports
2014-09-19 09:21:58 -05:00
Ryan Houdek e18860830a Show OpenGL or OpenGL ES on Android depending on what the device supports.
Reduces confusion for the users
2014-09-19 09:21:16 -05:00
Ryan Houdek d544c563ea Merge pull request #1112 from Sonicadvance1/AArch64-mov-aliases
Add AArch64 emitter aliases for MOV and MVN.
2014-09-19 09:19:33 -05:00
Ryan Houdek ec310811a8 Merge pull request #1114 from Sonicadvance1/AArch64-fix-build
Fix AArch64 JIT compiling.
2014-09-19 09:19:25 -05:00
Fiora c130a496f2 JIT: fix fsel/ps_sel implementations for NaN input
fselx was the main problem, but ps_sel was wrong too (even if there were no
known reported bugs with it).

This fixes Beyond Good and Evil (at the least).
2014-09-19 01:58:13 -07:00
Fiora d96016ed21 JIT: support byte-reversed stores/loads
4 more instructions down.

Store ones should be pretty well-tested; load ones seem to almost never be
used. I found them in Turok Evolution, so I was able to check code generation,
but the relevant code didn't seem to be called.
2014-09-18 20:38:44 -07:00
skidau bd740ae9c7 Merge pull request #1111 from Tilka/fix_gcpad_setmotor
Fix GCPad::SetMotor()
2014-09-19 13:26:05 +10:00
Fiora af8772700a JIT: add ps_res and ps_rsqrte using scalar implementations 2014-09-18 18:36:15 -07:00
Lioncash c33a9de6af FrameTools: Set focus on Windows via CFrame::SetFocus 2014-09-18 21:15:26 -04:00
Fiora 1b425dedd1 JIT: add ps_cmp0/ps_cmp1 implementations using current fcmp code 2014-09-18 17:57:28 -07:00
Fiora 3c49200b22 X64Emitter: add MOVHLPS/MOVLHPS 2014-09-18 17:57:27 -07:00
Ryan Houdek a8abbdae85 Merge pull request #1106 from FioraAeterna/fixdebug2
JIT: fix debug mode
2014-09-18 19:52:35 -05:00
Lioncash 68d62c3d32 Merge pull request #1110 from lioncash/apple-code
DolphinWX: Fix GC/Wiimote input windows randomly crashing on OSX
2014-09-18 20:17:16 -04:00
shuffle2 88196d373f Merge pull request #1117 from shuffle2/qt-plugins
windows/qt: add (hopefully) all plugins DolphinQt should possibly need.
2014-09-18 15:46:28 -07:00
Shawn Hoffman 035a1c0ec2 windows/qt: add (hopefully) all plugins DolphinQt should possibly need.
For now they are all copied to binary directory, once the project is more mature
it can be stripped down.
2014-09-18 15:24:14 -07:00
comex 3df935b98e Reset RSP after calling Jit in case it cleared the code cache. 2014-09-18 18:23:36 -04:00
Ryan Houdek f709dda6aa Fix AArch64 JIT compiling. 2014-09-18 16:50:49 -05:00
Ryan Houdek 7608e3f11e Add AArch64 emitter aliases for MOV and MVN. 2014-09-18 16:30:40 -05:00
Tillmann Karras e35db54454 Fix and simplify GCPad::SetMotor()
abs() takes an int argument. Casting -0.5..0.5 to int always resulted in
zero.
2014-09-18 21:34:07 +02:00
Lioncash 207d7787a4 DolphinWX: Fix GC/Wiimote input windows randomly crashing on OSX 2014-09-18 14:52:12 -04:00
Ryan Houdek e9164247d6 Merge pull request #1108 from FioraAeterna/fixdebugscroll
Debugger: scroll by multiples of 4 bytes
2014-09-18 06:52:44 -05:00
Ryan Houdek d54c8eb6bf Merge pull request #1098 from FioraAeterna/cvtsi2ss
JIT: use cvtsi2ss in paired singles
2014-09-18 06:51:37 -05:00
Ryan Houdek 0294b344e2 Merge pull request #1086 from FioraAeterna/fixsrawint
Interpreter: fix carry calculation in srawx
2014-09-18 06:41:37 -05:00
Fiora 20c3a0f2d8 Debugger: scroll by multiples of 4 bytes
Avoids that weird effect where scrolling offsets code from 4-byte boundaries,
showing nonsense 75% of the time.
2014-09-18 03:54:57 -07:00
Fiora 8ce4676605 Debugger: make opcode search a bit better
Search a wider range (not all games fit in the originally searched range).
Print a notice if the opcode isn't found, instead of silently failing.
2014-09-18 03:47:46 -07:00
Fiora cd7853bd50 JIT: fix debug mode 2014-09-18 03:14:04 -07:00
Fiora 9ab816e6e9 JIT: fix regression in ps_sel
My code didn't maintain correct semantics with floating-point NaNs (a < b is
not the same as "not a >= b" in float), which seems to have broken FIFA 12.
2014-09-17 21:43:44 -07:00
comex 217758b607 Correct inaccurate comment. 2014-09-17 22:30:33 -04:00
comex 6695b5acce Fix backwards #ifdef. 2014-09-17 22:30:20 -04:00
comex 97c9cb5882 Add missing push wrapper around UpdatePerformanceMonitor 2014-09-17 21:10:43 -04:00
Fiora 29fc151cc7 JIT: implement remaining psq_l/st instruction variants
These are used in at least a few popular games, including Super Smash Bros.
Brawl.
2014-09-17 17:10:27 -07:00
comex 7ad9027593 Be pedantic about stack overflow on Linux and OS X.
Add some magic to the fault handler to handle stack overflow due to BLR
optimization, and disable the optimization if fastmem is not enabled.
2014-09-17 20:08:09 -04:00
Fiora cfd65c2762 JIT: rename a few constants to be more accurate
Remove the '2'; it's not longer applicable.
2014-09-17 16:59:35 -07:00
comex 755bd2c445 Reorganize backpatching a bit. Untested on ARM.
Rather than *MemTools.cpp checking whether the address is in the
emulated range itself (which, as of the next commit, doesn't cover every
kind of access the JIT might want to intercept) and doing PC
replacement, they just pass the access address and context to
jit->HandleFault, which does the rest itself.

Because SContext is now in JitInterface, I wanted JitBackpatch.h (which
defines it) to be lightweight, so I moved TrampolineCache and associated
x64{Analyzer,Emitter} dependencies into its own file.  I hate adding new
files in three places, two of which are MSVC...

While I'm at it, edit a misleading comment.
2014-09-17 19:57:06 -04:00
comex 7b0fdb52cd Run exception handlers on an alternate stack on Linux.
*Completely untested.*  Someone please test.
2014-09-17 19:57:04 -04:00
comex bd4e75e69a Shorten the blr stub a bit. 2014-09-17 19:56:58 -04:00
comex b597ec3e08 Opportunistically predict BLR destinations using RET.
When executing a BL-type instruction, push the new LR onto the stack,
then CALL the dispatcher or linked block rather than JMPing to it.  When
executing BLR, compare [rsp+8] to LR, and RET if it's right, which it
usually will be unless the thread was switched out.  If it's not right,
reset RSP to avoid overflow.

This both saves a trip through the dispatcher and improves branch
prediction.

There is a small possibility of stack overflow anyway, which should
be handled... *yawn*
2014-09-17 19:56:09 -04:00
comex 558dee84ca Wrap some function calls in ABI_Push|PopRegistersAndAdjustStack(0, 0);
These calls are made outside of JIT blocks, and thus previously did not
read any protection - register use is taken into account and the outer
dispatcher stack frame is sufficient.  However, if data is to be stored
on the stack, these calls must reserve stack shadow space on Windows to
avoid clobbering it.
2014-09-17 19:56:09 -04:00
Fiora 2a0b06f08c JIT: simpler fallback conditions for load/store float
I wasn't really thinking when I wrote these; d/s are for float registers, not
gprs.
2014-09-17 10:27:33 -07:00
Fiora 76c8bb40e8 JIT: update some rather outdated comments 2014-09-16 23:42:22 -07:00
Fiora 2ae6f13d22 JIT: use cvtsi2ss in paired singles
One less instruction for a few of the loads.
2014-09-16 22:50:33 -07:00
shuffle2 978a855d3f Merge pull request #1090 from shuffle2/dolphin-qt
DolphinQt -- initial commit
2014-09-16 22:21:16 -07:00
skidau 2c233c4976 Merge pull request #686 from FioraAeterna/fiora
JIT: Optimize JitAsmCommon, Float, and PS implementations
2014-09-17 14:06:14 +10:00
Rachel Bryk 5dc88a2673 Add hotkeys to select save state slots and to save/load the currently selected slots. 2014-09-16 19:19:41 -04:00
Fiora d3dee1d7ed GekkoDisassembler: fix some float opcodes 2014-09-16 02:06:40 -07:00
comex 7eea7080d9 Fix missing "return" 2014-09-16 00:25:21 -04:00
skidau 8361d2b1da Merge pull request #805 from FioraAeterna/storerefactor
JIT: support immediate stores
2014-09-16 13:31:39 +10:00
Dolphin Bot bef2016909 Merge pull request #1091 from FioraAeterna/fixdisasm
GekkoDisassembler: fix/improve disassembly for a few instructions
2014-09-16 03:53:18 +02:00
Fiora 7368c2ee9e GekkoDisassembler: fix/improve disassembly for a few instructions 2014-09-15 18:48:54 -07:00
Shawn Hoffman 9d57ac68a4 Add Qt submodule for windows. 2014-09-15 15:07:42 -07:00
Shawn Hoffman ae3a5ce9e3 Qt: Add msvc support 2014-09-15 15:07:33 -07:00
Augustin Cavalier 16c6a19190 DolphinQt: initial commit.
This adds the beginning of the DolphinQt user interface. It doesn't
do anything useful yet and only builds via CMake.
2014-09-15 15:06:05 -07:00
comex 847f78e4cc Merge pull request #1089 from FioraAeterna/fixemittersilentfail
x64Emitter: fix silent failure if WriteNormalOp is passed two memory operands
2014-09-15 14:53:21 -04:00
Fiora 764ce4b513 JIT: add fselx implementation
Based on a patch by Tilka.
2014-09-15 08:33:41 -07:00
Fiora 7ab820c6f8 JIT: Various JitAsmCommon optimizations
Use some SSE4 instructions in on CPUs that support them.
Use float instructions instead of int where appropriate (it's a cycle faster
on CPUs with arithmetic unit forwarding penalties).
2014-09-15 08:33:40 -07:00
Fiora 7b0f559ae1 JIT: various float optimizations 2014-09-15 08:33:40 -07:00
Fiora 34287b8042 JIT: some paired singles optimizations 2014-09-15 08:33:39 -07:00
Fiora d02b7c7755 JIT: support immediate stores 2014-09-15 07:25:32 -07:00
Fiora 02dce5dbbf x64Emitter: fix silent failure if WriteNormalOp is passed two memory operands
Should now fail loudly and clearly instead.
2014-09-15 07:08:08 -07:00
Fiora a248e49c97 Revert "Two small JIT optimizations" 2014-09-15 07:01:51 -07:00
Ryan Houdek 20af50b1c4 Merge pull request #1077 from FioraAeterna/integeropts2
Two small JIT optimizations
2014-09-15 07:09:11 -05:00
skidau 1458b59156 Merge pull request #1065 from Sonicadvance1/AArch64-fix-regcache
Fix all the current issues with the AArch64 register cache.
2014-09-15 13:02:16 +10:00
Fiora 3845c27155 JIT: save an instruction in psq_l 2014-09-14 15:12:57 -07:00
Fiora af471d0a84 JIT: optimize andi(s)_rc
We usually don't need to do a sign-extend for the resulting flags.
2014-09-14 15:12:14 -07:00
Fiora 9b8cfcdc29 Interpreter: fix carry calculation in srawx
I don't know anything this affected, but it didn't match the manual (or JIT).
2014-09-14 15:08:57 -07:00
comex 74f8a48ee6 Merge pull request #1063 from FioraAeterna/fastermmufix
MMU: properly check MEM1 range on Gamecube games
2014-09-14 15:17:09 -04:00
comex db7617248f Merge pull request #1021 from FioraAeterna/optimizeca3
JIT: Carry optimizations!
2014-09-14 15:08:08 -04:00
Lioncash b307bb68d7 Merge pull request #1080 from lioncash/wx-crap
Kill off the wx casts within InputCommon and GLInterface.
2014-09-14 13:21:34 -04:00
Ryan Houdek 4e7f284a81 Merge pull request #1064 from Sonicadvance1/AArch64-Fix-MOVI2R
Fix AArch64 MOVI2R helper function.
2014-09-14 09:26:02 -05:00
Ryan Houdek 4e16abd742 Merge pull request #1083 from FioraAeterna/lzcnt
Add LZCNT support, use in cntlzw
2014-09-14 09:18:10 -05:00
Fiora 40b18f09b2 JIT: use LZCNT in cntlzw 2014-09-14 05:36:23 -07:00
Fiora 997c5c2d0e x64Emitter: add LZCNT/TZCNT support and detection
Also add a unit test.
2014-09-14 05:31:22 -07:00
Ryan Houdek 1f7871f9e2 Merge pull request #1082 from FioraAeterna/fixccagain
JIT: fix JIT with conditional continue off, again
2014-09-14 03:22:03 -05:00
Fiora 653140fcfa MMU: properly check MEM1 range on Gamecube games
Fixes at the very least Rogue Squadron II crashes.
2014-09-14 00:16:37 -07:00
Fiora 9d2b2cae4a JIT: fix JIT with conditional continue off, again 2014-09-14 00:12:27 -07:00
Lioncash 357c0adc3c Kill off the wx casts within InputCommon and GLInterface.
All because someone didn't actually return the wxWindow handle for the edge case.
2014-09-14 01:07:08 -04:00
Scott Mansell 6956df79b2 Fix Fastmem in JitIL for massive speed gains.
JitIL's fastmem was stubbed out when Sonicadvance1 merged JitARMIL
into the tree. Since JitARMIL has been deleted, I simply re-arrange
the inheritance to base JitIL on Jitx86Base, so it can inherit the
backpatch function.

Povray Benchmark: 1985 seconds to 1316 seconds.
2014-09-14 16:21:54 +12:00
Lioncash 6cfc5b9849 InputCommon: Initialize NSDictionaries using literal syntax. 2014-09-13 21:32:33 -04:00
Lioncash 068799ff73 UnitTests: Fix misplaced braces in the x64Emitter tests 2014-09-13 20:45:17 -04:00
Pierre Bourdon 84a564a304 Merge pull request #1060 from rohit-n/move-using
JitArm32: Minor cleanup.
2014-09-14 01:59:39 +02:00
Pierre Bourdon eee473ed5f Merge pull request #1066 from lioncash/breaks
DiscIO: Remove unnecessary break statements.
2014-09-14 01:58:44 +02:00
Pierre Bourdon 9607cc4159 Merge pull request #1071 from archshift/patch-1
ConfigManager.cpp: Removed three elements from platform-ifdef
2014-09-14 01:58:17 +02:00
Pierre Bourdon 439068acae Merge pull request #1055 from FioraAeterna/smallermov
X64Emitter: support shorter mov reg, imm opcodes
2014-09-14 01:57:36 +02:00
Pierre Bourdon cb2e53e7c6 Merge pull request #1068 from rohit-n/use-vector
CBoot: Use vectors instead of raw pointers in ELF functions.
2014-09-14 01:55:01 +02:00
Fiora 1bd8d1ee98 Add immediate tests for WriteNormalOp
also fix a bug in Bochs that was preventing adc from passing.
2014-09-13 16:39:34 -07:00
Pierre Bourdon 2ab19c7cec Merge pull request #927 from FioraAeterna/fastermmu
Fiora's Faster MMU Project
2014-09-14 00:36:07 +02:00
Fiora 32a67ef264 JIT: fix memcheck on float load/store, plus some corner cases 2014-09-13 13:53:19 -07:00
Fiora b3c1cec197 JIT: fix memcheck with stXx 2014-09-13 13:53:18 -07:00
Fiora 9a19314969 JIT: make memcheck macro support an inverted mode 2014-09-13 13:53:13 -07:00
Fiora 54e26f64c6 JIT: use far code emitter in more places 2014-09-13 13:51:12 -07:00
Fiora 08ac10d00a PPCAnalyst/JIT: add ability to easily toggle branch and carry merging 2014-09-13 13:48:24 -07:00
Fiora 54129a8ca5 PPCAnalyst: refactor, add carry op reordering and non-cmp reordering
Tries as hard as possible to push carry-using operations (like addc and adde)
next to each other. Refactor the instruction reordering to be more flexible
and allow multiple passes.

353 -> 192 x86 instructions on a carry-heavy code block in Pokemon Puzzle.
12% faster overall in Pokemon Puzzle; probably less in typical games (Virtual
Console games seem to be carry-heavy for some reason; maybe a different
compiler?)
2014-09-13 13:48:23 -07:00
Fiora 45d84605a9 JIT64: optimize carry calculations further
Keep carry flags in the x86 flags register if used in the next instruction.
2014-09-13 13:48:20 -07:00
Fiora bea2504a51 JIT64: optimize carry calculations
Omit carry calculations that get overwritten later in the block before they're
used. Very common in the case of srawix and friends.
2014-09-13 13:47:43 -07:00
Dolphin Bot d72f61d62f Merge pull request #1073 from phire/save_jitil2
Fix Idle Skipping in JitIL.
2014-09-13 18:40:57 +02:00
Scott Mansell cf869fc24f Fix Idle Skipping in JitIL.
Has been broken since the flags-opt merge. The idle skipping code in
JitIL was very brittle and depended on the IL of it's inputs not
changing in any way.

flags-opt changed the IR generated by the cmp instruction, which is part
of the idle loop, causing JitIL to break in really weird ways, which
were almost impossible to track down.

This fixes various wii games crashing/not booting and the Regspill
error on (all?) gamecube mmu games.
2014-09-14 04:36:50 +12:00
Ryan Houdek a30b4f13a1 Merge pull request #1067 from lioncash/fallthrough
DolphinWX: Get rid of fallthrough in ScanForISOs
2014-09-13 04:52:30 -05:00
Fiora c5381bae66 JIT: add "far code emitter" to reduce L1I cache pressure 2014-09-13 02:31:31 -07:00
Fiora 09a62505c5 JIT: support paired load/store with MMU on
Also change the calling convention, to avoid RSCRATCH being clobbered by
memcheck'd loads.
2014-09-13 02:18:11 -07:00
Fiora 2661bc151a JIT memcheck: don't flush register state unless an exception occurs 2014-09-12 20:55:00 -07:00
Lioncash a92003c1ab ARM64: Make getters within ArithOption const. 2014-09-12 20:55:26 -04:00
archshift eae38fd339 ConfigManager.cpp: Removed three elements from platform-ifdef 2014-09-12 17:15:46 -07:00
Rohit Nirmal edd63c14a4 CBoot: Use vectors instead of raw pointers in ELF functions. 2014-09-12 12:03:06 -04:00
Lioncash 322f033c97 DolphinWX: Get rid of fallthrough in ScanForISOs 2014-09-12 11:52:36 -04:00
Lioncash 4db2af2d42 DiscIO: Remove unnecessary break statements. 2014-09-12 11:34:34 -04:00
Ryan Houdek e883a6fb2e Fix all the current issues with the AArch64 register cache.
Fixes all the current issues I've been experiencing.
Scaled back the register cache idea for now so I can actually work on some real instructions.

Tested this work with unit tests so I know it works.
Unit tests are pretty great things.
2014-09-12 06:39:15 -05:00
Ryan Houdek 17d31ecd6c Fix AArch64 MOVI2R helper function.
In the case of a zero immediate, it wouldn't generate code at all.
Also in the case of max u32/u64, use ORN to optimize it.
2014-09-12 05:45:10 -05:00
Fiora a6c9515b00 JIT: unify subfcx and addcx code
Again, shorter and should make future optimizations easier.
2014-09-12 00:04:42 -07:00
Fiora 5d80145dc0 JIT: unify subfe/submex/subfex/adde/addmex/addzex code
Shorter, plus should make future optimizations easier.
2014-09-12 00:04:42 -07:00
Zhuowei Zhang 3eaeeee41d Parse input as hex instead of decimal to match display values in the debugger's register view 2014-09-12 00:21:49 -04:00
skidau 64b21a4812 Merge pull request #1054 from comex/i-hate-warnings
Fix warnings.
2014-09-12 12:35:47 +10:00
Ryan Houdek d6ef8dc8c6 Merge pull request #1052 from Sonicadvance1/fix-ppcAnalyst-return
Fix the return value of PPCAnalyst.
2014-09-11 21:12:38 -05:00
Ryan Houdek 5061a33c29 Merge pull request #1051 from Sonicadvance1/ARM-Common
Include a missing include in the ARM emitter's common code.
2014-09-11 21:12:21 -05:00
skidau 4cb25633e1 Merge pull request #1048 from lioncash/discio
DiscIO: Minor changes to VolumeDirectory.
2014-09-12 11:31:29 +10:00
Lioncash 669a118063 Merge pull request #1058 from lioncash/semicolon
Remove some unnecessary semicolons
2014-09-11 19:56:08 -04:00
Pierre Bourdon a96618b2e6 Merge pull request #1036 from phire/save-jitil
Save JitIL! Fix bug so JitIL actually runs again.
2014-09-11 23:27:59 +02:00
Rohit Nirmal 428ee10463 include CommonTypes.h instead of Common.h, remove unused using. 2014-09-11 17:23:59 -04:00
Rohit Nirmal 9f82df0364 Move "using namespace ArmGen" from headers to sources. 2014-09-11 16:46:43 -04:00
Fiora 18d83a310e X64Emitter: support shorter mov reg, imm opcodes
Also refactor WriteNormalOp a little bit and add comments.
2014-09-11 11:40:30 -07:00
Lioncash b06ec302d1 Remove some unnecessary semicolons 2014-09-11 13:05:31 -04:00
Scott Mansell 784d3937dd Fix IsMMIOAddress Check. 2014-09-11 19:12:34 +12:00
comex 42acd61ccb Fix warnings. 2014-09-11 01:55:43 -04:00
Fiora 5726e0cdfb JIT: use XCHG in MOVTwo
Roughly the same speed or slightly faster depending on CPU; mostly just cleaner
since we don't have to pass in a temp.
2014-09-10 22:17:38 -07:00
Ryan Houdek b8d4834cb1 Fix the return value of PPCAnalyst.
In situations where conditional continue isn't supported + if a JIT doesn't implement a instruction that has the FL_ENDBLOCK flag. This would cause an
infinite loop.
In reality all the JITs should implement every FL_ENDBLOCK instruction regardless, but JITIL doesn't implement tw/twi which are FL_ENDBLOCK
instructions.
2014-09-10 21:33:17 -05:00
skidau 67f7e7e28b Merge pull request #1040 from RachelBryk/movie-cleanup
Movie cleanup
2014-09-11 11:47:55 +10:00
Ryan Houdek 44baab30cf Include a missing include in the ARM emitter's common code. 2014-09-10 20:39:19 -05:00
Ryan Houdek 581c81ce1c Merge pull request #1050 from Sonicadvance1/AArch64-sign-extend
Add sign extending aliases to the ARM64Emitter.
2014-09-10 20:17:50 -05:00
Ryan Houdek 24f6c98a55 Add sign extending aliases to the ARM64Emitter. 2014-09-10 17:52:54 -05:00
Rohit Nirmal c0f7cab3f5 Remove extra semicolons at the ends of some lines. 2014-09-10 12:17:38 -04:00
Ryan Houdek 71cb09f1ca Merge pull request #1027 from rohit-n/change-include
Include CommonTypes.h instead of Common.h.
2014-09-10 00:35:16 -05:00
Rachel Bryk 08db8c646b Cleanup Movie.h/cpp. 2014-09-09 21:23:54 -04:00
Rachel Bryk 571727a5ad Mass rename static variables to s_*. 2014-09-09 21:22:32 -04:00
Fiora b3a57ff396 JIT: remove op merging code that served no purpose
Dolphin already tracks propagation of immediates, so this code didn't really do
anything useful.
2014-09-09 18:09:23 -07:00
skidau d1439bc1db Merge pull request #1041 from RachelBryk/kill-g_CoreStartupParameter
Kill Core::g_CoreStartupParameter.
2014-09-10 11:00:42 +10:00
Ryan Houdek 16f054db47 Merge pull request #1033 from Sonicadvance1/fix-android-x86_64
Fix building x86_64 on Android.
2014-09-09 18:52:27 -05:00
Lioncash 9601f5ec5f DiscIO: Get rid of some casts and a c_str call in VolumeDirectory 2014-09-09 19:01:20 -04:00
Lioncash b34f2a78f5 DiscIO: Simplify GetUniqueID in VolumeDirectory 2014-09-09 18:57:45 -04:00
Ryan Houdek 09c1ad1631 Merge pull request #753 from FioraAeterna/integeropts
JIT64: various integer optimizations
2014-09-09 04:10:30 -05:00
Ryan Houdek 6a7e8899d3 Merge pull request #1035 from FioraAeterna/fixcrxxx
JIT: fix a corner case in crXXX
2014-09-09 00:58:53 -05:00
skidau e8d8713e03 Merge pull request #1017 from zhuowei/tw_fallback_if_constant_ra
Fix various issues with the twi/tw instructions
2014-09-09 15:16:25 +10:00
Ryan Houdek 3a205d663c Fix building x86_64 on Android.
Missed a define in x64MemTools for when the thought process was Android == ARM
Also changes the variable we use for choosing which folders to copy to and from our jni file.
This has changed since the x86_64 build target uses the library folder x86-64, which is stupid and annoying.
2014-09-09 00:11:08 -05:00
Ryan Houdek f09cb723c5 Merge pull request #1044 from lioncash/pedantry
Common: Fix code styling in Arm64Emitter
2014-09-08 23:29:19 -05:00
Rachel Bryk f93aa7087c Kill Core::g_CoreStartupParameter. 2014-09-09 00:24:49 -04:00
skidau 44c4bc134a Merge pull request #1046 from FioraAeterna/fixdebug
JIT: fix running in debug mode
2014-09-09 14:15:35 +10:00
Fiora 0af1352020 JIT: fix running in debug mode
Regression in 7fb6628.
2014-09-08 21:11:41 -07:00
Ryan Houdek d9ddc0d9ad Merge pull request #1042 from lioncash/unnecessary
InputCommon: Remove unnecessary breaks in XInput's GetName function
2014-09-08 22:46:58 -05:00
Ryan Houdek af732dea39 Merge pull request #1043 from lioncash/unused
Common: Remove unused variable in MemoryMap_Setup
2014-09-08 22:46:04 -05:00
Ryan Houdek cfb2c3db28 Merge pull request #1045 from Sonicadvance1/fix-generic
Fix Generic build from AArch64 merge.
2014-09-08 22:43:30 -05:00
Ryan Houdek d5da60619e Merge pull request #1034 from Sonicadvance1/fix-android-arm-ndk64bit
Fix building ARMv7 on the 64bit Android NDK.
2014-09-08 22:42:31 -05:00
Lioncash bc331ee809 Common: Fix code styling in Arm64Emitter 2014-09-08 23:39:20 -04:00
Ryan Houdek ed476c997c Fix Generic build from AArch64 merge.
I had missed this file and hadn't tested the branch on my new build system.
2014-09-08 22:24:23 -05:00
Fiora 8fc57d61ba JIT64: support merged branching for rlwinmx, too
Not quite as common a branch instruction as cmpwi, but close.
2014-09-08 20:16:41 -07:00
Fiora b56117de05 JIT64: optimize some special cases of srawix
Shift by 31 and 1, both of which are pretty common, can be done in a few less
instructions. Tested with a hwtest.
2014-09-08 20:15:49 -07:00
Fiora a95d8cbcb4 JIT64: optimize carry handling
Carries are rather common and unpredictable, so do them branchlessly wherever
we can.
2014-09-08 20:15:49 -07:00
Fiora a570c6b4a4 JIT64: tweak srwx/slwx BindToRegister arguments
Register B gets immediately moved into the shift register, so even if a == b
it doesn't need to be loaded.
2014-09-08 20:15:49 -07:00
Fiora 5b77617069 JIT64: use LEA for the "a = b + imm" case of addi 2014-09-08 20:15:48 -07:00
Fiora 9977da0550 JIT64: avoid using LEA for adds when not necessary 2014-09-08 20:15:48 -07:00
Fiora 298f85e152 JIT64: optimize sign-extend
Remove some code duplication.

Also remove some comments that no longer apply since x86_32 was dropped.
2014-09-08 20:15:47 -07:00
Fiora faf6bdfd96 JIT64: Optimize cmpXX
Use TEST instead of CMP if we're comparing against 0 (rather common), and
optimize the case of immediate compares further.
2014-09-08 20:15:47 -07:00
Fiora de662a79b7 JIT64: optimize rlwinmx/rlwinix and friends
Take advantage of movzx as a replacement for anding with 0xff or 0xffff, and
abuse loads from the register cache to save ops.
2014-09-08 20:15:46 -07:00
Fiora 858296e1c7 JIT64: optimize multiplication by immediate constants
Factor out common code and handle a few more common cases.
2014-09-08 20:15:46 -07:00
Fiora 94c20db369 Rename Log2 and add IsPow2 to MathUtils for future use
Also remove unused pow2/pow2f functions.
2014-09-08 20:15:45 -07:00
skidau 0926f1d344 Merge pull request #897 from Sonicadvance1/AArch64-jit
Initial AArch64 JIT
2014-09-09 12:34:58 +10:00
Lioncash 22800dc711 Common: Remove unused variable in MemoryMap_Setup 2014-09-08 21:44:03 -04:00
Lioncash c2578d0668 InputCommon: Remove unnecessary breaks in XInput's GetName function 2014-09-08 21:36:04 -04:00
Ryan Houdek 859f86ac2d Merge pull request #1037 from lioncash/mem_fn
AudioCommon: Remove unnecessary usages of mem_fn
2014-09-08 18:01:33 -05:00
Rohit Nirmal fbc64984ca Include CommonTypes.h instead of Common.h. 2014-09-08 15:39:58 -04:00
Lioncash bf0c4a644b Merge pull request #1002 from waddlesplash/wx-fixup
WiiSaveCrypted: migrate to Core/HW.
2014-09-08 15:20:12 -04:00
Lioncash 789a500ddc AudioCommon: Remove unnecessary usages of mem_fn 2014-09-08 13:41:02 -04:00
Augustin Cavalier e601b6f2c5 WiiSaveCrypted: migrate to Core/HW.
There's really no reason to have this in DolphinWX, as it does
not use any DolphinWX code.
2014-09-08 13:31:23 -04:00
Scott Mansell 1bbc7b4dbb JitIL: Fix matching bug in Store Paired.
Most non-wii, non-mmu games run now.
2014-09-08 23:57:00 +12:00
Scott Mansell 199377db43 Fix bug in Load Paired so JitIL actually runs again.
Was broken in the PowerPCState Register PR a few days ago.
2014-09-08 23:25:18 +12:00
Fiora ce494a5e4f JIT: fix a corner case in crXXX
It didn't behave correctly with an input of zero, resulting in some games
breaking (at the least, Fight Night 2). This should be fixed now.

Also clean it up, add a few comments, and fix some variants of the instruction
that are so rare that they probably never got tested.
2014-09-08 04:16:50 -07:00
Ryan Houdek 652b8602d3 Fix building ARMv7 on the 64bit Android NDK.
Google has gotten their act together and fixes a few of the signal handling headers.
Change over to a header that works on both r10 32bit and r10 64bit.
32bit has the old "broken" headers as in some didn't even exist.
64bit has the "fixed" headers that one would expect on any regular unix system.
2014-09-08 06:05:03 -05:00
skidau 9529667eae Merge pull request #1032 from FioraAeterna/fixnocc
JIT: fix conditional-continue=off
2014-09-08 17:34:28 +10:00
Fiora 3855396422 JIT: fix conditional-continue=off 2014-09-08 00:28:56 -07:00
Ryan Houdek d3a742eb38 Merge pull request #1028 from Sonicadvance1/fix-android-cmake
Fix a few minor bugs that appeared in the latest android cmake script
2014-09-08 02:28:21 -05:00
skidau dae162c2b5 Merge pull request #971 from TurboK234/EFB_copies_togglefix
Remove "EFB Copies Disabled" option from hotkey toggling cycle.
2014-09-08 17:05:52 +10:00
comex 7fb6628789 Merge pull request #1024 from comex/abi-cleanup
ABI cleanup
2014-09-08 01:03:36 -04:00
comex 4dc090643d Remove ABI_AlignStack/ABI_RestoreStack and the noProlog option to ABI_CallFunctionRR.
The latter being true was the only case where the former would do
anything, and it was never true.  They became obsolete with x86's
removal.
2014-09-08 01:00:10 -04:00
comex c5c0b36046 Remove the inaccurately named ABI_PushAllCalleeSavedRegsAndAdjustStack (it didn't preserve FPRs!) and replace with ABI_PushRegistersAndAdjustStack.
To avoid FPRs being pushed unnecessarily, I checked the uses: DSPEmitter
doesn't use FPRs, and VertexLoader doesn't use anything but RAX, so I
specified the register list accordingly.  The regular JIT, however, does
use FPRs, and as far as I can tell, it was incorrect not to save them in
the outer routine.  Since the dispatcher loop is only exited when
pausing or stopping, this should have no noticeable performance impact.
2014-09-08 01:00:10 -04:00
comex 2dafbfb3ef Improve code and clarify parameters to ABI_Push/PopRegistersAndAdjustStack.
- Factor common work into a helper function.
- Replace confusingly named "noProlog" with "rsp_alignment".  Now that
x86 is not supported, we can just specify it explicitly as 8 for
clarity.
- Add the option to include more frame size, which I'll need later.
- Revert a change by magumagu in March which replaced MOVAPD with MOVUPD
on account of 32-bit Windows, since it's no longer supported.  True,
apparently recent processors don't execute the former any faster if the
pointer is, in fact, aligned, but there's no point using MOVUPD for
something that's guaranteed to be aligned...

(I discovered that GenFrsqrte and GenFres were incorrectly passing false
to noProlog - they were, in fact, functions without prologs, the
original meaning of the parameter - which caused the previous change to
break.  This is now fixed.)
2014-09-08 00:58:56 -04:00
Ryan Houdek 707d21e36b Fix a few minor bugs that appeared in the latest android cmake script 2014-09-07 23:18:43 -05:00
skidau 262fa1de02 Merge pull request #1026 from lioncash/str
DolphinWX: Use std::string over char arrays in MemoryView
2014-09-08 10:40:16 +10:00
Lioncash 9db370ea40 DolphinWX: Use std::string over char arrays in MemoryView 2014-09-07 20:36:02 -04:00
skidau c70f31cca9 Merge pull request #1016 from lioncash/vardecl
Common: Inline declare some loop variables in ArmEmitter
2014-09-08 10:24:38 +10:00
Zhuowei Zhang e63f7c01a3 Fix twi/tw instructions being switched in Jit64 and JitArm; downgrade the ERROR_LOG printed when tw is ran in the interpreter to DEBUG 2014-09-07 13:35:18 -04:00
Zhuowei Zhang 6026a3f76f When loading the map file for a DOL/ELF file, extract only the filename from the DOL/ELF'S path 2014-09-07 11:58:32 -04:00
Zhuowei Zhang b70c0ae521 for tw/twi instructions, force propagated constant into a register to avoid "a1 cannot be immediate" errors from the emitter 2014-09-07 11:31:51 -04:00
Lioncash e218c38721 DolphinWX: Remove unnecessary unique_ptr get calls in InputConfigDiag 2014-09-07 01:59:56 -04:00
Lioncash a38093729e Common: Inline declare some loop variables in ArmEmitter 2014-09-07 00:26:26 -04:00
skidau 7863295555 Used a constant for the default high value. 2014-09-07 14:25:06 +10:00
skidau 8abe9622fd Route the wiimote speaker to the sound mixer (the host system's speakers). Emulated Wiimote speaker sounds will go to the host system's speakers. Real Wiimotes will continue to use their own speaker for Wiimote speaker sounds. All Wiimote speaker sound can be disabled by unchecking the "Enable Speaker Data" option.
Each emulated Wiimote can have its speaker routed from left to right via the "Speaker Pan" setting in the emulated wiimote settings dialog.  Use any value from -127 for leftmost to 127 for rightmost with 0 being the centre.

Added code in the InputConfig to use a spin control for non-boolean values.

Defaulted the setting of "Enable Speaker Data" to disabled.
2014-09-07 14:16:20 +10:00
skidau 3caab10df8 Hooked up the emulated Wiimote speaker.
The Wiimotes are positioned as follows:
Wiimote 0 = Center
Wiimote 1 = Left
Wiimote 2 = Right
Wiimote 3 = Center

The Wiimote speaker output can be disabled via the "Enable Speaker Data" checkbox in the Wiimote settings.
2014-09-07 14:16:20 +10:00
skidau b801c7f8f1 Merge pull request #1015 from zhuowei/update_debugger_menu_at_startup
Update debugger button states at startup to disable non-functional JIT menu items
2014-09-07 14:14:11 +10:00
skidau a21ad12f1e Merge pull request #1014 from RachelBryk/active-movie
Add an IsMovieActive function.
2014-09-07 14:05:59 +10:00
Rachel Bryk 5a163ec5e6 Add an IsMovieActive function.
Makes things a bit simpler, since this is a common check.
2014-09-06 23:44:25 -04:00
skidau 741c0e2d50 Merge pull request #587 from RachelBryk/recording-race
Don't allow starting recording in states that will cause a crash or othe...
2014-09-07 13:41:57 +10:00
Zhuowei Zhang e0a909c076 Update debugger button states at startup to disable non-functional JIT menu entries 2014-09-06 23:38:22 -04:00
skidau 213c9a6ba7 Merge pull request #1011 from zhuowei/remove_twi_spam
Downgrade the ERROR log printed when twi is executed in interpreter to DEBUG
2014-09-07 13:33:31 +10:00
skidau 28253f4538 Merge pull request #1013 from lioncash/string
AudioCommon: Use std::string for the filename parameter of StartLogAudio
2014-09-07 13:32:55 +10:00
Lioncash daddc3317e AudioCommon: Use std::string for the filename parameter of StartLogAudio 2014-09-06 23:26:08 -04:00
Zhuowei Zhang 2ac2cbbcf6 Downgrade the ERROR log printed when twi is executed in interpreter to DEBUG 2014-09-06 22:36:17 -04:00
Ryan Houdek cdd2bd6cdc Add a couple of asserts to the Arm64 JIT to make sure we can load everything. 2014-09-06 20:14:53 -05:00
Ryan Houdek 82dae72b63 Add AArch64 target to the backpatch header.
This fixes the issue of a million warnings spawning from this header.
2014-09-06 20:14:53 -05:00
Ryan Houdek 5233c87dec Add immediate support to the GPR cache. 2014-09-06 20:14:53 -05:00
Ryan Houdek 2b06257e16 Beginning of the AArch64 JIT branch.
This is the bare minimum required to run a few games on AArch64.
Was able to run starfield and Animal Crossing to the Nintendo logo.
QEmu emulation is literally the slowest thing in the world, it maxes out at around 12mhz on my Core i7-4930MX.
2014-09-06 20:14:52 -05:00
Ryan Houdek f107b5e176 [AArch64-emitter] Initial work on a emitter for 64bit ARM.
I've tested a few instruction encodings and am expecting most to work as long as one stays away from VFP/SIMD.
This implements mostly instructions to bring up an initial JIT with integer support.
This can be improved to allow ease of use functions in the future, dealing with the raw imms/immr encodings is probably the worst thing ever.
2014-09-06 20:13:44 -05:00
Shawn Hoffman 9a9fd8752a Quiet initialization order warning in CFrame 2014-09-06 13:01:24 -07:00
shuffle2 9302218a19 Merge pull request #851 from lioncash/logg
Common: Kill off duplicate log warning definitions
2014-09-06 12:35:19 -07:00
Ryan Houdek 01b90c1007 Fix ArmEmitter's asserts from failing to compile.
Changed them all from debug asserts to regular asserts, since they shouldn't only be run at debug time.
2014-09-06 15:11:39 -04:00
Lioncash 690ed8580c Common: Kill off duplicate log warning definitions
Also embed the log checks rather than using macros
2014-09-06 15:11:29 -04:00
shuffle2 85fd8c2bec Merge pull request #983 from lioncash/lol-str
Common: Fix a potential infinite loop in ReplaceAll
2014-09-06 12:00:23 -07:00
shuffle2 227b79bf84 Merge pull request #1004 from comex/warning-fixes-2
Two trivial warning fixes
2014-09-06 11:56:32 -07:00
shuffle2 1b23432d34 Merge pull request #990 from rohit-n/fix-formatting
Fix formatting
2014-09-06 11:54:17 -07:00
shuffle2 218adb5515 Merge pull request #1003 from lioncash/wii-save-import
DolphinWX: Fix Wii save importing
2014-09-06 11:52:33 -07:00
shuffle2 d0d6f70980 Merge pull request #996 from RachelBryk/clear-mc-bongos
Clear movie variables that might have been set from a previous run.
2014-09-06 11:46:21 -07:00
shuffle2 f2237ecd64 Merge pull request #985 from skidau/dsp-loop-hle
Moved the loop check back to a post-loop condition in DSP HLE AX ucode.
2014-09-06 11:44:27 -07:00
shuffle2 87b6c8d991 Merge pull request #988 from shuffle2/hide-menubar
Fix render to main crashing in fullscreen.
2014-09-06 11:43:50 -07:00
comex 30e577fda7 Revert "Merge pull request #993 from phire/fix_getOpInfo"
This reverts commit a8f724e7c2, reversing
changes made to 7a1eca149f.

For why I'm reverting this entirely, see pull request 997.
2014-09-06 13:46:17 -04:00
comex 48ef6fcad1 Fix signed/unsigned warning in GeckoCode.cpp.
No actual bug here.
2014-09-06 13:34:00 -04:00
comex 917c6d324a Remove unused functions in TextureDecoder. 2014-09-06 13:32:54 -04:00
comex 6c382f6627 Merge pull request #926 from comex/ppcstate-reg
PowerPCState register (and rationalize register usage, and add some registers to replace it)
2014-09-06 13:24:38 -04:00
comex 6fd0333c14 Symbolicize explicit uses of x86 registers where possible (GPRs only for now).
Uses are split into three categories:

- Arbitrary (except for size savings) - constants like RSCRATCH are
used.

- ABI (i.e. RAX as return value) - ABI_RETURN is used.

- Fixed by architecture (RCX shifts, RDX/RAX for some instructions) -
explicit register is kept.

In theory this allows the assignments to be modified easily.  I verified
that I was able to run Melee with all the registers changed, although
there may be issues if RSCRATCH[2] and ABI_PARAM{1,2} conflict.
2014-09-06 13:18:31 -04:00
comex 100a7ac97b Actually add RCX, plus RDI and RSI on Unix.
And switch to a register order that consistently prefers callee-save to
caller-save.  phire suggested putting rdi/rsi first, even though they're
caller-save, to save code space; this is more conservative and I can do
that later.
2014-09-06 13:16:21 -04:00
comex 8dea26762d Rationalize temporary register usage.
Rather than using a variety of registers including RSI, ABI_PARAM1
(either RCX or RDI), RCX, and RDX, the rule is:

- RDI and RSI are never used.  This allows them to be allocated on Unix,
bringing parity with Windows.

- RDX is a permanent temporary register along with RAX (and is thus not
FlushLocked).  It's used frequently enough that allocating it would
probably be a bad idea, as it would constantly get flushed.

- RCX is allocatable, but is flushed in two situations:
    - Non-immediate shifts (rlwnm), because x86 requires RCX to be used.
    - Paired single loads and stores, because they require three
    temporary registers: the helper functions take two integer
    arguments, and another register is used as an index to get the
    function address.
These should be relatively rare.

While we're at it, in stores, use the registers directly where possible
rather than always using temporaries (by making SafeWriteRegToReg
clobber less).  The address doesn't need to be clobbered in the usual
case, and on CPUs with MOVBE, neither does the value.

Oh, and get rid of a useless MEMCHECK.

This commit does not actually add new registers to the allocation order;
it is intended to test for any performance or correctness issues
separately.
2014-09-06 13:16:20 -04:00
comex 67cdb6e07a Factor code from ABI_CallFunctionRR and GetWriteTrampoline into a helper, and fix a special case.
The special case is where the registers are actually to be swapped (i.e.
func(ABI_PARAM2, ABI_PARAM1); this was previously impossible but would
be ugly not to handle anyway.
2014-09-06 13:16:20 -04:00
comex 487eb967eb Fix a bug with update loads in memcheck mode.
In two cases, my old code was using a temporary register but not saving
it properly; it basically worked by accident (an otherwise useless
FlushLock was causing CallerSavedRegistersInUse to think it was in use
by the GPR cache, even though it was actually a temporary).

I'm going to modify this in the next commit to use RDX, but I didn't
want to leave a broken revision in the middle.
2014-09-06 13:16:20 -04:00
comex 48891c6359 Reserve a register for ppcState.
The register is RBP, previously in the GPR allocation order.  The next
commit will investigate whether there are too few GPRs (now or before),
but for now there is no replacement.

Previously, it was accessed RIP relatively; using RBP, anything in the
first 0x100 bytes of ppcState (including all the GPRs) can be accessed
with three fewer bytes.  Code to access ppcState is generated constantly
(mostly by register save/load), so in principle, this should improve
instruction cache footprint significantly.  It seems that this makes a
significant performance difference in practice.

The vast majority of this commit is mechanically replacing
M(&PowerPC::ppcState.x) with a new macro PPCSTATE(x).

Version 2: gets most of the cases which were using the register access
macros.
2014-09-06 13:16:18 -04:00
Lioncash 5b837a11e4 DolphinWX: Fix Wii save importing
Calls to reserve don't resize the array to accomodate the given data size.
These vectors should be initialized with the size directly.
2014-09-06 12:44:11 -04:00
Pierre Bourdon d75bb614e7 Merge pull request #998 from waddlesplash/wx-fixup
Migrate PNGs from DolphinWX to the Data/Resources directory.
2014-09-06 18:07:20 +02:00
Pierre Bourdon 06bdc49957 Merge pull request #999 from lioncash/copy-assign
AudioCommon: Make WaveFileWriter inherit NonCopyable
2014-09-06 17:52:11 +02:00
Pierre Bourdon 2333532aab Merge pull request #1000 from lioncash/preproc
Common: Remove HAVE_CXX11_SYNTAX define from Common.h
2014-09-06 17:50:15 +02:00
Augustin Cavalier a15d9ed0b6 Migrate PNGs from DolphinWX to the Data/Sys/Resources directory.
* Aren't used by anything (yet) as DolphinWX compiles XPM versions into the build
 * Moved the .desktop file as well, adjusted INSTALL rule accordingly
2014-09-06 11:47:21 -04:00
Lioncash 1d66b1d3f4 Common: Remove HAVE_CXX11_SYNTAX define from Common.h
All the compilers we support have C++11 support now, so this isn't needed.
2014-09-06 11:32:19 -04:00
Lioncash 27cecf46a8 AudioCommon: Make WaveFileWriter inherit NonCopyable 2014-09-06 11:27:36 -04:00
Rohit Nirmal 629ceaf2b1 Split some parts of UpdateBoundingBox into multiple lines. Also,
fix issues causing failure on Lint.
2014-09-06 09:49:27 -05:00
Rachel Bryk 2a82b591e1 Clear movie variables that might have been set from a previous run. 2014-09-06 07:10:41 -04:00
skidau a8f724e7c2 Merge pull request #993 from phire/fix_getOpInfo
GetOpInfo: Assert on all invalid Ops.
2014-09-06 19:50:15 +10:00
Scott Mansell 23b54117cd GetOpInfo: Assert on all invalid Ops.
GetOpInfo was returning null pointers for invalid ops in subtables
instead of asserting an error. This was causing segfaults when the
jit tried to jit invalid code.
2014-09-06 20:09:30 +12:00
Scott Mansell 1963717855 Panic on invalid reads/writes for non-mmu games.
Previously it would fall through to the mmu code path, and raise a dsi
exception, which it would never check for, so it would continue
executing code silently.
2014-09-06 19:16:54 +12:00
Scott Mansell 96e92d33b7 Don't write to EXRAM if it doesn't exist.
Previously, if a gamecube game wrote to an EXRAM address, dolphin would
segfault.
2014-09-06 19:16:02 +12:00
Lioncash e035ac5591 Merge pull request #992 from phire/betterassert
Make Invalid instruction debug assert a non-debug assert.
2014-09-06 03:12:19 -04:00
Scott Mansell 50657548b1 Make Invalid instruction debug assert a non-debug assert.
Users need to be able to see this error message. Otherwise they can't
report bugs.
2014-09-06 19:04:34 +12:00
Rohit Nirmal 1ecb318bcc Fix some formatting (new lines on collapsed single-line conditionals,
new lines for opening braces).
2014-09-06 01:23:05 -05:00
Ryan Houdek b7f19ca740 Merge pull request #989 from lioncash/param
AudioCommon: Remove unused parameter from OpenSLESStream constructor
2014-09-06 01:15:59 -05:00
Ryan Houdek cc9e881844 Merge pull request #987 from rohit-n/more-dead-code
Remove more dead and redundant code.
2014-09-06 01:15:20 -05:00
Lioncash 019ef844d4 AudioCommon: Remove unused parameter from OpenSLESStream constructor 2014-09-06 01:42:56 -04:00
shuffle2 a831121683 Merge pull request #979 from shuffle2/fix-memcard-flush3
raw memcards: revert last change so flushes are still time-driven.
2014-09-05 22:27:12 -07:00
Shawn Hoffman 7308b809d8 Fix render to main crashing in fullscreen.
When hiding the menubar (for going fullscreen with render to main),
keep a functionally-duplicate menubar around for servicing menubar
actions.
2014-09-05 22:21:09 -07:00
Rohit Nirmal debe3999b5 Remove more dead and redundant code. 2014-09-05 23:22:48 -05:00
Shawn Hoffman 96d7b642f4 raw memcards: revert last change so flushes are still time-driven.
It turns out the actual slowdown was from memcpy'ing the entire
memcard buffer...not synchronization overhead or the flush itself.
2014-09-05 21:16:59 -07:00
skidau 9800252a28 Re-added the acc_end_reached logic for AXWii. 2014-09-06 11:57:37 +10:00
Dolphin Bot 387e1e3f21 Merge pull request #984 from FioraAeterna/fixmergedbclr
JIT: fix branch merging with bclr
2014-09-06 03:22:08 +02:00
skidau 0154b8edfd Moved the loop check back to a post-loop condition in DSP HLE AX ucode. This brings DSP HLE in line with DSP LLE and fixes issue 7627. This effectively reverts ef501137be which is not needed as the loop check is now corrected. 2014-09-06 11:02:32 +10:00
Fiora 4ec8f83a1a JIT: fix branch merging with bclr 2014-09-05 13:58:06 -07:00
lioncash 3e0c04a83e Common: Fix a potential infinite loop in ReplaceAll
Prior to this change, it was possible to cause an infinite loop by making the string to be replaced and the replacing string the same thing.

e.g.

std::string some_str = "test";
ReplaceAll(some_str, "test", "test");

This also changes the replacing in a way that doesn't require starting from the beginning of the string on each replacement iteration.
2014-09-05 15:12:17 -04:00
shuffle2 674494e472 Merge pull request #980 from rohit-n/remove-dead-code
Remove dead code.
2014-09-05 11:09:04 -07:00
shuffle2 0576046fdd Merge pull request #972 from Sonicadvance1/fix-intel-windows
Work around Intel's failings with buffer_storage
2014-09-05 11:06:49 -07:00
Fiora 801153301f Remove debug printf from earlier commit 2014-09-05 10:31:29 -07:00
Fiora 07e0c917c6 Revert "JIT64: optimize CA calculations" 2014-09-05 10:26:30 -07:00
Rohit Nirmal cf8d1c9197 FileHandlerARC: Remove FileHandlerARC. 2014-09-05 12:53:41 -04:00
Rohit Nirmal a3d9b22c27 BannerLoaderWii: Removed #if 0'd code. 2014-09-05 12:52:29 -04:00
comex 97420c6ec6 Merge pull request #852 from FioraAeterna/optimizeca
JIT64: optimize CA calculations
2014-09-05 11:52:02 -04:00
comex aa1df21bb6 Merge pull request #947 from FioraAeterna/rsqrte
JIT: implement frsqte
2014-09-05 11:48:00 -04:00
comex e7f03dd066 Merge pull request #948 from comex/vao-fix
Don't switch to a vertex array object of 0.
2014-09-05 11:46:28 -04:00
comex d4b1d42a21 Merge pull request #975 from FioraAeterna/jittimerinline
JIT: completely inline timer reading
2014-09-05 11:45:22 -04:00
shuffle2 3d88dfbad9 Merge pull request #701 from LPFaint99/memcard
GCI Folder: try to reserve space for new saves from the current game
2014-09-04 23:02:23 -07:00
shuffle2 ee450acb54 Merge pull request #973 from rohitnirmal/remove-using-namespace
Controller Interface: Remove "using namespace" in header file.
2014-09-04 22:58:22 -07:00
Ryan Houdek 30fef298bb Revert "Don't sleep in the event thread" 2014-09-05 00:50:40 -05:00
Fiora 2f9e9bf1fc JIT: completely inline timer reading
Should be a bit faster on games that heavily use the timer.
2014-09-04 21:55:36 -07:00