More development on the PRG to TAP tool

I managed to add a few options to the PRG to TAP tool. Worth mentioning are:

  • the ability to append data to an existing TAP file, rather than always writing a new one
  • the ability to inject a file into the cassette buffer, at $0351, wrapped into a CBM ROM Header (autostarting turbo tape programs usually store part of their code here, up to 171 bytes)
  • the ability to include a 5 second trailing silence, if required

Here’s the tool’s output when invoked without arguments:

PRG to TAP version 1 generator V1.3 - (C) 2016 Luigi Di Fraia
Converts a PRG file into a TAP file using the CBM ROM loader

Usage: prg2tap.exe [options] "<PRG filename>" "<TAP filename>"

Options:
 -a: appends to <TAP filename> instead of overwriting it
 -r: sets file type to relocatable (type 1)
 -n "<ASCII name>": sets the CBM ROM filename to <name>
 -h "<hex string>": sets the CBM ROM filename to <hex string>
 -p "<PRG payload>": inserts <PRG payload> into the Header @ $0351
 -s: adds a 5 second trailing silence

Examples:
 prg2tap.exe -n "HELLO WORLD!" example.prg helloworld.tap
 prg2tap.exe -h "930548454c4c4f20574f524c4421" example.prg helloworld.tap
 prg2tap.exe -p payload.prg example.prg helloworld.tap

Notes:
 PETSCII codes can be part of the <hex string> for advanced uses
 The default file type is non-relocatable (type 3)

PETSCII codes of interest (full listing at http://sta.c64.org/cbm64pet.html):
 05: white
 08: disable SHIFT+C=
 0e: switch charset to lo/up
 12: reverse on
 13: home
 1c: red
 1e: green
 1f: blue
 81: orange
 8e: switch charset to up/gfx
 90: black
 92: reverse off
 93: clear
 95: brown
 96: pink
 97: dark grey
 98: grey
 99: light green
 9a: light blue
 9b: light grey
 9c: purple
 9e: yellow
 9f: cyan

And here’s a download link.

This entry was posted in Retrocomputing, Technical and tagged , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s