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
|
|
|
|
|
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.
|
|
|
|
*/
|
2017-11-08 02:19:51 +00:00
|
|
|
class Machine: public MachineBase, public ROMMachine::Machine {
|
2016-07-05 20:39:18 +00:00
|
|
|
public:
|
2017-11-08 02:19:51 +00:00
|
|
|
enum Personality {
|
|
|
|
C1540,
|
|
|
|
C1541
|
|
|
|
};
|
|
|
|
Machine(Personality p);
|
2017-11-08 03:51:06 +00:00
|
|
|
|
2016-07-10 11:46:20 +00:00
|
|
|
/*!
|
2017-11-08 02:19:51 +00:00
|
|
|
Sets the source for this drive's ROM image.
|
2016-07-10 11:46:20 +00:00
|
|
|
*/
|
2018-04-24 03:20:14 +00:00
|
|
|
bool set_rom_fetcher(const ROMMachine::ROMFetcher &roms_with_names);
|
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);
|
2017-11-08 02:19:51 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
Personality personality_;
|
2016-07-05 20:39:18 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
2016-07-05 17:28:27 +00:00
|
|
|
|
|
|
|
#endif /* Commodore1540_hpp */
|