• Hello, Guest! Welcome back, and be sure to check out this post for more info about the recent service interruption and migration.

MagicSD for SCSI2SD owners

Andrew

Well-known member
Hi all,
I am rebuilding the MagicSD thread because it was lost in the recent data loss event and I know that at least some of you found it useful.

What it is
It is an image that you write to an empty SD card and is meant to be used together with SCSI2SD. In contrast to other devices/projects such as MacSD (probably more) which are able to access files on a file system, SCSI2SD does not support this. Instead, it reads/writes data directly on the sd card by using a pointer (start sector on the sd card address space).
The problem with this operation principle is that the retro file systems are not exposed as files, and therefore it is not straight-forward to access them from a modern pc. Up until now one would need to copy (e.g. using dd) the data to a modern computer, alter the partition using an emulator and then dd the data back to the same location of an SD.
With MagicSD, the retro filesystems are accessible by both SCSI2SD and are also exposed by the underlying exfat file system, making it easy to transfer files (or alter contents of the retro partition) without the need to transfer the whole partition back and forth.

How it works
The files are carefully written sequentially on the exfat file system as normal files. SCSI2SD is given the start address of the data as this appears on the SD Card
1627579908317.png

Instructions
A) using an imaging utility (balena etcher, disc utility on mac os), burn the image on an SD card.
B) Set your scsi2sd device to use 10302 as the start sector, and use a device size of at least 1100mb (e.g. 2GB)
C) optional but recommended: Copy a mac plus rom file on the sd card. Then you can have a portable mini vmac installation running directly from the SD, auto-mounting the two partitions, and providing a fast and effortless way to transfer files.
You may add/remove files from the sd card, but it is important to not touch the 3 existing files (header.img, disk1.dsk, disk2.dsk)

Build from scratch
The provided solution is a proof-of-concept and is configured as 2x512mb partitions (for my mac plus this is all I need). The following steps are a high-level approach in order to build the solution from scratch in case you need to have more partitions or of a different size.

A) Use a real mac and a scsi2sd (or an emulator that supports scsi emulation) and apply your desired partition scheme.
B) Use dd to copy the scsi driver and partition table (first 48kb) to a file. Repeat for each partition you have created taking into account its size. You should now have as many files as your partitions +1. It might be a good idea to mount these in an emulator and verify they function correctly
C) Format an empty SD card on a modern PC. I used exfat but other file systems might also work correctly. Important: Select 1kb as the file system sector size.
D) Copy the files over to the SD card starting with the scsi driver and partition table file.
E) Using a hex editor, try to find the start sector of the 1st file (csi driver and partition table). Use this in scsi2sd

If you are successful in building your own partition scheme from scratch, please upload it here for other users to use.
 

Attachments

  • magicsd_image.img.zip
    4.6 MB · Views: 43
Last edited:

Nixontheknight

Well-known member
I have made a version with both 7.5.5 and a hacked version of OS 8 that runs on 68030 (must be 32-bit clean) if anyone's interested
 

elemenoh

Well-known member
This worked great on my SCSI2SD 5.5 on a Macintosh SE. My exact config is below. Nice work!

It'd be great if there were an even simpler option for newcomers to just run an installer or something and end up with a configured SCSI2SD and imaged SD card.

Screen Shot 2021-07-29 at 8.08.54 PM.pngScreen Shot 2021-07-29 at 8.08.51 PM.png
 

re4mat

Well-known member
Question: in the old thread, you said to set the sector size to 512 bytes, and in this one you say that it's important to set the sector size to 1 kilobyte. Which one should we go with?
 

Andrew

Well-known member
Question: in the old thread, you said to set the sector size to 512 bytes, and in this one you say that it's important to set the sector size to 1 kilobyte. Which one should we go with?

In scsi2sd, leave the default (512 bytes). 1kb is the sector size of the file system. But you only need to worry about that if you are building from scratch (different partition layout)
 

Andrew

Well-known member
It'd be great if there were an even simpler option for newcomers to just run an installer or something and end up with a configured SCSI2SD and imaged SD card.
I had also thought about that but I am missing some skills to do it on my own. Ideally, a script would ask the users to specify number of partitions, size of partitions, the path to sd card. It would then format the sd card, write files and give out the start address required for the scsi2sd configuration.
 

MindWalker

Well-known member
Just to recap my post on the data loss -version; thank you! This is exactly what I thought scsi2sd would do when I bought my first unit. This is very nice tool to have! I love how it plays along with Mini vMac.

I did have one or two questions in the original posting but I can't remember them anymore :p One was something along the lines that how the device size (typed into the scsi2sdutil) works out? Should it be something bigger than the 512+512, and less than the size of the SD card (obviously)? Why "size of at least 1100mb"?

512+512 might be a bit large to my liking, would be great if you were to made couple of pre-made versions in different sizes. Perhaps one with partition sizes like the old days (fe. 20+50) and one with something a bit more (something to fit into a 4GB card like about 800+3200). I guess one version with just one partition too (on some older machines this might feel more contemporary and/or a single partition would be as it was from the factory).
 

Andrew

Well-known member
I did have one or two questions in the original posting but I can't remember them anymore :p One was something along the lines that how the device size (typed into the scsi2sdutil) works out? Should it be something bigger than the 512+512, and less than the size of the SD card (obviously)? Why "size of at least 1100mb"?

512+512 might be a bit large to my liking, would be great if you were to made couple of pre-made versions in different sizes. Perhaps one with partition sizes like the old days (fe. 20+50) and one with something a bit more (something to fit into a 4GB card like about 800+3200). I guess one version with just one partition too (on some older machines this might feel more contemporary and/or a single partition would be as it was from the factory).
You are correct. The size must be at least 512mb+512mb+48kb, however I have found no harm in setting it higher so I find it easier to round it off to the next higher even value e.g. 2GB. Scsi2sd does not complain even if the size is larger than the sd card.

To be honest, the process in creating the magic2sd scheme is a bit difficult and time consuming. This is why I packaged it and uploaded it here, so other users would not need to build it from scratch.

On the other hand, if someone does go through with the steps and creates a custom scheme for his needs (e.g. 4x2GB partitions), from that point it is relatively easy to compress, upload, share and re-use.
 

reallyrandy

Well-known member
Thanks for this. I've kinda switched over to Blue SCSI but I still have 2 SCSI2SDs (v5.0 and v5.2).

SCSI2SD is still pretty confusing to me comparatively. Making more than one device isn't clear at all to me. If I have an 8GB card and want 4 devices I can do one 1GB and three 2GB devices so it uses 7 GB and change. All that works but if I want to flash 4 images (one for each device) there's really no way to do that.

From what I've gathered, I can flash one 1GB image or two 500MB images to device1. To get things on device 2-4, I've been putting the SCSI2SD on my G3 266 and copying files to the devices from there as that's the only way I know of. But there's no way to read them back to a modern Mac as the card says it's not readable.

This might help with that. It's too bad small microSDs aren't available. I feel bad using a 32GB card for a 2GB partition and wasting 30GB.

If anyone knows of documentation that explains how the devices relate to files on the card, I'd be interested to read it.
 

Andrew

Well-known member
Since I was running out of space, I created another version of MagicSD partitioned as 4 x 1gb partitions.

I am uploading here in case someone finds it useful.
Tip: Add vmac.rom and a mini vmac executable on the sd for a portable mac experience

Screenshot 2022-01-08 at 23.47.51.png

scsi2sd settings.png
 

Attachments

  • 4x1.img.zip
    10.8 MB · Views: 9

LaPorta

Well-known member
not to refute anything, but maybe I don’t understand. If I format the SD card and partition it in the SCSI2SD on the host computer, then take the SD and pop it in, say, my Mac Mini, then all the partitions show up and I can copy files. Why is no one else able to do that?
 

Andrew

Well-known member
not to refute anything, but maybe I don’t understand. If I format the SD card and partition it in the SCSI2SD on the host computer, then take the SD and pop it in, say, my Mac Mini, then all the partitions show up and I can copy files. Why is no one else able to do that?
Do you mean that the HFS partitions mount on their own on your modern computer?
At least for me on Mac OS Monterey or WIndows it doesn't happen. I believe HFS support was dropped sometime in Mac OS10.

For me the easiest way to edit and transfer files over to my vintage mac (mac plus) is with mini vmac. It is portable, boots in no time, I can easily mount disks/floppies, works on mac os and windows, and I do not have to worry about resource forks being lost since all files live within a classic OS.
Most importantly though, it boots up the same os as the vintage mac, so you can experiment try out different os's without dealing with floppies.
 
Last edited:

LaPorta

Well-known member
Maybe I wind up cheating most of the time: I just have such a mix of Mac generations that I can do HFS/HFS+ and all that back and forth with little hassle. Sorry to confuse things!
 
Top