mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-28 21:49:27 +00:00
Merge pull request #1372 from TomHarte/DiskReady
Add Archimedes disk drive RDY signal.
This commit is contained in:
commit
63009d00b4
@ -16,7 +16,7 @@ template <typename InterruptObserverT>
|
|||||||
class FloppyDisc: public WD::WD1770, public WD::WD1770::Delegate {
|
class FloppyDisc: public WD::WD1770, public WD::WD1770::Delegate {
|
||||||
public:
|
public:
|
||||||
FloppyDisc(InterruptObserverT &observer) : WD::WD1770(P1772), observer_(observer) {
|
FloppyDisc(InterruptObserverT &observer) : WD::WD1770(P1772), observer_(observer) {
|
||||||
emplace_drives(1, 8000000, 300, 2);
|
emplace_drives(1, 8000000, 300, 2, Storage::Disk::Drive::ReadyType::IBMRDY); // A guess at RDY type.
|
||||||
set_delegate(this);
|
set_delegate(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -40,6 +40,10 @@ public:
|
|||||||
get_drive(drive).set_disk(disk);
|
get_drive(drive).set_disk(disk);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool ready() const {
|
||||||
|
return get_drive().get_is_ready();
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
InterruptObserverT &observer_;
|
InterruptObserverT &observer_;
|
||||||
};
|
};
|
||||||
|
@ -200,8 +200,9 @@ struct InputOutputController: public ClockingHint::Observer {
|
|||||||
|
|
||||||
case 0x00: {
|
case 0x00: {
|
||||||
uint8_t value = control_ | 0xc0;
|
uint8_t value = control_ | 0xc0;
|
||||||
value &= ~(i2c_.clock() ? 0x02 : 0x00);
|
|
||||||
value &= ~(i2c_.data() ? 0x01 : 0x00);
|
value &= ~(i2c_.data() ? 0x01 : 0x00);
|
||||||
|
value &= ~(i2c_.clock() ? 0x02 : 0x00);
|
||||||
|
value &= ~(floppy_.ready() ? 0x04 : 0x00);
|
||||||
value &= ~(video_.flyback_active() ? 0x00 : 0x80); // i.e. high during flyback.
|
value &= ~(video_.flyback_active() ? 0x00 : 0x80); // i.e. high during flyback.
|
||||||
set_byte(value);
|
set_byte(value);
|
||||||
// logger.error().append("IOC control read: C:%d D:%d", !(value & 2), !(value & 1));
|
// logger.error().append("IOC control read: C:%d D:%d", !(value & 2), !(value & 1));
|
||||||
|
@ -50,6 +50,10 @@ Drive &Controller::get_drive() {
|
|||||||
return *drive_;
|
return *drive_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const Drive &Controller::get_drive() const {
|
||||||
|
return *drive_;
|
||||||
|
}
|
||||||
|
|
||||||
// MARK: - Drive::EventDelegate
|
// MARK: - Drive::EventDelegate
|
||||||
|
|
||||||
void Controller::process_event(const Drive::Event &event) {
|
void Controller::process_event(const Drive::Event &event) {
|
||||||
|
@ -117,6 +117,7 @@ class Controller:
|
|||||||
made about the lifetime or the exclusivity of the invented drive.
|
made about the lifetime or the exclusivity of the invented drive.
|
||||||
*/
|
*/
|
||||||
Drive &get_drive();
|
Drive &get_drive();
|
||||||
|
const Drive &get_drive() const;
|
||||||
|
|
||||||
Drive &get_drive(size_t index) {
|
Drive &get_drive(size_t index) {
|
||||||
return *drives_[index];
|
return *drives_[index];
|
||||||
|
Loading…
Reference in New Issue
Block a user