Page 1 of 1

Cannot Open Program In Emulator Through Commandline

Posted: Fri Oct 14, 2022 7:19 am
by Manannan

I hope that this is not a silly question but I cannot open a program through the emulator using the prg argument.

My environment is Windows 10.

Here is my command argument: x16emu -prg "CC65Test.cx16" -run

I can rule out either the file been invalid or the file not been in the correct location, because I can start the emulator without arguments and the load the file through BASIC. 



Also the error I am getting is: The error I am receiving is Cannot open CC65Test.cx16!
commanderImage.JPG

Cannot Open Program In Emulator Through Commandline

Posted: Fri Oct 14, 2022 1:10 pm
by desertfish

3 ideas: try not using the quotes around the name / try naming it CC65Test.prg / try using only lowercase letters in the filename

Still, it should probably work as is


Cannot Open Program In Emulator Through Commandline

Posted: Mon Oct 17, 2022 7:44 am
by Manannan

Thanks for responding to my question.



I think my issue was that I was not running my command in the same directory as the emulator.



Let me be clearer:

This fails: C:\>x16emu -prg "CC65Test.cx16"



However this works: 

C:\>x16emu -prg "c:\commander\CC65Test.cx16"



Also this works:

C:\Commander>x16emu -prg "CC65Test.cx16"



 


Cannot Open Program In Emulator Through Commandline

Posted: Mon Oct 17, 2022 4:50 pm
by TomXP411


On 10/17/2022 at 12:44 AM, Manannan said:




Thanks for responding to my question.



I think my issue was that I was not running my command in the same directory as the emulator.



Let me be clearer:

This fails: C:\>x16emu -prg "CC65Test.cx16"



However this works: 



C:\>x16emu -prg "c:\commander\CC65Test.cx16"



Also this works:

C:\Commander>x16emu -prg "CC65Test.cx16"



 



Yeah, that first command line is never going to work if your stuff is in "C:\commander". You either need to already be in the correct directory (via the CD command) or explicitly specify the path to the program and image file - as you discovered.