Despite the reservations expressed by Dave on his site, supporting SDHC cards should not be too difficult. They require a couple of extra steps in initialisation, and are then accessed by logical sector address rather than byte address. Irrespective of how they may be organised internally, they present standard 512 byte sectors to the outside world so blocking / deblocking is the same as for the CFX. I have successfully supported SDHC cards from both my Z180 project and MEMU on Pico.stephen_usher wrote: ↑04 Sep 2022 23:39 The only thing which probably needs addressing is the storage. Being limited to the original SD card specification is a headache as hardly any small SD cards exist. Also having it as raw storage limits things. Maybe a future upgrade could be to encapsulate the drive image into a file on a FAT filesystem and support the ubiquitous SDHC cards?
Accessing an arbitrary FAT file as a drive image is unlikely to ever happen. However there is one special case where it should be possible, that is if the entire image file occupies consecutive clusters on the SD card. That is likely to be the case if you write the image file to an otherwise empty SD card. I can imagine a FATMOUNT program that reads the directory to find the start of the file, then walks the FAT table to check that the file is contiguous. If it is, it then updates the CP/M drive parameter block with the start of the image file, and mounts it as a CP/M drive.
Another approach is to partition the SD card in the DOS / Windows sense. The first partition could be (for example) a 32MB partition of either type 52h (CP/M) or 7Fh (Experimental). This could then contain four 8MB CP/M drive images. Again, I have done that for my Z180 system. On booting, you read the first sector and check for it being an MBR. If so read the partition table to find the start of the partition containing the CP/M images. That gives an offset which needs to be added when accessing the drive images.
If you have done this, you can then have a second partition on the SD card which is FAT formatted and can easily be read / written from Windows. You then need a CP/M program which can copy files between the CP/M images in the first partition and the FAT partition. I have not done that for an SD card, but in the past I wrote a program that would copy files between a CP/M RAM drive and a 720KB FAT floppy in a 3.5inch SDX drive.
Any or all of the above would only require ROM upgrades to the MFX. It was thinking about this that prompted me to upgrade my Z80 assembler to support Martin's latest code. But then, as is often the way with me, I got distracted by other things.