Explorar o código

Disable ROM with zuluscsi.ini file

Added the ability to disable the ROM drive after it has been
written to flash.

Added the ability to change the SCSI ID of the ROM drive from the
ini file.
Morio %!s(int64=2) %!d(string=hai) anos
pai
achega
e035a8152c
Modificáronse 2 ficheiros con 19 adicións e 0 borrados
  1. 15 0
      src/ZuluSCSI_disk.cpp
  2. 4 0
      zuluscsi.ini

+ 15 - 0
src/ZuluSCSI_disk.cpp

@@ -178,12 +178,27 @@ bool scsiDiskActivateRomDrive()
         return false;
     }
 
+    if (ini_getbool("SCSI", "DisableROM", 0, CONFIGFILE))
+    {
+        azlog("---- ROM disabled in ini file, not enabling");
+        return false;
+    }
+
+    long rom_scsi_id = ini_getl("SCSI", "ROMSetSCSIID", -1, CONFIGFILE);
+    if (rom_scsi_id >= 0 && rom_scsi_id <= 7)
+    {
+        hdr.scsi_id = rom_scsi_id;
+        azlog("---- ROM drive SCSI id overriden in ini file, changed to ", (int)hdr.scsi_id);
+    }
+
     if (s2s_getConfigById(hdr.scsi_id))
     {
         azlog("---- ROM drive SCSI id ", (int)hdr.scsi_id, " is already in use, not enabling");
         return false;
     }
 
+
+
     azlog("---- Activating ROM drive, SCSI id ", (int)hdr.scsi_id, " size ", (int)(hdr.imagesize / 1024), " kB");
     bool status = scsiDiskOpenHDDImage(hdr.scsi_id, "ROM:", hdr.scsi_id, 0, hdr.blocksize, hdr.drivetype);
 

+ 4 - 0
zuluscsi.ini

@@ -14,6 +14,10 @@ EnableSelLatch = 0 # For Philips P2000C and other devices that release SEL signa
 MapLunsToIDs = 0 # For Philips P2000C simulate multiple LUNs
 MaxSyncSpeed = 10 # Set to 5 or 10 to enable synchronous SCSI mode, 0 to disable
 
+# ROM settings
+#DisableROM = 1 # Disable the ROM if it has been loaded to Flash
+#ROMSetSCSIID = 7 # Override ROM's SCSI ID, set to -1 or do not include to use ROM's orignal ID
+
 # Settings that can be specified either per-device or for all devices.
 #Vendor = "QUANTUM"
 #Product = "FIREBALL1"