Commit Graph

458 Commits

Author SHA1 Message Date
stephena 2d9d487300 Fixed bug with autoexec.stella debugger file not actually executing its
contents.  The file was being accessed and read, but the commands it contained
weren't being executed!  This bug appeared in April 2010, so it looks like
not many people are using this feature (or at least they're not reporting it).

Cleaned up a few compiler warnings in DebuggerParser class.

Bumped version # for beta release.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2254 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2011-06-11 22:45:50 +00:00
stephena e2c736263f Updated Windows code for recent FilesystemNode class changes.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2253 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2011-06-11 15:59:19 +00:00
stephena d1ea17711b Remove notion of 'current directory' from the file handling
for UNIX systems.  Pathnames are always accessed internally as
full/absolute pathnames, and while they can be loaded and saved
with the '~' symbol (to indicate the users home directory), they
are still always mapped to absolute paths.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2252 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2011-06-11 15:58:42 +00:00
stephena cb3f0e96ba Zero-byte ROMs are now rejected, instead of being loaded as Supercharger ROMs.
Fixed bug in handling analog axes with jitter; they were overriding events from
digital, hat and keyboard input.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2251 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2011-06-09 20:50:19 +00:00
stephena df71aa03d1 Cleaned up the FilesystemNode API a little, removing some redundant code.
The debugger 'saverom' command now uses absolute filenames, and by default
will save data in the users home directory if a proper path isn't included
in the filename.  This fixes a major bug where ROMs were being saved to
the current or application directory, which in some cases were invalid
locations.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2250 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2011-06-09 14:00:30 +00:00
stephena 4c59d810f1 Grabmouse now has a hotkey (again). Fixed mouse motion handling in
several cases (fixes problems when moving the mouse too fast or
when changing between video modes).  Added extra signature to the
bankswitch autodetection for the 4A50 scheme.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2249 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2011-06-07 13:40:59 +00:00
stephena 2b9f625f76 Re-enabled 'grabmouse' functionality with a few changes:
- it doesn't have a hotkey any more
  - it is changed in the "Input Settings' UI, not in 'Video Settings'
  - it only has meaning while in emulation mode
  - it is enabled by default


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2245 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2011-06-02 20:53:01 +00:00
stephena d5ce0042e4 Tweaked the mouse motion detection for invalid values, and bumped version #
for the next point release.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2244 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2011-06-02 19:25:52 +00:00
stephena 670b61a15a Fixed a few compiler warnings, and bumped version # for final release.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2240 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2011-05-28 14:00:12 +00:00
stephena 87e3a71580 Fix bug with unwanted mouse movement after changing video modes.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2239 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2011-05-28 01:14:14 +00:00
stephena 975d221606 And right away, I forgot something for the 3.4 release.
That's why I'm not bumping the final version number until
just before the release ...


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2238 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2011-05-27 15:51:16 +00:00
stephena 0eff1696a0 Final updates for the impending 3.4 release.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2237 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2011-05-27 15:48:35 +00:00
stephena 80daacef8f Updated VS 2005 project files for recent class changes.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2236 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2011-05-26 18:55:11 +00:00
stephena edc73b0487 Updated VS 2010 project files for recent class changes.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2235 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2011-05-26 18:51:33 +00:00
stephena bc7daa397e Added ability for the debugger to start up in 'fatal error' mode.
This basically shows a messagebox as soon as the debugger starts,
describing the error and offering the choice to continue debugging
or exiting the ROM entirely.

The DPC+ code now catches fatal errors from the Thumb ARM
emulation code and shows it as a fatal error in the debugger.
This means you no longer need to look at the commandline for
this output, and you immediately know that something has
gone wrong.

Added 'exitrom' debugger parser command, which completely exits
from the debugger *and* the ROM, going back to the ROM launcher.

Cleaned up the API a little, rearranging some classes and
adding references instead of pointers.  More work to be done
in this area.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2234 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2011-05-26 16:14:46 +00:00
stephena db46773ea1 Fixed compile error WRT printf statements in Thumbulator, and fixed
a potential segfault in CartDPC+.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2233 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2011-05-25 19:14:47 +00:00
stephena 5025a21d92 Updated Thumb ARM emulation to log its output instead of printing to the
console (which doesn't exist on every platform).  Also use proper C++
stringstreams instead of C-style arrays (which are evil).  If an exception
is thrown, start the debugger with a fatal error message.  Currently, this
message is simply printed in the debugger info window.  Still TODO is add
a dialog to show the entire input from within the UI, as well as a way
to exit the ROM when a fatal error occurs.

Cleaned up the API a little, adding explicit declarations for when a method
can throw an exception.  Also merged some empty classes directly into their
header files.

Added functionality to the System class for querying whether it has 
been reset while in 'autodetect' mode.  Autodect mode is defined as
when Stella starts and temporarily runs to autoconfigure itself.
Some classes (such as Thumb ARM emulation) need to know this, and
suppress debugging output/throwing exceptions when not running in
normal emulation mode.

I hope to have a new release done by the end of this week, or the end
of the month at the latest.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2232 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2011-05-24 16:04:48 +00:00
stephena 4e6d4cb1c6 Cleaned up some inlines that weren't needed.
Updated documentation with info about 2600-daptor, including
usage and its creator.  Also included more in-depth explanation
for the various controller types.

Errors from the Thumb ARM emulation code are now caught as exceptions,
and thrown to the parent class instead of calling exit() and simply
crashing Stella.  For now, the messages are simply printed and
emulation continues.  This will be expanded to show a detailed crash
log in the debugger, and offer the option to exit the ROM.

Removed most of the menus from the OSX port.  They weren't being
maintained anyway, and most of them didn't work.  I've modelled this
on the way other cross-platform OSX programs work (notably, ScummVM).
Basically, there are menus for exit and help, but otherwise you
should use the menuing system in the application itself.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2231 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2011-05-10 15:04:19 +00:00
stephena 2da201c4a2 Added controller types 'Paddles_IAxis', 'Paddles_IDir' and 'Paddles_IAxDr',
which are specialized paddles classes that invert the axis, direction,
and axis+direction, respectively.  Updated all applicable ROMs in the
properties database.

Cleaned up the menus in the OSX port; some of them weren't even tied
to anything.  I'm seriously considering removing them all, except for
the Help and Quit items. 


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2230 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2011-05-06 19:58:56 +00:00
stephena 9cbd6fe94b It seems that the NIB format for the OSX project files has changed.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2229 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2011-05-06 14:46:07 +00:00
stephena 264145a939 Huge improvements to paddle and mouse handling:
- mouse can now emulate joystick, booster-grip and driving controllers
 - digital and mouse sensitivity for paddles can now be tweaked
   separately, and have a greater range
 - the mouse now correctly honours its controller setting, and only
   controls a device on one one port (not both at the same time)

Added support for 2600-daptor device.  Credit for creator of device
is forthcoming.  This device is basically an updated Stelladaptor,
with improved handling for paddle data.

Grabmouse functionality is no longer user-definable; the mouse is
always grabbed while playing a game, and released otherwise.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2228 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2011-05-06 14:29:39 +00:00
stephena 329f553f09 Retired the GP2X and WinCE ports. This code has been updated in years,
and doesn't currently compile.  I don't have the hardware to develop
it any further, and no longer have the time in any event.  If someone
steps up to continue support, it can be added back into the codebase.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2227 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2011-04-22 18:57:20 +00:00
stephena 9cbc1384f4 Updated VS 2010 project files for recent Event class changes.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2226 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2011-04-22 18:50:53 +00:00
stephena 9796fa5384 Updated VS 2005 project file for recent Event class changes.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2225 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2011-04-22 18:47:56 +00:00
stephena a028e5327d Minor cleanup of Event class, removing redundant variable.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2224 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2011-04-22 18:45:13 +00:00
stephena a0dcc9b459 Test for SVN not working correctly in Linux.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2223 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2011-04-22 18:36:06 +00:00
stephena f8a2e1c47a Updated Linux build script for recent Event class changes.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2222 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2011-04-22 18:26:08 +00:00
stephena e85d810032 Updated OSX project files for recent PNG changes.
Speed up the Event class by making all members inline.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2221 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2011-04-22 18:21:46 +00:00
stephena 15fa2a846c Updated VS 2005 project file for recent PNG changes.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2220 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2011-04-22 12:42:58 +00:00
stephena e41ecc9ef5 Updated VS 2010 project file for recent PNG changes.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2219 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2011-04-22 12:36:25 +00:00
stephena 94c34ddb72 Updated internal PNG library code to latest released version (1.5.2).
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2218 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2011-04-22 00:04:04 +00:00
stephena 138c03090f Updated Win32 project files for Thumb ARM support (it is always enabled,
but can be disabled by removing the 'THUMB_SUPPORT' directive from the
Visual Studio project file).


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2217 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2011-04-16 23:54:06 +00:00
stephena 72185d0848 Cleaned up formatting in Thumb ARM emulation code.
Wrapped THUMB ARM emulation in a define, so that it can be excluded
from builds.  To enable it, the 'THUMB_SUPPORT' directive must be
included in the build process.  This has been added to the OSX
project files, but is still TODO for Linux and Windows.

Removed some obsolete include paths from the OSX project files,
dating back about 5 years or so.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2215 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2011-04-16 16:53:41 +00:00
stephena bcb8dfbc2b First pass at fixing formatting issues in the ARM emulation code.
Also fixed warnings when compiling on 64-bit compilers.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2214 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2011-03-09 14:21:32 +00:00
stephena 4d16be1049 Some last minute ARM-emulation changes for the 3.3.01 test release.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2212 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2011-01-31 03:07:52 +00:00
stephena 7a59e89765 Final changes for 3.3.01 test release.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2210 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2011-01-30 13:32:21 +00:00
stephena fc44b175b2 Updated some dates to 2011. Hopefully I'll find some time over the
next week or so to get back to Stella development.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2209 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2011-01-28 16:18:35 +00:00
stephena a71158e1ce Some more changes to the DPC+ ARM emulation code.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2208 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2011-01-23 14:16:02 +00:00
stephena ec9c865ec9 Updated VS 2010 project files for Thumbulator class.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2207 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2011-01-16 21:57:46 +00:00
stephena 9dad6caf6e Added Thumbulator class to OSX project files.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2206 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2011-01-16 21:52:49 +00:00
stephena 5ad94ac605 Updated VS2005 project with recent ARM Thumb emulation classes.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2205 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2011-01-16 21:39:06 +00:00
stephena 935fd4df3f Added initial implementation of ARM emulation to the DPC+ bankswitching
scheme.  However, it doesn't seem to be working yet ...


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2204 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2011-01-16 21:23:03 +00:00
stephena f2427a6cbc Applied more DPC+ fixes from Batari, and added properties info
for Grandmas Revenge ROM.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2203 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2011-01-09 15:21:23 +00:00
stephena fcb12065ce Applied some updates to the DPC+ scheme, provided by Batari.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2202 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2011-01-08 16:02:00 +00:00
stephena c50a7efdd1 Added 'Toyshop Trouble' ROM info to the properties database, with
permission from the game author.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2201 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2011-01-01 22:26:34 +00:00
stephena 5d4de8291e Added mouse-as-joystick code from z26. This basically allows the mouse to
act as a controller in joystick-only games.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2200 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2011-01-01 19:25:27 +00:00
stephena 3339dc276d Updated copyright info for 2011. Happy New Year to anybody reading
these logs :)


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2199 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2011-01-01 16:04:32 +00:00
stephena 6478176abb Upon opening the ROM audit dialog, the current directory from the ROM
launcher is selected, not the actual ROM directory.  This speeds up
access, because generally you'll want to audit the directory you're
actually looking at.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2196 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-12-21 18:42:53 +00:00
stephena f1bb09d8ac Updated internal ROM database with info from RomHunter 6 set.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2195 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-12-19 23:51:16 +00:00
stephena af181e925a Updated built-in PNG lib to version 1.4.5 (current latest release).
Hopefully this marks a return to Stella development, as I haven't had
much free time over the past month or so.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2194 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-12-14 20:29:05 +00:00
stephena 8705a33f18 Added several Debian patches from the Debian maintainer of Stella;
Stephen Kitt.

Bumped version # for next round ...


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2192 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-11-15 21:47:07 +00:00
stephena 595e7dc41f Some last minute final changes before the 3.3 release.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2188 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-11-12 18:54:08 +00:00
stephena 267d379c99 Final changes for 3.3 release, and moving up release date to today.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2186 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-11-12 13:35:09 +00:00
stephena ba1019a308 Updated documentation for missing commandline arguments.
Added infrastructure to System and Device classes to deal with CodeAccessBase
even when the bankswitching scheme bypasses the normal System::PageAccess
way of reading ROM space.  This allows bankswitching schemes 2E, AR, FE and
4A50 to support emulation core 'hints' for more accurate disassembly.  The
only scheme not supported now is MC, which isn't really working anyway (I've
never actually had a test ROM for this scheme).

It's getting close, folks ...


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2184 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-11-11 22:24:51 +00:00
stephena c9ab109524 Converted several 'toString' methods to use stringstreams instead of
multiple concatentation of strings.  This should be faster, or at least
lead to less string constructor calls.

Output of 'ROW' directives in the disassembly now shows only 8 items per
line, instead of 16.  This allows to see all the bytes without having a
'...' in between.  A future release may customize this to the size of the
output area.

Fixed output from debugger 'disasm' command to properly align different
directive types and show GFX and PGFX output.

Bumped state file version to 3.3 final, since there are no further
changes to the code that will break the file format.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2183 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-11-11 16:46:41 +00:00
stephena 747164b4c5 If both PGFX and GFX are set for an address, PGFX should take priority.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2182 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-11-11 02:38:53 +00:00
stephena fca261c4e3 Updated debugger documentation for recent disassembly changes.
Removed reference to disassembly 'SKIP' command, since it isn't implemented
yet.

Decided on Nov. 15 for the 3.3 release date, and updated all relevant files.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2181 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-11-10 22:38:16 +00:00
stephena 7a368c4bbb All directives other than ROW now have an associated address in the
disassembly.  This allows the debugger 'jump' command to be more accurate.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2180 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-11-10 14:50:38 +00:00
stephena 7558f87adb And apparently, it's not the last time the file will change. Arrgh :(
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2179 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-11-10 14:37:44 +00:00
stephena 9adafb67ae Hopefully, this is the last time this file changes because of a commit.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2178 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-11-10 14:35:50 +00:00
stephena 277f034e89 Added register tracking for ORA, TSX and TXS. More testing is required
for these opcodes.

The 'data source' in the debugger CPU area now also shows the SP register,
since it's used for TSX and TXS.

Bumped version # for another test release.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2177 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-11-10 14:01:41 +00:00
stephena de67cc34fe Fixed M6502.ins file so that every change in revision # doesn't require
a new commit.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2176 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-11-09 01:17:27 +00:00
stephena c319e2ba82 Added CPU register tracking for illegal opcodes LAX, TAX, TAY, TXA, and TYA.
Still TODO is add support for PHA, PHP, PLA and PLP, and to somehow track
accesses that are stored in zero-page RAM first.  These latter items may
end up being pushed after the 3.3 release.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2175 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-11-08 22:25:19 +00:00
stephena 14d1c17acc Re-arranged the bits in DisasmType to match their order of importance
(ie, each bit now takes priority over ones with lower value).  This
doesn't change the processing in any way, but simply makes the bitstring
more accurately reflect what's going on.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2174 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-11-07 23:05:20 +00:00
stephena c3845314e4 Latest changes to M6502 m4 file.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2173 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-11-07 23:00:24 +00:00
stephena 773092142e Added rule for recompiling the M6502.m4 script to the Makefile, because I'm
tired of doing it manually every time it changes.

Tweaked the handling of JSR, RTI and RTS commands, so they don't erroneously
mark associated addresses as CODE when in fact they're never actually
executed.

Several parts of the Distella code were marking areas as DATA, even though
it depending on knowing the values for the X and Y registers (which it
doesn't, as it's a static analysis).  As such, these areas are now marked
as ROW instead, since that's as precise as a static analysis can do.  The
processing blocks are left there, though, in case Distella is improved in
a future release.

All the above changes allow for better disassembly with less
'false positives' (ie, areas marked as CODE or DATA when they really aren't).


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2172 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-11-07 22:52:42 +00:00
stephena ea8d329e0c Don't mark code disassembled in ZP RAM has tentative (with a '*' symbol).
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2171 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-11-07 20:41:15 +00:00
stephena 192ab931f2 Updated 'type' command to show information from all sources (directive list,
emulation core, and distella).  This allows to better see exactly how an
address is marked in the disassembly.

Updated Changelog with changes I forgot that I made (you know it's time
for a new release when you forget what's been added since the last one).


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2170 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-11-07 18:10:58 +00:00
stephena b756f8c14a Fixed several errors/crashes when attempting to open a window larger than
the given screen.  This is allowed in windowed mode, since the window
manager normally takes care of it.  In the case of fullscreen mode, however,
it is never allowed, and an error message is shown.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2169 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-11-07 16:19:26 +00:00
stephena e8b080551f Reverted grouping characters for multi-character debugger prompt commands
to use curly braces {} instead of apostrophes.  This matches the
functionality from older releases.

Fixed debugger prompt messages to show correct info when opening
various files (config files, autoexec, etc).

The debugger 'type' command now accepts a range of values.

Reverted handling of ROMs that aren't in the internal database;
they're inserted with their extension again, just as in older
releases.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2168 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-11-04 19:29:12 +00:00
stephena 4a3da3141c Bumped version # for another test release.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2166 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-27 21:46:40 +00:00
stephena efcb7ffd43 Potentially fix a refresh problem in OpenGL mode, whereby the screens
weren't being flipped after a refresh.  This could be the cause of a
recently reported problem with fullscreen OpenGL mode 'bleed-through'
of the desktop.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2165 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-27 14:07:52 +00:00
stephena c896e1f0ce Tweaked the symbol for showing GFX in the debugger disassembly.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2164 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-24 21:14:15 +00:00
stephena 3011aa7d12 Addresses directly after a relative branch should not be marked as DATA
in the emulation core, since at that point it's unknown what they are.
I suspect there are other places in the core where this is being done,
so I need to go over the entire M6502.m4 file again.

In Distella, when tentatively marking an address range as CODE, stop
when encountering the first address marked as DATA/GFX/PGFX by the
emulation core.  This is required since Distella will happily disassemble
CODE as far as possible, but addresses specifically marked as
DATA/GFX/PGFX obviously indicate the CODE range is finished.  This is
also why it's so important to correctly mark areas as DATA; the
Distella algorithm depends on accurate information to know when to stop.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2163 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-24 14:55:42 +00:00
stephena bea8ac0ffd Properly implemented an hierarchy wrt marking an address in the disassembly
in a consistent way.  Directives set manually have top priority, then the
results from a dynamic analysis (aka, from actually running the code), and
finally from a static analysis (aka, Distella itself).

Sometimes Distella will mark a section as CODE even if it hasn't been
marked as such dynamically.  This occurs after a relative branch, which
Distella has no idea how to evaluate.  It's possible that the code will
be executed eventually, but also that it will never be executed.  As such,
these lines are marked with a '*', indicating that disassembly results
are tentative.  If you get weird looking disassembly for these addresses,
it's probably a hint that it isn't really code at all.

PC addresses in the disassembly labels are now aligned with labels, and
shown in a lighter color.  These can still be toggled on and off.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2162 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-23 20:57:31 +00:00
stephena dac213c6c3 Added debugger prompt commands for the remaining directive types.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2161 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-23 17:50:45 +00:00
stephena 0af08634a8 Addresses marked with certain directives within Distella should not propagate
to the emulation core.  That is, if something is determined to be CODE in
Distella and *not* in the emulation core, then it shouldn't be marked as such.
Note that the disassembly will still show it as CODE; it's just that the core
will not.  This fixes issues with manually specifying directives from the
debugger prompt, whereby setting a directive and later turning it off never
actually turns it off (as it was being permanently set).


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2160 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-22 20:24:37 +00:00
stephena 3c4bcf3900 Changed label for recently added 'source address' items in the CPU area
of the debugger.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2159 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-22 11:22:36 +00:00
stephena ccf6227b9d Data addresses used in peek operations should be exposed to the debugger,
whether or not they're in cart space (aka, above $1000).  Other parts of
the code can then choose whether to use them, if desired.  This fixes a bug
in the 'Data src' output in the CPU area of the debugger, whereby addresses
were zeroed if they resulted from addresses below $1000.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2158 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-21 21:16:55 +00:00
stephena 8cb6a83512 Reworked M6502 detection of debugger GFX sections, by moving the actual
detection and marking of those areas into the TIA class itself, specifically
at the location of the write.  In other words, there's no longer an IF
statement executed for every STx opcode; the marking is done directly
within the write to GRPx or PFx, so extra code is only executed when
actually storing to those locations.

Fixed several cases of opcodes marking an area as CODE when it should have
been DATA.

Added output to the CPU area of the debugger for displaying the source
address for loading data into the A/X/Y registers.  Note that these are
only modified when actual addresses are used, so immediate and zero-page
mode will show addresses as zero (meaning that no address was involved
in retrieving the data).

Tweaked console font to better diffentiate the disassembly output between
graphics for players and graphics for the playfield.

Bumped state file format because of changes to M6502.  This means old
state files will be broken.

Bumped version # for next test release.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2157 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-21 21:01:00 +00:00
stephena 0388ab89e5 Added a new directive called PGFX, used for playfield graphics (the
previously defined GFX directive is now used for player graphics
only).  The 6502 core tracks each of these separately, which provides
for more accurate disassembly.

Modified debugger font and disassembler to show GFX and PGFX with
special characters, instead of using 'X' as Distella does.  This also
allows gives much more informative disassembled outout.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2156 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-21 17:46:23 +00:00
stephena 7411867290 Decided to take a little break from the debugger stuff, and clean up
the various header files.  Basically, I'm following advice from
Effective C++, and including only what's absolutely necessary.  For
definitions that don't need to be included, the designation 'class xxx'
is used instead.  This could potentially lead to faster compile times.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2155 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-18 18:39:57 +00:00
stephena bd06b3db1e Fixed bug in OSX port, where the name of the application wasn't shown
in Activity Monitor.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2154 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-12 15:29:22 +00:00
stephena 2f11619e78 The emulation core now tracks writes to PF0/PF1/PF2 as well as GRPx,
marking them as GFX.  Still TODO is somehow differentiate these (based
on block, colour, etc).  Also requires testing to see if this slows
down the emulation too much.

Removed un-implemented debugger console commands to query the last
addresses used in the A/X/Y registers, since they're going to be added
to the debugger UI itself in the CPU area.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2153 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-11 23:32:37 +00:00
stephena e8c91c7876 Fixed infinite loop in Distella; a section of code needed to use 32-bit
values instead of 16-bit.

Fixed compilation of System class and M6502 disassembly tracking when
compiling without debugger support.  In this case, the tracking is not
done, and all related operations are completely #ifdef'ed out (resulting
in no extra speed/memory usage at all).


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2152 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-11 23:06:37 +00:00
stephena 82bae93337 Changed GFX tracking stuff in M6502 m4 script to #defines instead of
embedding actual code.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2151 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-11 15:11:10 +00:00
stephena 47f7be341e Immediate mode peek commands shouldn't have the operand marked as CODE.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2150 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-11 14:51:48 +00:00
stephena 200411e216 Updated version # for next test release.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2149 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-11 14:48:34 +00:00
stephena b775a83e00 Fixed crash in starting up the debugger; a re-disassemble should only occur after the debugger has started up completely.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2148 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-11 14:21:54 +00:00
stephena 3ec26d3a29 First pass at tracking GFX sections within the emulation core. This is
currently done by remembering the addresses accessed on execution of
LDA/LDX/LDY, and marking them as GFX during a zero-page STA/STX/STY.
This is obviously as WIP and required much more testing, but I'm
pleasantly surprised by how useful it is so far.

Bumped version # for AtariAge test release.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2147 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-11 00:44:25 +00:00
stephena cb5a943928 Added more 'DATA' hints to the emulation core.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2146 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 22:06:54 +00:00
stephena 5624d30d93 The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand).  Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.

The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa.  This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).

Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).

Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.

Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas.  Previously, peek accesses in these areas weren't being
recorded as DATA areas.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
stephena 5d0b25cd48 Re-added 'REFERENCED' type to Distella, instead of always using 'DATA'. I just
realized that not all things that are referenced are actually data; code can be
referenced too.

Implemented handling of 'DATA' directive.  This is very similar to 'GFX',
except X's are not shown for the bits, and the disassembled bytes are always
in hex.  For now, it can only be activated manually with a cfg command.
Its real value will become apparent once the emulation tracks when
addresses are actually accessed, differentiating from addresses that are
never referenced (ie, 'ROW').  This will fix the current deficiency in 
modifying DATA values (it can't be done, since they're packed into 16 bytes per
line and not changable).


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2144 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-09 17:55:22 +00:00
stephena fa3dc7cc38 Beginning the process of more properly integrating Distella (and disassembly
in general) into the emulation core.  For now, this means integrating the
directive names into CartDebug, and having Distella using those same names.
The new directive names were determined by discussion with Omegamatrix on
AtariAge, and are listed in order of decreasing hierarchy:

  SKIP  (the 'bit' trick to skip over sections of code)
  CODE  (addresses accessible to the program counter)
  GFX   (addresses where data is loaded into TIA GRPx registers)
  DATA  (addresses referenced somewhere in the ROM)
  ROW   (addresses never referenced at all)

The next TODO item is to have the 6502 core set these values during emulation.
This is currently (crudely) done with a true/false setting in System::peek,
where true corresponds to CODE.  This will be extended, so that false
corresponds to DATA.  Eventually GFX will also be detected, by watching writes
to the TIA GRPx registers.  Still to work out is how to detect SKIP sections.
Anything not marked with one of the above directives will be marked as ROW,
which essentially means ROM space that is never used.  This will have the
nice side effect of detecting dead ROM space, potentially leading to space
optimizations.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2143 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-07 22:34:22 +00:00
stephena f51c16c54f Shortened some options in the right-mouse click menu in the disassembly
view.  Instead of showing each separate item (in related items), simply
show a 'toggle' option instead.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2142 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-05 00:15:12 +00:00
stephena 9e583f146f The various trap commands in the debugger (trap, trapread, trapwrite) now
accept a second argument, indicating a range is to be used.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2141 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-03 22:09:34 +00:00
stephena 64ca5275d2 Fixed disassembly output error for 'relative' opcodes; only the signed
operand should be shown, not the two-byte address which it resolves into.

Bumped version # for another test release.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2140 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-03 18:48:44 +00:00
stephena 4b44dcb948 Added 'showaddr' commandline argument and associated UI item (right-click in
disassembly listing) to show/hide opcode/instruction addresses.

The disassembler now includes hints from current PC location *and* 'code
access points' from the emulation core.  Testing has shown that some ROMs
don't show completely accurate disassembled output unless both options are
used.

Updated most of the remaining bankswitch schemes to use the new 'code access
points' functionality during disassembly, allowing for very accurate
disassembled output.  Note that the more esoteric schemes (AR, 4A50, FE, MC)
are supported for now.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2139 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-03 18:19:09 +00:00
stephena 5fe91e2841 Greatly improved the disassembler output, but having Stella keep track of
addresses used as part of code execution (ie, from the PC) during emulation.
This gives Distella much more information than can be determined from a
static analysis alone, resulting in an extremely accurate disassembly.
This also allows to generate very accurate debugger .cfg files.

Not all carts have been ported to this new scheme yet, particularly ones
having extended RAM that can be mapped out dynamically.

Note that this new scheme doubles the amount of RAM used for storing ROM
images, so up to 128KB extra will be used.  There's also a small runtime
check for each instruction executed.  Preliminary testing doesn't show
any slowdowns, but we'll see how it goes.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2138 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-03 00:23:13 +00:00
stephena d6a38c8e44 Changed several string invocations to use references instead. For the
Cart class it's simply an optimization, but the Distella change actually
modifies the list of addresses (vs. modifying a copy of the list).


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2137 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-09-30 15:56:38 +00:00