1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-12-25 18:30:21 +00:00

The 1540 is now a ClockReceiver.

This commit is contained in:
Thomas Harte 2017-07-24 22:32:41 -04:00
parent efdac2ce8c
commit 9435c1e12a
4 changed files with 7 additions and 7 deletions

View File

@ -79,11 +79,11 @@ void Machine::set_disk(std::shared_ptr<Storage::Disk::Disk> disk) {
set_drive(drive);
}
void Machine::run_for_cycles(int number_of_cycles) {
CPU::MOS6502::Processor<Machine>::run_for(Cycles(number_of_cycles));
void Machine::run_for(const Cycles &cycles) {
CPU::MOS6502::Processor<Machine>::run_for(cycles);
set_motor_on(drive_VIA_.get_motor_enabled());
if(drive_VIA_.get_motor_enabled()) // TODO: motor speed up/down
Storage::Disk::Controller::run_for(Cycles(number_of_cycles));
Storage::Disk::Controller::run_for(cycles);
}
#pragma mark - 6522 delegate

View File

@ -138,7 +138,7 @@ class Machine:
*/
void set_serial_bus(std::shared_ptr<::Commodore::Serial::Bus> serial_bus);
void run_for_cycles(int number_of_cycles);
void run_for(const Cycles &cycles);
void set_disk(std::shared_ptr<Storage::Disk::Disk> disk);
// to satisfy CPU::MOS6502::Processor

View File

@ -188,7 +188,7 @@ unsigned int Machine::perform_bus_operation(CPU::MOS6502::BusOperation operation
}
}
tape_->run_for(Cycles(1));
if(c1540_) c1540_->run_for_cycles(1);
if(c1540_) c1540_->run_for(Cycles(1));
return 1;
}
@ -315,7 +315,7 @@ void Machine::tape_did_change_input(Storage::Tape::BinaryTapePlayer *tape) {
void Machine::install_disk_rom() {
if(!drive_rom_.empty() && c1540_) {
c1540_->set_rom(drive_rom_);
c1540_->run_for_cycles(2000000);
c1540_->run_for(Cycles(2000000));
drive_rom_.clear();
}
}

View File

@ -42,7 +42,7 @@ class VanillaSerialPort: public Commodore::Serial::Port {
}
- (void)runForCycles:(NSUInteger)numberOfCycles {
_c1540.run_for_cycles((int)numberOfCycles);
_c1540.run_for(Cycles((int)numberOfCycles));
}
- (void)setAttentionLine:(BOOL)attentionLine {