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

45 lines
939 B
C++
Raw Normal View History

//
// Microdisc.hpp
// Clock Signal
//
// Created by Thomas Harte on 22/11/2016.
// Copyright 2016 Thomas Harte. All rights reserved.
//
#pragma once
#include "../../Components/1770/1770.hpp"
2018-05-12 03:05:36 +00:00
#include "../../Activity/Observer.hpp"
#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);
2018-05-12 03:05:36 +00:00
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;
2018-05-12 03:05:36 +00:00
bool head_load_request_ = false;
2018-05-12 03:05:36 +00:00
Activity::Observer *observer_ = nullptr;
};
}