Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
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: 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....
 
2014-06-22 11:43
chatGPZ

Registered: Dec 2001
Posts: 11386
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: 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.
2014-06-22 14:32
Krill

Registered: Apr 2002
Posts: 2980
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: 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.
2014-06-25 20:50
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? ;-)
2014-06-26 14:51
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.
2014-10-14 05:29
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.
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: 11386
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: 480
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
Chesser/Blazon
Nordischsound/Hokuto..
Ymgve
HOL2001/Quantum
Dymo/G★P
Brush/Elysium
Guests online: 94
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.6)
5 Edge of Disgrace  (9.6)
6 What Is The Matrix 2  (9.6)
7 The Demo Coder  (9.6)
8 Uncensored  (9.6)
9 Comaland 100%  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 No Listen  (9.6)
2 Layers  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.6)
6 Dawnfall V1.1  (9.5)
7 Rainbow Connection  (9.5)
8 Onscreen 5k  (9.5)
9 Morph  (9.5)
10 Libertongo  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Triad  (9.3)
5 Censor Design  (9.3)
Top Graphicians
1 Mirage  (9.8)
2 Archmage  (9.7)
3 Pal  (9.6)
4 Carrion  (9.6)
5 Sulevi  (9.6)

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