• Please review our updated Terms and Rules here

PET not loading PRG file?

desiv

Member
Joined
Aug 4, 2020
Messages
10
Location
Oregon
Let me start by saying I don't have a PET... :) So I am using VICE (Windows 10) for this...
But I do have two original cassette tape games that include PET versions (along with Apple II and TRS-80 versions)...

So for the first game (Avalon Hills NukeWar), I placed the tape in my Vic-20 datasette, loaded the game (BASIC). Looked good.
Saved it to my Pi1541...
I can run the game on my Vic-20 using the PET loader program, that gives me 40 columns and apparently handles some pokes...
So I thought, now that I have nukewar.prg, why not try this program on a PET emulator in Vice!!

I finally find out which drive type to use to read the disk images and I can see the program when I load a directory!
I load it, and it says it loaded..
I type list...
...
nothing...
...
Is there some type of difference with tokenization?
I tried (I think) using petcat to convert the PRG to text (that worked, or it looks like it to me...), and then back using the version for BASIC 2, BASIC 4, and even BASIC 1...
I got files, but none of them have loaded with anything that lists in VICE (I have tried the 4032 and the 2001 with 16k).
It is totally possible I am using the petcat program incorrectly tho...

Also, I loaded the text version I got from petcat in a text editor (Notepad++ and plain Notepad), copied it, and tried to paste it into VICE, but that doesn't seem to work well.
Either there are characters it doesn't like or some of the lines are too long to properly paste in? That might be something in the COPY/PASTE side tho... I only tried that late last night...
I did get a LOT of the pasting to work, but not all of it...

Just wondering what I am missing... Well, for this... There's lot I am missing in general... ;-)

Thanx!
 
I *think* the problem you're running into is the the VIC-20 and C64's BASICs include the ability to relocate tokenized BASIC programs saved on cassette/disk to the appropriate area in memory on loading, while the PET does not. Here is an article which mentions the problem and includes a manual fix for programs that were saved on a C64. Fair warning, the exact thing you have to adjust might be different for programs saved from a VIC-20.

https://www.classic-computers.org.nz...-for-a-pet.htm

EDIT: The FAQ linked in that article has the magic numbers for programs saved on other commodore machines, including the VIC-20. Note that it matters how much RAM your VIC has installed. I might worry a little if that PET loader program changes the base location for BASIC programs, but I guess that's getting ahead of things.
 
That looks very promising!!! I'll try that out! Thanx!
I'll let you know one way or the other! ;-)
 
I *think* the problem you're running into is the the VIC-20 and C64's BASICs include the ability to relocate tokenized BASIC programs saved on cassette/disk to the appropriate area in memory on loading, while the PET does not..
That did it!
Thanx!

Admittedly, it didn't work with the memory location from the FAQ. But I remembered that I could use DIRMASTER and view a file in assembler (or hex) and that would show the starting memory location.
In this case, it was starting at 2C01.
So I used 012C.
And that did it!!!
I actually couldn't find the PET version of Avalon Hill's NukeWar online (tho it is probably out there..), so glad I was able to save it...
 
Back
Top