2016-11-22 00:12:53 +00:00
|
|
|
//
|
|
|
|
// Microdisc.hpp
|
|
|
|
// Clock Signal
|
|
|
|
//
|
|
|
|
// Created by Thomas Harte on 22/11/2016.
|
2018-05-13 19:19:52 +00:00
|
|
|
// Copyright 2016 Thomas Harte. All rights reserved.
|
2016-11-22 00:12:53 +00:00
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef Microdisc_hpp
|
|
|
|
#define Microdisc_hpp
|
|
|
|
|
|
|
|
#include "../../Components/1770/1770.hpp"
|
2018-05-12 03:05:36 +00:00
|
|
|
#include "../../Activity/Observer.hpp"
|
2020-01-15 03:23:00 +00:00
|
|
|
#include "DiskController.hpp"
|
2016-11-22 00:12:53 +00:00
|
|
|
|
|
|
|
namespace Oric {
|
|
|
|
|
2020-01-15 03:53:27 +00:00
|
|
|
class Microdisc: public DiskController {
|
2016-11-22 00:12:53 +00:00
|
|
|
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();
|
|
|
|
|
2017-07-28 02:05:29 +00:00
|
|
|
void run_for(const Cycles cycles);
|
2016-12-02 02:13:16 +00:00
|
|
|
|
2018-05-12 03:05:36 +00:00
|
|
|
void set_activity_observer(Activity::Observer *observer);
|
|
|
|
|
2016-11-22 00:12:53 +00:00
|
|
|
private:
|
2020-01-15 03:53:27 +00:00
|
|
|
void set_head_load_request(bool head_load) final;
|
2018-05-28 03:17:06 +00:00
|
|
|
|
2020-01-15 03:53:27 +00:00
|
|
|
void set_control_register(uint8_t control, uint8_t changes);
|
|
|
|
uint8_t last_control_ = 0;
|
2017-11-11 03:20:44 +00:00
|
|
|
bool irq_enable_ = false;
|
2020-01-15 03:53:27 +00:00
|
|
|
|
2019-10-30 02:36:29 +00:00
|
|
|
Cycles::IntType head_load_request_counter_ = -1;
|
2018-05-12 03:05:36 +00:00
|
|
|
bool head_load_request_ = false;
|
2020-01-15 03:53:27 +00:00
|
|
|
|
2018-05-12 03:05:36 +00:00
|
|
|
Activity::Observer *observer_ = nullptr;
|
2016-11-22 00:12:53 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* Microdisc_hpp */
|