CpuWidget automatically gets this support as well.
Still TODO is revamp the loadConfig() method so that updates are only made
when absolutely necessary.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@595 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
by making use of the Debugger::ramChanged() method. Still TODO is
actually 'draw' those changes.
Cleaned up Array typedefs, placing them in the Array class. Also
removed StringArray typedef, since there's already a StringList
class that does exactly the same thing.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@594 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
per line are displayed. There's room for more, but not for 8... and I
expect each line to contain a power-of-two's worth of bytes for some
reason (I tried 6 bytes/line, it was somehow jarring).
Added bool Debugger::ramChanged(uInt 8 offset) method for the GUI RAM tab
to use.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@593 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
light red color).
Inverse video in the PromptWidget is supported, without having to
rewrite any FrameBuffer code.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@589 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
any TIA color when drawing lines, characters, etc.
The number of available colors is in GuiUtils::kNumColors, and is currently
set to 262 (256 TIA colors, 6 GUI colors). The enumerated names for the 6
GUI colors are still used; there aren't yet any enumerations for the TIA
colors, so you have to refer to them by index number.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@588 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
and become the "mini-language" for conditional breaks/traps.
The current lexer/parser combo benchmarks at 1/2 million parses/sec
on my Athlon 2100. By comparison, Pitfall runs approx. 360,000
instructions/sec. We need to be able to check for a conditional break
once per instruction, so on my box, I'll probably be able to run the
emulator at full speed with one breakcond set, using all the CPU.
Am still working on a way to speed things up: there's no reason we
should have to fully lex and parse an expression every time we want to
evaluate it.
For now, the only place the new parser hooks into Stella is with an
undocumented "expr" command. Try "expr 2+2" at the prompt.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@585 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
one tab would temporarily draw a widget from the previously selected tab.
Added 'Alt-f' shortcut for 'Frame+1" in the debugger. Removed that key
from toggling filtering, as it only worked for OpenGL mode anyway (and
filtering is due for a huge rework in a future version of Stella).
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@584 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
doesn't really need to know about it, and it belongs to the debugger anyway.
Fixed some makefile issues:
Pure C programs were being compiled with 'cc', when 'g++' (or equivalent)
should have been used.
Only pre-define the compiler flags to include '-O2' if the user doesn't
have a CXXFLAGS env variable set. Sometimes I want to use '-g', and in
that case I want to override the internal '-O2'.
Fixed TIASound code to not use its own type definitions, and instead use
the ones from bspf.hxx. Eliminates requirement of specifying -DWIN32,
even when the host system wasn't Win32.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@583 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
(indirect),y addressing modes.
Added scanline and frame counters to prompt. They're showing the wrong
values during stepping right now :(
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@581 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
occurs once per frame, as long as the backspace key is held down
(previously it happened once per keypress only). Haven't decided
whether this is an improvement or not, need more testing
Also, added missing -O2 to new Makefile.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@580 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
I've only tested it in 32bit Linux, but I don't forsee any problems.
Dependencies seem to work correctly, recompiling parts of the codebase
as necessary.
New files added to the codebase must be listed in the 'module.mk' file
in the same directory where the new file is placed. Other then that,
no configuration is required.
All configurable options are by default enabled. They can be manually
disabled by an appropriate command to the configure script, but the
script is smart enough to test for the required libraries and disable
support when one isn't found.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@579 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
adapted from the ScummVM build process, and isn't as big and nasty as
full autoconf support.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@578 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
justHitTrap flag wasn't getting reset after a trap was hit.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@577 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
should also be selectable from the GUI. They might also need to include
more controls, but these seems to be the ones that cause interesting
effects: -holdreset gives you double shots in space invaders,
-holdbutton0 gives you "the dot" in carnival.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@576 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
as the regular emulator F9 and F11 save/load state. Will add the debugger
state to the statefile in future.
"Frying" support, using Fred Quimby's code from [stella]. Press Backspace
during emulation (or slam it repeatedly like you would the power button
on a real 2600). So far I've been able to duplicate the classic frying
effects from Space Invaders (double shots) and H.E.R.O. (infinite lives).
Also added a "fry" command to the debugger, but it's not very useful
(you need visual feedback when trying to duplicate a known effect,
so the emulator should be running).
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@575 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
Support patching ROM in almost all cart types.
The ones that aren't supported are going to take a bit more thought.
Still TODO is to support the extra RAM in carts that have it.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@572 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
but we can now change ROM from the debugger on a good chunk of the games
out there.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@571 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
like the "ram" command. Each Cart type needs its own patch() method to
allow changing ROM. So far, only Cart4K has a working patch() method:
all other cart types inherit Cartridge::patch(), which does nothing and
returns false.
TODO: saverom command?
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@570 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
Unfortunately every single Cart class will have to be touched to make
this work, and there are 20 of them. Currently only CartF8 has the
necessary methods.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@568 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
a lot better now. There shouldn't be any more crashes due to missing
error checking, as the error checking is done by the parser now, instead
of by each command (so I can't forget it now). Also, now that the commands
are stored in an array, I can start on tab-completion for commands.
TODO: validate multi-byte arguments (e.g. the data for the "ram" command).
Currently the command works, but will accept values that don't fit into
a byte. Also validate multi-word arguments, though we don't have any
commands that use them yet.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@566 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
compiling to fail. Since ZIP support was added, we always need to link
to the zlib library, not just when we want snapshot support.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@565 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
that had WIDGET_TAB_NAVIGATE set (which is exactly the opposite of
what we want).
Added a dashed line to FrameBuffer::frameRect(). This is currently
used to indicate which widget is selected in debugger mode. IMO, it
looks much better than using a solid line.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@563 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
One more tab completion fix: made it work when the character before the
label wasn't a space (e.g. "pr *w" now completes to "pr *WSYNC")
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@562 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
name, description, argument count & types, and a method pointer to
actually execute the command. Instance method pointers in C++ are even
more annoying that function pointers in C...
The actual parser (the run() and getArgs()) methods don't use the new
stuff, so the actual operation of the debugger is unchanged.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@561 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
Also, minimum length command line to attempt label completion is now 2.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@560 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
have labels "food" and "foobar", and no others starting with "f", and you
type "pr f<TAB>", it will show you both of them, then leave your prompt
looking like "pr foo" with the cursor after the 2nd "o".
Differences from bash:
- In case of multiple completions, bash's default behaviour requires you
to press Tab twice to see them. We only need one Tab. bash can actually
be configured to only need one Tab, too.
- We don't beep. Ever.
- We're case-insensitive. bash is case-sensitive by default, though it
can be configured to be insensitive.
There's one remaining bug in the completion: when we get to the bottom of
the scroll buffer, and the buffer is full (e.g. when the scroll bar handle
is at its minimum size), *and* there's only one possible completion, the
console prints a new blank line after the new (completed) prompt.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@559 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
DebuggerParser flag-setting commands now take one optional argument, to
support the above.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@557 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
want to navigate with the TAB key will actually receive the key (ie, it
won't be swallowed).
Updated PromptWidget to use the TAB key for command completion (Escape
is still used as well).
Added 'Alt t' and 'Alt s' for 'Trace' and 'Step' (respectively) to the
debugger area. These keys are accessible while in any tab, since the
buttons (and associated actions) don't belong to any particular tab.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@554 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
between widgets, I used Escape as the completion key. It's almost working
correctly, but the implementation should be cleaned up.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@552 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
instead of editing values, you toggle values.
Implemented the processor status register as a ToggleBitWidget, since most
people are more familiar with the separate bits (vs. the actual value of the
byte).
Currently, the toggle signal is sent to the CpuWidget, but the register
itself isn't changed. Brian, I only see toggleX() methods for 5 of the
bits, but there are 7 used. Is that intentional, because if the other two
aren't meant to be used, I need to remove the visual cue that they're
being toggled.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@551 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
updates are actually two separate things (and often done independently).
Previously, the only overlay was the menu, and since this was always drawn
over the TIA, updating one or the other was the same thing.
Now, the debugger area can be updated without affecting the TIA, since
technically it isn't really an overlay (it doesn't sit on top of the TIA).
There are still some TODO's wrt using dirty rectangles instead of full
updates, but at least the full updates are now restricted to just the
overlay area.
Fixed multiple frame step in the PromptWidget by changing
FrameBuffer::advance() to advance a given number of frames.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@550 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
PromptWidget gets reset, but not the Debugger itself, so any breaks,
traps, or watches are still there (though watches might depend on
symbols that aren't defined in the newly-loaded file).
When reloading, we do NOT check to see whether the ROM has changed.
This is deliberate: the user might leave the debugger open while he
assembles a new version of his game (I probably would).
TODO: reload symbol file if it doesn't get autoloaded the first time
TODO: don't reset the prompt history on reload
TODO: after the symbol file's loaded, clear any watches that are no
longer valid (e.g. symbol not defined any more)
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@549 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
least 6 months now. This shouldn't affect anyone running Stella on a
CPU faster than a pentium-166 or -200 anyway.
Implemented a few new debugger commands: "listtraps", "saveses", "savesym",
"undef", and renamed "label" to "define"... See the console help for
details.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@546 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba