54 Commits

Author SHA1 Message Date
sinamas
2f853289f8 break line.
git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@353 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2012-09-11 22:23:19 +00:00
sinamas
778e4fe028 s/getStr/str. s/getChar/character.
git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@352 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2012-09-11 22:22:31 +00:00
sinamas
5a8a9eabd0 s/getDesc/desc/
git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@351 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2012-09-11 22:12:28 +00:00
sinamas
d9891dc87e refactor.
git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@350 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2012-09-11 22:10:58 +00:00
sinamas
9db3603c9b add game pak info method. do not print in libgambatte.
do print rom title and game pak info in qt/sdl ports.
add header checksum info.
add [bad] to qt window title if header checksum is bad.

git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@346 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2012-09-10 21:49:36 +00:00
sinamas
7fa1c33a94 return more informative load result.
don't print errors in libgambatte.
use error code string in ports for more informative error message.

git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@345 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2012-09-10 21:46:38 +00:00
sinamas
ccf3bdd661 delete man pages
git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@332 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2012-08-20 19:23:02 +00:00
sinamas
18d200aa86 less template bloat
git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@320 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2012-07-08 15:39:27 +00:00
sinamas
96537c1950 - Provide option to use heuristics to support certain multicart MBCs disguised as MBC1 (Bomberman Collection, Mortal Combat I & II, Super Chinese Land 1,2,3 Dash, maybe others)
git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@277 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2011-09-25 13:44:59 +00:00
sinamas
63b72e0bd7 Facilitate overriding CC and CXX from the command line.
git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@275 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2011-09-24 14:52:45 +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
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
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
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
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
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
498c85f467 Add "force DMG mode" option.
git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@188 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2008-10-24 05:09:37 +00:00
sinamas
9feeeed04d - Add CoreAudio engine with rate estimation and buffer status support. Default engine on Mac OS X.
- 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
2008-10-24 02:51:13 +00:00
sinamas
ad8abc4355 Fill available buffer space before waiting for more.
Audio buffer command line options.
Use half video frame sleep time if audio buffer is close to underrun.
Adjust estimated frame time each frame.


git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@172 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2008-10-16 01:49:32 +00:00
sinamas
d99b8f5736 Skip resampling when fast-forwarding
git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@169 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2008-10-15 00:10:50 +00:00
sinamas
2626fd78ad - Real-time, sophisticated resampling framework with several performance/quality profiles for dynamically generated windowed sinc and CIC chains based on analysis of
fourier transforms and optimal cost equations. Fast 2-tap linear as a low quality alternative.
- libgambatte: Use deltas and a running sum to decrease buffer writes in sound emulation sample generation.
- libgambatte: Rearrange sound emulation event loop to optimize for high-frequency event units.
- libgambatte: Initialize palette arrays to avoid valgrind noise.
- Don't do resampling in libgambatte. Update API to reflect this.
- Move non-emulation common code to a common directory to avoid duplication.
- Update front-ends to new libgambatte API.
- Utilize resampling framework in front-ends. Selectable resamplers.
- Improved adaptive sleep class that estimates oversleep.
- Gambatte SDL: Estimate actual output sample rate in terms of OS timers and derive frame rate from it.
- Gambatte SDL: Move AudioData and RingBuffer classes to separate files.
- Gambatte SDL: Make underruns slightly less painful, by resetting buffer positions.
- Gambatte Qt: Update AudioEngine to support sample rate estimation in terms of OS timers.
- Gambatte Qt: Implement sample rate estimation in ALSA and OSS audio engines.
- Gambatte Qt: AlsaEngine: Revert to using snd_pcm_avail_update for buffer status since snd_pcm_delay may consider external latencies.
- Gambatte Qt: AlsaEngine: Use snd_pcm_hw_params_set_buffer_time_near. Don't request a particular number of periods per buffer.
- Gambatte Qt: AlsaEngine: Use hw as default custom device string, rather than hw:0,0.
- Gambatte Qt: OssEngine: Don't trust GETOSPACE fragment info.
- Gambatte Qt: Estimate optimal frame rate based on sample rate estimations.
- Gambatte Qt: Extend BlitterWidget to support estimation of vsynced frame rate in terms of OS timers.
- Gambatte Qt: Implement vsync frame rate estimation in QGlBlitter, Direct3DBlitter and DirectDrawBlitter.
- Gambatte Qt: Use a combination of OS timer sample rate estimation and vsync frame rate estimation to derive resampling ratio for no-frame-duplication vsync.
- Gambatte Qt: Change API to reflect MediaSources not being responsible for resampling.
- Gambatte Qt: Make sure to parent PaletteDialog list model, so it gets deleted properly.
- Various refactoring, small changes and stuff I forgot.


git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@165 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2008-10-13 21:08:08 +00:00
sinamas
73feaf6c06 Fix GCC 4.3 warnings about people getting confused by operator precedence by adding parentheses.
git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@159 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2008-07-11 20:56:40 +00:00
sinamas
43d47f32fd add save state actions to GUI menu
clean up GUI menu creation code
move GUI recent files to submenu
move state 0 OSD pos to rightmost to match kbd layout
state 1 default on ROM load
support external save state files
add number key slot selection shortcuts


git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@145 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2008-05-20 07:59:18 +00:00
sinamas
881138560f save state selection
save state osd preview snapshots
fix a few potential security holes when loading invalid state
get rid of some undefined behaviour in statesaver
always draw in rgb32, color convert afterwards, too bad for maemo/16-bit
depth users
get rid of silly c string stuff


git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@142 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2008-05-05 01:07:25 +00:00
sinamas
bcae9f7213 Decouple Qt GUI from gambatte.
Lots of cleanups, flexibility added, setting of various properties, frame time,
aspect ratio, button events, video sources, sample rates, pauseOnDialogExec, custom menus etc.
Document some interfaces.
Support for setting approximate sound buffer latency.
Use rational math for 100% exact timers (even though the actual system timers are unlikely to be accurate).
Add fast-forward to input settings.
Scalebuffer dstpitch aware.
timeGetTime() fallback for win32
Store full screen mode values/text rather than less reliable indexes.
Repaint on xvblitter port changes to avoid color key not getting repainted.
stuff I forgot


git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@120 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2008-02-12 12:59:18 +00:00
sinamas
630e0e6c3a int width deps. Gambatte namespace
git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@112 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2007-12-25 19:32:18 +00:00
sinamas
0eff1ebf58 saner placement of fill_buffer function
git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@100 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2007-10-27 08:23:38 +00:00
sinamas
2a88f2e4c5 less retarded indenting
git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@99 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2007-10-27 08:19:57 +00:00
sinamas
8b57e80a67 update documentation
git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@94 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2007-10-25 11:57:46 +00:00
sinamas
076acf18d7 don't die if audio fails
git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@88 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2007-10-07 05:35:47 +00:00
sinamas
bebe746ae5 Add option to list valid input keys
git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@86 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2007-10-06 17:23:23 +00:00
sinamas
9a141768a3 add option for sample rate choice
git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@85 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2007-10-06 16:01:44 +00:00
sinamas
0cdd383414 bump to elaborate previous commit: Use cond/mutex for thread syncing, RAII.
git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@84 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2007-10-06 15:36:06 +00:00
sinamas
ff4caf50e6 refactor
git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@81 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2007-10-06 15:22:02 +00:00
sinamas
57c1b80c58 Add sw and yuv overlay scaling.
git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@77 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2007-09-20 11:39:34 +00:00
sinamas
860577e1d7 Fix horrid "turbo can affect emulation" bug.
git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@76 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2007-09-18 17:24:11 +00:00
sinamas
bba5ceb256 Add input config support. Add joystick support. Don't bother hashing.
git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@75 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2007-09-18 17:21:50 +00:00
sinamas
61530bc1c0 no need for the Option class to include the hash any more
git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@73 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2007-09-16 15:14:52 +00:00
sinamas
78b2782733 use std::map for parser
git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@71 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2007-09-16 10:52:50 +00:00
sinamas
3ddd17ecc6 add -Wextra to default compile flags
git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@62 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2007-09-05 16:22:06 +00:00
sinamas
50a2e9d951 make sure to use std:: despite sloppy compilers allowing omission. thanks to blargg for the reminder.
git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@61 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2007-09-05 16:08:46 +00:00
sinamas
3039aed547 increment iterator so the loop makes sense
git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@59 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2007-09-05 15:19:22 +00:00
sinamas
c1fee68e62 Compile on more platforms. Thanks to Thristian for the find.
git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@58 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2007-09-04 09:56:59 +00:00
sinamas
7c8c64cb16 Thread safety, bigger buffer
git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@54 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2007-09-01 13:11:36 +00:00
sinamas
f3b412cefe Add zip support. Thanks to Nach.
git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@50 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2007-08-30 12:26:25 +00:00
sinamas
b771cfdf81 add man pages
git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@46 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2007-08-29 13:10:52 +00:00
sinamas
9d8b99a6fd Support command line arguments.
git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@44 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2007-08-28 22:16:53 +00:00
sinamas
049929b8a4 Support external CPPFLAGS and sdl-config
git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@42 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2007-08-28 14:14:00 +00:00
sinamas
06203ecde1 Print usage on argc < 2
git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@37 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2007-08-28 08:12:24 +00:00
sinamas
23f0200a0a Print version
git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@25 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2007-08-26 16:35:08 +00:00