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 > C64 emu with debugger (or standalone 6502 debugger)?
2008-03-17 10:49
Shadow
Account closed

Registered: Apr 2002
Posts: 355
C64 emu with debugger (or standalone 6502 debugger)?

Is there a C64 emulator that has a built-in debugger? Or can anyone recommend a good (and free!) stand-alone 6502 debugger.
What I want to do is load up my .prg and be able to step through some math routines and see memory, flags etc. as I go along...
2008-03-17 11:39
Skate

Registered: Jul 2003
Posts: 494
actually vice has a built-in debugger. but I also recommend:

NoCash C64 Debugger:
http://nocash.emubase.de/c64.htm

Edit: if you see 8086 style opcodes when you open the debugger for the first time, don't be surprised. you can change the disassembler syntax from Options -> Debugger Setup.
2008-03-17 11:50
Shadow
Account closed

Registered: Apr 2002
Posts: 355
DOH! Can't believe I missed that there is a debugger in VICE. I have used the cartridge-like 'monitor' features, but never noticed that there were debug functionality as well!
NoCash also seems like a good alternative. Thanks a lot!
2008-03-17 22:11
A Life in Hell
Account closed

Registered: May 2002
Posts: 204
I've never managed to get symbols loaded into the vice monitor usefully - is the format required documented somewhere? Am I just incompetent (yes, yes I am!).

As an aside, while I don't have a debugger, I do have a bunch of python scripts and a patched vice that that implement a profiler, which is kind of useful sometimes - will clean these up and release in the next few days if anyone is interested.
2008-03-18 01:44
Devia

Registered: Oct 2004
Posts: 401
Quote: I've never managed to get symbols loaded into the vice monitor usefully - is the format required documented somewhere? Am I just incompetent (yes, yes I am!).

As an aside, while I don't have a debugger, I do have a bunch of python scripts and a patched vice that that implement a profiler, which is kind of useful sometimes - will clean these up and release in the next few days if anyone is interested.


The ld65 linker from the cc65 suite can create a VICE label file. Basically all this file contains is a set of "al 000801 .FancyLabel" lines. This file can be loaded from the VICE monitor using:
   ll "fullpath/filename"
The "" are important and the full path is important unless you set the working dir to where ever your label file is located before starting VICE.
So if you're using ca65 to assemble, remember the -g option:
   ca65 -g -o fancydemo.o fancydemo.s
And then link it with the -Ln option:
   ld65 -Ln fancydemo.lbl -o fancydemo.prg fancydemo.o
This will give you a VICE loadable label file.
2008-03-18 06:21
A Life in Hell
Account closed

Registered: May 2002
Posts: 204
Quote: The ld65 linker from the cc65 suite can create a VICE label file. Basically all this file contains is a set of "al 000801 .FancyLabel" lines. This file can be loaded from the VICE monitor using:
   ll "fullpath/filename"
The "" are important and the full path is important unless you set the working dir to where ever your label file is located before starting VICE.
So if you're using ca65 to assemble, remember the -g option:
   ca65 -g -o fancydemo.o fancydemo.s
And then link it with the -Ln option:
   ld65 -Ln fancydemo.lbl -o fancydemo.prg fancydemo.o
This will give you a VICE loadable label file.


Thanks, I managed to use that to convert the asm I use's labels into vice format - the bit i missed seems to be that they require to be .symbol or else it comes up with an error... weird. But that's okay.


Are they supposed to work on zero page though? because they don't seem to, le sigh! But some is better than none :)
2008-03-18 07:20
Martin Piper

Registered: Nov 2007
Posts: 722
I made some changes to ACME to do a similar thing for the VICE debugger. Here is a link to the wiki-section for the binary and sources.
http://codebase64.org/doku.php?id=base:tool_sources#sources_for..
2008-03-18 16:22
MagerValp

Registered: Dec 2001
Posts: 1078
No, vice labels and breakpoints don't work on zeropage (unless it's been fixed in recent versions, it's been a while since I tried).
2015-03-10 16:48
mstram
Account closed

Registered: Dec 2013
Posts: 112
Quote: No, vice labels and breakpoints don't work on zeropage (unless it's been fixed in recent versions, it's been a while since I tried).


In the interest of updating information, both of those now work in vice 2.4.x (and probably for a "few" versions past too).
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
REBEL 1/HF
Mibri/ATL^MSL^PRX
Perplex/Offence
Inge/HVSC
Mike
Stratford/Xenon
Walt/Bonzai
lA-sTYLe/Quantum
sln.pixelrat
4gentE/ΤRIΛD
iAN CooG/HVSC
LightSide
zscs
The MeatBall
t0m3000/hf^boom!^ibx
Guests online: 124
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 Layers  (9.6)
2 No Listen  (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 Organizers
1 Burglar  (9.9)
2 Sixx  (9.8)
3 hedning  (9.7)
4 Irata  (9.7)
5 Tim  (9.7)

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