Page 1 of 1

Low-hanging fruit? VICE source-level debugger one-night stand suggestion

Posted: Wed Oct 16, 2024 3:22 am
by pixel
I'm messing around with the VICE "binary monitor", the monitor network server, for deep testing, although the emerging possibilities with this set-up are endless. Being at this I'm amazed that there isn't a source-level debugger for the command-line, written in Python for example, already. All it takes is cc65's .dgb files, isn't it. Where's the catch?

('m seriously not into Microsoft, so that could be oxygen spared right there.)

(mod: thread moved from "Programming" to "Emulation and Cross Development" section)

Re: Low-hanging fruit? VICE source-level debugger one-night stand suggestion

Posted: Wed Oct 16, 2024 12:52 pm
by Mike
You might want to take a look at how C64Debugger interworks with VICE:

https://nurpax.github.io/posts/2021-02- ... -info.html

A bit further down the page, source-level debugging is highlighted:
[...]

C64Debugger and source-level debugging

Using the same example project from above, here’s how you will build the project and produce C64Debugger compatible debug symbols:

Code: Select all

c64jasm src/main.asm --c64debugger-symbols=main.dbg --out main.prg
You can start C64Debugger with the below command. (It takes a bit of time for the debugger to start – there may be better way to run a .prg with C64Debugger.)

[...]

Re: Low-hanging fruit? VICE source-level debugger one-night stand suggestion

Posted: Wed Oct 16, 2024 5:38 pm
by D-Type
Try MAME Debugger? It's not source level, but it's way better than VICE for VIC-20 out of the box.
You can load in a comments file with text comments to be displayed along side the disassembled source, the on-screen layout isn't perfect, but it's usable.

https://github.com/phillipeaton/JETPAC_ ... /README.md
https://github.com/phillipeaton/JETPAC_ ... MAME_debug

Code: Select all

@echo off

REM Ensure mame.exe is in your path under Windows, don't know about Linux/Mac.

REM Command line options:
REM vic20p          Name of the MAME driver for VIC-20.
REM -quik <path>    Loads the specified ROM.
REM -rompath <path> Path to the BIOS ROMs for the VIC-20 driver.
REM -exp <8k etc.>  Add expansion RAM to the emulated VIC-20, increase to 16k if you want to add to the code!
REM -nomax          Don't open full-screen, open in a window so you can see the debug windows. 
REM -natural        Use your regular keyboard layout, I use a Dvorak keyboard layout, so I need this, you might not.
REM -debug          Run MAME in debug mode.
REM -debugger_font_size <size>  Text size used in debug windows.

mame.exe vic20p  -quik ..\bin_orig\jetpac.prg  -rompath .\roms  -exp 8k  -nomax -natural -debug -debugger_font_size 10

REM pause

Re: Low-hanging fruit? VICE source-level debugger one-night stand suggestion

Posted: Sun Oct 20, 2024 3:24 pm
by pixel
I'm OK with the VICE monitor. Was thinking of C source level. :mrgreen:

Re: Low-hanging fruit? VICE source-level debugger one-night stand suggestion

Posted: Sat Oct 26, 2024 8:14 am
by groepaz
Have you looked at the docs? There are various projects doing this kind of stuff :)

Re: Low-hanging fruit? VICE source-level debugger one-night stand suggestion

Posted: Sat Oct 26, 2024 11:35 pm
by Endurion
C64Studio also uses VICEs binary monitor command, and lets you step throw your own code, breakpoints, memory views, etc.

The code is open source, so you can take a look at how it's handled:
https://github.com/GeorgRottensteiner/C64Studio

Re: Low-hanging fruit? VICE source-level debugger one-night stand suggestion

Posted: Mon Nov 04, 2024 8:50 am
by groepaz
One of the mentioned projects uses VSCODE and supports sourcelevel with cc65

Re: Low-hanging fruit? VICE source-level debugger one-night stand suggestion

Posted: Mon Nov 04, 2024 10:43 am
by pixel
groepaz wrote: Sat Oct 26, 2024 8:14 am Have you looked at the docs? There are various projects doing this kind of stuff :)
I should have sensed that such thing's around with all those windoze apps in the wild. But _binary monitor_? Seriously? :mrgreen: "monitor server" is more of a beer dropper. :lol:

EDIT: I love ICU64 where one can watch memory in action while a program is running. I'll probably spend ages on watching a version for the VIC. Brings unexpected insights.