increase estimated sample rate on underrun.
- OssEngine: Make use of sample period limit feature of RateEst. Don't
increase estimated sample rate on underrun.
git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@222 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
probably invalid.
- RateEst: Allow using a custom timestamp in feed().
- RateEst: Keep a queue of the last ~100 msec worth of samples and duration, and filter out collective
samples that give a pre-estimate that seems way off.
git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@215 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
Some updates only block if there's a prior unfinished update in progress. This screws up frame time estimation
in turn screwing up vsync. To fix this we do a double update (and extra blit) if close to a frame time
period has passed since the last update when sync to vblank is enabled. I really should have noticed this earlier
as it pretty much breaks vsync adaption completely.
- Direct3DBlitter: Use the D3DCREATE_FPU_PRESERVE flag when creating device. Omitting this flag can screw up floating point
calculations in other parts of the code. For instance WASAPI cursor timestamps get utterly screwed up here.
- Direct3DBlitter: It appears that managed textures are updated before they are unlocked, which screws up redraws, making
things appear choppy in some situations. Use a default memory texture and a system memory texture and the UpdateTexure
method instead.
git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@214 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
- Direct3DBlitter: Use D3DSWAPEFFECT_DISCARD in non-exclusive mode.
- Direct3DBlitter: Allow triple buffering and vblank-only updates in non-excusive mode.
- Rename "Page flipping" in Direct3D and DirectDraw blitters to "Exclusive full screen".
git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@209 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
- Clear display buffers in DirectDrawBlitter and Direct3DBlitter in exclusive mode, since blits don't necessarily cover the entire buffers.
- DirectDrawBlitter: Make sure that a minimum amount of time has passed between calls to WaitForVerticalBlank, since it can return in the same vblank period twice on a fast system.
- DirectDrawBlitter: Support vsync for refresh rate ~= 2x frame rate
- DirectDrawBlitter: Refactor somewhat and get rid of a couple minor potential bugs.
- DirectDrawBlitter: Some tweaks to get updates closer to sync time in certain situations.
- DirectDrawBlitter: Some tweaks to better support DO_NOT_WAIT.
- DirectDrawBlitter: Make only updating during vblank while page flipping optional.
- Direct3DBlitter: Some tweaks to get updates closer to sync time in certain situations.
- Filter out very short frame times in frame time estimation.
- Don't adjust frame time during turbo, but rather skip BlitterWidget syncs to speed up, which avoids vsync limits without disabling vsync.
git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@208 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
Allow BlitterWidgets to opt in to get paintEvents while unpaused. Do so for QGLBlitter since it may need to clear buffers afterwards.
QGLBlitter: Try to blit right after sync in the case of single buffering.
git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@206 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
Revert to big f'ing switch hq2x code, as there's less duplication now. Also optimized interpolation functions further. No idea how I missed that initially.
git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@195 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
Route invalid rombank addresses in non-power-of-2 number of rombanks cases to disabled area assuming ceiled power of 2 address bus.
DMG window display disregards bg enable bit.
git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@189 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
- 44100 Hz default sample rate on OS X, since OS X tends to resample everything to 44100 Hz.
- Get rid of buffer status averaging in OpenAlEngine, since it makes assumptions on usage pattern that shouldn't be made.
- Extend ringbuffer.h to support resetting size, and move it to common dir since gambatte_qt/coreaudioengine uses it too now.
git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@185 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
Add RateEst reset method. Initialize RateEst count to 1.
Less refresh rate estimation averaging.
Allow more refresh rate estimation deviation.
Return NULL paintEngine in windows blitters that use the PaintToScreen attribute.
Add checks for things not being initialized in DirectDraw-blitter and QPainterBlitter paintEvents.
Don't reparent blitters (mainly to make a bug in Qt 4.4.3 win less annoying, widgets that do internal reparenting are still affected).
Check for window position less than screen top-left after mode change, before full screen, to avoid Qt moving it to the primary screen.
Add rate estimation to DirectSound engine.
Better underrun detection in DirectSound engine.
git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@182 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
as it's not really a per source thing at this point. If resampling avoidance is desired, then that
should rather be a user option (to depend on the OS for resampling, which is mostly nonsensical for the Game Boy/NES/PSG-system case btw).
git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@176 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24