diff --git a/Machines/Commodore/1540/C1540.cpp b/Machines/Commodore/1540/C1540.cpp index da8a16955..d8d79cdff 100644 --- a/Machines/Commodore/1540/C1540.cpp +++ b/Machines/Commodore/1540/C1540.cpp @@ -79,11 +79,11 @@ void Machine::set_disk(std::shared_ptr disk) { set_drive(drive); } -void Machine::run_for_cycles(int number_of_cycles) { - CPU::MOS6502::Processor::run_for(Cycles(number_of_cycles)); +void Machine::run_for(const Cycles &cycles) { + CPU::MOS6502::Processor::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 diff --git a/Machines/Commodore/1540/C1540.hpp b/Machines/Commodore/1540/C1540.hpp index 5fdcf4294..af76b1f5b 100644 --- a/Machines/Commodore/1540/C1540.hpp +++ b/Machines/Commodore/1540/C1540.hpp @@ -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 disk); // to satisfy CPU::MOS6502::Processor diff --git a/Machines/Commodore/Vic-20/Vic20.cpp b/Machines/Commodore/Vic-20/Vic20.cpp index 691c36a79..b70d393e1 100644 --- a/Machines/Commodore/Vic-20/Vic20.cpp +++ b/Machines/Commodore/Vic-20/Vic20.cpp @@ -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(); } } diff --git a/OSBindings/Mac/Clock SignalTests/Bridges/C1540Bridge.mm b/OSBindings/Mac/Clock SignalTests/Bridges/C1540Bridge.mm index 7f8845ee8..1cc7e0a2e 100644 --- a/OSBindings/Mac/Clock SignalTests/Bridges/C1540Bridge.mm +++ b/OSBindings/Mac/Clock SignalTests/Bridges/C1540Bridge.mm @@ -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 {