Commit Graph

519 Commits

Author SHA1 Message Date
nitsuja- 22551a0a8a a few minor code fixes.
also added a user file that should simplify running from VS for newcomers

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5338 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-04-12 02:00:15 +00:00
Glenn Rice 33a64d5db0 Big restructuring of how the video plugin works. In linux and windows you shouldn't see a change in the functionality; however, there are changes in how render to main or not, and fullscreen modes, and such are handled. Input is largely restructured for the video plugin. It is now handled by the host. Keys for pausing and changing fullscreen are configurable. More will probably be later. This is probably classified as highly experimental.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5336 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-04-12 01:33:10 +00:00
nodchip 32794fc028 VideoCommon: Fixed the bug that some texture become black in SSSE3.1 codes.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5309 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-04-10 01:37:51 +00:00
nodchip 956b8eb54d VideoCommon: Added automatic selection routines for SSSE3/SSE4.1 codes. It selects SSSE3/SSE4.1 codes only if a proper preprocessor definition is defined and the target cpu supports SSSE3/SSE4.1. The selection routines in VertexLoader_* use function pointers. TextureDecoder uses a combination of "#if" and "if" statements.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5302 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-04-09 15:13:42 +00:00
nodchip 6136c94de5 VideoCommon: merged SSSE3/SSE4.1 codes. Added some additional SSSE3/SSE4.1 codes which will be used in "The Legend of Zelda: Twilight Princess".
These codes don't work unless "_M_SSE=0x301", for SSSE3, or "_M_SSE=0x401", for SSE4.1, is defined as a preprocessor definition.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5300 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-04-09 03:02:12 +00:00
Jordan Woyak 758bcf17cb Tweaked the widescreen hack: It now "hacks" to and from any aspect ratio, not just from 4:3 to 16:9. When "Stretch to Window" is chosen, the aspect ratio will be adjusted to 5:4, 16:10, or anything (whatever the aspect ratio of the window is). Works for 4:3 and 16:9 games.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5280 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-04-04 22:52:27 +00:00
Rodolfo Osvaldo Bogado a4736f7f6b back to limit vps instead of fps as this fix fps limit and now it works correctly as now the sync between the plug in and the core is almost correct.
fixed fps display in the top bar, now it shows the real fps of the game.
some code clean up and some corrections to make everything work right in the reference renderer.
multiples xfb now is broken even in single core as is was not an error caused by dual core, i really dono where the error is,everything looks correct but if you test a game with multiples xfb or the ipl you will see the error.
ector if you can take a look at he code and throw me some ideas i'll thank you.
please test.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5272 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-04-03 22:22:55 +00:00
skidau 962fef0626 Fixed bug where the projection hack setting was not being saved in the Game Properties dialog.
Removed the obsolete projection hacks:

* Final Fantasy CC Echo of Time
* Harvest Moon Magical Melody
* Baten Kaitos
* Baten Kaitos Origin
* Skies of Arcadia

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5271 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-04-02 21:28:56 +00:00
Sonicadvance1 e0b4cbcdae Another one bites the dust
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5263 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-04-01 10:06:43 +00:00
donkopunchstania 70627c5652 Extend the OGL virtual XFB to handle games that use multiple XFBs to make a frame. This should allow games that require the XFB to work without using a real XFB in RAM which is slow and limited to the original resolution. To use this enhancement you must check Use XFB in the options. The previous option was renamed Use Real XFB. I don't think this works with the aspect settings yet.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5185 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-03-10 06:45:13 +00:00
Glenn Rice c455673f87 Added scons options "shared_libname=true" to link agains the system shared libraries for lzo, sfml, and soil. For example add the scons option "shared_lzo=true" for lzo. This will check for the system libraries and then fall back to building and linking statically against the Externals if not found. You must have liblzo2-dev, libsoil-dev, and libsfml-dev installed. Note that you need version 1.5 or later for sfml. Currently scons doesn't check the version for you.
If you are having trouble with segmentation faults in linux try "shared_soil=true".  That seems to fix the problem.  How do we fix this for the static build?


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5182 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-03-09 22:17:33 +00:00
donkopunchstania cc7c6cd35f Texture coordinates are stored in fixed point format in TEV which allows overflows to be emulated correctly. Added logic to calculated texture LOD and use the correct mip. Dumping textures will now dump all mip levels. Added line rendering. Changed data stored in vertex from float arrays to vectors for cleaner math.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5178 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-03-09 04:38:07 +00:00
Glenn Rice beba3b7f5b Removed more compiler warnings in linux.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5170 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-03-07 22:48:37 +00:00
nodchip 2dabcb881c Fixed the crazy code in r5161.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5163 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-03-06 10:07:37 +00:00
nodchip d69478e539 Reverted the comparison function to r5159 and rewrote map to hash_map. I confirmed that the code can be compiled and run under Visual Studio 2008. And I confirmed the code can be compiled under gcc 4.4.0 (mingw). I could not confirm that the code run under linux.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5161 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-03-06 02:07:48 +00:00
nodchip 1b61742b53 Rewrote a object-comparison code using a standard function. It's a tiny refactoring.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5160 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-03-05 12:04:09 +00:00
nodchip 2941bef44b Fixed a wrong type in r5140.
Commited code that I forgot to commit in r5140.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5141 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-02-28 12:14:40 +00:00
nodchip 1c34052266 Refactored VertexLoader::CompileVertexTranslator(). Now texture coordinates loaders are also selected from a function table. I will add a hack to increase the speed in the next commit.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5140 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-02-28 11:36:00 +00:00
nodchip d348c33bf2 Refactored VertexLoader::CompileVertexTranslator(). Now the vertex position loader is selected from a function table. I will apply the same kind of refactoring to texture coordinates loader. This is a pre-preparation to optimize texture coordinates loaders.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5139 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-02-28 08:41:02 +00:00
Rodolfo Osvaldo Bogado 6b1ca64428 experimental commit: simplify even more the params. please test and if theres something wrong will revert asap
thanks for the comments in the prev commit they make my re think the approach.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5136 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-02-26 22:14:29 +00:00
Rodolfo Osvaldo Bogado 02189ec5e0 Simplify the params for the safe texture cache
after some test the more relevant parameters were the color samples and the tlut max size.
so delete the rest of the parameters and define 3 modes:
Safe : the two values are set to 0 meaning all the texture data and all the tlut data are hashed this is the most correct and slowwwwwwwwwww way
Normal: 37 samples are taken from the color textures an the firs 4096 bytes of the tlut are hashed, is a lot faster than safe mode but in some games i observe small glitches.
Fast: 8 samples are taken from the color textures an the first 1024 bytes are hashed from the tlut, is a little slower than the unsafe cache but at least all the games i tested have correct text output and fast frame rate. the glitches in dinamyc color textures are more noticeable in this mode
this values could be improved, if you find a better combination please post it and the game it fixes and i will update the source.
for the moment, as my time is limited by a lot of work, only implemented the d3d gui, if someone can implement the opengl gui will be a lot of help for me.
please test a lot and let me know the results.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5135 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-02-26 12:54:08 +00:00
nodchip 609151c6e8 Reverted because of some processor and performance issue. I will develop in a branch about SSSE3/SSE4.1.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5123 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-02-24 23:58:48 +00:00
nodchip 47fb73b71a Added SSSE3/SSE4.1 code for speed up. The code does not work in this revision because cpu_info is not initialized properly. I will fix the issue in another commit.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5119 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-02-24 09:56:41 +00:00
Glenn Rice 1d40b8a5ae Systematically eliminating compiler warnings.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5117 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-02-24 03:38:36 +00:00
Rodolfo Osvaldo Bogado 3cc5d8ce6f First a bugfix:
fixed a misbehavior in the clear code that causes depth clear problems in reference hardware (Intel as example).
add 6 parameters to optimize Safe Texture Cache:
SafeTextureCacheColorSamples, SafeTextureCacheIndexedSamples, SafeTextureCacheTlutSamples:

this 3 parameters gives the number of samples taken to calculate the final hash value, less samples = more speed, more samples = more accuracy
if 0 is specified the hash is calculated using all the data in the texture.
SafeTextureCacheColorMaxSize, SafeTextureCacheIndexedMaxSize, SafeTextureCacheTlutMaxSize:
this parameters limits the amount of data used for the hash calculation, it could appear as redundant but in some games is better to make a full hash of the first bytes instead of some samples of all the texture.

color, indexed, tlut : define the texture type, full color data, indexed, and the tlut memory.

the parameters are available in the config , no GUI at this time, if the test are OK will add it to the GUI.
if someone needs it will give more examples on how to configure the values for specific games.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5116 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-02-23 21:52:12 +00:00
sl1nk3.s ae58a743cb Some tiny fix, fixed a crash when activating "overlay some statistics" on OGL plugin (which actually overlays a whole book + 400 chapters of statistics and, indeed, overflows and crash) + memleak fix on LLE plugin and little fix on GBAlink shutdown code.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5113 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-02-23 01:57:26 +00:00
Glenn Rice 303769d31c Revert commit 5105 until we sort out how we want this to work in linux.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5110 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-02-22 16:10:08 +00:00
Glenn Rice 73d575c5c2 On linux don't compile and link against lzo, soil, and sfml "Externals."
Instead use system libraries liblzo2-dev, libsoil-dev, and libsfml-dev


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5105 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-02-22 00:39:38 +00:00
Glenn Rice 154bc956ad Some code clean up, and take care of some compiler warnings.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5090 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-02-20 04:18:19 +00:00
Sonicadvance1 c63446827f Fix crash when stopping and starting a game with OpenCL enabled
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5047 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-02-13 10:09:54 +00:00
Sonicadvance1 0ab6c117c1 Fix a memory leak in OpenCL
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5044 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-02-12 17:20:01 +00:00
Sonicadvance1 89c276c962 Fix a Memory leak in CoreAudio backend, around 2MB. Stops OpenCL from trying to decode CMPR textures, as it fails horribly. Fixes a memory leak in EXI devices, where the destructor wouldn't be called, causing a 32MB leak with memory cards(if you have two), and maybe a bit more from the other EXI devices
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5042 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-02-12 16:40:13 +00:00
j4ck.fr0st e4dcdf796f OSX build fix.
Fixes Issue 2260

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5039 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-02-11 17:54:16 +00:00
Rodolfo Osvaldo Bogado 6200c99dd4 test commit: please test if this improve the performance with the safe texture cache
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5038 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-02-10 15:55:24 +00:00
Rodolfo Osvaldo Bogado e93e777ffb second try to implement a more correct safe texture cache, implemented full hashing of tlut textures as they are the more problematic, this should solve virtually all the problems with characters in all the games that have them.
sorry to tell but this will bring a speed drop, so let you decide if this change stay or not.( used the fastest open source hash algorithm i know) 
do not apply full hashing to other format because it kills the performance.
for popular request added 9x SSAA believe me will kill your graphic card even if is the best but the image quality is exceptional.
as always please test and let me know the results.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5034 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-02-08 23:23:04 +00:00
j4ck.fr0st 43051ffe41 some cleanup, housekeeping for error cases and increased a few buffer sizes that are overflown by its content.
Thanks to Fatalis for the initial patch and pointing us to cppcheck.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5004 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-02-03 20:29:49 +00:00
Rodolfo Osvaldo Bogado a319a77be4 sorry forget one file :)
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5002 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-02-03 14:17:03 +00:00
Rodolfo Osvaldo Bogado e98a273b54 fixes for my last commit:
chage the global format of the screenshots to bmp, is correctly supported by both plugins and is faster.
reverted the changes in safe texture cache, will try to make them more stable then commit them, this should fix compilation in linux and macand error introduced in MP games
corrected all the issues commented by ector, thanks for the comments alway is good that the code is revised by others to find missed spots.
please report any remaining issue to solve them.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5001 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-02-03 14:13:03 +00:00
Rodolfo Osvaldo Bogado 9e2bbec47f a lot of modifications here :)
first fixed scaling when updating backbuffer to make it friendly with encoders, now frame dumping must work without errors in any codec.
clean screenshot and frame dumping code now is more correct, faster and stable.
improve safe texture cache, improving the distribution of the hash algorithm, including tlut hash in the final hash of the texture, and making use of a 64 bit hash to make it more accurate.
clean a lot of code and corrected some missused vertex formats when drawing full screen quads.
and biggest change last:
implemented pseudo antialiasing: a image post-process algorithm that mimics antialiazing and is fare more easier to implement in this scenario.
you can change the intensity of the effect changing the values of the antialiasing combo. the right value depends on the game.
for example mkwii looks awesome with 8x.
please try all the changes and let me know the results.
if something is broken, please let me know and will fix it asap.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5000 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-02-03 03:52:50 +00:00
Glenn Rice feba09f7a3 Linux global build. At least the basic footwork is done here.
Basic usage:  "sudo scons install=global install"
Hopefully this doesn't break builds on Macs.  I have tested this on linux and windows.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4994 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-02-02 21:56:29 +00:00
ayuanx 8b129fca0c Fies Issue 1584
OSD and Hotkey to do quick config toggling

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4984 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-01-29 07:44:21 +00:00
skidau 1f37bb2177 Reverted the FIFO thread change
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4937 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-01-23 21:06:12 +00:00
skidau 35b6e71f03 Experimental FIFO thread. Speeds up the emulator by moving FIFO to its own thread. This will work best with quad cores, though there is a noticeable improvement on my dual core.
Enable the thread by adding this line to the video plugin ini files, "User\Config\gfx_dx9.ini" and "User\Config\gfx_opengl.ini":

UseFIFOThread = True

The line should be added under the UseXFB line.

To disable the FIFO thread, use this line:

UseFIFOThread = False

If the line is not in the ini file, the default is disabled (i.e. False).

The FIFO thread causes an error when the OpenGL plugin is used.  The D3D plugin works.

Only top left quarter of the screen can be seen when rendering to main window.  The entire screen can be viewed when running in a window.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4930 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-01-23 12:50:56 +00:00
hrydgard a43428253b Kill the last timeGetTime calls.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4921 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-01-21 21:27:52 +00:00
hrydgard 9893122a58 Attempt at fixing the colors of loaded "hi-res" replacement textures in D3D. Fixes issue 2074. Delete some obsolete commented-out code.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4916 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-01-21 19:31:48 +00:00
hrydgard 576990c5a3 JitIL is no longer a separate .exe/binary - it's now a simple option, Dolphin.exe now contains both cores.
Advantages:
* Less confusion for users
* No need to build twice to make sure you didn't break something
* Easier to switch between the cores for testing

Disadvantages:
* None, as far as I can tell :) Maybe some extra code complexity, but not much.

Also break some include chains that caused <windows.h> to get included into everything, slowing down the build on Windows. There's more to do here though, there's still a lot of files that get it included that don't need it at all.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4891 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-01-19 19:28:27 +00:00
Rodolfo Osvaldo Bogado c4c809f6b1 Small fixes:
in opengl correct an error introduced by mi in efb to ram alignment, it's seems to fix SMS but it missalign a lot of other games, so revert to the default. must solve truncated coins in NSMB.
revert alpha testing values to the values in rev 4812 as they fix some games.
in d3d dynamized the Render target size so it will change at runtime when viewport exceed it size, in the worse case it will cause a missing frame when resizing but in the games I tested is not noticeable at all
This must solve all the remaining viewports problems in nvidia cards, in ati this is not needed.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4888 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-01-19 15:00:45 +00:00
donkopunchstania 896850b176 Disable change made in 4801.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4876 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-01-18 06:32:16 +00:00
hrydgard 3e01152793 Shader Disk Cache implementation for D3D. Saves generated shaders on disk. Eliminates "freeze jerks" in D3D plugin the _second_ and later times you play something.... not much to do about the first time. The D3D shader compiler is just slow.
Also assorted cleanup around the shader code.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4869 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-01-17 17:44:09 +00:00
ayuanx 734b0f5dd4 Fixed a stupid error left by me.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4860 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-01-16 22:37:38 +00:00