• 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.

SCSI2SD Project - anyone interested ?

Paralel

Well-known member
As long as you coughed the capacitors back up, you'll be fine. If they got lodged somewhere, if you ever get a CXR, tell them it's not TB or cancer, just encapsulated capacitors.

 

bbraun

Well-known member
Thanks. OpenOCD and jflash don't list support for Cypress or the PSoC5, so I ended up ordering the miniprog3. It should arrive in a few days and hopefully I'll be able to tell if I assembled this correctly.

 

Bunsen

Admin-Witchfinder-General
Why not do an SD card raid array.. since you have so many extra pins?
Like so...

775f443afc3a33750541fb435f2e4858.jpeg.7444bb28210aac10c097b20501027c46.jpeg


4-Port SD to SATA Adapter

 

bbraun

Well-known member
JFYI, your parts.ods file lists the processor as CY8C5268AXI-LP047, and the PSoC creator file has the processor as CY8C5267AXI-LP051. Apparently it cares when it goes to program the device, it checks what is connected and then gets grumpy when they don't match.

 

bbraun

Well-known member
I was able to change the device type in both the USB_bootloader and the SCSI2SD projects, rebuild, and theoretically reprogram (PSoC Creator and PSoC Programmer both reported successful erase, program, verify). However, it doesn't show up as a USB device on my machines, and scsi2sd-config doesn't see it. Neither does the bootloaderhost program.

I've verified continuity from the usb cable through the connector all the way to R4 & R5 for D+/D-, and verified the voltages at the decoupling capacitors of the PSoC (3x 4.83V and one 3.3V). Then verified continuity from R4 & R5 to the PSoC. I verified against the working one you built and sent me and it seems to match up.

Given that there's continuity of the D+/D- lines from the usb cable to the chip, and the chip is powered correctly, and the Cypress tools seem to think it has been flashed correctly, I'm not really sure what the trouble could be other than using the wrong processor, or my build of the sources for the different processor is wrong. Or the chip just isn't functioning correctly due to errors in my assembly, but as best I can tell it seems to be working from PSoC Creator's point of view.

 

bbraun

Well-known member
I just received the CY8C5267AXI-LP051 and assembled a second SCSI2SD. Unfortunately, it's exhibiting the same behavior as the first. PSoC Creator and Programmer can both see the mcu, and program it successfully, but no USB device. I can modify the code to toggle the LED, so I know it is getting loaded and running, just no USB for some reason.

 

bbraun

Well-known member
dougg3 had a similar thought. He found these chips have nonvolatile latches, but they don't seem relevant this particular problem, and from what I can tell, should be included in the hex files (which also encode the processor type and other metadata, not just the binary code).

 

mmcmaster

Active member
JFYI, your parts.ods file lists the processor as CY8C5268AXI-LP047, and the PSoC creator file has the processor as CY8C5267AXI-LP051
This should make zero difference, except of course needing a recompile within PSoC Creator. The only difference between the two chips is unused resources.

The USB problem is most likely a dry solder joint. I have experienced many similar problems, where connectivity just does not work. Put the soldering iron on the USB pins of the PSoC for a few seconds, and try again. Repeat until it works.

 

mmcmaster

Active member
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.

 

bbraun

Well-known member
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!

 

dougg3

Well-known member
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!

 

dougg3

Well-known member
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 :)

 

uniserver

Well-known member
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?

 

dougg3

Well-known member
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.

 

bbraun

Well-known member
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.

 
Top