Commit graph

843 commits

Author SHA1 Message Date
pierre
a82a61c53a Core/DSPCore: Fix more memory accesses for linux x64
Core/Common: Add more asserts for too large displacements


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6595 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-16 22:38:31 +00:00
NeoBrainX
aa226aaf41 Revert most stuff from r6517 and revert r6501.
PixelShaderGen changes broke Mario Kart Wii, ClearScreen changes broke Super Mario Sunshine.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6592 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-16 17:40:45 +00:00
skidau
f67afb4fca LLE JIT:
* Optimised the updating of g_dsp.pc in the compile loop (code by kiesel-stein)
* Added JIT version of LRI (code by kiesel-stein)
* Added JIT versions of the branch instructions (code by Jack Frost)
* DSP_SendAIBuffer fix (code by Mylek)
* Marked instructions that update g_dsp.pc in the DSP table and updated PC based on the table (speed up)
* Fixed the signed bits not being set properly in the addr instruction
* Created a MainOpFallback function to use interpreted versions of the instructions if necessary (code by kiesel-stein)
* Disabled the jit versions of subarn and addarn as they are slowing down NSMBW

The above work in both x86 and x64 modes.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6582 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-15 01:42:32 +00:00
Glenn Rice
35fef1f173 Revert back to LogTypes. Fixes issue 3668.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6580 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-14 17:52:01 +00:00
Soren Jorvang
738e5e55ee Cast size_t to unsigned long for printf to deal with (32-bit)
systems where size_t is typedef int.

It's either this or use the C99 %zu but while we can probably
safely assume C99 compilers, I am not at all sure that that's the
case for stdio libraries and this solution is fairly low-impact.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6535 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-05 18:22:41 +00:00
Soren Jorvang
c2f84fdccb CLRun is now used everywhere but OS X.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6532 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-05 16:57:32 +00:00
Soren Jorvang
f169def36f First pass at dealing with different size_t/off_t sizes in C90 environments.
Most of the code dealing with the LogTypes namespace was C which lead to a
lot of nonsensical casting, so I have dumbed LOG_TYPE and LOG_LEVEL down to
plain C even though the move of wiiuse into Source means we don't currently
call GenericLog from C.

Set logging threshold to MAX_LOGLEVEL at startup so debug builds will also
p  rint debugging messages before the GUI is running.

For some reason the way we use SetDefaultStyle doesn't play nice with wx 2.9
so we just get the default black text on a black background. Using a gray
background works around that problem, but I found it to also be much easier
on the eyes so I have switched the background color on all versions.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6528 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-05 15:59:11 +00:00
Shawn Hoffman
9da4fe086b allow gcc to check the format of args being passed to MsgAlert and GenericLog. Fixed nearly all warnings that arose from this, as well as some preexisting ones (some were actually crashes and/or bugs...)
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6522 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-05 09:04:34 +00:00
Rodolfo Osvaldo Bogado
6df84ddc31 little fix for r6517
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6520 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-05 03:36:37 +00:00
Rodolfo Osvaldo Bogado
c8305a7b7d two fixes in this commit:
first fix for issues introduced in sms in r6501, please test for a regressions in The Calling
Second Fix for Issue 3539, by making pixel Dept calculation an option. in games with this issue Enabling pixel depth will solve the issue, in other games disabling the option will not cause speed lost
some cleanup in dlist cache

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6517 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-04 17:58:33 +00:00
Shawn Hoffman
e70e623624 Second attempt at issue 3458. Fixes issue 3458.
Replaces all occurrences of ftell and fseek with ftello and fseeko, respectively. This matters on non-win32 where only these names are altered by the _FILE_OFFSET_BITS define. Win32 still just maps the funcs to ftelli64/fseeki64.
Also add some File::GetSize I had skipped in my last commit.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6515 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-04 03:50:55 +00:00
Soren Jorvang
63d690e94c 4.4BSD derived OS'es always have 64-bit file sizes.
XXX This should probably be in CommonFuncs.h or something.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6512 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-03 14:56:55 +00:00
Shawn Hoffman
3d441febda Attempt to fix issue r3458. I don't have a 32bit linux install, however I know it will at least fix compressing. Please test if uncompressed games run.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6510 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-03 12:42:01 +00:00
donkopunchstania
f91ac92895 Change comparison in specular light function. Fixes issue 1258.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6505 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-01 04:50:25 +00:00
donkopunchstania
1f660de7e5 Avoid repeatedly asserting in SWG plugin when matrix indices don't match. Small change to the transform unit to avoid some unnecessary work. Check if Q is zero before dividing UV coordinates by it. Fixes issue 3454.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6504 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-01 04:26:21 +00:00
Glenn Rice
eda716b164 Fix some linkage issues with the cmake build. This should fix issue 3596.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6497 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-30 01:20:05 +00:00
NeoBrainX
76b9e975d5 DX11: Fix mipmaps. Someone forgot creating them at the proper time ;P
DX11: Fix a DX11 debug runtime error caused by the vertex shader output signature and the pixel shader input signature not matching if per-pixel lighting is disabled. Someone forgot disabling those pixel shader parameters ;P
DX11: Enable use of dynamic textures wherever possible.
DX9: Remove two unnecessary TODOs. Someone forgot removing those since they've been obsolete for a long time ;P

Anyway, at least working mipmaps and dynamic textures should increase DX11 performance a bit. And "a bit" is more than my usual "marginally" ;)

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6473 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-24 19:13:19 +00:00
gnick79
b197f8600c * Updating Linear DiskCache version in reflection with changes introduced in r6463
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6466 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-23 15:51:08 +00:00
Glenn Rice
cefaa393e6 Layout should not be called until after a sizer is inserted into its parent. This fixes the "gtk_widget_size_allocate(): attempt to allocate widget with width -5 and height 17" type console warnings that are annoying on linux. If there are issues with this on other platforms let me know, but there shouldn't be.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6459 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-22 15:25:59 +00:00
Glenn Rice
a3c46990f6 Revert to gettimeofday on posix systems. I give up.
Temporary fix for OSX in JitIL.cpp
This revision should build on OSX again.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6457 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-22 02:42:53 +00:00
Glenn Rice
222c2d1297 Revert revision 6464. _POSIX_MONOTONIC_CLOCK is not used in that way.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6455 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-21 21:31:37 +00:00
Soren Jorvang
92fe490270 POSIX feature symbols can be defined even if not implemented.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6454 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-21 20:45:42 +00:00
Glenn Rice
39a4781a5f Check if CLOCK_MONOTONIC is supported before using clock_gettime.
Fix the cmake check to see if -Wno-unused-result is supported by the compiler.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6453 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-21 19:13:55 +00:00
Glenn Rice
86dc8d09fe For the cmake write generate the svnrev.h file in the build directory instead of in the source so that a proper out-of-source build can be done. Fixes issue 3528.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6449 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-20 20:20:12 +00:00
Glenn Rice
7788bac40c Fix ogl screenshots for windows.
Fix the macosx build (perhaps).
This changes the JitIL timed profiling to using assembly language to obtain the time.  It does seem to be faster.  Not sure if it will work on macosx, but if it does it has the necessary precision that gettimeofday does not have.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6448 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-20 03:24:51 +00:00
Glenn Rice
ef55177ed6 Implement JitIL profiling on linux. I also tried implementing __rdtsc using assembly and didn't really see a speed improvement so went with clock_gettime.
Also changed other gettimeofday calls to clock_gettime, which is supposedly more accurate.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6447 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-20 00:22:56 +00:00
Glenn Rice
a279b391cc Make Linux/MacOSX system checks correct in the cmake build. UNIX is true on both linux and osx. The cmake build probably still doesn't work on MacOSX though.
Also added an option to explicitly disable building with MPG framedumps.  To use it add -DENCODE_FRAMEDUMPS=OFF to cmake on the command line.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6429 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-17 01:03:39 +00:00
Glenn Rice
0644295f3d Build fix. Remove some obsolete code. Fix some compiler warnings.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6428 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-16 21:14:19 +00:00
Jordan Woyak
73ed235fd1 Changed macro for disallowing copy-ctor and =operator into an inheritable class. Removed IrPointer.ini (no longer used)
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6421 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-15 05:29:10 +00:00
Jordan Woyak
b4ffd640b7 Made LinearDiskCache a template class. Keys are now some POD type (fixed size). Eliminates casting and key size checking.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6420 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-15 05:22:03 +00:00
Soren Jorvang
02edf66b49 Simplify OpenCL compile-time detection on OS X.
Turn wiiuse io_osx.m into Objective-C++.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6398 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-13 20:02:01 +00:00
Soren Jorvang
146ddff550 Simplify GenericLog() for C/C++.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6391 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-13 00:10:00 +00:00
Glenn Rice
c0bdf4de81 Several little things.
The C version of the GenericLog was being used in both C and C++ branches of the code.
Parent panic alerts by the main_frame so that those windows get the icon too.
Fix a couple of compiler warnings.
Added some checks for libraries in the cmake build.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6385 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-12 05:05:27 +00:00
Glenn Rice
adbd7fbd4a Fix StringFromFormat hopefully for the last time. This should be more efficient than before. Thanks to shuffle2 for the windows code.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6379 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-11 04:59:50 +00:00
Glenn Rice
072a698856 The change to StringFromFormat was overwriting the last character with the NULL terminating character.
Also update a deprecated function call.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6374 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-10 23:23:12 +00:00
Jordan Woyak
6ece147568 StringUtil fix
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6370 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-10 06:10:43 +00:00
Glenn Rice
895f1500a5 Fix for my tweak in the last commit. I knew I had that working at one point.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6369 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-10 05:18:20 +00:00
Glenn Rice
92a5b72b42 Linux build fix. stricmp does not exist on linux. Also a small tweak to the StringFromFormat routine.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6368 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-10 04:44:25 +00:00
Jordan Woyak
26f84c1e74 StringUtil cleanup. Nothing seems broken.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6367 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-10 04:12:31 +00:00
Glenn Rice
7b34def0fc A couple of changes to the cmake build system.
First:  Added a DESTDIR option for package building.
Second:  Change the OpenCL setup.  On both linux and windows use CLRun.  I completely removed the option here.  If CLRun works on MacOSX this should be done there as well, and this change implemented in the scons build also.  Then we could remove the HAVE_OPENCL and the new USE_CLRUN definitions.  Then we will finally have the dynamic detection of opencl set up cross platform.
On a side note, it doesn't seem that the program loaded from TextureDecoder.cl compiles or runs.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6366 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-10 01:59:53 +00:00
Glenn Rice
2383e2b0f5 Improve the compiler flags for the cmake build system. -fPIC only needs to be specified for static libraries that are linked into shared libraries. cmake automatically uses -fPIC for shared libraries. Also ported several other needed compiler flags from the scons build. Set up the debug build, enabled with "-D CMAKE_BUILD_TYPE=Release", to work with wxWidgets debugging.
Note that most users will want to use the release build to get a -O3 optimized build.  This can be enabled by adding "-D CMAKE_BUILD_TYPE=Release".


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6344 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-05 02:23:24 +00:00
Glenn Rice
3aff478b3a Add the c++ definition HAVE_CONFIG_H in the scons build and check it before including config.h so the cmake build system doesn't need to worry about conflicts from that file if it exists.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6342 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-04 20:33:45 +00:00
Glenn Rice
4ac40687ea Okay. Big (possible controversial changes) to the cmake build system.
I am officially killing the local/global build crap.  The "local" build thing should never have existed.  There is now only one build that is essentially what the "global" build was before.  This is the way a proper build system should work.  I will soon write a wiki page to describe how to properly use the cmake build system, and how you can still set things up to get the "local" build from before.  However, that type of build should be considered a developer tool, and not the way that dolphin-emu should be built.
Briefly, to use cmake now do the following from the toplevel of dolphin's source:
mkdir Builddir
cd Builddir
cmake ..
make
make install (you may need superuser privileges)

Note that the scons build is still building dolphin in the old way.



git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6341 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-04 13:47:17 +00:00
NeoBrainX
b75a805859 Add an experimental CMake build system as a possible replacement for SCons. Only tested on Linux, should work on OS X and Windows in the future as well though.
Some notes about this:
- config.h doesn't get written yet, so you'll have to use one generated by SCons
- dependency checking isn't really implemented, yet. Just some basic checks for OpenGL or ALSA, we need something more sophisticated though.
- the OpenGL plugin fails to load for some reason which I can't debug right now due to the libc debuginfo package version in openSUSE not matching the runtime packages
- there's even some support for generating install packages (rpm/deb/.. packages, NSIS installer, etc). It doesn't work properly right now though, since some paths seem to be hardcoded into Dolphin's source
- probably lots of other stuff I forgot... Just take a look at all the TODOs in the CMakeLists.txt files for more information ;P

Additionally, I added various files to the svn:ignore list.

tl;dr: Unless you are a dev or you're building binary packages, this commit shouldn't bother you :P


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6326 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-01 15:47:02 +00:00
Soren Jorvang
78ab1c0f3f More robust way of building on 10.6 for a 10.5+ target.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6314 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-10-24 20:07:12 +00:00
Nolan Check
b71cd5f383 A couple minor things I have left over
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6312 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-10-24 19:41:10 +00:00
skidau
56e79aa87d Added a safer OpenCL shutdown procedure.
Fixes issue 3015.
Fixes issue 3089.
Fixes issue 3099.
Fixes issue 3360.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6307 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-10-24 04:17:36 +00:00
Nolan Check
2ec3db44ed OpenGL plugin: Support for dual-source blending, CURRENTLY DISABLED. It doesn't work yet. To fix it, we may need to convert all our shaders to GLSL so that we can use glBindFragDataLocation.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6306 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-10-23 19:55:19 +00:00
Nolan Check
95cfca08e2 Put infrastructure in place so that other plugins may support dual-source blending.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6296 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-10-21 05:22:18 +00:00
Nolan Check
cb453a0fb3 DX11 plugin: Do destination-alpha in a single pass. No more drawing the same geometry twice! SMG is faster now because it uses destination-alpha extensively. This uses dual-source color blending, a DirectX 10-level feature. The equivalent OpenGL function comes from the GL_ARB_blend_func_extended extension, which was made core in OpenGL 3.3.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6294 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-10-20 03:11:22 +00:00