Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
 Welcome to our latest new user maak ! (Registered 2024-04-18) You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > VICE debug interface
2014-06-19 15:03
chatGPZ

Registered: Dec 2001
Posts: 11100
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....
 
2014-06-22 11:43
chatGPZ

Registered: Dec 2001
Posts: 11100
i dont use windows, so well...

however, my solution for this stuff is the "pb" command
2014-06-22 12:00
Martin Piper

Registered: Nov 2007
Posts: 631
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.
2014-06-22 14:32
Krill

Registered: Apr 2002
Posts: 2825
Quoting Groepaz
i 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.
2014-06-24 07:06
Perplex

Registered: Feb 2009
Posts: 254
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.
2014-06-25 20:50
Digger

Registered: Mar 2005
Posts: 421
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? ;-)
2014-06-26 14:51
Martin Piper

Registered: Nov 2007
Posts: 631
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.
2014-10-14 05:29
mankeli

Registered: Oct 2010
Posts: 110
So is this 'debug cartridge' implemented yet? :-)
I'd really like to have a register that prints stuff to the host console.
2014-10-14 14:28
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.)
2014-10-14 15:10
chatGPZ

Registered: Dec 2001
Posts: 11100
something like that existed for PDS at least... i have heard of other inhouse solutions too (but never saw one myself)
2014-10-14 20:09
soci

Registered: Sep 2003
Posts: 473
I saw an in house "solution". It used a bunch of TTL IC and had to be combined with a freezer cartridge (maybe AR?). You could set up an address and it triggered freeze when it was hit.
Previous - 1 | 2 | 3 | 4 | 5 - Next
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
zscs
Guests online: 60
Top Demos
1 Next Level  (9.8)
2 Mojo  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Comaland 100%  (9.6)
6 No Bounds  (9.6)
7 Uncensored  (9.6)
8 Wonderland XIV  (9.6)
9 The Ghost  (9.6)
10 Bromance  (9.6)
Top onefile Demos
1 It's More Fun to Com..  (9.9)
2 Party Elk 2  (9.7)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.5)
5 Rainbow Connection  (9.5)
6 TRSAC, Gabber & Pebe..  (9.5)
7 Onscreen 5k  (9.5)
8 Dawnfall V1.1  (9.5)
9 Quadrants  (9.5)
10 Daah, Those Acid Pil..  (9.5)
Top Groups
1 Oxyron  (9.3)
2 Nostalgia  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 Crest  (9.3)
Top Swappers
1 Derbyshire Ram  (10)
2 Jerry  (9.8)
3 Violator  (9.8)
4 Acidchild  (9.7)
5 Starlight  (9.6)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.047 sec.