Cannot Open Program In Emulator Through Commandline

Get technical support from the community & developers with specific X16 programs if you can't find the solution elsewhere
(for general non-support related chat about programs please comment directly under the program in the software library)
Post Reply
Manannan
Posts: 70
Joined: Fri Oct 14, 2022 7:23 am

Cannot Open Program In Emulator Through Commandline

Post 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
User avatar
desertfish
Posts: 1098
Joined: Tue Aug 25, 2020 8:27 pm
Location: Netherlands

Cannot Open Program In Emulator Through Commandline

Post 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

Manannan
Posts: 70
Joined: Fri Oct 14, 2022 7:23 am

Cannot Open Program In Emulator Through Commandline

Post 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"



 

TomXP411
Posts: 1785
Joined: Tue May 19, 2020 8:49 pm

Cannot Open Program In Emulator Through Commandline

Post 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. 



 

Post Reply