Jump to content

Arduino SCSI device - Work in Progress


Recommended Posts

  • 68kMLA Supporter

Just got a shipment of bluepills so added stock of kits and assembled (link in signature).

 

And wouldn't you know it these ones came with blinky :)

 

I added support for macintosh.js to just mount .hda files - opening a PR tonight for it.

 

 @RetroTheryboy did some great testing on speed this time - quite a bit of perf to gain by using exfat!

 

Link to post
Share on other sites
  • Replies 237
  • Created
  • Last Reply

Top Posters In This Topic

  • 68kMLA Supporter

 

19 hours ago, cadenya said:

Are they out of stock in the 2 hours I didn't check? It says sold out on the website.

Indeed, I sent an in stock email and they were snapped up. I only sell what I have in hand and can ship in a reasonable time frame. Looks like a lot of people signed up after Joe's Computer Museums video. I'll release more stock as soon as I get some of these fulfilled.

Link to post
Share on other sites

After updating the driver on the internal disks (Performa 460 and SE/30) with Hard Disk Toolkit 1.7.5, the machines can now boot with the internal disk connected without getting the 0000000F 00000001 error.

 

I've also formatted all the BlueSCSI images with HDT 1.7.5. This combination works fine with both the Performa and the SE/30s.

 

On the Classic and SE FDHD it will cause a "Sad Mac" and 0000000F 00000019 error. So on the Classic and SE I'm instead using Lido 7 for the internal disk. This combination works, but only with System 6.0.7... With 7.0.1 and 7.1 they will either stuck in a "Happy Mac" boot loop, or freeze when about to display the "Welcome to Macintosh" message. Booting from floppy normally works with all system versions.

 

The conclusion is that some old Macintoshes are very picky when it comes to SCSI and drivers. :) And most certainly other factors as well. I'll just accept different behaviour between the machines and with the Classic and SE, I'll use Lido formatted images, limited to only 3 images. Which is not really an issue. :)
 

Edited by blindowl
Link to post
Share on other sites
19 hours ago, blindowl said:

The conclusion is that some old Macintoshes are very picky when it comes to SCSI and drivers.

 

Amen!

 

Something else that may be worth exploring...  Currently, it sounds like you're using 3rd party drivers - not 100% sure *what* driver Lido lays down... :-/  There is a 'patched' Apple Drive Setup out there that allows you to use non-Apple firmware drives... it just might be worth hunting that down and attempting all-Apple drivers...  

https://lowendmac.com/2007/format-any-hard-drive-for-older-macs-with-patched-apple-tools/

 

Of course... YMMV!!  ;-)

Link to post
Share on other sites
21 hours ago, mg.man said:

 

Amen!

 

Something else that may be worth exploring...  Currently, it sounds like you're using 3rd party drivers - not 100% sure *what* driver Lido lays down... :-/  There is a 'patched' Apple Drive Setup out there that allows you to use non-Apple firmware drives... it just might be worth hunting that down and attempting all-Apple drivers...  

https://lowendmac.com/2007/format-any-hard-drive-for-older-macs-with-patched-apple-tools/

 

Of course... YMMV!!  ;-)

 

If I format the internal drive with HD SC Setup and the BlueSCSI images with Lido (formatting the BlueSCSI images with the patched HD SC Setup always fails for me) results in my original issue: only the last 3 drives become available after startup.

 

If I format the internal drive with HD SC Setup and the BlueSCSI images with HDT I can use a maximum of 2 images on the BlueSCSI. If I add more images the Mac will boot with a 0000000F 00000019 error. There seem to be something about more than 3 disks causing different issues (only on the Classic and SE, though).

 

But honestly, I have tried so many things and combinations now that I'm having a hard time keeping track of things... :)

Link to post
Share on other sites

 


Goal:
To get BlueSCSI working on PPC  :)

 

 


Result: 
Yes its possible but hold on. Things are not quite right.

interesting.jpg.f314939e105ffd68c9c0af0b9d54ab5d.jpg

interesting2.jpg.04efd9e60125dbf1b2d298ca45b8cb49.jpg

 

 

 

Problem.
During certain SCSI bus scans, a hang can occur, or perpetual wait state from the SCSI bus. 
With a OS9.1 on an extended HFS formatted HDA, copied onto an exFAT SDCARD on BlueSCSI , I can boot up a Beige G3, it seems to operates fine, I copied Gigs of data back and forth between real hd and bluescsi and no corruption occurred. 
Seems stable, but I can hang the system by going into System Profiler/Devices which prompts a SCSI scan. 

I needed a way to test this and only this problem. lets go backwards a sec.

 

Test Methodology:
Hardware: Performa/LC 475 
OS : System 7.1 / System 8
Software: Transoft SCSI Director 4

I could get the same hang under OS8, by booting the 475 and running SCSI Director to scan the bus, however with identical hardware  under system 7.1 it does not hang.
So now I have a repeatable way to crash the system, with only 1 change. 

 

 

 

logic.thumb.jpg.e118fbd722afaaa05de7b4c24158cad5.jpg

DIY BlueSCSI modified to allow a logic analyser to connect to the SCSI Bus

 

 

475.thumb.jpg.d71df8d3b1843097ef360cc4ce595e7b.jpg

475 with BlueSCSI on internal SCSI, and my DIY BlueSCSI modified to allow a logic analyser to connect to the BUS

 


Result: 
Under OS8 SCSI Director calls the ATN signal during the SCAN,  under system 7.1 it does not.  Could ATN be the cause of the crashing.

 

LC475OS7.1_SCSISCAN.thumb.jpg.d4ae13d2375ed82b3c1481b1140b4e1a.jpg

Under System7 a SCSI bus SCAN does not bring ATN low. 

 

 

LC475OS8.1_SCSISCAN.thumb.jpg.f11ab58b82569d590f95c14a6483a0cd.jpg

Under OS8 with the same hardware the ATN is called, and is LOW indefinitely.  Never coming back.

 

 

 

Blue_PPCOS9.1_BOOT.thumb.jpg.75d5375950c5e6c8a482e4741965c739.jpg

During bootup on a G3 the ATN signal is not called , seems to work fine. 

 

 

 

Blue_PPCOS9.1_SCSISCAN.thumb.jpg.578245309a7f1d8026774fbb1cee6b65.jpg

But things go all screwy when SCSI Bus SCAN is called.  This does not look even close to correct. Again indefinite hang. as ATN is kept low.

 

 

HD_PPCOS9.1_SCSISCAN.thumb.jpg.c6f91a479a555ba4cdc719834db0af5b.jpg

Here is a successful SCSI scan on OS9.1 with standard harddrive , see the ATN line is back high after the scan.

 

 

Maybe someone knows why ATN is called in OS versions > 8?  is this a SCSI 2 thing ?  

 

I have attached the logic analyser files to look at it in finer resolution , I think you can run the Saleae in demo mode to view them .https://www.saleae.com/downloads/

 

 

logic captures.zip

HD_PPCOS9.1_BOOT.jpg

Edited by RetroTheryboy
Added logic captures
Link to post
Share on other sites
20 hours ago, blindowl said:

 

But honestly, I have tried so many things...

 

If it's any consolation... I spent quite a few hours over several days not that long ago trying to get an IBM SCSI MO drive working... I got as far as reading, but any attempts at writing (yes, it was re-writable media) just failed.  I know I had it working in the past... but that was probably 20 years ago... Perhaps there's a book out there that has all the answers?... The Joy of SCSI?  :-/

 

I know this is completely different tech... but that doesn't mean SCSI has gotten any less complicated (as the most recent post bears out...)

 

FWIW, I have managed to get in the order queue for onefor these, so maybe I'll have some hands-on experience to share sometime soon...

 

Good luck!

Link to post
Share on other sites
  • 68kMLA Supporter

Thanks for all the info on scsi drivers @mg.man & @blindowl! I didnt know it worked that way. I've only used LIDO to format ra/blue scsi images I never noticed this.

 

@RetroTheryboy - again, amazing detective work! Seems like newer machines have some slightly different calls/behavior that older ones did not or did not care. Thanks for the logic dumps, something to dig through.

Link to post
Share on other sites
On 3/27/2021 at 10:05 PM, cheesestraws said:

Note, though, that this is a property of the individual disc, not the kind of disc.  A really good example of this is Zip discs.  Zip discs formatted with either a generic SCSI formatter or older versions of the Zip tools are HD-like; they have a partition table and a driver.  Zip discs formatted with later versions of the Zip tools are floppy-like; they rely on the driver in the extension.  This has led to a certain amount of confusion on these forums as to whether you can use a Zip disc as your system disc or not (the answer is 'yes, so long as you format it right').  Most CDs (and all hybrid CDs, if I remember correctly) are HD-like, but you can have floppy-like ones as well.

 

This use of Zip disks as an example has filled a void in my knowledge that has bothered me for years. I'd hypothesized that this was the answer, but it's nice to have it confirmed so eloquently. Thank you!

Link to post
Share on other sites
  • 68kMLA Supporter
20 hours ago, kerobaros said:

This use of Zip disks as an example has filled a void in my knowledge that has bothered me for years. I'd hypothesized that this was the answer, but it's nice to have it confirmed so eloquently. Thank you!

 

You're very welcome.  I am sure you can imagine the swearing that accompanied this particular journey of discovery, then...

Link to post
Share on other sites
On 3/29/2021 at 12:22 PM, RetroTheryboy said:

Maybe someone knows why ATN is called in OS versions > 8?  is this a SCSI 2 thing ?  

 

The spec allows ATN to be driven during selection, which should just be the Mac asking the hard drive to move to a MESSAGE OUT phase following selection.

 

The indefinite-low screenshot you posted shows C/D asserted but MSG and I/O de-asserted, so it looks like the device is hung up in the COMMAND phase. REQ is driven, so the firmware is asking the Mac to give it a command byte that it never receives. Just a guess, but maybe the firmware is hardcoded to move to COMMAND after responding to selection, even with ATN asserted? That might make the Mac driver freeze up if it wasn't expecting that response.

Link to post
Share on other sites
22 hours ago, saybur said:

The spec allows ATN to be driven during selection, which should just be the Mac asking the hard drive to move to a MESSAGE OUT phase following selection.

 

Unable to play with this myself as I can't realistically order a BlueSCSI, let alone a bare blue pill for DIY games to NZ (tracking on my aliex order had a status of "shipment cancelled" while still showing as in transit).

 

Anyway, looking at the code... 1121 - 1123 shows a while() loop on ATN which seems risky.

while(isHigh(gpio_read(ATN))) {
	MsgOut2();
}

so MsgOut2 gets called over and over until ATN goes low.

 

Compare this to RaSCSI scsidev_ctrl.cpp 234-238 which uses IF(), so MsgOut only gets called once.

if (ctrl.bus->GetATN()) {
	MsgOut();
} else {
	Command();
}

 

I'm by no means an expert at this, and I have no way of testing, but figured it was worth noting.

Link to post
Share on other sites

I've been really excited about this project, and wanted to use it in my PowerBooks but I prefer to have my microcontrollers be removable from the boards (for troubleshooting, etc) so that ruled out using the board with the SCSI2SD powerbook adapter board as above since there would be no space for male/female headers on the Blue Pill.

 

I opted to draw up a new carrier board instead and connect to the 40-pin connector directly. I riffed on Eric H's original design and managed to get something that fits in the original hard drive space and still lets me have the STM32 module be removable -- and includes a 50-pin connector as well.

 

So far it works in my PowerBook 520c but not in my PB 145 -- but the 145 has all sorts of other problems (and smells like fish, for some reason) so I can't guarantee the issue isn't something else. 

 

I've thrown it up in github, but v1.0 of the board has some issues so I can't recommend it to everyone yet, only the intrepid adventurers. I'll be sending new version off to the fab this week that will hopefully address the problems.

 

Biggest thanks to Eric Helgeson and all the others who have contributed to make this work! You are all scholars and gentlemen/gentlewomen!

 

(I've got some concerns with the name: I've been calling my project "bluescsi_pb", but I don't know if that's the right thing to do since it's an outside project and I don't know if I should use "BlueSCSI" in the name.)

 

IMG_5126.jpg

pcb_v1.0_render.jpg

Link to post
Share on other sites
  • 68kMLA Supporter
On 4/3/2021 at 9:25 AM, xunker said:

and smells like fish, for some reason

 

Leaky caps. (In the physical, not the electrical, sense).  They are kind enough to provide a diagnostic and unmistakable smell, believe it or not :-D

Link to post
Share on other sites
On 4/3/2021 at 10:25 AM, xunker said:

it works in my PowerBook 520c but not in my PB 145 --

 

Just tested in my own 145, and 170. 

Both doesn’t like it, from chimes of death to not wanting to boot from the internal HD. 

 

So more than happy if a solution is found (not really an issue right now though, my PowerBooks hard drives are working so far)

Link to post
Share on other sites
  • 68kMLA Supporter
Posted (edited)

Speaking of PCB designs, here's the prototype version of my PowerBook BlueSCSI device board.  This is the repo where my designs will go after they've had some basic testing done.  'USB Here' means the end of the blue pill with the USB port goes there.

https://github.com/androda/PCBDesigns/tree/main/BlueSCSI/PowerBook

 

The two jumpers are for selecting which power source you use (L = logic, M = motor) and term power.  I have found that it doesn't work at all without termination enabled in my PowerBook 180.  Sleep mode is not tested, unsure if it'll work.  This board is definitely harder to put together because of the little surface mount components, but will have better battery life because of active termination vs resistor network termination.

 

A later version will appear soon after my next version boards show up, so you might not want to use this one anyway.  Later version uses a much more affordable microSD slot.

Edited by androda
Later revision on the way
Link to post
Share on other sites
  • 68kMLA Supporter
22 hours ago, androda said:

Speaking of PCB designs, here's the prototype version of my PowerBook BlueSCSI device board.  This is the repo where my designs will go after they've had some basic testing done.  'USB Here' means the end of the blue pill with the USB port goes there.

https://github.com/androda/PCBDesigns/tree/main/BlueSCSI/PowerBook

 

The two jumpers are for selecting which power source you use (L = logic, M = motor) and term power.  I have found that it doesn't work at all without termination enabled in my PowerBook 180.  Sleep mode is not tested, unsure if it'll work.  This board is definitely harder to put together because of the little surface mount components, but will have better battery life because of active termination vs resistor network termination.

 

A later version will appear soon after my next version boards show up, so you might not want to use this one anyway.  Later version uses a much more affordable microSD slot.

 

This looks promising, please update us when your revision is up as I would like to try it. Thanks for doing this!

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