1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-10-31 02:04:48 +00:00
CLK/Machines/Electron/Plus3.hpp
Thomas Harte 685a80f95b Ensures the Electron Plus 3 properly announces drives to an activity observer.
Does away with lazy allocation as not all that helpful, and liable to cause complexity.
2018-06-18 21:49:57 -04:00

39 lines
808 B
C++

//
// Plus3.hpp
// Clock Signal
//
// Created by Thomas Harte on 25/09/2016.
// Copyright 2016 Thomas Harte. All rights reserved.
//
#ifndef Plus3_hpp
#define Plus3_hpp
#include "../../Components/1770/1770.hpp"
#include "../../Activity/Observer.hpp"
namespace Electron {
class Plus3 : public WD::WD1770 {
public:
Plus3();
void set_disk(std::shared_ptr<Storage::Disk::Disk> disk, size_t drive);
void set_control_register(uint8_t control);
void set_activity_observer(Activity::Observer *observer);
private:
void set_control_register(uint8_t control, uint8_t changes);
std::vector<std::shared_ptr<Storage::Disk::Drive>> drives_;
int selected_drive_ = 0;
uint8_t last_control_ = 0;
void set_motor_on(bool on);
std::string drive_name(size_t drive);
};
}
#endif /* Plus3_hpp */