1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-12-27 01:31:42 +00:00
CLK/Machines/Oric/Microdisc.hpp

52 lines
1.0 KiB
C++

//
// Microdisc.hpp
// Clock Signal
//
// Created by Thomas Harte on 22/11/2016.
// Copyright 2016 Thomas Harte. All rights reserved.
//
#ifndef Microdisc_hpp
#define Microdisc_hpp
#include "../../Components/1770/1770.hpp"
#include "../../Activity/Observer.hpp"
#include <array>
#include "DiskController.hpp"
namespace Oric {
class Microdisc: public DiskController {
public:
Microdisc();
void set_control_register(uint8_t control);
uint8_t get_interrupt_request_register();
uint8_t get_data_request_register();
bool get_interrupt_request_line();
void run_for(const Cycles cycles);
void set_activity_observer(Activity::Observer *observer);
private:
void set_head_load_request(bool head_load) final;
void set_control_register(uint8_t control, uint8_t changes);
uint8_t last_control_ = 0;
bool irq_enable_ = false;
Cycles::IntType head_load_request_counter_ = -1;
bool head_load_request_ = false;
Activity::Observer *observer_ = nullptr;
std::string drive_name(size_t index);
};
}
#endif /* Microdisc_hpp */