How Do you Go About Converting a TAP to PRG?

Discuss anything related to the VIC
Post Reply
User avatar
Pedro Lambrini
Vic 20 Scientist
Posts: 1132
Joined: Mon Dec 01, 2008 11:36 am

How Do you Go About Converting a TAP to PRG?

Post by Pedro Lambrini »

TAP files are great for the sake of preservation but they're a pain in the neck when it comes to modern storage devices as used on a real VIC. The most common and affordable modern storage solutions (SD2IEC and uIEC)can't even do anything with them...

I would love to start converting some TAP only games to PRG but I haven't a clue how to do it. I've tried messing around with the likes of WAV-PRG and TAPclean but I haven't really worked anything out as yet.

What kind of knowledge do I need to embark upon this project? Is it even possible for someone as ignorant as me to learn!?
"...That of the Eastern tribe being like a multitude of colours as if a rainbow had settled upon its brow..." Daniels 1:3
User avatar
eslapion
ultimate expander
Posts: 5458
Joined: Fri Jun 23, 2006 7:50 pm
Location: Canada
Occupation: 8bit addict

Re: How Do you Go About Converting a TAP to PRG?

Post by eslapion »

Pedro Lambrini wrote:TAP files are great for the sake of preservation but they're a pain in the neck when it comes to modern storage devices as used on a real VIC. The most common and affordable modern storage solutions (SD2IEC and uIEC)can't even do anything with them...

I would love to start converting some TAP only games to PRG but I haven't a clue how to do it. I've tried messing around with the likes of WAV-PRG and TAPclean but I haven't really worked anything out as yet.

What kind of knowledge do I need to embark upon this project? Is it even possible for someone as ignorant as me to learn!?
Many TAP files have to stay in that format because the original games either use a tape accelerator or some form of copy protection.

Unless the game has no protection, the type of conversion you want to do is more or less a matter of cracking the software you want to convert.

It is quite normal that SD2IEC and uIEC can't do anything with these as these devices are substitutes to disk storage device which use a completely different type of data transfer.

In other words, how you go about converting a TAP to a PRG is a case by case matter and it is VERY complicated, most of the time.
Be normal.
Boray
Musical Smurf
Posts: 4064
Joined: Mon May 03, 2004 10:47 am

Post by Boray »

You can try the buttons "Save as" and "Next" in PRG Starter. That can help you extract the files at least.
PRG Starter - a VICE helper / Vic Software (Boray Gammon, SD2IEC music player, Vic Disk Menu, Tribbles, Mega Omega, How Many 8K etc.)
User avatar
Mike
Herr VC
Posts: 4842
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: How Do you Go About Converting a TAP to PRG?

Post by Mike »

Pedro,
eslapion wrote:Unless the game has no protection, the type of conversion you want to do is more or less a matter of cracking the software you want to convert.
just to give you a small hint at what is involved in this:

- one would at first simply load in the game as normal, checking the type of the autostart and fastloader involved (if any),

- the next big issues: what parts of the RAM are actually used? Could it be saved as one-filer? Is there an identifiable start-address? [1] Does it rely to be started from an 'unmodified' state?

- normally the goal is to prepare the game in a state in memory, as if it had just been loaded from tape, but has not yet been 'started'.

- the next step: inhibit the autostart(ing fastloader), and instrument its code so it just loads the game, but doesn't start it - rather writes a memory dump to disk,

- as final step, write a loader/intro for the memory dump, which then starts the game, or use a packer to compress the memory dump which then quite as well starts the unpacked dump at the start address.

A lot of copy protection measures went a long way to keep the cracker from saving that raw memory dump to another medium. Nowadays, with VICE and its built-in monitor it's not so difficult anymore, but you still need a good lot of programming experience.

Michael

[1]: you'd usually look for code which initialises the stack, the video chip registers, sets up interrupt vectors etc., like 'SEI, LDX #$FF, TXS' ...
tlr
Vic 20 Nerd
Posts: 567
Joined: Mon Oct 04, 2004 10:53 am

Post by tlr »

Copy protection methods seem to be far less developed on the Vic-20 than on the c64 though.

The protected games usually just rely on what is loaded in the tape buffer and sometimes the screen contents. They also fill most of the memory to make it more difficult to transfer.

I have rarely encountered any custom fast loaders.

You can try this to get the initial dump: raw tape transfer 1.1
User avatar
Mayhem
High Bidder
Posts: 3027
Joined: Mon May 24, 2004 7:03 am
Website: http://www.mayhem64.co.uk
Location: London

Post by Mayhem »

I'll also chime in:

- if the game is more than one-parter, even if the game section is one load, there might be data loaded in from the previous part that the game uses.

TLR's program is pretty handy, and I've been able to use it to transfer a few games so far that fall into the constraints (single load, unexpanded).

@TLR - if you want to see a custom fast loader, I believe the Anirog release of "Jump Jet" uses one. It's 16K and yet doesn't go past about 27 on the counter. Unless it's that small code wise and needs all the memory for processing.
Lie with passion and be forever damned...
User avatar
eslapion
ultimate expander
Posts: 5458
Joined: Fri Jun 23, 2006 7:50 pm
Location: Canada
Occupation: 8bit addict

Post by eslapion »

tlr wrote:I have rarely encountered any custom fast loaders.
Sink your teeth in the tape version of paratrooper.
:wink:
Be normal.
tlr
Vic 20 Nerd
Posts: 567
Joined: Mon Oct 04, 2004 10:53 am

Post by tlr »

Mayhem wrote:@TLR - if you want to see a custom fast loader, I believe the Anirog release of "Jump Jet" uses one. It's 16K and yet doesn't go past about 27 on the counter. Unless it's that small code wise and needs all the memory for processing.
eslapion wrote:
tlr wrote:I have rarely encountered any custom fast loaders.
Sink your teeth in the tape version of paratrooper.
:wink:
I'd love to see those, where do I get them (as .tap)?
User avatar
Mike
Herr VC
Posts: 4842
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Post by Mike »

eslapion wrote:Sink your teeth in the tape version of paratrooper. ;)
Or the tap of Las Vegas 20 (for +16K VIC-20), from which I could extract a single file *.prg some years ago.

tlr, if you are also interested in this one, just PM me your e-mail address.
User avatar
Mayhem
High Bidder
Posts: 3027
Joined: Mon May 24, 2004 7:03 am
Website: http://www.mayhem64.co.uk
Location: London

Post by Mayhem »

Jump Jet is in GB20, as I made the TAP from my own original.
Lie with passion and be forever damned...
tlr
Vic 20 Nerd
Posts: 567
Joined: Mon Oct 04, 2004 10:53 am

Post by tlr »

Mayhem wrote:Jump Jet is in GB20, as I made the TAP from my own original.
Aha, where do I get it? I only found v0.2 on Roberts site and Jump Jet doesn't seem to be in it. Maybe I missed something?
tlr
Vic 20 Nerd
Posts: 567
Joined: Mon Oct 04, 2004 10:53 am

Post by tlr »

Code: Select all

    1 print"{clr}anirog cracker / tlr":print
    2 print"insert original and";
    3 sys63407:print"loading..."
    4 poke913,44:poke916,44
    5 poke929,116:poke930,196
    6 sys849
download: anirog_cracker.prg

Load original tape using above program and then save.
Worked on Flight Path 747 and Las Vegas. Others?
User avatar
Mayhem
High Bidder
Posts: 3027
Joined: Mon May 24, 2004 7:03 am
Website: http://www.mayhem64.co.uk
Location: London

Post by Mayhem »

Jump Jet will be in v0.3 coming out shortly. I thought I may have uploaded it somewhere first too... or maybe not. Have to check.
Lie with passion and be forever damned...
User avatar
Pedro Lambrini
Vic 20 Scientist
Posts: 1132
Joined: Mon Dec 01, 2008 11:36 am

Post by Pedro Lambrini »

Bugger. Well, this is certainly out of my league! Thanks for all the replies though. :)
"...That of the Eastern tribe being like a multitude of colours as if a rainbow had settled upon its brow..." Daniels 1:3
User avatar
Mayhem
High Bidder
Posts: 3027
Joined: Mon May 24, 2004 7:03 am
Website: http://www.mayhem64.co.uk
Location: London

Post by Mayhem »

Yeah, if it was fairly easy, I'd be doing it to populate parts of GB20...
Lie with passion and be forever damned...
Post Reply