diff --git a/Machines/AtariST/DMAController.cpp b/Machines/AtariST/DMAController.cpp index 1b7586db3..30326178f 100644 --- a/Machines/AtariST/DMAController.cpp +++ b/Machines/AtariST/DMAController.cpp @@ -12,7 +12,7 @@ using namespace Atari::ST; -DMAController::DMAController() : fdc_(WD::WD1770::P1772) { +DMAController::DMAController() { } uint16_t DMAController::read(int address) { diff --git a/Machines/AtariST/DMAController.hpp b/Machines/AtariST/DMAController.hpp index e26ce8527..f082fcbc4 100644 --- a/Machines/AtariST/DMAController.hpp +++ b/Machines/AtariST/DMAController.hpp @@ -10,6 +10,8 @@ #define DMAController_hpp #include +#include + #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> drives_; + } fdc_; uint16_t control_ = 0; uint32_t address_ = 0;