mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-25 16:31:42 +00:00
commit
e6724a701a
@ -16,7 +16,7 @@ template <typename InterruptObserverT>
|
||||
class FloppyDisc: public WD::WD1770, public WD::WD1770::Delegate {
|
||||
public:
|
||||
FloppyDisc(InterruptObserverT &observer) : WD::WD1770(P1772), observer_(observer) {
|
||||
emplace_drives(1, 8000000, 300, 2, Storage::Disk::Drive::ReadyType::IBMRDY); // A guess at RDY type.
|
||||
emplace_drives(1, 8000000, 300, 2, Storage::Disk::Drive::ReadyType::ShugartModifiedRDY); // A guess at RDY type.
|
||||
set_delegate(this);
|
||||
}
|
||||
|
||||
|
@ -202,7 +202,7 @@ struct InputOutputController: public ClockingHint::Observer {
|
||||
uint8_t value = control_ | 0xc0;
|
||||
value &= ~(i2c_.data() ? 0x01 : 0x00);
|
||||
value &= ~(i2c_.clock() ? 0x02 : 0x00);
|
||||
value &= ~(floppy_.ready() ? 0x04 : 0x00);
|
||||
value &= ~(floppy_.ready() ? 0x00 : 0x04);
|
||||
value &= ~(video_.flyback_active() ? 0x00 : 0x80); // i.e. high during flyback.
|
||||
set_byte(value);
|
||||
// logger.error().append("IOC control read: C:%d D:%d", !(value & 2), !(value & 1));
|
||||
|
@ -122,6 +122,9 @@ class Controller:
|
||||
Drive &get_drive(size_t index) {
|
||||
return *drives_[index];
|
||||
}
|
||||
const Drive &get_drive(size_t index) const {
|
||||
return *drives_[index];
|
||||
}
|
||||
|
||||
void for_all_drives(const std::function<void(Drive &, size_t)> &func) {
|
||||
size_t index = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user