diff options
author | Oxore <oxore@protonmail.com> | 2023-05-07 20:38:17 +0300 |
---|---|---|
committer | Oxore <oxore@protonmail.com> | 2023-05-07 20:39:32 +0300 |
commit | f8a56f3c99fda938550ba6a1616c2fa4b41c19e9 (patch) | |
tree | 8b86ec58fe8773d2ae8853338ff6f95cce71d3f5 /vdp.hpp | |
parent | f475974aeee25082d6384f69212a9d237d394477 (diff) |
Impl basic sprite rendering
Diffstat (limited to 'vdp.hpp')
-rw-r--r-- | vdp.hpp | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -8,6 +8,19 @@ #include <cstddef> #include <cstring> +struct SpriteAttributeEntry { + uint16_t vpos; + uint16_t hpos; + uint16_t tile_id; + uint8_t link; + uint8_t palette_id; + uint8_t priority; + uint8_t vreverse; + uint8_t hreverse; + uint8_t vsize; + uint8_t hsize; +}; + class VDP { public: constexpr VDP(const uint32_t base_address_a = VDP_START): base_address(base_address_a) {} @@ -80,6 +93,8 @@ class VDP { size_t vcell_count); void renderScrollALine(size_t line_index, size_t hcell_count, size_t vcell_count); void renderScrollBLine(size_t line_index, size_t hcell_count, size_t vcell_count); + void renderSpritesLine(size_t line_index); + void renderSpriteOnTheLine(SpriteAttributeEntry, size_t line_index); void writeData(uint8_t address_mode, uint16_t address, uint16_t value); void writeControl(uint16_t value); uint16_t readData(uint8_t address_mode, uint16_t address); @@ -123,4 +138,5 @@ class VDP { uint8_t _cram[kCRAMSize]{}; uint8_t _vsram[kVSRAMSize]{}; uint32_t _rendered_buffer[kLinesPerScreenNTSC * kRenderWidth]{}; + bool _unclosed_sprites_list{}; }; |