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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Updated Create_builds to properly deal with spaces in Win32 home directory, and to pause until the EXE release file(s) are actually created.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2136 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
screen size (vertically), the window will open in partially truncated mode,
where the top of the PAL image is cut off. This normally won't be a problem,
as it's mostly blank space anyway.
App window centering is now honoured when changing video zoom levels, not
just when changing eventhandler states.
Bumped version # for another test release.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2135 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
used the current directory.
Fixed error in generating directive lists; there sometimes were 'holes'
at the boundary of CODE <=> DATA transitions.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2129 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
directives associated with a given bank (or all banks). Sometimes the
directives are so borked that's it's easier to remove them all at once.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2127 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
database, it now has its extension removed (.bin, .a26, etc).
Symbol and config files are now loaded when the debugger is first entered,
not when the ROM is actually loaded. This speeds up ROM loading, since
the user may never need to access these file (ie, they may never enter the
debugger).
The debugger 'loadconfig' and 'saveconfig' commands are now implemented.
Bumped version # for next test release.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2126 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
Basically, directories are now guaranteed to always end in the path
separator. Ensuring this makes certain sections of code work faster,
and guaranteeing it allows higher layers of code to not worry about it.
Added 'cfgdir' commandline argument, to specify the default directory
for Distella-like Stella-compatible config files.
Implemented 'loadconfig' debugger prompt command. It's currently
working great with several test config files provided by Omega of
AtariAge.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2125 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
mouse button context menu in the disassembly listing. This is used to
set the default display format for GFX data sections (currently, binary
and hex are supported).
Fixed bug in several debugger input areas to accept the '\' symbol.
This symbol is needed when entering data in binary format (it must
prefix the data if the default base for that field isn't binary).
Added 'jump' debugger prompt command, used to scroll the disassembly
to the given address (or there-abouts, if the address isn't valid).
Editing data in the disassembly now won't cause the display to jump to
the current PC. The display will only move to the PC when it actually
changes.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2123 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
There was a bug in the linked list code causing directives to be added
incorrectly. Also, merging is now done when possible instead of
creating new nodes. This keeps the directive count as small as possible,
and also helps with memory (less allocations happening).
Fixed bug in printing the 'ORG' directive; it was being printed
before the bank was disassembled, so on the first run it was always 0.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2122 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
longer simply added to a list, but intelligently 'merged' (so that
the entire range represented by all directives contains no overlap).
This makes the disassembly a little faster, since it doesn't have to
iterate redundantly. Still TODO in this area is intelligent insertion
for the same type (ie, if inserting in between like blocks, the
blocks should coalesce, instead of being clipped and then a new range
inserted in between).
Added 'loadconfig' and 'saveconfig' debugger prompt commands, which
will eventually access Distella-like config files. No implementation
is present yet.
Added 'listconfig' debugger command, which lists all directives
currently defined by the user, as well as the directives resulting
from a disassembly of a bank (taking into account extra knowledge
that Stella has WRT cached entry points). This command can show
information for a specified bank, or all banks in the cart.
User-defined directives can now be removed; simply issue the same
command that caused an insertion (ie, attempting to insert the same
type and range will remove it instead).
Fixed bug in Distella processing of directives; similar to the
standalone Distella, directives should be processed *before* any
automatic code determination is done.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2121 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
from a Distella config file. For now, the commands are only accessible
within the debugger prompt, and can only be added (no removal/editing).
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2120 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
case-insensive. Currently supported are all commands and
pseudo-registers. Equates/labels and user-defined functions are
still a WIP, since they're stored in various hashtables accessible
by name, which is still a case-sensitive operation. In general,
tab completion is mostly case-insensitive.
Changed the delimiter for surrounding lines with spaces from curly
braces ({}) to the apostrophe (').
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2115 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
address space is shown (either $F000 - $F7FF or $F800 - $FFFF).
This eliminates a lot of .byte directives that are invalid in
2K mode anyway, and speeds up the disassembly a little.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2113 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba