ca65 feature is somehow "illegal" [RESOLVED]

Discuss technical or other issues relating to programming the Nintendo Entertainment System, Famicom, or compatible systems.

Moderator: Moderators

Post Reply
User avatar
FrankenGraphics
Formerly WheelInventor
Posts: 2033
Joined: Thu Apr 14, 2016 2:55 am
Location: Gothenburg, Sweden
Contact:

ca65 feature is somehow "illegal" [RESOLVED]

Post by FrankenGraphics » Wed Jul 19, 2017 1:27 pm

Trying to use the command line long option --feature force_range.
It throws back a warning that the feature is illegal, and ignores it.

I've tried, at the coders' suggestion, to update to the latest cc65 windows snapshot. No dice.
Other features seem to work nice, both when expressed as command line options or directives.

I can do without it, but i'm curious why this might be, and how to solve it.

EDIT - RESOLVED:
1)Be sure the version is right.
2)Be sure that windows is using a PATH to the new version, not some old version laying around somewhere else.
3)Be sure not to test that it works in a command prompt opened before editing your PATH, since that would rely on what variable there was when it was opened.
Last edited by FrankenGraphics on Wed Jul 19, 2017 4:12 pm, edited 1 time in total.
http://www.frankengraphics.com - personal NES blog

tepples
Posts: 22284
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: ca65 feature is somehow "illegal"

Post by tepples » Wed Jul 19, 2017 1:50 pm

What does ca65 --version return? The latest Windows snapshot on cc65.org is outdated, as maintainership has passed to a new party, but control of that domain has not.

Does it work if you specify this particular feature from within the source code, as opposed to on the command line?

Code: Select all

.feature force_range
It might sound like a silly question, but "force_range works nowhere" and "force_range works only in source code, not on the command line" are different bugs to report to the project's issue tracker.

User avatar
FrankenGraphics
Formerly WheelInventor
Posts: 2033
Joined: Thu Apr 14, 2016 2:55 am
Location: Gothenburg, Sweden
Contact:

Re: ca65 feature is somehow "illegal"

Post by FrankenGraphics » Wed Jul 19, 2017 1:57 pm

Yeah, sorry, that was a bit unclear of me. I also tested the .feature force_range directive topmost in the main asm file, and it returns the same warning.

Version is V.2.13.3, which i downloaded from https://sourceforge.net/projects/cc65/
http://www.frankengraphics.com - personal NES blog

tepples
Posts: 22284
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: ca65 feature is somehow "illegal"

Post by tepples » Wed Jul 19, 2017 2:02 pm

2.13.3 is your problem. Here's what I get (albeit on GNU/Linux instead of Windows):

Code: Select all

$ ca65 --version
ca65 V2.16 - Git 0291c92
When did you download it? It might sound like a silly question, but "Windows snapshot on SourceForge is years out of date" is a reportable bug, and not having updated isn't.

User avatar
FrankenGraphics
Formerly WheelInventor
Posts: 2033
Joined: Thu Apr 14, 2016 2:55 am
Location: Gothenburg, Sweden
Contact:

Re: ca65 feature is somehow "illegal"

Post by FrankenGraphics » Wed Jul 19, 2017 2:09 pm

I downloaded and replaced today - twice, just to be sure i had the right link the first time
http://www.frankengraphics.com - personal NES blog

User avatar
elseyf
Posts: 72
Joined: Sat Dec 01, 2012 4:10 am

Re: ca65 feature is somehow "illegal"

Post by elseyf » Wed Jul 19, 2017 2:21 pm

I just looked into it, when downloading the windows snapshot from sourceforge you do get a recently compiled snapshot (mine is from Jul 18, 2017). --version flag result in following output:

Code: Select all

ca65.exe V2.16 - Git 6002e59
make sure to use this link https://sourceforge.net/projects/cc65/f ... t/download (or the green download button). at the bottom of the sourceforge project-page there is also a win32 snapshot which points to a two year old version.
when you reinstall cc65, check PATH to make sure windows uses the correct version. Even if you put ca65 in the same folder as the asm source code, windows might use the one specified in PATH instead. you could try "./ca65" in order to use the executeable in the same folder you have the commandline work from.

User avatar
FrankenGraphics
Formerly WheelInventor
Posts: 2033
Joined: Thu Apr 14, 2016 2:55 am
Location: Gothenburg, Sweden
Contact:

Re: ca65 feature is somehow "illegal"

Post by FrankenGraphics » Wed Jul 19, 2017 3:24 pm

It seems i got the right version downloaded, but it was just as you suspected: windows pointed to an older version in the program files folder. Now, even if i delete old environment variables and add new, that doesn't seem to do anything. I just ended up with replacing the version in /program files.
http://www.frankengraphics.com - personal NES blog

Nicole
Posts: 218
Joined: Sun Mar 27, 2016 7:56 pm

Re: ca65 feature is somehow "illegal"

Post by Nicole » Wed Jul 19, 2017 3:48 pm

FrankenGraphics wrote:It seems i got the right version downloaded, but it was just as you suspected: windows pointed to an older version in the program files folder. Now, even if i delete old environment variables and add new, that doesn't seem to do anything. I just ended up with replacing the version in /program files.
Did you close and reopen the command prompt after you changed your PATH? Programs only see the environment as it was when they were started, so the command prompt won't use the new PATH unless it's been opened after you change it (assuming you didn't change it in the command prompt itself, anyway).

User avatar
FrankenGraphics
Formerly WheelInventor
Posts: 2033
Joined: Thu Apr 14, 2016 2:55 am
Location: Gothenburg, Sweden
Contact:

Re: ca65 feature is somehow "illegal"

Post by FrankenGraphics » Wed Jul 19, 2017 3:57 pm

Ah, that did the trick. I used the same prompt when testing. Just tested using the project folder .bat (which opens a new prompt) and it worked. Thanks!

Adding a blurb to the OP and adding resolved to the title.
http://www.frankengraphics.com - personal NES blog

Post Reply