2016-07-05 17:28:27 +00:00
|
|
|
//
|
|
|
|
// Commodore1540.hpp
|
|
|
|
// Clock Signal
|
|
|
|
//
|
|
|
|
// Created by Thomas Harte on 05/07/2016.
|
2018-05-13 19:19:52 +00:00
|
|
|
// Copyright 2016 Thomas Harte. All rights reserved.
|
2016-07-05 17:28:27 +00:00
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef Commodore1540_hpp
|
|
|
|
#define Commodore1540_hpp
|
|
|
|
|
2018-07-11 00:00:46 +00:00
|
|
|
namespace Commodore {
|
|
|
|
namespace C1540 {
|
|
|
|
|
|
|
|
/// Defines the type of drive this 1540 hardware is configured as.
|
|
|
|
enum class Personality {
|
|
|
|
C1540,
|
|
|
|
C1541
|
|
|
|
};
|
|
|
|
|
|
|
|
/*
|
|
|
|
Implementation note: this is defined up here so that it precedes
|
|
|
|
C1540Base.hpp below. The alternative option was to factor it out,
|
|
|
|
but the whole point of the C1540.hpp/C1540Base.hpp split is supposed
|
|
|
|
to be to create a single file of public interface.
|
|
|
|
*/
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-07-05 21:27:02 +00:00
|
|
|
#include "../SerialBus.hpp"
|
2017-11-08 02:19:51 +00:00
|
|
|
#include "../../ROMMachine.hpp"
|
2016-07-10 20:24:46 +00:00
|
|
|
#include "../../../Storage/Disk/Disk.hpp"
|
2017-09-05 00:58:00 +00:00
|
|
|
#include "Implementation/C1540Base.hpp"
|
2016-07-10 20:24:46 +00:00
|
|
|
|
2016-07-05 20:39:18 +00:00
|
|
|
namespace Commodore {
|
|
|
|
namespace C1540 {
|
|
|
|
|
2016-07-10 11:46:20 +00:00
|
|
|
/*!
|
|
|
|
Provides an emulation of the C1540.
|
|
|
|
*/
|
2020-05-30 04:37:06 +00:00
|
|
|
class Machine final: public MachineBase {
|
2016-07-05 20:39:18 +00:00
|
|
|
public:
|
2018-07-11 00:00:46 +00:00
|
|
|
Machine(Personality personality, const ROMMachine::ROMFetcher &rom_fetcher);
|
2016-07-10 11:46:20 +00:00
|
|
|
|
|
|
|
/*!
|
|
|
|
Sets the serial bus to which this drive should attach itself.
|
|
|
|
*/
|
2016-07-05 21:27:02 +00:00
|
|
|
void set_serial_bus(std::shared_ptr<::Commodore::Serial::Bus> serial_bus);
|
2016-07-05 20:39:18 +00:00
|
|
|
|
2017-09-05 00:58:00 +00:00
|
|
|
/// Advances time.
|
2017-07-28 02:05:29 +00:00
|
|
|
void run_for(const Cycles cycles);
|
2016-08-01 08:25:11 +00:00
|
|
|
|
2017-09-05 00:58:00 +00:00
|
|
|
/// Inserts @c disk into the drive.
|
|
|
|
void set_disk(std::shared_ptr<Storage::Disk::Disk> disk);
|
2016-07-05 20:39:18 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
2016-07-05 17:28:27 +00:00
|
|
|
|
|
|
|
#endif /* Commodore1540_hpp */
|