Tidy some processor virtual specifications.

Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
This commit is contained in:
Adrian Conlon 2018-08-25 13:35:53 +01:00
parent 535346dede
commit 1212e8d4f0
9 changed files with 12 additions and 12 deletions

View File

@ -20,7 +20,7 @@ public:
void initialise();
protected:
virtual uint8_t& reference(uint16_t address) {
virtual uint8_t& reference(uint16_t address) final {
return m_ram.reference(address);
}

View File

@ -37,7 +37,7 @@ namespace Fuse {
EightBit::register16_t actual, EightBit::register16_t expected) const;
protected:
virtual uint8_t& reference(uint16_t address) {
virtual uint8_t& reference(uint16_t address) final {
return m_ram.reference(address);
}

View File

@ -54,7 +54,7 @@ namespace EightBit {
int runVerticalBlankLines();
protected:
virtual uint8_t& reference(uint16_t address);
virtual uint8_t& reference(uint16_t address) override;
private:
LR35902 m_cpu;

View File

@ -43,8 +43,8 @@ namespace EightBit {
virtual int execute(uint8_t opcode) final;
virtual int step() final;
virtual void handleRESET() override;
virtual void handleINT() override;
virtual void handleRESET() final;
virtual void handleINT() final;
private:
Bus& m_bus;

View File

@ -31,7 +31,7 @@ namespace EightBit {
virtual int execute(uint8_t opcode) final;
virtual int step() final;
virtual void powerOn() override;
virtual void powerOn() final;
uint8_t& X() { return x; }
uint8_t& Y() { return y; }

View File

@ -20,7 +20,7 @@ public:
void initialise();
protected:
virtual uint8_t& reference(uint16_t address) {
virtual uint8_t& reference(uint16_t address) final {
return m_ram.reference(address);
}

View File

@ -36,7 +36,7 @@ namespace Fuse {
EightBit::register16_t actual, EightBit::register16_t expected) const;
protected:
virtual uint8_t& reference(uint16_t address) {
virtual uint8_t& reference(uint16_t address) final {
return m_ram.reference(address);
}

View File

@ -10,14 +10,14 @@ namespace EightBit {
BigEndianProcessor(Bus& memory) : Processor(memory) {}
virtual ~BigEndianProcessor() = default;
virtual register16_t getWord() {
virtual register16_t getWord() override {
const auto high = BUS().read();
++BUS().ADDRESS();
const auto low = BUS().read();
return register16_t(low, high);
}
virtual void setWord(const register16_t value) {
virtual void setWord(const register16_t value) override {
BUS().write(value.high);
++BUS().ADDRESS();
BUS().write(value.low);

View File

@ -10,14 +10,14 @@ namespace EightBit {
LittleEndianProcessor(Bus& memory) : Processor(memory) {}
virtual ~LittleEndianProcessor() = default;
virtual register16_t getWord() {
virtual register16_t getWord() override {
const auto low = BUS().read();
++BUS().ADDRESS();
const auto high = BUS().read();
return register16_t(low, high);
}
virtual void setWord(const register16_t value) {
virtual void setWord(const register16_t value) override {
BUS().write(value.low);
++BUS().ADDRESS();
BUS().write(value.high);