Protocol and feature improvements, prepare for future extensions #1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi,
More than a pull request, this is more a basis for discussion about the evolution of the SD-drive firmware and protocol, as I think we are the only two people actively maintaining it.
I'm finishing a port of CP/M-65 to the KIM-1 with the SD-Shield, which includes an image manipulation utility. While working on it, I missed some functionality that wasn't present or did not work well in the current firmware. I've added this new functionality with backwards compatibility in mind, so a host can query for the new features and work gracefully with older or newer versions. The list of changes is:
*As we can't rely on the older PC_GET_VERSION function and also calling unknown commands produces a deadlock in versions 1.X, I've bumped the PROTOCOL_VERSION to 2, so it is possible to use the undocumented PR_VERSION_INFO command to distinguish between older and newer firmware.
*Implement new commands for managing disk images: PC_FORMAT, PC_COPY, PC_RENAME, PC_ERASE.
I know it is a large patch. I can try to break it up if that eases the discussion.
Cheers,