Amitools Release 0.6.0
Total Page:16
File Type:pdf, Size:1020Kb
amitools Release 0.6.0 Jul 09, 2021 Contents 1 xdftool 1 1.1 Introduction...............................................1 1.2 Usage...................................................1 1.3 Commands................................................2 2 xdfscan 13 2.1 Introduction............................................... 13 2.2 Usage................................................... 13 2.3 Scanner Output.............................................. 14 3 rdbtool 15 3.1 Introduction............................................... 15 3.2 Usage................................................... 15 3.3 Commands................................................ 16 4 romtool 25 4.1 Features.................................................. 25 4.2 General Commands........................................... 25 4.3 Inspect a ROM.............................................. 26 4.4 Split a ROM into modules........................................ 28 4.5 Build a new ROM............................................ 30 5 Tools 33 6 Project Links 35 i ii CHAPTER 1 xdftool the universal Amiga disk image file tool 1.1 Introduction The xdftool is a tool from the amitools tool set that allows to read disk images intended for Amiga emulators like ADF or HDF files and display or extract their contents. Furthermore, you can • create new ADF or HDF images • copy files from the image • copy your own files to it • master own images • repack existing images • work on partitions inside RDISK/RDB hdf images or on real disks 1.2 Usage xdftool is a command line utility that is always called with an image file path name as the first argument and with one or more commands working on this image: > xdftool <image.adf|image.hdf> <command> [option] You can issue multiple commands on a single image by concatenating them with a plus character: > xdftool <image.[ah]df> <command1> [options1] + <command2> [options2] ... For Example:: 1 amitools, Release 0.6.0 > xdftool test.adf format ``My Image`` + makedir c + write myfile c 1.3 Commands This section describes the commands available for xdftool. You can always issue a help command to see all commands: > xdftool test.adf help 1.3.1 Inspect Image list - Display the list of files list [<ami_path>] [all] [info] [detail] This command lists the given directory in the image. The info option appends some statistics information at the end of the list including used blocks, bytes and file bytes. Each file or directory is display with name, size, protection flags, modification date and comment (if available). The detail options replaces the comment with details on the file‘‘s storage including number of data blocks and file system blocks. The all option shows a directory recursively, i.e. also its contained directories. If no <ami_path> is given then the full contents of the volume contained in the image will be listed. This implies the all and info options. Example:: > xdftool test.adf list ; show whole image > xdftool test.adf list / ; same command > xdftool test.adf list c all ; show 'C' directory on image type - Display the contents of a file type <ami_path> The contents of the specified Amiga file will be written to the standard output. This is useful to quickly see the contents of a file in an image. Example: > xdftool wb310.adf type s/startup-sequence > xdftool pics.adf type mycool.ilbm | ilbmtoppm > img.ppm info - Disk Image Information info 2 Chapter 1. xdftool amitools, Release 0.6.0 Display information on the disk image. This will display the number of blocks totally available in the disk image, the number of used and free blocks. Additionally, the corresponding byte values are printed. Example: > xdftool wb310.adf info Blocks: total: 1760 used: 1698 free: 62 Bytes: total: 901120 used: 869376 free: 31744 read - Read file data or directory tree from an Image read <ami_path> [sys_path] If <ami_path> is a file then the file contents will be read and copied to your hosts file system. If no <sys_path> is given then the Amiga file will be written to the host’s current directory with the base name of the <ami_path>. If the <sys_path> is given and is a directory then the file will be written there. Otherwise the <syspath> is the file name for the host file. If the <ami_path> is a directory then the full directory structure including files and sub directories will be transferred to the host’s file system. If no <sys_path> is given then the directory tree will be created in host’s current directory. If <sys_path> is available then the directory will be created in this path. Otherwise the directory will be named as <sys_path>. Example: > xdftool wb310.adf read c/dir ; copy file 'dir' to host's current dir > xdftool wb310.adf read c/dir . ; same command > xdftool wb310.adf read c/dir a ; copy file 'dir' to host file 'a' > xdftool wb310.adf read devs ; copy 'devs' dir tree to current dir > xdftool wb310.adf read devs . ; same command > xdftool wb310.adf read devs b ; copy dir tree 'devs' to host dir 'b' blkdev - Show information on the underlying block device blkdev Displays the number of cylinders, heads, and sectors available in the image‘‘s block device open - Open existing image for processing open [part=<name|number>] [chs=<cyls>,<heads>,<secs>] [h=<heads>] [s=<secs>] This command opens an existing image for further processing. This is typically the first command in a command list as it allows all other commands to work on the selected file system. Most often you do not need to specify this command as it will be automatically prepended if its missing. In this case all parameters for opening the input disk image are determined automatically. If the parameters can’t be detected or you don’t want to use the detected values then you specify the open command explicetly. The part option is useful if you access a RDISK or RDB hdf image. In this case the image holds a full disk with multiple partitions. xdftool can only work on a single partition or file system and thus you must select which 1.3. Commands 3 amitools, Release 0.6.0 partition to work on. You can either give a number selecting the n-th partition (startin with 0, of course!) or give the device name associated with this partition (e.g. dh0) without the colon. The chs or h and s options are useful for HDF images without RDB to describe the disk geometry. xdftool has an algorithm to determine the disk geometry automatically from the byte size, but this approach might fail for some setups. In this case you can either fully specify the disk geometry with the chs option or guide the detection algorithm by giving a sector s and/or heads h value. Example: > xdftool mydisk.rdisk open part=dh1 + list ; open partition 'dh1:' in image > xdftool disk.hdf open chs=10,1,32 + list ; open image with given geometry > xdftool disk.hdf open h=5 s=16 + list ; guide auto detection 1.3.2 Edit Image create - Create a new image file create [ size=<size> [h=<heads>] [s=<secs>] | chs=<cyls>,<heads>,<secs> ] With this command you can create a new disk image file. If the disk image format has a fixed size (e.g. ADF) then you do not need to specify extra paramters to this command. For a hard disk image (HDF) file you must either give the total size in bytes or the disk geometry in cylinders, heads, and sectors. If you specify only the size then the disk geometry will be automatically derived. You can use the optional paramters h and/or s to fixate parts of the disk geometry and guide the detection of the disk layout. Please note that the create command only creates an empty disk image that is not formatted yet. You will need the format command to create a valid empty file system on it. You can’t create a RDB/RDISK image with this command. Use the rdbtool for this task. Example: > xdftool new.hdf create size=10Mi ; create an empty HDF image with 10Mi > xdftool new.adf create ; create an empty floppy disk image > xdftool new.hdf create chs=10,1,32 ; create disk with given geometry > xdftool new.hdf create size=10Mi h=2 ; force 2 heads format - Format an existing or create a new disk image format <volume_name> [dostype] [<create options>] A new and blank OFS/FFS file system will be created on the given image file. Warning: All data previously stored there will be lost!!! The <volume_name> gives the name of the new file system. The optional dos_type gives the file system variant. Its the base type ofs or ffs combined with variant flags added with a plus + (and no spaces). Or you give a DOSx type of the file system in the range of DOS0 and DOS7. The following variant flags are recognized: • intl for international mode. 4 Chapter 1. xdftool amitools, Release 0.6.0 • dc or dircache for directory caching • ln or longname for long file name support If the disk image file you specify does not exist on disk yet then an implicit create command will be executed first. If the file already exists you must use the create command if you want to create a resized image. Example: > xdftool empty.adf format 'My Empty Disk' ; create a blank OFS disk image > xdftool empty.hdf format Work size=10M ; create a 10M hdf image > xdftool empty.hdf format Work chs=640,1,32 ; create with given geometry > xdftool empty.hdf format Work size=10M ffs ; create an FFS hdf image > xdftool empty.hdf create size=10M + format Work ffs ; same result > xdftool empty.hdf format Work size=10M ffs+ln ; create with long name support boot - Alter the boot block boot show [hex] [asm] boot read <file> boot write <file> boot install [boot1x] boot clear This command allows to inspect and modify the boot block of a disk. The show command displays the contents of the boot block.