mirror of
https://github.com/dkgrizzly/GreenSCSI.git
synced 2024-11-29 05:49:16 +00:00
204 lines
8.5 KiB
Markdown
204 lines
8.5 KiB
Markdown
# BlueSCSI
|
|
|
|
BlueSCSI & ArdSCSino are hardware that reproduces SCSI devices (hard disks) with an Arduino STM32F103C (aka Blue Pill.)
|
|
|
|
`BlueSCSI` created by [erichelgeson](https://github.com/erichelgeson) is a fork of `ArdSCSino-stm32` which adds:
|
|
* Mac specific functionality
|
|
* Passive SCSI termination
|
|
* An alternative power source if not able to be powered by the SCSI bus
|
|
|
|
`ArdSCSino-stm32` created by [ztto](https://github.com/ztto/ArdSCSino-stm32) is the STM32 version of `ArdSCSino`
|
|
|
|
`ArdSCSino` created by [Tambo (TNB Seisakusho)](https://twitter.com/h_koma2)
|
|
|
|
# Purchase a Kit or Fully Assembled
|
|
|
|
Check back Jan 25, 2021 for a link!
|
|
|
|
# Questions?
|
|
|
|
Join us in #bluescsi on [Discord](https://discord.gg/sTTYbGYy)
|
|
|
|
Or open an issue on this repo.
|
|
|
|
## Compatibility
|
|
|
|
If your computer is not listed below - it may be compatible but there is no guarantee it will work. This device is designed and tested to work with pre-PowerPC Macs.
|
|
|
|
### Compatible
|
|
|
|
#### Tested by Me
|
|
|
|
SE, SE/30, Classic, Classic II, Color Classic, LC I/II/III
|
|
|
|
#### Reported by others
|
|
|
|
[IIcx](https://68kmla.org/forums/topic/61045-arduino-scsi-device-work-in-progress/?do=findComment&comment=663077)
|
|
|
|
### Incompatible
|
|
|
|
Plus
|
|
|
|
## Performance
|
|
|
|
Tested on a Color Classic with [SCSI Director Pro 4](https://macintoshgarden.org/apps/scsi-director-pro-40)
|
|
```
|
|
1012KB/Sec Write
|
|
900KB/Sec Read
|
|
1.01ms Seek
|
|
```
|
|
|
|
|
|
## Assembly
|
|
|
|
1. Solder on the surface mount SD Card holder. Using the [Drag Solder](https://www.youtube.com/watch?v=nyele3CIs-U&start=34) technique.
|
|
- Once on, check continuity of all connections. Fixing this after the BluePill is on will be difficult.
|
|
1. Solder the dioeds to the bottom of the board. Be sure they are flush as possible to the bottom.
|
|
1. Solder the header pins on to the BluePill. Then the blue pill to the BlueSCSI PCB.
|
|
- Correct orientation is having the USB should be over the SD Card holder.
|
|
1. Solder on the Resistor nets. Pin one is marked on the board and the resistors.
|
|
1. SOlder on the Termination Jumpers & place the jupmpers on.
|
|
1. Solder the 50 Pin headers on.
|
|
1. Optional - Solder on the berg connector. Only needed if your machine does not supply enough power via the SCSI bus.
|
|
1. Optional - Solder on the debug headers near the SD card. Only nessissarry if re-programming.
|
|
|
|
### Version 1.0-b BOM
|
|
|
|
STM32F103C8T6 (U1) aka BluePill board. Beware of fake/scams. Look for reviews. Amazon, ebay, etc.
|
|
|
|
Mouser Cart https://www.mouser.com/ProjectManager/ProjectDetail.aspx?State=EDIT&ProjectGUID=db967d46-a51a-4a0e-a350-8f503b2f02cf
|
|
|
|
* 2x 330 (RN2, RN4) Resistor nets https://www.mouser.com/ProductDetail/652-4610X-1LF-330
|
|
|
|
* 2x 220 (RN1, RN3) Resistor nets https://www.mouser.com/ProductDetail/652-4610X-1LF-220
|
|
|
|
* 2x Diodes https://www.mouser.com/ProductDetail/583-1N5818-T
|
|
|
|
* SD Card Holder (J1) https://www.mouser.com/ProductDetail/538-104031-0811
|
|
|
|
* Headers https://www.mouser.com/ProductDetail/872-920-0011-01
|
|
|
|
Not available on Mouser:
|
|
|
|
50 PIN SCSI header https://lcsc.com/product-detail/IDC-Connectors_BOOMELE-Boom-Precision-Elec-C30006_C30006.html
|
|
- May substitute with 2 rows of headers from above.
|
|
- **Note on Right angle connectors** - it appears Right angle headers are notched differently then the pin out. Be sure to note PIN 1/red stripe on the cable match up.
|
|
|
|
### Optional
|
|
|
|
Floppy/Berg Power header https://www.mouser.com/ProductDetail/571-1718254
|
|
- Required if your machine does not supply power via TERM POWER. For example a Mac Plus or Mac with a Analog/PSU board that has not been recapped.
|
|
|
|
## Usage
|
|
|
|
Hard Disk image files are placed in the root directory of a `FAT32` (or `ExFat`) formatted SD card.
|
|
|
|
The naming convention is as follows (file name max 32 characters). Note you may mount multiple drives at a time to different SCSI ID's.
|
|
|
|
`HDxy_512.hda`
|
|
```
|
|
HD - Hard Disk
|
|
x - SCSI ID to attach to. 0-7 (though 7 on a Macintosh is the System)
|
|
y - LUN id usually 0.
|
|
512 - Sector size. Usually 512. 256, 512, & 1024 supported.
|
|
```
|
|
|
|
### Examples:
|
|
|
|
`HD10_512.hda` - Hard Disk at SCSI ID 1, LUN 0, sector size of 512.
|
|
`HD51_512 System 6.0.8L LC.hda` - Hard Disk at SCSI ID 5, LUN 1, sector size of 512. Text between block size and .hda is ignored.
|
|
|
|
### Bad
|
|
|
|
`HD99_712 foo bar fizz buzz bang.hda` Over 32 chars and invalid SCSI/LUN/Block size....
|
|
|
|
If no image files are found PC13 will pulse on and off. Check the log file for any errors.
|
|
|
|
### Termination
|
|
|
|
To enable termination place the two jumpers on the TERM block. Termination should be enabled if it is the last device in the chain - which is normally how it is used.
|
|
|
|
## Troubleshooting
|
|
|
|
### Log Files
|
|
|
|
If your device is not working - check the `LOG.txt` in the root of the SD card.
|
|
|
|
### Verify you are not using a fake
|
|
|
|
How to tell if your STM32 is fake: https://github.com/keirf/Greaseweazle/wiki/STM32-Fakes
|
|
|
|
### Performance is slower than expected
|
|
|
|
Try a different SD card. Cheap/old SD cards can affect performance.
|
|
|
|
# Development
|
|
|
|
Below is for users who wish to edit or develop on the BluePill - normal users should not need to worry about this.
|
|
|
|
## PlatformIO
|
|
|
|
Open the project in [PlatforIO](https://platformio.org/) and everything is pre-configured.
|
|
|
|
## Setup Arduino IDE (Depricated, Do Not Use)
|
|
|
|
You only need to setup the Arduino IDE if you are planning on developing and contributing to the project. Otherwise flash a provided `.bin` file.
|
|
|
|
1. Install `Arduino IDE` version `1.8.x` - https://www.arduino.cc/en/software
|
|
1. Instructions may require extra steps to allow for serial/usb access depending on your OS. Read all instructions carefully.
|
|
1. Follow these instructions _**carefully**_ as well - https://github.com/rogerclarkmelbourne/Arduino_STM32/wiki/Installation
|
|
1. **Use the 1.0.0 core** - not the master - https://github.com/rogerclarkmelbourne/Arduino_STM32/releases/tag/v1.0.0
|
|
1. Note I used the `Arduino SAM Boards (32-bits ARM) Cortext-M3)` version `1.6.12`
|
|
1. Additional Help https://sites.google.com/site/ericmklaus/projects-1/stm32f103-minimum-system-development-board/arduino-ide-for-stm32103-board
|
|
1. Some additional hints here - https://github.com/ztto/ArdSCSino-stm32/issues/5
|
|
1. If you get a warning about an unsigned binary - open the System Preferences -> Security -> allow stm32...
|
|
1. Install SdFat - Tools -> Manage Libraries -> `SdFat by Bill Greiman` version `2.0.2`
|
|
1. Make sure the correct board is selected `Generic STM32F103C series` - Copy the latest `.ino` file into a sketch and compile.
|
|
1. Flash using your preferred method.
|
|
|
|
## Flashing
|
|
|
|
When flashing you have two options:
|
|
|
|
Flash by setting up the IDE and re-compiling and programming. If you are a developer and plan to contribute this method is what you should use.
|
|
|
|
You may also flash the `.bin` file directly from STM32CubeProgrammer. If you are not a developer and just wish to get the code to the BluePill, use this (as development environment setup can be a bit tricky!)
|
|
|
|
### Using STLink v2 (prefered)
|
|
|
|
0. Remove SD Card
|
|
0. Make sure the STLink is up to date - [Latest Firmware](https://my.st.com/content/my_st_com/en/products/development-tools/software-development-tools/stm32-software-development-tools/stm32-programmers/stsw-link007.license=1610785194992.product=STSW-LINK007.version=2.37.26.html)
|
|
1. Connect pins `SWDIO`(2), `GND`(4), `SWCLK`(6), and `3.3v`(8) from the programmer to the Blue Pill. NOTE: These are not the same as Serial ports.
|
|
1. Using Arduino Studio Select Tools -> Upload Method -> STLink.
|
|
1. You should see the LED PC_13 flashing indicating no SD Card detected.
|
|
1. Insert SD Card, boot on your favorite Mac!
|
|
|
|
#### Trouble Shooting
|
|
|
|
If the device is not detected you may need to hold reset, click program, once it is detected release reset.
|
|
|
|
If you are unable to get the device in DFU mode for programming you may need to use [STM32CubeProgrammer](https://www.st.com/en/development-tools/stm32cubeprog.html) to erase the chip.
|
|
|
|
### Using UART Serial
|
|
|
|
I used these - but any USB->TTL device should work https://www.amazon.com/gp/product/B07D6LLX19/
|
|
|
|
0. Remove SD Card if you have one installed.
|
|
1. Set the BOOT0 jumper to 1
|
|
1. Connect to your UART flashing device via the debug pins, then connect to your computer.
|
|
1. Click the reset button on the BluePill to reset and enter programming mode.
|
|
1. In Arduino Studio click Upload
|
|
- Note you may have to click Upload more than once, or try restarting more than once.
|
|
1. You should see the LED flashing if you have no SD Card.
|
|
1. Unplug UART device.
|
|
1. Set the BOOT0 jumper to 0
|
|
1. Insert SD Card, boot on your favorite Mac!
|
|
|
|
### Using USB HID
|
|
|
|
Note: I have not been able to get this method to work.
|
|
|
|
## Making Gerber files
|
|
|
|
https://support.jlcpcb.com/article/44-how-to-export-kicad-pcb-to-gerber-files
|