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 > Code based breakpoints using ca65 and VICE
2009-08-06 07:54
JackAsser

Registered: Jun 2002
Posts: 2014
Code based breakpoints using ca65 and VICE

Recent discussions about debugging etc made me do this, much like Doynax's stuff:

Macro for ca65:
.macro breakpoint name
    .ident (.concat("br_", .string(name))):
    .export .ident(.concat("br_", .string(name)))
.endmacro

Link line in your Makefile:
ca65 -C link -m map -Ln symbols $(OBJS) && sed 's/al [0-9A-F]* \.br_\([a-z]*\)/\0\nbreak \.br_\1/' < symbols > symbols2

Basically it tells ca65 to emit all labels into a file called symbols. The sed-script then locates all symbols starting with br_ and adds a breakpoint command after it.

To run in VICE:
x64 -moncommands symbols2 whateva.d64

This enables you to add breakpoints directly into your sourcecode like:

breakpoint flashcolors
inc $d020
jmp *-3


Have fun with future debugging! :)

 
... 27 posts hidden. Click here to view all posts....
 
2014-02-25 21:54
Slammer

Registered: Feb 2004
Posts: 416
DGGR: Exactly. Good to see you found the solution. Im not checking csdb that often anymore, but I just started this little facebook group , so feel free to join https://www.facebook.com/groups/RetroAssembler/ and discuss any retro assembler. There you will get a quick answer. Once I get time to make new releases it will be announced there as well.

Edit : Btw Everybody is welcome
2014-02-26 11:43
Bitbreaker

Registered: Oct 2002
Posts: 508
oldsk00l -> newsk00l -> facebook shadow scene ...
2014-02-26 13:55
Oswald

Registered: Apr 2002
Posts: 5094
"Also, i wonder how we survived in the past? :-)"

it sucked.

I remember having turn disk bug in Void while linking on a stock machine.

We spent a whole afternoon with Edhellon with this:

- load turbo ass
- load source
- change something
- save object
- load binary
- load object
- save them in one file to demo linking disk
- watch fuckin whole first side
- discover turn disk is still buggy
- goto 10

yeah, and in the end it turned out that I have deleted the turn disk routines from the binarily ripped loader, because I had no idea they are there for that :)
2014-02-26 17:24
chatGPZ

Registered: Dec 2001
Posts: 11386
Quote:
watch fuckin whole first side

thats your own fault though, loaders for side 2 could be done in 1997 too (just like part selectors) :)
2014-02-26 17:34
Oswald

Registered: Apr 2002
Posts: 5094
that wouldnt make auto disk side change detection work tho. anyway after like the 8th time we tried the loader alone, instead of watching the whole side 1, to speed things up :)
2014-02-26 17:39
chatGPZ

Registered: Dec 2001
Posts: 11386
no, but you could have tested only the last part of side 1 and the disk changing :) (you cant imagine how often i did that for artphosis.... argl)
2014-02-26 18:31
Oswald

Registered: Apr 2002
Posts: 5094
it comes back as we talk about it, things was we tested the loader seperately aswell, but that test case used a loader with disk change routines included, which was missing in the demo :P :)
2014-02-26 18:36
Bitbreaker

Registered: Oct 2002
Posts: 508
And how would breakpoints have helped with this pebcak-situation? :-P
2014-02-26 19:10
Oswald

Registered: Apr 2002
Posts: 5094
well, warpmode and modern cross asm env would have sped up the process a lot :)
2014-02-26 21:59
Slammer

Registered: Feb 2004
Posts: 416
Oswald: Just add "- Use one hour for crunching the file" and i will know what you are talking about ;-)
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
Alakran_64
sebalozlepsi
Guests online: 104
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.061 sec.