Force drive selection; verify that the index hole is going by.

This commit is contained in:
Thomas Harte committed 2026-04-04 11:05:01 -04:00
1 parent 9e7d1d79e9
commit 9ab3d52eb2
2 files changed
+11 -7

No files matched your search

+2 -1
View File
@@ -36,8 +36,9 @@ void CD90_640::set_activity_observer(Activity::Observer *const observer) {
void CD90_640::set_disk(std::shared_ptr<Storage::Disk::Disk> disk, const size_t drive) {
get_drive(drive).set_disk(disk);
// TODO: what is really in charge of motor control?
// TODO: what is really in charge of motor control and drive selection?
get_drive(drive).set_motor_on(true);
set_drive(1 << drive);
}
const Storage::Disk::Disk *CD90_640::disk(const std::string &name) {
+9 -6
View File
@@ -25,12 +25,15 @@ public:
template <int address>
uint8_t read() {
Logger::info().append("Read %04x", address);
if(address & 8) {
return control();
} else {
return WD::WD1770::read(address);
}
const uint8_t result = [&] {
if(address & 8) {
return control();
} else {
return WD::WD1770::read(address);
}
} ();
Logger::info().append("Read %02x <- %04x", result, address);
return result;
}
template <int address>