Commit Graph

52 Commits

Author SHA1 Message Date
jdgleaver
8aaa6c0af2 Prevent segfaults due to audio buffer overflows 2021-05-18 17:33:09 +01:00
Francisco Javier Trujillo Mata
484b7ebaa7 Add PS2 and ABGR1555 support 2021-01-17 16:03:55 +01:00
Autechre
8ee716676c
Revert "added per-sound channel individual volume core options (#166)" 2020-12-24 16:11:09 +01:00
eadmaster
a0a0f84238 added per-channel volume core options (#166)
fixes for max and 0 volumes

reworked accumulateChannels to preserve volume effects

minor fixes

reverted soChVol_ to long
2020-11-29 20:45:35 +01:00
Raphaël Zumer
dca35e5831 Update GBC memory map 2019-04-15 16:51:03 -04:00
Raphaël Zumer
2bad4ec330 Map banked RAM, not bank 1 RAM, for libretro 2019-04-06 03:36:29 -04:00
jdgleaver
838630dc07 Update GBC colour correction using results from Pokefan531's latest research
(https://forums.libretro.com/t/real-gba-and-ds-phat-colors/1540/174)
2019-03-28 16:17:54 +00:00
jdgleaver
0495df62a6 Add optional 'dark filter' (a.k.a. eye saver, for use with games with white backgrounds) 2018-10-22 15:42:42 +01:00
jdgleaver
3270e361aa Add 'accurate' colour correction method derived from Pokefan531's gbc-colour shader 2018-10-17 13:22:40 +01:00
meepingsnesroms
522cdc13a1 Put back auto mode, prevent palette corruption in gbc games, etc...
Use official gbc gb mode switch value (instead of arbitrary 0x85 I used
before)
2017-02-12 18:41:51 -08:00
meepingsnesroms
7f72e1af81 HUGE update
GB on GBC support.
No more Auto,GB,GBA you choose your console and attempt to run any rom
you want.(With any bootloader you want)
GB in GBC mode with bootloader supports auto and manual palettes.
Cleaned up a few typos.
2017-02-11 18:57:34 -08:00
Brad Parker
fddcf2a166 style cleanup, use libretro-common string and file I/O functions 2017-02-09 21:06:44 -05:00
meepingsnesroms
0a311013cc Added void* userdata and fixed whitespace 2017-02-07 16:48:27 -08:00
meepingsnesroms
c4451b98eb Fix style requests 2017-02-05 18:07:45 -08:00
meepingsnesroms
9667d9b8e2 No globals 2017-02-04 11:40:08 -08:00
Andre Leiradella
c7c476e4d3 Move the pointer constantness as deep as possible. 2016-11-12 12:14:23 +00:00
Andre Leiradella
09ee33f60e Passing the Zero Page pointer directly in the memory descriptor since the Interrupt Enable Flag can be read from it; added a memory descriptor for the OAM RAM. 2016-11-12 00:32:29 +00:00
Andre Leiradella
afd6509b2b Expose the Zero Page RAM and the Interrupt Enable Flag via the memory map interface. 2016-11-10 21:17:12 +00:00
twinaphex
563414e648 Add HAVE_NETWORK ifdef, enable it for Android/iOS/QNX/Windows/Linux/OSX 2016-08-07 03:12:06 +02:00
UnimatrixX01
bbd43ed509 Adding support for linking 2 Game boy emulation sessions over a network. 2016-08-06 12:09:14 -05:00
Andre Leiradella
6a2f504441 added sram and rom to the mmaps; many fixes 2016-05-11 21:13:51 -03:00
Andre Leiradella
c0971b3616 fixed the mmaps 2016-05-11 10:13:57 -03:00
Andre Leiradella
abece0b169 added a spetacular hack to support cheevos 2016-05-08 23:22:22 -03:00
Alcaro
44500ac759 C++ source code is not executable. 2015-06-14 12:31:23 +02:00
twinaphex
72860ebcc4 Backport 'more flexible and less confusing return type. ' 2015-02-18 07:14:58 +01:00
twinaphex
459c2ffba2 Start implementing retro_cheat_set/retro_cheat_reset 2014-12-06 18:13:37 +01:00
twinaphex
bf44861281 Start backporting Gameshark/Gamegenie code 2014-12-06 17:59:36 +01:00
Alcaro
b3c2de90f8 Add a core option for color correction. I hate those private things, there's so many layers of bullshit to trudge through. 2014-06-13 12:58:38 +02:00
twinaphex
29cfb85527 Backport patch 96537c1950 2014-04-19 08:03:58 +02:00
Alcaro
4f013b79aa This should fix Mario Land 2 being purple... should... 2013-11-23 12:21:24 +01:00
Alcaro
434ea5dfab Shift all those uint_least32 to a custom, variable typedef. Still tries rendering 32bpp to a 16bpp buffer, though. 2013-11-22 22:01:44 +01:00
twinaphex
da1d4f8d14 (QNX) Fixes build for QNX 2013-03-29 17:18:23 +01:00
Themaister
1e975642dd Remove lots of file loading. 2011-11-21 20:23:48 +01:00
Themaister
bd7badaa51 Massive save state clean. 2011-11-21 19:15:55 +01:00
Themaister
90b705dd20 Hacky save states, but it's fast enough it seems :) 2011-09-25 18:55:08 +02:00
Themaister
6299e3a66a SRAM works ... 2011-09-25 18:08:51 +02:00
Themaister
a97b7a7f48 Got picture! :) 2011-09-25 15:53:00 +02:00
sinamas
dfcfa2172e 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
644441168c 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
962dc11503 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
e1470f5279 - 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
a42f267354 - 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
350533a224 - 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
b061b5db6c 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
5bbabdcfdd - 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
a55d12f145 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
686e286d6a 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
8a07c109f3 save state infrastructure,
clean up video timing code,
use save state for initialization and reset,
do color conversion outside filters, fast rgb32ToUyvy,
add overlooked oamdma event,
adjust subcycle irq timing (shouldn't affect anything),
various refactoring


git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@126 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
2008-03-03 11:59:46 +00:00
sinamas
b0a08bd380 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
0efb5148f3 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