Jump to content

Arduino SCSI device - Work in Progress


Recommended Posts

  • Replies 78
  • Created
  • Last Reply

Top Posters In This Topic

On 10/16/2020 at 7:59 PM, erichelgeson said:

Hi all,

 

I’ve been working on building the ArdSCSino-stm32 https://github.com/ztto/ArdSCSino-stm32 (original) https://github.com/erichelgeson/ArdSCSino-stm32 (my fork) to see if it’s a suitable replacement for SCSI Hard Drives in our vintage Macs. I’ve mentioned it in passing a few times on the forums but now I’ve made some progress I wanted to share!

 

There is still a lot left to do, but I'm to a point where I'm looking for feedback!

 

This is my first hardware project - I find it amazing that you can create a PCB in KiCad and have it printed and shipped in a week or two. I’ve learned a lot with help from the RaSCSI discord peeps and owe a lot of my progress to them. Thanks!

 

My goal for this device:

A single purpose Macintosh focused SCSI <-> SD device that is inexpensive and easy to configure.

 

The hardware build is quite simple - the board from zotto has just a 50 pin header and the arduino. Though it’s missing features such as SCSI termination. 

 

The software on the other hand is not as easy to compile. It uses an older “core” that requires quite a few steps to install all the necessary components - it took me quite a while to find the right combination of steps from random github tickets and instructions to finally get it to compile. Flashing is a bit tricky as well as the procedure is documented a few different ways online - though I’ve finally got it down after much trial and error (and one burned out arduino!)

 

With the software compiling I’ve converted all the comments from Japanese (only via Google translate so if anyone who speaks Japanese natively could let me know if it’s right or not :). Then started adding in Mac specific configurations such as showing as a Quantum Fireball so it appears genuine. I’ve also been adding in config file support for a few of the optional knobs that can be set.

 

One of the biggest features missing on the hardware side is SCSI Termination. I’ve added that into the PCB and will be ordering a min order this weekend to validate it all works.

 

After SCSI termination is validated working I’ll be removing the arduino and just placing the stm32 chip on the board itself.

 

Performance is good! It sits between a LC and MacII on Norton 3.5 disk perf. I said good - not great. It will be a good replacement for anything 030 and under - and adequate drive in an 040 - but would not use it for a boot drive in a PPC.

 

The goal is to be inexpensive - you could do this all yourself as I have but shipping is the real killer here - it raises the price over 4x at 5 boards.

 

What I’d like to know is:

 

  • Is there interest in the community for a board like this?
  • It’s not really easily end user flashable/upgradeable, though that simplicity is really a feature.
  • Would you use it internally or want a pluggable external drive?
  • Since the drive is small (72mm x 44mm) I’ll likely be 3d printing a bracket for mounting internally.
  • I need a better name than ArdSCSino - it doesn't really roll off the tongue - ideas welcome!

 

Thanks!

 

Here's a few photos of the design so far and it working on my LCIII.

 

large.1574368630_ScreenShot2020-10-17at10_38_12AM.png.ed7c18b80d2ac5e82ee92672e1e7e10a.pnglarge.1520605602_ScreenShot2020-10-17at10_38_21AM.png.04ab7c005a475c4feb7d09ba806a2b4d.pnglarge.PXL_20201015_135730524.jpg.d06156553c599142cc0cb8416d474930.jpglarge.PXL_20201009_193754845.jpg.7fa629442754599c33b1272f757470d7.jpg

 

 

Neat project! 

 

I have to ask, who wrote the code? I was going over it and I noticed the writebyte routine has a TON of IF statements. There has to be a better way of handling that because I could see a race condition occurring here. 

Link to post
Share on other sites
33 minutes ago, techknight said:

I have to ask, who wrote the code? I was going over it and I noticed the writebyte routine has a TON of IF statements. There has to be a better way of handling that because I could see a race condition occurring here.  

ztto - the commit history/fork/etc is all there in github. There is only 78 ifs in the entire code, most are macros - are you looking at ArdSCSinoV2.ino ?

 

I do plan to review more of those functions to see if there's opportunity to optimize - haven't done c++ in quite a while, but open to any suggestions!

Edited by erichelgeson
Link to post
Share on other sites
47 minutes ago, techknight said:

Neat project! 

 

I have to ask, who wrote the code? I was going over it and I noticed the writebyte routine has a TON of IF statements. There has to be a better way of handling that because I could see a race condition occurring here. 

Just a heads up, could you remove the full quote from your post? Having the entire post with all of the pictures quoted just to add to a two sentence reply is just a massive pain to scroll past.

Edited by Daniël Oosterhuis
Link to post
Share on other sites
22 minutes ago, erichelgeson said:

ztto - the commit history/fork/etc is all there in github. There is only 78 ifs in the entire code, most are macros - are you looking at ArdSCSinoV2.ino ?

 

I do plan to review more of those functions to see if there's opportunity to optimize - haven't done c++ in quite a while, but open to any suggestions!

I was looking at the translated one, at least the one that shows translated. 

Link to post
Share on other sites
5 minutes ago, techknight said:

the one that shows translated

That is for his V1 - which I accidentally translated first :D I have a lot of cleanup to do in the repo, but the V2 is the software I'm running on my prototypes. Will cleanup and push what I have later this week before the new prototypes arrive (assembly finished btw, shipping soon!)

Link to post
Share on other sites

Ahhh ok. yea then I need to look at the other one then. 

 

I like where its going :-) the STM32 is a neat IC and I have thought about using it in other projects. 

 

And no, I dont know C++ at all. I only familiarized myself with C last year. C/C++ are not exactly the same. there are some similarities though.

 

Edit: looking at V2, and yea its very different. Much more streamlined. 

Edited by techknight
Link to post
Share on other sites

I'm late to this party, but can't move on before adding myself to the list of people eagerly lining up to buy a few of these when they're ready! I've successfully deployed close to half-a-dozen SCSI2SD's now (both internal and external, installed in various Macs and two Amigas), but they're pretty wonky to configure and I'm always worried that I'm one small tweak away from ruining a working configuration. Given that I now own two NeXT machines which will need solid state storage sooner or later, not to mention an SGI, an HP/UX workstation, various other non-upgraded Macs, etc., I'm very excited to learn about this project :D 

 

Huxley

 

Link to post
Share on other sites

I'm also up for getting these Scuzzweeno™ boards. I have a bluepill that I tried out for something, so it's good to see such an inexpensive and common module being used for SCSI. Like @Huxley said, the SCSI2SD is kind of worrisome to use and having an alternative would be great. It would be nice if we could re-flash it in case of a firmware update. It seems most projects like this end up having many updates.

Link to post
Share on other sites

Wow, this is so cool to see this being worked on! I have to say this is really timely for me, as I just got the original ztto version working on my SE/30 and my Classic II yesterday! I wanted an external version with SCSI passthrough, so I wired it by hand inside a project box instead of buying one of the PCBs. I'm looking forward to buying some finished PCBs for internal installations!

 

(I really should have taken some pictures of the inside but I was eager to get it working!)

62481117709__F570BF5A-5A57-4E88-93E6-A67194A1DB18.JPG

IMG_0630.JPG

IMG_0631.JPG

Link to post
Share on other sites
3 hours ago, cheesestraws said:

(System 7 Pro!  Nice.)

I didn't even mean to install that, it just happened to be the first copy of System 7.1.1 that I downloaded (and I needed 7.1.1 because it was the lowest OS that Stuffit 5.5 would run under). Now that I have it though I might set up the groupware on my LocalTalk network just for fun.

Link to post
Share on other sites
11 hours ago, nyankat said:

I just got the original ztto version working on my SE/30 and my Classic II yesterday

Nice! I know a few others who have recently built one too. Any notes or photos you have I'd love to hear. Where did you get your PCB from? How are you handling termination (I suppose you are just terminating the next device since you made a chain). Anything you think that could be improved on the hardware or software side?

 

I'm on the lookout too for a SCSI PowerBook to build a model for that. Also may order a few of the break out boards like RaSCSI has if people would like to mount externally.

Link to post
Share on other sites
3 minutes ago, erichelgeson said:

Nice! I know a few others who have recently built one too. Any notes or photos you have I'd love to hear. Where did you get your PCB from? How are you handling termination (I suppose you are just terminating the next device since you made a chain). Anything you think that could be improved on the hardware or software side?

 

I'm on the lookout too for a SCSI PowerBook to build a model for that. Also may order a few of the break out boards like RaSCSI has if people would like to mount externally.

I didn't make a PCB. I soldered 25 wires from one DB-25 connector to the next one, then soldered a second set of wires to the Blue Pill. For an SD card adapter I just bought the cheapest breakout board my local electronics store had. When I don't have any other devices on the SCSI bus and I plug it directly into the back of the Mac without a cable, the wires are short enough that it actually doesn't need any termination at all. And as you say, when it's in a chain, I terminate the last device.

Link to post
Share on other sites

Prototypes arrived early! Unfortunately mouser order is still in transit so will just have to look at them till the parts arrive.

 

Note I added a pin out to the upper right for hooking up a programmer (so I dont have to solder legs on and risk shorts anymore while debugging :)

 

Will design/print an internal mount now that I have some holes to mount to this weekend.

 

large.20201023_115512.jpg.71392d6f2187efff1c5b224bbf784072.jpg

Link to post
Share on other sites

Cool, I was thinking about this for quite a while and I should probably leave a few comments of my own...

 

One development dynamic that's been interesting on RaSCSI and some of the related projects was a lack of foresight.  You mention focusing on storage only, and yes, always good to get something up and running by limiting scope, but I feel that I'm going to become more interested in STM32 and Blue Pill due to pricing/availability frustrations with Raspberry Pi Zero and can't help but think how I'll be turning microcontroller projects into do anything and everything machines.

 

Now that I'm digging into the RaSCSI project more, sure enough I'm finding a number of little tweaks here and there to both the hardware and software that can add significant new and useful functionality.

 

I'm also fairly new to PCB hardware design, somehow I'm surprised to find out that @erichelgeson is too but maybe I shouldn't be.

Link to post
Share on other sites
38 minutes ago, quorten said:

tweaks here and there to both the hardware and software that can add significant new and useful functionality. 

That's one of the great advantages here - sure these projects are more immature (they're just starting out) - have a ton of potential. Amazing to see what others are already adding to RaSCSI (making a framebuffer capture device)

39 minutes ago, quorten said:

limiting scope

Limiting scope and price - I think RaSCSI has a nice price point to (much higher) feature set - if you want to go that route. Here it's more on lower price points with a sole focus - something you could stick into each machine if you wanted. I'm sure you could add a lot more here - and maybe someone will, but for now I'm happy with the price/perf/features.

41 minutes ago, quorten said:

fairly new to PCB hardware design

I had lots of help from ztto's existing work, @landoGriffin, and a bunch of youtube videos :)

Link to post
Share on other sites

Well, that's about the coolest thing I've seen today. Planning on selling blank PCBs soon? Mouser is literally across town from me, so UPS ground gets here next day (I miss the days of same-day will call :(). I would love to put a few of these together to drop into some stuff.

Link to post
Share on other sites

what exactly have you done to the code, I looked at your repo and can't see any difference in V1/V2 compared the the code from the original developer?

fwiw anyone who's had trouble trying to get the V2 code running, line 8 of the .ino code if you change 

#define USE_DB2ID_TABLE      1  to #define USE_DB2ID_TABLE      0 

it will run fine on a Mac, I fiddled with this about maybe a year ago and this was required at the time to get it to show up as a scsi device.  Also in regards to the name of the device on lines 55-57 you can redefine what it shows up as i.e you could change the vendor 'TNB' to 'Quantum' etc just by changing those letters in the code at those line numbers I mentioned, basically line 55 is vendor, line 56 is model, and I believe line 57 is the fw revision. 

I think the main reason the ArdSCSino isn't as popular as other devices is likely due to it being a little bit more difficult to program/upload the code for someone who's not as experienced with such things. I've be curious to know what read write speeds you get using this? I had pretty average read and write performance myself those the seek times were good compared to my Qauntum Lightning 730S drive. both were run using a SE/30

also worth noting you will need to create the HDD images on a modern computer and then copy those image files to the microsd card using the naming convention req'd in the .ino code. so for scsi id 1 it would be HD10.hds

just figured id share that as there not a lot of information on the Internet regarding the setup process

IMG_0278.jpg

IMG_0279.jpg

Link to post
Share on other sites
9 minutes ago, MrFahrenheit said:

either software control it or have a switch on the board

That's the plan! Right now it's jumpers but those get lost easily (but easily found too)

 

9 hours ago, Chopsticks said:

looked at your repo

Still haven't had time to clean up and push everything - click watch on github and you'll be the first to know when I do :)

 

There were some updates in V2 upstream ~3-4 months ago - it ran as is for me. I did change the vendor too, and added a config file if someone wished to override some settings - reflashing a firmware is quite a lot just to change settings, translated as best I could with google translate and some context.

 

9 hours ago, Chopsticks said:

not a lot of information on the Internet regarding the setup process

Correct - I got through it as you did, but defiantly will be documented on my repo as well. Early in the project, lot going on!

 

9 hours ago, Chopsticks said:

pretty average read and write performance

Yep! Not going to knock the socks off a scsi2sd or hdd - but will be a nice alternative. I've only tested in Norton so far - will test in that utility too and post some numbers.

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.

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

Loading...

×
×
  • Create New...