1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-06-25 18:30:07 +00:00

Adds mapping of READ(8) size 0 to size 256.

This commit is contained in:
Thomas Harte 2019-09-17 21:59:32 -04:00
parent ff43674638
commit 3002ac8a4a
2 changed files with 4 additions and 2 deletions

View File

@ -45,6 +45,9 @@ CommandState::ReadWrite CommandState::read_write_specs() const {
specs.address = address();
specs.number_of_blocks = number_of_blocks();
if(!specs.number_of_blocks && (data_.size() == 6)) {
specs.number_of_blocks = 256;
}
return specs;
}

View File

@ -27,8 +27,7 @@ class CommandState {
// For read and write commands.
struct ReadWrite {
uint32_t address;
uint16_t number_of_blocks;
uint32_t address, number_of_blocks;
};
ReadWrite read_write_specs() const;