2016-07-05 17:28:27 +00:00
|
|
|
//
|
|
|
|
// Commodore1540.hpp
|
|
|
|
// Clock Signal
|
|
|
|
//
|
|
|
|
// Created by Thomas Harte on 05/07/2016.
|
|
|
|
// Copyright © 2016 Thomas Harte. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef Commodore1540_hpp
|
|
|
|
#define Commodore1540_hpp
|
|
|
|
|
2016-07-05 21:27:02 +00:00
|
|
|
#include "../SerialBus.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-09-05 00:58:00 +00:00
|
|
|
class Machine: public MachineBase {
|
2016-07-05 20:39:18 +00:00
|
|
|
public:
|
2016-07-10 11:46:20 +00:00
|
|
|
/*!
|
2017-09-05 00:58:00 +00:00
|
|
|
Sets the ROM image to use for this drive; it is asserted that the buffer provided is 16 kb in size.
|
2016-07-10 11:46:20 +00:00
|
|
|
*/
|
2017-07-16 17:54:07 +00:00
|
|
|
void set_rom(const std::vector<uint8_t> &rom);
|
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 */
|