]> git.sesse.net Git - pistorm/commitdiff
PiSCSI boot ROM+custom file systems working
authorbeeanyew <beeanyew@gmail.com>
Tue, 16 Feb 2021 21:48:23 +0000 (22:48 +0100)
committerbeeanyew <beeanyew@gmail.com>
Tue, 16 Feb 2021 21:48:23 +0000 (22:48 +0100)
data/README.md [new file with mode: 0644]
platforms/amiga/piscsi/device_driver_amiga/bootrom
platforms/amiga/piscsi/device_driver_amiga/bootrom.s
platforms/amiga/piscsi/piscsi.c
platforms/amiga/piscsi/readme.md

diff --git a/data/README.md b/data/README.md
new file mode 100644 (file)
index 0000000..9e24c98
--- /dev/null
@@ -0,0 +1,3 @@
+# Data directory
+
+This is the directory used for storing emulator-related volatile and non-volatile items such as temporary files (volatile) and the CDTV/CD32 SRAM (non-volatile).
index fe3d33a7be850f347fcb8d7203d478fb2d29b1be..ab7cf16eeb0d0a79f3878438e175f277e5d9f873 100644 (file)
Binary files a/platforms/amiga/piscsi/device_driver_amiga/bootrom and b/platforms/amiga/piscsi/device_driver_amiga/bootrom differ
index 0696d8367819b420d1b076d46df4ab22aa8885cb..a0603d1791c5ff5e9d3f447a5e4b60806f85f1f7 100644 (file)
@@ -310,21 +310,21 @@ PartitionLoop:
 
 
 EndPartitions:
-            move.l  #8,PiSCSIDebugMe
+            move.l #8,PiSCSIDebugMe
             move.l a6,a1
-            move.l  #800,PiSCSIDebugMe
+            move.l #800,PiSCSIDebugMe
             movea.l 4,a6
-            move.l  #801,PiSCSIDebugMe
+            move.l #801,PiSCSIDebugMe
             jsr CloseLibrary(a6)
-            move.l  #802,PiSCSIDebugMe
+            move.l #802,PiSCSIDebugMe
 
-            move.l  (a7)+,a6            ; Pop A6 from stack
-            move.l  #803,PiSCSIDebugMe
+            move.l (a7)+,a6             ; Pop A6 from stack
+            move.l #803,PiSCSIDebugMe
 
             move.w #$80B8,$dff09a       ; Re-enable interrupts
-            move.l  #804,PiSCSIDebugMe
+            move.l #804,PiSCSIDebugMe
             moveq.l #1,d0               ; indicate "success"
-            move.l  #805,PiSCSIDebugMe
+            move.l #805,PiSCSIDebugMe
             rts
 
             align 4
index 2cec2f6d548669854014391fb174612e69ba100e..c78650c80117cfcfe532cfcef4bc5a3ad2c6467e 100644 (file)
@@ -258,8 +258,9 @@ skip_fs_load_lseg:;
         read(d->fd, fhb_block, 512);
     }
 
-    if (!fs_found)
+    if (!fs_found) {
         DEBUG("[!!!FSHD] No file systems found on hard drive!\n");
+    }
 
 fs_done:;
     if (fhb_block)
@@ -372,8 +373,9 @@ void print_piscsi_debug_message(int index) {
             DEBUG("[PISCSI] Initializing devices.\n");
             break;
         case DBG_OPENDEV:
-            if (piscsi_dbg[0] != 255)
+            if (piscsi_dbg[0] != 255) {
                 DEBUG("[PISCSI] Opening device %d (%d). Flags: %d (%.2X)\n", piscsi_dbg[0], piscsi_dbg[2], piscsi_dbg[1], piscsi_dbg[1]);
+            }
             break;
         case DBG_CLEANUP:
             DEBUG("[PISCSI] Cleaning up.\n");
@@ -559,8 +561,9 @@ void handle_piscsi_write(uint32_t addr, uint32_t val, uint8_t type) {
             if (piscsi_cur_drive > NUM_UNITS)
                 piscsi_cur_drive = 255;
 
-            if (piscsi_cur_drive != 255)
+            if (piscsi_cur_drive != 255) {
                 DEBUG("[PISCSI] (%s) Drive number set to %d (%d)\n", op_type_names[type], piscsi_cur_drive, val);
+            }
             break;
         case PISCSI_CMD_DEBUGME:
             piscsi_debugme(val);
@@ -679,17 +682,18 @@ skip_disk:;
                 DEBUG("[PISCSI] Partition DOSType is %c%c%c/%d\n", dosID[0], dosID[1], dosID[2], dosID[3]);
                 for (i = 0; i < piscsi_num_fs; i++) {
                     if (rom_partition_dostype[rom_cur_partition] == filesystems[i].FS_ID) {
-                        node->dn_SegList = htobe32(filesystems[i].handler);
+                        node->dn_SegList = htobe32((filesystems[i].handler >> 2));
+                        node->dn_GlobalVec = 0xFFFFFFFF;
                         goto fs_found;
                     }
                 }
                 DEBUG("[!!!PISCSI] Found no handler for file system!\n");
 fs_found:;
-                DEBUG("[FS-HANDLER] Next: %d Type: %d\n", BE(node->dn_Next), BE(node->dn_Type));
+                DEBUG("[FS-HANDLER] Next: %d Type: %.8X\n", BE(node->dn_Next), BE(node->dn_Type));
                 DEBUG("[FS-HANDLER] Task: %d Lock: %d\n", BE(node->dn_Task), BE(node->dn_Lock));
                 DEBUG("[FS-HANDLER] Handler: %d Stacksize: %d\n", BE((uint32_t)node->dn_Handler), BE(node->dn_StackSize));
                 DEBUG("[FS-HANDLER] Priority: %d Startup: %d\n", BE((uint32_t)node->dn_Priority), BE(node->dn_Startup));
-                DEBUG("[FS-HANDLER] SegList: %d GlobalVec: %d\n", BE((uint32_t)node->dn_SegList), BE(node->dn_GlobalVec));
+                DEBUG("[FS-HANDLER] SegList: %.8X GlobalVec: %d\n", BE((uint32_t)node->dn_SegList), BE(node->dn_GlobalVec));
                 DEBUG("[PISCSI] Handler for partition %.8X set to %.8X (%.8X).\n", BE((uint32_t)node->dn_Name), filesystems[i].FS_ID, filesystems[i].handler);
             }
             break;
index 9e57c34e1642c0f2c8d3dff4d31825a098f3d3b5..600083d8a471b12b7684c12e9d02a5b55ea2f2fb 100644 (file)
@@ -14,6 +14,10 @@ Physical drives can also be mounted using their mount point files on Linux, such
 
 You can mount up to 7 disk images using setvar `piscsi0` through `piscsi6`.
 
+If you want EVEN MORE speed, either adjust the size of your hard drive image so that it gets properly detected with 16 heads in HDToolBox or manually edit the Cylinders/Heads settings when setting up your drive.
+
+(The trackdisk device on the Amiga seems to enable transfers bigger than 512 bytes (one sector) only if the drive is identified as having more than one drive head/surface.)
+
 # Making changes to the driver
 
 If you make changes to the driver, you can always test these on the Amiga as a regular file in `DEVS:`, but the Z2 device has to be disabled for this to work properly.