Home | History | Annotate | Line # | Download | only in stand
      1  1.1  abs # device-streams
      2  1.1  abs Amiga tool for copying between block devices and streams/files, similar to UNIX `dd`.
      3  1.1  abs Originally released by Christian E. Hopps in 1993, updated to be useful today.
      4  1.1  abs 
      5  1.1  abs Requires AmigaOS 2.04+.
      6  1.1  abs 
      7  1.1  abs https://github.com/rvalles/device-streams
      8  1.1  abs 
      9  1.1  abs ## Usage
     10  1.1  abs Run the command with `-h` parameter to display usage information.
     11  1.1  abs 
     12  1.1  abs ### Examples
     13  1.1  abs #### Print RDB device and partition information.
     14  1.1  abs ```
     15  1.1  abs 5.Ram Disk:> devstreams/rdbinfo
     16  1.1  abs Device: "scsi.device"  Unit: 0  Capacity: 114473.4 Megs
     17  1.1  abs DiskVendor: FUJITSU  DiskProduct MHV2120AH        DiskRevision: 0000
     18  1.1  abs Cylinders: 232581  Heads: 16  Blks-p-Trk: 63 [Blks-p-Cyl: 1008]
     19  1.1  abs Total Blocks: 234441648  Block Size 512
     20  1.1  abs 64bit
     21  1.1  abs 
     22  1.1  abs --| Partition: "DH0" Capacity: 1023.7 Megs
     23  1.1  abs --| Start Block: 3024  End Block: 2099663 Total Blocks: 2096640
     24  1.1  abs --| Block Size: 512
     25  1.1  abs 
     26  1.1  abs --| Partition: "DH1" Capacity: 10239.4 Megs
     27  1.1  abs --| Start Block: 2099664  End Block: 23070095 Total Blocks: 20970432
     28  1.1  abs --| Block Size: 512
     29  1.1  abs --| 64bit
     30  1.1  abs ###
     31  1.1  abs ```
     32  1.1  abs #### Dump a partition into a file.
     33  1.1  abs ```
     34  1.1  abs 5.Ram Disk:> devstreams/devtostream --output=DH1:dump.dd --rdb-name=DH0 --verbose
     35  1.1  abs found new device "scsi.device"
     36  1.1  abs found drive FUJITSU  MHV2120AH        0000 [capacity:114473M]
     37  1.1  abs  at unit 0 on device "scsi.device"
     38  1.1  abs | partition: "DH0" sb: 3024 eb: 2099663 totb: 2096640
     39  1.1  abs |            Block Size: 512 Capacity: 1023.7
     40  1.1  abs | partition: "DH1" sb: 2099664 eb: 23070095 totb: 20970432
     41  1.1  abs |            Block Size: 512 Capacity: 10239.4
     42  1.1  abs found partition: "DH0" capacity: 1023.7 Megs
     43  1.1  abs start block: 3024  end block: 2099663 total blocks: 2096640
     44  1.1  abs block Size: 512
     45  1.1  abs dumping: start block: 3024 to end block: 2099663 [size: 1048319K]
     46  1.1  abs 
     47  1.1  abs write from partition "DH0" to file "DH1:dump.dd"? [Ny]:y
     48  1.1  abs writing: 0x00200950 -> 0x002009cf  [100%]
     49  1.1  abs ```
     50  1.1  abs ## Improvements
     51  1.1  abs * Cleaned up code.
     52  1.1  abs * Removed SAS/C-isms and updated to build in modern toolchains.
     53  1.1  abs * Use of 64bit offsets throughout.
     54  1.1  abs * Safeguards added against 32bit overflow wraparound.
     55  1.1  abs * Use dos.library for file I/O.
     56  1.1  abs * Trackdisk 64 support.
     57  1.1  abs * NSD support.
     58  1.1  abs 
     59  1.1  abs ## Binaries built
     60  1.1  abs * rdbinfo: Examines RDB partition tables and lists the partitions.
     61  1.1  abs * streamtodev: Writes data from a stream into a device.
     62  1.1  abs * devtostream: Reads data from a device into a stream.
     63  1.1  abs * xstreamtodev: As streamtodev but with extra options to specify block range.
     64  1.1  abs * xdevtostream: As devtostream but with extra options to specify block range.
     65  1.1  abs 
     66  1.1  abs ## Building
     67  1.1  abs The new build process uses GNU Make. Simply review the Makefile and run `make`.
     68  1.1  abs 
     69  1.1  abs Alternatively,
     70  1.1  abs * `make clean` will delete all artifacts.
     71  1.1  abs * `make lint` will format the code to standards.
     72  1.1  abs * `make dist` will prepare a lha archive with the binaries.
     73  1.1  abs 
     74  1.1  abs Development is done using the `bebbo/amiga-gcc` crossdev toolchain.
     75  1.1  abs https://github.com/bebbo/amiga-gcc
     76  1.1  abs 
     77  1.1  abs With some care so that building with `vbcc` is also supported.
     78  1.1  abs http://sun.hasenbraten.de/vbcc/
     79  1.1  abs 
     80  1.1  abs ## Authors
     81  1.1  abs * Roc Valls Domnech (2022)
     82  1.1  abs * Christian E. Hopps (1993)
     83