• Updated 2023-07-12: Hello, Guest! Welcome back, and be sure to check out this follow-up post about our outage a week or so ago.

MagicSD for SCSI2SD owners

Realitystorm

Well-known member
Ok, so I've been doing some testing and I found something odd. My SCSI2SD is writing exactly 2048 sectors earlier than it should to the SD card based on the value I put in the card start sector field.

Details:
  1. I created a ~6 gb partition on the first part of an SD card and formatted the partition as FAT32 and added the 48k file containing the apple driver and partition map and then the remaining files for the HFS and prodos volumes I wanted.
  2. Looking at the SD card in HxD on my win 10 machine, I found the starting location for the 48k file was at sector 32,792.
  3. So using the SCSI2SD utility I set SD card start sector to 32,792 for the beginning of device 1 to line up with the beginning of the 48k file.
  4. Put the card in my SCSI2SD to then initialized it in my actual mac, setting things up so that the initialized volumes were the same size as the files on the SD card.
  5. When I pulled the card out and put back in my windows 10 system the SD card was blank?!?
  6. I looked at the contents of the SD card again in HxD, and found that my SCSI2SD had written to the card starting at sector 30,744 instead of 32,792, exactly 2048 sectors earlier than it should.... partially overwriting part of the FAT32 file system.
I'm using a SCSI2SD 5.0b with firmware v4.8.04.
I'm wondering if I've found some odd bug?
Will test more.
 
Last edited:

Andrew

Well-known member
Ok, so I've been doing some testing and I found something odd. My SCSI2SD is writing exactly 2048 sectors earlier than it should to the SD card based on the value I put in the card start sector field.

Details:
  1. I created a ~6 gb partition on the first part of an SD card and formatted the partition as FAT32 and added the 48k file containing the apple driver and partition map and then the remaining files for the HFS and prodos volumes I wanted.
  2. Looking at the SD card in HxD on my win 10 machine, I found the starting location for the 48k file was at sector 32,792.
  3. So using the SCSI2SD utility I set SD card start sector to 32,792 for the beginning of device 1 to line up with the beginning of the 48k file.
  4. Put the card in my SCSI2SD to then initialized it in my actual mac, setting things up so that the initialized volumes were the same size as the files on the SD card.
  5. When I pulled the card out and put back in my windows 10 system the SD card was blank?!?
  6. I looked at the contents of the SD card again in HxD, and found that my SCSI2SD had written to the card starting at sector 30,744 instead of 32,792, exactly 2048 sectors earlier than it should.... partially overwriting part of the FAT32 file system.
I'm using a SCSI2SD 5.0b with firmware v4.8.04.
I'm wondering if I've found some odd bug?
Will test more.
I know what is happening. When you opened your sd card with HxD you probably opened your sd partition, not sd drive. So the offset you found (32792) was not from the beginning of the drive, rather from beginning of the specific partition (around 2000bytes further in). Of course scsi2sd is not aware of that and assumes that it starts counting from sector 0

I had the same problem when using dd under windows. Check to see if HxD has an option to open a drive rather than a partition (also you will probably need to run with elevated privileges).
 

Realitystorm

Well-known member
I know what is happening. When you opened your sd card with HxD you probably opened your sd partition, not sd drive. So the offset you found (32792) was not from the beginning of the drive, rather from beginning of the specific partition (around 2000bytes further in). Of course scsi2sd is not aware of that and assumes that it starts counting from sector 0

I had the same problem when using dd under windows. Check to see if HxD has an option to open a drive rather than a partition (also you will probably need to run with elevated privileges).
Ah, thanks, looks like that was the issue, I just went to the "end" of the disk and checked the size, it matches to size of the partition, NOT the size of the SD card. I'll make the adjustment to the card start sector field and get this updated tomorrow. Thanks for your work on this Andrew, it will make it a lot easier for people working with SCSI2SD adapters moving forward. For viewing the "disk" vs the partition, I thought that's what the "open disk" option would do, but I guess not.
 
Last edited:

Realitystorm

Well-known member
So I finally got a chance to come back in play with this after a very busy year at work. I have created a FAT32 version of this for a 32GB SD card. It's currently setup for my own use, but I plan to upload something to my site soon.
  1. On the 32GB card I created a 29GB partition. This is to provide padding at the end of the card to deal with the fact that 32GB cards actually only hold about 30GB and can vary in size by several hundred MBs between manufacturers.
  2. I formatted the partition as FAT32 with 1KB clusters sizes, to make sure files for the volumes lined up with the right sectors on the card with no gaps.
  3. I wrote the 48k file for the boot/volume info, and then 10 x 2GB files for HFS volumes, and 2 x 32MB files for ProDOS volumes. HD_SC_Setup_7.3.5 seems to have a 12 volume / drive limit.
  4. I then wrote a 2nd 48k file, and then 4 x 2GB files for HFS volumes, and 2 x 32MB files for ProDOS volumes. The rest of the partition, about 600MB, I left blank for now.
One issue I had to solve was how directories are stored in the data area. When I tried storing everything in the root of the SD card, windows would used 1KB to do a directory entry for the root directory after the first 12 files were written, so that would shift everything that followed by 1KB. BUT, I found if I created a subdirectories for the 2 "drives", and as my first write I created the subdirectory for drive 1, I could force the directory entry to be written before the 48k file on the SD card for each card.

So for this setup there 1k is used before drive 1, and 1k is used between drive 1 and drive 2.

I'll explain more when I finally post to my blog.
 

Realitystorm

Well-known member
@Realitystorm it seems your web is having some issues? Was just about to revisit your excellent (thank you for providing this to the community) guides and try this new image out 😅.
Just went to my site, the page is working for me, I know my ISP has updated the IP of my server two days ago so the DNS change may not have propagated everywhere yet.
 

Phipli

Well-known member
Just went to my site, the page is working for me, I know my ISP has updated the IP of my server two days ago so the DNS change may not have propagated everywhere yet.
Doesn't work for me either.

Nope, it did work, just took about 30 seconds to load, withought showing anything until it did.
 

Aeroform

Well-known member
Just went to my site, the page is working for me, I know my ISP has updated the IP of my server two days ago so the DNS change may not have propagated everywhere yet.
Works for me again, yesterday it only showed a "critical error" and a status 500 - internal server error. But as @Phipli mentions, quite slowly :)
 

Forrest

Well-known member
The site was down yesterday morning but was up yesterday afternoon and evening. It’s down again this morning.
 

Realitystorm

Well-known member
Back-online. Still waiting to find out what happened. But my guess is something got setup wrong as part of an IP change they did on the weekend. I've been with my provider for 15 years, during that time my site has been down twice, so not bad for a hobby site costing me $7 US a month.
 

reallyrandy

Well-known member
I can't get any of these dsk images (6.0.8 0r 7.5.5) to mount using miniVmac, SheepShaver, or Basilisk II. Basilisk using system 7.5.3 wants to open them in DiskCopy 6.3.3 from the Unix shared drive. it just says "cannot be mounted from the disk it is presently on.". I can mount a few other disk images I've got on the shared Unix drive but not many of them.
I'm on a powerbook running 10.13.6.I may partition this drive and install 10.5. I think that still has native hfs access.

EDIT: hfs was discontinued after 10.15. I can actually open these disk images (608_2GB_drive.dsk) in the finder natively on 10.13.6. I still want to mount them in Basilisk though. I think it's safer to edit and add things there.
 
Last edited:

LaPorta

Well-known member
Most such things cannot be mounted from the Unix drive. You have to copy them to the emulated HD first.
 
Top