From f125cc7018ed32b7f919ff71ea3c7d9d2e6565de Mon Sep 17 00:00:00 2001 From: Oxore Date: Fri, 30 Sep 2022 01:21:52 +0300 Subject: Begin implementing VDP --- vdp.hpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 vdp.hpp (limited to 'vdp.hpp') diff --git a/vdp.hpp b/vdp.hpp new file mode 100644 index 0000000..0e911c9 --- /dev/null +++ b/vdp.hpp @@ -0,0 +1,23 @@ +/* SPDX-License-Identifier: Unlicense + */ + +#pragma once + +#include "bus.hpp" + +#include + +class VDP { + public: + VDP(const uint32_t base_address_a = VDP_START): base_address(base_address_a) {} + uint32_t Read(uint32_t offset, enum bitness); + void Write(uint32_t offset, enum bitness, uint32_t value); + + const uint32_t base_address; + + private: + void writeControl(uint16_t value); + + static constexpr size_t kRegistersCount = 0x18; + uint8_t _reg[kRegistersCount]{}; +}; -- cgit v1.2.3