How to start .prg files in VICE

You need an actual VIC.

Moderator: Moderators

pmsoft
Vic 20 Newbie
Posts: 3
Joined: Tue Sep 27, 2005 12:29 pm

How to start .prg files in VICE

Post 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!
tlr
Vic 20 Nerd
Posts: 588
Joined: Mon Oct 04, 2004 10:53 am

Re: How to start .prg files in VICE

Post 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..."?
User avatar
Schlowski
NoMess!
Posts: 892
Joined: Tue Jun 08, 2004 12:20 pm

Post 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
User avatar
Schema
factor
Posts: 1436
Joined: Tue Mar 23, 2004 7:07 am
Website: http://www.jammingsignal.com
Location: Toronto, Ontario

Post 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.
pmsoft
Vic 20 Newbie
Posts: 3
Joined: Tue Sep 27, 2005 12:29 pm

Re: How to start .prg files in VICE

Post by pmsoft »

Thank you Schlowski! Works well now!
carlsson
Class of '6502
Posts: 5516
Joined: Wed Mar 10, 2004 1:41 am

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

Image Image Image Image Image
tlr
Vic 20 Nerd
Posts: 588
Joined: Mon Oct 04, 2004 10:53 am

Post 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...
6502dude
megacart
Posts: 1581
Joined: Wed Dec 01, 2004 9:53 am

Post 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
Image Mega-Cart: the ultimate cartridge for your Commodore Vic-20
User avatar
Schlowski
NoMess!
Posts: 892
Joined: Tue Jun 08, 2004 12:20 pm

Post 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 :-)
carlsson
Class of '6502
Posts: 5516
Joined: Wed Mar 10, 2004 1:41 am

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

Image Image Image Image Image
User avatar
Schlowski
NoMess!
Posts: 892
Joined: Tue Jun 08, 2004 12:20 pm

Post 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.
tlr
Vic 20 Nerd
Posts: 588
Joined: Mon Oct 04, 2004 10:53 am

Post 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.
vicassembly
Vic 20 Devotee
Posts: 253
Joined: Fri Mar 19, 2010 1:40 pm

Re: How to start .prg files in VICE

Post 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?
User avatar
beamrider
Vic 20 Scientist
Posts: 1456
Joined: Sun Oct 17, 2010 2:28 pm
Location: UK

Re: How to start .prg files in VICE

Post 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
User avatar
Mike
Herr VC
Posts: 4976
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: How to start .prg files in VICE

Post 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. ;)
Post Reply