I already fixed that in my CPLD-sources
As the operating system FLEX expects Disk I/O to be blocking and isn't able to anything while reading/writing, that's not much of a problem
. I still think about that as an "nice to have" which I can do later.
I have thrown away my old approach to map 256 byte sectors to 512 byte sectors. The main reason for this was performance, because writing a single sector using this method meant moving 1280 bytes, reading also moves 768 bytes. Since disk space is VERY cheap, even on CF cards (0.3 eurocent/MB) I now use simple 8bit transfers (I had the smart sense to design a configuration register into the CPLD to switch between modes) and just write 256 byte sectors (as some of you suggested many times, a dmittedly). By doing that, I get a performance 3-5 times higher for the expense of 5 eurocents a 16MB drive .. I think thats a nice deal
. And .. no filesystem crushing problems anymore .. its working perfectly now (of course I still have to include some error handling for safety reasons). Speed is also very acceptable for me.