1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-18 17:06:15 +00:00

Removes logging and unnecessary get_drive_is_ready.

This commit is contained in:
Thomas Harte 2018-01-07 21:59:59 -05:00
parent 0ccc104027
commit a5ac8c824e
2 changed files with 1 additions and 10 deletions

View File

@ -25,7 +25,6 @@ void DiskROM::write(uint16_t address, uint8_t value) {
selected_head_ = value & 1; selected_head_ = value & 1;
if(drives_[0]) drives_[0]->set_head(selected_head_); if(drives_[0]) drives_[0]->set_head(selected_head_);
if(drives_[1]) drives_[1]->set_head(selected_head_); if(drives_[1]) drives_[1]->set_head(selected_head_);
printf("HEAD: %d\n", selected_head_);
break; break;
case 0x7ffd: { case 0x7ffd: {
selected_drive_ = value & 1; selected_drive_ = value & 1;
@ -34,8 +33,6 @@ void DiskROM::write(uint16_t address, uint8_t value) {
bool drive_motor = !!(value & 0x80); bool drive_motor = !!(value & 0x80);
if(drives_[0]) drives_[0]->set_motor_on(drive_motor); if(drives_[0]) drives_[0]->set_motor_on(drive_motor);
if(drives_[1]) drives_[1]->set_motor_on(drive_motor); if(drives_[1]) drives_[1]->set_motor_on(drive_motor);
printf("DRIVE: %d\n", selected_head_);
printf("MOTOR ON: %s\n", (value & 0x80) ? "on" : "off");
} break; } break;
} }
} }
@ -60,7 +57,6 @@ void DiskROM::run_for(HalfCycles half_cycles) {
} }
void DiskROM::set_disk(std::shared_ptr<Storage::Disk::Disk> disk, int drive) { void DiskROM::set_disk(std::shared_ptr<Storage::Disk::Disk> disk, int drive) {
printf("Disk to %d\n", drive);
if(!drives_[drive]) { if(!drives_[drive]) {
drives_[drive].reset(new Storage::Disk::Drive(8000000, 300, 2)); drives_[drive].reset(new Storage::Disk::Drive(8000000, 300, 2));
drives_[drive]->set_head(selected_head_); drives_[drive]->set_head(selected_head_);
@ -73,7 +69,3 @@ void DiskROM::set_head_load_request(bool head_load) {
// Magic! // Magic!
set_head_loaded(head_load); set_head_loaded(head_load);
} }
bool DiskROM::get_drive_is_ready() {
return true;
}

View File

@ -36,8 +36,7 @@ class DiskROM: public ROMSlotHandler, public WD::WD1770 {
int selected_head_ = 0; int selected_head_ = 0;
std::shared_ptr<Storage::Disk::Drive> drives_[4]; std::shared_ptr<Storage::Disk::Drive> drives_[4];
void set_head_load_request(bool head_load); void set_head_load_request(bool head_load) override;
bool get_drive_is_ready();
}; };
} }