Commit graph

584 commits

Author SHA1 Message Date
Rodolfo Osvaldo Bogado
253573ea02 ultra experimental commit. fixed tev functionality, now it must be almost perfect emulating native hardware.
please test as many games as you can this should impact a lot of games.
enjoy

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5511 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-05-27 03:05:43 +00:00
Soren Jorvang
810e6d53f0 For these assertions to trip, enums in CPMemory.h which seem pretty much set
in stone would have to change.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5496 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-05-26 21:05:42 +00:00
Soren Jorvang
f2609d1af3 #if 0 work-in-progress code.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5488 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-05-26 20:52:44 +00:00
Soren Jorvang
57a22f670f Remove unused variables.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5480 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-05-26 20:43:16 +00:00
pierre
2e12bd5e34 Fix a few compiler/valgrind warnings, kill check for 17th texenv registers,
and one problem reading a truncated sram file.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5474 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-05-24 14:53:27 +00:00
pierre
b73b77014f Rework the logic for avoiding lerp() in shader code
This should give the exact same shader code except for the cases of
SELA == SELB and SELC == 1, the latter only for the color combinder.
In these two cases the results of the shader should not change in any way.

It would have been possible to optimize the SELC == HALF case too, if
the actual factor had been 0.5f instead of 0.4980392f.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5472 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-05-23 22:46:13 +00:00
Rodolfo Osvaldo Bogado
782d9111e5 let's keep experimenting:
almost fixed real xfb in d3d, i say almost because there are some minor scalling problems. hope will fix them soon.
implemented a more intelligent index generator to emulate more accurately the behavior of the gc.
please give me feedback on this changes.
enjoy :)

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5465 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-05-22 21:58:43 +00:00
pierre
b1a79b822d Use symbolic names instead of numbers and bump cache version
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5464 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-05-22 20:40:43 +00:00
pierre
78b7a95d3f Modify r5462 as requested by rodolfoosvaldobogado
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5463 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-05-22 19:55:07 +00:00
pierre
e07a91930d The result of the last texenv stage is used regardless of destination register
The real hardware probably always sends the result of its computations
to the alpha test/fog units, in parallel to its registers, but those
only take the result of the last texenv stage.

This makes grass show up in ZTP, where the last texenv stage oddly writes to
reg #3 instead of #0.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5462 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-05-22 16:54:34 +00:00
Rodolfo Osvaldo Bogado
2c7a08fc61 after a good commit lets make some experiments:
implemented fixed efb scale to improve alignment and discard some error caused by incorrect scale.
make both plugins work similar. this must improve opengl image quality a lot.
also implemented dynamic resizing in opengl, this way the resolution math the windows resolution on resize.
this is highly experimental so please test a lot.
implemented shader dumping on error thinking  in future experiments with shaders.
enjoy :)

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5458 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-05-19 03:15:36 +00:00
Rodolfo Osvaldo Bogado
7947543d98 a little optimization in shaders constants setting , based on the same idea of nodchip changes.
a MAYORRRRRR change in pixel shader generation, please review all games you can and leave comments this must improve accuracy in graphic emulation a lot.
for example: mario eyes in super mario galaxy, water pod transparency an water transparency on game intro in super mario sunshine, etc.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5457 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-05-17 22:17:46 +00:00
Rodolfo Osvaldo Bogado
0ea01d8462 fast commit :
make native mips loading an option to prevent performance lost in game that not need this functionality.( thanks to dorian.fevrier for point the performance lost.)
added a patch from  pierre@pirsoft.de to avoid vertex drops when index array is full in opengl implementation that do not support large index arrays

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5432 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-05-04 14:43:30 +00:00
Glenn Rice
140332c02e Move fullscreen display resolution control to the GUI with the rest of the fullscreen toggling code. This removes redundancy of code that was in several places through the various video plugins. Unfortunately it means the fullscreen resolution setting also had to be moved to the main configuration dialog. I am sure that will meet some resistance.
Also added a window size setting for windowed mode.

Also pulled some X11 specific code out into a separate file.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5395 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-04-22 04:28:34 +00:00
skidau
7a7d1a7b55 Re-added Skies of Arcadia projection hack. Fixes issue 2514.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5372 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-04-15 09:23:59 +00:00
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
Rodolfo Osvaldo Bogado
8de76f8fe8 ok big changes here:
in videocommon little fix for the alpha test values, return to the original values as they are more accurate.
in D3D:
huge change in state management, now all the state management is centralized and redundant state changes are eliminated.
Fixed the overlapped viewport error in non ati cards:
the error was caused by this: when a viewport is defined larger than the current rendertarget, an error is thrown and the last valid viewport is used, this is the reference behavior, in ati cards if a larger viewport is defined, no eror is returned, the rendering is valid and is rendered using the projection defined by the viewport but limited to the rendertarget are, exactly like opengl or the GC hardware.
to solve this in reference drivers defined a large rendertarget (2x the size of the original) and proceed to render in a centered quad insithe the larger rendertarget, in this way larger viewports always falls inside a valid rendertarget size, the drawback of this is the waste of resources. it can be dynamized, depending or games or changed at runtime when a oversized viewport is detected, but i live that to future commits.
please test this and let me know the results.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4841 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-01-15 15:52:08 +00:00
ayuanx
571a47ef9a This could alleviate the suffering of dual core synchronization a bit.
But I doubt you would notice it in most cases.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4830 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-01-14 10:52:14 +00:00
hrydgard
2db709aeb6 Add "Auto Aspect Ratio" to both graphics plugins. It's the new default, so you can forget about switching aspect manually from now on. In the Auto mode, aspect ratio is automatically set depending on whether it's a Wii or GC game, and whether the global Wii Widescreen setting has been set. There is still the possibility to override, which can be useful for the very few GC games that do support widescreen.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4828 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-01-13 21:11:02 +00:00
ayuanx
429691ce96 This should settle the FIFO BP critical games like Metroid Prime 2
G2ME01.ini

[Video]
FIFOBPHack = 1

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4823 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-01-13 11:42:04 +00:00
ayuanx
ecdcffc7cf Fixes Issue 1997
This also makes the CP FIFO hack obsolete.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4821 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-01-13 09:03:55 +00:00
hrydgard
a81efdb597 D3D: Fix some texture wrapping issues by setting the texture state for every texture used at draw time. Hopefully there will not be a noticable slowdown, thanks to the state caching. Also some minor cleanup. Should fix issues like repeated shadows. TODO: In theory it should have worked without this, so I should investigate why this change was needed.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4815 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-01-12 23:40:30 +00:00
Rodolfo Osvaldo Bogado
532ab905c4 this is a dev commit, a cleanup in the pixel shader generator to make the generate code a lot cleaner and readable, and a little fill rate optimization when using alpha test, i don't thing any game is limited by fill rate but the code looks more cleaner and is ordered in the same way is executed in hardware.
please test, if any problem apears let me know

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4812 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-01-12 03:39:14 +00:00
hrydgard
9012d4f4b8 Fix missing shading in NSMBWii etc in the D3D plugin. Now, I'm not entirely sure why the existing code didn't work properly, but hey, this fixes it :)
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4810 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-01-12 00:08:02 +00:00
donkopunchstania
a19be73be3 Do special handling of texture coordinate generation if there is only a position and texture coordinate present.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4801 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-01-11 00:44:40 +00:00
ayuanx
81afdbe4f4 Compilation fix for r4795
Nunchuck gravity fix for r4794 (as sanchez instructed)

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4797 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-01-08 22:56:27 +00:00
ayuanx
a3cfafcd12 1. Expanded Framelimit range from 20 to 120 in case someone wants to run a little faster than full speed but still controllable not like wild OFF.
2. Fixed a bug (for Win 32bit) that reports "No possible memory base pointer found!" even when there IS valid memory base found.

3. Made Metroid Prime 2 (maybe also other games) boot
PS: There is definitely some initialization problem with Dolphin (not found exact location yet), which prevents Metroid Prime 2 from first time booting (If you boot some other GC game first, stop it, then MP2 can boot without problem).
So I added an instant BP hack that can make MP2 boot even at first time.
And I've tested all my games to guarantee it won't break any game that already boots before this hack.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4795 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-01-08 21:57:31 +00:00
ayuanx
9cbd508181 1. This should fix Issue 1625 (Bizarre Auto Frame Limit)
Now the frame limiter yields on CPU thread, not as before on GPU thread mistakenly

2. Fixed clear of VI interrupts
   I guess VI interrupts are not used at all, because they were never cleared before

3. Made GPU thread 0% processor usage when paused whatever your active config is.
   I tried the event approach but somehow the thread resume latency is excessively long (Who can tell me why?)

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4790 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-01-07 20:01:41 +00:00
ayuanx
e80078dc3c What we should think about:
"VideoFifo_CheckEFBAccess()" & "VideoFifo_CheckSwapRequest()" should be moved to a more suitable place than inside function "Fifo_EnterLoop()", which wastes considerable amount of CPU time (exhausting one core completely even when paused) and also makes VPS inaccurate.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4778 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-01-03 18:58:50 +00:00
ayuanx
a3c258cf9c Fixed Issue 1921
This also fixed Ikaruga, not sure whether it could fix Metriod Prime. If not, how about disabling EFB copy?

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4777 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-01-03 16:04:40 +00:00
Rodolfo Osvaldo Bogado
ded7a2921d I'm back, after two weeks pure work and nothing of dolphin, take a look at the code and discover this very small fix, apply color clamping before alpha test, the way is done in the software plugin, have some nice effects, this will fix some things and brake others but the feedback is needed.
if you want to know where to start testing look at SMS :)
HAPPY 2010 for everyone 

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4775 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-01-02 21:09:12 +00:00
ayuanx
92ef4f1156 1. Fixed the freeze issue in "Super Mario Galaxy" and other games, which was introduced since r4762
2. Fixed Issue 1909
   Multi-Nunchuck control problem

3. Updated SYSCONF, which should enable games that require MotionPlus, such as "Wii Sports Resort"

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4773 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-01-02 05:15:36 +00:00
ayuanx
6e87ef943f Sorry, this is the working fix for r4759
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4762 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-12-31 20:49:04 +00:00
ayuanx
40f4dd30c2 Fixed Issue 1711 (a bug that prevents some games from booting)
Thanks to chuvit's help

Added safety check for CFrame::Update

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4759 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-12-31 16:25:12 +00:00
ayuanx
151ff28ab7 Fixed mem leak caused by not releasing pad & wiimote plugin when shutdown
Fixed main frame crash after shutdown

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4755 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-12-30 14:37:12 +00:00
sl1nk3.s
bf6ed51b87 Fix an issue with BPMEM_LOADTLUT, thanks to revned @ issue 1831, also fix a speed issue int the FIFO loop introduced recently (ZWW was ~20% slower)
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4739 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-12-28 19:13:06 +00:00
death2droid
a1fefe870c DX9: - Add hires texture loading.
- Add an option to enable the EFB scaled copy *TODO find a better place for it to go.

SOIL - Update stb_image to the latest version (1.16 to 1.18)

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4716 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-12-22 06:47:42 +00:00
fgfemperor
acb9e7ca29 NSMB background fix. Fixes 1654.
There was a problem with the fog calculations... Now NSMB shows the background, while the fog still works!

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4714 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-12-21 20:30:01 +00:00
ayuanx
b0ef811786 Disabled thread synchronization check so the speed should be back, and theoretically should be even faster than r4698.
Hope it is safe to do so.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4701 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-12-17 04:01:34 +00:00
ayuanx
0ae7be2c1c Since we have been employing the FIFO BP hack for so long time, at least let's make it a decent hack.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4699 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-12-16 17:05:30 +00:00
Rodolfo Osvaldo Bogado
9c930f0825 nice little hack to make efb copies scaled with the efb so everything will look a more HD, for now there is no GUI i'm with a lot of work at home. if everyone likes this change will add it to the GUI. for now just use the config file.
it brakes sms goop so in that game avoid this . test and let me know.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4696 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-12-15 01:40:54 +00:00
ayuanx
66b1eb1f08 Does anyone know any game that requires the "Clear FIFO BP on Rising Edge"?
Because commenting out this behavior fixes Silent Hill Shattered Memories.

If this commit breaks any game, please report.

PS: There is a EnterCriticalSection in fifo.cpp, which performs the Read Access, but there is no EnterCriticalSection in CommandProcessor.cpp which performs the Write Access, so how can we guarantee the Write Access is atomic?


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4694 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-12-14 15:50:31 +00:00
Rodolfo Osvaldo Bogado
0bc7fa7bf5 Small fix for the last commit, and a little fix for disable fog to really disable it :)
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4662 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-12-09 13:51:28 +00:00
Rodolfo Osvaldo Bogado
d02426a8e9 mixed commit:
in D3D and Opengl:
fixed one nasty bug in texture loading where if a dynamic texture keeps his format but the tlut format is changed, the try or reloading the texture in the same texture could cause a hang if the size of the resulting texture is different than the original (size in bytes)
Applied a ugly temporal hack to the texture conversor to solve efb to ram misalignments and effect distortions.
in D3D:
Pseudo implementation of logic ops using basic blending: the first 8 operations are "good approximations", the remaining 8 are bullshit :) if someone have a better approximation to emulate this logic please let me know.
please test if i don't break anything in the process and test Mario kart wee you will get a nice surprise.:)
 

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4656 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-12-07 18:48:31 +00:00
hrydgard
0f0c77c299 minor code cleanup
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4645 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-12-05 14:01:29 +00:00
hrydgard
f0bba97070 Delete the misnamed GlobalControl.cpp/h, move the (ugly) projection hack code that was there into VertexShaderManager where it belongs.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4644 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-12-05 13:56:23 +00:00
donkopunchstania
e6d51e8ff4 Fixed 24 bit depth copies to RAM. 24 and 16 bit depth copies are now more accurate. Added an offset to DX copies to RAM and made half sized copies to a texture linearly filtered.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4635 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-12-02 04:17:18 +00:00
luisr142004
60352d92eb Wiimote: reapply the Upright wiimote option
D3D: add the EFB Copy option to complete Rodolfo's commit plus add the Overlay FPS and the Disable Fog options
also change the config dialog's behaviour a bit

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4622 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-11-28 05:59:46 +00:00
Rodolfo Osvaldo Bogado
5e31f22e50 small code reorganization.
Now efb to ram display correctly but still is misaligned by one pixel
please test and give me feedback

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4618 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-11-27 19:42:27 +00:00
Rodolfo Osvaldo Bogado
55dc7efaa4 corrected viewport and scissor test behavior in both plugins.
some code cleanup in d3d.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4605 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-11-23 14:08:08 +00:00
Rodolfo Osvaldo Bogado
19d7bb2c84 big commit, implemented depth textures with hardware support in D3D, so now they will be correct as in opengl. please test a lot because i only tested the ati path, nvidia path is "Theoretical" :).
Also reimplemented screen clearing as a color quad to support alpha blending when clearing as in the original hardware.
the funny thing is how is implemented peeking, as locking depth textures is not supported, implemented peeking copying the values form the depth texture to a r32f render target and then reading back the data.
please a lot of testing to this commit.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4599 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-11-22 02:37:00 +00:00