Commit Graph

12290 Commits

Author SHA1 Message Date
shuffle2 b5e18993f9 Merge pull request #964 from RachelBryk/typo
Fix a typo introduced by 5adbc83 in ControllerEmu.cpp.
2014-09-04 08:42:22 -07:00
lioncash 9f48f02514 Core: Make the tables in ARDecrypt.cpp static 2014-09-04 09:29:34 -04:00
skidau b2c743157d Merge pull request #969 from lioncash/windows-stuff
Common: Remove unused header from Thread.cpp
2014-09-04 23:22:52 +10:00
lioncash bd91e8b0c8 Common: Remove unused header from Thread.cpp
This define isn't even used in the Windows builds.
2014-09-04 09:15:18 -04:00
lioncash 4b329a0a75 Core: Fix variable prefixing of statics in Core.cpp
These aren't globals.
2014-09-04 08:26:15 -04:00
skidau 86db0bf8c3 Added the EmuRunningState check to the GPU thread's FIFO loop so that the GPU thread services any waiting save states. This is needed for games that have the Sync GPU option enabled. 2014-09-04 22:02:21 +10:00
Rachel Bryk 1cc153b4ed Fix a typo introduced by 5adbc83 in ControllerEmu.cpp. 2014-09-04 05:00:53 -04:00
Rachel Bryk 345b608d64 Change IniFile::Section::Set() with default value to use a template. 2014-09-04 03:29:49 -04:00
Fiora a63b9f6713 JIT: remove srawix fallback
As far as I can tell, this has literally been here since the start of the git
history; maybe it was stubbed out because the author wasn't sure it was right?

It matches the PPC/Broadway manuals perfectly, though.
2014-09-03 23:39:52 -07:00
LPFaint99 f6d89c5c98 GCI Folder: if there are too many files in the folder, try to leave free directory entries.
Rule: Load first 112 files, any remaining files in the folder are ignored unless they are the same gameid as the current game
2014-09-03 21:15:41 -07:00
shuffle2 46c18aa909 Merge pull request #836 from lioncash/initlist
Core: Initialize all JITIL RegInfo members in the initializer list.
2014-09-03 21:03:48 -07:00
shuffle2 329410074c Merge pull request #962 from lioncash/casing
OGL: Fix constant casing in RasterFont.
2014-09-03 21:03:29 -07:00
Rohit Nirmal 732bb7beb1 Change NULL to nullptr. 2014-09-03 22:22:12 -05:00
Lioncash ffe6bcf22f VSProps: Add C4351 to the list of disabled warnings in Base.props 2014-09-03 23:07:19 -04:00
Lioncash 956b0708b4 Core: Initialize all JITIL RegInfo members in the initializer list. 2014-09-03 23:06:05 -04:00
Lioncash cf390ba537 OGL: Make rasters 2D array static in RasterFont 2014-09-03 22:59:13 -04:00
Lioncash 89557f6c2f OGL: Fix constant casing in RasterFont 2014-09-03 22:59:05 -04:00
shuffle2 4fcb633df5 Merge pull request #961 from RachelBryk/logs
Read the config file before enabling logs.
2014-09-03 17:20:11 -07:00
Rachel Bryk 22d2c7d053 Read the config file before enabling logs. 2014-09-03 19:50:02 -04:00
shuffle2 1f6f01e2a0 Merge pull request #955 from skidau/geckocodes-mmio
Added code to patch the codehandler's MMIO address
2014-09-03 15:33:57 -07:00
shuffle2 05cd06539b Merge pull request #960 from lioncash/preproc-stuff
Common: Make TITLEID_SYSMENU a static const variable in NandPaths.h
2014-09-03 15:22:32 -07:00
shuffle2 29ef22fd81 Merge pull request #871 from shuffle2/hide-menubar
Re-implement hiding of the menubar in fullscreen with render to main.
2014-09-03 15:21:33 -07:00
Dolphin Bot 7a18add39f Merge pull request #959 from FioraAeterna/fixtimer
JIT: fix regression in timer patch
2014-09-04 00:20:28 +02:00
lioncash a687cc556b Common: Make TITLEID_SYSMENU a static const variable in NandPaths.h 2014-09-03 18:03:23 -04:00
skidau 0da22d687d Added code to patch the codehandler's MMIO address to the currently running system. Added code to detect the location of where the code list should be. This allows any Gecko code handler to be used. Replace the codehandler.bin file with the code handler to be used (e.g. codehandleronly.bin). 2014-09-04 07:44:45 +10:00
Fiora 068b5c26f4 JIT: fix regression in timer patch 2014-09-03 14:36:38 -07:00
Fiora 1b50f9df14 JIT: implement fres
Mostly a straightforward translation of the interpreter code, with a few
tricksy optimizations and fallbacks for rare paths.
2014-09-03 12:15:30 -07:00
Fiora c72a133206 JIT: implement frsqrte
Mostly a straightforward translation of the interpreter code, with a few
tricksy optimizations and fallbacks for rare paths.
2014-09-03 11:21:04 -07:00
Dolphin Bot e1248599eb Merge pull request #868 from FioraAeterna/bmi
x64Emitter: add BMI1/BMI2 support
2014-09-03 19:24:27 +02:00
lioncash f69e6ef16f Common: Remove unnecessary define check in Log2 2014-09-03 13:04:48 -04:00
Fiora 5088a2b4e2 x64Emitter: add BMI1/BMI2 support
TZCNT and LZCNT use a completely different encoding scheme, so they should
probably go in a separate patch.

Also add some tests.
2014-09-03 10:04:01 -07:00
skidau 08715167a8 Added code to patch the codehandler's MMIO address to the currently running system. Added code to detect the location of where the code list should be. This allows any Gecko code handler to be used. Replace the codehandler.bin file with the code handler to be used (e.g. codehandleronly.bin). 2014-09-04 00:48:52 +10:00
shuffle2 b583879c2a Merge pull request #944 from delroth/x64emittertest
x64EmitterTest: Fake support for all CPU extensions
2014-09-03 03:37:46 -07:00
Shawn Hoffman fd2343e431 Re-implement hiding of the menubar in fullscreen with render to main. 2014-09-03 03:02:13 -07:00
shuffle2 46c1a0f03b Merge pull request #733 from lioncash/readability
DolphinWX: More readable variable names in BreakpointView
2014-09-03 01:28:17 -07:00
Shawn Hoffman 30dd2809a7 Prevent changing adapters during emulation and VideoConfigDiag cleanup
Author: https://github.com/Anti-Ultimate/dolphin
2014-09-03 00:35:23 -07:00
Dolphin Bot 6e2b873ec1 Merge pull request #781 from RachelBryk/ControlState
Change ControlState typedef to double, and change all related floats/dou...
2014-09-03 09:15:51 +02:00
shuffle2 db84a22109 Merge pull request #770 from lioncash/panic
Core: Fix case where a panic alert wouldn't be shown in MemoryUtil.cpp
2014-09-03 00:10:12 -07:00
shuffle2 60a772c5e8 Merge pull request #901 from Sonicadvance1/64bit-android-cmake
Update the android cmake toolchain file to support 64bit.
2014-09-03 00:09:03 -07:00
Rachel Bryk 5adbc83453 Change ControlState typedef to double, and change all related floats/doubles to use it.
Fixes an off by 1 issue related to double->float->double conversion, and eliminates numerous warnings.
2014-09-03 03:08:09 -04:00
comex 64575d565a Merge pull request #923 from FioraAeterna/fixcallersave
JIT: Fix caller-save registers on WIN64
2014-09-03 02:27:44 -04:00
Dolphin Bot e2dfa603a0 Merge pull request #891 from RachelBryk/netplay-time
Allow system time to move forward during netplay.
2014-09-03 08:26:51 +02:00
comex 51a5311d6a Merge pull request #949 from comex/eviction-policy
Evict registers from the cache based on LRU.
2014-09-03 02:22:45 -04:00
shuffle2 50879f5624 Merge pull request #905 from RachelBryk/status-bar-messages
Add OSD messages back to status bar.
2014-09-02 23:21:58 -07:00
shuffle2 de71db4864 Merge pull request #925 from shuffle2/xbcd-compat
Revert changes to how DInput filters out XInput devices.
2014-09-02 23:21:47 -07:00
shuffle2 532b7bb7da Merge pull request #893 from rohitnirmal/scan-build-fixes
Scan build fixes
2014-09-02 23:15:18 -07:00
shuffle2 d20f5fb861 Merge pull request #946 from ChuckRozhon/fix_cast_bug
Fixed bug introduced in PR#803 caused by casting
2014-09-02 22:58:53 -07:00
shuffle2 5468b535c1 Merge pull request #941 from FioraAeterna/eaxemit
x64Emitter: add support for shorter EAX forms of instructions
2014-09-02 22:54:53 -07:00
Ryan Houdek 1ad1a9062a Remove PowerPCState::DebugCount.
This value was "helpful" for debugging when the stack got corrupted.
Helpful that if gpr[1](Which is the stack pointer with PPC ABI) is zero then the interpreter would spam huge amounts of annoy text saying that we
managed to get in to a "corrupted" state.
This is incremented every instruction on the interpreter, or every block run on the JIT64....Only if debugging is enabled(JIT64 it is a const
variable)
The message is only outputted when interpreter is used and debugging is enabled.
2014-09-03 00:26:57 -05:00
comex f5c7f676dc Evict registers from the cache based on LRU.
The old method would always evict the first suitable register, i.e. the
same register every time once the cache got full.  The cache doesn't get
terribly often, but the result is pathological...
2014-09-03 01:06:14 -04:00
Dolphin Bot fa29b18e3e Merge pull request #840 from FioraAeterna/jittimer
JIT: implement timer support in mtspr
2014-09-03 07:01:20 +02:00
Fiora 9e4419e786 x64Emitter: add support for shorter EAX forms of instructions
Should save a few bytes of code size here and there.
2014-09-02 21:52:41 -07:00
Fiora 6875d911f1 JIT: merge paired timebase reads where possible
Combined with the previous patch, ~1% faster overall on F-Zero GX.
2014-09-02 21:49:24 -07:00
Fiora 816d056657 JIT: implement timer support in mtspr
Faster, of course, since we avoid the interpreter, but also means we can
get more a more accurate timer in long blocks by adding the offset from the
start of the block to the retrieved timer. I don't know if this will actually
fix any issues, but it's more correct and a nearly-free improvement.
2014-09-02 21:47:45 -07:00
comex b48e059173 Don't switch to a vertex array object of 0.
This causes glDrawArrays to fail in core profile, and thus on OS X, see:

http://renderingpipeline.com/2012/03/attribute-less-rendering/

There must be something bound, even though it is not used.

Fixes #7599.  I'm not sure this is actually the best way to fix it,
since AFAICT it makes a nonobvious assumption that *something* will be
bound before the first attributeless rendering in
TextureConverter::DecodeToTexture, but it's what degasus suggested and
seems to work.
2014-09-03 00:10:45 -04:00
comex dd5be7c0dc Merge pull request #924 from comex/fifo-command-runnable
Refactor opcode decoding a bit to kill FifoCommandRunnable.
2014-09-02 23:27:30 -04:00
Charles Rozhon 0e5fde52ac Fixed bug introduced in PR#803 caused by casting
Also changed casts to C++ style casts to removed some of the ambiguity.
2014-09-02 21:50:43 -05:00
Pierre Bourdon cee71afce5 x64EmitterTest: Fake support for all CPU extensions 2014-09-03 02:26:11 +02:00
Ryan Houdek 1bc246735b Add some static_asserts to the Arm32 JIT to make sure ppcState is sane. 2014-09-02 18:38:42 -05:00
Fiora 6655c7775e JIT: Fix callee-save registers on WIN64 2014-09-02 10:56:14 -07:00
Lioncash e10b0d1008 Merge pull request #930 from skidau/openal-seq-ms
Removed the auto setting of SEQUENCE_MS because the synchronised audio c...
2014-09-02 09:56:46 -04:00
Pierre Bourdon ddb2aefedf Merge pull request #904 from FioraAeterna/dcbz
JIT64: try enabling dcbz again
2014-09-02 15:41:40 +02:00
Pierre Bourdon 5b4f1fe92c UnitTests: Add tests for the x64Emitter 2014-09-02 10:17:32 +02:00
Pierre Bourdon e72146d19c x64Emitter: Do not assert-fail on redundant MOVs, instead show an error log 2014-09-02 10:17:32 +02:00
Pierre Bourdon a79ced2fc2 x64Emitter: Make it clear for both SSE to int conv that X64 regs are expected 2014-09-02 09:55:47 +02:00
Pierre Bourdon c428c5999f x64Emitter: UNPCKLPS/HPS are now tested 2014-09-02 09:53:00 +02:00
Pierre Bourdon cc0b048c0b x64Emitter: Support FLD/FSTP with 80 bits operands 2014-09-02 09:52:59 +02:00
Pierre Bourdon f99f302c91 x64Emitter: assert instead of crashing when generating MOVZX with a wrong size 2014-09-02 09:52:04 +02:00
Pierre Bourdon b1738b60fc x64Emitter: Fix MUL with AH/BH/CH/DH registers. 2014-09-02 09:52:04 +02:00
Pierre Bourdon f0e8b1fda8 x64Emitter: Error out on 8 bits CMOV, and emit 16 bits CMOV properly 2014-09-02 09:52:04 +02:00
Pierre Bourdon d4ec9737bd x64Emitter: Assert when using an invalid POP instead of generating an INT3 2014-09-02 09:52:04 +02:00
Pierre Bourdon 9c4daac3a4 x64Emitter: RDTSC now without a typo'd name 2014-09-02 09:52:04 +02:00
Pierre Bourdon 88af225070 x64Emitter: Remove a declared function that is never implemented 2014-09-02 09:52:04 +02:00
shuffle2 cc6db8cf26 Merge pull request #939 from shuffle2/fix-memcard-flush2
move the decision to delay raw memcard flushes out of the thread.
2014-09-02 00:28:31 -07:00
Pierre Bourdon 5941653d47 Merge pull request #920 from shuffle2/msvc-gtest
Provide a way to build and run unittests on Windows
2014-09-02 07:40:49 +02:00
Shawn Hoffman 44a1a7cdbe move the decision to delay raw memcard flushes out of the thread.
This allows the flush to work better with games which hammer
memcard accesses over short periods as it delays more of the work.
2014-09-01 22:38:31 -07:00
Pierre Bourdon 9b10d36a85 Merge pull request #938 from lioncash/statics
Common: Make the LUTs in ColorUtil static
2014-09-02 07:36:17 +02:00
Pierre Bourdon 15e19e98cb Merge pull request #937 from lioncash/namespaces
Common: Remove unnecessary "using namespace Gen;" from x64emitter
2014-09-02 07:35:26 +02:00
Pierre Bourdon 8913c71dc1 Merge pull request #936 from lioncash/printf
DolphinWX: Change a wx Printf call to a Format call
2014-09-02 07:34:28 +02:00
Pierre Bourdon 7fb8572765 Merge pull request #935 from lioncash/snprintf
DolphinWX: Get rid of an snprintf call in ISOProperties
2014-09-02 07:33:56 +02:00
Lioncash 824a0a19f1 Common: Make the LUTs in ColorUtil static 2014-09-02 00:52:13 -04:00
Shawn Hoffman 839cace5ff msvc: get UnitTests compiling
Choose it from VS or pass /p:RunUnitTests=true to msbuild
2014-09-01 21:27:45 -07:00
Shawn Hoffman 0625b5defb windows: make failure to load hid.dll or bthprops.cpl not pop a msgbox, and not crash 2014-09-01 21:27:44 -07:00
Shawn Hoffman 266992684d msvc: remove some remnants of SDL and DSound from projects and general cleanup. 2014-09-01 21:27:44 -07:00
skidau d287a278cf Merge pull request #880 from RachelBryk/log
Disable all logs by default.
2014-09-02 13:50:26 +10:00
Dolphin Bot e5705a9273 Merge pull request #908 from FioraAeterna/fixenhancedbat
MMU: fix enhanced BAT support
2014-09-02 05:46:03 +02:00
Fiora 3aa40dab00 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-01 20:41:48 -07:00
Fiora a40278b1c4 JIT64: support merged branching for rlwinmx, too
Not quite as common a branch instruction as cmpwi, but close.
2014-09-01 20:41:12 -07:00
Fiora 10d691a277 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-01 20:41:12 -07:00
Fiora 805be80f12 JIT64: Optimize carry handling
Carries are rather common and unpredictable, so do them branchlessly wherever
we can.
2014-09-01 20:41:11 -07:00
Fiora ee24d4714a 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-01 20:41:11 -07:00
Fiora ad51fc7c4b JIT64: use xor instead of mov for loading a zero regcache immediate 2014-09-01 20:41:10 -07:00
Fiora 27996a65cf JIT64: use LEA for the "a = b + imm" case of addi 2014-09-01 20:41:10 -07:00
Fiora cd0c52b537 JIT64: avoid using LEA for adds when not necessary 2014-09-01 20:41:10 -07:00
Fiora 355850f499 JIT64: optimize sign/zero-extend
Also remove some comments that no longer apply since x86_32 was dropped.
2014-09-01 20:41:09 -07:00
Fiora 61af91ff16 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-01 20:41:09 -07:00
Fiora 41c3dde737 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-01 20:41:08 -07:00
Fiora 58dc802ce2 JIT64: optimize multiplication by immediate constants
Factor out common code and handle a few more common cases.
2014-09-01 20:41:08 -07:00
Fiora b51aa4fa89 Rename Log2 and add IsPow2 to MathUtils for future use
Also remove unused pow2/pow2f functions.
2014-09-01 20:41:07 -07:00
Lioncash ec9fc6bfc1 Common: Remove unnecessary "using namespace Gen;" from x64emitter 2014-09-01 23:10:56 -04:00