MT MK2 troubleshooting (now cc65 in general and nesdev wiki)

Discuss technical or other issues relating to programming the Nintendo Entertainment System, Famicom, or compatible systems. See the NESdev wiki for more information.

Moderator: Moderators

na_th_an
Posts: 558
Joined: Mon May 27, 2013 9:40 am

Re: MT MK2 troubleshooting (now cc65 in general and nesdev w

Post by na_th_an »

I usually work in the command line, so I have a little .bat file which sets the environment variable and the path. I use several compilers for several systems (even several different versions of some compilers!) and I can't afford fiddling with global system configuration.

My "setenv.bat" is as simple as:

Code: Select all

@echo off
set path=c:\cc65\bin;%path%;
set CC65_HOME=c:\cc65\
cc65 --version
In case you want to try the "portable" way.
User avatar
thefox
Posts: 3134
Joined: Mon Jan 03, 2005 10:36 am
Location: 🇫🇮
Contact:

Re: MT MK2 troubleshooting (now cc65 in general and nesdev w

Post by thefox »

nesrocks wrote:So I tried instead of System Variables, adding it to the User Variables, at the end of the already present variables. Now the path appears on the cmd. But the command is not recognized when compiling the project.
Then I added C:\cc65\bin to the path, along with C:\cc65. Alas, the game compiled (miedow). I have to say, I don't think this is an ideal scenario for cc65 usage, it's too complicated to discover without proper guidance. I consider myself to be an advanced dos and windows user, and I had never set PATH on environment variables under windows (on DOS I did). I don't know what the solution is, but this is definitely scary to new developers. Can I update the wiki with these new instructions for windows users?
Either system or user variables should work. System variables are system-wide (= for all users). You only need to add C:\cc65\bin, I mistakenly said C:\cc65 in my earlier post.

(BTW, you probably don't want to use "alas" in that context, unless you're sad that you finally got the game to compile. :))
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi
niconii
Posts: 219
Joined: Sun Mar 27, 2016 7:56 pm

Re: MT MK2 troubleshooting (now cc65 in general and nesdev w

Post by niconii »

Yeah, you might be confusing "at last" ("finally") with "alas" ("unfortunately", "oh no!").
User avatar
koitsu
Posts: 4201
Joined: Sun Sep 19, 2004 9:28 pm
Location: A world gone mad

Re: MT MK2 troubleshooting (now cc65 in general and nesdev w

Post by koitsu »

Just set them under User Variables and be done with it. These persist across reboots but only apply to the account in question. On Windows: Control Panel -> System and Security -> System -> Advanced system settings -> Advanced tab -> Environment variables button -> User variables for {yourusername}.

If you prefer them being done in a wrapper .bat file, then that is just as valid/good too.
Post Reply