Problem autostarting programs from the command line

Reports of emulation bugs discovered in CCS64.

Moderator: Håkan Sundell

Post Reply
purmike
Posts: 7
Joined: Mon May 11, 2009 1:23 pm

Problem autostarting programs from the command line

Post by purmike »

When I start CCS with (like described in the help file)

CCS.exe "C:\Mike\S4.D64,2" -autostart -windows

CCS doesn' start with the 2nd but with the 3rd progam.

It seems that the index of the first program is 0.

Can anyone help me?

Mike
http://www.purmike.de
Stuart Toomer
Site Co-Admin
Posts: 786
Joined: Wed Aug 20, 2003 2:46 pm
Location: East Yorkshire, England

Re: Problem autostarting programs from the command line

Post by Stuart Toomer »

You don't need the " signs... So it should be:
CCS.exe C:\Mike\S4.D64,2 -autostart -windows

If you are using a long file-name for your D64 file, you need to enclose it in " signs. But in the example above, you aren't.
Kind regards,

Stuart Toomer.
purmike
Posts: 7
Joined: Mon May 11, 2009 1:23 pm

Re: Problem autostarting programs from the command line

Post by purmike »

The problem aren't the "" signs because I start CCS with the API function ShellExecute

(ShellExecute hwnd, "open", "c:\program files\ccs\ccs.exe", "C:\Mike\S4.D64,2", ....)

CCS starts and opens the wrong c64-file in the image "C:\Mike\S4.D64". In the above command line i put 2 but CCS starts the 3rd c64-file!

Can you reproduce it?

Mike
Stuart Toomer
Site Co-Admin
Posts: 786
Joined: Wed Aug 20, 2003 2:46 pm
Location: East Yorkshire, England

Re: Problem autostarting programs from the command line

Post by Stuart Toomer »

Then, you ought to have it as:
(ShellExecute hwnd, "open", "c:\program files\ccs\ccs.exe", "C:\Mike\S4.D64,2 -autostart -windows", ....)
Kind regards,

Stuart Toomer.
purmike
Posts: 7
Joined: Mon May 11, 2009 1:23 pm

Re: Problem autostarting programs from the command line

Post by purmike »

Hello Stuart,

thank you for your patience. But the problem still exists. After your suggestion
ShellExecute hwnd, "open", "c:\program files\ccs\ccs.exe", "C:\Mike\S4.D64,2 -autostart -windows", ....
CCS only starts without opening a c64-file.

With the following command (within my program)
ShellExecute hwnd, "open", "c:\program files\ccs\ccs.exe", "C:\Mike\S4.D64,2" -autostart -windows,...
CCS starts and autostart the 3rd instead the 2nd file.

Please try to start CCS in your command line (replace xxx with the right path) and choose a .d64-file with more then 2 c64-files:

"c:\program files\xxx\CCS.exe" "C:\xxx\xxx.D64,2" -autostart -windows

Does really CCS autostarts the 2nd file?
Stuart Toomer
Site Co-Admin
Posts: 786
Joined: Wed Aug 20, 2003 2:46 pm
Location: East Yorkshire, England

Re: Problem autostarting programs from the command line

Post by Stuart Toomer »

I wonder if the part-number (2) is actually 0-bound, so 2 is actually the 3rd, and 0 is the 1st... Try using 1 instead of 2, in order to auto-start the 2nd program within the D64 file.
Kind regards,

Stuart Toomer.
purmike
Posts: 7
Joined: Mon May 11, 2009 1:23 pm

Re: Problem autostarting programs from the command line

Post by purmike »

Please correct the help file of ccs...
Stuart Toomer
Site Co-Admin
Posts: 786
Joined: Wed Aug 20, 2003 2:46 pm
Location: East Yorkshire, England

Re: Problem autostarting programs from the command line

Post by Stuart Toomer »

purmike wrote:Please correct the help file of ccs...
So, can you confirm that my suggestion is correct (i.e. that the part-number is 0-bound)?
Kind regards,

Stuart Toomer.
purmike
Posts: 7
Joined: Mon May 11, 2009 1:23 pm

Re: Problem autostarting programs from the command line

Post by purmike »

Yes, I agree with you. The part number is 0-bound and means the 1st program within a d64 file.

The CCS help file describes:
....
CCS C:\TheBestGames.D64,2 -window -autorun
- This will run CCS64 in windowed mode, and select the disk file image named TheBestGames.D64 as the current inserted floppy disk into disk drive with device 8, and then load the 2nd file from the directory of that floppy disk, and automatically start it.
...

I supposed it in my first post: " ... It seems that the index of the first program is 0...."

Mike
Stuart Toomer
Site Co-Admin
Posts: 786
Joined: Wed Aug 20, 2003 2:46 pm
Location: East Yorkshire, England

Re: Problem autostarting programs from the command line

Post by Stuart Toomer »

purmike wrote:Yes, I agree with you. The part number is 0-bound and means the 1st program within a d64 file.

The CCS help file describes:
....
CCS C:\TheBestGames.D64,2 -window -autorun
- This will run CCS64 in windowed mode, and select the disk file image named TheBestGames.D64 as the current inserted floppy disk into disk drive with device 8, and then load the 2nd file from the directory of that floppy disk, and automatically start it.
...

I supposed it in my first post: " ... It seems that the index of the first program is 0...."

Mike
I'll correct the HTML file and send it to Hakan for iclusion in future releases... Thank you for confirming this.
Kind regards,

Stuart Toomer.
purmike
Posts: 7
Joined: Mon May 11, 2009 1:23 pm

Re: Problem autostarting programs from the command line

Post by purmike »

Hello,

I have another question: Is there a way to start CCS64 only with the file (= selected disc drive) like "CCS C:\TheBestGames.D64 -window"?
At the moment CCS64 always loads a program from the file.

Thanks and greetings,

Mike
Post Reply