From 0b297f2972214854a46f39a19aff83cc6c1d1e30 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Tue, 26 Dec 2017 22:13:28 -0500 Subject: [PATCH] Adds some appropriate costs to the tape players. --- Storage/Tape/Tape.cpp | 6 +++++- Storage/Tape/Tape.hpp | 4 +++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Storage/Tape/Tape.cpp b/Storage/Tape/Tape.cpp index 6722f6575..2c09dc228 100644 --- a/Storage/Tape/Tape.cpp +++ b/Storage/Tape/Tape.cpp @@ -130,11 +130,15 @@ void BinaryTapePlayer::set_motor_control(bool enabled) { } } +bool BinaryTapePlayer::get_motor_control() const { + return motor_is_running_; +} + void BinaryTapePlayer::set_tape_output(bool set) { // TODO } -bool BinaryTapePlayer::get_input() { +bool BinaryTapePlayer::get_input() const { return motor_is_running_ && input_level_; } diff --git a/Storage/Tape/Tape.hpp b/Storage/Tape/Tape.hpp index 1cc2aa435..829634ef5 100644 --- a/Storage/Tape/Tape.hpp +++ b/Storage/Tape/Tape.hpp @@ -132,8 +132,10 @@ class BinaryTapePlayer: public TapePlayer { public: BinaryTapePlayer(unsigned int input_clock_rate); void set_motor_control(bool enabled); + bool get_motor_control() const; + void set_tape_output(bool set); - bool get_input(); + bool get_input() const; void run_for(const Cycles cycles);