freitz85 / AppleIISd

SD card based ProFile replacement for IIe
70 stars 19 forks source link

Waiting for card ready #1

Closed vldmrrr closed 4 years ago

vldmrrr commented 6 years ago

Hello,

I made a card following your design on a prototype board. My card was having multiple problems when with initializing and reading cards so I was never able to boot prodos completely on my ROM 1 gs.

After some debugging I found that data send some time gets garbled by starting new transfer when previous one has not completed yet.

Also conparing with FatFS code for SD SPI I found they are waiting for card to be ready before sending read command.

I added checking of transfer compete on each send, and waiting for card ready for every command (except the very first one on init). Maybe that is an overkill, but at least this made my card able to init both v.1 and v.2 SD cards, and boot and work with prodos more or less reliably. I still can not boot gs/os though.

Take a look at pull request, maybe you would like to merge some or all of the changes into your code.

Thanks

freitz85 commented 4 years ago

Issue is outdated as code has been changed multiple times