Commit Graph

122 Commits

Author SHA1 Message Date
Marcos Vitali 3b7a6ce336 I've observed that "FIFO is overflown by GatherPipe" is not real overflow.
Really that happens because the fifo.CPReadWriteDistance is negative.
Example: CPReadWriteDistance: -864 CPEnd: 10092672 fifo.CPBase: 9568416
In SMG this is because  PI_FIFO_RESET is writing and after fifo.CPReadWriteDistance will be setted to 0.
To Prevent that, I've Implemented AbortFrame function in the CommmandProcessor. It should fix overflown because of that. 
Note: There is other issue (Issue 2846) where the fifo.CPReadWriteDistance is negative too but the effect is different.
I'm working to solve this.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6083 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-08-10 07:25:35 +00:00
pierre e5f629da37 Fix saving states on mesa3d and clean up the handling of asynchronous requests
(those originating from a thread other than the gpu thread)

glxMakeCurrent is supposed to error out when the context is
still current in another thread. NVIDIA handles that, but mesa3d errors.



git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6054 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-08-04 21:02:32 +00:00
Glenn Rice 06fb0c292a Removed the hackery that was being done with the plugin configuration dialogs on windows. That was unnecessary and ugly. The HWND type is dead for non windows. Also cleaned up the gui a little.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5999 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-30 03:51:49 +00:00
Glenn Rice 3859a7dce2 Lots more work on making the frame aui stuff functional.
Also added a DSPCORE_STOP state.  The DSP-LLE debugger window segmentation faults if it is openned when a game is not running.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5931 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-22 02:05:28 +00:00
Glenn Rice b175397cb7 Some work on cleaning up the FrameAui code. Primarily this fixes the debugger windows for the audio and video plugins. They are now all subclasses of a wxPanel, instead of a mix of wxFrames and wxDialogs. This makes them work correctly in linux, windows (they really didn't before), and most likely on MacOSX too!
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5913 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-19 02:09:34 +00:00
NeoBrainX e8ed50854a Remove code which got obsoleted by r5890.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5906 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-18 15:19:24 +00:00
Soren Jorvang a4a61ae95c Restore a line deleted by accident.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5854 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-08 15:56:09 +00:00
Soren Jorvang 39ae36398f Copy the version string obtained from svnversion at runtime instead of
using it as a constant in several places. Saves a few bytes and the time
it takes to recompile a bunch of files whenever svnversion twitches.

Using the SVN version string as an integer is not portable as the Unix
svnversion always includes e.g. the "M" suffix for a modified tree.

Windows people, please check my change to Plugin_VideoDX9/Src/main.cpp
as I don't really understand how _T() and the %hs format string work.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5852 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-08 15:25:01 +00:00
Rodolfo Osvaldo Bogado 12a676c273 this is a pure optimization commit:
return to the  old values in constants in pixelshader, the old values give mi 3 or 4 fps more,(maybe some kind of compiler optimization) in some games and with the current algorithm i notice no difference with this values, please report any problem.
optimizes SSAA to make it a little faster and, the quality should be the same but with a little speedup.
change the way the frame is processed depending is xfb is enabled or not to make this a little faster.
please test and report any problem

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5820 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-02 17:09:53 +00:00
Rodolfo Osvaldo Bogado d511b50612 this commit is divided in 4 parts:
1 - Optimize pixelshadergen to avoid redundant register overflow math, with this if a game don't need this will be not applied.
this must bring some fill rate back and improve speed a little in fill rate limited systems.
2- some corrections to vertexshadergen to avoid uninitialized texture coordinates, dono if is the correct way to fix it but t least it will make house of the dead overkill playable in dx11.
the bad thing: still missing geometri in dx9, in dx11 it works exactly as on opengl.
3 - some optimization made to improve fps a little wih the latests changes made to fifo.
* back to the original code in beginfield as now it will work right.
* check for efb access more often as a lot of time is lost waiting for efb access
4 - apply a little fix for missing textures in nvidia opengl tanks to  Wagnard28 for finding that nvidia does not like invalid shader id :)
please test for any regression

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5812 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-29 14:40:37 +00:00
Marcos Vitali 10b5d2371c My first commit :D
Dual Core sync fix.
When the FIFO is processing data we must not advance the cpu cycles in CoreTiming because in this way the VI will be desynchronized. So, We are waiting until the FIFO finish and while we process only the events required by the FIFO.
This should fix Issue 2072 .
This affect to all games in dual core mode.
Please, You can test all games with VPS limiter auto, 60, 50 depending of the game and compare with prev revision.
For example now NSMB in the video Intro has 60 fps (prev 30 fps) :D or SMG does't need anymore FPS Limitter Hack to get 55-60 fps
Beside the slowdowns now are more softly and the fps more stables because the VI sync is almost perfect.
The Core Timing and Fifo modifications are delicated. Please report if this hang any game. Don't forget check with prev revision.
Enjoy it! Thanks to Rodolfo for teach me all about dolphin.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5777 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-24 13:28:54 +00:00
hrydgard 6a88241e64 D3D9: Delete some long dead code. Also add one more statistic: number of compiled shaders that actually have unique code (not accurate unless you delete the shader cache before running). This stat clearly shows that in f-zero we create 5x as many pixel shaders as we should, so there's clearly a problem with the shader ID generation.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5754 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-20 22:23:34 +00:00
hrydgard ccbc1feb0b D3D9: Fix issue where the shader caches were lost whenever the render window was resized. Add some error logging to LinearDiskCache. + some minor cleanup.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5747 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-19 16:22:24 +00:00
NeoBrainX b4f5a4d89e Compile fix.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5739 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-18 18:50:04 +00:00
NeoBrainX bf36f171a6 DX11: Add error checking to about any device object creation. Since we aren't handling creation errors that well right now we should at least output an error message.
Remove superfluous _WIN32 checks in DX11 and DX9. Meant to port that code over to Linux or what? :P


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5738 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-18 18:40:58 +00:00
Rodolfo Osvaldo Bogado cb1694252b more bug fix in dx11:
fixed screen clearing and simplify drawClearQuad a little
put some nice code from dx11 that i like in dx9.
modify plugin spec preparing for implementing efb poke (is not used often but is a missing functionality so..)
please test.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5710 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-15 21:19:09 +00:00
Rodolfo Osvaldo Bogado 9255481882 little build fix for my last commit
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5682 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-13 20:08:20 +00:00
Rodolfo Osvaldo Bogado 20e3919033 apply James333 patch to make dx9 plugin use wxwidgets.
some other minor warning fixes.
thanks to James333 nice patch :)

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5679 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-13 19:41:07 +00:00
NeoBrainX a6ebc8234f Preparing stuff for DX11:
- be more strict with the input signature of generated pixel shaders
- replace the D3D parameter with an API_TYPE one, so that we can further distinguish between DX9 and DX11
- for what it's worth dx11 (using vs_4_0) doesn't support D3DCOLORtoUBYTE4; added a workaround for this
- add a "dx9-" prefix to the shader cache files to avoid conflicts with dx11 shaders

Apart from that we're calling CommandProcessor::Shutdown() in main.cpp,Shutdown() now.
Delete all files in User/ShaderCache if you want to save a few KB disk space :P


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5659 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-12 15:49:21 +00:00
luisr142004 1648b84f08 add some dx checking routines to the dx plugin + some minor stuff
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5466 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-05-23 02:29:23 +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
nitsuja- fadbe78a59 dx9 savestate crash fix
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5380 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-04-17 20:14:38 +00:00
Glenn Rice 4b232e50c5 Re-add the show FPS/VPS speed information in the window title when not rendering to main.
Also fix an issue with the DX9 plugin not being the correct size when starting the game in fullscreen at a higher resolution than the desktop resolution.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5375 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-04-15 20:58:34 +00:00
Glenn Rice 16d3cfadb4 Make "Start in Fullscreen" work with the DX9 plugin. Also a partial fix to the problem with Windows not saving the window size correctly when not rendering to main.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5352 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-04-13 02:12:09 +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
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
Rodolfo Osvaldo Bogado 49d568488c fixed fps limiting when using using virtual xfb, now fps = vps, in fact now real xfb is as fast as no using xfb, i'm thinking now that the correct thing is leave it enabled as default, and even remove the option.
the problem is one strange behavior i found, in opengl when xfb is enable, frame limit causes the frame rate to be limited exact half the correct speed, so if you choose auto and the game uses 30 fps you get 15 fps
so in opengl, you have to limit to the exact double of the game speed, 100 to pal games and 120 to ntsc.
in d3d this not happened every time, it just happen when you change some time consuming setting like changing the ssaa or resizing the window, in that case you have to disable and re enable frame limit to get the correct fps
to all the devs please if you can help me debug this, will give you a lot of thanks as i'm short in time to debug this error and is driving me crazy not to find the source of the problem.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5249 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-03-28 23:51:32 +00:00
Rodolfo Osvaldo Bogado beee4f4804 other experimental commit:
applied mlkbouba patch to make Mario Strikers Charged Football work (i do not own the game so please test).
some minor tweaks to the plugins to improve performance. for game that do not use xfb the best settings are dual core enabled, audio throtle disabled, frame limit set to the desired value, and xfb off.
change the frameskip calculations to use fps instead of vps as in dual core vps != fps caused by unresolved sync problems, till this problems are fixed the best for game play is calculate times in base of fps.
please test and let me know the results

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5239 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-03-25 22:01:33 +00:00
Rodolfo Osvaldo Bogado 8812fe6a3a some fixes over my last commit, now the speed with xfb disabled must be at least equal to the speed before the xfb implementation. fixed fps counter.
please give some testing to this changes to see if i going the right way.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5235 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-03-25 02:26:12 +00:00
Rodolfo Osvaldo Bogado 3bdf7d3711 this is a ugly unstable commit but i'm going to be out for work some days so ...
implemented donko's xfb in D3D:
the bad things:
*is solower in some cases, slower as opengl
*it do not work in dual core mode, it seems direct3d has serious synchronization problems, to the other devs please if you can take a look and help me :)
*real xfb still not working i have to give it more time to make it work.
the good:
*games that uses multiples xfbs will work now using the virtual XFB.
*implemented a more hardware like approach to scaling, now to calculate the pixel scaling i use the xfb size not the efb so the screen pixels relation is more correct now.
*simplified a little donko's virtual xfb to make it less memory consuming as xfb textures are the exact size of the scaled xfb and not full target width.
* when it works even real xfb will let us use super sampling.
I repeat this commit is totally unstable and in dual core mode it will for sure hang the emulator or at best give totally incorrect results.
Other devs please help as thread sync is not one of my strong points :)
i'll keep waiting for the comments an the -1 :)


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5195 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-03-14 18:57:50 +00:00
luisr142004 816febd3b0 finish proper window handling, fix the modal state of the config dialogs, plus some minor cleanup/changes :p
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5129 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-02-25 06:12:35 +00:00
j4ck.fr0st d90d9976e8 apply the changes from r5109 to the DX9 plugin aswell. the config dialog does not use wx yet, but the debugger does. Plus cleanup.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5121 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-02-24 19:32:32 +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
Rodolfo Osvaldo Bogado e856d0b3ed EXPERIMENTAL:
rewrite frame dumping and screen shots to make them more stable and correct
enable viewport resizing for all cards, the emulation is more correct in this way
test this a lot please.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4971 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-01-27 22:07:59 +00:00
ayuanx 82ccf1d34c Fixes Issue 2070
Fixes Issue 1886
Fixes Issue 1519
Fixes wxWindow Destroy Issue
Quits DX9 full screen when a message box pops up 

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4898 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-01-20 07:47:41 +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
fgfemperor 64167bcb60 Now you can switch between Emulated and Real WiiMotes, connect more Real Wiimotes and even pair them up (if you have MS BT Stack) during gameplay!
All you gotta do is Pause the emulation! That's useful for when your batteries run out during gameplay, for example...

But if you change the WiiMote source (between Emulated, Real or Inactive) you must disconnect and reconnect (Menu Tools -> Connect WiiMote) the WiiMotes affected by the change...

Thanks to jack.fr0st who did all the emulation state notification work!

Now every plugin has a way to know the current emulation state (paused, stopped or playing)

@ayuanx: I thought about doing a PostMessage(g_WiimoteInitialize.hWnd, WM_USER, WIIMOTE_DISCONNECT, current_number); so that the user gets asked to reconnect that WiiMote, trying to avoid having to disconnect and reconnect, but it didn't work because shooting that message only asks to reconnect, doesn't do a disconnect... Do you have any ideas on how to accomplish that?

Also, if anyone could check if Issue 1916 is finally fixed... Or at least when is the cursor being hidden or not...

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4789 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-01-06 19:26:52 +00:00
sl1nk3.s ede1c935f4 Fix Fullscreen issues in DirectX plugin. Fixes issue 1470, issue 1886 and issue 1673 too.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4779 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-01-03 22:18:50 +00:00
sl1nk3.s 5877961354 Some fixes to Stop() process.
Unbreak linux stop on Single Core, remove an unnecessary wait event, fix DSP HLE/DSP LLE/OGL plugin hang on stop when the config dialog has been opened (nJoy and Wiimote still need to be fixed), avoid the CpuThread to be stuck in the efb/swap loop by setting a flag before the thread is actually shutdown (contrary to r4756 which was setting it.. after :D)
Clear the status bar Framerate/Core message when the game is stopped.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4769 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-01-01 03:55:39 +00:00
sl1nk3.s 18e951f97a Fix a crash when closing DirectX's window, also apply a fix from j4ck.fr0st/BhaaL @ issue 1277 to prevent two possibles hang on stop.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4756 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-12-30 15:08:18 +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
luisr142004 f3681c0e1b D3D: change window startup a bit (pretty minor but it's just to get me started :P)
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4473 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-10-28 22:40:18 +00:00
Shawn Hoffman ac157105c5 small code cleanup: rename "dual core" stuff to CPUThread, bOnThread, etc.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4455 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-10-23 15:26:35 +00:00
donkopunchstania 56214e9103 Moving pixel engine and command processor from core to video common. This will break previous save states. Adds decoding single pixels to texture decoder.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4391 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-10-10 21:19:39 +00:00
hrydgard 9c45ac7e35 EFB Reads are so slow in D3D that I think we need an option for it. Here it is.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4378 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-10-07 19:54:56 +00:00
rice1964 194d44d08e D3D, back off the buffer flipping change by r4303. It works for certain games (Zack & wiki, Rayman3, etc), but seems to break other games (Metroid prime 1 complete black) and features (frame skipping).
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4306 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-09-20 13:00:25 +00:00
rice1964 81e7ce9ad2 D3D: get rid of flickering in various games by changing way and time to flip backbuffer to frontbuffer. Also added some debugging messages. ZTP intro seems to be additionally 10%+ faster now, maybe only for me in windows mode.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4303 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-09-20 03:29:43 +00:00
hrydgard dc4f712f74 D3D: Save some video RAM by turning off the "default" Z buffer (we create our own). probably doesn't matter on most video cards..
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4277 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-09-15 19:53:22 +00:00
hrydgard c7431401be D3D: Fix 8-bit signed normals. Fixes lighting problems in Super Smash Bros Melee. misc tiny things
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4265 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-09-13 21:18:04 +00:00
hrydgard a7c70ddb66 D3D: Eliminate black borders, add 4:3 and 16:9 settings, and the widescreen hack. Unfortunately this temporarily breaks MSAA (in d3d only) until I have time to fix it.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4263 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-09-13 17:46:33 +00:00