Menu

#1360 CMD-HD can not handle DHD with SCSI-ID <>#0

v3.6
closed-fixed
None
Drives
2021-12-30
2020-11-22
DarkVision
No

If you attach a DHD created from a SCSI-Device with ID>#0 VICE cannot mount the disk image.

The SCSI-ID is located in Byte $0500 within the system area which by default starts at $03:0000 inside of a disk image (but can also start at $00:0000 if you reset the system-area offset).

The SCSI-ID is part of the HIGH-Nibble of byte $0500... so $50 means the SCSI-ID is set to #5. If you edit the value to $00 VICE can open the disk image.

I have a CMD-HD with an IomegaZIP connected to the external SCSI-Port. If me is using the ZIP as "current" CMD-HD drive i get $50 at byte $03:0500.

Either mount the disk image to the specified SCSI-ID or ignore the SCSI-ID at all...

Discussion

  • Roberto Muscedere

    The CMD partition tables hold the ID information. ID's of 1 to 6 were disabled as the latest boot rom causes data corruption when deleting partitions which span more than one disk. I didn't consider this a problem as the whole CMDHD cannot access more than 4GiB. So on a modern system a single image would be fine. As for older images, that is another issue.
    I can remove the restriction, but I will put in a clear warning about the potential for data loss when deleting partitions.

     
    • Roberto Muscedere

      I should correct myself. A limitation of the design of vice doesn't allow me to attach more than a single image to a single device. This was another reason why I limited it. The best I can offer you is the ability to merge the two images into one. I would have to know the exact sizes of your images, and I would need the partition block from you ID 0 ($500). I can then tell you what bytes to alter so that a concatenated image will work.

       
    • DarkVision

      DarkVision - 2020-12-01

      The CMD partition tables hold the ID information. ID's of 1 to 6 were disabled as the latest boot rom causes data corruption when deleting partitions which span more than one disk.

      Known problem... but you can use different ID's to "swap-in" different media to have different partitions available. A RAID-like drive setup might not be necessary these days...

      There is SCSIConnect128 and i have patched that to SCSIConnect64 and have created geoHDSCSI64 to switch the active SCSI-ID. For example you can have a CMD-HD with 254 partitions with ID#0, then you swap the ID to #5 (like an IomegaZIP-Drive) and you can have 254 different partitions.

      The Problem is not that i cannot use a second device with a different ID, but an image created from a device with a different ID which is then included in the image. I cannot create a DHD from an IomegaZIP with ID#5 and then use it with VICE because the ID#5 is included in the DHD and the "ROM" will not find the image connected to ID#5.

      A simple "Replace-ID" when reading the disk image/partition table would be enough.

       
      • Roberto Muscedere

        I was thinking about this for the last day.
        How about this for a solution:
        Have it so that if you attached "image.dhd", then when you access any other ID/LUN, it will look for "image.sXY" (just by replacing the last 2 letters), where X is the ID and Y is the lun. If it finds it, it will attach and then the HD should recognize and access the information.
        The only problem is forcing the system to disconnect and reconnect to a new one, but normally you wouldn't do that in practice as scsi-1 isn't hot plugging.
        Do you think this would work for you?

         

        Last edit: Roberto Muscedere 2020-12-02
      • Roberto Muscedere

        Haven't heard back from you, but I wanted to get these changes in before 3.5. They are implemented in r39199.

         
        • DarkVision

          DarkVision - 2020-12-04

          That solution sounds good, i'll give it a try.

          Switching the SCSI-ID isn't like hot plugging. You just do switch the device already connected to the SCSI bus. For an IomegaZIP you can eject the media and load a new one. To accept the new media you must re-active the device.

           
        • DarkVision

          DarkVision - 2020-12-04

          Tested 39199... works great! My SCSI tools automatically recognize now that there are two SCSI IDs available and i can switch between the IDs and copying partitions between different IDs works also, just like when using a real C64 with a CMD-HD and a IomegaZIP-drive.

          Thx for that update, much appreciated!

           
  • Roberto Muscedere

    • assigned_to: Roberto Muscedere
     
  • Roberto Muscedere

    • status: open --> closed-fixed
     

Log in to post a comment.