jbilander / sdbox

A parallel to sd-card project for the Amiga
GNU General Public License v3.0
94 stars 14 forks source link

Not an SDBox V2 Not playing nice with 3000D #18

Open DegeRandolf opened 1 year ago

DegeRandolf commented 1 year ago

Hi, I have an SDBox V2 installed on my Amiga 500 and 4000. I installed the exact same software on my 3000. The 3000 just has OS3.2 installed and working properly. I also ran the CIA tests with Amiga Test Kit and all passed. For the life of me I cannot get the 3000 to see the SDbox. I have checked and double checked that the same files (and versions) are in the same locations as the 500 and 4000. When I move the box from the 500 or 4000, the 3000 does not see it. (powering down and back up of course).

The only difference that I know of is the 3000 is using a zuluscsi SD on the scsi controller of the 3000. It does have the new 3660 card installed in it but I have the MMU libraries installed as well. I tried putting the mountlist in the SD0: icon with no success. I'm at a loss as to what my next step would be. Any help would be appreciated!

jbilander commented 1 year ago

Hi,

This question should maybe have been better asked in the SDBox-v2 repository but anyway...yes the A3000 can be a difficult lady. Make sure you use the latest spisd.device for V2, Build from source or you can download from here: https://github.com/niklasekstrom/amiga-par-to-spi-adapter/releases @salocinx fixed a bug that were causing problem in A3000 some time ago.

Also @salocinx reported he saw problems with the A3000 until he put 4.7k pull-up resistors (resistor packs) on the control and data lines (D0-D7,ACK,BUSY,POUT,SELECT). It can be worth trying if it still doesn't work for you.

Also for troubleshooting it can be good to know that the E-CLK behaves differently on machines with Fat Gary (A3000/A4000): http://megaburken.net/~patrik/A3000/390540-02_Gary_specification.pdf

ECLK_A3000

salocinx commented 1 year ago

Yes, pull-up resistors should solve your issue on the A3000D. I am using 10K resistors connecting the parallel port lines to the 5V rail. Resistor arrays in SIP package come in handy for this purpose.

DegeRandolf commented 1 year ago

Thanks all for the comments. Looks like I have some soldering chores to do. Salocinx, are you talking just about the SDbox or did you modify the parallel port on the MB? I'm assuming the SDbox but I wanted to clarify.

salocinx commented 1 year ago

@DegeRandolf : Yes, only on the SDBox itself. If I remember correctly, it's important to pull-up the data lines D0-D7, but when your soldering iron is hot anyways, I would pull-up the control lines as well. I suggest to use 10K resistor arrays in SIP package, the fit quite well to the pins on the connector. Then solder a cable at the marked position of the DIP resistor array somewhere to a 5V point on your SDBox.

salocinx commented 1 year ago

@DegeRandolf :

These signals are all on the upper row of the male DB25 connector. You can leave the lower row of the DB25 connector as it is.

DegeRandolf commented 1 year ago

Nicolas,

Thanks for guidance!. I’ve ordered the 10K resistor arrays and I’ve marked the pins I’m going to solder to. I’m thinking the easiest place to run the 5v wire to the arrays will be directly from the power port. Excited to see if I can get it working. In the meantime I had an old Highway USB card I stuck in and got up and running. It provides me what I was looking for in the SDbox; a way to transfer large files easily to my 3000. Still, I am going to see if I can get this SDBox up and working on my 3000. A question though. Will this affect how it works on the 4000 and 500? It’s not a show stopper, I have two, but it would be nice to interchangeably use either. Thanks again for your help.

Randy

From: Nicolas Baumgardt @.> Sent: Tuesday, May 16, 2023 9:21 AM To: jbilander/sdbox @.> Cc: DegeRandolf @.>; Mention @.> Subject: Re: [jbilander/sdbox] Not an SDBox V2 Not playing nice with 3000D (Issue #18)

@DegeRandolf https://github.com/DegeRandolf : Yes, only on the SDBox itself. If I remember correctly, it's important to pull-up the data lines D0-D7, but when your soldering iron is hot anyways, I would pull-up the control lines as well. I suggest to use 10K resistor arrays in DIP package, the fit quite well to the pins on the connector. Then solder a cable at the marked position of the DIP resistor array somewhere to a 5V point on your SDBox.

— Reply to this email directly, https://github.com/jbilander/sdbox/issues/18#issuecomment-1549666472 view it on GitHub, or https://github.com/notifications/unsubscribe-auth/A725JN2OP6JMVP3QB73IYCDXGN5MVANCNFSM6AAAAAAYA3II2I unsubscribe. You are receiving this because you were mentioned. https://github.com/notifications/beacon/A725JN5Z3LQPR7ZXKDEB7FDXGN5MVA5CNFSM6AAAAAAYA3II2KWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTS4LYEKQ.gif Message ID: < @.> @.>

salocinx commented 1 year ago

Hi Randy

The pull-up resistors will not have any down-side to the other Amiga models. In fact, it's always good to have pull-up resistors on any parallel port device, they make the signals more stable. So go ahead and send me a picture when you are done.

Regards Nicolas

patrikaxelsson commented 1 year ago

@salocinx: noticed in the A3000D schematics that it has onboard 3.3k pullups on the control lines.

This differs between models btw - for example the A2000 has 10k instead, the A500 has 10k but is missing on BUSY and POUT, same on the A600 and A1200 but they additionally have diodes to VCC on STROBE and ACK (what could that be for?).

salocinx commented 1 year ago

@patrikaxelsson I remember having had studied the schematics as well and I also noticed the differences. However, I am no electrical engineer and therefore I am not in the position to give any professional theoretical explanation to this. But I did a lot of testing and the oscilloscope showed me very weak signals on the A3000D. I cannot find the pictures anymore, but the signals looked more like (curved) sawtooth waves instead of square waves. I then experimented with pull-ups which solved the issue and the signals became much more square wave style. I later tested the pulled-up SDBox on the other Amiga models as well and it showed great signal shapes and worked flawlessly.

However, the currently biggest issue with the SDBox is that it's very picky with different SD cards and/or brands. I cannot state that high-quality cards are better than unbranded cheap ones... I have some unbranded 4GB cards that work perfectly fine and I ordered some high-quality SanDisk 32GB cards from a reputable re-seller here and they simply don't work (r/w errors etc).

Do you have the motivation and possibly a suitable idea to improve the compatibility of MicroSD cards? I am always happy to help, with testing etc. Also, if you need an SDBox with integrated pull-ups, let me know and I send you one. Still need to put my own design to Github (will do it soon, promised, very chaotic here).

patrikaxelsson commented 1 year ago

@salocinx:

Regarding A3000D compatibility: I have a stock 030@25MHz A3000D and it does not work with the V2 SDBox I have. It does not have pull-ups and I have not tried adding any yet to see if that fixed the issue. I usually run the SDBox with my A1200.

Regarding MicroSD compatibility: I have not yet experienced a card giving me read/write errors. That doesn't really mean anything, I have not gone through a massive amount of cards and only two relative recent SanDisk cards - a 32GB Ultra and 64GB Extreme manufactured 2022. I can produce a list for you here of my collection of cards I have been using successfully:

MicroSD: Transcend MLC 410M 2GB MicroSD Transcend MLC 410M 4GB MicroSD HC I U1 A1 V10 Team 2GB MicroSD Kingstron INDUSTRIAL MicroSD HC I 8GB U3 V30 A1 SDCIT2/8GB SanDisk Extreme 64GB MicroSD XC I V30 U3 A2 Netac PRO A1 MicroSD HC I U1 V10 32GB SanDisk Ultra 32GB MicroSD HC I U1 10 A1

SD (via microSD->SD adapter): SanDisk Ultra 15MB/s 4 SD HC 4GB hama SD HC 10 4GB Transcend 10 SD HC I U1 32GB SanDisk SD Card 256MB SanDisk Ultra 15MB/s SD HC 4 8GB SanDisk Ultra 40MB/s SD HC I 10 16GB

salocinx commented 1 year ago

Interesting, thanks for your compatibility list. The latest non-working (r/w errors) MicroSD card I encountered is:

SanDisk Extreme microSD A1, microSDHC, 32 GB, U3, UHS-I

Bought from a reputable reseller.

patrikaxelsson commented 1 year ago

@salocinx: Could I perhaps buy such a card from you? One that is tested as non-working with the SDBox (r/w errors), while working without issues in a modern card reader.

salocinx commented 1 year ago

@patrikaxelsson : I am happy to send you the MicroSD card for free : ) Please send me your mailing address to amiga.workshop@gmail.com

patrikaxelsson commented 1 year ago

@salocinx: very generous! 🙏

jbilander commented 1 year ago

@patrikaxelsson One card that didn't work for me was this 4GB Intenso: https://www.reichelt.com/se/en/microsdhc-card-4-gb-intenso-intenso-msdhc4g-p83730.html I don't have it any longer unfortunately, I gave it away together with a RGBtoHDMI otherwise I would send it to you. Anyway I thought I should mention it.

Also from before all these works for me: IMG_6706

salocinx commented 1 year ago

@salocinx: very generous! 🙏

You are welcome, will post it tomorrow. Glad to have talented people interested in this project : )

patrikaxelsson commented 1 year ago

@salocinx:

Received the parcel yesterday. In addition to the 32GB SanDisk Extreme A1 card with issues on the SDBox, you had also included an additional noname 2GB card with similar issues plus an SDBox of your design with pullups on the parallel port lines, very appreciated 🙏.

Have done some initial testing:

  1. I can confirm that I get read and write errors reported by fat95 when accessing both these cards.
  2. These errors are 100% repeatable and happens on the same blocks, when you access the card in the same pattern, so I don't think it is a hardware signal problem between the AVR and the SD card, but rather some sort problem with state in the SD card or similar.
  3. These read and write errors with the above cards are identical if I test with your SDBox which has pullup resistors, instead of my own V2 which has no pullup resistors.
  4. I can confirm that your SDBox which has pullup resistors works on my A3000D (stock 030@25MHz), while my own V2 which has no pullup resistors does not work.
salocinx commented 1 year ago

@patrikaxelsson : You are welcome, I am happy it arrived. Interesting finds so far, thanks for your efforts! Let me know if I can support you anytime by testing. I have quite a lot of testing equipment and a broad Amiga collection.

patrikaxelsson commented 1 year ago

@salocinx: I have found one issue which affects both your cards and created a PR for it: https://github.com/niklasekstrom/amiga-par-to-spi-adapter/pull/9

I cannot trigger any issues with the 32GB SanDisk Extreme A1 card after applying this fix.

The 2GB noname card unfortunately card also has some other issue which I haven't been able to pinpoint, it fails at large reads (multiple read block command) sometimes when for example extracting a large lha file that is on the card to the card itself.

@jbilander: I have sourced a 4GB and 8GB class 4 Intenso card and they also suffer from this issue, but works great after the fix, cannot trigger any issues. On the topic of Intenso, I found that I had a 4GB class 10 Intenso card from before, but it is not affected by this issue.

@all: There is a test version of a spisd.device with this fix in the PR and it would be great if you could test it out, also on cards without issues so there is no regression.

jbilander commented 1 year ago

@patrikaxelsson wow, great work, many thanks for doing this. As always the devil is in the details.

salocinx commented 1 year ago

@patrikaxelsson : Great, you are a genius : D ! I will test asap and report back.

salocinx commented 1 year ago

I meanwhile did some testing with the following two MicroSD cards:

IMG_6152

The SanDisk Extreme did previously not work, the SanDisk Extreme Pro did work before. With the fix from @patrikaxelsson, now both cards work fine on all tested systems so far:

I will do further testing with more MicroSD cards and more Amiga hardware configurations as soon as I get back from my 2 week Italy road-trip : )

Many thanks Patrik, I am really enjoying the new compatibility power of your recent bug-fix!

patrikaxelsson commented 1 year ago

@salocinx: Thanks for testing the fix on so many setups!

jbilander commented 1 year ago

@patrikaxelsson Hi Patrik, if you want a Parallel_to_ESP32 device to tinker with https://github.com/jbilander/Parallel_to_ESP32 then drop me an email with your address to jorgen.bilander at gmail com, and I send one to you. I think the hardware is working, and I started making applications running on the device, an ftp-server and so on. My thinking was to make a backup-device where files easily could be copied to and from the device, PC to ESP32 and ESP32 to Amiga and vice versa. I have very limited time for this however, at the moment it's on the backburner, but let me know if you want a device to play with. I have spare PCBs. Potentially it could be made to work as an ImpBox https://github.com/AmigaPorts/ImpBox32 or something like that but I haven't looked into that.

patrikaxelsson commented 1 year ago

@DegeRandolf: As reported earlier in this thread, my original V2 SDBox without pullups did not work on my A3000, but the SDBox built by @salocinx with pullup resistors does.

However, after adding a 8x10k resistor network SIL (partno: 9A103G) as pullup to the D0-D7 pins of my original V2 SDBox, it now also works on the A3000.

The resistor network was really easy and convenient to fit, did it like this:

WB62367hTL6lhAgtjgg7Mg_thumb_3faf

@salocinx: Interestingly, I had no issues without pullup resistors on my A4000D, which also is based on Fat Gary and can access the 8520 each ECLK, see https://eab.abime.net/showthread.php?t=109284

@jbilander: Would it perhaps make sense to include pullups on the datapins in the design to make it work out of the box also on the A3000?

jbilander commented 1 year ago

@patrikaxelsson

Nice work.

Yes, if a new version is made sometime in the future it will be added, however I have currently no plans to make a new revision as I tinker with a lot of other stuff at the moment, for example a flicker-fixer PCB. On the Parallel_to_ESP32 that I made earlier I put optional pull-up resistor packs in the design as you can see here: https://github.com/jbilander/Parallel_to_ESP32/blob/main/images/Parallel_to_ESP32_pic3.png Similar could be done for SDBox-mini for example if there are enough room for it, not sure about that, on the other hand it is easy to fit a SIL-network just like you did, on v2 I guess it would be very easy to add a TH-footprint for a SIL on the main PCB as well.