Commit Graph

2086 Commits

Author SHA1 Message Date
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
stephena 80aa24a8f8 Added build script for Visual Studio 2005, which should allow to build release files for Windows 98 and 2000. This is necessary, since VS 2008 and 2010 remove support for Win98 and Win2K, respectively.
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
2010-09-28 22:59:55 +00:00
stephena f3483ca8b1 When in 'small' window mode and attempting to open PAL ROMs larger than the
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
2010-09-21 19:39:30 +00:00
stephena cb6d2cf602 Fixed bug in app window centering, recently addressed in a 3.2.2 release.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2133 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-09-17 19:19:25 +00:00
stephena 057f6ff495 Bumped version # for AtariAge test release.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2130 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-09-11 14:30:14 +00:00
stephena cb7b93f8d1 Debugger 'saveconfig' wasn't taking pathname of ROMs into account; it always
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
2010-09-11 14:26:21 +00:00
stephena aba64fa8e4 'Center' window functionality should be off by default.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2128 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-09-09 13:40:15 +00:00
stephena db8fd2465f Added 'clearconfig' debugger prompt command, to quickly remove all
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
2010-09-07 22:03:20 +00:00
stephena 7f75957e11 When a ROM doesn't exist and is temporarily inserted into the properties
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
2010-09-06 23:29:05 +00:00
stephena 2d08d4e459 Cleaned up handling of various file paths throughtout the codebase.
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
2010-09-06 00:17:51 +00:00
stephena 871d851e4d Make sure address selected with 'jump' command is valid.
Bumped version # for next AtariAge test release.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2124 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-09-05 18:02:26 +00:00
stephena 8f68c677d4 Added commandline argument 'gfxformat', also accessible from a right
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
2010-09-05 17:57:21 +00:00
stephena 00d64f9f02 Further improvements to adding directives to the disassembler.
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
2010-09-01 16:44:31 +00:00
stephena f8b2621ab5 Many big improvements to disassembler directives. Directives are no
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
2010-08-31 16:37:27 +00:00
stephena e0dd8b1451 First pass at extending the disassembler to support CODE/DATA/GFX commands
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
2010-08-30 12:04:56 +00:00
stephena 12c9edaed0 Updated Visual Studio project files for VS 2010.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2119 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-08-29 17:55:59 +00:00
stephena aaa6823cb0 Compile error caused by missing include fixed.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2116 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-08-23 18:29:48 +00:00
stephena d664beb45d Several changes to make entering commands at the debugger prompt
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
2010-08-23 16:19:17 +00:00
stephena bc28a2408d And time marches on; bumped version # for what will be the next release.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2114 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-08-23 12:08:11 +00:00
stephena f742f67788 Optimized Distella in the case of 2K ROMs. Now only half the
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
2010-08-23 12:07:09 +00:00
stephena b81bb187b7 Final commits for the 3.2.1 release.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2111 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-08-23 11:09:04 +00:00
stephena 2f9ee65822 Updated various files for upcoming 3.2.1 release.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2110 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-08-21 23:20:42 +00:00
stephena 26b1654aa2 Some minor UI improvements to the InputSettings dialog; renamed the
'Virtual Devs' tab to 'Devices & Ports'.  Updated documentation and
snapshots for this change.

Added Halo 2600 ROM info to internal properties database.

Increased default setting for 'joydeadzone' from 0 to 13.  This means
the default deadzone is somewhere around half the axis range (~16500).

Fixed behaviour of hat events; events weren't actually being turned off
until the stick was centered.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2108 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-08-21 23:08:44 +00:00
stephena 0fa706c558 Fixed bug in debugger rewind states are reported in the Stella tracker. It
seems that bankswitching wasn't being enabled before rewinding, and hence
any bankswitching being done on state load was being ignored.  This also
affected the loadstate and savestate debugger commands, which weren't working
for exactly the same reason.

Bumped version # for impending point release.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2107 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-08-21 21:05:12 +00:00
stephena 1b4cea5cdc I forgot to update the changelog with the very last commit.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2106 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-08-20 14:13:25 +00:00
stephena 8b3c0a00a9 RAM should be randomized by default.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2104 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-08-20 01:02:32 +00:00
stephena 60171fe69c And I always forget something after the final commit ...
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2101 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-08-19 21:52:30 +00:00
stephena b2ed949082 Some final changes for the 3.2 release, including documentation updates.
Added 'ramrandom' commmandline argument, used to toggle randomizing or
zeroing or all RAM in the system (both zero-page and SARA).

Disassembler now properly supports all test cases, including rewinding
within the debugger.

Added preliminary support for disassembling from zero-page RAM.

Bumped version # for final release.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2100 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-08-19 21:48:28 +00:00
stephena 0a7726cb9f Fixed bug in handling illegal TIA reads; the value returned should always
'clipped' to the unused TIA bits.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2099 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-08-16 19:49:32 +00:00
stephena d007c3502f Several big improvements to the debugger:
The disassembler now accepts a range of start addresses and remembers
old entry points, so the disassembly becomes more complete each time
the debugger is used.

Changes to address offsets within the same bank are now supported
(ie, changing from $fxxx to $dxxx within the same bank properly
updates the display).

Re-added ability to manually change banks from the debugger prompt
and the disassembly UI.  This now works correctly with the Distella
code.

Cleanup of the Cartridge::bank(...) API: if a bank cannot be changed,
the calling code will now know about it.  This fixes confusion with
some ROMs, whereby changing a bank in the debugger prompt would print
a success message even if the operation failed.

Note that these changes have broken rewind in the debugger.  Actually,
it only exposes problems that the rewind functionality already had :)


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2098 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-08-16 16:41:24 +00:00
stephena 5a89e78fe2 A few UI improvements:
Some messages now use a smaller font, so the UI doesn't look quite
  so monotonous.

  SliderWidgets suppport the mouse scroll wheel to change values.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2097 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-08-14 01:01:27 +00:00
stephena 764e598536 Fixed debugger 'runto' command; it was case sensitive, so it never
matched anything most of the time.  Also, as this operation can take
a somewhat long time on slower systems, a progress bar is now shown.

Fixed handling of bit 6 in VBLANK TIA register, which is related to
how INPT4 and INPT5 are handled.  This fixes at least one ROM that
should have failed in Stella, but didn't.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2096 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-08-12 16:55:47 +00:00
stephena 259e3091f0 Updated changelog for recent additions.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2095 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-08-11 23:00:53 +00:00
stephena 111f40f875 Updated comments on setAppWindowPos, to clearly indicate that the
method is only used in windowed mode.  This eases the requirements
of the method, since fullscreen code need not be added.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2094 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-08-11 22:51:22 +00:00
stephena 657a296b32 Line feed changes.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2093 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-08-11 22:44:03 +00:00
stephena 2818445bf2 Add OSystem::setAppWindowPos functionality to Windows, and bumped version number for another test build.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2092 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-08-11 22:36:07 +00:00
stephena 6a5998c684 Multiple events can now be assigned to combo events from the UI. Still TODO
is update the documentation for this.

Fixed bug reported by Buzbard from AtariAge concerning very large images
in the RomInfoWidget being clipped too small.

Reworked 'center window' functionality.  Using the SDL_VIDEO_CENTERED
environment variable was always a hack, and a bug was introduced in X11
OpenGL mode in version 1.2.14.  However, since SDL is now in maintenance
mode and won't be receiving any further updates, we have to bypass it
entirely.  Added infrastructure for OSystem to center the application
window.  For now, only Linux X11 mode is supported.  Still TODO is add
support for Windows.  OSX was never supported anyway.  This also means
that the center window variable no longer requires the application to
be restarted.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2091 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-08-11 21:53:19 +00:00
stephena 8199dddb6f More work on mapping of multiple events to combo events. The UI is now
present, and it properly loads and presents events from settings.
Still TODO is implement saveConfig(), to send the new events to EventHandler.

Modified ContextMenu/PopUpWidget to honour the 'mwheel' setting when
scrolling with the mouse wheel (previously, it always scrolled at 1 line
at a time).

Updated OSX project files for recent ComboDialog addition.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2090 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-08-09 17:02:36 +00:00
stephena 497cce6079 First pass at adding a dialog to configure combo events in emulation mode.
It doesn't actually do anything yet ...


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2089 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-08-08 23:06:43 +00:00
stephena e9c5131ae4 Bumped version # for test binary.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2088 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-08-08 20:25:19 +00:00
stephena 091ed8935e More updates to Port B I/O of M6532, to match output from another test ROM
on AtariAge.  It seems the documentation regarding port B is incorrect.
Pins previously defined as input/read-only *can* in fact be set as output,
which are then overridden if the console switches are pressed.

Or at least that's my understanding of it; I'm not entirely sure if this
is correct or not.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2087 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-08-08 19:14:37 +00:00
stephena 9089351412 Updated changelog for most recent changes.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2086 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-08-08 12:45:19 +00:00
stephena 6e3be6ea0d Fixed M6532 issues when handling the 3 unused bits in SWCHB. Previously,
these bits were ignored, and treated as high all the time.  A recently
reported Stella tracker posting noted that these bits could be
configured by SWBCNT to be input or output, and hence used as 3 extra
bits of storage.  This is now enabled.  Because of these changes, the
state file format has also changed.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2085 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-08-08 12:32:02 +00:00
stephena 044e1aa151 Some cleanups to the event mapping UI and associated functionality:
1)  Added a 'Reset' button to the UI, which resets (to defaults)
the currently selected item.  This is more fine-grained than the actual
'Defaults' button, which resets *all* events.

2)  Rearranged some buttons and resized UI.  There is now a main 'Defaults'
button on the bottom of the dialog, which applies to the currently selected
tab.  This also allows to set defaults for Virtual Devs, which didn't have
such functionality previously.

3)  Added a 'Combo' button to the Emulation events tab.  It doesn't do
anything yet, but eventually will allow to assign events to the 'combo'
events.

ContextMenu/PopupWidget now supports the scroll button on a mouse when
in scroll mode.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2084 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-08-03 21:04:58 +00:00