2018-04-24 05:11:31 +00:00
|
|
|
//
|
|
|
|
// DiskII.hpp
|
|
|
|
// Clock Signal
|
|
|
|
//
|
|
|
|
// Created by Thomas Harte on 23/04/2018.
|
2018-05-13 19:19:52 +00:00
|
|
|
// Copyright 2018 Thomas Harte. All rights reserved.
|
2018-04-24 05:11:31 +00:00
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef DiskIICard_hpp
|
|
|
|
#define DiskIICard_hpp
|
|
|
|
|
|
|
|
#include "Card.hpp"
|
2019-05-03 22:14:10 +00:00
|
|
|
#include "../../ROMMachine.hpp"
|
2018-04-25 02:44:45 +00:00
|
|
|
|
2019-05-03 22:14:10 +00:00
|
|
|
#include "../../../Components/DiskII/DiskII.hpp"
|
|
|
|
#include "../../../Storage/Disk/Disk.hpp"
|
|
|
|
#include "../../../ClockReceiver/ClockingHintSource.hpp"
|
2018-04-24 05:11:31 +00:00
|
|
|
|
|
|
|
#include <cstdint>
|
2018-04-25 02:44:45 +00:00
|
|
|
#include <memory>
|
2018-04-24 05:11:31 +00:00
|
|
|
#include <vector>
|
|
|
|
|
2019-05-03 22:14:10 +00:00
|
|
|
namespace Apple {
|
|
|
|
namespace II {
|
2018-04-24 05:11:31 +00:00
|
|
|
|
2018-05-28 03:17:06 +00:00
|
|
|
class DiskIICard: public Card, public ClockingHint::Observer {
|
2018-04-24 05:11:31 +00:00
|
|
|
public:
|
2021-06-04 01:55:59 +00:00
|
|
|
static ROM::Request rom_request(bool is_16_sector);
|
|
|
|
DiskIICard(ROM::Map &, bool is_16_sector);
|
2018-05-11 02:17:13 +00:00
|
|
|
|
2020-01-24 03:57:51 +00:00
|
|
|
void perform_bus_operation(Select select, bool is_read, uint16_t address, uint8_t *value) final;
|
|
|
|
void run_for(Cycles cycles, int stretches) final;
|
2018-05-22 00:54:53 +00:00
|
|
|
|
2020-01-24 03:57:51 +00:00
|
|
|
void set_activity_observer(Activity::Observer *observer) final;
|
2018-05-11 02:17:13 +00:00
|
|
|
|
2018-04-25 02:44:45 +00:00
|
|
|
void set_disk(const std::shared_ptr<Storage::Disk::Disk> &disk, int drive);
|
2018-06-09 16:51:53 +00:00
|
|
|
Storage::Disk::Drive &get_drive(int drive);
|
2018-04-24 05:11:31 +00:00
|
|
|
|
|
|
|
private:
|
2020-01-24 03:57:51 +00:00
|
|
|
void set_component_prefers_clocking(ClockingHint::Source *component, ClockingHint::Preference clocking) final;
|
2018-04-24 05:11:31 +00:00
|
|
|
std::vector<uint8_t> boot_;
|
|
|
|
Apple::DiskII diskii_;
|
2018-05-28 03:17:06 +00:00
|
|
|
ClockingHint::Preference diskii_clocking_preference_ = ClockingHint::Preference::RealTime;
|
2018-04-24 05:11:31 +00:00
|
|
|
};
|
|
|
|
|
2019-05-03 22:14:10 +00:00
|
|
|
}
|
2018-04-24 05:11:31 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* DiskIICard_hpp */
|