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

You need an actual VIC.

Moderator: Moderators

Post Reply
User avatar
pixel
Vic 20 Guru
Posts: 1548
Joined: Fri Feb 28, 2014 3:56 am
Location: Bielefeld, Germany

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

Post 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)
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose
User avatar
Mike
Herr VC
Posts: 5130
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

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

Post 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.)

[...]
User avatar
D-Type
Vic 20 Drifter
Posts: 25
Joined: Sun Jul 05, 2020 4:07 am
Location: Zurich, Switzerland

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

Post 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
P*h*i*l*l*i*p EEaattoon in real life
User avatar
pixel
Vic 20 Guru
Posts: 1548
Joined: Fri Feb 28, 2014 3:56 am
Location: Bielefeld, Germany

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

Post by pixel »

I'm OK with the VICE monitor. Was thinking of C source level. :mrgreen:
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose
groepaz
Vic 20 Scientist
Posts: 1265
Joined: Wed Aug 25, 2010 5:30 pm

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

Post by groepaz »

Have you looked at the docs? There are various projects doing this kind of stuff :)
I'm just a Software Guy who has no Idea how the Hardware works. Don't listen to me.
Endurion
Vic 20 Newbie
Posts: 14
Joined: Tue Oct 22, 2024 12:25 pm
Website: https://www.georg-rottensteiner.de

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

Post 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
C64Studio: x86/x64 - ARM --- C64Studio WIP: x86/x64 - ARM
groepaz
Vic 20 Scientist
Posts: 1265
Joined: Wed Aug 25, 2010 5:30 pm

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

Post by groepaz »

One of the mentioned projects uses VSCODE and supports sourcelevel with cc65
I'm just a Software Guy who has no Idea how the Hardware works. Don't listen to me.
User avatar
pixel
Vic 20 Guru
Posts: 1548
Joined: Fri Feb 28, 2014 3:56 am
Location: Bielefeld, Germany

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

Post 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.
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose
Post Reply