2018-08-17 20:53:49 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "Processor.h"
|
|
|
|
|
|
|
|
namespace EightBit {
|
2020-04-06 22:11:21 +00:00
|
|
|
|
|
|
|
class Bus;
|
|
|
|
|
2018-08-17 20:53:49 +00:00
|
|
|
class BigEndianProcessor : public Processor {
|
2018-08-27 10:27:33 +00:00
|
|
|
public:
|
2021-07-18 13:28:40 +00:00
|
|
|
virtual ~BigEndianProcessor() noexcept {};
|
2018-11-27 22:36:54 +00:00
|
|
|
|
2021-07-18 13:28:40 +00:00
|
|
|
[[nodiscard]] register16_t peekWord(register16_t address) noexcept final;
|
|
|
|
void pokeWord(register16_t address, register16_t value) noexcept final;
|
2018-08-27 10:27:33 +00:00
|
|
|
|
2018-08-17 20:53:49 +00:00
|
|
|
protected:
|
2022-03-26 16:06:29 +00:00
|
|
|
BigEndianProcessor(Bus& memory) noexcept;
|
2018-08-17 20:53:49 +00:00
|
|
|
|
2022-01-17 19:10:15 +00:00
|
|
|
[[nodiscard]] register16_t getWord() noexcept override;
|
|
|
|
void setWord(register16_t value) noexcept override;
|
2018-08-17 20:53:49 +00:00
|
|
|
|
2022-01-17 19:10:15 +00:00
|
|
|
[[nodiscard]] register16_t getWordPaged(uint8_t page, uint8_t offset) noexcept override;
|
|
|
|
void setWordPaged(uint8_t page, uint8_t offset, register16_t value) noexcept override;
|
2018-08-17 20:53:49 +00:00
|
|
|
|
2022-01-17 19:10:15 +00:00
|
|
|
[[nodiscard]] register16_t fetchWord() noexcept final;
|
2018-08-17 20:53:49 +00:00
|
|
|
|
2022-01-17 19:10:15 +00:00
|
|
|
void pushWord(register16_t value) noexcept final;
|
|
|
|
[[nodiscard]] register16_t popWord() noexcept final;
|
2018-08-17 20:53:49 +00:00
|
|
|
};
|
|
|
|
}
|