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