Commit Graph

609 Commits

Author SHA1 Message Date
urchlay 07786e3faf Added support for 3E bankswitch scheme (3F plus 32K RAM).
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@618 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-07-08 04:00:09 +00:00
stephena 2be337302a Fixed wrong labels on RAM cells in RamWidget.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@617 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-07-07 20:51:10 +00:00
stephena 8aff84f2c3 First pass at CpuDebug. In adding this class, I realized that it's just
a reimplementation of D6502.  So D6502 will disappear soon.  The reason
Debugger class has been getting so big is that there was only D6502 defined,
when there should have been also DTia, DRam, etc.  The DebuggerSystem
classes are now providing that functionality.

The codebase may be broken over the next few days because of this, but
it's better to do it properly (I get the feeling it may never be fixed if
we don't do it now).


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@616 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-07-07 18:56:41 +00:00
stephena c3fab46791 Added DebuggerSystem and DebuggerState classes to clean up the unwieldy
Debugger class.  There will be a subsystem for each GUI debugger tab,
and it will have responsibility for all thing related to that tab,
eliminating a lot of code from Debugger class.

Added RamDebug class, and changed the GUI RAM tab to use the new RamDebug
subsystem.  The prompt still uses the old method, which will have to be
fixed.  At that point, Debugger::(readRAM, writeRAM, ramChanged) can be
eliminated.  If the Debugger ever wants to access RAM related things,
it should refer to RamDebug.

Still TODO is create a CpuDebug subsystem, and turn the current TIADebug
into a real subsystem.

Cleaned up some redundant typedefs (changed AddrList/ValueList to
IntArray).  As well, we're moving away from having bspf stuff seeded
throughout the system.  Integer values will be stored/passed around as
'int', and truncated where necessary as close to the given method as
possible.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@615 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-07-07 15:19:04 +00:00
urchlay ad5ab7be92 Added -break command line option. It sets a breakpoint before emulation
even starts, so you can enter the debugger before the first frame is
even drawn. This will be useful for everyone, but I particularly need it
for testing per-scanline TIA update code (which doesn't even exist yet).

I should eventually be able to run "stella -break kernel poker.bin" and
then advance one scanline at a time, watching the first frame get drawn.
Not even close yet :)


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@614 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-07-07 02:30:48 +00:00
stephena d0534cb746 More additions to the TiaWidget, but none of it is functional yet :)
Increased debugger window width to 639 pixels.  We've already passed the
512x384 mark, so it's no use restricting width to 512 anymore.  Besides,
the extra width will come in handy for the TiaWidget, and maybe the
PromptWidget can now use one less line in the state() display.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@613 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-07-06 19:09:26 +00:00
stephena 1b81357126 Second pass at TiaWidget. It now contains a DataGridWidget for the 16 bytes
of RAM in the TIA, but it isn't tied to the TIA yet (so changes have no
effect).  I suspect that development on this tab will now proceed quickly,
since I think I've found a way to lay everything out in one tab.

Removed the 2 second delay from configure when an invalid option is
given.  There's no need to delay; printing an error is sufficient.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@612 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-07-06 15:09:16 +00:00
urchlay ed06990d04 configure script now prints "warning: unrecognized option" and sleeps
for 2 seconds instead of silently ignoring wrong options. This seems
like a good compromise to me (I've typed "./configure --disable-opengl"
about 50 times now, and of course it doesn't work because it's supposed
to say "--disable-gl")


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@611 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-07-05 19:29:57 +00:00
stephena 135f662a03 Removed obsolete makefile. Stella will now exclusively use the configure
system, and if that doesn't work for someone, we'll fix it at that level.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@610 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-07-05 18:06:13 +00:00
stephena 025e99900c Reworked DataGridWidget so the common operations (increment, decrement, etc)
are part of the class itself.  That means all DataGridWidgets (currently
RAM contents and CPU registers) get access to the key shortcuts.

Modified DataGridWidget to accept the number of bits in its cells, and
made sure the above listed operations are restricted to that number
of bits.  That means when we add DataGridWidgets for Tia stuff with
weird bit lengths, changing data will work correctly.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@609 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-07-05 18:00:05 +00:00
stephena 1e1ce94b7d Added 'id' item to handleCommand(), so that the method knows which widget
has sent a signal (required when there are more than one of the same type of
widget in a widget/container).

Still TODO is modify each handleCommand() method that cares about 'id' to
actually detect and act on it.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@608 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-07-05 15:25:45 +00:00
stephena 3e0a2db948 Made the arrow keys in DataGridWidget 'wrap around', so that when the end
a row/column is reached, it goes to the next row/column.  The reason for
this will become apparent over the next day or so.

Still TODO is revamp the base widget to accept and return an identifier
for which widget it is, since every widget/dialog in the debugger
currently assumes that there's only one type of each widget (so if there
are two DataGridWidgets, the returned signal doesn't know which one
to use).  Sorry if that sounds confusing ;)


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@607 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-07-05 00:07:58 +00:00
stephena fe8c605d8d Start of the TiaWidget. This one is going to be huge, and may take some
time to finish.

Changed colors of modified cells in DataGridWidget.  They're now much
easier to see.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@606 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-07-04 15:59:38 +00:00
urchlay c4d5f9d54b My first stab at adding features to the GUI: Added shortcut keys for the
Inv, Neg, etc. buttons on the RAM tab. Also added Undo and Revert buttons
to the RAM tab. Undo undoes your last change only (and does not undo an
undo). Revert reverts RAM to the state it was in when the user entered
the RAM tab. These buttons are disabled when they're not useful.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@605 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-07-03 21:14:42 +00:00
stephena a1fb0b5057 Some fixes for compilation under MinGW and Visual C++ .Net.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@604 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-07-03 14:18:54 +00:00
stephena 6f2c71053a Tweaked configure to silently ignore commandline options it doesn't know
about.  No use in quitting if the option wouldn't have had any effect
anyway.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@603 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-07-03 12:50:19 +00:00
urchlay 84f1e6d0f3 Updated debugger docs a bit
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@602 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-07-03 09:16:11 +00:00
urchlay 318122fae1 Fixed collision display in "tia" cmd: used && where I shoulda used &
Booleans in "tia" output are now +FOO or -foo (UPPERCASE is set, lower
is clear, plus there's a + or - in front).


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@601 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-07-03 08:56:48 +00:00
urchlay 16a17330ed Added "riot" command. It shows the RIOT regs in raw and decoded forms.
Currently, entering the debugger turns off all the joystick and button
inputs, so we're stuck showing "(no directions)" for the sticks. This
needs a change in EventHandler to fix (assuming it can even be done).


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@600 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-07-03 08:15:31 +00:00
urchlay 94e4add1b7 "tia" command now shows all TIA regs except the strobes. All numeric output
is in the current number base except the binary graphics data. Audio frequency
is shown both as AUDFx value and frequency in Hz. Boolean flags are now
shown with a prefixed + for true or - for false (e.g. "-delay" for a player
if it's not delayed or "+delay" if it is).

There are still a few TIA internal state values that should be displayed:
delayed graphics data and color clocks at which RESxx was strobed.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@599 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-07-03 06:49:40 +00:00
stephena bad918cd14 Bumped version for next alpha release.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@598 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-07-03 01:54:46 +00:00
urchlay 2269fb27c2 Many changes to the "tia" command output. It's almost finished now, and
is useful as-is.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@597 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-07-03 01:36:40 +00:00
stephena 1ba494a859 Fixed bug whereby changes made to RAM from frame advance weren't showing
up in the RamWidget.  FrameBuffer::advance() now advances all frames and
then returns, instead of setting a flag to advance and then return
immediately (RAM wasn't being updated until the frames where advanced,
but by that point we'd returned from the method).


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@596 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-07-03 00:53:59 +00:00
stephena a7fefcd123 Added tracking of changes directly to the DataGridWidget. That means the
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
2005-07-02 21:15:22 +00:00
stephena 2fa65c7921 Added infrastructure for the DataGridWidget to track state changes,
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
2005-07-02 18:34:54 +00:00
urchlay b3479e8e9a "dumpram" now respects the default base. If dumping binary, only 4 bytes
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
2005-07-02 18:03:09 +00:00
urchlay 3501378714 Prompt now shows RAM locations that have changed since the last RAM command
in inverse video.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@592 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-07-02 17:15:42 +00:00
stephena 040a8d7d22 Fixed inverse character draws to use the character height, not the line height.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@591 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-07-02 15:36:44 +00:00
urchlay 584baab7d1 Prompt status line displays changed registers in inverse video. We check
for changes on step, trace, and run commands.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@590 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-07-02 15:31:30 +00:00
urchlay 31708d4a7f DebuggerParser now uses TIA color 0x34 for error messages (which is a
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
2005-07-02 14:58:45 +00:00
stephena bd03f7d80f Integrated main TIA palette and GUI colors. That means the GUI can use
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
2005-07-02 01:28:43 +00:00
stephena 6eafefb3a5 Made Yacc stuff be part of DEVELOPER_SUPPORT, so it's only compiled
when we want the debugger.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@587 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-07-01 13:59:40 +00:00
urchlay e91ac28927 You know, when adding a directory to a proejct, it's often beneficial
to "cvs add" it...


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@586 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-07-01 04:29:18 +00:00
urchlay 073ae410ad Added initial Yacc parser. This will replace DebuggerParser::decipher_args()
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
2005-07-01 04:22:37 +00:00
stephena 18b37a5ed6 Fixed some focus issues in the GUI. Sometimes selecting a widget in
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
2005-06-30 00:08:02 +00:00
stephena 113f32b7e1 Moved initialization of TIADebug from Console to Debugger, since the Console
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
2005-06-29 13:11:03 +00:00
urchlay c64d9b5f64 "tia" command actually starting to do something useful, still needs a
lot more.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@582 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-06-29 04:23:42 +00:00
urchlay 741efd226a Added label support in disassembler for (indirect), (indirect,x), and
(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
2005-06-29 03:43:38 +00:00
urchlay b2903a36ca Moved frying support from the Debugger to the Console. Also, frying now
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
2005-06-29 00:31:49 +00:00
stephena 77f4c8e007 Second pass at configure support; it actually seems to work this time.
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
2005-06-28 23:18:16 +00:00
stephena d12f199847 First pass at configure support (no more editing makefiles). This is
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
2005-06-28 18:56:49 +00:00
urchlay 6283d35618 One-liner fix for "sticky trap" bug pointed out by Lee Fastenau: the
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
2005-06-28 12:20:06 +00:00
urchlay 7366c31b3d Added -holdstart, -holdreset, -holdbutton0 command line options. These
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
2005-06-28 04:40:21 +00:00
urchlay b500522dda savestate and loadstate commands for the debugger, which do the same thing
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
2005-06-28 03:34:41 +00:00
urchlay 0dd6f51378 Check that bank is valid before switching to it.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@574 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-06-28 01:53:41 +00:00
urchlay 6e4bcb0fc8 ROM-patching and debug-bankswitching fixes.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@573 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-06-28 01:31:32 +00:00
urchlay 32e1296946 Support debugger bankswitching in almost all cart types.
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
2005-06-28 01:15:17 +00:00
urchlay 8aeb65d4b7 patch() methods for various Cart classes. Still a work in progress,
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
2005-06-27 23:40:36 +00:00
urchlay ec0accd4a2 Initial support for ROM patching: a "rom" command in the prompt that acts
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
2005-06-27 15:07:54 +00:00
urchlay dfdc9de1a9 Updated Debugger.txt doc
Debugger bankswitch support for a few cart types


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@569 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-06-27 12:43:49 +00:00