Commit Graph

291 Commits

Author SHA1 Message Date
thrust26 4bc3373b37 made UI theme change immediate 2018-08-12 23:01:43 +02:00
Stephen Anthony 8298ad4d26 Fixed inconsistency in passing color data to parameters.
- Now uses 'ColorId' as the datatype; this is currently mapped to uInt32, but can change in the future if required
- Eliminates needless and annoying casts in various places; all colors are now 'ColorId' type
2018-08-08 13:09:10 -02:30
thrust26 a24e042d1e changed "FPS" back into "fps" 2018-07-31 17:07:51 +02:00
Christian Speckner 81f216872d Update XCode project, fps -> FPS 2018-07-30 23:50:52 +02:00
Christian Speckner 9aeb40fc32 Display speed in OSD without decimals. 2018-07-30 23:40:48 +02:00
Christian Speckner 3a5572d3b9 Add measured FPS to OSD, squash a bunch of minor bugs. 2018-07-30 23:19:47 +02:00
Stephen Anthony e691853f0e First pass at fixing superfluous re-draws in the UI.
- This addresses issue 158, and reduces CPU usage to near 0% when no changes are happening
- This returns the code to the same performance levels as version 3.x.
2018-07-25 08:48:21 -02:30
Christian Speckner c270a45409 Merge branch 'feature/precise-audio' 2018-07-01 23:48:26 +02:00
Christian Speckner 8781889a7f Documentation, cleaup, fix race in frame stats. 2018-06-09 00:31:20 +02:00
Stephen Anthony e0cf1d1dd5 Fix crash in OpenBSD framebuffer/texture cleanup.
- It seems that textures must be destroyed *before* the renderer is destroyed
- This isn't mentioned anywhere in the SDL docs, and it works everywhere else, but in any event it is now fixed
2018-06-07 12:46:26 -02:30
Stephen Anthony 1eee879e29 Make sure onscreen messages are shown, even when a console doesn't exist. 2018-05-27 16:41:42 -02:30
Stephen Anthony cc4bd29a03 Fix minor warning (nullptr is the proper C++ constant). 2018-05-27 16:17:12 -02:30
thrust26 f726ad0206 fix #314 2018-05-27 14:31:02 +02:00
Christian Speckner a14cf8d077 Refactoring: start debugger from dispatch loop. 2018-05-24 00:13:43 +02:00
Christian Speckner ed6eae6a67 Rerender only if there is actual change. 2018-05-17 22:56:07 +02:00
Christian Speckner d2c930886b Sanitize and match emulation timing
-> no more perceivable audio latency
-> fewer underruns
2018-05-05 00:47:48 +02:00
Christian Speckner c905b01fca Merge branch 'master' into feature/precise-audio 2018-04-25 22:49:00 +02:00
Stephen Anthony 698beaec8b Fixes for various issues reported by Coverity. 2018-03-24 16:58:08 -02:30
Stephen Anthony 0cde1ec4b9 Minor refactoring with Controller::isAnalog() usage. 2018-03-18 16:13:28 -02:30
Christian Speckner 5c1bd83904 Merge branch 'master' into feature/precise-audio 2018-02-12 23:32:03 +01:00
thrust26 564e014620 removed FLAT_UI code from TimeLineWidget
added toggle mode button to TimeMachineDialog
2018-02-06 12:46:27 +01:00
thrust26 1569ee1c6b minor code cleanup 2018-02-05 13:45:34 +01:00
Christian Speckner 7d7ebb8d03 Merge branch 'master' into feature/precise-audio 2018-02-04 23:50:16 +01:00
Christian Speckner f7c445fb7c Merge branch 'release/5.1' 2018-02-04 23:48:45 +01:00
Stephen Anthony 26096fcc47 Fixed some warnings, and updates for 5.1 release. 2018-02-03 19:29:27 -03:30
Christian Speckner cb89d09c7f Refactoring: remove framerate from OSystem and Console. 2018-02-03 01:01:02 +01:00
thrust26 f4db8e4816 fixed zoom settings via hotkey (made persistent again) 2018-02-02 22:51:22 +01:00
thrust26 97a0638845 Added (fixed) tickmark intervals to SliderWidget 2018-02-01 18:21:57 +01:00
Christian Speckner 396dd637af Rework dispatch loop. 2018-01-31 20:44:39 +01:00
Christian Speckner 7f83e776b2 Keep book of the number of cycles spent during emulation. 2018-01-31 19:29:37 +01:00
thrust26 f56286fac9 reordered frame stats to make more sense 2018-01-31 08:52:52 +01:00
thrust26 7970955353 aligned transparency with TimeMachineDialog
move slightly away from corner
2018-01-31 08:37:31 +01:00
thrust26 eb96e1ca49 reduced TimeMachineDialog transparency
frame stats now always displays the real frameRate
2018-01-30 09:06:03 +01:00
thrust26 966ba155ed more response to SliderWidget added
units to SliderWidget added
enhanced various dialogs with slider units
2018-01-28 14:37:31 +01:00
thrust26 8c0b212207 Overlapped dialogs are (partially) toned down 2018-01-26 12:55:05 +01:00
thrust26 f58e914729 focus highlighting added to more widgets
added some missing tab keys to debugger
fixed frame colors for CheckboxWidget and RadioButtonWidget
brightened inverted highlight color for "Light"
2018-01-26 11:33:46 +01:00
thrust26 4c39fa3c68 some more focus highlighting added
made most sliders wider by default
2018-01-25 17:00:41 +01:00
thrust26 920b051f02 redesigned SliderWidget
better visual reaction of EditTextWidget and PopUpWidget
improved BrowserDialog
small refinement for ButtonWidget
2018-01-25 15:10:37 +01:00
thrust26 d179b8ebe8 Updated ScrollBarWidget
Refined LauncherDialog
Added missing Ellipsis to StellaFont.hxx
2018-01-24 20:53:00 +01:00
thrust26 5bd33885e3 title bar added to all dialogs 2018-01-24 14:37:07 +01:00
thrust26 5757eccfcf enabled FLAT_UI code, removed old code 2018-01-23 18:03:00 +01:00
thrust26 a8b3c0d74d reordered frame stats top line (makes more sense this way) 2018-01-21 11:05:00 +01:00
thrust26 a5e7911930 disabled test for "auto" frame rate 2018-01-21 10:19:28 +01:00
Stephen Anthony 1055a4bd06 Minor cleanup of warnings in FrameBuffer class. 2018-01-20 20:51:46 -03:30
thrust26 b67b795642 larger font for frame stats 2018-01-20 20:49:48 -03:30
thrust26 27291dd5d2 small fix for benchmark commit 2018-01-20 20:49:14 -03:30
thrust26 436c380a7e benchmark: frame stats now display real frame rate when 'Auto' is not selected 2018-01-20 20:49:05 -03:30
thrust26 6f7ff023a6 generic shadowed char/string drawing added
TimeMachineDialog fully transparent now (experimental)
info stats indicates scanline/frame rate changes in red
2018-01-20 20:12:35 -03:30
thrust26 72ff2a40fa developer/player settings added to frame stats overlay 2018-01-20 20:11:54 -03:30
thrust26 a1b54680bd frame stats overlay made transparent 2018-01-20 20:10:39 -03:30
Stephen Anthony 9e403826d2 Fixed compilation when '--disable-debugger' is used. 2018-01-20 18:34:19 -03:30
Stephen Anthony df119ba505 Minor cleanup of warnings in FrameBuffer class. 2018-01-19 18:32:11 -03:30
thrust26 98fcb51819 larger font for frame stats 2018-01-18 23:06:51 +01:00
thrust26 a6ea393905 small fix for benchmark commit 2018-01-17 19:12:39 +01:00
thrust26 b111a8c127 benchmark: frame stats now display real frame rate when 'Auto' is not selected 2018-01-17 19:03:25 +01:00
thrust26 a577b0f9c2 generic shadowed char/string drawing added
TimeMachineDialog fully transparent now (experimental)
info stats indicates scanline/frame rate changes in red
2018-01-16 11:14:26 +01:00
thrust26 b22c292f3c developer/player settings added to frame stats overlay 2018-01-15 20:25:28 +01:00
thrust26 8583883795 Merge branch 'master' of https://github.com/stella-emu/stella 2018-01-15 14:44:56 +01:00
thrust26 cef50e4368 frame stats overlay made transparent 2018-01-15 14:44:09 +01:00
Stephen Anthony 29499775dc Fixed compilation when '--disable-debugger' is used. 2018-01-09 23:16:50 -03:30
Stephen Anthony 3d879d0080 Updated copyright date to 2018. A few days early, but nobody will mind ... 2017-12-29 17:10:37 -03:30
Stephen Anthony cbb494d7ad HiDPI fixes for framebuffer messages. 2017-12-21 23:04:17 -03:30
Stephen Anthony 7890a94144 Several large infrastructure changes for upcoming Time Machine stuff:
- renamed Rewinder and associated dialog to TimeMachine and friends
 - changed EventHandler state enum to stronger 'enum class' type (and associated changes to the codebase)
 - moved EventHandlerState into separate class, allowing a few files to not need to include EventHandler.hxx (reduce compile dependency)
 - plumbed EventHandlerState::TIMEMACHINE into the codebase; still TODO is activate it and add a usable dialog)
2017-12-20 21:56:22 -03:30
thrust26 e9ef45ab0a minor consistency fix and doc updates 2017-12-19 18:10:01 +01:00
thrust26 7259af1583 "Light" color fix 2017-12-19 16:56:01 +01:00
thrust26 fabf812543 developer dialog Horizon enable fix
FLAT_UI fixes for disabled elements
2017-12-18 21:56:07 +01:00
thrust26 7f08d9b74c some more UI polishing 2017-12-17 13:28:23 +01:00
thrust26 eeb1491efd polishing FLAT_UI 2017-12-17 12:16:37 +01:00
thrust26 b05d686891 'Light' palette polishing 2017-12-17 10:09:59 +01:00
thrust26 19730fa183 third 'uipalette' scheme 'Light' added
modernized UI via 'FLAT_UI' preprocessor define added
2017-12-17 00:48:30 +01:00
thrust26 7d40d5b1f8 "Time Machine" name change 2017-12-15 18:10:40 +01:00
Stephen Anthony 434d2dfc83 Converted some raw enum to 'enum class' in FrameBufferConstants. 2017-12-14 21:29:45 -03:30
thrust26 e2301dfd5e fine tuning on interval factor and state compression
rewind now displayed immediately (instead of "Paused")
two initial rewinds in continuous rewind mode fixed
Horizon widget disabled when Uncompressed size == Buffer size
fixed minimum Interval
2017-12-13 19:15:09 +01:00
thrust26 08f29ca808 two sets for developer related options defined
reverted some changes previous changes ("colorloss", "stats" and "grabmouse" are persisted again)
2017-11-24 20:38:21 +01:00
thrust26 63f8605977 made "tia.zoom" hotkeys toggle settings temporary only 2017-11-23 23:40:37 +01:00
thrust26 d6680a681f made "color loss", "stats" and "grab mouse" hotkey toggles temporary only
added messages for "grab mouse" toggle
updates doc for "grab mouse" toggle
2017-11-23 22:13:37 +01:00
thrust26 e18474a5e9 frame stats added to Developer Setting ("dev.stats" now) 2017-11-23 11:35:28 +01:00
Stephen Anthony 522018d636 More header file reorg/optimization. 2017-11-17 13:30:17 -03:30
Stephen Anthony c2946e58d6 Header fixes take 4; 'debugger/gui' classes.
Note that this one adds a new file, and I haven't yet updated the
Windows and OSX builds (so they won't compile for now).
2017-11-17 09:03:03 -03:30
thrust26 ff57f271ea keys for rewind/unwind from within emulator added (start pause mode and work in pause mode too)
entering debugger from pause mode allowed (TODO: allow more functions)
"Pause" displays always immediately
2017-10-14 12:22:21 +02:00
thrust26 5fe51112dd fixed #214, now "usemouse.always" is checked too 2017-09-18 20:48:49 +02:00
Stephen Anthony cd689941b6 Move to C++14, now that all the minimum required compilers support it.
Clang 3.8, gcc 5, Visual Studio 2017 and Xcode 8 are now the minimum
supported compilers, and they all support C++14, so we may as well use it.

 - Change all make_ptr to make_unique
 - Change iterator begin(), end(), etc to const versions where appropriate
 - Remove UniquePtr, since C++14 supports it natively
2017-07-21 21:10:13 -02:30
Philip James f9368c681a Cleaned up a few places that still used SDL types and replaced them with BSPF types 2017-05-15 07:55:25 -02:30
Stephen Anthony 847e910d26 Added new darker colour for togglewidget background disabled bits. 2017-05-04 09:36:32 -02:30
Stephen Anthony ae65f95848 Updated debugger read-only UI items background colour. 2017-04-01 19:11:59 -02:30
Stephen Anthony 3e5df9c7bc Non-editable UI items in the debugger are now shown with a different background color. 2017-04-01 17:04:40 -02:30
Stephen Anthony c99cb33cda The TIA image in the debugger is now correctly rendered in greyscale
below the current electron beam position.

Fix long-standing bug whereby entering the debugger for the first time
and tracing/scanline advancing, the TIA image was blanked, and didn't
work correctly until you exited and re-entered the debugger.

Minor refactoring optimizations, and renaming of methods.
2017-02-20 19:51:59 -03:30
Stephen Anthony 8b4096e1ef Grabmouse is not used when using a virtual controller that doesn't output
analog data (ie, not a mouse).  This fixes the issue of mouse grabbing
when a ROM isn't even using the mouse.
2017-01-28 19:45:30 -03:30
Stephen Anthony bf1ff1aae0 Change YStart and Display widgets in GameInfoDialog to be sliders
instead of textboxes.  This allows to eliminate error checking,
since the widget will only allow sane values.

Added YStart/Display min/max variables to FrameManager, and
refactor for other parts of the codebase to use these variables.
2017-01-13 22:49:38 -03:30
Stephen Anthony abb7097cb7 Removed $Id$ stuff from codebase, since it's Subversion-specific.
Whitespace cleanup and update copyright to 2017.
2016-12-29 20:30:30 -03:30
Stephen Anthony 4d0147f3d1 Made new TIA core the default (code now compiles). 2016-12-10 13:38:28 -03:30
Christian Speckner 83417e976f Isolate TIA implementation in sub-module, remove all direct references in favor of AbstractTIA. 2016-10-30 00:31:55 +02:00
stephena 8dbd545433 After thinking about it a little, I wondered why we even need to wrap several
std:: functions into BSPF namespace at all.  So I removed them, and have the
calls map directly to the std:: versions.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3304 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2016-04-03 00:35:00 +00:00
stephena eb56efc3d5 Convert BSPF C-style macros to C++ namespace equivalent.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3302 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2016-04-02 23:47:46 +00:00
stephena 65bb073968 Got rid of another d'tor. In this case, it was redundant anyway,
since when a vector is deleted it automatically calls clear on itself.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3271 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2016-01-31 03:57:08 +00:00
stephena 2aec7bc1b1 Converted classes in src/emucore to properly use C++11 '= default'
for destructors.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3240 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2015-12-29 21:28:10 +00:00
stephena 8f2d3a6cbb Updated copyright to 2016, even though it's a few days early.
To anyone reading this, Merry (belated) Christmas and Happy New Year!


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3239 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2015-12-29 19:22:46 +00:00
stephena 9e23bc3580 Some bugs indicated by running Stella through Coverity. Note that many
of these aren't actually bugs per-se, but are to follow good programming
practices.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3234 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2015-12-05 01:30:17 +00:00
stephena 2ccebc9720 Oops, a little too much pruning, detected by compiling in OSX.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3206 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2015-09-14 21:44:24 +00:00
stephena 687b638437 Second pass at cleaning up warnings generated by -Weverything in clang.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3204 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2015-09-14 18:14:00 +00:00
stephena f1a10c3143 Eliminated superfluous drawTIA() method, made it inline.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3187 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2015-07-13 17:33:38 +00:00
stephena 26e9f15b86 Changed 'hidecursor' to 'cursor', and allowed it to set cursor visibility
for UI and emulation modes separately.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3179 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2015-06-28 18:16:33 +00:00
stephena c7ef1607be Some code cleanups.
Added updated C++14 make_unique templates, which now allow to also
use unique_ptr for arrays.

Updated SoundSDL class to use unique_ptr, eliminating another new/delete
pair.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3171 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2015-06-13 23:58:37 +00:00
stephena 6d8b115b34 Removed concept of single vs. double buffering, and simply update the frame
on every call to FrameBuffer::update().  This will the same CPU usage for TIA mode,
and a slight increase CPU usage for launcher and debugger modes.  The code to do
this was just too fragile, and not worth the extra effort.

This fixes several rendering issues, such as garbage in fullscreen mode in Linux
when using Intel GPU, triple-buffering issues in Windows, etc.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3148 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2015-03-15 17:36:46 +00:00
stephena 0afb189322 Updated copyright to 2015. Happy New Year to anyone reading these logs :)
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3131 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2015-01-01 03:49:32 +00:00
stephena c8400dcfe6 Fixed debugger 'reset' command help documentation.
Renamed 'Vlist' to 'VarList', since it's more descriptive.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3092 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-11-19 22:29:33 +00:00
stephena 690b681fe7 Convert FrameBuffer/FBSurface to use shared_ptr instead of raw pointers.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3072 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-11-15 18:29:13 +00:00
stephena db139bef1a Converted FrameBuffer surface storage to unique_ptr. In the process,
I realized that they didn't need to be stored in a map, since the integer
ID was never actually being used.  This must have been part of a proposed
API that I've since deleted??


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3062 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-11-09 15:10:47 +00:00
stephena 92aa5c2e36 Just when I thought there were no more cleanups to do ...
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3059 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-11-09 03:05:19 +00:00
stephena 4f91fd96ed A few more optimizations. It looks to be close to the end of the conversion.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3058 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-11-08 23:50:23 +00:00
stephena b89dfa7436 Updated OSX project file, fixed some minor compile warnings,
and bumped version # to 4.5 for the next release (whenever it
may happen).


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3057 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-11-08 22:40:50 +00:00
stephena 7b9169c18d Convert all arrays in the codebase to vectors, so that we get all
the advantages of C++11 (move semantics, list initialization, etc).
I'd hoped to somehow wrap a vector behind Common::Array and not have
to change the codebase to this extent, but it didn't work out.  And
I've since read that it's bad form to extend from std::vector anyway.
This is *THE LAST* bit of work I'm doing with arrays; everything is
now a proper vector.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3055 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-11-08 21:27:36 +00:00
stephena 740eeed579 You know what's better than adding move semantics and initializer
lists to the Array class?  Completely deleting all that code and
using a std::vector directly :)


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3054 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-11-07 23:28:40 +00:00
stephena 79ada8685c The long march to converting Stella to C++11 has finally started. Already,
I've found and fixed a few memory leaks.  You will need an up-to-date compiler.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3031 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-11-02 23:40:20 +00:00
stephena 920dcdb8a5 More const cleanups.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3011 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-10-21 23:02:20 +00:00
stephena f8be548312 Fixed bug in initial size for the debugger; it would sometimes try to use a size larger
than the desktop.

Some code cleanups; add const and optimize some methods.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3010 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-10-21 22:12:50 +00:00
stephena 4b6f589a4e Re-added 'uipalette' option.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2989 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-09-03 13:27:33 +00:00
stephena 8c3c668276 Applied multi-monitor fix from Magnus Lind.
Bumped version # for 4.1 release.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2987 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-09-01 21:17:33 +00:00
stephena 8da55d8eac Added infrastructure to attach a surface to a dialog, so that it can be rendered
on top of the dialog surface.  This is useful when the surfaces are using
different resolutions, and we don't want to draw the exact overlaying surface
pixels directly into the the dialog surface.

For now, this is most useful for rendering snapshots in the ROM launcher, and 
eventually it will allow arbitrarily-sized images to be scaled (in hardware)
to the picture area of the launcher.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2978 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-08-24 21:47:51 +00:00
stephena c8eed372db Updated Windows code to specifically load an icon, otherwise the default window title icon is used.
For the Windows release packages, the VS 2013 runtime libraries are now installed with Stella, so the user doesn't need to manually install vcredist.

git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2944 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-06-30 22:46:33 +00:00
stephena 2dccc2df15 Partially reverted FrameBuffer changes, since it *still* didn't fully
fix issues in Ubuntu Unity, and caused CPU usage to spike to 100% in
all other tested platforms.  So for now, I'm putting it back to low
CPU usage for all other platforms (Linux w/o Unity, OSX, Windows, etc),
and treating this as a Unity bug (which isn't unheard of).


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2935 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-06-23 15:34:25 +00:00
stephena da86a3b175 Removed the last remains of dirty-rect updating from the FrameBuffer.
This code was originally there for software mode, where it was very
expensive to update pixels, so it was done as little as possible.
However, it was also a bit of a hack, and sometimes interfered with
double-buffered hardware rendering.  So now showing the various UI's
will burn slightly more CPU, but will be guaranteed to work under
all conditions.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2934 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-06-21 20:51:08 +00:00
stephena 78f5a2acef Reworked the PNG save code a little, making it more abstract and not
having to know about TIA, Properties, etc.  Basically, it now saves
a snapshot of either the FrameBuffer or an FBSurface, and adds 
text comments passed into it.  The contents of the surface and comments
are no longer calculated (or known) by the PNG code.

This is in preparation for saving FBSurface from anywhere, which will
help in the debugger for taking snapshots.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2928 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-06-19 16:45:07 +00:00
stephena 2d32f3d39a Fixed rendering issues in OSX, by never destroying and re-creating the window.
This sometimes results in a window resize being visible, but better that than
an outright crash.  This issue has been reported to the SDL mailing list,
so this fix may be backed out in the future.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2927 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-06-17 11:49:38 +00:00
stephena d275773413 OK, I originally intended to fix FrameBuffer::scanline for SDL2,
which I though a just a one or two-liner equivalent to glReadPixels.
Turns out that SDL2 doesn't return 24-bit RGB data (only 16 or 32-bit),
so the PNGLibrary had to massage the data.  In the process, converted
the PNG saving functions to actually use PNG library functions, which
greatly simplified converting packing from 32 -> 24-bit.  Historically,
the PNG save functions were written before libpng was a requirement,
so they were hand-rolled.  Once libpng was integrated into the codebase,
it didn't make much sense to not use it anymore.

So an expected two-line code fix became this commit ...


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2919 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-06-13 13:35:41 +00:00
stephena 80bbfadb4c Fixed grabmouse and show cursor to match Stella 3.9.3 functionality.
Added 'hidecursor' commandline option, to always disable showing the
mouse cursor (useful for fullscreen-only frontends).


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2908 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-06-04 16:01:45 +00:00
stephena d09ac569e5 Finally have fullscreen/windowed mode switching working.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2904 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-06-04 12:15:54 +00:00
stephena 8f2123a5bf Aspect ratio correction is now properly applied to the TIA in windowed
and (simulated) fullscreen mode.

Fullscreen mode is now simulated in that it creates a window that matches
what would appear in fullscreen.  The next thing to do is actually have
the backend create this fullscreen mode correctly.

Changed 'gl_fsscale' to 'tia.fsfill' to more properly indicate what the
option does.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2894 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-06-02 14:34:12 +00:00
stephena d04c42580b TIA rendering and Blargg/scanline effects are now working again.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2891 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-05-14 22:04:59 +00:00
stephena c8b27ec114 Some pretty huge changes right across the board.
Changed pointers to references in c'tor calls, making things a little safer.

Removed FBSurfaceTIA, since it was tied too closely to SDL itself.  Added a
class called TIASurface that is functionally very similar, but is more generic
and accessible by the FrameBuffer directly.  Eventually, this class will take
responsibility for all things related to rendering the TIA image (Blargg TV
effects, phosphor mode, etc).

TIA rendering is currently borked; fixes will follow ...


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2889 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-05-12 23:34:25 +00:00
stephena 3a60412706 Fixed framebuffer overlay display; the messages weren't being scaled correctly.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2886 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-05-07 20:02:47 +00:00
stephena b418d5a4f5 Changed FBSurface API to access/modify source and destination rendering
rectangles.  Now that the underlying rendering is hardware accelerated,
this API more closely matches what is actually occurring.  As well, it
makes things easier comprehend: 'src' rect is the actual surface data,
and 'dst' rect is its final output onscreen (scaling, etc being applied).


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2883 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-05-04 16:59:11 +00:00
stephena 0110cd829e Fixed some minor compile issues, and updated UNIX build files to
actually use SDL2.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2882 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-05-03 17:48:25 +00:00
stephena bf283001ee Some API comment fixes, and renamed FBSurface::update() to render(),
to more clearly indicate its intent.  It looks like
FBSurface::drawSurface() is essentially the same thing, and will
probably be removed.

Fixed header issue in OSX code, that wasn't detected until moving
to Xcode 5.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2881 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-05-02 15:58:57 +00:00
stephena e7719c334e And now that the FrameBuffer class is partially working, time to break
things again :)  Work continues on refactoring the FBSurface code, and
moving thing out of the xxxSDL classes that don't really have anything
to do with SDL.  This will also make it easier to port Stella to other
graphical toolkits.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2878 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-04-30 16:53:21 +00:00
stephena 61689a9563 The TIA windowed zooming modes now work (using Alt-minus and Alt-equals).
Rearranged some of the desktop size code, to be more consistent with the
new API.

Beginning to remove the old assumptions that a smaller screen than 640x480
could be used.  In the 4.0 release, the smallest (internal) screen
supported will actually be 640x480, and if the real desktop can't display
it, then it will be scaled down.  This is one of the nice benefits of
killing pure software rendering support, and letting the hardware just
draw the screen as it likes.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2877 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-04-29 14:52:35 +00:00
stephena 0c3b9f1443 OK, just checking in to let everyone know that I haven't abandoned the SDL2
conversion.

There are changes all over the FrameBuffer classes.  Still TODO is
TIA resizing in windowed mode, and all fullscreen modes.  The infrastructure
is close to completion, and it should be pretty easy to get the framebuffer
stuff done in the next week or so.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2876 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-04-28 16:47:10 +00:00
stephena 0b3bf4b659 The framebuffer now recognizes double-buffering based on whether the render backend is accelerated, and the refresh method uses this to refresh buffers. This fixes the flashing that appears in OpenGL in Windows and OSX. Interestingly, Direct3D in Windows and OpenGL in Linux didn't exhibit this issue.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2871 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-03-08 22:57:16 +00:00
stephena c878fd926d More work on FrameBuffer, to fix flashing issues in some renderers.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2870 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-03-08 22:15:02 +00:00
stephena 9da99f56d2 The 'video' commandline option now allows to select between different
renderer backends (in SDL).  This allows to select software mode (not
recommended) or Direct3D/OpenGL in Windows.

The app icon is now loaded in Windows.

Cleaned up the VideoDialog UI, removing references to double-buffering
and OpenGL-specific settings.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2867 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-03-07 22:12:39 +00:00
stephena fdf9ed708a Removed concept of 'base' surfaces, which was an optimization for software rendering.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2862 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-03-02 02:02:00 +00:00
stephena a58fb7165e The 'center' and 'vsync' options are now honoured. Many commandline
options have changed names.  In particular, all tia-related options
now start with 'tia.'.  This includes most of the old options that
started with 'gl_'.

Changed the names of all tv-effects options from starting with 'tv_'
to 'tv.', to match the name changes elsewhere.

Some work on the documentation to reflect the latest changes.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2858 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-02-28 21:21:50 +00:00
stephena 7bebe7263d Some more work on Blargg scanlines; it's still not correct, but closer
than before.

Fixed compile issue for joystick support (thanks to email from D. Church).
Joystick support still isn't tested, so no guarantees it will work.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2857 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-02-22 17:31:16 +00:00
stephena a1ea1b0c96 OK, SDL2 is in the building! This is the first pass at porting the code
to SDL2.  For now, there are many things broken, namely keyboard handling
and fullscreen modes.  But the launcher does show up, allows to start a
game and enter/exit the debugger, etc.

The code will only compile on Linux for now, and sometimes maybe not even
then.  Expect breakage on a regular basis over the next month or so.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2854 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-02-19 15:34:22 +00:00
stephena 45d0740819 Some reorganization of the FrameBuffer classes, to move all SDL-related stuff
into FrameBufferSDL2 only.  This will make conversion to actual SDL2 code much
easier, since it won't be touching any of the core emulation code in src/emucore.
Next TODO is something similar for EventHandler (which uses SDL heavily and is
too tied to a core class).


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2846 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-02-05 22:09:57 +00:00
stephena 37b30e7b66 Some cleanups of the FrameBuffer class; 'uipalette' is no longer suported.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2845 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-01-31 16:23:10 +00:00
stephena aa5691af8a OK, it looks like I'm back to Stella development, after a several month
break.  First thing to do is update the year.  Happy new year to anyone
reading these commit logs.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2833 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-01-12 17:23:42 +00:00
stephena 9137b93c80 Some more code pruning. Basically, all classname references to OpenGL
have been changed to 'SDL2'.  From this point on, the OpenGL-specific
code will be removed, and replaced by SDL2-specific hardware-accelerated
code.

Cleaned up (mostly) the API of FrameBuffer vs FrameBufferSDL2.  Since the
FrameBuffer class is an emucore object, it should have no knowledge of SDL,
or any particular rendering toolkit for that matter (just in case we want
to move to SDL3 eventually :) ).

At this point, all checks for OpenGL have been removed, so if you don't
have it on your system, Stella will fail to compile and/or run.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2832 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2013-09-28 00:51:10 +00:00
stephena 40f9da7839 The first casualty of code pruning; specific code for window
centering has been removed (SDL2 provides this natively).


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2831 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2013-09-27 20:59:23 +00:00
stephena 1e35527f01 Added medium and large console fonts. These aren't exposed to the UI yet.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2779 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2013-07-31 16:53:39 +00:00