]> git.sesse.net Git - pistorm/commitdiff
Add PiSCSI readme with a brief setup tutorial for now
authorbeeanyew <beeanyew@gmail.com>
Sun, 31 Jan 2021 12:16:37 +0000 (13:16 +0100)
committerbeeanyew <beeanyew@gmail.com>
Sun, 31 Jan 2021 12:16:37 +0000 (13:16 +0100)
default.cfg
platforms/amiga/piscsi/device_driver_amiga/2nd.scsi.device
platforms/amiga/piscsi/device_driver_amiga/pi-scsi.device
platforms/amiga/piscsi/device_driver_amiga/piscsi-amiga.c
platforms/amiga/piscsi/device_driver_amiga/scsi.device
platforms/amiga/piscsi/piscsi.c
platforms/amiga/piscsi/readme.md [new file with mode: 0644]

index fe75e7a5cecb02aee6604606ddce2bee0072f9e6..5160d846606d1efe50966be0f57b9c96930fa392 100644 (file)
@@ -33,6 +33,13 @@ platform amiga
 #setvar rtg
 # Uncomment to enable CDTV mode (not working, requires Kickstart 1.3+CDTV extended ROM)
 #setvar cdtv
+# Uncomment this line to enabled the PiSCSI interface
+#setvar piscsi
+# Use setvar piscsi0 through piscsi6 to add up to seven mapped drives to the interface.
+#setvar piscsi0 PI0.hdf
+#setvar piscsi1 PI1.hdf
+# Uncomment this line to enable the (currently non-working) Pi-Net interface.
+#setvar pi-net
 
 # Forward mouse events to host system, defaults to off unless toggle key is pressed on the Pi.
 # Syntax is mouse [device] [toggle key]
index 090a972c4ade3ebbc646e05ee63ee37ff8671151..3454d1b7b835edabe9d097baf56b45c14a63f257 100644 (file)
Binary files a/platforms/amiga/piscsi/device_driver_amiga/2nd.scsi.device and b/platforms/amiga/piscsi/device_driver_amiga/2nd.scsi.device differ
index 4d44af8f254bfabd466f620e053ce2ebdf2f0dda..fdf0587836fdf1d2ae741272f37c8d8408a9f200 100644 (file)
Binary files a/platforms/amiga/piscsi/device_driver_amiga/pi-scsi.device and b/platforms/amiga/piscsi/device_driver_amiga/pi-scsi.device differ
index 8bfc0fb408d00db4c77675b14959b60055f0f449..6b387be1f3020b63401cecdfb101ce42354400dd 100644 (file)
@@ -153,7 +153,7 @@ uint32_t __UserDevOpen(struct IOExtTD *iotd, uint32_t num, uint32_t flags) {
     struct Node* node = (struct Node*)iotd;
     int io_err = IOERR_OPENFAIL;
 
-    WRITESHORT(PISCSI_CMD_DEBUGME, 1);
+    //WRITESHORT(PISCSI_CMD_DEBUGME, 1);
 
     int unit_num = 0;
     WRITELONG(PISCSI_CMD_DRVNUM, num);
index c99a27cc448295fe866c2e6349da8193904b6295..d14887766f40ac30efd28929980a22ad4e843176 100644 (file)
Binary files a/platforms/amiga/piscsi/device_driver_amiga/scsi.device and b/platforms/amiga/piscsi/device_driver_amiga/scsi.device differ
index 0e28b67541676a2d8df0648620d30cb14c56a7a9..f24fddf45a2a5187cbb191325b07c5107b344868 100644 (file)
@@ -10,6 +10,9 @@
 #include "../../../config_file/config_file.h"
 #include "../../../gpio/gpio.h"
 
+// Comment this line to restore debug output:
+#define printf(...)
+
 struct piscsi_dev devs[8];
 uint8_t piscsi_cur_drive = 0;
 uint32_t piscsi_u32[4];
diff --git a/platforms/amiga/piscsi/readme.md b/platforms/amiga/piscsi/readme.md
new file mode 100644 (file)
index 0000000..8fec097
--- /dev/null
@@ -0,0 +1,34 @@
+# PiSCSI Interface/Device driver for Amiga
+
+Intended to be used as a high performance replacement for scsi.device, can currently be used for mounting raw RDB disk images (RDSK) for use in Workbench.
+This driver and interface is work in progress, do not use it in conjunction with any critical data that you need to survive.
+
+# Instructions
+
+In a perfect world, the PiSCSI boot ROM would automatically detect drives/partitions and add them as boot nodes to be available during early startup, but this is not yet possible.
+To enable the PiSCSI interface, uncomment the `setvar piscsi` line in default.cfg, or add it to the config file you're currently using.
+Add disk images to the PiSCSI interface by uncommenting the `piscsi0` and `piscsi1` lines and editing them to point at the disk image(s) you want to use. `piscsi0` through `piscsi6` are available for a total of seven mapped drives.
+
+To get a hard drive image mounted when WB starts, you need a few things:
+* Copy pi-scsi.device from the `device_driver_amiga` folder to `SYS:Devs` on your Amiga.
+  If you're super savvy, the driver is also available in "RAM" at the address `$80004400` because that's where the PiSCSI interface keeps the boot ROM, so you can technically just write it to a file on the Amiga from there.
+* Download giggledisk from http://www.geit.de/eng_giggledisk.html or https://aminet.net/package/disk/misc/giggledisk to make MountLists for attached devices.
+  Place the giggledisk binary in `C:` or something so that it's available in the search path.
+* It might be a good idea to have fat95 installed on your Amiga, in case you want to use FAT32 images or other file systems that fat95 can handle: https://aminet.net/package/disk/misc/fat95
+
+Now open a new CLI, and type something like:
+`giggledisk device=pi-scsi.device unit=0 to=RAM:PI0`
+This will create a MountList file called `PI0` on the RAM disk, which contains almost all the information needed to mount the drive and its partitions in Workbench.
+You'll have to start up your favorite (or least hated) text editor and change the contents of the file a bit.
+Above the `FileSystem` line, you'll notice a drive identifier. This line might say something along the lines of `DH0` or `PDH0`, etc, and it must be removed, otherwise the file can't be parsed.
+The `FileSystem` line will usually be empty, so you have to fill this out yourself. For instance, you can set it to something like `L:FastFileSystem` to use the standard file system for the drive, or `L:fat95` in case the image is in a format that fat95 can handle.
+Thus, an edited line would look something like `FileSystem       = L:FastFileSystem`
+If the MountList has several partitions listed in it, it must be split up into separate files for all partitions to be mounted.
+Once you've edited a MountList file, simply copy/move it to `SYS:Devs:DOSDrivers`, and the drive will be mounted automatically the next time you boot into Workbench.
+If you don't want it to be mounted automatically, simply use the `Mount` command from CLI.
+
+# A big word of caution
+
+While the PiSCSI interface can be used to mount physical drives that are available as block device nodes on the Pi, you should not do this unless you are absolutely sure what you're doing.
+Directly mounting a block device connected to the Pi may corrupt or destroy the data on the device, depending on what you or the file system drivers do with this disk on the Amiga side.
+