mirror of
https://github.com/TomHarte/CLK.git
synced 2025-08-15 14:27:29 +00:00
Switched the container in which events are passed to int
, with the intention of subclasses extending the receivable range.
This commit is contained in:
@@ -20,11 +20,11 @@ MFMController::MFMController(Cycles clock_rate, int clock_rate_multiplier, int r
|
|||||||
}
|
}
|
||||||
|
|
||||||
void MFMController::process_index_hole() {
|
void MFMController::process_index_hole() {
|
||||||
posit_event(Event::IndexHole);
|
posit_event((int)Event::IndexHole);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MFMController::process_write_completed() {
|
void MFMController::process_write_completed() {
|
||||||
posit_event(Event::DataWritten);
|
posit_event((int)Event::DataWritten);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MFMController::set_is_double_density(bool is_double_density) {
|
void MFMController::set_is_double_density(bool is_double_density) {
|
||||||
@@ -107,7 +107,7 @@ void MFMController::process_input_bit(int value, unsigned int cycles_since_index
|
|||||||
if(token_type != Token::Byte) {
|
if(token_type != Token::Byte) {
|
||||||
latest_token_.type = token_type;
|
latest_token_.type = token_type;
|
||||||
bits_since_token_ = 0;
|
bits_since_token_ = 0;
|
||||||
posit_event(Event::Token);
|
posit_event((int)Event::Token);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -145,7 +145,7 @@ void MFMController::process_input_bit(int value, unsigned int cycles_since_index
|
|||||||
}
|
}
|
||||||
|
|
||||||
crc_generator_.add(latest_token_.byte_value);
|
crc_generator_.add(latest_token_.byte_value);
|
||||||
posit_event(Event::Token);
|
posit_event((int)Event::Token);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -85,7 +85,7 @@ class MFMController: public Controller {
|
|||||||
(ii) the index hole passes; or
|
(ii) the index hole passes; or
|
||||||
(iii) the queue of data to be written has been exhausted.
|
(iii) the queue of data to be written has been exhausted.
|
||||||
*/
|
*/
|
||||||
virtual void posit_event(Event type) = 0;
|
virtual void posit_event(int type) = 0;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Storage::Disk::Controller
|
// Storage::Disk::Controller
|
||||||
|
Reference in New Issue
Block a user