rolandshacks / vs64

C64 Development Environment for Visual Studio Code
Other
97 stars 16 forks source link

Error parsing problem when also warnings present #52

Closed Rytikar closed 9 months ago

Rytikar commented 9 months ago

Hi, I'm experiencing a small annoyance using ACME with VS64.

I'm loading a binary file with !bin at a defined address, say =$7500 followed by !bin "bin/data.bin". During development it was necessary to overwrite some parts of this file with other content. So I follow up with three more = statements adding data, e.g. *=$7610 and !raw "TEXT". This is intentionally inside the previously loaded bin file. ACME notices this and correctly issues a warning like 'Segment starts inside another one, overwriting it'. That is appreciated to avoid those overlaps, but in this case intentional, and they are only warnings. not errors, so not preventing assembly. The warning output can not be disabled by adding some meta data in the code.

The problem arises when an actual error in the code shows up (it does a lot :-)). Looks like this is not parsed correctly by VS64, does not show up in the error list, can not be navigated to by F8 and thus makes it quite tricky to find. It does prevent assembly, though. The error can be seen in the terminal, giving the only clue as what is wrong. Something like this...

c:\nippon\nippon\asm\fileB\build\fileB.report" -o c:\nippon\nippon\asm\fileB\build\fileB.prg c:\nippon\nippon\asm\fileB\src\main.asm
c:\nippon\nippon\asm\fileB\src\main.asm(145) : Warning (Subzone Main): Segment starts inside another one, overwriting it.
c:\nippon\nippon\asm\fileB\src\main.asm(225) : Warning (Subzone Main): Segment starts inside another one, overwriting it.
c:\nippon\nippon\asm\fileB\src\main.asm(260) : Warning (Subzone Main): Segment starts inside another one, overwriting it.
.\src\procs.asm(254) : Error (Subzone Procs): Value not defined (MapPrintExeLeft).
ninja: build stopped: subcommand failed.
failed with exit code 1

I would be nice if F8 would not include warnings while stepping through errors, maybe configurable.

Thanks a lot for the effort, VS64 works like a charm for me.

rolandshacks commented 9 months ago

Hi. Thanks for reporting!

Does this snippet reproduce the effect? (With the latest version 2.5.3?)

*=$0801
!byte $0c,$08,$b5,$07,$9e,$20,$32,$30,$36,$32,$00,$00,$00
jmp main

main
    jsr part
    rts

*=$07500
!bin "inc.bin"

*=$7510
!raw "XXXXXXX"

*=$7520
!raw "YYYYYYY"

part
    inc #77
    rts

This is what I get on the terminal:

C:\tools\c64\acme\acme.exe --msvc --maxerrors 99 -DDEBUG=1 -f cbm --cpu 6510 -I d:\Work\c64\asmtest -I d:\Work\c64\asmtest\src -I d:\Work\c64\asmtest\build -r "d:\Work\c64\asmtest\build\asmtest.report" -o d:\Work\c64\asmtest\build\asmtest.prg d:\Work\c64\asmtest\src\main.asm
d:\Work\c64\asmtest\src\main.asm(16) : Warning (Zone <untitled>): Segment starts inside another one, overwriting it.
d:\Work\c64\asmtest\src\main.asm(19) : Warning (Zone <untitled>): Segment starts inside another one, overwriting it.
d:\Work\c64\asmtest\src\main.asm(23) : Error (Zone <untitled>): Illegal combination of command and addressing mode.

And the problem view shows the error and the two warning...

Rytikar commented 9 months ago

Yes, you're right. I was still on 2.4.8, 2.5.3 fixed it. Great, thanks.

Now, if just the warnings could be skipped when using F8... :-) I can see that F8 works as intended in VS.

Go to Next Problem in Files (Error, Warning, Info)

There is an extension solving my problem, as I'm not the only one. Nothing to do for you, sorry for disturbing. :-)

rolandshacks commented 9 months ago

I'm glad all works fine. Btw. I think you can filter the problem view, just turn on errors and ignore warnings and infos... Maybe F8 works on the filtered view as well...?