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
|
|
|
//
|
|
|
|
|
2024-01-17 04:34:46 +00:00
|
|
|
#pragma once
|
2016-07-05 17:28:27 +00:00
|
|
|
|
2023-05-10 21:02:18 +00:00
|
|
|
namespace Commodore::C1540 {
|
2018-07-11 00:00:46 +00:00
|
|
|
|
|
|
|
/// 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
|
|
|
|
2023-05-10 21:02:18 +00:00
|
|
|
namespace Commodore::C1540 {
|
2016-07-05 20:39:18 +00:00
|
|
|
|
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:
|
2021-06-04 01:55:59 +00:00
|
|
|
static ROM::Request rom_request(Personality personality);
|
|
|
|
Machine(Personality personality, const ROM::Map &roms);
|
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
|
|
|
};
|
|
|
|
|
|
|
|
}
|