Commit Graph

662 Commits

Author SHA1 Message Date
Stephen Anthony 29e53093ba Various UI classes now have their commands prefixed by class name. 2017-10-04 18:33:24 -02:30
Stephen Anthony 90a6c35061 Removed ability to manually select CompuMate controllers (fixes #229). 2017-10-04 17:43:21 -02:30
Stephen Anthony 17f88515a7 Fixed compile errors in gcc/clang. 2017-10-04 13:06:28 -02:30
thrust26 0cbceda36d added ellipsis to audit dialog 2017-10-04 12:26:11 +02:00
thrust26 cd189050ec Fixed wrong display of swapped controllers in debugger 2017-10-03 18:42:46 +02:00
thrust26 8348525f14 before cleanup 2017-10-03 16:33:33 +02:00
thrust26 e10ca8e694 removed 'echo' and enhanced 'print' instead 2017-10-02 22:12:10 +02:00
thrust26 43e9693959 added 'echo' command to debugger prompt 2017-10-02 14:23:08 +02:00
Stephen Anthony 05b2684421 Fixes for Visual Studio project file; minor formatting cleanups. 2017-10-01 16:49:29 -02:30
Stephen Anthony 924e92214f Fixes for several minor issues in the last few commits:
- move files from src/windows to proper location
- formatting fixes to match style in other files

This fixes all compile issues in Linux; still TODO is fix Windows and OSX.
2017-10-01 16:23:53 -02:30
thrust26 c19dc0dd9f minor code cleanup 2017-10-01 20:02:11 +02:00
thrust26 39c168fb70 made SWCHA(R) editable in debugger (somewhat ugly coding here) 2017-10-01 17:48:25 +02:00
thrust26 5bc3d9c83e Improved value display for driving controller in debugger 2017-10-01 13:59:00 +02:00
thrust26 72f46c306f added new classes for "Linux & friends" make 2017-10-01 13:51:58 +02:00
thrust26 00cb377c0a finalized trackball widgets 2017-10-01 13:06:34 +02:00
thrust26 4fe9317ad2 Refactored FlashWidget, SaveKeyWidget and AtariVoxWidget 2017-10-01 12:00:07 +02:00
thrust26 f77cd9ab06 Updated VS project file, reworked SaveKey/AtariVox widget, started with implementing trackball widgets for debugger (AmigaMouse working) 2017-10-01 09:52:39 +02:00
thrust26 a92ceed195 SaveKey/AtariVox detects EEPROM areas accessed by ROM and allows erasing only these in the debugger. 2017-09-29 20:12:41 +02:00
Stephen Anthony e7b732b115 Allow access to current frame count from TIA; minor formatting cleanup. 2017-09-23 10:20:36 -02:30
thrust26 39267e2840 removed warning 2017-09-20 07:24:11 +02:00
thrust26 ba764fdc06 added _cyclesLo and _cyclesHi to debugger prompt 2017-09-19 20:49:48 +02:00
Stephen Anthony aed2945a56 First pass at continuous state saving in emulation mode, accessible by the debugger:
- Toggle this with Alt-r.  When enabled, state is saved each frame to memory (up to 100 slots)
- Upon entering the debugger, rewind is immediately available, allowing to rewind (for example) back past a breakpoint
- Testing is definitely required.
2017-09-18 20:29:52 -02:30
thrust26 2a21b497fe fixed #178 by replacing myUserCLabels with myUserLabels 2017-09-18 20:27:16 +02:00
Stephen Anthony 1d01b39f87 Minor cleanup of formatting and compile warnings. 2017-09-17 16:15:17 -02:30
thrust26 7d72265088 added TIA access tracking
improved ZP-RAM/Stack tracking
2017-09-17 10:35:45 +02:00
thrust26 cfa40722b9 updated poke(), now CPU emulation provides the flags
improved ZP/stack access tracking and output
added ZP code tracking
2017-09-16 22:37:19 +02:00
thrust26 3bf809a137 refined access tracking for ZP, Stack and IO addresses
improved RIOT RAM output in Distella
2017-09-16 17:38:37 +02:00
thrust26 7f65fad7cf preliminary implementation for ZP-RAM access tracking
extra access type flag for poke()
2017-09-16 13:48:04 +02:00
thrust26 10e6d483b1 added access tracking via poke()
code cleanup in DiStella and CartDebug
2017-09-16 08:54:32 +02:00
thrust26 5f68b0565d 2nd part of Distella updates 2017-09-15 14:56:54 +02:00
thrust26 833d0c3b0e test 2017-09-13 22:43:49 +02:00
thrust26 7af7dd3bb6 test test test 2017-09-13 22:30:17 +02:00
thrust26 9c550d4933 test test test 2017-09-13 22:28:58 +02:00
thrust26 a798dedabf test 2 2017-09-13 22:16:46 +02:00
thrust26 a515ab67f0 test 1 2017-09-13 22:15:46 +02:00
thrust26 95b04b2baa 1st part of Distella improvements 2017-09-13 16:04:54 +02:00
Stephen Anthony 86f65e8e87 Show message indicating what is being done when rewinding state (ie, '1 step', '10 frames', etc). 2017-09-11 15:58:41 -02:30
Stephen Anthony 2dc355b0d5 Debugger 'saverom' and 'saveses' now save to the default save directory.
The 'saveses' command now creates a filename based on the date and time when the command was entered.
2017-09-09 17:20:22 -02:30
Stephen Anthony b54b4eb4f6 Fixed documentation on some debugger 'save' commands; they don't take
any parameter, and choose the name (and locations) themselves.
This needs to be fixed, and will happen when I get to issue #172
(add save file dialogs).
2017-09-09 15:50:27 -02:30
Stephen Anthony b7bf3b79b2 First pass at a consistent default for load/saving files that don't have a
pre-defined location (ROM files and disassemblies, etc).
- Repurposed the snapshot load/save folders by changing OSystem::defaultSnapLoadDir to OSystem::defaultLoadDir, and similar for the save dir
- In Windows, this directory will now be 'Documents\Stella', while in Linux/OSX it will be $HOME
- Testing still required for Windows and OSX; only Linux is confirmed to work for now
2017-09-09 15:06:21 -02:30
Stephen Anthony a018dc604a Extend debugger 'dump' command to take second parameter (for end of data range). 2017-09-08 22:23:45 -02:30
Stephen Anthony b6907d0d8a Added '_fcycles' debugger pseudo-op (gives cycles since frame started). 2017-09-08 17:59:33 -02:30
Stephen Anthony ebb8725126 Refactor System::myCycles to be 64-bit instead of 32-bit.
- The cycles counter is now essentially monotonically increasing (ie, we never need to worry about it going backwards and giving a negative difference, simplifying a lot of code
- There are now reset() methods in all places that keep track of system cycles, but they are used for a full reset only; not called each frame like before (which had to be done to prevent overflow).
2017-09-08 11:29:30 -02:30
Stephen Anthony eafe102daa Refactor StateManager and RewindManager for eventual use outside debugger. 2017-09-03 23:02:15 -02:30
Stephen Anthony c2302c2e71 Cart::getImage refactoring: use uInt32, since sizes are never negative. 2017-09-01 10:23:17 -02:30
Stephen Anthony 4440aabc56 Final updates for bankswitch schemes, updating documentation.
- Some schemes are not completely documented and/or implemented, and in those cases a FIXME has been added.
2017-08-31 19:21:20 -02:30
Stephen Anthony 6cf4aa4832 Further refactoring of bankswitching schemes, and removal of 'MC' scheme.
- MC is being removed, since the code has never been tested, and a test ROM has never been created
2017-08-31 15:31:27 -02:30
Stephen Anthony 31907f4be1 More peek/poke refactoring, and improved comments in bankswitching schemes. 2017-08-31 13:01:45 -02:30
Stephen Anthony 68f80f04d9 Peek/poke refactoring for next batch of bankswitch schemes. 2017-08-30 20:44:18 -02:30
Stephen Anthony a5d9550f2f First pass at cleanup of the peek/poke API from Device class:
- remove peek and poke from classes where the addressing is set up such that they aren't needed
- where possible, move from using 'myCurrentBank << 12' everywhere, to precomputing the value (perhaps a small optimization, but still valid)
2017-08-30 19:45:57 -02:30
Stephen Anthony 2930e74333 Updated FE debugger support to allow changing banks dynamically. 2017-08-30 17:22:56 -02:30
Stephen Anthony 52c16d604b Update TIA shadow registers for HMCLR (and code cleanup). Fixes #211. 2017-08-22 16:38:52 -02:30
Stephen Anthony f280e31671 Printing of traps in debugger takes into account TIA read/write address. 2017-08-19 20:59:06 -02:30
Stephen Anthony a9dd2b32cb Debugger 'listtraps' now shows all traps (fixes #190). 2017-08-18 18:47:35 -02:30
Stephen Anthony 7a9cde3e4d CDF updates (with versioning) from Spiceware. 2017-08-14 09:11:54 -02:30
Stephen Anthony 193da6c845 Fix DiStella trying to process the same PC address repeatedly (fixes #188). 2017-08-13 13:43:48 -02:30
Stephen Anthony 025a1a7918 Minor refactoring, slight speedup of passing data in sound code. 2017-08-02 19:21:36 -02:30
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
Stephen Anthony 43c22af274 Fixed bug with missile colouring in debugger not changing colour
until after an instruction was executed.  Also, toggle-able widgets
(pixel and bits) in the debugger can now be toggled with a single
mouse click, not a double-click.  These fix issue #15.
2017-07-15 17:36:06 -02:30
Stephen Anthony adddc635f2 Pressing F12 in the debugger saves snapshots (implements #161). 2017-07-14 20:24:29 -02:30
Stephen Anthony 626ff450d9 Added ability to change debug colors from "Video Settings".
Moved ColorWidget from src/debugger/gui to src/gui, since it needs to be
compiled even when the debugger is disabled.

Minor code refactoring.
2017-07-13 18:40:42 -02:30
Stephen Anthony d9f52599dc Marked BUS scheme as experimental per authors request. 2017-07-12 18:07:40 -02:30
Stephen Anthony 10c53bce89 Make 'listtraps' less verbose (fixes #157). 2017-07-06 21:05:52 -02:30
Stephen Anthony f177aed814 Fix debugger trap documentation (fixes #156 from #164) 2017-07-06 19:45:12 -02:30
Stephen Anthony d88969adcb Store and lookup system labels (aka, equates) in case-insensitive manner.
This fixes a bug in the debugger parser, where typing (for example)
'trap swchb' doesn't work but 'trap SWCHB' does.
2017-07-04 19:50:32 -02:30
Stephen Anthony 7b57d52260 My neverending quest to protect against raw pointers.
Changed many 'const char* ...' to 'const char* const ...'.
2017-07-02 20:46:27 -02:30
Stephen Anthony 9972af022a Fairly huge refactoring of the cart autodetection code.
This has been in patch form for about a year, and I'm finally
getting around to applying it.  Basically, we separate the Cart
class into 3 classes:
  - Cart: stuff specific to cartridge emulation
  - BSTypes: various bankswitch types, both as enum and strings
  - CartDetector: actual bankswitch auto-detection code

Also made more use of smart pointers, and added const in a few
more places.

I promise to get back to the phosphor stuff soon.  This is just
to clear my head a little.
2017-07-02 19:27:27 -02:30
Stephen Anthony 2e776b05b8 Introduced 'tia.dbgcolors' commandline argument, which allows to set
the fixed debug colors to user-defined preferences.  Note that there
are 6 registers (P0,M0,P1,M1,PF,BL), and the option takes a string
of 6 characters, where each represents a colour for the respective
positional register (ROYGBP are the choices).

I may add a UI item for this, but this is as far as I will go with
allowing user editing.
2017-07-01 19:54:02 -02:30
Stephen Anthony a7b3ee4448 Debugger lst and sym files now follow ROM filename, not properties filename. 2017-06-11 13:02:47 -02:30
Stephen Anthony 44ead7b926 Updated std::map to use emplace instead of insert (optimization). 2017-06-09 14:50:11 -02:30
Stephen Anthony 79d8ed0010 Fixed TIA image in debugger being two frames behind. 2017-05-28 13:55:23 -02:30
Stephen Anthony 25e96c3164 Added previous scanline count to TIA info area of debugger. 2017-05-27 15:38:45 -02:30
Christian Speckner 744571b1da Optimization: rewrite DelayQueue w/o STL vectors. 2017-05-15 00:43:18 +02:00
sa666666 2adbe7a3fc Merge branch 'master' into master 2017-05-07 17:40:11 -02:30
Darrell Spice, Jr 490724c079 Updated BUS to new spec
The Harmony/Melody BUS driver is undergoing a major revision to add support for the new JMP FASTJUMP feature.  This update implements the changes, as well as the fast jump feature which isn't yet in the HMdriver.  It also implements the load/save state support as well as the BUS debugger widget.

A few minor updates to CDF were also done.

Note that this update breaks compatibility with the previous BUS demos.
2017-05-07 14:43:54 -05:00
Stephen Anthony 0cb9b89d7d Fixed minor compile warnings in Visual Studio. 2017-05-07 00:04:09 -02:30
Stephen Anthony 1eca60dac5 Great colon purge Part3: all debugger ROM bankswitch tabs. 2017-05-06 16:52:40 -02:30
Stephen Anthony a87334a268 Great colon purge Part2: RIOT tab and controllers. 2017-05-06 14:06:19 -02:30
Stephen Anthony 847e910d26 Added new darker colour for togglewidget background disabled bits. 2017-05-04 09:36:32 -02:30
Stephen Anthony 28b237794d Start of the great colon purge. 2017-05-03 21:03:32 -02:30
Stephen Anthony 1d30f1ddc0 Rearranged debug colours and collision widgets in TIA tab. 2017-05-03 20:01:08 -02:30
Stephen Anthony f1c35ee730 Removed code for functionality that will never be used. 2017-05-02 20:35:07 -02:30
Stephen Anthony 9416d5212c Added 'fixed debug colors to TIA tab, and rearranged buttons. 2017-05-02 18:56:03 -02:30
Stephen Anthony 0af03a3916 Debugger expressions need to be signed, since some results can be negative. 2017-05-01 20:58:31 -02:30
Stephen Anthony 2973d03e01 Added VDel and togglewidget for new/old ball in debugger TIA tab.
Cleaned up some minor spacing issues in previous CDF commit.
2017-04-30 14:42:06 -02:30
Darrell Spice, Jr 4958ca3d93 CDF updates
* Implemented load/save state.
* Updated the debugger tab, which required the following:
   - removal of : from RAM labels (part of the debugger overhaul)
   - setCrossed() functionality in the DataGrid
2017-04-30 13:39:40 -02:30
Stephen Anthony 8c756001f8 Activate player shadow registers, and align text in TIA tab. 2017-04-27 14:13:47 -02:30
Stephen Anthony f8d7253ec3 Expose GRPx read/write of new/old registers in debugger TIA tab. 2017-04-25 19:42:04 -02:30
Christian Speckner bd74b7de38 Fix delay queue widget regression caused by typo. 2017-04-25 20:36:00 +02:00
Darrell Spice, Jr 86ecaca7d9 Updates to BUS
Add digital sample support to BUS.
2017-04-25 08:38:06 -05:00
Christian Speckner f51c6c983b Show queued GRPx / ENABL shuffles in delay queue widget. 2017-04-24 23:42:44 +02:00
Stephen Anthony b0bb4bda29 Fixed crash from non-initialized value. 2017-04-24 14:03:27 -02:30
Stephen Anthony 2d58825b25 First pass at revamping debugger TIA tab (UI changes only). 2017-04-24 12:36:47 -02:30
Christian Speckner ce204901dc Flush the line cache after stepping.
Ensures that the display will match the step afterwards.
2017-04-24 00:34:25 +02:00
Stephen Anthony 3aeae9b6f6 Improvements to the debugger prompt
- commands are now properly range checked (byte, short, etc)
  - better error messages
  - internally, use 16-bit/8-bit instead of 32-bit when necessary
2017-04-15 19:00:50 -02:30
Stephen Anthony 7b8d579360 Added debugger prompt command 'debugcolors', which shows a legend
of colors used in 'fixed debug colors' mode.
2017-04-08 00:11:02 -02:30
Stephen Anthony 4e794ba778 Updated debugger prompt commands 'trap', 'trapread' and 'trapwrite'
to work like the old 'm' versions, so they work on all mirrors and
also allow one to enter a range of values to trap.  Added more
stringent error checking for parameters.
2017-04-06 20:22:00 -02:30
Stephen Anthony 9736bdd3e8 Added 'palette' debugger prompt command, which shows a colour swatch
of the currently active TIA palette.
2017-04-06 17:54:41 -02:30
Stephen Anthony 60322a10d4 The PF register in the debugger no longer shows COLUBK.
Some minor rearranging of the 'queued writes' widget.
2017-04-04 18:19:11 -02:30
Stephen Anthony d3b50b5194 Fixed some minor issues with DelayQueueWidget.
- Removed redundant code to get TIA write address labels
  - Added '$' to indicate hex output
  - Added newlines to affected files.
2017-04-04 17:38:45 -02:30
Christian Speckner 3df449603e Delay queue widget: Finishing touches
* Reorder widgets in TIA tab
    * Change background color to readonly
    * Pacify compiler warning in iterator
    * Fix typo in TiaDebug
2017-04-04 21:55:16 +02:00
Stephen Anthony 96bbba223a Various improvements to the debugger prompt:
- 'cls' now only clears the screen, and not the command history
  - 'help' accepts another command as an argument, to give more info
    about the command (ie, help breakif is now valid)
  - command completion now works on built-in functions and pseudo-ops
2017-04-04 14:17:10 -02:30
Christian Speckner 467c45e7b2 Delay queue widget: replace mock.
* Add an iterator for interating over delay queue entries
    * Dynamically build delay queue widget content from iterator
    * Refactor shadow registers to reflect a possible delay
2017-04-04 00:39:55 +02:00
Christian Speckner 8275b1a9d6 Add DelayQueue widget (mocked content). 2017-04-04 00:39:55 +02:00
Stephen Anthony 2d8ddd3296 DataGridWidgets now show different background colour by default in
read-only mode.  This allows classes that were previously written
to auto-magically work, instead of having to manually edit them.
2017-04-01 20:39:00 -02:30
Stephen Anthony faba2540f9 The debugger 'cls' no longer erases history. 2017-04-01 20:37:39 -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 58f93c1930 Fixed inheritance issue with Widget::wantsFocus() and child classes.
Changed some code in TIA class to eliminate function calls.

Minor code refactoring wrt d'tors.
2017-04-01 15:41:34 -02:30
Christian Speckner 988b36010b Positioning for missiles and ball. 2017-03-29 22:53:42 +02:00
Christian Speckner d00698c3e4 Better naming, implement player position setters 2017-03-29 22:02:15 +02:00
Christian Speckner a7fc82cbea Position readout for players. 2017-03-29 20:14:43 +02:00
Christian Speckner f1eb76303c Finish introduction of shadow registers:
* Reenable all register readouts
    * Refer to shadow registers in all readouts
    * (De)serialize shadow registers
2017-03-29 19:32:57 +02:00
Christian Speckner b3bfc86ccc Introduce shadow registers, start refactoring TIADebug to use them. 2017-03-29 18:18:35 +02:00
Stephen Anthony d819f9c7b8 Fixed overflow of text/UI items in large font mode in the debugger;
we need just a little more height.  There's similar issues for the
smallest font, but I need to think about that one a little more,
since many people are affected if we change the window size at the
smallest setting.
2017-03-28 15:18:20 -02:30
Stephen Anthony 4b56a178d8 Re-enabled 'tia' command in debugger prompt. 2017-03-24 21:27:01 -02:30
Stephen Anthony 90aa152f59 Re-enable viewing TIA sound output in the debugger.
This code is only temporary, until we more properly deal with it
in the new sound core.
2017-03-24 21:13:31 -02:30
Stephen Anthony 9fb45a0a88 Add 'TODO', to make sure we come back to this at some point. 2017-03-24 18:54:01 -02:30
Stephen Anthony 95c7b30a45 Some updates to the last BUS/CDF commit:
- update some code to the '5.0' way of doing things
  - allow compilation in Linux
  - whitespace/tab fixes to match main codebase
  - add some extra comments
  - test compile under gcc 6 and clang 5, and fix some warnings
2017-03-24 18:02:08 -02:30
Darrell Spice, Jr 6227186feb Preliminary support for BUS and CDF
Preliminary support for new Harmony/Melody drivers BUS and CDF.  Work remains for the 3-Voice Audio, Digital Sample playback, and some additional revisions to the debugger widgets.
2017-03-23 21:25:33 -05:00
Stephen Anthony b5b058c615 Made VblankManager::ystart() always return a valid ystart, either
autocalculated or fixed.  This fixes selecting a scanline with the
mouse in TIA output widget in the debugger.

Made various methods inline for issue #7.
2017-03-03 21:57:36 -03:30
Stephen Anthony 30e1996d5b Fixed reading of VBLANK register in debugger. 2017-02-20 20:42:33 -03: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 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 07287fe761 Fixed trap'm' debugger commands when setting TIA addresses. 2016-12-19 14:26:35 -03:30
Stephen Anthony afcaf8581f Make the compiler happy. 2016-12-17 21:21:09 -03:30
Stephen Anthony f982f0257f Enabled viewing TIA collision and playfield info in the debugger. 2016-12-13 12:03:54 -03:30
Stephen Anthony 7b0a82f04a Enabled some more TIA stuff in the debugger. 2016-12-13 10:57:15 -03:30
Stephen Anthony 510c103030 More of the TIA stuff in the debugger is now enabled. 2016-12-10 16:37:47 -03:30
Stephen Anthony 4d0147f3d1 Made new TIA core the default (code now compiles). 2016-12-10 13:38:28 -03:30
Stephen Anthony b9630f5e2a Re-enable compilation with DEBUGGER_SUPPORT. The TIA stuff in the
debugger is currently broken, but at least the code compiles (needed
for the Windows and OSX test releases, as they aren't set up to be
compiled without the debugger.
2016-12-04 16:05:21 -03:30
stephena 2832fbeccb Added versions of the debugger trap commands that trap on all mirrors,
not just the specified address.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3317 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2016-09-04 23:03:01 +00:00
stephena 883971985e Removed some redundant includes in various Cart classes.
Introduced Cartridge::initializeRAM() method, to eliminate duplicate
blocks of code in every bankswitch scheme that uses extra RAM.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3316 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2016-08-24 23:57:07 +00:00
stephena b0960a5fd2 Fixed what must have been a long-standing bug; typing the 'reset' command
in the debugger wasn't actually resetting the bankswitching, since it was
being locked.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3314 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2016-08-22 16:53:09 +00:00
stephena 087d382280 Added 3E+ bankswitching scheme by Thomas Jentzsch.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3311 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2016-08-21 21:37:06 +00:00
stephena 40cfd6a475 Cleaned up usage of 'using namespace ...'. I'm currently teaching that using
that approach is a bad idea (and using Stella as example code), so it doesn't
make sense to not do something as it's being taught; the correct way.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3308 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2016-05-24 16:55:45 +00: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 abf4a4a44c I was a little too eager with the 'constexpr'; it currently doesn't work on
enum types.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3300 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2016-04-02 21:27:10 +00:00
stephena dd96a80e7e Updated build requirement for Windows to Visual Studio 2015. This allowa to use 'constexpr', which this patch does for a few classes.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3299 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2016-04-02 20:46:02 +00:00
stephena 3a5cdb2d5c Moved 'swallow backtick ket in debugger' logic out of PromptWidget and
into the parent dialog box (ie, the entire debugger window), since we
don't want to allow backtick to appear anywhere in the debugger, not
just the prompt.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3295 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2016-03-07 15:36:09 +00:00
stephena dae8205029 Cleaned up a few more warnings.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3292 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2016-02-27 22:18:30 +00:00
stephena b43267f0dc Oops, forgot to remove some debugging code that fails in Visual Studio.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3288 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2016-02-24 21:30:13 +00:00
stephena 24051e4ddf (Hopefully) fixed bug when entering/exiting the debugger, whereby the
"`" key (or equivalent) was being shown in the prompt widget.

Added method stubs for clipboard cut/copy/paste/select.  Actually
implementing them will come next.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3287 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2016-02-24 20:49:49 +00:00
stephena 755611a5c1 In my quest to remove all d'tors, converted many more raw pointers to
unique_ptr.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3258 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2016-01-23 22:56:16 +00:00
stephena ed766b5bb2 Cleanup some whitespace issues.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3254 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2016-01-23 18:16:09 +00:00
stephena 143b22baec Added 'CV+' bankswitching scheme.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3253 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2016-01-23 17:58:00 +00:00
stephena a79af3717e Some minor updates to fix the Windows build from the latest round of changes.
Specifically, the stack class now takes a lambda to apply to all elements it
contains, rather than allowing direct access to each element.

git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3245 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2015-12-30 20:26:56 +00:00
stephena 5ec561a191 Fixed the last remaining C++11 "= default" for d'tors.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3244 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2015-12-30 19:07:11 +00:00
stephena f279eac86f Updated C++11 "= default" for destructors in src/debugger classes.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3242 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2015-12-29 22:39:08 +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 336536745f More Coverity fixes.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3236 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2015-12-09 17:08:52 +00:00
stephena 8b7043d74a More bugfixes as indicated by Coverity.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3235 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2015-12-06 18:12:17 +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 47911eff21 Some cleanup of redundant spacing. Now that I'm free for basically the next month,
I'll be starting work on Stella again.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3233 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2015-12-04 19:08:14 +00:00
stephena ef5f1bad4d More clang warning cleanups.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3209 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2015-09-15 15:50:25 +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 f539cef173 I decided to turn on '-Weverything' compiler flag in Clang++ to
see what errors are present in the code.  This is the first pass
in cleaning up the errors it found.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3203 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2015-09-13 23:23:12 +00:00
stephena 92fcba53a5 Fixed a few code warnings in the new jitter code.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3201 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2015-09-12 18:51:35 +00:00
stephena 4e1b4c95f9 Fixed incorrect bankswitch hotspots for 'MDM' scheme in the debugger.
Changed next version # to 4.6.5; 4.7 will include improved paddle
emulation, but it's not ready yet.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3196 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2015-09-09 16:54:39 +00:00
stephena cc7943610d Created a new class RiotRamWidget, which takes the place of the
old RamWidget.  Class RawWidget is now an abstract base class
to RiotRamWidget and CartRamWidget, allowing to share quite a lot
of code.  In the process, both classes now implement input from
the binary and decimal widgets, not just the DataGridWidget.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3195 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2015-09-07 23:12:00 +00:00
stephena 237f0e5d35 The debugger CPU area now has editable decimal and binary fields for the
registers.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3189 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2015-07-26 17:28:57 +00:00
stephena 05623c52eb Remove several BSPF defines that are obsolete.
Changed valid() method Serializer to an explicit bool() operator,
to function similar to C++ streams.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3185 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2015-07-11 22:03:12 +00:00
stephena 4792b534d5 Fairly large commit, but basically it is only enabling the 'override'
C++11 keyword.  This makes developing/maintaining class hierarchies
more manageable.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3182 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2015-07-10 18:59:03 +00:00
stephena c5819cae46 In my never-ending attempt to eliminate pointers whereever possible,
change all throws of 'const char*' to runtime_error.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3168 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2015-06-12 20:44:09 +00:00
stephena 99f88719e5 C++ streams can now use a 'string' filename; it no longer has to be 'const char*'.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3167 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2015-06-12 17:37:58 +00:00
stephena a8a30a1746 Cleaned up I/O in a few places, using C++ streams where appropriate.
For those reading these logs, I hope to get back to Stella development soon.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3166 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2015-06-11 00:26:13 +00:00
stephena e7fb7318fb Bumped version #.
Introduce namespace to class MD5, so the method call is now MD5::hash()
instead of simply MD5().

Added C++11 '= delete' constructors to most classes, to more clearly
indicate the intent of the class.  Note that this isn't absolutely
necessary, but is considered good form.  I will be teaching a C++ class
over the summer using Stella for examples, so it makes sense to follow
the standard and the textbook recommendations :)


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3164 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2015-04-26 19:02:42 +00:00
stephena 72ec5f2371 Finally fixed text-entry bug in the debugger. In the process, moved to
C++11 lambdas for enabling per-widget text filtering.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3159 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2015-04-22 15:02:17 +00:00
stephena 36229b4ee1 And so it begins (again); bumped version # for next release.
Now that there are no dirty updates, remove redundant calls to draw();
calling setDirty() is now sufficient to get the changes shown in the
next frame.  This is also slightly faster, since redrawing is done
only when necessary.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3156 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2015-03-21 20:00:00 +00:00
stephena 6f194fcd76 DataGridWidget now supports keypad +/-.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3147 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2015-02-09 19:32:28 +00:00
stephena 2549e4f4c1 Fixed error messages in state loading, and reverted some C++11 features
so that Stella is supported in GCC 4.8.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3144 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2015-02-06 16:34:01 +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 04b99e3503 Fixed some shadowed variable warnings detected by Xcode.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3111 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-12-20 22:59:43 +00:00
stephena f5ceb39149 Cleaned up the various methods for setting default mappings for the keyboard
and joysticks.  It's now easier to read/follow, and has less code.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3110 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-12-19 21:32:19 +00:00
stephena 6c900cdec5 Some minor code cleanups, and converting 0 to nullptr.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3106 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-12-13 21:00:33 +00:00
stephena 31ca88d283 Changed CartWD hotspots from $30 - $3F of the cart RAM area to the TIA area (I really need
to learn to read the specs more closely).  Changed hotspot change to trigger 3 cycles after
initiated instead of 3 address changes.

Added CartWDWidget debugger class, to view/change cart-specific functionality from within
the debugger.

Still TODO is CartWD patching.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3105 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-12-13 19:45:18 +00:00
stephena c7fc207b13 Looks like I was a little to eager with the 'auto' keyword; it broke
some code in CartDebug.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3104 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-12-12 16:50:39 +00:00
stephena ca5f456cf9 Running in autodetect mode should not start the disassembly.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3102 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-11-24 22:09:06 +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 37d9c6c99f Converted from C-style 'typedef' to C++ 'using' where appropriate.
I find the newer syntax more readable, since it acts exactly like
an assignment statement.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3088 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-11-19 12:10:45 +00:00
stephena 61aa0bb4f4 Visual Studio needs std::mem_fn in association with std::function.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3084 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-11-17 20:33:56 +00:00
stephena 3a04afcf96 Use BSPF-defined datatypes where appropriate.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3083 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-11-17 14:17:19 +00:00
stephena d5a470cbcc Debugger reset command now does a full system reset.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3082 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-11-17 12:47:33 +00:00
stephena 086658799d It looks like I can use std::function in expressions after all (keeping
in mind that YACC stuff deals strictly in pointers, and can't be changed).


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3081 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-11-17 01:50:19 +00:00
stephena f0539ae7e1 Cleaned up function calling from expressions for various debugger subsystems.
I'd hoped to use std::function, but I don't want to dive any further into the
arcane YACC syntax.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3080 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-11-17 01:36:44 +00:00
stephena 021e0caa55 Changed to std::function in DebuggerParser.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3079 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-11-17 00:08:23 +00:00
stephena a6eded9c65 Cleaned up cheat classes, replacing pointers with smart_ptr.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3078 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-11-16 21:08:21 +00:00
stephena 29fe39dd99 Made M6502 own all breakpoint/trap info instead of sharing pointers to
it with the debugger (this eliminates more new's and empties another d'tor.

Re-wrote PackedBitArray to use a bitset instead of home-made code.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3075 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-11-16 16:13:58 +00:00
stephena 526fbed5e6 Some reorganization of debugger Expression classes, and using unique_ptr.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3073 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-11-15 23:10:58 +00:00
stephena 4544f59b53 Replaced #define'd macros with lambdas where possible. Did I mention
I also love lambdas?

Minor cleanups to other parts of the code (missing virtual, cleanup
d'tors, move methods from public to private, etc).


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3071 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-11-10 23:35:24 +00:00
stephena 49eadb7463 More conversions from normal for to range-based for. Yes, I really love
range-based for that much.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3070 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-11-10 21:59:56 +00:00
stephena b863b55594 Some more optimizations and small code cleanups.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3066 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-11-10 16:13:28 +00:00
stephena 4c9e139fcc Cleaned up the OSystem code for managing Console and Debugger, removing
stuff from destructors and using unique_ptr.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3063 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-11-09 22:03:50 +00:00
stephena 5d927915ab A few more unique_ptr instances which I missed.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3061 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-11-09 13:41:55 +00:00
stephena 1b7635649c More conversions to unique_ptr, so deletes can be removed.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3060 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-11-09 04:01:31 +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 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