User Tools

Site Tools


base:tools_for_putting_files_into_a_.d64_image

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
base:tools_for_putting_files_into_a_.d64_image [2015-04-17 04:34] – external edit 127.0.0.1base:tools_for_putting_files_into_a_.d64_image [2024-03-15 19:52] (current) – [cc1541] ftc
Line 49: Line 49:
 ====== cc1541 ====== ====== cc1541 ======
  
-c1541 works fine for most purposes, but some of the better coders around says it is buggy, and thus there is also [[http://noname.c64.org/csdb/release/?id=69964|cc1541]]. cc1541 also supports some more advanced options which gives you better control over how the files are actually laid out onto the image. The available options goes like this:+c1541 works fine for most purposes, but some of the better coders around says it is buggy, and thus there is also [[https://csdb.dk/search/?seinsel=all&search=cc1541&Go.x=0&Go.y=0|cc1541]]. The tool is actively maintained, provides many options to control the file layout on the disk, and is currently the only tool to create disk images for Krill's incredibly fast [[https://csdb.dk/release/?id=214786|Transwarp loader]]. 
 + 
 +====== mkd64 ====== 
 + 
 +Another flexible alternative is [[http://zirias.github.io/c64_tool_mkd64/|mkd64]] which takes a modular approach to creating the disk files, so you don't have to follow the default 1541 format at all. In fact, creation of a directory and block allocation map ist taken care of by a loadable module named "cbmdos". It also includes all sorts of tricks and tweaks possible with the 1541 format as well as a module providing some pre-made "separator" directory entries using graphical characters. The help pages for mkd64 itself and the cbmdos module look like this:
  
 <code> <code>
-Usage: cc1541 -niSsfw image.d64+mkd64 1.4b help
  
--n diskname   Disk namedefault='default' +mkd64 supports four types of options. Single options trigger some immediate 
--i id         Disk IDdefault='lodis+action, see below. Global options affect the whole disk image generation, 
--S value      Default sector interleavedefault=10 +module options are passed just to the last loaded module and file options 
--s value      Next file sector interleaveafter each file +control single files written to the image. 
-              the interleave value falls back to the default value set by -S +Global and module options must come before file options on the command line. 
--f filename   Use filename as name when writing next file + 
--w localname  Write local file to disk, if filename is not set then the +Modules can provide their own global and file options, check their help 
-              local name is used. After file written filename is unset +messages (-h MODULE) for reference. 
--x            Don't split files over track 18 hole (default split files+ 
--t            Use track 18 to also store files (makes -x useless) (default no+SINGLE options (must be the only option to mkd64): 
--           Use tracks 35-40 with SPEED DOS formatting +  -h [MODULE]    Show this help message orif given, the help message for 
--           Use tracks 35-40 with DOLPHIN DOS formatting+                 the module {MODULE}, and exit. 
 +  -V [MODULE]    Show version info and exit. If {MODULE} is givenversion 
 +                 info for that module is shown instead. 
 +  -C OPTFILE     Read options from file {OPTFILE} instead of the command 
 +                 line. The file has the same format as the normal command 
 +                 line and the following rules: 
 +                 - Strings containing whitespace are escaped using quotes 
 +                   or doublequotes (or ") 
 +                 The backslash (\) has no special meaning at all 
 +                 - Newlines are just normal whitspace and thus ignored 
 +  -M             Display all available modules and exit. 
 + 
 +GLOBAL options: 
 +  -m MODULE      Activate module {MODULE}. Modules are searched for in the 
 +                 directory of the mkd64 executable for a portable build of 
 +                 mkd64or in the dedicated module directory (typically 
 +                 /usr/lib/mkd64) for an installable build. Any options 
 +                 following -m are treated as module options to this module, 
 +                 as long as there is no other -m option or a -g option to 
 +                 get back to global scope or a -f option to switch to file 
 +                 scope. 
 +  -o D64FILE     Write generated disk image to {D64FILE}. This option must 
 +                 be given to actually write something. 
 +  -M MAPFILE     Write file map of the generated disk image to MAPFILE. The 
 +                 map file format is one line per file on disk: 
 +                 [startTrack];[startSector];[filename] 
 +  -P [MAXPASSES] Allow up to {MAXPASSES} passes, automatically applying 
 +                 options suggested by modules. The default is only one pass 
 +                 if this option is not given or up to 5 passes if it is 
 +                 given without an argument. 
 + 
 +MODULE options: 
 +  -g             Go back to global scope after loading a module. 
 +                 Please see the module documentation or help text 
 +                 (-h MODULE) for options available with specific modules. 
 + 
 +FILE options: 
 +  -f [FILENAME]  Start a new file. {FILENAME} is the name on your PC. It 
 +                 can be omitted for special emtpy files. 
 +  -t TRACK       Set fixed start track for current file. 
 +  -s SECTOR      Set fixed start sector for current file. 
 +  -i INTERLEAVE  Set sector interleave for current file. 
 +  -w             Write current file to disk image. 
 + 
 +Note that filesystem elements (like the original cbmdos directory and BAM) 
 +are implemented by modules. They can provide a sensible default value for 
 +sector interleave. A default allocation strategy is built in and determines 
 +start track and sector automatically if not given, modules can install their 
 +own strategy. 
 +</code> 
 +<code> 
 +mkd64 1.4b help 
 + 
 +* Module `cbmdos': 
 + 
 +cbmdos implements the default directory and BAM scheme of a 1541 floppy. 
 +Interleave is initially set to 10 for every file (cbmdos standard). The 
 +following options are recognized: 
 + 
 +  -d DISKNAME   The name of the disk, defaults to an empty name. 
 +  -i DISKID     The ID of the disk, defaults to two random characters. 
 +                this can be up to 5 characters long, in this case it will 
 +                overwrite the default `DOS typestring (`2A'). 
 +  -R DIRBLOCKS  reserve {DIRBLOCKS} blocks for the directory. The default 
 +                value is 18, which is exactly the whole track #18
 +  -I INTERLV    Set the directory interleave to {INTERLV}. The default value 
 +                for directory interleave is 3. 
 +  -D DOSVER     Set the dos version byte to {DOSVER}, given in hexadecimal. 
 +                The default value is (hex41. this can be used for soft 
 +                write protection, the original floppy will refuse any write 
 +                attempts if this value is changed. 
 +  -           Allocate all blocks in the BAM. 
 +  -0            Set available blocks to 0 in BAM, but still write flags for 
 +                individual sectors. 
 + 
 +* File options: 
 + 
 +  -n [FILENAME] Activates cbmdos directory entry for the current file. If 
 +                {FILENAME} is given, it is used for the cbmdos directory. 
 +  -T FILETYPE   One of `p', `s', `u', `r' or `d' (for PRG, SEQ, USR, REL or 
 +                DEL), defaults to PRG. 
 +  -P            Make the file write-protected. 
 +  -S BLOCKSIZE  Force the size written to the directory to be {BLOCKSIZE}. 
 +</code> 
 + 
 +Example usage from an own project: 
 +<code> 
 + mkd64 -odisks/demo.d64 \ 
 +          -mcbmdos -d'C=64 WORKBENCH' -i'AMIGA' -R1 -Da0 -0 \ 
 +          -mseparators \ 
 +          -fdemo_bootloader                    -proundtop        -S1      -w \ 
 +   -fdemo_kickstart  -n'DEMO: AMIGADOS' -pfr -t19 -s0 -TU -S0 -i15 -w \ 
 +   -fdemo_amigados                      -pfrmid       -TU -S0 -i15 -w \ 
 +   -fdemo_music      -n'RELEASE 1.09A4' -pfr          -TU -S0 -i15 -w \ 
 +   -f                -n'  2013/12/15  ' -pfr          -TD          -w \ 
 +   -f                -n'  BY ZIRIAS   ' -pfr          -TD          -w \ 
 +   -f                                   -proundbot    -TD          -w
 </code> </code>
 +For Linux/Windows binaries or Debian packages, check the [[https://github.com/Zirias/c64_tool_mkd64/tree/release|release branch]], folders "win32bin", "lin32bin", "deb32bin", "deb64bin".
 +//[Section added by Felix Palmen (Zirias)]//
  
-====== mkd64 & copy2d64 ======+====== k2xtools ======
  
 In the [[http://k2devel.sourceforge.net/download.html|k2xtools]] collection there are also two tools called "mkd64" (to create d64 images) and "copy2d64" (to copy files onto the d64 images). I don't have them installed on my computer at the moment, so I cannot provide a list of the available options, but at least I remember that these tools worked just fine when I used them a few years ago. In the [[http://k2devel.sourceforge.net/download.html|k2xtools]] collection there are also two tools called "mkd64" (to create d64 images) and "copy2d64" (to copy files onto the d64 images). I don't have them installed on my computer at the moment, so I cannot provide a list of the available options, but at least I remember that these tools worked just fine when I used them a few years ago.
base/tools_for_putting_files_into_a_.d64_image.1429238056.txt.gz · Last modified: 2015-04-17 04:34 by 127.0.0.1