### Open image examples Source: https://github.com/cnvogelg/amitools/blob/main/docs/tools/xdftool.md Examples of opening partitions and specifying disk geometry. ```text > 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 ``` -------------------------------- ### Typical Assign Configuration Example Source: https://github.com/cnvogelg/amitools/blob/main/docs/vamos.md Example demonstrating common application directory mappings and multi-assign usage. ```ini [assigns] sc=shared:sc include=sc:include lib=sc:lib c=system:c,sc:c ``` -------------------------------- ### Create image examples Source: https://github.com/cnvogelg/amitools/blob/main/docs/tools/xdftool.md Examples of creating different types of disk images with specific parameters. ```text > 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 ``` -------------------------------- ### Bitmap command examples Source: https://github.com/cnvogelg/amitools/blob/main/docs/tools/xdftool.md Usage examples for inspecting block allocation in an ADF image. ```text > xdftool test.adf bitmap free brief > xdftool test.adf bitmap used > xdftool test.adf bitmap find 10 > xdftool test.adf bitmap all > xdftool test.adf bitmap node C entries brief ``` -------------------------------- ### Format image examples Source: https://github.com/cnvogelg/amitools/blob/main/docs/tools/xdftool.md Examples of formatting images with various file system types and options. ```text > 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 ``` -------------------------------- ### Install Amitools with Vamos Support Source: https://github.com/cnvogelg/amitools/blob/main/README.md Install amitools including the 'vamos' component, which requires the 'machine68k' CPU emulator. This command installs both dependencies. ```bash pip3 install 'amitools[vamos]' ``` -------------------------------- ### Example of Chained Commands Source: https://github.com/cnvogelg/amitools/blob/main/docs/tools/rdbtool.md A practical example demonstrating the chaining of 'create', 'init', and 'fill' commands to set up a disk image. ```bash > rdbtool myimg.rdb create size=10Mi + init + fill ``` -------------------------------- ### Example Vamos Configuration Source: https://github.com/cnvogelg/amitools/blob/main/docs/vamos-lib.md This is an example of a .vamosrc file showing how to configure different libraries with specific modes and versions. ```ini [icon.library] mode=fake version=40 [68040.library] mode=off [dos.library] profile=True [libs/foo.library] mode=off [foo.library] mode=amiga ``` -------------------------------- ### Typical Volume Configuration Example Source: https://github.com/cnvogelg/amitools/blob/main/docs/vamos.md Example showing multiple volume definitions including home directory expansion and environment variables. ```ini [volumes] system=~/amiga/wb310 home=~ work=~/amiga/work shared=$HOME/amiga/shared ``` -------------------------------- ### Block command examples Source: https://github.com/cnvogelg/amitools/blob/main/docs/tools/xdftool.md Usage examples for displaying specific blocks or file nodes in an ADF image. ```text > xdftool test.adf block boot > xdftool test.adf block root > xdftool test.adf block node c > xdftool test.adf block node myfile data > xdftool test.adf block dump 880 ``` -------------------------------- ### Add partition by start cylinder and size Source: https://github.com/cnvogelg/amitools/blob/main/docs/tools/rdbtool.md Create a new partition by defining its start cylinder and its size in cylinders. ```bash rdbtool test.img add start=4 size=10 ``` -------------------------------- ### Install Amitools from GitHub Source: https://github.com/cnvogelg/amitools/blob/main/README.md Install the latest development version of amitools directly from its GitHub repository. Repeat this command to update. ```bash pip3 install -U git+https://github.com/cnvogelg/amitools.git ``` -------------------------------- ### Install Machine68k Emulator Source: https://github.com/cnvogelg/amitools/blob/main/README.md Install or update the machine68k CPU emulator from its git repository. This is a prerequisite for running 'vamos'. ```bash pip3 install -U git+https://github.com/cnvogelg/machine68k.git ``` -------------------------------- ### Install Stable Amitools Source: https://github.com/cnvogelg/amitools/blob/main/README.md Install the pure Python version of amitools for general use. This does not include the 'vamos' component. ```bash pip3 install amitools ``` -------------------------------- ### Install Development Version Source: https://github.com/cnvogelg/amitools/blob/main/README.md Install development dependencies including Cython and machine68k. This is for developers who want to modify the amitools codebase. ```bash pip3 install cython machine68k ``` -------------------------------- ### Install Editable Amitools Source: https://github.com/cnvogelg/amitools/blob/main/README.md Install amitools in editable mode from a cloned Git repository. Changes made to the source files will be immediately reflected. ```bash pip3 install -U -e . ``` -------------------------------- ### Install AROS Prerequisites on MacOS Source: https://github.com/cnvogelg/amitools/blob/main/test/README.md Install necessary packages like gawk, gnu-sed, and netpbm on MacOS using Homebrew for AROS development. ```bash > brew install gawk gnu-sed netpbm ``` -------------------------------- ### Run Amiga Binary Source: https://github.com/cnvogelg/amitools/blob/main/docs/vamos.md Execute an Amiga binary using Vamos. This example shows the basic command structure and the typical output when a required argument is missing. ```bash > ./vamos a68k Source file name is missing. 68000 Assembler - version 2.71 (April 16, 1991) Copyright 1985 by Brian R. Anderson AmigaDOS conversion copyright 1991 by Charlie Gibbs. Usage: a68k [-d[[!]]] [-o] [-e[]] [-p] [-f] [-q[]] [-g] [-s] [-h
] [-t] [-i] [-w[][,]] [-k] [-x] [-l[]] [-y] [-m] [-z[][,]] [-n] Heap size default: -w2047,1024 ``` -------------------------------- ### Add partition by start and end cylinder Source: https://github.com/cnvogelg/amitools/blob/main/docs/tools/rdbtool.md Create a new partition by specifying its start and end cylinders. ```bash rdbtool test.img add start=2 end=5 ``` -------------------------------- ### Install Pytest Module Source: https://github.com/cnvogelg/amitools/blob/main/test/README.md Use this command to install the pytest module required for running the tests. Ensure you have sudo privileges. ```bash sudo pip install pytest ``` -------------------------------- ### Build AROS Cross-Compiler Source: https://github.com/cnvogelg/amitools/blob/main/test/README.md Steps to build the AROS cross-compiler, including creating an installation directory, cloning the AROS repository, configuring the build, and compiling the cross-tools. ```bash > sudo mkdir -p /opt/m68k-aros > sudo chown $USER /opt/m68k-aros > git clone http://repo.or.cz/AROS.git > mkdir AROS-build > cd AROS-build > ../AROS/configure --target=amiga-m68k --with-aros-toolchain-install=/opt/m68k-aros > make crosstools ``` -------------------------------- ### Manage boot blocks with xdftool Source: https://github.com/cnvogelg/amitools/blob/main/docs/tools/xdftool.md Commands to inspect, read, write, install, or clear boot blocks on an ADF image. ```text boot show [hex] [asm] boot read boot write boot install [boot1x] boot clear ``` ```text > xdftool my.adf boot show ; show the boot block > xdftool my.adf boot read boot.code ; read boot code from disk > xdftool my.adf boot write boot.code ; write boot code back to disk > xdftool my.adf boot install ; make disk bootable > xdftool my.adf boot clear ; make disk not bootable anymore ``` -------------------------------- ### GET /fsget Source: https://github.com/cnvogelg/amitools/blob/main/docs/tools/rdbtool.md Retrieves a file system driver from the RDB structure. ```APIDOC ## GET /fsget ### Description Extracts the file system driver numbered and stores it as a file. ### Parameters #### Path Parameters - **id** (integer) - Required - The file system ID. - **filename** (string) - Required - The output file name. ``` -------------------------------- ### Example Memory Debug Output Source: https://github.com/cnvogelg/amitools/blob/main/docs/vamos.md This output shows detailed logs of memory reads (R) and writes (W), including address, data, and context. Use a disassembler to correlate this with code execution. ```log 19:26:47.022 mem: DEBUG: R(4): 000000: 00001ff8 [@000000 +000000 zero_page] 19:26:47.022 mem: DEBUG: R(4): 000004: 00002004 [@000000 +000004 zero_page] 19:26:47.022 mem: DEBUG: R(2): 002004: 48e7 [@002004 +000000 a68k:0:code] 19:26:47.023 mem: DEBUG: R(2): 002006: 7efe [@002004 +000002 a68k:0:code] 19:26:47.023 mem: DEBUG: W(4): 001ff4: 00fc0000 [@001000 +000ff4 stack] 19:26:47.023 mem: DEBUG: W(4): 001ff0: 00fc0000 [@001000 +000ff0 stack] 19:26:47.023 mem: DEBUG: W(4): 001fec: 00000000 [@001000 +000fec stack] 19:26:47.023 mem: DEBUG: W(4): 001fe8: 00000000 [@001000 +000fe8 stack] 19:26:47.023 mem: DEBUG: W(4): 001fe4: 00fc0000 [@001000 +000fe4 stack] 19:26:47.023 mem: DEBUG: W(4): 001fe0: 00000000 [@001000 +000fe0 stack] 19:26:47.023 mem: DEBUG: W(4): 001fdc: 0000f484 [@001000 +000fdc stack] 19:26:47.023 mem: DEBUG: W(4): 001fd8: 00000000 [@001000 +000fd8 stack] 19:26:47.023 mem: DEBUG: W(4): 001fd4: 00000000 [@001000 +000fd4 stack] 19:26:47.024 mem: DEBUG: W(4): 001fd0: 00000000 [@001000 +000fd0 stack] 19:26:47.024 mem: DEBUG: W(4): 001fcc: 00000000 [@001000 +000fcc stack] 19:26:47.024 mem: DEBUG: W(4): 001fc8: 00000000 [@001000 +000fc8 stack] 19:26:47.024 mem: DEBUG: W(4): 001fc4: 00000000 [@001000 +000fc4 stack] 19:26:47.024 mem: DEBUG: R(2): 002008: 2448 [@002004 +000004 a68k:0:code] 19:26:47.024 mem: DEBUG: R(2): 00200a: 2400 [@002004 +000006 a68k:0:code] 19:26:47.024 mem: DEBUG: R(2): 00200c: 49f9 [@002004 +000008 a68k:0:code] 19:26:47.024 mem: DEBUG: R(4): 00200e: 0000d9c4 [@002004 +00000a a68k:0:code] 19:26:47.024 mem: DEBUG: R(2): 002012: 2c78 [@002004 +00000e a68k:0:code] 19:26:47.025 mem: DEBUG: R(2): 002014: 0004 [@002004 +000010 a68k:0:code] 19:26:47.025 mem: DEBUG: R(4): 000004: 0000f8f8 [@000000 +000004 zero_page] ``` -------------------------------- ### init Source: https://github.com/cnvogelg/amitools/blob/main/docs/tools/rdbtool.md Creates a new and empty RDB structure. ```APIDOC ## init ### Description Creates a new and initially empty RDB structure. Warning: Existing partition layouts will be lost. ### Parameters #### Query Parameters - **rdb_cyls** (integer) - Optional - Number of cylinders to reserve for RDB if a single cylinder is insufficient. ``` -------------------------------- ### Operate on Kickstart ROMs with romtool Source: https://context7.com/cnvogelg/amitools/llms.txt Inspect, split, build, and patch Amiga Kickstart ROM images. ```bash romtool info amiga-os-310-a500.rom romtool dump amiga-os-310-a500.rom romtool dump -a -c 32 my.rom romtool diff a.rom b.rom romtool scan rom.img romtool list romtool list -r "Kick*40*" -m romtool query amiga-os-310-a500.rom romtool split amiga-os-310-a500.rom -o ./rom_modules romtool build -o my.rom -t kick -s 512 index.txt my.library romtool build -o custom.rom -t kick -s 512 -r 40.95 -k modules/ romtool patches romtool patch kick.rom 1mb_rom -o out.rom romtool combine kick.rom ext.rom -o 1mb.rom romtool copy kick.rom fixed.rom -c ``` -------------------------------- ### Display Help Source: https://github.com/cnvogelg/amitools/blob/main/docs/tools/xdftool.md Retrieve a list of all available commands for a specific image. ```text > xdftool test.adf help ``` -------------------------------- ### Add bootable partition with priority Source: https://github.com/cnvogelg/amitools/blob/main/docs/tools/rdbtool.md Create a partition that is bootable and assign it a specific boot priority. ```bash rdbtool test.img add size=10% bootable pri=10 ``` -------------------------------- ### Install vbcc and vasm on MacOS Source: https://github.com/cnvogelg/amitools/blob/main/test/README.md Use Homebrew to install the vbcc, vasm, and vlink tools on MacOS for Amiga development. ```bash brew tap tditlu/amiga brew install vbcc vasm vlink ``` -------------------------------- ### Add partition with custom filesystem Source: https://github.com/cnvogelg/amitools/blob/main/docs/tools/rdbtool.md Create a partition and specify the filesystem type using 'dostype' or 'fs', with options for dircache and international mode. ```bash dostype=ofs+dc ``` ```bash dostype=ffs+intl ``` ```bash dostype=0x44556677 ``` -------------------------------- ### List ROMs and Modules Source: https://github.com/cnvogelg/amitools/blob/main/docs/tools/romtool.md Commands to display available ROMs and their internal module structures. ```default $ romtool list @00e00000 +00080000 sum=9ea68bc4 sum_off=0007ffe8 CD32 Extended ROM @00200000 +00040000 sum=34377fe8 sum_off=ffffffff CD32 MPEG ROM 40.30 ... ``` ```default $ romtool list -r Kick* @00fc0000 +00040000 sum=15267db3 sum_off=0003ffe8 Kickstart 34.5 (A500/A2000/A1000) @00f80000 +00080000 sum=54876dab sum_off=0007ffe8 Kickstart 37.175(A3000) ... ``` ```default $ romtool list -r Kick*40.60* -m @00f80000 +00080000 sum=8f4549a5 sum_off=0007ffe8 Kickstart 40.60 (CD32 Main) @000000 +003804 =003804 relocs=# 62 exec_40.9(CD32) @003804 +000ad8 =0042dc relocs=# 12 expansion_40.2(A1200) @0042dc +000ea4 =005180 relocs=# 11 mathieeesingbas.lib_40.4(020) ... ``` -------------------------------- ### Create directories with xdftool Source: https://github.com/cnvogelg/amitools/blob/main/docs/tools/xdftool.md Creates a new directory at the specified path. All parent directories must already exist. ```text makedir ``` ```text > xdftool empty.adf makedir c ; create a new directory called 'c' ``` -------------------------------- ### Inspect ROM information Source: https://github.com/cnvogelg/amitools/blob/main/docs/tools/romtool.md Displays detailed metadata and validation status of a Kickstart ROM file. ```default $ romtool info amiga-os-310-a500.rom size ok header ok footer ok size_field ok chk_sum ok kickety_split ok magic_reset ok is_kick ok check_sum 9fdeeef6 base_addr 00f80000 boot_pc 00f800d2 rom_rev 40.63 exec_rev 40.10 ``` -------------------------------- ### Initialize New RDB Structure Source: https://github.com/cnvogelg/amitools/blob/main/docs/tools/rdbtool.md The 'init' command creates a new, empty RDB structure on a disk or disk image. It reserves the first cylinder by default, but this can be adjusted using `rdb_cyls`. Existing partitioning will be lost. ```default init [ rdb_cyls= ] ``` ```default > rdbtool test.img create size=10Mi + init ``` ```default > rdbtool test.img create size=10Mi + init rdb_cyls=2 ``` -------------------------------- ### Typical Scan Output Source: https://github.com/cnvogelg/amitools/blob/main/docs/tools/xdfscan.md Example of the standard output from xdfscan, showing scan results for multiple image files. ```text > xdfscan . E069 NOK ./bookdisk/amiga_listing_03_89.adf boot ok ./bookdisk/devpac.adf ok ./bookdisk/gfabasic3.adf nofs ./bookdisk/giana.adf boot ok ./bookdisk/mut_hwtuning_1_9.adf w001 boot NOK ./bookdisk/reflections_animator.adf ok ./bookdisk/reflectionsv1_0.adf ``` -------------------------------- ### Display Help Information Source: https://github.com/cnvogelg/amitools/blob/main/docs/tools/rdbtool.md How to access the built-in help for rdbtool commands by using the 'help' command. ```bash > rdbtool test.img help ``` -------------------------------- ### Verbose Scan Output with Errors Source: https://github.com/cnvogelg/amitools/blob/main/docs/tools/xdfscan.md Example of verbose output (-v) showing specific warnings and errors found within Amiga disk images. ```text w001 boot NOK ./bookdisk/reflections_animator.adf @000880:WARN :Root bitmap flag not valid (-1) ok ./bookdisk/reflectionsv1_0.adf E002 boot NOK ./commercial_soft/PCLink/pclink.adf ERROR:Invalid bitmap allocation (@40: #0+40) blks [1282...1313] got=00000000 expect=00008000 ERROR:Invalid bitmap allocation (@45: #0+45) blks [1442...1473] got=00000000 expect=80000000 ``` -------------------------------- ### POST /import Source: https://github.com/cnvogelg/amitools/blob/main/docs/tools/rdbtool.md Imports raw partition data from a file into an existing partition. ```APIDOC ## POST /import ### Description Read the raw partition data from a given file into an existing partition. ### Parameters #### Path Parameters - **partition** (string) - Required - The target partition. - **file_name** (string) - Required - The source file name. - **pad** (flag) - Optional - If present, allows smaller input files to overwrite only the beginning. ``` -------------------------------- ### Enable Verbose Output Source: https://github.com/cnvogelg/amitools/blob/main/docs/vamos.md Run an Amiga binary with the -v flag to enable verbose logging during operation. This provides insights into the emulator's setup and execution speed. ```bash > ./vamos -v a68k 19:14:26.661 main: INFO: setting up main memory with 1024 KiB RAM: top=100000 19:14:26.661 main: INFO: loading binary: test_bin/a68k 19:14:26.663 main: INFO: args: (2) 19:14:26.692 main: INFO: setting up m68k 19:14:26.694 main: INFO: start cpu: 002004 ... 19:14:26.705 main: INFO: done (284836 cycles in 0.0025s -> 114.19 MHz, trap time 0.0083s) ``` -------------------------------- ### Display RDB Partition Information Source: https://github.com/cnvogelg/amitools/blob/main/docs/tools/rdbtool.md The 'info' command provides a detailed overview of partitions and file systems within the RDB data structures. Optionally, specify a partition name or index to view information for a single partition. ```default info [partition] ``` ```default PhysicalDisk: 0 7817 7880544 3.8Gi heads=16 sectors=63 LogicalDisk: 2 7817 7878528 3.8Gi rdb_blks=[0:2015,60(60)] cyl_blks=1008 Partition: #0 'CDH0' 2 103 102816 50Mi 1.31% DOS3 bootable pri=0 Partition: #1 'DH0' 104 205 102816 50Mi 1.31% DOS3 Partition: #2 'DH1' 206 2035 1844640 900Mi 23.41% DOS3 Partition: #3 'DH2' 2036 3763 1741824 850Mi 22.11% DOS3 Partition: #4 'DH3' 3764 3909 147168 71Mi 1.87% DOS3 Partition: #5 'CDH1' 3910 3971 62496 30Mi 0.79% DOS3 Partition: #6 'DH4' 3972 4124 154224 75Mi 1.96% DOS3 Partition: #7 'DH5' 4125 5953 1843632 900Mi 23.40% DOS3 Partition: #8 'DH6' 5954 7817 1878912 917Mi 23.85% DOS3 FileSystem #0 DOS1 version=40.1 size=24588 ``` ```default > rdbtool test.hdf info DH0 Partition: #1 'DH0' 104 205 102816 50Mi 1.31% DOS3 ``` -------------------------------- ### Add partition with custom block size Source: https://github.com/cnvogelg/amitools/blob/main/docs/tools/rdbtool.md Create a partition and specify a custom block size for the filesystem, which must be a multiple of the partition's block size. ```bash rdbtool test.img add bs=1024 ``` -------------------------------- ### Pack Disk Image Commands Source: https://github.com/cnvogelg/amitools/blob/main/docs/tools/xdftool.md Creates a disk image from a host directory. Ensure a .blkdev file or size parameter is provided for HDF images. ```text > xdftool newimg.adf pack WB3.1 ; pack a disk image from host dir 'WB3.1' > xdftool newimg.hdf pack Dir 10M ; pack host dir 'Dir' into a 10M HD image ``` -------------------------------- ### Select CPU Model Source: https://github.com/cnvogelg/amitools/blob/main/docs/vamos.md Specifies the emulated 68k CPU model. ```bash vamos -C 20 ``` ```ini [vamos] cpu=68020 ``` -------------------------------- ### pack Source: https://github.com/cnvogelg/amitools/blob/main/docs/tools/xdftool.md Creates a disk image from a directory on the host file system. ```APIDOC ## pack ### Description Creates a disk image from a specified host directory. It uses existing metadata files (.xdfmeta, .bootcode, .blkdev) to reconstruct the disk structure. ### Parameters - **volume_dir** (string) - Required - The source directory on the host system. - **blkdev_size** (string) - Optional - The block device size (e.g., '10M' or '640,1,32') for HDF images. ### Request Example xdftool newimg.adf pack WB3.1 xdftool newimg.hdf pack Dir 10M ``` -------------------------------- ### Basic rdbtool Command Structure Source: https://github.com/cnvogelg/amitools/blob/main/docs/tools/rdbtool.md Illustrates the fundamental command-line syntax for rdbtool, specifying an image file and commands. ```bash > rdbtool [option] ``` -------------------------------- ### Add partition by byte size Source: https://github.com/cnvogelg/amitools/blob/main/docs/tools/rdbtool.md Create a new partition using a specific size in bytes. ```bash rdbtool test.img add size=10MiB ``` -------------------------------- ### Run Amiga Program with Arguments Source: https://github.com/cnvogelg/amitools/blob/main/docs/vamos.md Execute an Amiga binary with command-line arguments. Ensure the binary is in the search path or provide a local/absolute path. ```bash vamos ami_bin arg1 arg2 ... ``` -------------------------------- ### unpack Source: https://github.com/cnvogelg/amitools/blob/main/docs/tools/xdftool.md Extracts a disk image to the host file system, including metadata and boot code. ```APIDOC ## unpack ### Description Extracts the directory tree of a disk image to the host file system. It creates a directory with the volume name and generates metadata files (.xdfmeta, .bootcode, .blkdev). ### Parameters - **sys_dir** (string) - Required - The target directory on the host system. - **fsuae** (flag) - Optional - If provided, writes metadata to FS-UAE compatible .uaem files. ### Request Example xdftool mydisk.adf unpack . xdftool mydisk.hdf unpack . fsuae ``` -------------------------------- ### Define Volumes via Command Line and Config Source: https://github.com/cnvogelg/amitools/blob/main/docs/vamos.md Configure host directory mappings to Amiga volumes using the -V flag or the [volumes] section in the configuration file. ```bash vamos -V myvol:/sys/path/to/my/voldir ``` ```ini [volumes] myvol=/sys/path/to/my/voldir ``` -------------------------------- ### Add partition by percentage of disk size Source: https://github.com/cnvogelg/amitools/blob/main/docs/tools/rdbtool.md Create a new partition that occupies a specified percentage of the total disk size. ```bash rdbtool test.img add size=50% ``` -------------------------------- ### Basic xdftool Usage Source: https://github.com/cnvogelg/amitools/blob/main/docs/tools/xdftool.md General syntax for calling xdftool with an image file and commands. ```text > xdftool [option] ``` ```text > xdftool [options1] + [options2] ... ``` ```text > xdftool test.adf format ``My Image`` + makedir c + write myfile c ``` -------------------------------- ### Build New ROM Source: https://github.com/cnvogelg/amitools/blob/main/docs/tools/romtool.md Combines binary files into a new ROM image using an index file or command-line arguments. ```default $ romtool build -o my.rom -t kick -s 512 index.txt my.library my.device ``` -------------------------------- ### POST /addimg Source: https://github.com/cnvogelg/amitools/blob/main/docs/tools/rdbtool.md Adds a new partition from an image file. The partition size is derived from the file size. ```APIDOC ## POST /addimg ### Description Creates a new partition from the contents of a given partition image file. ### Parameters #### Path Parameters - **file** (string) - Required - Path to the image file. #### Query Parameters - **start** (cyl) - Optional - Start cylinder of the partition. - **name** (string) - Optional - Name of the partition. - **dostype|fs** (dostag) - Optional - DOS type or file system tag. - **bootable** (boolean) - Optional - Set partition as bootable. - **pri** (priority) - Optional - Partition priority. - **automount** (boolean) - Optional - Enable/disable automount. - **bs** (integer) - Optional - File system block size. ``` -------------------------------- ### Create and Manage Disk Images with xdftool Source: https://context7.com/cnvogelg/amitools/llms.txt Create, format, inspect, and modify ADF and HDF disk images. Supports listing contents, viewing file types, copying files, creating/deleting directories, changing protection flags, and managing boot blocks. ```bash # Create and format a new disk image xdftool new.adf format 'My Disk' xdftool new.hdf format Work size=10M ffs xdftool new.hdf format Work size=10M ffs+intl+ln # FFS with international & long names ``` ```bash # List contents of a disk image xdftool wb310.adf list # Full recursive listing xdftool wb310.adf list c all # List 'c' directory recursively xdftool wb310.adf list / info # With statistics ``` ```bash # Display disk information xdftool wb310.adf info # Output: # Blocks: total: 1760 used: 1698 free: 62 # Bytes: total: 901120 used: 869376 free: 31744 ``` ```bash # View file contents xdftool wb310.adf type s/startup-sequence ``` ```bash # Copy files to/from disk image xdftool wb310.adf read c/dir . xdftool wb310.adf read devs mydir # Extract directory tree xdftool empty.adf write README # Write file to image xdftool empty.adf write mydir / # Write directory to root ``` ```bash # Modify files and directories xdftool mydisk.adf makedir c # Create directory xdftool mydisk.adf delete README # Delete file xdftool mydisk.adf delete c all # Delete directory with contents xdftool mydisk.adf protect test +rwe # Change protection flags xdftool mydisk.adf comment test 'My note' # Set comment xdftool mydisk.adf relabel 'New Name' # Rename volume ``` ```bash # Boot block operations xdftool my.adf boot show # Display boot block xdftool my.adf boot install # Make disk bootable xdftool my.adf boot clear # Remove boot code ``` ```bash # Chain multiple commands xdftool test.adf format 'Test' + makedir c + write myfile c ``` -------------------------------- ### info Source: https://github.com/cnvogelg/amitools/blob/main/docs/tools/rdbtool.md Displays an overview of partitions and file systems stored in the RDB blocks. ```APIDOC ## info ### Description Provides a detailed overview of the partitions and file systems stored in the RDB blocks. ### Parameters #### Path Parameters - **partition** (string) - Optional - Name or index of a specific partition to display ``` -------------------------------- ### Run romtool commands Source: https://github.com/cnvogelg/amitools/blob/main/docs/tools/romtool.md General syntax for executing romtool commands from the terminal. ```default romtool [-v] [-q] [-k rom.key] ... ``` -------------------------------- ### Manage RDB Partitions with rdbtool Source: https://context7.com/cnvogelg/amitools/llms.txt Create, modify, and inspect Rigid Disk Block (RDB) partitioned hard disk images. ```bash rdbtool test.img create size=100Mi + init + add size=50% + fill rdbtool mydisk.rdb info rdbtool test.img create chs=10,1,32 + init rdbtool test.img add size=100MiB name=SYSTEM dostype=ffs+intl bootable pri=10 rdbtool test.img add start=100 end=200 rdbtool test.img add size=25% rdbtool test.img change 0 name=BOOT bootable=true rdbtool test.img delete dh1 rdbtool mydisk.rdb free rdbtool mydisk.rdb map rdbtool mydisk.rdb export DH0 dh0_backup.hdf rdbtool mydisk.rdb import DH0 dh0_backup.hdf rdbtool mydisk.rdb fsadd ffs_driver version=40.63 rdbtool mydisk.rdb fsget 0 extracted_ffs rdbtool mydisk.rdb fsdelete 0 rdbtool /dev/disk4 adjust auto rdbtool test.img remap s=32 h=8 ``` -------------------------------- ### Unpack Disk Image Commands Source: https://github.com/cnvogelg/amitools/blob/main/docs/tools/xdftool.md Extracts a disk image to the host file system. Use the fsuae option to generate compatible .uaem meta files. ```text > xdftool mydisk.adf unpack . ; unpack full image to current directory > xdftool mydisk.hdf unpack . ; same for hard disk images > xdftool mydisk.hdf unpack . fsuae ; store meta info in .uaem files ``` -------------------------------- ### Add Partition from Image File Source: https://github.com/cnvogelg/amitools/blob/main/docs/tools/rdbtool.md Creates a new partition from an image file. The partition size is derived from the file size. Ensure the image size is a multiple of the cylinder size. The 'bs' option is required for non-standard block sizes. ```bash addimg [ start= ] [ name= ] [ dostype|fs= ] [ bootable[=true|false] ] [ pri= ] [ automount=true|false ] [ bs= ] ``` -------------------------------- ### Pack Host File System to Disk Image Source: https://github.com/cnvogelg/amitools/blob/main/docs/tools/xdftool.md Reconstructs an Amiga disk image from a host file system directory tree. Optionally, a .xdfmeta file can be provided to set specific meta information. ```bash xdftool .adf pack ``` -------------------------------- ### Pass Vamos Options Source: https://github.com/cnvogelg/amitools/blob/main/docs/vamos.md Include vamos-specific options before the Amiga binary. Options are prefixed with a dash. ```bash vamos -V myvol:~ ami_bin ``` -------------------------------- ### Add partition with custom drive prefix Source: https://github.com/cnvogelg/amitools/blob/main/docs/tools/rdbtool.md Create a partition with a custom drive name prefix, such as 'CH', which will be appended with the partition number. ```bash rdbtool -p CH test.img init + add size=10% ``` -------------------------------- ### Add AROS Cross-Compiler to PATH Source: https://github.com/cnvogelg/amitools/blob/main/test/README.md Add the bin directory of the AROS cross-compiler to your system's PATH environment variable. This is typically done in your shell startup file. ```bash export PATH=/opt/m68k-aros:$PATH ``` -------------------------------- ### Create new image Source: https://github.com/cnvogelg/amitools/blob/main/docs/tools/xdftool.md Syntax for creating a new disk image file. ```text create [ size= [h=] [s=] | chs=,, ] ``` -------------------------------- ### Open Image with Partial Geometry Hint Source: https://github.com/cnvogelg/amitools/blob/main/docs/tools/rdbtool.md Opens a disk image by providing partial geometry parameters (cylinders, heads, sectors), allowing rdbtool to infer the rest. ```bash > rdbtool test.img open c=10 h=2 s=32 ``` -------------------------------- ### Chaining rdbtool Commands Source: https://github.com/cnvogelg/amitools/blob/main/docs/tools/rdbtool.md Shows how to execute multiple rdbtool commands sequentially on a single image file by concatenating them with a plus sign. ```bash > rdbtool [options1] + [options2] ... ``` -------------------------------- ### Define Assigns via Command Line and Config Source: https://github.com/cnvogelg/amitools/blob/main/docs/vamos.md Create path aliases (assigns) that map to absolute Amiga paths using the -a flag or the [assigns] section. ```bash -a myassign:sys:path/to/dir -a myalias:myassign:more/path ``` ```ini [assigns] myassign=sys:path/to/dir myalias=myassign:more/path ``` -------------------------------- ### add - Add a new partition Source: https://github.com/cnvogelg/amitools/blob/main/docs/tools/rdbtool.md Creates a new partition within an RDB structure, allowing specification of size, name, filesystem type, bootability, and other attributes. ```APIDOC ## add - Add a new partition ### Description This command creates a new partition. ### Method Not applicable (Command-line utility) ### Endpoint Not applicable (Command-line utility) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Command Syntax `add [ name= ] [ dostype|fs= ] [ bootable[=true|false] ] [ pri= ] [ automount=true|false ] [ bs= ]` ### Size Specification The size of the partition can be specified in one of the following ways: 1. `start= end=`: Give start and end cylinder. 2. `start= size=`: Give start cylinder and size. 3. `size=`: Only give size. Size can be a number of cylinders, a percentage of total logical disk size, or a byte size (e.g., 10MiB). ### Optional Parameters - `name=`: Name of the partition. Defaults to `DH` followed by partition number (e.g., `DH0`). - `dostype|fs=`: Filesystem type. Defaults to `DOS3` (Fast Filing System with International Support). Can be specified as `DOS`, hex `0x44556677`, or standard DOS types like `ofs`, `ffs` with optional flags (`dc`, `dircache`, `intl`). - `bootable[=true|false]`: Makes the partition bootable. - `pri=`: Sets the boot priority for a bootable partition. - `automount=true|false`: Controls if the partition is automatically mounted. - `bs=`: Specifies the block size of the filesystem. Must be a multiple of the partition block size (e.g., 512, 1024, 2048, 4096, 8192). ### Usage Examples ``` rdbtool test.img add start=2 end=5 rdbtool test.img add start=4 size=10 rdbtool test.img add size=10MiB rdbtool test.img add size=50% rdbtool -p CH test.img init + add size=10% ; create partition CH0 rdbtool test.img add size=10% bootable pri=10 ``` ### Filesystem Dostypes Examples - `dostype=DOS0` (OFS) - `dostype=ofs+dc` (OFS + dircache) - `dostype=ffs+intl` (FFS + international mode) - `dostype=0x44556677` (Hexadecimal dostype) ``` -------------------------------- ### Manage ROM Patches Source: https://github.com/cnvogelg/amitools/blob/main/docs/tools/romtool.md Commands to list available patches and apply them to ROM files. ```default $ romtool patches 1mb_rom Patch Kickstart to support ext ROM with 512 KiB ``` ```default $ romtool patch amiga-os-310-a500.rom 1mb_rom -o out.rom ``` -------------------------------- ### Implicitly Open Image Source: https://github.com/cnvogelg/amitools/blob/main/docs/tools/rdbtool.md Demonstrates that the 'open' command is not always required; other commands can implicitly open the image. ```bash > rdbtool test.img info ``` -------------------------------- ### Run Amiga Shell Source: https://github.com/cnvogelg/amitools/blob/main/docs/vamos.md Execute an Amiga Shell by using the `-x` switch and providing the `Shell-Seg` binary. Requires an original `Shell-Seg` from a modern AmigaOS. ```bash vamos -x Shell-Seg ``` -------------------------------- ### Configure Stack Size Source: https://github.com/cnvogelg/amitools/blob/main/docs/vamos.md Sets the stack size in KiB for the executed command. ```bash vamos -s 16 ``` ```ini [vamos] stack=16 ``` -------------------------------- ### rdbtool Commands Source: https://github.com/cnvogelg/amitools/blob/main/docs/tools/rdbtool.md Details on available commands for rdbtool, including create and open. ```APIDOC ## Commands This section describes the commands available for rdbtool. You can always issue a `help` command to see all commands: ```default > rdbtool test.img help ``` ### `create` - Create a new disk image ```default create [ size= | chs=,, | from= ] [ bs= ] ``` The `create` operation is used to create a new image file. The create command needs a size parameter: ```default > rdbtool test.img create size=10Mi ``` You can either specify the total size in bytes (or here with unis *M=mega Mi=Ki-Units*) and let rdbtool choose a suitable disk geometry automatically or you can give the geometry with: ```default > rdbtool test.img create chs=10,1,32 ``` Here 10 cylinders, 1 head and 32 sectors are defined. Another way to specify the size of the new image is to give the file name of an existing image or real device. This is useful to create a new image of compatible size: ```default > rbdtool test.img create from=other.img ``` You can only use the `create` command if the given image file does not exist yet. If it already exists then an error message is generated. However, you can *force* the creation of the image file by giving the `-f` switch for force: ```default > rdbtool -f test.img create chs=10,1,32 ``` By default a disk layout with a block size of 512 bytes is created. For larger disks you may want to increase the block size to 1024, 2048, or 4096. Use the `bs`` option to select the block size: ```default > rdbtool create size=32Gi bs=4096 ``` #### NOTE Amigas only support RDBs with a 512 byte block size! ### `open` - Open existing image for processing ```default open [ chs=,, | c= h= s= ] [ bs= ] ``` The open operation usually does not need any paramters: ```default > rdbtool test.img open + info ``` You can even omit the `open` command before other commands in this case: ```default > rdbtool test.img info ``` This will implicitly open the image first. If no option is given then the disk geometry is automatically determined from the image size. If this does not work for an image you can also specify the geometry of the image in the open command: ```default > rdbtool test.img open chs=10,1,32 ``` You can also only hint the geometry by giving some geometry paramters and let rdbtool guess the others: ```default > rdbtool test.img open c=10 h=2 s=32 ``` By default the block size of the disk is assumed to be 512. If an RDB is already stored on the disk then `rdbtool` automatically retrieves the block size from there. You can force a block size by giving the `bs` option with the `open` command. This is useful if you want to overwrite an existing RDB with a different block size on a disk: ```default > rdbtool /dev/disk1 open bs=4096 + init ``` ``` -------------------------------- ### Create Disk Image from Existing Image Source: https://github.com/cnvogelg/amitools/blob/main/docs/tools/rdbtool.md Creates a new disk image with a size compatible with an existing image file or block device. ```bash > rbdtool test.img create from=other.img ```