| |
chatGPZ
Registered: Dec 2001 Posts: 11386 |
VICE debug interface
i want to add some simple mechanisms to VICE that will help with automatic regression testing (there are over 800 test programs now, running them all manually takes several hours) - this stuff might be interesting for coders writing c64 software as well, so before i start i am looking for some more ideas on what might be useful.... the whole thing would be implemented as either a cartridge or some special i/o device, so basically everything should be triggered by writing to certain registers. the minimal functionality i came up with looks like:
- exit vice with exit code (to signal the test suite success or error)
- print a string to console (with some kind of "printf" like functionality, so you can print contents of registers/memory easily)
what else may be useful? |
|
... 32 posts hidden. Click here to view all posts.... |
| |
chatGPZ
Registered: Dec 2001 Posts: 11386 |
what about the "screenshot" command? *sigh* |
| |
Martin Piper
Registered: Nov 2007 Posts: 722 |
Quote: what about the "screenshot" command? *sigh*
As I said above:
The monitor "command" wants to use quotes and the scrsh (screenshot) command expects quotes *so they're not compatible with each other.*
Unless you escape the command's quotes. Which isn't documented. |
| |
chatGPZ
Registered: Dec 2001 Posts: 11386 |
i dont use windows, so well...
however, my solution for this stuff is the "pb" command |
| |
Martin Piper
Registered: Nov 2007 Posts: 722 |
Quote: i dont use windows, so well...
however, my solution for this stuff is the "pb" command
Which when pointed to a file that contains the screenshot command followed by quit command it doesn't save a screenshot, it ignores that command and keeps the monitor window open.
When in console mode typing the screenshot command in the still open monitor window doesn't save a screenshot in console mode, instead it crashes.
Putting an escape quoted screenshot in a console mode monitor command file also gets ignores, probably because in the Windows version there isn't a valid screen to save. |
| |
Krill
Registered: Apr 2002 Posts: 2980 |
Quoting Groepazi know that. however what you wrote requires interaction with not only the vice code, but also with whatever debugger is attached to it - thats completely beyond the scope of the original question, and probably not even possible in any practical way. remember this is a portable real world program that runs on dozens completely different environments, with completely different capabilities and architectures =P No, you misunderstood me. I meant having a code path in VICE that would be taken in debug mode when triggered by the program in emulation after writing to a special IO register. You'd set a breakpoint there and debug normally. Any of the discussed debug registers would provide that, of course, but i just thought having a register print some internal emulation state (specified by the program in emulation) before breaking into the debugger might help debugging. But thinking further about it, implementing that possibly means more effort than gain. |
| |
Perplex
Registered: Feb 2009 Posts: 255 |
Being able to dump all vic register writes (or optionally all memory writes) to file with at least the following info on each line:
- The location of the instruction doing the write
- The actual instruction (opcode + operands)
- The address being written to
- The new value being written
- The cycle offset into the frame (or vertical and horisontal position of the raster beam) when the write took place.
And of course being able to toggle this on/off by writing to a special i/o register.
In other words, something along the lines of "-soundrecdev dump", but for more than just sid register writes. |
| |
Digger
Registered: Mar 2005 Posts: 437 |
Maybe just take a 256x256px 8bit snapshot and do a pixel diff comparison for regression testing...
Like shown here (Flash Player required) http://play.blog2t.net/files/fc64-player/?url=http://csdb.dk/re..
Or perhaps I haven't understood the question? ;-) |
| |
Martin Piper
Registered: Nov 2007 Posts: 722 |
Quote: Being able to dump all vic register writes (or optionally all memory writes) to file with at least the following info on each line:
- The location of the instruction doing the write
- The actual instruction (opcode + operands)
- The address being written to
- The new value being written
- The cycle offset into the frame (or vertical and horisontal position of the raster beam) when the write took place.
And of course being able to toggle this on/off by writing to a special i/o register.
In other words, something along the lines of "-soundrecdev dump", but for more than just sid register writes.
This would be useful. If I have time I'll add it.
You might want VIC reads as well since some have effects. |
| |
mankeli
Registered: Oct 2010 Posts: 146 |
So is this 'debug cartridge' implemented yet? :-)
I'd really like to have a register that prints stuff to the host console. |
| |
doynax Account closed
Registered: Oct 2004 Posts: 212 |
By the way, do any physical debugging cartridges exist for the C64?
That is not just the typical freezer/monitor but something more along the lines of an in-circuit emulator or a clever bit of programming allowing (relatively) unintrusive breakpoints and single-stepping from a remote host? What did the fancier development cross-development set-ups offer back in the day?
(Sorry to hijack the thread with a non-VICE related question.) |
Previous - 1 | 2 | 3 | 4 | 5 - Next |