274 Commits

Author SHA1 Message Date
sinamas
20f81d2217 explicitly link some stuff that's not necessarily pulled in by Qt anymore.
git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@274 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2011-09-23 23:32:47 +00:00
sinamas
3b7ec3957d Support shared mode WASAPI surround mix format.
git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@273 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2011-09-19 21:48:08 +00:00
sinamas
b83ff77bc0 Fix missing cast causing 64-bit build failure.
git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@272 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2011-09-18 16:07:15 +00:00
sinamas
8680d3cbaf about edit.
git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@271 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2011-09-18 05:15:00 +00:00
sinamas
fa33f397ed edit about.
git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@270 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2011-09-18 00:02:03 +00:00
sinamas
59abf98a9b Add GBA CGB mode option.
git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@269 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2011-09-17 16:54:55 +00:00
sinamas
dcfefa4202 - Add save path selection.
- Stop using different file name for save files when forcing DMG.


git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@268 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2011-09-17 14:18:14 +00:00
sinamas
1bcfec5a76 refactoring.
git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@267 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2011-09-15 22:21:40 +00:00
sinamas
af220500e7 Dont re-initialize on resetAudio for engines that drain when paused.
git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@266 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2011-09-15 22:08:53 +00:00
sinamas
ea9394a32b Fix build error due to missing MSG declaration on non Q_WS_WIN.
git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@265 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2011-09-15 21:20:36 +00:00
sinamas
44a62dbde6 - Set worker thread MMCSS priority to "Audio".
- Flush audio on ROM load to avoid noise from previous ROM when switching.
- Deactivate undesired menu options on ROM load fail stop.
- Use fast, fail-safe ROM reset.


git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@264 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2011-09-14 22:28:37 +00:00
sinamas
d434892be6 reenable some printing on load fail due to unsupported mbc.
git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@263 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2011-09-14 22:19:10 +00:00
sinamas
a92a2763af -Be less sensitive when configuring joystick input.
git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@262 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2011-09-12 00:27:14 +00:00
sinamas
396e6838b3 - Use event driven scheduling for shared mode WASAPI.
- Include 96000 Hz as a sampling rate listed by default.


git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@261 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2011-09-11 20:51:40 +00:00
sinamas
71a555532b - Separate vsync option for exclusive full screen because it tends to work better, so you may want to enable it while leaving non-exclusive vsync off.
- Add some tool tips.


git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@260 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2011-09-11 16:03:55 +00:00
sinamas
bdbb19c1ee - Work around DWM compositor screwing up when duplicating frames by adding "DWM triple buffering" option (on by default) which sets presentparameters with frame queueing for all blitters.
- Work around DWM breaking windows with frame queuing after composition is disabled and re-enabled, by resetting present parameters on next video frame after composition enable event.
- Work around DWM breaking OpenGL window on minimize by unsetting present params on hide event, and setting on show event.
- Ignore sync to vblank when DWM composition is active.
- Deactivate sync to frame rate option when DWM composition is active.
- Make window size setting a menu rather than a part of video settings dialog.
- Work around Windows file dialog blocking events by waiting for pause to complete before launching such dialog.
- Work around events getting blocked when resizing on Windows by consuming pending blit requests on resizeEvent.
- WASAPI: Detect and use shared stream sampling rate in shared mode because all other rates appear to fail.
- Default screen names start at "1" rather than "0".
- Build fixes for mingw gcc 3.4.
- Refactoring.



git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@259 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2011-09-11 04:32:50 +00:00
sinamas
4b60088bc2 Add one level of unrolling to cic2.
git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@258 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2011-09-04 15:16:25 +00:00
sinamas
9f8c0a278f Allow intermediate polyphase sinc resamplers in a resampling chain to start/end (after fold) roll-off at limit of hearing if applicable, not just the final one.
Modify chain cost formulae and their derivatives for optimal ratios accordingly.


git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@257 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2011-09-01 21:21:17 +00:00
sinamas
61fc540ddb refactoring.
git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@256 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2011-08-25 17:35:27 +00:00
sinamas
3cec8e0aa8 refactoring.
git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@255 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2011-08-18 19:48:16 +00:00
sinamas
cf1fe30715 refactoring.
git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@254 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2011-08-18 18:15:49 +00:00
sinamas
425cf85b6a - don't wait for video frame consumption if approximate usecs from underrun is low comapred to video frame timeout.
- refactoring.


git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@253 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2011-08-15 17:44:33 +00:00
sinamas
337092b156 slightly higher precision in frametime inc/dec representation.
git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@252 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2011-08-04 00:43:06 +00:00
sinamas
c007ce9018 get rid of trailing zero artifact.
git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@251 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2011-08-04 00:20:58 +00:00
sinamas
0bda30dc27 Adjustable base frame rate.
git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@250 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2011-08-03 23:52:46 +00:00
sinamas
0e8ae6a18c refactoring.
git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@249 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2011-08-01 21:28:14 +00:00
sinamas
84e9d3820a Increase start threashold to full buffer. Block rate estimation when pcm not in running state. Default custom device plughw rather than hw.
git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@248 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2011-08-01 21:27:24 +00:00
sinamas
b3446fd934 - one more decimal position in refresh rate representation.
- use xrandr screen names
- hide empty full mode comboboxes
- windowed resolution -> window size
- lots of refactoring.


git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@247 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2011-08-01 06:01:08 +00:00
sinamas
9dc2f7ec48 - libgambatte: *
- tons of re (cgb _and_ dmg).

$ ./run_tests.sh
...
Ran 2755 tests.
0 failures.



git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@246 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2011-07-23 17:02:32 +00:00
sinamas
2efcce7cf0 - Add preliminary testrunner for automated testing.
- Many tests modified to be compatible, quite a few remaining.
- Add some of the new DMG tests, leave the rest for later. Running of DMG tests disabled for now because SVN libgambatte is out of date.
- Some tests fixed and verified on DMG.



git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@245 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2011-01-06 00:05:38 +00:00
sinamas
50fd18dc93 Fix 2xSAI video filter reading out of bounds.
git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@244 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2011-01-04 18:33:14 +00:00
sinamas
fa8b85e1c9 - Optimize save state thumbnail generation.
git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@243 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2010-04-04 16:17:40 +00:00
sinamas
05a8259f4d - Get rid of potential double free of unusable blitter.
git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@242 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2010-04-01 21:40:00 +00:00
sinamas
cec6c4288a - ignore() keyPress/keyRelease events so that global keys still function.
git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@241 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2010-04-01 19:23:35 +00:00
sinamas
91d02aa38f - Better (simpler and makes sense) hypothesis for mode3 sprite cycles.
git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@240 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2010-03-26 20:20:10 +00:00
sinamas
82459cf24d - Document libgambatte better.
- Document resampling framework better.
- Use a single constant for setting number of resampler channels rather 
than two.
- thread-safety -> thread safety


git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@239 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2010-02-04 00:14:08 +00:00
sinamas
3345e8ef21 - Move uncopyable.h to common.
- ScalingMethod header.
- length of video frame -> duration of video frame.


git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@238 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2010-02-03 20:00:38 +00:00
sinamas
94c1bbda43 - Document Qt media framework better.
git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@237 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2010-02-03 18:00:19 +00:00
sinamas
629b35a30c - Move resample files around to separate interface files from
implementation files.


git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@236 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2010-02-02 23:09:04 +00:00
sinamas
c083a4ef57 - Move Qt media framework files around to separate interface from
implementation somewhat.


git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@235 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2010-02-02 22:47:39 +00:00
sinamas
470b627fa8 - Redesign Qt multimedia framework to use a worker thread for MediaSource updates. This was a ton of work, but should make underruns a lot less likely. The majority of
underruns are caused by video I/O blocking (even when not syncing to vblank). It also means that vsync blocking is a non-issue. Lots of thread-safety considerations had to 
be done. Lots of tools developed to deal with new problems. Things redesigned to be asynchronous to avoid blocking the worker thread. New interfaces developed to give 
clients access to these things without too much pain, as clients need to deal with thread-safety issues, and be able to do things asynchronously to avoid blocking and 
unnecessary synchronization. Things developed and then scrapped as I changed my mind. Lots of thinking and testing to ensure video smoothness.
- Make configuration of the multimedia framework way more flexible, by adding methods for configuring video and sound, rather than forcing the use of the SoundDialog or 
VideoDialog. Thus clients can make their own GUI for such things.
- Pass raw input events to MediaSources so that clients will not have to use the InputDialog with its Button system.
- Split BlitterWidget blitting into three methods: blit, draw, and sync, such that blitting is supposedly a fast pixel copy or buffer swap, while draw prepares for 
presentation, and sync presents the completed video frame ASAP. Blit needs to be fast to avoid blocking the worker thread to avoid underruns.
- Allow heavy MediaSource video work to be skipped when frames are skipped.
- Do some work in parallel on SMP systems.
- Adjust low audio buffer detection to make it more robust.
- Move variance calculation to the user of estimations, because the variance calculated by estimators is not well defined anyway.
- Add support for adjustable fast-forward speed.
- Fast-forward now outputs audio, by skipping entire segments of audio when skipping frames.
- Adjust blitters to conform to the new threaded model.
- Direct3DBlitter: Apparently vertices point to the center of pixels. Subtract 0.5 from vertex coordinates.
- DirectDrawBlitter: Sleep more when far from vblank.
- QGLBlitter: Get rid of makeCurrent calls, because they apparently block and can be slow and don't seem to be needed anyway. They also seem to cause instability with some 
drivers.
- XvBlitter: Double buffer to delay updates to sync time.
- X11Blitter: Double buffer when not scaling to delay updates to sync time.
- QPainterBlitter: Double buffer when not scaling to delay updates to sync time.
- SdlBlitter: Delay updates to sync time.
- AlsaEngine: Set max periods to 16 to work around stupid ALSA plugins and drivers that advertise smaller period sizes than properly supported. ALSA always picks the 
maximum number of periods allowed, which means it picks the smallest period size allowed for a given buffer size.
- QPainterBlitter: Don't disable updates when not paused, because this breaks macx.
- Support pause on focus out.
- Add MiscDialog to allow user configuration of fast-forward speed and focus policy.
- Separate sync to refresh rate logic from sync to vblank logic.
- Sync to refresh rate menu option.
- Use semi-bilinear filtering rather than bilinear filtering for soft-scaling blitters.
- MakeSincKernel: Consider rounding effects when computing absolute gain.
- MakeSincKernel: Use a function pointer rather than a template argument to reduce code bloat.
- Reorder sinc kernel phases.
- PolyPhaseConvoluter: Simplify some calculations.
- Replace Hamming and Blackman windowed sincs with Kaiser windowed sinc of appropriate betas, because they require a lower number of taps to achieve the same specs.
- Use rounding shifts in resamplers for higher precision and performance.
- libgambatte: Update returns on video frame completion rather than using a callback for notification.
- libgambatte: Move video filters and color conversion out of the library.
- libgambatte: Get rid of unnecessarily complex VideoBlitter interface.
- libgambatte: Use bit flags rather bools for input state.
- Change some parameters to constants in 2xsai and hqx video filters.
- Probably other stuff I've forgotten about.



git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@234 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2010-02-02 21:30:46 +00:00
sinamas
523ae5ed40 - swscale.h: Add semiLinear scaler, which is almost as sharp and fast as nearestNeighbor for large scales, yet reduces aliasing like the linear scaler.
- swscale.h: Center nearest neighbor bias.
- swscale.h: Optimize a bit more.


git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@233 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2009-07-18 23:04:06 +00:00
sinamas
ad9455f9ff - ossengine: Reduce number of requested fragments again slightly to 6, because OSSv4 has a default minimum fragment size of about 10 ms causing excessive minimum latency.
git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@232 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2009-07-11 00:09:23 +00:00
sinamas
f267e2a5cd - ossengine: Fix horribly broken rate estimation on OSS4 (and possibly other implementations) by using GETOPTR rather than GETOSPACE.
- ossengine: Increase number of fragments requested from 4 to 8 for more accurate OSPACE/OPTR information with OSS4 (and possibly other implementations).
- ossengine: Minor include corrections and namespace fixes. Use log(x)/log(2) rather than non-c++98 log2. Minor rounding fix in fragment size calculation.


git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@231 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2009-07-10 04:13:48 +00:00
sinamas
2ca5d845b2 AlsaEngine: Set start threshold to half the buffer size, to avoid (possibly infinite) repeated xruns due to ALSA's default threshold of 1 frame.
git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@230 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2009-07-08 18:18:32 +00:00
sinamas
0d83920ade - Use RGBA internal texture format, as it usually means less conversion.
- Get rid of pointless initialization of OpenGL state that is equal to 
the default, or otherwise meaningless. Enable GL_CULL_FACE in case it's 
slightly faster in some configurations.


git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@229 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2009-05-07 17:16:22 +00:00
sinamas
57f750768a - Use MinKeeper to schedule Memory::events.
- Remove old incEndtime function since it's not worth the maintenance 
overhead.


git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@228 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2009-04-15 02:20:57 +00:00
sinamas
c2938c3eb8 - Add data structure that efficiently keeps track of the minimum of a
small, fixed set of variables, using templates to autogenerate 
efficient, unrolled functions that update the binary tree for each 
variable. It also efficiently supports priorities among variables when 
their values are equal, and can give variables that change the most 
frequently a better spot in the tree if the number of variables isn't a 
power of 2. Will be used for event scheduling.


git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@227 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2009-04-15 02:18:34 +00:00
sinamas
6d2c28629e - Lyc0irq on display enable.
git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@226 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2009-03-23 21:25:14 +00:00
sinamas
519ed954a9 Update changelog for 0.4.1
git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@225 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2009-01-10 22:41:54 +00:00