Skip to content

.MDR Cruncher Home

Matteo Vitturi edited this page Aug 21, 2019 · 5 revisions

mdr.pl

This is a script that allows you to manipulate .MDR cartrige files. This script needs a .MDR filename that is read entirely at start. Then some operations will be performed based on options given.

Usage is:

perl mdr.pl [switch] <cartridge> [key=value ...]

where [switch] can be

 -h    for help
 -l    show catalog (optional)
 -f    used with -l switch: Show free sectors.
 -b    used with -l switch: Hide bad sectors.
 -s    with -l show sectors used instead of file details
 -r    removes autorun LINE from programs in cartridge.
 -v    verbose, show much more details at start
 -x    fix bad sectors

is the filename of a .MDR file. Normally operation will be done "in-place" unless an out option is specified. [key=value] available are listed here below:

Cartridge only options:

  rename=name     rename "name". New name is given via "to" option
  copy=name       copy "name". New name given via "to" option
  to=newname      destination "name" in .MDR.
  erase=name      erase "name" from .MDR
  label=name      change label of cartridge.
  noautorun=name  remove autorun of a single file "name" inside .MDR
  autorun=name    set autorun of a single file "name" inside .MDR
  line=number     used with autorun option to specify run

Host file options:

 out=output.MDR  create a new cartridge file, original is unchanged.

From-to cartridge options:

 get=name        gets a file from .MDR and write it to "host" file
 dump=name       same as get, but output is just a dump file
 text=name       same as dump, but converts LF to CR, or CR+LF to CR.
 put=name        reads "host" files and creates files to .MDR
 host=file.out   host file involved in get/put operation

Examples:

-l xyz.mdr noautorun=run                     remove autorun from "run"
-l xyz.mdr erase=run                         erase "run" file
-l xyz.mdr rename=abc to=ABC                 rename "abc" to "ABC"
-l xyz.mdr -p tape=afile.tap                 put afile.tap content  
-l xyz.mdr put=[f1,f2] to=file1              put files
Clone this wiki locally