MESSEN Debugging - Comments don't line up - CC65

Are you new to 6502, NES, or even programming in general? Post any of your questions here. Remember - the only dumb question is the question that remains unasked.

Moderator: Moderators

Post Reply
User avatar
Goose2k
Posts: 107
Joined: Wed Dec 11, 2019 9:38 pm
Contact:

MESSEN Debugging - Comments don't line up - CC65

Post by Goose2k » Mon Jul 13, 2020 4:20 pm

I am trying to get debugging in Messen working for the first time, and there seems to be some issue with source comments not lining up with the code.

Here's a small example:

As appears in C code:
debug_code.png
As appears in generated .s file:
debug_asm.png
debug_asm.png (11.05 KiB) Viewed 2464 times
As appears in Messen debugger (I've highlighted a few issues):
debug_messen.png
And here is the batch file I use to generate all the files:

Code: Select all

@echo off

set name="main"

set path=%path%;..\bin\

set CC65_HOME=..\

MUSIC\text2data.exe MUSIC\songs.txt -ca65
MUSIC\nsf2data.exe MUSIC\sounds.nsf -ca65

cc65 -g -Oirs %name%.c --add-source
ca65 crt0.s
ca65 %name%.s -g

ld65 -C nrom_32k_vert.cfg --dbgfile %name%.dbg -o %name%.nes crt0.o %name%.o nes.lib -Ln labels.txt

del *.o

move /Y %name%.dbg BUILD\ 
move /Y labels.txt BUILD\ 
move /Y %name%.s BUILD\ 
move /Y %name%.nes BUILD\ 

I'm kind of fumbling my way through all this, so there may be something silly in there. :D

I've attached all the generate files in a zip, and the full source code can be found here on github: https://github.com/mhughson/mbh-firstnes/
Attachments
generated_files.zip
(196.45 KiB) Downloaded 27 times

Post Reply