mirror of
https://github.com/MoleskiCoder/EightBit.git
synced 2024-12-22 09:30:32 +00:00
4d2d1d214a
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
26 lines
386 B
C++
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;
|
|
};
|
|
}
|