1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-28 21:49:27 +00:00

Merge pull request #1373 from TomHarte/DiskReady

Further adjust RDY.
This commit is contained in:
Thomas Harte 2024-04-30 22:50:17 -04:00 committed by GitHub
commit e6724a701a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 5 additions and 2 deletions

View File

@ -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);
}

View File

@ -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));

View File

@ -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;