Commit Graph

2183 Commits

Author SHA1 Message Date
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 96c1f96ed8 Fixed a few typos in the documentation.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2187 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-11-12 13:46:28 +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 603793a6c5 Updated changelog now that all bankswitch schemes support the new emulation
core address tracking.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2185 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-11-11 22:28:27 +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 0f63b49bd6 Started documentation updates for the next release. All the changes
haven't been made yet, but they will be soon enough.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2167 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-11-01 20:58:51 +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