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"
|
|
|
|
#include "../ROMMachine.hpp"
|
2018-04-25 02:44:45 +00:00
|
|
|
|
2018-04-24 05:11:31 +00:00
|
|
|
#include "../../Components/DiskII/DiskII.hpp"
|
2018-04-25 02:44:45 +00:00
|
|
|
#include "../../Storage/Disk/Disk.hpp"
|
2018-05-28 03:17:06 +00:00
|
|
|
#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>
|
|
|
|
|
|
|
|
namespace AppleII {
|
|
|
|
|
2018-05-28 03:17:06 +00:00
|
|
|
class DiskIICard: public Card, public ClockingHint::Observer {
|
2018-04-24 05:11:31 +00:00
|
|
|
public:
|
|
|
|
DiskIICard(const ROMMachine::ROMFetcher &rom_fetcher, bool is_16_sector);
|
2018-05-11 02:17:13 +00:00
|
|
|
|
2018-05-22 00:54:53 +00:00
|
|
|
void perform_bus_operation(Select select, bool is_read, uint16_t address, uint8_t *value) override;
|
2018-04-24 05:11:31 +00:00
|
|
|
void run_for(Cycles cycles, int stretches) override;
|
2018-05-22 00:54:53 +00:00
|
|
|
|
2018-05-11 02:17:13 +00:00
|
|
|
void set_activity_observer(Activity::Observer *observer) override;
|
|
|
|
|
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:
|
2018-05-28 03:17:06 +00:00
|
|
|
void set_component_prefers_clocking(ClockingHint::Source *component, ClockingHint::Preference clocking) override;
|
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
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* DiskIICard_hpp */
|