SCSI2Pi does not only support the so-called SCSI target mode, which is used when emulating devices. In addition, there is support for the SCSI initiator mode, where SCSI2Pi acts like a computer and controls devices like hard drives. The initiator mode requires a RaSCSI/PiSCSI FULLSPEC board.
SCSI2Pi offers several initiator mode tools: s2pdump, s2pexec and s2pproto.
With s2pdump you can create hard drive backups or restore hard drives from image files. s2pdump is an enhanced version of PiSCSI's scsidump, offering better compatibility with the SCSI standard and also with some hard drives. With scsidump you can also scan the SCSI bus for available devices. This helps with analyzing setup issues.
s2pdump can not only clone drives but also their properties. You can list the mode pages of a device as s2p properties:
>s2pdump -I -i 5 ---------------------------------------- Board ID is 7 ---------------------------------------- Checking target ID:LUN 5:0 Vendor: 'PLEXTOR ' Product: 'CD-ROM PX-40TS ' Revision: '1.11' Device Type: CD-ROM/DVD/BD/DVD-RAM SCSI Level: SCSI-2 Response Data Format: SCSI-2 Removable: Yes Device properties for s2p property file: device.5.type=SCCD device.5.name=PLEXTOR:CD-ROM PX-40TS:1.11 device.5.mode_page.1=01:06:00:0a:00:00:00:00 device.5.mode_page.2=02:0e:02:00:00:00:00:00:00:00:00:00:00:00:00:00 device.5.mode_page.13=0d:06:00:0b:00:3c:00:4b device.5.mode_page.14=0e:0e:04:00:00:00:00:00:01:ff:02:ff:00:00:00:00 device.5.mode_page.49=31:02:06:00
These properties can directly be copied into a property file, so that the emulated device has the same product data (vendor, name, revision) and mode pages as the real hardware.
s2pexec is a tool for advanced testing. With s2pexec you can send SCSI and SASI commands to a device. The results are displayed on the screen or saved to a file.
>s2pexec -i 4 -c 12:00:00:00:30:00 00000000 05:80:02:02:5b:00:00:88:54:4f:53:48:49:42:41:20 '....[...TOSHIBA ' 00000010 43:44:2d:52:4f:4d:20:58:4d:2d:34:31:30:31:54:41 'CD-ROM XM-4101TA' 00000020 32:34:38:33:30:39:2f:30:35:2f:39:33:00:00:00:00 '248309/05/93....'
The example above shows the INQUIRY data returned by a CD-ROM drive.
You can also use commands which have parameters or return data.
>s2pexec -i 5 -c 15:11:00:04:0c:00 -t data.dat
Here a MODE SELECT command with parameters from the file data.dat is sent.
s2pexec supports an interactive mode and also accepts command parameters on the command line:
>s2pexec -i 5:1 -c 15:11:00:00:0c:00 -d 00:00:00:08:00:00:00:00:00:00:08:00
s2p can be managed with the connected computer by SCSI commands. With s2pproto you can use this interface also without a SCSI connection. s2pproto does not send the respective commands with SCSI but with network commands. Thus s2pproto is in particular interesting for developers of remote control tools for s2p. For the Atari there are already such tools.