2020-01-15 03:23:00 +00:00
|
|
|
//
|
|
|
|
// BD500.hpp
|
|
|
|
// Clock Signal
|
|
|
|
//
|
|
|
|
// Created by Thomas Harte on 14/01/2020.
|
|
|
|
// Copyright © 2020 Thomas Harte. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef BD500_hpp
|
|
|
|
#define BD500_hpp
|
|
|
|
|
|
|
|
#include "../../Components/1770/1770.hpp"
|
|
|
|
#include "../../Activity/Observer.hpp"
|
|
|
|
#include "DiskController.hpp"
|
|
|
|
|
|
|
|
#include <array>
|
|
|
|
#include <memory>
|
|
|
|
|
|
|
|
namespace Oric {
|
|
|
|
|
2020-01-15 04:15:27 +00:00
|
|
|
class BD500: public DiskController {
|
|
|
|
public:
|
|
|
|
BD500();
|
|
|
|
|
|
|
|
void write(int address, uint8_t value);
|
|
|
|
uint8_t read(int address);
|
|
|
|
|
2020-01-15 04:45:36 +00:00
|
|
|
void run_for(const Cycles cycles);
|
|
|
|
|
2020-01-16 04:39:15 +00:00
|
|
|
void set_activity_observer(Activity::Observer *observer);
|
|
|
|
|
2020-01-15 04:15:27 +00:00
|
|
|
private:
|
|
|
|
void set_head_load_request(bool head_load) final;
|
2020-01-15 04:45:36 +00:00
|
|
|
bool is_loading_head_ = false;
|
2020-01-16 04:39:15 +00:00
|
|
|
Activity::Observer *observer_ = nullptr;
|
2020-01-16 04:15:39 +00:00
|
|
|
|
|
|
|
void access(int address);
|
2020-01-16 04:39:15 +00:00
|
|
|
void set_head_loaded(bool loaded);
|
2020-01-15 04:15:27 +00:00
|
|
|
};
|
|
|
|
|
2020-01-15 03:23:00 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* BD500_hpp */
|