summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/Src/Fifo.cpp
AgeCommit message (Collapse)Author
2010-01-23Reverted the FIFO thread changeskidau
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4937 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-01-23Experimental FIFO thread. Speeds up the emulator by moving FIFO to its own ↵skidau
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-16Fixed a stupid error left by me.ayuanx
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4860 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-01-14This could alleviate the suffering of dual core synchronization a bit.ayuanx
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-13Fixes Issue 1997ayuanx
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-081. Expanded Framelimit range from 20 to 120 in case someone wants to run a ↵ayuanx
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-071. This should fix Issue 1625 (Bizarre Auto Frame Limit)ayuanx
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-03What we should think about:ayuanx
"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-03Fixed Issue 1921ayuanx
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-021. Fixed the freeze issue in "Super Mario Galaxy" and other games, which was ↵ayuanx
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
2009-12-31Sorry, this is the working fix for r4759ayuanx
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4762 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-12-31Fixed Issue 1711 (a bug that prevents some games from booting)ayuanx
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-28Fix an issue with BPMEM_LOADTLUT, thanks to revned @ issue 1831, also fix a ↵sl1nk3.s
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-17Disabled thread synchronization check so the speed should be back, and ↵ayuanx
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-16Since we have been employing the FIFO BP hack for so long time, at least ↵ayuanx
let's make it a decent hack. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4699 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-11-12The WGP does not loop if the write pointer is set beyond the end of the ↵donkopunchstania
fifo. Updated the video plugins this time. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4531 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-10-21Revert the the Fifo changes from r3984 (Pokemon XD still somewhat works) ↵sl1nk3.s
this should fix hangs/desyncs in a couple of games (burnout, metroid, spyro, soulcalibur, nightfire...) see issue 1524 git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4442 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-10-10Moving pixel engine and command processor from core to video common. This ↵donkopunchstania
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-07EFB Reads are so slow in D3D that I think we need an option for it. Here it is.hrydgard
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4378 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-08-15GFX: omegadox
- FIFO changes - minor cleanup, code organization based on Nolan's changes - Minor code cleanup - CommandProcessor changes - Allow BP IRQ clearing for either raising or falling edges. - Revived old SetFifoIdle code Gets Pokemon XD to run, but will crash to any CPU-GPU desync. Other games like Metroid Prime, look happy with the new FIFO changes. Please report any problems. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3984 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-08-09Frameskipping more aggressive (minor speedup, plz report any serious ↵hrydgard
problems). Initial display list cache implementation, disabled for now. Various cleanup. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3952 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-08-08Frameskipping! Complete with GUI! Even my most naive approach resulted in ↵XTra.KrazzY
great speeds, even with graphic-intensive games such as Pikmin. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3949 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-07-28Now ALL copyright dates are fixed to the legally correct year: The year in ↵XTra.KrazzY
which the project began. Now we don't have to change it every year :) git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3898 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-07-26GFX: updated Dates, code formatting cleanup, code cleanup / organization, ↵omegadox
some unknown BPs uncovered, fixed OGL's config dialog bug, added another shader DSPHLE: Some warning fixes and added some logging for unknown voice cases Please report if anything has broken. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3884 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-07-23Hell, just switch to fifo.cpp from r3854.Nolan Check
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3877 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-07-23Corrections to r3875.Nolan Check
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3876 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-07-23Revert most of r3855.Nolan Check
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3875 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-07-20Simplify fifo codeNolan Check
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3855 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-07-18CP: Replace a couple spin-waits with event signals.Nolan Check
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3828 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-07-17No more SleepCurrentThreads in Command Processor. Some Fifo cleanup.Nolan Check
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3822 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-07-15Fixed one of the two remaining crash on Stop (issue 600), and removed some ↵sl1nk3.s
setup defines which are now useless anyway. There's an attempt to implement Peek_Color too, probably done wrong :P git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3799 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-07-13Atomic operations library.Nolan Check
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3775 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-07-11Use events and memfences for EFB accesses. Also, Single-Core mode now works ↵Nolan Check
again. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3750 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-07-11Switch to Video_BeginField; hopefully fix or reduce some video stability ↵Nolan Check
problems by using Events. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3740 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-07-03Fix a nasty dualcore hang in EFB read (see r3658 comment...) sl1nk3.s
Also fix an issue reported by baby.lueshi (issue 1074) in nJoy related to half press button being always pressed when unset. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3661 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-07-031. Savestates should now be super-stable (but you have to save AND load)XTra.KrazzY
2. AccessEFB will probably not hang (tell me if it does) 3. Stopping should be a little bit faster git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3658 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-07-02EFB Access now works from both Dual Core and Single Core modes. Thread-safe.XTra.KrazzY
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3644 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-06-26Display buffer flips are now triggered by the CPU thread through the ↵Nolan Check
Video_UpdateXFB function. This is a fairly significant change of behavior, but it improves performance. Also, render target code is cleaned up. Post-processing shaders now work with multisampling and Real-XFB mode. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3545 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-06-20Remove delay in Fifo when CP/GP distance is 0. It's a bad idea to sleep for ↵Nolan Check
a whole MILLISECOND when we only have about 17 milliseconds to complete a frame. This fixes slowdown in Wind Waker's Deku Tree room in dual-core mode. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3513 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-06-15linux compile fix, I'm not sure it was right of me to remove the mmsystem ↵nakeee
include (was it used?) but if it's for the timer function please put it in Timer.h and not in each seperate file. (And yes, I have a script that does that). git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3448 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-06-15Attempt to calculate actual refresh rate (i.e. a CPU-GPU synced Mhz), no ↵John Peterson
real success. Anybody have any ideas? Is there no indication from the game when the screen refresh should occur? No, not what I could find, we currently calculate the refresh rate and m_VBeamPos from the CPU ticks progress. That works perfectly if the CPU and GPU is perfectly synced as in the single core and no-idle skipping mode. So I guess it's possible that the game doesn't indicate when the screen should be refreshed, but rather that the hardware calculate that from the CPU ticks progress. That leaves us with a problem in the dual core and idle skipping modes to calculate a CPU-GPU synced CPU ticks progress. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3447 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-03-18nakee's new logmanager. added a console window for windows builds (prints to ↵Shawn Hoffman
parent console on non-win32). also fix some random wxw bugs: main window's position is saved when using debugger, disabling windows from the tools menu are saved settings, some other small fixes git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2675 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-03-07Allow for self shutdown from video plugins.XTra.KrazzY
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2611 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-02-22Attempt to workaround some stop hangs by using MsgWait instead of Wait. ↵hrydgard
change order of dsp / video shutdown. some comments. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2379 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-02-22Core Stop and Start: Added alternative separate thread timer/loop based ↵John Peterson
waiting, instead of same thread loop waiting. You can try it with the SETUP_TIMER_WAITING option in Setup.h. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2375 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-02-22OpenGL: Added a Setup.h option to avoid another annoying ↵John Peterson
WaitForSingleObject() hanging. WaitForSingleObject() in Fifo_ExitLoop() would hang the thread it was waiting for when it arrived at Callback_PeekMessages(). Can't these waiting loops be replaced by a timer somehow? They are pretty ineffective if they hang the loop they are waiting for all the time. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2359 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-02-21Fix for a single core mode stop-hang. Fix a build error in IL mode.hrydgard
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2328 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-02-20The Mega Change Of Doom - or, fixing Stop. Almost. At least it's better than ↵hrydgard
before. However, the OpenGL plugin seems to lose textures a lot between game restarts :P I think the GL plugin needs to do a lot more cleanup. This change also includes tons of minor code formatting cleanup. Yeah, should've separated it ... sorry :( Kills the old CPUCompare support. I'll resurrect it if I need it again, right now it mostly clutters the code. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2321 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-01-27XFB in SC reverted back to its previous behavior (thx donko). But still ↵memberTwo.mb2
hacked in DC (still a FIXME). git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2019 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-01-24Compile fix on linuxnakeee
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2005 8ced0084-cf51-0410-be5f-012b33b47a6e