How I’ve setup the SCSI2SD that I use in my LC 475

For reference by my future self, and for anyone that might want to duplicate my setup, I’ve documented how I’ve setup the 32GB SD card that I use with my LC 475

Figure 1: SD Card Size

Currently I have my SCSI2SD set up as 3 devices, SCSI 0 to 2, this is for two reasons: so I don’t have to update my SCSI2SD settings when I want to test one of my drive images as device 0, and so I can have 4 ProDOS partitions (limit 2 per drive).

Some weirdness you might not be aware of: SD cards calculate their size based on multiples of 1000 where SCSI2SD correctly uses 1024, so you need to take that in to account when you configure your SCSI2SD “drive” sizes. The 32GB card I’m using for this entry actually stores about 29.7GB (figure 1), but to make sure my settings will work with all 32GB cards, I’m limiting the overall size to ~28GB. I’m doing this because I’ve found the capacity of SD cards can vary by several hundred megabytes.

  • SCSI 0 (device 1) is a ~2GB drive with 1 partition, created using my System 7.5.5 2GB image, SCSI2SD sector count: 3850240, sector size 512 bytes
  • SCSI 1 (device 2) is a ~23.5GB drive with 8 partitions, SCSI2SD sector count: 53909500 – 3852192 = 50057308, sector size 512 bytes
    • Six ~4GB HFS formatted drive (mainly for CD images)
    • Two 32MB ProDOS partitions to use with my Apple IIe Card.
  • SCSI 2 (device 3) is ~2GB with 3 partitions, SCSI2SD sector count: 58236924 – 53911456 = 4325468, sector size 512 bytes
    • One 2GB HFS formatted drive
    • Two more 32MB ProDOS partitions.

1. Summary of my steps for creating my “drives”

  1. I started with one of my previously created 2GB system 7.5.5 (minimal) disk images.
  2. I installed the full version of system 7.5.5 on to the Mac.OS partition of the 2GB image.
  3. I wrote my 2GB image to my 32GB SD card using blenaEtcher
  4. I inserted the 32GB SD card in to my SCSI2SD adaptor
  5. I setup my SCSI2SD adaptor with 3 drives (sizing details in section 2)
  6. I connected the SCSI2SD adaptor as the internal drive in my LC 475
  7. I booted the LC 475
  8. I used my patched version of HD SC Setup to initialize and partition my drive 1 and 2 (sizing details in section 2)

See Section 3 for information on how I extract partitions from my SD card so I can update their contents and write them back to the SD card.

2. SCSI2SD and Partition Details

I purposely create all most of my drives and partitions to be multiples of 1MB (1,048,576‬ bytes) with start and end positions also at multiples of 1MB so I can more easily backup my SD card, then extract and edit my drive partitions using dd (see section 3). For information on dd, see section 3 of my blog entry: Setting up your vintage (classic) 68k Macintosh – Creating a bootable hard drive starting with a image file and an emulator.

SCSIPartitionFormatBlocksBlock sizeSeek/Skip
0SCSI2SD 1Drivers481KB0
01 (Mac.OS)HFS19250721KB 48
blank 11952512 bytes3850240
1SCSI2SD 2Drivers96512 bytes3852192
11HFS 40631MB1881
12HFS 40631MB 5944
13HFS40631MB10007
14HFS40631MB14070
15HFS40631MB18133
16HFS 40631MB22196
17ProDOS 32767 1KB26889216
18ProDOS32767 1KB26921983
blank 21956512 bytes53909500
2SCSI2SD 3Drivers96512 bytes53911456
21HFS20401MB26324
22ProDOS327671KB29052928
23ProDOS327671KB29085695
blank4512 bytes58236924
Bothtotal (dd)284361MB~27.77 GB

3. Updating the SD Card

3.1. Copy the entire contents of your SD Card to a file

One of the best things about using a SCSI2SD adapter is how easy it is to backup all your 68k Macintosh’s emulated drives to a single file.

  1. Remove the 32GB card from my SCSI2SD adapter
  2. Insert the SD card in to my USB adapter / reader for my PC
  3. Open the terminal / command line window
  4. Type dd --list (windows), diskutil list (linux and mac OS) and press return
  5. You should see a list of all attached drives for your system with their names, you should see the name or your micro SD, SD or CF card, you want the identifier of the floppy drive eg.
    • for linux or mac OS something like /dev/disk2
    • for windows something like \\.\Volume{bc8eb0e4-a23d-11e8-9982-00e18c7bb83e}\
  6. Using the SD card as the input file, create a backup file: “dd if=INPUTFILE of=OUTPUTFILE bs=BLOCKSIZE count=BLOCKCOUNT ”:
    • INPUTFILE = {identifier from step 5}, e.g. /dev/disk2 or \\.\Volume{GUID}
    • OUTPUTFILE =  the location and name of the image you would like to create.
    • BLOCKSIZE, this is why I created my drive to be in multiples of 1M, so I could use a 1M blocksize.
    • BLOCKCOUNT, the number of blocks to read from the card. I’ve set up my 32GB card (actual 29.7GB) so that only the first 28436 1MB blocks are used (includes SCSI 0, SCSI 1 and 2)
    • e.g:
      • linux or mac OS type “sudo dd if=/dev/disk2 of=LC475.img bs=1M count=28436
      • for windows type “dd if=\\.\Volume{bc8eb0e4-a23d-11e8-9982-00e18c7bb83e} of=LC475.img bs=1M count=28436 --progress
  7. press return
  8. wait….

3.2. Extract the “partitions” out of the file

Once I have the file that contains a bit by bit copy of all the “drives” on my SD card, I can then extract each partition from those “drives” to separate partition files so I can mount the partition files in Basilisk II (section 3.3).

Below are the contents of the .bat file I’ve created for Windows 10 to automate the process. Note, my batch file also contains the command from section 3.1. above to backup the SD card to file. I found the the performance is better on my system if I work with that backup file as the source for extracting the partitions vs. extracting directly from the SD card. It also gives me a file I can make a backup copy of before I edit anything.

dd if=\\.\Volume{bc8eb0e4-a23d-11e8-9982-00e18c7bb83e} of=LC475.img bs=1M count=28436 --progress
dd if=d:\LC475.img of=d:\s0p1.img bs=16384 skip=3 count=120317 --progress
dd if=d:\LC475.img of=d:\s1p1.img bs=1M skip=1881 count=4063 --progress
dd if=d:\LC475.img of=d:\s1p2.img bs=1M skip=5944 count=4063 --progress
dd if=d:\LC475.img of=d:\s1p3.img bs=1M skip=10007 count=4063 --progress
dd if=d:\LC475.img of=d:\s1p4.img bs=1M skip=14070 count=4063 --progress
dd if=d:\LC475.img of=d:\s1p5.img bs=1M skip=18133 count=4063 --progress
dd if=d:\LC475.img of=d:\s1p6.img bs=1M skip=22196 count=4063 --progress
dd if=d:\LC475.img of=d:\s1p7.img bs=1k skip=26889216 count=32767 --progress
dd if=d:\LC475.img of=d:\s1p8.img bs=1k skip=26921983 count=32767 --progress
dd if=d:\LC475.img of=d:\s2p1.img bs=1M skip=26324 count=2040 --progress
dd if=d:\LC475.img of=d:\s2p2.img bs=1k skip=29052928 count=32767 --progress
dd if=d:\LC475.img of=d:\s2p3.img bs=1k skip=29085695 count=32767 --progress

3.3. Editing the partitions

Once I have files for each partition, I can use Basillisk II to edit their contents

3.4. Writing Edited Partitions back to your “drive” file

Once I’ve finished making my changes and getting everything setup the way I want using Basilisk II, I write back the partition files to the file I created back in section 3.1. Below are the contents of the .bat file I’ve created for Windows 10 to automate the process:

dd of=d:\LC475.img if=d:\s0p1.img bs=49152 seek=1 conv=notrunc --progress
dd of=d:\LC475.img if=d:\s1p1.img bs=1M seek=1881 conv=notrunc --progress 
dd of=d:\LC475.img if=d:\s1p2.img bs=1M seek=5944 conv=notrunc --progress 
dd of=d:\LC475.img if=d:\s1p3.img bs=1M seek=10007 conv=notrunc --progress 
dd of=d:\LC475.img if=d:\s1p4.img bs=1M seek=14070 conv=notrunc --progress 
dd of=d:\LC475.img if=d:\s1p5.img bs=1M seek=18133 conv=notrunc --progress 
dd of=d:\LC475.img if=d:\s1p6.img bs=1M seek=22196 conv=notrunc --progress 
dd of=d:\LC475.img if=d:\s1p7.img bs=1k seek=26889216 conv=notrunc --progress
dd of=d:\LC475.img if=d:\s1p8.img bs=1k seek=26921983 conv=notrunc --progress
dd of=d:\LC475.img if=d:\s2p1.img bs=1M seek=26324 conv=notrunc --progress
dd of=d:\LC475.img if=d:\s2p2.img bs=1k seek=29052928 conv=notrunc --progress
dd of=d:\LC475.img if=d:\s2p3.img bs=1k seek=29085695 conv=notrunc --progress

3.5 Writing the “drive” file back to your SD card

Once the combined file is updated I write it back to my SD Card, typically using balenaEtcher, mainly because I’m having an occsional issue where using DD under windows to write to SD cards results in a file an emulated drive that doesn’t work, I’m still trying to sort out why.

2 thoughts on “How I’ve setup the SCSI2SD that I use in my LC 475

  1. Pingback: Paul Weinstein

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.