Jump to content

SCSI2SD Project - anyone interested ?

Recommended Posts

  • Replies 137
  • Created
  • Last Reply

Top Posters In This Topic

Well, I assembled a board by hand (no baking, just soldering iron) and aside from possibly inhaling some of those super small capacitors, it looks fine, no observable shorts, and continuity tests seem fine.

I'm trying to use a Segger jlink2 with a 20pin to 10pin adapter to program the USB_bootloader. I've got a jlink2 compatible gdbserver that sees the cypress processor and I can load the USB_Bootloader.elf, but doing so doesn't show up as a USB device on the computer, bootloaderhost and scsi2sd-config don't seem to recognize it.

I'm not sure if 'load' from gdbserver is actually programming the device (it appears to be...), or what exactly is going on. It could be my flashing process or there could be a problem with how I assembled the board, I'm not sure yet.

Link to post
Share on other sites
I'm not sure if 'load' from gdbserver is actually programming the device (it appears to be...)


The load command does NOT write to the flash at all - I believe it just loads debug symbols etc into memory to allow debugging.


It looks like you need http://www.segger.com/jflash.html for writing the .hex file (not free, Windows only). Or perhaps you could try OpenOCD http://openocd.sourceforge.net/

Link to post
Share on other sites

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.

Link to post
Share on other sites

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.

Link to post
Share on other sites
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.

Link to post
Share on other sites

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.

Link to post
Share on other sites

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!

Link to post
Share on other sites
  • 2 weeks later...

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!

Link to post
Share on other sites

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:


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()
		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)
+    }
		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 :-)

Link to post
Share on other sites

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?

Link to post
Share on other sites

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.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...