EightBit/inc/ClockedChip.h
Adrian Conlon 4d2d1d214a Tidy up some C++ code (concentrating on the Z80 at the moment).
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
2021-01-09 08:41:48 +00:00

26 lines
386 B
C++

#pragma once
#include "Chip.h"
#include "EventArgs.h"
#include "Signal.h"
namespace EightBit {
class ClockedChip : public Chip {
public:
~ClockedChip() = default;
Signal<EventArgs> Ticked;
[[nodiscard]] auto cycles() const noexcept { return m_cycles; }
void tick(int extra);
void tick();
protected:
void resetCycles() noexcept;
private:
int m_cycles = 0;
};
}