vrtconv is a program for converting and inspecting VRT files.
See VRT.txt for more information on the format.

Output of "vrtconv -h":
---<snip>---
Usage: vrtconv [OPTION]* COMMAND ARGS

Available COMMANDs:

    Creating new VRT files

  new TYPE [INITEM]*
Builds a new TYPE .vrt from the given INITEMs.


    Operations on existing VRT files

  list INVRT
List the .vrt contents and other info.

  dump INVRT [PREFIX]
Dumps the .vrt contents. Outputs PRG/BIN files.
Filenames start with PREFIX if given.

  touch VRT
Loads and saves the .vrt.
Updates name, SYS address and PAL/NTSC flags if given.

Notes on ARGS:

  VRT
VIC-20 VRT file, file extension .vrt.

  TYPE
Cartridge type. Supported types:
    gn - generic cartridge (VRT ID 1)
         Multiple FILEs and rN ITEMs allowed
    mc - Mega-Cart (VRT ID 2)
         First FILE is 2MB ROM, optional second FILE is 8kB NvRAM
    fe - Final Expansion (VRT ID 3)
         FILE is 512kB Flash ROM image
    fp - Vic Flash Plugin (VRT ID 4)
         FILE is 4MB Flash ROM image

  ITEM
Input item description. One of the following:
  FILE - PRG or BIN file.
  rN - RAM chip at block N. Possible N values:
    0 - Block 0 ($0400-$0FFF, 3kB)
    1 - Block 1 ($2000-$3FFF, 8kB)
    2 - Block 2 ($4000-$5FFF, 8kB)
    3 - Block 3 ($6000-$7FFF, 8kB)
    5 - Block 5 ($A000-$BFFF, 8kB)

  PREFIX
A prefix to add to the output files. Defaults to "dumpvrt" is not given.


Available OPTIONs:
  -h           Show more help.
  -o OUTVRT    Save .vrt to file OUTVRT. (default = use INVRT)
  -n NAME      Set cartridge name to NAME.
  -c COMPAT    Set PAL/NTSC info to COMPAT. (u/p/n/a, default = u)
  -s ADDR      Set SYS address to ADDR. (0xABCD for hex, default = 0)
---<snip>---

Some examples:

* vrtconv -h
    Prints all the help text (seen above).

* vrtconv list some.vrt
    Prints information of the .vrt file.

* vrtconv -o somecart.vrt new gn somecart.prg
    Converts the one part generic (gn) cartridge "somecart.prg" to VRT
    format, saving the results to "somecart.vrt"

* vrtconv -o "some cart.vrt" new gn "some cart with spaces in the name.prg"
    As above, but now with nastier filenames requiring quotes.

* vrtconv -o ram3k.vrt new gn r0
    Creates a 3k RAM expansion cartridge; "rN" are special tokens for
    "RAM in block N".

* vrtconv -o acart.vrt -c n new gn acart_a0.prg acart_60.prg
    Converts the two part cartridge acart_[a6]0.prg to VRT
    format and marks the cartridge NTSC only (-c n).
    Other -c values are "p" for PAL, "a" for any and the
    default "u" for unknown.

* vrtconv -n "Awesome two-parter cart" touch acart.vrt
    Reads the cart, updates the name and saves the cart.
    The name could have been given in the above example already,
    but the lines are long enough as is...

* vrtconv -s 0xa123 touch acart.vrt
    Sets the SYS address to $A123. Use f.ex "-s 12345" to set the value
    in decimal notation.

* vrtconv -o megacart.vrt new mc megacart.bin nvram.bin
    Creates a Mega-Cart image. The NvRAM is optional.

* vrtconv -o fe3.vrt new fe fe3vice.bin
    Creates a Final Expansion image.

* vrtconv -o vfp.vrt new fp menu-s.bin
    Creates a Vic Flash Plugin image.

* vrtconv dump some.vrt my_dump
    Dumps the cartridge to individual files starting with
    the prefix "my_dump".
