Skip to main content
Home Forums SCSI2SD Project - anyone interested ? SCSI2SD Project - anyone interested ?
Thread

SCSI2SD Project - anyone interested ?

SCSI2SD Project - anyone interested ? Troubleshooting 138 posts Oct 9, 2013 — Feb 8, 2014
If the spreadsheet listed the wrong part number for the PSoC device, that means you've probably used the wrong USB terminating resistors as well!

See the commit log at http://www.codesrc.com/gitweb/index.cgi?p=SCSI2SD.git;a=commit;h=c693c7fac1ac496628aadf97ece94da09dc321c9

I accidentally specified a 22k resistor for the USB terminator, instead of a 22Ohm resistor. If you used such a high value resistor, then I'm not surprised it doesn't work!

Creating a solder bridge in place of those resistors should work ok for testing, so long as a short USB cable is used.

Awesome, thanks, that's what I needed. Sorry about the confusion there, I even looked at the schematic while assembling it, and it says "22". I just figured "22k" and went on my merry way.

I've got one fully working, the other one probably just needs some touchups.

Thanks again!

yaaaay

Well, I built a couple of these up and finally got the last parts and programmer to get them done. Except for forgetting to solder one side of one of the level shifters (oops!) they both worked flawlessly. Very nice work, mmcmaster!

Just installed System 7.5.3 to a SCSI2SD in my IIci using a Floppy Emu. :)

The drive formatted fine with Drive Setup when I set it up with the --apple setting and everything worked great. Apple HD SC Setup on the other hand has an error. It shows up, so it's passing the "is an Apple drive" test that Apple HD SC Setup does, but there must be some kind of command that Apple HD SC Setup sends that SCSI2SD doesn't recognize when you click Initialize. I'm going to investigate further and see if I can figure out what command it is.

Soldering those 0402 capacitors by hand looked pretty intimidating at first...but it's not too bad once you get the hang of it. I'd say the hardest part was the microSD socket because I had to put a really thin iron into the socket to get to the pins. That part is definitely designed to be reflowed :) Anyway, all in all, definitely a cool project!

what about FORMAT UNIT command?

bbraun mentioned that mmcmaster had pointed to the lack of MODE SELECT support being a potential problem, so I took a look. This patch to the code makes it work:

Code:
diff --git a/software/SCSI2SD/SCSI2SD.cydsn/mode.c b/software/SCSI2SD/SCSI2SD.cydsn/mode.c
index 6549f16..ad063a1 100755
--- a/software/SCSI2SD/SCSI2SD.cydsn/mode.c
+++ b/software/SCSI2SD/SCSI2SD.cydsn/mode.c
@@ -327,6 +328,18 @@ int scsiModeCommand()
			scsiDev.cdb[8];
		doModeSense(0, dbd, pc, pageCode, allocLength);
	}
+    else if (command == 0x15)
+    {
+        // MODE SELECT(6)
+        int len = scsiDev.cdb[4];
+        if (len == 0) len = 256;
+        scsiDev.dataLen = len;
+        scsiDev.phase = DATA_OUT;
+    }
+    else if (command == 0x55)
+    {
+        // MODE SELECT(10)
+    }
	else
	{
		commandHandled = 0;
I have no idea if I did that even remotely correctly because I'm very dumb when it comes to SCSI. I just looked at the existing code as a template. My goal was simply to read the mode select data that was sent to the SCSI2SD and throw it out. Didn't bother stubbing out the MODE SELECT(10) command. With the above change, Apple HD SC Setup goes on and formats. It takes about 30 seconds to format a disk when configured for 8 MB, so it looks like it's going to take 2 hours to do a full 2 GB card. This may point to it making more sense to format the card in a PC or something somehow :-)

That's slow, Why so slow ? How do we speed this thing up? Is there a way an owner can speed these up maybe using a SD spec or lic, For personal use, user installed patch / code ?

If USB 2.0 was not a concern, couldn't you format it with one of those USB sd card readers in Mac OS 9 with a more modern Mac?

The slow formatting is only a problem with Apple HD SC Setup. Drive Setup works fine. I'm pretty sure Apple HD SC Setup is always slow to format large drives...I don't have any to test with though. Documentation suggests that it does a low level format followed by verification, so it may just be a drawback of Apple HD SC Setup that it has to go over the full drive rather than do a quicker format (which Drive Setup defaults to). Apple itself says a low level format can take an hour or two or more.

Even if the SCSI format command does nothing in SCSI2SD, it may be taking a while to read back the full drive to the Mac during the verification part of the process. I suspect this is the case based on the message Apple HD SC Setup shows during the long wait. Low level formatting doesn't make much sense on an SD card anyway, so it may just be that Apple HD SC Setup is a poor choice for formatting something like this.

When operating the SCSI2SD in normal usage such as booting the Mac OS, it doesn't feel slow at all. It feels about the same as a normal SCSI hard drive from that era. Haven't benchmarked it yet though.

That seems about right to me. Using the SCSI to CF setups, formatting a 4GB CF card on an SE/30 takes long enough that I just kick it off and go do something else for a while. Easily a couple hours. Those low level formats + verify takes a while.

Especially on a 1st gen SCSI SE bus.

so i would assume you guys just bought the pcb and populated it your selves, or did you also buy a parts kit with the pcb's?

for the guys that built it them selves what do you think your total cost was?

To program them, you pretty much need a miniprog3, which is about $90. It's only used once in the initial programming, since mmcmaster has the software update via usb working. He's made it so any jtag or swd programming device should work, but I haven't found any software other than the Cypress stuff that knows how to program these chips, and the device support for the Cypress stuff is limited. After fighting for a while to get my jlink2 device to program these things, I decided it was much more expedient to just get the miniprog3. Especially with being the first set of devices I assembled and not sure if it's my assembly or the software that was the problem.

If you buy PCBs in quantity of 10, I think it ran about $3/board shipped.

Then the rest of the parts come to about $30-$40 depending on quantity ordered, I think. The most expensive individual part is the processor, which is about $10 or so depending on where you get it and quantity. Unfortunately, it's also the most difficult to solder correctly by hand. I've messed up one or two, which is kind of a bummer but hey, that just means I could use the practice, right? :)

The good news is, after assembling a couple of these, the floppyemus seemed easy!

well if he is selling them for $45 assembled? isn't that kind of a really good deal?

Absolutely!

Yep - I bought mine for that price + shipping, fully assembled. Updated the firmware and configured it on my PC, went down to Coles and grabbed a cheapie microSD card, slapped it in, installed it in the Mac SEx (my souped up SE/30 upgraded SE), formatted it, works perfectly, no complaints here :)

LOL, what about your suped up SE/30 makes it so sexy?

Granted in order for it to still be SEx , wouldn't it need to still to contain a 68030?

wonder what shipping to use 48033 would run?

It started out in life as a bog stock 800k SE, which it remained until I got my hands on it. (at which point the logic board was dead and rusted out, as was the chassis and floppy drive) So I got to work on it...new rust free SE/30 chassis, recapped SE/30 logic board, a full 128MB of RAM, NOS SuperDrive SCSI2SD with a 4GB microSD card, its a beast. :) All it needs now is a IIfx/IIsi ROM SIMM and an ethernet card :)

As for the name - I always thought it was hilarious that the SE/30 could have ended up being called that, had Apple stuck to their naming convention :lol:

Is there a different processor and toolchain we can use that doesnt use expensive programmers? or is the cypress it...

I think there is documentation for how to bit bang program these chips available from Cypress, but I was too lazy to bother looking. I was expecting OpenOCD to be able to support it, but no such luck.

BTW, there are still problems with Apple HD SC Setup. Not a huge deal for me since Drive Setup works fine, but I've seen it fail to verify the formatting and I've also seen it succeed, but only format a card limited to 1 GB as about 19 MB. Not sure what's going on, but it could still be stuff that's stubbed out as doing nothing that confuses Apple HD SC Setup.

A quick update:

Unfortunately I've had to increase the price to $75 AUD per board as it takes quite a bit of time to make each board. Still a good deal compared to buying a Miniprog3 for $90 to program your own board :p I have no boards currently in stock, but I have a large order of 50 PCBs that should arrive within 2 weeks.

I haven't had much time over the past 4 weeks to spend on SCSI2SD, so progress has been limited. I have a holiday from work over the Christmas period, so I expect to deliver some firmware updates (Apple HD SC fixes, and performance improvements, and a few other fixes I've already implemented) before the end of the year.

I think there is documentation for how to bit bang program these chips available from Cypress, but I was too lazy to bother looking.
There is source code available from Cypress that could be ported to an Arduino or similar for easy/cheap programming. See http://www.cypress.com/?rID=57435.

bbraun mentioned that mmcmaster had pointed to the lack of MODE SELECT support being a potential problem, so I took a look. This patch to the code makes it work:
Thanks dougg3! I've integrated your code, and it works perfectly (albeit extremely slowly).

I've made a new firmware release incorporating this fix, and merged in few other reliability fixes. Compiled firmware is at http://www.codesrc.com/files/scsi2sd/v3.0.1/firmware/, for use with the original v3.0 bootloaderhost utility.

BTW, there are still problems with Apple HD SC Setup. Not a huge deal for me since Drive Setup works fine, but I've seen it fail to verify the formatting and I've also seen it succeed, but only format a card limited to 1 GB as about 19 MB.
I'll run a 1GB format attempt overnight to see what happens. I suspect it will work properly now with the other fixes I've merged in.

Thanks for the firmware update! Just tested again, same result. Ended up with an 18.6 MB partition after formatting with Apple HD SC Setup 7.0.1. Was set up with --blocks=2097152 to give a 1 GB maximum size...

I've noticed a bug where the SCSI2SD needs to be fully reset before the scsi2sd-config --blocks parameter takes effect (ie. all power sources, including the SCSI host, disk drive power connector, and USB cable are disconnected or turned off). Is it possible that you previously set a small 20Mb size limit, and then haven't reset it since ?

Yep, it was fully reset. Totally unplugged from everything after doing the scsi2sd-config command. I've never configured it for a size other than 8 MB, 1 GB, and unlimited anyway. I'll keep looking into what's going on with it...pretty weird! I wonder if limiting the size to 20 MB or 30 MB will result in the same problem...

Limiting to a 30 MB drive size also causes this same problem--I end up with an 18.6 MB formatted volume.

So then I kept it at 30 MB, put the SD card into my computer, and dd'ed all zeros to the first 50 MB of the SD card just to verify it's not getting confused by pre-existing data. Apple HD SC Setup still formats it as only 18.6 MB. Weird!

does 18.6MB end in some weird logical block address that is getting confused in the firmware?

I also get the 18.6Mb partition :( It seems HD SC Setup is using an internal database to lookup the size of the Seagate ST225N drive (20MB) and using that value instead of the drive's reported size.

I've made a new firmware release (3.1) which doubles read/write speeds to above 900kb/sec, and fixes a few minor errors.

Cool on the speed doubling! Very nice.

Yeah, after you mentioned that, I can see the internal drive size database. Darn :( I tried changing to other drive models that are bigger (some even have a size of 0 blocks in the internal database, which might mean "trust what the drive says"), and they are definitely recognized as valid by HD SC Setup, but they fail to initialize.

At some point I may try to figure out what is causing it to fail on those other drive models. Perhaps when it thinks it's talking to these other drive models, it sends other SCSI commands that are not yet supported. I'll try to figure out a good way to debug and see what SCSI commands are being sent.

mp.ls