diff options
author | Oxore <oxore@protonmail.com> | 2022-09-30 01:21:52 +0300 |
---|---|---|
committer | Oxore <oxore@protonmail.com> | 2022-09-30 01:21:52 +0300 |
commit | f125cc7018ed32b7f919ff71ea3c7d9d2e6565de (patch) | |
tree | 0cb150b6e712b000fc334f07f426e01ed2f60cd7 /vdp.hpp | |
parent | dedd5c981ee95d9667f1f2e5d0b419f08bee3908 (diff) |
Begin implementing VDP
Diffstat (limited to 'vdp.hpp')
-rw-r--r-- | vdp.hpp | 23 |
1 files changed, 23 insertions, 0 deletions
@@ -0,0 +1,23 @@ +/* SPDX-License-Identifier: Unlicense + */ + +#pragma once + +#include "bus.hpp" + +#include <cstdio> + +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]{}; +}; |