Commit Graph

1891 Commits

Author SHA1 Message Date
stephena 779f3bfddb Some minor optimizations for AR bankswitch scheme. I'm not entirely sure
how this scheme works, so I have to research further before adding
patch support.  But before that even happens, I need to fix out why
entering the debugger in locking the ROM and eventually crashing Stella.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1981 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-03-30 21:01:33 +00:00
stephena 108a807017 Added debugger patch support for bankswitch schemes CV, DPC, DPC+
and E7.  DPC and DPC+ currently do not modify the DPC address space
on a patch; more research is required to figure out how to handle this.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1980 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-03-30 20:36:13 +00:00
stephena 4c75e52a96 Fixed segfault that could occur on startup when a ROM triggered a read
from the write port.  Basically, the cartdebug class depended on the
console existing, but it wasn't being created until after it was required.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1979 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-03-29 02:21:32 +00:00
stephena 088e3e954f Added Cart::patch support for all Superchip schemes as well as
4A50 and FA.

Fixed bankcount for 3E carts to also consider the RAM slices.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1978 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-03-28 16:01:31 +00:00
stephena 6bea26cd95 Moved the setDirtyPage call for read from write port from the Cart
class to the CartDebug class, since it's really a debugger feature.

Fixed comments on some of the methods in CartDebug.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1977 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-03-28 04:26:41 +00:00
stephena 6fee79ddff Modified most of the cart classes to properly set the 'page dirty' flag
when their address space has been modified by poke.  Any writes done
inadvertently by reading from the write port are also flagged.  This flag
is used by CartDebug to determine if cart address space has changed.
For now, it uses this information to do a complete re-disassembly.
Entire bank changes are signaled by setting myBankChanged to true,
which overrides the page dirty flag and short-circuits testing for it.

Still TODO is add support for 'AR' bankswitching, and fix the patch
method for several schemes.

Added latest DPC+ updates from Spiceware and Batari.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1976 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-03-28 03:13:10 +00:00
stephena 80dbfd6dfa Some small changes to the 0840 and 2K classes.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1975 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-03-26 01:39:27 +00:00
stephena 8fe2d5f6c1 The System 'dirty page' code is now connected to CartDebug. It now tests
whether the range 0x1000 - 0x1FFF (aka cart space) has been modified, and
if so, it forces a re-disassembly.  Still TODO is modify all the cart
classes that manually handle poke operations to set the page as dirty
when a write actually succeeds.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1974 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-03-26 01:33:40 +00:00
stephena 2b384e2353 First pass at adding a 'dirty page' infrastructure to the System class.
The idea is that all direct-access pokes will set a flag indicating that
the page containing the poked address is set to be dirty.  Devices that
handle their own pokes will have to be updated to set this dirty flag too.
Overall, the point is to enable the debugger to know whether cart space
has been modified, and use that knowledge to selectively do a
re-disassembly.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1973 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-03-26 00:59:56 +00:00
stephena 4ca87ba76b Re-disassemble and reset the start vector in the debugger if the disassembly
doesn't result in the PC being present.  This fixes some bugs in the more
esoteric bankswitch schemes, and also enables rewind to show the correct
disassembled results.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1972 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-03-26 00:03:35 +00:00
stephena 9c73d139de The disassembly is now properly updated when performing a 'reset'
or rewind command.

Updated 'FE' bankswitch scheme to the new disassembly infrastructure;
it now properly indicates that it has two banks, and keeps track of
when the bank changes.

Some cleanups to CartXXX classes; most methods didn't need to be
virtual.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1971 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-03-23 18:00:47 +00:00
stephena dc22bc6b04 Some cleanups to the RomListWidget. Long '.byte' lines no longer spill
over onto the opposite side of the screen.  Breakpoints set by clicking
in RomListWidget only apply if they've actually been enabled.  This
fixes a bug whereby a breakpoint could look like it is enabled when
it really isn't.  Related to this, breakpoints cannot be set for
disassembly lines that don't contain a valid address or an empty
bytes area (basically, empty lines and lines containing '.byte' items).


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1970 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-03-22 17:24:08 +00:00
stephena 1ee61ab568 Updated Visual C++ project files for recent DPC+ additions.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1969 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-03-19 23:57:26 +00:00
stephena b92bb4eda0 Added OSX project files for recent CartDPCPlus addition.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1968 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-03-19 00:18:39 +00:00
stephena 6ece47c4ca Added 'DPC+' bankswitch scheme, as defined by SpiceWare and Batari from
AtariAge.  Basically, this is an enhanced version of the DPC class used
by Pitfall2.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1967 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-03-18 17:34:53 +00:00
stephena 0ed4a9fa79 OK, I've finally gotten back to Stella development and fixing the
disassembler.  Hopefully this will lead to a new release very soon.

Added 'autocode' commandline argument and associated UI item (in the
RomWidget debugger area), which controls how Distella will use the
'automatic code determination' option.  If set to 0/never, this is
completely disabled.  If set to 1/always, it is always enabled.
The default is 2/automatic, whereby it is first turned on, and then
turned off if the disassembly doesn't contain the current PC address.

RomListWidget has now been completely reworked, so that it informs
RomWidget of its intent to change breakpoints and patch ROM.  If
either of these fail, the action won't be performed, and more
importantly, it won't appear onscreen as if the action has succeeded.
This fixes an old bug whereby patching could fail, yet the onscreen
ROM data was actually changed.  Related to this, the list has been
made as efficient as possible, and its contents are never un-necessarily
copied.  Also, lines in the disassembly that cannot be modified no
longer show an edit area.

Due to the way the new disassembly works, you can no longer switch between
banks in the RomWidget (Distella would probably fail to disassemble in
such as case).

EditTextWidget can now indicate its contents have changed when adding
text to it.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1966 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-03-18 16:36:12 +00:00
stephena 2cc0d60940 First pass at adding 'hints' to each Cart class that its bank has changed.
This is very useful for conditional re-disassembly, since many bankswitch
schemes consist of ROM only, and once disassembled, cannot possibly have
a different disassembly at some later point.  This is mostly done for such
static schemes (2K, 4K, etc), but more work is required for carts with
extended RAM.  Basically, the cart knows best how its been accessed, so
it makes sense to have the hints there.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1965 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-03-06 18:56:36 +00:00
stephena e0310e8f35 Checking in WIP for Distella integration. Moved the internal text
handling to C++ stringstreams instead of C-style character arrays,
which fixed some segfaults (sprintf is evil).

First pass at tying the number of banks to the disassembly.  The idea
is that the startup bank (which is now identified by the cart) always
starts at address at 0xfffc, while the other banks are defined by the
PC at the first time we enter the debugger.  This is still a WIP,
since there's no actual checking done yet to see if the current PC
is in the current disassembly.

Added 'ctrlcombo' commandline argument, which completely disables
checking for Control-x key combos.  This is useful when playing
2-player games where the 'f', 'r' and 'Control' keys are supposed
to be treated separately.  Previously, pressing Control and 'r' or
'f' processed some other action (change framerate, reload rom, etc).


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1964 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-03-05 22:02:12 +00:00
stephena 6de4e358e1 More changes to CartDebug. Labels read from a symbol list or defined on
the debugger commandline are now reflected in most parts of the debugger UI.
Still TODO is have DiStella use those labels in the disassembly, and deal
with the formatting issues this will entail.

Still completely broken are built-in functions, getting an equate address
based on label, and tab-completions.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1963 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-02-28 17:12:16 +00:00
stephena 0c6f564fa8 Fixed segfault where output from DiStella::disasm wasn't being parsed
correctly.  Disabled built-in functions until I get to that area of
code, since I'm tired of seeing an error message every time I test
new changes.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1962 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-02-27 23:21:14 +00:00
stephena 8b22097cb6 Further improvements to read vs. write mode in the debugger for TIA
addresses.

Fixed a bug in processing accumulator-access opcodes in the debugger;
an uninitialized char array was causing a segfault.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1961 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-02-27 22:46:20 +00:00
stephena a150ece7ae Updated DiStella disassembly to differentiate between the intent of an
instruction (read vs. write) for those addresses that have different
meanings based on how they're accessed.  For now (and probably forever),
this only affects TIA addresses.

These ideas were ported from the old Stella disassembler.  Perhaps they
should be ported to distella as well, since it makes for more accurate
results.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1960 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-02-27 21:24:24 +00:00
stephena a7e0be4475 Changed the second button on the Genesis controller to correspond to
the BoosterGrip 'booster' button, since they both use the same analog
pin (pin 5).


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1958 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-02-25 21:49:30 +00:00
stephena a75e4bdaf3 Updated Win32 project file for recent class additions.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1957 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-02-24 20:41:18 +00:00
stephena 911509336e Updated OSX Xcode project file with recent class changes.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1956 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-02-24 17:28:46 +00:00
stephena fc737cde14 Added up/down buttons to the ContextMenu dialog when scrolling
should occur.

Removed some dead code (Surface class that hasn't been used
for quite some time).


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1955 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-02-24 17:20:57 +00:00
stephena 67f53ceb6b ContextMenu dialog now properly works with scrolled content (both with
the mouse and the keyboard arrow keys).  Still TODO is change the scroll
placeholder text into something that looks a little nicer (perhaps a
graphic arrow or something).

Added output of field header names when using 'listrominfo'.  This makes
it very easy to see what each column actually represents.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1954 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-02-24 14:46:05 +00:00
stephena 7b5be35320 Updates 'Road Runner' ROM as recently talked about on AtariAge. It seems
the one in the database isn't actually the most authentic, original one.

The output from '-listrominfo' command now includes all ROM property info,
making it useful for generating a list that can be imported into a
spreadsheet or database (or otherwise manipulated by some emulator
frontend).


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1953 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-02-23 21:53:09 +00:00
stephena 8284070c3d OK, another try at getting the SVN keywords property
added to Genesis class


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1952 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-02-23 15:04:53 +00:00
stephena 1a2e8d7cd0 Added keyword properties to SVN for Genesis class.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1951 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-02-23 14:59:04 +00:00
stephena 691c9b2e1d Added support for the Sega Genesis gamepad controller. This
controller uses the directional pad and button 'B' as a normal
joystick, but can also use button 'C' as a second 2600 button
(with the logic reversed).


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1950 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-02-23 14:49:12 +00:00
stephena 965787050a First pass at fixing ContextMenu when list of items is larger
than the enclosing screen.  Selecting images with the mouse
is working, but the up and down 'buttons' are currently just
drawn text/placeholders.

Still TODO is get the keyboard actions (cursor up/down, etc)
working.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1949 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-02-15 19:54:15 +00:00
stephena f096fa1eb7 Updated announce doc for 64-bit RPM Linux release.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1947 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-02-13 20:28:44 +00:00
stephena d76ce9566f Fixed deb build issue from 3.0.1; some SVN config stuff was being placed
in the release debs.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1944 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-02-13 19:53:05 +00:00
stephena f7d8334768 Some fixes for 'small screen' functionality. The lower bound of 320x240
is now enforced in more areas of the code, specifically, in BrowserDialog,
VideoDialog and InputDialog.

Rearranged some options in InputDialog (for spacing), and removed the
'mouse is paddle ...' option.  It was never being saved to the config
file anyway, and is still selectable with Ctrl-0,1,2,3 keys.

Added 'maxres' commandline argument, which overrides the built-in
determination of desktop size normally done by SDL.  This is not
documented, and is not meant to be used by anyone other than those
testing Stella on 'small' systems.  It's basically a way to set the
desktop size without recompiling Stella each time.

Still TODO is look at all other dialogs, making sure they fit in the
minimum size.  PopupDialog in particular needs to be fixed.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1942 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-02-13 18:34:24 +00:00
stephena c9e1735527 Fixed bug in text rendering when switching between fullscreen and windowed
mode in software mode.  This error is pretty serious; I'm surprised nobody
reported it before.  I'm probably going to do a 3.0.1 release just to
address this.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1938 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-02-11 23:26:07 +00:00
stephena c12a2e6043 Checks are now performed when attempting to open a window smaller than
320x240 (the minimum that Stella supports).  On 'small' systems using
1x video mode, this means most NTSC games will open in a window of size
of 320x240, even though the native size is normally 320x210 (or so).
In these cases, the image will be centered vertically.

Added FrameBuffer::invalidate(), used to signal that the complete
framebuffer can be trashed and entirely written over.  This is only
active in software mode for now, where it fixes 'overdraw' problems
with 320x240 dialogs drawn underneath 320x210 TIA images.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1937 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-02-10 22:55:08 +00:00
stephena 7ecd5ceac2 Disable the pattern-matching textbox in the ROM launcher when the window
size isn't at least 640 pixels wide.  This is the start of the UI
cleanup I was supposed to do after release 2.7.  I need to check all
UI dialogs to make sure they fit in 320x210 (the minimum resolution
that Stella supports).


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1936 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-02-09 22:49:23 +00:00
stephena eb5f8efc78 Added ability to completely disable the mouse from being used as a
controller.  Added '-usemouse' commandline argument and associated
UI item in InputDialog to accommodate this.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1935 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-02-08 20:02:47 +00:00
stephena 8ca34a4d90 Checking in WIP for DiStella integration. The disassembly is now shown in
the RomListWidget instead of being printed to the terminal.  There are still
graphical glitches with this, but for a first pass, it's nice to see actual
Distella output in Stella.

Partially working 'disasm' command from the PromptWidget.  Currently, it
only disassembles cart address space (aka, 0x1000 or above).

Removed the old disassembly code from CartDebug.  Still TODO is fix the
label stuff, both in getting DiStella to use it, and adding/removing
labels.  This is greatly reduced now that we only have to worry about
user labels.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1934 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-02-07 21:23:26 +00:00
stephena 03191759ab More DiStella cleanups; the disassembly now properly uses peek() and dpeek()
methods from Debugger directly.  As well, the start address is now passed
into DiStella::disassemble() directly; decision to start from the reset
vector is done outside DiStella.  This is in preparation for starting
the disassembly from any valid address.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1933 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-02-02 22:21:03 +00:00
stephena deedb04709 DiStella::disassemble is now called from RomWidget! Of course, the output
isn't actually sent to the UI yet (it's still printed to the console), but
at least the two parts of the code are now talking to each other.  Note
that the disassembly window in the debugger will be empty until I get this
changeover complete.  And with that, I'm not feeling well, so I'm taking
the rest of the night off.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1932 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-02-01 22:24:38 +00:00
stephena 91f1406ed4 Checking in WIP of converting DiStella to use the System class
from within Stella (vs. reading ROM data from a file).
Compilation is currently broken.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1931 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-02-01 20:00:50 +00:00
stephena 0793c85b44 Some updates to the documentation for recent code changes.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1930 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-01-31 21:21:36 +00:00
stephena 898d16b863 Further improvements to the DiStella class. The output is now properly
parsed into a DisassemblyList structure.  For now, this is just being
printed out again.  The next change will be to pass this to RomWidget
and have it displayed in the UI.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1929 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-01-31 19:41:57 +00:00
stephena 231958dbdf Checking in current progress of DiStella class. The code now directs all
output to a specified function instead of the console.  The formatting is
also in a very fixed format.  That makes the next part easier; parsing
the output into a DisassemblyList structure that Stella can deal with
and show in the RomWidget.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1928 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-01-31 02:07:19 +00:00
stephena 6da9d70ce0 Updated Windows build environment to use built-in zlib support. That means you no longer have to track down and install the zlibwapi files! The only external requirement for Stella is now SDL.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1927 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-01-30 00:15:58 +00:00
stephena 84f51128e4 First pass at adding built-in zlib support for those systems that
don't normally have it (notably, Windows).  I've only tested in Linux
so far.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1926 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-01-29 23:37:33 +00:00
stephena af14e9313b Updated OSX project files for recent debugger restructuring.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1925 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-01-17 17:59:05 +00:00
stephena 471810751d Updated Win32 project file for recent debugger class reorganization.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1924 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-01-17 17:09:22 +00:00