Commit Graph

354 Commits

Author SHA1 Message Date
thrust26 a623843d37 trying to fix compile issues 2020-03-15 08:23:54 +01:00
thrust26 2646934596 add one more intermediate font option to ROM info viewer 2020-03-14 23:29:58 +01:00
thrust26 e4c394a0ac replace launcher font value "small medium" with "small_medium" 2020-03-14 13:52:37 +01:00
thrust26 da3d183e75 replace launcher's small font with bold version
add 'small medium' font to launcher font options
doc update for variable ROM viewer widths and new launcher font size
2020-03-14 11:14:24 +01:00
thrust26 de7284c1a0 define R77 paddle mapping for front ports AND OTA adapter
use "Grab Mouse" to switch mouse cursor in light gun games
2020-02-22 19:03:21 +01:00
thrust26 4b116b3aef initial work on HighScoresDialog 2020-02-11 20:28:06 +01:00
thrust26 e3f1a0f49f initial commit before refactoring 2020-01-19 15:45:32 +01:00
Christian Speckner cef81e0bb5 Settings: remove aspect in favor of scanlines adjust. 2020-01-05 00:36:10 +01:00
Stephen Anthony 9ad47ae5f3 Updated copyright to 2020. Happy New Year to anyone reading this! 2019-12-31 13:48:56 -03:30
thrust26 1295bd5cf6 get lightgun working preliminary 2019-12-30 17:27:28 +01:00
thrust26 24faa4955c Merge branch 'master' of https://github.com/stella-emu/stella into feature-lightgun 2019-12-30 09:48:04 +01:00
thrust26 bfb5bee208 make user aware of grab mouse limitations 2019-12-30 09:46:46 +01:00
thrust26 dbb4328ad5 initial work on lightgun 2019-12-30 09:11:46 +01:00
Stephen Anthony b2c70d7677 First pass at moving to default member initialization.
This fixes potential issues with forgetting to initialize in c'tors.
2019-12-28 21:14:52 -03:30
Stephen Anthony 041af0736c And yet more std::array conversions. Also a fix for overlaid UI message not being displayed. 2019-12-28 15:46:38 -03:30
Stephen Anthony 0c0f732e5f More conversions of C-style to std::array.
That's it for a little while; getting tired now ...
2019-12-27 19:22:09 -03:30
Stephen Anthony b276a1e6a7 Huge refactoring of the palette-related code.
This has been developed ad-hoc over the years, with different subsystems (TIA, UI, phosphor, Blargg, etc).  This is an attempt to consolidate the code, and also move to C++-style arrays.
Still TODO is look into refactoring phosphor stuff out of TIASurface and AtariNTSC classes, since the code is exactly the same, and doesn't really belong in either.
This is a major change, so some testing is definitely required.
2019-12-26 17:28:55 -03:30
Stephen Anthony 5d59be800e Use logical OR instead of bitwise OR. 2019-12-25 13:07:03 -03:30
Christian Speckner c38febc2c1 Update scaling in video dialog instead of framebuffer. 2019-12-17 17:16:37 +01:00
Christian Speckner 5977c8561a Connect tia.filter. 2019-12-17 17:16:37 +01:00
Christian Speckner c4d1473f81 Get rid of smoothing in favor of scaling settings. 2019-12-13 22:46:31 +01:00
Stephen Anthony 025eeba38c Convert some raw arrays to std::array.
Some fixes for warnings from Coverity.
2019-11-14 20:12:45 -03:30
Thomas Jentzsch 05cecb95b9 refactored logging and removed magic numbers 2019-08-14 12:01:15 +02:00
Thomas Jentzsch 0b2ca6572a fix #511 2019-08-10 18:08:53 +02:00
Stephen Anthony 9191f63da2 Fix dirty framebuffer issues in fullscreen TIA mode.
This requires some testing, since it potentially causes slowdowns on older systems.
I cannot find any difference on my test system (and documentation I've read seems to imply
that you should clear the screen before each update, and that it is very fast on most hardware).
2019-06-08 23:01:59 -02:30
Stephen Anthony 4a8f2f80b6 Fix PopupWidget/ContextMenu not positioned correctly in fullscreen mode.
Refactored Rect class.
2019-06-03 19:28:56 -02:30
Stephen Anthony 58b8c3458b Fix UI drawing modes when overlaid on TIA image. 2019-06-03 17:09:07 -02:30
Stephen Anthony d7754aee77 Dialogs drawn outside the underlying basedialog area no longer leave parts around.
There is still some work TODO for TIA mode; that is coming next.
2019-06-03 14:32:59 -02:30
thrust26 cb6b9cff32 add overscan message
fix scanlines message
2019-06-02 09:32:26 +02:00
thrust26 cf39f5afdf add overscan hotkeys
remove ystart hotkeys
update doc
2019-06-02 09:21:20 +02:00
thrust26 d08cd7cbbd minor code fixes 2019-05-19 10:13:55 +02:00
Stephen Anthony 33c4e81bb0 Fix minor compile warnings, including using float instead of double in a few places. 2019-05-18 20:48:13 -02:30
thrust26 95d8bb870d add non-integral TIA zoom steps (partially addresses #263) 2019-05-18 10:30:23 +02:00
Stephen Anthony 22b15d7f37 Fix warnings, and compile failure for libretro. 2019-05-17 21:53:59 -02:30
thrust26 6fc3863ef9 make Stella remember the last window position (now Center option makes a difference!) 2019-05-17 22:19:27 +02:00
thrust26 00355c01a4 remove overscan from windowed modes 2019-05-15 21:08:55 +02:00
thrust26 91e46faddf add overscan option to StellaSettingsDialog
fix dialog position when overscan is enabled
2019-05-15 20:05:17 +02:00
thrust26 94de76b78e implement emulation fullscreen overscan 2019-05-14 22:44:48 +02:00
thrust26 093fd4eb75 add hidpi option checkbox to UIDialog 2019-05-13 19:04:39 +02:00
Stephen Anthony 087dd1dbb9 Fix imageRect not being correctly set for fullscreen UI modes.
- This caused incorrectly positioning for ContextMenu
- With this fix, the positioning code in ContextMenu and related dialogs becomes a lot less complex
2019-05-12 19:12:30 -02:30
Stephen Anthony bff503a001 Refactor DialogContainer and child classes.
- instead of using a protected instance variable, each derived class now has its own private variable
- each derived class also takes responsibility for deleting its private variable
- various API cleanups
2019-05-11 22:16:23 -02:30
Stephen Anthony e7759048ca First pass at implementing 'hidpi' mode. For now, it is available with 'hidpi' option only from the commandline.
- This is still a WIP, but is already very usable; I can finally see the UI on my 4k monitor :)
2019-05-11 14:33:07 -02:30
Stephen Anthony 83a3bdd6cd GUI support is now conditional in Stella. This is enabled by default for all ports except libretro.
- When disabled, it also disables the debugger and cheatcode support
- UI-wise, this reverts Stella to 1.x functionality (before any internal UI was added)
- Eliminates 47000 lines of code for those ports (like libretro) that don't need it.
2019-05-02 17:58:39 -02:30
Christian Speckner 8e22dc52b4 Log via Logger singleton, fixes races between logging and OSystem teardown. 2019-05-01 23:14:16 +02:00
thrust26 c3483d1553 larger fonts in all dialogs when using minimal UI 2019-04-23 20:08:03 +02:00
Stephen Anthony 36da2bcabc Make sure fullscreen TIA modes actually use real fullscreen dimensions.
Previously, they would sometimes use desktop dimensions, and on current versions of SDL,
this would exclude areas meant for taskbars, etc.  So the resulting image was smaller than it should have been.
2019-04-20 18:23:50 -02:30
Stephen Anthony 5dde762b85 Changed 'tia.fsfill' option to 'tia.fs_stretch'. 2019-04-14 14:57:28 -02:30
Stephen Anthony c80e2340ea Add mappings for increasing and decreasing current vidmode.
Map the R77 F13 key to the former.
Some refactoring of the mapping code in PKeyboardHandler and EventHandler.
Some refactoring of the VidMode handling in FrameBuffer.
Option 'tia.fsfill' is now used to select 4:3 vs. 16:9 mode in fullscreen.
2019-04-08 18:44:27 -02:30
Stephen Anthony be775b53e3 Made TIA window always open at a multiple of the minimum bounds
- this means that 320x240 is now the default 'base' size, and zoom levels are based on that
- the TIA image is rendered into whatever sized window is active, meaning that NTSC and PAL modes now look similar

Removed some 'small screen' dead code in FrameBuffer.
2019-04-03 20:27:30 -02:30
Stephen Anthony 2bb633800c First pass at getting keymap working again for R77. 2019-03-31 16:42:48 -02:30
Stephen Anthony 70748f3619 Fix off-centered TIA image on R77. 2019-03-31 16:09:14 -02:30
Stephen Anthony cfe79ec0b1 Major changes to controller infrastructure.
Basically, separate high-level read/write from low-level set/getPin methods.
2019-03-29 20:47:24 -02:30
Stephen Anthony d09b6329c9 Consolidate some constants into actual enumerations/namespaces.
- Certain parts of the code referred to int literals, when they should use named constants instead
- Different classes had enumerations for the same quantities; this is now fixed
- Basically, TIAConstants and FrameBufferConstants now contain all constants, and their relationship is clearly indicated (previously it wasn't as clear)
2019-03-10 15:19:30 -02:30
Stephen Anthony 9735806b2f Partially revert commit for #368; we need more work before this can be enabled.
Fixes issue with fullscreen TIA image disappearing.
2019-02-18 18:17:08 -03:30
Stephen Anthony 275666b0af The annual copyright year update. 2019-01-01 11:35:51 -03:30
thrust26 f86ba39c88 initial update for #368 2018-12-27 11:47:41 +01:00
Stephen Anthony 09b3d980f3 Fixed 'stuck' notes when changing video modes.
This is most apparent in OSX, where toggling windowed/fullscreen mode can sometimes take up to one second,
and any sounds playing from the ROM become stuck until the operation completes.
Also present on other systems to some extent.
Sound is now muted until the operation is complete.
2018-08-31 20:52:56 -02:30
thrust26 3b00fe45cd Revert "aspect ration now affects height instead of width"
This reverts commit 0b61a71e58.
2018-08-29 16:39:18 +02:00
thrust26 0b61a71e58 aspect ration now affects height instead of width
fixes #368
2018-08-29 16:01:01 +02:00
thrust26 e9a6deee70 reversed aspect ratio settings for NTSC50, PAL60 and SECAM60 2018-08-29 15:28:24 +02:00
Stephen Anthony 7e4dc350f0 More fixes for suggestions from cppcheck. 2018-08-28 16:19:50 -02:30
thrust26 21b8fa133f dirty fix for #355 2018-08-22 11:10:45 +02:00
Stephen Anthony 31acc92bbe Fix crashes when changing toggling fullscreen/windowed mode.
- Only allow such changes when in emulation mode, or a few other common ones (launcher, debugger)
  The idea is here that some dialogs have to be resized/repositioned when such a mode change occurs, and the UI core doesn't currently support that.
- Only render surfaces when they are visible (sounds logical enough, but the code didn't check for it).
2018-08-15 13:33:08 -02:30
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