| |
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.... |
| |
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 |
| |
Bitbreaker
Registered: Oct 2002 Posts: 508 |
oldsk00l -> newsk00l -> facebook shadow scene ... |
| |
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 :) |
| |
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) :) |
| |
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 :) |
| |
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) |
| |
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 :) |
| |
Bitbreaker
Registered: Oct 2002 Posts: 508 |
And how would breakpoints have helped with this pebcak-situation? :-P |
| |
Oswald
Registered: Apr 2002 Posts: 5094 |
well, warpmode and modern cross asm env would have sped up the process a lot :) |
| |
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 |