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
|
|
|
//
|
|
|
|
|
2024-01-17 04:34:46 +00:00
|
|
|
#pragma once
|
2018-04-24 05:11:31 +00:00
|
|
|
|
|
|
|
#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>
|
|
|
|
|
2023-05-10 21:02:18 +00:00
|
|
|
namespace Apple::II {
|
2018-04-24 05:11:31 +00:00
|
|
|
|
2018-05-28 03:17:06 +00:00
|
|
|
class DiskIICard: public Card, public ClockingHint::Observer {
|
2024-12-02 02:44:14 +00:00
|
|
|
public:
|
|
|
|
static ROM::Request rom_request(bool is_16_sector);
|
|
|
|
DiskIICard(ROM::Map &, bool is_16_sector);
|
2018-05-11 02:17:13 +00:00
|
|
|
|
2024-12-02 02:44:14 +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
|
|
|
|
2024-12-02 02:44:14 +00:00
|
|
|
void set_activity_observer(Activity::Observer *observer) final;
|
2018-05-11 02:17:13 +00:00
|
|
|
|
2024-12-02 02:44:14 +00:00
|
|
|
void set_disk(const std::shared_ptr<Storage::Disk::Disk> &disk, int drive);
|
|
|
|
Storage::Disk::Drive &get_drive(int drive);
|
2018-04-24 05:11:31 +00:00
|
|
|
|
2024-12-02 02:44:14 +00:00
|
|
|
private:
|
|
|
|
void set_component_prefers_clocking(ClockingHint::Source *component, ClockingHint::Preference clocking) final;
|
|
|
|
std::vector<uint8_t> boot_;
|
|
|
|
Apple::DiskII diskii_;
|
|
|
|
ClockingHint::Preference diskii_clocking_preference_ = ClockingHint::Preference::RealTime;
|
2018-04-24 05:11:31 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|