17 Commits

Author SHA1 Message Date
Patrik Axelsson
d56fbaaaf4 Discard undefined byte at end of write multiple block
This byte needs to be read before the card goes busy, but more importantly,
it would otherwise be read out by sd_wait_ready():

For cards where this byte is 0xff, sd_wait_ready() would think the card is
immediately ready and let the code send it the next command, while the read
actually made the card go busy.

This makes the card end up in a state the code cannot recover it from - even
if you reboot the machine so spisd.device is restarted, it still requires
the card to be power cycled by ejecting and re-inserting it.

How to reproduce for affected cards:
1. Use spisd.device v2.2
2. Mount SD0:
3. Write a file larger than 512Bytes to trigger a write multiple block
4. Write or read another file, this will trigger the next command and show
   the issue as a read or write error
2023-08-30 16:56:48 +02:00
Stefan
a8488355cb Fixed option
vbcc uses -O + number only
2023-03-15 14:13:28 +01:00
Patrik Axelsson
e9278dcc7a Move version string related values to defines in one file v2.2 2023-03-09 00:46:14 +01:00
Patrik Axelsson
c64fc9f5a3 Bump version string to match next repo tag 2023-03-09 00:46:14 +01:00
Patrik Axelsson
dadaab55d8 Fix size calculation for 32GB+ SD cards 2023-03-09 00:46:14 +01:00
Patrik Axelsson
4ed29c88d6 Report a sane geometry for the CHS part 2023-03-09 00:46:14 +01:00
Patrik Axelsson
14b7884aef Do not lock up SD card on read/writes of zero size
This is for example triggered by Check4GB when it attempts to TD64
capabilities in the device.
2023-03-09 00:46:14 +01:00
Patrik Axelsson
dc0f8cb0cd Add NSD and TD64 command support for 4GB+ SD cards 2023-03-09 00:46:14 +01:00
Patrik Axelsson
6cd50a311a Use NDK 3.2 headers also with kick13 target
This avoids pasting a lot from the NDK includes into the source.

If you want to avoid const warnings for some functions like
exec.library/RawDoFmt(), also use the m68k-amigaos VBCC target headers,
which also enables you to write mixed 1.3/2.0+ code where you can call
2.0+ functions if needed.
2023-03-09 00:46:14 +01:00
Patrik Axelsson
0ae311f713 Fix version and missing include 2023-03-09 00:46:14 +01:00
Niklas Ekström
e377afae11 Add support for RP2040 microcontroller 2022-10-18 10:40:41 +02:00
Nicolas Baumgardt
30736877bd Update spi_low.asm
There were read/write issues on A3000(D) and A4000(D) machines before
this change.
v2.1
2022-08-31 21:43:06 +02:00
Niklas Ekström
f7493de0b0 Revert pin assignment of BUSY and POUT signals
The assignment of the BUSY and POUT pins to the microcontroller had
changed from the previous version to the new version. User amigos500 on
the a1k forum noted that if the assignment of those two pins had not
changed, then it would be easier to patch an old PCB to work with
the updated design.

After testing, it seems that the old pin assignment of BUSY and POUT
works equally well with the updated design, and I therefore reverted
the assignment back.
v2.0
2021-07-22 21:48:59 +02:00
Niklas Ekström
27d6ad85fa Update README and assembly instructions 2021-07-20 19:21:29 +02:00
Niklas Ekström
e766d41e37 Add support for eject/insert sd card 2021-07-20 19:21:24 +02:00
Niklas Ekström
285569663b Added comments stating when the code was written v1.0 2020-06-05 17:13:51 +02:00
Niklas Ekström
a7a9350ba2 Initial commit of the project 2020-05-03 17:32:56 +02:00