I'm always surprised when someone is found to be using old old old or any old SD cards.
@Cluso99 - Isn't it only SD cards that use byte addressing? From SDHC on they used block addressing.
No. SDHC cards originally were byte addressing. It was the v2 spec. I identified SDHC sector mode as v3 but it is IIRC v2.1.
Anyway, I removed support for the older byte addressing cards from my P2 software drivers a few months ago.
@Tubular,
SDXC are backwards compatible with SDHC (sector addressing) although they are often/always originally formatted as exFAT and my drivers require FAT32. Note: P2 ROM can boot from exFAT cards, but can only load from the Boot or Vol sectors as it does not actually recognise exFAT (see the P2 ROM SD Boot writeup/thread).
Don't forget that TAQOZ can format SDHC/SDXC cards in FAT32 with the required hidden partition and in whatever cluster size you spec, but normally 32kB/cluster.
I haven't updated this in a long time. I posted code to my RetroBlade2 thread a long time ago with the latest code but missed doing it here.
There are some bugs and I've had to revert to this version each time because I haven't had sufficient time to find the problems in my later versions.
So here is OS228c that goes back to 2020-11-28. It's a bit of a mess, but it will do DIR of the SD card.
You will need to use FlexProp - I used v5.2.0 today
This is also the basis of my Z80/CPM for P2 which also works. You can run MSBASIC
I've found the cause of the error(s) - now to find the fix
When I have two instances of FAT32, the second one locks when used. With a minor change I have DIR working now.
So, when I converted FAT32 to use my SD_DRIV driver, rather than the ROM driver, I removed/adjusted the vars. I probably have something in a DAT that needs to be in a VAR, and now all I need to do is find it/them.
If I get a chance today, I'll strip out the other code so that only one instance of FAT32 is used and I'll post this version. Otherwise it will likely be a week before I get another chance.
Comments
Pretty sure? Be certain and check it on your P2 board like I said, it'll only take less than a minute to do so.
(wondering whether this may explain anything since most of my testing has been with SDXC cards)
@Cluso99 - Isn't it only SD cards that use byte addressing? From SDHC on they used block addressing.
Anyway, I removed support for the older byte addressing cards from my P2 software drivers a few months ago.
@Tubular,
SDXC are backwards compatible with SDHC (sector addressing) although they are often/always originally formatted as exFAT and my drivers require FAT32. Note: P2 ROM can boot from exFAT cards, but can only load from the Boot or Vol sectors as it does not actually recognise exFAT (see the P2 ROM SD Boot writeup/thread).
I haven't updated this in a long time. I posted code to my RetroBlade2 thread a long time ago with the latest code but missed doing it here.
There are some bugs and I've had to revert to this version each time because I haven't had sufficient time to find the problems in my later versions.
So here is OS228c that goes back to 2020-11-28. It's a bit of a mess, but it will do DIR of the SD card.
You will need to use FlexProp - I used v5.2.0 today
This is also the basis of my Z80/CPM for P2 which also works. You can run MSBASIC
There is more info here
https://forums.parallax.com/discussion/comment/1512317/#Comment_1512317
I've found the cause of the error(s) - now to find the fix
When I have two instances of FAT32, the second one locks when used. With a minor change I have DIR working now.
So, when I converted FAT32 to use my SD_DRIV driver, rather than the ROM driver, I removed/adjusted the vars. I probably have something in a DAT that needs to be in a VAR, and now all I need to do is find it/them.
If I get a chance today, I'll strip out the other code so that only one instance of FAT32 is used and I'll post this version. Otherwise it will likely be a week before I get another chance.
Here is a sample. I've used the commands VER, DIR, LS, LS a
I have now released an official version here
https://forums.parallax.com/discussion/173395/clusos-propeller-os-v2-38-includes-sd-driver-and-fat32-object-plus-serial-driver