- remove unused variables
- reduce the scope where it makes sense
- correct limits (did you know that strcat()'s last parameter does not
include the \0 that is always added?)
- set some free()'d pointers to NULL
This breaks Linux stdout logging.
This reverts commit 7ac5b1f2f8, reversing
changes made to 9bc14012fc.
Revert "Merge pull request #77 from lioncash/remove-console"
This reverts commit 9bc14012fc, reversing
changes made to b18a33377d.
Conflicts:
Source/Core/Common/LogManager.cpp
Source/Core/DolphinWX/Frame.cpp
Source/Core/DolphinWX/FrameAui.cpp
Source/Core/DolphinWX/LogConfigWindow.cpp
Source/Core/DolphinWX/LogWindow.cpp
Note I do not mean the Logging window, but the console window.
It's literally rarely, if at all used, and offers less advantages over the built-in logging window (ie. it breaks on different locales: http://i.imgur.com/Cs92tQE.png)
This commit should remove all of the console logging.
Floating-point is complicated...
Some background: Denormals are floats that are too close to zero to be
stored in a normalized way (their exponent would need more bits). Since
they are stored unnormalized, they are hard to work with, even in
hardware. That's why both PowerPC and SSE can be configured to operate
in faster but non-standard-conpliant modes in which these numbers are
simply rounded ('flushed') to zero.
Internally, we do the same as the PowerPC CPU and store all floats in
double format. This means that for loading and storing singles we need a
conversion. The PowerPC CPU does this in hardware. We previously did
this using CVTSS2SD/CVTSD2SS. Unfortunately, these instructions are
considered arithmetic and therefore flush denormals to zero if non-IEEE
mode is active. This normally wouldn't be a problem since the next
arithmetic floating-point instruction would do the same anyway but as it
turns out some games actually use floating-point instructions for
copying arbitrary data.
My idea for fixing this problem was to use x87 instructions since the
x87 FPU never supported flush-to-zero and thus doesn't mangle denormals.
However, there is one more problem to deal with: SNaNs are automatically
converted to QNaNs (by setting the most-significant bit of the
fraction). I opted to fix this by manually resetting the QNaN bit of all
values with all-1s exponent.
I give up. Merging the ppc_fp branch has caused issues in numerous games
and I can't find the bug. I'm leaving this merged to enable easy
recompilation for people who would like to play games that benefit from
non-IEEE mode emulation (e.g. Starfox Assault).
MemArena mmaps the emulated memory from a file in order to get the same
mapping at multiple addresses. A file which, formerly, was located at a
static filename: it was unlinked after creation, but the open did not
use O_EXCL, so if two instances started up on the same system at just
the right time, they would get the same memory. Naturally, this caused
extremely mysterious crashes, but only in Netplay, where the game is
automatically started when the client receives a broadcast from the
server, so races are actually quite likely.
And switch to shm_open, because it fits the bill better and avoids any
issues with using /tmp.
bDAZ is now called bFlushToZero to better reflect what it's actually
used for.
I decided not to support any hardware-based flush-to-zero on systems
that don't support this for both inputs _and_ outputs. It makes the code
cleaner and the intersection of CPUs that support SSE2 but not DAZ
should be very small.
- Add support for std::set and std:pair.
- Switch from std::is_pod to std::is_trivially_copyable, to allow for
types that have constructors but trivial copy constructors. Easy,
except there are three different nonstandard versions of it required
on different platforms, in addition to the standard one.
* Currently there is no DEBUGFAST configuration. Defining DEBUGFAST as a preprocessor definition in Base.props (or a global header) enables it for now, pending a better method. This was done to make managing the build harder to screw up. However it may not even be an issue anymore with the new .props usage.
* D3DX11SaveTextureToFile usage is dropped and not replaced.
* If you have $(DXSDK_DIR) in your global property sheets (Microsoft.Cpp.$(PlatformName).user), you need to remove it. The build will error out with a message if it's configured incorrectly.
* If you are on Windows 8 or above, you no longer need the June 2010 DirectX SDK installed to build dolphin. If you are in this situation, it is still required if you want your built binaries to be able to use XAudio2 and XInput on previous Windows versions.
* GLew updated to 1.10.0
* compiler switches added: /volatile:iso, /d2Zi+
* LTCG available via msbuild property: DolphinRelease
* SDL updated to 2.0.0
* All Externals (excl. OpenAL and SDL) are built from source.
* Now uses STL version of std::{mutex,condition_variable,thread}
* Now uses Build as root directory for *all* intermediate files
* Binary directory is populated as post-build msbuild action
* .gitignore is simplified
* UnitTests project is no longer compiled
Note that before pushing those changes, they were initially tested in a branch, and passed the compilation testing. Sorry that I didn't catch this before.
This implements a partial JITIL based off of the JIT64IL. It's enough to run most games, albiet at a slow speed.
Implementing instructions for this IL is really simple since it basically is just enabling based on what is already in JIT64IL, and then enabling each individual IL instruction.
And fix some stuff up. It would probably be good to unify the stack
handling some more rather than having ABI_PushRegistersAndAdjustStack do
part of it and ABI_AlignStack the rest, causing unnecessary subtract
instructions on Linux x86 (only).
As part of that, change SafeLoadToEAX to SafeLoadToReg, and have JitIL
use that, which should fix fastmem on JitIL.
This should also fix a potential stack corruption issue with x86.
Also define _M_* in a common location, and clean up code that these
changes break (including DSPJit files that assume X86 yet are compiled
on ARM for some reason...)
- For GCC, use intrinsics that will work on ARM.
- Add AtomicExchangeAcquire.
- Make Atomic{Load,LoadAcquire,Store,StoreRelease} work for any suitable type.
- Call ABI_AlignStack even on x86-64.
- Have ABI_AlignStack respect the difference in current alignment
between the root JIT function, which has a prolog, and
ProtectFunction thunks, which do not. This was causing many games
to crash on start on OS X. Since this might otherwise mean changing
the stack pointer before every call...
- Have one prolog/epilog function rather than two (one of which
definitely did not do what it was thought to do), and make it
actually work like a normal one, so that the stack frame shows up
properly in the debugger. There should be no performance impact.
Changes a lot of parsing code which previously was not aware of the notion of
key/value, and operated only with raw lines. Now key/value is the default and
lines are handled as raw only if they do not contain =, or they start with $ or
+ (for Gecko/AR compatibility).
It isn't easily accessible with sigaction or Mach exceptions (well,
requires an additional system call in the latter), and isn't necessary.
(and get rid of the enum, because it's only used once, and the comments
are more expressive than enum names)
MSVC insisted on using a copy assignment where a move was intended and
ought to be used. This would have been caught, because the class in
question inherits from NonCopyable, which declares a move assignment
operator, which is supposed to delete the implicitly declared copy
assignment operator, but of course MSVC didn't do that either, causing a
class that should have been safe to be unsafe.
(Intertwined enough that's it's easier to do in one patch.)
(1) /dev/es did not support state save, which could cause crashes and
incorrect behavior after loading.
(2) NANDContentLoader tried to read all of a title's contents into
memory when it was first opened. Two issues:
- If any contents were missing, it bailed out. However, with DLC,
only some of the contents may be downloaded, as determined by the
permission bits in the ticket. Instead, return an appropriate error
when a content is accessed that doesn't exist on the filesystem
(don't bother checking the permission bits though).
- Everything was loaded into memory - even if it consisted of 3 GB of
songs, which caused Dolphin to lag out for quite a while (and would
fail on 32-bit). Instead, open content on demand.
This is required to be able to move objects that inherit from it.
(Note that this patch also #ifs out the class for the externals that
include it yet are compiled in pre-C++11 mode. It shouldn't matter,
since those externals don't use it.)
It's not enough to check for the CPUID bit to know if AVX is supported since
AVX requires OS support (new set of registers == more registers to be saved
when context switching). If the OS does not support, the cpuid bit will still
be set but using YMM registers will cause an illegal exception fault.
The MS INI parser and most other INI parsing libraries APIs only support
comments at the beginning of lines. Right now, some Game INI files use sections
like:
[OnFrame]#Add memory patches here
But these section headers are parsed separately, so this should not break
them.
This reverts commit 7aae9ccbc0.
Reasons:
- no test results have been provided to prove the usefulness of the patch
- broken coding style
- the author hasn't replied to any criticism
Also, some tab/space mismatches removed from VideoOGL, and some places I missed in VideoDX[number] projects.
Now, the Core is literally the only project with tab/space mismatches (on a large scale).
Probably better to keep that same-register-MOV assert useful. Also,
explicit type extension documents whats happening.
Internally, this boils down to the original MOV, but without the assert.
This commit mainly elaborates on some messages a little more. Also fixes some typos that slipped through the last commit.
A large change in text can be seen in EXI_DeviceMemoryCard.cpp. I added more info as to why a write to a memory card may fail. (This actually was a reason I was unable to write to a memcard recently).
Elaborations can be seen in WGL.cpp
I did change some comments in some files that I was correcting logging messages in, however this is only if I spot a typo or if an abbreviation is lower-cased. Even in that case, the amount of changes done to comments is very minimal.
# By Ryan Houdek (185) and others
# Via degasus (12) and others
* master: (625 commits)
Revert "Don't open/close file for every file operation." as it was crashing PokePark in Windows builds.
Array overrun fixed in VertexShaderCache for the DX11 plugin.
Fixed DSPTool build.
Windows build fix
Go back to assuming every HID device is a wiimote on Windows. Fixed issue 6117. Unfixed issue 6031.
VideoSoftware: Improve fog range adjustment by using less magic and more comments.
revert RasterFont for VideoSoftware
ogl: fix virtual xfb
Windows build fix from web interface...
Adjusted the audio loop criteria, using >= on the Wii and == on GC. This fixes the audio static that occurred in Wii games after hours of play.
Forced the exception check only for ARAM DMA transfers. Removed the Eternal Darkness boot hack and replaced it with an exception check.
VideoSoftware: Implement fog range adjustment, fixing issue 6147.
implement 4xSSAA for OGL
move ogl-only settings into backend
Fix description of disable fog, and move it to enhancements tab.
Reverted rd76ca5783743 as it was made obsolete by r1d550f4496e4.
Removed the tracking of the FIFO Writes as it was made obsolete by r1d550f4496e4.
Forced the external exception check to occur sooner by changing the downcount.
Mark the Direct3D9 backend deprecated.
Prefer D3D11 and OpenGL over D3D9 by default.
...
Conflicts:
CMakeLists.txt
Source/Core/Common/Common.vcxproj.filters
Source/Core/Common/Src/CommonPaths.h
Source/Core/Core/Core.vcxproj.filters
Source/Core/Core/Src/Core.cpp
Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_FileIO.cpp
Source/VSProps/Dolphin.Win32.props
Source/VSProps/Dolphin.x64.props
Some cleanup throughout related code. (try to make logic in ISOFile understandable by a human)
Encode strings in UTF-8 rather than somehow trying to determine the encoding in the GUI code.
Non-windows OSes temporarily broken.
The real file was never kept open for longer than a single operation so there was no point in dealing with it in DoState.
Saving the real path in the savestate was also probably a bad idea. Savestates should be a bit more portable now.
* OpenAL:
Changed SoundTouch to use float samples, allowing SSE to be used. Made the DPL2 decoder disabled by default. Re-added the audio hack used by the Accurate VBeam emulation option.
Added a latency setting to the audio settings. Removed the Sample Rate setting. It is now hardcoded to 48000hz (accurate audio timing).
Skipped timestretching if the emulator is running below 10% speed to prevent buffer overflows.
Removed the synchronisation between the CPU thread and the audio thread. Added code to detect and resume from buffer underruns. Disabled the ability to change the DPL2 option after the game has started. Fixed a memory leak that occurred in the DPL2 decoder. Fixed the OSX build.
Build fix
Added a Dolby Pro Logic II (DPL2) decoder in the OpenAL backend. DPL2 audio is decoded to 5.1. Code adapted from ffdshow. Added an option in the DSP settings to disable the DPL2 decoder in case Dolphin incorrectly detects a 5.1 audio system. Updated the OpenAL files to OpenAL Soft 1.15.1 in the Windows build.
Removed the system timing hack which was activated when the Accurate VBeam option was enabled.
Fixed the include directories in Audio Common for the Windows 32bit build.
Fixed the include directories in Audio Common for the Windows build.
Messed up the static include line
Fix include paths and compiling in Linux. Externals soundtouch is 1.7.1, while Ubuntu 12.10 is 1.6.x. Externals soundtouch is compiled with integer samples, while ubuntu is compiled with float samples. Float samples is probably the more common route. If you're going to use soundtouch, you should probably use SAMPLETYPE instead of explicitly choosing short. This probably breaks the windows build since its includes aren't setup.
OSX: typedef signed char BOOL
OSX build fix
Build fix
Added audio time stretching by using the SoundTouch library.
Implemented correct audio timing.
OpenAL for Windows initial commit