Page 1 of 2

How to start .prg files in VICE

Posted: Tue Sep 27, 2005 12:45 pm
by pmsoft
Hi,
I finally found the matrix.prg file to play my most favourite game for the vic-20 ( I bought a vic-20 in 1981 instead of a Honda MB5 motorbike)

But I can't start the game using the Vice emulator on a pc.

How can I start a .prg?
I get a "cannot attach specified file" error.

Hope someone can answer me!

Re: How to start .prg files in VICE

Posted: Tue Sep 27, 2005 12:50 pm
by tlr
pmsoft wrote:Hi,
I finally found the matrix.prg file to play my most favourite game for the vic-20 ( I bought a vic-20 in 1981 instead of a Honda MB5 motorbike)

But I can't start the game using the Vice emulator on a pc.

How can I start a .prg?
I get a "cannot attach specified file" error.

Hope someone can answer me!
Did you use: "Autostart disk/tape image..."?

Posted: Tue Sep 27, 2005 1:55 pm
by Schlowski
It's not a disk or cardridge image but simply a program file as on a 1541 disk.

You must setup vice for using an emulated disk drive:

In Vice menu Settings/Peripheral settings and there drive 8 : Directory and then point to where your prg-file is located.

Afterwards you can simply load"$",8 to see directory or load "matrix.prg",8 in Vice...

Maybe you have to disable Options/True Drive emulation first.

Schlowski

Posted: Tue Sep 27, 2005 2:19 pm
by Schema
I just drag-n-drop the .prg file into the VICE window, that works fine.

But you have to make sure VICE is set up with the correct amount of RAM expansion. If you get garbage characters on the screen then it's wrong.

Re: How to start .prg files in VICE

Posted: Tue Sep 27, 2005 2:26 pm
by pmsoft
Thank you Schlowski! Works well now!

Posted: Tue Sep 27, 2005 2:37 pm
by carlsson
As (Win)VICE accepts dropping a PRG onto it and load, I assume it would not be rocket science to add a menu option to load an individual file too. It reminds me that I began fiddling with WinVICE a while ago, on the topic of how to load various files. I never got to the GUI part, but maybe I should try again. If I come up with something useful, I could contact the VICE team.

Posted: Tue Sep 27, 2005 2:52 pm
by tlr
carlsson wrote:As (Win)VICE accepts dropping a PRG onto it and load, I assume it would not be rocket science to add a menu option to load an individual file too. It reminds me that I began fiddling with WinVICE a while ago, on the topic of how to load various files. I never got to the GUI part, but maybe I should try again. If I come up with something useful, I could contact the VICE team.
Allow me to repeat myself: "Autostart disk/tape image..."!

Works fine with disk-images, tape-images, prg-files etc...

Posted: Tue Sep 27, 2005 5:46 pm
by 6502dude
Schema wrote:I just drag-n-drop the .prg file into the VICE window
Great tip!

Not being one for reading much, I was creating disk images and then copying the prg files to .d64 to launch programs.

Your method saves a pile of time. :D

Posted: Wed Sep 28, 2005 1:34 am
by Schlowski
Oh, didn't realize that one can autoattach a prg-file or even drop it onto vice...
I always make it the 'old way' as described :-)

Posted: Wed Sep 28, 2005 7:25 am
by carlsson
Me neither. I only looked at the regular attach options which would not involve auto starting, but an individual program file is not much to attach to the system and would just be cumbersome to manually load.

Of course the concept of using a directory is good too, for example in the case you need to load the same file over and over (e.g. cross-development where the binary file is replaced outside the emulator) without resetting the virtual computer every time.

Posted: Wed Sep 28, 2005 8:31 am
by Schlowski
To get the right retro feeling you should always load"file",8 and run...
And it's good for multipart-programs which reload parts on runtime.

Posted: Wed Sep 28, 2005 10:38 am
by tlr
carlsson wrote:Of course the concept of using a directory is good too, for example in the case you need to load the same file over and over (e.g. cross-development where the binary file is replaced outside the emulator) without resetting the virtual computer every time.
The directory gets automatically mounted if you use "Autostart disk/tape image...".
This is what I always use when emulator-developing.

Re: How to start .prg files in VICE

Posted: Fri Oct 19, 2018 7:52 am
by vicassembly
Rehashing an obviously old topic.

I have always used the mac version and could attach a .prg and toggle the auto start option. This was a nice way to load.

Now, I have attempted to use the windows version.

1. Autostart option ONLY seems to automatically start. I cannot just load the .prg
2. Going to settings>Peripheral Settings> Choosing Used IEC Devine and specifying a directory does not work. I get program not found.

So.... How can I load a .prg on Windows without actually starting it?

Re: How to start .prg files in VICE

Posted: Fri Oct 19, 2018 8:43 am
by beamrider
yes, I second that - getting "?file not found" in VICE 3.0 when I type:

LOAD "TEST",8

..for a file I know is there

Re: How to start .prg files in VICE

Posted: Fri Oct 19, 2018 9:13 am
by Mike
If you want to access files hosted in a PC directory, make sure:

- True Drive Emulation (TDE) is ticked off,
- Virtual Device Traps is ticked on.

In "Settings > Peripheral settings...":

- tick off "Read P00 files", "Write P00 files" and "Hide non-P00 files" (them ticked on only serves trouble...)

In "Settings > Autostart settings...":

- Set "PRG autostart mode" to "Virtual FS".

Don't forget to save these settings, so VICE remembers them on next start up. You'll only need to re-enable TDE in the rare case of programs that re-program the disk drive (or when programs use the CBM partitions in *.d81 disk images, as VICE VDrive still doesn't support them).
vicassembly wrote:Going to settings>Peripheral Settings> Choosing Used IEC Devine and specifying a directory does not work.
I never did find a use of "Use IEC device" ticked on. IIRC, that option only works with real hardware attached over those XU-... etc. cables. And that use case anyway isn't relevant to files stored in a PC directory.

Of course "autostarting" a file (by dragging it into the VICE main window or using "File > Autostart ...") is supposed to do exactly that, autostart it! If you want to load a file without autostarting it, first mount the surrounding PC directory in the requester of "Settings... > Peripheral settings ..." (with the Radio button set to "PC directory"). You can verify, that the correct PC directory is mounted as usual with LOAD"$",8 and LIST.

Then, LOAD the file as per usual.


Pretty much basic stuff, IMO.


P.S. @beamrider: please check against a current version of VICE. Really no use in older versions of VICE other than seeing current software exposing emulation flaws in those. ;)