1
0
mirror of https://github.com/TomHarte/CLK.git synced 2025-02-27 15:29:34 +00:00

Adds drives to the FDC.

This commit is contained in:
Thomas Harte 2019-10-26 22:39:11 -04:00
parent e89be6249d
commit 36a9a5288b
2 changed files with 17 additions and 2 deletions

View File

@ -12,7 +12,7 @@
using namespace Atari::ST;
DMAController::DMAController() : fdc_(WD::WD1770::P1772) {
DMAController::DMAController() {
}
uint16_t DMAController::read(int address) {

View File

@ -10,6 +10,8 @@
#define DMAController_hpp
#include <cstdint>
#include <vector>
#include "../../ClockReceiver/ClockReceiver.hpp"
#include "../../Components/1770/1770.hpp"
@ -26,7 +28,20 @@ class DMAController {
private:
HalfCycles running_time_;
WD::WD1770 fdc_;
struct WD1772: public WD::WD1770 {
WD1772(): WD::WD1770(WD::WD1770::P1772) {
drives_.emplace_back(new Storage::Disk::Drive(8000000, 300, 2));
drives_.emplace_back(new Storage::Disk::Drive(8000000, 300, 2));
set_drive(drives_[0]);
}
void set_motor_on(bool motor_on) final {
drives_[0]->set_motor_on(motor_on);
drives_[1]->set_motor_on(motor_on);
}
std::vector<std::shared_ptr<Storage::Disk::Drive>> drives_;
} fdc_;
uint16_t control_ = 0;
uint32_t address_ = 0;