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