1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-05 06:05:27 +00:00
CLK/Machines/Oric/Microdisc.hpp
Thomas Harte aac3d27c10 Adds activity indicators for the BD-500 and Jasmin.
Also slightly cleans up DiskController a little further.
2020-01-15 23:39:15 -05:00

48 lines
998 B
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 "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;
};
}
#endif /* Microdisc_hpp */