1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-12-11 15:49:38 +00:00

Improve comments.

This commit is contained in:
Thomas Harte 2024-12-07 09:32:45 -06:00
parent 590bd934c0
commit a128247ef5

View File

@ -19,15 +19,15 @@ using namespace Storage::Disk;
D64::D64(const std::string &file_name) : D64::D64(const std::string &file_name) :
file_(file_name) { file_(file_name) {
// in D64, this is it for validation without imposing potential false-negative tests: check that // In D64, this is it for validation without imposing potential false-negative tests: check that
// the file size appears to be correct. Stone-age stuff. // the file size appears to be correct. Stone-age stuff.
if(file_.stats().st_size != 174848 && file_.stats().st_size != 196608) if(file_.stats().st_size != 174848 && file_.stats().st_size != 196608)
throw Error::InvalidFormat; throw Error::InvalidFormat;
number_of_tracks_ = (file_.stats().st_size == 174848) ? 35 : 40; number_of_tracks_ = (file_.stats().st_size == 174848) ? 35 : 40;
// then, ostensibly, this is a valid file. Hmmm. Pick a disk ID as a function of the file_name, // Then, ostensibly, this is a valid file. Pick a disk ID as a
// being the most stable thing available // function of the file_name, being the most stable thing available.
disk_id_ = 0; disk_id_ = 0;
for(const auto &character: file_name) { for(const auto &character: file_name) {
disk_id_ ^= character; disk_id_ ^= character;